@cascivo/react 0.17.1 → 1.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.
Files changed (101) hide show
  1. package/README.md +4 -3
  2. package/dist/action-sheet/action-sheet.js +1 -1
  3. package/dist/breadcrumb/breadcrumb.js +7 -7
  4. package/dist/checkbox/checkbox.js +11 -10
  5. package/dist/color-picker/color-picker.js +81 -77
  6. package/dist/combobox/combobox.js +81 -76
  7. package/dist/command-menu/command-menu.js +104 -104
  8. package/dist/comparison/comparison.js +18 -18
  9. package/dist/data-table/data-table.css +1 -1
  10. package/dist/data-table/data-table.js +148 -121
  11. package/dist/data-table/data-table.module.js +29 -29
  12. package/dist/date-picker/date-picker.js +98 -93
  13. package/dist/date-range-picker/date-range-picker.js +1 -1
  14. package/dist/dock/dock.js +2 -2
  15. package/dist/dropdown/dropdown.js +43 -40
  16. package/dist/editable/editable.js +29 -20
  17. package/dist/fab/fab.js +37 -37
  18. package/dist/field/field.js +24 -17
  19. package/dist/file-uploader/file-uploader.js +24 -23
  20. package/dist/filter/filter.js +11 -11
  21. package/dist/index.d.ts +1302 -85
  22. package/dist/input/input.js +14 -13
  23. package/dist/navigation-menu/navigation-menu.js +9 -9
  24. package/dist/node/action-sheet/action-sheet.js +1 -1
  25. package/dist/node/breadcrumb/breadcrumb.js +7 -7
  26. package/dist/node/checkbox/checkbox.js +11 -10
  27. package/dist/node/color-picker/color-picker.js +81 -77
  28. package/dist/node/combobox/combobox.js +81 -76
  29. package/dist/node/command-menu/command-menu.js +104 -104
  30. package/dist/node/comparison/comparison.js +18 -18
  31. package/dist/node/data-table/data-table.js +148 -121
  32. package/dist/node/data-table/data-table.module.js +29 -29
  33. package/dist/node/date-picker/date-picker.js +98 -93
  34. package/dist/node/date-range-picker/date-range-picker.js +1 -1
  35. package/dist/node/dock/dock.js +2 -2
  36. package/dist/node/dropdown/dropdown.js +43 -40
  37. package/dist/node/editable/editable.js +29 -20
  38. package/dist/node/fab/fab.js +37 -37
  39. package/dist/node/field/field.js +24 -17
  40. package/dist/node/file-uploader/file-uploader.js +24 -23
  41. package/dist/node/filter/filter.js +11 -11
  42. package/dist/node/input/input.js +14 -13
  43. package/dist/node/navigation-menu/navigation-menu.js +9 -9
  44. package/dist/node/number-input/number-input.js +28 -27
  45. package/dist/node/overflow-menu/overflow-menu.js +7 -7
  46. package/dist/node/progress/progress.js +3 -3
  47. package/dist/node/progress-circle/progress-circle.js +8 -8
  48. package/dist/node/progress-indicator/progress-indicator.js +1 -1
  49. package/dist/node/qr-code/qr-code.js +11 -11
  50. package/dist/node/radial-progress/radial-progress.js +9 -9
  51. package/dist/node/radio/radio.js +10 -9
  52. package/dist/node/react/src/index.js +93 -93
  53. package/dist/node/resizable/resizable.js +24 -24
  54. package/dist/node/search/search.js +35 -31
  55. package/dist/node/select/select.js +15 -14
  56. package/dist/node/side-nav/side-nav.js +35 -35
  57. package/dist/node/side-nav/side-nav.module.js +27 -27
  58. package/dist/node/slider/slider.js +13 -12
  59. package/dist/node/spinner/spinner.js +4 -4
  60. package/dist/node/steps/steps.js +10 -10
  61. package/dist/node/structured-list/structured-list.js +14 -14
  62. package/dist/node/swap/swap.js +5 -5
  63. package/dist/node/switcher/switcher.js +5 -5
  64. package/dist/node/tags-input/tags-input.js +20 -16
  65. package/dist/node/textarea/textarea.js +14 -13
  66. package/dist/node/time-picker/time-picker.js +21 -20
  67. package/dist/node/toggle/toggle.js +8 -7
  68. package/dist/node/tree-view/tree-view.js +43 -43
  69. package/dist/node/virtual-list/virtual-list.js +10 -10
  70. package/dist/node/wheel-picker/wheel-picker.js +36 -36
  71. package/dist/number-input/number-input.js +28 -27
  72. package/dist/overflow-menu/overflow-menu.js +7 -7
  73. package/dist/progress/progress.js +3 -3
  74. package/dist/progress-circle/progress-circle.js +8 -8
  75. package/dist/progress-indicator/progress-indicator.js +1 -1
  76. package/dist/qr-code/qr-code.js +11 -11
  77. package/dist/radial-progress/radial-progress.js +9 -9
  78. package/dist/radio/radio.js +10 -9
  79. package/dist/react/src/index.js +93 -93
  80. package/dist/resizable/resizable.js +24 -24
  81. package/dist/search/search.js +35 -31
  82. package/dist/select/select.js +15 -14
  83. package/dist/side-nav/side-nav.css +1 -1
  84. package/dist/side-nav/side-nav.js +35 -35
  85. package/dist/side-nav/side-nav.module.js +27 -27
  86. package/dist/slider/slider.js +13 -12
  87. package/dist/spinner/spinner.js +4 -4
  88. package/dist/steps/steps.js +10 -10
  89. package/dist/structured-list/structured-list.js +14 -14
  90. package/dist/styles.css +2 -2
  91. package/dist/swap/swap.js +5 -5
  92. package/dist/switcher/switcher.js +5 -5
  93. package/dist/tags-input/tags-input.js +20 -16
  94. package/dist/textarea/textarea.js +14 -13
  95. package/dist/time-picker/time-picker.js +21 -20
  96. package/dist/toggle/toggle.js +8 -7
  97. package/dist/tree-view/tree-view.js +43 -43
  98. package/dist/virtual-list/virtual-list.js +10 -10
  99. package/dist/wheel-picker/wheel-picker.js +36 -36
  100. package/package.json +4 -4
  101. package/readme.body.md +4 -3
@@ -7,31 +7,31 @@ import { builtin as i, t as a } from "@cascivo/i18n";
7
7
  import { jsx as o, jsxs as s } from "react/jsx-runtime";
8
8
  //#region ../components/src/qr-code/qr-code.tsx
9
9
  var c = 4;
10
- function l({ value: l, size: u = 128, errorCorrection: d = "M", radius: f, fill: p = "currentColor", background: m = "transparent", label: h, className: g, style: _, ...v }) {
10
+ function l({ value: l, size: u = 128, errorCorrection: d = "M", radius: f, fill: p = "currentColor", background: m = "transparent", label: h, ariaLabel: g, className: _, style: v, ...y }) {
11
11
  if (r(), !l) return null;
12
- let y = e(l, d), b = y.length + c * 2, x = "";
13
- for (let e = 0; e < y.length; e++) for (let t = 0; t < y.length; t++) y[e][t] && (x += `M${t + c},${e + c}h1v1h-1z`);
12
+ let b = e(l, d), x = b.length + c * 2, S = "";
13
+ for (let e = 0; e < b.length; e++) for (let t = 0; t < b.length; t++) b[e][t] && (S += `M${t + c},${e + c}h1v1h-1z`);
14
14
  return /* @__PURE__ */ o("div", {
15
- className: n(t.qrCode, g),
15
+ className: n(t.qrCode, _),
16
16
  style: {
17
17
  inlineSize: u,
18
18
  blockSize: u,
19
19
  borderRadius: f,
20
- ..._
20
+ ...v
21
21
  },
22
- ...v,
22
+ ...y,
23
23
  children: /* @__PURE__ */ s("svg", {
24
24
  className: t.svg,
25
25
  role: "img",
26
- "aria-label": h ?? a(i.qrCode.label),
27
- viewBox: `0 0 ${b} ${b}`,
26
+ "aria-label": g ?? h ?? a(i.qrCode.label),
27
+ viewBox: `0 0 ${x} ${x}`,
28
28
  shapeRendering: "crispEdges",
29
29
  children: [/* @__PURE__ */ o("rect", {
30
- width: b,
31
- height: b,
30
+ width: x,
31
+ height: x,
32
32
  fill: m
33
33
  }), /* @__PURE__ */ o("path", {
34
- d: x,
34
+ d: S,
35
35
  fill: p
36
36
  })]
37
37
  })
@@ -2,24 +2,24 @@ import e from "./radial-progress.module.js";
2
2
  import { useId as t } from "react";
3
3
  import { jsx as n } from "react/jsx-runtime";
4
4
  //#region ../components/src/radial-progress/radial-progress.tsx
5
- function r({ value: r, size: i = "md", variant: a = "primary", children: o, className: s, ariaLabel: c, ...l }) {
6
- let u = Math.min(100, Math.max(0, r)), d = t();
5
+ function r({ value: r, size: i = "md", variant: a = "primary", children: o, className: s, ariaLabel: c, label: l, ...u }) {
6
+ let d = Math.min(100, Math.max(0, r)), f = t(), p = c ?? l;
7
7
  return /* @__PURE__ */ n("div", {
8
8
  role: "progressbar",
9
- "aria-valuenow": u,
9
+ "aria-valuenow": d,
10
10
  "aria-valuemin": 0,
11
11
  "aria-valuemax": 100,
12
- "aria-labelledby": c ?? l["aria-label"] ? void 0 : d,
12
+ "aria-labelledby": p ?? u["aria-label"] ? void 0 : f,
13
13
  className: [e.radialProgress, s].filter(Boolean).join(" "),
14
14
  "data-size": i,
15
15
  "data-variant": a,
16
- style: { "--cascivo-radial-progress": u },
17
- ...l,
18
- ...c === void 0 ? {} : { "aria-label": c },
16
+ style: { "--cascivo-radial-progress": d },
17
+ ...u,
18
+ ...p === void 0 ? {} : { "aria-label": p },
19
19
  children: /* @__PURE__ */ n("span", {
20
- id: d,
20
+ id: f,
21
21
  className: e.label,
22
- children: o ?? `${u}%`
22
+ children: o ?? `${d}%`
23
23
  })
24
24
  });
25
25
  }
@@ -3,20 +3,21 @@ import { cn as t } from "@cascivo/core/pure";
3
3
  import { Children as n, cloneElement as r, forwardRef as i, isValidElement as a } from "react";
4
4
  import { jsx as o, jsxs as s } from "react/jsx-runtime";
5
5
  //#region ../components/src/radio/radio.tsx
6
- var c = i(function({ label: n, className: r, id: i, disabled: a, value: c, ...l }, u) {
7
- let d = i ?? (n ? `cascade-radio-${c}` : void 0);
6
+ var c = i(function({ label: n, ariaLabel: r, className: i, id: a, disabled: c, value: l, ...u }, d) {
7
+ let f = a ?? (n ? `cascade-radio-${l}` : void 0);
8
8
  return /* @__PURE__ */ s("label", {
9
- className: t(e.wrapper, r),
10
- "data-disabled": a || void 0,
9
+ className: t(e.wrapper, i),
10
+ "data-disabled": c || void 0,
11
11
  children: [
12
12
  /* @__PURE__ */ o("input", {
13
- id: d,
13
+ id: f,
14
14
  type: "radio",
15
- value: c,
15
+ value: l,
16
16
  className: e.input,
17
- disabled: a,
18
- ref: u,
19
- ...l
17
+ disabled: c,
18
+ ref: d,
19
+ ...u,
20
+ "aria-label": u["aria-label"] ?? r
20
21
  }),
21
22
  /* @__PURE__ */ o("span", {
22
23
  className: e.control,
@@ -1,96 +1,96 @@
1
- import { Spinner as e } from "../../spinner/spinner.js";
2
- import { Button as t } from "../../button/button.js";
3
- import { Input as n } from "../../input/input.js";
4
- import { Card as r, CardContent as i, CardFooter as a, CardHeader as o, CardTitle as s } from "../../card/card.js";
5
- import { Badge as c } from "../../badge/badge.js";
6
- import { Modal as l } from "../../modal/modal.js";
7
- import { Separator as u } from "../../separator/separator.js";
8
- import { Alert as d } from "../../alert/alert.js";
9
- import { Avatar as f } from "../../avatar/avatar.js";
10
- import { AvatarGroup as p } from "../../avatar-group/avatar-group.js";
11
- import { User as m } from "../../user/user.js";
12
- import { Image as h } from "../../image/image.js";
13
- import { Textarea as g } from "../../textarea/textarea.js";
14
- import { Select as _ } from "../../select/select.js";
15
- import { Checkbox as v } from "../../checkbox/checkbox.js";
16
- import { Radio as y, RadioGroup as b } from "../../radio/radio.js";
17
- import { Toggle as x } from "../../toggle/toggle.js";
18
- import { Slider as S } from "../../slider/slider.js";
19
- import { Tooltip as C } from "../../tooltip/tooltip.js";
20
- import { Dropdown as w } from "../../dropdown/dropdown.js";
21
- import { ToastProvider as T, dismissAllToasts as E, useToast as D } from "../../toast/toast.js";
22
- import { Tabs as O, TabsContent as k, TabsList as A, TabsTrigger as j } from "../../tabs/tabs.js";
23
- import { Accordion as M, AccordionContent as N, AccordionItem as P, AccordionTrigger as F } from "../../accordion/accordion.js";
24
- import { ActionSheet as I } from "../../action-sheet/action-sheet.js";
25
- import { Kbd as L } from "../../kbd/kbd.js";
26
- import { Link as R } from "../../link/link.js";
27
- import { Breadcrumb as z } from "../../breadcrumb/breadcrumb.js";
28
- import { Toc as B } from "../../toc/toc.js";
29
- import { useTocFromRegion as V } from "../../toc/use-toc-from-region.js";
30
- import { Header as H } from "../../header/header.js";
31
- import { usePopover as U } from "../../popover/use-popover.js";
32
- import { SideNav as W } from "../../side-nav/side-nav.js";
33
- import { Pagination as G } from "../../pagination/pagination.js";
34
- import { ProgressIndicator as K } from "../../progress-indicator/progress-indicator.js";
35
- import { Tag as q } from "../../tag/tag.js";
36
- import { Skeleton as J } from "../../skeleton/skeleton.js";
37
- import { ProgressBar as Y } from "../../progress-bar/progress-bar.js";
38
- import { EmptyState as X } from "../../empty-state/empty-state.js";
39
- import { Fab as Z } from "../../fab/fab.js";
40
- import { OverflowMenu as Q } from "../../overflow-menu/overflow-menu.js";
41
- import { Search as $ } from "../../search/search.js";
42
- import { NumberInput as ee } from "../../number-input/number-input.js";
43
- import { DataTable as te } from "../../data-table/data-table.js";
44
- import { CommandMenu as ne, fuzzyMatch as re, fuzzyScore as ie } from "../../command-menu/command-menu.js";
45
- import { Form as ae, createForm as oe, useForm as se } from "../../form/form.js";
46
- import { Combobox as ce } from "../../combobox/combobox.js";
47
- import { DatePicker as le } from "../../date-picker/date-picker.js";
48
- import { FileUploader as ue } from "../../file-uploader/file-uploader.js";
49
- import { TimePicker as de } from "../../time-picker/time-picker.js";
50
- import { Popover as fe, PopoverContent as pe, PopoverTrigger as me } from "../../popover/popover.js";
51
- import { Menu as he, MenuItem as ge, MenuSeparator as _e, MenuTrigger as ve } from "../../menu/menu.js";
52
- import { AlertDialog as ye } from "../../alert-dialog/alert-dialog.js";
53
- import { Sheet as be } from "../../sheet/sheet.js";
54
- import { BottomSheet as xe } from "../../bottom-sheet/bottom-sheet.js";
55
- import { ContextMenu as Se, ContextMenuItem as Ce } from "../../context-menu/context-menu.js";
56
- import { Comparison as we } from "../../comparison/comparison.js";
57
- import { HoverCard as Te, HoverCardContent as Ee, HoverCardTrigger as De } from "../../hover-card/hover-card.js";
58
- import { PasswordInput as Oe } from "../../password-input/password-input.js";
59
- import { MultiSelect as ke } from "../../multi-select/multi-select.js";
60
- import { TagsInput as Ae } from "../../tags-input/tags-input.js";
61
- import { OtpInput as je } from "../../otp-input/otp-input.js";
62
- import { SegmentedControl as Me } from "../../segmented-control/segmented-control.js";
63
- import { InputGroup as Ne, InputGroupAddon as Pe } from "../../input-group/input-group.js";
64
- import { RatingGroup as Fe } from "../../rating-group/rating-group.js";
65
- import { Editable as Ie } from "../../editable/editable.js";
66
- import { RadioCard as Le, RadioCardGroup as Re } from "../../radio-card/radio-card.js";
67
- import { ShellHeader as ze } from "../../shell-header/shell-header.js";
68
- import { HeaderPanel as Be } from "../../header-panel/header-panel.js";
69
- import { Switcher as Ve } from "../../switcher/switcher.js";
70
- import { CheckboxCard as He } from "../../checkbox-card/checkbox-card.js";
71
- import { CopyButton as Ue } from "../../copy-button/copy-button.js";
72
- import { Stat as We } from "../../stat/stat.js";
73
- import { Status as Ge } from "../../status/status.js";
1
+ import { Spinner as ee } from "../../spinner/spinner.js";
2
+ import { Button as te } from "../../button/button.js";
3
+ import { Input as e } from "../../input/input.js";
4
+ import { Card as t, CardContent as n, CardFooter as r, CardHeader as i, CardTitle as a } from "../../card/card.js";
5
+ import { Badge as o } from "../../badge/badge.js";
6
+ import { Modal as s } from "../../modal/modal.js";
7
+ import { Separator as c } from "../../separator/separator.js";
8
+ import { Alert as l } from "../../alert/alert.js";
9
+ import { Avatar as u } from "../../avatar/avatar.js";
10
+ import { AvatarGroup as d } from "../../avatar-group/avatar-group.js";
11
+ import { User as f } from "../../user/user.js";
12
+ import { Image as p } from "../../image/image.js";
13
+ import { Textarea as m } from "../../textarea/textarea.js";
14
+ import { Select as h } from "../../select/select.js";
15
+ import { Checkbox as g } from "../../checkbox/checkbox.js";
16
+ import { Radio as _, RadioGroup as v } from "../../radio/radio.js";
17
+ import { Toggle as y } from "../../toggle/toggle.js";
18
+ import { Slider as b } from "../../slider/slider.js";
19
+ import { Tooltip as x } from "../../tooltip/tooltip.js";
20
+ import { Dropdown as S } from "../../dropdown/dropdown.js";
21
+ import { ToastProvider as C, dismissAllToasts as w, useToast as T } from "../../toast/toast.js";
22
+ import { Tabs as E, TabsContent as D, TabsList as O, TabsTrigger as k } from "../../tabs/tabs.js";
23
+ import { Accordion as A, AccordionContent as j, AccordionItem as M, AccordionTrigger as N } from "../../accordion/accordion.js";
24
+ import { ActionSheet as P } from "../../action-sheet/action-sheet.js";
25
+ import { Kbd as F } from "../../kbd/kbd.js";
26
+ import { Link as I } from "../../link/link.js";
27
+ import { Breadcrumb as L } from "../../breadcrumb/breadcrumb.js";
28
+ import { Toc as R } from "../../toc/toc.js";
29
+ import { useTocFromRegion as z } from "../../toc/use-toc-from-region.js";
30
+ import { Header as B } from "../../header/header.js";
31
+ import { usePopover as V } from "../../popover/use-popover.js";
32
+ import { SideNav as H } from "../../side-nav/side-nav.js";
33
+ import { Pagination as U } from "../../pagination/pagination.js";
34
+ import { ProgressIndicator as W } from "../../progress-indicator/progress-indicator.js";
35
+ import { Tag as G } from "../../tag/tag.js";
36
+ import { Skeleton as K } from "../../skeleton/skeleton.js";
37
+ import { ProgressBar as q } from "../../progress-bar/progress-bar.js";
38
+ import { EmptyState as J } from "../../empty-state/empty-state.js";
39
+ import { Fab as Y } from "../../fab/fab.js";
40
+ import { OverflowMenu as X } from "../../overflow-menu/overflow-menu.js";
41
+ import { Search as Z } from "../../search/search.js";
42
+ import { NumberInput as Q } from "../../number-input/number-input.js";
43
+ import { DataTable as ne } from "../../data-table/data-table.js";
44
+ import { CommandMenu as re, fuzzyMatch as ie, fuzzyScore as ae } from "../../command-menu/command-menu.js";
45
+ import { Form as oe, createForm as se, useForm as ce } from "../../form/form.js";
46
+ import { Combobox as le } from "../../combobox/combobox.js";
47
+ import { DatePicker as ue } from "../../date-picker/date-picker.js";
48
+ import { FileUploader as de } from "../../file-uploader/file-uploader.js";
49
+ import { TimePicker as fe } from "../../time-picker/time-picker.js";
50
+ import { Popover as pe, PopoverContent as me, PopoverTrigger as he } from "../../popover/popover.js";
51
+ import { Menu as ge, MenuItem as _e, MenuSeparator as ve, MenuTrigger as ye } from "../../menu/menu.js";
52
+ import { AlertDialog as be } from "../../alert-dialog/alert-dialog.js";
53
+ import { Sheet as xe } from "../../sheet/sheet.js";
54
+ import { BottomSheet as Se } from "../../bottom-sheet/bottom-sheet.js";
55
+ import { ContextMenu as Ce, ContextMenuItem as we } from "../../context-menu/context-menu.js";
56
+ import { Comparison as Te } from "../../comparison/comparison.js";
57
+ import { HoverCard as Ee, HoverCardContent as De, HoverCardTrigger as Oe } from "../../hover-card/hover-card.js";
58
+ import { PasswordInput as ke } from "../../password-input/password-input.js";
59
+ import { MultiSelect as Ae } from "../../multi-select/multi-select.js";
60
+ import { TagsInput as je } from "../../tags-input/tags-input.js";
61
+ import { OtpInput as Me } from "../../otp-input/otp-input.js";
62
+ import { SegmentedControl as Ne } from "../../segmented-control/segmented-control.js";
63
+ import { InputGroup as Pe, InputGroupAddon as Fe } from "../../input-group/input-group.js";
64
+ import { RatingGroup as Ie } from "../../rating-group/rating-group.js";
65
+ import { Editable as Le } from "../../editable/editable.js";
66
+ import { RadioCard as Re, RadioCardGroup as ze } from "../../radio-card/radio-card.js";
67
+ import { ShellHeader as Be } from "../../shell-header/shell-header.js";
68
+ import { HeaderPanel as Ve } from "../../header-panel/header-panel.js";
69
+ import { Switcher as He } from "../../switcher/switcher.js";
70
+ import { CheckboxCard as Ue } from "../../checkbox-card/checkbox-card.js";
71
+ import { CopyButton as We } from "../../copy-button/copy-button.js";
72
+ import { Stat as Ge } from "../../stat/stat.js";
73
+ import { Status as Ke } from "../../status/status.js";
74
74
  import "../../visually-hidden/visually-hidden.js";
75
- import { SkipNavLink as Ke, SkipNavTarget as qe } from "../../skip-nav/skip-nav.js";
76
- import { Progress as Je } from "../../progress/progress.js";
77
- import { ProgressCircle as Ye } from "../../progress-circle/progress-circle.js";
78
- import { Heading as Xe } from "../../heading/heading.js";
79
- import { Text as Ze } from "../../text/text.js";
80
- import { Code as Qe } from "../../code/code.js";
81
- import { Blockquote as $e } from "../../blockquote/blockquote.js";
82
- import { List as et, ListItem as tt } from "../../list/list.js";
83
- import { LogViewer as nt } from "../../log-viewer/log-viewer.js";
84
- import { Prose as rt } from "../../prose/prose.js";
85
- import { PullToRefresh as it } from "../../pull-to-refresh/pull-to-refresh.js";
86
- import { QrCode as at } from "../../qr-code/qr-code.js";
87
- import { RelativeTime as ot } from "../../relative-time/relative-time.js";
88
- import { Label as st } from "../../label/label.js";
89
- import { Field as ct } from "../../field/field.js";
90
- import { Filter as lt } from "../../filter/filter.js";
91
- import { IconButton as ut } from "../../icon-button/icon-button.js";
92
- import { ButtonGroup as dt } from "../../button-group/button-group.js";
93
- import { ToggleGroup as ft } from "../../toggle-group/toggle-group.js";
75
+ import { SkipNavLink as qe, SkipNavTarget as Je } from "../../skip-nav/skip-nav.js";
76
+ import { Progress as Ye } from "../../progress/progress.js";
77
+ import { ProgressCircle as Xe } from "../../progress-circle/progress-circle.js";
78
+ import { Heading as Ze } from "../../heading/heading.js";
79
+ import { Text as Qe } from "../../text/text.js";
80
+ import { Code as $e } from "../../code/code.js";
81
+ import { Blockquote as et } from "../../blockquote/blockquote.js";
82
+ import { List as tt, ListItem as nt } from "../../list/list.js";
83
+ import { LogViewer as rt } from "../../log-viewer/log-viewer.js";
84
+ import { Prose as it } from "../../prose/prose.js";
85
+ import { PullToRefresh as at } from "../../pull-to-refresh/pull-to-refresh.js";
86
+ import { QrCode as ot } from "../../qr-code/qr-code.js";
87
+ import { RelativeTime as st } from "../../relative-time/relative-time.js";
88
+ import { Label as ct } from "../../label/label.js";
89
+ import { Field as lt } from "../../field/field.js";
90
+ import { Filter as ut } from "../../filter/filter.js";
91
+ import { IconButton as dt } from "../../icon-button/icon-button.js";
92
+ import { ButtonGroup as ft } from "../../button-group/button-group.js";
93
+ import { ToggleGroup as $ } from "../../toggle-group/toggle-group.js";
94
94
  import { InlineLoading as pt } from "../../inline-loading/inline-loading.js";
95
95
  import { Notification as mt } from "../../notification/notification.js";
96
96
  import { ScrollArea as ht } from "../../scroll-area/scroll-area.js";
@@ -138,4 +138,4 @@ import { Spacer as dn } from "../../layouts/src/spacer/spacer.js";
138
138
  import { AutoGrid as fn } from "../../layouts/src/auto-grid/auto-grid.js";
139
139
  import { PageHeader as pn } from "../../layouts/src/page-header/page-header.js";
140
140
  import { DismissableLayer as mn, ErrorBoundary as hn, FocusScope as gn, Portal as _n, Presence as vn, Slot as yn, SuspenseBoundary as bn, ThemeProvider as xn, VisuallyHidden as Sn, applyTheme as Cn, batch as wn, cn as Tn, composeRefs as En, computePosition as Dn, computed as On, createMachine as kn, createScope as An, createStreamBuffer as jn, effect as Mn, getLinkComponent as Nn, mergeProps as Pn, setLinkComponent as Fn, setTheme as In, signal as Ln, themePreloadScript as Rn, themeSignal as zn, useAnchorPosition as Bn, useClipboard as Vn, useComputed as Hn, useControllableSignal as Un, useDisclosure as Wn, useEffectPropSignal as Gn, useId as Kn, useMachine as qn, useMediaQuery as Jn, useRovingFocus as Yn, useScope as Xn, useScrollLock as Zn, useSignal as Qn, useSignalEffect as $n, useSignals as er, useStreamBuffer as tr, useTheme as nr, useTypeahead as rr } from "@cascivo/core";
141
- export { M as Accordion, N as AccordionContent, P as AccordionItem, F as AccordionTrigger, I as ActionSheet, d as Alert, ye as AlertDialog, en as AppShell, _t as AspectRatio, fn as AutoGrid, f as Avatar, p as AvatarGroup, c as Badge, $e as Blockquote, xe as BottomSheet, z as Breadcrumb, t as Button, dt as ButtonGroup, Ft as Calendar, r as Card, i as CardContent, a as CardFooter, o as CardHeader, s as CardTitle, Rt as Carousel, un as Center, tn as ChatBubble, v as Checkbox, He as CheckboxCard, Qe as Code, Jt as CodeSnippet, gt as Collapsible, Lt as ColorPicker, ln as Columns, ce as Combobox, ne as CommandMenu, we as Comparison, Tt as ContainedList, Et as ContainedListItem, Se as ContextMenu, Ce as ContextMenuItem, Ue as CopyButton, Dt as DataList, te as DataTable, le as DatePicker, It as DateRangePicker, mn as DismissableLayer, Bt as Dock, Kt as Drawer, w as Dropdown, Ie as Editable, X as EmptyState, hn as ErrorBoundary, Z as Fab, ct as Field, ue as FileUploader, lt as Filter, cn as Flex, gn as FocusScope, ae as Form, on as Grid, sn as GridItem, H as Header, Be as HeaderPanel, Xe as Heading, Te as HoverCard, Ee as HoverCardContent, De as HoverCardTrigger, ut as IconButton, h as Image, Zt as Indicator, Ht as InfiniteScroll, pt as InlineLoading, n as Input, Ne as InputGroup, Pe as InputGroupAddon, kt as Item, At as ItemActions, jt as ItemContent, Mt as ItemDescription, Nt as ItemMedia, Pt as ItemTitle, Qt as Join, L as Kbd, st as Label, Vt as LargeTitleHeader, R as Link, et as List, tt as ListItem, nt as LogViewer, he as Menu, vt as MenuButton, ge as MenuItem, _e as MenuSeparator, ve as MenuTrigger, bt as Menubar, l as Modal, ke as MultiSelect, qt as NativeSelect, xt as NavigationMenu, mt as Notification, ee as NumberInput, je as OtpInput, Q as OverflowMenu, pn as PageHeader, G as Pagination, Oe as PasswordInput, fe as Popover, pe as PopoverContent, me as PopoverTrigger, _n as Portal, vn as Presence, Je as Progress, Y as ProgressBar, Ye as ProgressCircle, K as ProgressIndicator, rt as Prose, it as PullToRefresh, at as QrCode, nn as RadialProgress, y as Radio, Le as RadioCard, Re as RadioCardGroup, b as RadioGroup, Fe as RatingGroup, ot as RelativeTime, Ut as ReorderList, zt as Resizable, ht as ScrollArea, $ as Search, Me as SegmentedControl, _ as Select, u as Separator, be as Sheet, ze as ShellHeader, W as SideNav, J as Skeleton, Ke as SkipNavLink, qe as SkipNavTarget, S as Slider, yn as Slot, dn as Spacer, e as Spinner, $t as Stack, We as Stat, Ge as Status, Yt as Steps, wt as StructuredList, bn as SuspenseBoundary, rn as Swap, an as SwipeItem, Ve as Switcher, O as Tabs, k as TabsContent, A as TabsList, j as TabsTrigger, q as Tag, Ae as TagsInput, Ze as Text, g as Textarea, xn as ThemeProvider, Xt as Tile, de as TimePicker, Ot as Timeline, T as ToastProvider, B as Toc, x as Toggle, ft as ToggleGroup, yt as Toggletip, C as Tooltip, St as TreeView, m as User, Wt as VirtualList, Sn as VisuallyHidden, Gt as WheelPicker, Cn as applyTheme, wn as batch, Tn as cn, En as composeRefs, Dn as computePosition, On as computed, oe as createForm, kn as createMachine, An as createScope, jn as createStreamBuffer, E as dismissAllToasts, Mn as effect, re as fuzzyMatch, ie as fuzzyScore, Nn as getLinkComponent, Pn as mergeProps, Fn as setLinkComponent, In as setTheme, Ln as signal, Rn as themePreloadScript, zn as themeSignal, Ct as treeViewMessages, Bn as useAnchorPosition, Vn as useClipboard, Hn as useComputed, Un as useControllableSignal, Wn as useDisclosure, Gn as useEffectPropSignal, se as useForm, Kn as useId, qn as useMachine, Jn as useMediaQuery, U as usePopover, Yn as useRovingFocus, Xn as useScope, Zn as useScrollLock, Qn as useSignal, $n as useSignalEffect, er as useSignals, tr as useStreamBuffer, nr as useTheme, D as useToast, V as useTocFromRegion, rr as useTypeahead };
141
+ export { A as Accordion, j as AccordionContent, M as AccordionItem, N as AccordionTrigger, P as ActionSheet, l as Alert, be as AlertDialog, en as AppShell, _t as AspectRatio, fn as AutoGrid, u as Avatar, d as AvatarGroup, o as Badge, et as Blockquote, Se as BottomSheet, L as Breadcrumb, te as Button, ft as ButtonGroup, Ft as Calendar, t as Card, n as CardContent, r as CardFooter, i as CardHeader, a as CardTitle, Rt as Carousel, un as Center, tn as ChatBubble, g as Checkbox, Ue as CheckboxCard, $e as Code, Jt as CodeSnippet, gt as Collapsible, Lt as ColorPicker, ln as Columns, le as Combobox, re as CommandMenu, Te as Comparison, Tt as ContainedList, Et as ContainedListItem, Ce as ContextMenu, we as ContextMenuItem, We as CopyButton, Dt as DataList, ne as DataTable, ue as DatePicker, It as DateRangePicker, mn as DismissableLayer, Bt as Dock, Kt as Drawer, S as Dropdown, Le as Editable, J as EmptyState, hn as ErrorBoundary, Y as Fab, lt as Field, de as FileUploader, ut as Filter, cn as Flex, gn as FocusScope, oe as Form, on as Grid, sn as GridItem, B as Header, Ve as HeaderPanel, Ze as Heading, Ee as HoverCard, De as HoverCardContent, Oe as HoverCardTrigger, dt as IconButton, p as Image, Zt as Indicator, Ht as InfiniteScroll, pt as InlineLoading, e as Input, Pe as InputGroup, Fe as InputGroupAddon, kt as Item, At as ItemActions, jt as ItemContent, Mt as ItemDescription, Nt as ItemMedia, Pt as ItemTitle, Qt as Join, F as Kbd, ct as Label, Vt as LargeTitleHeader, I as Link, tt as List, nt as ListItem, rt as LogViewer, ge as Menu, vt as MenuButton, _e as MenuItem, ve as MenuSeparator, ye as MenuTrigger, bt as Menubar, s as Modal, Ae as MultiSelect, qt as NativeSelect, xt as NavigationMenu, mt as Notification, Q as NumberInput, Me as OtpInput, X as OverflowMenu, pn as PageHeader, U as Pagination, ke as PasswordInput, pe as Popover, me as PopoverContent, he as PopoverTrigger, _n as Portal, vn as Presence, Ye as Progress, q as ProgressBar, Xe as ProgressCircle, W as ProgressIndicator, it as Prose, at as PullToRefresh, ot as QrCode, nn as RadialProgress, _ as Radio, Re as RadioCard, ze as RadioCardGroup, v as RadioGroup, Ie as RatingGroup, st as RelativeTime, Ut as ReorderList, zt as Resizable, ht as ScrollArea, Z as Search, Ne as SegmentedControl, h as Select, c as Separator, xe as Sheet, Be as ShellHeader, H as SideNav, K as Skeleton, qe as SkipNavLink, Je as SkipNavTarget, b as Slider, yn as Slot, dn as Spacer, ee as Spinner, $t as Stack, Ge as Stat, Ke as Status, Yt as Steps, wt as StructuredList, bn as SuspenseBoundary, rn as Swap, an as SwipeItem, y as Switch, He as Switcher, E as Tabs, D as TabsContent, O as TabsList, k as TabsTrigger, G as Tag, je as TagsInput, Qe as Text, m as Textarea, xn as ThemeProvider, Xt as Tile, fe as TimePicker, Ot as Timeline, C as ToastProvider, R as Toc, y as Toggle, $ as ToggleGroup, yt as Toggletip, x as Tooltip, St as TreeView, f as User, Wt as VirtualList, Sn as VisuallyHidden, Gt as WheelPicker, Cn as applyTheme, wn as batch, Tn as cn, En as composeRefs, Dn as computePosition, On as computed, se as createForm, kn as createMachine, An as createScope, jn as createStreamBuffer, w as dismissAllToasts, Mn as effect, ie as fuzzyMatch, ae as fuzzyScore, Nn as getLinkComponent, Pn as mergeProps, Fn as setLinkComponent, In as setTheme, Ln as signal, Rn as themePreloadScript, zn as themeSignal, Ct as treeViewMessages, Bn as useAnchorPosition, Vn as useClipboard, Hn as useComputed, Un as useControllableSignal, Wn as useDisclosure, Gn as useEffectPropSignal, ce as useForm, Kn as useId, qn as useMachine, Jn as useMediaQuery, V as usePopover, Yn as useRovingFocus, Xn as useScope, Zn as useScrollLock, Qn as useSignal, $n as useSignalEffect, er as useSignals, tr as useStreamBuffer, nr as useTheme, T as useToast, z as useTocFromRegion, rr as useTypeahead };
@@ -9,60 +9,60 @@ import { jsx as u, jsxs as d } from "react/jsx-runtime";
9
9
  function f(e, t, n) {
10
10
  return Math.min(n, Math.max(t, e));
11
11
  }
12
- function p({ children: p, orientation: m = "horizontal", defaultRatio: h = .5, ratio: g, minRatio: _ = .1, maxRatio: v = .9, onRatioChange: y, className: b, label: x }) {
12
+ function p({ children: p, orientation: m = "horizontal", defaultRatio: h = .5, ratio: g, minRatio: _ = .1, maxRatio: v = .9, onRatioChange: y, className: b, label: x, ariaLabel: S }) {
13
13
  s();
14
- let [S, C] = t.toArray(p), [w, T] = i({
14
+ let [C, w] = t.toArray(p), [T, E] = i({
15
15
  value: g,
16
16
  defaultValue: h,
17
17
  onChange: y
18
- }), E = n(null), D = a(!1), O = (e) => {
19
- T(f(e, _, v));
20
- }, k = (e, t) => {
21
- let n = E.current;
22
- if (!n) return w.value;
18
+ }), D = n(null), O = a(!1), k = (e) => {
19
+ E(f(e, _, v));
20
+ }, A = (e, t) => {
21
+ let n = D.current;
22
+ if (!n) return T.value;
23
23
  let r = n.getBoundingClientRect();
24
24
  return m === "horizontal" ? (e - r.left) / r.width : (t - r.top) / r.height;
25
25
  };
26
26
  o(() => {
27
- if (!D.value) return;
28
- let e = (e) => O(k(e.clientX, e.clientY)), t = () => {
29
- D.value = !1;
27
+ if (!O.value) return;
28
+ let e = (e) => k(A(e.clientX, e.clientY)), t = () => {
29
+ O.value = !1;
30
30
  };
31
31
  return window.addEventListener("pointermove", e), window.addEventListener("pointerup", t), () => {
32
32
  window.removeEventListener("pointermove", e), window.removeEventListener("pointerup", t);
33
33
  };
34
34
  });
35
- let A = (e) => {
35
+ let j = (e) => {
36
36
  let t = e.shiftKey ? .1 : .02, n = m === "horizontal" ? "ArrowLeft" : "ArrowUp", r = m === "horizontal" ? "ArrowRight" : "ArrowDown";
37
- if (e.key === n) O(w.value - t);
38
- else if (e.key === r) O(w.value + t);
39
- else if (e.key === "Home") O(_);
40
- else if (e.key === "End") O(v);
37
+ if (e.key === n) k(T.value - t);
38
+ else if (e.key === r) k(T.value + t);
39
+ else if (e.key === "Home") k(_);
40
+ else if (e.key === "End") k(v);
41
41
  else return;
42
42
  e.preventDefault();
43
- }, j = x ?? l(c.resizable.handle), M = Math.round(w.value * 100);
43
+ }, M = S ?? x ?? l(c.resizable.handle), N = Math.round(T.value * 100);
44
44
  return /* @__PURE__ */ d("div", {
45
- ref: E,
45
+ ref: D,
46
46
  className: r(e.resizable, b),
47
47
  "data-orientation": m,
48
- style: { "--cascivo-resizable-ratio": w.value },
48
+ style: { "--cascivo-resizable-ratio": T.value },
49
49
  children: [
50
50
  /* @__PURE__ */ u("div", {
51
51
  className: e.pane,
52
- children: S
52
+ children: C
53
53
  }),
54
54
  /* @__PURE__ */ u("div", {
55
55
  className: e.handle,
56
56
  role: "separator",
57
57
  "aria-orientation": m,
58
- "aria-label": j,
59
- "aria-valuenow": M,
58
+ "aria-label": M,
59
+ "aria-valuenow": N,
60
60
  "aria-valuemin": Math.round(_ * 100),
61
61
  "aria-valuemax": Math.round(v * 100),
62
62
  tabIndex: 0,
63
- onKeyDown: A,
63
+ onKeyDown: j,
64
64
  onPointerDown: (e) => {
65
- e.preventDefault(), D.value = !0;
65
+ e.preventDefault(), O.value = !0;
66
66
  },
67
67
  children: /* @__PURE__ */ u("span", {
68
68
  className: e.grip,
@@ -71,7 +71,7 @@ function p({ children: p, orientation: m = "horizontal", defaultRatio: h = .5, r
71
71
  }),
72
72
  /* @__PURE__ */ u("div", {
73
73
  className: e.pane,
74
- children: C
74
+ children: w
75
75
  })
76
76
  ]
77
77
  });
@@ -28,58 +28,62 @@ function f() {
28
28
  })]
29
29
  });
30
30
  }
31
- function p({ value: p, defaultValue: m = "", onValueChange: h, onChange: g, onSearch: _, debounceMs: v = 300, placeholder: y, size: b = "md", label: x, disabled: S = !1, clearLabel: C, id: w, className: T }) {
31
+ function p({ value: p, defaultValue: m = "", onValueChange: h, onSearch: g, debounceMs: _ = 300, placeholder: v, size: y = "md", label: b, ariaLabel: x, disabled: S = !1, clearLabel: C, id: w, "aria-labelledby": T, "aria-describedby": E, "aria-invalid": D, className: O }) {
32
32
  s();
33
- let E = y ?? l(c.search.placeholder), D = x ?? l(c.search.label), O = C ?? l(c.search.clear), k = t(null), A = a("cascade-search"), j = w ?? A, M = p !== void 0, [N] = i({
33
+ let k = v ?? l(c.search.placeholder), A = b ?? (T === void 0 ? l(c.search.label) : void 0), j = C ?? l(c.search.clear), M = t(null), N = a("cascade-search"), P = w ?? N, F = p !== void 0, [I] = i({
34
34
  value: p,
35
35
  defaultValue: m
36
- }), P = t(_);
37
- P.current = _;
38
- let F = t(null), I = () => {
39
- F.current !== null && (clearTimeout(F.current), F.current = null);
36
+ }), L = t(g);
37
+ L.current = g;
38
+ let R = t(null), z = () => {
39
+ R.current !== null && (clearTimeout(R.current), R.current = null);
40
40
  };
41
- o(() => I);
42
- let L = (e) => {
41
+ o(() => z);
42
+ let B = (e) => {
43
43
  let t = e.target.value;
44
- M || (N.value = t), (h ?? g)?.(t), I(), F.current = setTimeout(() => {
45
- F.current = null, P.current?.(t);
46
- }, v);
47
- }, R = (e) => {
48
- e.key === "Enter" && (I(), _?.(N.value));
49
- }, z = () => {
50
- I(), M || (N.value = ""), (h ?? g)?.(""), _?.(""), r(k.current);
51
- }, B = N.value !== "";
44
+ F || (I.value = t), h?.(t), z(), R.current = setTimeout(() => {
45
+ R.current = null, L.current?.(t);
46
+ }, _);
47
+ }, V = (e) => {
48
+ e.key === "Enter" && (z(), g?.(I.value));
49
+ }, H = () => {
50
+ z(), F || (I.value = ""), h?.(""), g?.(""), r(M.current);
51
+ }, U = I.value !== "";
52
52
  return /* @__PURE__ */ d("div", {
53
- className: n(e.root, T),
54
- "data-size": b,
55
- "data-state": B ? "filled" : "empty",
53
+ className: n(e.root, O),
54
+ "data-size": y,
55
+ "data-state": U ? "filled" : "empty",
56
56
  children: [
57
- /* @__PURE__ */ u("label", {
57
+ A !== void 0 && /* @__PURE__ */ u("label", {
58
58
  className: e.label,
59
- htmlFor: j,
60
- children: D
59
+ htmlFor: P,
60
+ children: A
61
61
  }),
62
62
  /* @__PURE__ */ u("span", {
63
63
  className: e.icon,
64
64
  children: /* @__PURE__ */ u(f, {})
65
65
  }),
66
66
  /* @__PURE__ */ u("input", {
67
- ref: k,
68
- id: j,
67
+ ref: M,
68
+ id: P,
69
69
  type: "search",
70
+ "aria-labelledby": T,
71
+ "aria-label": x,
72
+ "aria-describedby": E,
73
+ "aria-invalid": D,
70
74
  className: e.input,
71
- value: N.value,
72
- placeholder: E,
75
+ value: I.value,
76
+ placeholder: k,
73
77
  disabled: S,
74
- onChange: L,
75
- onKeyDown: R
78
+ onChange: B,
79
+ onKeyDown: V
76
80
  }),
77
- B && /* @__PURE__ */ u("button", {
81
+ U && /* @__PURE__ */ u("button", {
78
82
  type: "button",
79
83
  className: e.clear,
80
- "aria-label": O,
84
+ "aria-label": j,
81
85
  disabled: S,
82
- onClick: z,
86
+ onClick: H,
83
87
  children: /* @__PURE__ */ u("span", {
84
88
  "aria-hidden": "true",
85
89
  children: "✕"
@@ -11,36 +11,37 @@ var s = r({
11
11
  idle: { on: { FOCUS: "focused" } },
12
12
  focused: { on: { BLUR: "idle" } }
13
13
  }
14
- }), c = t(function({ label: t, hint: r, error: c, placeholder: l, options: u, size: d = "md", className: f, id: p, defaultValue: m, value: h, onFocus: g, onBlur: _, ...v }, y) {
15
- let [b, x] = i(s), S = p ?? (t ? `cascade-select-${t.toLowerCase().replace(/\s+/g, "-")}` : void 0), C = h !== void 0, w = l !== void 0;
14
+ }), c = t(function({ label: t, hint: r, error: c, placeholder: l, options: u, size: d = "md", className: f, id: p, defaultValue: m, value: h, onFocus: g, onBlur: _, ariaLabel: v, ...y }, b) {
15
+ let [x, S] = i(s), C = p ?? (t ? `cascade-select-${t.toLowerCase().replace(/\s+/g, "-")}` : void 0), w = h !== void 0, T = l !== void 0;
16
16
  return /* @__PURE__ */ o("div", {
17
17
  className: n(e.wrapper, f),
18
- "data-state": c ? "error" : b.value,
18
+ "data-state": c ? "error" : x.value,
19
19
  "data-size": d,
20
20
  children: [
21
21
  t && /* @__PURE__ */ a("label", {
22
22
  className: e.label,
23
- htmlFor: S,
23
+ htmlFor: C,
24
24
  children: t
25
25
  }),
26
26
  /* @__PURE__ */ o("div", {
27
27
  className: e.field,
28
28
  children: [/* @__PURE__ */ o("select", {
29
- id: S,
29
+ id: C,
30
30
  className: e.select,
31
31
  "aria-invalid": c ? !0 : void 0,
32
- "aria-describedby": c ? `${S}-error` : r ? `${S}-hint` : void 0,
32
+ "aria-describedby": c ? `${C}-error` : r ? `${C}-hint` : void 0,
33
33
  value: h,
34
- defaultValue: !C && w ? m ?? "" : m,
34
+ defaultValue: !w && T ? m ?? "" : m,
35
35
  onFocus: (e) => {
36
- x("FOCUS"), g?.(e);
36
+ S("FOCUS"), g?.(e);
37
37
  },
38
38
  onBlur: (e) => {
39
- x("BLUR"), _?.(e);
39
+ S("BLUR"), _?.(e);
40
40
  },
41
- ref: y,
42
- ...v,
43
- children: [w && /* @__PURE__ */ a("option", {
41
+ ref: b,
42
+ ...y,
43
+ "aria-label": y["aria-label"] ?? v,
44
+ children: [T && /* @__PURE__ */ a("option", {
44
45
  value: "",
45
46
  disabled: !0,
46
47
  children: l
@@ -55,13 +56,13 @@ var s = r({
55
56
  })]
56
57
  }),
57
58
  c && /* @__PURE__ */ a("span", {
58
- id: `${S}-error`,
59
+ id: `${C}-error`,
59
60
  className: e.error,
60
61
  role: "alert",
61
62
  children: c
62
63
  }),
63
64
  !c && r && /* @__PURE__ */ a("span", {
64
- id: `${S}-hint`,
65
+ id: `${C}-hint`,
65
66
  className: e.hint,
66
67
  children: r
67
68
  })