@indielayer/ui 1.4.0 → 1.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/docs/components/common/CodePreview.vue +1 -1
- package/docs/components/common/CodeSnippet.vue +5 -7
- package/docs/components/common/DocumentPage.vue +89 -93
- package/docs/components/menu/DocsMenu.vue +75 -122
- package/docs/components/toolbar/PreToolbar.vue +10 -12
- package/docs/components/toolbar/Toolbar.vue +21 -8
- package/docs/layouts/default.vue +7 -3
- package/docs/pages/colors.vue +49 -54
- package/docs/pages/component/button/button-group.vue +6 -2
- package/docs/pages/component/button/size.vue +1 -1
- package/docs/pages/component/carousel/usage.vue +2 -2
- package/docs/pages/component/form/usage.vue +3 -3
- package/docs/pages/component/formGroup/usage.vue +1 -0
- package/docs/pages/component/input/usage.vue +8 -9
- package/docs/pages/component/modal/composed.vue +3 -2
- package/docs/pages/component/modal/usage.vue +11 -6
- package/docs/pages/component/popover/usage.vue +3 -3
- package/docs/pages/component/select/usage.vue +1 -0
- package/docs/pages/component/tabs/usage.vue +6 -1
- package/docs/pages/component/textarea/usage.vue +10 -13
- package/docs/pages/component/toggle/usage.vue +9 -11
- package/docs/pages/component/tooltip/index.vue +2 -2
- package/docs/pages/component/tooltip/usage.vue +4 -8
- package/docs/pages/icons.vue +54 -58
- package/docs/pages/index.vue +73 -77
- package/docs/pages/play.vue +2 -14
- package/docs/pages/typography.vue +26 -30
- package/docs/router/index.ts +2 -0
- package/exports/tailwind.preset.js +0 -1
- package/lib/components/accordion/theme/AccordionItem.base.theme.js +7 -7
- package/lib/components/badge/Badge.vue.js +7 -7
- package/lib/components/breadcrumbs/theme/Breadcrumbs.base.theme.js +1 -1
- package/lib/components/button/theme/Button.base.theme.js +7 -7
- package/lib/components/card/theme/Card.base.theme.js +1 -1
- package/lib/components/checkbox/Checkbox.vue.d.ts +3 -0
- package/lib/components/checkbox/Checkbox.vue2.js +23 -23
- package/lib/components/checkbox/theme/Checkbox.base.theme.js +6 -6
- package/lib/components/checkbox/theme/Checkbox.carbon.theme.js +2 -2
- package/lib/components/container/theme/Container.base.theme.js +2 -2
- package/lib/components/divider/Divider.vue.js +14 -14
- package/lib/components/divider/theme/Divider.base.theme.js +2 -2
- package/lib/components/drawer/Drawer.vue.js +2 -2
- package/lib/components/drawer/theme/Drawer.base.theme.js +1 -1
- package/lib/components/form/Form.vue.js +1 -1
- package/lib/components/form/theme/Form.base.theme.js +4 -4
- package/lib/components/form/theme/Form.carbon.theme.js +4 -4
- package/lib/components/formGroup/FormGroup.vue.d.ts +3 -0
- package/lib/components/formGroup/FormGroup.vue.js +16 -15
- package/lib/components/formGroup/theme/FormGroup.base.theme.js +1 -1
- package/lib/components/icon/theme/Icon.base.theme.js +1 -1
- package/lib/components/index.js +108 -107
- package/lib/components/input/Input.vue.d.ts +3 -0
- package/lib/components/input/Input.vue.js +4 -3
- package/lib/components/input/theme/Input.base.theme.js +10 -10
- package/lib/components/input/theme/Input.carbon.theme.js +10 -10
- package/lib/components/inputFooter/theme/InputFooter.base.theme.js +3 -3
- package/lib/components/inputFooter/theme/InputFooter.carbon.theme.js +2 -2
- package/lib/components/label/Label.vue.d.ts +3 -0
- package/lib/components/label/Label.vue.js +26 -20
- package/lib/components/label/theme/Label.base.theme.js +1 -1
- package/lib/components/label/theme/Label.carbon.theme.js +3 -3
- package/lib/components/link/Link.vue.js +2 -2
- package/lib/components/link/Link.vue2.js +4 -4
- package/lib/components/loader/theme/Loader.base.theme.js +1 -1
- package/lib/components/loader/theme/Loader.carbon.theme.js +1 -1
- package/lib/components/menu/Menu.vue.js +19 -19
- package/lib/components/menu/theme/MenuItem.base.theme.js +21 -31
- package/lib/components/modal/Modal.vue.d.ts +4 -0
- package/lib/components/modal/Modal.vue.js +78 -74
- package/lib/components/modal/theme/Modal.base.theme.js +10 -10
- package/lib/components/modal/theme/Modal.carbon.theme.js +3 -3
- package/lib/components/notifications/Notifications.vue.js +1 -1
- package/lib/components/notifications/theme/Notifications.base.theme.js +1 -1
- package/lib/components/notifications/theme/Notifications.carbon.theme.js +3 -3
- package/lib/components/pagination/Pagination.vue.js +27 -27
- package/lib/components/popover/Popover.vue.d.ts +13 -0
- package/lib/components/popover/Popover.vue.js +13 -8
- package/lib/components/popover/Popover.vue2.js +3 -2
- package/lib/components/popover/Popover.vue3.js +2 -3
- package/lib/components/popover/theme/PopoverContainer.base.theme.js +4 -4
- package/lib/components/popover/theme/PopoverContainer.carbon.theme.js +4 -4
- package/lib/components/progress/Progress.vue.js +11 -11
- package/lib/components/progress/theme/Progress.base.theme.js +10 -10
- package/lib/components/radio/Radio.vue.d.ts +3 -0
- package/lib/components/radio/theme/Radio.base.theme.js +28 -28
- package/lib/components/radio/theme/Radio.carbon.theme.js +8 -8
- package/lib/components/select/Select.vue.d.ts +16 -0
- package/lib/components/select/Select.vue.js +95 -92
- package/lib/components/select/theme/Select.base.theme.js +11 -11
- package/lib/components/select/theme/Select.carbon.theme.js +10 -10
- package/lib/components/skeleton/theme/Skeleton.base.theme.js +1 -1
- package/lib/components/slider/Slider.vue.d.ts +3 -0
- package/lib/components/slider/Slider.vue.js +1 -1
- package/lib/components/slider/theme/Slider.carbon.theme.js +6 -6
- package/lib/components/stepper/Stepper.vue.js +14 -14
- package/lib/components/tab/Tab.vue.js +55 -54
- package/lib/components/tab/theme/TabGroup.base.theme.js +15 -15
- package/lib/components/tab/theme/TabGroup.carbon.theme.js +8 -8
- package/lib/components/table/Table.vue.js +192 -194
- package/lib/components/table/theme/Table.base.theme.js +3 -3
- package/lib/components/table/theme/Table.carbon.theme.js +7 -7
- package/lib/components/table/theme/TableHead.base.theme.js +1 -1
- package/lib/components/table/theme/TableHead.carbon.theme.js +1 -1
- package/lib/components/table/theme/TableHeader.base.theme.js +1 -1
- package/lib/components/table/theme/TableHeader.carbon.theme.js +2 -2
- package/lib/components/table/theme/TableRow.base.theme.js +3 -3
- package/lib/components/table/theme/TableRow.carbon.theme.js +3 -3
- package/lib/components/tag/Tag.vue.js +4 -4
- package/lib/components/textarea/Textarea.vue.d.ts +7 -0
- package/lib/components/textarea/Textarea.vue.js +23 -21
- package/lib/components/textarea/theme/Textarea.base.theme.js +6 -6
- package/lib/components/textarea/theme/Textarea.carbon.theme.js +6 -6
- package/lib/components/toggle/Toggle.vue.d.ts +3 -0
- package/lib/components/toggle/Toggle.vue.js +26 -26
- package/lib/components/toggle/theme/Toggle.base.theme.js +1 -1
- package/lib/components/tooltip/ToggleTip.vue.d.ts +14 -0
- package/lib/components/tooltip/ToggleTip.vue.js +29 -0
- package/lib/components/tooltip/ToggleTip.vue2.js +4 -0
- package/lib/components/tooltip/Tooltip.vue.d.ts +22 -3
- package/lib/components/tooltip/Tooltip.vue.js +26 -17
- package/lib/components/tooltip/__tests__/ToggleTip.spec.d.ts +1 -0
- package/lib/components/tooltip/index.d.ts +2 -0
- package/lib/composables/useColors.js +9 -9
- package/lib/composables/useInputtable.d.ts +1 -0
- package/lib/composables/useInputtable.js +20 -19
- package/lib/index.js +37 -35
- package/lib/index.umd.js +7 -3
- package/lib/tailwind.preset.js +0 -1
- package/lib/themes/base/index.js +3 -6
- package/lib/themes/base/styles.css.js +4 -0
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +2 -1
- package/src/components/accordion/theme/AccordionItem.base.theme.ts +2 -2
- package/src/components/badge/Badge.vue +1 -1
- package/src/components/breadcrumbs/theme/Breadcrumbs.base.theme.ts +1 -1
- package/src/components/button/theme/Button.base.theme.ts +2 -2
- package/src/components/card/theme/Card.base.theme.ts +1 -1
- package/src/components/checkbox/Checkbox.vue +1 -1
- package/src/components/checkbox/theme/Checkbox.base.theme.ts +8 -8
- package/src/components/checkbox/theme/Checkbox.carbon.theme.ts +2 -2
- package/src/components/container/theme/Container.base.theme.ts +2 -2
- package/src/components/divider/Divider.vue +1 -1
- package/src/components/divider/theme/Divider.base.theme.ts +2 -2
- package/src/components/drawer/Drawer.vue +2 -2
- package/src/components/drawer/theme/Drawer.base.theme.ts +1 -1
- package/src/components/form/Form.vue +1 -1
- package/src/components/form/theme/Form.base.theme.ts +1 -1
- package/src/components/form/theme/Form.carbon.theme.ts +1 -1
- package/src/components/formGroup/FormGroup.vue +1 -0
- package/src/components/formGroup/theme/FormGroup.base.theme.ts +1 -1
- package/src/components/icon/theme/Icon.base.theme.ts +2 -2
- package/src/components/input/Input.vue +2 -1
- package/src/components/input/theme/Input.base.theme.ts +5 -5
- package/src/components/input/theme/Input.carbon.theme.ts +6 -6
- package/src/components/inputFooter/theme/InputFooter.base.theme.ts +3 -3
- package/src/components/inputFooter/theme/InputFooter.carbon.theme.ts +2 -2
- package/src/components/label/Label.vue +4 -1
- package/src/components/label/theme/Label.base.theme.ts +1 -1
- package/src/components/label/theme/Label.carbon.theme.ts +1 -1
- package/src/components/link/Link.vue +1 -1
- package/src/components/loader/theme/Loader.base.theme.ts +1 -1
- package/src/components/loader/theme/Loader.carbon.theme.ts +1 -1
- package/src/components/menu/Menu.vue +3 -3
- package/src/components/menu/theme/MenuItem.base.theme.ts +30 -34
- package/src/components/modal/Modal.vue +8 -3
- package/src/components/modal/theme/Modal.base.theme.ts +9 -6
- package/src/components/modal/theme/Modal.carbon.theme.ts +3 -3
- package/src/components/notifications/Notifications.vue +1 -1
- package/src/components/notifications/theme/Notifications.base.theme.ts +1 -1
- package/src/components/notifications/theme/Notifications.carbon.theme.ts +1 -1
- package/src/components/pagination/Pagination.vue +3 -3
- package/src/components/popover/Popover.vue +77 -2
- package/src/components/popover/theme/PopoverContainer.base.theme.ts +1 -1
- package/src/components/popover/theme/PopoverContainer.carbon.theme.ts +1 -1
- package/src/components/progress/Progress.vue +1 -1
- package/src/components/progress/theme/Progress.base.theme.ts +2 -2
- package/src/components/radio/theme/Radio.base.theme.ts +8 -8
- package/src/components/radio/theme/Radio.carbon.theme.ts +1 -1
- package/src/components/select/Select.vue +7 -4
- package/src/components/select/theme/Select.base.theme.ts +8 -8
- package/src/components/select/theme/Select.carbon.theme.ts +8 -8
- package/src/components/skeleton/theme/Skeleton.base.theme.ts +1 -1
- package/src/components/slider/Slider.vue +1 -1
- package/src/components/slider/theme/Slider.carbon.theme.ts +1 -1
- package/src/components/stepper/Stepper.vue +3 -3
- package/src/components/tab/Tab.vue +3 -3
- package/src/components/tab/theme/TabGroup.base.theme.ts +4 -4
- package/src/components/tab/theme/TabGroup.carbon.theme.ts +3 -3
- package/src/components/table/Table.vue +2 -0
- package/src/components/table/theme/Table.base.theme.ts +1 -1
- package/src/components/table/theme/Table.carbon.theme.ts +2 -2
- package/src/components/table/theme/TableHead.base.theme.ts +1 -1
- package/src/components/table/theme/TableHead.carbon.theme.ts +1 -1
- package/src/components/table/theme/TableHeader.base.theme.ts +1 -1
- package/src/components/table/theme/TableHeader.carbon.theme.ts +2 -2
- package/src/components/table/theme/TableRow.base.theme.ts +3 -3
- package/src/components/table/theme/TableRow.carbon.theme.ts +3 -3
- package/src/components/tag/Tag.vue +1 -1
- package/src/components/textarea/Textarea.vue +3 -1
- package/src/components/textarea/theme/Textarea.base.theme.ts +5 -4
- package/src/components/textarea/theme/Textarea.carbon.theme.ts +5 -5
- package/src/components/toggle/Toggle.vue +3 -3
- package/src/components/toggle/theme/Toggle.base.theme.ts +1 -1
- package/src/components/tooltip/ToggleTip.vue +31 -0
- package/src/components/tooltip/Tooltip.vue +14 -4
- package/src/components/tooltip/__tests__/ToggleTip.spec.ts +11 -0
- package/src/components/tooltip/index.ts +3 -0
- package/src/composables/useColors.ts +1 -1
- package/src/composables/useInputtable.ts +1 -0
- package/src/themes/base/index.ts +0 -3
- package/src/themes/base/styles.css +4 -0
- package/src/version.ts +1 -1
- package/volar.d.ts +1 -0
|
@@ -23,6 +23,7 @@ declare const selectProps: {
|
|
|
23
23
|
readonly type: ArrayConstructor;
|
|
24
24
|
readonly default: () => never[];
|
|
25
25
|
};
|
|
26
|
+
tooltip: StringConstructor;
|
|
26
27
|
disabled: BooleanConstructor;
|
|
27
28
|
loading: BooleanConstructor;
|
|
28
29
|
loadingLabel: StringConstructor;
|
|
@@ -35,6 +36,10 @@ declare const selectProps: {
|
|
|
35
36
|
readonly default: "md";
|
|
36
37
|
readonly validator: (value: string) => boolean;
|
|
37
38
|
};
|
|
39
|
+
color: {
|
|
40
|
+
readonly type: StringConstructor;
|
|
41
|
+
readonly default: string | undefined;
|
|
42
|
+
};
|
|
38
43
|
};
|
|
39
44
|
export type SelectOption = {
|
|
40
45
|
value: number | string;
|
|
@@ -71,6 +76,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
71
76
|
readonly type: ArrayConstructor;
|
|
72
77
|
readonly default: () => never[];
|
|
73
78
|
};
|
|
79
|
+
tooltip: StringConstructor;
|
|
74
80
|
disabled: BooleanConstructor;
|
|
75
81
|
loading: BooleanConstructor;
|
|
76
82
|
loadingLabel: StringConstructor;
|
|
@@ -83,6 +89,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
83
89
|
readonly default: "md";
|
|
84
90
|
readonly validator: (value: string) => boolean;
|
|
85
91
|
};
|
|
92
|
+
color: {
|
|
93
|
+
readonly type: StringConstructor;
|
|
94
|
+
readonly default: string | undefined;
|
|
95
|
+
};
|
|
86
96
|
}, {
|
|
87
97
|
focus: () => void | undefined;
|
|
88
98
|
blur: () => void | undefined;
|
|
@@ -112,6 +122,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
112
122
|
readonly type: ArrayConstructor;
|
|
113
123
|
readonly default: () => never[];
|
|
114
124
|
};
|
|
125
|
+
tooltip: StringConstructor;
|
|
115
126
|
disabled: BooleanConstructor;
|
|
116
127
|
loading: BooleanConstructor;
|
|
117
128
|
loadingLabel: StringConstructor;
|
|
@@ -124,11 +135,16 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
124
135
|
readonly default: "md";
|
|
125
136
|
readonly validator: (value: string) => boolean;
|
|
126
137
|
};
|
|
138
|
+
color: {
|
|
139
|
+
readonly type: StringConstructor;
|
|
140
|
+
readonly default: string | undefined;
|
|
141
|
+
};
|
|
127
142
|
}>> & {
|
|
128
143
|
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
129
144
|
}, {
|
|
130
145
|
disabled: boolean;
|
|
131
146
|
flat: boolean;
|
|
147
|
+
color: string;
|
|
132
148
|
size: import("../../composables/useCommon").Size;
|
|
133
149
|
loading: boolean;
|
|
134
150
|
loadingStatus: import("../loader/Loader.vue").LoaderStatus;
|
|
@@ -1,35 +1,37 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as pe, ref as A, computed as I, watch as O, nextTick as U, unref as s, openBlock as o, createBlock as c, mergeProps as X, toHandlers as H, withCtx as b, createElementVNode as C, createElementBlock as a, normalizeClass as R, Fragment as v, renderList as E, createTextVNode as z, toDisplayString as m, createVNode as K, withDirectives as ve, vModelSelect as ce, renderSlot as me, createCommentVNode as ye } from "vue";
|
|
2
2
|
import { useEventListener as he } from "../../node_modules/.pnpm/@vueuse_core@10.2.0_vue@3.3.9/node_modules/@vueuse/core/index.js";
|
|
3
|
+
import { useColors as be } from "../../composables/useColors.js";
|
|
3
4
|
import { useCommon as G } from "../../composables/useCommon.js";
|
|
4
5
|
import { useInputtable as D } from "../../composables/useInputtable.js";
|
|
5
6
|
import { useInteractive as J } from "../../composables/useInteractive.js";
|
|
6
|
-
import { useTheme as
|
|
7
|
-
import { checkIcon as
|
|
8
|
-
import
|
|
7
|
+
import { useTheme as ke } from "../../composables/useTheme.js";
|
|
8
|
+
import { checkIcon as ge, selectIcon as we } from "../../common/icons.js";
|
|
9
|
+
import Ae from "../label/Label.vue.js";
|
|
9
10
|
import W from "../tag/Tag.vue.js";
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import "../popover/Popover.
|
|
15
|
-
import
|
|
16
|
-
import
|
|
11
|
+
import Ie from "../icon/Icon.vue.js";
|
|
12
|
+
import Re from "../menu/MenuItem.vue.js";
|
|
13
|
+
import Ve from "../spinner/Spinner.vue.js";
|
|
14
|
+
import _e from "../popover/Popover.vue.js";
|
|
15
|
+
import "../popover/Popover.vue3.js";
|
|
16
|
+
import $e from "../popover/PopoverContainer.vue.js";
|
|
17
|
+
import Ce from "../inputFooter/InputFooter.vue.js";
|
|
17
18
|
const Ee = { class: "relative" }, ze = {
|
|
18
19
|
key: 0,
|
|
19
20
|
class: "flex gap-1 flex-wrap"
|
|
20
|
-
},
|
|
21
|
+
}, Se = {
|
|
21
22
|
key: 0,
|
|
22
|
-
class: "text-
|
|
23
|
-
},
|
|
23
|
+
class: "text-secondary-400 dark:text-secondary-500"
|
|
24
|
+
}, Ne = { key: 1 }, Oe = {
|
|
24
25
|
key: 0,
|
|
25
26
|
class: "flex gap-1 flex-wrap"
|
|
26
|
-
},
|
|
27
|
+
}, De = {
|
|
27
28
|
key: 0,
|
|
28
|
-
class: "text-
|
|
29
|
-
},
|
|
29
|
+
class: "text-secondary-400 dark:text-secondary-500"
|
|
30
|
+
}, Le = { key: 1 }, Be = {
|
|
30
31
|
key: 1,
|
|
31
|
-
class: "px-2 text-center text-
|
|
32
|
-
},
|
|
32
|
+
class: "px-2 text-center text-secondary-400"
|
|
33
|
+
}, Te = ["id", "name", "disabled", "multiple", "readonly"], Fe = ["value", "disabled"], Pe = {
|
|
34
|
+
...be.props("primary"),
|
|
33
35
|
...G.props(),
|
|
34
36
|
...J.props(),
|
|
35
37
|
...D.props(),
|
|
@@ -38,22 +40,22 @@ const Ee = { class: "relative" }, ze = {
|
|
|
38
40
|
multiple: Boolean,
|
|
39
41
|
flat: Boolean,
|
|
40
42
|
native: Boolean
|
|
41
|
-
},
|
|
43
|
+
}, qe = {
|
|
42
44
|
name: "XSelect",
|
|
43
45
|
validators: {
|
|
44
46
|
...G.validators()
|
|
45
47
|
}
|
|
46
|
-
},
|
|
47
|
-
...
|
|
48
|
-
props:
|
|
48
|
+
}, nl = /* @__PURE__ */ pe({
|
|
49
|
+
...qe,
|
|
50
|
+
props: Pe,
|
|
49
51
|
emits: D.emits(),
|
|
50
52
|
setup(Q, { expose: Y, emit: Z }) {
|
|
51
|
-
const r = Q,
|
|
53
|
+
const r = Q, V = Z, k = A(null), S = A(null), _ = A(null), f = A(null), u = A(), t = I({
|
|
52
54
|
get() {
|
|
53
55
|
return r.multiple ? r.modelValue ? Array.isArray(r.modelValue) ? r.modelValue : [r.modelValue] : [] : r.modelValue;
|
|
54
56
|
},
|
|
55
57
|
set(e) {
|
|
56
|
-
|
|
58
|
+
V("update:modelValue", e);
|
|
57
59
|
}
|
|
58
60
|
}), d = I(() => !r.options || r.options.length === 0 ? [] : r.options.map((e) => {
|
|
59
61
|
let i = !1;
|
|
@@ -62,7 +64,7 @@ const Ee = { class: "relative" }, ze = {
|
|
|
62
64
|
label: e.label,
|
|
63
65
|
active: i,
|
|
64
66
|
disabled: e.disabled,
|
|
65
|
-
iconRight: i ?
|
|
67
|
+
iconRight: i ? ge : void 0,
|
|
66
68
|
onClick: () => T(e.value)
|
|
67
69
|
};
|
|
68
70
|
})), L = I(() => {
|
|
@@ -90,10 +92,10 @@ const Ee = { class: "relative" }, ze = {
|
|
|
90
92
|
}
|
|
91
93
|
function B(e) {
|
|
92
94
|
var i;
|
|
93
|
-
|
|
95
|
+
_.value && ((i = _.value[e]) == null || i.$el.scrollIntoView({ block: "nearest", inline: "nearest" }));
|
|
94
96
|
}
|
|
95
97
|
O(u, (e) => {
|
|
96
|
-
typeof e < "u" &&
|
|
98
|
+
typeof e < "u" && _.value && B(e);
|
|
97
99
|
});
|
|
98
100
|
function N(e, i = "down") {
|
|
99
101
|
if (!L.value || L.value.length === 0) {
|
|
@@ -119,41 +121,41 @@ const Ee = { class: "relative" }, ze = {
|
|
|
119
121
|
if (r.multiple)
|
|
120
122
|
if (Array.isArray(t.value)) {
|
|
121
123
|
const n = t.value.indexOf(e);
|
|
122
|
-
n !== -1 ? t.value.splice(n, 1) : (t.value.push(e),
|
|
124
|
+
n !== -1 ? t.value.splice(n, 1) : (t.value.push(e), V("update:modelValue", t.value));
|
|
123
125
|
} else
|
|
124
126
|
t.value = [e];
|
|
125
127
|
else
|
|
126
128
|
t.value = e;
|
|
127
129
|
r.native || U(() => {
|
|
128
|
-
var n,
|
|
129
|
-
(n = k.value) == null || n.dispatchEvent(new Event("input")), (
|
|
130
|
+
var n, p, w;
|
|
131
|
+
(n = k.value) == null || n.dispatchEvent(new Event("input")), (p = k.value) == null || p.dispatchEvent(new Event("change")), (w = S.value) == null || w.$el.focus();
|
|
130
132
|
});
|
|
131
133
|
}
|
|
132
134
|
}
|
|
133
|
-
function
|
|
135
|
+
function F(e) {
|
|
134
136
|
return !!(typeof e > "u" || e === null || e === "" || Array.isArray(e) && e.length === 0 || !Array.isArray(e) && typeof e == "object" && Object.keys(e).length === 0);
|
|
135
137
|
}
|
|
136
|
-
function
|
|
138
|
+
function P(e, i) {
|
|
137
139
|
e.stopPropagation();
|
|
138
140
|
const l = t.value.indexOf(i);
|
|
139
|
-
l !== -1 && (t.value.splice(l, 1),
|
|
141
|
+
l !== -1 && (t.value.splice(l, 1), V("update:modelValue", t.value));
|
|
140
142
|
}
|
|
141
143
|
function $(e) {
|
|
142
144
|
var l;
|
|
143
145
|
const i = (l = r.options) == null ? void 0 : l.find((n) => n.value === e);
|
|
144
146
|
return i ? i.label : "";
|
|
145
147
|
}
|
|
146
|
-
const { focus:
|
|
147
|
-
errorInternal:
|
|
148
|
+
const { focus: q, blur: le } = J(k), {
|
|
149
|
+
errorInternal: j,
|
|
148
150
|
hideFooterInternal: ie,
|
|
149
|
-
inputListeners:
|
|
151
|
+
inputListeners: x,
|
|
150
152
|
reset: te,
|
|
151
153
|
validate: ne,
|
|
152
|
-
setError:
|
|
154
|
+
setError: oe,
|
|
153
155
|
isFocused: re,
|
|
154
|
-
isInsideForm:
|
|
155
|
-
} = D(r, { focus:
|
|
156
|
-
const { focus: e, blur: i } = s(
|
|
156
|
+
isInsideForm: ae
|
|
157
|
+
} = D(r, { focus: q, emit: V, withListeners: !0 }), se = I(() => {
|
|
158
|
+
const { focus: e, blur: i } = s(x);
|
|
157
159
|
return {
|
|
158
160
|
focus: e,
|
|
159
161
|
blur: i
|
|
@@ -166,7 +168,7 @@ const Ee = { class: "relative" }, ze = {
|
|
|
166
168
|
immediate: !0
|
|
167
169
|
});
|
|
168
170
|
function ue(e) {
|
|
169
|
-
var i, l, n,
|
|
171
|
+
var i, l, n, p, w;
|
|
170
172
|
if (d.value.length !== 0)
|
|
171
173
|
if (e.code === "ArrowDown") {
|
|
172
174
|
if (e.preventDefault(), !y.value) {
|
|
@@ -185,15 +187,15 @@ const Ee = { class: "relative" }, ze = {
|
|
|
185
187
|
(n = f.value) == null || n.show();
|
|
186
188
|
return;
|
|
187
189
|
}
|
|
188
|
-
typeof u.value < "u" && (T(d.value[u.value].value), r.multiple || (
|
|
190
|
+
typeof u.value < "u" && (T(d.value[u.value].value), r.multiple || (p = f.value) == null || p.hide());
|
|
189
191
|
} else
|
|
190
192
|
e.code === "Tab" && y.value && (e.preventDefault(), (w = f.value) == null || w.hide(), r.native || U(() => {
|
|
191
193
|
var M;
|
|
192
194
|
(M = S.value) == null || M.$el.focus();
|
|
193
195
|
}));
|
|
194
196
|
}
|
|
195
|
-
const { styles: de, classes: h, className: fe } =
|
|
196
|
-
return Y({ focus:
|
|
197
|
+
const { styles: de, classes: h, className: fe } = ke("Select", {}, r, { errorInternal: j });
|
|
198
|
+
return Y({ focus: q, blur: le, reset: te, validate: ne, setError: oe }), (e, i) => (o(), c(Ae, X({
|
|
197
199
|
ref_key: "labelRef",
|
|
198
200
|
ref: S,
|
|
199
201
|
tabindex: "0",
|
|
@@ -204,99 +206,100 @@ const Ee = { class: "relative" }, ze = {
|
|
|
204
206
|
style: s(de),
|
|
205
207
|
disabled: e.disabled,
|
|
206
208
|
required: e.required,
|
|
207
|
-
"is-inside-form": s(
|
|
208
|
-
label: e.label
|
|
209
|
+
"is-inside-form": s(ae),
|
|
210
|
+
label: e.label,
|
|
211
|
+
tooltip: e.tooltip
|
|
209
212
|
}, H(se.value)), {
|
|
210
213
|
default: b(() => [
|
|
211
|
-
|
|
212
|
-
e.native && !e.multiple ? (
|
|
214
|
+
C("div", Ee, [
|
|
215
|
+
e.native && !e.multiple ? (o(), a("div", {
|
|
213
216
|
key: 0,
|
|
214
|
-
class:
|
|
217
|
+
class: R(s(h).box),
|
|
215
218
|
onClick: i[0] || (i[0] = (l) => {
|
|
216
219
|
var n;
|
|
217
220
|
return (n = k.value) == null ? void 0 : n.click();
|
|
218
221
|
})
|
|
219
222
|
}, [
|
|
220
|
-
e.multiple && Array.isArray(t.value) && t.value.length > 0 ? (
|
|
221
|
-
(
|
|
223
|
+
e.multiple && Array.isArray(t.value) && t.value.length > 0 ? (o(), a("div", ze, [
|
|
224
|
+
(o(!0), a(v, null, E(t.value, (l) => (o(), c(W, {
|
|
222
225
|
key: l,
|
|
223
226
|
size: "xs",
|
|
224
227
|
outlined: "",
|
|
225
228
|
removable: "",
|
|
226
229
|
onRemove: (n) => {
|
|
227
|
-
|
|
230
|
+
P(n, l);
|
|
228
231
|
}
|
|
229
232
|
}, {
|
|
230
233
|
default: b(() => [
|
|
231
|
-
|
|
234
|
+
z(m($(l)), 1)
|
|
232
235
|
]),
|
|
233
236
|
_: 2
|
|
234
237
|
}, 1032, ["onRemove"]))), 128))
|
|
235
|
-
])) : !e.multiple && !
|
|
236
|
-
|
|
237
|
-
], 64)) : (
|
|
238
|
-
e.placeholder ? (
|
|
238
|
+
])) : !e.multiple && !F(t.value) ? (o(), a(v, { key: 1 }, [
|
|
239
|
+
z(m($(t.value)), 1)
|
|
240
|
+
], 64)) : (o(), a(v, { key: 2 }, [
|
|
241
|
+
e.placeholder ? (o(), a("div", Se, m(e.placeholder), 1)) : (o(), a("div", Ne, " "))
|
|
239
242
|
], 64))
|
|
240
|
-
], 2)) : (
|
|
243
|
+
], 2)) : (o(), c(_e, {
|
|
241
244
|
key: 1,
|
|
242
245
|
ref_key: "popoverRef",
|
|
243
246
|
ref: f,
|
|
244
247
|
disabled: e.disabled || e.loading || e.readonly
|
|
245
248
|
}, {
|
|
246
249
|
content: b(() => [
|
|
247
|
-
K(
|
|
248
|
-
class:
|
|
250
|
+
K($e, {
|
|
251
|
+
class: R(s(h).content)
|
|
249
252
|
}, {
|
|
250
253
|
default: b(() => [
|
|
251
|
-
d.value.length > 0 ? (
|
|
254
|
+
d.value.length > 0 ? (o(!0), a(v, { key: 0 }, E(d.value, (l, n) => (o(), c(Re, {
|
|
252
255
|
key: n,
|
|
253
256
|
ref_for: !0,
|
|
254
257
|
ref_key: "itemsRef",
|
|
255
|
-
ref:
|
|
258
|
+
ref: _,
|
|
256
259
|
item: l,
|
|
257
260
|
size: e.size,
|
|
258
261
|
disabled: l.disabled,
|
|
259
262
|
selected: n === u.value,
|
|
260
|
-
color:
|
|
263
|
+
color: e.color,
|
|
261
264
|
filled: "",
|
|
262
265
|
onClick: i[1] || (i[1] = () => {
|
|
263
|
-
var
|
|
264
|
-
return !e.multiple && ((
|
|
266
|
+
var p;
|
|
267
|
+
return !e.multiple && ((p = f.value) == null ? void 0 : p.hide());
|
|
265
268
|
})
|
|
266
|
-
}, null, 8, ["item", "size", "disabled", "selected"]))), 128)) : (
|
|
269
|
+
}, null, 8, ["item", "size", "disabled", "selected", "color"]))), 128)) : (o(), a("div", Be, " No options "))
|
|
267
270
|
]),
|
|
268
271
|
_: 1
|
|
269
272
|
}, 8, ["class"])
|
|
270
273
|
]),
|
|
271
274
|
default: b(() => [
|
|
272
|
-
|
|
273
|
-
class:
|
|
275
|
+
C("div", {
|
|
276
|
+
class: R([s(h).box])
|
|
274
277
|
}, [
|
|
275
|
-
e.multiple && Array.isArray(t.value) && t.value.length > 0 ? (
|
|
276
|
-
(
|
|
278
|
+
e.multiple && Array.isArray(t.value) && t.value.length > 0 ? (o(), a("div", Oe, [
|
|
279
|
+
(o(!0), a(v, null, E(t.value, (l) => (o(), c(W, {
|
|
277
280
|
key: l,
|
|
278
281
|
size: "xs",
|
|
279
282
|
outlined: "",
|
|
280
283
|
removable: "",
|
|
281
284
|
onRemove: (n) => {
|
|
282
|
-
|
|
285
|
+
P(n, l);
|
|
283
286
|
}
|
|
284
287
|
}, {
|
|
285
288
|
default: b(() => [
|
|
286
|
-
|
|
289
|
+
z(m($(l)), 1)
|
|
287
290
|
]),
|
|
288
291
|
_: 2
|
|
289
292
|
}, 1032, ["onRemove"]))), 128))
|
|
290
|
-
])) : !e.multiple && !
|
|
291
|
-
|
|
292
|
-
], 64)) : (
|
|
293
|
-
e.placeholder ? (
|
|
293
|
+
])) : !e.multiple && !F(t.value) ? (o(), a(v, { key: 1 }, [
|
|
294
|
+
z(m($(t.value)), 1)
|
|
295
|
+
], 64)) : (o(), a(v, { key: 2 }, [
|
|
296
|
+
e.placeholder ? (o(), a("div", De, m(e.placeholder), 1)) : (o(), a("div", Le, " "))
|
|
294
297
|
], 64))
|
|
295
298
|
], 2)
|
|
296
299
|
]),
|
|
297
300
|
_: 1
|
|
298
301
|
}, 8, ["disabled"])),
|
|
299
|
-
|
|
302
|
+
ve(C("select", X({
|
|
300
303
|
id: e.id,
|
|
301
304
|
ref_key: "elRef",
|
|
302
305
|
ref: k,
|
|
@@ -307,39 +310,39 @@ const Ee = { class: "relative" }, ze = {
|
|
|
307
310
|
disabled: e.disabled || e.loading,
|
|
308
311
|
multiple: e.multiple,
|
|
309
312
|
readonly: e.readonly
|
|
310
|
-
}, H(s(
|
|
311
|
-
(
|
|
313
|
+
}, H(s(x), !0)), [
|
|
314
|
+
(o(!0), a(v, null, E(e.options, (l, n) => (o(), a("option", {
|
|
312
315
|
key: n,
|
|
313
316
|
value: l.value,
|
|
314
317
|
disabled: l.disabled
|
|
315
|
-
}, m(l.label), 9,
|
|
316
|
-
], 16,
|
|
318
|
+
}, m(l.label), 9, Fe))), 128))
|
|
319
|
+
], 16, Te), [
|
|
317
320
|
[ce, t.value]
|
|
318
321
|
]),
|
|
319
|
-
|
|
320
|
-
class:
|
|
322
|
+
C("div", {
|
|
323
|
+
class: R(s(h).iconWrapper)
|
|
321
324
|
}, [
|
|
322
|
-
e.loading ? (
|
|
325
|
+
e.loading ? (o(), c(Ve, {
|
|
323
326
|
key: 0,
|
|
324
327
|
size: e.size
|
|
325
328
|
}, null, 8, ["size"])) : me(e.$slots, "icon", { key: 1 }, () => [
|
|
326
|
-
K(
|
|
327
|
-
icon: s(
|
|
328
|
-
class:
|
|
329
|
+
K(Ie, {
|
|
330
|
+
icon: s(we),
|
|
331
|
+
class: R([s(h).icon])
|
|
329
332
|
}, null, 8, ["icon", "class"])
|
|
330
333
|
])
|
|
331
334
|
], 2)
|
|
332
335
|
]),
|
|
333
|
-
s(ie) ? ye("", !0) : (
|
|
336
|
+
s(ie) ? ye("", !0) : (o(), c(Ce, {
|
|
334
337
|
key: 0,
|
|
335
|
-
error: s(
|
|
338
|
+
error: s(j),
|
|
336
339
|
helper: e.helper
|
|
337
340
|
}, null, 8, ["error", "helper"]))
|
|
338
341
|
]),
|
|
339
342
|
_: 3
|
|
340
|
-
}, 16, ["style", "disabled", "required", "is-inside-form", "label", "class"]));
|
|
343
|
+
}, 16, ["style", "disabled", "required", "is-inside-form", "label", "class", "tooltip"]));
|
|
341
344
|
}
|
|
342
345
|
});
|
|
343
346
|
export {
|
|
344
|
-
|
|
347
|
+
nl as default
|
|
345
348
|
};
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
const
|
|
1
|
+
const t = {
|
|
2
2
|
classes: {
|
|
3
3
|
wrapper: "",
|
|
4
|
-
box: ({ props: e, data:
|
|
5
|
-
const r = ["w-full border border-
|
|
6
|
-
return !
|
|
4
|
+
box: ({ props: e, data: s }) => {
|
|
5
|
+
const r = ["w-full border border-secondary-300 dark:border-secondary-700 pr-8 outline-transparent outline outline-2 outline-offset-[-1px] transition-all duration-150 ease-in-out rounded-md shadow-sm"];
|
|
6
|
+
return !s.errorInternal && !e.disabled && r.push("hover:border-secondary-400 dark:hover:border-secondary-500"), e.size === "xs" ? r.push("px-2 py-1 text-xs") : e.size === "sm" ? r.push("px-2 py-2 text-sm") : e.size === "lg" ? r.push("px-4 py-3 text-lg") : e.size === "xl" ? r.push("px-5 py-4 text-xl") : r.push("px-3 py-2"), e.disabled ? r.push("bg-secondary-100 dark:bg-secondary-700 text-secondary-400 dark:text-secondary-600 cursor-not-allowed") : r.push("bg-white dark:bg-secondary-800 text-secondary-700 dark:text-secondary-200"), s.errorInternal ? r.push("border-error-500 dark:border-error-400 group-focus:outline-error-500") : e.disabled || r.push("group-focus:outline-[color:var(--x-select-border)]"), r;
|
|
7
7
|
},
|
|
8
|
-
content: "
|
|
8
|
+
content: "p-1 max-h-72 overflow-y-auto",
|
|
9
9
|
iconWrapper: "pointer-events-none absolute inset-y-0 right-0 flex items-center px-2",
|
|
10
10
|
icon: ({ props: e }) => {
|
|
11
|
-
const
|
|
12
|
-
return e.size === "sm" || e.size === "xs" ?
|
|
11
|
+
const s = [""];
|
|
12
|
+
return e.size === "sm" || e.size === "xs" ? s.push("h-3 w-3") : e.size === "lg" ? s.push("h-6 w-6") : e.size === "xl" ? s.push("h-7 w-7") : s.push("h-5 w-5"), e.disabled ? s.push("text-secondary-300 dark:text-secondary-500") : s.push("text-secondary-500 dark:text-secondary-400"), s;
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
|
-
styles: ({ colors: e, css:
|
|
15
|
+
styles: ({ colors: e, css: s }) => {
|
|
16
16
|
const r = e.getPalette("primary");
|
|
17
|
-
return
|
|
17
|
+
return s.get("border", r[500]);
|
|
18
18
|
}
|
|
19
|
-
},
|
|
19
|
+
}, o = t;
|
|
20
20
|
export {
|
|
21
|
-
|
|
21
|
+
o as default
|
|
22
22
|
};
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
const
|
|
1
|
+
const o = {
|
|
2
2
|
classes: {
|
|
3
3
|
wrapper: "",
|
|
4
|
-
box: ({ props: e, data:
|
|
5
|
-
const r = ["w-full border-b text-sm px-4 border-
|
|
6
|
-
return !
|
|
4
|
+
box: ({ props: e, data: s }) => {
|
|
5
|
+
const r = ["w-full border-b text-sm px-4 border-secondary-300 dark:border-secondary-700 pr-8 outline-transparent outline outline-2 outline-offset-[-1px] transition-all duration-150 ease-in-out"];
|
|
6
|
+
return !s.errorInternal && !e.disabled && r.push("hover:border-secondary-400 dark:hover:border-secondary-500"), e.size === "xs" || e.size === "sm" ? r.push("py-1.5") : e.size === "lg" || e.size === "xl" ? r.push("py-3.5") : r.push("py-2.5"), e.disabled ? r.push("bg-secondary-100 dark:bg-secondary-900 text-secondary-300 cursor-not-allowed") : e.readonly ? r.push("bg-white dark:bg-secondary-900 text-secondary-700") : r.push("bg-secondary-50 dark:bg-secondary-800 text-secondary-700 dark:text-secondary-200"), s.errorInternal ? r.push("border-error-500 dark:border-error-400 group-focus:outline-error-500") : e.disabled || r.push("group-focus:outline-[color:var(--x-select-border)]"), r;
|
|
7
7
|
},
|
|
8
8
|
content: "py-1 max-h-72 overflow-y-auto",
|
|
9
9
|
iconWrapper: "pointer-events-none absolute inset-y-0 right-0 flex items-center px-2",
|
|
10
10
|
icon: ({ props: e }) => {
|
|
11
|
-
const
|
|
12
|
-
return e.disabled ?
|
|
11
|
+
const s = ["h-5 w-5"];
|
|
12
|
+
return e.disabled ? s.push("text-secondary-300 dark:text-secondary-500") : s.push("text-secondary-500 dark:text-secondary-400"), s;
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
|
-
styles: ({ colors: e, css:
|
|
15
|
+
styles: ({ colors: e, css: s }) => {
|
|
16
16
|
const r = e.getPalette("primary");
|
|
17
|
-
return
|
|
17
|
+
return s.get("border", r[500]);
|
|
18
18
|
}
|
|
19
|
-
},
|
|
19
|
+
}, t = o;
|
|
20
20
|
export {
|
|
21
|
-
|
|
21
|
+
t as default
|
|
22
22
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const a = {
|
|
2
2
|
classes: {
|
|
3
3
|
wrapper: ({ props: s }) => {
|
|
4
|
-
const e = ["animate-pulse bg-
|
|
4
|
+
const e = ["animate-pulse bg-secondary-300 dark:bg-secondary-600"];
|
|
5
5
|
return s.shape === "circle" ? e.push("w-8 h-8 rounded-full") : e.push("rounded-md"), e;
|
|
6
6
|
}
|
|
7
7
|
}
|
|
@@ -25,6 +25,7 @@ declare const sliderProps: {
|
|
|
25
25
|
readonly type: ArrayConstructor;
|
|
26
26
|
readonly default: () => never[];
|
|
27
27
|
};
|
|
28
|
+
tooltip: StringConstructor;
|
|
28
29
|
disabled: BooleanConstructor;
|
|
29
30
|
loading: BooleanConstructor;
|
|
30
31
|
loadingLabel: StringConstructor;
|
|
@@ -71,6 +72,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
71
72
|
readonly type: ArrayConstructor;
|
|
72
73
|
readonly default: () => never[];
|
|
73
74
|
};
|
|
75
|
+
tooltip: StringConstructor;
|
|
74
76
|
disabled: BooleanConstructor;
|
|
75
77
|
loading: BooleanConstructor;
|
|
76
78
|
loadingLabel: StringConstructor;
|
|
@@ -118,6 +120,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
118
120
|
readonly type: ArrayConstructor;
|
|
119
121
|
readonly default: () => never[];
|
|
120
122
|
};
|
|
123
|
+
tooltip: StringConstructor;
|
|
121
124
|
disabled: BooleanConstructor;
|
|
122
125
|
loading: BooleanConstructor;
|
|
123
126
|
loadingLabel: StringConstructor;
|
|
@@ -135,7 +135,7 @@ const oe = { class: "flex items-center relative w-full" }, ae = { class: "-mx-2"
|
|
|
135
135
|
]),
|
|
136
136
|
l(y) ? (k(), Q("p", {
|
|
137
137
|
key: 0,
|
|
138
|
-
class: "text-sm text-
|
|
138
|
+
class: "text-sm text-error-500 mt-1",
|
|
139
139
|
textContent: U(l(y))
|
|
140
140
|
}, null, 8, se)) : Y("", !0)
|
|
141
141
|
]),
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
const
|
|
1
|
+
const o = {
|
|
2
2
|
classes: {
|
|
3
3
|
wrapper: "",
|
|
4
|
-
drag: "w-[16px] h-[16px] -mt-[11px] -ml-[8px] rounded-full bg-
|
|
4
|
+
drag: "w-[16px] h-[16px] -mt-[11px] -ml-[8px] rounded-full bg-secondary-900 dark:bg-secondary-100"
|
|
5
5
|
},
|
|
6
6
|
styles: ({ props: r, colors: e, css: t }) => {
|
|
7
|
-
const a = e.getPalette("primary"),
|
|
7
|
+
const a = e.getPalette("primary"), s = e.getPalette(r.color);
|
|
8
8
|
return t.variables({
|
|
9
|
-
bg:
|
|
9
|
+
bg: s[500],
|
|
10
10
|
border: a[500]
|
|
11
11
|
});
|
|
12
12
|
}
|
|
13
|
-
},
|
|
13
|
+
}, l = o;
|
|
14
14
|
export {
|
|
15
|
-
|
|
15
|
+
l as default
|
|
16
16
|
};
|