brutx-ui-vue 0.7.7 → 0.8.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/dist/{Calendar-BRQy0IZx.cjs → Calendar-DAgGaURK.cjs} +1 -1
- package/dist/Calendar-DIHQIBJw.js +84 -0
- package/dist/{SubmitButton-B-aiDN2P.js → SubmitButton-CJ76Hrwn.js} +103 -35
- package/dist/SubmitButton-Cw1VdeMv.cjs +1 -0
- package/dist/brutx-ui-vue.css +1 -1
- package/dist/calendar.cjs +1 -1
- package/dist/calendar.js +1 -1
- package/dist/components/accordion/AccordionTrigger.vue.d.ts +5 -1
- package/dist/components/accordion/AccordionTrigger.vue.d.ts.map +1 -1
- package/dist/components/alert/alert-variants.d.ts.map +1 -1
- package/dist/components/alert-dialog/AlertDialogContent.vue.d.ts.map +1 -1
- package/dist/components/alert-dialog/AlertDialogDescription.vue.d.ts.map +1 -1
- package/dist/components/alert-dialog/AlertDialogFooter.vue.d.ts.map +1 -1
- package/dist/components/alert-dialog/AlertDialogHeader.vue.d.ts.map +1 -1
- package/dist/components/alert-dialog/AlertDialogTitle.vue.d.ts.map +1 -1
- package/dist/components/alert-dialog/alert-dialog-variants.d.ts +7 -0
- package/dist/components/alert-dialog/alert-dialog-variants.d.ts.map +1 -0
- package/dist/components/auth-card/AuthCard.vue.d.ts +3 -0
- package/dist/components/auth-card/AuthCard.vue.d.ts.map +1 -1
- package/dist/components/avatar/Avatar.vue.d.ts +7 -2
- package/dist/components/avatar/Avatar.vue.d.ts.map +1 -1
- package/dist/components/avatar/AvatarFallback.vue.d.ts.map +1 -1
- package/dist/components/avatar/avatar-key.d.ts +9 -0
- package/dist/components/avatar/avatar-key.d.ts.map +1 -0
- package/dist/components/avatar/avatar-variants.d.ts +4 -0
- package/dist/components/avatar/avatar-variants.d.ts.map +1 -1
- package/dist/components/badge/badge-variants.d.ts.map +1 -1
- package/dist/components/before-after/BeforeAfter.vue.d.ts +5 -0
- package/dist/components/before-after/BeforeAfter.vue.d.ts.map +1 -1
- package/dist/components/before-after/before-after-variants.d.ts +3 -1
- package/dist/components/before-after/before-after-variants.d.ts.map +1 -1
- package/dist/components/blog-card/BlogCard.vue.d.ts +2 -2
- package/dist/components/blog-card/BlogCard.vue.d.ts.map +1 -1
- package/dist/components/blog-list-page/BlogListPage.vue.d.ts +3 -0
- package/dist/components/blog-list-page/BlogListPage.vue.d.ts.map +1 -1
- package/dist/components/breadcrumb/BreadcrumbEllipsis.vue.d.ts +3 -0
- package/dist/components/breadcrumb/BreadcrumbEllipsis.vue.d.ts.map +1 -1
- package/dist/components/brutalist-hero/BrutalistHero.vue.d.ts +3 -0
- package/dist/components/brutalist-hero/BrutalistHero.vue.d.ts.map +1 -1
- package/dist/components/button/Button.vue.d.ts.map +1 -1
- package/dist/components/button/button-variants.d.ts.map +1 -1
- package/dist/components/calendar/Calendar.vue.d.ts.map +1 -1
- package/dist/components/card/card-variants.d.ts.map +1 -1
- package/dist/components/card-3d/Card3D.vue.d.ts +9 -1
- package/dist/components/card-3d/Card3D.vue.d.ts.map +1 -1
- package/dist/components/card-3d/card-3d-variants.d.ts +1 -0
- package/dist/components/card-3d/card-3d-variants.d.ts.map +1 -1
- package/dist/components/chart-section/ChartSection.vue.d.ts +2 -2
- package/dist/components/chart-section/ChartSection.vue.d.ts.map +1 -1
- package/dist/components/chat-bubble/ChatBubble.vue.d.ts +7 -0
- package/dist/components/chat-bubble/ChatBubble.vue.d.ts.map +1 -1
- package/dist/components/chat-bubble/chat-bubble-variants.d.ts +5 -1
- package/dist/components/chat-bubble/chat-bubble-variants.d.ts.map +1 -1
- package/dist/components/checkbox/Checkbox.vue.d.ts.map +1 -1
- package/dist/components/checkbox/checkbox-variants.d.ts +1 -3
- package/dist/components/checkbox/checkbox-variants.d.ts.map +1 -1
- package/dist/components/code-block/CodeBlock.vue.d.ts +2 -0
- package/dist/components/code-block/CodeBlock.vue.d.ts.map +1 -1
- package/dist/components/color-mode-switcher/ColorModeSwitcher.vue.d.ts.map +1 -1
- package/dist/components/color-picker/ColorPickerPanel.vue.d.ts.map +1 -1
- package/dist/components/combobox/Combobox.vue.d.ts +9 -0
- package/dist/components/combobox/Combobox.vue.d.ts.map +1 -1
- package/dist/components/combobox/ComboboxMulti.vue.d.ts +9 -0
- package/dist/components/combobox/ComboboxMulti.vue.d.ts.map +1 -1
- package/dist/components/combobox/combobox-variants.d.ts +8 -0
- package/dist/components/combobox/combobox-variants.d.ts.map +1 -0
- package/dist/components/command/CommandDialog.vue.d.ts +2 -2
- package/dist/components/command/CommandDialog.vue.d.ts.map +1 -1
- package/dist/components/cookie-consent/CookieConsent.vue.d.ts +3 -0
- package/dist/components/cookie-consent/CookieConsent.vue.d.ts.map +1 -1
- package/dist/components/copy-to-clipboard/CopyToClipboard.vue.d.ts +10 -0
- package/dist/components/copy-to-clipboard/CopyToClipboard.vue.d.ts.map +1 -1
- package/dist/components/copy-to-clipboard/copy-to-clipboard-variants.d.ts +2 -0
- package/dist/components/copy-to-clipboard/copy-to-clipboard-variants.d.ts.map +1 -1
- package/dist/components/counter/Counter.vue.d.ts +2 -0
- package/dist/components/counter/Counter.vue.d.ts.map +1 -1
- package/dist/components/counter/counter-variants.d.ts +1 -0
- package/dist/components/counter/counter-variants.d.ts.map +1 -1
- package/dist/components/dashboard-shell/DashboardShell.vue.d.ts +6 -3
- package/dist/components/dashboard-shell/DashboardShell.vue.d.ts.map +1 -1
- package/dist/components/dashboard-stats/DashboardStats.vue.d.ts +3 -0
- package/dist/components/dashboard-stats/DashboardStats.vue.d.ts.map +1 -1
- package/dist/components/data-table/DataTable.vue.d.ts +10 -4
- package/dist/components/data-table/DataTable.vue.d.ts.map +1 -1
- package/dist/components/data-table/data-table-variants.d.ts +4 -0
- package/dist/components/data-table/data-table-variants.d.ts.map +1 -1
- package/dist/components/data-table/types.d.ts +25 -5
- package/dist/components/data-table/types.d.ts.map +1 -1
- package/dist/components/data-table-section/DataTableSection.vue.d.ts +32 -46
- package/dist/components/data-table-section/DataTableSection.vue.d.ts.map +1 -1
- package/dist/components/data-table-section/types.d.ts +17 -0
- package/dist/components/data-table-section/types.d.ts.map +1 -0
- package/dist/components/date-picker/DatePickerPanel.vue.d.ts.map +1 -1
- package/dist/components/date-picker/DatePickerRange.vue.d.ts +1 -1
- package/dist/components/date-picker/DatePickerRangePanel.vue.d.ts.map +1 -1
- package/dist/components/date-picker/DateTimePickerPanel.vue.d.ts.map +1 -1
- package/dist/components/date-picker/MonthPickerPanel.vue.d.ts.map +1 -1
- package/dist/components/date-picker/WeekPickerPanel.vue.d.ts.map +1 -1
- package/dist/components/date-picker/YearPickerPanel.vue.d.ts.map +1 -1
- package/dist/components/dialog/DialogContent.vue.d.ts.map +1 -1
- package/dist/components/dialog/DialogEnhanced.vue.d.ts.map +1 -1
- package/dist/components/dropdown-menu/DropdownMenuCheckboxItem.vue.d.ts +7 -1
- package/dist/components/dropdown-menu/DropdownMenuCheckboxItem.vue.d.ts.map +1 -1
- package/dist/components/dropdown-menu/DropdownMenuSubTrigger.vue.d.ts +7 -1
- package/dist/components/dropdown-menu/DropdownMenuSubTrigger.vue.d.ts.map +1 -1
- package/dist/components/error-card/ErrorCard.vue.d.ts +3 -0
- package/dist/components/error-card/ErrorCard.vue.d.ts.map +1 -1
- package/dist/components/faq-section/FaqSection.vue.d.ts +2 -2
- package/dist/components/faq-section/FaqSection.vue.d.ts.map +1 -1
- package/dist/components/feedback-form/FeedbackForm.vue.d.ts +19 -4
- package/dist/components/feedback-form/FeedbackForm.vue.d.ts.map +1 -1
- package/dist/components/file-card/FileCard.vue.d.ts +3 -0
- package/dist/components/file-card/FileCard.vue.d.ts.map +1 -1
- package/dist/components/form/Form.vue.d.ts.map +1 -1
- package/dist/components/form/FormWizard.vue.d.ts.map +1 -1
- package/dist/components/form/form-wizard-variants.d.ts +7 -0
- package/dist/components/form/form-wizard-variants.d.ts.map +1 -0
- package/dist/components/glitch-button/GlitchButton.vue.d.ts +2 -0
- package/dist/components/glitch-button/GlitchButton.vue.d.ts.map +1 -1
- package/dist/components/glitch-button/glitch-button-variants.d.ts +1 -0
- package/dist/components/glitch-button/glitch-button-variants.d.ts.map +1 -1
- package/dist/components/glitch-text/GlitchText.vue.d.ts +2 -0
- package/dist/components/glitch-text/GlitchText.vue.d.ts.map +1 -1
- package/dist/components/glitch-text/glitch-text-variants.d.ts +1 -0
- package/dist/components/glitch-text/glitch-text-variants.d.ts.map +1 -1
- package/dist/components/header-section/HeaderSection.vue.d.ts +3 -0
- package/dist/components/header-section/HeaderSection.vue.d.ts.map +1 -1
- package/dist/components/input/input-variants.d.ts.map +1 -1
- package/dist/components/kanban/KanbanBoard.vue.d.ts +7 -1
- package/dist/components/kanban/KanbanBoard.vue.d.ts.map +1 -1
- package/dist/components/kanban/kanban-variants.d.ts +4 -0
- package/dist/components/kanban/kanban-variants.d.ts.map +1 -1
- package/dist/components/kbd/Kbd.vue.d.ts +2 -0
- package/dist/components/kbd/Kbd.vue.d.ts.map +1 -1
- package/dist/components/kbd/kbd-variants.d.ts +1 -0
- package/dist/components/kbd/kbd-variants.d.ts.map +1 -1
- package/dist/components/label/Label.vue.d.ts +9 -1
- package/dist/components/label/Label.vue.d.ts.map +1 -1
- package/dist/components/label/label-variants.d.ts +2 -1
- package/dist/components/label/label-variants.d.ts.map +1 -1
- package/dist/components/marquee/Marquee.vue.d.ts +7 -0
- package/dist/components/marquee/Marquee.vue.d.ts.map +1 -1
- package/dist/components/marquee/marquee-variants.d.ts +2 -0
- package/dist/components/marquee/marquee-variants.d.ts.map +1 -1
- package/dist/components/noise-background/NoiseBackground.vue.d.ts +3 -0
- package/dist/components/noise-background/NoiseBackground.vue.d.ts.map +1 -1
- package/dist/components/not-found-page/NotFoundPage.vue.d.ts +3 -0
- package/dist/components/not-found-page/NotFoundPage.vue.d.ts.map +1 -1
- package/dist/components/number-input/NumberInput.vue.d.ts +3 -0
- package/dist/components/number-input/NumberInput.vue.d.ts.map +1 -1
- package/dist/components/overview-page/OverviewPage.vue.d.ts +2 -2
- package/dist/components/overview-page/OverviewPage.vue.d.ts.map +1 -1
- package/dist/components/pagination/Pagination.vue.d.ts.map +1 -1
- package/dist/components/pricing-section/PricingSection.vue.d.ts.map +1 -1
- package/dist/components/progress/Progress.vue.d.ts +4 -0
- package/dist/components/progress/Progress.vue.d.ts.map +1 -1
- package/dist/components/quick-actions/QuickActions.vue.d.ts +3 -0
- package/dist/components/quick-actions/QuickActions.vue.d.ts.map +1 -1
- package/dist/components/scroll-area/ScrollArea.vue.d.ts +7 -1
- package/dist/components/scroll-area/ScrollArea.vue.d.ts.map +1 -1
- package/dist/components/scroll-area/ScrollBar.vue.d.ts +7 -0
- package/dist/components/scroll-area/ScrollBar.vue.d.ts.map +1 -1
- package/dist/components/scroll-area/scroll-area-variants.d.ts +11 -0
- package/dist/components/scroll-area/scroll-area-variants.d.ts.map +1 -0
- package/dist/components/search-widget/SearchWidget.vue.d.ts +9 -2
- package/dist/components/search-widget/SearchWidget.vue.d.ts.map +1 -1
- package/dist/components/select/SelectItem.vue.d.ts +3 -0
- package/dist/components/select/SelectItem.vue.d.ts.map +1 -1
- package/dist/components/select/SelectScrollDownButton.vue.d.ts +6 -1
- package/dist/components/select/SelectScrollDownButton.vue.d.ts.map +1 -1
- package/dist/components/select/SelectScrollUpButton.vue.d.ts +6 -1
- package/dist/components/select/SelectScrollUpButton.vue.d.ts.map +1 -1
- package/dist/components/select/SelectTrigger.vue.d.ts.map +1 -1
- package/dist/components/select/select-variants.d.ts.map +1 -1
- package/dist/components/separator/Separator.vue.d.ts +8 -2
- package/dist/components/separator/Separator.vue.d.ts.map +1 -1
- package/dist/components/separator/separator-variants.d.ts +6 -0
- package/dist/components/separator/separator-variants.d.ts.map +1 -1
- package/dist/components/settings-page/SettingsPage.vue.d.ts +3 -3
- package/dist/components/settings-page/SettingsPage.vue.d.ts.map +1 -1
- package/dist/components/sheet/SheetContent.vue.d.ts.map +1 -1
- package/dist/components/skeleton/Skeleton.vue.d.ts +6 -0
- package/dist/components/skeleton/Skeleton.vue.d.ts.map +1 -1
- package/dist/components/skeleton/skeleton-variants.d.ts +5 -0
- package/dist/components/skeleton/skeleton-variants.d.ts.map +1 -1
- package/dist/components/slider/Slider.vue.d.ts +8 -1
- package/dist/components/slider/Slider.vue.d.ts.map +1 -1
- package/dist/components/slider/slider-variants.d.ts +9 -0
- package/dist/components/slider/slider-variants.d.ts.map +1 -1
- package/dist/components/stepper/Stepper.vue.d.ts +9 -0
- package/dist/components/stepper/Stepper.vue.d.ts.map +1 -1
- package/dist/components/stepper/stepper-variants.d.ts +2 -0
- package/dist/components/stepper/stepper-variants.d.ts.map +1 -1
- package/dist/components/stepper-section/StepperSection.vue.d.ts +5 -2
- package/dist/components/stepper-section/StepperSection.vue.d.ts.map +1 -1
- package/dist/components/submit-button/SubmitButton.vue.d.ts +3 -3
- package/dist/components/submit-button/SubmitButton.vue.d.ts.map +1 -1
- package/dist/components/success-card/SuccessCard.vue.d.ts +3 -0
- package/dist/components/success-card/SuccessCard.vue.d.ts.map +1 -1
- package/dist/components/tabs/tabs-variants.d.ts.map +1 -1
- package/dist/components/tabs-nav/TabsNav.vue.d.ts +2 -2
- package/dist/components/tabs-nav/TabsNav.vue.d.ts.map +1 -1
- package/dist/components/testimonial-card/TestimonialCard.vue.d.ts +3 -0
- package/dist/components/testimonial-card/TestimonialCard.vue.d.ts.map +1 -1
- package/dist/components/textarea/textarea-variants.d.ts.map +1 -1
- package/dist/components/timeline/Timeline.vue.d.ts +3 -11
- package/dist/components/timeline/Timeline.vue.d.ts.map +1 -1
- package/dist/components/timeline/TimelineItem.vue.d.ts +2 -0
- package/dist/components/timeline/TimelineItem.vue.d.ts.map +1 -1
- package/dist/components/timeline/timeline-key.d.ts +1 -0
- package/dist/components/timeline/timeline-key.d.ts.map +1 -1
- package/dist/components/toast/Toast.vue.d.ts +3 -0
- package/dist/components/toast/Toast.vue.d.ts.map +1 -1
- package/dist/components/toggle-group/ToggleGroup.vue.d.ts +2 -0
- package/dist/components/toggle-group/ToggleGroup.vue.d.ts.map +1 -1
- package/dist/components/tree-select/TreeSelect.vue.d.ts +4 -0
- package/dist/components/tree-select/TreeSelect.vue.d.ts.map +1 -1
- package/dist/components/tree-select/TreeSelectNode.vue.d.ts +4 -0
- package/dist/components/tree-select/TreeSelectNode.vue.d.ts.map +1 -1
- package/dist/components/tree-view/TreeView.vue.d.ts +11 -0
- package/dist/components/tree-view/TreeView.vue.d.ts.map +1 -1
- package/dist/components/tree-view/TreeViewNode.vue.d.ts +9 -1
- package/dist/components/tree-view/TreeViewNode.vue.d.ts.map +1 -1
- package/dist/components/tree-view/index.d.ts +1 -1
- package/dist/components/tree-view/index.d.ts.map +1 -1
- package/dist/components/tree-view/tree-view-utils.d.ts +3 -0
- package/dist/components/tree-view/tree-view-utils.d.ts.map +1 -0
- package/dist/components/upload-card/UploadCard.vue.d.ts.map +1 -1
- package/dist/components/virtual-scroll/VirtualScroll.vue.d.ts +4 -1
- package/dist/components/virtual-scroll/VirtualScroll.vue.d.ts.map +1 -1
- package/dist/components/waitlist-page/WaitlistPage.vue.d.ts +3 -0
- package/dist/components/waitlist-page/WaitlistPage.vue.d.ts.map +1 -1
- package/dist/composables/useAudioEngine.d.ts.map +1 -1
- package/dist/composables/useDataTableFilter.d.ts +17 -0
- package/dist/composables/useDataTableFilter.d.ts.map +1 -0
- package/dist/composables/useDataTablePagination.d.ts +15 -0
- package/dist/composables/useDataTablePagination.d.ts.map +1 -0
- package/dist/composables/useDataTableSelection.d.ts +18 -0
- package/dist/composables/useDataTableSelection.d.ts.map +1 -0
- package/dist/composables/useDataTableSort.d.ts +18 -0
- package/dist/composables/useDataTableSort.d.ts.map +1 -0
- package/dist/index.cjs +4 -4
- package/dist/index.d.ts +12 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5570 -4199
- package/dist/lib/data-table-utils.d.ts +3 -0
- package/dist/lib/data-table-utils.d.ts.map +1 -0
- package/dist/lib/icon-size-variants.d.ts +6 -0
- package/dist/lib/icon-size-variants.d.ts.map +1 -0
- package/dist/locales/en.d.ts.map +1 -1
- package/dist/locales/index.d.ts.map +1 -1
- package/dist/locales/types.d.ts +27 -0
- package/dist/locales/types.d.ts.map +1 -1
- package/dist/locales/zh-CN.d.ts.map +1 -1
- package/dist/locales-4xsKh5Bx.cjs +1 -0
- package/dist/{locales-C6hgZ4Lf.js → locales-LW1FCz6C.js} +49 -20
- package/dist/locales.cjs +1 -1
- package/dist/locales.js +2 -2
- package/dist/styles.css +1 -1
- package/dist/submit-button.cjs +1 -1
- package/dist/submit-button.js +1 -1
- package/dist/zh-CN-BJ4W0nz6.cjs +1 -0
- package/dist/{zh-CN-NiyPjUoc.js → zh-CN-hW4BnL3z.js} +42 -13
- package/package.json +1 -1
- package/dist/Calendar-DJ8nKsBt.js +0 -75
- package/dist/SubmitButton-BdK-WtL4.cjs +0 -1
- package/dist/locales-BAbdu1zY.cjs +0 -1
- package/dist/zh-CN-XM377bmZ.cjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./utils-BC5WDCkH.cjs");let t=require("vue"),n=require("@lucide/vue"),r=require("v-calendar");var i={class:`font-black text-xs sm:text-sm tracking-tight uppercase text-brutal-fg`},a=(0,t.defineComponent)({__name:`Calendar`,props:{modelValue:{default:void 0},isRange:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},class:{default:void 0}},emits:[`update:modelValue`],setup(a,{emit:o}){let s=a,c=o,l=(0,t.computed)(()=>e.t(`brutx-calendar`,`p-2 sm:p-3`,`bg-brutal-bg text-brutal-fg`,`border-3 border-brutal`,`shadow-brutal`,`w-fit max-w-full overflow-x-auto`,s.disabled?`opacity-50 pointer-events-none`:``,s.class)),u=(0,t.computed)(()=>s.isRange&&Array.isArray(s.modelValue)&&s.modelValue.length===2?{start:s.modelValue[0],end:s.modelValue[1]}:s.isRange?null:s.modelValue instanceof Date?s.modelValue:null);function d(e){s.disabled||(s.isRange?e&&typeof e==`object`&&`start`in e&&`end`in e?c(`update:modelValue`,[e.start,e.end]):c(`update:modelValue`,null):e instanceof Date||e===null?c(`update:modelValue`,e):c(`update:modelValue`,null))}function f(e){s.disabled||e&&typeof e==`object`&&`start`in e&&`end`in e&&c(`update:modelValue`,[e.start,e.end])}let p=(0,t.computed)(()=>({highlight:{class:`brutal-selected`,contentClass:`brutal-selected-content`}})),m=(0,t.computed)(()=>({highlight:{class:`brutal-range`,contentClass:`brutal-range-content`}})),h=(0,t.computed)(()=>e.t(`flex h-6 w-6 sm:h-8 sm:w-8 items-center justify-center text-[10px] sm:text-xs font-semibold transition-all duration-100 hover:bg-brutal-secondary hover:text-brutal-secondary-foreground hover:font-bold hover:shadow-brutal-sm cursor-pointer border-3 border-brutal/10`,`active:translate-y-[var(--brutal-pressed-offset,2px)] active:shadow-none transition-all`)),g=(0,t.computed)(()=>`text-brutal-muted-foreground opacity-40`),_=(0,t.computed)(()=>`opacity-40 cursor-not-allowed`);function
|
|
1
|
+
const e=require("./utils-BC5WDCkH.cjs");let t=require("vue"),n=require("@lucide/vue"),r=require("v-calendar");var i={class:`font-black text-xs sm:text-sm tracking-tight uppercase text-brutal-fg`},a=(0,t.defineComponent)({__name:`Calendar`,props:{modelValue:{default:void 0},isRange:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},class:{default:void 0}},emits:[`update:modelValue`],setup(a,{emit:o}){let s=a,c=o,l=(0,t.computed)(()=>e.t(`brutx-calendar`,`p-2 sm:p-3`,`bg-brutal-bg text-brutal-fg`,`border-3 border-brutal`,`shadow-brutal`,`w-fit max-w-full overflow-x-auto`,s.disabled?`opacity-50 pointer-events-none`:``,s.class)),u=(0,t.computed)(()=>s.isRange&&Array.isArray(s.modelValue)&&s.modelValue.length===2?{start:s.modelValue[0],end:s.modelValue[1]}:s.isRange?null:s.modelValue instanceof Date?s.modelValue:null);function d(e){s.disabled||(s.isRange?e&&typeof e==`object`&&`start`in e&&`end`in e?c(`update:modelValue`,[e.start,e.end]):c(`update:modelValue`,null):e instanceof Date||e===null?c(`update:modelValue`,e):c(`update:modelValue`,null))}function f(e){s.disabled||e&&typeof e==`object`&&`start`in e&&`end`in e&&c(`update:modelValue`,[e.start,e.end])}let p=(0,t.computed)(()=>({highlight:{class:`brutal-selected`,contentClass:`brutal-selected-content`}})),m=(0,t.computed)(()=>({highlight:{class:`brutal-range`,contentClass:`brutal-range-content`}})),h=(0,t.computed)(()=>e.t(`flex h-6 w-6 sm:h-8 sm:w-8 items-center justify-center text-[10px] sm:text-xs font-semibold transition-all duration-100 hover:bg-brutal-secondary hover:text-brutal-secondary-foreground hover:font-bold hover:shadow-brutal-sm cursor-pointer border-3 border-brutal/10`,`active:translate-y-[var(--brutal-pressed-offset,2px)] active:shadow-none transition-all`)),g=(0,t.computed)(()=>`text-brutal-muted-foreground opacity-40`),_=(0,t.computed)(()=>`opacity-40 cursor-not-allowed`),v=new Map;(0,t.watch)([h,g,_],()=>{v.clear()});function y(t,n){let r=`${t.isToday}-${t.isDisabled}-${t.inMonth}-${n??``}`,i=v.get(r);if(i!==void 0)return i;let a=!t.inMonth,o=e.t(h.value,n,t.isToday?`bg-brutal-secondary text-brutal-secondary-foreground font-black border-3 border-brutal`:``,a?g.value:``,t.isDisabled?_.value:``);return v.set(r,o),o}return(e,o)=>((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(r.DatePicker),{"model-value":u.value,mode:`date`,"is-range":a.isRange,class:(0,t.normalizeClass)(l.value),"select-attribute":p.value,"drag-attribute":m.value,"trim-weeks":``,"first-day-of-week":1,popover:!1,"onUpdate:modelValue":d,onDrag:f},{"header-prev-button":(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(n.ChevronLeft),{class:`w-4 h-4`})]),"header-title":(0,t.withCtx)(({title:e})=>[(0,t.createElementVNode)(`span`,i,(0,t.toDisplayString)(e),1)]),"header-next-button":(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(n.ChevronRight),{class:`w-4 h-4`})]),"day-content":(0,t.withCtx)(({day:e,dayProps:n,dayEvents:r})=>[(0,t.createElementVNode)(`div`,(0,t.mergeProps)(n,{class:y(e,n.class)},(0,t.toHandlers)(r,!0)),(0,t.toDisplayString)(e.label),17)]),_:1},8,[`model-value`,`is-range`,`class`,`select-attribute`,`drag-attribute`]))}}),o=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},s=o(a,[[`__scopeId`,`data-v-2cf00a3c`]]);Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return s}});
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { t as e } from "./utils-BkwM-_ON.js";
|
|
2
|
+
import { computed as t, createBlock as n, createElementVNode as r, createVNode as i, defineComponent as a, mergeProps as o, normalizeClass as s, openBlock as c, toDisplayString as l, toHandlers as u, unref as d, watch as f, withCtx as p } from "vue";
|
|
3
|
+
import { ChevronLeft as m, ChevronRight as h } from "@lucide/vue";
|
|
4
|
+
import { DatePicker as g } from "v-calendar";
|
|
5
|
+
//#region src/components/calendar/Calendar.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
+
var _ = { class: "font-black text-xs sm:text-sm tracking-tight uppercase text-brutal-fg" }, v = /*@__PURE__*/ a({
|
|
7
|
+
__name: "Calendar",
|
|
8
|
+
props: {
|
|
9
|
+
modelValue: { default: void 0 },
|
|
10
|
+
isRange: {
|
|
11
|
+
type: Boolean,
|
|
12
|
+
default: !1
|
|
13
|
+
},
|
|
14
|
+
disabled: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
default: !1
|
|
17
|
+
},
|
|
18
|
+
class: { default: void 0 }
|
|
19
|
+
},
|
|
20
|
+
emits: ["update:modelValue"],
|
|
21
|
+
setup(a, { emit: v }) {
|
|
22
|
+
let y = a, b = v, x = t(() => e("brutx-calendar", "p-2 sm:p-3", "bg-brutal-bg text-brutal-fg", "border-3 border-brutal", "shadow-brutal", "w-fit max-w-full overflow-x-auto", y.disabled ? "opacity-50 pointer-events-none" : "", y.class)), S = t(() => y.isRange && Array.isArray(y.modelValue) && y.modelValue.length === 2 ? {
|
|
23
|
+
start: y.modelValue[0],
|
|
24
|
+
end: y.modelValue[1]
|
|
25
|
+
} : y.isRange ? null : y.modelValue instanceof Date ? y.modelValue : null);
|
|
26
|
+
function C(e) {
|
|
27
|
+
y.disabled || (y.isRange ? e && typeof e == "object" && "start" in e && "end" in e ? b("update:modelValue", [e.start, e.end]) : b("update:modelValue", null) : e instanceof Date || e === null ? b("update:modelValue", e) : b("update:modelValue", null));
|
|
28
|
+
}
|
|
29
|
+
function w(e) {
|
|
30
|
+
y.disabled || e && typeof e == "object" && "start" in e && "end" in e && b("update:modelValue", [e.start, e.end]);
|
|
31
|
+
}
|
|
32
|
+
let T = t(() => ({ highlight: {
|
|
33
|
+
class: "brutal-selected",
|
|
34
|
+
contentClass: "brutal-selected-content"
|
|
35
|
+
} })), E = t(() => ({ highlight: {
|
|
36
|
+
class: "brutal-range",
|
|
37
|
+
contentClass: "brutal-range-content"
|
|
38
|
+
} })), D = t(() => e("flex h-6 w-6 sm:h-8 sm:w-8 items-center justify-center text-[10px] sm:text-xs font-semibold transition-all duration-100 hover:bg-brutal-secondary hover:text-brutal-secondary-foreground hover:font-bold hover:shadow-brutal-sm cursor-pointer border-3 border-brutal/10", "active:translate-y-[var(--brutal-pressed-offset,2px)] active:shadow-none transition-all")), O = t(() => "text-brutal-muted-foreground opacity-40"), k = t(() => "opacity-40 cursor-not-allowed"), A = /* @__PURE__ */ new Map();
|
|
39
|
+
f([
|
|
40
|
+
D,
|
|
41
|
+
O,
|
|
42
|
+
k
|
|
43
|
+
], () => {
|
|
44
|
+
A.clear();
|
|
45
|
+
});
|
|
46
|
+
function j(t, n) {
|
|
47
|
+
let r = `${t.isToday}-${t.isDisabled}-${t.inMonth}-${n ?? ""}`, i = A.get(r);
|
|
48
|
+
if (i !== void 0) return i;
|
|
49
|
+
let a = !t.inMonth, o = e(D.value, n, t.isToday ? "bg-brutal-secondary text-brutal-secondary-foreground font-black border-3 border-brutal" : "", a ? O.value : "", t.isDisabled ? k.value : "");
|
|
50
|
+
return A.set(r, o), o;
|
|
51
|
+
}
|
|
52
|
+
return (e, t) => (c(), n(d(g), {
|
|
53
|
+
"model-value": S.value,
|
|
54
|
+
mode: "date",
|
|
55
|
+
"is-range": a.isRange,
|
|
56
|
+
class: s(x.value),
|
|
57
|
+
"select-attribute": T.value,
|
|
58
|
+
"drag-attribute": E.value,
|
|
59
|
+
"trim-weeks": "",
|
|
60
|
+
"first-day-of-week": 1,
|
|
61
|
+
popover: !1,
|
|
62
|
+
"onUpdate:modelValue": C,
|
|
63
|
+
onDrag: w
|
|
64
|
+
}, {
|
|
65
|
+
"header-prev-button": p(() => [i(d(m), { class: "w-4 h-4" })]),
|
|
66
|
+
"header-title": p(({ title: e }) => [r("span", _, l(e), 1)]),
|
|
67
|
+
"header-next-button": p(() => [i(d(h), { class: "w-4 h-4" })]),
|
|
68
|
+
"day-content": p(({ day: e, dayProps: t, dayEvents: n }) => [r("div", o(t, { class: j(e, t.class) }, u(n, !0)), l(e.label), 17)]),
|
|
69
|
+
_: 1
|
|
70
|
+
}, 8, [
|
|
71
|
+
"model-value",
|
|
72
|
+
"is-range",
|
|
73
|
+
"class",
|
|
74
|
+
"select-attribute",
|
|
75
|
+
"drag-attribute"
|
|
76
|
+
]));
|
|
77
|
+
}
|
|
78
|
+
}), y = (e, t) => {
|
|
79
|
+
let n = e.__vccOpts || e;
|
|
80
|
+
for (let [e, r] of t) n[e] = r;
|
|
81
|
+
return n;
|
|
82
|
+
}, b = /*#__PURE__*/ y(v, [["__scopeId", "data-v-2cf00a3c"]]);
|
|
83
|
+
//#endregion
|
|
84
|
+
export { y as n, b as t };
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import { n as e, t } from "./utils-BkwM-_ON.js";
|
|
2
|
-
import { t as n } from "./zh-CN-
|
|
3
|
-
import { Fragment as r, computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createTextVNode as c, defineComponent as l, inject as u, normalizeClass as d, openBlock as f, provide as p, renderSlot as m, toDisplayString as h, unref as g } from "vue";
|
|
4
|
-
import { Loader2 as
|
|
2
|
+
import { t as n } from "./zh-CN-hW4BnL3z.js";
|
|
3
|
+
import { Fragment as r, computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createTextVNode as c, defineComponent as l, inject as u, normalizeClass as d, openBlock as f, provide as p, renderSlot as m, toDisplayString as h, unref as g, withCtx as _ } from "vue";
|
|
4
|
+
import { Loader2 as v } from "@lucide/vue";
|
|
5
|
+
import { Primitive as y } from "reka-ui";
|
|
5
6
|
//#region ../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.mjs
|
|
6
|
-
var
|
|
7
|
-
if (t?.variants == null) return
|
|
7
|
+
var b = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, x = e, S = (e, t) => (n) => {
|
|
8
|
+
if (t?.variants == null) return x(e, n?.class, n?.className);
|
|
8
9
|
let { variants: r, defaultVariants: i } = t, a = Object.keys(r).map((e) => {
|
|
9
10
|
let t = n?.[e], a = i?.[e];
|
|
10
11
|
if (t === null) return null;
|
|
11
|
-
let o =
|
|
12
|
+
let o = b(t) || b(a);
|
|
12
13
|
return r[e][o];
|
|
13
14
|
}), o = n && Object.entries(n).reduce((e, t) => {
|
|
14
15
|
let [n, r] = t;
|
|
15
16
|
return r === void 0 || (e[n] = r), e;
|
|
16
17
|
}, {});
|
|
17
|
-
return
|
|
18
|
+
return x(e, a, t?.compoundVariants?.reduce((e, t) => {
|
|
18
19
|
let { class: n, className: r, ...a } = t;
|
|
19
20
|
return Object.entries(a).every((e) => {
|
|
20
21
|
let [t, n] = e;
|
|
@@ -31,9 +32,10 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = e, b = (e
|
|
|
31
32
|
r
|
|
32
33
|
] : e;
|
|
33
34
|
}, []), n?.class, n?.className);
|
|
34
|
-
},
|
|
35
|
+
}, C = S([
|
|
35
36
|
"inline-flex items-center justify-center gap-2",
|
|
36
37
|
"border-3 border-brutal",
|
|
38
|
+
"rounded-brutal",
|
|
37
39
|
"font-black tracking-wide",
|
|
38
40
|
"transition-all duration-150",
|
|
39
41
|
"focus:outline focus:outline-[3px] focus:outline-brutal-ring focus:outline-offset-2",
|
|
@@ -101,11 +103,73 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = e, b = (e
|
|
|
101
103
|
variant: "default",
|
|
102
104
|
size: "default"
|
|
103
105
|
}
|
|
104
|
-
}),
|
|
105
|
-
|
|
106
|
-
|
|
106
|
+
}), w = S("", {
|
|
107
|
+
variants: { size: {
|
|
108
|
+
xs: "h-2.5 w-2.5",
|
|
109
|
+
sm: "h-3 w-3",
|
|
110
|
+
default: "h-4 w-4",
|
|
111
|
+
lg: "h-5 w-5",
|
|
112
|
+
xl: "h-6 w-6",
|
|
113
|
+
"2xl": "h-8 w-8"
|
|
114
|
+
} },
|
|
115
|
+
defaultVariants: { size: "default" }
|
|
116
|
+
}), T = /* @__PURE__ */ l({
|
|
117
|
+
__name: "Button",
|
|
118
|
+
props: {
|
|
119
|
+
variant: { default: "default" },
|
|
120
|
+
size: { default: "default" },
|
|
121
|
+
asChild: {
|
|
122
|
+
type: Boolean,
|
|
123
|
+
default: !1
|
|
124
|
+
},
|
|
125
|
+
loading: {
|
|
126
|
+
type: Boolean,
|
|
127
|
+
default: !1
|
|
128
|
+
},
|
|
129
|
+
disabled: {
|
|
130
|
+
type: Boolean,
|
|
131
|
+
default: !1
|
|
132
|
+
},
|
|
133
|
+
class: { default: void 0 }
|
|
134
|
+
},
|
|
135
|
+
setup(e) {
|
|
136
|
+
let n = e, r = i(() => n.disabled || n.loading), s = i(() => t(C({
|
|
137
|
+
variant: n.variant,
|
|
138
|
+
size: n.size
|
|
139
|
+
}), n.asChild && r.value && "pointer-events-none", n.class)), c = {
|
|
140
|
+
sm: "sm",
|
|
141
|
+
default: "default",
|
|
142
|
+
lg: "lg",
|
|
143
|
+
xl: "xl",
|
|
144
|
+
icon: "default"
|
|
145
|
+
}, l = i(() => t(w({ size: c[n.size] }), "animate-spin"));
|
|
146
|
+
return (t, n) => (f(), a(g(y), {
|
|
147
|
+
as: e.asChild ? void 0 : "button",
|
|
148
|
+
"as-child": e.asChild,
|
|
149
|
+
class: d(s.value),
|
|
150
|
+
disabled: !e.asChild && r.value,
|
|
151
|
+
"aria-disabled": e.asChild && r.value ? !0 : void 0,
|
|
152
|
+
"aria-busy": e.loading || void 0
|
|
153
|
+
}, {
|
|
154
|
+
default: _(() => [e.loading ? (f(), a(g(v), {
|
|
155
|
+
key: 0,
|
|
156
|
+
class: d(l.value)
|
|
157
|
+
}, null, 8, ["class"])) : o("", !0), m(t.$slots, "default")]),
|
|
158
|
+
_: 3
|
|
159
|
+
}, 8, [
|
|
160
|
+
"as",
|
|
161
|
+
"as-child",
|
|
162
|
+
"class",
|
|
163
|
+
"disabled",
|
|
164
|
+
"aria-disabled",
|
|
165
|
+
"aria-busy"
|
|
166
|
+
]));
|
|
167
|
+
}
|
|
168
|
+
}), E = Symbol("brutx-ui-locale");
|
|
169
|
+
function D(e) {
|
|
170
|
+
p(E, e);
|
|
107
171
|
}
|
|
108
|
-
function
|
|
172
|
+
function O(e, t) {
|
|
109
173
|
let n = t.split("."), r = e;
|
|
110
174
|
for (let e of n) {
|
|
111
175
|
if (typeof r != "object" || !r) return;
|
|
@@ -113,16 +177,16 @@ function w(e, t) {
|
|
|
113
177
|
}
|
|
114
178
|
return typeof r == "string" ? r : void 0;
|
|
115
179
|
}
|
|
116
|
-
function
|
|
180
|
+
function k(e, t) {
|
|
117
181
|
return t ? Object.entries(t).reduce((e, [t, n]) => e.split(`{${t}}`).join(String(n)), e) : e;
|
|
118
182
|
}
|
|
119
|
-
function
|
|
120
|
-
let e = u(
|
|
183
|
+
function A() {
|
|
184
|
+
let e = u(E, void 0), t = i(() => (e ? g(e) : void 0) ?? n);
|
|
121
185
|
function r(e, r) {
|
|
122
|
-
let i =
|
|
123
|
-
if (i !== void 0) return
|
|
124
|
-
let a =
|
|
125
|
-
return a === void 0 ? e :
|
|
186
|
+
let i = O(t.value, e);
|
|
187
|
+
if (i !== void 0) return k(i, r);
|
|
188
|
+
let a = O(n, e);
|
|
189
|
+
return a === void 0 ? e : k(a, r);
|
|
126
190
|
}
|
|
127
191
|
return {
|
|
128
192
|
locale: t,
|
|
@@ -130,8 +194,8 @@ function E() {
|
|
|
130
194
|
};
|
|
131
195
|
}
|
|
132
196
|
//#endregion
|
|
133
|
-
//#region src/components/submit-button/SubmitButton.vue
|
|
134
|
-
var
|
|
197
|
+
//#region src/components/submit-button/SubmitButton.vue
|
|
198
|
+
var j = /* @__PURE__ */ l({
|
|
135
199
|
__name: "SubmitButton",
|
|
136
200
|
props: {
|
|
137
201
|
variant: { default: "default" },
|
|
@@ -148,21 +212,25 @@ var D = ["disabled", "aria-busy"], O = /* @__PURE__ */ l({
|
|
|
148
212
|
class: { default: void 0 }
|
|
149
213
|
},
|
|
150
214
|
setup(e) {
|
|
151
|
-
let
|
|
152
|
-
|
|
153
|
-
size: n.size
|
|
154
|
-
}), n.class));
|
|
155
|
-
return (t, n) => (f(), s("button", {
|
|
215
|
+
let t = e, { t: n } = A(), o = i(() => t.pendingText ?? n("submitButton.submitting"));
|
|
216
|
+
return (n, i) => (f(), a(T, {
|
|
156
217
|
type: "submit",
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
"
|
|
164
|
-
|
|
218
|
+
variant: e.variant,
|
|
219
|
+
size: e.size,
|
|
220
|
+
loading: e.loading,
|
|
221
|
+
disabled: e.disabled,
|
|
222
|
+
class: d(t.class)
|
|
223
|
+
}, {
|
|
224
|
+
default: _(() => [e.loading && o.value ? (f(), s(r, { key: 0 }, [c(h(o.value), 1)], 64)) : m(n.$slots, "default", { key: 1 })]),
|
|
225
|
+
_: 3
|
|
226
|
+
}, 8, [
|
|
227
|
+
"variant",
|
|
228
|
+
"size",
|
|
229
|
+
"loading",
|
|
230
|
+
"disabled",
|
|
231
|
+
"class"
|
|
232
|
+
]));
|
|
165
233
|
}
|
|
166
234
|
});
|
|
167
235
|
//#endregion
|
|
168
|
-
export {
|
|
236
|
+
export { T as a, S as c, A as i, E as n, w as o, D as r, C as s, j as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./utils-BC5WDCkH.cjs"),t=require("./zh-CN-BJ4W0nz6.cjs");let n=require("vue"),r=require("@lucide/vue"),i=require("reka-ui");var a=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,o=e.n,s=(e,t)=>n=>{if(t?.variants==null)return o(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,s=Object.keys(r).map(e=>{let t=n?.[e],o=i?.[e];if(t===null)return null;let s=a(t)||a(o);return r[e][s]}),c=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return o(e,s,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...c}[t]):{...i,...c}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},c=s([`inline-flex items-center justify-center gap-2`,`border-3 border-brutal`,`rounded-brutal`,`font-black tracking-wide`,`transition-all duration-150`,`focus:outline focus:outline-[3px] focus:outline-brutal-ring focus:outline-offset-2`,`disabled:opacity-50 disabled:pointer-events-none`,`active:translate-y-[var(--brutal-pressed-offset,2px)] active:shadow-none`],{variants:{variant:{default:[`bg-brutal-bg text-brutal-fg`,`shadow-brutal`,`hover:shadow-brutal-lg hover:-translate-x-0.5 hover:-translate-y-0.5`],primary:[`bg-brutal-primary text-brutal-primary-foreground`,`shadow-brutal`,`hover:shadow-brutal-lg hover:-translate-x-0.5 hover:-translate-y-0.5`],secondary:[`bg-brutal-secondary text-brutal-secondary-foreground`,`shadow-brutal`,`hover:shadow-brutal-lg hover:-translate-x-0.5 hover:-translate-y-0.5`],accent:[`bg-brutal-accent text-brutal-accent-foreground`,`shadow-brutal`,`hover:shadow-brutal-lg hover:-translate-x-0.5 hover:-translate-y-0.5`],danger:[`bg-brutal-destructive text-brutal-destructive-foreground`,`shadow-brutal`,`hover:shadow-brutal-lg hover:-translate-x-0.5 hover:-translate-y-0.5`],success:[`bg-brutal-success text-brutal-success-foreground`,`shadow-brutal`,`hover:shadow-brutal-lg hover:-translate-x-0.5 hover:-translate-y-0.5`],outline:[`bg-transparent text-brutal-fg`,`shadow-brutal`,`hover:bg-brutal-fg hover:text-brutal-bg`,`hover:shadow-brutal-lg hover:-translate-x-0.5 hover:-translate-y-0.5`],ghost:[`bg-transparent text-brutal-fg border-transparent`,`shadow-none`,`hover:bg-brutal-muted hover:border-brutal`],link:[`bg-transparent text-brutal-fg border-transparent`,`shadow-none underline-offset-4`,`hover:underline`]},size:{sm:`h-9 px-3 py-1 text-sm`,default:`h-11 px-5 py-2 text-base`,lg:`h-14 px-8 py-3 text-lg`,xl:`h-16 px-10 py-4 text-xl`,icon:`h-11 w-11 p-0`}},defaultVariants:{variant:`default`,size:`default`}}),l=s(``,{variants:{size:{xs:`h-2.5 w-2.5`,sm:`h-3 w-3`,default:`h-4 w-4`,lg:`h-5 w-5`,xl:`h-6 w-6`,"2xl":`h-8 w-8`}},defaultVariants:{size:`default`}}),u=(0,n.defineComponent)({__name:`Button`,props:{variant:{default:`default`},size:{default:`default`},asChild:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},class:{default:void 0}},setup(t){let a=t,o=(0,n.computed)(()=>a.disabled||a.loading),s=(0,n.computed)(()=>e.t(c({variant:a.variant,size:a.size}),a.asChild&&o.value&&`pointer-events-none`,a.class)),u={sm:`sm`,default:`default`,lg:`lg`,xl:`xl`,icon:`default`},d=(0,n.computed)(()=>e.t(l({size:u[a.size]}),`animate-spin`));return(e,a)=>((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(i.Primitive),{as:t.asChild?void 0:`button`,"as-child":t.asChild,class:(0,n.normalizeClass)(s.value),disabled:!t.asChild&&o.value,"aria-disabled":t.asChild&&o.value?!0:void 0,"aria-busy":t.loading||void 0},{default:(0,n.withCtx)(()=>[t.loading?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(r.Loader2),{key:0,class:(0,n.normalizeClass)(d.value)},null,8,[`class`])):(0,n.createCommentVNode)(``,!0),(0,n.renderSlot)(e.$slots,`default`)]),_:3},8,[`as`,`as-child`,`class`,`disabled`,`aria-disabled`,`aria-busy`]))}}),d=Symbol(`brutx-ui-locale`);function f(e){(0,n.provide)(d,e)}function p(e,t){let n=t.split(`.`),r=e;for(let e of n){if(typeof r!=`object`||!r)return;r=r[e]}return typeof r==`string`?r:void 0}function m(e,t){return t?Object.entries(t).reduce((e,[t,n])=>e.split(`{${t}}`).join(String(n)),e):e}function h(){let e=(0,n.inject)(d,void 0),r=(0,n.computed)(()=>(e?(0,n.unref)(e):void 0)??t.t);function i(e,n){let i=p(r.value,e);if(i!==void 0)return m(i,n);let a=p(t.t,e);return a===void 0?e:m(a,n)}return{locale:r,t:i}}var g=(0,n.defineComponent)({__name:`SubmitButton`,props:{variant:{default:`default`},size:{default:`default`},pendingText:{default:void 0},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},class:{default:void 0}},setup(e){let t=e,{t:r}=h(),i=(0,n.computed)(()=>t.pendingText??r(`submitButton.submitting`));return(r,a)=>((0,n.openBlock)(),(0,n.createBlock)(u,{type:`submit`,variant:e.variant,size:e.size,loading:e.loading,disabled:e.disabled,class:(0,n.normalizeClass)(t.class)},{default:(0,n.withCtx)(()=>[e.loading&&i.value?((0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,{key:0},[(0,n.createTextVNode)((0,n.toDisplayString)(i.value),1)],64)):(0,n.renderSlot)(r.$slots,`default`,{key:1})]),_:3},8,[`variant`,`size`,`loading`,`disabled`,`class`]))}});Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return h}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return g}});
|