@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.
- package/dist/components/accordion.js +43 -37
- package/dist/components/alert.js +35 -28
- package/dist/components/avatar.js +41 -34
- package/dist/components/badge.js +21 -14
- package/dist/components/blocker-card.js +11 -2
- package/dist/components/bottom-sheet.js +60 -53
- package/dist/components/breadcrumb.js +32 -22
- package/dist/components/button.js +18 -11
- package/dist/components/card.js +24 -9
- package/dist/components/chat-bubble.js +6 -5
- package/dist/components/checkbox.js +61 -48
- package/dist/components/chip-input.js +98 -81
- package/dist/components/chips.js +36 -29
- package/dist/components/choice-card.js +48 -42
- package/dist/components/choice-carousel.js +79 -74
- package/dist/components/choice-preview-card.js +17 -6
- package/dist/components/color-input.js +41 -35
- package/dist/components/combobox.js +97 -75
- package/dist/components/context-menu.js +17 -13
- package/dist/components/copilot-hint.js +40 -31
- package/dist/components/copy-field.js +8 -5
- package/dist/components/currency-input.js +40 -32
- package/dist/components/danger-zone.js +19 -9
- package/dist/components/data-table-header.js +185 -135
- package/dist/components/date-picker.js +114 -95
- package/dist/components/divider.js +11 -8
- package/dist/components/drawer.js +40 -28
- package/dist/components/dropzone.js +23 -20
- package/dist/components/empty-state.js +26 -23
- package/dist/components/fab.js +38 -26
- package/dist/components/filter-chip.js +20 -16
- package/dist/components/floating-stepper.js +42 -32
- package/dist/components/form-card-header.js +9 -1
- package/dist/components/icon-button.js +19 -13
- package/dist/components/image-crop-modal.js +69 -48
- package/dist/components/image-upload.js +172 -128
- package/dist/components/input.js +90 -62
- package/dist/components/insight-card.js +12 -1
- package/dist/components/label.js +12 -7
- package/dist/components/media-tile.js +11 -8
- package/dist/components/menu.js +28 -25
- package/dist/components/modal.js +43 -28
- package/dist/components/notice.js +34 -16
- package/dist/components/option-tile.js +55 -49
- package/dist/components/page-shell.js +13 -6
- package/dist/components/page-skeleton.js +32 -2
- package/dist/components/page-tabs.js +39 -26
- package/dist/components/pagination.js +38 -33
- package/dist/components/paywall-banner.js +19 -3
- package/dist/components/paywall.js +18 -8
- package/dist/components/phone-frame.js +5 -4
- package/dist/components/phone-input.js +50 -31
- package/dist/components/pix-icon.js +11 -6
- package/dist/components/popover.js +27 -23
- package/dist/components/pricing-card.js +16 -1
- package/dist/components/qr-display.js +16 -11
- package/dist/components/radio.js +73 -56
- package/dist/components/row-actions.js +61 -53
- package/dist/components/saving-bar-context.js +35 -29
- package/dist/components/saving-bar.js +36 -33
- package/dist/components/search.js +49 -44
- package/dist/components/section-card.js +43 -35
- package/dist/components/section-header.js +11 -1
- package/dist/components/select.js +83 -62
- package/dist/components/selectable-card.js +10 -3
- package/dist/components/setting-row.js +11 -1
- package/dist/components/settings-list.js +9 -5
- package/dist/components/skeleton.js +6 -5
- package/dist/components/slider.js +52 -38
- package/dist/components/spinner.js +18 -12
- package/dist/components/step-progress.js +11 -10
- package/dist/components/summary-bar.js +33 -28
- package/dist/components/table.js +20 -15
- package/dist/components/textarea.js +40 -24
- package/dist/components/themed.d.ts +1 -1
- package/dist/components/themed.js +2 -1
- package/dist/components/time-picker.js +117 -97
- package/dist/components/toaster.js +80 -74
- package/dist/components/toggle-card-compact.js +79 -71
- package/dist/components/toggle-card.js +61 -53
- package/dist/components/toggle-group.js +35 -29
- package/dist/components/toggle.js +46 -36
- package/dist/components/tooltip.js +30 -25
- package/dist/components/typing-indicator.js +10 -7
- package/dist/targets/native/components/accordion.js +31 -25
- package/dist/targets/native/components/alert.js +22 -16
- package/dist/targets/native/components/avatar.js +36 -29
- package/dist/targets/native/components/badge.js +4 -3
- package/dist/targets/native/components/button.js +11 -4
- package/dist/targets/native/components/card.js +2 -1
- package/dist/targets/native/components/checkbox.js +18 -15
- package/dist/targets/native/components/chips.js +19 -16
- package/dist/targets/native/components/choice-card.js +29 -23
- package/dist/targets/native/components/context-menu.js +13 -9
- package/dist/targets/native/components/currency-input.js +28 -25
- package/dist/targets/native/components/danger-zone.js +10 -4
- package/dist/targets/native/components/date-picker.js +86 -70
- package/dist/targets/native/components/divider.js +3 -2
- package/dist/targets/native/components/empty-state.js +6 -1
- package/dist/targets/native/components/fab.js +32 -26
- package/dist/targets/native/components/filter-chip.js +9 -8
- package/dist/targets/native/components/form-field.js +20 -10
- package/dist/targets/native/components/form-screen.js +50 -45
- package/dist/targets/native/components/google-icon.js +31 -25
- package/dist/targets/native/components/icon-button.js +6 -4
- package/dist/targets/native/components/icon.js +2 -1
- package/dist/targets/native/components/image-upload.js +59 -50
- package/dist/targets/native/components/input.js +41 -34
- package/dist/targets/native/components/list-item.js +29 -23
- package/dist/targets/native/components/menu.js +12 -10
- package/dist/targets/native/components/modal.js +41 -32
- package/dist/targets/native/components/paywall-banner.js +13 -4
- package/dist/targets/native/components/paywall.js +11 -1
- package/dist/targets/native/components/radio.js +19 -16
- package/dist/targets/native/components/search.js +41 -38
- package/dist/targets/native/components/select.js +71 -63
- package/dist/targets/native/components/sheet.js +36 -30
- package/dist/targets/native/components/skeleton.js +6 -5
- package/dist/targets/native/components/slider.js +51 -43
- package/dist/targets/native/components/spinner.js +2 -1
- package/dist/targets/native/components/stepper.js +14 -9
- package/dist/targets/native/components/switch.js +15 -14
- package/dist/targets/native/components/text.js +2 -1
- package/dist/targets/native/components/textarea.js +2 -1
- package/dist/targets/native/components/theme.js +2 -1
- package/dist/targets/native/components/toaster.js +24 -21
- package/dist/targets/native/index.d.ts +1 -1
- package/dist/targets/native/index.js +1 -3
- package/package.json +190 -194
- package/styles/base.css +3 -3
- package/brand/rojao-black-on-white.png +0 -0
- package/brand/rojao-black.png +0 -0
- package/brand/rojao-white-on-black.png +0 -0
- 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__ */
|
|
55
|
-
/* @__PURE__ */
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
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__ */
|
|
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
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
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__ */
|
|
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
|
-
|
|
36
|
-
|
|
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__ */
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
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__ */
|
|
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__ */
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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__ */
|
|
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,
|