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
|
@@ -52,6 +52,7 @@ import Animated, {
|
|
|
52
52
|
import { tv } from 'tailwind-variants';
|
|
53
53
|
import { ChevronDownIcon } from '../../icons';
|
|
54
54
|
import { Text, type TextProps, textChildren } from '../../primitives/text';
|
|
55
|
+
import type { TextRef, ViewRef } from '../../primitives/refs';
|
|
55
56
|
|
|
56
57
|
export type AccordionVariant =
|
|
57
58
|
| 'default'
|
|
@@ -165,7 +166,7 @@ export interface AccordionProps extends ViewProps {
|
|
|
165
166
|
const toArray = (value: string | string[] | undefined): string[] =>
|
|
166
167
|
value === undefined ? [] : Array.isArray(value) ? value : [value];
|
|
167
168
|
|
|
168
|
-
const AccordionRoot = forwardRef<
|
|
169
|
+
const AccordionRoot = forwardRef<ViewRef, AccordionProps>(
|
|
169
170
|
(
|
|
170
171
|
{
|
|
171
172
|
className,
|
|
@@ -247,7 +248,7 @@ export interface AccordionItemProps extends ViewProps {
|
|
|
247
248
|
children?: ReactNode;
|
|
248
249
|
}
|
|
249
250
|
|
|
250
|
-
const AccordionItem = forwardRef<
|
|
251
|
+
const AccordionItem = forwardRef<ViewRef, AccordionItemProps>(
|
|
251
252
|
({ className, value, isDisabled = false, children, ...props }, ref) => {
|
|
252
253
|
const { expanded, variant } = useAccordion('Accordion.Item');
|
|
253
254
|
const reducedMotion = useReducedMotion();
|
|
@@ -281,7 +282,7 @@ export interface AccordionTriggerProps extends Omit<PressableProps, 'children'>
|
|
|
281
282
|
}
|
|
282
283
|
|
|
283
284
|
/** The pressable header row. Bare strings are wrapped in the title style. */
|
|
284
|
-
const AccordionTrigger = forwardRef<
|
|
285
|
+
const AccordionTrigger = forwardRef<ViewRef, AccordionTriggerProps>(
|
|
285
286
|
({ className, children, onPress, disabled = false, ...props }, ref) => {
|
|
286
287
|
const { toggle, variant } = useAccordion('Accordion.Trigger');
|
|
287
288
|
const { value, isExpanded, isDisabled } = useAccordionItem('Accordion.Trigger');
|
|
@@ -317,7 +318,7 @@ export interface AccordionIndicatorProps extends ViewProps {
|
|
|
317
318
|
}
|
|
318
319
|
|
|
319
320
|
/** Chevron that rotates 180° while the item is open. */
|
|
320
|
-
const AccordionIndicator = forwardRef<
|
|
321
|
+
const AccordionIndicator = forwardRef<ViewRef, AccordionIndicatorProps>(
|
|
321
322
|
({ className, children, ...props }, ref) => {
|
|
322
323
|
const { variant } = useAccordion('Accordion.Indicator');
|
|
323
324
|
const { isExpanded } = useAccordionItem('Accordion.Indicator');
|
|
@@ -385,7 +386,7 @@ export interface AccordionContentProps extends ViewProps {
|
|
|
385
386
|
* accessibility tree, though, so it is explicitly taken out of that too;
|
|
386
387
|
* otherwise a screen reader would read out a section the eye cannot see.
|
|
387
388
|
*/
|
|
388
|
-
const AccordionContent = forwardRef<
|
|
389
|
+
const AccordionContent = forwardRef<ViewRef, AccordionContentProps>(
|
|
389
390
|
({ className, keepMounted, children, ...props }, ref) => {
|
|
390
391
|
const { variant, keepMounted: keepMountedDefault } = useAccordion('Accordion.Content');
|
|
391
392
|
const { isExpanded } = useAccordionItem('Accordion.Content');
|
|
@@ -414,7 +415,7 @@ const AccordionContent = forwardRef<View, AccordionContentProps>(
|
|
|
414
415
|
);
|
|
415
416
|
AccordionContent.displayName = 'Accordion.Content';
|
|
416
417
|
|
|
417
|
-
const AccordionTitle = forwardRef<
|
|
418
|
+
const AccordionTitle = forwardRef<TextRef, TextProps>(({ className, ...props }, ref) => {
|
|
418
419
|
const { variant } = useAccordion('Accordion.Title');
|
|
419
420
|
const { title } = accordionVariants({ variant });
|
|
420
421
|
return <Text ref={ref} className={title({ className })} {...props} />;
|
|
@@ -102,6 +102,7 @@ import { Button } from '../button';
|
|
|
102
102
|
import { Soundwave } from '../soundwave';
|
|
103
103
|
import { Switch } from '../switch';
|
|
104
104
|
import { AI_INPUT_METRICS, growthBounds, type AIInputSize } from './ai-input-growth';
|
|
105
|
+
import type { ViewRef } from '../../primitives/refs';
|
|
105
106
|
|
|
106
107
|
/** What the app is doing, which is what the trailing button offers to do next. */
|
|
107
108
|
export type AIInputStatus = 'ready' | 'recording' | 'submitted' | 'streaming';
|
|
@@ -1429,7 +1430,7 @@ function AIInputSheetBody({
|
|
|
1429
1430
|
}) {
|
|
1430
1431
|
const { width } = useWindowDimensions();
|
|
1431
1432
|
const height = useSharedValue(-1);
|
|
1432
|
-
const paneRef = useRef<
|
|
1433
|
+
const paneRef = useRef<ViewRef>(null);
|
|
1433
1434
|
|
|
1434
1435
|
/*
|
|
1435
1436
|
* Whether the screen is lifted out of the flow onto its own layer.
|
|
@@ -12,6 +12,7 @@ import { useCSSVariable } from 'uniwind';
|
|
|
12
12
|
import { cn } from '../../utils/cn';
|
|
13
13
|
import { Text, type TextProps, textChildren } from '../../primitives/text';
|
|
14
14
|
import { AlertTriangleIcon, CheckCircleIcon, InfoIcon } from '../../icons';
|
|
15
|
+
import type { TextRef, ViewRef } from '../../primitives/refs';
|
|
15
16
|
|
|
16
17
|
const alertVariants = tv({
|
|
17
18
|
slots: {
|
|
@@ -83,7 +84,7 @@ export interface AlertProps extends ViewProps, VariantProps<typeof alertVariants
|
|
|
83
84
|
children?: ReactNode;
|
|
84
85
|
}
|
|
85
86
|
|
|
86
|
-
const AlertRoot = forwardRef<
|
|
87
|
+
const AlertRoot = forwardRef<ViewRef, AlertProps>(
|
|
87
88
|
({ className, variant = 'default', icon, children, ...props }, ref) => {
|
|
88
89
|
const { root, indicator, content } = alertVariants({ variant });
|
|
89
90
|
|
|
@@ -122,7 +123,7 @@ export interface AlertIndicatorProps extends ViewProps {
|
|
|
122
123
|
* Leading status icon. Resolves both the icon and its colour from the parent
|
|
123
124
|
* Alert's variant, so it follows the active theme.
|
|
124
125
|
*/
|
|
125
|
-
const AlertIndicator = forwardRef<
|
|
126
|
+
const AlertIndicator = forwardRef<ViewRef, AlertIndicatorProps>(
|
|
126
127
|
({ className, iconProps, children, ...props }, ref) => {
|
|
127
128
|
const variant = useContext(AlertContext);
|
|
128
129
|
const { indicator } = alertVariants({ variant });
|
|
@@ -142,7 +143,7 @@ const AlertIndicator = forwardRef<View, AlertIndicatorProps>(
|
|
|
142
143
|
AlertIndicator.displayName = 'Alert.Indicator';
|
|
143
144
|
|
|
144
145
|
/** Flex-1 wrapper for Alert.Title and Alert.Description. */
|
|
145
|
-
const AlertContent = forwardRef<
|
|
146
|
+
const AlertContent = forwardRef<ViewRef, ViewProps & { className?: string }>(
|
|
146
147
|
({ className, ...props }, ref) => {
|
|
147
148
|
const variant = useContext(AlertContext);
|
|
148
149
|
const { content } = alertVariants({ variant });
|
|
@@ -151,7 +152,7 @@ const AlertContent = forwardRef<View, ViewProps & { className?: string }>(
|
|
|
151
152
|
);
|
|
152
153
|
AlertContent.displayName = 'Alert.Content';
|
|
153
154
|
|
|
154
|
-
const AlertTitle = forwardRef<
|
|
155
|
+
const AlertTitle = forwardRef<TextRef, TextProps>(
|
|
155
156
|
({ className, ...props }, ref) => {
|
|
156
157
|
const variant = useContext(AlertContext);
|
|
157
158
|
const { title } = alertVariants({ variant });
|
|
@@ -160,7 +161,7 @@ const AlertTitle = forwardRef<RNText, TextProps>(
|
|
|
160
161
|
);
|
|
161
162
|
AlertTitle.displayName = 'Alert.Title';
|
|
162
163
|
|
|
163
|
-
const AlertDescription = forwardRef<
|
|
164
|
+
const AlertDescription = forwardRef<TextRef, TextProps>(
|
|
164
165
|
({ className, ...props }, ref) => {
|
|
165
166
|
const variant = useContext(AlertContext);
|
|
166
167
|
const { description } = alertVariants({ variant });
|
|
@@ -76,6 +76,7 @@ import {
|
|
|
76
76
|
} from '../../icons';
|
|
77
77
|
import { IconColorProvider } from '../../icons';
|
|
78
78
|
import { Text, textChildren, textLabel } from '../../primitives/text';
|
|
79
|
+
import type { ViewRef } from '../../primitives/refs';
|
|
79
80
|
|
|
80
81
|
/** How long the pulse takes to swell and settle again, in milliseconds. */
|
|
81
82
|
const PULSE_DURATION = 800;
|
|
@@ -242,7 +243,7 @@ export interface AnimatedBadgeProps
|
|
|
242
243
|
labelClassName?: string;
|
|
243
244
|
}
|
|
244
245
|
|
|
245
|
-
export const AnimatedBadge = forwardRef<
|
|
246
|
+
export const AnimatedBadge = forwardRef<ViewRef, AnimatedBadgeProps>(
|
|
246
247
|
(
|
|
247
248
|
{
|
|
248
249
|
status: statusProp = 'neutral',
|
|
@@ -35,6 +35,7 @@ import { Text, type TextProps, textChildren } from '../../primitives/text';
|
|
|
35
35
|
import { cn } from '../../utils/cn';
|
|
36
36
|
import { Item } from '../item';
|
|
37
37
|
import { Shimmer } from '../shimmer';
|
|
38
|
+
import type { TextRef, ViewRef } from '../../primitives/refs';
|
|
38
39
|
|
|
39
40
|
export type AttachmentState = 'idle' | 'uploading' | 'processing' | 'error' | 'done';
|
|
40
41
|
type AttachmentSize = 'default' | 'sm' | 'xs';
|
|
@@ -86,7 +87,7 @@ export interface AttachmentProps
|
|
|
86
87
|
children?: ReactNode;
|
|
87
88
|
}
|
|
88
89
|
|
|
89
|
-
const AttachmentRoot = forwardRef<
|
|
90
|
+
const AttachmentRoot = forwardRef<ViewRef, AttachmentProps>(
|
|
90
91
|
(
|
|
91
92
|
{ className, state = 'done', size = 'default', orientation, progress, children, ...props },
|
|
92
93
|
ref
|
|
@@ -132,7 +133,7 @@ export interface AttachmentGroupProps extends ViewProps {
|
|
|
132
133
|
}
|
|
133
134
|
|
|
134
135
|
/** A row (or column) of attachments — the same stack `Item.Group` provides. */
|
|
135
|
-
const AttachmentGroup = forwardRef<
|
|
136
|
+
const AttachmentGroup = forwardRef<ViewRef, AttachmentGroupProps>(
|
|
136
137
|
({ className, orientation = 'vertical', children, ...props }, ref) => (
|
|
137
138
|
<Item.Group ref={ref} orientation={orientation} className={className} {...props}>
|
|
138
139
|
{children}
|
|
@@ -149,7 +150,7 @@ export interface AttachmentMediaProps extends ViewProps {
|
|
|
149
150
|
}
|
|
150
151
|
|
|
151
152
|
/** Leading slot — a file-type icon tile, or an image thumbnail. */
|
|
152
|
-
const AttachmentMedia = forwardRef<
|
|
153
|
+
const AttachmentMedia = forwardRef<ViewRef, AttachmentMediaProps>(
|
|
153
154
|
({ className, variant = 'icon', children, ...props }, ref) => (
|
|
154
155
|
<Item.Media ref={ref} variant={variant} className={className} {...props}>
|
|
155
156
|
{children}
|
|
@@ -163,7 +164,7 @@ export interface AttachmentContentProps extends ViewProps {
|
|
|
163
164
|
children?: ReactNode;
|
|
164
165
|
}
|
|
165
166
|
|
|
166
|
-
const AttachmentContent = forwardRef<
|
|
167
|
+
const AttachmentContent = forwardRef<ViewRef, AttachmentContentProps>(
|
|
167
168
|
({ className, children, ...props }, ref) => (
|
|
168
169
|
<Item.Content ref={ref} className={className} {...props}>
|
|
169
170
|
{children}
|
|
@@ -178,7 +179,7 @@ export interface AttachmentTitleProps extends TextProps {
|
|
|
178
179
|
}
|
|
179
180
|
|
|
180
181
|
/** The file name. Shimmers while the file is uploading or processing. */
|
|
181
|
-
const AttachmentTitle = forwardRef<
|
|
182
|
+
const AttachmentTitle = forwardRef<TextRef, AttachmentTitleProps>(
|
|
182
183
|
({ className, children, ...props }, ref) => {
|
|
183
184
|
const { state } = useContext(AttachmentContext);
|
|
184
185
|
|
|
@@ -207,7 +208,7 @@ export interface AttachmentDescriptionProps extends TextProps {
|
|
|
207
208
|
|
|
208
209
|
/** File type, size or status. Tints destructive on `error`. */
|
|
209
210
|
const AttachmentDescription = forwardRef<
|
|
210
|
-
|
|
211
|
+
TextRef,
|
|
211
212
|
AttachmentDescriptionProps
|
|
212
213
|
>(({ className, children, ...props }, ref) => {
|
|
213
214
|
const { state } = useContext(AttachmentContext);
|
|
@@ -229,7 +230,7 @@ export interface AttachmentActionsProps extends ViewProps {
|
|
|
229
230
|
children?: ReactNode;
|
|
230
231
|
}
|
|
231
232
|
|
|
232
|
-
const AttachmentActions = forwardRef<
|
|
233
|
+
const AttachmentActions = forwardRef<ViewRef, AttachmentActionsProps>(
|
|
233
234
|
({ className, children, ...props }, ref) => (
|
|
234
235
|
<Item.Actions ref={ref} className={className} {...props}>
|
|
235
236
|
{children}
|
|
@@ -249,7 +250,7 @@ export interface AttachmentActionProps
|
|
|
249
250
|
* A single icon button in the actions slot — remove, retry, download. An icon
|
|
250
251
|
* on its own says nothing to a screen reader, so the label is required.
|
|
251
252
|
*/
|
|
252
|
-
const AttachmentAction = forwardRef<
|
|
253
|
+
const AttachmentAction = forwardRef<ViewRef, AttachmentActionProps>(
|
|
253
254
|
({ className, accessibilityLabel, children, ...props }, ref) => (
|
|
254
255
|
<AnimatedPressable
|
|
255
256
|
ref={ref}
|
|
@@ -23,6 +23,7 @@ import {
|
|
|
23
23
|
type AvatarSizeName,
|
|
24
24
|
} from './avatar-group';
|
|
25
25
|
import { avatarSourceIdentity } from './avatar-source';
|
|
26
|
+
import type { ViewRef } from '../../primitives/refs';
|
|
26
27
|
|
|
27
28
|
const avatarVariants = tv({
|
|
28
29
|
slots: {
|
|
@@ -67,7 +68,7 @@ export interface AvatarProps extends ViewProps, VariantProps<typeof avatarVarian
|
|
|
67
68
|
imageProps?: Omit<ImageProps, 'source'>;
|
|
68
69
|
}
|
|
69
70
|
|
|
70
|
-
const AvatarRoot = forwardRef<
|
|
71
|
+
const AvatarRoot = forwardRef<ViewRef, AvatarProps>(
|
|
71
72
|
({ className, size, source, fallback, imageProps, children, ...props }, ref) => {
|
|
72
73
|
const [failedSource, setFailedSource] = useState<string>();
|
|
73
74
|
const { root, image, fallback: fallbackSlot } = avatarVariants({ size });
|
|
@@ -128,7 +129,7 @@ export interface AvatarBadgeProps extends ViewProps {
|
|
|
128
129
|
* The ring is `border-background` so the badge separates from the image
|
|
129
130
|
* whatever surface the avatar sits on.
|
|
130
131
|
*/
|
|
131
|
-
const AvatarBadge = forwardRef<
|
|
132
|
+
const AvatarBadge = forwardRef<ViewRef, AvatarBadgeProps>(
|
|
132
133
|
({ className, children, ...props }, ref) => (
|
|
133
134
|
<View
|
|
134
135
|
ref={ref}
|
|
@@ -184,7 +185,7 @@ export interface AvatarGroupProps extends ViewProps {
|
|
|
184
185
|
* </Avatar.Group>
|
|
185
186
|
* ```
|
|
186
187
|
*/
|
|
187
|
-
const AvatarGroup = forwardRef<
|
|
188
|
+
const AvatarGroup = forwardRef<ViewRef, AvatarGroupProps>(
|
|
188
189
|
({ className, size = 'md', max, total, overlap, children, ...props }, ref) => {
|
|
189
190
|
const faces = Children.toArray(children).filter(isValidElement) as ReactElement<AvatarProps>[];
|
|
190
191
|
const { visible, overflow } = avatarGroupCount(faces.length, max, total);
|
|
@@ -98,6 +98,7 @@ import {
|
|
|
98
98
|
type Size,
|
|
99
99
|
type SourceCrop,
|
|
100
100
|
} from './avatar-cropper-math';
|
|
101
|
+
import type { ViewRef } from '../../primitives/refs';
|
|
101
102
|
|
|
102
103
|
export type { CropShape as AvatarCropperShape, SourceCrop as AvatarCrop };
|
|
103
104
|
|
|
@@ -633,7 +634,7 @@ function ExportStage({
|
|
|
633
634
|
left: number;
|
|
634
635
|
top: number;
|
|
635
636
|
}) {
|
|
636
|
-
const ref = useRef<
|
|
637
|
+
const ref = useRef<ViewRef>(null);
|
|
637
638
|
const started = useRef(false);
|
|
638
639
|
const side = frame.mask;
|
|
639
640
|
const { width, height } = frame.image;
|
|
@@ -2,6 +2,7 @@ import { forwardRef, type ReactNode } from 'react';
|
|
|
2
2
|
import { View, type ViewProps } from 'react-native';
|
|
3
3
|
import { tv, type VariantProps } from 'tailwind-variants';
|
|
4
4
|
import { Text, textChildren } from '../../primitives/text';
|
|
5
|
+
import type { ViewRef } from '../../primitives/refs';
|
|
5
6
|
|
|
6
7
|
const badgeVariants = tv({
|
|
7
8
|
slots: {
|
|
@@ -77,7 +78,7 @@ export interface BadgeProps
|
|
|
77
78
|
count?: number;
|
|
78
79
|
}
|
|
79
80
|
|
|
80
|
-
export const Badge = forwardRef<
|
|
81
|
+
export const Badge = forwardRef<ViewRef, BadgeProps>(
|
|
81
82
|
({ children, className, labelClassName, variant, shape, size, count, ...props }, ref) => {
|
|
82
83
|
const resolvedShape = shape ?? (count !== undefined ? 'count' : 'default');
|
|
83
84
|
const { root, label } = badgeVariants({ variant, shape: resolvedShape, size });
|
|
@@ -49,6 +49,7 @@ import {
|
|
|
49
49
|
} from '../../primitives/animated-pressable';
|
|
50
50
|
import { Text, type TextProps, textChildren } from '../../primitives/text';
|
|
51
51
|
import { cn } from '../../utils/cn';
|
|
52
|
+
import type { TextRef, ViewRef } from '../../primitives/refs';
|
|
52
53
|
|
|
53
54
|
type BreadcrumbSize = 'sm' | 'default';
|
|
54
55
|
|
|
@@ -93,7 +94,7 @@ export interface BreadcrumbProps extends ViewProps {
|
|
|
93
94
|
* The trail's landmark. Labelled for assistive tech so the row is announced as
|
|
94
95
|
* "Breadcrumb" rather than an anonymous run of links.
|
|
95
96
|
*/
|
|
96
|
-
const BreadcrumbRoot = forwardRef<
|
|
97
|
+
const BreadcrumbRoot = forwardRef<ViewRef, BreadcrumbProps>(
|
|
97
98
|
({ className, size = 'default', separator, children, ...props }, ref) => (
|
|
98
99
|
<BreadcrumbContext.Provider value={{ size, separator: separator ?? null }}>
|
|
99
100
|
<View
|
|
@@ -137,7 +138,7 @@ const COLLAPSE = Symbol('breadcrumb-collapse');
|
|
|
137
138
|
* The crumb row. It owns the separators — one between every pair of crumbs and
|
|
138
139
|
* none at the ends — and the collapsing, so a caller only ever lists items.
|
|
139
140
|
*/
|
|
140
|
-
const BreadcrumbList = forwardRef<
|
|
141
|
+
const BreadcrumbList = forwardRef<ViewRef, BreadcrumbListProps>(
|
|
141
142
|
(
|
|
142
143
|
{
|
|
143
144
|
className,
|
|
@@ -195,7 +196,7 @@ export interface BreadcrumbItemProps extends ViewProps {
|
|
|
195
196
|
}
|
|
196
197
|
|
|
197
198
|
/** One crumb: wraps a link or the current page. */
|
|
198
|
-
const BreadcrumbItem = forwardRef<
|
|
199
|
+
const BreadcrumbItem = forwardRef<ViewRef, BreadcrumbItemProps>(
|
|
199
200
|
({ className, children, ...props }, ref) => (
|
|
200
201
|
<View
|
|
201
202
|
ref={ref}
|
|
@@ -222,7 +223,7 @@ export interface BreadcrumbLinkProps
|
|
|
222
223
|
* trail. A string child is wrapped in the crumb text style; anything else
|
|
223
224
|
* renders as given.
|
|
224
225
|
*/
|
|
225
|
-
const BreadcrumbLink = forwardRef<
|
|
226
|
+
const BreadcrumbLink = forwardRef<ViewRef, BreadcrumbLinkProps>(
|
|
226
227
|
({ className, textClassName, children, ...props }, ref) => {
|
|
227
228
|
const { size } = useBreadcrumb();
|
|
228
229
|
|
|
@@ -255,7 +256,7 @@ export interface BreadcrumbPageProps extends TextProps {
|
|
|
255
256
|
* marks it as the destination, and it is painted in the full foreground so the
|
|
256
257
|
* trail resolves to it.
|
|
257
258
|
*/
|
|
258
|
-
const BreadcrumbPage = forwardRef<
|
|
259
|
+
const BreadcrumbPage = forwardRef<TextRef, BreadcrumbPageProps>(
|
|
259
260
|
({ className, ...props }, ref) => {
|
|
260
261
|
const { size } = useBreadcrumb();
|
|
261
262
|
|
|
@@ -284,7 +285,7 @@ export interface BreadcrumbSeparatorProps extends ViewProps {
|
|
|
284
285
|
* only for the rare hand-assembled trail. Hidden from screen readers — the
|
|
285
286
|
* order of the crumbs already conveys the hierarchy.
|
|
286
287
|
*/
|
|
287
|
-
const BreadcrumbSeparator = forwardRef<
|
|
288
|
+
const BreadcrumbSeparator = forwardRef<ViewRef, BreadcrumbSeparatorProps>(
|
|
288
289
|
({ className, children, ...props }, ref) => {
|
|
289
290
|
const { separator } = useBreadcrumb();
|
|
290
291
|
const rawTint = useCSSVariable('--color-muted-foreground');
|
|
@@ -318,7 +319,7 @@ export interface BreadcrumbEllipsisProps
|
|
|
318
319
|
* for a menu of the hidden steps. Labelled "Show more" so the collapse is not
|
|
319
320
|
* silent to assistive tech.
|
|
320
321
|
*/
|
|
321
|
-
const BreadcrumbEllipsis = forwardRef<
|
|
322
|
+
const BreadcrumbEllipsis = forwardRef<ViewRef, BreadcrumbEllipsisProps>(
|
|
322
323
|
({ className, onPress, ...props }, ref) => {
|
|
323
324
|
const rawTint = useCSSVariable('--color-muted-foreground');
|
|
324
325
|
const tint = typeof rawTint === 'string' ? rawTint : undefined;
|
|
@@ -11,6 +11,7 @@ import { cn } from '../../utils/cn';
|
|
|
11
11
|
import { IconColorProvider } from '../../icons';
|
|
12
12
|
import { NativeHost, getNativeUI, getSwiftUIModifiers } from '../../native';
|
|
13
13
|
import { Spinner, type SpinnerProps } from '../spinner';
|
|
14
|
+
import type { ViewRef } from '../../primitives/refs';
|
|
14
15
|
|
|
15
16
|
const buttonVariants = tv({
|
|
16
17
|
slots: {
|
|
@@ -345,7 +346,7 @@ const NATIVE_VARIANT: Record<
|
|
|
345
346
|
social: 'outlined',
|
|
346
347
|
};
|
|
347
348
|
|
|
348
|
-
export const Button = forwardRef<
|
|
349
|
+
export const Button = forwardRef<ViewRef, ButtonProps>(
|
|
349
350
|
(
|
|
350
351
|
{
|
|
351
352
|
children,
|
|
@@ -59,6 +59,7 @@ import {
|
|
|
59
59
|
type ButtonSize,
|
|
60
60
|
type ButtonVariant,
|
|
61
61
|
} from '../button';
|
|
62
|
+
import type { ViewRef } from '../../primitives/refs';
|
|
62
63
|
|
|
63
64
|
/** Which way the run reads. */
|
|
64
65
|
export type ButtonGroupOrientation = 'horizontal' | 'vertical';
|
|
@@ -135,7 +136,7 @@ export interface ButtonGroupProps
|
|
|
135
136
|
children?: ReactNode;
|
|
136
137
|
}
|
|
137
138
|
|
|
138
|
-
const ButtonGroupRoot = forwardRef<
|
|
139
|
+
const ButtonGroupRoot = forwardRef<ViewRef, ButtonGroupProps>(
|
|
139
140
|
(
|
|
140
141
|
{
|
|
141
142
|
className,
|
|
@@ -79,6 +79,7 @@ import {
|
|
|
79
79
|
type CalendarSystem,
|
|
80
80
|
type DateLocale,
|
|
81
81
|
} from '../../utils/date';
|
|
82
|
+
import type { ScrollViewRef } from '../../primitives/refs';
|
|
82
83
|
|
|
83
84
|
export type CalendarMode = 'single' | 'multiple' | 'range';
|
|
84
85
|
export type CalendarCaptionLayout = 'label' | 'dropdown';
|
|
@@ -769,7 +770,7 @@ function CaptionDropdown({
|
|
|
769
770
|
onSelect: (index: number) => void;
|
|
770
771
|
}) {
|
|
771
772
|
const [open, setOpen] = useState(false);
|
|
772
|
-
const list = useRef<
|
|
773
|
+
const list = useRef<ScrollViewRef>(null);
|
|
773
774
|
/*
|
|
774
775
|
* The check is given a colour rather than left to its own fallback, which is
|
|
775
776
|
* white — right inside a filled control, invisible on this panel.
|
|
@@ -26,6 +26,7 @@ import { View, type ViewProps } from 'react-native';
|
|
|
26
26
|
import { tv, type VariantProps } from 'tailwind-variants';
|
|
27
27
|
import { cn } from '../../utils/cn';
|
|
28
28
|
import { Text, type TextProps } from '../../primitives/text';
|
|
29
|
+
import type { TextRef, ViewRef } from '../../primitives/refs';
|
|
29
30
|
|
|
30
31
|
const footerVariants = tv({
|
|
31
32
|
base: 'flex-row items-center gap-2',
|
|
@@ -57,7 +58,7 @@ export interface CardFooterProps
|
|
|
57
58
|
extends CardProps,
|
|
58
59
|
VariantProps<typeof footerVariants> {}
|
|
59
60
|
|
|
60
|
-
const CardRoot = forwardRef<
|
|
61
|
+
const CardRoot = forwardRef<ViewRef, CardProps>(({ className, ...props }, ref) => (
|
|
61
62
|
<View
|
|
62
63
|
ref={ref}
|
|
63
64
|
className={cn('rounded-2xl border border-border bg-card shadow-sm', className)}
|
|
@@ -66,12 +67,12 @@ const CardRoot = forwardRef<View, CardProps>(({ className, ...props }, ref) => (
|
|
|
66
67
|
));
|
|
67
68
|
CardRoot.displayName = 'Card';
|
|
68
69
|
|
|
69
|
-
const CardHeader = forwardRef<
|
|
70
|
+
const CardHeader = forwardRef<ViewRef, CardProps>(({ className, ...props }, ref) => (
|
|
70
71
|
<View ref={ref} className={cn('gap-1.5 p-6', className)} {...props} />
|
|
71
72
|
));
|
|
72
73
|
CardHeader.displayName = 'Card.Header';
|
|
73
74
|
|
|
74
|
-
const CardTitle = forwardRef<
|
|
75
|
+
const CardTitle = forwardRef<TextRef, TextProps>(
|
|
75
76
|
({ className, ...props }, ref) => (
|
|
76
77
|
<Text
|
|
77
78
|
ref={ref}
|
|
@@ -84,19 +85,19 @@ const CardTitle = forwardRef<React.ElementRef<typeof Text>, TextProps>(
|
|
|
84
85
|
);
|
|
85
86
|
CardTitle.displayName = 'Card.Title';
|
|
86
87
|
|
|
87
|
-
const CardDescription = forwardRef<
|
|
88
|
+
const CardDescription = forwardRef<TextRef, TextProps>(
|
|
88
89
|
({ className, ...props }, ref) => (
|
|
89
90
|
<Text ref={ref} size="sm" muted className={className} {...props} />
|
|
90
91
|
)
|
|
91
92
|
);
|
|
92
93
|
CardDescription.displayName = 'Card.Description';
|
|
93
94
|
|
|
94
|
-
const CardContent = forwardRef<
|
|
95
|
+
const CardContent = forwardRef<ViewRef, CardProps>(({ className, ...props }, ref) => (
|
|
95
96
|
<View ref={ref} className={cn('p-6 pt-0', className)} {...props} />
|
|
96
97
|
));
|
|
97
98
|
CardContent.displayName = 'Card.Content';
|
|
98
99
|
|
|
99
|
-
const CardFooter = forwardRef<
|
|
100
|
+
const CardFooter = forwardRef<ViewRef, CardFooterProps>(
|
|
100
101
|
({ className, variant, ...props }, ref) => (
|
|
101
102
|
<View ref={ref} className={cn(footerVariants({ variant }), className)} {...props} />
|
|
102
103
|
)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { forwardRef, useEffect } from 'react';
|
|
2
|
-
import { Pressable, View } from 'react-native';
|
|
1
|
+
import { forwardRef, useEffect, type ReactNode } from 'react';
|
|
2
|
+
import { Pressable, View, type PressableProps } from 'react-native';
|
|
3
3
|
import Animated, {
|
|
4
4
|
useAnimatedStyle,
|
|
5
5
|
useSharedValue,
|
|
@@ -10,6 +10,7 @@ import { tv, type VariantProps } from 'tailwind-variants';
|
|
|
10
10
|
import { useCSSVariable } from 'uniwind';
|
|
11
11
|
import { CheckIcon, MinusIcon } from '../../icons';
|
|
12
12
|
import { Text } from '../../primitives/text';
|
|
13
|
+
import type { ViewRef } from '../../primitives/refs';
|
|
13
14
|
|
|
14
15
|
const checkboxVariants = tv({
|
|
15
16
|
slots: {
|
|
@@ -94,7 +95,17 @@ export type CheckboxSize = NonNullable<VariantProps<typeof checkboxVariants>['si
|
|
|
94
95
|
/** The tick and the dash, sized to leave the same share of the box around them. */
|
|
95
96
|
const GLYPH_SIZE: Record<CheckboxSize, number> = { xs: 8, sm: 10, md: 12, lg: 14, xl: 16 };
|
|
96
97
|
|
|
97
|
-
export interface CheckboxProps
|
|
98
|
+
export interface CheckboxProps
|
|
99
|
+
extends VariantProps<typeof checkboxVariants>,
|
|
100
|
+
Omit<
|
|
101
|
+
PressableProps,
|
|
102
|
+
| 'children'
|
|
103
|
+
| 'disabled'
|
|
104
|
+
| 'onPress'
|
|
105
|
+
| 'style'
|
|
106
|
+
| 'accessibilityRole'
|
|
107
|
+
| 'accessibilityState'
|
|
108
|
+
> {
|
|
98
109
|
/**
|
|
99
110
|
* Styles the pressable row — layout, border, fill. It does not reach the
|
|
100
111
|
* label: text colour is not inherited from a view in React Native, so use
|
|
@@ -112,17 +123,31 @@ export interface CheckboxProps extends VariantProps<typeof checkboxVariants> {
|
|
|
112
123
|
*/
|
|
113
124
|
indeterminate?: boolean;
|
|
114
125
|
disabled?: boolean;
|
|
115
|
-
/**
|
|
116
|
-
|
|
126
|
+
/**
|
|
127
|
+
* Optional label rendered next to the box; pressing it also toggles.
|
|
128
|
+
*
|
|
129
|
+
* A string is the usual case. Pass text nodes instead to put a link inside
|
|
130
|
+
* the sentence — `<>I agree to the <Text onPress={open}>Terms</Text></>` —
|
|
131
|
+
* and the link's own press wins over the toggle. A screen reader cannot
|
|
132
|
+
* read a node as the checkbox's name, so pass `accessibilityLabel` with it.
|
|
133
|
+
*/
|
|
134
|
+
label?: ReactNode;
|
|
117
135
|
/** Classes for the label text, merged over the defaults — e.g. `text-black`. */
|
|
118
136
|
labelClassName?: string;
|
|
137
|
+
/**
|
|
138
|
+
* Classes for the view holding the label and description, merged over
|
|
139
|
+
* `flex-1 gap-0.5`. The default makes the text fill the row; pass
|
|
140
|
+
* `flex-none` to size it to the text when the checkbox shares a line with
|
|
141
|
+
* other content, such as a "Forgot password" link.
|
|
142
|
+
*/
|
|
143
|
+
contentClassName?: string;
|
|
119
144
|
/** Secondary line under the label, for extra context. */
|
|
120
145
|
description?: string;
|
|
121
146
|
/** Classes for the description text, merged over the defaults. */
|
|
122
147
|
descriptionClassName?: string;
|
|
123
148
|
}
|
|
124
149
|
|
|
125
|
-
export const Checkbox = forwardRef<
|
|
150
|
+
export const Checkbox = forwardRef<ViewRef, CheckboxProps>(
|
|
126
151
|
(
|
|
127
152
|
{
|
|
128
153
|
className,
|
|
@@ -132,10 +157,13 @@ export const Checkbox = forwardRef<View, CheckboxProps>(
|
|
|
132
157
|
disabled,
|
|
133
158
|
label,
|
|
134
159
|
labelClassName,
|
|
160
|
+
contentClassName,
|
|
135
161
|
description,
|
|
136
162
|
descriptionClassName,
|
|
137
163
|
variant,
|
|
138
164
|
size = 'md',
|
|
165
|
+
accessibilityLabel,
|
|
166
|
+
...rest
|
|
139
167
|
},
|
|
140
168
|
ref
|
|
141
169
|
) => {
|
|
@@ -172,6 +200,7 @@ export const Checkbox = forwardRef<View, CheckboxProps>(
|
|
|
172
200
|
|
|
173
201
|
return (
|
|
174
202
|
<Pressable
|
|
203
|
+
{...rest}
|
|
175
204
|
ref={ref}
|
|
176
205
|
accessibilityRole="checkbox"
|
|
177
206
|
// `mixed` is the a11y state for a box that governs a partly-on group;
|
|
@@ -180,7 +209,9 @@ export const Checkbox = forwardRef<View, CheckboxProps>(
|
|
|
180
209
|
checked: indeterminate ? 'mixed' : checked,
|
|
181
210
|
disabled: !!disabled,
|
|
182
211
|
}}
|
|
183
|
-
accessibilityLabel={
|
|
212
|
+
accessibilityLabel={
|
|
213
|
+
accessibilityLabel ?? (typeof label === 'string' ? label : undefined)
|
|
214
|
+
}
|
|
184
215
|
accessibilityHint={description}
|
|
185
216
|
disabled={disabled}
|
|
186
217
|
// An indeterminate box resolves upward: the press turns the group on.
|
|
@@ -197,7 +228,7 @@ export const Checkbox = forwardRef<View, CheckboxProps>(
|
|
|
197
228
|
{/* The card lays out content first so the box sits top-right. */}
|
|
198
229
|
{variant === 'card' ? null : box}
|
|
199
230
|
{label || description ? (
|
|
200
|
-
<View className={slots.content()}>
|
|
231
|
+
<View className={slots.content({ className: contentClassName })}>
|
|
201
232
|
{label ? (
|
|
202
233
|
<Text className={slots.label({ className: labelClassName })}>{label}</Text>
|
|
203
234
|
) : null}
|
|
@@ -41,6 +41,7 @@ import {
|
|
|
41
41
|
import { Text, textChildren } from '../../primitives/text';
|
|
42
42
|
import { cn } from '../../utils/cn';
|
|
43
43
|
import { selectionTick } from '../../utils/haptics';
|
|
44
|
+
import type { ViewRef } from '../../primitives/refs';
|
|
44
45
|
|
|
45
46
|
const chipVariants = tv({
|
|
46
47
|
slots: {
|
|
@@ -188,7 +189,7 @@ export interface ChipProps
|
|
|
188
189
|
haptics?: boolean;
|
|
189
190
|
}
|
|
190
191
|
|
|
191
|
-
const ChipRoot = forwardRef<
|
|
192
|
+
const ChipRoot = forwardRef<ViewRef, ChipProps>(
|
|
192
193
|
(
|
|
193
194
|
{
|
|
194
195
|
children,
|
|
@@ -66,6 +66,7 @@ import { tv } from 'tailwind-variants';
|
|
|
66
66
|
import { ChevronDownIcon } from '../../icons';
|
|
67
67
|
import { Collapse } from '../../primitives/collapse';
|
|
68
68
|
import { Text, type TextProps, textChildren } from '../../primitives/text';
|
|
69
|
+
import type { TextRef, ViewRef } from '../../primitives/refs';
|
|
69
70
|
|
|
70
71
|
export type CollapsibleVariant = 'default' | 'surface' | 'ghost';
|
|
71
72
|
|
|
@@ -124,7 +125,7 @@ export interface CollapsibleProps extends ViewProps {
|
|
|
124
125
|
children?: ReactNode;
|
|
125
126
|
}
|
|
126
127
|
|
|
127
|
-
const CollapsibleRoot = forwardRef<
|
|
128
|
+
const CollapsibleRoot = forwardRef<ViewRef, CollapsibleProps>(
|
|
128
129
|
(
|
|
129
130
|
{
|
|
130
131
|
className,
|
|
@@ -172,7 +173,7 @@ export interface CollapsibleTriggerProps extends Omit<PressableProps, 'children'
|
|
|
172
173
|
}
|
|
173
174
|
|
|
174
175
|
/** The pressable header row. Bare strings are wrapped in the title style. */
|
|
175
|
-
const CollapsibleTrigger = forwardRef<
|
|
176
|
+
const CollapsibleTrigger = forwardRef<ViewRef, CollapsibleTriggerProps>(
|
|
176
177
|
({ className, children, onPress, ...props }, ref) => {
|
|
177
178
|
const { open, toggle, isDisabled, variant } = useCollapsible('Collapsible.Trigger');
|
|
178
179
|
const { trigger, title } = collapsibleVariants({ variant });
|
|
@@ -199,7 +200,7 @@ const CollapsibleTrigger = forwardRef<View, CollapsibleTriggerProps>(
|
|
|
199
200
|
);
|
|
200
201
|
CollapsibleTrigger.displayName = 'Collapsible.Trigger';
|
|
201
202
|
|
|
202
|
-
const CollapsibleTitle = forwardRef<
|
|
203
|
+
const CollapsibleTitle = forwardRef<TextRef, TextProps>(({ className, ...props }, ref) => {
|
|
203
204
|
const { variant } = useCollapsible('Collapsible.Title');
|
|
204
205
|
const { title } = collapsibleVariants({ variant });
|
|
205
206
|
return <Text ref={ref} className={title({ className })} {...props} />;
|
|
@@ -213,7 +214,7 @@ export interface CollapsibleIndicatorProps extends ViewProps {
|
|
|
213
214
|
}
|
|
214
215
|
|
|
215
216
|
/** Chevron that rotates 180° while the body is open. */
|
|
216
|
-
const CollapsibleIndicator = forwardRef<
|
|
217
|
+
const CollapsibleIndicator = forwardRef<ViewRef, CollapsibleIndicatorProps>(
|
|
217
218
|
({ className, children, ...props }, ref) => {
|
|
218
219
|
const { open, variant } = useCollapsible('Collapsible.Indicator');
|
|
219
220
|
const { indicator } = collapsibleVariants({ variant });
|
|
@@ -256,7 +257,7 @@ export interface CollapsibleContentProps extends ViewProps {
|
|
|
256
257
|
* tree as well as from the eye, because a screen reader reading out a section
|
|
257
258
|
* that is not on screen is worse than one that skips it.
|
|
258
259
|
*/
|
|
259
|
-
const CollapsibleContent = forwardRef<
|
|
260
|
+
const CollapsibleContent = forwardRef<ViewRef, CollapsibleContentProps>(
|
|
260
261
|
({ className, children, ...props }, ref) => {
|
|
261
262
|
const { open, variant } = useCollapsible('Collapsible.Content');
|
|
262
263
|
const { content, contentText } = collapsibleVariants({ variant });
|