@indielayer/ui 1.6.0 → 1.6.2
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/toolbar/Toolbar.vue +4 -2
- package/docs/components/toolbar/ToolbarSearch.vue +256 -0
- package/docs/pages/component/button/usage.vue +1 -1
- package/docs/pages/component/checkbox/states.vue +1 -1
- package/docs/pages/component/checkbox/usage.vue +1 -8
- package/docs/pages/component/input/size.vue +3 -2
- package/docs/pages/component/input/states.vue +3 -3
- package/docs/pages/component/input/usage.vue +1 -1
- package/docs/pages/component/input/variants.vue +2 -2
- package/docs/pages/component/radio/usage.vue +6 -7
- package/docs/pages/component/table/usage.vue +35 -40
- package/docs/pages/component/textarea/states.vue +8 -9
- package/docs/pages/component/textarea/variants.vue +7 -8
- package/docs/search/components.json +1 -0
- package/lib/components/button/theme/Button.base.theme.js +1 -1
- package/lib/components/card/theme/Card.base.theme.js +3 -3
- package/lib/components/checkbox/Checkbox.vue.d.ts +13 -3
- package/lib/components/datepicker/theme/Datepicker.base.theme.js +4 -5
- package/lib/components/formGroup/FormGroup.vue.d.ts +13 -3
- package/lib/components/input/Input.vue.d.ts +13 -3
- package/lib/components/input/Input.vue.js +15 -15
- package/lib/components/input/theme/Input.base.theme.js +1 -1
- package/lib/components/modal/Modal.vue.d.ts +30 -4
- package/lib/components/modal/Modal.vue.js +74 -60
- package/lib/components/modal/theme/Modal.base.theme.js +12 -8
- package/lib/components/notifications/theme/Notifications.base.theme.js +1 -1
- package/lib/components/radio/Radio.vue.d.ts +13 -3
- package/lib/components/select/Select.vue.d.ts +13 -3
- package/lib/components/select/theme/Select.base.theme.js +1 -1
- package/lib/components/slider/Slider.vue.d.ts +13 -3
- package/lib/components/slider/Slider.vue.js +2 -2
- package/lib/components/slider/Slider.vue2.js +5 -5
- package/lib/components/slider/theme/Slider.base.theme.js +1 -1
- package/lib/components/table/Table.vue.js +101 -98
- package/lib/components/table/theme/TableCell.base.theme.js +1 -1
- package/lib/components/table/theme/TableHead.base.theme.js +5 -5
- package/lib/components/table/theme/TableHeader.base.theme.js +2 -2
- package/lib/components/table/theme/TableRow.base.theme.js +1 -1
- package/lib/components/textarea/Textarea.vue.d.ts +13 -3
- package/lib/components/textarea/Textarea.vue.js +9 -9
- package/lib/components/textarea/theme/Textarea.base.theme.js +1 -1
- package/lib/components/toggle/Toggle.vue.d.ts +13 -3
- package/lib/composables/useInputtable.d.ts +4 -1
- package/lib/composables/useInputtable.js +22 -19
- package/lib/index.js +1 -1
- package/lib/index.umd.js +5 -6
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +7 -5
- 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/datepicker/Datepicker.vue +29 -29
- package/src/components/datepicker/theme/Datepicker.base.theme.ts +1 -2
- package/src/components/input/Input.vue +3 -4
- package/src/components/input/theme/Input.base.theme.ts +1 -1
- package/src/components/modal/Modal.vue +32 -18
- package/src/components/modal/theme/Modal.base.theme.ts +10 -0
- package/src/components/notifications/theme/Notifications.base.theme.ts +1 -1
- package/src/components/select/theme/Select.base.theme.ts +1 -1
- package/src/components/slider/Slider.vue +1 -1
- package/src/components/slider/theme/Slider.base.theme.ts +1 -1
- package/src/components/table/Table.vue +1 -1
- package/src/components/table/theme/TableCell.base.theme.ts +1 -1
- package/src/components/table/theme/TableHead.base.theme.ts +2 -2
- package/src/components/table/theme/TableHeader.base.theme.ts +2 -2
- package/src/components/table/theme/TableRow.base.theme.ts +1 -1
- package/src/components/textarea/Textarea.vue +1 -1
- package/src/components/textarea/theme/Textarea.base.theme.ts +1 -1
- package/src/composables/useInputtable.ts +5 -1
- package/src/version.ts +1 -1
|
@@ -5,7 +5,10 @@ declare const formGroupProps: {
|
|
|
5
5
|
type: BooleanConstructor;
|
|
6
6
|
default: boolean;
|
|
7
7
|
};
|
|
8
|
-
modelValue:
|
|
8
|
+
modelValue: {
|
|
9
|
+
readonly type: import("vue").PropType<string | number | boolean | object | any[] | undefined>;
|
|
10
|
+
readonly default: undefined;
|
|
11
|
+
};
|
|
9
12
|
id: StringConstructor;
|
|
10
13
|
name: StringConstructor;
|
|
11
14
|
readonly: BooleanConstructor;
|
|
@@ -51,7 +54,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
51
54
|
type: BooleanConstructor;
|
|
52
55
|
default: boolean;
|
|
53
56
|
};
|
|
54
|
-
modelValue:
|
|
57
|
+
modelValue: {
|
|
58
|
+
readonly type: import("vue").PropType<string | number | boolean | object | any[] | undefined>;
|
|
59
|
+
readonly default: undefined;
|
|
60
|
+
};
|
|
55
61
|
id: StringConstructor;
|
|
56
62
|
name: StringConstructor;
|
|
57
63
|
readonly: BooleanConstructor;
|
|
@@ -87,7 +93,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
87
93
|
type: BooleanConstructor;
|
|
88
94
|
default: boolean;
|
|
89
95
|
};
|
|
90
|
-
modelValue:
|
|
96
|
+
modelValue: {
|
|
97
|
+
readonly type: import("vue").PropType<string | number | boolean | object | any[] | undefined>;
|
|
98
|
+
readonly default: undefined;
|
|
99
|
+
};
|
|
91
100
|
id: StringConstructor;
|
|
92
101
|
name: StringConstructor;
|
|
93
102
|
readonly: BooleanConstructor;
|
|
@@ -118,6 +127,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
118
127
|
disabled: boolean;
|
|
119
128
|
loading: boolean;
|
|
120
129
|
loadingStatus: import("../loader/Loader.vue").LoaderStatus;
|
|
130
|
+
modelValue: string | number | boolean | object | any[] | undefined;
|
|
121
131
|
readonly: boolean;
|
|
122
132
|
required: boolean;
|
|
123
133
|
validateOnInput: boolean;
|
|
@@ -22,7 +22,10 @@ declare const inputProps: {
|
|
|
22
22
|
default: string;
|
|
23
23
|
};
|
|
24
24
|
block: BooleanConstructor;
|
|
25
|
-
modelValue:
|
|
25
|
+
modelValue: {
|
|
26
|
+
readonly type: PropType<string | number | boolean | object | any[] | undefined>;
|
|
27
|
+
readonly default: undefined;
|
|
28
|
+
};
|
|
26
29
|
id: StringConstructor;
|
|
27
30
|
name: StringConstructor;
|
|
28
31
|
readonly: BooleanConstructor;
|
|
@@ -86,7 +89,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
86
89
|
default: string;
|
|
87
90
|
};
|
|
88
91
|
block: BooleanConstructor;
|
|
89
|
-
modelValue:
|
|
92
|
+
modelValue: {
|
|
93
|
+
readonly type: PropType<string | number | boolean | object | any[] | undefined>;
|
|
94
|
+
readonly default: undefined;
|
|
95
|
+
};
|
|
90
96
|
id: StringConstructor;
|
|
91
97
|
name: StringConstructor;
|
|
92
98
|
readonly: BooleanConstructor;
|
|
@@ -148,7 +154,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
148
154
|
default: string;
|
|
149
155
|
};
|
|
150
156
|
block: BooleanConstructor;
|
|
151
|
-
modelValue:
|
|
157
|
+
modelValue: {
|
|
158
|
+
readonly type: PropType<string | number | boolean | object | any[] | undefined>;
|
|
159
|
+
readonly default: undefined;
|
|
160
|
+
};
|
|
152
161
|
id: StringConstructor;
|
|
153
162
|
name: StringConstructor;
|
|
154
163
|
readonly: BooleanConstructor;
|
|
@@ -192,6 +201,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
192
201
|
block: boolean;
|
|
193
202
|
loading: boolean;
|
|
194
203
|
loadingStatus: import("../loader/Loader.vue").LoaderStatus;
|
|
204
|
+
modelValue: string | number | boolean | object | any[] | undefined;
|
|
195
205
|
readonly: boolean;
|
|
196
206
|
required: boolean;
|
|
197
207
|
validateOnInput: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as F, ref as y, watch as H, openBlock as
|
|
1
|
+
import { defineComponent as F, ref as y, watch as H, openBlock as l, createBlock as t, normalizeStyle as X, unref as r, normalizeClass as a, withCtx as j, createElementVNode as h, renderSlot as b, createCommentVNode as u, mergeProps as A, toHandlers as D } from "vue";
|
|
2
2
|
import { useTheme as G } from "../../composables/useTheme.js";
|
|
3
3
|
import { useColors as J } from "../../composables/useColors.js";
|
|
4
4
|
import { useCommon as v } from "../../composables/useCommon.js";
|
|
@@ -60,21 +60,21 @@ const U = { class: "relative" }, W = ["id", "disabled", "min", "max", "minlength
|
|
|
60
60
|
function C() {
|
|
61
61
|
n.value = n.value === "password" ? "text" : "password";
|
|
62
62
|
}
|
|
63
|
-
const { focus: g, blur:
|
|
63
|
+
const { focus: g, blur: R } = S(c), {
|
|
64
64
|
errorInternal: m,
|
|
65
|
-
hideFooterInternal:
|
|
66
|
-
isInsideForm:
|
|
67
|
-
inputListeners:
|
|
68
|
-
reset:
|
|
65
|
+
hideFooterInternal: V,
|
|
66
|
+
isInsideForm: $,
|
|
67
|
+
inputListeners: L,
|
|
68
|
+
reset: P,
|
|
69
69
|
validate: B,
|
|
70
70
|
setError: T
|
|
71
71
|
} = f(o, { focus: g, emit: N }), { styles: q, classes: s, className: E } = G("Input", {}, o, { errorInternal: m });
|
|
72
|
-
return w({ focus: g, blur:
|
|
72
|
+
return w({ focus: g, blur: R, reset: P, validate: B, setError: T }), (e, i) => (l(), t(O, {
|
|
73
73
|
style: X(r(q)),
|
|
74
74
|
block: e.block,
|
|
75
75
|
disabled: e.disabled,
|
|
76
76
|
required: e.required,
|
|
77
|
-
"is-inside-form": r(
|
|
77
|
+
"is-inside-form": r($),
|
|
78
78
|
label: e.label,
|
|
79
79
|
class: a([
|
|
80
80
|
r(E),
|
|
@@ -85,10 +85,10 @@ const U = { class: "relative" }, W = ["id", "disabled", "min", "max", "minlength
|
|
|
85
85
|
default: j(() => [
|
|
86
86
|
h("div", U, [
|
|
87
87
|
b(e.$slots, "prefix", {}, () => [
|
|
88
|
-
e.iconLeft ? (
|
|
88
|
+
e.iconLeft || e.icon ? (l(), t(d, {
|
|
89
89
|
key: 0,
|
|
90
90
|
size: e.size,
|
|
91
|
-
icon: e.iconLeft,
|
|
91
|
+
icon: e.iconLeft || e.icon,
|
|
92
92
|
class: a(["ml-2 left-1", r(s).icon])
|
|
93
93
|
}, null, 8, ["size", "icon", "class"])) : u("", !0)
|
|
94
94
|
]),
|
|
@@ -116,15 +116,15 @@ const U = { class: "relative" }, W = ["id", "disabled", "min", "max", "minlength
|
|
|
116
116
|
placeholder: e.placeholder,
|
|
117
117
|
readonly: e.readonly,
|
|
118
118
|
type: n.value,
|
|
119
|
-
value: e.modelValue
|
|
120
|
-
},
|
|
119
|
+
value: typeof e.modelValue < "u" ? e.modelValue : ""
|
|
120
|
+
}, D(r(L), !0), { onChange: I }), null, 16, W),
|
|
121
121
|
b(e.$slots, "suffix", {}, () => [
|
|
122
|
-
e.iconRight ? (
|
|
122
|
+
e.iconRight ? (l(), t(d, {
|
|
123
123
|
key: 0,
|
|
124
124
|
size: e.size,
|
|
125
125
|
icon: e.iconRight,
|
|
126
126
|
class: a(["mr-2 right-1", r(s).icon])
|
|
127
|
-
}, null, 8, ["size", "icon", "class"])) : e.type === "password" && e.showPasswordToggle ? (
|
|
127
|
+
}, null, 8, ["size", "icon", "class"])) : e.type === "password" && e.showPasswordToggle ? (l(), t(d, {
|
|
128
128
|
key: 1,
|
|
129
129
|
size: e.size,
|
|
130
130
|
icon: n.value === "password" ? r(K) : r(M),
|
|
@@ -133,7 +133,7 @@ const U = { class: "relative" }, W = ["id", "disabled", "min", "max", "minlength
|
|
|
133
133
|
}, null, 8, ["size", "icon", "class"])) : u("", !0)
|
|
134
134
|
])
|
|
135
135
|
]),
|
|
136
|
-
r(
|
|
136
|
+
r(V) ? u("", !0) : (l(), t(Q, {
|
|
137
137
|
key: 0,
|
|
138
138
|
error: r(m),
|
|
139
139
|
helper: e.helper
|
|
@@ -3,7 +3,7 @@ const o = {
|
|
|
3
3
|
wrapper: "",
|
|
4
4
|
input: ({ props: r, data: s }) => {
|
|
5
5
|
const e = ["appearance-none block w-full placeholder-secondary-400 dark:placeholder-secondary-500 outline-transparent outline outline-2 outline-offset-[-1px] transition-all duration-150 ease-in-out border-secondary-300 dark:border-secondary-700 border shadow-sm rounded-md"];
|
|
6
|
-
return !s.errorInternal && !r.disabled && e.push("hover:border-secondary-400 dark:hover:border-secondary-500"), r.size === "xs" ? e.push("px-2 py-1 text-xs") : r.size === "sm" ? e.push("px-2 py-
|
|
6
|
+
return !s.errorInternal && !r.disabled && e.push("hover:border-secondary-400 dark:hover:border-secondary-500"), r.size === "xs" ? e.push("px-2 py-1 text-xs") : r.size === "sm" ? e.push("px-2 py-1.5 text-sm") : r.size === "lg" ? e.push("px-4 py-3 text-lg") : r.size === "xl" ? e.push("px-5 py-4 text-xl") : e.push("px-3 py-2"), e.push(r.disabled ? "bg-secondary-100 dark:bg-secondary-700 text-secondary-400 dark:text-secondary-600 cursor-not-allowed" : "bg-white dark:bg-secondary-800 text-secondary-700 dark:text-secondary-200"), e;
|
|
7
7
|
},
|
|
8
8
|
icon: "text-secondary-600 dark:text-secondary-300 absolute my-auto inset-y-0"
|
|
9
9
|
},
|
|
@@ -2,14 +2,22 @@ import { type PropType, type ExtractPublicPropTypes } from 'vue';
|
|
|
2
2
|
import { type ThemeComponent } from '../../composables/useTheme';
|
|
3
3
|
import { type FormError } from '../form/Form.vue';
|
|
4
4
|
declare const modalSize: readonly ["xs", "sm", "md", "lg", "xl", "full"];
|
|
5
|
+
declare const modalPosition: readonly ["top", "center", "bottom"];
|
|
5
6
|
declare const modalProps: {
|
|
6
7
|
size: {
|
|
7
8
|
type: PropType<"xs" | "sm" | "md" | "lg" | "xl" | "full">;
|
|
8
9
|
default: string;
|
|
9
10
|
};
|
|
11
|
+
position: {
|
|
12
|
+
type: PropType<"top" | "bottom" | "center">;
|
|
13
|
+
default: string;
|
|
14
|
+
};
|
|
10
15
|
modelValue: BooleanConstructor;
|
|
11
16
|
showClose: BooleanConstructor;
|
|
12
|
-
backdrop:
|
|
17
|
+
backdrop: {
|
|
18
|
+
type: BooleanConstructor;
|
|
19
|
+
default: boolean;
|
|
20
|
+
};
|
|
13
21
|
hasActions: {
|
|
14
22
|
type: BooleanConstructor;
|
|
15
23
|
default: boolean;
|
|
@@ -39,8 +47,9 @@ declare const modalProps: {
|
|
|
39
47
|
persistent: BooleanConstructor;
|
|
40
48
|
};
|
|
41
49
|
export type ModalSize = typeof modalSize[number];
|
|
50
|
+
export type ModalPosition = typeof modalPosition[number];
|
|
42
51
|
export type ModalProps = ExtractPublicPropTypes<typeof modalProps>;
|
|
43
|
-
type InternalClasses = 'wrapper' | 'backdrop' | 'modal' | 'closeIcon' | 'header' | 'content' | 'actions' | 'title' | 'description' | 'label';
|
|
52
|
+
type InternalClasses = 'wrapper' | 'backdrop' | 'modal' | 'modalWrapper' | 'closeIcon' | 'header' | 'content' | 'actions' | 'title' | 'description' | 'label';
|
|
44
53
|
type InternaData = {
|
|
45
54
|
visible: boolean;
|
|
46
55
|
};
|
|
@@ -51,9 +60,16 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
51
60
|
type: PropType<"xs" | "sm" | "md" | "lg" | "xl" | "full">;
|
|
52
61
|
default: string;
|
|
53
62
|
};
|
|
63
|
+
position: {
|
|
64
|
+
type: PropType<"top" | "bottom" | "center">;
|
|
65
|
+
default: string;
|
|
66
|
+
};
|
|
54
67
|
modelValue: BooleanConstructor;
|
|
55
68
|
showClose: BooleanConstructor;
|
|
56
|
-
backdrop:
|
|
69
|
+
backdrop: {
|
|
70
|
+
type: BooleanConstructor;
|
|
71
|
+
default: boolean;
|
|
72
|
+
};
|
|
57
73
|
hasActions: {
|
|
58
74
|
type: BooleanConstructor;
|
|
59
75
|
default: boolean;
|
|
@@ -89,9 +105,16 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
89
105
|
type: PropType<"xs" | "sm" | "md" | "lg" | "xl" | "full">;
|
|
90
106
|
default: string;
|
|
91
107
|
};
|
|
108
|
+
position: {
|
|
109
|
+
type: PropType<"top" | "bottom" | "center">;
|
|
110
|
+
default: string;
|
|
111
|
+
};
|
|
92
112
|
modelValue: BooleanConstructor;
|
|
93
113
|
showClose: BooleanConstructor;
|
|
94
|
-
backdrop:
|
|
114
|
+
backdrop: {
|
|
115
|
+
type: BooleanConstructor;
|
|
116
|
+
default: boolean;
|
|
117
|
+
};
|
|
95
118
|
hasActions: {
|
|
96
119
|
type: BooleanConstructor;
|
|
97
120
|
default: boolean;
|
|
@@ -124,6 +147,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
124
147
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
125
148
|
}, {
|
|
126
149
|
size: "xs" | "sm" | "md" | "lg" | "xl" | "full";
|
|
150
|
+
position: "top" | "bottom" | "center";
|
|
127
151
|
loading: boolean;
|
|
128
152
|
modelValue: boolean;
|
|
129
153
|
fluid: boolean;
|
|
@@ -139,7 +163,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
139
163
|
}, {}>, {
|
|
140
164
|
image?(_: {}): any;
|
|
141
165
|
header?(_: {}): any;
|
|
166
|
+
"header-content"?(_: {}): any;
|
|
142
167
|
default?(_: {}): any;
|
|
168
|
+
footer?(_: {}): any;
|
|
143
169
|
actions?(_: {}): any;
|
|
144
170
|
"cancel-action"?(_: {}): any;
|
|
145
171
|
"tertiary-action"?(_: {}): any;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as X, ref as f, watch as g, nextTick as B, useSlots as H, computed as I, openBlock as t, createBlock as p, Teleport as M, createElementBlock as r, normalizeStyle as j, unref as o, normalizeClass as a, createCommentVNode as s, createElementVNode as S, resolveDynamicComponent as K, withCtx as w, renderSlot as i, toDisplayString as v } from "vue";
|
|
2
2
|
import { onClickOutside as L, useEventListener as q } from "../../node_modules/.pnpm/@vueuse_core@10.2.0_vue@3.3.9/node_modules/@vueuse/core/index.js";
|
|
3
3
|
import { useTheme as G } from "../../composables/useTheme.js";
|
|
4
4
|
import { useFocusTrap as J } from "../../composables/useFocusTrap.js";
|
|
@@ -6,14 +6,21 @@ import { closeIcon as Q } from "../../common/icons.js";
|
|
|
6
6
|
import U from "../button/Button.vue.js";
|
|
7
7
|
import Y from "../scroll/Scroll.vue.js";
|
|
8
8
|
import Z from "../form/Form.vue.js";
|
|
9
|
-
const _ = {
|
|
9
|
+
const _ = { key: 0 }, x = ["xs", "sm", "md", "lg", "xl", "full"], ee = ["top", "center", "bottom"], oe = {
|
|
10
10
|
size: {
|
|
11
11
|
type: String,
|
|
12
12
|
default: "xl"
|
|
13
13
|
},
|
|
14
|
+
position: {
|
|
15
|
+
type: String,
|
|
16
|
+
default: "center"
|
|
17
|
+
},
|
|
14
18
|
modelValue: Boolean,
|
|
15
19
|
showClose: Boolean,
|
|
16
|
-
backdrop:
|
|
20
|
+
backdrop: {
|
|
21
|
+
type: Boolean,
|
|
22
|
+
default: !0
|
|
23
|
+
},
|
|
17
24
|
hasActions: {
|
|
18
25
|
type: Boolean,
|
|
19
26
|
default: !0
|
|
@@ -45,14 +52,15 @@ const _ = { class: "flex items-end sm:items-center justify-center p-4 sm:p-6 h-s
|
|
|
45
52
|
}, te = {
|
|
46
53
|
name: "XModal",
|
|
47
54
|
validators: {
|
|
48
|
-
size:
|
|
55
|
+
size: x,
|
|
56
|
+
position: ee
|
|
49
57
|
}
|
|
50
|
-
}, ce = /* @__PURE__ */
|
|
58
|
+
}, ce = /* @__PURE__ */ X({
|
|
51
59
|
...te,
|
|
52
60
|
props: oe,
|
|
53
61
|
emits: ["update:modelValue", "submit"],
|
|
54
|
-
setup(
|
|
55
|
-
const n =
|
|
62
|
+
setup($, { expose: V, emit: C }) {
|
|
63
|
+
const n = $, b = C, u = f(n.modelValue), d = f(!1), y = f(null), T = f(null), { initFocusTrap: D, clearFocusTrap: z } = J();
|
|
56
64
|
let c;
|
|
57
65
|
g(u, (e) => {
|
|
58
66
|
c && (c(), c = void 0), e && setTimeout(() => {
|
|
@@ -80,26 +88,28 @@ const _ = { class: "flex items-end sm:items-center justify-center p-4 sm:p-6 h-s
|
|
|
80
88
|
function O() {
|
|
81
89
|
b("update:modelValue", !0), d.value = !0;
|
|
82
90
|
}
|
|
83
|
-
const k =
|
|
91
|
+
const k = H(), R = I(() => !!(k["tertiary-action"] || k["cancel-action"])), { styles: N, classes: l, className: P } = G("Modal", {}, n, {
|
|
84
92
|
visible: d
|
|
85
93
|
});
|
|
86
|
-
return
|
|
87
|
-
u.value ? (t(),
|
|
94
|
+
return V({ open: O, close: m }), (e, h) => (t(), p(M, { to: "body" }, [
|
|
95
|
+
u.value ? (t(), r("div", {
|
|
88
96
|
key: 0,
|
|
89
97
|
ref_key: "modalWrapperRef",
|
|
90
|
-
ref:
|
|
91
|
-
style:
|
|
92
|
-
class:
|
|
93
|
-
o(
|
|
98
|
+
ref: T,
|
|
99
|
+
style: j(o(N)),
|
|
100
|
+
class: a([
|
|
101
|
+
o(P),
|
|
94
102
|
o(l).wrapper,
|
|
95
103
|
d.value ? "visible" : "invisible ease-in duration-100"
|
|
96
104
|
])
|
|
97
105
|
}, [
|
|
98
|
-
e.backdrop ? (t(),
|
|
106
|
+
e.backdrop ? (t(), r("div", {
|
|
99
107
|
key: 0,
|
|
100
|
-
class:
|
|
101
|
-
}, null, 2)) :
|
|
102
|
-
S("div",
|
|
108
|
+
class: a(o(l).backdrop)
|
|
109
|
+
}, null, 2)) : s("", !0),
|
|
110
|
+
S("div", {
|
|
111
|
+
class: a(o(l).modalWrapper)
|
|
112
|
+
}, [
|
|
103
113
|
(t(), p(K(e.isForm ? Z : "div"), {
|
|
104
114
|
ref_key: "modalRef",
|
|
105
115
|
ref: y,
|
|
@@ -108,75 +118,79 @@ const _ = { class: "flex items-end sm:items-center justify-center p-4 sm:p-6 h-s
|
|
|
108
118
|
title: e.formTitle,
|
|
109
119
|
description: e.formDescription,
|
|
110
120
|
errors: e.formErrors,
|
|
111
|
-
class:
|
|
121
|
+
class: a(o(l).modal),
|
|
112
122
|
"auto-focus": "",
|
|
113
123
|
"has-footer": !1,
|
|
114
124
|
role: "dialog",
|
|
115
125
|
"aria-modal": "true",
|
|
116
126
|
"aria-labelledby": "modal-headline",
|
|
117
|
-
onSubmit: h[0] || (h[0] = (
|
|
127
|
+
onSubmit: h[0] || (h[0] = (W) => e.$emit("submit", W))
|
|
118
128
|
}, {
|
|
119
129
|
default: w(() => [
|
|
120
|
-
|
|
121
|
-
e
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
e
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
130
|
+
i(e.$slots, "image"),
|
|
131
|
+
i(e.$slots, "header", {}, () => [
|
|
132
|
+
e.hasHeader ? (t(), r("div", {
|
|
133
|
+
key: 0,
|
|
134
|
+
class: a(o(l).header)
|
|
135
|
+
}, [
|
|
136
|
+
i(e.$slots, "header-content", {}, () => [
|
|
137
|
+
e.label ? (t(), r("div", {
|
|
138
|
+
key: 0,
|
|
139
|
+
class: a(o(l).label)
|
|
140
|
+
}, v(e.label), 3)) : s("", !0),
|
|
141
|
+
e.title ? (t(), r("div", {
|
|
142
|
+
key: 1,
|
|
143
|
+
class: a(o(l).title)
|
|
144
|
+
}, v(e.title), 3)) : s("", !0)
|
|
145
|
+
])
|
|
146
|
+
], 2)) : s("", !0)
|
|
147
|
+
]),
|
|
136
148
|
e.$slots.default ? (t(), p(Y, {
|
|
137
|
-
key:
|
|
149
|
+
key: 0,
|
|
138
150
|
scrollbar: !1,
|
|
139
151
|
vertical: ""
|
|
140
152
|
}, {
|
|
141
153
|
default: w(() => [
|
|
142
154
|
S("div", {
|
|
143
|
-
class:
|
|
155
|
+
class: a(o(l).content)
|
|
144
156
|
}, [
|
|
145
|
-
e.description ? (t(),
|
|
157
|
+
e.description ? (t(), r("div", {
|
|
146
158
|
key: 0,
|
|
147
|
-
class:
|
|
148
|
-
}, v(e.description), 3)) :
|
|
149
|
-
|
|
159
|
+
class: a(o(l).description)
|
|
160
|
+
}, v(e.description), 3)) : s("", !0),
|
|
161
|
+
i(e.$slots, "default")
|
|
150
162
|
], 2)
|
|
151
163
|
]),
|
|
152
164
|
_: 3
|
|
153
|
-
})) :
|
|
165
|
+
})) : s("", !0),
|
|
154
166
|
e.showClose ? (t(), p(U, {
|
|
155
|
-
key:
|
|
167
|
+
key: 1,
|
|
156
168
|
ghost: "",
|
|
157
169
|
size: "sm",
|
|
158
170
|
tabindex: "-1",
|
|
159
171
|
icon: o(Q),
|
|
160
|
-
class:
|
|
172
|
+
class: a(o(l).closeIcon),
|
|
161
173
|
onClick: m
|
|
162
|
-
}, null, 8, ["icon", "class"])) :
|
|
163
|
-
e
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
174
|
+
}, null, 8, ["icon", "class"])) : s("", !0),
|
|
175
|
+
i(e.$slots, "footer", {}, () => [
|
|
176
|
+
e.hasActions ? (t(), r("div", {
|
|
177
|
+
key: 0,
|
|
178
|
+
class: a(o(l).actions)
|
|
179
|
+
}, [
|
|
180
|
+
i(e.$slots, "actions", {}, () => [
|
|
181
|
+
i(e.$slots, "cancel-action"),
|
|
182
|
+
R.value ? (t(), r("div", _)) : s("", !0),
|
|
183
|
+
i(e.$slots, "tertiary-action"),
|
|
184
|
+
i(e.$slots, "secondary-action"),
|
|
185
|
+
i(e.$slots, "primary-action")
|
|
186
|
+
])
|
|
187
|
+
], 2)) : s("", !0)
|
|
188
|
+
])
|
|
175
189
|
]),
|
|
176
190
|
_: 3
|
|
177
191
|
}, 40, ["disabled", "auto-validate", "title", "description", "errors", "class"]))
|
|
178
|
-
])
|
|
179
|
-
], 6)) :
|
|
192
|
+
], 2)
|
|
193
|
+
], 6)) : s("", !0)
|
|
180
194
|
]));
|
|
181
195
|
}
|
|
182
196
|
});
|
|
@@ -2,22 +2,26 @@ const a = {
|
|
|
2
2
|
classes: {
|
|
3
3
|
wrapper: "fixed z-40 inset-0 overflow-y-auto transition-all",
|
|
4
4
|
backdrop: ({ data: e }) => {
|
|
5
|
-
const
|
|
6
|
-
return e.visible ?
|
|
5
|
+
const s = ["fixed inset-0 bg-secondary-500 dark:bg-black transition-opacity"];
|
|
6
|
+
return e.visible ? s.push("ease-out duration-200 opacity-30 dark:opacity-70") : s.push("ease-in duration-100 opacity-0"), s;
|
|
7
7
|
},
|
|
8
|
-
|
|
9
|
-
const s = ["
|
|
10
|
-
return
|
|
8
|
+
modalWrapper: ({ props: e }) => {
|
|
9
|
+
const s = ["flex justify-center p-4 sm:p-8 md:py-20 h-screen"];
|
|
10
|
+
return e.position === "top" ? s.push("items-start") : e.position === "bottom" ? s.push("items-end") : s.push("sm:items-end items-center"), s;
|
|
11
|
+
},
|
|
12
|
+
modal: ({ props: e, data: s }) => {
|
|
13
|
+
const t = ["relative flex flex-col z-10 bg-white dark:bg-secondary-900 rounded-md shadow-lg transform transition-all overflow-hidden max-h-full w-full"];
|
|
14
|
+
return s.visible ? t.push("ease-out duration-200 opacity-100 translate-y-0 sm:scale-100") : t.push("ease-in duration-200 opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"), e.size === "xs" ? t.push("sm:max-w-xs") : e.size === "sm" ? t.push("sm:max-w-sm") : e.size === "lg" ? t.push("sm:max-w-xl") : e.size === "xl" ? t.push("sm:max-w-3xl") : t.push("sm:max-w-lg"), t;
|
|
11
15
|
},
|
|
12
16
|
closeIcon: "!absolute top-2 z-10 right-2",
|
|
13
17
|
header: "text-lg pl-6 py-4 border-b pr-12",
|
|
14
18
|
content: "px-6 py-4",
|
|
15
|
-
actions: ({ props: e, slots:
|
|
19
|
+
actions: ({ props: e, slots: s }) => ["flex gap-4 bg-secondary-50 dark:bg-secondary-800 p-4 justify-end"],
|
|
16
20
|
label: "text-xs text-secondary-500 mb-1",
|
|
17
21
|
title: "text-xl font-semibold",
|
|
18
22
|
description: "text-sm mb-8"
|
|
19
23
|
}
|
|
20
|
-
},
|
|
24
|
+
}, i = a;
|
|
21
25
|
export {
|
|
22
|
-
|
|
26
|
+
i as default
|
|
23
27
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const e = {
|
|
2
2
|
classes: {
|
|
3
|
-
wrapper: "fixed z-50 w-full sm:w-auto
|
|
3
|
+
wrapper: "fixed z-50 w-full sm:w-auto max-h-screen",
|
|
4
4
|
list: "flex flex-col items-end w-full sm:w-[520px] px-4",
|
|
5
5
|
item: "w-full flex items-center rounded-md px-4 py-3 bg-secondary-800 dark:bg-secondary-50 text-white dark:text-secondary-900 border border-secondary-700 dark:border-secondary-100"
|
|
6
6
|
}
|
|
@@ -3,7 +3,10 @@ import { type ThemeComponent } from '../../composables/useTheme';
|
|
|
3
3
|
declare const radioProps: {
|
|
4
4
|
value: (StringConstructor | NumberConstructor)[];
|
|
5
5
|
glow: BooleanConstructor;
|
|
6
|
-
modelValue:
|
|
6
|
+
modelValue: {
|
|
7
|
+
readonly type: import("vue").PropType<string | number | boolean | object | any[] | undefined>;
|
|
8
|
+
readonly default: undefined;
|
|
9
|
+
};
|
|
7
10
|
id: StringConstructor;
|
|
8
11
|
name: StringConstructor;
|
|
9
12
|
readonly: BooleanConstructor;
|
|
@@ -50,7 +53,10 @@ export interface RadioTheme extends ThemeComponent<RadioProps, InternalClasses,
|
|
|
50
53
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
51
54
|
value: (StringConstructor | NumberConstructor)[];
|
|
52
55
|
glow: BooleanConstructor;
|
|
53
|
-
modelValue:
|
|
56
|
+
modelValue: {
|
|
57
|
+
readonly type: import("vue").PropType<string | number | boolean | object | any[] | undefined>;
|
|
58
|
+
readonly default: undefined;
|
|
59
|
+
};
|
|
54
60
|
id: StringConstructor;
|
|
55
61
|
name: StringConstructor;
|
|
56
62
|
readonly: BooleanConstructor;
|
|
@@ -93,7 +99,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
93
99
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, string[], string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
94
100
|
value: (StringConstructor | NumberConstructor)[];
|
|
95
101
|
glow: BooleanConstructor;
|
|
96
|
-
modelValue:
|
|
102
|
+
modelValue: {
|
|
103
|
+
readonly type: import("vue").PropType<string | number | boolean | object | any[] | undefined>;
|
|
104
|
+
readonly default: undefined;
|
|
105
|
+
};
|
|
97
106
|
id: StringConstructor;
|
|
98
107
|
name: StringConstructor;
|
|
99
108
|
readonly: BooleanConstructor;
|
|
@@ -136,6 +145,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
136
145
|
size: import("../../composables/useCommon").Size;
|
|
137
146
|
loading: boolean;
|
|
138
147
|
loadingStatus: import("../loader/Loader.vue").LoaderStatus;
|
|
148
|
+
modelValue: string | number | boolean | object | any[] | undefined;
|
|
139
149
|
readonly: boolean;
|
|
140
150
|
required: boolean;
|
|
141
151
|
validateOnInput: boolean;
|
|
@@ -6,7 +6,10 @@ declare const selectProps: {
|
|
|
6
6
|
multiple: BooleanConstructor;
|
|
7
7
|
flat: BooleanConstructor;
|
|
8
8
|
native: BooleanConstructor;
|
|
9
|
-
modelValue:
|
|
9
|
+
modelValue: {
|
|
10
|
+
readonly type: PropType<string | number | boolean | object | any[] | undefined>;
|
|
11
|
+
readonly default: undefined;
|
|
12
|
+
};
|
|
10
13
|
id: StringConstructor;
|
|
11
14
|
name: StringConstructor;
|
|
12
15
|
readonly: BooleanConstructor;
|
|
@@ -59,7 +62,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
59
62
|
multiple: BooleanConstructor;
|
|
60
63
|
flat: BooleanConstructor;
|
|
61
64
|
native: BooleanConstructor;
|
|
62
|
-
modelValue:
|
|
65
|
+
modelValue: {
|
|
66
|
+
readonly type: PropType<string | number | boolean | object | any[] | undefined>;
|
|
67
|
+
readonly default: undefined;
|
|
68
|
+
};
|
|
63
69
|
id: StringConstructor;
|
|
64
70
|
name: StringConstructor;
|
|
65
71
|
readonly: BooleanConstructor;
|
|
@@ -105,7 +111,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
105
111
|
multiple: BooleanConstructor;
|
|
106
112
|
flat: BooleanConstructor;
|
|
107
113
|
native: BooleanConstructor;
|
|
108
|
-
modelValue:
|
|
114
|
+
modelValue: {
|
|
115
|
+
readonly type: PropType<string | number | boolean | object | any[] | undefined>;
|
|
116
|
+
readonly default: undefined;
|
|
117
|
+
};
|
|
109
118
|
id: StringConstructor;
|
|
110
119
|
name: StringConstructor;
|
|
111
120
|
readonly: BooleanConstructor;
|
|
@@ -148,6 +157,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
148
157
|
size: import("../../composables/useCommon").Size;
|
|
149
158
|
loading: boolean;
|
|
150
159
|
loadingStatus: import("../loader/Loader.vue").LoaderStatus;
|
|
160
|
+
modelValue: string | number | boolean | object | any[] | undefined;
|
|
151
161
|
readonly: boolean;
|
|
152
162
|
required: boolean;
|
|
153
163
|
validateOnInput: boolean;
|
|
@@ -3,7 +3,7 @@ const t = {
|
|
|
3
3
|
wrapper: "",
|
|
4
4
|
box: ({ props: e, data: s }) => {
|
|
5
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-
|
|
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-1.5 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
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",
|