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
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { buildPrimaryOpacity, buildPrimaryShadowTint } from "./buildBrandTokens.js";
|
|
4
4
|
import { contrastRatio, hexToHsl, hslToHex, withLightness } from "./color.js";
|
|
5
|
+
import finalizePalette from "./finalizePalette.js";
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* Derives a brand's dark palette from its light palette. Every value is computed from the brand's
|
|
@@ -249,7 +250,7 @@ export function buildDarkPalette(light) {
|
|
|
249
250
|
s: SURFACE_SAT,
|
|
250
251
|
l
|
|
251
252
|
})]));
|
|
252
|
-
return {
|
|
253
|
+
return finalizePalette({
|
|
253
254
|
...light,
|
|
254
255
|
// Brand identity: hue preserved, accent lifted as far as a light label allows.
|
|
255
256
|
primary: liftBrand(light.primary, label),
|
|
@@ -294,7 +295,7 @@ export function buildDarkPalette(light) {
|
|
|
294
295
|
error: light.boxShadow.error,
|
|
295
296
|
default: "#00000080"
|
|
296
297
|
}
|
|
297
|
-
};
|
|
298
|
+
});
|
|
298
299
|
}
|
|
299
300
|
export default buildDarkPalette;
|
|
300
301
|
//# sourceMappingURL=buildDarkPalette.js.map
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { AA_TEXT } from "./color.js";
|
|
4
|
+
import { liftToContrast } from "./liftToContrast.js";
|
|
5
|
+
import { buildSemanticText } from "./semanticText.js";
|
|
6
|
+
import { liftSemanticText, namedSurfaces, withSurfaceRungs } from "./surfaceRungs.js";
|
|
7
|
+
const withPlaceholderRung = source => ({
|
|
8
|
+
...source,
|
|
9
|
+
placeholder: {
|
|
10
|
+
...source.placeholder,
|
|
11
|
+
500: liftToContrast(source.placeholder[500], source.background[50], AA_TEXT)
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
// The hover row is a SURFACE, so it steps away from the ink rather than the ink moving.
|
|
16
|
+
const withTableHoverRung = source => ({
|
|
17
|
+
...source,
|
|
18
|
+
table: {
|
|
19
|
+
hover: {
|
|
20
|
+
...source.table.hover,
|
|
21
|
+
500: liftToContrast(source.table.hover[500], source.text[500], AA_TEXT)
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
export function finalizePalette(source) {
|
|
26
|
+
const resolved = withSurfaceRungs(withTableHoverRung(withPlaceholderRung(source)));
|
|
27
|
+
const surfaces = namedSurfaces(resolved);
|
|
28
|
+
return {
|
|
29
|
+
...resolved,
|
|
30
|
+
semanticText: liftSemanticText(buildSemanticText(resolved.semantic, resolved.backgroundColor.main), surfaces)
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
export default finalizePalette;
|
|
34
|
+
//# sourceMappingURL=finalizePalette.js.map
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { contrastRatio, hexToHsl, relativeLuminance, withLightness } from "./color.js";
|
|
4
|
+
export const DARK_CANVAS_LUMINANCE = 0.2;
|
|
5
|
+
export const isDarkCanvas = canvas => relativeLuminance(canvas) < DARK_CANVAS_LUMINANCE;
|
|
6
|
+
|
|
7
|
+
// Direction comes from the backdrop, so "away from what it sits on" needs no mode argument.
|
|
8
|
+
export function liftToContrast(hex, backdrop, target) {
|
|
9
|
+
if (contrastRatio(hex, backdrop) >= target) return hex;
|
|
10
|
+
const {
|
|
11
|
+
s
|
|
12
|
+
} = hexToHsl(hex);
|
|
13
|
+
const step = isDarkCanvas(backdrop) ? 1 : -1;
|
|
14
|
+
let {
|
|
15
|
+
l
|
|
16
|
+
} = hexToHsl(hex);
|
|
17
|
+
while (l > 0 && l < 100) {
|
|
18
|
+
l += step;
|
|
19
|
+
const next = withLightness(hex, l, s);
|
|
20
|
+
if (contrastRatio(next, backdrop) >= target) return next;
|
|
21
|
+
}
|
|
22
|
+
return withLightness(hex, step === 1 ? 100 : 0, s);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Mirror of `liftToContrast`: walks ink TOWARD the backdrop, stopping at the last step that
|
|
27
|
+
* still clears `target`. For ink that must stay legible without reading as body copy.
|
|
28
|
+
*/
|
|
29
|
+
export function softenToContrast(hex, backdrop, target) {
|
|
30
|
+
if (contrastRatio(hex, backdrop) <= target) return hex;
|
|
31
|
+
const {
|
|
32
|
+
s,
|
|
33
|
+
l: start
|
|
34
|
+
} = hexToHsl(hex);
|
|
35
|
+
const toward = isDarkCanvas(backdrop) ? -1 : 1;
|
|
36
|
+
let softest = hex;
|
|
37
|
+
for (let l = start; l > 0 && l < 100; l += toward) {
|
|
38
|
+
const next = withLightness(hex, l, s);
|
|
39
|
+
if (contrastRatio(next, backdrop) < target) break;
|
|
40
|
+
softest = next;
|
|
41
|
+
}
|
|
42
|
+
return softest;
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=liftToContrast.js.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { contrastRatio } from "./color.js";
|
|
4
|
+
import { liftToContrast } from "./liftToContrast.js";
|
|
5
|
+
import { PLACEHOLDER_TEXT } from "./surfaceRungs.js";
|
|
6
|
+
|
|
7
|
+
/** A field always renders on at least one surface — the first is the reference backdrop. */
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* The hint ink for a field: the rung the brand authored, guaranteed to clear `PLACEHOLDER_TEXT`
|
|
11
|
+
* on every surface a field can land on. The surface list is the caller's — a field's fill differs
|
|
12
|
+
* by platform, the resolution does not.
|
|
13
|
+
*
|
|
14
|
+
* It does not walk the rung toward AA in either direction. Held to 4.5 the hint stopped reading
|
|
15
|
+
* as a hint; softening back down again undershot on the next surface.
|
|
16
|
+
*/
|
|
17
|
+
export const placeholderInkOn = (palette, surfaces) => {
|
|
18
|
+
const rung = palette.placeholder[500];
|
|
19
|
+
const hardest = surfaces.reduce((worst, s) => contrastRatio(rung, s) < contrastRatio(rung, worst) ? s : worst);
|
|
20
|
+
return liftToContrast(rung, hardest, PLACEHOLDER_TEXT);
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=placeholderInk.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { AA_TEXT } from "./color.js";
|
|
4
|
+
import { liftToContrast } from "./liftToContrast.js";
|
|
5
|
+
export const SEMANTIC_TONES = ["success", "error", "warning", "info"];
|
|
6
|
+
|
|
7
|
+
// `semantic[tone][500]` is a FILL rung; as ink it measures 1.84-3.68:1 on every light canvas.
|
|
8
|
+
export const buildSemanticText = (semantic, canvas) => ({
|
|
9
|
+
success: liftToContrast(semantic.success[500], canvas, AA_TEXT),
|
|
10
|
+
error: liftToContrast(semantic.error[500], canvas, AA_TEXT),
|
|
11
|
+
warning: liftToContrast(semantic.warning[500], canvas, AA_TEXT),
|
|
12
|
+
info: liftToContrast(semantic.info[500], canvas, AA_TEXT)
|
|
13
|
+
});
|
|
14
|
+
//# sourceMappingURL=semanticText.js.map
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { AA_NON_TEXT, AA_TEXT, contrastRatio } from "./color.js";
|
|
4
|
+
import { liftToContrast } from "./liftToContrast.js";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* A hint is held to the non-text floor, not the body-text one. Deliberate: at 4.5 an empty field
|
|
8
|
+
* reads as one already typed into. See THEME-CONTRACT.md.
|
|
9
|
+
*/
|
|
10
|
+
export const PLACEHOLDER_TEXT = AA_NON_TEXT;
|
|
11
|
+
export const namedSurfaces = p => [...Object.values(p.backgroundColor), p.background[50], p.table.hover[500]];
|
|
12
|
+
|
|
13
|
+
/** The surface an ink is closest to — clearing it clears every other one. */
|
|
14
|
+
export const hardestSurface = (ink, surfaces) => surfaces.reduce((worst, s) => contrastRatio(ink, s) < contrastRatio(ink, worst) ? s : worst);
|
|
15
|
+
|
|
16
|
+
// Runs after the hover rung: `table.hover` is one of the surfaces being cleared.
|
|
17
|
+
export function withSurfaceRungs(source) {
|
|
18
|
+
const surfaces = namedSurfaces(source);
|
|
19
|
+
const lift = (ink, target) => liftToContrast(ink, hardestSurface(ink, surfaces), target);
|
|
20
|
+
return {
|
|
21
|
+
...source,
|
|
22
|
+
text: {
|
|
23
|
+
...source.text,
|
|
24
|
+
500: lift(source.text[500], AA_TEXT)
|
|
25
|
+
},
|
|
26
|
+
header: {
|
|
27
|
+
...source.header,
|
|
28
|
+
500: lift(source.header[500], AA_TEXT)
|
|
29
|
+
},
|
|
30
|
+
// `placeholder` is deliberately absent: the brand authors that rung and it ships untouched.
|
|
31
|
+
// Its floor is enforced in `placeholderInkOn`, against the surfaces a FIELD renders on.
|
|
32
|
+
boxborder: {
|
|
33
|
+
...source.boxborder,
|
|
34
|
+
500: lift(source.boxborder[500], AA_NON_TEXT)
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
export const liftSemanticText = (semanticText, surfaces) => ({
|
|
39
|
+
success: liftToContrast(semanticText.success, hardestSurface(semanticText.success, surfaces), AA_TEXT),
|
|
40
|
+
error: liftToContrast(semanticText.error, hardestSurface(semanticText.error, surfaces), AA_TEXT),
|
|
41
|
+
warning: liftToContrast(semanticText.warning, hardestSurface(semanticText.warning, surfaces), AA_TEXT),
|
|
42
|
+
info: liftToContrast(semanticText.info, hardestSurface(semanticText.info, surfaces), AA_TEXT)
|
|
43
|
+
});
|
|
44
|
+
//# sourceMappingURL=surfaceRungs.js.map
|
|
@@ -23,5 +23,10 @@ export * from "./builders/accentText.js";
|
|
|
23
23
|
export * from "./builders/buildBrandTokens.js";
|
|
24
24
|
export * from "./builders/buildDarkPalette.js";
|
|
25
25
|
export * from "./builders/color.js";
|
|
26
|
+
export * from "./builders/liftToContrast.js";
|
|
27
|
+
export * from "./builders/placeholderInk.js";
|
|
28
|
+
export * from "./builders/semanticText.js";
|
|
29
|
+
export * from "./builders/finalizePalette.js";
|
|
26
30
|
export * from "./roles/index.js";
|
|
31
|
+
export * from "./assertPalette.js";
|
|
27
32
|
//# sourceMappingURL=index.js.map
|
|
@@ -19,6 +19,9 @@
|
|
|
19
19
|
|
|
20
20
|
import { pickOnAccent, resolveFilledAccent } from "../builders/accentText.js";
|
|
21
21
|
import { AA_TEXT, contrastRatio, relativeLuminance } from "../builders/color.js";
|
|
22
|
+
import { placeholderInkOn } from "../builders/placeholderInk.js";
|
|
23
|
+
/** Every surface an enabled field renders on. Disabled fills are exempt from 1.4.3 and excluded. */
|
|
24
|
+
const FIELD_SURFACES = p => [p.backgroundColor.main, p.background[50], p.backgroundColor.muted];
|
|
22
25
|
const RAMP_KEYS = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900];
|
|
23
26
|
|
|
24
27
|
/**
|
|
@@ -92,6 +95,8 @@ export function roleColors(p) {
|
|
|
92
95
|
// canvas — a flat `gray[600]` cleared the canvas on every brand but fell to ~3.5:1 against
|
|
93
96
|
// `bg.hover` on radiant/emerald/rosewood, the same class of mistake web shipped twice.
|
|
94
97
|
muted: readableOn(p.gray, [p.background[50], p.backgroundColor.muted]),
|
|
98
|
+
// A hint is not body copy: `fg.muted` made every empty field read as already filled in.
|
|
99
|
+
placeholder: placeholderInkOn(p, FIELD_SURFACES(p)),
|
|
95
100
|
subtle: p.gray[500],
|
|
96
101
|
disabled: p.disabled[500]
|
|
97
102
|
},
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type ViewStyle } from 'react-native';
|
|
2
|
+
export interface AccentGradientFillProps {
|
|
3
|
+
color: string;
|
|
4
|
+
style?: ViewStyle;
|
|
5
|
+
}
|
|
6
|
+
export declare const AccentGradientFill: import("react").NamedExoticComponent<AccentGradientFillProps>;
|
|
7
|
+
//# sourceMappingURL=AccentGradientFill.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { darkenHex } from './darkenHex';
|
|
2
|
+
export interface GradientStops {
|
|
3
|
+
top: string;
|
|
4
|
+
bottom: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function accentGradientStops(color: string): GradientStops;
|
|
7
|
+
export declare function gradientStopDelta(stops: GradientStops): number;
|
|
8
|
+
export declare function shouldRenderGradient(stops: GradientStops): boolean;
|
|
9
|
+
export { darkenHex };
|
|
10
|
+
//# sourceMappingURL=gradientStops.d.ts.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { AccentGradientFill } from './AccentGradientFill';
|
|
2
|
+
export { accentGradientStops, gradientStopDelta, shouldRenderGradient } from './gradientStops';
|
|
3
|
+
export { darkenHex } from './darkenHex';
|
|
4
|
+
export { withAlpha } from './withAlpha';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/** Optional peer — injected at app startup, never imported at module scope. */
|
|
2
|
+
export type HapticImpactStyle = 'light' | 'medium' | 'heavy' | 'soft' | 'rigid';
|
|
3
|
+
export type HapticNotificationType = 'success' | 'warning' | 'error';
|
|
4
|
+
export type HapticsModule = {
|
|
5
|
+
selectionAsync: () => Promise<void>;
|
|
6
|
+
impactAsync: (style: string) => Promise<void>;
|
|
7
|
+
notificationAsync: (type: string) => Promise<void>;
|
|
8
|
+
performAndroidHapticsAsync: (type: string) => Promise<void>;
|
|
9
|
+
ImpactFeedbackStyle: {
|
|
10
|
+
readonly Light: string;
|
|
11
|
+
readonly Medium: string;
|
|
12
|
+
readonly Heavy: string;
|
|
13
|
+
readonly Soft: string;
|
|
14
|
+
readonly Rigid: string;
|
|
15
|
+
};
|
|
16
|
+
NotificationFeedbackType: {
|
|
17
|
+
readonly Success: string;
|
|
18
|
+
readonly Warning: string;
|
|
19
|
+
readonly Error: string;
|
|
20
|
+
};
|
|
21
|
+
AndroidHaptics: {
|
|
22
|
+
readonly Context_Click: string;
|
|
23
|
+
readonly Virtual_Key: string;
|
|
24
|
+
readonly Long_Press: string;
|
|
25
|
+
readonly Confirm: string;
|
|
26
|
+
readonly Reject: string;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
/** Injects expo-haptics at runtime — never imports the package at module scope. */
|
|
30
|
+
export declare function setHapticsModule(module: HapticsModule): void;
|
|
31
|
+
export declare function hasHapticsModule(): boolean;
|
|
32
|
+
export declare function getHapticsModule(): HapticsModule | null;
|
|
33
|
+
//# sourceMappingURL=haptics.d.ts.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { setHapticsModule, hasHapticsModule, getHapticsModule } from './haptics';
|
|
2
|
+
export type { HapticsModule, HapticImpactStyle, HapticNotificationType, } from './haptics';
|
|
3
|
+
export { HapticsContext } from './context';
|
|
4
|
+
export { useHaptics } from './useHaptics';
|
|
5
|
+
export type { HapticsControls } from './useHaptics';
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { HapticImpactStyle, HapticNotificationType } from './haptics';
|
|
2
|
+
export type HapticsControls = {
|
|
3
|
+
selection: () => void;
|
|
4
|
+
impact: (style?: HapticImpactStyle) => void;
|
|
5
|
+
notification: (type: HapticNotificationType) => void;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Fires haptic feedback when a module is registered and the provider has not disabled it.
|
|
9
|
+
* No-ops on web, when unset, or when `haptics={false}`.
|
|
10
|
+
*/
|
|
11
|
+
export declare function useHaptics(): HapticsControls;
|
|
12
|
+
//# sourceMappingURL=useHaptics.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type IconName = "arrow-down" | "arrow-left" | "arrow-right" | "arrow-up" | "at-sign" | "bell" | "bold" | "building-2" | "calendar" | "chart-column" | "check" | "chevron-down" | "chevron-left" | "chevron-right" | "chevron-up" | "chevrons-left" | "chevrons-right" | "chevrons-up-down" | "circle-alert" | "circle-check" | "clock" | "code" | "download" | "external-link" | "eye" | "file-text" | "filter" | "flag" | "folder" | "heading-1" | "heading-2" | "heading-3" | "image" | "inbox" | "info" | "italic" | "kanban" | "layers" | "layout-dashboard" | "layout-template" | "life-buoy" | "link" | "list" | "list-checks" | "list-ordered" | "list-todo" | "log-out" | "map" | "message-square" | "milestone" | "minus" | "more-horizontal" | "paperclip" | "pencil" | "plus" | "quote" | "refresh-cw" | "save" | "search" | "send" | "settings" | "share" | "square-code" | "star" | "strikethrough" | "tag" | "trash" | "triangle-alert" | "underline" | "upload" | "user" | "users" | "x";
|
|
1
|
+
export type IconName = "arrow-down" | "arrow-left" | "arrow-right" | "arrow-up" | "at-sign" | "bell" | "bold" | "building-2" | "calendar" | "chart-column" | "check" | "chevron-down" | "chevron-left" | "chevron-right" | "chevron-up" | "chevrons-left" | "chevrons-right" | "chevrons-up-down" | "circle-alert" | "circle-check" | "clock" | "code" | "download" | "external-link" | "eye" | "file-text" | "filter" | "flag" | "folder" | "heading-1" | "heading-2" | "heading-3" | "image" | "inbox" | "info" | "italic" | "kanban" | "layers" | "layout-dashboard" | "layout-template" | "life-buoy" | "link" | "list" | "list-checks" | "list-ordered" | "list-todo" | "log-out" | "map" | "message-square" | "milestone" | "minus" | "more-horizontal" | "paperclip" | "pencil" | "plus" | "quote" | "refresh-cw" | "save" | "search" | "send" | "settings" | "share" | "square-code" | "star" | "strikethrough" | "tag" | "trash" | "trending-up" | "triangle-alert" | "underline" | "upload" | "user" | "users" | "x";
|
|
2
2
|
//# sourceMappingURL=names.d.ts.map
|
|
@@ -1,10 +1,19 @@
|
|
|
1
1
|
import type { ComponentType } from 'react';
|
|
2
|
-
import type {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
import type { ImageStyle, StyleProp } from 'react-native';
|
|
3
|
+
/**
|
|
4
|
+
* expo-image's real `Image` component does NOT extend RN's `ImageProps` (its `source`, `style` and
|
|
5
|
+
* `tintColor` shapes all diverge) — this is a minimal structural subset covering only what
|
|
6
|
+
* `MediaImage.tsx` actually passes, not a copy of RN's own image props.
|
|
7
|
+
*/
|
|
8
|
+
export type ExpoImageComponent = ComponentType<{
|
|
9
|
+
source?: any;
|
|
10
|
+
contentFit?: 'cover' | 'contain' | 'fill' | 'none' | 'scale-down';
|
|
11
|
+
cachePolicy?: 'none' | 'disk' | 'memory' | 'memory-disk' | null;
|
|
12
|
+
transition?: any;
|
|
13
|
+
recyclingKey?: string | null;
|
|
14
|
+
accessibilityLabel?: string;
|
|
15
|
+
style?: StyleProp<ImageStyle>;
|
|
16
|
+
testID?: string;
|
|
8
17
|
}>;
|
|
9
18
|
/** Injects expo-image at runtime — never imports the package at module scope. */
|
|
10
19
|
export declare function setExpoImage(Image: ExpoImageComponent): void;
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
export type DocumentPickerModule = {
|
|
2
2
|
getDocumentAsync: (options?: object) => Promise<{
|
|
3
3
|
canceled: boolean;
|
|
4
|
-
assets
|
|
4
|
+
assets: ReadonlyArray<{
|
|
5
5
|
uri: string;
|
|
6
6
|
name: string;
|
|
7
7
|
size?: number;
|
|
8
8
|
mimeType?: string;
|
|
9
|
-
}
|
|
9
|
+
}> | null;
|
|
10
10
|
}>;
|
|
11
11
|
};
|
|
12
12
|
export type ImagePickerModule = {
|
|
13
13
|
launchImageLibraryAsync: (options?: object) => Promise<{
|
|
14
14
|
canceled: boolean;
|
|
15
|
-
assets
|
|
15
|
+
assets: ReadonlyArray<{
|
|
16
16
|
uri: string;
|
|
17
|
-
fileName?: string;
|
|
17
|
+
fileName?: string | null;
|
|
18
18
|
fileSize?: number;
|
|
19
19
|
mimeType?: string;
|
|
20
|
-
}
|
|
20
|
+
}> | null;
|
|
21
21
|
}>;
|
|
22
22
|
};
|
|
23
23
|
export declare function setDocumentPicker(module: DocumentPickerModule): void;
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
import type { EasingFunction } from "react-native";
|
|
11
11
|
import type { DeviceTier } from "../device";
|
|
12
12
|
export type MotionDurationKey = "instant" | "fast" | "normal" | "slow" | "deliberate";
|
|
13
|
-
export type MotionEasingKey = "standard" | "decelerate" | "accelerate" | "emphasized";
|
|
13
|
+
export type MotionEasingKey = "standard" | "decelerate" | "accelerate" | "emphasized" | "emphasizedDecelerate" | "emphasizedAccelerate";
|
|
14
14
|
export type MotionSpringKey = "gentle" | "snappy" | "bouncy";
|
|
15
15
|
export interface MotionSpringConfig {
|
|
16
16
|
readonly damping: number;
|
|
@@ -39,6 +39,7 @@ export declare function motionEasing(key: MotionEasingKey): EasingFunction;
|
|
|
39
39
|
export declare function resetMotionEasingCache(): void;
|
|
40
40
|
export declare const MOTION_SPRING: Readonly<Record<MotionSpringKey, MotionSpringConfig>>;
|
|
41
41
|
/** Shared magnitudes so every component's motion reads as one system. */
|
|
42
|
+
export declare const pressScaleFor: (width: number) => number;
|
|
42
43
|
export declare const MOTION_TRANSFORM: {
|
|
43
44
|
/** Press scale for buttons, cards, list rows. */
|
|
44
45
|
readonly pressScale: 0.97;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
export { MOTION_DURATION, MOTION_EASING_CURVE, MOTION_ENABLED, MOTION_SCALE, MOTION_SPRING, MOTION_TIER, MOTION_TRANSFORM, motionEasing, resetMotionEasingCache, resolveDuration, } from "./config";
|
|
1
|
+
export { MOTION_DURATION, MOTION_EASING_CURVE, MOTION_ENABLED, MOTION_SCALE, MOTION_SPRING, MOTION_TIER, MOTION_TRANSFORM, motionEasing, pressScaleFor, resetMotionEasingCache, resolveDuration, } from "./config";
|
|
2
2
|
export type { MotionDurationKey, MotionEasingKey, MotionSpringConfig, MotionSpringKey, MotionTierPolicy, } from "./config";
|
|
3
3
|
export { useAnimatedValue } from "./useAnimatedValue";
|
|
4
4
|
export { useMotion } from "./useMotion";
|
|
5
5
|
export type { Motion, TimingOptions } from "./useMotion";
|
|
6
|
+
export { usePressState, useFocusRing } from "./usePressState";
|
|
7
|
+
export type { PressStateHandlers, UsePressStateResult } from "./usePressState";
|
|
6
8
|
export { useEnterExit, usePressMotion, useReveal } from "./presets";
|
|
7
9
|
export type { EnterExitMotion, PressMotion, RevealMotion } from "./presets";
|
|
8
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type LayoutChangeEvent, type ViewStyle } from 'react-native';
|
|
2
|
+
import type { AnimatedStyle } from 'react-native-reanimated';
|
|
3
|
+
export interface PressStateHandlers {
|
|
4
|
+
onPressIn: () => void;
|
|
5
|
+
onPressOut: () => void;
|
|
6
|
+
onLayout: (event: LayoutChangeEvent) => void;
|
|
7
|
+
}
|
|
8
|
+
export interface UsePressStateResult {
|
|
9
|
+
pressed: boolean;
|
|
10
|
+
animatedStyle: AnimatedStyle<ViewStyle>;
|
|
11
|
+
overlayStyle: AnimatedStyle<ViewStyle>;
|
|
12
|
+
focusRingStyle: AnimatedStyle<ViewStyle>;
|
|
13
|
+
handlers: PressStateHandlers;
|
|
14
|
+
onLayout: (event: LayoutChangeEvent) => void;
|
|
15
|
+
}
|
|
16
|
+
export declare function usePressState(disabled?: boolean): UsePressStateResult;
|
|
17
|
+
export declare function useFocusRing(focused: boolean, disabled?: boolean): {
|
|
18
|
+
focusRingStyle: AnimatedStyle<ViewStyle>;
|
|
19
|
+
animateFocus: (isFocused: boolean) => void;
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=usePressState.d.ts.map
|
|
@@ -37,7 +37,7 @@ export type { CardProps, CardVariant } from "./modules/card";
|
|
|
37
37
|
export { Checkbox } from "./modules/checkbox";
|
|
38
38
|
export type { CheckboxProps, CheckboxSize } from "./modules/checkbox";
|
|
39
39
|
export { Chip, ChipGroup } from "./modules/chip";
|
|
40
|
-
export type { ChipProps, ChipGroupProps, ChipGroupGap, ChipSize, ChipTone, ChipVariant } from "./modules/chip";
|
|
40
|
+
export type { ChipProps, ChipGroupProps, ChipGroupGap, ChipSize, ChipTone, ChipVariant, CustomToneColors } from "./modules/chip";
|
|
41
41
|
export { Combobox } from "./modules/combobox";
|
|
42
42
|
export type { ComboboxProps, ComboboxSingleProps, ComboboxMultipleProps, ComboboxOption } from "./modules/combobox";
|
|
43
43
|
export { Composer } from "./modules/composer";
|
|
@@ -105,7 +105,7 @@ export type { SectionListProps, SectionListSection } from "./modules/section-lis
|
|
|
105
105
|
export { SegmentedControl } from "./modules/segmented-control";
|
|
106
106
|
export type { SegmentedControlProps, SegmentedControlOption, SegmentedControlSize } from "./modules/segmented-control";
|
|
107
107
|
export { Select } from "./modules/select";
|
|
108
|
-
export type { SelectProps, SelectOption, SelectSize } from "./modules/select";
|
|
108
|
+
export type { SelectProps, SelectOption, SelectOptionCustomColors, SelectOptionTone, SelectSize } from "./modules/select";
|
|
109
109
|
export { Skeleton } from "./modules/skeleton";
|
|
110
110
|
export type { SkeletonProps, SkeletonShape } from "./modules/skeleton";
|
|
111
111
|
export { Slider } from "./modules/slider";
|
|
@@ -120,6 +120,8 @@ export { LoadingState, ErrorState } from "./modules/state-block";
|
|
|
120
120
|
export type { LoadingStateProps, ErrorStateProps, ErrorStateAction } from "./modules/state-block";
|
|
121
121
|
export { Stepper } from "./modules/stepper";
|
|
122
122
|
export type { StepperProps, StepperStep } from "./modules/stepper";
|
|
123
|
+
export { Box, Surface } from "./modules/surface";
|
|
124
|
+
export type { SurfaceProps, BgRole, BorderRole, RadiusToken, SpaceToken } from "./modules/surface";
|
|
123
125
|
export { SwipeableRow } from "./modules/swipeable-row";
|
|
124
126
|
export type { SwipeableRowAction, SwipeableRowProps, SwipeableActionTone } from "./modules/swipeable-row";
|
|
125
127
|
export { Switch } from "./modules/switch";
|
|
@@ -55,7 +55,7 @@ export interface AccordionColors {
|
|
|
55
55
|
readonly title: string;
|
|
56
56
|
/** The chevron glyph — a non-text state indicator, not a label. */
|
|
57
57
|
readonly icon: string;
|
|
58
|
-
/** The
|
|
58
|
+
/** The StyleSheet.hairlineWidth between items — decorative, never the interactive/focus rungs. */
|
|
59
59
|
readonly divider: string;
|
|
60
60
|
/** A header's background while pressed. */
|
|
61
61
|
readonly pressedHeaderBg: string;
|
|
@@ -89,7 +89,7 @@ export interface AccordionHeaderAccessibilityProps {
|
|
|
89
89
|
*/
|
|
90
90
|
export declare function resolveAccordionHeaderAccessibility(input: AccordionHeaderAccessibilityInput): AccordionHeaderAccessibilityProps;
|
|
91
91
|
/**
|
|
92
|
-
* One item's separator — a
|
|
92
|
+
* One item's separator — a StyleSheet.hairlineWidth on the bottom edge, theme-scaled border WIDTH. Colour
|
|
93
93
|
* (`divider`) is resolved separately and applied inline over this.
|
|
94
94
|
*/
|
|
95
95
|
export declare const accordionItemStructure: import("../../core/style").ThemedVariantResolver<Theme, import("../../core/style").VariantGroups<import("react-native").ViewStyle>, import("react-native").ViewStyle>;
|
|
@@ -26,4 +26,5 @@ export declare function resolveAlertDialogConfirmTone(tone: AlertDialogTone): Bu
|
|
|
26
26
|
* each `Button`'s own tone-resolved fill, applied by Button itself.
|
|
27
27
|
*/
|
|
28
28
|
export declare const alertDialogActionsStructure: import("../../core/style").ThemedVariantResolver<Theme, import("../../core/style").VariantGroups<import("react-native").ViewStyle>, import("react-native").ViewStyle>;
|
|
29
|
+
export declare function alertDialogPanelDepth(theme: Theme): import("react-native").ViewStyle;
|
|
29
30
|
//# sourceMappingURL=AlertDialog.variants.d.ts.map
|
|
@@ -3,8 +3,10 @@
|
|
|
3
3
|
* `avatars.length` exceeds `max`. Each face is this library's own `Avatar` module — never a hand-rolled
|
|
4
4
|
* image/initials pair — so list recycling, identity hashing, and shape defaults stay consistent.
|
|
5
5
|
*
|
|
6
|
-
* No `accessibilityRole` of its own
|
|
7
|
-
*
|
|
6
|
+
* No `accessibilityRole` of its own. Each composed `Avatar` gets a label — the consumer's, or (since
|
|
7
|
+
* a grouped face has no adjacent visible name to lean on, unlike a standalone `Avatar`) a generic
|
|
8
|
+
* `resolveAvatarGroupFaceFallbackLabel` fallback. The overflow pill carries its own `"text"`-role
|
|
9
|
+
* label so a screen reader hears how many faces are hidden, not just the ones on screen.
|
|
8
10
|
*/
|
|
9
11
|
import type { LayoutStyle } from "../../core/style";
|
|
10
12
|
import type { AvatarSize } from "../avatar/Avatar.variants";
|
|
@@ -22,6 +22,25 @@ export declare function resolveAvatarGroupColors(colors: RoleColors): AvatarGrou
|
|
|
22
22
|
export declare function resolveAvatarGroupOverlap(size: AvatarSize): number;
|
|
23
23
|
export declare function resolveAvatarGroupVisibleCount(total: number, max: number): number;
|
|
24
24
|
export declare function resolveAvatarGroupOverflowCount(total: number, visible: number): number;
|
|
25
|
+
export interface AvatarGroupOverflowAccessibilityProps {
|
|
26
|
+
readonly accessible: true;
|
|
27
|
+
readonly accessibilityRole: "text";
|
|
28
|
+
readonly accessibilityLabel: string;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* WCAG 2.5.3: the accessible name must CONTAIN the visible "+N" text (same contract as
|
|
32
|
+
* `MoreItems`'s trigger), so a voice-control user saying what they read still lands on this pill.
|
|
33
|
+
* `"text"`, not `"button"` — the pill is informational chrome, not interactive (same as `Badge`).
|
|
34
|
+
*/
|
|
35
|
+
export declare function resolveAvatarGroupOverflowAccessibility(count: number): AvatarGroupOverflowAccessibilityProps;
|
|
36
|
+
/**
|
|
37
|
+
* A face's honest-but-generic name when its consumer never set `accessibilityLabel`. Unlike a
|
|
38
|
+
* standalone `Avatar` (usually sits beside a visible name, so undecorated is a fair default —
|
|
39
|
+
* see `resolveAvatarAccessibility`), a grouped face has no adjacent name: falling through to
|
|
40
|
+
* `Avatar`'s decorative default would leave a screen reader user unable to tell how many distinct
|
|
41
|
+
* people the stack represents.
|
|
42
|
+
*/
|
|
43
|
+
export declare function resolveAvatarGroupFaceFallbackLabel(index: number): string;
|
|
25
44
|
export declare const avatarGroupStructure: import("../../core/style").ThemedVariantResolver<Theme, import("../../core/style").VariantGroups<import("react-native").ViewStyle>, import("react-native").ViewStyle>;
|
|
26
45
|
export declare const avatarGroupItemStructure: import("../../core/style").ThemedVariantResolver<Theme, import("../../core/style").VariantGroups<import("react-native").ViewStyle>, import("react-native").ViewStyle>;
|
|
27
46
|
export declare const avatarGroupOverflowStructure: import("../../core/style").ThemedVariantResolver<Theme, {
|
|
@@ -27,6 +27,8 @@ export interface BannerProps {
|
|
|
27
27
|
onDismiss?: () => void;
|
|
28
28
|
dismissLabel?: string;
|
|
29
29
|
action?: BannerAction;
|
|
30
|
+
/** Additional inline actions rendered after `action`. */
|
|
31
|
+
actions?: readonly BannerAction[];
|
|
30
32
|
/** Layout-only, outermost, applied exactly once as the LAST entry in the root style array. */
|
|
31
33
|
style?: LayoutStyle;
|
|
32
34
|
testID?: string;
|
|
@@ -159,9 +159,7 @@ export interface EditRowState {
|
|
|
159
159
|
/** Pure "is this the targeted slot" derivation, shared by the render tree and its tests — the same
|
|
160
160
|
* small-pure-predicate idiom `resolveReorderMoveState` uses for Reorder's own row gating. */
|
|
161
161
|
export declare function resolveEditRowState(input: EditRowStateInput): EditRowState;
|
|
162
|
-
/**
|
|
163
|
-
* screen content above. Colour (border, background) is resolved from role tokens and applied
|
|
164
|
-
* inline over this — never a hardcoded hex here. */
|
|
162
|
+
/** Tabs laid out as equal-width flex children; the bar separates from content by tone + elevation. */
|
|
165
163
|
export declare const bottomNavBarStructure: import("../../core/style").ThemedVariantResolver<Theme, import("../../core/style").VariantGroups<import("react-native").ViewStyle>, import("react-native").ViewStyle>;
|
|
166
164
|
/** One tab slot: icon above label, centered, spaced by `rowGap`. Shared by every core tab AND the
|
|
167
165
|
* More tab's own touchable — both must reach the same 56dp visual height. */
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { RoleColors, Theme } from "../../theme/hooks";
|
|
2
|
-
export declare const BOTTOM_SHEET_BACKDROP
|
|
2
|
+
export declare const BOTTOM_SHEET_BACKDROP: string;
|
|
3
|
+
export declare const BOTTOM_SHEET_IOS_HOME_INDICATOR_INSET = 20;
|
|
4
|
+
export declare function resolveBottomSheetBottomInset(basePadding: number, platformOS: string): number;
|
|
3
5
|
export declare function resolveBottomSheetSnapOffset(snapFraction: number, windowHeight: number): number;
|
|
4
6
|
export declare function resolveNearestSnapIndex(offsetY: number, snapOffsets: readonly number[]): number;
|
|
5
7
|
export interface BottomSheetPanelColors {
|