@thewhileloop/whileui 1.2.2 → 2.0.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 +248 -85
- package/dist/blocks/chat/chat.d.ts +3 -4
- package/dist/blocks/chat/chat.js +29 -17
- package/dist/blocks/chat/index.d.ts +0 -1
- package/dist/blocks/chat/index.js +0 -1
- package/dist/blocks/commerce/checkout-summary.d.ts +1 -2
- package/dist/blocks/commerce/checkout-summary.js +16 -4
- package/dist/blocks/commerce/feature-gate.d.ts +1 -2
- package/dist/blocks/commerce/feature-gate.js +14 -4
- package/dist/blocks/commerce/index.d.ts +0 -1
- package/dist/blocks/commerce/index.js +0 -1
- package/dist/blocks/commerce/metric-card.d.ts +3 -4
- package/dist/blocks/commerce/metric-card.js +7 -3
- package/dist/blocks/commerce/plan-toggle.d.ts +1 -2
- package/dist/blocks/commerce/plan-toggle.js +11 -9
- package/dist/blocks/commerce/pricing-card.d.ts +1 -2
- package/dist/blocks/commerce/pricing-card.js +23 -6
- package/dist/blocks/commerce/product-card.d.ts +1 -2
- package/dist/blocks/commerce/product-card.js +23 -9
- package/dist/blocks/commerce/subscription-card.d.ts +1 -2
- package/dist/blocks/commerce/subscription-card.js +6 -3
- package/dist/blocks/commerce/upgrade-banner.d.ts +1 -2
- package/dist/blocks/commerce/upgrade-banner.js +13 -3
- package/dist/blocks/commerce/usage-bar.d.ts +1 -2
- package/dist/blocks/commerce/usage-bar.js +4 -2
- package/dist/blocks/datepicker/date-range-picker-modal.d.ts +2 -3
- package/dist/blocks/datepicker/date-range-picker-modal.js +33 -7
- package/dist/blocks/datepicker/datepicker-inline.d.ts +1 -2
- package/dist/blocks/datepicker/datepicker-inline.js +9 -3
- package/dist/blocks/datepicker/datepicker-modal.d.ts +2 -3
- package/dist/blocks/datepicker/datepicker-modal.js +49 -17
- package/dist/blocks/datepicker/index.d.ts +0 -1
- package/dist/blocks/datepicker/index.js +0 -1
- package/dist/blocks/datepicker/use-calendar-theme.d.ts +0 -1
- package/dist/blocks/datepicker/use-calendar-theme.js +0 -1
- package/dist/blocks/layout/action-bar.d.ts +1 -2
- package/dist/blocks/layout/action-bar.js +0 -1
- package/dist/blocks/layout/app-shell.d.ts +1 -2
- package/dist/blocks/layout/app-shell.js +11 -5
- package/dist/blocks/layout/confirm-action-sheet.d.ts +1 -2
- package/dist/blocks/layout/confirm-action-sheet.js +18 -6
- package/dist/blocks/layout/content-skeleton.d.ts +1 -2
- package/dist/blocks/layout/content-skeleton.js +22 -9
- package/dist/blocks/layout/docked-input.d.ts +11 -0
- package/dist/blocks/layout/docked-input.js +27 -0
- package/dist/blocks/layout/empty-state.d.ts +1 -2
- package/dist/blocks/layout/empty-state.js +10 -5
- package/dist/blocks/layout/error-boundary.d.ts +1 -2
- package/dist/blocks/layout/error-boundary.js +0 -2
- package/dist/blocks/layout/error-state.d.ts +1 -2
- package/dist/blocks/layout/error-state.js +0 -2
- package/dist/blocks/layout/form-modal-screen.d.ts +1 -2
- package/dist/blocks/layout/form-modal-screen.js +24 -21
- package/dist/blocks/layout/index.d.ts +2 -2
- package/dist/blocks/layout/index.js +2 -2
- package/dist/blocks/layout/keyboard-aware-screen.d.ts +14 -0
- package/dist/blocks/layout/keyboard-aware-screen.js +12 -0
- package/dist/blocks/layout/loading-screen.d.ts +1 -2
- package/dist/blocks/layout/loading-screen.js +6 -8
- package/dist/blocks/layout/page-skeleton.d.ts +1 -2
- package/dist/blocks/layout/page-skeleton.js +38 -20
- package/dist/blocks/layout/pull-to-refresh-scroll-view.d.ts +8 -4
- package/dist/blocks/layout/pull-to-refresh-scroll-view.js +17 -4
- package/dist/blocks/layout/screen-skeleton.d.ts +1 -2
- package/dist/blocks/layout/screen-skeleton.js +0 -1
- package/dist/blocks/layout/sheet.d.ts +9 -9
- package/dist/blocks/layout/sheet.js +51 -21
- package/dist/blocks/layout/smart-input.d.ts +6 -1
- package/dist/blocks/layout/smart-input.js +121 -9
- package/dist/blocks/lists/index.d.ts +0 -2
- package/dist/blocks/lists/index.js +0 -2
- package/dist/blocks/lists/list-item.d.ts +1 -2
- package/dist/blocks/lists/list-item.js +20 -6
- package/dist/blocks/lists/notification-item.d.ts +1 -2
- package/dist/blocks/lists/notification-item.js +19 -6
- package/dist/blocks/lists/timeline-feed.d.ts +1 -2
- package/dist/blocks/lists/timeline-feed.js +4 -2
- package/dist/blocks/media/index.d.ts +0 -1
- package/dist/blocks/media/index.js +0 -1
- package/dist/blocks/media/smart-image.d.ts +0 -1
- package/dist/blocks/media/smart-image.js +24 -8
- package/dist/blocks/navigation/bottom-nav.d.ts +1 -2
- package/dist/blocks/navigation/bottom-nav.js +7 -4
- package/dist/blocks/navigation/drawer-menu.d.ts +1 -2
- package/dist/blocks/navigation/drawer-menu.js +52 -15
- package/dist/blocks/navigation/floating-bottom-nav.d.ts +1 -2
- package/dist/blocks/navigation/floating-bottom-nav.js +14 -5
- package/dist/blocks/navigation/header.d.ts +2 -3
- package/dist/blocks/navigation/header.js +13 -5
- package/dist/blocks/navigation/index.d.ts +0 -2
- package/dist/blocks/navigation/index.js +0 -2
- package/dist/blocks/navigation/tab-bar.d.ts +1 -2
- package/dist/blocks/navigation/tab-bar.js +22 -10
- package/dist/blocks/splash/index.d.ts +0 -1
- package/dist/blocks/splash/index.js +0 -1
- package/dist/blocks/splash/splash-screen.d.ts +3 -4
- package/dist/blocks/splash/splash-screen.js +15 -11
- package/dist/components/accordion/accordion.d.ts +4 -5
- package/dist/components/accordion/accordion.js +6 -7
- package/dist/components/accordion/index.d.ts +0 -1
- package/dist/components/accordion/index.js +0 -1
- package/dist/components/alert/alert.d.ts +2 -3
- package/dist/components/alert/alert.js +19 -8
- package/dist/components/alert/index.d.ts +0 -1
- package/dist/components/alert/index.js +0 -1
- package/dist/components/alert-dialog/alert-dialog.d.ts +16 -12
- package/dist/components/alert-dialog/alert-dialog.js +184 -49
- package/dist/components/alert-dialog/index.d.ts +0 -1
- package/dist/components/alert-dialog/index.js +0 -1
- package/dist/components/aspect-ratio/aspect-ratio.d.ts +1 -2
- package/dist/components/aspect-ratio/aspect-ratio.js +0 -3
- package/dist/components/aspect-ratio/index.d.ts +0 -1
- package/dist/components/aspect-ratio/index.js +0 -1
- package/dist/components/avatar/avatar.d.ts +2 -3
- package/dist/components/avatar/avatar.js +7 -8
- package/dist/components/avatar/index.d.ts +0 -1
- package/dist/components/avatar/index.js +0 -1
- package/dist/components/badge/badge.d.ts +6 -7
- package/dist/components/badge/badge.js +21 -9
- package/dist/components/badge/index.d.ts +0 -1
- package/dist/components/badge/index.js +0 -1
- package/dist/components/button/button.d.ts +11 -10
- package/dist/components/button/button.js +62 -33
- package/dist/components/button/index.d.ts +0 -1
- package/dist/components/button/index.js +0 -1
- package/dist/components/card/card.d.ts +5 -3
- package/dist/components/card/card.js +28 -14
- package/dist/components/card/index.d.ts +0 -1
- package/dist/components/card/index.js +0 -1
- package/dist/components/checkbox/checkbox.d.ts +1 -2
- package/dist/components/checkbox/checkbox.js +15 -2
- package/dist/components/checkbox/index.d.ts +0 -1
- package/dist/components/checkbox/index.js +0 -1
- package/dist/components/collapsible/collapsible.d.ts +4 -4
- package/dist/components/collapsible/collapsible.js +8 -11
- package/dist/components/collapsible/index.d.ts +0 -1
- package/dist/components/collapsible/index.js +0 -1
- package/dist/components/container/container.d.ts +146 -0
- package/dist/components/container/container.js +43 -0
- package/dist/components/container/index.d.ts +1 -0
- package/dist/components/container/index.js +1 -0
- package/dist/components/context-menu/context-menu.d.ts +6 -7
- package/dist/components/context-menu/context-menu.js +42 -12
- package/dist/components/context-menu/index.d.ts +0 -1
- package/dist/components/context-menu/index.js +0 -1
- package/dist/components/data-row/data-row.d.ts +0 -1
- package/dist/components/data-row/data-row.js +35 -17
- package/dist/components/data-row/index.d.ts +0 -1
- package/dist/components/data-row/index.js +0 -1
- package/dist/components/dialog/dialog.d.ts +8 -9
- package/dist/components/dialog/dialog.js +48 -24
- package/dist/components/dialog/index.d.ts +0 -1
- package/dist/components/dialog/index.js +0 -1
- package/dist/components/dropdown-menu/dropdown-menu.d.ts +6 -7
- package/dist/components/dropdown-menu/dropdown-menu.js +45 -11
- package/dist/components/dropdown-menu/index.d.ts +0 -1
- package/dist/components/dropdown-menu/index.js +0 -1
- package/dist/components/form-field/form-field.d.ts +0 -1
- package/dist/components/form-field/form-field.js +26 -13
- package/dist/components/form-field/index.d.ts +0 -1
- package/dist/components/form-field/index.js +0 -1
- package/dist/components/hover-card/hover-card.d.ts +1 -2
- package/dist/components/hover-card/hover-card.js +12 -3
- package/dist/components/hover-card/index.d.ts +0 -1
- package/dist/components/hover-card/index.js +0 -1
- package/dist/components/input/index.d.ts +0 -1
- package/dist/components/input/index.js +0 -1
- package/dist/components/input/input.d.ts +2 -3
- package/dist/components/input/input.js +18 -3
- package/dist/components/label/index.d.ts +0 -1
- package/dist/components/label/index.js +0 -1
- package/dist/components/label/label.d.ts +0 -1
- package/dist/components/label/label.js +0 -1
- package/dist/components/labeled-field/index.d.ts +0 -1
- package/dist/components/labeled-field/index.js +0 -1
- package/dist/components/labeled-field/labeled-field.d.ts +1 -2
- package/dist/components/labeled-field/labeled-field.js +10 -2
- package/dist/components/menubar/index.d.ts +0 -1
- package/dist/components/menubar/index.js +0 -1
- package/dist/components/menubar/menubar.d.ts +7 -8
- package/dist/components/menubar/menubar.js +48 -15
- package/dist/components/numeric-input/index.d.ts +0 -1
- package/dist/components/numeric-input/index.js +0 -1
- package/dist/components/numeric-input/numeric-input.d.ts +6 -5
- package/dist/components/numeric-input/numeric-input.js +55 -26
- package/dist/components/otp-input/index.d.ts +0 -1
- package/dist/components/otp-input/index.js +0 -1
- package/dist/components/otp-input/otp-input.d.ts +3 -4
- package/dist/components/otp-input/otp-input.js +13 -9
- package/dist/components/popover/index.d.ts +0 -1
- package/dist/components/popover/index.js +0 -1
- package/dist/components/popover/popover.d.ts +4 -2
- package/dist/components/popover/popover.js +21 -4
- package/dist/components/pressable/index.d.ts +0 -1
- package/dist/components/pressable/index.js +0 -1
- package/dist/components/pressable/pressable.d.ts +7 -1
- package/dist/components/pressable/pressable.js +47 -4
- package/dist/components/progress/index.d.ts +0 -1
- package/dist/components/progress/index.js +0 -1
- package/dist/components/progress/progress.d.ts +0 -1
- package/dist/components/progress/progress.js +5 -2
- package/dist/components/radio-group/index.d.ts +0 -1
- package/dist/components/radio-group/index.js +0 -1
- package/dist/components/radio-group/radio-group.d.ts +2 -3
- package/dist/components/radio-group/radio-group.js +16 -7
- package/dist/components/row/index.d.ts +0 -1
- package/dist/components/row/index.js +0 -1
- package/dist/components/row/row.d.ts +0 -1
- package/dist/components/row/row.js +0 -1
- package/dist/components/segmented-control/index.d.ts +0 -1
- package/dist/components/segmented-control/index.js +0 -1
- package/dist/components/segmented-control/segmented-control.d.ts +7 -8
- package/dist/components/segmented-control/segmented-control.js +57 -24
- package/dist/components/select/index.d.ts +0 -1
- package/dist/components/select/index.js +0 -1
- package/dist/components/select/select.d.ts +15 -7
- package/dist/components/select/select.js +53 -11
- package/dist/components/separator/index.d.ts +0 -1
- package/dist/components/separator/index.js +0 -1
- package/dist/components/separator/separator.d.ts +0 -1
- package/dist/components/separator/separator.js +0 -1
- package/dist/components/skeleton/index.d.ts +0 -1
- package/dist/components/skeleton/index.js +0 -1
- package/dist/components/skeleton/skeleton.d.ts +3 -4
- package/dist/components/skeleton/skeleton.js +7 -8
- package/dist/components/spinner/index.d.ts +0 -1
- package/dist/components/spinner/index.js +0 -1
- package/dist/components/spinner/spinner.d.ts +1 -2
- package/dist/components/spinner/spinner.js +4 -2
- package/dist/components/stack/index.d.ts +0 -1
- package/dist/components/stack/index.js +0 -1
- package/dist/components/stack/stack.d.ts +0 -1
- package/dist/components/stack/stack.js +0 -1
- package/dist/components/switch/index.d.ts +0 -1
- package/dist/components/switch/index.js +0 -1
- package/dist/components/switch/switch.d.ts +1 -2
- package/dist/components/switch/switch.js +21 -2
- package/dist/components/tabs/index.d.ts +0 -1
- package/dist/components/tabs/index.js +0 -1
- package/dist/components/tabs/tabs.d.ts +6 -7
- package/dist/components/tabs/tabs.js +42 -12
- package/dist/components/text/index.d.ts +0 -1
- package/dist/components/text/index.js +0 -1
- package/dist/components/text/text.d.ts +0 -1
- package/dist/components/text/text.js +0 -1
- package/dist/components/textarea/index.d.ts +0 -1
- package/dist/components/textarea/index.js +0 -1
- package/dist/components/textarea/textarea.d.ts +2 -3
- package/dist/components/textarea/textarea.js +16 -8
- package/dist/components/toast/index.d.ts +0 -1
- package/dist/components/toast/index.js +0 -1
- package/dist/components/toast/toast.d.ts +5 -6
- package/dist/components/toast/toast.js +40 -24
- package/dist/components/toggle/index.d.ts +0 -1
- package/dist/components/toggle/index.js +0 -1
- package/dist/components/toggle/toggle.d.ts +6 -7
- package/dist/components/toggle/toggle.js +32 -16
- package/dist/components/toggle-group/index.d.ts +0 -1
- package/dist/components/toggle-group/index.js +0 -1
- package/dist/components/toggle-group/toggle-group.d.ts +7 -8
- package/dist/components/toggle-group/toggle-group.js +36 -19
- package/dist/components/tooltip/index.d.ts +0 -1
- package/dist/components/tooltip/index.js +0 -1
- package/dist/components/tooltip/tooltip.d.ts +1 -2
- package/dist/components/tooltip/tooltip.js +20 -3
- package/dist/components/view/index.d.ts +0 -1
- package/dist/components/view/index.js +0 -1
- package/dist/components/view/view.d.ts +0 -1
- package/dist/components/view/view.js +0 -1
- package/dist/index.d.ts +9 -3
- package/dist/index.js +9 -7
- package/dist/lib/cn.d.ts +0 -1
- package/dist/lib/cn.js +0 -1
- package/dist/lib/compose-event-handlers.d.ts +15 -0
- package/dist/lib/compose-event-handlers.js +20 -0
- package/dist/lib/focus-ring.d.ts +25 -0
- package/dist/lib/focus-ring.js +25 -0
- package/dist/lib/font-context.d.ts +1 -1
- package/dist/lib/font-context.js +6 -4
- package/dist/lib/frosted-surface.d.ts +0 -1
- package/dist/lib/frosted-surface.js +31 -6
- package/dist/lib/interaction-tokens.d.ts +12 -1
- package/dist/lib/interaction-tokens.js +27 -13
- package/dist/lib/motion-policy.d.ts +25 -0
- package/dist/lib/motion-policy.js +97 -0
- package/dist/lib/overlay-insets.d.ts +17 -0
- package/dist/lib/overlay-insets.js +23 -0
- package/dist/lib/portal.d.ts +0 -1
- package/dist/lib/portal.js +0 -1
- package/dist/lib/react-native-classname.d.ts +0 -1
- package/dist/lib/react-native-classname.js +0 -1
- package/dist/lib/recipes.d.ts +30 -0
- package/dist/lib/recipes.js +138 -0
- package/dist/lib/tap-only.d.ts +11 -0
- package/dist/lib/tap-only.js +24 -0
- package/dist/lib/theme-bridge.d.ts +0 -1
- package/dist/lib/theme-bridge.js +11 -3
- package/dist/lib/theme-colors.d.ts +2 -46
- package/dist/lib/theme-colors.js +25 -226
- package/dist/lib/theme-contract.d.ts +78 -0
- package/dist/lib/theme-contract.js +481 -0
- package/dist/lib/theme-derive.d.ts +4 -0
- package/dist/lib/theme-derive.js +80 -0
- package/dist/lib/theme-presets.d.ts +31 -0
- package/dist/lib/theme-presets.js +221 -0
- package/dist/lib/tv.d.ts +0 -1
- package/dist/lib/tv.js +0 -1
- package/dist/lib/visual-token-contract.d.ts +110 -0
- package/dist/lib/visual-token-contract.js +583 -0
- package/dist/lib/visual-tokens.d.ts +2 -38
- package/dist/lib/visual-tokens.js +22 -75
- package/dist/tokens.d.ts +4 -0
- package/dist/tokens.js +6 -0
- package/dist/vite.d.ts +0 -1
- package/dist/vite.js +0 -1
- package/package.json +30 -20
- package/dist/blocks/auth/forgot-password-form.d.ts +0 -10
- package/dist/blocks/auth/forgot-password-form.d.ts.map +0 -1
- package/dist/blocks/auth/forgot-password-form.js +0 -17
- package/dist/blocks/auth/forgot-password-form.js.map +0 -1
- package/dist/blocks/auth/index.d.ts +0 -8
- package/dist/blocks/auth/index.d.ts.map +0 -1
- package/dist/blocks/auth/index.js +0 -8
- package/dist/blocks/auth/index.js.map +0 -1
- package/dist/blocks/auth/reset-password-form.d.ts +0 -9
- package/dist/blocks/auth/reset-password-form.d.ts.map +0 -1
- package/dist/blocks/auth/reset-password-form.js +0 -16
- package/dist/blocks/auth/reset-password-form.js.map +0 -1
- package/dist/blocks/auth/sign-in-form.d.ts +0 -17
- package/dist/blocks/auth/sign-in-form.d.ts.map +0 -1
- package/dist/blocks/auth/sign-in-form.js +0 -19
- package/dist/blocks/auth/sign-in-form.js.map +0 -1
- package/dist/blocks/auth/sign-up-form.d.ts +0 -17
- package/dist/blocks/auth/sign-up-form.d.ts.map +0 -1
- package/dist/blocks/auth/sign-up-form.js +0 -21
- package/dist/blocks/auth/sign-up-form.js.map +0 -1
- package/dist/blocks/auth/social-connections.d.ts +0 -10
- package/dist/blocks/auth/social-connections.d.ts.map +0 -1
- package/dist/blocks/auth/social-connections.js +0 -8
- package/dist/blocks/auth/social-connections.js.map +0 -1
- package/dist/blocks/auth/user-menu.d.ts +0 -12
- package/dist/blocks/auth/user-menu.d.ts.map +0 -1
- package/dist/blocks/auth/user-menu.js +0 -10
- package/dist/blocks/auth/user-menu.js.map +0 -1
- package/dist/blocks/auth/verify-email-form.d.ts +0 -10
- package/dist/blocks/auth/verify-email-form.d.ts.map +0 -1
- package/dist/blocks/auth/verify-email-form.js +0 -17
- package/dist/blocks/auth/verify-email-form.js.map +0 -1
- package/dist/blocks/chat/chat.d.ts.map +0 -1
- package/dist/blocks/chat/chat.js.map +0 -1
- package/dist/blocks/chat/index.d.ts.map +0 -1
- package/dist/blocks/chat/index.js.map +0 -1
- package/dist/blocks/commerce/checkout-summary.d.ts.map +0 -1
- package/dist/blocks/commerce/checkout-summary.js.map +0 -1
- package/dist/blocks/commerce/feature-gate.d.ts.map +0 -1
- package/dist/blocks/commerce/feature-gate.js.map +0 -1
- package/dist/blocks/commerce/index.d.ts.map +0 -1
- package/dist/blocks/commerce/index.js.map +0 -1
- package/dist/blocks/commerce/metric-card.d.ts.map +0 -1
- package/dist/blocks/commerce/metric-card.js.map +0 -1
- package/dist/blocks/commerce/plan-toggle.d.ts.map +0 -1
- package/dist/blocks/commerce/plan-toggle.js.map +0 -1
- package/dist/blocks/commerce/pricing-card.d.ts.map +0 -1
- package/dist/blocks/commerce/pricing-card.js.map +0 -1
- package/dist/blocks/commerce/product-card.d.ts.map +0 -1
- package/dist/blocks/commerce/product-card.js.map +0 -1
- package/dist/blocks/commerce/subscription-card.d.ts.map +0 -1
- package/dist/blocks/commerce/subscription-card.js.map +0 -1
- package/dist/blocks/commerce/upgrade-banner.d.ts.map +0 -1
- package/dist/blocks/commerce/upgrade-banner.js.map +0 -1
- package/dist/blocks/commerce/usage-bar.d.ts.map +0 -1
- package/dist/blocks/commerce/usage-bar.js.map +0 -1
- package/dist/blocks/datepicker/date-range-picker-modal.d.ts.map +0 -1
- package/dist/blocks/datepicker/date-range-picker-modal.js.map +0 -1
- package/dist/blocks/datepicker/datepicker-inline.d.ts.map +0 -1
- package/dist/blocks/datepicker/datepicker-inline.js.map +0 -1
- package/dist/blocks/datepicker/datepicker-modal.d.ts.map +0 -1
- package/dist/blocks/datepicker/datepicker-modal.js.map +0 -1
- package/dist/blocks/datepicker/index.d.ts.map +0 -1
- package/dist/blocks/datepicker/index.js.map +0 -1
- package/dist/blocks/datepicker/use-calendar-theme.d.ts.map +0 -1
- package/dist/blocks/datepicker/use-calendar-theme.js.map +0 -1
- package/dist/blocks/layout/action-bar.d.ts.map +0 -1
- package/dist/blocks/layout/action-bar.js.map +0 -1
- package/dist/blocks/layout/app-shell.d.ts.map +0 -1
- package/dist/blocks/layout/app-shell.js.map +0 -1
- package/dist/blocks/layout/confirm-action-sheet.d.ts.map +0 -1
- package/dist/blocks/layout/confirm-action-sheet.js.map +0 -1
- package/dist/blocks/layout/content-skeleton.d.ts.map +0 -1
- package/dist/blocks/layout/content-skeleton.js.map +0 -1
- package/dist/blocks/layout/empty-state.d.ts.map +0 -1
- package/dist/blocks/layout/empty-state.js.map +0 -1
- package/dist/blocks/layout/error-boundary.d.ts.map +0 -1
- package/dist/blocks/layout/error-boundary.js.map +0 -1
- package/dist/blocks/layout/error-state.d.ts.map +0 -1
- package/dist/blocks/layout/error-state.js.map +0 -1
- package/dist/blocks/layout/form-modal-screen.d.ts.map +0 -1
- package/dist/blocks/layout/form-modal-screen.js.map +0 -1
- package/dist/blocks/layout/index.d.ts.map +0 -1
- package/dist/blocks/layout/index.js.map +0 -1
- package/dist/blocks/layout/loading-screen.d.ts.map +0 -1
- package/dist/blocks/layout/loading-screen.js.map +0 -1
- package/dist/blocks/layout/onboarding-screen.d.ts +0 -19
- package/dist/blocks/layout/onboarding-screen.d.ts.map +0 -1
- package/dist/blocks/layout/onboarding-screen.js +0 -35
- package/dist/blocks/layout/onboarding-screen.js.map +0 -1
- package/dist/blocks/layout/page-skeleton.d.ts.map +0 -1
- package/dist/blocks/layout/page-skeleton.js.map +0 -1
- package/dist/blocks/layout/pull-to-refresh-scroll-view.d.ts.map +0 -1
- package/dist/blocks/layout/pull-to-refresh-scroll-view.js.map +0 -1
- package/dist/blocks/layout/screen-skeleton.d.ts.map +0 -1
- package/dist/blocks/layout/screen-skeleton.js.map +0 -1
- package/dist/blocks/layout/sheet.d.ts.map +0 -1
- package/dist/blocks/layout/sheet.js.map +0 -1
- package/dist/blocks/layout/smart-image.d.ts +0 -9
- package/dist/blocks/layout/smart-image.d.ts.map +0 -1
- package/dist/blocks/layout/smart-image.js +0 -23
- package/dist/blocks/layout/smart-image.js.map +0 -1
- package/dist/blocks/layout/smart-input.d.ts.map +0 -1
- package/dist/blocks/layout/smart-input.js.map +0 -1
- package/dist/blocks/lists/index.d.ts.map +0 -1
- package/dist/blocks/lists/index.js.map +0 -1
- package/dist/blocks/lists/list-item.d.ts.map +0 -1
- package/dist/blocks/lists/list-item.js.map +0 -1
- package/dist/blocks/lists/notification-item.d.ts.map +0 -1
- package/dist/blocks/lists/notification-item.js.map +0 -1
- package/dist/blocks/lists/swipeable-item.d.ts +0 -17
- package/dist/blocks/lists/swipeable-item.d.ts.map +0 -1
- package/dist/blocks/lists/swipeable-item.js +0 -65
- package/dist/blocks/lists/swipeable-item.js.map +0 -1
- package/dist/blocks/lists/timeline-feed.d.ts.map +0 -1
- package/dist/blocks/lists/timeline-feed.js.map +0 -1
- package/dist/blocks/media/index.d.ts.map +0 -1
- package/dist/blocks/media/index.js.map +0 -1
- package/dist/blocks/media/smart-image.d.ts.map +0 -1
- package/dist/blocks/media/smart-image.js.map +0 -1
- package/dist/blocks/navigation/bottom-nav.d.ts.map +0 -1
- package/dist/blocks/navigation/bottom-nav.js.map +0 -1
- package/dist/blocks/navigation/drawer-menu.d.ts.map +0 -1
- package/dist/blocks/navigation/drawer-menu.js.map +0 -1
- package/dist/blocks/navigation/floating-bottom-nav.d.ts.map +0 -1
- package/dist/blocks/navigation/floating-bottom-nav.js.map +0 -1
- package/dist/blocks/navigation/header.d.ts.map +0 -1
- package/dist/blocks/navigation/header.js.map +0 -1
- package/dist/blocks/navigation/index.d.ts.map +0 -1
- package/dist/blocks/navigation/index.js.map +0 -1
- package/dist/blocks/navigation/navigation-sidebar.d.ts +0 -25
- package/dist/blocks/navigation/navigation-sidebar.d.ts.map +0 -1
- package/dist/blocks/navigation/navigation-sidebar.js +0 -18
- package/dist/blocks/navigation/navigation-sidebar.js.map +0 -1
- package/dist/blocks/navigation/tab-bar.d.ts.map +0 -1
- package/dist/blocks/navigation/tab-bar.js.map +0 -1
- package/dist/blocks/profile/account-card.d.ts +0 -11
- package/dist/blocks/profile/account-card.d.ts.map +0 -1
- package/dist/blocks/profile/account-card.js +0 -10
- package/dist/blocks/profile/account-card.js.map +0 -1
- package/dist/blocks/profile/index.d.ts +0 -5
- package/dist/blocks/profile/index.d.ts.map +0 -1
- package/dist/blocks/profile/index.js +0 -5
- package/dist/blocks/profile/index.js.map +0 -1
- package/dist/blocks/profile/profile-header.d.ts +0 -27
- package/dist/blocks/profile/profile-header.d.ts.map +0 -1
- package/dist/blocks/profile/profile-header.js +0 -11
- package/dist/blocks/profile/profile-header.js.map +0 -1
- package/dist/blocks/profile/settings-item.d.ts +0 -15
- package/dist/blocks/profile/settings-item.d.ts.map +0 -1
- package/dist/blocks/profile/settings-item.js +0 -11
- package/dist/blocks/profile/settings-item.js.map +0 -1
- package/dist/blocks/profile/settings-section.d.ts +0 -7
- package/dist/blocks/profile/settings-section.d.ts.map +0 -1
- package/dist/blocks/profile/settings-section.js +0 -9
- package/dist/blocks/profile/settings-section.js.map +0 -1
- package/dist/blocks/splash/index.d.ts.map +0 -1
- package/dist/blocks/splash/index.js.map +0 -1
- package/dist/blocks/splash/splash-screen.d.ts.map +0 -1
- package/dist/blocks/splash/splash-screen.js.map +0 -1
- package/dist/components/accordion/accordion.d.ts.map +0 -1
- package/dist/components/accordion/accordion.js.map +0 -1
- package/dist/components/accordion/index.d.ts.map +0 -1
- package/dist/components/accordion/index.js.map +0 -1
- package/dist/components/alert/alert.d.ts.map +0 -1
- package/dist/components/alert/alert.js.map +0 -1
- package/dist/components/alert/index.d.ts.map +0 -1
- package/dist/components/alert/index.js.map +0 -1
- package/dist/components/alert-dialog/alert-dialog.d.ts.map +0 -1
- package/dist/components/alert-dialog/alert-dialog.js.map +0 -1
- package/dist/components/alert-dialog/index.d.ts.map +0 -1
- package/dist/components/alert-dialog/index.js.map +0 -1
- package/dist/components/aspect-ratio/aspect-ratio.d.ts.map +0 -1
- package/dist/components/aspect-ratio/aspect-ratio.js.map +0 -1
- package/dist/components/aspect-ratio/index.d.ts.map +0 -1
- package/dist/components/aspect-ratio/index.js.map +0 -1
- package/dist/components/avatar/avatar.d.ts.map +0 -1
- package/dist/components/avatar/avatar.js.map +0 -1
- package/dist/components/avatar/index.d.ts.map +0 -1
- package/dist/components/avatar/index.js.map +0 -1
- package/dist/components/badge/badge.d.ts.map +0 -1
- package/dist/components/badge/badge.js.map +0 -1
- package/dist/components/badge/index.d.ts.map +0 -1
- package/dist/components/badge/index.js.map +0 -1
- package/dist/components/box/box.d.ts +0 -143
- package/dist/components/box/box.d.ts.map +0 -1
- package/dist/components/box/box.js +0 -38
- package/dist/components/box/box.js.map +0 -1
- package/dist/components/box/index.d.ts +0 -2
- package/dist/components/box/index.d.ts.map +0 -1
- package/dist/components/box/index.js +0 -2
- package/dist/components/box/index.js.map +0 -1
- package/dist/components/button/button.d.ts.map +0 -1
- package/dist/components/button/button.js.map +0 -1
- package/dist/components/button/index.d.ts.map +0 -1
- package/dist/components/button/index.js.map +0 -1
- package/dist/components/card/card.d.ts.map +0 -1
- package/dist/components/card/card.js.map +0 -1
- package/dist/components/card/index.d.ts.map +0 -1
- package/dist/components/card/index.js.map +0 -1
- package/dist/components/checkbox/checkbox.d.ts.map +0 -1
- package/dist/components/checkbox/checkbox.js.map +0 -1
- package/dist/components/checkbox/index.d.ts.map +0 -1
- package/dist/components/checkbox/index.js.map +0 -1
- package/dist/components/collapsible/collapsible.d.ts.map +0 -1
- package/dist/components/collapsible/collapsible.js.map +0 -1
- package/dist/components/collapsible/index.d.ts.map +0 -1
- package/dist/components/collapsible/index.js.map +0 -1
- package/dist/components/context-menu/context-menu.d.ts.map +0 -1
- package/dist/components/context-menu/context-menu.js.map +0 -1
- package/dist/components/context-menu/index.d.ts.map +0 -1
- package/dist/components/context-menu/index.js.map +0 -1
- package/dist/components/data-row/data-row.d.ts.map +0 -1
- package/dist/components/data-row/data-row.js.map +0 -1
- package/dist/components/data-row/index.d.ts.map +0 -1
- package/dist/components/data-row/index.js.map +0 -1
- package/dist/components/dialog/dialog.d.ts.map +0 -1
- package/dist/components/dialog/dialog.js.map +0 -1
- package/dist/components/dialog/index.d.ts.map +0 -1
- package/dist/components/dialog/index.js.map +0 -1
- package/dist/components/dropdown-menu/dropdown-menu.d.ts.map +0 -1
- package/dist/components/dropdown-menu/dropdown-menu.js.map +0 -1
- package/dist/components/dropdown-menu/index.d.ts.map +0 -1
- package/dist/components/dropdown-menu/index.js.map +0 -1
- package/dist/components/form-field/form-field.d.ts.map +0 -1
- package/dist/components/form-field/form-field.js.map +0 -1
- package/dist/components/form-field/index.d.ts.map +0 -1
- package/dist/components/form-field/index.js.map +0 -1
- package/dist/components/hover-card/hover-card.d.ts.map +0 -1
- package/dist/components/hover-card/hover-card.js.map +0 -1
- package/dist/components/hover-card/index.d.ts.map +0 -1
- package/dist/components/hover-card/index.js.map +0 -1
- package/dist/components/input/index.d.ts.map +0 -1
- package/dist/components/input/index.js.map +0 -1
- package/dist/components/input/input.d.ts.map +0 -1
- package/dist/components/input/input.js.map +0 -1
- package/dist/components/label/index.d.ts.map +0 -1
- package/dist/components/label/index.js.map +0 -1
- package/dist/components/label/label.d.ts.map +0 -1
- package/dist/components/label/label.js.map +0 -1
- package/dist/components/labeled-field/index.d.ts.map +0 -1
- package/dist/components/labeled-field/index.js.map +0 -1
- package/dist/components/labeled-field/labeled-field.d.ts.map +0 -1
- package/dist/components/labeled-field/labeled-field.js.map +0 -1
- package/dist/components/layout/index.d.ts +0 -2
- package/dist/components/layout/index.d.ts.map +0 -1
- package/dist/components/layout/index.js +0 -2
- package/dist/components/layout/index.js.map +0 -1
- package/dist/components/layout/layout.d.ts +0 -395
- package/dist/components/layout/layout.d.ts.map +0 -1
- package/dist/components/layout/layout.js +0 -93
- package/dist/components/layout/layout.js.map +0 -1
- package/dist/components/menubar/index.d.ts.map +0 -1
- package/dist/components/menubar/index.js.map +0 -1
- package/dist/components/menubar/menubar.d.ts.map +0 -1
- package/dist/components/menubar/menubar.js.map +0 -1
- package/dist/components/numeric-input/index.d.ts.map +0 -1
- package/dist/components/numeric-input/index.js.map +0 -1
- package/dist/components/numeric-input/numeric-input.d.ts.map +0 -1
- package/dist/components/numeric-input/numeric-input.js.map +0 -1
- package/dist/components/otp-input/index.d.ts.map +0 -1
- package/dist/components/otp-input/index.js.map +0 -1
- package/dist/components/otp-input/otp-input.d.ts.map +0 -1
- package/dist/components/otp-input/otp-input.js.map +0 -1
- package/dist/components/popover/index.d.ts.map +0 -1
- package/dist/components/popover/index.js.map +0 -1
- package/dist/components/popover/popover.d.ts.map +0 -1
- package/dist/components/popover/popover.js.map +0 -1
- package/dist/components/pressable/index.d.ts.map +0 -1
- package/dist/components/pressable/index.js.map +0 -1
- package/dist/components/pressable/pressable.d.ts.map +0 -1
- package/dist/components/pressable/pressable.js.map +0 -1
- package/dist/components/progress/index.d.ts.map +0 -1
- package/dist/components/progress/index.js.map +0 -1
- package/dist/components/progress/progress.d.ts.map +0 -1
- package/dist/components/progress/progress.js.map +0 -1
- package/dist/components/radio-group/index.d.ts.map +0 -1
- package/dist/components/radio-group/index.js.map +0 -1
- package/dist/components/radio-group/radio-group.d.ts.map +0 -1
- package/dist/components/radio-group/radio-group.js.map +0 -1
- package/dist/components/row/index.d.ts.map +0 -1
- package/dist/components/row/index.js.map +0 -1
- package/dist/components/row/row.d.ts.map +0 -1
- package/dist/components/row/row.js.map +0 -1
- package/dist/components/segmented-control/index.d.ts.map +0 -1
- package/dist/components/segmented-control/index.js.map +0 -1
- package/dist/components/segmented-control/segmented-control.d.ts.map +0 -1
- package/dist/components/segmented-control/segmented-control.js.map +0 -1
- package/dist/components/select/index.d.ts.map +0 -1
- package/dist/components/select/index.js.map +0 -1
- package/dist/components/select/select.d.ts.map +0 -1
- package/dist/components/select/select.js.map +0 -1
- package/dist/components/separator/index.d.ts.map +0 -1
- package/dist/components/separator/index.js.map +0 -1
- package/dist/components/separator/separator.d.ts.map +0 -1
- package/dist/components/separator/separator.js.map +0 -1
- package/dist/components/skeleton/index.d.ts.map +0 -1
- package/dist/components/skeleton/index.js.map +0 -1
- package/dist/components/skeleton/skeleton.d.ts.map +0 -1
- package/dist/components/skeleton/skeleton.js.map +0 -1
- package/dist/components/spinner/index.d.ts.map +0 -1
- package/dist/components/spinner/index.js.map +0 -1
- package/dist/components/spinner/spinner.d.ts.map +0 -1
- package/dist/components/spinner/spinner.js.map +0 -1
- package/dist/components/stack/index.d.ts.map +0 -1
- package/dist/components/stack/index.js.map +0 -1
- package/dist/components/stack/stack.d.ts.map +0 -1
- package/dist/components/stack/stack.js.map +0 -1
- package/dist/components/switch/index.d.ts.map +0 -1
- package/dist/components/switch/index.js.map +0 -1
- package/dist/components/switch/switch.d.ts.map +0 -1
- package/dist/components/switch/switch.js.map +0 -1
- package/dist/components/tabs/index.d.ts.map +0 -1
- package/dist/components/tabs/index.js.map +0 -1
- package/dist/components/tabs/tabs.d.ts.map +0 -1
- package/dist/components/tabs/tabs.js.map +0 -1
- package/dist/components/text/index.d.ts.map +0 -1
- package/dist/components/text/index.js.map +0 -1
- package/dist/components/text/text.d.ts.map +0 -1
- package/dist/components/text/text.js.map +0 -1
- package/dist/components/textarea/index.d.ts.map +0 -1
- package/dist/components/textarea/index.js.map +0 -1
- package/dist/components/textarea/textarea.d.ts.map +0 -1
- package/dist/components/textarea/textarea.js.map +0 -1
- package/dist/components/toast/index.d.ts.map +0 -1
- package/dist/components/toast/index.js.map +0 -1
- package/dist/components/toast/toast.d.ts.map +0 -1
- package/dist/components/toast/toast.js.map +0 -1
- package/dist/components/toggle/index.d.ts.map +0 -1
- package/dist/components/toggle/index.js.map +0 -1
- package/dist/components/toggle/toggle.d.ts.map +0 -1
- package/dist/components/toggle/toggle.js.map +0 -1
- package/dist/components/toggle-group/index.d.ts.map +0 -1
- package/dist/components/toggle-group/index.js.map +0 -1
- package/dist/components/toggle-group/toggle-group.d.ts.map +0 -1
- package/dist/components/toggle-group/toggle-group.js.map +0 -1
- package/dist/components/tooltip/index.d.ts.map +0 -1
- package/dist/components/tooltip/index.js.map +0 -1
- package/dist/components/tooltip/tooltip.d.ts.map +0 -1
- package/dist/components/tooltip/tooltip.js.map +0 -1
- package/dist/components/view/index.d.ts.map +0 -1
- package/dist/components/view/index.js.map +0 -1
- package/dist/components/view/view.d.ts.map +0 -1
- package/dist/components/view/view.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/lib/cn.d.ts.map +0 -1
- package/dist/lib/cn.js.map +0 -1
- package/dist/lib/font-context.d.ts.map +0 -1
- package/dist/lib/font-context.js.map +0 -1
- package/dist/lib/frosted-surface.d.ts.map +0 -1
- package/dist/lib/frosted-surface.js.map +0 -1
- package/dist/lib/index.d.ts +0 -6
- package/dist/lib/index.d.ts.map +0 -1
- package/dist/lib/index.js +0 -6
- package/dist/lib/index.js.map +0 -1
- package/dist/lib/interaction-tokens.d.ts.map +0 -1
- package/dist/lib/interaction-tokens.js.map +0 -1
- package/dist/lib/portal.d.ts.map +0 -1
- package/dist/lib/portal.js.map +0 -1
- package/dist/lib/react-native-classname.d.ts.map +0 -1
- package/dist/lib/react-native-classname.js.map +0 -1
- package/dist/lib/theme-bridge.d.ts.map +0 -1
- package/dist/lib/theme-bridge.js.map +0 -1
- package/dist/lib/theme-colors.d.ts.map +0 -1
- package/dist/lib/theme-colors.js.map +0 -1
- package/dist/lib/tv.d.ts.map +0 -1
- package/dist/lib/tv.js.map +0 -1
- package/dist/lib/visual-tokens.d.ts.map +0 -1
- package/dist/lib/visual-tokens.js.map +0 -1
- package/dist/vite.d.ts.map +0 -1
- package/dist/vite.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { useCallback, useMemo, useState } from 'react';
|
|
2
|
+
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
3
3
|
import { Modal, Pressable, View } from 'react-native';
|
|
4
4
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
5
5
|
import { useUniwind } from 'uniwind';
|
|
@@ -8,6 +8,8 @@ import { Text } from '../../components/text';
|
|
|
8
8
|
import { Button, ButtonText } from '../../components/button';
|
|
9
9
|
import { cn } from '../../lib/cn';
|
|
10
10
|
import { useThemeColors } from '../../lib/theme-colors';
|
|
11
|
+
import { useVisualTokens } from '../../lib/visual-tokens';
|
|
12
|
+
import { fieldRecipe, surfacePadding, surfaceRadius, typographyStyle } from '../../lib/recipes';
|
|
11
13
|
import { useFrostedSurface } from '../../lib/frosted-surface';
|
|
12
14
|
import { useCalendarTheme } from './use-calendar-theme';
|
|
13
15
|
function formatRangeDisplay(range) {
|
|
@@ -49,6 +51,7 @@ export function DateRangePickerModal({ value, onValueChange, open, onOpenChange,
|
|
|
49
51
|
const insets = useSafeAreaInsets();
|
|
50
52
|
const { theme } = useUniwind();
|
|
51
53
|
const colors = useThemeColors();
|
|
54
|
+
const visual = useVisualTokens();
|
|
52
55
|
const frostedSurface = useFrostedSurface({
|
|
53
56
|
frosted,
|
|
54
57
|
blurIntensity,
|
|
@@ -61,9 +64,22 @@ export function DateRangePickerModal({ value, onValueChange, open, onOpenChange,
|
|
|
61
64
|
calendarTheme.monthTextColor ??
|
|
62
65
|
calendarTheme.dayTextColor ??
|
|
63
66
|
colors.foreground;
|
|
64
|
-
const
|
|
67
|
+
const arrowFontSize = typographyStyle(visual, 'body').fontSize;
|
|
68
|
+
const renderArrow = useCallback((direction) => (_jsx(Text, { className: "font-medium", style: { color: arrowColor, fontSize: arrowFontSize }, children: direction === 'left' ? '<' : '>' })), [arrowColor, arrowFontSize]);
|
|
65
69
|
const [draftStart, setDraftStart] = useState(value?.start ?? null);
|
|
66
70
|
const [draftEnd, setDraftEnd] = useState(value?.end ?? null);
|
|
71
|
+
const prevOpenRef = useRef(open);
|
|
72
|
+
useEffect(() => {
|
|
73
|
+
if (open && !prevOpenRef.current) {
|
|
74
|
+
setDraftStart(value?.start ?? null);
|
|
75
|
+
setDraftEnd(value?.end ?? null);
|
|
76
|
+
}
|
|
77
|
+
else if (!open && prevOpenRef.current) {
|
|
78
|
+
setDraftStart(null);
|
|
79
|
+
setDraftEnd(null);
|
|
80
|
+
}
|
|
81
|
+
prevOpenRef.current = open;
|
|
82
|
+
}, [open, value]);
|
|
67
83
|
const markedDates = useMemo(() => {
|
|
68
84
|
const color = calendarTheme.selectedDayBackgroundColor;
|
|
69
85
|
const textColor = calendarTheme.selectedDayTextColor;
|
|
@@ -120,14 +136,24 @@ export function DateRangePickerModal({ value, onValueChange, open, onOpenChange,
|
|
|
120
136
|
setDraftStart(null);
|
|
121
137
|
setDraftEnd(null);
|
|
122
138
|
}, [onOpenChange]);
|
|
123
|
-
return (_jsxs(_Fragment, { children: [trigger ? (_jsx(Pressable, { onPress: handleOpen, className: cn('
|
|
124
|
-
{
|
|
139
|
+
return (_jsxs(_Fragment, { children: [trigger ? (_jsx(Pressable, { accessibilityRole: "button", onPress: handleOpen, className: cn('w-full flex-row items-center border-border bg-muted', className), style: fieldRecipe(visual, 'default'), children: trigger })) : null, _jsx(Modal, { visible: open, transparent: true, animationType: "slide", statusBarTranslucent: true, navigationBarTranslucent: true, onRequestClose: handleBackdropPress, children: _jsx(Pressable, { accessible: false, importantForAccessibility: "no", className: "flex-1 justify-end", style: { backgroundColor: colors.overlay }, onPress: handleBackdropPress, children: _jsxs(Pressable, { accessible: false, className: cn('border border-border relative overflow-hidden', frosted ? 'bg-transparent' : 'bg-background'), style: [
|
|
140
|
+
{
|
|
141
|
+
borderTopLeftRadius: surfaceRadius(visual, 'xl'),
|
|
142
|
+
borderTopRightRadius: surfaceRadius(visual, 'xl'),
|
|
143
|
+
paddingBottom: Math.max(insets.bottom, surfacePadding(visual, 'sm')),
|
|
144
|
+
},
|
|
125
145
|
frostedSurface.surfaceStyle,
|
|
126
|
-
], onPress: (e) => e.stopPropagation(), children: [frostedSurface.overlay, _jsxs(View, { className: "flex-row items-center justify-between border-b border-border
|
|
146
|
+
], onPress: (e) => e.stopPropagation(), children: [frostedSurface.overlay, _jsxs(View, { className: "flex-row items-center justify-between border-b border-border", style: {
|
|
147
|
+
paddingHorizontal: surfacePadding(visual, 'sm'),
|
|
148
|
+
paddingVertical: visual.controlPaddingYDefault,
|
|
149
|
+
}, children: [_jsx(Text, { className: "font-medium text-foreground", style: typographyStyle(visual, 'body'), children: title }), _jsx(Button, { size: "sm", onPress: handleConfirm, children: _jsx(ButtonText, { children: confirmLabel }) })] }), _jsx(View, { style: { padding: surfacePadding(visual, 'sm') }, children: _jsx(View, { className: "border-border overflow-hidden", style: {
|
|
150
|
+
borderRadius: surfaceRadius(visual, 'lg'),
|
|
151
|
+
borderWidth: visual.borderWidthHairline,
|
|
152
|
+
}, children: _jsx(Calendar, { current: draftStart ?? value?.start ?? undefined, onDayPress: handleDayPress, markedDates: markedDates, markingType: "period", minDate: minDate, maxDate: maxDate, theme: calendarTheme, renderArrow: renderArrow, enableSwipeMonths: true }, theme) }) })] }) }) })] }));
|
|
127
153
|
}
|
|
128
154
|
/** Compact trigger showing formatted range. Use as DateRangePickerModal's trigger prop. */
|
|
129
155
|
export function DateRangePickerTrigger({ value, placeholder = 'Select date range', className, }) {
|
|
130
|
-
|
|
156
|
+
const visual = useVisualTokens();
|
|
157
|
+
return (_jsxs(View, { className: cn('flex-1 flex-row items-center min-w-0', className), children: [_jsx(Text, { className: cn('flex-1', value ? 'text-foreground' : 'text-muted-foreground'), style: typographyStyle(visual, 'body'), numberOfLines: 1, children: value ? formatRangeDisplay(value) : placeholder }), _jsx(View, { className: "ml-2 shrink-0 h-2 w-2 rotate-45 border-b-2 border-r-2 border-muted-foreground" })] }));
|
|
131
158
|
}
|
|
132
159
|
export { formatRangeDisplay };
|
|
133
|
-
//# sourceMappingURL=date-range-picker-modal.js.map
|
|
@@ -12,5 +12,4 @@ export interface DatePickerInlineProps {
|
|
|
12
12
|
theme?: CalendarTheme;
|
|
13
13
|
className?: string;
|
|
14
14
|
}
|
|
15
|
-
export declare function DatePickerInline({ value, onValueChange, minDate, maxDate, theme: customTheme, className, }: DatePickerInlineProps): import("react
|
|
16
|
-
//# sourceMappingURL=datepicker-inline.d.ts.map
|
|
15
|
+
export declare function DatePickerInline({ value, onValueChange, minDate, maxDate, theme: customTheme, className, }: DatePickerInlineProps): import("react").JSX.Element;
|
|
@@ -6,16 +6,20 @@ import { Calendar } from 'react-native-calendars';
|
|
|
6
6
|
import { Text } from '../../components/text';
|
|
7
7
|
import { cn } from '../../lib/cn';
|
|
8
8
|
import { useThemeColors } from '../../lib/theme-colors';
|
|
9
|
+
import { useVisualTokens } from '../../lib/visual-tokens';
|
|
10
|
+
import { surfaceRadius, typographyStyle } from '../../lib/recipes';
|
|
9
11
|
import { useCalendarTheme } from './use-calendar-theme';
|
|
10
12
|
export function DatePickerInline({ value, onValueChange, minDate, maxDate, theme: customTheme, className, }) {
|
|
11
13
|
const { theme } = useUniwind();
|
|
12
14
|
const colors = useThemeColors();
|
|
15
|
+
const visual = useVisualTokens();
|
|
13
16
|
const calendarTheme = useCalendarTheme(customTheme);
|
|
14
17
|
const arrowColor = calendarTheme.arrowColor ??
|
|
15
18
|
calendarTheme.monthTextColor ??
|
|
16
19
|
calendarTheme.dayTextColor ??
|
|
17
20
|
colors.foreground;
|
|
18
|
-
const
|
|
21
|
+
const arrowFontSize = typographyStyle(visual, 'body').fontSize;
|
|
22
|
+
const renderArrow = useCallback((direction) => (_jsx(Text, { className: "font-medium", style: { color: arrowColor, fontSize: arrowFontSize }, children: direction === 'left' ? '<' : '>' })), [arrowColor, arrowFontSize]);
|
|
19
23
|
const markedDates = useMemo(() => {
|
|
20
24
|
if (!value)
|
|
21
25
|
return undefined;
|
|
@@ -30,6 +34,8 @@ export function DatePickerInline({ value, onValueChange, minDate, maxDate, theme
|
|
|
30
34
|
const handleDayPress = (day) => {
|
|
31
35
|
onValueChange?.(day.dateString);
|
|
32
36
|
};
|
|
33
|
-
return (_jsx(View, { className: cn('overflow-hidden
|
|
37
|
+
return (_jsx(View, { className: cn('overflow-hidden border-border', className), style: {
|
|
38
|
+
borderRadius: surfaceRadius(visual, 'lg'),
|
|
39
|
+
borderWidth: visual.borderWidthHairline,
|
|
40
|
+
}, children: _jsx(Calendar, { current: value ?? undefined, onDayPress: handleDayPress, markedDates: markedDates, minDate: minDate, maxDate: maxDate, theme: calendarTheme, renderArrow: renderArrow, enableSwipeMonths: true }, theme) }));
|
|
34
41
|
}
|
|
35
|
-
//# sourceMappingURL=datepicker-inline.js.map
|
|
@@ -25,12 +25,11 @@ export interface DatePickerModalProps extends FrostedSurfaceProps {
|
|
|
25
25
|
className?: string;
|
|
26
26
|
}
|
|
27
27
|
declare function formatDisplayDate(dateString: string | null | undefined): string;
|
|
28
|
-
export declare function DatePickerModal({ value, onValueChange, open, onOpenChange, minDate, maxDate, theme: customTheme, trigger, title, confirmLabel, className, frosted, blurIntensity, blurTintToken, }: DatePickerModalProps):
|
|
28
|
+
export declare function DatePickerModal({ value, onValueChange, open, onOpenChange, minDate, maxDate, theme: customTheme, trigger, title, confirmLabel, className, frosted, blurIntensity, blurTintToken, }: DatePickerModalProps): React.JSX.Element;
|
|
29
29
|
/** Compact trigger showing formatted date. Use as DatePickerModal's trigger prop. */
|
|
30
30
|
export declare function DatePickerTrigger({ value, placeholder, className, }: {
|
|
31
31
|
value?: string | null;
|
|
32
32
|
placeholder?: string;
|
|
33
33
|
className?: string;
|
|
34
|
-
}):
|
|
34
|
+
}): React.JSX.Element;
|
|
35
35
|
export { formatDisplayDate };
|
|
36
|
-
//# sourceMappingURL=datepicker-modal.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { useCallback, useMemo } from 'react';
|
|
2
|
+
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
3
3
|
import { Modal, Pressable, View } from 'react-native';
|
|
4
4
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
5
5
|
import { useUniwind } from 'uniwind';
|
|
@@ -8,6 +8,8 @@ import { Text } from '../../components/text';
|
|
|
8
8
|
import { Button, ButtonText } from '../../components/button';
|
|
9
9
|
import { cn } from '../../lib/cn';
|
|
10
10
|
import { useThemeColors } from '../../lib/theme-colors';
|
|
11
|
+
import { useVisualTokens } from '../../lib/visual-tokens';
|
|
12
|
+
import { fieldRecipe, surfacePadding, surfaceRadius, typographyStyle } from '../../lib/recipes';
|
|
11
13
|
import { useFrostedSurface } from '../../lib/frosted-surface';
|
|
12
14
|
import { useCalendarTheme } from './use-calendar-theme';
|
|
13
15
|
function formatDisplayDate(dateString) {
|
|
@@ -25,6 +27,7 @@ export function DatePickerModal({ value, onValueChange, open, onOpenChange, minD
|
|
|
25
27
|
const insets = useSafeAreaInsets();
|
|
26
28
|
const { theme } = useUniwind();
|
|
27
29
|
const colors = useThemeColors();
|
|
30
|
+
const visual = useVisualTokens();
|
|
28
31
|
const frostedSurface = useFrostedSurface({
|
|
29
32
|
frosted,
|
|
30
33
|
blurIntensity,
|
|
@@ -37,35 +40,64 @@ export function DatePickerModal({ value, onValueChange, open, onOpenChange, minD
|
|
|
37
40
|
calendarTheme.monthTextColor ??
|
|
38
41
|
calendarTheme.dayTextColor ??
|
|
39
42
|
colors.foreground;
|
|
40
|
-
const
|
|
43
|
+
const arrowFontSize = typographyStyle(visual, 'body').fontSize;
|
|
44
|
+
const renderArrow = useCallback((direction) => (_jsx(Text, { className: "font-medium", style: { color: arrowColor, fontSize: arrowFontSize }, children: direction === 'left' ? '<' : '>' })), [arrowColor, arrowFontSize]);
|
|
45
|
+
const [draftDate, setDraftDate] = useState(value ?? null);
|
|
46
|
+
const prevOpenRef = useRef(open);
|
|
47
|
+
useEffect(() => {
|
|
48
|
+
if (open && !prevOpenRef.current) {
|
|
49
|
+
setDraftDate(value ?? null);
|
|
50
|
+
}
|
|
51
|
+
else if (!open && prevOpenRef.current) {
|
|
52
|
+
setDraftDate(null);
|
|
53
|
+
}
|
|
54
|
+
prevOpenRef.current = open;
|
|
55
|
+
}, [open, value]);
|
|
41
56
|
const markedDates = useMemo(() => {
|
|
42
|
-
if (!
|
|
57
|
+
if (!draftDate)
|
|
43
58
|
return undefined;
|
|
44
59
|
return {
|
|
45
|
-
[
|
|
60
|
+
[draftDate]: {
|
|
46
61
|
selected: true,
|
|
47
62
|
disableTouchEvent: false,
|
|
48
63
|
today: false,
|
|
49
64
|
},
|
|
50
65
|
};
|
|
51
|
-
}, [
|
|
52
|
-
const handleDayPress = (day) => {
|
|
53
|
-
|
|
54
|
-
};
|
|
55
|
-
const handleConfirm = () => {
|
|
66
|
+
}, [draftDate]);
|
|
67
|
+
const handleDayPress = useCallback((day) => {
|
|
68
|
+
setDraftDate(day.dateString);
|
|
69
|
+
}, []);
|
|
70
|
+
const handleConfirm = useCallback(() => {
|
|
71
|
+
onValueChange?.(draftDate ?? null);
|
|
56
72
|
onOpenChange(false);
|
|
57
|
-
|
|
58
|
-
|
|
73
|
+
setDraftDate(null);
|
|
74
|
+
}, [draftDate, onOpenChange, onValueChange]);
|
|
75
|
+
const handleDismiss = useCallback(() => {
|
|
59
76
|
onOpenChange(false);
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
77
|
+
setDraftDate(null);
|
|
78
|
+
}, [onOpenChange]);
|
|
79
|
+
const handleOpen = useCallback(() => {
|
|
80
|
+
setDraftDate(value ?? null);
|
|
81
|
+
onOpenChange(true);
|
|
82
|
+
}, [onOpenChange, value]);
|
|
83
|
+
return (_jsxs(_Fragment, { children: [trigger ? (_jsx(Pressable, { accessibilityRole: "button", onPress: handleOpen, className: cn('w-full flex-row items-center border-border bg-muted', className), style: fieldRecipe(visual, 'default'), children: trigger })) : null, _jsx(Modal, { visible: open, transparent: true, animationType: "slide", statusBarTranslucent: true, navigationBarTranslucent: true, onRequestClose: handleDismiss, children: _jsx(Pressable, { accessible: false, importantForAccessibility: "no", className: "flex-1 justify-end", style: { backgroundColor: colors.overlay }, onPress: handleDismiss, children: _jsxs(Pressable, { accessible: false, className: cn('border border-border relative overflow-hidden', frosted ? 'bg-transparent' : 'bg-background'), style: [
|
|
84
|
+
{
|
|
85
|
+
borderTopLeftRadius: surfaceRadius(visual, 'xl'),
|
|
86
|
+
borderTopRightRadius: surfaceRadius(visual, 'xl'),
|
|
87
|
+
paddingBottom: Math.max(insets.bottom, surfacePadding(visual, 'sm')),
|
|
88
|
+
},
|
|
63
89
|
frostedSurface.surfaceStyle,
|
|
64
|
-
], onPress: (e) => e.stopPropagation(), children: [frostedSurface.overlay, _jsxs(View, { className: "flex-row items-center justify-between border-b border-border
|
|
90
|
+
], onPress: (e) => e.stopPropagation(), children: [frostedSurface.overlay, _jsxs(View, { className: "flex-row items-center justify-between border-b border-border", style: {
|
|
91
|
+
paddingHorizontal: surfacePadding(visual, 'sm'),
|
|
92
|
+
paddingVertical: visual.controlPaddingYDefault,
|
|
93
|
+
}, children: [_jsx(Text, { className: "font-medium text-foreground", style: typographyStyle(visual, 'body'), children: title }), _jsx(Button, { size: "sm", onPress: handleConfirm, children: _jsx(ButtonText, { children: confirmLabel }) })] }), _jsx(View, { style: { padding: surfacePadding(visual, 'sm') }, children: _jsx(View, { className: "border-border overflow-hidden", style: {
|
|
94
|
+
borderRadius: surfaceRadius(visual, 'lg'),
|
|
95
|
+
borderWidth: visual.borderWidthHairline,
|
|
96
|
+
}, children: _jsx(Calendar, { current: draftDate ?? value ?? undefined, onDayPress: handleDayPress, markedDates: markedDates, minDate: minDate, maxDate: maxDate, theme: calendarTheme, renderArrow: renderArrow, enableSwipeMonths: true }, theme) }) })] }) }) })] }));
|
|
65
97
|
}
|
|
66
98
|
/** Compact trigger showing formatted date. Use as DatePickerModal's trigger prop. */
|
|
67
99
|
export function DatePickerTrigger({ value, placeholder = 'Select date', className, }) {
|
|
68
|
-
|
|
100
|
+
const visual = useVisualTokens();
|
|
101
|
+
return (_jsxs(View, { className: cn('flex-1 flex-row items-center min-w-0', className), children: [_jsx(Text, { className: cn('flex-1', value ? 'text-foreground' : 'text-muted-foreground'), style: typographyStyle(visual, 'body'), numberOfLines: 1, children: value ? formatDisplayDate(value) : placeholder }), _jsx(View, { className: "ml-2 shrink-0 h-2 w-2 rotate-45 border-b-2 border-r-2 border-muted-foreground" })] }));
|
|
69
102
|
}
|
|
70
103
|
export { formatDisplayDate };
|
|
71
|
-
//# sourceMappingURL=datepicker-modal.js.map
|
|
@@ -2,4 +2,3 @@ export { DatePickerModal, DatePickerTrigger, formatDisplayDate, type DatePickerM
|
|
|
2
2
|
export { DatePickerInline, type DatePickerInlineProps } from './datepicker-inline';
|
|
3
3
|
export { DateRangePickerModal, DateRangePickerTrigger, formatRangeDisplay, type DateRangePickerModalProps, type DateRange, } from './date-range-picker-modal';
|
|
4
4
|
export { useCalendarTheme, type CalendarTheme } from './use-calendar-theme';
|
|
5
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -2,4 +2,3 @@ export { DatePickerModal, DatePickerTrigger, formatDisplayDate, } from './datepi
|
|
|
2
2
|
export { DatePickerInline } from './datepicker-inline';
|
|
3
3
|
export { DateRangePickerModal, DateRangePickerTrigger, formatRangeDisplay, } from './date-range-picker-modal';
|
|
4
4
|
export { useCalendarTheme } from './use-calendar-theme';
|
|
5
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -4,5 +4,4 @@ export interface ActionBarProps extends ViewProps {
|
|
|
4
4
|
safeArea?: boolean;
|
|
5
5
|
elevated?: boolean;
|
|
6
6
|
}
|
|
7
|
-
export declare function ActionBar({ sticky, safeArea, elevated, className, style, ...props }: ActionBarProps): import("react
|
|
8
|
-
//# sourceMappingURL=action-bar.d.ts.map
|
|
7
|
+
export declare function ActionBar({ sticky, safeArea, elevated, className, style, ...props }: ActionBarProps): import("react").JSX.Element;
|
|
@@ -7,4 +7,3 @@ export function ActionBar({ sticky = true, safeArea = true, elevated = false, cl
|
|
|
7
7
|
const bottomPadding = safeArea ? Math.max(insets.bottom, 12) : 12;
|
|
8
8
|
return (_jsx(View, { className: cn('w-full flex-row items-center gap-3 bg-background px-4 pt-3', sticky && 'absolute inset-x-0 bottom-0 border-t border-border', elevated && 'shadow-lg', className), style: [{ paddingBottom: bottomPadding }, style], ...props }));
|
|
9
9
|
}
|
|
10
|
-
//# sourceMappingURL=action-bar.js.map
|
|
@@ -10,5 +10,4 @@ export interface AppShellProps extends ViewProps {
|
|
|
10
10
|
/** Optional custom loading placeholder for the content area. */
|
|
11
11
|
skeleton?: React.ReactNode;
|
|
12
12
|
}
|
|
13
|
-
export declare function AppShell({ header, footer, bottomNav, safeArea, loading, skeleton, children, className, ...props }: AppShellProps):
|
|
14
|
-
//# sourceMappingURL=app-shell.d.ts.map
|
|
13
|
+
export declare function AppShell({ header, footer, bottomNav, safeArea, loading, skeleton, children, className, ...props }: AppShellProps): React.JSX.Element;
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { View } from 'react-native';
|
|
2
|
+
import { StyleSheet, View } from 'react-native';
|
|
3
3
|
import { SafeAreaView } from 'react-native-safe-area-context';
|
|
4
4
|
import { cn } from '../../lib/cn';
|
|
5
|
-
// ─── Component ───────────────────────────────────────────────
|
|
6
5
|
export function AppShell({ header, footer, bottomNav, safeArea = true, loading = false, skeleton, children, className, ...props }) {
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
// `className` is silently dropped on react-native-safe-area-context's `SafeAreaView`:
|
|
7
|
+
// it is a native view, and Uniwind only wraps React Native's own components. Styling
|
|
8
|
+
// the safe area directly meant `AppShell` rendered with no background and no `flex-1`
|
|
9
|
+
// whenever `safeArea` was true — which is the default — and correctly when it was
|
|
10
|
+
// false. So the safe area stays bare and every style goes on the child.
|
|
11
|
+
const shell = (_jsxs(View, { className: cn('flex-1 bg-background', className), ...props, children: [header, _jsx(View, { className: "flex-1", children: loading ? (skeleton ?? null) : children }), footer, bottomNav] }));
|
|
12
|
+
if (!safeArea)
|
|
13
|
+
return shell;
|
|
14
|
+
return _jsx(SafeAreaView, { style: styles.fill, children: shell });
|
|
9
15
|
}
|
|
10
|
-
|
|
16
|
+
const styles = StyleSheet.create({ fill: { flex: 1 } });
|
|
@@ -21,5 +21,4 @@ export interface ConfirmActionSheetProps extends Omit<ViewProps, 'children'>, Fr
|
|
|
21
21
|
onCancel?: () => void;
|
|
22
22
|
destructive?: boolean;
|
|
23
23
|
}
|
|
24
|
-
export declare function ConfirmActionSheet({ open, onOpenChange, title, description, actions, confirmLabel, cancelLabel, onConfirm, onCancel, destructive, className, style, frosted, blurIntensity, blurTintToken, ...props }: ConfirmActionSheetProps): import("react
|
|
25
|
-
//# sourceMappingURL=confirm-action-sheet.d.ts.map
|
|
24
|
+
export declare function ConfirmActionSheet({ open, onOpenChange, title, description, actions, confirmLabel, cancelLabel, onConfirm, onCancel, destructive, className, style, frosted, blurIntensity, blurTintToken, ...props }: ConfirmActionSheetProps): import("react").JSX.Element;
|
|
@@ -6,11 +6,14 @@ import { Text } from '../../components/text';
|
|
|
6
6
|
import { cn } from '../../lib/cn';
|
|
7
7
|
import { useThemeColors } from '../../lib/theme-colors';
|
|
8
8
|
import { useInteractionTokens, withInteractivePressableStyle } from '../../lib/interaction-tokens';
|
|
9
|
+
import { useVisualTokens } from '../../lib/visual-tokens';
|
|
10
|
+
import { controlRecipe, surfacePadding, surfaceRadius, typographyStyle } from '../../lib/recipes';
|
|
9
11
|
import { useFrostedSurface } from '../../lib/frosted-surface';
|
|
10
12
|
export function ConfirmActionSheet({ open, onOpenChange, title, description, actions, confirmLabel = 'Confirm', cancelLabel = 'Cancel', onConfirm, onCancel, destructive = true, className, style, frosted = false, blurIntensity, blurTintToken, ...props }) {
|
|
11
13
|
const insets = useSafeAreaInsets();
|
|
12
14
|
const colors = useThemeColors();
|
|
13
15
|
const interaction = useInteractionTokens();
|
|
16
|
+
const visual = useVisualTokens();
|
|
14
17
|
const frostedSurface = useFrostedSurface({
|
|
15
18
|
frosted,
|
|
16
19
|
blurIntensity,
|
|
@@ -44,17 +47,26 @@ export function ConfirmActionSheet({ open, onOpenChange, title, description, act
|
|
|
44
47
|
onOpenChange(false);
|
|
45
48
|
}
|
|
46
49
|
};
|
|
47
|
-
return (_jsx(Modal, { visible: open, transparent: true, animationType: "fade", onRequestClose: handleClose, children: _jsxs(View, { className: "flex-1 justify-end", style: { backgroundColor: colors.overlay }, children: [_jsx(Pressable, { className: "flex-1", onPress: handleClose }), _jsxs(View, { className: cn('
|
|
48
|
-
{
|
|
50
|
+
return (_jsx(Modal, { visible: open, transparent: true, animationType: "fade", statusBarTranslucent: true, navigationBarTranslucent: true, onRequestClose: handleClose, children: _jsxs(View, { className: "flex-1 justify-end", style: { backgroundColor: colors.overlay }, children: [_jsx(Pressable, { accessible: false, importantForAccessibility: "no", className: "flex-1", onPress: handleClose }), _jsxs(View, { className: cn('border-border relative overflow-hidden', frosted ? 'bg-transparent' : 'bg-background', className), style: [
|
|
51
|
+
{
|
|
52
|
+
borderTopLeftRadius: surfaceRadius(visual, 'xl'),
|
|
53
|
+
borderTopRightRadius: surfaceRadius(visual, 'xl'),
|
|
54
|
+
borderWidth: visual.borderWidthHairline,
|
|
55
|
+
paddingHorizontal: surfacePadding(visual, 'sm'),
|
|
56
|
+
paddingTop: surfacePadding(visual, 'sm'),
|
|
57
|
+
paddingBottom: Math.max(insets.bottom, 12),
|
|
58
|
+
},
|
|
49
59
|
frostedSurface.surfaceStyle,
|
|
50
60
|
style,
|
|
51
|
-
], ...props, children: [frostedSurface.overlay, _jsxs(View, { className: "mb-4 gap-1.5", children: [_jsx(Text, { className: "
|
|
61
|
+
], ...props, children: [frostedSurface.overlay, _jsxs(View, { className: "mb-4 gap-1.5", children: [_jsx(Text, { className: "font-semibold text-foreground", style: typographyStyle(visual, 'body'), children: title }), description ? (_jsx(Text, { className: "text-muted-foreground", style: typographyStyle(visual, 'label'), children: description })) : null] }), _jsx(View, { className: "gap-2", children: resolvedActions.map((action) => {
|
|
52
62
|
const isDestructive = action.variant === 'destructive';
|
|
53
63
|
const isCancel = action.variant === 'cancel';
|
|
54
|
-
return (_jsx(Pressable, { className: cn('
|
|
64
|
+
return (_jsx(Pressable, { className: cn('items-center justify-center', isCancel ? 'border-border bg-muted' : 'border-transparent bg-secondary', isDestructive && 'bg-destructive-soft border-destructive-soft-border', action.disabled && ''), style: withInteractivePressableStyle({
|
|
65
|
+
...controlRecipe(visual, 'default'),
|
|
66
|
+
borderWidth: visual.borderWidthControl,
|
|
67
|
+
}, interaction, {
|
|
55
68
|
disabled: Boolean(action.disabled),
|
|
56
69
|
pressedVariant: 'default',
|
|
57
|
-
}), onPress: () => handleActionPress(action), disabled: action.disabled, accessibilityRole: "button", children: _jsx(Text, { className: cn('
|
|
70
|
+
}), onPress: () => handleActionPress(action), disabled: action.disabled, accessibilityRole: "button", children: _jsx(Text, { className: cn('font-medium', isCancel ? 'text-foreground' : 'text-secondary-foreground', isDestructive && 'text-destructive'), style: typographyStyle(visual, 'label'), children: action.label }) }, action.key));
|
|
58
71
|
}) })] })] }) }));
|
|
59
72
|
}
|
|
60
|
-
//# sourceMappingURL=confirm-action-sheet.js.map
|
|
@@ -5,5 +5,4 @@ export interface ContentSkeletonProps extends ViewProps {
|
|
|
5
5
|
/** Number of list rows (list variant only). Default 4. */
|
|
6
6
|
rows?: number;
|
|
7
7
|
}
|
|
8
|
-
export declare function ContentSkeleton({ variant, rows, className, ...props }: ContentSkeletonProps): import("react
|
|
9
|
-
//# sourceMappingURL=content-skeleton.d.ts.map
|
|
8
|
+
export declare function ContentSkeleton({ variant, rows, className, ...props }: ContentSkeletonProps): import("react").JSX.Element;
|
|
@@ -2,18 +2,32 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { View } from 'react-native';
|
|
3
3
|
import { Skeleton } from '../../components/skeleton';
|
|
4
4
|
import { cn } from '../../lib/cn';
|
|
5
|
-
|
|
5
|
+
import { useVisualTokens } from '../../lib/visual-tokens';
|
|
6
|
+
import { surfacePadding, surfaceRadius } from '../../lib/recipes';
|
|
6
7
|
function ListRow() {
|
|
7
|
-
|
|
8
|
+
const visual = useVisualTokens();
|
|
9
|
+
return (_jsxs(View, { className: "flex-row items-center gap-3 border-border mb-4", style: {
|
|
10
|
+
borderBottomWidth: visual.borderWidthHairline,
|
|
11
|
+
paddingBottom: surfacePadding(visual, 'sm'),
|
|
12
|
+
}, children: [_jsx(Skeleton, { className: "h-12 w-12 rounded-full shrink-0" }), _jsxs(View, { className: "flex-1 gap-2", children: [_jsx(Skeleton, { className: "h-4 w-3/4" }), _jsx(Skeleton, { className: "h-3 w-1/2" })] })] }));
|
|
8
13
|
}
|
|
9
|
-
function ListVariant({ className, rows = 4, ...props }) {
|
|
10
|
-
|
|
14
|
+
function ListVariant({ className, rows = 4, style, ...props }) {
|
|
15
|
+
const visual = useVisualTokens();
|
|
16
|
+
return (_jsx(View, { className: className, style: [{ padding: surfacePadding(visual, 'sm') }, style], ...props, children: Array.from({ length: rows }).map((_, i) => (_jsx(ListRow, {}, i))) }));
|
|
11
17
|
}
|
|
12
|
-
function CardVariant({ className, ...props }) {
|
|
13
|
-
|
|
18
|
+
function CardVariant({ className, style, ...props }) {
|
|
19
|
+
const visual = useVisualTokens();
|
|
20
|
+
return (_jsxs(View, { className: cn('overflow-hidden bg-card border-border', className), style: [
|
|
21
|
+
{
|
|
22
|
+
borderRadius: surfaceRadius(visual, 'xl'),
|
|
23
|
+
borderWidth: visual.borderWidthHairline,
|
|
24
|
+
},
|
|
25
|
+
style,
|
|
26
|
+
], ...props, children: [_jsx(Skeleton, { className: "aspect-video w-full" }), _jsxs(View, { className: "gap-3", style: { padding: surfacePadding(visual, 'sm') }, children: [_jsx(Skeleton, { className: "h-5 w-2/3" }), _jsx(Skeleton, { className: "h-3 w-full" }), _jsx(Skeleton, { className: "h-3 w-full" }), _jsx(Skeleton, { className: "h-3 w-4/5" })] })] }));
|
|
14
27
|
}
|
|
15
|
-
function GenericVariant({ className, ...props }) {
|
|
16
|
-
|
|
28
|
+
function GenericVariant({ className, style, ...props }) {
|
|
29
|
+
const visual = useVisualTokens();
|
|
30
|
+
return (_jsxs(View, { className: cn('gap-4', className), style: [{ padding: surfacePadding(visual, 'sm') }, style], ...props, children: [_jsx(Skeleton, { className: "h-6 w-1/2" }), _jsxs(View, { className: "gap-3", children: [_jsx(Skeleton, { className: "h-4 w-full" }), _jsx(Skeleton, { className: "h-4 w-full" }), _jsx(Skeleton, { className: "h-4 w-5/6" }), _jsx(Skeleton, { className: "h-4 w-4/5" })] })] }));
|
|
17
31
|
}
|
|
18
32
|
export function ContentSkeleton({ variant = 'list', rows = 4, className, ...props }) {
|
|
19
33
|
if (variant === 'list') {
|
|
@@ -24,4 +38,3 @@ export function ContentSkeleton({ variant = 'list', rows = 4, className, ...prop
|
|
|
24
38
|
}
|
|
25
39
|
return _jsx(GenericVariant, { className: className, ...props });
|
|
26
40
|
}
|
|
27
|
-
//# sourceMappingURL=content-skeleton.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type ViewProps } from 'react-native';
|
|
2
|
+
export interface DockedInputProps extends ViewProps {
|
|
3
|
+
safeArea?: boolean;
|
|
4
|
+
/** Reports the complete dock height for the scroll area's bottom inset. */
|
|
5
|
+
onHeightChange?: (height: number) => void;
|
|
6
|
+
}
|
|
7
|
+
/** Bottom-edge container intended for use inside `KeyboardAwareScreen`. */
|
|
8
|
+
export declare function DockedInput({ safeArea, onHeightChange, onLayout, className, style, ...props }: DockedInputProps): import("react").JSX.Element;
|
|
9
|
+
export declare namespace DockedInput {
|
|
10
|
+
var displayName: string;
|
|
11
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback } from 'react';
|
|
3
|
+
import { View } from 'react-native';
|
|
4
|
+
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
5
|
+
import { cn } from '../../lib/cn';
|
|
6
|
+
import { surfacePadding } from '../../lib/recipes';
|
|
7
|
+
import { useVisualTokens } from '../../lib/visual-tokens';
|
|
8
|
+
/** Bottom-edge container intended for use inside `KeyboardAwareScreen`. */
|
|
9
|
+
export function DockedInput({ safeArea = true, onHeightChange, onLayout, className, style, ...props }) {
|
|
10
|
+
const insets = useSafeAreaInsets();
|
|
11
|
+
const visual = useVisualTokens();
|
|
12
|
+
const handleLayout = useCallback((event) => {
|
|
13
|
+
onLayout?.(event);
|
|
14
|
+
onHeightChange?.(event.nativeEvent.layout.height);
|
|
15
|
+
}, [onHeightChange, onLayout]);
|
|
16
|
+
return (_jsx(View, { pointerEvents: "box-none", className: cn('absolute inset-x-0 bottom-0', className), style: [
|
|
17
|
+
{
|
|
18
|
+
paddingHorizontal: surfacePadding(visual, 'sm'),
|
|
19
|
+
paddingTop: visual.controlPaddingYSm,
|
|
20
|
+
paddingBottom: safeArea
|
|
21
|
+
? Math.max(insets.bottom, visual.controlPaddingYSm)
|
|
22
|
+
: visual.controlPaddingYSm,
|
|
23
|
+
},
|
|
24
|
+
style,
|
|
25
|
+
], onLayout: handleLayout, ...props }));
|
|
26
|
+
}
|
|
27
|
+
DockedInput.displayName = 'DockedInput';
|
|
@@ -13,5 +13,4 @@ export interface EmptyStateProps extends ViewProps {
|
|
|
13
13
|
onPress: () => void;
|
|
14
14
|
};
|
|
15
15
|
}
|
|
16
|
-
export declare function EmptyState({ icon, title, description, action, secondaryAction, className, ...props }: EmptyStateProps):
|
|
17
|
-
//# sourceMappingURL=empty-state.d.ts.map
|
|
16
|
+
export declare function EmptyState({ icon, title, description, action, secondaryAction, className, style, ...props }: EmptyStateProps): React.JSX.Element;
|
|
@@ -3,11 +3,16 @@ import { View } from 'react-native';
|
|
|
3
3
|
import { Text } from '../../components/text';
|
|
4
4
|
import { Button, ButtonText } from '../../components/button';
|
|
5
5
|
import { cn } from '../../lib/cn';
|
|
6
|
-
|
|
6
|
+
import { useVisualTokens } from '../../lib/visual-tokens';
|
|
7
|
+
import { surfacePadding, typographyStyle } from '../../lib/recipes';
|
|
7
8
|
function DefaultEmptyIcon() {
|
|
8
|
-
|
|
9
|
+
const visual = useVisualTokens();
|
|
10
|
+
return (_jsx(View, { className: "mb-6 h-14 w-14 items-center justify-center border-dashed border-muted", style: {
|
|
11
|
+
borderRadius: visual.radiusLg,
|
|
12
|
+
borderWidth: visual.borderWidthEmphasis,
|
|
13
|
+
}, children: _jsx(View, { className: "h-4 w-5 rounded-sm border-muted-foreground", style: { borderWidth: visual.borderWidthHairline } }) }));
|
|
9
14
|
}
|
|
10
|
-
export function EmptyState({ icon, title, description, action, secondaryAction, className, ...props }) {
|
|
11
|
-
|
|
15
|
+
export function EmptyState({ icon, title, description, action, secondaryAction, className, style, ...props }) {
|
|
16
|
+
const visual = useVisualTokens();
|
|
17
|
+
return (_jsxs(View, { className: cn('flex-1 items-center justify-center', className), style: [{ padding: surfacePadding(visual, 'lg') }, style], ...props, children: [_jsx(View, { className: "mb-6", children: icon ? _jsx(View, { className: "text-muted-foreground", children: icon }) : _jsx(DefaultEmptyIcon, {}) }), _jsx(Text, { className: "mb-2 text-center font-semibold text-foreground", style: typographyStyle(visual, 'title'), children: title }), description && (_jsx(Text, { className: "mb-6 max-w-xs text-center text-muted-foreground", children: description })), action && (_jsx(Button, { onPress: action.onPress, className: "mb-3", children: _jsx(ButtonText, { children: action.label }) })), secondaryAction && (_jsx(Button, { variant: "ghost", onPress: secondaryAction.onPress, children: _jsx(ButtonText, { children: secondaryAction.label }) }))] }));
|
|
12
18
|
}
|
|
13
|
-
//# sourceMappingURL=empty-state.js.map
|
|
@@ -14,7 +14,6 @@ export declare class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBo
|
|
|
14
14
|
static getDerivedStateFromError(error: Error): ErrorBoundaryState;
|
|
15
15
|
componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
|
|
16
16
|
reset: () => void;
|
|
17
|
-
render(): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import("react
|
|
17
|
+
render(): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import("react").JSX.Element | null | undefined;
|
|
18
18
|
}
|
|
19
19
|
export {};
|
|
20
|
-
//# sourceMappingURL=error-boundary.d.ts.map
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Component } from 'react';
|
|
3
3
|
import { ErrorState } from './error-state';
|
|
4
|
-
// ─── Component ───────────────────────────────────────────────
|
|
5
4
|
export class ErrorBoundary extends Component {
|
|
6
5
|
state = { error: null };
|
|
7
6
|
static getDerivedStateFromError(error) {
|
|
@@ -28,4 +27,3 @@ export class ErrorBoundary extends Component {
|
|
|
28
27
|
return children;
|
|
29
28
|
}
|
|
30
29
|
}
|
|
31
|
-
//# sourceMappingURL=error-boundary.js.map
|
|
@@ -8,5 +8,4 @@ export interface ErrorStateProps extends ViewProps {
|
|
|
8
8
|
onRetry?: () => void;
|
|
9
9
|
retryLabel?: string;
|
|
10
10
|
}
|
|
11
|
-
export declare function ErrorState({ icon, title, description, error, onRetry, retryLabel, className, ...props }: ErrorStateProps):
|
|
12
|
-
//# sourceMappingURL=error-state.d.ts.map
|
|
11
|
+
export declare function ErrorState({ icon, title, description, error, onRetry, retryLabel, className, ...props }: ErrorStateProps): React.JSX.Element;
|
|
@@ -3,11 +3,9 @@ import { View } from 'react-native';
|
|
|
3
3
|
import { Text } from '../../components/text';
|
|
4
4
|
import { Button, ButtonText } from '../../components/button';
|
|
5
5
|
import { cn } from '../../lib/cn';
|
|
6
|
-
// ─── Component ───────────────────────────────────────────────
|
|
7
6
|
export function ErrorState({ icon, title = 'Something went wrong', description, error, onRetry, retryLabel = 'Try again', className, ...props }) {
|
|
8
7
|
const errorMessage = description ||
|
|
9
8
|
(error instanceof Error ? error.message : error) ||
|
|
10
9
|
'An unexpected error occurred';
|
|
11
10
|
return (_jsxs(View, { className: cn('flex-1 items-center justify-center p-8', className), ...props, children: [icon && _jsx(View, { className: "mb-6 text-destructive", children: icon }), _jsx(Text, { className: "mb-2 text-center text-xl font-semibold text-foreground", children: title }), _jsx(Text, { className: "mb-6 max-w-xs text-center text-muted-foreground", children: errorMessage }), onRetry && (_jsx(Button, { onPress: onRetry, children: _jsx(ButtonText, { children: retryLabel }) }))] }));
|
|
12
11
|
}
|
|
13
|
-
//# sourceMappingURL=error-state.js.map
|
|
@@ -17,6 +17,5 @@ export interface FormModalScreenProps extends Omit<ViewProps, 'className'> {
|
|
|
17
17
|
scrollEnabled?: boolean;
|
|
18
18
|
children: React.ReactNode;
|
|
19
19
|
}
|
|
20
|
-
declare function FormModalScreen({ className, title, subtitle, leftSlot, rightSlot, onClose, loading, saving, savingText, loadingSpinnerColor, savingSpinnerColor, scrollEnabled, children, ...props }: FormModalScreenProps):
|
|
20
|
+
declare function FormModalScreen({ className, title, subtitle, leftSlot, rightSlot, onClose, loading, saving, savingText, loadingSpinnerColor, savingSpinnerColor, scrollEnabled, children, ...props }: FormModalScreenProps): React.JSX.Element;
|
|
21
21
|
export { FormModalScreen };
|
|
22
|
-
//# sourceMappingURL=form-modal-screen.d.ts.map
|