@rojaostudio/ds 1.0.0 → 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 +190 -194
  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,4 +1,5 @@
1
1
  import "../chunk-ORMEWXMH.js";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
2
3
  function SettingRow({
3
4
  label,
4
5
  description,
@@ -12,7 +13,16 @@ function SettingRow({
12
13
  const cols = controlWidth === "full" ? "" : controlWidth === "fill" ? "sm:grid-cols-[minmax(0,1fr)_minmax(0,20rem)]" : "sm:grid-cols-[1fr_auto]";
13
14
  const alignCls = align === "start" ? "sm:items-start" : "sm:items-center";
14
15
  const LabelTag = htmlFor ? "label" : "div";
15
- return /* @__PURE__ */ React.createElement("div", { className: ["grid grid-cols-1 gap-x-6 gap-y-3 py-4", cols, alignCls, className].filter(Boolean).join(" ") }, /* @__PURE__ */ React.createElement("div", { className: "flex items-start gap-3 min-w-0" }, icon && /* @__PURE__ */ React.createElement("div", { className: "shrink-0 text-fg-muted mt-0.5" }, icon), /* @__PURE__ */ React.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ React.createElement(LabelTag, { htmlFor, className: "block text-sm font-medium text-fg-primary" }, label), description && /* @__PURE__ */ React.createElement("div", { className: "text-sm text-fg-muted mt-0.5 leading-snug" }, description))), /* @__PURE__ */ React.createElement("div", { className: controlWidth === "auto" ? "sm:justify-self-end" : "" }, control));
16
+ return /* @__PURE__ */ jsxs("div", { className: ["grid grid-cols-1 gap-x-6 gap-y-3 py-4", cols, alignCls, className].filter(Boolean).join(" "), children: [
17
+ /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3 min-w-0", children: [
18
+ icon && /* @__PURE__ */ jsx("div", { className: "shrink-0 text-fg-muted mt-0.5", children: icon }),
19
+ /* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
20
+ /* @__PURE__ */ jsx(LabelTag, { htmlFor, className: "block text-sm font-medium text-fg-primary", children: label }),
21
+ description && /* @__PURE__ */ jsx("div", { className: "text-sm text-fg-muted mt-0.5 leading-snug", children: description })
22
+ ] })
23
+ ] }),
24
+ /* @__PURE__ */ jsx("div", { className: controlWidth === "auto" ? "sm:justify-self-end" : "", children: control })
25
+ ] });
16
26
  }
17
27
  export {
18
28
  SettingRow
@@ -1,4 +1,5 @@
1
1
  import "../chunk-ORMEWXMH.js";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
2
3
  import { SectionHeader } from "./section-header.js";
3
4
  function SettingsList({
4
5
  title,
@@ -8,14 +9,17 @@ function SettingsList({
8
9
  children,
9
10
  className = ""
10
11
  }) {
11
- const list = /* @__PURE__ */ React.createElement(
12
+ const list = /* @__PURE__ */ jsx(
12
13
  "div",
13
14
  {
14
- className: framed ? "rounded-(--radius-card) border border-stroke-default bg-surface-default px-4 [&>*]:border-t [&>*]:border-stroke-default [&>*:first-child]:border-t-0" : "[&>*]:border-t [&>*]:border-stroke-default [&>*:first-child]:border-t-0"
15
- },
16
- children
15
+ className: framed ? "rounded-(--radius-card) border border-stroke-default bg-surface-default px-4 [&>*]:border-t [&>*]:border-stroke-default [&>*:first-child]:border-t-0" : "[&>*]:border-t [&>*]:border-stroke-default [&>*:first-child]:border-t-0",
16
+ children
17
+ }
17
18
  );
18
- return /* @__PURE__ */ React.createElement("section", { className: ["space-y-3", className].filter(Boolean).join(" ") }, title && /* @__PURE__ */ React.createElement(SectionHeader, { title, description, action }), list);
19
+ return /* @__PURE__ */ jsxs("section", { className: ["space-y-3", className].filter(Boolean).join(" "), children: [
20
+ title && /* @__PURE__ */ jsx(SectionHeader, { title, description, action }),
21
+ list
22
+ ] });
19
23
  }
20
24
  export {
21
25
  SettingsList
@@ -3,6 +3,7 @@ import {
3
3
  __spreadProps,
4
4
  __spreadValues
5
5
  } from "../chunk-ORMEWXMH.js";
6
+ import { jsx } from "react/jsx-runtime";
6
7
  const SKELETON_VARIANTS = {
7
8
  text: "h-4 w-full",
8
9
  title: "h-6 w-3/5",
@@ -33,16 +34,16 @@ function Skeleton(_a) {
33
34
  SKELETON_VARIANTS[variant],
34
35
  className
35
36
  ].filter(Boolean).join(" ");
36
- if (count === 1) return /* @__PURE__ */ React.createElement("div", __spreadValues({ className: classes }, props));
37
- return /* @__PURE__ */ React.createElement("div", { className: ["flex flex-col", GAP[gap]].join(" ") }, Array.from({ length: count }).map((_, i) => /* @__PURE__ */ React.createElement(
37
+ if (count === 1) return /* @__PURE__ */ jsx("div", __spreadValues({ className: classes }, props));
38
+ return /* @__PURE__ */ jsx("div", { className: ["flex flex-col", GAP[gap]].join(" "), children: Array.from({ length: count }).map((_, i) => /* @__PURE__ */ jsx(
38
39
  "div",
39
40
  __spreadProps(__spreadValues({
40
- key: i,
41
41
  className: classes
42
42
  }, i === 0 ? props : {}), {
43
43
  style: variant === "text" && i === count - 1 ? { width: "70%" } : void 0
44
- })
45
- )));
44
+ }),
45
+ i
46
+ )) });
46
47
  }
47
48
  export {
48
49
  Skeleton
@@ -3,6 +3,7 @@ import {
3
3
  __objRest,
4
4
  __spreadValues
5
5
  } from "../chunk-ORMEWXMH.js";
6
+ import { jsx, jsxs } from "react/jsx-runtime";
6
7
  import { forwardRef, useId } from "react";
7
8
  const TRACK_HEIGHT = { sm: 4, md: 6 };
8
9
  const THUMB_SIZE = { sm: 14, md: 18 };
@@ -35,44 +36,57 @@ const Slider = forwardRef(function Slider2(_a, ref) {
35
36
  const id = useId();
36
37
  const pct = (value - min) / (max - min) * 100;
37
38
  const fmt = formatValue != null ? formatValue : ((v) => String(v));
38
- return /* @__PURE__ */ React.createElement("div", { className: ["flex flex-col gap-2", className].join(" ") }, /* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ React.createElement("div", { className: "relative flex-1 flex items-center", style: { height: THUMB_SIZE[size] } }, /* @__PURE__ */ React.createElement(
39
- "input",
40
- __spreadValues({
41
- ref,
42
- id,
43
- type: "range",
44
- min,
45
- max,
46
- step,
47
- value,
48
- disabled,
49
- onChange: (e) => onChange(Number(e.target.value)),
50
- className: [
51
- "rojao-slider absolute inset-0 w-full bg-transparent appearance-none cursor-pointer",
52
- "focus:outline-none focus-visible:ring-2 focus-visible:ring-stroke-focus focus-visible:ring-offset-2 focus-visible:rounded-full",
53
- "disabled:cursor-not-allowed disabled:opacity-50"
54
- ].join(" "),
55
- style: {
56
- ["--rojao-slider-pct"]: `${pct}%`,
57
- ["--rojao-slider-track-h"]: `${TRACK_HEIGHT[size]}px`,
58
- ["--rojao-slider-thumb-size"]: `${THUMB_SIZE[size]}px`
59
- }
60
- }, rest)
61
- ), /* @__PURE__ */ React.createElement(
62
- "div",
63
- {
64
- "aria-hidden": true,
65
- className: "absolute inset-x-0 rounded-full bg-stroke-default pointer-events-none",
66
- style: { height: TRACK_HEIGHT[size] }
67
- }
68
- ), /* @__PURE__ */ React.createElement(
69
- "div",
70
- {
71
- "aria-hidden": true,
72
- className: "absolute left-0 rounded-full bg-brand-primary pointer-events-none",
73
- style: { height: TRACK_HEIGHT[size], width: `${pct}%` }
74
- }
75
- )), showValue && /* @__PURE__ */ React.createElement("span", { className: "text-label font-medium text-fg-primary tabular-nums shrink-0 min-w-[3ch] text-right" }, fmt(value))), showRange && /* @__PURE__ */ React.createElement("div", { className: "flex justify-between text-[11px] font-mono text-fg-muted" }, /* @__PURE__ */ React.createElement("span", null, fmt(min)), /* @__PURE__ */ React.createElement("span", null, fmt(max))));
39
+ return /* @__PURE__ */ jsxs("div", { className: ["flex flex-col gap-2", className].join(" "), children: [
40
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
41
+ /* @__PURE__ */ jsxs("div", { className: "relative flex-1 flex items-center", style: { height: THUMB_SIZE[size] }, children: [
42
+ /* @__PURE__ */ jsx(
43
+ "input",
44
+ __spreadValues({
45
+ ref,
46
+ id,
47
+ type: "range",
48
+ min,
49
+ max,
50
+ step,
51
+ value,
52
+ disabled,
53
+ onChange: (e) => onChange(Number(e.target.value)),
54
+ className: [
55
+ "rojao-slider absolute inset-0 w-full bg-transparent appearance-none cursor-pointer",
56
+ "focus:outline-none focus-visible:ring-2 focus-visible:ring-stroke-focus focus-visible:ring-offset-2 focus-visible:rounded-full",
57
+ "disabled:cursor-not-allowed disabled:opacity-50"
58
+ ].join(" "),
59
+ style: {
60
+ ["--rojao-slider-pct"]: `${pct}%`,
61
+ ["--rojao-slider-track-h"]: `${TRACK_HEIGHT[size]}px`,
62
+ ["--rojao-slider-thumb-size"]: `${THUMB_SIZE[size]}px`
63
+ }
64
+ }, rest)
65
+ ),
66
+ /* @__PURE__ */ jsx(
67
+ "div",
68
+ {
69
+ "aria-hidden": true,
70
+ className: "absolute inset-x-0 rounded-full bg-stroke-default pointer-events-none",
71
+ style: { height: TRACK_HEIGHT[size] }
72
+ }
73
+ ),
74
+ /* @__PURE__ */ jsx(
75
+ "div",
76
+ {
77
+ "aria-hidden": true,
78
+ className: "absolute left-0 rounded-full bg-brand-primary pointer-events-none",
79
+ style: { height: TRACK_HEIGHT[size], width: `${pct}%` }
80
+ }
81
+ )
82
+ ] }),
83
+ showValue && /* @__PURE__ */ jsx("span", { className: "text-label font-medium text-fg-primary tabular-nums shrink-0 min-w-[3ch] text-right", children: fmt(value) })
84
+ ] }),
85
+ showRange && /* @__PURE__ */ jsxs("div", { className: "flex justify-between text-[11px] font-mono text-fg-muted", children: [
86
+ /* @__PURE__ */ jsx("span", { children: fmt(min) }),
87
+ /* @__PURE__ */ jsx("span", { children: fmt(max) })
88
+ ] })
89
+ ] });
76
90
  });
77
91
  export {
78
92
  Slider
@@ -1,4 +1,5 @@
1
1
  import "../chunk-ORMEWXMH.js";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
2
3
  const SIZE = {
3
4
  xs: "size-3",
4
5
  sm: "size-4",
@@ -18,18 +19,23 @@ function Spinner({
18
19
  label = "Carregando\u2026",
19
20
  className = ""
20
21
  }) {
21
- return /* @__PURE__ */ React.createElement("span", { role: "status", "aria-label": label, className: "inline-flex" }, /* @__PURE__ */ React.createElement(
22
- "svg",
23
- {
24
- className: ["animate-spin", SIZE[size], COLOR[color], className].join(" "),
25
- xmlns: "http://www.w3.org/2000/svg",
26
- fill: "none",
27
- viewBox: "0 0 24 24",
28
- "aria-hidden": "true"
29
- },
30
- /* @__PURE__ */ React.createElement("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "3" }),
31
- /* @__PURE__ */ React.createElement("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z" })
32
- ), /* @__PURE__ */ React.createElement("span", { className: "sr-only" }, label));
22
+ return /* @__PURE__ */ jsxs("span", { role: "status", "aria-label": label, className: "inline-flex", children: [
23
+ /* @__PURE__ */ jsxs(
24
+ "svg",
25
+ {
26
+ className: ["animate-spin", SIZE[size], COLOR[color], className].join(" "),
27
+ xmlns: "http://www.w3.org/2000/svg",
28
+ fill: "none",
29
+ viewBox: "0 0 24 24",
30
+ "aria-hidden": "true",
31
+ children: [
32
+ /* @__PURE__ */ jsx("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "3" }),
33
+ /* @__PURE__ */ jsx("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z" })
34
+ ]
35
+ }
36
+ ),
37
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: label })
38
+ ] });
33
39
  }
34
40
  export {
35
41
  Spinner
@@ -1,22 +1,23 @@
1
1
  import "../chunk-ORMEWXMH.js";
2
+ import { jsx } from "react/jsx-runtime";
2
3
  function StepProgress({ current, total, className = "" }) {
3
4
  const pct = Math.round((current + 1) / total * 100);
4
- return /* @__PURE__ */ React.createElement(
5
+ return /* @__PURE__ */ jsx(
5
6
  "div",
6
7
  {
7
8
  className: ["w-full h-1.5 rounded-full overflow-hidden [background:var(--border-subtle)]", className].join(" "),
8
9
  role: "progressbar",
9
10
  "aria-valuenow": current + 1,
10
11
  "aria-valuemin": 1,
11
- "aria-valuemax": total
12
- },
13
- /* @__PURE__ */ React.createElement(
14
- "div",
15
- {
16
- className: "h-full rounded-full transition-all duration-300 ease-out [background:var(--brand-primary)]",
17
- style: { width: `${pct}%` }
18
- }
19
- )
12
+ "aria-valuemax": total,
13
+ children: /* @__PURE__ */ jsx(
14
+ "div",
15
+ {
16
+ className: "h-full rounded-full transition-all duration-300 ease-out [background:var(--brand-primary)]",
17
+ style: { width: `${pct}%` }
18
+ }
19
+ )
20
+ }
20
21
  );
21
22
  }
22
23
  export {
@@ -1,4 +1,5 @@
1
1
  import "../chunk-ORMEWXMH.js";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
2
3
  const TONE_CLASS = {
3
4
  default: "[color:var(--summary-bar-value)]",
4
5
  positive: "[color:var(--summary-bar-value-positive)]",
@@ -8,7 +9,7 @@ const TONE_CLASS = {
8
9
  };
9
10
  function SummaryBar({ items, className }) {
10
11
  const odd = items.length % 2 === 1;
11
- return /* @__PURE__ */ React.createElement(
12
+ return /* @__PURE__ */ jsx(
12
13
  "div",
13
14
  {
14
15
  className: [
@@ -17,36 +18,40 @@ function SummaryBar({ items, className }) {
17
18
  "[background:var(--summary-bar-divider)] sm:[background:var(--summary-bar-bg)]",
18
19
  "[border-color:var(--summary-bar-border)]",
19
20
  className != null ? className : ""
20
- ].join(" ")
21
- },
22
- items.map((item, i) => {
23
- var _a;
24
- const spanFull = odd && i === items.length - 1;
25
- return /* @__PURE__ */ React.createElement(
26
- "div",
27
- {
28
- key: i,
29
- className: [
30
- "flex flex-1 flex-col gap-1.5 px-4 py-3 [background:var(--summary-bar-bg)]",
31
- "min-w-0 sm:min-w-[7.5rem] sm:whitespace-nowrap",
32
- spanFull ? "col-span-2 sm:col-span-1" : "",
33
- i > 0 ? "sm:[border-left:1px_solid_var(--summary-bar-divider)]" : ""
34
- ].join(" ")
35
- },
36
- /* @__PURE__ */ React.createElement("span", { className: "text-[11px] font-medium uppercase tracking-wide [color:var(--summary-bar-label)]" }, item.label),
37
- /* @__PURE__ */ React.createElement(
38
- "span",
21
+ ].join(" "),
22
+ children: items.map((item, i) => {
23
+ var _a;
24
+ const spanFull = odd && i === items.length - 1;
25
+ return /* @__PURE__ */ jsxs(
26
+ "div",
39
27
  {
40
28
  className: [
41
- "flex items-center gap-1.5 text-heading-sm font-semibold leading-none tabular-nums",
42
- TONE_CLASS[(_a = item.tone) != null ? _a : "default"]
43
- ].join(" ")
29
+ "flex flex-1 flex-col gap-1.5 px-4 py-3 [background:var(--summary-bar-bg)]",
30
+ "min-w-0 sm:min-w-[7.5rem] sm:whitespace-nowrap",
31
+ spanFull ? "col-span-2 sm:col-span-1" : "",
32
+ i > 0 ? "sm:[border-left:1px_solid_var(--summary-bar-divider)]" : ""
33
+ ].join(" "),
34
+ children: [
35
+ /* @__PURE__ */ jsx("span", { className: "text-[11px] font-medium uppercase tracking-wide [color:var(--summary-bar-label)]", children: item.label }),
36
+ /* @__PURE__ */ jsxs(
37
+ "span",
38
+ {
39
+ className: [
40
+ "flex items-center gap-1.5 text-heading-sm font-semibold leading-none tabular-nums",
41
+ TONE_CLASS[(_a = item.tone) != null ? _a : "default"]
42
+ ].join(" "),
43
+ children: [
44
+ item.icon,
45
+ item.value
46
+ ]
47
+ }
48
+ )
49
+ ]
44
50
  },
45
- item.icon,
46
- item.value
47
- )
48
- );
49
- })
51
+ i
52
+ );
53
+ })
54
+ }
50
55
  );
51
56
  }
52
57
  export {
@@ -1,19 +1,21 @@
1
1
  import {
2
2
  __objRest,
3
+ __spreadProps,
3
4
  __spreadValues
4
5
  } from "../chunk-ORMEWXMH.js";
6
+ import { jsx } from "react/jsx-runtime";
5
7
  const ALIGN = { left: "text-left", right: "text-right", center: "text-center" };
6
8
  function Table(_a) {
7
9
  var _b = _a, { className = "", children } = _b, props = __objRest(_b, ["className", "children"]);
8
- return /* @__PURE__ */ React.createElement("table", __spreadValues({ className: ["w-full text-label", className].join(" ") }, props), children);
10
+ return /* @__PURE__ */ jsx("table", __spreadProps(__spreadValues({ className: ["w-full text-label", className].join(" ") }, props), { children }));
9
11
  }
10
12
  function TableHead(_c) {
11
13
  var _d = _c, { className = "", children } = _d, props = __objRest(_d, ["className", "children"]);
12
- return /* @__PURE__ */ React.createElement("thead", __spreadValues({ className: className || void 0 }, props), children);
14
+ return /* @__PURE__ */ jsx("thead", __spreadProps(__spreadValues({ className: className || void 0 }, props), { children }));
13
15
  }
14
16
  function TableBody(_e) {
15
17
  var _f = _e, { className = "", children } = _f, props = __objRest(_f, ["className", "children"]);
16
- return /* @__PURE__ */ React.createElement("tbody", __spreadValues({ className: ["divide-y divide-stroke-default", className].join(" ") }, props), children);
18
+ return /* @__PURE__ */ jsx("tbody", __spreadProps(__spreadValues({ className: ["divide-y divide-stroke-default", className].join(" ") }, props), { children }));
17
19
  }
18
20
  function TableRow(_g) {
19
21
  var _h = _g, { header, noHover, className = "", children, onClick } = _h, props = __objRest(_h, ["header", "noHover", "className", "children", "onClick"]);
@@ -31,34 +33,36 @@ function TableRow(_g) {
31
33
  }
32
34
  }
33
35
  } : {};
34
- return /* @__PURE__ */ React.createElement(
36
+ return /* @__PURE__ */ jsx(
35
37
  "tr",
36
- __spreadValues(__spreadValues({
38
+ __spreadProps(__spreadValues(__spreadValues({
37
39
  className: [base, className].filter(Boolean).join(" "),
38
40
  onClick
39
- }, interactiveProps), props),
40
- children
41
+ }, interactiveProps), props), {
42
+ children
43
+ })
41
44
  );
42
45
  }
43
46
  function Th(_i) {
44
47
  var _j = _i, { align = "left", className = "", children } = _j, props = __objRest(_j, ["align", "className", "children"]);
45
- return /* @__PURE__ */ React.createElement(
48
+ return /* @__PURE__ */ jsx(
46
49
  "th",
47
- __spreadValues({
50
+ __spreadProps(__spreadValues({
48
51
  className: [
49
52
  "px-5 py-3 text-caption font-semibold text-fg-muted uppercase tracking-wide whitespace-nowrap",
50
53
  ALIGN[align],
51
54
  className
52
55
  ].filter(Boolean).join(" ")
53
- }, props),
54
- children
56
+ }, props), {
57
+ children
58
+ })
55
59
  );
56
60
  }
57
61
  function Td(_k) {
58
62
  var _l = _k, { align = "left", muted, bold, className = "", children } = _l, props = __objRest(_l, ["align", "muted", "bold", "className", "children"]);
59
- return /* @__PURE__ */ React.createElement(
63
+ return /* @__PURE__ */ jsx(
60
64
  "td",
61
- __spreadValues({
65
+ __spreadProps(__spreadValues({
62
66
  className: [
63
67
  "px-5 py-3",
64
68
  ALIGN[align],
@@ -66,8 +70,9 @@ function Td(_k) {
66
70
  bold ? "font-medium" : "",
67
71
  className
68
72
  ].filter(Boolean).join(" ")
69
- }, props),
70
- children
73
+ }, props), {
74
+ children
75
+ })
71
76
  );
72
77
  }
73
78
  export {
@@ -3,6 +3,7 @@ import {
3
3
  __objRest,
4
4
  __spreadValues
5
5
  } from "../chunk-ORMEWXMH.js";
6
+ import { jsx, jsxs } from "react/jsx-runtime";
6
7
  import { forwardRef, useId, useEffect, useRef } from "react";
7
8
  const Textarea = forwardRef(function Textarea2(_a, ref) {
8
9
  var _b = _a, {
@@ -65,30 +66,45 @@ const Textarea = forwardRef(function Textarea2(_a, ref) {
65
66
  if (autoResize) adjust();
66
67
  }
67
68
  const currentLength = typeof value === "string" ? value.length : typeof defaultValue === "string" ? defaultValue.length : 0;
68
- return /* @__PURE__ */ React.createElement("div", { className: "flex flex-col gap-1.5 w-full" }, label && /* @__PURE__ */ React.createElement("label", { htmlFor: textareaId, className: "inline-flex items-center gap-1 text-label font-medium text-fg-primary" }, /* @__PURE__ */ React.createElement("span", null, label), required && /* @__PURE__ */ React.createElement("span", { className: "text-danger", "aria-label": "obrigat\xF3rio" }, "*"), optional && !required && /* @__PURE__ */ React.createElement("span", { className: "text-fg-muted font-normal" }, "(opcional)")), /* @__PURE__ */ React.createElement(
69
- "textarea",
70
- __spreadValues({
71
- ref: setRef,
72
- id: textareaId,
73
- rows: rows != null ? rows : minRows,
74
- value,
75
- defaultValue,
76
- maxLength,
77
- required,
78
- onChange: handleChange,
79
- className: [
80
- "w-full px-3 py-2 rounded-(--radius-control) text-label",
81
- "bg-surface-default text-fg-primary placeholder:text-fg-placeholder",
82
- "border transition-colors outline-none",
83
- autoResize ? "resize-none overflow-hidden" : "resize-y",
84
- error ? "border-danger focus:border-danger focus:ring-2 focus:ring-danger/20" : "border-stroke-control focus:border-stroke-focus focus:ring-2 focus:ring-stroke-focus/20",
85
- "disabled:opacity-50 disabled:cursor-not-allowed disabled:resize-none",
86
- className
87
- ].filter(Boolean).join(" "),
88
- "aria-invalid": error ? true : void 0,
89
- "aria-describedby": error ? `${textareaId}-error` : helper ? `${textareaId}-helper` : void 0
90
- }, props)
91
- ), (error || helper || showCount && maxLength) && /* @__PURE__ */ React.createElement("div", { className: "flex items-start justify-between gap-3" }, error ? /* @__PURE__ */ React.createElement("p", { id: `${textareaId}-error`, className: "text-caption text-danger-text flex-1" }, error) : helper ? /* @__PURE__ */ React.createElement("p", { id: `${textareaId}-helper`, className: "text-caption text-fg-muted flex-1" }, helper) : /* @__PURE__ */ React.createElement("span", { className: "flex-1" }), showCount && maxLength && /* @__PURE__ */ React.createElement("span", { className: "text-caption text-fg-muted tabular-nums shrink-0" }, currentLength, "/", maxLength)));
69
+ return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1.5 w-full", children: [
70
+ label && /* @__PURE__ */ jsxs("label", { htmlFor: textareaId, className: "inline-flex items-center gap-1 text-label font-medium text-fg-primary", children: [
71
+ /* @__PURE__ */ jsx("span", { children: label }),
72
+ required && /* @__PURE__ */ jsx("span", { className: "text-danger", "aria-label": "obrigat\xF3rio", children: "*" }),
73
+ optional && !required && /* @__PURE__ */ jsx("span", { className: "text-fg-muted font-normal", children: "(opcional)" })
74
+ ] }),
75
+ /* @__PURE__ */ jsx(
76
+ "textarea",
77
+ __spreadValues({
78
+ ref: setRef,
79
+ id: textareaId,
80
+ rows: rows != null ? rows : minRows,
81
+ value,
82
+ defaultValue,
83
+ maxLength,
84
+ required,
85
+ onChange: handleChange,
86
+ className: [
87
+ "w-full px-3 py-2 rounded-(--radius-control) text-label",
88
+ "bg-surface-default text-fg-primary placeholder:text-fg-placeholder",
89
+ "border transition-colors outline-none",
90
+ autoResize ? "resize-none overflow-hidden" : "resize-y",
91
+ error ? "border-danger focus:border-danger focus:ring-2 focus:ring-danger/20" : "border-stroke-control focus:border-stroke-focus focus:ring-2 focus:ring-stroke-focus/20",
92
+ "disabled:opacity-50 disabled:cursor-not-allowed disabled:resize-none",
93
+ className
94
+ ].filter(Boolean).join(" "),
95
+ "aria-invalid": error ? true : void 0,
96
+ "aria-describedby": error ? `${textareaId}-error` : helper ? `${textareaId}-helper` : void 0
97
+ }, props)
98
+ ),
99
+ (error || helper || showCount && maxLength) && /* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-3", children: [
100
+ error ? /* @__PURE__ */ jsx("p", { id: `${textareaId}-error`, className: "text-caption text-danger-text flex-1", children: error }) : helper ? /* @__PURE__ */ jsx("p", { id: `${textareaId}-helper`, className: "text-caption text-fg-muted flex-1", children: helper }) : /* @__PURE__ */ jsx("span", { className: "flex-1" }),
101
+ showCount && maxLength && /* @__PURE__ */ jsxs("span", { className: "text-caption text-fg-muted tabular-nums shrink-0", children: [
102
+ currentLength,
103
+ "/",
104
+ maxLength
105
+ ] })
106
+ ] })
107
+ ] });
92
108
  });
93
109
  export {
94
110
  Textarea
@@ -29,7 +29,7 @@ interface ThemedProps extends HTMLAttributes<HTMLDivElement> {
29
29
  * <Themed theme="pet" dark>…</Themed>
30
30
  * <Themed theme="cafe" asChild><main>…</main></Themed>
31
31
  *
32
- * Pair with the brand sheet (ds.rojao.ai/themes/<slug>.css) + base.css.
32
+ * Pair with your theme sheet + base.css.
33
33
  */
34
34
  declare function Themed({ theme, dark, asChild, className, children, ...rest }: ThemedProps): react.JSX.Element;
35
35
 
@@ -3,6 +3,7 @@ import {
3
3
  __spreadProps,
4
4
  __spreadValues
5
5
  } from "../chunk-ORMEWXMH.js";
6
+ import { jsx } from "react/jsx-runtime";
6
7
  import { cloneElement, isValidElement } from "react";
7
8
  const themeClass = (theme, dark = false) => `theme-${theme}${dark ? " dark" : ""}`;
8
9
  function Themed(_a) {
@@ -14,7 +15,7 @@ function Themed(_a) {
14
15
  className: [cls, child.props.className, className].filter(Boolean).join(" ")
15
16
  }));
16
17
  }
17
- return /* @__PURE__ */ React.createElement("div", __spreadValues({ className: [cls, className].filter(Boolean).join(" ") }, rest), children);
18
+ return /* @__PURE__ */ jsx("div", __spreadProps(__spreadValues({ className: [cls, className].filter(Boolean).join(" ") }, rest), { children }));
18
19
  }
19
20
  export {
20
21
  Themed,