@indielayer/ui 1.4.0 → 1.5.1
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 +10 -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/Button.vue.js +2 -2
- package/lib/components/button/Button.vue2.js +26 -26
- 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 +80 -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/Button.vue +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 +11 -4
- 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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as P, ref as w, watch as m, unref as
|
|
1
|
+
import { defineComponent as P, ref as w, watch as m, unref as a, openBlock as i, createElementBlock as p, normalizeStyle as R, normalizeClass as u, createElementVNode as d, withKeys as T, withModifiers as H, withDirectives as O, mergeProps as U, toHandlers as X, vModelCheckbox as j, createBlock as V, renderSlot as C, toDisplayString as J, createCommentVNode as Q } from "vue";
|
|
2
2
|
import { useTheme as W } from "../../composables/useTheme.js";
|
|
3
3
|
import { useCommon as I } from "../../composables/useCommon.js";
|
|
4
4
|
import { useColors as Y } from "../../composables/useColors.js";
|
|
@@ -9,9 +9,9 @@ import x from "../inputFooter/InputFooter.vue.js";
|
|
|
9
9
|
const ee = ["onKeypress"], se = ["id", "name", "aria-checked", "aria-disabled", "disabled", "required"], le = {
|
|
10
10
|
key: 1,
|
|
11
11
|
name: "check-icon",
|
|
12
|
-
class: "w-2/3 h-[2px] bg-white dark:bg-
|
|
13
|
-
},
|
|
14
|
-
|
|
12
|
+
class: "w-2/3 h-[2px] bg-white dark:bg-secondary-900"
|
|
13
|
+
}, oe = /* @__PURE__ */ d("path", { d: "M0 11l2-2 5 5L18 3l2 2L7 18z" }, null, -1), ae = [
|
|
14
|
+
oe
|
|
15
15
|
], re = ["textContent"], ie = {
|
|
16
16
|
...I.props(),
|
|
17
17
|
...Y.props("primary"),
|
|
@@ -46,22 +46,22 @@ const ee = ["onKeypress"], se = ["id", "name", "aria-checked", "aria-disabled",
|
|
|
46
46
|
setError: E
|
|
47
47
|
} = f(s, { focus: y, emit: v, withListeners: !1 });
|
|
48
48
|
c ? (m(() => r.value, () => {
|
|
49
|
-
const e =
|
|
49
|
+
const e = a(r.value);
|
|
50
50
|
e && Array.isArray(e) && e.includes(s.value) ? l.value = !0 : l.value = !1;
|
|
51
51
|
}, { immediate: !0, deep: !0 }), m(() => l.value, (e) => {
|
|
52
52
|
if (!s.value)
|
|
53
53
|
return;
|
|
54
|
-
const
|
|
54
|
+
const o = a(r.value);
|
|
55
55
|
if (e)
|
|
56
|
-
if (
|
|
57
|
-
if (!
|
|
58
|
-
const n = [...
|
|
56
|
+
if (o && Array.isArray(o)) {
|
|
57
|
+
if (!o.includes(s.value)) {
|
|
58
|
+
const n = [...o, s.value];
|
|
59
59
|
r.setValue(n);
|
|
60
60
|
}
|
|
61
61
|
} else
|
|
62
62
|
r.setValue([s.value]);
|
|
63
|
-
else if (
|
|
64
|
-
const n =
|
|
63
|
+
else if (o && Array.isArray(o) && o.includes(s.value)) {
|
|
64
|
+
const n = o.findIndex((D) => D === s.value), g = [...o];
|
|
65
65
|
g.splice(n, 1), r.setValue(g);
|
|
66
66
|
}
|
|
67
67
|
})) : (m(() => s.modelValue, (e) => {
|
|
@@ -76,23 +76,23 @@ const ee = ["onKeypress"], se = ["id", "name", "aria-checked", "aria-disabled",
|
|
|
76
76
|
}, 0);
|
|
77
77
|
}
|
|
78
78
|
}, { styles: L, classes: t, className: M } = W("Checkbox", {}, s, { checked: l, isInsideForm: S, isInsideFormGroup: c });
|
|
79
|
-
return B({ focus: y, blur: F, toggle: b, reset: q, validate: k, setError: E }), (e,
|
|
80
|
-
style: R(
|
|
79
|
+
return B({ focus: y, blur: F, toggle: b, reset: q, validate: k, setError: E }), (e, o) => (i(), p("label", {
|
|
80
|
+
style: R(a(L)),
|
|
81
81
|
class: u([
|
|
82
|
-
|
|
83
|
-
|
|
82
|
+
a(M),
|
|
83
|
+
a(t).wrapper
|
|
84
84
|
])
|
|
85
85
|
}, [
|
|
86
86
|
d("div", {
|
|
87
87
|
ref_key: "elRef",
|
|
88
88
|
ref: h,
|
|
89
|
-
class: u(
|
|
89
|
+
class: u(a(t).content),
|
|
90
90
|
tabindex: "0",
|
|
91
91
|
onKeypress: T(H(b, ["prevent", "stop"]), ["space"])
|
|
92
92
|
}, [
|
|
93
93
|
O(d("input", U({
|
|
94
94
|
id: e.id,
|
|
95
|
-
"onUpdate:modelValue":
|
|
95
|
+
"onUpdate:modelValue": o[0] || (o[0] = (n) => l.value = n),
|
|
96
96
|
name: e.name,
|
|
97
97
|
"aria-checked": e.indeterminate ? "mixed" : l.value ? "true" : "false",
|
|
98
98
|
"aria-disabled": e.disabled ? "true" : void 0,
|
|
@@ -105,7 +105,7 @@ const ee = ["onKeypress"], se = ["id", "name", "aria-checked", "aria-disabled",
|
|
|
105
105
|
]),
|
|
106
106
|
d("div", {
|
|
107
107
|
class: u([
|
|
108
|
-
|
|
108
|
+
a(t).box,
|
|
109
109
|
[e.glow && !e.disabled && !e.loading ? e.$style["checkbox--glow"] : ""]
|
|
110
110
|
])
|
|
111
111
|
}, [
|
|
@@ -116,12 +116,12 @@ const ee = ["onKeypress"], se = ["id", "name", "aria-checked", "aria-disabled",
|
|
|
116
116
|
}, null, 8, ["size"])) : e.indeterminate ? (i(), p("span", le)) : C(e.$slots, "icon", { key: 2 }, () => [
|
|
117
117
|
(i(), p("svg", {
|
|
118
118
|
viewBox: "0 0 20 20",
|
|
119
|
-
class: u([
|
|
120
|
-
},
|
|
119
|
+
class: u([a(t).icon, { "opacity-0": !l.value }])
|
|
120
|
+
}, ae, 2))
|
|
121
121
|
])
|
|
122
122
|
], 2),
|
|
123
123
|
d("div", {
|
|
124
|
-
class: u(
|
|
124
|
+
class: u(a(t).label)
|
|
125
125
|
}, [
|
|
126
126
|
e.label ? (i(), p("span", {
|
|
127
127
|
key: 0,
|
|
@@ -129,9 +129,9 @@ const ee = ["onKeypress"], se = ["id", "name", "aria-checked", "aria-disabled",
|
|
|
129
129
|
}, null, 8, re)) : C(e.$slots, "default", { key: 1 })
|
|
130
130
|
], 2)
|
|
131
131
|
], 42, ee),
|
|
132
|
-
|
|
132
|
+
a(N) ? Q("", !0) : (i(), V(x, {
|
|
133
133
|
key: 0,
|
|
134
|
-
error:
|
|
134
|
+
error: a(G),
|
|
135
135
|
helper: e.helper
|
|
136
136
|
}, null, 8, ["error", "helper"]))
|
|
137
137
|
], 6));
|
|
@@ -5,19 +5,19 @@ const o = {
|
|
|
5
5
|
return r.isInsideForm && !r.isInsideFormGroup && e.push("mb-3"), e;
|
|
6
6
|
},
|
|
7
7
|
box: ({ props: r }) => {
|
|
8
|
-
const e = ["rounded flex justify-center items-center shrink-0 border
|
|
9
|
-
return r.size === "
|
|
8
|
+
const e = ["rounded flex justify-center items-center shrink-0 border border-[color:var(--x-checkbox-border)] bg-[color:var(--x-checkbox-bg)] dark:border-[color:var(--x-checkbox-dark-border)] dark:bg-[color:var(--x-checkbox-dark-bg)]"];
|
|
9
|
+
return r.size === "lg" ? e.push("h-5 w-5") : r.size === "xl" ? e.push("h-6 w-6") : e.push("h-4 w-4"), e;
|
|
10
10
|
},
|
|
11
11
|
content: ({ props: r }) => {
|
|
12
|
-
const e = ["flex items-
|
|
12
|
+
const e = ["flex items-baseline"];
|
|
13
13
|
return r.disabled && e.push("cursor-not-allowed"), e;
|
|
14
14
|
},
|
|
15
15
|
icon: ({ props: r }) => {
|
|
16
|
-
const e = ["fill-current text-white
|
|
17
|
-
return r.size === "
|
|
16
|
+
const e = ["fill-current text-white"];
|
|
17
|
+
return r.size === "lg" ? e.push("h-3 w-3") : r.size === "xl" ? e.push("h-4 w-4") : e.push("h-2.5 w-2.5"), e;
|
|
18
18
|
},
|
|
19
19
|
label: ({ props: r }) => {
|
|
20
|
-
const e = ["inline-block font-medium text-
|
|
20
|
+
const e = ["inline-block font-medium text-secondary-800 dark:text-secondary-200 pl-2"];
|
|
21
21
|
return r.size === "xs" ? e.push("text-xs") : r.size === "sm" ? e.push("text-sm") : r.size === "lg" ? e.push("text-lg") : r.size === "xl" && e.push("text-xl"), e;
|
|
22
22
|
}
|
|
23
23
|
},
|
|
@@ -13,11 +13,11 @@ const o = {
|
|
|
13
13
|
return r.disabled && e.push("cursor-not-allowed"), e;
|
|
14
14
|
},
|
|
15
15
|
icon: ({ props: r }) => {
|
|
16
|
-
const e = ["fill-current text-white dark:text-
|
|
16
|
+
const e = ["fill-current text-white dark:text-secondary-900"];
|
|
17
17
|
return r.size === "xs" || r.size === "sm" ? e.push("h-2 w-2") : r.size === "xl" ? e.push("h-3.5 w-3.5") : e.push("h-2.5 w-2.5"), e;
|
|
18
18
|
},
|
|
19
19
|
label: ({ props: r }) => {
|
|
20
|
-
const e = ["text-
|
|
20
|
+
const e = ["text-secondary-800 dark:text-secondary-200 pl-2 text-sm"];
|
|
21
21
|
return r.size === "xs" ? e.push("text-xs") : r.size === "sm" ? e.push("text-sm") : r.size === "lg" ? e.push("text-lg") : r.size === "xl" && e.push("text-xl"), e;
|
|
22
22
|
}
|
|
23
23
|
},
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { defineComponent as p, openBlock as
|
|
1
|
+
import { defineComponent as p, openBlock as o, createElementBlock as r, normalizeStyle as s, unref as t, normalizeClass as a, createElementVNode as n, toDisplayString as u, createCommentVNode as v } from "vue";
|
|
2
2
|
import { useTheme as y } from "../../composables/useTheme.js";
|
|
3
3
|
const h = ["textContent"], f = {
|
|
4
4
|
label: String,
|
|
5
5
|
vertical: Boolean
|
|
6
|
-
},
|
|
7
|
-
...
|
|
6
|
+
}, C = { name: "XDivider" }, x = /* @__PURE__ */ p({
|
|
7
|
+
...C,
|
|
8
8
|
props: f,
|
|
9
|
-
setup(
|
|
10
|
-
const c =
|
|
11
|
-
return (e,
|
|
12
|
-
style:
|
|
9
|
+
setup(i) {
|
|
10
|
+
const c = i, { styles: d, classes: l, className: m } = y("Divider", {}, c);
|
|
11
|
+
return (e, b) => (o(), r("div", {
|
|
12
|
+
style: s(t(d)),
|
|
13
13
|
class: a([
|
|
14
|
-
t(
|
|
14
|
+
t(m),
|
|
15
15
|
t(l).wrapper
|
|
16
16
|
])
|
|
17
17
|
}, [
|
|
18
|
-
|
|
18
|
+
n("div", {
|
|
19
19
|
class: a(t(l).line),
|
|
20
|
-
style:
|
|
20
|
+
style: s([
|
|
21
21
|
{
|
|
22
22
|
width: e.vertical ? "1px" : "auto",
|
|
23
23
|
height: e.vertical ? "auto" : "1px"
|
|
24
24
|
}
|
|
25
25
|
])
|
|
26
26
|
}, null, 6),
|
|
27
|
-
e.label ? (
|
|
27
|
+
e.label ? (o(), r("div", {
|
|
28
28
|
key: 0,
|
|
29
|
-
class: a(["font-medium text-sm text-
|
|
29
|
+
class: a(["font-medium text-sm text-secondary-600 dark:text-secondary-300", [
|
|
30
30
|
t(l).label,
|
|
31
31
|
{
|
|
32
32
|
"my-2": e.vertical,
|
|
@@ -35,9 +35,9 @@ const h = ["textContent"], f = {
|
|
|
35
35
|
]]),
|
|
36
36
|
textContent: u(e.label)
|
|
37
37
|
}, null, 10, h)) : v("", !0),
|
|
38
|
-
|
|
38
|
+
n("div", {
|
|
39
39
|
class: a(t(l).line),
|
|
40
|
-
style:
|
|
40
|
+
style: s([
|
|
41
41
|
{
|
|
42
42
|
width: e.vertical ? "1px" : "auto",
|
|
43
43
|
height: e.vertical ? "auto" : "1px"
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const t = {
|
|
2
2
|
classes: {
|
|
3
3
|
wrapper: ({ props: e }) => `flex justify-center items-center ${e.vertical ? "h-full flex-col" : "w-full"}`,
|
|
4
|
-
label: "font-medium text-sm text-
|
|
5
|
-
line: "bg-
|
|
4
|
+
label: "font-medium text-sm text-secondary-600 dark:text-secondary-300",
|
|
5
|
+
line: "bg-secondary-200 dark:bg-secondary-700 flex-grow"
|
|
6
6
|
}
|
|
7
7
|
}, l = t;
|
|
8
8
|
export {
|
|
@@ -86,14 +86,14 @@ const ee = {
|
|
|
86
86
|
return;
|
|
87
87
|
}
|
|
88
88
|
e.addEventListener("transitionend", o), setTimeout(() => {
|
|
89
|
-
t.backdrop && e.classList.add("bg-
|
|
89
|
+
t.backdrop && e.classList.add("bg-slate-500/30"), t.position === "top" ? e.style.top = "0" : t.position === "bottom" ? e.style.bottom = "0" : t.position === "left" ? e.style.left = "0" : t.position === "right" && (e.style.right = "0");
|
|
90
90
|
}, 1);
|
|
91
91
|
}
|
|
92
92
|
function R(e) {
|
|
93
93
|
}
|
|
94
94
|
function D(e, o) {
|
|
95
95
|
e.addEventListener("transitionend", o), setTimeout(() => {
|
|
96
|
-
t.backdrop && e.classList.remove("bg-
|
|
96
|
+
t.backdrop && e.classList.remove("bg-slate-500/30"), t.position === "top" ? e.style.top = `-${t.height}px` : t.position === "bottom" ? e.style.bottom = `-${t.height}px` : t.position === "left" ? e.style.left = `-${t.width}px` : t.position === "right" && (e.style.right = `-${t.width}px`);
|
|
97
97
|
}, 1);
|
|
98
98
|
}
|
|
99
99
|
function z(e) {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
const
|
|
1
|
+
const e = {
|
|
2
2
|
classes: {
|
|
3
3
|
wrapper: "relative",
|
|
4
4
|
content: "",
|
|
5
5
|
title: "text-xl mb-1",
|
|
6
|
-
description: "text-
|
|
6
|
+
description: "text-secondary-500",
|
|
7
7
|
footer: "space-x-4 mt-4"
|
|
8
8
|
}
|
|
9
|
-
},
|
|
9
|
+
}, t = e;
|
|
10
10
|
export {
|
|
11
|
-
|
|
11
|
+
t as default
|
|
12
12
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
const
|
|
1
|
+
const e = {
|
|
2
2
|
classes: {
|
|
3
3
|
wrapper: "relative",
|
|
4
4
|
content: "grid",
|
|
5
5
|
title: "text-xl mb-1",
|
|
6
|
-
description: "text-
|
|
6
|
+
description: "text-secondary-500",
|
|
7
7
|
footer: "grid grid-cols-2 gap-4 lg:flex mt-8"
|
|
8
8
|
}
|
|
9
|
-
},
|
|
9
|
+
}, t = e;
|
|
10
10
|
export {
|
|
11
|
-
|
|
11
|
+
t as default
|
|
12
12
|
};
|
|
@@ -22,6 +22,7 @@ declare const formGroupProps: {
|
|
|
22
22
|
readonly type: ArrayConstructor;
|
|
23
23
|
readonly default: () => never[];
|
|
24
24
|
};
|
|
25
|
+
tooltip: StringConstructor;
|
|
25
26
|
disabled: BooleanConstructor;
|
|
26
27
|
loading: BooleanConstructor;
|
|
27
28
|
loadingLabel: StringConstructor;
|
|
@@ -67,6 +68,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
67
68
|
readonly type: ArrayConstructor;
|
|
68
69
|
readonly default: () => never[];
|
|
69
70
|
};
|
|
71
|
+
tooltip: StringConstructor;
|
|
70
72
|
disabled: BooleanConstructor;
|
|
71
73
|
loading: BooleanConstructor;
|
|
72
74
|
loadingLabel: StringConstructor;
|
|
@@ -102,6 +104,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
102
104
|
readonly type: ArrayConstructor;
|
|
103
105
|
readonly default: () => never[];
|
|
104
106
|
};
|
|
107
|
+
tooltip: StringConstructor;
|
|
105
108
|
disabled: BooleanConstructor;
|
|
106
109
|
loading: BooleanConstructor;
|
|
107
110
|
loadingLabel: StringConstructor;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as C, computed as k, provide as q, openBlock as
|
|
1
|
+
import { defineComponent as C, computed as k, provide as q, openBlock as p, createBlock as m, mergeProps as B, unref as o, toHandlers as N, withCtx as $, createElementVNode as w, normalizeClass as A, renderSlot as E, createCommentVNode as P } from "vue";
|
|
2
2
|
import { useTheme as j } from "../../composables/useTheme.js";
|
|
3
3
|
import { useInteractive as z } from "../../composables/useInteractive.js";
|
|
4
4
|
import { useInputtable as l } from "../../composables/useInputtable.js";
|
|
@@ -14,19 +14,19 @@ const S = {
|
|
|
14
14
|
}
|
|
15
15
|
}, T = {
|
|
16
16
|
name: "XFormGroup"
|
|
17
|
-
},
|
|
17
|
+
}, U = /* @__PURE__ */ C({
|
|
18
18
|
...T,
|
|
19
19
|
props: S,
|
|
20
20
|
emits: l.emits(),
|
|
21
21
|
setup(d, { expose: f, emit: c }) {
|
|
22
|
-
const r = d,
|
|
22
|
+
const r = d, t = [], V = k(() => typeof r.modelValue == "string" || typeof r.modelValue == "number" || Array.isArray(r.modelValue) ? r.modelValue : "");
|
|
23
23
|
q(H, {
|
|
24
|
-
registerInputGroup: (e,
|
|
25
|
-
|
|
24
|
+
registerInputGroup: (e, s) => {
|
|
25
|
+
t.push({ name: e, focus: s });
|
|
26
26
|
},
|
|
27
27
|
unregisterInputGroup: (e) => {
|
|
28
|
-
const
|
|
29
|
-
|
|
28
|
+
const s = t.findIndex((_) => _.name === e);
|
|
29
|
+
t.splice(s, 1);
|
|
30
30
|
},
|
|
31
31
|
setValue: (e) => {
|
|
32
32
|
n("update:modelValue", e);
|
|
@@ -36,7 +36,7 @@ const S = {
|
|
|
36
36
|
});
|
|
37
37
|
function i() {
|
|
38
38
|
var e;
|
|
39
|
-
(e =
|
|
39
|
+
(e = t[0]) == null || e.focus();
|
|
40
40
|
}
|
|
41
41
|
const n = c, {
|
|
42
42
|
errorInternal: a,
|
|
@@ -49,8 +49,8 @@ const S = {
|
|
|
49
49
|
change: (e) => {
|
|
50
50
|
r.validateOnInput && !b.value && u(r.modelValue);
|
|
51
51
|
}
|
|
52
|
-
}, { styles: F, classes: G, className:
|
|
53
|
-
return f({ focus: i, blur, reset: h, validate: u, setError: v }), (e,
|
|
52
|
+
}, { styles: F, classes: G, className: g } = j("FormGroup", {}, r, { errorInternal: a });
|
|
53
|
+
return f({ focus: i, blur, reset: h, validate: u, setError: v }), (e, s) => (p(), m(K, B({
|
|
54
54
|
tag: "fieldset",
|
|
55
55
|
style: o(F),
|
|
56
56
|
disabled: e.disabled,
|
|
@@ -58,8 +58,9 @@ const S = {
|
|
|
58
58
|
"is-inside-form": o(y),
|
|
59
59
|
label: e.label,
|
|
60
60
|
class: [
|
|
61
|
-
o(
|
|
62
|
-
]
|
|
61
|
+
o(g)
|
|
62
|
+
],
|
|
63
|
+
tooltip: e.tooltip
|
|
63
64
|
}, N(I)), {
|
|
64
65
|
default: $(() => [
|
|
65
66
|
w("div", {
|
|
@@ -67,16 +68,16 @@ const S = {
|
|
|
67
68
|
}, [
|
|
68
69
|
E(e.$slots, "default")
|
|
69
70
|
], 2),
|
|
70
|
-
e.hideFooter ? P("", !0) : (
|
|
71
|
+
e.hideFooter ? P("", !0) : (p(), m(O, {
|
|
71
72
|
key: 0,
|
|
72
73
|
error: o(a),
|
|
73
74
|
helper: e.helper
|
|
74
75
|
}, null, 8, ["error", "helper"]))
|
|
75
76
|
]),
|
|
76
77
|
_: 3
|
|
77
|
-
}, 16, ["style", "disabled", "required", "is-inside-form", "label", "class"]));
|
|
78
|
+
}, 16, ["style", "disabled", "required", "is-inside-form", "label", "class", "tooltip"]));
|
|
78
79
|
}
|
|
79
80
|
});
|
|
80
81
|
export {
|
|
81
|
-
|
|
82
|
+
U as default
|
|
82
83
|
};
|
|
@@ -2,7 +2,7 @@ const t = {
|
|
|
2
2
|
classes: {
|
|
3
3
|
wrapper: ({ props: s }) => {
|
|
4
4
|
const e = "inline shrink-0";
|
|
5
|
-
return s.size === "xs" ? e + " h-3 w-3" : s.size === "sm" ? e + " h-4 w-4" : s.size === "lg" ? e + " h-6 w-6" : s.size === "xl" ? e + " h-
|
|
5
|
+
return s.size === "xs" ? e + " h-3 w-3" : s.size === "sm" ? e + " h-4 w-4" : s.size === "lg" ? e + " h-6 w-6" : s.size === "xl" ? e + " h-7 w-7" : e + " h-4 w-4";
|
|
6
6
|
}
|
|
7
7
|
}
|
|
8
8
|
}, i = t;
|