@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,14 +1,15 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useTheme as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
|
|
1
|
+
import { defineComponent as E, ref as J, watch as X, openBlock as n, createElementBlock as a, normalizeClass as c, unref as u, renderSlot as i, createElementVNode as f, normalizeStyle as F, createVNode as p, withCtx as d, createBlock as m, createCommentVNode as $, Fragment as y, renderList as g, createTextVNode as _, toDisplayString as C } from "vue";
|
|
2
|
+
import { useTheme as O } from "../../composables/useTheme.js";
|
|
3
|
+
import P from "./TableHead.vue.js";
|
|
4
|
+
import N from "./TableHeader.vue.js";
|
|
5
|
+
import W from "./TableBody.js";
|
|
6
|
+
import S from "./TableRow.vue.js";
|
|
7
|
+
import w from "./TableCell.vue.js";
|
|
8
|
+
import q from "../spinner/Spinner.vue.js";
|
|
9
|
+
import G from "../skeleton/Skeleton.vue.js";
|
|
10
|
+
import K from "../icon/Icon.vue.js";
|
|
11
|
+
import { chevronDownIcon as M } from "../../common/icons.js";
|
|
12
|
+
const Q = { key: 1 }, R = ["colspan"], U = { key: 2 }, Y = ["colspan"], Z = ["onClick"], j = { key: 0 }, x = { colspan: "999" }, ee = {
|
|
12
13
|
headers: {
|
|
13
14
|
type: Array,
|
|
14
15
|
default: () => []
|
|
@@ -41,217 +42,214 @@ const R = { key: 1 }, U = ["colspan"], Y = { key: 2 }, Z = ["colspan"], j = ["on
|
|
|
41
42
|
default: !0
|
|
42
43
|
},
|
|
43
44
|
expandable: Boolean
|
|
44
|
-
},
|
|
45
|
-
...
|
|
45
|
+
}, te = { name: "XTable" }, pe = /* @__PURE__ */ E({
|
|
46
|
+
...te,
|
|
46
47
|
props: {
|
|
47
|
-
...
|
|
48
|
+
...ee,
|
|
48
49
|
items: {
|
|
49
50
|
type: Array,
|
|
50
51
|
default: () => []
|
|
51
52
|
}
|
|
52
53
|
},
|
|
53
54
|
emits: ["update:sort", "click-row"],
|
|
54
|
-
setup(h, { emit:
|
|
55
|
-
const
|
|
56
|
-
function
|
|
55
|
+
setup(h, { emit: z }) {
|
|
56
|
+
const v = h;
|
|
57
|
+
function A(e) {
|
|
57
58
|
try {
|
|
58
59
|
return JSON.parse(JSON.stringify(e));
|
|
59
60
|
} catch {
|
|
60
61
|
return [];
|
|
61
62
|
}
|
|
62
63
|
}
|
|
63
|
-
const
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
const k = J([]);
|
|
65
|
+
X(() => v.items, (e) => {
|
|
66
|
+
v.expandable && (k.value = A(e));
|
|
66
67
|
}, { immediate: !0 });
|
|
67
|
-
const
|
|
68
|
-
function
|
|
68
|
+
const T = z;
|
|
69
|
+
function H(e, o) {
|
|
69
70
|
if (e)
|
|
70
|
-
for (let
|
|
71
|
-
const { 0:
|
|
72
|
-
if (e ===
|
|
73
|
-
return parseInt(
|
|
71
|
+
for (let t = 0; t < o.length; t++) {
|
|
72
|
+
const { 0: l, 1: s } = o[t].split(",");
|
|
73
|
+
if (e === l)
|
|
74
|
+
return parseInt(s) > 0 ? 1 : -1;
|
|
74
75
|
}
|
|
75
76
|
}
|
|
76
|
-
function
|
|
77
|
-
const
|
|
78
|
-
let
|
|
79
|
-
for (let
|
|
80
|
-
const { 0:
|
|
81
|
-
if (
|
|
82
|
-
if (
|
|
83
|
-
|
|
77
|
+
function V(e) {
|
|
78
|
+
const o = v.sort.slice(0);
|
|
79
|
+
let t = !1;
|
|
80
|
+
for (let l = 0; l < o.length; l++) {
|
|
81
|
+
const { 0: s, 1: r } = o[l].split(",");
|
|
82
|
+
if (s === e.value) {
|
|
83
|
+
if (t = !0, r === "-1") {
|
|
84
|
+
o.splice(l, 1, `${e.value},1`);
|
|
84
85
|
break;
|
|
85
|
-
} else if (
|
|
86
|
-
|
|
86
|
+
} else if (r === "1") {
|
|
87
|
+
o.splice(l, 1);
|
|
87
88
|
break;
|
|
88
89
|
}
|
|
89
90
|
}
|
|
90
91
|
}
|
|
91
|
-
|
|
92
|
+
t || o.push(`${e.value},-1`), T("update:sort", o);
|
|
92
93
|
}
|
|
93
|
-
function
|
|
94
|
-
if (!
|
|
94
|
+
function I(e, o) {
|
|
95
|
+
if (!o)
|
|
95
96
|
return "";
|
|
96
|
-
const
|
|
97
|
-
return (
|
|
97
|
+
const t = Array.isArray(o) ? o : o.match(/([^[.\]])+/g);
|
|
98
|
+
return (t == null ? void 0 : t.reduce((s, r) => s && s[r], e)) ?? "";
|
|
98
99
|
}
|
|
99
|
-
const { styles:
|
|
100
|
-
return (e,
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
100
|
+
const { styles: L, classes: b, className: D } = O("Table", {}, v);
|
|
101
|
+
return (e, o) => (n(), a("div", {
|
|
102
|
+
class: c([u(D), u(b).wrapper])
|
|
103
|
+
}, [
|
|
104
|
+
i(e.$slots, "title"),
|
|
105
|
+
i(e.$slots, "actions"),
|
|
106
|
+
f("table", {
|
|
107
|
+
style: F(u(L)),
|
|
108
|
+
class: c(u(b).table)
|
|
104
109
|
}, [
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
class: p(["max-w-[60%]", {
|
|
156
|
-
"mx-auto": s.align === "center",
|
|
157
|
-
"ml-auto": s.align === "right"
|
|
158
|
-
}]),
|
|
159
|
-
shape: s.skeletonShape || "line"
|
|
160
|
-
}, null, 8, ["shape", "class"])
|
|
161
|
-
])
|
|
162
|
-
]),
|
|
163
|
-
_: 2
|
|
164
|
-
}, 1032, ["text-align", "width", "dense", "fixed"]))), 128))
|
|
165
|
-
]),
|
|
166
|
-
_: 2
|
|
167
|
-
}, 1032, ["striped"]))), 128)) : e.error ? (n(), i("tr", R, [
|
|
168
|
-
f("td", {
|
|
169
|
-
colspan: e.headers.length
|
|
170
|
-
}, [
|
|
171
|
-
d(e.$slots, "error")
|
|
172
|
-
], 8, U)
|
|
173
|
-
])) : !h.items || h.items.length === 0 ? (n(), i("tr", Y, [
|
|
174
|
-
f("td", {
|
|
175
|
-
colspan: e.headers.length
|
|
176
|
-
}, [
|
|
177
|
-
d(e.$slots, "empty")
|
|
178
|
-
], 8, Z)
|
|
179
|
-
])) : (n(!0), i(k, { key: 3 }, v(h.items, (t, o) => {
|
|
180
|
-
var s;
|
|
181
|
-
return n(), i(k, { key: o }, [
|
|
182
|
-
m(z, {
|
|
183
|
-
pointer: e.pointer,
|
|
184
|
-
striped: e.striped,
|
|
185
|
-
onClick: (a) => e.$emit("click-row", t)
|
|
186
|
-
}, {
|
|
187
|
-
default: u(() => [
|
|
188
|
-
e.expandable ? (n(), y(_, {
|
|
189
|
-
key: 0,
|
|
190
|
-
width: "48",
|
|
191
|
-
class: "!p-1"
|
|
192
|
-
}, {
|
|
193
|
-
default: u(() => {
|
|
194
|
-
var a;
|
|
195
|
-
return [
|
|
196
|
-
f("button", {
|
|
197
|
-
class: "p-4",
|
|
198
|
-
onClick: (B) => g.value[o].__expanded = !g.value[o].__expanded
|
|
199
|
-
}, [
|
|
200
|
-
m(r, {
|
|
201
|
-
icon: c(Q),
|
|
202
|
-
size: e.dense ? "xs" : "md",
|
|
203
|
-
class: p(["transition-transform", {
|
|
204
|
-
"rotate-180": (a = g.value[o]) == null ? void 0 : a.__expanded
|
|
205
|
-
}])
|
|
206
|
-
}, null, 8, ["icon", "size", "class"])
|
|
207
|
-
], 8, j)
|
|
208
|
-
];
|
|
209
|
-
}),
|
|
210
|
-
_: 2
|
|
211
|
-
}, 1024)) : b("", !0),
|
|
212
|
-
(n(!0), i(k, null, v(e.headers, (a, B) => (n(), y(_, {
|
|
213
|
-
key: B,
|
|
214
|
-
"text-align": a.align,
|
|
215
|
-
truncate: a.truncate,
|
|
216
|
-
width: a.width,
|
|
217
|
-
dense: e.dense,
|
|
218
|
-
fixed: e.fixed
|
|
219
|
-
}, {
|
|
220
|
-
default: u(() => [
|
|
221
|
-
d(e.$slots, `item-${a.value}`, { item: t }, () => [
|
|
222
|
-
C(N(L(t, a.value)), 1)
|
|
223
|
-
])
|
|
224
|
-
]),
|
|
225
|
-
_: 2
|
|
226
|
-
}, 1032, ["text-align", "truncate", "width", "dense", "fixed"]))), 128))
|
|
227
|
-
]),
|
|
228
|
-
_: 2
|
|
229
|
-
}, 1032, ["pointer", "striped", "onClick"]),
|
|
230
|
-
e.expandable ? (n(), i("tr", x, [
|
|
231
|
-
f("td", ee, [
|
|
232
|
-
f("div", {
|
|
233
|
-
class: p(["overflow-hidden transition-opacity", [(s = g.value[o]) != null && s.__expanded ? "" : "opacity-0 max-h-0"]])
|
|
234
|
-
}, [
|
|
235
|
-
d(e.$slots, "expanded-row", { item: t })
|
|
236
|
-
], 2)
|
|
110
|
+
p(P, null, {
|
|
111
|
+
default: d(() => [
|
|
112
|
+
e.expandable ? (n(), m(N, {
|
|
113
|
+
key: 0,
|
|
114
|
+
width: "48",
|
|
115
|
+
class: "!p-0",
|
|
116
|
+
"sticky-header": e.stickyHeader
|
|
117
|
+
}, null, 8, ["sticky-header"])) : $("", !0),
|
|
118
|
+
(n(!0), a(y, null, g(e.headers, (t, l) => (n(), m(N, {
|
|
119
|
+
key: l,
|
|
120
|
+
"sticky-header": e.stickyHeader,
|
|
121
|
+
"text-align": t.align,
|
|
122
|
+
sort: H(t.value, e.sort),
|
|
123
|
+
sortable: t.sortable,
|
|
124
|
+
width: t.width,
|
|
125
|
+
onClick: (s) => t.sortable ? V(t) : null
|
|
126
|
+
}, {
|
|
127
|
+
default: d(() => [
|
|
128
|
+
i(e.$slots, `header-${t.value}`, { header: t }, () => [
|
|
129
|
+
_(C(t.text), 1)
|
|
130
|
+
])
|
|
131
|
+
]),
|
|
132
|
+
_: 2
|
|
133
|
+
}, 1032, ["sticky-header", "text-align", "sort", "sortable", "width", "onClick"]))), 128))
|
|
134
|
+
]),
|
|
135
|
+
_: 3
|
|
136
|
+
}),
|
|
137
|
+
p(u(W), null, {
|
|
138
|
+
default: d(() => [
|
|
139
|
+
e.loading ? (n(!0), a(y, { key: 0 }, g(Number(e.loadingLines), (t, l) => (n(), m(S, {
|
|
140
|
+
key: l,
|
|
141
|
+
striped: e.striped
|
|
142
|
+
}, {
|
|
143
|
+
default: d(() => [
|
|
144
|
+
(n(!0), a(y, null, g(e.headers, (s, r) => (n(), m(w, {
|
|
145
|
+
key: r,
|
|
146
|
+
"text-align": s.align,
|
|
147
|
+
width: s.width,
|
|
148
|
+
dense: e.dense,
|
|
149
|
+
fixed: e.fixed
|
|
150
|
+
}, {
|
|
151
|
+
default: d(() => [
|
|
152
|
+
i(e.$slots, `loading-${s.value}`, { item: t }, () => [
|
|
153
|
+
p(G, {
|
|
154
|
+
class: c(["max-w-[60%]", {
|
|
155
|
+
"mx-auto": s.align === "center",
|
|
156
|
+
"ml-auto": s.align === "right"
|
|
157
|
+
}]),
|
|
158
|
+
shape: s.skeletonShape || "line"
|
|
159
|
+
}, null, 8, ["shape", "class"])
|
|
237
160
|
])
|
|
238
|
-
])
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
161
|
+
]),
|
|
162
|
+
_: 2
|
|
163
|
+
}, 1032, ["text-align", "width", "dense", "fixed"]))), 128))
|
|
164
|
+
]),
|
|
165
|
+
_: 2
|
|
166
|
+
}, 1032, ["striped"]))), 128)) : e.error ? (n(), a("tr", Q, [
|
|
167
|
+
f("td", {
|
|
168
|
+
colspan: e.headers.length
|
|
169
|
+
}, [
|
|
170
|
+
i(e.$slots, "error")
|
|
171
|
+
], 8, R)
|
|
172
|
+
])) : !h.items || h.items.length === 0 ? (n(), a("tr", U, [
|
|
173
|
+
f("td", {
|
|
174
|
+
colspan: e.headers.length
|
|
175
|
+
}, [
|
|
176
|
+
i(e.$slots, "empty")
|
|
177
|
+
], 8, Y)
|
|
178
|
+
])) : (n(!0), a(y, { key: 3 }, g(h.items, (t, l) => {
|
|
179
|
+
var s;
|
|
180
|
+
return n(), a(y, { key: l }, [
|
|
181
|
+
p(S, {
|
|
182
|
+
pointer: e.pointer,
|
|
183
|
+
striped: e.striped,
|
|
184
|
+
onClick: (r) => e.$emit("click-row", t)
|
|
185
|
+
}, {
|
|
186
|
+
default: d(() => [
|
|
187
|
+
e.expandable ? (n(), m(w, {
|
|
188
|
+
key: 0,
|
|
189
|
+
width: "48",
|
|
190
|
+
class: "!p-1"
|
|
191
|
+
}, {
|
|
192
|
+
default: d(() => {
|
|
193
|
+
var r;
|
|
194
|
+
return [
|
|
195
|
+
f("button", {
|
|
196
|
+
class: "p-4",
|
|
197
|
+
onClick: (B) => k.value[l].__expanded = !k.value[l].__expanded
|
|
198
|
+
}, [
|
|
199
|
+
p(K, {
|
|
200
|
+
icon: u(M),
|
|
201
|
+
size: e.dense ? "xs" : "md",
|
|
202
|
+
class: c(["transition-transform", {
|
|
203
|
+
"rotate-180": (r = k.value[l]) == null ? void 0 : r.__expanded
|
|
204
|
+
}])
|
|
205
|
+
}, null, 8, ["icon", "size", "class"])
|
|
206
|
+
], 8, Z)
|
|
207
|
+
];
|
|
208
|
+
}),
|
|
209
|
+
_: 2
|
|
210
|
+
}, 1024)) : $("", !0),
|
|
211
|
+
(n(!0), a(y, null, g(e.headers, (r, B) => (n(), m(w, {
|
|
212
|
+
key: B,
|
|
213
|
+
"text-align": r.align,
|
|
214
|
+
truncate: r.truncate,
|
|
215
|
+
width: r.width,
|
|
216
|
+
dense: e.dense,
|
|
217
|
+
fixed: e.fixed
|
|
218
|
+
}, {
|
|
219
|
+
default: d(() => [
|
|
220
|
+
i(e.$slots, `item-${r.value}`, { item: t }, () => [
|
|
221
|
+
_(C(I(t, r.value)), 1)
|
|
222
|
+
])
|
|
223
|
+
]),
|
|
224
|
+
_: 2
|
|
225
|
+
}, 1032, ["text-align", "truncate", "width", "dense", "fixed"]))), 128))
|
|
226
|
+
]),
|
|
227
|
+
_: 2
|
|
228
|
+
}, 1032, ["pointer", "striped", "onClick"]),
|
|
229
|
+
e.expandable ? (n(), a("tr", j, [
|
|
230
|
+
f("td", x, [
|
|
231
|
+
f("div", {
|
|
232
|
+
class: c(["overflow-hidden transition-opacity", [(s = k.value[l]) != null && s.__expanded ? "" : "opacity-0 max-h-0"]])
|
|
233
|
+
}, [
|
|
234
|
+
i(e.$slots, "expanded-row", { item: t })
|
|
235
|
+
], 2)
|
|
236
|
+
])
|
|
237
|
+
])) : $("", !0)
|
|
238
|
+
], 64);
|
|
239
|
+
}), 128))
|
|
240
|
+
]),
|
|
241
|
+
_: 3
|
|
242
|
+
}),
|
|
243
|
+
e.loading ? (n(), a("div", {
|
|
244
|
+
key: 0,
|
|
245
|
+
class: c(u(b).loadingWrapper)
|
|
246
|
+
}, [
|
|
247
|
+
p(q, { size: "lg" })
|
|
248
|
+
], 2)) : $("", !0)
|
|
249
|
+
], 6)
|
|
250
|
+
], 2));
|
|
253
251
|
}
|
|
254
252
|
});
|
|
255
253
|
export {
|
|
256
|
-
|
|
254
|
+
pe as default
|
|
257
255
|
};
|
|
@@ -5,9 +5,9 @@ const a = {
|
|
|
5
5
|
const e = ["w-full relative"];
|
|
6
6
|
return l.scrollable && e.push("overflow-x-scroll sm:overflow-x-auto whitespace-wrap sm:whitespace-normal"), l.stickyHeader && e.push("relative"), l.fixed && e.push("md:table-fixed"), e;
|
|
7
7
|
},
|
|
8
|
-
loadingWrapper: "absolute inset-0 flex items-center justify-center z-40 bg-
|
|
8
|
+
loadingWrapper: "absolute inset-0 flex items-center justify-center z-40 bg-secondary-300 dark:bg-secondary-600 rounded opacity-30"
|
|
9
9
|
}
|
|
10
|
-
},
|
|
10
|
+
}, s = a;
|
|
11
11
|
export {
|
|
12
|
-
|
|
12
|
+
s as default
|
|
13
13
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a = {
|
|
2
2
|
classes: {
|
|
3
|
-
wrapper: "w-full h-full shadow-sm overflow-x-auto text-sm bg-white dark:bg-
|
|
4
|
-
table: ({ props:
|
|
3
|
+
wrapper: "w-full h-full shadow-sm overflow-x-auto text-sm bg-white dark:bg-secondary-800",
|
|
4
|
+
table: ({ props: s }) => {
|
|
5
5
|
const e = ["w-full relative"];
|
|
6
|
-
return
|
|
6
|
+
return s.scrollable && e.push("overflow-x-scroll sm:overflow-x-auto whitespace-wrap sm:whitespace-normal"), s.stickyHeader && e.push("relative"), s.fixed && e.push("md:table-fixed"), e;
|
|
7
7
|
},
|
|
8
|
-
loadingWrapper: "absolute inset-0 flex items-center justify-center z-40 bg-
|
|
8
|
+
loadingWrapper: "absolute inset-0 flex items-center justify-center z-40 bg-secondary-300 dark:bg-secondary-600 rounded opacity-30"
|
|
9
9
|
}
|
|
10
|
-
},
|
|
10
|
+
}, t = a;
|
|
11
11
|
export {
|
|
12
|
-
|
|
12
|
+
t as default
|
|
13
13
|
};
|
|
@@ -2,7 +2,7 @@ const s = {
|
|
|
2
2
|
classes: {
|
|
3
3
|
th: ({ props: e }) => {
|
|
4
4
|
const t = ["relative py-2 font-semibold tracking-widest uppercase text-xs px-3"];
|
|
5
|
-
return e.sortable && t.push("cursor-pointer hover:text-
|
|
5
|
+
return e.sortable && t.push("cursor-pointer hover:text-secondary-800 dark:hover:text-secondary-300 transition-colors duration-150 ease-in-out"), e.stickyHeader && t.push("sticky top-0"), e.textAlign === "left" && t.push("text-left"), e.textAlign === "right" && t.push("text-right"), e.textAlign === "center" && t.push("text-center"), e.textAlign === "justify" && t.push("text-justify"), t;
|
|
6
6
|
},
|
|
7
7
|
sortIcon: ({ props: e }) => ["absolute stroke-2 w-3 h-3 top-2.5 right-0.5"]
|
|
8
8
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const s = {
|
|
2
2
|
classes: {
|
|
3
3
|
th: ({ props: e }) => {
|
|
4
|
-
const t = ["relative py-3.5 font-semibold text-sm px-3 bg-
|
|
5
|
-
return e.sortable && t.push("cursor-pointer hover:bg-
|
|
4
|
+
const t = ["relative py-3.5 font-semibold text-sm px-3 bg-secondary-200 dark:bg-secondary-700 select-none"];
|
|
5
|
+
return e.sortable && t.push("cursor-pointer hover:bg-secondary-300 dark:hover:bg-secondary-600 transition-colors duration-150 ease-in-out pr-5"), e.stickyHeader && t.push("sticky top-0"), e.textAlign === "left" && t.push("text-left"), e.textAlign === "right" && t.push("text-right"), e.textAlign === "center" && t.push("text-center"), e.textAlign === "justify" && t.push("text-justify"), t;
|
|
6
6
|
},
|
|
7
7
|
sortIcon: ({ props: e }) => ["absolute stroke-2 w-4 h-4 top-4 right-2"]
|
|
8
8
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const s = {
|
|
2
2
|
classes: {
|
|
3
|
-
row: ({ props:
|
|
4
|
-
const
|
|
5
|
-
return
|
|
3
|
+
row: ({ props: r }) => {
|
|
4
|
+
const e = [];
|
|
5
|
+
return r.striped ? e.push("odd:bg-secondary-50 dark:odd:bg-secondary-800") : e.push("border-b border-secondary-200 dark:border-secondary-700"), r.pointer && e.push("hover:bg-secondary-50 dark:hover:bg-secondary-700 cursor-pointer"), e;
|
|
6
6
|
}
|
|
7
7
|
}
|
|
8
8
|
}, o = s;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const s = {
|
|
2
2
|
classes: {
|
|
3
|
-
row: ({ props:
|
|
4
|
-
const
|
|
5
|
-
return
|
|
3
|
+
row: ({ props: r }) => {
|
|
4
|
+
const e = [];
|
|
5
|
+
return r.striped ? e.push("odd:bg-secondary-50 dark:odd:bg-secondary-800") : e.push("border-b border-secondary-200 dark:border-secondary-700"), r.pointer && e.push("hover:bg-secondary-50 dark:hover:bg-secondary-600 cursor-pointer"), e;
|
|
6
6
|
}
|
|
7
7
|
}
|
|
8
8
|
}, o = s;
|
|
@@ -27,12 +27,12 @@ const $ = {
|
|
|
27
27
|
props: h,
|
|
28
28
|
emits: ["remove"],
|
|
29
29
|
setup(n) {
|
|
30
|
-
const o = n, i = f(() => o.size === "xs" ? "xs" : o.size === "sm" ? "sm" : o.size === "lg" ? "md" : o.size === "xl" ? "lg" : "sm"), { styles: m, classes: d, className:
|
|
30
|
+
const o = n, i = f(() => o.size === "xs" ? "xs" : o.size === "sm" ? "sm" : o.size === "lg" ? "md" : o.size === "xl" ? "lg" : "sm"), { styles: m, classes: d, className: c } = B("Tag", {}, o);
|
|
31
31
|
return (e, t) => (s(), g(v(e.tag), {
|
|
32
32
|
class: k([
|
|
33
33
|
"text-[color:var(--x-tag-text)] dark:text-[color:var(--x-tag-dark-text)] border-[color:var(--x-tag-border)] dark:border-[color:var(--x-tag-dark-border)]",
|
|
34
34
|
[
|
|
35
|
-
r(
|
|
35
|
+
r(c),
|
|
36
36
|
r(d).wrapper,
|
|
37
37
|
e.outlined ? "border" : "bg-[color:var(--x-tag-bg)] dark:bg-[color:var(--x-tag-dark-bg)]",
|
|
38
38
|
e.rounded ? "rounded-full" : "rounded"
|
|
@@ -46,8 +46,8 @@ const $ = {
|
|
|
46
46
|
z(_, {
|
|
47
47
|
size: i.value,
|
|
48
48
|
icon: r(S),
|
|
49
|
-
class: "ml-1.5 cursor-pointer hover:text-
|
|
50
|
-
onClick: t[0] || (t[0] = (
|
|
49
|
+
class: "ml-1.5 cursor-pointer hover:text-secondary-700 transition-colors duration-150",
|
|
50
|
+
onClick: t[0] || (t[0] = (u) => e.$emit("remove", u))
|
|
51
51
|
}, null, 8, ["size", "icon"])
|
|
52
52
|
])) : a(e.$slots, "default", { key: 1 })
|
|
53
53
|
]),
|
|
@@ -17,6 +17,7 @@ declare const textareaProps: {
|
|
|
17
17
|
adjustToText: BooleanConstructor;
|
|
18
18
|
preventEnter: BooleanConstructor;
|
|
19
19
|
block: BooleanConstructor;
|
|
20
|
+
resizable: BooleanConstructor;
|
|
20
21
|
modelValue: import("vue").PropType<string | number | boolean | object | any[] | undefined>;
|
|
21
22
|
id: StringConstructor;
|
|
22
23
|
name: StringConstructor;
|
|
@@ -34,6 +35,7 @@ declare const textareaProps: {
|
|
|
34
35
|
readonly type: ArrayConstructor;
|
|
35
36
|
readonly default: () => never[];
|
|
36
37
|
};
|
|
38
|
+
tooltip: StringConstructor;
|
|
37
39
|
disabled: BooleanConstructor;
|
|
38
40
|
loading: BooleanConstructor;
|
|
39
41
|
loadingLabel: StringConstructor;
|
|
@@ -71,6 +73,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
71
73
|
adjustToText: BooleanConstructor;
|
|
72
74
|
preventEnter: BooleanConstructor;
|
|
73
75
|
block: BooleanConstructor;
|
|
76
|
+
resizable: BooleanConstructor;
|
|
74
77
|
modelValue: import("vue").PropType<string | number | boolean | object | any[] | undefined>;
|
|
75
78
|
id: StringConstructor;
|
|
76
79
|
name: StringConstructor;
|
|
@@ -88,6 +91,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
88
91
|
readonly type: ArrayConstructor;
|
|
89
92
|
readonly default: () => never[];
|
|
90
93
|
};
|
|
94
|
+
tooltip: StringConstructor;
|
|
91
95
|
disabled: BooleanConstructor;
|
|
92
96
|
loading: BooleanConstructor;
|
|
93
97
|
loadingLabel: StringConstructor;
|
|
@@ -123,6 +127,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
123
127
|
adjustToText: BooleanConstructor;
|
|
124
128
|
preventEnter: BooleanConstructor;
|
|
125
129
|
block: BooleanConstructor;
|
|
130
|
+
resizable: BooleanConstructor;
|
|
126
131
|
modelValue: import("vue").PropType<string | number | boolean | object | any[] | undefined>;
|
|
127
132
|
id: StringConstructor;
|
|
128
133
|
name: StringConstructor;
|
|
@@ -140,6 +145,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
140
145
|
readonly type: ArrayConstructor;
|
|
141
146
|
readonly default: () => never[];
|
|
142
147
|
};
|
|
148
|
+
tooltip: StringConstructor;
|
|
143
149
|
disabled: BooleanConstructor;
|
|
144
150
|
loading: BooleanConstructor;
|
|
145
151
|
loadingLabel: StringConstructor;
|
|
@@ -169,5 +175,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
169
175
|
rows: string | number;
|
|
170
176
|
adjustToText: boolean;
|
|
171
177
|
preventEnter: boolean;
|
|
178
|
+
resizable: boolean;
|
|
172
179
|
}, {}>;
|
|
173
180
|
export default _default;
|