@soave/ui 0.3.2 → 0.5.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/adapters/css-variables.d.ts +2 -1
- package/dist/adapters/css-variables.d.ts.map +1 -0
- package/dist/adapters/headless.d.ts +2 -1
- package/dist/adapters/headless.d.ts.map +1 -0
- package/dist/adapters/index.d.ts +6 -5
- package/dist/adapters/index.d.ts.map +1 -0
- package/dist/adapters/tailwind.d.ts +2 -1
- package/dist/adapters/tailwind.d.ts.map +1 -0
- package/dist/adapters/types.d.ts +2 -1
- package/dist/adapters/types.d.ts.map +1 -0
- package/dist/adapters.d.ts +2 -0
- package/dist/{adapters/css-variables.mjs → adapters.mjs} +33 -2
- package/dist/adapters.mjs.map +1 -0
- package/dist/components/Alert.vue.d.ts +23 -0
- package/dist/components/Alert.vue.d.ts.map +1 -0
- package/dist/components/AlertDescription.vue.d.ts +18 -0
- package/dist/components/AlertDescription.vue.d.ts.map +1 -0
- package/dist/components/AlertTitle.vue.d.ts +18 -0
- package/dist/components/AlertTitle.vue.d.ts.map +1 -0
- package/dist/components/Button.vue.d.ts +35 -0
- package/dist/components/Button.vue.d.ts.map +1 -0
- package/dist/components/Card.vue.d.ts +29 -0
- package/dist/components/Card.vue.d.ts.map +1 -0
- package/dist/components/CardContent.vue.d.ts +18 -0
- package/dist/components/CardContent.vue.d.ts.map +1 -0
- package/dist/components/CardDescription.vue.d.ts +18 -0
- package/dist/components/CardDescription.vue.d.ts.map +1 -0
- package/dist/components/CardFooter.vue.d.ts +18 -0
- package/dist/components/CardFooter.vue.d.ts.map +1 -0
- package/dist/components/CardHeader.vue.d.ts +18 -0
- package/dist/components/CardHeader.vue.d.ts.map +1 -0
- package/dist/components/CardTitle.vue.d.ts +18 -0
- package/dist/components/CardTitle.vue.d.ts.map +1 -0
- package/dist/components/Checkbox.vue.d.ts +39 -0
- package/dist/components/Checkbox.vue.d.ts.map +1 -0
- package/dist/components/Dialog.vue.d.ts +46 -0
- package/dist/components/Dialog.vue.d.ts.map +1 -0
- package/dist/components/DialogContent.vue.d.ts +24 -0
- package/dist/components/DialogContent.vue.d.ts.map +1 -0
- package/dist/components/DialogDescription.vue.d.ts +21 -0
- package/dist/components/DialogDescription.vue.d.ts.map +1 -0
- package/dist/components/DialogFooter.vue.d.ts +18 -0
- package/dist/components/DialogFooter.vue.d.ts.map +1 -0
- package/dist/components/DialogHeader.vue.d.ts +18 -0
- package/dist/components/DialogHeader.vue.d.ts.map +1 -0
- package/dist/components/DialogOverlay.vue.d.ts +7 -0
- package/dist/components/DialogOverlay.vue.d.ts.map +1 -0
- package/dist/components/DialogTitle.vue.d.ts +21 -0
- package/dist/components/DialogTitle.vue.d.ts.map +1 -0
- package/dist/components/DialogTrigger.vue.d.ts +20 -0
- package/dist/components/DialogTrigger.vue.d.ts.map +1 -0
- package/dist/components/DropdownMenu.vue.d.ts +33 -0
- package/dist/components/DropdownMenu.vue.d.ts.map +1 -0
- package/dist/components/DropdownMenuContent.vue.d.ts +25 -0
- package/dist/components/DropdownMenuContent.vue.d.ts.map +1 -0
- package/dist/components/DropdownMenuItem.vue.d.ts +29 -0
- package/dist/components/DropdownMenuItem.vue.d.ts.map +1 -0
- package/dist/components/DropdownMenuLabel.vue.d.ts +18 -0
- package/dist/components/DropdownMenuLabel.vue.d.ts.map +1 -0
- package/dist/components/DropdownMenuSeparator.vue.d.ts +3 -0
- package/dist/components/DropdownMenuSeparator.vue.d.ts.map +1 -0
- package/dist/components/DropdownMenuTrigger.vue.d.ts +24 -0
- package/dist/components/DropdownMenuTrigger.vue.d.ts.map +1 -0
- package/dist/components/FileInput.vue.d.ts +81 -0
- package/dist/components/FileInput.vue.d.ts.map +1 -0
- package/dist/components/FormError.vue.d.ts +21 -0
- package/dist/components/FormError.vue.d.ts.map +1 -0
- package/dist/components/FormField.vue.d.ts +26 -0
- package/dist/components/FormField.vue.d.ts.map +1 -0
- package/dist/components/FormInput.vue.d.ts +19 -0
- package/dist/components/FormInput.vue.d.ts.map +1 -0
- package/dist/components/FormLabel.vue.d.ts +21 -0
- package/dist/components/FormLabel.vue.d.ts.map +1 -0
- package/dist/components/FormTextarea.vue.d.ts +19 -0
- package/dist/components/FormTextarea.vue.d.ts.map +1 -0
- package/dist/components/Input.vue.d.ts +24 -0
- package/dist/components/Input.vue.d.ts.map +1 -0
- package/dist/components/Popover.vue.d.ts +38 -0
- package/dist/components/Popover.vue.d.ts.map +1 -0
- package/dist/components/PopoverContent.vue.d.ts +25 -0
- package/dist/components/PopoverContent.vue.d.ts.map +1 -0
- package/dist/components/PopoverTrigger.vue.d.ts +24 -0
- package/dist/components/PopoverTrigger.vue.d.ts.map +1 -0
- package/dist/components/RadioGroup.vue.d.ts +32 -0
- package/dist/components/RadioGroup.vue.d.ts.map +1 -0
- package/dist/components/RadioItem.vue.d.ts +40 -0
- package/dist/components/RadioItem.vue.d.ts.map +1 -0
- package/dist/components/Select.vue.d.ts +50 -0
- package/dist/components/Select.vue.d.ts.map +1 -0
- package/dist/components/SelectContent.vue.d.ts +25 -0
- package/dist/components/SelectContent.vue.d.ts.map +1 -0
- package/dist/components/SelectItem.vue.d.ts +36 -0
- package/dist/components/SelectItem.vue.d.ts.map +1 -0
- package/dist/components/SelectTrigger.vue.d.ts +36 -0
- package/dist/components/SelectTrigger.vue.d.ts.map +1 -0
- package/dist/components/SelectValue.vue.d.ts +24 -0
- package/dist/components/SelectValue.vue.d.ts.map +1 -0
- package/dist/components/Sheet.vue.d.ts +42 -0
- package/dist/components/Sheet.vue.d.ts.map +1 -0
- package/dist/components/SheetClose.vue.d.ts +20 -0
- package/dist/components/SheetClose.vue.d.ts.map +1 -0
- package/dist/components/SheetContent.vue.d.ts +18 -0
- package/dist/components/SheetContent.vue.d.ts.map +1 -0
- package/dist/components/SheetDescription.vue.d.ts +18 -0
- package/dist/components/SheetDescription.vue.d.ts.map +1 -0
- package/dist/components/SheetFooter.vue.d.ts +18 -0
- package/dist/components/SheetFooter.vue.d.ts.map +1 -0
- package/dist/components/SheetHeader.vue.d.ts +18 -0
- package/dist/components/SheetHeader.vue.d.ts.map +1 -0
- package/dist/components/SheetOverlay.vue.d.ts +3 -0
- package/dist/components/SheetOverlay.vue.d.ts.map +1 -0
- package/dist/components/SheetTitle.vue.d.ts +18 -0
- package/dist/components/SheetTitle.vue.d.ts.map +1 -0
- package/dist/components/SheetTrigger.vue.d.ts +20 -0
- package/dist/components/SheetTrigger.vue.d.ts.map +1 -0
- package/dist/components/Switch.vue.d.ts +46 -0
- package/dist/components/Switch.vue.d.ts.map +1 -0
- package/dist/components/Textarea.vue.d.ts +41 -0
- package/dist/components/Textarea.vue.d.ts.map +1 -0
- package/dist/components/Toast.vue.d.ts +35 -0
- package/dist/components/Toast.vue.d.ts.map +1 -0
- package/dist/components/ToastClose.vue.d.ts +22 -0
- package/dist/components/ToastClose.vue.d.ts.map +1 -0
- package/dist/components/ToastDescription.vue.d.ts +18 -0
- package/dist/components/ToastDescription.vue.d.ts.map +1 -0
- package/dist/components/ToastTitle.vue.d.ts +18 -0
- package/dist/components/ToastTitle.vue.d.ts.map +1 -0
- package/dist/components/Toaster.vue.d.ts +58 -0
- package/dist/components/Toaster.vue.d.ts.map +1 -0
- package/dist/components/Tooltip.vue.d.ts +34 -0
- package/dist/components/Tooltip.vue.d.ts.map +1 -0
- package/dist/components/TooltipContent.vue.d.ts +23 -0
- package/dist/components/TooltipContent.vue.d.ts.map +1 -0
- package/dist/components/TooltipTrigger.vue.d.ts +22 -0
- package/dist/components/TooltipTrigger.vue.d.ts.map +1 -0
- package/dist/components/index.d.ts +62 -13
- package/dist/components/index.d.ts.map +1 -0
- package/dist/composables/index.d.ts +18 -17
- package/dist/composables/index.d.ts.map +1 -0
- package/dist/composables/useButton.d.ts +3 -2
- package/dist/composables/useButton.d.ts.map +1 -0
- package/dist/composables/useCard.d.ts +3 -2
- package/dist/composables/useCard.d.ts.map +1 -0
- package/dist/composables/useCheckbox.d.ts +3 -2
- package/dist/composables/useCheckbox.d.ts.map +1 -0
- package/dist/composables/useDialog.d.ts +2 -1
- package/dist/composables/useDialog.d.ts.map +1 -0
- package/dist/composables/useDropdown.d.ts +3 -2
- package/dist/composables/useDropdown.d.ts.map +1 -0
- package/dist/composables/useFileInput.d.ts +3 -2
- package/dist/composables/useFileInput.d.ts.map +1 -0
- package/dist/composables/useForm.d.ts +3 -2
- package/dist/composables/useForm.d.ts.map +1 -0
- package/dist/composables/useInput.d.ts +3 -2
- package/dist/composables/useInput.d.ts.map +1 -0
- package/dist/composables/usePopover.d.ts +3 -2
- package/dist/composables/usePopover.d.ts.map +1 -0
- package/dist/composables/useRadio.d.ts +3 -2
- package/dist/composables/useRadio.d.ts.map +1 -0
- package/dist/composables/useSelect.d.ts +3 -2
- package/dist/composables/useSelect.d.ts.map +1 -0
- package/dist/composables/useSwitch.d.ts +3 -2
- package/dist/composables/useSwitch.d.ts.map +1 -0
- package/dist/composables/useTextarea.d.ts +3 -2
- package/dist/composables/useTextarea.d.ts.map +1 -0
- package/dist/composables/useTheme.d.ts +3 -2
- package/dist/composables/useTheme.d.ts.map +1 -0
- package/dist/composables/useToast.d.ts +2 -1
- package/dist/composables/useToast.d.ts.map +1 -0
- package/dist/composables/useTooltip.d.ts +3 -2
- package/dist/composables/useTooltip.d.ts.map +1 -0
- package/dist/composables/useUIConfig.d.ts +5 -4
- package/dist/composables/useUIConfig.d.ts.map +1 -0
- package/dist/composables.d.ts +2 -0
- package/dist/composables.mjs +30 -0
- package/dist/composables.mjs.map +1 -0
- package/dist/constants/errors.d.ts +1 -0
- package/dist/constants/errors.d.ts.map +1 -0
- package/dist/constants/index.d.ts +3 -2
- package/dist/constants/index.d.ts.map +1 -0
- package/dist/constants/logs.d.ts +1 -0
- package/dist/constants/logs.d.ts.map +1 -0
- package/dist/index.d.ts +7 -6
- package/dist/index.d.ts.map +1 -0
- package/dist/index.mjs +2109 -6
- package/dist/index.mjs.map +1 -0
- package/dist/{adapters/tailwind.mjs → tailwind-B-R7fPT1.js} +16 -7
- package/dist/tailwind-B-R7fPT1.js.map +1 -0
- package/dist/types/alert.d.ts +2 -1
- package/dist/types/alert.d.ts.map +1 -0
- package/dist/types/button.d.ts +2 -1
- package/dist/types/button.d.ts.map +1 -0
- package/dist/types/card.d.ts +2 -1
- package/dist/types/card.d.ts.map +1 -0
- package/dist/types/checkbox.d.ts +2 -1
- package/dist/types/checkbox.d.ts.map +1 -0
- package/dist/types/composables.d.ts +10 -1
- package/dist/types/composables.d.ts.map +1 -0
- package/dist/types/config.d.ts +6 -5
- package/dist/types/config.d.ts.map +1 -0
- package/dist/types/dialog.d.ts +2 -1
- package/dist/types/dialog.d.ts.map +1 -0
- package/dist/types/dropdown.d.ts +3 -2
- package/dist/types/dropdown.d.ts.map +1 -0
- package/dist/types/file-input.d.ts +2 -1
- package/dist/types/file-input.d.ts.map +1 -0
- package/dist/types/form.d.ts +2 -1
- package/dist/types/form.d.ts.map +1 -0
- package/dist/types/index.d.ts +22 -21
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/input.d.ts +2 -1
- package/dist/types/input.d.ts.map +1 -0
- package/dist/types/popover.d.ts +3 -2
- package/dist/types/popover.d.ts.map +1 -0
- package/dist/types/radio.d.ts +2 -1
- package/dist/types/radio.d.ts.map +1 -0
- package/dist/types/select.d.ts +2 -1
- package/dist/types/select.d.ts.map +1 -0
- package/dist/types/sheet.d.ts +2 -1
- package/dist/types/sheet.d.ts.map +1 -0
- package/dist/types/switch.d.ts +2 -1
- package/dist/types/switch.d.ts.map +1 -0
- package/dist/types/textarea.d.ts +2 -1
- package/dist/types/textarea.d.ts.map +1 -0
- package/dist/types/theme.d.ts +1 -0
- package/dist/types/theme.d.ts.map +1 -0
- package/dist/types/toast.d.ts +1 -0
- package/dist/types/toast.d.ts.map +1 -0
- package/dist/types/tooltip.d.ts +3 -2
- package/dist/types/tooltip.d.ts.map +1 -0
- package/dist/types/utils.d.ts +1 -0
- package/dist/types/utils.d.ts.map +1 -0
- package/dist/useTheme-C2uPqAtQ.js +1175 -0
- package/dist/useTheme-C2uPqAtQ.js.map +1 -0
- package/dist/utils/cn.d.ts +2 -1
- package/dist/utils/cn.d.ts.map +1 -0
- package/dist/utils/deepMerge.d.ts +2 -1
- package/dist/utils/deepMerge.d.ts.map +1 -0
- package/dist/utils/index.d.ts +3 -2
- package/dist/utils/index.d.ts.map +1 -0
- package/package.json +6 -4
- package/dist/adapters/headless.mjs +0 -7
- package/dist/adapters/index.mjs +0 -11
- package/dist/adapters/types.mjs +0 -10
- package/dist/build.config.d.ts +0 -2
- package/dist/build.config.mjs +0 -14
- package/dist/components/Button.vue +0 -41
- package/dist/components/Card.vue +0 -24
- package/dist/components/Checkbox.vue +0 -47
- package/dist/components/Dialog.vue +0 -105
- package/dist/components/Input.vue +0 -48
- package/dist/components/RadioGroup.vue +0 -45
- package/dist/components/RadioItem.vue +0 -65
- package/dist/components/Select.vue +0 -114
- package/dist/components/SelectContent.vue +0 -54
- package/dist/components/SelectItem.vue +0 -61
- package/dist/components/SelectTrigger.vue +0 -75
- package/dist/components/Switch.vue +0 -45
- package/dist/components/Textarea.vue +0 -55
- package/dist/components/index.mjs +0 -13
- package/dist/composables/index.mjs +0 -17
- package/dist/composables/useButton.mjs +0 -22
- package/dist/composables/useCard.mjs +0 -11
- package/dist/composables/useCheckbox.mjs +0 -18
- package/dist/composables/useDialog.mjs +0 -19
- package/dist/composables/useDropdown.mjs +0 -170
- package/dist/composables/useFileInput.mjs +0 -137
- package/dist/composables/useForm.mjs +0 -159
- package/dist/composables/useInput.mjs +0 -31
- package/dist/composables/usePopover.mjs +0 -113
- package/dist/composables/useRadio.mjs +0 -23
- package/dist/composables/useSelect.mjs +0 -42
- package/dist/composables/useSwitch.mjs +0 -17
- package/dist/composables/useTextarea.mjs +0 -29
- package/dist/composables/useTheme.mjs +0 -89
- package/dist/composables/useToast.mjs +0 -64
- package/dist/composables/useTooltip.mjs +0 -125
- package/dist/composables/useUIConfig.mjs +0 -53
- package/dist/constants/errors.mjs +0 -18
- package/dist/constants/index.mjs +0 -2
- package/dist/constants/logs.mjs +0 -17
- package/dist/env.d.ts +0 -11
- package/dist/styles/css-variables.css +0 -1
- package/dist/styles/index.d.ts +0 -1
- package/dist/styles/index.mjs +0 -1
- package/dist/types/alert.mjs +0 -0
- package/dist/types/button.mjs +0 -0
- package/dist/types/card.mjs +0 -0
- package/dist/types/checkbox.mjs +0 -0
- package/dist/types/composables.mjs +0 -0
- package/dist/types/config.mjs +0 -15
- package/dist/types/dialog.mjs +0 -1
- package/dist/types/dropdown.mjs +0 -1
- package/dist/types/file-input.mjs +0 -0
- package/dist/types/form.mjs +0 -0
- package/dist/types/index.mjs +0 -21
- package/dist/types/input.mjs +0 -0
- package/dist/types/popover.mjs +0 -1
- package/dist/types/radio.mjs +0 -1
- package/dist/types/select.mjs +0 -1
- package/dist/types/sheet.mjs +0 -1
- package/dist/types/switch.mjs +0 -0
- package/dist/types/textarea.mjs +0 -0
- package/dist/types/theme.mjs +0 -42
- package/dist/types/toast.mjs +0 -0
- package/dist/types/tooltip.mjs +0 -1
- package/dist/types/utils.mjs +0 -0
- package/dist/utils/cn.mjs +0 -5
- package/dist/utils/deepMerge.mjs +0 -18
- package/dist/utils/index.mjs +0 -2
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,2109 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { u as useButton, a as useInput, m as useTextarea, b as useCard, j as useCheckbox, l as useSwitch, c as useDialog, n as useSelectTrigger, o as useSelectContent, p as useSelectItem, k as useRadioItem } from "./useTheme-C2uPqAtQ.js";
|
|
2
|
+
import { C, D, A, F, I, R, S, i, U, z, y, t, w, q, d, v, h, x, r, s, f, g, e } from "./useTheme-C2uPqAtQ.js";
|
|
3
|
+
import { defineComponent, toRef, createElementBlock, openBlock, mergeProps, unref, renderSlot, mergeModels, useModel, computed, withKeys, withModifiers, createElementVNode, ref, watch, provide, onMounted, onUnmounted, createBlock, Teleport, createCommentVNode, inject, createTextVNode, toDisplayString } from "vue";
|
|
4
|
+
import { c, t as t2 } from "./tailwind-B-R7fPT1.js";
|
|
5
|
+
import { ADAPTER_REGISTRY, cssVariablesAdapter, getAdapter, getRegisteredAdapters, headlessAdapter, registerAdapter } from "./adapters.mjs";
|
|
6
|
+
const FORM_LOGS = {
|
|
7
|
+
FIELD_VALIDATED: (field) => `フィールド "${field}" のバリデーションが完了しました`,
|
|
8
|
+
FORM_SUBMITTED: "フォームが送信されました",
|
|
9
|
+
FORM_RESET: "フォームがリセットされました",
|
|
10
|
+
VALIDATION_STARTED: "バリデーションを開始します"
|
|
11
|
+
};
|
|
12
|
+
const COMPONENT_LOGS = {
|
|
13
|
+
DIALOG_OPENED: "ダイアログが開かれました",
|
|
14
|
+
DIALOG_CLOSED: "ダイアログが閉じられました",
|
|
15
|
+
BUTTON_CLICKED: "ボタンがクリックされました",
|
|
16
|
+
INPUT_FOCUSED: "入力フィールドにフォーカスが当たりました",
|
|
17
|
+
INPUT_BLURRED: "入力フィールドからフォーカスが外れました"
|
|
18
|
+
};
|
|
19
|
+
const CONFIG_LOGS = {
|
|
20
|
+
PROVIDER_INITIALIZED: "UIProviderが初期化されました",
|
|
21
|
+
CONFIG_UPDATED: "UI設定が更新されました"
|
|
22
|
+
};
|
|
23
|
+
const _hoisted_1$t = ["disabled", "type"];
|
|
24
|
+
const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
25
|
+
__name: "Button",
|
|
26
|
+
props: {
|
|
27
|
+
variant: { default: "primary" },
|
|
28
|
+
size: { default: "md" },
|
|
29
|
+
disabled: { type: Boolean, default: false },
|
|
30
|
+
loading: { type: Boolean, default: false },
|
|
31
|
+
type: { default: "button" }
|
|
32
|
+
},
|
|
33
|
+
emits: ["click"],
|
|
34
|
+
setup(__props, { emit: __emit }) {
|
|
35
|
+
const props = __props;
|
|
36
|
+
const emit = __emit;
|
|
37
|
+
const composable = useButton(toRef(() => props));
|
|
38
|
+
const handleClick = (event) => {
|
|
39
|
+
if (!composable.state.value.disabled && !composable.state.value.loading) {
|
|
40
|
+
emit("click", event);
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
return (_ctx, _cache) => {
|
|
44
|
+
return openBlock(), createElementBlock("button", mergeProps({
|
|
45
|
+
disabled: unref(composable).state.value.disabled || unref(composable).state.value.loading,
|
|
46
|
+
type: unref(composable).state.value.type
|
|
47
|
+
}, unref(composable).aria_attributes.value, { onClick: handleClick }), [
|
|
48
|
+
renderSlot(_ctx.$slots, "default")
|
|
49
|
+
], 16, _hoisted_1$t);
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
const _hoisted_1$s = ["type", "value", "disabled", "readonly", "placeholder", "id"];
|
|
54
|
+
const _sfc_main$X = /* @__PURE__ */ defineComponent({
|
|
55
|
+
__name: "Input",
|
|
56
|
+
props: {
|
|
57
|
+
type: { default: "text" },
|
|
58
|
+
size: { default: "md" },
|
|
59
|
+
placeholder: {},
|
|
60
|
+
disabled: { type: Boolean, default: false },
|
|
61
|
+
readonly: { type: Boolean, default: false },
|
|
62
|
+
error: {},
|
|
63
|
+
error_id: {},
|
|
64
|
+
id: {},
|
|
65
|
+
modelValue: {}
|
|
66
|
+
},
|
|
67
|
+
emits: ["update:modelValue"],
|
|
68
|
+
setup(__props, { emit: __emit }) {
|
|
69
|
+
const props = __props;
|
|
70
|
+
const emit = __emit;
|
|
71
|
+
const composable = useInput(toRef(() => props));
|
|
72
|
+
const handleInput = (event) => {
|
|
73
|
+
const target = event.target;
|
|
74
|
+
emit("update:modelValue", target.value);
|
|
75
|
+
};
|
|
76
|
+
return (_ctx, _cache) => {
|
|
77
|
+
return openBlock(), createElementBlock("input", mergeProps({
|
|
78
|
+
type: unref(composable).state.value.type,
|
|
79
|
+
value: __props.modelValue,
|
|
80
|
+
disabled: unref(composable).state.value.disabled,
|
|
81
|
+
readonly: unref(composable).state.value.readonly,
|
|
82
|
+
placeholder: __props.placeholder,
|
|
83
|
+
id: __props.id
|
|
84
|
+
}, unref(composable).aria_attributes.value, {
|
|
85
|
+
onInput: handleInput,
|
|
86
|
+
onFocus: _cache[0] || (_cache[0] = //@ts-ignore
|
|
87
|
+
(...args) => unref(composable).handleFocus && unref(composable).handleFocus(...args)),
|
|
88
|
+
onBlur: _cache[1] || (_cache[1] = //@ts-ignore
|
|
89
|
+
(...args) => unref(composable).handleBlur && unref(composable).handleBlur(...args))
|
|
90
|
+
}), null, 16, _hoisted_1$s);
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
const _hoisted_1$r = ["value", "disabled", "readonly", "placeholder", "rows", "id"];
|
|
95
|
+
const _sfc_main$W = /* @__PURE__ */ defineComponent({
|
|
96
|
+
__name: "Textarea",
|
|
97
|
+
props: {
|
|
98
|
+
size: { default: "md" },
|
|
99
|
+
placeholder: {},
|
|
100
|
+
disabled: { type: Boolean, default: false },
|
|
101
|
+
readonly: { type: Boolean, default: false },
|
|
102
|
+
error: {},
|
|
103
|
+
error_id: {},
|
|
104
|
+
rows: { default: 3 },
|
|
105
|
+
resize: { default: "vertical" },
|
|
106
|
+
modelValue: {},
|
|
107
|
+
id: {}
|
|
108
|
+
},
|
|
109
|
+
emits: ["update:modelValue"],
|
|
110
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
111
|
+
const props = __props;
|
|
112
|
+
const emit = __emit;
|
|
113
|
+
const composable = useTextarea(toRef(() => props));
|
|
114
|
+
const handleInput = (event) => {
|
|
115
|
+
const target = event.target;
|
|
116
|
+
emit("update:modelValue", target.value);
|
|
117
|
+
};
|
|
118
|
+
__expose({
|
|
119
|
+
state: composable.state,
|
|
120
|
+
is_focused: composable.is_focused
|
|
121
|
+
});
|
|
122
|
+
return (_ctx, _cache) => {
|
|
123
|
+
return openBlock(), createElementBlock("textarea", mergeProps({
|
|
124
|
+
value: __props.modelValue,
|
|
125
|
+
disabled: unref(composable).state.value.disabled,
|
|
126
|
+
readonly: unref(composable).state.value.readonly,
|
|
127
|
+
placeholder: __props.placeholder,
|
|
128
|
+
rows: __props.rows,
|
|
129
|
+
id: __props.id
|
|
130
|
+
}, unref(composable).aria_attributes.value, {
|
|
131
|
+
onInput: handleInput,
|
|
132
|
+
onFocus: _cache[0] || (_cache[0] = //@ts-ignore
|
|
133
|
+
(...args) => unref(composable).handleFocus && unref(composable).handleFocus(...args)),
|
|
134
|
+
onBlur: _cache[1] || (_cache[1] = //@ts-ignore
|
|
135
|
+
(...args) => unref(composable).handleBlur && unref(composable).handleBlur(...args))
|
|
136
|
+
}), null, 16, _hoisted_1$r);
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
141
|
+
__name: "Card",
|
|
142
|
+
props: {
|
|
143
|
+
padding: { default: "md" }
|
|
144
|
+
},
|
|
145
|
+
setup(__props, { expose: __expose }) {
|
|
146
|
+
const props = __props;
|
|
147
|
+
const composable = useCard(toRef(() => props));
|
|
148
|
+
__expose({
|
|
149
|
+
state: composable.state
|
|
150
|
+
});
|
|
151
|
+
return (_ctx, _cache) => {
|
|
152
|
+
return openBlock(), createElementBlock("div", null, [
|
|
153
|
+
renderSlot(_ctx.$slots, "default")
|
|
154
|
+
]);
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
});
|
|
158
|
+
const _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
159
|
+
...{
|
|
160
|
+
name: "CardHeader"
|
|
161
|
+
},
|
|
162
|
+
__name: "CardHeader",
|
|
163
|
+
setup(__props) {
|
|
164
|
+
return (_ctx, _cache) => {
|
|
165
|
+
return openBlock(), createElementBlock("div", null, [
|
|
166
|
+
renderSlot(_ctx.$slots, "default")
|
|
167
|
+
]);
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
});
|
|
171
|
+
const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
172
|
+
...{
|
|
173
|
+
name: "CardTitle"
|
|
174
|
+
},
|
|
175
|
+
__name: "CardTitle",
|
|
176
|
+
setup(__props) {
|
|
177
|
+
return (_ctx, _cache) => {
|
|
178
|
+
return openBlock(), createElementBlock("h3", null, [
|
|
179
|
+
renderSlot(_ctx.$slots, "default")
|
|
180
|
+
]);
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
});
|
|
184
|
+
const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
185
|
+
...{
|
|
186
|
+
name: "CardDescription"
|
|
187
|
+
},
|
|
188
|
+
__name: "CardDescription",
|
|
189
|
+
setup(__props) {
|
|
190
|
+
return (_ctx, _cache) => {
|
|
191
|
+
return openBlock(), createElementBlock("p", null, [
|
|
192
|
+
renderSlot(_ctx.$slots, "default")
|
|
193
|
+
]);
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
});
|
|
197
|
+
const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
198
|
+
...{
|
|
199
|
+
name: "CardContent"
|
|
200
|
+
},
|
|
201
|
+
__name: "CardContent",
|
|
202
|
+
setup(__props) {
|
|
203
|
+
return (_ctx, _cache) => {
|
|
204
|
+
return openBlock(), createElementBlock("div", null, [
|
|
205
|
+
renderSlot(_ctx.$slots, "default")
|
|
206
|
+
]);
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
});
|
|
210
|
+
const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
211
|
+
...{
|
|
212
|
+
name: "CardFooter"
|
|
213
|
+
},
|
|
214
|
+
__name: "CardFooter",
|
|
215
|
+
setup(__props) {
|
|
216
|
+
return (_ctx, _cache) => {
|
|
217
|
+
return openBlock(), createElementBlock("div", null, [
|
|
218
|
+
renderSlot(_ctx.$slots, "default")
|
|
219
|
+
]);
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
});
|
|
223
|
+
const _hoisted_1$q = ["data-variant"];
|
|
224
|
+
const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
225
|
+
...{
|
|
226
|
+
name: "Alert"
|
|
227
|
+
},
|
|
228
|
+
__name: "Alert",
|
|
229
|
+
props: {
|
|
230
|
+
variant: { default: "default" }
|
|
231
|
+
},
|
|
232
|
+
setup(__props) {
|
|
233
|
+
return (_ctx, _cache) => {
|
|
234
|
+
return openBlock(), createElementBlock("div", {
|
|
235
|
+
role: "alert",
|
|
236
|
+
"data-variant": __props.variant
|
|
237
|
+
}, [
|
|
238
|
+
renderSlot(_ctx.$slots, "default")
|
|
239
|
+
], 8, _hoisted_1$q);
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
});
|
|
243
|
+
const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
244
|
+
...{
|
|
245
|
+
name: "AlertTitle"
|
|
246
|
+
},
|
|
247
|
+
__name: "AlertTitle",
|
|
248
|
+
setup(__props) {
|
|
249
|
+
return (_ctx, _cache) => {
|
|
250
|
+
return openBlock(), createElementBlock("h5", null, [
|
|
251
|
+
renderSlot(_ctx.$slots, "default")
|
|
252
|
+
]);
|
|
253
|
+
};
|
|
254
|
+
}
|
|
255
|
+
});
|
|
256
|
+
const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
257
|
+
...{
|
|
258
|
+
name: "AlertDescription"
|
|
259
|
+
},
|
|
260
|
+
__name: "AlertDescription",
|
|
261
|
+
setup(__props) {
|
|
262
|
+
return (_ctx, _cache) => {
|
|
263
|
+
return openBlock(), createElementBlock("div", null, [
|
|
264
|
+
renderSlot(_ctx.$slots, "default")
|
|
265
|
+
]);
|
|
266
|
+
};
|
|
267
|
+
}
|
|
268
|
+
});
|
|
269
|
+
const _hoisted_1$p = ["disabled", "data-state", "onKeydown"];
|
|
270
|
+
const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
271
|
+
__name: "Checkbox",
|
|
272
|
+
props: /* @__PURE__ */ mergeModels({
|
|
273
|
+
size: { default: "md" },
|
|
274
|
+
disabled: { type: Boolean, default: false },
|
|
275
|
+
indeterminate: { type: Boolean, default: false }
|
|
276
|
+
}, {
|
|
277
|
+
"modelValue": { type: Boolean, ...{ default: false } },
|
|
278
|
+
"modelModifiers": {}
|
|
279
|
+
}),
|
|
280
|
+
emits: /* @__PURE__ */ mergeModels(["change"], ["update:modelValue"]),
|
|
281
|
+
setup(__props, { emit: __emit }) {
|
|
282
|
+
const props = __props;
|
|
283
|
+
const model = useModel(__props, "modelValue");
|
|
284
|
+
const emit = __emit;
|
|
285
|
+
const composable = useCheckbox(toRef(() => props), model);
|
|
286
|
+
const dataState = computed(() => {
|
|
287
|
+
if (composable.state.value.indeterminate) return "indeterminate";
|
|
288
|
+
return model.value ? "checked" : "unchecked";
|
|
289
|
+
});
|
|
290
|
+
const handleClick = () => {
|
|
291
|
+
if (!composable.state.value.disabled) {
|
|
292
|
+
model.value = !model.value;
|
|
293
|
+
emit("change", model.value);
|
|
294
|
+
}
|
|
295
|
+
};
|
|
296
|
+
return (_ctx, _cache) => {
|
|
297
|
+
return openBlock(), createElementBlock("button", mergeProps({
|
|
298
|
+
type: "button",
|
|
299
|
+
disabled: unref(composable).state.value.disabled,
|
|
300
|
+
"data-state": dataState.value
|
|
301
|
+
}, unref(composable).aria_attributes.value, {
|
|
302
|
+
onClick: handleClick,
|
|
303
|
+
onKeydown: withKeys(withModifiers(handleClick, ["prevent"]), ["space"])
|
|
304
|
+
}), [
|
|
305
|
+
renderSlot(_ctx.$slots, "default", {
|
|
306
|
+
checked: model.value,
|
|
307
|
+
indeterminate: unref(composable).state.value.indeterminate
|
|
308
|
+
})
|
|
309
|
+
], 16, _hoisted_1$p);
|
|
310
|
+
};
|
|
311
|
+
}
|
|
312
|
+
});
|
|
313
|
+
const _hoisted_1$o = ["disabled", "data-state"];
|
|
314
|
+
const _hoisted_2$1 = ["data-state"];
|
|
315
|
+
const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
316
|
+
__name: "Switch",
|
|
317
|
+
props: /* @__PURE__ */ mergeModels({
|
|
318
|
+
size: { default: "md" },
|
|
319
|
+
disabled: { type: Boolean, default: false }
|
|
320
|
+
}, {
|
|
321
|
+
"modelValue": { type: Boolean, ...{ default: false } },
|
|
322
|
+
"modelModifiers": {}
|
|
323
|
+
}),
|
|
324
|
+
emits: /* @__PURE__ */ mergeModels(["change"], ["update:modelValue"]),
|
|
325
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
326
|
+
const props = __props;
|
|
327
|
+
const model = useModel(__props, "modelValue");
|
|
328
|
+
const emit = __emit;
|
|
329
|
+
const composable = useSwitch(toRef(() => props), model);
|
|
330
|
+
const handleClick = () => {
|
|
331
|
+
if (!composable.state.value.disabled) {
|
|
332
|
+
model.value = !model.value;
|
|
333
|
+
emit("change", model.value);
|
|
334
|
+
}
|
|
335
|
+
};
|
|
336
|
+
__expose({
|
|
337
|
+
state: composable.state
|
|
338
|
+
});
|
|
339
|
+
return (_ctx, _cache) => {
|
|
340
|
+
return openBlock(), createElementBlock("button", mergeProps({
|
|
341
|
+
type: "button",
|
|
342
|
+
disabled: unref(composable).state.value.disabled,
|
|
343
|
+
"data-state": model.value ? "checked" : "unchecked"
|
|
344
|
+
}, unref(composable).aria_attributes.value, { onClick: handleClick }), [
|
|
345
|
+
renderSlot(_ctx.$slots, "default", { checked: model.value }, () => [
|
|
346
|
+
createElementVNode("span", {
|
|
347
|
+
"data-state": model.value ? "checked" : "unchecked"
|
|
348
|
+
}, null, 8, _hoisted_2$1)
|
|
349
|
+
])
|
|
350
|
+
], 16, _hoisted_1$o);
|
|
351
|
+
};
|
|
352
|
+
}
|
|
353
|
+
});
|
|
354
|
+
const _hoisted_1$n = ["aria-labelledby", "aria-describedby"];
|
|
355
|
+
const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
356
|
+
__name: "Dialog",
|
|
357
|
+
props: /* @__PURE__ */ mergeModels({
|
|
358
|
+
closeOnOverlay: { type: Boolean, default: true },
|
|
359
|
+
closeOnEscape: { type: Boolean, default: true },
|
|
360
|
+
titleId: {},
|
|
361
|
+
descriptionId: {}
|
|
362
|
+
}, {
|
|
363
|
+
"open": { type: Boolean, ...{ default: false } },
|
|
364
|
+
"openModifiers": {}
|
|
365
|
+
}),
|
|
366
|
+
emits: ["update:open"],
|
|
367
|
+
setup(__props, { expose: __expose }) {
|
|
368
|
+
const DIALOG_KEY2 = Symbol("dialog");
|
|
369
|
+
const props = __props;
|
|
370
|
+
const model = useModel(__props, "open");
|
|
371
|
+
const content_ref = ref(null);
|
|
372
|
+
const dialog = useDialog();
|
|
373
|
+
const { is_open, open, close, toggle } = dialog;
|
|
374
|
+
watch(model, (value) => {
|
|
375
|
+
if (value) {
|
|
376
|
+
open();
|
|
377
|
+
} else {
|
|
378
|
+
close();
|
|
379
|
+
}
|
|
380
|
+
}, { immediate: true });
|
|
381
|
+
watch(is_open, (value) => {
|
|
382
|
+
model.value = value;
|
|
383
|
+
});
|
|
384
|
+
const handleOverlayClick = () => {
|
|
385
|
+
if (props.closeOnOverlay) {
|
|
386
|
+
close();
|
|
387
|
+
}
|
|
388
|
+
};
|
|
389
|
+
const handleKeyDown = (event) => {
|
|
390
|
+
if (event.key === "Escape" && props.closeOnEscape && is_open.value) {
|
|
391
|
+
close();
|
|
392
|
+
}
|
|
393
|
+
};
|
|
394
|
+
const context = {
|
|
395
|
+
is_open,
|
|
396
|
+
close,
|
|
397
|
+
titleId: props.titleId,
|
|
398
|
+
descriptionId: props.descriptionId
|
|
399
|
+
};
|
|
400
|
+
provide(DIALOG_KEY2, context);
|
|
401
|
+
onMounted(() => {
|
|
402
|
+
document.addEventListener("keydown", handleKeyDown);
|
|
403
|
+
});
|
|
404
|
+
onUnmounted(() => {
|
|
405
|
+
document.removeEventListener("keydown", handleKeyDown);
|
|
406
|
+
});
|
|
407
|
+
__expose({
|
|
408
|
+
is_open,
|
|
409
|
+
open,
|
|
410
|
+
close,
|
|
411
|
+
toggle
|
|
412
|
+
});
|
|
413
|
+
return (_ctx, _cache) => {
|
|
414
|
+
return openBlock(), createBlock(Teleport, { to: "body" }, [
|
|
415
|
+
unref(is_open) ? (openBlock(), createElementBlock("div", {
|
|
416
|
+
key: 0,
|
|
417
|
+
role: "dialog",
|
|
418
|
+
"aria-modal": "true",
|
|
419
|
+
"aria-labelledby": __props.titleId,
|
|
420
|
+
"aria-describedby": __props.descriptionId
|
|
421
|
+
}, [
|
|
422
|
+
createElementVNode("div", {
|
|
423
|
+
onClick: handleOverlayClick,
|
|
424
|
+
onKeydown: _cache[0] || (_cache[0] = withKeys(
|
|
425
|
+
//@ts-ignore
|
|
426
|
+
(...args) => unref(close) && unref(close)(...args),
|
|
427
|
+
["escape"]
|
|
428
|
+
))
|
|
429
|
+
}, null, 32),
|
|
430
|
+
createElementVNode("div", {
|
|
431
|
+
ref_key: "content_ref",
|
|
432
|
+
ref: content_ref,
|
|
433
|
+
tabindex: "-1",
|
|
434
|
+
onKeydown: _cache[1] || (_cache[1] = withKeys(
|
|
435
|
+
//@ts-ignore
|
|
436
|
+
(...args) => unref(close) && unref(close)(...args),
|
|
437
|
+
["escape"]
|
|
438
|
+
))
|
|
439
|
+
}, [
|
|
440
|
+
renderSlot(_ctx.$slots, "default", { close: unref(close) })
|
|
441
|
+
], 544)
|
|
442
|
+
], 8, _hoisted_1$n)) : createCommentVNode("", true)
|
|
443
|
+
]);
|
|
444
|
+
};
|
|
445
|
+
}
|
|
446
|
+
});
|
|
447
|
+
const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
448
|
+
...{
|
|
449
|
+
name: "DialogTrigger"
|
|
450
|
+
},
|
|
451
|
+
__name: "DialogTrigger",
|
|
452
|
+
setup(__props) {
|
|
453
|
+
const DIALOG_KEY2 = Symbol("dialog");
|
|
454
|
+
const context = inject(DIALOG_KEY2, null);
|
|
455
|
+
const open = () => {
|
|
456
|
+
if (context) {
|
|
457
|
+
context.is_open.value = true;
|
|
458
|
+
}
|
|
459
|
+
};
|
|
460
|
+
return (_ctx, _cache) => {
|
|
461
|
+
return renderSlot(_ctx.$slots, "default", { open });
|
|
462
|
+
};
|
|
463
|
+
}
|
|
464
|
+
});
|
|
465
|
+
const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
466
|
+
...{
|
|
467
|
+
name: "DialogOverlay"
|
|
468
|
+
},
|
|
469
|
+
__name: "DialogOverlay",
|
|
470
|
+
emits: ["click"],
|
|
471
|
+
setup(__props) {
|
|
472
|
+
return (_ctx, _cache) => {
|
|
473
|
+
return openBlock(), createElementBlock("div", {
|
|
474
|
+
"aria-hidden": "true",
|
|
475
|
+
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("click"))
|
|
476
|
+
});
|
|
477
|
+
};
|
|
478
|
+
}
|
|
479
|
+
});
|
|
480
|
+
const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
481
|
+
...{
|
|
482
|
+
name: "DialogContent"
|
|
483
|
+
},
|
|
484
|
+
__name: "DialogContent",
|
|
485
|
+
setup(__props, { expose: __expose }) {
|
|
486
|
+
const content_ref = ref(null);
|
|
487
|
+
__expose({
|
|
488
|
+
content_ref
|
|
489
|
+
});
|
|
490
|
+
return (_ctx, _cache) => {
|
|
491
|
+
return openBlock(), createElementBlock("div", {
|
|
492
|
+
ref_key: "content_ref",
|
|
493
|
+
ref: content_ref,
|
|
494
|
+
role: "document",
|
|
495
|
+
tabindex: "-1"
|
|
496
|
+
}, [
|
|
497
|
+
renderSlot(_ctx.$slots, "default")
|
|
498
|
+
], 512);
|
|
499
|
+
};
|
|
500
|
+
}
|
|
501
|
+
});
|
|
502
|
+
const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
503
|
+
...{
|
|
504
|
+
name: "DialogHeader"
|
|
505
|
+
},
|
|
506
|
+
__name: "DialogHeader",
|
|
507
|
+
setup(__props) {
|
|
508
|
+
return (_ctx, _cache) => {
|
|
509
|
+
return openBlock(), createElementBlock("div", null, [
|
|
510
|
+
renderSlot(_ctx.$slots, "default")
|
|
511
|
+
]);
|
|
512
|
+
};
|
|
513
|
+
}
|
|
514
|
+
});
|
|
515
|
+
const _hoisted_1$m = ["id"];
|
|
516
|
+
const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
517
|
+
...{
|
|
518
|
+
name: "DialogTitle"
|
|
519
|
+
},
|
|
520
|
+
__name: "DialogTitle",
|
|
521
|
+
props: {
|
|
522
|
+
id: {}
|
|
523
|
+
},
|
|
524
|
+
setup(__props) {
|
|
525
|
+
return (_ctx, _cache) => {
|
|
526
|
+
return openBlock(), createElementBlock("h2", { id: __props.id }, [
|
|
527
|
+
renderSlot(_ctx.$slots, "default")
|
|
528
|
+
], 8, _hoisted_1$m);
|
|
529
|
+
};
|
|
530
|
+
}
|
|
531
|
+
});
|
|
532
|
+
const _hoisted_1$l = ["id"];
|
|
533
|
+
const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
534
|
+
...{
|
|
535
|
+
name: "DialogDescription"
|
|
536
|
+
},
|
|
537
|
+
__name: "DialogDescription",
|
|
538
|
+
props: {
|
|
539
|
+
id: {}
|
|
540
|
+
},
|
|
541
|
+
setup(__props) {
|
|
542
|
+
return (_ctx, _cache) => {
|
|
543
|
+
return openBlock(), createElementBlock("p", { id: __props.id }, [
|
|
544
|
+
renderSlot(_ctx.$slots, "default")
|
|
545
|
+
], 8, _hoisted_1$l);
|
|
546
|
+
};
|
|
547
|
+
}
|
|
548
|
+
});
|
|
549
|
+
const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
550
|
+
...{
|
|
551
|
+
name: "DialogFooter"
|
|
552
|
+
},
|
|
553
|
+
__name: "DialogFooter",
|
|
554
|
+
setup(__props) {
|
|
555
|
+
return (_ctx, _cache) => {
|
|
556
|
+
return openBlock(), createElementBlock("div", null, [
|
|
557
|
+
renderSlot(_ctx.$slots, "default")
|
|
558
|
+
]);
|
|
559
|
+
};
|
|
560
|
+
}
|
|
561
|
+
});
|
|
562
|
+
const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
563
|
+
__name: "Select",
|
|
564
|
+
props: /* @__PURE__ */ mergeModels({
|
|
565
|
+
size: { default: "md" },
|
|
566
|
+
disabled: { type: Boolean, default: false },
|
|
567
|
+
placeholder: { default: "" }
|
|
568
|
+
}, {
|
|
569
|
+
"modelValue": { default: "" },
|
|
570
|
+
"modelModifiers": {}
|
|
571
|
+
}),
|
|
572
|
+
emits: ["update:modelValue"],
|
|
573
|
+
setup(__props, { expose: __expose }) {
|
|
574
|
+
const SELECT_KEY = Symbol("select");
|
|
575
|
+
const props = __props;
|
|
576
|
+
const model = useModel(__props, "modelValue");
|
|
577
|
+
const root_ref = ref(null);
|
|
578
|
+
const trigger_ref = ref(null);
|
|
579
|
+
const is_open = ref(false);
|
|
580
|
+
const open = () => {
|
|
581
|
+
if (!props.disabled) {
|
|
582
|
+
is_open.value = true;
|
|
583
|
+
}
|
|
584
|
+
};
|
|
585
|
+
const close = () => {
|
|
586
|
+
is_open.value = false;
|
|
587
|
+
};
|
|
588
|
+
const toggle = () => {
|
|
589
|
+
if (is_open.value) {
|
|
590
|
+
close();
|
|
591
|
+
} else {
|
|
592
|
+
open();
|
|
593
|
+
}
|
|
594
|
+
};
|
|
595
|
+
const updateValue = (value) => {
|
|
596
|
+
model.value = value;
|
|
597
|
+
close();
|
|
598
|
+
};
|
|
599
|
+
const setTriggerRef = (element) => {
|
|
600
|
+
trigger_ref.value = element;
|
|
601
|
+
};
|
|
602
|
+
const handleClickOutside = (event) => {
|
|
603
|
+
if (!is_open.value) return;
|
|
604
|
+
const target = event.target;
|
|
605
|
+
if (root_ref.value && !root_ref.value.contains(target)) {
|
|
606
|
+
close();
|
|
607
|
+
}
|
|
608
|
+
};
|
|
609
|
+
const context = {
|
|
610
|
+
model_value: model,
|
|
611
|
+
is_open,
|
|
612
|
+
disabled: computed(() => props.disabled),
|
|
613
|
+
size: computed(() => props.size ?? "md"),
|
|
614
|
+
placeholder: computed(() => props.placeholder ?? ""),
|
|
615
|
+
trigger_ref,
|
|
616
|
+
updateValue,
|
|
617
|
+
open,
|
|
618
|
+
close,
|
|
619
|
+
toggle,
|
|
620
|
+
setTriggerRef
|
|
621
|
+
};
|
|
622
|
+
provide(SELECT_KEY, context);
|
|
623
|
+
onMounted(() => {
|
|
624
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
625
|
+
});
|
|
626
|
+
onUnmounted(() => {
|
|
627
|
+
document.removeEventListener("mousedown", handleClickOutside);
|
|
628
|
+
});
|
|
629
|
+
__expose({
|
|
630
|
+
is_open,
|
|
631
|
+
open,
|
|
632
|
+
close,
|
|
633
|
+
toggle
|
|
634
|
+
});
|
|
635
|
+
return (_ctx, _cache) => {
|
|
636
|
+
return openBlock(), createElementBlock("div", {
|
|
637
|
+
ref_key: "root_ref",
|
|
638
|
+
ref: root_ref
|
|
639
|
+
}, [
|
|
640
|
+
renderSlot(_ctx.$slots, "default", {
|
|
641
|
+
is_open: context.is_open.value,
|
|
642
|
+
selected_value: model.value,
|
|
643
|
+
open: context.open,
|
|
644
|
+
close: context.close,
|
|
645
|
+
toggle: context.toggle
|
|
646
|
+
})
|
|
647
|
+
], 512);
|
|
648
|
+
};
|
|
649
|
+
}
|
|
650
|
+
});
|
|
651
|
+
const _hoisted_1$k = ["disabled", "aria-expanded"];
|
|
652
|
+
const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
653
|
+
__name: "SelectTrigger",
|
|
654
|
+
setup(__props, { expose: __expose }) {
|
|
655
|
+
const SELECT_KEY = Symbol("select");
|
|
656
|
+
const trigger_element = ref(null);
|
|
657
|
+
const context = inject(SELECT_KEY, null);
|
|
658
|
+
if (!context) {
|
|
659
|
+
throw new Error("SelectTrigger must be used within Select");
|
|
660
|
+
}
|
|
661
|
+
const composable = useSelectTrigger();
|
|
662
|
+
const handleClick = () => {
|
|
663
|
+
if (!composable.state.value.disabled) {
|
|
664
|
+
context.toggle();
|
|
665
|
+
}
|
|
666
|
+
};
|
|
667
|
+
const handleKeyDown = (event) => {
|
|
668
|
+
if (composable.state.value.disabled) return;
|
|
669
|
+
switch (event.key) {
|
|
670
|
+
case "Enter":
|
|
671
|
+
case " ":
|
|
672
|
+
case "ArrowDown":
|
|
673
|
+
event.preventDefault();
|
|
674
|
+
context.open();
|
|
675
|
+
break;
|
|
676
|
+
case "ArrowUp":
|
|
677
|
+
event.preventDefault();
|
|
678
|
+
context.open();
|
|
679
|
+
break;
|
|
680
|
+
}
|
|
681
|
+
};
|
|
682
|
+
onMounted(() => {
|
|
683
|
+
context.setTriggerRef(trigger_element.value);
|
|
684
|
+
});
|
|
685
|
+
__expose({
|
|
686
|
+
state: composable.state
|
|
687
|
+
});
|
|
688
|
+
return (_ctx, _cache) => {
|
|
689
|
+
return openBlock(), createElementBlock("button", {
|
|
690
|
+
ref_key: "trigger_element",
|
|
691
|
+
ref: trigger_element,
|
|
692
|
+
type: "button",
|
|
693
|
+
disabled: unref(composable).state.value.disabled,
|
|
694
|
+
"aria-expanded": unref(composable).state.value.is_open,
|
|
695
|
+
"aria-haspopup": "listbox",
|
|
696
|
+
onClick: handleClick,
|
|
697
|
+
onKeydown: handleKeyDown
|
|
698
|
+
}, [
|
|
699
|
+
renderSlot(_ctx.$slots, "default", {
|
|
700
|
+
is_open: unref(composable).state.value.is_open,
|
|
701
|
+
disabled: unref(composable).state.value.disabled
|
|
702
|
+
})
|
|
703
|
+
], 40, _hoisted_1$k);
|
|
704
|
+
};
|
|
705
|
+
}
|
|
706
|
+
});
|
|
707
|
+
const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
708
|
+
...{
|
|
709
|
+
name: "SelectValue"
|
|
710
|
+
},
|
|
711
|
+
__name: "SelectValue",
|
|
712
|
+
props: {
|
|
713
|
+
placeholder: {}
|
|
714
|
+
},
|
|
715
|
+
setup(__props) {
|
|
716
|
+
const SELECT_KEY = Symbol("select");
|
|
717
|
+
const props = __props;
|
|
718
|
+
const context = inject(SELECT_KEY, null);
|
|
719
|
+
const selected_value = computed(() => (context == null ? void 0 : context.model_value.value) ?? "");
|
|
720
|
+
const placeholder = computed(() => props.placeholder ?? (context == null ? void 0 : context.placeholder.value) ?? "Select...");
|
|
721
|
+
const display_text = computed(() => selected_value.value || placeholder.value);
|
|
722
|
+
return (_ctx, _cache) => {
|
|
723
|
+
return openBlock(), createElementBlock("span", null, [
|
|
724
|
+
renderSlot(_ctx.$slots, "default", {
|
|
725
|
+
value: selected_value.value,
|
|
726
|
+
placeholder: placeholder.value
|
|
727
|
+
}, () => [
|
|
728
|
+
createTextVNode(toDisplayString(display_text.value), 1)
|
|
729
|
+
])
|
|
730
|
+
]);
|
|
731
|
+
};
|
|
732
|
+
}
|
|
733
|
+
});
|
|
734
|
+
const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
735
|
+
__name: "SelectContent",
|
|
736
|
+
setup(__props, { expose: __expose }) {
|
|
737
|
+
const SELECT_KEY = Symbol("select");
|
|
738
|
+
const context = inject(SELECT_KEY, null);
|
|
739
|
+
if (!context) {
|
|
740
|
+
throw new Error("SelectContent must be used within Select");
|
|
741
|
+
}
|
|
742
|
+
const composable = useSelectContent();
|
|
743
|
+
const handleKeyDown = (event) => {
|
|
744
|
+
var _a;
|
|
745
|
+
switch (event.key) {
|
|
746
|
+
case "Escape":
|
|
747
|
+
event.preventDefault();
|
|
748
|
+
context.close();
|
|
749
|
+
(_a = context.trigger_ref.value) == null ? void 0 : _a.focus();
|
|
750
|
+
break;
|
|
751
|
+
}
|
|
752
|
+
};
|
|
753
|
+
__expose({
|
|
754
|
+
state: composable.state
|
|
755
|
+
});
|
|
756
|
+
return (_ctx, _cache) => {
|
|
757
|
+
return unref(composable).state.value.is_open ? (openBlock(), createElementBlock("div", {
|
|
758
|
+
key: 0,
|
|
759
|
+
role: "listbox",
|
|
760
|
+
tabindex: "-1",
|
|
761
|
+
onKeydown: handleKeyDown
|
|
762
|
+
}, [
|
|
763
|
+
renderSlot(_ctx.$slots, "default")
|
|
764
|
+
], 32)) : createCommentVNode("", true);
|
|
765
|
+
};
|
|
766
|
+
}
|
|
767
|
+
});
|
|
768
|
+
const _hoisted_1$j = ["aria-selected", "aria-disabled", "data-state", "data-disabled", "onKeydown"];
|
|
769
|
+
const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
770
|
+
__name: "SelectItem",
|
|
771
|
+
props: {
|
|
772
|
+
value: {},
|
|
773
|
+
disabled: { type: Boolean, default: false }
|
|
774
|
+
},
|
|
775
|
+
setup(__props, { expose: __expose }) {
|
|
776
|
+
const SELECT_KEY = Symbol("select");
|
|
777
|
+
const props = __props;
|
|
778
|
+
const context = inject(SELECT_KEY, null);
|
|
779
|
+
if (!context) {
|
|
780
|
+
throw new Error("SelectItem must be used within Select");
|
|
781
|
+
}
|
|
782
|
+
const composable = useSelectItem(toRef(() => ({ value: props.value, disabled: props.disabled })));
|
|
783
|
+
const handleClick = () => {
|
|
784
|
+
if (!composable.state.value.disabled) {
|
|
785
|
+
context.updateValue(props.value);
|
|
786
|
+
}
|
|
787
|
+
};
|
|
788
|
+
__expose({
|
|
789
|
+
state: composable.state
|
|
790
|
+
});
|
|
791
|
+
return (_ctx, _cache) => {
|
|
792
|
+
return openBlock(), createElementBlock("div", {
|
|
793
|
+
role: "option",
|
|
794
|
+
"aria-selected": unref(composable).state.value.selected,
|
|
795
|
+
"aria-disabled": unref(composable).state.value.disabled,
|
|
796
|
+
"data-state": unref(composable).state.value.selected ? "selected" : void 0,
|
|
797
|
+
"data-disabled": unref(composable).state.value.disabled ? "" : void 0,
|
|
798
|
+
onClick: handleClick,
|
|
799
|
+
onKeydown: [
|
|
800
|
+
withKeys(handleClick, ["enter"]),
|
|
801
|
+
withKeys(withModifiers(handleClick, ["prevent"]), ["space"])
|
|
802
|
+
]
|
|
803
|
+
}, [
|
|
804
|
+
renderSlot(_ctx.$slots, "default", {
|
|
805
|
+
selected: unref(composable).state.value.selected,
|
|
806
|
+
disabled: unref(composable).state.value.disabled
|
|
807
|
+
})
|
|
808
|
+
], 40, _hoisted_1$j);
|
|
809
|
+
};
|
|
810
|
+
}
|
|
811
|
+
});
|
|
812
|
+
const _hoisted_1$i = ["aria-orientation"];
|
|
813
|
+
const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
814
|
+
__name: "RadioGroup",
|
|
815
|
+
props: /* @__PURE__ */ mergeModels({
|
|
816
|
+
disabled: { type: Boolean, default: false },
|
|
817
|
+
orientation: { default: "vertical" }
|
|
818
|
+
}, {
|
|
819
|
+
"modelValue": { default: "" },
|
|
820
|
+
"modelModifiers": {}
|
|
821
|
+
}),
|
|
822
|
+
emits: ["update:modelValue"],
|
|
823
|
+
setup(__props) {
|
|
824
|
+
const RADIO_GROUP_KEY = Symbol("radio-group");
|
|
825
|
+
const props = __props;
|
|
826
|
+
const model = useModel(__props, "modelValue");
|
|
827
|
+
const updateValue = (value) => {
|
|
828
|
+
if (!props.disabled) {
|
|
829
|
+
model.value = value;
|
|
830
|
+
}
|
|
831
|
+
};
|
|
832
|
+
const context = {
|
|
833
|
+
model_value: model,
|
|
834
|
+
disabled: computed(() => props.disabled),
|
|
835
|
+
updateValue
|
|
836
|
+
};
|
|
837
|
+
provide(RADIO_GROUP_KEY, context);
|
|
838
|
+
return (_ctx, _cache) => {
|
|
839
|
+
return openBlock(), createElementBlock("div", {
|
|
840
|
+
role: "radiogroup",
|
|
841
|
+
"aria-orientation": __props.orientation
|
|
842
|
+
}, [
|
|
843
|
+
renderSlot(_ctx.$slots, "default")
|
|
844
|
+
], 8, _hoisted_1$i);
|
|
845
|
+
};
|
|
846
|
+
}
|
|
847
|
+
});
|
|
848
|
+
const _hoisted_1$h = ["disabled", "data-state"];
|
|
849
|
+
const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
850
|
+
__name: "RadioItem",
|
|
851
|
+
props: {
|
|
852
|
+
value: {},
|
|
853
|
+
size: { default: "md" },
|
|
854
|
+
disabled: { type: Boolean, default: false }
|
|
855
|
+
},
|
|
856
|
+
setup(__props, { expose: __expose }) {
|
|
857
|
+
const RADIO_GROUP_KEY = Symbol("radio-group");
|
|
858
|
+
const props = __props;
|
|
859
|
+
const context = inject(RADIO_GROUP_KEY, null);
|
|
860
|
+
if (!context) {
|
|
861
|
+
throw new Error("RadioItem must be used within RadioGroup");
|
|
862
|
+
}
|
|
863
|
+
const composable = useRadioItem(toRef(() => props));
|
|
864
|
+
const handleClick = () => {
|
|
865
|
+
if (!composable.state.value.disabled) {
|
|
866
|
+
context.updateValue(props.value);
|
|
867
|
+
}
|
|
868
|
+
};
|
|
869
|
+
const handleKeyDown = (event) => {
|
|
870
|
+
if (composable.state.value.disabled) return;
|
|
871
|
+
switch (event.key) {
|
|
872
|
+
case "Enter":
|
|
873
|
+
case " ":
|
|
874
|
+
event.preventDefault();
|
|
875
|
+
context.updateValue(props.value);
|
|
876
|
+
break;
|
|
877
|
+
}
|
|
878
|
+
};
|
|
879
|
+
__expose({
|
|
880
|
+
state: composable.state
|
|
881
|
+
});
|
|
882
|
+
return (_ctx, _cache) => {
|
|
883
|
+
return openBlock(), createElementBlock("button", mergeProps({
|
|
884
|
+
type: "button",
|
|
885
|
+
disabled: unref(composable).state.value.disabled,
|
|
886
|
+
"data-state": unref(composable).state.value.checked ? "checked" : "unchecked"
|
|
887
|
+
}, unref(composable).aria_attributes.value, {
|
|
888
|
+
onClick: handleClick,
|
|
889
|
+
onKeydown: handleKeyDown
|
|
890
|
+
}), [
|
|
891
|
+
renderSlot(_ctx.$slots, "default", {
|
|
892
|
+
checked: unref(composable).state.value.checked,
|
|
893
|
+
disabled: unref(composable).state.value.disabled
|
|
894
|
+
})
|
|
895
|
+
], 16, _hoisted_1$h);
|
|
896
|
+
};
|
|
897
|
+
}
|
|
898
|
+
});
|
|
899
|
+
const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
900
|
+
...{
|
|
901
|
+
name: "FormField"
|
|
902
|
+
},
|
|
903
|
+
__name: "FormField",
|
|
904
|
+
props: {
|
|
905
|
+
name: {},
|
|
906
|
+
error: {}
|
|
907
|
+
},
|
|
908
|
+
setup(__props) {
|
|
909
|
+
const FORM_FIELD_KEY = Symbol("form-field");
|
|
910
|
+
const props = __props;
|
|
911
|
+
const field_id = computed(() => `field-${props.name}`);
|
|
912
|
+
const error_id = computed(() => `field-${props.name}-error`);
|
|
913
|
+
const has_error = computed(() => !!props.error);
|
|
914
|
+
const error = computed(() => props.error);
|
|
915
|
+
provide(FORM_FIELD_KEY, {
|
|
916
|
+
field_id: field_id.value,
|
|
917
|
+
error_id: error_id.value,
|
|
918
|
+
has_error,
|
|
919
|
+
error
|
|
920
|
+
});
|
|
921
|
+
return (_ctx, _cache) => {
|
|
922
|
+
return openBlock(), createElementBlock("div", null, [
|
|
923
|
+
renderSlot(_ctx.$slots, "default", {
|
|
924
|
+
id: field_id.value,
|
|
925
|
+
error_id: error_id.value,
|
|
926
|
+
has_error: !!error.value
|
|
927
|
+
})
|
|
928
|
+
]);
|
|
929
|
+
};
|
|
930
|
+
}
|
|
931
|
+
});
|
|
932
|
+
const _hoisted_1$g = ["for"];
|
|
933
|
+
const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
934
|
+
...{
|
|
935
|
+
name: "FormLabel"
|
|
936
|
+
},
|
|
937
|
+
__name: "FormLabel",
|
|
938
|
+
props: {
|
|
939
|
+
for: {}
|
|
940
|
+
},
|
|
941
|
+
setup(__props) {
|
|
942
|
+
const FORM_FIELD_KEY = Symbol("form-field");
|
|
943
|
+
const props = __props;
|
|
944
|
+
const context = inject(FORM_FIELD_KEY, null);
|
|
945
|
+
const for_id = props.for ?? (context == null ? void 0 : context.field_id);
|
|
946
|
+
return (_ctx, _cache) => {
|
|
947
|
+
return openBlock(), createElementBlock("label", { for: unref(for_id) }, [
|
|
948
|
+
renderSlot(_ctx.$slots, "default")
|
|
949
|
+
], 8, _hoisted_1$g);
|
|
950
|
+
};
|
|
951
|
+
}
|
|
952
|
+
});
|
|
953
|
+
const _hoisted_1$f = ["id", "type", "value", "disabled", "readonly", "placeholder", "aria-invalid", "aria-describedby"];
|
|
954
|
+
const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
955
|
+
...{
|
|
956
|
+
name: "FormInput"
|
|
957
|
+
},
|
|
958
|
+
__name: "FormInput",
|
|
959
|
+
props: {
|
|
960
|
+
type: { default: "text" },
|
|
961
|
+
modelValue: {},
|
|
962
|
+
disabled: { type: Boolean, default: false },
|
|
963
|
+
readonly: { type: Boolean, default: false },
|
|
964
|
+
placeholder: {},
|
|
965
|
+
id: {}
|
|
966
|
+
},
|
|
967
|
+
emits: ["update:modelValue"],
|
|
968
|
+
setup(__props, { emit: __emit }) {
|
|
969
|
+
const FORM_FIELD_KEY = Symbol("form-field");
|
|
970
|
+
const props = __props;
|
|
971
|
+
const emit = __emit;
|
|
972
|
+
const context = inject(FORM_FIELD_KEY, null);
|
|
973
|
+
const input_id = computed(() => props.id ?? (context == null ? void 0 : context.field_id));
|
|
974
|
+
const has_error = computed(() => (context == null ? void 0 : context.has_error.value) ?? false);
|
|
975
|
+
const aria_error_id = computed(() => context == null ? void 0 : context.error_id);
|
|
976
|
+
const handleInput = (event) => {
|
|
977
|
+
const target = event.target;
|
|
978
|
+
emit("update:modelValue", target.value);
|
|
979
|
+
};
|
|
980
|
+
return (_ctx, _cache) => {
|
|
981
|
+
return openBlock(), createElementBlock("input", {
|
|
982
|
+
id: input_id.value,
|
|
983
|
+
type: __props.type,
|
|
984
|
+
value: __props.modelValue,
|
|
985
|
+
disabled: __props.disabled,
|
|
986
|
+
readonly: __props.readonly,
|
|
987
|
+
placeholder: __props.placeholder,
|
|
988
|
+
"aria-invalid": has_error.value,
|
|
989
|
+
"aria-describedby": has_error.value ? aria_error_id.value : void 0,
|
|
990
|
+
onInput: handleInput
|
|
991
|
+
}, null, 40, _hoisted_1$f);
|
|
992
|
+
};
|
|
993
|
+
}
|
|
994
|
+
});
|
|
995
|
+
const _hoisted_1$e = ["id", "value", "disabled", "readonly", "placeholder", "rows", "aria-invalid", "aria-describedby"];
|
|
996
|
+
const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
997
|
+
...{
|
|
998
|
+
name: "FormTextarea"
|
|
999
|
+
},
|
|
1000
|
+
__name: "FormTextarea",
|
|
1001
|
+
props: {
|
|
1002
|
+
modelValue: {},
|
|
1003
|
+
disabled: { type: Boolean, default: false },
|
|
1004
|
+
readonly: { type: Boolean, default: false },
|
|
1005
|
+
placeholder: {},
|
|
1006
|
+
rows: { default: 3 },
|
|
1007
|
+
id: {}
|
|
1008
|
+
},
|
|
1009
|
+
emits: ["update:modelValue"],
|
|
1010
|
+
setup(__props, { emit: __emit }) {
|
|
1011
|
+
const FORM_FIELD_KEY = Symbol("form-field");
|
|
1012
|
+
const props = __props;
|
|
1013
|
+
const emit = __emit;
|
|
1014
|
+
const context = inject(FORM_FIELD_KEY, null);
|
|
1015
|
+
const textarea_id = computed(() => props.id ?? (context == null ? void 0 : context.field_id));
|
|
1016
|
+
const has_error = computed(() => (context == null ? void 0 : context.has_error.value) ?? false);
|
|
1017
|
+
const aria_error_id = computed(() => context == null ? void 0 : context.error_id);
|
|
1018
|
+
const handleInput = (event) => {
|
|
1019
|
+
const target = event.target;
|
|
1020
|
+
emit("update:modelValue", target.value);
|
|
1021
|
+
};
|
|
1022
|
+
return (_ctx, _cache) => {
|
|
1023
|
+
return openBlock(), createElementBlock("textarea", {
|
|
1024
|
+
id: textarea_id.value,
|
|
1025
|
+
value: __props.modelValue,
|
|
1026
|
+
disabled: __props.disabled,
|
|
1027
|
+
readonly: __props.readonly,
|
|
1028
|
+
placeholder: __props.placeholder,
|
|
1029
|
+
rows: __props.rows,
|
|
1030
|
+
"aria-invalid": has_error.value,
|
|
1031
|
+
"aria-describedby": has_error.value ? aria_error_id.value : void 0,
|
|
1032
|
+
onInput: handleInput
|
|
1033
|
+
}, null, 40, _hoisted_1$e);
|
|
1034
|
+
};
|
|
1035
|
+
}
|
|
1036
|
+
});
|
|
1037
|
+
const _hoisted_1$d = ["id"];
|
|
1038
|
+
const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
1039
|
+
...{
|
|
1040
|
+
name: "FormError"
|
|
1041
|
+
},
|
|
1042
|
+
__name: "FormError",
|
|
1043
|
+
props: {
|
|
1044
|
+
error: {}
|
|
1045
|
+
},
|
|
1046
|
+
setup(__props) {
|
|
1047
|
+
const FORM_FIELD_KEY = Symbol("form-field");
|
|
1048
|
+
const props = __props;
|
|
1049
|
+
const context = inject(FORM_FIELD_KEY, null);
|
|
1050
|
+
const error_id = computed(() => context == null ? void 0 : context.error_id);
|
|
1051
|
+
const error_message = computed(() => props.error ?? (context == null ? void 0 : context.error.value));
|
|
1052
|
+
const show_error = computed(() => !!error_message.value);
|
|
1053
|
+
return (_ctx, _cache) => {
|
|
1054
|
+
return show_error.value ? (openBlock(), createElementBlock("p", {
|
|
1055
|
+
key: 0,
|
|
1056
|
+
id: error_id.value,
|
|
1057
|
+
role: "alert",
|
|
1058
|
+
"aria-live": "polite"
|
|
1059
|
+
}, [
|
|
1060
|
+
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
1061
|
+
createTextVNode(toDisplayString(error_message.value), 1)
|
|
1062
|
+
])
|
|
1063
|
+
], 8, _hoisted_1$d)) : createCommentVNode("", true);
|
|
1064
|
+
};
|
|
1065
|
+
}
|
|
1066
|
+
});
|
|
1067
|
+
const _hoisted_1$c = ["data-dragging", "data-disabled", "data-has-files"];
|
|
1068
|
+
const _hoisted_2 = ["accept", "multiple", "disabled"];
|
|
1069
|
+
const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
1070
|
+
...{
|
|
1071
|
+
name: "FileInput"
|
|
1072
|
+
},
|
|
1073
|
+
__name: "FileInput",
|
|
1074
|
+
props: {
|
|
1075
|
+
accept: {},
|
|
1076
|
+
multiple: { type: Boolean, default: false },
|
|
1077
|
+
disabled: { type: Boolean, default: false },
|
|
1078
|
+
maxSize: {},
|
|
1079
|
+
maxFiles: {}
|
|
1080
|
+
},
|
|
1081
|
+
emits: ["change", "error"],
|
|
1082
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
1083
|
+
const props = __props;
|
|
1084
|
+
const emit = __emit;
|
|
1085
|
+
const input_ref = ref(null);
|
|
1086
|
+
const files = ref([]);
|
|
1087
|
+
const is_dragging = ref(false);
|
|
1088
|
+
const has_files = computed(() => files.value.length > 0);
|
|
1089
|
+
const validateFiles = (file_list) => {
|
|
1090
|
+
if (!file_list) return [];
|
|
1091
|
+
const validated = [];
|
|
1092
|
+
const max_files = props.maxFiles ?? (props.multiple ? Infinity : 1);
|
|
1093
|
+
for (let i2 = 0; i2 < Math.min(file_list.length, max_files); i2++) {
|
|
1094
|
+
const file = file_list[i2];
|
|
1095
|
+
if (props.maxSize && file.size > props.maxSize) {
|
|
1096
|
+
emit("error", `File "${file.name}" exceeds maximum size`);
|
|
1097
|
+
continue;
|
|
1098
|
+
}
|
|
1099
|
+
validated.push(file);
|
|
1100
|
+
}
|
|
1101
|
+
return validated;
|
|
1102
|
+
};
|
|
1103
|
+
const handleChange = (event) => {
|
|
1104
|
+
const target = event.target;
|
|
1105
|
+
const validated = validateFiles(target.files);
|
|
1106
|
+
files.value = validated;
|
|
1107
|
+
emit("change", validated);
|
|
1108
|
+
};
|
|
1109
|
+
const handleDragOver = (event) => {
|
|
1110
|
+
if (props.disabled) return;
|
|
1111
|
+
is_dragging.value = true;
|
|
1112
|
+
};
|
|
1113
|
+
const handleDragLeave = () => {
|
|
1114
|
+
is_dragging.value = false;
|
|
1115
|
+
};
|
|
1116
|
+
const handleDrop = (event) => {
|
|
1117
|
+
var _a;
|
|
1118
|
+
if (props.disabled) return;
|
|
1119
|
+
is_dragging.value = false;
|
|
1120
|
+
const validated = validateFiles(((_a = event.dataTransfer) == null ? void 0 : _a.files) ?? null);
|
|
1121
|
+
files.value = validated;
|
|
1122
|
+
emit("change", validated);
|
|
1123
|
+
};
|
|
1124
|
+
const openFilePicker = () => {
|
|
1125
|
+
if (!props.disabled && input_ref.value) {
|
|
1126
|
+
input_ref.value.click();
|
|
1127
|
+
}
|
|
1128
|
+
};
|
|
1129
|
+
const clearFiles = () => {
|
|
1130
|
+
files.value = [];
|
|
1131
|
+
if (input_ref.value) {
|
|
1132
|
+
input_ref.value.value = "";
|
|
1133
|
+
}
|
|
1134
|
+
emit("change", []);
|
|
1135
|
+
};
|
|
1136
|
+
__expose({
|
|
1137
|
+
files,
|
|
1138
|
+
is_dragging,
|
|
1139
|
+
openFilePicker,
|
|
1140
|
+
clearFiles
|
|
1141
|
+
});
|
|
1142
|
+
return (_ctx, _cache) => {
|
|
1143
|
+
return openBlock(), createElementBlock("div", {
|
|
1144
|
+
"data-dragging": is_dragging.value,
|
|
1145
|
+
"data-disabled": __props.disabled,
|
|
1146
|
+
"data-has-files": has_files.value,
|
|
1147
|
+
onDragover: withModifiers(handleDragOver, ["prevent"]),
|
|
1148
|
+
onDragleave: handleDragLeave,
|
|
1149
|
+
onDrop: withModifiers(handleDrop, ["prevent"])
|
|
1150
|
+
}, [
|
|
1151
|
+
createElementVNode("input", {
|
|
1152
|
+
ref_key: "input_ref",
|
|
1153
|
+
ref: input_ref,
|
|
1154
|
+
type: "file",
|
|
1155
|
+
accept: __props.accept,
|
|
1156
|
+
multiple: __props.multiple,
|
|
1157
|
+
disabled: __props.disabled,
|
|
1158
|
+
onChange: handleChange
|
|
1159
|
+
}, null, 40, _hoisted_2),
|
|
1160
|
+
renderSlot(_ctx.$slots, "default", {
|
|
1161
|
+
files: files.value,
|
|
1162
|
+
is_dragging: is_dragging.value,
|
|
1163
|
+
open: openFilePicker,
|
|
1164
|
+
clear: clearFiles
|
|
1165
|
+
})
|
|
1166
|
+
], 40, _hoisted_1$c);
|
|
1167
|
+
};
|
|
1168
|
+
}
|
|
1169
|
+
});
|
|
1170
|
+
const _hoisted_1$b = ["data-side"];
|
|
1171
|
+
const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
1172
|
+
...{
|
|
1173
|
+
name: "Sheet"
|
|
1174
|
+
},
|
|
1175
|
+
__name: "Sheet",
|
|
1176
|
+
props: /* @__PURE__ */ mergeModels({
|
|
1177
|
+
side: { default: "right" },
|
|
1178
|
+
closeOnOverlay: { type: Boolean, default: true },
|
|
1179
|
+
closeOnEscape: { type: Boolean, default: true }
|
|
1180
|
+
}, {
|
|
1181
|
+
"open": { type: Boolean, ...{ default: false } },
|
|
1182
|
+
"openModifiers": {}
|
|
1183
|
+
}),
|
|
1184
|
+
emits: ["update:open"],
|
|
1185
|
+
setup(__props, { expose: __expose }) {
|
|
1186
|
+
const SHEET_KEY = Symbol("sheet");
|
|
1187
|
+
const props = __props;
|
|
1188
|
+
const model = useModel(__props, "open");
|
|
1189
|
+
const is_open = ref(false);
|
|
1190
|
+
const open = () => {
|
|
1191
|
+
is_open.value = true;
|
|
1192
|
+
};
|
|
1193
|
+
const close = () => {
|
|
1194
|
+
is_open.value = false;
|
|
1195
|
+
};
|
|
1196
|
+
watch(model, (value) => {
|
|
1197
|
+
is_open.value = value;
|
|
1198
|
+
}, { immediate: true });
|
|
1199
|
+
watch(is_open, (value) => {
|
|
1200
|
+
model.value = value;
|
|
1201
|
+
});
|
|
1202
|
+
const handleKeyDown = (event) => {
|
|
1203
|
+
if (event.key === "Escape" && props.closeOnEscape && is_open.value) {
|
|
1204
|
+
close();
|
|
1205
|
+
}
|
|
1206
|
+
};
|
|
1207
|
+
provide(SHEET_KEY, {
|
|
1208
|
+
is_open,
|
|
1209
|
+
side: props.side,
|
|
1210
|
+
close
|
|
1211
|
+
});
|
|
1212
|
+
onMounted(() => {
|
|
1213
|
+
document.addEventListener("keydown", handleKeyDown);
|
|
1214
|
+
});
|
|
1215
|
+
onUnmounted(() => {
|
|
1216
|
+
document.removeEventListener("keydown", handleKeyDown);
|
|
1217
|
+
});
|
|
1218
|
+
__expose({
|
|
1219
|
+
is_open,
|
|
1220
|
+
open,
|
|
1221
|
+
close
|
|
1222
|
+
});
|
|
1223
|
+
return (_ctx, _cache) => {
|
|
1224
|
+
return openBlock(), createBlock(Teleport, { to: "body" }, [
|
|
1225
|
+
is_open.value ? (openBlock(), createElementBlock("div", {
|
|
1226
|
+
key: 0,
|
|
1227
|
+
"data-side": __props.side
|
|
1228
|
+
}, [
|
|
1229
|
+
renderSlot(_ctx.$slots, "default", {
|
|
1230
|
+
close,
|
|
1231
|
+
is_open: is_open.value
|
|
1232
|
+
})
|
|
1233
|
+
], 8, _hoisted_1$b)) : createCommentVNode("", true)
|
|
1234
|
+
]);
|
|
1235
|
+
};
|
|
1236
|
+
}
|
|
1237
|
+
});
|
|
1238
|
+
const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
1239
|
+
...{
|
|
1240
|
+
name: "SheetTrigger"
|
|
1241
|
+
},
|
|
1242
|
+
__name: "SheetTrigger",
|
|
1243
|
+
setup(__props) {
|
|
1244
|
+
const SHEET_KEY = Symbol("sheet");
|
|
1245
|
+
const context = inject(SHEET_KEY, null);
|
|
1246
|
+
const open = () => {
|
|
1247
|
+
if (context) {
|
|
1248
|
+
context.is_open.value = true;
|
|
1249
|
+
}
|
|
1250
|
+
};
|
|
1251
|
+
return (_ctx, _cache) => {
|
|
1252
|
+
return renderSlot(_ctx.$slots, "default", { open });
|
|
1253
|
+
};
|
|
1254
|
+
}
|
|
1255
|
+
});
|
|
1256
|
+
const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
1257
|
+
...{
|
|
1258
|
+
name: "SheetOverlay"
|
|
1259
|
+
},
|
|
1260
|
+
__name: "SheetOverlay",
|
|
1261
|
+
setup(__props) {
|
|
1262
|
+
const SHEET_KEY = Symbol("sheet");
|
|
1263
|
+
const context = inject(SHEET_KEY, null);
|
|
1264
|
+
const handleClick = () => {
|
|
1265
|
+
context == null ? void 0 : context.close();
|
|
1266
|
+
};
|
|
1267
|
+
return (_ctx, _cache) => {
|
|
1268
|
+
return openBlock(), createElementBlock("div", {
|
|
1269
|
+
"aria-hidden": "true",
|
|
1270
|
+
onClick: handleClick
|
|
1271
|
+
});
|
|
1272
|
+
};
|
|
1273
|
+
}
|
|
1274
|
+
});
|
|
1275
|
+
const _hoisted_1$a = {
|
|
1276
|
+
role: "dialog",
|
|
1277
|
+
"aria-modal": "true",
|
|
1278
|
+
tabindex: "-1"
|
|
1279
|
+
};
|
|
1280
|
+
const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
1281
|
+
...{
|
|
1282
|
+
name: "SheetContent"
|
|
1283
|
+
},
|
|
1284
|
+
__name: "SheetContent",
|
|
1285
|
+
setup(__props) {
|
|
1286
|
+
return (_ctx, _cache) => {
|
|
1287
|
+
return openBlock(), createElementBlock("div", _hoisted_1$a, [
|
|
1288
|
+
renderSlot(_ctx.$slots, "default")
|
|
1289
|
+
]);
|
|
1290
|
+
};
|
|
1291
|
+
}
|
|
1292
|
+
});
|
|
1293
|
+
const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
1294
|
+
...{
|
|
1295
|
+
name: "SheetHeader"
|
|
1296
|
+
},
|
|
1297
|
+
__name: "SheetHeader",
|
|
1298
|
+
setup(__props) {
|
|
1299
|
+
return (_ctx, _cache) => {
|
|
1300
|
+
return openBlock(), createElementBlock("div", null, [
|
|
1301
|
+
renderSlot(_ctx.$slots, "default")
|
|
1302
|
+
]);
|
|
1303
|
+
};
|
|
1304
|
+
}
|
|
1305
|
+
});
|
|
1306
|
+
const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
1307
|
+
...{
|
|
1308
|
+
name: "SheetTitle"
|
|
1309
|
+
},
|
|
1310
|
+
__name: "SheetTitle",
|
|
1311
|
+
setup(__props) {
|
|
1312
|
+
return (_ctx, _cache) => {
|
|
1313
|
+
return openBlock(), createElementBlock("h2", null, [
|
|
1314
|
+
renderSlot(_ctx.$slots, "default")
|
|
1315
|
+
]);
|
|
1316
|
+
};
|
|
1317
|
+
}
|
|
1318
|
+
});
|
|
1319
|
+
const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
1320
|
+
...{
|
|
1321
|
+
name: "SheetDescription"
|
|
1322
|
+
},
|
|
1323
|
+
__name: "SheetDescription",
|
|
1324
|
+
setup(__props) {
|
|
1325
|
+
return (_ctx, _cache) => {
|
|
1326
|
+
return openBlock(), createElementBlock("p", null, [
|
|
1327
|
+
renderSlot(_ctx.$slots, "default")
|
|
1328
|
+
]);
|
|
1329
|
+
};
|
|
1330
|
+
}
|
|
1331
|
+
});
|
|
1332
|
+
const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
1333
|
+
...{
|
|
1334
|
+
name: "SheetFooter"
|
|
1335
|
+
},
|
|
1336
|
+
__name: "SheetFooter",
|
|
1337
|
+
setup(__props) {
|
|
1338
|
+
return (_ctx, _cache) => {
|
|
1339
|
+
return openBlock(), createElementBlock("div", null, [
|
|
1340
|
+
renderSlot(_ctx.$slots, "default")
|
|
1341
|
+
]);
|
|
1342
|
+
};
|
|
1343
|
+
}
|
|
1344
|
+
});
|
|
1345
|
+
const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
1346
|
+
...{
|
|
1347
|
+
name: "SheetClose"
|
|
1348
|
+
},
|
|
1349
|
+
__name: "SheetClose",
|
|
1350
|
+
setup(__props) {
|
|
1351
|
+
const SHEET_KEY = Symbol("sheet");
|
|
1352
|
+
const context = inject(SHEET_KEY, null);
|
|
1353
|
+
const close = () => {
|
|
1354
|
+
context == null ? void 0 : context.close();
|
|
1355
|
+
};
|
|
1356
|
+
return (_ctx, _cache) => {
|
|
1357
|
+
return renderSlot(_ctx.$slots, "default", { close }, () => [
|
|
1358
|
+
createElementVNode("button", {
|
|
1359
|
+
type: "button",
|
|
1360
|
+
onClick: close
|
|
1361
|
+
}, " Close ")
|
|
1362
|
+
]);
|
|
1363
|
+
};
|
|
1364
|
+
}
|
|
1365
|
+
});
|
|
1366
|
+
const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
1367
|
+
...{
|
|
1368
|
+
name: "Popover"
|
|
1369
|
+
},
|
|
1370
|
+
__name: "Popover",
|
|
1371
|
+
props: {
|
|
1372
|
+
closeOnClickOutside: { type: Boolean, default: true }
|
|
1373
|
+
},
|
|
1374
|
+
setup(__props, { expose: __expose }) {
|
|
1375
|
+
const POPOVER_KEY = Symbol("popover");
|
|
1376
|
+
const props = __props;
|
|
1377
|
+
const root_ref = ref(null);
|
|
1378
|
+
const trigger_ref = ref(null);
|
|
1379
|
+
const is_open = ref(false);
|
|
1380
|
+
const open = () => {
|
|
1381
|
+
is_open.value = true;
|
|
1382
|
+
};
|
|
1383
|
+
const close = () => {
|
|
1384
|
+
is_open.value = false;
|
|
1385
|
+
};
|
|
1386
|
+
const toggle = () => {
|
|
1387
|
+
is_open.value = !is_open.value;
|
|
1388
|
+
};
|
|
1389
|
+
const setTriggerRef = (el) => {
|
|
1390
|
+
trigger_ref.value = el;
|
|
1391
|
+
};
|
|
1392
|
+
const handleClickOutside = (event) => {
|
|
1393
|
+
if (!props.closeOnClickOutside || !is_open.value) return;
|
|
1394
|
+
const target = event.target;
|
|
1395
|
+
if (root_ref.value && !root_ref.value.contains(target)) {
|
|
1396
|
+
close();
|
|
1397
|
+
}
|
|
1398
|
+
};
|
|
1399
|
+
provide(POPOVER_KEY, {
|
|
1400
|
+
is_open,
|
|
1401
|
+
trigger_ref,
|
|
1402
|
+
open,
|
|
1403
|
+
close,
|
|
1404
|
+
toggle,
|
|
1405
|
+
setTriggerRef
|
|
1406
|
+
});
|
|
1407
|
+
onMounted(() => {
|
|
1408
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
1409
|
+
});
|
|
1410
|
+
onUnmounted(() => {
|
|
1411
|
+
document.removeEventListener("mousedown", handleClickOutside);
|
|
1412
|
+
});
|
|
1413
|
+
__expose({
|
|
1414
|
+
is_open,
|
|
1415
|
+
open,
|
|
1416
|
+
close,
|
|
1417
|
+
toggle
|
|
1418
|
+
});
|
|
1419
|
+
return (_ctx, _cache) => {
|
|
1420
|
+
return openBlock(), createElementBlock("div", {
|
|
1421
|
+
ref_key: "root_ref",
|
|
1422
|
+
ref: root_ref
|
|
1423
|
+
}, [
|
|
1424
|
+
renderSlot(_ctx.$slots, "default", {
|
|
1425
|
+
is_open: is_open.value,
|
|
1426
|
+
open,
|
|
1427
|
+
close,
|
|
1428
|
+
toggle
|
|
1429
|
+
})
|
|
1430
|
+
], 512);
|
|
1431
|
+
};
|
|
1432
|
+
}
|
|
1433
|
+
});
|
|
1434
|
+
const _hoisted_1$9 = ["aria-expanded"];
|
|
1435
|
+
const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
1436
|
+
...{
|
|
1437
|
+
name: "PopoverTrigger"
|
|
1438
|
+
},
|
|
1439
|
+
__name: "PopoverTrigger",
|
|
1440
|
+
setup(__props) {
|
|
1441
|
+
const POPOVER_KEY = Symbol("popover");
|
|
1442
|
+
const trigger_element = ref(null);
|
|
1443
|
+
const context = inject(POPOVER_KEY, null);
|
|
1444
|
+
const is_open = (context == null ? void 0 : context.is_open) ?? ref(false);
|
|
1445
|
+
const toggle = () => {
|
|
1446
|
+
context == null ? void 0 : context.toggle();
|
|
1447
|
+
};
|
|
1448
|
+
onMounted(() => {
|
|
1449
|
+
context == null ? void 0 : context.setTriggerRef(trigger_element.value);
|
|
1450
|
+
});
|
|
1451
|
+
return (_ctx, _cache) => {
|
|
1452
|
+
return openBlock(), createElementBlock("button", {
|
|
1453
|
+
ref_key: "trigger_element",
|
|
1454
|
+
ref: trigger_element,
|
|
1455
|
+
type: "button",
|
|
1456
|
+
"aria-expanded": unref(is_open),
|
|
1457
|
+
"aria-haspopup": "dialog",
|
|
1458
|
+
onClick: toggle
|
|
1459
|
+
}, [
|
|
1460
|
+
renderSlot(_ctx.$slots, "default", { is_open: unref(is_open) })
|
|
1461
|
+
], 8, _hoisted_1$9);
|
|
1462
|
+
};
|
|
1463
|
+
}
|
|
1464
|
+
});
|
|
1465
|
+
const _hoisted_1$8 = ["data-side", "data-align"];
|
|
1466
|
+
const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
1467
|
+
...{
|
|
1468
|
+
name: "PopoverContent"
|
|
1469
|
+
},
|
|
1470
|
+
__name: "PopoverContent",
|
|
1471
|
+
props: {
|
|
1472
|
+
side: { default: "bottom" },
|
|
1473
|
+
align: { default: "center" }
|
|
1474
|
+
},
|
|
1475
|
+
setup(__props) {
|
|
1476
|
+
const POPOVER_KEY = Symbol("popover");
|
|
1477
|
+
const context = inject(POPOVER_KEY, null);
|
|
1478
|
+
const is_open = context == null ? void 0 : context.is_open;
|
|
1479
|
+
return (_ctx, _cache) => {
|
|
1480
|
+
return unref(is_open) ? (openBlock(), createElementBlock("div", {
|
|
1481
|
+
key: 0,
|
|
1482
|
+
role: "dialog",
|
|
1483
|
+
tabindex: "-1",
|
|
1484
|
+
"data-side": __props.side,
|
|
1485
|
+
"data-align": __props.align
|
|
1486
|
+
}, [
|
|
1487
|
+
renderSlot(_ctx.$slots, "default")
|
|
1488
|
+
], 8, _hoisted_1$8)) : createCommentVNode("", true);
|
|
1489
|
+
};
|
|
1490
|
+
}
|
|
1491
|
+
});
|
|
1492
|
+
const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
1493
|
+
...{
|
|
1494
|
+
name: "Tooltip"
|
|
1495
|
+
},
|
|
1496
|
+
__name: "Tooltip",
|
|
1497
|
+
props: {
|
|
1498
|
+
delay: { default: 200 }
|
|
1499
|
+
},
|
|
1500
|
+
setup(__props, { expose: __expose }) {
|
|
1501
|
+
const TOOLTIP_KEY = Symbol("tooltip");
|
|
1502
|
+
const props = __props;
|
|
1503
|
+
const root_ref = ref(null);
|
|
1504
|
+
const trigger_ref = ref(null);
|
|
1505
|
+
const is_open = ref(false);
|
|
1506
|
+
let timeout_id = null;
|
|
1507
|
+
const open = () => {
|
|
1508
|
+
if (timeout_id) clearTimeout(timeout_id);
|
|
1509
|
+
timeout_id = setTimeout(() => {
|
|
1510
|
+
is_open.value = true;
|
|
1511
|
+
}, props.delay);
|
|
1512
|
+
};
|
|
1513
|
+
const close = () => {
|
|
1514
|
+
if (timeout_id) clearTimeout(timeout_id);
|
|
1515
|
+
is_open.value = false;
|
|
1516
|
+
};
|
|
1517
|
+
const setTriggerRef = (el) => {
|
|
1518
|
+
trigger_ref.value = el;
|
|
1519
|
+
};
|
|
1520
|
+
provide(TOOLTIP_KEY, {
|
|
1521
|
+
is_open,
|
|
1522
|
+
trigger_ref,
|
|
1523
|
+
delay: props.delay,
|
|
1524
|
+
open,
|
|
1525
|
+
close,
|
|
1526
|
+
setTriggerRef
|
|
1527
|
+
});
|
|
1528
|
+
__expose({
|
|
1529
|
+
is_open,
|
|
1530
|
+
open,
|
|
1531
|
+
close
|
|
1532
|
+
});
|
|
1533
|
+
return (_ctx, _cache) => {
|
|
1534
|
+
return openBlock(), createElementBlock("div", {
|
|
1535
|
+
ref_key: "root_ref",
|
|
1536
|
+
ref: root_ref
|
|
1537
|
+
}, [
|
|
1538
|
+
renderSlot(_ctx.$slots, "default", { is_open: is_open.value })
|
|
1539
|
+
], 512);
|
|
1540
|
+
};
|
|
1541
|
+
}
|
|
1542
|
+
});
|
|
1543
|
+
const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
1544
|
+
...{
|
|
1545
|
+
name: "TooltipTrigger"
|
|
1546
|
+
},
|
|
1547
|
+
__name: "TooltipTrigger",
|
|
1548
|
+
setup(__props) {
|
|
1549
|
+
const TOOLTIP_KEY = Symbol("tooltip");
|
|
1550
|
+
const trigger_element = ref(null);
|
|
1551
|
+
const context = inject(TOOLTIP_KEY, null);
|
|
1552
|
+
const handleMouseEnter = () => {
|
|
1553
|
+
context == null ? void 0 : context.open();
|
|
1554
|
+
};
|
|
1555
|
+
const handleMouseLeave = () => {
|
|
1556
|
+
context == null ? void 0 : context.close();
|
|
1557
|
+
};
|
|
1558
|
+
onMounted(() => {
|
|
1559
|
+
context == null ? void 0 : context.setTriggerRef(trigger_element.value);
|
|
1560
|
+
});
|
|
1561
|
+
return (_ctx, _cache) => {
|
|
1562
|
+
return openBlock(), createElementBlock("span", {
|
|
1563
|
+
ref_key: "trigger_element",
|
|
1564
|
+
ref: trigger_element,
|
|
1565
|
+
onMouseenter: handleMouseEnter,
|
|
1566
|
+
onMouseleave: handleMouseLeave,
|
|
1567
|
+
onFocus: handleMouseEnter,
|
|
1568
|
+
onBlur: handleMouseLeave
|
|
1569
|
+
}, [
|
|
1570
|
+
renderSlot(_ctx.$slots, "default")
|
|
1571
|
+
], 544);
|
|
1572
|
+
};
|
|
1573
|
+
}
|
|
1574
|
+
});
|
|
1575
|
+
const _hoisted_1$7 = ["data-side"];
|
|
1576
|
+
const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
1577
|
+
...{
|
|
1578
|
+
name: "TooltipContent"
|
|
1579
|
+
},
|
|
1580
|
+
__name: "TooltipContent",
|
|
1581
|
+
props: {
|
|
1582
|
+
side: { default: "top" }
|
|
1583
|
+
},
|
|
1584
|
+
setup(__props) {
|
|
1585
|
+
const TOOLTIP_KEY = Symbol("tooltip");
|
|
1586
|
+
const context = inject(TOOLTIP_KEY, null);
|
|
1587
|
+
const is_open = context == null ? void 0 : context.is_open;
|
|
1588
|
+
return (_ctx, _cache) => {
|
|
1589
|
+
return unref(is_open) ? (openBlock(), createElementBlock("div", {
|
|
1590
|
+
key: 0,
|
|
1591
|
+
role: "tooltip",
|
|
1592
|
+
"data-side": __props.side
|
|
1593
|
+
}, [
|
|
1594
|
+
renderSlot(_ctx.$slots, "default")
|
|
1595
|
+
], 8, _hoisted_1$7)) : createCommentVNode("", true);
|
|
1596
|
+
};
|
|
1597
|
+
}
|
|
1598
|
+
});
|
|
1599
|
+
const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
1600
|
+
...{
|
|
1601
|
+
name: "DropdownMenu"
|
|
1602
|
+
},
|
|
1603
|
+
__name: "DropdownMenu",
|
|
1604
|
+
setup(__props, { expose: __expose }) {
|
|
1605
|
+
const DROPDOWN_MENU_KEY = Symbol("dropdown-menu");
|
|
1606
|
+
const root_ref = ref(null);
|
|
1607
|
+
const trigger_ref = ref(null);
|
|
1608
|
+
const is_open = ref(false);
|
|
1609
|
+
const open = () => {
|
|
1610
|
+
is_open.value = true;
|
|
1611
|
+
};
|
|
1612
|
+
const close = () => {
|
|
1613
|
+
is_open.value = false;
|
|
1614
|
+
};
|
|
1615
|
+
const toggle = () => {
|
|
1616
|
+
is_open.value = !is_open.value;
|
|
1617
|
+
};
|
|
1618
|
+
const setTriggerRef = (el) => {
|
|
1619
|
+
trigger_ref.value = el;
|
|
1620
|
+
};
|
|
1621
|
+
const handleClickOutside = (event) => {
|
|
1622
|
+
if (!is_open.value) return;
|
|
1623
|
+
const target = event.target;
|
|
1624
|
+
if (root_ref.value && !root_ref.value.contains(target)) {
|
|
1625
|
+
close();
|
|
1626
|
+
}
|
|
1627
|
+
};
|
|
1628
|
+
provide(DROPDOWN_MENU_KEY, {
|
|
1629
|
+
is_open,
|
|
1630
|
+
trigger_ref,
|
|
1631
|
+
open,
|
|
1632
|
+
close,
|
|
1633
|
+
toggle,
|
|
1634
|
+
setTriggerRef
|
|
1635
|
+
});
|
|
1636
|
+
onMounted(() => {
|
|
1637
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
1638
|
+
});
|
|
1639
|
+
onUnmounted(() => {
|
|
1640
|
+
document.removeEventListener("mousedown", handleClickOutside);
|
|
1641
|
+
});
|
|
1642
|
+
__expose({
|
|
1643
|
+
is_open,
|
|
1644
|
+
open,
|
|
1645
|
+
close,
|
|
1646
|
+
toggle
|
|
1647
|
+
});
|
|
1648
|
+
return (_ctx, _cache) => {
|
|
1649
|
+
return openBlock(), createElementBlock("div", {
|
|
1650
|
+
ref_key: "root_ref",
|
|
1651
|
+
ref: root_ref
|
|
1652
|
+
}, [
|
|
1653
|
+
renderSlot(_ctx.$slots, "default", {
|
|
1654
|
+
is_open: is_open.value,
|
|
1655
|
+
open,
|
|
1656
|
+
close,
|
|
1657
|
+
toggle
|
|
1658
|
+
})
|
|
1659
|
+
], 512);
|
|
1660
|
+
};
|
|
1661
|
+
}
|
|
1662
|
+
});
|
|
1663
|
+
const _hoisted_1$6 = ["aria-expanded"];
|
|
1664
|
+
const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
1665
|
+
...{
|
|
1666
|
+
name: "DropdownMenuTrigger"
|
|
1667
|
+
},
|
|
1668
|
+
__name: "DropdownMenuTrigger",
|
|
1669
|
+
setup(__props) {
|
|
1670
|
+
const DROPDOWN_MENU_KEY = Symbol("dropdown-menu");
|
|
1671
|
+
const trigger_element = ref(null);
|
|
1672
|
+
const context = inject(DROPDOWN_MENU_KEY, null);
|
|
1673
|
+
const is_open = (context == null ? void 0 : context.is_open) ?? ref(false);
|
|
1674
|
+
const toggle = () => {
|
|
1675
|
+
context == null ? void 0 : context.toggle();
|
|
1676
|
+
};
|
|
1677
|
+
onMounted(() => {
|
|
1678
|
+
context == null ? void 0 : context.setTriggerRef(trigger_element.value);
|
|
1679
|
+
});
|
|
1680
|
+
return (_ctx, _cache) => {
|
|
1681
|
+
return openBlock(), createElementBlock("button", {
|
|
1682
|
+
ref_key: "trigger_element",
|
|
1683
|
+
ref: trigger_element,
|
|
1684
|
+
type: "button",
|
|
1685
|
+
"aria-expanded": unref(is_open),
|
|
1686
|
+
"aria-haspopup": "menu",
|
|
1687
|
+
onClick: toggle
|
|
1688
|
+
}, [
|
|
1689
|
+
renderSlot(_ctx.$slots, "default", { is_open: unref(is_open) })
|
|
1690
|
+
], 8, _hoisted_1$6);
|
|
1691
|
+
};
|
|
1692
|
+
}
|
|
1693
|
+
});
|
|
1694
|
+
const _hoisted_1$5 = ["data-side", "data-align"];
|
|
1695
|
+
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
1696
|
+
...{
|
|
1697
|
+
name: "DropdownMenuContent"
|
|
1698
|
+
},
|
|
1699
|
+
__name: "DropdownMenuContent",
|
|
1700
|
+
props: {
|
|
1701
|
+
side: { default: "bottom" },
|
|
1702
|
+
align: { default: "start" }
|
|
1703
|
+
},
|
|
1704
|
+
setup(__props) {
|
|
1705
|
+
const DROPDOWN_MENU_KEY = Symbol("dropdown-menu");
|
|
1706
|
+
const context = inject(DROPDOWN_MENU_KEY, null);
|
|
1707
|
+
const is_open = context == null ? void 0 : context.is_open;
|
|
1708
|
+
const handleKeyDown = (event) => {
|
|
1709
|
+
var _a;
|
|
1710
|
+
if (event.key === "Escape") {
|
|
1711
|
+
context == null ? void 0 : context.close();
|
|
1712
|
+
(_a = context == null ? void 0 : context.trigger_ref.value) == null ? void 0 : _a.focus();
|
|
1713
|
+
}
|
|
1714
|
+
};
|
|
1715
|
+
return (_ctx, _cache) => {
|
|
1716
|
+
return unref(is_open) ? (openBlock(), createElementBlock("div", {
|
|
1717
|
+
key: 0,
|
|
1718
|
+
role: "menu",
|
|
1719
|
+
tabindex: "-1",
|
|
1720
|
+
"data-side": __props.side,
|
|
1721
|
+
"data-align": __props.align,
|
|
1722
|
+
onKeydown: handleKeyDown
|
|
1723
|
+
}, [
|
|
1724
|
+
renderSlot(_ctx.$slots, "default")
|
|
1725
|
+
], 40, _hoisted_1$5)) : createCommentVNode("", true);
|
|
1726
|
+
};
|
|
1727
|
+
}
|
|
1728
|
+
});
|
|
1729
|
+
const _hoisted_1$4 = ["data-disabled", "onKeydown"];
|
|
1730
|
+
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
1731
|
+
...{
|
|
1732
|
+
name: "DropdownMenuItem"
|
|
1733
|
+
},
|
|
1734
|
+
__name: "DropdownMenuItem",
|
|
1735
|
+
props: {
|
|
1736
|
+
disabled: { type: Boolean, default: false },
|
|
1737
|
+
closeOnSelect: { type: Boolean, default: true }
|
|
1738
|
+
},
|
|
1739
|
+
emits: ["select"],
|
|
1740
|
+
setup(__props, { emit: __emit }) {
|
|
1741
|
+
const DROPDOWN_MENU_KEY = Symbol("dropdown-menu");
|
|
1742
|
+
const props = __props;
|
|
1743
|
+
const emit = __emit;
|
|
1744
|
+
const context = inject(DROPDOWN_MENU_KEY, null);
|
|
1745
|
+
const handleClick = () => {
|
|
1746
|
+
if (props.disabled) return;
|
|
1747
|
+
emit("select");
|
|
1748
|
+
if (props.closeOnSelect) {
|
|
1749
|
+
context == null ? void 0 : context.close();
|
|
1750
|
+
}
|
|
1751
|
+
};
|
|
1752
|
+
return (_ctx, _cache) => {
|
|
1753
|
+
return openBlock(), createElementBlock("div", {
|
|
1754
|
+
role: "menuitem",
|
|
1755
|
+
tabindex: "0",
|
|
1756
|
+
"data-disabled": __props.disabled ? "" : void 0,
|
|
1757
|
+
onClick: handleClick,
|
|
1758
|
+
onKeydown: [
|
|
1759
|
+
withKeys(handleClick, ["enter"]),
|
|
1760
|
+
withKeys(withModifiers(handleClick, ["prevent"]), ["space"])
|
|
1761
|
+
]
|
|
1762
|
+
}, [
|
|
1763
|
+
renderSlot(_ctx.$slots, "default")
|
|
1764
|
+
], 40, _hoisted_1$4);
|
|
1765
|
+
};
|
|
1766
|
+
}
|
|
1767
|
+
});
|
|
1768
|
+
const _hoisted_1$3 = { role: "separator" };
|
|
1769
|
+
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
1770
|
+
...{
|
|
1771
|
+
name: "DropdownMenuSeparator"
|
|
1772
|
+
},
|
|
1773
|
+
__name: "DropdownMenuSeparator",
|
|
1774
|
+
setup(__props) {
|
|
1775
|
+
return (_ctx, _cache) => {
|
|
1776
|
+
return openBlock(), createElementBlock("div", _hoisted_1$3);
|
|
1777
|
+
};
|
|
1778
|
+
}
|
|
1779
|
+
});
|
|
1780
|
+
const _hoisted_1$2 = { role: "presentation" };
|
|
1781
|
+
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
1782
|
+
...{
|
|
1783
|
+
name: "DropdownMenuLabel"
|
|
1784
|
+
},
|
|
1785
|
+
__name: "DropdownMenuLabel",
|
|
1786
|
+
setup(__props) {
|
|
1787
|
+
return (_ctx, _cache) => {
|
|
1788
|
+
return openBlock(), createElementBlock("div", _hoisted_1$2, [
|
|
1789
|
+
renderSlot(_ctx.$slots, "default")
|
|
1790
|
+
]);
|
|
1791
|
+
};
|
|
1792
|
+
}
|
|
1793
|
+
});
|
|
1794
|
+
const _hoisted_1$1 = ["data-variant", "data-state"];
|
|
1795
|
+
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
1796
|
+
...{
|
|
1797
|
+
name: "Toast"
|
|
1798
|
+
},
|
|
1799
|
+
__name: "Toast",
|
|
1800
|
+
props: {
|
|
1801
|
+
variant: { default: "default" },
|
|
1802
|
+
duration: { default: 5e3 },
|
|
1803
|
+
closable: { type: Boolean, default: true }
|
|
1804
|
+
},
|
|
1805
|
+
emits: ["close"],
|
|
1806
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
1807
|
+
const props = __props;
|
|
1808
|
+
const emit = __emit;
|
|
1809
|
+
const is_visible = ref(true);
|
|
1810
|
+
let timeout_id = null;
|
|
1811
|
+
const close = () => {
|
|
1812
|
+
is_visible.value = false;
|
|
1813
|
+
emit("close");
|
|
1814
|
+
};
|
|
1815
|
+
onMounted(() => {
|
|
1816
|
+
if (props.duration > 0) {
|
|
1817
|
+
timeout_id = setTimeout(close, props.duration);
|
|
1818
|
+
}
|
|
1819
|
+
});
|
|
1820
|
+
onUnmounted(() => {
|
|
1821
|
+
if (timeout_id) {
|
|
1822
|
+
clearTimeout(timeout_id);
|
|
1823
|
+
}
|
|
1824
|
+
});
|
|
1825
|
+
__expose({
|
|
1826
|
+
close
|
|
1827
|
+
});
|
|
1828
|
+
return (_ctx, _cache) => {
|
|
1829
|
+
return openBlock(), createElementBlock("div", {
|
|
1830
|
+
role: "alert",
|
|
1831
|
+
"aria-live": "assertive",
|
|
1832
|
+
"aria-atomic": "true",
|
|
1833
|
+
"data-variant": __props.variant,
|
|
1834
|
+
"data-state": is_visible.value ? "open" : "closed"
|
|
1835
|
+
}, [
|
|
1836
|
+
renderSlot(_ctx.$slots, "default", { close })
|
|
1837
|
+
], 8, _hoisted_1$1);
|
|
1838
|
+
};
|
|
1839
|
+
}
|
|
1840
|
+
});
|
|
1841
|
+
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
1842
|
+
...{
|
|
1843
|
+
name: "ToastTitle"
|
|
1844
|
+
},
|
|
1845
|
+
__name: "ToastTitle",
|
|
1846
|
+
setup(__props) {
|
|
1847
|
+
return (_ctx, _cache) => {
|
|
1848
|
+
return openBlock(), createElementBlock("div", null, [
|
|
1849
|
+
renderSlot(_ctx.$slots, "default")
|
|
1850
|
+
]);
|
|
1851
|
+
};
|
|
1852
|
+
}
|
|
1853
|
+
});
|
|
1854
|
+
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
1855
|
+
...{
|
|
1856
|
+
name: "ToastDescription"
|
|
1857
|
+
},
|
|
1858
|
+
__name: "ToastDescription",
|
|
1859
|
+
setup(__props) {
|
|
1860
|
+
return (_ctx, _cache) => {
|
|
1861
|
+
return openBlock(), createElementBlock("div", null, [
|
|
1862
|
+
renderSlot(_ctx.$slots, "default")
|
|
1863
|
+
]);
|
|
1864
|
+
};
|
|
1865
|
+
}
|
|
1866
|
+
});
|
|
1867
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
1868
|
+
...{
|
|
1869
|
+
name: "ToastClose"
|
|
1870
|
+
},
|
|
1871
|
+
__name: "ToastClose",
|
|
1872
|
+
emits: ["click"],
|
|
1873
|
+
setup(__props) {
|
|
1874
|
+
return (_ctx, _cache) => {
|
|
1875
|
+
return openBlock(), createElementBlock("button", {
|
|
1876
|
+
type: "button",
|
|
1877
|
+
"aria-label": "Close",
|
|
1878
|
+
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("click"))
|
|
1879
|
+
}, [
|
|
1880
|
+
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
1881
|
+
_cache[1] || (_cache[1] = createTextVNode(" × ", -1))
|
|
1882
|
+
])
|
|
1883
|
+
]);
|
|
1884
|
+
};
|
|
1885
|
+
}
|
|
1886
|
+
});
|
|
1887
|
+
const _hoisted_1 = ["data-position"];
|
|
1888
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
1889
|
+
...{
|
|
1890
|
+
name: "Toaster"
|
|
1891
|
+
},
|
|
1892
|
+
__name: "Toaster",
|
|
1893
|
+
props: {
|
|
1894
|
+
position: { default: "bottom-right" },
|
|
1895
|
+
maxToasts: { default: 5 }
|
|
1896
|
+
},
|
|
1897
|
+
setup(__props, { expose: __expose }) {
|
|
1898
|
+
const props = __props;
|
|
1899
|
+
const toasts = ref([]);
|
|
1900
|
+
const add = (toast) => {
|
|
1901
|
+
const id = `toast-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
|
|
1902
|
+
const new_toast = { ...toast, id };
|
|
1903
|
+
toasts.value = [...toasts.value, new_toast].slice(-props.maxToasts);
|
|
1904
|
+
if (toast.duration !== 0) {
|
|
1905
|
+
const duration = toast.duration ?? 5e3;
|
|
1906
|
+
setTimeout(() => dismiss(id), duration);
|
|
1907
|
+
}
|
|
1908
|
+
return id;
|
|
1909
|
+
};
|
|
1910
|
+
const dismiss = (id) => {
|
|
1911
|
+
toasts.value = toasts.value.filter((t3) => t3.id !== id);
|
|
1912
|
+
};
|
|
1913
|
+
const dismissAll = () => {
|
|
1914
|
+
toasts.value = [];
|
|
1915
|
+
};
|
|
1916
|
+
const handleToastEvent = (event) => {
|
|
1917
|
+
add(event.detail);
|
|
1918
|
+
};
|
|
1919
|
+
onMounted(() => {
|
|
1920
|
+
window.addEventListener("soave:toast", handleToastEvent);
|
|
1921
|
+
});
|
|
1922
|
+
onUnmounted(() => {
|
|
1923
|
+
window.removeEventListener("soave:toast", handleToastEvent);
|
|
1924
|
+
});
|
|
1925
|
+
__expose({
|
|
1926
|
+
toasts,
|
|
1927
|
+
add,
|
|
1928
|
+
dismiss,
|
|
1929
|
+
dismissAll
|
|
1930
|
+
});
|
|
1931
|
+
return (_ctx, _cache) => {
|
|
1932
|
+
return openBlock(), createBlock(Teleport, { to: "body" }, [
|
|
1933
|
+
createElementVNode("div", {
|
|
1934
|
+
"data-position": __props.position,
|
|
1935
|
+
"aria-live": "polite",
|
|
1936
|
+
"aria-label": "Notifications"
|
|
1937
|
+
}, [
|
|
1938
|
+
renderSlot(_ctx.$slots, "default", {
|
|
1939
|
+
toasts: toasts.value,
|
|
1940
|
+
dismiss
|
|
1941
|
+
})
|
|
1942
|
+
], 8, _hoisted_1)
|
|
1943
|
+
]);
|
|
1944
|
+
};
|
|
1945
|
+
}
|
|
1946
|
+
});
|
|
1947
|
+
const DIALOG_KEY = Symbol("dialog");
|
|
1948
|
+
const TOOLTIP_CONTEXT_KEY = Symbol("tooltip-context");
|
|
1949
|
+
const POPOVER_CONTEXT_KEY = Symbol("popover-context");
|
|
1950
|
+
const DROPDOWN_CONTEXT_KEY = Symbol("dropdown-context");
|
|
1951
|
+
const SHEET_CONTEXT_KEY = Symbol("sheet-context");
|
|
1952
|
+
const DEFAULT_LIGHT_COLORS = {
|
|
1953
|
+
background: "0 0% 100%",
|
|
1954
|
+
foreground: "222.2 84% 4.9%",
|
|
1955
|
+
card: "0 0% 100%",
|
|
1956
|
+
card_foreground: "222.2 84% 4.9%",
|
|
1957
|
+
popover: "0 0% 100%",
|
|
1958
|
+
popover_foreground: "222.2 84% 4.9%",
|
|
1959
|
+
primary: "222.2 47.4% 11.2%",
|
|
1960
|
+
primary_foreground: "210 40% 98%",
|
|
1961
|
+
secondary: "210 40% 96.1%",
|
|
1962
|
+
secondary_foreground: "222.2 47.4% 11.2%",
|
|
1963
|
+
muted: "210 40% 96.1%",
|
|
1964
|
+
muted_foreground: "215.4 16.3% 46.9%",
|
|
1965
|
+
accent: "210 40% 96.1%",
|
|
1966
|
+
accent_foreground: "222.2 47.4% 11.2%",
|
|
1967
|
+
destructive: "0 84.2% 60.2%",
|
|
1968
|
+
destructive_foreground: "210 40% 98%",
|
|
1969
|
+
border: "214.3 31.8% 91.4%",
|
|
1970
|
+
input: "214.3 31.8% 91.4%",
|
|
1971
|
+
ring: "222.2 84% 4.9%"
|
|
1972
|
+
};
|
|
1973
|
+
const DEFAULT_DARK_COLORS = {
|
|
1974
|
+
background: "222.2 84% 4.9%",
|
|
1975
|
+
foreground: "210 40% 98%",
|
|
1976
|
+
card: "222.2 84% 4.9%",
|
|
1977
|
+
card_foreground: "210 40% 98%",
|
|
1978
|
+
popover: "222.2 84% 4.9%",
|
|
1979
|
+
popover_foreground: "210 40% 98%",
|
|
1980
|
+
primary: "210 40% 98%",
|
|
1981
|
+
primary_foreground: "222.2 47.4% 11.2%",
|
|
1982
|
+
secondary: "217.2 32.6% 17.5%",
|
|
1983
|
+
secondary_foreground: "210 40% 98%",
|
|
1984
|
+
muted: "217.2 32.6% 17.5%",
|
|
1985
|
+
muted_foreground: "215 20.2% 65.1%",
|
|
1986
|
+
accent: "217.2 32.6% 17.5%",
|
|
1987
|
+
accent_foreground: "210 40% 98%",
|
|
1988
|
+
destructive: "0 62.8% 30.6%",
|
|
1989
|
+
destructive_foreground: "210 40% 98%",
|
|
1990
|
+
border: "217.2 32.6% 17.5%",
|
|
1991
|
+
input: "217.2 32.6% 17.5%",
|
|
1992
|
+
ring: "212.7 26.8% 83.9%"
|
|
1993
|
+
};
|
|
1994
|
+
export {
|
|
1995
|
+
ADAPTER_REGISTRY,
|
|
1996
|
+
_sfc_main$P as Alert,
|
|
1997
|
+
_sfc_main$N as AlertDescription,
|
|
1998
|
+
_sfc_main$O as AlertTitle,
|
|
1999
|
+
_sfc_main$Y as Button,
|
|
2000
|
+
C as COMPONENT_ERRORS,
|
|
2001
|
+
COMPONENT_LOGS,
|
|
2002
|
+
CONFIG_LOGS,
|
|
2003
|
+
_sfc_main$V as Card,
|
|
2004
|
+
_sfc_main$R as CardContent,
|
|
2005
|
+
_sfc_main$S as CardDescription,
|
|
2006
|
+
_sfc_main$Q as CardFooter,
|
|
2007
|
+
_sfc_main$U as CardHeader,
|
|
2008
|
+
_sfc_main$T as CardTitle,
|
|
2009
|
+
_sfc_main$M as Checkbox,
|
|
2010
|
+
DEFAULT_DARK_COLORS,
|
|
2011
|
+
DEFAULT_LIGHT_COLORS,
|
|
2012
|
+
D as DEFAULT_UI_CONFIG,
|
|
2013
|
+
A as DIALOG_ERRORS,
|
|
2014
|
+
DIALOG_KEY,
|
|
2015
|
+
DROPDOWN_CONTEXT_KEY,
|
|
2016
|
+
_sfc_main$K as Dialog,
|
|
2017
|
+
_sfc_main$H as DialogContent,
|
|
2018
|
+
_sfc_main$E as DialogDescription,
|
|
2019
|
+
_sfc_main$D as DialogFooter,
|
|
2020
|
+
_sfc_main$G as DialogHeader,
|
|
2021
|
+
_sfc_main$I as DialogOverlay,
|
|
2022
|
+
_sfc_main$F as DialogTitle,
|
|
2023
|
+
_sfc_main$J as DialogTrigger,
|
|
2024
|
+
_sfc_main$a as DropdownMenu,
|
|
2025
|
+
_sfc_main$8 as DropdownMenuContent,
|
|
2026
|
+
_sfc_main$7 as DropdownMenuItem,
|
|
2027
|
+
_sfc_main$5 as DropdownMenuLabel,
|
|
2028
|
+
_sfc_main$6 as DropdownMenuSeparator,
|
|
2029
|
+
_sfc_main$9 as DropdownMenuTrigger,
|
|
2030
|
+
F as FORM_ERRORS,
|
|
2031
|
+
FORM_LOGS,
|
|
2032
|
+
_sfc_main$q as FileInput,
|
|
2033
|
+
_sfc_main$r as FormError,
|
|
2034
|
+
_sfc_main$v as FormField,
|
|
2035
|
+
_sfc_main$t as FormInput,
|
|
2036
|
+
_sfc_main$u as FormLabel,
|
|
2037
|
+
_sfc_main$s as FormTextarea,
|
|
2038
|
+
I as INPUT_ERRORS,
|
|
2039
|
+
_sfc_main$X as Input,
|
|
2040
|
+
POPOVER_CONTEXT_KEY,
|
|
2041
|
+
_sfc_main$g as Popover,
|
|
2042
|
+
_sfc_main$e as PopoverContent,
|
|
2043
|
+
_sfc_main$f as PopoverTrigger,
|
|
2044
|
+
R as RADIO_GROUP_KEY,
|
|
2045
|
+
_sfc_main$x as RadioGroup,
|
|
2046
|
+
_sfc_main$w as RadioItem,
|
|
2047
|
+
S as SELECT_KEY,
|
|
2048
|
+
SHEET_CONTEXT_KEY,
|
|
2049
|
+
_sfc_main$C as Select,
|
|
2050
|
+
_sfc_main$z as SelectContent,
|
|
2051
|
+
_sfc_main$y as SelectItem,
|
|
2052
|
+
_sfc_main$B as SelectTrigger,
|
|
2053
|
+
_sfc_main$A as SelectValue,
|
|
2054
|
+
_sfc_main$p as Sheet,
|
|
2055
|
+
_sfc_main$h as SheetClose,
|
|
2056
|
+
_sfc_main$m as SheetContent,
|
|
2057
|
+
_sfc_main$j as SheetDescription,
|
|
2058
|
+
_sfc_main$i as SheetFooter,
|
|
2059
|
+
_sfc_main$l as SheetHeader,
|
|
2060
|
+
_sfc_main$n as SheetOverlay,
|
|
2061
|
+
_sfc_main$k as SheetTitle,
|
|
2062
|
+
_sfc_main$o as SheetTrigger,
|
|
2063
|
+
_sfc_main$L as Switch,
|
|
2064
|
+
TOOLTIP_CONTEXT_KEY,
|
|
2065
|
+
_sfc_main$W as Textarea,
|
|
2066
|
+
_sfc_main$4 as Toast,
|
|
2067
|
+
_sfc_main$1 as ToastClose,
|
|
2068
|
+
_sfc_main$2 as ToastDescription,
|
|
2069
|
+
_sfc_main$3 as ToastTitle,
|
|
2070
|
+
_sfc_main as Toaster,
|
|
2071
|
+
_sfc_main$d as Tooltip,
|
|
2072
|
+
_sfc_main$b as TooltipContent,
|
|
2073
|
+
_sfc_main$c as TooltipTrigger,
|
|
2074
|
+
i as UI_CONFIG_KEY,
|
|
2075
|
+
U as UI_PROVIDER_KEY,
|
|
2076
|
+
c as cn,
|
|
2077
|
+
cssVariablesAdapter,
|
|
2078
|
+
z as deepMerge,
|
|
2079
|
+
y as generateThemeCSS,
|
|
2080
|
+
getAdapter,
|
|
2081
|
+
getRegisteredAdapters,
|
|
2082
|
+
headlessAdapter,
|
|
2083
|
+
registerAdapter,
|
|
2084
|
+
t2 as tailwindAdapter,
|
|
2085
|
+
t as toast,
|
|
2086
|
+
useButton,
|
|
2087
|
+
useCard,
|
|
2088
|
+
useCheckbox,
|
|
2089
|
+
useDialog,
|
|
2090
|
+
w as useDropdown,
|
|
2091
|
+
q as useFileInput,
|
|
2092
|
+
d as useForm,
|
|
2093
|
+
useInput,
|
|
2094
|
+
v as usePopover,
|
|
2095
|
+
useRadioItem,
|
|
2096
|
+
useSelectContent,
|
|
2097
|
+
useSelectItem,
|
|
2098
|
+
useSelectTrigger,
|
|
2099
|
+
h as useStyleAdapter,
|
|
2100
|
+
useSwitch,
|
|
2101
|
+
useTextarea,
|
|
2102
|
+
x as useTheme,
|
|
2103
|
+
r as useToast,
|
|
2104
|
+
s as useTooltip,
|
|
2105
|
+
f as useUI,
|
|
2106
|
+
g as useUIConfig,
|
|
2107
|
+
e as useUIProvider
|
|
2108
|
+
};
|
|
2109
|
+
//# sourceMappingURL=index.mjs.map
|