@cascivo/react 0.9.0 → 0.10.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/README.md +5 -5
- package/dist/command-menu/command-menu.js +2 -2
- package/dist/field/field.js +24 -15
- package/dist/index.d.ts +13 -0
- package/dist/node/accordion/accordion.js +95 -0
- package/dist/node/accordion/accordion.module.js +13 -0
- package/dist/node/action-sheet/action-sheet.js +91 -0
- package/dist/node/action-sheet/action-sheet.module.js +14 -0
- package/dist/node/alert/alert.js +55 -0
- package/dist/node/alert/alert.module.js +13 -0
- package/dist/node/alert-dialog/alert-dialog.js +68 -0
- package/dist/node/alert-dialog/alert-dialog.module.js +13 -0
- package/dist/node/app-shell/app-shell.js +80 -0
- package/dist/node/app-shell/app-shell.module.js +14 -0
- package/dist/node/aspect-ratio/aspect-ratio.js +22 -0
- package/dist/node/aspect-ratio/aspect-ratio.module.js +8 -0
- package/dist/node/avatar/avatar.js +57 -0
- package/dist/node/avatar/avatar.module.js +10 -0
- package/dist/node/avatar-group/avatar-group.js +26 -0
- package/dist/node/avatar-group/avatar-group.module.js +8 -0
- package/dist/node/badge/badge.js +17 -0
- package/dist/node/badge/badge.module.js +5 -0
- package/dist/node/blockquote/blockquote.js +18 -0
- package/dist/node/blockquote/blockquote.module.js +8 -0
- package/dist/node/bottom-sheet/bottom-sheet.js +111 -0
- package/dist/node/bottom-sheet/bottom-sheet.module.js +16 -0
- package/dist/node/breadcrumb/breadcrumb.js +28 -0
- package/dist/node/breadcrumb/breadcrumb.module.js +5 -0
- package/dist/node/button/button.js +31 -0
- package/dist/node/button/button.module.js +5 -0
- package/dist/node/button-group/button-group.js +39 -0
- package/dist/node/button-group/button-group.module.js +5 -0
- package/dist/node/calendar/calendar.js +195 -0
- package/dist/node/calendar/calendar.module.js +16 -0
- package/dist/node/card/card.js +45 -0
- package/dist/node/card/card.module.js +11 -0
- package/dist/node/carousel/carousel.js +138 -0
- package/dist/node/carousel/carousel.module.js +15 -0
- package/dist/node/chat-bubble/chat-bubble.js +33 -0
- package/dist/node/chat-bubble/chat-bubble.module.js +13 -0
- package/dist/node/checkbox/checkbox.js +38 -0
- package/dist/node/checkbox/checkbox.module.js +10 -0
- package/dist/node/checkbox-card/checkbox-card.js +48 -0
- package/dist/node/checkbox-card/checkbox-card.module.js +13 -0
- package/dist/node/code/code.js +16 -0
- package/dist/node/code/code.module.js +5 -0
- package/dist/node/code-snippet/code-snippet.js +116 -0
- package/dist/node/code-snippet/code-snippet.module.js +19 -0
- package/dist/node/code-snippet/highlight.js +69 -0
- package/dist/node/collapsible/collapsible.js +42 -0
- package/dist/node/collapsible/collapsible.module.js +10 -0
- package/dist/node/color-picker/color-picker.js +268 -0
- package/dist/node/color-picker/color-picker.module.js +20 -0
- package/dist/node/combobox/combobox.js +164 -0
- package/dist/node/combobox/combobox.module.js +21 -0
- package/dist/node/command-menu/command-menu.js +425 -0
- package/dist/node/command-menu/command-menu.module.js +36 -0
- package/dist/node/comparison/comparison.js +69 -0
- package/dist/node/comparison/comparison.module.js +11 -0
- package/dist/node/contained-list/contained-list.js +41 -0
- package/dist/node/contained-list/contained-list.module.js +13 -0
- package/dist/node/context-menu/context-menu.js +89 -0
- package/dist/node/context-menu/context-menu.module.js +9 -0
- package/dist/node/copy-button/copy-button.js +58 -0
- package/dist/node/copy-button/copy-button.module.js +8 -0
- package/dist/node/data-list/data-list.js +27 -0
- package/dist/node/data-list/data-list.module.js +10 -0
- package/dist/node/data-table/data-table.js +370 -0
- package/dist/node/data-table/data-table.module.js +35 -0
- package/dist/node/date-picker/date-picker.js +218 -0
- package/dist/node/date-picker/date-picker.module.js +25 -0
- package/dist/node/date-range-picker/date-range-picker.js +196 -0
- package/dist/node/date-range-picker/date-range-picker.module.js +20 -0
- package/dist/node/dock/dock.js +34 -0
- package/dist/node/dock/dock.module.js +10 -0
- package/dist/node/drawer/drawer.js +95 -0
- package/dist/node/drawer/drawer.module.js +15 -0
- package/dist/node/dropdown/dropdown.js +109 -0
- package/dist/node/dropdown/dropdown.module.js +11 -0
- package/dist/node/editable/editable.js +67 -0
- package/dist/node/editable/editable.module.js +13 -0
- package/dist/node/empty-state/empty-state.js +34 -0
- package/dist/node/empty-state/empty-state.module.js +11 -0
- package/dist/node/fab/fab.js +93 -0
- package/dist/node/fab/fab.module.js +14 -0
- package/dist/node/field/field.js +48 -0
- package/dist/node/field/field.module.js +9 -0
- package/dist/node/file-uploader/file-uploader.js +122 -0
- package/dist/node/file-uploader/file-uploader.module.js +20 -0
- package/dist/node/filter/filter.js +34 -0
- package/dist/node/filter/filter.module.js +8 -0
- package/dist/node/form/form.js +95 -0
- package/dist/node/form/form.module.js +5 -0
- package/dist/node/header/header.js +44 -0
- package/dist/node/header/header.module.js +13 -0
- package/dist/node/header-panel/header-panel.js +74 -0
- package/dist/node/header-panel/header-panel.module.js +11 -0
- package/dist/node/heading/heading.js +24 -0
- package/dist/node/heading/heading.module.js +5 -0
- package/dist/node/hover-card/hover-card.js +84 -0
- package/dist/node/hover-card/hover-card.module.js +8 -0
- package/dist/node/icon-button/icon-button.js +21 -0
- package/dist/node/icon-button/icon-button.module.js +5 -0
- package/dist/node/image/image.js +64 -0
- package/dist/node/image/image.module.js +11 -0
- package/dist/node/index.js +2 -0
- package/dist/node/indicator/indicator.js +18 -0
- package/dist/node/indicator/indicator.module.js +8 -0
- package/dist/node/inline-loading/inline-loading.js +76 -0
- package/dist/node/inline-loading/inline-loading.module.js +11 -0
- package/dist/node/input/input.js +54 -0
- package/dist/node/input/input.module.js +11 -0
- package/dist/node/input-group/input-group.js +41 -0
- package/dist/node/input-group/input-group.module.js +11 -0
- package/dist/node/item/item.js +52 -0
- package/dist/node/item/item.module.js +12 -0
- package/dist/node/join/join.js +14 -0
- package/dist/node/join/join.module.js +5 -0
- package/dist/node/kbd/kbd.js +16 -0
- package/dist/node/kbd/kbd.module.js +5 -0
- package/dist/node/label/label.js +25 -0
- package/dist/node/label/label.module.js +9 -0
- package/dist/node/layouts/src/auto-grid/auto-grid.js +19 -0
- package/dist/node/layouts/src/auto-grid/auto-grid.module.js +6 -0
- package/dist/node/layouts/src/center/center.js +18 -0
- package/dist/node/layouts/src/center/center.module.js +5 -0
- package/dist/node/layouts/src/columns/columns.js +23 -0
- package/dist/node/layouts/src/columns/columns.module.js +8 -0
- package/dist/node/layouts/src/flex/flex.js +22 -0
- package/dist/node/layouts/src/flex/flex.module.js +5 -0
- package/dist/node/layouts/src/grid/grid.js +57 -0
- package/dist/node/layouts/src/grid/grid.module.js +9 -0
- package/dist/node/layouts/src/spacer/spacer.js +19 -0
- package/dist/node/layouts/src/spacer/spacer.module.js +5 -0
- package/dist/node/link/link.js +22 -0
- package/dist/node/link/link.module.js +5 -0
- package/dist/node/list/list.js +23 -0
- package/dist/node/list/list.module.js +8 -0
- package/dist/node/log-viewer/log-viewer.js +184 -0
- package/dist/node/log-viewer/log-viewer.module.js +18 -0
- package/dist/node/menu/menu.js +121 -0
- package/dist/node/menu/menu.module.js +10 -0
- package/dist/node/menu-button/menu-button.js +92 -0
- package/dist/node/menu-button/menu-button.module.js +10 -0
- package/dist/node/menubar/menubar.js +103 -0
- package/dist/node/menubar/menubar.module.js +10 -0
- package/dist/node/modal/modal.js +70 -0
- package/dist/node/modal/modal.module.js +13 -0
- package/dist/node/multi-select/multi-select.js +106 -0
- package/dist/node/multi-select/multi-select.module.js +17 -0
- package/dist/node/native-select/native-select.js +37 -0
- package/dist/node/native-select/native-select.module.js +9 -0
- package/dist/node/navigation-menu/navigation-menu.js +99 -0
- package/dist/node/navigation-menu/navigation-menu.module.js +12 -0
- package/dist/node/notification/notification.js +134 -0
- package/dist/node/notification/notification.module.js +13 -0
- package/dist/node/number-input/number-input.js +145 -0
- package/dist/node/number-input/number-input.module.js +14 -0
- package/dist/node/otp-input/otp-input.js +70 -0
- package/dist/node/otp-input/otp-input.module.js +8 -0
- package/dist/node/overflow-menu/overflow-menu.js +65 -0
- package/dist/node/overflow-menu/overflow-menu.module.js +9 -0
- package/dist/node/pagination/pagination.js +92 -0
- package/dist/node/pagination/pagination.module.js +13 -0
- package/dist/node/password-input/password-input.js +80 -0
- package/dist/node/password-input/password-input.module.js +13 -0
- package/dist/node/popover/popover.js +49 -0
- package/dist/node/popover/popover.module.js +8 -0
- package/dist/node/popover/use-popover.js +57 -0
- package/dist/node/progress/progress.js +17 -0
- package/dist/node/progress/progress.module.js +8 -0
- package/dist/node/progress-bar/progress-bar.js +44 -0
- package/dist/node/progress-bar/progress-bar.module.js +13 -0
- package/dist/node/progress-circle/progress-circle.js +48 -0
- package/dist/node/progress-circle/progress-circle.module.js +11 -0
- package/dist/node/progress-indicator/progress-indicator.js +36 -0
- package/dist/node/progress-indicator/progress-indicator.module.js +12 -0
- package/dist/node/prose/prose.js +15 -0
- package/dist/node/prose/prose.module.js +5 -0
- package/dist/node/pull-to-refresh/pull-to-refresh.js +82 -0
- package/dist/node/pull-to-refresh/pull-to-refresh.module.js +11 -0
- package/dist/node/qr-code/encode.js +585 -0
- package/dist/node/qr-code/qr-code.js +41 -0
- package/dist/node/qr-code/qr-code.module.js +8 -0
- package/dist/node/radial-progress/radial-progress.js +28 -0
- package/dist/node/radial-progress/radial-progress.module.js +8 -0
- package/dist/node/radio/radio.js +49 -0
- package/dist/node/radio/radio.module.js +11 -0
- package/dist/node/radio-card/radio-card.js +63 -0
- package/dist/node/radio-card/radio-card.module.js +13 -0
- package/dist/node/rating-group/rating-group.js +37 -0
- package/dist/node/rating-group/rating-group.module.js +8 -0
- package/dist/node/react/src/index.js +138 -0
- package/dist/node/react/src/theme.js +54 -0
- package/dist/node/relative-time/relative-time.js +66 -0
- package/dist/node/relative-time/relative-time.module.js +5 -0
- package/dist/node/resizable/resizable.js +80 -0
- package/dist/node/resizable/resizable.module.js +10 -0
- package/dist/node/scroll-area/scroll-area.js +38 -0
- package/dist/node/scroll-area/scroll-area.module.js +5 -0
- package/dist/node/search/search.js +94 -0
- package/dist/node/search/search.module.js +11 -0
- package/dist/node/segmented-control/segmented-control.js +43 -0
- package/dist/node/segmented-control/segmented-control.module.js +8 -0
- package/dist/node/select/select.js +71 -0
- package/dist/node/select/select.module.js +13 -0
- package/dist/node/separator/separator.js +21 -0
- package/dist/node/separator/separator.module.js +5 -0
- package/dist/node/sheet/sheet.js +50 -0
- package/dist/node/sheet/sheet.module.js +11 -0
- package/dist/node/shell-header/shell-header.js +166 -0
- package/dist/node/shell-header/shell-header.module.js +25 -0
- package/dist/node/side-nav/side-nav.js +333 -0
- package/dist/node/side-nav/side-nav.module.js +33 -0
- package/dist/node/skeleton/skeleton.js +25 -0
- package/dist/node/skeleton/skeleton.module.js +9 -0
- package/dist/node/skip-nav/skip-nav.js +27 -0
- package/dist/node/skip-nav/skip-nav.module.js +5 -0
- package/dist/node/slider/slider.js +29 -0
- package/dist/node/slider/slider.module.js +9 -0
- package/dist/node/spinner/spinner.js +18 -0
- package/dist/node/spinner/spinner.module.js +8 -0
- package/dist/node/stack/stack.js +19 -0
- package/dist/node/stack/stack.module.js +8 -0
- package/dist/node/stat/stat.js +41 -0
- package/dist/node/stat/stat.module.js +13 -0
- package/dist/node/status/status.js +20 -0
- package/dist/node/status/status.module.js +9 -0
- package/dist/node/steps/steps.js +35 -0
- package/dist/node/steps/steps.module.js +10 -0
- package/dist/node/storage/src/drivers.js +36 -0
- package/dist/node/storage/src/persisted-signal.js +43 -0
- package/dist/node/structured-list/structured-list.js +101 -0
- package/dist/node/structured-list/structured-list.module.js +14 -0
- package/dist/node/swap/swap.js +36 -0
- package/dist/node/swap/swap.module.js +9 -0
- package/dist/node/swipe-item/swipe-item.js +62 -0
- package/dist/node/swipe-item/swipe-item.module.js +14 -0
- package/dist/node/switcher/switcher.js +32 -0
- package/dist/node/switcher/switcher.module.js +10 -0
- package/dist/node/tabs/tabs.js +95 -0
- package/dist/node/tabs/tabs.module.js +10 -0
- package/dist/node/tag/tag.js +26 -0
- package/dist/node/tag/tag.module.js +8 -0
- package/dist/node/tags-input/tags-input.js +64 -0
- package/dist/node/tags-input/tags-input.module.js +10 -0
- package/dist/node/text/text.js +18 -0
- package/dist/node/text/text.module.js +5 -0
- package/dist/node/textarea/textarea.js +56 -0
- package/dist/node/textarea/textarea.module.js +11 -0
- package/dist/node/tile/tile.js +39 -0
- package/dist/node/tile/tile.module.js +9 -0
- package/dist/node/time-picker/time-picker.js +62 -0
- package/dist/node/time-picker/time-picker.module.js +11 -0
- package/dist/node/timeline/timeline.js +41 -0
- package/dist/node/timeline/timeline.module.js +13 -0
- package/dist/node/toast/toast.js +85 -0
- package/dist/node/toast/toast.module.js +13 -0
- package/dist/node/toc/toc.js +42 -0
- package/dist/node/toc/toc.module.js +5 -0
- package/dist/node/toc/use-toc-from-region.js +18 -0
- package/dist/node/toggle/toggle.js +39 -0
- package/dist/node/toggle/toggle.module.js +10 -0
- package/dist/node/toggle-group/toggle-group.js +55 -0
- package/dist/node/toggle-group/toggle-group.module.js +8 -0
- package/dist/node/toggletip/toggletip.js +49 -0
- package/dist/node/toggletip/toggletip.module.js +9 -0
- package/dist/node/tooltip/tooltip.js +58 -0
- package/dist/node/tooltip/tooltip.module.js +8 -0
- package/dist/node/tree-view/tree-view.js +201 -0
- package/dist/node/tree-view/tree-view.module.js +15 -0
- package/dist/node/user/user.js +37 -0
- package/dist/node/user/user.module.js +11 -0
- package/dist/node/visually-hidden/visually-hidden.js +15 -0
- package/dist/node/visually-hidden/visually-hidden.module.js +5 -0
- package/dist/react/src/theme.js +35 -29
- package/package.json +3 -2
- package/readme.body.md +5 -5
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
//#region ../storage/src/drivers.ts
|
|
4
|
+
function e() {
|
|
5
|
+
let e = /* @__PURE__ */ new Map();
|
|
6
|
+
return {
|
|
7
|
+
get: (t) => e.get(t) ?? null,
|
|
8
|
+
set: (t, n) => {
|
|
9
|
+
e.set(t, n);
|
|
10
|
+
},
|
|
11
|
+
remove: (t) => {
|
|
12
|
+
e.delete(t);
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
function t() {
|
|
17
|
+
return typeof window > "u" ? e() : {
|
|
18
|
+
get: (e) => window.localStorage.getItem(e),
|
|
19
|
+
set: (e, t) => {
|
|
20
|
+
try {
|
|
21
|
+
window.localStorage.setItem(e, t);
|
|
22
|
+
} catch {}
|
|
23
|
+
},
|
|
24
|
+
remove: (e) => {
|
|
25
|
+
window.localStorage.removeItem(e);
|
|
26
|
+
},
|
|
27
|
+
subscribe(e, t) {
|
|
28
|
+
let n = (n) => {
|
|
29
|
+
n.storageArea === window.localStorage && n.key === e && t(n.newValue);
|
|
30
|
+
};
|
|
31
|
+
return window.addEventListener("storage", n), () => window.removeEventListener("storage", n);
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
//#endregion
|
|
36
|
+
export { t as localStorageDriver };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { localStorageDriver as e } from "./drivers.js";
|
|
4
|
+
import { effect as t, signal as n } from "@cascivo/core";
|
|
5
|
+
//#region ../storage/src/persisted-signal.ts
|
|
6
|
+
function r(r, i, a = {}) {
|
|
7
|
+
let o = a.driver ?? e(), s = a.version ?? 1, c = n(i), l = n(!1), u = !1;
|
|
8
|
+
function d(e) {
|
|
9
|
+
if (e !== null) try {
|
|
10
|
+
let t = JSON.parse(e);
|
|
11
|
+
if (typeof t != "object" || !t || typeof t.v != "number") return;
|
|
12
|
+
if (t.v !== s) {
|
|
13
|
+
if (!a.migrate) return;
|
|
14
|
+
let e = a.migrate(t.value, t.v);
|
|
15
|
+
return o.set(r, JSON.stringify({
|
|
16
|
+
v: s,
|
|
17
|
+
value: e
|
|
18
|
+
})), e;
|
|
19
|
+
}
|
|
20
|
+
return t.value;
|
|
21
|
+
} catch {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
function f(e) {
|
|
26
|
+
let t = d(e);
|
|
27
|
+
t !== void 0 && (u = !0, c.value = t, u = !1);
|
|
28
|
+
}
|
|
29
|
+
let p = o.get(r);
|
|
30
|
+
p instanceof Promise ? p.then((e) => {
|
|
31
|
+
f(e), l.value = !0;
|
|
32
|
+
}) : (f(p), l.value = !0), t(() => {
|
|
33
|
+
let e = c.value;
|
|
34
|
+
!l.value || u || o.set(r, JSON.stringify({
|
|
35
|
+
v: s,
|
|
36
|
+
value: e
|
|
37
|
+
}));
|
|
38
|
+
}), o.subscribe?.(r, f);
|
|
39
|
+
let m = c;
|
|
40
|
+
return m.ready = l, m;
|
|
41
|
+
}
|
|
42
|
+
//#endregion
|
|
43
|
+
export { r as persistedSignal };
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import e from "./structured-list.module.js";
|
|
4
|
+
import { cn as t, useControllableSignal as n, useRovingFocus as r, useSignals as i } from "@cascivo/core";
|
|
5
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
6
|
+
import { useId as s } from "react";
|
|
7
|
+
//#region ../components/src/structured-list/structured-list.tsx
|
|
8
|
+
function c(n) {
|
|
9
|
+
let { items: r, headers: i, selectable: s = !1, className: c, "aria-label": u } = n;
|
|
10
|
+
return s ? /* @__PURE__ */ a(l, { ...n }) : /* @__PURE__ */ o("div", {
|
|
11
|
+
role: "table",
|
|
12
|
+
"aria-label": u,
|
|
13
|
+
className: t(e.list, c),
|
|
14
|
+
children: [i && /* @__PURE__ */ a("div", {
|
|
15
|
+
role: "row",
|
|
16
|
+
className: e.headerRow,
|
|
17
|
+
children: i.map((t, n) => /* @__PURE__ */ a("div", {
|
|
18
|
+
role: "columnheader",
|
|
19
|
+
className: e.headerCell,
|
|
20
|
+
children: t
|
|
21
|
+
}, n))
|
|
22
|
+
}), /* @__PURE__ */ a("div", {
|
|
23
|
+
role: "rowgroup",
|
|
24
|
+
className: e.body,
|
|
25
|
+
children: r.map((t) => /* @__PURE__ */ a("div", {
|
|
26
|
+
role: "row",
|
|
27
|
+
className: e.row,
|
|
28
|
+
children: t.cells.map((t, n) => /* @__PURE__ */ a("div", {
|
|
29
|
+
role: "cell",
|
|
30
|
+
className: e.cell,
|
|
31
|
+
children: t
|
|
32
|
+
}, n))
|
|
33
|
+
}, t.id))
|
|
34
|
+
})]
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
function l({ items: c, headers: l, value: u, defaultValue: d, onSelect: f, className: p, "aria-label": m }) {
|
|
38
|
+
i();
|
|
39
|
+
let h = s(), [g, _] = n({
|
|
40
|
+
value: u,
|
|
41
|
+
defaultValue: d ?? c.find((e) => e.selected)?.id ?? "",
|
|
42
|
+
onChange: f
|
|
43
|
+
}), v = r({
|
|
44
|
+
orientation: "vertical",
|
|
45
|
+
loop: !1
|
|
46
|
+
}), y = (e) => {
|
|
47
|
+
_(e);
|
|
48
|
+
};
|
|
49
|
+
return /* @__PURE__ */ o("div", {
|
|
50
|
+
role: "radiogroup",
|
|
51
|
+
"aria-label": m,
|
|
52
|
+
className: t(e.list, e.selectable, p),
|
|
53
|
+
children: [l && /* @__PURE__ */ o("div", {
|
|
54
|
+
className: e.headerRow,
|
|
55
|
+
children: [/* @__PURE__ */ a("div", {
|
|
56
|
+
className: e.headerCell,
|
|
57
|
+
"aria-hidden": "true"
|
|
58
|
+
}), l.map((t, n) => /* @__PURE__ */ a("div", {
|
|
59
|
+
className: e.headerCell,
|
|
60
|
+
children: t
|
|
61
|
+
}, n))]
|
|
62
|
+
}), /* @__PURE__ */ a("div", {
|
|
63
|
+
className: e.body,
|
|
64
|
+
children: c.map((t, n) => {
|
|
65
|
+
let r = g.value === t.id, { ref: i, ...s } = v.getItemProps(n);
|
|
66
|
+
return /* @__PURE__ */ o("div", {
|
|
67
|
+
role: "radio",
|
|
68
|
+
"aria-checked": r,
|
|
69
|
+
"aria-labelledby": `${h}-${t.id}-label`,
|
|
70
|
+
"data-selected": r || void 0,
|
|
71
|
+
className: e.row,
|
|
72
|
+
ref: i,
|
|
73
|
+
...s,
|
|
74
|
+
onClick: () => y(t.id),
|
|
75
|
+
onKeyDown: (e) => {
|
|
76
|
+
s.onKeyDown(e), (e.key === "Enter" || e.key === " ") && (e.preventDefault(), y(t.id));
|
|
77
|
+
},
|
|
78
|
+
children: [
|
|
79
|
+
/* @__PURE__ */ a("div", {
|
|
80
|
+
className: e.cell,
|
|
81
|
+
"aria-hidden": "true",
|
|
82
|
+
children: /* @__PURE__ */ a("span", { className: e.indicator })
|
|
83
|
+
}),
|
|
84
|
+
/* @__PURE__ */ a("div", {
|
|
85
|
+
className: e.cell,
|
|
86
|
+
id: `${h}-${t.id}-label`,
|
|
87
|
+
children: t.cells[0]
|
|
88
|
+
}),
|
|
89
|
+
t.cells.slice(1).map((t, n) => /* @__PURE__ */ a("div", {
|
|
90
|
+
role: "cell",
|
|
91
|
+
className: e.cell,
|
|
92
|
+
children: t
|
|
93
|
+
}, n))
|
|
94
|
+
]
|
|
95
|
+
}, t.id);
|
|
96
|
+
})
|
|
97
|
+
})]
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
//#endregion
|
|
101
|
+
export { c as StructuredList };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
var e = {
|
|
4
|
+
list: "_list_t5qxi_2",
|
|
5
|
+
headerRow: "_headerRow_t5qxi_12",
|
|
6
|
+
headerCell: "_headerCell_t5qxi_19",
|
|
7
|
+
body: "_body_t5qxi_28",
|
|
8
|
+
row: "_row_t5qxi_33",
|
|
9
|
+
cell: "_cell_t5qxi_44",
|
|
10
|
+
selectable: "_selectable_t5qxi_52",
|
|
11
|
+
indicator: "_indicator_t5qxi_77"
|
|
12
|
+
};
|
|
13
|
+
//#endregion
|
|
14
|
+
export { e as default };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import e from "./swap.module.js";
|
|
4
|
+
import { useSignal as t, useSignals as n } from "@cascivo/core";
|
|
5
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
6
|
+
//#region ../components/src/swap/swap.tsx
|
|
7
|
+
function a({ on: a, off: o, checked: s = !1, onValueChange: c, onChange: l, mode: u = "rotate", className: d, ...f }) {
|
|
8
|
+
n();
|
|
9
|
+
let p = t(s);
|
|
10
|
+
p.value = s;
|
|
11
|
+
function m() {
|
|
12
|
+
let e = !p.value;
|
|
13
|
+
(c ?? l)?.(e);
|
|
14
|
+
}
|
|
15
|
+
return /* @__PURE__ */ i("button", {
|
|
16
|
+
type: "button",
|
|
17
|
+
role: "switch",
|
|
18
|
+
"aria-checked": p.value,
|
|
19
|
+
className: [e.swap, d].filter(Boolean).join(" "),
|
|
20
|
+
"data-checked": p.value || void 0,
|
|
21
|
+
"data-mode": u,
|
|
22
|
+
onClick: m,
|
|
23
|
+
...f,
|
|
24
|
+
children: [/* @__PURE__ */ r("span", {
|
|
25
|
+
className: e.on,
|
|
26
|
+
"aria-hidden": "true",
|
|
27
|
+
children: a
|
|
28
|
+
}), /* @__PURE__ */ r("span", {
|
|
29
|
+
className: e.off,
|
|
30
|
+
"aria-hidden": "true",
|
|
31
|
+
children: o
|
|
32
|
+
})]
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
//#endregion
|
|
36
|
+
export { a as Swap };
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import e from "./swipe-item.module.js";
|
|
4
|
+
import { cn as t, useDraggable as n, useSignal as r, useSignals as i } from "@cascivo/core";
|
|
5
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
6
|
+
//#region ../components/src/swipe-item/swipe-item.tsx
|
|
7
|
+
var s = 72, c = 100;
|
|
8
|
+
function l({ children: l, leadingActions: u = [], trailingActions: d = [], className: f }) {
|
|
9
|
+
i();
|
|
10
|
+
let p = r(0), m = r("closed"), h = u.length * s, g = d.length * s, { handleRef: _, offset: v, velocity: y, isDragging: b, reset: x } = n({
|
|
11
|
+
axis: "x",
|
|
12
|
+
onDragEnd: (e) => {
|
|
13
|
+
let t = y.value.x, n = p.value + e.x;
|
|
14
|
+
x();
|
|
15
|
+
let r = n + t * c, i = 0;
|
|
16
|
+
h > 0 && r > h / 2 ? i = h : g > 0 && r < -g / 2 && (i = -g), p.value = i, m.value = i > 0 ? "leading" : i < 0 ? "trailing" : "closed";
|
|
17
|
+
}
|
|
18
|
+
}), S = (e) => {
|
|
19
|
+
p.value = e === "leading" ? h : -g, m.value = e;
|
|
20
|
+
}, C = () => {
|
|
21
|
+
p.value = 0, m.value = "closed", x();
|
|
22
|
+
}, w = (e) => {
|
|
23
|
+
e.onSelect(), C();
|
|
24
|
+
}, T = Math.max(-g, Math.min(h, p.value + v.value.x)), E = (n, r) => /* @__PURE__ */ a("div", {
|
|
25
|
+
className: t(e.panel, e[n]),
|
|
26
|
+
children: r.map((t, r) => /* @__PURE__ */ o("button", {
|
|
27
|
+
type: "button",
|
|
28
|
+
"data-destructive": t.destructive ? "" : void 0,
|
|
29
|
+
className: e.action,
|
|
30
|
+
onFocus: () => S(n),
|
|
31
|
+
onClick: () => w(t),
|
|
32
|
+
children: [t.icon && /* @__PURE__ */ a("span", {
|
|
33
|
+
className: e.actionIcon,
|
|
34
|
+
"aria-hidden": "true",
|
|
35
|
+
children: t.icon
|
|
36
|
+
}), /* @__PURE__ */ a("span", {
|
|
37
|
+
className: e.actionLabel,
|
|
38
|
+
children: t.label
|
|
39
|
+
})]
|
|
40
|
+
}, t.id ?? `${r}-${t.label}`))
|
|
41
|
+
});
|
|
42
|
+
return /* @__PURE__ */ o("div", {
|
|
43
|
+
className: t(e.root, f),
|
|
44
|
+
"data-state": m.value,
|
|
45
|
+
onKeyDown: (e) => {
|
|
46
|
+
e.key === "Escape" && m.value !== "closed" && C();
|
|
47
|
+
},
|
|
48
|
+
children: [
|
|
49
|
+
u.length > 0 && E("leading", u),
|
|
50
|
+
d.length > 0 && E("trailing", d),
|
|
51
|
+
/* @__PURE__ */ a("div", {
|
|
52
|
+
ref: _,
|
|
53
|
+
className: e.content,
|
|
54
|
+
"data-dragging": b.value ? "" : void 0,
|
|
55
|
+
style: { transform: `translateX(${T}px)` },
|
|
56
|
+
children: l
|
|
57
|
+
})
|
|
58
|
+
]
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
//#endregion
|
|
62
|
+
export { l as SwipeItem };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
var e = {
|
|
4
|
+
root: "_root_3ykmd_2",
|
|
5
|
+
panel: "_panel_3ykmd_8",
|
|
6
|
+
leading: "_leading_3ykmd_14",
|
|
7
|
+
trailing: "_trailing_3ykmd_18",
|
|
8
|
+
content: "_content_3ykmd_22",
|
|
9
|
+
action: "_action_3ykmd_37",
|
|
10
|
+
actionIcon: "_actionIcon_3ykmd_64",
|
|
11
|
+
actionLabel: "_actionLabel_3ykmd_70"
|
|
12
|
+
};
|
|
13
|
+
//#endregion
|
|
14
|
+
export { e as default };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import e from "./switcher.module.js";
|
|
4
|
+
import { cn as t, getLinkComponent as n, useSignals as r } from "@cascivo/core";
|
|
5
|
+
import { builtin as i, t as a } from "@cascivo/i18n";
|
|
6
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
7
|
+
//#region ../components/src/switcher/switcher.tsx
|
|
8
|
+
function c({ items: c, label: l, className: u }) {
|
|
9
|
+
r();
|
|
10
|
+
let d = n();
|
|
11
|
+
return /* @__PURE__ */ o("ul", {
|
|
12
|
+
"aria-label": l ?? a(i.switcher.label),
|
|
13
|
+
className: t(e.switcher, u),
|
|
14
|
+
children: c.map((t, n) => "divider" in t ? /* @__PURE__ */ o("li", { children: /* @__PURE__ */ o("span", {
|
|
15
|
+
role: "separator",
|
|
16
|
+
"aria-orientation": "horizontal",
|
|
17
|
+
className: e.divider
|
|
18
|
+
}) }, `divider-${n}`) : /* @__PURE__ */ o("li", { children: /* @__PURE__ */ s(d, {
|
|
19
|
+
href: t.href,
|
|
20
|
+
"aria-current": t.active ? "page" : void 0,
|
|
21
|
+
"data-state": t.active ? "active" : void 0,
|
|
22
|
+
className: e.item,
|
|
23
|
+
children: [t.icon && /* @__PURE__ */ o("span", {
|
|
24
|
+
className: e.icon,
|
|
25
|
+
"aria-hidden": "true",
|
|
26
|
+
children: t.icon
|
|
27
|
+
}), t.label]
|
|
28
|
+
}) }, t.href))
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
//#endregion
|
|
32
|
+
export { c as Switcher };
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import e from "./tabs.module.js";
|
|
4
|
+
import { cn as t, useSignal as n, useSignals as r } from "@cascivo/core";
|
|
5
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
6
|
+
import { createContext as a, useId as o, useRef as s } from "react";
|
|
7
|
+
//#region ../components/src/tabs/tabs.tsx
|
|
8
|
+
var c = a(null);
|
|
9
|
+
function l({ defaultValue: r, value: a, onValueChange: s, className: l, children: u }) {
|
|
10
|
+
let d = o(), f = n(a ?? r ?? "");
|
|
11
|
+
a !== void 0 && (f.value = a);
|
|
12
|
+
let p = {
|
|
13
|
+
active: f,
|
|
14
|
+
baseId: d,
|
|
15
|
+
setValue: (e) => {
|
|
16
|
+
a === void 0 && (f.value = e), s?.(e);
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
return /* @__PURE__ */ i(c.Provider, {
|
|
20
|
+
value: p,
|
|
21
|
+
children: /* @__PURE__ */ i("div", {
|
|
22
|
+
className: t(e.tabs, l),
|
|
23
|
+
children: u
|
|
24
|
+
})
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
function u({ className: n, children: r, ...a }) {
|
|
28
|
+
let o = s(null);
|
|
29
|
+
return /* @__PURE__ */ i(c.Consumer, { children: (s) => /* @__PURE__ */ i("div", {
|
|
30
|
+
ref: o,
|
|
31
|
+
role: "tablist",
|
|
32
|
+
className: t(e.list, n),
|
|
33
|
+
onKeyDown: (e) => {
|
|
34
|
+
if (!s || ![
|
|
35
|
+
"ArrowRight",
|
|
36
|
+
"ArrowLeft",
|
|
37
|
+
"Home",
|
|
38
|
+
"End"
|
|
39
|
+
].includes(e.key)) return;
|
|
40
|
+
let t = Array.from(o.current?.querySelectorAll("[role=\"tab\"]:not([disabled])") ?? []);
|
|
41
|
+
if (t.length === 0) return;
|
|
42
|
+
e.preventDefault();
|
|
43
|
+
let n = t.findIndex((e) => e.dataset.value === s.active.value), r = n;
|
|
44
|
+
e.key === "ArrowRight" ? r = (n + 1) % t.length : e.key === "ArrowLeft" ? r = (n - 1 + t.length) % t.length : e.key === "Home" ? r = 0 : e.key === "End" && (r = t.length - 1);
|
|
45
|
+
let i = t[r];
|
|
46
|
+
i?.focus(), i?.dataset.value && s.setValue(i.dataset.value);
|
|
47
|
+
},
|
|
48
|
+
...a,
|
|
49
|
+
children: r
|
|
50
|
+
}) });
|
|
51
|
+
}
|
|
52
|
+
function d(e) {
|
|
53
|
+
return /* @__PURE__ */ i(c.Consumer, { children: (t) => t ? /* @__PURE__ */ i(f, {
|
|
54
|
+
store: t,
|
|
55
|
+
...e
|
|
56
|
+
}) : null });
|
|
57
|
+
}
|
|
58
|
+
function f({ store: n, value: a, className: o, children: s, disabled: c, ...l }) {
|
|
59
|
+
r();
|
|
60
|
+
let u = n.active.value === a;
|
|
61
|
+
return /* @__PURE__ */ i("button", {
|
|
62
|
+
type: "button",
|
|
63
|
+
role: "tab",
|
|
64
|
+
id: `${n.baseId}-trigger-${a}`,
|
|
65
|
+
"aria-selected": u,
|
|
66
|
+
"aria-controls": `${n.baseId}-content-${a}`,
|
|
67
|
+
tabIndex: u ? 0 : -1,
|
|
68
|
+
"data-state": u ? "active" : "inactive",
|
|
69
|
+
"data-value": a,
|
|
70
|
+
disabled: c,
|
|
71
|
+
className: t(e.trigger, o),
|
|
72
|
+
onClick: () => n.setValue(a),
|
|
73
|
+
...l,
|
|
74
|
+
children: s
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
function p(e) {
|
|
78
|
+
return /* @__PURE__ */ i(c.Consumer, { children: (t) => t ? /* @__PURE__ */ i(m, {
|
|
79
|
+
store: t,
|
|
80
|
+
...e
|
|
81
|
+
}) : null });
|
|
82
|
+
}
|
|
83
|
+
function m({ store: n, value: a, className: o, children: s, ...c }) {
|
|
84
|
+
return r(), n.active.value === a ? /* @__PURE__ */ i("div", {
|
|
85
|
+
role: "tabpanel",
|
|
86
|
+
id: `${n.baseId}-content-${a}`,
|
|
87
|
+
"aria-labelledby": `${n.baseId}-trigger-${a}`,
|
|
88
|
+
tabIndex: 0,
|
|
89
|
+
className: t(e.content, o),
|
|
90
|
+
...c,
|
|
91
|
+
children: s
|
|
92
|
+
}) : null;
|
|
93
|
+
}
|
|
94
|
+
//#endregion
|
|
95
|
+
export { l as Tabs, p as TabsContent, u as TabsList, d as TabsTrigger };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import e from "./tag.module.js";
|
|
4
|
+
import { cn as t, useSignals as n } from "@cascivo/core";
|
|
5
|
+
import { builtin as r, t as i } from "@cascivo/i18n";
|
|
6
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
7
|
+
//#region ../components/src/tag/tag.tsx
|
|
8
|
+
function s({ variant: s = "default", size: c = "md", onDismiss: l, dismissLabel: u, className: d, children: f, ...p }) {
|
|
9
|
+
n();
|
|
10
|
+
let m = u ?? i(r.tag.dismiss);
|
|
11
|
+
return /* @__PURE__ */ o("span", {
|
|
12
|
+
"data-variant": s,
|
|
13
|
+
"data-size": c,
|
|
14
|
+
className: t(e.tag, d),
|
|
15
|
+
...p,
|
|
16
|
+
children: [f, l && /* @__PURE__ */ a("button", {
|
|
17
|
+
type: "button",
|
|
18
|
+
className: e.dismiss,
|
|
19
|
+
"aria-label": m,
|
|
20
|
+
onClick: l,
|
|
21
|
+
children: "✕"
|
|
22
|
+
})]
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
//#endregion
|
|
26
|
+
export { s as Tag };
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import e from "./tags-input.module.js";
|
|
4
|
+
import { cn as t, useSignal as n, useSignals as r } from "@cascivo/core";
|
|
5
|
+
import { builtin as i, t as a } from "@cascivo/i18n";
|
|
6
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
7
|
+
import { useRef as c } from "react";
|
|
8
|
+
//#region ../components/src/tags-input/tags-input.tsx
|
|
9
|
+
function l({ value: l, onValueChange: u, placeholder: d, validate: f, max: p, disabled: m = !1, className: h, ...g }) {
|
|
10
|
+
r();
|
|
11
|
+
let _ = n(""), v = c(null);
|
|
12
|
+
function y(e) {
|
|
13
|
+
let t = e.trim();
|
|
14
|
+
t && (p !== void 0 && l.length >= p || l.includes(t) || f && !f(t) || (u([...l, t]), _.value = ""));
|
|
15
|
+
}
|
|
16
|
+
function b(e) {
|
|
17
|
+
u(l.filter((t, n) => n !== e));
|
|
18
|
+
}
|
|
19
|
+
let x = d ?? a(i.tagsInput.placeholder);
|
|
20
|
+
return /* @__PURE__ */ s("div", {
|
|
21
|
+
className: t(e.wrapper, h),
|
|
22
|
+
"data-disabled": m ? "" : void 0,
|
|
23
|
+
onClick: () => v.current?.focus(),
|
|
24
|
+
...g,
|
|
25
|
+
children: [l.map((t, n) => {
|
|
26
|
+
let r = f ? !f(t) : !1;
|
|
27
|
+
return /* @__PURE__ */ s("span", {
|
|
28
|
+
className: e.tag,
|
|
29
|
+
"data-state": r ? "invalid" : void 0,
|
|
30
|
+
children: [t, /* @__PURE__ */ o("button", {
|
|
31
|
+
type: "button",
|
|
32
|
+
className: e.dismiss,
|
|
33
|
+
"aria-label": a(i.tagsInput.remove, { tag: t }),
|
|
34
|
+
disabled: m,
|
|
35
|
+
onClick: (e) => {
|
|
36
|
+
e.stopPropagation(), b(n);
|
|
37
|
+
},
|
|
38
|
+
children: /* @__PURE__ */ o("span", {
|
|
39
|
+
"aria-hidden": "true",
|
|
40
|
+
children: "×"
|
|
41
|
+
})
|
|
42
|
+
})]
|
|
43
|
+
}, n);
|
|
44
|
+
}), /* @__PURE__ */ o("input", {
|
|
45
|
+
ref: v,
|
|
46
|
+
className: e.input,
|
|
47
|
+
value: _.value,
|
|
48
|
+
"aria-label": a(i.tagsInput.label),
|
|
49
|
+
placeholder: l.length === 0 ? x : void 0,
|
|
50
|
+
disabled: m,
|
|
51
|
+
onChange: (e) => {
|
|
52
|
+
_.value = e.currentTarget.value;
|
|
53
|
+
},
|
|
54
|
+
onKeyDown: (e) => {
|
|
55
|
+
e.key === "Enter" || e.key === "," ? (e.preventDefault(), y(_.value)) : e.key === "Backspace" && !_.value && b(l.length - 1);
|
|
56
|
+
},
|
|
57
|
+
onBlur: () => {
|
|
58
|
+
_.value && y(_.value);
|
|
59
|
+
}
|
|
60
|
+
})]
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
//#endregion
|
|
64
|
+
export { l as TagsInput };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import e from "./text.module.js";
|
|
4
|
+
import { cn as t } from "@cascivo/core";
|
|
5
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
6
|
+
//#region ../components/src/text/text.tsx
|
|
7
|
+
function r({ as: r = "p", size: i = "md", weight: a = "normal", muted: o = !1, className: s, children: c, ...l }) {
|
|
8
|
+
return /* @__PURE__ */ n(r, {
|
|
9
|
+
"data-size": i,
|
|
10
|
+
"data-weight": a,
|
|
11
|
+
"data-muted": o ? "" : void 0,
|
|
12
|
+
className: t(e.text, s),
|
|
13
|
+
...l,
|
|
14
|
+
children: c
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
//#endregion
|
|
18
|
+
export { r as Text };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import e from "./textarea.module.js";
|
|
4
|
+
import { cn as t, createMachine as n, useMachine as r } from "@cascivo/core";
|
|
5
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
6
|
+
//#region ../components/src/textarea/textarea.tsx
|
|
7
|
+
var o = n({
|
|
8
|
+
initial: "idle",
|
|
9
|
+
states: {
|
|
10
|
+
idle: { on: { FOCUS: "focused" } },
|
|
11
|
+
focused: { on: { BLUR: "idle" } }
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
function s({ label: n, hint: s, error: c, resize: l = "vertical", rows: u = 4, className: d, id: f, onFocus: p, onBlur: m, ...h }) {
|
|
15
|
+
let [g, _] = r(o), v = f ?? (n ? `cascade-textarea-${n.toLowerCase().replace(/\s+/g, "-")}` : void 0);
|
|
16
|
+
return /* @__PURE__ */ a("div", {
|
|
17
|
+
className: t(e.wrapper, d),
|
|
18
|
+
"data-state": c ? "error" : g.value,
|
|
19
|
+
"data-resize": l,
|
|
20
|
+
children: [
|
|
21
|
+
n && /* @__PURE__ */ i("label", {
|
|
22
|
+
className: e.label,
|
|
23
|
+
htmlFor: v,
|
|
24
|
+
children: n
|
|
25
|
+
}),
|
|
26
|
+
/* @__PURE__ */ i("textarea", {
|
|
27
|
+
id: v,
|
|
28
|
+
rows: u,
|
|
29
|
+
"aria-multiline": "true",
|
|
30
|
+
className: e.textarea,
|
|
31
|
+
"aria-invalid": c ? !0 : void 0,
|
|
32
|
+
"aria-describedby": c ? `${v}-error` : s ? `${v}-hint` : void 0,
|
|
33
|
+
onFocus: (e) => {
|
|
34
|
+
_("FOCUS"), p?.(e);
|
|
35
|
+
},
|
|
36
|
+
onBlur: (e) => {
|
|
37
|
+
_("BLUR"), m?.(e);
|
|
38
|
+
},
|
|
39
|
+
...h
|
|
40
|
+
}),
|
|
41
|
+
c && /* @__PURE__ */ i("span", {
|
|
42
|
+
id: `${v}-error`,
|
|
43
|
+
className: e.error,
|
|
44
|
+
role: "alert",
|
|
45
|
+
children: c
|
|
46
|
+
}),
|
|
47
|
+
!c && s && /* @__PURE__ */ i("span", {
|
|
48
|
+
id: `${v}-hint`,
|
|
49
|
+
className: e.hint,
|
|
50
|
+
children: s
|
|
51
|
+
})
|
|
52
|
+
]
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
//#endregion
|
|
56
|
+
export { s as Textarea };
|