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
|
@@ -1,27 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Skeleton's style + accessibility resolution — the pure functions the component (and its tests)
|
|
3
3
|
* depend on, plus the themed structural variant resolver.
|
|
4
|
-
*
|
|
5
|
-
* The split every sibling module copies (see `Button.variants.ts` / `Avatar.variants.ts`):
|
|
6
|
-
* - STRUCTURE (the shape's corner radius) lives in the `createThemedVariants` resolver below —
|
|
7
|
-
* static per (brand, mode), registered once via `StyleSheet.create`.
|
|
8
|
-
* - SIZE is NOT theme-driven: a skeleton's whole job is standing in for a specific piece of
|
|
9
|
-
* content, so `width`/`height` are per-instance numbers the caller supplies (or a per-shape
|
|
10
|
-
* fallback), resolved by `resolveSkeletonSize` and applied inline — never a themed variant,
|
|
11
|
-
* since there is no closed set of values to register.
|
|
12
|
-
* - COLOUR is resolved from the theme's ROLE colours (`resolveSkeletonColors`), never a raw ramp,
|
|
13
|
-
* never a hardcoded hex. There is no `tone` prop to widen — a loading placeholder has exactly
|
|
14
|
-
* one neutral appearance (same reasoning as `resolveAvatarColors`). `pulse` is `base` composited
|
|
15
|
-
* with a fixed-alpha overlay (see `resolveSkeletonColors`), not a second role lookup — two
|
|
16
|
-
* arbitrary role rungs are not guaranteed to differ enough to read as a shimmer.
|
|
17
|
-
* - ACCESSIBILITY prop derivation is `resolveSkeletonAccessibility`, kept pure so the "decorative
|
|
18
|
-
* unless labelled" contract is unit-testable without rendering React Native (same shape as
|
|
19
|
-
* `resolveAvatarAccessibility`).
|
|
20
|
-
*
|
|
21
|
-
* Free of React and of any lucide import, so the WCAG + behaviour tests import it directly (mocking
|
|
22
|
-
* only `react-native`'s `StyleSheet`, as `core/style` and every sibling module's tests do).
|
|
23
4
|
*/
|
|
24
|
-
import type { RoleColors, Theme } from "../../theme/hooks";
|
|
5
|
+
import type { PaletteProps, RoleColors, Theme } from "../../theme/hooks";
|
|
25
6
|
export type SkeletonShape = "rect" | "circle" | "text";
|
|
26
7
|
export interface SkeletonSizeSpec {
|
|
27
8
|
readonly width: number;
|
|
@@ -42,75 +23,38 @@ export declare const SKELETON_DEFAULT_SIZE: {
|
|
|
42
23
|
readonly height: 16;
|
|
43
24
|
};
|
|
44
25
|
};
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
* radius, not a circle — so a single given dimension mirrors onto the other rather than the two
|
|
49
|
-
* silently drifting apart.
|
|
50
|
-
*/
|
|
26
|
+
export declare const SKELETON_SHIMMER_DURATION_MS = 1400;
|
|
27
|
+
export declare const SKELETON_BAND_WIDTH_RATIO = 0.4;
|
|
28
|
+
export declare const SKELETON_STAGGER_MS = 100;
|
|
51
29
|
export declare function resolveSkeletonSize(shape: SkeletonShape, width: number | undefined, height: number | undefined): SkeletonSizeSpec;
|
|
52
30
|
export interface SkeletonColors {
|
|
53
|
-
/** The resting fill. */
|
|
54
31
|
readonly base: string;
|
|
55
|
-
|
|
56
|
-
readonly pulse: string;
|
|
32
|
+
readonly highlight: string;
|
|
57
33
|
}
|
|
58
|
-
/**
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
* an independent re-measurement found that gap collapses to visually-indistinguishable on every
|
|
63
|
-
* brand × mode — the shimmer was a silent no-op everywhere, not just on one theme. Compositing a
|
|
64
|
-
* fixed-alpha overlay makes the luminance delta a controlled constant instead of an incidental one,
|
|
65
|
-
* so it can't collapse regardless of how a brand's `bg.raised`/`bg.sunken` rungs happen to relate.
|
|
66
|
-
*/
|
|
67
|
-
export declare function resolveSkeletonColors(colors: RoleColors): SkeletonColors;
|
|
34
|
+
/** Neutral ramp step 3 (base) and step 5 (highlight band) on the gray ramp. */
|
|
35
|
+
export declare function resolveSkeletonColors(palette: PaletteProps): SkeletonColors;
|
|
36
|
+
/** @deprecated Use palette-based resolver — kept for tests importing RoleColors. */
|
|
37
|
+
export declare function resolveSkeletonColorsFromRoles(_colors: RoleColors, palette: PaletteProps): SkeletonColors;
|
|
68
38
|
export interface SkeletonAccessibilityInput {
|
|
69
39
|
readonly accessibilityLabel?: string | undefined;
|
|
70
40
|
}
|
|
71
41
|
export interface SkeletonAccessibilityProps {
|
|
72
|
-
/** Groups the placeholder into one accessible element only when it actually carries a name. */
|
|
73
42
|
readonly accessible: boolean;
|
|
74
43
|
readonly accessibilityRole: "progressbar" | undefined;
|
|
75
44
|
readonly accessibilityLabel: string | undefined;
|
|
76
|
-
/** Indeterminate progress is still busy — announced only on the labelled (exposed) path. */
|
|
77
45
|
readonly "aria-busy": boolean | undefined;
|
|
78
|
-
/** Hides the whole element from assistive tech when decorative. */
|
|
79
46
|
readonly "aria-hidden": true | undefined;
|
|
80
47
|
}
|
|
81
|
-
/**
|
|
82
|
-
* Derives the accessibility surface once, purely, so the "decorative unless labelled" contract is
|
|
83
|
-
* testable without a renderer (same shape as `resolveAvatarAccessibility`):
|
|
84
|
-
* - no label → the placeholder stands in for content that hasn't rendered yet and carries no
|
|
85
|
-
* meaning of its own, so it is hidden from assistive tech rather than read as a bare,
|
|
86
|
-
* unexplained box.
|
|
87
|
-
* - a label (e.g. `"Loading"`) → exposed as one `"progressbar"`-role element carrying it, with
|
|
88
|
-
* `busy: true` (WCAG 1.4.1 — the loading state is announced, not left to be inferred from a box
|
|
89
|
-
* appearing on screen).
|
|
90
|
-
*
|
|
91
|
-
* `aria-hidden` covers BOTH platforms in one prop: RN maps it onto `accessibilityElementsHidden`
|
|
92
|
-
* (iOS) + `importantForAccessibility="no-hide-descendants"` (Android), and react-native-web forwards
|
|
93
|
-
* it to the DOM — where those two native props reach nothing, so an unlabelled skeleton used to stay
|
|
94
|
-
* fully exposed to a screen reader on web.
|
|
95
|
-
*/
|
|
96
48
|
export declare function resolveSkeletonAccessibility(input: SkeletonAccessibilityInput): SkeletonAccessibilityProps;
|
|
97
|
-
/**
|
|
98
|
-
* Structural styles only — the shape's corner radius, plus `overflow: "hidden"` so the animated
|
|
99
|
-
* shimmer overlay (an absolutely-positioned sibling, see `Skeleton.tsx`) clips to it without each
|
|
100
|
-
* shape recomputing the same radius on that overlay. No colour (state-driven, applied inline over
|
|
101
|
-
* this), so this compiles once per theme identity via the `WeakMap`-cached themed resolver and
|
|
102
|
-
* never rebuilds per render.
|
|
103
|
-
*
|
|
104
|
-
* Unlike `Button`, there is no focus ring here that needs to escape the bounds, so `overflow:
|
|
105
|
-
* "hidden"` is safe — nothing else needs to be drawn outside this box.
|
|
106
|
-
*/
|
|
107
49
|
export declare const skeletonStructure: import("../../core/style").ThemedVariantResolver<Theme, {
|
|
108
50
|
shape: {
|
|
109
51
|
rect: {
|
|
110
|
-
borderRadius:
|
|
52
|
+
borderRadius: 12;
|
|
53
|
+
borderCurve: "continuous";
|
|
111
54
|
};
|
|
112
55
|
circle: {
|
|
113
56
|
borderRadius: 9999;
|
|
57
|
+
borderCurve: "continuous";
|
|
114
58
|
};
|
|
115
59
|
text: {
|
|
116
60
|
borderRadius: 4;
|
|
@@ -42,13 +42,21 @@ export declare function resolveActiveStageIndex(stages: readonly StageProgressSt
|
|
|
42
42
|
*/
|
|
43
43
|
export declare function resolveStageAccessibilityLabel(label: string, state: StageState): string;
|
|
44
44
|
export interface StageAccessibilityState {
|
|
45
|
-
|
|
45
|
+
/** The WEB half of "this is the stage you're on". A stage is `role="button"` (or carries no role
|
|
46
|
+
* at all when read-only) and `aria-selected` is valid on neither — `aria-current="step"` is the
|
|
47
|
+
* WAI-ARIA signal for a step in a process, and unlike `aria-selected` it has no role restriction
|
|
48
|
+
* (same fix `pagination` uses for "the page you're on", token `"page"` there vs `"step"` here). */
|
|
49
|
+
readonly "aria-current": "step" | undefined;
|
|
50
|
+
/** The NATIVE half — React Native has no "current" concept and react-native-web discards the
|
|
51
|
+
* object form, so this never reaches the DOM; `selected` is the nearest native equivalent. */
|
|
52
|
+
readonly accessibilityState: {
|
|
53
|
+
readonly selected: boolean;
|
|
54
|
+
};
|
|
46
55
|
readonly "aria-disabled": boolean;
|
|
47
56
|
}
|
|
48
57
|
/**
|
|
49
|
-
* Flat `aria
|
|
50
|
-
*
|
|
51
|
-
* nothing at all on web.
|
|
58
|
+
* Flat `aria-current` for web + explicit `accessibilityState` for native — see the field comments
|
|
59
|
+
* above for why this pair (not a single flat prop) is required here specifically.
|
|
52
60
|
*/
|
|
53
61
|
export declare function resolveStageAccessibilityState(state: StageState, disabled: boolean | undefined): StageAccessibilityState;
|
|
54
62
|
export interface StageProgressAccessibilityProps {
|
|
@@ -72,7 +80,6 @@ export interface StageProgressColors {
|
|
|
72
80
|
readonly completedText: string;
|
|
73
81
|
readonly upcomingFill: string;
|
|
74
82
|
readonly upcomingText: string;
|
|
75
|
-
readonly track: string;
|
|
76
83
|
}
|
|
77
84
|
export declare function resolveStageProgressColors(colors: RoleColors): StageProgressColors;
|
|
78
85
|
export declare const stageProgressRowStructure: import("../../core/style").ThemedVariantResolver<Theme, import("../../core/style").VariantGroups<import("react-native").ViewStyle>, import("react-native").ViewStyle>;
|
|
@@ -87,9 +94,11 @@ export declare const stageFocusRingStructure: import("../../core/style").ThemedV
|
|
|
87
94
|
variant: {
|
|
88
95
|
pill: {
|
|
89
96
|
borderRadius: 9999;
|
|
97
|
+
borderCurve: "continuous";
|
|
90
98
|
};
|
|
91
99
|
stepper: {
|
|
92
|
-
borderRadius:
|
|
100
|
+
borderRadius: 12;
|
|
101
|
+
borderCurve: "continuous";
|
|
93
102
|
};
|
|
94
103
|
};
|
|
95
104
|
}, import("react-native").ViewStyle>;
|
|
@@ -25,6 +25,8 @@ export interface LoadingStateProps {
|
|
|
25
25
|
message?: string;
|
|
26
26
|
size?: SpinnerSize;
|
|
27
27
|
tone?: SpinnerTone;
|
|
28
|
+
/** Expands to fill and centre in a flex parent (e.g. a list empty slot). */
|
|
29
|
+
fill?: boolean;
|
|
28
30
|
/** Fades and slides the block out when set to `false`, then unmounts it. */
|
|
29
31
|
visible?: boolean;
|
|
30
32
|
/** Layout-only, outermost, applied exactly once as the LAST entry in the root style array. */
|
|
@@ -40,6 +42,8 @@ export interface ErrorStateProps {
|
|
|
40
42
|
title: string;
|
|
41
43
|
description?: string;
|
|
42
44
|
action?: ErrorStateAction;
|
|
45
|
+
/** Expands to fill and centre in a flex parent (e.g. a list empty slot). */
|
|
46
|
+
fill?: boolean;
|
|
43
47
|
/** Fades and slides the block out when set to `false`, then unmounts it. */
|
|
44
48
|
visible?: boolean;
|
|
45
49
|
/** Layout-only, outermost, applied exactly once as the LAST entry in the root style array. */
|
|
@@ -27,4 +27,5 @@ export declare function resolveErrorStateColors(colors: RoleColors): ErrorStateC
|
|
|
27
27
|
export declare function resolveErrorStateAnnouncement(title: string, description: string | undefined): string;
|
|
28
28
|
export declare const loadingStateStructure: import("../../core/style").ThemedVariantResolver<Theme, import("../../core/style").VariantGroups<import("react-native").ViewStyle>, import("react-native").ViewStyle>;
|
|
29
29
|
export declare const errorStateStructure: import("../../core/style").ThemedVariantResolver<Theme, import("../../core/style").VariantGroups<import("react-native").ViewStyle>, import("react-native").ViewStyle>;
|
|
30
|
+
export declare const stateBlockFillStructure: import("../../core/style").ThemedVariantResolver<Theme, import("../../core/style").VariantGroups<import("react-native").ViewStyle>, import("react-native").ViewStyle>;
|
|
30
31
|
//# sourceMappingURL=StateBlock.variants.d.ts.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { LayoutStyle } from "../../core/style";
|
|
3
|
+
import type { ElevationLevel } from "../../theme/tokens";
|
|
4
|
+
import type { BgRole, BorderRole, RadiusToken, SpaceToken } from "./Surface.variants";
|
|
5
|
+
export interface SurfaceProps {
|
|
6
|
+
background?: BgRole;
|
|
7
|
+
border?: BorderRole;
|
|
8
|
+
radius?: RadiusToken;
|
|
9
|
+
elevation?: ElevationLevel;
|
|
10
|
+
padding?: SpaceToken;
|
|
11
|
+
children?: ReactNode;
|
|
12
|
+
style?: LayoutStyle;
|
|
13
|
+
testID?: string;
|
|
14
|
+
}
|
|
15
|
+
declare function SurfaceImpl({ background, border, radius, elevation, padding, children, style, testID, }: SurfaceProps): import("react").JSX.Element;
|
|
16
|
+
export declare const Surface: import("react").MemoExoticComponent<typeof SurfaceImpl>;
|
|
17
|
+
export declare const Box: import("react").MemoExoticComponent<typeof SurfaceImpl>;
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=Surface.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ElevationLevel } from "../../theme/tokens";
|
|
2
|
+
import type { RoleColors, Theme } from "../../theme/hooks";
|
|
3
|
+
export type BgRole = keyof RoleColors["bg"];
|
|
4
|
+
export type BorderRole = keyof RoleColors["border"];
|
|
5
|
+
export type RadiusToken = keyof Theme["radii"];
|
|
6
|
+
export type SpaceToken = keyof Theme["space"];
|
|
7
|
+
export interface SurfaceColors {
|
|
8
|
+
readonly background?: string;
|
|
9
|
+
readonly border?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function resolveSurfaceColors(colors: RoleColors, background?: BgRole, border?: BorderRole): SurfaceColors;
|
|
12
|
+
export declare function resolveSurfacePadding(theme: Theme, padding?: SpaceToken): number | undefined;
|
|
13
|
+
export declare function resolveSurfaceElevation(theme: Theme, elevation?: ElevationLevel): Record<string, unknown> | undefined;
|
|
14
|
+
export declare const surfaceStructure: import("../../core/style").ThemedVariantResolver<Theme, import("../../core/style").VariantGroups<import("react-native").ViewStyle>, import("react-native").ViewStyle>;
|
|
15
|
+
//# sourceMappingURL=Surface.variants.d.ts.map
|
|
@@ -1,20 +1,24 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Text — typography primitive with a closed `variant` union. Replaces ad-hoc fontSize literals.
|
|
3
|
-
*/
|
|
4
1
|
import { type TextProps as RNTextProps } from 'react-native';
|
|
5
2
|
import type { LayoutStyle } from '../../core/style';
|
|
6
|
-
import type {
|
|
3
|
+
import type { FontWeightToken } from '../../theme/tokens';
|
|
4
|
+
import type { HeadingVariant, TextColorRole, TextVariant } from './Text.variants';
|
|
7
5
|
export interface TextProps {
|
|
8
6
|
variant?: TextVariant;
|
|
9
7
|
children: RNTextProps['children'];
|
|
8
|
+
color?: TextColorRole;
|
|
10
9
|
numberOfLines?: number;
|
|
10
|
+
align?: 'auto' | 'left' | 'right' | 'center' | 'justify';
|
|
11
|
+
weight?: FontWeightToken;
|
|
11
12
|
style?: LayoutStyle;
|
|
12
13
|
testID?: string;
|
|
13
14
|
}
|
|
14
15
|
export interface HeadingProps {
|
|
15
16
|
variant?: HeadingVariant;
|
|
16
17
|
children: RNTextProps['children'];
|
|
18
|
+
color?: TextColorRole;
|
|
17
19
|
numberOfLines?: number;
|
|
20
|
+
align?: 'auto' | 'left' | 'right' | 'center' | 'justify';
|
|
21
|
+
weight?: FontWeightToken;
|
|
18
22
|
style?: LayoutStyle;
|
|
19
23
|
testID?: string;
|
|
20
24
|
}
|
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
import type { TextStyle } from 'react-native';
|
|
2
|
+
import type { FontWeightToken } from '../../theme/tokens';
|
|
2
3
|
import type { HeadingLevel } from '../../core/heading';
|
|
3
|
-
import type { RoleColors, Theme } from '../../theme/hooks';
|
|
4
|
-
export type TextVariant = 'body' | 'body-sm' | 'caption' | 'label' | 'label-sm' | 'overline';
|
|
4
|
+
import type { RoleColors, StatusRole, Theme } from '../../theme/hooks';
|
|
5
|
+
export type TextVariant = 'display' | 'title' | 'heading' | 'subheading' | 'body' | 'body-sm' | 'caption' | 'label' | 'label-sm' | 'overline';
|
|
5
6
|
export type HeadingVariant = 'h1' | 'h2' | 'h3' | 'h4';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
* heading as `<h1>` (see `core/heading`).
|
|
9
|
-
*/
|
|
7
|
+
export type FgColorRole = 'default' | 'muted';
|
|
8
|
+
export type TextColorRole = FgColorRole | StatusRole;
|
|
10
9
|
export declare const HEADING_LEVELS: Record<HeadingVariant, HeadingLevel>;
|
|
11
|
-
|
|
12
|
-
export declare const TEXT_VARIANTS: readonly ["body", "body-sm", "caption", "label", "label-sm", "overline"];
|
|
10
|
+
export declare const TEXT_VARIANTS: readonly ["display", "title", "heading", "subheading", "body", "body-sm", "caption", "label", "label-sm", "overline"];
|
|
13
11
|
export declare const HEADING_VARIANTS: Record<HeadingVariant, TextVariant>;
|
|
14
|
-
|
|
12
|
+
export interface TextStyleOptions {
|
|
13
|
+
color?: TextColorRole;
|
|
14
|
+
weight?: FontWeightToken;
|
|
15
|
+
align?: TextStyle['textAlign'];
|
|
16
|
+
}
|
|
17
|
+
export declare function resolveTextColorFromRole(colors: RoleColors, role: TextColorRole): string;
|
|
15
18
|
export declare function resolveTextColor(colors: RoleColors, variant: TextVariant): string;
|
|
16
|
-
export declare function resolveTextStyle(theme: Theme, variant: TextVariant): TextStyle;
|
|
17
|
-
export declare function resolveHeadingStyle(theme: Theme, variant: HeadingVariant): TextStyle;
|
|
19
|
+
export declare function resolveTextStyle(theme: Theme, variant: TextVariant, options?: TextStyleOptions): TextStyle;
|
|
20
|
+
export declare function resolveHeadingStyle(theme: Theme, variant: HeadingVariant, options?: TextStyleOptions): TextStyle;
|
|
18
21
|
//# sourceMappingURL=Text.variants.d.ts.map
|
|
@@ -26,6 +26,8 @@ export declare const CLOSE_ICON_SIZE = 16;
|
|
|
26
26
|
export declare const CLOSE_HIT_SLOP: number;
|
|
27
27
|
/** `duration` on `ToastOptions` defaults to this when omitted — except for `danger` (see below). */
|
|
28
28
|
export declare const DEFAULT_TOAST_DURATION = 3000;
|
|
29
|
+
export declare const TOAST_IOS_HOME_INDICATOR_INSET = 20;
|
|
30
|
+
export declare function resolveToastBottomInset(basePadding: number, platformOS: string): number;
|
|
29
31
|
/**
|
|
30
32
|
* How long a toast stays up. `"persistent"` = until the user dismisses it (or a later `show()`
|
|
31
33
|
* replaces it) — spelled out rather than encoded as a number, because a bare `0` at a call site
|
|
@@ -21,6 +21,13 @@ export type TooltipPlacement = "top" | "bottom";
|
|
|
21
21
|
export declare const TOOLTIP_TIMING: {
|
|
22
22
|
/** Fallback auto-dismiss so a tip can't stay stuck open if `onPressOut` never fires. */
|
|
23
23
|
readonly autoHideMs: 2500;
|
|
24
|
+
/**
|
|
25
|
+
* Grace period before a hover-out actually hides the bubble, so a pointer crossing the
|
|
26
|
+
* `theme.space[1]` gap to the bubble itself doesn't lose the tip mid-transit (WCAG 1.4.13
|
|
27
|
+
* hoverable). The CSS/UI convention for this exact case; entering the bubble before it elapses
|
|
28
|
+
* cancels the hide.
|
|
29
|
+
*/
|
|
30
|
+
readonly hoverOutGraceMs: 200;
|
|
24
31
|
};
|
|
25
32
|
/**
|
|
26
33
|
* Appends `label` to any `accessibilityHint` the trigger already carries, so screen-reader users
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
export { PixelizeProvider, useTheme, useThemeColors, useThemeMode, createAsyncStorageAdapter, THEME_NAMES, DEFAULT_THEME, loadPalette, loadPaletteSync, } from './provider';
|
|
7
7
|
export type { PixelizeProviderProps, Theme, ThemeModeValue, ThemeMode, ColorModeStorageAdapter, AsyncStorageLike, } from './provider';
|
|
8
8
|
export type { RoleColors, StatusColors, StatusRole } from './tokens/roles';
|
|
9
|
-
export type { ThemeName, ColorScheme, PaletteProps } from './tokens/types';
|
|
9
|
+
export type { ThemeName, ColorScheme, PaletteProps, BrandPaletteSource, SemanticTone, SemanticTextTokens, } from './tokens/types';
|
|
10
10
|
/** @deprecated Use THEME_NAMES from this module instead. */
|
|
11
11
|
export { THEME_NAMES as themeNames } from './provider';
|
|
12
12
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,35 +1,5 @@
|
|
|
1
1
|
import type { ViewStyle } from 'react-native';
|
|
2
2
|
import type { ElevationToken } from '../tokens/primitives';
|
|
3
|
-
/**
|
|
4
|
-
* The style props an elevation resolves to. A `Pick` rather than `ViewStyle` so a future RN
|
|
5
|
-
* shadow prop cannot silently widen what this function is allowed to emit.
|
|
6
|
-
*/
|
|
7
3
|
export type ElevationStyle = Pick<ViewStyle, 'shadowColor' | 'shadowOffset' | 'shadowOpacity' | 'shadowRadius' | 'elevation'>;
|
|
8
|
-
/**
|
|
9
|
-
* Resolve an elevation token to RN style props.
|
|
10
|
-
*
|
|
11
|
-
* Uses the legacy shadow props over `boxShadow` because `boxShadow` is New-Architecture-only, and
|
|
12
|
-
* our peer range (RN >= 0.79) still lets a consumer ship `newArchEnabled=false` — on which
|
|
13
|
-
* `boxShadow` renders nothing at all. The legacy props map straight to the platform APIs and are
|
|
14
|
-
* not deprecated, so they are the only path that works on both architectures. react-native-web's
|
|
15
|
-
* style preprocessor converts these same legacy props into a real CSS `box-shadow`, so the `web`
|
|
16
|
-
* branch below rides that conversion rather than emitting `boxShadow` itself.
|
|
17
|
-
*
|
|
18
|
-
* An elevation token is a STACK of layers (web needs both an ambient and a contact shadow per
|
|
19
|
-
* step), but legacy RN shadow props can only express one. This renders `layers[0]` — the dominant
|
|
20
|
-
* layer — and drops the rest. That is an honest limit of the legacy path, not a token compromise:
|
|
21
|
-
* a future `boxShadow`-only resolver (new-arch-only consumers) can render every layer.
|
|
22
|
-
*
|
|
23
|
-
* `layer.spread` is dropped — neither legacy platform API exposes it (RN implements it by
|
|
24
|
-
* insetting a custom shadowPath). The ramp's `md`/`lg` carry a negative spread to tighten the
|
|
25
|
-
* shadow on web, so those two steps read marginally wider here. Accepted: honouring it would mean
|
|
26
|
-
* hand-drawing a shadow layer per view.
|
|
27
|
-
*
|
|
28
|
-
* Returns one of three shapes: `ios`, `android` (RN's `default` branch — Android reads the numeric
|
|
29
|
-
* `elevation` prop and ignores offset/opacity/radius), and `web`. `web` MUST stay its own explicit
|
|
30
|
-
* key: without it, react-native-web falls through to `default` (the Android shape), whose only
|
|
31
|
-
* meaningful field — `elevation` — react-native-web silently ignores (it is Android-only), so the
|
|
32
|
-
* shadow renders as nothing at all.
|
|
33
|
-
*/
|
|
34
4
|
export declare function elevation(token: ElevationToken): ElevationStyle;
|
|
35
5
|
//# sourceMappingURL=elevation.native.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ViewStyle } from 'react-native';
|
|
2
|
+
import type { ElevationLevel } from '../tokens';
|
|
3
|
+
import type { Theme } from '../provider/types';
|
|
4
|
+
import type { ElevationToken } from '../tokens/primitives';
|
|
5
|
+
import { type BoxShadowLayer } from './highlight.native';
|
|
6
|
+
export type FloatingLevel = Extract<ElevationLevel, 'sm' | 'md' | 'lg'>;
|
|
7
|
+
export declare function tokenBoxShadow(token: ElevationToken): ReadonlyArray<BoxShadowLayer>;
|
|
8
|
+
export declare function floatingBackground(theme: Theme, level: FloatingLevel): string;
|
|
9
|
+
export declare function floatingSurfaceStyle(theme: Theme, level: FloatingLevel): ViewStyle;
|
|
10
|
+
//# sourceMappingURL=floatingSurface.native.d.ts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ViewStyle } from 'react-native';
|
|
2
|
+
import type { ColorScheme } from '../tokens/types';
|
|
3
|
+
export type HighlightLevel = 'none' | 'subtle' | 'raised';
|
|
4
|
+
export type BoxShadowLayer = {
|
|
5
|
+
offsetX: number | string;
|
|
6
|
+
offsetY: number | string;
|
|
7
|
+
blurRadius?: number | string;
|
|
8
|
+
spreadDistance?: number | string;
|
|
9
|
+
inset?: boolean;
|
|
10
|
+
color?: string;
|
|
11
|
+
};
|
|
12
|
+
export type BoxShadowArray = ReadonlyArray<BoxShadowLayer>;
|
|
13
|
+
export declare function highlightLevels(level: HighlightLevel, mode: ColorScheme): BoxShadowArray;
|
|
14
|
+
export declare function highlight(level: HighlightLevel, mode: ColorScheme): BoxShadowArray;
|
|
15
|
+
export declare function composeBoxShadow(outset: ReadonlyArray<BoxShadowLayer>, inset: BoxShadowArray): BoxShadowArray;
|
|
16
|
+
export declare function asBoxShadowArray(value: ViewStyle['boxShadow']): ReadonlyArray<BoxShadowLayer>;
|
|
17
|
+
//# sourceMappingURL=highlight.native.d.ts.map
|
|
@@ -8,6 +8,15 @@
|
|
|
8
8
|
export { rem, hairline } from './units.native';
|
|
9
9
|
export { elevation } from './elevation.native';
|
|
10
10
|
export type { ElevationStyle } from './elevation.native';
|
|
11
|
+
export { highlight, highlightLevels, composeBoxShadow } from './highlight.native';
|
|
12
|
+
export type { HighlightLevel } from './highlight.native';
|
|
13
|
+
export { elevatedSurfaces } from './surfaces.native';
|
|
14
|
+
export type { ElevatedSurfaceRoles } from './surfaces.native';
|
|
15
|
+
export { STATE_LAYER_OPACITY, rippleColor, stateLayerScrim } from './stateLayer.native';
|
|
16
|
+
export { floatingBackground, floatingSurfaceStyle } from './floatingSurface.native';
|
|
17
|
+
export type { FloatingLevel } from './floatingSurface.native';
|
|
18
|
+
export { springs } from './motion.native';
|
|
19
|
+
export type { SpringConfig, SpringKey } from './motion.native';
|
|
11
20
|
export { interFontFamilies, systemFontFamily, fontStyleForWeight } from './fonts.native';
|
|
12
21
|
export type { FontWeightValue, FontStyleForWeight } from './fonts.native';
|
|
13
22
|
export { getSystemColorMode, subscribeToSystemColorMode } from './colorScheme.native';
|
|
@@ -1,15 +1,35 @@
|
|
|
1
|
-
export declare const
|
|
2
|
-
readonly
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
export declare const springs: {
|
|
2
|
+
readonly spatialFast: {
|
|
3
|
+
readonly stiffness: 800;
|
|
4
|
+
readonly damping: 33.94;
|
|
5
|
+
readonly mass: 1;
|
|
6
|
+
};
|
|
7
|
+
readonly spatialDefault: {
|
|
8
|
+
readonly stiffness: 380;
|
|
9
|
+
readonly damping: 31.19;
|
|
10
|
+
readonly mass: 1;
|
|
11
|
+
};
|
|
12
|
+
readonly spatialSlow: {
|
|
13
|
+
readonly stiffness: 200;
|
|
14
|
+
readonly damping: 22.63;
|
|
15
|
+
readonly mass: 1;
|
|
16
|
+
};
|
|
17
|
+
readonly effectsFast: {
|
|
18
|
+
readonly stiffness: 3800;
|
|
19
|
+
readonly damping: 123.29;
|
|
20
|
+
readonly mass: 1;
|
|
21
|
+
};
|
|
22
|
+
readonly effectsDefault: {
|
|
23
|
+
readonly stiffness: 1600;
|
|
24
|
+
readonly damping: 80;
|
|
25
|
+
readonly mass: 1;
|
|
26
|
+
};
|
|
27
|
+
readonly effectsSlow: {
|
|
28
|
+
readonly stiffness: 800;
|
|
29
|
+
readonly damping: 56.57;
|
|
30
|
+
readonly mass: 1;
|
|
31
|
+
};
|
|
6
32
|
};
|
|
7
|
-
export
|
|
8
|
-
|
|
9
|
-
enter: "ease-out";
|
|
10
|
-
exit: "ease-in";
|
|
11
|
-
snap: "linear";
|
|
12
|
-
};
|
|
13
|
-
export type MotionDuration = keyof typeof motionDurations;
|
|
14
|
-
export type MotionEasing = keyof typeof motionEasings;
|
|
33
|
+
export type SpringKey = keyof typeof springs;
|
|
34
|
+
export type SpringConfig = typeof springs[SpringKey];
|
|
15
35
|
//# sourceMappingURL=motion.native.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ColorScheme } from '../tokens/types';
|
|
2
|
+
export declare const STATE_LAYER_OPACITY: {
|
|
3
|
+
readonly pressed: 0.1;
|
|
4
|
+
readonly focus: 0.1;
|
|
5
|
+
readonly hover: 0.08;
|
|
6
|
+
readonly dragged: 0.16;
|
|
7
|
+
readonly disabled: 0.38;
|
|
8
|
+
};
|
|
9
|
+
export declare function stateLayerScrim(mode: ColorScheme): '#000000' | '#ffffff';
|
|
10
|
+
export declare const rippleColor: (mode: ColorScheme) => string;
|
|
11
|
+
//# sourceMappingURL=stateLayer.native.d.ts.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ColorScheme, PaletteProps } from '../tokens/types';
|
|
2
|
+
export type ElevatedSurfaceRoles = {
|
|
3
|
+
elevated1: string;
|
|
4
|
+
elevated2: string;
|
|
5
|
+
elevated3: string;
|
|
6
|
+
};
|
|
7
|
+
export declare function elevatedSurfaces(palette: PaletteProps, mode: ColorScheme): ElevatedSurfaceRoles | null;
|
|
8
|
+
//# sourceMappingURL=surfaces.native.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { PixelizeProviderProps } from './types';
|
|
2
2
|
export type { Theme, ThemeModeValue, PixelizeProviderProps } from './types';
|
|
3
|
-
export declare function PixelizeProvider({ children, brand: brandProp, mode, storage: storageProp, storageKey, brandStorageKey, interLoaded, palette: paletteProp, }: PixelizeProviderProps): import("react").JSX.Element;
|
|
3
|
+
export declare function PixelizeProvider({ children, brand: brandProp, mode, storage: storageProp, storageKey, brandStorageKey, interLoaded, palette: paletteProp, haptics: hapticsProp, }: PixelizeProviderProps): import("react").JSX.Element;
|
|
4
4
|
//# sourceMappingURL=PixelizeProvider.d.ts.map
|
|
@@ -2,11 +2,14 @@ import type { ReactNode } from 'react';
|
|
|
2
2
|
import type { ColorScheme, ElevationLevel, PaletteProps, RoleColors, ThemeName } from '../tokens';
|
|
3
3
|
import { space, radii, fontSizes, fontWeights, lineHeights, letterSpacings, borderWidths, breakpoints, zIndices } from '../tokens';
|
|
4
4
|
import type { ElevationStyle, FontStyleForWeight, FontWeightValue } from '../platform';
|
|
5
|
+
import type { ElevatedSurfaceRoles } from '../platform/surfaces.native';
|
|
5
6
|
import type { ColorModeStorageAdapter, ThemeMode } from './colorModeStorage';
|
|
6
7
|
export type Theme = {
|
|
7
8
|
brand: ThemeName;
|
|
8
9
|
mode: ColorScheme;
|
|
9
10
|
colors: RoleColors;
|
|
11
|
+
/** Dark-mode elevated surfaces — null in light mode. */
|
|
12
|
+
elevatedSurfaces: ElevatedSurfaceRoles | null;
|
|
10
13
|
palette: PaletteProps;
|
|
11
14
|
space: typeof space;
|
|
12
15
|
radii: typeof radii;
|
|
@@ -37,5 +40,10 @@ export type PixelizeProviderProps = {
|
|
|
37
40
|
interLoaded?: boolean;
|
|
38
41
|
/** Runtime-selected palette — wins over `brand` when provided. */
|
|
39
42
|
palette?: PaletteProps;
|
|
43
|
+
/**
|
|
44
|
+
* Haptic feedback for interactive components. Defaults to enabled when `setHapticsModule` has been
|
|
45
|
+
* called at app startup, disabled otherwise. No-ops on web.
|
|
46
|
+
*/
|
|
47
|
+
haptics?: boolean;
|
|
40
48
|
};
|
|
41
49
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { PaletteProps } from "./types";
|
|
2
|
+
declare const REQUIRED_TOKENS: readonly ["gradient", "primary", "secondary", "tertiary", "transparent", "black", "white", "semantic", "gray", "red", "orange", "yellow", "green", "teal", "blue", "cyan", "purple", "pink", "backgroundColor", "background", "text", "header", "placeholder", "boxShadow", "sidebar", "boxborder", "border", "table", "disabled", "semanticText"];
|
|
3
|
+
type Unlisted = Exclude<keyof PaletteProps, (typeof REQUIRED_TOKENS)[number]>;
|
|
4
|
+
export type AllPaletteTokensListed = Unlisted extends never ? true : ["unlisted token", Unlisted];
|
|
5
|
+
export declare const allPaletteTokensListed: AllPaletteTokensListed;
|
|
6
|
+
export declare const missingPaletteTokens: (palette: unknown) => string[];
|
|
7
|
+
/** Fails once, loudly, where a palette enters — never as a wrong colour deep in a screen. */
|
|
8
|
+
export declare const assertPalette: (palette: unknown, source: string) => PaletteProps;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=assertPalette.d.ts.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
declare const
|
|
3
|
-
|
|
1
|
+
import type { BrandPaletteSource } from "../../types";
|
|
2
|
+
export declare const source: BrandPaletteSource;
|
|
3
|
+
declare const _default: import("../..").PaletteProps;
|
|
4
|
+
export default _default;
|
|
4
5
|
//# sourceMappingURL=palette.light.d.ts.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
declare const
|
|
3
|
-
|
|
1
|
+
import type { BrandPaletteSource } from "../../types";
|
|
2
|
+
export declare const source: BrandPaletteSource;
|
|
3
|
+
declare const _default: import("../..").PaletteProps;
|
|
4
|
+
export default _default;
|
|
4
5
|
//# sourceMappingURL=palette.light.d.ts.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
declare const
|
|
3
|
-
|
|
1
|
+
import type { BrandPaletteSource } from "../../types";
|
|
2
|
+
export declare const source: BrandPaletteSource;
|
|
3
|
+
declare const _default: import("../..").PaletteProps;
|
|
4
|
+
export default _default;
|
|
4
5
|
//# sourceMappingURL=palette.light.d.ts.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
declare const
|
|
3
|
-
|
|
1
|
+
import type { BrandPaletteSource } from "../../types";
|
|
2
|
+
export declare const source: BrandPaletteSource;
|
|
3
|
+
declare const _default: import("../..").PaletteProps;
|
|
4
|
+
export default _default;
|
|
4
5
|
//# sourceMappingURL=palette.light.d.ts.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
declare const
|
|
3
|
-
|
|
1
|
+
import type { BrandPaletteSource } from "../../types";
|
|
2
|
+
export declare const source: BrandPaletteSource;
|
|
3
|
+
declare const _default: import("../..").PaletteProps;
|
|
4
|
+
export default _default;
|
|
4
5
|
//# sourceMappingURL=palette.light.d.ts.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
declare const
|
|
3
|
-
|
|
1
|
+
import type { BrandPaletteSource } from "../../types";
|
|
2
|
+
export declare const source: BrandPaletteSource;
|
|
3
|
+
declare const _default: import("../..").PaletteProps;
|
|
4
|
+
export default _default;
|
|
4
5
|
//# sourceMappingURL=palette.light.d.ts.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
declare const
|
|
3
|
-
|
|
1
|
+
import type { BrandPaletteSource } from "../../types";
|
|
2
|
+
export declare const source: BrandPaletteSource;
|
|
3
|
+
declare const _default: import("../..").PaletteProps;
|
|
4
|
+
export default _default;
|
|
4
5
|
//# sourceMappingURL=palette.light.d.ts.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
declare const
|
|
3
|
-
|
|
1
|
+
import type { BrandPaletteSource } from "../../types";
|
|
2
|
+
export declare const source: BrandPaletteSource;
|
|
3
|
+
declare const _default: import("../..").PaletteProps;
|
|
4
|
+
export default _default;
|
|
4
5
|
//# sourceMappingURL=palette.light.d.ts.map
|