@cdx-ui/components 0.1.6 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/coverage.svg +1 -1
- package/lib/commonjs/components/Alert/index.js.map +1 -1
- package/lib/commonjs/components/Avatar/index.js +6 -4
- package/lib/commonjs/components/Avatar/index.js.map +1 -1
- package/lib/commonjs/components/Badge/index.js.map +1 -1
- package/lib/commonjs/components/Badge/styles.js +2 -2
- package/lib/commonjs/components/BottomSheet/index.js +106 -91
- package/lib/commonjs/components/BottomSheet/index.js.map +1 -1
- package/lib/commonjs/components/BottomSheet/styles.js +1 -12
- package/lib/commonjs/components/BottomSheet/styles.js.map +1 -1
- package/lib/commonjs/components/Button/index.js.map +1 -1
- package/lib/commonjs/components/Card/index.js.map +1 -1
- package/lib/commonjs/components/ColorArea/ColorAreaPaint.js +78 -0
- package/lib/commonjs/components/ColorArea/ColorAreaPaint.js.map +1 -0
- package/lib/commonjs/components/ColorArea/ColorAreaPaint.web.js +31 -0
- package/lib/commonjs/components/ColorArea/ColorAreaPaint.web.js.map +1 -0
- package/lib/commonjs/components/ColorArea/index.js +57 -0
- package/lib/commonjs/components/ColorArea/index.js.map +1 -0
- package/lib/commonjs/components/ColorArea/styles.js +12 -0
- package/lib/commonjs/components/ColorArea/styles.js.map +1 -0
- package/lib/commonjs/components/ColorField/index.js +138 -0
- package/lib/commonjs/components/ColorField/index.js.map +1 -0
- package/lib/commonjs/components/ColorField/styles.js +14 -0
- package/lib/commonjs/components/ColorField/styles.js.map +1 -0
- package/lib/commonjs/components/ColorPicker/index.js +88 -0
- package/lib/commonjs/components/ColorPicker/index.js.map +1 -0
- package/lib/commonjs/components/ColorPicker/styles.js +22 -0
- package/lib/commonjs/components/ColorPicker/styles.js.map +1 -0
- package/lib/commonjs/components/ColorSlider/ColorSliderRailPaint.js +68 -0
- package/lib/commonjs/components/ColorSlider/ColorSliderRailPaint.js.map +1 -0
- package/lib/commonjs/components/ColorSlider/ColorSliderRailPaint.web.js +41 -0
- package/lib/commonjs/components/ColorSlider/ColorSliderRailPaint.web.js.map +1 -0
- package/lib/commonjs/components/ColorSlider/index.js +123 -0
- package/lib/commonjs/components/ColorSlider/index.js.map +1 -0
- package/lib/commonjs/components/ColorSlider/styles.js +50 -0
- package/lib/commonjs/components/ColorSlider/styles.js.map +1 -0
- package/lib/commonjs/components/ColorSwatch/index.js +54 -0
- package/lib/commonjs/components/ColorSwatch/index.js.map +1 -0
- package/lib/commonjs/components/ColorSwatch/styles.js +25 -0
- package/lib/commonjs/components/ColorSwatch/styles.js.map +1 -0
- package/lib/commonjs/components/ColorSwatchPicker/index.js +110 -0
- package/lib/commonjs/components/ColorSwatchPicker/index.js.map +1 -0
- package/lib/commonjs/components/ColorSwatchPicker/styles.js +17 -0
- package/lib/commonjs/components/ColorSwatchPicker/styles.js.map +1 -0
- package/lib/commonjs/components/Dialog/index.js.map +1 -1
- package/lib/commonjs/components/Divider/index.js.map +1 -1
- package/lib/commonjs/components/Form/styles.js +1 -1
- package/lib/commonjs/components/Form/styles.js.map +1 -1
- package/lib/commonjs/components/FullScreenDialog/animation.js +46 -0
- package/lib/commonjs/components/FullScreenDialog/animation.js.map +1 -0
- package/lib/commonjs/components/FullScreenDialog/index.js +343 -0
- package/lib/commonjs/components/FullScreenDialog/index.js.map +1 -0
- package/lib/commonjs/components/FullScreenDialog/styles.js +14 -0
- package/lib/commonjs/components/FullScreenDialog/styles.js.map +1 -0
- package/lib/commonjs/components/Heading/styles.js +3 -0
- package/lib/commonjs/components/Heading/styles.js.map +1 -1
- package/lib/commonjs/components/Icon/index.js +27 -3
- package/lib/commonjs/components/Icon/index.js.map +1 -1
- package/lib/commonjs/components/Icon/styles.js +19 -0
- package/lib/commonjs/components/Icon/styles.js.map +1 -0
- package/lib/commonjs/components/IconButton/styles.js +7 -5
- package/lib/commonjs/components/IconButton/styles.js.map +1 -1
- package/lib/commonjs/components/InsuranceDisclosure/index.js.map +1 -1
- package/lib/commonjs/components/Link/index.js.map +1 -1
- package/lib/commonjs/components/ListItem/index.js +2 -0
- package/lib/commonjs/components/ListItem/index.js.map +1 -1
- package/lib/commonjs/components/ListItem/styles.js +6 -0
- package/lib/commonjs/components/ListItem/styles.js.map +1 -1
- package/lib/commonjs/components/ProgressSegmented/index.js.map +1 -1
- package/lib/commonjs/components/Radio/index.js.map +1 -1
- package/lib/commonjs/components/ScopedTheme/index.js +11 -3
- package/lib/commonjs/components/ScopedTheme/index.js.map +1 -1
- package/lib/commonjs/components/Skeleton/index.js.map +1 -1
- package/lib/commonjs/components/Stack/HStack.js.map +1 -1
- package/lib/commonjs/components/Stack/VStack.js.map +1 -1
- package/lib/commonjs/components/Text/index.js +13 -4
- package/lib/commonjs/components/Text/index.js.map +1 -1
- package/lib/commonjs/components/Text/styles.js +39 -3
- package/lib/commonjs/components/Text/styles.js.map +1 -1
- package/lib/commonjs/components/Textarea/index.js.map +1 -1
- package/lib/commonjs/components/Tile/index.js.map +1 -1
- package/lib/commonjs/components/Toast/hooks.js +0 -1
- package/lib/commonjs/components/Toast/hooks.js.map +1 -1
- package/lib/commonjs/components/Toast/index.js +49 -18
- package/lib/commonjs/components/Toast/index.js.map +1 -1
- package/lib/commonjs/components/Toast/styles.js +49 -21
- package/lib/commonjs/components/Toast/styles.js.map +1 -1
- package/lib/commonjs/components/ToggleButton/index.js +5 -4
- package/lib/commonjs/components/ToggleButton/index.js.map +1 -1
- package/lib/commonjs/components/index.js +80 -0
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/components/picker/styles.js +6 -2
- package/lib/commonjs/components/picker/styles.js.map +1 -1
- package/lib/commonjs/components/picker/surfaces.js +9 -2
- package/lib/commonjs/components/picker/surfaces.js.map +1 -1
- package/lib/commonjs/components/sheet-header/index.js +97 -0
- package/lib/commonjs/components/sheet-header/index.js.map +1 -0
- package/lib/commonjs/components/sheet-header/styles.js +28 -0
- package/lib/commonjs/components/sheet-header/styles.js.map +1 -0
- package/lib/commonjs/figma/BottomSheet.figma.js +1 -1
- package/lib/commonjs/figma/Icon.figma.js +30 -3
- package/lib/commonjs/figma/Icon.figma.js.map +1 -1
- package/lib/commonjs/figma/Text.figma.js +15 -1
- package/lib/commonjs/figma/Text.figma.js.map +1 -1
- package/lib/commonjs/providers/toast/insets-container.js +15 -3
- package/lib/commonjs/providers/toast/insets-container.js.map +1 -1
- package/lib/commonjs/providers/toast/provider.js +45 -11
- package/lib/commonjs/providers/toast/provider.js.map +1 -1
- package/lib/commonjs/styles/constants.js +14 -1
- package/lib/commonjs/styles/constants.js.map +1 -1
- package/lib/module/components/Alert/index.js.map +1 -1
- package/lib/module/components/Avatar/index.js +6 -4
- package/lib/module/components/Avatar/index.js.map +1 -1
- package/lib/module/components/Badge/index.js.map +1 -1
- package/lib/module/components/Badge/styles.js +2 -2
- package/lib/module/components/BottomSheet/index.js +110 -95
- package/lib/module/components/BottomSheet/index.js.map +1 -1
- package/lib/module/components/BottomSheet/styles.js +0 -11
- package/lib/module/components/BottomSheet/styles.js.map +1 -1
- package/lib/module/components/Button/index.js.map +1 -1
- package/lib/module/components/Card/index.js.map +1 -1
- package/lib/module/components/ColorArea/ColorAreaPaint.js +74 -0
- package/lib/module/components/ColorArea/ColorAreaPaint.js.map +1 -0
- package/lib/module/components/ColorArea/ColorAreaPaint.web.js +27 -0
- package/lib/module/components/ColorArea/ColorAreaPaint.web.js.map +1 -0
- package/lib/module/components/ColorArea/index.js +53 -0
- package/lib/module/components/ColorArea/index.js.map +1 -0
- package/lib/module/components/ColorArea/styles.js +8 -0
- package/lib/module/components/ColorArea/styles.js.map +1 -0
- package/lib/module/components/ColorField/index.js +134 -0
- package/lib/module/components/ColorField/index.js.map +1 -0
- package/lib/module/components/ColorField/styles.js +10 -0
- package/lib/module/components/ColorField/styles.js.map +1 -0
- package/lib/module/components/ColorPicker/index.js +79 -0
- package/lib/module/components/ColorPicker/index.js.map +1 -0
- package/lib/module/components/ColorPicker/styles.js +18 -0
- package/lib/module/components/ColorPicker/styles.js.map +1 -0
- package/lib/module/components/ColorSlider/ColorSliderRailPaint.js +64 -0
- package/lib/module/components/ColorSlider/ColorSliderRailPaint.js.map +1 -0
- package/lib/module/components/ColorSlider/ColorSliderRailPaint.web.js +37 -0
- package/lib/module/components/ColorSlider/ColorSliderRailPaint.web.js.map +1 -0
- package/lib/module/components/ColorSlider/index.js +119 -0
- package/lib/module/components/ColorSlider/index.js.map +1 -0
- package/lib/module/components/ColorSlider/styles.js +46 -0
- package/lib/module/components/ColorSlider/styles.js.map +1 -0
- package/lib/module/components/ColorSwatch/index.js +50 -0
- package/lib/module/components/ColorSwatch/index.js.map +1 -0
- package/lib/module/components/ColorSwatch/styles.js +21 -0
- package/lib/module/components/ColorSwatch/styles.js.map +1 -0
- package/lib/module/components/ColorSwatchPicker/index.js +106 -0
- package/lib/module/components/ColorSwatchPicker/index.js.map +1 -0
- package/lib/module/components/ColorSwatchPicker/styles.js +13 -0
- package/lib/module/components/ColorSwatchPicker/styles.js.map +1 -0
- package/lib/module/components/Dialog/index.js.map +1 -1
- package/lib/module/components/Divider/index.js.map +1 -1
- package/lib/module/components/Form/styles.js +1 -1
- package/lib/module/components/Form/styles.js.map +1 -1
- package/lib/module/components/FullScreenDialog/animation.js +41 -0
- package/lib/module/components/FullScreenDialog/animation.js.map +1 -0
- package/lib/module/components/FullScreenDialog/index.js +338 -0
- package/lib/module/components/FullScreenDialog/index.js.map +1 -0
- package/lib/module/components/FullScreenDialog/styles.js +10 -0
- package/lib/module/components/FullScreenDialog/styles.js.map +1 -0
- package/lib/module/components/Heading/styles.js +3 -0
- package/lib/module/components/Heading/styles.js.map +1 -1
- package/lib/module/components/Icon/index.js +27 -3
- package/lib/module/components/Icon/index.js.map +1 -1
- package/lib/module/components/Icon/styles.js +16 -0
- package/lib/module/components/Icon/styles.js.map +1 -0
- package/lib/module/components/IconButton/styles.js +7 -4
- package/lib/module/components/IconButton/styles.js.map +1 -1
- package/lib/module/components/InsuranceDisclosure/index.js.map +1 -1
- package/lib/module/components/Link/index.js.map +1 -1
- package/lib/module/components/ListItem/index.js +2 -0
- package/lib/module/components/ListItem/index.js.map +1 -1
- package/lib/module/components/ListItem/styles.js +6 -0
- package/lib/module/components/ListItem/styles.js.map +1 -1
- package/lib/module/components/ProgressSegmented/index.js.map +1 -1
- package/lib/module/components/Radio/index.js.map +1 -1
- package/lib/module/components/ScopedTheme/index.js +11 -3
- package/lib/module/components/ScopedTheme/index.js.map +1 -1
- package/lib/module/components/Skeleton/index.js.map +1 -1
- package/lib/module/components/Stack/HStack.js.map +1 -1
- package/lib/module/components/Stack/VStack.js.map +1 -1
- package/lib/module/components/Text/index.js +14 -5
- package/lib/module/components/Text/index.js.map +1 -1
- package/lib/module/components/Text/styles.js +38 -2
- package/lib/module/components/Text/styles.js.map +1 -1
- package/lib/module/components/Textarea/index.js.map +1 -1
- package/lib/module/components/Tile/index.js.map +1 -1
- package/lib/module/components/Toast/hooks.js +0 -1
- package/lib/module/components/Toast/hooks.js.map +1 -1
- package/lib/module/components/Toast/index.js +52 -21
- package/lib/module/components/Toast/index.js.map +1 -1
- package/lib/module/components/Toast/styles.js +48 -21
- package/lib/module/components/Toast/styles.js.map +1 -1
- package/lib/module/components/ToggleButton/index.js +3 -3
- package/lib/module/components/ToggleButton/index.js.map +1 -1
- package/lib/module/components/index.js +7 -0
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/components/picker/styles.js +6 -2
- package/lib/module/components/picker/styles.js.map +1 -1
- package/lib/module/components/picker/surfaces.js +10 -3
- package/lib/module/components/picker/surfaces.js.map +1 -1
- package/lib/module/components/sheet-header/index.js +94 -0
- package/lib/module/components/sheet-header/index.js.map +1 -0
- package/lib/module/components/sheet-header/styles.js +25 -0
- package/lib/module/components/sheet-header/styles.js.map +1 -0
- package/lib/module/figma/BottomSheet.figma.js +1 -1
- package/lib/module/figma/Icon.figma.js +30 -3
- package/lib/module/figma/Icon.figma.js.map +1 -1
- package/lib/module/figma/Text.figma.js +15 -1
- package/lib/module/figma/Text.figma.js.map +1 -1
- package/lib/module/providers/toast/insets-container.js +15 -4
- package/lib/module/providers/toast/insets-container.js.map +1 -1
- package/lib/module/providers/toast/provider.js +46 -12
- package/lib/module/providers/toast/provider.js.map +1 -1
- package/lib/module/styles/constants.js +13 -0
- package/lib/module/styles/constants.js.map +1 -1
- package/lib/typescript/components/Alert/index.d.ts +5 -2
- package/lib/typescript/components/Alert/index.d.ts.map +1 -1
- package/lib/typescript/components/Avatar/index.d.ts +11 -5
- package/lib/typescript/components/Avatar/index.d.ts.map +1 -1
- package/lib/typescript/components/Badge/index.d.ts +34 -0
- package/lib/typescript/components/Badge/index.d.ts.map +1 -1
- package/lib/typescript/components/Badge/styles.d.ts +3 -3
- package/lib/typescript/components/BottomSheet/index.d.ts +12 -1
- package/lib/typescript/components/BottomSheet/index.d.ts.map +1 -1
- package/lib/typescript/components/BottomSheet/styles.d.ts +0 -5
- package/lib/typescript/components/BottomSheet/styles.d.ts.map +1 -1
- package/lib/typescript/components/Breadcrumbs/styles.d.ts +1 -1
- package/lib/typescript/components/Button/index.d.ts +10 -2
- package/lib/typescript/components/Button/index.d.ts.map +1 -1
- package/lib/typescript/components/Button/styles.d.ts +4 -4
- package/lib/typescript/components/Card/index.d.ts +14 -0
- package/lib/typescript/components/Card/index.d.ts.map +1 -1
- package/lib/typescript/components/Checkbox/index.d.ts +1 -1
- package/lib/typescript/components/Checkbox/index.d.ts.map +1 -1
- package/lib/typescript/components/Chip/index.d.ts +2 -2
- package/lib/typescript/components/Chip/index.d.ts.map +1 -1
- package/lib/typescript/components/Chip/styles.d.ts +3 -3
- package/lib/typescript/components/ColorArea/ColorAreaPaint.d.ts +5 -0
- package/lib/typescript/components/ColorArea/ColorAreaPaint.d.ts.map +1 -0
- package/lib/typescript/components/ColorArea/ColorAreaPaint.web.d.ts +5 -0
- package/lib/typescript/components/ColorArea/ColorAreaPaint.web.d.ts.map +1 -0
- package/lib/typescript/components/ColorArea/index.d.ts +20 -0
- package/lib/typescript/components/ColorArea/index.d.ts.map +1 -0
- package/lib/typescript/components/ColorArea/styles.d.ts +4 -0
- package/lib/typescript/components/ColorArea/styles.d.ts.map +1 -0
- package/lib/typescript/components/ColorField/index.d.ts +41 -0
- package/lib/typescript/components/ColorField/index.d.ts.map +1 -0
- package/lib/typescript/components/ColorField/styles.d.ts +13 -0
- package/lib/typescript/components/ColorField/styles.d.ts.map +1 -0
- package/lib/typescript/components/ColorPicker/index.d.ts +28 -0
- package/lib/typescript/components/ColorPicker/index.d.ts.map +1 -0
- package/lib/typescript/components/ColorPicker/styles.d.ts +9 -0
- package/lib/typescript/components/ColorPicker/styles.d.ts.map +1 -0
- package/lib/typescript/components/ColorSlider/ColorSliderRailPaint.d.ts +5 -0
- package/lib/typescript/components/ColorSlider/ColorSliderRailPaint.d.ts.map +1 -0
- package/lib/typescript/components/ColorSlider/ColorSliderRailPaint.web.d.ts +5 -0
- package/lib/typescript/components/ColorSlider/ColorSliderRailPaint.web.d.ts.map +1 -0
- package/lib/typescript/components/ColorSlider/index.d.ts +33 -0
- package/lib/typescript/components/ColorSlider/index.d.ts.map +1 -0
- package/lib/typescript/components/ColorSlider/styles.d.ts +14 -0
- package/lib/typescript/components/ColorSlider/styles.d.ts.map +1 -0
- package/lib/typescript/components/ColorSwatch/index.d.ts +19 -0
- package/lib/typescript/components/ColorSwatch/index.d.ts.map +1 -0
- package/lib/typescript/components/ColorSwatch/styles.d.ts +7 -0
- package/lib/typescript/components/ColorSwatch/styles.d.ts.map +1 -0
- package/lib/typescript/components/ColorSwatchPicker/index.d.ts +37 -0
- package/lib/typescript/components/ColorSwatchPicker/index.d.ts.map +1 -0
- package/lib/typescript/components/ColorSwatchPicker/styles.d.ts +5 -0
- package/lib/typescript/components/ColorSwatchPicker/styles.d.ts.map +1 -0
- package/lib/typescript/components/CurrencyInput/index.d.ts +2 -2
- package/lib/typescript/components/CurrencyInput/index.d.ts.map +1 -1
- package/lib/typescript/components/Dialog/index.d.ts +10 -0
- package/lib/typescript/components/Dialog/index.d.ts.map +1 -1
- package/lib/typescript/components/Dialog/styles.d.ts +1 -0
- package/lib/typescript/components/Dialog/styles.d.ts.map +1 -1
- package/lib/typescript/components/Divider/index.d.ts +6 -1
- package/lib/typescript/components/Divider/index.d.ts.map +1 -1
- package/lib/typescript/components/Drawer/styles.d.ts +1 -1
- package/lib/typescript/components/Form/styles.d.ts.map +1 -1
- package/lib/typescript/components/FullScreenDialog/animation.d.ts +9 -0
- package/lib/typescript/components/FullScreenDialog/animation.d.ts.map +1 -0
- package/lib/typescript/components/FullScreenDialog/index.d.ts +85 -0
- package/lib/typescript/components/FullScreenDialog/index.d.ts.map +1 -0
- package/lib/typescript/components/FullScreenDialog/styles.d.ts +6 -0
- package/lib/typescript/components/FullScreenDialog/styles.d.ts.map +1 -0
- package/lib/typescript/components/Heading/styles.d.ts.map +1 -1
- package/lib/typescript/components/Icon/index.d.ts +14 -22
- package/lib/typescript/components/Icon/index.d.ts.map +1 -1
- package/lib/typescript/components/Icon/styles.d.ts +6 -0
- package/lib/typescript/components/Icon/styles.d.ts.map +1 -0
- package/lib/typescript/components/IconButton/styles.d.ts +7 -2
- package/lib/typescript/components/IconButton/styles.d.ts.map +1 -1
- package/lib/typescript/components/Input/index.d.ts +2 -2
- package/lib/typescript/components/Input/index.d.ts.map +1 -1
- package/lib/typescript/components/InsuranceDisclosure/index.d.ts +1 -0
- package/lib/typescript/components/InsuranceDisclosure/index.d.ts.map +1 -1
- package/lib/typescript/components/Link/index.d.ts +3 -1
- package/lib/typescript/components/Link/index.d.ts.map +1 -1
- package/lib/typescript/components/ListItem/index.d.ts +43 -4
- package/lib/typescript/components/ListItem/index.d.ts.map +1 -1
- package/lib/typescript/components/ListItem/styles.d.ts +2 -0
- package/lib/typescript/components/ListItem/styles.d.ts.map +1 -1
- package/lib/typescript/components/Menu/index.d.ts +2 -2
- package/lib/typescript/components/Menu/index.d.ts.map +1 -1
- package/lib/typescript/components/ProgressSegmented/index.d.ts +10 -3
- package/lib/typescript/components/ProgressSegmented/index.d.ts.map +1 -1
- package/lib/typescript/components/Radio/index.d.ts +1 -0
- package/lib/typescript/components/Radio/index.d.ts.map +1 -1
- package/lib/typescript/components/ScopedTheme/index.d.ts +11 -3
- package/lib/typescript/components/ScopedTheme/index.d.ts.map +1 -1
- package/lib/typescript/components/Select/index.d.ts +1 -1
- package/lib/typescript/components/Select/index.d.ts.map +1 -1
- package/lib/typescript/components/Skeleton/index.d.ts +5 -1
- package/lib/typescript/components/Skeleton/index.d.ts.map +1 -1
- package/lib/typescript/components/Slider/styles.d.ts +3 -3
- package/lib/typescript/components/Stack/HStack.d.ts +6 -0
- package/lib/typescript/components/Stack/HStack.d.ts.map +1 -1
- package/lib/typescript/components/Stack/VStack.d.ts +6 -0
- package/lib/typescript/components/Stack/VStack.d.ts.map +1 -1
- package/lib/typescript/components/Switch/index.d.ts +1 -1
- package/lib/typescript/components/Tabs/index.d.ts +2 -2
- package/lib/typescript/components/Text/index.d.ts +40 -3
- package/lib/typescript/components/Text/index.d.ts.map +1 -1
- package/lib/typescript/components/Text/styles.d.ts +9 -0
- package/lib/typescript/components/Text/styles.d.ts.map +1 -1
- package/lib/typescript/components/Textarea/index.d.ts +1 -0
- package/lib/typescript/components/Textarea/index.d.ts.map +1 -1
- package/lib/typescript/components/Tile/index.d.ts +49 -0
- package/lib/typescript/components/Tile/index.d.ts.map +1 -1
- package/lib/typescript/components/Toast/hooks.d.ts +1 -1
- package/lib/typescript/components/Toast/hooks.d.ts.map +1 -1
- package/lib/typescript/components/Toast/index.d.ts +15 -0
- package/lib/typescript/components/Toast/index.d.ts.map +1 -1
- package/lib/typescript/components/Toast/styles.d.ts +14 -0
- package/lib/typescript/components/Toast/styles.d.ts.map +1 -1
- package/lib/typescript/components/Toast/types.d.ts +10 -1
- package/lib/typescript/components/Toast/types.d.ts.map +1 -1
- package/lib/typescript/components/ToggleButton/index.d.ts +5 -3
- package/lib/typescript/components/ToggleButton/index.d.ts.map +1 -1
- package/lib/typescript/components/index.d.ts +7 -0
- package/lib/typescript/components/index.d.ts.map +1 -1
- package/lib/typescript/components/picker/styles.d.ts +5 -2
- package/lib/typescript/components/picker/styles.d.ts.map +1 -1
- package/lib/typescript/components/picker/surfaces.d.ts +5 -1
- package/lib/typescript/components/picker/surfaces.d.ts.map +1 -1
- package/lib/typescript/components/sheet-header/index.d.ts +24 -0
- package/lib/typescript/components/sheet-header/index.d.ts.map +1 -0
- package/lib/typescript/components/sheet-header/styles.d.ts +12 -0
- package/lib/typescript/components/sheet-header/styles.d.ts.map +1 -0
- package/lib/typescript/figma/Icon.figma.d.ts.map +1 -1
- package/lib/typescript/figma/Text.figma.d.ts.map +1 -1
- package/lib/typescript/providers/toast/insets-container.d.ts +12 -0
- package/lib/typescript/providers/toast/insets-container.d.ts.map +1 -1
- package/lib/typescript/providers/toast/provider.d.ts +1 -1
- package/lib/typescript/providers/toast/provider.d.ts.map +1 -1
- package/lib/typescript/providers/toast/types.d.ts +21 -4
- package/lib/typescript/providers/toast/types.d.ts.map +1 -1
- package/lib/typescript/styles/constants.d.ts +10 -0
- package/lib/typescript/styles/constants.d.ts.map +1 -1
- package/package.json +5 -5
- package/src/components/Alert/index.tsx +5 -2
- package/src/components/Avatar/index.tsx +11 -5
- package/src/components/Badge/index.tsx +34 -0
- package/src/components/Badge/styles.ts +2 -2
- package/src/components/BottomSheet/index.tsx +156 -125
- package/src/components/BottomSheet/styles.ts +1 -22
- package/src/components/Button/index.tsx +10 -2
- package/src/components/Card/index.tsx +14 -0
- package/src/components/Checkbox/index.tsx +1 -1
- package/src/components/Chip/index.tsx +2 -2
- package/src/components/ColorArea/ColorAreaPaint.tsx +51 -0
- package/src/components/ColorArea/ColorAreaPaint.web.tsx +31 -0
- package/src/components/ColorArea/index.tsx +71 -0
- package/src/components/ColorArea/styles.ts +18 -0
- package/src/components/ColorField/index.tsx +181 -0
- package/src/components/ColorField/styles.ts +20 -0
- package/src/components/ColorPicker/index.tsx +110 -0
- package/src/components/ColorPicker/styles.ts +33 -0
- package/src/components/ColorSlider/ColorSliderRailPaint.tsx +60 -0
- package/src/components/ColorSlider/ColorSliderRailPaint.web.tsx +33 -0
- package/src/components/ColorSlider/index.tsx +147 -0
- package/src/components/ColorSlider/styles.ts +72 -0
- package/src/components/ColorSwatch/index.tsx +56 -0
- package/src/components/ColorSwatch/styles.ts +24 -0
- package/src/components/ColorSwatchPicker/index.tsx +150 -0
- package/src/components/ColorSwatchPicker/styles.ts +32 -0
- package/src/components/CurrencyInput/index.tsx +2 -2
- package/src/components/Dialog/index.tsx +10 -0
- package/src/components/Dialog/styles.ts +1 -0
- package/src/components/Divider/index.tsx +6 -1
- package/src/components/Form/styles.ts +1 -1
- package/src/components/FullScreenDialog/animation.ts +22 -0
- package/src/components/FullScreenDialog/index.tsx +484 -0
- package/src/components/FullScreenDialog/styles.ts +23 -0
- package/src/components/Heading/styles.ts +3 -0
- package/src/components/Icon/index.tsx +46 -6
- package/src/components/Icon/styles.ts +15 -0
- package/src/components/IconButton/styles.ts +7 -4
- package/src/components/Input/index.tsx +2 -2
- package/src/components/InsuranceDisclosure/index.tsx +1 -0
- package/src/components/Link/index.tsx +3 -1
- package/src/components/ListItem/index.tsx +48 -4
- package/src/components/ListItem/styles.ts +7 -0
- package/src/components/Menu/index.tsx +2 -2
- package/src/components/ProgressSegmented/index.tsx +10 -3
- package/src/components/Radio/index.tsx +1 -0
- package/src/components/ScopedTheme/index.tsx +11 -3
- package/src/components/Select/index.tsx +1 -1
- package/src/components/Skeleton/index.tsx +5 -1
- package/src/components/Stack/HStack.tsx +6 -0
- package/src/components/Stack/VStack.tsx +6 -0
- package/src/components/Switch/index.tsx +1 -1
- package/src/components/Tabs/index.tsx +2 -2
- package/src/components/Text/index.tsx +32 -5
- package/src/components/Text/styles.ts +39 -1
- package/src/components/Textarea/index.tsx +1 -0
- package/src/components/Tile/index.tsx +49 -0
- package/src/components/Toast/hooks.ts +0 -1
- package/src/components/Toast/index.tsx +69 -17
- package/src/components/Toast/styles.ts +60 -21
- package/src/components/Toast/types.ts +10 -1
- package/src/components/ToggleButton/index.tsx +9 -7
- package/src/components/index.ts +7 -0
- package/src/components/picker/styles.ts +6 -2
- package/src/components/picker/surfaces.tsx +15 -2
- package/src/components/sheet-header/index.tsx +148 -0
- package/src/components/sheet-header/styles.ts +28 -0
- package/src/providers/toast/insets-container.tsx +23 -9
- package/src/providers/toast/provider.tsx +49 -15
- package/src/providers/toast/types.ts +21 -4
- package/src/styles/constants.ts +13 -0
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { forwardRef, type ComponentRef } from 'react';
|
|
2
|
+
import { View, type ViewProps } from 'react-native';
|
|
3
|
+
import {
|
|
4
|
+
Slot,
|
|
5
|
+
dataAttributes,
|
|
6
|
+
mergeDataAttributes,
|
|
7
|
+
useOptionalColorPickerContext,
|
|
8
|
+
type Color,
|
|
9
|
+
} from '@cdx-ui/primitives';
|
|
10
|
+
import { cn } from '@cdx-ui/utils';
|
|
11
|
+
import { colorSwatchVariants, type ColorSwatchVariantProps } from './styles';
|
|
12
|
+
|
|
13
|
+
export interface ColorSwatchProps extends ViewProps, ColorSwatchVariantProps {
|
|
14
|
+
asChild?: boolean;
|
|
15
|
+
color?: Color;
|
|
16
|
+
/** Visual dimension. `xs` = 16, `sm` = 24, and `lg` = 40. */
|
|
17
|
+
size?: 'xs' | 'sm' | 'lg';
|
|
18
|
+
/** Swatch outline shape. */
|
|
19
|
+
shape?: 'circle' | 'square';
|
|
20
|
+
className?: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
interface ColorSwatchViewProps extends ColorSwatchProps {
|
|
24
|
+
slot: string;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export const ColorSwatchView = forwardRef<ComponentRef<typeof View>, ColorSwatchViewProps>(
|
|
28
|
+
({ asChild, color, size = 'sm', shape = 'circle', slot, className, style, ...props }, ref) => {
|
|
29
|
+
const Comp = asChild ? Slot : View;
|
|
30
|
+
|
|
31
|
+
return (
|
|
32
|
+
<Comp
|
|
33
|
+
ref={ref}
|
|
34
|
+
className={cn(colorSwatchVariants({ size, shape }), className)}
|
|
35
|
+
style={[color ? { backgroundColor: color.toString('hex') } : undefined, style]}
|
|
36
|
+
{...props}
|
|
37
|
+
{...mergeDataAttributes(props, dataAttributes({ slot }))}
|
|
38
|
+
/>
|
|
39
|
+
);
|
|
40
|
+
},
|
|
41
|
+
);
|
|
42
|
+
|
|
43
|
+
ColorSwatchView.displayName = 'ColorSwatchView';
|
|
44
|
+
|
|
45
|
+
export const ColorSwatch = forwardRef<ComponentRef<typeof View>, ColorSwatchProps>(
|
|
46
|
+
({ color: colorProp, ...props }, ref) => {
|
|
47
|
+
const picker = useOptionalColorPickerContext();
|
|
48
|
+
const color = colorProp ?? picker?.value;
|
|
49
|
+
|
|
50
|
+
return <ColorSwatchView ref={ref} color={color} slot="color-swatch" {...props} />;
|
|
51
|
+
},
|
|
52
|
+
);
|
|
53
|
+
|
|
54
|
+
ColorSwatch.displayName = 'ColorSwatch';
|
|
55
|
+
|
|
56
|
+
export type { ColorSwatchVariantProps };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { cva, type VariantProps } from '@cdx-ui/utils';
|
|
2
|
+
|
|
3
|
+
export const colorSwatchVariants = cva(
|
|
4
|
+
['shrink-0 overflow-hidden border border-stroke-secondary'],
|
|
5
|
+
{
|
|
6
|
+
variants: {
|
|
7
|
+
size: {
|
|
8
|
+
xs: 'size-4',
|
|
9
|
+
sm: 'size-6',
|
|
10
|
+
lg: 'size-10',
|
|
11
|
+
},
|
|
12
|
+
shape: {
|
|
13
|
+
circle: 'rounded-[var(--border-radius-round)]',
|
|
14
|
+
square: 'rounded-[var(--border-radius-default)]',
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
defaultVariants: {
|
|
18
|
+
size: 'sm',
|
|
19
|
+
shape: 'circle',
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
);
|
|
23
|
+
|
|
24
|
+
export type ColorSwatchVariantProps = VariantProps<typeof colorSwatchVariants>;
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { forwardRef, type ReactNode } from 'react';
|
|
2
|
+
import { View } from 'react-native';
|
|
3
|
+
import { Check } from '@cdx-ui/icons';
|
|
4
|
+
import {
|
|
5
|
+
ColorSwatchPickerItem as ColorSwatchPickerItemPrimitive,
|
|
6
|
+
ColorSwatchPickerRoot as ColorSwatchPickerRootPrimitive,
|
|
7
|
+
Slot,
|
|
8
|
+
dataAttributes,
|
|
9
|
+
mergeDataAttributes,
|
|
10
|
+
useColorSwatchPickerItemContext,
|
|
11
|
+
useRadioContext,
|
|
12
|
+
type IColorSwatchPickerItemProps,
|
|
13
|
+
type IColorSwatchPickerProps,
|
|
14
|
+
} from '@cdx-ui/primitives';
|
|
15
|
+
import { cn } from '@cdx-ui/utils';
|
|
16
|
+
import { Icon, type IconProps } from '../Icon';
|
|
17
|
+
import { ColorSwatchView, type ColorSwatchProps } from '../ColorSwatch';
|
|
18
|
+
import {
|
|
19
|
+
colorSwatchPickerIndicatorIconVariants,
|
|
20
|
+
colorSwatchPickerIndicatorVariants,
|
|
21
|
+
colorSwatchPickerItemVariants,
|
|
22
|
+
colorSwatchPickerVariants,
|
|
23
|
+
} from './styles';
|
|
24
|
+
|
|
25
|
+
export interface ColorSwatchPickerProps extends IColorSwatchPickerProps {
|
|
26
|
+
asChild?: boolean;
|
|
27
|
+
className?: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const ColorSwatchPickerRoot = forwardRef<View, ColorSwatchPickerProps>(
|
|
31
|
+
({ asChild, className, style, children, ...props }, ref) => (
|
|
32
|
+
<ColorSwatchPickerRootPrimitive
|
|
33
|
+
ref={ref}
|
|
34
|
+
asChild={asChild}
|
|
35
|
+
className={cn(colorSwatchPickerVariants(), className)}
|
|
36
|
+
style={style}
|
|
37
|
+
{...props}
|
|
38
|
+
{...mergeDataAttributes(props, dataAttributes({ slot: 'color-swatch-picker' }))}
|
|
39
|
+
>
|
|
40
|
+
{children}
|
|
41
|
+
</ColorSwatchPickerRootPrimitive>
|
|
42
|
+
),
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
ColorSwatchPickerRoot.displayName = 'ColorSwatchPicker';
|
|
46
|
+
|
|
47
|
+
export interface ColorSwatchPickerItemProps extends IColorSwatchPickerItemProps {
|
|
48
|
+
asChild?: boolean;
|
|
49
|
+
className?: string;
|
|
50
|
+
children?: ReactNode;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
const ColorSwatchPickerItem = forwardRef<View, ColorSwatchPickerItemProps>(
|
|
54
|
+
({ asChild, className, style, children, ...props }, ref) => (
|
|
55
|
+
<ColorSwatchPickerItemPrimitive
|
|
56
|
+
ref={ref}
|
|
57
|
+
asChild={asChild}
|
|
58
|
+
className={cn(colorSwatchPickerItemVariants(), className)}
|
|
59
|
+
style={style}
|
|
60
|
+
{...props}
|
|
61
|
+
{...mergeDataAttributes(props, dataAttributes({ slot: 'color-swatch-picker-item' }))}
|
|
62
|
+
>
|
|
63
|
+
{children}
|
|
64
|
+
</ColorSwatchPickerItemPrimitive>
|
|
65
|
+
),
|
|
66
|
+
);
|
|
67
|
+
|
|
68
|
+
ColorSwatchPickerItem.displayName = 'ColorSwatchPicker.Item';
|
|
69
|
+
|
|
70
|
+
export interface ColorSwatchPickerSwatchProps extends Omit<ColorSwatchProps, 'color'> {}
|
|
71
|
+
|
|
72
|
+
const ColorSwatchPickerSwatch = forwardRef<View, ColorSwatchPickerSwatchProps>((props, ref) => {
|
|
73
|
+
const { color } = useColorSwatchPickerItemContext();
|
|
74
|
+
|
|
75
|
+
return <ColorSwatchView ref={ref} color={color} slot="color-swatch-picker-swatch" {...props} />;
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
ColorSwatchPickerSwatch.displayName = 'ColorSwatchPicker.Swatch';
|
|
79
|
+
|
|
80
|
+
export interface ColorSwatchPickerIndicatorProps extends Omit<IconProps, 'as' | 'children'> {
|
|
81
|
+
asChild?: boolean;
|
|
82
|
+
as?: IconProps['as'];
|
|
83
|
+
className?: string;
|
|
84
|
+
children?: ReactNode;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
const ColorSwatchPickerIndicator = ({
|
|
88
|
+
asChild,
|
|
89
|
+
as = Check,
|
|
90
|
+
className,
|
|
91
|
+
style,
|
|
92
|
+
children,
|
|
93
|
+
...props
|
|
94
|
+
}: ColorSwatchPickerIndicatorProps) => {
|
|
95
|
+
const { isChecked } = useRadioContext();
|
|
96
|
+
|
|
97
|
+
if (!isChecked) {
|
|
98
|
+
return null;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
const computedClassName = cn(colorSwatchPickerIndicatorIconVariants(), className);
|
|
102
|
+
const slotData = mergeDataAttributes(
|
|
103
|
+
props,
|
|
104
|
+
dataAttributes({ slot: 'color-swatch-picker-indicator' }),
|
|
105
|
+
);
|
|
106
|
+
|
|
107
|
+
return (
|
|
108
|
+
<View
|
|
109
|
+
className={colorSwatchPickerIndicatorVariants()}
|
|
110
|
+
accessibilityElementsHidden
|
|
111
|
+
aria-hidden
|
|
112
|
+
{...slotData}
|
|
113
|
+
>
|
|
114
|
+
{asChild ? (
|
|
115
|
+
<Slot
|
|
116
|
+
className={computedClassName}
|
|
117
|
+
style={style}
|
|
118
|
+
accessibilityElementsHidden
|
|
119
|
+
aria-hidden
|
|
120
|
+
{...props}
|
|
121
|
+
>
|
|
122
|
+
{children}
|
|
123
|
+
</Slot>
|
|
124
|
+
) : (
|
|
125
|
+
<Icon
|
|
126
|
+
as={as}
|
|
127
|
+
className={computedClassName}
|
|
128
|
+
style={style}
|
|
129
|
+
accessibilityElementsHidden
|
|
130
|
+
aria-hidden
|
|
131
|
+
{...props}
|
|
132
|
+
/>
|
|
133
|
+
)}
|
|
134
|
+
</View>
|
|
135
|
+
);
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
ColorSwatchPickerIndicator.displayName = 'ColorSwatchPicker.Indicator';
|
|
139
|
+
|
|
140
|
+
type ColorSwatchPickerCompoundComponent = typeof ColorSwatchPickerRoot & {
|
|
141
|
+
Item: typeof ColorSwatchPickerItem;
|
|
142
|
+
Swatch: typeof ColorSwatchPickerSwatch;
|
|
143
|
+
Indicator: typeof ColorSwatchPickerIndicator;
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
export const ColorSwatchPicker = Object.assign(ColorSwatchPickerRoot, {
|
|
147
|
+
Item: ColorSwatchPickerItem,
|
|
148
|
+
Swatch: ColorSwatchPickerSwatch,
|
|
149
|
+
Indicator: ColorSwatchPickerIndicator,
|
|
150
|
+
}) as ColorSwatchPickerCompoundComponent;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Platform } from 'react-native';
|
|
2
|
+
import { cva } from '@cdx-ui/utils';
|
|
3
|
+
import { DISABLED_CURSOR, TRANSITION_COLORS } from '../../styles/constants';
|
|
4
|
+
|
|
5
|
+
export const colorSwatchPickerVariants = cva([
|
|
6
|
+
'w-full flex-row flex-wrap justify-center gap-x-1 gap-y-2',
|
|
7
|
+
]);
|
|
8
|
+
|
|
9
|
+
export const colorSwatchPickerItemVariants = cva([
|
|
10
|
+
'relative min-h-11 min-w-11 items-center justify-center',
|
|
11
|
+
'rounded-[var(--border-radius-default)]',
|
|
12
|
+
TRANSITION_COLORS,
|
|
13
|
+
DISABLED_CURSOR,
|
|
14
|
+
'data-[disabled=true]:opacity-[var(--opacity-disabled)]',
|
|
15
|
+
'web:outline-none',
|
|
16
|
+
'web:data-[focus-visible=true]:ring-2',
|
|
17
|
+
'web:data-[focus-visible=true]:ring-stroke-focus',
|
|
18
|
+
'web:data-[focus-visible=true]:ring-offset-2',
|
|
19
|
+
Platform.select({
|
|
20
|
+
default: 'data-[active=true]:bg-surface-action-tint-active',
|
|
21
|
+
web: [
|
|
22
|
+
'data-[hover=true]:bg-surface-action-tint-hover',
|
|
23
|
+
'data-[active=true]:data-[hover=true]:bg-surface-action-tint-active',
|
|
24
|
+
].join(' '),
|
|
25
|
+
}),
|
|
26
|
+
]);
|
|
27
|
+
|
|
28
|
+
export const colorSwatchPickerIndicatorVariants = cva([
|
|
29
|
+
'pointer-events-none absolute inset-0 z-10 items-center justify-center',
|
|
30
|
+
]);
|
|
31
|
+
|
|
32
|
+
export const colorSwatchPickerIndicatorIconVariants = cva('size-4 text-[var(--color-white)]');
|
|
@@ -40,9 +40,9 @@ export interface CurrencyInputProps
|
|
|
40
40
|
TextInputProps,
|
|
41
41
|
'accessibilityLabel' | 'accessibilityHint' | 'testID' | 'onFocus' | 'onBlur' | 'returnKeyType'
|
|
42
42
|
> {
|
|
43
|
-
/** Current
|
|
43
|
+
/** Current amount in major currency units, not cents. Renders a formatted zero when omitted or null. */
|
|
44
44
|
value?: number;
|
|
45
|
-
/** Called with the parsed
|
|
45
|
+
/** Called with the parsed amount in major currency units, not cents, when the user edits the field. */
|
|
46
46
|
onChangeValue?: (value: number) => void;
|
|
47
47
|
/** Currency symbol rendered as an inline prefix. Defaults to `"$"`. */
|
|
48
48
|
currencySymbol?: string;
|
|
@@ -95,6 +95,7 @@ const AnimatedOverlay = Animated.createAnimatedComponent(DialogOverlayPrimitive)
|
|
|
95
95
|
export interface DialogRootProps
|
|
96
96
|
extends Omit<ViewProps, 'children' | 'role'>, IDialogRootProps, DialogVariantProps {
|
|
97
97
|
className?: string;
|
|
98
|
+
/** Pass `'disable-all'` to turn off enter/exit and swipe animations for the popup and overlay. */
|
|
98
99
|
animation?: AnimationRootDisableAll;
|
|
99
100
|
}
|
|
100
101
|
|
|
@@ -174,7 +175,16 @@ export interface DialogPopupProps
|
|
|
174
175
|
extends Omit<IDialogContentProps, 'asChild'>, Pick<DialogVariantProps, 'size'> {
|
|
175
176
|
className?: string;
|
|
176
177
|
children?: ReactNode;
|
|
178
|
+
/**
|
|
179
|
+
* On iOS, render in a plain `View` instead of `FullWindowOverlay`. Re-enables
|
|
180
|
+
* the element inspector, but the popup no longer layers above native modals.
|
|
181
|
+
* @default false
|
|
182
|
+
*/
|
|
177
183
|
disableFullWindowOverlay?: boolean;
|
|
184
|
+
/**
|
|
185
|
+
* Allow swipe-down to dismiss. Native only; no effect on web.
|
|
186
|
+
* @default true
|
|
187
|
+
*/
|
|
178
188
|
isSwipeable?: boolean;
|
|
179
189
|
/**
|
|
180
190
|
* Stacking order for the portal overlay layer (backdrop + popup panel).
|
|
@@ -141,6 +141,7 @@ export const dialogCloseIconVariants = cva(['size-5 text-content-tertiary']);
|
|
|
141
141
|
// ── Exported types ──────────────────────────────────────────
|
|
142
142
|
|
|
143
143
|
export type DialogVariantProps = VariantProps<typeof dialogPopupVariants> & {
|
|
144
|
+
/** Removes horizontal padding from `Dialog.Content`. @default false */
|
|
144
145
|
fullBleed?: boolean;
|
|
145
146
|
};
|
|
146
147
|
|
|
@@ -15,10 +15,15 @@ export interface DividerProps extends ViewProps {
|
|
|
15
15
|
className?: string;
|
|
16
16
|
/** Renders a vertical divider instead of the default horizontal orientation. */
|
|
17
17
|
vertical?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* When present, splits the divider into line, content, line.
|
|
20
|
+
* Use `Divider.Label` so the label receives the correct typography and accessibility treatment.
|
|
21
|
+
*/
|
|
18
22
|
children?: ReactNode;
|
|
19
23
|
}
|
|
20
24
|
|
|
21
|
-
export interface DividerLabelProps extends TextProps {
|
|
25
|
+
export interface DividerLabelProps extends Omit<TextProps, 'color'> {
|
|
26
|
+
/** Renders the consumer's child element in place of the default `Text` host. */
|
|
22
27
|
asChild?: boolean;
|
|
23
28
|
className?: string;
|
|
24
29
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Easing, Keyframe } from 'react-native-reanimated';
|
|
2
|
+
|
|
3
|
+
export const FULL_SCREEN_DIALOG_ENTER_MS = 300;
|
|
4
|
+
export const FULL_SCREEN_DIALOG_EXIT_MS = 220;
|
|
5
|
+
export const WEB_TRANSITION_SAFETY_MS = FULL_SCREEN_DIALOG_ENTER_MS + 100;
|
|
6
|
+
|
|
7
|
+
const ENTER_EASING = Easing.bezier(0.32, 0.72, 0, 1);
|
|
8
|
+
const EXIT_EASING = Easing.bezier(0.4, 0, 1, 1);
|
|
9
|
+
|
|
10
|
+
/** Native slide-up surface motion. `offscreen` is the distance below the viewport to start from. */
|
|
11
|
+
export function getFullScreenDialogSurfaceMotion(offscreen: number) {
|
|
12
|
+
return {
|
|
13
|
+
entering: new Keyframe({
|
|
14
|
+
0: { transform: [{ translateY: offscreen }] },
|
|
15
|
+
100: { transform: [{ translateY: 0 }], easing: ENTER_EASING },
|
|
16
|
+
}).duration(FULL_SCREEN_DIALOG_ENTER_MS),
|
|
17
|
+
exiting: new Keyframe({
|
|
18
|
+
0: { transform: [{ translateY: 0 }] },
|
|
19
|
+
100: { transform: [{ translateY: offscreen }], easing: EXIT_EASING },
|
|
20
|
+
}).duration(FULL_SCREEN_DIALOG_EXIT_MS),
|
|
21
|
+
};
|
|
22
|
+
}
|