@rojaostudio/ds 1.0.1 → 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 -87
- 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 +74 -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 -83
- package/dist/components/badge.d.ts +30 -41
- package/dist/components/badge.js +16 -106
- 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 +40 -48
- 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 +51 -107
- 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 +38 -38
- 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 +86 -67
- package/dist/components/chip-input.d.ts +46 -20
- package/dist/components/chip-input.js +171 -158
- 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 -56
- package/dist/components/choice-carousel.d.ts +9 -0
- package/dist/components/choice-carousel.js +67 -78
- package/dist/components/choice-preview-card.d.ts +10 -20
- package/dist/components/choice-preview-card.js +13 -30
- package/dist/components/color-input.d.ts +36 -11
- package/dist/components/color-input.js +139 -61
- package/dist/components/combobox.d.ts +60 -57
- package/dist/components/combobox.js +215 -196
- 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 +43 -66
- package/dist/components/copy-field.d.ts +10 -5
- package/dist/components/copy-field.js +25 -27
- package/dist/components/currency-input.d.ts +25 -11
- package/dist/components/currency-input.js +39 -67
- package/dist/components/danger-zone.d.ts +10 -1
- package/dist/components/danger-zone.js +20 -14
- package/dist/components/data-table-header.d.ts +13 -2
- package/dist/components/data-table-header.js +143 -169
- package/dist/components/date-picker.d.ts +31 -32
- package/dist/components/date-picker.js +126 -242
- 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 +56 -76
- 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 -55
- 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 -39
- 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 -57
- package/dist/components/floating-stepper.d.ts +7 -18
- package/dist/components/floating-stepper.js +17 -35
- 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 +47 -61
- package/dist/components/image-crop-modal.d.ts +3 -3
- package/dist/components/image-crop-modal.js +66 -52
- package/dist/components/image-upload.d.ts +21 -29
- package/dist/components/image-upload.js +59 -219
- 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 +103 -108
- package/dist/components/insight-card.d.ts +25 -9
- package/dist/components/insight-card.js +45 -19
- 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 -24
- 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 -131
- 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 -27
- package/dist/components/page-skeleton.d.ts +15 -21
- package/dist/components/page-skeleton.js +37 -4
- package/dist/components/pagination.d.ts +32 -22
- package/dist/components/pagination.js +83 -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 +77 -47
- 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 +32 -129
- package/dist/components/pricing-card.d.ts +9 -25
- package/dist/components/pricing-card.js +9 -25
- 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 +8 -19
- 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 +46 -87
- package/dist/components/row-actions.d.ts +5 -0
- package/dist/components/row-actions.js +57 -56
- package/dist/components/saving-bar-context.d.ts +0 -5
- package/dist/components/saving-bar-context.js +16 -34
- package/dist/components/saving-bar.d.ts +26 -11
- package/dist/components/saving-bar.js +53 -65
- package/dist/components/section-card.d.ts +18 -4
- package/dist/components/section-card.js +26 -39
- package/dist/components/section-header.d.ts +8 -12
- package/dist/components/section-header.js +7 -2
- package/dist/components/select.d.ts +44 -16
- package/dist/components/select.js +85 -135
- package/dist/components/selectable-card.d.ts +11 -19
- package/dist/components/selectable-card.js +4 -21
- 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 +11 -14
- package/dist/components/settings-list.d.ts +10 -12
- package/dist/components/settings-list.js +9 -17
- 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 -36
- package/dist/components/slider.d.ts +21 -23
- package/dist/components/slider.js +65 -56
- 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 +35 -32
- 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 +20 -17
- package/dist/components/summary-bar.d.ts +20 -20
- package/dist/components/summary-bar.js +13 -50
- 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 +65 -59
- 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 -75
- 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 +191 -189
- 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 +22 -81
- package/dist/components/toggle-card.d.ts +11 -2
- package/dist/components/toggle-card.js +9 -70
- package/dist/components/toggle-group.d.ts +21 -59
- package/dist/components/toggle-group.js +31 -74
- package/dist/components/toggle.d.ts +19 -9
- package/dist/components/toggle.js +20 -55
- package/dist/components/tooltip.d.ts +25 -12
- package/dist/components/tooltip.js +16 -84
- 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 -21
- 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/icons/pix.js +29 -0
- 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/index.d.ts +0 -2
- package/dist/targets/native/components/index.js +0 -4
- 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/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/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 +35 -16
- package/styles/_primitives.generated.css +40 -0
- package/styles/base.css +15 -21
- 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/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
- package/dist/components/blocker-card.d.ts +0 -42
- package/dist/components/blocker-card.js +0 -45
- package/dist/components/bottom-sheet.d.ts +0 -31
- package/dist/components/bottom-sheet.js +0 -120
- package/dist/components/chat-bubble.d.ts +0 -16
- package/dist/components/chat-bubble.js +0 -55
- package/dist/components/chips.d.ts +0 -22
- package/dist/components/chips.js +0 -94
- package/dist/components/copilot-hint.d.ts +0 -18
- package/dist/components/copilot-hint.js +0 -63
- package/dist/components/divider.d.ts +0 -20
- package/dist/components/divider.js +0 -47
- package/dist/components/empty-state.d.ts +0 -48
- package/dist/components/empty-state.js +0 -91
- package/dist/components/form-card-header.d.ts +0 -13
- package/dist/components/form-card-header.js +0 -8
- package/dist/components/label.d.ts +0 -16
- package/dist/components/label.js +0 -43
- package/dist/components/menu.d.ts +0 -50
- package/dist/components/menu.js +0 -80
- package/dist/components/modal.d.ts +0 -25
- package/dist/components/modal.js +0 -71
- package/dist/components/notice.d.ts +0 -50
- package/dist/components/notice.js +0 -103
- package/dist/components/page-tabs.d.ts +0 -35
- package/dist/components/page-tabs.js +0 -55
- package/dist/components/paywall-banner.d.ts +0 -37
- package/dist/components/paywall-banner.js +0 -42
- package/dist/components/paywall.d.ts +0 -44
- package/dist/components/paywall.js +0 -55
- package/dist/components/phone-frame.d.ts +0 -9
- package/dist/components/phone-frame.js +0 -18
- package/dist/components/pix-icon.d.ts +0 -8
- package/dist/components/pix-icon.js +0 -24
- package/dist/components/search.d.ts +0 -30
- package/dist/components/search.js +0 -81
- package/dist/components/themed.d.ts +0 -36
- package/dist/components/themed.js +0 -22
- package/dist/components/toaster.d.ts +0 -84
- package/dist/components/toaster.js +0 -284
- 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 -46
- package/dist/targets/native/components/paywall.d.ts +0 -18
- package/dist/targets/native/components/paywall.js +0 -61
|
@@ -0,0 +1,69 @@
|
|
|
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 { ExternalLinkIcon, MoreVerticalIcon, PhoneIcon, ReplyIcon } from "./internal/icons.js";
|
|
9
|
+
import { useWhatsAppPlatform } from "./internal/whatsapp.js";
|
|
10
|
+
function WhatsAppTemplate(_a) {
|
|
11
|
+
var _b = _a, {
|
|
12
|
+
children,
|
|
13
|
+
header = "none",
|
|
14
|
+
headerText,
|
|
15
|
+
image,
|
|
16
|
+
body,
|
|
17
|
+
footer,
|
|
18
|
+
time = "11:59",
|
|
19
|
+
platform,
|
|
20
|
+
className
|
|
21
|
+
} = _b, rest = __objRest(_b, [
|
|
22
|
+
"children",
|
|
23
|
+
"header",
|
|
24
|
+
"headerText",
|
|
25
|
+
"image",
|
|
26
|
+
"body",
|
|
27
|
+
"footer",
|
|
28
|
+
"time",
|
|
29
|
+
"platform",
|
|
30
|
+
"className"
|
|
31
|
+
]);
|
|
32
|
+
const finalPlatform = useWhatsAppPlatform(platform);
|
|
33
|
+
return /* @__PURE__ */ jsxs("div", __spreadProps(__spreadValues({}, rest), { className: ["rds-whatsapp-template", `rds-whatsapp--${finalPlatform}`, className].filter(Boolean).join(" "), children: [
|
|
34
|
+
/* @__PURE__ */ jsxs("div", { className: ["rds-whatsapp-template__content", header === "image" && "rds-whatsapp-template__content--image"].filter(Boolean).join(" "), children: [
|
|
35
|
+
header === "image" && /* @__PURE__ */ jsx("div", { className: "rds-whatsapp-template__image", children: image }),
|
|
36
|
+
header === "text" && headerText && /* @__PURE__ */ jsx("p", { className: "rds-whatsapp-template__header", children: headerText }),
|
|
37
|
+
/* @__PURE__ */ jsxs("div", { className: "rds-whatsapp-template__text", children: [
|
|
38
|
+
/* @__PURE__ */ jsx("p", { className: "rds-whatsapp-template__body", children: body }),
|
|
39
|
+
footer && /* @__PURE__ */ jsx("p", { className: "rds-whatsapp-template__footer", children: footer }),
|
|
40
|
+
/* @__PURE__ */ jsx("p", { className: "rds-whatsapp-template__time", children: time })
|
|
41
|
+
] })
|
|
42
|
+
] }),
|
|
43
|
+
children && /* @__PURE__ */ jsx("div", { className: "rds-whatsapp-template__buttons", children })
|
|
44
|
+
] }));
|
|
45
|
+
}
|
|
46
|
+
const BUTTON_ICONS = {
|
|
47
|
+
"quick-reply": ReplyIcon,
|
|
48
|
+
url: ExternalLinkIcon,
|
|
49
|
+
phone: PhoneIcon,
|
|
50
|
+
"all-options": MoreVerticalIcon
|
|
51
|
+
};
|
|
52
|
+
function WhatsAppTemplateButton(_c) {
|
|
53
|
+
var _d = _c, { children, type = "quick-reply", status = "default", className } = _d, rest = __objRest(_d, ["children", "type", "status", "className"]);
|
|
54
|
+
const Icon = BUTTON_ICONS[type];
|
|
55
|
+
return /* @__PURE__ */ jsxs(
|
|
56
|
+
"div",
|
|
57
|
+
__spreadProps(__spreadValues({}, rest), {
|
|
58
|
+
className: ["rds-whatsapp-template__button", status === "used" && "rds-whatsapp-template__button--used", className].filter(Boolean).join(" "),
|
|
59
|
+
children: [
|
|
60
|
+
/* @__PURE__ */ jsx("span", { className: "rds-whatsapp-template__button-icon", "aria-hidden": "true", children: /* @__PURE__ */ jsx(Icon, {}) }),
|
|
61
|
+
/* @__PURE__ */ jsx("span", { children: children != null ? children : type === "all-options" ? "Ver todas as op\xE7\xF5es" : null })
|
|
62
|
+
]
|
|
63
|
+
})
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
export {
|
|
67
|
+
WhatsAppTemplate,
|
|
68
|
+
WhatsAppTemplateButton
|
|
69
|
+
};
|
package/dist/icons/index.d.ts
CHANGED
|
@@ -1 +1,3 @@
|
|
|
1
1
|
export { AlertCircle, AlertTriangle, BarChart2, Check, CheckCircle, ChevronDown, ChevronLeft, ChevronRight, DollarSign, ExternalLink, FileText, GripVertical, House, Kanban, Layers, LayoutGrid, LayoutList, Loader2, LogOut, LucideIcon, LucideProps, Megaphone, Menu, MessagesSquare, Moon, Package, PanelLeftClose, PanelLeftOpen, Pencil, Plug, Plus, RefreshCw, Search, Settings, Star, Store, Sun, ThumbsUp, Trash2, Upload, Users, Wallet, X, Zap } from 'lucide-react';
|
|
2
|
+
export { PixIcon, PixIconProps } from './pix.js';
|
|
3
|
+
import 'react';
|
package/dist/icons/index.js
CHANGED
|
@@ -43,6 +43,7 @@ import {
|
|
|
43
43
|
X,
|
|
44
44
|
Zap
|
|
45
45
|
} from "lucide-react";
|
|
46
|
+
import { PixIcon } from "./pix.js";
|
|
46
47
|
export {
|
|
47
48
|
AlertCircle,
|
|
48
49
|
AlertTriangle,
|
|
@@ -71,6 +72,7 @@ export {
|
|
|
71
72
|
PanelLeftClose,
|
|
72
73
|
PanelLeftOpen,
|
|
73
74
|
Pencil,
|
|
75
|
+
PixIcon,
|
|
74
76
|
Plug,
|
|
75
77
|
Plus,
|
|
76
78
|
RefreshCw,
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import 'lucide-react';
|
|
2
|
+
import * as react from 'react';
|
|
3
|
+
import { SVGProps } from 'react';
|
|
4
|
+
|
|
5
|
+
interface PixIconProps extends SVGProps<SVGSVGElement> {
|
|
6
|
+
/** Width and height in px. Default 16. */
|
|
7
|
+
size?: number;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* The Pix symbol (Banco Central do Brasil), monochrome: it takes the text colour (currentColor), so it sits with
|
|
11
|
+
* the other payment-method icons. Decorative by default (aria-hidden); name it with aria-label and role="img" when
|
|
12
|
+
* it stands alone. The coloured version belongs to brand contexts, not to UI.
|
|
13
|
+
*/
|
|
14
|
+
declare function PixIcon({ size, ...props }: PixIconProps): react.JSX.Element;
|
|
15
|
+
|
|
16
|
+
export { PixIcon, type PixIconProps };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__objRest,
|
|
3
|
+
__spreadProps,
|
|
4
|
+
__spreadValues
|
|
5
|
+
} from "../chunk-ORMEWXMH.js";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
function PixIcon(_a) {
|
|
8
|
+
var _b = _a, { size = 16 } = _b, props = __objRest(_b, ["size"]);
|
|
9
|
+
return /* @__PURE__ */ jsxs(
|
|
10
|
+
"svg",
|
|
11
|
+
__spreadProps(__spreadValues({
|
|
12
|
+
width: size,
|
|
13
|
+
height: size,
|
|
14
|
+
viewBox: "0 0 512 512",
|
|
15
|
+
fill: "currentColor",
|
|
16
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
17
|
+
"aria-hidden": "true"
|
|
18
|
+
}, props), {
|
|
19
|
+
children: [
|
|
20
|
+
/* @__PURE__ */ jsx("path", { d: "M242.4 292.5c5.4-5.4 14.7-5.4 20.1 0l77 77c14.2 14.2 33.1 22 53.1 22h15.1l-97.1 97.1c-30.3 30.3-79.5 30.3-109.8 0L103.3 391.2h9.3c20 0 38.9-7.8 53.1-22l76.7-76.7z" }),
|
|
21
|
+
/* @__PURE__ */ jsx("path", { d: "M262.5 218.9c-5.4 5.4-14.7 5.4-20.1 0l-76.7-76.7c-14.2-14.2-33.1-22-53.1-22h-9.3l97.4-97.4c30.3-30.3 79.5-30.3 109.8 0l97.1 97.1h-15.1c-20 0-38.9 7.8-53.1 22l-77 77z" }),
|
|
22
|
+
/* @__PURE__ */ jsx("path", { d: "M112.6 142.7c13.8 0 27.4 5.6 37.2 15.4l76.7 76.7c7.3 7.3 17 10.9 26.6 10.9s19.3-3.6 26.6-10.9l77-77c9.8-9.8 23.4-15.4 37.2-15.4h37.2l58.4 58.4c30.3 30.3 30.3 79.5 0 109.8l-58.4 58.4h-37.2c-13.8 0-27.4-5.6-37.2-15.4l-77-77c-14.2-14.2-39-14.2-53.2 0l-76.7 76.7c-9.8 9.8-23.4 15.4-37.2 15.4H75.4L17 310.7c-30.3-30.3-30.3-79.5 0-109.8l58.4-58.4h37.2z" })
|
|
23
|
+
]
|
|
24
|
+
})
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
export {
|
|
28
|
+
PixIcon
|
|
29
|
+
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import "../../../chunk-ORMEWXMH.js";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
3
|
import { ChevronDown } from "lucide-react-native";
|
|
3
4
|
import {
|
|
4
5
|
createContext,
|
|
@@ -33,16 +34,16 @@ function Accordion({ children, allowMultiple = false }) {
|
|
|
33
34
|
},
|
|
34
35
|
[allowMultiple]
|
|
35
36
|
);
|
|
36
|
-
return /* @__PURE__ */
|
|
37
|
+
return /* @__PURE__ */ jsx(AccordionContext.Provider, { value: { notifyOpen, register, allowMultiple }, children: /* @__PURE__ */ jsx(
|
|
37
38
|
View,
|
|
38
39
|
{
|
|
39
40
|
style: [
|
|
40
41
|
styles.group,
|
|
41
42
|
{ borderColor: t["--border-default"], backgroundColor: t["--surface-default"] }
|
|
42
|
-
]
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
));
|
|
43
|
+
],
|
|
44
|
+
children
|
|
45
|
+
}
|
|
46
|
+
) });
|
|
46
47
|
}
|
|
47
48
|
let nextId = 0;
|
|
48
49
|
function AccordionItem({ title, children, defaultOpen = false, disabled = false }) {
|
|
@@ -72,26 +73,31 @@ function AccordionItem({ title, children, defaultOpen = false, disabled = false
|
|
|
72
73
|
});
|
|
73
74
|
}, [ctx]);
|
|
74
75
|
const spin = rotate.interpolate({ inputRange: [0, 1], outputRange: ["0deg", "180deg"] });
|
|
75
|
-
return /* @__PURE__ */
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
76
|
+
return /* @__PURE__ */ jsxs(View, { style: [styles.item, { borderBottomColor: t["--border-default"] }], children: [
|
|
77
|
+
/* @__PURE__ */ jsxs(
|
|
78
|
+
Pressable,
|
|
79
|
+
{
|
|
80
|
+
accessibilityRole: "button",
|
|
81
|
+
accessibilityState: { expanded: open, disabled },
|
|
82
|
+
accessibilityLabel: title,
|
|
83
|
+
disabled,
|
|
84
|
+
hitSlop: 4,
|
|
85
|
+
onPress: toggle,
|
|
86
|
+
style: ({ pressed }) => [
|
|
87
|
+
styles.header,
|
|
88
|
+
{
|
|
89
|
+
backgroundColor: pressed && !disabled ? t["--surface-raised"] : "transparent",
|
|
90
|
+
opacity: disabled ? 0.5 : 1
|
|
91
|
+
}
|
|
92
|
+
],
|
|
93
|
+
children: [
|
|
94
|
+
/* @__PURE__ */ jsx(Text, { variant: "label", style: styles.title, numberOfLines: 1, children: title }),
|
|
95
|
+
/* @__PURE__ */ jsx(Animated.View, { style: { transform: [{ rotate: spin }] }, children: /* @__PURE__ */ jsx(ChevronDown, { size: 20, color: t["--text-muted"] }) })
|
|
96
|
+
]
|
|
97
|
+
}
|
|
98
|
+
),
|
|
99
|
+
open ? /* @__PURE__ */ jsx(View, { style: styles.body, children: typeof children === "string" ? /* @__PURE__ */ jsx(Text, { variant: "body-sm", color: "secondary", children }) : children }) : null
|
|
100
|
+
] });
|
|
95
101
|
}
|
|
96
102
|
const styles = StyleSheet.create({
|
|
97
103
|
group: {
|
|
@@ -1,4 +1,5 @@
|
|
|
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-native";
|
|
3
4
|
import { Pressable, StyleSheet, View } from "react-native";
|
|
4
5
|
import { Text } from "./text.js";
|
|
@@ -17,25 +18,30 @@ function Alert({ variant = "info", title, children, onClose, hideIcon = false })
|
|
|
17
18
|
const border = (_b = t[spec.border]) != null ? _b : t["--border-default"];
|
|
18
19
|
const fg = (_c = t[spec.text]) != null ? _c : t["--text-primary"];
|
|
19
20
|
const Icon = spec.icon;
|
|
20
|
-
return /* @__PURE__ */
|
|
21
|
+
return /* @__PURE__ */ jsxs(
|
|
21
22
|
View,
|
|
22
23
|
{
|
|
23
24
|
accessibilityRole: variant === "danger" ? "alert" : "summary",
|
|
24
|
-
style: [styles.container, { backgroundColor: bg, borderColor: border }]
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
25
|
+
style: [styles.container, { backgroundColor: bg, borderColor: border }],
|
|
26
|
+
children: [
|
|
27
|
+
!hideIcon && /* @__PURE__ */ jsx(Icon, { size: 18, color: fg, style: styles.icon }),
|
|
28
|
+
/* @__PURE__ */ jsxs(View, { style: styles.body, children: [
|
|
29
|
+
title != null && /* @__PURE__ */ jsx(Text, { variant: "label", style: { color: fg }, children: title }),
|
|
30
|
+
children != null && (typeof children === "string" ? /* @__PURE__ */ jsx(Text, { variant: "body-sm", style: [{ color: fg }, title != null && styles.childrenSpacing], children }) : /* @__PURE__ */ jsx(View, { style: title != null ? styles.childrenSpacing : void 0, children }))
|
|
31
|
+
] }),
|
|
32
|
+
onClose != null && /* @__PURE__ */ jsx(
|
|
33
|
+
Pressable,
|
|
34
|
+
{
|
|
35
|
+
accessibilityRole: "button",
|
|
36
|
+
accessibilityLabel: "Fechar",
|
|
37
|
+
hitSlop: 12,
|
|
38
|
+
onPress: onClose,
|
|
39
|
+
style: ({ pressed }) => [styles.close, { opacity: pressed ? 0.6 : 1 }],
|
|
40
|
+
children: /* @__PURE__ */ jsx(X, { size: 16, color: fg })
|
|
41
|
+
}
|
|
42
|
+
)
|
|
43
|
+
]
|
|
44
|
+
}
|
|
39
45
|
);
|
|
40
46
|
}
|
|
41
47
|
const styles = StyleSheet.create({
|
|
@@ -2,6 +2,7 @@ import {
|
|
|
2
2
|
__spreadProps,
|
|
3
3
|
__spreadValues
|
|
4
4
|
} from "../../../chunk-ORMEWXMH.js";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
6
|
import { Children, isValidElement } from "react";
|
|
6
7
|
import { Image, StyleSheet, Text, View } from "react-native";
|
|
7
8
|
import { useTheme } from "./theme.js";
|
|
@@ -39,41 +40,47 @@ function Avatar({ name, src, size = "md", status, variant = "brand" }) {
|
|
|
39
40
|
const showImage = !!src;
|
|
40
41
|
const bg = variant === "brand" ? t["--brand-primary"] : t["--surface-raised"];
|
|
41
42
|
const fg = variant === "brand" ? t["--brand-on-primary"] : t["--text-muted"];
|
|
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
|
-
|
|
65
|
-
|
|
66
|
-
|
|
43
|
+
return /* @__PURE__ */ jsxs(View, { style: styles.wrap, accessibilityRole: "image", accessibilityLabel: label, children: [
|
|
44
|
+
/* @__PURE__ */ jsx(
|
|
45
|
+
View,
|
|
46
|
+
{
|
|
47
|
+
style: [
|
|
48
|
+
styles.circle,
|
|
49
|
+
{ width: box, height: box, borderRadius: box / 2, backgroundColor: showImage ? void 0 : bg }
|
|
50
|
+
],
|
|
51
|
+
children: showImage ? /* @__PURE__ */ jsx(Image, { source: { uri: src }, style: { width: box, height: box }, resizeMode: "cover" }) : /* @__PURE__ */ jsx(Text, { style: { color: fg, fontSize: font, fontWeight: "600" }, numberOfLines: 1, children: initials(name != null ? name : "?") })
|
|
52
|
+
}
|
|
53
|
+
),
|
|
54
|
+
status ? /* @__PURE__ */ jsx(
|
|
55
|
+
View,
|
|
56
|
+
{
|
|
57
|
+
accessibilityLabel: `status: ${status}`,
|
|
58
|
+
style: [
|
|
59
|
+
styles.dot,
|
|
60
|
+
{
|
|
61
|
+
width: DOT_SIZE[size],
|
|
62
|
+
height: DOT_SIZE[size],
|
|
63
|
+
borderRadius: DOT_SIZE[size] / 2,
|
|
64
|
+
backgroundColor: (_b = (_a = t[STATUS_TOKEN[status]]) != null ? _a : t["--brand-accent"]) != null ? _b : t["--icon-default"],
|
|
65
|
+
borderColor: t["--surface-default"]
|
|
66
|
+
}
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
) : null
|
|
70
|
+
] });
|
|
67
71
|
}
|
|
68
72
|
function AvatarGroup({ max = 3, size = "md", children }) {
|
|
69
73
|
const items = Children.toArray(children).filter(isValidElement);
|
|
70
74
|
const visible = items.slice(0, max);
|
|
71
75
|
const overflow = items.length - visible.length;
|
|
72
76
|
const overlap = -Math.round(DIMENSION[size].box * 0.3);
|
|
73
|
-
return /* @__PURE__ */
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
+
return /* @__PURE__ */ jsxs(View, { style: styles.group, accessibilityRole: "none", children: [
|
|
78
|
+
visible.map((child, idx) => {
|
|
79
|
+
var _a;
|
|
80
|
+
return /* @__PURE__ */ jsx(View, { style: idx === 0 ? void 0 : { marginLeft: overlap }, children: /* @__PURE__ */ jsx(Avatar, __spreadProps(__spreadValues({}, child.props), { size: (_a = child.props.size) != null ? _a : size })) }, idx);
|
|
81
|
+
}),
|
|
82
|
+
overflow > 0 ? /* @__PURE__ */ jsx(View, { style: { marginLeft: overlap }, children: /* @__PURE__ */ jsx(Avatar, { name: `+${overflow}`, variant: "neutral", size }) }) : null
|
|
83
|
+
] });
|
|
77
84
|
}
|
|
78
85
|
const styles = StyleSheet.create({
|
|
79
86
|
wrap: { position: "relative", alignSelf: "flex-start" },
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import "../../../chunk-ORMEWXMH.js";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
3
|
import { StyleSheet, View } from "react-native";
|
|
3
4
|
import { Text } from "./text.js";
|
|
4
5
|
import { useTheme } from "./theme.js";
|
|
@@ -31,15 +32,15 @@ function Badge(props) {
|
|
|
31
32
|
const t = useTheme();
|
|
32
33
|
const tone = (_a = props.tone) != null ? _a : "neutral";
|
|
33
34
|
if (props.dot) {
|
|
34
|
-
return /* @__PURE__ */
|
|
35
|
+
return /* @__PURE__ */ jsx(View, { style: [styles.dot, { backgroundColor: t[DOT_BG[tone]] }], accessibilityRole: "image" });
|
|
35
36
|
}
|
|
36
37
|
if (props.count !== void 0) {
|
|
37
38
|
if (props.count <= 0) return null;
|
|
38
39
|
const max = (_b = props.max) != null ? _b : 99;
|
|
39
40
|
const display = props.count > max ? `${max}+` : String(props.count);
|
|
40
|
-
return /* @__PURE__ */
|
|
41
|
+
return /* @__PURE__ */ jsx(View, { style: [styles.count, { backgroundColor: t["--brand-primary"] }], children: /* @__PURE__ */ jsx(Text, { variant: "caption", style: { color: t["--brand-on-primary"], fontWeight: "500" }, children: display }) });
|
|
41
42
|
}
|
|
42
|
-
return /* @__PURE__ */
|
|
43
|
+
return /* @__PURE__ */ jsx(View, { style: [styles.badge, { backgroundColor: t[BG[tone]] }], children: /* @__PURE__ */ jsx(Text, { variant: "caption", style: { color: t[FG[tone]], fontWeight: "500" }, children: props.children }) });
|
|
43
44
|
}
|
|
44
45
|
const styles = StyleSheet.create({
|
|
45
46
|
badge: { alignSelf: "flex-start", borderRadius: 999, paddingHorizontal: 10, paddingVertical: 4 },
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
__objRest,
|
|
3
|
+
__spreadProps,
|
|
3
4
|
__spreadValues
|
|
4
5
|
} from "../../../chunk-ORMEWXMH.js";
|
|
6
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
5
7
|
import { cloneElement, isValidElement } from "react";
|
|
6
8
|
import {
|
|
7
9
|
ActivityIndicator,
|
|
@@ -46,9 +48,9 @@ function Button(_a) {
|
|
|
46
48
|
ghost: { bg: "transparent", fg: t["--text-primary"], border: void 0 },
|
|
47
49
|
danger: { bg: t["--danger"], fg: "#ffffff", border: void 0 }
|
|
48
50
|
}[variant];
|
|
49
|
-
return /* @__PURE__ */
|
|
51
|
+
return /* @__PURE__ */ jsx(
|
|
50
52
|
Pressable,
|
|
51
|
-
__spreadValues({
|
|
53
|
+
__spreadProps(__spreadValues({
|
|
52
54
|
accessibilityRole: "button",
|
|
53
55
|
accessibilityState: { disabled: !!isDisabled, busy: loading },
|
|
54
56
|
disabled: isDisabled,
|
|
@@ -64,8 +66,13 @@ function Button(_a) {
|
|
|
64
66
|
alignSelf: fullWidth ? "stretch" : "flex-start"
|
|
65
67
|
}
|
|
66
68
|
]
|
|
67
|
-
}, rest),
|
|
68
|
-
|
|
69
|
+
}, rest), {
|
|
70
|
+
children: loading ? /* @__PURE__ */ jsx(ActivityIndicator, { color: skin.fg }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
71
|
+
tintIcon(leftIcon, skin.fg),
|
|
72
|
+
/* @__PURE__ */ jsx(Text, { style: [styles.label, { color: skin.fg }], children: label }),
|
|
73
|
+
tintIcon(rightIcon, skin.fg)
|
|
74
|
+
] })
|
|
75
|
+
})
|
|
69
76
|
);
|
|
70
77
|
}
|
|
71
78
|
const styles = StyleSheet.create({
|
|
@@ -2,12 +2,13 @@ import {
|
|
|
2
2
|
__objRest,
|
|
3
3
|
__spreadValues
|
|
4
4
|
} from "../../../chunk-ORMEWXMH.js";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
6
|
import { StyleSheet, View } from "react-native";
|
|
6
7
|
import { useTheme } from "./theme.js";
|
|
7
8
|
function Card(_a) {
|
|
8
9
|
var _b = _a, { style } = _b, rest = __objRest(_b, ["style"]);
|
|
9
10
|
const t = useTheme();
|
|
10
|
-
return /* @__PURE__ */
|
|
11
|
+
return /* @__PURE__ */ jsx(
|
|
11
12
|
View,
|
|
12
13
|
__spreadValues({
|
|
13
14
|
style: [
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import "../../../chunk-ORMEWXMH.js";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
3
|
import { Check } from "lucide-react-native";
|
|
3
4
|
import { Pressable, StyleSheet, View } from "react-native";
|
|
4
5
|
import { Text } from "./text.js";
|
|
@@ -6,7 +7,7 @@ import { useTheme } from "./theme.js";
|
|
|
6
7
|
function Checkbox({ label, checked, onChange, disabled, indeterminate }) {
|
|
7
8
|
const t = useTheme();
|
|
8
9
|
const active = checked || indeterminate;
|
|
9
|
-
return /* @__PURE__ */
|
|
10
|
+
return /* @__PURE__ */ jsxs(
|
|
10
11
|
Pressable,
|
|
11
12
|
{
|
|
12
13
|
accessibilityRole: "checkbox",
|
|
@@ -15,22 +16,24 @@ function Checkbox({ label, checked, onChange, disabled, indeterminate }) {
|
|
|
15
16
|
disabled,
|
|
16
17
|
hitSlop: 8,
|
|
17
18
|
onPress: () => onChange(!checked),
|
|
18
|
-
style: [styles.row, { opacity: disabled ? 0.5 : 1 }]
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
{
|
|
23
|
-
style: [
|
|
24
|
-
styles.box,
|
|
19
|
+
style: [styles.row, { opacity: disabled ? 0.5 : 1 }],
|
|
20
|
+
children: [
|
|
21
|
+
/* @__PURE__ */ jsx(
|
|
22
|
+
View,
|
|
25
23
|
{
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
style: [
|
|
25
|
+
styles.box,
|
|
26
|
+
{
|
|
27
|
+
borderColor: active ? t["--brand-primary"] : t["--border-strong"],
|
|
28
|
+
backgroundColor: active ? t["--brand-primary"] : "transparent"
|
|
29
|
+
}
|
|
30
|
+
],
|
|
31
|
+
children: indeterminate ? /* @__PURE__ */ jsx(View, { style: [styles.dash, { backgroundColor: t["--brand-on-primary"] }] }) : checked ? /* @__PURE__ */ jsx(Check, { size: 14, color: t["--brand-on-primary"], strokeWidth: 3 }) : null
|
|
28
32
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
label ? /* @__PURE__ */ React.createElement(Text, { variant: "body", style: { color: t["--text-primary"] } }, label) : null
|
|
33
|
+
),
|
|
34
|
+
label ? /* @__PURE__ */ jsx(Text, { variant: "body", style: { color: t["--text-primary"] }, children: label }) : null
|
|
35
|
+
]
|
|
36
|
+
}
|
|
34
37
|
);
|
|
35
38
|
}
|
|
36
39
|
const styles = StyleSheet.create({
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import "../../../chunk-ORMEWXMH.js";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
3
|
import { Pressable, StyleSheet, View } from "react-native";
|
|
3
4
|
import { X } from "lucide-react-native";
|
|
4
5
|
import { Text } from "./text.js";
|
|
@@ -16,7 +17,7 @@ function Chip({
|
|
|
16
17
|
const bg = selected ? t["--brand-primary"] : subtle ? t["--surface-raised"] : t["--surface-default"];
|
|
17
18
|
const fg = selected ? t["--brand-on-primary"] : t["--text-primary"];
|
|
18
19
|
const border = selected ? t["--brand-primary"] : subtle ? "transparent" : t["--border-default"];
|
|
19
|
-
return /* @__PURE__ */
|
|
20
|
+
return /* @__PURE__ */ jsxs(
|
|
20
21
|
Pressable,
|
|
21
22
|
{
|
|
22
23
|
onPress: disabled ? void 0 : onPress,
|
|
@@ -32,22 +33,24 @@ function Chip({
|
|
|
32
33
|
borderColor: border,
|
|
33
34
|
opacity: disabled ? 0.5 : pressed && onPress ? 0.85 : 1
|
|
34
35
|
}
|
|
36
|
+
],
|
|
37
|
+
children: [
|
|
38
|
+
leadingIcon != null && /* @__PURE__ */ jsx(View, { style: styles.leading, children: leadingIcon }),
|
|
39
|
+
/* @__PURE__ */ jsx(Text, { variant: "caption", style: [styles.label, { color: fg }], children: label }),
|
|
40
|
+
onRemove && /* @__PURE__ */ jsx(
|
|
41
|
+
Pressable,
|
|
42
|
+
{
|
|
43
|
+
onPress: disabled ? void 0 : onRemove,
|
|
44
|
+
disabled,
|
|
45
|
+
hitSlop: 8,
|
|
46
|
+
accessibilityRole: "button",
|
|
47
|
+
accessibilityLabel: "Remove",
|
|
48
|
+
style: styles.remove,
|
|
49
|
+
children: /* @__PURE__ */ jsx(X, { size: 14, color: fg })
|
|
50
|
+
}
|
|
51
|
+
)
|
|
35
52
|
]
|
|
36
|
-
}
|
|
37
|
-
leadingIcon != null && /* @__PURE__ */ React.createElement(View, { style: styles.leading }, leadingIcon),
|
|
38
|
-
/* @__PURE__ */ React.createElement(Text, { variant: "caption", style: [styles.label, { color: fg }] }, label),
|
|
39
|
-
onRemove && /* @__PURE__ */ React.createElement(
|
|
40
|
-
Pressable,
|
|
41
|
-
{
|
|
42
|
-
onPress: disabled ? void 0 : onRemove,
|
|
43
|
-
disabled,
|
|
44
|
-
hitSlop: 8,
|
|
45
|
-
accessibilityRole: "button",
|
|
46
|
-
accessibilityLabel: "Remove",
|
|
47
|
-
style: styles.remove
|
|
48
|
-
},
|
|
49
|
-
/* @__PURE__ */ React.createElement(X, { size: 14, color: fg })
|
|
50
|
-
)
|
|
53
|
+
}
|
|
51
54
|
);
|
|
52
55
|
}
|
|
53
56
|
const styles = StyleSheet.create({
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import "../../../chunk-ORMEWXMH.js";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
3
|
import { Pressable, View } from "react-native";
|
|
3
4
|
import { Text } from "./text.js";
|
|
4
5
|
import { useTheme } from "./theme.js";
|
|
5
6
|
function ChoiceCard({ label, description, selected, onSelect }) {
|
|
6
7
|
const t = useTheme();
|
|
7
|
-
return /* @__PURE__ */
|
|
8
|
+
return /* @__PURE__ */ jsxs(
|
|
8
9
|
Pressable,
|
|
9
10
|
{
|
|
10
11
|
onPress: onSelect,
|
|
@@ -22,29 +23,34 @@ function ChoiceCard({ label, description, selected, onSelect }) {
|
|
|
22
23
|
gap: 12,
|
|
23
24
|
borderColor: selected ? t["--brand-primary"] : t["--border-default"],
|
|
24
25
|
backgroundColor: selected ? t["--surface-raised"] : t["--surface-default"]
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
/* @__PURE__ */ React.createElement(View, { style: { flex: 1 } }, /* @__PURE__ */ React.createElement(Text, { variant: "label" }, label), description ? /* @__PURE__ */ React.createElement(Text, { variant: "caption", color: "muted" }, description) : null),
|
|
28
|
-
/* @__PURE__ */ React.createElement(
|
|
29
|
-
View,
|
|
30
|
-
{
|
|
31
|
-
style: {
|
|
32
|
-
width: 20,
|
|
33
|
-
height: 20,
|
|
34
|
-
borderRadius: 10,
|
|
35
|
-
borderWidth: 2,
|
|
36
|
-
alignItems: "center",
|
|
37
|
-
justifyContent: "center",
|
|
38
|
-
borderColor: selected ? t["--brand-primary"] : t["--border-strong"]
|
|
39
|
-
}
|
|
40
26
|
},
|
|
41
|
-
|
|
42
|
-
View,
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
|
|
27
|
+
children: [
|
|
28
|
+
/* @__PURE__ */ jsxs(View, { style: { flex: 1 }, children: [
|
|
29
|
+
/* @__PURE__ */ jsx(Text, { variant: "label", children: label }),
|
|
30
|
+
description ? /* @__PURE__ */ jsx(Text, { variant: "caption", color: "muted", children: description }) : null
|
|
31
|
+
] }),
|
|
32
|
+
/* @__PURE__ */ jsx(
|
|
33
|
+
View,
|
|
34
|
+
{
|
|
35
|
+
style: {
|
|
36
|
+
width: 20,
|
|
37
|
+
height: 20,
|
|
38
|
+
borderRadius: 10,
|
|
39
|
+
borderWidth: 2,
|
|
40
|
+
alignItems: "center",
|
|
41
|
+
justifyContent: "center",
|
|
42
|
+
borderColor: selected ? t["--brand-primary"] : t["--border-strong"]
|
|
43
|
+
},
|
|
44
|
+
children: selected ? /* @__PURE__ */ jsx(
|
|
45
|
+
View,
|
|
46
|
+
{
|
|
47
|
+
style: { width: 10, height: 10, borderRadius: 5, backgroundColor: t["--brand-primary"] }
|
|
48
|
+
}
|
|
49
|
+
) : null
|
|
50
|
+
}
|
|
51
|
+
)
|
|
52
|
+
]
|
|
53
|
+
}
|
|
48
54
|
);
|
|
49
55
|
}
|
|
50
56
|
export {
|