panelui-native 0.116.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/module/components/accordion/index.js.map +1 -1
- package/lib/module/components/ai-input/index.js.map +1 -1
- package/lib/module/components/alert/index.js.map +1 -1
- package/lib/module/components/animated-badge/index.js +1 -2
- package/lib/module/components/animated-badge/index.js.map +1 -1
- package/lib/module/components/attachment/index.js.map +1 -1
- package/lib/module/components/avatar/index.js.map +1 -1
- package/lib/module/components/avatar-cropper/index.js.map +1 -1
- package/lib/module/components/badge/index.js.map +1 -1
- package/lib/module/components/breadcrumb/index.js.map +1 -1
- package/lib/module/components/button/index.js.map +1 -1
- package/lib/module/components/button-group/index.js.map +1 -1
- package/lib/module/components/calendar/index.js.map +1 -1
- package/lib/module/components/card/index.js.map +1 -1
- package/lib/module/components/checkbox/index.js.map +1 -1
- package/lib/module/components/chip/index.js.map +1 -1
- package/lib/module/components/collapsible/index.js.map +1 -1
- package/lib/module/components/color-picker/index.js +13 -5
- package/lib/module/components/color-picker/index.js.map +1 -1
- package/lib/module/components/combobox/index.js +1 -2
- package/lib/module/components/combobox/index.js.map +1 -1
- package/lib/module/components/context-menu/index.js +1 -2
- package/lib/module/components/context-menu/index.js.map +1 -1
- package/lib/module/components/countdown/index.js.map +1 -1
- package/lib/module/components/dialog/index.js.map +1 -1
- package/lib/module/components/empty-state/index.js.map +1 -1
- package/lib/module/components/fab/index.js +2 -1
- package/lib/module/components/fab/index.js.map +1 -1
- package/lib/module/components/feedback/index.js +1 -2
- package/lib/module/components/feedback/index.js.map +1 -1
- package/lib/module/components/field/index.js.map +1 -1
- package/lib/module/components/file-upload/index.js.map +1 -1
- package/lib/module/components/flip-card/index.js +1 -2
- package/lib/module/components/flip-card/index.js.map +1 -1
- package/lib/module/components/frame/index.js +1 -2
- package/lib/module/components/frame/index.js.map +1 -1
- package/lib/module/components/grid-item/index.js.map +1 -1
- package/lib/module/components/heatmap-chart/index.js +1 -2
- package/lib/module/components/heatmap-chart/index.js.map +1 -1
- package/lib/module/components/image-viewer/index.js +1 -2
- package/lib/module/components/image-viewer/index.js.map +1 -1
- package/lib/module/components/input/index.js +1 -2
- package/lib/module/components/input/index.js.map +1 -1
- package/lib/module/components/input-group/index.js.map +1 -1
- package/lib/module/components/item/index.js.map +1 -1
- package/lib/module/components/kpi/index.js +1 -2
- package/lib/module/components/kpi/index.js.map +1 -1
- package/lib/module/components/label/index.js.map +1 -1
- package/lib/module/components/leaderboard/index.js.map +1 -1
- package/lib/module/components/live-line-chart/index.js +1 -1
- package/lib/module/components/live-line-chart/index.js.map +1 -1
- package/lib/module/components/map/native-style.js +38 -7
- package/lib/module/components/map/native-style.js.map +1 -1
- package/lib/module/components/markdown-editor/index.js.map +1 -1
- package/lib/module/components/marker/index.js.map +1 -1
- package/lib/module/components/marquee/index.js +2 -1
- package/lib/module/components/marquee/index.js.map +1 -1
- package/lib/module/components/message/index.js.map +1 -1
- package/lib/module/components/message-scroller/index.js +2 -3
- package/lib/module/components/message-scroller/index.js.map +1 -1
- package/lib/module/components/meter/index.js.map +1 -1
- package/lib/module/components/number-input/index.js +1 -2
- package/lib/module/components/number-input/index.js.map +1 -1
- package/lib/module/components/otp-input/index.js +1 -2
- package/lib/module/components/otp-input/index.js.map +1 -1
- package/lib/module/components/page-header/index.js +1 -2
- package/lib/module/components/page-header/index.js.map +1 -1
- package/lib/module/components/pagination/index.js.map +1 -1
- package/lib/module/components/panelside/index.js +8 -7
- package/lib/module/components/panelside/index.js.map +1 -1
- package/lib/module/components/planner/index.js +1 -2
- package/lib/module/components/planner/index.js.map +1 -1
- package/lib/module/components/popover/index.js +1 -2
- package/lib/module/components/popover/index.js.map +1 -1
- package/lib/module/components/post/index.js +1 -2
- package/lib/module/components/post/index.js.map +1 -1
- package/lib/module/components/progress/index.js.map +1 -1
- package/lib/module/components/progress-button/index.js +1 -2
- package/lib/module/components/progress-button/index.js.map +1 -1
- package/lib/module/components/qr-code/index.js.map +1 -1
- package/lib/module/components/questionnaire/index.js +1 -2
- package/lib/module/components/questionnaire/index.js.map +1 -1
- package/lib/module/components/radio-group/index.js.map +1 -1
- package/lib/module/components/rating/index.js +1 -2
- package/lib/module/components/rating/index.js.map +1 -1
- package/lib/module/components/scroll-header/index.js +5 -4
- package/lib/module/components/scroll-header/index.js.map +1 -1
- package/lib/module/components/search-bar/index.js +1 -2
- package/lib/module/components/search-bar/index.js.map +1 -1
- package/lib/module/components/section-progress/index.js +3 -2
- package/lib/module/components/section-progress/index.js.map +1 -1
- package/lib/module/components/select/index.js.map +1 -1
- package/lib/module/components/separator/index.js.map +1 -1
- package/lib/module/components/shimmer/index.js +8 -1
- package/lib/module/components/shimmer/index.js.map +1 -1
- package/lib/module/components/signature/index.js.map +1 -1
- package/lib/module/components/sketch/index.js.map +1 -1
- package/lib/module/components/slide-button/index.js +1 -2
- package/lib/module/components/slide-button/index.js.map +1 -1
- package/lib/module/components/slider/index.js +1 -2
- package/lib/module/components/slider/index.js.map +1 -1
- package/lib/module/components/sortable/index.js +6 -7
- package/lib/module/components/sortable/index.js.map +1 -1
- package/lib/module/components/splitter/index.js +3 -2
- package/lib/module/components/splitter/index.js.map +1 -1
- package/lib/module/components/stack-card/index.js +3 -2
- package/lib/module/components/stack-card/index.js.map +1 -1
- package/lib/module/components/steps/index.js.map +1 -1
- package/lib/module/components/support/index.js.map +1 -1
- package/lib/module/components/surface/index.js.map +1 -1
- package/lib/module/components/swipe/index.js.map +1 -1
- package/lib/module/components/switch/index.js.map +1 -1
- package/lib/module/components/table/index.js +1 -2
- package/lib/module/components/table/index.js.map +1 -1
- package/lib/module/components/tabs/index.js +2 -1
- package/lib/module/components/tabs/index.js.map +1 -1
- package/lib/module/components/tag-input/index.js +1 -2
- package/lib/module/components/tag-input/index.js.map +1 -1
- package/lib/module/components/text-animation/index.js +2 -1
- package/lib/module/components/text-animation/index.js.map +1 -1
- package/lib/module/components/textarea/index.js +1 -2
- package/lib/module/components/textarea/index.js.map +1 -1
- package/lib/module/components/time-picker/index.js.map +1 -1
- package/lib/module/components/timeline/index.js.map +1 -1
- package/lib/module/components/toast/index.js +1 -0
- package/lib/module/components/toast/index.js.map +1 -1
- package/lib/module/components/toggle-button/index.js.map +1 -1
- package/lib/module/components/tooltip/index.js +1 -2
- package/lib/module/components/tooltip/index.js.map +1 -1
- package/lib/module/components/tour/index.js.map +1 -1
- package/lib/module/components/tree/index.js +2 -1
- package/lib/module/components/tree/index.js.map +1 -1
- package/lib/module/components/typography/index.js.map +1 -1
- package/lib/module/hooks/use-keyboard-avoidance.js +0 -1
- package/lib/module/hooks/use-keyboard-avoidance.js.map +1 -1
- package/lib/module/hooks/use-reveal-progress.js.map +1 -1
- package/lib/module/hooks/use-scroll-sections.js.map +1 -1
- package/lib/module/icons/index.js +22 -1
- package/lib/module/icons/index.js.map +1 -1
- package/lib/module/index.js +4 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/primitives/animated-pressable.js.map +1 -1
- package/lib/module/primitives/chart-accessibility.js +9 -1
- package/lib/module/primitives/chart-accessibility.js.map +1 -1
- package/lib/module/primitives/glass.js.map +1 -1
- package/lib/module/primitives/refs.js +4 -0
- package/lib/module/primitives/refs.js.map +1 -0
- package/lib/module/primitives/scroll-progress.js.map +1 -1
- package/lib/module/primitives/text.js.map +1 -1
- package/lib/module/primitives/web-deps.js +17 -0
- package/lib/module/primitives/web-deps.js.map +1 -0
- package/lib/module/uniwind-env.d.ts +1 -0
- package/lib/typescript/src/components/accordion/index.d.ts +8 -7
- package/lib/typescript/src/components/accordion/index.d.ts.map +1 -1
- package/lib/typescript/src/components/ai-input/index.d.ts.map +1 -1
- package/lib/typescript/src/components/alert/index.d.ts +9 -8
- package/lib/typescript/src/components/alert/index.d.ts.map +1 -1
- package/lib/typescript/src/components/animated-badge/index.d.ts +5 -4
- package/lib/typescript/src/components/animated-badge/index.d.ts.map +1 -1
- package/lib/typescript/src/components/attachment/index.d.ts +10 -9
- package/lib/typescript/src/components/attachment/index.d.ts.map +1 -1
- package/lib/typescript/src/components/avatar/index.d.ts +7 -6
- package/lib/typescript/src/components/avatar/index.d.ts.map +1 -1
- package/lib/typescript/src/components/avatar-cropper/index.d.ts.map +1 -1
- package/lib/typescript/src/components/badge/index.d.ts +5 -4
- package/lib/typescript/src/components/badge/index.d.ts.map +1 -1
- package/lib/typescript/src/components/bottom-sheet/index.d.ts +1 -1
- package/lib/typescript/src/components/breadcrumb/index.d.ts +9 -8
- package/lib/typescript/src/components/breadcrumb/index.d.ts.map +1 -1
- package/lib/typescript/src/components/button/index.d.ts +4 -4
- package/lib/typescript/src/components/button/index.d.ts.map +1 -1
- package/lib/typescript/src/components/button-group/index.d.ts +5 -4
- package/lib/typescript/src/components/button-group/index.d.ts.map +1 -1
- package/lib/typescript/src/components/calendar/index.d.ts.map +1 -1
- package/lib/typescript/src/components/card/index.d.ts +16 -15
- package/lib/typescript/src/components/card/index.d.ts.map +1 -1
- package/lib/typescript/src/components/checkbox/index.d.ts +5 -4
- package/lib/typescript/src/components/checkbox/index.d.ts.map +1 -1
- package/lib/typescript/src/components/chip/index.d.ts +4 -4
- package/lib/typescript/src/components/chip/index.d.ts.map +1 -1
- package/lib/typescript/src/components/collapsible/index.d.ts +7 -6
- package/lib/typescript/src/components/collapsible/index.d.ts.map +1 -1
- package/lib/typescript/src/components/color-picker/index.d.ts +13 -13
- package/lib/typescript/src/components/color-picker/index.d.ts.map +1 -1
- package/lib/typescript/src/components/combobox/index.d.ts.map +1 -1
- package/lib/typescript/src/components/context-menu/index.d.ts.map +1 -1
- package/lib/typescript/src/components/countdown/index.d.ts +5 -4
- package/lib/typescript/src/components/countdown/index.d.ts.map +1 -1
- package/lib/typescript/src/components/dialog/index.d.ts +11 -10
- package/lib/typescript/src/components/dialog/index.d.ts.map +1 -1
- package/lib/typescript/src/components/empty-state/index.d.ts +12 -11
- package/lib/typescript/src/components/empty-state/index.d.ts.map +1 -1
- package/lib/typescript/src/components/fab/index.d.ts +7 -6
- package/lib/typescript/src/components/fab/index.d.ts.map +1 -1
- package/lib/typescript/src/components/feedback/index.d.ts +6 -5
- package/lib/typescript/src/components/feedback/index.d.ts.map +1 -1
- package/lib/typescript/src/components/field/index.d.ts +12 -11
- package/lib/typescript/src/components/field/index.d.ts.map +1 -1
- package/lib/typescript/src/components/file-upload/index.d.ts +5 -4
- package/lib/typescript/src/components/file-upload/index.d.ts.map +1 -1
- package/lib/typescript/src/components/flip-card/index.d.ts +5 -4
- package/lib/typescript/src/components/flip-card/index.d.ts.map +1 -1
- package/lib/typescript/src/components/frame/index.d.ts +14 -13
- package/lib/typescript/src/components/frame/index.d.ts.map +1 -1
- package/lib/typescript/src/components/grid-item/index.d.ts +30 -29
- package/lib/typescript/src/components/grid-item/index.d.ts.map +1 -1
- package/lib/typescript/src/components/heatmap-chart/index.d.ts +3 -2
- package/lib/typescript/src/components/heatmap-chart/index.d.ts.map +1 -1
- package/lib/typescript/src/components/image-viewer/index.d.ts.map +1 -1
- package/lib/typescript/src/components/input/index.d.ts +5 -4
- package/lib/typescript/src/components/input/index.d.ts.map +1 -1
- package/lib/typescript/src/components/input-group/index.d.ts +6 -5
- package/lib/typescript/src/components/input-group/index.d.ts.map +1 -1
- package/lib/typescript/src/components/item/index.d.ts +34 -33
- package/lib/typescript/src/components/item/index.d.ts.map +1 -1
- package/lib/typescript/src/components/kpi/index.d.ts +6 -5
- package/lib/typescript/src/components/kpi/index.d.ts.map +1 -1
- package/lib/typescript/src/components/label/index.d.ts +4 -3
- package/lib/typescript/src/components/label/index.d.ts.map +1 -1
- package/lib/typescript/src/components/leaderboard/index.d.ts +3 -2
- package/lib/typescript/src/components/leaderboard/index.d.ts.map +1 -1
- package/lib/typescript/src/components/live-line-chart/index.d.ts.map +1 -1
- package/lib/typescript/src/components/map/native-style.d.ts.map +1 -1
- package/lib/typescript/src/components/markdown-editor/index.d.ts +6 -5
- package/lib/typescript/src/components/markdown-editor/index.d.ts.map +1 -1
- package/lib/typescript/src/components/marker/index.d.ts +7 -6
- package/lib/typescript/src/components/marker/index.d.ts.map +1 -1
- package/lib/typescript/src/components/marquee/index.d.ts.map +1 -1
- package/lib/typescript/src/components/message/index.d.ts +13 -12
- package/lib/typescript/src/components/message/index.d.ts.map +1 -1
- package/lib/typescript/src/components/message-scroller/index.d.ts.map +1 -1
- package/lib/typescript/src/components/meter/index.d.ts +5 -4
- package/lib/typescript/src/components/meter/index.d.ts.map +1 -1
- package/lib/typescript/src/components/number-input/index.d.ts +5 -4
- package/lib/typescript/src/components/number-input/index.d.ts.map +1 -1
- package/lib/typescript/src/components/otp-input/index.d.ts +5 -4
- package/lib/typescript/src/components/otp-input/index.d.ts.map +1 -1
- package/lib/typescript/src/components/page-header/index.d.ts +15 -14
- package/lib/typescript/src/components/page-header/index.d.ts.map +1 -1
- package/lib/typescript/src/components/pagination/index.d.ts +9 -8
- package/lib/typescript/src/components/pagination/index.d.ts.map +1 -1
- package/lib/typescript/src/components/panelside/index.d.ts.map +1 -1
- package/lib/typescript/src/components/planner/index.d.ts +3 -2
- package/lib/typescript/src/components/planner/index.d.ts.map +1 -1
- package/lib/typescript/src/components/popover/index.d.ts.map +1 -1
- package/lib/typescript/src/components/post/index.d.ts +15 -14
- package/lib/typescript/src/components/post/index.d.ts.map +1 -1
- package/lib/typescript/src/components/progress/index.d.ts +5 -4
- package/lib/typescript/src/components/progress/index.d.ts.map +1 -1
- package/lib/typescript/src/components/progress-button/index.d.ts +5 -4
- package/lib/typescript/src/components/progress-button/index.d.ts.map +1 -1
- package/lib/typescript/src/components/qr-code/index.d.ts +11 -10
- package/lib/typescript/src/components/qr-code/index.d.ts.map +1 -1
- package/lib/typescript/src/components/questionnaire/index.d.ts +4 -3
- package/lib/typescript/src/components/questionnaire/index.d.ts.map +1 -1
- package/lib/typescript/src/components/radio-group/index.d.ts +6 -5
- package/lib/typescript/src/components/radio-group/index.d.ts.map +1 -1
- package/lib/typescript/src/components/rating/index.d.ts +4 -4
- package/lib/typescript/src/components/rating/index.d.ts.map +1 -1
- package/lib/typescript/src/components/scroll-header/index.d.ts +11 -10
- package/lib/typescript/src/components/scroll-header/index.d.ts.map +1 -1
- package/lib/typescript/src/components/search-bar/index.d.ts +5 -4
- package/lib/typescript/src/components/search-bar/index.d.ts.map +1 -1
- package/lib/typescript/src/components/section-progress/index.d.ts.map +1 -1
- package/lib/typescript/src/components/select/index.d.ts.map +1 -1
- package/lib/typescript/src/components/selection-mode/index.d.ts +2 -2
- package/lib/typescript/src/components/selection-mode/index.d.ts.map +1 -1
- package/lib/typescript/src/components/separator/index.d.ts +17 -16
- package/lib/typescript/src/components/separator/index.d.ts.map +1 -1
- package/lib/typescript/src/components/shimmer/index.d.ts.map +1 -1
- package/lib/typescript/src/components/signature/index.d.ts +2 -2
- package/lib/typescript/src/components/signature/index.d.ts.map +1 -1
- package/lib/typescript/src/components/sketch/index.d.ts.map +1 -1
- package/lib/typescript/src/components/slide-button/index.d.ts +5 -4
- package/lib/typescript/src/components/slide-button/index.d.ts.map +1 -1
- package/lib/typescript/src/components/slider/index.d.ts +4 -4
- package/lib/typescript/src/components/slider/index.d.ts.map +1 -1
- package/lib/typescript/src/components/sortable/index.d.ts.map +1 -1
- package/lib/typescript/src/components/spinner/index.d.ts +11 -11
- package/lib/typescript/src/components/spinner/index.d.ts.map +1 -1
- package/lib/typescript/src/components/splitter/index.d.ts.map +1 -1
- package/lib/typescript/src/components/stack-card/index.d.ts +11 -10
- package/lib/typescript/src/components/stack-card/index.d.ts.map +1 -1
- package/lib/typescript/src/components/steps/index.d.ts +9 -8
- package/lib/typescript/src/components/steps/index.d.ts.map +1 -1
- package/lib/typescript/src/components/support/index.d.ts +22 -21
- package/lib/typescript/src/components/support/index.d.ts.map +1 -1
- package/lib/typescript/src/components/surface/index.d.ts +35 -34
- package/lib/typescript/src/components/surface/index.d.ts.map +1 -1
- package/lib/typescript/src/components/swipe/index.d.ts +8 -7
- package/lib/typescript/src/components/swipe/index.d.ts.map +1 -1
- package/lib/typescript/src/components/switch/index.d.ts +5 -4
- package/lib/typescript/src/components/switch/index.d.ts.map +1 -1
- package/lib/typescript/src/components/table/index.d.ts +14 -13
- package/lib/typescript/src/components/table/index.d.ts.map +1 -1
- package/lib/typescript/src/components/tabs/index.d.ts.map +1 -1
- package/lib/typescript/src/components/tag-input/index.d.ts +5 -4
- package/lib/typescript/src/components/tag-input/index.d.ts.map +1 -1
- package/lib/typescript/src/components/text-animation/index.d.ts.map +1 -1
- package/lib/typescript/src/components/textarea/index.d.ts +5 -4
- package/lib/typescript/src/components/textarea/index.d.ts.map +1 -1
- package/lib/typescript/src/components/time-picker/index.d.ts.map +1 -1
- package/lib/typescript/src/components/timeline/index.d.ts +18 -17
- package/lib/typescript/src/components/timeline/index.d.ts.map +1 -1
- package/lib/typescript/src/components/toast/index.d.ts +2 -2
- package/lib/typescript/src/components/toast/index.d.ts.map +1 -1
- package/lib/typescript/src/components/toggle-button/index.d.ts +6 -5
- package/lib/typescript/src/components/toggle-button/index.d.ts.map +1 -1
- package/lib/typescript/src/components/tooltip/index.d.ts.map +1 -1
- package/lib/typescript/src/components/tour/index.d.ts.map +1 -1
- package/lib/typescript/src/components/tree/index.d.ts +10 -9
- package/lib/typescript/src/components/tree/index.d.ts.map +1 -1
- package/lib/typescript/src/components/typography/index.d.ts +101 -100
- package/lib/typescript/src/components/typography/index.d.ts.map +1 -1
- package/lib/typescript/src/hooks/use-keyboard-avoidance.d.ts +3 -2
- package/lib/typescript/src/hooks/use-keyboard-avoidance.d.ts.map +1 -1
- package/lib/typescript/src/hooks/use-reveal-progress.d.ts +2 -2
- package/lib/typescript/src/hooks/use-reveal-progress.d.ts.map +1 -1
- package/lib/typescript/src/hooks/use-scroll-sections.d.ts +3 -2
- package/lib/typescript/src/hooks/use-scroll-sections.d.ts.map +1 -1
- package/lib/typescript/src/icons/index.d.ts +40 -0
- package/lib/typescript/src/icons/index.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +1 -0
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/primitives/animated-pressable.d.ts +3 -2
- package/lib/typescript/src/primitives/animated-pressable.d.ts.map +1 -1
- package/lib/typescript/src/primitives/chart-accessibility.d.ts +5 -6
- package/lib/typescript/src/primitives/chart-accessibility.d.ts.map +1 -1
- package/lib/typescript/src/primitives/glass.d.ts +3 -2
- package/lib/typescript/src/primitives/glass.d.ts.map +1 -1
- package/lib/typescript/src/primitives/refs.d.ts +25 -0
- package/lib/typescript/src/primitives/refs.d.ts.map +1 -0
- package/lib/typescript/src/primitives/scroll-progress.d.ts.map +1 -1
- package/lib/typescript/src/primitives/text.d.ts +41 -40
- package/lib/typescript/src/primitives/text.d.ts.map +1 -1
- package/lib/typescript/src/primitives/web-deps.d.ts +11 -0
- package/lib/typescript/src/primitives/web-deps.d.ts.map +1 -0
- package/package.json +6 -6
- package/src/components/accordion/index.tsx +7 -6
- package/src/components/ai-input/index.tsx +2 -1
- package/src/components/alert/index.tsx +6 -5
- package/src/components/animated-badge/index.tsx +2 -1
- package/src/components/attachment/index.tsx +9 -8
- package/src/components/avatar/index.tsx +4 -3
- package/src/components/avatar-cropper/index.tsx +2 -1
- package/src/components/badge/index.tsx +2 -1
- package/src/components/breadcrumb/index.tsx +8 -7
- package/src/components/button/index.tsx +2 -1
- package/src/components/button-group/index.tsx +2 -1
- package/src/components/calendar/index.tsx +2 -1
- package/src/components/card/index.tsx +7 -6
- package/src/components/checkbox/index.tsx +2 -1
- package/src/components/chip/index.tsx +2 -1
- package/src/components/collapsible/index.tsx +6 -5
- package/src/components/color-picker/index.tsx +29 -15
- package/src/components/combobox/index.tsx +3 -2
- package/src/components/context-menu/index.tsx +2 -1
- package/src/components/countdown/index.tsx +2 -1
- package/src/components/dialog/index.tsx +3 -2
- package/src/components/empty-state/index.tsx +7 -6
- package/src/components/fab/index.tsx +6 -4
- package/src/components/feedback/index.tsx +5 -4
- package/src/components/field/index.tsx +11 -10
- package/src/components/file-upload/index.tsx +4 -3
- package/src/components/flip-card/index.tsx +4 -3
- package/src/components/frame/index.tsx +13 -12
- package/src/components/grid-item/index.tsx +10 -9
- package/src/components/heatmap-chart/index.tsx +2 -1
- package/src/components/image-viewer/index.tsx +2 -1
- package/src/components/input/index.tsx +2 -1
- package/src/components/input-group/index.tsx +4 -3
- package/src/components/item/index.tsx +11 -10
- package/src/components/kpi/index.tsx +3 -2
- package/src/components/label/index.tsx +3 -2
- package/src/components/leaderboard/index.tsx +2 -1
- package/src/components/live-line-chart/index.tsx +2 -1
- package/src/components/map/native-style.ts +31 -4
- package/src/components/markdown-editor/index.tsx +11 -11
- package/src/components/marker/index.tsx +4 -3
- package/src/components/marquee/index.tsx +2 -1
- package/src/components/message/index.tsx +10 -9
- package/src/components/message-scroller/index.tsx +4 -4
- package/src/components/meter/index.tsx +2 -1
- package/src/components/number-input/index.tsx +2 -1
- package/src/components/otp-input/index.tsx +4 -3
- package/src/components/page-header/index.tsx +12 -11
- package/src/components/pagination/index.tsx +6 -5
- package/src/components/panelside/index.tsx +8 -7
- package/src/components/planner/index.tsx +7 -7
- package/src/components/popover/index.tsx +2 -1
- package/src/components/post/index.tsx +12 -11
- package/src/components/progress/index.tsx +2 -1
- package/src/components/progress-button/index.tsx +2 -1
- package/src/components/qr-code/index.tsx +8 -7
- package/src/components/questionnaire/index.tsx +4 -3
- package/src/components/radio-group/index.tsx +3 -2
- package/src/components/rating/index.tsx +2 -1
- package/src/components/scroll-header/index.tsx +13 -11
- package/src/components/search-bar/index.tsx +7 -8
- package/src/components/section-progress/index.tsx +3 -2
- package/src/components/select/index.tsx +2 -1
- package/src/components/separator/index.tsx +2 -1
- package/src/components/shimmer/index.tsx +11 -2
- package/src/components/signature/index.tsx +2 -1
- package/src/components/sketch/index.tsx +2 -1
- package/src/components/slide-button/index.tsx +2 -1
- package/src/components/slider/index.tsx +2 -1
- package/src/components/sortable/index.tsx +5 -7
- package/src/components/splitter/index.tsx +3 -2
- package/src/components/stack-card/index.tsx +9 -7
- package/src/components/steps/index.tsx +8 -7
- package/src/components/support/index.tsx +17 -16
- package/src/components/surface/index.tsx +2 -1
- package/src/components/swipe/index.tsx +5 -4
- package/src/components/switch/index.tsx +2 -1
- package/src/components/table/index.tsx +11 -10
- package/src/components/tabs/index.tsx +4 -2
- package/src/components/tag-input/index.tsx +5 -5
- package/src/components/text-animation/index.tsx +2 -1
- package/src/components/textarea/index.tsx +3 -3
- package/src/components/time-picker/index.tsx +2 -1
- package/src/components/timeline/index.tsx +17 -16
- package/src/components/toast/index.tsx +2 -2
- package/src/components/toggle-button/index.tsx +3 -2
- package/src/components/tooltip/index.tsx +2 -1
- package/src/components/tour/index.tsx +3 -2
- package/src/components/tree/index.tsx +11 -9
- package/src/components/typography/index.tsx +8 -7
- package/src/hooks/use-keyboard-avoidance.ts +3 -2
- package/src/hooks/use-reveal-progress.ts +3 -2
- package/src/hooks/use-scroll-sections.ts +3 -2
- package/src/icons/index.tsx +21 -2
- package/src/index.ts +4 -0
- package/src/primitives/animated-pressable.tsx +2 -1
- package/src/primitives/chart-accessibility.ts +9 -5
- package/src/primitives/glass.tsx +3 -2
- package/src/primitives/refs.ts +45 -0
- package/src/primitives/scroll-progress.tsx +2 -1
- package/src/primitives/text.tsx +2 -1
- package/src/primitives/web-deps.ts +14 -0
- package/lib/module/uniwind-env.d.js +0 -4
- package/lib/module/uniwind-env.d.js.map +0 -1
|
@@ -49,7 +49,6 @@ import {
|
|
|
49
49
|
type LayoutChangeEvent,
|
|
50
50
|
type ListRenderItemInfo,
|
|
51
51
|
type ViewProps,
|
|
52
|
-
type ViewToken,
|
|
53
52
|
} from 'react-native';
|
|
54
53
|
import Animated, {
|
|
55
54
|
runOnJS,
|
|
@@ -74,6 +73,7 @@ import {
|
|
|
74
73
|
messageScrollerIndex,
|
|
75
74
|
MESSAGE_SCROLLER_EDGE_THRESHOLD,
|
|
76
75
|
} from './message-scroller-math';
|
|
76
|
+
import type { ViewTokenOf } from '../../primitives/refs';
|
|
77
77
|
|
|
78
78
|
/**
|
|
79
79
|
* How much of the previous turn is left showing above an anchored one. Scrolling
|
|
@@ -617,9 +617,9 @@ function MessageScrollerList<T extends MessageScrollerListItem>({
|
|
|
617
617
|
};
|
|
618
618
|
|
|
619
619
|
const onViewableItemsChanged = useRef(
|
|
620
|
-
({ viewableItems }: { viewableItems:
|
|
621
|
-
const first = viewableItems.reduce(
|
|
622
|
-
(best, token) => (token.index
|
|
620
|
+
({ viewableItems }: { viewableItems: ViewTokenOf<T>[] }) => {
|
|
621
|
+
const first = viewableItems.reduce<number>(
|
|
622
|
+
(best, token) => (token.index != null && token.index < best ? token.index : best),
|
|
623
623
|
Infinity
|
|
624
624
|
);
|
|
625
625
|
firstVisibleIndex.current = Number.isFinite(first) ? first : null;
|
|
@@ -19,6 +19,7 @@ import {
|
|
|
19
19
|
type MeterColor,
|
|
20
20
|
type MeterThreshold,
|
|
21
21
|
} from './meter-scale';
|
|
22
|
+
import type { ViewRef } from '../../primitives/refs';
|
|
22
23
|
|
|
23
24
|
const SPRING = {
|
|
24
25
|
damping: 20,
|
|
@@ -193,7 +194,7 @@ function Segment({ index, lit, className, reducedMotion }: SegmentProps) {
|
|
|
193
194
|
* it is why `label` matters: the role will not distinguish a reading from a
|
|
194
195
|
* task, and the name is what does.
|
|
195
196
|
*/
|
|
196
|
-
export const Meter = forwardRef<
|
|
197
|
+
export const Meter = forwardRef<ViewRef, MeterProps>(
|
|
197
198
|
(
|
|
198
199
|
{
|
|
199
200
|
className,
|
|
@@ -37,6 +37,7 @@ import { selectionTick } from '../../utils/haptics';
|
|
|
37
37
|
import { Label } from '../label';
|
|
38
38
|
import { normalize, precisionOf } from './number-input-math';
|
|
39
39
|
import { createRepeater } from './number-input-repeat';
|
|
40
|
+
import type { TextInputRef } from '../../primitives/refs';
|
|
40
41
|
|
|
41
42
|
/** Wait before a held button starts repeating — a tap must not trip it. */
|
|
42
43
|
const REPEAT_DELAY = 400;
|
|
@@ -163,7 +164,7 @@ export interface NumberInputProps
|
|
|
163
164
|
* A number stepped by buttons or typed by hand, reconciled to one clamped,
|
|
164
165
|
* step-snapped value. See the file header for why it keeps both affordances.
|
|
165
166
|
*/
|
|
166
|
-
export const NumberInput = forwardRef<
|
|
167
|
+
export const NumberInput = forwardRef<TextInputRef, NumberInputProps>(
|
|
167
168
|
(
|
|
168
169
|
{
|
|
169
170
|
className,
|
|
@@ -39,6 +39,7 @@ import { tv, type VariantProps } from 'tailwind-variants';
|
|
|
39
39
|
import { useCSSVariable } from 'uniwind';
|
|
40
40
|
import { Text } from '../../primitives/text';
|
|
41
41
|
import { resolveOtpEditable } from './otp-input-state';
|
|
42
|
+
import type { TextInputRef } from '../../primitives/refs';
|
|
42
43
|
|
|
43
44
|
/** Long enough to read as a transition, short enough not to lag a fast type. */
|
|
44
45
|
const FOCUS_DURATION = 150;
|
|
@@ -230,7 +231,7 @@ function sanitize(raw: string, length: number, type: 'numeric' | 'text'): string
|
|
|
230
231
|
return filtered.slice(0, length);
|
|
231
232
|
}
|
|
232
233
|
|
|
233
|
-
export const OtpInput = forwardRef<
|
|
234
|
+
export const OtpInput = forwardRef<TextInputRef, OtpInputProps>(
|
|
234
235
|
(
|
|
235
236
|
{
|
|
236
237
|
className,
|
|
@@ -265,7 +266,7 @@ export const OtpInput = forwardRef<TextInput, OtpInputProps>(
|
|
|
265
266
|
const invalid = isInvalid || !!errorMessage;
|
|
266
267
|
|
|
267
268
|
const [focused, setFocused] = useState(false);
|
|
268
|
-
const inputRef = useRef<
|
|
269
|
+
const inputRef = useRef<TextInputRef | null>(null);
|
|
269
270
|
|
|
270
271
|
// A one-shot guard so onComplete fires on the transition to full, not on
|
|
271
272
|
// every keystroke that leaves the field full (e.g. a trailing focus event).
|
|
@@ -274,7 +275,7 @@ export const OtpInput = forwardRef<TextInput, OtpInputProps>(
|
|
|
274
275
|
const slots = otpVariants({ size, disabled: !!disabled });
|
|
275
276
|
|
|
276
277
|
const setRef = useCallback(
|
|
277
|
-
(node:
|
|
278
|
+
(node: TextInputRef | null) => {
|
|
278
279
|
inputRef.current = node;
|
|
279
280
|
if (typeof ref === 'function') ref(node);
|
|
280
281
|
else if (ref) ref.current = node;
|
|
@@ -65,6 +65,7 @@ import { Text, type TextProps, textChildren } from '../../primitives/text';
|
|
|
65
65
|
import { cn } from '../../utils/cn';
|
|
66
66
|
import { BadgeCheckIcon, IconColorProvider } from '../../icons';
|
|
67
67
|
import { Avatar, AVATAR_SIZE_POINTS, type AvatarProps, type AvatarSizeName } from '../avatar';
|
|
68
|
+
import type { TextRef, ViewRef } from '../../primitives/refs';
|
|
68
69
|
|
|
69
70
|
/** Height of a cover that is not given one. Two lines of nothing, and enough
|
|
70
71
|
* of a band for a face to sit half over. */
|
|
@@ -186,7 +187,7 @@ export interface PageHeaderRootProps extends PageHeaderProps {
|
|
|
186
187
|
align?: PageHeaderAlign;
|
|
187
188
|
}
|
|
188
189
|
|
|
189
|
-
const PageHeaderRoot = forwardRef<
|
|
190
|
+
const PageHeaderRoot = forwardRef<ViewRef, PageHeaderRootProps>(
|
|
190
191
|
({ className, variant = 'card', align = 'center', children, ...props }, ref) => {
|
|
191
192
|
// Whether the avatar has anything to overlap. Read off the children rather
|
|
192
193
|
// than asked for, because a caller who has written a cover should not also
|
|
@@ -233,7 +234,7 @@ export interface PageHeaderCoverProps extends ViewProps {
|
|
|
233
234
|
* The banner. An image when given one, a gradient when not — a header with no
|
|
234
235
|
* banner still has to read as a header, and an empty band reads as a bug.
|
|
235
236
|
*/
|
|
236
|
-
const PageHeaderCover = forwardRef<
|
|
237
|
+
const PageHeaderCover = forwardRef<ViewRef, PageHeaderCoverProps>(
|
|
237
238
|
({ className, source, height = COVER_HEIGHT, colors, alt, style, children, ...props }, ref) => {
|
|
238
239
|
const { variant } = usePageHeader('PageHeader.Cover');
|
|
239
240
|
const from = useCSSVariable(GRADIENT[0]);
|
|
@@ -315,7 +316,7 @@ export interface PageHeaderAvatarProps extends Omit<AvatarProps, 'size' | 'child
|
|
|
315
316
|
* pinned to the top corner, where an unread count belongs. A verification mark
|
|
316
317
|
* belongs at the bottom, beside the name it is vouching for.
|
|
317
318
|
*/
|
|
318
|
-
const PageHeaderAvatar = forwardRef<
|
|
319
|
+
const PageHeaderAvatar = forwardRef<ViewRef, PageHeaderAvatarProps>(
|
|
319
320
|
(
|
|
320
321
|
{
|
|
321
322
|
className,
|
|
@@ -401,7 +402,7 @@ export interface PageHeaderRowProps extends PageHeaderProps {
|
|
|
401
402
|
* The face, and whatever sits beside it. For the profile that puts its counts
|
|
402
403
|
* next to the picture rather than under the name.
|
|
403
404
|
*/
|
|
404
|
-
const PageHeaderRow = forwardRef<
|
|
405
|
+
const PageHeaderRow = forwardRef<ViewRef, PageHeaderRowProps>(
|
|
405
406
|
({ className, children, ...props }, ref) => {
|
|
406
407
|
const { variant, align } = usePageHeader('PageHeader.Row');
|
|
407
408
|
return (
|
|
@@ -422,7 +423,7 @@ export interface PageHeaderContentProps extends PageHeaderProps {
|
|
|
422
423
|
}
|
|
423
424
|
|
|
424
425
|
/** The text block: the name, the handle, and anything under them. */
|
|
425
|
-
const PageHeaderContent = forwardRef<
|
|
426
|
+
const PageHeaderContent = forwardRef<ViewRef, PageHeaderContentProps>(
|
|
426
427
|
({ className, children, ...props }, ref) => {
|
|
427
428
|
const { variant, align } = usePageHeader('PageHeader.Content');
|
|
428
429
|
return (
|
|
@@ -439,7 +440,7 @@ const PageHeaderContent = forwardRef<View, PageHeaderContentProps>(
|
|
|
439
440
|
PageHeaderContent.displayName = 'PageHeader.Content';
|
|
440
441
|
|
|
441
442
|
/** Whose page it is. Announces itself as a heading. */
|
|
442
|
-
const PageHeaderTitle = forwardRef<
|
|
443
|
+
const PageHeaderTitle = forwardRef<TextRef, TextProps>(({ className, ...props }, ref) => (
|
|
443
444
|
<Text
|
|
444
445
|
{...props}
|
|
445
446
|
ref={ref}
|
|
@@ -452,7 +453,7 @@ const PageHeaderTitle = forwardRef<RNText, TextProps>(({ className, ...props },
|
|
|
452
453
|
PageHeaderTitle.displayName = 'PageHeader.Title';
|
|
453
454
|
|
|
454
455
|
/** The handle, the email, the bio — the quiet line under the name. */
|
|
455
|
-
const PageHeaderDescription = forwardRef<
|
|
456
|
+
const PageHeaderDescription = forwardRef<TextRef, TextProps>(({ className, ...props }, ref) => (
|
|
456
457
|
<Text {...props} ref={ref} size="sm" muted className={className} />
|
|
457
458
|
));
|
|
458
459
|
PageHeaderDescription.displayName = 'PageHeader.Description';
|
|
@@ -466,7 +467,7 @@ export interface PageHeaderMetaProps extends PageHeaderProps {
|
|
|
466
467
|
/**
|
|
467
468
|
* One fact about the account — a link, a location, the month it was opened.
|
|
468
469
|
*/
|
|
469
|
-
const PageHeaderMeta = forwardRef<
|
|
470
|
+
const PageHeaderMeta = forwardRef<ViewRef, PageHeaderMetaProps>(
|
|
470
471
|
({ className, icon, children, ...props }, ref) => {
|
|
471
472
|
const { variant, align } = usePageHeader('PageHeader.Meta');
|
|
472
473
|
const muted = useCSSVariable('--color-muted-foreground');
|
|
@@ -516,7 +517,7 @@ export interface PageHeaderStatsProps extends PageHeaderProps {
|
|
|
516
517
|
* the name and the buttons are on, and the row reads as very slightly wrong
|
|
517
518
|
* without it being obvious why.
|
|
518
519
|
*/
|
|
519
|
-
const PageHeaderStats = forwardRef<
|
|
520
|
+
const PageHeaderStats = forwardRef<ViewRef, PageHeaderStatsProps>(
|
|
520
521
|
({ className, layout = 'stacked', divided, children, ...props }, ref) => {
|
|
521
522
|
const { variant, align } = usePageHeader('PageHeader.Stats');
|
|
522
523
|
const stacked = layout === 'stacked';
|
|
@@ -575,7 +576,7 @@ export interface PageHeaderStatProps extends Omit<PressableProps, 'children'> {
|
|
|
575
576
|
* One count. Announced as a single thing — "533 Followers" — because a figure
|
|
576
577
|
* and its label read apart are two pieces of nothing.
|
|
577
578
|
*/
|
|
578
|
-
const PageHeaderStat = forwardRef<
|
|
579
|
+
const PageHeaderStat = forwardRef<ViewRef, PageHeaderStatProps>(
|
|
579
580
|
({ className, value, label, divided, onPress, accessibilityLabel, ...props }, ref) => {
|
|
580
581
|
const layout = useContext(PageHeaderStatsContext);
|
|
581
582
|
const inline = layout === 'inline';
|
|
@@ -644,7 +645,7 @@ export interface PageHeaderActionsProps extends PageHeaderProps {
|
|
|
644
645
|
* What you can do about the account. Give the buttons `className="flex-1"` for
|
|
645
646
|
* the pair that splits the width evenly.
|
|
646
647
|
*/
|
|
647
|
-
const PageHeaderActions = forwardRef<
|
|
648
|
+
const PageHeaderActions = forwardRef<ViewRef, PageHeaderActionsProps>(
|
|
648
649
|
({ className, children, ...props }, ref) => {
|
|
649
650
|
const { variant, align } = usePageHeader('PageHeader.Actions');
|
|
650
651
|
return (
|
|
@@ -58,6 +58,7 @@ import {
|
|
|
58
58
|
import { Text, type TextProps, textChildren } from '../../primitives/text';
|
|
59
59
|
import { cn } from '../../utils/cn';
|
|
60
60
|
import { selectionTick } from '../../utils/haptics';
|
|
61
|
+
import type { TextRef, ViewRef } from '../../primitives/refs';
|
|
61
62
|
|
|
62
63
|
export type PaginationVariant = 'numbers' | 'compact' | 'simple';
|
|
63
64
|
export type PaginationSize = 'sm' | 'default';
|
|
@@ -238,7 +239,7 @@ export interface PaginationProps
|
|
|
238
239
|
children?: ReactNode;
|
|
239
240
|
}
|
|
240
241
|
|
|
241
|
-
const PaginationRoot = forwardRef<
|
|
242
|
+
const PaginationRoot = forwardRef<ViewRef, PaginationProps>(
|
|
242
243
|
(
|
|
243
244
|
{
|
|
244
245
|
className,
|
|
@@ -366,7 +367,7 @@ export interface PaginationItemProps
|
|
|
366
367
|
* One numbered target. Announced as a selected button when it is the page you
|
|
367
368
|
* are on, so the current page is spoken as state rather than only painted.
|
|
368
369
|
*/
|
|
369
|
-
const PaginationItem = forwardRef<
|
|
370
|
+
const PaginationItem = forwardRef<ViewRef, PaginationItemProps>(
|
|
370
371
|
({ className, labelClassName, page, children, onPress, ...props }, ref) => {
|
|
371
372
|
const { page: current, size, disabled, goTo } = usePagination('Pagination.Item');
|
|
372
373
|
const isCurrent = page === current;
|
|
@@ -497,7 +498,7 @@ export interface PaginationEllipsisProps
|
|
|
497
498
|
* the end the gap is on — which is why the two ellipses are told apart: a jump
|
|
498
499
|
* that always went forwards would strand anyone reading the row right to left.
|
|
499
500
|
*/
|
|
500
|
-
const PaginationEllipsis = forwardRef<
|
|
501
|
+
const PaginationEllipsis = forwardRef<ViewRef, PaginationEllipsisProps>(
|
|
501
502
|
({ className, direction = 1, jump = 5, disabled: disabledProp, onPress, ...props }, ref) => {
|
|
502
503
|
const { page, size, disabled, goTo } = usePagination('Pagination.Ellipsis');
|
|
503
504
|
const color = useCSSVariable('--color-muted-foreground');
|
|
@@ -542,7 +543,7 @@ export interface PaginationSummaryProps extends TextProps {
|
|
|
542
543
|
* for the sentence and the sentence would need translating. `Pagination.Status`
|
|
543
544
|
* is the place for words.
|
|
544
545
|
*/
|
|
545
|
-
const PaginationSummary = forwardRef<
|
|
546
|
+
const PaginationSummary = forwardRef<TextRef, PaginationSummaryProps>(
|
|
546
547
|
({ className, ...props }, ref) => {
|
|
547
548
|
const { page, count, size } = usePagination('Pagination.Summary');
|
|
548
549
|
const { summary } = paginationVariants({ size });
|
|
@@ -579,7 +580,7 @@ export interface PaginationStatusProps extends TextProps {
|
|
|
579
580
|
* question people actually have, which is how much is left. Given `children`
|
|
580
581
|
* it renders those instead, for a set whose size is not known yet.
|
|
581
582
|
*/
|
|
582
|
-
const PaginationStatus = forwardRef<
|
|
583
|
+
const PaginationStatus = forwardRef<TextRef, PaginationStatusProps>(
|
|
583
584
|
({ className, page: ownPage, pageSize, total, children, ...props }, ref) => {
|
|
584
585
|
const context = useContext(PaginationContext);
|
|
585
586
|
const size = context?.size ?? 'default';
|
|
@@ -132,6 +132,7 @@ import { useBackHandler } from '../../hooks/use-back-handler';
|
|
|
132
132
|
import { useDirectionSign } from '../../hooks/use-direction';
|
|
133
133
|
import { cn } from '../../utils/cn';
|
|
134
134
|
import { selectionTick } from '../../utils/haptics';
|
|
135
|
+
import { webDeps } from '../../primitives/web-deps';
|
|
135
136
|
|
|
136
137
|
const SPRING = { damping: 24, stiffness: 300, mass: 0.7 } as const;
|
|
137
138
|
|
|
@@ -630,7 +631,7 @@ function PanelsideRoot({
|
|
|
630
631
|
const extent = Math.max(1, mode === 'push' ? width + GAP : width);
|
|
631
632
|
|
|
632
633
|
const translation = useSharedValue(open ? extent : 0);
|
|
633
|
-
const progress = useDerivedValue(() => translation.value / extent, [extent]);
|
|
634
|
+
const progress = useDerivedValue(() => translation.value / extent, webDeps([extent]));
|
|
634
635
|
|
|
635
636
|
/*
|
|
636
637
|
* Which end state a spring is already heading for, so the effect below does
|
|
@@ -827,7 +828,7 @@ function PanelsidePanel({ className, children, style, ...props }: PanelsidePanel
|
|
|
827
828
|
const p = docked ? 1 : progress.value;
|
|
828
829
|
const distance = mode === 'overlay' ? width : width * PARALLAX;
|
|
829
830
|
return { transform: [{ translateX: -(1 - p) * distance }] };
|
|
830
|
-
}, [docked, mode, width]);
|
|
831
|
+
}, webDeps([docked, mode, width]));
|
|
831
832
|
|
|
832
833
|
/*
|
|
833
834
|
* Out of the accessibility tree until it is nearly all the way in. A panel
|
|
@@ -840,7 +841,7 @@ function PanelsidePanel({ className, children, style, ...props }: PanelsidePanel
|
|
|
840
841
|
return Platform.OS === 'android'
|
|
841
842
|
? { importantForAccessibility: hidden ? 'no-hide-descendants' : 'auto' }
|
|
842
843
|
: { accessibilityElementsHidden: hidden };
|
|
843
|
-
}, [docked]);
|
|
844
|
+
}, webDeps([docked]));
|
|
844
845
|
|
|
845
846
|
const surface = useMemo<PanelsideSurfaceValue>(
|
|
846
847
|
() => ({ footerHeight, setFooterHeight }),
|
|
@@ -1794,12 +1795,12 @@ function PanelsideScene({
|
|
|
1794
1795
|
],
|
|
1795
1796
|
borderRadius: p * radius,
|
|
1796
1797
|
};
|
|
1797
|
-
}, [pushes, radius, scale, sceneWidth, sign, width]);
|
|
1798
|
+
}, webDeps([pushes, radius, scale, sceneWidth, sign, width]));
|
|
1798
1799
|
|
|
1799
1800
|
const scrimStyle = useAnimatedStyle(() => {
|
|
1800
1801
|
const p = docked ? 0 : progress.value;
|
|
1801
1802
|
return { opacity: p * dim };
|
|
1802
|
-
}, [dim, docked]);
|
|
1803
|
+
}, webDeps([dim, docked]));
|
|
1803
1804
|
|
|
1804
1805
|
/*
|
|
1805
1806
|
* The edge is drawn as its own layer rather than as a border on the scene.
|
|
@@ -1811,14 +1812,14 @@ function PanelsideScene({
|
|
|
1811
1812
|
const ringStyle = useAnimatedStyle(() => {
|
|
1812
1813
|
const p = docked ? 0 : progress.value;
|
|
1813
1814
|
return { opacity: p * EDGE_OPACITY, borderRadius: p * radius };
|
|
1814
|
-
}, [docked, radius]);
|
|
1815
|
+
}, webDeps([docked, radius]));
|
|
1815
1816
|
|
|
1816
1817
|
const animatedProps = useAnimatedProps<ViewProps>(() => {
|
|
1817
1818
|
const hidden = !docked && progress.value > 1 - HIDDEN_EPSILON;
|
|
1818
1819
|
return Platform.OS === 'android'
|
|
1819
1820
|
? { importantForAccessibility: hidden ? 'no-hide-descendants' : 'auto' }
|
|
1820
1821
|
: { accessibilityElementsHidden: hidden };
|
|
1821
|
-
}, [docked]);
|
|
1822
|
+
}, webDeps([docked]));
|
|
1822
1823
|
|
|
1823
1824
|
return (
|
|
1824
1825
|
<Animated.View
|
|
@@ -76,7 +76,6 @@ import {
|
|
|
76
76
|
Platform,
|
|
77
77
|
Pressable,
|
|
78
78
|
View,
|
|
79
|
-
type ViewToken,
|
|
80
79
|
type ViewProps,
|
|
81
80
|
} from 'react-native';
|
|
82
81
|
import { tv } from 'tailwind-variants';
|
|
@@ -119,6 +118,7 @@ import {
|
|
|
119
118
|
usePlannerSelectionLifecycle,
|
|
120
119
|
} from './planner-lifecycle';
|
|
121
120
|
import { millisecondsUntilNextLocalDay } from './planner-today';
|
|
121
|
+
import type { ViewRef, ViewTokenOf } from '../../primitives/refs';
|
|
122
122
|
|
|
123
123
|
/**
|
|
124
124
|
* How many of a day's entries a cell draws before it stops and counts.
|
|
@@ -474,7 +474,7 @@ export interface PlannerProps extends Omit<ViewProps, 'children'> {
|
|
|
474
474
|
children?: ReactNode;
|
|
475
475
|
}
|
|
476
476
|
|
|
477
|
-
const PlannerRoot = forwardRef<
|
|
477
|
+
const PlannerRoot = forwardRef<ViewRef, PlannerProps>(
|
|
478
478
|
(
|
|
479
479
|
{
|
|
480
480
|
className,
|
|
@@ -835,7 +835,7 @@ interface PlannerGridKeyDownEvent {
|
|
|
835
835
|
interface PlannerGridNavigationContextValue {
|
|
836
836
|
activeIndex: number;
|
|
837
837
|
indexByDay: ReadonlyMap<number, number>;
|
|
838
|
-
register: (index: number, node:
|
|
838
|
+
register: (index: number, node: ViewRef | null) => void;
|
|
839
839
|
focus: (index: number, event: PlannerGridKeyDownEvent) => void;
|
|
840
840
|
makeActive: (index: number) => void;
|
|
841
841
|
}
|
|
@@ -893,8 +893,8 @@ function PlannerGrid({ className, renderDay }: PlannerGridProps) {
|
|
|
893
893
|
indexByDay.get(today.getTime()) ??
|
|
894
894
|
dates.findIndex(isInMonth);
|
|
895
895
|
const activeIndex = storedIndex ?? Math.max(0, preferredIndex);
|
|
896
|
-
const refs = useRef(new Map<number,
|
|
897
|
-
const register = useCallback((index: number, node:
|
|
896
|
+
const refs = useRef(new Map<number, ViewRef>());
|
|
897
|
+
const register = useCallback((index: number, node: ViewRef | null) => {
|
|
898
898
|
if (node) refs.current.set(index, node);
|
|
899
899
|
else refs.current.delete(index);
|
|
900
900
|
}, []);
|
|
@@ -1011,7 +1011,7 @@ function PlannerDay({ date, renderDay }: PlannerDayProps) {
|
|
|
1011
1011
|
};
|
|
1012
1012
|
const gridIndex = navigation?.indexByDay.get(date.getTime());
|
|
1013
1013
|
const setRef = useCallback(
|
|
1014
|
-
(node:
|
|
1014
|
+
(node: ViewRef | null) => {
|
|
1015
1015
|
if (gridIndex !== undefined) registerGridCell?.(gridIndex, node);
|
|
1016
1016
|
},
|
|
1017
1017
|
[gridIndex, registerGridCell]
|
|
@@ -1418,7 +1418,7 @@ function PlannerScroller({
|
|
|
1418
1418
|
* month change from reporting that same month straight back.
|
|
1419
1419
|
*/
|
|
1420
1420
|
const reported = useRef(month.getTime());
|
|
1421
|
-
const onViewable = useRef(({ viewableItems }: { viewableItems:
|
|
1421
|
+
const onViewable = useRef(({ viewableItems }: { viewableItems: ViewTokenOf<unknown>[] }) => {
|
|
1422
1422
|
const first = viewableItems[0]?.item as Date | undefined;
|
|
1423
1423
|
if (!first) return;
|
|
1424
1424
|
const next = startOfCalendarMonth(weekAnchor(first), system, locale);
|
|
@@ -67,6 +67,7 @@ import { NativeHost, getSwiftUI } from '../../native';
|
|
|
67
67
|
import { BottomSheet } from '../bottom-sheet';
|
|
68
68
|
import { Text, type TextProps, textChildren } from '../../primitives/text';
|
|
69
69
|
import { cn } from '../../utils/cn';
|
|
70
|
+
import type { ViewRef } from '../../primitives/refs';
|
|
70
71
|
|
|
71
72
|
/** Gap between the trigger and the panel. */
|
|
72
73
|
const DEFAULT_OFFSET = 8;
|
|
@@ -355,7 +356,7 @@ export interface PopoverTriggerProps {
|
|
|
355
356
|
*/
|
|
356
357
|
function PopoverTrigger({ children }: PopoverTriggerProps) {
|
|
357
358
|
const { open, setOpen, setTrigger, native } = usePopover('Popover.Trigger');
|
|
358
|
-
const ref = useRef<
|
|
359
|
+
const ref = useRef<ViewRef>(null);
|
|
359
360
|
|
|
360
361
|
const measureThenToggle = (...args: unknown[]) => {
|
|
361
362
|
if (isValidElement(children)) children.props.onPress?.(...args);
|
|
@@ -84,6 +84,7 @@ import { Text, textChildren } from '../../primitives/text';
|
|
|
84
84
|
import { cn } from '../../utils/cn';
|
|
85
85
|
import { selectionTick } from '../../utils/haptics';
|
|
86
86
|
import { Avatar } from '../avatar';
|
|
87
|
+
import type { ViewRef } from '../../primitives/refs';
|
|
87
88
|
|
|
88
89
|
/** Long enough to see the value move, short enough to keep up with a fast tap. */
|
|
89
90
|
const COUNT_DURATION = 160;
|
|
@@ -187,7 +188,7 @@ export interface PostProps
|
|
|
187
188
|
children?: ReactNode;
|
|
188
189
|
}
|
|
189
190
|
|
|
190
|
-
const PostRoot = forwardRef<
|
|
191
|
+
const PostRoot = forwardRef<ViewRef, PostProps>(
|
|
191
192
|
({ className, variant = 'feed', size = 'default', onPress, children, ...props }, ref) => {
|
|
192
193
|
const { root } = postVariants({ variant, size });
|
|
193
194
|
const context = useMemo(() => ({ variant, size }), [variant, size]);
|
|
@@ -236,7 +237,7 @@ export interface PostHeaderProps extends ViewProps {
|
|
|
236
237
|
* menu stays in the corner as a long display name wraps rather than riding down
|
|
237
238
|
* with it.
|
|
238
239
|
*/
|
|
239
|
-
const PostHeader = forwardRef<
|
|
240
|
+
const PostHeader = forwardRef<ViewRef, PostHeaderProps>(
|
|
240
241
|
({ className, children, ...props }, ref) => {
|
|
241
242
|
const { variant, size } = usePost();
|
|
242
243
|
const { header } = postVariants({ variant, size });
|
|
@@ -290,7 +291,7 @@ export interface PostAuthorProps extends Omit<ViewProps, 'children'> {
|
|
|
290
291
|
* which is the difference between a timeline row and a card: a dense row cannot
|
|
291
292
|
* afford a second line, and a card looks starved without one.
|
|
292
293
|
*/
|
|
293
|
-
const PostAuthor = forwardRef<
|
|
294
|
+
const PostAuthor = forwardRef<ViewRef, PostAuthorProps>(
|
|
294
295
|
(
|
|
295
296
|
{ className, name, handle, avatar, fallback, verified, timestamp, children, ...props },
|
|
296
297
|
ref
|
|
@@ -396,7 +397,7 @@ export interface PostActionProps extends ViewProps {
|
|
|
396
397
|
}
|
|
397
398
|
|
|
398
399
|
/** The header's trailing slot — an overflow menu, a follow button, a badge. */
|
|
399
|
-
const PostAction = forwardRef<
|
|
400
|
+
const PostAction = forwardRef<ViewRef, PostActionProps>(
|
|
400
401
|
({ className, children, ...props }, ref) => {
|
|
401
402
|
const { variant, size } = usePost();
|
|
402
403
|
const { action } = postVariants({ variant, size });
|
|
@@ -426,7 +427,7 @@ export interface PostCommunityProps extends Omit<ViewProps, 'children'> {
|
|
|
426
427
|
* post's subject is the headline — the group is where it came from, not who
|
|
427
428
|
* said it.
|
|
428
429
|
*/
|
|
429
|
-
const PostCommunity = forwardRef<
|
|
430
|
+
const PostCommunity = forwardRef<ViewRef, PostCommunityProps>(
|
|
430
431
|
({ className, name, avatar, meta, children, ...props }, ref) => {
|
|
431
432
|
const { variant, size } = usePost();
|
|
432
433
|
const {
|
|
@@ -471,7 +472,7 @@ export interface PostTitleProps extends ViewProps {
|
|
|
471
472
|
}
|
|
472
473
|
|
|
473
474
|
/** The headline of a post whose subject is a headline rather than a person. */
|
|
474
|
-
const PostTitle = forwardRef<
|
|
475
|
+
const PostTitle = forwardRef<ViewRef, PostTitleProps>(
|
|
475
476
|
({ className, children, ...props }, ref) => {
|
|
476
477
|
const { variant, size } = usePost();
|
|
477
478
|
const { title } = postVariants({ variant, size });
|
|
@@ -506,7 +507,7 @@ export interface PostBodyProps extends Omit<ViewProps, 'children'> {
|
|
|
506
507
|
* A non-string child is left entirely alone: it has already been laid out by
|
|
507
508
|
* someone who knew more than we do.
|
|
508
509
|
*/
|
|
509
|
-
const PostBody = forwardRef<
|
|
510
|
+
const PostBody = forwardRef<ViewRef, PostBodyProps>(
|
|
510
511
|
(
|
|
511
512
|
{ className, numberOfLines, onTagPress, onMentionPress, children, ...props },
|
|
512
513
|
ref
|
|
@@ -621,7 +622,7 @@ const SCRIM_COLOURS: readonly [string, string, string] = [
|
|
|
621
622
|
* whose heights are decided by whatever was uploaded scrolls like a broken
|
|
622
623
|
* staircase. The image covers the box and is cropped by it.
|
|
623
624
|
*/
|
|
624
|
-
const PostMedia = forwardRef<
|
|
625
|
+
const PostMedia = forwardRef<ViewRef, PostMediaProps>(
|
|
625
626
|
(
|
|
626
627
|
{
|
|
627
628
|
className,
|
|
@@ -714,7 +715,7 @@ export interface PostFooterProps extends ViewProps {
|
|
|
714
715
|
}
|
|
715
716
|
|
|
716
717
|
/** The row of counts and controls under the post. */
|
|
717
|
-
const PostFooter = forwardRef<
|
|
718
|
+
const PostFooter = forwardRef<ViewRef, PostFooterProps>(
|
|
718
719
|
({ className, children, ...props }, ref) => {
|
|
719
720
|
const { variant, size } = usePost();
|
|
720
721
|
const { footer } = postVariants({ variant, size });
|
|
@@ -759,7 +760,7 @@ export interface PostStatProps extends Omit<PressableProps, 'children' | 'style'
|
|
|
759
760
|
* Repainting the digits in place is indistinguishable from a re-render, which
|
|
760
761
|
* is the doubt this exists to remove.
|
|
761
762
|
*/
|
|
762
|
-
const PostStat = forwardRef<
|
|
763
|
+
const PostStat = forwardRef<ViewRef, PostStatProps>(
|
|
763
764
|
(
|
|
764
765
|
{
|
|
765
766
|
className,
|
|
@@ -961,7 +962,7 @@ export interface PostVotesProps extends Omit<ViewProps, 'children'> {
|
|
|
961
962
|
* score is a thing people change their minds about, and a vote that cannot be
|
|
962
963
|
* withdrawn is one they think twice before casting.
|
|
963
964
|
*/
|
|
964
|
-
const PostVotes = forwardRef<
|
|
965
|
+
const PostVotes = forwardRef<ViewRef, PostVotesProps>(
|
|
965
966
|
(
|
|
966
967
|
{
|
|
967
968
|
className,
|
|
@@ -15,6 +15,7 @@ import { tv, type VariantProps } from 'tailwind-variants';
|
|
|
15
15
|
import { useDirectionSign } from '../../hooks/use-direction';
|
|
16
16
|
import { Text } from '../../primitives/text';
|
|
17
17
|
import { cn } from '../../utils/cn';
|
|
18
|
+
import type { ViewRef } from '../../primitives/refs';
|
|
18
19
|
|
|
19
20
|
const SPRING = { damping: 20, stiffness: 180, mass: 0.6 } as const;
|
|
20
21
|
/** Fraction of the track covered by the sliding bar in indeterminate mode. */
|
|
@@ -172,7 +173,7 @@ function formatValue(
|
|
|
172
173
|
* than springing to it, and the indeterminate bar pulses in place rather than
|
|
173
174
|
* crossing the track.
|
|
174
175
|
*/
|
|
175
|
-
export const Progress = forwardRef<
|
|
176
|
+
export const Progress = forwardRef<ViewRef, ProgressProps>(
|
|
176
177
|
(
|
|
177
178
|
{
|
|
178
179
|
className,
|
|
@@ -84,6 +84,7 @@ import {
|
|
|
84
84
|
releaseDuration,
|
|
85
85
|
resolveHoldDuration,
|
|
86
86
|
} from './progress-button-hold';
|
|
87
|
+
import type { ViewRef } from '../../primitives/refs';
|
|
87
88
|
|
|
88
89
|
/** How many steps the reduced-motion fill advances in. */
|
|
89
90
|
const REDUCED_STEPS = 5;
|
|
@@ -324,7 +325,7 @@ export interface ProgressButtonProps
|
|
|
324
325
|
children?: ReactNode;
|
|
325
326
|
}
|
|
326
327
|
|
|
327
|
-
const ProgressButtonRoot = forwardRef<
|
|
328
|
+
const ProgressButtonRoot = forwardRef<ViewRef, ProgressButtonProps>(function ProgressButtonRoot(
|
|
328
329
|
{
|
|
329
330
|
className,
|
|
330
331
|
variant = 'primary',
|
|
@@ -78,6 +78,7 @@ import {
|
|
|
78
78
|
type QRCodeEyeFrameShape,
|
|
79
79
|
type QRCodeModuleShape,
|
|
80
80
|
} from './qr-shapes';
|
|
81
|
+
import type { ViewRef } from '../../primitives/refs';
|
|
81
82
|
|
|
82
83
|
export type { ErrorCorrectionLevel };
|
|
83
84
|
export type { QRCodeModuleShape, QRCodeEyeFrameShape, QRCodeEyeBallShape };
|
|
@@ -212,7 +213,7 @@ export interface QRCodeProps extends Omit<ViewProps, 'children'>, QrCodeVariantP
|
|
|
212
213
|
children?: ReactNode;
|
|
213
214
|
}
|
|
214
215
|
|
|
215
|
-
const QRCodeRoot = forwardRef<
|
|
216
|
+
const QRCodeRoot = forwardRef<ViewRef, QRCodeProps>(
|
|
216
217
|
(
|
|
217
218
|
{
|
|
218
219
|
className,
|
|
@@ -329,7 +330,7 @@ export interface QRCodeCanvasProps extends Omit<ViewProps, 'children'> {
|
|
|
329
330
|
const PLATE = '#ffffff';
|
|
330
331
|
const MODULE = '#111111';
|
|
331
332
|
|
|
332
|
-
const QRCodeCanvas = forwardRef<
|
|
333
|
+
const QRCodeCanvas = forwardRef<ViewRef, QRCodeCanvasProps>(
|
|
333
334
|
(
|
|
334
335
|
{
|
|
335
336
|
className,
|
|
@@ -476,7 +477,7 @@ export interface QRCodeFrameProps extends ViewProps {
|
|
|
476
477
|
* The tray the code sits in — the same widget shell the charts use: a titled
|
|
477
478
|
* strip, and a card flush inside it holding the thing itself.
|
|
478
479
|
*/
|
|
479
|
-
const QRCodeFrame = forwardRef<
|
|
480
|
+
const QRCodeFrame = forwardRef<ViewRef, QRCodeFrameProps>(
|
|
480
481
|
({ className, children, ...props }, ref) => {
|
|
481
482
|
const { slots } = useQRCode('QRCode.Frame');
|
|
482
483
|
return (
|
|
@@ -498,7 +499,7 @@ export interface QRCodeHeaderProps extends ViewProps {
|
|
|
498
499
|
* side and `QRCode.Action` the end, so a long title truncates rather than
|
|
499
500
|
* shoving the trailing slot off the edge.
|
|
500
501
|
*/
|
|
501
|
-
const QRCodeHeader = forwardRef<
|
|
502
|
+
const QRCodeHeader = forwardRef<ViewRef, QRCodeHeaderProps>(
|
|
502
503
|
({ className, children, ...props }, ref) => {
|
|
503
504
|
const { slots } = useQRCode('QRCode.Header');
|
|
504
505
|
return (
|
|
@@ -535,7 +536,7 @@ export interface QRCodeActionProps extends ViewProps {
|
|
|
535
536
|
* The trailing slot on the header row — an expiry, a count, a button. A plain
|
|
536
537
|
* string draws as muted text; anything else draws as itself.
|
|
537
538
|
*/
|
|
538
|
-
const QRCodeAction = forwardRef<
|
|
539
|
+
const QRCodeAction = forwardRef<ViewRef, QRCodeActionProps>(
|
|
539
540
|
({ className, children, ...props }, ref) => {
|
|
540
541
|
useQRCode('QRCode.Action');
|
|
541
542
|
return (
|
|
@@ -567,7 +568,7 @@ export interface QRCodePanelProps extends ViewProps {
|
|
|
567
568
|
* logo positions itself against, so a `QRCode.Logo` belongs in here beside the
|
|
568
569
|
* canvas rather than anywhere else.
|
|
569
570
|
*/
|
|
570
|
-
const QRCodePanel = forwardRef<
|
|
571
|
+
const QRCodePanel = forwardRef<ViewRef, QRCodePanelProps>(
|
|
571
572
|
({ className, children, ...props }, ref) => {
|
|
572
573
|
const { slots } = useQRCode('QRCode.Panel');
|
|
573
574
|
return (
|
|
@@ -683,7 +684,7 @@ function hasLogo(children: ReactNode): boolean {
|
|
|
683
684
|
* Its presence is what clears the square, and what raises the error-correction
|
|
684
685
|
* level if the one asked for could not afford it.
|
|
685
686
|
*/
|
|
686
|
-
const QRCodeLogo = forwardRef<
|
|
687
|
+
const QRCodeLogo = forwardRef<ViewRef, QRCodeLogoProps>(
|
|
687
688
|
({ className, children, ...props }, ref) => {
|
|
688
689
|
const { size, matrix } = useQRCode('QRCode.Logo');
|
|
689
690
|
if (!matrix) return null;
|
|
@@ -127,6 +127,7 @@ import { cn } from '../../utils/cn';
|
|
|
127
127
|
import { Button, type ButtonProps } from '../button';
|
|
128
128
|
import { Frame } from '../frame';
|
|
129
129
|
import { Input, type InputProps } from '../input';
|
|
130
|
+
import type { TextInputRef, ViewRef } from '../../primitives/refs';
|
|
130
131
|
|
|
131
132
|
/** How long the body takes to settle into the next question's height. */
|
|
132
133
|
const HEIGHT_DURATION = 240;
|
|
@@ -912,7 +913,7 @@ function QuestionnaireBody({
|
|
|
912
913
|
// height outright instead of growing into it from nothing.
|
|
913
914
|
const height = useSharedValue(-1);
|
|
914
915
|
const drag = useSharedValue(0);
|
|
915
|
-
const paneRef = useRef<
|
|
916
|
+
const paneRef = useRef<ViewRef>(null);
|
|
916
917
|
|
|
917
918
|
/*
|
|
918
919
|
* Until the first question has been measured the pane stays in the flow, so
|
|
@@ -1520,7 +1521,7 @@ export interface QuestionnaireChoiceProps {
|
|
|
1520
1521
|
* One fixed answer — the whole row is the target, with the indicator reading
|
|
1521
1522
|
* as confirmation rather than as the thing to aim at.
|
|
1522
1523
|
*/
|
|
1523
|
-
const QuestionnaireChoice = forwardRef<
|
|
1524
|
+
const QuestionnaireChoice = forwardRef<ViewRef, QuestionnaireChoiceProps>(
|
|
1524
1525
|
({ className, value, label, description, disabled, children }, ref) => {
|
|
1525
1526
|
const { answers, toggleAnswer } = useQuestionnaire('Questionnaire.Choice');
|
|
1526
1527
|
const item = useQuestionnaireItem('Questionnaire.Choice');
|
|
@@ -1609,7 +1610,7 @@ export interface QuestionnaireInputProps
|
|
|
1609
1610
|
* empties it and typing clears the choice — one answer to one question, with
|
|
1610
1611
|
* neither part having to know about the other.
|
|
1611
1612
|
*/
|
|
1612
|
-
const QuestionnaireInput = forwardRef<
|
|
1613
|
+
const QuestionnaireInput = forwardRef<TextInputRef, QuestionnaireInputProps>(
|
|
1613
1614
|
({ className, ...props }, ref) => {
|
|
1614
1615
|
const { answers, setAnswer } = useQuestionnaire('Questionnaire.Input');
|
|
1615
1616
|
const item = useQuestionnaireItem('Questionnaire.Input');
|