@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 { jsx, jsxs } from "react/jsx-runtime";
|
|
3
4
|
import { forwardRef, useState, useId, useImperativeHandle, useRef } from "react";
|
|
4
5
|
import { ChevronDown } from "lucide-react";
|
|
5
6
|
import { createContext, useContext } from "react";
|
|
@@ -40,7 +41,7 @@ const Accordion = forwardRef(function Accordion2(props, ref) {
|
|
|
40
41
|
(_b2 = single.onChange) == null ? void 0 : _b2.call(single, next);
|
|
41
42
|
}
|
|
42
43
|
};
|
|
43
|
-
return /* @__PURE__ */
|
|
44
|
+
return /* @__PURE__ */ jsx(Ctx.Provider, { value: { isOpen, toggle }, children: /* @__PURE__ */ jsx("div", { ref: rootRef, className: ["border-y border-stroke-default divide-y divide-stroke-subtle", props.className].filter(Boolean).join(" "), children: props.children }) });
|
|
44
45
|
});
|
|
45
46
|
function AccordionItem({ value, title, meta, children, icon, disabled = false }) {
|
|
46
47
|
const ctx = useContext(Ctx);
|
|
@@ -49,45 +50,50 @@ function AccordionItem({ value, title, meta, children, icon, disabled = false })
|
|
|
49
50
|
const id = useId();
|
|
50
51
|
const headerId = `${id}-header`;
|
|
51
52
|
const panelId = `${id}-panel`;
|
|
52
|
-
return /* @__PURE__ */
|
|
53
|
-
"
|
|
54
|
-
|
|
55
|
-
type: "button",
|
|
56
|
-
id: headerId,
|
|
57
|
-
"aria-expanded": open,
|
|
58
|
-
"aria-controls": panelId,
|
|
59
|
-
disabled,
|
|
60
|
-
onClick: () => ctx.toggle(value),
|
|
61
|
-
className: [
|
|
62
|
-
"w-full flex items-center gap-3 py-3 px-4 min-h-control-md text-left transition-colors",
|
|
63
|
-
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-stroke-focus focus-visible:ring-inset",
|
|
64
|
-
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
65
|
-
"hover:bg-surface-raised"
|
|
66
|
-
].join(" ")
|
|
67
|
-
},
|
|
68
|
-
icon && /* @__PURE__ */ React.createElement("span", { className: "shrink-0 text-fg-muted [&_svg]:size-4" }, icon),
|
|
69
|
-
/* @__PURE__ */ React.createElement("span", { className: "flex-1 font-medium text-fg-primary text-label" }, title),
|
|
70
|
-
meta && /* @__PURE__ */ React.createElement("span", { className: "shrink-0 text-caption text-fg-muted" }, meta),
|
|
71
|
-
/* @__PURE__ */ React.createElement(
|
|
72
|
-
ChevronDown,
|
|
53
|
+
return /* @__PURE__ */ jsxs("div", { children: [
|
|
54
|
+
/* @__PURE__ */ jsx("h3", { children: /* @__PURE__ */ jsxs(
|
|
55
|
+
"button",
|
|
73
56
|
{
|
|
74
|
-
|
|
75
|
-
|
|
57
|
+
type: "button",
|
|
58
|
+
id: headerId,
|
|
59
|
+
"aria-expanded": open,
|
|
60
|
+
"aria-controls": panelId,
|
|
61
|
+
disabled,
|
|
62
|
+
onClick: () => ctx.toggle(value),
|
|
63
|
+
className: [
|
|
64
|
+
"w-full flex items-center gap-3 py-3 px-4 min-h-control-md text-left transition-colors",
|
|
65
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-stroke-focus focus-visible:ring-inset",
|
|
66
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
67
|
+
"hover:bg-surface-raised"
|
|
68
|
+
].join(" "),
|
|
69
|
+
children: [
|
|
70
|
+
icon && /* @__PURE__ */ jsx("span", { className: "shrink-0 text-fg-muted [&_svg]:size-4", children: icon }),
|
|
71
|
+
/* @__PURE__ */ jsx("span", { className: "flex-1 font-medium text-fg-primary text-label", children: title }),
|
|
72
|
+
meta && /* @__PURE__ */ jsx("span", { className: "shrink-0 text-caption text-fg-muted", children: meta }),
|
|
73
|
+
/* @__PURE__ */ jsx(
|
|
74
|
+
ChevronDown,
|
|
75
|
+
{
|
|
76
|
+
size: 16,
|
|
77
|
+
className: ["shrink-0 text-fg-muted transition-transform", open ? "rotate-180" : ""].join(" ")
|
|
78
|
+
}
|
|
79
|
+
)
|
|
80
|
+
]
|
|
81
|
+
}
|
|
82
|
+
) }),
|
|
83
|
+
/* @__PURE__ */ jsx(
|
|
84
|
+
"div",
|
|
85
|
+
{
|
|
86
|
+
id: panelId,
|
|
87
|
+
role: "region",
|
|
88
|
+
"aria-labelledby": headerId,
|
|
89
|
+
className: [
|
|
90
|
+
"grid transition-[grid-template-rows] duration-200 ease-out motion-reduce:transition-none",
|
|
91
|
+
open ? "grid-rows-[1fr]" : "grid-rows-[0fr]"
|
|
92
|
+
].join(" "),
|
|
93
|
+
children: /* @__PURE__ */ jsx("div", { className: "overflow-hidden", children: /* @__PURE__ */ jsx("div", { className: "px-4 pb-4 text-label text-fg-secondary leading-relaxed", children }) })
|
|
76
94
|
}
|
|
77
95
|
)
|
|
78
|
-
)
|
|
79
|
-
"div",
|
|
80
|
-
{
|
|
81
|
-
id: panelId,
|
|
82
|
-
role: "region",
|
|
83
|
-
"aria-labelledby": headerId,
|
|
84
|
-
className: [
|
|
85
|
-
"grid transition-[grid-template-rows] duration-200 ease-out motion-reduce:transition-none",
|
|
86
|
-
open ? "grid-rows-[1fr]" : "grid-rows-[0fr]"
|
|
87
|
-
].join(" ")
|
|
88
|
-
},
|
|
89
|
-
/* @__PURE__ */ React.createElement("div", { className: "overflow-hidden" }, /* @__PURE__ */ React.createElement("div", { className: "px-4 pb-4 text-label text-fg-secondary leading-relaxed" }, children))
|
|
90
|
-
));
|
|
96
|
+
] });
|
|
91
97
|
}
|
|
92
98
|
export {
|
|
93
99
|
Accordion,
|
package/dist/components/alert.js
CHANGED
|
@@ -1,29 +1,30 @@
|
|
|
1
1
|
import "../chunk-ORMEWXMH.js";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
3
|
import { CheckCircle, AlertCircle, AlertTriangle, Info, X } from "lucide-react";
|
|
3
4
|
const VARIANTS = {
|
|
4
5
|
success: {
|
|
5
6
|
container: "bg-success-soft border-success-border text-success-text",
|
|
6
|
-
icon: /* @__PURE__ */
|
|
7
|
+
icon: /* @__PURE__ */ jsx(CheckCircle, { size: 16, className: "shrink-0 mt-0.5" }),
|
|
7
8
|
actionColor: "text-success-text hover:bg-success-soft/60"
|
|
8
9
|
},
|
|
9
10
|
danger: {
|
|
10
11
|
container: "bg-danger-soft border-danger-border text-danger-text",
|
|
11
|
-
icon: /* @__PURE__ */
|
|
12
|
+
icon: /* @__PURE__ */ jsx(AlertCircle, { size: 16, className: "shrink-0 mt-0.5" }),
|
|
12
13
|
actionColor: "text-danger-text hover:bg-danger-soft/60"
|
|
13
14
|
},
|
|
14
15
|
warning: {
|
|
15
16
|
container: "bg-warning-soft border-warning-border text-warning-text",
|
|
16
|
-
icon: /* @__PURE__ */
|
|
17
|
+
icon: /* @__PURE__ */ jsx(AlertTriangle, { size: 16, className: "shrink-0 mt-0.5" }),
|
|
17
18
|
actionColor: "text-warning-text hover:bg-warning-soft/60"
|
|
18
19
|
},
|
|
19
20
|
info: {
|
|
20
21
|
container: "bg-info-soft border-info-border text-info-text",
|
|
21
|
-
icon: /* @__PURE__ */
|
|
22
|
+
icon: /* @__PURE__ */ jsx(Info, { size: 16, className: "shrink-0 mt-0.5" }),
|
|
22
23
|
actionColor: "text-info-text hover:bg-info-soft/60"
|
|
23
24
|
},
|
|
24
25
|
neutral: {
|
|
25
26
|
container: "bg-neutral-soft border-neutral-border text-neutral-text",
|
|
26
|
-
icon: /* @__PURE__ */
|
|
27
|
+
icon: /* @__PURE__ */ jsx(Info, { size: 16, className: "shrink-0 mt-0.5" }),
|
|
27
28
|
actionColor: "text-neutral-text hover:bg-neutral-soft/60"
|
|
28
29
|
}
|
|
29
30
|
};
|
|
@@ -39,32 +40,38 @@ function Alert({
|
|
|
39
40
|
}) {
|
|
40
41
|
const { container, icon: defaultIcon, actionColor } = VARIANTS[variant];
|
|
41
42
|
const iconEl = hideIcon ? null : icon != null ? icon : defaultIcon;
|
|
42
|
-
return /* @__PURE__ */
|
|
43
|
+
return /* @__PURE__ */ jsxs(
|
|
43
44
|
"div",
|
|
44
45
|
{
|
|
45
46
|
role: variant === "danger" ? "alert" : "status",
|
|
46
|
-
className: ["flex items-start gap-3 px-4 py-3 rounded-(--radius-card) border text-label", container, className].join(" ")
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
47
|
+
className: ["flex items-start gap-3 px-4 py-3 rounded-(--radius-card) border text-label", container, className].join(" "),
|
|
48
|
+
children: [
|
|
49
|
+
iconEl,
|
|
50
|
+
/* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
51
|
+
title && /* @__PURE__ */ jsx("p", { className: "font-medium leading-snug", children: title }),
|
|
52
|
+
children && /* @__PURE__ */ jsx("div", { className: ["leading-snug", title ? "mt-0.5 opacity-80" : ""].join(" "), children }),
|
|
53
|
+
action && /* @__PURE__ */ jsx(
|
|
54
|
+
"button",
|
|
55
|
+
{
|
|
56
|
+
type: "button",
|
|
57
|
+
onClick: action.onClick,
|
|
58
|
+
className: ["mt-2 inline-flex text-caption font-semibold px-2 py-1 -mx-2 rounded transition-colors", actionColor].join(" "),
|
|
59
|
+
children: action.label
|
|
60
|
+
}
|
|
61
|
+
)
|
|
62
|
+
] }),
|
|
63
|
+
onClose && /* @__PURE__ */ jsx(
|
|
64
|
+
"button",
|
|
65
|
+
{
|
|
66
|
+
type: "button",
|
|
67
|
+
onClick: onClose,
|
|
68
|
+
className: "shrink-0 opacity-60 hover:opacity-100 transition-opacity p-0.5 -m-0.5 rounded",
|
|
69
|
+
"aria-label": "Fechar",
|
|
70
|
+
children: /* @__PURE__ */ jsx(X, { size: 14 })
|
|
71
|
+
}
|
|
72
|
+
)
|
|
73
|
+
]
|
|
74
|
+
}
|
|
68
75
|
);
|
|
69
76
|
}
|
|
70
77
|
export {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import "../chunk-ORMEWXMH.js";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
3
|
import { Children, isValidElement, cloneElement } from "react";
|
|
3
4
|
const SIZE_CLASSES = {
|
|
4
5
|
xs: "size-6 text-[10px]",
|
|
@@ -39,29 +40,32 @@ function Avatar({
|
|
|
39
40
|
const showImage = !!src;
|
|
40
41
|
const label = (_a = alt != null ? alt : name) != null ? _a : "Avatar";
|
|
41
42
|
const bgClass = variant === "brand" ? "bg-brand-primary text-brand-on-primary" : "bg-surface-raised text-fg-secondary";
|
|
42
|
-
return /* @__PURE__ */
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
43
|
+
return /* @__PURE__ */ jsxs("div", { className: ["relative inline-flex shrink-0", className].join(" "), children: [
|
|
44
|
+
/* @__PURE__ */ jsx(
|
|
45
|
+
"div",
|
|
46
|
+
{
|
|
47
|
+
className: [
|
|
48
|
+
"inline-flex items-center justify-center rounded-full overflow-hidden font-semibold select-none",
|
|
49
|
+
SIZE_CLASSES[size],
|
|
50
|
+
showImage ? "" : bgClass
|
|
51
|
+
].join(" "),
|
|
52
|
+
"aria-label": label,
|
|
53
|
+
role: "img",
|
|
54
|
+
children: showImage ? /* @__PURE__ */ jsx("img", { src, alt: label, className: "size-full object-cover" }) : /* @__PURE__ */ jsx("span", { children: initials(name != null ? name : "?") })
|
|
55
|
+
}
|
|
56
|
+
),
|
|
57
|
+
status && /* @__PURE__ */ jsx(
|
|
58
|
+
"span",
|
|
59
|
+
{
|
|
60
|
+
className: [
|
|
61
|
+
"absolute bottom-0 right-0 rounded-full ring-2 ring-surface-default",
|
|
62
|
+
STATUS_DOT_SIZE[size],
|
|
63
|
+
STATUS_COLOR[status]
|
|
64
|
+
].join(" "),
|
|
65
|
+
"aria-label": `status: ${status}`
|
|
66
|
+
}
|
|
67
|
+
)
|
|
68
|
+
] });
|
|
65
69
|
}
|
|
66
70
|
const SPACING_CLASS = {
|
|
67
71
|
tight: "-ml-3",
|
|
@@ -78,17 +82,20 @@ function AvatarGroup({
|
|
|
78
82
|
const items = Children.toArray(children).filter(isValidElement);
|
|
79
83
|
const visible = items.slice(0, max);
|
|
80
84
|
const overflow = items.length - visible.length;
|
|
81
|
-
return /* @__PURE__ */
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
{
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
85
|
+
return /* @__PURE__ */ jsxs("div", { className: ["inline-flex items-center", className].join(" "), role: "group", children: [
|
|
86
|
+
visible.map((child, idx) => {
|
|
87
|
+
var _a;
|
|
88
|
+
return /* @__PURE__ */ jsx("div", { className: idx === 0 ? "" : SPACING_CLASS[spacing], children: cloneElement(child, { size: (_a = child.props.size) != null ? _a : size }) }, idx);
|
|
89
|
+
}),
|
|
90
|
+
overflow > 0 && /* @__PURE__ */ jsx("div", { className: SPACING_CLASS[spacing], children: /* @__PURE__ */ jsx(
|
|
91
|
+
Avatar,
|
|
92
|
+
{
|
|
93
|
+
name: `+${overflow}`,
|
|
94
|
+
variant: "neutral",
|
|
95
|
+
size
|
|
96
|
+
}
|
|
97
|
+
) })
|
|
98
|
+
] });
|
|
92
99
|
}
|
|
93
100
|
export {
|
|
94
101
|
Avatar,
|
package/dist/components/badge.js
CHANGED
|
@@ -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 LABEL_VARIANTS = {
|
|
7
9
|
default: "bg-surface-default text-fg-muted border border-stroke-default",
|
|
@@ -50,7 +52,7 @@ const Badge = forwardRef(function Badge2(_a, ref) {
|
|
|
50
52
|
"children"
|
|
51
53
|
]);
|
|
52
54
|
if (variant === "dot") {
|
|
53
|
-
return /* @__PURE__ */
|
|
55
|
+
return /* @__PURE__ */ jsx(
|
|
54
56
|
"span",
|
|
55
57
|
__spreadValues({
|
|
56
58
|
ref,
|
|
@@ -67,9 +69,9 @@ const Badge = forwardRef(function Badge2(_a, ref) {
|
|
|
67
69
|
if (variant === "count") {
|
|
68
70
|
const display = count !== void 0 ? count > max ? `${max}+` : String(count) : children;
|
|
69
71
|
if (count !== void 0 && count <= 0) return null;
|
|
70
|
-
return /* @__PURE__ */
|
|
72
|
+
return /* @__PURE__ */ jsx(
|
|
71
73
|
"span",
|
|
72
|
-
__spreadValues({
|
|
74
|
+
__spreadProps(__spreadValues({
|
|
73
75
|
ref,
|
|
74
76
|
className: [
|
|
75
77
|
BASE,
|
|
@@ -78,25 +80,29 @@ const Badge = forwardRef(function Badge2(_a, ref) {
|
|
|
78
80
|
"bg-brand-primary text-brand-on-primary justify-center tabular-nums",
|
|
79
81
|
className
|
|
80
82
|
].join(" ")
|
|
81
|
-
}, props),
|
|
82
|
-
|
|
83
|
+
}, props), {
|
|
84
|
+
children: display
|
|
85
|
+
})
|
|
83
86
|
);
|
|
84
87
|
}
|
|
85
88
|
if (variant in STATUS_VARIANTS) {
|
|
86
89
|
const { dot, text } = STATUS_VARIANTS[variant];
|
|
87
|
-
return /* @__PURE__ */
|
|
90
|
+
return /* @__PURE__ */ jsxs(
|
|
88
91
|
"span",
|
|
89
|
-
__spreadValues({
|
|
92
|
+
__spreadProps(__spreadValues({
|
|
90
93
|
ref,
|
|
91
94
|
className: [BASE, SIZE_CLASS[size], "gap-1.5", text, className].join(" ")
|
|
92
|
-
}, props),
|
|
93
|
-
|
|
94
|
-
|
|
95
|
+
}, props), {
|
|
96
|
+
children: [
|
|
97
|
+
/* @__PURE__ */ jsx("span", { className: ["shrink-0 size-1.5 rounded-full", dot].join(" "), "aria-hidden": "true" }),
|
|
98
|
+
children
|
|
99
|
+
]
|
|
100
|
+
})
|
|
95
101
|
);
|
|
96
102
|
}
|
|
97
|
-
return /* @__PURE__ */
|
|
103
|
+
return /* @__PURE__ */ jsx(
|
|
98
104
|
"span",
|
|
99
|
-
__spreadValues({
|
|
105
|
+
__spreadProps(__spreadValues({
|
|
100
106
|
ref,
|
|
101
107
|
className: [
|
|
102
108
|
BASE,
|
|
@@ -105,8 +111,9 @@ const Badge = forwardRef(function Badge2(_a, ref) {
|
|
|
105
111
|
LABEL_VARIANTS[variant],
|
|
106
112
|
className
|
|
107
113
|
].join(" ")
|
|
108
|
-
}, props),
|
|
109
|
-
|
|
114
|
+
}, props), {
|
|
115
|
+
children
|
|
116
|
+
})
|
|
110
117
|
);
|
|
111
118
|
});
|
|
112
119
|
export {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import "../chunk-ORMEWXMH.js";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
3
|
const TONE = {
|
|
3
4
|
danger: {
|
|
4
5
|
container: "border-danger-border bg-danger-soft",
|
|
@@ -22,7 +23,7 @@ const DEFAULT_EYEBROW = {
|
|
|
22
23
|
info: "Aviso"
|
|
23
24
|
};
|
|
24
25
|
function DefaultLink({ href, className, children }) {
|
|
25
|
-
return /* @__PURE__ */
|
|
26
|
+
return /* @__PURE__ */ jsx("a", { href, className, children });
|
|
26
27
|
}
|
|
27
28
|
function BlockerCard({
|
|
28
29
|
title,
|
|
@@ -38,7 +39,15 @@ function BlockerCard({
|
|
|
38
39
|
const palette = TONE[tone];
|
|
39
40
|
const eyebrowText = eyebrow != null ? eyebrow : DEFAULT_EYEBROW[tone];
|
|
40
41
|
const actionClass = ["shrink-0 rounded-(--radius-card) border px-3 py-1.5 text-caption font-medium transition-colors whitespace-nowrap", palette.action].join(" ");
|
|
41
|
-
return /* @__PURE__ */
|
|
42
|
+
return /* @__PURE__ */ jsx("div", { className: ["rounded-(--radius-card) border p-4", palette.container, className].join(" "), children: /* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-4", children: [
|
|
43
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
|
|
44
|
+
/* @__PURE__ */ jsx("span", { className: ["text-caption font-semibold uppercase tracking-wide", palette.eyebrow].join(" "), children: eyebrowText }),
|
|
45
|
+
/* @__PURE__ */ jsx("p", { className: "mt-0.5 font-semibold text-fg-primary text-label", children: title }),
|
|
46
|
+
/* @__PURE__ */ jsx("div", { className: "mt-0.5 text-label text-fg-secondary", children: description })
|
|
47
|
+
] }),
|
|
48
|
+
action && actionHref && /* @__PURE__ */ jsx(LinkAs, { href: actionHref, className: actionClass, children: action }),
|
|
49
|
+
action && !actionHref && onAction && /* @__PURE__ */ jsx("button", { type: "button", onClick: onAction, className: actionClass, children: action })
|
|
50
|
+
] }) });
|
|
42
51
|
}
|
|
43
52
|
export {
|
|
44
53
|
BlockerCard
|
|
@@ -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 { forwardRef, useEffect, useImperativeHandle, useRef, useState } from "react";
|
|
4
5
|
import { createPortal } from "react-dom";
|
|
5
6
|
import { X } from "lucide-react";
|
|
@@ -51,66 +52,72 @@ const BottomSheet = forwardRef(function BottomSheet2({
|
|
|
51
52
|
}, [open, onClose]);
|
|
52
53
|
if (!mounted || !open) return null;
|
|
53
54
|
return createPortal(
|
|
54
|
-
/* @__PURE__ */
|
|
55
|
+
/* @__PURE__ */ jsxs(
|
|
55
56
|
"div",
|
|
56
57
|
{
|
|
57
58
|
role: "dialog",
|
|
58
59
|
"aria-modal": "true",
|
|
59
60
|
"aria-labelledby": title ? "bottom-sheet-title" : void 0,
|
|
60
|
-
className: "fixed inset-0 z-[1000] flex items-end justify-center"
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
{
|
|
65
|
-
"data-bottom-sheet-backdrop": true,
|
|
66
|
-
onClick: closeOnBackdrop ? onClose : void 0,
|
|
67
|
-
className: "absolute inset-0 [background:var(--overlay-scrim)] rojao-bottom-sheet--backdrop-enter",
|
|
68
|
-
"aria-hidden": true
|
|
69
|
-
}
|
|
70
|
-
),
|
|
71
|
-
/* @__PURE__ */ React.createElement(
|
|
72
|
-
"div",
|
|
73
|
-
{
|
|
74
|
-
ref: sheetRef,
|
|
75
|
-
tabIndex: -1,
|
|
76
|
-
className: [
|
|
77
|
-
"relative w-full sm:max-w-md bg-surface-default rounded-t-(--radius-toast) shadow-2xl outline-none",
|
|
78
|
-
"flex flex-col rojao-bottom-sheet--enter",
|
|
79
|
-
SNAP_HEIGHT[snap],
|
|
80
|
-
className
|
|
81
|
-
].join(" ")
|
|
82
|
-
},
|
|
83
|
-
/* @__PURE__ */ React.createElement(
|
|
84
|
-
"div",
|
|
85
|
-
{
|
|
86
|
-
"data-drag-handle": true,
|
|
87
|
-
onTouchStart: handleDragStart,
|
|
88
|
-
onTouchMove: handleDragMove,
|
|
89
|
-
className: "flex justify-center items-center min-h-[20px] pt-2 shrink-0 touch-none cursor-grab"
|
|
90
|
-
},
|
|
91
|
-
/* @__PURE__ */ React.createElement("span", { className: "w-10 h-1 rounded-full bg-(--border-strong)", "aria-hidden": true })
|
|
92
|
-
),
|
|
93
|
-
!hideHeader && /* @__PURE__ */ React.createElement(
|
|
94
|
-
"div",
|
|
95
|
-
{
|
|
96
|
-
onTouchStart: handleDragStart,
|
|
97
|
-
onTouchMove: handleDragMove,
|
|
98
|
-
className: "flex items-center justify-between px-5 pt-2 pb-3 border-b border-stroke-default shrink-0"
|
|
99
|
-
},
|
|
100
|
-
/* @__PURE__ */ React.createElement("h2", { id: "bottom-sheet-title", className: "text-body font-semibold text-fg-primary" }, title),
|
|
101
|
-
/* @__PURE__ */ React.createElement(
|
|
102
|
-
"button",
|
|
61
|
+
className: "fixed inset-0 z-[1000] flex items-end justify-center",
|
|
62
|
+
children: [
|
|
63
|
+
/* @__PURE__ */ jsx(
|
|
64
|
+
"div",
|
|
103
65
|
{
|
|
104
|
-
|
|
105
|
-
onClick: onClose,
|
|
106
|
-
"
|
|
107
|
-
|
|
108
|
-
}
|
|
109
|
-
|
|
66
|
+
"data-bottom-sheet-backdrop": true,
|
|
67
|
+
onClick: closeOnBackdrop ? onClose : void 0,
|
|
68
|
+
className: "absolute inset-0 [background:var(--overlay-scrim)] rojao-bottom-sheet--backdrop-enter",
|
|
69
|
+
"aria-hidden": true
|
|
70
|
+
}
|
|
71
|
+
),
|
|
72
|
+
/* @__PURE__ */ jsxs(
|
|
73
|
+
"div",
|
|
74
|
+
{
|
|
75
|
+
ref: sheetRef,
|
|
76
|
+
tabIndex: -1,
|
|
77
|
+
className: [
|
|
78
|
+
"relative w-full sm:max-w-md bg-surface-default rounded-t-(--radius-toast) shadow-2xl outline-none",
|
|
79
|
+
"flex flex-col rojao-bottom-sheet--enter",
|
|
80
|
+
SNAP_HEIGHT[snap],
|
|
81
|
+
className
|
|
82
|
+
].join(" "),
|
|
83
|
+
children: [
|
|
84
|
+
/* @__PURE__ */ jsx(
|
|
85
|
+
"div",
|
|
86
|
+
{
|
|
87
|
+
"data-drag-handle": true,
|
|
88
|
+
onTouchStart: handleDragStart,
|
|
89
|
+
onTouchMove: handleDragMove,
|
|
90
|
+
className: "flex justify-center items-center min-h-[20px] pt-2 shrink-0 touch-none cursor-grab",
|
|
91
|
+
children: /* @__PURE__ */ jsx("span", { className: "w-10 h-1 rounded-full bg-(--border-strong)", "aria-hidden": true })
|
|
92
|
+
}
|
|
93
|
+
),
|
|
94
|
+
!hideHeader && /* @__PURE__ */ jsxs(
|
|
95
|
+
"div",
|
|
96
|
+
{
|
|
97
|
+
onTouchStart: handleDragStart,
|
|
98
|
+
onTouchMove: handleDragMove,
|
|
99
|
+
className: "flex items-center justify-between px-5 pt-2 pb-3 border-b border-stroke-default shrink-0",
|
|
100
|
+
children: [
|
|
101
|
+
/* @__PURE__ */ jsx("h2", { id: "bottom-sheet-title", className: "text-body font-semibold text-fg-primary", children: title }),
|
|
102
|
+
/* @__PURE__ */ jsx(
|
|
103
|
+
"button",
|
|
104
|
+
{
|
|
105
|
+
type: "button",
|
|
106
|
+
onClick: onClose,
|
|
107
|
+
"aria-label": "Fechar",
|
|
108
|
+
className: "text-fg-muted hover:text-fg-primary transition-colors p-3 -mr-3 rounded focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-stroke-focus",
|
|
109
|
+
children: /* @__PURE__ */ jsx(X, { size: 18 })
|
|
110
|
+
}
|
|
111
|
+
)
|
|
112
|
+
]
|
|
113
|
+
}
|
|
114
|
+
),
|
|
115
|
+
/* @__PURE__ */ jsx("div", { "data-scroll-container": true, className: "flex-1 overflow-y-auto px-5 py-4", children })
|
|
116
|
+
]
|
|
117
|
+
}
|
|
110
118
|
)
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
)
|
|
119
|
+
]
|
|
120
|
+
}
|
|
114
121
|
),
|
|
115
122
|
document.body
|
|
116
123
|
);
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import "../chunk-ORMEWXMH.js";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
3
|
import { ChevronRight, Home } from "lucide-react";
|
|
3
4
|
function DefaultLink({ href, className, children }) {
|
|
4
|
-
return /* @__PURE__ */
|
|
5
|
+
return /* @__PURE__ */ jsx("a", { href, className, children });
|
|
5
6
|
}
|
|
6
7
|
function Breadcrumb({
|
|
7
8
|
items,
|
|
@@ -10,7 +11,7 @@ function Breadcrumb({
|
|
|
10
11
|
className = "",
|
|
11
12
|
linkAs: LinkAs = DefaultLink
|
|
12
13
|
}) {
|
|
13
|
-
const sep = separator != null ? separator : /* @__PURE__ */
|
|
14
|
+
const sep = separator != null ? separator : /* @__PURE__ */ jsx(ChevronRight, { size: 14, className: "text-fg-muted shrink-0" });
|
|
14
15
|
let displayed = items;
|
|
15
16
|
if (items.length > maxItems) {
|
|
16
17
|
displayed = [
|
|
@@ -19,32 +20,41 @@ function Breadcrumb({
|
|
|
19
20
|
...items.slice(items.length - 2)
|
|
20
21
|
];
|
|
21
22
|
}
|
|
22
|
-
return /* @__PURE__ */
|
|
23
|
+
return /* @__PURE__ */ jsx("nav", { "aria-label": "Breadcrumb", className, children: /* @__PURE__ */ jsx("ol", { className: "flex items-center gap-1.5 text-label flex-wrap", children: displayed.map((entry, idx) => {
|
|
23
24
|
const isLast = idx === displayed.length - 1;
|
|
24
25
|
if ("ellipsis" in entry) {
|
|
25
|
-
return /* @__PURE__ */
|
|
26
|
+
return /* @__PURE__ */ jsxs("li", { className: "flex items-center gap-1.5", children: [
|
|
27
|
+
/* @__PURE__ */ jsx("span", { className: "text-fg-muted px-1", "aria-hidden": true, children: "\u2026" }),
|
|
28
|
+
!isLast && sep
|
|
29
|
+
] }, `ell-${idx}`);
|
|
26
30
|
}
|
|
27
31
|
const item = entry;
|
|
28
|
-
const labelEl = /* @__PURE__ */
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
32
|
+
const labelEl = /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-1", children: [
|
|
33
|
+
item.icon,
|
|
34
|
+
item.label
|
|
35
|
+
] });
|
|
36
|
+
return /* @__PURE__ */ jsxs("li", { className: "flex items-center gap-1.5", children: [
|
|
37
|
+
item.href && !isLast ? /* @__PURE__ */ jsx(
|
|
38
|
+
LinkAs,
|
|
39
|
+
{
|
|
40
|
+
href: item.href,
|
|
41
|
+
className: "text-fg-muted hover:text-fg-primary transition-colors",
|
|
42
|
+
children: labelEl
|
|
43
|
+
}
|
|
44
|
+
) : /* @__PURE__ */ jsx(
|
|
45
|
+
"span",
|
|
46
|
+
{
|
|
47
|
+
className: isLast ? "text-fg-primary font-medium" : "text-fg-muted",
|
|
48
|
+
"aria-current": isLast ? "page" : void 0,
|
|
49
|
+
children: labelEl
|
|
50
|
+
}
|
|
51
|
+
),
|
|
52
|
+
!isLast && sep
|
|
53
|
+
] }, idx);
|
|
54
|
+
}) }) });
|
|
45
55
|
}
|
|
46
56
|
function homeItem(href = "/") {
|
|
47
|
-
return { label: "In\xEDcio", href, icon: /* @__PURE__ */
|
|
57
|
+
return { label: "In\xEDcio", href, icon: /* @__PURE__ */ jsx(Home, { size: 14 }) };
|
|
48
58
|
}
|
|
49
59
|
export {
|
|
50
60
|
Breadcrumb,
|