@passui/react 0.1.17 → 0.1.20
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 +140 -1
- package/THIRD_PARTY_NOTICES.md +25 -0
- package/dist/types/src/appearance/index.d.ts +2 -0
- package/dist/types/src/appearance/platform.d.ts +9 -0
- package/dist/types/src/appearance/theme.d.ts +71 -0
- package/dist/types/src/components/accordion/accordion.d.ts +19 -0
- package/dist/types/src/components/ambient/ambient.d.ts +12 -0
- package/dist/types/src/components/ambient/index.d.ts +1 -0
- package/dist/types/src/components/aspect-ratio/aspect-ratio.d.ts +7 -0
- package/dist/types/src/components/breadcrumb/breadcrumb.d.ts +16 -0
- package/dist/types/src/components/button/button-styles.d.ts +12 -0
- package/dist/types/src/components/button/button.d.ts +32 -0
- package/dist/types/src/components/button/icon-button.d.ts +10 -0
- package/dist/types/src/components/button/pending-spinner.d.ts +5 -0
- package/dist/types/src/components/button/use-pending-indicator.d.ts +2 -0
- package/dist/types/src/components/chip/chip.d.ts +7 -0
- package/dist/types/src/components/code-block/code-block.d.ts +10 -0
- package/dist/types/src/components/combo-box/combo-box.d.ts +9 -0
- package/dist/types/src/components/command/command.d.ts +18 -0
- package/dist/types/src/components/compact-date-picker/calendar-month.d.ts +25 -0
- package/dist/types/src/components/compact-date-picker/compact-date-picker.d.ts +27 -0
- package/dist/types/src/components/compact-time-picker/compact-time-picker.d.ts +26 -0
- package/dist/types/src/components/compact-time-picker/time-value.d.ts +18 -0
- package/dist/types/src/components/content-unavailable-view/content-unavailable-view.d.ts +9 -0
- package/dist/types/src/components/content-view/content-view.d.ts +48 -0
- package/dist/types/src/components/content-view/index.d.ts +1 -0
- package/dist/types/src/components/context-menu/conceal-menu-source.d.ts +2 -0
- package/dist/types/src/components/context-menu/context-menu-host.d.ts +2 -0
- package/dist/types/src/components/context-menu/context-menu-store.d.ts +57 -0
- package/dist/types/src/components/context-menu/menu-navigation.d.ts +6 -0
- package/dist/types/src/components/context-menu/menu-position.d.ts +21 -0
- package/dist/types/src/components/context-menu/menu-reveal.d.ts +17 -0
- package/dist/types/src/components/context-menu/use-context-menu.d.ts +14 -0
- package/dist/types/src/components/conversation/conversation.d.ts +43 -0
- package/dist/types/src/components/conversation/index.d.ts +1 -0
- package/dist/types/src/components/date-picker/date-picker.d.ts +16 -0
- package/dist/types/src/components/date-picker/date-value.d.ts +2 -0
- package/dist/types/src/components/dialog/dialog-host.d.ts +6 -0
- package/dist/types/src/components/dialog/dialog-store.d.ts +23 -0
- package/dist/types/src/components/dialog/dialog.d.ts +30 -0
- package/dist/types/src/components/dialog/index.d.ts +1 -0
- package/dist/types/src/components/disclosure-group/disclosure-group.d.ts +15 -0
- package/dist/types/src/components/divider/divider.d.ts +9 -0
- package/dist/types/src/components/inline-disclosure/inline-disclosure.d.ts +15 -0
- package/dist/types/src/components/keyboard-shortcut/keyboard-shortcut.d.ts +5 -0
- package/dist/types/src/components/labeled-content/labeled-content.d.ts +19 -0
- package/dist/types/src/components/locale-switcher/index.d.ts +1 -0
- package/dist/types/src/components/locale-switcher/locale-switcher.d.ts +10 -0
- package/dist/types/src/components/menu/menu.d.ts +16 -0
- package/dist/types/src/components/one-time-code/one-time-code.d.ts +18 -0
- package/dist/types/src/components/picker/picker-trigger.d.ts +2 -0
- package/dist/types/src/components/picker/picker.d.ts +43 -0
- package/dist/types/src/components/popover/anchored-surface.d.ts +13 -0
- package/dist/types/src/components/popover/popover-fit.d.ts +21 -0
- package/dist/types/src/components/popover/popover.d.ts +18 -0
- package/dist/types/src/components/profile-image/profile-image.d.ts +4 -0
- package/dist/types/src/components/progress-view/progress-view.d.ts +13 -0
- package/dist/types/src/components/progress-view/use-liquid-progress.d.ts +3 -0
- package/dist/types/src/components/radio-group/radio-group.d.ts +17 -0
- package/dist/types/src/components/search-field/expanding-search-field.d.ts +5 -0
- package/dist/types/src/components/search-field/search-field.d.ts +6 -0
- package/dist/types/src/components/search-list/search-list.d.ts +19 -0
- package/dist/types/src/components/section/section.d.ts +15 -0
- package/dist/types/src/components/secure-field/secure-field.d.ts +4 -0
- package/dist/types/src/components/segmented-control/segmented-control.d.ts +20 -0
- package/dist/types/src/components/sheet/modal-environment.d.ts +2 -0
- package/dist/types/src/components/sheet/sheet-portal.d.ts +5 -0
- package/dist/types/src/components/sheet/sheet.d.ts +21 -0
- package/dist/types/src/components/sheet/use-sheet-focus.d.ts +3 -0
- package/dist/types/src/components/sidebar/sidebar.d.ts +19 -0
- package/dist/types/src/components/skeleton/skeleton.d.ts +6 -0
- package/dist/types/src/components/slider/slider.d.ts +14 -0
- package/dist/types/src/components/slosh-slider/liquid-step.d.ts +6 -0
- package/dist/types/src/components/slosh-slider/slosh-slider.d.ts +18 -0
- package/dist/types/src/components/stat-tile/index.d.ts +1 -0
- package/dist/types/src/components/stat-tile/stat-tile.d.ts +15 -0
- package/dist/types/src/components/status-indicator/status-indicator.d.ts +14 -0
- package/dist/types/src/components/stepper/rolling-digit.d.ts +11 -0
- package/dist/types/src/components/stepper/stepper.d.ts +19 -0
- package/dist/types/src/components/swatch-picker/swatch-picker.d.ts +17 -0
- package/dist/types/src/components/tab-bar/tab-bar.d.ts +40 -0
- package/dist/types/src/components/tab-view/tab-view.d.ts +24 -0
- package/dist/types/src/components/table/table.d.ts +10 -0
- package/dist/types/src/components/text-editor/text-editor.d.ts +2 -0
- package/dist/types/src/components/text-field/text-field.d.ts +20 -0
- package/dist/types/src/components/toast/toast-store.d.ts +47 -0
- package/dist/types/src/components/toast/toaster.d.ts +10 -0
- package/dist/types/src/components/toggle/toggle.d.ts +17 -0
- package/dist/types/src/components/tooltip/tooltip-host.d.ts +6 -0
- package/dist/types/src/components/view-controller/index.d.ts +1 -0
- package/dist/types/src/components/view-controller/view-controller.d.ts +21 -0
- package/dist/types/src/components/wake-slider/wake-slider.d.ts +12 -0
- package/dist/types/src/hooks/scroll/minimize-decision.d.ts +2 -0
- package/dist/types/src/hooks/use-anchored-disclosure.d.ts +9 -0
- package/dist/types/src/hooks/use-anchored-placement.d.ts +7 -0
- package/dist/types/src/hooks/use-dismiss.d.ts +9 -0
- package/dist/types/src/hooks/use-floating-dismiss.d.ts +3 -0
- package/dist/types/src/hooks/use-media-query.d.ts +21 -0
- package/dist/types/src/hooks/use-minimize-on-scroll.d.ts +6 -0
- package/dist/types/src/hooks/use-visual-viewport.d.ts +4 -0
- package/dist/types/src/hooks/viewport/types.d.ts +19 -0
- package/dist/types/src/hooks/viewport/viewport-metrics.d.ts +3 -0
- package/dist/types/src/icons/icons.d.ts +612 -0
- package/dist/types/src/index.d.ts +71 -0
- package/dist/types/src/lib/anchored-placement.d.ts +39 -0
- package/dist/types/src/lib/class-names.d.ts +2 -0
- package/dist/types/src/lib/clipboard.d.ts +6 -0
- package/dist/types/src/lib/date.d.ts +50 -0
- package/dist/types/src/lib/floating-layers.d.ts +8 -0
- package/dist/types/src/lib/haptics.d.ts +8 -0
- package/dist/types/src/lib/language.d.ts +4 -0
- package/dist/types/src/lib/range-value.d.ts +4 -0
- package/dist/types/src/lib/screen-edges.d.ts +12 -0
- package/dist/types/src/lib/shapes.d.ts +17 -0
- package/dist/types/src/motion/transitions.d.ts +97 -0
- package/dist/types/src/tokens.d.ts +1 -0
- package/package.json +248 -40
- package/src/appearance/platform.tsx +10 -47
- package/src/appearance/theme.tsx +42 -142
- package/src/components/accordion/accordion.tsx +48 -0
- package/src/components/ambient/ambient.tsx +2 -10
- package/src/components/aspect-ratio/aspect-ratio.tsx +22 -0
- package/src/components/breadcrumb/breadcrumb.tsx +53 -0
- package/src/components/button/button-styles.ts +13 -31
- package/src/components/button/button.tsx +24 -15
- package/src/components/button/icon-button.tsx +14 -56
- package/src/components/button/use-pending-indicator.ts +2 -7
- package/src/components/chip/chip.tsx +8 -13
- package/src/components/code-block/code-block.tsx +41 -0
- package/src/components/combo-box/combo-box.tsx +13 -0
- package/src/components/command/command.tsx +119 -0
- package/src/components/compact-date-picker/calendar-month.ts +13 -57
- package/src/components/compact-date-picker/compact-date-picker.tsx +72 -195
- package/src/components/compact-time-picker/compact-time-picker.tsx +74 -195
- package/src/components/compact-time-picker/time-value.ts +4 -16
- package/src/components/content-unavailable-view/content-unavailable-view.tsx +37 -0
- package/src/components/content-view/content-view.tsx +13 -56
- package/src/components/context-menu/conceal-menu-source.ts +1 -4
- package/src/components/context-menu/context-menu-host.tsx +132 -198
- package/src/components/context-menu/context-menu-store.ts +5 -14
- package/src/components/context-menu/menu-navigation.ts +29 -0
- package/src/components/context-menu/menu-position.ts +6 -27
- package/src/components/context-menu/menu-reveal.ts +14 -52
- package/src/components/context-menu/use-context-menu.ts +6 -30
- package/src/components/conversation/conversation.tsx +26 -72
- package/src/components/date-picker/date-picker.tsx +8 -37
- package/src/components/date-picker/date-value.ts +5 -30
- package/src/components/dialog/dialog-host.tsx +37 -76
- package/src/components/dialog/dialog-store.ts +16 -7
- package/src/components/dialog/dialog.tsx +23 -80
- package/src/components/disclosure-group/disclosure-group.tsx +79 -0
- package/src/components/divider/divider.tsx +31 -0
- package/src/components/inline-disclosure/inline-disclosure.tsx +49 -0
- package/src/components/keyboard-shortcut/keyboard-shortcut.tsx +17 -0
- package/src/components/labeled-content/labeled-content.tsx +24 -18
- package/src/components/locale-switcher/locale-switcher.tsx +20 -70
- package/src/components/menu/menu.tsx +68 -0
- package/src/components/one-time-code/one-time-code.tsx +168 -0
- package/src/components/picker/picker-trigger.ts +10 -0
- package/src/components/picker/picker.tsx +165 -283
- package/src/components/popover/anchored-surface.tsx +223 -0
- package/src/components/popover/popover-fit.ts +69 -0
- package/src/components/popover/popover.tsx +209 -63
- package/src/components/profile-image/profile-image.tsx +6 -28
- package/src/components/progress-view/progress-view.tsx +70 -0
- package/src/components/progress-view/use-liquid-progress.ts +43 -0
- package/src/components/radio-group/radio-group.tsx +63 -0
- package/src/components/search-field/expanding-search-field.tsx +183 -0
- package/src/components/search-field/search-field.tsx +25 -7
- package/src/components/search-list/search-list.tsx +58 -75
- package/src/components/section/section.tsx +18 -17
- package/src/components/secure-field/secure-field.tsx +5 -7
- package/src/components/segmented-control/segmented-control.tsx +20 -29
- package/src/components/sheet/modal-environment.ts +16 -54
- package/src/components/sheet/sheet-portal.tsx +10 -42
- package/src/components/sheet/sheet.tsx +17 -25
- package/src/components/sheet/use-sheet-focus.ts +15 -51
- package/src/components/sidebar/sidebar.tsx +44 -38
- package/src/components/skeleton/skeleton.tsx +19 -0
- package/src/components/slider/slider.tsx +76 -0
- package/src/components/slosh-slider/liquid-step.ts +42 -0
- package/src/components/slosh-slider/slosh-slider.tsx +251 -0
- package/src/components/stat-tile/stat-tile.tsx +9 -30
- package/src/components/status-indicator/status-indicator.tsx +12 -19
- package/src/components/stepper/rolling-digit.tsx +77 -0
- package/src/components/stepper/stepper.tsx +101 -0
- package/src/components/swatch-picker/swatch-picker.tsx +19 -15
- package/src/components/tab-bar/tab-bar.tsx +59 -59
- package/src/components/tab-view/tab-view.tsx +52 -57
- package/src/components/table/table.tsx +14 -62
- package/src/components/text-editor/text-editor.tsx +2 -12
- package/src/components/text-field/text-field.tsx +53 -44
- package/src/components/toast/toast-store.ts +9 -30
- package/src/components/toast/toaster.tsx +90 -104
- package/src/components/toggle/toggle.tsx +165 -44
- package/src/components/tooltip/tooltip-host.tsx +70 -67
- package/src/components/view-controller/view-controller.tsx +4 -21
- package/src/components/wake-slider/wake-slider.tsx +237 -0
- package/src/hooks/scroll/minimize-decision.ts +1 -5
- package/src/hooks/use-anchored-disclosure.ts +23 -0
- package/src/hooks/use-anchored-placement.ts +7 -14
- package/src/hooks/use-dismiss.ts +5 -23
- package/src/hooks/use-floating-dismiss.ts +28 -0
- package/src/hooks/use-media-query.ts +12 -31
- package/src/hooks/use-minimize-on-scroll.ts +10 -34
- package/src/hooks/use-visual-viewport.ts +5 -14
- package/src/hooks/viewport/viewport-metrics.ts +4 -16
- package/src/icons/icons.tsx +229 -183
- package/src/index.ts +27 -1
- package/src/lib/anchored-placement.ts +12 -18
- package/src/lib/class-names.ts +1 -2
- package/src/lib/clipboard.ts +14 -0
- package/src/lib/date.ts +4 -15
- package/src/lib/floating-layers.ts +18 -8
- package/src/lib/haptics.ts +1 -3
- package/src/lib/language.ts +2 -7
- package/src/lib/range-value.ts +32 -0
- package/src/lib/screen-edges.ts +2 -6
- package/src/lib/shapes.ts +5 -20
- package/src/motion/transitions.ts +18 -12
- package/src/styles/code-block.css +33 -0
- package/src/styles/motion-controls.css +189 -0
- package/src/styles/styles.css +3 -0
- package/src/components/ambient/ambient.docs.tsx +0 -68
- package/src/components/ambient/examples/ambient-images.tsx +0 -30
- package/src/components/ambient/examples/ambient-now-playing.tsx +0 -55
- package/src/components/ambient/examples/ambient-showcase.tsx +0 -33
- package/src/components/ambient/examples/ambient-usage.tsx +0 -19
- package/src/components/button/button.docs.tsx +0 -116
- package/src/components/button/examples/button-disabled.tsx +0 -19
- package/src/components/button/examples/button-icon.tsx +0 -39
- package/src/components/button/examples/button-link.tsx +0 -12
- package/src/components/button/examples/button-pending.tsx +0 -27
- package/src/components/button/examples/button-showcase.tsx +0 -115
- package/src/components/button/examples/button-sizes.tsx +0 -12
- package/src/components/button/examples/button-usage.tsx +0 -12
- package/src/components/button/examples/button-variants.tsx +0 -15
- package/src/components/button/examples/button-with-icon.tsx +0 -32
- package/src/components/button/examples/icon-button-player.tsx +0 -38
- package/src/components/button/examples/icon-button-showcase.tsx +0 -83
- package/src/components/button/examples/icon-button-usage.tsx +0 -11
- package/src/components/button/examples/icon-button-variants.tsx +0 -39
- package/src/components/button/icon-button.docs.tsx +0 -68
- package/src/components/chip/chip.docs.tsx +0 -37
- package/src/components/chip/examples/chip-in-rows.tsx +0 -19
- package/src/components/chip/examples/chip-showcase.tsx +0 -51
- package/src/components/chip/examples/chip-tones.tsx +0 -13
- package/src/components/chip/examples/chip-usage.tsx +0 -5
- package/src/components/compact-date-picker/compact-date-picker.docs.tsx +0 -81
- package/src/components/compact-date-picker/examples/compact-date-picker-showcase.tsx +0 -35
- package/src/components/compact-date-picker/examples/compact-date-picker-usage.tsx +0 -22
- package/src/components/compact-time-picker/compact-time-picker.docs.tsx +0 -80
- package/src/components/compact-time-picker/examples/compact-time-picker-showcase.tsx +0 -31
- package/src/components/compact-time-picker/examples/compact-time-picker-usage.tsx +0 -21
- package/src/components/content-view/content-view.docs.tsx +0 -61
- package/src/components/content-view/examples/content-view-header-action.tsx +0 -33
- package/src/components/content-view/examples/content-view-showcase.tsx +0 -65
- package/src/components/content-view/examples/content-view-stats.tsx +0 -35
- package/src/components/content-view/examples/content-view-usage.tsx +0 -14
- package/src/components/context-menu/context-menu.docs.tsx +0 -92
- package/src/components/context-menu/examples/context-menu-checked.tsx +0 -37
- package/src/components/context-menu/examples/context-menu-list.tsx +0 -85
- package/src/components/context-menu/examples/context-menu-showcase.tsx +0 -56
- package/src/components/context-menu/examples/context-menu-toolbar.tsx +0 -63
- package/src/components/context-menu/examples/context-menu-usage.tsx +0 -24
- package/src/components/conversation/conversation.docs.tsx +0 -88
- package/src/components/conversation/examples/conversation-composer.tsx +0 -36
- package/src/components/conversation/examples/conversation-days.tsx +0 -48
- package/src/components/conversation/examples/conversation-showcase.tsx +0 -71
- package/src/components/conversation/examples/conversation-usage.tsx +0 -28
- package/src/components/date-picker/date-picker.docs.tsx +0 -88
- package/src/components/date-picker/examples/date-picker-locales.tsx +0 -41
- package/src/components/date-picker/examples/date-picker-past-only.tsx +0 -29
- package/src/components/date-picker/examples/date-picker-showcase.tsx +0 -49
- package/src/components/date-picker/examples/date-picker-usage.tsx +0 -22
- package/src/components/dialog/dialog.docs.tsx +0 -114
- package/src/components/dialog/examples/dialog-confirm.tsx +0 -24
- package/src/components/dialog/examples/dialog-form.tsx +0 -46
- package/src/components/dialog/examples/dialog-inline.tsx +0 -48
- package/src/components/dialog/examples/dialog-showcase.tsx +0 -53
- package/src/components/dialog/examples/dialog-usage.tsx +0 -31
- package/src/components/labeled-content/examples/labeled-content-descriptions.tsx +0 -37
- package/src/components/labeled-content/examples/labeled-content-showcase.tsx +0 -54
- package/src/components/labeled-content/examples/labeled-content-usage.tsx +0 -22
- package/src/components/labeled-content/examples/labeled-content-values.tsx +0 -26
- package/src/components/labeled-content/examples/labeled-content-wide.tsx +0 -46
- package/src/components/labeled-content/labeled-content.docs.tsx +0 -69
- package/src/components/locale-switcher/examples/locale-switcher-native-names.tsx +0 -30
- package/src/components/locale-switcher/examples/locale-switcher-showcase.tsx +0 -46
- package/src/components/locale-switcher/examples/locale-switcher-translated-page.tsx +0 -35
- package/src/components/locale-switcher/examples/locale-switcher-usage.tsx +0 -20
- package/src/components/locale-switcher/locale-switcher.docs.tsx +0 -91
- package/src/components/picker/examples/picker-details.tsx +0 -44
- package/src/components/picker/examples/picker-searchable.tsx +0 -48
- package/src/components/picker/examples/picker-showcase.tsx +0 -66
- package/src/components/picker/examples/picker-usage.tsx +0 -20
- package/src/components/picker/picker.docs.tsx +0 -68
- package/src/components/popover/examples/popover-help.tsx +0 -57
- package/src/components/popover/examples/popover-menu.tsx +0 -51
- package/src/components/popover/examples/popover-showcase.tsx +0 -61
- package/src/components/popover/examples/popover-usage.tsx +0 -31
- package/src/components/popover/popover.docs.tsx +0 -84
- package/src/components/profile-image/examples/profile-image-fallbacks.tsx +0 -29
- package/src/components/profile-image/examples/profile-image-group.tsx +0 -34
- package/src/components/profile-image/examples/profile-image-showcase.tsx +0 -30
- package/src/components/profile-image/examples/profile-image-usage.tsx +0 -14
- package/src/components/profile-image/profile-image.docs.tsx +0 -81
- package/src/components/search-field/examples/search-field-filter.tsx +0 -53
- package/src/components/search-field/examples/search-field-showcase.tsx +0 -56
- package/src/components/search-field/examples/search-field-toolbar.tsx +0 -27
- package/src/components/search-field/examples/search-field-usage.tsx +0 -18
- package/src/components/search-field/search-field.docs.tsx +0 -58
- package/src/components/search-list/examples/search-list-dropdown.tsx +0 -53
- package/src/components/search-list/examples/search-list-groups.tsx +0 -64
- package/src/components/search-list/examples/search-list-showcase.tsx +0 -67
- package/src/components/search-list/examples/search-list-usage.tsx +0 -27
- package/src/components/search-list/search-list.docs.tsx +0 -87
- package/src/components/section/examples/section-actions.tsx +0 -35
- package/src/components/section/examples/section-groups.tsx +0 -41
- package/src/components/section/examples/section-showcase.tsx +0 -63
- package/src/components/section/examples/section-usage.tsx +0 -19
- package/src/components/section/section.docs.tsx +0 -51
- package/src/components/secure-field/examples/secure-field-new-password.tsx +0 -56
- package/src/components/secure-field/examples/secure-field-reveal.tsx +0 -20
- package/src/components/secure-field/examples/secure-field-showcase.tsx +0 -62
- package/src/components/secure-field/examples/secure-field-usage.tsx +0 -19
- package/src/components/secure-field/secure-field.docs.tsx +0 -72
- package/src/components/segmented-control/examples/segmented-control-overflow.tsx +0 -28
- package/src/components/segmented-control/examples/segmented-control-showcase.tsx +0 -59
- package/src/components/segmented-control/examples/segmented-control-usage.tsx +0 -20
- package/src/components/segmented-control/examples/segmented-control-views.tsx +0 -32
- package/src/components/segmented-control/segmented-control.docs.tsx +0 -61
- package/src/components/sheet/examples/sheet-choices.tsx +0 -58
- package/src/components/sheet/examples/sheet-share.tsx +0 -51
- package/src/components/sheet/examples/sheet-showcase.tsx +0 -74
- package/src/components/sheet/examples/sheet-usage.tsx +0 -32
- package/src/components/sheet/sheet.docs.tsx +0 -75
- package/src/components/sidebar/examples/sidebar-groups.tsx +0 -133
- package/src/components/sidebar/examples/sidebar-showcase.tsx +0 -123
- package/src/components/sidebar/examples/sidebar-unread.tsx +0 -66
- package/src/components/sidebar/examples/sidebar-usage.tsx +0 -52
- package/src/components/sidebar/sidebar.docs.tsx +0 -135
- package/src/components/stat-tile/examples/stat-tile-filters.tsx +0 -32
- package/src/components/stat-tile/examples/stat-tile-grid.tsx +0 -21
- package/src/components/stat-tile/examples/stat-tile-showcase.tsx +0 -52
- package/src/components/stat-tile/examples/stat-tile-usage.tsx +0 -13
- package/src/components/stat-tile/stat-tile.docs.tsx +0 -60
- package/src/components/status-indicator/examples/status-indicator-live.tsx +0 -34
- package/src/components/status-indicator/examples/status-indicator-showcase.tsx +0 -39
- package/src/components/status-indicator/examples/status-indicator-states.tsx +0 -17
- package/src/components/status-indicator/examples/status-indicator-usage.tsx +0 -9
- package/src/components/status-indicator/status-indicator.docs.tsx +0 -43
- package/src/components/swatch-picker/examples/swatch-picker-accents.tsx +0 -42
- package/src/components/swatch-picker/examples/swatch-picker-labels.tsx +0 -45
- package/src/components/swatch-picker/examples/swatch-picker-showcase.tsx +0 -70
- package/src/components/swatch-picker/examples/swatch-picker-usage.tsx +0 -39
- package/src/components/swatch-picker/swatch-picker.docs.tsx +0 -60
- package/src/components/tab-bar/examples/tab-bar-five-tabs.tsx +0 -66
- package/src/components/tab-bar/examples/tab-bar-minimize.tsx +0 -71
- package/src/components/tab-bar/examples/tab-bar-showcase.tsx +0 -82
- package/src/components/tab-bar/examples/tab-bar-usage.tsx +0 -54
- package/src/components/tab-bar/tab-bar.docs.tsx +0 -136
- package/src/components/tab-view/examples/tab-view-keyboard.tsx +0 -39
- package/src/components/tab-view/examples/tab-view-settings.tsx +0 -56
- package/src/components/tab-view/examples/tab-view-showcase.tsx +0 -53
- package/src/components/tab-view/examples/tab-view-usage.tsx +0 -23
- package/src/components/tab-view/tab-view.docs.tsx +0 -77
- package/src/components/table/examples/table-empty.tsx +0 -53
- package/src/components/table/examples/table-invoices.tsx +0 -102
- package/src/components/table/examples/table-selection.tsx +0 -150
- package/src/components/table/examples/table-showcase.tsx +0 -115
- package/src/components/table/examples/table-usage.tsx +0 -67
- package/src/components/table/examples/table-wide.tsx +0 -75
- package/src/components/table/table.docs.tsx +0 -131
- package/src/components/text-editor/examples/text-editor-comment.tsx +0 -48
- package/src/components/text-editor/examples/text-editor-count.tsx +0 -38
- package/src/components/text-editor/examples/text-editor-showcase.tsx +0 -58
- package/src/components/text-editor/examples/text-editor-usage.tsx +0 -25
- package/src/components/text-editor/text-editor.docs.tsx +0 -61
- package/src/components/text-field/examples/text-field-icons.tsx +0 -72
- package/src/components/text-field/examples/text-field-showcase.tsx +0 -50
- package/src/components/text-field/examples/text-field-usage.tsx +0 -18
- package/src/components/text-field/examples/text-field-validation.tsx +0 -27
- package/src/components/text-field/text-field.docs.tsx +0 -118
- package/src/components/toast/examples/toast-action.tsx +0 -32
- package/src/components/toast/examples/toast-promise.tsx +0 -45
- package/src/components/toast/examples/toast-showcase.tsx +0 -49
- package/src/components/toast/examples/toast-usage.tsx +0 -13
- package/src/components/toast/toast.docs.tsx +0 -79
- package/src/components/toggle/examples/toggle-checkboxes.tsx +0 -43
- package/src/components/toggle/examples/toggle-settings.tsx +0 -31
- package/src/components/toggle/examples/toggle-showcase.tsx +0 -59
- package/src/components/toggle/examples/toggle-usage.tsx +0 -13
- package/src/components/toggle/toggle.docs.tsx +0 -69
- package/src/components/tooltip/examples/tooltip-icon-buttons.tsx +0 -27
- package/src/components/tooltip/examples/tooltip-shortcuts.tsx +0 -38
- package/src/components/tooltip/examples/tooltip-showcase.tsx +0 -44
- package/src/components/tooltip/examples/tooltip-usage.tsx +0 -13
- package/src/components/tooltip/tooltip.docs.tsx +0 -56
- package/src/components/view-controller/examples/view-controller-action.tsx +0 -27
- package/src/components/view-controller/examples/view-controller-settings.tsx +0 -31
- package/src/components/view-controller/examples/view-controller-showcase.tsx +0 -45
- package/src/components/view-controller/examples/view-controller-usage.tsx +0 -19
- package/src/components/view-controller/view-controller.docs.tsx +0 -71
- package/src/docs/index.ts +0 -3
- package/src/docs/registry.ts +0 -113
- package/src/docs/snippet.ts +0 -17
- package/src/docs/types.ts +0 -180
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { StatusIndicator } from "@passui/react"
|
|
2
|
-
import { TextField } from "@passui/react/text-field"
|
|
3
|
-
import { useRef, useState } from "react"
|
|
4
|
-
|
|
5
|
-
export function StatusIndicatorLive() {
|
|
6
|
-
const [title, setTitle] = useState("Trip to Kyoto")
|
|
7
|
-
const [saving, setSaving] = useState(false)
|
|
8
|
-
const timer =
|
|
9
|
-
useRef<ReturnType<typeof setTimeout>>(undefined)
|
|
10
|
-
|
|
11
|
-
return (
|
|
12
|
-
<div className="flex w-full max-w-sm flex-col gap-3 rounded-4xl bg-elevated p-5 shadow-sm ring-1 ring-separator/60">
|
|
13
|
-
<TextField
|
|
14
|
-
label="Note title"
|
|
15
|
-
value={title}
|
|
16
|
-
onChange={(event) => {
|
|
17
|
-
setTitle(event.target.value)
|
|
18
|
-
// a pretend save that settles a moment later
|
|
19
|
-
setSaving(true)
|
|
20
|
-
clearTimeout(timer.current)
|
|
21
|
-
timer.current = setTimeout(
|
|
22
|
-
() => setSaving(false),
|
|
23
|
-
900
|
|
24
|
-
)
|
|
25
|
-
}}
|
|
26
|
-
/>
|
|
27
|
-
<StatusIndicator
|
|
28
|
-
state={saving ? "syncing" : "saved"}
|
|
29
|
-
>
|
|
30
|
-
{saving ? "Saving" : "Saved"}
|
|
31
|
-
</StatusIndicator>
|
|
32
|
-
</div>
|
|
33
|
-
)
|
|
34
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { StatusIndicator } from "@passui/react"
|
|
2
|
-
|
|
3
|
-
const devices = [
|
|
4
|
-
{
|
|
5
|
-
name: "MacBook Pro",
|
|
6
|
-
state: "saved",
|
|
7
|
-
detail: "Up to date",
|
|
8
|
-
},
|
|
9
|
-
{
|
|
10
|
-
name: "iPhone",
|
|
11
|
-
state: "syncing",
|
|
12
|
-
detail: "Syncing 12 notes",
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
name: "iPad",
|
|
16
|
-
state: "offline",
|
|
17
|
-
detail: "Last seen yesterday",
|
|
18
|
-
},
|
|
19
|
-
] as const
|
|
20
|
-
|
|
21
|
-
export function StatusIndicatorShowcase() {
|
|
22
|
-
return (
|
|
23
|
-
<ul className="m-0 flex w-full max-w-sm list-none flex-col divide-y divide-separator/60 overflow-hidden rounded-4xl bg-elevated p-0 shadow-sm ring-1 ring-separator/60">
|
|
24
|
-
{devices.map((device) => (
|
|
25
|
-
<li
|
|
26
|
-
key={device.name}
|
|
27
|
-
className="flex items-center justify-between px-5 py-4"
|
|
28
|
-
>
|
|
29
|
-
<span className="text-subheadline font-semibold text-label">
|
|
30
|
-
{device.name}
|
|
31
|
-
</span>
|
|
32
|
-
<StatusIndicator state={device.state}>
|
|
33
|
-
{device.detail}
|
|
34
|
-
</StatusIndicator>
|
|
35
|
-
</li>
|
|
36
|
-
))}
|
|
37
|
-
</ul>
|
|
38
|
-
)
|
|
39
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { StatusIndicator } from "@passui/react"
|
|
2
|
-
|
|
3
|
-
export function StatusIndicatorStates() {
|
|
4
|
-
return (
|
|
5
|
-
<div className="flex flex-col gap-3 rounded-4xl bg-elevated p-5 shadow-sm ring-1 ring-separator/60">
|
|
6
|
-
<StatusIndicator state="saved">
|
|
7
|
-
All changes saved
|
|
8
|
-
</StatusIndicator>
|
|
9
|
-
<StatusIndicator state="syncing">
|
|
10
|
-
Syncing 3 notes
|
|
11
|
-
</StatusIndicator>
|
|
12
|
-
<StatusIndicator state="offline">
|
|
13
|
-
Offline. Changes save when you reconnect.
|
|
14
|
-
</StatusIndicator>
|
|
15
|
-
</div>
|
|
16
|
-
)
|
|
17
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { StatusIndicatorLive } from "./examples/status-indicator-live"
|
|
2
|
-
import { StatusIndicatorStates } from "./examples/status-indicator-states"
|
|
3
|
-
import { defineDocs } from "../../docs/types"
|
|
4
|
-
import { StatusIndicatorShowcase } from "./examples/status-indicator-showcase"
|
|
5
|
-
import { StatusIndicatorUsage } from "./examples/status-indicator-usage"
|
|
6
|
-
import { StatusIndicator } from "./status-indicator"
|
|
7
|
-
|
|
8
|
-
type DemoProps = {
|
|
9
|
-
state: "saved" | "syncing" | "offline"
|
|
10
|
-
children?: string
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export const statusIndicatorDocs = defineDocs<DemoProps>()({
|
|
14
|
-
slug: "status-indicator",
|
|
15
|
-
name: "StatusIndicator",
|
|
16
|
-
importPath: "@passui/react",
|
|
17
|
-
controls: {
|
|
18
|
-
state: {
|
|
19
|
-
kind: "select",
|
|
20
|
-
options: {
|
|
21
|
-
saved: true,
|
|
22
|
-
syncing: true,
|
|
23
|
-
offline: true,
|
|
24
|
-
},
|
|
25
|
-
default: "saved",
|
|
26
|
-
},
|
|
27
|
-
children: {
|
|
28
|
-
kind: "text",
|
|
29
|
-
default: "All changes saved",
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
render: ({ children, ...values }) => (
|
|
33
|
-
<StatusIndicator {...values}>
|
|
34
|
-
{children}
|
|
35
|
-
</StatusIndicator>
|
|
36
|
-
),
|
|
37
|
-
usage: StatusIndicatorUsage,
|
|
38
|
-
showcase: StatusIndicatorShowcase,
|
|
39
|
-
examples: [
|
|
40
|
-
{ id: "states", component: StatusIndicatorStates },
|
|
41
|
-
{ id: "live", component: StatusIndicatorLive },
|
|
42
|
-
],
|
|
43
|
-
})
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { SwatchPicker } from "@passui/react"
|
|
2
|
-
import { Button } from "@passui/react/button"
|
|
3
|
-
import { type AccentId, accents } from "@passui/react/tokens"
|
|
4
|
-
import { type CSSProperties, useState } from "react"
|
|
5
|
-
|
|
6
|
-
// every Passui accent, straight from the tokens
|
|
7
|
-
const options = Object.values(accents).map((accent) => ({
|
|
8
|
-
value: accent.id,
|
|
9
|
-
label: accent.name,
|
|
10
|
-
color: accent.swatch,
|
|
11
|
-
ink: accent.light.accentText,
|
|
12
|
-
}))
|
|
13
|
-
|
|
14
|
-
export function SwatchPickerAccents() {
|
|
15
|
-
const [accent, setAccent] = useState<AccentId>("ocean")
|
|
16
|
-
const colors = accents[accent].light
|
|
17
|
-
|
|
18
|
-
// An app sets data-accent on <html>; this card sets the accent's
|
|
19
|
-
// colors on itself, so the button below shows the choice.
|
|
20
|
-
const style = {
|
|
21
|
-
"--color-accent": colors.accent,
|
|
22
|
-
"--color-on-accent": colors.onAccent,
|
|
23
|
-
"--color-accent-text": colors.accentText,
|
|
24
|
-
} as CSSProperties
|
|
25
|
-
|
|
26
|
-
return (
|
|
27
|
-
<div
|
|
28
|
-
style={style}
|
|
29
|
-
className="flex w-full max-w-sm flex-col items-center gap-5 rounded-4xl bg-elevated p-6 shadow-sm ring-1 ring-separator/60"
|
|
30
|
-
>
|
|
31
|
-
<SwatchPicker
|
|
32
|
-
label="Accent color"
|
|
33
|
-
options={options}
|
|
34
|
-
value={accent}
|
|
35
|
-
onChange={setAccent}
|
|
36
|
-
/>
|
|
37
|
-
<Button variant="accent">
|
|
38
|
-
{accents[accent].name}
|
|
39
|
-
</Button>
|
|
40
|
-
</div>
|
|
41
|
-
)
|
|
42
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { Chip, SwatchPicker } from "@passui/react"
|
|
2
|
-
import { useState } from "react"
|
|
3
|
-
|
|
4
|
-
const colors = [
|
|
5
|
-
{
|
|
6
|
-
value: "family",
|
|
7
|
-
label: "Green",
|
|
8
|
-
color: "#e3f3eb",
|
|
9
|
-
ink: "#24704f",
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
value: "public",
|
|
13
|
-
label: "Blue",
|
|
14
|
-
color: "#e8efff",
|
|
15
|
-
ink: "#2c55b8",
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
value: "friends",
|
|
19
|
-
label: "Purple",
|
|
20
|
-
color: "#ede8ff",
|
|
21
|
-
ink: "#5a3fc0",
|
|
22
|
-
},
|
|
23
|
-
] as const
|
|
24
|
-
|
|
25
|
-
export function SwatchPickerLabels() {
|
|
26
|
-
const [tone, setTone] =
|
|
27
|
-
useState<(typeof colors)[number]["value"]>("family")
|
|
28
|
-
|
|
29
|
-
return (
|
|
30
|
-
<div className="flex w-full max-w-sm flex-col gap-4 rounded-4xl bg-elevated p-6 shadow-sm ring-1 ring-separator/60">
|
|
31
|
-
<div className="flex items-center justify-between">
|
|
32
|
-
<span className="text-subheadline font-medium text-label">
|
|
33
|
-
Tag color
|
|
34
|
-
</span>
|
|
35
|
-
<Chip tone={tone}>Weekend trip</Chip>
|
|
36
|
-
</div>
|
|
37
|
-
<SwatchPicker
|
|
38
|
-
label="Tag color"
|
|
39
|
-
options={[...colors]}
|
|
40
|
-
value={tone}
|
|
41
|
-
onChange={setTone}
|
|
42
|
-
/>
|
|
43
|
-
</div>
|
|
44
|
-
)
|
|
45
|
-
}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { Chip, SwatchPicker } from "@passui/react"
|
|
2
|
-
import { useState } from "react"
|
|
3
|
-
|
|
4
|
-
const colours = [
|
|
5
|
-
{
|
|
6
|
-
value: "sky",
|
|
7
|
-
label: "Sky",
|
|
8
|
-
color: "#9fc3ec",
|
|
9
|
-
ink: "#1f4f86",
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
value: "mint",
|
|
13
|
-
label: "Mint",
|
|
14
|
-
color: "#a7d8bd",
|
|
15
|
-
ink: "#1f6644",
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
value: "sun",
|
|
19
|
-
label: "Sun",
|
|
20
|
-
color: "#f3cf6b",
|
|
21
|
-
ink: "#7a5600",
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
value: "rose",
|
|
25
|
-
label: "Rose",
|
|
26
|
-
color: "#f0b3be",
|
|
27
|
-
ink: "#8c2f45",
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
value: "lilac",
|
|
31
|
-
label: "Lilac",
|
|
32
|
-
color: "#cbbcf0",
|
|
33
|
-
ink: "#4b348f",
|
|
34
|
-
},
|
|
35
|
-
]
|
|
36
|
-
|
|
37
|
-
export function SwatchPickerShowcase() {
|
|
38
|
-
const [colour, setColour] = useState("mint")
|
|
39
|
-
const chosen =
|
|
40
|
-
colours.find((option) => option.value === colour) ??
|
|
41
|
-
colours[0]
|
|
42
|
-
|
|
43
|
-
return (
|
|
44
|
-
<section className="flex w-full max-w-sm flex-col gap-5 rounded-4xl bg-elevated p-6 shadow-sm ring-1 ring-separator/60">
|
|
45
|
-
<div
|
|
46
|
-
className="flex h-28 items-end rounded-3xl p-4 transition-colors duration-500"
|
|
47
|
-
style={{ backgroundColor: chosen.color }}
|
|
48
|
-
>
|
|
49
|
-
<span
|
|
50
|
-
className="text-title3 font-bold"
|
|
51
|
-
style={{ color: chosen.ink }}
|
|
52
|
-
>
|
|
53
|
-
Garden notes
|
|
54
|
-
</span>
|
|
55
|
-
</div>
|
|
56
|
-
<div className="flex items-center justify-between">
|
|
57
|
-
<span className="text-subheadline font-semibold text-label">
|
|
58
|
-
Notebook colour
|
|
59
|
-
</span>
|
|
60
|
-
<Chip tone="neutral">{chosen.label}</Chip>
|
|
61
|
-
</div>
|
|
62
|
-
<SwatchPicker
|
|
63
|
-
label="Notebook colour"
|
|
64
|
-
value={colour}
|
|
65
|
-
onChange={setColour}
|
|
66
|
-
options={colours}
|
|
67
|
-
/>
|
|
68
|
-
</section>
|
|
69
|
-
)
|
|
70
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { SwatchPicker } from "@passui/react"
|
|
2
|
-
import { useState } from "react"
|
|
3
|
-
|
|
4
|
-
export function SwatchPickerUsage() {
|
|
5
|
-
const [colour, setColour] = useState("sky")
|
|
6
|
-
return (
|
|
7
|
-
<SwatchPicker
|
|
8
|
-
label="Label colour"
|
|
9
|
-
value={colour}
|
|
10
|
-
onChange={setColour}
|
|
11
|
-
options={[
|
|
12
|
-
{
|
|
13
|
-
value: "sky",
|
|
14
|
-
label: "Sky",
|
|
15
|
-
color: "#9fc3ec",
|
|
16
|
-
ink: "#1f4f86",
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
value: "mint",
|
|
20
|
-
label: "Mint",
|
|
21
|
-
color: "#a7d8bd",
|
|
22
|
-
ink: "#1f6644",
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
value: "sun",
|
|
26
|
-
label: "Sun",
|
|
27
|
-
color: "#f3cf6b",
|
|
28
|
-
ink: "#7a5600",
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
value: "rose",
|
|
32
|
-
label: "Rose",
|
|
33
|
-
color: "#f0b3be",
|
|
34
|
-
ink: "#8c2f45",
|
|
35
|
-
},
|
|
36
|
-
]}
|
|
37
|
-
/>
|
|
38
|
-
)
|
|
39
|
-
}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { SwatchPickerLabels } from "./examples/swatch-picker-labels"
|
|
2
|
-
import { SwatchPickerAccents } from "./examples/swatch-picker-accents"
|
|
3
|
-
import { useState } from "react"
|
|
4
|
-
import { accents } from "@passui/tokens/accent"
|
|
5
|
-
import { defineDocs } from "../../docs/types"
|
|
6
|
-
import { SwatchPickerShowcase } from "./examples/swatch-picker-showcase"
|
|
7
|
-
import { SwatchPickerUsage } from "./examples/swatch-picker-usage"
|
|
8
|
-
import { SwatchPicker } from "./swatch-picker"
|
|
9
|
-
|
|
10
|
-
type DemoProps = { label: string }
|
|
11
|
-
|
|
12
|
-
function SwatchPickerDemo({ label }: DemoProps) {
|
|
13
|
-
const [accent, setAccent] = useState<string>("blush")
|
|
14
|
-
return (
|
|
15
|
-
<SwatchPicker
|
|
16
|
-
label={label}
|
|
17
|
-
value={accent}
|
|
18
|
-
onChange={setAccent}
|
|
19
|
-
options={Object.values(accents).map((option) => ({
|
|
20
|
-
value: option.id,
|
|
21
|
-
label: option.name,
|
|
22
|
-
color: option.swatch,
|
|
23
|
-
ink: option.light.accentText,
|
|
24
|
-
}))}
|
|
25
|
-
/>
|
|
26
|
-
)
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export const swatchPickerDocs = defineDocs<DemoProps>()({
|
|
30
|
-
slug: "swatch-picker",
|
|
31
|
-
name: "SwatchPicker",
|
|
32
|
-
importPath: "@passui/react",
|
|
33
|
-
controls: {
|
|
34
|
-
label: {
|
|
35
|
-
kind: "text",
|
|
36
|
-
default: "Accent colour",
|
|
37
|
-
required: true,
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
render: (values) => <SwatchPickerDemo {...values} />,
|
|
41
|
-
childrenSnippet: () => ({
|
|
42
|
-
imports: ['import { useState } from "react"'],
|
|
43
|
-
setup: [
|
|
44
|
-
'const [colour, setColour] = useState("blush")',
|
|
45
|
-
],
|
|
46
|
-
children: "",
|
|
47
|
-
expressionProps: {
|
|
48
|
-
value: "colour",
|
|
49
|
-
onChange: "setColour",
|
|
50
|
-
options:
|
|
51
|
-
'[{ value: "blush", label: "Blush", color: "#f2d4d7", ink: "#9e3b4f" }]',
|
|
52
|
-
},
|
|
53
|
-
}),
|
|
54
|
-
usage: SwatchPickerUsage,
|
|
55
|
-
showcase: SwatchPickerShowcase,
|
|
56
|
-
examples: [
|
|
57
|
-
{ id: "accents", component: SwatchPickerAccents },
|
|
58
|
-
{ id: "labels", component: SwatchPickerLabels },
|
|
59
|
-
],
|
|
60
|
-
})
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Calendar03Icon,
|
|
3
|
-
Home01Icon,
|
|
4
|
-
InboxIcon,
|
|
5
|
-
LibraryIcon,
|
|
6
|
-
UserIcon,
|
|
7
|
-
} from "@hugeicons/core-free-icons"
|
|
8
|
-
import { HugeiconsIcon } from "@hugeicons/react"
|
|
9
|
-
import { TabBar } from "@passui/react"
|
|
10
|
-
import { useState } from "react"
|
|
11
|
-
|
|
12
|
-
const tabs = [
|
|
13
|
-
{
|
|
14
|
-
id: "home",
|
|
15
|
-
label: "Home",
|
|
16
|
-
icon: <HugeiconsIcon icon={Home01Icon} size={22} />,
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
id: "inbox",
|
|
20
|
-
label: "Inbox",
|
|
21
|
-
icon: <HugeiconsIcon icon={InboxIcon} size={22} />,
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
id: "calendar",
|
|
25
|
-
label: "Calendar",
|
|
26
|
-
icon: (
|
|
27
|
-
<HugeiconsIcon icon={Calendar03Icon} size={22} />
|
|
28
|
-
),
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
id: "library",
|
|
32
|
-
label: "Library",
|
|
33
|
-
icon: <HugeiconsIcon icon={LibraryIcon} size={22} />,
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
id: "profile",
|
|
37
|
-
label: "Profile",
|
|
38
|
-
icon: <HugeiconsIcon icon={UserIcon} size={22} />,
|
|
39
|
-
},
|
|
40
|
-
]
|
|
41
|
-
|
|
42
|
-
export function TabBarFiveTabs() {
|
|
43
|
-
const [active, setActive] = useState("inbox")
|
|
44
|
-
|
|
45
|
-
return (
|
|
46
|
-
<div className="relative h-32 w-full max-w-sm overflow-hidden rounded-5xl bg-fill/40">
|
|
47
|
-
<TabBar
|
|
48
|
-
label="Main"
|
|
49
|
-
tabs={tabs}
|
|
50
|
-
active={active}
|
|
51
|
-
className="absolute inset-x-3 bottom-3"
|
|
52
|
-
renderLink={(tab, props) => (
|
|
53
|
-
<a
|
|
54
|
-
key={tab.id}
|
|
55
|
-
href={`#${tab.id}`}
|
|
56
|
-
{...props}
|
|
57
|
-
onClick={(event) => {
|
|
58
|
-
event.preventDefault()
|
|
59
|
-
setActive(tab.id)
|
|
60
|
-
}}
|
|
61
|
-
/>
|
|
62
|
-
)}
|
|
63
|
-
/>
|
|
64
|
-
</div>
|
|
65
|
-
)
|
|
66
|
-
}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Home01Icon,
|
|
3
|
-
LibraryIcon,
|
|
4
|
-
UserIcon,
|
|
5
|
-
} from "@hugeicons/core-free-icons"
|
|
6
|
-
import { HugeiconsIcon } from "@hugeicons/react"
|
|
7
|
-
import { TabBar } from "@passui/react"
|
|
8
|
-
import { useState } from "react"
|
|
9
|
-
|
|
10
|
-
const tabs = [
|
|
11
|
-
{
|
|
12
|
-
id: "home",
|
|
13
|
-
label: "Home",
|
|
14
|
-
icon: <HugeiconsIcon icon={Home01Icon} size={22} />,
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
id: "library",
|
|
18
|
-
label: "Library",
|
|
19
|
-
icon: <HugeiconsIcon icon={LibraryIcon} size={22} />,
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
id: "profile",
|
|
23
|
-
label: "Profile",
|
|
24
|
-
icon: <HugeiconsIcon icon={UserIcon} size={22} />,
|
|
25
|
-
},
|
|
26
|
-
]
|
|
27
|
-
|
|
28
|
-
const books = Array.from(
|
|
29
|
-
{ length: 24 },
|
|
30
|
-
(_, index) => `Chapter ${index + 1}`
|
|
31
|
-
)
|
|
32
|
-
|
|
33
|
-
export function TabBarMinimize() {
|
|
34
|
-
const [active, setActive] = useState("library")
|
|
35
|
-
|
|
36
|
-
return (
|
|
37
|
-
<div className="relative h-96 w-full max-w-xs overflow-hidden rounded-5xl bg-background ring-1 ring-separator/60">
|
|
38
|
-
<ul className="m-0 h-full list-none overflow-y-auto p-4 pb-24">
|
|
39
|
-
{books.map((book) => (
|
|
40
|
-
<li
|
|
41
|
-
key={book}
|
|
42
|
-
className="border-separator/60 border-b py-3 text-subheadline text-label"
|
|
43
|
-
>
|
|
44
|
-
{book}
|
|
45
|
-
</li>
|
|
46
|
-
))}
|
|
47
|
-
</ul>
|
|
48
|
-
<TabBar
|
|
49
|
-
label="Main"
|
|
50
|
-
tabs={tabs}
|
|
51
|
-
active={active}
|
|
52
|
-
search={{
|
|
53
|
-
label: "Search",
|
|
54
|
-
onPress: () => {},
|
|
55
|
-
}}
|
|
56
|
-
className="absolute inset-x-3 bottom-3"
|
|
57
|
-
renderLink={(tab, props) => (
|
|
58
|
-
<a
|
|
59
|
-
key={tab.id}
|
|
60
|
-
href={`#${tab.id}`}
|
|
61
|
-
{...props}
|
|
62
|
-
onClick={(event) => {
|
|
63
|
-
event.preventDefault()
|
|
64
|
-
setActive(tab.id)
|
|
65
|
-
}}
|
|
66
|
-
/>
|
|
67
|
-
)}
|
|
68
|
-
/>
|
|
69
|
-
</div>
|
|
70
|
-
)
|
|
71
|
-
}
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
FavouriteIcon,
|
|
3
|
-
Home01Icon,
|
|
4
|
-
LibraryIcon,
|
|
5
|
-
UserIcon,
|
|
6
|
-
} from "@hugeicons/core-free-icons"
|
|
7
|
-
import { HugeiconsIcon } from "@hugeicons/react"
|
|
8
|
-
import { TabBar } from "@passui/react"
|
|
9
|
-
import { useState } from "react"
|
|
10
|
-
|
|
11
|
-
const tabs = [
|
|
12
|
-
{
|
|
13
|
-
id: "home",
|
|
14
|
-
label: "Home",
|
|
15
|
-
icon: <HugeiconsIcon icon={Home01Icon} size={22} />,
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
id: "library",
|
|
19
|
-
label: "Library",
|
|
20
|
-
icon: <HugeiconsIcon icon={LibraryIcon} size={22} />,
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
id: "saved",
|
|
24
|
-
label: "Saved",
|
|
25
|
-
icon: (
|
|
26
|
-
<HugeiconsIcon icon={FavouriteIcon} size={22} />
|
|
27
|
-
),
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
id: "profile",
|
|
31
|
-
label: "Profile",
|
|
32
|
-
icon: <HugeiconsIcon icon={UserIcon} size={22} />,
|
|
33
|
-
},
|
|
34
|
-
]
|
|
35
|
-
|
|
36
|
-
const titles: Record<string, string> = {
|
|
37
|
-
home: "Good morning, Aiko",
|
|
38
|
-
library: "Your library",
|
|
39
|
-
saved: "Saved for later",
|
|
40
|
-
profile: "Your profile",
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export function TabBarShowcase() {
|
|
44
|
-
const [active, setActive] = useState("home")
|
|
45
|
-
|
|
46
|
-
return (
|
|
47
|
-
<div className="relative h-112 w-full max-w-xs overflow-hidden rounded-sheet bg-background shadow-sm ring-1 ring-separator/60">
|
|
48
|
-
<div className="flex flex-col gap-4 p-6 pt-10">
|
|
49
|
-
<h2 className="text-title2 font-bold text-label">
|
|
50
|
-
{titles[active]}
|
|
51
|
-
</h2>
|
|
52
|
-
{[0, 1, 2].map((row) => (
|
|
53
|
-
<div
|
|
54
|
-
key={row}
|
|
55
|
-
className="h-20 rounded-3xl bg-fill/60"
|
|
56
|
-
/>
|
|
57
|
-
))}
|
|
58
|
-
</div>
|
|
59
|
-
<TabBar
|
|
60
|
-
label="Main"
|
|
61
|
-
tabs={tabs}
|
|
62
|
-
active={active}
|
|
63
|
-
search={{
|
|
64
|
-
label: "Search",
|
|
65
|
-
onPress: () => {},
|
|
66
|
-
}}
|
|
67
|
-
className="absolute inset-x-3 bottom-3"
|
|
68
|
-
renderLink={(tab, props) => (
|
|
69
|
-
<a
|
|
70
|
-
key={tab.id}
|
|
71
|
-
href={`#${tab.id}`}
|
|
72
|
-
{...props}
|
|
73
|
-
onClick={(event) => {
|
|
74
|
-
event.preventDefault()
|
|
75
|
-
setActive(tab.id)
|
|
76
|
-
}}
|
|
77
|
-
/>
|
|
78
|
-
)}
|
|
79
|
-
/>
|
|
80
|
-
</div>
|
|
81
|
-
)
|
|
82
|
-
}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Home01Icon,
|
|
3
|
-
LibraryIcon,
|
|
4
|
-
UserIcon,
|
|
5
|
-
} from "@hugeicons/core-free-icons"
|
|
6
|
-
import { HugeiconsIcon } from "@hugeicons/react"
|
|
7
|
-
import { TabBar } from "@passui/react"
|
|
8
|
-
import { useState } from "react"
|
|
9
|
-
|
|
10
|
-
const tabs = [
|
|
11
|
-
{
|
|
12
|
-
id: "home",
|
|
13
|
-
label: "Home",
|
|
14
|
-
icon: <HugeiconsIcon icon={Home01Icon} size={22} />,
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
id: "library",
|
|
18
|
-
label: "Library",
|
|
19
|
-
icon: <HugeiconsIcon icon={LibraryIcon} size={22} />,
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
id: "profile",
|
|
23
|
-
label: "Profile",
|
|
24
|
-
icon: <HugeiconsIcon icon={UserIcon} size={22} />,
|
|
25
|
-
},
|
|
26
|
-
]
|
|
27
|
-
|
|
28
|
-
export function TabBarUsage() {
|
|
29
|
-
const [active, setActive] = useState("home")
|
|
30
|
-
|
|
31
|
-
// In an app the bar is fixed to the bottom of the screen; here it
|
|
32
|
-
// sits in a frame so the example stays on the page.
|
|
33
|
-
return (
|
|
34
|
-
<div className="relative h-32 w-full max-w-sm overflow-hidden rounded-5xl bg-fill/40">
|
|
35
|
-
<TabBar
|
|
36
|
-
label="Main"
|
|
37
|
-
tabs={tabs}
|
|
38
|
-
active={active}
|
|
39
|
-
className="absolute inset-x-3 bottom-3"
|
|
40
|
-
renderLink={(tab, props) => (
|
|
41
|
-
<a
|
|
42
|
-
key={tab.id}
|
|
43
|
-
href={`#${tab.id}`}
|
|
44
|
-
{...props}
|
|
45
|
-
onClick={(event) => {
|
|
46
|
-
event.preventDefault()
|
|
47
|
-
setActive(tab.id)
|
|
48
|
-
}}
|
|
49
|
-
/>
|
|
50
|
-
)}
|
|
51
|
-
/>
|
|
52
|
-
</div>
|
|
53
|
-
)
|
|
54
|
-
}
|