@brumaombra/ui-vintage 0.1.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 +21 -0
- package/README.md +78 -0
- package/dist/AlertDialogTitle.vue_vue_type_script_setup_true_lang-CWCr2erD.js +360 -0
- package/dist/AlertDialogTrigger.vue_vue_type_script_setup_true_lang-vNwxOYhM.js +158 -0
- package/dist/BackgroundGrid-Cxvbtefm.js +13 -0
- package/dist/Busy-B65Nd9ec.js +62 -0
- package/dist/BusyIndicator-CnWzSMDb.js +4 -0
- package/dist/BusyIndicator.vue_vue_type_script_setup_true_lang-CYeXMI_V.js +66 -0
- package/dist/CalendarPrevButton.vue_vue_type_script_setup_true_lang-C-WnFnvj.js +3805 -0
- package/dist/Card.vue_vue_type_script_setup_true_lang-6ol3rxy1.js +27 -0
- package/dist/CardTitle.vue_vue_type_script_setup_true_lang-DVAd7AWF.js +112 -0
- package/dist/Collection-CmOoLBo7.js +76 -0
- package/dist/ConfigProvider-D2O0Jles.js +6 -0
- package/dist/ConfirmDialog-DEsvF0b_.js +4 -0
- package/dist/ConfirmDialog.vue_vue_type_script_setup_true_lang-BAd1l1zF.js +230 -0
- package/dist/DashboardShell.vue_vue_type_script_setup_true_lang-CT2SQBXv.js +171 -0
- package/dist/DatePicker.vue_vue_type_script_setup_true_lang-D8mev2ha.js +92 -0
- package/dist/DialogClose-BNlqG4G2.js +36 -0
- package/dist/DialogTitle-DXj0nkXn.js +522 -0
- package/dist/DialogTitle.vue_vue_type_script_setup_true_lang-Bw40D4AK.js +174 -0
- package/dist/DialogTrigger-CpyKnu11.js +52 -0
- package/dist/DialogTrigger.vue_vue_type_script_setup_true_lang-DLrFiCsw.js +141 -0
- package/dist/FocusScope-C3mcVwsf.js +454 -0
- package/dist/Input.vue_vue_type_script_setup_true_lang-U778IWa0.js +37 -0
- package/dist/Label.vue_vue_type_script_setup_true_lang-B_fwvfJ-.js +65 -0
- package/dist/MessageDialog-BrowppID.js +4 -0
- package/dist/MessageDialog.vue_vue_type_script_setup_true_lang-Ddih5Isd.js +242 -0
- package/dist/NativeSelectOption.vue_vue_type_script_setup_true_lang-DS87OTLT.js +73 -0
- package/dist/PopoverAnchor.vue_vue_type_script_setup_true_lang-CsfybvZp.js +61 -0
- package/dist/PopoverTrigger.vue_vue_type_script_setup_true_lang-KTcg6Jnl.js +798 -0
- package/dist/PopperContent-BiM0YLO3.js +2144 -0
- package/dist/Primitive-D3IcFg81.js +61 -0
- package/dist/SelectValue.vue_vue_type_script_setup_true_lang-DGAI4hw5.js +2124 -0
- package/dist/Separator-CFm_M4pb.js +87 -0
- package/dist/Separator.vue_vue_type_script_setup_true_lang-COrZ60NR.js +29 -0
- package/dist/SheetTitle.vue_vue_type_script_setup_true_lang-DLoXGMbx.js +175 -0
- package/dist/SheetTrigger.vue_vue_type_script_setup_true_lang-CE2XJNHy.js +62 -0
- package/dist/Skeleton.vue_vue_type_script_setup_true_lang-BSbVyZz7.js +20 -0
- package/dist/Slider.vue_vue_type_script_setup_true_lang-D-cAN-4Q.js +802 -0
- package/dist/SliderFormComponent.vue_vue_type_script_setup_true_lang-KPzC_Lmr.js +59 -0
- package/dist/Switch.vue_vue_type_script_setup_true_lang-BWKCycMm.js +226 -0
- package/dist/SwitchFormComponent.vue_vue_type_script_setup_true_lang-XOBEs3pa.js +39 -0
- package/dist/Teleport-CuUn4UkG.js +493 -0
- package/dist/TooltipProvider.vue_vue_type_script_setup_true_lang-DwIfCQjY.js +28 -0
- package/dist/TooltipTrigger.vue_vue_type_script_setup_true_lang-BRyHTWgw.js +1117 -0
- package/dist/VisuallyHidden-udQT2Fmo.js +60 -0
- package/dist/VisuallyHiddenInput-DLAsRwUw.js +142 -0
- package/dist/_plugin-vue_export-helper-1tPrXgE0.js +10 -0
- package/dist/alert-dialog.d.ts +2 -0
- package/dist/alert-dialog.js +13 -0
- package/dist/alert.d.ts +2 -0
- package/dist/alert.js +76 -0
- package/dist/background-grid.d.ts +6 -0
- package/dist/background-grid.js +5 -0
- package/dist/busy-indicator.d.ts +2 -0
- package/dist/busy-indicator.js +6 -0
- package/dist/busy.d.ts +2 -0
- package/dist/busy.js +4 -0
- package/dist/button.d.ts +2 -0
- package/dist/button.js +63 -0
- package/dist/calendar.d.ts +2 -0
- package/dist/calendar.js +15 -0
- package/dist/card.d.ts +2 -0
- package/dist/card.js +11 -0
- package/dist/check-iejznCzf.js +11 -0
- package/dist/chevron-down-DP-oz-sL.js +13 -0
- package/dist/clamp-D5Ye0kJT.js +6 -0
- package/dist/command.d.ts +2 -0
- package/dist/command.js +1122 -0
- package/dist/components/background-grid/BackgroundGrid.vue.d.ts +2 -0
- package/dist/components/background-grid/index.d.ts +2 -0
- package/dist/components/busy-indicator/BusyIndicator.vue.d.ts +2 -0
- package/dist/components/busy-indicator/busy-indicator-state.d.ts +15 -0
- package/dist/components/busy-indicator/index.d.ts +3 -0
- package/dist/components/confirm-dialog/ConfirmDialog.vue.d.ts +2 -0
- package/dist/components/confirm-dialog/confirm-dialog-state.d.ts +37 -0
- package/dist/components/confirm-dialog/index.d.ts +3 -0
- package/dist/components/dashboard-shell/DashboardShell.vue.d.ts +54 -0
- package/dist/components/dashboard-shell/index.d.ts +2 -0
- package/dist/components/message-dialog/MessageDialog.vue.d.ts +2 -0
- package/dist/components/message-dialog/index.d.ts +3 -0
- package/dist/components/message-dialog/message-dialog-state.d.ts +28 -0
- package/dist/components/slider-form-component/SliderFormComponent.vue.d.ts +23 -0
- package/dist/components/slider-form-component/index.d.ts +2 -0
- package/dist/components/switch-form-component/SwitchFormComponent.vue.d.ts +12 -0
- package/dist/components/switch-form-component/index.d.ts +2 -0
- package/dist/components/ui/alert/Alert.vue.d.ts +23 -0
- package/dist/components/ui/alert/AlertDescription.vue.d.ts +21 -0
- package/dist/components/ui/alert/AlertTitle.vue.d.ts +21 -0
- package/dist/components/ui/alert/index.d.ts +8 -0
- package/dist/components/ui/alert-dialog/AlertDialog.vue.d.ts +25 -0
- package/dist/components/ui/alert-dialog/AlertDialogAction.vue.d.ts +22 -0
- package/dist/components/ui/alert-dialog/AlertDialogCancel.vue.d.ts +22 -0
- package/dist/components/ui/alert-dialog/AlertDialogContent.vue.d.ts +36 -0
- package/dist/components/ui/alert-dialog/AlertDialogDescription.vue.d.ts +22 -0
- package/dist/components/ui/alert-dialog/AlertDialogFooter.vue.d.ts +21 -0
- package/dist/components/ui/alert-dialog/AlertDialogHeader.vue.d.ts +21 -0
- package/dist/components/ui/alert-dialog/AlertDialogTitle.vue.d.ts +22 -0
- package/dist/components/ui/alert-dialog/AlertDialogTrigger.vue.d.ts +18 -0
- package/dist/components/ui/alert-dialog/index.d.ts +9 -0
- package/dist/components/ui/busy/Busy.vue.d.ts +27 -0
- package/dist/components/ui/busy/index.d.ts +1 -0
- package/dist/components/ui/button/Button.vue.d.ts +27 -0
- package/dist/components/ui/button/index.d.ts +7 -0
- package/dist/components/ui/calendar/Calendar.vue.d.ts +44 -0
- package/dist/components/ui/calendar/CalendarCell.vue.d.ts +22 -0
- package/dist/components/ui/calendar/CalendarCellTrigger.vue.d.ts +24 -0
- package/dist/components/ui/calendar/CalendarGrid.vue.d.ts +22 -0
- package/dist/components/ui/calendar/CalendarGridBody.vue.d.ts +18 -0
- package/dist/components/ui/calendar/CalendarGridHead.vue.d.ts +22 -0
- package/dist/components/ui/calendar/CalendarGridRow.vue.d.ts +22 -0
- package/dist/components/ui/calendar/CalendarHeadCell.vue.d.ts +22 -0
- package/dist/components/ui/calendar/CalendarHeader.vue.d.ts +22 -0
- package/dist/components/ui/calendar/CalendarHeading.vue.d.ts +28 -0
- package/dist/components/ui/calendar/CalendarNextButton.vue.d.ts +22 -0
- package/dist/components/ui/calendar/CalendarPrevButton.vue.d.ts +22 -0
- package/dist/components/ui/calendar/index.d.ts +13 -0
- package/dist/components/ui/card/Card.vue.d.ts +21 -0
- package/dist/components/ui/card/CardAction.vue.d.ts +21 -0
- package/dist/components/ui/card/CardContent.vue.d.ts +21 -0
- package/dist/components/ui/card/CardDescription.vue.d.ts +21 -0
- package/dist/components/ui/card/CardFooter.vue.d.ts +21 -0
- package/dist/components/ui/card/CardHeader.vue.d.ts +21 -0
- package/dist/components/ui/card/CardTitle.vue.d.ts +21 -0
- package/dist/components/ui/card/index.d.ts +7 -0
- package/dist/components/ui/command/Command.vue.d.ts +40 -0
- package/dist/components/ui/command/CommandDialog.vue.d.ts +32 -0
- package/dist/components/ui/command/CommandEmpty.vue.d.ts +22 -0
- package/dist/components/ui/command/CommandGroup.vue.d.ts +23 -0
- package/dist/components/ui/command/CommandInput.vue.d.ts +7 -0
- package/dist/components/ui/command/CommandItem.vue.d.ts +30 -0
- package/dist/components/ui/command/CommandList.vue.d.ts +22 -0
- package/dist/components/ui/command/CommandSeparator.vue.d.ts +22 -0
- package/dist/components/ui/command/CommandShortcut.vue.d.ts +21 -0
- package/dist/components/ui/command/index.d.ts +90 -0
- package/dist/components/ui/date-picker/DatePicker.vue.d.ts +19 -0
- package/dist/components/ui/date-picker/index.d.ts +2 -0
- package/dist/components/ui/dialog/Dialog.vue.d.ts +25 -0
- package/dist/components/ui/dialog/DialogClose.vue.d.ts +18 -0
- package/dist/components/ui/dialog/DialogContent.vue.d.ts +39 -0
- package/dist/components/ui/dialog/DialogDescription.vue.d.ts +22 -0
- package/dist/components/ui/dialog/DialogFooter.vue.d.ts +24 -0
- package/dist/components/ui/dialog/DialogHeader.vue.d.ts +21 -0
- package/dist/components/ui/dialog/DialogOverlay.vue.d.ts +22 -0
- package/dist/components/ui/dialog/DialogScrollContent.vue.d.ts +36 -0
- package/dist/components/ui/dialog/DialogTitle.vue.d.ts +22 -0
- package/dist/components/ui/dialog/DialogTrigger.vue.d.ts +18 -0
- package/dist/components/ui/dialog/index.d.ts +10 -0
- package/dist/components/ui/field/Field.vue.d.ts +23 -0
- package/dist/components/ui/field/FieldContent.vue.d.ts +21 -0
- package/dist/components/ui/field/FieldDescription.vue.d.ts +21 -0
- package/dist/components/ui/field/FieldError.vue.d.ts +24 -0
- package/dist/components/ui/field/FieldGroup.vue.d.ts +21 -0
- package/dist/components/ui/field/FieldLabel.vue.d.ts +21 -0
- package/dist/components/ui/field/FieldLegend.vue.d.ts +22 -0
- package/dist/components/ui/field/FieldSeparator.vue.d.ts +21 -0
- package/dist/components/ui/field/FieldSet.vue.d.ts +21 -0
- package/dist/components/ui/field/FieldTitle.vue.d.ts +21 -0
- package/dist/components/ui/field/index.d.ts +15 -0
- package/dist/components/ui/input/Input.vue.d.ts +12 -0
- package/dist/components/ui/input/index.d.ts +1 -0
- package/dist/components/ui/label/Label.vue.d.ts +22 -0
- package/dist/components/ui/label/index.d.ts +1 -0
- package/dist/components/ui/native-select/NativeSelect.vue.d.ts +27 -0
- package/dist/components/ui/native-select/NativeSelectOptGroup.vue.d.ts +21 -0
- package/dist/components/ui/native-select/NativeSelectOption.vue.d.ts +21 -0
- package/dist/components/ui/native-select/index.d.ts +3 -0
- package/dist/components/ui/popover/Popover.vue.d.ts +25 -0
- package/dist/components/ui/popover/PopoverAnchor.vue.d.ts +18 -0
- package/dist/components/ui/popover/PopoverContent.vue.d.ts +39 -0
- package/dist/components/ui/popover/PopoverTrigger.vue.d.ts +18 -0
- package/dist/components/ui/popover/index.d.ts +4 -0
- package/dist/components/ui/select/Select.vue.d.ts +28 -0
- package/dist/components/ui/select/SelectContent.vue.d.ts +32 -0
- package/dist/components/ui/select/SelectGroup.vue.d.ts +18 -0
- package/dist/components/ui/select/SelectItem.vue.d.ts +24 -0
- package/dist/components/ui/select/SelectItemText.vue.d.ts +18 -0
- package/dist/components/ui/select/SelectLabel.vue.d.ts +22 -0
- package/dist/components/ui/select/SelectScrollDownButton.vue.d.ts +22 -0
- package/dist/components/ui/select/SelectScrollUpButton.vue.d.ts +22 -0
- package/dist/components/ui/select/SelectSeparator.vue.d.ts +7 -0
- package/dist/components/ui/select/SelectTrigger.vue.d.ts +25 -0
- package/dist/components/ui/select/SelectValue.vue.d.ts +18 -0
- package/dist/components/ui/select/index.d.ts +11 -0
- package/dist/components/ui/separator/Separator.vue.d.ts +10 -0
- package/dist/components/ui/separator/index.d.ts +1 -0
- package/dist/components/ui/sheet/Sheet.vue.d.ts +25 -0
- package/dist/components/ui/sheet/SheetClose.vue.d.ts +18 -0
- package/dist/components/ui/sheet/SheetContent.vue.d.ts +39 -0
- package/dist/components/ui/sheet/SheetDescription.vue.d.ts +22 -0
- package/dist/components/ui/sheet/SheetFooter.vue.d.ts +21 -0
- package/dist/components/ui/sheet/SheetHeader.vue.d.ts +21 -0
- package/dist/components/ui/sheet/SheetOverlay.vue.d.ts +22 -0
- package/dist/components/ui/sheet/SheetTitle.vue.d.ts +22 -0
- package/dist/components/ui/sheet/SheetTrigger.vue.d.ts +18 -0
- package/dist/components/ui/sheet/index.d.ts +8 -0
- package/dist/components/ui/sidebar/Sidebar.vue.d.ts +24 -0
- package/dist/components/ui/sidebar/SidebarContent.vue.d.ts +21 -0
- package/dist/components/ui/sidebar/SidebarFooter.vue.d.ts +21 -0
- package/dist/components/ui/sidebar/SidebarGroup.vue.d.ts +21 -0
- package/dist/components/ui/sidebar/SidebarGroupAction.vue.d.ts +22 -0
- package/dist/components/ui/sidebar/SidebarGroupContent.vue.d.ts +21 -0
- package/dist/components/ui/sidebar/SidebarGroupLabel.vue.d.ts +22 -0
- package/dist/components/ui/sidebar/SidebarHeader.vue.d.ts +21 -0
- package/dist/components/ui/sidebar/SidebarInput.vue.d.ts +21 -0
- package/dist/components/ui/sidebar/SidebarInset.vue.d.ts +21 -0
- package/dist/components/ui/sidebar/SidebarMenu.vue.d.ts +21 -0
- package/dist/components/ui/sidebar/SidebarMenuAction.vue.d.ts +25 -0
- package/dist/components/ui/sidebar/SidebarMenuBadge.vue.d.ts +21 -0
- package/dist/components/ui/sidebar/SidebarMenuButton.vue.d.ts +27 -0
- package/dist/components/ui/sidebar/SidebarMenuButtonChild.vue.d.ts +30 -0
- package/dist/components/ui/sidebar/SidebarMenuItem.vue.d.ts +21 -0
- package/dist/components/ui/sidebar/SidebarMenuSkeleton.vue.d.ts +7 -0
- package/dist/components/ui/sidebar/SidebarMenuSub.vue.d.ts +21 -0
- package/dist/components/ui/sidebar/SidebarMenuSubButton.vue.d.ts +27 -0
- package/dist/components/ui/sidebar/SidebarMenuSubItem.vue.d.ts +21 -0
- package/dist/components/ui/sidebar/SidebarProvider.vue.d.ts +30 -0
- package/dist/components/ui/sidebar/SidebarRail.vue.d.ts +21 -0
- package/dist/components/ui/sidebar/SidebarSeparator.vue.d.ts +21 -0
- package/dist/components/ui/sidebar/SidebarTrigger.vue.d.ts +6 -0
- package/dist/components/ui/sidebar/index.d.ts +37 -0
- package/dist/components/ui/sidebar/utils.d.ts +56 -0
- package/dist/components/ui/skeleton/Skeleton.vue.d.ts +6 -0
- package/dist/components/ui/skeleton/index.d.ts +1 -0
- package/dist/components/ui/slider/Slider.vue.d.ts +13 -0
- package/dist/components/ui/slider/index.d.ts +1 -0
- package/dist/components/ui/switch/Switch.vue.d.ts +29 -0
- package/dist/components/ui/switch/index.d.ts +1 -0
- package/dist/components/ui/tooltip/Tooltip.vue.d.ts +24 -0
- package/dist/components/ui/tooltip/TooltipContent.vue.d.ts +30 -0
- package/dist/components/ui/tooltip/TooltipProvider.vue.d.ts +20 -0
- package/dist/components/ui/tooltip/TooltipTrigger.vue.d.ts +18 -0
- package/dist/components/ui/tooltip/index.d.ts +4 -0
- package/dist/confirm-dialog.d.ts +2 -0
- package/dist/confirm-dialog.js +9 -0
- package/dist/createLucideIcon-CCMB2vDW.js +130 -0
- package/dist/dashboard-shell.d.ts +6 -0
- package/dist/dashboard-shell.js +5 -0
- package/dist/date-picker.d.ts +6 -0
- package/dist/date-picker.js +5 -0
- package/dist/dialog.d.ts +2 -0
- package/dist/dialog.js +14 -0
- package/dist/field.d.ts +2 -0
- package/dist/field.js +294 -0
- package/dist/index-C1_fxYhb.js +251 -0
- package/dist/index-Dfi5ESP2.js +299 -0
- package/dist/index-FpH8cK6B.js +44 -0
- package/dist/index.d.ts +28 -0
- package/dist/index.js +171 -0
- package/dist/info-DZrSmi42.js +15 -0
- package/dist/input.d.ts +2 -0
- package/dist/input.js +4 -0
- package/dist/label.d.ts +2 -0
- package/dist/label.js +4 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/message-dialog.d.ts +2 -0
- package/dist/message-dialog.js +8 -0
- package/dist/native-select.d.ts +2 -0
- package/dist/native-select.js +25 -0
- package/dist/popover.d.ts +2 -0
- package/dist/popover.js +8 -0
- package/dist/select.d.ts +2 -0
- package/dist/select.js +14 -0
- package/dist/separator.d.ts +2 -0
- package/dist/separator.js +4 -0
- package/dist/sheet.d.ts +2 -0
- package/dist/sheet.js +12 -0
- package/dist/sidebar.d.ts +2 -0
- package/dist/sidebar.js +813 -0
- package/dist/skeleton.d.ts +2 -0
- package/dist/skeleton.js +4 -0
- package/dist/slider-form-component.d.ts +6 -0
- package/dist/slider-form-component.js +5 -0
- package/dist/slider.d.ts +2 -0
- package/dist/slider.js +4 -0
- package/dist/style.css +4021 -0
- package/dist/switch-form-component.d.ts +6 -0
- package/dist/switch-form-component.js +5 -0
- package/dist/switch.d.ts +2 -0
- package/dist/switch.js +4 -0
- package/dist/tooltip.d.ts +2 -0
- package/dist/tooltip.js +8 -0
- package/dist/useDirection-SIyEYNxv.js +12 -0
- package/dist/useFocusGuards-tgErlvMF.js +29 -0
- package/dist/useFormControl-7ytzz-r7.js +11 -0
- package/dist/useForwardExpose-CNVHwdF2.js +58 -0
- package/dist/useForwardPropsEmits-DmumnZO5.js +63 -0
- package/dist/useKbd-JjFOu4f7.js +41 -0
- package/dist/usePrimitiveElement-CijaRBgF.js +16 -0
- package/dist/useSize-DO9Z3wC4.js +51 -0
- package/dist/useTypeahead-Dqe1QXq1.js +159 -0
- package/dist/utils-Bz4m9VPB.js +3192 -0
- package/dist/utils-RRmyeqLm.js +16 -0
- package/dist/utils.d.ts +2 -0
- package/dist/utils.js +4 -0
- package/dist/x-2_VzbDS9.js +48 -0
- package/package.json +186 -0
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { defineComponent, computed, openBlock, createBlock, unref, withCtx, createElementVNode, toDisplayString, createElementBlock, createCommentVNode, createVNode } from "vue";
|
|
2
|
+
import { _ as _sfc_main$1 } from "./Card.vue_vue_type_script_setup_true_lang-6ol3rxy1.js";
|
|
3
|
+
import { _ as _sfc_main$2 } from "./Slider.vue_vue_type_script_setup_true_lang-D-cAN-4Q.js";
|
|
4
|
+
const _hoisted_1 = { class: "flex items-center justify-between gap-3" };
|
|
5
|
+
const _hoisted_2 = { class: "space-y-2" };
|
|
6
|
+
const _hoisted_3 = { class: "text-sm font-medium" };
|
|
7
|
+
const _hoisted_4 = {
|
|
8
|
+
key: 0,
|
|
9
|
+
class: "text-xs text-muted-foreground"
|
|
10
|
+
};
|
|
11
|
+
const _hoisted_5 = { class: "rounded border border-border bg-background px-2 py-1 text-xs font-medium" };
|
|
12
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
13
|
+
__name: "SliderFormComponent",
|
|
14
|
+
props: {
|
|
15
|
+
id: { default: void 0 },
|
|
16
|
+
label: {},
|
|
17
|
+
description: { default: "" },
|
|
18
|
+
modelValue: {},
|
|
19
|
+
min: { default: 0 },
|
|
20
|
+
max: { default: 100 },
|
|
21
|
+
step: { default: 1 },
|
|
22
|
+
valueText: { default: "" }
|
|
23
|
+
},
|
|
24
|
+
emits: ["update:modelValue"],
|
|
25
|
+
setup(__props, { emit: __emit }) {
|
|
26
|
+
const props = __props;
|
|
27
|
+
const emits = __emit;
|
|
28
|
+
const sliderValue = computed(() => [props.modelValue]);
|
|
29
|
+
const resolvedValueText = computed(() => props.valueText || String(props.modelValue));
|
|
30
|
+
const handleUpdateModelValue = (value) => {
|
|
31
|
+
emits("update:modelValue", (value == null ? void 0 : value[0]) ?? props.min);
|
|
32
|
+
};
|
|
33
|
+
return (_ctx, _cache) => {
|
|
34
|
+
return openBlock(), createBlock(unref(_sfc_main$1), { class: "space-y-3 px-4 py-4" }, {
|
|
35
|
+
default: withCtx(() => [
|
|
36
|
+
createElementVNode("div", _hoisted_1, [
|
|
37
|
+
createElementVNode("div", _hoisted_2, [
|
|
38
|
+
createElementVNode("div", _hoisted_3, toDisplayString(props.label), 1),
|
|
39
|
+
props.description ? (openBlock(), createElementBlock("div", _hoisted_4, toDisplayString(props.description), 1)) : createCommentVNode("", true)
|
|
40
|
+
]),
|
|
41
|
+
createElementVNode("span", _hoisted_5, toDisplayString(resolvedValueText.value), 1)
|
|
42
|
+
]),
|
|
43
|
+
createVNode(unref(_sfc_main$2), {
|
|
44
|
+
id: props.id,
|
|
45
|
+
"model-value": sliderValue.value,
|
|
46
|
+
min: props.min,
|
|
47
|
+
max: props.max,
|
|
48
|
+
step: props.step,
|
|
49
|
+
"onUpdate:modelValue": handleUpdateModelValue
|
|
50
|
+
}, null, 8, ["id", "model-value", "min", "max", "step"])
|
|
51
|
+
]),
|
|
52
|
+
_: 1
|
|
53
|
+
});
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
export {
|
|
58
|
+
_sfc_main as _
|
|
59
|
+
};
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
import { defineComponent, toRefs, computed, openBlock, createBlock, unref, mergeProps, withKeys, withModifiers, withCtx, renderSlot, createCommentVNode, createVNode, normalizeClass, normalizeProps, guardReactiveProps } from "vue";
|
|
2
|
+
import { c as createContext, u as useForwardPropsEmits } from "./useForwardPropsEmits-DmumnZO5.js";
|
|
3
|
+
import { u as useFormControl } from "./useFormControl-7ytzz-r7.js";
|
|
4
|
+
import { u as useForwardExpose } from "./useForwardExpose-CNVHwdF2.js";
|
|
5
|
+
import { P as Primitive } from "./Primitive-D3IcFg81.js";
|
|
6
|
+
import { V as VisuallyHiddenInput_default } from "./VisuallyHiddenInput-DLAsRwUw.js";
|
|
7
|
+
import { u as useVModel } from "./index-C1_fxYhb.js";
|
|
8
|
+
import { c as cn } from "./utils-Bz4m9VPB.js";
|
|
9
|
+
import { r as reactiveOmit } from "./index-Dfi5ESP2.js";
|
|
10
|
+
const [injectSwitchRootContext, provideSwitchRootContext] = createContext("SwitchRoot");
|
|
11
|
+
var SwitchRoot_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
12
|
+
__name: "SwitchRoot",
|
|
13
|
+
props: {
|
|
14
|
+
defaultValue: {
|
|
15
|
+
type: null,
|
|
16
|
+
required: false
|
|
17
|
+
},
|
|
18
|
+
modelValue: {
|
|
19
|
+
type: null,
|
|
20
|
+
required: false,
|
|
21
|
+
default: void 0
|
|
22
|
+
},
|
|
23
|
+
disabled: {
|
|
24
|
+
type: Boolean,
|
|
25
|
+
required: false
|
|
26
|
+
},
|
|
27
|
+
id: {
|
|
28
|
+
type: String,
|
|
29
|
+
required: false
|
|
30
|
+
},
|
|
31
|
+
value: {
|
|
32
|
+
type: String,
|
|
33
|
+
required: false,
|
|
34
|
+
default: "on"
|
|
35
|
+
},
|
|
36
|
+
trueValue: {
|
|
37
|
+
type: null,
|
|
38
|
+
required: false,
|
|
39
|
+
default: () => true
|
|
40
|
+
},
|
|
41
|
+
falseValue: {
|
|
42
|
+
type: null,
|
|
43
|
+
required: false,
|
|
44
|
+
default: () => false
|
|
45
|
+
},
|
|
46
|
+
asChild: {
|
|
47
|
+
type: Boolean,
|
|
48
|
+
required: false
|
|
49
|
+
},
|
|
50
|
+
as: {
|
|
51
|
+
type: null,
|
|
52
|
+
required: false,
|
|
53
|
+
default: "button"
|
|
54
|
+
},
|
|
55
|
+
name: {
|
|
56
|
+
type: String,
|
|
57
|
+
required: false
|
|
58
|
+
},
|
|
59
|
+
required: {
|
|
60
|
+
type: Boolean,
|
|
61
|
+
required: false
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
emits: ["update:modelValue"],
|
|
65
|
+
setup(__props, { emit: __emit }) {
|
|
66
|
+
const props = __props;
|
|
67
|
+
const emit = __emit;
|
|
68
|
+
const { disabled } = toRefs(props);
|
|
69
|
+
const modelValue = useVModel(props, "modelValue", emit, {
|
|
70
|
+
defaultValue: props.defaultValue ?? props.falseValue,
|
|
71
|
+
passive: props.modelValue === void 0
|
|
72
|
+
});
|
|
73
|
+
const checked = computed(() => modelValue.value === props.trueValue);
|
|
74
|
+
function toggleCheck() {
|
|
75
|
+
if (disabled.value) return;
|
|
76
|
+
modelValue.value = checked.value ? props.falseValue : props.trueValue;
|
|
77
|
+
}
|
|
78
|
+
const { forwardRef, currentElement } = useForwardExpose();
|
|
79
|
+
const isFormControl = useFormControl(currentElement);
|
|
80
|
+
const ariaLabel = computed(() => {
|
|
81
|
+
var _a;
|
|
82
|
+
return props.id && currentElement.value ? (_a = document.querySelector(`[for="${props.id}"]`)) == null ? void 0 : _a.innerText : void 0;
|
|
83
|
+
});
|
|
84
|
+
provideSwitchRootContext({
|
|
85
|
+
checked,
|
|
86
|
+
toggleCheck,
|
|
87
|
+
disabled
|
|
88
|
+
});
|
|
89
|
+
return (_ctx, _cache) => {
|
|
90
|
+
return openBlock(), createBlock(unref(Primitive), mergeProps(_ctx.$attrs, {
|
|
91
|
+
id: _ctx.id,
|
|
92
|
+
ref: unref(forwardRef),
|
|
93
|
+
role: "switch",
|
|
94
|
+
type: _ctx.as === "button" ? "button" : void 0,
|
|
95
|
+
value: _ctx.value,
|
|
96
|
+
"aria-label": _ctx.$attrs["aria-label"] || ariaLabel.value,
|
|
97
|
+
"aria-checked": checked.value,
|
|
98
|
+
"aria-required": _ctx.required,
|
|
99
|
+
"data-state": checked.value ? "checked" : "unchecked",
|
|
100
|
+
"data-disabled": unref(disabled) ? "" : void 0,
|
|
101
|
+
"as-child": _ctx.asChild,
|
|
102
|
+
as: _ctx.as,
|
|
103
|
+
disabled: unref(disabled),
|
|
104
|
+
onClick: toggleCheck,
|
|
105
|
+
onKeydown: withKeys(withModifiers(toggleCheck, ["prevent"]), ["enter"])
|
|
106
|
+
}), {
|
|
107
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default", {
|
|
108
|
+
modelValue: unref(modelValue),
|
|
109
|
+
checked: checked.value
|
|
110
|
+
}), unref(isFormControl) && _ctx.name ? (openBlock(), createBlock(unref(VisuallyHiddenInput_default), {
|
|
111
|
+
key: 0,
|
|
112
|
+
type: "checkbox",
|
|
113
|
+
name: _ctx.name,
|
|
114
|
+
disabled: unref(disabled),
|
|
115
|
+
required: _ctx.required,
|
|
116
|
+
value: _ctx.value,
|
|
117
|
+
checked: checked.value
|
|
118
|
+
}, null, 8, [
|
|
119
|
+
"name",
|
|
120
|
+
"disabled",
|
|
121
|
+
"required",
|
|
122
|
+
"value",
|
|
123
|
+
"checked"
|
|
124
|
+
])) : createCommentVNode("v-if", true)]),
|
|
125
|
+
_: 3
|
|
126
|
+
}, 16, [
|
|
127
|
+
"id",
|
|
128
|
+
"type",
|
|
129
|
+
"value",
|
|
130
|
+
"aria-label",
|
|
131
|
+
"aria-checked",
|
|
132
|
+
"aria-required",
|
|
133
|
+
"data-state",
|
|
134
|
+
"data-disabled",
|
|
135
|
+
"as-child",
|
|
136
|
+
"as",
|
|
137
|
+
"disabled",
|
|
138
|
+
"onKeydown"
|
|
139
|
+
]);
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
var SwitchRoot_default = SwitchRoot_vue_vue_type_script_setup_true_lang_default;
|
|
144
|
+
var SwitchThumb_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
145
|
+
__name: "SwitchThumb",
|
|
146
|
+
props: {
|
|
147
|
+
asChild: {
|
|
148
|
+
type: Boolean,
|
|
149
|
+
required: false
|
|
150
|
+
},
|
|
151
|
+
as: {
|
|
152
|
+
type: null,
|
|
153
|
+
required: false,
|
|
154
|
+
default: "span"
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
setup(__props) {
|
|
158
|
+
const rootContext = injectSwitchRootContext();
|
|
159
|
+
useForwardExpose();
|
|
160
|
+
return (_ctx, _cache) => {
|
|
161
|
+
return openBlock(), createBlock(unref(Primitive), {
|
|
162
|
+
"data-state": unref(rootContext).checked.value ? "checked" : "unchecked",
|
|
163
|
+
"data-disabled": unref(rootContext).disabled.value ? "" : void 0,
|
|
164
|
+
"as-child": _ctx.asChild,
|
|
165
|
+
as: _ctx.as
|
|
166
|
+
}, {
|
|
167
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
168
|
+
_: 3
|
|
169
|
+
}, 8, [
|
|
170
|
+
"data-state",
|
|
171
|
+
"data-disabled",
|
|
172
|
+
"as-child",
|
|
173
|
+
"as"
|
|
174
|
+
]);
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
});
|
|
178
|
+
var SwitchThumb_default = SwitchThumb_vue_vue_type_script_setup_true_lang_default;
|
|
179
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
180
|
+
__name: "Switch",
|
|
181
|
+
props: {
|
|
182
|
+
defaultValue: {},
|
|
183
|
+
modelValue: {},
|
|
184
|
+
disabled: { type: Boolean },
|
|
185
|
+
id: {},
|
|
186
|
+
value: {},
|
|
187
|
+
trueValue: {},
|
|
188
|
+
falseValue: {},
|
|
189
|
+
asChild: { type: Boolean },
|
|
190
|
+
as: {},
|
|
191
|
+
name: {},
|
|
192
|
+
required: { type: Boolean },
|
|
193
|
+
class: {}
|
|
194
|
+
},
|
|
195
|
+
emits: ["update:modelValue"],
|
|
196
|
+
setup(__props, { emit: __emit }) {
|
|
197
|
+
const props = __props;
|
|
198
|
+
const emits = __emit;
|
|
199
|
+
const delegatedProps = reactiveOmit(props, "class");
|
|
200
|
+
const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
|
201
|
+
return (_ctx, _cache) => {
|
|
202
|
+
return openBlock(), createBlock(unref(SwitchRoot_default), mergeProps({ "data-slot": "switch" }, unref(forwarded), {
|
|
203
|
+
class: unref(cn)(
|
|
204
|
+
"peer relative inline-flex h-7 w-12 shrink-0 cursor-pointer items-center rounded border border-(--border-light) bg-(--button-secondary-light) transition-all duration-200 outline-none focus-visible:border-(--border-hover-light) focus-visible:ring-0 disabled:cursor-not-allowed disabled:opacity-60 data-[state=checked]:border-(--button-primary-light) data-[state=checked]:bg-(--bg-selected-light) dark:border-(--border-dark) dark:bg-(--button-secondary-dark) dark:focus-visible:border-(--border-hover-dark) dark:data-[state=checked]:border-(--button-primary-dark) dark:data-[state=checked]:bg-(--bg-selected-dark)",
|
|
205
|
+
props.class
|
|
206
|
+
)
|
|
207
|
+
}), {
|
|
208
|
+
default: withCtx((slotProps) => [
|
|
209
|
+
createVNode(unref(SwitchThumb_default), {
|
|
210
|
+
"data-slot": "switch-thumb",
|
|
211
|
+
class: normalizeClass(unref(cn)("pointer-events-none absolute left-[4px] top-1/2 block h-4 w-4 -translate-y-1/2 rounded-[0.2rem] bg-(--text-secondary-light) ring-0 transition-all duration-200 data-[state=checked]:translate-x-6 data-[state=checked]:bg-(--button-primary-light) dark:bg-(--text-secondary-dark) dark:data-[state=checked]:bg-(--button-primary-dark)"))
|
|
212
|
+
}, {
|
|
213
|
+
default: withCtx(() => [
|
|
214
|
+
renderSlot(_ctx.$slots, "thumb", normalizeProps(guardReactiveProps(slotProps)))
|
|
215
|
+
]),
|
|
216
|
+
_: 2
|
|
217
|
+
}, 1032, ["class"])
|
|
218
|
+
]),
|
|
219
|
+
_: 3
|
|
220
|
+
}, 16, ["class"]);
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
});
|
|
224
|
+
export {
|
|
225
|
+
_sfc_main as _
|
|
226
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { defineComponent, openBlock, createBlock, unref, withCtx, createElementVNode, toDisplayString, createVNode } from "vue";
|
|
2
|
+
import { _ as _sfc_main$1 } from "./Card.vue_vue_type_script_setup_true_lang-6ol3rxy1.js";
|
|
3
|
+
import { _ as _sfc_main$2 } from "./Switch.vue_vue_type_script_setup_true_lang-BWKCycMm.js";
|
|
4
|
+
const _hoisted_1 = { class: "space-y-2" };
|
|
5
|
+
const _hoisted_2 = { class: "text-sm font-medium" };
|
|
6
|
+
const _hoisted_3 = { class: "text-xs text-muted-foreground" };
|
|
7
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
8
|
+
__name: "SwitchFormComponent",
|
|
9
|
+
props: {
|
|
10
|
+
id: {},
|
|
11
|
+
label: {},
|
|
12
|
+
description: {},
|
|
13
|
+
modelValue: { type: Boolean }
|
|
14
|
+
},
|
|
15
|
+
emits: ["update:modelValue"],
|
|
16
|
+
setup(__props, { emit: __emit }) {
|
|
17
|
+
const props = __props;
|
|
18
|
+
const emits = __emit;
|
|
19
|
+
return (_ctx, _cache) => {
|
|
20
|
+
return openBlock(), createBlock(unref(_sfc_main$1), { class: "flex flex-row items-center justify-between gap-4 px-4 py-3" }, {
|
|
21
|
+
default: withCtx(() => [
|
|
22
|
+
createElementVNode("div", _hoisted_1, [
|
|
23
|
+
createElementVNode("div", _hoisted_2, toDisplayString(props.label), 1),
|
|
24
|
+
createElementVNode("div", _hoisted_3, toDisplayString(props.description), 1)
|
|
25
|
+
]),
|
|
26
|
+
createVNode(unref(_sfc_main$2), {
|
|
27
|
+
id: props.id,
|
|
28
|
+
"model-value": props.modelValue,
|
|
29
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => emits("update:modelValue", $event))
|
|
30
|
+
}, null, 8, ["id", "model-value"])
|
|
31
|
+
]),
|
|
32
|
+
_: 1
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
export {
|
|
38
|
+
_sfc_main as _
|
|
39
|
+
};
|