@rojaostudio/ds 1.0.2 → 2.0.0-next.0
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/README.md +75 -13
- package/dist/compat/generate.d.ts +0 -1
- package/dist/components/accordion.d.ts +30 -20
- package/dist/components/accordion.js +31 -93
- package/dist/components/action-bar.d.ts +24 -0
- package/dist/components/action-bar.js +55 -0
- package/dist/components/alert-dialog.d.ts +31 -0
- package/dist/components/alert-dialog.js +43 -0
- package/dist/components/alert.d.ts +31 -19
- package/dist/components/alert.js +67 -65
- package/dist/components/attachment.d.ts +37 -0
- package/dist/components/attachment.js +76 -0
- package/dist/components/avatar.d.ts +43 -36
- package/dist/components/avatar.js +59 -90
- package/dist/components/badge.d.ts +30 -41
- package/dist/components/badge.js +13 -110
- package/dist/components/banner.d.ts +27 -0
- package/dist/components/banner.js +66 -0
- package/dist/components/benefits.d.ts +30 -0
- package/dist/components/benefits.js +32 -0
- package/dist/components/breadcrumb.d.ts +25 -18
- package/dist/components/breadcrumb.js +38 -56
- package/dist/components/browser.d.ts +18 -0
- package/dist/components/browser.js +32 -0
- package/dist/components/bubble.d.ts +29 -0
- package/dist/components/bubble.js +33 -0
- package/dist/components/button-group.d.ts +19 -0
- package/dist/components/button-group.js +20 -0
- package/dist/components/button.d.ts +47 -20
- package/dist/components/button.js +45 -108
- package/dist/components/calendar.d.ts +29 -0
- package/dist/components/calendar.js +149 -0
- package/dist/components/card.d.ts +47 -19
- package/dist/components/card.js +31 -46
- package/dist/components/carousel.d.ts +28 -0
- package/dist/components/carousel.js +130 -0
- package/dist/components/chart.d.ts +49 -0
- package/dist/components/chart.js +258 -0
- package/dist/components/checkbox-group.d.ts +16 -0
- package/dist/components/checkbox-group.js +13 -0
- package/dist/components/checkbox.d.ts +25 -10
- package/dist/components/checkbox.js +87 -81
- package/dist/components/chip-input.d.ts +46 -20
- package/dist/components/chip-input.js +172 -176
- package/dist/components/chip.d.ts +28 -0
- package/dist/components/chip.js +73 -0
- package/dist/components/choice-card.d.ts +10 -13
- package/dist/components/choice-card.js +11 -62
- package/dist/components/choice-carousel.d.ts +9 -0
- package/dist/components/choice-carousel.js +28 -44
- package/dist/components/choice-preview-card.d.ts +10 -20
- package/dist/components/choice-preview-card.js +12 -40
- package/dist/components/color-input.d.ts +36 -11
- package/dist/components/color-input.js +131 -59
- package/dist/components/combobox.d.ts +60 -57
- package/dist/components/combobox.js +210 -213
- package/dist/components/command.d.ts +58 -0
- package/dist/components/command.js +177 -0
- package/dist/components/contact.d.ts +23 -0
- package/dist/components/contact.js +32 -0
- package/dist/components/context-menu.d.ts +34 -26
- package/dist/components/context-menu.js +41 -68
- package/dist/components/copy-field.d.ts +10 -5
- package/dist/components/copy-field.js +24 -29
- package/dist/components/currency-input.d.ts +25 -11
- package/dist/components/currency-input.js +29 -65
- package/dist/components/danger-zone.d.ts +10 -1
- package/dist/components/danger-zone.js +14 -18
- package/dist/components/data-table-header.d.ts +13 -2
- package/dist/components/data-table-header.js +114 -190
- package/dist/components/date-picker.d.ts +31 -32
- package/dist/components/date-picker.js +119 -254
- package/dist/components/delta.d.ts +26 -0
- package/dist/components/delta.js +24 -0
- package/dist/components/dialog.d.ts +21 -0
- package/dist/components/dialog.js +16 -0
- package/dist/components/drawer.d.ts +15 -23
- package/dist/components/drawer.js +57 -89
- package/dist/components/dropdown-menu.d.ts +63 -0
- package/dist/components/dropdown-menu.js +62 -0
- package/dist/components/dropzone.d.ts +10 -4
- package/dist/components/dropzone.js +30 -58
- package/dist/components/empty.d.ts +29 -0
- package/dist/components/empty.js +42 -0
- package/dist/components/fab.d.ts +29 -6
- package/dist/components/fab.js +51 -51
- package/dist/components/faq.d.ts +21 -0
- package/dist/components/faq.js +24 -0
- package/dist/components/file-input.d.ts +56 -0
- package/dist/components/file-input.js +244 -0
- package/dist/components/filter-chip.d.ts +34 -47
- package/dist/components/filter-chip.js +61 -61
- package/dist/components/floating-stepper.d.ts +7 -18
- package/dist/components/floating-stepper.js +27 -55
- package/dist/components/footer.d.ts +36 -0
- package/dist/components/footer.js +38 -0
- package/dist/components/form-actions.d.ts +28 -0
- package/dist/components/form-actions.js +24 -0
- package/dist/components/google-account-chooser.d.ts +25 -0
- package/dist/components/google-account-chooser.js +44 -0
- package/dist/components/google-button.d.ts +26 -0
- package/dist/components/google-button.js +38 -0
- package/dist/components/google-consent.d.ts +23 -0
- package/dist/components/google-consent.js +28 -0
- package/dist/components/google-sign-in.d.ts +26 -0
- package/dist/components/google-sign-in.js +36 -0
- package/dist/components/hover-card.d.ts +30 -0
- package/dist/components/hover-card.js +55 -0
- package/dist/components/icon-button.d.ts +41 -11
- package/dist/components/icon-button.js +44 -64
- package/dist/components/image-crop-modal.d.ts +3 -3
- package/dist/components/image-crop-modal.js +32 -39
- package/dist/components/image-upload.d.ts +21 -29
- package/dist/components/image-upload.js +55 -259
- package/dist/components/index.d.ts +105 -49
- package/dist/components/index.js +190 -68
- package/dist/components/input-otp.d.ts +35 -0
- package/dist/components/input-otp.js +119 -0
- package/dist/components/input.d.ts +23 -17
- package/dist/components/input.js +104 -137
- package/dist/components/insight-card.d.ts +25 -9
- package/dist/components/insight-card.js +42 -27
- package/dist/components/internal/announce.d.ts +3 -0
- package/dist/components/internal/announce.js +20 -0
- package/dist/components/internal/block.d.ts +15 -0
- package/dist/components/internal/block.js +14 -0
- package/dist/components/internal/button.d.ts +23 -0
- package/dist/components/internal/button.js +30 -0
- package/dist/components/internal/choice-card.d.ts +52 -0
- package/dist/components/internal/choice-card.js +117 -0
- package/dist/components/internal/choice.d.ts +25 -0
- package/dist/components/internal/choice.js +44 -0
- package/dist/components/internal/dates.d.ts +17 -0
- package/dist/components/internal/dates.js +59 -0
- package/dist/components/internal/field.d.ts +66 -0
- package/dist/components/internal/field.js +105 -0
- package/dist/components/internal/fieldset.d.ts +25 -0
- package/dist/components/internal/fieldset.js +56 -0
- package/dist/components/internal/focus-after.d.ts +3 -0
- package/dist/components/internal/focus-after.js +13 -0
- package/dist/components/internal/google.d.ts +47 -0
- package/dist/components/internal/google.js +73 -0
- package/dist/components/internal/icons.d.ts +108 -0
- package/dist/components/internal/icons.js +316 -0
- package/dist/components/internal/menu.d.ts +16 -0
- package/dist/components/internal/menu.js +14 -0
- package/dist/components/internal/modal.d.ts +50 -0
- package/dist/components/internal/modal.js +85 -0
- package/dist/components/internal/option-content.d.ts +10 -0
- package/dist/components/internal/option-content.js +13 -0
- package/dist/components/internal/radio-context.d.ts +16 -0
- package/dist/components/internal/radio-context.js +6 -0
- package/dist/components/internal/toggle.d.ts +7 -0
- package/dist/components/internal/toggle.js +13 -0
- package/dist/components/internal/use-listbox.d.ts +56 -0
- package/dist/components/internal/use-listbox.js +69 -0
- package/dist/components/internal/whatsapp.d.ts +8 -0
- package/dist/components/internal/whatsapp.js +12 -0
- package/dist/components/item.d.ts +32 -0
- package/dist/components/item.js +35 -0
- package/dist/components/kbd.d.ts +17 -0
- package/dist/components/kbd.js +18 -0
- package/dist/components/listbox.d.ts +34 -0
- package/dist/components/listbox.js +114 -0
- package/dist/components/marker.d.ts +24 -0
- package/dist/components/marker.js +28 -0
- package/dist/components/media-tile.d.ts +17 -14
- package/dist/components/media-tile.js +19 -27
- package/dist/components/message-scroller.d.ts +20 -0
- package/dist/components/message-scroller.js +108 -0
- package/dist/components/message.d.ts +33 -0
- package/dist/components/message.js +23 -0
- package/dist/components/navigation-menu.d.ts +42 -0
- package/dist/components/navigation-menu.js +30 -0
- package/dist/components/newsletter.d.ts +27 -0
- package/dist/components/newsletter.js +75 -0
- package/dist/components/number-input.d.ts +60 -0
- package/dist/components/number-input.js +234 -0
- package/dist/components/option-tile.d.ts +20 -19
- package/dist/components/option-tile.js +52 -137
- package/dist/components/page-header.d.ts +31 -0
- package/dist/components/page-header.js +25 -0
- package/dist/components/page-shell.d.ts +11 -1
- package/dist/components/page-shell.js +8 -34
- package/dist/components/page-skeleton.d.ts +15 -21
- package/dist/components/page-skeleton.js +28 -25
- package/dist/components/pagination.d.ts +32 -22
- package/dist/components/pagination.js +78 -76
- package/dist/components/password-input.d.ts +26 -0
- package/dist/components/password-input.js +112 -0
- package/dist/components/phone-input.d.ts +12 -8
- package/dist/components/phone-input.js +75 -64
- package/dist/components/phone.d.ts +27 -0
- package/dist/components/phone.js +35 -0
- package/dist/components/popover.d.ts +25 -36
- package/dist/components/popover.js +30 -131
- package/dist/components/pricing-card.d.ts +9 -25
- package/dist/components/pricing-card.js +9 -40
- package/dist/components/pricing.d.ts +48 -0
- package/dist/components/pricing.js +64 -0
- package/dist/components/progress.d.ts +30 -0
- package/dist/components/progress.js +57 -0
- package/dist/components/qr-display.d.ts +11 -6
- package/dist/components/qr-display.js +6 -22
- package/dist/components/questionnaire.d.ts +42 -0
- package/dist/components/questionnaire.js +107 -0
- package/dist/components/radio-group.d.ts +21 -0
- package/dist/components/radio-group.js +40 -0
- package/dist/components/radio.d.ts +15 -29
- package/dist/components/radio.js +45 -103
- package/dist/components/row-actions.d.ts +5 -0
- package/dist/components/row-actions.js +27 -34
- package/dist/components/saving-bar-context.d.ts +0 -5
- package/dist/components/saving-bar-context.js +16 -40
- package/dist/components/saving-bar.d.ts +26 -11
- package/dist/components/saving-bar.js +50 -65
- package/dist/components/section-card.d.ts +18 -4
- package/dist/components/section-card.js +29 -50
- package/dist/components/section-header.d.ts +8 -12
- package/dist/components/section-header.js +5 -10
- package/dist/components/select.d.ts +44 -16
- package/dist/components/select.js +83 -154
- package/dist/components/selectable-card.d.ts +11 -19
- package/dist/components/selectable-card.js +4 -28
- package/dist/components/separator.d.ts +20 -0
- package/dist/components/separator.js +19 -0
- package/dist/components/setting-row.d.ts +11 -15
- package/dist/components/setting-row.js +10 -23
- package/dist/components/settings-list.d.ts +10 -12
- package/dist/components/settings-list.js +7 -19
- package/dist/components/sheet.d.ts +21 -0
- package/dist/components/sheet.js +16 -0
- package/dist/components/sidebar.d.ts +79 -0
- package/dist/components/sidebar.js +111 -0
- package/dist/components/skeleton.d.ts +14 -20
- package/dist/components/skeleton.js +8 -37
- package/dist/components/slider.d.ts +21 -23
- package/dist/components/slider.js +59 -64
- package/dist/components/sparkline.d.ts +19 -0
- package/dist/components/sparkline.js +32 -0
- package/dist/components/spinner.d.ts +16 -8
- package/dist/components/spinner.js +34 -37
- package/dist/components/star-rating.d.ts +22 -0
- package/dist/components/star-rating.js +25 -0
- package/dist/components/stat.d.ts +33 -0
- package/dist/components/stat.js +29 -0
- package/dist/components/status.d.ts +27 -0
- package/dist/components/status.js +34 -0
- package/dist/components/step-progress.d.ts +13 -6
- package/dist/components/step-progress.js +18 -16
- package/dist/components/summary-bar.d.ts +20 -20
- package/dist/components/summary-bar.js +13 -55
- package/dist/components/switch.d.ts +20 -0
- package/dist/components/switch.js +46 -0
- package/dist/components/table.d.ts +56 -17
- package/dist/components/table.js +59 -58
- package/dist/components/tabs.d.ts +67 -0
- package/dist/components/tabs.js +56 -0
- package/dist/components/testimonial.d.ts +30 -0
- package/dist/components/testimonial.js +36 -0
- package/dist/components/textarea.d.ts +11 -16
- package/dist/components/textarea.js +55 -91
- package/dist/components/tile.d.ts +24 -0
- package/dist/components/tile.js +21 -0
- package/dist/components/time-picker.d.ts +40 -25
- package/dist/components/time-picker.js +185 -203
- package/dist/components/toast.d.ts +63 -0
- package/dist/components/toast.js +132 -0
- package/dist/components/toggle-card-compact.d.ts +15 -5
- package/dist/components/toggle-card-compact.js +19 -86
- package/dist/components/toggle-card.d.ts +11 -2
- package/dist/components/toggle-card.js +8 -77
- package/dist/components/toggle-group.d.ts +21 -59
- package/dist/components/toggle-group.js +31 -80
- package/dist/components/toggle.d.ts +19 -9
- package/dist/components/toggle.js +16 -61
- package/dist/components/tooltip.d.ts +25 -12
- package/dist/components/tooltip.js +15 -88
- package/dist/components/top-navigation.d.ts +33 -0
- package/dist/components/top-navigation.js +85 -0
- package/dist/components/typing-indicator.d.ts +6 -0
- package/dist/components/typing-indicator.js +3 -24
- package/dist/components/whatsapp-chat.d.ts +28 -0
- package/dist/components/whatsapp-chat.js +95 -0
- package/dist/components/whatsapp-message.d.ts +22 -0
- package/dist/components/whatsapp-message.js +34 -0
- package/dist/components/whatsapp-notification.d.ts +27 -0
- package/dist/components/whatsapp-notification.js +73 -0
- package/dist/components/whatsapp-template.d.ts +42 -0
- package/dist/components/whatsapp-template.js +69 -0
- package/dist/icons/index.d.ts +2 -0
- package/dist/icons/index.js +2 -0
- package/dist/icons/pix.d.ts +16 -0
- package/dist/targets/native/components/index.d.ts +0 -2
- package/dist/targets/native/components/index.js +0 -4
- package/dist/targets/native/preset.cjs +0 -1
- package/dist/targets/native/theme.css +58 -60
- package/dist/targets/native/theme.d.ts +58 -60
- package/dist/targets/native/theme.js +58 -60
- package/package.json +34 -12
- package/styles/_primitives.generated.css +40 -0
- package/styles/base.css +12 -18
- package/styles/rds/components-styles.css +11365 -0
- package/styles/rds/components.css +993 -0
- package/styles/rds/foundation.css +74 -0
- package/styles/rds/theme.css +261 -0
- package/styles/rds.css +6 -0
- package/styles/themes/rojao.css +46 -53
- package/dist/components/blocker-card.d.ts +0 -42
- package/dist/components/blocker-card.js +0 -54
- package/dist/components/bottom-sheet.d.ts +0 -31
- package/dist/components/bottom-sheet.js +0 -127
- package/dist/components/chat-bubble.d.ts +0 -16
- package/dist/components/chat-bubble.js +0 -56
- package/dist/components/chips.d.ts +0 -22
- package/dist/components/chips.js +0 -101
- package/dist/components/copilot-hint.d.ts +0 -18
- package/dist/components/copilot-hint.js +0 -72
- package/dist/components/divider.d.ts +0 -20
- package/dist/components/divider.js +0 -50
- package/dist/components/empty-state.d.ts +0 -48
- package/dist/components/empty-state.js +0 -94
- package/dist/components/form-card-header.d.ts +0 -13
- package/dist/components/form-card-header.js +0 -16
- package/dist/components/label.d.ts +0 -16
- package/dist/components/label.js +0 -48
- package/dist/components/menu.d.ts +0 -50
- package/dist/components/menu.js +0 -83
- package/dist/components/modal.d.ts +0 -25
- package/dist/components/modal.js +0 -86
- package/dist/components/notice.d.ts +0 -50
- package/dist/components/notice.js +0 -121
- package/dist/components/page-tabs.d.ts +0 -35
- package/dist/components/page-tabs.js +0 -68
- package/dist/components/paywall-banner.d.ts +0 -37
- package/dist/components/paywall-banner.js +0 -58
- package/dist/components/paywall.d.ts +0 -44
- package/dist/components/paywall.js +0 -65
- package/dist/components/phone-frame.d.ts +0 -9
- package/dist/components/phone-frame.js +0 -19
- package/dist/components/pix-icon.d.ts +0 -8
- package/dist/components/search.d.ts +0 -30
- package/dist/components/search.js +0 -86
- package/dist/components/themed.d.ts +0 -36
- package/dist/components/themed.js +0 -23
- package/dist/components/toaster.d.ts +0 -84
- package/dist/components/toaster.js +0 -290
- package/dist/components/use-dismiss.d.ts +0 -9
- package/dist/components/use-dismiss.js +0 -28
- package/dist/components/use-focus-trap.d.ts +0 -5
- package/dist/components/use-focus-trap.js +0 -54
- package/dist/targets/native/components/paywall-banner.d.ts +0 -11
- package/dist/targets/native/components/paywall-banner.js +0 -55
- package/dist/targets/native/components/paywall.d.ts +0 -18
- package/dist/targets/native/components/paywall.js +0 -71
- /package/dist/{components/pix-icon.js → icons/pix.js} +0 -0
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import "../chunk-ORMEWXMH.js";
|
|
2
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { Lock, AlertTriangle } from "lucide-react";
|
|
4
|
-
const STYLES = {
|
|
5
|
-
warn: {
|
|
6
|
-
container: "border-warning-border bg-warning-soft",
|
|
7
|
-
title: "text-warning-text",
|
|
8
|
-
desc: "text-warning-text/85",
|
|
9
|
-
cta: "bg-surface-default border border-warning-border hover:bg-warning-soft text-warning-text",
|
|
10
|
-
Icon: AlertTriangle,
|
|
11
|
-
iconColor: "text-warning-text"
|
|
12
|
-
},
|
|
13
|
-
blocked: {
|
|
14
|
-
container: "border-danger-border bg-danger-soft",
|
|
15
|
-
title: "text-danger-text",
|
|
16
|
-
desc: "text-danger-text/85",
|
|
17
|
-
cta: "bg-danger text-fg-inverse hover:bg-danger-text",
|
|
18
|
-
Icon: Lock,
|
|
19
|
-
iconColor: "text-danger-text"
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
function DefaultLink({ href, className, children }) {
|
|
23
|
-
return /* @__PURE__ */ jsx("a", { href, className, children });
|
|
24
|
-
}
|
|
25
|
-
function PaywallBanner({
|
|
26
|
-
variant,
|
|
27
|
-
title,
|
|
28
|
-
description,
|
|
29
|
-
ctaLabel = "Ver planos",
|
|
30
|
-
ctaHref,
|
|
31
|
-
onCta,
|
|
32
|
-
linkAs: LinkAs = DefaultLink,
|
|
33
|
-
className = ""
|
|
34
|
-
}) {
|
|
35
|
-
const s = STYLES[variant];
|
|
36
|
-
const Icon = s.Icon;
|
|
37
|
-
const ctaClass = ["text-caption font-semibold px-3 py-1.5 rounded-(--radius-card) shrink-0 transition-colors", s.cta].join(" ");
|
|
38
|
-
const cta = ctaHref ? /* @__PURE__ */ jsxs(LinkAs, { href: ctaHref, className: ctaClass, children: [
|
|
39
|
-
ctaLabel,
|
|
40
|
-
" \u2192"
|
|
41
|
-
] }) : onCta ? /* @__PURE__ */ jsxs("button", { type: "button", onClick: onCta, className: ctaClass, children: [
|
|
42
|
-
ctaLabel,
|
|
43
|
-
" \u2192"
|
|
44
|
-
] }) : null;
|
|
45
|
-
return /* @__PURE__ */ jsxs("div", { className: ["rounded-(--radius-card) border px-4 py-3 flex flex-col sm:flex-row sm:items-center sm:justify-between gap-2", s.container, className].join(" "), children: [
|
|
46
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-start gap-2.5 min-w-0", children: [
|
|
47
|
-
/* @__PURE__ */ jsx(Icon, { size: 18, className: ["shrink-0 mt-0.5", s.iconColor].join(" ") }),
|
|
48
|
-
/* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
|
|
49
|
-
/* @__PURE__ */ jsx("p", { className: ["text-label font-semibold", s.title].join(" "), children: title }),
|
|
50
|
-
/* @__PURE__ */ jsx("div", { className: ["text-caption mt-0.5", s.desc].join(" "), children: description })
|
|
51
|
-
] })
|
|
52
|
-
] }),
|
|
53
|
-
cta
|
|
54
|
-
] });
|
|
55
|
-
}
|
|
56
|
-
export {
|
|
57
|
-
PaywallBanner
|
|
58
|
-
};
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
import { ComponentType, ReactNode } from 'react';
|
|
3
|
-
import { EmptyStateIcon } from './empty-state.js';
|
|
4
|
-
import 'lucide-react';
|
|
5
|
-
|
|
6
|
-
type PaywallReason = 'feature' | 'limit' | 'trial_value';
|
|
7
|
-
type LinkComponent = ComponentType<{
|
|
8
|
-
href: string;
|
|
9
|
-
className?: string;
|
|
10
|
-
onClick?: () => void;
|
|
11
|
-
children: ReactNode;
|
|
12
|
-
}>;
|
|
13
|
-
interface PaywallContentProps {
|
|
14
|
-
/** Ícone por categoria da feature (catalog/channels/commercial/operation/
|
|
15
|
-
* intelligence/billing). Default: lock. */
|
|
16
|
-
icon?: EmptyStateIcon;
|
|
17
|
-
title: string;
|
|
18
|
-
description?: string;
|
|
19
|
-
/** 'feature' → "Disponível no {planLabel}"; 'limit' → "Limite atingido".
|
|
20
|
-
* Sem cor de alerta — friendly, não erro. */
|
|
21
|
-
reason?: PaywallReason;
|
|
22
|
-
/** Rótulo do plano mínimo (ex.: "Essencial") — usado quando reason='feature'. */
|
|
23
|
-
planLabel?: string;
|
|
24
|
-
ctaLabel?: string;
|
|
25
|
-
ctaHref?: string;
|
|
26
|
-
onCta?: () => void;
|
|
27
|
-
/** Componente de link do app (next/link). Sem ele → âncora nativa <a>. */
|
|
28
|
-
linkAs?: LinkComponent;
|
|
29
|
-
}
|
|
30
|
-
/** Visual puro do paywall — compartilhado por PaywallState e PaywallModal. */
|
|
31
|
-
declare function PaywallContent({ icon, title, description, reason, planLabel, ctaLabel, ctaHref, onCta, linkAs: Link, }: PaywallContentProps): react.JSX.Element;
|
|
32
|
-
interface PaywallStateProps extends PaywallContentProps {
|
|
33
|
-
className?: string;
|
|
34
|
-
}
|
|
35
|
-
/** Estado-de-página: ocupa a altura disponível, mesmo visual do modal. */
|
|
36
|
-
declare function PaywallState({ className, ...content }: PaywallStateProps): react.JSX.Element;
|
|
37
|
-
interface PaywallModalProps extends PaywallContentProps {
|
|
38
|
-
open: boolean;
|
|
39
|
-
onClose: () => void;
|
|
40
|
-
}
|
|
41
|
-
/** Modal compacto: o controle de ação fica visível na tela; ao clicar, abre isto. */
|
|
42
|
-
declare function PaywallModal({ open, onClose, ...content }: PaywallModalProps): react.JSX.Element;
|
|
43
|
-
|
|
44
|
-
export { PaywallContent, type PaywallContentProps, PaywallModal, type PaywallModalProps, type PaywallReason, PaywallState, type PaywallStateProps };
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import {
|
|
3
|
-
__objRest,
|
|
4
|
-
__spreadProps,
|
|
5
|
-
__spreadValues
|
|
6
|
-
} from "../chunk-ORMEWXMH.js";
|
|
7
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
-
import { Lock, Sparkles } from "lucide-react";
|
|
9
|
-
import { ICON_MAP } from "./empty-state.js";
|
|
10
|
-
import { Modal } from "./modal.js";
|
|
11
|
-
const CTA_CLASS = "inline-flex items-center justify-center w-full rounded-(--radius-control) px-4 py-3 text-label font-semibold bg-brand-primary text-brand-on-primary hover:bg-brand-hover transition-colors";
|
|
12
|
-
function planLineText(reason, planLabel) {
|
|
13
|
-
if (reason === "trial_value") return "Incluso no seu teste Pro";
|
|
14
|
-
if (reason === "limit") return "Limite atingido";
|
|
15
|
-
return planLabel ? `Dispon\xEDvel no ${planLabel}` : "Fa\xE7a upgrade";
|
|
16
|
-
}
|
|
17
|
-
function PaywallContent({
|
|
18
|
-
icon = "lock",
|
|
19
|
-
title,
|
|
20
|
-
description,
|
|
21
|
-
reason = "feature",
|
|
22
|
-
planLabel,
|
|
23
|
-
ctaLabel = "Ver planos",
|
|
24
|
-
ctaHref,
|
|
25
|
-
onCta,
|
|
26
|
-
linkAs: Link
|
|
27
|
-
}) {
|
|
28
|
-
var _a;
|
|
29
|
-
const Icon = (_a = ICON_MAP[icon]) != null ? _a : Lock;
|
|
30
|
-
const isTrial = reason === "trial_value";
|
|
31
|
-
const cta = ctaHref && Link ? /* @__PURE__ */ jsx(Link, { href: ctaHref, className: CTA_CLASS, onClick: onCta, children: ctaLabel }) : ctaHref ? /* @__PURE__ */ jsx("a", { href: ctaHref, className: CTA_CLASS, onClick: onCta, children: ctaLabel }) : /* @__PURE__ */ jsx("button", { type: "button", className: CTA_CLASS, onClick: onCta, children: ctaLabel });
|
|
32
|
-
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center text-center px-2", children: [
|
|
33
|
-
/* @__PURE__ */ jsxs("div", { className: "relative mb-4 text-fg-secondary", children: [
|
|
34
|
-
/* @__PURE__ */ jsx(Icon, { size: 52, strokeWidth: 1.25 }),
|
|
35
|
-
/* @__PURE__ */ jsx("span", { className: `absolute -bottom-1 -right-1 flex h-6 w-6 items-center justify-center rounded-full ${isTrial ? "bg-amber-500 text-white" : "bg-brand-primary text-brand-on-primary"}`, children: isTrial ? /* @__PURE__ */ jsx(Sparkles, { size: 12, strokeWidth: 2.5 }) : /* @__PURE__ */ jsx(Lock, { size: 12, strokeWidth: 2.5 }) })
|
|
36
|
-
] }),
|
|
37
|
-
/* @__PURE__ */ jsx("span", { className: `inline-flex items-center rounded-full px-2.5 py-1 text-caption font-medium ${isTrial ? "bg-amber-100 text-amber-900" : "bg-surface-raised text-fg-secondary"}`, children: planLineText(reason, planLabel) }),
|
|
38
|
-
/* @__PURE__ */ jsx("p", { className: "text-body font-semibold text-fg-primary mt-3 mb-1.5", children: title }),
|
|
39
|
-
description && /* @__PURE__ */ jsx("p", { className: "text-label text-fg-muted max-w-sm leading-relaxed mb-5", children: description }),
|
|
40
|
-
/* @__PURE__ */ jsx("div", { className: "w-full max-w-xs", children: cta })
|
|
41
|
-
] });
|
|
42
|
-
}
|
|
43
|
-
function PaywallState(_a) {
|
|
44
|
-
var _b = _a, { className = "" } = _b, content = __objRest(_b, ["className"]);
|
|
45
|
-
return /* @__PURE__ */ jsx(
|
|
46
|
-
"div",
|
|
47
|
-
{
|
|
48
|
-
className: ["flex flex-col items-center justify-center min-h-[320px] flex-1 py-10", className].filter(Boolean).join(" "),
|
|
49
|
-
children: /* @__PURE__ */ jsx(PaywallContent, __spreadValues({}, content))
|
|
50
|
-
}
|
|
51
|
-
);
|
|
52
|
-
}
|
|
53
|
-
function PaywallModal(_c) {
|
|
54
|
-
var _d = _c, { open, onClose } = _d, content = __objRest(_d, ["open", "onClose"]);
|
|
55
|
-
return /* @__PURE__ */ jsx(Modal, { open, onClose, size: "sm", children: /* @__PURE__ */ jsx("div", { className: "py-2", children: /* @__PURE__ */ jsx(PaywallContent, __spreadProps(__spreadValues({}, content), { onCta: () => {
|
|
56
|
-
var _a;
|
|
57
|
-
(_a = content.onCta) == null ? void 0 : _a.call(content);
|
|
58
|
-
onClose();
|
|
59
|
-
} })) }) });
|
|
60
|
-
}
|
|
61
|
-
export {
|
|
62
|
-
PaywallContent,
|
|
63
|
-
PaywallModal,
|
|
64
|
-
PaywallState
|
|
65
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import "../chunk-ORMEWXMH.js";
|
|
2
|
-
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
function PhoneFrame({ children, className = "" }) {
|
|
4
|
-
return /* @__PURE__ */ jsx(
|
|
5
|
-
"div",
|
|
6
|
-
{
|
|
7
|
-
className: [
|
|
8
|
-
// rojao-detect-disable over-rounding
|
|
9
|
-
"relative rounded-[2.5rem] border-[6px] border-(--text-primary)",
|
|
10
|
-
"bg-white overflow-hidden shadow-2xl",
|
|
11
|
-
className
|
|
12
|
-
].filter(Boolean).join(" "),
|
|
13
|
-
children: /* @__PURE__ */ jsx("div", { className: "h-full overflow-y-auto overflow-x-hidden scrollbar-none", children })
|
|
14
|
-
}
|
|
15
|
-
);
|
|
16
|
-
}
|
|
17
|
-
export {
|
|
18
|
-
PhoneFrame
|
|
19
|
-
};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
import { InputHTMLAttributes } from 'react';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Search — input dedicado de busca. Ícone leading + botão clear quando tem valor.
|
|
6
|
-
*
|
|
7
|
-
* Uso (uncontrolled):
|
|
8
|
-
* <Search placeholder="Buscar pedidos..." onSearch={q => doSearch(q)} />
|
|
9
|
-
*
|
|
10
|
-
* Uso (controlled):
|
|
11
|
-
* <Search value={q} onChange={e => setQ(e.target.value)} onClear={() => setQ('')} />
|
|
12
|
-
*
|
|
13
|
-
* Disparos de busca:
|
|
14
|
-
* - onSearch(query): debounce automático (default 250ms) ou Enter pressed
|
|
15
|
-
* - onChange: cada keystroke (caso queira live-search direto)
|
|
16
|
-
*/
|
|
17
|
-
interface SearchProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'onChange' | 'size'> {
|
|
18
|
-
onChange?: InputHTMLAttributes<HTMLInputElement>['onChange'];
|
|
19
|
-
/** Callback debounced (250ms) ou em Enter. */
|
|
20
|
-
onSearch?: (query: string) => void;
|
|
21
|
-
/** Callback do botão clear. */
|
|
22
|
-
onClear?: () => void;
|
|
23
|
-
/** Tamanho. default = md. */
|
|
24
|
-
size?: 'sm' | 'md' | 'lg';
|
|
25
|
-
/** Largura full ou hug. default = full. */
|
|
26
|
-
width?: 'full' | 'hug';
|
|
27
|
-
}
|
|
28
|
-
declare const Search: react.ForwardRefExoticComponent<SearchProps & react.RefAttributes<HTMLInputElement>>;
|
|
29
|
-
|
|
30
|
-
export { Search, type SearchProps };
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import {
|
|
3
|
-
__objRest,
|
|
4
|
-
__spreadValues
|
|
5
|
-
} from "../chunk-ORMEWXMH.js";
|
|
6
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
-
import { forwardRef, useEffect, useRef } from "react";
|
|
8
|
-
import { Search as SearchIcon, X } from "lucide-react";
|
|
9
|
-
const SIZE_CLASS = {
|
|
10
|
-
sm: "h-control-sm text-caption pl-8 pr-7",
|
|
11
|
-
md: "h-control-md text-label pl-9 pr-8",
|
|
12
|
-
lg: "h-control-lg text-body pl-10 pr-9"
|
|
13
|
-
};
|
|
14
|
-
const ICON_SIZE = { sm: 14, md: 16, lg: 18 };
|
|
15
|
-
const ICON_POS = { sm: "left-2.5", md: "left-3", lg: "left-3.5" };
|
|
16
|
-
const CLEAR_POS = { sm: "right-1.5", md: "right-2", lg: "right-2.5" };
|
|
17
|
-
const Search = forwardRef(function Search2(_a, ref) {
|
|
18
|
-
var _b = _a, { size = "md", width = "full", onSearch, onClear, onChange, value, className = "" } = _b, rest = __objRest(_b, ["size", "width", "onSearch", "onClear", "onChange", "value", "className"]);
|
|
19
|
-
const hasValue = !!(value != null ? value : "");
|
|
20
|
-
const debounceRef = useRef(null);
|
|
21
|
-
useEffect(() => () => {
|
|
22
|
-
if (debounceRef.current) clearTimeout(debounceRef.current);
|
|
23
|
-
}, []);
|
|
24
|
-
function handleChange(e) {
|
|
25
|
-
onChange == null ? void 0 : onChange(e);
|
|
26
|
-
if (onSearch) {
|
|
27
|
-
if (debounceRef.current) clearTimeout(debounceRef.current);
|
|
28
|
-
debounceRef.current = setTimeout(() => onSearch(e.target.value), 250);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
function handleClear() {
|
|
32
|
-
if (debounceRef.current) clearTimeout(debounceRef.current);
|
|
33
|
-
onClear == null ? void 0 : onClear();
|
|
34
|
-
}
|
|
35
|
-
return /* @__PURE__ */ jsxs("div", { className: ["relative inline-flex", width === "full" ? "w-full" : "w-auto"].join(" "), children: [
|
|
36
|
-
/* @__PURE__ */ jsx(
|
|
37
|
-
SearchIcon,
|
|
38
|
-
{
|
|
39
|
-
size: ICON_SIZE[size],
|
|
40
|
-
className: ["absolute top-1/2 -translate-y-1/2 text-fg-muted pointer-events-none", ICON_POS[size]].join(" ")
|
|
41
|
-
}
|
|
42
|
-
),
|
|
43
|
-
/* @__PURE__ */ jsx(
|
|
44
|
-
"input",
|
|
45
|
-
__spreadValues({
|
|
46
|
-
ref,
|
|
47
|
-
type: "search",
|
|
48
|
-
role: "searchbox",
|
|
49
|
-
value,
|
|
50
|
-
onChange: handleChange,
|
|
51
|
-
onKeyDown: (e) => {
|
|
52
|
-
if (e.key === "Enter") {
|
|
53
|
-
if (debounceRef.current) clearTimeout(debounceRef.current);
|
|
54
|
-
onSearch == null ? void 0 : onSearch(e.target.value);
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
className: [
|
|
58
|
-
"w-full rounded-(--radius-control) bg-surface-default text-fg-primary placeholder:text-fg-placeholder",
|
|
59
|
-
"border border-stroke-control transition-colors outline-none",
|
|
60
|
-
"focus:border-stroke-focus focus:ring-2 focus:ring-stroke-focus/20",
|
|
61
|
-
"[&::-webkit-search-cancel-button]:hidden",
|
|
62
|
-
SIZE_CLASS[size],
|
|
63
|
-
className
|
|
64
|
-
].join(" ")
|
|
65
|
-
}, rest)
|
|
66
|
-
),
|
|
67
|
-
hasValue && /* @__PURE__ */ jsx(
|
|
68
|
-
"button",
|
|
69
|
-
{
|
|
70
|
-
type: "button",
|
|
71
|
-
onClick: handleClear,
|
|
72
|
-
"aria-label": "Limpar busca",
|
|
73
|
-
className: [
|
|
74
|
-
"absolute top-1/2 -translate-y-1/2 inline-flex items-center justify-center",
|
|
75
|
-
"rounded-(--radius-control) text-fg-muted hover:text-fg-primary transition-colors",
|
|
76
|
-
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-stroke-focus",
|
|
77
|
-
CLEAR_POS[size]
|
|
78
|
-
].join(" "),
|
|
79
|
-
children: /* @__PURE__ */ jsx(X, { size: ICON_SIZE[size] - 2 })
|
|
80
|
-
}
|
|
81
|
-
)
|
|
82
|
-
] });
|
|
83
|
-
});
|
|
84
|
-
export {
|
|
85
|
-
Search
|
|
86
|
-
};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
import { HTMLAttributes, ReactNode } from 'react';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* className for a brand theme: `theme-<name>` (+ ` dark`). The DS theme CSS is
|
|
6
|
-
* class-scoped, so apply this wherever you want the theme to take effect — on
|
|
7
|
-
* `<html>`/`<body>` for the whole app, or via <Themed> for a subtree.
|
|
8
|
-
*
|
|
9
|
-
* <html className={themeClass('padaria', isDark)}>
|
|
10
|
-
*/
|
|
11
|
-
declare const themeClass: (theme: string, dark?: boolean) => string;
|
|
12
|
-
interface ThemedProps extends HTMLAttributes<HTMLDivElement> {
|
|
13
|
-
/** Brand theme name → `.theme-<name>` (the served sheet's selector). */
|
|
14
|
-
theme: string;
|
|
15
|
-
/** Apply dark mode (`.dark`). */
|
|
16
|
-
dark?: boolean;
|
|
17
|
-
/** Merge the theme class onto the single child element instead of wrapping a
|
|
18
|
-
* `<div>` (no extra DOM node — apply the theme to a `<main>`, `<section>`…). */
|
|
19
|
-
asChild?: boolean;
|
|
20
|
-
children: ReactNode;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Scopes a brand theme to its subtree via the `.theme-<name>` class. Because the
|
|
24
|
-
* theme CSS is class-scoped (not :root), this can NEST — different subtrees can
|
|
25
|
-
* render different themes on the same page. For the whole app, prefer putting
|
|
26
|
-
* `themeClass()` on `<html>` instead of wrapping everything in a div.
|
|
27
|
-
*
|
|
28
|
-
* <Themed theme="padaria">…</Themed>
|
|
29
|
-
* <Themed theme="pet" dark>…</Themed>
|
|
30
|
-
* <Themed theme="cafe" asChild><main>…</main></Themed>
|
|
31
|
-
*
|
|
32
|
-
* Pair with your theme sheet + base.css.
|
|
33
|
-
*/
|
|
34
|
-
declare function Themed({ theme, dark, asChild, className, children, ...rest }: ThemedProps): react.JSX.Element;
|
|
35
|
-
|
|
36
|
-
export { Themed, type ThemedProps, themeClass };
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
__objRest,
|
|
3
|
-
__spreadProps,
|
|
4
|
-
__spreadValues
|
|
5
|
-
} from "../chunk-ORMEWXMH.js";
|
|
6
|
-
import { jsx } from "react/jsx-runtime";
|
|
7
|
-
import { cloneElement, isValidElement } from "react";
|
|
8
|
-
const themeClass = (theme, dark = false) => `theme-${theme}${dark ? " dark" : ""}`;
|
|
9
|
-
function Themed(_a) {
|
|
10
|
-
var _b = _a, { theme, dark = false, asChild = false, className, children } = _b, rest = __objRest(_b, ["theme", "dark", "asChild", "className", "children"]);
|
|
11
|
-
const cls = themeClass(theme, dark);
|
|
12
|
-
if (asChild && isValidElement(children)) {
|
|
13
|
-
const child = children;
|
|
14
|
-
return cloneElement(child, __spreadProps(__spreadValues({}, rest), {
|
|
15
|
-
className: [cls, child.props.className, className].filter(Boolean).join(" ")
|
|
16
|
-
}));
|
|
17
|
-
}
|
|
18
|
-
return /* @__PURE__ */ jsx("div", __spreadProps(__spreadValues({ className: [cls, className].filter(Boolean).join(" ") }, rest), { children }));
|
|
19
|
-
}
|
|
20
|
-
export {
|
|
21
|
-
Themed,
|
|
22
|
-
themeClass
|
|
23
|
-
};
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Toaster — comportamento de snackbar M3, visual de notification card.
|
|
5
|
-
*
|
|
6
|
-
* Comportamento (M3):
|
|
7
|
-
* • Um por vez (novo substitui o anterior).
|
|
8
|
-
* • Action label OU close icon — não os dois.
|
|
9
|
-
* • Duração: 4s sem action, 7s com action; persistente em loading.
|
|
10
|
-
* • Posição default: bottom-center.
|
|
11
|
-
* • Motion: 150ms ease-out enter, 75ms ease-in exit, slide vertical + fade.
|
|
12
|
-
* • Não rouba foco. aria-live="polite" default, "assertive" pra erro.
|
|
13
|
-
*
|
|
14
|
-
* Visual (notification card):
|
|
15
|
-
* • Card escuro nos DOIS themes (inverse surface, tokens --toast-*).
|
|
16
|
-
* • Feedback variants: tint da cor semântica entra pela esquerda (gradiente)
|
|
17
|
-
* + badge circular sólido com halo — ícone em tom escuro da própria cor.
|
|
18
|
-
* • Título (message) + description opcional em --toast-text-muted.
|
|
19
|
-
* • default/loading: card neutro sem tint nem badge.
|
|
20
|
-
*
|
|
21
|
-
* API:
|
|
22
|
-
* import { toast } from '@rojaostudio/ds/components';
|
|
23
|
-
* toast('Salvo');
|
|
24
|
-
* toast.success('Salvo', { description: 'Pedido #1042 confirmado.' });
|
|
25
|
-
* toast.error('...'), toast.warning('...'), toast.info('...'), toast.loading('...');
|
|
26
|
-
* toast.dismiss(id?);
|
|
27
|
-
* toast.promise(p, { loading, success, error });
|
|
28
|
-
*/
|
|
29
|
-
type ToastVariant = 'default' | 'success' | 'error' | 'warning' | 'info' | 'loading';
|
|
30
|
-
type ToastPosition = 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right';
|
|
31
|
-
interface ToastOptions {
|
|
32
|
-
variant?: ToastVariant;
|
|
33
|
-
/** Linha secundária — message vira título (semibold) quando presente. */
|
|
34
|
-
description?: string;
|
|
35
|
-
/** ms até auto-dismiss. Omitido → fallback do Material (1500 curto · 2750 com ação/erro · 0 loading). */
|
|
36
|
-
duration?: number;
|
|
37
|
-
action?: {
|
|
38
|
-
label: string;
|
|
39
|
-
onClick: () => void;
|
|
40
|
-
};
|
|
41
|
-
id?: string;
|
|
42
|
-
}
|
|
43
|
-
interface ToastFn {
|
|
44
|
-
(message: string, options?: ToastOptions): string;
|
|
45
|
-
success: (msg: string, opts?: Omit<ToastOptions, 'variant'>) => string;
|
|
46
|
-
error: (msg: string, opts?: Omit<ToastOptions, 'variant'>) => string;
|
|
47
|
-
warning: (msg: string, opts?: Omit<ToastOptions, 'variant'>) => string;
|
|
48
|
-
info: (msg: string, opts?: Omit<ToastOptions, 'variant'>) => string;
|
|
49
|
-
loading: (msg: string, opts?: Omit<ToastOptions, 'variant' | 'duration'>) => string;
|
|
50
|
-
dismiss: (id?: string) => void;
|
|
51
|
-
promise: <T>(promise: Promise<T>, msgs: {
|
|
52
|
-
loading: string;
|
|
53
|
-
success: string | ((data: T) => string);
|
|
54
|
-
error: string | ((err: unknown) => string);
|
|
55
|
-
}) => Promise<T>;
|
|
56
|
-
}
|
|
57
|
-
declare const toast: ToastFn;
|
|
58
|
-
interface ToastVisualProps {
|
|
59
|
-
message: string;
|
|
60
|
-
/** Linha secundária — message vira título (semibold) quando presente. */
|
|
61
|
-
description?: string;
|
|
62
|
-
variant?: ToastVariant;
|
|
63
|
-
action?: {
|
|
64
|
-
label: string;
|
|
65
|
-
onClick?: () => void;
|
|
66
|
-
};
|
|
67
|
-
/** Quando true, renderiza a animação de entrada. default = false. */
|
|
68
|
-
animate?: boolean;
|
|
69
|
-
/** Top vs bottom afeta a direção da animação enter. default = 'bottom'. */
|
|
70
|
-
origin?: 'top' | 'bottom';
|
|
71
|
-
/** Mostra o botão de close (X). default = true se não houver action; M3
|
|
72
|
-
* prescreve action OU close, não ambos. */
|
|
73
|
-
dismissible?: boolean;
|
|
74
|
-
/** Handler do close (opcional). Sem handler, o X aparece mas é decorativo. */
|
|
75
|
-
onDismiss?: () => void;
|
|
76
|
-
}
|
|
77
|
-
declare function ToastVisual({ message, description, variant, action, animate, origin, dismissible, onDismiss, }: ToastVisualProps): react.JSX.Element;
|
|
78
|
-
interface ToasterProps {
|
|
79
|
-
/** Posição. default = bottom-center (M3 recomenda bottom). */
|
|
80
|
-
position?: ToastPosition;
|
|
81
|
-
}
|
|
82
|
-
declare function Toaster({ position }?: ToasterProps): react.ReactPortal | null;
|
|
83
|
-
|
|
84
|
-
export { type ToastOptions, type ToastPosition, type ToastVariant, ToastVisual, type ToastVisualProps, Toaster, type ToasterProps, toast };
|