@passui/react 0.1.17 → 0.1.19
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 +102 -1
- 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/ambient/ambient.d.ts +12 -0
- package/dist/types/src/components/ambient/index.d.ts +1 -0
- package/dist/types/src/components/button/button-styles.d.ts +12 -0
- package/dist/types/src/components/button/button.d.ts +30 -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/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-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 +22 -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 +21 -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 +13 -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/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/picker/picker-trigger.d.ts +2 -0
- package/dist/types/src/components/picker/picker.d.ts +37 -0
- package/dist/types/src/components/popover/popover-fit.d.ts +21 -0
- package/dist/types/src/components/popover/popover.d.ts +14 -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/search-field/search-field.d.ts +2 -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 +18 -0
- package/dist/types/src/components/slider/slider.d.ts +14 -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/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 +18 -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/hooks/scroll/minimize-decision.d.ts +2 -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 +58 -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 +192 -40
- package/src/appearance/platform.tsx +10 -47
- package/src/appearance/theme.tsx +42 -142
- package/src/components/ambient/ambient.tsx +2 -10
- package/src/components/button/button-styles.ts +13 -31
- package/src/components/button/button.tsx +19 -14
- 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/compact-date-picker/calendar-month.ts +13 -57
- package/src/components/compact-date-picker/compact-date-picker.tsx +44 -123
- package/src/components/compact-time-picker/compact-time-picker.tsx +46 -130
- package/src/components/compact-time-picker/time-value.ts +4 -16
- 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 +125 -195
- package/src/components/context-menu/context-menu-store.ts +3 -11
- 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 +13 -54
- 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 +31 -76
- package/src/components/dialog/dialog-store.ts +1 -3
- package/src/components/dialog/dialog.tsx +23 -80
- package/src/components/disclosure-group/disclosure-group.tsx +70 -0
- package/src/components/divider/divider.tsx +31 -0
- package/src/components/inline-disclosure/inline-disclosure.tsx +49 -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/picker/picker-trigger.ts +10 -0
- package/src/components/picker/picker.tsx +72 -203
- package/src/components/popover/popover-fit.ts +69 -0
- package/src/components/popover/popover.tsx +94 -77
- package/src/components/profile-image/profile-image.tsx +6 -28
- package/src/components/progress-view/progress-view.tsx +65 -0
- package/src/components/search-field/search-field.tsx +27 -25
- package/src/components/search-list/search-list.tsx +43 -69
- 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 +27 -30
- package/src/components/slider/slider.tsx +76 -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/stepper.tsx +80 -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 +11 -40
- package/src/components/toast/toast-store.ts +9 -30
- package/src/components/toast/toaster.tsx +90 -104
- package/src/components/toggle/toggle.tsx +28 -24
- package/src/components/tooltip/tooltip-host.tsx +70 -67
- package/src/components/view-controller/view-controller.tsx +4 -21
- package/src/hooks/scroll/minimize-decision.ts +1 -5
- package/src/hooks/use-anchored-placement.ts +4 -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 +167 -121
- package/src/index.ts +9 -1
- package/src/lib/anchored-placement.ts +5 -15
- 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/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
|
@@ -2,63 +2,39 @@ import type * as React from "react"
|
|
|
2
2
|
|
|
3
3
|
import { cn } from "../../lib/class-names"
|
|
4
4
|
|
|
5
|
-
function Table({
|
|
6
|
-
className,
|
|
7
|
-
...props
|
|
8
|
-
}: React.ComponentProps<"table">) {
|
|
5
|
+
function Table({ className, ...props }: React.ComponentProps<"table">) {
|
|
9
6
|
return (
|
|
10
|
-
<div
|
|
11
|
-
data-slot="table-container"
|
|
12
|
-
className="relative w-full overflow-x-auto"
|
|
13
|
-
>
|
|
7
|
+
<div data-slot="table-container" className="relative w-full overflow-x-auto">
|
|
14
8
|
<table
|
|
15
9
|
data-slot="table"
|
|
16
|
-
className={cn(
|
|
17
|
-
"w-full caption-bottom text-subheadline text-label",
|
|
18
|
-
className
|
|
19
|
-
)}
|
|
10
|
+
className={cn("w-full caption-bottom text-subheadline text-label", className)}
|
|
20
11
|
{...props}
|
|
21
12
|
/>
|
|
22
13
|
</div>
|
|
23
14
|
)
|
|
24
15
|
}
|
|
25
16
|
|
|
26
|
-
function TableHeader({
|
|
27
|
-
className,
|
|
28
|
-
...props
|
|
29
|
-
}: React.ComponentProps<"thead">) {
|
|
17
|
+
function TableHeader({ className, ...props }: React.ComponentProps<"thead">) {
|
|
30
18
|
return (
|
|
31
19
|
<thead
|
|
32
20
|
data-slot="table-header"
|
|
33
|
-
className={cn(
|
|
34
|
-
"[&_tr]:border-separator [&_tr]:border-b",
|
|
35
|
-
className
|
|
36
|
-
)}
|
|
21
|
+
className={cn("[&_tr]:border-separator [&_tr]:border-b", className)}
|
|
37
22
|
{...props}
|
|
38
23
|
/>
|
|
39
24
|
)
|
|
40
25
|
}
|
|
41
26
|
|
|
42
|
-
function TableBody({
|
|
43
|
-
className,
|
|
44
|
-
...props
|
|
45
|
-
}: React.ComponentProps<"tbody">) {
|
|
27
|
+
function TableBody({ className, ...props }: React.ComponentProps<"tbody">) {
|
|
46
28
|
return (
|
|
47
29
|
<tbody
|
|
48
30
|
data-slot="table-body"
|
|
49
|
-
className={cn(
|
|
50
|
-
"[&_tr:last-child]:border-0",
|
|
51
|
-
className
|
|
52
|
-
)}
|
|
31
|
+
className={cn("[&_tr:last-child]:border-0", className)}
|
|
53
32
|
{...props}
|
|
54
33
|
/>
|
|
55
34
|
)
|
|
56
35
|
}
|
|
57
36
|
|
|
58
|
-
function TableFooter({
|
|
59
|
-
className,
|
|
60
|
-
...props
|
|
61
|
-
}: React.ComponentProps<"tfoot">) {
|
|
37
|
+
function TableFooter({ className, ...props }: React.ComponentProps<"tfoot">) {
|
|
62
38
|
return (
|
|
63
39
|
<tfoot
|
|
64
40
|
data-slot="table-footer"
|
|
@@ -71,10 +47,7 @@ function TableFooter({
|
|
|
71
47
|
)
|
|
72
48
|
}
|
|
73
49
|
|
|
74
|
-
function TableRow({
|
|
75
|
-
className,
|
|
76
|
-
...props
|
|
77
|
-
}: React.ComponentProps<"tr">) {
|
|
50
|
+
function TableRow({ className, ...props }: React.ComponentProps<"tr">) {
|
|
78
51
|
return (
|
|
79
52
|
<tr
|
|
80
53
|
data-slot="table-row"
|
|
@@ -88,10 +61,7 @@ function TableRow({
|
|
|
88
61
|
)
|
|
89
62
|
}
|
|
90
63
|
|
|
91
|
-
function TableHead({
|
|
92
|
-
className,
|
|
93
|
-
...props
|
|
94
|
-
}: React.ComponentProps<"th">) {
|
|
64
|
+
function TableHead({ className, ...props }: React.ComponentProps<"th">) {
|
|
95
65
|
return (
|
|
96
66
|
<th
|
|
97
67
|
data-slot="table-head"
|
|
@@ -105,10 +75,7 @@ function TableHead({
|
|
|
105
75
|
)
|
|
106
76
|
}
|
|
107
77
|
|
|
108
|
-
function TableCell({
|
|
109
|
-
className,
|
|
110
|
-
...props
|
|
111
|
-
}: React.ComponentProps<"td">) {
|
|
78
|
+
function TableCell({ className, ...props }: React.ComponentProps<"td">) {
|
|
112
79
|
return (
|
|
113
80
|
<td
|
|
114
81
|
data-slot="table-cell"
|
|
@@ -121,29 +88,14 @@ function TableCell({
|
|
|
121
88
|
)
|
|
122
89
|
}
|
|
123
90
|
|
|
124
|
-
function TableCaption({
|
|
125
|
-
className,
|
|
126
|
-
...props
|
|
127
|
-
}: React.ComponentProps<"caption">) {
|
|
91
|
+
function TableCaption({ className, ...props }: React.ComponentProps<"caption">) {
|
|
128
92
|
return (
|
|
129
93
|
<caption
|
|
130
94
|
data-slot="table-caption"
|
|
131
|
-
className={cn(
|
|
132
|
-
"mt-4 text-footnote text-label-secondary",
|
|
133
|
-
className
|
|
134
|
-
)}
|
|
95
|
+
className={cn("mt-4 text-footnote text-label-secondary", className)}
|
|
135
96
|
{...props}
|
|
136
97
|
/>
|
|
137
98
|
)
|
|
138
99
|
}
|
|
139
100
|
|
|
140
|
-
export {
|
|
141
|
-
Table,
|
|
142
|
-
TableBody,
|
|
143
|
-
TableCaption,
|
|
144
|
-
TableCell,
|
|
145
|
-
TableFooter,
|
|
146
|
-
TableHead,
|
|
147
|
-
TableHeader,
|
|
148
|
-
TableRow,
|
|
149
|
-
}
|
|
101
|
+
export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow }
|
|
@@ -2,18 +2,8 @@ import type { ComponentProps } from "react"
|
|
|
2
2
|
import { cn } from "../../lib/class-names"
|
|
3
3
|
import { textControlClasses } from "../text-field/text-field"
|
|
4
4
|
|
|
5
|
-
export function TextEditor({
|
|
6
|
-
className,
|
|
7
|
-
...props
|
|
8
|
-
}: ComponentProps<"textarea">) {
|
|
5
|
+
export function TextEditor({ className, ...props }: ComponentProps<"textarea">) {
|
|
9
6
|
return (
|
|
10
|
-
<textarea
|
|
11
|
-
{...props}
|
|
12
|
-
className={cn(
|
|
13
|
-
textControlClasses,
|
|
14
|
-
"min-h-28 resize-y",
|
|
15
|
-
className
|
|
16
|
-
)}
|
|
17
|
-
/>
|
|
7
|
+
<textarea {...props} className={cn(textControlClasses, "min-h-28 resize-y", className)} />
|
|
18
8
|
)
|
|
19
9
|
}
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
type ComponentProps,
|
|
3
|
-
type ReactNode,
|
|
4
|
-
useId,
|
|
5
|
-
useState,
|
|
6
|
-
} from "react"
|
|
1
|
+
import { type ComponentProps, type ReactNode, useId, useState } from "react"
|
|
7
2
|
import { Button } from "../button/button"
|
|
8
3
|
import { cn } from "../../lib/class-names"
|
|
9
4
|
|
|
@@ -14,8 +9,7 @@ export const textControlClasses = cn(
|
|
|
14
9
|
"disabled:cursor-not-allowed disabled:opacity-40 aria-invalid:border-danger"
|
|
15
10
|
)
|
|
16
11
|
|
|
17
|
-
const fieldIconClasses =
|
|
18
|
-
"flex shrink-0 items-center text-label-secondary"
|
|
12
|
+
const fieldIconClasses = "flex shrink-0 items-center text-label-secondary"
|
|
19
13
|
|
|
20
14
|
export type TextFieldProps = ComponentProps<"input"> & {
|
|
21
15
|
label: string
|
|
@@ -50,18 +44,12 @@ export function TextField({
|
|
|
50
44
|
const reveal = type === "password" && revealLabels
|
|
51
45
|
return (
|
|
52
46
|
<div className="flex flex-col gap-2">
|
|
53
|
-
<label
|
|
54
|
-
htmlFor={id}
|
|
55
|
-
className="text-subheadline font-semibold"
|
|
56
|
-
>
|
|
47
|
+
<label htmlFor={id} className="text-subheadline font-semibold">
|
|
57
48
|
{label}
|
|
58
49
|
</label>
|
|
59
50
|
<div className="flex items-center gap-2 rounded-xl border border-separator bg-elevated px-3 focus-within:ring-1 focus-within:ring-accent/40 has-[:focus-visible]:ring-2 has-[:focus-visible]:ring-accent-text/70">
|
|
60
51
|
{icon && (
|
|
61
|
-
<span
|
|
62
|
-
aria-hidden
|
|
63
|
-
className={fieldIconClasses}
|
|
64
|
-
>
|
|
52
|
+
<span aria-hidden className={fieldIconClasses}>
|
|
65
53
|
{icon}
|
|
66
54
|
</span>
|
|
67
55
|
)}
|
|
@@ -71,9 +59,7 @@ export function TextField({
|
|
|
71
59
|
type={reveal && revealed ? "text" : type}
|
|
72
60
|
aria-invalid={messages.length > 0}
|
|
73
61
|
aria-describedby={
|
|
74
|
-
messages.length || description
|
|
75
|
-
? `${id}-description`
|
|
76
|
-
: undefined
|
|
62
|
+
messages.length || description ? `${id}-description` : undefined
|
|
77
63
|
}
|
|
78
64
|
className={cn(
|
|
79
65
|
"h-11 w-full min-w-0 bg-transparent text-body text-label outline-none",
|
|
@@ -82,10 +68,7 @@ export function TextField({
|
|
|
82
68
|
)}
|
|
83
69
|
/>
|
|
84
70
|
{trailingIcon && (
|
|
85
|
-
<span
|
|
86
|
-
aria-hidden
|
|
87
|
-
className={fieldIconClasses}
|
|
88
|
-
>
|
|
71
|
+
<span aria-hidden className={fieldIconClasses}>
|
|
89
72
|
{trailingIcon}
|
|
90
73
|
</span>
|
|
91
74
|
)}
|
|
@@ -97,17 +80,11 @@ export function TextField({
|
|
|
97
80
|
// wider invisible area keeps a 44px target
|
|
98
81
|
className="-mr-1.5 shrink-0 whitespace-nowrap [@media(pointer:coarse)]:before:absolute [@media(pointer:coarse)]:before:-inset-1.5 [@media(pointer:coarse)]:before:content-['']"
|
|
99
82
|
aria-controls={id}
|
|
100
|
-
aria-label={
|
|
101
|
-
revealed
|
|
102
|
-
? revealLabels.hide
|
|
103
|
-
: revealLabels.show
|
|
104
|
-
}
|
|
83
|
+
aria-label={revealed ? revealLabels.hide : revealLabels.show}
|
|
105
84
|
aria-pressed={revealed}
|
|
106
85
|
onClick={() => setRevealed(!revealed)}
|
|
107
86
|
>
|
|
108
|
-
{revealed
|
|
109
|
-
? revealLabels.hide
|
|
110
|
-
: revealLabels.show}
|
|
87
|
+
{revealed ? revealLabels.hide : revealLabels.show}
|
|
111
88
|
</Button>
|
|
112
89
|
)}
|
|
113
90
|
{action}
|
|
@@ -115,19 +92,13 @@ export function TextField({
|
|
|
115
92
|
{(messages.length > 0 || description) && (
|
|
116
93
|
<div
|
|
117
94
|
id={`${id}-description`}
|
|
118
|
-
role={
|
|
119
|
-
messages.length ? "alert" : undefined
|
|
120
|
-
}
|
|
95
|
+
role={messages.length ? "alert" : undefined}
|
|
121
96
|
className={cn(
|
|
122
97
|
"text-footnote",
|
|
123
|
-
messages.length
|
|
124
|
-
? "text-danger"
|
|
125
|
-
: "text-label-secondary"
|
|
98
|
+
messages.length ? "text-danger" : "text-label-secondary"
|
|
126
99
|
)}
|
|
127
100
|
>
|
|
128
|
-
{messages.length
|
|
129
|
-
? messages.join(". ")
|
|
130
|
-
: description}
|
|
101
|
+
{messages.length ? messages.join(". ") : description}
|
|
131
102
|
</div>
|
|
132
103
|
)}
|
|
133
104
|
</div>
|
|
@@ -2,11 +2,7 @@
|
|
|
2
2
|
* App-wide toasts: short messages that confirm, report progress or explain
|
|
3
3
|
* a failure. Call `toast` from anywhere; render one `<Toaster />`.
|
|
4
4
|
*/
|
|
5
|
-
export type ToastTone =
|
|
6
|
-
| "neutral"
|
|
7
|
-
| "success"
|
|
8
|
-
| "error"
|
|
9
|
-
| "loading"
|
|
5
|
+
export type ToastTone = "neutral" | "success" | "error" | "loading"
|
|
10
6
|
|
|
11
7
|
export interface ToastAction {
|
|
12
8
|
label: string
|
|
@@ -41,11 +37,7 @@ const emit = () => {
|
|
|
41
37
|
for (const listener of listeners) listener()
|
|
42
38
|
}
|
|
43
39
|
|
|
44
|
-
function show(
|
|
45
|
-
tone: ToastTone,
|
|
46
|
-
title: string,
|
|
47
|
-
options: ToastOptions = {}
|
|
48
|
-
): number {
|
|
40
|
+
function show(tone: ToastTone, title: string, options: ToastOptions = {}): number {
|
|
49
41
|
const id = nextId++
|
|
50
42
|
const duration =
|
|
51
43
|
options.duration !== undefined
|
|
@@ -70,14 +62,8 @@ function show(
|
|
|
70
62
|
}
|
|
71
63
|
|
|
72
64
|
/** Changes a toast in place; it morphs to its new state. */
|
|
73
|
-
function update(
|
|
74
|
-
id
|
|
75
|
-
tone: ToastTone,
|
|
76
|
-
title: string,
|
|
77
|
-
options: ToastOptions = {}
|
|
78
|
-
) {
|
|
79
|
-
if (!toasts.some((t) => t.id === id))
|
|
80
|
-
return show(tone, title, options)
|
|
65
|
+
function update(id: number, tone: ToastTone, title: string, options: ToastOptions = {}) {
|
|
66
|
+
if (!toasts.some((t) => t.id === id)) return show(tone, title, options)
|
|
81
67
|
toasts = toasts.map((t) =>
|
|
82
68
|
t.id === id
|
|
83
69
|
? {
|
|
@@ -112,22 +98,15 @@ interface PromiseMessages<T> {
|
|
|
112
98
|
}
|
|
113
99
|
|
|
114
100
|
export const toast = Object.assign(
|
|
115
|
-
(title: string, options?: ToastOptions) =>
|
|
116
|
-
show("neutral", title, options),
|
|
101
|
+
(title: string, options?: ToastOptions) => show("neutral", title, options),
|
|
117
102
|
{
|
|
118
|
-
success: (title: string, options?: ToastOptions) =>
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
show("error", title, options),
|
|
122
|
-
loading: (title: string, options?: ToastOptions) =>
|
|
123
|
-
show("loading", title, options),
|
|
103
|
+
success: (title: string, options?: ToastOptions) => show("success", title, options),
|
|
104
|
+
error: (title: string, options?: ToastOptions) => show("error", title, options),
|
|
105
|
+
loading: (title: string, options?: ToastOptions) => show("loading", title, options),
|
|
124
106
|
update,
|
|
125
107
|
dismiss,
|
|
126
108
|
/** Shows progress, then morphs into the outcome. Returns the promise. */
|
|
127
|
-
promise<T>(
|
|
128
|
-
promise: Promise<T>,
|
|
129
|
-
messages: PromiseMessages<T>
|
|
130
|
-
): Promise<T> {
|
|
109
|
+
promise<T>(promise: Promise<T>, messages: PromiseMessages<T>): Promise<T> {
|
|
131
110
|
const id = show("loading", messages.loading)
|
|
132
111
|
promise.then(
|
|
133
112
|
(value) =>
|