-
-
Notifications
You must be signed in to change notification settings - Fork 474
feat: copy package name button #473
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 4 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
93d3894
feat: added button to copy package name
WilcoSp 01e9d7a
removing comment that I used in dev
WilcoSp 96a54cf
[autofix.ci] apply automated fixes
autofix-ci[bot] 4c77006
Merge branch 'main' into feat/copyPackageName
danielroe 54dd756
refactor: rtl support
danielroe b6fdf58
fix: use scale-down transition for copy
danielroe 9593740
Merge remote-tracking branch 'origin/main' into feat/copyPackageName
danielroe File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| <script setup lang="ts"> | ||
| const props = defineProps<{ | ||
| /** Tooltip text */ | ||
| text: string | ||
| /** Position: 'top' | 'bottom' | 'left' | 'right' */ | ||
| position?: 'top' | 'bottom' | 'left' | 'right' | ||
| /** is tooltip visible */ | ||
| isVisible: boolean | ||
| }>() | ||
| </script> | ||
|
|
||
| <template> | ||
| <BaseTooltip :text :isVisible :position :tooltip-attr="{ 'aria-live': 'polite' }" | ||
| ><slot | ||
| /></BaseTooltip> | ||
| </template> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| <script setup lang="ts"> | ||
| import type { HTMLAttributes } from 'vue' | ||
|
|
||
| const props = defineProps<{ | ||
| /** Tooltip text */ | ||
| text: string | ||
| /** Position: 'top' | 'bottom' | 'left' | 'right' */ | ||
| position: 'top' | 'bottom' | 'left' | 'right' | undefined | ||
| /** is tooltip visible */ | ||
| isVisible: boolean | ||
| /** attributes for tooltip element */ | ||
| tooltipAttr?: HTMLAttributes | ||
| }>() | ||
|
|
||
| // const isVisible = shallowRef(false) | ||
| // const tooltipId = useId() | ||
|
|
||
| const positionClasses: Record<string, string> = { | ||
| top: 'bottom-full left-1/2 -translate-x-1/2 mb-1', | ||
| bottom: 'top-full left-0 mt-1', | ||
| left: 'right-full top-1/2 -translate-y-1/2 mr-2', | ||
| right: 'left-full top-1/2 -translate-y-1/2 ml-2', | ||
| } | ||
|
|
||
| const tooltipPosition = computed(() => positionClasses[props.position || 'bottom']) | ||
| </script> | ||
|
|
||
| <template> | ||
| <div class="relative inline-flex"> | ||
| <slot /> | ||
|
|
||
| <Transition | ||
| enter-active-class="transition-opacity duration-150 motion-reduce:transition-none" | ||
| leave-active-class="transition-opacity duration-100 motion-reduce:transition-none" | ||
| enter-from-class="opacity-0" | ||
| leave-to-class="opacity-0" | ||
| > | ||
| <!-- aria-live="polite" --> | ||
| <div | ||
| v-if="props.isVisible" | ||
| class="absolute px-2 py-1 font-mono text-xs text-fg bg-bg-elevated border border-border rounded shadow-lg whitespace-nowrap z-[100] pointer-events-none" | ||
| :class="tooltipPosition" | ||
| v-bind="tooltipAttr" | ||
| > | ||
| {{ text }} | ||
| </div> | ||
| </Transition> | ||
| </div> | ||
| </template> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.