@cascivo/react 0.12.0 → 0.13.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/dist/accordion/accordion.js +46 -44
- package/dist/action-sheet/action-sheet.js +16 -16
- package/dist/alert-dialog/alert-dialog.js +34 -34
- package/dist/app-shell/app-shell.css +1 -1
- package/dist/app-shell/app-shell.js +36 -33
- package/dist/app-shell/app-shell.module.js +8 -8
- package/dist/avatar-group/avatar-group.js +6 -6
- package/dist/badge/badge.js +17 -10
- package/dist/bottom-sheet/bottom-sheet.js +18 -18
- package/dist/button/button.css +1 -1
- package/dist/button/button.js +15 -12
- package/dist/button/button.module.js +1 -1
- package/dist/button-group/button-group.js +8 -8
- package/dist/card/card.css +1 -1
- package/dist/card/card.module.js +8 -8
- package/dist/carousel/carousel.js +20 -20
- package/dist/checkbox/checkbox.js +21 -21
- package/dist/checkbox-card/checkbox-card.js +15 -13
- package/dist/collapsible/collapsible.js +7 -7
- package/dist/color-picker/color-picker.js +26 -26
- package/dist/combobox/combobox.css +1 -1
- package/dist/combobox/combobox.js +86 -86
- package/dist/combobox/combobox.module.js +15 -15
- package/dist/command-menu/command-menu.js +111 -111
- package/dist/comparison/comparison.js +10 -10
- package/dist/context-menu/context-menu.js +9 -9
- package/dist/copy-button/copy-button.js +18 -16
- package/dist/data-table/data-table.css +1 -1
- package/dist/data-table/data-table.js +8 -2
- package/dist/data-table/data-table.module.js +29 -29
- package/dist/date-picker/date-picker.css +1 -1
- package/dist/date-picker/date-picker.js +25 -25
- package/dist/date-picker/date-picker.module.js +19 -19
- package/dist/date-range-picker/date-range-picker.js +26 -26
- package/dist/drawer/drawer.css +1 -1
- package/dist/drawer/drawer.js +18 -17
- package/dist/drawer/drawer.module.js +9 -9
- package/dist/dropdown/dropdown.js +48 -48
- package/dist/editable/editable.js +11 -11
- package/dist/fab/fab.js +53 -53
- package/dist/field/field.js +8 -8
- package/dist/file-uploader/file-uploader.css +1 -1
- package/dist/file-uploader/file-uploader.js +19 -19
- package/dist/file-uploader/file-uploader.module.js +14 -14
- package/dist/filter/filter.js +10 -9
- package/dist/header-panel/header-panel.js +31 -31
- package/dist/hover-card/hover-card.js +21 -21
- package/dist/icon-button/icon-button.css +1 -1
- package/dist/icon-button/icon-button.js +5 -5
- package/dist/icon-button/icon-button.module.js +1 -1
- package/dist/index.d.ts +1475 -251
- package/dist/input/input.css +1 -1
- package/dist/input/input.js +22 -21
- package/dist/input/input.module.js +5 -5
- package/dist/item/item.css +1 -1
- package/dist/item/item.module.js +6 -6
- package/dist/layouts/src/page-header/page-header.css +1 -0
- package/dist/layouts/src/page-header/page-header.js +33 -0
- package/dist/layouts/src/page-header/page-header.module.js +13 -0
- package/dist/link/link.js +14 -12
- package/dist/log-viewer/log-viewer.js +26 -26
- package/dist/menu/menu.js +20 -20
- package/dist/menu-button/menu-button.js +48 -48
- package/dist/menubar/menubar.js +42 -42
- package/dist/modal/modal.css +1 -1
- package/dist/modal/modal.js +41 -35
- package/dist/modal/modal.module.js +8 -7
- package/dist/multi-select/multi-select.css +1 -1
- package/dist/multi-select/multi-select.js +57 -57
- package/dist/multi-select/multi-select.module.js +11 -11
- package/dist/native-select/native-select.js +13 -11
- package/dist/navigation-menu/navigation-menu.js +46 -46
- package/dist/node/accordion/accordion.js +46 -44
- package/dist/node/action-sheet/action-sheet.js +16 -16
- package/dist/node/alert-dialog/alert-dialog.js +34 -34
- package/dist/node/app-shell/app-shell.js +36 -33
- package/dist/node/app-shell/app-shell.module.js +8 -8
- package/dist/node/avatar-group/avatar-group.js +6 -6
- package/dist/node/badge/badge.js +17 -10
- package/dist/node/bottom-sheet/bottom-sheet.js +18 -18
- package/dist/node/button/button.js +15 -12
- package/dist/node/button/button.module.js +1 -1
- package/dist/node/button-group/button-group.js +8 -8
- package/dist/node/card/card.module.js +8 -8
- package/dist/node/carousel/carousel.js +20 -20
- package/dist/node/checkbox/checkbox.js +21 -21
- package/dist/node/checkbox-card/checkbox-card.js +15 -13
- package/dist/node/collapsible/collapsible.js +7 -7
- package/dist/node/color-picker/color-picker.js +26 -26
- package/dist/node/combobox/combobox.js +86 -86
- package/dist/node/combobox/combobox.module.js +15 -15
- package/dist/node/command-menu/command-menu.js +111 -111
- package/dist/node/comparison/comparison.js +10 -10
- package/dist/node/context-menu/context-menu.js +9 -9
- package/dist/node/copy-button/copy-button.js +18 -16
- package/dist/node/data-table/data-table.js +8 -2
- package/dist/node/data-table/data-table.module.js +29 -29
- package/dist/node/date-picker/date-picker.js +25 -25
- package/dist/node/date-picker/date-picker.module.js +19 -19
- package/dist/node/date-range-picker/date-range-picker.js +26 -26
- package/dist/node/drawer/drawer.js +18 -17
- package/dist/node/drawer/drawer.module.js +9 -9
- package/dist/node/dropdown/dropdown.js +48 -48
- package/dist/node/editable/editable.js +11 -11
- package/dist/node/fab/fab.js +53 -53
- package/dist/node/field/field.js +8 -8
- package/dist/node/file-uploader/file-uploader.js +19 -19
- package/dist/node/file-uploader/file-uploader.module.js +14 -14
- package/dist/node/filter/filter.js +10 -9
- package/dist/node/header-panel/header-panel.js +31 -31
- package/dist/node/hover-card/hover-card.js +21 -21
- package/dist/node/icon-button/icon-button.js +5 -5
- package/dist/node/icon-button/icon-button.module.js +1 -1
- package/dist/node/input/input.js +22 -21
- package/dist/node/input/input.module.js +5 -5
- package/dist/node/item/item.module.js +6 -6
- package/dist/node/layouts/src/page-header/page-header.js +33 -0
- package/dist/node/layouts/src/page-header/page-header.module.js +12 -0
- package/dist/node/link/link.js +14 -12
- package/dist/node/log-viewer/log-viewer.js +26 -26
- package/dist/node/menu/menu.js +20 -20
- package/dist/node/menu-button/menu-button.js +48 -48
- package/dist/node/menubar/menubar.js +42 -42
- package/dist/node/modal/modal.js +41 -35
- package/dist/node/modal/modal.module.js +8 -7
- package/dist/node/multi-select/multi-select.js +57 -57
- package/dist/node/multi-select/multi-select.module.js +11 -11
- package/dist/node/native-select/native-select.js +13 -11
- package/dist/node/navigation-menu/navigation-menu.js +46 -46
- package/dist/node/notification/notification.js +50 -44
- package/dist/node/notification/notification.module.js +7 -7
- package/dist/node/number-input/number-input.js +52 -50
- package/dist/node/number-input/number-input.module.js +8 -8
- package/dist/node/otp-input/otp-input.js +8 -8
- package/dist/node/otp-input/otp-input.module.js +2 -2
- package/dist/node/overflow-menu/overflow-menu.js +18 -13
- package/dist/node/password-input/password-input.js +28 -27
- package/dist/node/password-input/password-input.module.js +7 -7
- package/dist/node/popover/popover.js +26 -24
- package/dist/node/progress/progress.js +3 -2
- package/dist/node/pull-to-refresh/pull-to-refresh.js +13 -13
- package/dist/node/radial-progress/radial-progress.js +5 -5
- package/dist/node/radio/radio.js +23 -22
- package/dist/node/radio-card/radio-card.js +27 -26
- package/dist/node/react/src/index.js +4 -3
- package/dist/node/react/src/theme.js +30 -19
- package/dist/node/resizable/resizable.js +11 -11
- package/dist/node/scroll-area/scroll-area.js +4 -4
- package/dist/node/search/search.js +49 -49
- package/dist/node/search/search.module.js +5 -5
- package/dist/node/select/select.js +27 -26
- package/dist/node/sheet/sheet.js +11 -10
- package/dist/node/sheet/sheet.module.js +5 -5
- package/dist/node/side-nav/side-nav.js +91 -91
- package/dist/node/skip-nav/skip-nav.js +12 -12
- package/dist/node/slider/slider.js +13 -11
- package/dist/node/stat/stat.js +6 -5
- package/dist/node/stat/stat.module.js +7 -7
- package/dist/node/status/status.js +18 -11
- package/dist/node/steps/steps.js +23 -23
- package/dist/node/structured-list/structured-list.js +33 -32
- package/dist/node/tabs/tabs.js +49 -47
- package/dist/node/tag/tag.js +22 -15
- package/dist/node/tags-input/tags-input.js +35 -35
- package/dist/node/tags-input/tags-input.module.js +4 -4
- package/dist/node/textarea/textarea.js +22 -21
- package/dist/node/tile/tile.module.js +3 -3
- package/dist/node/time-picker/time-picker.js +22 -21
- package/dist/node/time-picker/time-picker.module.js +5 -5
- package/dist/node/timeline/timeline.js +22 -16
- package/dist/node/toast/toast.js +15 -15
- package/dist/node/toc/toc.js +8 -8
- package/dist/node/toggle/toggle.js +15 -13
- package/dist/node/toggle-group/toggle-group.js +10 -10
- package/dist/node/toggletip/toggletip.js +9 -9
- package/dist/node/tooltip/tooltip.js +5 -5
- package/dist/node/tree-view/tree-view.js +32 -32
- package/dist/notification/notification.css +1 -1
- package/dist/notification/notification.js +50 -44
- package/dist/notification/notification.module.js +7 -7
- package/dist/number-input/number-input.css +1 -1
- package/dist/number-input/number-input.js +52 -50
- package/dist/number-input/number-input.module.js +8 -8
- package/dist/otp-input/otp-input.css +1 -1
- package/dist/otp-input/otp-input.js +8 -8
- package/dist/otp-input/otp-input.module.js +2 -2
- package/dist/overflow-menu/overflow-menu.js +18 -13
- package/dist/password-input/password-input.css +1 -1
- package/dist/password-input/password-input.js +28 -27
- package/dist/password-input/password-input.module.js +7 -7
- package/dist/popover/popover.js +26 -24
- package/dist/progress/progress.js +3 -2
- package/dist/pull-to-refresh/pull-to-refresh.js +13 -13
- package/dist/radial-progress/radial-progress.js +5 -5
- package/dist/radio/radio.js +23 -22
- package/dist/radio-card/radio-card.js +27 -26
- package/dist/react/src/index.js +4 -3
- package/dist/react/src/theme.js +30 -19
- package/dist/resizable/resizable.js +11 -11
- package/dist/scroll-area/scroll-area.js +4 -4
- package/dist/search/search.css +1 -1
- package/dist/search/search.js +49 -49
- package/dist/search/search.module.js +5 -5
- package/dist/select/select.js +27 -26
- package/dist/sheet/sheet.css +1 -1
- package/dist/sheet/sheet.js +11 -10
- package/dist/sheet/sheet.module.js +5 -5
- package/dist/side-nav/side-nav.js +91 -91
- package/dist/skip-nav/skip-nav.js +12 -12
- package/dist/slider/slider.js +13 -11
- package/dist/stat/stat.css +1 -1
- package/dist/stat/stat.js +6 -5
- package/dist/stat/stat.module.js +7 -7
- package/dist/status/status.js +18 -11
- package/dist/steps/steps.js +23 -23
- package/dist/structured-list/structured-list.js +33 -32
- package/dist/styles.css +87 -23
- package/dist/tabs/tabs.js +49 -47
- package/dist/tag/tag.js +22 -15
- package/dist/tags-input/tags-input.css +1 -1
- package/dist/tags-input/tags-input.js +35 -35
- package/dist/tags-input/tags-input.module.js +4 -4
- package/dist/textarea/textarea.js +22 -21
- package/dist/tile/tile.css +1 -1
- package/dist/tile/tile.module.js +3 -3
- package/dist/time-picker/time-picker.css +1 -1
- package/dist/time-picker/time-picker.js +22 -21
- package/dist/time-picker/time-picker.module.js +5 -5
- package/dist/timeline/timeline.js +22 -16
- package/dist/toast/toast.js +15 -15
- package/dist/toc/toc.js +8 -8
- package/dist/toggle/toggle.js +15 -13
- package/dist/toggle-group/toggle-group.js +10 -10
- package/dist/toggletip/toggletip.js +9 -9
- package/dist/tooltip/tooltip.js +5 -5
- package/dist/tree-view/tree-view.js +32 -32
- package/package.json +10 -4
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
import { Spinner as e } from "../spinner/spinner.js";
|
|
4
4
|
import { Kbd as t } from "../kbd/kbd.js";
|
|
5
5
|
import n from "./command-menu.module.js";
|
|
6
|
-
import { batch as r, cn as i,
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
6
|
+
import { batch as r, cn as i, focusElement as a, useEffectPropSignal as o, useSignal as s, useSignalEffect as c, useSignals as ee } from "@cascivo/core";
|
|
7
|
+
import { useId as te, useRef as l } from "react";
|
|
8
|
+
import { builtin as u, t as d } from "@cascivo/i18n";
|
|
9
|
+
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
10
10
|
//#region ../components/src/command-menu/command-menu.tsx
|
|
11
|
-
function
|
|
11
|
+
function m(e, t) {
|
|
12
12
|
if (e.length === 0) return {
|
|
13
13
|
score: 1,
|
|
14
14
|
indices: []
|
|
@@ -25,21 +25,21 @@ function p(e, t) {
|
|
|
25
25
|
indices: s
|
|
26
26
|
} : null;
|
|
27
27
|
}
|
|
28
|
-
function m(e, t) {
|
|
29
|
-
return p(e, t)?.score ?? 0;
|
|
30
|
-
}
|
|
31
28
|
function h(e, t) {
|
|
32
|
-
|
|
29
|
+
return m(e, t)?.score ?? 0;
|
|
30
|
+
}
|
|
31
|
+
function g(e, t) {
|
|
32
|
+
let n = h(e, t.label);
|
|
33
33
|
for (let r of t.keywords ?? []) {
|
|
34
|
-
let t =
|
|
34
|
+
let t = h(e, r);
|
|
35
35
|
t > n && (n = t);
|
|
36
36
|
}
|
|
37
37
|
return n;
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function _(e, t) {
|
|
40
40
|
if (t.length === 0) return e;
|
|
41
41
|
let r = new Set(t), i = [], a = "", o = r.has(0), s = (e) => {
|
|
42
|
-
a !== "" && (i.push(o ? /* @__PURE__ */
|
|
42
|
+
a !== "" && (i.push(o ? /* @__PURE__ */ f("mark", {
|
|
43
43
|
className: n.match,
|
|
44
44
|
children: a
|
|
45
45
|
}, e) : a), a = "");
|
|
@@ -50,7 +50,7 @@ function g(e, t) {
|
|
|
50
50
|
}
|
|
51
51
|
return s(e.length), i;
|
|
52
52
|
}
|
|
53
|
-
function
|
|
53
|
+
function v(e, t) {
|
|
54
54
|
for (let n of t) {
|
|
55
55
|
let t = n.prefix;
|
|
56
56
|
if (t) {
|
|
@@ -66,49 +66,49 @@ function _(e, t) {
|
|
|
66
66
|
}
|
|
67
67
|
return null;
|
|
68
68
|
}
|
|
69
|
-
function
|
|
69
|
+
function y({ open: h, onOpenChange: y, groups: ne, placeholder: re, emptyLabel: ie, hotkey: b = !0, label: x, loading: S = !1, onQueryChange: C, scopes: w = [], className: ae }) {
|
|
70
70
|
ee();
|
|
71
|
-
let
|
|
72
|
-
|
|
73
|
-
let
|
|
74
|
-
|
|
75
|
-
let
|
|
71
|
+
let T = x ?? d(u.commandMenu.label), E = ie ?? d(u.commandMenu.empty), D = te(), O = `${D}-listbox`, k = l(null), A = l(null), j = l([]), M = l(y);
|
|
72
|
+
M.current = y;
|
|
73
|
+
let N = l(C);
|
|
74
|
+
N.current = C;
|
|
75
|
+
let P = o(h), oe = o(b), F = s(""), I = s(0), L = s([]), R = s(null), z = L.value.at(-1)?.groups ?? ne, B = re ?? L.value.at(-1)?.placeholder ?? d(u.commandMenu.placeholder), V = w.find((e) => e.id === R.value) ?? null, H = z.filter((e) => !R.value || !e.scope || e.scope === R.value).map((e) => ({
|
|
76
76
|
heading: e.heading,
|
|
77
77
|
items: e.items.map((e) => ({
|
|
78
78
|
item: e,
|
|
79
|
-
score:
|
|
79
|
+
score: g(F.value, e)
|
|
80
80
|
})).filter(({ score: e }) => e > 0).sort((e, t) => t.score - e.score).map(({ item: e }) => ({
|
|
81
81
|
item: e,
|
|
82
|
-
indices:
|
|
82
|
+
indices: m(F.value, e.label)?.indices ?? []
|
|
83
83
|
}))
|
|
84
|
-
})).filter((e) => e.items.length > 0), U = H.flatMap((e) => e.items.map((e) => e.item)), W = U.flatMap((e, t) => e.disabled ? [] : [t]), G = W.includes(I.value) ? I.value : W[0] ?? -1, K = (e) => `${
|
|
85
|
-
|
|
86
|
-
let e =
|
|
87
|
-
e && (
|
|
84
|
+
})).filter((e) => e.items.length > 0), U = H.flatMap((e) => e.items.map((e) => e.item)), W = U.flatMap((e, t) => e.disabled ? [] : [t]), G = W.includes(I.value) ? I.value : W[0] ?? -1, K = (e) => `${D}-option-${e}`;
|
|
85
|
+
c(() => {
|
|
86
|
+
let e = k.current;
|
|
87
|
+
e && (P.value ? e.open || (r(() => {
|
|
88
88
|
F.value = "", I.value = 0, L.value = [], R.value = null;
|
|
89
|
-
}), typeof e.showModal == "function" && e.showModal(),
|
|
90
|
-
}),
|
|
91
|
-
let e =
|
|
89
|
+
}), typeof e.showModal == "function" && e.showModal(), a(A.current)) : e.open && (L.value = [], e.close()));
|
|
90
|
+
}), c(() => {
|
|
91
|
+
let e = k.current;
|
|
92
92
|
if (!e) return;
|
|
93
|
-
let t = () =>
|
|
93
|
+
let t = () => M.current(!1);
|
|
94
94
|
return e.addEventListener("close", t), () => e.removeEventListener("close", t);
|
|
95
|
-
}),
|
|
96
|
-
if (!
|
|
95
|
+
}), c(() => {
|
|
96
|
+
if (!oe.value) return;
|
|
97
97
|
let e = (e) => {
|
|
98
|
-
(e.metaKey || e.ctrlKey) && e.key.toLowerCase() === "k" && (e.preventDefault(),
|
|
98
|
+
(e.metaKey || e.ctrlKey) && e.key.toLowerCase() === "k" && (e.preventDefault(), M.current(!P.value));
|
|
99
99
|
};
|
|
100
100
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
101
101
|
});
|
|
102
102
|
let q = (e) => {
|
|
103
103
|
I.value = e;
|
|
104
|
-
let t =
|
|
104
|
+
let t = j.current[e];
|
|
105
105
|
t && typeof t.scrollIntoView == "function" && t.scrollIntoView({ block: "nearest" });
|
|
106
106
|
}, J = (e) => {
|
|
107
107
|
if (W.length === 0) return;
|
|
108
108
|
let t = W[(W.indexOf(G) + e + W.length) % W.length];
|
|
109
109
|
t !== void 0 && q(t);
|
|
110
110
|
}, Y = (e) => {
|
|
111
|
-
e.onSelect(),
|
|
111
|
+
e.onSelect(), y(!1);
|
|
112
112
|
}, X = (e, t) => {
|
|
113
113
|
if (!(!e || e.disabled)) {
|
|
114
114
|
if (e.page) {
|
|
@@ -123,23 +123,23 @@ function v({ open: m, onOpenChange: v, groups: ne, placeholder: re, emptyLabel:
|
|
|
123
123
|
n && Y(n);
|
|
124
124
|
return;
|
|
125
125
|
}
|
|
126
|
-
t !== "secondary" && (e.onSelect?.(),
|
|
126
|
+
t !== "secondary" && (e.onSelect?.(), y(!1));
|
|
127
127
|
}
|
|
128
|
-
},
|
|
129
|
-
if (
|
|
130
|
-
let t = [null, ...
|
|
128
|
+
}, se = (e) => {
|
|
129
|
+
if (w.length === 0) return;
|
|
130
|
+
let t = [null, ...w.map((e) => e.id)], n = t[(t.indexOf(R.value) + e + t.length) % t.length];
|
|
131
131
|
r(() => {
|
|
132
132
|
R.value = n ?? null, I.value = 0;
|
|
133
133
|
});
|
|
134
134
|
}, Z = () => {
|
|
135
135
|
r(() => {
|
|
136
136
|
R.value = null, I.value = 0;
|
|
137
|
-
}),
|
|
137
|
+
}), a(A.current);
|
|
138
138
|
}, Q = () => {
|
|
139
139
|
r(() => {
|
|
140
140
|
L.value = L.value.slice(0, -1), F.value = "", I.value = 0;
|
|
141
141
|
});
|
|
142
|
-
},
|
|
142
|
+
}, ce = (e) => {
|
|
143
143
|
switch (e.key) {
|
|
144
144
|
case "ArrowDown":
|
|
145
145
|
e.preventDefault(), J(1);
|
|
@@ -148,7 +148,7 @@ function v({ open: m, onOpenChange: v, groups: ne, placeholder: re, emptyLabel:
|
|
|
148
148
|
e.preventDefault(), J(-1);
|
|
149
149
|
break;
|
|
150
150
|
case "Tab":
|
|
151
|
-
|
|
151
|
+
w.length > 0 && (e.preventDefault(), se(e.shiftKey ? -1 : 1));
|
|
152
152
|
break;
|
|
153
153
|
case "Home":
|
|
154
154
|
e.preventDefault(), W[0] !== void 0 && q(W[0]);
|
|
@@ -166,24 +166,24 @@ function v({ open: m, onOpenChange: v, groups: ne, placeholder: re, emptyLabel:
|
|
|
166
166
|
F.value === "" && (L.value.length > 0 ? (e.preventDefault(), Q()) : R.value && (e.preventDefault(), Z()));
|
|
167
167
|
break;
|
|
168
168
|
}
|
|
169
|
-
}, ce = (e) => {
|
|
170
|
-
e.key === "Escape" && (e.preventDefault(), L.value.length > 0 ? Q() : O.current?.close());
|
|
171
169
|
}, le = (e) => {
|
|
172
|
-
e.
|
|
170
|
+
e.key === "Escape" && (e.preventDefault(), L.value.length > 0 ? Q() : k.current?.close());
|
|
171
|
+
}, ue = (e) => {
|
|
172
|
+
e.target === k.current && k.current?.close();
|
|
173
173
|
}, $ = -1;
|
|
174
|
-
return /* @__PURE__ */
|
|
175
|
-
ref:
|
|
176
|
-
"aria-label":
|
|
174
|
+
return /* @__PURE__ */ f("dialog", {
|
|
175
|
+
ref: k,
|
|
176
|
+
"aria-label": T,
|
|
177
177
|
className: i(n.dialog, ae),
|
|
178
|
-
onClick:
|
|
179
|
-
onKeyDown:
|
|
180
|
-
children: /* @__PURE__ */
|
|
178
|
+
onClick: ue,
|
|
179
|
+
onKeyDown: le,
|
|
180
|
+
children: /* @__PURE__ */ p("div", {
|
|
181
181
|
className: n.panel,
|
|
182
182
|
children: [
|
|
183
|
-
/* @__PURE__ */
|
|
183
|
+
/* @__PURE__ */ p("div", {
|
|
184
184
|
className: n.search,
|
|
185
185
|
children: [
|
|
186
|
-
/* @__PURE__ */
|
|
186
|
+
/* @__PURE__ */ p("svg", {
|
|
187
187
|
className: n.searchIcon,
|
|
188
188
|
"aria-hidden": "true",
|
|
189
189
|
viewBox: "0 0 16 16",
|
|
@@ -193,30 +193,30 @@ function v({ open: m, onOpenChange: v, groups: ne, placeholder: re, emptyLabel:
|
|
|
193
193
|
stroke: "currentColor",
|
|
194
194
|
strokeWidth: "1.5",
|
|
195
195
|
strokeLinecap: "round",
|
|
196
|
-
children: [/* @__PURE__ */
|
|
196
|
+
children: [/* @__PURE__ */ f("circle", {
|
|
197
197
|
cx: "7",
|
|
198
198
|
cy: "7",
|
|
199
199
|
r: "4.5"
|
|
200
|
-
}), /* @__PURE__ */
|
|
200
|
+
}), /* @__PURE__ */ f("line", {
|
|
201
201
|
x1: "10.5",
|
|
202
202
|
y1: "10.5",
|
|
203
203
|
x2: "14",
|
|
204
204
|
y2: "14"
|
|
205
205
|
})]
|
|
206
206
|
}),
|
|
207
|
-
V && /* @__PURE__ */
|
|
207
|
+
V && /* @__PURE__ */ p("span", {
|
|
208
208
|
className: n.scopeChip,
|
|
209
|
-
children: [V.label, /* @__PURE__ */
|
|
209
|
+
children: [V.label, /* @__PURE__ */ f("button", {
|
|
210
210
|
type: "button",
|
|
211
211
|
className: n.scopeClear,
|
|
212
|
-
"aria-label":
|
|
212
|
+
"aria-label": d(u.commandMenu.clearScope),
|
|
213
213
|
onClick: Z,
|
|
214
|
-
children: /* @__PURE__ */
|
|
214
|
+
children: /* @__PURE__ */ f("svg", {
|
|
215
215
|
viewBox: "0 0 16 16",
|
|
216
216
|
width: "12",
|
|
217
217
|
height: "12",
|
|
218
218
|
"aria-hidden": "true",
|
|
219
|
-
children: /* @__PURE__ */
|
|
219
|
+
children: /* @__PURE__ */ f("path", {
|
|
220
220
|
d: "M4 4l8 8M12 4l-8 8",
|
|
221
221
|
fill: "none",
|
|
222
222
|
stroke: "currentColor",
|
|
@@ -226,15 +226,15 @@ function v({ open: m, onOpenChange: v, groups: ne, placeholder: re, emptyLabel:
|
|
|
226
226
|
})
|
|
227
227
|
})]
|
|
228
228
|
}),
|
|
229
|
-
/* @__PURE__ */
|
|
230
|
-
ref:
|
|
229
|
+
/* @__PURE__ */ f("input", {
|
|
230
|
+
ref: A,
|
|
231
231
|
type: "text",
|
|
232
232
|
role: "combobox",
|
|
233
233
|
"aria-expanded": "true",
|
|
234
|
-
"aria-controls":
|
|
234
|
+
"aria-controls": O,
|
|
235
235
|
"aria-activedescendant": G >= 0 ? K(G) : void 0,
|
|
236
236
|
"aria-autocomplete": "list",
|
|
237
|
-
"aria-label":
|
|
237
|
+
"aria-label": T,
|
|
238
238
|
autoComplete: "off",
|
|
239
239
|
spellCheck: !1,
|
|
240
240
|
className: n.input,
|
|
@@ -242,61 +242,61 @@ function v({ open: m, onOpenChange: v, groups: ne, placeholder: re, emptyLabel:
|
|
|
242
242
|
value: F.value,
|
|
243
243
|
onChange: (e) => {
|
|
244
244
|
let t = e.target.value;
|
|
245
|
-
if (!R.value &&
|
|
246
|
-
let e =
|
|
245
|
+
if (!R.value && w.length > 0) {
|
|
246
|
+
let e = v(t, w);
|
|
247
247
|
e && (R.value = e.scope.id, t = e.rest);
|
|
248
248
|
}
|
|
249
|
-
F.value = t, I.value = 0,
|
|
249
|
+
F.value = t, I.value = 0, N.current?.(t);
|
|
250
250
|
},
|
|
251
|
-
onKeyDown:
|
|
251
|
+
onKeyDown: ce
|
|
252
252
|
})
|
|
253
253
|
]
|
|
254
254
|
}),
|
|
255
|
-
|
|
255
|
+
w.length > 0 && /* @__PURE__ */ p("div", {
|
|
256
256
|
className: n.scopes,
|
|
257
|
-
children: [/* @__PURE__ */
|
|
257
|
+
children: [/* @__PURE__ */ f("span", {
|
|
258
258
|
className: n.scopesLabel,
|
|
259
|
-
children:
|
|
260
|
-
}),
|
|
259
|
+
children: d(u.commandMenu.scopeLabel)
|
|
260
|
+
}), w.map((e) => /* @__PURE__ */ p("button", {
|
|
261
261
|
type: "button",
|
|
262
262
|
className: n.scopePill,
|
|
263
263
|
"data-active": e.id === R.value || void 0,
|
|
264
264
|
onClick: () => {
|
|
265
265
|
r(() => {
|
|
266
266
|
R.value = R.value === e.id ? null : e.id, I.value = 0;
|
|
267
|
-
}),
|
|
267
|
+
}), a(A.current);
|
|
268
268
|
},
|
|
269
|
-
children: [e.prefix && /* @__PURE__ */
|
|
269
|
+
children: [e.prefix && /* @__PURE__ */ f("span", {
|
|
270
270
|
className: n.scopePrefix,
|
|
271
271
|
children: e.prefix
|
|
272
272
|
}), e.label]
|
|
273
273
|
}, e.id))]
|
|
274
274
|
}),
|
|
275
|
-
/* @__PURE__ */
|
|
275
|
+
/* @__PURE__ */ p("div", {
|
|
276
276
|
className: n.list,
|
|
277
|
-
children: [/* @__PURE__ */
|
|
277
|
+
children: [/* @__PURE__ */ f("div", {
|
|
278
278
|
role: "listbox",
|
|
279
|
-
id:
|
|
280
|
-
"aria-label":
|
|
279
|
+
id: O,
|
|
280
|
+
"aria-label": x,
|
|
281
281
|
tabIndex: 0,
|
|
282
|
-
children: H.map((e, r) => /* @__PURE__ */
|
|
282
|
+
children: H.map((e, r) => /* @__PURE__ */ p("div", {
|
|
283
283
|
role: "group",
|
|
284
284
|
"aria-label": e.heading,
|
|
285
285
|
className: n.group,
|
|
286
|
-
children: [e.heading && /* @__PURE__ */
|
|
286
|
+
children: [e.heading && /* @__PURE__ */ p("div", {
|
|
287
287
|
className: n.heading,
|
|
288
288
|
"aria-hidden": "true",
|
|
289
|
-
children: [/* @__PURE__ */
|
|
289
|
+
children: [/* @__PURE__ */ f("span", { children: e.heading }), F.value !== "" && /* @__PURE__ */ f("span", {
|
|
290
290
|
className: n.count,
|
|
291
|
-
children:
|
|
291
|
+
children: d(u.commandMenu.matches, { count: e.items.length })
|
|
292
292
|
})]
|
|
293
293
|
}), e.items.map((e) => {
|
|
294
294
|
let { item: r, indices: i } = e;
|
|
295
295
|
$++;
|
|
296
296
|
let a = $;
|
|
297
|
-
return /* @__PURE__ */
|
|
297
|
+
return /* @__PURE__ */ p("div", {
|
|
298
298
|
ref: (e) => {
|
|
299
|
-
|
|
299
|
+
j.current[a] = e;
|
|
300
300
|
},
|
|
301
301
|
id: K(a),
|
|
302
302
|
role: "option",
|
|
@@ -310,50 +310,50 @@ function v({ open: m, onOpenChange: v, groups: ne, placeholder: re, emptyLabel:
|
|
|
310
310
|
},
|
|
311
311
|
onClick: () => X(r, "primary"),
|
|
312
312
|
children: [
|
|
313
|
-
r.icon && /* @__PURE__ */
|
|
313
|
+
r.icon && /* @__PURE__ */ f("span", {
|
|
314
314
|
className: n.icon,
|
|
315
315
|
"aria-hidden": "true",
|
|
316
316
|
children: r.icon
|
|
317
317
|
}),
|
|
318
|
-
/* @__PURE__ */
|
|
318
|
+
/* @__PURE__ */ p("span", {
|
|
319
319
|
className: n.text,
|
|
320
|
-
children: [/* @__PURE__ */
|
|
320
|
+
children: [/* @__PURE__ */ f("span", {
|
|
321
321
|
className: n.label,
|
|
322
|
-
children:
|
|
323
|
-
}), r.description && /* @__PURE__ */
|
|
322
|
+
children: _(r.label, i)
|
|
323
|
+
}), r.description && /* @__PURE__ */ f("span", {
|
|
324
324
|
className: n.description,
|
|
325
325
|
children: r.description
|
|
326
326
|
})]
|
|
327
327
|
}),
|
|
328
|
-
r.status && /* @__PURE__ */
|
|
328
|
+
r.status && /* @__PURE__ */ p("span", {
|
|
329
329
|
className: n.status,
|
|
330
330
|
"data-tone": r.status.tone ?? "neutral",
|
|
331
|
-
children: [/* @__PURE__ */
|
|
331
|
+
children: [/* @__PURE__ */ f("span", {
|
|
332
332
|
className: n.statusDot,
|
|
333
333
|
"aria-hidden": "true"
|
|
334
334
|
}), r.status.label]
|
|
335
335
|
}),
|
|
336
|
-
r.actions && r.actions.length > 0 && /* @__PURE__ */
|
|
336
|
+
r.actions && r.actions.length > 0 && /* @__PURE__ */ f("span", {
|
|
337
337
|
className: n.actions,
|
|
338
|
-
children: r.actions.map((e) => /* @__PURE__ */
|
|
338
|
+
children: r.actions.map((e) => /* @__PURE__ */ p("span", {
|
|
339
339
|
className: n.action,
|
|
340
340
|
onClick: (t) => {
|
|
341
341
|
t.stopPropagation(), Y(e);
|
|
342
342
|
},
|
|
343
|
-
children: [e.label, e.shortcut && /* @__PURE__ */
|
|
343
|
+
children: [e.label, e.shortcut && /* @__PURE__ */ f("span", {
|
|
344
344
|
className: n.actionKeys,
|
|
345
345
|
"aria-hidden": "true",
|
|
346
|
-
children: e.shortcut.map((e, n) => /* @__PURE__ */
|
|
346
|
+
children: e.shortcut.map((e, n) => /* @__PURE__ */ f(t, {
|
|
347
347
|
size: "sm",
|
|
348
348
|
children: e
|
|
349
349
|
}, n))
|
|
350
350
|
})]
|
|
351
351
|
}, e.id))
|
|
352
352
|
}),
|
|
353
|
-
r.shortcut && /* @__PURE__ */
|
|
353
|
+
r.shortcut && /* @__PURE__ */ f("span", {
|
|
354
354
|
className: n.shortcut,
|
|
355
355
|
"aria-hidden": "true",
|
|
356
|
-
children: r.shortcut.map((e, n) => /* @__PURE__ */
|
|
356
|
+
children: r.shortcut.map((e, n) => /* @__PURE__ */ f(t, {
|
|
357
357
|
size: "sm",
|
|
358
358
|
children: e
|
|
359
359
|
}, n))
|
|
@@ -362,51 +362,51 @@ function v({ open: m, onOpenChange: v, groups: ne, placeholder: re, emptyLabel:
|
|
|
362
362
|
}, r.id);
|
|
363
363
|
})]
|
|
364
364
|
}, e.heading ?? `group-${r}`))
|
|
365
|
-
}), U.length === 0 && (
|
|
365
|
+
}), U.length === 0 && (S ? /* @__PURE__ */ p("div", {
|
|
366
366
|
role: "status",
|
|
367
367
|
className: n.empty,
|
|
368
|
-
children: [/* @__PURE__ */
|
|
369
|
-
}) : /* @__PURE__ */
|
|
368
|
+
children: [/* @__PURE__ */ f(e, { size: "sm" }), d(u.commandMenu.loading)]
|
|
369
|
+
}) : /* @__PURE__ */ f("div", {
|
|
370
370
|
role: "status",
|
|
371
371
|
className: n.empty,
|
|
372
|
-
children:
|
|
372
|
+
children: E
|
|
373
373
|
}))]
|
|
374
374
|
}),
|
|
375
|
-
/* @__PURE__ */
|
|
375
|
+
/* @__PURE__ */ p("div", {
|
|
376
376
|
className: n.footer,
|
|
377
377
|
"aria-hidden": "true",
|
|
378
378
|
children: [
|
|
379
|
-
/* @__PURE__ */
|
|
379
|
+
/* @__PURE__ */ p("span", {
|
|
380
380
|
className: n.hint,
|
|
381
381
|
children: [
|
|
382
|
-
/* @__PURE__ */
|
|
382
|
+
/* @__PURE__ */ f(t, {
|
|
383
383
|
size: "sm",
|
|
384
384
|
children: "↑"
|
|
385
385
|
}),
|
|
386
|
-
/* @__PURE__ */
|
|
386
|
+
/* @__PURE__ */ f(t, {
|
|
387
387
|
size: "sm",
|
|
388
388
|
children: "↓"
|
|
389
389
|
}),
|
|
390
390
|
" navigate"
|
|
391
391
|
]
|
|
392
392
|
}),
|
|
393
|
-
/* @__PURE__ */
|
|
393
|
+
/* @__PURE__ */ p("span", {
|
|
394
394
|
className: n.hint,
|
|
395
|
-
children: [/* @__PURE__ */
|
|
395
|
+
children: [/* @__PURE__ */ f(t, {
|
|
396
396
|
size: "sm",
|
|
397
397
|
children: "↵"
|
|
398
398
|
}), " open"]
|
|
399
399
|
}),
|
|
400
|
-
|
|
400
|
+
w.length > 0 && /* @__PURE__ */ p("span", {
|
|
401
401
|
className: n.hint,
|
|
402
|
-
children: [/* @__PURE__ */
|
|
402
|
+
children: [/* @__PURE__ */ f(t, {
|
|
403
403
|
size: "sm",
|
|
404
404
|
children: "Tab"
|
|
405
405
|
}), " scope"]
|
|
406
406
|
}),
|
|
407
|
-
/* @__PURE__ */
|
|
407
|
+
/* @__PURE__ */ p("span", {
|
|
408
408
|
className: n.hint,
|
|
409
|
-
children: [/* @__PURE__ */
|
|
409
|
+
children: [/* @__PURE__ */ f(t, {
|
|
410
410
|
size: "sm",
|
|
411
411
|
children: "esc"
|
|
412
412
|
}), " close"]
|
|
@@ -418,4 +418,4 @@ function v({ open: m, onOpenChange: v, groups: ne, placeholder: re, emptyLabel:
|
|
|
418
418
|
});
|
|
419
419
|
}
|
|
420
420
|
//#endregion
|
|
421
|
-
export {
|
|
421
|
+
export { y as CommandMenu, m as fuzzyMatch, h as fuzzyScore };
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
import e from "./comparison.module.js";
|
|
4
4
|
import { cn as t, useControllableSignal as n, useSignal as r, useSignals as i } from "@cascivo/core";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
5
|
+
import { useRef as a } from "react";
|
|
6
|
+
import { builtin as o, t as s } from "@cascivo/i18n";
|
|
7
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
8
8
|
//#region ../components/src/comparison/comparison.tsx
|
|
9
9
|
var u = (e) => Math.min(100, Math.max(0, e));
|
|
10
10
|
function d({ after: d, before: f, position: p, defaultPosition: m = 50, onPositionChange: h, orientation: g = "horizontal", keyboardStep: _ = 5, label: v, className: y, ...b }) {
|
|
11
11
|
i();
|
|
12
|
-
let x =
|
|
12
|
+
let x = a(null), S = r(!1), [C, w] = n({
|
|
13
13
|
value: p,
|
|
14
14
|
defaultValue: m,
|
|
15
15
|
onChange: h
|
|
@@ -22,7 +22,7 @@ function d({ after: d, before: f, position: p, defaultPosition: m = 50, onPositi
|
|
|
22
22
|
let t = g === "vertical" ? "ArrowUp" : "ArrowLeft", n = g === "vertical" ? "ArrowDown" : "ArrowRight", r = null;
|
|
23
23
|
e.key === t || e.key === "ArrowLeft" || e.key === "ArrowUp" ? r = T - _ : e.key === n || e.key === "ArrowRight" || e.key === "ArrowDown" ? r = T + _ : e.key === "Home" ? r = 0 : e.key === "End" ? r = 100 : e.key === "PageUp" ? r = T + _ * 2 : e.key === "PageDown" && (r = T - _ * 2), r !== null && (e.preventDefault(), w(u(r)));
|
|
24
24
|
};
|
|
25
|
-
return /* @__PURE__ */
|
|
25
|
+
return /* @__PURE__ */ l("div", {
|
|
26
26
|
ref: x,
|
|
27
27
|
"data-orientation": g,
|
|
28
28
|
"data-dragging": S.value || void 0,
|
|
@@ -39,21 +39,21 @@ function d({ after: d, before: f, position: p, defaultPosition: m = 50, onPositi
|
|
|
39
39
|
},
|
|
40
40
|
...b,
|
|
41
41
|
children: [
|
|
42
|
-
/* @__PURE__ */
|
|
42
|
+
/* @__PURE__ */ c("div", {
|
|
43
43
|
className: e.item,
|
|
44
44
|
children: d
|
|
45
45
|
}),
|
|
46
|
-
/* @__PURE__ */
|
|
46
|
+
/* @__PURE__ */ c("div", {
|
|
47
47
|
className: e.before,
|
|
48
48
|
"aria-hidden": "true",
|
|
49
49
|
children: f
|
|
50
50
|
}),
|
|
51
|
-
/* @__PURE__ */
|
|
51
|
+
/* @__PURE__ */ c("div", {
|
|
52
52
|
className: e.divider,
|
|
53
|
-
children: /* @__PURE__ */
|
|
53
|
+
children: /* @__PURE__ */ c("div", {
|
|
54
54
|
role: "slider",
|
|
55
55
|
tabIndex: 0,
|
|
56
|
-
"aria-label": v ?? o
|
|
56
|
+
"aria-label": v ?? s(o.comparison.label),
|
|
57
57
|
"aria-orientation": g,
|
|
58
58
|
"aria-valuemin": 0,
|
|
59
59
|
"aria-valuemax": 100,
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
import e from "./context-menu.module.js";
|
|
4
4
|
import { useSignal as t, useSignalEffect as n, useSignals as r } from "@cascivo/core";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { useRef as i } from "react";
|
|
6
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
7
7
|
//#region ../components/src/context-menu/context-menu.tsx
|
|
8
8
|
function s({ children: s }) {
|
|
9
9
|
r();
|
|
10
|
-
let c =
|
|
10
|
+
let c = i(null), l = i(null), u = t(!1), d = () => {
|
|
11
11
|
let e = c.current;
|
|
12
12
|
return e ? Array.from(e.querySelectorAll("[role=\"menuitem\"]:not([aria-disabled=\"true\"])")) : [];
|
|
13
13
|
}, f = (e) => {
|
|
@@ -53,11 +53,11 @@ function s({ children: s }) {
|
|
|
53
53
|
t && (t.style.setProperty("--cascivo-context-x", `${e.clientX}px`), t.style.setProperty("--cascivo-context-y", `${e.clientY}px`), u.value = !0);
|
|
54
54
|
}
|
|
55
55
|
let [h, ...g] = Array.isArray(s) ? s : [s];
|
|
56
|
-
return /* @__PURE__ */
|
|
56
|
+
return /* @__PURE__ */ o("div", {
|
|
57
57
|
ref: l,
|
|
58
58
|
onContextMenu: m,
|
|
59
59
|
className: e.wrapper,
|
|
60
|
-
children: [h, /* @__PURE__ */
|
|
60
|
+
children: [h, /* @__PURE__ */ a("div", {
|
|
61
61
|
ref: c,
|
|
62
62
|
popover: "auto",
|
|
63
63
|
role: "menu",
|
|
@@ -69,17 +69,17 @@ function s({ children: s }) {
|
|
|
69
69
|
});
|
|
70
70
|
}
|
|
71
71
|
function c({ children: t, onSelect: n, disabled: r }) {
|
|
72
|
-
function
|
|
72
|
+
function i() {
|
|
73
73
|
r || n();
|
|
74
74
|
}
|
|
75
75
|
function o(e) {
|
|
76
|
-
(e.key === "Enter" || e.key === " ") && (e.preventDefault(),
|
|
76
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), i());
|
|
77
77
|
}
|
|
78
|
-
return /* @__PURE__ */
|
|
78
|
+
return /* @__PURE__ */ a("div", {
|
|
79
79
|
role: "menuitem",
|
|
80
80
|
tabIndex: r ? -1 : 0,
|
|
81
81
|
"aria-disabled": r,
|
|
82
|
-
onClick:
|
|
82
|
+
onClick: i,
|
|
83
83
|
onKeyDown: o,
|
|
84
84
|
className: e.item,
|
|
85
85
|
children: t
|
|
@@ -2,29 +2,31 @@
|
|
|
2
2
|
|
|
3
3
|
import e from "./copy-button.module.js";
|
|
4
4
|
import { cn as t, useSignal as n, useSignals as r } from "@cascivo/core";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { forwardRef as i } from "react";
|
|
6
|
+
import { builtin as a, t as o } from "@cascivo/i18n";
|
|
7
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
7
8
|
//#region ../components/src/copy-button/copy-button.tsx
|
|
8
|
-
|
|
9
|
+
var l = i(function({ value: i, size: l = "md", labels: u, className: d, ...f }, p) {
|
|
9
10
|
r();
|
|
10
|
-
let
|
|
11
|
-
return /* @__PURE__ */
|
|
11
|
+
let m = n(!1), h = u?.copy ?? o(a.copyButton.copy), g = u?.copied ?? o(a.copyButton.copied);
|
|
12
|
+
return /* @__PURE__ */ s("button", {
|
|
12
13
|
type: "button",
|
|
13
|
-
"aria-label":
|
|
14
|
-
"data-state":
|
|
14
|
+
"aria-label": m.value ? g : h,
|
|
15
|
+
"data-state": m.value ? "copied" : "idle",
|
|
15
16
|
"data-size": l,
|
|
16
17
|
className: t(e.copyButton, d),
|
|
17
18
|
onClick: () => {
|
|
18
|
-
navigator.clipboard.writeText(
|
|
19
|
-
|
|
19
|
+
navigator.clipboard.writeText(i), m.value = !0, setTimeout(() => {
|
|
20
|
+
m.value = !1;
|
|
20
21
|
}, 2e3);
|
|
21
22
|
},
|
|
23
|
+
ref: p,
|
|
22
24
|
...f,
|
|
23
|
-
children:
|
|
25
|
+
children: m.value ? /* @__PURE__ */ s("svg", {
|
|
24
26
|
"aria-hidden": "true",
|
|
25
27
|
viewBox: "0 0 16 16",
|
|
26
28
|
className: e.icon,
|
|
27
|
-
children: /* @__PURE__ */
|
|
29
|
+
children: /* @__PURE__ */ s("path", {
|
|
28
30
|
d: "M13.5 4.5 6 12 2.5 8.5",
|
|
29
31
|
fill: "none",
|
|
30
32
|
stroke: "currentColor",
|
|
@@ -32,11 +34,11 @@ function c({ value: c, size: l = "md", labels: u, className: d, ...f }) {
|
|
|
32
34
|
strokeLinecap: "round",
|
|
33
35
|
strokeLinejoin: "round"
|
|
34
36
|
})
|
|
35
|
-
}) : /* @__PURE__ */
|
|
37
|
+
}) : /* @__PURE__ */ c("svg", {
|
|
36
38
|
"aria-hidden": "true",
|
|
37
39
|
viewBox: "0 0 16 16",
|
|
38
40
|
className: e.icon,
|
|
39
|
-
children: [/* @__PURE__ */
|
|
41
|
+
children: [/* @__PURE__ */ s("rect", {
|
|
40
42
|
x: "5.5",
|
|
41
43
|
y: "5.5",
|
|
42
44
|
width: "8",
|
|
@@ -45,7 +47,7 @@ function c({ value: c, size: l = "md", labels: u, className: d, ...f }) {
|
|
|
45
47
|
fill: "none",
|
|
46
48
|
stroke: "currentColor",
|
|
47
49
|
strokeWidth: "1.5"
|
|
48
|
-
}), /* @__PURE__ */
|
|
50
|
+
}), /* @__PURE__ */ s("path", {
|
|
49
51
|
d: "M3.5 10.5h-1a1 1 0 0 1-1-1v-7a1 1 0 0 1 1-1h7a1 1 0 0 1 1 1v1",
|
|
50
52
|
fill: "none",
|
|
51
53
|
stroke: "currentColor",
|
|
@@ -53,6 +55,6 @@ function c({ value: c, size: l = "md", labels: u, className: d, ...f }) {
|
|
|
53
55
|
})]
|
|
54
56
|
})
|
|
55
57
|
});
|
|
56
|
-
}
|
|
58
|
+
});
|
|
57
59
|
//#endregion
|
|
58
|
-
export {
|
|
60
|
+
export { l as CopyButton };
|