panelui-native 0.115.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 +9 -3
- 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 +7 -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 +23 -7
- 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 +39 -8
- 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 +10 -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
|
@@ -62,6 +62,7 @@ import {
|
|
|
62
62
|
} from '../../primitives/animated-pressable';
|
|
63
63
|
import { Text, type TextProps, textChildren } from '../../primitives/text';
|
|
64
64
|
import { cn } from '../../utils/cn';
|
|
65
|
+
import type { TextRef, ViewRef } from '../../primitives/refs';
|
|
65
66
|
|
|
66
67
|
type GridItemSize = 'default' | 'sm';
|
|
67
68
|
|
|
@@ -191,7 +192,7 @@ function findSpot(
|
|
|
191
192
|
* The grid. Measures its own width, places its tiles, and stands as tall as the
|
|
192
193
|
* rows they ended up needing.
|
|
193
194
|
*/
|
|
194
|
-
const GridItemGroup = forwardRef<
|
|
195
|
+
const GridItemGroup = forwardRef<ViewRef, GridItemGroupProps>(
|
|
195
196
|
(
|
|
196
197
|
{
|
|
197
198
|
className,
|
|
@@ -311,7 +312,7 @@ export interface GridItemProps
|
|
|
311
312
|
* Renders as a pressable when given `onPress`, and as a plain view otherwise,
|
|
312
313
|
* so a tile that is only showing a number does not announce itself as a button.
|
|
313
314
|
*/
|
|
314
|
-
const GridItemRoot = forwardRef<
|
|
315
|
+
const GridItemRoot = forwardRef<ViewRef, GridItemProps>(
|
|
315
316
|
(
|
|
316
317
|
{
|
|
317
318
|
className,
|
|
@@ -374,7 +375,7 @@ export interface GridItemBackgroundProps extends ViewProps {
|
|
|
374
375
|
* grid read as a bento grid rather than as a wall of stat cards, and it is the
|
|
375
376
|
* one part that is meant to be cropped: the tile clips it.
|
|
376
377
|
*/
|
|
377
|
-
const GridItemBackground = forwardRef<
|
|
378
|
+
const GridItemBackground = forwardRef<ViewRef, GridItemBackgroundProps>(
|
|
378
379
|
({ className, children, ...props }, ref) => (
|
|
379
380
|
<View
|
|
380
381
|
ref={ref}
|
|
@@ -397,7 +398,7 @@ export interface GridItemMediaProps
|
|
|
397
398
|
}
|
|
398
399
|
|
|
399
400
|
/** Leading slot: an icon tile, a thumbnail, or an avatar passed through. */
|
|
400
|
-
const GridItemMedia = forwardRef<
|
|
401
|
+
const GridItemMedia = forwardRef<ViewRef, GridItemMediaProps>(
|
|
401
402
|
({ className, variant, size, children, ...props }, ref) => {
|
|
402
403
|
const grid = useContext(GridItemContext);
|
|
403
404
|
|
|
@@ -419,7 +420,7 @@ export interface GridItemTitleProps extends TextProps {
|
|
|
419
420
|
}
|
|
420
421
|
|
|
421
422
|
/** What the tile is of. Quiet, because the number under it is the message. */
|
|
422
|
-
const GridItemTitle = forwardRef<
|
|
423
|
+
const GridItemTitle = forwardRef<TextRef, GridItemTitleProps>(
|
|
423
424
|
({ className, ...props }, ref) => {
|
|
424
425
|
const { size } = useContext(GridItemContext);
|
|
425
426
|
const { title } = gridItemVariants({ size });
|
|
@@ -434,7 +435,7 @@ export interface GridItemValueProps extends TextProps {
|
|
|
434
435
|
}
|
|
435
436
|
|
|
436
437
|
/** The figure. The largest thing on the tile, and the reason it is there. */
|
|
437
|
-
const GridItemValue = forwardRef<
|
|
438
|
+
const GridItemValue = forwardRef<TextRef, GridItemValueProps>(
|
|
438
439
|
({ className, ...props }, ref) => {
|
|
439
440
|
const { size } = useContext(GridItemContext);
|
|
440
441
|
const { value } = gridItemVariants({ size });
|
|
@@ -449,7 +450,7 @@ export interface GridItemDescriptionProps extends TextProps {
|
|
|
449
450
|
}
|
|
450
451
|
|
|
451
452
|
const GridItemDescription = forwardRef<
|
|
452
|
-
|
|
453
|
+
TextRef,
|
|
453
454
|
GridItemDescriptionProps
|
|
454
455
|
>(({ className, ...props }, ref) => {
|
|
455
456
|
const { size } = useContext(GridItemContext);
|
|
@@ -471,7 +472,7 @@ export interface GridItemFooterProps extends ViewProps {
|
|
|
471
472
|
* pushing the footer down with the space left over pins it to the bottom
|
|
472
473
|
* without taking it out of the layout the rest of the tile is sharing.
|
|
473
474
|
*/
|
|
474
|
-
const GridItemFooter = forwardRef<
|
|
475
|
+
const GridItemFooter = forwardRef<ViewRef, GridItemFooterProps>(
|
|
475
476
|
({ className, children, ...props }, ref) => (
|
|
476
477
|
<View
|
|
477
478
|
ref={ref}
|
|
@@ -490,7 +491,7 @@ export interface GridItemActionsProps extends ViewProps {
|
|
|
490
491
|
}
|
|
491
492
|
|
|
492
493
|
/** Trailing slot: buttons, a chip, a chevron. */
|
|
493
|
-
const GridItemActions = forwardRef<
|
|
494
|
+
const GridItemActions = forwardRef<ViewRef, GridItemActionsProps>(
|
|
494
495
|
({ className, children, ...props }, ref) => (
|
|
495
496
|
<View
|
|
496
497
|
ref={ref}
|
|
@@ -75,6 +75,7 @@ import {
|
|
|
75
75
|
} from '../../primitives/chart-accessibility';
|
|
76
76
|
import { cn } from '../../utils/cn';
|
|
77
77
|
import { normalizeWeekStart, startOfDay } from '../../utils/date';
|
|
78
|
+
import type { ViewRef } from '../../primitives/refs';
|
|
78
79
|
|
|
79
80
|
|
|
80
81
|
/**
|
|
@@ -402,7 +403,7 @@ export interface HeatmapChartProps extends ViewProps, ChartAccessibilityProps<He
|
|
|
402
403
|
children?: ReactNode;
|
|
403
404
|
}
|
|
404
405
|
|
|
405
|
-
const HeatmapChartRoot = forwardRef<
|
|
406
|
+
const HeatmapChartRoot = forwardRef<ViewRef, HeatmapChartProps>(function HeatmapChartRoot(
|
|
406
407
|
{
|
|
407
408
|
className,
|
|
408
409
|
data,
|
|
@@ -119,6 +119,7 @@ import {
|
|
|
119
119
|
type Rect,
|
|
120
120
|
type Size,
|
|
121
121
|
} from './image-viewer-geometry';
|
|
122
|
+
import type { ViewRef } from '../../primitives/refs';
|
|
122
123
|
|
|
123
124
|
/** Space between two pages of a gallery, so a page turn reads as two pictures. */
|
|
124
125
|
const PAGE_GAP = 16;
|
|
@@ -475,7 +476,7 @@ function ImageViewerTrigger({
|
|
|
475
476
|
}: ImageViewerTriggerProps) {
|
|
476
477
|
const { store, hiddenId, openItem } = useViewer('ImageViewer.Trigger');
|
|
477
478
|
const id = useId();
|
|
478
|
-
const ref = useRef<
|
|
479
|
+
const ref = useRef<ViewRef>(null);
|
|
479
480
|
const orderRef = useRef<number | null>(null);
|
|
480
481
|
orderRef.current ??= store.nextOrder();
|
|
481
482
|
|
|
@@ -60,6 +60,7 @@ import { KeyboardAvoider } from '../../primitives/keyboard-avoider';
|
|
|
60
60
|
import { Text, textChildren } from '../../primitives/text';
|
|
61
61
|
import { Label } from '../label';
|
|
62
62
|
import { inputContentPadding } from './input-content-padding';
|
|
63
|
+
import type { TextInputRef } from '../../primitives/refs';
|
|
63
64
|
|
|
64
65
|
/** Long enough to read as a transition, short enough not to lag a fast tab. */
|
|
65
66
|
const FOCUS_DURATION = 150;
|
|
@@ -214,7 +215,7 @@ export interface InputProps
|
|
|
214
215
|
|
|
215
216
|
const AnimatedTextInput = Animated.createAnimatedComponent(TextInput);
|
|
216
217
|
|
|
217
|
-
export const Input = forwardRef<
|
|
218
|
+
export const Input = forwardRef<TextInputRef, InputProps>(
|
|
218
219
|
(
|
|
219
220
|
{
|
|
220
221
|
className,
|
|
@@ -28,6 +28,7 @@ import {
|
|
|
28
28
|
type InputGroupDecoratorOwner,
|
|
29
29
|
type InputGroupDecoratorSide,
|
|
30
30
|
} from './input-group-measurements';
|
|
31
|
+
import type { TextInputRef, ViewRef } from '../../primitives/refs';
|
|
31
32
|
|
|
32
33
|
const inputGroupVariants = tv({
|
|
33
34
|
slots: {
|
|
@@ -70,7 +71,7 @@ export interface InputGroupProps extends ViewProps {
|
|
|
70
71
|
children?: ReactNode;
|
|
71
72
|
}
|
|
72
73
|
|
|
73
|
-
const InputGroupRoot = forwardRef<
|
|
74
|
+
const InputGroupRoot = forwardRef<ViewRef, InputGroupProps>(
|
|
74
75
|
({ className, isDisabled = false, children, ...props }, ref) => {
|
|
75
76
|
const { root } = inputGroupVariants();
|
|
76
77
|
const { prefixWidth, suffixWidth, measureDecorator, removeDecorator } =
|
|
@@ -117,7 +118,7 @@ export interface InputGroupDecoratorProps extends ViewProps {
|
|
|
117
118
|
|
|
118
119
|
/** Builds Prefix/Suffix, which differ only in which side they measure. */
|
|
119
120
|
function createDecorator(side: 'prefix' | 'suffix') {
|
|
120
|
-
const Decorator = forwardRef<
|
|
121
|
+
const Decorator = forwardRef<ViewRef, InputGroupDecoratorProps>(
|
|
121
122
|
({ className, isDecorative = false, onLayout, children, ...props }, ref) => {
|
|
122
123
|
const group = useInputGroup();
|
|
123
124
|
const slots = inputGroupVariants({ isDisabled: group?.isDisabled ?? false });
|
|
@@ -163,7 +164,7 @@ export type InputGroupInputProps = InputProps;
|
|
|
163
164
|
* The Input itself. Receives left/right padding matching the measured
|
|
164
165
|
* decorator widths, so its text always clears them.
|
|
165
166
|
*/
|
|
166
|
-
const InputGroupInput = forwardRef<
|
|
167
|
+
const InputGroupInput = forwardRef<TextInputRef, InputGroupInputProps>(
|
|
167
168
|
({ style, disabled, ...props }, ref) => {
|
|
168
169
|
const group = useInputGroup();
|
|
169
170
|
|
|
@@ -30,6 +30,7 @@ import { tv, type VariantProps } from 'tailwind-variants';
|
|
|
30
30
|
import { AnimatedPressable, type AnimatedPressableProps } from '../../primitives/animated-pressable';
|
|
31
31
|
import { Text, type TextProps, textChildren } from '../../primitives/text';
|
|
32
32
|
import { cn } from '../../utils/cn';
|
|
33
|
+
import type { TextRef, ViewRef } from '../../primitives/refs';
|
|
33
34
|
|
|
34
35
|
type ItemSize = 'default' | 'sm' | 'xs';
|
|
35
36
|
type ItemOrientation = 'horizontal' | 'vertical';
|
|
@@ -129,7 +130,7 @@ export interface ItemProps
|
|
|
129
130
|
* Renders as a pressable when given `onPress`, and as a plain view otherwise,
|
|
130
131
|
* so a static row does not announce itself as a button.
|
|
131
132
|
*/
|
|
132
|
-
const ItemRoot = forwardRef<
|
|
133
|
+
const ItemRoot = forwardRef<ViewRef, ItemProps>(
|
|
133
134
|
(
|
|
134
135
|
{
|
|
135
136
|
className,
|
|
@@ -187,7 +188,7 @@ export interface ItemGroupProps extends ViewProps {
|
|
|
187
188
|
}
|
|
188
189
|
|
|
189
190
|
/** Stack of items. Pair with `Item.Separator` between them. */
|
|
190
|
-
const ItemGroup = forwardRef<
|
|
191
|
+
const ItemGroup = forwardRef<ViewRef, ItemGroupProps>(
|
|
191
192
|
({ className, orientation = 'vertical', children, ...props }, ref) => (
|
|
192
193
|
<View
|
|
193
194
|
ref={ref}
|
|
@@ -213,7 +214,7 @@ export interface ItemSeparatorProps extends ViewProps {
|
|
|
213
214
|
}
|
|
214
215
|
|
|
215
216
|
/** Hairline between rows in a group. */
|
|
216
|
-
const ItemSeparator = forwardRef<
|
|
217
|
+
const ItemSeparator = forwardRef<ViewRef, ItemSeparatorProps>(
|
|
217
218
|
({ className, orientation = 'vertical', ...props }, ref) => (
|
|
218
219
|
<View
|
|
219
220
|
ref={ref}
|
|
@@ -236,7 +237,7 @@ export interface ItemMediaProps
|
|
|
236
237
|
}
|
|
237
238
|
|
|
238
239
|
/** Leading slot: an icon tile, a thumbnail, or an avatar passed through. */
|
|
239
|
-
const ItemMedia = forwardRef<
|
|
240
|
+
const ItemMedia = forwardRef<ViewRef, ItemMediaProps>(
|
|
240
241
|
({ className, variant, size, children, ...props }, ref) => {
|
|
241
242
|
const item = useContext(ItemContext);
|
|
242
243
|
|
|
@@ -263,7 +264,7 @@ export interface ItemContentProps extends ViewProps {
|
|
|
263
264
|
* actions stay pinned to the trailing edge; in a vertical one it just fills
|
|
264
265
|
* the width, because there is nothing beside it to push against.
|
|
265
266
|
*/
|
|
266
|
-
const ItemContent = forwardRef<
|
|
267
|
+
const ItemContent = forwardRef<ViewRef, ItemContentProps>(
|
|
267
268
|
({ className, children, ...props }, ref) => {
|
|
268
269
|
const { orientation } = useContext(ItemContext);
|
|
269
270
|
|
|
@@ -288,7 +289,7 @@ export interface ItemTitleProps extends TextProps {
|
|
|
288
289
|
className?: string;
|
|
289
290
|
}
|
|
290
291
|
|
|
291
|
-
const ItemTitle = forwardRef<
|
|
292
|
+
const ItemTitle = forwardRef<TextRef, ItemTitleProps>(
|
|
292
293
|
({ className, ...props }, ref) => {
|
|
293
294
|
const { size } = useContext(ItemContext);
|
|
294
295
|
const { title } = itemVariants({ size });
|
|
@@ -303,7 +304,7 @@ export interface ItemDescriptionProps extends TextProps {
|
|
|
303
304
|
}
|
|
304
305
|
|
|
305
306
|
const ItemDescription = forwardRef<
|
|
306
|
-
|
|
307
|
+
TextRef,
|
|
307
308
|
ItemDescriptionProps
|
|
308
309
|
>(({ className, ...props }, ref) => {
|
|
309
310
|
const { size } = useContext(ItemContext);
|
|
@@ -319,7 +320,7 @@ export interface ItemActionsProps extends ViewProps {
|
|
|
319
320
|
}
|
|
320
321
|
|
|
321
322
|
/** Trailing slot: buttons, a chevron, a switch. */
|
|
322
|
-
const ItemActions = forwardRef<
|
|
323
|
+
const ItemActions = forwardRef<ViewRef, ItemActionsProps>(
|
|
323
324
|
({ className, children, ...props }, ref) => (
|
|
324
325
|
<View
|
|
325
326
|
ref={ref}
|
|
@@ -342,7 +343,7 @@ export interface ItemHeaderProps extends ViewProps {
|
|
|
342
343
|
* row. Needs `orientation="vertical"` on the item, since a strip only makes
|
|
343
344
|
* sense once the item stacks.
|
|
344
345
|
*/
|
|
345
|
-
const ItemHeader = forwardRef<
|
|
346
|
+
const ItemHeader = forwardRef<ViewRef, ItemHeaderProps>(
|
|
346
347
|
({ className, children, ...props }, ref) => (
|
|
347
348
|
<View
|
|
348
349
|
ref={ref}
|
|
@@ -361,7 +362,7 @@ export interface ItemFooterProps extends ViewProps {
|
|
|
361
362
|
}
|
|
362
363
|
|
|
363
364
|
/** Full-width strip below the row's main content. */
|
|
364
|
-
const ItemFooter = forwardRef<
|
|
365
|
+
const ItemFooter = forwardRef<ViewRef, ItemFooterProps>(
|
|
365
366
|
({ className, children, ...props }, ref) => (
|
|
366
367
|
<View
|
|
367
368
|
ref={ref}
|
|
@@ -37,6 +37,7 @@ import { type SeriesColorIndex } from '../../utils/chart';
|
|
|
37
37
|
import { LineChart, type LineChartDatum } from '../line-chart';
|
|
38
38
|
import { Progress } from '../progress';
|
|
39
39
|
import { Surface } from '../surface';
|
|
40
|
+
import type { ViewRef } from '../../primitives/refs';
|
|
40
41
|
|
|
41
42
|
/** Height of the sparkline when nothing else is said. */
|
|
42
43
|
const CHART_HEIGHT = 56;
|
|
@@ -192,7 +193,7 @@ export interface KpiProps extends Omit<ViewProps, 'children'> {
|
|
|
192
193
|
children: ReactNode;
|
|
193
194
|
}
|
|
194
195
|
|
|
195
|
-
const KpiRoot = forwardRef<
|
|
196
|
+
const KpiRoot = forwardRef<ViewRef, KpiProps>(function KpiRoot(
|
|
196
197
|
{ className, colorIndex = 1, goodDirection = 'up', surface = true, children, ...props },
|
|
197
198
|
ref
|
|
198
199
|
) {
|
|
@@ -628,7 +629,7 @@ export interface KpiGroupProps extends ViewProps {
|
|
|
628
629
|
* caller, because "between" is the one thing a list of siblings cannot express
|
|
629
630
|
* — a trailing rule after the last card is the mistake this exists to prevent.
|
|
630
631
|
*/
|
|
631
|
-
const KpiGroup = forwardRef<
|
|
632
|
+
const KpiGroup = forwardRef<ViewRef, KpiGroupProps>(function KpiGroup(
|
|
632
633
|
{ className, orientation = 'horizontal', separated = true, children, ...props },
|
|
633
634
|
ref
|
|
634
635
|
) {
|
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
import { View, type Text as RNText, type ViewProps } from 'react-native';
|
|
18
18
|
import { tv } from 'tailwind-variants';
|
|
19
19
|
import { Text, type TextProps, textChildren } from '../../primitives/text';
|
|
20
|
+
import type { TextRef, ViewRef } from '../../primitives/refs';
|
|
20
21
|
|
|
21
22
|
const labelVariants = tv({
|
|
22
23
|
slots: {
|
|
@@ -59,7 +60,7 @@ export interface LabelProps extends ViewProps {
|
|
|
59
60
|
children?: ReactNode;
|
|
60
61
|
}
|
|
61
62
|
|
|
62
|
-
const LabelRoot = forwardRef<
|
|
63
|
+
const LabelRoot = forwardRef<ViewRef, LabelProps>(
|
|
63
64
|
(
|
|
64
65
|
{
|
|
65
66
|
className,
|
|
@@ -100,7 +101,7 @@ export interface LabelTextProps extends TextProps {
|
|
|
100
101
|
asteriskClassName?: string;
|
|
101
102
|
}
|
|
102
103
|
|
|
103
|
-
const LabelText = forwardRef<
|
|
104
|
+
const LabelText = forwardRef<TextRef, LabelTextProps>(
|
|
104
105
|
({ className, asteriskClassName, children, ...props }, ref) => {
|
|
105
106
|
const { isRequired, isInvalid, isDisabled } = useContext(LabelContext);
|
|
106
107
|
const { text, asterisk } = labelVariants({ isDisabled, isInvalid });
|
|
@@ -49,6 +49,7 @@ import { Text } from '../../primitives/text';
|
|
|
49
49
|
import { cn } from '../../utils/cn';
|
|
50
50
|
import { Avatar } from '../avatar';
|
|
51
51
|
import { podiumHeights, rankEntries, type Ranked } from './leaderboard-rank';
|
|
52
|
+
import type { ViewRef } from '../../primitives/refs';
|
|
52
53
|
|
|
53
54
|
export { rankEntries } from './leaderboard-rank';
|
|
54
55
|
export type { Ranked as LeaderboardRanked } from './leaderboard-rank';
|
|
@@ -326,7 +327,7 @@ function ChangeLabel({ change }: { change: number | undefined }) {
|
|
|
326
327
|
* `limit` for a long board, and `highlightId` to keep the viewer's own row in
|
|
327
328
|
* sight when the limit cuts them off.
|
|
328
329
|
*/
|
|
329
|
-
const LeaderboardRoot = forwardRef<
|
|
330
|
+
const LeaderboardRoot = forwardRef<ViewRef, LeaderboardProps>(function Leaderboard(
|
|
330
331
|
{
|
|
331
332
|
className,
|
|
332
333
|
data,
|
|
@@ -69,6 +69,7 @@ import {
|
|
|
69
69
|
View,
|
|
70
70
|
type LayoutChangeEvent,
|
|
71
71
|
type ViewProps,
|
|
72
|
+
type AppStateStatus,
|
|
72
73
|
} from 'react-native';
|
|
73
74
|
import { Gesture, GestureDetector } from 'react-native-gesture-handler';
|
|
74
75
|
import Animated, {
|
|
@@ -457,7 +458,7 @@ const LiveLineChartRoot = forwardRef<LiveLineChartHandle, LiveLineChartProps>(
|
|
|
457
458
|
now.value = Date.now();
|
|
458
459
|
}, false);
|
|
459
460
|
|
|
460
|
-
const running = liveLineClockRuns({ paused, loading, reducedMotion, appState });
|
|
461
|
+
const running = liveLineClockRuns({ paused, loading, reducedMotion, appState: appState as AppStateStatus });
|
|
461
462
|
|
|
462
463
|
useEffect(() => {
|
|
463
464
|
frame.setActive(running);
|
|
@@ -16,6 +16,13 @@
|
|
|
16
16
|
* - `resampling` becomes `raster-resampling` on a raster layer. Hillshade and
|
|
17
17
|
* color-relief layers have no older name for it, so there it is dropped and
|
|
18
18
|
* the layer keeps the default.
|
|
19
|
+
* - `symbol-height-offset` and `symbol-height-anchor`, which lift a label off
|
|
20
|
+
* the ground in a tilted view, are dropped. Native has nothing like them;
|
|
21
|
+
* without them the label sits on the ground, as it did before they existed.
|
|
22
|
+
* - `fill-layer-opacity` and `line-layer-opacity` fade a whole layer. A plain
|
|
23
|
+
* number is folded into `fill-opacity` or `line-opacity` when that is a plain
|
|
24
|
+
* number too, which looks the same for a layer whose features do not overlap;
|
|
25
|
+
* anything else is dropped and the layer draws at its own opacity.
|
|
19
26
|
* - A tiled source with neither `url` nor `tiles` is removed. Hosted styles use
|
|
20
27
|
* one to carry attribution text. Native cannot parse it, and it draws
|
|
21
28
|
* nothing either way.
|
|
@@ -48,9 +55,17 @@ const OVERLAP = new Map<unknown, boolean>([
|
|
|
48
55
|
['cooperative', false],
|
|
49
56
|
]);
|
|
50
57
|
|
|
58
|
+
/** Layout properties native cannot parse and has no older name for. */
|
|
59
|
+
const DROPPED_LAYOUT = ['symbol-height-offset', 'symbol-height-anchor'];
|
|
60
|
+
|
|
51
61
|
/** The layout with `-overlap` translated, or `null` when it has none. */
|
|
52
62
|
function adaptLayout(layout: Json): Json | null {
|
|
53
63
|
let next: Json | null = null;
|
|
64
|
+
for (const key of DROPPED_LAYOUT) {
|
|
65
|
+
if (!(key in layout)) continue;
|
|
66
|
+
next ??= { ...layout };
|
|
67
|
+
delete next[key];
|
|
68
|
+
}
|
|
54
69
|
for (const kind of ['icon', 'text']) {
|
|
55
70
|
const key = `${kind}-overlap`;
|
|
56
71
|
if (!(key in layout)) continue;
|
|
@@ -65,11 +80,23 @@ function adaptLayout(layout: Json): Json | null {
|
|
|
65
80
|
return next;
|
|
66
81
|
}
|
|
67
82
|
|
|
68
|
-
/** The paint with `resampling` translated, or `null` when it has none. */
|
|
83
|
+
/** The paint with `resampling` and the layer opacities translated, or `null` when it has none. */
|
|
69
84
|
function adaptPaint(type: unknown, paint: Json): Json | null {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
85
|
+
let next: Json | null = null;
|
|
86
|
+
if ('resampling' in paint) {
|
|
87
|
+
const { resampling, ...rest } = paint;
|
|
88
|
+
if (type === 'raster') rest['raster-resampling'] = resampling;
|
|
89
|
+
next = rest;
|
|
90
|
+
}
|
|
91
|
+
for (const kind of ['fill', 'line']) {
|
|
92
|
+
const key = `${kind}-layer-opacity`;
|
|
93
|
+
if (!(key in paint)) continue;
|
|
94
|
+
next ??= { ...paint };
|
|
95
|
+
const layer = next[key];
|
|
96
|
+
const own = next[`${kind}-opacity`] ?? 1;
|
|
97
|
+
delete next[key];
|
|
98
|
+
if (typeof layer === 'number' && typeof own === 'number') next[`${kind}-opacity`] = own * layer;
|
|
99
|
+
}
|
|
73
100
|
return next;
|
|
74
101
|
}
|
|
75
102
|
|
|
@@ -59,7 +59,6 @@ import {
|
|
|
59
59
|
View,
|
|
60
60
|
type NativeSyntheticEvent,
|
|
61
61
|
type TextInput,
|
|
62
|
-
type TextInputSelectionChangeEventData,
|
|
63
62
|
type ViewProps,
|
|
64
63
|
} from 'react-native';
|
|
65
64
|
import { tv } from 'tailwind-variants';
|
|
@@ -97,6 +96,7 @@ import {
|
|
|
97
96
|
type EditResult,
|
|
98
97
|
type EditorSelection,
|
|
99
98
|
} from './markdown-transforms';
|
|
99
|
+
import type { SelectionChangeEvent, TextInputRef, ViewRef } from '../../primitives/refs';
|
|
100
100
|
|
|
101
101
|
export type { EditorSelection, EditResult } from './markdown-transforms';
|
|
102
102
|
|
|
@@ -304,7 +304,7 @@ interface MarkdownEditorContextValue {
|
|
|
304
304
|
clearPending: () => void;
|
|
305
305
|
onChangeText: (next: string) => void;
|
|
306
306
|
/** Registers the field, so the root's ref can focus it. */
|
|
307
|
-
registerField: (field:
|
|
307
|
+
registerField: (field: TextInputRef | null) => void;
|
|
308
308
|
disabled: boolean;
|
|
309
309
|
}
|
|
310
310
|
|
|
@@ -326,7 +326,7 @@ function useMarkdownEditor(part: string): MarkdownEditorContextValue {
|
|
|
326
326
|
*/
|
|
327
327
|
export interface MarkdownEditorHandle {
|
|
328
328
|
/** The container, for measuring and for anything a `View` ref is good for. */
|
|
329
|
-
readonly view:
|
|
329
|
+
readonly view: ViewRef | null;
|
|
330
330
|
/** Runs one of the toolbar's actions against the current selection. */
|
|
331
331
|
apply: (action: MarkdownEditorAction) => void;
|
|
332
332
|
/** Which actions are already in effect where the caret is. */
|
|
@@ -407,8 +407,8 @@ const MarkdownEditorRoot = forwardRef<MarkdownEditorHandle, MarkdownEditorProps>
|
|
|
407
407
|
ref
|
|
408
408
|
) => {
|
|
409
409
|
const slots = markdownEditorVariants();
|
|
410
|
-
const viewRef = useRef<
|
|
411
|
-
const fieldRef = useRef<
|
|
410
|
+
const viewRef = useRef<ViewRef>(null);
|
|
411
|
+
const fieldRef = useRef<TextInputRef | null>(null);
|
|
412
412
|
|
|
413
413
|
const [internalValue, setInternalValue] = useState(defaultValue);
|
|
414
414
|
const value = valueProp ?? internalValue;
|
|
@@ -536,7 +536,7 @@ const MarkdownEditorRoot = forwardRef<MarkdownEditorHandle, MarkdownEditorProps>
|
|
|
536
536
|
[continueLists, commit, readActive]
|
|
537
537
|
);
|
|
538
538
|
|
|
539
|
-
const registerField = useCallback((field:
|
|
539
|
+
const registerField = useCallback((field: TextInputRef | null) => {
|
|
540
540
|
fieldRef.current = field;
|
|
541
541
|
}, []);
|
|
542
542
|
|
|
@@ -652,7 +652,7 @@ export interface MarkdownEditorToolbarProps extends Omit<ViewProps, 'children'>
|
|
|
652
652
|
* here is a toggle, and a toggle that looks the same in both states is a toggle
|
|
653
653
|
* nobody discovers is one.
|
|
654
654
|
*/
|
|
655
|
-
const MarkdownEditorToolbar = forwardRef<
|
|
655
|
+
const MarkdownEditorToolbar = forwardRef<ViewRef, MarkdownEditorToolbarProps>(
|
|
656
656
|
(
|
|
657
657
|
{
|
|
658
658
|
className,
|
|
@@ -784,7 +784,7 @@ export interface MarkdownEditorInputProps
|
|
|
784
784
|
* Renders nothing while the preview is up. Unmounted rather than hidden: a
|
|
785
785
|
* field kept alive behind the preview keeps the keyboard up with it.
|
|
786
786
|
*/
|
|
787
|
-
const MarkdownEditorInput = forwardRef<
|
|
787
|
+
const MarkdownEditorInput = forwardRef<TextInputRef, MarkdownEditorInputProps>(
|
|
788
788
|
({ className, rows = 8, ...props }, ref) => {
|
|
789
789
|
const {
|
|
790
790
|
value,
|
|
@@ -802,7 +802,7 @@ const MarkdownEditorInput = forwardRef<TextInput, MarkdownEditorInputProps>(
|
|
|
802
802
|
* forwarded so a caller's ref still works. Both, rather than either.
|
|
803
803
|
*/
|
|
804
804
|
const attach = useCallback(
|
|
805
|
-
(field:
|
|
805
|
+
(field: TextInputRef | null) => {
|
|
806
806
|
registerField(field);
|
|
807
807
|
if (typeof ref === 'function') ref(field);
|
|
808
808
|
else if (ref) ref.current = field;
|
|
@@ -819,7 +819,7 @@ const MarkdownEditorInput = forwardRef<TextInput, MarkdownEditorInputProps>(
|
|
|
819
819
|
* end of the document instead of between the markers just inserted.
|
|
820
820
|
*/
|
|
821
821
|
const handleSelectionChange = useCallback(
|
|
822
|
-
(event:
|
|
822
|
+
(event: SelectionChangeEvent) => {
|
|
823
823
|
const { selection } = event.nativeEvent;
|
|
824
824
|
setSelection(selection);
|
|
825
825
|
if (
|
|
@@ -874,7 +874,7 @@ export interface MarkdownEditorPreviewProps extends Omit<ViewProps, 'children'>
|
|
|
874
874
|
* Renders nothing while the field is up, which is what makes the two one pane
|
|
875
875
|
* rather than two.
|
|
876
876
|
*/
|
|
877
|
-
const MarkdownEditorPreview = forwardRef<
|
|
877
|
+
const MarkdownEditorPreview = forwardRef<ViewRef, MarkdownEditorPreviewProps>(
|
|
878
878
|
({ className, emptyText = 'Nothing to preview yet.', ...props }, ref) => {
|
|
879
879
|
const { value, mode } = useMarkdownEditor('MarkdownEditor.Preview');
|
|
880
880
|
const slots = markdownEditorVariants();
|
|
@@ -29,6 +29,7 @@ import { Text, type TextProps, textChildren } from '../../primitives/text';
|
|
|
29
29
|
import { cn } from '../../utils/cn';
|
|
30
30
|
import { Separator } from '../separator';
|
|
31
31
|
import { Shimmer } from '../shimmer';
|
|
32
|
+
import type { TextRef, ViewRef } from '../../primitives/refs';
|
|
32
33
|
|
|
33
34
|
type MarkerVariant = 'default' | 'border' | 'separator';
|
|
34
35
|
|
|
@@ -80,7 +81,7 @@ export interface MarkerProps
|
|
|
80
81
|
* Renders as a pressable when given `onPress` and as a plain view otherwise,
|
|
81
82
|
* so a marker that does nothing does not announce itself as a button.
|
|
82
83
|
*/
|
|
83
|
-
const MarkerRoot = forwardRef<
|
|
84
|
+
const MarkerRoot = forwardRef<ViewRef, MarkerProps>(
|
|
84
85
|
({ className, variant = 'default', disabled, children, onPress, ...props }, ref) => {
|
|
85
86
|
const { root } = markerVariants({ variant, disabled: !!disabled });
|
|
86
87
|
|
|
@@ -134,7 +135,7 @@ export interface MarkerIconProps extends ViewProps {
|
|
|
134
135
|
* Decorative leading slot. Hidden from screen readers — the icon repeats what
|
|
135
136
|
* the content already says, and announcing it twice is noise.
|
|
136
137
|
*/
|
|
137
|
-
const MarkerIcon = forwardRef<
|
|
138
|
+
const MarkerIcon = forwardRef<ViewRef, MarkerIconProps>(
|
|
138
139
|
({ className, children, ...props }, ref) => {
|
|
139
140
|
// Icons here take the muted foreground, so a marker reads as chrome next to
|
|
140
141
|
// a message rather than competing with it.
|
|
@@ -168,7 +169,7 @@ export interface MarkerContentProps extends TextProps {
|
|
|
168
169
|
children?: ReactNode;
|
|
169
170
|
}
|
|
170
171
|
|
|
171
|
-
const MarkerContent = forwardRef<
|
|
172
|
+
const MarkerContent = forwardRef<TextRef, MarkerContentProps>(
|
|
172
173
|
({ className, shimmer, children, ...props }, ref) => {
|
|
173
174
|
const variant = useContext(MarkerContext);
|
|
174
175
|
const { content } = markerVariants({ variant });
|
|
@@ -82,6 +82,7 @@ import {
|
|
|
82
82
|
marqueeCopyCount,
|
|
83
83
|
normalizeMarqueeSpeed,
|
|
84
84
|
} from './marquee-math';
|
|
85
|
+
import { webDeps } from '../../primitives/web-deps';
|
|
85
86
|
|
|
86
87
|
export type MarqueeDirection = 'horizontal' | 'vertical';
|
|
87
88
|
|
|
@@ -242,7 +243,7 @@ function MarqueeRoot({
|
|
|
242
243
|
return {
|
|
243
244
|
transform: [horizontal ? { translateX: travel } : { translateY: travel }],
|
|
244
245
|
};
|
|
245
|
-
}, [horizontal, reverse, flip]);
|
|
246
|
+
}, webDeps([horizontal, reverse, flip]));
|
|
246
247
|
|
|
247
248
|
// The container's own measurement is what sizes the loop, so an `onLayout`
|
|
248
249
|
// passed in is called alongside it rather than replacing it.
|
|
@@ -36,6 +36,7 @@ import { IconColorProvider } from '../../icons';
|
|
|
36
36
|
import { AnimatedPressable } from '../../primitives/animated-pressable';
|
|
37
37
|
import { Text, type TextProps, textChildren } from '../../primitives/text';
|
|
38
38
|
import { cn } from '../../utils/cn';
|
|
39
|
+
import type { TextRef, ViewRef } from '../../primitives/refs';
|
|
39
40
|
|
|
40
41
|
const messageVariants = tv({
|
|
41
42
|
slots: {
|
|
@@ -121,7 +122,7 @@ export interface MessageProps
|
|
|
121
122
|
children?: ReactNode;
|
|
122
123
|
}
|
|
123
124
|
|
|
124
|
-
const MessageRoot = forwardRef<
|
|
125
|
+
const MessageRoot = forwardRef<ViewRef, MessageProps>(
|
|
125
126
|
({ className, align, stacked = false, onLongPress, children, ...props }, ref) => {
|
|
126
127
|
const group = useContext(GroupContext);
|
|
127
128
|
const resolvedAlign = align ?? group?.align ?? 'start';
|
|
@@ -166,7 +167,7 @@ export interface MessageGroupProps extends ViewProps {
|
|
|
166
167
|
* marks every message after the first as `stacked`, so only the first shows an
|
|
167
168
|
* avatar and the rest stay aligned with it.
|
|
168
169
|
*/
|
|
169
|
-
const MessageGroup = forwardRef<
|
|
170
|
+
const MessageGroup = forwardRef<ViewRef, MessageGroupProps>(
|
|
170
171
|
({ className, align = 'start', children, ...props }, ref) => {
|
|
171
172
|
const { group } = messageVariants({ align });
|
|
172
173
|
|
|
@@ -200,7 +201,7 @@ export interface MessageAvatarProps extends ViewProps {
|
|
|
200
201
|
* left empty, which keeps the bubbles in a column instead of letting the
|
|
201
202
|
* second one slide under the first one's avatar.
|
|
202
203
|
*/
|
|
203
|
-
const MessageAvatar = forwardRef<
|
|
204
|
+
const MessageAvatar = forwardRef<ViewRef, MessageAvatarProps>(
|
|
204
205
|
({ className, children, ...props }, ref) => {
|
|
205
206
|
const { stacked } = useMessageContext();
|
|
206
207
|
const { avatar } = messageVariants();
|
|
@@ -220,7 +221,7 @@ export interface MessageContentProps extends ViewProps {
|
|
|
220
221
|
}
|
|
221
222
|
|
|
222
223
|
/** Column holding the header, bubble and footer. */
|
|
223
|
-
const MessageContent = forwardRef<
|
|
224
|
+
const MessageContent = forwardRef<ViewRef, MessageContentProps>(
|
|
224
225
|
({ className, children, ...props }, ref) => {
|
|
225
226
|
const { align } = useMessageContext();
|
|
226
227
|
const { content } = messageVariants({ align });
|
|
@@ -239,7 +240,7 @@ export interface MessageHeaderProps extends TextProps {
|
|
|
239
240
|
}
|
|
240
241
|
|
|
241
242
|
/** Sender name or timestamp above the bubble. */
|
|
242
|
-
const MessageHeader = forwardRef<
|
|
243
|
+
const MessageHeader = forwardRef<TextRef, MessageHeaderProps>(
|
|
243
244
|
({ className, ...props }, ref) => {
|
|
244
245
|
const { align } = useMessageContext();
|
|
245
246
|
const { header } = messageVariants({ align });
|
|
@@ -255,7 +256,7 @@ export interface MessageBubbleProps extends ViewProps {
|
|
|
255
256
|
}
|
|
256
257
|
|
|
257
258
|
/** The speech bubble. Takes its colour and squared corner from `align`. */
|
|
258
|
-
const MessageBubble = forwardRef<
|
|
259
|
+
const MessageBubble = forwardRef<ViewRef, MessageBubbleProps>(
|
|
259
260
|
({ className, children, ...props }, ref) => {
|
|
260
261
|
const { align } = useMessageContext();
|
|
261
262
|
const { bubble } = messageVariants({ align });
|
|
@@ -289,7 +290,7 @@ export interface MessageBubbleContentProps extends TextProps {
|
|
|
289
290
|
|
|
290
291
|
/** Text inside the bubble, in whichever colour reads against it. */
|
|
291
292
|
const MessageBubbleContent = forwardRef<
|
|
292
|
-
|
|
293
|
+
TextRef,
|
|
293
294
|
MessageBubbleContentProps
|
|
294
295
|
>(({ className, ...props }, ref) => {
|
|
295
296
|
const { align } = useMessageContext();
|
|
@@ -304,7 +305,7 @@ export interface MessageFooterProps extends TextProps {
|
|
|
304
305
|
}
|
|
305
306
|
|
|
306
307
|
/** Delivery state, timestamp or actions below the bubble. */
|
|
307
|
-
const MessageFooter = forwardRef<
|
|
308
|
+
const MessageFooter = forwardRef<TextRef, MessageFooterProps>(
|
|
308
309
|
({ className, ...props }, ref) => {
|
|
309
310
|
const { align } = useMessageContext();
|
|
310
311
|
const { footer } = messageVariants({ align });
|
|
@@ -320,7 +321,7 @@ export interface MessageActionsProps extends ViewProps {
|
|
|
320
321
|
}
|
|
321
322
|
|
|
322
323
|
/** Row of controls under the bubble — copy, retry, feedback. */
|
|
323
|
-
const MessageActions = forwardRef<
|
|
324
|
+
const MessageActions = forwardRef<ViewRef, MessageActionsProps>(
|
|
324
325
|
({ className, children, ...props }, ref) => {
|
|
325
326
|
const { align } = useMessageContext();
|
|
326
327
|
|