@thewhileloop/whileui 1.2.3 → 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 +246 -83
- 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 +9 -10
- package/dist/components/alert-dialog/alert-dialog.js +175 -51
- 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
|
@@ -13,6 +13,5 @@ export interface TimelineFeedProps extends ViewProps {
|
|
|
13
13
|
items: TimelineItem[];
|
|
14
14
|
showConnector?: boolean;
|
|
15
15
|
}
|
|
16
|
-
declare function TimelineFeed({ className, items, showConnector, ...props }: TimelineFeedProps):
|
|
16
|
+
declare function TimelineFeed({ className, items, showConnector, ...props }: TimelineFeedProps): React.JSX.Element;
|
|
17
17
|
export { TimelineFeed };
|
|
18
|
-
//# sourceMappingURL=timeline-feed.d.ts.map
|
|
@@ -2,8 +2,10 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { View, ScrollView } from 'react-native';
|
|
3
3
|
import { Text } from '../../components/text';
|
|
4
4
|
import { cn } from '../../lib/cn';
|
|
5
|
+
import { useVisualTokens } from '../../lib/visual-tokens';
|
|
6
|
+
import { surfacePadding } from '../../lib/recipes';
|
|
5
7
|
function TimelineFeed({ className, items, showConnector = true, ...props }) {
|
|
6
|
-
|
|
8
|
+
const visual = useVisualTokens();
|
|
9
|
+
return (_jsx(ScrollView, { className: cn('flex-1', className), ...props, children: _jsx(View, { style: { padding: surfacePadding(visual, 'sm') }, children: items.map((item, index) => (_jsxs(View, { className: "flex-row", children: [_jsxs(View, { className: "items-center mr-4", style: { minWidth: 16 }, children: [showConnector && index > 0 && _jsx(View, { className: "w-0.5 bg-border h-4" }), item.icon ? (_jsx(View, { className: "w-8 h-8 rounded-full bg-primary items-center justify-center shrink-0", children: item.icon })) : (_jsx(View, { className: "w-4 h-4 rounded-full bg-primary border-background shrink-0", style: { borderWidth: visual.borderWidthEmphasis } })), showConnector && index < items.length - 1 && (_jsx(View, { className: "w-0.5 bg-border flex-1 min-h-4" }))] }), _jsxs(View, { className: cn('flex-1 pb-6', index === items.length - 1 && 'pb-0'), children: [_jsxs(View, { className: "flex-row items-center justify-between", children: [_jsx(Text, { variant: "body", className: "font-medium", children: item.title }), item.time && (_jsx(Text, { variant: "caption", className: "text-muted-foreground", children: item.time }))] }), item.subtitle && (_jsx(Text, { variant: "caption", className: "text-muted-foreground mt-1", children: item.subtitle })), item.content && _jsx(View, { className: "mt-2", children: item.content })] })] }, item.id))) }) }));
|
|
7
10
|
}
|
|
8
11
|
export { TimelineFeed };
|
|
9
|
-
//# sourceMappingURL=timeline-feed.js.map
|
|
@@ -120,4 +120,3 @@ export interface SmartImageProps extends Omit<ViewProps, 'className'>, VariantPr
|
|
|
120
120
|
}
|
|
121
121
|
declare const SmartImage: React.ForwardRefExoticComponent<SmartImageProps & React.RefAttributes<View>>;
|
|
122
122
|
export { SmartImage, smartImageVariants };
|
|
123
|
-
//# sourceMappingURL=smart-image.d.ts.map
|
|
@@ -5,15 +5,16 @@ import { Image } from 'expo-image';
|
|
|
5
5
|
import { Skeleton } from '../../components/skeleton';
|
|
6
6
|
import { cn } from '../../lib/cn';
|
|
7
7
|
import { tv } from '../../lib/tv';
|
|
8
|
+
import { useVisualTokens } from '../../lib/visual-tokens';
|
|
8
9
|
const smartImageVariants = tv({
|
|
9
10
|
base: 'overflow-hidden',
|
|
10
11
|
variants: {
|
|
11
12
|
radius: {
|
|
12
|
-
none: '
|
|
13
|
-
sm: '
|
|
14
|
-
md: '
|
|
15
|
-
lg: '
|
|
16
|
-
xl: '
|
|
13
|
+
none: '',
|
|
14
|
+
sm: '',
|
|
15
|
+
md: '',
|
|
16
|
+
lg: '',
|
|
17
|
+
xl: '',
|
|
17
18
|
full: 'rounded-full',
|
|
18
19
|
},
|
|
19
20
|
objectFit: {
|
|
@@ -28,9 +29,25 @@ const smartImageVariants = tv({
|
|
|
28
29
|
objectFit: 'cover',
|
|
29
30
|
},
|
|
30
31
|
});
|
|
31
|
-
const
|
|
32
|
+
const FULL_RADIUS = 9999;
|
|
33
|
+
function resolveRadius(visual, radius) {
|
|
34
|
+
if (radius === 'none')
|
|
35
|
+
return 0;
|
|
36
|
+
if (radius === 'sm')
|
|
37
|
+
return visual.radiusSm;
|
|
38
|
+
if (radius === 'lg')
|
|
39
|
+
return visual.radiusLg;
|
|
40
|
+
if (radius === 'xl')
|
|
41
|
+
return visual.radiusXl;
|
|
42
|
+
if (radius === 'full')
|
|
43
|
+
return FULL_RADIUS;
|
|
44
|
+
return visual.radiusMd;
|
|
45
|
+
}
|
|
46
|
+
const SmartImage = React.forwardRef(({ className, source, alt, skeleton = true, skeletonClassName, transition = 200, radius, objectFit, onLoad, onError, fallbackSource, style, ...props }, ref) => {
|
|
32
47
|
const [loading, setLoading] = useState(true);
|
|
33
48
|
const [error, setError] = useState(false);
|
|
49
|
+
const visual = useVisualTokens();
|
|
50
|
+
const borderRadius = resolveRadius(visual, radius ?? 'md');
|
|
34
51
|
const handleLoad = () => {
|
|
35
52
|
setLoading(false);
|
|
36
53
|
onLoad?.();
|
|
@@ -41,8 +58,7 @@ const SmartImage = React.forwardRef(({ className, source, alt, skeleton = true,
|
|
|
41
58
|
onError?.();
|
|
42
59
|
};
|
|
43
60
|
const imageSource = error && fallbackSource ? fallbackSource : source;
|
|
44
|
-
return (_jsxs(View, { ref: ref, className: cn(smartImageVariants({ radius, objectFit }), className), ...props, children: [skeleton && loading && (_jsx(Skeleton, { className: cn('absolute inset-0',
|
|
61
|
+
return (_jsxs(View, { ref: ref, className: cn(smartImageVariants({ radius, objectFit }), className), style: [{ borderRadius }, style], ...props, children: [skeleton && loading && (_jsx(Skeleton, { className: cn('absolute inset-0', skeletonClassName) })), _jsx(Image, { source: imageSource, alt: alt, transition: transition, onLoad: handleLoad, onError: handleError, className: cn('w-full h-full', objectFit === 'cover' && 'object-cover', objectFit === 'contain' && 'object-contain', objectFit === 'fill' && 'object-fill', objectFit === 'scale-down' && 'object-scale-down'), style: { opacity: loading && !error ? 0 : 1 } })] }));
|
|
45
62
|
});
|
|
46
63
|
SmartImage.displayName = 'SmartImage';
|
|
47
64
|
export { SmartImage, smartImageVariants };
|
|
48
|
-
//# sourceMappingURL=smart-image.js.map
|
|
@@ -15,5 +15,4 @@ export interface BottomNavItemProps extends Omit<PressableProps, 'children'> {
|
|
|
15
15
|
item: BottomNavItem;
|
|
16
16
|
isActive: boolean;
|
|
17
17
|
}
|
|
18
|
-
export declare function BottomNav({ items, activeKey, onSelect, className, ...props }: BottomNavProps):
|
|
19
|
-
//# sourceMappingURL=bottom-nav.d.ts.map
|
|
18
|
+
export declare function BottomNav({ items, activeKey, onSelect, className, ...props }: BottomNavProps): React.JSX.Element;
|
|
@@ -4,7 +4,7 @@ import { Text } from '../../components/text';
|
|
|
4
4
|
import { cn } from '../../lib/cn';
|
|
5
5
|
import { useInteractionTokens, withInteractivePressableStyle } from '../../lib/interaction-tokens';
|
|
6
6
|
import { useVisualTokens } from '../../lib/visual-tokens';
|
|
7
|
-
|
|
7
|
+
import { typographyStyle } from '../../lib/recipes';
|
|
8
8
|
function BottomNavItemComponent({ item, isActive, className, style: styleProp, ...props }) {
|
|
9
9
|
const { label, icon, badge } = item;
|
|
10
10
|
const interaction = useInteractionTokens();
|
|
@@ -12,9 +12,12 @@ function BottomNavItemComponent({ item, isActive, className, style: styleProp, .
|
|
|
12
12
|
const interactiveStyle = withInteractivePressableStyle(styleProp, interaction, {
|
|
13
13
|
pressedVariant: 'default',
|
|
14
14
|
});
|
|
15
|
-
return (_jsxs(Pressable, { className: cn('flex-1 items-center justify-center py-2', className), style: interactiveStyle, ...props, children: [_jsxs(View, { className: "relative", style: !isActive ? { opacity: interaction.inactiveOpacity } : undefined, children: [icon, badge !== undefined && badge > 0 && (_jsx(View, { className: "absolute -right-2 -top-1 h-4 min-w-4 items-center justify-center rounded-full bg-destructive px-1", children: _jsx(Text, { className: "font-bold text-destructive-foreground", style: { fontSize: visual.bottomNavBadgeFontSize }, children: badge > 99 ? '99+' : badge }) }))] }), _jsx(Text, { className: cn('mt-1
|
|
15
|
+
return (_jsxs(Pressable, { accessibilityRole: "tab", accessibilityState: { selected: isActive }, "aria-selected": isActive, className: cn('flex-1 items-center justify-center py-2', className), style: interactiveStyle, ...props, children: [_jsxs(View, { className: "relative", style: !isActive ? { opacity: interaction.inactiveOpacity } : undefined, children: [icon, badge !== undefined && badge > 0 && (_jsx(View, { className: "absolute -right-2 -top-1 h-4 min-w-4 items-center justify-center rounded-full bg-destructive px-1", children: _jsx(Text, { className: "font-bold text-destructive-foreground", style: { fontSize: visual.bottomNavBadgeFontSize }, children: badge > 99 ? '99+' : badge }) }))] }), _jsx(Text, { className: cn('mt-1 font-medium', isActive ? 'text-primary' : 'text-muted-foreground'), style: typographyStyle(visual, 'caption'), children: label })] }));
|
|
16
16
|
}
|
|
17
17
|
export function BottomNav({ items, activeKey, onSelect, className, ...props }) {
|
|
18
|
-
return (_jsx(View
|
|
18
|
+
return (_jsx(View
|
|
19
|
+
// The items below are `tab`s, and ARIA requires a `tablist` parent for that role.
|
|
20
|
+
, {
|
|
21
|
+
// The items below are `tab`s, and ARIA requires a `tablist` parent for that role.
|
|
22
|
+
accessibilityRole: "tablist", className: cn('flex-row border-t border-border bg-background px-2 pb-6 pt-2', className), ...props, children: items.map((item) => (_jsx(BottomNavItemComponent, { item: item, isActive: activeKey === item.key, onPress: () => onSelect(item.key) }, item.key))) }));
|
|
19
23
|
}
|
|
20
|
-
//# sourceMappingURL=bottom-nav.js.map
|
|
@@ -25,5 +25,4 @@ export interface DrawerMenuProps extends FrostedSurfaceProps {
|
|
|
25
25
|
className?: string;
|
|
26
26
|
style?: StyleProp<ViewStyle>;
|
|
27
27
|
}
|
|
28
|
-
export declare function DrawerMenu({ visible, onClose, sections, activeKey, onSelect, header, footer, maxWidth, className, style, frosted, blurIntensity, blurTintToken, }: DrawerMenuProps):
|
|
29
|
-
//# sourceMappingURL=drawer-menu.d.ts.map
|
|
28
|
+
export declare function DrawerMenu({ visible, onClose, sections, activeKey, onSelect, header, footer, maxWidth, className, style, frosted, blurIntensity, blurTintToken, }: DrawerMenuProps): React.JSX.Element | null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { View, Pressable, Platform, Modal, useWindowDimensions, StyleSheet, } from 'react-native';
|
|
3
|
+
import { View, Pressable, Platform, Modal, I18nManager, ScrollView, useWindowDimensions, StyleSheet, } from 'react-native';
|
|
4
4
|
import Animated, { useSharedValue, useAnimatedStyle, withTiming, Easing, interpolate, } from 'react-native-reanimated';
|
|
5
5
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
6
6
|
import { Text } from '../../components/text';
|
|
@@ -8,12 +8,17 @@ import { cn } from '../../lib/cn';
|
|
|
8
8
|
import { useThemeColors } from '../../lib/theme-colors';
|
|
9
9
|
import { useInteractionTokens, withInteractivePressableStyle } from '../../lib/interaction-tokens';
|
|
10
10
|
import { useVisualTokens } from '../../lib/visual-tokens';
|
|
11
|
+
import { shadowStyle, surfaceRadius } from '../../lib/recipes';
|
|
12
|
+
import { useMotionPolicy } from '../../lib/motion-policy';
|
|
13
|
+
import { useTapOnly } from '../../lib/tap-only';
|
|
11
14
|
import { useFrostedSurface, useFrostedBackdrop, } from '../../lib/frosted-surface';
|
|
12
15
|
export function DrawerMenu({ visible, onClose, sections, activeKey, onSelect, header, footer, maxWidth, className, style, frosted = false, blurIntensity, blurTintToken, }) {
|
|
13
16
|
const insets = useSafeAreaInsets();
|
|
14
17
|
const colors = useThemeColors();
|
|
15
18
|
const interaction = useInteractionTokens();
|
|
16
19
|
const visual = useVisualTokens();
|
|
20
|
+
const motion = useMotionPolicy();
|
|
21
|
+
const backdropPress = useTapOnly(onClose);
|
|
17
22
|
const frostedSurface = useFrostedSurface({
|
|
18
23
|
frosted,
|
|
19
24
|
blurIntensity,
|
|
@@ -33,16 +38,22 @@ export function DrawerMenu({ visible, onClose, sections, activeKey, onSelect, he
|
|
|
33
38
|
const effectiveMaxWidth = maxWidth ?? (Platform.OS === 'web' ? visual.drawerMaxWidthWeb : undefined);
|
|
34
39
|
const drawerWidth = effectiveMaxWidth != null ? Math.min(rawWidth, effectiveMaxWidth) : rawWidth;
|
|
35
40
|
const frostedInset = frosted ? visual.drawerFrostedInset : 0;
|
|
36
|
-
const cornerRadius = frosted ? visual.drawerFrostedRadius :
|
|
41
|
+
const cornerRadius = frosted ? visual.drawerFrostedRadius : surfaceRadius(visual, 'xl');
|
|
37
42
|
const useFloatingFrostedDrawer = frosted && frostedInset > 0;
|
|
38
43
|
const contentTopPadding = insets.top + visual.drawerContentTopPadding;
|
|
39
44
|
const progress = useSharedValue(0);
|
|
40
45
|
const [mounted, setMounted] = React.useState(visible);
|
|
41
46
|
const closeTimerRef = React.useRef(null);
|
|
42
|
-
|
|
47
|
+
// Mounting has to happen in the same commit that `visible` flips, or the drawer's
|
|
48
|
+
// entrance animation loses its first frame. React's documented way to do that is to
|
|
49
|
+
// adjust state during render on a props change rather than in an effect; the close
|
|
50
|
+
// path is the asymmetric one and stays below, on a timer, so the exit can finish.
|
|
51
|
+
const [prevVisible, setPrevVisible] = React.useState(visible);
|
|
52
|
+
if (prevVisible !== visible) {
|
|
53
|
+
setPrevVisible(visible);
|
|
43
54
|
if (visible)
|
|
44
55
|
setMounted(true);
|
|
45
|
-
}
|
|
56
|
+
}
|
|
46
57
|
React.useEffect(() => {
|
|
47
58
|
if (!mounted)
|
|
48
59
|
return;
|
|
@@ -50,8 +61,14 @@ export function DrawerMenu({ visible, onClose, sections, activeKey, onSelect, he
|
|
|
50
61
|
clearTimeout(closeTimerRef.current);
|
|
51
62
|
closeTimerRef.current = null;
|
|
52
63
|
}
|
|
64
|
+
const duration = motion.reduceMotion || !motion.animationsEnabled
|
|
65
|
+
? 0
|
|
66
|
+
: visible
|
|
67
|
+
? interaction.drawerOpenDuration
|
|
68
|
+
: interaction.drawerCloseDuration;
|
|
53
69
|
progress.value = withTiming(visible ? 1 : 0, {
|
|
54
|
-
duration
|
|
70
|
+
duration,
|
|
71
|
+
reduceMotion: motion.reanimatedReduceMotion,
|
|
55
72
|
easing: visible
|
|
56
73
|
? Easing.bezier(0.2, 0.8, 0.2, 1) // Swift, decelerating entrance
|
|
57
74
|
: Easing.bezier(0.4, 0, 1, 1), // Accelerating, sharp exit
|
|
@@ -59,7 +76,7 @@ export function DrawerMenu({ visible, onClose, sections, activeKey, onSelect, he
|
|
|
59
76
|
if (!visible) {
|
|
60
77
|
closeTimerRef.current = setTimeout(() => {
|
|
61
78
|
setMounted(false);
|
|
62
|
-
},
|
|
79
|
+
}, duration);
|
|
63
80
|
}
|
|
64
81
|
return () => {
|
|
65
82
|
if (closeTimerRef.current) {
|
|
@@ -67,13 +84,25 @@ export function DrawerMenu({ visible, onClose, sections, activeKey, onSelect, he
|
|
|
67
84
|
closeTimerRef.current = null;
|
|
68
85
|
}
|
|
69
86
|
};
|
|
70
|
-
}, [
|
|
87
|
+
}, [
|
|
88
|
+
mounted,
|
|
89
|
+
visible,
|
|
90
|
+
progress,
|
|
91
|
+
interaction.drawerOpenDuration,
|
|
92
|
+
interaction.drawerCloseDuration,
|
|
93
|
+
motion.animationsEnabled,
|
|
94
|
+
motion.reduceMotion,
|
|
95
|
+
motion.reanimatedReduceMotion,
|
|
96
|
+
]);
|
|
71
97
|
const backdropStyle = useAnimatedStyle(() => ({
|
|
72
98
|
opacity: progress.value,
|
|
73
99
|
pointerEvents: progress.value > 0 ? 'auto' : 'none',
|
|
74
100
|
}));
|
|
101
|
+
// React Native swaps `left` for `right` under RTL, so the panel already sits on the
|
|
102
|
+
// trailing edge; the translate has to start off-screen on that same side.
|
|
103
|
+
const offscreenX = I18nManager.isRTL ? drawerWidth : -drawerWidth;
|
|
75
104
|
const drawerStyle = useAnimatedStyle(() => ({
|
|
76
|
-
transform: [{ translateX: interpolate(progress.value, [0, 1], [
|
|
105
|
+
transform: [{ translateX: interpolate(progress.value, [0, 1], [offscreenX, 0]) }],
|
|
77
106
|
}));
|
|
78
107
|
const containerStyle = useAnimatedStyle(() => ({
|
|
79
108
|
pointerEvents: progress.value > 0 ? 'auto' : 'none',
|
|
@@ -87,7 +116,7 @@ export function DrawerMenu({ visible, onClose, sections, activeKey, onSelect, he
|
|
|
87
116
|
StyleSheet.absoluteFill,
|
|
88
117
|
{ backgroundColor: frosted ? 'transparent' : colors.overlayStrong },
|
|
89
118
|
backdropStyle,
|
|
90
|
-
], children: [frostedBackdrop, _jsx(Pressable, { style: StyleSheet.absoluteFill,
|
|
119
|
+
], children: [frostedBackdrop, _jsx(Pressable, { accessible: false, importantForAccessibility: "no", style: StyleSheet.absoluteFill, ...backdropPress })] }), _jsxs(Animated.View, { style: [
|
|
91
120
|
{
|
|
92
121
|
position: 'absolute',
|
|
93
122
|
top: frostedInset,
|
|
@@ -99,23 +128,31 @@ export function DrawerMenu({ visible, onClose, sections, activeKey, onSelect, he
|
|
|
99
128
|
borderTopLeftRadius: useFloatingFrostedDrawer ? cornerRadius : 0,
|
|
100
129
|
borderBottomLeftRadius: useFloatingFrostedDrawer ? cornerRadius : 0,
|
|
101
130
|
},
|
|
131
|
+
shadowStyle(visual, colors, frosted ? 'lg' : 'md'),
|
|
102
132
|
drawerStyle,
|
|
103
133
|
frostedSurface.surfaceStyle,
|
|
104
134
|
style,
|
|
105
135
|
], className: cn(frosted
|
|
106
|
-
? 'border border-border
|
|
107
|
-
: 'border-r border-border
|
|
136
|
+
? 'border border-border relative overflow-hidden'
|
|
137
|
+
: 'border-r border-border relative overflow-hidden', frosted ? 'bg-transparent' : 'bg-background', className), children: [frostedSurface.overlay, _jsxs(View, { className: "flex-1 pb-8", style: { paddingTop: contentTopPadding }, children: [header && _jsx(View, { className: "px-5 pb-4 mb-2 border-b border-border", children: header }), _jsx(ScrollView, { className: "flex-1 px-3", keyboardShouldPersistTaps: "handled", showsVerticalScrollIndicator: false, children: sections.map((section, sectionIndex) => (_jsxs(View, { className: "mb-4", children: [section.title && (_jsx(Text, { className: "font-medium text-muted-foreground uppercase tracking-wide px-3 mb-2", style: { fontSize: visual.navSectionTitleFontSize }, children: section.title })), _jsx(View, { className: "gap-0.5", children: section.items.map((item) => {
|
|
108
138
|
const isActive = activeKey === item.key;
|
|
109
|
-
return (_jsxs(Pressable, { onPress: () => handleItemPress(item.key), className: cn('flex-row items-center gap-3
|
|
139
|
+
return (_jsxs(Pressable, { accessibilityRole: "button", onPress: () => handleItemPress(item.key), className: cn('flex-row items-center gap-3 mx-1 transition-colors', isActive && 'bg-primary-soft-subtle'), style: withInteractivePressableStyle({
|
|
140
|
+
borderRadius: visual.radiusLg,
|
|
141
|
+
paddingHorizontal: visual.controlPaddingXDefault,
|
|
142
|
+
paddingVertical: visual.controlPaddingYDefault,
|
|
143
|
+
minHeight: visual.touchTargetMinSize,
|
|
144
|
+
}, interaction, {
|
|
110
145
|
pressedVariant: 'default',
|
|
111
146
|
}), children: [item.icon, _jsx(Text, { className: cn('flex-1 font-semibold tracking-tight', item.destructive
|
|
112
147
|
? 'text-destructive'
|
|
113
148
|
: isActive
|
|
114
149
|
? 'text-primary'
|
|
115
|
-
: 'text-foreground'), style: { fontSize: visual.drawerItemFontSize }, children: item.label }), item.badge !== undefined && (_jsx(View, { className: "bg-primary px-2 py-0.5
|
|
150
|
+
: 'text-foreground'), style: { fontSize: visual.drawerItemFontSize }, children: item.label }), item.badge !== undefined && (_jsx(View, { className: "bg-primary px-2 py-0.5 items-center", style: {
|
|
151
|
+
minWidth: visual.drawerBadgeMinWidth,
|
|
152
|
+
borderRadius: visual.badgeRadius,
|
|
153
|
+
}, children: _jsx(Text, { className: "font-semibold text-primary-foreground", style: { fontSize: visual.navItemBadgeFontSize }, children: item.badge }) }))] }, item.key));
|
|
116
154
|
}) })] }, sectionIndex))) }), footer && _jsx(View, { className: "px-5 py-4 mt-auto border-t border-border", children: footer })] })] })] }));
|
|
117
155
|
if (Platform.OS !== 'android')
|
|
118
156
|
return drawerTree;
|
|
119
|
-
return (_jsx(Modal, { visible: mounted, transparent: true, animationType: "none", onRequestClose: onClose, statusBarTranslucent: true, presentationStyle: "overFullScreen", children: drawerTree }));
|
|
157
|
+
return (_jsx(Modal, { visible: mounted, transparent: true, animationType: "none", onRequestClose: onClose, statusBarTranslucent: true, navigationBarTranslucent: true, presentationStyle: "overFullScreen", children: drawerTree }));
|
|
120
158
|
}
|
|
121
|
-
//# sourceMappingURL=drawer-menu.js.map
|
|
@@ -14,5 +14,4 @@ export interface FloatingBottomNavItemProps extends Omit<PressableProps, 'childr
|
|
|
14
14
|
item: FloatingBottomNavItem;
|
|
15
15
|
isActive: boolean;
|
|
16
16
|
}
|
|
17
|
-
export declare function FloatingBottomNav({ items, activeKey, onSelect, className, ...props }: FloatingBottomNavProps):
|
|
18
|
-
//# sourceMappingURL=floating-bottom-nav.d.ts.map
|
|
17
|
+
export declare function FloatingBottomNav({ items, activeKey, onSelect, className, ...props }: FloatingBottomNavProps): React.JSX.Element;
|
|
@@ -2,12 +2,21 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { View, Pressable } from 'react-native';
|
|
3
3
|
import { Text } from '../../components/text';
|
|
4
4
|
import { cn } from '../../lib/cn';
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
import { useVisualTokens } from '../../lib/visual-tokens';
|
|
6
|
+
import { useThemeColors } from '../../lib/theme-colors';
|
|
7
|
+
import { shadowStyle, surfaceRadius, typographyStyle } from '../../lib/recipes';
|
|
8
|
+
function FloatingNavItem({ item, isActive, className, style: styleProp, ...props }) {
|
|
7
9
|
const { label, icon } = item;
|
|
8
|
-
|
|
10
|
+
const visual = useVisualTokens();
|
|
11
|
+
const pillStyle = {
|
|
12
|
+
borderRadius: visual.badgeRadius,
|
|
13
|
+
paddingHorizontal: visual.controlPaddingXDefault,
|
|
14
|
+
paddingVertical: visual.controlPaddingYSm,
|
|
15
|
+
};
|
|
16
|
+
return (_jsxs(Pressable, { accessibilityRole: "tab", accessibilityState: { selected: isActive }, "aria-selected": isActive, className: cn('flex-row items-center gap-2 active:scale-95', isActive && 'bg-primary', className), style: (state) => [pillStyle, typeof styleProp === 'function' ? styleProp(state) : styleProp], ...props, children: [_jsx(View, { className: cn(isActive ? 'text-primary-foreground' : 'text-muted-foreground'), children: icon }), isActive && (_jsx(Text, { className: "font-semibold text-primary-foreground", style: typographyStyle(visual, 'label'), children: label }))] }));
|
|
9
17
|
}
|
|
10
18
|
export function FloatingBottomNav({ items, activeKey, onSelect, className, ...props }) {
|
|
11
|
-
|
|
19
|
+
const visual = useVisualTokens();
|
|
20
|
+
const colors = useThemeColors();
|
|
21
|
+
return (_jsx(View, { className: cn('items-center pb-8', className), ...props, children: _jsx(View, { accessibilityRole: "tablist", className: "flex-row items-center gap-1 bg-card p-1.5", style: [{ borderRadius: surfaceRadius(visual, 'xl') }, shadowStyle(visual, colors, 'md')], children: items.map((item) => (_jsx(FloatingNavItem, { item: item, isActive: activeKey === item.key, onPress: () => onSelect(item.key) }, item.key))) }) }));
|
|
12
22
|
}
|
|
13
|
-
//# sourceMappingURL=floating-bottom-nav.js.map
|
|
@@ -14,10 +14,9 @@ export interface HeaderProps extends ViewProps {
|
|
|
14
14
|
transparent?: boolean;
|
|
15
15
|
border?: boolean;
|
|
16
16
|
}
|
|
17
|
-
export declare function Header({ title, subtitle, leftAction, rightActions, centerContent, transparent, border, className, ...props }: HeaderProps):
|
|
17
|
+
export declare function Header({ title, subtitle, leftAction, rightActions, centerContent, transparent, border, className, style, ...props }: HeaderProps): React.JSX.Element;
|
|
18
18
|
export interface HeaderBackButtonProps extends Omit<PressableProps, 'children'> {
|
|
19
19
|
icon?: React.ReactNode;
|
|
20
20
|
label?: string;
|
|
21
21
|
}
|
|
22
|
-
export declare function HeaderBackButton({ icon, label, className, style: styleProp, ...props }: HeaderBackButtonProps):
|
|
23
|
-
//# sourceMappingURL=header.d.ts.map
|
|
22
|
+
export declare function HeaderBackButton({ icon, label, className, style: styleProp, ...props }: HeaderBackButtonProps): React.JSX.Element;
|
|
@@ -3,19 +3,27 @@ import { View, Pressable } from 'react-native';
|
|
|
3
3
|
import { Text } from '../../components/text';
|
|
4
4
|
import { cn } from '../../lib/cn';
|
|
5
5
|
import { useInteractionTokens, withInteractivePressableStyle } from '../../lib/interaction-tokens';
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
import { useVisualTokens } from '../../lib/visual-tokens';
|
|
7
|
+
import { typographyStyle } from '../../lib/recipes';
|
|
8
|
+
export function Header({ title, subtitle, leftAction, rightActions, centerContent, transparent = false, border = true, className, style, ...props }) {
|
|
8
9
|
const interaction = useInteractionTokens();
|
|
9
|
-
|
|
10
|
+
const visual = useVisualTokens();
|
|
11
|
+
return (_jsxs(View, { className: cn('flex-row items-center', !transparent && 'bg-background', border && 'border-b border-border', className), style: [
|
|
12
|
+
{
|
|
13
|
+
paddingHorizontal: visual.controlPaddingXDefault,
|
|
14
|
+
paddingVertical: visual.controlPaddingYDefault,
|
|
15
|
+
},
|
|
16
|
+
style,
|
|
17
|
+
], ...props, children: [_jsx(View, { className: "min-w-12", children: leftAction }), _jsx(View, { className: "flex-1 items-center", children: centerContent || (_jsxs(View, { className: "items-center", children: [title && (_jsx(Text, { className: "font-semibold text-foreground", style: typographyStyle(visual, 'body'), numberOfLines: 1, children: title })), subtitle && (_jsx(Text, { className: "text-muted-foreground", style: typographyStyle(visual, 'caption'), numberOfLines: 1, children: subtitle }))] })) }), _jsx(View, { className: "min-w-12 flex-row items-center justify-end gap-2", children: rightActions?.map((action) => (_jsx(Pressable, { accessibilityRole: "button", onPress: action.onPress, className: "rounded-full p-2 active:bg-accent", style: withInteractivePressableStyle(undefined, interaction, {
|
|
10
18
|
pressedVariant: 'default',
|
|
11
19
|
}), children: action.icon }, action.key))) })] }));
|
|
12
20
|
}
|
|
13
21
|
export function HeaderBackButton({ icon, label, className, style: styleProp, ...props }) {
|
|
14
22
|
const interaction = useInteractionTokens();
|
|
23
|
+
const visual = useVisualTokens();
|
|
15
24
|
const interactiveStyle = withInteractivePressableStyle(styleProp, interaction, {
|
|
16
25
|
disabled: Boolean(props.disabled),
|
|
17
26
|
pressedVariant: 'default',
|
|
18
27
|
});
|
|
19
|
-
return (_jsxs(Pressable, { className: cn('flex-row items-center gap-1 rounded-full py-1', className), style: interactiveStyle, ...props, children: [icon || _jsx(Text, { className: "text-
|
|
28
|
+
return (_jsxs(Pressable, { className: cn('flex-row items-center gap-1 rounded-full py-1', className), style: interactiveStyle, ...props, children: [icon || (_jsx(Text, { className: "text-primary", style: typographyStyle(visual, 'title'), children: "\u2039" })), label && (_jsx(Text, { className: "text-primary", style: typographyStyle(visual, 'body'), children: label }))] }));
|
|
20
29
|
}
|
|
21
|
-
//# sourceMappingURL=header.js.map
|
|
@@ -3,5 +3,3 @@ export { FloatingBottomNav, type FloatingBottomNavItem, type FloatingBottomNavPr
|
|
|
3
3
|
export { Header, HeaderBackButton, type HeaderAction, type HeaderBackButtonProps, type HeaderProps, } from './header';
|
|
4
4
|
export { TabBar, type TabBarItem, type TabBarProps } from './tab-bar';
|
|
5
5
|
export { DrawerMenu, type DrawerMenuItem, type DrawerMenuSection, type DrawerMenuProps, } from './drawer-menu';
|
|
6
|
-
export { NavigationSidebar, type NavigationSidebarItem, type NavigationSidebarSection, type NavigationSidebarProps, } from './navigation-sidebar';
|
|
7
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -3,5 +3,3 @@ export { FloatingBottomNav, } from './floating-bottom-nav';
|
|
|
3
3
|
export { Header, HeaderBackButton, } from './header';
|
|
4
4
|
export { TabBar } from './tab-bar';
|
|
5
5
|
export { DrawerMenu, } from './drawer-menu';
|
|
6
|
-
export { NavigationSidebar, } from './navigation-sidebar';
|
|
7
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -17,5 +17,4 @@ export interface TabBarItemProps extends Omit<PressableProps, 'children'> {
|
|
|
17
17
|
isActive: boolean;
|
|
18
18
|
variant: 'default' | 'pills' | 'underline';
|
|
19
19
|
}
|
|
20
|
-
export declare function TabBar({ items, activeKey, onSelect, variant, scrollable, className, ...props }: TabBarProps):
|
|
21
|
-
//# sourceMappingURL=tab-bar.d.ts.map
|
|
20
|
+
export declare function TabBar({ items, activeKey, onSelect, variant, scrollable, className, style, ...props }: TabBarProps): React.JSX.Element;
|
|
@@ -3,32 +3,44 @@ import { View, Pressable, ScrollView } from 'react-native';
|
|
|
3
3
|
import { Text } from '../../components/text';
|
|
4
4
|
import { cn } from '../../lib/cn';
|
|
5
5
|
import { useInteractionTokens, withInteractivePressableStyle } from '../../lib/interaction-tokens';
|
|
6
|
-
|
|
6
|
+
import { useVisualTokens } from '../../lib/visual-tokens';
|
|
7
|
+
import { typographyStyle } from '../../lib/recipes';
|
|
7
8
|
function TabBarItemComponent({ item, isActive, variant, className, style: styleProp, ...props }) {
|
|
8
9
|
const { label, icon } = item;
|
|
9
10
|
const interaction = useInteractionTokens();
|
|
11
|
+
const visual = useVisualTokens();
|
|
12
|
+
const showUnderline = variant === 'default' || (variant === 'underline' && isActive);
|
|
13
|
+
const tokenStyle = {
|
|
14
|
+
paddingHorizontal: visual.controlPaddingXDefault,
|
|
15
|
+
paddingVertical: visual.controlPaddingYSm,
|
|
16
|
+
...(variant === 'pills' ? { borderRadius: visual.badgeRadius } : null),
|
|
17
|
+
...(showUnderline ? { borderBottomWidth: visual.borderWidthEmphasis } : null),
|
|
18
|
+
};
|
|
10
19
|
const interactiveStyle = withInteractivePressableStyle(styleProp, interaction, {
|
|
11
20
|
disabled: Boolean(props.disabled),
|
|
12
21
|
pressedVariant: 'default',
|
|
13
22
|
});
|
|
14
|
-
const baseStyles = 'flex-row items-center justify-center gap-2
|
|
23
|
+
const baseStyles = 'flex-row items-center justify-center gap-2';
|
|
15
24
|
const variantStyles = {
|
|
16
|
-
default: isActive ? 'border-
|
|
17
|
-
pills: isActive ? 'bg-primary
|
|
18
|
-
underline: isActive ? 'border-
|
|
25
|
+
default: isActive ? 'border-primary' : 'border-transparent',
|
|
26
|
+
pills: isActive ? 'bg-primary' : '',
|
|
27
|
+
underline: isActive ? 'border-primary' : '',
|
|
19
28
|
};
|
|
20
29
|
const textStyles = {
|
|
21
30
|
default: isActive ? 'text-primary font-medium' : 'text-muted-foreground font-medium',
|
|
22
31
|
pills: isActive ? 'text-primary-foreground font-medium' : 'text-muted-foreground font-medium',
|
|
23
32
|
underline: isActive ? 'text-foreground font-medium' : 'text-muted-foreground font-medium',
|
|
24
33
|
};
|
|
25
|
-
return (_jsxs(Pressable, {
|
|
34
|
+
return (_jsxs(Pressable, { accessibilityRole: "tab", accessibilityState: { selected: isActive }, "aria-selected": isActive, className: cn(baseStyles, variantStyles[variant], className), style: (state) => [
|
|
35
|
+
tokenStyle,
|
|
36
|
+
typeof interactiveStyle === 'function' ? interactiveStyle(state) : interactiveStyle,
|
|
37
|
+
], ...props, children: [icon && (_jsx(View, { className: isActive && variant === 'pills' ? 'text-primary-foreground' : '', children: icon })), _jsx(Text, { className: cn(textStyles[variant]), style: typographyStyle(visual, 'label'), children: label })] }));
|
|
26
38
|
}
|
|
27
|
-
export function TabBar({ items, activeKey, onSelect, variant = 'default', scrollable = false, className, ...props }) {
|
|
28
|
-
const
|
|
39
|
+
export function TabBar({ items, activeKey, onSelect, variant = 'default', scrollable = false, className, style, ...props }) {
|
|
40
|
+
const visual = useVisualTokens();
|
|
41
|
+
const content = (_jsx(View, { accessibilityRole: "tablist", className: cn('flex-row', variant === 'pills' && 'gap-1 bg-muted p-1', variant === 'default' && 'border-b border-border', !scrollable && 'justify-around', className), style: [variant === 'pills' ? { borderRadius: visual.badgeRadius } : null, style], ...props, children: items.map((item) => (_jsx(TabBarItemComponent, { item: item, isActive: activeKey === item.key, variant: variant, onPress: () => onSelect(item.key) }, item.key))) }));
|
|
29
42
|
if (scrollable) {
|
|
30
|
-
return (_jsx(ScrollView, { horizontal: true, showsHorizontalScrollIndicator: false, contentContainerStyle: { paddingHorizontal:
|
|
43
|
+
return (_jsx(ScrollView, { horizontal: true, showsHorizontalScrollIndicator: false, contentContainerStyle: { paddingHorizontal: visual.surfacePaddingSm }, children: content }));
|
|
31
44
|
}
|
|
32
45
|
return content;
|
|
33
46
|
}
|
|
34
|
-
//# sourceMappingURL=tab-bar.js.map
|
|
@@ -17,13 +17,12 @@ export interface SplashScreenProps extends ViewProps {
|
|
|
17
17
|
/** Loading text */
|
|
18
18
|
loadingText?: string;
|
|
19
19
|
}
|
|
20
|
-
export declare function SplashScreen({ appName, tagline, logo, variant, duration, onAnimationComplete, showLoading, loadingText, className, ...props }: SplashScreenProps): import("react
|
|
20
|
+
export declare function SplashScreen({ appName, tagline, logo, variant, duration, onAnimationComplete, showLoading, loadingText, className, ...props }: SplashScreenProps): import("react").JSX.Element;
|
|
21
21
|
export interface MinimalSplashProps extends Omit<SplashScreenProps, 'variant'> {
|
|
22
22
|
}
|
|
23
23
|
/** Minimal splash with just logo and name */
|
|
24
|
-
export declare function MinimalSplash(props: MinimalSplashProps): import("react
|
|
24
|
+
export declare function MinimalSplash(props: MinimalSplashProps): import("react").JSX.Element;
|
|
25
25
|
export interface BrandedSplashProps extends Omit<SplashScreenProps, 'variant' | 'showLoading'> {
|
|
26
26
|
}
|
|
27
27
|
/** Branded splash with scale animation and loading */
|
|
28
|
-
export declare function BrandedSplash(props: BrandedSplashProps): import("react
|
|
29
|
-
//# sourceMappingURL=splash-screen.d.ts.map
|
|
28
|
+
export declare function BrandedSplash(props: BrandedSplashProps): import("react").JSX.Element;
|
|
@@ -4,31 +4,29 @@ import { View } from 'react-native';
|
|
|
4
4
|
import Animated, { useSharedValue, useAnimatedStyle, withTiming, withDelay, withRepeat, withSequence, Easing, } from 'react-native-reanimated';
|
|
5
5
|
import { Text } from '../../components/text';
|
|
6
6
|
import { cn } from '../../lib/cn';
|
|
7
|
-
|
|
7
|
+
import { useVisualTokens } from '../../lib/visual-tokens';
|
|
8
|
+
import { typographyStyle } from '../../lib/recipes';
|
|
8
9
|
const AnimatedView = Animated.createAnimatedComponent(View);
|
|
9
|
-
// ─── Loading Dot Component ───────────────────────────────────
|
|
10
10
|
function LoadingDot({ delay }) {
|
|
11
11
|
const scale = useSharedValue(0.6);
|
|
12
12
|
const opacity = useSharedValue(0.3);
|
|
13
13
|
useEffect(() => {
|
|
14
14
|
scale.value = withDelay(delay, withRepeat(withSequence(withTiming(1, { duration: 400, easing: Easing.out(Easing.cubic) }), withTiming(0.6, { duration: 400, easing: Easing.in(Easing.cubic) })), -1, false));
|
|
15
15
|
opacity.value = withDelay(delay, withRepeat(withSequence(withTiming(1, { duration: 400, easing: Easing.out(Easing.cubic) }), withTiming(0.3, { duration: 400, easing: Easing.in(Easing.cubic) })), -1, false));
|
|
16
|
-
}, [delay]);
|
|
16
|
+
}, [delay, opacity, scale]);
|
|
17
17
|
const animatedStyle = useAnimatedStyle(() => ({
|
|
18
18
|
transform: [{ scale: scale.value }],
|
|
19
19
|
opacity: opacity.value,
|
|
20
20
|
}));
|
|
21
21
|
return (_jsx(AnimatedView, { style: animatedStyle, className: "h-2 w-2 rounded-full bg-muted-foreground" }));
|
|
22
22
|
}
|
|
23
|
-
// ─── Component ───────────────────────────────────────────────
|
|
24
23
|
export function SplashScreen({ appName, tagline, logo, variant = 'scale', duration = 800, onAnimationComplete, showLoading = false, loadingText, className, ...props }) {
|
|
25
|
-
|
|
24
|
+
const visual = useVisualTokens();
|
|
26
25
|
const opacity = useSharedValue(0);
|
|
27
26
|
const scale = useSharedValue(variant === 'scale' ? 0.8 : 1);
|
|
28
27
|
const translateY = useSharedValue(variant === 'slide' ? 30 : 0);
|
|
29
28
|
const loadingOpacity = useSharedValue(0);
|
|
30
29
|
useEffect(() => {
|
|
31
|
-
// Main content animation
|
|
32
30
|
opacity.value = withTiming(1, {
|
|
33
31
|
duration: duration * 0.6,
|
|
34
32
|
easing: Easing.out(Easing.cubic),
|
|
@@ -45,16 +43,23 @@ export function SplashScreen({ appName, tagline, logo, variant = 'scale', durati
|
|
|
45
43
|
easing: Easing.out(Easing.cubic),
|
|
46
44
|
});
|
|
47
45
|
}
|
|
48
|
-
// Loading indicator fade in
|
|
49
46
|
if (showLoading) {
|
|
50
47
|
loadingOpacity.value = withDelay(duration * 0.5, withTiming(1, { duration: 400 }));
|
|
51
48
|
}
|
|
52
|
-
// Callback after animation
|
|
53
49
|
if (onAnimationComplete) {
|
|
54
50
|
const timer = setTimeout(onAnimationComplete, duration);
|
|
55
51
|
return () => clearTimeout(timer);
|
|
56
52
|
}
|
|
57
|
-
}, [
|
|
53
|
+
}, [
|
|
54
|
+
duration,
|
|
55
|
+
loadingOpacity,
|
|
56
|
+
onAnimationComplete,
|
|
57
|
+
opacity,
|
|
58
|
+
scale,
|
|
59
|
+
showLoading,
|
|
60
|
+
translateY,
|
|
61
|
+
variant,
|
|
62
|
+
]);
|
|
58
63
|
const containerStyle = useAnimatedStyle(() => ({
|
|
59
64
|
opacity: opacity.value,
|
|
60
65
|
transform: [{ scale: scale.value }, { translateY: translateY.value }],
|
|
@@ -62,7 +67,7 @@ export function SplashScreen({ appName, tagline, logo, variant = 'scale', durati
|
|
|
62
67
|
const loadingStyle = useAnimatedStyle(() => ({
|
|
63
68
|
opacity: loadingOpacity.value,
|
|
64
69
|
}));
|
|
65
|
-
return (_jsxs(View, { className: cn('flex-1 items-center justify-center bg-background', className), ...props, children: [_jsxs(AnimatedView, { style: containerStyle, className: "items-center", children: [logo && _jsx(View, { className: "mb-6", children: logo }), appName && (_jsx(Text, { className: "text-4xl font-bold text-foreground tracking-tight", children: appName })), tagline && (_jsx(Text, { className: "mt-2 text-
|
|
70
|
+
return (_jsxs(View, { className: cn('flex-1 items-center justify-center bg-background', className), ...props, children: [_jsxs(AnimatedView, { style: containerStyle, className: "items-center", children: [logo && _jsx(View, { className: "mb-6", children: logo }), appName && (_jsx(Text, { className: "text-4xl font-bold text-foreground tracking-tight", children: appName })), tagline && (_jsx(Text, { className: "mt-2 text-muted-foreground text-center px-8", style: typographyStyle(visual, 'body'), children: tagline }))] }), showLoading && (_jsxs(AnimatedView, { style: loadingStyle, className: "absolute bottom-20 items-center", children: [_jsxs(View, { className: "flex-row items-center gap-2", children: [_jsx(LoadingDot, { delay: 0 }), _jsx(LoadingDot, { delay: 150 }), _jsx(LoadingDot, { delay: 300 })] }), loadingText && (_jsx(Text, { className: "mt-3 text-muted-foreground", style: typographyStyle(visual, 'label'), children: loadingText }))] }))] }));
|
|
66
71
|
}
|
|
67
72
|
/** Minimal splash with just logo and name */
|
|
68
73
|
export function MinimalSplash(props) {
|
|
@@ -72,4 +77,3 @@ export function MinimalSplash(props) {
|
|
|
72
77
|
export function BrandedSplash(props) {
|
|
73
78
|
return _jsx(SplashScreen, { variant: "scale", showLoading: true, ...props });
|
|
74
79
|
}
|
|
75
|
-
//# sourceMappingURL=splash-screen.js.map
|
|
@@ -18,21 +18,20 @@ export interface AccordionTriggerProps extends Omit<PressableProps, 'children'>
|
|
|
18
18
|
export interface AccordionContentProps extends ViewProps {
|
|
19
19
|
className?: string;
|
|
20
20
|
}
|
|
21
|
-
declare function Accordion({ type, defaultValue, collapsible, className, children, ...props }: AccordionProps):
|
|
21
|
+
declare function Accordion({ type, defaultValue, collapsible, className, children, ...props }: AccordionProps): React.JSX.Element;
|
|
22
22
|
declare namespace Accordion {
|
|
23
23
|
var displayName: string;
|
|
24
24
|
}
|
|
25
|
-
declare function AccordionItem({ value, className, children, ...props }: AccordionItemProps):
|
|
25
|
+
declare function AccordionItem({ value, className, children, ...props }: AccordionItemProps): React.JSX.Element;
|
|
26
26
|
declare namespace AccordionItem {
|
|
27
27
|
var displayName: string;
|
|
28
28
|
}
|
|
29
|
-
declare function AccordionTrigger({ className, children, style: styleProp, ...props }: AccordionTriggerProps):
|
|
29
|
+
declare function AccordionTrigger({ className, children, style: styleProp, ...props }: AccordionTriggerProps): React.JSX.Element;
|
|
30
30
|
declare namespace AccordionTrigger {
|
|
31
31
|
var displayName: string;
|
|
32
32
|
}
|
|
33
|
-
declare function AccordionContent({ className, children, ...props }: AccordionContentProps):
|
|
33
|
+
declare function AccordionContent({ className, children, ...props }: AccordionContentProps): React.JSX.Element | null;
|
|
34
34
|
declare namespace AccordionContent {
|
|
35
35
|
var displayName: string;
|
|
36
36
|
}
|
|
37
37
|
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
|
|
38
|
-
//# sourceMappingURL=accordion.d.ts.map
|