@mkbabb/glass-ui 10.1.3 → 11.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/MIGRATION.md +1024 -1461
- package/README.md +2 -2
- package/dist/DialogContent-DG5kseRQ.js +159 -0
- package/dist/DropdownMenuTrigger-uhSXgEfK.js +76 -0
- package/dist/{Surface-1nPoabc3.js → Surface-C7wq2j0A.js} +3 -0
- package/dist/aurora.css +1 -0
- package/dist/aurora.js +246 -2472
- package/dist/auroraImageSource-xNLDUjcy.js +30 -0
- package/dist/axes.js +8 -8
- package/dist/blob.css +1 -0
- package/dist/blob.js +57 -54
- package/dist/budget-CJfhLIIV.js +13 -0
- package/dist/button-CAKhiOZy.js +113 -0
- package/dist/button.js +1 -1
- package/dist/{card-ByyqRBvK.js → card-D_uXphvL.js} +4 -1
- package/dist/card.js +1 -1
- package/dist/carousel.js +3 -2
- package/dist/{checkbox-B1qn65se.js → checkbox-COLnvULu.js} +1 -0
- package/dist/checkbox.css +1 -0
- package/dist/checkbox.js +1 -1
- package/dist/{collapsible-DFzK29Oh.js → collapsible-Bd4Et730.js} +1 -0
- package/dist/collapsible.css +1 -0
- package/dist/collapsible.js +1 -1
- package/dist/color-HkUaTAJj.js +270 -0
- package/dist/{color.glsl-DTJhdekG.js → color.glsl-bFJm8k5R.js} +4 -16
- package/dist/color.wgsl-B-qDJ_OM.js +4 -0
- package/dist/{command-CatrAsrl.js → command-BsFOGZwB.js} +3 -2
- package/dist/command.css +1 -0
- package/dist/command.js +1 -1
- package/dist/component-styles.css +0 -1
- package/dist/components/_shared/axes.d.ts +7 -0
- package/dist/components/_shared/feedback/dot-ring.css +1 -1
- package/dist/components/_shared/overlay/focus-return.d.ts +9 -0
- package/dist/components/_shared/overlay/index.d.ts +3 -0
- package/dist/components/_shared/overlay/root-scroll-lock.d.ts +4 -0
- package/dist/components/_shared/overlay/sheet-width.d.ts +2 -0
- package/dist/components/_shared/shape/useBarShape.d.ts +4 -0
- package/dist/components/aurora/composables/auroraFallbackGround.d.ts +12 -0
- package/dist/components/aurora/constants/presets.d.ts +21 -0
- package/dist/components/aurora/index.d.ts +2 -2
- package/dist/components/button/styles.css +1 -1
- package/dist/components/dark-mode-toggle/dark-mode-toggle.css +1 -1
- package/dist/components/data-table/composables/useDataTableResponsive.d.ts +2 -0
- package/dist/components/deck/styles/capture.css +1 -1
- package/dist/components/dialog/DialogContent.vue.d.ts +2 -2
- package/dist/components/dialog/ModalOverlay.vue.d.ts +2 -2
- package/dist/components/dialog/ModalScrim.vue.d.ts +26 -0
- package/dist/components/dialog/styles.css +1 -1
- package/dist/components/dock/GlassDock.vue.d.ts +4 -1
- package/dist/components/dock/composables/useDockClickIntegrity.d.ts +4 -0
- package/dist/components/dock/composables/useDockShellProps.d.ts +34 -2
- package/dist/components/dock/composables/useDockState.d.ts +5 -0
- package/dist/components/dock/index.d.ts +1 -2
- package/dist/components/dock/styles/controls/icon-button.css +1 -1
- package/dist/components/dock/styles/controls/tab-button.css +1 -1
- package/dist/components/dock/styles/morph.css +1 -1
- package/dist/components/dock/styles/run.css +1 -1
- package/dist/components/dock/trigger.d.ts +1 -0
- package/dist/components/expandable-container/ExpandableContainer.vue.d.ts +30 -29
- package/dist/components/menu/ContextMenu.vue.d.ts +27 -0
- package/dist/components/menu/DropdownMenu.vue.d.ts +5 -23
- package/dist/components/menu/context.d.ts +18 -5
- package/dist/components/menu/family-click.d.ts +2 -0
- package/dist/components/menu/family-context.d.ts +2 -0
- package/dist/components/menu/index.d.ts +1 -1
- package/dist/components/sheet/SheetContent.vue.d.ts +2 -2
- package/dist/components/sortable-list/styles.css +1 -0
- package/dist/components/surface/Surface.vue.d.ts +4 -1
- package/dist/components/tabs/composables/useTabDragMorph.d.ts +4 -7
- package/dist/components/tabs/styles/segmented.css +1 -1
- package/dist/components/tabs/types.d.ts +7 -8
- package/dist/composables/dom/useResizeObserver.d.ts +3 -1
- package/dist/composables/glass/fieldPaint.d.ts +4 -0
- package/dist/composables/glass/useGlassBackdropLuminance.d.ts +7 -6
- package/dist/composables/glass/webgpu/useGpuSubstrate.d.ts +8 -0
- package/dist/composables/motion/core/motionTempo.d.ts +2 -1
- package/dist/composables/motion/morph/useDragMorph.d.ts +2 -2
- package/dist/composables/motion/morph/useSelectionGroup.d.ts +6 -25
- package/dist/composables/motion/morph/useSelectionIndicator.d.ts +8 -54
- package/dist/composables/motion/spring/useLiquidFlex.d.ts +3 -5
- package/dist/composables/motion/spring/useSpringMount.d.ts +0 -9
- package/dist/{configurator-CPxIo3q2.js → configurator-C1ZKEf1b.js} +7 -5
- package/dist/configurator.css +1 -0
- package/dist/configurator.js +1 -1
- package/dist/constants-DfrO-IaH.js +8 -0
- package/dist/constellation.css +1 -0
- package/dist/constellation.js +2 -1
- package/dist/control.css +1 -0
- package/dist/{control.css_vue_type_style_index_0_src_true_lang-BIdufaDG.js → control.css_vue_type_style_index_0_src_true_lang-D2hdtjs4.js} +1 -0
- package/dist/{createCanvasLifecycle-hJHobVTn.js → createCanvasLifecycle-DS0vEs_G.js} +76 -75
- package/dist/dark-mode-toggle.js +1 -1
- package/dist/{data-table-Cs93-uY7.js → data-table-lDykVYuo.js} +113 -107
- package/dist/data-table.css +1 -0
- package/dist/data-table.js +1 -1
- package/dist/{deck-Cm_VmyNL.js → deck-Bc-2mEKE.js} +1 -0
- package/dist/deck.js +1 -1
- package/dist/dialog.js +1 -1
- package/dist/dock-trigger.d.ts +1 -0
- package/dist/dock-trigger.js +88 -0
- package/dist/dock.js +677 -689
- package/dist/dom.js +1 -1
- package/dist/easing.js +4 -4
- package/dist/expandable-container-wS1awXGd.js +135 -0
- package/dist/expandable-container.css +1 -0
- package/dist/expandable-container.js +1 -1
- package/dist/{fading-scroll-CTeW3KNS.js → fading-scroll-D3Y20ibL.js} +2 -2
- package/dist/fading-scroll.js +1 -1
- package/dist/fieldPaint-Ci77oajZ.js +7 -0
- package/dist/fourier-field.css +1 -0
- package/dist/fourier-field.js +15 -13
- package/dist/glSetup-DMaDgrEj.js +577 -0
- package/dist/glass-ui.js +67 -66
- package/dist/handmark.css +1 -0
- package/dist/handmark.js +82 -71
- package/dist/index.css +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/{input-eLZ_AU7l.js → input-BLF2pMHE.js} +1 -1
- package/dist/input.js +1 -1
- package/dist/{label-CE03H1KL.js → label-ryNPL7e6.js} +1 -0
- package/dist/label.css +1 -0
- package/dist/label.js +1 -1
- package/dist/labeled-field.css +1 -0
- package/dist/labeled-field.js +5 -4
- package/dist/{menu-DaYAZiVW.js → menu-C_l2Sslf.js} +162 -112
- package/dist/menu.js +3 -3
- package/dist/metric.js +1 -0
- package/dist/motion-core.js +138 -44
- package/dist/motion-lHDAQHEE.js +91 -0
- package/dist/motion.js +5 -5
- package/dist/motionTempo-DXdVbCWr.js +13 -0
- package/dist/music-staff.js +1 -0
- package/dist/{number-field-RP89046a.js → number-field-BXFUP49Z.js} +3 -2
- package/dist/number-field.css +1 -0
- package/dist/number-field.js +1 -1
- package/dist/pager-dots.css +1 -0
- package/dist/pager-dots.js +4 -3
- package/dist/participation-C5y5VZTN.js +52 -0
- package/dist/{popover-BdpoE4Ar.js → popover-DQUmwuAa.js} +3 -2
- package/dist/popover.js +1 -1
- package/dist/{progress-eVa-mc7J.js → progress-BUn0Bw7Z.js} +1 -0
- package/dist/progress.css +1 -0
- package/dist/progress.js +1 -1
- package/dist/{radio-group-B58Bz16F.js → radio-group-xdEy2tdi.js} +1 -0
- package/dist/radio-group.css +1 -0
- package/dist/radio-group.js +1 -1
- package/dist/root-scroll-lock-DJFrQhMa.js +22 -0
- package/dist/select-Dt5dXm87.js +309 -0
- package/dist/select.js +1 -1
- package/dist/{separator-D4EZM10u.js → separator-C4y9p_ky.js} +1 -0
- package/dist/separator.css +1 -0
- package/dist/separator.js +1 -1
- package/dist/sheet-DLqNUIZl.js +347 -0
- package/dist/sheet-width-DgXgJNa5.js +18 -0
- package/dist/sheet.js +2 -2
- package/dist/{slider-5uoY-cLG.js → slider-CZiKrWGg.js} +8 -8
- package/dist/slider.js +1 -1
- package/dist/sortable-list.js +2 -1
- package/dist/{status-dot-W4LFiJps.js → status-dot-BDZKcRxy.js} +2 -1
- package/dist/status-dot.css +1 -0
- package/dist/status-dot.js +1 -1
- package/dist/styles/components.css +1 -1
- package/dist/styles/glass/glass-capsule.css +1 -1
- package/dist/styles/glass/glass-chip.css +1 -1
- package/dist/styles/glass/mark.css +1 -1
- package/dist/styles/glass/overlay-plate.css +1 -1
- package/dist/styles/glass/surface-axis.css +1 -1
- package/dist/styles/index.css +1 -1
- package/dist/styles/theme/radius.css +1 -1
- package/dist/styles/tokens/color-radius.css +1 -1
- package/dist/styles/tokens/manifest.d.ts +1 -1
- package/dist/styles/tokens/scale-paper.css +1 -1
- package/dist/styles/utilities/base-misc.css +1 -1
- package/dist/surface.js +1 -1
- package/dist/{switch-BYUZ6g9G.js → switch-DLfGYU35.js} +1 -0
- package/dist/switch.css +1 -0
- package/dist/switch.js +1 -1
- package/dist/tabs-NgTRPGZx.js +229 -0
- package/dist/tabs.js +1 -1
- package/dist/textarea.js +1 -1
- package/dist/timeline.css +1 -0
- package/dist/timeline.js +4 -3
- package/dist/toggle-group-DgXcJGD6.js +129 -0
- package/dist/toggle-group.css +1 -0
- package/dist/toggle-group.js +1 -1
- package/dist/tokens.js +2 -0
- package/dist/{tooltip-CZVubnJf.js → tooltip-Do3qCw0r.js} +1 -1
- package/dist/tooltip.js +1 -1
- package/dist/typewriter.css +1 -0
- package/dist/typewriter.js +1 -0
- package/dist/uniformBridge-CJyy7NOn.js +150 -0
- package/dist/useBarShape-CmP35Z8o.js +24 -0
- package/dist/{useCanvas2D-CQRElMyE.js → useCanvas2D-Bhpwua98.js} +1 -1
- package/dist/{useDockCtaReceive-BSSgD6mu.js → useDockCtaReceive-Dn_-paqP.js} +1 -1
- package/dist/{useDragMorph-B363RUbF.js → useDragMorph-BEI74U0t.js} +51 -40
- package/dist/{color.wgsl-BTszLY39.js → useGpuSubstrate-Y5XAdU8d.js} +7 -7
- package/dist/{useLiquidPress-h1scrPtP.js → useLiquidPress-D5mjZC6U.js} +2 -2
- package/dist/{useResizeObserver-CdUlm2QZ.js → useResizeObserver-Bv3nN46q.js} +4 -7
- package/dist/useScrollChrome-DMP6kDI9.js +67 -0
- package/dist/useSelectionGroup-DAQv5Lb5.js +186 -0
- package/dist/{useSpring-9u2_shxV.js → useSpring-Aof0nTRt.js} +1 -1
- package/dist/useSpringMount-jgNkymRl.js +73 -0
- package/dist/wgpuSetup-CFuqd_RP.js +1278 -0
- package/package.json +8 -1
- package/dist/DialogContent-CwIBvou_.js +0 -157
- package/dist/DropdownMenuTrigger-CKRnhDSQ.js +0 -93
- package/dist/button-BOFTUPyU.js +0 -110
- package/dist/composables/motion/morph/eyeglass.d.ts +0 -141
- package/dist/expandable-container-CZUj9BzY.js +0 -142
- package/dist/glass-ui.css +0 -2
- package/dist/motion-BvV1_24p.js +0 -61
- package/dist/motionTempo-tscp92Nm.js +0 -7
- package/dist/participation-B7UFdgXB.js +0 -55
- package/dist/select-BiF0FCZf.js +0 -292
- package/dist/sheet-DmJxgAHc.js +0 -345
- package/dist/tabs-C5sC0fBE.js +0 -269
- package/dist/toggle-group-CC5b3o1R.js +0 -125
- package/dist/useScrollChrome-BJbWV32F.js +0 -162
- package/dist/useSelectionGroup-zsEwitF6.js +0 -291
- package/dist/useSpringMount-OA-0mTNv.js +0 -73
|
@@ -1,20 +1,21 @@
|
|
|
1
|
+
import "./data-table.css";
|
|
1
2
|
import { t as e } from "./class-names-FlXcvRRT.js";
|
|
2
3
|
import { t } from "./primitive-B2t2jdqM.js";
|
|
3
|
-
import { t as n } from "./useResizeObserver-
|
|
4
|
+
import { t as n } from "./useResizeObserver-Bv3nN46q.js";
|
|
4
5
|
import { t as r } from "./useIntersectionPause-CzKR3EyP.js";
|
|
5
6
|
import { t as i } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
6
7
|
import { t as a } from "./focus-Duf7EpUu.js";
|
|
7
8
|
import { Fragment as o, computed as s, createBlock as c, createCommentVNode as l, createElementBlock as u, createElementVNode as d, createTextVNode as f, createVNode as p, defineComponent as m, effectScope as h, isRef as g, mergeProps as _, nextTick as ee, normalizeClass as v, onBeforeUpdate as te, onUpdated as ne, openBlock as y, ref as b, renderList as x, renderSlot as S, resolveDynamicComponent as C, toDisplayString as w, toValue as T, unref as E, useAttrs as D, useSlots as re, useTemplateRef as O, watch as k, withCtx as A, withModifiers as j } from "vue";
|
|
8
9
|
//#region src/components/table/Table.vue?vue&type=script&setup=true&lang.ts
|
|
9
|
-
var
|
|
10
|
+
var ie = {
|
|
10
11
|
"data-slot": "table-container",
|
|
11
12
|
class: "relative w-full overflow-auto"
|
|
12
|
-
},
|
|
13
|
+
}, M = [
|
|
13
14
|
"role",
|
|
14
15
|
"aria-label",
|
|
15
16
|
"aria-colcount",
|
|
16
17
|
"aria-rowcount"
|
|
17
|
-
],
|
|
18
|
+
], N = /* @__PURE__ */ m({
|
|
18
19
|
inheritAttrs: !1,
|
|
19
20
|
__name: "Table",
|
|
20
21
|
props: {
|
|
@@ -32,16 +33,16 @@ var M = {
|
|
|
32
33
|
},
|
|
33
34
|
setup(t) {
|
|
34
35
|
let n = t, r = D();
|
|
35
|
-
return (t, i) => (y(), u("div",
|
|
36
|
+
return (t, i) => (y(), u("div", ie, [d("table", _(E(r), {
|
|
36
37
|
"data-slot": "table",
|
|
37
38
|
class: E(e)("w-full caption-bottom text-small", n.class),
|
|
38
39
|
role: n.role,
|
|
39
40
|
"aria-label": n.ariaLabel,
|
|
40
41
|
"aria-colcount": n.ariaColCount,
|
|
41
42
|
"aria-rowcount": n.ariaRowCount
|
|
42
|
-
}), [S(t.$slots, "default")], 16,
|
|
43
|
+
}), [S(t.$slots, "default")], 16, M)]));
|
|
43
44
|
}
|
|
44
|
-
}),
|
|
45
|
+
}), P = /* @__PURE__ */ m({
|
|
45
46
|
__name: "TableBody",
|
|
46
47
|
props: { class: { type: [
|
|
47
48
|
Boolean,
|
|
@@ -54,7 +55,7 @@ var M = {
|
|
|
54
55
|
let n = t;
|
|
55
56
|
return (t, r) => (y(), u("tbody", { class: v(E(e)("[&_tr:last-child]:border-0", n.class)) }, [S(t.$slots, "default")], 2));
|
|
56
57
|
}
|
|
57
|
-
}),
|
|
58
|
+
}), F = /* @__PURE__ */ m({
|
|
58
59
|
__name: "TableCell",
|
|
59
60
|
props: { class: { type: [
|
|
60
61
|
Boolean,
|
|
@@ -67,7 +68,7 @@ var M = {
|
|
|
67
68
|
let n = t;
|
|
68
69
|
return (t, r) => (y(), u("td", { class: v(E(e)("table-cell align-middle [&:has([role=checkbox])]:pr-0", n.class)) }, [S(t.$slots, "default")], 2));
|
|
69
70
|
}
|
|
70
|
-
}),
|
|
71
|
+
}), I = /* @__PURE__ */ m({
|
|
71
72
|
__name: "TableHead",
|
|
72
73
|
props: { class: { type: [
|
|
73
74
|
Boolean,
|
|
@@ -80,7 +81,7 @@ var M = {
|
|
|
80
81
|
let n = t;
|
|
81
82
|
return (t, r) => (y(), u("th", { class: v(E(e)("table-head text-left data-[align=center]:text-center data-[align=right]:text-right align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0", n.class)) }, [S(t.$slots, "default")], 2));
|
|
82
83
|
}
|
|
83
|
-
}),
|
|
84
|
+
}), L = /* @__PURE__ */ m({
|
|
84
85
|
__name: "TableHeader",
|
|
85
86
|
props: { class: { type: [
|
|
86
87
|
Boolean,
|
|
@@ -93,7 +94,7 @@ var M = {
|
|
|
93
94
|
let n = t;
|
|
94
95
|
return (t, r) => (y(), u("thead", { class: v(E(e)("[&_tr]:border-b", n.class)) }, [S(t.$slots, "default")], 2));
|
|
95
96
|
}
|
|
96
|
-
}),
|
|
97
|
+
}), R = /* @__PURE__ */ m({
|
|
97
98
|
__name: "TableRow",
|
|
98
99
|
props: { class: { type: [
|
|
99
100
|
Boolean,
|
|
@@ -106,7 +107,7 @@ var M = {
|
|
|
106
107
|
let n = t;
|
|
107
108
|
return (t, r) => (y(), u("tr", { class: v(E(e)("border-b", n.class)) }, [S(t.$slots, "default")], 2));
|
|
108
109
|
}
|
|
109
|
-
}),
|
|
110
|
+
}), z = { class: "flex items-center justify-center py-10" }, B = /* @__PURE__ */ m({
|
|
110
111
|
__name: "TableEmpty",
|
|
111
112
|
props: {
|
|
112
113
|
class: { type: [
|
|
@@ -123,15 +124,15 @@ var M = {
|
|
|
123
124
|
let { class: e, ...t } = n;
|
|
124
125
|
return t;
|
|
125
126
|
});
|
|
126
|
-
return (t, i) => (y(), c(
|
|
127
|
-
default: A(() => [p(
|
|
128
|
-
default: A(() => [d("div",
|
|
127
|
+
return (t, i) => (y(), c(R, null, {
|
|
128
|
+
default: A(() => [p(F, _({ class: E(e)("p-4 whitespace-nowrap align-middle text-small text-foreground", n.class) }, r.value), {
|
|
129
|
+
default: A(() => [d("div", z, [S(t.$slots, "default")])]),
|
|
129
130
|
_: 3
|
|
130
131
|
}, 16, ["class"])]),
|
|
131
132
|
_: 3
|
|
132
133
|
}));
|
|
133
134
|
}
|
|
134
|
-
}),
|
|
135
|
+
}), V = ["data-shimmer", "data-offscreen"], H = /*#__PURE__*/ i(/* @__PURE__ */ m({
|
|
135
136
|
inheritAttrs: !1,
|
|
136
137
|
__name: "Skeleton",
|
|
137
138
|
props: {
|
|
@@ -164,32 +165,32 @@ var M = {
|
|
|
164
165
|
"data-shimmer": n.shimmer || void 0,
|
|
165
166
|
"data-offscreen": n.shimmer && l.value || void 0,
|
|
166
167
|
class: E(e)("skeleton", i.class)
|
|
167
|
-
}), null, 16,
|
|
168
|
+
}), null, 16, V));
|
|
168
169
|
}
|
|
169
170
|
}), [["__scopeId", "data-v-5e54f919"]]);
|
|
170
171
|
//#endregion
|
|
171
172
|
//#region src/components/data-table/composables/useDataTableRowIdentity.ts
|
|
172
|
-
function
|
|
173
|
+
function U(e, t) {
|
|
173
174
|
return t.split(".").reduce((e, t) => {
|
|
174
175
|
if (!(typeof e != "object" || !e)) return e[t];
|
|
175
176
|
}, e);
|
|
176
177
|
}
|
|
177
|
-
function
|
|
178
|
+
function W(e) {
|
|
178
179
|
return g(e) ? e.value : e;
|
|
179
180
|
}
|
|
180
|
-
function
|
|
181
|
+
function G(e) {
|
|
181
182
|
return [
|
|
182
183
|
"string",
|
|
183
184
|
"number",
|
|
184
185
|
"symbol"
|
|
185
186
|
].includes(typeof e);
|
|
186
187
|
}
|
|
187
|
-
function
|
|
188
|
+
function ae(e) {
|
|
188
189
|
return { rowEntries: s(() => {
|
|
189
|
-
let t = /* @__PURE__ */ new Set(), n =
|
|
190
|
+
let t = /* @__PURE__ */ new Set(), n = W(e.getRowId);
|
|
190
191
|
return T(e.rows).map((r, i) => {
|
|
191
|
-
let a = n ? n(r) :
|
|
192
|
-
if (!
|
|
192
|
+
let a = n ? n(r) : U(r, T(e.rowKey));
|
|
193
|
+
if (!G(a)) throw TypeError(`[DataTable] Row ${i} has no stable identity.`);
|
|
193
194
|
if (t.has(a)) throw TypeError(`[DataTable] Duplicate row identity ${String(a)}.`);
|
|
194
195
|
return t.add(a), {
|
|
195
196
|
row: r,
|
|
@@ -200,33 +201,31 @@ function ie(e) {
|
|
|
200
201
|
}
|
|
201
202
|
//#endregion
|
|
202
203
|
//#region src/components/data-table/composables/useDataTableResponsive.ts
|
|
203
|
-
function
|
|
204
|
-
let { columns: t, responsive: n, cardBreakpoint: r, containerWidth: i } = e;
|
|
204
|
+
function oe(e) {
|
|
205
|
+
let { columns: t, responsive: n, cardBreakpoint: r, containerWidth: i } = e, a = (e) => T(n) && e > 0 && e < T(r);
|
|
205
206
|
return {
|
|
206
|
-
isCard: s(() =>
|
|
207
|
-
|
|
208
|
-
return T(n) && e > 0 && e < T(r);
|
|
209
|
-
}),
|
|
207
|
+
isCard: s(() => a(T(i))),
|
|
208
|
+
cardAt: a,
|
|
210
209
|
headerColumn: s(() => T(t)[0]),
|
|
211
210
|
bodyColumns: s(() => T(t).slice(1))
|
|
212
211
|
};
|
|
213
212
|
}
|
|
214
213
|
//#endregion
|
|
215
214
|
//#region src/components/data-table/DataTable.vue?vue&type=script&setup=true&lang.ts
|
|
216
|
-
var
|
|
215
|
+
var se = ["data-state", "aria-busy"], ce = {
|
|
217
216
|
key: 0,
|
|
218
217
|
class: "data-table-state glass-quiet",
|
|
219
218
|
role: "alert"
|
|
220
|
-
},
|
|
219
|
+
}, le = {
|
|
221
220
|
key: 1,
|
|
222
221
|
class: "data-table-cards"
|
|
223
|
-
},
|
|
222
|
+
}, ue = ["role", "aria-label"], de = { class: "data-table-card-header" }, fe = { class: "data-table-card-title" }, pe = {
|
|
224
223
|
key: 0,
|
|
225
224
|
class: "data-table-card-fields"
|
|
226
|
-
},
|
|
225
|
+
}, me = { class: "data-table-card-label" }, he = ["data-align"], ge = {
|
|
227
226
|
key: 3,
|
|
228
227
|
class: "data-table-state glass-quiet"
|
|
229
|
-
},
|
|
228
|
+
}, _e = ["data-align", "onClick"], ve = { "aria-hidden": "true" }, ye = { role: "alert" }, K = /* @__PURE__ */ m({
|
|
230
229
|
__name: "DataTable",
|
|
231
230
|
props: {
|
|
232
231
|
columns: {},
|
|
@@ -272,41 +271,48 @@ var oe = ["data-state", "aria-busy"], se = {
|
|
|
272
271
|
"select"
|
|
273
272
|
],
|
|
274
273
|
setup(t, { emit: r }) {
|
|
275
|
-
let i = t, m = r, h = re(), g = s(() => !!h["row-actions"]), T = s(() => i.role ?? (i.selectable || i.tabbableRowId !== void 0 ? "grid" : void 0)), D = s(() => i.ariaColCount ?? i.columns.length + +!!g.value), O = s(() => i.ariaRowCount ?? (T.value ? i.rows.length + 1 : void 0)),
|
|
274
|
+
let i = t, m = r, h = re(), g = s(() => !!h["row-actions"]), T = s(() => i.role ?? (i.selectable || i.tabbableRowId !== void 0 ? "grid" : void 0)), D = s(() => i.ariaColCount ?? i.columns.length + +!!g.value), O = s(() => i.ariaRowCount ?? (T.value ? i.rows.length + 1 : void 0)), ie = s(() => i.status === "error" ? "error" : i.status === "loading" && i.rows.length === 0 ? "loading" : i.rows.length === 0 ? i.filtered ? "filtered-empty" : "empty" : i.status), M = b(null), z = b(0), V = NaN;
|
|
276
275
|
n(M, (e) => {
|
|
277
|
-
|
|
276
|
+
Math.abs(e.width - V) < 1 || (V = NaN, z.value = e.width);
|
|
278
277
|
});
|
|
279
|
-
let { isCard:
|
|
278
|
+
let { isCard: U, cardAt: W, headerColumn: G, bodyColumns: K } = oe({
|
|
280
279
|
columns: () => i.columns,
|
|
281
280
|
responsive: () => i.responsive,
|
|
282
281
|
cardBreakpoint: () => i.cardBreakpoint,
|
|
283
|
-
containerWidth:
|
|
284
|
-
})
|
|
282
|
+
containerWidth: z
|
|
283
|
+
});
|
|
284
|
+
k(U, (e) => {
|
|
285
|
+
let t = M.value;
|
|
286
|
+
if (!t) return;
|
|
287
|
+
let n = getComputedStyle(t), r = t.clientWidth - parseFloat(n.paddingLeft) - parseFloat(n.paddingRight);
|
|
288
|
+
V = W(r) === e ? NaN : r;
|
|
289
|
+
}, { flush: "post" });
|
|
290
|
+
let { rowEntries: q } = ae({
|
|
285
291
|
rows: () => i.rows,
|
|
286
292
|
rowKey: () => i.rowKey,
|
|
287
293
|
getRowId: s(() => i.getRowId)
|
|
288
|
-
}),
|
|
289
|
-
function
|
|
294
|
+
}), J = /* @__PURE__ */ new Map();
|
|
295
|
+
function Y(e, t, n) {
|
|
290
296
|
let r = n, a = n instanceof HTMLElement ? n : r?.$el, o = a instanceof HTMLElement ? a : null;
|
|
291
|
-
o ?
|
|
297
|
+
o ? J.set(e.key, o) : J.delete(e.key), i.rowRef?.(o, e.row, t);
|
|
292
298
|
}
|
|
293
|
-
let
|
|
299
|
+
let X = null;
|
|
294
300
|
te(() => {
|
|
295
|
-
|
|
301
|
+
X = Array.from(J).find(([, e]) => e === document.activeElement)?.[0] ?? null;
|
|
296
302
|
}), ne(() => {
|
|
297
|
-
|
|
303
|
+
X !== null && J.get(X)?.focus(), X = null;
|
|
298
304
|
});
|
|
299
|
-
let
|
|
300
|
-
function
|
|
305
|
+
let Z = Array.from({ length: 5 }, (e, t) => t);
|
|
306
|
+
function Q(e, t) {
|
|
301
307
|
return t.split(".").reduce((e, t) => {
|
|
302
308
|
if (!(typeof e != "object" || !e)) return e[t];
|
|
303
309
|
}, e);
|
|
304
310
|
}
|
|
305
|
-
function
|
|
306
|
-
let n =
|
|
311
|
+
function $(e, t) {
|
|
312
|
+
let n = Q(e, t.key);
|
|
307
313
|
return t.formatter ? t.formatter(n, e) : n == null ? "—" : String(n);
|
|
308
314
|
}
|
|
309
|
-
function
|
|
315
|
+
function be(e) {
|
|
310
316
|
if (!e.sortable) return;
|
|
311
317
|
let t = i.sort;
|
|
312
318
|
t?.key === e.key ? m("update:sort", {
|
|
@@ -317,169 +323,169 @@ var oe = ["data-state", "aria-busy"], se = {
|
|
|
317
323
|
direction: "asc"
|
|
318
324
|
});
|
|
319
325
|
}
|
|
320
|
-
function
|
|
326
|
+
function xe(e) {
|
|
321
327
|
if (e.sortable) return i.sort?.key === e.key ? i.sort.direction === "asc" ? "ascending" : "descending" : "none";
|
|
322
328
|
}
|
|
323
|
-
function
|
|
329
|
+
function Se(e) {
|
|
324
330
|
return e.sortable ? i.sort?.key === e.key ? i.sort.direction === "asc" ? " ↑" : " ↓" : " ↕" : "";
|
|
325
331
|
}
|
|
326
|
-
function
|
|
332
|
+
function Ce(e) {
|
|
327
333
|
return Object.is(i.selectedRowId, e.key);
|
|
328
334
|
}
|
|
329
|
-
function
|
|
330
|
-
m("update:selectedRowId", e.key), m("update:tabbableRowId", e.key), m("select", e.row),
|
|
335
|
+
function we(e) {
|
|
336
|
+
m("update:selectedRowId", e.key), m("update:tabbableRowId", e.key), m("select", e.row), J.get(e.key)?.focus({ preventScroll: !0 });
|
|
331
337
|
}
|
|
332
|
-
function
|
|
338
|
+
function Te(e, t) {
|
|
333
339
|
if (!(e.target instanceof Element)) return;
|
|
334
340
|
let n = e.target.closest(a);
|
|
335
|
-
(!n || n === e.currentTarget) &&
|
|
341
|
+
(!n || n === e.currentTarget) && we(t);
|
|
336
342
|
}
|
|
337
|
-
function
|
|
343
|
+
function Ee(e, t) {
|
|
338
344
|
if (e.target !== e.currentTarget) return;
|
|
339
345
|
if (["Enter", " "].includes(e.key)) {
|
|
340
346
|
if (!i.selectable) return;
|
|
341
|
-
e.preventDefault(),
|
|
347
|
+
e.preventDefault(), we(t);
|
|
342
348
|
return;
|
|
343
349
|
}
|
|
344
|
-
let n = e.key === "Home" ? 0 : e.key === "End" ?
|
|
350
|
+
let n = e.key === "Home" ? 0 : e.key === "End" ? q.value.length - 1 : -1, r = e.key === "ArrowUp" ? -1 : +(e.key === "ArrowDown");
|
|
345
351
|
if (n < 0 && r === 0) return;
|
|
346
|
-
let a =
|
|
347
|
-
s && (e.preventDefault(), m("update:tabbableRowId", s.key), ee(() =>
|
|
352
|
+
let a = q.value.findIndex(({ key: e }) => Object.is(e, t.key)), o = Math.max(0, Math.min(q.value.length - 1, n >= 0 ? n : a + r)), s = q.value[o];
|
|
353
|
+
s && (e.preventDefault(), m("update:tabbableRowId", s.key), ee(() => J.get(s.key)?.focus({ preventScroll: !0 })));
|
|
348
354
|
}
|
|
349
|
-
let
|
|
350
|
-
function
|
|
355
|
+
let De = s(() => i.tabbableRowId === void 0 ? i.selectable ? q.value.find(({ key: e }) => Object.is(e, i.selectedRowId))?.key ?? q.value[0]?.key ?? null : null : q.value.some(({ key: e }) => Object.is(e, i.tabbableRowId)) ? i.tabbableRowId : null);
|
|
356
|
+
function Oe(e, t = !1) {
|
|
351
357
|
if (!i.selectable) return {};
|
|
352
|
-
let n =
|
|
358
|
+
let n = Ce(e);
|
|
353
359
|
return {
|
|
354
360
|
class: "data-table-row-interactive",
|
|
355
361
|
role: t ? "option" : void 0,
|
|
356
362
|
"aria-selected": n,
|
|
357
363
|
"data-state": n ? "selected" : void 0,
|
|
358
|
-
onClick: (t) =>
|
|
364
|
+
onClick: (t) => Te(t, e)
|
|
359
365
|
};
|
|
360
366
|
}
|
|
361
|
-
function
|
|
367
|
+
function ke(e, t, n = !1) {
|
|
362
368
|
let r = { ...i.getRowAttrs?.(e.row, t) };
|
|
363
369
|
n ? delete r["aria-rowindex"] : i.getRowIndex && (r["aria-rowindex"] = i.getRowIndex(e.row, t));
|
|
364
370
|
let a = i.selectable || i.tabbableRowId !== void 0 ? {
|
|
365
371
|
class: "focus-ring",
|
|
366
|
-
tabindex: Object.is(
|
|
372
|
+
tabindex: Object.is(De.value, e.key) ? 0 : -1,
|
|
367
373
|
onFocus: () => m("update:tabbableRowId", e.key),
|
|
368
|
-
onKeydown: (t) =>
|
|
374
|
+
onKeydown: (t) => Ee(t, e)
|
|
369
375
|
} : {};
|
|
370
|
-
return _(r,
|
|
376
|
+
return _(r, Oe(e, n), a);
|
|
371
377
|
}
|
|
372
378
|
return (n, r) => (y(), u("div", {
|
|
373
379
|
"data-slot": "data-table",
|
|
374
380
|
ref_key: "rootRef",
|
|
375
381
|
ref: M,
|
|
376
382
|
class: v(E(e)("data-table", i.class)),
|
|
377
|
-
"data-state":
|
|
383
|
+
"data-state": ie.value,
|
|
378
384
|
"aria-busy": t.status === "loading" || void 0
|
|
379
|
-
}, [E(
|
|
385
|
+
}, [E(U) ? (y(), u(o, { key: 0 }, [t.status === "error" ? (y(), u("div", ce, [S(n.$slots, "error", {}, () => [r[2] ||= f("Unable to load data", -1)])])) : t.status === "loading" && t.rows.length === 0 ? (y(), u("div", le, [(y(!0), u(o, null, x(E(Z), (e) => (y(), u("div", {
|
|
380
386
|
key: "skel-card-" + e,
|
|
381
387
|
class: "data-table-card glass-quiet"
|
|
382
|
-
}, [p(E(
|
|
388
|
+
}, [p(E(H), { class: "data-table-card-skeleton-title" }), p(E(H), { class: "h-3 w-3/4" })]))), 128))])) : t.rows.length > 0 ? (y(), u("div", {
|
|
383
389
|
key: 2,
|
|
384
390
|
class: "data-table-cards",
|
|
385
391
|
role: t.selectable ? "listbox" : void 0,
|
|
386
392
|
"aria-label": t.selectable ? t.ariaLabel ?? "Rows" : void 0
|
|
387
|
-
}, [(y(!0), u(o, null, x(E(
|
|
393
|
+
}, [(y(!0), u(o, null, x(E(q), (t, i) => (y(), u("div", _({
|
|
388
394
|
key: t.key,
|
|
389
395
|
ref_for: !0,
|
|
390
|
-
ref: (e) =>
|
|
391
|
-
}, { ref_for: !0 },
|
|
396
|
+
ref: (e) => Y(t, i, e)
|
|
397
|
+
}, { ref_for: !0 }, ke(t, i, !0), { class: "data-table-card glass-quiet" }), [d("div", de, [d("div", fe, [E(G)?.component ? (y(), c(C(E(G).component), {
|
|
392
398
|
key: 0,
|
|
393
|
-
value:
|
|
399
|
+
value: Q(t.row, E(G).key),
|
|
394
400
|
row: t.row
|
|
395
|
-
}, null, 8, ["value", "row"])) : E(
|
|
401
|
+
}, null, 8, ["value", "row"])) : E(G) ? (y(), u(o, { key: 1 }, [f(w($(t.row, E(G))), 1)], 64)) : l("", !0)]), g.value ? (y(), u("div", {
|
|
396
402
|
key: 0,
|
|
397
403
|
class: "data-table-actions",
|
|
398
404
|
onClick: r[0] ||= j(() => {}, ["stop"])
|
|
399
|
-
}, [S(n.$slots, "row-actions", { row: t.row })])) : l("", !0)]), E(
|
|
405
|
+
}, [S(n.$slots, "row-actions", { row: t.row })])) : l("", !0)]), E(K).length > 0 ? (y(), u("dl", pe, [(y(!0), u(o, null, x(E(K), (n) => (y(), u(o, { key: n.key }, [d("dt", me, w(n.label), 1), d("dd", {
|
|
400
406
|
class: v(E(e)("data-table-card-value", n.class)),
|
|
401
407
|
"data-align": n.align ?? "left"
|
|
402
408
|
}, [n.component ? (y(), c(C(n.component), {
|
|
403
409
|
key: 0,
|
|
404
|
-
value:
|
|
410
|
+
value: Q(t.row, n.key),
|
|
405
411
|
row: t.row
|
|
406
|
-
}, null, 8, ["value", "row"])) : (y(), u(o, { key: 1 }, [f(w(
|
|
412
|
+
}, null, 8, ["value", "row"])) : (y(), u(o, { key: 1 }, [f(w($(t.row, n)), 1)], 64))], 10, he)], 64))), 128))])) : l("", !0)], 16))), 128))], 8, ue)) : (y(), u("div", ge, [t.filtered ? S(n.$slots, "filtered-empty", {}, () => [r[3] ||= f("No matching rows", -1)], void 0, 0) : S(n.$slots, "empty", {}, () => [r[4] ||= f("No rows yet", -1)], void 0, 1)]))], 64)) : (y(), c(E(N), {
|
|
407
413
|
key: 1,
|
|
408
414
|
role: T.value,
|
|
409
415
|
"aria-label": t.ariaLabel,
|
|
410
416
|
"aria-col-count": D.value,
|
|
411
417
|
"aria-row-count": O.value
|
|
412
418
|
}, {
|
|
413
|
-
default: A(() => [p(E(
|
|
414
|
-
default: A(() => [p(E(
|
|
419
|
+
default: A(() => [p(E(L), null, {
|
|
420
|
+
default: A(() => [p(E(R), {
|
|
415
421
|
class: "data-table-header-row",
|
|
416
422
|
"aria-rowindex": T.value === "grid" ? 1 : void 0
|
|
417
423
|
}, {
|
|
418
|
-
default: A(() => [(y(!0), u(o, null, x(t.columns, (e) => (y(), c(E(
|
|
424
|
+
default: A(() => [(y(!0), u(o, null, x(t.columns, (e) => (y(), c(E(I), {
|
|
419
425
|
key: e.key,
|
|
420
426
|
class: v(e.headerClass),
|
|
421
427
|
"data-align": e.align ?? "left",
|
|
422
|
-
"aria-sort":
|
|
428
|
+
"aria-sort": xe(e)
|
|
423
429
|
}, {
|
|
424
430
|
default: A(() => [e.sortable ? (y(), u("button", {
|
|
425
431
|
key: 0,
|
|
426
432
|
type: "button",
|
|
427
433
|
class: "data-table-sort focus-ring",
|
|
428
434
|
"data-align": e.align ?? "left",
|
|
429
|
-
onClick: (t) =>
|
|
430
|
-
}, [d("span", null, w(e.label), 1), d("span",
|
|
435
|
+
onClick: (t) => be(e)
|
|
436
|
+
}, [d("span", null, w(e.label), 1), d("span", ve, w(Se(e)), 1)], 8, _e)) : (y(), u(o, { key: 1 }, [f(w(e.label), 1)], 64))]),
|
|
431
437
|
_: 2
|
|
432
438
|
}, 1032, [
|
|
433
439
|
"class",
|
|
434
440
|
"data-align",
|
|
435
441
|
"aria-sort"
|
|
436
|
-
]))), 128)), g.value ? (y(), c(E(
|
|
442
|
+
]))), 128)), g.value ? (y(), c(E(I), {
|
|
437
443
|
key: 0,
|
|
438
444
|
class: "data-table-actions-cell"
|
|
439
445
|
})) : l("", !0)]),
|
|
440
446
|
_: 1
|
|
441
447
|
}, 8, ["aria-rowindex"])]),
|
|
442
448
|
_: 1
|
|
443
|
-
}), p(E(
|
|
444
|
-
default: A(() => [t.status === "error" ? (y(), c(E(
|
|
449
|
+
}), p(E(P), null, {
|
|
450
|
+
default: A(() => [t.status === "error" ? (y(), c(E(B), {
|
|
445
451
|
key: 0,
|
|
446
452
|
colspan: t.columns.length + +!!g.value,
|
|
447
453
|
role: T.value === "grid" ? "presentation" : void 0
|
|
448
454
|
}, {
|
|
449
|
-
default: A(() => [d("span",
|
|
455
|
+
default: A(() => [d("span", ye, [S(n.$slots, "error", {}, () => [r[5] ||= f("Unable to load data", -1)])])]),
|
|
450
456
|
_: 3
|
|
451
|
-
}, 8, ["colspan", "role"])) : t.status === "loading" && t.rows.length === 0 ? (y(!0), u(o, { key: 1 }, x(E(
|
|
452
|
-
default: A(() => [(y(!0), u(o, null, x(t.columns, (e) => (y(), c(E(
|
|
457
|
+
}, 8, ["colspan", "role"])) : t.status === "loading" && t.rows.length === 0 ? (y(!0), u(o, { key: 1 }, x(E(Z), (e) => (y(), c(E(R), { key: "skel-" + e }, {
|
|
458
|
+
default: A(() => [(y(!0), u(o, null, x(t.columns, (e) => (y(), c(E(F), {
|
|
453
459
|
key: e.key,
|
|
454
460
|
"data-align": e.align ?? "left"
|
|
455
461
|
}, {
|
|
456
|
-
default: A(() => [p(E(
|
|
462
|
+
default: A(() => [p(E(H), { class: "data-table-cell-skeleton" })]),
|
|
457
463
|
_: 1
|
|
458
|
-
}, 8, ["data-align"]))), 128)), g.value ? (y(), c(E(
|
|
464
|
+
}, 8, ["data-align"]))), 128)), g.value ? (y(), c(E(F), {
|
|
459
465
|
key: 0,
|
|
460
466
|
class: "data-table-actions-cell"
|
|
461
467
|
}, {
|
|
462
|
-
default: A(() => [p(E(
|
|
468
|
+
default: A(() => [p(E(H), { class: "data-table-action-skeleton" })]),
|
|
463
469
|
_: 1
|
|
464
470
|
})) : l("", !0)]),
|
|
465
471
|
_: 1
|
|
466
|
-
}))), 128)) : t.rows.length > 0 ? (y(!0), u(o, { key: 2 }, x(E(
|
|
472
|
+
}))), 128)) : t.rows.length > 0 ? (y(!0), u(o, { key: 2 }, x(E(q), (e, i) => (y(), c(E(R), _({
|
|
467
473
|
key: e.key,
|
|
468
474
|
ref_for: !0,
|
|
469
|
-
ref: (t) =>
|
|
470
|
-
}, { ref_for: !0 },
|
|
471
|
-
default: A(() => [(y(!0), u(o, null, x(t.columns, (t) => (y(), c(E(
|
|
475
|
+
ref: (t) => Y(e, i, t)
|
|
476
|
+
}, { ref_for: !0 }, ke(e, i)), {
|
|
477
|
+
default: A(() => [(y(!0), u(o, null, x(t.columns, (t) => (y(), c(E(F), {
|
|
472
478
|
key: t.key,
|
|
473
479
|
class: v(t.class),
|
|
474
480
|
"data-align": t.align ?? "left"
|
|
475
481
|
}, {
|
|
476
482
|
default: A(() => [t.component ? (y(), c(C(t.component), {
|
|
477
483
|
key: 0,
|
|
478
|
-
value:
|
|
484
|
+
value: Q(e.row, t.key),
|
|
479
485
|
row: e.row
|
|
480
|
-
}, null, 8, ["value", "row"])) : (y(), u(o, { key: 1 }, [f(w(
|
|
486
|
+
}, null, 8, ["value", "row"])) : (y(), u(o, { key: 1 }, [f(w($(e.row, t)), 1)], 64))]),
|
|
481
487
|
_: 2
|
|
482
|
-
}, 1032, ["class", "data-align"]))), 128)), g.value ? (y(), c(E(
|
|
488
|
+
}, 1032, ["class", "data-align"]))), 128)), g.value ? (y(), c(E(F), {
|
|
483
489
|
key: 0,
|
|
484
490
|
class: "data-table-actions-cell",
|
|
485
491
|
onClick: r[1] ||= j(() => {}, ["stop"])
|
|
@@ -488,7 +494,7 @@ var oe = ["data-state", "aria-busy"], se = {
|
|
|
488
494
|
_: 2
|
|
489
495
|
}, 1024)) : l("", !0)]),
|
|
490
496
|
_: 2
|
|
491
|
-
}, 1040))), 128)) : (y(), c(E(
|
|
497
|
+
}, 1040))), 128)) : (y(), c(E(B), {
|
|
492
498
|
key: 3,
|
|
493
499
|
colspan: t.columns.length + +!!g.value,
|
|
494
500
|
role: T.value === "grid" ? "presentation" : void 0
|
|
@@ -504,8 +510,8 @@ var oe = ["data-state", "aria-busy"], se = {
|
|
|
504
510
|
"aria-label",
|
|
505
511
|
"aria-col-count",
|
|
506
512
|
"aria-row-count"
|
|
507
|
-
])), S(n.$slots, "sentinel")], 10,
|
|
513
|
+
])), S(n.$slots, "sentinel")], 10, se));
|
|
508
514
|
}
|
|
509
515
|
});
|
|
510
516
|
//#endregion
|
|
511
|
-
export {
|
|
517
|
+
export { L as a, P as c, R as i, N as l, H as n, I as o, B as r, F as s, K as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer theme, base, components, utilities;@layer components{.skeleton[data-v-5e54f919]{isolation:isolate;background:color-mix(in oklab, var(--foreground) calc(var(--ink-seam) * 100%), transparent);border-radius:var(--radius-media);position:relative;overflow:hidden}@media (prefers-reduced-motion:no-preference){.skeleton[data-v-5e54f919]:not([data-shimmer]){animation:skeleton-breathe-5e54f919 1.1s var(--ease-standard) infinite alternate}}.skeleton[data-shimmer][data-v-5e54f919]:after{--skeleton-shimmer-period:28rem;content:"";inset-block:0;width:calc(100% + var(--skeleton-shimmer-period));pointer-events:none;background-image:repeating-linear-gradient(90deg, transparent 0, color-mix(in oklab, var(--foreground) calc(var(--ink-seam) * 35%), transparent) calc(var(--skeleton-shimmer-period) * .25), color-mix(in oklab, var(--foreground) calc(var(--ink-seam) * 100%), transparent) calc(var(--skeleton-shimmer-period) * .5), color-mix(in oklab, var(--foreground) calc(var(--ink-seam) * 35%), transparent) calc(var(--skeleton-shimmer-period) * .75), transparent var(--skeleton-shimmer-period));transform:translateX(calc(-1 * var(--skeleton-shimmer-period)));position:absolute;left:0}@media (prefers-reduced-motion:no-preference){.skeleton[data-shimmer][data-v-5e54f919]:after{animation:skeleton-shimmer-5e54f919 var(--duration-shimmer-fast) linear infinite}}.skeleton[data-offscreen][data-v-5e54f919]:after{animation-play-state:paused}@media (forced-colors:active){.skeleton[data-v-5e54f919]{opacity:.18;background:canvastext;animation:none}.skeleton[data-shimmer][data-v-5e54f919]:after{content:none}}.data-table{overflow:hidden}.data-table-cards{flex-direction:column;gap:.5rem;display:flex}.data-table-card,.data-table-state{border:1px solid var(--border);border-radius:var(--radius-card);padding:.75rem}.data-table-state{padding-block:var(--space-phi-5);color:var(--muted-foreground);text-align:center}.data-table-card-skeleton-title{width:50%;height:1rem;margin-block-end:.5rem}.data-table-cell-skeleton{width:75%;height:1rem}.data-table-action-skeleton{width:1.5rem;height:1rem}.data-table-card-header{justify-content:space-between;align-items:flex-start;gap:.5rem;display:flex}.data-table-card-title,.data-table-card-value{overflow-wrap:anywhere;min-width:0}.data-table-card-title{font-weight:600}.data-table-card-fields{grid-template-columns:auto minmax(0,1fr);gap:.25rem .75rem;margin-block-start:.5rem;display:grid}.data-table-card-label,.data-table-header-row{color:var(--muted-foreground)}.data-table-actions,.data-table-actions-cell{flex:none;width:2.5rem}.data-table-sort{border-radius:var(--radius-sm);width:100%;color:inherit;font:inherit;text-align:left;cursor:pointer;background:0 0;border:0;justify-content:flex-start;align-items:center;gap:.25rem;padding:0;display:inline-flex}.data-table [data-align=center]{text-align:center;justify-content:center}.data-table [data-align=right]{text-align:right;justify-content:flex-end}.data-table-row-interactive{cursor:pointer;transition:background-color var(--duration-fast) var(--ease-standard)}.data-table-row-interactive:hover,.data-table-row-interactive[data-state=selected]{background:var(--surface-tint-8)}.data-table-card.data-table-row-interactive[data-state=selected]{border-color:var(--focus-ring-color);box-shadow:var(--focus-ring-shadow)}}@keyframes skeleton-breathe-5e54f919{to{opacity:.55}}@keyframes skeleton-shimmer-5e54f919{to{transform:translate(0)}}
|
package/dist/data-table.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "./data-table-
|
|
1
|
+
import { t as e } from "./data-table-lDykVYuo.js";
|
|
2
2
|
export { e as DataTable };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { t as e } from "./class-names-FlXcvRRT.js";
|
|
2
2
|
import { computed as t, createElementBlock as n, createElementVNode as r, defineComponent as i, inject as a, normalizeClass as o, normalizeStyle as s, onBeforeUnmount as c, onMounted as l, openBlock as u, provide as d, readonly as f, ref as p, renderSlot as m, toDisplayString as h, toValue as g, unref as _, watch as v } from "vue";
|
|
3
|
+
import "./components/deck/styles/index.css";
|
|
3
4
|
//#region src/components/deck/composables/useDeck.ts
|
|
4
5
|
function y(e, n = {}) {
|
|
5
6
|
let r = t(() => {
|
package/dist/deck.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as e, a as t, c as n, d as r, f as i, g as a, h as o, i as s, l as c, m as l, n as u, o as d, p as f, r as p, s as m, t as h, u as g, v as _, y as v } from "./deck-
|
|
1
|
+
import { _ as e, a as t, c as n, d as r, f as i, g as a, h as o, i as s, l as c, m as l, n as u, o as d, p as f, r as p, s as m, t as h, u as g, v as _, y as v } from "./deck-Bc-2mEKE.js";
|
|
2
2
|
export { _ as CONTROL_SELECTOR, n as DECK_SETTLED_ATTR, i as DECK_SWIPE_THRESHOLD_PX, h as DeckSlide, u as DeckStage, c as deckCaptureMode, a as handleDeckKey, p as provideDeck, s as provideSlideContext, m as sequenceWindow, v as useDeck, g as useDeckCapture, l as useDeckHashSync, e as useDeckKeyboard, o as useDeckSnap, t as useDeckStage, f as useDeckSwipe, r as useEdgeZones, d as useSlideContext };
|
package/dist/dialog.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as e, t } from "./DialogContent-
|
|
1
|
+
import { n as e, t } from "./DialogContent-DG5kseRQ.js";
|
|
2
2
|
import { a as n, i as r, n as i, o as a, r as o, t as s } from "./dialog-BZoFG0j8.js";
|
|
3
3
|
export { e as Dialog, s as DialogClose, t as DialogContent, r as DialogDescription, o as DialogFooter, a as DialogHeader, n as DialogTitle, i as DialogTrigger };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./components/dock/trigger.js";
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { t as e } from "./class-names-FlXcvRRT.js";
|
|
2
|
+
import { t } from "./vSpecular-DMJo8pfD.js";
|
|
3
|
+
import { i as n } from "./constants-DfrO-IaH.js";
|
|
4
|
+
import { t as r } from "./DropdownMenuTrigger-uhSXgEfK.js";
|
|
5
|
+
import { computed as i, createBlock as a, createVNode as o, defineComponent as s, h as c, mergeProps as l, openBlock as u, renderSlot as d, unref as f, withCtx as p, withDirectives as m } from "vue";
|
|
6
|
+
import { PopoverTrigger as h, SelectIcon as g, SelectTrigger as _ } from "reka-ui";
|
|
7
|
+
import { ChevronDown as v } from "@lucide/vue";
|
|
8
|
+
//#endregion
|
|
9
|
+
//#region src/components/dock/DockTrigger.vue
|
|
10
|
+
var y = /* @__PURE__ */ s({
|
|
11
|
+
inheritAttrs: !1,
|
|
12
|
+
__name: "DockTrigger",
|
|
13
|
+
props: {
|
|
14
|
+
for: { default: "select" },
|
|
15
|
+
class: { type: [
|
|
16
|
+
Boolean,
|
|
17
|
+
null,
|
|
18
|
+
String,
|
|
19
|
+
Object,
|
|
20
|
+
Array
|
|
21
|
+
] }
|
|
22
|
+
},
|
|
23
|
+
setup(s) {
|
|
24
|
+
let y = s, b = { [n]: "" };
|
|
25
|
+
function x(e) {
|
|
26
|
+
e.preventDefault(), e.stopImmediatePropagation();
|
|
27
|
+
}
|
|
28
|
+
let S = (e, { attrs: t, slots: n }) => {
|
|
29
|
+
let { disabled: r, ...i } = t, a = r != null && r !== !1;
|
|
30
|
+
return c("button", {
|
|
31
|
+
...i,
|
|
32
|
+
type: i.type ?? "button",
|
|
33
|
+
...a ? {
|
|
34
|
+
"aria-disabled": "true",
|
|
35
|
+
onClickCapture: x
|
|
36
|
+
} : {}
|
|
37
|
+
}, n.default?.());
|
|
38
|
+
};
|
|
39
|
+
S.inheritAttrs = !1;
|
|
40
|
+
let C = i(() => e("dock-trigger", y.for === "select" && "dock-select-trigger", y.for !== "select" && "dock-dropdown-trigger", y.class));
|
|
41
|
+
return (e, n) => y.for === "select" ? m((u(), a(f(_), l({ key: 0 }, {
|
|
42
|
+
...e.$attrs,
|
|
43
|
+
...b
|
|
44
|
+
}, {
|
|
45
|
+
"as-child": "",
|
|
46
|
+
class: C.value
|
|
47
|
+
}), {
|
|
48
|
+
default: p(() => [o(S, null, {
|
|
49
|
+
default: p(() => [d(e.$slots, "default"), o(f(g), { "as-child": "" }, {
|
|
50
|
+
default: p(() => [d(e.$slots, "icon", {}, () => [o(f(v), {
|
|
51
|
+
class: "dock-select-trigger__chevron",
|
|
52
|
+
"aria-hidden": "true"
|
|
53
|
+
})])]),
|
|
54
|
+
_: 3
|
|
55
|
+
})]),
|
|
56
|
+
_: 3
|
|
57
|
+
})]),
|
|
58
|
+
_: 3
|
|
59
|
+
}, 16, ["class"])), [[f(t)]]) : y.for === "dropdown" ? m((u(), a(r, l({ key: 1 }, {
|
|
60
|
+
...e.$attrs,
|
|
61
|
+
...b
|
|
62
|
+
}, {
|
|
63
|
+
"as-child": "",
|
|
64
|
+
action: "pointerdown",
|
|
65
|
+
class: C.value
|
|
66
|
+
}), {
|
|
67
|
+
default: p(() => [o(S, null, {
|
|
68
|
+
default: p(() => [d(e.$slots, "default")]),
|
|
69
|
+
_: 3
|
|
70
|
+
})]),
|
|
71
|
+
_: 3
|
|
72
|
+
}, 16, ["class"])), [[f(t)]]) : m((u(), a(f(h), l({ key: 2 }, {
|
|
73
|
+
...e.$attrs,
|
|
74
|
+
...b
|
|
75
|
+
}, {
|
|
76
|
+
"as-child": "",
|
|
77
|
+
class: C.value
|
|
78
|
+
}), {
|
|
79
|
+
default: p(() => [o(S, null, {
|
|
80
|
+
default: p(() => [d(e.$slots, "default")]),
|
|
81
|
+
_: 3
|
|
82
|
+
})]),
|
|
83
|
+
_: 3
|
|
84
|
+
}, 16, ["class"])), [[f(t)]]);
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
//#endregion
|
|
88
|
+
export { y as DockTrigger };
|