@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
|
@@ -2,30 +2,30 @@
|
|
|
2
2
|
|
|
3
3
|
import e from "./structured-list.module.js";
|
|
4
4
|
import { cn as t, useControllableSignal as n, useRovingFocus as r, useSignals as i } from "@cascivo/core";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { useId as a } from "react";
|
|
6
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
7
7
|
//#region ../components/src/structured-list/structured-list.tsx
|
|
8
8
|
function c(n) {
|
|
9
|
-
let { items: r, headers: i, selectable:
|
|
10
|
-
return
|
|
9
|
+
let { items: r, headers: i, selectable: a = !1, className: c, ariaLabel: u, "aria-label": d } = n;
|
|
10
|
+
return a ? /* @__PURE__ */ o(l, { ...n }) : /* @__PURE__ */ s("div", {
|
|
11
11
|
role: "table",
|
|
12
|
-
"aria-label": u,
|
|
12
|
+
"aria-label": d ?? u,
|
|
13
13
|
className: t(e.list, c),
|
|
14
|
-
children: [i && /* @__PURE__ */
|
|
14
|
+
children: [i && /* @__PURE__ */ o("div", {
|
|
15
15
|
role: "row",
|
|
16
16
|
className: e.headerRow,
|
|
17
|
-
children: i.map((t, n) => /* @__PURE__ */
|
|
17
|
+
children: i.map((t, n) => /* @__PURE__ */ o("div", {
|
|
18
18
|
role: "columnheader",
|
|
19
19
|
className: e.headerCell,
|
|
20
20
|
children: t
|
|
21
21
|
}, n))
|
|
22
|
-
}), /* @__PURE__ */
|
|
22
|
+
}), /* @__PURE__ */ o("div", {
|
|
23
23
|
role: "rowgroup",
|
|
24
24
|
className: e.body,
|
|
25
|
-
children: r.map((t) => /* @__PURE__ */
|
|
25
|
+
children: r.map((t) => /* @__PURE__ */ o("div", {
|
|
26
26
|
role: "row",
|
|
27
27
|
className: e.row,
|
|
28
|
-
children: t.cells.map((t, n) => /* @__PURE__ */
|
|
28
|
+
children: t.cells.map((t, n) => /* @__PURE__ */ o("div", {
|
|
29
29
|
role: "cell",
|
|
30
30
|
className: e.cell,
|
|
31
31
|
children: t
|
|
@@ -34,59 +34,60 @@ function c(n) {
|
|
|
34
34
|
})]
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
|
-
function l({ items: c, headers: l, value: u, defaultValue: d, onSelect: f, className: p, "aria-label":
|
|
37
|
+
function l({ items: c, headers: l, value: u, defaultValue: d, onSelect: f, className: p, ariaLabel: m, "aria-label": h }) {
|
|
38
|
+
let g = h ?? m;
|
|
38
39
|
i();
|
|
39
|
-
let
|
|
40
|
+
let _ = a(), [v, y] = n({
|
|
40
41
|
value: u,
|
|
41
42
|
defaultValue: d ?? c.find((e) => e.selected)?.id ?? "",
|
|
42
43
|
onChange: f
|
|
43
|
-
}),
|
|
44
|
+
}), b = r({
|
|
44
45
|
orientation: "vertical",
|
|
45
46
|
loop: !1
|
|
46
|
-
}),
|
|
47
|
-
|
|
47
|
+
}), x = (e) => {
|
|
48
|
+
y(e);
|
|
48
49
|
};
|
|
49
|
-
return /* @__PURE__ */
|
|
50
|
+
return /* @__PURE__ */ s("div", {
|
|
50
51
|
role: "radiogroup",
|
|
51
|
-
"aria-label":
|
|
52
|
+
"aria-label": g,
|
|
52
53
|
className: t(e.list, e.selectable, p),
|
|
53
|
-
children: [l && /* @__PURE__ */
|
|
54
|
+
children: [l && /* @__PURE__ */ s("div", {
|
|
54
55
|
className: e.headerRow,
|
|
55
|
-
children: [/* @__PURE__ */
|
|
56
|
+
children: [/* @__PURE__ */ o("div", {
|
|
56
57
|
className: e.headerCell,
|
|
57
58
|
"aria-hidden": "true"
|
|
58
|
-
}), l.map((t, n) => /* @__PURE__ */
|
|
59
|
+
}), l.map((t, n) => /* @__PURE__ */ o("div", {
|
|
59
60
|
className: e.headerCell,
|
|
60
61
|
children: t
|
|
61
62
|
}, n))]
|
|
62
|
-
}), /* @__PURE__ */
|
|
63
|
+
}), /* @__PURE__ */ o("div", {
|
|
63
64
|
className: e.body,
|
|
64
65
|
children: c.map((t, n) => {
|
|
65
|
-
let r =
|
|
66
|
-
return /* @__PURE__ */
|
|
66
|
+
let r = v.value === t.id, { ref: i, ...a } = b.getItemProps(n);
|
|
67
|
+
return /* @__PURE__ */ s("div", {
|
|
67
68
|
role: "radio",
|
|
68
69
|
"aria-checked": r,
|
|
69
|
-
"aria-labelledby": `${
|
|
70
|
+
"aria-labelledby": `${_}-${t.id}-label`,
|
|
70
71
|
"data-selected": r || void 0,
|
|
71
72
|
className: e.row,
|
|
72
73
|
ref: i,
|
|
73
|
-
...
|
|
74
|
-
onClick: () =>
|
|
74
|
+
...a,
|
|
75
|
+
onClick: () => x(t.id),
|
|
75
76
|
onKeyDown: (e) => {
|
|
76
|
-
|
|
77
|
+
a.onKeyDown(e), (e.key === "Enter" || e.key === " ") && (e.preventDefault(), x(t.id));
|
|
77
78
|
},
|
|
78
79
|
children: [
|
|
79
|
-
/* @__PURE__ */
|
|
80
|
+
/* @__PURE__ */ o("div", {
|
|
80
81
|
className: e.cell,
|
|
81
82
|
"aria-hidden": "true",
|
|
82
|
-
children: /* @__PURE__ */
|
|
83
|
+
children: /* @__PURE__ */ o("span", { className: e.indicator })
|
|
83
84
|
}),
|
|
84
|
-
/* @__PURE__ */
|
|
85
|
+
/* @__PURE__ */ o("div", {
|
|
85
86
|
className: e.cell,
|
|
86
|
-
id: `${
|
|
87
|
+
id: `${_}-${t.id}-label`,
|
|
87
88
|
children: t.cells[0]
|
|
88
89
|
}),
|
|
89
|
-
t.cells.slice(1).map((t, n) => /* @__PURE__ */
|
|
90
|
+
t.cells.slice(1).map((t, n) => /* @__PURE__ */ o("div", {
|
|
90
91
|
role: "cell",
|
|
91
92
|
className: e.cell,
|
|
92
93
|
children: t
|