@aortl/admin-react 0.17.0 → 0.18.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.
Files changed (49) hide show
  1. package/CHANGELOG.md +26 -1
  2. package/dist/Alert.d.ts +9 -2
  3. package/dist/Alert.d.ts.map +1 -1
  4. package/dist/Avatar.d.ts +8 -3
  5. package/dist/Avatar.d.ts.map +1 -1
  6. package/dist/Card.d.ts +4 -1
  7. package/dist/Card.d.ts.map +1 -1
  8. package/dist/Dialog.d.ts +4 -1
  9. package/dist/Dialog.d.ts.map +1 -1
  10. package/dist/Drawer.d.ts +51 -0
  11. package/dist/Drawer.d.ts.map +1 -0
  12. package/dist/Field.d.ts +4 -1
  13. package/dist/Field.d.ts.map +1 -1
  14. package/dist/Indicator.d.ts +3 -1
  15. package/dist/Indicator.d.ts.map +1 -1
  16. package/dist/Input.d.ts +19 -2
  17. package/dist/Input.d.ts.map +1 -1
  18. package/dist/Item.d.ts +55 -0
  19. package/dist/Item.d.ts.map +1 -0
  20. package/dist/Menu.d.ts +7 -5
  21. package/dist/Menu.d.ts.map +1 -1
  22. package/dist/NumberInput.d.ts +28 -0
  23. package/dist/NumberInput.d.ts.map +1 -0
  24. package/dist/Pagination.d.ts +4 -1
  25. package/dist/Pagination.d.ts.map +1 -1
  26. package/dist/PropertyList.d.ts +10 -3
  27. package/dist/PropertyList.d.ts.map +1 -1
  28. package/dist/Sidebar.d.ts +16 -5
  29. package/dist/Sidebar.d.ts.map +1 -1
  30. package/dist/StatCard.d.ts +16 -1
  31. package/dist/StatCard.d.ts.map +1 -1
  32. package/dist/Table.d.ts +14 -1
  33. package/dist/Table.d.ts.map +1 -1
  34. package/dist/Timeline.d.ts +29 -0
  35. package/dist/Timeline.d.ts.map +1 -0
  36. package/dist/Tooltip.d.ts +4 -1
  37. package/dist/Tooltip.d.ts.map +1 -1
  38. package/dist/admin.scoped.css +1089 -414
  39. package/dist/cn.d.ts +7 -0
  40. package/dist/cn.d.ts.map +1 -1
  41. package/dist/dialog-internal.d.ts +17 -0
  42. package/dist/dialog-internal.d.ts.map +1 -0
  43. package/dist/index.cjs +640 -101
  44. package/dist/index.cjs.map +1 -1
  45. package/dist/index.d.ts +7 -2
  46. package/dist/index.d.ts.map +1 -1
  47. package/dist/index.mjs +635 -102
  48. package/dist/index.mjs.map +1 -1
  49. package/package.json +2 -2
package/dist/index.mjs CHANGED
@@ -4,6 +4,7 @@ import { Children, Fragment as Fragment$1, createContext, createElement, isValid
4
4
  import { Avatar as Avatar$1 } from "@base-ui/react/avatar";
5
5
  import { Button as Button$1 } from "@base-ui/react/button";
6
6
  import { Input as Input$1 } from "@base-ui/react/input";
7
+ import { NumberField } from "@base-ui/react/number-field";
7
8
  import { Field as Field$1 } from "@base-ui/react/field";
8
9
  import { Checkbox as Checkbox$1 } from "@base-ui/react/checkbox";
9
10
  import { Radio as Radio$1 } from "@base-ui/react/radio";
@@ -114,17 +115,47 @@ function renderIcon(icon, size = "1em") {
114
115
  }
115
116
  //#endregion
116
117
  //#region src/Alert.tsx
117
- function AlertRoot({ variant, icon, title, description, action, className, role, children, ...rest }) {
118
+ function DismissIcon() {
119
+ return /* @__PURE__ */ jsxs("svg", {
120
+ width: "1em",
121
+ height: "1em",
122
+ viewBox: "0 0 24 24",
123
+ fill: "none",
124
+ stroke: "currentColor",
125
+ strokeWidth: "2",
126
+ strokeLinecap: "round",
127
+ strokeLinejoin: "round",
128
+ "aria-hidden": "true",
129
+ children: [/* @__PURE__ */ jsx("path", { d: "M18 6 6 18" }), /* @__PURE__ */ jsx("path", { d: "m6 6 12 12" })]
130
+ });
131
+ }
132
+ function AlertRoot({ variant, icon, title, description, action, onDismiss, dismissLabel = "Dismiss", classNames, className, role, children, ...rest }) {
118
133
  return /* @__PURE__ */ jsxs("div", {
119
134
  role: role ?? (variant === "danger" || variant === "warning" ? "alert" : "status"),
120
135
  className: cn(["alert", `alert-${variant}`], className),
121
136
  ...rest,
122
137
  children: [
123
138
  renderIcon(icon),
124
- title !== void 0 ? /* @__PURE__ */ jsx(AlertTitle, { children: title }) : null,
125
- description !== void 0 ? /* @__PURE__ */ jsx(AlertDescription, { children: description }) : null,
139
+ title !== void 0 ? /* @__PURE__ */ jsx(AlertTitle, {
140
+ className: classNames?.title,
141
+ children: title
142
+ }) : null,
143
+ description !== void 0 ? /* @__PURE__ */ jsx(AlertDescription, {
144
+ className: classNames?.description,
145
+ children: description
146
+ }) : null,
126
147
  children,
127
- action !== void 0 ? /* @__PURE__ */ jsx(AlertAction, { children: action }) : null
148
+ action !== void 0 ? /* @__PURE__ */ jsx(AlertAction, {
149
+ className: classNames?.action,
150
+ children: action
151
+ }) : null,
152
+ onDismiss ? /* @__PURE__ */ jsx("button", {
153
+ type: "button",
154
+ className: cn("alert-dismiss", classNames?.dismiss),
155
+ "aria-label": dismissLabel,
156
+ onClick: onDismiss,
157
+ children: /* @__PURE__ */ jsx(DismissIcon, {})
158
+ }) : null
128
159
  ]
129
160
  });
130
161
  }
@@ -283,11 +314,23 @@ function Avatar({ src, alt, initials, size = "md", shape = "circle", className,
283
314
  }) : null]
284
315
  });
285
316
  }
286
- /** Overlapping stack of avatars; later children paint on top. */
287
- function AvatarGroup({ className, ...rest }) {
288
- return /* @__PURE__ */ jsx("div", {
317
+ /** Overlapping stack of avatars; later children paint on top. `max` caps the visible count. */
318
+ function AvatarGroup({ max, size = "md", className, children, ...rest }) {
319
+ const items = Children.toArray(children);
320
+ const overflow = max !== void 0 && items.length > max ? items.length - max : 0;
321
+ const visible = overflow > 0 ? items.slice(0, max) : items;
322
+ return /* @__PURE__ */ jsxs("div", {
289
323
  className: cn("avatar-group", className),
290
- ...rest
324
+ ...rest,
325
+ children: [visible, overflow > 0 ? /* @__PURE__ */ jsxs("span", {
326
+ className: cn([
327
+ "avatar",
328
+ size !== "md" && `avatar-${size}`,
329
+ "avatar-more"
330
+ ], void 0),
331
+ "aria-label": `+${overflow} more`,
332
+ children: ["+", overflow]
333
+ }) : null]
291
334
  });
292
335
  }
293
336
  //#endregion
@@ -615,9 +658,52 @@ var Breadcrumbs = Object.assign(BreadcrumbsRoot, {
615
658
  });
616
659
  //#endregion
617
660
  //#region src/Input.tsx
618
- function Input({ variant = "bordered", inputSize = "md", icon, iconTrailing, className, type = "text", ...rest }) {
619
- const input = /* @__PURE__ */ jsx(Input$1, {
661
+ function ClearIcon() {
662
+ return /* @__PURE__ */ jsxs("svg", {
663
+ width: "1em",
664
+ height: "1em",
665
+ viewBox: "0 0 24 24",
666
+ fill: "none",
667
+ stroke: "currentColor",
668
+ strokeWidth: "2",
669
+ strokeLinecap: "round",
670
+ strokeLinejoin: "round",
671
+ "aria-hidden": "true",
672
+ children: [/* @__PURE__ */ jsx("path", { d: "M18 6 6 18" }), /* @__PURE__ */ jsx("path", { d: "m6 6 12 12" })]
673
+ });
674
+ }
675
+ function Input({ variant = "bordered", inputSize = "md", icon, iconTrailing, clearable = false, clearLabel = "Clear", onClear, action, className, classNames, type = "text", value, defaultValue, onChange, disabled, readOnly, ref: consumerRef, ...rest }) {
676
+ const innerRef = useRef(null);
677
+ const isControlled = value !== void 0;
678
+ const [uncontrolledHasValue, setUncontrolledHasValue] = useState(() => defaultValue != null && String(defaultValue).length > 0);
679
+ const hasValue = isControlled ? value != null && String(value).length > 0 : uncontrolledHasValue;
680
+ const setRef = useCallback((node) => {
681
+ innerRef.current = node;
682
+ if (typeof consumerRef === "function") consumerRef(node);
683
+ else if (consumerRef) consumerRef.current = node;
684
+ }, [consumerRef]);
685
+ function handleChange(event) {
686
+ if (!isControlled) setUncontrolledHasValue(event.target.value.length > 0);
687
+ onChange?.(event);
688
+ }
689
+ function handleClear() {
690
+ const input = innerRef.current;
691
+ if (!input) return;
692
+ (Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value")?.set)?.call(input, "");
693
+ input.dispatchEvent(new Event("input", { bubbles: true }));
694
+ input.focus();
695
+ if (!isControlled) setUncontrolledHasValue(false);
696
+ onClear?.();
697
+ }
698
+ const showClear = clearable && hasValue && !disabled && !readOnly;
699
+ const inputEl = /* @__PURE__ */ jsx(Input$1, {
700
+ ref: setRef,
620
701
  type,
702
+ value,
703
+ defaultValue,
704
+ onChange: handleChange,
705
+ disabled,
706
+ readOnly,
621
707
  className: cn([
622
708
  "input",
623
709
  variant !== "bordered" && `input-${variant}`,
@@ -625,16 +711,72 @@ function Input({ variant = "bordered", inputSize = "md", icon, iconTrailing, cla
625
711
  ], className),
626
712
  ...rest
627
713
  });
628
- if (icon == null && iconTrailing == null) return input;
714
+ if (!(icon != null || iconTrailing != null || action != null || clearable)) return inputEl;
715
+ const trailing = showClear ? /* @__PURE__ */ jsx("button", {
716
+ type: "button",
717
+ className: cn("input-action", classNames?.action),
718
+ "aria-label": clearLabel,
719
+ onClick: handleClear,
720
+ children: /* @__PURE__ */ jsx(ClearIcon, {})
721
+ }) : action ?? renderIcon(iconTrailing);
629
722
  return /* @__PURE__ */ jsxs("span", {
630
- className: cn("input-icon", void 0),
723
+ className: cn("input-icon", classNames?.wrapper),
631
724
  children: [
632
725
  renderIcon(icon),
633
- input,
634
- renderIcon(iconTrailing)
726
+ inputEl,
727
+ trailing
728
+ ]
729
+ });
730
+ }
731
+ function EyeIcon() {
732
+ return /* @__PURE__ */ jsxs("svg", {
733
+ width: "1em",
734
+ height: "1em",
735
+ viewBox: "0 0 24 24",
736
+ fill: "none",
737
+ stroke: "currentColor",
738
+ strokeWidth: "2",
739
+ strokeLinecap: "round",
740
+ strokeLinejoin: "round",
741
+ "aria-hidden": "true",
742
+ children: [/* @__PURE__ */ jsx("path", { d: "M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0" }), /* @__PURE__ */ jsx("path", { d: "M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6" })]
743
+ });
744
+ }
745
+ function EyeOffIcon() {
746
+ return /* @__PURE__ */ jsxs("svg", {
747
+ width: "1em",
748
+ height: "1em",
749
+ viewBox: "0 0 24 24",
750
+ fill: "none",
751
+ stroke: "currentColor",
752
+ strokeWidth: "2",
753
+ strokeLinecap: "round",
754
+ strokeLinejoin: "round",
755
+ "aria-hidden": "true",
756
+ children: [
757
+ /* @__PURE__ */ jsx("path", { d: "M10.585 10.587a2 2 0 0 0 2.829 2.828" }),
758
+ /* @__PURE__ */ jsx("path", { d: "M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87" }),
759
+ /* @__PURE__ */ jsx("path", { d: "M3 3l18 18" })
635
760
  ]
636
761
  });
637
762
  }
763
+ /** Password field with a trailing reveal toggle. Emits the same `.input` / `.input-action` classes. */
764
+ function PasswordInput({ revealLabel = "Show password", classNames, ...rest }) {
765
+ const [revealed, setRevealed] = useState(false);
766
+ return /* @__PURE__ */ jsx(Input, {
767
+ type: revealed ? "text" : "password",
768
+ action: /* @__PURE__ */ jsx("button", {
769
+ type: "button",
770
+ className: cn("input-action", classNames?.action),
771
+ "aria-label": revealLabel,
772
+ "aria-pressed": revealed,
773
+ onClick: () => setRevealed((v) => !v),
774
+ children: revealed ? /* @__PURE__ */ jsx(EyeOffIcon, {}) : /* @__PURE__ */ jsx(EyeIcon, {})
775
+ }),
776
+ classNames,
777
+ ...rest
778
+ });
779
+ }
638
780
  //#endregion
639
781
  //#region src/FileInput.tsx
640
782
  function FileInput({ variant = "bordered", inputSize = "md", className, ...rest }) {
@@ -664,8 +806,69 @@ function InputGroupAddon({ className, ...rest }) {
664
806
  }
665
807
  var InputGroup = Object.assign(InputGroupRoot, { Addon: InputGroupAddon });
666
808
  //#endregion
809
+ //#region src/NumberInput.tsx
810
+ function MinusIcon() {
811
+ return /* @__PURE__ */ jsx("svg", {
812
+ width: "1em",
813
+ height: "1em",
814
+ viewBox: "0 0 24 24",
815
+ fill: "none",
816
+ stroke: "currentColor",
817
+ strokeWidth: "2",
818
+ strokeLinecap: "round",
819
+ strokeLinejoin: "round",
820
+ "aria-hidden": "true",
821
+ children: /* @__PURE__ */ jsx("path", { d: "M5 12h14" })
822
+ });
823
+ }
824
+ function PlusIcon() {
825
+ return /* @__PURE__ */ jsx("svg", {
826
+ width: "1em",
827
+ height: "1em",
828
+ viewBox: "0 0 24 24",
829
+ fill: "none",
830
+ stroke: "currentColor",
831
+ strokeWidth: "2",
832
+ strokeLinecap: "round",
833
+ strokeLinejoin: "round",
834
+ "aria-hidden": "true",
835
+ children: /* @__PURE__ */ jsx("path", { d: "M12 5v14M5 12h14" })
836
+ });
837
+ }
838
+ /**
839
+ * Numeric field with stepper buttons over Base UI NumberField (clamp-on-blur,
840
+ * step, `Intl` formatting via `format`). The vanilla bundle styles a native
841
+ * `<input type="number">` and steps with `stepUp()` / `stepDown()`.
842
+ */
843
+ function NumberInput({ size = "md", classNames, placeholder, inputAriaLabel, decrementLabel = "Decrease", incrementLabel = "Increase", decrementIcon, incrementIcon, className, ...rootProps }) {
844
+ return /* @__PURE__ */ jsx(NumberField.Root, {
845
+ className: cn("number-input-root", className),
846
+ ...rootProps,
847
+ children: /* @__PURE__ */ jsxs(NumberField.Group, {
848
+ className: cn(["number-input", size !== "md" && `number-input-${size}`], classNames?.group),
849
+ children: [
850
+ /* @__PURE__ */ jsx(NumberField.Decrement, {
851
+ className: cn("number-input-step", classNames?.decrement),
852
+ "aria-label": decrementLabel,
853
+ children: decrementIcon ?? /* @__PURE__ */ jsx(MinusIcon, {})
854
+ }),
855
+ /* @__PURE__ */ jsx(NumberField.Input, {
856
+ className: cn("number-input-field", classNames?.input),
857
+ placeholder,
858
+ "aria-label": inputAriaLabel
859
+ }),
860
+ /* @__PURE__ */ jsx(NumberField.Increment, {
861
+ className: cn("number-input-step", classNames?.increment),
862
+ "aria-label": incrementLabel,
863
+ children: incrementIcon ?? /* @__PURE__ */ jsx(PlusIcon, {})
864
+ })
865
+ ]
866
+ })
867
+ });
868
+ }
869
+ //#endregion
667
870
  //#region src/Indicator.tsx
668
- function Indicator({ label, variant = "neutral", size = "sm", icon, placement = "top-end", offset, className, "aria-label": ariaLabel, style: styleProp, children, ...rest }) {
871
+ function Indicator({ label, variant = "neutral", size = "sm", icon, placement = "top-end", offset, max, className, "aria-label": ariaLabel, style: styleProp, children, ...rest }) {
669
872
  const [vertical, horizontal] = placement.split("-");
670
873
  const placementClasses = [
671
874
  "indicator-item",
@@ -673,6 +876,7 @@ function Indicator({ label, variant = "neutral", size = "sm", icon, placement =
673
876
  horizontal !== "end" && `indicator-${horizontal}`
674
877
  ];
675
878
  const hasContent = label !== void 0 || icon !== void 0;
879
+ const displayLabel = typeof label === "number" && max !== void 0 && label > max ? `${max}+` : label;
676
880
  const style = offset !== void 0 ? {
677
881
  ...styleProp,
678
882
  "--indicator-offset": `${offset}px`
@@ -687,7 +891,7 @@ function Indicator({ label, variant = "neutral", size = "sm", icon, placement =
687
891
  size,
688
892
  icon,
689
893
  "aria-label": ariaLabel,
690
- children: label
894
+ children: displayLabel
691
895
  }) : /* @__PURE__ */ jsx("span", {
692
896
  className: cn([
693
897
  ...placementClasses,
@@ -793,7 +997,7 @@ function range(start, end) {
793
997
  for (let i = start; i <= end; i++) out.push(i);
794
998
  return out;
795
999
  }
796
- function Pagination({ page, total, onPageChange, siblingCount = 1, boundaryCount = 1, previousIcon, nextIcon, renderItem, className, "aria-label": ariaLabel = "Pagination", ...rest }) {
1000
+ function Pagination({ page, total, onPageChange, siblingCount = 1, boundaryCount = 1, previousIcon, nextIcon, renderItem, className, classNames, "aria-label": ariaLabel = "Pagination", ...rest }) {
797
1001
  const items = getPaginationItems({
798
1002
  page,
799
1003
  total,
@@ -807,8 +1011,8 @@ function Pagination({ page, total, onPageChange, siblingCount = 1, boundaryCount
807
1011
  className: cn("pagination", className),
808
1012
  ...rest,
809
1013
  children: /* @__PURE__ */ jsx("ul", { children: items.map((item, i) => /* @__PURE__ */ jsx("li", {
810
- className: cn("page-item", void 0),
811
- children: renderItem ? renderItem(item) : defaultRender(item, onPageChange, prev, next)
1014
+ className: cn("page-item", classNames?.item),
1015
+ children: renderItem ? renderItem(item) : defaultRender(item, onPageChange, prev, next, classNames)
812
1016
  }, paginationItemKey(item, i))) })
813
1017
  });
814
1018
  }
@@ -849,11 +1053,11 @@ function paginationItemKey(item, index) {
849
1053
  default: return `${index}`;
850
1054
  }
851
1055
  }
852
- function defaultRender(item, onPageChange, prev, next) {
1056
+ function defaultRender(item, onPageChange, prev, next, classNames) {
853
1057
  switch (item.type) {
854
1058
  case "previous": return /* @__PURE__ */ jsx("button", {
855
1059
  type: "button",
856
- className: cn("page-link", void 0),
1060
+ className: cn("page-link", classNames?.link),
857
1061
  "aria-label": "Previous page",
858
1062
  "aria-disabled": item.disabled || void 0,
859
1063
  disabled: item.disabled,
@@ -862,7 +1066,7 @@ function defaultRender(item, onPageChange, prev, next) {
862
1066
  });
863
1067
  case "next": return /* @__PURE__ */ jsx("button", {
864
1068
  type: "button",
865
- className: cn("page-link", void 0),
1069
+ className: cn("page-link", classNames?.link),
866
1070
  "aria-label": "Next page",
867
1071
  "aria-disabled": item.disabled || void 0,
868
1072
  disabled: item.disabled,
@@ -870,13 +1074,13 @@ function defaultRender(item, onPageChange, prev, next) {
870
1074
  children: next
871
1075
  });
872
1076
  case "ellipsis": return /* @__PURE__ */ jsx("span", {
873
- className: cn("page-ellipsis", void 0),
1077
+ className: cn("page-ellipsis", classNames?.ellipsis),
874
1078
  "aria-hidden": "true",
875
1079
  children: "…"
876
1080
  });
877
1081
  case "page": return /* @__PURE__ */ jsx("button", {
878
1082
  type: "button",
879
- className: cn(["page-link", item.selected && "active"], void 0),
1083
+ className: cn(["page-link", item.selected && "active"], classNames?.link),
880
1084
  "aria-current": item.selected ? "page" : void 0,
881
1085
  "aria-label": `Page ${item.page}`,
882
1086
  onClick: () => onPageChange(item.page),
@@ -909,7 +1113,7 @@ function CheckboxRoot({ className, children, ...rest }) {
909
1113
  return /* @__PURE__ */ jsx(Checkbox$1.Root, {
910
1114
  className: cn("checkbox", className),
911
1115
  ...rest,
912
- children: children ?? /* @__PURE__ */ jsx(CheckboxIndicator, { children: /* @__PURE__ */ jsx(CheckIcon$1, {}) })
1116
+ children: children ?? /* @__PURE__ */ jsx(CheckboxIndicator, { children: /* @__PURE__ */ jsx(CheckIcon$2, {}) })
913
1117
  });
914
1118
  }
915
1119
  function CheckboxIndicator({ className, ...rest }) {
@@ -918,7 +1122,7 @@ function CheckboxIndicator({ className, ...rest }) {
918
1122
  ...rest
919
1123
  });
920
1124
  }
921
- function CheckIcon$1() {
1125
+ function CheckIcon$2() {
922
1126
  return /* @__PURE__ */ jsx("svg", {
923
1127
  viewBox: "0 0 24 24",
924
1128
  fill: "none",
@@ -1047,7 +1251,7 @@ function SelectItemIndicator({ className, children, ...rest }) {
1047
1251
  return /* @__PURE__ */ jsx(Select$1.ItemIndicator, {
1048
1252
  className: cn("select-item-indicator", className),
1049
1253
  ...rest,
1050
- children: children ?? /* @__PURE__ */ jsx(CheckIcon, {})
1254
+ children: children ?? /* @__PURE__ */ jsx(CheckIcon$1, {})
1051
1255
  });
1052
1256
  }
1053
1257
  function SelectGroup(props) {
@@ -1059,7 +1263,7 @@ function SelectGroupLabel({ className, ...rest }) {
1059
1263
  ...rest
1060
1264
  });
1061
1265
  }
1062
- function CheckIcon() {
1266
+ function CheckIcon$1() {
1063
1267
  return /* @__PURE__ */ jsx("svg", {
1064
1268
  viewBox: "0 0 24 24",
1065
1269
  fill: "none",
@@ -1138,9 +1342,10 @@ function CardContainer({ variant = "default", bordered, compact, scroll, classNa
1138
1342
  * an optional title (with icon), description, children, and actions. For
1139
1343
  * anything outside that shape, use `<Card.Container>` and compose by hand.
1140
1344
  */
1141
- function CardRoot({ variant, bordered, compact, media, icon, title, description, toolbar, actions, className, children, ...rest }) {
1345
+ function CardRoot({ variant, bordered, compact, media, icon, title, description, toolbar, actions, className, classNames, children, ...rest }) {
1142
1346
  const titleEl = icon !== void 0 || title !== void 0 ? /* @__PURE__ */ jsx(CardTitle, {
1143
1347
  icon,
1348
+ className: classNames?.title,
1144
1349
  children: title
1145
1350
  }) : null;
1146
1351
  return /* @__PURE__ */ jsxs(CardContainer, {
@@ -1149,12 +1354,30 @@ function CardRoot({ variant, bordered, compact, media, icon, title, description,
1149
1354
  compact,
1150
1355
  className,
1151
1356
  ...rest,
1152
- children: [media !== void 0 ? /* @__PURE__ */ jsx(CardMedia, { children: media }) : null, /* @__PURE__ */ jsxs(CardBody, { children: [
1153
- toolbar !== void 0 ? /* @__PURE__ */ jsxs(CardHeader, { children: [titleEl, /* @__PURE__ */ jsx(CardToolbar, { children: toolbar })] }) : titleEl,
1154
- description !== void 0 ? /* @__PURE__ */ jsx(CardDescription, { children: description }) : null,
1155
- children,
1156
- actions !== void 0 ? /* @__PURE__ */ jsx(CardActions, { children: actions }) : null
1157
- ] })]
1357
+ children: [media !== void 0 ? /* @__PURE__ */ jsx(CardMedia, {
1358
+ className: classNames?.media,
1359
+ children: media
1360
+ }) : null, /* @__PURE__ */ jsxs(CardBody, {
1361
+ className: classNames?.body,
1362
+ children: [
1363
+ toolbar !== void 0 ? /* @__PURE__ */ jsxs(CardHeader, {
1364
+ className: classNames?.header,
1365
+ children: [titleEl, /* @__PURE__ */ jsx(CardToolbar, {
1366
+ className: classNames?.toolbar,
1367
+ children: toolbar
1368
+ })]
1369
+ }) : titleEl,
1370
+ description !== void 0 ? /* @__PURE__ */ jsx(CardDescription, {
1371
+ className: classNames?.description,
1372
+ children: description
1373
+ }) : null,
1374
+ children,
1375
+ actions !== void 0 ? /* @__PURE__ */ jsx(CardActions, {
1376
+ className: classNames?.actions,
1377
+ children: actions
1378
+ }) : null
1379
+ ]
1380
+ })]
1158
1381
  });
1159
1382
  }
1160
1383
  function CardMedia({ className, ...rest }) {
@@ -1212,12 +1435,17 @@ var Card = Object.assign(CardRoot, {
1212
1435
  });
1213
1436
  //#endregion
1214
1437
  //#region src/StatCard.tsx
1438
+ function trendIntent(direction) {
1439
+ if (direction === "down") return "negative";
1440
+ if (direction === "flat") return "neutral";
1441
+ return "positive";
1442
+ }
1215
1443
  /**
1216
1444
  * Compact KPI tile (label / value / detail) on a `.card` shell, so it shares
1217
1445
  * every card modifier — `compact`/`bordered` map to `.card-compact`/`.card-bordered`.
1218
1446
  * Free-form tiles: `<Card>`; label/value tables: `<PropertyList>`.
1219
1447
  */
1220
- function StatCard({ variant = "default", label, value, detail, icon, compact, bordered, className, children, ...rest }) {
1448
+ function StatCard({ variant = "default", label, value, detail, trend, icon, compact, bordered, className, classNames, children, ...rest }) {
1221
1449
  const hasLabel = label !== void 0;
1222
1450
  return /* @__PURE__ */ jsxs("div", {
1223
1451
  className: cn([
@@ -1230,15 +1458,21 @@ function StatCard({ variant = "default", label, value, detail, icon, compact, bo
1230
1458
  ...rest,
1231
1459
  children: [
1232
1460
  hasLabel ? /* @__PURE__ */ jsxs("p", {
1233
- className: cn("stat-card-label", void 0),
1461
+ className: cn("stat-card-label", classNames?.label),
1234
1462
  children: [renderIcon(icon), label]
1235
1463
  }) : null,
1236
1464
  value !== void 0 ? /* @__PURE__ */ jsx("p", {
1237
- className: cn("stat-card-value", void 0),
1465
+ className: cn("stat-card-value", classNames?.value),
1238
1466
  children: value
1239
1467
  }) : null,
1468
+ trend !== void 0 ? /* @__PURE__ */ jsx("p", {
1469
+ className: cn("stat-card-trend", classNames?.trend),
1470
+ "data-trend": trend.direction ?? "up",
1471
+ "data-intent": trend.intent ?? trendIntent(trend.direction ?? "up"),
1472
+ children: trend.value
1473
+ }) : null,
1240
1474
  detail !== void 0 ? /* @__PURE__ */ jsx("p", {
1241
- className: cn("stat-card-detail", void 0),
1475
+ className: cn("stat-card-detail", classNames?.detail),
1242
1476
  children: detail
1243
1477
  }) : null,
1244
1478
  children
@@ -1246,6 +1480,137 @@ function StatCard({ variant = "default", label, value, detail, icon, compact, bo
1246
1480
  });
1247
1481
  }
1248
1482
  //#endregion
1483
+ //#region src/Timeline.tsx
1484
+ function TimelineRoot({ numbered, className, ...rest }) {
1485
+ return /* @__PURE__ */ jsx("ol", {
1486
+ className: cn(["timeline", numbered && "timeline-numbered"], className),
1487
+ ...rest
1488
+ });
1489
+ }
1490
+ function TimelineItem({ status = "default", icon, marker, title, time, description, className, classNames, children, ...rest }) {
1491
+ let indicator;
1492
+ if (marker !== void 0) indicator = /* @__PURE__ */ jsx("span", {
1493
+ className: cn("timeline-marker", classNames?.marker),
1494
+ children: marker
1495
+ });
1496
+ else if (icon != null) indicator = renderIcon(icon);
1497
+ else indicator = /* @__PURE__ */ jsx("span", { className: cn("timeline-dot", classNames?.dot) });
1498
+ return /* @__PURE__ */ jsxs("li", {
1499
+ className: cn(["timeline-item", status !== "default" && `timeline-item-${status}`], className),
1500
+ ...rest,
1501
+ children: [/* @__PURE__ */ jsx("span", {
1502
+ className: cn("timeline-indicator", classNames?.indicator),
1503
+ children: indicator
1504
+ }), /* @__PURE__ */ jsxs("div", {
1505
+ className: cn("timeline-content", classNames?.content),
1506
+ children: [
1507
+ title !== void 0 ? /* @__PURE__ */ jsx("div", {
1508
+ className: cn("timeline-title", classNames?.title),
1509
+ children: title
1510
+ }) : null,
1511
+ time !== void 0 ? /* @__PURE__ */ jsx("div", {
1512
+ className: cn("timeline-time", classNames?.time),
1513
+ children: time
1514
+ }) : null,
1515
+ description !== void 0 ? /* @__PURE__ */ jsx("div", {
1516
+ className: cn("timeline-description", classNames?.description),
1517
+ children: description
1518
+ }) : null,
1519
+ children
1520
+ ]
1521
+ })]
1522
+ });
1523
+ }
1524
+ var Timeline = Object.assign(TimelineRoot, { Item: TimelineItem });
1525
+ //#endregion
1526
+ //#region src/Item.tsx
1527
+ /** The bare row primitive — just the `.item` shell, for layouts the default `<Item>` doesn't fit. */
1528
+ function ItemContainer({ variant = "default", size = "md", asLink, className, ...rest }) {
1529
+ return /* @__PURE__ */ jsx("div", {
1530
+ className: cn([
1531
+ "item",
1532
+ variant !== "default" && `item-${variant}`,
1533
+ size !== "md" && `item-${size}`,
1534
+ asLink && "item-link"
1535
+ ], className),
1536
+ ...rest
1537
+ });
1538
+ }
1539
+ function ItemMedia({ className, ...rest }) {
1540
+ return /* @__PURE__ */ jsx("div", {
1541
+ className: cn("item-media", className),
1542
+ ...rest
1543
+ });
1544
+ }
1545
+ function ItemContent({ className, ...rest }) {
1546
+ return /* @__PURE__ */ jsx("div", {
1547
+ className: cn("item-content", className),
1548
+ ...rest
1549
+ });
1550
+ }
1551
+ function ItemTitle({ className, ...rest }) {
1552
+ return /* @__PURE__ */ jsx("div", {
1553
+ className: cn("item-title", className),
1554
+ ...rest
1555
+ });
1556
+ }
1557
+ function ItemDescription({ className, ...rest }) {
1558
+ return /* @__PURE__ */ jsx("div", {
1559
+ className: cn("item-description", className),
1560
+ ...rest
1561
+ });
1562
+ }
1563
+ function ItemActions({ className, ...rest }) {
1564
+ return /* @__PURE__ */ jsx("div", {
1565
+ className: cn("item-actions", className),
1566
+ ...rest
1567
+ });
1568
+ }
1569
+ /** Opinionated row with media / title+description / actions shorthand. For other shapes, compose `<Item.Container>`. */
1570
+ function ItemRoot({ media, icon, title, description, actions, classNames, children, ...rest }) {
1571
+ const leading = media ?? renderIcon(icon);
1572
+ const hasContent = title !== void 0 || description !== void 0;
1573
+ return /* @__PURE__ */ jsxs(ItemContainer, {
1574
+ ...rest,
1575
+ children: [
1576
+ leading != null ? /* @__PURE__ */ jsx(ItemMedia, {
1577
+ className: classNames?.media,
1578
+ children: leading
1579
+ }) : null,
1580
+ hasContent ? /* @__PURE__ */ jsxs(ItemContent, {
1581
+ className: classNames?.content,
1582
+ children: [title !== void 0 ? /* @__PURE__ */ jsx(ItemTitle, {
1583
+ className: classNames?.title,
1584
+ children: title
1585
+ }) : null, description !== void 0 ? /* @__PURE__ */ jsx(ItemDescription, {
1586
+ className: classNames?.description,
1587
+ children: description
1588
+ }) : null]
1589
+ }) : null,
1590
+ children,
1591
+ actions !== void 0 ? /* @__PURE__ */ jsx(ItemActions, {
1592
+ className: classNames?.actions,
1593
+ children: actions
1594
+ }) : null
1595
+ ]
1596
+ });
1597
+ }
1598
+ /** Divided vertical stack of items. */
1599
+ function ItemGroup({ bordered, className, ...rest }) {
1600
+ return /* @__PURE__ */ jsx("div", {
1601
+ className: cn(["item-group", bordered && "item-group-bordered"], className),
1602
+ ...rest
1603
+ });
1604
+ }
1605
+ var Item = Object.assign(ItemRoot, {
1606
+ Container: ItemContainer,
1607
+ Media: ItemMedia,
1608
+ Content: ItemContent,
1609
+ Title: ItemTitle,
1610
+ Description: ItemDescription,
1611
+ Actions: ItemActions
1612
+ });
1613
+ //#endregion
1249
1614
  //#region src/chart-internal.ts
1250
1615
  /**
1251
1616
  * Multi-series palette of existing Flexoki tokens, not a new token layer. The
@@ -1489,24 +1854,15 @@ var StackedBar = Object.assign(StackedBarRoot, {
1489
1854
  Legend: ChartLegend
1490
1855
  });
1491
1856
  //#endregion
1492
- //#region src/Dialog.tsx
1857
+ //#region src/dialog-internal.ts
1493
1858
  var DialogContext = createContext(null);
1494
- function DefaultCloseIcon() {
1495
- return /* @__PURE__ */ jsxs("svg", {
1496
- width: "16",
1497
- height: "16",
1498
- viewBox: "0 0 24 24",
1499
- fill: "none",
1500
- stroke: "currentColor",
1501
- strokeWidth: "2",
1502
- strokeLinecap: "round",
1503
- strokeLinejoin: "round",
1504
- "aria-hidden": "true",
1505
- children: [/* @__PURE__ */ jsx("path", { d: "M18 6 6 18" }), /* @__PURE__ */ jsx("path", { d: "m6 6 12 12" })]
1506
- });
1507
- }
1508
- /** The bare `<dialog>` primitive — for layouts the default `<Dialog>` doesn't fit. */
1509
- function DialogContainer({ open, onOpenChange, size = "md", closedby = "any", className, children, ref: consumerRef, ...rest }) {
1859
+ /**
1860
+ * Drives a native `<dialog>` from a controlled `open` prop, shared by `<Dialog>`
1861
+ * and `<Drawer>`: merges the consumer ref, calls `showModal()` / `close()` on
1862
+ * change, and reports closes (Esc, backdrop, form submit) via `onOpenChange`.
1863
+ * Returns `ref` for the portal container context.
1864
+ */
1865
+ function useDialogElement(open, onOpenChange, consumerRef) {
1510
1866
  const ref = useRef(null);
1511
1867
  const onOpenChangeRef = useRef(onOpenChange);
1512
1868
  onOpenChangeRef.current = onOpenChange;
@@ -1528,8 +1884,33 @@ function DialogContainer({ open, onOpenChange, size = "md", closedby = "any", cl
1528
1884
  el.addEventListener("close", handleClose);
1529
1885
  return () => el.removeEventListener("close", handleClose);
1530
1886
  }, []);
1887
+ return {
1888
+ setRef,
1889
+ ctx: { close: () => ref.current?.close() },
1890
+ ref
1891
+ };
1892
+ }
1893
+ //#endregion
1894
+ //#region src/Dialog.tsx
1895
+ function DefaultCloseIcon() {
1896
+ return /* @__PURE__ */ jsxs("svg", {
1897
+ width: "16",
1898
+ height: "16",
1899
+ viewBox: "0 0 24 24",
1900
+ fill: "none",
1901
+ stroke: "currentColor",
1902
+ strokeWidth: "2",
1903
+ strokeLinecap: "round",
1904
+ strokeLinejoin: "round",
1905
+ "aria-hidden": "true",
1906
+ children: [/* @__PURE__ */ jsx("path", { d: "M18 6 6 18" }), /* @__PURE__ */ jsx("path", { d: "m6 6 12 12" })]
1907
+ });
1908
+ }
1909
+ /** The bare `<dialog>` primitive — for layouts the default `<Dialog>` doesn't fit. */
1910
+ function DialogContainer({ open, onOpenChange, size = "md", closedby = "any", className, children, ref: consumerRef, ...rest }) {
1911
+ const { setRef, ctx, ref } = useDialogElement(open, onOpenChange, consumerRef);
1531
1912
  return /* @__PURE__ */ jsx(DialogContext.Provider, {
1532
- value: { close: () => ref.current?.close() },
1913
+ value: ctx,
1533
1914
  children: /* @__PURE__ */ jsx(PortalContainerContext.Provider, {
1534
1915
  value: ref,
1535
1916
  children: /* @__PURE__ */ jsx("dialog", {
@@ -1588,19 +1969,35 @@ function DialogCloseButton({ icon, className, children, onClick, type = "button"
1588
1969
  });
1589
1970
  }
1590
1971
  /** Standard modal with shorthand-driven header/body/footer. For other shapes, compose `<Dialog.Container>` by hand. */
1591
- function DialogRoot({ icon, title, description, actions, dismissible = true, closeLabel = "Close", children, ...containerProps }) {
1972
+ function DialogRoot({ icon, title, description, actions, dismissible = true, closeLabel = "Close", classNames, children, ...containerProps }) {
1592
1973
  const hasTitle = title !== void 0 || icon !== void 0;
1593
1974
  const showHeader = hasTitle || dismissible;
1594
1975
  return /* @__PURE__ */ jsxs(DialogContainer, {
1595
1976
  ...containerProps,
1596
1977
  children: [
1597
- showHeader ? /* @__PURE__ */ jsxs(DialogHeader, { children: [hasTitle ? /* @__PURE__ */ jsx(DialogTitle, {
1598
- icon,
1599
- children: title
1600
- }) : /* @__PURE__ */ jsx("span", { className: cn("flex-1", void 0) }), dismissible ? /* @__PURE__ */ jsx(DialogCloseButton, { "aria-label": closeLabel }) : null] }) : null,
1601
- description !== void 0 ? /* @__PURE__ */ jsx(DialogDescription, { children: description }) : null,
1602
- children !== void 0 ? /* @__PURE__ */ jsx(DialogBody, { children }) : null,
1603
- actions !== void 0 ? /* @__PURE__ */ jsx(DialogFooter, { children: actions }) : null
1978
+ showHeader ? /* @__PURE__ */ jsxs(DialogHeader, {
1979
+ className: classNames?.header,
1980
+ children: [hasTitle ? /* @__PURE__ */ jsx(DialogTitle, {
1981
+ icon,
1982
+ className: classNames?.title,
1983
+ children: title
1984
+ }) : /* @__PURE__ */ jsx("span", { className: cn("flex-1", void 0) }), dismissible ? /* @__PURE__ */ jsx(DialogCloseButton, {
1985
+ "aria-label": closeLabel,
1986
+ className: classNames?.close
1987
+ }) : null]
1988
+ }) : null,
1989
+ description !== void 0 ? /* @__PURE__ */ jsx(DialogDescription, {
1990
+ className: classNames?.description,
1991
+ children: description
1992
+ }) : null,
1993
+ children !== void 0 ? /* @__PURE__ */ jsx(DialogBody, {
1994
+ className: classNames?.body,
1995
+ children
1996
+ }) : null,
1997
+ actions !== void 0 ? /* @__PURE__ */ jsx(DialogFooter, {
1998
+ className: classNames?.footer,
1999
+ children: actions
2000
+ }) : null
1604
2001
  ]
1605
2002
  });
1606
2003
  }
@@ -1614,6 +2011,73 @@ var Dialog = Object.assign(DialogRoot, {
1614
2011
  CloseButton: DialogCloseButton
1615
2012
  });
1616
2013
  //#endregion
2014
+ //#region src/Drawer.tsx
2015
+ /** The bare edge-anchored `<dialog>` primitive — for layouts the default `<Drawer>` doesn't fit. */
2016
+ function DrawerContainer({ open, onOpenChange, side = "end", size = "md", closedby = "any", className, children, ref: consumerRef, ...rest }) {
2017
+ const { setRef, ctx, ref } = useDialogElement(open, onOpenChange, consumerRef);
2018
+ return /* @__PURE__ */ jsx(DialogContext.Provider, {
2019
+ value: ctx,
2020
+ children: /* @__PURE__ */ jsx(PortalContainerContext.Provider, {
2021
+ value: ref,
2022
+ children: /* @__PURE__ */ jsx("dialog", {
2023
+ ref: setRef,
2024
+ className: cn([
2025
+ "dialog",
2026
+ "drawer",
2027
+ side !== "end" && `drawer-${side}`,
2028
+ size !== "md" && `drawer-${size}`
2029
+ ], className),
2030
+ closedby,
2031
+ ...rest,
2032
+ children
2033
+ })
2034
+ })
2035
+ });
2036
+ }
2037
+ /** Edge-anchored panel with shorthand-driven header/body/footer. For other shapes, compose `<Drawer.Container>`. */
2038
+ function DrawerRoot({ icon, title, description, actions, dismissible = true, closeLabel = "Close", classNames, children, ...containerProps }) {
2039
+ const hasTitle = title !== void 0 || icon !== void 0;
2040
+ const showHeader = hasTitle || dismissible;
2041
+ return /* @__PURE__ */ jsxs(DrawerContainer, {
2042
+ ...containerProps,
2043
+ children: [
2044
+ showHeader ? /* @__PURE__ */ jsxs(Dialog.Header, {
2045
+ className: classNames?.header,
2046
+ children: [hasTitle ? /* @__PURE__ */ jsx(Dialog.Title, {
2047
+ icon,
2048
+ className: classNames?.title,
2049
+ children: title
2050
+ }) : /* @__PURE__ */ jsx("span", { className: cn("flex-1", void 0) }), dismissible ? /* @__PURE__ */ jsx(Dialog.CloseButton, {
2051
+ "aria-label": closeLabel,
2052
+ className: classNames?.close
2053
+ }) : null]
2054
+ }) : null,
2055
+ description !== void 0 ? /* @__PURE__ */ jsx(Dialog.Description, {
2056
+ className: classNames?.description,
2057
+ children: description
2058
+ }) : null,
2059
+ children !== void 0 ? /* @__PURE__ */ jsx(Dialog.Body, {
2060
+ className: classNames?.body,
2061
+ children
2062
+ }) : null,
2063
+ actions !== void 0 ? /* @__PURE__ */ jsx(Dialog.Footer, {
2064
+ className: classNames?.footer,
2065
+ children: actions
2066
+ }) : null
2067
+ ]
2068
+ });
2069
+ }
2070
+ /** Shares the Dialog header/body/footer subparts; only the container differs. */
2071
+ var Drawer = Object.assign(DrawerRoot, {
2072
+ Container: DrawerContainer,
2073
+ Header: Dialog.Header,
2074
+ Title: Dialog.Title,
2075
+ Description: Dialog.Description,
2076
+ Body: Dialog.Body,
2077
+ Footer: Dialog.Footer,
2078
+ CloseButton: Dialog.CloseButton
2079
+ });
2080
+ //#endregion
1617
2081
  //#region src/Field.tsx
1618
2082
  /** The bare `.field` container — for layouts the default `<Field>` doesn't fit. */
1619
2083
  function FieldContainer({ className, ...rest }) {
@@ -1623,14 +2087,19 @@ function FieldContainer({ className, ...rest }) {
1623
2087
  });
1624
2088
  }
1625
2089
  /** Standard field — label, control (`children`), description, error. For other shapes, compose `<Field.Container>` by hand. */
1626
- function FieldRoot({ label, description, error, required, inline, className, children, ...rest }) {
2090
+ function FieldRoot({ label, description, error, required, inline, className, classNames, children, ...rest }) {
1627
2091
  const labelEl = label !== void 0 ? /* @__PURE__ */ jsx(FieldLabel, {
1628
2092
  required,
2093
+ className: classNames?.label,
1629
2094
  children: label
1630
2095
  }) : null;
1631
- const descriptionEl = description !== void 0 ? /* @__PURE__ */ jsx(FieldDescription, { children: description }) : null;
2096
+ const descriptionEl = description !== void 0 ? /* @__PURE__ */ jsx(FieldDescription, {
2097
+ className: classNames?.description,
2098
+ children: description
2099
+ }) : null;
1632
2100
  const errorEl = error !== void 0 ? /* @__PURE__ */ jsx(FieldError, {
1633
2101
  match: true,
2102
+ className: classNames?.error,
1634
2103
  children: error
1635
2104
  }) : null;
1636
2105
  return /* @__PURE__ */ jsxs(FieldContainer, {
@@ -1721,17 +2190,41 @@ function MenuPopup({ className, role = "menu", ...rest }) {
1721
2190
  ...rest
1722
2191
  });
1723
2192
  }
2193
+ function CheckIcon() {
2194
+ return /* @__PURE__ */ jsx("svg", {
2195
+ width: "1em",
2196
+ height: "1em",
2197
+ viewBox: "0 0 24 24",
2198
+ fill: "none",
2199
+ stroke: "currentColor",
2200
+ strokeWidth: "2",
2201
+ strokeLinecap: "round",
2202
+ strokeLinejoin: "round",
2203
+ "aria-hidden": "true",
2204
+ children: /* @__PURE__ */ jsx("path", { d: "M5 12l5 5l10 -10" })
2205
+ });
2206
+ }
2207
+ function MenuItemIndicator() {
2208
+ return /* @__PURE__ */ jsx("span", {
2209
+ className: cn("menu-item-indicator", void 0),
2210
+ children: /* @__PURE__ */ jsx(CheckIcon, {})
2211
+ });
2212
+ }
1724
2213
  function MenuItem(props) {
1725
2214
  const ref = useRef(null);
1726
2215
  const hotkey = props.hotkey;
2216
+ const checked = props.checked;
1727
2217
  const ariaDisabled = props["aria-disabled"];
1728
2218
  const isDisabled = "disabled" in props && props.disabled === true || ariaDisabled === true || ariaDisabled === "true";
1729
2219
  const { ariaKeyShortcuts, primaryChord } = useHotkey(hotkey, () => ref.current?.click(), { enabled: !isDisabled });
2220
+ const leading = checked !== void 0 ? /* @__PURE__ */ jsx(MenuItemIndicator, {}) : renderIcon(props.icon);
2221
+ const defaultRole = checked !== void 0 ? "menuitemcheckbox" : "menuitem";
1730
2222
  if (props.href !== void 0) {
1731
- const { className, role = "menuitem", icon, children, hotkey: _hk, onClick, ...rest } = props;
2223
+ const { className, role, icon: _icon, checked: _checked, children, hotkey: _hk, onClick, ...rest } = props;
1732
2224
  return /* @__PURE__ */ jsxs("a", {
1733
2225
  ref,
1734
- role,
2226
+ role: role ?? defaultRole,
2227
+ "aria-checked": checked,
1735
2228
  "aria-keyshortcuts": ariaKeyShortcuts,
1736
2229
  className: cn("menu-item", className),
1737
2230
  onClick: (event) => {
@@ -1743,22 +2236,23 @@ function MenuItem(props) {
1743
2236
  },
1744
2237
  ...rest,
1745
2238
  children: [
1746
- renderIcon(icon),
2239
+ leading,
1747
2240
  children,
1748
2241
  primaryChord !== void 0 ? /* @__PURE__ */ jsx(Kbd, { keys: primaryChord }) : null
1749
2242
  ]
1750
2243
  });
1751
2244
  }
1752
- const { className, type = "button", role = "menuitem", icon, children, hotkey: _hk, ...rest } = props;
2245
+ const { className, type = "button", role, icon: _icon, checked: _checked, children, hotkey: _hk, ...rest } = props;
1753
2246
  return /* @__PURE__ */ jsxs("button", {
1754
2247
  ref,
1755
2248
  type,
1756
- role,
2249
+ role: role ?? defaultRole,
2250
+ "aria-checked": checked,
1757
2251
  "aria-keyshortcuts": ariaKeyShortcuts,
1758
2252
  className: cn("menu-item", className),
1759
2253
  ...rest,
1760
2254
  children: [
1761
- renderIcon(icon),
2255
+ leading,
1762
2256
  children,
1763
2257
  primaryChord !== void 0 ? /* @__PURE__ */ jsx(Kbd, { keys: primaryChord }) : null
1764
2258
  ]
@@ -1945,7 +2439,7 @@ function TooltipPopup({ size = "md", side = "top", align = "center", sideOffset
1945
2439
  })
1946
2440
  });
1947
2441
  }
1948
- function TooltipShorthand({ content, side, align, sideOffset, size, children, ...rootProps }) {
2442
+ function TooltipShorthand({ content, side, align, sideOffset, size, classNames, children, ...rootProps }) {
1949
2443
  return /* @__PURE__ */ jsxs(TooltipRoot, {
1950
2444
  ...rootProps,
1951
2445
  children: [/* @__PURE__ */ jsx(Tooltip$1.Trigger, { render: children }), /* @__PURE__ */ jsx(TooltipPopup, {
@@ -1953,6 +2447,7 @@ function TooltipShorthand({ content, side, align, sideOffset, size, children, ..
1953
2447
  align,
1954
2448
  sideOffset,
1955
2449
  size,
2450
+ className: classNames?.popup,
1956
2451
  children: content
1957
2452
  })]
1958
2453
  });
@@ -1997,7 +2492,7 @@ function CheckGlyph({ className }) {
1997
2492
  children: /* @__PURE__ */ jsx("path", { d: "M5 12l5 5l10 -10" })
1998
2493
  });
1999
2494
  }
2000
- function PropertyListRoot({ striped, compact, hideIfAllEmpty, title, className, children, ...rest }) {
2495
+ function PropertyListRoot({ striped, compact, hideIfAllEmpty, title, className, classNames, children, ...rest }) {
2001
2496
  return /* @__PURE__ */ jsxs("section", {
2002
2497
  className: cn([
2003
2498
  "property-list",
@@ -2007,10 +2502,10 @@ function PropertyListRoot({ striped, compact, hideIfAllEmpty, title, className,
2007
2502
  ], className),
2008
2503
  ...rest,
2009
2504
  children: [title !== void 0 ? /* @__PURE__ */ jsx("h3", {
2010
- className: cn("property-list-title", void 0),
2505
+ className: cn("property-list-title", classNames?.title),
2011
2506
  children: title
2012
2507
  }) : null, /* @__PURE__ */ jsx("dl", {
2013
- className: cn("property-list-items", void 0),
2508
+ className: cn("property-list-items", classNames?.items),
2014
2509
  children
2015
2510
  })]
2016
2511
  });
@@ -2020,14 +2515,18 @@ function isEmptyValue(value) {
2020
2515
  if (typeof value === "string") return value.trim() === "";
2021
2516
  return false;
2022
2517
  }
2023
- function PropertyListItem({ label, value, numeric, copyable, copyValue, children, ...rest }) {
2518
+ function PropertyListItem({ label, value, numeric, copyable, copyValue, classNames, children, ...rest }) {
2024
2519
  if (children !== void 0) return /* @__PURE__ */ jsx(Fragment, { children });
2025
2520
  const empty = isEmptyValue(value);
2026
- return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(PropertyListLabel, { children: label }), /* @__PURE__ */ jsx(PropertyListValue, {
2521
+ return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(PropertyListLabel, {
2522
+ className: classNames?.label,
2523
+ children: label
2524
+ }), /* @__PURE__ */ jsx(PropertyListValue, {
2027
2525
  numeric,
2028
2526
  copyable,
2029
2527
  empty,
2030
2528
  copyValue: copyValue ?? (typeof value === "string" ? value : void 0),
2529
+ classNames: classNames?.copy ? { copy: classNames.copy } : void 0,
2031
2530
  ...rest,
2032
2531
  children: empty ? "—" : value
2033
2532
  })] });
@@ -2038,7 +2537,7 @@ function PropertyListLabel({ className, ...rest }) {
2038
2537
  ...rest
2039
2538
  });
2040
2539
  }
2041
- function PropertyListValue({ numeric, copyable, empty, copyValue, className, children, ...rest }) {
2540
+ function PropertyListValue({ numeric, copyable, empty, copyValue, className, classNames, children, ...rest }) {
2042
2541
  const ddRef = useRef(null);
2043
2542
  const [copied, setCopied] = useState(false);
2044
2543
  async function handleCopy() {
@@ -2062,7 +2561,7 @@ function PropertyListValue({ numeric, copyable, empty, copyValue, className, chi
2062
2561
  children: [children, /* @__PURE__ */ jsxs("button", {
2063
2562
  type: "button",
2064
2563
  "aria-label": "Copy",
2065
- className: cn("property-list-copy", void 0),
2564
+ className: cn("property-list-copy", classNames?.copy),
2066
2565
  onClick: handleCopy,
2067
2566
  "data-copied": copied ? "true" : void 0,
2068
2567
  children: [/* @__PURE__ */ jsx(CopyGlyph, { className: cn("property-list-copy-icon", void 0) }), /* @__PURE__ */ jsx(CheckGlyph, { className: cn("property-list-copy-icon-copied", void 0) })]
@@ -2076,14 +2575,17 @@ var PropertyList = Object.assign(PropertyListRoot, {
2076
2575
  });
2077
2576
  //#endregion
2078
2577
  //#region src/Table.tsx
2079
- function TableRoot({ striped, bordered, relaxed, sticky, className, ...rest }) {
2578
+ function TableRoot({ striped, bordered, density, relaxed, sticky, pinCol, className, ...rest }) {
2579
+ const resolvedDensity = density ?? (relaxed ? "relaxed" : "default");
2080
2580
  return /* @__PURE__ */ jsx("table", {
2081
2581
  className: cn([
2082
2582
  "table",
2083
2583
  striped && "table-striped",
2084
2584
  bordered && "table-bordered",
2085
- relaxed && "table-relaxed",
2086
- sticky && "table-sticky"
2585
+ resolvedDensity === "compact" && "table-compact",
2586
+ resolvedDensity === "relaxed" && "table-relaxed",
2587
+ sticky && "table-sticky",
2588
+ pinCol && "table-pin-col"
2087
2589
  ], className),
2088
2590
  ...rest
2089
2591
  });
@@ -2133,18 +2635,28 @@ function TableCell({ align, gutter, numeric, className, ...rest }) {
2133
2635
  ...rest
2134
2636
  });
2135
2637
  }
2638
+ /** A centered "no results" row; renders its own `<tr>`, so drop it inside `<Table.Body>`. */
2639
+ function TableEmpty({ colSpan, className, children, ...rest }) {
2640
+ return /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx("td", {
2641
+ className: cn("table-empty", className),
2642
+ colSpan,
2643
+ ...rest,
2644
+ children
2645
+ }) });
2646
+ }
2136
2647
  var Table = Object.assign(TableRoot, {
2137
2648
  Head: TableHead,
2138
2649
  Body: TableBody,
2139
2650
  Foot: TableFoot,
2140
2651
  Row: TableRow,
2141
2652
  HeaderCell: TableHeaderCell,
2142
- Cell: TableCell
2653
+ Cell: TableCell,
2654
+ Empty: TableEmpty
2143
2655
  });
2144
2656
  //#endregion
2145
2657
  //#region src/Sidebar.tsx
2146
2658
  var SidebarContext = createContext(null);
2147
- function SidebarRoot({ collapsed, defaultCollapsed, onCollapsedChange, drawerLabel = "Navigation", className, children, ...rest }) {
2659
+ function SidebarRoot({ collapsed, defaultCollapsed, onCollapsedChange, drawerLabel = "Navigation", className, classNames, children, ...rest }) {
2148
2660
  const shell = useAppShell();
2149
2661
  const drawerOpen = shell?.mobileDrawerOpen ?? false;
2150
2662
  return /* @__PURE__ */ jsxs(SidebarContext.Provider, {
@@ -2160,8 +2672,8 @@ function SidebarRoot({ collapsed, defaultCollapsed, onCollapsedChange, drawerLab
2160
2672
  }), shell ? /* @__PURE__ */ jsx(Dialog$1.Root, {
2161
2673
  open: drawerOpen,
2162
2674
  onOpenChange: (open) => shell.setMobileDrawerOpen(open),
2163
- children: /* @__PURE__ */ jsxs(Dialog$1.Portal, { children: [/* @__PURE__ */ jsx(Dialog$1.Backdrop, { className: cn("sidebar-drawer-backdrop", void 0) }), /* @__PURE__ */ jsx(Dialog$1.Popup, {
2164
- className: cn("sidebar-drawer", void 0),
2675
+ children: /* @__PURE__ */ jsxs(Dialog$1.Portal, { children: [/* @__PURE__ */ jsx(Dialog$1.Backdrop, { className: cn("sidebar-drawer-backdrop", classNames?.drawerBackdrop) }), /* @__PURE__ */ jsx(Dialog$1.Popup, {
2676
+ className: cn("sidebar-drawer", classNames?.drawer),
2165
2677
  "aria-label": drawerLabel,
2166
2678
  onClick: (event) => {
2167
2679
  if (event.target.closest("a, [data-drawer-close]")) shell.setMobileDrawerOpen(false);
@@ -2195,15 +2707,24 @@ function SidebarGroupLabel({ className, ...rest }) {
2195
2707
  ...rest
2196
2708
  });
2197
2709
  }
2198
- function SidebarItem({ active, icon, badge, className, children, ...rest }) {
2710
+ function SidebarItem({ active, icon, badge, className, classNames, children, ...rest }) {
2199
2711
  return /* @__PURE__ */ jsxs("a", {
2200
2712
  className: cn("sidebar-item", className),
2201
2713
  "aria-current": active ? "page" : void 0,
2202
2714
  ...rest,
2203
2715
  children: [
2204
- icon != null ? /* @__PURE__ */ jsx(SidebarIcon, { children: renderIcon(icon) }) : null,
2205
- children !== void 0 ? /* @__PURE__ */ jsx(SidebarLabel, { children }) : null,
2206
- badge !== void 0 ? /* @__PURE__ */ jsx(SidebarBadge, { children: badge }) : null
2716
+ icon != null ? /* @__PURE__ */ jsx(SidebarIcon, {
2717
+ className: classNames?.icon,
2718
+ children: renderIcon(icon)
2719
+ }) : null,
2720
+ children !== void 0 ? /* @__PURE__ */ jsx(SidebarLabel, {
2721
+ className: classNames?.label,
2722
+ children
2723
+ }) : null,
2724
+ badge !== void 0 ? /* @__PURE__ */ jsx(SidebarBadge, {
2725
+ className: classNames?.badge,
2726
+ children: badge
2727
+ }) : null
2207
2728
  ]
2208
2729
  });
2209
2730
  }
@@ -2226,11 +2747,17 @@ function SidebarBadge({ className, ...rest }) {
2226
2747
  ...rest
2227
2748
  });
2228
2749
  }
2229
- function SidebarCollapsible({ icon, label, trigger, children, className, open, defaultOpen, onOpenChange, ...rest }) {
2750
+ function SidebarCollapsible({ icon, label, trigger, children, className, classNames, open, defaultOpen, onOpenChange, ...rest }) {
2230
2751
  const isControlled = open !== void 0;
2231
2752
  const [internalOpen, setInternalOpen] = useState(defaultOpen ?? false);
2232
2753
  const isOpen = isControlled ? open : internalOpen;
2233
- const triggerContent = trigger ?? /* @__PURE__ */ jsxs(Fragment, { children: [icon != null ? /* @__PURE__ */ jsx(SidebarIcon, { children: renderIcon(icon) }) : null, label !== void 0 ? /* @__PURE__ */ jsx(SidebarLabel, { children: label }) : null] });
2754
+ const triggerContent = trigger ?? /* @__PURE__ */ jsxs(Fragment, { children: [icon != null ? /* @__PURE__ */ jsx(SidebarIcon, {
2755
+ className: classNames?.icon,
2756
+ children: renderIcon(icon)
2757
+ }) : null, label !== void 0 ? /* @__PURE__ */ jsx(SidebarLabel, {
2758
+ className: classNames?.label,
2759
+ children: label
2760
+ }) : null] });
2234
2761
  return /* @__PURE__ */ jsxs("details", {
2235
2762
  className: cn("sidebar-collapsible", className),
2236
2763
  open: isOpen,
@@ -2241,23 +2768,29 @@ function SidebarCollapsible({ icon, label, trigger, children, className, open, d
2241
2768
  },
2242
2769
  ...rest,
2243
2770
  children: [/* @__PURE__ */ jsx("summary", {
2244
- className: cn("sidebar-collapsible-trigger", void 0),
2771
+ className: cn("sidebar-collapsible-trigger", classNames?.trigger),
2245
2772
  children: triggerContent
2246
2773
  }), /* @__PURE__ */ jsx("div", {
2247
- className: cn("sidebar-collapsible-panel", void 0),
2774
+ className: cn("sidebar-collapsible-panel", classNames?.panel),
2248
2775
  children
2249
2776
  })]
2250
2777
  });
2251
2778
  }
2252
- function SidebarSubItem({ active, icon, badge, className, children, ...rest }) {
2779
+ function SidebarSubItem({ active, icon, badge, className, classNames, children, ...rest }) {
2253
2780
  return /* @__PURE__ */ jsxs("a", {
2254
2781
  className: cn("sidebar-subitem", className),
2255
2782
  "aria-current": active ? "page" : void 0,
2256
2783
  ...rest,
2257
2784
  children: [
2258
- icon != null ? /* @__PURE__ */ jsx(SidebarIcon, { children: renderIcon(icon) }) : null,
2785
+ icon != null ? /* @__PURE__ */ jsx(SidebarIcon, {
2786
+ className: classNames?.icon,
2787
+ children: renderIcon(icon)
2788
+ }) : null,
2259
2789
  children,
2260
- badge !== void 0 ? /* @__PURE__ */ jsx(SidebarBadge, { children: badge }) : null
2790
+ badge !== void 0 ? /* @__PURE__ */ jsx(SidebarBadge, {
2791
+ className: classNames?.badge,
2792
+ children: badge
2793
+ }) : null
2261
2794
  ]
2262
2795
  });
2263
2796
  }
@@ -2267,7 +2800,7 @@ function SidebarFooter({ className, ...rest }) {
2267
2800
  ...rest
2268
2801
  });
2269
2802
  }
2270
- function SidebarCollapseToggle({ label = "Toggle sidebar", className, children, ...rest }) {
2803
+ function SidebarCollapseToggle({ label = "Toggle sidebar", className, classNames, children, ...rest }) {
2271
2804
  const ctx = useContext(SidebarContext);
2272
2805
  const controlledChecked = ctx?.collapsed;
2273
2806
  const isControlled = controlledChecked !== void 0;
@@ -2277,7 +2810,7 @@ function SidebarCollapseToggle({ label = "Toggle sidebar", className, children,
2277
2810
  children: [
2278
2811
  /* @__PURE__ */ jsx("input", {
2279
2812
  type: "checkbox",
2280
- className: cn("sidebar-toggle", void 0),
2813
+ className: cn("sidebar-toggle", classNames?.input),
2281
2814
  "aria-label": label,
2282
2815
  ...isControlled ? { checked: controlledChecked } : { defaultChecked: ctx?.defaultCollapsed },
2283
2816
  onChange: (event) => ctx?.onCollapsedChange?.(event.currentTarget.checked)
@@ -2305,6 +2838,6 @@ var Sidebar = Object.assign(SidebarRoot, {
2305
2838
  CollapseToggle: SidebarCollapseToggle
2306
2839
  });
2307
2840
  //#endregion
2308
- export { Accordion, AdminRoot, Alert, AppShell, Avatar, AvatarGroup, Badge, BarChart, BrandTile, Breadcrumbs, Button, ButtonGroup, Card, ChartLegend, Checkbox, CodeBlock, Container, Dialog, Donut, Field, FileInput, Footer, Indicator, Input, InputGroup, Kbd, Link, Menu, Navbar, Pagination, Progress, PropertyList, Prose, Radio, RadioGroup, SERIES, Select, Separator, Sidebar, Spinner, StackedBar, StatCard, Switch, Table, Tabs, Textarea, Tooltip, getPaginationItems, useAppShell, useHotkey };
2841
+ export { Accordion, AdminRoot, Alert, AppShell, Avatar, AvatarGroup, Badge, BarChart, BrandTile, Breadcrumbs, Button, ButtonGroup, Card, ChartLegend, Checkbox, CodeBlock, Container, Dialog, Donut, Drawer, Field, FileInput, Footer, Indicator, Input, InputGroup, Item, ItemGroup, Kbd, Link, Menu, Navbar, NumberInput, Pagination, PasswordInput, Progress, PropertyList, Prose, Radio, RadioGroup, SERIES, Select, Separator, Sidebar, Spinner, StackedBar, StatCard, Switch, Table, Tabs, Textarea, Timeline, Tooltip, getPaginationItems, useAppShell, useHotkey };
2309
2842
 
2310
2843
  //# sourceMappingURL=index.mjs.map