@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
|
@@ -1,12 +1,21 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
import { useCallback, useContext, useEffect, useMemo, useRef } from 'react';
|
|
3
|
-
import { Platform, View } from 'react-native';
|
|
3
|
+
import { Platform, StyleSheet, View } from 'react-native';
|
|
4
4
|
import { SafeAreaInsetsContext, type EdgeInsets } from 'react-native-safe-area-context';
|
|
5
5
|
import { FullWindowOverlay, NOTIFICATION_OVERLAY_Z_INDEX } from '@cdx-ui/primitives';
|
|
6
6
|
import type { ToastInsets } from './types';
|
|
7
7
|
|
|
8
8
|
const ZERO_INSETS: EdgeInsets = { top: 0, bottom: 0, left: 0, right: 0 };
|
|
9
9
|
|
|
10
|
+
/**
|
|
11
|
+
* The viewport spans the whole window, so every full-size layer in it must let
|
|
12
|
+
* pointer events through to the page. React Native Web only expands `box-none`
|
|
13
|
+
* for `StyleSheet.create` styles, not inline style objects.
|
|
14
|
+
*/
|
|
15
|
+
export const passThroughStyles = StyleSheet.create({
|
|
16
|
+
boxNone: { pointerEvents: 'box-none' },
|
|
17
|
+
});
|
|
18
|
+
|
|
10
19
|
interface InsetsContainerProps {
|
|
11
20
|
/**
|
|
12
21
|
* When true, uses a regular View instead of FullWindowOverlay on iOS.
|
|
@@ -41,6 +50,8 @@ interface InsetsContainerProps {
|
|
|
41
50
|
* Custom wrapper function to wrap the toast content
|
|
42
51
|
* Receives children and should return a component that wraps them
|
|
43
52
|
* The wrapper should apply flex: 1 (via className or style) to ensure proper layout
|
|
53
|
+
* and `pointerEvents: 'box-none'` (from a `StyleSheet.create` style) so it does not block
|
|
54
|
+
* interaction with the page behind
|
|
44
55
|
* Can be any component wrapper - KeyboardAvoidingView, View, or any custom component
|
|
45
56
|
*/
|
|
46
57
|
contentWrapper?: (children: ReactNode) => React.ReactElement;
|
|
@@ -199,20 +210,23 @@ export function InsetsContainer({
|
|
|
199
210
|
const content = (
|
|
200
211
|
<View
|
|
201
212
|
ref={containerRef}
|
|
202
|
-
className="absolute web:fixed inset-0
|
|
213
|
+
className="absolute web:fixed inset-0"
|
|
203
214
|
role="region"
|
|
204
215
|
aria-label={announceLabel}
|
|
205
216
|
{...(Platform.OS === 'web' && {
|
|
206
217
|
'aria-live': 'polite',
|
|
207
218
|
'aria-atomic': false,
|
|
208
219
|
})}
|
|
209
|
-
style={
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
220
|
+
style={[
|
|
221
|
+
passThroughStyles.boxNone,
|
|
222
|
+
{
|
|
223
|
+
...(Platform.OS === 'web' ? { zIndex: NOTIFICATION_OVERLAY_Z_INDEX } : {}),
|
|
224
|
+
paddingTop: finalInsets.top,
|
|
225
|
+
paddingBottom: finalInsets.bottom,
|
|
226
|
+
paddingLeft: finalInsets.left,
|
|
227
|
+
paddingRight: finalInsets.right,
|
|
228
|
+
},
|
|
229
|
+
]}
|
|
216
230
|
>
|
|
217
231
|
{contentWrapper ? contentWrapper(children) : children}
|
|
218
232
|
</View>
|
|
@@ -12,7 +12,7 @@ import { useSharedValue } from 'react-native-reanimated';
|
|
|
12
12
|
import { createPortalFn, useOverlayStackRegistration } from '@cdx-ui/primitives';
|
|
13
13
|
import { DefaultToast } from '../../components/Toast';
|
|
14
14
|
import type { ToastPlacement } from '../../components/Toast/types';
|
|
15
|
-
import { InsetsContainer } from './insets-container';
|
|
15
|
+
import { InsetsContainer, passThroughStyles } from './insets-container';
|
|
16
16
|
import { ToastLifecycleContext, type ToastLifecycleContextValue } from './lifecycle.context';
|
|
17
17
|
import { toastReducer } from './reducer';
|
|
18
18
|
import { ToastConfigContext } from './toast-config.context';
|
|
@@ -177,6 +177,7 @@ export function ToastProvider({
|
|
|
177
177
|
disableFullWindowOverlay = false,
|
|
178
178
|
unstable_accessibilityContainerViewIsModal,
|
|
179
179
|
announceLabel,
|
|
180
|
+
container,
|
|
180
181
|
}: Readonly<ToastProviderProps>) {
|
|
181
182
|
const [toasts, dispatch] = useReducer(toastReducer, []);
|
|
182
183
|
|
|
@@ -185,7 +186,19 @@ export function ToastProvider({
|
|
|
185
186
|
*/
|
|
186
187
|
const globalConfig = useMemo<ToastGlobalConfig | undefined>(() => defaultProps, [defaultProps]);
|
|
187
188
|
|
|
188
|
-
const
|
|
189
|
+
const usesWebPortal =
|
|
190
|
+
Platform.OS === 'web' && createPortalFn !== undefined && typeof document !== 'undefined';
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* A `null` container renders no viewport, so no toast can play its exit
|
|
194
|
+
* transition or be seen. Timers hold until it attaches, and hides remove
|
|
195
|
+
* directly instead of waiting on a transition that will never run.
|
|
196
|
+
*/
|
|
197
|
+
const isViewportDetached = usesWebPortal && container === null;
|
|
198
|
+
const viewportDetachedRef = useRef(isViewportDetached);
|
|
199
|
+
viewportDetachedRef.current = isViewportDetached;
|
|
200
|
+
|
|
201
|
+
const isToastVisible = toasts.length > 0 && !isViewportDetached;
|
|
189
202
|
|
|
190
203
|
const placementStacks = useToastPlacementStacks();
|
|
191
204
|
|
|
@@ -287,12 +300,13 @@ export function ToastProvider({
|
|
|
287
300
|
* On web this only marks toasts as `pendingRemoval` so their CSS exit
|
|
288
301
|
* transition can play; the actual removal happens when the toast
|
|
289
302
|
* component calls `remove(id)` on transition end.
|
|
290
|
-
* On native
|
|
291
|
-
* layout animation plays before
|
|
303
|
+
* On native, and on web while the container is `null`, this dispatches
|
|
304
|
+
* removal directly — Reanimated's `exiting` layout animation plays before
|
|
305
|
+
* unmount, and a detached web viewport has no transition to wait on.
|
|
292
306
|
*/
|
|
293
307
|
const hide = useCallback(
|
|
294
308
|
(ids?: (string & {}) | string[] | 'all') => {
|
|
295
|
-
const
|
|
309
|
+
const playsWebExit = Platform.OS === 'web' && !viewportDetachedRef.current;
|
|
296
310
|
|
|
297
311
|
if (ids === undefined) {
|
|
298
312
|
if (toasts.length === 0) return;
|
|
@@ -318,7 +332,7 @@ export function ToastProvider({
|
|
|
318
332
|
lastToast.onHide();
|
|
319
333
|
}
|
|
320
334
|
|
|
321
|
-
if (
|
|
335
|
+
if (playsWebExit) {
|
|
322
336
|
dispatch({ type: 'MARK_CLOSED', payload: { ids: [lastToast.id] } });
|
|
323
337
|
} else {
|
|
324
338
|
remove([lastToast.id]);
|
|
@@ -340,7 +354,7 @@ export function ToastProvider({
|
|
|
340
354
|
|
|
341
355
|
if (targetIds.length === 0) return;
|
|
342
356
|
|
|
343
|
-
if (
|
|
357
|
+
if (playsWebExit) {
|
|
344
358
|
dispatch({ type: 'MARK_CLOSED', payload: { ids: targetIds } });
|
|
345
359
|
} else {
|
|
346
360
|
remove(targetIds);
|
|
@@ -367,7 +381,7 @@ export function ToastProvider({
|
|
|
367
381
|
|
|
368
382
|
if (targetIds.length === 0) return;
|
|
369
383
|
|
|
370
|
-
if (
|
|
384
|
+
if (playsWebExit) {
|
|
371
385
|
dispatch({ type: 'MARK_CLOSED', payload: { ids: targetIds } });
|
|
372
386
|
} else {
|
|
373
387
|
remove(targetIds);
|
|
@@ -404,6 +418,7 @@ export function ToastProvider({
|
|
|
404
418
|
*/
|
|
405
419
|
const resumeAll = useCallback(() => {
|
|
406
420
|
pausedRef.current = false;
|
|
421
|
+
if (viewportDetachedRef.current) return;
|
|
407
422
|
|
|
408
423
|
const now = Date.now();
|
|
409
424
|
timersRef.current.forEach((entry, id) => {
|
|
@@ -421,6 +436,24 @@ export function ToastProvider({
|
|
|
421
436
|
});
|
|
422
437
|
}, []);
|
|
423
438
|
|
|
439
|
+
useEffect(() => {
|
|
440
|
+
if (isViewportDetached) {
|
|
441
|
+
pauseAll();
|
|
442
|
+
} else {
|
|
443
|
+
resumeAll();
|
|
444
|
+
}
|
|
445
|
+
}, [isViewportDetached, pauseAll, resumeAll]);
|
|
446
|
+
|
|
447
|
+
/**
|
|
448
|
+
* Detaching the container unmounts toasts mid-exit, and an unmounted toast
|
|
449
|
+
* never reports its transition end.
|
|
450
|
+
*/
|
|
451
|
+
useEffect(() => {
|
|
452
|
+
if (!isViewportDetached) return;
|
|
453
|
+
const pendingIds = toasts.filter((toast) => toast.pendingRemoval).map((toast) => toast.id);
|
|
454
|
+
if (pendingIds.length > 0) remove(pendingIds);
|
|
455
|
+
}, [isViewportDetached, remove, toasts]);
|
|
456
|
+
|
|
424
457
|
const lifecycleContextValue = useMemo<ToastLifecycleContextValue>(() => {
|
|
425
458
|
const pending = new Set<string>();
|
|
426
459
|
const frontmostByPlacement = new Map<ToastPlacement, string>();
|
|
@@ -541,7 +574,7 @@ export function ToastProvider({
|
|
|
541
574
|
};
|
|
542
575
|
timersRef.current.set(id, entry);
|
|
543
576
|
|
|
544
|
-
if (pausedRef.current) {
|
|
577
|
+
if (pausedRef.current || viewportDetachedRef.current) {
|
|
545
578
|
clearTimeout(timer);
|
|
546
579
|
entry.timer = null;
|
|
547
580
|
}
|
|
@@ -567,7 +600,7 @@ export function ToastProvider({
|
|
|
567
600
|
);
|
|
568
601
|
|
|
569
602
|
useOverlayStackRegistration({
|
|
570
|
-
active:
|
|
603
|
+
active: isToastVisible,
|
|
571
604
|
capabilities: [],
|
|
572
605
|
id: 'forge-ui-toast-viewport',
|
|
573
606
|
groupId: 'forge-ui-notifications',
|
|
@@ -595,7 +628,7 @@ export function ToastProvider({
|
|
|
595
628
|
resumeAll={resumeAll}
|
|
596
629
|
hide={hide}
|
|
597
630
|
>
|
|
598
|
-
<View className="flex-1">
|
|
631
|
+
<View className="flex-1" style={passThroughStyles.boxNone}>
|
|
599
632
|
{toasts.map((toastItem) => {
|
|
600
633
|
const placement = toastItem.placement;
|
|
601
634
|
const index = placementIndexes[placement];
|
|
@@ -619,10 +652,11 @@ export function ToastProvider({
|
|
|
619
652
|
</InsetsContainer>
|
|
620
653
|
) : null;
|
|
621
654
|
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
: toastViewport;
|
|
655
|
+
let renderedToastViewport: React.ReactNode = toastViewport;
|
|
656
|
+
if (usesWebPortal && toastViewport && createPortalFn) {
|
|
657
|
+
renderedToastViewport =
|
|
658
|
+
container === null ? null : createPortalFn(toastViewport, container ?? document.body);
|
|
659
|
+
}
|
|
626
660
|
|
|
627
661
|
return (
|
|
628
662
|
<ToastConfigContext.Provider value={globalConfig}>
|
|
@@ -79,16 +79,21 @@ export interface ToastProviderProps {
|
|
|
79
79
|
* Custom wrapper function to wrap the toast content
|
|
80
80
|
* Receives children and should return a component that wraps them
|
|
81
81
|
* The wrapper should apply flex: 1 (via className or style) to ensure proper layout
|
|
82
|
+
* and `pointerEvents: 'box-none'` so it does not block interaction with the page behind.
|
|
83
|
+
* On web, `box-none` only takes effect from a `StyleSheet.create` style, not an inline object.
|
|
82
84
|
* Can be any component wrapper - KeyboardAvoidingView, View, or any custom component
|
|
83
85
|
*
|
|
84
86
|
* @example
|
|
85
87
|
* ```tsx
|
|
88
|
+
* const styles = StyleSheet.create({ passThrough: { pointerEvents: 'box-none' } });
|
|
89
|
+
*
|
|
86
90
|
* <ToastProvider
|
|
87
91
|
* contentWrapper={(children) => (
|
|
88
92
|
* <KeyboardAvoidingView
|
|
89
93
|
* behavior="padding"
|
|
90
94
|
* keyboardVerticalOffset={24}
|
|
91
95
|
* className="flex-1"
|
|
96
|
+
* style={styles.passThrough}
|
|
92
97
|
* >
|
|
93
98
|
* {children}
|
|
94
99
|
* </KeyboardAvoidingView>
|
|
@@ -105,6 +110,16 @@ export interface ToastProviderProps {
|
|
|
105
110
|
* @platform web
|
|
106
111
|
*/
|
|
107
112
|
announceLabel?: string;
|
|
113
|
+
/**
|
|
114
|
+
* Element that receives the toast viewport instead of `document.body`.
|
|
115
|
+
*
|
|
116
|
+
* Use it to keep toasts inside an embedded surface, such as a device preview. The fixed
|
|
117
|
+
* viewport stays inside the container only when an ancestor of it creates a containing
|
|
118
|
+
* block for fixed descendants, for example through a `transform`. While `null`, such as
|
|
119
|
+
* before a callback ref attaches, no viewport renders.
|
|
120
|
+
* @platform web
|
|
121
|
+
*/
|
|
122
|
+
container?: Element | null;
|
|
108
123
|
/**
|
|
109
124
|
* Children to render
|
|
110
125
|
*/
|
|
@@ -170,8 +185,9 @@ export interface ToastShowConfig extends Pick<
|
|
|
170
185
|
*/
|
|
171
186
|
duration?: number | 'persistent';
|
|
172
187
|
/**
|
|
173
|
-
* Optional ID for the toast
|
|
174
|
-
* If
|
|
188
|
+
* Optional ID for the toast.
|
|
189
|
+
* If omitted, one is generated. If a toast with this id is already in the
|
|
190
|
+
* stack, `show` returns that id and does not add another.
|
|
175
191
|
*/
|
|
176
192
|
id?: string;
|
|
177
193
|
/**
|
|
@@ -221,8 +237,9 @@ export interface ToastShowConfig extends Pick<
|
|
|
221
237
|
*/
|
|
222
238
|
export interface ToastShowOptionsWithComponent {
|
|
223
239
|
/**
|
|
224
|
-
* Optional ID for the toast
|
|
225
|
-
* If
|
|
240
|
+
* Optional ID for the toast.
|
|
241
|
+
* If omitted, one is generated. If a toast with this id is already in the
|
|
242
|
+
* stack, `show` returns that id and does not add another.
|
|
226
243
|
*/
|
|
227
244
|
id?: string;
|
|
228
245
|
/**
|
package/src/styles/constants.ts
CHANGED
|
@@ -9,6 +9,19 @@ export const DISABLED_OPACITY = 'data-[disabled=true]:opacity-50';
|
|
|
9
9
|
export const DISABLED_CURSOR =
|
|
10
10
|
'data-[disabled=true]:cursor-not-allowed data-[disabled=true]:pointer-events-none';
|
|
11
11
|
|
|
12
|
+
// ─── Content color ───────────────────────────────────────
|
|
13
|
+
// The `color` variant shared by `Text` and `Icon`.
|
|
14
|
+
export const CONTENT_COLOR = {
|
|
15
|
+
primary: 'text-content-primary',
|
|
16
|
+
secondary: 'text-content-secondary',
|
|
17
|
+
tertiary: 'text-content-tertiary',
|
|
18
|
+
action: 'text-content-action',
|
|
19
|
+
danger: 'text-content-danger',
|
|
20
|
+
warning: 'text-content-warning',
|
|
21
|
+
success: 'text-content-success',
|
|
22
|
+
info: 'text-content-info',
|
|
23
|
+
} as const;
|
|
24
|
+
|
|
12
25
|
// Web-only iOS Safari focus-zoom guard. Figma Viewport=Narrow (<600px) uses body/lg
|
|
13
26
|
// (16px / 24px); Viewport=Wide (≥600px) keeps the size variant's original px size.
|
|
14
27
|
export const WEB_NARROW_FIELD_TEXT = 'web:max-[600px]:text-base web:max-[600px]:leading-normal';
|