@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
|
@@ -15,5 +15,4 @@ export interface CheckoutSummaryProps extends ViewProps {
|
|
|
15
15
|
onCheckout?: () => void;
|
|
16
16
|
loading?: boolean;
|
|
17
17
|
}
|
|
18
|
-
export declare function CheckoutSummary({ items, subtotal, shipping, tax, discount, total, buttonLabel, onCheckout, loading, className, ...props }: CheckoutSummaryProps): import("react
|
|
19
|
-
//# sourceMappingURL=checkout-summary.d.ts.map
|
|
18
|
+
export declare function CheckoutSummary({ items, subtotal, shipping, tax, discount, total, buttonLabel, onCheckout, loading, className, style, ...props }: CheckoutSummaryProps): import("react").JSX.Element;
|
|
@@ -4,8 +4,20 @@ import { Text } from '../../components/text';
|
|
|
4
4
|
import { Separator } from '../../components/separator';
|
|
5
5
|
import { Button, ButtonText } from '../../components/button';
|
|
6
6
|
import { cn } from '../../lib/cn';
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
import { useVisualTokens } from '../../lib/visual-tokens';
|
|
8
|
+
import { surfacePadding, surfaceRadius, typographyStyle } from '../../lib/recipes';
|
|
9
|
+
export function CheckoutSummary({ items, subtotal, shipping, tax, discount, total, buttonLabel = 'Checkout', onCheckout, loading = false, className, style, ...props }) {
|
|
10
|
+
const visual = useVisualTokens();
|
|
11
|
+
const label = typographyStyle(visual, 'label');
|
|
12
|
+
const body = typographyStyle(visual, 'body');
|
|
13
|
+
const emphasis = typographyStyle(visual, 'emphasis');
|
|
14
|
+
const title = typographyStyle(visual, 'title');
|
|
15
|
+
return (_jsxs(View, { className: cn('border border-border bg-card', className), style: [
|
|
16
|
+
{
|
|
17
|
+
borderRadius: surfaceRadius(visual, 'xl'),
|
|
18
|
+
padding: surfacePadding(visual, 'default'),
|
|
19
|
+
borderWidth: visual.borderWidthHairline,
|
|
20
|
+
},
|
|
21
|
+
style,
|
|
22
|
+
], ...props, children: [_jsx(Text, { className: "mb-4 font-semibold text-foreground", style: emphasis, children: "Order Summary" }), items.length > 0 && (_jsx(View, { className: "mb-4 gap-2", children: items.map((item) => (_jsxs(View, { className: "flex-row items-center justify-between", children: [_jsx(Text, { className: cn(item.emphasized ? 'font-medium text-foreground' : 'text-muted-foreground'), style: label, numberOfLines: 1, children: item.label }), _jsx(Text, { className: cn(item.emphasized ? 'font-medium text-foreground' : 'text-muted-foreground'), style: label, children: item.value })] }, `${item.label}:${item.value}`))) })), _jsx(Separator, { className: "my-3" }), _jsxs(View, { className: "flex-row items-center justify-between", children: [_jsx(Text, { className: "text-muted-foreground", style: label, children: "Subtotal" }), _jsx(Text, { className: "text-foreground", style: label, children: subtotal })] }), shipping && (_jsxs(View, { className: "mt-2 flex-row items-center justify-between", children: [_jsx(Text, { className: "text-muted-foreground", style: label, children: "Shipping" }), _jsx(Text, { className: "text-foreground", style: label, children: shipping })] })), tax && (_jsxs(View, { className: "mt-2 flex-row items-center justify-between", children: [_jsx(Text, { className: "text-muted-foreground", style: label, children: "Tax" }), _jsx(Text, { className: "text-foreground", style: label, children: tax })] })), discount && (_jsxs(View, { className: "mt-2 flex-row items-center justify-between", children: [_jsx(Text, { className: "text-muted-foreground", style: label, children: "Discount" }), _jsxs(Text, { className: "text-primary", style: label, children: ["-", discount] })] })), _jsx(Separator, { className: "my-3" }), _jsxs(View, { className: "flex-row items-center justify-between", children: [_jsx(Text, { className: "font-semibold text-foreground", style: body, children: "Total" }), _jsx(Text, { className: "font-bold text-foreground", style: title, children: total })] }), onCheckout && (_jsx(Button, { className: "mt-4 w-full", onPress: onCheckout, disabled: loading, children: _jsx(ButtonText, { children: loading ? 'Processing...' : buttonLabel }) }))] }));
|
|
10
23
|
}
|
|
11
|
-
//# sourceMappingURL=checkout-summary.js.map
|
|
@@ -9,5 +9,4 @@ export interface FeatureGateProps extends ViewProps {
|
|
|
9
9
|
children?: ReactNode;
|
|
10
10
|
className?: string;
|
|
11
11
|
}
|
|
12
|
-
export declare function FeatureGate({ title, description, icon, buttonLabel, onUpgrade, children, className, ...props }: FeatureGateProps): import("react
|
|
13
|
-
//# sourceMappingURL=feature-gate.d.ts.map
|
|
12
|
+
export declare function FeatureGate({ title, description, icon, buttonLabel, onUpgrade, children, className, style, ...props }: FeatureGateProps): import("react").JSX.Element;
|
|
@@ -4,10 +4,20 @@ import { Card } from '../../components/card';
|
|
|
4
4
|
import { Button, ButtonText } from '../../components/button';
|
|
5
5
|
import { Text } from '../../components/text';
|
|
6
6
|
import { cn } from '../../lib/cn';
|
|
7
|
-
|
|
7
|
+
import { useVisualTokens } from '../../lib/visual-tokens';
|
|
8
|
+
import { surfacePadding, surfaceRadius, typographyStyle } from '../../lib/recipes';
|
|
9
|
+
export function FeatureGate({ title, description, icon, buttonLabel = 'Upgrade', onUpgrade, children, className, style, ...props }) {
|
|
10
|
+
const visual = useVisualTokens();
|
|
11
|
+
const body = typographyStyle(visual, 'body');
|
|
12
|
+
const label = typographyStyle(visual, 'label');
|
|
8
13
|
if (!children) {
|
|
9
|
-
return (_jsx(Card, { className: cn('
|
|
14
|
+
return (_jsx(Card, { className: cn('border-dashed border-border', className), padding: "lg", style: style, ...props, children: _jsxs(View, { className: "items-start gap-3", children: [icon ? _jsx(View, { children: icon }) : null, _jsxs(View, { className: "gap-1", children: [_jsx(Text, { className: "font-semibold text-foreground", style: body, children: title }), _jsx(Text, { className: "text-muted-foreground", style: label, children: description })] }), _jsx(Button, { onPress: onUpgrade, disabled: !onUpgrade, children: _jsx(ButtonText, { children: buttonLabel }) })] }) }));
|
|
10
15
|
}
|
|
11
|
-
return (_jsxs(View, { className: cn('overflow-hidden
|
|
16
|
+
return (_jsxs(View, { className: cn('overflow-hidden border border-border', className), style: [
|
|
17
|
+
{
|
|
18
|
+
borderRadius: surfaceRadius(visual, 'xl'),
|
|
19
|
+
borderWidth: visual.borderWidthHairline,
|
|
20
|
+
},
|
|
21
|
+
style,
|
|
22
|
+
], ...props, children: [_jsx(View, { className: "absolute inset-0 justify-center opacity-45", children: children }), _jsxs(View, { className: "items-center justify-center bg-background/70 px-6", style: { paddingVertical: surfacePadding(visual, 'default') }, children: [icon ? _jsx(View, { className: "mb-3", children: icon }) : null, _jsx(Text, { className: "text-center font-semibold text-foreground", style: body, children: title }), _jsx(Text, { className: "mt-1 text-center text-muted-foreground", style: label, children: description }), _jsx(Button, { className: "mt-4", onPress: onUpgrade, disabled: !onUpgrade, children: _jsx(ButtonText, { children: buttonLabel }) })] })] }));
|
|
12
23
|
}
|
|
13
|
-
//# sourceMappingURL=feature-gate.js.map
|
|
@@ -7,4 +7,3 @@ export { FeatureGate, type FeatureGateProps } from './feature-gate';
|
|
|
7
7
|
export { UsageBar, type UsageBarProps, type UsageBarVariant } from './usage-bar';
|
|
8
8
|
export { PlanToggle, type PlanToggleProps, type PlanToggleValue } from './plan-toggle';
|
|
9
9
|
export { UpgradeBanner, type UpgradeBannerProps, type UpgradeBannerVariant, } from './upgrade-banner';
|
|
10
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -6,7 +6,7 @@ declare const metricCardVariants: import("tailwind-variants").TVReturnType<{
|
|
|
6
6
|
default: string;
|
|
7
7
|
outlined: string;
|
|
8
8
|
};
|
|
9
|
-
}, undefined, "
|
|
9
|
+
}, undefined, "", import("tailwind-variants/dist/config.js").TVConfig<{
|
|
10
10
|
variant: {
|
|
11
11
|
default: string;
|
|
12
12
|
outlined: string;
|
|
@@ -26,7 +26,7 @@ declare const metricCardVariants: import("tailwind-variants").TVReturnType<{
|
|
|
26
26
|
default: string;
|
|
27
27
|
outlined: string;
|
|
28
28
|
};
|
|
29
|
-
}, undefined, "
|
|
29
|
+
}, undefined, "", import("tailwind-variants/dist/config.js").TVConfig<{
|
|
30
30
|
variant: {
|
|
31
31
|
default: string;
|
|
32
32
|
outlined: string;
|
|
@@ -51,6 +51,5 @@ export interface MetricCardProps extends ViewProps, VariantProps<typeof metricCa
|
|
|
51
51
|
/** Show a skeleton placeholder instead of content. */
|
|
52
52
|
loading?: boolean;
|
|
53
53
|
}
|
|
54
|
-
declare function MetricCard({ className, label, value, subtitle, progress, segments, icon, variant, loading, ...props }: MetricCardProps):
|
|
54
|
+
declare function MetricCard({ className, label, value, subtitle, progress, segments, icon, variant, loading, ...props }: MetricCardProps): React.JSX.Element;
|
|
55
55
|
export { MetricCard, metricCardVariants };
|
|
56
|
-
//# sourceMappingURL=metric-card.d.ts.map
|
|
@@ -5,8 +5,9 @@ import { Card } from '../../components/card';
|
|
|
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 metricCardVariants = tv({
|
|
9
|
-
base: '
|
|
10
|
+
base: '',
|
|
10
11
|
variants: {
|
|
11
12
|
variant: {
|
|
12
13
|
default: 'bg-card',
|
|
@@ -21,10 +22,13 @@ function MetricCardSkeleton({ className, variant, }) {
|
|
|
21
22
|
return (_jsxs(Card, { className: cn(metricCardVariants({ variant }), className), children: [_jsxs(View, { className: "flex-row items-start justify-between mb-2", children: [_jsx(Skeleton, { className: "h-3 w-1/3 rounded-md" }), _jsx(Skeleton, { className: "h-5 w-5 rounded-sm" })] }), _jsx(Skeleton, { className: "h-6 w-1/2 rounded-md mb-1" }), _jsx(Skeleton, { className: "h-3 w-2/5 rounded-md" }), _jsx(View, { className: "mt-3", children: _jsx(Skeleton, { className: "h-2 w-full rounded-full" }) })] }));
|
|
22
23
|
}
|
|
23
24
|
function MetricCard({ className, label, value, subtitle, progress, segments, icon, variant, loading = false, ...props }) {
|
|
25
|
+
const visual = useVisualTokens();
|
|
24
26
|
if (loading) {
|
|
25
27
|
return _jsx(MetricCardSkeleton, { className: className, variant: variant ?? 'default' });
|
|
26
28
|
}
|
|
27
|
-
return (_jsxs(Card, { className: cn(metricCardVariants({ variant }), className), ...props, children: [_jsxs(View, { className: "flex-row items-start justify-between mb-2", children: [_jsx(Text, { variant: "caption", className: "text-muted-foreground", children: label }), icon && _jsx(View, { children: icon })] }), _jsx(Text, { variant: "heading", className: "mb-1", children: value }), subtitle && (_jsx(Text, { variant: "caption", className: "text-muted-foreground", children: subtitle })), progress !== undefined && (_jsx(View, { className: "mt-3", children: _jsx(View, { className: "h-2 bg-muted
|
|
29
|
+
return (_jsxs(Card, { className: cn(metricCardVariants({ variant }), className), ...props, children: [_jsxs(View, { className: "flex-row items-start justify-between mb-2", children: [_jsx(Text, { variant: "caption", className: "text-muted-foreground", children: label }), icon && _jsx(View, { children: icon })] }), _jsx(Text, { variant: "heading", className: "mb-1", children: value }), subtitle && (_jsx(Text, { variant: "caption", className: "text-muted-foreground", children: subtitle })), progress !== undefined && (_jsx(View, { className: "mt-3", children: _jsx(View, { className: "h-2 bg-muted overflow-hidden", style: { borderRadius: visual.radiusSm }, children: _jsx(View, { className: "h-full bg-primary", style: {
|
|
30
|
+
borderRadius: visual.radiusSm,
|
|
31
|
+
width: `${Math.min(100, Math.max(0, progress))}%`,
|
|
32
|
+
} }) }) })), segments && segments.length > 0 && (_jsx(View, { className: "mt-3 flex-row h-3 overflow-hidden", style: { borderRadius: visual.radiusSm }, children: segments.map((seg) => (_jsx(View, { className: "h-full", style: { width: `${seg.value}%`, backgroundColor: seg.color } }, `${seg.color}:${seg.value}`))) }))] }));
|
|
28
33
|
}
|
|
29
34
|
export { MetricCard, metricCardVariants };
|
|
30
|
-
//# sourceMappingURL=metric-card.js.map
|
|
@@ -8,5 +8,4 @@ export interface PlanToggleProps extends ViewProps {
|
|
|
8
8
|
onChange?: (value: PlanToggleValue) => void;
|
|
9
9
|
className?: string;
|
|
10
10
|
}
|
|
11
|
-
export declare function PlanToggle({ selected, monthlyLabel, annualLabel, annualDiscount, onChange, className, ...props }: PlanToggleProps): import("react
|
|
12
|
-
//# sourceMappingURL=plan-toggle.d.ts.map
|
|
11
|
+
export declare function PlanToggle({ selected, monthlyLabel, annualLabel, annualDiscount, onChange, className, style, ...props }: PlanToggleProps): import("react").JSX.Element;
|
|
@@ -4,16 +4,18 @@ import { Pressable } from '../../components/pressable';
|
|
|
4
4
|
import { Badge, BadgeText } from '../../components/badge';
|
|
5
5
|
import { Text } from '../../components/text';
|
|
6
6
|
import { cn } from '../../lib/cn';
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
import { useVisualTokens } from '../../lib/visual-tokens';
|
|
8
|
+
import { controlRecipe, typographyStyle } from '../../lib/recipes';
|
|
9
|
+
export function PlanToggle({ selected, monthlyLabel = 'Monthly', annualLabel = 'Annual', annualDiscount, onChange, className, style, ...props }) {
|
|
10
|
+
const visual = useVisualTokens();
|
|
11
|
+
const segmentStyle = controlRecipe(visual, 'sm');
|
|
12
|
+
const labelStyle = typographyStyle(visual, 'label');
|
|
10
13
|
const renderItem = (value, label) => {
|
|
11
14
|
const active = selected === value;
|
|
12
|
-
return (_jsxs(Pressable, {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}), disabled: !onChange, onPress: () => onChange?.(value), children: [_jsx(Text, { className: cn(
|
|
15
|
+
return (_jsxs(Pressable, {
|
|
16
|
+
// A two-state chooser is a toggle button; `aria-pressed` is the state ARIA
|
|
17
|
+
// allows on that role.
|
|
18
|
+
accessibilityRole: "button", accessibilityState: { selected: active }, "aria-pressed": active, className: cn('flex-1 flex-row items-center justify-center gap-2', active ? 'bg-background border border-border' : 'bg-transparent'), feedback: "default", style: [segmentStyle, active ? { borderWidth: visual.borderWidthHairline } : null], disabled: !onChange, onPress: () => onChange?.(value), children: [_jsx(Text, { className: cn(active ? 'text-foreground' : 'text-muted-foreground'), style: labelStyle, children: label }), value === 'annual' && annualDiscount ? (_jsx(Badge, { variant: "success", children: _jsx(BadgeText, { children: annualDiscount }) })) : null] }, value));
|
|
16
19
|
};
|
|
17
|
-
return (_jsx(View, { className: cn('
|
|
20
|
+
return (_jsx(View, { className: cn('bg-muted p-1', className), style: [{ borderRadius: visual.radiusLg }, style], ...props, children: _jsx(View, { className: "flex-row", children: [renderItem('monthly', monthlyLabel), renderItem('annual', annualLabel)] }) }));
|
|
18
21
|
}
|
|
19
|
-
//# sourceMappingURL=plan-toggle.js.map
|
|
@@ -16,5 +16,4 @@ export interface PricingCardProps extends ViewProps {
|
|
|
16
16
|
/** Show a skeleton placeholder instead of content. */
|
|
17
17
|
loading?: boolean;
|
|
18
18
|
}
|
|
19
|
-
export declare function PricingCard({ name, description, price, period, features, badge, highlighted, buttonLabel, onPress, loading, className, ...props }: PricingCardProps): import("react
|
|
20
|
-
//# sourceMappingURL=pricing-card.d.ts.map
|
|
19
|
+
export declare function PricingCard({ name, description, price, period, features, badge, highlighted, buttonLabel, onPress, loading, className, style, ...props }: PricingCardProps): import("react").JSX.Element;
|
|
@@ -5,15 +5,32 @@ import { Button, ButtonText } from '../../components/button';
|
|
|
5
5
|
import { Badge, BadgeText } from '../../components/badge';
|
|
6
6
|
import { Skeleton } from '../../components/skeleton';
|
|
7
7
|
import { cn } from '../../lib/cn';
|
|
8
|
-
|
|
8
|
+
import { useVisualTokens } from '../../lib/visual-tokens';
|
|
9
|
+
import { useThemeColors } from '../../lib/theme-colors';
|
|
10
|
+
import { shadowStyle, surfacePadding, surfaceRadius, typographyStyle } from '../../lib/recipes';
|
|
9
11
|
function PricingCardSkeleton({ highlighted = false, className, }) {
|
|
10
|
-
|
|
12
|
+
const visual = useVisualTokens();
|
|
13
|
+
return (_jsxs(View, { className: cn('overflow-hidden', highlighted ? 'border-primary bg-card' : 'border-border bg-card', className), style: {
|
|
14
|
+
borderRadius: surfaceRadius(visual, 'xl'),
|
|
15
|
+
padding: surfacePadding(visual, 'lg'),
|
|
16
|
+
borderWidth: highlighted ? visual.borderWidthEmphasis : visual.borderWidthHairline,
|
|
17
|
+
}, children: [_jsxs(View, { className: "mb-4 flex-row items-center justify-between", children: [_jsx(Skeleton, { className: "h-5 w-1/3 rounded-md" }), _jsx(Skeleton, { className: "h-5 w-16 rounded-full" })] }), _jsx(Skeleton, { className: "mb-4 h-3 w-3/4 rounded-md" }), _jsxs(View, { className: "mb-6 flex-row items-baseline gap-1", children: [_jsx(Skeleton, { className: "h-10 w-20 rounded-md" }), _jsx(Skeleton, { className: "h-3 w-12 rounded-md" })] }), _jsx(View, { className: "mb-6 gap-3", children: [1, 2, 3, 4].map((i) => (_jsxs(View, { className: "flex-row items-center gap-3", children: [_jsx(Skeleton, { className: "h-4 w-4 rounded-sm" }), _jsx(Skeleton, { className: "h-3 w-3/5 rounded-md" })] }, i))) }), _jsx(Skeleton, { className: "h-10 w-full rounded-lg" })] }));
|
|
11
18
|
}
|
|
12
|
-
|
|
13
|
-
|
|
19
|
+
export function PricingCard({ name, description, price, period = '/month', features, badge, highlighted = false, buttonLabel = 'Get Started', onPress, loading = false, className, style, ...props }) {
|
|
20
|
+
const visual = useVisualTokens();
|
|
21
|
+
const colors = useThemeColors();
|
|
14
22
|
if (loading) {
|
|
15
23
|
return _jsx(PricingCardSkeleton, { highlighted: highlighted, className: className });
|
|
16
24
|
}
|
|
17
|
-
|
|
25
|
+
const emphasis = typographyStyle(visual, 'emphasis');
|
|
26
|
+
const label = typographyStyle(visual, 'label');
|
|
27
|
+
return (_jsxs(View, { className: cn('overflow-hidden', highlighted ? 'border-primary bg-card' : 'border-border bg-card', className), style: [
|
|
28
|
+
{
|
|
29
|
+
borderRadius: surfaceRadius(visual, 'xl'),
|
|
30
|
+
padding: surfacePadding(visual, 'lg'),
|
|
31
|
+
borderWidth: highlighted ? visual.borderWidthEmphasis : visual.borderWidthHairline,
|
|
32
|
+
},
|
|
33
|
+
highlighted ? shadowStyle(visual, colors, 'md') : null,
|
|
34
|
+
style,
|
|
35
|
+
], ...props, children: [_jsxs(View, { className: "mb-4 flex-row items-center justify-between", children: [_jsx(Text, { className: "font-semibold text-foreground", style: emphasis, children: name }), badge && (_jsx(Badge, { variant: highlighted ? 'default' : 'secondary', children: _jsx(BadgeText, { children: badge }) }))] }), description && (_jsx(Text, { className: "mb-4 text-muted-foreground", style: label, children: description })), _jsxs(View, { className: "mb-6 flex-row items-baseline", children: [_jsx(Text, { className: "text-4xl font-bold text-foreground", children: price }), _jsx(Text, { className: "ml-1 text-muted-foreground", children: period })] }), _jsx(View, { className: "mb-6 gap-3", children: features.map((feature) => (_jsxs(View, { className: "flex-row items-center gap-3", children: [_jsx(Text, { className: feature.included ? 'text-primary' : 'text-muted-foreground', children: feature.included ? '✓' : '✕' }), _jsx(Text, { className: cn(feature.included ? 'text-foreground' : 'text-muted-foreground line-through'), style: label, children: feature.label })] }, feature.label))) }), _jsx(Button, { variant: highlighted ? 'default' : 'outline', className: "w-full", onPress: onPress, children: _jsx(ButtonText, { children: buttonLabel }) })] }));
|
|
18
36
|
}
|
|
19
|
-
//# sourceMappingURL=pricing-card.js.map
|
|
@@ -13,5 +13,4 @@ export interface ProductCardProps extends Omit<PressableProps, 'children'> {
|
|
|
13
13
|
/** Show a skeleton placeholder instead of content. */
|
|
14
14
|
loading?: boolean;
|
|
15
15
|
}
|
|
16
|
-
export declare function ProductCard({ imageUrl, title, description, price, originalPrice, badge, rating, reviewCount, inStock, variant, loading, className, style: styleProp, ...props }: ProductCardProps): import("react
|
|
17
|
-
//# sourceMappingURL=product-card.d.ts.map
|
|
16
|
+
export declare function ProductCard({ imageUrl, title, description, price, originalPrice, badge, rating, reviewCount, inStock, variant, loading, className, style: styleProp, ...props }: ProductCardProps): import("react").JSX.Element;
|
|
@@ -1,25 +1,39 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { Image } from 'expo-image';
|
|
3
|
+
import { View, Pressable } from 'react-native';
|
|
3
4
|
import { Text } from '../../components/text';
|
|
4
5
|
import { Badge, BadgeText } from '../../components/badge';
|
|
5
6
|
import { Skeleton } from '../../components/skeleton';
|
|
6
7
|
import { cn } from '../../lib/cn';
|
|
7
8
|
import { useInteractionTokens, withInteractivePressableStyle } from '../../lib/interaction-tokens';
|
|
8
|
-
|
|
9
|
+
import { useVisualTokens } from '../../lib/visual-tokens';
|
|
10
|
+
import { surfacePadding, surfaceRadius, typographyStyle } from '../../lib/recipes';
|
|
9
11
|
function ProductCardSkeleton({ variant = 'vertical', className, }) {
|
|
12
|
+
const visual = useVisualTokens();
|
|
10
13
|
const isHorizontal = variant === 'horizontal';
|
|
11
|
-
return (_jsxs(View, { className: cn('overflow-hidden
|
|
14
|
+
return (_jsxs(View, { className: cn('overflow-hidden border border-border bg-card', isHorizontal ? 'flex-row' : 'flex-col', className), style: {
|
|
15
|
+
borderRadius: surfaceRadius(visual, 'xl'),
|
|
16
|
+
borderWidth: visual.borderWidthHairline,
|
|
17
|
+
}, children: [_jsx(Skeleton, { className: cn(isHorizontal ? 'h-28 w-28' : 'aspect-square w-full rounded-none') }), _jsxs(View, { className: cn('flex-1 gap-2', isHorizontal && 'justify-center'), style: { padding: surfacePadding(visual, 'sm') }, children: [_jsx(Skeleton, { className: "h-4 w-3/4 rounded-md" }), !isHorizontal && _jsx(Skeleton, { className: "h-3 w-full rounded-md" }), _jsx(Skeleton, { className: "h-3 w-1/3 rounded-md" }), _jsx(Skeleton, { className: "h-5 w-1/4 rounded-md" })] })] }));
|
|
12
18
|
}
|
|
13
|
-
// ─── Component ───────────────────────────────────────────────
|
|
14
19
|
export function ProductCard({ imageUrl, title, description, price, originalPrice, badge, rating, reviewCount, inStock = true, variant = 'vertical', loading = false, className, style: styleProp, ...props }) {
|
|
15
20
|
const isHorizontal = variant === 'horizontal';
|
|
16
21
|
const interaction = useInteractionTokens();
|
|
22
|
+
const visual = useVisualTokens();
|
|
17
23
|
if (loading) {
|
|
18
24
|
return _jsx(ProductCardSkeleton, { variant: variant, className: className });
|
|
19
25
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
26
|
+
const label = typographyStyle(visual, 'label');
|
|
27
|
+
const interactiveStyle = withInteractivePressableStyle(styleProp, interaction, {
|
|
28
|
+
disabled: Boolean(props.disabled),
|
|
29
|
+
pressedVariant: 'strong',
|
|
30
|
+
});
|
|
31
|
+
const surfaceStyle = {
|
|
32
|
+
borderRadius: surfaceRadius(visual, 'xl'),
|
|
33
|
+
borderWidth: visual.borderWidthHairline,
|
|
34
|
+
};
|
|
35
|
+
return (_jsxs(Pressable, { className: cn('overflow-hidden border border-border bg-card', isHorizontal ? 'flex-row' : 'flex-col', className), style: (state) => {
|
|
36
|
+
const baseStyle = typeof interactiveStyle === 'function' ? interactiveStyle(state) : interactiveStyle;
|
|
37
|
+
return [surfaceStyle, baseStyle];
|
|
38
|
+
}, ...props, children: [_jsxs(View, { className: cn('items-center justify-center bg-muted', isHorizontal ? 'h-28 w-28' : 'aspect-square w-full'), children: [imageUrl ? (_jsx(Image, { source: { uri: imageUrl }, className: "h-full w-full", contentFit: "cover" })) : (_jsx(View, { className: "items-center justify-center gap-2", children: _jsx(View, { className: "h-10 w-10 bg-muted-soft items-center justify-center", style: { borderRadius: visual.radiusSm }, children: _jsx(Text, { className: "text-muted-foreground text-lg", children: "\uD83D\uDCE6" }) }) })), badge && (_jsx(View, { className: "absolute left-2 top-2", children: _jsx(Badge, { variant: "destructive", children: _jsx(BadgeText, { children: badge }) }) }))] }), _jsxs(View, { className: cn('flex-1', isHorizontal && 'justify-center'), style: { padding: surfacePadding(visual, 'sm') }, children: [_jsx(Text, { className: "font-medium text-foreground", numberOfLines: 2, children: title }), description && !isHorizontal && (_jsx(Text, { className: "mt-1 text-muted-foreground", style: label, numberOfLines: 2, children: description })), rating !== undefined && (_jsxs(View, { className: "mt-1 flex-row items-center gap-1", children: [_jsx(Text, { className: "text-accent", style: label, children: "\u2605" }), _jsxs(Text, { className: "text-muted-foreground", style: label, children: [rating.toFixed(1), reviewCount !== undefined && ` (${reviewCount})`] })] })), _jsxs(View, { className: "mt-2 flex-row items-center gap-2", children: [_jsx(Text, { className: "text-lg font-bold text-foreground", children: price }), originalPrice && (_jsx(Text, { className: "text-muted-foreground line-through", style: label, children: originalPrice }))] }), !inStock && (_jsx(Text, { className: "mt-1 text-destructive", style: label, children: "Out of stock" }))] })] }));
|
|
24
39
|
}
|
|
25
|
-
//# sourceMappingURL=product-card.js.map
|
|
@@ -13,5 +13,4 @@ export interface SubscriptionCardProps extends ViewProps {
|
|
|
13
13
|
loading?: boolean;
|
|
14
14
|
className?: string;
|
|
15
15
|
}
|
|
16
|
-
export declare function SubscriptionCard({ planName, price, period, expiresAt, isActive, onManage, onUpgrade, manageLabel, upgradeLabel, loading, className, ...props }: SubscriptionCardProps): import("react
|
|
17
|
-
//# sourceMappingURL=subscription-card.d.ts.map
|
|
16
|
+
export declare function SubscriptionCard({ planName, price, period, expiresAt, isActive, onManage, onUpgrade, manageLabel, upgradeLabel, loading, className, ...props }: SubscriptionCardProps): import("react").JSX.Element;
|
|
@@ -6,13 +6,16 @@ import { Badge, BadgeText } from '../../components/badge';
|
|
|
6
6
|
import { Skeleton } from '../../components/skeleton';
|
|
7
7
|
import { Text } from '../../components/text';
|
|
8
8
|
import { cn } from '../../lib/cn';
|
|
9
|
+
import { useVisualTokens } from '../../lib/visual-tokens';
|
|
10
|
+
import { typographyStyle } from '../../lib/recipes';
|
|
9
11
|
function SubscriptionCardSkeleton({ className }) {
|
|
10
|
-
return (_jsxs(Card, { className:
|
|
12
|
+
return (_jsxs(Card, { className: className, children: [_jsx(CardHeader, { className: "pb-2", children: _jsxs(View, { className: "flex-row items-center justify-between", children: [_jsx(Skeleton, { className: "h-5 w-1/3 rounded-md" }), _jsx(Skeleton, { className: "h-5 w-16 rounded-full" })] }) }), _jsxs(CardContent, { className: "gap-2", children: [_jsxs(View, { className: "flex-row items-baseline gap-1", children: [_jsx(Skeleton, { className: "h-7 w-20 rounded-md" }), _jsx(Skeleton, { className: "h-3 w-12 rounded-md" })] }), _jsx(Skeleton, { className: "h-3 w-2/5 rounded-md" })] }), _jsxs(CardFooter, { className: "gap-2", children: [_jsx(Skeleton, { className: "h-10 flex-1 rounded-lg" }), _jsx(Skeleton, { className: "h-10 flex-1 rounded-lg" })] })] }));
|
|
11
13
|
}
|
|
12
14
|
export function SubscriptionCard({ planName, price, period = '/month', expiresAt, isActive = true, onManage, onUpgrade, manageLabel = 'Manage plan', upgradeLabel = 'Upgrade', loading = false, className, ...props }) {
|
|
15
|
+
const visual = useVisualTokens();
|
|
13
16
|
if (loading) {
|
|
14
17
|
return _jsx(SubscriptionCardSkeleton, { className: className });
|
|
15
18
|
}
|
|
16
|
-
|
|
19
|
+
const label = typographyStyle(visual, 'label');
|
|
20
|
+
return (_jsxs(Card, { className: cn(className), ...props, children: [_jsx(CardHeader, { className: "pb-2", children: _jsxs(View, { className: "flex-row items-center justify-between", children: [_jsx(CardTitle, { children: planName }), _jsx(Badge, { variant: isActive ? 'success' : 'secondary', children: _jsx(BadgeText, { children: isActive ? 'Active' : 'Inactive' }) })] }) }), _jsxs(CardContent, { className: "gap-2", children: [_jsxs(View, { className: "flex-row items-baseline gap-1", children: [_jsx(Text, { className: "text-2xl font-bold text-foreground", children: price }), _jsx(Text, { className: "text-muted-foreground", style: label, children: period })] }), expiresAt ? (_jsxs(Text, { className: "text-muted-foreground", style: label, children: ["Renews on ", expiresAt] })) : (_jsx(Text, { className: "text-muted-foreground", style: label, children: "No renewal date set" }))] }), _jsxs(CardFooter, { className: "gap-2", children: [_jsx(Button, { variant: "outline", onPress: onManage, disabled: !onManage, children: _jsx(ButtonText, { children: manageLabel }) }), _jsx(Button, { onPress: onUpgrade, disabled: !onUpgrade, children: _jsx(ButtonText, { children: upgradeLabel }) })] })] }));
|
|
17
21
|
}
|
|
18
|
-
//# sourceMappingURL=subscription-card.js.map
|
|
@@ -8,5 +8,4 @@ export interface UpgradeBannerProps extends ViewProps {
|
|
|
8
8
|
variant?: UpgradeBannerVariant;
|
|
9
9
|
className?: string;
|
|
10
10
|
}
|
|
11
|
-
export declare function UpgradeBanner({ message, actionLabel, onAction, onDismiss, variant, className, ...props }: UpgradeBannerProps): import("react
|
|
12
|
-
//# sourceMappingURL=upgrade-banner.d.ts.map
|
|
11
|
+
export declare function UpgradeBanner({ message, actionLabel, onAction, onDismiss, variant, className, style, ...props }: UpgradeBannerProps): import("react").JSX.Element;
|
|
@@ -3,7 +3,17 @@ import { View } from 'react-native';
|
|
|
3
3
|
import { Button, ButtonText } from '../../components/button';
|
|
4
4
|
import { Text } from '../../components/text';
|
|
5
5
|
import { cn } from '../../lib/cn';
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
import { useVisualTokens } from '../../lib/visual-tokens';
|
|
7
|
+
import { surfacePadding, surfaceRadius, typographyStyle } from '../../lib/recipes';
|
|
8
|
+
export function UpgradeBanner({ message, actionLabel = 'Upgrade', onAction, onDismiss, variant = 'info', className, style, ...props }) {
|
|
9
|
+
const visual = useVisualTokens();
|
|
10
|
+
const label = typographyStyle(visual, 'label');
|
|
11
|
+
return (_jsx(View, { className: cn('border', variant === 'warning' ? 'border-warning/40 bg-warning/10' : 'border-info/40 bg-info/10', className), style: [
|
|
12
|
+
{
|
|
13
|
+
borderRadius: surfaceRadius(visual, 'xl'),
|
|
14
|
+
padding: surfacePadding(visual, 'default'),
|
|
15
|
+
borderWidth: visual.borderWidthHairline,
|
|
16
|
+
},
|
|
17
|
+
style,
|
|
18
|
+
], ...props, children: _jsxs(View, { className: "gap-3", children: [_jsx(Text, { className: "text-foreground", style: label, children: message }), _jsxs(View, { className: "flex-row gap-2", children: [_jsx(Button, { size: "sm", onPress: onAction, disabled: !onAction, children: _jsx(ButtonText, { children: actionLabel }) }), onDismiss ? (_jsx(Button, { size: "sm", variant: "ghost", onPress: onDismiss, children: _jsx(ButtonText, { children: "Dismiss" }) })) : null] })] }) }));
|
|
8
19
|
}
|
|
9
|
-
//# sourceMappingURL=upgrade-banner.js.map
|
|
@@ -7,5 +7,4 @@ export interface UsageBarProps extends ViewProps {
|
|
|
7
7
|
variant?: UsageBarVariant;
|
|
8
8
|
className?: string;
|
|
9
9
|
}
|
|
10
|
-
export declare function UsageBar({ label, used, limit, variant, className, ...props }: UsageBarProps): import("react
|
|
11
|
-
//# sourceMappingURL=usage-bar.d.ts.map
|
|
10
|
+
export declare function UsageBar({ label, used, limit, variant, className, ...props }: UsageBarProps): import("react").JSX.Element;
|
|
@@ -2,6 +2,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { View } 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 { typographyStyle } from '../../lib/recipes';
|
|
5
7
|
function getUsageVariant(used, limit, variant) {
|
|
6
8
|
if (variant)
|
|
7
9
|
return variant;
|
|
@@ -15,6 +17,7 @@ function getUsageVariant(used, limit, variant) {
|
|
|
15
17
|
return 'default';
|
|
16
18
|
}
|
|
17
19
|
export function UsageBar({ label, used, limit, variant, className, ...props }) {
|
|
20
|
+
const visual = useVisualTokens();
|
|
18
21
|
const resolvedVariant = getUsageVariant(used, limit, variant);
|
|
19
22
|
const safeLimit = limit <= 0 ? 1 : limit;
|
|
20
23
|
const clamped = Math.max(0, Math.min(100, (used / safeLimit) * 100));
|
|
@@ -28,6 +31,5 @@ export function UsageBar({ label, used, limit, variant, className, ...props }) {
|
|
|
28
31
|
: resolvedVariant === 'warning'
|
|
29
32
|
? 'text-warning'
|
|
30
33
|
: 'text-muted-foreground';
|
|
31
|
-
return (_jsxs(View, { className: cn('gap-2', className), ...props, children: [_jsxs(View, { className: "flex-row items-center justify-between", children: [_jsx(Text, { className: "
|
|
34
|
+
return (_jsxs(View, { className: cn('gap-2', className), ...props, children: [_jsxs(View, { className: "flex-row items-center justify-between", children: [_jsx(Text, { className: "font-medium text-foreground", style: typographyStyle(visual, 'label'), children: label }), _jsxs(Text, { className: cn(captionClass), style: typographyStyle(visual, 'caption'), children: [used, "/", limit] })] }), _jsx(View, { className: "h-2 overflow-hidden bg-muted", style: { borderRadius: visual.radiusSm }, children: _jsx(View, { className: cn('h-full', progressClass), style: { borderRadius: visual.radiusSm, width: `${clamped}%` } }) })] }));
|
|
32
35
|
}
|
|
33
|
-
//# sourceMappingURL=usage-bar.js.map
|
|
@@ -29,12 +29,11 @@ export interface DateRangePickerModalProps extends FrostedSurfaceProps {
|
|
|
29
29
|
className?: string;
|
|
30
30
|
}
|
|
31
31
|
declare function formatRangeDisplay(range: DateRange | null | undefined): string;
|
|
32
|
-
export declare function DateRangePickerModal({ value, onValueChange, open, onOpenChange, minDate, maxDate, theme: customTheme, trigger, title, confirmLabel, className, frosted, blurIntensity, blurTintToken, }: DateRangePickerModalProps):
|
|
32
|
+
export declare function DateRangePickerModal({ value, onValueChange, open, onOpenChange, minDate, maxDate, theme: customTheme, trigger, title, confirmLabel, className, frosted, blurIntensity, blurTintToken, }: DateRangePickerModalProps): React.JSX.Element;
|
|
33
33
|
/** Compact trigger showing formatted range. Use as DateRangePickerModal's trigger prop. */
|
|
34
34
|
export declare function DateRangePickerTrigger({ value, placeholder, className, }: {
|
|
35
35
|
value?: DateRange | null;
|
|
36
36
|
placeholder?: string;
|
|
37
37
|
className?: string;
|
|
38
|
-
}):
|
|
38
|
+
}): React.JSX.Element;
|
|
39
39
|
export { formatRangeDisplay };
|
|
40
|
-
//# sourceMappingURL=date-range-picker-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, 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
|