pixelize-native-library 1.2.0 → 1.2.1
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/core/MODULE.md +2 -1
- package/lib/module/core/gradient/AccentGradientFill.js +80 -0
- package/lib/module/core/gradient/darkenHex.js +13 -0
- package/lib/module/core/gradient/gradientStops.js +27 -0
- package/lib/module/core/gradient/index.js +7 -0
- package/lib/module/core/gradient/withAlpha.js +19 -0
- package/lib/module/core/haptics/MODULE.md +4 -0
- package/lib/module/core/haptics/context.js +7 -0
- package/lib/module/core/haptics/haptics.js +17 -0
- package/lib/module/core/haptics/index.js +6 -0
- package/lib/module/core/haptics/useHaptics.js +73 -0
- package/lib/module/core/icon/MODULE.md +16 -9
- package/lib/module/core/icon/icons/trending-up.js +10 -0
- package/lib/module/core/icon/resolve.js +2 -0
- package/lib/module/core/media/expoImage.js +6 -0
- package/lib/module/core/motion/MODULE.md +12 -12
- package/lib/module/core/motion/config.js +4 -1
- package/lib/module/core/motion/index.js +2 -1
- package/lib/module/core/motion/usePressState.js +145 -0
- package/lib/module/core/style/index.js +1 -0
- package/lib/module/core/style/radius.js +4 -0
- package/lib/module/index.js +1 -0
- package/lib/module/modules/accordion/Accordion.js +69 -49
- package/lib/module/modules/accordion/Accordion.variants.js +4 -3
- package/lib/module/modules/accordion/MODULE.md +2 -1
- package/lib/module/modules/alert-dialog/AlertDialog.js +6 -5
- package/lib/module/modules/alert-dialog/AlertDialog.variants.js +4 -0
- package/lib/module/modules/app-bar/AppBar.js +6 -4
- package/lib/module/modules/app-bar/AppBar.variants.js +1 -2
- package/lib/module/modules/avatar/Avatar.js +7 -1
- package/lib/module/modules/avatar/Avatar.variants.js +1 -1
- package/lib/module/modules/avatar/MODULE.md +2 -2
- package/lib/module/modules/avatar-group/AvatarGroup.js +10 -6
- package/lib/module/modules/avatar-group/AvatarGroup.variants.js +23 -0
- package/lib/module/modules/avatar-group/MODULE.md +16 -0
- package/lib/module/modules/badge/Badge.js +11 -5
- package/lib/module/modules/badge/Badge.variants.js +2 -1
- package/lib/module/modules/badge/MODULE.md +5 -5
- package/lib/module/modules/banner/Banner.js +106 -60
- package/lib/module/modules/banner/Banner.variants.js +2 -2
- package/lib/module/modules/banner/MODULE.md +7 -2
- package/lib/module/modules/bottom-nav/BottomNav.js +6 -3
- package/lib/module/modules/bottom-nav/BottomNav.variants.js +9 -10
- package/lib/module/modules/bottom-nav/BottomNavOverflowSheet.js +28 -4
- package/lib/module/modules/bottom-nav/BottomNavTab.js +28 -4
- package/lib/module/modules/bottom-nav/MODULE.md +10 -1
- package/lib/module/modules/bottom-sheet/BottomSheet.js +20 -7
- package/lib/module/modules/bottom-sheet/BottomSheet.variants.js +15 -5
- package/lib/module/modules/bottom-sheet/MODULE.md +13 -2
- package/lib/module/modules/button/Button.js +87 -101
- package/lib/module/modules/button/Button.variants.js +8 -7
- package/lib/module/modules/button/MODULE.md +6 -0
- package/lib/module/modules/button-group/ButtonGroup.js +36 -37
- package/lib/module/modules/button-group/ButtonGroup.variants.js +21 -46
- package/lib/module/modules/button-group/MODULE.md +25 -30
- package/lib/module/modules/card/Card.js +117 -19
- package/lib/module/modules/card/Card.variants.js +1 -0
- package/lib/module/modules/card/MODULE.md +13 -10
- package/lib/module/modules/charts/BarChart.js +29 -14
- package/lib/module/modules/charts/BarList.js +31 -18
- package/lib/module/modules/charts/Charts.variants.js +66 -2
- package/lib/module/modules/charts/DonutChart.js +9 -4
- package/lib/module/modules/charts/LineChart.js +5 -3
- package/lib/module/modules/charts/MODULE.md +24 -11
- package/lib/module/modules/charts/PieChart.js +13 -4
- package/lib/module/modules/charts/Sparkline.js +4 -2
- package/lib/module/modules/checkbox/Checkbox.js +10 -2
- package/lib/module/modules/checkbox/MODULE.md +5 -0
- package/lib/module/modules/chip/Chip.js +83 -38
- package/lib/module/modules/chip/Chip.variants.js +15 -3
- package/lib/module/modules/chip/MODULE.md +6 -4
- package/lib/module/modules/combobox/Combobox.js +93 -57
- package/lib/module/modules/combobox/Combobox.variants.js +22 -7
- package/lib/module/modules/combobox/MODULE.md +14 -4
- package/lib/module/modules/composer/Composer.js +9 -2
- package/lib/module/modules/composer/Composer.variants.js +2 -0
- package/lib/module/modules/composer/MODULE.md +5 -0
- package/lib/module/modules/copy-button/CopyButton.js +22 -4
- package/lib/module/modules/copy-button/CopyButton.variants.js +4 -2
- package/lib/module/modules/copy-button/MODULE.md +5 -0
- package/lib/module/modules/data-table/DataTable.js +28 -9
- package/lib/module/modules/data-table/DataTable.variants.js +3 -2
- package/lib/module/modules/data-table/MODULE.md +1 -0
- package/lib/module/modules/date-picker/Calendar.js +75 -29
- package/lib/module/modules/date-picker/DatePicker.variants.js +24 -9
- package/lib/module/modules/date-picker/MODULE.md +25 -4
- package/lib/module/modules/date-picker/PickerField.js +13 -4
- package/lib/module/modules/date-picker/PickerShell.js +2 -0
- package/lib/module/modules/date-picker/TimePicker.js +13 -18
- package/lib/module/modules/divider/Divider.variants.js +6 -5
- package/lib/module/modules/divider/MODULE.md +2 -0
- package/lib/module/modules/drawer/Drawer.js +20 -8
- package/lib/module/modules/drawer/Drawer.variants.js +4 -4
- package/lib/module/modules/drawer/MODULE.md +3 -0
- package/lib/module/modules/empty-state/EmptyState.js +18 -29
- package/lib/module/modules/empty-state/EmptyState.variants.js +7 -0
- package/lib/module/modules/empty-state/MODULE.md +1 -0
- package/lib/module/modules/fab/Fab.js +41 -61
- package/lib/module/modules/fab/Fab.variants.js +15 -1
- package/lib/module/modules/fab/FabGroup.js +84 -57
- package/lib/module/modules/fab/MODULE.md +19 -6
- package/lib/module/modules/file-grid/FileGrid.js +30 -16
- package/lib/module/modules/file-grid/FileGrid.variants.js +2 -2
- package/lib/module/modules/file-grid/MODULE.md +3 -1
- package/lib/module/modules/file-upload/FileUpload.variants.js +3 -1
- package/lib/module/modules/file-upload/MODULE.md +2 -0
- package/lib/module/modules/filter-sheet/FilterChip.js +11 -3
- package/lib/module/modules/filter-sheet/FilterSheetBody.js +15 -3
- package/lib/module/modules/filter-sheet/MODULE.md +9 -0
- package/lib/module/modules/folder-row/FolderRow.js +29 -17
- package/lib/module/modules/folder-row/FolderRow.variants.js +4 -2
- package/lib/module/modules/folder-row/MODULE.md +2 -1
- package/lib/module/modules/gantt/Gantt.js +30 -9
- package/lib/module/modules/gantt/Gantt.variants.js +36 -0
- package/lib/module/modules/gantt/MODULE.md +11 -1
- package/lib/module/modules/image-viewer/ImageViewer.js +35 -5
- package/lib/module/modules/image-viewer/MODULE.md +6 -0
- package/lib/module/modules/input/Input.js +20 -7
- package/lib/module/modules/input/Input.variants.js +8 -7
- package/lib/module/modules/input/MODULE.md +2 -0
- package/lib/module/modules/list-item/ListItem.js +48 -26
- package/lib/module/modules/list-item/ListItem.variants.js +11 -2
- package/lib/module/modules/list-item/MODULE.md +2 -3
- package/lib/module/modules/markdown/MODULE.md +8 -1
- package/lib/module/modules/markdown/Markdown.js +57 -22
- package/lib/module/modules/markdown/Markdown.variants.js +2 -1
- package/lib/module/modules/menu/MODULE.md +11 -0
- package/lib/module/modules/menu/Menu.js +99 -40
- package/lib/module/modules/menu/Menu.variants.js +3 -3
- package/lib/module/modules/message-bubble/MODULE.md +4 -1
- package/lib/module/modules/message-bubble/MessageBubble.js +4 -5
- package/lib/module/modules/message-bubble/MessageBubble.variants.js +5 -5
- package/lib/module/modules/modal/MODULE.md +11 -0
- package/lib/module/modules/modal/Modal.js +87 -35
- package/lib/module/modules/modal/Modal.variants.js +2 -2
- package/lib/module/modules/more-items/MODULE.md +5 -0
- package/lib/module/modules/more-items/MoreItems.js +7 -1
- package/lib/module/modules/more-items/MoreItems.variants.js +4 -1
- package/lib/module/modules/multi-select/MODULE.md +5 -0
- package/lib/module/modules/multi-select/MultiSelect.js +23 -1
- package/lib/module/modules/multi-select/MultiSelect.variants.js +4 -2
- package/lib/module/modules/number-input/MODULE.md +2 -1
- package/lib/module/modules/number-input/NumberInput.js +97 -84
- package/lib/module/modules/number-input/NumberInput.variants.js +9 -6
- package/lib/module/modules/org-switcher/MODULE.md +13 -1
- package/lib/module/modules/org-switcher/OrgSwitcher.js +13 -2
- package/lib/module/modules/org-switcher/OrgSwitcher.variants.js +4 -2
- package/lib/module/modules/pagination/MODULE.md +2 -2
- package/lib/module/modules/pagination/Pagination.js +76 -37
- package/lib/module/modules/pagination/Pagination.variants.js +4 -2
- package/lib/module/modules/pagination/PaginationControls.js +55 -35
- package/lib/module/modules/pin-input/MODULE.md +5 -1
- package/lib/module/modules/pin-input/PinInput.js +9 -2
- package/lib/module/modules/pin-input/PinInput.variants.js +2 -1
- package/lib/module/modules/radio-group/MODULE.md +2 -2
- package/lib/module/modules/radio-group/RadioGroup.js +122 -63
- package/lib/module/modules/radio-group/RadioGroup.variants.js +2 -1
- package/lib/module/modules/reorder/MODULE.md +2 -0
- package/lib/module/modules/reorder/Reorder.js +4 -3
- package/lib/module/modules/reorder/Reorder.variants.js +4 -2
- package/lib/module/modules/rich-text/MODULE.md +3 -1
- package/lib/module/modules/rich-text/RichText.js +42 -22
- package/lib/module/modules/rich-text-editor/MODULE.md +4 -1
- package/lib/module/modules/rich-text-editor/RichTextEditor.js +8 -1
- package/lib/module/modules/rich-text-editor/RichTextEditor.variants.js +9 -6
- package/lib/module/modules/screen/MODULE.md +7 -0
- package/lib/module/modules/screen/Screen.js +50 -17
- package/lib/module/modules/screen/Screen.variants.js +18 -0
- package/lib/module/modules/search-bar/MODULE.md +1 -0
- package/lib/module/modules/search-bar/SearchBar.js +46 -26
- package/lib/module/modules/search-bar/SearchBar.variants.js +11 -8
- package/lib/module/modules/section/MODULE.md +2 -0
- package/lib/module/modules/section/Section.js +8 -15
- package/lib/module/modules/section/Section.variants.js +1 -6
- package/lib/module/modules/segmented-control/MODULE.md +3 -1
- package/lib/module/modules/segmented-control/SegmentedControl.js +110 -46
- package/lib/module/modules/segmented-control/SegmentedControl.variants.js +3 -2
- package/lib/module/modules/select/MODULE.md +26 -5
- package/lib/module/modules/select/Select.js +39 -12
- package/lib/module/modules/select/Select.variants.js +36 -12
- package/lib/module/modules/skeleton/MODULE.md +23 -27
- package/lib/module/modules/skeleton/Skeleton.js +46 -51
- package/lib/module/modules/skeleton/Skeleton.variants.js +17 -75
- package/lib/module/modules/slider/MODULE.md +2 -0
- package/lib/module/modules/slider/Slider.js +2 -1
- package/lib/module/modules/stage-progress/MODULE.md +12 -8
- package/lib/module/modules/stage-progress/StageProgress.js +94 -47
- package/lib/module/modules/stage-progress/StageProgress.variants.js +17 -12
- package/lib/module/modules/stat-tile/MODULE.md +2 -0
- package/lib/module/modules/stat-tile/StatTile.js +15 -10
- package/lib/module/modules/stat-tile/StatTile.variants.js +2 -0
- package/lib/module/modules/state-block/MODULE.md +3 -0
- package/lib/module/modules/state-block/StateBlock.js +11 -6
- package/lib/module/modules/state-block/StateBlock.variants.js +7 -0
- package/lib/module/modules/surface/MODULE.md +59 -0
- package/lib/module/modules/surface/Surface.js +42 -0
- package/lib/module/modules/surface/Surface.variants.js +33 -0
- package/lib/module/modules/surface/index.js +4 -0
- package/lib/module/modules/swipeable-row/MODULE.md +9 -0
- package/lib/module/modules/swipeable-row/SwipeableRow.js +28 -7
- package/lib/module/modules/switch/MODULE.md +2 -0
- package/lib/module/modules/switch/Switch.js +8 -2
- package/lib/module/modules/tabs/MODULE.md +2 -1
- package/lib/module/modules/tabs/Tabs.js +37 -18
- package/lib/module/modules/tabs/Tabs.variants.js +4 -2
- package/lib/module/modules/text/MODULE.md +5 -2
- package/lib/module/modules/text/Text.js +18 -6
- package/lib/module/modules/text/Text.variants.js +108 -44
- package/lib/module/modules/textarea/MODULE.md +2 -0
- package/lib/module/modules/textarea/Textarea.js +3 -2
- package/lib/module/modules/textarea/Textarea.variants.js +2 -1
- package/lib/module/modules/toast/MODULE.md +8 -4
- package/lib/module/modules/toast/Toast.js +31 -13
- package/lib/module/modules/toast/Toast.variants.js +5 -0
- package/lib/module/modules/tooltip/MODULE.md +15 -11
- package/lib/module/modules/tooltip/Tooltip.js +41 -9
- package/lib/module/modules/tooltip/Tooltip.variants.js +8 -1
- package/lib/module/theme/MODULE.md +3 -1
- package/lib/module/theme/platform/MODULE.md +14 -2
- package/lib/module/theme/platform/elevation.native.js +0 -44
- package/lib/module/theme/platform/floatingSurface.native.js +75 -0
- package/lib/module/theme/platform/highlight.native.js +59 -0
- package/lib/module/theme/platform/index.js +5 -0
- package/lib/module/theme/platform/motion.native.js +31 -11
- package/lib/module/theme/platform/stateLayer.native.js +14 -0
- package/lib/module/theme/platform/surfaces.native.js +11 -0
- package/lib/module/theme/provider/PixelizeProvider.js +12 -5
- package/lib/module/theme/tokens/MODULE.md +32 -28
- package/lib/module/theme/tokens/THEME-CONTRACT.md +137 -0
- package/lib/module/theme/tokens/assertPalette.js +29 -0
- package/lib/module/theme/tokens/brands/emerald/palette.light.js +7 -6
- package/lib/module/theme/tokens/brands/lavender/palette.light.js +3 -2
- package/lib/module/theme/tokens/brands/meadow/palette.light.js +7 -6
- package/lib/module/theme/tokens/brands/radiant/palette.light.js +7 -6
- package/lib/module/theme/tokens/brands/rosewood/palette.light.js +7 -6
- package/lib/module/theme/tokens/brands/skyline/palette.light.js +7 -6
- package/lib/module/theme/tokens/brands/slate/palette.light.js +8 -10
- package/lib/module/theme/tokens/brands/storefront/palette.light.js +7 -6
- package/lib/module/theme/tokens/brands/zinc/palette.dark.js +3 -2
- package/lib/module/theme/tokens/brands/zinc/palette.light.js +3 -2
- package/lib/module/theme/tokens/builders/buildDarkPalette.js +3 -2
- package/lib/module/theme/tokens/builders/finalizePalette.js +34 -0
- package/lib/module/theme/tokens/builders/liftToContrast.js +44 -0
- package/lib/module/theme/tokens/builders/placeholderInk.js +22 -0
- package/lib/module/theme/tokens/builders/semanticText.js +14 -0
- package/lib/module/theme/tokens/builders/surfaceRungs.js +44 -0
- package/lib/module/theme/tokens/index.js +5 -0
- package/lib/module/theme/tokens/roles/index.js +5 -0
- package/lib/typescript/core/gradient/AccentGradientFill.d.ts +7 -0
- package/lib/typescript/core/gradient/darkenHex.d.ts +2 -0
- package/lib/typescript/core/gradient/gradientStops.d.ts +10 -0
- package/lib/typescript/core/gradient/index.d.ts +5 -0
- package/lib/typescript/core/gradient/withAlpha.d.ts +2 -0
- package/lib/typescript/core/haptics/context.d.ts +3 -0
- package/lib/typescript/core/haptics/haptics.d.ts +33 -0
- package/lib/typescript/core/haptics/index.d.ts +6 -0
- package/lib/typescript/core/haptics/useHaptics.d.ts +12 -0
- package/lib/typescript/core/icon/icons/trending-up.d.ts +3 -0
- package/lib/typescript/core/icon/names.d.ts +1 -1
- package/lib/typescript/core/media/expoImage.d.ts +15 -6
- package/lib/typescript/core/media/pickers.d.ts +5 -5
- package/lib/typescript/core/motion/config.d.ts +2 -1
- package/lib/typescript/core/motion/index.d.ts +3 -1
- package/lib/typescript/core/motion/usePressState.d.ts +21 -0
- package/lib/typescript/core/style/index.d.ts +1 -0
- package/lib/typescript/core/style/radius.d.ts +2 -0
- package/lib/typescript/index.d.ts +4 -2
- package/lib/typescript/modules/accordion/Accordion.variants.d.ts +2 -2
- package/lib/typescript/modules/alert-dialog/AlertDialog.variants.d.ts +1 -0
- package/lib/typescript/modules/avatar/Avatar.variants.d.ts +1 -1
- package/lib/typescript/modules/avatar-group/AvatarGroup.d.ts +4 -2
- package/lib/typescript/modules/avatar-group/AvatarGroup.variants.d.ts +19 -0
- package/lib/typescript/modules/banner/Banner.d.ts +2 -0
- package/lib/typescript/modules/bottom-nav/BottomNav.variants.d.ts +1 -3
- package/lib/typescript/modules/bottom-sheet/BottomSheet.variants.d.ts +3 -1
- package/lib/typescript/modules/button/Button.d.ts +0 -25
- package/lib/typescript/modules/button/Button.variants.d.ts +6 -6
- package/lib/typescript/modules/button-group/ButtonGroup.d.ts +0 -19
- package/lib/typescript/modules/button-group/ButtonGroup.variants.d.ts +22 -56
- package/lib/typescript/modules/card/Card.d.ts +7 -5
- package/lib/typescript/modules/charts/Charts.variants.d.ts +29 -1
- package/lib/typescript/modules/chip/Chip.d.ts +3 -1
- package/lib/typescript/modules/chip/Chip.variants.d.ts +6 -2
- package/lib/typescript/modules/chip/index.d.ts +1 -1
- package/lib/typescript/modules/combobox/Combobox.variants.d.ts +17 -4
- package/lib/typescript/modules/data-table/DataTable.variants.d.ts +1 -1
- package/lib/typescript/modules/date-picker/DatePicker.variants.d.ts +15 -3
- package/lib/typescript/modules/date-picker/TimePicker.d.ts +1 -7
- package/lib/typescript/modules/divider/Divider.variants.d.ts +4 -4
- package/lib/typescript/modules/empty-state/EmptyState.d.ts +2 -0
- package/lib/typescript/modules/empty-state/EmptyState.variants.d.ts +1 -0
- package/lib/typescript/modules/fab/Fab.variants.d.ts +2 -0
- package/lib/typescript/modules/folder-row/FolderRow.d.ts +0 -8
- package/lib/typescript/modules/gantt/Gantt.variants.d.ts +21 -0
- package/lib/typescript/modules/input/Input.variants.d.ts +6 -6
- package/lib/typescript/modules/list-item/ListItem.d.ts +1 -5
- package/lib/typescript/modules/list-item/ListItem.variants.d.ts +137 -1
- package/lib/typescript/modules/markdown/Markdown.d.ts +7 -0
- package/lib/typescript/modules/message-bubble/MessageBubble.d.ts +2 -2
- package/lib/typescript/modules/message-bubble/MessageBubble.variants.d.ts +1 -2
- package/lib/typescript/modules/number-input/NumberInput.variants.d.ts +7 -5
- package/lib/typescript/modules/pagination/PaginationControls.d.ts +1 -4
- package/lib/typescript/modules/reorder/Reorder.d.ts +1 -1
- package/lib/typescript/modules/screen/Screen.d.ts +3 -9
- package/lib/typescript/modules/screen/Screen.variants.d.ts +4 -0
- package/lib/typescript/modules/search-bar/SearchBar.variants.d.ts +6 -6
- package/lib/typescript/modules/section/Section.variants.d.ts +0 -3
- package/lib/typescript/modules/segmented-control/SegmentedControl.variants.d.ts +1 -1
- package/lib/typescript/modules/select/Select.d.ts +4 -1
- package/lib/typescript/modules/select/Select.variants.d.ts +22 -8
- package/lib/typescript/modules/select/index.d.ts +1 -1
- package/lib/typescript/modules/skeleton/Skeleton.d.ts +3 -18
- package/lib/typescript/modules/skeleton/Skeleton.variants.d.ts +12 -68
- package/lib/typescript/modules/stage-progress/StageProgress.variants.d.ts +15 -6
- package/lib/typescript/modules/state-block/StateBlock.d.ts +4 -0
- package/lib/typescript/modules/state-block/StateBlock.variants.d.ts +1 -0
- package/lib/typescript/modules/surface/Surface.d.ts +19 -0
- package/lib/typescript/modules/surface/Surface.variants.d.ts +15 -0
- package/lib/typescript/modules/surface/index.d.ts +4 -0
- package/lib/typescript/modules/text/Text.d.ts +8 -4
- package/lib/typescript/modules/text/Text.variants.d.ts +14 -11
- package/lib/typescript/modules/toast/Toast.variants.d.ts +2 -0
- package/lib/typescript/modules/tooltip/Tooltip.variants.d.ts +7 -0
- package/lib/typescript/theme/index.d.ts +1 -1
- package/lib/typescript/theme/platform/elevation.native.d.ts +0 -30
- package/lib/typescript/theme/platform/floatingSurface.native.d.ts +10 -0
- package/lib/typescript/theme/platform/highlight.native.d.ts +17 -0
- package/lib/typescript/theme/platform/index.d.ts +9 -0
- package/lib/typescript/theme/platform/motion.native.d.ts +33 -13
- package/lib/typescript/theme/platform/stateLayer.native.d.ts +11 -0
- package/lib/typescript/theme/platform/surfaces.native.d.ts +8 -0
- package/lib/typescript/theme/provider/PixelizeProvider.d.ts +1 -1
- package/lib/typescript/theme/provider/types.d.ts +8 -0
- package/lib/typescript/theme/tokens/assertPalette.d.ts +10 -0
- package/lib/typescript/theme/tokens/brands/emerald/palette.light.d.ts +4 -3
- package/lib/typescript/theme/tokens/brands/lavender/palette.light.d.ts +4 -3
- package/lib/typescript/theme/tokens/brands/meadow/palette.light.d.ts +4 -3
- package/lib/typescript/theme/tokens/brands/radiant/palette.light.d.ts +4 -3
- package/lib/typescript/theme/tokens/brands/rosewood/palette.light.d.ts +4 -3
- package/lib/typescript/theme/tokens/brands/skyline/palette.light.d.ts +4 -3
- package/lib/typescript/theme/tokens/brands/slate/palette.light.d.ts +4 -3
- package/lib/typescript/theme/tokens/brands/storefront/palette.light.d.ts +4 -3
- package/lib/typescript/theme/tokens/brands/zinc/palette.light.d.ts +4 -3
- package/lib/typescript/theme/tokens/builders/finalizePalette.d.ts +4 -0
- package/lib/typescript/theme/tokens/builders/liftToContrast.d.ts +9 -0
- package/lib/typescript/theme/tokens/builders/placeholderInk.d.ts +13 -0
- package/lib/typescript/theme/tokens/builders/semanticText.d.ts +4 -0
- package/lib/typescript/theme/tokens/builders/surfaceRungs.d.ts +12 -0
- package/lib/typescript/theme/tokens/index.d.ts +5 -0
- package/lib/typescript/theme/tokens/roles/index.d.ts +1 -0
- package/lib/typescript/theme/tokens/types.d.ts +8 -7
- package/package.json +10 -2
- package/registry.json +5 -0
|
@@ -8,12 +8,12 @@ neutral fills. It takes no children and no interaction; it IS its own size, whic
|
|
|
8
8
|
|
|
9
9
|
| File | Role |
|
|
10
10
|
|------|------|
|
|
11
|
-
| `Skeleton.tsx` |
|
|
11
|
+
| `Skeleton.tsx` | Translating highlight-band shimmer via Reanimated; `style` last. |
|
|
12
12
|
| `Skeleton.variants.ts` | Pure resolvers (`resolveSkeletonSize`, `resolveSkeletonColors`, `resolveSkeletonAccessibility`) + the themed structural variant resolver `skeletonStructure`. No React. |
|
|
13
13
|
| `index.ts` | Public surface: `Skeleton`, `SkeletonProps`, `SkeletonShape`. |
|
|
14
14
|
| `__tests__/Skeleton.test.ts` | Pure: colour-role mapping + shimmer-visibility guard (all brands × modes), the size resolver, the a11y contract. |
|
|
15
15
|
| `__tests__/Skeleton.render.test.tsx` | Render: shape scale, sizing, shimmer mounts/skips under reduced motion, decorative-vs-labelled a11y, consumer `style` applies last. |
|
|
16
|
-
| `__tests__/Skeleton.motion.test.tsx` | Motion
|
|
16
|
+
| `__tests__/Skeleton.motion.test.tsx` | Motion: linear `withRepeat` shimmer, stagger via `withDelay`, gated on reduce motion only. |
|
|
17
17
|
|
|
18
18
|
## Props
|
|
19
19
|
|
|
@@ -22,9 +22,10 @@ neutral fills. It takes no children and no interaction; it IS its own size, whic
|
|
|
22
22
|
| `shape` | `rect \| circle \| text` | `rect` | Closed union — drives the corner radius only. |
|
|
23
23
|
| `width` | `number` | per-shape fallback | dp. Component-owned sizing, **not** `LayoutStyle` — sizing is the point of this component. |
|
|
24
24
|
| `height` | `number` | per-shape fallback | dp. `circle` mirrors whichever of `width`/`height` is given onto both axes (an unequal pair would render an ellipse). |
|
|
25
|
+
| `staggerIndex` | `number` | `0` | Stagger sibling skeletons by `index × 100ms` (80–120ms band). |
|
|
25
26
|
| `accessibilityLabel` | `string` | — | **Optional** — see Accessibility contract below. |
|
|
26
27
|
| `style` | `LayoutStyle` | — | Layout-only, outermost, applied exactly once, last. |
|
|
27
|
-
| `testID` | `string` | — | The shimmer
|
|
28
|
+
| `testID` | `string` | — | The shimmer band (when mounted) also gets `${testID}-shimmer`. |
|
|
28
29
|
|
|
29
30
|
No `tone`/`color` prop: a skeleton has exactly one neutral appearance (`resolveSkeletonColors`),
|
|
30
31
|
the same reasoning as `Avatar`'s and `Divider`'s colour resolvers — there is nothing for an app to
|
|
@@ -46,11 +47,10 @@ widen.
|
|
|
46
47
|
`accessibilityElementsHidden` + `importantForAccessibility="no-hide-descendants"` natively.
|
|
47
48
|
- **1.4.3 / 1.4.11** — N/A. A skeleton renders no text and draws no interactive boundary (same
|
|
48
49
|
conclusion `Divider.test.ts` documents for its own decorative colour). What IS measured: `base`
|
|
49
|
-
and `
|
|
50
|
+
and `highlight` must resolve to two genuinely different colours on every brand × mode, or the shimmer
|
|
50
51
|
would be a silent no-op — asserted directly in `Skeleton.test.ts`.
|
|
51
|
-
- **2.3.3 (reduced motion)** — `useReducedMotion()` gates the shimmer
|
|
52
|
-
|
|
53
|
-
frame frozen mid-pulse.
|
|
52
|
+
- **2.3.3 (reduced motion)** — `useReducedMotion()` gates the shimmer entirely. When true, only the
|
|
53
|
+
static neutral base (`palette.background[300]`) renders — no band, no pulse.
|
|
54
54
|
- **Touch target (2.5.x)** — N/A. `Skeleton` has no `onPress`.
|
|
55
55
|
|
|
56
56
|
## Patterns copied from `Button`/`Avatar`
|
|
@@ -60,21 +60,9 @@ widen.
|
|
|
60
60
|
overlay clips to it without recomputing the radius on that overlay too — safe here because,
|
|
61
61
|
unlike `Button`, nothing needs to be drawn outside this box). Colour → resolved from role tokens
|
|
62
62
|
(`resolveSkeletonColors`), applied inline.
|
|
63
|
-
2. **Shimmer is
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
driving a 0→1 value, interpolated `[0, 0.5, 1] → [0, 1, 0]` — **not** a looped
|
|
67
|
-
`Animated.sequence` of two timings. `Animated.loop` only takes RN's native path
|
|
68
|
-
(`_startNativeLoop`) when what it wraps reports `_isUsingNativeDriver()`, which
|
|
69
|
-
`Animated.sequence` returns `false` for unconditionally; a looped sequence therefore restarts
|
|
70
|
-
each leg from the JS thread, per row, exactly while the app is parsing the response those rows
|
|
71
|
-
are waiting on. `ProgressBar`'s sweep is the same bare-timing shape, for the same reason. The overlay colour is `base` composited with a
|
|
72
|
-
fixed-alpha `fg.default` (via `compositeOver`, same precedent as `Button`'s `PRESS_SCRIM_DARK`/
|
|
73
|
-
`LIGHT`) — **not** a second role lookup like `bg.raised`. Two arbitrary role rungs are not
|
|
74
|
-
guaranteed to differ enough to read as a shimmer: an earlier version used `bg.raised`, and a
|
|
75
|
-
contrast-ratio floor added to `Skeleton.test.ts` (`MIN_PULSE_CONTRAST`) caught that pair
|
|
76
|
-
collapsing to visually-indistinguishable on every brand × mode. Compositing a fixed-alpha overlay
|
|
77
|
-
makes the luminance delta a controlled constant instead of an incidental one.
|
|
63
|
+
2. **Shimmer is a translating highlight band** — base = neutral ramp step 3 (`background[300]`),
|
|
64
|
+
highlight = step 5 (`background[500]`), band width 40%, linear 1400ms `withRepeat`, optional
|
|
65
|
+
`staggerIndex` delay. One `translateX` transform — no opacity pulse.
|
|
78
66
|
3. **Pure, testable resolvers** in `Skeleton.variants.ts` (no React) so the colour, sizing, and a11y
|
|
79
67
|
contracts are unit-tested against real palettes — never eyeballed.
|
|
80
68
|
4. **Closed union only** (`shape`), `style: LayoutStyle` last and once, no `{...rest}`.
|
|
@@ -90,11 +78,17 @@ still stays layout-only, outermost, and last, for placement (margin, `alignSelf`
|
|
|
90
78
|
|
|
91
79
|
## Known gaps
|
|
92
80
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
`
|
|
81
|
+
- No `staggerIndex` auto-assignment inside a list — the caller passes it per sibling when needed.
|
|
82
|
+
|
|
83
|
+
## Why the shimmer duration is NOT a `MOTION_DURATION` key
|
|
84
|
+
|
|
85
|
+
`SKELETON_SHIMMER_DURATION_MS` (1400ms) and `SKELETON_STAGGER_MS` (100ms) are bespoke constants,
|
|
86
|
+
not `motion.duration("deliberate")` (500ms) like `TypingIndicator`'s dot pulse. Deliberate is the
|
|
87
|
+
library's longest discrete key and is reserved for one-shot UI transitions ("onboarding and
|
|
88
|
+
first-run emphasis only" per `core/motion/config.ts`); a shimmer is a continuous ambient loop, a
|
|
89
|
+
different category, and industry-standard shimmer cadence sits at 1200–1600ms — forcing it onto a
|
|
90
|
+
500ms transition would read as rushed and busy rather than a calm loading cue. The value is still
|
|
91
|
+
gated by `useReducedMotion()` (WCAG 2.3.3), the same OS-level signal `useMotion()` itself reads.
|
|
98
92
|
|
|
99
93
|
## Performance
|
|
100
94
|
|
|
@@ -105,3 +99,5 @@ Wrapped in `React.memo` (repo-wide re-render audit, 2026-07-17 — see root `CLA
|
|
|
105
99
|
- Theme imports decoupled to `theme/hooks`; optional peers (reanimated, gesture-handler, flash-list) load at runtime.
|
|
106
100
|
- List-heavy surfaces use `VirtualList` with device-tier window sizing where applicable.
|
|
107
101
|
- `React.memo` + stable callbacks retained; render-item/key-extractor hoisted per ESLint perf rules.
|
|
102
|
+
|
|
103
|
+
- **Round 2 visual** — radii retarget (`radii.md`/`lg`/`xl`/`full`), `borderCurve: continuous` on md+ corners; floating surfaces wire platform elevation/highlight where applicable.
|
|
@@ -1,79 +1,67 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* Skeleton — a loading placeholder
|
|
5
|
-
* still on its way. It is its own size (`width`/`height` are component-owned props, not
|
|
6
|
-
* `LayoutStyle` — sizing IS the point of this component) and has exactly one neutral appearance:
|
|
7
|
-
* a resting `bg.sunken` fill cross-faded with a fixed-alpha `fg.default` overlay composited over it
|
|
8
|
-
* (see `resolveSkeletonColors`), pulsing on an `Animated` opacity loop. Purely decorative by default
|
|
9
|
-
* (see `Skeleton.variants.ts` →
|
|
10
|
-
* `resolveSkeletonAccessibility`, the same "decorative unless labelled" contract as `Avatar`).
|
|
11
|
-
*
|
|
12
|
-
* The shimmer is gated on `motion.decorative`, so it runs on high-tier devices only. A skeleton is
|
|
13
|
-
* usually rendered one-per-row across a whole loading list, and a per-row loop is the single most
|
|
14
|
-
* expensive thing a placeholder can do — low/mid tiers and reduce-motion get the static fill. Even
|
|
15
|
-
* on high tier the loop is shaped so it costs zero JS per iteration: see the effect below.
|
|
4
|
+
* Skeleton — a loading placeholder with a translating highlight-band shimmer over a neutral base.
|
|
16
5
|
*/
|
|
17
6
|
|
|
18
|
-
import { memo, useEffect, useMemo
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
7
|
+
import { memo, useEffect, useMemo } from "react";
|
|
8
|
+
import { StyleSheet } from "react-native";
|
|
9
|
+
import Animated, { Easing, ReduceMotion, useAnimatedStyle, useSharedValue, withDelay, withRepeat, withTiming } from "react-native-reanimated";
|
|
10
|
+
import { useReducedMotion } from "../../core/a11y/index.js";
|
|
21
11
|
import { useTheme } from "../../theme/hooks.js";
|
|
22
|
-
import { resolveSkeletonAccessibility, resolveSkeletonColors, resolveSkeletonSize, skeletonStructure } from "./Skeleton.variants.js";
|
|
12
|
+
import { resolveSkeletonAccessibility, resolveSkeletonColors, resolveSkeletonSize, SKELETON_BAND_WIDTH_RATIO, SKELETON_SHIMMER_DURATION_MS, SKELETON_STAGGER_MS, skeletonStructure } from "./Skeleton.variants.js";
|
|
23
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
14
|
export const Skeleton = /*#__PURE__*/memo(function Skeleton({
|
|
25
15
|
shape = "rect",
|
|
26
16
|
width,
|
|
27
17
|
height,
|
|
18
|
+
staggerIndex = 0,
|
|
28
19
|
accessibilityLabel,
|
|
29
20
|
style,
|
|
30
21
|
testID
|
|
31
22
|
}) {
|
|
32
23
|
const theme = useTheme();
|
|
33
|
-
const
|
|
34
|
-
const
|
|
35
|
-
const loop = useRef(null);
|
|
24
|
+
const reducedMotion = useReducedMotion();
|
|
25
|
+
const translateX = useSharedValue(0);
|
|
36
26
|
const size = resolveSkeletonSize(shape, width, height);
|
|
37
27
|
const a11y = resolveSkeletonAccessibility({
|
|
38
28
|
accessibilityLabel
|
|
39
29
|
});
|
|
40
|
-
const colors = useMemo(() => resolveSkeletonColors(theme.
|
|
41
|
-
const shimmer =
|
|
30
|
+
const colors = useMemo(() => resolveSkeletonColors(theme.palette), [theme.palette]);
|
|
31
|
+
const shimmer = !reducedMotion;
|
|
32
|
+
const bandWidth = size.width * SKELETON_BAND_WIDTH_RATIO;
|
|
42
33
|
useEffect(() => {
|
|
43
|
-
if (!shimmer)
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
}, [shimmer, motion, pulse]);
|
|
58
|
-
|
|
59
|
-
// The effect cleanup above already stops the loop, but only while `shimmer` stays true across the
|
|
60
|
-
// unmount — this guarantees it regardless of the order React tears the tree down in.
|
|
61
|
-
useEffect(() => () => loop.current?.stop(), []);
|
|
34
|
+
if (!shimmer || size.width <= 0) {
|
|
35
|
+
translateX.value = 0;
|
|
36
|
+
return undefined;
|
|
37
|
+
}
|
|
38
|
+
const travel = size.width + bandWidth;
|
|
39
|
+
const delay = staggerIndex * SKELETON_STAGGER_MS;
|
|
40
|
+
translateX.value = -bandWidth;
|
|
41
|
+
translateX.value = withDelay(delay, withRepeat(withTiming(travel, {
|
|
42
|
+
duration: SKELETON_SHIMMER_DURATION_MS,
|
|
43
|
+
easing: Easing.linear,
|
|
44
|
+
reduceMotion: ReduceMotion.System
|
|
45
|
+
}), -1, false));
|
|
46
|
+
return undefined;
|
|
47
|
+
}, [shimmer, size.width, bandWidth, staggerIndex, translateX]);
|
|
62
48
|
const rootStyle = useMemo(() => [skeletonStructure(theme, {
|
|
63
49
|
shape
|
|
64
50
|
}), {
|
|
65
51
|
width: size.width,
|
|
66
52
|
height: size.height,
|
|
67
53
|
backgroundColor: colors.base
|
|
68
|
-
}, style], [theme, shape, size.width, size.height, colors, style]);
|
|
69
|
-
const
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
54
|
+
}, style], [theme, shape, size.width, size.height, colors.base, style]);
|
|
55
|
+
const bandStyle = useAnimatedStyle(() => ({
|
|
56
|
+
transform: [{
|
|
57
|
+
translateX: translateX.value
|
|
58
|
+
}]
|
|
59
|
+
}));
|
|
60
|
+
const highlightStaticStyle = useMemo(() => ({
|
|
61
|
+
width: bandWidth,
|
|
62
|
+
height: size.height,
|
|
63
|
+
backgroundColor: colors.highlight
|
|
64
|
+
}), [bandWidth, size.height, colors.highlight]);
|
|
77
65
|
return /*#__PURE__*/_jsx(Animated.View, {
|
|
78
66
|
testID: testID,
|
|
79
67
|
accessible: a11y.accessible,
|
|
@@ -83,10 +71,17 @@ export const Skeleton = /*#__PURE__*/memo(function Skeleton({
|
|
|
83
71
|
"aria-hidden": a11y["aria-hidden"],
|
|
84
72
|
style: rootStyle,
|
|
85
73
|
children: shimmer && /*#__PURE__*/_jsx(Animated.View, {
|
|
86
|
-
testID: testID === undefined ? undefined : `${testID}-
|
|
74
|
+
testID: testID === undefined ? undefined : `${testID}-shimmer`,
|
|
87
75
|
pointerEvents: "none",
|
|
88
|
-
style:
|
|
76
|
+
style: [styles.band, highlightStaticStyle, bandStyle]
|
|
89
77
|
})
|
|
90
78
|
});
|
|
91
79
|
});
|
|
80
|
+
const styles = StyleSheet.create({
|
|
81
|
+
band: {
|
|
82
|
+
position: "absolute",
|
|
83
|
+
top: 0,
|
|
84
|
+
left: 0
|
|
85
|
+
}
|
|
86
|
+
});
|
|
92
87
|
//# sourceMappingURL=Skeleton.js.map
|
|
@@ -3,28 +3,8 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Skeleton's style + accessibility resolution — the pure functions the component (and its tests)
|
|
5
5
|
* depend on, plus the themed structural variant resolver.
|
|
6
|
-
*
|
|
7
|
-
* The split every sibling module copies (see `Button.variants.ts` / `Avatar.variants.ts`):
|
|
8
|
-
* - STRUCTURE (the shape's corner radius) lives in the `createThemedVariants` resolver below —
|
|
9
|
-
* static per (brand, mode), registered once via `StyleSheet.create`.
|
|
10
|
-
* - SIZE is NOT theme-driven: a skeleton's whole job is standing in for a specific piece of
|
|
11
|
-
* content, so `width`/`height` are per-instance numbers the caller supplies (or a per-shape
|
|
12
|
-
* fallback), resolved by `resolveSkeletonSize` and applied inline — never a themed variant,
|
|
13
|
-
* since there is no closed set of values to register.
|
|
14
|
-
* - COLOUR is resolved from the theme's ROLE colours (`resolveSkeletonColors`), never a raw ramp,
|
|
15
|
-
* never a hardcoded hex. There is no `tone` prop to widen — a loading placeholder has exactly
|
|
16
|
-
* one neutral appearance (same reasoning as `resolveAvatarColors`). `pulse` is `base` composited
|
|
17
|
-
* with a fixed-alpha overlay (see `resolveSkeletonColors`), not a second role lookup — two
|
|
18
|
-
* arbitrary role rungs are not guaranteed to differ enough to read as a shimmer.
|
|
19
|
-
* - ACCESSIBILITY prop derivation is `resolveSkeletonAccessibility`, kept pure so the "decorative
|
|
20
|
-
* unless labelled" contract is unit-testable without rendering React Native (same shape as
|
|
21
|
-
* `resolveAvatarAccessibility`).
|
|
22
|
-
*
|
|
23
|
-
* Free of React and of any lucide import, so the WCAG + behaviour tests import it directly (mocking
|
|
24
|
-
* only `react-native`'s `StyleSheet`, as `core/style` and every sibling module's tests do).
|
|
25
6
|
*/
|
|
26
7
|
|
|
27
|
-
import { compositeOver } from "../../theme/tokens/builders/color.js";
|
|
28
8
|
import { createThemedVariants } from "../../core/style/index.js";
|
|
29
9
|
/** Fallback dp size per shape, used whenever the caller gives neither `width` nor `height`. */
|
|
30
10
|
export const SKELETON_DEFAULT_SIZE = {
|
|
@@ -42,12 +22,10 @@ export const SKELETON_DEFAULT_SIZE = {
|
|
|
42
22
|
}
|
|
43
23
|
};
|
|
44
24
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
* silently drifting apart.
|
|
50
|
-
*/
|
|
25
|
+
// Ambient loop, not a one-shot transition — deliberately outside `MOTION_DURATION`; see MODULE.md.
|
|
26
|
+
export const SKELETON_SHIMMER_DURATION_MS = 1400;
|
|
27
|
+
export const SKELETON_BAND_WIDTH_RATIO = 0.4;
|
|
28
|
+
export const SKELETON_STAGGER_MS = 100;
|
|
51
29
|
export function resolveSkeletonSize(shape, width, height) {
|
|
52
30
|
const fallback = SKELETON_DEFAULT_SIZE[shape];
|
|
53
31
|
if (shape === "circle") {
|
|
@@ -62,45 +40,18 @@ export function resolveSkeletonSize(shape, width, height) {
|
|
|
62
40
|
height: height ?? fallback.height
|
|
63
41
|
};
|
|
64
42
|
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
// in dark mode, so compositing it darkens/lightens `base` for free with no `if (dark)` branch. ~30%
|
|
68
|
-
// alpha keeps the composited contrast ratio ≥ `MIN_PULSE_CONTRAST` (see `Skeleton.test.ts`) on every
|
|
69
|
-
// brand × mode, with comfortable headroom above the floor.
|
|
70
|
-
const PULSE_OVERLAY_ALPHA_HEX = "4d"; // 0x4d / 0xff ≈ 30%
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* Maps the placeholder onto role colours, then derives `pulse` as `base` composited with a small,
|
|
74
|
-
* fixed-alpha overlay — never a second role lookup. A prior version returned `base: bg.sunken, pulse:
|
|
75
|
-
* bg.raised`: two role rungs whose luminance gap is whatever the brand's ramp happens to produce, and
|
|
76
|
-
* an independent re-measurement found that gap collapses to visually-indistinguishable on every
|
|
77
|
-
* brand × mode — the shimmer was a silent no-op everywhere, not just on one theme. Compositing a
|
|
78
|
-
* fixed-alpha overlay makes the luminance delta a controlled constant instead of an incidental one,
|
|
79
|
-
* so it can't collapse regardless of how a brand's `bg.raised`/`bg.sunken` rungs happen to relate.
|
|
80
|
-
*/
|
|
81
|
-
export function resolveSkeletonColors(colors) {
|
|
82
|
-
const base = colors.bg.sunken;
|
|
83
|
-
const pulse = compositeOver(`${colors.fg.default}${PULSE_OVERLAY_ALPHA_HEX}`, base);
|
|
43
|
+
/** Neutral ramp step 3 (base) and step 5 (highlight band) on the gray ramp. */
|
|
44
|
+
export function resolveSkeletonColors(palette) {
|
|
84
45
|
return {
|
|
85
|
-
base,
|
|
86
|
-
|
|
46
|
+
base: palette.gray[300],
|
|
47
|
+
highlight: palette.gray[500]
|
|
87
48
|
};
|
|
88
49
|
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
* unexplained box.
|
|
95
|
-
* - a label (e.g. `"Loading"`) → exposed as one `"progressbar"`-role element carrying it, with
|
|
96
|
-
* `busy: true` (WCAG 1.4.1 — the loading state is announced, not left to be inferred from a box
|
|
97
|
-
* appearing on screen).
|
|
98
|
-
*
|
|
99
|
-
* `aria-hidden` covers BOTH platforms in one prop: RN maps it onto `accessibilityElementsHidden`
|
|
100
|
-
* (iOS) + `importantForAccessibility="no-hide-descendants"` (Android), and react-native-web forwards
|
|
101
|
-
* it to the DOM — where those two native props reach nothing, so an unlabelled skeleton used to stay
|
|
102
|
-
* fully exposed to a screen reader on web.
|
|
103
|
-
*/
|
|
50
|
+
|
|
51
|
+
/** @deprecated Use palette-based resolver — kept for tests importing RoleColors. */
|
|
52
|
+
export function resolveSkeletonColorsFromRoles(_colors, palette) {
|
|
53
|
+
return resolveSkeletonColors(palette);
|
|
54
|
+
}
|
|
104
55
|
export function resolveSkeletonAccessibility(input) {
|
|
105
56
|
const hasLabel = input.accessibilityLabel !== undefined && input.accessibilityLabel.length > 0;
|
|
106
57
|
return {
|
|
@@ -111,17 +62,6 @@ export function resolveSkeletonAccessibility(input) {
|
|
|
111
62
|
"aria-hidden": hasLabel ? undefined : true
|
|
112
63
|
};
|
|
113
64
|
}
|
|
114
|
-
|
|
115
|
-
/**
|
|
116
|
-
* Structural styles only — the shape's corner radius, plus `overflow: "hidden"` so the animated
|
|
117
|
-
* shimmer overlay (an absolutely-positioned sibling, see `Skeleton.tsx`) clips to it without each
|
|
118
|
-
* shape recomputing the same radius on that overlay. No colour (state-driven, applied inline over
|
|
119
|
-
* this), so this compiles once per theme identity via the `WeakMap`-cached themed resolver and
|
|
120
|
-
* never rebuilds per render.
|
|
121
|
-
*
|
|
122
|
-
* Unlike `Button`, there is no focus ring here that needs to escape the bounds, so `overflow:
|
|
123
|
-
* "hidden"` is safe — nothing else needs to be drawn outside this box.
|
|
124
|
-
*/
|
|
125
65
|
export const skeletonStructure = createThemedVariants(theme => ({
|
|
126
66
|
base: {
|
|
127
67
|
overflow: "hidden"
|
|
@@ -129,10 +69,12 @@ export const skeletonStructure = createThemedVariants(theme => ({
|
|
|
129
69
|
variants: {
|
|
130
70
|
shape: {
|
|
131
71
|
rect: {
|
|
132
|
-
borderRadius: theme.radii.
|
|
72
|
+
borderRadius: theme.radii.md,
|
|
73
|
+
borderCurve: "continuous"
|
|
133
74
|
},
|
|
134
75
|
circle: {
|
|
135
|
-
borderRadius: theme.radii.full
|
|
76
|
+
borderRadius: theme.radii.full,
|
|
77
|
+
borderCurve: "continuous"
|
|
136
78
|
},
|
|
137
79
|
text: {
|
|
138
80
|
borderRadius: theme.radii.sm
|
|
@@ -119,3 +119,5 @@ Wrapped in `React.memo` (repo-wide re-render audit, 2026-07-17 — see root `CLA
|
|
|
119
119
|
- Theme imports decoupled to `theme/hooks`; optional peers (reanimated, gesture-handler, flash-list) load at runtime.
|
|
120
120
|
- List-heavy surfaces use `VirtualList` with device-tier window sizing where applicable.
|
|
121
121
|
- `React.memo` + stable callbacks retained; render-item/key-extractor hoisted per ESLint perf rules.
|
|
122
|
+
|
|
123
|
+
- **Round 2 visual** — radii retarget (`radii.md`/`lg`/`xl`/`full`), `borderCurve: continuous` on md+ corners; floating surfaces wire platform elevation/highlight where applicable.
|
|
@@ -192,7 +192,8 @@ export const Slider = /*#__PURE__*/memo(function Slider(props) {
|
|
|
192
192
|
testID: testID === undefined ? undefined : `${testID}-focus-ring`,
|
|
193
193
|
style: [styles.focusRing, {
|
|
194
194
|
borderColor: theme.colors.border.focus,
|
|
195
|
-
borderRadius: theme.radii.
|
|
195
|
+
borderRadius: theme.radii.md + FOCUS_RING_GAP + FOCUS_RING_WIDTH,
|
|
196
|
+
borderCurve: "continuous"
|
|
196
197
|
}]
|
|
197
198
|
}), /*#__PURE__*/_jsx(View, {
|
|
198
199
|
pointerEvents: "none",
|
|
@@ -7,7 +7,7 @@ Horizontal pipeline — `variant`: `pills` | `bar` | `stepper`. `value` is activ
|
|
|
7
7
|
| File | Role |
|
|
8
8
|
|------|------|
|
|
9
9
|
| `StageProgress.variants.ts` | `resolveStageState` / `resolveActiveStageIndex`, the accessibility resolvers, `resolveStageProgressColors(RoleColors)`, and the structure resolvers. Plain, hook-free. |
|
|
10
|
-
| `StageProgress.tsx` | Renders the row; picks the fill/text pair per stage state and wraps
|
|
10
|
+
| `StageProgress.tsx` | Renders the row; picks the fill/text pair per stage state and wraps an interactive stage in the memoized `StagePressable` (scale/opacity via `usePressState` + `android_ripple`), same pattern as `Button`/`RadioGroup`. |
|
|
11
11
|
|
|
12
12
|
## Props
|
|
13
13
|
|
|
@@ -24,9 +24,11 @@ Horizontal pipeline — `variant`: `pills` | `bar` | `stepper`. `value` is activ
|
|
|
24
24
|
- **`pills` / `stepper`** label each stage instead: `resolveStageAccessibilityLabel` appends the
|
|
25
25
|
state — `", completed"` / `", current stage"` / `", not started"`. That suffix is the WCAG 1.4.1
|
|
26
26
|
fix; fill colour is otherwise the only thing separating a completed stage from an upcoming one, and
|
|
27
|
-
there is no "completed" state to announce directly. `resolveStageAccessibilityState` supplies
|
|
28
|
-
`aria-
|
|
29
|
-
|
|
27
|
+
there is no "completed" state to announce directly. `resolveStageAccessibilityState` supplies
|
|
28
|
+
`aria-current="step"` (active only, WEB) + `accessibilityState={{ selected }}` (the NATIVE
|
|
29
|
+
fallback — React Native has no "current" concept) — not `aria-selected`, which is invalid ARIA on
|
|
30
|
+
`role="button"` and on a read-only stage's bare `View` alike (2026-08 sweep; mirrors `pagination`'s
|
|
31
|
+
`aria-current="page"` for "the page you're on", token `"step"` here instead).
|
|
30
32
|
- **WCAG 2.4.7** — an interactive stage (`readOnly={false}`, not `disabled`) draws a `border.focus`
|
|
31
33
|
ring (`${testID}-focus-ring-${stage.id}`) while focused. It is drawn **inside** the stage's
|
|
32
34
|
bounds: `stageProgressRowStructure` clips to `overflow: "hidden"` and spaces stages one space step
|
|
@@ -50,10 +52,10 @@ no `Pressable`, and need no target.
|
|
|
50
52
|
| `upcomingText` on `upcomingFill` (`fg.muted` / `bg.sunken`) | 6.45 |
|
|
51
53
|
| `upcomingText` on `bg.canvas` (the `stepper` label under the circle) | 6.52 |
|
|
52
54
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
(`bg.sunken` at ~1.01–1.12 on the canvas); the
|
|
56
|
-
label, not by contrast.
|
|
55
|
+
Pills and stepper circles carry no outline any more — `theme.elevation.sm` lifts them off the row
|
|
56
|
+
instead (Wave 5 tonal restyle), the same "tone/depth, not a hairline" treatment `Card`'s elevated
|
|
57
|
+
variant uses. Bar-segment fills are deliberately quiet (`bg.sunken` at ~1.01–1.12 on the canvas); the
|
|
58
|
+
state they encode is carried by the progressbar label, not by contrast.
|
|
57
59
|
|
|
58
60
|
## Known gaps
|
|
59
61
|
|
|
@@ -62,3 +64,5 @@ label, not by contrast.
|
|
|
62
64
|
cannot move outside the stage — the row clips — so a fix would be a token-level decision, not a
|
|
63
65
|
change here.
|
|
64
66
|
- There is no arrow-key path between stages: each interactive stage is its own tab stop.
|
|
67
|
+
|
|
68
|
+
- **Round 2 visual** — radii retarget (`radii.md`/`lg`/`xl`/`full`), `borderCurve: continuous` on md+ corners; floating surfaces wire platform elevation/highlight where applicable.
|