@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
|
@@ -19,6 +19,7 @@ import {
|
|
|
19
19
|
listItemSectionHeaderVariants,
|
|
20
20
|
listItemTitleVariants,
|
|
21
21
|
listItemTrailingSlotVariants,
|
|
22
|
+
type ListItemSectionHeaderVariantProps,
|
|
22
23
|
type ListItemVariantProps,
|
|
23
24
|
} from './styles';
|
|
24
25
|
|
|
@@ -34,6 +35,28 @@ const useListItemStyleContext = (): Pick<ListItemVariantProps, 'crossAlign'> =>
|
|
|
34
35
|
// =============================================================================
|
|
35
36
|
|
|
36
37
|
export interface ListItemProps extends Omit<IListItemProps, 'crossAlign'>, ListItemVariantProps {
|
|
38
|
+
/**
|
|
39
|
+
* Vertical density. `compact` reduces padding and min-height; typography stays the same.
|
|
40
|
+
* @default 'default'
|
|
41
|
+
* @remarks `'default' | 'compact'`
|
|
42
|
+
* @fumadocsType `'default' | 'compact'`
|
|
43
|
+
*/
|
|
44
|
+
size?: 'default' | 'compact' | null | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* Bottom border between rows. Set `false` on the last row to avoid a trailing border.
|
|
47
|
+
* @default true
|
|
48
|
+
* @remarks `boolean`
|
|
49
|
+
* @fumadocsType `boolean`
|
|
50
|
+
*/
|
|
51
|
+
showSeparator?: boolean | null | undefined;
|
|
52
|
+
/**
|
|
53
|
+
* Vertical alignment of the leading, content, and trailing slots.
|
|
54
|
+
* `start` top-aligns them so trailing text lines up with the title.
|
|
55
|
+
* @default 'center'
|
|
56
|
+
* @remarks `'center' | 'start'`
|
|
57
|
+
* @fumadocsType `'center' | 'start'`
|
|
58
|
+
*/
|
|
59
|
+
crossAlign?: 'center' | 'start' | null | undefined;
|
|
37
60
|
className?: string;
|
|
38
61
|
}
|
|
39
62
|
|
|
@@ -82,6 +105,7 @@ ListItemRoot.displayName = 'ListItem';
|
|
|
82
105
|
const leadingSlotStyle = { flexShrink: 0 as const };
|
|
83
106
|
|
|
84
107
|
export interface ListItemLeadingSlotProps extends ViewProps {
|
|
108
|
+
/** Renders the consumer's child element in place of the default `View` host. */
|
|
85
109
|
asChild?: boolean;
|
|
86
110
|
className?: string;
|
|
87
111
|
/**
|
|
@@ -119,6 +143,7 @@ const contentStyle = {
|
|
|
119
143
|
};
|
|
120
144
|
|
|
121
145
|
export interface ListItemContentProps extends ViewProps {
|
|
146
|
+
/** Renders the consumer's child element in place of the default `View` host. */
|
|
122
147
|
asChild?: boolean;
|
|
123
148
|
className?: string;
|
|
124
149
|
}
|
|
@@ -143,6 +168,7 @@ const ListItemContent = forwardRef<View, ListItemContentProps>(
|
|
|
143
168
|
ListItemContent.displayName = 'ListItem.Content';
|
|
144
169
|
|
|
145
170
|
export interface ListItemTitleProps extends TextProps {
|
|
171
|
+
/** Renders the consumer's child element in place of the default `Text` host. */
|
|
146
172
|
asChild?: boolean;
|
|
147
173
|
className?: string;
|
|
148
174
|
}
|
|
@@ -166,6 +192,7 @@ const ListItemTitle = forwardRef<Text, ListItemTitleProps>(
|
|
|
166
192
|
ListItemTitle.displayName = 'ListItem.Title';
|
|
167
193
|
|
|
168
194
|
export interface ListItemDescriptionProps extends TextProps {
|
|
195
|
+
/** Renders the consumer's child element in place of the default `Text` host. */
|
|
169
196
|
asChild?: boolean;
|
|
170
197
|
className?: string;
|
|
171
198
|
}
|
|
@@ -188,6 +215,7 @@ const ListItemDescription = forwardRef<Text, ListItemDescriptionProps>(
|
|
|
188
215
|
ListItemDescription.displayName = 'ListItem.Description';
|
|
189
216
|
|
|
190
217
|
export interface ListItemMetaProps extends TextProps {
|
|
218
|
+
/** Renders the consumer's child element in place of the default `Text` host. */
|
|
191
219
|
asChild?: boolean;
|
|
192
220
|
className?: string;
|
|
193
221
|
}
|
|
@@ -211,6 +239,7 @@ const ListItemMeta = forwardRef<Text, ListItemMetaProps>(
|
|
|
211
239
|
ListItemMeta.displayName = 'ListItem.Meta';
|
|
212
240
|
|
|
213
241
|
export interface ListItemTrailingSlotProps extends ViewProps {
|
|
242
|
+
/** Renders the consumer's child element in place of the default `View` host. */
|
|
214
243
|
asChild?: boolean;
|
|
215
244
|
className?: string;
|
|
216
245
|
}
|
|
@@ -267,15 +296,29 @@ const sectionHeaderTrailingCell = {
|
|
|
267
296
|
alignSelf: 'center' as const,
|
|
268
297
|
};
|
|
269
298
|
|
|
299
|
+
export type ListItemSectionHeaderVariant = NonNullable<
|
|
300
|
+
ListItemSectionHeaderVariantProps['variant']
|
|
301
|
+
>;
|
|
302
|
+
|
|
270
303
|
export interface ListItemSectionHeaderProps extends ViewProps {
|
|
304
|
+
/** Renders the consumer's child element in place of the default `View` host. */
|
|
271
305
|
asChild?: boolean;
|
|
272
306
|
className?: string;
|
|
273
|
-
/** Primary section label
|
|
307
|
+
/** Primary section label. String or number children are styled as an uppercase label. */
|
|
274
308
|
children: ReactNode;
|
|
275
309
|
/** Optional right-aligned adornment (e.g. section Chip). */
|
|
276
310
|
trailing?: ReactNode;
|
|
277
311
|
/**
|
|
278
|
-
*
|
|
312
|
+
* Background treatment. `ghost` has no fill and a bottom border; `subtle` adds a neutral fill
|
|
313
|
+
* (matching `subtle` on Avatar, Chip, and IconButton) and drops the bottom border.
|
|
314
|
+
* Label typography is the same for both.
|
|
315
|
+
* @default 'ghost'
|
|
316
|
+
* @remarks `'ghost' | 'subtle'`
|
|
317
|
+
* @fumadocsType `'ghost' | 'subtle'`
|
|
318
|
+
*/
|
|
319
|
+
variant?: ListItemSectionHeaderVariant;
|
|
320
|
+
/**
|
|
321
|
+
* Accent top border above the header.
|
|
279
322
|
* @default true
|
|
280
323
|
*/
|
|
281
324
|
showDivider?: boolean;
|
|
@@ -287,6 +330,7 @@ const ListItemSectionHeader = forwardRef<View, ListItemSectionHeaderProps>(
|
|
|
287
330
|
asChild,
|
|
288
331
|
children,
|
|
289
332
|
className,
|
|
333
|
+
variant = 'ghost',
|
|
290
334
|
showDivider = true,
|
|
291
335
|
style,
|
|
292
336
|
trailing,
|
|
@@ -300,7 +344,7 @@ const ListItemSectionHeader = forwardRef<View, ListItemSectionHeaderProps>(
|
|
|
300
344
|
<Comp
|
|
301
345
|
ref={ref}
|
|
302
346
|
accessibilityRole={accessibilityRole}
|
|
303
|
-
className={cn(listItemSectionHeaderVariants({ showDivider }), className)}
|
|
347
|
+
className={cn(listItemSectionHeaderVariants({ variant, showDivider }), className)}
|
|
304
348
|
style={[sectionHeaderRow, style]}
|
|
305
349
|
{...props}
|
|
306
350
|
{...mergeDataAttributes(
|
|
@@ -341,7 +385,7 @@ export const ListItem = Object.assign(ListItemRoot, {
|
|
|
341
385
|
SectionHeader: ListItemSectionHeader,
|
|
342
386
|
}) as ListItemCompound;
|
|
343
387
|
|
|
344
|
-
export type { ListItemCrossAlign, ListItemVariantProps };
|
|
388
|
+
export type { ListItemCrossAlign, ListItemSectionHeaderVariantProps, ListItemVariantProps };
|
|
345
389
|
export {
|
|
346
390
|
listItemContentVariants,
|
|
347
391
|
listItemDescriptionVariants,
|
|
@@ -110,12 +110,18 @@ export const listItemSectionHeaderVariants = cva(
|
|
|
110
110
|
],
|
|
111
111
|
{
|
|
112
112
|
variants: {
|
|
113
|
+
variant: {
|
|
114
|
+
ghost: [],
|
|
115
|
+
// The fill separates the header from its rows, so the bottom border is dropped.
|
|
116
|
+
subtle: 'bg-surface-neutral-subtle border-b-0',
|
|
117
|
+
},
|
|
113
118
|
showDivider: {
|
|
114
119
|
true: ['border-t-4 border-solid border-t-surface-brand-strong/40', 'border-x-0'],
|
|
115
120
|
false: 'border-t-0',
|
|
116
121
|
},
|
|
117
122
|
},
|
|
118
123
|
defaultVariants: {
|
|
124
|
+
variant: 'ghost',
|
|
119
125
|
showDivider: true,
|
|
120
126
|
},
|
|
121
127
|
},
|
|
@@ -127,3 +133,4 @@ export const listItemSectionHeaderLabelVariants = cva(
|
|
|
127
133
|
);
|
|
128
134
|
|
|
129
135
|
export type ListItemVariantProps = VariantProps<typeof listItemRootVariants>;
|
|
136
|
+
export type ListItemSectionHeaderVariantProps = VariantProps<typeof listItemSectionHeaderVariants>;
|
|
@@ -422,7 +422,7 @@ const MenuItemLabel = forwardRef<Text, MenuItemLabelProps>(
|
|
|
422
422
|
|
|
423
423
|
MenuItemLabel.displayName = 'Menu.ItemLabel';
|
|
424
424
|
|
|
425
|
-
export interface MenuItemIconProps extends Omit<IconProps, 'as' | 'children'> {
|
|
425
|
+
export interface MenuItemIconProps extends Omit<IconProps, 'as' | 'children' | 'color'> {
|
|
426
426
|
asChild?: boolean;
|
|
427
427
|
as?: IconProps['as'];
|
|
428
428
|
position?: IconSlotPosition;
|
|
@@ -508,7 +508,7 @@ const MenuItemShortcut = forwardRef<Text, MenuItemShortcutProps>(
|
|
|
508
508
|
|
|
509
509
|
MenuItemShortcut.displayName = 'Menu.ItemShortcut';
|
|
510
510
|
|
|
511
|
-
export interface MenuItemIndicatorProps extends Omit<IconProps, 'as' | 'children'> {
|
|
511
|
+
export interface MenuItemIndicatorProps extends Omit<IconProps, 'as' | 'children' | 'color'> {
|
|
512
512
|
asChild?: boolean;
|
|
513
513
|
as?: IconProps['as'];
|
|
514
514
|
isChecked?: boolean;
|
|
@@ -8,18 +8,25 @@ import {
|
|
|
8
8
|
} from './styles';
|
|
9
9
|
|
|
10
10
|
export interface ProgressSegmentedProps extends ViewProps, ProgressSegmentedVariants {
|
|
11
|
-
/**
|
|
11
|
+
/**
|
|
12
|
+
* Current step (1-based index into the segment count).
|
|
13
|
+
* Clamped to `[0, segments]` (`0` leaves every segment incomplete).
|
|
14
|
+
*/
|
|
12
15
|
readonly step: number;
|
|
13
16
|
/**
|
|
14
17
|
* Number of segments in the bar. Matches the Figma `segments` variant (2–6 in the design
|
|
15
18
|
* system file); the prop accepts any positive integer for backward compatibility.
|
|
19
|
+
* @default 5
|
|
16
20
|
*/
|
|
17
21
|
readonly segments?: number;
|
|
18
|
-
/**
|
|
22
|
+
/**
|
|
23
|
+
* When true, the current step segment is marked as complete rather than in-progress.
|
|
24
|
+
* @default false
|
|
25
|
+
*/
|
|
19
26
|
readonly isStepComplete?: boolean;
|
|
20
27
|
/**
|
|
21
28
|
* Returns the accessibility value text announced by screen readers. Receives the clamped
|
|
22
|
-
* step, segment count, and whether the step is complete.
|
|
29
|
+
* step, segment count, and whether the step is complete. Replaces the English default.
|
|
23
30
|
*/
|
|
24
31
|
readonly getAccessibilityText?: (
|
|
25
32
|
step: number,
|
|
@@ -180,6 +180,7 @@ export interface RadioGroupProps extends ViewProps {
|
|
|
180
180
|
isDisabled?: boolean;
|
|
181
181
|
isInvalid?: boolean;
|
|
182
182
|
isRequired?: boolean;
|
|
183
|
+
/** Makes every radio in the group read-only. Items stay focusable, but the selection cannot be changed. */
|
|
183
184
|
isReadOnly?: boolean;
|
|
184
185
|
direction?: 'column' | 'row';
|
|
185
186
|
name?: string;
|
|
@@ -10,8 +10,16 @@ export type ScopedThemeProps = ComponentProps<typeof UniwindScopedTheme>;
|
|
|
10
10
|
*
|
|
11
11
|
* Wraps Uniwind's `ScopedTheme` to keep `uniwind` an internal implementation detail.
|
|
12
12
|
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
13
|
+
* On web, the consuming app's `global.css` must include
|
|
14
|
+
* `@custom-variant dark (&:where(.dark, .dark *));`. Without that directive,
|
|
15
|
+
* `theme="dark"` does not flip CSS variables. Native applies the scoped theme
|
|
16
|
+
* through React context and does not use the directive.
|
|
17
|
+
*
|
|
18
|
+
* On web, `theme="dark"` forces dark tokens inside a light app. `theme="light"`
|
|
19
|
+
* applies when no `.dark` ancestor is present; there is no `@custom-variant light`
|
|
20
|
+
* to override one. Native honors either value through context.
|
|
21
|
+
*
|
|
22
|
+
* Pass a static `theme`. Changing `theme` on an already-mounted instance can leave
|
|
23
|
+
* stale styles; remount to switch.
|
|
16
24
|
*/
|
|
17
25
|
export const ScopedTheme = (props: ScopedThemeProps) => <UniwindScopedTheme {...props} />;
|
|
@@ -191,7 +191,7 @@ SelectValue.displayName = 'Select.Value';
|
|
|
191
191
|
// STYLED ICON (styled-only, reads context for state=open / invalid)
|
|
192
192
|
// =============================================================================
|
|
193
193
|
|
|
194
|
-
export interface SelectIconProps extends Omit<IconProps, 'children' | 'as'> {
|
|
194
|
+
export interface SelectIconProps extends Omit<IconProps, 'children' | 'as' | 'color'> {
|
|
195
195
|
asChild?: boolean;
|
|
196
196
|
/**
|
|
197
197
|
* Forge icon component to render. Required unless `asChild` is set, in which
|
|
@@ -12,7 +12,11 @@ import { skeletonVariants } from './styles';
|
|
|
12
12
|
|
|
13
13
|
export interface SkeletonProps extends ViewProps {
|
|
14
14
|
className?: string;
|
|
15
|
-
/**
|
|
15
|
+
/**
|
|
16
|
+
* Half-cycle of the opacity pulse (`1` → `0.35`) in milliseconds.
|
|
17
|
+
* A full pulse takes `duration × 2`.
|
|
18
|
+
* @default 1000
|
|
19
|
+
*/
|
|
16
20
|
duration?: number;
|
|
17
21
|
}
|
|
18
22
|
|
|
@@ -6,7 +6,13 @@ import { hStackRootVariants, type StackSpace } from './styles';
|
|
|
6
6
|
|
|
7
7
|
export interface HStackProps extends ViewProps {
|
|
8
8
|
className?: string;
|
|
9
|
+
/** Token-based gap between children. */
|
|
9
10
|
space?: StackSpace;
|
|
11
|
+
/**
|
|
12
|
+
* Reverses the visual order of children along the stack axis.
|
|
13
|
+
* Source order and screen-reader order stay unchanged.
|
|
14
|
+
* @default false
|
|
15
|
+
*/
|
|
10
16
|
reversed?: boolean;
|
|
11
17
|
}
|
|
12
18
|
|
|
@@ -6,7 +6,13 @@ import { vStackRootVariants, type StackSpace } from './styles';
|
|
|
6
6
|
|
|
7
7
|
export interface VStackProps extends ViewProps {
|
|
8
8
|
className?: string;
|
|
9
|
+
/** Token-based gap between children. */
|
|
9
10
|
space?: StackSpace;
|
|
11
|
+
/**
|
|
12
|
+
* Reverses the visual order of children along the stack axis.
|
|
13
|
+
* Source order and screen-reader order stay unchanged.
|
|
14
|
+
* @default false
|
|
15
|
+
*/
|
|
10
16
|
reversed?: boolean;
|
|
11
17
|
}
|
|
12
18
|
|
|
@@ -10,7 +10,7 @@ import { BaseSwitch } from './BaseSwitch';
|
|
|
10
10
|
|
|
11
11
|
export interface SwitchProps extends ISwitchProps {
|
|
12
12
|
/**
|
|
13
|
-
* Track and thumb size.
|
|
13
|
+
* Track and thumb size on web. iOS and Android render the system switch, so `size` has no effect.
|
|
14
14
|
* @default 'md'
|
|
15
15
|
*/
|
|
16
16
|
size?: 'sm' | 'md' | 'lg';
|
|
@@ -154,8 +154,8 @@ export interface TabsListProps extends ITabsListProps {
|
|
|
154
154
|
className?: string;
|
|
155
155
|
/**
|
|
156
156
|
* When `orientation="horizontal"`, scroll tab triggers if they overflow the list width.
|
|
157
|
-
*
|
|
158
|
-
*
|
|
157
|
+
* On native, selecting a tab scrolls it into view. On web, edge fades and paging
|
|
158
|
+
* controls appear when more tabs are off-screen. Vertical lists do not scroll.
|
|
159
159
|
* @default true
|
|
160
160
|
*/
|
|
161
161
|
scrollable?: boolean;
|
|
@@ -1,16 +1,43 @@
|
|
|
1
1
|
import { forwardRef, type ComponentPropsWithoutRef, type ComponentRef } from 'react';
|
|
2
2
|
import { Text as RNText } from 'react-native';
|
|
3
|
+
import { useHasTextAncestor } from '@cdx-ui/primitives';
|
|
3
4
|
import { cn } from '@cdx-ui/utils';
|
|
4
|
-
import { textStyle, TextVariantProps } from './styles';
|
|
5
|
+
import { nestedTextStyle, textStyle, type TextVariantProps } from './styles';
|
|
5
6
|
|
|
6
|
-
export type
|
|
7
|
-
|
|
7
|
+
export type TextColor = NonNullable<TextVariantProps['color']>;
|
|
8
|
+
export type TextSize = NonNullable<TextVariantProps['size']>;
|
|
9
|
+
export type TextWeight = NonNullable<TextVariantProps['weight']>;
|
|
10
|
+
|
|
11
|
+
export type TextProps = Omit<TextVariantProps, 'color' | 'size' | 'weight'> &
|
|
12
|
+
ComponentPropsWithoutRef<typeof RNText> & {
|
|
13
|
+
/**
|
|
14
|
+
* Semantic content color, mapped to the matching `text-content-*` token.
|
|
15
|
+
* A `Text` nested inside another text element inherits its parent's color when omitted.
|
|
16
|
+
* @default 'primary'
|
|
17
|
+
*/
|
|
18
|
+
color?: TextColor;
|
|
19
|
+
/**
|
|
20
|
+
* Body typography style. A nested `Text` inherits its parent's size when omitted, and
|
|
21
|
+
* setting it keeps the parent's font family and weight.
|
|
22
|
+
* @default 'md'
|
|
23
|
+
*/
|
|
24
|
+
size?: TextSize;
|
|
25
|
+
/**
|
|
26
|
+
* Font weight. A nested `Text` inherits its parent's weight when omitted.
|
|
27
|
+
* @default 'normal'
|
|
28
|
+
*/
|
|
29
|
+
weight?: TextWeight;
|
|
30
|
+
className?: string;
|
|
31
|
+
};
|
|
8
32
|
|
|
9
33
|
export const Text = forwardRef<ComponentRef<typeof RNText>, TextProps>(function Text(
|
|
10
|
-
{ className, size
|
|
34
|
+
{ className, color, size, weight, italic, ...props },
|
|
11
35
|
ref,
|
|
12
36
|
) {
|
|
13
|
-
|
|
37
|
+
const variants = { color, size, weight, italic };
|
|
38
|
+
const classes = useHasTextAncestor() ? nestedTextStyle(variants) : textStyle(variants);
|
|
39
|
+
|
|
40
|
+
return <RNText className={cn(classes, className)} {...props} ref={ref} />;
|
|
14
41
|
});
|
|
15
42
|
|
|
16
43
|
Text.displayName = 'Text';
|
|
@@ -1,9 +1,20 @@
|
|
|
1
1
|
import { Platform } from 'react-native';
|
|
2
2
|
import { cva, type VariantProps } from '@cdx-ui/utils';
|
|
3
|
+
import { CONTENT_COLOR } from '../../styles/constants';
|
|
4
|
+
|
|
5
|
+
const TEXT_WEIGHT = {
|
|
6
|
+
normal: 'font-normal',
|
|
7
|
+
medium: 'font-medium',
|
|
8
|
+
semibold: 'font-semibold',
|
|
9
|
+
bold: 'font-bold',
|
|
10
|
+
} as const;
|
|
11
|
+
|
|
12
|
+
const TEXT_ITALIC = {
|
|
13
|
+
true: 'italic',
|
|
14
|
+
} as const;
|
|
3
15
|
|
|
4
16
|
export const textStyle = cva(
|
|
5
17
|
[
|
|
6
|
-
'text-content-primary',
|
|
7
18
|
Platform.select({
|
|
8
19
|
web: 'font-body my-0 bg-transparent no-underline',
|
|
9
20
|
default: '',
|
|
@@ -11,6 +22,7 @@ export const textStyle = cva(
|
|
|
11
22
|
],
|
|
12
23
|
{
|
|
13
24
|
variants: {
|
|
25
|
+
color: CONTENT_COLOR,
|
|
14
26
|
size: {
|
|
15
27
|
xl: 'body-xl',
|
|
16
28
|
lg: 'body-lg',
|
|
@@ -18,8 +30,34 @@ export const textStyle = cva(
|
|
|
18
30
|
sm: 'body-sm',
|
|
19
31
|
xs: 'body-xs',
|
|
20
32
|
},
|
|
33
|
+
weight: TEXT_WEIGHT,
|
|
34
|
+
italic: TEXT_ITALIC,
|
|
35
|
+
},
|
|
36
|
+
defaultVariants: {
|
|
37
|
+
color: 'primary',
|
|
38
|
+
size: 'md',
|
|
39
|
+
weight: 'normal',
|
|
21
40
|
},
|
|
22
41
|
},
|
|
23
42
|
);
|
|
24
43
|
|
|
25
44
|
export type TextVariantProps = VariantProps<typeof textStyle>;
|
|
45
|
+
|
|
46
|
+
// A `Text` inside another text element emits only the props it is given, with no
|
|
47
|
+
// base classes or defaults, so everything it omits inherits from the parent. Its
|
|
48
|
+
// sizes use the `-size` companions of the body styles, which leave the font
|
|
49
|
+
// family and weight to inherit too.
|
|
50
|
+
export const nestedTextStyle = cva([], {
|
|
51
|
+
variants: {
|
|
52
|
+
color: CONTENT_COLOR,
|
|
53
|
+
size: {
|
|
54
|
+
xl: 'body-xl-size',
|
|
55
|
+
lg: 'body-lg-size',
|
|
56
|
+
md: 'body-md-size',
|
|
57
|
+
sm: 'body-sm-size',
|
|
58
|
+
xs: 'body-xs-size',
|
|
59
|
+
} satisfies Record<NonNullable<TextVariantProps['size']>, string>,
|
|
60
|
+
weight: TEXT_WEIGHT,
|
|
61
|
+
italic: TEXT_ITALIC,
|
|
62
|
+
},
|
|
63
|
+
});
|
|
@@ -40,6 +40,7 @@ export interface TextareaProps
|
|
|
40
40
|
Omit<TextInputProps, 'multiline' | 'children' | 'style'>,
|
|
41
41
|
IInputFieldProps,
|
|
42
42
|
TextareaVariantProps {
|
|
43
|
+
/** Additional Tailwind classes, applied to the root shell rather than the inner field. */
|
|
43
44
|
className?: string;
|
|
44
45
|
placeholderTextColorClassName?: string;
|
|
45
46
|
/** Initial / minimum visible rows. Defaults to 2 on web and 8 on native. */
|
|
@@ -66,11 +66,39 @@ const useTileGroupStyleContext = (): TileGroupStyleContext => {
|
|
|
66
66
|
*/
|
|
67
67
|
export interface TileGroupSingleProps extends ITileGroupSingleProps, TileGroupVariantProps {
|
|
68
68
|
className?: string;
|
|
69
|
+
/**
|
|
70
|
+
* Layout axis. `row` places tiles side by side.
|
|
71
|
+
* @default 'column'
|
|
72
|
+
* @remarks `'column' | 'row'`
|
|
73
|
+
* @fumadocsType `'column' | 'row'`
|
|
74
|
+
*/
|
|
75
|
+
direction?: 'column' | 'row' | null | undefined;
|
|
76
|
+
/**
|
|
77
|
+
* Gap between tiles. `none` removes it so rows touch.
|
|
78
|
+
* @default 'default'
|
|
79
|
+
* @remarks `'default' | 'none'`
|
|
80
|
+
* @fumadocsType `'default' | 'none'`
|
|
81
|
+
*/
|
|
82
|
+
spacing?: 'default' | 'none' | null | undefined;
|
|
69
83
|
/** Visual shape inherited by child `Tile`s. Per-tile `shape` overrides this. */
|
|
70
84
|
shape?: TileVariantProps['shape'];
|
|
71
85
|
}
|
|
72
86
|
export interface TileGroupMultipleProps extends ITileGroupMultipleProps, TileGroupVariantProps {
|
|
73
87
|
className?: string;
|
|
88
|
+
/**
|
|
89
|
+
* Layout axis. `row` places tiles side by side.
|
|
90
|
+
* @default 'column'
|
|
91
|
+
* @remarks `'column' | 'row'`
|
|
92
|
+
* @fumadocsType `'column' | 'row'`
|
|
93
|
+
*/
|
|
94
|
+
direction?: 'column' | 'row' | null | undefined;
|
|
95
|
+
/**
|
|
96
|
+
* Gap between tiles. `none` removes it so rows touch.
|
|
97
|
+
* @default 'default'
|
|
98
|
+
* @remarks `'default' | 'none'`
|
|
99
|
+
* @fumadocsType `'default' | 'none'`
|
|
100
|
+
*/
|
|
101
|
+
spacing?: 'default' | 'none' | null | undefined;
|
|
74
102
|
/** Visual shape inherited by child `Tile`s. Per-tile `shape` overrides this. */
|
|
75
103
|
shape?: TileVariantProps['shape'];
|
|
76
104
|
}
|
|
@@ -104,6 +132,21 @@ TileGroup.displayName = 'Tile.Group';
|
|
|
104
132
|
// =============================================================================
|
|
105
133
|
|
|
106
134
|
export interface TileProps extends ITileProps, TileVariantProps {
|
|
135
|
+
/**
|
|
136
|
+
* Visual shape. Overrides the shape inherited from `Tile.Group`.
|
|
137
|
+
* `card` is a bordered surface; `flat` is a borderless row.
|
|
138
|
+
* @default 'card'
|
|
139
|
+
* @remarks `'card' | 'flat'`
|
|
140
|
+
* @fumadocsType `'card' | 'flat'`
|
|
141
|
+
*/
|
|
142
|
+
shape?: 'card' | 'flat' | null | undefined;
|
|
143
|
+
/**
|
|
144
|
+
* Renders a bottom border. Omit it on the last row of a tight list.
|
|
145
|
+
* @default false
|
|
146
|
+
* @remarks `boolean`
|
|
147
|
+
* @fumadocsType `boolean`
|
|
148
|
+
*/
|
|
149
|
+
showSeparator?: boolean | null | undefined;
|
|
107
150
|
className?: string;
|
|
108
151
|
}
|
|
109
152
|
|
|
@@ -196,6 +239,11 @@ const noUnderlineStyle = { textDecorationLine: 'none' as const };
|
|
|
196
239
|
export interface TileTitleProps extends TextProps {
|
|
197
240
|
asChild?: boolean;
|
|
198
241
|
className?: string;
|
|
242
|
+
/**
|
|
243
|
+
* Maximum lines before the title truncates.
|
|
244
|
+
* @default 1
|
|
245
|
+
*/
|
|
246
|
+
numberOfLines?: number;
|
|
199
247
|
}
|
|
200
248
|
|
|
201
249
|
const TileTitle = forwardRef<Text, TileTitleProps>(
|
|
@@ -276,6 +324,7 @@ const indicatorStyle = { flexShrink: 0 as const, pointerEvents: 'none' as const
|
|
|
276
324
|
export interface TileIndicatorProps extends ITileIndicatorProps {
|
|
277
325
|
asChild?: boolean;
|
|
278
326
|
className?: string;
|
|
327
|
+
/** Replaces the default radio or checkbox visual when provided. */
|
|
279
328
|
children?: ReactNode;
|
|
280
329
|
}
|
|
281
330
|
|