@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
|
@@ -2,6 +2,7 @@ import {
|
|
|
2
2
|
__objRest,
|
|
3
3
|
__spreadValues
|
|
4
4
|
} from "../../../chunk-ORMEWXMH.js";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
6
|
import { Pressable, StyleSheet, TextInput, View } from "react-native";
|
|
6
7
|
import { Search as SearchIcon, X } from "lucide-react-native";
|
|
7
8
|
import { useTheme } from "./theme.js";
|
|
@@ -29,50 +30,52 @@ function Search(_a) {
|
|
|
29
30
|
onChangeText("");
|
|
30
31
|
onClear == null ? void 0 : onClear();
|
|
31
32
|
}
|
|
32
|
-
return /* @__PURE__ */
|
|
33
|
+
return /* @__PURE__ */ jsxs(
|
|
33
34
|
View,
|
|
34
35
|
{
|
|
35
36
|
style: [
|
|
36
37
|
styles.wrap,
|
|
37
38
|
{ backgroundColor: t["--surface-raised"], borderColor: t["--border-default"] }
|
|
39
|
+
],
|
|
40
|
+
children: [
|
|
41
|
+
/* @__PURE__ */ jsx(SearchIcon, { size: 18, color: t["--icon-default"] }),
|
|
42
|
+
/* @__PURE__ */ jsx(
|
|
43
|
+
TextInput,
|
|
44
|
+
__spreadValues({
|
|
45
|
+
value,
|
|
46
|
+
onChangeText,
|
|
47
|
+
placeholder,
|
|
48
|
+
placeholderTextColor: t["--text-muted"],
|
|
49
|
+
accessibilityLabel: accessibilityLabel != null ? accessibilityLabel : placeholder,
|
|
50
|
+
returnKeyType: "search",
|
|
51
|
+
onSubmitEditing: (e) => onSubmit == null ? void 0 : onSubmit(e.nativeEvent.text),
|
|
52
|
+
style: [styles.input, { color: t["--text-primary"] }]
|
|
53
|
+
}, rest)
|
|
54
|
+
),
|
|
55
|
+
action ? /* @__PURE__ */ jsx(
|
|
56
|
+
Pressable,
|
|
57
|
+
{
|
|
58
|
+
accessibilityRole: "button",
|
|
59
|
+
accessibilityLabel: action.accessibilityLabel,
|
|
60
|
+
hitSlop: 8,
|
|
61
|
+
onPress: action.onPress,
|
|
62
|
+
style: ({ pressed }) => ({ opacity: pressed ? 0.6 : 1 }),
|
|
63
|
+
children: action.icon
|
|
64
|
+
}
|
|
65
|
+
) : null,
|
|
66
|
+
hasValue ? /* @__PURE__ */ jsx(
|
|
67
|
+
Pressable,
|
|
68
|
+
{
|
|
69
|
+
accessibilityRole: "button",
|
|
70
|
+
accessibilityLabel: "Clear search",
|
|
71
|
+
hitSlop: 8,
|
|
72
|
+
onPress: handleClear,
|
|
73
|
+
style: ({ pressed }) => ({ opacity: pressed ? 0.6 : 1 }),
|
|
74
|
+
children: /* @__PURE__ */ jsx(X, { size: 18, color: t["--icon-default"] })
|
|
75
|
+
}
|
|
76
|
+
) : null
|
|
38
77
|
]
|
|
39
|
-
}
|
|
40
|
-
/* @__PURE__ */ React.createElement(SearchIcon, { size: 18, color: t["--icon-default"] }),
|
|
41
|
-
/* @__PURE__ */ React.createElement(
|
|
42
|
-
TextInput,
|
|
43
|
-
__spreadValues({
|
|
44
|
-
value,
|
|
45
|
-
onChangeText,
|
|
46
|
-
placeholder,
|
|
47
|
-
placeholderTextColor: t["--text-muted"],
|
|
48
|
-
accessibilityLabel: accessibilityLabel != null ? accessibilityLabel : placeholder,
|
|
49
|
-
returnKeyType: "search",
|
|
50
|
-
onSubmitEditing: (e) => onSubmit == null ? void 0 : onSubmit(e.nativeEvent.text),
|
|
51
|
-
style: [styles.input, { color: t["--text-primary"] }]
|
|
52
|
-
}, rest)
|
|
53
|
-
),
|
|
54
|
-
action ? /* @__PURE__ */ React.createElement(
|
|
55
|
-
Pressable,
|
|
56
|
-
{
|
|
57
|
-
accessibilityRole: "button",
|
|
58
|
-
accessibilityLabel: action.accessibilityLabel,
|
|
59
|
-
hitSlop: 8,
|
|
60
|
-
onPress: action.onPress,
|
|
61
|
-
style: ({ pressed }) => ({ opacity: pressed ? 0.6 : 1 })
|
|
62
|
-
},
|
|
63
|
-
action.icon
|
|
64
|
-
) : null,
|
|
65
|
-
hasValue ? /* @__PURE__ */ React.createElement(
|
|
66
|
-
Pressable,
|
|
67
|
-
{
|
|
68
|
-
accessibilityRole: "button",
|
|
69
|
-
accessibilityLabel: "Clear search",
|
|
70
|
-
hitSlop: 8,
|
|
71
|
-
onPress: handleClear,
|
|
72
|
-
style: ({ pressed }) => ({ opacity: pressed ? 0.6 : 1 })
|
|
73
|
-
},
|
|
74
|
-
/* @__PURE__ */ React.createElement(X, { size: 18, color: t["--icon-default"] })
|
|
75
|
-
) : null
|
|
78
|
+
}
|
|
76
79
|
);
|
|
77
80
|
}
|
|
78
81
|
const styles = StyleSheet.create({
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import "../../../chunk-ORMEWXMH.js";
|
|
2
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
3
|
import { Check, ChevronDown } from "lucide-react-native";
|
|
3
4
|
import { useState } from "react";
|
|
4
5
|
import { Pressable, ScrollView } from "react-native";
|
|
@@ -16,70 +17,77 @@ function Select({
|
|
|
16
17
|
const t = useTheme();
|
|
17
18
|
const [open, setOpen] = useState(false);
|
|
18
19
|
const selected = (_a = options.find((o) => o.value === value)) != null ? _a : null;
|
|
19
|
-
return /* @__PURE__ */
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
},
|
|
43
|
-
/* @__PURE__ */ React.createElement(Text, { variant: "body", color: selected ? "primary" : "muted" }, selected ? selected.label : placeholder),
|
|
44
|
-
/* @__PURE__ */ React.createElement(ChevronDown, { size: 20, color: t["--text-muted"] })
|
|
45
|
-
), /* @__PURE__ */ React.createElement(Sheet, { visible: open, onClose: () => setOpen(false) }, /* @__PURE__ */ React.createElement(
|
|
46
|
-
ScrollView,
|
|
47
|
-
{
|
|
48
|
-
contentContainerStyle: { paddingHorizontal: 16, paddingBottom: 8, gap: 4 },
|
|
49
|
-
keyboardShouldPersistTaps: "handled"
|
|
50
|
-
},
|
|
51
|
-
options.map((o) => {
|
|
52
|
-
var _a2;
|
|
53
|
-
const sel = o.value === value;
|
|
54
|
-
const optDisabled = (_a2 = o.disabled) != null ? _a2 : false;
|
|
55
|
-
return /* @__PURE__ */ React.createElement(
|
|
56
|
-
Pressable,
|
|
57
|
-
{
|
|
58
|
-
key: o.value,
|
|
59
|
-
onPress: () => {
|
|
60
|
-
if (optDisabled) return;
|
|
61
|
-
onChange(o.value);
|
|
62
|
-
setOpen(false);
|
|
63
|
-
},
|
|
64
|
-
disabled: optDisabled,
|
|
65
|
-
accessibilityRole: "menuitem",
|
|
66
|
-
accessibilityState: { selected: sel, disabled: optDisabled },
|
|
67
|
-
style: {
|
|
68
|
-
minHeight: 48,
|
|
69
|
-
flexDirection: "row",
|
|
70
|
-
alignItems: "center",
|
|
71
|
-
justifyContent: "space-between",
|
|
72
|
-
paddingHorizontal: 12,
|
|
73
|
-
borderRadius: 10,
|
|
74
|
-
backgroundColor: sel ? t["--surface-raised"] : "transparent",
|
|
75
|
-
opacity: optDisabled ? 0.5 : 1
|
|
76
|
-
}
|
|
20
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
21
|
+
/* @__PURE__ */ jsxs(
|
|
22
|
+
Pressable,
|
|
23
|
+
{
|
|
24
|
+
onPress: () => {
|
|
25
|
+
if (disabled) return;
|
|
26
|
+
setOpen(true);
|
|
27
|
+
},
|
|
28
|
+
disabled,
|
|
29
|
+
accessibilityRole: "button",
|
|
30
|
+
accessibilityState: { expanded: open, disabled },
|
|
31
|
+
accessibilityLabel: selected ? selected.label : placeholder,
|
|
32
|
+
style: {
|
|
33
|
+
height: 48,
|
|
34
|
+
borderRadius: 12,
|
|
35
|
+
borderWidth: 1,
|
|
36
|
+
borderColor: t["--border-default"],
|
|
37
|
+
backgroundColor: t["--surface-default"],
|
|
38
|
+
paddingHorizontal: 16,
|
|
39
|
+
flexDirection: "row",
|
|
40
|
+
alignItems: "center",
|
|
41
|
+
justifyContent: "space-between",
|
|
42
|
+
opacity: disabled ? 0.5 : 1
|
|
77
43
|
},
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
44
|
+
children: [
|
|
45
|
+
/* @__PURE__ */ jsx(Text, { variant: "body", color: selected ? "primary" : "muted", children: selected ? selected.label : placeholder }),
|
|
46
|
+
/* @__PURE__ */ jsx(ChevronDown, { size: 20, color: t["--text-muted"] })
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
),
|
|
50
|
+
/* @__PURE__ */ jsx(Sheet, { visible: open, onClose: () => setOpen(false), children: /* @__PURE__ */ jsx(
|
|
51
|
+
ScrollView,
|
|
52
|
+
{
|
|
53
|
+
contentContainerStyle: { paddingHorizontal: 16, paddingBottom: 8, gap: 4 },
|
|
54
|
+
keyboardShouldPersistTaps: "handled",
|
|
55
|
+
children: options.map((o) => {
|
|
56
|
+
var _a2;
|
|
57
|
+
const sel = o.value === value;
|
|
58
|
+
const optDisabled = (_a2 = o.disabled) != null ? _a2 : false;
|
|
59
|
+
return /* @__PURE__ */ jsxs(
|
|
60
|
+
Pressable,
|
|
61
|
+
{
|
|
62
|
+
onPress: () => {
|
|
63
|
+
if (optDisabled) return;
|
|
64
|
+
onChange(o.value);
|
|
65
|
+
setOpen(false);
|
|
66
|
+
},
|
|
67
|
+
disabled: optDisabled,
|
|
68
|
+
accessibilityRole: "menuitem",
|
|
69
|
+
accessibilityState: { selected: sel, disabled: optDisabled },
|
|
70
|
+
style: {
|
|
71
|
+
minHeight: 48,
|
|
72
|
+
flexDirection: "row",
|
|
73
|
+
alignItems: "center",
|
|
74
|
+
justifyContent: "space-between",
|
|
75
|
+
paddingHorizontal: 12,
|
|
76
|
+
borderRadius: 10,
|
|
77
|
+
backgroundColor: sel ? t["--surface-raised"] : "transparent",
|
|
78
|
+
opacity: optDisabled ? 0.5 : 1
|
|
79
|
+
},
|
|
80
|
+
children: [
|
|
81
|
+
/* @__PURE__ */ jsx(Text, { variant: "body", children: o.label }),
|
|
82
|
+
sel ? /* @__PURE__ */ jsx(Check, { size: 18, color: t["--brand-primary"] }) : null
|
|
83
|
+
]
|
|
84
|
+
},
|
|
85
|
+
o.value
|
|
86
|
+
);
|
|
87
|
+
})
|
|
88
|
+
}
|
|
89
|
+
) })
|
|
90
|
+
] });
|
|
83
91
|
}
|
|
84
92
|
export {
|
|
85
93
|
Select
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import "../../../chunk-ORMEWXMH.js";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
3
|
import { useEffect, useRef } from "react";
|
|
3
4
|
import { Animated, Modal, Pressable, View } from "react-native";
|
|
4
5
|
import { useTheme } from "./theme.js";
|
|
@@ -12,39 +13,44 @@ function Sheet({ visible, onClose, children }) {
|
|
|
12
13
|
translateY.setValue(800);
|
|
13
14
|
}
|
|
14
15
|
}, [visible, translateY]);
|
|
15
|
-
return /* @__PURE__ */
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
), /* @__PURE__ */ React.createElement(
|
|
24
|
-
Animated.View,
|
|
25
|
-
{
|
|
26
|
-
accessibilityViewIsModal: true,
|
|
27
|
-
style: {
|
|
28
|
-
position: "absolute",
|
|
29
|
-
left: 0,
|
|
30
|
-
right: 0,
|
|
31
|
-
bottom: 0,
|
|
32
|
-
maxHeight: "88%",
|
|
33
|
-
transform: [{ translateY }],
|
|
34
|
-
backgroundColor: t["--surface-default"],
|
|
35
|
-
borderTopLeftRadius: 20,
|
|
36
|
-
borderTopRightRadius: 20,
|
|
37
|
-
paddingBottom: 28
|
|
16
|
+
return /* @__PURE__ */ jsxs(Modal, { visible, transparent: true, animationType: "fade", onRequestClose: onClose, children: [
|
|
17
|
+
/* @__PURE__ */ jsx(
|
|
18
|
+
Pressable,
|
|
19
|
+
{
|
|
20
|
+
style: { flex: 1, backgroundColor: "rgba(0, 0, 0, 0.45)" },
|
|
21
|
+
onPress: onClose,
|
|
22
|
+
accessibilityRole: "button",
|
|
23
|
+
accessibilityLabel: "Fechar"
|
|
38
24
|
}
|
|
39
|
-
|
|
40
|
-
/* @__PURE__ */
|
|
41
|
-
View,
|
|
25
|
+
),
|
|
26
|
+
/* @__PURE__ */ jsxs(
|
|
27
|
+
Animated.View,
|
|
42
28
|
{
|
|
43
|
-
|
|
29
|
+
accessibilityViewIsModal: true,
|
|
30
|
+
style: {
|
|
31
|
+
position: "absolute",
|
|
32
|
+
left: 0,
|
|
33
|
+
right: 0,
|
|
34
|
+
bottom: 0,
|
|
35
|
+
maxHeight: "88%",
|
|
36
|
+
transform: [{ translateY }],
|
|
37
|
+
backgroundColor: t["--surface-default"],
|
|
38
|
+
borderTopLeftRadius: 20,
|
|
39
|
+
borderTopRightRadius: 20,
|
|
40
|
+
paddingBottom: 28
|
|
41
|
+
},
|
|
42
|
+
children: [
|
|
43
|
+
/* @__PURE__ */ jsx(View, { style: { alignItems: "center", paddingVertical: 10 }, children: /* @__PURE__ */ jsx(
|
|
44
|
+
View,
|
|
45
|
+
{
|
|
46
|
+
style: { width: 40, height: 4, borderRadius: 2, backgroundColor: t["--border-strong"] }
|
|
47
|
+
}
|
|
48
|
+
) }),
|
|
49
|
+
children
|
|
50
|
+
]
|
|
44
51
|
}
|
|
45
|
-
)
|
|
46
|
-
|
|
47
|
-
));
|
|
52
|
+
)
|
|
53
|
+
] });
|
|
48
54
|
}
|
|
49
55
|
export {
|
|
50
56
|
Sheet
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import "../../../chunk-ORMEWXMH.js";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
3
|
import { useEffect, useRef } from "react";
|
|
3
4
|
import { Animated, StyleSheet, View } from "react-native";
|
|
4
5
|
import { useTheme } from "./theme.js";
|
|
@@ -16,7 +17,7 @@ function Skeleton({ width = "100%", height = 16, radius = 8, circle = false }) {
|
|
|
16
17
|
return () => loop.stop();
|
|
17
18
|
}, [pulse]);
|
|
18
19
|
const size = circle ? typeof height === "number" ? height : 40 : void 0;
|
|
19
|
-
return /* @__PURE__ */
|
|
20
|
+
return /* @__PURE__ */ jsx(
|
|
20
21
|
Animated.View,
|
|
21
22
|
{
|
|
22
23
|
accessibilityElementsHidden: true,
|
|
@@ -32,14 +33,14 @@ function Skeleton({ width = "100%", height = 16, radius = 8, circle = false }) {
|
|
|
32
33
|
);
|
|
33
34
|
}
|
|
34
35
|
function SkeletonText({ lines = 3, gap = 8, lineHeight = 12 }) {
|
|
35
|
-
return /* @__PURE__ */
|
|
36
|
+
return /* @__PURE__ */ jsx(View, { style: [styles.stack, { gap }], children: Array.from({ length: lines }).map((_, i) => /* @__PURE__ */ jsx(
|
|
36
37
|
Skeleton,
|
|
37
38
|
{
|
|
38
|
-
key: i,
|
|
39
39
|
height: lineHeight,
|
|
40
40
|
width: i === lines - 1 ? "70%" : "100%"
|
|
41
|
-
}
|
|
42
|
-
|
|
41
|
+
},
|
|
42
|
+
i
|
|
43
|
+
)) });
|
|
43
44
|
}
|
|
44
45
|
const styles = StyleSheet.create({
|
|
45
46
|
stack: {
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
|
+
__spreadProps,
|
|
2
3
|
__spreadValues
|
|
3
4
|
} from "../../../chunk-ORMEWXMH.js";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
6
|
import { useRef, useState } from "react";
|
|
5
7
|
import {
|
|
6
8
|
PanResponder,
|
|
@@ -68,52 +70,58 @@ function Slider({
|
|
|
68
70
|
else if (name === "decrement") onChange(snap(value - step, min, max, step));
|
|
69
71
|
}
|
|
70
72
|
const thumbLeft = Math.max(0, pct * trackWidth - THUMB_SIZE / 2);
|
|
71
|
-
return /* @__PURE__ */
|
|
72
|
-
|
|
73
|
-
__spreadValues({
|
|
74
|
-
accessible: true,
|
|
75
|
-
accessibilityRole: "adjustable",
|
|
76
|
-
accessibilityLabel,
|
|
77
|
-
accessibilityState: { disabled },
|
|
78
|
-
accessibilityValue: { min, max, now: value },
|
|
79
|
-
accessibilityActions: [{ name: "increment" }, { name: "decrement" }],
|
|
80
|
-
onAccessibilityAction,
|
|
81
|
-
onLayout,
|
|
82
|
-
hitSlop: { top: 12, bottom: 12, left: 4, right: 4 },
|
|
83
|
-
style: [styles.trackArea, { opacity: disabled ? 0.5 : 1 }]
|
|
84
|
-
}, responder.panHandlers),
|
|
85
|
-
/* @__PURE__ */ React.createElement(
|
|
73
|
+
return /* @__PURE__ */ jsxs(View, { style: styles.row, children: [
|
|
74
|
+
/* @__PURE__ */ jsxs(
|
|
86
75
|
View,
|
|
87
|
-
{
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
76
|
+
__spreadProps(__spreadValues({
|
|
77
|
+
accessible: true,
|
|
78
|
+
accessibilityRole: "adjustable",
|
|
79
|
+
accessibilityLabel,
|
|
80
|
+
accessibilityState: { disabled },
|
|
81
|
+
accessibilityValue: { min, max, now: value },
|
|
82
|
+
accessibilityActions: [{ name: "increment" }, { name: "decrement" }],
|
|
83
|
+
onAccessibilityAction,
|
|
84
|
+
onLayout,
|
|
85
|
+
hitSlop: { top: 12, bottom: 12, left: 4, right: 4 },
|
|
86
|
+
style: [styles.trackArea, { opacity: disabled ? 0.5 : 1 }]
|
|
87
|
+
}, responder.panHandlers), {
|
|
88
|
+
children: [
|
|
89
|
+
/* @__PURE__ */ jsx(
|
|
90
|
+
View,
|
|
91
|
+
{
|
|
92
|
+
pointerEvents: "none",
|
|
93
|
+
style: [styles.track, { backgroundColor: t["--border-strong"] }]
|
|
94
|
+
}
|
|
95
|
+
),
|
|
96
|
+
/* @__PURE__ */ jsx(
|
|
97
|
+
View,
|
|
98
|
+
{
|
|
99
|
+
pointerEvents: "none",
|
|
100
|
+
style: [
|
|
101
|
+
styles.fill,
|
|
102
|
+
{ width: pct * trackWidth, backgroundColor: t["--brand-primary"] }
|
|
103
|
+
]
|
|
104
|
+
}
|
|
105
|
+
),
|
|
106
|
+
/* @__PURE__ */ jsx(
|
|
107
|
+
View,
|
|
108
|
+
{
|
|
109
|
+
pointerEvents: "none",
|
|
110
|
+
style: [
|
|
111
|
+
styles.thumb,
|
|
112
|
+
{
|
|
113
|
+
left: thumbLeft,
|
|
114
|
+
backgroundColor: t["--brand-primary"],
|
|
115
|
+
borderColor: t["--surface-default"]
|
|
116
|
+
}
|
|
117
|
+
]
|
|
118
|
+
}
|
|
119
|
+
)
|
|
99
120
|
]
|
|
100
|
-
}
|
|
121
|
+
})
|
|
101
122
|
),
|
|
102
|
-
/* @__PURE__ */
|
|
103
|
-
|
|
104
|
-
{
|
|
105
|
-
pointerEvents: "none",
|
|
106
|
-
style: [
|
|
107
|
-
styles.thumb,
|
|
108
|
-
{
|
|
109
|
-
left: thumbLeft,
|
|
110
|
-
backgroundColor: t["--brand-primary"],
|
|
111
|
-
borderColor: t["--surface-default"]
|
|
112
|
-
}
|
|
113
|
-
]
|
|
114
|
-
}
|
|
115
|
-
)
|
|
116
|
-
), showValue && /* @__PURE__ */ React.createElement(Text, { variant: "label", style: [styles.value, { color: t["--text-primary"] }] }, fmt(value)));
|
|
123
|
+
showValue && /* @__PURE__ */ jsx(Text, { variant: "label", style: [styles.value, { color: t["--text-primary"] }], children: fmt(value) })
|
|
124
|
+
] });
|
|
117
125
|
}
|
|
118
126
|
const styles = StyleSheet.create({
|
|
119
127
|
row: {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import "../../../chunk-ORMEWXMH.js";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
3
|
import { ActivityIndicator, View } from "react-native";
|
|
3
4
|
import { useTheme } from "./theme.js";
|
|
4
5
|
function Spinner({ size = "large" }) {
|
|
5
6
|
const t = useTheme();
|
|
6
|
-
return /* @__PURE__ */
|
|
7
|
+
return /* @__PURE__ */ jsx(View, { style: { flex: 1, alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ jsx(ActivityIndicator, { size, color: t["--brand-primary"] }) });
|
|
7
8
|
}
|
|
8
9
|
export {
|
|
9
10
|
Spinner
|
|
@@ -1,4 +1,5 @@
|
|
|
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";
|
|
@@ -18,15 +19,19 @@ function Stepper({
|
|
|
18
19
|
alignItems: "center",
|
|
19
20
|
justifyContent: "center"
|
|
20
21
|
};
|
|
21
|
-
return /* @__PURE__ */
|
|
22
|
-
Pressable,
|
|
23
|
-
{
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
22
|
+
return /* @__PURE__ */ jsxs(View, { style: { flexDirection: "row", alignItems: "center", gap: 8 }, children: [
|
|
23
|
+
/* @__PURE__ */ jsx(Pressable, { onPress: () => onChange(Math.max(min, value - 1)), hitSlop: 8, style: btn, children: /* @__PURE__ */ jsx(Text, { variant: "label", children: "\u2212" }) }),
|
|
24
|
+
/* @__PURE__ */ jsx(Text, { variant: "label", style: { minWidth: 24, textAlign: "center" }, children: value }),
|
|
25
|
+
/* @__PURE__ */ jsx(
|
|
26
|
+
Pressable,
|
|
27
|
+
{
|
|
28
|
+
onPress: () => onChange(max != null ? Math.min(max, value + 1) : value + 1),
|
|
29
|
+
hitSlop: 8,
|
|
30
|
+
style: btn,
|
|
31
|
+
children: /* @__PURE__ */ jsx(Text, { variant: "label", children: "+" })
|
|
32
|
+
}
|
|
33
|
+
)
|
|
34
|
+
] });
|
|
30
35
|
}
|
|
31
36
|
export {
|
|
32
37
|
Stepper
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import "../../../chunk-ORMEWXMH.js";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
3
|
import { Pressable, Switch as RNSwitch, View } from "react-native";
|
|
3
4
|
import { Text } from "./text.js";
|
|
4
5
|
import { useTheme } from "./theme.js";
|
|
@@ -9,7 +10,7 @@ function Switch({
|
|
|
9
10
|
accessibilityLabel
|
|
10
11
|
}) {
|
|
11
12
|
const t = useTheme();
|
|
12
|
-
return /* @__PURE__ */
|
|
13
|
+
return /* @__PURE__ */ jsx(
|
|
13
14
|
RNSwitch,
|
|
14
15
|
{
|
|
15
16
|
value,
|
|
@@ -28,12 +29,11 @@ function SegmentedControl({
|
|
|
28
29
|
disabled
|
|
29
30
|
}) {
|
|
30
31
|
const t = useTheme();
|
|
31
|
-
return /* @__PURE__ */
|
|
32
|
+
return /* @__PURE__ */ jsx(View, { style: { flexDirection: "row", gap: 6, opacity: disabled ? 0.5 : 1 }, children: segments.map((s) => {
|
|
32
33
|
const sel = s.value === value;
|
|
33
|
-
return /* @__PURE__ */
|
|
34
|
+
return /* @__PURE__ */ jsx(
|
|
34
35
|
Pressable,
|
|
35
36
|
{
|
|
36
|
-
key: s.value,
|
|
37
37
|
onPress: () => onChange(s.value),
|
|
38
38
|
disabled,
|
|
39
39
|
hitSlop: 8,
|
|
@@ -49,18 +49,19 @@ function SegmentedControl({
|
|
|
49
49
|
justifyContent: "center",
|
|
50
50
|
borderColor: sel ? t["--brand-primary"] : t["--border-default"],
|
|
51
51
|
backgroundColor: sel ? t["--brand-primary"] : t["--surface-default"]
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
/* @__PURE__ */ React.createElement(
|
|
55
|
-
Text,
|
|
56
|
-
{
|
|
57
|
-
variant: "label",
|
|
58
|
-
style: { color: sel ? t["--brand-on-primary"] : t["--text-primary"] }
|
|
59
52
|
},
|
|
60
|
-
|
|
61
|
-
|
|
53
|
+
children: /* @__PURE__ */ jsx(
|
|
54
|
+
Text,
|
|
55
|
+
{
|
|
56
|
+
variant: "label",
|
|
57
|
+
style: { color: sel ? t["--brand-on-primary"] : t["--text-primary"] },
|
|
58
|
+
children: s.label
|
|
59
|
+
}
|
|
60
|
+
)
|
|
61
|
+
},
|
|
62
|
+
s.value
|
|
62
63
|
);
|
|
63
|
-
}));
|
|
64
|
+
}) });
|
|
64
65
|
}
|
|
65
66
|
export {
|
|
66
67
|
SegmentedControl,
|
|
@@ -2,6 +2,7 @@ import {
|
|
|
2
2
|
__objRest,
|
|
3
3
|
__spreadValues
|
|
4
4
|
} from "../../../chunk-ORMEWXMH.js";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
6
|
import { Text as RNText } from "react-native";
|
|
6
7
|
import { fonts } from "../fonts.js";
|
|
7
8
|
import { useTheme } from "./theme.js";
|
|
@@ -24,7 +25,7 @@ const COLOR_TOKEN = {
|
|
|
24
25
|
function Text(_a) {
|
|
25
26
|
var _b = _a, { variant = "body", color = "primary", style } = _b, rest = __objRest(_b, ["variant", "color", "style"]);
|
|
26
27
|
const t = useTheme();
|
|
27
|
-
return /* @__PURE__ */
|
|
28
|
+
return /* @__PURE__ */ jsx(RNText, __spreadValues({ style: [VARIANT[variant], { color: t[COLOR_TOKEN[color]] }, style] }, rest));
|
|
28
29
|
}
|
|
29
30
|
export {
|
|
30
31
|
Text
|
|
@@ -2,6 +2,7 @@ import {
|
|
|
2
2
|
__objRest,
|
|
3
3
|
__spreadValues
|
|
4
4
|
} from "../../../chunk-ORMEWXMH.js";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
6
|
import { useState } from "react";
|
|
6
7
|
import {
|
|
7
8
|
StyleSheet,
|
|
@@ -56,7 +57,7 @@ function TextArea(_a) {
|
|
|
56
57
|
}
|
|
57
58
|
const maxHeight = maxRows * LINE_HEIGHT + VERTICAL_PADDING;
|
|
58
59
|
const autoGrowStyle = autoGrow ? { height: Math.min(contentHeight != null ? contentHeight : 0, maxHeight) || void 0, maxHeight } : null;
|
|
59
|
-
return /* @__PURE__ */
|
|
60
|
+
return /* @__PURE__ */ jsx(
|
|
60
61
|
TextInput,
|
|
61
62
|
__spreadValues({
|
|
62
63
|
multiline: true,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import "../../../chunk-ORMEWXMH.js";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
3
|
import { createContext, useContext } from "react";
|
|
3
4
|
import { useColorScheme } from "react-native";
|
|
4
5
|
import { dsTheme } from "../theme.js";
|
|
@@ -9,7 +10,7 @@ function DSThemeProvider({ children, scheme, theme }) {
|
|
|
9
10
|
const isDark = ((_a = scheme != null ? scheme : system) != null ? _a : "light") === "dark";
|
|
10
11
|
const mapa = theme != null ? theme : dsTheme;
|
|
11
12
|
const resolved = isDark ? mapa.dark : mapa.light;
|
|
12
|
-
return /* @__PURE__ */
|
|
13
|
+
return /* @__PURE__ */ jsx(ThemeContext.Provider, { value: resolved, children });
|
|
13
14
|
}
|
|
14
15
|
function useTheme() {
|
|
15
16
|
return useContext(ThemeContext);
|