@salesforce/ui-bundle-template-feature-vue-language-switcher 0.0.0-stage → 13.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.txt +82 -0
- package/README.md +141 -2
- package/dist/.forceignore +15 -0
- package/dist/.husky/pre-commit +4 -0
- package/dist/.prettierignore +11 -0
- package/dist/.prettierrc +17 -0
- package/dist/CHANGELOG.md +5431 -0
- package/dist/README.md +83 -0
- package/dist/config/project-scratch-def.json +13 -0
- package/dist/eslint.config.js +7 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/.forceignore +15 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/.graphqlrc.yml +2 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/.prettierignore +9 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/.prettierrc +11 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/README.md +43 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/codegen.yml +95 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/components.json +19 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/e2e/app.spec.ts +17 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/eslint.config.js +124 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/feature-vue-language-switcher.uibundle-meta.xml +7 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/index.html +12 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/package.json +72 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/playwright.config.ts +24 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/scripts/get-graphql-schema.mjs +71 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/scripts/rewrite-e2e-assets.mjs +23 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/App.vue +5 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/api/graphqlClient.ts +44 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/appLayout.vue +80 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/alerts/status-alert.vue +59 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/layouts/card-layout.vue +30 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/alert/Alert.vue +21 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/alert/AlertAction.vue +17 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/alert/AlertDescription.vue +22 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/alert/AlertTitle.vue +22 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/alert/index.ts +25 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/avatar/Avatar.vue +23 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/avatar/AvatarFallback.vue +31 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/avatar/AvatarImage.vue +16 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/avatar/index.ts +3 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/button/Button.vue +33 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/button/index.ts +43 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/card/Card.vue +29 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/card/CardAction.vue +22 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/card/CardContent.vue +17 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/card/CardDescription.vue +17 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/card/CardFooter.vue +22 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/card/CardHeader.vue +22 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/card/CardTitle.vue +22 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/card/index.ts +7 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/checkbox/Checkbox.vue +43 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/checkbox/index.ts +1 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/collapsible/Collapsible.vue +19 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/collapsible/CollapsibleContent.vue +12 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/collapsible/CollapsibleTrigger.vue +12 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/collapsible/index.ts +3 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/dialog/Dialog.vue +15 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/dialog/DialogClose.vue +12 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/dialog/DialogContent.vue +59 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/dialog/DialogDescription.vue +31 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/dialog/DialogFooter.vue +33 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/dialog/DialogHeader.vue +17 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/dialog/DialogOverlay.vue +31 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/dialog/DialogPortal.vue +12 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/dialog/DialogTitle.vue +26 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/dialog/DialogTrigger.vue +12 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/dialog/index.ts +10 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/dropdown-menu/DropdownMenu.vue +19 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue +51 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/dropdown-menu/DropdownMenuContent.vue +47 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/dropdown-menu/DropdownMenuGroup.vue +12 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/dropdown-menu/DropdownMenuItem.vue +44 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/dropdown-menu/DropdownMenuLabel.vue +30 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/dropdown-menu/DropdownMenuPortal.vue +12 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/dropdown-menu/DropdownMenuRadioGroup.vue +21 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/dropdown-menu/DropdownMenuRadioItem.vue +52 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/dropdown-menu/DropdownMenuSeparator.vue +26 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/dropdown-menu/DropdownMenuShortcut.vue +19 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/dropdown-menu/DropdownMenuSub.vue +19 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/dropdown-menu/DropdownMenuSubContent.vue +37 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue +38 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/dropdown-menu/DropdownMenuTrigger.vue +17 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/dropdown-menu/index.ts +15 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/field/Field.vue +27 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/field/FieldContent.vue +22 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/field/FieldDescription.vue +24 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/field/FieldError.vue +48 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/field/FieldGroup.vue +22 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/field/FieldLabel.vue +24 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/field/FieldLegend.vue +29 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/field/FieldSeparator.vue +31 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/field/FieldSet.vue +22 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/field/FieldTitle.vue +22 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/field/index.ts +33 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/index.ts +115 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/input/Input.vue +30 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/input/index.ts +1 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/label/Label.vue +29 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/label/index.ts +1 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/pagination/Pagination.vue +17 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/pagination/PaginationContent.vue +15 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/pagination/PaginationEllipsis.vue +23 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/pagination/PaginationItem.vue +7 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/pagination/PaginationLink.vue +31 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/pagination/PaginationNext.vue +29 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/pagination/PaginationPrevious.vue +29 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/pagination/index.ts +7 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/popover/Popover.vue +15 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/popover/PopoverAnchor.vue +12 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/popover/PopoverContent.vue +44 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/popover/PopoverDescription.vue +17 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/popover/PopoverHeader.vue +17 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/popover/PopoverTitle.vue +14 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/popover/PopoverTrigger.vue +12 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/popover/index.ts +7 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/select/Select.vue +15 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/select/SelectContent.vue +65 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/select/SelectGroup.vue +26 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/select/SelectItem.vue +41 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/select/SelectLabel.vue +26 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/select/SelectScrollDownButton.vue +32 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/select/SelectScrollUpButton.vue +32 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/select/SelectSeparator.vue +24 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/select/SelectTrigger.vue +45 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/select/SelectValue.vue +12 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/select/index.ts +10 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/separator/Separator.vue +33 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/separator/index.ts +1 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/skeleton/Skeleton.vue +15 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/skeleton/index.ts +1 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/sonner/Sonner.vue +29 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/sonner/index.ts +3 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/spinner/Spinner.vue +17 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/components/ui/spinner/index.ts +1 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/composables/useAsyncData.ts +69 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/features/language-switcher/LanguageSwitcher.vue +75 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/features/language-switcher/__examples__/language-switcher-example.vue +34 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/features/language-switcher/__examples__/vite-config-site-example.ts +44 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/features/language-switcher/buildLanguageUrl.ts +158 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/features/language-switcher/getCurrentLanguage.ts +59 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/features/language-switcher/index.ts +31 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/features/language-switcher/languages.ts +46 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/index.ts +8 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/lib/utils.ts +6 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/main.ts +6 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/pages/Home.vue +10 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/pages/NotFound.vue +18 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/router-utils.ts +32 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/router.ts +40 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/styles/global.css +134 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/test/setup.ts +1 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/src/types/globals.d.ts +23 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/tsconfig.json +45 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/tsconfig.node.json +13 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/tsconfig.tsbuildinfo +1 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/ui-bundle.json +7 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/vite-env.d.ts +14 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/vite.config.ts +106 -0
- package/dist/force-app/main/default/uiBundles/feature-vue-language-switcher/vitest-env.d.ts +2 -0
- package/dist/jest.config.js +6 -0
- package/dist/package-lock.json +12554 -0
- package/dist/package.json +46 -0
- package/dist/scripts/apex/hello.apex +10 -0
- package/dist/scripts/gitignore-templates.json +4 -0
- package/dist/scripts/graphql-search.sh +191 -0
- package/dist/scripts/network-senders.mjs +84 -0
- package/dist/scripts/org-setup-config-schema.mjs +132 -0
- package/dist/scripts/org-setup-dev.mjs +114 -0
- package/dist/scripts/org-setup-url.mjs +108 -0
- package/dist/scripts/org-setup-utils.mjs +569 -0
- package/dist/scripts/org-setup-xml.mjs +283 -0
- package/dist/scripts/org-setup.config.json +5 -0
- package/dist/scripts/org-setup.mjs +2545 -0
- package/dist/scripts/sf-project-setup.mjs +103 -0
- package/dist/scripts/soql/account.soql +6 -0
- package/dist/scripts/validate-org-setup-config.mjs +38 -0
- package/dist/sfdx-project.json +12 -0
- package/package.json +51 -4
- package/src/force-app/main/default/uiBundles/feature-vue-language-switcher/src/features/language-switcher/LanguageSwitcher.vue +75 -0
- package/src/force-app/main/default/uiBundles/feature-vue-language-switcher/src/features/language-switcher/__examples__/language-switcher-example.vue +34 -0
- package/src/force-app/main/default/uiBundles/feature-vue-language-switcher/src/features/language-switcher/__examples__/vite-config-site-example.ts +44 -0
- package/src/force-app/main/default/uiBundles/feature-vue-language-switcher/src/features/language-switcher/buildLanguageUrl.ts +158 -0
- package/src/force-app/main/default/uiBundles/feature-vue-language-switcher/src/features/language-switcher/getCurrentLanguage.ts +59 -0
- package/src/force-app/main/default/uiBundles/feature-vue-language-switcher/src/features/language-switcher/index.ts +31 -0
- package/src/force-app/main/default/uiBundles/feature-vue-language-switcher/src/features/language-switcher/languages.ts +46 -0
- package/src/force-app/main/default/uiBundles/feature-vue-language-switcher/src/index.ts +8 -0
- package/src/force-app/main/default/uiBundles/feature-vue-language-switcher/src/types/globals.d.ts +23 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from 'vue';
|
|
3
|
+
import { cn } from '@/lib/utils';
|
|
4
|
+
|
|
5
|
+
defineOptions({
|
|
6
|
+
inheritAttrs: false,
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
const props = defineProps<{
|
|
10
|
+
class?: HTMLAttributes['class'];
|
|
11
|
+
type?: string;
|
|
12
|
+
}>();
|
|
13
|
+
|
|
14
|
+
const modelValue = defineModel<string | number>();
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<template>
|
|
18
|
+
<input
|
|
19
|
+
v-model="modelValue"
|
|
20
|
+
:type="type"
|
|
21
|
+
data-slot="input"
|
|
22
|
+
v-bind="$attrs"
|
|
23
|
+
:class="
|
|
24
|
+
cn(
|
|
25
|
+
'dark:bg-input/30 border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 disabled:bg-input/50 dark:disabled:bg-input/80 h-8 rounded-lg border bg-transparent px-2.5 py-1 text-base transition-colors file:h-6 file:text-sm file:font-medium focus-visible:ring-3 aria-invalid:ring-3 md:text-sm file:text-foreground placeholder:text-muted-foreground/70 placeholder:italic w-full min-w-0 outline-none file:inline-flex file:border-0 file:bg-transparent disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50',
|
|
26
|
+
props.class
|
|
27
|
+
)
|
|
28
|
+
"
|
|
29
|
+
/>
|
|
30
|
+
</template>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Input } from './Input.vue';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { LabelProps } from 'reka-ui';
|
|
3
|
+
import type { HTMLAttributes } from 'vue';
|
|
4
|
+
import { computed } from 'vue';
|
|
5
|
+
import { Label } from 'reka-ui';
|
|
6
|
+
import { cn } from '@/lib/utils';
|
|
7
|
+
|
|
8
|
+
const props = defineProps<LabelProps & { class?: HTMLAttributes['class'] }>();
|
|
9
|
+
|
|
10
|
+
const delegatedProps = computed(() => {
|
|
11
|
+
const { class: _class, ...rest } = props;
|
|
12
|
+
return rest;
|
|
13
|
+
});
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<template>
|
|
17
|
+
<Label
|
|
18
|
+
data-slot="label"
|
|
19
|
+
v-bind="delegatedProps"
|
|
20
|
+
:class="
|
|
21
|
+
cn(
|
|
22
|
+
'gap-2 text-sm leading-none font-medium group-data-[disabled=true]:opacity-50 peer-disabled:opacity-50 flex items-center select-none group-data-[disabled=true]:pointer-events-none peer-disabled:cursor-not-allowed',
|
|
23
|
+
props.class
|
|
24
|
+
)
|
|
25
|
+
"
|
|
26
|
+
>
|
|
27
|
+
<slot />
|
|
28
|
+
</Label>
|
|
29
|
+
</template>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Label } from './Label.vue';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from 'vue';
|
|
3
|
+
import { cn } from '@/lib/utils';
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{ class?: HTMLAttributes['class'] }>();
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<template>
|
|
9
|
+
<nav
|
|
10
|
+
role="navigation"
|
|
11
|
+
aria-label="pagination"
|
|
12
|
+
data-slot="pagination"
|
|
13
|
+
:class="cn('mx-auto flex w-full justify-center', props.class)"
|
|
14
|
+
>
|
|
15
|
+
<slot />
|
|
16
|
+
</nav>
|
|
17
|
+
</template>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from 'vue';
|
|
3
|
+
import { cn } from '@/lib/utils';
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{ class?: HTMLAttributes['class'] }>();
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<template>
|
|
9
|
+
<ul
|
|
10
|
+
data-slot="pagination-content"
|
|
11
|
+
:class="cn('gap-0.5 flex items-center', props.class)"
|
|
12
|
+
>
|
|
13
|
+
<slot />
|
|
14
|
+
</ul>
|
|
15
|
+
</template>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from 'vue';
|
|
3
|
+
import { MoreHorizontalIcon } from '@lucide/vue';
|
|
4
|
+
import { cn } from '@/lib/utils';
|
|
5
|
+
|
|
6
|
+
const props = defineProps<{ class?: HTMLAttributes['class'] }>();
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<template>
|
|
10
|
+
<span
|
|
11
|
+
aria-hidden
|
|
12
|
+
data-slot="pagination-ellipsis"
|
|
13
|
+
:class="
|
|
14
|
+
cn(
|
|
15
|
+
`size-8 [&_svg:not([class*='size-'])]:size-4 flex items-center justify-center`,
|
|
16
|
+
props.class
|
|
17
|
+
)
|
|
18
|
+
"
|
|
19
|
+
>
|
|
20
|
+
<MoreHorizontalIcon />
|
|
21
|
+
<span class="sr-only">More pages</span>
|
|
22
|
+
</span>
|
|
23
|
+
</template>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from 'vue';
|
|
3
|
+
import type { ButtonVariants } from '../button';
|
|
4
|
+
import { cn } from '@/lib/utils';
|
|
5
|
+
import { Button } from '../button';
|
|
6
|
+
|
|
7
|
+
const props = withDefaults(
|
|
8
|
+
defineProps<{
|
|
9
|
+
isActive?: boolean;
|
|
10
|
+
size?: ButtonVariants['size'];
|
|
11
|
+
class?: HTMLAttributes['class'];
|
|
12
|
+
}>(),
|
|
13
|
+
{
|
|
14
|
+
size: 'icon',
|
|
15
|
+
}
|
|
16
|
+
);
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<template>
|
|
20
|
+
<Button
|
|
21
|
+
as="a"
|
|
22
|
+
:variant="isActive ? 'outline' : 'ghost'"
|
|
23
|
+
:size="size"
|
|
24
|
+
:aria-current="isActive ? 'page' : undefined"
|
|
25
|
+
data-slot="pagination-link"
|
|
26
|
+
:data-active="isActive"
|
|
27
|
+
:class="cn(props.class)"
|
|
28
|
+
>
|
|
29
|
+
<slot />
|
|
30
|
+
</Button>
|
|
31
|
+
</template>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from 'vue';
|
|
3
|
+
import { ChevronRightIcon } from '@lucide/vue';
|
|
4
|
+
import { cn } from '@/lib/utils';
|
|
5
|
+
import PaginationLink from './PaginationLink.vue';
|
|
6
|
+
|
|
7
|
+
const props = withDefaults(
|
|
8
|
+
defineProps<{
|
|
9
|
+
isActive?: boolean;
|
|
10
|
+
text?: string;
|
|
11
|
+
class?: HTMLAttributes['class'];
|
|
12
|
+
}>(),
|
|
13
|
+
{
|
|
14
|
+
text: 'Next',
|
|
15
|
+
}
|
|
16
|
+
);
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<template>
|
|
20
|
+
<PaginationLink
|
|
21
|
+
aria-label="Go to next page"
|
|
22
|
+
size="default"
|
|
23
|
+
:is-active="isActive"
|
|
24
|
+
:class="cn('pr-1.5!', props.class)"
|
|
25
|
+
>
|
|
26
|
+
<span class="hidden sm:block">{{ text }}</span>
|
|
27
|
+
<ChevronRightIcon data-icon="inline-end" class="cn-rtl-flip" />
|
|
28
|
+
</PaginationLink>
|
|
29
|
+
</template>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from 'vue';
|
|
3
|
+
import { ChevronLeftIcon } from '@lucide/vue';
|
|
4
|
+
import { cn } from '@/lib/utils';
|
|
5
|
+
import PaginationLink from './PaginationLink.vue';
|
|
6
|
+
|
|
7
|
+
const props = withDefaults(
|
|
8
|
+
defineProps<{
|
|
9
|
+
isActive?: boolean;
|
|
10
|
+
text?: string;
|
|
11
|
+
class?: HTMLAttributes['class'];
|
|
12
|
+
}>(),
|
|
13
|
+
{
|
|
14
|
+
text: 'Previous',
|
|
15
|
+
}
|
|
16
|
+
);
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<template>
|
|
20
|
+
<PaginationLink
|
|
21
|
+
aria-label="Go to previous page"
|
|
22
|
+
size="default"
|
|
23
|
+
:is-active="isActive"
|
|
24
|
+
:class="cn('pl-1.5!', props.class)"
|
|
25
|
+
>
|
|
26
|
+
<ChevronLeftIcon data-icon="inline-start" class="cn-rtl-flip" />
|
|
27
|
+
<span class="hidden sm:block">{{ text }}</span>
|
|
28
|
+
</PaginationLink>
|
|
29
|
+
</template>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { default as Pagination } from './Pagination.vue';
|
|
2
|
+
export { default as PaginationContent } from './PaginationContent.vue';
|
|
3
|
+
export { default as PaginationItem } from './PaginationItem.vue';
|
|
4
|
+
export { default as PaginationLink } from './PaginationLink.vue';
|
|
5
|
+
export { default as PaginationPrevious } from './PaginationPrevious.vue';
|
|
6
|
+
export { default as PaginationNext } from './PaginationNext.vue';
|
|
7
|
+
export { default as PaginationEllipsis } from './PaginationEllipsis.vue';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { PopoverRootEmits, PopoverRootProps } from 'reka-ui';
|
|
3
|
+
import { PopoverRoot, useForwardPropsEmits } from 'reka-ui';
|
|
4
|
+
|
|
5
|
+
const props = defineProps<PopoverRootProps>();
|
|
6
|
+
const emits = defineEmits<PopoverRootEmits>();
|
|
7
|
+
|
|
8
|
+
const forwarded = useForwardPropsEmits(props, emits);
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<template>
|
|
12
|
+
<PopoverRoot v-slot="slotProps" data-slot="popover" v-bind="forwarded">
|
|
13
|
+
<slot v-bind="slotProps" />
|
|
14
|
+
</PopoverRoot>
|
|
15
|
+
</template>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { PopoverAnchorProps } from 'reka-ui';
|
|
3
|
+
import { PopoverAnchor } from 'reka-ui';
|
|
4
|
+
|
|
5
|
+
const props = defineProps<PopoverAnchorProps>();
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<template>
|
|
9
|
+
<PopoverAnchor data-slot="popover-anchor" v-bind="props">
|
|
10
|
+
<slot />
|
|
11
|
+
</PopoverAnchor>
|
|
12
|
+
</template>
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { PopoverContentEmits, PopoverContentProps } from 'reka-ui';
|
|
3
|
+
import type { HTMLAttributes } from 'vue';
|
|
4
|
+
import { computed } from 'vue';
|
|
5
|
+
import { PopoverContent, PopoverPortal, useForwardPropsEmits } from 'reka-ui';
|
|
6
|
+
import { cn } from '@/lib/utils';
|
|
7
|
+
|
|
8
|
+
defineOptions({
|
|
9
|
+
inheritAttrs: false,
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
const props = withDefaults(
|
|
13
|
+
defineProps<PopoverContentProps & { class?: HTMLAttributes['class'] }>(),
|
|
14
|
+
{
|
|
15
|
+
align: 'center',
|
|
16
|
+
sideOffset: 4,
|
|
17
|
+
}
|
|
18
|
+
);
|
|
19
|
+
const emits = defineEmits<PopoverContentEmits>();
|
|
20
|
+
|
|
21
|
+
const delegatedProps = computed(() => {
|
|
22
|
+
const { class: _class, ...rest } = props;
|
|
23
|
+
return rest;
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
|
27
|
+
</script>
|
|
28
|
+
|
|
29
|
+
<template>
|
|
30
|
+
<PopoverPortal>
|
|
31
|
+
<PopoverContent
|
|
32
|
+
data-slot="popover-content"
|
|
33
|
+
v-bind="{ ...$attrs, ...forwarded }"
|
|
34
|
+
:class="
|
|
35
|
+
cn(
|
|
36
|
+
'bg-popover text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 flex flex-col gap-2.5 rounded-lg p-2.5 text-sm shadow-md ring-1 duration-100 z-50 w-72 origin-(--radix-popover-content-transform-origin) outline-hidden',
|
|
37
|
+
props.class
|
|
38
|
+
)
|
|
39
|
+
"
|
|
40
|
+
>
|
|
41
|
+
<slot />
|
|
42
|
+
</PopoverContent>
|
|
43
|
+
</PopoverPortal>
|
|
44
|
+
</template>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from 'vue';
|
|
3
|
+
import { cn } from '@/lib/utils';
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{
|
|
6
|
+
class?: HTMLAttributes['class'];
|
|
7
|
+
}>();
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<template>
|
|
11
|
+
<p
|
|
12
|
+
data-slot="popover-description"
|
|
13
|
+
:class="cn('text-muted-foreground', props.class)"
|
|
14
|
+
>
|
|
15
|
+
<slot />
|
|
16
|
+
</p>
|
|
17
|
+
</template>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from 'vue';
|
|
3
|
+
import { cn } from '@/lib/utils';
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{
|
|
6
|
+
class?: HTMLAttributes['class'];
|
|
7
|
+
}>();
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<template>
|
|
11
|
+
<div
|
|
12
|
+
data-slot="popover-header"
|
|
13
|
+
:class="cn('flex flex-col gap-0.5 text-sm', props.class)"
|
|
14
|
+
>
|
|
15
|
+
<slot />
|
|
16
|
+
</div>
|
|
17
|
+
</template>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from 'vue';
|
|
3
|
+
import { cn } from '@/lib/utils';
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{
|
|
6
|
+
class?: HTMLAttributes['class'];
|
|
7
|
+
}>();
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<template>
|
|
11
|
+
<div data-slot="popover-title" :class="cn('font-medium', props.class)">
|
|
12
|
+
<slot />
|
|
13
|
+
</div>
|
|
14
|
+
</template>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { PopoverTriggerProps } from 'reka-ui';
|
|
3
|
+
import { PopoverTrigger } from 'reka-ui';
|
|
4
|
+
|
|
5
|
+
const props = defineProps<PopoverTriggerProps>();
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<template>
|
|
9
|
+
<PopoverTrigger data-slot="popover-trigger" v-bind="props">
|
|
10
|
+
<slot />
|
|
11
|
+
</PopoverTrigger>
|
|
12
|
+
</template>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { default as Popover } from './Popover.vue';
|
|
2
|
+
export { default as PopoverAnchor } from './PopoverAnchor.vue';
|
|
3
|
+
export { default as PopoverContent } from './PopoverContent.vue';
|
|
4
|
+
export { default as PopoverDescription } from './PopoverDescription.vue';
|
|
5
|
+
export { default as PopoverHeader } from './PopoverHeader.vue';
|
|
6
|
+
export { default as PopoverTitle } from './PopoverTitle.vue';
|
|
7
|
+
export { default as PopoverTrigger } from './PopoverTrigger.vue';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { SelectRootEmits, SelectRootProps } from 'reka-ui';
|
|
3
|
+
import { SelectRoot, useForwardPropsEmits } from 'reka-ui';
|
|
4
|
+
|
|
5
|
+
const props = defineProps<SelectRootProps>();
|
|
6
|
+
const emits = defineEmits<SelectRootEmits>();
|
|
7
|
+
|
|
8
|
+
const forwarded = useForwardPropsEmits(props, emits);
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<template>
|
|
12
|
+
<SelectRoot v-slot="slotProps" data-slot="select" v-bind="forwarded">
|
|
13
|
+
<slot v-bind="slotProps" />
|
|
14
|
+
</SelectRoot>
|
|
15
|
+
</template>
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { SelectContentEmits, SelectContentProps } from 'reka-ui';
|
|
3
|
+
import type { HTMLAttributes } from 'vue';
|
|
4
|
+
import { computed } from 'vue';
|
|
5
|
+
import {
|
|
6
|
+
SelectContent,
|
|
7
|
+
SelectPortal,
|
|
8
|
+
SelectViewport,
|
|
9
|
+
useForwardPropsEmits,
|
|
10
|
+
} from 'reka-ui';
|
|
11
|
+
import { cn } from '@/lib/utils';
|
|
12
|
+
import SelectScrollDownButton from './SelectScrollDownButton.vue';
|
|
13
|
+
import SelectScrollUpButton from './SelectScrollUpButton.vue';
|
|
14
|
+
|
|
15
|
+
defineOptions({
|
|
16
|
+
inheritAttrs: false,
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
const props = withDefaults(
|
|
20
|
+
defineProps<SelectContentProps & { class?: HTMLAttributes['class'] }>(),
|
|
21
|
+
{
|
|
22
|
+
position: 'item-aligned',
|
|
23
|
+
align: 'center',
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
const emits = defineEmits<SelectContentEmits>();
|
|
27
|
+
|
|
28
|
+
const delegatedProps = computed(() => {
|
|
29
|
+
const { class: _class, ...rest } = props;
|
|
30
|
+
return rest;
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
|
34
|
+
</script>
|
|
35
|
+
|
|
36
|
+
<template>
|
|
37
|
+
<SelectPortal>
|
|
38
|
+
<SelectContent
|
|
39
|
+
data-slot="select-content"
|
|
40
|
+
:data-align-trigger="position === 'item-aligned'"
|
|
41
|
+
v-bind="{ ...$attrs, ...forwarded }"
|
|
42
|
+
:class="
|
|
43
|
+
cn(
|
|
44
|
+
'bg-popover text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 min-w-36 rounded-lg shadow-md ring-1 duration-100 relative z-50 max-h-(--radix-select-content-available-height) origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto data-[align-trigger=true]:animate-none',
|
|
45
|
+
position === 'popper' &&
|
|
46
|
+
'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1',
|
|
47
|
+
props.class
|
|
48
|
+
)
|
|
49
|
+
"
|
|
50
|
+
>
|
|
51
|
+
<SelectScrollUpButton />
|
|
52
|
+
<SelectViewport
|
|
53
|
+
:data-position="position"
|
|
54
|
+
:class="
|
|
55
|
+
cn(
|
|
56
|
+
'data-[position=popper]:h-(--radix-select-trigger-height) data-[position=popper]:w-full data-[position=popper]:min-w-(--radix-select-trigger-width)'
|
|
57
|
+
)
|
|
58
|
+
"
|
|
59
|
+
>
|
|
60
|
+
<slot />
|
|
61
|
+
</SelectViewport>
|
|
62
|
+
<SelectScrollDownButton />
|
|
63
|
+
</SelectContent>
|
|
64
|
+
</SelectPortal>
|
|
65
|
+
</template>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { SelectGroupProps } from 'reka-ui';
|
|
3
|
+
import type { HTMLAttributes } from 'vue';
|
|
4
|
+
import { computed } from 'vue';
|
|
5
|
+
import { SelectGroup } from 'reka-ui';
|
|
6
|
+
import { cn } from '@/lib/utils';
|
|
7
|
+
|
|
8
|
+
const props = defineProps<
|
|
9
|
+
SelectGroupProps & { class?: HTMLAttributes['class'] }
|
|
10
|
+
>();
|
|
11
|
+
|
|
12
|
+
const delegatedProps = computed(() => {
|
|
13
|
+
const { class: _class, ...rest } = props;
|
|
14
|
+
return rest;
|
|
15
|
+
});
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<template>
|
|
19
|
+
<SelectGroup
|
|
20
|
+
data-slot="select-group"
|
|
21
|
+
v-bind="delegatedProps"
|
|
22
|
+
:class="cn('scroll-my-1 p-1', props.class)"
|
|
23
|
+
>
|
|
24
|
+
<slot />
|
|
25
|
+
</SelectGroup>
|
|
26
|
+
</template>
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { SelectItemProps } from 'reka-ui';
|
|
3
|
+
import type { HTMLAttributes } from 'vue';
|
|
4
|
+
import { computed } from 'vue';
|
|
5
|
+
import { CheckIcon } from '@lucide/vue';
|
|
6
|
+
import { SelectItem, SelectItemIndicator, SelectItemText } from 'reka-ui';
|
|
7
|
+
import { cn } from '@/lib/utils';
|
|
8
|
+
|
|
9
|
+
const props = defineProps<
|
|
10
|
+
SelectItemProps & { class?: HTMLAttributes['class'] }
|
|
11
|
+
>();
|
|
12
|
+
|
|
13
|
+
const delegatedProps = computed(() => {
|
|
14
|
+
const { class: _class, ...rest } = props;
|
|
15
|
+
return rest;
|
|
16
|
+
});
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<template>
|
|
20
|
+
<SelectItem
|
|
21
|
+
data-slot="select-item"
|
|
22
|
+
v-bind="delegatedProps"
|
|
23
|
+
:class="
|
|
24
|
+
cn(
|
|
25
|
+
`focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2 relative flex w-full cursor-default items-center outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0`,
|
|
26
|
+
props.class
|
|
27
|
+
)
|
|
28
|
+
"
|
|
29
|
+
>
|
|
30
|
+
<span
|
|
31
|
+
class="pointer-events-none absolute right-2 flex size-4 items-center justify-center"
|
|
32
|
+
>
|
|
33
|
+
<SelectItemIndicator>
|
|
34
|
+
<CheckIcon class="pointer-events-none" />
|
|
35
|
+
</SelectItemIndicator>
|
|
36
|
+
</span>
|
|
37
|
+
<SelectItemText>
|
|
38
|
+
<slot />
|
|
39
|
+
</SelectItemText>
|
|
40
|
+
</SelectItem>
|
|
41
|
+
</template>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { SelectLabelProps } from 'reka-ui';
|
|
3
|
+
import type { HTMLAttributes } from 'vue';
|
|
4
|
+
import { computed } from 'vue';
|
|
5
|
+
import { SelectLabel } from 'reka-ui';
|
|
6
|
+
import { cn } from '@/lib/utils';
|
|
7
|
+
|
|
8
|
+
const props = defineProps<
|
|
9
|
+
SelectLabelProps & { class?: HTMLAttributes['class'] }
|
|
10
|
+
>();
|
|
11
|
+
|
|
12
|
+
const delegatedProps = computed(() => {
|
|
13
|
+
const { class: _class, ...rest } = props;
|
|
14
|
+
return rest;
|
|
15
|
+
});
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<template>
|
|
19
|
+
<SelectLabel
|
|
20
|
+
data-slot="select-label"
|
|
21
|
+
v-bind="delegatedProps"
|
|
22
|
+
:class="cn('text-muted-foreground px-1.5 py-1 text-xs', props.class)"
|
|
23
|
+
>
|
|
24
|
+
<slot />
|
|
25
|
+
</SelectLabel>
|
|
26
|
+
</template>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { SelectScrollDownButtonProps } from 'reka-ui';
|
|
3
|
+
import type { HTMLAttributes } from 'vue';
|
|
4
|
+
import { computed } from 'vue';
|
|
5
|
+
import { ChevronDownIcon } from '@lucide/vue';
|
|
6
|
+
import { SelectScrollDownButton } from 'reka-ui';
|
|
7
|
+
import { cn } from '@/lib/utils';
|
|
8
|
+
|
|
9
|
+
const props = defineProps<
|
|
10
|
+
SelectScrollDownButtonProps & { class?: HTMLAttributes['class'] }
|
|
11
|
+
>();
|
|
12
|
+
|
|
13
|
+
const delegatedProps = computed(() => {
|
|
14
|
+
const { class: _class, ...rest } = props;
|
|
15
|
+
return rest;
|
|
16
|
+
});
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<template>
|
|
20
|
+
<SelectScrollDownButton
|
|
21
|
+
data-slot="select-scroll-down-button"
|
|
22
|
+
v-bind="delegatedProps"
|
|
23
|
+
:class="
|
|
24
|
+
cn(
|
|
25
|
+
`bg-popover z-10 flex cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4`,
|
|
26
|
+
props.class
|
|
27
|
+
)
|
|
28
|
+
"
|
|
29
|
+
>
|
|
30
|
+
<ChevronDownIcon />
|
|
31
|
+
</SelectScrollDownButton>
|
|
32
|
+
</template>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { SelectScrollUpButtonProps } from 'reka-ui';
|
|
3
|
+
import type { HTMLAttributes } from 'vue';
|
|
4
|
+
import { computed } from 'vue';
|
|
5
|
+
import { ChevronUpIcon } from '@lucide/vue';
|
|
6
|
+
import { SelectScrollUpButton } from 'reka-ui';
|
|
7
|
+
import { cn } from '@/lib/utils';
|
|
8
|
+
|
|
9
|
+
const props = defineProps<
|
|
10
|
+
SelectScrollUpButtonProps & { class?: HTMLAttributes['class'] }
|
|
11
|
+
>();
|
|
12
|
+
|
|
13
|
+
const delegatedProps = computed(() => {
|
|
14
|
+
const { class: _class, ...rest } = props;
|
|
15
|
+
return rest;
|
|
16
|
+
});
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<template>
|
|
20
|
+
<SelectScrollUpButton
|
|
21
|
+
data-slot="select-scroll-up-button"
|
|
22
|
+
v-bind="delegatedProps"
|
|
23
|
+
:class="
|
|
24
|
+
cn(
|
|
25
|
+
`bg-popover z-10 flex cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4`,
|
|
26
|
+
props.class
|
|
27
|
+
)
|
|
28
|
+
"
|
|
29
|
+
>
|
|
30
|
+
<ChevronUpIcon />
|
|
31
|
+
</SelectScrollUpButton>
|
|
32
|
+
</template>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { SelectSeparatorProps } from 'reka-ui';
|
|
3
|
+
import type { HTMLAttributes } from 'vue';
|
|
4
|
+
import { computed } from 'vue';
|
|
5
|
+
import { SelectSeparator } from 'reka-ui';
|
|
6
|
+
import { cn } from '@/lib/utils';
|
|
7
|
+
|
|
8
|
+
const props = defineProps<
|
|
9
|
+
SelectSeparatorProps & { class?: HTMLAttributes['class'] }
|
|
10
|
+
>();
|
|
11
|
+
|
|
12
|
+
const delegatedProps = computed(() => {
|
|
13
|
+
const { class: _class, ...rest } = props;
|
|
14
|
+
return rest;
|
|
15
|
+
});
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<template>
|
|
19
|
+
<SelectSeparator
|
|
20
|
+
data-slot="select-separator"
|
|
21
|
+
v-bind="delegatedProps"
|
|
22
|
+
:class="cn('bg-border -mx-1 my-1 h-px pointer-events-none', props.class)"
|
|
23
|
+
/>
|
|
24
|
+
</template>
|