@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,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 { forwardRef, useState, useEffect, useRef, useImperativeHandle } from "react";
4
5
  import { createPortal } from "react-dom";
5
6
  const ContextMenu = forwardRef(function ContextMenu2({
@@ -51,19 +52,22 @@ const ContextMenu = forwardRef(function ContextMenu2({
51
52
  e.preventDefault();
52
53
  setPos({ x: e.clientX, y: e.clientY });
53
54
  }
54
- return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", { ref: containerRef, onContextMenu: handleContext, className }, children), mounted && pos && createPortal(
55
- /* @__PURE__ */ React.createElement(
56
- "div",
57
- {
58
- ref: menuRef,
59
- role: "menu",
60
- className: "fixed z-[1000] rounded-(--radius-card) border border-stroke-default bg-surface-default shadow-lg py-1",
61
- style: { top: pos.y, left: pos.x, minWidth }
62
- },
63
- typeof menu === "function" ? menu({ close: () => setPos(null) }) : menu
64
- ),
65
- document.body
66
- ));
55
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
56
+ /* @__PURE__ */ jsx("div", { ref: containerRef, onContextMenu: handleContext, className, children }),
57
+ mounted && pos && createPortal(
58
+ /* @__PURE__ */ jsx(
59
+ "div",
60
+ {
61
+ ref: menuRef,
62
+ role: "menu",
63
+ className: "fixed z-[1000] rounded-(--radius-card) border border-stroke-default bg-surface-default shadow-lg py-1",
64
+ style: { top: pos.y, left: pos.x, minWidth },
65
+ children: typeof menu === "function" ? menu({ close: () => setPos(null) }) : menu
66
+ }
67
+ ),
68
+ document.body
69
+ )
70
+ ] });
67
71
  });
68
72
  export {
69
73
  ContextMenu
@@ -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 { useState, useEffect } from "react";
4
5
  function CopilotHint({
5
6
  id,
@@ -19,43 +20,51 @@ function CopilotHint({
19
20
  localStorage.setItem(`copilot-dismissed:${id}`, "1");
20
21
  setDismissed(true);
21
22
  }
22
- return /* @__PURE__ */ React.createElement(
23
+ return /* @__PURE__ */ jsxs(
23
24
  "div",
24
25
  {
25
26
  className: [
26
27
  "rounded-(--radius-card) border bg-(--surface-raised) p-4 flex gap-3",
27
28
  priority === "high" ? "border-brand-primary" : "border-stroke-default",
28
29
  className
29
- ].filter(Boolean).join(" ")
30
- },
31
- priority === "high" && /* @__PURE__ */ React.createElement("div", { className: "w-1 self-stretch rounded-full bg-(--brand-primary) shrink-0" }),
32
- /* @__PURE__ */ React.createElement("div", { className: "flex-1 min-w-0" }, /* @__PURE__ */ React.createElement("p", { className: "text-label font-medium text-(--text-primary)" }, title), description && /* @__PURE__ */ React.createElement("p", { className: "text-caption text-(--text-muted) mt-0.5 leading-relaxed" }, description), cta && /* @__PURE__ */ React.createElement(
33
- "a",
34
- {
35
- href: cta.href,
36
- className: "mt-2 inline-flex text-caption font-medium text-(--brand-primary) hover:underline"
37
- },
38
- cta.label,
39
- " \u2192"
40
- )),
41
- dismissible && /* @__PURE__ */ React.createElement(
42
- "button",
43
- {
44
- type: "button",
45
- onClick: dismiss,
46
- "aria-label": "Dispensar",
47
- className: "text-(--text-disabled) hover:text-(--text-secondary) transition-colors shrink-0 self-start"
48
- },
49
- /* @__PURE__ */ React.createElement("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none" }, /* @__PURE__ */ React.createElement(
50
- "path",
51
- {
52
- d: "M1 1l12 12M13 1L1 13",
53
- stroke: "currentColor",
54
- strokeWidth: "1.5",
55
- strokeLinecap: "round"
56
- }
57
- ))
58
- )
30
+ ].filter(Boolean).join(" "),
31
+ children: [
32
+ priority === "high" && /* @__PURE__ */ jsx("div", { className: "w-1 self-stretch rounded-full bg-(--brand-primary) shrink-0" }),
33
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
34
+ /* @__PURE__ */ jsx("p", { className: "text-label font-medium text-(--text-primary)", children: title }),
35
+ description && /* @__PURE__ */ jsx("p", { className: "text-caption text-(--text-muted) mt-0.5 leading-relaxed", children: description }),
36
+ cta && /* @__PURE__ */ jsxs(
37
+ "a",
38
+ {
39
+ href: cta.href,
40
+ className: "mt-2 inline-flex text-caption font-medium text-(--brand-primary) hover:underline",
41
+ children: [
42
+ cta.label,
43
+ " \u2192"
44
+ ]
45
+ }
46
+ )
47
+ ] }),
48
+ dismissible && /* @__PURE__ */ jsx(
49
+ "button",
50
+ {
51
+ type: "button",
52
+ onClick: dismiss,
53
+ "aria-label": "Dispensar",
54
+ className: "text-(--text-disabled) hover:text-(--text-secondary) transition-colors shrink-0 self-start",
55
+ children: /* @__PURE__ */ jsx("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", children: /* @__PURE__ */ jsx(
56
+ "path",
57
+ {
58
+ d: "M1 1l12 12M13 1L1 13",
59
+ stroke: "currentColor",
60
+ strokeWidth: "1.5",
61
+ strokeLinecap: "round"
62
+ }
63
+ ) })
64
+ }
65
+ )
66
+ ]
67
+ }
59
68
  );
60
69
  }
61
70
  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 { useState } from "react";
4
5
  import { Copy, Check } from "lucide-react";
5
6
  function CopyField({
@@ -18,7 +19,7 @@ function CopyField({
18
19
  } catch (e) {
19
20
  }
20
21
  }
21
- return /* @__PURE__ */ React.createElement(
22
+ return /* @__PURE__ */ jsxs(
22
23
  "button",
23
24
  {
24
25
  type: "button",
@@ -30,10 +31,12 @@ function CopyField({
30
31
  "hover:bg-surface-hover transition-colors focus-visible:ring-2 focus-visible:ring-stroke-focus",
31
32
  fullWidth ? "w-full" : "",
32
33
  className
33
- ].join(" ")
34
- },
35
- copied ? /* @__PURE__ */ React.createElement(Check, { className: "size-4 shrink-0 text-success-text" }) : /* @__PURE__ */ React.createElement(Copy, { className: "size-4 shrink-0" }),
36
- copied ? copiedLabel : label
34
+ ].join(" "),
35
+ children: [
36
+ copied ? /* @__PURE__ */ jsx(Check, { className: "size-4 shrink-0 text-success-text" }) : /* @__PURE__ */ jsx(Copy, { className: "size-4 shrink-0" }),
37
+ copied ? copiedLabel : label
38
+ ]
39
+ }
37
40
  );
38
41
  }
39
42
  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 { useState, useRef, useId, useMemo } from "react";
4
5
  const CURRENCY_LOCALE = {
5
6
  BRL: "pt-BR",
@@ -99,39 +100,46 @@ function CurrencyInput({
99
100
  const isEmpty = subunits === 0 && !showZero;
100
101
  const displayValue = isEmpty ? "" : formatSubunits(subunits, decimals, locale);
101
102
  const placeholderText = placeholder != null ? placeholder : formatSubunits(0, decimals, locale);
102
- const control = /* @__PURE__ */ React.createElement("div", { className: ["relative flex items-center", label ? "" : className].join(" ") }, /* @__PURE__ */ React.createElement(
103
- "span",
104
- {
105
- className: [
106
- "absolute select-none pointer-events-none",
107
- SIZE_SYMBOL[size],
108
- disabled ? "text-fg-disabled" : "text-fg-muted"
109
- ].join(" ")
110
- },
111
- symbol
112
- ), /* @__PURE__ */ React.createElement(
113
- "input",
114
- {
115
- ref: inputRef,
116
- id,
117
- type: "text",
118
- inputMode: "numeric",
119
- value: displayValue,
120
- placeholder: placeholderText,
121
- onChange: handleChange,
122
- disabled,
123
- className: [
124
- "w-full rounded-(--radius-control) border border-stroke-control bg-surface-default",
125
- "placeholder:text-fg-placeholder",
126
- "focus:outline-none focus:border-stroke-focus focus:ring-2 focus:ring-stroke-focus/20",
127
- "transition-colors",
128
- SIZE_INPUT[size],
129
- disabled ? "bg-surface-raised text-fg-disabled cursor-not-allowed" : "text-fg-primary cursor-text"
130
- ].join(" ")
131
- }
132
- ), /* @__PURE__ */ React.createElement("input", { type: "hidden", name, value: subunits }));
103
+ const control = /* @__PURE__ */ jsxs("div", { className: ["relative flex items-center", label ? "" : className].join(" "), children: [
104
+ /* @__PURE__ */ jsx(
105
+ "span",
106
+ {
107
+ className: [
108
+ "absolute select-none pointer-events-none",
109
+ SIZE_SYMBOL[size],
110
+ disabled ? "text-fg-disabled" : "text-fg-muted"
111
+ ].join(" "),
112
+ children: symbol
113
+ }
114
+ ),
115
+ /* @__PURE__ */ jsx(
116
+ "input",
117
+ {
118
+ ref: inputRef,
119
+ id,
120
+ type: "text",
121
+ inputMode: "numeric",
122
+ value: displayValue,
123
+ placeholder: placeholderText,
124
+ onChange: handleChange,
125
+ disabled,
126
+ className: [
127
+ "w-full rounded-(--radius-control) border border-stroke-control bg-surface-default",
128
+ "placeholder:text-fg-placeholder",
129
+ "focus:outline-none focus:border-stroke-focus focus:ring-2 focus:ring-stroke-focus/20",
130
+ "transition-colors",
131
+ SIZE_INPUT[size],
132
+ disabled ? "bg-surface-raised text-fg-disabled cursor-not-allowed" : "text-fg-primary cursor-text"
133
+ ].join(" ")
134
+ }
135
+ ),
136
+ /* @__PURE__ */ jsx("input", { type: "hidden", name, value: subunits })
137
+ ] });
133
138
  if (!label) return control;
134
- return /* @__PURE__ */ React.createElement("div", { className: ["flex flex-col gap-1.5", className].join(" ") }, /* @__PURE__ */ React.createElement("label", { htmlFor: id, className: "text-label font-medium text-fg-primary" }, label), control);
139
+ return /* @__PURE__ */ jsxs("div", { className: ["flex flex-col gap-1.5", className].join(" "), children: [
140
+ /* @__PURE__ */ jsx("label", { htmlFor: id, className: "text-label font-medium text-fg-primary", children: label }),
141
+ control
142
+ ] });
135
143
  }
136
144
  export {
137
145
  CurrencyInput
@@ -1,19 +1,29 @@
1
1
  "use client";
2
2
  import "../chunk-ORMEWXMH.js";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
3
4
  import { AlertTriangle } from "lucide-react";
4
5
  import { FormCardHeader } from "./form-card-header.js";
5
6
  function DangerZone({ title, description, children, className = "" }) {
6
- return /* @__PURE__ */ React.createElement("section", { className: ["space-y-4", className].filter(Boolean).join(" ") }, (title || description) && /* @__PURE__ */ React.createElement(
7
- FormCardHeader,
8
- {
9
- icon: /* @__PURE__ */ React.createElement(AlertTriangle, { size: 18, strokeWidth: 1.5 }),
10
- title,
11
- subtitle: description
12
- }
13
- ), /* @__PURE__ */ React.createElement("div", { className: "rounded-(--radius-card) border p-5 bg-danger-soft border-danger-border" }, children));
7
+ return /* @__PURE__ */ jsxs("section", { className: ["space-y-4", className].filter(Boolean).join(" "), children: [
8
+ (title || description) && /* @__PURE__ */ jsx(
9
+ FormCardHeader,
10
+ {
11
+ icon: /* @__PURE__ */ jsx(AlertTriangle, { size: 18, strokeWidth: 1.5 }),
12
+ title,
13
+ subtitle: description
14
+ }
15
+ ),
16
+ /* @__PURE__ */ jsx("div", { className: "rounded-(--radius-card) border p-5 bg-danger-soft border-danger-border", children })
17
+ ] });
14
18
  }
15
19
  function DangerZoneItem({ title, description, action, className = "" }) {
16
- return /* @__PURE__ */ React.createElement("div", { className: ["flex items-start justify-between gap-4 py-4 first:pt-0 last:pb-0", className].filter(Boolean).join(" ") }, /* @__PURE__ */ React.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ React.createElement("p", { className: "text-sm font-medium text-(--text-primary)" }, title), description && /* @__PURE__ */ React.createElement("p", { className: "text-xs text-(--text-muted) mt-0.5 leading-relaxed" }, description)), action && /* @__PURE__ */ React.createElement("div", { className: "shrink-0" }, action));
20
+ return /* @__PURE__ */ jsxs("div", { className: ["flex items-start justify-between gap-4 py-4 first:pt-0 last:pb-0", className].filter(Boolean).join(" "), children: [
21
+ /* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
22
+ /* @__PURE__ */ jsx("p", { className: "text-sm font-medium text-(--text-primary)", children: title }),
23
+ description && /* @__PURE__ */ jsx("p", { className: "text-xs text-(--text-muted) mt-0.5 leading-relaxed", children: description })
24
+ ] }),
25
+ action && /* @__PURE__ */ jsx("div", { className: "shrink-0", children: action })
26
+ ] });
17
27
  }
18
28
  export {
19
29
  DangerZone,