@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,52 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type {
|
|
3
|
+
DropdownMenuRadioItemEmits,
|
|
4
|
+
DropdownMenuRadioItemProps,
|
|
5
|
+
} from 'reka-ui';
|
|
6
|
+
import type { HTMLAttributes } from 'vue';
|
|
7
|
+
import { computed } from 'vue';
|
|
8
|
+
import { CircleIcon } from '@lucide/vue';
|
|
9
|
+
import {
|
|
10
|
+
DropdownMenuItemIndicator,
|
|
11
|
+
DropdownMenuRadioItem,
|
|
12
|
+
useForwardPropsEmits,
|
|
13
|
+
} from 'reka-ui';
|
|
14
|
+
import { cn } from '@/lib/utils';
|
|
15
|
+
|
|
16
|
+
const props = defineProps<
|
|
17
|
+
DropdownMenuRadioItemProps & { class?: HTMLAttributes['class'] }
|
|
18
|
+
>();
|
|
19
|
+
|
|
20
|
+
const emits = defineEmits<DropdownMenuRadioItemEmits>();
|
|
21
|
+
|
|
22
|
+
const delegatedProps = computed(() => {
|
|
23
|
+
const { class: _class, ...rest } = props;
|
|
24
|
+
return rest;
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
|
28
|
+
</script>
|
|
29
|
+
|
|
30
|
+
<template>
|
|
31
|
+
<DropdownMenuRadioItem
|
|
32
|
+
data-slot="dropdown-menu-radio-item"
|
|
33
|
+
v-bind="forwarded"
|
|
34
|
+
:class="
|
|
35
|
+
cn(
|
|
36
|
+
`focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,
|
|
37
|
+
props.class
|
|
38
|
+
)
|
|
39
|
+
"
|
|
40
|
+
>
|
|
41
|
+
<span
|
|
42
|
+
class="pointer-events-none absolute left-2 flex size-3.5 items-center justify-center"
|
|
43
|
+
>
|
|
44
|
+
<DropdownMenuItemIndicator>
|
|
45
|
+
<slot name="indicator-icon">
|
|
46
|
+
<CircleIcon class="size-2 fill-current" />
|
|
47
|
+
</slot>
|
|
48
|
+
</DropdownMenuItemIndicator>
|
|
49
|
+
</span>
|
|
50
|
+
<slot />
|
|
51
|
+
</DropdownMenuRadioItem>
|
|
52
|
+
</template>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { DropdownMenuSeparatorProps } from 'reka-ui';
|
|
3
|
+
import type { HTMLAttributes } from 'vue';
|
|
4
|
+
import { computed } from 'vue';
|
|
5
|
+
import { DropdownMenuSeparator } from 'reka-ui';
|
|
6
|
+
import { cn } from '@/lib/utils';
|
|
7
|
+
|
|
8
|
+
const props = defineProps<
|
|
9
|
+
DropdownMenuSeparatorProps & {
|
|
10
|
+
class?: HTMLAttributes['class'];
|
|
11
|
+
}
|
|
12
|
+
>();
|
|
13
|
+
|
|
14
|
+
const delegatedProps = computed(() => {
|
|
15
|
+
const { class: _class, ...rest } = props;
|
|
16
|
+
return rest;
|
|
17
|
+
});
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<template>
|
|
21
|
+
<DropdownMenuSeparator
|
|
22
|
+
data-slot="dropdown-menu-separator"
|
|
23
|
+
v-bind="delegatedProps"
|
|
24
|
+
:class="cn('-mx-1 my-1 h-px bg-border', props.class)"
|
|
25
|
+
/>
|
|
26
|
+
</template>
|
|
@@ -0,0 +1,19 @@
|
|
|
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
|
+
<span
|
|
12
|
+
data-slot="dropdown-menu-shortcut"
|
|
13
|
+
:class="
|
|
14
|
+
cn('ml-auto text-xs tracking-widest text-muted-foreground', props.class)
|
|
15
|
+
"
|
|
16
|
+
>
|
|
17
|
+
<slot />
|
|
18
|
+
</span>
|
|
19
|
+
</template>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { DropdownMenuSubEmits, DropdownMenuSubProps } from 'reka-ui';
|
|
3
|
+
import { DropdownMenuSub, useForwardPropsEmits } from 'reka-ui';
|
|
4
|
+
|
|
5
|
+
const props = defineProps<DropdownMenuSubProps>();
|
|
6
|
+
const emits = defineEmits<DropdownMenuSubEmits>();
|
|
7
|
+
|
|
8
|
+
const forwarded = useForwardPropsEmits(props, emits);
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<template>
|
|
12
|
+
<DropdownMenuSub
|
|
13
|
+
v-slot="slotProps"
|
|
14
|
+
data-slot="dropdown-menu-sub"
|
|
15
|
+
v-bind="forwarded"
|
|
16
|
+
>
|
|
17
|
+
<slot v-bind="slotProps" />
|
|
18
|
+
</DropdownMenuSub>
|
|
19
|
+
</template>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type {
|
|
3
|
+
DropdownMenuSubContentEmits,
|
|
4
|
+
DropdownMenuSubContentProps,
|
|
5
|
+
} from 'reka-ui';
|
|
6
|
+
import type { HTMLAttributes } from 'vue';
|
|
7
|
+
import { computed } from 'vue';
|
|
8
|
+
import { DropdownMenuSubContent, useForwardPropsEmits } from 'reka-ui';
|
|
9
|
+
import { cn } from '@/lib/utils';
|
|
10
|
+
|
|
11
|
+
const props = defineProps<
|
|
12
|
+
DropdownMenuSubContentProps & { class?: HTMLAttributes['class'] }
|
|
13
|
+
>();
|
|
14
|
+
const emits = defineEmits<DropdownMenuSubContentEmits>();
|
|
15
|
+
|
|
16
|
+
const delegatedProps = computed(() => {
|
|
17
|
+
const { class: _class, ...rest } = props;
|
|
18
|
+
return rest;
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<template>
|
|
25
|
+
<DropdownMenuSubContent
|
|
26
|
+
data-slot="dropdown-menu-sub-content"
|
|
27
|
+
v-bind="forwarded"
|
|
28
|
+
:class="
|
|
29
|
+
cn(
|
|
30
|
+
'z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95',
|
|
31
|
+
props.class
|
|
32
|
+
)
|
|
33
|
+
"
|
|
34
|
+
>
|
|
35
|
+
<slot />
|
|
36
|
+
</DropdownMenuSubContent>
|
|
37
|
+
</template>
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { DropdownMenuSubTriggerProps } from 'reka-ui';
|
|
3
|
+
import type { HTMLAttributes } from 'vue';
|
|
4
|
+
import { computed } from 'vue';
|
|
5
|
+
import { ChevronRightIcon } from '@lucide/vue';
|
|
6
|
+
import { DropdownMenuSubTrigger, useForwardProps } from 'reka-ui';
|
|
7
|
+
import { cn } from '@/lib/utils';
|
|
8
|
+
|
|
9
|
+
const props = defineProps<
|
|
10
|
+
DropdownMenuSubTriggerProps & {
|
|
11
|
+
class?: HTMLAttributes['class'];
|
|
12
|
+
inset?: boolean;
|
|
13
|
+
}
|
|
14
|
+
>();
|
|
15
|
+
|
|
16
|
+
const delegatedProps = computed(() => {
|
|
17
|
+
const { class: _class, inset: _inset, ...rest } = props;
|
|
18
|
+
return rest;
|
|
19
|
+
});
|
|
20
|
+
const forwardedProps = useForwardProps(delegatedProps);
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
<template>
|
|
24
|
+
<DropdownMenuSubTrigger
|
|
25
|
+
data-slot="dropdown-menu-sub-trigger"
|
|
26
|
+
v-bind="forwardedProps"
|
|
27
|
+
:data-inset="inset ? '' : undefined"
|
|
28
|
+
:class="
|
|
29
|
+
cn(
|
|
30
|
+
`relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground`,
|
|
31
|
+
props.class
|
|
32
|
+
)
|
|
33
|
+
"
|
|
34
|
+
>
|
|
35
|
+
<slot />
|
|
36
|
+
<ChevronRightIcon class="ml-auto size-4" />
|
|
37
|
+
</DropdownMenuSubTrigger>
|
|
38
|
+
</template>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { DropdownMenuTriggerProps } from 'reka-ui';
|
|
3
|
+
import { DropdownMenuTrigger, useForwardProps } from 'reka-ui';
|
|
4
|
+
|
|
5
|
+
const props = defineProps<DropdownMenuTriggerProps>();
|
|
6
|
+
|
|
7
|
+
const forwardedProps = useForwardProps(props);
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<template>
|
|
11
|
+
<DropdownMenuTrigger
|
|
12
|
+
data-slot="dropdown-menu-trigger"
|
|
13
|
+
v-bind="forwardedProps"
|
|
14
|
+
>
|
|
15
|
+
<slot />
|
|
16
|
+
</DropdownMenuTrigger>
|
|
17
|
+
</template>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export { default as DropdownMenu } from './DropdownMenu.vue';
|
|
2
|
+
export { default as DropdownMenuPortal } from './DropdownMenuPortal.vue';
|
|
3
|
+
export { default as DropdownMenuTrigger } from './DropdownMenuTrigger.vue';
|
|
4
|
+
export { default as DropdownMenuContent } from './DropdownMenuContent.vue';
|
|
5
|
+
export { default as DropdownMenuGroup } from './DropdownMenuGroup.vue';
|
|
6
|
+
export { default as DropdownMenuLabel } from './DropdownMenuLabel.vue';
|
|
7
|
+
export { default as DropdownMenuItem } from './DropdownMenuItem.vue';
|
|
8
|
+
export { default as DropdownMenuCheckboxItem } from './DropdownMenuCheckboxItem.vue';
|
|
9
|
+
export { default as DropdownMenuRadioGroup } from './DropdownMenuRadioGroup.vue';
|
|
10
|
+
export { default as DropdownMenuRadioItem } from './DropdownMenuRadioItem.vue';
|
|
11
|
+
export { default as DropdownMenuSeparator } from './DropdownMenuSeparator.vue';
|
|
12
|
+
export { default as DropdownMenuShortcut } from './DropdownMenuShortcut.vue';
|
|
13
|
+
export { default as DropdownMenuSub } from './DropdownMenuSub.vue';
|
|
14
|
+
export { default as DropdownMenuSubTrigger } from './DropdownMenuSubTrigger.vue';
|
|
15
|
+
export { default as DropdownMenuSubContent } from './DropdownMenuSubContent.vue';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from 'vue';
|
|
3
|
+
import type { FieldVariants } from '.';
|
|
4
|
+
import { cn } from '@/lib/utils';
|
|
5
|
+
import { fieldVariants } from '.';
|
|
6
|
+
|
|
7
|
+
const props = withDefaults(
|
|
8
|
+
defineProps<{
|
|
9
|
+
class?: HTMLAttributes['class'];
|
|
10
|
+
orientation?: FieldVariants['orientation'];
|
|
11
|
+
}>(),
|
|
12
|
+
{
|
|
13
|
+
orientation: 'vertical',
|
|
14
|
+
}
|
|
15
|
+
);
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<template>
|
|
19
|
+
<div
|
|
20
|
+
role="group"
|
|
21
|
+
data-slot="field"
|
|
22
|
+
:data-orientation="orientation"
|
|
23
|
+
:class="cn(fieldVariants({ orientation }), props.class)"
|
|
24
|
+
>
|
|
25
|
+
<slot />
|
|
26
|
+
</div>
|
|
27
|
+
</template>
|
|
@@ -0,0 +1,22 @@
|
|
|
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="field-content"
|
|
13
|
+
:class="
|
|
14
|
+
cn(
|
|
15
|
+
'gap-0.5 group/field-content flex flex-1 flex-col leading-snug',
|
|
16
|
+
props.class
|
|
17
|
+
)
|
|
18
|
+
"
|
|
19
|
+
>
|
|
20
|
+
<slot />
|
|
21
|
+
</div>
|
|
22
|
+
</template>
|
|
@@ -0,0 +1,24 @@
|
|
|
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="field-description"
|
|
13
|
+
:class="
|
|
14
|
+
cn(
|
|
15
|
+
'text-muted-foreground text-left text-sm [[data-variant=legend]+&]:-mt-1.5 leading-normal font-normal group-has-data-horizontal/field:text-balance',
|
|
16
|
+
'last:mt-0 nth-last-2:-mt-1',
|
|
17
|
+
'[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4',
|
|
18
|
+
props.class
|
|
19
|
+
)
|
|
20
|
+
"
|
|
21
|
+
>
|
|
22
|
+
<slot />
|
|
23
|
+
</p>
|
|
24
|
+
</template>
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from 'vue';
|
|
3
|
+
import { computed } from 'vue';
|
|
4
|
+
import { cn } from '@/lib/utils';
|
|
5
|
+
|
|
6
|
+
const props = defineProps<{
|
|
7
|
+
class?: HTMLAttributes['class'];
|
|
8
|
+
errors?: Array<{ message?: string } | undefined>;
|
|
9
|
+
}>();
|
|
10
|
+
|
|
11
|
+
const content = computed(() => {
|
|
12
|
+
if (!props.errors?.length) {
|
|
13
|
+
return null;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const uniqueErrors = [
|
|
17
|
+
...new Map(props.errors.map(error => [error?.message, error])).values(),
|
|
18
|
+
];
|
|
19
|
+
|
|
20
|
+
if (uniqueErrors.length === 1) {
|
|
21
|
+
return uniqueErrors[0]?.message;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
return uniqueErrors;
|
|
25
|
+
});
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<template>
|
|
29
|
+
<div
|
|
30
|
+
v-if="$slots.default || content"
|
|
31
|
+
role="alert"
|
|
32
|
+
data-slot="field-error"
|
|
33
|
+
:class="cn('text-destructive text-sm font-normal', props.class)"
|
|
34
|
+
>
|
|
35
|
+
<slot v-if="$slots.default" />
|
|
36
|
+
<template v-else-if="typeof content === 'string'">
|
|
37
|
+
{{ content }}
|
|
38
|
+
</template>
|
|
39
|
+
<ul
|
|
40
|
+
v-else-if="Array.isArray(content)"
|
|
41
|
+
class="ml-4 flex list-disc flex-col gap-1"
|
|
42
|
+
>
|
|
43
|
+
<li v-for="(error, index) in content" :key="index">
|
|
44
|
+
<template v-if="error?.message">{{ error.message }}</template>
|
|
45
|
+
</li>
|
|
46
|
+
</ul>
|
|
47
|
+
</div>
|
|
48
|
+
</template>
|
|
@@ -0,0 +1,22 @@
|
|
|
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="field-group"
|
|
13
|
+
:class="
|
|
14
|
+
cn(
|
|
15
|
+
'gap-5 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4 group/field-group @container/field-group flex w-full flex-col',
|
|
16
|
+
props.class
|
|
17
|
+
)
|
|
18
|
+
"
|
|
19
|
+
>
|
|
20
|
+
<slot />
|
|
21
|
+
</div>
|
|
22
|
+
</template>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { LabelProps } from 'reka-ui';
|
|
3
|
+
import type { HTMLAttributes } from 'vue';
|
|
4
|
+
import { cn } from '@/lib/utils';
|
|
5
|
+
import { Label } from '@/components/ui/label';
|
|
6
|
+
|
|
7
|
+
const props = defineProps<LabelProps & { class?: HTMLAttributes['class'] }>();
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<template>
|
|
11
|
+
<Label
|
|
12
|
+
data-slot="field-label"
|
|
13
|
+
v-bind="props"
|
|
14
|
+
:class="
|
|
15
|
+
cn(
|
|
16
|
+
'has-data-checked:bg-primary/5 has-data-checked:border-primary/30 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10 gap-2 group-data-[disabled=true]/field:opacity-50 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border *:data-[slot=field]:p-2.5 group/field-label peer/field-label flex w-fit leading-snug',
|
|
17
|
+
'has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col',
|
|
18
|
+
props.class
|
|
19
|
+
)
|
|
20
|
+
"
|
|
21
|
+
>
|
|
22
|
+
<slot />
|
|
23
|
+
</Label>
|
|
24
|
+
</template>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from 'vue';
|
|
3
|
+
import { cn } from '@/lib/utils';
|
|
4
|
+
|
|
5
|
+
const props = withDefaults(
|
|
6
|
+
defineProps<{
|
|
7
|
+
class?: HTMLAttributes['class'];
|
|
8
|
+
variant?: 'legend' | 'label';
|
|
9
|
+
}>(),
|
|
10
|
+
{
|
|
11
|
+
variant: 'legend',
|
|
12
|
+
}
|
|
13
|
+
);
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<template>
|
|
17
|
+
<legend
|
|
18
|
+
data-slot="field-legend"
|
|
19
|
+
:data-variant="variant"
|
|
20
|
+
:class="
|
|
21
|
+
cn(
|
|
22
|
+
'mb-1.5 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base',
|
|
23
|
+
props.class
|
|
24
|
+
)
|
|
25
|
+
"
|
|
26
|
+
>
|
|
27
|
+
<slot />
|
|
28
|
+
</legend>
|
|
29
|
+
</template>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from 'vue';
|
|
3
|
+
import { cn } from '@/lib/utils';
|
|
4
|
+
import { Separator } from '@/components/ui/separator';
|
|
5
|
+
|
|
6
|
+
const props = defineProps<{
|
|
7
|
+
class?: HTMLAttributes['class'];
|
|
8
|
+
}>();
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<template>
|
|
12
|
+
<div
|
|
13
|
+
data-slot="field-separator"
|
|
14
|
+
:data-content="!!$slots.default"
|
|
15
|
+
:class="
|
|
16
|
+
cn(
|
|
17
|
+
'-my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2 relative',
|
|
18
|
+
props.class
|
|
19
|
+
)
|
|
20
|
+
"
|
|
21
|
+
>
|
|
22
|
+
<Separator class="absolute inset-0 top-1/2" />
|
|
23
|
+
<span
|
|
24
|
+
v-if="$slots.default"
|
|
25
|
+
class="text-muted-foreground px-2 bg-background relative mx-auto block w-fit"
|
|
26
|
+
data-slot="field-separator-content"
|
|
27
|
+
>
|
|
28
|
+
<slot />
|
|
29
|
+
</span>
|
|
30
|
+
</div>
|
|
31
|
+
</template>
|
|
@@ -0,0 +1,22 @@
|
|
|
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
|
+
<fieldset
|
|
12
|
+
data-slot="field-set"
|
|
13
|
+
:class="
|
|
14
|
+
cn(
|
|
15
|
+
'gap-4 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3 flex flex-col',
|
|
16
|
+
props.class
|
|
17
|
+
)
|
|
18
|
+
"
|
|
19
|
+
>
|
|
20
|
+
<slot />
|
|
21
|
+
</fieldset>
|
|
22
|
+
</template>
|
|
@@ -0,0 +1,22 @@
|
|
|
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="field-label"
|
|
13
|
+
:class="
|
|
14
|
+
cn(
|
|
15
|
+
'gap-2 text-sm font-medium group-data-[disabled=true]/field:opacity-50 flex w-fit items-center leading-snug',
|
|
16
|
+
props.class
|
|
17
|
+
)
|
|
18
|
+
"
|
|
19
|
+
>
|
|
20
|
+
<slot />
|
|
21
|
+
</div>
|
|
22
|
+
</template>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import { cva } from 'class-variance-authority';
|
|
3
|
+
|
|
4
|
+
export const fieldVariants = cva(
|
|
5
|
+
'data-[invalid=true]:text-destructive gap-2 group/field flex w-full',
|
|
6
|
+
{
|
|
7
|
+
variants: {
|
|
8
|
+
orientation: {
|
|
9
|
+
vertical: 'flex-col *:w-full [&>.sr-only]:w-auto',
|
|
10
|
+
horizontal:
|
|
11
|
+
'flex-row items-center *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px',
|
|
12
|
+
responsive:
|
|
13
|
+
'flex-col *:w-full [&>.sr-only]:w-auto @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:*:data-[slot=field-label]:flex-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px',
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
defaultVariants: {
|
|
17
|
+
orientation: 'vertical',
|
|
18
|
+
},
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
export type FieldVariants = VariantProps<typeof fieldVariants>;
|
|
23
|
+
|
|
24
|
+
export { default as Field } from './Field.vue';
|
|
25
|
+
export { default as FieldContent } from './FieldContent.vue';
|
|
26
|
+
export { default as FieldDescription } from './FieldDescription.vue';
|
|
27
|
+
export { default as FieldError } from './FieldError.vue';
|
|
28
|
+
export { default as FieldGroup } from './FieldGroup.vue';
|
|
29
|
+
export { default as FieldLabel } from './FieldLabel.vue';
|
|
30
|
+
export { default as FieldLegend } from './FieldLegend.vue';
|
|
31
|
+
export { default as FieldSeparator } from './FieldSeparator.vue';
|
|
32
|
+
export { default as FieldSet } from './FieldSet.vue';
|
|
33
|
+
export { default as FieldTitle } from './FieldTitle.vue';
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* UI Components Index
|
|
3
|
+
*
|
|
4
|
+
* Re-exports all UI components for easier imports.
|
|
5
|
+
*
|
|
6
|
+
* Usage:
|
|
7
|
+
* import { Button, Input } from "@/components/ui"
|
|
8
|
+
*
|
|
9
|
+
* Instead of:
|
|
10
|
+
* import { Button } from "@/components/ui/button"
|
|
11
|
+
* import { Input } from "@/components/ui/input"
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
export {
|
|
15
|
+
Alert,
|
|
16
|
+
AlertTitle,
|
|
17
|
+
AlertDescription,
|
|
18
|
+
AlertAction,
|
|
19
|
+
alertVariants,
|
|
20
|
+
} from './alert';
|
|
21
|
+
export { Avatar, AvatarImage, AvatarFallback } from './avatar';
|
|
22
|
+
export { Button, buttonVariants } from './button';
|
|
23
|
+
export {
|
|
24
|
+
Card,
|
|
25
|
+
CardHeader,
|
|
26
|
+
CardFooter,
|
|
27
|
+
CardTitle,
|
|
28
|
+
CardAction,
|
|
29
|
+
CardDescription,
|
|
30
|
+
CardContent,
|
|
31
|
+
} from './card';
|
|
32
|
+
export { Checkbox } from './checkbox';
|
|
33
|
+
export {
|
|
34
|
+
Collapsible,
|
|
35
|
+
CollapsibleContent,
|
|
36
|
+
CollapsibleTrigger,
|
|
37
|
+
} from './collapsible';
|
|
38
|
+
export {
|
|
39
|
+
Dialog,
|
|
40
|
+
DialogClose,
|
|
41
|
+
DialogContent,
|
|
42
|
+
DialogDescription,
|
|
43
|
+
DialogFooter,
|
|
44
|
+
DialogHeader,
|
|
45
|
+
DialogOverlay,
|
|
46
|
+
DialogPortal,
|
|
47
|
+
DialogTitle,
|
|
48
|
+
DialogTrigger,
|
|
49
|
+
} from './dialog';
|
|
50
|
+
export {
|
|
51
|
+
DropdownMenu,
|
|
52
|
+
DropdownMenuPortal,
|
|
53
|
+
DropdownMenuTrigger,
|
|
54
|
+
DropdownMenuContent,
|
|
55
|
+
DropdownMenuGroup,
|
|
56
|
+
DropdownMenuLabel,
|
|
57
|
+
DropdownMenuItem,
|
|
58
|
+
DropdownMenuCheckboxItem,
|
|
59
|
+
DropdownMenuRadioGroup,
|
|
60
|
+
DropdownMenuRadioItem,
|
|
61
|
+
DropdownMenuSeparator,
|
|
62
|
+
DropdownMenuShortcut,
|
|
63
|
+
DropdownMenuSub,
|
|
64
|
+
DropdownMenuSubTrigger,
|
|
65
|
+
DropdownMenuSubContent,
|
|
66
|
+
} from './dropdown-menu';
|
|
67
|
+
export {
|
|
68
|
+
Field,
|
|
69
|
+
FieldContent,
|
|
70
|
+
FieldDescription,
|
|
71
|
+
FieldError,
|
|
72
|
+
FieldGroup,
|
|
73
|
+
FieldLabel,
|
|
74
|
+
FieldLegend,
|
|
75
|
+
FieldSeparator,
|
|
76
|
+
FieldSet,
|
|
77
|
+
FieldTitle,
|
|
78
|
+
fieldVariants,
|
|
79
|
+
} from './field';
|
|
80
|
+
export { Input } from './input';
|
|
81
|
+
export { Label } from './label';
|
|
82
|
+
export {
|
|
83
|
+
Pagination,
|
|
84
|
+
PaginationContent,
|
|
85
|
+
PaginationEllipsis,
|
|
86
|
+
PaginationItem,
|
|
87
|
+
PaginationLink,
|
|
88
|
+
PaginationNext,
|
|
89
|
+
PaginationPrevious,
|
|
90
|
+
} from './pagination';
|
|
91
|
+
export {
|
|
92
|
+
Popover,
|
|
93
|
+
PopoverAnchor,
|
|
94
|
+
PopoverContent,
|
|
95
|
+
PopoverDescription,
|
|
96
|
+
PopoverHeader,
|
|
97
|
+
PopoverTitle,
|
|
98
|
+
PopoverTrigger,
|
|
99
|
+
} from './popover';
|
|
100
|
+
export {
|
|
101
|
+
Select,
|
|
102
|
+
SelectGroup,
|
|
103
|
+
SelectValue,
|
|
104
|
+
SelectTrigger,
|
|
105
|
+
SelectContent,
|
|
106
|
+
SelectLabel,
|
|
107
|
+
SelectItem,
|
|
108
|
+
SelectSeparator,
|
|
109
|
+
SelectScrollUpButton,
|
|
110
|
+
SelectScrollDownButton,
|
|
111
|
+
} from './select';
|
|
112
|
+
export { Separator } from './separator';
|
|
113
|
+
export { Skeleton } from './skeleton';
|
|
114
|
+
export { Sonner, Toaster, toast } from './sonner';
|
|
115
|
+
export { Spinner } from './spinner';
|