@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,68 +0,0 @@
|
|
|
1
|
-
import { Settings02Icon } from "@hugeicons/core-free-icons"
|
|
2
|
-
import { HugeiconsIcon } from "@hugeicons/react"
|
|
3
|
-
import { defineDocs } from "../../docs/types"
|
|
4
|
-
import { IconButtonPlayer } from "./examples/icon-button-player"
|
|
5
|
-
import { IconButtonShowcase } from "./examples/icon-button-showcase"
|
|
6
|
-
import { IconButtonUsage } from "./examples/icon-button-usage"
|
|
7
|
-
import { IconButtonVariants } from "./examples/icon-button-variants"
|
|
8
|
-
import {
|
|
9
|
-
IconButton,
|
|
10
|
-
type IconButtonProps,
|
|
11
|
-
} from "./icon-button"
|
|
12
|
-
|
|
13
|
-
export const iconButtonDocs = defineDocs<IconButtonProps>()({
|
|
14
|
-
slug: "icon-button",
|
|
15
|
-
name: "IconButton",
|
|
16
|
-
importPath: "@passui/react/icon-button",
|
|
17
|
-
controls: {
|
|
18
|
-
variant: {
|
|
19
|
-
kind: "select",
|
|
20
|
-
options: {
|
|
21
|
-
default: true,
|
|
22
|
-
secondary: true,
|
|
23
|
-
outline: true,
|
|
24
|
-
ghost: true,
|
|
25
|
-
link: true,
|
|
26
|
-
accent: true,
|
|
27
|
-
destructive: true,
|
|
28
|
-
},
|
|
29
|
-
default: "ghost",
|
|
30
|
-
},
|
|
31
|
-
size: {
|
|
32
|
-
kind: "select",
|
|
33
|
-
options: {
|
|
34
|
-
icon: true,
|
|
35
|
-
"icon-xs": true,
|
|
36
|
-
"icon-sm": true,
|
|
37
|
-
"icon-lg": true,
|
|
38
|
-
},
|
|
39
|
-
default: "icon",
|
|
40
|
-
},
|
|
41
|
-
isPending: { kind: "boolean", default: false },
|
|
42
|
-
disabled: { kind: "boolean", default: false },
|
|
43
|
-
label: {
|
|
44
|
-
kind: "text",
|
|
45
|
-
default: "Settings",
|
|
46
|
-
required: true,
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
|
-
render: (values) => (
|
|
50
|
-
<IconButton {...values}>
|
|
51
|
-
<HugeiconsIcon icon={Settings02Icon} size={20} />
|
|
52
|
-
</IconButton>
|
|
53
|
-
),
|
|
54
|
-
childrenSnippet: () => ({
|
|
55
|
-
imports: [
|
|
56
|
-
'import { Settings02Icon } from "@hugeicons/core-free-icons"',
|
|
57
|
-
'import { HugeiconsIcon } from "@hugeicons/react"',
|
|
58
|
-
],
|
|
59
|
-
children:
|
|
60
|
-
"<HugeiconsIcon icon={Settings02Icon} size={20} />",
|
|
61
|
-
}),
|
|
62
|
-
usage: IconButtonUsage,
|
|
63
|
-
showcase: IconButtonShowcase,
|
|
64
|
-
examples: [
|
|
65
|
-
{ id: "variants", component: IconButtonVariants },
|
|
66
|
-
{ id: "player", component: IconButtonPlayer },
|
|
67
|
-
],
|
|
68
|
-
})
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { ChipInRows } from "./examples/chip-in-rows"
|
|
2
|
-
import { defineDocs } from "../../docs/types"
|
|
3
|
-
import { Chip, type ChipTone } from "./chip"
|
|
4
|
-
import { ChipShowcase } from "./examples/chip-showcase"
|
|
5
|
-
import { ChipTones } from "./examples/chip-tones"
|
|
6
|
-
import { ChipUsage } from "./examples/chip-usage"
|
|
7
|
-
|
|
8
|
-
type ChipProps = { tone?: ChipTone; children?: string }
|
|
9
|
-
|
|
10
|
-
export const chipDocs = defineDocs<ChipProps>()({
|
|
11
|
-
slug: "chip",
|
|
12
|
-
name: "Chip",
|
|
13
|
-
importPath: "@passui/react",
|
|
14
|
-
controls: {
|
|
15
|
-
tone: {
|
|
16
|
-
kind: "select",
|
|
17
|
-
options: {
|
|
18
|
-
neutral: true,
|
|
19
|
-
accent: true,
|
|
20
|
-
public: true,
|
|
21
|
-
family: true,
|
|
22
|
-
friends: true,
|
|
23
|
-
},
|
|
24
|
-
default: "neutral",
|
|
25
|
-
},
|
|
26
|
-
children: { kind: "text", default: "Draft" },
|
|
27
|
-
},
|
|
28
|
-
render: ({ children, ...values }) => (
|
|
29
|
-
<Chip {...values}>{children}</Chip>
|
|
30
|
-
),
|
|
31
|
-
usage: ChipUsage,
|
|
32
|
-
showcase: ChipShowcase,
|
|
33
|
-
examples: [
|
|
34
|
-
{ id: "tones", component: ChipTones },
|
|
35
|
-
{ id: "in-rows", component: ChipInRows },
|
|
36
|
-
],
|
|
37
|
-
})
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Chip, LabeledContent, Section } from "@passui/react"
|
|
2
|
-
|
|
3
|
-
export function ChipInRows() {
|
|
4
|
-
return (
|
|
5
|
-
<div className="w-full max-w-sm">
|
|
6
|
-
<Section title="Shared with">
|
|
7
|
-
<LabeledContent label="Aiko Kamado">
|
|
8
|
-
<Chip tone="accent">Owner</Chip>
|
|
9
|
-
</LabeledContent>
|
|
10
|
-
<LabeledContent label="Kenji Mori">
|
|
11
|
-
<Chip tone="family">Family</Chip>
|
|
12
|
-
</LabeledContent>
|
|
13
|
-
<LabeledContent label="Anyone with the link">
|
|
14
|
-
<Chip tone="public">Public</Chip>
|
|
15
|
-
</LabeledContent>
|
|
16
|
-
</Section>
|
|
17
|
-
</div>
|
|
18
|
-
)
|
|
19
|
-
}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { Chip } from "@passui/react"
|
|
2
|
-
|
|
3
|
-
const notes = [
|
|
4
|
-
{
|
|
5
|
-
title: "Trip to Kyoto",
|
|
6
|
-
detail: "Edited today",
|
|
7
|
-
tone: "friends",
|
|
8
|
-
tag: "Friends",
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
title: "Grandma's recipes",
|
|
12
|
-
detail: "Edited yesterday",
|
|
13
|
-
tone: "family",
|
|
14
|
-
tag: "Family",
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
title: "Reading list",
|
|
18
|
-
detail: "Edited Monday",
|
|
19
|
-
tone: "public",
|
|
20
|
-
tag: "Public",
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
title: "Q4 plan",
|
|
24
|
-
detail: "Edited last week",
|
|
25
|
-
tone: "neutral",
|
|
26
|
-
tag: "Draft",
|
|
27
|
-
},
|
|
28
|
-
] as const
|
|
29
|
-
|
|
30
|
-
export function ChipShowcase() {
|
|
31
|
-
return (
|
|
32
|
-
<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">
|
|
33
|
-
{notes.map((note) => (
|
|
34
|
-
<li
|
|
35
|
-
key={note.title}
|
|
36
|
-
className="flex items-center justify-between gap-3 px-5 py-3.5"
|
|
37
|
-
>
|
|
38
|
-
<div className="flex flex-col">
|
|
39
|
-
<span className="text-subheadline font-semibold text-label">
|
|
40
|
-
{note.title}
|
|
41
|
-
</span>
|
|
42
|
-
<span className="text-footnote text-label-secondary">
|
|
43
|
-
{note.detail}
|
|
44
|
-
</span>
|
|
45
|
-
</div>
|
|
46
|
-
<Chip tone={note.tone}>{note.tag}</Chip>
|
|
47
|
-
</li>
|
|
48
|
-
))}
|
|
49
|
-
</ul>
|
|
50
|
-
)
|
|
51
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Chip } from "@passui/react"
|
|
2
|
-
|
|
3
|
-
export function ChipTones() {
|
|
4
|
-
return (
|
|
5
|
-
<div className="flex flex-wrap items-center justify-center gap-2">
|
|
6
|
-
<Chip tone="neutral">Draft</Chip>
|
|
7
|
-
<Chip tone="accent">Featured</Chip>
|
|
8
|
-
<Chip tone="public">Public</Chip>
|
|
9
|
-
<Chip tone="family">Family</Chip>
|
|
10
|
-
<Chip tone="friends">Friends</Chip>
|
|
11
|
-
</div>
|
|
12
|
-
)
|
|
13
|
-
}
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import type { ComponentProps } from "react"
|
|
2
|
-
import { useState } from "react"
|
|
3
|
-
import { defineDocs } from "../../docs/types"
|
|
4
|
-
import { CompactDatePicker } from "./compact-date-picker"
|
|
5
|
-
import { CompactDatePickerShowcase } from "./examples/compact-date-picker-showcase"
|
|
6
|
-
import { CompactDatePickerUsage } from "./examples/compact-date-picker-usage"
|
|
7
|
-
|
|
8
|
-
type CompactDatePickerProps = ComponentProps<
|
|
9
|
-
typeof CompactDatePicker
|
|
10
|
-
>
|
|
11
|
-
|
|
12
|
-
// Locales whose weeks start on different days, so the playground shows it.
|
|
13
|
-
type DemoProps = Pick<CompactDatePickerProps, "label"> & {
|
|
14
|
-
locale: "en-US" | "en-GB" | "fr-FR" | "ar-EG" | "zh-CN"
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
const labels = {
|
|
18
|
-
previousMonth: "Previous month",
|
|
19
|
-
nextMonth: "Next month",
|
|
20
|
-
clear: "Remove date",
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
function CompactDatePickerDemo({ locale, label }: DemoProps) {
|
|
24
|
-
const [date, setDate] = useState("")
|
|
25
|
-
return (
|
|
26
|
-
<div
|
|
27
|
-
className="w-full max-w-xs"
|
|
28
|
-
dir={locale === "ar-EG" ? "rtl" : undefined}
|
|
29
|
-
>
|
|
30
|
-
<CompactDatePicker
|
|
31
|
-
key={locale}
|
|
32
|
-
label={label}
|
|
33
|
-
labels={labels}
|
|
34
|
-
locale={locale}
|
|
35
|
-
placeholder="None"
|
|
36
|
-
value={date}
|
|
37
|
-
onChange={setDate}
|
|
38
|
-
/>
|
|
39
|
-
</div>
|
|
40
|
-
)
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export const compactDatePickerDocs = defineDocs<DemoProps>()({
|
|
44
|
-
slug: "compact-date-picker",
|
|
45
|
-
name: "CompactDatePicker",
|
|
46
|
-
importPath: "@passui/react/compact-date-picker",
|
|
47
|
-
controls: {
|
|
48
|
-
label: {
|
|
49
|
-
kind: "text",
|
|
50
|
-
default: "Starts",
|
|
51
|
-
required: true,
|
|
52
|
-
},
|
|
53
|
-
locale: {
|
|
54
|
-
kind: "select",
|
|
55
|
-
options: {
|
|
56
|
-
"en-US": true,
|
|
57
|
-
"en-GB": true,
|
|
58
|
-
"fr-FR": true,
|
|
59
|
-
"ar-EG": true,
|
|
60
|
-
"zh-CN": true,
|
|
61
|
-
},
|
|
62
|
-
default: "en-US",
|
|
63
|
-
},
|
|
64
|
-
},
|
|
65
|
-
render: (values) => <CompactDatePickerDemo {...values} />,
|
|
66
|
-
childrenSnippet: ({ locale }) => ({
|
|
67
|
-
imports: ['import { useState } from "react"'],
|
|
68
|
-
setup: ['const [date, setDate] = useState("")'],
|
|
69
|
-
children: "",
|
|
70
|
-
omit: ["locale"],
|
|
71
|
-
extraProps: { locale },
|
|
72
|
-
expressionProps: {
|
|
73
|
-
labels: '{ previousMonth: "Previous month", nextMonth: "Next month", clear: "Remove date" }',
|
|
74
|
-
value: "date",
|
|
75
|
-
onChange: "setDate",
|
|
76
|
-
},
|
|
77
|
-
}),
|
|
78
|
-
usage: CompactDatePickerUsage,
|
|
79
|
-
showcase: CompactDatePickerShowcase,
|
|
80
|
-
examples: [],
|
|
81
|
-
})
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { CompactDatePicker } from "@passui/react/compact-date-picker"
|
|
2
|
-
import { useState } from "react"
|
|
3
|
-
|
|
4
|
-
const labels = {
|
|
5
|
-
previousMonth: "Previous month",
|
|
6
|
-
nextMonth: "Next month",
|
|
7
|
-
clear: "Remove date",
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export function CompactDatePickerShowcase() {
|
|
11
|
-
const [starts, setStarts] = useState("2026-10-15")
|
|
12
|
-
const [ends, setEnds] = useState("")
|
|
13
|
-
return (
|
|
14
|
-
<div className="grid w-full max-w-sm grid-cols-2 gap-3">
|
|
15
|
-
<CompactDatePicker
|
|
16
|
-
label="Starts"
|
|
17
|
-
labels={labels}
|
|
18
|
-
locale="en-GB"
|
|
19
|
-
value={starts}
|
|
20
|
-
onChange={(value) =>
|
|
21
|
-
value && setStarts(value)
|
|
22
|
-
}
|
|
23
|
-
/>
|
|
24
|
-
<CompactDatePicker
|
|
25
|
-
label="Ends"
|
|
26
|
-
placeholder="None"
|
|
27
|
-
labels={labels}
|
|
28
|
-
locale="en-GB"
|
|
29
|
-
min={starts}
|
|
30
|
-
value={ends}
|
|
31
|
-
onChange={setEnds}
|
|
32
|
-
/>
|
|
33
|
-
</div>
|
|
34
|
-
)
|
|
35
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { CompactDatePicker } from "@passui/react/compact-date-picker"
|
|
2
|
-
import { useState } from "react"
|
|
3
|
-
|
|
4
|
-
export function CompactDatePickerUsage() {
|
|
5
|
-
const [due, setDue] = useState("")
|
|
6
|
-
return (
|
|
7
|
-
<div className="w-full max-w-xs">
|
|
8
|
-
<CompactDatePicker
|
|
9
|
-
label="Due"
|
|
10
|
-
placeholder="None"
|
|
11
|
-
labels={{
|
|
12
|
-
previousMonth: "Previous month",
|
|
13
|
-
nextMonth: "Next month",
|
|
14
|
-
clear: "Remove date",
|
|
15
|
-
}}
|
|
16
|
-
locale="en-US"
|
|
17
|
-
value={due}
|
|
18
|
-
onChange={setDue}
|
|
19
|
-
/>
|
|
20
|
-
</div>
|
|
21
|
-
)
|
|
22
|
-
}
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import type { ComponentProps } from "react"
|
|
2
|
-
import { useState } from "react"
|
|
3
|
-
import { defineDocs } from "../../docs/types"
|
|
4
|
-
import { CompactTimePicker } from "./compact-time-picker"
|
|
5
|
-
import { CompactTimePickerShowcase } from "./examples/compact-time-picker-showcase"
|
|
6
|
-
import { CompactTimePickerUsage } from "./examples/compact-time-picker-usage"
|
|
7
|
-
|
|
8
|
-
type CompactTimePickerProps = ComponentProps<
|
|
9
|
-
typeof CompactTimePicker
|
|
10
|
-
>
|
|
11
|
-
|
|
12
|
-
// Locales on 12 and 24 hour clocks, so the playground shows both.
|
|
13
|
-
type DemoProps = Pick<CompactTimePickerProps, "label"> & {
|
|
14
|
-
locale: "en-US" | "en-GB" | "fr-FR" | "ar-EG" | "zh-CN"
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
const labels = {
|
|
18
|
-
hour: "Hour",
|
|
19
|
-
minute: "Minute",
|
|
20
|
-
period: "AM or PM",
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
function CompactTimePickerDemo({ locale, label }: DemoProps) {
|
|
24
|
-
const [time, setTime] = useState("18:30")
|
|
25
|
-
return (
|
|
26
|
-
<div
|
|
27
|
-
className="w-full max-w-xs"
|
|
28
|
-
dir={locale === "ar-EG" ? "rtl" : undefined}
|
|
29
|
-
>
|
|
30
|
-
<CompactTimePicker
|
|
31
|
-
key={locale}
|
|
32
|
-
label={label}
|
|
33
|
-
labels={labels}
|
|
34
|
-
locale={locale}
|
|
35
|
-
value={time}
|
|
36
|
-
onChange={setTime}
|
|
37
|
-
/>
|
|
38
|
-
</div>
|
|
39
|
-
)
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export const compactTimePickerDocs = defineDocs<DemoProps>()({
|
|
43
|
-
slug: "compact-time-picker",
|
|
44
|
-
name: "CompactTimePicker",
|
|
45
|
-
importPath: "@passui/react/compact-time-picker",
|
|
46
|
-
controls: {
|
|
47
|
-
label: {
|
|
48
|
-
kind: "text",
|
|
49
|
-
default: "Time",
|
|
50
|
-
required: true,
|
|
51
|
-
},
|
|
52
|
-
locale: {
|
|
53
|
-
kind: "select",
|
|
54
|
-
options: {
|
|
55
|
-
"en-US": true,
|
|
56
|
-
"en-GB": true,
|
|
57
|
-
"fr-FR": true,
|
|
58
|
-
"ar-EG": true,
|
|
59
|
-
"zh-CN": true,
|
|
60
|
-
},
|
|
61
|
-
default: "en-US",
|
|
62
|
-
},
|
|
63
|
-
},
|
|
64
|
-
render: (values) => <CompactTimePickerDemo {...values} />,
|
|
65
|
-
childrenSnippet: ({ locale }) => ({
|
|
66
|
-
imports: ['import { useState } from "react"'],
|
|
67
|
-
setup: ['const [time, setTime] = useState("18:30")'],
|
|
68
|
-
children: "",
|
|
69
|
-
omit: ["locale"],
|
|
70
|
-
extraProps: { locale },
|
|
71
|
-
expressionProps: {
|
|
72
|
-
labels: '{ hour: "Hour", minute: "Minute", period: "AM or PM" }',
|
|
73
|
-
value: "time",
|
|
74
|
-
onChange: "setTime",
|
|
75
|
-
},
|
|
76
|
-
}),
|
|
77
|
-
usage: CompactTimePickerUsage,
|
|
78
|
-
showcase: CompactTimePickerShowcase,
|
|
79
|
-
examples: [],
|
|
80
|
-
})
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { CompactTimePicker } from "@passui/react/compact-time-picker"
|
|
2
|
-
import { useState } from "react"
|
|
3
|
-
|
|
4
|
-
const labels = {
|
|
5
|
-
hour: "Hour",
|
|
6
|
-
minute: "Minute",
|
|
7
|
-
period: "AM or PM",
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export function CompactTimePickerShowcase() {
|
|
11
|
-
const [starts, setStarts] = useState("09:00")
|
|
12
|
-
const [ends, setEnds] = useState("10:30")
|
|
13
|
-
return (
|
|
14
|
-
<div className="grid w-full max-w-sm grid-cols-2 gap-3">
|
|
15
|
-
<CompactTimePicker
|
|
16
|
-
label="Starts"
|
|
17
|
-
labels={labels}
|
|
18
|
-
locale="en-US"
|
|
19
|
-
value={starts}
|
|
20
|
-
onChange={setStarts}
|
|
21
|
-
/>
|
|
22
|
-
<CompactTimePicker
|
|
23
|
-
label="Ends"
|
|
24
|
-
labels={labels}
|
|
25
|
-
locale="en-GB"
|
|
26
|
-
value={ends}
|
|
27
|
-
onChange={setEnds}
|
|
28
|
-
/>
|
|
29
|
-
</div>
|
|
30
|
-
)
|
|
31
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { CompactTimePicker } from "@passui/react/compact-time-picker"
|
|
2
|
-
import { useState } from "react"
|
|
3
|
-
|
|
4
|
-
export function CompactTimePickerUsage() {
|
|
5
|
-
const [time, setTime] = useState("18:30")
|
|
6
|
-
return (
|
|
7
|
-
<div className="w-full max-w-xs">
|
|
8
|
-
<CompactTimePicker
|
|
9
|
-
label="Time"
|
|
10
|
-
labels={{
|
|
11
|
-
hour: "Hour",
|
|
12
|
-
minute: "Minute",
|
|
13
|
-
period: "AM or PM",
|
|
14
|
-
}}
|
|
15
|
-
locale="en-US"
|
|
16
|
-
value={time}
|
|
17
|
-
onChange={setTime}
|
|
18
|
-
/>
|
|
19
|
-
</div>
|
|
20
|
-
)
|
|
21
|
-
}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { ContentViewHeaderAction } from "./examples/content-view-header-action"
|
|
2
|
-
import { jsxAttribute } from "../../docs/snippet"
|
|
3
|
-
import { defineDocs } from "../../docs/types"
|
|
4
|
-
import {
|
|
5
|
-
ContentView,
|
|
6
|
-
type ContentViewVariant,
|
|
7
|
-
} from "./content-view"
|
|
8
|
-
import { ContentViewShowcase } from "./examples/content-view-showcase"
|
|
9
|
-
import { ContentViewStats } from "./examples/content-view-stats"
|
|
10
|
-
import { ContentViewUsage } from "./examples/content-view-usage"
|
|
11
|
-
|
|
12
|
-
// heading and description belong to ContentView.Header, inside the card;
|
|
13
|
-
// the snippet writes that header itself.
|
|
14
|
-
type DemoProps = {
|
|
15
|
-
variant?: ContentViewVariant
|
|
16
|
-
heading: string
|
|
17
|
-
description: string
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export const contentViewDocs = defineDocs<DemoProps>()({
|
|
21
|
-
slug: "content-view",
|
|
22
|
-
name: "ContentView",
|
|
23
|
-
importPath: "@passui/react/content-view",
|
|
24
|
-
controls: {
|
|
25
|
-
variant: {
|
|
26
|
-
kind: "select",
|
|
27
|
-
options: { elevated: true },
|
|
28
|
-
default: "elevated",
|
|
29
|
-
},
|
|
30
|
-
heading: { kind: "text", default: "Recovery" },
|
|
31
|
-
description: {
|
|
32
|
-
kind: "text",
|
|
33
|
-
default: "Ways back in if you lose your phone.",
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
render: ({ variant, heading, description }) => (
|
|
37
|
-
<ContentView variant={variant} className="w-72 p-5">
|
|
38
|
-
<ContentView.Header
|
|
39
|
-
heading={heading}
|
|
40
|
-
p={description || undefined}
|
|
41
|
-
className="flex flex-col gap-1"
|
|
42
|
-
pClassName="text-footnote text-label-secondary"
|
|
43
|
-
/>
|
|
44
|
-
</ContentView>
|
|
45
|
-
),
|
|
46
|
-
childrenSnippet: ({ heading, description }) => ({
|
|
47
|
-
imports: [],
|
|
48
|
-
omit: ["heading", "description"],
|
|
49
|
-
extraProps: { className: "p-5" },
|
|
50
|
-
children: `\n <ContentView.Header ${jsxAttribute("heading", heading)}${description ? ` ${jsxAttribute("p", description)}` : ""} />\n`,
|
|
51
|
-
}),
|
|
52
|
-
usage: ContentViewUsage,
|
|
53
|
-
showcase: ContentViewShowcase,
|
|
54
|
-
examples: [
|
|
55
|
-
{ id: "stats", component: ContentViewStats },
|
|
56
|
-
{
|
|
57
|
-
id: "header-action",
|
|
58
|
-
component: ContentViewHeaderAction,
|
|
59
|
-
},
|
|
60
|
-
],
|
|
61
|
-
})
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { Key01Icon } from "@hugeicons/core-free-icons"
|
|
2
|
-
import { HugeiconsIcon } from "@hugeicons/react"
|
|
3
|
-
import { Button } from "@passui/react/button"
|
|
4
|
-
import { ContentView } from "@passui/react/content-view"
|
|
5
|
-
|
|
6
|
-
export function ContentViewHeaderAction() {
|
|
7
|
-
return (
|
|
8
|
-
<ContentView className="w-full max-w-sm cursor-default p-5">
|
|
9
|
-
<ContentView.Header
|
|
10
|
-
heading="Passkeys"
|
|
11
|
-
p="2 passkeys on your devices. Sign in with your face or fingerprint."
|
|
12
|
-
icon={
|
|
13
|
-
<HugeiconsIcon
|
|
14
|
-
icon={Key01Icon}
|
|
15
|
-
size={20}
|
|
16
|
-
className="text-accent-text"
|
|
17
|
-
/>
|
|
18
|
-
}
|
|
19
|
-
action={
|
|
20
|
-
<Button
|
|
21
|
-
variant="secondary"
|
|
22
|
-
size="xs"
|
|
23
|
-
className="ms-auto"
|
|
24
|
-
>
|
|
25
|
-
Add
|
|
26
|
-
</Button>
|
|
27
|
-
}
|
|
28
|
-
className="flex flex-col gap-2"
|
|
29
|
-
pClassName="text-footnote text-label-secondary"
|
|
30
|
-
/>
|
|
31
|
-
</ContentView>
|
|
32
|
-
)
|
|
33
|
-
}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Key01Icon,
|
|
3
|
-
LockPasswordIcon,
|
|
4
|
-
SmartPhone01Icon,
|
|
5
|
-
} from "@hugeicons/core-free-icons"
|
|
6
|
-
import { HugeiconsIcon } from "@hugeicons/react"
|
|
7
|
-
import { ContentView } from "@passui/react/content-view"
|
|
8
|
-
|
|
9
|
-
const cards = [
|
|
10
|
-
{
|
|
11
|
-
id: "password",
|
|
12
|
-
heading: "Password",
|
|
13
|
-
description: "Changed 3 months ago",
|
|
14
|
-
icon: LockPasswordIcon,
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
id: "passkeys",
|
|
18
|
-
heading: "Passkeys",
|
|
19
|
-
description: "2 saved on your devices",
|
|
20
|
-
icon: Key01Icon,
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
id: "devices",
|
|
24
|
-
heading: "Devices",
|
|
25
|
-
description: "Signed in on 3 devices",
|
|
26
|
-
icon: SmartPhone01Icon,
|
|
27
|
-
},
|
|
28
|
-
]
|
|
29
|
-
|
|
30
|
-
export function ContentViewShowcase() {
|
|
31
|
-
return (
|
|
32
|
-
<div className="grid w-full max-w-2xl gap-4 sm:grid-cols-3">
|
|
33
|
-
{cards.map((card) => (
|
|
34
|
-
<ContentView
|
|
35
|
-
key={card.id}
|
|
36
|
-
className="relative p-5"
|
|
37
|
-
>
|
|
38
|
-
<ContentView.Header
|
|
39
|
-
heading={card.heading}
|
|
40
|
-
p={card.description}
|
|
41
|
-
icon={
|
|
42
|
-
<HugeiconsIcon
|
|
43
|
-
icon={card.icon}
|
|
44
|
-
size={20}
|
|
45
|
-
className="text-accent-text"
|
|
46
|
-
/>
|
|
47
|
-
}
|
|
48
|
-
className="flex flex-col gap-2"
|
|
49
|
-
pClassName="text-footnote text-label-secondary"
|
|
50
|
-
>
|
|
51
|
-
{/* the whole card is the link */}
|
|
52
|
-
<a
|
|
53
|
-
href={`#${card.id}`}
|
|
54
|
-
className="absolute inset-0 rounded-2xl"
|
|
55
|
-
>
|
|
56
|
-
<span className="sr-only">
|
|
57
|
-
Open {card.heading}
|
|
58
|
-
</span>
|
|
59
|
-
</a>
|
|
60
|
-
</ContentView.Header>
|
|
61
|
-
</ContentView>
|
|
62
|
-
))}
|
|
63
|
-
</div>
|
|
64
|
-
)
|
|
65
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { ContentView } from "@passui/react/content-view"
|
|
2
|
-
|
|
3
|
-
export function ContentViewStats() {
|
|
4
|
-
return (
|
|
5
|
-
<ContentView className="w-full max-w-sm p-5">
|
|
6
|
-
<ContentView.Section>
|
|
7
|
-
<ContentView.P className="text-footnote text-label-secondary">
|
|
8
|
-
This month
|
|
9
|
-
</ContentView.P>
|
|
10
|
-
<ContentView.Row className="justify-between gap-4">
|
|
11
|
-
<div className="flex flex-col">
|
|
12
|
-
<ContentView.H1 className="text-title font-bold tabular-nums">
|
|
13
|
-
1,284
|
|
14
|
-
</ContentView.H1>
|
|
15
|
-
<ContentView.Span>
|
|
16
|
-
sign ins
|
|
17
|
-
</ContentView.Span>
|
|
18
|
-
</div>
|
|
19
|
-
<ContentView.Divider />
|
|
20
|
-
<div className="flex flex-col">
|
|
21
|
-
<ContentView.H2 className="text-title font-bold tabular-nums">
|
|
22
|
-
12
|
|
23
|
-
<ContentView.Sub>
|
|
24
|
-
%
|
|
25
|
-
</ContentView.Sub>
|
|
26
|
-
</ContentView.H2>
|
|
27
|
-
<ContentView.Span>
|
|
28
|
-
with passkeys
|
|
29
|
-
</ContentView.Span>
|
|
30
|
-
</div>
|
|
31
|
-
</ContentView.Row>
|
|
32
|
-
</ContentView.Section>
|
|
33
|
-
</ContentView>
|
|
34
|
-
)
|
|
35
|
-
}
|