@rojaostudio/ds 1.0.2 → 2.0.0-next.1
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 -52
- package/dist/components/index.js +190 -74
- 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,127 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import "../chunk-ORMEWXMH.js";
|
|
3
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
-
import { forwardRef, useEffect, useImperativeHandle, useRef, useState } from "react";
|
|
5
|
-
import { createPortal } from "react-dom";
|
|
6
|
-
import { X } from "lucide-react";
|
|
7
|
-
import { useFocusTrap } from "./use-focus-trap.js";
|
|
8
|
-
const SNAP_HEIGHT = {
|
|
9
|
-
auto: "max-h-[90dvh]",
|
|
10
|
-
half: "h-1/2",
|
|
11
|
-
full: "h-[95dvh]"
|
|
12
|
-
};
|
|
13
|
-
const BottomSheet = forwardRef(function BottomSheet2({
|
|
14
|
-
open,
|
|
15
|
-
onClose,
|
|
16
|
-
title,
|
|
17
|
-
children,
|
|
18
|
-
snap = "auto",
|
|
19
|
-
hideHeader = false,
|
|
20
|
-
closeOnBackdrop = true,
|
|
21
|
-
className = ""
|
|
22
|
-
}, ref) {
|
|
23
|
-
const [mounted, setMounted] = useState(false);
|
|
24
|
-
const sheetRef = useFocusTrap(open);
|
|
25
|
-
useImperativeHandle(ref, () => sheetRef.current);
|
|
26
|
-
const dragStartY = useRef(0);
|
|
27
|
-
const handleDragStart = (e) => {
|
|
28
|
-
var _a, _b;
|
|
29
|
-
dragStartY.current = (_b = (_a = e.touches[0]) == null ? void 0 : _a.clientY) != null ? _b : 0;
|
|
30
|
-
};
|
|
31
|
-
const handleDragMove = (e) => {
|
|
32
|
-
var _a, _b;
|
|
33
|
-
const container = (_a = sheetRef.current) == null ? void 0 : _a.querySelector("[data-scroll-container]");
|
|
34
|
-
if (container && container.scrollTop > 0) return;
|
|
35
|
-
const y = (_b = e.touches[0]) == null ? void 0 : _b.clientY;
|
|
36
|
-
if (y !== void 0 && y - dragStartY.current > 80) onClose();
|
|
37
|
-
};
|
|
38
|
-
useEffect(() => {
|
|
39
|
-
setMounted(true);
|
|
40
|
-
}, []);
|
|
41
|
-
useEffect(() => {
|
|
42
|
-
if (!open) return;
|
|
43
|
-
const handler = (e) => {
|
|
44
|
-
if (e.key === "Escape") onClose();
|
|
45
|
-
};
|
|
46
|
-
document.addEventListener("keydown", handler);
|
|
47
|
-
document.body.style.overflow = "hidden";
|
|
48
|
-
return () => {
|
|
49
|
-
document.removeEventListener("keydown", handler);
|
|
50
|
-
document.body.style.overflow = "";
|
|
51
|
-
};
|
|
52
|
-
}, [open, onClose]);
|
|
53
|
-
if (!mounted || !open) return null;
|
|
54
|
-
return createPortal(
|
|
55
|
-
/* @__PURE__ */ jsxs(
|
|
56
|
-
"div",
|
|
57
|
-
{
|
|
58
|
-
role: "dialog",
|
|
59
|
-
"aria-modal": "true",
|
|
60
|
-
"aria-labelledby": title ? "bottom-sheet-title" : void 0,
|
|
61
|
-
className: "fixed inset-0 z-[1000] flex items-end justify-center",
|
|
62
|
-
children: [
|
|
63
|
-
/* @__PURE__ */ jsx(
|
|
64
|
-
"div",
|
|
65
|
-
{
|
|
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
|
-
}
|
|
118
|
-
)
|
|
119
|
-
]
|
|
120
|
-
}
|
|
121
|
-
),
|
|
122
|
-
document.body
|
|
123
|
-
);
|
|
124
|
-
});
|
|
125
|
-
export {
|
|
126
|
-
BottomSheet
|
|
127
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
import { MouseEvent, ReactNode } from 'react';
|
|
3
|
-
|
|
4
|
-
type ChatBubbleVariant = 'bot' | 'user';
|
|
5
|
-
type ChatBubbleState = 'sent' | 'editing' | 'pending';
|
|
6
|
-
interface ChatBubbleProps {
|
|
7
|
-
variant: ChatBubbleVariant;
|
|
8
|
-
state?: ChatBubbleState;
|
|
9
|
-
dim?: boolean;
|
|
10
|
-
onClick?: (e: MouseEvent<HTMLDivElement>) => void;
|
|
11
|
-
children: ReactNode;
|
|
12
|
-
ariaLabel?: string;
|
|
13
|
-
}
|
|
14
|
-
declare function ChatBubble({ variant, state, dim, onClick, children, ariaLabel, }: ChatBubbleProps): react.JSX.Element;
|
|
15
|
-
|
|
16
|
-
export { ChatBubble, type ChatBubbleProps, type ChatBubbleState, type ChatBubbleVariant };
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import "../chunk-ORMEWXMH.js";
|
|
3
|
-
import { jsx } from "react/jsx-runtime";
|
|
4
|
-
function ChatBubble({
|
|
5
|
-
variant,
|
|
6
|
-
state = "sent",
|
|
7
|
-
dim = false,
|
|
8
|
-
onClick,
|
|
9
|
-
children,
|
|
10
|
-
ariaLabel
|
|
11
|
-
}) {
|
|
12
|
-
const isBot = variant === "bot";
|
|
13
|
-
const interactive = !!onClick && !dim;
|
|
14
|
-
const wrapperClass = [
|
|
15
|
-
"w-full flex",
|
|
16
|
-
isBot ? "justify-start" : "justify-end"
|
|
17
|
-
].join(" ");
|
|
18
|
-
const bubbleClass = [
|
|
19
|
-
"inline-block max-w-[var(--chat-bubble-max-width)]",
|
|
20
|
-
"px-[var(--chat-bubble-padding-x)] py-[var(--chat-bubble-padding-y)]",
|
|
21
|
-
"text-[length:var(--font-size-body)] leading-[var(--line-height-body)]",
|
|
22
|
-
"transition-all",
|
|
23
|
-
isBot ? "bg-[var(--chat-bubble-bot-bg)] text-[var(--chat-bubble-bot-text)]" : "bg-[var(--chat-bubble-user-bg)] text-[var(--chat-bubble-user-text)]",
|
|
24
|
-
dim ? "opacity-[var(--chat-bubble-dim-opacity)] pointer-events-none" : "",
|
|
25
|
-
state === "editing" ? "ring-2 ring-[var(--chat-bubble-editing-border)] ring-offset-1" : "",
|
|
26
|
-
interactive ? "cursor-pointer hover:brightness-95" : ""
|
|
27
|
-
].filter(Boolean).join(" ");
|
|
28
|
-
const radiusStyle = isBot ? {
|
|
29
|
-
borderRadius: "var(--chat-bubble-radius-lg)",
|
|
30
|
-
borderTopLeftRadius: "var(--chat-bubble-radius-sm)"
|
|
31
|
-
} : {
|
|
32
|
-
borderRadius: "var(--chat-bubble-radius-lg)",
|
|
33
|
-
borderBottomRightRadius: "var(--chat-bubble-radius-sm)"
|
|
34
|
-
};
|
|
35
|
-
return /* @__PURE__ */ jsx("div", { className: wrapperClass, children: /* @__PURE__ */ jsx(
|
|
36
|
-
"div",
|
|
37
|
-
{
|
|
38
|
-
className: bubbleClass,
|
|
39
|
-
style: radiusStyle,
|
|
40
|
-
onClick: interactive ? onClick : void 0,
|
|
41
|
-
role: interactive ? "button" : void 0,
|
|
42
|
-
tabIndex: interactive ? 0 : void 0,
|
|
43
|
-
onKeyDown: interactive ? (e) => {
|
|
44
|
-
if (e.key === "Enter" || e.key === " ") {
|
|
45
|
-
e.preventDefault();
|
|
46
|
-
onClick == null ? void 0 : onClick(e);
|
|
47
|
-
}
|
|
48
|
-
} : void 0,
|
|
49
|
-
"aria-label": ariaLabel,
|
|
50
|
-
children
|
|
51
|
-
}
|
|
52
|
-
) });
|
|
53
|
-
}
|
|
54
|
-
export {
|
|
55
|
-
ChatBubble
|
|
56
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
import { ReactNode, MouseEvent } from 'react';
|
|
3
|
-
|
|
4
|
-
interface ChipProps {
|
|
5
|
-
children: ReactNode;
|
|
6
|
-
onClick?: (e: MouseEvent<HTMLButtonElement | HTMLDivElement>) => void;
|
|
7
|
-
/** Leading slot — ícone, avatar, qualquer ReactNode. */
|
|
8
|
-
leading?: ReactNode;
|
|
9
|
-
disabled?: boolean;
|
|
10
|
-
className?: string;
|
|
11
|
-
/** Sem borda, background discreto. */
|
|
12
|
-
subtle?: boolean;
|
|
13
|
-
/** Destaca com cor primária. Usado com onRemove. */
|
|
14
|
-
selected?: boolean;
|
|
15
|
-
/** Exibe botão X de remover. Implica estrutura de div (não button). */
|
|
16
|
-
onRemove?: () => void;
|
|
17
|
-
/** Border tracejado + brand-secondary. Sinaliza sugestão de IA. */
|
|
18
|
-
highlight?: boolean;
|
|
19
|
-
}
|
|
20
|
-
declare function Chip({ children, onClick, leading, disabled, className, subtle, selected, onRemove, highlight, }: ChipProps): react.JSX.Element;
|
|
21
|
-
|
|
22
|
-
export { Chip, type ChipProps };
|
package/dist/components/chips.js
DELETED
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import "../chunk-ORMEWXMH.js";
|
|
2
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { X } from "lucide-react";
|
|
4
|
-
const BASE = "inline-flex items-center gap-1.5 px-3 h-7 text-caption font-medium rounded-full border transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-stroke-focus disabled:cursor-not-allowed disabled:opacity-50";
|
|
5
|
-
function Chip({
|
|
6
|
-
children,
|
|
7
|
-
onClick,
|
|
8
|
-
leading,
|
|
9
|
-
disabled = false,
|
|
10
|
-
className = "",
|
|
11
|
-
subtle = false,
|
|
12
|
-
selected = false,
|
|
13
|
-
onRemove,
|
|
14
|
-
highlight = false
|
|
15
|
-
}) {
|
|
16
|
-
if (onRemove !== void 0 || selected) {
|
|
17
|
-
let handleKey2 = function(e) {
|
|
18
|
-
if (!interactive) return;
|
|
19
|
-
if (e.key === "Enter" || e.key === " ") {
|
|
20
|
-
e.preventDefault();
|
|
21
|
-
onClick == null ? void 0 : onClick(e);
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
var handleKey = handleKey2;
|
|
25
|
-
const interactive = !!onClick;
|
|
26
|
-
return /* @__PURE__ */ jsxs(
|
|
27
|
-
"div",
|
|
28
|
-
{
|
|
29
|
-
role: interactive ? "button" : void 0,
|
|
30
|
-
tabIndex: interactive && !disabled ? 0 : void 0,
|
|
31
|
-
onClick: disabled ? void 0 : onClick,
|
|
32
|
-
onKeyDown: handleKey2,
|
|
33
|
-
className: [
|
|
34
|
-
BASE,
|
|
35
|
-
onRemove ? "pr-1.5" : "",
|
|
36
|
-
selected ? "border-brand-primary bg-brand-primary text-brand-on-primary" : "border-stroke-default bg-surface-default text-fg-primary",
|
|
37
|
-
interactive && !disabled ? "cursor-pointer hover:bg-surface-raised" : "",
|
|
38
|
-
disabled ? "opacity-50 cursor-not-allowed" : "",
|
|
39
|
-
className
|
|
40
|
-
].join(" "),
|
|
41
|
-
children: [
|
|
42
|
-
leading && /* @__PURE__ */ jsx("span", { className: "shrink-0 [&_svg]:size-3.5", children: leading }),
|
|
43
|
-
/* @__PURE__ */ jsx("span", { className: "truncate", children }),
|
|
44
|
-
onRemove && /* @__PURE__ */ jsx(
|
|
45
|
-
"button",
|
|
46
|
-
{
|
|
47
|
-
type: "button",
|
|
48
|
-
onClick: (e) => {
|
|
49
|
-
e.stopPropagation();
|
|
50
|
-
onRemove();
|
|
51
|
-
},
|
|
52
|
-
"aria-label": "Remover",
|
|
53
|
-
disabled,
|
|
54
|
-
className: "inline-flex items-center justify-center size-4 rounded-full opacity-60 hover:opacity-100 ml-0.5 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-stroke-focus transition-opacity",
|
|
55
|
-
children: /* @__PURE__ */ jsx(X, { size: 12 })
|
|
56
|
-
}
|
|
57
|
-
)
|
|
58
|
-
]
|
|
59
|
-
}
|
|
60
|
-
);
|
|
61
|
-
}
|
|
62
|
-
if (highlight) {
|
|
63
|
-
return /* @__PURE__ */ jsxs(
|
|
64
|
-
"button",
|
|
65
|
-
{
|
|
66
|
-
type: "button",
|
|
67
|
-
onClick,
|
|
68
|
-
disabled,
|
|
69
|
-
className: [
|
|
70
|
-
BASE,
|
|
71
|
-
"border-dashed border-brand-secondary bg-brand-secondary/10 text-brand-secondary hover:bg-brand-secondary/20",
|
|
72
|
-
className
|
|
73
|
-
].join(" "),
|
|
74
|
-
children: [
|
|
75
|
-
leading && /* @__PURE__ */ jsx("span", { className: "shrink-0 [&_svg]:size-3.5", children: leading }),
|
|
76
|
-
children
|
|
77
|
-
]
|
|
78
|
-
}
|
|
79
|
-
);
|
|
80
|
-
}
|
|
81
|
-
return /* @__PURE__ */ jsxs(
|
|
82
|
-
"button",
|
|
83
|
-
{
|
|
84
|
-
type: "button",
|
|
85
|
-
onClick,
|
|
86
|
-
disabled,
|
|
87
|
-
className: [
|
|
88
|
-
BASE,
|
|
89
|
-
subtle ? "border-transparent bg-surface-raised text-fg-secondary hover:bg-stroke-default hover:text-fg-primary" : "border-stroke-default bg-surface-default text-fg-primary hover:bg-surface-raised",
|
|
90
|
-
className
|
|
91
|
-
].join(" "),
|
|
92
|
-
children: [
|
|
93
|
-
leading && /* @__PURE__ */ jsx("span", { className: "shrink-0 [&_svg]:size-3.5", children: leading }),
|
|
94
|
-
children
|
|
95
|
-
]
|
|
96
|
-
}
|
|
97
|
-
);
|
|
98
|
-
}
|
|
99
|
-
export {
|
|
100
|
-
Chip
|
|
101
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
|
|
3
|
-
type CopilotHintPriority = 'high' | 'medium' | 'low';
|
|
4
|
-
interface CopilotHintProps {
|
|
5
|
-
id: string;
|
|
6
|
-
title: string;
|
|
7
|
-
description?: string;
|
|
8
|
-
cta?: {
|
|
9
|
-
label: string;
|
|
10
|
-
href: string;
|
|
11
|
-
};
|
|
12
|
-
dismissible?: boolean;
|
|
13
|
-
priority?: CopilotHintPriority;
|
|
14
|
-
className?: string;
|
|
15
|
-
}
|
|
16
|
-
declare function CopilotHint({ id, title, description, cta, dismissible, priority, className, }: CopilotHintProps): react.JSX.Element | null;
|
|
17
|
-
|
|
18
|
-
export { CopilotHint, type CopilotHintPriority, type CopilotHintProps };
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import "../chunk-ORMEWXMH.js";
|
|
3
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
-
import { useState, useEffect } from "react";
|
|
5
|
-
function CopilotHint({
|
|
6
|
-
id,
|
|
7
|
-
title,
|
|
8
|
-
description,
|
|
9
|
-
cta,
|
|
10
|
-
dismissible = true,
|
|
11
|
-
priority = "medium",
|
|
12
|
-
className = ""
|
|
13
|
-
}) {
|
|
14
|
-
const [dismissed, setDismissed] = useState(true);
|
|
15
|
-
useEffect(() => {
|
|
16
|
-
setDismissed(localStorage.getItem(`copilot-dismissed:${id}`) === "1");
|
|
17
|
-
}, [id]);
|
|
18
|
-
if (dismissed) return null;
|
|
19
|
-
function dismiss() {
|
|
20
|
-
localStorage.setItem(`copilot-dismissed:${id}`, "1");
|
|
21
|
-
setDismissed(true);
|
|
22
|
-
}
|
|
23
|
-
return /* @__PURE__ */ jsxs(
|
|
24
|
-
"div",
|
|
25
|
-
{
|
|
26
|
-
className: [
|
|
27
|
-
"rounded-(--radius-card) border bg-(--surface-raised) p-4 flex gap-3",
|
|
28
|
-
priority === "high" ? "border-brand-primary" : "border-stroke-default",
|
|
29
|
-
className
|
|
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
|
-
}
|
|
68
|
-
);
|
|
69
|
-
}
|
|
70
|
-
export {
|
|
71
|
-
CopilotHint
|
|
72
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Divider — separador visual horizontal ou vertical.
|
|
5
|
-
*
|
|
6
|
-
* Uso:
|
|
7
|
-
* <Divider /> // horizontal subtle
|
|
8
|
-
* <Divider orientation="vertical" /> // vertical
|
|
9
|
-
* <Divider variant="strong" /> // mais visível
|
|
10
|
-
* <Divider><span>OU</span></Divider> // com label centralizado
|
|
11
|
-
*/
|
|
12
|
-
interface DividerProps {
|
|
13
|
-
orientation?: 'horizontal' | 'vertical';
|
|
14
|
-
variant?: 'subtle' | 'default' | 'strong';
|
|
15
|
-
className?: string;
|
|
16
|
-
children?: React.ReactNode;
|
|
17
|
-
}
|
|
18
|
-
declare function Divider({ orientation, variant, className, children, }: DividerProps): react.JSX.Element;
|
|
19
|
-
|
|
20
|
-
export { Divider, type DividerProps };
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import "../chunk-ORMEWXMH.js";
|
|
2
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
const COLOR_BY_VARIANT = {
|
|
4
|
-
subtle: "bg-stroke-subtle",
|
|
5
|
-
default: "bg-stroke-default",
|
|
6
|
-
strong: "bg-stroke-strong"
|
|
7
|
-
};
|
|
8
|
-
function Divider({
|
|
9
|
-
orientation = "horizontal",
|
|
10
|
-
variant = "default",
|
|
11
|
-
className = "",
|
|
12
|
-
children
|
|
13
|
-
}) {
|
|
14
|
-
if (orientation === "vertical") {
|
|
15
|
-
return /* @__PURE__ */ jsx(
|
|
16
|
-
"div",
|
|
17
|
-
{
|
|
18
|
-
role: "separator",
|
|
19
|
-
"aria-orientation": "vertical",
|
|
20
|
-
className: ["shrink-0 self-stretch w-px", COLOR_BY_VARIANT[variant], className].join(" ")
|
|
21
|
-
}
|
|
22
|
-
);
|
|
23
|
-
}
|
|
24
|
-
if (children) {
|
|
25
|
-
return /* @__PURE__ */ jsxs(
|
|
26
|
-
"div",
|
|
27
|
-
{
|
|
28
|
-
role: "separator",
|
|
29
|
-
"aria-orientation": "horizontal",
|
|
30
|
-
className: ["flex items-center gap-3 my-2", className].join(" "),
|
|
31
|
-
children: [
|
|
32
|
-
/* @__PURE__ */ jsx("span", { className: ["flex-1 h-px", COLOR_BY_VARIANT[variant]].join(" ") }),
|
|
33
|
-
/* @__PURE__ */ jsx("span", { className: "text-caption text-fg-muted shrink-0", children }),
|
|
34
|
-
/* @__PURE__ */ jsx("span", { className: ["flex-1 h-px", COLOR_BY_VARIANT[variant]].join(" ") })
|
|
35
|
-
]
|
|
36
|
-
}
|
|
37
|
-
);
|
|
38
|
-
}
|
|
39
|
-
return /* @__PURE__ */ jsx(
|
|
40
|
-
"hr",
|
|
41
|
-
{
|
|
42
|
-
role: "separator",
|
|
43
|
-
"aria-orientation": "horizontal",
|
|
44
|
-
className: ["border-0 h-px my-2", COLOR_BY_VARIANT[variant], className].join(" ")
|
|
45
|
-
}
|
|
46
|
-
);
|
|
47
|
-
}
|
|
48
|
-
export {
|
|
49
|
-
Divider
|
|
50
|
-
};
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
3
|
-
import * as lucide_react from 'lucide-react';
|
|
4
|
-
|
|
5
|
-
declare const ICON_MAP: {
|
|
6
|
-
readonly box: react.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & react.RefAttributes<SVGSVGElement>>;
|
|
7
|
-
readonly service: react.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & react.RefAttributes<SVGSVGElement>>;
|
|
8
|
-
readonly kit: react.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & react.RefAttributes<SVGSVGElement>>;
|
|
9
|
-
readonly input: react.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & react.RefAttributes<SVGSVGElement>>;
|
|
10
|
-
readonly order: react.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & react.RefAttributes<SVGSVGElement>>;
|
|
11
|
-
readonly customer: react.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & react.RefAttributes<SVGSVGElement>>;
|
|
12
|
-
readonly finance: react.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & react.RefAttributes<SVGSVGElement>>;
|
|
13
|
-
readonly schedule: react.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & react.RefAttributes<SVGSVGElement>>;
|
|
14
|
-
readonly inventory: react.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & react.RefAttributes<SVGSVGElement>>;
|
|
15
|
-
readonly price: react.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & react.RefAttributes<SVGSVGElement>>;
|
|
16
|
-
readonly category: react.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & react.RefAttributes<SVGSVGElement>>;
|
|
17
|
-
readonly generic: react.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & react.RefAttributes<SVGSVGElement>>;
|
|
18
|
-
readonly search: react.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & react.RefAttributes<SVGSVGElement>>;
|
|
19
|
-
readonly lock: react.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & react.RefAttributes<SVGSVGElement>>;
|
|
20
|
-
readonly catalog: react.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & react.RefAttributes<SVGSVGElement>>;
|
|
21
|
-
readonly channels: react.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & react.RefAttributes<SVGSVGElement>>;
|
|
22
|
-
readonly commercial: react.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & react.RefAttributes<SVGSVGElement>>;
|
|
23
|
-
readonly operation: react.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & react.RefAttributes<SVGSVGElement>>;
|
|
24
|
-
readonly intelligence: react.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & react.RefAttributes<SVGSVGElement>>;
|
|
25
|
-
readonly billing: react.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & react.RefAttributes<SVGSVGElement>>;
|
|
26
|
-
};
|
|
27
|
-
type EmptyStateIcon = keyof typeof ICON_MAP;
|
|
28
|
-
interface EmptyStateCta {
|
|
29
|
-
label: string;
|
|
30
|
-
href?: string;
|
|
31
|
-
onClick?: () => void;
|
|
32
|
-
}
|
|
33
|
-
interface EmptyStateProps {
|
|
34
|
-
icon?: EmptyStateIcon;
|
|
35
|
-
title: string;
|
|
36
|
-
description?: string;
|
|
37
|
-
cta?: EmptyStateCta;
|
|
38
|
-
/**
|
|
39
|
-
* full = fills available height (use inside page containers)
|
|
40
|
-
* compact = inline fit with vertical padding
|
|
41
|
-
*/
|
|
42
|
-
size?: 'full' | 'compact';
|
|
43
|
-
children?: ReactNode;
|
|
44
|
-
className?: string;
|
|
45
|
-
}
|
|
46
|
-
declare function EmptyState({ icon, title, description, cta, size, children, className, }: EmptyStateProps): react.JSX.Element;
|
|
47
|
-
|
|
48
|
-
export { EmptyState, type EmptyStateCta, type EmptyStateIcon, type EmptyStateProps, ICON_MAP };
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import "../chunk-ORMEWXMH.js";
|
|
3
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
-
import {
|
|
5
|
-
Package,
|
|
6
|
-
Clock,
|
|
7
|
-
Combine,
|
|
8
|
-
Boxes,
|
|
9
|
-
FileText,
|
|
10
|
-
Users,
|
|
11
|
-
Wallet,
|
|
12
|
-
CalendarDays,
|
|
13
|
-
Warehouse,
|
|
14
|
-
Tag,
|
|
15
|
-
LayoutGrid,
|
|
16
|
-
Info,
|
|
17
|
-
SearchX,
|
|
18
|
-
Lock,
|
|
19
|
-
Send,
|
|
20
|
-
HandCoins,
|
|
21
|
-
Store,
|
|
22
|
-
BarChart3,
|
|
23
|
-
CreditCard
|
|
24
|
-
} from "lucide-react";
|
|
25
|
-
const ICON_MAP = {
|
|
26
|
-
box: Package,
|
|
27
|
-
service: Clock,
|
|
28
|
-
kit: Combine,
|
|
29
|
-
input: Boxes,
|
|
30
|
-
order: FileText,
|
|
31
|
-
customer: Users,
|
|
32
|
-
finance: Wallet,
|
|
33
|
-
schedule: CalendarDays,
|
|
34
|
-
inventory: Warehouse,
|
|
35
|
-
price: Tag,
|
|
36
|
-
category: LayoutGrid,
|
|
37
|
-
generic: Info,
|
|
38
|
-
search: SearchX,
|
|
39
|
-
lock: Lock,
|
|
40
|
-
// Categorias de feature (Paywall) ──
|
|
41
|
-
catalog: Package,
|
|
42
|
-
channels: Send,
|
|
43
|
-
commercial: HandCoins,
|
|
44
|
-
operation: Store,
|
|
45
|
-
intelligence: BarChart3,
|
|
46
|
-
billing: CreditCard
|
|
47
|
-
};
|
|
48
|
-
function EmptyState({
|
|
49
|
-
icon = "generic",
|
|
50
|
-
title,
|
|
51
|
-
description,
|
|
52
|
-
cta,
|
|
53
|
-
size = "full",
|
|
54
|
-
children,
|
|
55
|
-
className = ""
|
|
56
|
-
}) {
|
|
57
|
-
const Icon = ICON_MAP[icon];
|
|
58
|
-
return /* @__PURE__ */ jsxs(
|
|
59
|
-
"div",
|
|
60
|
-
{
|
|
61
|
-
className: [
|
|
62
|
-
"flex flex-col items-center justify-center text-center px-6",
|
|
63
|
-
size === "full" ? "min-h-[320px] flex-1" : "min-h-[200px] py-10",
|
|
64
|
-
className
|
|
65
|
-
].filter(Boolean).join(" "),
|
|
66
|
-
children: [
|
|
67
|
-
/* @__PURE__ */ jsx("div", { className: "mb-5 text-stroke-strong", children: /* @__PURE__ */ jsx(Icon, { size: 72, strokeWidth: 1.25 }) }),
|
|
68
|
-
/* @__PURE__ */ jsx("p", { className: "text-body font-semibold text-fg-primary mb-2", children: title }),
|
|
69
|
-
description && /* @__PURE__ */ jsx("p", { className: "text-label text-fg-muted max-w-sm leading-relaxed mb-4", children: description }),
|
|
70
|
-
cta && (cta.href ? /* @__PURE__ */ jsx(
|
|
71
|
-
"a",
|
|
72
|
-
{
|
|
73
|
-
href: cta.href,
|
|
74
|
-
className: "mt-3 inline-block px-4 py-2 text-label font-medium rounded-(--radius-card) transition-colors text-brand-on-primary bg-brand-primary hover:bg-brand-hover",
|
|
75
|
-
children: cta.label
|
|
76
|
-
}
|
|
77
|
-
) : /* @__PURE__ */ jsx(
|
|
78
|
-
"button",
|
|
79
|
-
{
|
|
80
|
-
type: "button",
|
|
81
|
-
onClick: cta.onClick,
|
|
82
|
-
className: "mt-3 inline-block px-4 py-2 text-label font-medium rounded-(--radius-card) transition-colors text-brand-on-primary bg-brand-primary hover:bg-brand-hover",
|
|
83
|
-
children: cta.label
|
|
84
|
-
}
|
|
85
|
-
)),
|
|
86
|
-
children
|
|
87
|
-
]
|
|
88
|
-
}
|
|
89
|
-
);
|
|
90
|
-
}
|
|
91
|
-
export {
|
|
92
|
-
EmptyState,
|
|
93
|
-
ICON_MAP
|
|
94
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
3
|
-
|
|
4
|
-
interface FormCardHeaderProps {
|
|
5
|
-
icon?: ReactNode;
|
|
6
|
-
title: ReactNode;
|
|
7
|
-
subtitle?: ReactNode;
|
|
8
|
-
/** Slot à direita (ação, badge) — alinhado ao centro vertical do bloco. */
|
|
9
|
-
action?: ReactNode;
|
|
10
|
-
}
|
|
11
|
-
declare function FormCardHeader({ icon, title, subtitle, action }: FormCardHeaderProps): react.JSX.Element;
|
|
12
|
-
|
|
13
|
-
export { FormCardHeader, type FormCardHeaderProps };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import "../chunk-ORMEWXMH.js";
|
|
3
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
-
function FormCardHeader({ icon, title, subtitle, action }) {
|
|
5
|
-
return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 pb-3", children: [
|
|
6
|
-
icon && /* @__PURE__ */ jsx("span", { className: "grid place-items-center shrink-0 size-9 rounded-(--radius-card) bg-brand-primary text-brand-on-primary", children: icon }),
|
|
7
|
-
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
8
|
-
/* @__PURE__ */ jsx("p", { className: "text-label font-semibold text-(--text-primary)", children: title }),
|
|
9
|
-
subtitle && /* @__PURE__ */ jsx("p", { className: "text-caption text-(--text-muted) mt-1 leading-snug", children: subtitle })
|
|
10
|
-
] }),
|
|
11
|
-
action && /* @__PURE__ */ jsx("div", { className: "shrink-0", children: action })
|
|
12
|
-
] });
|
|
13
|
-
}
|
|
14
|
-
export {
|
|
15
|
-
FormCardHeader
|
|
16
|
-
};
|