@basic-ui/material 0.1.16 → 1.0.0-alpha.2
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/build/cjs/index.js +586 -337
- package/build/cjs/index.js.map +1 -1
- package/build/esm/Alert/Alert.d.ts +2 -2
- package/build/esm/Alert/Alert.js +9 -9
- package/build/esm/Alert/Alert.js.map +1 -1
- package/build/esm/AppBar/AppBar.d.ts +3 -3
- package/build/esm/AppBar/AppBar.js +25 -18
- package/build/esm/AppBar/AppBar.js.map +1 -1
- package/build/esm/AppBar/AppBarButton.d.ts +2 -2
- package/build/esm/AppBar/AppBarButton.js +8 -9
- package/build/esm/AppBar/AppBarButton.js.map +1 -1
- package/build/esm/AppBar/context.d.ts +1 -1
- package/build/esm/AppBar/context.js +6 -5
- package/build/esm/AppBar/context.js.map +1 -1
- package/build/esm/Badge/Badge.d.ts +2 -2
- package/build/esm/Badge/Badge.js +2 -2
- package/build/esm/Badge/Badge.js.map +1 -1
- package/build/esm/BaseLine/BaseLine.d.ts +0 -1
- package/build/esm/BaseLine/BaseLine.js +4 -4
- package/build/esm/BaseLine/BaseLine.js.map +1 -1
- package/build/esm/BottomSheet/BottomSheet.d.ts +2 -2
- package/build/esm/BottomSheet/BottomSheet.js +11 -13
- package/build/esm/BottomSheet/BottomSheet.js.map +1 -1
- package/build/esm/BottomSheet/BottomSheetSurface.d.ts +4 -4
- package/build/esm/BottomSheet/BottomSheetSurface.js +9 -9
- package/build/esm/BottomSheet/BottomSheetSurface.js.map +1 -1
- package/build/esm/Box/Box.d.ts +5 -5
- package/build/esm/Box/Box.js +27 -19
- package/build/esm/Box/Box.js.map +1 -1
- package/build/esm/Button/BaseButton.d.ts +4 -3
- package/build/esm/Button/BaseButton.js +11 -12
- package/build/esm/Button/BaseButton.js.map +1 -1
- package/build/esm/Button/Button.d.ts +5 -5
- package/build/esm/Button/Button.js +45 -24
- package/build/esm/Button/Button.js.map +1 -1
- package/build/esm/Button/ButtonGroup.d.ts +5 -0
- package/build/esm/Button/ButtonGroup.js +31 -0
- package/build/esm/Button/ButtonGroup.js.map +1 -0
- package/build/esm/Button/FilledButton.d.ts +3 -2
- package/build/esm/Button/FilledButton.js +62 -21
- package/build/esm/Button/FilledButton.js.map +1 -1
- package/build/esm/Button/FloatingActionButton.d.ts +1 -1
- package/build/esm/Button/FloatingActionButton.js.map +1 -1
- package/build/esm/Button/IconButton.d.ts +2 -1
- package/build/esm/Button/IconButton.js +2 -1
- package/build/esm/Button/IconButton.js.map +1 -1
- package/build/esm/Button/OutlinedButton.d.ts +1 -1
- package/build/esm/Button/OutlinedButton.js +36 -4
- package/build/esm/Button/OutlinedButton.js.map +1 -1
- package/build/esm/Button/TransparentButton.d.ts +3 -2
- package/build/esm/Button/TransparentButton.js +49 -15
- package/build/esm/Button/TransparentButton.js.map +1 -1
- package/build/esm/Button/context.d.ts +8 -0
- package/build/esm/Button/context.js +7 -0
- package/build/esm/Button/context.js.map +1 -0
- package/build/esm/Button/index.d.ts +1 -0
- package/build/esm/Button/index.js +1 -0
- package/build/esm/Button/index.js.map +1 -1
- package/build/esm/CheckBox/CheckBox.d.ts +3 -3
- package/build/esm/CheckBox/CheckBox.js +43 -36
- package/build/esm/CheckBox/CheckBox.js.map +1 -1
- package/build/esm/CheckBox/CheckBoxIcon.d.ts +3 -3
- package/build/esm/CheckBox/CheckBoxIcon.js +15 -13
- package/build/esm/CheckBox/CheckBoxIcon.js.map +1 -1
- package/build/esm/CheckBox/CheckPath.js +15 -14
- package/build/esm/CheckBox/CheckPath.js.map +1 -1
- package/build/esm/CheckBox/IndeterminatePath.js +14 -13
- package/build/esm/CheckBox/IndeterminatePath.js.map +1 -1
- package/build/esm/Chip/ButtonChip.d.ts +5 -5
- package/build/esm/Chip/ButtonChip.js +49 -65
- package/build/esm/Chip/ButtonChip.js.map +1 -1
- package/build/esm/Chip/ChipBase.d.ts +2 -2
- package/build/esm/Chip/ChipBase.js +42 -29
- package/build/esm/Chip/ChipBase.js.map +1 -1
- package/build/esm/Chip/ChoiceChip.d.ts +5 -4
- package/build/esm/Chip/ChoiceChip.js +38 -45
- package/build/esm/Chip/ChoiceChip.js.map +1 -1
- package/build/esm/ColorMode/ColorModeProvider.d.ts +1 -1
- package/build/esm/ColorMode/ColorModeProvider.js +32 -19
- package/build/esm/ColorMode/ColorModeProvider.js.map +1 -1
- package/build/esm/ColorMode/color-mode.js +3 -3
- package/build/esm/ColorMode/color-mode.js.map +1 -1
- package/build/esm/ColorMode/color-vars.js +20 -12
- package/build/esm/ColorMode/color-vars.js.map +1 -1
- package/build/esm/ColorMode/constants.js +3 -3
- package/build/esm/ColorMode/constants.js.map +1 -1
- package/build/esm/Combobox/Combobox.d.ts +15 -15
- package/build/esm/Combobox/Combobox.js +51 -57
- package/build/esm/Combobox/Combobox.js.map +1 -1
- package/build/esm/Dialog/Dialog.d.ts +5 -5
- package/build/esm/Dialog/Dialog.js +22 -23
- package/build/esm/Dialog/Dialog.js.map +1 -1
- package/build/esm/Dialog/DialogBackdrop.d.ts +4 -4
- package/build/esm/Dialog/DialogBackdrop.js +10 -11
- package/build/esm/Dialog/DialogBackdrop.js.map +1 -1
- package/build/esm/Dialog/DialogContainer.d.ts +1 -1
- package/build/esm/Dialog/DialogContainer.js +4 -6
- package/build/esm/Dialog/DialogContainer.js.map +1 -1
- package/build/esm/Dialog/DialogSurface.d.ts +7 -5
- package/build/esm/Dialog/DialogSurface.js +24 -12
- package/build/esm/Dialog/DialogSurface.js.map +1 -1
- package/build/esm/Dialog/Scrim.d.ts +1 -1
- package/build/esm/Dialog/Scrim.js +4 -6
- package/build/esm/Dialog/Scrim.js.map +1 -1
- package/build/esm/Dialog/useDialogAnimation.js +19 -20
- package/build/esm/Dialog/useDialogAnimation.js.map +1 -1
- package/build/esm/Divider/Divider.d.ts +3 -3
- package/build/esm/Divider/Divider.js +9 -8
- package/build/esm/Divider/Divider.js.map +1 -1
- package/build/esm/FloatingLabel/FloatingLabel.d.ts +1 -1
- package/build/esm/FloatingLabel/FloatingLabel.js +26 -22
- package/build/esm/FloatingLabel/FloatingLabel.js.map +1 -1
- package/build/esm/LineRipple/LineRipple.d.ts +3 -3
- package/build/esm/LineRipple/LineRipple.js +27 -18
- package/build/esm/LineRipple/LineRipple.js.map +1 -1
- package/build/esm/Link/Link.d.ts +3 -3
- package/build/esm/Link/Link.js +10 -9
- package/build/esm/Link/Link.js.map +1 -1
- package/build/esm/List/List.d.ts +3 -3
- package/build/esm/List/List.js +20 -13
- package/build/esm/List/List.js.map +1 -1
- package/build/esm/ListItem/ListItem.d.ts +3 -3
- package/build/esm/ListItem/ListItem.js +72 -50
- package/build/esm/ListItem/ListItem.js.map +1 -1
- package/build/esm/ListItem/ListItemText.d.ts +1 -1
- package/build/esm/ListItem/ListItemText.js +10 -15
- package/build/esm/ListItem/ListItemText.js.map +1 -1
- package/build/esm/Menu/Menu.d.ts +10 -10
- package/build/esm/Menu/Menu.js +23 -27
- package/build/esm/Menu/Menu.js.map +1 -1
- package/build/esm/Menu/animation.d.ts +1 -1
- package/build/esm/Menu/animation.js +1 -1
- package/build/esm/Menu/animation.js.map +1 -1
- package/build/esm/NotchedOutline/NotchedOutline.d.ts +1 -1
- package/build/esm/NotchedOutline/NotchedOutline.js +25 -21
- package/build/esm/NotchedOutline/NotchedOutline.js.map +1 -1
- package/build/esm/NotchedOutline/context.js +6 -5
- package/build/esm/NotchedOutline/context.js.map +1 -1
- package/build/esm/NotchedOutline/styledComponents.d.ts +96 -50
- package/build/esm/NotchedOutline/styledComponents.js +58 -63
- package/build/esm/NotchedOutline/styledComponents.js.map +1 -1
- package/build/esm/Paper/Paper.d.ts +4 -3
- package/build/esm/Paper/Paper.js +15 -13
- package/build/esm/Paper/Paper.js.map +1 -1
- package/build/esm/ProgressSpinner/ProgressSpinner.d.ts +1 -1
- package/build/esm/ProgressSpinner/ProgressSpinner.js +16 -16
- package/build/esm/ProgressSpinner/ProgressSpinner.js.map +1 -1
- package/build/esm/RadioButton/RadioButton.d.ts +1 -1
- package/build/esm/RadioButton/RadioButton.js +17 -20
- package/build/esm/RadioButton/RadioButton.js.map +1 -1
- package/build/esm/RadioButton/RadioButtonIcon.d.ts +1 -1
- package/build/esm/RadioButton/RadioButtonIcon.js +7 -8
- package/build/esm/RadioButton/RadioButtonIcon.js.map +1 -1
- package/build/esm/RadioButton/RadioGroup.d.ts +3 -3
- package/build/esm/RadioButton/RadioGroup.js +5 -4
- package/build/esm/RadioButton/RadioGroup.js.map +1 -1
- package/build/esm/Ripple/Ripple.d.ts +1 -1
- package/build/esm/Ripple/Ripple.js +21 -20
- package/build/esm/Ripple/Ripple.js.map +1 -1
- package/build/esm/Ripple/RippleBox.d.ts +4 -4
- package/build/esm/Ripple/RippleBox.js +22 -15
- package/build/esm/Ripple/RippleBox.js.map +1 -1
- package/build/esm/Ripple/constants.js +7 -7
- package/build/esm/Ripple/constants.js.map +1 -1
- package/build/esm/Ripple/keyframes.d.ts +1 -1
- package/build/esm/Ripple/keyframes.js +3 -3
- package/build/esm/Ripple/keyframes.js.map +1 -1
- package/build/esm/Ripple/useRipple.js +55 -48
- package/build/esm/Ripple/useRipple.js.map +1 -1
- package/build/esm/Ripple/useRippleHandlers.d.ts +1 -1
- package/build/esm/Ripple/useRippleHandlers.js +13 -15
- package/build/esm/Ripple/useRippleHandlers.js.map +1 -1
- package/build/esm/Ripple/useRippleSurface.d.ts +6 -5
- package/build/esm/Ripple/useRippleSurface.js +60 -37
- package/build/esm/Ripple/useRippleSurface.js.map +1 -1
- package/build/esm/Select/Select.d.ts +4 -4
- package/build/esm/Select/Select.js +69 -47
- package/build/esm/Select/Select.js.map +1 -1
- package/build/esm/Select/SelectIcon.d.ts +3 -3
- package/build/esm/Select/SelectIcon.js +6 -7
- package/build/esm/Select/SelectIcon.js.map +1 -1
- package/build/esm/Select/context.js +7 -6
- package/build/esm/Select/context.js.map +1 -1
- package/build/esm/Select/defaultRender.js +12 -10
- package/build/esm/Select/defaultRender.js.map +1 -1
- package/build/esm/Select/styledComponents.d.ts +2 -2
- package/build/esm/Select/styledComponents.js +16 -19
- package/build/esm/Select/styledComponents.js.map +1 -1
- package/build/esm/SelectItem/SelectItem.d.ts +2 -2
- package/build/esm/SelectItem/SelectItem.js +18 -19
- package/build/esm/SelectItem/SelectItem.js.map +1 -1
- package/build/esm/SelectionControl/SelectionControlLabel.d.ts +3 -3
- package/build/esm/SelectionControl/SelectionControlLabel.js +7 -7
- package/build/esm/SelectionControl/SelectionControlLabel.js.map +1 -1
- package/build/esm/SelectionControl/SelectionControlText.d.ts +3 -3
- package/build/esm/SelectionControl/SelectionControlText.js +8 -8
- package/build/esm/SelectionControl/SelectionControlText.js.map +1 -1
- package/build/esm/Skeleton/DelayAppearance.d.ts +4 -4
- package/build/esm/Skeleton/DelayAppearance.js +9 -9
- package/build/esm/Skeleton/DelayAppearance.js.map +1 -1
- package/build/esm/Skeleton/Skeleton.d.ts +3 -3
- package/build/esm/Skeleton/Skeleton.js +11 -10
- package/build/esm/Skeleton/Skeleton.js.map +1 -1
- package/build/esm/Skeleton/animation.d.ts +2 -2
- package/build/esm/Skeleton/animation.js +25 -22
- package/build/esm/Skeleton/animation.js.map +1 -1
- package/build/esm/Snackbar/Snackbar.d.ts +3 -3
- package/build/esm/Snackbar/Snackbar.js +24 -24
- package/build/esm/Snackbar/Snackbar.js.map +1 -1
- package/build/esm/Snackbar/Stack.d.ts +2 -3
- package/build/esm/Snackbar/Stack.js +78 -65
- package/build/esm/Snackbar/Stack.js.map +1 -1
- package/build/esm/Snackbar/useSnackbarAnimation.d.ts +1 -1
- package/build/esm/Snackbar/useSnackbarAnimation.js +113 -78
- package/build/esm/Snackbar/useSnackbarAnimation.js.map +1 -1
- package/build/esm/Switch/Switch.d.ts +3 -3
- package/build/esm/Switch/Switch.js +29 -28
- package/build/esm/Switch/Switch.js.map +1 -1
- package/build/esm/Switch/styledComponents.d.ts +2 -2
- package/build/esm/Switch/styledComponents.js +66 -40
- package/build/esm/Switch/styledComponents.js.map +1 -1
- package/build/esm/Tab/Tab.d.ts +4 -4
- package/build/esm/Tab/Tab.js +17 -19
- package/build/esm/Tab/Tab.js.map +1 -1
- package/build/esm/Tab/TabList.d.ts +3 -3
- package/build/esm/Tab/TabList.js +18 -19
- package/build/esm/Tab/TabList.js.map +1 -1
- package/build/esm/Tab/TabPanel.d.ts +3 -3
- package/build/esm/Tab/TabPanel.js +8 -11
- package/build/esm/Tab/TabPanel.js.map +1 -1
- package/build/esm/Tab/context.js +6 -5
- package/build/esm/Tab/context.js.map +1 -1
- package/build/esm/TabIndicator/TabIndicator.d.ts +2 -2
- package/build/esm/TabIndicator/TabIndicator.js +22 -21
- package/build/esm/TabIndicator/TabIndicator.js.map +1 -1
- package/build/esm/TabIndicator/context.js +6 -5
- package/build/esm/TabIndicator/context.js.map +1 -1
- package/build/esm/Table/Table.d.ts +2 -2
- package/build/esm/Table/Table.js +8 -8
- package/build/esm/Table/Table.js.map +1 -1
- package/build/esm/Table/TableBody.d.ts +1 -1
- package/build/esm/Table/TableBody.js +4 -6
- package/build/esm/Table/TableBody.js.map +1 -1
- package/build/esm/Table/TableCell.d.ts +1 -1
- package/build/esm/Table/TableCell.js +6 -8
- package/build/esm/Table/TableCell.js.map +1 -1
- package/build/esm/Table/TableHead.d.ts +1 -1
- package/build/esm/Table/TableHead.js +5 -7
- package/build/esm/Table/TableHead.js.map +1 -1
- package/build/esm/Table/TableRow.d.ts +2 -2
- package/build/esm/Table/TableRow.js +5 -7
- package/build/esm/Table/TableRow.js.map +1 -1
- package/build/esm/Table/context.js +6 -5
- package/build/esm/Table/context.js.map +1 -1
- package/build/esm/Text/LoremIpsum.d.ts +1 -1
- package/build/esm/Text/LoremIpsum.js +6 -6
- package/build/esm/Text/LoremIpsum.js.map +1 -1
- package/build/esm/Text/Text.d.ts +3 -3
- package/build/esm/Text/Text.js +9 -9
- package/build/esm/Text/Text.js.map +1 -1
- package/build/esm/TextField/FilledContainer.d.ts +3 -3
- package/build/esm/TextField/FilledContainer.js +61 -57
- package/build/esm/TextField/FilledContainer.js.map +1 -1
- package/build/esm/TextField/HelperText.d.ts +3 -3
- package/build/esm/TextField/HelperText.js +14 -13
- package/build/esm/TextField/HelperText.js.map +1 -1
- package/build/esm/TextField/IconContainer.d.ts +2 -2
- package/build/esm/TextField/IconContainer.js +15 -23
- package/build/esm/TextField/IconContainer.js.map +1 -1
- package/build/esm/TextField/Input.d.ts +3 -3
- package/build/esm/TextField/Input.js +14 -14
- package/build/esm/TextField/Input.js.map +1 -1
- package/build/esm/TextField/OutlinedContainer.d.ts +4 -4
- package/build/esm/TextField/OutlinedContainer.js +28 -22
- package/build/esm/TextField/OutlinedContainer.js.map +1 -1
- package/build/esm/TextField/TextField.d.ts +4 -4
- package/build/esm/TextField/TextField.js +59 -41
- package/build/esm/TextField/TextField.js.map +1 -1
- package/build/esm/TextField/consts.js +5 -5
- package/build/esm/TextField/consts.js.map +1 -1
- package/build/esm/ThemeExplorer/ColorPicker.d.ts +4 -4
- package/build/esm/ThemeExplorer/ColorPicker.js +16 -16
- package/build/esm/ThemeExplorer/ColorPicker.js.map +1 -1
- package/build/esm/ThemeExplorer/TextFieldColorPicker.d.ts +2 -2
- package/build/esm/ThemeExplorer/TextFieldColorPicker.js +49 -29
- package/build/esm/ThemeExplorer/TextFieldColorPicker.js.map +1 -1
- package/build/esm/ThemeExplorer/ThemeColors.d.ts +1 -1
- package/build/esm/ThemeExplorer/ThemeColors.js +3 -3
- package/build/esm/ThemeExplorer/ThemeColors.js.map +1 -1
- package/build/esm/ThemeExplorer/components.d.ts +2 -1
- package/build/esm/ThemeExplorer/components.js +64 -56
- package/build/esm/ThemeExplorer/components.js.map +1 -1
- package/build/esm/ThemeExplorer/makeColorScheme.d.ts +1 -1
- package/build/esm/ThemeExplorer/makeColorScheme.js.map +1 -1
- package/build/esm/ThemeExplorer/useDeferredColor.d.ts +1 -1
- package/build/esm/ThemeExplorer/useDeferredColor.js +10 -3
- package/build/esm/ThemeExplorer/useDeferredColor.js.map +1 -1
- package/build/esm/ThemeExplorer/useLocalStorageCachedState.js +9 -2
- package/build/esm/ThemeExplorer/useLocalStorageCachedState.js.map +1 -1
- package/build/esm/Tooltip/Tooltip.d.ts +3 -3
- package/build/esm/Tooltip/Tooltip.js +7 -8
- package/build/esm/Tooltip/Tooltip.js.map +1 -1
- package/build/esm/color.d.ts +5 -4
- package/build/esm/color.js +26 -16
- package/build/esm/color.js.map +1 -1
- package/build/esm/hooks/useAnimation.d.ts +1 -1
- package/build/esm/hooks/useAnimation.js +54 -41
- package/build/esm/hooks/useAnimation.js.map +1 -1
- package/build/esm/theme/theme.d.ts +96 -50
- package/build/esm/theme/theme.js +134 -94
- package/build/esm/theme/theme.js.map +1 -1
- package/build/esm/theme/typography-raleway.js +1 -1
- package/build/esm/theme/typography-raleway.js.map +1 -1
- package/build/esm/theme/typography-roboto.js +1 -1
- package/build/esm/theme/typography-roboto.js.map +1 -1
- package/build/esm/theme/useTheme.d.ts +1 -1
- package/build/esm/theme/useTheme.js +1 -1
- package/build/esm/theme/useTheme.js.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/package.json +6 -4
- package/src/Alert/Alert.tsx +4 -2
- package/src/AppBar/AppBar.story.tsx +7 -6
- package/src/AppBar/AppBar.tsx +10 -9
- package/src/AppBar/AppBarButton.tsx +3 -1
- package/src/AppBar/context.ts +2 -1
- package/src/Badge/Badge.tsx +3 -1
- package/src/BaseLine/BaseLine.tsx +15 -11
- package/src/BottomSheet/BottomSheet.story.tsx +1 -0
- package/src/BottomSheet/BottomSheet.tsx +2 -1
- package/src/BottomSheet/BottomSheetSurface.tsx +9 -5
- package/src/Box/Box.tsx +21 -18
- package/src/Button/BaseButton.tsx +5 -2
- package/src/Button/Button.story.tsx +35 -35
- package/src/Button/Button.tsx +23 -8
- package/src/Button/ButtonGroup.story.tsx +106 -0
- package/src/Button/ButtonGroup.tsx +35 -0
- package/src/Button/FilledButton.tsx +41 -6
- package/src/Button/FloatingActionButton.tsx +9 -0
- package/src/Button/IconButton.tsx +2 -1
- package/src/Button/OutlinedButton.tsx +33 -4
- package/src/Button/SpinnerButton.story.tsx +10 -11
- package/src/Button/TransparentButton.tsx +35 -4
- package/src/Button/context.tsx +17 -0
- package/src/Button/index.ts +1 -0
- package/src/CheckBox/CheckBox.story.tsx +3 -2
- package/src/CheckBox/CheckBox.tsx +10 -6
- package/src/CheckBox/CheckBoxIcon.tsx +4 -2
- package/src/Chip/ButtonChip.tsx +47 -51
- package/src/Chip/Chip.story.tsx +48 -27
- package/src/Chip/ChipBase.tsx +44 -14
- package/src/Chip/ChoiceChip.tsx +28 -24
- package/src/ColorMode/ColorModeProvider.tsx +4 -2
- package/src/Combobox/Combobox.story.tsx +2 -1
- package/src/Combobox/Combobox.tsx +30 -18
- package/src/Dialog/Dialog.story.tsx +3 -1
- package/src/Dialog/Dialog.tsx +9 -4
- package/src/Dialog/DialogBackdrop.tsx +6 -6
- package/src/Dialog/DialogContainer.tsx +3 -1
- package/src/Dialog/DialogSurface.tsx +26 -9
- package/src/Dialog/Scrim.tsx +3 -1
- package/src/Divider/Divider.tsx +4 -2
- package/src/FloatingLabel/FloatingLabel.story.tsx +1 -0
- package/src/FloatingLabel/FloatingLabel.tsx +3 -2
- package/src/LineRipple/LineRipple.story.tsx +1 -0
- package/src/LineRipple/LineRipple.tsx +6 -3
- package/src/Link/Link.tsx +4 -2
- package/src/List/List.tsx +5 -2
- package/src/ListItem/ListItem.story.tsx +1 -0
- package/src/ListItem/ListItem.tsx +59 -34
- package/src/ListItem/ListItemText.tsx +4 -5
- package/src/Menu/Menu.tsx +21 -14
- package/src/Menu/animation.ts +1 -1
- package/src/NotchedOutline/NotchedOutline.story.tsx +3 -2
- package/src/NotchedOutline/NotchedOutline.tsx +2 -1
- package/src/NotchedOutline/styledComponents.ts +8 -7
- package/src/Paper/Paper.story.tsx +17 -3
- package/src/Paper/Paper.tsx +22 -5
- package/src/ProgressSpinner/ProgressSpinner.story.tsx +1 -0
- package/src/ProgressSpinner/ProgressSpinner.tsx +5 -2
- package/src/RadioButton/RadioButton.story.tsx +2 -1
- package/src/RadioButton/RadioButton.tsx +10 -8
- package/src/RadioButton/RadioButtonIcon.tsx +4 -3
- package/src/RadioButton/RadioGroup.tsx +5 -5
- package/src/Ripple/Ripple.story.tsx +9 -3
- package/src/Ripple/Ripple.tsx +3 -2
- package/src/Ripple/RippleBox.tsx +9 -4
- package/src/Ripple/keyframes.ts +2 -1
- package/src/Ripple/useRipple.ts +1 -0
- package/src/Ripple/useRippleHandlers.ts +3 -1
- package/src/Ripple/useRippleSurface.ts +39 -13
- package/src/Select/PaymentMethodSelect.story.tsx +3 -1
- package/src/Select/Select.story.tsx +1 -0
- package/src/Select/Select.tsx +6 -4
- package/src/Select/SelectIcon.tsx +6 -3
- package/src/Select/defaultRender.ts +13 -13
- package/src/Select/styledComponents.tsx +5 -3
- package/src/SelectItem/SelectItem.tsx +4 -2
- package/src/SelectionControl/SelectionControlLabel.tsx +6 -3
- package/src/SelectionControl/SelectionControlText.tsx +4 -2
- package/src/Skeleton/DelayAppearance.tsx +5 -3
- package/src/Skeleton/Skeleton.story.tsx +2 -2
- package/src/Skeleton/Skeleton.tsx +4 -2
- package/src/Skeleton/animation.ts +3 -2
- package/src/Snackbar/Snackbar.story.tsx +1 -0
- package/src/Snackbar/Snackbar.tsx +8 -6
- package/src/Snackbar/Stack.tsx +3 -3
- package/src/Snackbar/useSnackbarAnimation.ts +3 -1
- package/src/Switch/Switch.tsx +16 -11
- package/src/Switch/styledComponents.tsx +72 -22
- package/src/Tab/Tab.tsx +8 -4
- package/src/Tab/TabList.tsx +5 -5
- package/src/Tab/TabPanel.tsx +5 -5
- package/src/TabIndicator/TabIndicator.tsx +6 -3
- package/src/Table/Table.tsx +5 -2
- package/src/Table/TableBody.tsx +3 -1
- package/src/Table/TableCell.tsx +3 -1
- package/src/Table/TableHead.tsx +4 -2
- package/src/Table/TableRow.tsx +4 -2
- package/src/Text/LoremIpsum.tsx +2 -1
- package/src/Text/Text.tsx +4 -2
- package/src/TextField/FilledContainer.tsx +13 -8
- package/src/TextField/HelperText.tsx +3 -2
- package/src/TextField/IconContainer.tsx +3 -2
- package/src/TextField/Input.tsx +9 -4
- package/src/TextField/OutlinedContainer.tsx +5 -3
- package/src/TextField/TextField.story.tsx +1 -0
- package/src/TextField/TextField.tsx +6 -3
- package/src/ThemeExplorer/ColorPicker.tsx +104 -0
- package/src/ThemeExplorer/TextFieldColorPicker.tsx +115 -0
- package/src/ThemeExplorer/ThemeBuilder.story.tsx +165 -0
- package/src/ThemeExplorer/ThemeColors.tsx +89 -0
- package/src/ThemeExplorer/ThemeExplorer.story.tsx +43 -0
- package/src/ThemeExplorer/components.tsx +195 -0
- package/src/ThemeExplorer/makeColorScheme.tsx +74 -0
- package/src/ThemeExplorer/useDeferredColor.tsx +25 -0
- package/src/ThemeExplorer/useLocalStorageCachedState.ts +18 -0
- package/src/Tooltip/Tooltip.story.tsx +1 -0
- package/src/Tooltip/Tooltip.tsx +8 -4
- package/src/color.ts +36 -29
- package/src/hooks/useAnimation.ts +2 -1
- package/src/theme/theme.ts +131 -92
- package/src/theme/useTheme.ts +3 -1
- package/src/ListItem/context.ts +0 -13
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { forwardRef } from 'react';
|
|
2
|
-
import { MenuItem, MenuItemProps } from '../Menu';
|
|
3
|
-
import { useSelectContext } from '../Select/context';
|
|
4
2
|
import { wrapEvent } from '@basic-ui/core';
|
|
5
3
|
|
|
4
|
+
import type { MenuItemProps } from '../Menu';
|
|
5
|
+
import { MenuItem } from '../Menu';
|
|
6
|
+
import { useSelectContext } from '../Select/context';
|
|
7
|
+
|
|
6
8
|
export type SelectItemProps = MenuItemProps;
|
|
7
9
|
|
|
8
10
|
const ZERO_WIDTH_SPACE = '\u200b';
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import type { LabelHTMLAttributes } from 'react';
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
|
|
5
|
+
import type { BoxProps } from '../Box';
|
|
6
|
+
import { Box } from '../Box';
|
|
4
7
|
|
|
5
8
|
export interface SelectionControlLabelProps
|
|
6
9
|
extends BoxProps<
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { forwardRef } from 'react';
|
|
2
|
-
import
|
|
3
|
-
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
|
|
4
|
+
import type { TextProps } from '../Text';
|
|
5
|
+
import { Text } from '../Text';
|
|
4
6
|
import { alpha } from '../color';
|
|
5
7
|
|
|
6
8
|
export interface SelectionControlTextProps extends TextProps {
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { forwardRef } from 'react';
|
|
2
|
-
import
|
|
3
|
-
import { BoxProps, Box } from '../Box';
|
|
2
|
+
import * as React from 'react';
|
|
4
3
|
import { keyframes } from '@emotion/react';
|
|
5
|
-
import { Keyframes } from '@emotion/serialize';
|
|
4
|
+
import type { Keyframes } from '@emotion/serialize';
|
|
5
|
+
|
|
6
|
+
import type { BoxProps } from '../Box';
|
|
7
|
+
import { Box } from '../Box';
|
|
6
8
|
|
|
7
9
|
export const appearAnimation: Keyframes = keyframes({
|
|
8
10
|
to: {
|
|
@@ -20,11 +20,11 @@ const Skeletons = ({
|
|
|
20
20
|
animation={animation}
|
|
21
21
|
width={60}
|
|
22
22
|
height={60}
|
|
23
|
-
borderRadius="
|
|
23
|
+
borderRadius="full"
|
|
24
24
|
m={2}
|
|
25
25
|
/>
|
|
26
26
|
<Skeleton animation={animation} m={2}>
|
|
27
|
-
<Box width={60} height={60} borderRadius="
|
|
27
|
+
<Box width={60} height={60} borderRadius="full" />
|
|
28
28
|
</Skeleton>
|
|
29
29
|
</Box>
|
|
30
30
|
);
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { forwardRef } from 'react';
|
|
2
|
-
import
|
|
3
|
-
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
|
|
4
|
+
import type { BoxProps } from '../Box';
|
|
5
|
+
import { Box } from '../Box';
|
|
4
6
|
import { alpha } from '../color';
|
|
5
7
|
import { useTheme } from '../theme';
|
|
6
8
|
import { pulseAnimationStyle, waveAnimationStyle } from './animation';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { keyframes } from '@emotion/react';
|
|
2
|
-
import { Keyframes } from '@emotion/serialize';
|
|
3
|
-
import { SystemStyleObject } from '@styled-system/css';
|
|
2
|
+
import type { Keyframes } from '@emotion/serialize';
|
|
3
|
+
import type { SystemStyleObject } from '@styled-system/css';
|
|
4
|
+
|
|
4
5
|
import { alpha } from '../color';
|
|
5
6
|
|
|
6
7
|
export const pulseAnimation: Keyframes = keyframes({
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import { assignMultipleRefs } from '@basic-ui/core';
|
|
2
2
|
import { rem } from 'polished';
|
|
3
3
|
import { cloneElement, forwardRef, useRef } from 'react';
|
|
4
|
-
import
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
|
|
5
6
|
import { Box } from '../Box';
|
|
6
7
|
import {
|
|
7
8
|
DARK_THEME_CLASS,
|
|
8
9
|
DEFAULT_THEME_CLASS,
|
|
9
10
|
useColorMode,
|
|
10
11
|
} from '../ColorMode';
|
|
11
|
-
import {
|
|
12
|
+
import type { PaperProps } from '../Paper';
|
|
13
|
+
import { Paper } from '../Paper';
|
|
12
14
|
import { Text } from '../Text';
|
|
13
15
|
import { useSnackbarAnimation } from './useSnackbarAnimation';
|
|
14
16
|
|
|
@@ -39,21 +41,21 @@ export const Snackbar = forwardRef<HTMLDivElement, SnackbarProps>(
|
|
|
39
41
|
|
|
40
42
|
return (
|
|
41
43
|
<Paper
|
|
42
|
-
elevation={
|
|
43
|
-
|
|
44
|
+
elevation={4}
|
|
45
|
+
darkThemeBackgroundOverlay={4}
|
|
44
46
|
className={
|
|
45
47
|
colorMode === 'default' ? DARK_THEME_CLASS : DEFAULT_THEME_CLASS
|
|
46
48
|
}
|
|
47
49
|
ref={assignMultipleRefs(forwardedRef, ref)}
|
|
48
50
|
__css={{
|
|
49
|
-
boxShadow:
|
|
51
|
+
boxShadow: 4,
|
|
50
52
|
py: rem(6),
|
|
51
53
|
pl: 3,
|
|
52
54
|
pr: 3,
|
|
53
55
|
display: 'inline-flex',
|
|
54
56
|
minWidth: `min(100%, ${rem(344)})`,
|
|
55
57
|
maxWidth: ['100%', 'unset'],
|
|
56
|
-
borderRadius:
|
|
58
|
+
borderRadius: 'extra-small',
|
|
57
59
|
color: 'on.surface',
|
|
58
60
|
flexDirection: 'row',
|
|
59
61
|
willChange: 'transform,opacity',
|
package/src/Snackbar/Stack.tsx
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { MutableRefObject, ReactElement,
|
|
2
|
-
import type * as React from 'react';
|
|
1
|
+
import type { MutableRefObject, ReactElement, FC } from 'react';
|
|
3
2
|
import {
|
|
3
|
+
useLayoutEffect,
|
|
4
4
|
createContext,
|
|
5
|
-
FC,
|
|
6
5
|
useContext,
|
|
7
6
|
useEffect,
|
|
8
7
|
useRef,
|
|
9
8
|
useState,
|
|
10
9
|
} from 'react';
|
|
10
|
+
import * as React from 'react';
|
|
11
11
|
|
|
12
12
|
export type StackPlacement =
|
|
13
13
|
| 'top-right'
|
package/src/Switch/Switch.tsx
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { Box, BoxProps } from '../Box';
|
|
5
|
-
import { useTheme } from '../theme';
|
|
6
|
-
import { rem } from 'polished';
|
|
1
|
+
import type { InputHTMLAttributes } from 'react';
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import * as React from 'react';
|
|
7
4
|
import { CheckBox as _CheckBoxCore } from '@basic-ui/core';
|
|
5
|
+
|
|
6
|
+
import type { RippleBoxProps } from '../Ripple';
|
|
7
|
+
import { RippleBox } from '../Ripple';
|
|
8
|
+
import type { BoxProps } from '../Box';
|
|
9
|
+
import { Box } from '../Box';
|
|
10
|
+
import { useTheme } from '../theme';
|
|
8
11
|
import {
|
|
9
12
|
SelectionControlLabel,
|
|
10
13
|
SelectionControlText,
|
|
@@ -42,8 +45,8 @@ const SwitchInner = forwardRef<HTMLInputElement, SwitchProps>(
|
|
|
42
45
|
|
|
43
46
|
return (
|
|
44
47
|
<Box p={2} display="inline-block" minWidth="auto">
|
|
45
|
-
<Box position="relative"
|
|
46
|
-
<SwitchTrail checked={checked} />
|
|
48
|
+
<Box position="relative">
|
|
49
|
+
<SwitchTrail checked={checked} disabled={disabled} />
|
|
47
50
|
<SwitchThumb checked={checked}>
|
|
48
51
|
<RippleBox<
|
|
49
52
|
RippleBoxProps<
|
|
@@ -52,6 +55,7 @@ const SwitchInner = forwardRef<HTMLInputElement, SwitchProps>(
|
|
|
52
55
|
>
|
|
53
56
|
>
|
|
54
57
|
as={Comp}
|
|
58
|
+
role="switch"
|
|
55
59
|
type="checkbox"
|
|
56
60
|
checked={checked}
|
|
57
61
|
onChange={onChange}
|
|
@@ -64,20 +68,21 @@ const SwitchInner = forwardRef<HTMLInputElement, SwitchProps>(
|
|
|
64
68
|
focusOpacity={0.12}
|
|
65
69
|
center={true}
|
|
66
70
|
disabled={disabled}
|
|
71
|
+
data-switch-thumb=""
|
|
67
72
|
{...otherProps}
|
|
68
73
|
__css={{
|
|
69
74
|
top: '50%',
|
|
70
75
|
left: '50%',
|
|
71
76
|
backgroundColor: 'transparent',
|
|
72
77
|
transform: 'translate(-50%, -50%)',
|
|
73
|
-
width:
|
|
74
|
-
height:
|
|
78
|
+
width: '100%',
|
|
79
|
+
height: '100%',
|
|
75
80
|
appearance: 'none',
|
|
76
81
|
':focus': {
|
|
77
82
|
outline: 'none',
|
|
78
83
|
},
|
|
79
84
|
border: 'none',
|
|
80
|
-
borderRadius: '
|
|
85
|
+
borderRadius: 'full',
|
|
81
86
|
zIndex: 1,
|
|
82
87
|
position: 'absolute',
|
|
83
88
|
...__css,
|
|
@@ -1,33 +1,59 @@
|
|
|
1
1
|
import { rem } from 'polished';
|
|
2
|
+
|
|
2
3
|
import { Box } from '../Box';
|
|
3
4
|
|
|
4
|
-
|
|
5
|
+
const BORDER_WIDTH = 2;
|
|
6
|
+
const TRAIL_WIDTH = 52;
|
|
7
|
+
const TRAIL_HEIGHT = 32;
|
|
8
|
+
const CIRCLE_SIZE_INACTIVE_CHECKED = 24;
|
|
9
|
+
const CIRCLE_SIZE_ACTIVE_CHECKED = 28;
|
|
10
|
+
const CIRCLE_SIZE_INACTIVE_UNCHECKED = 16;
|
|
11
|
+
const CIRCLE_SIZE_ACTIVE_UNCHECKED = 28;
|
|
12
|
+
|
|
13
|
+
export const SwitchTrail = ({
|
|
14
|
+
checked = false,
|
|
15
|
+
disabled = false,
|
|
16
|
+
...otherProps
|
|
17
|
+
}) => (
|
|
5
18
|
<Box
|
|
6
19
|
__css={{
|
|
7
|
-
width: rem(
|
|
8
|
-
height: rem(
|
|
9
|
-
borderRadius: rem(
|
|
10
|
-
|
|
11
|
-
|
|
20
|
+
width: rem(TRAIL_WIDTH),
|
|
21
|
+
height: rem(TRAIL_HEIGHT),
|
|
22
|
+
borderRadius: rem(TRAIL_HEIGHT / 2),
|
|
23
|
+
borderWidth: rem(BORDER_WIDTH),
|
|
24
|
+
borderStyle: 'solid',
|
|
25
|
+
backgroundColor: checked ? 'primary' : 'surface-variant',
|
|
26
|
+
borderColor: checked ? 'primary' : 'outline',
|
|
27
|
+
...(disabled && {
|
|
28
|
+
opacity: 0.12,
|
|
29
|
+
backgroundColor: checked ? 'on.surface' : 'surface-variant',
|
|
30
|
+
borderColor: 'on.surface',
|
|
31
|
+
}),
|
|
12
32
|
}}
|
|
13
33
|
{...otherProps}
|
|
14
34
|
/>
|
|
15
35
|
);
|
|
16
36
|
|
|
37
|
+
const THUMB_SIZE = 40;
|
|
17
38
|
export const SwitchThumb = ({ checked = false, ...otherProps }) => (
|
|
18
39
|
<Box
|
|
19
40
|
position="absolute"
|
|
20
|
-
width={rem(
|
|
21
|
-
height={rem(
|
|
22
|
-
borderRadius=
|
|
23
|
-
left={
|
|
24
|
-
top={
|
|
41
|
+
width={rem(THUMB_SIZE)}
|
|
42
|
+
height={rem(THUMB_SIZE)}
|
|
43
|
+
borderRadius="full"
|
|
44
|
+
left={'50%'}
|
|
45
|
+
top={'50%'}
|
|
25
46
|
__css={{
|
|
26
|
-
|
|
27
|
-
|
|
47
|
+
transform: `translateX(calc(-50% ${checked ? '+' : '-'} ${rem(
|
|
48
|
+
(TRAIL_WIDTH - CIRCLE_SIZE_INACTIVE_CHECKED - BORDER_WIDTH * 4) / 2
|
|
49
|
+
)})) translateY(-50%)`,
|
|
28
50
|
WebkitTapHighlightColor: 'transparent',
|
|
29
51
|
transition:
|
|
30
|
-
'background-color 90ms cubic-bezier(.4,0,.2,1),border-color 90ms cubic-bezier(.4,0,.2,1),transform 90ms cubic-bezier(.4,0,.2,1)',
|
|
52
|
+
'background-color 90ms cubic-bezier(.4,0,.2,1),border-color 90ms cubic-bezier(.4,0,.2,1),transform 90ms cubic-bezier(.4,0,.2,1),height 90ms cubic-bezier(.4,0,.2,1),width 90ms cubic-bezier(.4,0,.2,1)',
|
|
53
|
+
'& > input': {
|
|
54
|
+
width: THUMB_SIZE,
|
|
55
|
+
height: THUMB_SIZE,
|
|
56
|
+
},
|
|
31
57
|
}}
|
|
32
58
|
{...otherProps}
|
|
33
59
|
/>
|
|
@@ -37,22 +63,46 @@ export const SwitchCircle = ({ checked = false, ...otherProps }) => (
|
|
|
37
63
|
<Box
|
|
38
64
|
__css={{
|
|
39
65
|
position: 'absolute',
|
|
40
|
-
width:
|
|
41
|
-
|
|
42
|
-
|
|
66
|
+
width: checked
|
|
67
|
+
? rem(CIRCLE_SIZE_INACTIVE_CHECKED)
|
|
68
|
+
: rem(CIRCLE_SIZE_INACTIVE_UNCHECKED),
|
|
69
|
+
height: checked
|
|
70
|
+
? rem(CIRCLE_SIZE_INACTIVE_CHECKED)
|
|
71
|
+
: rem(CIRCLE_SIZE_INACTIVE_UNCHECKED),
|
|
43
72
|
boxSizing: 'border-box',
|
|
44
|
-
|
|
45
|
-
borderStyle: 'solid',
|
|
46
|
-
borderRadius: '50%',
|
|
73
|
+
borderRadius: 'full',
|
|
47
74
|
pointerEvents: 'none',
|
|
48
75
|
zIndex: 1,
|
|
49
|
-
backgroundColor: checked ? 'primary' : '
|
|
50
|
-
borderColor: checked ? 'primary' : '#fff',
|
|
76
|
+
backgroundColor: checked ? 'on.primary' : 'outline',
|
|
51
77
|
top: '50%',
|
|
52
78
|
left: '50%',
|
|
53
79
|
transform: 'translate(-50%, -50%)',
|
|
54
80
|
transition: 'inherit',
|
|
81
|
+
'[data-switch-thumb=""]:active ~ &, [data-switch-thumb=""]:focus-visible ~ &, [data-switch-thumb=""]:hover ~ &':
|
|
82
|
+
{
|
|
83
|
+
backgroundColor: checked ? 'primary-container' : 'on.surface-variant',
|
|
84
|
+
},
|
|
85
|
+
'[data-switch-thumb=""]:active ~ &, [data-switch-thumb=""]:focus-visible ~ &':
|
|
86
|
+
{
|
|
87
|
+
height: checked
|
|
88
|
+
? CIRCLE_SIZE_ACTIVE_CHECKED
|
|
89
|
+
: CIRCLE_SIZE_ACTIVE_UNCHECKED,
|
|
90
|
+
width: checked
|
|
91
|
+
? CIRCLE_SIZE_ACTIVE_CHECKED
|
|
92
|
+
: CIRCLE_SIZE_ACTIVE_UNCHECKED,
|
|
93
|
+
},
|
|
94
|
+
'[data-switch-thumb=""]:disabled ~ &': {
|
|
95
|
+
opacity: checked ? 1 : 0.38,
|
|
96
|
+
backgroundColor: checked ? 'surface' : 'on.surface',
|
|
97
|
+
height: checked
|
|
98
|
+
? CIRCLE_SIZE_INACTIVE_CHECKED
|
|
99
|
+
: CIRCLE_SIZE_INACTIVE_UNCHECKED,
|
|
100
|
+
width: checked
|
|
101
|
+
? CIRCLE_SIZE_INACTIVE_CHECKED
|
|
102
|
+
: CIRCLE_SIZE_INACTIVE_UNCHECKED,
|
|
103
|
+
},
|
|
55
104
|
}}
|
|
105
|
+
data-switch-circle=""
|
|
56
106
|
role="presentation"
|
|
57
107
|
aria-hidden="true"
|
|
58
108
|
{...otherProps}
|
package/src/Tab/Tab.tsx
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import { ButtonHTMLAttributes
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
1
|
+
import type { ButtonHTMLAttributes } from 'react';
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import type { TabProps as TabPropsCore } from '@basic-ui/core';
|
|
5
|
+
import { Tab as TabCore } from '@basic-ui/core';
|
|
5
6
|
import { rem } from 'polished';
|
|
7
|
+
|
|
8
|
+
import type { RippleBoxProps } from '../Ripple';
|
|
9
|
+
import { RippleBox } from '../Ripple';
|
|
6
10
|
import { alpha } from '../color';
|
|
7
11
|
import { Text } from '../Text';
|
|
8
12
|
import { Box } from '../Box';
|
package/src/Tab/TabList.tsx
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { forwardRef, useRef } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
TabListProps as TabListPropsCore,
|
|
5
|
-
} from '@basic-ui/core';
|
|
6
|
-
import { Box, BoxProps } from '../Box';
|
|
2
|
+
import type { TabListProps as TabListPropsCore } from '@basic-ui/core';
|
|
3
|
+
import { TabList as TabListCore } from '@basic-ui/core';
|
|
7
4
|
import { rem } from 'polished';
|
|
5
|
+
|
|
6
|
+
import type { BoxProps } from '../Box';
|
|
7
|
+
import { Box } from '../Box';
|
|
8
8
|
import { TabIndicatorProvider } from '../TabIndicator';
|
|
9
9
|
import { TabListProvider } from './context';
|
|
10
10
|
|
package/src/Tab/TabPanel.tsx
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { forwardRef } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
} from '
|
|
6
|
-
import { Box
|
|
2
|
+
import type { TabPanelProps as TabPanelPropsCore } from '@basic-ui/core';
|
|
3
|
+
import { TabPanel as TabPanelCore } from '@basic-ui/core';
|
|
4
|
+
|
|
5
|
+
import type { BoxProps } from '../Box';
|
|
6
|
+
import { Box } from '../Box';
|
|
7
7
|
|
|
8
8
|
export type TabPanelProps = TabPanelPropsCore & BoxProps;
|
|
9
9
|
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { forwardRef, useEffect, useRef, useLayoutEffect } from 'react';
|
|
2
|
-
import { Box, BoxProps } from '../Box';
|
|
3
2
|
import { rem } from 'polished';
|
|
4
|
-
import { useTabIndicatorContext } from './context';
|
|
5
3
|
import { assignMultipleRefs } from '@basic-ui/core';
|
|
6
4
|
|
|
5
|
+
import type { BoxProps } from '../Box';
|
|
6
|
+
import { Box } from '../Box';
|
|
7
|
+
import { useTabIndicatorContext } from './context';
|
|
8
|
+
|
|
7
9
|
export interface TabIndicatorProps extends BoxProps {
|
|
8
10
|
selected?: boolean;
|
|
9
11
|
color?: string;
|
|
@@ -22,7 +24,8 @@ export const TabIndicator = forwardRef<HTMLDivElement, TabIndicatorProps>(
|
|
|
22
24
|
if (selected && ref.current) {
|
|
23
25
|
if (currentIndicator.current !== null) {
|
|
24
26
|
// We are switching indicator, let's slide!
|
|
25
|
-
const previousClientRect =
|
|
27
|
+
const previousClientRect =
|
|
28
|
+
currentIndicator.current.getBoundingClientRect();
|
|
26
29
|
const currentClientRect = ref.current.getBoundingClientRect();
|
|
27
30
|
const widthDelta = previousClientRect.width / currentClientRect.width;
|
|
28
31
|
const xPosition = previousClientRect.left - currentClientRect.left;
|
package/src/Table/Table.tsx
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { forwardRef } from 'react';
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
import type { PaperProps } from '../Paper';
|
|
4
|
+
import { Paper } from '../Paper';
|
|
3
5
|
|
|
4
6
|
export type TableProps = PaperProps;
|
|
5
7
|
|
|
6
8
|
export const Table = forwardRef<HTMLDivElement, TableProps>((props, ref) => {
|
|
7
|
-
const { children, elevation =
|
|
9
|
+
const { children, elevation = 1, ...rest } = props;
|
|
8
10
|
|
|
9
11
|
return (
|
|
10
12
|
<Paper
|
|
@@ -14,6 +16,7 @@ export const Table = forwardRef<HTMLDivElement, TableProps>((props, ref) => {
|
|
|
14
16
|
width="100%"
|
|
15
17
|
flexDirection="column"
|
|
16
18
|
elevation={elevation}
|
|
19
|
+
darkThemeBackgroundOverlay={elevation}
|
|
17
20
|
{...rest}
|
|
18
21
|
>
|
|
19
22
|
{children}
|
package/src/Table/TableBody.tsx
CHANGED
package/src/Table/TableCell.tsx
CHANGED
package/src/Table/TableHead.tsx
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { forwardRef } from 'react';
|
|
2
|
+
import { rem } from 'polished';
|
|
3
|
+
|
|
2
4
|
import { TableHeadProvider } from './context';
|
|
3
|
-
import {
|
|
5
|
+
import type { TableBodyProps } from './TableBody';
|
|
6
|
+
import { TableBody } from './TableBody';
|
|
4
7
|
import { alpha } from '../color';
|
|
5
|
-
import { rem } from 'polished';
|
|
6
8
|
|
|
7
9
|
export type TableHeadProps = TableBodyProps;
|
|
8
10
|
|
package/src/Table/TableRow.tsx
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { forwardRef } from 'react';
|
|
2
|
-
import { Text, TextProps } from '../Text';
|
|
3
|
-
import { alpha } from '../color';
|
|
4
2
|
import { rem } from 'polished';
|
|
5
3
|
|
|
4
|
+
import type { TextProps } from '../Text';
|
|
5
|
+
import { Text } from '../Text';
|
|
6
|
+
import { alpha } from '../color';
|
|
7
|
+
|
|
6
8
|
export type TableRowProps = TextProps;
|
|
7
9
|
|
|
8
10
|
export const TableRow = forwardRef<HTMLDivElement, TableRowProps>(
|
package/src/Text/LoremIpsum.tsx
CHANGED
package/src/Text/Text.tsx
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { forwardRef } from 'react';
|
|
2
|
-
import
|
|
3
|
-
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
|
|
4
|
+
import type { BoxProps } from '../Box';
|
|
5
|
+
import { Box } from '../Box';
|
|
4
6
|
|
|
5
7
|
export type TextVariants =
|
|
6
8
|
| 'h1'
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { forwardRef } from 'react';
|
|
2
|
-
import
|
|
2
|
+
import * as React from 'react';
|
|
3
3
|
import { get } from '@styled-system/css';
|
|
4
|
+
import { rem } from 'polished';
|
|
5
|
+
|
|
4
6
|
import { useTheme } from '../theme';
|
|
5
7
|
import { FloatingLabel } from '../FloatingLabel';
|
|
6
8
|
import { LineRipple } from '../LineRipple';
|
|
7
|
-
import { rem } from 'polished';
|
|
8
9
|
import { alpha } from '../color';
|
|
9
|
-
import {
|
|
10
|
+
import type { BoxProps } from '../Box';
|
|
11
|
+
import { Box } from '../Box';
|
|
10
12
|
import {
|
|
11
13
|
ICON_WIDTH,
|
|
12
14
|
PADDING_LEFT_WITHOUT_ICON,
|
|
@@ -38,7 +40,7 @@ const Overlay = (props: { forceActive?: boolean }) => {
|
|
|
38
40
|
right: 0,
|
|
39
41
|
backgroundColor: 'on.surface',
|
|
40
42
|
pointerEvents: 'none',
|
|
41
|
-
opacity: 0
|
|
43
|
+
opacity: 0,
|
|
42
44
|
[makeSelector('hover:not([disabled]):not(:focus)')]: !forceActive && {
|
|
43
45
|
opacity: get(theme, `buttons.overlays.filled.hover.opacity`),
|
|
44
46
|
},
|
|
@@ -120,14 +122,17 @@ export const FilledContainer = forwardRef<HTMLDivElement, FilledContainerProps>(
|
|
|
120
122
|
position: 'relative',
|
|
121
123
|
lineHeight: 0,
|
|
122
124
|
width: '100%',
|
|
123
|
-
backgroundColor: 'surface',
|
|
125
|
+
backgroundColor: 'surface-variant',
|
|
124
126
|
overflow: 'hidden',
|
|
125
127
|
boxSizing: 'border-box',
|
|
126
128
|
borderTopRightRadius: rem(4),
|
|
127
129
|
borderTopLeftRadius: rem(4),
|
|
128
|
-
color: alpha('on.surface', 0.
|
|
129
|
-
...(disabled && {
|
|
130
|
-
|
|
130
|
+
color: alpha('on.surface-variant', 0.87),
|
|
131
|
+
...(disabled && {
|
|
132
|
+
backgroundColor: alpha('on.surface-variant', 0.08),
|
|
133
|
+
color: alpha('on.surface-variant', 0.38),
|
|
134
|
+
}),
|
|
135
|
+
...(active && { color: 'primary' }),
|
|
131
136
|
}}
|
|
132
137
|
{...otherProps}
|
|
133
138
|
>
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { forwardRef } from 'react';
|
|
2
|
-
import
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
|
|
3
4
|
import { Box } from '../Box';
|
|
4
5
|
import { Text } from '../Text';
|
|
5
6
|
import { alpha } from '../color';
|
|
6
|
-
import { TextProps } from '../Text/Text';
|
|
7
|
+
import type { TextProps } from '../Text/Text';
|
|
7
8
|
|
|
8
9
|
export interface HelperTextProps extends TextProps {
|
|
9
10
|
children?: React.ReactNode;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { rem } from 'polished';
|
|
2
|
-
import { FC } from 'react';
|
|
3
|
-
import
|
|
2
|
+
import type { FC } from 'react';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
|
|
4
5
|
import { Box } from '../Box';
|
|
5
6
|
import { alpha } from '../color';
|
|
6
7
|
import { ICON_WIDTH, PADDING_LEFT_WITH_ICON } from './consts';
|
package/src/TextField/Input.tsx
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { rem } from 'polished';
|
|
2
|
-
import { InputHTMLAttributes
|
|
3
|
-
import {
|
|
2
|
+
import type { InputHTMLAttributes } from 'react';
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
|
|
5
|
+
import type { BoxProps } from '../Box';
|
|
6
|
+
import { Box } from '../Box';
|
|
4
7
|
import { alpha } from '../color';
|
|
5
8
|
import {
|
|
6
9
|
ICON_WIDTH,
|
|
@@ -59,14 +62,16 @@ export const Input = forwardRef<HTMLDivElement, InputProps>(function Input(
|
|
|
59
62
|
display: 'flex',
|
|
60
63
|
alignItems: 'center',
|
|
61
64
|
...(!multiline && {
|
|
62
|
-
lineHeight: 1,
|
|
63
65
|
overflow: 'hidden',
|
|
64
66
|
whiteSpace: 'nowrap',
|
|
65
67
|
textOverflow: 'ellipsis',
|
|
66
68
|
}),
|
|
67
69
|
'::placeholder': {
|
|
68
70
|
opacity: 0,
|
|
69
|
-
color:
|
|
71
|
+
color:
|
|
72
|
+
variant === 'filled'
|
|
73
|
+
? alpha('on.surface-variant', 0.87)
|
|
74
|
+
: alpha('on.surface-variant', 0.6),
|
|
70
75
|
transition: `opacity .18s cubic-bezier(.4,0,.2,1)`,
|
|
71
76
|
},
|
|
72
77
|
':disabled::placeholder': {
|
|
@@ -5,11 +5,13 @@ import {
|
|
|
5
5
|
useState,
|
|
6
6
|
useRef,
|
|
7
7
|
} from 'react';
|
|
8
|
-
import
|
|
8
|
+
import * as React from 'react';
|
|
9
|
+
|
|
9
10
|
import { NotchedOutline } from '../NotchedOutline';
|
|
10
|
-
import {
|
|
11
|
+
import type { BoxProps } from '../Box';
|
|
12
|
+
import { Box } from '../Box';
|
|
11
13
|
import { FloatingLabel } from '../FloatingLabel';
|
|
12
|
-
import { Theme } from '../theme';
|
|
14
|
+
import type { Theme } from '../theme';
|
|
13
15
|
import {
|
|
14
16
|
ICON_WIDTH,
|
|
15
17
|
PADDING_LEFT_WITHOUT_ICON,
|