@basic-ui/material 1.0.0-alpha.45 → 1.0.0-alpha.46
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/README.md +3 -3
- package/build/cjs/index.js +60 -15
- package/build/cjs/index.js.map +1 -1
- package/build/esm/Alert/Alert.d.ts +6 -6
- package/build/esm/Alert/index.d.ts +1 -1
- package/build/esm/Alert/index.js.map +1 -1
- package/build/esm/AppBar/AppBar.d.ts +9 -9
- package/build/esm/AppBar/AppBar.js.map +1 -1
- package/build/esm/AppBar/AppBarButton.d.ts +4 -4
- package/build/esm/AppBar/AppBarButton.js.map +1 -1
- package/build/esm/AppBar/context.d.ts +5 -5
- package/build/esm/AppBar/context.js.map +1 -1
- package/build/esm/AppBar/index.d.ts +3 -3
- package/build/esm/AppBar/index.js.map +1 -1
- package/build/esm/Badge/Badge.d.ts +6 -6
- package/build/esm/Badge/Badge.js.map +1 -1
- package/build/esm/Badge/index.d.ts +1 -1
- package/build/esm/Badge/index.js.map +1 -1
- package/build/esm/BaseLine/BaseLine.d.ts +1 -1
- package/build/esm/BaseLine/BaseLine.js +1 -1
- package/build/esm/BaseLine/BaseLine.js.map +1 -1
- package/build/esm/BaseLine/index.d.ts +1 -1
- package/build/esm/BaseLine/index.js.map +1 -1
- package/build/esm/BottomSheet/BottomSheet.d.ts +7 -7
- package/build/esm/BottomSheet/BottomSheet.js.map +1 -1
- package/build/esm/BottomSheet/BottomSheetSurface.d.ts +5 -5
- package/build/esm/BottomSheet/BottomSheetSurface.js.map +1 -1
- package/build/esm/BottomSheet/index.d.ts +1 -1
- package/build/esm/BottomSheet/index.js.map +1 -1
- package/build/esm/Box/Box.d.ts +23 -23
- package/build/esm/Box/Box.js +1 -1
- package/build/esm/Box/Box.js.map +1 -1
- package/build/esm/Box/index.d.ts +1 -1
- package/build/esm/Box/index.js.map +1 -1
- package/build/esm/Button/BaseButton.d.ts +7 -7
- package/build/esm/Button/Button.d.ts +13 -13
- package/build/esm/Button/ButtonGroup.d.ts +5 -5
- package/build/esm/Button/FilledButton.d.ts +11 -11
- package/build/esm/Button/FilledButton.js +17 -2
- package/build/esm/Button/FilledButton.js.map +1 -1
- package/build/esm/Button/FloatingActionButton.d.ts +7 -7
- package/build/esm/Button/FloatingActionButton.js.map +1 -1
- package/build/esm/Button/IconButton.d.ts +8 -8
- package/build/esm/Button/OutlinedButton.d.ts +4 -4
- package/build/esm/Button/OutlinedButton.js +17 -2
- package/build/esm/Button/OutlinedButton.js.map +1 -1
- package/build/esm/Button/TransparentButton.d.ts +11 -11
- package/build/esm/Button/TransparentButton.js +17 -2
- package/build/esm/Button/TransparentButton.js.map +1 -1
- package/build/esm/Button/context.d.ts +8 -8
- package/build/esm/Button/context.js.map +1 -1
- package/build/esm/Button/index.d.ts +2 -2
- package/build/esm/Button/index.js.map +1 -1
- package/build/esm/CheckBox/CheckBox.d.ts +13 -13
- package/build/esm/CheckBox/CheckBox.js.map +1 -1
- package/build/esm/CheckBox/CheckBoxIcon.d.ts +10 -10
- package/build/esm/CheckBox/CheckBoxIcon.js.map +1 -1
- package/build/esm/CheckBox/CheckPath.d.ts +3 -3
- package/build/esm/CheckBox/CheckPath.js +1 -1
- package/build/esm/CheckBox/CheckPath.js.map +1 -1
- package/build/esm/CheckBox/IndeterminatePath.d.ts +3 -3
- package/build/esm/CheckBox/IndeterminatePath.js +1 -1
- package/build/esm/CheckBox/IndeterminatePath.js.map +1 -1
- package/build/esm/CheckBox/index.d.ts +1 -1
- package/build/esm/CheckBox/index.js.map +1 -1
- package/build/esm/Chip/ButtonChip.d.ts +9 -9
- package/build/esm/Chip/ButtonChip.js.map +1 -1
- package/build/esm/Chip/Chip.d.ts +4 -4
- package/build/esm/Chip/Chip.js.map +1 -1
- package/build/esm/Chip/ChipBase.d.ts +10 -10
- package/build/esm/Chip/ChipBase.js.map +1 -1
- package/build/esm/Chip/ChoiceChip.d.ts +10 -10
- package/build/esm/Chip/ChoiceChip.js.map +1 -1
- package/build/esm/Chip/index.d.ts +2 -2
- package/build/esm/Chip/index.js.map +1 -1
- package/build/esm/Combobox/Combobox.d.ts +23 -23
- package/build/esm/Combobox/Combobox.js.map +1 -1
- package/build/esm/Combobox/index.d.ts +1 -1
- package/build/esm/Combobox/index.js.map +1 -1
- package/build/esm/Dialog/Dialog.d.ts +20 -20
- package/build/esm/Dialog/Dialog.js.map +1 -1
- package/build/esm/Dialog/DialogBackdrop.d.ts +7 -7
- package/build/esm/Dialog/DialogBackdrop.js.map +1 -1
- package/build/esm/Dialog/DialogContainer.d.ts +4 -4
- package/build/esm/Dialog/DialogContainer.js.map +1 -1
- package/build/esm/Dialog/DialogSurface.d.ts +7 -7
- package/build/esm/Dialog/DialogSurface.js.map +1 -1
- package/build/esm/Dialog/Scrim.d.ts +4 -4
- package/build/esm/Dialog/Scrim.js.map +1 -1
- package/build/esm/Dialog/index.d.ts +2 -2
- package/build/esm/Dialog/index.js.map +1 -1
- package/build/esm/Dialog/useDialogAnimation.d.ts +824 -824
- package/build/esm/Dialog/useDialogAnimation.js.map +1 -1
- package/build/esm/Divider/Divider.d.ts +7 -7
- package/build/esm/Divider/Divider.js.map +1 -1
- package/build/esm/Divider/index.d.ts +1 -1
- package/build/esm/Divider/index.js.map +1 -1
- package/build/esm/FloatingLabel/FloatingLabel.d.ts +13 -13
- package/build/esm/FloatingLabel/FloatingLabel.js.map +1 -1
- package/build/esm/FloatingLabel/index.d.ts +1 -1
- package/build/esm/FloatingLabel/index.js.map +1 -1
- package/build/esm/LineRipple/LineRipple.d.ts +9 -9
- package/build/esm/LineRipple/LineRipple.js.map +1 -1
- package/build/esm/LineRipple/index.d.ts +1 -1
- package/build/esm/LineRipple/index.js.map +1 -1
- package/build/esm/Link/Link.d.ts +9 -9
- package/build/esm/Link/Link.js.map +1 -1
- package/build/esm/Link/index.d.ts +1 -1
- package/build/esm/Link/index.js.map +1 -1
- package/build/esm/List/List.d.ts +8 -8
- package/build/esm/List/List.js.map +1 -1
- package/build/esm/List/index.d.ts +1 -1
- package/build/esm/List/index.js.map +1 -1
- package/build/esm/ListItem/ListItem.d.ts +14 -14
- package/build/esm/ListItem/ListItem.js.map +1 -1
- package/build/esm/ListItem/ListItemText.d.ts +7 -7
- package/build/esm/ListItem/ListItemText.js.map +1 -1
- package/build/esm/ListItem/index.d.ts +2 -2
- package/build/esm/ListItem/index.js.map +1 -1
- package/build/esm/Menu/Menu.d.ts +18 -18
- package/build/esm/Menu/Menu.js.map +1 -1
- package/build/esm/Menu/animation.d.ts +2 -2
- package/build/esm/Menu/animation.js.map +1 -1
- package/build/esm/Menu/index.d.ts +2 -2
- package/build/esm/Menu/index.js.map +1 -1
- package/build/esm/NavRail/NavRailItem.d.ts +15 -15
- package/build/esm/NavRail/NavRailItem.js.map +1 -1
- package/build/esm/NavRail/icons/test-icons.d.ts +4 -4
- package/build/esm/NavRail/icons/test-icons.js.map +1 -1
- package/build/esm/NavRail/index.d.ts +1 -1
- package/build/esm/NavRail/index.js.map +1 -1
- package/build/esm/NotchedOutline/NotchedOutline.d.ts +14 -14
- package/build/esm/NotchedOutline/NotchedOutline.js.map +1 -1
- package/build/esm/NotchedOutline/context.d.ts +6 -6
- package/build/esm/NotchedOutline/context.js.map +1 -1
- package/build/esm/NotchedOutline/index.d.ts +1 -1
- package/build/esm/NotchedOutline/index.js.map +1 -1
- package/build/esm/NotchedOutline/styledComponents.d.ts +575 -575
- package/build/esm/NotchedOutline/styledComponents.js +1 -1
- package/build/esm/NotchedOutline/styledComponents.js.map +1 -1
- package/build/esm/Paper/Paper.d.ts +11 -11
- package/build/esm/Paper/Paper.js.map +1 -1
- package/build/esm/Paper/index.d.ts +1 -1
- package/build/esm/Paper/index.js.map +1 -1
- package/build/esm/Popover/Popover.d.ts +14 -14
- package/build/esm/Popover/PopoverContainer.d.ts +4 -4
- package/build/esm/Popover/PopoverSurface.d.ts +5 -5
- package/build/esm/Popover/PopoverSurface.js.map +1 -1
- package/build/esm/Popover/index.d.ts +1 -1
- package/build/esm/Popover/index.js.map +1 -1
- package/build/esm/ProgressSpinner/ProgressSpinner.d.ts +8 -8
- package/build/esm/ProgressSpinner/ProgressSpinner.js.map +1 -1
- package/build/esm/ProgressSpinner/index.d.ts +1 -1
- package/build/esm/ProgressSpinner/index.js.map +1 -1
- package/build/esm/RadioButton/RadioButton.d.ts +4 -4
- package/build/esm/RadioButton/RadioButton.js.map +1 -1
- package/build/esm/RadioButton/RadioButtonIcon.d.ts +6 -6
- package/build/esm/RadioButton/RadioButtonIcon.js.map +1 -1
- package/build/esm/RadioButton/RadioGroup.d.ts +5 -5
- package/build/esm/RadioButton/RadioGroup.js.map +1 -1
- package/build/esm/RadioButton/index.d.ts +2 -2
- package/build/esm/RadioButton/index.js.map +1 -1
- package/build/esm/Ripple/Ripple.d.ts +11 -11
- package/build/esm/Ripple/Ripple.js +1 -1
- package/build/esm/Ripple/Ripple.js.map +1 -1
- package/build/esm/Ripple/RippleBox.d.ts +5 -5
- package/build/esm/Ripple/RippleBox.js.map +1 -1
- package/build/esm/Ripple/constants.d.ts +7 -7
- package/build/esm/Ripple/constants.js.map +1 -1
- package/build/esm/Ripple/index.d.ts +5 -5
- package/build/esm/Ripple/index.js.map +1 -1
- package/build/esm/Ripple/keyframes.d.ts +4 -4
- package/build/esm/Ripple/keyframes.js.map +1 -1
- package/build/esm/Ripple/useRipple.d.ts +14 -14
- package/build/esm/Ripple/useRipple.js.map +1 -1
- package/build/esm/Ripple/useRippleHandlers.d.ts +8 -8
- package/build/esm/Ripple/useRippleHandlers.js.map +1 -1
- package/build/esm/Ripple/useRippleSurface.d.ts +787 -787
- package/build/esm/Ripple/useRippleSurface.js.map +1 -1
- package/build/esm/Select/CustomContainerExample.d.ts +3 -3
- package/build/esm/Select/CustomContainerExample.js.map +1 -1
- package/build/esm/Select/Select.d.ts +32 -32
- package/build/esm/Select/Select.js.map +1 -1
- package/build/esm/Select/SelectIcon.d.ts +6 -6
- package/build/esm/Select/SelectIcon.js.map +1 -1
- package/build/esm/Select/context.d.ts +9 -9
- package/build/esm/Select/context.js.map +1 -1
- package/build/esm/Select/defaultRender.d.ts +3 -3
- package/build/esm/Select/defaultRender.js.map +1 -1
- package/build/esm/Select/index.d.ts +1 -1
- package/build/esm/Select/index.js.map +1 -1
- package/build/esm/Select/styledComponents.d.ts +15 -15
- package/build/esm/Select/styledComponents.js.map +1 -1
- package/build/esm/SelectItem/SelectItem.d.ts +11 -11
- package/build/esm/SelectItem/SelectItem.js.map +1 -1
- package/build/esm/SelectItem/index.d.ts +1 -1
- package/build/esm/SelectItem/index.js.map +1 -1
- package/build/esm/SelectionControl/SelectionControlLabel.d.ts +7 -7
- package/build/esm/SelectionControl/SelectionControlLabel.js.map +1 -1
- package/build/esm/SelectionControl/SelectionControlText.d.ts +8 -8
- package/build/esm/SelectionControl/SelectionControlText.js.map +1 -1
- package/build/esm/SelectionControl/index.d.ts +2 -2
- package/build/esm/SelectionControl/index.js.map +1 -1
- package/build/esm/Skeleton/DelayAppearance.d.ts +13 -13
- package/build/esm/Skeleton/DelayAppearance.js +3 -3
- package/build/esm/Skeleton/DelayAppearance.js.map +1 -1
- package/build/esm/Skeleton/Skeleton.d.ts +9 -9
- package/build/esm/Skeleton/Skeleton.js.map +1 -1
- package/build/esm/Skeleton/animation.d.ts +8 -8
- package/build/esm/Skeleton/animation.js.map +1 -1
- package/build/esm/Skeleton/index.d.ts +2 -2
- package/build/esm/Skeleton/index.js.map +1 -1
- package/build/esm/Slider/Slider.d.ts +17 -17
- package/build/esm/Slider/Slider.js.map +1 -1
- package/build/esm/Slider/index.d.ts +1 -1
- package/build/esm/Slider/index.js.map +1 -1
- package/build/esm/Snackbar/Snackbar.d.ts +8 -8
- package/build/esm/Snackbar/Stack.d.ts +31 -31
- package/build/esm/Snackbar/index.d.ts +3 -3
- package/build/esm/Snackbar/useSnackbarAnimation.d.ts +6 -6
- package/build/esm/Switch/Switch.d.ts +13 -13
- package/build/esm/Switch/Switch.js.map +1 -1
- package/build/esm/Switch/index.d.ts +1 -1
- package/build/esm/Switch/index.js.map +1 -1
- package/build/esm/Switch/styledComponents.d.ts +13 -13
- package/build/esm/Switch/styledComponents.js.map +1 -1
- package/build/esm/Tab/Tab.d.ts +5 -5
- package/build/esm/Tab/Tab.js.map +1 -1
- package/build/esm/Tab/TabList.d.ts +10 -10
- package/build/esm/Tab/TabList.js.map +1 -1
- package/build/esm/Tab/TabPanel.d.ts +5 -5
- package/build/esm/Tab/TabPanel.js.map +1 -1
- package/build/esm/Tab/TabPanels.d.ts +4 -4
- package/build/esm/Tab/TabPanels.js.map +1 -1
- package/build/esm/Tab/Tabs.d.ts +4 -4
- package/build/esm/Tab/Tabs.js.map +1 -1
- package/build/esm/Tab/context.d.ts +9 -9
- package/build/esm/Tab/context.js.map +1 -1
- package/build/esm/Tab/index.d.ts +5 -5
- package/build/esm/Tab/index.js.map +1 -1
- package/build/esm/TabIndicator/TabIndicator.d.ts +9 -9
- package/build/esm/TabIndicator/TabIndicator.js.map +1 -1
- package/build/esm/TabIndicator/context.d.ts +6 -6
- package/build/esm/TabIndicator/context.js.map +1 -1
- package/build/esm/TabIndicator/index.d.ts +2 -2
- package/build/esm/TabIndicator/index.js.map +1 -1
- package/build/esm/Table/Table.d.ts +4 -4
- package/build/esm/Table/Table.js.map +1 -1
- package/build/esm/Table/TableBody.d.ts +4 -4
- package/build/esm/Table/TableBody.js.map +1 -1
- package/build/esm/Table/TableCell.d.ts +4 -4
- package/build/esm/Table/TableCell.js.map +1 -1
- package/build/esm/Table/TableHead.d.ts +4 -4
- package/build/esm/Table/TableHead.js.map +1 -1
- package/build/esm/Table/TableRow.d.ts +4 -4
- package/build/esm/Table/TableRow.js.map +1 -1
- package/build/esm/Table/context.d.ts +3 -3
- package/build/esm/Table/context.js.map +1 -1
- package/build/esm/Table/index.d.ts +5 -5
- package/build/esm/Table/index.js.map +1 -1
- package/build/esm/Text/LoremIpsum.d.ts +4 -4
- package/build/esm/Text/LoremIpsum.js.map +1 -1
- package/build/esm/Text/Text.d.ts +11 -11
- package/build/esm/Text/Text.js +2 -2
- package/build/esm/Text/Text.js.map +1 -1
- package/build/esm/Text/index.d.ts +1 -1
- package/build/esm/Text/index.js.map +1 -1
- package/build/esm/TextField/FilledContainer.d.ts +18 -18
- package/build/esm/TextField/FilledContainer.js.map +1 -1
- package/build/esm/TextField/HelperText.d.ts +10 -10
- package/build/esm/TextField/HelperText.js.map +1 -1
- package/build/esm/TextField/IconContainer.d.ts +5 -5
- package/build/esm/TextField/IconContainer.js.map +1 -1
- package/build/esm/TextField/Input.d.ts +11 -11
- package/build/esm/TextField/OutlinedContainer.d.ts +17 -17
- package/build/esm/TextField/OutlinedContainer.js.map +1 -1
- package/build/esm/TextField/TextField.d.ts +19 -19
- package/build/esm/TextField/consts.d.ts +5 -5
- package/build/esm/TextField/consts.js.map +1 -1
- package/build/esm/TextField/index.d.ts +4 -4
- package/build/esm/TextField/index.js.map +1 -1
- package/build/esm/ThemeExplorer/BorderSlider.d.ts +7 -7
- package/build/esm/ThemeExplorer/BorderSlider.js.map +1 -1
- package/build/esm/ThemeExplorer/ColorPicker.d.ts +8 -8
- package/build/esm/ThemeExplorer/ColorPicker.js.map +1 -1
- package/build/esm/ThemeExplorer/ColorSchemePicker.d.ts +10 -10
- package/build/esm/ThemeExplorer/ColorSchemePicker.js.map +1 -1
- package/build/esm/ThemeExplorer/FontAutoComplete.d.ts +9 -9
- package/build/esm/ThemeExplorer/FontAutoComplete.js.map +1 -1
- package/build/esm/ThemeExplorer/TextFieldColorPicker.d.ts +9 -9
- package/build/esm/ThemeExplorer/TextFieldColorPicker.js.map +1 -1
- package/build/esm/ThemeExplorer/ThemeBuilder.d.ts +11 -11
- package/build/esm/ThemeExplorer/ThemeBuilder.js.map +1 -1
- package/build/esm/ThemeExplorer/ThemeColors.d.ts +5 -5
- package/build/esm/ThemeExplorer/ThemeColors.js.map +1 -1
- package/build/esm/ThemeExplorer/components.d.ts +31 -31
- package/build/esm/ThemeExplorer/components.js.map +1 -1
- package/build/esm/ThemeExplorer/googleFonts.d.ts +1 -1
- package/build/esm/ThemeExplorer/googleFonts.js.map +1 -1
- package/build/esm/ThemeExplorer/index.d.ts +1 -1
- package/build/esm/ThemeExplorer/index.js.map +1 -1
- package/build/esm/ThemeExplorer/makeColorScheme.d.ts +98 -98
- package/build/esm/ThemeExplorer/makeColorScheme.js.map +1 -1
- package/build/esm/ThemeExplorer/makeTailwindTheme.d.ts +2 -2
- package/build/esm/ThemeExplorer/makeTailwindTheme.js.map +1 -1
- package/build/esm/ThemeExplorer/updateGoogleFonts.js.map +1 -1
- package/build/esm/ThemeExplorer/useDeferredColor.d.ts +3 -3
- package/build/esm/ThemeExplorer/useDeferredColor.js.map +1 -1
- package/build/esm/ThemeExplorer/useLocalStorageCachedState.d.ts +1 -1
- package/build/esm/ThemeExplorer/useLocalStorageCachedState.js.map +1 -1
- package/build/esm/Tooltip/Tooltip.d.ts +8 -8
- package/build/esm/Tooltip/Tooltip.js.map +1 -1
- package/build/esm/Tooltip/index.d.ts +1 -1
- package/build/esm/Tooltip/index.js.map +1 -1
- package/build/esm/color.d.ts +8 -8
- package/build/esm/css.d.ts +1 -1
- package/build/esm/css.js.map +1 -1
- package/build/esm/hooks/useAnimation.d.ts +20 -20
- package/build/esm/hooks/useAnimation.js.map +1 -1
- package/build/esm/index.d.ts +41 -41
- package/build/esm/index.js.map +1 -1
- package/build/esm/motion.d.ts +7 -7
- package/build/esm/motion.js.map +1 -1
- package/build/esm/tailwind/extendColors.d.ts +5 -5
- package/build/esm/tailwind/extendColors.js.map +1 -1
- package/build/esm/tailwind/index.d.ts +8 -8
- package/build/esm/tailwind/index.js.map +1 -1
- package/build/esm/theme/index.d.ts +2 -2
- package/build/esm/theme/index.js.map +1 -1
- package/build/esm/theme/theme.d.ts +562 -562
- package/build/esm/theme/typography-raleway.d.ts +112 -112
- package/build/esm/theme/typography-raleway.js.map +1 -1
- package/build/esm/theme/typography-roboto.d.ts +111 -111
- package/build/esm/theme/typography-roboto.js.map +1 -1
- package/build/esm/theme/useTheme.d.ts +566 -566
- package/build/esm/theme/useTheme.js.map +1 -1
- package/build/tsconfig-build.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/Alert/index.ts +1 -1
- package/src/AppBar/AppBar.story.tsx +69 -69
- package/src/AppBar/AppBar.tsx +85 -85
- package/src/AppBar/AppBarButton.tsx +25 -25
- package/src/AppBar/context.ts +13 -13
- package/src/AppBar/index.ts +3 -3
- package/src/Badge/Badge.story.tsx +68 -68
- package/src/Badge/Badge.tsx +47 -47
- package/src/Badge/index.ts +1 -1
- package/src/BaseLine/BaseLine.tsx +100 -100
- package/src/BaseLine/index.ts +1 -1
- package/src/BottomSheet/BottomSheet.story.tsx +35 -35
- package/src/BottomSheet/BottomSheet.tsx +39 -39
- package/src/BottomSheet/BottomSheetSurface.tsx +49 -49
- package/src/BottomSheet/index.ts +1 -1
- package/src/Box/Box.tsx +127 -127
- package/src/Box/index.ts +1 -1
- package/src/Button/ButtonGroup.story.tsx +68 -43
- package/src/Button/FilledButton.tsx +16 -1
- package/src/Button/FloatingActionButton.tsx +9 -9
- package/src/Button/OutlinedButton.tsx +16 -1
- package/src/Button/SpinnerButton.story.tsx +91 -91
- package/src/Button/TransparentButton.tsx +16 -1
- package/src/Button/context.tsx +17 -17
- package/src/Button/index.ts +2 -2
- package/src/CheckBox/CheckBox.story.tsx +155 -155
- package/src/CheckBox/CheckBox.tsx +170 -170
- package/src/CheckBox/CheckBoxIcon.tsx +64 -64
- package/src/CheckBox/CheckPath.tsx +18 -18
- package/src/CheckBox/IndeterminatePath.tsx +16 -16
- package/src/CheckBox/index.ts +1 -1
- package/src/Chip/ButtonChip.tsx +86 -86
- package/src/Chip/Chip.story.tsx +242 -242
- package/src/Chip/Chip.tsx +5 -5
- package/src/Chip/ChipBase.tsx +141 -141
- package/src/Chip/ChoiceChip.tsx +127 -127
- package/src/Chip/index.ts +2 -2
- package/src/Combobox/Combobox.story.tsx +157 -157
- package/src/Combobox/Combobox.tsx +274 -274
- package/src/Combobox/index.ts +1 -1
- package/src/Dialog/Dialog.story.tsx +53 -53
- package/src/Dialog/Dialog.tsx +73 -73
- package/src/Dialog/DialogBackdrop.tsx +42 -42
- package/src/Dialog/DialogContainer.tsx +31 -31
- package/src/Dialog/DialogSurface.tsx +55 -55
- package/src/Dialog/Scrim.tsx +35 -35
- package/src/Dialog/index.ts +2 -2
- package/src/Dialog/useDialogAnimation.tsx +49 -49
- package/src/Divider/Divider.story.tsx +39 -39
- package/src/Divider/Divider.tsx +48 -48
- package/src/Divider/index.ts +1 -1
- package/src/FloatingLabel/FloatingLabel.story.tsx +55 -55
- package/src/FloatingLabel/FloatingLabel.tsx +77 -77
- package/src/FloatingLabel/index.ts +1 -1
- package/src/LineRipple/LineRipple.story.tsx +43 -43
- package/src/LineRipple/LineRipple.tsx +81 -81
- package/src/LineRipple/index.ts +1 -1
- package/src/Link/Link.story.tsx +14 -14
- package/src/Link/Link.tsx +65 -65
- package/src/Link/index.ts +1 -1
- package/src/List/List.tsx +46 -46
- package/src/List/index.ts +1 -1
- package/src/ListItem/ListItem.story.tsx +43 -43
- package/src/ListItem/ListItem.tsx +104 -104
- package/src/ListItem/ListItemText.tsx +35 -35
- package/src/ListItem/index.ts +2 -2
- package/src/Menu/ContextMenu.story.tsx +34 -34
- package/src/Menu/Menu.story.tsx +54 -54
- package/src/Menu/Menu.tsx +124 -124
- package/src/Menu/animation.ts +16 -16
- package/src/Menu/index.ts +2 -2
- package/src/NavRail/NavRail.story.tsx +146 -146
- package/src/NavRail/NavRailItem.tsx +175 -175
- package/src/NavRail/icons/test-icons.tsx +46 -46
- package/src/NavRail/index.ts +1 -1
- package/src/NotchedOutline/NotchedOutline.story.tsx +99 -99
- package/src/NotchedOutline/NotchedOutline.tsx +80 -80
- package/src/NotchedOutline/context.ts +12 -12
- package/src/NotchedOutline/index.ts +1 -1
- package/src/NotchedOutline/styledComponents.ts +122 -122
- package/src/Paper/Paper.story.tsx +50 -50
- package/src/Paper/Paper.tsx +67 -67
- package/src/Paper/index.ts +1 -1
- package/src/Popover/PopoverSurface.tsx +51 -51
- package/src/Popover/index.ts +1 -1
- package/src/ProgressSpinner/ProgressSpinner.story.tsx +35 -35
- package/src/ProgressSpinner/ProgressSpinner.tsx +119 -119
- package/src/ProgressSpinner/index.ts +1 -1
- package/src/RadioButton/RadioButton.story.tsx +109 -109
- package/src/RadioButton/RadioButton.tsx +112 -112
- package/src/RadioButton/RadioButtonIcon.tsx +44 -44
- package/src/RadioButton/RadioGroup.tsx +27 -27
- package/src/RadioButton/index.ts +2 -2
- package/src/Ripple/Ripple.story.tsx +78 -78
- package/src/Ripple/Ripple.tsx +33 -33
- package/src/Ripple/RippleBox.tsx +52 -52
- package/src/Ripple/constants.ts +15 -15
- package/src/Ripple/index.ts +5 -5
- package/src/Ripple/keyframes.ts +36 -36
- package/src/Ripple/useRipple.ts +209 -209
- package/src/Ripple/useRippleHandlers.ts +54 -54
- package/src/Ripple/useRippleSurface.ts +155 -155
- package/src/Select/CustomContainerExample.tsx +59 -59
- package/src/Select/PaymentMethodSelect.story.tsx +316 -316
- package/src/Select/Select.story.tsx +225 -225
- package/src/Select/Select.tsx +283 -283
- package/src/Select/SelectIcon.tsx +43 -43
- package/src/Select/SelectMultiple.story.tsx +215 -215
- package/src/Select/context.ts +22 -22
- package/src/Select/defaultRender.tsx +49 -49
- package/src/Select/index.ts +1 -1
- package/src/Select/styledComponents.tsx +38 -38
- package/src/SelectItem/SelectItem.tsx +92 -92
- package/src/SelectItem/index.ts +1 -1
- package/src/SelectionControl/SelectionControlLabel.tsx +34 -34
- package/src/SelectionControl/SelectionControlText.tsx +37 -37
- package/src/SelectionControl/index.ts +2 -2
- package/src/Skeleton/DelayAppearance.tsx +41 -41
- package/src/Skeleton/Skeleton.story.tsx +57 -57
- package/src/Skeleton/Skeleton.tsx +40 -40
- package/src/Skeleton/animation.ts +54 -54
- package/src/Skeleton/index.ts +2 -2
- package/src/Slider/Slider.story.tsx +36 -36
- package/src/Slider/Slider.tsx +275 -275
- package/src/Slider/index.ts +1 -1
- package/src/Snackbar/Snackbar.story.tsx +99 -99
- package/src/Switch/Switch.story.tsx +98 -98
- package/src/Switch/Switch.tsx +170 -170
- package/src/Switch/index.ts +1 -1
- package/src/Switch/styledComponents.tsx +117 -117
- package/src/Tab/Tab.story.tsx +209 -209
- package/src/Tab/Tab.tsx +120 -120
- package/src/Tab/TabList.tsx +61 -61
- package/src/Tab/TabPanel.tsx +31 -31
- package/src/Tab/TabPanels.tsx +5 -5
- package/src/Tab/Tabs.tsx +5 -5
- package/src/Tab/context.ts +17 -17
- package/src/Tab/index.ts +5 -5
- package/src/TabIndicator/TabIndicator.tsx +146 -146
- package/src/TabIndicator/context.ts +13 -13
- package/src/TabIndicator/index.ts +2 -2
- package/src/Table/Table.story.tsx +227 -227
- package/src/Table/Table.tsx +34 -34
- package/src/Table/TableBody.tsx +17 -17
- package/src/Table/TableCell.tsx +34 -34
- package/src/Table/TableHead.tsx +31 -31
- package/src/Table/TableRow.tsx +38 -38
- package/src/Table/context.ts +6 -6
- package/src/Table/index.ts +5 -5
- package/src/Text/LoremIpsum.tsx +18 -18
- package/src/Text/Text.story.tsx +75 -75
- package/src/Text/Text.tsx +84 -84
- package/src/Text/index.ts +1 -1
- package/src/TextField/FilledContainer.tsx +173 -173
- package/src/TextField/HelperText.tsx +63 -63
- package/src/TextField/IconContainer.tsx +33 -33
- package/src/TextField/OutlinedContainer.tsx +116 -116
- package/src/TextField/TextField.story.tsx +241 -241
- package/src/TextField/consts.ts +7 -7
- package/src/TextField/index.ts +4 -4
- package/src/ThemeExplorer/BorderSlider.tsx +73 -73
- package/src/ThemeExplorer/ColorPicker.tsx +104 -104
- package/src/ThemeExplorer/ColorSchemePicker.tsx +55 -55
- package/src/ThemeExplorer/FontAutoComplete.tsx +139 -139
- package/src/ThemeExplorer/TextFieldColorPicker.tsx +115 -115
- package/src/ThemeExplorer/ThemeBuilder.story.tsx +8 -8
- package/src/ThemeExplorer/ThemeBuilder.tsx +353 -353
- package/src/ThemeExplorer/ThemeColors.tsx +118 -118
- package/src/ThemeExplorer/components.tsx +195 -195
- package/src/ThemeExplorer/googleFonts.ts +1436 -1436
- package/src/ThemeExplorer/index.ts +1 -1
- package/src/ThemeExplorer/makeColorScheme.tsx +111 -111
- package/src/ThemeExplorer/makeTailwindTheme.ts +44 -44
- package/src/ThemeExplorer/updateGoogleFonts.js +33 -33
- package/src/ThemeExplorer/useDeferredColor.tsx +21 -21
- package/src/ThemeExplorer/useLocalStorageCachedState.ts +18 -18
- package/src/Tooltip/Tooltip.story.tsx +35 -35
- package/src/Tooltip/Tooltip.tsx +67 -67
- package/src/Tooltip/index.ts +1 -1
- package/src/css.ts +2 -2
- package/src/hooks/useAnimation.ts +111 -111
- package/src/index.ts +41 -41
- package/src/motion.ts +7 -7
- package/src/tailwind/extendColors.ts +51 -51
- package/src/tailwind/index.ts +56 -56
- package/src/tailwind/tests/extendColors.test.ts +123 -123
- package/src/theme/index.ts +2 -2
- package/src/theme/typography-raleway.ts +114 -114
- package/src/theme/typography-roboto.ts +113 -113
- package/src/theme/useTheme.ts +18 -18
- package/tailwind/package.json +5 -5
- package/theme-explorer/package.json +5 -5
- package/build/esm/ColorMode/ColorModeProvider.d.ts +0 -7
- package/build/esm/ColorMode/ColorModeProvider.js +0 -71
- package/build/esm/ColorMode/ColorModeProvider.js.map +0 -1
- package/build/esm/ColorMode/color-mode.d.ts +0 -8
- package/build/esm/ColorMode/color-mode.js +0 -12
- package/build/esm/ColorMode/color-mode.js.map +0 -1
- package/build/esm/ColorMode/color-vars.d.ts +0 -4
- package/build/esm/ColorMode/color-vars.js +0 -58
- package/build/esm/ColorMode/color-vars.js.map +0 -1
- package/build/esm/ColorMode/constants.d.ts +0 -2
- package/build/esm/ColorMode/constants.js +0 -4
- package/build/esm/ColorMode/constants.js.map +0 -1
- package/build/esm/ColorMode/index.d.ts +0 -4
- package/build/esm/ColorMode/index.js +0 -5
- package/build/esm/ColorMode/index.js.map +0 -1
- package/build/esm/ListItem/context.d.ts +0 -7
- package/build/esm/ListItem/context.js +0 -11
- package/build/esm/ListItem/context.js.map +0 -1
- package/build/tsconfig.tsbuildinfo +0 -4321
package/src/Box/Box.tsx
CHANGED
|
@@ -1,127 +1,127 @@
|
|
|
1
|
-
import type { ElementType, FC, HTMLAttributes, RefAttributes } from 'react';
|
|
2
|
-
import { forwardRef } from 'react';
|
|
3
|
-
import type { CSSObject } from '@emotion/react';
|
|
4
|
-
import styled from '@emotion/styled';
|
|
5
|
-
import type {
|
|
6
|
-
SpaceProps,
|
|
7
|
-
LayoutProps,
|
|
8
|
-
TypographyProps,
|
|
9
|
-
ColorProps,
|
|
10
|
-
FlexboxProps,
|
|
11
|
-
BorderProps,
|
|
12
|
-
GridProps,
|
|
13
|
-
BackgroundProps,
|
|
14
|
-
PositionProps,
|
|
15
|
-
ShadowProps,
|
|
16
|
-
ResponsiveValue,
|
|
17
|
-
} from 'styled-system';
|
|
18
|
-
import {
|
|
19
|
-
compose,
|
|
20
|
-
space,
|
|
21
|
-
layout,
|
|
22
|
-
typography,
|
|
23
|
-
color,
|
|
24
|
-
flexbox,
|
|
25
|
-
border,
|
|
26
|
-
grid,
|
|
27
|
-
background,
|
|
28
|
-
position,
|
|
29
|
-
shadow,
|
|
30
|
-
} from 'styled-system';
|
|
31
|
-
import type {
|
|
32
|
-
SystemStyleObject,
|
|
33
|
-
ResponsiveStyleValue,
|
|
34
|
-
} from '@styled-system/css';
|
|
35
|
-
import { css, get } from '@styled-system/css';
|
|
36
|
-
import shouldForwardProp from '@styled-system/should-forward-prop';
|
|
37
|
-
|
|
38
|
-
import type { Theme } from '../theme';
|
|
39
|
-
import { useTheme } from '../theme';
|
|
40
|
-
|
|
41
|
-
export type SxStyleProp =
|
|
42
|
-
| SystemStyleObject
|
|
43
|
-
| Record<
|
|
44
|
-
string,
|
|
45
|
-
| SystemStyleObject
|
|
46
|
-
| ResponsiveStyleValue<number | string>
|
|
47
|
-
| Record<
|
|
48
|
-
string,
|
|
49
|
-
SystemStyleObject | ResponsiveStyleValue<number | string>
|
|
50
|
-
>
|
|
51
|
-
>;
|
|
52
|
-
|
|
53
|
-
export interface BaseProps {
|
|
54
|
-
as?: ElementType<any>;
|
|
55
|
-
sx?: SxStyleProp;
|
|
56
|
-
// css?: CSSObject | ((props: { theme: Theme }) => CSSObject);
|
|
57
|
-
__css?: SxStyleProp;
|
|
58
|
-
variant?: ResponsiveValue<string>;
|
|
59
|
-
tx?: string;
|
|
60
|
-
theme: Theme;
|
|
61
|
-
}
|
|
62
|
-
export const sx = ({ theme, sx }: BaseProps) => css(sx)(theme) as CSSObject;
|
|
63
|
-
export const base = ({ theme, __css }: BaseProps) =>
|
|
64
|
-
css(__css)(theme) as CSSObject;
|
|
65
|
-
export const variant = ({
|
|
66
|
-
theme,
|
|
67
|
-
variant = 'default',
|
|
68
|
-
tx = 'variants',
|
|
69
|
-
}: BaseProps) =>
|
|
70
|
-
css(get(theme, tx + '.' + variant, get(theme, variant as any)))(
|
|
71
|
-
theme
|
|
72
|
-
) as CSSObject;
|
|
73
|
-
|
|
74
|
-
type KnownBoxProps = BaseProps &
|
|
75
|
-
SpaceProps &
|
|
76
|
-
LayoutProps &
|
|
77
|
-
TypographyProps &
|
|
78
|
-
ColorProps &
|
|
79
|
-
FlexboxProps &
|
|
80
|
-
BorderProps &
|
|
81
|
-
GridProps &
|
|
82
|
-
BackgroundProps &
|
|
83
|
-
PositionProps &
|
|
84
|
-
ShadowProps & { zIndex?: number | string };
|
|
85
|
-
|
|
86
|
-
export type BoxProps<
|
|
87
|
-
H = HTMLDivElement,
|
|
88
|
-
Attr extends HTMLAttributes<H> = HTMLAttributes<H>
|
|
89
|
-
> = Omit<Attr, keyof KnownBoxProps> & Partial<KnownBoxProps> & RefAttributes<H>;
|
|
90
|
-
|
|
91
|
-
const BoxBase = styled('div' as unknown as FC, {
|
|
92
|
-
shouldForwardProp,
|
|
93
|
-
})<BoxProps<HTMLDivElement>>(
|
|
94
|
-
{
|
|
95
|
-
boxSizing: 'border-box',
|
|
96
|
-
margin: 0,
|
|
97
|
-
minWidth: 0,
|
|
98
|
-
},
|
|
99
|
-
base,
|
|
100
|
-
variant,
|
|
101
|
-
sx,
|
|
102
|
-
(props: any) => props.css,
|
|
103
|
-
compose(
|
|
104
|
-
space,
|
|
105
|
-
layout,
|
|
106
|
-
typography,
|
|
107
|
-
color,
|
|
108
|
-
flexbox,
|
|
109
|
-
border,
|
|
110
|
-
grid,
|
|
111
|
-
background,
|
|
112
|
-
position,
|
|
113
|
-
shadow
|
|
114
|
-
)
|
|
115
|
-
);
|
|
116
|
-
|
|
117
|
-
export const Box: <
|
|
118
|
-
Props = BoxProps<HTMLDivElement, HTMLAttributes<HTMLDivElement>>
|
|
119
|
-
>(
|
|
120
|
-
props: Props
|
|
121
|
-
) => JSX.Element = forwardRef<HTMLDivElement, BoxProps<HTMLDivElement>>(
|
|
122
|
-
function Box(props, forwardedRef) {
|
|
123
|
-
const theme = useTheme();
|
|
124
|
-
|
|
125
|
-
return <BoxBase ref={forwardedRef} theme={theme} {...props} />;
|
|
126
|
-
}
|
|
127
|
-
) as any;
|
|
1
|
+
import type { ElementType, FC, HTMLAttributes, RefAttributes } from 'react';
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import type { CSSObject } from '@emotion/react';
|
|
4
|
+
import styled from '@emotion/styled';
|
|
5
|
+
import type {
|
|
6
|
+
SpaceProps,
|
|
7
|
+
LayoutProps,
|
|
8
|
+
TypographyProps,
|
|
9
|
+
ColorProps,
|
|
10
|
+
FlexboxProps,
|
|
11
|
+
BorderProps,
|
|
12
|
+
GridProps,
|
|
13
|
+
BackgroundProps,
|
|
14
|
+
PositionProps,
|
|
15
|
+
ShadowProps,
|
|
16
|
+
ResponsiveValue,
|
|
17
|
+
} from 'styled-system';
|
|
18
|
+
import {
|
|
19
|
+
compose,
|
|
20
|
+
space,
|
|
21
|
+
layout,
|
|
22
|
+
typography,
|
|
23
|
+
color,
|
|
24
|
+
flexbox,
|
|
25
|
+
border,
|
|
26
|
+
grid,
|
|
27
|
+
background,
|
|
28
|
+
position,
|
|
29
|
+
shadow,
|
|
30
|
+
} from 'styled-system';
|
|
31
|
+
import type {
|
|
32
|
+
SystemStyleObject,
|
|
33
|
+
ResponsiveStyleValue,
|
|
34
|
+
} from '@styled-system/css';
|
|
35
|
+
import { css, get } from '@styled-system/css';
|
|
36
|
+
import shouldForwardProp from '@styled-system/should-forward-prop';
|
|
37
|
+
|
|
38
|
+
import type { Theme } from '../theme';
|
|
39
|
+
import { useTheme } from '../theme';
|
|
40
|
+
|
|
41
|
+
export type SxStyleProp =
|
|
42
|
+
| SystemStyleObject
|
|
43
|
+
| Record<
|
|
44
|
+
string,
|
|
45
|
+
| SystemStyleObject
|
|
46
|
+
| ResponsiveStyleValue<number | string>
|
|
47
|
+
| Record<
|
|
48
|
+
string,
|
|
49
|
+
SystemStyleObject | ResponsiveStyleValue<number | string>
|
|
50
|
+
>
|
|
51
|
+
>;
|
|
52
|
+
|
|
53
|
+
export interface BaseProps {
|
|
54
|
+
as?: ElementType<any>;
|
|
55
|
+
sx?: SxStyleProp;
|
|
56
|
+
// css?: CSSObject | ((props: { theme: Theme }) => CSSObject);
|
|
57
|
+
__css?: SxStyleProp;
|
|
58
|
+
variant?: ResponsiveValue<string>;
|
|
59
|
+
tx?: string;
|
|
60
|
+
theme: Theme;
|
|
61
|
+
}
|
|
62
|
+
export const sx = ({ theme, sx }: BaseProps) => css(sx)(theme) as CSSObject;
|
|
63
|
+
export const base = ({ theme, __css }: BaseProps) =>
|
|
64
|
+
css(__css)(theme) as CSSObject;
|
|
65
|
+
export const variant = ({
|
|
66
|
+
theme,
|
|
67
|
+
variant = 'default',
|
|
68
|
+
tx = 'variants',
|
|
69
|
+
}: BaseProps) =>
|
|
70
|
+
css(get(theme, tx + '.' + variant, get(theme, variant as any)))(
|
|
71
|
+
theme
|
|
72
|
+
) as CSSObject;
|
|
73
|
+
|
|
74
|
+
type KnownBoxProps = BaseProps &
|
|
75
|
+
SpaceProps &
|
|
76
|
+
LayoutProps &
|
|
77
|
+
TypographyProps &
|
|
78
|
+
ColorProps &
|
|
79
|
+
FlexboxProps &
|
|
80
|
+
BorderProps &
|
|
81
|
+
GridProps &
|
|
82
|
+
BackgroundProps &
|
|
83
|
+
PositionProps &
|
|
84
|
+
ShadowProps & { zIndex?: number | string };
|
|
85
|
+
|
|
86
|
+
export type BoxProps<
|
|
87
|
+
H = HTMLDivElement,
|
|
88
|
+
Attr extends HTMLAttributes<H> = HTMLAttributes<H>
|
|
89
|
+
> = Omit<Attr, keyof KnownBoxProps> & Partial<KnownBoxProps> & RefAttributes<H>;
|
|
90
|
+
|
|
91
|
+
const BoxBase = styled('div' as unknown as FC, {
|
|
92
|
+
shouldForwardProp,
|
|
93
|
+
})<BoxProps<HTMLDivElement>>(
|
|
94
|
+
{
|
|
95
|
+
boxSizing: 'border-box',
|
|
96
|
+
margin: 0,
|
|
97
|
+
minWidth: 0,
|
|
98
|
+
},
|
|
99
|
+
base,
|
|
100
|
+
variant,
|
|
101
|
+
sx,
|
|
102
|
+
(props: any) => props.css,
|
|
103
|
+
compose(
|
|
104
|
+
space,
|
|
105
|
+
layout,
|
|
106
|
+
typography,
|
|
107
|
+
color,
|
|
108
|
+
flexbox,
|
|
109
|
+
border,
|
|
110
|
+
grid,
|
|
111
|
+
background,
|
|
112
|
+
position,
|
|
113
|
+
shadow
|
|
114
|
+
)
|
|
115
|
+
);
|
|
116
|
+
|
|
117
|
+
export const Box: <
|
|
118
|
+
Props = BoxProps<HTMLDivElement, HTMLAttributes<HTMLDivElement>>
|
|
119
|
+
>(
|
|
120
|
+
props: Props
|
|
121
|
+
) => JSX.Element = forwardRef<HTMLDivElement, BoxProps<HTMLDivElement>>(
|
|
122
|
+
function Box(props, forwardedRef) {
|
|
123
|
+
const theme = useTheme();
|
|
124
|
+
|
|
125
|
+
return <BoxBase ref={forwardedRef} theme={theme} {...props} />;
|
|
126
|
+
}
|
|
127
|
+
) as any;
|
package/src/Box/index.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './Box';
|
|
1
|
+
export * from './Box';
|
|
@@ -6,49 +6,74 @@ export default { title: 'components/ButtonGroup' };
|
|
|
6
6
|
|
|
7
7
|
const Example = () => {
|
|
8
8
|
return (
|
|
9
|
-
<Box sx={{ gap: 24, flexDirection: '
|
|
10
|
-
|
|
11
|
-
<
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
9
|
+
<Box sx={{ gap: 24, flexDirection: 'row', display: 'flex' }}>
|
|
10
|
+
{(['text', 'filled', 'outlined'] as const).map((variant) => (
|
|
11
|
+
<Box
|
|
12
|
+
sx={{ gap: 24, flexDirection: 'column', display: 'flex' }}
|
|
13
|
+
key={variant}
|
|
14
|
+
>
|
|
15
|
+
<BaseButtonGroup variant={variant}>
|
|
16
|
+
<Button>Hello</Button>
|
|
17
|
+
<Button>Hello</Button>
|
|
18
|
+
</BaseButtonGroup>
|
|
19
|
+
|
|
20
|
+
<BaseButtonGroup variant={variant}>
|
|
21
|
+
<Button disabled>Hello</Button>
|
|
22
|
+
<Button>Hello</Button>
|
|
23
|
+
</BaseButtonGroup>
|
|
24
|
+
<BaseButtonGroup variant={variant}>
|
|
25
|
+
<Button>Hello</Button>
|
|
26
|
+
<Button disabled>Hello</Button>
|
|
27
|
+
</BaseButtonGroup>
|
|
28
|
+
<BaseButtonGroup variant={variant}>
|
|
29
|
+
<Button disabled>Hello</Button>
|
|
30
|
+
<Button disabled>Hello</Button>
|
|
31
|
+
</BaseButtonGroup>
|
|
32
|
+
|
|
33
|
+
<BaseButtonGroup variant={variant}>
|
|
34
|
+
<Button>Hello</Button>
|
|
35
|
+
<Button>Hello</Button>
|
|
36
|
+
<Button>Hello</Button>
|
|
37
|
+
</BaseButtonGroup>
|
|
38
|
+
|
|
39
|
+
<BaseButtonGroup variant={variant}>
|
|
40
|
+
<Button disabled>Hello</Button>
|
|
41
|
+
<Button disabled>Hello</Button>
|
|
42
|
+
<Button disabled>Hello</Button>
|
|
43
|
+
</BaseButtonGroup>
|
|
44
|
+
|
|
45
|
+
<BaseButtonGroup variant={variant}>
|
|
46
|
+
<Button disabled>Hello</Button>
|
|
47
|
+
<Button>Hello</Button>
|
|
48
|
+
<Button>Hello</Button>
|
|
49
|
+
</BaseButtonGroup>
|
|
50
|
+
<BaseButtonGroup variant={variant}>
|
|
51
|
+
<Button>Hello</Button>
|
|
52
|
+
<Button disabled>Hello</Button>
|
|
53
|
+
<Button>Hello</Button>
|
|
54
|
+
</BaseButtonGroup>
|
|
55
|
+
<BaseButtonGroup variant={variant}>
|
|
56
|
+
<Button>Hello</Button>
|
|
57
|
+
<Button>Hello</Button>
|
|
58
|
+
<Button disabled>Hello</Button>
|
|
59
|
+
</BaseButtonGroup>
|
|
60
|
+
<BaseButtonGroup variant={variant}>
|
|
61
|
+
<Button>Hello</Button>
|
|
62
|
+
<Button disabled>Hello</Button>
|
|
63
|
+
<Button disabled>Hello</Button>
|
|
64
|
+
</BaseButtonGroup>
|
|
65
|
+
<BaseButtonGroup variant={variant}>
|
|
66
|
+
<Button disabled>Hello</Button>
|
|
67
|
+
<Button>Hello</Button>
|
|
68
|
+
<Button disabled>Hello</Button>
|
|
69
|
+
</BaseButtonGroup>
|
|
70
|
+
<BaseButtonGroup variant={variant}>
|
|
71
|
+
<Button disabled>Hello</Button>
|
|
72
|
+
<Button disabled>Hello</Button>
|
|
73
|
+
<Button>Hello</Button>
|
|
74
|
+
</BaseButtonGroup>
|
|
75
|
+
</Box>
|
|
76
|
+
))}
|
|
52
77
|
</Box>
|
|
53
78
|
);
|
|
54
79
|
};
|
|
@@ -53,8 +53,23 @@ export const FilledButton = styled(BaseButton)(
|
|
|
53
53
|
borderLeftStyle: 'solid',
|
|
54
54
|
borderLeftWidth: rem(1),
|
|
55
55
|
},
|
|
56
|
+
// Handling the border between enabled/disabled buttons
|
|
57
|
+
':not(:disabled):has(+ :disabled)': {
|
|
58
|
+
borderRightWidth: rem(1),
|
|
59
|
+
borderRightStyle: 'solid',
|
|
60
|
+
},
|
|
61
|
+
':disabled + :not(:disabled)': {
|
|
62
|
+
borderLeftWidth: rem(1),
|
|
63
|
+
borderLeftStyle: 'solid',
|
|
64
|
+
},
|
|
65
|
+
':not(:disabled) + :disabled': {
|
|
66
|
+
borderLeftWidth: rem(0),
|
|
67
|
+
},
|
|
68
|
+
':disabled:has(+ :not(:disabled))': {
|
|
69
|
+
borderRightWidth: rem(0),
|
|
70
|
+
},
|
|
56
71
|
':last-of-type:nth-of-type(2)': {
|
|
57
|
-
borderLeftWidth: 0,
|
|
72
|
+
borderLeftWidth: rem(0),
|
|
58
73
|
},
|
|
59
74
|
},
|
|
60
75
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { getRippleProperties as filledButtonGetProperties } from './FilledButton';
|
|
2
|
-
import type { Theme } from '../theme';
|
|
3
|
-
|
|
4
|
-
export function getRippleProperties(theme: Theme) {
|
|
5
|
-
return {
|
|
6
|
-
...filledButtonGetProperties(theme),
|
|
7
|
-
rippleEnabled: true,
|
|
8
|
-
};
|
|
9
|
-
}
|
|
1
|
+
import { getRippleProperties as filledButtonGetProperties } from './FilledButton';
|
|
2
|
+
import type { Theme } from '../theme';
|
|
3
|
+
|
|
4
|
+
export function getRippleProperties(theme: Theme) {
|
|
5
|
+
return {
|
|
6
|
+
...filledButtonGetProperties(theme),
|
|
7
|
+
rippleEnabled: true,
|
|
8
|
+
};
|
|
9
|
+
}
|
|
@@ -39,8 +39,23 @@ export const OutlinedButton = styled(TransparentButton)(
|
|
|
39
39
|
borderLeftStyle: 'solid',
|
|
40
40
|
borderLeftWidth: rem(1),
|
|
41
41
|
},
|
|
42
|
+
// Handling the border between enabled/disabled buttons
|
|
43
|
+
':not(:disabled):has(+ :disabled)': {
|
|
44
|
+
borderRightWidth: rem(1),
|
|
45
|
+
borderRightStyle: 'solid',
|
|
46
|
+
},
|
|
47
|
+
':disabled + :not(:disabled)': {
|
|
48
|
+
borderLeftWidth: rem(1),
|
|
49
|
+
borderLeftStyle: 'solid',
|
|
50
|
+
},
|
|
51
|
+
':not(:disabled) + :disabled': {
|
|
52
|
+
borderLeftWidth: rem(0),
|
|
53
|
+
},
|
|
54
|
+
':disabled:has(+ :not(:disabled))': {
|
|
55
|
+
borderRightWidth: rem(0),
|
|
56
|
+
},
|
|
42
57
|
':last-of-type:nth-of-type(2)': {
|
|
43
|
-
borderLeftWidth: 0,
|
|
58
|
+
borderLeftWidth: rem(0),
|
|
44
59
|
},
|
|
45
60
|
},
|
|
46
61
|
}
|
|
@@ -1,91 +1,91 @@
|
|
|
1
|
-
import type { FC } from 'react';
|
|
2
|
-
import { useState } from 'react';
|
|
3
|
-
import type { SpinnerProps, SpinnerButtonProps } from '@basic-ui/core';
|
|
4
|
-
import {
|
|
5
|
-
Spinner as SpinnerBase,
|
|
6
|
-
SpinnerButton as SpinnerButtonBase,
|
|
7
|
-
} from '@basic-ui/core';
|
|
8
|
-
|
|
9
|
-
import { Button, Box, Text } from '../';
|
|
10
|
-
import { alpha } from '../color';
|
|
11
|
-
import { useTheme } from '../theme';
|
|
12
|
-
import type { BoxProps } from '../Box';
|
|
13
|
-
|
|
14
|
-
export default {
|
|
15
|
-
title: 'components/SpinnerButton',
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
const Spinner: FC<Omit<BoxProps, 'onChange'> & SpinnerProps> =
|
|
19
|
-
SpinnerBase as any;
|
|
20
|
-
const SpinnerButton: FC<BoxProps & SpinnerButtonProps> =
|
|
21
|
-
SpinnerButtonBase as any;
|
|
22
|
-
|
|
23
|
-
function AddIcon(props) {
|
|
24
|
-
return (
|
|
25
|
-
<svg viewBox="0 0 24 24" width={24} height={24} {...props}>
|
|
26
|
-
<path d="M0 0h24v24H0z" fill="none" />
|
|
27
|
-
<path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z" fill="currentColor" />
|
|
28
|
-
</svg>
|
|
29
|
-
);
|
|
30
|
-
}
|
|
31
|
-
function RemoveIcon(props) {
|
|
32
|
-
return (
|
|
33
|
-
<svg viewBox="0 0 24 24" height={24} width={24} {...props}>
|
|
34
|
-
<path d="M0 0h24v24H0z" fill="none" />
|
|
35
|
-
<path d="M19 13H5v-2h14v2z" fill="currentColor" />
|
|
36
|
-
</svg>
|
|
37
|
-
);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
const Example = ({ vertical = false }) => {
|
|
41
|
-
const theme = useTheme();
|
|
42
|
-
const [value, setValue] = useState(0);
|
|
43
|
-
const size = 36;
|
|
44
|
-
|
|
45
|
-
return (
|
|
46
|
-
<Spinner
|
|
47
|
-
value={value}
|
|
48
|
-
minValue={0}
|
|
49
|
-
maxValue={5}
|
|
50
|
-
as={Box}
|
|
51
|
-
onChange={(e, value) => setValue(value)}
|
|
52
|
-
sx={{
|
|
53
|
-
display: 'inline-flex',
|
|
54
|
-
alignItems: 'center',
|
|
55
|
-
flexDirection: vertical ? 'column-reverse' : 'row',
|
|
56
|
-
borderRadius: 'full',
|
|
57
|
-
'&:focus': {
|
|
58
|
-
outline: 'none',
|
|
59
|
-
boxShadow: `0px 0px 10px 0px ${alpha('primary', 0.6)(theme)}`,
|
|
60
|
-
},
|
|
61
|
-
}}
|
|
62
|
-
>
|
|
63
|
-
<SpinnerButton
|
|
64
|
-
type="previous"
|
|
65
|
-
as={Button}
|
|
66
|
-
variant="filled"
|
|
67
|
-
p={0}
|
|
68
|
-
width={size}
|
|
69
|
-
height={size}
|
|
70
|
-
>
|
|
71
|
-
<RemoveIcon />
|
|
72
|
-
</SpinnerButton>
|
|
73
|
-
<Text variant="body-medium" textAlign="center" width={size}>
|
|
74
|
-
{value}
|
|
75
|
-
</Text>
|
|
76
|
-
<SpinnerButton
|
|
77
|
-
type="next"
|
|
78
|
-
as={Button}
|
|
79
|
-
variant="filled"
|
|
80
|
-
p={0}
|
|
81
|
-
width={size}
|
|
82
|
-
height={size}
|
|
83
|
-
>
|
|
84
|
-
<AddIcon />
|
|
85
|
-
</SpinnerButton>
|
|
86
|
-
</Spinner>
|
|
87
|
-
);
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
export const Horizontal = () => <Example />;
|
|
91
|
-
export const Vertical = () => <Example vertical={true} />;
|
|
1
|
+
import type { FC } from 'react';
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import type { SpinnerProps, SpinnerButtonProps } from '@basic-ui/core';
|
|
4
|
+
import {
|
|
5
|
+
Spinner as SpinnerBase,
|
|
6
|
+
SpinnerButton as SpinnerButtonBase,
|
|
7
|
+
} from '@basic-ui/core';
|
|
8
|
+
|
|
9
|
+
import { Button, Box, Text } from '../';
|
|
10
|
+
import { alpha } from '../color';
|
|
11
|
+
import { useTheme } from '../theme';
|
|
12
|
+
import type { BoxProps } from '../Box';
|
|
13
|
+
|
|
14
|
+
export default {
|
|
15
|
+
title: 'components/SpinnerButton',
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
const Spinner: FC<Omit<BoxProps, 'onChange'> & SpinnerProps> =
|
|
19
|
+
SpinnerBase as any;
|
|
20
|
+
const SpinnerButton: FC<BoxProps & SpinnerButtonProps> =
|
|
21
|
+
SpinnerButtonBase as any;
|
|
22
|
+
|
|
23
|
+
function AddIcon(props) {
|
|
24
|
+
return (
|
|
25
|
+
<svg viewBox="0 0 24 24" width={24} height={24} {...props}>
|
|
26
|
+
<path d="M0 0h24v24H0z" fill="none" />
|
|
27
|
+
<path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z" fill="currentColor" />
|
|
28
|
+
</svg>
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
function RemoveIcon(props) {
|
|
32
|
+
return (
|
|
33
|
+
<svg viewBox="0 0 24 24" height={24} width={24} {...props}>
|
|
34
|
+
<path d="M0 0h24v24H0z" fill="none" />
|
|
35
|
+
<path d="M19 13H5v-2h14v2z" fill="currentColor" />
|
|
36
|
+
</svg>
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const Example = ({ vertical = false }) => {
|
|
41
|
+
const theme = useTheme();
|
|
42
|
+
const [value, setValue] = useState(0);
|
|
43
|
+
const size = 36;
|
|
44
|
+
|
|
45
|
+
return (
|
|
46
|
+
<Spinner
|
|
47
|
+
value={value}
|
|
48
|
+
minValue={0}
|
|
49
|
+
maxValue={5}
|
|
50
|
+
as={Box}
|
|
51
|
+
onChange={(e, value) => setValue(value)}
|
|
52
|
+
sx={{
|
|
53
|
+
display: 'inline-flex',
|
|
54
|
+
alignItems: 'center',
|
|
55
|
+
flexDirection: vertical ? 'column-reverse' : 'row',
|
|
56
|
+
borderRadius: 'full',
|
|
57
|
+
'&:focus': {
|
|
58
|
+
outline: 'none',
|
|
59
|
+
boxShadow: `0px 0px 10px 0px ${alpha('primary', 0.6)(theme)}`,
|
|
60
|
+
},
|
|
61
|
+
}}
|
|
62
|
+
>
|
|
63
|
+
<SpinnerButton
|
|
64
|
+
type="previous"
|
|
65
|
+
as={Button}
|
|
66
|
+
variant="filled"
|
|
67
|
+
p={0}
|
|
68
|
+
width={size}
|
|
69
|
+
height={size}
|
|
70
|
+
>
|
|
71
|
+
<RemoveIcon />
|
|
72
|
+
</SpinnerButton>
|
|
73
|
+
<Text variant="body-medium" textAlign="center" width={size}>
|
|
74
|
+
{value}
|
|
75
|
+
</Text>
|
|
76
|
+
<SpinnerButton
|
|
77
|
+
type="next"
|
|
78
|
+
as={Button}
|
|
79
|
+
variant="filled"
|
|
80
|
+
p={0}
|
|
81
|
+
width={size}
|
|
82
|
+
height={size}
|
|
83
|
+
>
|
|
84
|
+
<AddIcon />
|
|
85
|
+
</SpinnerButton>
|
|
86
|
+
</Spinner>
|
|
87
|
+
);
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
export const Horizontal = () => <Example />;
|
|
91
|
+
export const Vertical = () => <Example vertical={true} />;
|
|
@@ -40,8 +40,23 @@ export const TransparentButton = styled(BaseButton)(
|
|
|
40
40
|
borderLeftStyle: 'solid',
|
|
41
41
|
borderLeftWidth: rem(1),
|
|
42
42
|
},
|
|
43
|
+
// Handling the border between enabled/disabled buttons
|
|
44
|
+
':not(:disabled):has(+ :disabled)': {
|
|
45
|
+
borderRightWidth: rem(1),
|
|
46
|
+
borderRightStyle: 'solid',
|
|
47
|
+
},
|
|
48
|
+
':disabled + :not(:disabled)': {
|
|
49
|
+
borderLeftWidth: rem(1),
|
|
50
|
+
borderLeftStyle: 'solid',
|
|
51
|
+
},
|
|
52
|
+
':not(:disabled) + :disabled': {
|
|
53
|
+
borderLeftWidth: rem(0),
|
|
54
|
+
},
|
|
55
|
+
':disabled:has(+ :not(:disabled))': {
|
|
56
|
+
borderRightWidth: rem(0),
|
|
57
|
+
},
|
|
43
58
|
':last-of-type:nth-of-type(2)': {
|
|
44
|
-
borderLeftWidth: 0,
|
|
59
|
+
borderLeftWidth: rem(0),
|
|
45
60
|
},
|
|
46
61
|
},
|
|
47
62
|
}
|