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,9 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Button — the reference component. The single most-repeated shape in the audited apps (81 raw
|
|
3
|
-
* TouchableOpacity in crm-mobile, 155 in ecommerce-mobile with three different style-key sets for the
|
|
4
|
-
* SAME add-to-cart button, 195 web usages). Every other module copies the patterns here: how variants
|
|
5
|
-
* resolve, how `tone` maps to role colours, how accessibility is wired, and the shape of the tests.
|
|
6
|
-
*/
|
|
7
1
|
import type { GestureResponderEvent, MouseEvent, NativeSyntheticEvent, TargetedEvent } from "react-native";
|
|
8
2
|
import type { IconName } from "../../core/icon";
|
|
9
3
|
import type { LayoutStyle } from "../../core/style";
|
|
@@ -15,21 +9,9 @@ interface ButtonBaseProps {
|
|
|
15
9
|
iconPosition?: IconPosition;
|
|
16
10
|
loading?: boolean;
|
|
17
11
|
disabled?: boolean;
|
|
18
|
-
/**
|
|
19
|
-
* Toggle state for a button that stays on, e.g. a Bold/Italic toolbar control. ACCESSIBILITY ONLY
|
|
20
|
-
* — appearance stays with `variant`, which callers already swap for the active look; without this
|
|
21
|
-
* the on/off state is conveyed by colour alone (WCAG 1.4.1) and never announced (4.1.2).
|
|
22
|
-
* Omit it entirely on an ordinary button so it does not announce "not pressed".
|
|
23
|
-
*/
|
|
24
12
|
selected?: boolean;
|
|
25
13
|
fullWidth?: boolean;
|
|
26
14
|
onPress?: () => void;
|
|
27
|
-
/**
|
|
28
|
-
* The gesture/pointer/keyboard handlers below plus `accessibilityHint` are the exact set a
|
|
29
|
-
* wrapping `Tooltip` injects via `cloneElement`. Declared explicitly because `{...rest}` is banned
|
|
30
|
-
* repo-wide: an undeclared prop is dropped, so without these a tooltip on a Button never opens.
|
|
31
|
-
* Each is chained after Button's own press/focus state, never in place of it.
|
|
32
|
-
*/
|
|
33
15
|
onLongPress?: (event: GestureResponderEvent) => void;
|
|
34
16
|
onPressOut?: (event: GestureResponderEvent) => void;
|
|
35
17
|
onHoverIn?: (event: MouseEvent) => void;
|
|
@@ -37,21 +19,14 @@ interface ButtonBaseProps {
|
|
|
37
19
|
onFocus?: (event: NativeSyntheticEvent<TargetedEvent>) => void;
|
|
38
20
|
onBlur?: (event: NativeSyntheticEvent<TargetedEvent>) => void;
|
|
39
21
|
accessibilityHint?: string;
|
|
40
|
-
/** Layout-only, outermost, applied exactly once as the LAST entry in the root style array. */
|
|
41
22
|
style?: LayoutStyle;
|
|
42
23
|
testID?: string;
|
|
43
24
|
}
|
|
44
|
-
/** A button with a visible text label. `accessibilityLabel` defaults to `label`. */
|
|
45
25
|
interface LabelledButtonProps extends ButtonBaseProps {
|
|
46
26
|
label: string;
|
|
47
27
|
icon?: IconName;
|
|
48
28
|
accessibilityLabel?: string;
|
|
49
29
|
}
|
|
50
|
-
/**
|
|
51
|
-
* An icon-only button. It has no visible text, so `accessibilityLabel` is REQUIRED at the type level
|
|
52
|
-
* — the single worst a11y trap on web (its tooltip was the only label on icon-only buttons in 22
|
|
53
|
-
* files, and tooltips do not exist on touch). `label?: never` makes the two shapes mutually exclusive.
|
|
54
|
-
*/
|
|
55
30
|
interface IconOnlyButtonProps extends ButtonBaseProps {
|
|
56
31
|
icon: IconName;
|
|
57
32
|
label?: never;
|
|
@@ -42,19 +42,19 @@ export interface ButtonSizeSpec {
|
|
|
42
42
|
*/
|
|
43
43
|
export declare const BUTTON_SIZES: {
|
|
44
44
|
readonly sm: {
|
|
45
|
-
readonly height:
|
|
45
|
+
readonly height: 44;
|
|
46
46
|
readonly fontSize: 14;
|
|
47
47
|
readonly iconSize: 16;
|
|
48
48
|
readonly hitSlop: number;
|
|
49
49
|
};
|
|
50
50
|
readonly md: {
|
|
51
|
-
readonly height:
|
|
51
|
+
readonly height: 52;
|
|
52
52
|
readonly fontSize: 16;
|
|
53
53
|
readonly iconSize: 18;
|
|
54
54
|
readonly hitSlop: number;
|
|
55
55
|
};
|
|
56
56
|
readonly lg: {
|
|
57
|
-
readonly height:
|
|
57
|
+
readonly height: 56;
|
|
58
58
|
readonly fontSize: 18;
|
|
59
59
|
readonly iconSize: 20;
|
|
60
60
|
readonly hitSlop: number;
|
|
@@ -137,15 +137,15 @@ export declare function resolveButtonAccessibility(input: ButtonAccessibilityInp
|
|
|
137
137
|
export declare const buttonStructure: import("../../core/style").ThemedVariantResolver<Theme, {
|
|
138
138
|
size: {
|
|
139
139
|
sm: {
|
|
140
|
-
height:
|
|
140
|
+
height: 44;
|
|
141
141
|
paddingHorizontal: 12;
|
|
142
142
|
};
|
|
143
143
|
md: {
|
|
144
|
-
height:
|
|
144
|
+
height: 52;
|
|
145
145
|
paddingHorizontal: 16;
|
|
146
146
|
};
|
|
147
147
|
lg: {
|
|
148
|
-
height:
|
|
148
|
+
height: 56;
|
|
149
149
|
paddingHorizontal: 24;
|
|
150
150
|
};
|
|
151
151
|
};
|
|
@@ -1,22 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ButtonGroup — a segmented single-choice control. Visually connected segments sharing one outer
|
|
3
|
-
* border and a divider line between adjacent segments, NOT a row of standalone `Button`s — that
|
|
4
|
-
* connected/segmented treatment is a different structural shape than Button's own pill/rect
|
|
5
|
-
* variants, so this is a standalone sibling (it never imports `../button`). The border/divider is
|
|
6
|
-
* drawn PER SEGMENT, not once on the container: every edge that touches the selected segment omits
|
|
7
|
-
* the stroke (see `resolveButtonGroupSegmentEdgeColors` — WCAG 1.4.11) and relies on the selected
|
|
8
|
-
* fill's own contrast against the canvas instead.
|
|
9
|
-
*
|
|
10
|
-
* One component owns the whole group, same as `RadioGroup`: each segment carries its own
|
|
11
|
-
* `accessibilityRole="radio"` + `accessibilityState.checked`, and the container carries
|
|
12
|
-
* `accessibilityRole="radiogroup"` so assistive tech announces the grouping without collapsing the
|
|
13
|
-
* individually-focusable segments into one.
|
|
14
|
-
*
|
|
15
|
-
* No animation anywhere, deliberately: selection is a conditional fill, and the segments share one
|
|
16
|
-
* continuous border, so a per-segment press scale (Button's affordance) would visibly detach a
|
|
17
|
-
* segment from the control it is part of. The `pressed` fill swap is the affordance instead. Nothing
|
|
18
|
-
* animates, so — like `RadioGroup` — there is nothing here for reduce motion (WCAG 2.3.3) to gate.
|
|
19
|
-
*/
|
|
20
1
|
import type { LayoutStyle } from "../../core/style";
|
|
21
2
|
import type { ButtonGroupSize } from "./ButtonGroup.variants";
|
|
22
3
|
export interface ButtonGroupOption {
|
|
@@ -50,8 +50,10 @@ export interface ButtonGroupColors {
|
|
|
50
50
|
readonly selectedFill: string;
|
|
51
51
|
/** Label on `selectedFill` — the derived on-colour, so it always clears 4.5:1 (never a hard white). */
|
|
52
52
|
readonly onSelectedFill: string;
|
|
53
|
-
/** Unselected-segment label, read on the
|
|
53
|
+
/** Unselected-segment label, read on the group's `containerFill`. */
|
|
54
54
|
readonly label: string;
|
|
55
|
+
/** The whole group's tonal fill, replacing the old outer hairline frame. */
|
|
56
|
+
readonly containerFill: string;
|
|
55
57
|
/**
|
|
56
58
|
* Unselected-segment background while pressed. `label` stays ≥ 4.5:1 on it (WCAG 1.4.3), and — the
|
|
57
59
|
* fix this field exists for — it stays ≥ 3:1 against `selectedFill` (WCAG 1.4.11): when a segment
|
|
@@ -61,22 +63,8 @@ export interface ButtonGroupColors {
|
|
|
61
63
|
* is `bg.sunken` nudged toward `bg.canvas` by a fixed-alpha overlay (see `resolveButtonGroupColors`).
|
|
62
64
|
*/
|
|
63
65
|
readonly pressedFill: string;
|
|
64
|
-
/**
|
|
65
|
-
*
|
|
66
|
-
* adjacent segments — this is what makes the control read as connected, not a row of
|
|
67
|
-
* separately-bordered buttons. It only ever gets DRAWN on an edge that touches two unselected
|
|
68
|
-
* segments (or one unselected segment and the group's own outside). WCAG 1.4.11: `outline`
|
|
69
|
-
* (`border.interactive`, a neutral grey) clears 3:1 against `bg.canvas` on every brand × mode, but
|
|
70
|
-
* measured directly against a SELECTED segment's `accent.solid` fill it fails 3:1 on 15 of 16
|
|
71
|
-
* brand × mode combinations (several catastrophically — slate light 1.00, emerald light 1.02).
|
|
72
|
-
* Since `value` is required, some segment is always selected, so that adjacency is not an edge
|
|
73
|
-
* case, it is every render. Rather than chase one stroke colour that can never clear 3:1 against
|
|
74
|
-
* both a near-white canvas AND every brand's accent fill at once, `resolveButtonGroupSegmentEdgeColors`
|
|
75
|
-
* omits the stroke on any edge that touches the selected segment and lets the fill-vs-canvas
|
|
76
|
-
* contrast serve as the boundary instead — the same mechanism every other solid-fill component in
|
|
77
|
-
* this library already relies on (`accent.solid` clears 3:1 against `bg.canvas` on all 16 brand ×
|
|
78
|
-
* mode combinations, worst case 3.24:1 on emerald light; see `ButtonGroup.test.ts`).
|
|
79
|
-
*/
|
|
66
|
+
/** The 1px divider between two adjacent unselected segments — omitted where it touches the
|
|
67
|
+
* selected segment (WCAG 1.4.11), letting `selectedFill` vs `containerFill` carry the boundary. */
|
|
80
68
|
readonly outline: string;
|
|
81
69
|
}
|
|
82
70
|
/**
|
|
@@ -95,21 +83,9 @@ export interface ButtonGroupSegmentEdgeInput {
|
|
|
95
83
|
readonly nextSelected: boolean;
|
|
96
84
|
}
|
|
97
85
|
export interface ButtonGroupSegmentEdgeColors {
|
|
98
|
-
|
|
99
|
-
readonly bottom: string;
|
|
100
|
-
/** Only structurally drawn on the first segment (see `buttonGroupSegmentStructure`'s `first`
|
|
101
|
-
* variant) — harmless to compute for every segment. */
|
|
102
|
-
readonly left: string;
|
|
103
|
-
/** The internal divider for every segment except the last, where it is instead that segment's
|
|
104
|
-
* own outer right edge. */
|
|
86
|
+
/** The divider shared with the next segment — omitted where either side is selected. */
|
|
105
87
|
readonly right: string;
|
|
106
88
|
}
|
|
107
|
-
/**
|
|
108
|
-
* Per-edge, per-segment outline colour — the WCAG 1.4.11 fix. An edge draws the shared `outline`
|
|
109
|
-
* colour only when BOTH sides of it are unselected; any edge touching the selected segment is
|
|
110
|
-
* `transparent` instead, so the selected fill's own contrast against the canvas (or, for the
|
|
111
|
-
* divider case, against the neighbour's transparent/canvas background) is what marks the boundary.
|
|
112
|
-
*/
|
|
113
89
|
export declare function resolveButtonGroupSegmentEdgeColors(colors: ButtonGroupColors, input: ButtonGroupSegmentEdgeInput): ButtonGroupSegmentEdgeColors;
|
|
114
90
|
export interface ButtonGroupSegmentPosition {
|
|
115
91
|
readonly isFirst: boolean;
|
|
@@ -173,30 +149,20 @@ export interface ButtonGroupKeyInput {
|
|
|
173
149
|
*/
|
|
174
150
|
export declare function resolveButtonGroupKeyIndex(input: ButtonGroupKeyInput): number | undefined;
|
|
175
151
|
/**
|
|
176
|
-
* The container
|
|
177
|
-
*
|
|
178
|
-
*
|
|
179
|
-
*
|
|
180
|
-
* own: the outer border is drawn by the first/last segments themselves (see
|
|
181
|
-
* `buttonGroupSegmentStructure`), because only a per-segment border can be selectively omitted where
|
|
182
|
-
* it touches the selected segment (WCAG 1.4.11) — a single container-wide border is one colour for
|
|
183
|
-
* its entire perimeter and cannot vary by which segment it runs along.
|
|
152
|
+
* The container. `overflow: hidden` + `borderRadius` clips every segment's fill (and the outer
|
|
153
|
+
* segments' square corners) to one rounded shape, so the selected segment never pokes a corner past
|
|
154
|
+
* it. `backgroundColor: bg.raised` is the group's tonal frame — it replaces the old outer hairline,
|
|
155
|
+
* so unselected segments (transparent) read as sitting on one continuous raised surface.
|
|
184
156
|
*/
|
|
185
157
|
export declare const buttonGroupStructure: import("../../core/style").ThemedVariantResolver<Theme, import("../../core/style").VariantGroups<import("react-native").ViewStyle>, import("react-native").ViewStyle>;
|
|
186
158
|
/**
|
|
187
159
|
* One segment's layout. `minWidth: MIN_TOUCH_TARGET` is the real ≥44dp touch-target floor for the
|
|
188
|
-
* WIDTH axis
|
|
189
|
-
* `resolveButtonGroupSegmentHitSlop`), so the rendered node itself must never shrink narrower than
|
|
190
|
-
* 44dp, for a realistic 2–4 option row at either size. `height` is fixed (not a minimum) so the
|
|
160
|
+
* WIDTH axis (see `resolveButtonGroupSegmentHitSlop`). `height` is fixed (not a minimum) so the
|
|
191
161
|
* vertical hitSlop math holds against what actually renders.
|
|
192
162
|
*
|
|
193
|
-
*
|
|
194
|
-
*
|
|
195
|
-
*
|
|
196
|
-
* edge); only the LAST segment gets right-corner radii (matching the container's own `borderRadius`,
|
|
197
|
-
* so that segment's own border curves rather than being clipped into an L by the container). Border
|
|
198
|
-
* WIDTHS are structural and constant; COLOURS (drawn vs `transparent`) are resolved per render by
|
|
199
|
-
* `resolveButtonGroupSegmentEdgeColors` and applied inline over this.
|
|
163
|
+
* Only a right border remains, structural on every segment but the last — the internal divider
|
|
164
|
+
* between two adjacent unselected segments (see `resolveButtonGroupSegmentEdgeColors`). There is no
|
|
165
|
+
* more top/bottom/left border: the container's own tonal fill carries the group's outer shape now.
|
|
200
166
|
*/
|
|
201
167
|
export declare const buttonGroupSegmentStructure: import("../../core/style").ThemedVariantResolver<Theme, {
|
|
202
168
|
size: {
|
|
@@ -211,18 +177,18 @@ export declare const buttonGroupSegmentStructure: import("../../core/style").The
|
|
|
211
177
|
};
|
|
212
178
|
first: {
|
|
213
179
|
on: {
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
};
|
|
218
|
-
off: {
|
|
219
|
-
borderLeftWidth: number;
|
|
180
|
+
borderTopLeftRadius: 12;
|
|
181
|
+
borderBottomLeftRadius: 12;
|
|
182
|
+
borderCurve: "continuous";
|
|
220
183
|
};
|
|
184
|
+
off: {};
|
|
221
185
|
};
|
|
222
186
|
last: {
|
|
223
187
|
on: {
|
|
224
|
-
borderTopRightRadius:
|
|
225
|
-
borderBottomRightRadius:
|
|
188
|
+
borderTopRightRadius: 12;
|
|
189
|
+
borderBottomRightRadius: 12;
|
|
190
|
+
borderCurve: "continuous";
|
|
191
|
+
borderRightWidth: number;
|
|
226
192
|
};
|
|
227
193
|
off: {};
|
|
228
194
|
};
|
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Card — a plain container for grouping content
|
|
3
|
-
*
|
|
4
|
-
* nothing here for `accessibilityRole` to announce — the container is intentionally invisible to
|
|
5
|
-
* assistive tech and its children carry their own semantics, exactly like a plain `View` would.
|
|
2
|
+
* Card — a plain container for grouping content, optionally pressable. When `onPress` is absent the
|
|
3
|
+
* root is a plain `View` with no press hook or animated values. Children carry their own semantics.
|
|
6
4
|
*/
|
|
7
5
|
import type { ReactNode } from "react";
|
|
6
|
+
import type { GestureResponderEvent } from "react-native";
|
|
8
7
|
import type { LayoutStyle } from "../../core/style";
|
|
9
8
|
import type { CardVariant } from "./Card.variants";
|
|
10
9
|
export interface CardProps {
|
|
11
10
|
variant?: CardVariant;
|
|
12
11
|
children?: ReactNode;
|
|
12
|
+
onPress?: () => void;
|
|
13
|
+
onLongPress?: (event: GestureResponderEvent) => void;
|
|
14
|
+
disabled?: boolean;
|
|
13
15
|
/** Layout-only, outermost, applied exactly once as the LAST entry in the root style array. */
|
|
14
16
|
style?: LayoutStyle;
|
|
15
17
|
testID?: string;
|
|
16
18
|
}
|
|
17
|
-
declare function CardImpl({ variant, children, style, testID }: CardProps): import("react").JSX.Element;
|
|
19
|
+
declare function CardImpl({ variant, children, onPress, onLongPress, disabled, style, testID, }: CardProps): import("react").JSX.Element;
|
|
18
20
|
export declare const Card: import("react").MemoExoticComponent<typeof CardImpl>;
|
|
19
21
|
export {};
|
|
20
22
|
//# sourceMappingURL=Card.d.ts.map
|
|
@@ -3,8 +3,12 @@
|
|
|
3
3
|
* (mocking only `react-native`'s `StyleSheet`, as every sibling module's tests do).
|
|
4
4
|
*/
|
|
5
5
|
import type { RoleColors, StatusRole, Theme } from "../../theme/hooks";
|
|
6
|
+
import type { DeviceTier } from "../../core/device";
|
|
6
7
|
export type SparklineTone = "accent" | "neutral" | StatusRole;
|
|
7
8
|
export declare const BAR_LIST_TRACK_HEIGHT = 6;
|
|
9
|
+
/** Header text (`fontSizes.sm` line height) + row gap (`space[1]`) + track — a floor, not a hard
|
|
10
|
+
* clip, so `VirtualList`'s `itemHeight` gets a real offset hint without constraining content. */
|
|
11
|
+
export declare const BAR_LIST_ROW_HEIGHT = 30;
|
|
8
12
|
export interface BarListColors {
|
|
9
13
|
readonly label: string;
|
|
10
14
|
readonly valueColor: string;
|
|
@@ -99,6 +103,21 @@ export declare function resolveBarChartDomain(data: readonly BarChartDomainInput
|
|
|
99
103
|
min: number;
|
|
100
104
|
max: number;
|
|
101
105
|
};
|
|
106
|
+
/** Per-`useDeviceTier()` cap on rendered categories — scaled down from `MAX_RENDERED_POINTS` (200)
|
|
107
|
+
* since each `BarChart` category costs THREE svg nodes (bar, label, press target) against a line
|
|
108
|
+
* series' one-per-sample, so the same node budget affords fewer categories on the low tiers. */
|
|
109
|
+
export declare const MAX_RENDERED_CATEGORIES_LOW = 60;
|
|
110
|
+
export declare const MAX_RENDERED_CATEGORIES_MID = 120;
|
|
111
|
+
export declare const MAX_RENDERED_CATEGORIES_HIGH = 200;
|
|
112
|
+
export declare function maxRenderedCategories(tier: DeviceTier): number;
|
|
113
|
+
/**
|
|
114
|
+
* Evenly-spaced stride sampling down to `maxCategories`, first and last category always kept.
|
|
115
|
+
* Unlike `decimateSeries`' min/max bucketing (built for a numeric y-value), a category has no
|
|
116
|
+
* "extreme" to preserve — only its label and position — so an even stride keeps the *shown*
|
|
117
|
+
* categories representative of the full range instead of clustering at one end. Below the cap the
|
|
118
|
+
* input array is returned as-is (same reference), so a typical chart is byte-identical to before.
|
|
119
|
+
*/
|
|
120
|
+
export declare function decimateCategories<T>(data: readonly T[], maxCategories: number): readonly T[];
|
|
102
121
|
export interface BarChartSummaryDatum {
|
|
103
122
|
readonly label: string;
|
|
104
123
|
readonly values: readonly number[];
|
|
@@ -120,8 +139,17 @@ export declare function resolveLineDomain(series: readonly LineSeriesDomainInput
|
|
|
120
139
|
max: number;
|
|
121
140
|
};
|
|
122
141
|
/** Above this sample count, line/sparkline series are decimated before any geometry is built —
|
|
123
|
-
* one svg node per sample is what makes a 5,000-point series unusable on a mid-tier phone.
|
|
142
|
+
* one svg node per sample is what makes a 5,000-point series unusable on a mid-tier phone. Equal
|
|
143
|
+
* to `maxRenderedPoints("high")` — kept as a named export since it's also `decimateSeries`'
|
|
144
|
+
* default `maxPoints`, for a caller that decimates without a device tier in hand. */
|
|
124
145
|
export declare const MAX_RENDERED_POINTS = 200;
|
|
146
|
+
/** Per-`useDeviceTier()` cap on rendered line/sparkline points. A point costs ONE svg node versus a
|
|
147
|
+
* `BarChart` category's three (bar, label, press target), so the same low/mid-tier node budget
|
|
148
|
+
* affords more points than `MAX_RENDERED_CATEGORIES` at the same tier. */
|
|
149
|
+
export declare const MAX_RENDERED_POINTS_LOW = 80;
|
|
150
|
+
export declare const MAX_RENDERED_POINTS_MID = 140;
|
|
151
|
+
export declare const MAX_RENDERED_POINTS_HIGH = 200;
|
|
152
|
+
export declare function maxRenderedPoints(tier: DeviceTier): number;
|
|
125
153
|
/**
|
|
126
154
|
* Min/max bucket decimation down to ~`maxPoints`: both endpoints are kept, and the interior is
|
|
127
155
|
* split into equal buckets that each contribute their lowest and highest sample, in original
|
|
@@ -8,12 +8,14 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import type { IconName } from "../../core/icon";
|
|
10
10
|
import type { LayoutStyle } from "../../core/style";
|
|
11
|
-
import type { ChipSize, ChipTone, ChipVariant } from "./Chip.variants";
|
|
11
|
+
import type { ChipSize, ChipTone, ChipVariant, CustomToneColors } from "./Chip.variants";
|
|
12
12
|
export interface ChipProps {
|
|
13
13
|
/** A chip is never icon-only — this is its whole accessible name. */
|
|
14
14
|
label: string;
|
|
15
15
|
variant?: ChipVariant;
|
|
16
16
|
tone?: ChipTone;
|
|
17
|
+
/** Required when `tone="custom"`. */
|
|
18
|
+
customColors?: CustomToneColors;
|
|
17
19
|
size?: ChipSize;
|
|
18
20
|
/** Renders the filled/accented look regardless of `variant`. Only added to
|
|
19
21
|
* `accessibilityState` when passed — see `resolveChipAccessibility`. */
|
|
@@ -14,7 +14,11 @@ import type { RoleColors, StatusRole, Theme } from "../../theme/hooks";
|
|
|
14
14
|
export type ChipVariant = "solid" | "outline" | "subtle";
|
|
15
15
|
/** `accent`/`neutral` are brand-driven emphasis; the rest mirror the theme's status roles — same
|
|
16
16
|
* shape `Badge`'s own `BadgeTone` uses. */
|
|
17
|
-
export type ChipTone = "accent" | "neutral" | StatusRole;
|
|
17
|
+
export type ChipTone = "accent" | "neutral" | StatusRole | "custom";
|
|
18
|
+
export type CustomToneColors = {
|
|
19
|
+
readonly bg: string;
|
|
20
|
+
readonly fg: string;
|
|
21
|
+
};
|
|
18
22
|
export type ChipSize = "sm" | "md";
|
|
19
23
|
export type ChipGroupGap = "sm" | "md";
|
|
20
24
|
/** Same touch-target floor as every interactive control in this library (44dp — Apple HIG minimum,
|
|
@@ -83,7 +87,7 @@ export interface ChipColors {
|
|
|
83
87
|
* pair `variant="solid"` reads — so "selected outline chip" and "solid chip" render identically
|
|
84
88
|
* instead of introducing a third, separately-measured filled pairing.
|
|
85
89
|
*/
|
|
86
|
-
export declare function resolveChipColors(colors: RoleColors, tone: ChipTone, variant: ChipVariant, selected: boolean): ChipColors;
|
|
90
|
+
export declare function resolveChipColors(colors: RoleColors, tone: ChipTone, variant: ChipVariant, selected: boolean, customColors?: CustomToneColors): ChipColors;
|
|
87
91
|
/** Whether a (variant, selected) combination renders the filled/accented look — the same predicate
|
|
88
92
|
* `resolveChipColors` and `Chip.tsx`'s own press-feedback branch both key off. */
|
|
89
93
|
export declare function isChipFilled(variant: ChipVariant, selected: boolean): boolean;
|
|
@@ -7,6 +7,6 @@ export { Chip } from "./Chip";
|
|
|
7
7
|
export type { ChipProps } from "./Chip";
|
|
8
8
|
export { ChipGroup } from "./ChipGroup";
|
|
9
9
|
export type { ChipGroupProps } from "./ChipGroup";
|
|
10
|
-
export type { ChipGroupGap, ChipSize, ChipTone, ChipVariant } from "./Chip.variants";
|
|
10
|
+
export type { ChipGroupGap, ChipSize, ChipTone, ChipVariant, CustomToneColors } from "./Chip.variants";
|
|
11
11
|
export type { IconName } from "../../core/icon";
|
|
12
12
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -73,6 +73,15 @@ export declare function normalizeForSearch(value: string): string;
|
|
|
73
73
|
* `role` verbatim, and native maps roles it doesn't know to nothing.
|
|
74
74
|
*/
|
|
75
75
|
export declare const COMBOBOX_LISTBOX_ROLE: AccessibilityRole;
|
|
76
|
+
/**
|
|
77
|
+
* Each option row's role. `aria-selected` is only valid ARIA on `option`/`row`/`tab`/`gridcell`/
|
|
78
|
+
* `treeitem` — the row sits inside a `COMBOBOX_LISTBOX_ROLE` container, so `option` is the
|
|
79
|
+
* textbook-correct pairing (2026-08 sweep fixed the row from the invalid `menuitem`+`aria-selected`
|
|
80
|
+
* combination — a followup to `select/Select.tsx`'s identical fix, both listbox/option/aria-selected
|
|
81
|
+
* per the ARIA 1.2 combobox-with-listbox-popup pattern). Same type gap as `COMBOBOX_LISTBOX_ROLE`:
|
|
82
|
+
* RN 0.86's `AccessibilityRole` union has no `option` either.
|
|
83
|
+
*/
|
|
84
|
+
export declare const COMBOBOX_OPTION_ROLE: AccessibilityRole;
|
|
76
85
|
/**
|
|
77
86
|
* The DOM id of one option row. `aria-activedescendant` and `nativeID` must agree exactly, and
|
|
78
87
|
* every `aria-*` prop is UNCHECKED by TypeScript on an RN component (hyphenated JSX attributes are
|
|
@@ -136,6 +145,8 @@ export interface ComboboxRowColors {
|
|
|
136
145
|
/** The option `description` line, the search placeholder, and the empty-state message — all the
|
|
137
146
|
* muted-text pairings, sharing one measured rung. */
|
|
138
147
|
readonly muted: string;
|
|
148
|
+
/** Hint ink for the row's own field — a hint, not body copy. */
|
|
149
|
+
readonly placeholder: string;
|
|
139
150
|
/** Leading option icon, the search glyph, and the clear-row icon. */
|
|
140
151
|
readonly icon: string;
|
|
141
152
|
/** The selected row's "check" glyph. Same value as `text`: if the label clears the stricter 4.5:1
|
|
@@ -171,7 +182,7 @@ export interface ComboboxRowAccessibilityInput {
|
|
|
171
182
|
readonly disabled: boolean;
|
|
172
183
|
}
|
|
173
184
|
export interface ComboboxRowAccessibilityProps {
|
|
174
|
-
readonly accessibilityRole:
|
|
185
|
+
readonly accessibilityRole: AccessibilityRole;
|
|
175
186
|
/** Flat, never `accessibilityState`: react-native-web discards the object form (see
|
|
176
187
|
* `docs/PLATFORM-A11Y-PROPS.md`). Quoted keys so the compiler still checks the prop names. */
|
|
177
188
|
readonly "aria-selected": boolean;
|
|
@@ -179,9 +190,11 @@ export interface ComboboxRowAccessibilityProps {
|
|
|
179
190
|
readonly disabled: boolean;
|
|
180
191
|
}
|
|
181
192
|
/**
|
|
182
|
-
* Every row is `
|
|
183
|
-
*
|
|
184
|
-
*
|
|
193
|
+
* Every row is `option` (2026-08 sweep — was `menuitem`, which made `aria-selected` invalid ARIA;
|
|
194
|
+
* the row sits inside `COMBOBOX_LISTBOX_ROLE`, so `option` is the textbook-correct pairing), in BOTH
|
|
195
|
+
* single and multiple mode: this module's `aria-activedescendant` pattern is one listbox regardless
|
|
196
|
+
* of mode, unlike `MultiSelect`'s own separate `checkbox` rows. Selection state rides `aria-selected`,
|
|
197
|
+
* never `aria-checked`.
|
|
185
198
|
*/
|
|
186
199
|
export declare function resolveComboboxRowAccessibility(input: ComboboxRowAccessibilityInput): ComboboxRowAccessibilityProps;
|
|
187
200
|
/**
|
|
@@ -47,7 +47,7 @@ export interface DataTableColors {
|
|
|
47
47
|
* minimum clears the icon's 3:1 non-text minimum for free (Menu/Select's identical argument). */
|
|
48
48
|
readonly headerIcon: string;
|
|
49
49
|
/** The header/body boundary — `border.interactive` (≥ 3:1, WCAG 1.4.11), not the decorative
|
|
50
|
-
* `border.default`, which is a ~1.2:1
|
|
50
|
+
* `border.default`, which is a ~1.2:1 StyleSheet.hairlineWidth on every brand. */
|
|
51
51
|
readonly headerBorder: string;
|
|
52
52
|
/** Even-row fill. */
|
|
53
53
|
readonly rowBackground: string;
|
|
@@ -263,6 +263,20 @@ export interface DateFieldAccessibilityProps {
|
|
|
263
263
|
* is folded into the field's own accessible name — the same fallback `Input`/`Select` make.
|
|
264
264
|
*/
|
|
265
265
|
export declare function resolveDateFieldAccessibility(input: DateFieldAccessibilityInput): DateFieldAccessibilityProps;
|
|
266
|
+
export interface PressedAccessibilityState {
|
|
267
|
+
/** The WEB half of "this is the chosen value". Every `role="button"` option this module renders
|
|
268
|
+
* (a day cell, a quick-jump month, an hour/minute/meridiem) reports its chosen state through
|
|
269
|
+
* `aria-pressed` — `aria-selected` is invalid on `role="button"` and browsers ignore it, same fix
|
|
270
|
+
* `chip`'s filter toggle uses. More than one option can be pressed at once (a date range's two
|
|
271
|
+
* endpoints); nothing in `aria-pressed` requires the mutual exclusivity a radio group would. */
|
|
272
|
+
readonly "aria-pressed": boolean;
|
|
273
|
+
/** The NATIVE half — react-native-web discards the object form, so no invalid `aria-selected`
|
|
274
|
+
* reaches the DOM; native accessibility has no "pressed" state, so `selected` is the nearest. */
|
|
275
|
+
readonly accessibilityState: {
|
|
276
|
+
readonly selected: boolean;
|
|
277
|
+
};
|
|
278
|
+
}
|
|
279
|
+
export declare function resolvePressedAccessibilityState(selected: boolean): PressedAccessibilityState;
|
|
266
280
|
export interface CalendarDayAccessibilityInput {
|
|
267
281
|
readonly date: Date;
|
|
268
282
|
readonly selected: boolean;
|
|
@@ -272,12 +286,10 @@ export interface CalendarDayAccessibilityInput {
|
|
|
272
286
|
readonly today?: boolean | undefined;
|
|
273
287
|
readonly locale?: string | undefined;
|
|
274
288
|
}
|
|
275
|
-
export interface CalendarDayAccessibilityProps {
|
|
289
|
+
export interface CalendarDayAccessibilityProps extends PressedAccessibilityState {
|
|
276
290
|
readonly accessibilityRole: "button";
|
|
277
291
|
/** The FULL readable date — a screen reader announcing "15" tells the user nothing. */
|
|
278
292
|
readonly accessibilityLabel: string;
|
|
279
|
-
/** Flat, not `accessibilityState`: react-native-web discards the object form entirely. */
|
|
280
|
-
readonly "aria-selected": boolean;
|
|
281
293
|
readonly "aria-disabled": boolean;
|
|
282
294
|
}
|
|
283
295
|
/** Appended to a day's label when the grid conveys the state with colour only (WCAG 1.4.1). */
|
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* TimePicker — hour / minute (/ AM-PM) selection
|
|
3
|
-
* clock face. Hour and minute are virtualized `FlatList`s (Select's precedent — a minute column can
|
|
4
|
-
* hold up to 60 rows); the two-item AM/PM column is a plain view, matching Tabs' own choice not to
|
|
5
|
-
* virtualize a handful of items.
|
|
6
|
-
*
|
|
7
|
-
* All arithmetic (12/24-hour conversion, AM/PM flip, option lists) lives in `DatePicker.variants.ts`.
|
|
2
|
+
* TimePicker — hour / minute (/ AM-PM) selection columns.
|
|
8
3
|
*/
|
|
9
4
|
import type { LayoutStyle } from "../../core/style";
|
|
10
5
|
export interface TimePickerProps {
|
|
@@ -12,7 +7,6 @@ export interface TimePickerProps {
|
|
|
12
7
|
onChange: (date: Date) => void;
|
|
13
8
|
use24Hour?: boolean;
|
|
14
9
|
minuteStep?: number;
|
|
15
|
-
/** Layout-only, outermost, applied exactly once as the LAST entry in the root style array. */
|
|
16
10
|
style?: LayoutStyle;
|
|
17
11
|
testID?: string;
|
|
18
12
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Divider's style resolution — same split as `Card.variants` / `Button.variants`:
|
|
3
|
-
* - STRUCTURE (the
|
|
3
|
+
* - STRUCTURE (the StyleSheet.hairlineWidth's thickness on the cross axis) lives in the themed `dividerStructure`
|
|
4
4
|
* resolver, static per (brand, mode), registered once via `StyleSheet.create`.
|
|
5
5
|
* - COLOUR is resolved from the theme's ROLE colours by `resolveDividerColor`, never a raw ramp
|
|
6
6
|
* and never a hardcoded hex.
|
|
@@ -23,18 +23,18 @@ export type DividerOrientation = "horizontal" | "vertical";
|
|
|
23
23
|
*/
|
|
24
24
|
export declare function resolveDividerColor(colors: RoleColors): string;
|
|
25
25
|
/**
|
|
26
|
-
* Structural styles only — the
|
|
26
|
+
* Structural styles only — the StyleSheet.hairlineWidth's thickness on the theme's `borderWidths` scale, spanning
|
|
27
27
|
* the full cross axis. No colour (resolved separately, applied inline over this), so this compiles
|
|
28
28
|
* once per theme identity via the `WeakMap`-cached themed resolver and never rebuilds per render.
|
|
29
29
|
*/
|
|
30
30
|
export declare const dividerStructure: import("../../core/style").ThemedVariantResolver<Theme, {
|
|
31
31
|
orientation: {
|
|
32
32
|
horizontal: {
|
|
33
|
-
height:
|
|
33
|
+
height: number;
|
|
34
34
|
width: "100%";
|
|
35
35
|
};
|
|
36
36
|
vertical: {
|
|
37
|
-
width:
|
|
37
|
+
width: number;
|
|
38
38
|
alignSelf: "stretch";
|
|
39
39
|
};
|
|
40
40
|
};
|
|
@@ -24,6 +24,8 @@ export interface EmptyStateProps {
|
|
|
24
24
|
title: string;
|
|
25
25
|
description?: string;
|
|
26
26
|
action?: EmptyStateAction;
|
|
27
|
+
/** Expands to fill and centre in a flex parent (e.g. a list empty slot). */
|
|
28
|
+
fill?: boolean;
|
|
27
29
|
/** Layout-only, outermost, applied exactly once as the LAST entry in the root style array. */
|
|
28
30
|
style?: LayoutStyle;
|
|
29
31
|
testID?: string;
|
|
@@ -46,4 +46,5 @@ export declare function resolveEmptyStateAnnouncement(title: string, description
|
|
|
46
46
|
* never rebuilds per render.
|
|
47
47
|
*/
|
|
48
48
|
export declare const emptyStateStructure: import("../../core/style").ThemedVariantResolver<Theme, import("../../core/style").VariantGroups<import("react-native").ViewStyle>, import("react-native").ViewStyle>;
|
|
49
|
+
export declare const emptyStateFillStructure: import("../../core/style").ThemedVariantResolver<Theme, import("../../core/style").VariantGroups<import("react-native").ViewStyle>, import("react-native").ViewStyle>;
|
|
49
50
|
//# sourceMappingURL=EmptyState.variants.d.ts.map
|
|
@@ -64,6 +64,8 @@ export interface FabToneColors {
|
|
|
64
64
|
* lookups, so it inverts light↔dark for free and can never be an off-palette value an app invented.
|
|
65
65
|
*/
|
|
66
66
|
export declare function resolveFabTone(colors: RoleColors, tone: FabTone): FabToneColors;
|
|
67
|
+
/** Press scrim direction, chosen by brightness — shared by `Fab` and `FabGroup`'s trigger. */
|
|
68
|
+
export declare function fabOverlayColor(onFill: string): string;
|
|
67
69
|
export interface FabAccessibilityInput {
|
|
68
70
|
readonly label?: string | undefined;
|
|
69
71
|
readonly accessibilityLabel?: string | undefined;
|
|
@@ -1,12 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* FolderRow — file-browser style row with optional leading icon and trailing meta text.
|
|
3
|
-
*
|
|
4
|
-
* It is rendered AS a list cell at scale, so it carries no mount animation and no loop: press
|
|
5
|
-
* feedback is a plain pressed background colour. Colours and style arrays are memoized so a
|
|
6
|
-
* parent re-render with unchanged props costs nothing.
|
|
7
|
-
*
|
|
8
|
-
* Keyboard/AT focus draws an INSET ring (WCAG 2.4.7) rather than the gap-outside ring `Button` uses
|
|
9
|
-
* — a full-bleed row's outset ring is clipped by the list it sits in.
|
|
10
3
|
*/
|
|
11
4
|
import type { IconName } from "../../core/icon";
|
|
12
5
|
import type { LayoutStyle } from "../../core/style";
|
|
@@ -16,7 +9,6 @@ export interface FolderRowProps {
|
|
|
16
9
|
icon?: IconName;
|
|
17
10
|
trailing?: string;
|
|
18
11
|
onPress?: () => void;
|
|
19
|
-
/** Layout-only, outermost, applied exactly once as the LAST entry in the root style array. */
|
|
20
12
|
style?: LayoutStyle;
|
|
21
13
|
testID?: string;
|
|
22
14
|
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Gantt layout math — ported from tickets/mobile EpicTimeline. Pure, testable.
|
|
3
3
|
*/
|
|
4
4
|
import type { RoleColors } from "../../theme/hooks";
|
|
5
|
+
import type { DeviceTier } from "../../core/device";
|
|
5
6
|
export declare const MS_PER_DAY = 86400000;
|
|
6
7
|
export declare const GANTT_LABEL_W = 108;
|
|
7
8
|
export declare const GANTT_ROW_H = 46;
|
|
@@ -13,6 +14,13 @@ export declare const GANTT_MIN_SPAN_MS: number;
|
|
|
13
14
|
export declare const GANTT_PAD_MS: number;
|
|
14
15
|
/** WCAG 2.5.5 target size, the library-wide floor (`Tabs`/`Pagination`/`Reorder` all pin the same 44). */
|
|
15
16
|
export declare const MIN_TOUCH_TARGET = 44;
|
|
17
|
+
/**
|
|
18
|
+
* Lanes rendered before the "show all" affordance takes over — the same worst-case safety valve as
|
|
19
|
+
* `MAX_RENDERED_POINTS` in `Charts.variants.ts`, tier-scaled because a lane count this large comes
|
|
20
|
+
* from real ticket/epic data (this component's own documented origin), not a series a caller could
|
|
21
|
+
* decimate without losing rows a reader actually needs.
|
|
22
|
+
*/
|
|
23
|
+
export declare const MAX_RENDERED_LANES: Readonly<Record<DeviceTier, number>>;
|
|
16
24
|
/**
|
|
17
25
|
* A bar is a *data mark* — its 18dp height encodes nothing but the chart's row rhythm, and its width
|
|
18
26
|
* encodes the lane's duration, so neither can be grown to 44dp without lying about the data. When
|
|
@@ -79,4 +87,17 @@ export interface GanttColors {
|
|
|
79
87
|
*/
|
|
80
88
|
export declare function resolveGanttColors(colors: RoleColors): GanttColors;
|
|
81
89
|
export declare function computeGanttModel(lanes: readonly GanttLaneInput[], windowWidth: number, nowMs: number): GanttModel;
|
|
90
|
+
export interface GanttVisibleLanes {
|
|
91
|
+
readonly lanes: readonly GanttLaneLayout[];
|
|
92
|
+
readonly bodyHeight: number;
|
|
93
|
+
readonly totalCount: number;
|
|
94
|
+
readonly hiddenCount: number;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Slices the already-laid-out lanes to `maxLanes` unless `expanded`. Safe to slice AFTER
|
|
98
|
+
* `computeGanttModel`: each lane's `leftPx`/`widthPx` is derived from the shared time domain, not
|
|
99
|
+
* from its position in the array, so dropping trailing lanes never shifts the ones kept. `bodyHeight`
|
|
100
|
+
* is recomputed for the slice so the chart body and the "today" line never overshoot the rendered rows.
|
|
101
|
+
*/
|
|
102
|
+
export declare function resolveVisibleGanttLanes(model: GanttModel, maxLanes: number, expanded: boolean): GanttVisibleLanes;
|
|
82
103
|
//# sourceMappingURL=Gantt.variants.d.ts.map
|