@rojaostudio/ds 1.0.1 → 1.0.2

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 (134) hide show
  1. package/dist/components/accordion.js +43 -37
  2. package/dist/components/alert.js +35 -28
  3. package/dist/components/avatar.js +41 -34
  4. package/dist/components/badge.js +21 -14
  5. package/dist/components/blocker-card.js +11 -2
  6. package/dist/components/bottom-sheet.js +60 -53
  7. package/dist/components/breadcrumb.js +32 -22
  8. package/dist/components/button.js +18 -11
  9. package/dist/components/card.js +24 -9
  10. package/dist/components/chat-bubble.js +6 -5
  11. package/dist/components/checkbox.js +61 -48
  12. package/dist/components/chip-input.js +98 -81
  13. package/dist/components/chips.js +36 -29
  14. package/dist/components/choice-card.js +48 -42
  15. package/dist/components/choice-carousel.js +79 -74
  16. package/dist/components/choice-preview-card.js +17 -6
  17. package/dist/components/color-input.js +41 -35
  18. package/dist/components/combobox.js +97 -75
  19. package/dist/components/context-menu.js +17 -13
  20. package/dist/components/copilot-hint.js +40 -31
  21. package/dist/components/copy-field.js +8 -5
  22. package/dist/components/currency-input.js +40 -32
  23. package/dist/components/danger-zone.js +19 -9
  24. package/dist/components/data-table-header.js +185 -135
  25. package/dist/components/date-picker.js +114 -95
  26. package/dist/components/divider.js +11 -8
  27. package/dist/components/drawer.js +40 -28
  28. package/dist/components/dropzone.js +23 -20
  29. package/dist/components/empty-state.js +26 -23
  30. package/dist/components/fab.js +38 -26
  31. package/dist/components/filter-chip.js +20 -16
  32. package/dist/components/floating-stepper.js +42 -32
  33. package/dist/components/form-card-header.js +9 -1
  34. package/dist/components/icon-button.js +19 -13
  35. package/dist/components/image-crop-modal.js +69 -48
  36. package/dist/components/image-upload.js +172 -128
  37. package/dist/components/input.js +90 -62
  38. package/dist/components/insight-card.js +12 -1
  39. package/dist/components/label.js +12 -7
  40. package/dist/components/media-tile.js +11 -8
  41. package/dist/components/menu.js +28 -25
  42. package/dist/components/modal.js +43 -28
  43. package/dist/components/notice.js +34 -16
  44. package/dist/components/option-tile.js +55 -49
  45. package/dist/components/page-shell.js +13 -6
  46. package/dist/components/page-skeleton.js +32 -2
  47. package/dist/components/page-tabs.js +39 -26
  48. package/dist/components/pagination.js +38 -33
  49. package/dist/components/paywall-banner.js +19 -3
  50. package/dist/components/paywall.js +18 -8
  51. package/dist/components/phone-frame.js +5 -4
  52. package/dist/components/phone-input.js +50 -31
  53. package/dist/components/pix-icon.js +11 -6
  54. package/dist/components/popover.js +27 -23
  55. package/dist/components/pricing-card.js +16 -1
  56. package/dist/components/qr-display.js +16 -11
  57. package/dist/components/radio.js +73 -56
  58. package/dist/components/row-actions.js +61 -53
  59. package/dist/components/saving-bar-context.js +35 -29
  60. package/dist/components/saving-bar.js +36 -33
  61. package/dist/components/search.js +49 -44
  62. package/dist/components/section-card.js +43 -35
  63. package/dist/components/section-header.js +11 -1
  64. package/dist/components/select.js +83 -62
  65. package/dist/components/selectable-card.js +10 -3
  66. package/dist/components/setting-row.js +11 -1
  67. package/dist/components/settings-list.js +9 -5
  68. package/dist/components/skeleton.js +6 -5
  69. package/dist/components/slider.js +52 -38
  70. package/dist/components/spinner.js +18 -12
  71. package/dist/components/step-progress.js +11 -10
  72. package/dist/components/summary-bar.js +33 -28
  73. package/dist/components/table.js +20 -15
  74. package/dist/components/textarea.js +40 -24
  75. package/dist/components/themed.d.ts +1 -1
  76. package/dist/components/themed.js +2 -1
  77. package/dist/components/time-picker.js +117 -97
  78. package/dist/components/toaster.js +80 -74
  79. package/dist/components/toggle-card-compact.js +79 -71
  80. package/dist/components/toggle-card.js +61 -53
  81. package/dist/components/toggle-group.js +35 -29
  82. package/dist/components/toggle.js +46 -36
  83. package/dist/components/tooltip.js +30 -25
  84. package/dist/components/typing-indicator.js +10 -7
  85. package/dist/targets/native/components/accordion.js +31 -25
  86. package/dist/targets/native/components/alert.js +22 -16
  87. package/dist/targets/native/components/avatar.js +36 -29
  88. package/dist/targets/native/components/badge.js +4 -3
  89. package/dist/targets/native/components/button.js +11 -4
  90. package/dist/targets/native/components/card.js +2 -1
  91. package/dist/targets/native/components/checkbox.js +18 -15
  92. package/dist/targets/native/components/chips.js +19 -16
  93. package/dist/targets/native/components/choice-card.js +29 -23
  94. package/dist/targets/native/components/context-menu.js +13 -9
  95. package/dist/targets/native/components/currency-input.js +28 -25
  96. package/dist/targets/native/components/danger-zone.js +10 -4
  97. package/dist/targets/native/components/date-picker.js +86 -70
  98. package/dist/targets/native/components/divider.js +3 -2
  99. package/dist/targets/native/components/empty-state.js +6 -1
  100. package/dist/targets/native/components/fab.js +32 -26
  101. package/dist/targets/native/components/filter-chip.js +9 -8
  102. package/dist/targets/native/components/form-field.js +20 -10
  103. package/dist/targets/native/components/form-screen.js +50 -45
  104. package/dist/targets/native/components/google-icon.js +31 -25
  105. package/dist/targets/native/components/icon-button.js +6 -4
  106. package/dist/targets/native/components/icon.js +2 -1
  107. package/dist/targets/native/components/image-upload.js +59 -50
  108. package/dist/targets/native/components/input.js +41 -34
  109. package/dist/targets/native/components/list-item.js +29 -23
  110. package/dist/targets/native/components/menu.js +12 -10
  111. package/dist/targets/native/components/modal.js +41 -32
  112. package/dist/targets/native/components/paywall-banner.js +13 -4
  113. package/dist/targets/native/components/paywall.js +11 -1
  114. package/dist/targets/native/components/radio.js +19 -16
  115. package/dist/targets/native/components/search.js +41 -38
  116. package/dist/targets/native/components/select.js +71 -63
  117. package/dist/targets/native/components/sheet.js +36 -30
  118. package/dist/targets/native/components/skeleton.js +6 -5
  119. package/dist/targets/native/components/slider.js +51 -43
  120. package/dist/targets/native/components/spinner.js +2 -1
  121. package/dist/targets/native/components/stepper.js +14 -9
  122. package/dist/targets/native/components/switch.js +15 -14
  123. package/dist/targets/native/components/text.js +2 -1
  124. package/dist/targets/native/components/textarea.js +2 -1
  125. package/dist/targets/native/components/theme.js +2 -1
  126. package/dist/targets/native/components/toaster.js +24 -21
  127. package/dist/targets/native/index.d.ts +1 -1
  128. package/dist/targets/native/index.js +1 -3
  129. package/package.json +3 -6
  130. package/styles/base.css +3 -3
  131. package/brand/rojao-black-on-white.png +0 -0
  132. package/brand/rojao-black.png +0 -0
  133. package/brand/rojao-white-on-black.png +0 -0
  134. package/brand/rojao-white.png +0 -0
@@ -1,5 +1,6 @@
1
1
  "use client";
2
2
  import "../chunk-ORMEWXMH.js";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
3
4
  import { useEffect, useId } from "react";
4
5
  import { X } from "lucide-react";
5
6
  import { createPortal } from "react-dom";
@@ -45,35 +46,46 @@ function Drawer({
45
46
  }, [open, onClose]);
46
47
  if (!open) return null;
47
48
  return createPortal(
48
- /* @__PURE__ */ React.createElement("div", { className: "fixed inset-0 z-50 flex" }, /* @__PURE__ */ React.createElement("div", { className: "absolute inset-0 [background:var(--overlay-scrim)]", onClick: closeOnBackdrop ? onClose : void 0, "aria-hidden": "true" }), /* @__PURE__ */ React.createElement(
49
- "div",
50
- {
51
- ref: panelRef,
52
- role: "dialog",
53
- "aria-modal": "true",
54
- "aria-labelledby": title ? titleId : void 0,
55
- tabIndex: -1,
56
- className: [
57
- "relative z-10 flex flex-col bg-surface-default shadow-xl h-full max-w-full",
58
- "focus:outline-none",
59
- widthClass,
60
- side === "right" ? "ml-auto" : "mr-auto",
61
- className
62
- ].join(" ")
63
- },
64
- (title || !hideClose) && /* @__PURE__ */ React.createElement("div", { className: "flex items-start justify-between gap-4 px-6 py-4 border-b border-stroke-default shrink-0" }, /* @__PURE__ */ React.createElement("div", { className: "flex-1 min-w-0" }, title && /* @__PURE__ */ React.createElement("h2", { id: titleId, className: "text-body font-semibold text-fg-primary" }, title), subtitle && /* @__PURE__ */ React.createElement("p", { className: "text-label text-fg-muted mt-0.5" }, subtitle)), !hideClose && /* @__PURE__ */ React.createElement(
65
- "button",
49
+ /* @__PURE__ */ jsxs("div", { className: "fixed inset-0 z-50 flex", children: [
50
+ /* @__PURE__ */ jsx("div", { className: "absolute inset-0 [background:var(--overlay-scrim)]", onClick: closeOnBackdrop ? onClose : void 0, "aria-hidden": "true" }),
51
+ /* @__PURE__ */ jsxs(
52
+ "div",
66
53
  {
67
- type: "button",
68
- onClick: onClose,
69
- className: "shrink-0 text-fg-muted hover:text-fg-primary transition-colors rounded focus-visible:ring-2 focus-visible:ring-stroke-focus focus-visible:outline-none p-0.5",
70
- "aria-label": "Fechar"
71
- },
72
- /* @__PURE__ */ React.createElement(X, { size: 20 })
73
- )),
74
- /* @__PURE__ */ React.createElement("div", { className: "flex-1 overflow-y-auto px-6 py-4" }, children),
75
- footer && /* @__PURE__ */ React.createElement("div", { className: "flex items-center justify-end gap-3 px-6 py-4 border-t border-stroke-default shrink-0" }, footer)
76
- )),
54
+ ref: panelRef,
55
+ role: "dialog",
56
+ "aria-modal": "true",
57
+ "aria-labelledby": title ? titleId : void 0,
58
+ tabIndex: -1,
59
+ className: [
60
+ "relative z-10 flex flex-col bg-surface-default shadow-xl h-full max-w-full",
61
+ "focus:outline-none",
62
+ widthClass,
63
+ side === "right" ? "ml-auto" : "mr-auto",
64
+ className
65
+ ].join(" "),
66
+ children: [
67
+ (title || !hideClose) && /* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-4 px-6 py-4 border-b border-stroke-default shrink-0", children: [
68
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
69
+ title && /* @__PURE__ */ jsx("h2", { id: titleId, className: "text-body font-semibold text-fg-primary", children: title }),
70
+ subtitle && /* @__PURE__ */ jsx("p", { className: "text-label text-fg-muted mt-0.5", children: subtitle })
71
+ ] }),
72
+ !hideClose && /* @__PURE__ */ jsx(
73
+ "button",
74
+ {
75
+ type: "button",
76
+ onClick: onClose,
77
+ className: "shrink-0 text-fg-muted hover:text-fg-primary transition-colors rounded focus-visible:ring-2 focus-visible:ring-stroke-focus focus-visible:outline-none p-0.5",
78
+ "aria-label": "Fechar",
79
+ children: /* @__PURE__ */ jsx(X, { size: 20 })
80
+ }
81
+ )
82
+ ] }),
83
+ /* @__PURE__ */ jsx("div", { className: "flex-1 overflow-y-auto px-6 py-4", children }),
84
+ footer && /* @__PURE__ */ jsx("div", { className: "flex items-center justify-end gap-3 px-6 py-4 border-t border-stroke-default shrink-0", children: footer })
85
+ ]
86
+ }
87
+ )
88
+ ] }),
77
89
  container != null ? container : document.body
78
90
  );
79
91
  }
@@ -1,5 +1,6 @@
1
1
  "use client";
2
2
  import "../chunk-ORMEWXMH.js";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
3
4
  import { useRef, useState } from "react";
4
5
  function Dropzone({ onFiles, accept, multiple = false, disabled = false, className = "", children }) {
5
6
  const inputRef = useRef(null);
@@ -11,7 +12,7 @@ function Dropzone({ onFiles, accept, multiple = false, disabled = false, classNa
11
12
  if (disabled) return;
12
13
  if ((_a = e.dataTransfer.files) == null ? void 0 : _a.length) onFiles(e.dataTransfer.files);
13
14
  }
14
- return /* @__PURE__ */ React.createElement(
15
+ return /* @__PURE__ */ jsxs(
15
16
  "div",
16
17
  {
17
18
  role: "button",
@@ -39,25 +40,27 @@ function Dropzone({ onFiles, accept, multiple = false, disabled = false, classNa
39
40
  disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer",
40
41
  dragging ? "border-stroke-focus bg-surface-raised" : "border-stroke-control hover:border-stroke-strong hover:bg-surface-page",
41
42
  className
42
- ].filter(Boolean).join(" ")
43
- },
44
- /* @__PURE__ */ React.createElement(
45
- "input",
46
- {
47
- ref: inputRef,
48
- type: "file",
49
- accept,
50
- multiple,
51
- disabled,
52
- className: "hidden",
53
- onChange: (e) => {
54
- var _a;
55
- if ((_a = e.target.files) == null ? void 0 : _a.length) onFiles(e.target.files);
56
- e.target.value = "";
57
- }
58
- }
59
- ),
60
- children
43
+ ].filter(Boolean).join(" "),
44
+ children: [
45
+ /* @__PURE__ */ jsx(
46
+ "input",
47
+ {
48
+ ref: inputRef,
49
+ type: "file",
50
+ accept,
51
+ multiple,
52
+ disabled,
53
+ className: "hidden",
54
+ onChange: (e) => {
55
+ var _a;
56
+ if ((_a = e.target.files) == null ? void 0 : _a.length) onFiles(e.target.files);
57
+ e.target.value = "";
58
+ }
59
+ }
60
+ ),
61
+ children
62
+ ]
63
+ }
61
64
  );
62
65
  }
63
66
  export {
@@ -1,5 +1,6 @@
1
1
  "use client";
2
2
  import "../chunk-ORMEWXMH.js";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
3
4
  import {
4
5
  Package,
5
6
  Clock,
@@ -54,35 +55,37 @@ function EmptyState({
54
55
  className = ""
55
56
  }) {
56
57
  const Icon = ICON_MAP[icon];
57
- return /* @__PURE__ */ React.createElement(
58
+ return /* @__PURE__ */ jsxs(
58
59
  "div",
59
60
  {
60
61
  className: [
61
62
  "flex flex-col items-center justify-center text-center px-6",
62
63
  size === "full" ? "min-h-[320px] flex-1" : "min-h-[200px] py-10",
63
64
  className
64
- ].filter(Boolean).join(" ")
65
- },
66
- /* @__PURE__ */ React.createElement("div", { className: "mb-5 text-stroke-strong" }, /* @__PURE__ */ React.createElement(Icon, { size: 72, strokeWidth: 1.25 })),
67
- /* @__PURE__ */ React.createElement("p", { className: "text-body font-semibold text-fg-primary mb-2" }, title),
68
- description && /* @__PURE__ */ React.createElement("p", { className: "text-label text-fg-muted max-w-sm leading-relaxed mb-4" }, description),
69
- cta && (cta.href ? /* @__PURE__ */ React.createElement(
70
- "a",
71
- {
72
- href: cta.href,
73
- className: "mt-3 inline-block px-4 py-2 text-label font-medium rounded-(--radius-card) transition-colors text-brand-on-primary bg-brand-primary hover:bg-brand-hover"
74
- },
75
- cta.label
76
- ) : /* @__PURE__ */ React.createElement(
77
- "button",
78
- {
79
- type: "button",
80
- onClick: cta.onClick,
81
- className: "mt-3 inline-block px-4 py-2 text-label font-medium rounded-(--radius-card) transition-colors text-brand-on-primary bg-brand-primary hover:bg-brand-hover"
82
- },
83
- cta.label
84
- )),
85
- children
65
+ ].filter(Boolean).join(" "),
66
+ children: [
67
+ /* @__PURE__ */ jsx("div", { className: "mb-5 text-stroke-strong", children: /* @__PURE__ */ jsx(Icon, { size: 72, strokeWidth: 1.25 }) }),
68
+ /* @__PURE__ */ jsx("p", { className: "text-body font-semibold text-fg-primary mb-2", children: title }),
69
+ description && /* @__PURE__ */ jsx("p", { className: "text-label text-fg-muted max-w-sm leading-relaxed mb-4", children: description }),
70
+ cta && (cta.href ? /* @__PURE__ */ jsx(
71
+ "a",
72
+ {
73
+ href: cta.href,
74
+ className: "mt-3 inline-block px-4 py-2 text-label font-medium rounded-(--radius-card) transition-colors text-brand-on-primary bg-brand-primary hover:bg-brand-hover",
75
+ children: cta.label
76
+ }
77
+ ) : /* @__PURE__ */ jsx(
78
+ "button",
79
+ {
80
+ type: "button",
81
+ onClick: cta.onClick,
82
+ className: "mt-3 inline-block px-4 py-2 text-label font-medium rounded-(--radius-card) transition-colors text-brand-on-primary bg-brand-primary hover:bg-brand-hover",
83
+ children: cta.label
84
+ }
85
+ )),
86
+ children
87
+ ]
88
+ }
86
89
  );
87
90
  }
88
91
  export {
@@ -1,5 +1,6 @@
1
1
  "use client";
2
2
  import "../chunk-ORMEWXMH.js";
3
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
4
  import {
4
5
  createContext,
5
6
  useCallback,
@@ -30,7 +31,7 @@ function FABProvider({ children }) {
30
31
  const [fabHidden, setFabHidden] = useState(false);
31
32
  const setFAB = useCallback((cfg) => setConfig(cfg), []);
32
33
  const clearFAB = useCallback(() => setConfig(null), []);
33
- return /* @__PURE__ */ React.createElement(FABContext.Provider, { value: { config, setFAB, clearFAB, bottomOffset, setBottomOffset, fabHidden, setFabHidden } }, children);
34
+ return /* @__PURE__ */ jsx(FABContext.Provider, { value: { config, setFAB, clearFAB, bottomOffset, setBottomOffset, fabHidden, setFabHidden }, children });
34
35
  }
35
36
  function useFAB() {
36
37
  return useContext(FABContext);
@@ -59,38 +60,49 @@ function FABRoot() {
59
60
  ].join(" ");
60
61
  const bottomStyle = { bottom: `${24 + bottomOffset}px` };
61
62
  if ((config == null ? void 0 : config.variant) === "save") {
62
- return /* @__PURE__ */ React.createElement("div", { className: wrapCls, style: bottomStyle }, /* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-3 rounded-(--radius-control) px-4 py-3 [background:var(--fab-save-bg)] [box-shadow:var(--fab-save-shadow)]" }, config.secondary && /* @__PURE__ */ React.createElement(
63
- "button",
64
- {
65
- type: "button",
66
- onClick: config.secondary.onClick,
67
- disabled: config.loading,
68
- className: "rounded-(--radius-control) border px-3 py-1.5 text-label font-medium transition-colors disabled:opacity-40 cursor-pointer [border-color:var(--fab-save-discard-border)] [color:var(--fab-save-discard-text)] hover:[border-color:var(--fab-save-discard-border-hover)] hover:[color:var(--fab-save-discard-text-hover)]"
69
- },
70
- config.secondary.label
71
- ), /* @__PURE__ */ React.createElement(
72
- "button",
73
- {
74
- type: "button",
75
- onClick: config.onClick,
76
- disabled: config.disabled || config.loading,
77
- className: "rounded-(--radius-control) px-4 py-1.5 text-label font-medium transition-colors disabled:opacity-50 cursor-pointer flex items-center gap-2 [background:var(--fab-save-primary-bg)] [color:var(--fab-save-primary-text)] hover:[background:var(--fab-save-primary-bg-hover)]"
78
- },
79
- config.loading ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Loader2, { className: "w-4 h-4 animate-spin" }), "Salvando...") : config.label
80
- )));
63
+ return /* @__PURE__ */ jsx("div", { className: wrapCls, style: bottomStyle, children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 rounded-(--radius-control) px-4 py-3 [background:var(--fab-save-bg)] [box-shadow:var(--fab-save-shadow)]", children: [
64
+ config.secondary && /* @__PURE__ */ jsx(
65
+ "button",
66
+ {
67
+ type: "button",
68
+ onClick: config.secondary.onClick,
69
+ disabled: config.loading,
70
+ className: "rounded-(--radius-control) border px-3 py-1.5 text-label font-medium transition-colors disabled:opacity-40 cursor-pointer [border-color:var(--fab-save-discard-border)] [color:var(--fab-save-discard-text)] hover:[border-color:var(--fab-save-discard-border-hover)] hover:[color:var(--fab-save-discard-text-hover)]",
71
+ children: config.secondary.label
72
+ }
73
+ ),
74
+ /* @__PURE__ */ jsx(
75
+ "button",
76
+ {
77
+ type: "button",
78
+ onClick: config.onClick,
79
+ disabled: config.disabled || config.loading,
80
+ className: "rounded-(--radius-control) px-4 py-1.5 text-label font-medium transition-colors disabled:opacity-50 cursor-pointer flex items-center gap-2 [background:var(--fab-save-primary-bg)] [color:var(--fab-save-primary-text)] hover:[background:var(--fab-save-primary-bg-hover)]",
81
+ children: config.loading ? /* @__PURE__ */ jsxs(Fragment, { children: [
82
+ /* @__PURE__ */ jsx(Loader2, { className: "w-4 h-4 animate-spin" }),
83
+ "Salvando..."
84
+ ] }) : config.label
85
+ }
86
+ )
87
+ ] }) });
81
88
  }
82
89
  const btnCls = "flex items-center gap-2 h-12 pl-4 pr-5 rounded-(--radius-control) text-label font-semibold shadow-lg transition-colors cursor-pointer [background:var(--fab-cta-bg)] [color:var(--fab-cta-text)] hover:[background:var(--fab-cta-bg-hover)]";
83
- return /* @__PURE__ */ React.createElement("div", { className: wrapCls, style: bottomStyle }, (config == null ? void 0 : config.href) ? /* @__PURE__ */ React.createElement(Link, { href: config.href, className: btnCls }, /* @__PURE__ */ React.createElement(Plus, { size: 16, strokeWidth: 2.5 }), config == null ? void 0 : config.label) : /* @__PURE__ */ React.createElement(
90
+ return /* @__PURE__ */ jsx("div", { className: wrapCls, style: bottomStyle, children: (config == null ? void 0 : config.href) ? /* @__PURE__ */ jsxs(Link, { href: config.href, className: btnCls, children: [
91
+ /* @__PURE__ */ jsx(Plus, { size: 16, strokeWidth: 2.5 }),
92
+ config == null ? void 0 : config.label
93
+ ] }) : /* @__PURE__ */ jsxs(
84
94
  "button",
85
95
  {
86
96
  type: "button",
87
97
  onClick: config == null ? void 0 : config.onClick,
88
98
  disabled: config == null ? void 0 : config.disabled,
89
- className: btnCls + " disabled:opacity-50"
90
- },
91
- /* @__PURE__ */ React.createElement(Plus, { size: 16, strokeWidth: 2.5 }),
92
- config == null ? void 0 : config.label
93
- ));
99
+ className: btnCls + " disabled:opacity-50",
100
+ children: [
101
+ /* @__PURE__ */ jsx(Plus, { size: 16, strokeWidth: 2.5 }),
102
+ config == null ? void 0 : config.label
103
+ ]
104
+ }
105
+ ) });
94
106
  }
95
107
  export {
96
108
  FABProvider,
@@ -1,64 +1,68 @@
1
1
  "use client";
2
2
  import "../chunk-ORMEWXMH.js";
3
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
4
  import Link from "next/link";
4
5
  const BASE = "h-control-sm inline-flex items-center text-caption font-medium border transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-stroke-focus px-[var(--filter-chip-padding-x)] [border-radius:var(--filter-chip-radius)]";
5
6
  const ACTIVE = "[background:var(--filter-chip-color-surface-active)] [border-color:var(--filter-chip-color-stroke-active)] [color:var(--filter-chip-color-text-active)]";
6
7
  const INACTIVE = "[background:var(--filter-chip-color-surface-inactive)] [border-color:var(--filter-chip-color-stroke-inactive)] [color:var(--filter-chip-color-text-inactive)] hover:[background:var(--filter-chip-color-surface-hover)] hover:[border-color:var(--filter-chip-color-stroke-hover)] hover:[color:var(--filter-chip-color-text-hover)]";
7
8
  const DISABLED = "[background:var(--filter-chip-color-surface-disabled)] [border-color:var(--filter-chip-color-stroke-disabled)] [color:var(--filter-chip-color-text-disabled)] opacity-50 pointer-events-none cursor-not-allowed";
8
9
  function FilterChipBody({ label, count }) {
9
- if (count === void 0) return /* @__PURE__ */ React.createElement(React.Fragment, null, label);
10
- return /* @__PURE__ */ React.createElement(React.Fragment, null, label, /* @__PURE__ */ React.createElement("span", { className: "ml-1 opacity-60 tabular-nums" }, count));
10
+ if (count === void 0) return /* @__PURE__ */ jsx(Fragment, { children: label });
11
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
12
+ label,
13
+ /* @__PURE__ */ jsx("span", { className: "ml-1 opacity-60 tabular-nums", children: count })
14
+ ] });
11
15
  }
12
16
  function FilterChip({ label, active, count, disabled = false, href, onClick, className = "" }) {
13
17
  const cls = [BASE, active ? ACTIVE : INACTIVE, disabled ? DISABLED : "", className].filter(Boolean).join(" ");
14
18
  if (href) {
15
- return /* @__PURE__ */ React.createElement(
19
+ return /* @__PURE__ */ jsx(
16
20
  Link,
17
21
  {
18
22
  href,
19
23
  "aria-current": active ? "true" : void 0,
20
24
  "aria-disabled": disabled || void 0,
21
25
  tabIndex: disabled ? -1 : void 0,
22
- className: cls
23
- },
24
- /* @__PURE__ */ React.createElement(FilterChipBody, { label, count })
26
+ className: cls,
27
+ children: /* @__PURE__ */ jsx(FilterChipBody, { label, count })
28
+ }
25
29
  );
26
30
  }
27
- return /* @__PURE__ */ React.createElement(
31
+ return /* @__PURE__ */ jsx(
28
32
  "button",
29
33
  {
30
34
  type: "button",
31
35
  onClick,
32
36
  "aria-pressed": active,
33
37
  disabled,
34
- className: cls
35
- },
36
- /* @__PURE__ */ React.createElement(FilterChipBody, { label, count })
38
+ className: cls,
39
+ children: /* @__PURE__ */ jsx(FilterChipBody, { label, count })
40
+ }
37
41
  );
38
42
  }
39
43
  function FilterChipGroup({ items, active, label, className = "" }) {
40
- return /* @__PURE__ */ React.createElement("div", { role: "group", "aria-label": label, className: ["flex flex-wrap [gap:var(--filter-chip-group-gap)]", className].filter(Boolean).join(" ") }, items.map((item) => {
44
+ return /* @__PURE__ */ jsx("div", { role: "group", "aria-label": label, className: ["flex flex-wrap [gap:var(--filter-chip-group-gap)]", className].filter(Boolean).join(" "), children: items.map((item) => {
41
45
  var _a;
42
46
  if (process.env.NODE_ENV === "development" && !item.href && !item.onClick) {
43
47
  console.warn(`[FilterChipGroup] item "${item.label}" has neither href nor onClick \u2014 click will have no effect`);
44
48
  }
45
49
  const isActive = active === item.value || !active && item.value === void 0;
46
50
  if (item.href) {
47
- return /* @__PURE__ */ React.createElement(FilterChip, { key: item.label, label: item.label, active: isActive, count: item.count, disabled: item.disabled, href: item.href });
51
+ return /* @__PURE__ */ jsx(FilterChip, { label: item.label, active: isActive, count: item.count, disabled: item.disabled, href: item.href }, item.label);
48
52
  }
49
- return /* @__PURE__ */ React.createElement(
53
+ return /* @__PURE__ */ jsx(
50
54
  FilterChip,
51
55
  {
52
- key: item.label,
53
56
  label: item.label,
54
57
  active: isActive,
55
58
  count: item.count,
56
59
  disabled: item.disabled,
57
60
  onClick: (_a = item.onClick) != null ? _a : (() => {
58
61
  })
59
- }
62
+ },
63
+ item.label
60
64
  );
61
- }));
65
+ }) });
62
66
  }
63
67
  export {
64
68
  FilterChip,
@@ -1,5 +1,6 @@
1
1
  "use client";
2
2
  import "../chunk-ORMEWXMH.js";
3
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
4
  function FloatingStepper({
4
5
  steps,
5
6
  current,
@@ -9,43 +10,52 @@ function FloatingStepper({
9
10
  className = ""
10
11
  }) {
11
12
  const currentIdx = steps.findIndex((s) => s.key === current);
12
- return /* @__PURE__ */ React.createElement(
13
+ return /* @__PURE__ */ jsxs(
13
14
  "div",
14
15
  {
15
16
  className: [
16
17
  "flex items-center gap-0.5 rounded-full bg-surface-shell shadow-2xl px-1.5 py-1.5",
17
18
  className
18
- ].filter(Boolean).join(" ")
19
- },
20
- steps.map((s, idx) => {
21
- const isCurrent = idx === currentIdx;
22
- const canGo = canNavigate ? canNavigate(s.key, idx, currentIdx) : idx < currentIdx;
23
- return /* @__PURE__ */ React.createElement(
24
- "button",
25
- {
26
- key: s.key,
27
- type: "button",
28
- disabled: !canGo && !isCurrent,
29
- "aria-current": isCurrent ? "step" : void 0,
30
- onClick: () => {
31
- if (canGo) onNavigate == null ? void 0 : onNavigate(s.key);
32
- },
33
- className: `flex items-center gap-1.5 rounded-full px-3 py-1.5 text-caption font-medium whitespace-nowrap transition-colors ${isCurrent ? "bg-(--surface-default) text-(--text-primary)" : canGo ? "text-on-shell-muted hover:text-on-shell" : "text-on-shell-subtle cursor-default"}`
34
- },
35
- /* @__PURE__ */ React.createElement("span", { className: `w-1.5 h-1.5 rounded-full shrink-0 ${isCurrent ? "bg-(--text-primary)" : "bg-on-shell-subtle"}` }),
36
- s.label
37
- );
38
- }),
39
- action && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("span", { className: "w-px h-4 bg-on-shell-line mx-1", "aria-hidden": true }), /* @__PURE__ */ React.createElement(
40
- "button",
41
- {
42
- type: "button",
43
- onClick: action.onClick,
44
- className: "flex items-center gap-1.5 rounded-full px-3 py-1.5 text-caption font-medium text-on-shell-muted hover:text-on-shell transition-colors whitespace-nowrap [&_svg]:w-3 [&_svg]:h-3 [&_svg]:shrink-0"
45
- },
46
- action.icon,
47
- action.label
48
- ))
19
+ ].filter(Boolean).join(" "),
20
+ children: [
21
+ steps.map((s, idx) => {
22
+ const isCurrent = idx === currentIdx;
23
+ const canGo = canNavigate ? canNavigate(s.key, idx, currentIdx) : idx < currentIdx;
24
+ return /* @__PURE__ */ jsxs(
25
+ "button",
26
+ {
27
+ type: "button",
28
+ disabled: !canGo && !isCurrent,
29
+ "aria-current": isCurrent ? "step" : void 0,
30
+ onClick: () => {
31
+ if (canGo) onNavigate == null ? void 0 : onNavigate(s.key);
32
+ },
33
+ className: `flex items-center gap-1.5 rounded-full px-3 py-1.5 text-caption font-medium whitespace-nowrap transition-colors ${isCurrent ? "bg-(--surface-default) text-(--text-primary)" : canGo ? "text-on-shell-muted hover:text-on-shell" : "text-on-shell-subtle cursor-default"}`,
34
+ children: [
35
+ /* @__PURE__ */ jsx("span", { className: `w-1.5 h-1.5 rounded-full shrink-0 ${isCurrent ? "bg-(--text-primary)" : "bg-on-shell-subtle"}` }),
36
+ s.label
37
+ ]
38
+ },
39
+ s.key
40
+ );
41
+ }),
42
+ action && /* @__PURE__ */ jsxs(Fragment, { children: [
43
+ /* @__PURE__ */ jsx("span", { className: "w-px h-4 bg-on-shell-line mx-1", "aria-hidden": true }),
44
+ /* @__PURE__ */ jsxs(
45
+ "button",
46
+ {
47
+ type: "button",
48
+ onClick: action.onClick,
49
+ className: "flex items-center gap-1.5 rounded-full px-3 py-1.5 text-caption font-medium text-on-shell-muted hover:text-on-shell transition-colors whitespace-nowrap [&_svg]:w-3 [&_svg]:h-3 [&_svg]:shrink-0",
50
+ children: [
51
+ action.icon,
52
+ action.label
53
+ ]
54
+ }
55
+ )
56
+ ] })
57
+ ]
58
+ }
49
59
  );
50
60
  }
51
61
  export {
@@ -1,7 +1,15 @@
1
1
  "use client";
2
2
  import "../chunk-ORMEWXMH.js";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
3
4
  function FormCardHeader({ icon, title, subtitle, action }) {
4
- return /* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-3 pb-3" }, icon && /* @__PURE__ */ React.createElement("span", { className: "grid place-items-center shrink-0 size-9 rounded-(--radius-card) bg-brand-primary text-brand-on-primary" }, icon), /* @__PURE__ */ React.createElement("div", { className: "min-w-0 flex-1" }, /* @__PURE__ */ React.createElement("p", { className: "text-label font-semibold text-(--text-primary)" }, title), subtitle && /* @__PURE__ */ React.createElement("p", { className: "text-caption text-(--text-muted) mt-1 leading-snug" }, subtitle)), action && /* @__PURE__ */ React.createElement("div", { className: "shrink-0" }, action));
5
+ return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 pb-3", children: [
6
+ icon && /* @__PURE__ */ jsx("span", { className: "grid place-items-center shrink-0 size-9 rounded-(--radius-card) bg-brand-primary text-brand-on-primary", children: icon }),
7
+ /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
8
+ /* @__PURE__ */ jsx("p", { className: "text-label font-semibold text-(--text-primary)", children: title }),
9
+ subtitle && /* @__PURE__ */ jsx("p", { className: "text-caption text-(--text-muted) mt-1 leading-snug", children: subtitle })
10
+ ] }),
11
+ action && /* @__PURE__ */ jsx("div", { className: "shrink-0", children: action })
12
+ ] });
5
13
  }
6
14
  export {
7
15
  FormCardHeader
@@ -1,7 +1,9 @@
1
1
  import {
2
2
  __objRest,
3
+ __spreadProps,
3
4
  __spreadValues
4
5
  } from "../chunk-ORMEWXMH.js";
6
+ import { jsx, jsxs } from "react/jsx-runtime";
5
7
  import { forwardRef } from "react";
6
8
  const SIZE_CLASSES = {
7
9
  sm: "size-control-sm [&_svg]:size-4",
@@ -46,9 +48,9 @@ const IconButton = forwardRef(function IconButton2(_a, ref) {
46
48
  "disabled",
47
49
  "className"
48
50
  ]);
49
- return /* @__PURE__ */ React.createElement(
51
+ return /* @__PURE__ */ jsx(
50
52
  "button",
51
- __spreadValues({
53
+ __spreadProps(__spreadValues({
52
54
  ref,
53
55
  type: "button",
54
56
  disabled: disabled || loading,
@@ -60,20 +62,24 @@ const IconButton = forwardRef(function IconButton2(_a, ref) {
60
62
  COLOR_CLASSES[variant][color],
61
63
  className
62
64
  ].join(" ")
63
- }, rest),
64
- loading ? /* @__PURE__ */ React.createElement(Spinner, null) : icon
65
+ }, rest), {
66
+ children: loading ? /* @__PURE__ */ jsx(Spinner, {}) : icon
67
+ })
65
68
  );
66
69
  });
67
70
  function Spinner() {
68
- return /* @__PURE__ */ React.createElement("svg", { className: "animate-spin", viewBox: "0 0 24 24", fill: "none" }, /* @__PURE__ */ React.createElement("circle", { cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "2.5", opacity: "0.25" }), /* @__PURE__ */ React.createElement(
69
- "path",
70
- {
71
- d: "M22 12a10 10 0 0 1-10 10",
72
- stroke: "currentColor",
73
- strokeWidth: "2.5",
74
- strokeLinecap: "round"
75
- }
76
- ));
71
+ return /* @__PURE__ */ jsxs("svg", { className: "animate-spin", viewBox: "0 0 24 24", fill: "none", children: [
72
+ /* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "2.5", opacity: "0.25" }),
73
+ /* @__PURE__ */ jsx(
74
+ "path",
75
+ {
76
+ d: "M22 12a10 10 0 0 1-10 10",
77
+ stroke: "currentColor",
78
+ strokeWidth: "2.5",
79
+ strokeLinecap: "round"
80
+ }
81
+ )
82
+ ] });
77
83
  }
78
84
  export {
79
85
  IconButton