@dreamtree-org/twreact-ui 1.3.3 → 1.3.5

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 (53) hide show
  1. package/README.md +13 -6
  2. package/ai-skills/dreamtree-ui.md +5 -1
  3. package/dist/ai-schema.json +46 -3
  4. package/dist/components/core/Button.d.ts.map +1 -1
  5. package/dist/components/core/Radio.d.ts.map +1 -1
  6. package/dist/components/core/Select.d.ts.map +1 -1
  7. package/dist/components/core/Table/MobileCard.d.ts.map +1 -1
  8. package/dist/components/core/Table/TableRow.d.ts.map +1 -1
  9. package/dist/components/core/Table/helpers.d.ts +12 -0
  10. package/dist/components/core/Table/helpers.d.ts.map +1 -1
  11. package/dist/components/feedback/Dialog.d.ts.map +1 -1
  12. package/dist/components/feedback/Drawer.d.ts.map +1 -1
  13. package/dist/components/navigation/FootNav.d.ts.map +1 -1
  14. package/dist/components/utility/Badge.d.ts.map +1 -1
  15. package/dist/components/utility/Stepper.d.ts.map +1 -1
  16. package/dist/esm/components/blocks/StatusPill.js +1 -1
  17. package/dist/esm/components/core/Button.js +23 -6
  18. package/dist/esm/components/core/Radio.js +3 -2
  19. package/dist/esm/components/core/Select.js +12 -2
  20. package/dist/esm/components/core/Table/ActionMenu.js +5 -5
  21. package/dist/esm/components/core/Table/ColumnMenu.js +1 -1
  22. package/dist/esm/components/core/Table/FieldInput.js +5 -5
  23. package/dist/esm/components/core/Table/MobileCard.js +9 -10
  24. package/dist/esm/components/core/Table/MobileFilters.js +1 -1
  25. package/dist/esm/components/core/Table/Pagination.js +1 -1
  26. package/dist/esm/components/core/Table/Table.js +12 -12
  27. package/dist/esm/components/core/Table/TableRow.js +10 -11
  28. package/dist/esm/components/core/Table/helpers.js +16 -1
  29. package/dist/esm/components/feedback/Dialog.js +4 -2
  30. package/dist/esm/components/feedback/Drawer.js +39 -10
  31. package/dist/esm/components/navigation/Dropdown.js +1 -1
  32. package/dist/esm/components/navigation/FootNav.js +41 -14
  33. package/dist/esm/components/navigation/Navbar.js +21 -21
  34. package/dist/esm/components/navigation/Sidebar.js +12 -12
  35. package/dist/esm/components/utility/Badge.js +1 -0
  36. package/dist/esm/components/utility/Card.js +5 -5
  37. package/dist/esm/components/utility/Stepper.js +5 -2
  38. package/dist/esm/hooks/useSwipeToClose.js +66 -0
  39. package/dist/esm/utils/touchTarget.js +6 -0
  40. package/dist/hooks/useSwipeToClose.d.ts +24 -0
  41. package/dist/hooks/useSwipeToClose.d.ts.map +1 -0
  42. package/dist/index.css +1 -1
  43. package/dist/index.esm.css +1 -1
  44. package/dist/index.esm.js +287 -121
  45. package/dist/index.js +287 -121
  46. package/dist/types/index.d.ts +29 -2
  47. package/dist/types/index.d.ts.map +1 -1
  48. package/dist/utils/touchTarget.d.ts +2 -0
  49. package/dist/utils/touchTarget.d.ts.map +1 -0
  50. package/doc/README.md +1 -1
  51. package/mcp/README.md +1 -1
  52. package/mcp/catalog.snapshot.json +60 -30
  53. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -3449,7 +3449,7 @@ var Input = /*#__PURE__*/React.forwardRef(function (props, forwardedRef) {
3449
3449
  });
3450
3450
  Input.displayName = "Input";
3451
3451
 
3452
- var _excluded$N = ["className", "variant", "size", "disabled", "loading", "children", "leftIcon", "rightIcon", "fullWidth"];
3452
+ var _excluded$N = ["className", "variant", "size", "disabled", "loading", "children", "leftIcon", "rightIcon", "fullWidth", "as", "onClick"];
3453
3453
  function ownKeys$T(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3454
3454
  function _objectSpread$T(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$T(Object(t), true).forEach(function (r) { _defineProperty$4(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$T(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
3455
3455
  var Button = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
@@ -3464,12 +3464,19 @@ var Button = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
3464
3464
  leftIcon = _ref.leftIcon,
3465
3465
  rightIcon = _ref.rightIcon,
3466
3466
  fullWidth = _ref.fullWidth,
3467
+ as = _ref.as,
3468
+ onClick = _ref.onClick,
3467
3469
  props = _objectWithoutProperties$1(_ref, _excluded$N);
3468
- var baseClasses = cn$1('inline-flex items-center justify-center rounded-md font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:opacity-50 disabled:pointer-events-none', {
3470
+ // `as` renders any element or component (an <a>, a router Link) with the
3471
+ // Button's look; a bare `href` implies an <a>.
3472
+ var Component = as || (props.href !== undefined ? 'a' : 'button');
3473
+ var isNativeButton = Component === 'button';
3474
+ var isDisabled = disabled || loading;
3475
+ var baseClasses = cn$1('inline-flex items-center justify-center rounded-md font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:opacity-50 disabled:pointer-events-none aria-disabled:opacity-50 aria-disabled:pointer-events-none', {
3469
3476
  // Variants
3470
3477
  'bg-primary-600 text-white hover:bg-primary-700 focus:ring-primary-500': variant === 'primary',
3471
3478
  'bg-secondary-100 text-secondary-900 hover:bg-secondary-200 focus:ring-secondary-500': variant === 'secondary',
3472
- 'bg-transparent border border-gray-300 hover:bg-gray-50 focus:ring-primary-500': variant === 'outline',
3479
+ 'bg-transparent border border-gray-300 hover:bg-gray-50 focus:ring-primary-500 dark:border-gray-600 dark:text-gray-100 dark:hover:bg-gray-800 dark:focus:ring-offset-gray-900': variant === 'outline',
3473
3480
  'bg-transparent text-primary-600 hover:bg-primary-50 focus:ring-primary-500': variant === 'ghost',
3474
3481
  'bg-error-600 text-white hover:bg-error-700 focus:ring-error-500': variant === 'destructive',
3475
3482
  'bg-success-600 text-white hover:bg-success-700 focus:ring-success-500': variant === 'success',
@@ -3484,10 +3491,20 @@ var Button = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
3484
3491
  // Full width
3485
3492
  'w-full': fullWidth
3486
3493
  }, className);
3487
- return jsxRuntime.jsxs("button", _objectSpread$T(_objectSpread$T({
3494
+ return jsxRuntime.jsxs(Component, _objectSpread$T(_objectSpread$T(_objectSpread$T({
3488
3495
  ref: ref,
3489
- className: baseClasses,
3490
- disabled: disabled || loading
3496
+ className: baseClasses
3497
+ }, isNativeButton ? {
3498
+ disabled: isDisabled
3499
+ }
3500
+ // Links can't be `disabled`: announce it and swallow the click instead.
3501
+ : isDisabled && {
3502
+ 'aria-disabled': true,
3503
+ tabIndex: -1
3504
+ }), {}, {
3505
+ onClick: !isNativeButton && isDisabled ? function (e) {
3506
+ return e.preventDefault();
3507
+ } : onClick
3491
3508
  }, props), {}, {
3492
3509
  children: [loading && jsxRuntime.jsx(Loader2, {
3493
3510
  className: "mr-2 h-4 w-4 animate-spin"
@@ -3534,7 +3551,7 @@ function useLatestRef(value) {
3534
3551
  return ref;
3535
3552
  }
3536
3553
 
3537
- var _excluded$M = ["options", "value", "onChange", "placeholder", "label", "error", "helperText", "disabled", "required", "multiSelect", "searchable", "grouped", "onMenuItemRender", "className", "allowClear", "creatable", "onCreateOption", "onSearch", "loading", "selectAllOption", "closeOnSelect", "maxTagCount", "renderGroupLabel", "name"];
3554
+ var _excluded$M = ["options", "value", "onChange", "placeholder", "label", "error", "helperText", "disabled", "required", "multiSelect", "searchable", "grouped", "onMenuItemRender", "className", "allowClear", "creatable", "onCreateOption", "onSearch", "loading", "selectAllOption", "closeOnSelect", "maxTagCount", "renderGroupLabel", "name", "size"];
3538
3555
  function ownKeys$S(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3539
3556
  function _objectSpread$S(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$S(Object(t), true).forEach(function (r) { _defineProperty$4(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$S(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
3540
3557
  /**
@@ -3635,6 +3652,14 @@ var highlight = function highlight() {
3635
3652
  }), label.slice(idx + term.length)]
3636
3653
  });
3637
3654
  };
3655
+ // Trigger sizes. min-h (not h) so multi-select tags can wrap. `md` keeps its
3656
+ // desktop look but grows to the 44px touch target on coarse pointers; `lg` is
3657
+ // 44px everywhere.
3658
+ var SIZE_CLASSES$1 = {
3659
+ sm: "min-h-8 px-2.5 py-1 text-xs",
3660
+ md: "min-h-[38px] px-3 py-2 text-sm [@media(pointer:coarse)]:min-h-11",
3661
+ lg: "min-h-11 px-4 py-2.5 text-base"
3662
+ };
3638
3663
  var Select = /*#__PURE__*/React.forwardRef(function (_ref, forwardedRef) {
3639
3664
  var _ref$options = _ref.options,
3640
3665
  options = _ref$options === void 0 ? [] : _ref$options,
@@ -3671,6 +3696,8 @@ var Select = /*#__PURE__*/React.forwardRef(function (_ref, forwardedRef) {
3671
3696
  maxTagCount = _ref$maxTagCount === void 0 ? 3 : _ref$maxTagCount,
3672
3697
  renderGroupLabel = _ref.renderGroupLabel,
3673
3698
  name = _ref.name,
3699
+ _ref$size = _ref.size,
3700
+ size = _ref$size === void 0 ? "md" : _ref$size,
3674
3701
  props = _objectWithoutProperties$1(_ref, _excluded$M);
3675
3702
  var _useState = React.useState(false),
3676
3703
  _useState2 = _slicedToArray(_useState, 2),
@@ -4241,7 +4268,7 @@ var Select = /*#__PURE__*/React.forwardRef(function (_ref, forwardedRef) {
4241
4268
  "aria-labelledby": label ? "".concat(labelId, " ").concat(valueId) : valueId,
4242
4269
  "aria-describedby": describedBy,
4243
4270
  "aria-invalid": error ? true : undefined,
4244
- className: cn$1("flex w-full items-center justify-between rounded-md border border-gray-300 px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent disabled:cursor-not-allowed disabled:opacity-50", {
4271
+ className: cn$1("flex w-full items-center justify-between rounded-md border border-gray-300 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent disabled:cursor-not-allowed disabled:opacity-50", SIZE_CLASSES$1[size] || SIZE_CLASSES$1.md, {
4245
4272
  "border-error-500 focus:ring-error-500": error,
4246
4273
  "text-primary-500": !selectedOptions.length,
4247
4274
  "pr-14": showClearButton
@@ -4822,6 +4849,21 @@ var getRowKey = function getRowKey(row, globalIndex) {
4822
4849
  if (row._id !== undefined && row._id !== null) return String(row._id);
4823
4850
  return String(globalIndex);
4824
4851
  };
4852
+ /**
4853
+ * A `stripedColors` entry is either a CSS colour ("#f7fafc", "rgb(...)") applied as an
4854
+ * inline background, or a Tailwind class ("bg-surface", "dark:bg-gray-900") applied as a
4855
+ * className. Returns the props to spread onto the striped element.
4856
+ */
4857
+ var getStripeProps = function getStripeProps(stripe) {
4858
+ if (!stripe) return {};
4859
+ return /(^|[\s:])bg-/.test(stripe) ? {
4860
+ className: stripe
4861
+ } : {
4862
+ style: {
4863
+ backgroundColor: stripe
4864
+ }
4865
+ };
4866
+ };
4825
4867
  /**
4826
4868
  * Resolve a value that may be supplied directly or as a per-row producer.
4827
4869
  * Used for an action's `label`, `icon`, `hidden` and `disabled`.
@@ -4959,7 +5001,7 @@ function useClickOutside(refs, isActive, onClickOutside) {
4959
5001
  * Pagination controls component for the table
4960
5002
  * Supports both header (icon-only) and footer (with page numbers) variants
4961
5003
  */
4962
- var DEFAULT_ROW_HOVER$1 = "bg-gray-50";
5004
+ var DEFAULT_ROW_HOVER$1 = "bg-background";
4963
5005
  // Header pagination (compact, icon-based)
4964
5006
  function PaginationHeader(_ref) {
4965
5007
  var _theme$rowHover;
@@ -5104,7 +5146,7 @@ function PaginationFooter(_ref2) {
5104
5146
  });
5105
5147
  }
5106
5148
 
5107
- var DEFAULT_ROW_HOVER = "bg-gray-50";
5149
+ var DEFAULT_ROW_HOVER = "bg-background";
5108
5150
  /**
5109
5151
  * Column visibility toggle menu
5110
5152
  */
@@ -5168,7 +5210,7 @@ function MobileFilters(_ref) {
5168
5210
  handleFilter = _ref.handleFilter;
5169
5211
  var idPrefix = React.useId();
5170
5212
  return jsxRuntime.jsxs("div", {
5171
- className: "mb-4 p-3 bg-gray-50 rounded-lg",
5213
+ className: "mb-4 p-3 bg-background rounded-lg",
5172
5214
  children: [jsxRuntime.jsxs("div", {
5173
5215
  className: "flex items-center justify-between mb-3",
5174
5216
  children: [jsxRuntime.jsx("h3", {
@@ -5225,8 +5267,8 @@ function MobileFilters(_ref) {
5225
5267
  });
5226
5268
  }
5227
5269
 
5228
- var DEFAULT_MENU_BG = "bg-white border border-gray-100 shadow-xl";
5229
- var DEFAULT_MENU_ITEM_HOVER = "opacity-75 hover:opacity-100 hover:bg-gray-100/80 active:bg-gray-200/80";
5270
+ var DEFAULT_MENU_BG = "bg-surface border border-line shadow-xl";
5271
+ var DEFAULT_MENU_ITEM_HOVER = "opacity-75 hover:opacity-100 hover:bg-gray-100/80 active:bg-gray-200/80 dark:hover:bg-gray-800 dark:active:bg-gray-700";
5230
5272
  function ActionMenu(_ref) {
5231
5273
  var _theme$menuBg, _theme$menuItemHover;
5232
5274
  var _ref$actions = _ref.actions,
@@ -5430,7 +5472,7 @@ function ActionMenu(_ref) {
5430
5472
  children: jsxRuntime.jsx("div", {
5431
5473
  className: "p-1.5 space-y-0.5",
5432
5474
  children: !Array.isArray(actions) || actions.length === 0 ? jsxRuntime.jsx("div", {
5433
- className: "px-3 py-2 text-sm text-gray-400 italic",
5475
+ className: "px-3 py-2 text-sm text-muted italic",
5434
5476
  children: "No actions"
5435
5477
  }) : actions.map(function (action, idx) {
5436
5478
  var _action$name;
@@ -5441,7 +5483,7 @@ function ActionMenu(_ref) {
5441
5483
  type: "button",
5442
5484
  disabled: isDisabled,
5443
5485
  "aria-disabled": isDisabled || undefined,
5444
- className: cn$1("w-full text-left px-3 py-2 text-sm flex items-center gap-2.5 rounded-lg transition-colors font-medium", isDisabled ? "opacity-50 cursor-not-allowed text-gray-400" : ["text-gray-700 hover:text-gray-900", menuItemHover, isFocused ? "bg-gray-100 text-gray-900 ring-1 ring-gray-300" : ""]),
5486
+ className: cn$1("w-full text-left px-3 py-2 text-sm flex items-center gap-2.5 rounded-lg transition-colors font-medium", isDisabled ? "opacity-50 cursor-not-allowed text-muted" : ["text-foreground", menuItemHover, isFocused ? "bg-gray-100 text-gray-900 ring-1 ring-gray-300 dark:bg-gray-800 dark:text-foreground dark:ring-gray-600" : ""]),
5445
5487
  onMouseEnter: function onMouseEnter() {
5446
5488
  return !isDisabled && setFocusedIndex(idx);
5447
5489
  },
@@ -5453,7 +5495,7 @@ function ActionMenu(_ref) {
5453
5495
  },
5454
5496
  children: action.render ? action.render(row) : jsxRuntime.jsxs(jsxRuntime.Fragment, {
5455
5497
  children: [action.icon && jsxRuntime.jsx("span", {
5456
- className: "inline-flex text-gray-500 flex-shrink-0",
5498
+ className: "inline-flex text-muted flex-shrink-0",
5457
5499
  children: action.icon
5458
5500
  }), jsxRuntime.jsx("span", {
5459
5501
  className: "truncate",
@@ -5548,6 +5590,7 @@ function TableRow(_ref) {
5548
5590
  var safeExtraRowClass = typeof extraRowClass === "string" ? extraRowClass.trim() : "";
5549
5591
  var stripeColors = theme === null || theme === void 0 ? void 0 : theme.stripedColors;
5550
5592
  var stripeBg = stripedRows && !isSelected && Array.isArray(stripeColors) && stripeColors.length > 0 ? stripeColors[globalIndex % stripeColors.length] : undefined;
5593
+ var stripeProps = getStripeProps(stripeBg);
5551
5594
  var rowKey = isNewRow ? row._key : key;
5552
5595
  var isRowActive = interactive && (activeCell === null || activeCell === void 0 ? void 0 : activeCell.rowKey) === rowKey;
5553
5596
  var effectiveRow = React.useMemo(function () {
@@ -5556,10 +5599,8 @@ function TableRow(_ref) {
5556
5599
  }, [interactive, pendingEdits, rowKey, row]);
5557
5600
  return jsxRuntime.jsxs(React.Fragment, {
5558
5601
  children: [jsxRuntime.jsxs("tr", {
5559
- style: stripeBg ? {
5560
- backgroundColor: stripeBg
5561
- } : undefined,
5562
- className: cn$1(theme !== null && theme !== void 0 && theme.rowHover ? ["hover:" + theme.rowHover] : [], {
5602
+ style: stripeProps.style,
5603
+ className: cn$1(stripeProps.className, theme !== null && theme !== void 0 && theme.rowHover ? ["hover:" + theme.rowHover] : [], {
5563
5604
  "cursor-pointer": !!onRowClick,
5564
5605
  "bg-primary-50": isSelected,
5565
5606
  "bg-primary-50/20": isRowActive && !isSelected,
@@ -5578,7 +5619,7 @@ function TableRow(_ref) {
5578
5619
  },
5579
5620
  "aria-expanded": isExpanded,
5580
5621
  "aria-label": isExpanded ? "Collapse row details" : "Expand row details",
5581
- className: "p-1 rounded hover:bg-gray-100",
5622
+ className: "p-1 rounded hover:bg-gray-100 dark:hover:bg-gray-800",
5582
5623
  children: isExpanded ? "▾" : "▸"
5583
5624
  })
5584
5625
  }), showSerial && jsxRuntime.jsx("td", {
@@ -5614,9 +5655,9 @@ function TableRow(_ref) {
5614
5655
  title: isCellInvalid ? "Field \"".concat(column.label || column.key, "\" is required or invalid") : undefined,
5615
5656
  className: cn$1("px-6 py-4 text-sm transition-all", wrapCell ? "whitespace-normal break-words" : "whitespace-nowrap", {
5616
5657
  "ring-2 ring-error-500 ring-inset bg-error-50/40 relative z-10": isCellInvalid && !isCellEditing,
5617
- "ring-2 ring-error-600 ring-inset bg-white p-1 z-20 relative": isCellEditing && isCellInvalid,
5658
+ "ring-2 ring-error-600 ring-inset bg-surface p-1 z-20 relative": isCellEditing && isCellInvalid,
5618
5659
  "ring-2 ring-primary-500 ring-inset bg-primary-50/50 relative z-10": isCellActive && !isCellEditing && !isCellInvalid,
5619
- "ring-2 ring-primary-600 ring-inset bg-white p-1 z-20 relative": isCellEditing && !isCellInvalid
5660
+ "ring-2 ring-primary-600 ring-inset bg-surface p-1 z-20 relative": isCellEditing && !isCellInvalid
5620
5661
  }, safeExtraCellClass),
5621
5662
  onClick: function onClick() {
5622
5663
  if (interactive && onCellClick) {
@@ -5663,7 +5704,7 @@ function TableRow(_ref) {
5663
5704
  if (action.disabled) return;
5664
5705
  handleOnAction(action, row);
5665
5706
  },
5666
- className: cn$1("p-1 rounded", action.disabled ? "opacity-50 cursor-not-allowed" : "hover:bg-gray-100"),
5707
+ className: cn$1("p-1 rounded", action.disabled ? "opacity-50 cursor-not-allowed" : "hover:bg-gray-100 dark:hover:bg-gray-800"),
5667
5708
  children: action.render ? action.render(row) : (_action$icon = action.icon) !== null && _action$icon !== void 0 ? _action$icon : jsxRuntime.jsx("span", {
5668
5709
  className: "text-xs",
5669
5710
  children: actionLabel
@@ -5679,7 +5720,7 @@ function TableRow(_ref) {
5679
5720
  return toggleActions(e, actionCellKey, row);
5680
5721
  },
5681
5722
  "aria-expanded": activeActionRowKey === actionCellKey,
5682
- className: "p-1 rounded hover:bg-gray-100",
5723
+ className: "p-1 rounded hover:bg-gray-100 dark:hover:bg-gray-800",
5683
5724
  title: "Actions",
5684
5725
  children: jsxRuntime.jsx(MoreVertical, {
5685
5726
  className: "h-4 w-4"
@@ -5703,7 +5744,7 @@ function TableRow(_ref) {
5703
5744
  colSpan: visibleCount,
5704
5745
  className: cn$1(_defineProperty$4(_defineProperty$4({
5705
5746
  "px-6 py-4": true
5706
- }, (_theme$accentColor = theme === null || theme === void 0 ? void 0 : theme.accentColor) !== null && _theme$accentColor !== void 0 ? _theme$accentColor : "bg-gray-50", true), (_theme$rowHover = theme === null || theme === void 0 ? void 0 : theme.rowHover) !== null && _theme$rowHover !== void 0 ? _theme$rowHover : "bg-gray-50", true)),
5747
+ }, (_theme$accentColor = theme === null || theme === void 0 ? void 0 : theme.accentColor) !== null && _theme$accentColor !== void 0 ? _theme$accentColor : "bg-background", true), (_theme$rowHover = theme === null || theme === void 0 ? void 0 : theme.rowHover) !== null && _theme$rowHover !== void 0 ? _theme$rowHover : "bg-background", true)),
5707
5748
  children: jsxRuntime.jsx(DetailsComponent, {
5708
5749
  row: row,
5709
5750
  index: globalIndex
@@ -5768,11 +5809,10 @@ function MobileCard(_ref) {
5768
5809
  var hasActions = withAction && (inlineActions.length > 0 || menuActions.length > 0);
5769
5810
  var showHeader = showDetailsToggle || selectable || showSerial || hasActions;
5770
5811
  var stripeBg = stripedRows && !isSelected && Array.isArray(stripedColors) && stripedColors.length > 0 ? stripedColors[globalIndex % stripedColors.length] : undefined;
5812
+ var stripeProps = getStripeProps(stripeBg);
5771
5813
  return jsxRuntime.jsxs("div", {
5772
- style: stripeBg ? {
5773
- backgroundColor: stripeBg
5774
- } : undefined,
5775
- className: cn$1("border rounded-lg mb-3 shadow-sm overflow-hidden transition-all duration-200", {
5814
+ style: stripeProps.style,
5815
+ className: cn$1(stripeProps.className, "border border-line rounded-lg mb-3 shadow-sm overflow-hidden transition-all duration-200", {
5776
5816
  "cursor-pointer": !!onRowClick,
5777
5817
  "bg-primary-50 border-primary-200": isSelected,
5778
5818
  "hover:shadow-md": !isSelected
@@ -5781,7 +5821,7 @@ function MobileCard(_ref) {
5781
5821
  return onRowClick === null || onRowClick === void 0 ? void 0 : onRowClick(row, globalIndex);
5782
5822
  },
5783
5823
  children: [showHeader && jsxRuntime.jsxs("div", {
5784
- className: "flex items-center justify-between p-4 border-b bg-gray-50",
5824
+ className: "flex items-center justify-between p-4 border-b border-line bg-background",
5785
5825
  children: [jsxRuntime.jsxs("div", {
5786
5826
  className: "flex items-center gap-3",
5787
5827
  children: [showDetailsToggle && jsxRuntime.jsx("button", {
@@ -5792,7 +5832,7 @@ function MobileCard(_ref) {
5792
5832
  },
5793
5833
  "aria-expanded": isExpanded,
5794
5834
  "aria-label": isExpanded ? "Collapse row details" : "Expand row details",
5795
- className: "p-1 rounded hover:bg-gray-200",
5835
+ className: "p-1 rounded hover:bg-gray-200 dark:hover:bg-gray-700",
5796
5836
  children: isExpanded ? "▾" : "▸"
5797
5837
  }), selectable && jsxRuntime.jsx("input", {
5798
5838
  type: "checkbox",
@@ -5826,7 +5866,7 @@ function MobileCard(_ref) {
5826
5866
  if (action.disabled) return;
5827
5867
  handleOnAction(action, row);
5828
5868
  },
5829
- className: cn$1("p-1.5 rounded", action.disabled ? "opacity-50 cursor-not-allowed" : "hover:bg-gray-200"),
5869
+ className: cn$1("p-1.5 rounded", action.disabled ? "opacity-50 cursor-not-allowed" : "hover:bg-gray-200 dark:hover:bg-gray-700"),
5830
5870
  children: action.render ? action.render(row) : (_action$icon = action.icon) !== null && _action$icon !== void 0 ? _action$icon : jsxRuntime.jsx("span", {
5831
5871
  className: "text-xs",
5832
5872
  children: actionLabel
@@ -5843,7 +5883,7 @@ function MobileCard(_ref) {
5843
5883
  return toggleActions(e, actionCellKey, row);
5844
5884
  },
5845
5885
  "aria-expanded": activeActionRowKey === actionCellKey,
5846
- className: "p-1.5 rounded hover:bg-gray-200",
5886
+ className: "p-1.5 rounded hover:bg-gray-200 dark:hover:bg-gray-700",
5847
5887
  title: "Actions",
5848
5888
  "aria-label": "Actions",
5849
5889
  children: jsxRuntime.jsx(MoreVertical, {
@@ -5885,7 +5925,7 @@ function MobileCard(_ref) {
5885
5925
  }, column.key);
5886
5926
  })
5887
5927
  }), showDetailsToggle && isExpanded && DetailsComponent && jsxRuntime.jsx("div", {
5888
- className: "border-t bg-gray-50 p-4",
5928
+ className: "border-t border-line bg-background p-4",
5889
5929
  children: jsxRuntime.jsx(DetailsComponent, {
5890
5930
  row: row,
5891
5931
  index: globalIndex
@@ -5946,7 +5986,7 @@ function FieldInput(_ref) {
5946
5986
  onClick: stopProp,
5947
5987
  onMouseDown: stopProp,
5948
5988
  placeholder: "Enter ".concat(column.label || column.key, "..."),
5949
- className: cn$1("w-full px-2 py-1 text-sm border rounded outline-none transition-all focus:ring-2 focus:ring-primary-500 bg-white resize-y min-h-[2.5rem]", className)
5989
+ className: cn$1("w-full px-2 py-1 text-sm border rounded outline-none transition-all focus:ring-2 focus:ring-primary-500 bg-surface text-foreground resize-y min-h-[2.5rem]", className)
5950
5990
  });
5951
5991
  }
5952
5992
  // Select / Dropdown
@@ -5966,7 +6006,7 @@ function FieldInput(_ref) {
5966
6006
  onKeyDown: onKeyDown,
5967
6007
  onClick: stopProp,
5968
6008
  onMouseDown: stopProp,
5969
- className: cn$1("w-full px-2 py-1 text-sm border rounded outline-none focus:ring-2 focus:ring-primary-500 bg-white", className),
6009
+ className: cn$1("w-full px-2 py-1 text-sm border rounded outline-none focus:ring-2 focus:ring-primary-500 bg-surface text-foreground", className),
5970
6010
  children: [jsxRuntime.jsxs("option", {
5971
6011
  value: "",
5972
6012
  children: ["Select ", column.label || column.key]
@@ -6009,7 +6049,7 @@ function FieldInput(_ref) {
6009
6049
  onKeyDown: onKeyDown,
6010
6050
  onClick: stopProp,
6011
6051
  onMouseDown: stopProp,
6012
- className: cn$1("w-full px-2 py-1 text-sm border rounded outline-none focus:ring-2 focus:ring-primary-500 bg-white", className)
6052
+ className: cn$1("w-full px-2 py-1 text-sm border rounded outline-none focus:ring-2 focus:ring-primary-500 bg-surface text-foreground", className)
6013
6053
  });
6014
6054
  }
6015
6055
  // Number
@@ -6025,7 +6065,7 @@ function FieldInput(_ref) {
6025
6065
  onClick: stopProp,
6026
6066
  onMouseDown: stopProp,
6027
6067
  placeholder: "Enter ".concat(column.label || column.key, "..."),
6028
- className: cn$1("w-full px-2 py-1 text-sm border rounded outline-none focus:ring-2 focus:ring-primary-500 bg-white", className)
6068
+ className: cn$1("w-full px-2 py-1 text-sm border rounded outline-none focus:ring-2 focus:ring-primary-500 bg-surface text-foreground", className)
6029
6069
  });
6030
6070
  }
6031
6071
  // Default: Text
@@ -6040,7 +6080,7 @@ function FieldInput(_ref) {
6040
6080
  onClick: stopProp,
6041
6081
  onMouseDown: stopProp,
6042
6082
  placeholder: "Enter ".concat(column.label || column.key, "..."),
6043
- className: cn$1("w-full px-2 py-1 text-sm border rounded outline-none focus:ring-2 focus:ring-primary-500 bg-white", className)
6083
+ className: cn$1("w-full px-2 py-1 text-sm border rounded outline-none focus:ring-2 focus:ring-primary-500 bg-surface text-foreground", className)
6044
6084
  });
6045
6085
  }
6046
6086
 
@@ -6051,11 +6091,11 @@ function _objectSpread$P(e) { for (var r = 1; r < arguments.length; r++) { var t
6051
6091
  var DEFAULT_DATA = [];
6052
6092
  var DEFAULT_COLUMNS = [];
6053
6093
  var DEFAULT_THEME = {
6054
- stripedColors: ["bg-[#ffffff]", "bg-[#f7fafc]"],
6055
- rowHover: "bg-gray-50",
6056
- accentColor: "bg-gray-50",
6057
- menuBg: "bg-white",
6058
- menuItemHover: "hover:bg-gray-50"
6094
+ stripedColors: ["bg-surface", "bg-background"],
6095
+ rowHover: "bg-background",
6096
+ accentColor: "bg-background",
6097
+ menuBg: "bg-surface",
6098
+ menuItemHover: "hover:bg-background"
6059
6099
  };
6060
6100
  var Table = /*#__PURE__*/React.forwardRef(function Table(_ref, ref) {
6061
6101
  var _validationErrors$;
@@ -7270,7 +7310,7 @@ var Table = /*#__PURE__*/React.forwardRef(function Table(_ref, ref) {
7270
7310
  onClick: handleClearChanges,
7271
7311
  disabled: isSaving,
7272
7312
  title: "Discard all pending modifications",
7273
- className: "px-4 py-2 font-medium rounded-lg text-sm flex items-center gap-2 transition-all border border-primary-300 text-primary-700 bg-white hover:bg-primary-50 active:bg-primary-100 cursor-pointer shadow-sm disabled:opacity-50",
7313
+ className: "px-4 py-2 font-medium rounded-lg text-sm flex items-center gap-2 transition-all border border-primary-300 text-primary-700 bg-surface hover:bg-primary-50 dark:text-primary-300 dark:border-primary-700 dark:hover:bg-primary-900/40 active:bg-primary-100 cursor-pointer shadow-sm disabled:opacity-50",
7274
7314
  children: [jsxRuntime.jsx(X, {
7275
7315
  className: "w-4 h-4 text-primary-600"
7276
7316
  }), jsxRuntime.jsx("span", {
@@ -7314,7 +7354,7 @@ var Table = /*#__PURE__*/React.forwardRef(function Table(_ref, ref) {
7314
7354
  onKeyDown: onGlobalKeyDown
7315
7355
  }), jsxRuntime.jsx("button", {
7316
7356
  onClick: applyGlobalSearch,
7317
- className: "absolute right-2 top-1/2 transform -translate-y-1/2 p-2 rounded-lg hover:bg-gray-100",
7357
+ className: "absolute right-2 top-1/2 transform -translate-y-1/2 p-2 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-800",
7318
7358
  title: "Search",
7319
7359
  children: jsxRuntime.jsx(Search, {
7320
7360
  className: "h-4 w-4 text-primary-400"
@@ -7325,7 +7365,7 @@ var Table = /*#__PURE__*/React.forwardRef(function Table(_ref, ref) {
7325
7365
  setSearchInput("");
7326
7366
  handleFilter("global", "");
7327
7367
  },
7328
- className: "whitespace-nowrap rounded-lg md:rounded-md border border-gray-300 px-4 py-3 md:py-2 text-sm hover:bg-gray-100 w-full sm:w-auto",
7368
+ className: "whitespace-nowrap rounded-lg md:rounded-md border border-gray-300 px-4 py-3 md:py-2 text-sm hover:bg-gray-100 dark:hover:bg-gray-800 w-full sm:w-auto",
7329
7369
  children: "Clear"
7330
7370
  })]
7331
7371
  })
@@ -7349,7 +7389,7 @@ var Table = /*#__PURE__*/React.forwardRef(function Table(_ref, ref) {
7349
7389
  }), !isMobileView && jsxRuntime.jsx("div", {
7350
7390
  className: "overflow-x-auto overflow-y-visible",
7351
7391
  children: jsxRuntime.jsxs("table", _objectSpread$P(_objectSpread$P({
7352
- className: cn$1("min-w-full divide-y divide-gray-200", className)
7392
+ className: cn$1("min-w-full divide-y divide-line", className)
7353
7393
  }, props), {}, {
7354
7394
  children: [jsxRuntime.jsxs("thead", {
7355
7395
  className: safeTheme.accentColor,
@@ -7371,7 +7411,7 @@ var Table = /*#__PURE__*/React.forwardRef(function Table(_ref, ref) {
7371
7411
  var _column$rules;
7372
7412
  return jsxRuntime.jsx("th", {
7373
7413
  className: cn$1("px-6 py-3 text-left text-xs font-medium text-primary-700 uppercase tracking-wider", {
7374
- "cursor-pointer hover:bg-gray-100": sortable && column.sortable !== false
7414
+ "cursor-pointer hover:bg-gray-100 dark:hover:bg-gray-800": sortable && column.sortable !== false
7375
7415
  }),
7376
7416
  onClick: function onClick() {
7377
7417
  return column.sortable !== false && handleSort(column.key);
@@ -7415,7 +7455,7 @@ var Table = /*#__PURE__*/React.forwardRef(function Table(_ref, ref) {
7415
7455
  return !s;
7416
7456
  });
7417
7457
  },
7418
- className: "p-1 rounded hover:bg-gray-100",
7458
+ className: "p-1 rounded hover:bg-gray-100 dark:hover:bg-gray-800",
7419
7459
  children: jsxRuntime.jsx(MoreVertical, {
7420
7460
  className: "h-4 w-4"
7421
7461
  })
@@ -7451,7 +7491,7 @@ var Table = /*#__PURE__*/React.forwardRef(function Table(_ref, ref) {
7451
7491
  })]
7452
7492
  })]
7453
7493
  }), jsxRuntime.jsx("tbody", {
7454
- className: "divide-y divide-gray-200",
7494
+ className: "divide-y divide-line",
7455
7495
  children: loading ? jsxRuntime.jsx("tr", {
7456
7496
  children: jsxRuntime.jsx("td", {
7457
7497
  colSpan: visibleCount,
@@ -17225,7 +17265,8 @@ var Radio = /*#__PURE__*/React.forwardRef(function Radio(_ref, ref) {
17225
17265
  props = _objectWithoutProperties$1(_ref, _excluded$A);
17226
17266
  var autoId = React.useId();
17227
17267
  var inputId = id || "".concat(autoId, "-radio");
17228
- var accentColor = radioColor || "blue";
17268
+ // Default to the brand's primary token so the radio follows theming.
17269
+ var accentColor = radioColor || "rgb(var(--dt-primary-600))";
17229
17270
  var _useState = React.useState(!!defaultChecked),
17230
17271
  _useState2 = _slicedToArray(_useState, 2),
17231
17272
  internalChecked = _useState2[0],
@@ -17283,7 +17324,7 @@ var Radio = /*#__PURE__*/React.forwardRef(function Radio(_ref, ref) {
17283
17324
  "--radio-accent": accentColor
17284
17325
  },
17285
17326
  children: jsxRuntime.jsx("span", {
17286
- className: cn("flex items-center justify-center rounded-full border transition-colors duration-150 ease-in-out border-slate-300", sizeClasses.outer, disabled ? "bg-slate-100" : "bg-white", isChecked ? "shadow-inner" : ""),
17327
+ className: cn("flex items-center justify-center rounded-full border transition-colors duration-150 ease-in-out border-slate-300 dark:border-gray-600", sizeClasses.outer, disabled ? "bg-slate-100 dark:bg-gray-800" : "bg-white dark:bg-gray-900", isChecked ? "shadow-inner" : ""),
17287
17328
  children: jsxRuntime.jsx("span", {
17288
17329
  "aria-hidden": true,
17289
17330
  className: cn("rounded-full transform transition-all duration-200 ease-out", sizeClasses.dot),
@@ -20058,8 +20099,8 @@ var Sidebar = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
20058
20099
  }
20059
20100
  }), {}, {
20060
20101
  className: cn$1("flex items-center rounded-md px-3 py-2 text-sm font-medium transition-colors", "focus:outline-none focus-visible:ring-2 focus-visible:ring-primary-500", {
20061
- "bg-primary-100 text-primary-700": isActive,
20062
- "hover:bg-gray-100": !isActive && !item.disabled,
20102
+ "bg-primary-100 text-primary-700 dark:bg-primary-900/40 dark:text-primary-300": isActive,
20103
+ "hover:bg-gray-100 dark:hover:bg-gray-800": !isActive && !item.disabled,
20063
20104
  "cursor-pointer": !item.disabled,
20064
20105
  "cursor-not-allowed opacity-50": item.disabled,
20065
20106
  "justify-center": labelHidden
@@ -20088,7 +20129,7 @@ var Sidebar = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
20088
20129
  })]
20089
20130
  }) : item.badge
20090
20131
  }), hasChildren && jsxRuntime.jsx("span", {
20091
- className: "ml-2 flex-shrink-0 rounded p-0.5 hover:bg-gray-200",
20132
+ className: "ml-2 flex-shrink-0 rounded p-0.5 hover:bg-gray-200 dark:hover:bg-gray-700",
20092
20133
  "aria-hidden": "true",
20093
20134
  "data-sidebar-chevron": "",
20094
20135
  onClick: hasHref ? function (e) {
@@ -20138,7 +20179,7 @@ var Sidebar = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
20138
20179
  }),
20139
20180
  "data-sidebar-section": section.key || "",
20140
20181
  children: [effectiveCollapsed && idx > 0 && jsxRuntime.jsx("hr", {
20141
- className: "mx-2 my-2 border-gray-200",
20182
+ className: "mx-2 my-2 border-line",
20142
20183
  "aria-hidden": "true"
20143
20184
  }), section.key && (effectiveCollapsed ? jsxRuntime.jsx("span", {
20144
20185
  id: headingId,
@@ -20146,7 +20187,7 @@ var Sidebar = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
20146
20187
  children: section.key
20147
20188
  }) : jsxRuntime.jsx("p", {
20148
20189
  id: headingId,
20149
- className: "px-3 pb-1 pt-2 text-micro font-semibold uppercase tracking-wide text-gray-500",
20190
+ className: "px-3 pb-1 pt-2 text-micro font-semibold uppercase tracking-wide text-muted",
20150
20191
  children: section.key
20151
20192
  })), section.items.map(function (item) {
20152
20193
  return _renderMenuItem(item, 0, pane);
@@ -20185,7 +20226,7 @@ var Sidebar = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
20185
20226
  return jsxRuntime.jsx("button", {
20186
20227
  type: "button",
20187
20228
  onClick: handleUserClick,
20188
- className: cn$1(base, "cursor-pointer hover:bg-gray-100 transition-colors", "focus:outline-none focus-visible:ring-2 focus-visible:ring-primary-500"),
20229
+ className: cn$1(base, "cursor-pointer hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors", "focus:outline-none focus-visible:ring-2 focus-visible:ring-primary-500"),
20189
20230
  "aria-label": effectiveCollapsed && !user.avatar ? user.name : undefined,
20190
20231
  children: content
20191
20232
  });
@@ -20199,26 +20240,26 @@ var Sidebar = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
20199
20240
  }) : footer;
20200
20241
  if (content === undefined || content === null || content === false) return null;
20201
20242
  return jsxRuntime.jsx("div", {
20202
- className: "border-t border-gray-200 p-4",
20243
+ className: "border-t border-line p-4",
20203
20244
  "data-sidebar-footer": "",
20204
20245
  children: content
20205
20246
  });
20206
20247
  };
20207
20248
  var renderSidebarContent = function renderSidebarContent(pane) {
20208
20249
  return jsxRuntime.jsxs("div", {
20209
- className: cn$1("flex h-full flex-col bg-white border-r border-gray-200 shadow-sm", "w-64 transition-all duration-200", {
20250
+ className: cn$1("flex h-full flex-col bg-surface text-foreground border-r border-line shadow-sm", "w-64 transition-all duration-200", {
20210
20251
  "w-16": effectiveCollapsed,
20211
20252
  "w-64": !effectiveCollapsed
20212
20253
  }),
20213
20254
  children: [jsxRuntime.jsxs("div", {
20214
- className: "flex h-16 items-center justify-between border-b border-gray-200 px-4",
20255
+ className: "flex h-16 items-center justify-between border-b border-line px-4",
20215
20256
  children: [!effectiveCollapsed && logo && jsxRuntime.jsx("div", {
20216
20257
  className: "flex items-center",
20217
20258
  children: logo
20218
20259
  }), jsxRuntime.jsx("button", {
20219
20260
  type: "button",
20220
20261
  onClick: handleToggleClick,
20221
- className: "rounded-md p-1 hover:bg-gray-100",
20262
+ className: "rounded-md p-1 hover:bg-gray-100 dark:hover:bg-gray-800",
20222
20263
  "aria-label": effectiveCollapsed ? "Expand sidebar" : "Collapse sidebar",
20223
20264
  children: effectiveCollapsed ? jsxRuntime.jsx(ChevronRight, {
20224
20265
  className: "h-5 w-5"
@@ -20227,10 +20268,10 @@ var Sidebar = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
20227
20268
  })
20228
20269
  })]
20229
20270
  }), jsxRuntime.jsx("nav", {
20230
- className: "flex-1 space-y-1 overflow-y-auto p-4 [&::-webkit-scrollbar]:w-2\n [&::-webkit-scrollbar-track]:bg-gray-100\n [&::-webkit-scrollbar-thumb]:bg-gray-300\n hover:[&::-webkit-scrollbar-thumb]:bg-gray-400",
20271
+ className: "flex-1 space-y-1 overflow-y-auto p-4 [&::-webkit-scrollbar]:w-2\n [&::-webkit-scrollbar-track]:bg-gray-100 dark:[&::-webkit-scrollbar-track]:bg-gray-800\n [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-thumb]:bg-gray-700\n hover:[&::-webkit-scrollbar-thumb]:bg-gray-400",
20231
20272
  children: renderNavContent(pane)
20232
20273
  }), renderFooter(pane), user && jsxRuntime.jsx("div", {
20233
- className: "border-t border-gray-200 p-4",
20274
+ className: "border-t border-line p-4",
20234
20275
  children: jsxRuntime.jsx("div", {
20235
20276
  className: "relative",
20236
20277
  children: renderUserBlock()
@@ -20331,7 +20372,7 @@ var Dropdown = function Dropdown(_ref) {
20331
20372
  },
20332
20373
  children: trigger
20333
20374
  }), isOpen && jsxRuntime.jsx("div", {
20334
- className: "absolute z-50 bg-white border border-gray-200 rounded-md shadow-lg ".concat(placementClasses[placement], " min-w-48"),
20375
+ className: "absolute z-50 bg-surface text-foreground border border-line rounded-md shadow-lg ".concat(placementClasses[placement], " min-w-48"),
20335
20376
  children: children
20336
20377
  })]
20337
20378
  }));
@@ -20481,7 +20522,7 @@ var NotificationsDropdown = function NotificationsDropdown(_ref) {
20481
20522
  // For simplicity, shows notifications in the dropdown, can be expanded
20482
20523
  return jsxRuntime.jsx(Dropdown, {
20483
20524
  trigger: jsxRuntime.jsxs("button", {
20484
- className: "relative rounded-md p-2 text-primary-400 hover:text-primary-500 hover:bg-gray-100",
20525
+ className: "relative rounded-md p-2 text-primary-400 hover:text-primary-500 hover:bg-gray-100 dark:hover:bg-gray-800",
20485
20526
  "aria-label": "notifications",
20486
20527
  children: [jsxRuntime.jsx(Bell, {
20487
20528
  className: "h-5 w-5"
@@ -20494,9 +20535,9 @@ var NotificationsDropdown = function NotificationsDropdown(_ref) {
20494
20535
  children: jsxRuntime.jsxs("div", {
20495
20536
  className: "py-2 min-w-56 max-h-80 overflow-y-auto",
20496
20537
  children: [jsxRuntime.jsxs("div", {
20497
- className: "px-4 py-2 border-b border-gray-100 flex items-center justify-between",
20538
+ className: "px-4 py-2 border-b border-line flex items-center justify-between",
20498
20539
  children: [jsxRuntime.jsx("span", {
20499
- className: "font-medium text-primary-800 text-sm",
20540
+ className: "font-medium text-primary-800 dark:text-primary-100 text-sm",
20500
20541
  children: "Notifications"
20501
20542
  }), jsxRuntime.jsx("button", {
20502
20543
  className: "text-xs text-primary-400 hover:text-error-600",
@@ -20512,16 +20553,16 @@ var NotificationsDropdown = function NotificationsDropdown(_ref) {
20512
20553
  children: "No notifications"
20513
20554
  }) : notifications.map(function (n) {
20514
20555
  return jsxRuntime.jsxs("div", {
20515
- className: cn$1("flex items-start gap-3 px-4 py-2 hover:bg-gray-50 cursor-pointer group", !n.read ? "bg-primary-50" : ""),
20556
+ className: cn$1("flex items-start gap-3 px-4 py-2 hover:bg-gray-50 dark:hover:bg-gray-800 cursor-pointer group", !n.read ? "bg-primary-50 dark:bg-primary-900/40" : ""),
20516
20557
  onClick: function onClick() {
20517
20558
  return onView();
20518
20559
  },
20519
20560
  children: [jsxRuntime.jsx("span", {
20520
- className: cn$1("h-2 w-2 mt-2 rounded-full", !n.read ? "bg-primary-500" : "bg-gray-300")
20561
+ className: cn$1("h-2 w-2 mt-2 rounded-full", !n.read ? "bg-primary-500" : "bg-gray-300 dark:bg-gray-600")
20521
20562
  }), jsxRuntime.jsxs("div", {
20522
20563
  className: "flex-1",
20523
20564
  children: [jsxRuntime.jsx("div", {
20524
- className: "text-sm text-primary-800",
20565
+ className: "text-sm text-primary-800 dark:text-primary-100",
20525
20566
  children: n.title
20526
20567
  }), n.message && jsxRuntime.jsx("div", {
20527
20568
  className: "text-xs text-primary-500",
@@ -20573,10 +20614,10 @@ var RightMenuContent = function RightMenuContent(_ref2) {
20573
20614
  });
20574
20615
  };
20575
20616
  var styledClassNames = {
20576
- button: "rounded-md p-2 text-primary-400 hover:text-primary-500 hover:bg-gray-100",
20617
+ button: "rounded-md p-2 text-primary-400 hover:text-primary-500 hover:bg-gray-100 dark:hover:bg-gray-800",
20577
20618
  mobileItem: "md:hidden",
20578
20619
  icon: "h-6 w-6",
20579
- dropdown: "w-56 rounded-md border border-gray-200 bg-white py-1 shadow-lg"
20620
+ dropdown: "w-56 rounded-md border border-line bg-surface py-1 shadow-lg"
20580
20621
  };
20581
20622
  var Navbar = /*#__PURE__*/React.forwardRef(function (_ref3, ref) {
20582
20623
  var emitter = _ref3.emitter,
@@ -20661,7 +20702,7 @@ var Navbar = /*#__PURE__*/React.forwardRef(function (_ref3, ref) {
20661
20702
  },
20662
20703
  className: cn$1("block w-full text-left px-4 py-2 text-sm", {
20663
20704
  "text-primary-600": item.active,
20664
- "hover:bg-gray-50": !item.active
20705
+ "hover:bg-gray-50 dark:hover:bg-gray-800": !item.active
20665
20706
  }),
20666
20707
  children: item.label
20667
20708
  }, item.id);
@@ -20676,7 +20717,7 @@ var Navbar = /*#__PURE__*/React.forwardRef(function (_ref3, ref) {
20676
20717
  };
20677
20718
  return jsxRuntime.jsxs("nav", _objectSpread$p(_objectSpread$p({
20678
20719
  ref: ref,
20679
- className: cn$1("bg-white border-b border-gray-200 px-4 sm:px-6 lg:px-8", className)
20720
+ className: cn$1("bg-surface text-foreground border-b border-line px-4 sm:px-6 lg:px-8", className)
20680
20721
  }, props), {}, {
20681
20722
  children: [jsxRuntime.jsxs("div", {
20682
20723
  className: "flex h-16 min-w-0 items-center justify-between gap-2 sm:gap-4",
@@ -20689,7 +20730,7 @@ var Navbar = /*#__PURE__*/React.forwardRef(function (_ref3, ref) {
20689
20730
  className: "flex min-w-0 items-center",
20690
20731
  children: [leftIcon !== false && jsxRuntime.jsx("button", {
20691
20732
  onClick: onLeftIconClick,
20692
- className: "shrink-0 md:hidden rounded-md p-2 text-primary-400 hover:text-primary-500 hover:bg-gray-100",
20733
+ className: "shrink-0 md:hidden rounded-md p-2 text-primary-400 hover:text-primary-500 hover:bg-gray-100 dark:hover:bg-gray-800",
20693
20734
  "aria-label": "back",
20694
20735
  children: leftIcon
20695
20736
  }), logo && jsxRuntime.jsx("div", {
@@ -20716,7 +20757,7 @@ var Navbar = /*#__PURE__*/React.forwardRef(function (_ref3, ref) {
20716
20757
  }), jsxRuntime.jsx("input", {
20717
20758
  type: "text",
20718
20759
  placeholder: "Search...",
20719
- className: "w-64 rounded-md border border-gray-300 bg-white pl-10 pr-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent",
20760
+ className: "w-64 rounded-md border border-gray-300 bg-surface text-foreground dark:border-gray-700 pl-10 pr-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent",
20720
20761
  value: searchTerm,
20721
20762
  onChange: function onChange(e) {
20722
20763
  return setSearchTerm(e.target.value);
@@ -20779,9 +20820,9 @@ var Navbar = /*#__PURE__*/React.forwardRef(function (_ref3, ref) {
20779
20820
  children: jsxRuntime.jsxs("div", {
20780
20821
  className: styledClassNames.dropdown,
20781
20822
  children: [jsxRuntime.jsxs("div", {
20782
- className: "px-4 py-2 border-b border-gray-200",
20823
+ className: "px-4 py-2 border-b border-line",
20783
20824
  children: [jsxRuntime.jsx("p", {
20784
- className: "text-sm font-medium text-primary-900",
20825
+ className: "text-sm font-medium text-primary-900 dark:text-primary-100",
20785
20826
  children: user.name
20786
20827
  }), jsxRuntime.jsx("p", {
20787
20828
  className: "text-xs text-primary-500",
@@ -20791,23 +20832,23 @@ var Navbar = /*#__PURE__*/React.forwardRef(function (_ref3, ref) {
20791
20832
  className: "py-1",
20792
20833
  children: renderNavItems(true)
20793
20834
  }), user.menuItems && user.menuItems.length > 0 && jsxRuntime.jsx("div", {
20794
- className: "border-t border-gray-100",
20835
+ className: "border-t border-line",
20795
20836
  children: user.menuItems.map(function (mi) {
20796
20837
  return jsxRuntime.jsx("button", {
20797
20838
  onClick: function onClick(e) {
20798
20839
  var _mi$onClick;
20799
20840
  return mi === null || mi === void 0 || (_mi$onClick = mi.onClick) === null || _mi$onClick === void 0 ? void 0 : _mi$onClick.call(mi, e);
20800
20841
  },
20801
- className: "block w-full px-4 py-2 text-left text-sm hover:bg-gray-100",
20842
+ className: "block w-full px-4 py-2 text-left text-sm hover:bg-gray-100 dark:hover:bg-gray-800",
20802
20843
  children: mi.label
20803
20844
  }, mi.id);
20804
20845
  })
20805
20846
  }), jsxRuntime.jsx("div", {
20806
- className: "border-t border-gray-100 sm:hidden",
20847
+ className: "border-t border-line sm:hidden",
20807
20848
  children: jsxRuntime.jsxs("button", {
20808
20849
  type: "button",
20809
20850
  onClick: handleLogoutClick,
20810
- className: "flex w-full items-center gap-2 px-4 py-2 text-left text-sm hover:bg-gray-100",
20851
+ className: "flex w-full items-center gap-2 px-4 py-2 text-left text-sm hover:bg-gray-100 dark:hover:bg-gray-800",
20811
20852
  children: [jsxRuntime.jsx(LogOut, {
20812
20853
  className: "h-4 w-4",
20813
20854
  "aria-hidden": "true"
@@ -20821,13 +20862,13 @@ var Navbar = /*#__PURE__*/React.forwardRef(function (_ref3, ref) {
20821
20862
  }), isMobileMenuOpen && !user && jsxRuntime.jsx("div", {
20822
20863
  className: "md:hidden h-full",
20823
20864
  children: jsxRuntime.jsx("div", {
20824
- className: "space-y-1 border-t border-gray-200 px-2 pt-4 pb-3",
20865
+ className: "space-y-1 border-t border-line px-2 pt-4 pb-3",
20825
20866
  children: items.map(function (item) {
20826
20867
  return jsxRuntime.jsx("a", {
20827
20868
  href: item.href,
20828
20869
  className: cn$1("block rounded-md px-3 py-2 text-base font-medium", {
20829
- "bg-primary-50 text-primary-700": item.active,
20830
- "hover:bg-gray-50": !item.active
20870
+ "bg-primary-50 text-primary-700 dark:bg-primary-900/40 dark:text-primary-300": item.active,
20871
+ "hover:bg-gray-50 dark:hover:bg-gray-800": !item.active
20831
20872
  }),
20832
20873
  children: item.label
20833
20874
  }, item.id);
@@ -20854,11 +20895,28 @@ function _objectSpread$o(e) { for (var r = 1; r < arguments.length; r++) { var t
20854
20895
  var hasBadge = function hasBadge(badge) {
20855
20896
  return badge === 0 || Boolean(badge);
20856
20897
  };
20857
- var FootNav = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
20858
- var _ref$items = _ref.items,
20859
- items = _ref$items === void 0 ? [] : _ref$items,
20860
- className = _ref.className,
20861
- props = _objectWithoutProperties$1(_ref, _excluded$k);
20898
+ // Only aria-* and data-* item keys reach the DOM (e.g. aria-haspopup="dialog"
20899
+ // on an item that opens a sheet); the rest of the item is data, not attributes.
20900
+ var passthrough = function passthrough(item) {
20901
+ return Object.fromEntries(Object.entries(item).filter(function (_ref) {
20902
+ var _ref2 = _slicedToArray(_ref, 1),
20903
+ key = _ref2[0];
20904
+ return /^(aria|data)-/.test(key);
20905
+ }));
20906
+ };
20907
+ var Badge$1 = function Badge(_ref3) {
20908
+ var badge = _ref3.badge;
20909
+ return jsxRuntime.jsx("span", {
20910
+ className: "absolute -top-1.5 left-full -ml-2 flex h-4 min-w-4 items-center justify-center rounded-full bg-error-600 px-1 text-micro font-semibold text-white",
20911
+ "data-slot": "badge",
20912
+ children: badge
20913
+ });
20914
+ };
20915
+ var FootNav = /*#__PURE__*/React.forwardRef(function (_ref4, ref) {
20916
+ var _ref4$items = _ref4.items,
20917
+ items = _ref4$items === void 0 ? [] : _ref4$items,
20918
+ className = _ref4.className,
20919
+ props = _objectWithoutProperties$1(_ref4, _excluded$k);
20862
20920
  return jsxRuntime.jsx("nav", _objectSpread$o(_objectSpread$o({
20863
20921
  ref: ref,
20864
20922
  className: cn$1('fixed bottom-0 left-0 right-0 bg-surface border-t border-line px-2 py-2 md:hidden', className)
@@ -20867,27 +20925,37 @@ var FootNav = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
20867
20925
  className: "flex items-stretch justify-around gap-1",
20868
20926
  children: items.map(function (item, index) {
20869
20927
  var _item$id;
20870
- return jsxRuntime.jsxs("button", {
20928
+ var isAction = item.variant === 'action';
20929
+ return jsxRuntime.jsxs("button", _objectSpread$o(_objectSpread$o({
20871
20930
  type: "button",
20872
20931
  "aria-current": item.active ? 'page' : undefined,
20873
- className: cn$1('relative flex min-w-0 flex-1 flex-col items-center gap-1 rounded-md px-1 py-2 text-xs transition-colors', 'focus:outline-none focus-visible:ring-2 focus-visible:ring-primary-500 focus-visible:ring-offset-1 motion-reduce:transition-none', item.active ? 'bg-primary-50 font-semibold text-primary-700 dark:bg-primary-900/40 dark:text-primary-300' : 'font-medium text-muted hover:bg-gray-100 hover:text-foreground dark:hover:bg-gray-800'),
20932
+ "data-variant": isAction ? 'action' : undefined
20933
+ }, passthrough(item)), {}, {
20934
+ className: cn$1('relative flex min-w-0 flex-1 flex-col items-center gap-1 rounded-md px-1 py-2 text-xs transition-colors', 'focus:outline-none focus-visible:ring-2 focus-visible:ring-primary-500 focus-visible:ring-offset-1 motion-reduce:transition-none', isAction ? 'group justify-start py-0 font-medium text-muted' : item.active ? 'bg-primary-50 font-semibold text-primary-700 dark:bg-primary-900/40 dark:text-primary-300' : 'font-medium text-muted hover:bg-gray-100 hover:text-foreground dark:hover:bg-gray-800'),
20874
20935
  onClick: function onClick() {
20875
20936
  var _item$onClick;
20876
20937
  return (_item$onClick = item.onClick) === null || _item$onClick === void 0 ? void 0 : _item$onClick.call(item, item);
20877
20938
  },
20878
- children: [jsxRuntime.jsxs("span", {
20939
+ children: [isAction ?
20940
+ // Raised primary circle (FAB): 56px, lifted above the bar and
20941
+ // ringed in the surface colour so it reads as cut out of the bar.
20942
+ jsxRuntime.jsxs("span", {
20943
+ className: "relative -mt-7 inline-flex h-14 w-14 items-center justify-center rounded-full bg-primary-600 text-2xl text-white shadow-lg ring-4 ring-surface transition-colors group-hover:bg-primary-700 motion-reduce:transition-none",
20944
+ "data-slot": "icon",
20945
+ children: [item.icon, hasBadge(item.badge) && jsxRuntime.jsx(Badge$1, {
20946
+ badge: item.badge
20947
+ })]
20948
+ }) : jsxRuntime.jsxs("span", {
20879
20949
  className: "relative inline-flex text-lg",
20880
20950
  "data-slot": "icon",
20881
- children: [item.icon, hasBadge(item.badge) && jsxRuntime.jsx("span", {
20882
- className: "absolute -top-1.5 left-full -ml-2 flex h-4 min-w-4 items-center justify-center rounded-full bg-error-600 px-1 text-micro font-semibold text-white",
20883
- "data-slot": "badge",
20884
- children: item.badge
20951
+ children: [item.icon, hasBadge(item.badge) && jsxRuntime.jsx(Badge$1, {
20952
+ badge: item.badge
20885
20953
  })]
20886
20954
  }), jsxRuntime.jsx("span", {
20887
20955
  className: "block max-w-full truncate",
20888
20956
  children: item.label
20889
20957
  })]
20890
- }, (_item$id = item.id) !== null && _item$id !== void 0 ? _item$id : index);
20958
+ }), (_item$id = item.id) !== null && _item$id !== void 0 ? _item$id : index);
20891
20959
  })
20892
20960
  })
20893
20961
  }));
@@ -20963,6 +21031,11 @@ var Breadcrumbs = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
20963
21031
  });
20964
21032
  Breadcrumbs.displayName = 'Breadcrumbs';
20965
21033
 
21034
+ // Internal (not exported). Grows an icon-only control to the 44×44 px minimum
21035
+ // touch target (WCAG 2.5.5, Apple HIG) on coarse pointers only, so desktop
21036
+ // layouts keep their compact size. Pair with inline-flex centering.
21037
+ var TOUCH_TARGET = "[@media(pointer:coarse)]:min-h-11 [@media(pointer:coarse)]:min-w-11";
21038
+
20966
21039
  var _excluded$i = ["isOpen", "onClose", "title", "children", "size", "dismissible", "showCloseButton", "footer", "className", "onOpen"],
20967
21040
  _excluded2$2 = ["children", "className"],
20968
21041
  _excluded3$2 = ["children", "className"],
@@ -21099,11 +21172,12 @@ var Dialog = /*#__PURE__*/React.forwardRef(function (_ref, _ref3) {
21099
21172
  children: title
21100
21173
  }), showCloseButton && jsxRuntime.jsx("button", {
21101
21174
  type: "button",
21102
- className: "rounded-md p-1 text-primary-400 hover:text-primary-600 hover:bg-gray-100",
21175
+ className: cn$1('inline-flex items-center justify-center rounded-md p-1 text-primary-400 hover:text-primary-600 hover:bg-gray-100', TOUCH_TARGET),
21103
21176
  onClick: onClose,
21104
21177
  "aria-label": "Close dialog",
21105
21178
  children: jsxRuntime.jsx(X, {
21106
- className: "h-5 w-5"
21179
+ className: "h-5 w-5",
21180
+ "aria-hidden": "true"
21107
21181
  })
21108
21182
  })]
21109
21183
  }), jsxRuntime.jsx("div", {
@@ -21622,7 +21696,68 @@ function useScrollLock(active) {
21622
21696
  }, [active]);
21623
21697
  }
21624
21698
 
21625
- var _excluded$f = ["isOpen", "onClose", "title", "description", "children", "placement", "size", "dismissible", "showCloseButton", "footer", "initialFocusRef", "className"],
21699
+ // Internal (not exported). Drag-down-to-dismiss for a bottom sheet. Spread
21700
+ // `dragProps` on the grab zone (handle + header), not the scrolling body, so a
21701
+ // swipe never fights the content's own scroll. Past `threshold` px (or a quick
21702
+ // flick) the drag calls onClose; otherwise the sheet snaps back.
21703
+ var FLICK_VELOCITY = 0.5; // px per ms
21704
+ function useSwipeToClose(_ref) {
21705
+ var enabled = _ref.enabled,
21706
+ onClose = _ref.onClose,
21707
+ _ref$threshold = _ref.threshold,
21708
+ threshold = _ref$threshold === void 0 ? 80 : _ref$threshold;
21709
+ var _useState = React.useState(0),
21710
+ _useState2 = _slicedToArray(_useState, 2),
21711
+ offset = _useState2[0],
21712
+ setOffset = _useState2[1];
21713
+ var _useState3 = React.useState(false),
21714
+ _useState4 = _slicedToArray(_useState3, 2),
21715
+ dragging = _useState4[0],
21716
+ setDragging = _useState4[1];
21717
+ var start = React.useRef(null);
21718
+ var end = React.useCallback(function (e) {
21719
+ if (!start.current) return;
21720
+ var dy = Math.max(0, e.clientY - start.current.y);
21721
+ var elapsed = Math.max(1, Date.now() - start.current.t);
21722
+ start.current = null;
21723
+ setDragging(false);
21724
+ setOffset(0);
21725
+ if (dy >= threshold || dy > 16 && dy / elapsed >= FLICK_VELOCITY) onClose === null || onClose === void 0 || onClose();
21726
+ }, [onClose, threshold]);
21727
+ if (!enabled) return {
21728
+ dragProps: {},
21729
+ offset: 0,
21730
+ dragging: false
21731
+ };
21732
+ return {
21733
+ offset: offset,
21734
+ dragging: dragging,
21735
+ dragProps: {
21736
+ onPointerDown: function onPointerDown(e) {
21737
+ var _e$currentTarget$setP, _e$currentTarget;
21738
+ if (e.button !== undefined && e.button !== 0) return;
21739
+ start.current = {
21740
+ y: e.clientY,
21741
+ t: Date.now()
21742
+ };
21743
+ setDragging(true);
21744
+ (_e$currentTarget$setP = (_e$currentTarget = e.currentTarget).setPointerCapture) === null || _e$currentTarget$setP === void 0 || _e$currentTarget$setP.call(_e$currentTarget, e.pointerId);
21745
+ },
21746
+ onPointerMove: function onPointerMove(e) {
21747
+ if (!start.current) return;
21748
+ setOffset(Math.max(0, e.clientY - start.current.y));
21749
+ },
21750
+ onPointerUp: end,
21751
+ onPointerCancel: function onPointerCancel() {
21752
+ start.current = null;
21753
+ setDragging(false);
21754
+ setOffset(0);
21755
+ }
21756
+ }
21757
+ };
21758
+ }
21759
+
21760
+ var _excluded$f = ["isOpen", "onClose", "title", "description", "children", "placement", "size", "dismissible", "showCloseButton", "footer", "initialFocusRef", "handle", "swipeToClose", "className", "style"],
21626
21761
  _excluded2$1 = ["className"],
21627
21762
  _excluded3$1 = ["className"],
21628
21763
  _excluded4$1 = ["className"];
@@ -21632,7 +21767,8 @@ var PLACEMENT_CLASSES = {
21632
21767
  right: "inset-y-0 right-0 h-full w-full border-l",
21633
21768
  left: "inset-y-0 left-0 h-full w-full border-r",
21634
21769
  top: "inset-x-0 top-0 w-full border-b",
21635
- bottom: "inset-x-0 bottom-0 w-full border-t"
21770
+ // Bottom sheet: rounded top and room for the home indicator (safe area).
21771
+ bottom: "inset-x-0 bottom-0 w-full overflow-hidden rounded-t-2xl border-t pb-[env(safe-area-inset-bottom)]"
21636
21772
  };
21637
21773
  var SIDE_SIZES = {
21638
21774
  sm: "max-w-xs",
@@ -21655,7 +21791,7 @@ var CloseButton = function CloseButton(_ref) {
21655
21791
  type: "button",
21656
21792
  onClick: onClose,
21657
21793
  "aria-label": "Close drawer",
21658
- className: cn$1("rounded-md p-1 text-gray-500 hover:bg-gray-100 hover:text-gray-700 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2", "dark:text-gray-400 dark:hover:bg-gray-800 dark:hover:text-gray-200 dark:focus:ring-offset-gray-900", className),
21794
+ className: cn$1("inline-flex items-center justify-center rounded-md p-1 text-gray-500 hover:bg-gray-100 hover:text-gray-700 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2", "dark:text-gray-400 dark:hover:bg-gray-800 dark:hover:text-gray-200 dark:focus:ring-offset-gray-900", TOUCH_TARGET, className),
21659
21795
  children: jsxRuntime.jsx(X, {
21660
21796
  className: "h-5 w-5",
21661
21797
  "aria-hidden": "true"
@@ -21678,7 +21814,11 @@ var Drawer = /*#__PURE__*/React.forwardRef(function (_ref2, _ref3) {
21678
21814
  showCloseButton = _ref2$showCloseButton === void 0 ? true : _ref2$showCloseButton,
21679
21815
  footer = _ref2.footer,
21680
21816
  initialFocusRef = _ref2.initialFocusRef,
21817
+ handle = _ref2.handle,
21818
+ _ref2$swipeToClose = _ref2.swipeToClose,
21819
+ swipeToClose = _ref2$swipeToClose === void 0 ? false : _ref2$swipeToClose,
21681
21820
  className = _ref2.className,
21821
+ style = _ref2.style,
21682
21822
  props = _objectWithoutProperties$1(_ref2, _excluded$f);
21683
21823
  var panelRef = React.useRef(null);
21684
21824
  var titleId = "drawer-title-".concat(React.useId());
@@ -21688,6 +21828,17 @@ var Drawer = /*#__PURE__*/React.forwardRef(function (_ref2, _ref3) {
21688
21828
  // Without title/description/footer the children are the panel content, so
21689
21829
  // Drawer.Header / Drawer.Body / Drawer.Footer compose without double padding.
21690
21830
  var composed = !title && !description && !footer;
21831
+ var showHandle = handle !== null && handle !== void 0 ? handle : side === "bottom";
21832
+ var swipe = useSwipeToClose({
21833
+ enabled: swipeToClose && side === "bottom" && dismissible,
21834
+ onClose: onClose
21835
+ });
21836
+ // The grab zone (handle + header) starts a swipe; the scrolling body never does.
21837
+ var grabProps = swipeToClose && side === "bottom" && dismissible ? _objectSpread$j(_objectSpread$j({}, swipe.dragProps), {}, {
21838
+ className: "touch-none cursor-grab"
21839
+ }) : {
21840
+ className: ""
21841
+ };
21691
21842
  useScrollLock(isOpen);
21692
21843
  useFocusTrap(panelRef, {
21693
21844
  active: isOpen,
@@ -21706,7 +21857,7 @@ var Drawer = /*#__PURE__*/React.forwardRef(function (_ref2, _ref3) {
21706
21857
  onClick: function onClick() {
21707
21858
  return dismissible && (onClose === null || onClose === void 0 ? void 0 : onClose());
21708
21859
  }
21709
- }), jsxRuntime.jsx("div", _objectSpread$j(_objectSpread$j({
21860
+ }), jsxRuntime.jsxs("div", _objectSpread$j(_objectSpread$j({
21710
21861
  ref: function ref(node) {
21711
21862
  return setRefs$1(node, panelRef, _ref3);
21712
21863
  },
@@ -21716,16 +21867,27 @@ var Drawer = /*#__PURE__*/React.forwardRef(function (_ref2, _ref3) {
21716
21867
  "aria-describedby": description ? descriptionId : undefined,
21717
21868
  tabIndex: -1,
21718
21869
  "data-placement": side,
21719
- className: cn$1("absolute flex flex-col border-gray-200 bg-white text-gray-900 shadow-xl focus:outline-none", "dark:border-gray-700 dark:bg-gray-900 dark:text-gray-100", "animate-fade-in motion-reduce:animate-none", PLACEMENT_CLASSES[side], (isEdge ? EDGE_SIZES : SIDE_SIZES)[size] || (isEdge ? EDGE_SIZES.md : SIDE_SIZES.md), className)
21870
+ className: cn$1("absolute flex flex-col border-gray-200 bg-white text-gray-900 shadow-xl focus:outline-none", "dark:border-gray-700 dark:bg-gray-900 dark:text-gray-100", "animate-fade-in motion-reduce:animate-none", PLACEMENT_CLASSES[side], (isEdge ? EDGE_SIZES : SIDE_SIZES)[size] || (isEdge ? EDGE_SIZES.md : SIDE_SIZES.md), !swipe.dragging && "transition-transform duration-200 ease-out motion-reduce:transition-none", className),
21871
+ style: swipe.offset ? _objectSpread$j(_objectSpread$j({}, style), {}, {
21872
+ transform: "translateY(".concat(swipe.offset, "px)")
21873
+ }) : style
21720
21874
  }, props), {}, {
21721
- children: composed ? jsxRuntime.jsxs(jsxRuntime.Fragment, {
21875
+ children: [showHandle && jsxRuntime.jsx("div", _objectSpread$j(_objectSpread$j({
21876
+ "aria-hidden": "true",
21877
+ "data-testid": "drawer-handle"
21878
+ }, grabProps), {}, {
21879
+ className: cn$1("flex shrink-0 justify-center pb-1 pt-3", grabProps.className),
21880
+ children: jsxRuntime.jsx("span", {
21881
+ className: "h-1.5 w-10 rounded-full bg-gray-300 dark:bg-gray-600"
21882
+ })
21883
+ })), composed ? jsxRuntime.jsxs(jsxRuntime.Fragment, {
21722
21884
  children: [showCloseButton && jsxRuntime.jsx(CloseButton, {
21723
21885
  onClose: onClose,
21724
21886
  className: "absolute right-3 top-3"
21725
21887
  }), children]
21726
21888
  }) : jsxRuntime.jsxs(jsxRuntime.Fragment, {
21727
- children: [jsxRuntime.jsxs("div", {
21728
- className: "flex items-start justify-between gap-4 border-b border-gray-200 px-6 py-4 dark:border-gray-700",
21889
+ children: [jsxRuntime.jsxs("div", _objectSpread$j(_objectSpread$j({}, grabProps), {}, {
21890
+ className: cn$1("flex items-start justify-between gap-4 border-b border-gray-200 px-6 py-4 dark:border-gray-700", showHandle && "pt-2", grabProps.className),
21729
21891
  children: [jsxRuntime.jsxs("div", {
21730
21892
  className: "min-w-0",
21731
21893
  children: [title && jsxRuntime.jsx("h2", {
@@ -21740,14 +21902,14 @@ var Drawer = /*#__PURE__*/React.forwardRef(function (_ref2, _ref3) {
21740
21902
  }), showCloseButton && jsxRuntime.jsx(CloseButton, {
21741
21903
  onClose: onClose
21742
21904
  })]
21743
- }), jsxRuntime.jsx("div", {
21905
+ })), jsxRuntime.jsx("div", {
21744
21906
  className: "min-h-0 flex-1 overflow-y-auto px-6 py-4",
21745
21907
  children: children
21746
21908
  }), footer && jsxRuntime.jsx("div", {
21747
21909
  className: "flex items-center justify-end gap-3 border-t border-gray-200 px-6 py-4 dark:border-gray-700",
21748
21910
  children: footer
21749
21911
  })]
21750
- })
21912
+ })]
21751
21913
  }))]
21752
21914
  }), document.body);
21753
21915
  });
@@ -22155,6 +22317,7 @@ var Badge = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
22155
22317
  success: 'bg-success-100 text-success-800',
22156
22318
  warning: 'bg-warning-100 text-warning-800',
22157
22319
  error: 'bg-error-100 text-error-800',
22320
+ info: 'bg-info-100 text-info-800',
22158
22321
  outline: 'border border-gray-300'
22159
22322
  };
22160
22323
  var sizes = {
@@ -22193,7 +22356,7 @@ var Card = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
22193
22356
  props = _objectWithoutProperties$1(_ref, _excluded$c);
22194
22357
  return jsxRuntime.jsx("div", _objectSpread$g(_objectSpread$g({
22195
22358
  ref: ref,
22196
- className: cn$1('rounded-lg border border-gray-200 bg-white shadow-sm', {
22359
+ className: cn$1('rounded-lg border border-line bg-surface shadow-sm', {
22197
22360
  'hover:shadow-md transition-shadow': hover
22198
22361
  }, className)
22199
22362
  }, props), {}, {
@@ -22206,7 +22369,7 @@ var CardHeader = function CardHeader(_ref2) {
22206
22369
  className = _ref2.className,
22207
22370
  props = _objectWithoutProperties$1(_ref2, _excluded2);
22208
22371
  return jsxRuntime.jsx("div", _objectSpread$g(_objectSpread$g({
22209
- className: cn$1('px-6 py-4 border-b border-gray-200', className)
22372
+ className: cn$1('px-6 py-4 border-b border-line', className)
22210
22373
  }, props), {}, {
22211
22374
  children: children
22212
22375
  }));
@@ -22216,7 +22379,7 @@ var CardTitle = function CardTitle(_ref3) {
22216
22379
  className = _ref3.className,
22217
22380
  props = _objectWithoutProperties$1(_ref3, _excluded3);
22218
22381
  return jsxRuntime.jsx("h3", _objectSpread$g(_objectSpread$g({
22219
- className: cn$1('text-lg font-semibold text-primary-900', className)
22382
+ className: cn$1('text-lg font-semibold text-primary-900 dark:text-primary-100', className)
22220
22383
  }, props), {}, {
22221
22384
  children: children
22222
22385
  }));
@@ -22226,7 +22389,7 @@ var CardDescription = function CardDescription(_ref4) {
22226
22389
  className = _ref4.className,
22227
22390
  props = _objectWithoutProperties$1(_ref4, _excluded4);
22228
22391
  return jsxRuntime.jsx("p", _objectSpread$g(_objectSpread$g({
22229
- className: cn$1('text-sm text-primary-600', className)
22392
+ className: cn$1('text-sm text-primary-600 dark:text-primary-300', className)
22230
22393
  }, props), {}, {
22231
22394
  children: children
22232
22395
  }));
@@ -22246,7 +22409,7 @@ var CardFooter = function CardFooter(_ref6) {
22246
22409
  className = _ref6.className,
22247
22410
  props = _objectWithoutProperties$1(_ref6, _excluded6);
22248
22411
  return jsxRuntime.jsx("div", _objectSpread$g(_objectSpread$g({
22249
- className: cn$1('px-6 py-4 border-t border-gray-200', className)
22412
+ className: cn$1('px-6 py-4 border-t border-line', className)
22250
22413
  }, props), {}, {
22251
22414
  children: children
22252
22415
  }));
@@ -22407,9 +22570,12 @@ var Stepper = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
22407
22570
  "aria-label": "Progress"
22408
22571
  }, props), {}, {
22409
22572
  children: steps.map(function (step, stepIndex) {
22573
+ var _step$title;
22410
22574
  var status = getStepStatus(stepIndex);
22411
22575
  var isLast = stepIndex === steps.length - 1;
22412
22576
  var colors = statusColors[status];
22577
+ // `label` is accepted as an alias for `title` (the docs used `label`).
22578
+ var stepTitle = (_step$title = step.title) !== null && _step$title !== void 0 ? _step$title : step.label;
22413
22579
  return jsxRuntime.jsxs("div", {
22414
22580
  className: cn$1('flex items-center', {
22415
22581
  'flex-col': orientation === 'horizontal',
@@ -22429,7 +22595,7 @@ var Stepper = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
22429
22595
  },
22430
22596
  disabled: !onStepClick || stepIndex > currentStep,
22431
22597
  "aria-current": status === 'current' ? 'step' : undefined,
22432
- "aria-label": "Step ".concat(stepIndex + 1).concat(step.title ? ": ".concat(step.title) : '').concat(status === 'completed' ? ' (completed)' : ''),
22598
+ "aria-label": "Step ".concat(stepIndex + 1).concat(stepTitle ? ": ".concat(stepTitle) : '').concat(status === 'completed' ? ' (completed)' : ''),
22433
22599
  children: status === 'completed' ? jsxRuntime.jsx(Check, {
22434
22600
  className: "h-4 w-4",
22435
22601
  "aria-hidden": "true"
@@ -22447,7 +22613,7 @@ var Stepper = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
22447
22613
  }),
22448
22614
  children: [jsxRuntime.jsx("span", {
22449
22615
  className: cn$1('text-sm font-medium', colors.text),
22450
- children: step.title
22616
+ children: stepTitle
22451
22617
  }), step.description && jsxRuntime.jsx("span", {
22452
22618
  className: "text-xs text-muted",
22453
22619
  children: step.description
@@ -23547,7 +23713,7 @@ function _objectSpread$7(e) { for (var r = 1; r < arguments.length; r++) { var t
23547
23713
  // One map from domain state to tone + human label; unknown states are humanized, never shown raw.
23548
23714
  var TONE_TO_VARIANT = {
23549
23715
  neutral: 'secondary',
23550
- info: 'primary',
23716
+ info: 'info',
23551
23717
  success: 'success',
23552
23718
  warning: 'warning',
23553
23719
  danger: 'error',