@passui/react 0.1.47 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +29 -109
- package/THIRD_PARTY_NOTICES.md +29 -0
- package/dist/accordion.d.ts +15 -0
- package/dist/accordion.js +93 -0
- package/dist/alert-dialog.d.ts +26 -0
- package/dist/alert-dialog.js +142 -0
- package/dist/alert.d.ts +10 -0
- package/dist/alert.js +28 -0
- package/dist/{types/src/components/ambient/ambient.d.ts → ambient.d.ts} +4 -4
- package/dist/ambient.js +22 -0
- package/dist/{types/src/appearance → appearance}/platform.d.ts +3 -3
- package/dist/appearance/platform.js +43 -0
- package/dist/appearance/theme.d.ts +71 -0
- package/dist/appearance/theme.js +236 -0
- package/dist/appearance.d.ts +3 -0
- package/dist/appearance.js +3 -0
- package/dist/{types/src/components/aspect-ratio/aspect-ratio.d.ts → aspect-ratio.d.ts} +4 -4
- package/dist/aspect-ratio.js +17 -0
- package/dist/avatar.d.ts +5 -0
- package/dist/avatar.js +43 -0
- package/dist/badge.d.ts +8 -0
- package/dist/badge.js +21 -0
- package/dist/breadcrumb.d.ts +13 -0
- package/dist/breadcrumb.js +63 -0
- package/dist/button-group.d.ts +5 -0
- package/dist/button-group.js +14 -0
- package/dist/button.d.ts +21 -0
- package/dist/button.js +58 -0
- package/dist/calendar.d.ts +35 -0
- package/dist/calendar.js +225 -0
- package/dist/card.d.ts +9 -0
- package/dist/card.js +54 -0
- package/dist/chart.d.ts +30 -0
- package/dist/chart.js +226 -0
- package/dist/checkbox.d.ts +13 -0
- package/dist/checkbox.js +53 -0
- package/dist/{types/src/lib/clipboard.d.ts → clipboard.d.ts} +1 -1
- package/dist/clipboard.js +16 -0
- package/dist/cn.d.ts +2 -0
- package/dist/cn.js +10 -0
- package/dist/code-block.d.ts +34 -0
- package/dist/code-block.js +87 -0
- package/dist/collapsible.d.ts +13 -0
- package/dist/collapsible.js +49 -0
- package/dist/combobox.d.ts +25 -0
- package/dist/combobox.js +112 -0
- package/dist/command.d.ts +22 -0
- package/dist/command.js +129 -0
- package/dist/components/toast/toast-store.d.ts +60 -0
- package/dist/components/toast/toast-store.js +96 -0
- package/dist/{types/src/components → components}/toast/toaster.d.ts +4 -4
- package/dist/components/toast/toaster.js +345 -0
- package/dist/context-menu.d.ts +2 -0
- package/dist/context-menu.js +2 -0
- package/dist/conversation.d.ts +48 -0
- package/dist/conversation.js +202 -0
- package/dist/date-time-picker.d.ts +50 -0
- package/dist/date-time-picker.js +235 -0
- package/dist/date.d.ts +50 -0
- package/dist/date.js +77 -0
- package/dist/dialog.d.ts +21 -0
- package/dist/dialog.js +113 -0
- package/dist/drawer.d.ts +30 -0
- package/dist/drawer.js +140 -0
- package/dist/dropdown-menu.d.ts +56 -0
- package/dist/dropdown-menu.js +295 -0
- package/dist/empty.d.ts +11 -0
- package/dist/empty.js +51 -0
- package/dist/field.d.ts +16 -0
- package/dist/field.js +47 -0
- package/{src/hooks/scroll/minimize-decision.ts → dist/hooks/scroll/minimize-decision.js} +3 -5
- package/dist/{types/src/hooks → hooks}/use-anchored-placement.d.ts +2 -2
- package/dist/hooks/use-anchored-placement.js +33 -0
- package/dist/{types/src/hooks → hooks}/use-minimize-on-scroll.d.ts +1 -1
- package/dist/hooks/use-minimize-on-scroll.js +59 -0
- package/dist/{types/src/hooks → hooks}/use-visual-viewport.d.ts +2 -2
- package/{src/hooks/use-visual-viewport.ts → dist/hooks/use-visual-viewport.js} +20 -35
- package/dist/hooks/viewport/types.d.ts +7 -0
- package/dist/hooks/viewport/viewport-metrics.js +13 -0
- package/dist/index.d.ts +84 -0
- package/dist/index.js +80 -0
- package/dist/input-group.d.ts +17 -0
- package/dist/input-group.js +55 -0
- package/dist/input-otp.d.ts +13 -0
- package/dist/input-otp.js +36 -0
- package/dist/input.d.ts +4 -0
- package/dist/input.js +14 -0
- package/dist/item.d.ts +49 -0
- package/dist/item.js +142 -0
- package/dist/kbd.d.ts +4 -0
- package/dist/kbd.js +86 -0
- package/dist/label.d.ts +3 -0
- package/dist/label.js +12 -0
- package/dist/labeled-content.d.ts +24 -0
- package/dist/labeled-content.js +41 -0
- package/dist/{types/src/lib/language.d.ts → language.d.ts} +1 -1
- package/dist/language.js +11 -0
- package/dist/layout.d.ts +24 -0
- package/dist/layout.js +36 -0
- package/dist/{types/src/lib → lib}/anchored-placement.d.ts +27 -27
- package/dist/lib/anchored-placement.js +42 -0
- package/dist/lib/calendar-month.js +90 -0
- package/dist/lib/cx.js +6 -0
- package/dist/lib/drawer.math.js +29 -0
- package/dist/lib/floating-layers.d.ts +3 -0
- package/dist/lib/floating-layers.js +25 -0
- package/dist/{types/src/lib → lib}/haptics.d.ts +1 -1
- package/dist/lib/haptics.js +13 -0
- package/dist/lib/liquid-step.js +33 -0
- package/dist/lib/page-scale.js +58 -0
- package/dist/lib/portal.js +12 -0
- package/dist/lib/presence.js +53 -0
- package/dist/lib/range-value.js +25 -0
- package/dist/lib/render.d.ts +8 -0
- package/dist/lib/render.js +42 -0
- package/dist/lib/rolling-digit.js +83 -0
- package/dist/{types/src/lib → lib}/screen-edges.d.ts +5 -5
- package/dist/lib/screen-edges.js +30 -0
- package/dist/lib/swipe-touch-action.js +34 -0
- package/dist/lib/visual-viewport.js +27 -0
- package/dist/lib/water-drop.js +412 -0
- package/dist/lib/wheel.js +125 -0
- package/dist/list.d.ts +26 -0
- package/dist/list.js +80 -0
- package/dist/locales.d.ts +18 -0
- package/dist/locales.js +36 -0
- package/dist/marker.d.ts +13 -0
- package/dist/marker.js +33 -0
- package/dist/motion/transitions.d.ts +170 -0
- package/dist/motion/transitions.js +156 -0
- package/dist/pagination.d.ts +30 -0
- package/dist/pagination.js +117 -0
- package/dist/popover.d.ts +26 -0
- package/dist/popover.js +101 -0
- package/dist/progress.d.ts +9 -0
- package/dist/progress.js +24 -0
- package/dist/questionnaire.d.ts +46 -0
- package/dist/questionnaire.js +133 -0
- package/dist/radio-group.d.ts +21 -0
- package/dist/radio-group.js +67 -0
- package/dist/search-field.d.ts +18 -0
- package/dist/search-field.js +45 -0
- package/dist/segmented-control.d.ts +16 -0
- package/dist/segmented-control.js +25 -0
- package/dist/select.d.ts +24 -0
- package/dist/select.js +107 -0
- package/dist/separator.d.ts +9 -0
- package/dist/separator.js +17 -0
- package/dist/{types/src/lib/shapes.d.ts → shapes.d.ts} +2 -2
- package/dist/shapes.js +65 -0
- package/dist/sheet.d.ts +24 -0
- package/dist/sheet.js +141 -0
- package/dist/sidebar.d.ts +32 -0
- package/dist/sidebar.js +85 -0
- package/dist/skeleton.d.ts +3 -0
- package/dist/skeleton.js +13 -0
- package/dist/slider.d.ts +9 -0
- package/dist/slider.js +42 -0
- package/dist/slosh-slider.d.ts +21 -0
- package/dist/slosh-slider.js +205 -0
- package/dist/spinner.d.ts +3 -0
- package/dist/spinner.js +20 -0
- package/dist/stat-tile.d.ts +20 -0
- package/dist/stat-tile.js +53 -0
- package/dist/stepper.d.ts +22 -0
- package/dist/stepper.js +98 -0
- package/dist/swatch-picker.d.ts +22 -0
- package/dist/swatch-picker.js +70 -0
- package/dist/switch.d.ts +10 -0
- package/dist/switch.js +44 -0
- package/dist/tab-bar.d.ts +15 -0
- package/dist/tab-bar.js +34 -0
- package/dist/{types/src/components/table/table.d.ts → table.d.ts} +3 -3
- package/dist/table.js +93 -0
- package/dist/tabs.d.ts +32 -0
- package/dist/tabs.js +131 -0
- package/dist/text.d.ts +25 -0
- package/dist/text.js +44 -0
- package/dist/textarea.d.ts +3 -0
- package/dist/textarea.js +13 -0
- package/dist/toast.d.ts +3 -0
- package/dist/toast.js +3 -0
- package/dist/toggle-group.d.ts +20 -0
- package/dist/toggle-group.js +68 -0
- package/dist/toggle.d.ts +24 -0
- package/dist/toggle.js +37 -0
- package/dist/tokens.d.ts +1 -0
- package/dist/tooltip.d.ts +21 -0
- package/dist/tooltip.js +61 -0
- package/dist/trace.d.ts +14 -0
- package/dist/trace.js +54 -0
- package/dist/{types/src/hooks/use-dismiss.d.ts → use-dismiss.d.ts} +3 -3
- package/dist/use-dismiss.js +38 -0
- package/dist/{types/src/hooks/use-media-query.d.ts → use-media-query.d.ts} +12 -12
- package/dist/use-media-query.js +56 -0
- package/dist/use-os.d.ts +12 -0
- package/dist/use-os.js +17 -0
- package/dist/wake-slider.d.ts +15 -0
- package/dist/wake-slider.js +174 -0
- package/package.json +122 -253
- package/src/styles/code-block.css +4 -0
- package/src/styles/globals.css +5 -0
- package/src/styles/motion-controls.css +10 -0
- package/src/styles/page-scale.css +27 -0
- package/src/styles/styles.css +4 -2
- package/dist/types/src/appearance/index.d.ts +0 -2
- package/dist/types/src/appearance/theme.d.ts +0 -71
- package/dist/types/src/components/accordion/accordion.d.ts +0 -23
- package/dist/types/src/components/ambient/index.d.ts +0 -1
- package/dist/types/src/components/breadcrumb/breadcrumb.d.ts +0 -19
- package/dist/types/src/components/button/button-styles.d.ts +0 -12
- package/dist/types/src/components/button/button.d.ts +0 -32
- package/dist/types/src/components/button/icon-button.d.ts +0 -10
- package/dist/types/src/components/button/pending-spinner.d.ts +0 -5
- package/dist/types/src/components/button/use-pending-indicator.d.ts +0 -2
- package/dist/types/src/components/chip/chip.d.ts +0 -10
- package/dist/types/src/components/code-block/code-block.d.ts +0 -13
- package/dist/types/src/components/combo-box/combo-box.d.ts +0 -9
- package/dist/types/src/components/command/command.d.ts +0 -18
- package/dist/types/src/components/compact-date-picker/calendar-month.d.ts +0 -25
- package/dist/types/src/components/compact-date-picker/compact-date-picker.d.ts +0 -30
- package/dist/types/src/components/compact-time-picker/compact-time-picker.d.ts +0 -29
- package/dist/types/src/components/compact-time-picker/time-value.d.ts +0 -18
- package/dist/types/src/components/content-unavailable-view/content-unavailable-view.d.ts +0 -12
- package/dist/types/src/components/content-view/content-view.d.ts +0 -51
- package/dist/types/src/components/content-view/index.d.ts +0 -1
- package/dist/types/src/components/context-menu/conceal-menu-source.d.ts +0 -2
- package/dist/types/src/components/context-menu/context-menu-host.d.ts +0 -2
- package/dist/types/src/components/context-menu/context-menu-store.d.ts +0 -62
- package/dist/types/src/components/context-menu/menu-navigation.d.ts +0 -6
- package/dist/types/src/components/context-menu/menu-position.d.ts +0 -21
- package/dist/types/src/components/context-menu/menu-reveal.d.ts +0 -26
- package/dist/types/src/components/context-menu/use-context-menu.d.ts +0 -14
- package/dist/types/src/components/conversation/conversation.d.ts +0 -48
- package/dist/types/src/components/conversation/index.d.ts +0 -1
- package/dist/types/src/components/date-picker/date-picker.d.ts +0 -19
- package/dist/types/src/components/date-picker/date-value.d.ts +0 -2
- package/dist/types/src/components/dialog/dialog-host.d.ts +0 -6
- package/dist/types/src/components/dialog/dialog-store.d.ts +0 -23
- package/dist/types/src/components/dialog/dialog.d.ts +0 -33
- package/dist/types/src/components/dialog/index.d.ts +0 -1
- package/dist/types/src/components/disclosure-group/disclosure-group.d.ts +0 -18
- package/dist/types/src/components/divider/divider.d.ts +0 -9
- package/dist/types/src/components/inline-disclosure/inline-disclosure.d.ts +0 -15
- package/dist/types/src/components/keyboard-shortcut/keyboard-shortcut.d.ts +0 -8
- package/dist/types/src/components/labeled-content/labeled-content.d.ts +0 -22
- package/dist/types/src/components/locale-switcher/index.d.ts +0 -1
- package/dist/types/src/components/locale-switcher/locale-switcher.d.ts +0 -13
- package/dist/types/src/components/menu/menu.d.ts +0 -16
- package/dist/types/src/components/morph/index.d.ts +0 -2
- package/dist/types/src/components/morph/morph.d.ts +0 -32
- package/dist/types/src/components/morph/use-morph-disclosure.d.ts +0 -13
- package/dist/types/src/components/one-time-code/one-time-code.d.ts +0 -26
- package/dist/types/src/components/picker/picker-trigger.d.ts +0 -3
- package/dist/types/src/components/picker/picker.d.ts +0 -46
- package/dist/types/src/components/popover/anchored-surface.d.ts +0 -17
- package/dist/types/src/components/popover/index.d.ts +0 -41
- package/dist/types/src/components/popover/popover-content.d.ts +0 -38
- package/dist/types/src/components/popover/popover-root.d.ts +0 -22
- package/dist/types/src/components/popover/popover-trigger.d.ts +0 -23
- package/dist/types/src/components/profile-image/profile-image.d.ts +0 -9
- package/dist/types/src/components/progress-view/progress-view.d.ts +0 -13
- package/dist/types/src/components/progress-view/use-liquid-progress.d.ts +0 -3
- package/dist/types/src/components/radio-group/radio-group.d.ts +0 -20
- package/dist/types/src/components/search-field/expanding-search-field.d.ts +0 -5
- package/dist/types/src/components/search-field/search-field.d.ts +0 -9
- package/dist/types/src/components/search-list/search-list.d.ts +0 -22
- package/dist/types/src/components/section/section.d.ts +0 -18
- package/dist/types/src/components/secure-field/secure-field.d.ts +0 -4
- package/dist/types/src/components/segmented-control/segmented-control.d.ts +0 -25
- package/dist/types/src/components/sheet/modal-environment.d.ts +0 -2
- package/dist/types/src/components/sheet/sheet-portal.d.ts +0 -5
- package/dist/types/src/components/sheet/sheet.d.ts +0 -26
- package/dist/types/src/components/sheet/use-sheet-focus.d.ts +0 -3
- package/dist/types/src/components/sidebar/sidebar.d.ts +0 -24
- package/dist/types/src/components/skeleton/skeleton.d.ts +0 -9
- package/dist/types/src/components/slider/slider.d.ts +0 -17
- package/dist/types/src/components/slosh-slider/liquid-step.d.ts +0 -6
- package/dist/types/src/components/slosh-slider/slosh-slider.d.ts +0 -21
- package/dist/types/src/components/stat-tile/index.d.ts +0 -1
- package/dist/types/src/components/stat-tile/stat-tile.d.ts +0 -20
- package/dist/types/src/components/status-indicator/status-indicator.d.ts +0 -17
- package/dist/types/src/components/stepper/rolling-digit.d.ts +0 -11
- package/dist/types/src/components/stepper/stepper.d.ts +0 -22
- package/dist/types/src/components/swatch-picker/swatch-picker.d.ts +0 -22
- package/dist/types/src/components/tab-bar/tab-bar.d.ts +0 -43
- package/dist/types/src/components/tab-view/tab-view.d.ts +0 -27
- package/dist/types/src/components/text-editor/text-editor.d.ts +0 -9
- package/dist/types/src/components/text-field/text-field.d.ts +0 -33
- package/dist/types/src/components/toast/toast-store.d.ts +0 -52
- package/dist/types/src/components/toggle/toggle.d.ts +0 -22
- package/dist/types/src/components/tooltip/tooltip-host.d.ts +0 -7
- package/dist/types/src/components/view-controller/index.d.ts +0 -1
- package/dist/types/src/components/view-controller/view-controller.d.ts +0 -21
- package/dist/types/src/components/wake-slider/wake-slider.d.ts +0 -15
- package/dist/types/src/hooks/scroll/minimize-decision.d.ts +0 -2
- package/dist/types/src/hooks/use-anchored-disclosure.d.ts +0 -9
- package/dist/types/src/hooks/use-floating-dismiss.d.ts +0 -3
- package/dist/types/src/hooks/viewport/types.d.ts +0 -19
- package/dist/types/src/hooks/viewport/viewport-metrics.d.ts +0 -3
- package/dist/types/src/icons/icons.d.ts +0 -616
- package/dist/types/src/index.d.ts +0 -73
- package/dist/types/src/lib/class-names.d.ts +0 -2
- package/dist/types/src/lib/date.d.ts +0 -50
- package/dist/types/src/lib/floating-layers.d.ts +0 -8
- package/dist/types/src/lib/range-value.d.ts +0 -4
- package/dist/types/src/machines/popover.machine.d.ts +0 -30
- package/dist/types/src/motion/transitions.d.ts +0 -170
- package/src/appearance/index.ts +0 -2
- package/src/appearance/platform.tsx +0 -102
- package/src/appearance/theme.tsx +0 -467
- package/src/components/accordion/accordion.tsx +0 -70
- package/src/components/ambient/ambient.tsx +0 -35
- package/src/components/ambient/index.ts +0 -1
- package/src/components/aspect-ratio/aspect-ratio.tsx +0 -27
- package/src/components/breadcrumb/breadcrumb.tsx +0 -73
- package/src/components/button/button-styles.ts +0 -49
- package/src/components/button/button.tsx +0 -107
- package/src/components/button/icon-button.tsx +0 -33
- package/src/components/button/pending-spinner.tsx +0 -14
- package/src/components/button/use-pending-indicator.ts +0 -22
- package/src/components/chip/chip.tsx +0 -45
- package/src/components/code-block/code-block.tsx +0 -48
- package/src/components/combo-box/combo-box.tsx +0 -13
- package/src/components/command/command.tsx +0 -149
- package/src/components/compact-date-picker/calendar-month.ts +0 -109
- package/src/components/compact-date-picker/compact-date-picker.tsx +0 -337
- package/src/components/compact-time-picker/compact-time-picker.tsx +0 -321
- package/src/components/compact-time-picker/time-value.ts +0 -58
- package/src/components/content-unavailable-view/content-unavailable-view.tsx +0 -78
- package/src/components/content-view/content-view.tsx +0 -215
- package/src/components/content-view/index.ts +0 -1
- package/src/components/context-menu/conceal-menu-source.ts +0 -30
- package/src/components/context-menu/context-menu-host.tsx +0 -459
- package/src/components/context-menu/context-menu-store.ts +0 -167
- package/src/components/context-menu/menu-navigation.ts +0 -36
- package/src/components/context-menu/menu-position.ts +0 -38
- package/src/components/context-menu/menu-reveal.ts +0 -42
- package/src/components/context-menu/use-context-menu.ts +0 -73
- package/src/components/conversation/conversation.tsx +0 -309
- package/src/components/conversation/index.ts +0 -1
- package/src/components/date-picker/date-picker.tsx +0 -106
- package/src/components/date-picker/date-value.ts +0 -22
- package/src/components/dialog/dialog-host.tsx +0 -119
- package/src/components/dialog/dialog-store.ts +0 -66
- package/src/components/dialog/dialog.tsx +0 -211
- package/src/components/dialog/index.ts +0 -1
- package/src/components/disclosure-group/disclosure-group.tsx +0 -108
- package/src/components/divider/divider.tsx +0 -33
- package/src/components/inline-disclosure/inline-disclosure.tsx +0 -53
- package/src/components/keyboard-shortcut/keyboard-shortcut.tsx +0 -32
- package/src/components/labeled-content/labeled-content.tsx +0 -84
- package/src/components/locale-switcher/index.ts +0 -1
- package/src/components/locale-switcher/locale-switcher.tsx +0 -310
- package/src/components/menu/menu.tsx +0 -85
- package/src/components/morph/index.ts +0 -2
- package/src/components/morph/morph.tsx +0 -258
- package/src/components/morph/use-morph-disclosure.ts +0 -27
- package/src/components/one-time-code/one-time-code.tsx +0 -234
- package/src/components/picker/picker-trigger.ts +0 -22
- package/src/components/picker/picker.tsx +0 -404
- package/src/components/popover/anchored-surface.tsx +0 -264
- package/src/components/popover/index.ts +0 -50
- package/src/components/popover/popover-content.tsx +0 -374
- package/src/components/popover/popover-root.tsx +0 -97
- package/src/components/popover/popover-trigger.tsx +0 -71
- package/src/components/profile-image/profile-image.tsx +0 -96
- package/src/components/progress-view/progress-view.tsx +0 -72
- package/src/components/progress-view/use-liquid-progress.ts +0 -43
- package/src/components/radio-group/radio-group.tsx +0 -86
- package/src/components/search-field/expanding-search-field.tsx +0 -197
- package/src/components/search-field/search-field.tsx +0 -66
- package/src/components/search-list/search-list.tsx +0 -276
- package/src/components/section/section.tsx +0 -75
- package/src/components/secure-field/secure-field.tsx +0 -8
- package/src/components/segmented-control/segmented-control.tsx +0 -157
- package/src/components/sheet/modal-environment.ts +0 -82
- package/src/components/sheet/sheet-portal.tsx +0 -62
- package/src/components/sheet/sheet.tsx +0 -165
- package/src/components/sheet/use-sheet-focus.ts +0 -109
- package/src/components/sidebar/sidebar.tsx +0 -102
- package/src/components/skeleton/skeleton.tsx +0 -38
- package/src/components/slider/slider.tsx +0 -134
- package/src/components/slosh-slider/liquid-step.ts +0 -43
- package/src/components/slosh-slider/slosh-slider.tsx +0 -294
- package/src/components/stat-tile/index.ts +0 -1
- package/src/components/stat-tile/stat-tile.tsx +0 -90
- package/src/components/status-indicator/status-indicator.tsx +0 -54
- package/src/components/stepper/rolling-digit.tsx +0 -91
- package/src/components/stepper/stepper.tsx +0 -136
- package/src/components/swatch-picker/swatch-picker.tsx +0 -138
- package/src/components/tab-bar/tab-bar.tsx +0 -182
- package/src/components/tab-view/tab-view.tsx +0 -155
- package/src/components/table/table.tsx +0 -151
- package/src/components/text-editor/text-editor.tsx +0 -42
- package/src/components/text-field/text-field.tsx +0 -200
- package/src/components/toast/toast-store.ts +0 -164
- package/src/components/toast/toaster.tsx +0 -407
- package/src/components/toggle/toggle.tsx +0 -320
- package/src/components/tooltip/tooltip-host.tsx +0 -178
- package/src/components/view-controller/index.ts +0 -1
- package/src/components/view-controller/view-controller.tsx +0 -75
- package/src/components/wake-slider/wake-slider.tsx +0 -260
- package/src/hooks/use-anchored-disclosure.ts +0 -23
- package/src/hooks/use-anchored-placement.ts +0 -40
- package/src/hooks/use-dismiss.ts +0 -44
- package/src/hooks/use-floating-dismiss.ts +0 -30
- package/src/hooks/use-media-query.ts +0 -94
- package/src/hooks/use-minimize-on-scroll.ts +0 -77
- package/src/hooks/viewport/types.ts +0 -19
- package/src/hooks/viewport/viewport-metrics.ts +0 -19
- package/src/icons/icons.tsx +0 -458
- package/src/index.ts +0 -107
- package/src/lib/anchored-placement.ts +0 -91
- package/src/lib/class-names.ts +0 -21
- package/src/lib/clipboard.ts +0 -15
- package/src/lib/date.ts +0 -86
- package/src/lib/floating-layers.ts +0 -53
- package/src/lib/haptics.ts +0 -23
- package/src/lib/language.ts +0 -16
- package/src/lib/range-value.ts +0 -38
- package/src/lib/screen-edges.ts +0 -44
- package/src/lib/shapes.ts +0 -59
- package/src/machines/popover.machine.ts +0 -51
- package/src/motion/transitions.ts +0 -97
- package/src/tokens.ts +0 -1
- /package/dist/{types/src/tokens.d.ts → tokens.js} +0 -0
package/src/lib/date.ts
DELETED
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
// Dates through the platform's own Intl, no date library in the bundle.
|
|
2
|
-
// en-US on purpose: the server renders first, so a viewer-specific locale
|
|
3
|
-
// would make server and browser disagree on hydration.
|
|
4
|
-
const LOCALE = "en-US";
|
|
5
|
-
|
|
6
|
-
const PRESETS = {
|
|
7
|
-
/** Aug 30, 2026 */
|
|
8
|
-
PP: { dateStyle: "medium" },
|
|
9
|
-
/** August 30, 2026 */
|
|
10
|
-
PPP: { dateStyle: "long" },
|
|
11
|
-
/** Aug 30, 2026, 2:15 PM */
|
|
12
|
-
PPp: { dateStyle: "medium", timeStyle: "short" },
|
|
13
|
-
/** August 30, 2026 at 2:15 PM */
|
|
14
|
-
PPPp: { dateStyle: "long", timeStyle: "short" },
|
|
15
|
-
/** Aug 30 */
|
|
16
|
-
"MMM d": { month: "short", day: "numeric" },
|
|
17
|
-
/** Aug 30, 14:15 */
|
|
18
|
-
"MMM d, HH:mm": {
|
|
19
|
-
month: "short",
|
|
20
|
-
day: "numeric",
|
|
21
|
-
hour: "2-digit",
|
|
22
|
-
minute: "2-digit",
|
|
23
|
-
hourCycle: "h23",
|
|
24
|
-
},
|
|
25
|
-
/** Aug 30, 14:15:09 */
|
|
26
|
-
"MMM d, HH:mm:ss": {
|
|
27
|
-
month: "short",
|
|
28
|
-
day: "numeric",
|
|
29
|
-
hour: "2-digit",
|
|
30
|
-
minute: "2-digit",
|
|
31
|
-
second: "2-digit",
|
|
32
|
-
hourCycle: "h23",
|
|
33
|
-
},
|
|
34
|
-
} satisfies Record<string, Intl.DateTimeFormatOptions>;
|
|
35
|
-
|
|
36
|
-
export type DatePreset = keyof typeof PRESETS;
|
|
37
|
-
|
|
38
|
-
const formatters = new Map<string, Intl.DateTimeFormat>();
|
|
39
|
-
|
|
40
|
-
function formatter(key: string, options: Intl.DateTimeFormatOptions) {
|
|
41
|
-
let cached = formatters.get(key);
|
|
42
|
-
if (!cached) {
|
|
43
|
-
cached = new Intl.DateTimeFormat(LOCALE, options);
|
|
44
|
-
formatters.set(key, cached);
|
|
45
|
-
}
|
|
46
|
-
return cached;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
/** A stored UTC timestamp shown as its UTC wall-clock time, whatever the viewer's timezone. */
|
|
50
|
-
export function formatUtc(date: Date | string | number, preset: DatePreset) {
|
|
51
|
-
return formatter(`utc:${preset}`, {
|
|
52
|
-
...PRESETS[preset],
|
|
53
|
-
timeZone: "UTC",
|
|
54
|
-
}).format(new Date(date));
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
/** The viewer's local time of day, like 2:15 PM. */
|
|
58
|
-
export function formatTime(date: Date | string | number) {
|
|
59
|
-
return formatter("local:time", {
|
|
60
|
-
timeStyle: "short",
|
|
61
|
-
}).format(new Date(date));
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
const UNITS: [Intl.RelativeTimeFormatUnit, number][] = [
|
|
65
|
-
["year", 31_536_000],
|
|
66
|
-
["month", 2_592_000],
|
|
67
|
-
["week", 604_800],
|
|
68
|
-
["day", 86_400],
|
|
69
|
-
["hour", 3_600],
|
|
70
|
-
["minute", 60],
|
|
71
|
-
];
|
|
72
|
-
|
|
73
|
-
let relative: Intl.RelativeTimeFormat | undefined;
|
|
74
|
-
|
|
75
|
-
/** "5 minutes ago", "in 30 days": the largest whole unit that fits. */
|
|
76
|
-
export function fromNow(date: Date | string | number) {
|
|
77
|
-
relative ??= new Intl.RelativeTimeFormat(LOCALE, {
|
|
78
|
-
numeric: "auto",
|
|
79
|
-
});
|
|
80
|
-
const seconds = (new Date(date).getTime() - Date.now()) / 1000;
|
|
81
|
-
for (const [unit, size] of UNITS) {
|
|
82
|
-
if (Math.abs(seconds) >= size)
|
|
83
|
-
return relative.format(Math.round(seconds / size), unit);
|
|
84
|
-
}
|
|
85
|
-
return relative.format(0, "second");
|
|
86
|
-
}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
export const FLOATING_LAYER = "data-floating-layer";
|
|
2
|
-
|
|
3
|
-
const anchors = new WeakMap<Element, Element>();
|
|
4
|
-
|
|
5
|
-
/** Portals retain the ownership of the control that opened them. */
|
|
6
|
-
export function registerFloatingLayer(
|
|
7
|
-
layer: Element,
|
|
8
|
-
anchor: Element,
|
|
9
|
-
): () => void {
|
|
10
|
-
anchors.set(layer, anchor);
|
|
11
|
-
return () => anchors.delete(layer);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export function ownsFloatingLayer(
|
|
15
|
-
container: Element,
|
|
16
|
-
target: Element | null,
|
|
17
|
-
): boolean {
|
|
18
|
-
let layer = target?.closest(`[${FLOATING_LAYER}]`);
|
|
19
|
-
const visited = new Set<Element>();
|
|
20
|
-
while (layer && !visited.has(layer)) {
|
|
21
|
-
visited.add(layer);
|
|
22
|
-
const anchor = anchors.get(layer);
|
|
23
|
-
if (!anchor) return false;
|
|
24
|
-
if (container.contains(anchor)) return true;
|
|
25
|
-
layer = anchor.closest(`[${FLOATING_LAYER}]`);
|
|
26
|
-
}
|
|
27
|
-
return false;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/** An element belongs to a surface either directly or through a portaled child layer. */
|
|
31
|
-
export function belongsToFloatingSurface(
|
|
32
|
-
surface: Element,
|
|
33
|
-
target: Element | null,
|
|
34
|
-
): boolean {
|
|
35
|
-
return Boolean(
|
|
36
|
-
target && (surface.contains(target) || ownsFloatingLayer(surface, target)),
|
|
37
|
-
);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
/** Whether a pointer target is outside both an anchored surface and its nested portals. */
|
|
41
|
-
export function isOutsideFloatingSurface(
|
|
42
|
-
surface: Element | null,
|
|
43
|
-
anchor: Element,
|
|
44
|
-
target: EventTarget | null,
|
|
45
|
-
): boolean {
|
|
46
|
-
if (!target || !("closest" in target) || !("contains" in target))
|
|
47
|
-
return false;
|
|
48
|
-
const element = target as Element;
|
|
49
|
-
return (
|
|
50
|
-
!anchor.contains(element) &&
|
|
51
|
-
(!surface || !belongsToFloatingSurface(surface, element))
|
|
52
|
-
);
|
|
53
|
-
}
|
package/src/lib/haptics.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/** The feedback kinds the systems share, from a selection tick to an error. */
|
|
2
|
-
export type HapticKind =
|
|
3
|
-
| "selection"
|
|
4
|
-
| "light"
|
|
5
|
-
| "medium"
|
|
6
|
-
| "heavy"
|
|
7
|
-
| "success"
|
|
8
|
-
| "warning"
|
|
9
|
-
| "error";
|
|
10
|
-
|
|
11
|
-
let player: (kind: HapticKind) => void = () => {};
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Components only ask for feedback; the app decides how it plays on this
|
|
15
|
-
* device (system haptics, a vibration, or nothing) and whether it's on.
|
|
16
|
-
*/
|
|
17
|
-
export function setHapticPlayer(next: (kind: HapticKind) => void): void {
|
|
18
|
-
player = next;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export function haptic(kind: HapticKind): void {
|
|
22
|
-
player(kind);
|
|
23
|
-
}
|
package/src/lib/language.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/** A language's name in itself, capitalized: "Français", "中文". */
|
|
2
|
-
export function getNativeLanguageName(tag: string) {
|
|
3
|
-
const name = new Intl.DisplayNames([tag], {
|
|
4
|
-
type: "language",
|
|
5
|
-
}).of(tag);
|
|
6
|
-
return name ? name.charAt(0).toUpperCase() + name.slice(1) : tag;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
/** A language's name as read in `displayLocale`: "French" in English. */
|
|
10
|
-
export function getLocalizedLanguageName(tag: string, displayLocale: string) {
|
|
11
|
-
return (
|
|
12
|
-
new Intl.DisplayNames([displayLocale], {
|
|
13
|
-
type: "language",
|
|
14
|
-
}).of(tag) ?? tag
|
|
15
|
-
);
|
|
16
|
-
}
|
package/src/lib/range-value.ts
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/** Keep controlled numeric inputs within finite bounds without floating-point drift. */
|
|
2
|
-
export function clampRange(value: number, min: number, max: number): number {
|
|
3
|
-
if (!Number.isFinite(value)) return min;
|
|
4
|
-
return Math.min(max, Math.max(min, value));
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
/** The nearest reachable step from min, optionally allowing an exact maximum. */
|
|
8
|
-
export function stepRange(
|
|
9
|
-
value: number,
|
|
10
|
-
direction: -1 | 1,
|
|
11
|
-
min: number,
|
|
12
|
-
max: number,
|
|
13
|
-
step: number,
|
|
14
|
-
): number {
|
|
15
|
-
const precision = Math.min(
|
|
16
|
-
12,
|
|
17
|
-
Math.max(0, ...[min, max, step].map(decimalPlaces)),
|
|
18
|
-
);
|
|
19
|
-
const factor = 10 ** precision;
|
|
20
|
-
const low = Math.round(min * factor);
|
|
21
|
-
const high = Math.round(max * factor);
|
|
22
|
-
const increment = Math.max(1, Math.round(step * factor));
|
|
23
|
-
const current = Math.round(clampRange(value, min, max) * factor);
|
|
24
|
-
const next =
|
|
25
|
-
direction > 0
|
|
26
|
-
? low + (Math.floor((current - low) / increment) + 1) * increment
|
|
27
|
-
: low + (Math.ceil((current - low) / increment) - 1) * increment;
|
|
28
|
-
return clampRange(Math.min(high, Math.max(low, next)) / factor, min, max);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
function decimalPlaces(value: number): number {
|
|
32
|
-
const text = String(value);
|
|
33
|
-
const [mantissa, exponent] = text.toLowerCase().split("e");
|
|
34
|
-
return Math.max(
|
|
35
|
-
0,
|
|
36
|
-
(mantissa?.split(".")[1]?.length ?? 0) - Number(exponent ?? 0),
|
|
37
|
-
);
|
|
38
|
-
}
|
package/src/lib/screen-edges.ts
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
export interface ScreenEdges {
|
|
2
|
-
top: number;
|
|
3
|
-
right: number;
|
|
4
|
-
bottom: number;
|
|
5
|
-
left: number;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
let probe: HTMLDivElement | undefined;
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* How far menus and popovers keep from each side of the screen: clear of
|
|
12
|
-
* the status bar, gesture bar and notch, and on touch screens a little
|
|
13
|
-
* further from the glass, as the systems' own menus are.
|
|
14
|
-
*/
|
|
15
|
-
export function screenEdges(): ScreenEdges {
|
|
16
|
-
const margin =
|
|
17
|
-
typeof window !== "undefined" &&
|
|
18
|
-
window.matchMedia("(pointer: coarse)").matches
|
|
19
|
-
? 12
|
|
20
|
-
: 8;
|
|
21
|
-
if (typeof document === "undefined") {
|
|
22
|
-
return {
|
|
23
|
-
top: margin,
|
|
24
|
-
right: margin,
|
|
25
|
-
bottom: margin,
|
|
26
|
-
left: margin,
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
if (!probe) {
|
|
30
|
-
probe = document.createElement("div");
|
|
31
|
-
probe.setAttribute("aria-hidden", "true");
|
|
32
|
-
probe.style.cssText =
|
|
33
|
-
"position:fixed;inset:0;visibility:hidden;pointer-events:none;" +
|
|
34
|
-
"padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)";
|
|
35
|
-
}
|
|
36
|
-
if (!probe.isConnected) document.body.appendChild(probe);
|
|
37
|
-
const style = getComputedStyle(probe);
|
|
38
|
-
return {
|
|
39
|
-
top: Number.parseFloat(style.paddingTop) + margin,
|
|
40
|
-
right: Number.parseFloat(style.paddingRight) + margin,
|
|
41
|
-
bottom: Number.parseFloat(style.paddingBottom) + margin,
|
|
42
|
-
left: Number.parseFloat(style.paddingLeft) + margin,
|
|
43
|
-
};
|
|
44
|
-
}
|
package/src/lib/shapes.ts
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
/** Material 3 expressive outlines: a circle and the scalloped "cookie", "clover", and "sunny" shapes. */
|
|
2
|
-
export const shapes = [
|
|
3
|
-
"circle",
|
|
4
|
-
"cookie4",
|
|
5
|
-
"cookie6",
|
|
6
|
-
"cookie9",
|
|
7
|
-
"clover",
|
|
8
|
-
"sunny",
|
|
9
|
-
/** Reserved for the Pherus mark itself, so it never matches a project's icon. */
|
|
10
|
-
"cookie12",
|
|
11
|
-
] as const;
|
|
12
|
-
|
|
13
|
-
export type Shape = (typeof shapes)[number];
|
|
14
|
-
|
|
15
|
-
/** Lobe count and wave depth (as a fraction of the radius) for each wavy shape. */
|
|
16
|
-
const waves: Record<
|
|
17
|
-
Exclude<Shape, "circle">,
|
|
18
|
-
{ lobes: number; depth: number }
|
|
19
|
-
> = {
|
|
20
|
-
cookie4: { lobes: 4, depth: 0.08 },
|
|
21
|
-
cookie6: { lobes: 6, depth: 0.07 },
|
|
22
|
-
cookie9: { lobes: 9, depth: 0.055 },
|
|
23
|
-
clover: { lobes: 4, depth: 0.16 },
|
|
24
|
-
sunny: { lobes: 8, depth: 0.045 },
|
|
25
|
-
cookie12: { lobes: 12, depth: 0.04 },
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
const STEPS = 144;
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* An SVG path for a Material 3 expressive shape centred on (cx, cy): a circle
|
|
32
|
-
* whose radius rides a cosine wave, which gives the soft scalloped "cookie",
|
|
33
|
-
* "clover", and "sunny" outlines. The wave is normalised so every shape fills
|
|
34
|
-
* the same `r`, keeping icons optically the same size.
|
|
35
|
-
*/
|
|
36
|
-
export function shapePath(shape: Shape, cx: number, cy: number, r: number) {
|
|
37
|
-
if (shape === "circle") {
|
|
38
|
-
return `M ${cx - r} ${cy} a ${r} ${r} 0 1 0 ${r * 2} 0 a ${r} ${r} 0 1 0 ${-r * 2} 0 Z`;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
const { lobes, depth } = waves[shape];
|
|
42
|
-
const base = r / (1 + depth);
|
|
43
|
-
const points: string[] = [];
|
|
44
|
-
for (let i = 0; i < STEPS; i++) {
|
|
45
|
-
const theta = (i / STEPS) * Math.PI * 2 - Math.PI / 2;
|
|
46
|
-
const radius = base * (1 + depth * Math.cos(lobes * (theta + Math.PI / 2)));
|
|
47
|
-
const x = cx + radius * Math.cos(theta);
|
|
48
|
-
const y = cy + radius * Math.sin(theta);
|
|
49
|
-
points.push(`${i === 0 ? "M" : "L"} ${x.toFixed(2)} ${y.toFixed(2)}`);
|
|
50
|
-
}
|
|
51
|
-
return `${points.join(" ")} Z`;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* The app wide `dualTone` rule dims every svg path for two tone icons; a
|
|
56
|
-
* drawn shape or illustration opts out with this so its colors stay true.
|
|
57
|
-
*/
|
|
58
|
-
export const plainSvg =
|
|
59
|
-
"cursor-[inherit] [&_path]:opacity-100 [&_path]:transform-none";
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Popover state machine — pure function, no React, no DOM.
|
|
3
|
-
*
|
|
4
|
-
* Translates directly to a Rust enum with match arms.
|
|
5
|
-
*
|
|
6
|
-
* States:
|
|
7
|
-
* closed → nothing visible
|
|
8
|
-
* opening → surface morphing from trigger to content
|
|
9
|
-
* open → content fully visible
|
|
10
|
-
* closing → surface morphing back to trigger
|
|
11
|
-
*
|
|
12
|
-
* The OPENED/CLOSED events are fired by onAnimationComplete,
|
|
13
|
-
* so the machine stays in "opening"/"closing" until the animation
|
|
14
|
-
* actually finishes — enabling interruptibility (close during open).
|
|
15
|
-
*/
|
|
16
|
-
export type PopoverState = "closed" | "opening" | "open" | "closing";
|
|
17
|
-
|
|
18
|
-
export type PopoverEvent = "OPEN" | "OPENED" | "CLOSE" | "CLOSED" | "TOGGLE";
|
|
19
|
-
|
|
20
|
-
export function popoverMachine(
|
|
21
|
-
state: PopoverState,
|
|
22
|
-
event: PopoverEvent,
|
|
23
|
-
): PopoverState {
|
|
24
|
-
switch (state) {
|
|
25
|
-
case "closed":
|
|
26
|
-
return event === "OPEN" || event === "TOGGLE" ? "opening" : "closed";
|
|
27
|
-
case "opening":
|
|
28
|
-
if (event === "CLOSE" || event === "TOGGLE") return "closing";
|
|
29
|
-
if (event === "OPENED") return "open";
|
|
30
|
-
return "opening";
|
|
31
|
-
case "open":
|
|
32
|
-
return event === "CLOSE" || event === "TOGGLE" ? "closing" : "open";
|
|
33
|
-
case "closing":
|
|
34
|
-
if (event === "OPEN" || event === "TOGGLE") return "opening";
|
|
35
|
-
if (event === "CLOSED") return "closed";
|
|
36
|
-
return "closing";
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export type PopoverContextValue = {
|
|
41
|
-
state: PopoverState;
|
|
42
|
-
send: (event: PopoverEvent) => void;
|
|
43
|
-
/** The trigger element — set by PopoverTrigger, read by PopoverContent for positioning. */
|
|
44
|
-
triggerRef: React.RefObject<HTMLElement | null>;
|
|
45
|
-
/** Unique ID for aria-controls + layoutId morphing. */
|
|
46
|
-
contentId: string;
|
|
47
|
-
/** Shared layoutId for motion's matched-geometry transition. */
|
|
48
|
-
surfaceId: string;
|
|
49
|
-
/** Whether the popover is open or transitioning (not closed). */
|
|
50
|
-
isPresent: boolean;
|
|
51
|
-
};
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import { springs } from "@passui/tokens/motion";
|
|
2
|
-
import type { Transition } from "motion/react";
|
|
3
|
-
|
|
4
|
-
/** Design-token springs as motion/react transitions. */
|
|
5
|
-
export const spring = {
|
|
6
|
-
smooth: { type: "spring", ...springs.smooth },
|
|
7
|
-
snappy: { type: "spring", ...springs.snappy },
|
|
8
|
-
bouncy: { type: "spring", ...springs.bouncy },
|
|
9
|
-
} as const satisfies Record<keyof typeof springs, Transition>;
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Apple's fluid overshoot: cubic-bezier(0.34, 1.56, 0.1, 1).
|
|
13
|
-
* Replaces traditional ease profiles with an authentic fluid bounce
|
|
14
|
-
* that overshoots and settles, matching Apple's custom interface physics.
|
|
15
|
-
* Used for zoom/matched-geometry transitions where the surface emerges
|
|
16
|
-
* from the trigger and snaps into place with a physical bounce.
|
|
17
|
-
*/
|
|
18
|
-
export const fluidOvershoot = {
|
|
19
|
-
duration: 0.4,
|
|
20
|
-
ease: [0.34, 1.56, 0.1, 1] as [number, number, number, number],
|
|
21
|
-
} as const;
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Exit motion: content collapses back toward its source.
|
|
25
|
-
* The surface shrinks toward the trigger's position while fading,
|
|
26
|
-
* like a water drop absorbing back into its origin.
|
|
27
|
-
*/
|
|
28
|
-
export const fluidCollapse = {
|
|
29
|
-
duration: 0.28,
|
|
30
|
-
ease: [0.4, 0, 0.6, 1] as [number, number, number, number],
|
|
31
|
-
} as const;
|
|
32
|
-
|
|
33
|
-
export type FloatingPanelSide = "above" | "below";
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Anchored panels settle toward their source without shrinking their text.
|
|
37
|
-
* Now uses origin-based scaling: the panel grows from the trigger's
|
|
38
|
-
* position (transform-origin set by the caller) with a scale + opacity
|
|
39
|
-
* crossfade, rather than a plain slide.
|
|
40
|
-
*/
|
|
41
|
-
export function floatingPanelMotion(side: FloatingPanelSide = "below") {
|
|
42
|
-
const direction = side === "above" ? 1 : -1;
|
|
43
|
-
return {
|
|
44
|
-
initial: { opacity: 0, scale: 0.92, y: direction * 6 },
|
|
45
|
-
animate: { opacity: 1, scale: 1, y: 0 },
|
|
46
|
-
exit: { opacity: 0, scale: 0.95, y: direction * 4 },
|
|
47
|
-
transition: {
|
|
48
|
-
...fluidOvershoot,
|
|
49
|
-
opacity: {
|
|
50
|
-
duration: 0.16,
|
|
51
|
-
ease: [0.4, 0, 0.2, 1] as [number, number, number, number],
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
} as const;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
/** Default below-anchor presentation, retained for existing consumers. */
|
|
58
|
-
export const popoverMotion = floatingPanelMotion();
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* Zoom/matched-geometry transition for dialogs and center-placed sheets.
|
|
62
|
-
* The surface starts small (scale 0.88) and invisible, then grows to
|
|
63
|
-
* full size with the fluid overshoot bounce. Content elements inside
|
|
64
|
-
* crossfade in slightly delayed so they phase into visibility
|
|
65
|
-
* asynchronously — not a harsh switch.
|
|
66
|
-
*/
|
|
67
|
-
export const zoomReveal = {
|
|
68
|
-
initial: { opacity: 0, scale: 0.88 },
|
|
69
|
-
animate: { opacity: 1, scale: 1 },
|
|
70
|
-
exit: { opacity: 0, scale: 0.92 },
|
|
71
|
-
transition: fluidOvershoot,
|
|
72
|
-
} as const;
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* Content crossfade for elements inside an overlay.
|
|
76
|
-
* Rather than a harsh switch, sub-elements scale and phase into
|
|
77
|
-
* visibility asynchronously. Use for children of dialogs, sheets,
|
|
78
|
-
* and popovers — the container arrives first, then content fades in.
|
|
79
|
-
*/
|
|
80
|
-
export const contentCrossfade = {
|
|
81
|
-
initial: { opacity: 0, scale: 0.96 },
|
|
82
|
-
animate: { opacity: 1, scale: 1 },
|
|
83
|
-
exit: { opacity: 0, scale: 0.98 },
|
|
84
|
-
transition: {
|
|
85
|
-
duration: 0.24,
|
|
86
|
-
ease: [0.4, 0, 0.2, 1] as [number, number, number, number],
|
|
87
|
-
delay: 0.04,
|
|
88
|
-
},
|
|
89
|
-
} as const;
|
|
90
|
-
|
|
91
|
-
/** Floating bars that rise from the bottom edge. */
|
|
92
|
-
export const riseMotion = {
|
|
93
|
-
initial: { opacity: 0, y: 32 },
|
|
94
|
-
animate: { opacity: 1, y: 0 },
|
|
95
|
-
exit: { opacity: 0, y: 24 },
|
|
96
|
-
transition: spring.smooth,
|
|
97
|
-
} as const;
|
package/src/tokens.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "@passui/tokens";
|
|
File without changes
|