@indielayer/ui 1.5.0 → 1.5.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 +2 -9
- package/docs/pages/component/form/usage.vue +16 -19
- package/docs/pages/component/modal/composed.vue +7 -0
- package/docs/pages/component/modal/usage.vue +1 -1
- package/exports/nuxt.plugin.js +9 -2
- package/lib/components/accordion/AccordionItem.vue.js +25 -24
- package/lib/components/accordion/theme/AccordionItem.base.theme.js +7 -7
- package/lib/components/alert/Alert.vue2.js +4 -3
- package/lib/components/button/Button.vue.js +2 -2
- package/lib/components/button/Button.vue2.js +26 -26
- package/lib/components/checkbox/theme/Checkbox.base.theme.js +35 -35
- package/lib/components/inputFooter/theme/InputFooter.base.theme.js +1 -1
- package/lib/components/label/theme/Label.base.theme.js +1 -1
- package/lib/components/modal/Modal.vue.js +34 -32
- package/lib/components/notifications/Notifications.vue.js +1 -0
- package/lib/components/popover/Popover.vue.d.ts +7 -25
- package/lib/components/popover/Popover.vue.js +12 -12
- package/lib/components/radio/theme/Radio.base.theme.js +27 -27
- package/lib/components/scroll/Scroll.vue2.js +4 -4
- package/lib/components/stepper/Stepper.vue.js +35 -34
- package/lib/components/tab/Tab.vue.js +7 -6
- package/lib/components/table/Table.vue.js +16 -15
- package/lib/components/tooltip/Tooltip.vue.js +1 -1
- package/lib/create.d.ts +5 -1
- package/lib/create.js +18 -15
- package/lib/index.js +1 -1
- package/lib/index.umd.js +4 -3
- package/lib/node_modules/.pnpm/{floating-vue@5.2.0_vue@3.3.9 → floating-vue@5.2.2_vue@3.3.9}/node_modules/floating-vue/dist/floating-vue.js +208 -183
- package/lib/nuxt.plugin.js +9 -2
- package/lib/themes/base/index.js +2 -2
- package/lib/themes/base/styles.d.ts +2 -0
- package/{src/themes/base/styles.css → lib/themes/base/styles.js} +5 -1
- package/lib/themes/carbon/index.js +2 -2
- package/lib/themes/carbon/styles.d.ts +2 -0
- package/lib/themes/carbon/{styles.css.js → styles.js} +2 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +2 -2
- package/src/components/accordion/AccordionItem.vue +1 -0
- package/src/components/accordion/theme/AccordionItem.base.theme.ts +2 -2
- package/src/components/alert/Alert.vue +1 -1
- package/src/components/button/Button.vue +1 -1
- package/src/components/checkbox/theme/Checkbox.base.theme.ts +5 -3
- package/src/components/inputFooter/theme/InputFooter.base.theme.ts +1 -1
- package/src/components/label/theme/Label.base.theme.ts +1 -1
- package/src/components/modal/Modal.vue +4 -2
- package/src/components/notifications/Notifications.vue +1 -0
- package/src/components/popover/Popover.vue +2 -2
- package/src/components/radio/theme/Radio.base.theme.ts +5 -3
- package/src/components/scroll/Scroll.vue +1 -1
- package/src/components/stepper/Stepper.vue +1 -0
- package/src/components/tab/Tab.vue +1 -0
- package/src/components/table/Table.vue +1 -1
- package/src/create.ts +11 -4
- package/src/themes/base/index.ts +2 -2
- package/{lib/themes/base/styles.css.js → src/themes/base/styles.ts} +2 -5
- package/src/themes/carbon/index.ts +2 -2
- package/src/themes/carbon/{styles.css → styles.ts} +2 -0
- package/src/version.ts +1 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { onClickOutside as
|
|
3
|
-
import { useTheme as
|
|
4
|
-
import { useFocusTrap as
|
|
5
|
-
import { closeIcon as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
const
|
|
1
|
+
import { defineComponent as H, ref as f, watch as g, nextTick as B, useSlots as I, computed as M, openBlock as t, createBlock as p, Teleport as P, createElementBlock as i, normalizeStyle as W, unref as o, normalizeClass as s, createCommentVNode as a, createElementVNode as S, resolveDynamicComponent as K, withCtx as w, renderSlot as r, toDisplayString as v } from "vue";
|
|
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
|
+
import { useTheme as G } from "../../composables/useTheme.js";
|
|
4
|
+
import { useFocusTrap as J } from "../../composables/useFocusTrap.js";
|
|
5
|
+
import { closeIcon as Q } from "../../common/icons.js";
|
|
6
|
+
import U from "../button/Button.vue.js";
|
|
7
|
+
import Y from "../scroll/Scroll.vue.js";
|
|
8
|
+
import Z from "../form/Form.vue.js";
|
|
9
|
+
const _ = { class: "flex items-end sm:items-center justify-center p-4 sm:p-6 h-screen" }, x = { key: 0 }, ee = ["xs", "sm", "md", "lg", "xl", "full"], oe = {
|
|
10
10
|
size: {
|
|
11
11
|
type: String,
|
|
12
12
|
default: "xl"
|
|
@@ -42,28 +42,30 @@ const Z = { class: "flex items-end sm:items-center justify-center p-4 sm:p-6 h-s
|
|
|
42
42
|
default: () => []
|
|
43
43
|
},
|
|
44
44
|
persistent: Boolean
|
|
45
|
-
},
|
|
45
|
+
}, te = {
|
|
46
46
|
name: "XModal",
|
|
47
47
|
validators: {
|
|
48
|
-
size:
|
|
48
|
+
size: ee
|
|
49
49
|
}
|
|
50
|
-
}, ce = /* @__PURE__ */
|
|
51
|
-
...
|
|
52
|
-
props:
|
|
50
|
+
}, ce = /* @__PURE__ */ H({
|
|
51
|
+
...te,
|
|
52
|
+
props: oe,
|
|
53
53
|
emits: ["update:modelValue", "submit"],
|
|
54
|
-
setup(V, { expose:
|
|
55
|
-
const n = V, b =
|
|
54
|
+
setup(V, { expose: C, emit: T }) {
|
|
55
|
+
const n = V, b = T, u = f(n.modelValue), d = f(!1), y = f(null), $ = f(null), { initFocusTrap: D, clearFocusTrap: z } = J();
|
|
56
56
|
let c;
|
|
57
|
-
|
|
57
|
+
g(u, (e) => {
|
|
58
58
|
c && (c(), c = void 0), e && setTimeout(() => {
|
|
59
|
-
c =
|
|
59
|
+
c = L(y, F, {
|
|
60
|
+
ignore: [".v-popper__popper"]
|
|
61
|
+
});
|
|
60
62
|
});
|
|
61
|
-
}),
|
|
63
|
+
}), g(() => n.modelValue, E, { immediate: !0 });
|
|
62
64
|
async function E() {
|
|
63
65
|
const e = n.modelValue;
|
|
64
|
-
e ? (u.value = e, await
|
|
66
|
+
e ? (u.value = e, await B(), d.value = e, await B(), D(y), document.body.style.overflow = "hidden") : (d.value = e, u.value = e, z(), document.body.style.overflow = "auto");
|
|
65
67
|
}
|
|
66
|
-
typeof window < "u" &&
|
|
68
|
+
typeof window < "u" && q(document, "keydown", A);
|
|
67
69
|
function A(e) {
|
|
68
70
|
e.key === "Escape" && u.value && !n.persistent && m();
|
|
69
71
|
}
|
|
@@ -78,15 +80,15 @@ const Z = { class: "flex items-end sm:items-center justify-center p-4 sm:p-6 h-s
|
|
|
78
80
|
function O() {
|
|
79
81
|
b("update:modelValue", !0), d.value = !0;
|
|
80
82
|
}
|
|
81
|
-
const k =
|
|
83
|
+
const k = I(), R = M(() => !!(k["tertiary-action"] || k["cancel-action"])), { styles: N, classes: l, className: X } = G("Modal", {}, n, {
|
|
82
84
|
visible: d
|
|
83
85
|
});
|
|
84
|
-
return
|
|
86
|
+
return C({ open: O, close: m }), (e, h) => (t(), p(P, { to: "body" }, [
|
|
85
87
|
u.value ? (t(), i("div", {
|
|
86
88
|
key: 0,
|
|
87
89
|
ref_key: "modalWrapperRef",
|
|
88
|
-
ref:
|
|
89
|
-
style:
|
|
90
|
+
ref: $,
|
|
91
|
+
style: W(o(N)),
|
|
90
92
|
class: s([
|
|
91
93
|
o(X),
|
|
92
94
|
o(l).wrapper,
|
|
@@ -97,8 +99,8 @@ const Z = { class: "flex items-end sm:items-center justify-center p-4 sm:p-6 h-s
|
|
|
97
99
|
key: 0,
|
|
98
100
|
class: s(o(l).backdrop)
|
|
99
101
|
}, null, 2)) : a("", !0),
|
|
100
|
-
S("div",
|
|
101
|
-
(t(), p(
|
|
102
|
+
S("div", _, [
|
|
103
|
+
(t(), p(K(e.isForm ? Z : "div"), {
|
|
102
104
|
ref_key: "modalRef",
|
|
103
105
|
ref: y,
|
|
104
106
|
disabled: e.formDisabled,
|
|
@@ -112,7 +114,7 @@ const Z = { class: "flex items-end sm:items-center justify-center p-4 sm:p-6 h-s
|
|
|
112
114
|
role: "dialog",
|
|
113
115
|
"aria-modal": "true",
|
|
114
116
|
"aria-labelledby": "modal-headline",
|
|
115
|
-
onSubmit: h[0] || (h[0] = (
|
|
117
|
+
onSubmit: h[0] || (h[0] = (j) => e.$emit("submit", j))
|
|
116
118
|
}, {
|
|
117
119
|
default: w(() => [
|
|
118
120
|
r(e.$slots, "image"),
|
|
@@ -131,7 +133,7 @@ const Z = { class: "flex items-end sm:items-center justify-center p-4 sm:p-6 h-s
|
|
|
131
133
|
}, v(e.title), 3)) : a("", !0)
|
|
132
134
|
])
|
|
133
135
|
], 2)) : a("", !0),
|
|
134
|
-
e.$slots.default ? (t(), p(
|
|
136
|
+
e.$slots.default ? (t(), p(Y, {
|
|
135
137
|
key: 1,
|
|
136
138
|
scrollbar: !1,
|
|
137
139
|
vertical: ""
|
|
@@ -149,12 +151,12 @@ const Z = { class: "flex items-end sm:items-center justify-center p-4 sm:p-6 h-s
|
|
|
149
151
|
]),
|
|
150
152
|
_: 3
|
|
151
153
|
})) : a("", !0),
|
|
152
|
-
e.showClose ? (t(), p(
|
|
154
|
+
e.showClose ? (t(), p(U, {
|
|
153
155
|
key: 2,
|
|
154
156
|
ghost: "",
|
|
155
157
|
size: "sm",
|
|
156
158
|
tabindex: "-1",
|
|
157
|
-
icon: o(
|
|
159
|
+
icon: o(Q),
|
|
158
160
|
class: s(o(l).closeIcon),
|
|
159
161
|
onClick: m
|
|
160
162
|
}, null, 8, ["icon", "class"])) : a("", !0),
|
|
@@ -164,7 +166,7 @@ const Z = { class: "flex items-end sm:items-center justify-center p-4 sm:p-6 h-s
|
|
|
164
166
|
}, [
|
|
165
167
|
r(e.$slots, "actions", {}, () => [
|
|
166
168
|
r(e.$slots, "cancel-action"),
|
|
167
|
-
R.value ? (t(), i("div",
|
|
169
|
+
R.value ? (t(), i("div", x)) : a("", !0),
|
|
168
170
|
r(e.$slots, "tertiary-action"),
|
|
169
171
|
r(e.$slots, "secondary-action"),
|
|
170
172
|
r(e.$slots, "primary-action")
|
|
@@ -208,6 +208,7 @@ const se = { class: "flex items-center flex-wrap" }, re = {
|
|
|
208
208
|
D(l(te)),
|
|
209
209
|
e.action ? (a(), m("button", {
|
|
210
210
|
key: 1,
|
|
211
|
+
type: "button",
|
|
211
212
|
class: "ml-3 font-medium cursor-pointer text-[color:var(--x-notification-action)] hover:text-[color:var(--x-notification-action-hover)] dark:text-[color:var(--x-notification-dark-action)] dark:hover:text-[color:var(--x-notification-dark-action-hover)]",
|
|
212
213
|
onClick: () => {
|
|
213
214
|
var u;
|
|
@@ -33,16 +33,10 @@ declare const popoverProps: {
|
|
|
33
33
|
popperShowTriggers: PropType<TriggerEvent[] | ((triggers: Array<PopoverTriggerEvent>) => Array<PopoverTriggerEvent>)>;
|
|
34
34
|
popperHideTriggers: PropType<TriggerEvent[] | ((triggers: Array<PopoverTriggerEvent>) => Array<PopoverTriggerEvent>)>;
|
|
35
35
|
container: {
|
|
36
|
-
type: (BooleanConstructor | ObjectConstructor | StringConstructor
|
|
37
|
-
new (): Element;
|
|
38
|
-
prototype: Element;
|
|
39
|
-
})[];
|
|
36
|
+
type: (BooleanConstructor | ObjectConstructor | StringConstructor)[];
|
|
40
37
|
default: string;
|
|
41
38
|
};
|
|
42
|
-
boundary: (
|
|
43
|
-
new (): Element;
|
|
44
|
-
prototype: Element;
|
|
45
|
-
})[];
|
|
39
|
+
boundary: (ObjectConstructor | StringConstructor)[];
|
|
46
40
|
strategy: {
|
|
47
41
|
type: PropType<"absolute" | "fixed">;
|
|
48
42
|
default: string;
|
|
@@ -95,16 +89,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
95
89
|
popperShowTriggers: PropType<TriggerEvent[] | ((triggers: TriggerEvent[]) => TriggerEvent[])>;
|
|
96
90
|
popperHideTriggers: PropType<TriggerEvent[] | ((triggers: TriggerEvent[]) => TriggerEvent[])>;
|
|
97
91
|
container: {
|
|
98
|
-
type: (BooleanConstructor | ObjectConstructor | StringConstructor
|
|
99
|
-
new (): Element;
|
|
100
|
-
prototype: Element;
|
|
101
|
-
})[];
|
|
92
|
+
type: (BooleanConstructor | ObjectConstructor | StringConstructor)[];
|
|
102
93
|
default: string;
|
|
103
94
|
};
|
|
104
|
-
boundary: (
|
|
105
|
-
new (): Element;
|
|
106
|
-
prototype: Element;
|
|
107
|
-
})[];
|
|
95
|
+
boundary: (ObjectConstructor | StringConstructor)[];
|
|
108
96
|
strategy: {
|
|
109
97
|
type: PropType<"absolute" | "fixed">;
|
|
110
98
|
default: string;
|
|
@@ -157,16 +145,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
157
145
|
popperShowTriggers: PropType<TriggerEvent[] | ((triggers: TriggerEvent[]) => TriggerEvent[])>;
|
|
158
146
|
popperHideTriggers: PropType<TriggerEvent[] | ((triggers: TriggerEvent[]) => TriggerEvent[])>;
|
|
159
147
|
container: {
|
|
160
|
-
type: (BooleanConstructor | ObjectConstructor | StringConstructor
|
|
161
|
-
new (): Element;
|
|
162
|
-
prototype: Element;
|
|
163
|
-
})[];
|
|
148
|
+
type: (BooleanConstructor | ObjectConstructor | StringConstructor)[];
|
|
164
149
|
default: string;
|
|
165
150
|
};
|
|
166
|
-
boundary: (
|
|
167
|
-
new (): Element;
|
|
168
|
-
prototype: Element;
|
|
169
|
-
})[];
|
|
151
|
+
boundary: (ObjectConstructor | StringConstructor)[];
|
|
170
152
|
strategy: {
|
|
171
153
|
type: PropType<"absolute" | "fixed">;
|
|
172
154
|
default: string;
|
|
@@ -204,7 +186,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
204
186
|
placement: Placement;
|
|
205
187
|
triggers: TriggerEvent[];
|
|
206
188
|
hideArrow: boolean;
|
|
207
|
-
container: string | boolean |
|
|
189
|
+
container: string | boolean | Record<string, any>;
|
|
208
190
|
strategy: "absolute" | "fixed";
|
|
209
191
|
autoHide: boolean | ((event: Event) => boolean);
|
|
210
192
|
shown: boolean;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as b, ref as a, openBlock as v, createBlock as S, unref as r, normalizeStyle as
|
|
2
|
-
import { useTheme as
|
|
3
|
-
import { Dropdown as $ } from "../../node_modules/.pnpm/floating-vue@5.2.
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as b, ref as a, openBlock as v, createBlock as S, unref as r, normalizeStyle as T, normalizeClass as A, withCtx as l, renderSlot as d } from "vue";
|
|
2
|
+
import { useTheme as B } from "../../composables/useTheme.js";
|
|
3
|
+
import { Dropdown as $ } from "../../node_modules/.pnpm/floating-vue@5.2.2_vue@3.3.9/node_modules/floating-vue/dist/floating-vue.js";
|
|
4
|
+
const k = {
|
|
5
5
|
placement: ["top", "top-start", "top-end", "bottom", "bottom-start", "bottom-end", "left", "left-start", "left-end", "right", "right-start", "right-end"]
|
|
6
|
-
},
|
|
6
|
+
}, z = {
|
|
7
7
|
disabled: Boolean,
|
|
8
8
|
positioningDisabled: Boolean,
|
|
9
9
|
placement: {
|
|
@@ -30,10 +30,10 @@ const z = {
|
|
|
30
30
|
popperShowTriggers: [Array, Function],
|
|
31
31
|
popperHideTriggers: [Array, Function],
|
|
32
32
|
container: {
|
|
33
|
-
type: [String, Object,
|
|
33
|
+
type: [String, Object, Boolean],
|
|
34
34
|
default: "body"
|
|
35
35
|
},
|
|
36
|
-
boundary: [String,
|
|
36
|
+
boundary: [String, Object],
|
|
37
37
|
strategy: {
|
|
38
38
|
type: String,
|
|
39
39
|
default: "absolute"
|
|
@@ -53,10 +53,10 @@ const z = {
|
|
|
53
53
|
computeTransformOrigin: Boolean
|
|
54
54
|
}, C = {
|
|
55
55
|
name: "XPopover",
|
|
56
|
-
validators:
|
|
56
|
+
validators: k
|
|
57
57
|
}, R = /* @__PURE__ */ b({
|
|
58
58
|
...C,
|
|
59
|
-
props:
|
|
59
|
+
props: z,
|
|
60
60
|
emits: ["show", "hide", "update:shown", "apply-show", "apply-hide", "close-group", "close-directive", "auto-hide", "resize"],
|
|
61
61
|
setup(g, { expose: u }) {
|
|
62
62
|
const m = g, i = a(null);
|
|
@@ -73,12 +73,12 @@ const z = {
|
|
|
73
73
|
}
|
|
74
74
|
const t = a(!1);
|
|
75
75
|
u({ show: s, hide: n, toggle: y, isOpen: t });
|
|
76
|
-
const { styles: f, classes: p, className: h } =
|
|
76
|
+
const { styles: f, classes: p, className: h } = B("Popover", {}, m);
|
|
77
77
|
return (e, o) => (v(), S(r($), {
|
|
78
78
|
ref_key: "elRef",
|
|
79
79
|
ref: i,
|
|
80
|
-
style:
|
|
81
|
-
class:
|
|
80
|
+
style: T(r(f)),
|
|
81
|
+
class: A([r(h), r(p).wrapper]),
|
|
82
82
|
"positioning-disabled": e.positioningDisabled,
|
|
83
83
|
placement: e.placement,
|
|
84
84
|
disabled: e.disabled,
|
|
@@ -2,51 +2,51 @@ const a = {
|
|
|
2
2
|
classes: {
|
|
3
3
|
wrapper: ({ data: e }) => {
|
|
4
4
|
const t = ["inline-block relative cursor-pointer focus:outline-none group"];
|
|
5
|
-
return e.isInsideForm && !e.isInsideFormGroup && t.push("mb-
|
|
5
|
+
return e.isInsideForm && !e.isInsideFormGroup && t.push("mb-5"), t;
|
|
6
6
|
},
|
|
7
7
|
circle: ({ props: e }) => {
|
|
8
8
|
const t = ["rounded-full flex justify-center items-center shrink-0 border outline-offset-2 outline-slate-300 dark:outline-slate-500 group-focus:outline-1 group-focus:outline"];
|
|
9
9
|
return e.size === "lg" ? t.push("h-5 w-5") : e.size === "xl" ? t.push("h-6 w-6") : t.push("h-4 w-4"), t;
|
|
10
10
|
},
|
|
11
11
|
circleIcon: ({ props: e, data: t }) => {
|
|
12
|
-
const
|
|
13
|
-
return t.selected ||
|
|
12
|
+
const r = [];
|
|
13
|
+
return t.selected || r.push("opacity-0"), e.size === "sm" || e.size === "xs" ? r.push("h-2") : e.size === "lg" ? r.push("h-2.5") : e.size === "xl" ? r.push("h-3") : r.push("h-2"), r;
|
|
14
14
|
},
|
|
15
|
-
label: ({ props: e }) => {
|
|
16
|
-
let
|
|
17
|
-
return e.size === "xs" ?
|
|
15
|
+
label: ({ props: e, data: t }) => {
|
|
16
|
+
let r = "text-secondary-800 dark:text-secondary-200 pl-2";
|
|
17
|
+
return r += t.isInsideFormGroup ? " font-normal" : " font-medium", e.size === "xs" ? r += " text-xs" : e.size === "sm" ? r += " text-sm" : e.size === "lg" ? r += " text-lg" : e.size === "xl" && (r += " text-xl"), r;
|
|
18
18
|
},
|
|
19
19
|
content: ({ props: e }) => {
|
|
20
20
|
let t = "pl-2";
|
|
21
21
|
return e.size === "xs" ? t += " text-xs" : e.size === "sm" ? t += " text-sm" : e.size === "lg" ? t += " text-lg" : e.size === "xl" && (t += " text-xl"), t;
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
|
-
styles: ({ props: e, colors: t, css:
|
|
25
|
-
const
|
|
26
|
-
return e.loading ?
|
|
24
|
+
styles: ({ props: e, colors: t, css: r, data: n }) => {
|
|
25
|
+
const s = t.getPalette("gray"), l = t.getPalette(e.color), i = [];
|
|
26
|
+
return e.loading ? r.variables({
|
|
27
27
|
bg: "transparent",
|
|
28
28
|
border: "transparent",
|
|
29
29
|
dark: {
|
|
30
30
|
bg: "transparent",
|
|
31
31
|
border: "transparent"
|
|
32
32
|
}
|
|
33
|
-
}) : (e.disabled ? n.selected ? i.push(
|
|
33
|
+
}) : (e.disabled ? n.selected ? i.push(r.variables({
|
|
34
34
|
bg: "transparent",
|
|
35
|
-
border:
|
|
36
|
-
circle:
|
|
35
|
+
border: s[200],
|
|
36
|
+
circle: s[200],
|
|
37
37
|
dark: {
|
|
38
38
|
bg: "transparent",
|
|
39
|
-
border:
|
|
40
|
-
circle:
|
|
39
|
+
border: s[700],
|
|
40
|
+
circle: s[700]
|
|
41
41
|
}
|
|
42
|
-
})) : i.push(
|
|
43
|
-
bg:
|
|
44
|
-
border:
|
|
42
|
+
})) : i.push(r.variables({
|
|
43
|
+
bg: s[200],
|
|
44
|
+
border: s[200],
|
|
45
45
|
dark: {
|
|
46
|
-
bg:
|
|
47
|
-
border:
|
|
46
|
+
bg: s[700],
|
|
47
|
+
border: s[700]
|
|
48
48
|
}
|
|
49
|
-
})) : (n.selected ? i.push(
|
|
49
|
+
})) : (n.selected ? i.push(r.variables({
|
|
50
50
|
bg: "transparent",
|
|
51
51
|
border: l[500],
|
|
52
52
|
circle: l[500],
|
|
@@ -55,16 +55,16 @@ const a = {
|
|
|
55
55
|
border: l[500],
|
|
56
56
|
circle: l[500]
|
|
57
57
|
}
|
|
58
|
-
})) : i.push(
|
|
58
|
+
})) : i.push(r.variables({
|
|
59
59
|
bg: "#fff",
|
|
60
|
-
border: e.glow ? l[300] :
|
|
60
|
+
border: e.glow ? l[300] : s[300],
|
|
61
61
|
dark: {
|
|
62
|
-
bg:
|
|
63
|
-
border: e.glow ? l[300] :
|
|
62
|
+
bg: s[900],
|
|
63
|
+
border: e.glow ? l[300] : s[400]
|
|
64
64
|
}
|
|
65
|
-
})), e.glow && i.push(
|
|
65
|
+
})), e.glow && i.push(r.get("glow", t.getColorOpacity(l[500], 0.5)))), i);
|
|
66
66
|
}
|
|
67
|
-
},
|
|
67
|
+
}, o = a;
|
|
68
68
|
export {
|
|
69
|
-
|
|
69
|
+
o as default
|
|
70
70
|
};
|
|
@@ -21,11 +21,11 @@ const L = {
|
|
|
21
21
|
var e;
|
|
22
22
|
(e = l.value) == null || e.dispatchEvent(new CustomEvent("scroll"));
|
|
23
23
|
}
|
|
24
|
-
const { styles: h, classes:
|
|
24
|
+
const { styles: h, classes: m, className: p } = C("Scroll", {}, t);
|
|
25
25
|
return a({ scrollEl: l }), (e, R) => ($(), z("div", {
|
|
26
|
-
class: r(["flex relative overflow-hidden", [
|
|
27
|
-
o(
|
|
28
|
-
o(
|
|
26
|
+
class: r(["flex relative overflow-hidden max-w-full max-h-full", [
|
|
27
|
+
o(p),
|
|
28
|
+
o(m).wrapper,
|
|
29
29
|
e.$style.scrollwrap,
|
|
30
30
|
e.horizontal ? [
|
|
31
31
|
e.$style.horizontal,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as x, ref as c, openBlock as l, createElementBlock as d, createElementVNode as r, normalizeClass as s, unref as o, normalizeStyle as B, createVNode as u, withCtx as m, Fragment as R, renderList as V, createBlock as N, resolveDynamicComponent as z, toDisplayString as f, createCommentVNode as E, renderSlot as P } from "vue";
|
|
2
2
|
import { useCommon as v } from "../../composables/useCommon.js";
|
|
3
3
|
import { useColors as $ } from "../../composables/useColors.js";
|
|
4
4
|
import { useTheme as D } from "../../composables/useTheme.js";
|
|
@@ -40,85 +40,86 @@ const j = { class: "overflow-hidden" }, q = { class: "flex items-start pr-4" },
|
|
|
40
40
|
}, O = {
|
|
41
41
|
name: "XStepper",
|
|
42
42
|
validators: K
|
|
43
|
-
}, se = /* @__PURE__ */
|
|
43
|
+
}, se = /* @__PURE__ */ x({
|
|
44
44
|
...O,
|
|
45
45
|
props: M,
|
|
46
46
|
emits: ["update:modelValue"],
|
|
47
47
|
setup(y, { emit: _ }) {
|
|
48
|
-
const n = y,
|
|
49
|
-
function k(
|
|
50
|
-
|
|
48
|
+
const n = y, b = _, g = c(null), S = c(null), h = c(null);
|
|
49
|
+
function k(e, a) {
|
|
50
|
+
e.disabled || !n.interactive || b("update:modelValue", a);
|
|
51
51
|
}
|
|
52
|
-
function C(
|
|
53
|
-
return
|
|
52
|
+
function C(e, a) {
|
|
53
|
+
return e.status === "incomplete" ? n.iconIncomplete || F : e.status === "error" ? n.iconError || L : e.status === "complete" ? n.iconComplete || T : n.iconPristine || W;
|
|
54
54
|
}
|
|
55
|
-
const { styles: w, classes:
|
|
56
|
-
return (
|
|
55
|
+
const { styles: w, classes: i, className: I } = D("Stepper", {}, n);
|
|
56
|
+
return (e, a) => (l(), d("div", null, [
|
|
57
57
|
r("div", {
|
|
58
58
|
ref_key: "wrapperRef",
|
|
59
59
|
ref: S,
|
|
60
60
|
class: s(["relative", [
|
|
61
|
-
o(
|
|
62
|
-
o(
|
|
61
|
+
o(I),
|
|
62
|
+
o(i).wrapper
|
|
63
63
|
]]),
|
|
64
64
|
style: B(o(w))
|
|
65
65
|
}, [
|
|
66
66
|
u(X, {
|
|
67
67
|
ref_key: "scrollRef",
|
|
68
|
-
ref:
|
|
68
|
+
ref: g,
|
|
69
69
|
scrollbar: !1,
|
|
70
70
|
horizontal: "",
|
|
71
71
|
mousewheel: "",
|
|
72
|
-
class: s(o(
|
|
72
|
+
class: s(o(i).scroller)
|
|
73
73
|
}, {
|
|
74
|
-
default:
|
|
74
|
+
default: m(() => [
|
|
75
75
|
r("div", {
|
|
76
76
|
ref_key: "stepperRef",
|
|
77
77
|
ref: h,
|
|
78
|
-
class: s(["relative", o(
|
|
78
|
+
class: s(["relative", o(i).list])
|
|
79
79
|
}, [
|
|
80
|
-
(
|
|
81
|
-
key:
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
"
|
|
85
|
-
"
|
|
80
|
+
(l(!0), d(R, null, V(e.steps, (t, p) => (l(), N(z(e.interactive ? "button" : "div"), {
|
|
81
|
+
key: p,
|
|
82
|
+
type: e.interactive ? "button" : void 0,
|
|
83
|
+
class: s([o(i).step, {
|
|
84
|
+
"cursor-pointer": e.interactive && !t.disabled,
|
|
85
|
+
"text-secondary-400 dark:text-secondary-600": t.disabled,
|
|
86
|
+
"flex-1": e.grow
|
|
86
87
|
}]),
|
|
87
|
-
disabled:
|
|
88
|
-
onClick: (Q) => k(
|
|
88
|
+
disabled: t.disabled || !e.interactive,
|
|
89
|
+
onClick: (Q) => k(t, p)
|
|
89
90
|
}, {
|
|
90
|
-
default:
|
|
91
|
+
default: m(() => [
|
|
91
92
|
r("div", j, [
|
|
92
93
|
r("div", {
|
|
93
|
-
class: s(["h-0.5 w-full mb-2", [
|
|
94
|
+
class: s(["h-0.5 w-full mb-2", [t.status === "complete" || t.status === "incomplete" ? "bg-primary-500" : "bg-secondary-200 dark:bg-secondary-700"]])
|
|
94
95
|
}, null, 2),
|
|
95
96
|
r("div", q, [
|
|
96
97
|
u(A, {
|
|
97
|
-
icon: C(
|
|
98
|
+
icon: C(t),
|
|
98
99
|
size: "sm",
|
|
99
|
-
class: s([o(
|
|
100
|
-
"text-primary-500":
|
|
101
|
-
"text-error-500":
|
|
100
|
+
class: s([o(i).icon, {
|
|
101
|
+
"text-primary-500": t.status === "complete" || t.status === "incomplete",
|
|
102
|
+
"text-error-500": t.status === "error"
|
|
102
103
|
}])
|
|
103
104
|
}, null, 8, ["icon", "class"]),
|
|
104
105
|
r("div", G, [
|
|
105
|
-
r("div", H, f(
|
|
106
|
-
|
|
106
|
+
r("div", H, f(t.label), 1),
|
|
107
|
+
t.description ? (l(), d("div", J, f(t.description), 1)) : E("", !0)
|
|
107
108
|
])
|
|
108
109
|
])
|
|
109
110
|
])
|
|
110
111
|
]),
|
|
111
112
|
_: 2
|
|
112
|
-
}, 1032, ["class", "disabled", "onClick"]))), 128))
|
|
113
|
+
}, 1032, ["type", "class", "disabled", "onClick"]))), 128))
|
|
113
114
|
], 2)
|
|
114
115
|
]),
|
|
115
116
|
_: 1
|
|
116
117
|
}, 8, ["class"])
|
|
117
118
|
], 6),
|
|
118
119
|
r("div", {
|
|
119
|
-
class: s(o(
|
|
120
|
+
class: s(o(i).content)
|
|
120
121
|
}, [
|
|
121
|
-
P(
|
|
122
|
+
P(e.$slots, "default")
|
|
122
123
|
], 2)
|
|
123
124
|
]));
|
|
124
125
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { defineComponent as R, computed as s, ref as d, inject as j, reactive as D, onMounted as E, openBlock as c, createBlock as m, resolveDynamicComponent as L, normalizeStyle as V, unref as o, normalizeClass as v, withCtx as M, renderSlot as g, createElementVNode as z, createCommentVNode as p, toDisplayString as O, Teleport as P, createElementBlock as X } from "vue";
|
|
2
2
|
import { useMutationObserver as F } from "../../node_modules/.pnpm/@vueuse_core@10.2.0_vue@3.3.9/node_modules/@vueuse/core/index.js";
|
|
3
3
|
import { injectTabGroupKey as G } from "../../composables/keys.js";
|
|
4
|
-
import { useCommon as
|
|
4
|
+
import { useCommon as T } from "../../composables/useCommon.js";
|
|
5
5
|
import { useTheme as I } from "../../composables/useTheme.js";
|
|
6
6
|
import C from "../icon/Icon.vue.js";
|
|
7
7
|
import K from "../link/Link.vue.js";
|
|
8
8
|
import { closeIcon as q } from "../../common/icons.js";
|
|
9
9
|
const A = {
|
|
10
|
-
...
|
|
10
|
+
...T.props(),
|
|
11
11
|
value: {
|
|
12
12
|
type: [String, Number]
|
|
13
13
|
},
|
|
@@ -24,14 +24,14 @@ const A = {
|
|
|
24
24
|
}, H = {
|
|
25
25
|
name: "XTab",
|
|
26
26
|
validators: {
|
|
27
|
-
...
|
|
27
|
+
...T.validators()
|
|
28
28
|
}
|
|
29
29
|
}, te = /* @__PURE__ */ R({
|
|
30
30
|
...H,
|
|
31
31
|
props: A,
|
|
32
32
|
emits: ["remove"],
|
|
33
|
-
setup(
|
|
34
|
-
const t =
|
|
33
|
+
setup(x) {
|
|
34
|
+
const t = x, i = s(() => {
|
|
35
35
|
var e, u;
|
|
36
36
|
return ((u = (e = l.value) == null ? void 0 : e.$el) == null ? void 0 : u.href) || t.value;
|
|
37
37
|
}), S = s(() => t.label || t.value), b = d(null), l = d(null), a = j(G, {
|
|
@@ -76,6 +76,7 @@ const A = {
|
|
|
76
76
|
return (e, u) => (c(), m(L(e.to ? K : e.tag), {
|
|
77
77
|
ref_key: "elRef",
|
|
78
78
|
ref: l,
|
|
79
|
+
type: e.tag === "button" ? "button" : void 0,
|
|
79
80
|
"data-value": i.value,
|
|
80
81
|
to: e.to,
|
|
81
82
|
color: r.value ? $.value : void 0,
|
|
@@ -141,7 +142,7 @@ const A = {
|
|
|
141
142
|
], 8, ["to"])) : p("", !0)
|
|
142
143
|
]),
|
|
143
144
|
_: 3
|
|
144
|
-
}, 8, ["data-value", "to", "color", "style", "class", "aria-disabled", "aria-selected"]));
|
|
145
|
+
}, 8, ["type", "data-value", "to", "color", "style", "class", "aria-disabled", "aria-selected"]));
|
|
145
146
|
}
|
|
146
147
|
});
|
|
147
148
|
export {
|