@basic-ui/material 0.1.15 → 1.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.js +632 -373
- package/build/cjs/index.js.map +1 -1
- package/build/esm/Alert/Alert.d.ts +1 -1
- package/build/esm/Alert/Alert.js +1 -1
- package/build/esm/Alert/Alert.js.map +1 -1
- package/build/esm/Alert/index.d.ts +0 -0
- package/build/esm/Alert/index.js.map +0 -0
- package/build/esm/AppBar/AppBar.d.ts +1 -1
- package/build/esm/AppBar/AppBar.js +1 -2
- package/build/esm/AppBar/AppBar.js.map +1 -1
- package/build/esm/AppBar/AppBarButton.d.ts +1 -1
- package/build/esm/AppBar/AppBarButton.js.map +0 -0
- package/build/esm/AppBar/context.d.ts +0 -0
- package/build/esm/AppBar/context.js.map +0 -0
- package/build/esm/AppBar/index.d.ts +0 -0
- package/build/esm/AppBar/index.js.map +0 -0
- package/build/esm/Badge/Badge.d.ts +1 -1
- package/build/esm/Badge/Badge.js.map +0 -0
- package/build/esm/Badge/index.d.ts +0 -0
- package/build/esm/Badge/index.js.map +0 -0
- package/build/esm/BaseLine/BaseLine.d.ts +0 -1
- package/build/esm/BaseLine/BaseLine.js.map +0 -0
- package/build/esm/BaseLine/index.d.ts +0 -0
- package/build/esm/BaseLine/index.js.map +0 -0
- package/build/esm/BottomSheet/BottomSheet.d.ts +1 -1
- package/build/esm/BottomSheet/BottomSheet.js.map +0 -0
- package/build/esm/BottomSheet/BottomSheetSurface.d.ts +1 -1
- package/build/esm/BottomSheet/BottomSheetSurface.js +1 -1
- package/build/esm/BottomSheet/BottomSheetSurface.js.map +1 -1
- package/build/esm/BottomSheet/index.d.ts +0 -0
- package/build/esm/BottomSheet/index.js.map +0 -0
- package/build/esm/Box/Box.d.ts +0 -0
- package/build/esm/Box/Box.js.map +0 -0
- package/build/esm/Box/index.d.ts +0 -0
- package/build/esm/Box/index.js.map +0 -0
- package/build/esm/Button/BaseButton.d.ts +2 -1
- package/build/esm/Button/BaseButton.js.map +1 -1
- package/build/esm/Button/Button.d.ts +3 -3
- package/build/esm/Button/Button.js +22 -6
- package/build/esm/Button/Button.js.map +1 -1
- package/build/esm/Button/ButtonGroup.d.ts +5 -0
- package/build/esm/Button/ButtonGroup.js +28 -0
- package/build/esm/Button/ButtonGroup.js.map +1 -0
- package/build/esm/Button/FilledButton.d.ts +2 -1
- package/build/esm/Button/FilledButton.js +36 -3
- package/build/esm/Button/FilledButton.js.map +1 -1
- package/build/esm/Button/IconButton.d.ts +1 -0
- 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 +32 -2
- package/build/esm/Button/OutlinedButton.js.map +1 -1
- package/build/esm/Button/TransparentButton.d.ts +2 -1
- package/build/esm/Button/TransparentButton.js +32 -2
- package/build/esm/Button/TransparentButton.js.map +1 -1
- package/build/esm/Button/context.d.ts +8 -0
- package/build/esm/Button/context.js +5 -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 +1 -1
- package/build/esm/CheckBox/CheckBox.js +1 -1
- package/build/esm/CheckBox/CheckBox.js.map +1 -1
- package/build/esm/CheckBox/CheckBoxIcon.d.ts +1 -1
- package/build/esm/CheckBox/CheckBoxIcon.js.map +0 -0
- package/build/esm/CheckBox/CheckPath.d.ts +0 -0
- package/build/esm/CheckBox/CheckPath.js.map +0 -0
- package/build/esm/CheckBox/IndeterminatePath.d.ts +0 -0
- package/build/esm/CheckBox/IndeterminatePath.js.map +0 -0
- package/build/esm/CheckBox/index.d.ts +0 -0
- package/build/esm/CheckBox/index.js.map +0 -0
- package/build/esm/Chip/ButtonChip.d.ts +3 -3
- package/build/esm/Chip/ButtonChip.js +41 -57
- package/build/esm/Chip/ButtonChip.js.map +1 -1
- package/build/esm/Chip/Chip.d.ts +0 -0
- package/build/esm/Chip/Chip.js.map +0 -0
- package/build/esm/Chip/ChipBase.d.ts +1 -1
- package/build/esm/Chip/ChipBase.js +23 -15
- package/build/esm/Chip/ChipBase.js.map +1 -1
- package/build/esm/Chip/ChoiceChip.d.ts +3 -2
- package/build/esm/Chip/ChoiceChip.js +18 -24
- package/build/esm/Chip/ChoiceChip.js.map +1 -1
- package/build/esm/Chip/index.d.ts +0 -0
- package/build/esm/Chip/index.js.map +0 -0
- package/build/esm/ColorMode/ColorModeProvider.d.ts +0 -0
- package/build/esm/ColorMode/ColorModeProvider.js.map +0 -0
- package/build/esm/ColorMode/color-mode.d.ts +0 -0
- package/build/esm/ColorMode/color-mode.js.map +0 -0
- package/build/esm/ColorMode/color-vars.d.ts +0 -0
- package/build/esm/ColorMode/color-vars.js.map +0 -0
- package/build/esm/ColorMode/constants.d.ts +0 -0
- package/build/esm/ColorMode/constants.js.map +0 -0
- package/build/esm/ColorMode/index.d.ts +0 -0
- package/build/esm/ColorMode/index.js.map +0 -0
- package/build/esm/Combobox/Combobox.d.ts +7 -7
- package/build/esm/Combobox/Combobox.js +2 -1
- package/build/esm/Combobox/Combobox.js.map +1 -1
- package/build/esm/Combobox/index.d.ts +0 -0
- package/build/esm/Combobox/index.js.map +0 -0
- package/build/esm/Dialog/Dialog.d.ts +1 -1
- package/build/esm/Dialog/Dialog.js.map +0 -0
- package/build/esm/Dialog/DialogBackdrop.d.ts +1 -1
- package/build/esm/Dialog/DialogBackdrop.js.map +0 -0
- package/build/esm/Dialog/DialogContainer.d.ts +1 -1
- package/build/esm/Dialog/DialogContainer.js.map +0 -0
- package/build/esm/Dialog/DialogSurface.d.ts +4 -2
- package/build/esm/Dialog/DialogSurface.js +19 -7
- package/build/esm/Dialog/DialogSurface.js.map +1 -1
- package/build/esm/Dialog/Scrim.d.ts +1 -1
- package/build/esm/Dialog/Scrim.js.map +0 -0
- package/build/esm/Dialog/index.d.ts +0 -0
- package/build/esm/Dialog/index.js.map +0 -0
- package/build/esm/Dialog/useDialogAnimation.d.ts +0 -0
- package/build/esm/Dialog/useDialogAnimation.js.map +0 -0
- package/build/esm/Divider/Divider.d.ts +1 -1
- package/build/esm/Divider/Divider.js.map +0 -0
- package/build/esm/Divider/index.d.ts +0 -0
- package/build/esm/Divider/index.js.map +0 -0
- package/build/esm/FloatingLabel/FloatingLabel.d.ts +0 -1
- package/build/esm/FloatingLabel/FloatingLabel.js +1 -3
- package/build/esm/FloatingLabel/FloatingLabel.js.map +1 -1
- package/build/esm/FloatingLabel/index.d.ts +0 -0
- package/build/esm/FloatingLabel/index.js.map +0 -0
- package/build/esm/LineRipple/LineRipple.d.ts +1 -1
- package/build/esm/LineRipple/LineRipple.js.map +0 -0
- package/build/esm/LineRipple/index.d.ts +0 -0
- package/build/esm/LineRipple/index.js.map +0 -0
- package/build/esm/Link/Link.d.ts +1 -1
- package/build/esm/Link/Link.js.map +0 -0
- package/build/esm/Link/index.d.ts +0 -0
- package/build/esm/Link/index.js.map +0 -0
- package/build/esm/List/List.d.ts +1 -1
- package/build/esm/List/List.js.map +0 -0
- package/build/esm/List/index.d.ts +0 -0
- package/build/esm/List/index.js.map +0 -0
- package/build/esm/ListItem/ListItem.d.ts +1 -1
- package/build/esm/ListItem/ListItem.js +52 -33
- package/build/esm/ListItem/ListItem.js.map +1 -1
- package/build/esm/ListItem/ListItemText.d.ts +0 -0
- package/build/esm/ListItem/ListItemText.js +2 -7
- package/build/esm/ListItem/ListItemText.js.map +1 -1
- package/build/esm/ListItem/context.d.ts +0 -0
- package/build/esm/ListItem/context.js.map +0 -0
- package/build/esm/ListItem/index.d.ts +0 -0
- package/build/esm/ListItem/index.js.map +0 -0
- package/build/esm/Menu/Menu.d.ts +4 -4
- package/build/esm/Menu/Menu.js +2 -2
- package/build/esm/Menu/Menu.js.map +1 -1
- package/build/esm/Menu/animation.d.ts +0 -0
- package/build/esm/Menu/animation.js.map +0 -0
- package/build/esm/Menu/index.d.ts +0 -0
- package/build/esm/Menu/index.js.map +0 -0
- package/build/esm/NotchedOutline/NotchedOutline.d.ts +0 -0
- package/build/esm/NotchedOutline/NotchedOutline.js.map +0 -0
- package/build/esm/NotchedOutline/context.d.ts +0 -0
- package/build/esm/NotchedOutline/context.js.map +0 -0
- package/build/esm/NotchedOutline/index.d.ts +0 -0
- package/build/esm/NotchedOutline/index.js.map +0 -0
- package/build/esm/NotchedOutline/styledComponents.d.ts +96 -50
- package/build/esm/NotchedOutline/styledComponents.js +7 -7
- package/build/esm/NotchedOutline/styledComponents.js.map +1 -1
- package/build/esm/Paper/Paper.d.ts +1 -1
- package/build/esm/Paper/Paper.js +2 -2
- package/build/esm/Paper/Paper.js.map +1 -1
- package/build/esm/Paper/index.d.ts +0 -0
- package/build/esm/Paper/index.js.map +0 -0
- package/build/esm/ProgressSpinner/ProgressSpinner.d.ts +1 -1
- package/build/esm/ProgressSpinner/ProgressSpinner.js.map +0 -0
- package/build/esm/ProgressSpinner/index.d.ts +0 -0
- package/build/esm/ProgressSpinner/index.js.map +0 -0
- package/build/esm/RadioButton/RadioButton.d.ts +0 -0
- package/build/esm/RadioButton/RadioButton.js +1 -1
- package/build/esm/RadioButton/RadioButton.js.map +1 -1
- package/build/esm/RadioButton/RadioButtonIcon.d.ts +0 -0
- package/build/esm/RadioButton/RadioButtonIcon.js +2 -2
- package/build/esm/RadioButton/RadioButtonIcon.js.map +1 -1
- package/build/esm/RadioButton/RadioGroup.d.ts +1 -1
- package/build/esm/RadioButton/RadioGroup.js.map +0 -0
- package/build/esm/RadioButton/index.d.ts +0 -0
- package/build/esm/RadioButton/index.js.map +0 -0
- package/build/esm/Ripple/Ripple.d.ts +0 -0
- package/build/esm/Ripple/Ripple.js +2 -2
- package/build/esm/Ripple/Ripple.js.map +1 -1
- package/build/esm/Ripple/RippleBox.d.ts +0 -0
- package/build/esm/Ripple/RippleBox.js +1 -1
- package/build/esm/Ripple/RippleBox.js.map +1 -1
- package/build/esm/Ripple/constants.d.ts +0 -0
- package/build/esm/Ripple/constants.js.map +0 -0
- package/build/esm/Ripple/index.d.ts +0 -0
- package/build/esm/Ripple/index.js.map +0 -0
- package/build/esm/Ripple/keyframes.d.ts +0 -0
- package/build/esm/Ripple/keyframes.js.map +0 -0
- package/build/esm/Ripple/useRipple.d.ts +0 -0
- package/build/esm/Ripple/useRipple.js.map +0 -0
- package/build/esm/Ripple/useRippleHandlers.d.ts +0 -0
- package/build/esm/Ripple/useRippleHandlers.js.map +0 -0
- package/build/esm/Ripple/useRippleSurface.d.ts +5 -4
- package/build/esm/Ripple/useRippleSurface.js +30 -8
- package/build/esm/Ripple/useRippleSurface.js.map +1 -1
- package/build/esm/Select/Select.d.ts +3 -3
- package/build/esm/Select/Select.js +3 -12
- package/build/esm/Select/Select.js.map +1 -1
- package/build/esm/Select/SelectIcon.d.ts +1 -1
- package/build/esm/Select/SelectIcon.js +3 -1
- package/build/esm/Select/SelectIcon.js.map +1 -1
- package/build/esm/Select/context.d.ts +0 -0
- package/build/esm/Select/context.js.map +0 -0
- package/build/esm/Select/defaultRender.d.ts +0 -0
- package/build/esm/Select/defaultRender.js.map +0 -0
- package/build/esm/Select/index.d.ts +0 -0
- package/build/esm/Select/index.js.map +0 -0
- package/build/esm/Select/styledComponents.d.ts +0 -0
- package/build/esm/Select/styledComponents.js +9 -5
- package/build/esm/Select/styledComponents.js.map +1 -1
- package/build/esm/SelectItem/SelectItem.d.ts +1 -1
- package/build/esm/SelectItem/SelectItem.js.map +0 -0
- package/build/esm/SelectItem/index.d.ts +0 -0
- package/build/esm/SelectItem/index.js.map +0 -0
- package/build/esm/SelectionControl/SelectionControlLabel.d.ts +1 -1
- package/build/esm/SelectionControl/SelectionControlLabel.js.map +0 -0
- package/build/esm/SelectionControl/SelectionControlText.d.ts +1 -1
- package/build/esm/SelectionControl/SelectionControlText.js.map +0 -0
- package/build/esm/SelectionControl/index.d.ts +0 -0
- package/build/esm/SelectionControl/index.js.map +0 -0
- package/build/esm/Skeleton/DelayAppearance.d.ts +1 -1
- package/build/esm/Skeleton/DelayAppearance.js.map +0 -0
- package/build/esm/Skeleton/Skeleton.d.ts +1 -1
- package/build/esm/Skeleton/Skeleton.js.map +0 -0
- package/build/esm/Skeleton/animation.d.ts +0 -0
- package/build/esm/Skeleton/animation.js.map +0 -0
- package/build/esm/Skeleton/index.d.ts +0 -0
- package/build/esm/Skeleton/index.js.map +0 -0
- package/build/esm/Snackbar/Snackbar.d.ts +1 -1
- package/build/esm/Snackbar/Snackbar.js +4 -4
- package/build/esm/Snackbar/Snackbar.js.map +1 -1
- package/build/esm/Snackbar/Stack.d.ts +0 -0
- package/build/esm/Snackbar/Stack.js.map +0 -0
- package/build/esm/Snackbar/index.d.ts +0 -0
- package/build/esm/Snackbar/index.js.map +0 -0
- package/build/esm/Snackbar/useSnackbarAnimation.d.ts +0 -0
- package/build/esm/Snackbar/useSnackbarAnimation.js.map +0 -0
- package/build/esm/Switch/Switch.d.ts +1 -1
- package/build/esm/Switch/Switch.js +8 -6
- package/build/esm/Switch/Switch.js.map +1 -1
- package/build/esm/Switch/index.d.ts +0 -0
- package/build/esm/Switch/index.js.map +0 -0
- package/build/esm/Switch/styledComponents.d.ts +2 -2
- package/build/esm/Switch/styledComponents.js +54 -26
- package/build/esm/Switch/styledComponents.js.map +1 -1
- package/build/esm/Tab/Tab.d.ts +1 -1
- package/build/esm/Tab/Tab.js.map +0 -0
- package/build/esm/Tab/TabList.d.ts +1 -1
- package/build/esm/Tab/TabList.js.map +0 -0
- package/build/esm/Tab/TabPanel.d.ts +1 -1
- package/build/esm/Tab/TabPanel.js.map +0 -0
- package/build/esm/Tab/TabPanels.d.ts +0 -0
- package/build/esm/Tab/TabPanels.js.map +0 -0
- package/build/esm/Tab/Tabs.d.ts +0 -0
- package/build/esm/Tab/Tabs.js.map +0 -0
- package/build/esm/Tab/context.d.ts +0 -0
- package/build/esm/Tab/context.js.map +0 -0
- package/build/esm/Tab/index.d.ts +0 -0
- package/build/esm/Tab/index.js.map +0 -0
- package/build/esm/TabIndicator/TabIndicator.d.ts +1 -1
- package/build/esm/TabIndicator/TabIndicator.js.map +0 -0
- package/build/esm/TabIndicator/context.d.ts +0 -0
- package/build/esm/TabIndicator/context.js.map +0 -0
- package/build/esm/TabIndicator/index.d.ts +0 -0
- package/build/esm/TabIndicator/index.js.map +0 -0
- package/build/esm/Table/Table.d.ts +1 -1
- package/build/esm/Table/Table.js +1 -1
- package/build/esm/Table/Table.js.map +1 -1
- package/build/esm/Table/TableBody.d.ts +1 -1
- package/build/esm/Table/TableBody.js.map +0 -0
- package/build/esm/Table/TableCell.d.ts +1 -1
- package/build/esm/Table/TableCell.js.map +0 -0
- package/build/esm/Table/TableHead.d.ts +1 -1
- package/build/esm/Table/TableHead.js.map +0 -0
- package/build/esm/Table/TableRow.d.ts +1 -1
- package/build/esm/Table/TableRow.js.map +0 -0
- package/build/esm/Table/context.d.ts +0 -0
- package/build/esm/Table/context.js.map +0 -0
- package/build/esm/Table/index.d.ts +0 -0
- package/build/esm/Table/index.js.map +0 -0
- package/build/esm/Text/LoremIpsum.d.ts +0 -0
- package/build/esm/Text/LoremIpsum.js.map +0 -0
- package/build/esm/Text/Text.d.ts +1 -1
- package/build/esm/Text/Text.js.map +0 -0
- package/build/esm/Text/index.d.ts +0 -0
- package/build/esm/Text/index.js.map +0 -0
- package/build/esm/TextField/FilledContainer.d.ts +1 -1
- package/build/esm/TextField/FilledContainer.js +17 -10
- package/build/esm/TextField/FilledContainer.js.map +1 -1
- package/build/esm/TextField/HelperText.d.ts +1 -1
- package/build/esm/TextField/HelperText.js.map +0 -0
- package/build/esm/TextField/IconContainer.d.ts +2 -2
- package/build/esm/TextField/IconContainer.js +4 -2
- package/build/esm/TextField/IconContainer.js.map +1 -1
- package/build/esm/TextField/Input.d.ts +1 -1
- package/build/esm/TextField/Input.js +18 -10
- package/build/esm/TextField/Input.js.map +1 -1
- package/build/esm/TextField/OutlinedContainer.d.ts +1 -1
- package/build/esm/TextField/OutlinedContainer.js +7 -4
- package/build/esm/TextField/OutlinedContainer.js.map +1 -1
- package/build/esm/TextField/TextField.d.ts +1 -1
- package/build/esm/TextField/TextField.js.map +0 -0
- package/build/esm/TextField/consts.d.ts +5 -0
- package/build/esm/TextField/consts.js +6 -0
- package/build/esm/TextField/consts.js.map +1 -0
- package/build/esm/TextField/index.d.ts +0 -0
- package/build/esm/TextField/index.js.map +0 -0
- package/build/esm/ThemeExplorer/ColorPicker.js +2 -2
- package/build/esm/ThemeExplorer/ColorPicker.js.map +1 -1
- package/build/esm/ThemeExplorer/TextFieldColorPicker.js +5 -5
- package/build/esm/ThemeExplorer/TextFieldColorPicker.js.map +1 -1
- package/build/esm/Tooltip/Tooltip.d.ts +1 -1
- package/build/esm/Tooltip/Tooltip.js.map +0 -0
- package/build/esm/Tooltip/index.d.ts +0 -0
- package/build/esm/Tooltip/index.js.map +0 -0
- package/build/esm/color.d.ts +2 -1
- package/build/esm/color.js +10 -6
- package/build/esm/color.js.map +1 -1
- package/build/esm/css.d.ts +0 -0
- package/build/esm/css.js.map +0 -0
- package/build/esm/hooks/useAnimation.d.ts +0 -0
- package/build/esm/hooks/useAnimation.js.map +0 -0
- package/build/esm/index.d.ts +0 -0
- package/build/esm/index.js.map +0 -0
- package/build/esm/theme/index.d.ts +0 -0
- package/build/esm/theme/index.js.map +0 -0
- package/build/esm/theme/theme.d.ts +96 -50
- package/build/esm/theme/theme.js +133 -93
- package/build/esm/theme/theme.js.map +1 -1
- package/build/esm/theme/typography-raleway.d.ts +0 -0
- package/build/esm/theme/typography-raleway.js.map +0 -0
- package/build/esm/theme/typography-roboto.d.ts +0 -0
- package/build/esm/theme/typography-roboto.js.map +0 -0
- package/build/esm/theme/useTheme.d.ts +471 -1
- package/build/esm/theme/useTheme.js.map +0 -0
- package/build/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -4
- package/src/Alert/Alert.tsx +1 -1
- package/src/AppBar/AppBar.tsx +5 -6
- package/src/BottomSheet/BottomSheetSurface.tsx +1 -1
- package/src/Button/BaseButton.tsx +1 -0
- package/src/Button/Button.story.tsx +20 -33
- package/src/Button/Button.tsx +20 -6
- package/src/Button/ButtonGroup.story.tsx +106 -0
- package/src/Button/ButtonGroup.tsx +33 -0
- package/src/Button/FilledButton.tsx +38 -4
- package/src/Button/FloatingActionButton.tsx +9 -0
- package/src/Button/IconButton.tsx +1 -0
- package/src/Button/OutlinedButton.tsx +30 -2
- package/src/Button/SpinnerButton.story.tsx +1 -1
- package/src/Button/TransparentButton.tsx +32 -1
- package/src/Button/context.tsx +16 -0
- package/src/Button/index.ts +1 -0
- package/src/CheckBox/CheckBox.tsx +1 -1
- package/src/Chip/ButtonChip.tsx +42 -48
- package/src/Chip/Chip.story.tsx +48 -26
- package/src/Chip/ChipBase.tsx +40 -12
- package/src/Chip/ChoiceChip.tsx +18 -17
- package/src/Combobox/Combobox.tsx +2 -1
- package/src/Dialog/DialogSurface.tsx +20 -5
- package/src/FloatingLabel/FloatingLabel.tsx +0 -3
- package/src/ListItem/ListItem.tsx +55 -32
- package/src/ListItem/ListItemText.tsx +2 -4
- package/src/Menu/Menu.tsx +2 -2
- package/src/NotchedOutline/NotchedOutline.story.tsx +1 -1
- package/src/NotchedOutline/styledComponents.ts +6 -6
- package/src/Paper/Paper.story.tsx +16 -3
- package/src/Paper/Paper.tsx +6 -2
- package/src/RadioButton/RadioButton.tsx +1 -1
- package/src/RadioButton/RadioButtonIcon.tsx +2 -2
- package/src/Ripple/Ripple.story.tsx +1 -1
- package/src/Ripple/Ripple.tsx +1 -1
- package/src/Ripple/RippleBox.tsx +1 -0
- package/src/Ripple/useRippleSurface.ts +31 -7
- package/src/Select/PaymentMethodSelect.story.tsx +321 -0
- package/src/Select/Select.story.tsx +26 -1
- package/src/Select/Select.tsx +12 -34
- package/src/Select/SelectIcon.tsx +2 -1
- package/src/Select/styledComponents.tsx +8 -4
- package/src/Skeleton/Skeleton.story.tsx +2 -2
- package/src/Snackbar/Snackbar.tsx +4 -4
- package/src/Switch/Switch.tsx +7 -6
- package/src/Switch/styledComponents.tsx +69 -22
- package/src/Table/Table.tsx +1 -1
- package/src/TextField/FilledContainer.tsx +30 -10
- package/src/TextField/IconContainer.tsx +5 -4
- package/src/TextField/Input.tsx +33 -10
- package/src/TextField/OutlinedContainer.tsx +18 -4
- package/src/TextField/TextField.story.tsx +14 -1
- package/src/TextField/consts.ts +7 -0
- package/src/ThemeExplorer/ColorPicker.tsx +101 -0
- package/src/ThemeExplorer/TextFieldColorPicker.tsx +112 -0
- package/src/ThemeExplorer/ThemeBuilder.story.tsx +169 -0
- package/src/ThemeExplorer/ThemeColors.tsx +88 -0
- package/src/ThemeExplorer/ThemeExplorer.story.tsx +42 -0
- package/src/ThemeExplorer/components.tsx +208 -0
- package/src/ThemeExplorer/makeColorScheme.tsx +73 -0
- package/src/ThemeExplorer/useDeferredColor.tsx +24 -0
- package/src/ThemeExplorer/useLocalStorageCachedState.ts +18 -0
- package/src/color.ts +18 -13
- package/src/theme/theme.ts +131 -92
- package/src/ListItem/context.ts +0 -13
package/build/cjs/index.js
CHANGED
|
@@ -24,45 +24,62 @@ var _styled__default = /*#__PURE__*/_interopDefaultLegacy(_styled);
|
|
|
24
24
|
var shouldForwardProp__default = /*#__PURE__*/_interopDefaultLegacy(shouldForwardProp);
|
|
25
25
|
|
|
26
26
|
// material theme preset
|
|
27
|
-
const primary = '#5d1049';
|
|
28
|
-
const secondary = '#e30425';
|
|
29
|
-
const error = '#BF360C';
|
|
30
|
-
const background = '#f6f6f6';
|
|
31
|
-
const surface = '#fff';
|
|
32
|
-
const muted = '#f6f6f6';
|
|
33
27
|
const theme = {
|
|
34
28
|
googleFonts: 'https://fonts.googleapis.com/css?family=Roboto+Mono|Roboto:300,400,500,600,700&display=swap',
|
|
35
29
|
colors: {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
30
|
+
primary: '#934078',
|
|
31
|
+
secondary: '#705765',
|
|
32
|
+
tertiary: '#80543e',
|
|
33
|
+
error: '#ba1b1b',
|
|
34
|
+
'primary-container': '#ffd7ed',
|
|
35
|
+
'secondary-container': '#fbd9ea',
|
|
36
|
+
'tertiary-container': '#ffdbc9',
|
|
37
|
+
'error-container': '#ffdad4',
|
|
38
|
+
background: '#fcfcfc',
|
|
39
|
+
surface: '#fcfcfc',
|
|
40
|
+
'surface-variant': '#efdee5',
|
|
41
|
+
outline: '#81747a',
|
|
42
42
|
on: {
|
|
43
|
-
primary:
|
|
44
|
-
secondary:
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
43
|
+
primary: '#ffffff',
|
|
44
|
+
secondary: '#ffffff',
|
|
45
|
+
tertiary: '#ffffff',
|
|
46
|
+
error: '#ffffff',
|
|
47
|
+
'primary-container': '#3b002d',
|
|
48
|
+
'secondary-container': '#291521',
|
|
49
|
+
'tertiary-container': '#321303',
|
|
50
|
+
'error-container': '#410001',
|
|
51
|
+
background: '#1f1a1c',
|
|
52
|
+
surface: '#1f1a1c',
|
|
53
|
+
'surface-variant': '#4f4349',
|
|
54
|
+
outline: '#feecf3'
|
|
49
55
|
},
|
|
50
56
|
modes: {
|
|
51
57
|
dark: {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
error,
|
|
56
|
-
primary: '#
|
|
57
|
-
secondary,
|
|
58
|
-
|
|
58
|
+
primary: '#ffade0',
|
|
59
|
+
secondary: '#debece',
|
|
60
|
+
tertiary: '#f4ba9e',
|
|
61
|
+
error: '#ffb4a9',
|
|
62
|
+
'primary-container': '#77285f',
|
|
63
|
+
'secondary-container': '#57404d',
|
|
64
|
+
'tertiary-container': '#653d28',
|
|
65
|
+
'error-container': '#930006',
|
|
66
|
+
background: '#1f1a1c',
|
|
67
|
+
surface: '#1f1a1c',
|
|
68
|
+
'surface-variant': '#4f4349',
|
|
69
|
+
outline: '#9b8d93',
|
|
59
70
|
on: {
|
|
60
|
-
primary:
|
|
61
|
-
secondary:
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
71
|
+
primary: '#5b0e47',
|
|
72
|
+
secondary: '#402a37',
|
|
73
|
+
tertiary: '#4b2714',
|
|
74
|
+
error: '#680003',
|
|
75
|
+
'primary-container': '#ffd7ed',
|
|
76
|
+
'secondary-container': '#fbd9ea',
|
|
77
|
+
'tertiary-container': '#ffdbc9',
|
|
78
|
+
'error-container': '#ffdad4',
|
|
79
|
+
background: '#eae0e3',
|
|
80
|
+
surface: '#eae0e3',
|
|
81
|
+
'surface-variant': '#d3c2c9',
|
|
82
|
+
outline: '#22191e'
|
|
66
83
|
}
|
|
67
84
|
}
|
|
68
85
|
}
|
|
@@ -74,10 +91,19 @@ const theme = {
|
|
|
74
91
|
radii: {
|
|
75
92
|
none: 0,
|
|
76
93
|
default: "0.25rem",
|
|
77
|
-
|
|
94
|
+
'extra-small': "0.25rem",
|
|
95
|
+
'extra-small_top': `${"0.25rem"} ${"0.25rem"} 0 0`,
|
|
96
|
+
small: "0.5rem",
|
|
97
|
+
medium: "0.75rem",
|
|
98
|
+
large: "1rem",
|
|
99
|
+
large_end: `0 ${"1rem"} ${"1rem"} 0`,
|
|
100
|
+
large_top: `${"1rem"} ${"1rem"} 0 0`,
|
|
101
|
+
'extra-large': "1.75rem",
|
|
102
|
+
'extra-large_top': `${"1.75rem"} ${"1.75rem"} 0 0`,
|
|
103
|
+
full: "6249.9375rem",
|
|
78
104
|
circle: '100%'
|
|
79
105
|
},
|
|
80
|
-
|
|
106
|
+
shadowsOriginal: {
|
|
81
107
|
0: '0 0 0 0 rgba(0,0,0,0.2),0 0 0 0 rgba(0,0,0,0.14),0 0 0 0 rgba(0,0,0,0.12)',
|
|
82
108
|
1: '0 2px 1px -1px rgba(0,0,0,0.2),0 1px 1px 0 rgba(0,0,0,0.14),0 1px 3px 0 rgba(0,0,0,0.12)',
|
|
83
109
|
2: '0 3px 1px -2px rgba(0,0,0,0.2),0 2px 2px 0 rgba(0,0,0,0.14),0 1px 5px 0 rgba(0,0,0,0.12)',
|
|
@@ -104,6 +130,14 @@ const theme = {
|
|
|
104
130
|
23: '0 11px 14px -7px rgba(0,0,0,0.2),0 23px 36px 3px rgba(0,0,0,0.14),0 9px 44px 8px rgba(0,0,0,0.12)',
|
|
105
131
|
24: '0 11px 15px -7px rgba(0,0,0,0.2),0 24px 38px 3px rgba(0,0,0,0.14),0 9px 46px 8px rgba(0,0,0,0.12)'
|
|
106
132
|
},
|
|
133
|
+
shadows: {
|
|
134
|
+
0: '0 0 0 0 rgba(0,0,0,0.2),0 0 0 0 rgba(0,0,0,0.14),0 0 0 0 rgba(0,0,0,0.12)',
|
|
135
|
+
1: '0 1px 2px rgba(0,0,0,0.3),0 1px 3px 1px rgba(0,0,0,0.15)',
|
|
136
|
+
2: '0 1px 2px rgba(0,0,0,0.3),0 2px 6px 2px rgba(0,0,0,0.15)',
|
|
137
|
+
3: '0 4px 8px 3px rgba(0,0,0,0.15),0 1px 3px rgba(0,0,0,0.3)',
|
|
138
|
+
4: '0 6px 10px 4px rgba(0,0,0,0.15),0 2px 3px rgba(0,0,0,0.3)',
|
|
139
|
+
5: '0 8px 12px 6px rgba(0,0,0,0.15),0 4px 4px rgba(0,0,0,0.3)'
|
|
140
|
+
},
|
|
107
141
|
fonts: {
|
|
108
142
|
body: 'Roboto, sans-serif',
|
|
109
143
|
heading: 'Roboto, sans-serif',
|
|
@@ -217,11 +251,10 @@ const theme = {
|
|
|
217
251
|
letterSpacing: "0.017857142857142856em"
|
|
218
252
|
},
|
|
219
253
|
button: {
|
|
220
|
-
variant: 'text.
|
|
254
|
+
variant: 'text.display',
|
|
221
255
|
fontSize: 2,
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
lineHeight: 'normal'
|
|
256
|
+
letterSpacing: "0.08571428571428572em",
|
|
257
|
+
fontWeight: 'medium'
|
|
225
258
|
},
|
|
226
259
|
caption: {
|
|
227
260
|
variant: 'text.display',
|
|
@@ -266,16 +299,16 @@ const theme = {
|
|
|
266
299
|
elevations: {
|
|
267
300
|
default: {},
|
|
268
301
|
elevated: {
|
|
269
|
-
boxShadow:
|
|
302
|
+
boxShadow: 2
|
|
270
303
|
}
|
|
271
304
|
},
|
|
272
305
|
sizes: {
|
|
273
306
|
default: {
|
|
274
|
-
height: "
|
|
307
|
+
height: "4rem",
|
|
275
308
|
p: 3
|
|
276
309
|
},
|
|
277
310
|
dense: {
|
|
278
|
-
height: "
|
|
311
|
+
height: "3.5rem"
|
|
279
312
|
}
|
|
280
313
|
}
|
|
281
314
|
},
|
|
@@ -283,17 +316,17 @@ const theme = {
|
|
|
283
316
|
variants: {
|
|
284
317
|
base: {
|
|
285
318
|
variant: 'text.button',
|
|
286
|
-
borderRadius: 'default',
|
|
287
319
|
boxShadow: 'none',
|
|
288
320
|
py: 0,
|
|
289
|
-
px:
|
|
290
|
-
height: "2.
|
|
321
|
+
px: "1.5rem",
|
|
322
|
+
height: "2.5rem",
|
|
323
|
+
borderRadius: 'full',
|
|
291
324
|
cursor: 'pointer',
|
|
292
325
|
outline: 'none'
|
|
293
326
|
},
|
|
294
327
|
text: {
|
|
295
328
|
variant: 'buttons.variants.base',
|
|
296
|
-
px:
|
|
329
|
+
px: "0.75rem"
|
|
297
330
|
},
|
|
298
331
|
filled: {
|
|
299
332
|
variant: 'buttons.variants.base'
|
|
@@ -307,7 +340,8 @@ const theme = {
|
|
|
307
340
|
maxHeight: "3.5rem",
|
|
308
341
|
width: "3.5rem",
|
|
309
342
|
maxWidth: "3.5rem",
|
|
310
|
-
borderRadius: '
|
|
343
|
+
borderRadius: 'large',
|
|
344
|
+
px: 0
|
|
311
345
|
},
|
|
312
346
|
'fab-mini': {
|
|
313
347
|
variant: 'buttons.variants.fab',
|
|
@@ -315,13 +349,23 @@ const theme = {
|
|
|
315
349
|
maxHeight: "2.5rem",
|
|
316
350
|
width: "2.5rem",
|
|
317
351
|
maxWidth: "2.5rem",
|
|
352
|
+
borderRadius: 'medium',
|
|
353
|
+
px: 0
|
|
354
|
+
},
|
|
355
|
+
'fab-large': {
|
|
356
|
+
variant: 'buttons.variants.fab',
|
|
357
|
+
height: "6rem",
|
|
358
|
+
maxHeight: "6rem",
|
|
359
|
+
width: "6rem",
|
|
360
|
+
maxWidth: "6rem",
|
|
361
|
+
borderRadius: 'extra-large',
|
|
318
362
|
px: 0
|
|
319
363
|
},
|
|
320
364
|
'fab-extended': {
|
|
321
365
|
variant: 'buttons.variants.base',
|
|
322
|
-
height: "
|
|
323
|
-
px: "
|
|
324
|
-
borderRadius:
|
|
366
|
+
height: "3.5rem",
|
|
367
|
+
px: "1rem",
|
|
368
|
+
borderRadius: 'large'
|
|
325
369
|
},
|
|
326
370
|
icon: {
|
|
327
371
|
variant: 'buttons.variants.base',
|
|
@@ -330,19 +374,25 @@ const theme = {
|
|
|
330
374
|
width: "3rem",
|
|
331
375
|
maxWidth: "3rem",
|
|
332
376
|
px: "0.75rem",
|
|
333
|
-
borderRadius: '
|
|
377
|
+
borderRadius: 'full'
|
|
334
378
|
}
|
|
335
379
|
},
|
|
336
380
|
elevations: {
|
|
337
381
|
none: {},
|
|
338
|
-
|
|
382
|
+
default: {
|
|
339
383
|
transition: 'box-shadow .28s cubic-bezier(.4,0,.2,1)',
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
boxShadow: 4
|
|
384
|
+
'&:hover': {
|
|
385
|
+
boxShadow: 1
|
|
343
386
|
},
|
|
344
|
-
':
|
|
345
|
-
boxShadow:
|
|
387
|
+
'&:hover:disabled': {
|
|
388
|
+
boxShadow: 0
|
|
389
|
+
}
|
|
390
|
+
},
|
|
391
|
+
elevated: {
|
|
392
|
+
transition: 'box-shadow .28s cubic-bezier(.4,0,.2,1)',
|
|
393
|
+
boxShadow: 1,
|
|
394
|
+
'&:hover': {
|
|
395
|
+
boxShadow: 2
|
|
346
396
|
},
|
|
347
397
|
'&:disabled,&:disabled:hover,&:disabled:focus,&:disabled:active': {
|
|
348
398
|
boxShadow: 0
|
|
@@ -350,12 +400,9 @@ const theme = {
|
|
|
350
400
|
},
|
|
351
401
|
floating: {
|
|
352
402
|
transition: 'box-shadow .28s cubic-bezier(.4,0,.2,1)',
|
|
353
|
-
boxShadow:
|
|
354
|
-
':
|
|
355
|
-
boxShadow:
|
|
356
|
-
},
|
|
357
|
-
':active': {
|
|
358
|
-
boxShadow: 12
|
|
403
|
+
boxShadow: 3,
|
|
404
|
+
':hover': {
|
|
405
|
+
boxShadow: 4
|
|
359
406
|
},
|
|
360
407
|
'&:disabled,&:disabled:hover,&:disabled:focus,&:disabled:active': {
|
|
361
408
|
boxShadow: 0
|
|
@@ -365,13 +412,13 @@ const theme = {
|
|
|
365
412
|
overlays: {
|
|
366
413
|
transparent: {
|
|
367
414
|
hover: {
|
|
368
|
-
opacity: 0.
|
|
415
|
+
opacity: 0.08
|
|
369
416
|
},
|
|
370
417
|
focus: {
|
|
371
418
|
opacity: 0.12
|
|
372
419
|
},
|
|
373
420
|
pressed: {
|
|
374
|
-
opacity: 0.
|
|
421
|
+
opacity: 0.16
|
|
375
422
|
}
|
|
376
423
|
},
|
|
377
424
|
filled: {
|
|
@@ -379,10 +426,10 @@ const theme = {
|
|
|
379
426
|
opacity: 0.08
|
|
380
427
|
},
|
|
381
428
|
focus: {
|
|
382
|
-
opacity: 0.
|
|
429
|
+
opacity: 0.12
|
|
383
430
|
},
|
|
384
431
|
pressed: {
|
|
385
|
-
opacity: 0.
|
|
432
|
+
opacity: 0.16
|
|
386
433
|
}
|
|
387
434
|
}
|
|
388
435
|
}
|
|
@@ -395,45 +442,38 @@ const theme = {
|
|
|
395
442
|
py: 0,
|
|
396
443
|
px: 0,
|
|
397
444
|
height: "2rem",
|
|
398
|
-
borderRadius:
|
|
445
|
+
borderRadius: 'small',
|
|
399
446
|
outline: 'none',
|
|
400
447
|
transition: 'box-shadow .28s cubic-bezier(.4,0,.2,1)'
|
|
401
448
|
},
|
|
402
449
|
filled: {
|
|
403
|
-
variant: 'chips.variants.base'
|
|
450
|
+
variant: 'chips.variants.base',
|
|
451
|
+
boxShadow: 1,
|
|
452
|
+
':active:not([data-disabled])': {
|
|
453
|
+
boxShadow: 2
|
|
454
|
+
}
|
|
404
455
|
},
|
|
405
456
|
outlined: {
|
|
406
457
|
variant: 'chips.variants.base'
|
|
407
458
|
}
|
|
408
459
|
}
|
|
409
460
|
},
|
|
461
|
+
dialogs: {
|
|
462
|
+
variants: {
|
|
463
|
+
base: {
|
|
464
|
+
borderRadius: 'extra-large'
|
|
465
|
+
}
|
|
466
|
+
},
|
|
467
|
+
backgroundColorOverlay: 0.11
|
|
468
|
+
},
|
|
410
469
|
paper: {
|
|
411
470
|
overlays: {
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
'6': 0.11,
|
|
419
|
-
'7': 0.115,
|
|
420
|
-
'8': 0.12,
|
|
421
|
-
'9': 0.125,
|
|
422
|
-
'10': 0.13,
|
|
423
|
-
'11': 0.135,
|
|
424
|
-
'12': 0.14,
|
|
425
|
-
'13': 0.1425,
|
|
426
|
-
'14': 0.145,
|
|
427
|
-
'15': 0.1475,
|
|
428
|
-
'16': 0.15,
|
|
429
|
-
'17': 0.15125,
|
|
430
|
-
'18': 0.1525,
|
|
431
|
-
'19': 0.15375,
|
|
432
|
-
'20': 0.155,
|
|
433
|
-
'21': 0.15625,
|
|
434
|
-
'22': 0.1575,
|
|
435
|
-
'23': 0.15875,
|
|
436
|
-
'24': 0.16
|
|
471
|
+
0: 0,
|
|
472
|
+
1: 0.05,
|
|
473
|
+
2: 0.08,
|
|
474
|
+
3: 0.11,
|
|
475
|
+
4: 0.12,
|
|
476
|
+
5: 0.14
|
|
437
477
|
}
|
|
438
478
|
},
|
|
439
479
|
zIndices: {
|
|
@@ -649,16 +689,20 @@ const alpha = (colorString, alphaValue) => theme => {
|
|
|
649
689
|
const rgb = polished.parseToRgb(color);
|
|
650
690
|
return `rgba(${rgb.red},${rgb.green},${rgb.blue},${alphaValue})`;
|
|
651
691
|
};
|
|
652
|
-
function
|
|
692
|
+
function getColorOverlay(theme, baseColor, overlayColor, overlayOpacity) {
|
|
693
|
+
baseColor = css.get(theme, `colors.${baseColor}`) || baseColor;
|
|
694
|
+
overlayColor = alpha(overlayColor, overlayOpacity)(theme);
|
|
695
|
+
return {
|
|
696
|
+
background: `linear-gradient(${overlayColor}, ${overlayColor}), ${baseColor}`
|
|
697
|
+
};
|
|
698
|
+
}
|
|
699
|
+
function getBackgroundOverlay(theme, backgroundOverlay, overlayColor = 'on.surface') {
|
|
653
700
|
if (Number(backgroundOverlay) <= 0) {
|
|
654
701
|
return {};
|
|
655
702
|
}
|
|
656
703
|
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
backgroundBlendMode: 'overlay',
|
|
660
|
-
backgroundRepeat: 'no-repeat'
|
|
661
|
-
};
|
|
704
|
+
const overlay = css.get(theme, `paper.overlays.${backgroundOverlay}`) || 0;
|
|
705
|
+
return getColorOverlay(theme, 'surface', overlayColor, overlay);
|
|
662
706
|
}
|
|
663
707
|
function getDarkThemeBackgroundOverlay(theme, backgroundOverlay) {
|
|
664
708
|
if (Number(backgroundOverlay) <= 0) {
|
|
@@ -693,7 +737,7 @@ const Paper = /*#__PURE__*/react$1.forwardRef(function Paper(props, forwardedRef
|
|
|
693
737
|
borderStyle: 'solid',
|
|
694
738
|
borderWidth: "0.0625rem",
|
|
695
739
|
borderColor: alpha('on.surface', 0.12)
|
|
696
|
-
} : {},
|
|
740
|
+
} : {}, getBackgroundOverlay(theme, backgroundOverlay != null ? backgroundOverlay : elevation, 'primary'), __css)
|
|
697
741
|
}, otherProps, {
|
|
698
742
|
children: children
|
|
699
743
|
}));
|
|
@@ -739,9 +783,8 @@ const AppBar = /*#__PURE__*/react$1.forwardRef(function AppBar(props, forwardedR
|
|
|
739
783
|
ref: forwardedRef,
|
|
740
784
|
theme: theme,
|
|
741
785
|
variant: "square",
|
|
742
|
-
backgroundOverlay: variantProp === 'default' ?
|
|
786
|
+
backgroundOverlay: elevation === 'elevated' && variantProp === 'default' ? css.get(theme, `appbar.elevations.${elevation}.boxShadow`, 2) : 0,
|
|
743
787
|
color: variantProp === 'default' || variantProp === 'transparent' ? 'on.surface' : `on.${variantProp}`,
|
|
744
|
-
elevation: elevation === 'elevated' ? css.get(theme, `appbar.elevations.${elevation}.boxShadow`, 4) : 0,
|
|
745
788
|
__css: _extends__default['default']({
|
|
746
789
|
boxSizing: 'border-box',
|
|
747
790
|
display: 'inline-flex',
|
|
@@ -823,13 +866,43 @@ const TransparentButton = /*#__PURE__*/_styled__default['default'](BaseButton, p
|
|
|
823
866
|
'&:disabled': {
|
|
824
867
|
color: alpha('on.surface', 0.38),
|
|
825
868
|
cursor: 'default'
|
|
869
|
+
},
|
|
870
|
+
'&:focus-visible': {
|
|
871
|
+
outline: 'none'
|
|
826
872
|
}
|
|
827
|
-
}),
|
|
828
|
-
|
|
873
|
+
}), ({
|
|
874
|
+
theme,
|
|
875
|
+
color = 'primary',
|
|
876
|
+
isGroupedButton = false
|
|
877
|
+
}) => isGroupedButton && {
|
|
878
|
+
'[data-button-group=""] &': {
|
|
879
|
+
borderColor: css.get(theme, `colors.${String(color)}`) || (typeof color === 'string' ? color : undefined),
|
|
880
|
+
':first-of-type': {
|
|
881
|
+
borderTopRightRadius: 0,
|
|
882
|
+
borderBottomRightRadius: 0,
|
|
883
|
+
borderRightStyle: 'solid',
|
|
884
|
+
borderRightWidth: "0.0625rem"
|
|
885
|
+
},
|
|
886
|
+
':not(:first-of-type):not(:last-of-type)': {
|
|
887
|
+
borderRadius: 0
|
|
888
|
+
},
|
|
889
|
+
':last-of-type': {
|
|
890
|
+
borderTopLeftRadius: 0,
|
|
891
|
+
borderBottomLeftRadius: 0,
|
|
892
|
+
borderLeftStyle: 'solid',
|
|
893
|
+
borderLeftWidth: "0.0625rem"
|
|
894
|
+
},
|
|
895
|
+
':last-of-type:nth-of-type(2)': {
|
|
896
|
+
borderLeftWidth: 0
|
|
897
|
+
}
|
|
898
|
+
}
|
|
899
|
+
}, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlRyYW5zcGFyZW50QnV0dG9uLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFRaUMiLCJmaWxlIjoiVHJhbnNwYXJlbnRCdXR0b24udHN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuaW1wb3J0IHsgZ2V0IH0gZnJvbSAnQHN0eWxlZC1zeXN0ZW0vY3NzJztcbmltcG9ydCB7IEJhc2VCdXR0b24gfSBmcm9tICcuL0Jhc2VCdXR0b24nO1xuaW1wb3J0IHsgVGhlbWUgfSBmcm9tICcuLi90aGVtZSc7XG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAc3R5bGVkLXN5c3RlbS9jc3MnO1xuaW1wb3J0IHsgYWxwaGEgfSBmcm9tICcuLi9jb2xvcic7XG5pbXBvcnQgeyByZW0gfSBmcm9tICdwb2xpc2hlZCc7XG5cbmV4cG9ydCBjb25zdCBUcmFuc3BhcmVudEJ1dHRvbiA9IHN0eWxlZChCYXNlQnV0dG9uKShcbiAgKHsgdGhlbWUsIGNvbG9yID0gJ3ByaW1hcnknIH0pID0+XG4gICAgY3NzKHtcbiAgICAgIGJhY2tncm91bmRDb2xvcjogJ3RyYW5zcGFyZW50JyxcbiAgICAgIGNvbG9yOiBnZXQodGhlbWUsIGBjb2xvcnMuJHtTdHJpbmcoY29sb3IpfWApIHx8IGNvbG9yLFxuICAgICAgJyY6ZGlzYWJsZWQnOiB7XG4gICAgICAgIGNvbG9yOiBhbHBoYSgnb24uc3VyZmFjZScsIDAuMzgpLFxuICAgICAgICBjdXJzb3I6ICdkZWZhdWx0JyxcbiAgICAgIH0sXG4gICAgICAnJjp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biAgICAgICAgICBib3JkZXJMZWZ0V2lkdGg6IDAsXG4gICAgICAgIH0sXG4gICAgICB9LFxuICAgIH1cbik7XG5cbmV4cG9ydCBmdW5jdGlvbiBnZXRSaXBwbGVQcm9wZXJ0aWVzKHRoZW1lOiBUaGVtZSkge1xuICByZXR1cm4ge1xuICAgIGhvdmVyT3BhY2l0eTogZ2V0KHRoZW1lLCBgYnV0dG9ucy5vdmVybGF5cy50cmFuc3BhcmVudC5ob3Zlci5vcGFjaXR5YCksXG4gICAgZm9jdXNPcGFjaXR5OiBnZXQodGhlbWUsIGBidXR0b25zLm92ZXJsYXlzLnRyYW5zcGFyZW50LmZvY3VzLm9wYWNpdHlgKSxcbiAgICBwcmVzc2VkT3BhY2l0eTogZ2V0KHRoZW1lLCBgYnV0dG9ucy5vdmVybGF5cy50cmFuc3BhcmVudC5wcmVzc2VkLm9wYWNpdHlgKSxcbiAgICByaXBwbGVFbmFibGVkOiBmYWxzZSxcbiAgfTtcbn1cbiJdfQ== */");
|
|
900
|
+
function getRippleProperties$3(theme) {
|
|
829
901
|
return {
|
|
830
902
|
hoverOpacity: css.get(theme, `buttons.overlays.transparent.hover.opacity`),
|
|
831
903
|
focusOpacity: css.get(theme, `buttons.overlays.transparent.focus.opacity`),
|
|
832
|
-
pressedOpacity: css.get(theme, `buttons.overlays.transparent.pressed.opacity`)
|
|
904
|
+
pressedOpacity: css.get(theme, `buttons.overlays.transparent.pressed.opacity`),
|
|
905
|
+
rippleEnabled: false
|
|
833
906
|
};
|
|
834
907
|
}
|
|
835
908
|
|
|
@@ -849,20 +922,59 @@ const FilledButton = /*#__PURE__*/_styled__default['default'](BaseButton, proces
|
|
|
849
922
|
background: `linear-gradient(${css.get(theme, 'colors.surface')}, ${css.get(theme, 'colors.surface')}), ${alpha('on.surface', 0.12)(theme)}`,
|
|
850
923
|
backgroundBlendMode: 'overlay',
|
|
851
924
|
cursor: 'default'
|
|
925
|
+
},
|
|
926
|
+
'&:focus-visible': {
|
|
927
|
+
outlineColor: css.get(theme, `colors.${String(color)}`) || color,
|
|
928
|
+
outlineWidth: 2,
|
|
929
|
+
outlineStyle: 'auto',
|
|
930
|
+
outlineOffset: '2px'
|
|
852
931
|
}
|
|
853
932
|
}), ({
|
|
854
933
|
color = 'primary',
|
|
855
934
|
elevation = 'none',
|
|
856
935
|
theme
|
|
857
|
-
}) => color === 'surface' && _extends__default['default']({},
|
|
858
|
-
|
|
936
|
+
}) => color === 'surface' && _extends__default['default']({}, getBackgroundOverlay(theme, css.get(theme, `buttons.elevations.${elevation}.boxShadow`, 0), 'primary')), ({
|
|
937
|
+
color = 'primary',
|
|
938
|
+
theme,
|
|
939
|
+
isGroupedButton = false
|
|
940
|
+
}) => isGroupedButton && {
|
|
941
|
+
'[data-button-group=""] &': {
|
|
942
|
+
borderColor: css.get(theme, `colors.on.${String(color)}`) || (typeof color === 'string' ? polished.readableColor(color) : undefined),
|
|
943
|
+
':first-of-type': {
|
|
944
|
+
borderTopRightRadius: 0,
|
|
945
|
+
borderBottomRightRadius: 0,
|
|
946
|
+
borderRightStyle: 'solid',
|
|
947
|
+
borderRightWidth: "0.0625rem"
|
|
948
|
+
},
|
|
949
|
+
':not(:first-of-type):not(:last-of-type)': {
|
|
950
|
+
borderRadius: 0
|
|
951
|
+
},
|
|
952
|
+
':last-of-type': {
|
|
953
|
+
borderTopLeftRadius: 0,
|
|
954
|
+
borderBottomLeftRadius: 0,
|
|
955
|
+
borderLeftStyle: 'solid',
|
|
956
|
+
borderLeftWidth: "0.0625rem"
|
|
957
|
+
},
|
|
958
|
+
':last-of-type:nth-of-type(2)': {
|
|
959
|
+
borderLeftWidth: 0
|
|
960
|
+
}
|
|
961
|
+
}
|
|
962
|
+
}, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkZpbGxlZEJ1dHRvbi50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkF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GVtZSwgYGJ1dHRvbnMub3ZlcmxheXMuZmlsbGVkLnByZXNzZWQub3BhY2l0eWApLFxuICAgIHJpcHBsZUVuYWJsZWQ6IGZhbHNlLFxuICB9O1xufVxuIl19 */");
|
|
963
|
+
function getRippleProperties$2(theme) {
|
|
859
964
|
return {
|
|
860
965
|
hoverOpacity: css.get(theme, `buttons.overlays.filled.hover.opacity`),
|
|
861
966
|
focusOpacity: css.get(theme, `buttons.overlays.filled.focus.opacity`),
|
|
862
|
-
pressedOpacity: css.get(theme, `buttons.overlays.filled.pressed.opacity`)
|
|
967
|
+
pressedOpacity: css.get(theme, `buttons.overlays.filled.pressed.opacity`),
|
|
968
|
+
rippleEnabled: false
|
|
863
969
|
};
|
|
864
970
|
}
|
|
865
971
|
|
|
972
|
+
function getRippleProperties$1(theme) {
|
|
973
|
+
return _extends__default['default']({}, getRippleProperties$2(theme), {
|
|
974
|
+
rippleEnabled: true
|
|
975
|
+
});
|
|
976
|
+
}
|
|
977
|
+
|
|
866
978
|
const OutlinedButton = /*#__PURE__*/_styled__default['default'](TransparentButton, process.env.NODE_ENV === "production" ? {
|
|
867
979
|
target: "eo0fwlz0"
|
|
868
980
|
} : {
|
|
@@ -871,17 +983,48 @@ const OutlinedButton = /*#__PURE__*/_styled__default['default'](TransparentButto
|
|
|
871
983
|
})(css.css({
|
|
872
984
|
borderStyle: 'solid',
|
|
873
985
|
borderWidth: "0.0625rem",
|
|
874
|
-
borderColor:
|
|
986
|
+
borderColor: 'outline',
|
|
987
|
+
boxShadow: 0,
|
|
988
|
+
'&:focus,:&active,:&hover': {
|
|
989
|
+
boxShadow: 0
|
|
990
|
+
},
|
|
991
|
+
'&:focus-visible,&:active': {
|
|
992
|
+
borderColor: 'currentColor'
|
|
993
|
+
},
|
|
875
994
|
'&:disabled': {
|
|
876
995
|
color: alpha('on.surface', 0.38),
|
|
877
996
|
borderColor: alpha('on.surface', 0.12),
|
|
878
997
|
cursor: 'default'
|
|
879
998
|
}
|
|
880
|
-
}),
|
|
999
|
+
}), ({
|
|
1000
|
+
isGroupedButton = false
|
|
1001
|
+
}) => isGroupedButton && {
|
|
1002
|
+
'[data-button-group=""] &': {
|
|
1003
|
+
':first-of-type': {
|
|
1004
|
+
borderTopRightRadius: 0,
|
|
1005
|
+
borderBottomRightRadius: 0
|
|
1006
|
+
},
|
|
1007
|
+
':not(:first-of-type):not(:last-of-type)': {
|
|
1008
|
+
borderRadius: 0,
|
|
1009
|
+
borderRightWidth: 0,
|
|
1010
|
+
borderLeftWidth: 0
|
|
1011
|
+
},
|
|
1012
|
+
':last-of-type': {
|
|
1013
|
+
borderTopLeftRadius: 0,
|
|
1014
|
+
borderBottomLeftRadius: 0,
|
|
1015
|
+
borderLeftStyle: 'solid',
|
|
1016
|
+
borderLeftWidth: "0.0625rem"
|
|
1017
|
+
},
|
|
1018
|
+
':last-of-type:nth-of-type(2)': {
|
|
1019
|
+
borderLeftWidth: 0
|
|
1020
|
+
}
|
|
1021
|
+
}
|
|
1022
|
+
}, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIk91dGxpbmVkQnV0dG9uLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFNOEIiLCJmaWxlIjoiT3V0bGluZWRCdXR0b24udHN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgVHJhbnNwYXJlbnRCdXR0b24gfSBmcm9tICcuL1RyYW5zcGFyZW50QnV0dG9uJztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BzdHlsZWQtc3lzdGVtL2Nzcyc7XG5pbXBvcnQgeyBhbHBoYSB9IGZyb20gJy4uL2NvbG9yJztcbmltcG9ydCB7IHJlbSB9IGZyb20gJ3BvbGlzaGVkJztcblxuZXhwb3J0IGNvbnN0IE91dGxpbmVkQ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AgICAgICBib3JkZXJUb3BMZWZ0UmFkaXVzOiAwLFxuICAgICAgICAgIGJvcmRlckJvdHRvbUxlZnRSYWRpdXM6IDAsXG4gICAgICAgICAgYm9yZGVyTGVmdFN0eWxlOiAnc29saWQnLFxuICAgICAgICAgIGJvcmRlckxlZnRXaWR0aDogcmVtKDEpLFxuICAgICAgICB9LFxuICAgICAgICAnOmxhc3Qtb2YtdHlwZTpudGgtb2YtdHlwZSgyKSc6IHtcbiAgICAgICAgICBib3JkZXJMZWZ0V2lkdGg6IDAsXG4gICAgICAgIH0sXG4gICAgICB9LFxuICAgIH1cbik7XG4iXX0= */");
|
|
881
1023
|
|
|
882
1024
|
function getRippleProperties(theme) {
|
|
883
|
-
return _extends__default['default']({}, getRippleProperties$
|
|
884
|
-
center: true
|
|
1025
|
+
return _extends__default['default']({}, getRippleProperties$2(theme), {
|
|
1026
|
+
center: true,
|
|
1027
|
+
rippleEnabled: true
|
|
885
1028
|
});
|
|
886
1029
|
}
|
|
887
1030
|
|
|
@@ -907,7 +1050,7 @@ const rippleStyle = ({
|
|
|
907
1050
|
backgroundColor: `var(${RIPPLE_BACKGROUND_COLOR})`,
|
|
908
1051
|
transformOrigin: 'center center',
|
|
909
1052
|
opacity: 0,
|
|
910
|
-
borderRadius: '
|
|
1053
|
+
borderRadius: '999999px',
|
|
911
1054
|
animation,
|
|
912
1055
|
willChange: 'opacity,transform'
|
|
913
1056
|
});
|
|
@@ -916,7 +1059,7 @@ const Ripple = _styled__default['default']("div", process.env.NODE_ENV === "prod
|
|
|
916
1059
|
} : {
|
|
917
1060
|
target: "ebk8cct0",
|
|
918
1061
|
label: "Ripple"
|
|
919
|
-
})(rippleStyle, "pointer-events:none;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlJpcHBsZS50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBNkJzQiIsImZpbGUiOiJSaXBwbGUudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuaW1wb3J0IHsgQ1NTT2JqZWN0IH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHtcbiAgUklQUExFX0JBQ0tHUk9VTkRfQ09MT1IsXG4gIFJJUFBMRV9TSVpFLFxuICBSSVBQTEVfUE9TSVRJT04sXG59IGZyb20gJy4vY29uc3RhbnRzJztcblxuZXhwb3J0IGNvbnN0IHJpcHBsZVN0eWxlID0gKHtcbiAgYW5pbWF0aW9uLFxufToge1xuICBhbmltYXRpb24/OiBzdHJpbmc7XG59KTogQ1NTT2JqZWN0ID0+
|
|
1062
|
+
})(rippleStyle, "pointer-events:none;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlJpcHBsZS50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBNkJzQiIsImZpbGUiOiJSaXBwbGUudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuaW1wb3J0IHsgQ1NTT2JqZWN0IH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHtcbiAgUklQUExFX0JBQ0tHUk9VTkRfQ09MT1IsXG4gIFJJUFBMRV9TSVpFLFxuICBSSVBQTEVfUE9TSVRJT04sXG59IGZyb20gJy4vY29uc3RhbnRzJztcblxuZXhwb3J0IGNvbnN0IHJpcHBsZVN0eWxlID0gKHtcbiAgYW5pbWF0aW9uLFxufToge1xuICBhbmltYXRpb24/OiBzdHJpbmc7XG59KTogQ1NTT2JqZWN0ID0+ICh7XG4gIHBvc2l0aW9uOiAnYWJzb2x1dGUnLFxuICBib3hTaXppbmc6ICdjb250ZW50LWJveCcsXG4gIGRpc3BsYXk6ICdibG9jaycsXG4gIGNvbnRlbnQ6ICdcIlwiJyxcbiAgd2lkdGg6IGB2YXIoJHtSSVBQTEVfU0laRX0pYCxcbiAgaGVpZ2h0OiBgdmFyKCR7UklQUExFX1NJWkV9KWAsXG4gIHRvcDogYHZhcigke1JJUFBMRV9QT1NJVElPTn0pYCxcbiAgbGVmdDogYHZhcigke1JJUFBMRV9QT1NJVElPTn0pYCxcbiAgYmFja2dyb3VuZENvbG9yOiBgdmFyKCR7UklQUExFX0JBQ0tHUk9VTkRfQ09MT1J9KWAsXG4gIHRyYW5zZm9ybU9yaWdpbjogJ2NlbnRlciBjZW50ZXInLFxuICBvcGFjaXR5OiAwLFxuICBib3JkZXJSYWRpdXM6ICc5OTk5OTlweCcsXG4gIGFuaW1hdGlvbixcbiAgd2lsbENoYW5nZTogJ29wYWNpdHksdHJhbnNmb3JtJyxcbn0pO1xuXG5leHBvcnQgY29uc3QgUmlwcGxlID0gc3R5bGVkLmRpdjx7IGFuaW1hdGlvbj86IHN0cmluZyB9PihyaXBwbGVTdHlsZSwge1xuICBwb2ludGVyRXZlbnRzOiAnbm9uZScsXG59KTtcbiJdfQ== */"));
|
|
920
1063
|
|
|
921
1064
|
const radiusIn = react.keyframes({
|
|
922
1065
|
from: {
|
|
@@ -1168,9 +1311,10 @@ function useRippleSurface(opts) {
|
|
|
1168
1311
|
onKeyDown,
|
|
1169
1312
|
onPointerDown,
|
|
1170
1313
|
style = {},
|
|
1171
|
-
disabled
|
|
1314
|
+
disabled,
|
|
1315
|
+
rippleEnabled = true
|
|
1172
1316
|
} = opts,
|
|
1173
|
-
rippleProps = _objectWithoutPropertiesLoose__default['default'](opts, ["onKeyDown", "onPointerDown", "style", "disabled"]);
|
|
1317
|
+
rippleProps = _objectWithoutPropertiesLoose__default['default'](opts, ["onKeyDown", "onPointerDown", "style", "disabled", "rippleEnabled"]);
|
|
1174
1318
|
|
|
1175
1319
|
const theme = useTheme();
|
|
1176
1320
|
rippleColor = css.get(theme, `colors.${rippleColor}`) || rippleColor;
|
|
@@ -1191,7 +1335,8 @@ function useRippleSurface(opts) {
|
|
|
1191
1335
|
backgroundColor: rippleColor,
|
|
1192
1336
|
disabled
|
|
1193
1337
|
}, rippleProps));
|
|
1194
|
-
|
|
1338
|
+
|
|
1339
|
+
const css$1 = _extends__default['default']({
|
|
1195
1340
|
overflow: 'hidden',
|
|
1196
1341
|
position: 'relative',
|
|
1197
1342
|
cursor: 'pointer',
|
|
@@ -1216,20 +1361,40 @@ function useRippleSurface(opts) {
|
|
|
1216
1361
|
'&:hover::before': {
|
|
1217
1362
|
opacity: hoverOpacity
|
|
1218
1363
|
},
|
|
1219
|
-
'&:focus::before': {
|
|
1364
|
+
'&:focus-visible::before': {
|
|
1220
1365
|
opacity: focusOpacity
|
|
1366
|
+
}
|
|
1367
|
+
}, !rippleEnabled && {
|
|
1368
|
+
'&:active::before': {
|
|
1369
|
+
opacity: pressedOpacity
|
|
1370
|
+
}
|
|
1371
|
+
}, {
|
|
1372
|
+
'&[aria-pressed="true"]::before': {
|
|
1373
|
+
opacity: baseOpacity + pressedOpacity
|
|
1374
|
+
},
|
|
1375
|
+
'&[aria-pressed="true"]:hover::before': {
|
|
1376
|
+
opacity: pressedOpacity + hoverOpacity
|
|
1221
1377
|
},
|
|
1222
|
-
|
|
1378
|
+
'&[aria-pressed="true"]:focus-visible::before': {
|
|
1379
|
+
opacity: pressedOpacity + focusOpacity
|
|
1380
|
+
}
|
|
1381
|
+
}, !rippleEnabled && {
|
|
1382
|
+
'&[aria-pressed="true"]:active::before': {
|
|
1383
|
+
opacity: pressedOpacity + pressedOpacity
|
|
1384
|
+
}
|
|
1385
|
+
}, {
|
|
1386
|
+
['&:disabled::before,&:disabled:hover::before,&:disabled:focus::before,&:disabled:active::before,' + '&[data-disabled]::before,&[data-disabled]:hover::before,&[data-disabled]:focus::before,' + '&[data-disabled]:active::before,&:disabled[aria-pressed="true"]::before']: {
|
|
1223
1387
|
opacity: 0
|
|
1224
1388
|
},
|
|
1225
1389
|
'&:disabled,&[data-disabled]': {
|
|
1226
1390
|
cursor: 'default'
|
|
1227
|
-
}
|
|
1228
|
-
|
|
1391
|
+
}
|
|
1392
|
+
}, rippleEnabled && {
|
|
1229
1393
|
'&::after': _extends__default['default']({}, rippleStyle({
|
|
1230
1394
|
animation
|
|
1231
1395
|
}))
|
|
1232
|
-
};
|
|
1396
|
+
});
|
|
1397
|
+
|
|
1233
1398
|
return {
|
|
1234
1399
|
style: _extends__default['default']({}, animationStyle, style),
|
|
1235
1400
|
onKeyDown: core.wrapEvent(onKeyDown, handleKeyDown),
|
|
@@ -1245,7 +1410,7 @@ const RippleBox = /*#__PURE__*/react$1.forwardRef(function RippleBox(props, forw
|
|
|
1245
1410
|
// eslint-disable-line @typescript-eslint/no-unused-vars
|
|
1246
1411
|
disabled
|
|
1247
1412
|
} = props,
|
|
1248
|
-
otherProps = _objectWithoutPropertiesLoose__default['default'](props, ["as", "__css", "onKeyDown", "onPointerDown", "baseOpacity", "hoverOpacity", "focusOpacity", "pressedOpacity", "rippleColor", "center", "disabled", "style"]);
|
|
1413
|
+
otherProps = _objectWithoutPropertiesLoose__default['default'](props, ["as", "__css", "onKeyDown", "onPointerDown", "baseOpacity", "hoverOpacity", "focusOpacity", "pressedOpacity", "rippleColor", "center", "disabled", "rippleEnabled", "style"]);
|
|
1249
1414
|
|
|
1250
1415
|
const _useRippleSurface = useRippleSurface(props),
|
|
1251
1416
|
{
|
|
@@ -1261,33 +1426,50 @@ const RippleBox = /*#__PURE__*/react$1.forwardRef(function RippleBox(props, forw
|
|
|
1261
1426
|
}, otherProps, rippleProps));
|
|
1262
1427
|
});
|
|
1263
1428
|
|
|
1429
|
+
const ButtonGroupContext = /*#__PURE__*/react$1.createContext(null);
|
|
1430
|
+
ButtonGroupContext.displayName = 'ButtonGroupContext';
|
|
1431
|
+
const useButtonGroupContext = () => react$1.useContext(ButtonGroupContext);
|
|
1432
|
+
|
|
1264
1433
|
const componentMapping = {
|
|
1265
1434
|
text: TransparentButton,
|
|
1266
1435
|
outlined: OutlinedButton,
|
|
1267
1436
|
filled: FilledButton,
|
|
1268
1437
|
fab: FilledButton,
|
|
1269
|
-
'fab-extended': FilledButton,
|
|
1270
1438
|
'fab-mini': FilledButton,
|
|
1439
|
+
'fab-large': FilledButton,
|
|
1440
|
+
'fab-extended': FilledButton,
|
|
1271
1441
|
icon: TransparentButton
|
|
1272
1442
|
};
|
|
1273
1443
|
const rippleMapping = {
|
|
1274
|
-
text: getRippleProperties$
|
|
1275
|
-
outlined: getRippleProperties$
|
|
1276
|
-
filled: getRippleProperties$
|
|
1444
|
+
text: getRippleProperties$3,
|
|
1445
|
+
outlined: getRippleProperties$3,
|
|
1446
|
+
filled: getRippleProperties$2,
|
|
1277
1447
|
fab: getRippleProperties$1,
|
|
1278
|
-
'fab-extended': getRippleProperties$1,
|
|
1279
1448
|
'fab-mini': getRippleProperties$1,
|
|
1449
|
+
'fab-large': getRippleProperties$1,
|
|
1450
|
+
'fab-extended': getRippleProperties$2,
|
|
1280
1451
|
icon: getRippleProperties
|
|
1281
1452
|
};
|
|
1453
|
+
|
|
1454
|
+
function getFallbackElevation(variant = 'text') {
|
|
1455
|
+
if (variant === 'text' || variant === 'outlined' || variant === 'icon') {
|
|
1456
|
+
return 'none';
|
|
1457
|
+
}
|
|
1458
|
+
|
|
1459
|
+
return 'default';
|
|
1460
|
+
}
|
|
1461
|
+
|
|
1282
1462
|
const Button = /*#__PURE__*/react$1.forwardRef(function Button(props, forwardedRef) {
|
|
1463
|
+
const buttonGroup = useButtonGroupContext();
|
|
1464
|
+
|
|
1283
1465
|
const {
|
|
1284
1466
|
children,
|
|
1285
|
-
variant = 'text',
|
|
1467
|
+
variant = (buttonGroup == null ? void 0 : buttonGroup.variant) || 'text',
|
|
1286
1468
|
onPointerDown: onPointerDownProp,
|
|
1287
1469
|
onKeyDown: onKeyDownProp,
|
|
1288
1470
|
color = 'primary',
|
|
1289
1471
|
disabled = false,
|
|
1290
|
-
elevation =
|
|
1472
|
+
elevation = getFallbackElevation(props.variant),
|
|
1291
1473
|
style: styleProp
|
|
1292
1474
|
} = props,
|
|
1293
1475
|
otherProps = _objectWithoutPropertiesLoose__default['default'](props, ["children", "variant", "onPointerDown", "onKeyDown", "color", "disabled", "elevation", "style"]);
|
|
@@ -1309,12 +1491,36 @@ const Button = /*#__PURE__*/react$1.forwardRef(function Button(props, forwardedR
|
|
|
1309
1491
|
disabled: disabled,
|
|
1310
1492
|
"aria-disabled": disabled ? 'true' : undefined,
|
|
1311
1493
|
color: color,
|
|
1312
|
-
elevation: elevation
|
|
1494
|
+
elevation: elevation,
|
|
1495
|
+
isGroupedButton: Boolean(buttonGroup)
|
|
1313
1496
|
}, rippleProps, otherProps, {
|
|
1314
1497
|
children: children
|
|
1315
1498
|
}));
|
|
1316
1499
|
});
|
|
1317
1500
|
|
|
1501
|
+
const ButtonGroup = /*#__PURE__*/react$1.forwardRef(function ButtonGroup(props, forwardedRef) {
|
|
1502
|
+
const {
|
|
1503
|
+
as: Comp = 'div',
|
|
1504
|
+
variant = 'text',
|
|
1505
|
+
direction = 'row'
|
|
1506
|
+
} = props,
|
|
1507
|
+
otherProps = _objectWithoutPropertiesLoose__default['default'](props, ["as", "variant", "direction"]);
|
|
1508
|
+
|
|
1509
|
+
const value = react$1.useMemo(() => ({
|
|
1510
|
+
direction,
|
|
1511
|
+
variant
|
|
1512
|
+
}), [direction, variant]);
|
|
1513
|
+
return /*#__PURE__*/jsxRuntime.jsx(ButtonGroupContext.Provider, {
|
|
1514
|
+
value: value,
|
|
1515
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Comp, _extends__default['default']({
|
|
1516
|
+
ref: forwardedRef,
|
|
1517
|
+
role: "group",
|
|
1518
|
+
"data-button-group": "",
|
|
1519
|
+
"data-button-group-direction": direction
|
|
1520
|
+
}, otherProps))
|
|
1521
|
+
});
|
|
1522
|
+
});
|
|
1523
|
+
|
|
1318
1524
|
const AppBarButton = /*#__PURE__*/react$1.forwardRef(function AppBarButton(props, forwardedRef) {
|
|
1319
1525
|
const {
|
|
1320
1526
|
variant = 'icon'
|
|
@@ -1385,7 +1591,7 @@ const Alert = /*#__PURE__*/react$1.forwardRef(function Alert(props, forwardedRef
|
|
|
1385
1591
|
__css: _extends__default['default']({
|
|
1386
1592
|
p: 3,
|
|
1387
1593
|
bg: alpha(color, 0.1),
|
|
1388
|
-
borderRadius:
|
|
1594
|
+
borderRadius: 'extra-small',
|
|
1389
1595
|
borderColor: alpha(color, 0.2),
|
|
1390
1596
|
borderStyle: 'solid',
|
|
1391
1597
|
borderWidth: "0.0625rem"
|
|
@@ -1767,7 +1973,7 @@ const BottomSheetSurface = /*#__PURE__*/react$1.forwardRef(function BottomSheetS
|
|
|
1767
1973
|
ref: forwardedRef,
|
|
1768
1974
|
as: Paper,
|
|
1769
1975
|
theme: theme,
|
|
1770
|
-
elevation:
|
|
1976
|
+
elevation: 5,
|
|
1771
1977
|
__css: _extends__default['default']({
|
|
1772
1978
|
position: 'absolute',
|
|
1773
1979
|
bg: 'surface',
|
|
@@ -1821,6 +2027,12 @@ const BottomSheet = /*#__PURE__*/react$1.forwardRef(function BottomSheet(props,
|
|
|
1821
2027
|
});
|
|
1822
2028
|
});
|
|
1823
2029
|
|
|
2030
|
+
const PADDING_LEFT_WITH_ICON = 14;
|
|
2031
|
+
const PADDING_LEFT_WITHOUT_ICON = 16;
|
|
2032
|
+
const ICON_WIDTH = 24;
|
|
2033
|
+
const PADDING_RIGHT_WITH_ICON = 12;
|
|
2034
|
+
const PADDING_RIGHT_WITHOUT_ICON = 16;
|
|
2035
|
+
|
|
1824
2036
|
const Input = /*#__PURE__*/react$1.forwardRef(function Input(props, forwardedRef) {
|
|
1825
2037
|
const {
|
|
1826
2038
|
__css,
|
|
@@ -1840,7 +2052,6 @@ const Input = /*#__PURE__*/react$1.forwardRef(function Input(props, forwardedRef
|
|
|
1840
2052
|
}, otherProps, {
|
|
1841
2053
|
__css: _extends__default['default']({
|
|
1842
2054
|
WebkitTapHighlightColor: 'transparent',
|
|
1843
|
-
boxSizing: 'border-box',
|
|
1844
2055
|
appearance: 'none',
|
|
1845
2056
|
outline: 'none',
|
|
1846
2057
|
width: '100%',
|
|
@@ -1854,9 +2065,17 @@ const Input = /*#__PURE__*/react$1.forwardRef(function Input(props, forwardedRef
|
|
|
1854
2065
|
color: alpha('on.surface', 0.87),
|
|
1855
2066
|
letterSpacing: "0.03125rem",
|
|
1856
2067
|
textAlign: 'left',
|
|
2068
|
+
display: 'flex',
|
|
2069
|
+
alignItems: 'center'
|
|
2070
|
+
}, !multiline && {
|
|
2071
|
+
lineHeight: 1,
|
|
2072
|
+
overflow: 'hidden',
|
|
2073
|
+
whiteSpace: 'nowrap',
|
|
2074
|
+
textOverflow: 'ellipsis'
|
|
2075
|
+
}, {
|
|
1857
2076
|
'::placeholder': {
|
|
1858
2077
|
opacity: 0,
|
|
1859
|
-
color: alpha('on.surface', 0.
|
|
2078
|
+
color: variant === 'filled' ? alpha('on.surface-variant', 0.87) : alpha('on.surface-variant', 0.6),
|
|
1860
2079
|
transition: `opacity .18s cubic-bezier(.4,0,.2,1)`
|
|
1861
2080
|
},
|
|
1862
2081
|
':disabled::placeholder': {
|
|
@@ -1868,7 +2087,7 @@ const Input = /*#__PURE__*/react$1.forwardRef(function Input(props, forwardedRef
|
|
|
1868
2087
|
':disabled': {
|
|
1869
2088
|
cursor: 'default'
|
|
1870
2089
|
},
|
|
1871
|
-
'select&,button&': {
|
|
2090
|
+
'select&,[role="button"]&': {
|
|
1872
2091
|
cursor: 'pointer'
|
|
1873
2092
|
},
|
|
1874
2093
|
'select&': {
|
|
@@ -1877,18 +2096,18 @@ const Input = /*#__PURE__*/react$1.forwardRef(function Input(props, forwardedRef
|
|
|
1877
2096
|
color: 'on.surface'
|
|
1878
2097
|
}
|
|
1879
2098
|
},
|
|
1880
|
-
paddingLeft: leadingIcon ? polished.rem(
|
|
1881
|
-
paddingRight: trailingIcon ? polished.rem(
|
|
2099
|
+
paddingLeft: leadingIcon ? polished.rem(PADDING_LEFT_WITH_ICON + ICON_WIDTH + PADDING_LEFT_WITHOUT_ICON) : polished.rem(PADDING_LEFT_WITHOUT_ICON),
|
|
2100
|
+
paddingRight: trailingIcon ? polished.rem(PADDING_RIGHT_WITH_ICON + ICON_WIDTH + PADDING_RIGHT_WITHOUT_ICON) : polished.rem(PADDING_RIGHT_WITHOUT_ICON)
|
|
1882
2101
|
}, variant === 'outlined' && {
|
|
1883
|
-
paddingTop:
|
|
1884
|
-
paddingBottom:
|
|
2102
|
+
paddingTop: "1rem",
|
|
2103
|
+
paddingBottom: "1rem"
|
|
1885
2104
|
}, variant === 'filled' && {
|
|
1886
|
-
paddingTop: hasLabel ? "1.
|
|
1887
|
-
paddingBottom: hasLabel ? "0.
|
|
2105
|
+
paddingTop: hasLabel ? "1.5rem" : "1rem",
|
|
2106
|
+
paddingBottom: hasLabel ? "0.5rem" : "1rem"
|
|
1888
2107
|
}, multiline && {
|
|
1889
2108
|
resize: 'vertical',
|
|
1890
2109
|
paddingTop: 0,
|
|
1891
|
-
marginTop: variant === 'outlined' || !hasLabel ? "
|
|
2110
|
+
marginTop: variant === 'outlined' || !hasLabel ? "1.125rem" : "1.625rem"
|
|
1892
2111
|
}, __css)
|
|
1893
2112
|
}));
|
|
1894
2113
|
});
|
|
@@ -1909,10 +2128,9 @@ const FloatingLabel = /*#__PURE__*/react$1.forwardRef(function FloatingLabel(pro
|
|
|
1909
2128
|
style = {},
|
|
1910
2129
|
translateX: translateXProp,
|
|
1911
2130
|
translateY: translateYProp,
|
|
1912
|
-
top = 0,
|
|
1913
2131
|
children
|
|
1914
2132
|
} = props,
|
|
1915
|
-
otherProps = _objectWithoutPropertiesLoose__default['default'](props, ["offsetX", "scale", "height", "active", "transitionTime", "style", "translateX", "translateY", "
|
|
2133
|
+
otherProps = _objectWithoutPropertiesLoose__default['default'](props, ["offsetX", "scale", "height", "active", "transitionTime", "style", "translateX", "translateY", "children"]);
|
|
1916
2134
|
|
|
1917
2135
|
const ctx = useNotchedOutlineContext();
|
|
1918
2136
|
const notchStart = ctx ? ctx.notchStart : 0;
|
|
@@ -1929,7 +2147,6 @@ const FloatingLabel = /*#__PURE__*/react$1.forwardRef(function FloatingLabel(pro
|
|
|
1929
2147
|
fontWeight: 'regular',
|
|
1930
2148
|
display: 'inline-flex',
|
|
1931
2149
|
alignItems: 'center',
|
|
1932
|
-
top: polished.rem(top),
|
|
1933
2150
|
left: polished.rem(offsetX),
|
|
1934
2151
|
height: typeof height === 'number' ? polished.rem(height) : height,
|
|
1935
2152
|
transformOrigin: 'left center',
|
|
@@ -2017,7 +2234,7 @@ const Overlay = props => {
|
|
|
2017
2234
|
right: 0,
|
|
2018
2235
|
backgroundColor: 'on.surface',
|
|
2019
2236
|
pointerEvents: 'none',
|
|
2020
|
-
opacity: 0
|
|
2237
|
+
opacity: 0,
|
|
2021
2238
|
[makeSelector$1('hover:not([disabled]):not(:focus)')]: !forceActive && {
|
|
2022
2239
|
opacity: css.get(theme, `buttons.overlays.filled.hover.opacity`)
|
|
2023
2240
|
},
|
|
@@ -2065,7 +2282,8 @@ const FilledContainer = /*#__PURE__*/react$1.forwardRef(function FilledContainer
|
|
|
2065
2282
|
} = props,
|
|
2066
2283
|
otherProps = _objectWithoutPropertiesLoose__default['default'](props, ["label", "labelIsFloating", "inputId", "hasFocus", "color", "children", "error", "disabled", "forceActive", "leadingIcon"]);
|
|
2067
2284
|
|
|
2068
|
-
const
|
|
2285
|
+
const finalLabelHeight = 16;
|
|
2286
|
+
const labelHeight = finalLabelHeight / 0.75;
|
|
2069
2287
|
const inputHeight = 56;
|
|
2070
2288
|
const color = error ? 'error' : colorProp;
|
|
2071
2289
|
const active = hasFocus || forceActive;
|
|
@@ -2075,25 +2293,30 @@ const FilledContainer = /*#__PURE__*/react$1.forwardRef(function FilledContainer
|
|
|
2075
2293
|
active: active || error,
|
|
2076
2294
|
__css: _extends__default['default']({
|
|
2077
2295
|
position: 'relative',
|
|
2296
|
+
lineHeight: 0,
|
|
2078
2297
|
width: '100%',
|
|
2079
|
-
backgroundColor: 'surface',
|
|
2298
|
+
backgroundColor: 'surface-variant',
|
|
2080
2299
|
overflow: 'hidden',
|
|
2081
2300
|
boxSizing: 'border-box',
|
|
2082
2301
|
borderTopRightRadius: "0.25rem",
|
|
2083
2302
|
borderTopLeftRadius: "0.25rem",
|
|
2084
|
-
color: alpha('on.surface', 0.
|
|
2303
|
+
color: alpha('on.surface-variant', 0.87)
|
|
2085
2304
|
}, disabled && {
|
|
2086
|
-
|
|
2305
|
+
backgroundColor: alpha('on.surface-variant', 0.08),
|
|
2306
|
+
color: alpha('on.surface-variant', 0.38)
|
|
2087
2307
|
}, active && {
|
|
2088
|
-
color:
|
|
2308
|
+
color: 'primary'
|
|
2089
2309
|
})
|
|
2090
2310
|
}, otherProps, {
|
|
2091
2311
|
children: [label && /*#__PURE__*/jsxRuntime.jsx(FloatingLabel, {
|
|
2092
|
-
height:
|
|
2093
|
-
|
|
2094
|
-
offsetX: leadingIcon ? 48 : 16,
|
|
2312
|
+
height: inputHeight,
|
|
2313
|
+
offsetX: leadingIcon ? PADDING_LEFT_WITH_ICON + ICON_WIDTH + PADDING_LEFT_WITHOUT_ICON : PADDING_LEFT_WITHOUT_ICON,
|
|
2095
2314
|
translateX: 0,
|
|
2096
|
-
translateY:
|
|
2315
|
+
translateY: // To debug, delete these lines one by one to see it doing its work
|
|
2316
|
+
-(inputHeight * 0.5) + // Put it at the top, crossing middle label
|
|
2317
|
+
labelHeight * 0.75 * 0.5 + // Put it at position 0
|
|
2318
|
+
8 // Add a 8px padding to the top
|
|
2319
|
+
,
|
|
2097
2320
|
active: labelIsFloating,
|
|
2098
2321
|
htmlFor: inputId,
|
|
2099
2322
|
color: active || error ? color : undefined,
|
|
@@ -2109,7 +2332,7 @@ const FilledContainer = /*#__PURE__*/react$1.forwardRef(function FilledContainer
|
|
|
2109
2332
|
|
|
2110
2333
|
const NOTCH_PADDING = 4;
|
|
2111
2334
|
|
|
2112
|
-
const makeSelector = state => `input:${state} ~ & [data-notch-outline-item],` + `select:${state} ~ & [data-notch-outline-item],` + `button:${state} ~ & [data-notch-outline-item],` + `textarea:${state} ~ & [data-notch-outline-item]`;
|
|
2335
|
+
const makeSelector = state => `input:${state} ~ & [data-notch-outline-item],` + `select:${state} ~ & [data-notch-outline-item],` + `[role="button"]:${state} ~ & [data-notch-outline-item],` + `textarea:${state} ~ & [data-notch-outline-item]`;
|
|
2113
2336
|
|
|
2114
2337
|
const InnerContainer = /*#__PURE__*/_styled__default['default']('div', process.env.NODE_ENV === "production" ? {
|
|
2115
2338
|
shouldForwardProp: shouldForwardProp__default['default'],
|
|
@@ -2156,17 +2379,17 @@ const InnerContainer = /*#__PURE__*/_styled__default['default']('div', process.e
|
|
|
2156
2379
|
}
|
|
2157
2380
|
|
|
2158
2381
|
const inactiveStyle = _extends__default['default']({
|
|
2159
|
-
color:
|
|
2160
|
-
borderColor:
|
|
2382
|
+
color: 'on.surface-variant',
|
|
2383
|
+
borderColor: 'outline'
|
|
2161
2384
|
}, borderStyling(borderRadius, borderWidth));
|
|
2162
2385
|
|
|
2163
2386
|
const hoverStyle = {
|
|
2164
|
-
borderColor:
|
|
2165
|
-
color:
|
|
2387
|
+
borderColor: 'on.surface',
|
|
2388
|
+
color: 'on.surface-variant'
|
|
2166
2389
|
};
|
|
2167
2390
|
|
|
2168
2391
|
const focusStyle = _extends__default['default']({
|
|
2169
|
-
borderColor:
|
|
2392
|
+
borderColor: color,
|
|
2170
2393
|
color: alpha(color, 0.87)
|
|
2171
2394
|
}, borderStyling(borderRadius, borderWidthWhenFocused));
|
|
2172
2395
|
|
|
@@ -2188,7 +2411,7 @@ const InnerContainer = /*#__PURE__*/_styled__default['default']('div', process.e
|
|
|
2188
2411
|
// notch items styles when input is disabled
|
|
2189
2412
|
[makeSelector('disabled')]: disabledStyle
|
|
2190
2413
|
});
|
|
2191
|
-
}, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
2414
|
+
}, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlZENvbXBvbmVudHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBb0I4QiIsImZpbGUiOiJzdHlsZWRDb21wb25lbnRzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuaW1wb3J0IHsgVGhlbWUgfSBmcm9tICcuLi90aGVtZSc7XG5pbXBvcnQgeyByZW0gfSBmcm9tICdwb2xpc2hlZCc7XG5pbXBvcnQgeyBhbHBoYSB9IGZyb20gJy4uL2NvbG9yJztcbmltcG9ydCBzaG91bGRGb3J3YXJkUHJvcCBmcm9tICdAc3R5bGVkLXN5c3RlbS9zaG91bGQtZm9yd2FyZC1wcm9wJztcbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BzdHlsZWQtc3lzdGVtL2Nzcyc7XG5cbmV4cG9ydCBjb25zdCBOT1RDSF9QQURESU5HID0gNDtcblxuY29uc3QgbWFrZVNlbGVjdG9yID0gKFxuICBzdGF0ZTpcbiAgICB8ICdob3Zlcjpub3QoW2Rpc2FibGVkXSk6bm90KDpmb2N1cyknXG4gICAgfCAnZm9jdXM6bm90KFtkaXNhYmxlZF0pJ1xuICAgIHwgJ2Rpc2FibGVkJ1xuKSA9PlxuICBgaW5wdXQ6JHtzdGF0ZX0gfiAmIFtkYXRhLW5vdGNoLW91dGxpbmUtaXRlbV0sYCArXG4gIGBzZWxlY3Q6JHtzdGF0ZX0gfiAmIFtkYXRhLW5vdGNoLW91dGxpbmUtaXRlbV0sYCArXG4gIGBbcm9sZT1cImJ1dHRvblwiXToke3N0YXRlfSB+ICYgW2RhdGEtbm90Y2gtb3V0bGluZS1pdGVtXSxgIC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Zm9jdXNTdHlsZSA6IGluYWN0aXZlU3R5bGUpLFxuICAgICAgfSxcbiAgICAgIC8vIG5vdGNoIGl0ZW1zIHN0eWxlcyB3aGVuIGlucHV0IGlzIGhvdmVyZWRcbiAgICAgIFttYWtlU2VsZWN0b3IoJ2hvdmVyOm5vdChbZGlzYWJsZWRdKTpub3QoOmZvY3VzKScpXTogZm9yY2VBY3RpdmVcbiAgICAgICAgPyBmb2N1c1N0eWxlXG4gICAgICAgIDogaG92ZXJTdHlsZSxcbiAgICAgIC8vIG5vdGNoIGl0ZW1zIHN0eWxlcyB3aGVuIGlucHV0IGlzIGZvY3VzZWRcbiAgICAgIFttYWtlU2VsZWN0b3IoJ2ZvY3VzOm5vdChbZGlzYWJsZWRdKScpXTogZm9jdXNTdHlsZSxcbiAgICAgIC8vIG5vdGNoIGl0ZW1zIHN0eWxlcyB3aGVuIGlucHV0IGlzIGRpc2FibGVkXG4gICAgICBbbWFrZVNlbGVjdG9yKCdkaXNhYmxlZCcpXTogZGlzYWJsZWRTdHlsZSxcbiAgICB9KTtcbiAgfVxuKTtcbiJdfQ== */");
|
|
2192
2415
|
|
|
2193
2416
|
const NotchedOutline = /*#__PURE__*/react$1.forwardRef(function NotchedOutline(props, forwardedRef) {
|
|
2194
2417
|
let {
|
|
@@ -2274,8 +2497,10 @@ const OutlinedContainer = /*#__PURE__*/react$1.forwardRef(function OutlinedConta
|
|
|
2274
2497
|
}
|
|
2275
2498
|
}, [label]);
|
|
2276
2499
|
const color = error ? 'error' : colorProp;
|
|
2500
|
+
const inputHeight = 56;
|
|
2277
2501
|
return /*#__PURE__*/jsxRuntime.jsx(Box, _extends__default['default']({
|
|
2278
|
-
position: "relative"
|
|
2502
|
+
position: "relative",
|
|
2503
|
+
lineHeight: 0
|
|
2279
2504
|
}, otherProps, {
|
|
2280
2505
|
children: /*#__PURE__*/jsxRuntime.jsx(NotchedOutline, {
|
|
2281
2506
|
ref: forwardedRef,
|
|
@@ -2287,9 +2512,9 @@ const OutlinedContainer = /*#__PURE__*/react$1.forwardRef(function OutlinedConta
|
|
|
2287
2512
|
notchStart: 16,
|
|
2288
2513
|
forceActive: forceActive || error,
|
|
2289
2514
|
label: label && /*#__PURE__*/jsxRuntime.jsx(FloatingLabel, {
|
|
2290
|
-
height:
|
|
2291
|
-
offsetX: leadingIcon ?
|
|
2292
|
-
translateX: leadingIcon ? -
|
|
2515
|
+
height: inputHeight,
|
|
2516
|
+
offsetX: leadingIcon ? PADDING_LEFT_WITH_ICON + ICON_WIDTH + PADDING_LEFT_WITHOUT_ICON : PADDING_LEFT_WITHOUT_ICON,
|
|
2517
|
+
translateX: leadingIcon ? -(PADDING_LEFT_WITH_ICON + ICON_WIDTH) : 0,
|
|
2293
2518
|
active: forceActive || labelIsFloating,
|
|
2294
2519
|
ref: labelRef,
|
|
2295
2520
|
htmlFor: inputId,
|
|
@@ -2352,8 +2577,8 @@ const IconContainer = ({
|
|
|
2352
2577
|
position: "absolute",
|
|
2353
2578
|
__css: {
|
|
2354
2579
|
top: 0,
|
|
2355
|
-
[position === 'start' ? 'left' : 'right']:
|
|
2356
|
-
minWidth:
|
|
2580
|
+
[position === 'start' ? 'left' : 'right']: polished.rem(PADDING_LEFT_WITH_ICON),
|
|
2581
|
+
minWidth: polished.rem(ICON_WIDTH),
|
|
2357
2582
|
display: 'inline-flex',
|
|
2358
2583
|
alignItems: 'center',
|
|
2359
2584
|
justifyContent: 'center',
|
|
@@ -2510,14 +2735,6 @@ const List = /*#__PURE__*/react$1.forwardRef(function List(props, forwardedRef)
|
|
|
2510
2735
|
}, otherProps));
|
|
2511
2736
|
});
|
|
2512
2737
|
|
|
2513
|
-
const listitemContext = /*#__PURE__*/react$1.createContext({
|
|
2514
|
-
color: 'on.surface'
|
|
2515
|
-
});
|
|
2516
|
-
const {
|
|
2517
|
-
Provider: ListItemProvider
|
|
2518
|
-
} = listitemContext;
|
|
2519
|
-
const useListItemContext = () => react$1.useContext(listitemContext);
|
|
2520
|
-
|
|
2521
2738
|
const ListItem = /*#__PURE__*/react$1.forwardRef(function ListItem(props, forwardedRef) {
|
|
2522
2739
|
const {
|
|
2523
2740
|
as = 'div',
|
|
@@ -2533,40 +2750,60 @@ const ListItem = /*#__PURE__*/react$1.forwardRef(function ListItem(props, forwar
|
|
|
2533
2750
|
otherProps = _objectWithoutPropertiesLoose__default['default'](props, ["as", "innerAs", "children", "selected", "aria-selected", "disabled", "color", "rippleColor", "__css"]);
|
|
2534
2751
|
|
|
2535
2752
|
const selected = ariaSelectedProp || selectedProp;
|
|
2536
|
-
const color =
|
|
2753
|
+
const color = rippleColor || colorProp || 'primary';
|
|
2537
2754
|
const theme = useTheme();
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2755
|
+
const baseOpacity = 0.12;
|
|
2756
|
+
const hoverOpacity = 0.16;
|
|
2757
|
+
const focusOpacity = 0.24;
|
|
2758
|
+
return /*#__PURE__*/jsxRuntime.jsx(Box, _extends__default['default']({
|
|
2759
|
+
ref: forwardedRef,
|
|
2760
|
+
as: innerAs || as,
|
|
2761
|
+
theme: theme,
|
|
2762
|
+
display: "flex",
|
|
2763
|
+
"data-disabled": disabled ? '' : undefined,
|
|
2764
|
+
"aria-selected": selected ? 'true' : undefined,
|
|
2765
|
+
disabled: disabled
|
|
2766
|
+
}, otherProps, {
|
|
2767
|
+
__css: _extends__default['default']({
|
|
2768
|
+
px: 3,
|
|
2769
|
+
py: "0.75rem",
|
|
2770
|
+
transition: 'background-color 75ms linear',
|
|
2771
|
+
backgroundColor: 'transparent',
|
|
2772
|
+
color: alpha('on.surface', 0.87),
|
|
2773
|
+
cursor: 'pointer',
|
|
2774
|
+
':hover': {
|
|
2775
|
+
backgroundColor: alpha('on.surface', hoverOpacity)
|
|
2776
|
+
},
|
|
2777
|
+
':focus': {
|
|
2778
|
+
outline: 'none',
|
|
2779
|
+
backgroundColor: alpha('on.surface', focusOpacity)
|
|
2780
|
+
},
|
|
2781
|
+
':active': {
|
|
2782
|
+
backgroundColor: alpha('on.surface', baseOpacity + 0.12)
|
|
2783
|
+
},
|
|
2784
|
+
'&[aria-selected="true"]': {
|
|
2785
|
+
backgroundColor: alpha(color, baseOpacity + 0.12),
|
|
2786
|
+
':hover': {
|
|
2787
|
+
backgroundColor: alpha(color, hoverOpacity + 0.12)
|
|
2788
|
+
},
|
|
2561
2789
|
':focus': {
|
|
2562
|
-
outline: 'none'
|
|
2790
|
+
outline: 'none',
|
|
2791
|
+
backgroundColor: alpha(color, focusOpacity + 0.12)
|
|
2563
2792
|
},
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2793
|
+
':active': {
|
|
2794
|
+
backgroundColor: alpha(color, baseOpacity + 0.24)
|
|
2795
|
+
}
|
|
2796
|
+
},
|
|
2797
|
+
'&[data-disabled]': {
|
|
2798
|
+
color: alpha('on.surface', 0.6),
|
|
2799
|
+
backgroundColor: 'transparent',
|
|
2800
|
+
cursor: 'default'
|
|
2801
|
+
},
|
|
2802
|
+
textDecoration: 'none',
|
|
2803
|
+
WebkitTapHighlightColor: 'transparent'
|
|
2804
|
+
}, css.get(theme, 'text.subtitle1'), __css),
|
|
2805
|
+
children: children
|
|
2806
|
+
}));
|
|
2570
2807
|
});
|
|
2571
2808
|
|
|
2572
2809
|
const ListItemText = /*#__PURE__*/react$1.forwardRef(function ListItemText(props, forwardedRef) {
|
|
@@ -2577,10 +2814,6 @@ const ListItemText = /*#__PURE__*/react$1.forwardRef(function ListItemText(props
|
|
|
2577
2814
|
} = props,
|
|
2578
2815
|
otherProps = _objectWithoutPropertiesLoose__default['default'](props, ["as", "text", "secondaryText"]);
|
|
2579
2816
|
|
|
2580
|
-
const {
|
|
2581
|
-
color,
|
|
2582
|
-
disabled
|
|
2583
|
-
} = useListItemContext();
|
|
2584
2817
|
return /*#__PURE__*/jsxRuntime.jsxs(Comp, _extends__default['default']({
|
|
2585
2818
|
ref: forwardedRef
|
|
2586
2819
|
}, otherProps, {
|
|
@@ -2589,7 +2822,8 @@ const ListItemText = /*#__PURE__*/react$1.forwardRef(function ListItemText(props
|
|
|
2589
2822
|
variant: "body2",
|
|
2590
2823
|
display: "block",
|
|
2591
2824
|
__css: {
|
|
2592
|
-
color:
|
|
2825
|
+
color: 'currentColor',
|
|
2826
|
+
opacity: 0.65
|
|
2593
2827
|
},
|
|
2594
2828
|
children: secondaryText
|
|
2595
2829
|
})]
|
|
@@ -2645,10 +2879,11 @@ const ComboboxList = /*#__PURE__*/react$1.forwardRef((props, forwardedRef) => {
|
|
|
2645
2879
|
ref: forwardedRef,
|
|
2646
2880
|
innerAs: as,
|
|
2647
2881
|
outlined: false,
|
|
2648
|
-
elevation:
|
|
2882
|
+
elevation: 2,
|
|
2649
2883
|
__css: _extends__default['default']({
|
|
2650
2884
|
maxHeight: "18.75rem",
|
|
2651
2885
|
overflowY: 'auto',
|
|
2886
|
+
borderRadius: 'default',
|
|
2652
2887
|
'[data-popper-placement="top"] &': {
|
|
2653
2888
|
transformOrigin: 'bottom center'
|
|
2654
2889
|
},
|
|
@@ -2966,7 +3201,7 @@ const CheckBoxInner = /*#__PURE__*/react$1.forwardRef(function CheckBoxInner(pro
|
|
|
2966
3201
|
outline: 'none'
|
|
2967
3202
|
},
|
|
2968
3203
|
border: 'none',
|
|
2969
|
-
borderRadius: '
|
|
3204
|
+
borderRadius: 'full',
|
|
2970
3205
|
zIndex: 1,
|
|
2971
3206
|
position: 'absolute'
|
|
2972
3207
|
}, __css)
|
|
@@ -3024,15 +3259,16 @@ const CheckBox = /*#__PURE__*/react$1.forwardRef(function CheckBox(props, forwar
|
|
|
3024
3259
|
});
|
|
3025
3260
|
});
|
|
3026
3261
|
|
|
3027
|
-
function getFilledCSS(bg, color) {
|
|
3028
|
-
return {
|
|
3029
|
-
bg
|
|
3030
|
-
|
|
3262
|
+
function getFilledCSS(theme, bg, color, disabled) {
|
|
3263
|
+
return _extends__default['default']({}, !disabled && bg !== 'surface' ? {
|
|
3264
|
+
bg
|
|
3265
|
+
} : _extends__default['default']({}, getColorOverlay(theme, 'surface', 'primary', 0.05), getDarkThemeBackgroundOverlay(theme, 2)), {
|
|
3266
|
+
color,
|
|
3031
3267
|
'&::before': {
|
|
3032
3268
|
backgroundColor: 'currentColor',
|
|
3033
3269
|
position: 'absolute',
|
|
3034
3270
|
content: '""',
|
|
3035
|
-
opacity: 0
|
|
3271
|
+
opacity: 0,
|
|
3036
3272
|
pointerEvents: 'none',
|
|
3037
3273
|
top: 0,
|
|
3038
3274
|
right: 0,
|
|
@@ -3045,17 +3281,21 @@ function getFilledCSS(bg, color) {
|
|
|
3045
3281
|
'& > *': {
|
|
3046
3282
|
zIndex: 1
|
|
3047
3283
|
}
|
|
3048
|
-
}
|
|
3284
|
+
}, disabled && {
|
|
3285
|
+
boxShadow: 0,
|
|
3286
|
+
bg: alpha('on.surface', 0.32)
|
|
3287
|
+
});
|
|
3049
3288
|
}
|
|
3050
3289
|
|
|
3051
|
-
function getOutlinedCSS(bg, color, borderOpacity) {
|
|
3052
|
-
return {
|
|
3053
|
-
bg
|
|
3054
|
-
|
|
3290
|
+
function getOutlinedCSS(theme, bg, color, borderOpacity) {
|
|
3291
|
+
return _extends__default['default']({}, bg !== 'surface' ? {
|
|
3292
|
+
bg
|
|
3293
|
+
} : getDarkThemeBackgroundOverlay(theme, 2), {
|
|
3294
|
+
color: color,
|
|
3055
3295
|
borderColor: alpha(color, borderOpacity),
|
|
3056
3296
|
borderStyle: 'solid',
|
|
3057
3297
|
borderWidth: "0.0625rem"
|
|
3058
|
-
};
|
|
3298
|
+
});
|
|
3059
3299
|
}
|
|
3060
3300
|
|
|
3061
3301
|
const ChipBase = /*#__PURE__*/react$1.forwardRef(function Chip(props, forwardedRef) {
|
|
@@ -3074,6 +3314,7 @@ const ChipBase = /*#__PURE__*/react$1.forwardRef(function Chip(props, forwardedR
|
|
|
3074
3314
|
const theme = useTheme();
|
|
3075
3315
|
return /*#__PURE__*/jsxRuntime.jsx(Box, _extends__default['default']({
|
|
3076
3316
|
as: as,
|
|
3317
|
+
"data-disabled": disabled ? '' : undefined,
|
|
3077
3318
|
ref: forwardedRef,
|
|
3078
3319
|
__css: _extends__default['default']({
|
|
3079
3320
|
boxSizing: 'border-box',
|
|
@@ -3087,9 +3328,11 @@ const ChipBase = /*#__PURE__*/react$1.forwardRef(function Chip(props, forwardedR
|
|
|
3087
3328
|
fontSize: 'inherit',
|
|
3088
3329
|
border: 0,
|
|
3089
3330
|
overflow: 'hidden',
|
|
3331
|
+
whiteSpace: 'nowrap',
|
|
3090
3332
|
cursor: 'default',
|
|
3091
3333
|
WebkitTapHighlightColor: 'transparent',
|
|
3092
3334
|
willChange: 'transform,opacity',
|
|
3335
|
+
minWidth: 'auto',
|
|
3093
3336
|
'&::-moz-focus-inner': {
|
|
3094
3337
|
border: 0
|
|
3095
3338
|
}
|
|
@@ -3102,8 +3345,8 @@ const ChipBase = /*#__PURE__*/react$1.forwardRef(function Chip(props, forwardedR
|
|
|
3102
3345
|
})({
|
|
3103
3346
|
variant: variantProp,
|
|
3104
3347
|
theme
|
|
3105
|
-
}), variantProp === 'filled' ? getFilledCSS(backgroundColorProp, colorProp) : getOutlinedCSS(backgroundColorProp, colorProp, borderOpacityProp), {
|
|
3106
|
-
opacity: disabled ? 0.
|
|
3348
|
+
}), variantProp === 'filled' ? getFilledCSS(theme, backgroundColorProp, colorProp, disabled) : getOutlinedCSS(theme, backgroundColorProp, colorProp, borderOpacityProp), {
|
|
3349
|
+
opacity: disabled ? 0.38 : 1
|
|
3107
3350
|
}, __css)
|
|
3108
3351
|
}, otherProps, {
|
|
3109
3352
|
children: children
|
|
@@ -3112,77 +3355,62 @@ const ChipBase = /*#__PURE__*/react$1.forwardRef(function Chip(props, forwardedR
|
|
|
3112
3355
|
|
|
3113
3356
|
const ButtonChip = /*#__PURE__*/react$1.forwardRef(function ButtonChip(props, forwardedRef) {
|
|
3114
3357
|
const {
|
|
3115
|
-
as = '
|
|
3358
|
+
as = 'div',
|
|
3116
3359
|
onClick,
|
|
3117
3360
|
disabled: disabledProp,
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
children
|
|
3361
|
+
leadingIcon,
|
|
3362
|
+
trailingIcon,
|
|
3363
|
+
children,
|
|
3364
|
+
color = 'surface',
|
|
3365
|
+
__css
|
|
3121
3366
|
} = props,
|
|
3122
|
-
otherProps = _objectWithoutPropertiesLoose__default['default'](props, ["as", "onClick", "disabled", "
|
|
3367
|
+
otherProps = _objectWithoutPropertiesLoose__default['default'](props, ["as", "onClick", "disabled", "leadingIcon", "trailingIcon", "children", "color", "__css"]);
|
|
3123
3368
|
|
|
3124
3369
|
const theme = useTheme();
|
|
3125
3370
|
const isClickable = onClick && !disabledProp;
|
|
3126
3371
|
return /*#__PURE__*/jsxRuntime.jsx(ChipBase, _extends__default['default']({
|
|
3127
|
-
as: "
|
|
3372
|
+
as: "div",
|
|
3128
3373
|
onClick: isClickable ? onClick : undefined,
|
|
3129
|
-
disabled: disabledProp
|
|
3374
|
+
disabled: disabledProp,
|
|
3375
|
+
color: "on.surface",
|
|
3376
|
+
backgroundColor: "surface",
|
|
3377
|
+
__css: __css
|
|
3130
3378
|
}, otherProps, {
|
|
3131
|
-
children: /*#__PURE__*/jsxRuntime.jsxs(
|
|
3132
|
-
as:
|
|
3379
|
+
children: /*#__PURE__*/jsxRuntime.jsxs(RippleBox, {
|
|
3380
|
+
as: as,
|
|
3381
|
+
role: isClickable ? 'button' : undefined,
|
|
3382
|
+
tabIndex: isClickable ? 0 : undefined,
|
|
3383
|
+
theme: theme,
|
|
3384
|
+
ref: forwardedRef,
|
|
3385
|
+
rippleColor: 'currentColor',
|
|
3386
|
+
baseOpacity: 0,
|
|
3387
|
+
hoverOpacity: 0.12,
|
|
3388
|
+
focusOpacity: 0.24,
|
|
3389
|
+
center: false,
|
|
3390
|
+
disabled: !isClickable,
|
|
3391
|
+
"aria-disabled": !isClickable,
|
|
3133
3392
|
__css: {
|
|
3393
|
+
bg: 'transparent',
|
|
3394
|
+
color: 'inherit',
|
|
3395
|
+
padding: `0`,
|
|
3396
|
+
pl: leadingIcon ? "0.5rem" : "0.75rem",
|
|
3397
|
+
pr: trailingIcon ? "0.5rem" : "0.75rem",
|
|
3398
|
+
gap: "0.5rem",
|
|
3134
3399
|
width: '100%',
|
|
3400
|
+
minWidth: 'auto',
|
|
3135
3401
|
height: '100%',
|
|
3402
|
+
appearance: 'none',
|
|
3403
|
+
':focus': {
|
|
3404
|
+
outline: 'none'
|
|
3405
|
+
},
|
|
3136
3406
|
border: 'none',
|
|
3407
|
+
borderRadius: 0,
|
|
3408
|
+
position: 'relative',
|
|
3137
3409
|
display: 'inline-flex',
|
|
3138
3410
|
alignItems: 'center',
|
|
3139
|
-
|
|
3411
|
+
cursor: isClickable ? 'pointer' : 'default'
|
|
3140
3412
|
},
|
|
3141
|
-
children: [
|
|
3142
|
-
as: as,
|
|
3143
|
-
theme: theme,
|
|
3144
|
-
ref: forwardedRef,
|
|
3145
|
-
rippleColor: 'currentColor',
|
|
3146
|
-
baseOpacity: 0,
|
|
3147
|
-
hoverOpacity: 0.12,
|
|
3148
|
-
focusOpacity: 0.24,
|
|
3149
|
-
center: false,
|
|
3150
|
-
disabled: !isClickable,
|
|
3151
|
-
"aria-disabled": !isClickable,
|
|
3152
|
-
__css: {
|
|
3153
|
-
backgroundColor: 'rgba(0,0,0,0)',
|
|
3154
|
-
top: 0,
|
|
3155
|
-
left: 0,
|
|
3156
|
-
width: '100%',
|
|
3157
|
-
height: '100%',
|
|
3158
|
-
appearance: 'none',
|
|
3159
|
-
':focus': {
|
|
3160
|
-
outline: 'none'
|
|
3161
|
-
},
|
|
3162
|
-
border: 'none',
|
|
3163
|
-
borderRadius: 0,
|
|
3164
|
-
position: 'absolute',
|
|
3165
|
-
color: 'inherit',
|
|
3166
|
-
cursor: isClickable ? 'pointer' : 'default'
|
|
3167
|
-
}
|
|
3168
|
-
}), /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
3169
|
-
as: "span",
|
|
3170
|
-
pl: "0.25rem",
|
|
3171
|
-
pr: "0.5rem",
|
|
3172
|
-
children: leftIcon
|
|
3173
|
-
}), /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
3174
|
-
as: "span",
|
|
3175
|
-
__css: {
|
|
3176
|
-
minWidth: 'auto',
|
|
3177
|
-
whiteSpace: 'nowrap'
|
|
3178
|
-
},
|
|
3179
|
-
children: children
|
|
3180
|
-
}), /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
3181
|
-
as: "span",
|
|
3182
|
-
pl: "0.375rem",
|
|
3183
|
-
pr: "0.375rem",
|
|
3184
|
-
children: rightIcon
|
|
3185
|
-
})]
|
|
3413
|
+
children: [leadingIcon, children, trailingIcon]
|
|
3186
3414
|
})
|
|
3187
3415
|
}));
|
|
3188
3416
|
});
|
|
@@ -3199,19 +3427,21 @@ const InnerInput = /*#__PURE__*/react$1.forwardRef(function InnerInput(props, fo
|
|
|
3199
3427
|
defaultValue,
|
|
3200
3428
|
disabled,
|
|
3201
3429
|
onChange,
|
|
3202
|
-
|
|
3203
|
-
|
|
3430
|
+
leadingIcon,
|
|
3431
|
+
trailingIcon,
|
|
3432
|
+
children,
|
|
3433
|
+
__css
|
|
3204
3434
|
} = props,
|
|
3205
|
-
otherProps = _objectWithoutPropertiesLoose__default['default'](props, ["type", "color", "checked", "aria-checked", "defaultChecked", "value", "name", "defaultValue", "disabled", "onChange", "
|
|
3435
|
+
otherProps = _objectWithoutPropertiesLoose__default['default'](props, ["type", "color", "checked", "aria-checked", "defaultChecked", "value", "name", "defaultValue", "disabled", "onChange", "leadingIcon", "trailingIcon", "children", "__css"]);
|
|
3206
3436
|
|
|
3207
3437
|
const theme = useTheme();
|
|
3208
|
-
const sumOpacity = checked ? 0.12 : 0;
|
|
3209
3438
|
return /*#__PURE__*/jsxRuntime.jsx(ChipBase, _extends__default['default']({
|
|
3210
3439
|
as: "label",
|
|
3211
3440
|
disabled: disabled,
|
|
3212
|
-
backgroundColor: 'surface',
|
|
3213
|
-
color: checked ? color : 'on.surface',
|
|
3214
|
-
borderOpacity: checked ? 0
|
|
3441
|
+
backgroundColor: checked ? color + '-container' : 'surface',
|
|
3442
|
+
color: checked ? 'on.' + color + '-container' : 'on.surface',
|
|
3443
|
+
borderOpacity: checked ? 0 : 0.24,
|
|
3444
|
+
__css: __css
|
|
3215
3445
|
}, otherProps, {
|
|
3216
3446
|
children: /*#__PURE__*/jsxRuntime.jsxs(Box, {
|
|
3217
3447
|
as: "span",
|
|
@@ -3221,7 +3451,9 @@ const InnerInput = /*#__PURE__*/react$1.forwardRef(function InnerInput(props, fo
|
|
|
3221
3451
|
border: 'none',
|
|
3222
3452
|
display: 'inline-flex',
|
|
3223
3453
|
alignItems: 'center',
|
|
3224
|
-
justifyContent: 'center'
|
|
3454
|
+
justifyContent: 'center',
|
|
3455
|
+
pl: leadingIcon ? "0.5rem" : "0.75rem",
|
|
3456
|
+
pr: trailingIcon ? "0.5rem" : "0.75rem"
|
|
3225
3457
|
},
|
|
3226
3458
|
children: [/*#__PURE__*/jsxRuntime.jsx(RippleBox, {
|
|
3227
3459
|
as: "input",
|
|
@@ -3235,13 +3467,13 @@ const InnerInput = /*#__PURE__*/react$1.forwardRef(function InnerInput(props, fo
|
|
|
3235
3467
|
theme: theme,
|
|
3236
3468
|
disabled: disabled,
|
|
3237
3469
|
rippleColor: color,
|
|
3238
|
-
baseOpacity: 0
|
|
3239
|
-
hoverOpacity: 0.12
|
|
3240
|
-
focusOpacity: 0.24
|
|
3470
|
+
baseOpacity: 0,
|
|
3471
|
+
hoverOpacity: 0.12,
|
|
3472
|
+
focusOpacity: 0.24,
|
|
3241
3473
|
name: name,
|
|
3242
3474
|
ref: forwardedRef,
|
|
3243
3475
|
__css: {
|
|
3244
|
-
|
|
3476
|
+
bg: 'transparent',
|
|
3245
3477
|
top: 0,
|
|
3246
3478
|
left: 0,
|
|
3247
3479
|
width: '100%',
|
|
@@ -3252,19 +3484,9 @@ const InnerInput = /*#__PURE__*/react$1.forwardRef(function InnerInput(props, fo
|
|
|
3252
3484
|
},
|
|
3253
3485
|
border: 'none',
|
|
3254
3486
|
borderRadius: 0,
|
|
3255
|
-
position: 'absolute'
|
|
3256
|
-
color: 'inherit'
|
|
3487
|
+
position: 'absolute'
|
|
3257
3488
|
}
|
|
3258
|
-
}),
|
|
3259
|
-
as: "span",
|
|
3260
|
-
pl: "0.25rem",
|
|
3261
|
-
pr: "0.5rem",
|
|
3262
|
-
children: leftIcon
|
|
3263
|
-
}), /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
3264
|
-
as: "span",
|
|
3265
|
-
pr: "0.75rem",
|
|
3266
|
-
children: children
|
|
3267
|
-
})]
|
|
3489
|
+
}), leadingIcon, children, trailingIcon]
|
|
3268
3490
|
})
|
|
3269
3491
|
}));
|
|
3270
3492
|
});
|
|
@@ -3315,26 +3537,36 @@ const Divider = /*#__PURE__*/react$1.forwardRef(function Divider(props, forwarde
|
|
|
3315
3537
|
const Modal = core.Modal;
|
|
3316
3538
|
const DialogSurface = /*#__PURE__*/react$1.forwardRef(function DialogSurface(props, forwardedRef) {
|
|
3317
3539
|
const {
|
|
3318
|
-
__css
|
|
3540
|
+
__css,
|
|
3541
|
+
variant: variantProp = 'base'
|
|
3319
3542
|
} = props,
|
|
3320
|
-
otherProps = _objectWithoutPropertiesLoose__default['default'](props, ["__css"]);
|
|
3543
|
+
otherProps = _objectWithoutPropertiesLoose__default['default'](props, ["__css", "variant"]);
|
|
3321
3544
|
|
|
3322
3545
|
const theme = useTheme();
|
|
3546
|
+
const overlayValue = styledSystem.get(theme, 'dialogs.backgroundColorOverlay') || 0;
|
|
3323
3547
|
return /*#__PURE__*/jsxRuntime.jsx(Modal, _extends__default['default']({
|
|
3324
3548
|
ref: forwardedRef,
|
|
3325
3549
|
as: Paper,
|
|
3326
3550
|
theme: theme,
|
|
3327
|
-
elevation:
|
|
3328
|
-
__css: _extends__default['default']({
|
|
3551
|
+
elevation: 3,
|
|
3552
|
+
__css: _extends__default['default']({}, getColorOverlay(theme, 'surface', 'primary', overlayValue), {
|
|
3329
3553
|
position: 'relative',
|
|
3330
|
-
|
|
3331
|
-
borderRadius: "0.5rem",
|
|
3554
|
+
borderRadius: 'small',
|
|
3332
3555
|
width: '100%',
|
|
3333
3556
|
maxWidth: "37.5rem",
|
|
3334
3557
|
maxHeight: '100%',
|
|
3335
3558
|
overflow: 'auto',
|
|
3336
3559
|
pointerEvents: 'auto'
|
|
3337
|
-
},
|
|
3560
|
+
}, styledSystem.variant({
|
|
3561
|
+
scale: 'dialogs.variants',
|
|
3562
|
+
prop: 'variant',
|
|
3563
|
+
variants: {
|
|
3564
|
+
base: {}
|
|
3565
|
+
}
|
|
3566
|
+
})({
|
|
3567
|
+
variant: variantProp,
|
|
3568
|
+
theme
|
|
3569
|
+
}), __css)
|
|
3338
3570
|
}, otherProps));
|
|
3339
3571
|
});
|
|
3340
3572
|
|
|
@@ -3449,14 +3681,14 @@ const MenuList = /*#__PURE__*/react$1.forwardRef((_ref, ref) => {
|
|
|
3449
3681
|
as: List,
|
|
3450
3682
|
innerAs: as,
|
|
3451
3683
|
ref: ref,
|
|
3452
|
-
elevation:
|
|
3684
|
+
elevation: 2,
|
|
3453
3685
|
outlined: false,
|
|
3454
3686
|
variant: "default",
|
|
3455
3687
|
__css: _extends__default['default']({
|
|
3456
|
-
width: 0,
|
|
3457
3688
|
minWidth: "7rem",
|
|
3458
3689
|
maxWidth: "17.5rem",
|
|
3459
3690
|
maxHeight: "18.75rem",
|
|
3691
|
+
borderRadius: 'default',
|
|
3460
3692
|
overflowY: 'auto',
|
|
3461
3693
|
'[data-popper-placement="top"] &': {
|
|
3462
3694
|
transformOrigin: 'bottom center'
|
|
@@ -3610,7 +3842,7 @@ const RadioButtonIcon = /*#__PURE__*/react$1.forwardRef(function RadioButtonIcon
|
|
|
3610
3842
|
__css: {
|
|
3611
3843
|
borderColor: 'currentColor',
|
|
3612
3844
|
borderStyle: 'solid',
|
|
3613
|
-
borderRadius: '
|
|
3845
|
+
borderRadius: 'full',
|
|
3614
3846
|
borderWidth: "0.125rem",
|
|
3615
3847
|
width: '100%',
|
|
3616
3848
|
height: '100%',
|
|
@@ -3620,7 +3852,7 @@ const RadioButtonIcon = /*#__PURE__*/react$1.forwardRef(function RadioButtonIcon
|
|
|
3620
3852
|
children: /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
3621
3853
|
__css: {
|
|
3622
3854
|
backgroundColor: 'currentColor',
|
|
3623
|
-
borderRadius: '
|
|
3855
|
+
borderRadius: 'full',
|
|
3624
3856
|
width: '100%',
|
|
3625
3857
|
height: '100%',
|
|
3626
3858
|
transition: 'transform .12s cubic-bezier(0,0,.2,1) 0ms,background-color .12s cubic-bezier(0,0,.2,1) 0ms',
|
|
@@ -3666,7 +3898,7 @@ const RadioButtonInner = /*#__PURE__*/react$1.forwardRef(function RadioButtonInn
|
|
|
3666
3898
|
outline: 'none'
|
|
3667
3899
|
},
|
|
3668
3900
|
border: 'none',
|
|
3669
|
-
borderRadius: '
|
|
3901
|
+
borderRadius: 'full',
|
|
3670
3902
|
zIndex: 1,
|
|
3671
3903
|
position: 'absolute'
|
|
3672
3904
|
}, __css)
|
|
@@ -3744,27 +3976,31 @@ const Select$1 = /*#__PURE__*/react$1.forwardRef((_ref, forwardedRef) => {
|
|
|
3744
3976
|
});
|
|
3745
3977
|
const SelectButtonInner = /*#__PURE__*/react$1.forwardRef((_ref2, forwardedRef) => {
|
|
3746
3978
|
let {
|
|
3747
|
-
innerAs = '
|
|
3979
|
+
innerAs = 'div'
|
|
3748
3980
|
} = _ref2,
|
|
3749
3981
|
props = _objectWithoutPropertiesLoose__default['default'](_ref2, ["innerAs"]);
|
|
3750
3982
|
|
|
3751
3983
|
const InputButton = Input;
|
|
3752
3984
|
return /*#__PURE__*/jsxRuntime.jsx(InputButton, _extends__default['default']({
|
|
3753
3985
|
as: innerAs,
|
|
3754
|
-
ref: forwardedRef
|
|
3986
|
+
ref: forwardedRef,
|
|
3987
|
+
tabIndex: 0
|
|
3755
3988
|
}, props));
|
|
3756
3989
|
});
|
|
3757
3990
|
const SelectButton = /*#__PURE__*/react$1.forwardRef((_ref3, ref) => {
|
|
3758
3991
|
let {
|
|
3759
|
-
as
|
|
3992
|
+
as,
|
|
3993
|
+
children
|
|
3760
3994
|
} = _ref3,
|
|
3761
|
-
props = _objectWithoutPropertiesLoose__default['default'](_ref3, ["as"]);
|
|
3995
|
+
props = _objectWithoutPropertiesLoose__default['default'](_ref3, ["as", "children"]);
|
|
3762
3996
|
|
|
3763
3997
|
return /*#__PURE__*/jsxRuntime.jsx(core.MenuButton, _extends__default['default']({
|
|
3764
3998
|
as: SelectButtonInner,
|
|
3765
3999
|
innerAs: as,
|
|
3766
4000
|
ref: ref
|
|
3767
|
-
}, props
|
|
4001
|
+
}, props, {
|
|
4002
|
+
children: children
|
|
4003
|
+
}));
|
|
3768
4004
|
});
|
|
3769
4005
|
|
|
3770
4006
|
const selectContext = /*#__PURE__*/react$1.createContext({
|
|
@@ -3791,7 +4027,7 @@ const SelectIcon = /*#__PURE__*/react$1.forwardRef(function SelectIcon(props, fo
|
|
|
3791
4027
|
__css: {
|
|
3792
4028
|
position: 'absolute',
|
|
3793
4029
|
top: `calc(50% - ${"0.75rem"})`,
|
|
3794
|
-
right:
|
|
4030
|
+
right: polished.rem(PADDING_RIGHT_WITH_ICON),
|
|
3795
4031
|
width: "1.5rem",
|
|
3796
4032
|
height: "1.5rem",
|
|
3797
4033
|
color: open ? 'primary' : alpha('on.surface', 0.54),
|
|
@@ -3876,7 +4112,7 @@ const Select = /*#__PURE__*/react$1.forwardRef(function Select(props, forwardedR
|
|
|
3876
4112
|
};
|
|
3877
4113
|
|
|
3878
4114
|
const handleOnChange = e => {
|
|
3879
|
-
onChange && onChange(e, native ? e.target.value : e.
|
|
4115
|
+
onChange && onChange(e, native ? e.target.value : e.currentTarget.dataset.value);
|
|
3880
4116
|
};
|
|
3881
4117
|
|
|
3882
4118
|
const hasError = Boolean(error);
|
|
@@ -3937,7 +4173,8 @@ const Select = /*#__PURE__*/react$1.forwardRef(function Select(props, forwardedR
|
|
|
3937
4173
|
"aria-disabled": disabled ? 'true' : undefined,
|
|
3938
4174
|
"aria-describedby": helperTextId,
|
|
3939
4175
|
hasLabel: !!label,
|
|
3940
|
-
leadingIcon: Boolean(leadingIcon)
|
|
4176
|
+
leadingIcon: Boolean(leadingIcon),
|
|
4177
|
+
trailingIcon: true
|
|
3941
4178
|
}, otherProps, {
|
|
3942
4179
|
children: native ? children : renderValue(value)
|
|
3943
4180
|
})), !native && /*#__PURE__*/jsxRuntime.jsx(MenuPopover, {
|
|
@@ -3948,16 +4185,6 @@ const Select = /*#__PURE__*/react$1.forwardRef(function Select(props, forwardedR
|
|
|
3948
4185
|
minWidth: buttonRef == null ? void 0 : (_buttonRef$current = buttonRef.current) == null ? void 0 : _buttonRef$current.offsetWidth
|
|
3949
4186
|
},
|
|
3950
4187
|
role: "listbox",
|
|
3951
|
-
__css: variant === 'filled' ? {
|
|
3952
|
-
"[data-popper-placement='top'] &": {
|
|
3953
|
-
borderBottomLeftRadius: 0,
|
|
3954
|
-
borderBottomRightRadius: 0
|
|
3955
|
-
},
|
|
3956
|
-
"[data-popper-placement='bottom'] &": {
|
|
3957
|
-
borderTopLeftRadius: 0,
|
|
3958
|
-
borderTopRightRadius: 0
|
|
3959
|
-
}
|
|
3960
|
-
} : {},
|
|
3961
4188
|
children: children
|
|
3962
4189
|
})
|
|
3963
4190
|
})]
|
|
@@ -4499,19 +4726,19 @@ const Snackbar = /*#__PURE__*/react$1.forwardRef(function Snackbar(props, forwar
|
|
|
4499
4726
|
style
|
|
4500
4727
|
} = useSnackbarAnimation(ref, timeout);
|
|
4501
4728
|
return /*#__PURE__*/jsxRuntime.jsxs(Paper, _extends__default['default']({
|
|
4502
|
-
elevation:
|
|
4503
|
-
backgroundOverlay:
|
|
4729
|
+
elevation: 4,
|
|
4730
|
+
backgroundOverlay: 4,
|
|
4504
4731
|
className: colorMode === 'default' ? DARK_THEME_CLASS : DEFAULT_THEME_CLASS,
|
|
4505
4732
|
ref: core.assignMultipleRefs(forwardedRef, ref),
|
|
4506
4733
|
__css: _extends__default['default']({
|
|
4507
|
-
boxShadow:
|
|
4734
|
+
boxShadow: 4,
|
|
4508
4735
|
py: "0.375rem",
|
|
4509
4736
|
pl: 3,
|
|
4510
4737
|
pr: 3,
|
|
4511
4738
|
display: 'inline-flex',
|
|
4512
4739
|
minWidth: `min(100%, ${"21.5rem"})`,
|
|
4513
4740
|
maxWidth: ['100%', 'unset'],
|
|
4514
|
-
borderRadius:
|
|
4741
|
+
borderRadius: 'extra-small',
|
|
4515
4742
|
color: 'on.surface',
|
|
4516
4743
|
flexDirection: 'row',
|
|
4517
4744
|
willChange: 'transform,opacity'
|
|
@@ -4536,22 +4763,37 @@ const Snackbar = /*#__PURE__*/react$1.forwardRef(function Snackbar(props, forwar
|
|
|
4536
4763
|
}));
|
|
4537
4764
|
});
|
|
4538
4765
|
|
|
4766
|
+
const BORDER_WIDTH = 2;
|
|
4767
|
+
const TRAIL_WIDTH = 52;
|
|
4768
|
+
const TRAIL_HEIGHT = 32;
|
|
4769
|
+
const CIRCLE_SIZE_INACTIVE_CHECKED = 24;
|
|
4770
|
+
const CIRCLE_SIZE_ACTIVE_CHECKED = 28;
|
|
4771
|
+
const CIRCLE_SIZE_INACTIVE_UNCHECKED = 16;
|
|
4772
|
+
const CIRCLE_SIZE_ACTIVE_UNCHECKED = 28;
|
|
4539
4773
|
const SwitchTrail = (_ref) => {
|
|
4540
4774
|
let {
|
|
4541
|
-
checked = false
|
|
4775
|
+
checked = false,
|
|
4776
|
+
disabled = false
|
|
4542
4777
|
} = _ref,
|
|
4543
|
-
otherProps = _objectWithoutPropertiesLoose__default['default'](_ref, ["checked"]);
|
|
4778
|
+
otherProps = _objectWithoutPropertiesLoose__default['default'](_ref, ["checked", "disabled"]);
|
|
4544
4779
|
|
|
4545
4780
|
return /*#__PURE__*/jsxRuntime.jsx(Box, _extends__default['default']({
|
|
4546
|
-
__css: {
|
|
4547
|
-
width:
|
|
4548
|
-
height:
|
|
4549
|
-
borderRadius:
|
|
4550
|
-
|
|
4551
|
-
|
|
4552
|
-
|
|
4781
|
+
__css: _extends__default['default']({
|
|
4782
|
+
width: polished.rem(TRAIL_WIDTH),
|
|
4783
|
+
height: polished.rem(TRAIL_HEIGHT),
|
|
4784
|
+
borderRadius: polished.rem(TRAIL_HEIGHT / 2),
|
|
4785
|
+
borderWidth: polished.rem(BORDER_WIDTH),
|
|
4786
|
+
borderStyle: 'solid',
|
|
4787
|
+
backgroundColor: checked ? 'primary' : 'surface-variant',
|
|
4788
|
+
borderColor: checked ? 'primary' : 'outline'
|
|
4789
|
+
}, disabled && {
|
|
4790
|
+
opacity: 0.12,
|
|
4791
|
+
backgroundColor: checked ? 'on.surface' : 'surface-variant',
|
|
4792
|
+
borderColor: 'on.surface'
|
|
4793
|
+
})
|
|
4553
4794
|
}, otherProps));
|
|
4554
4795
|
};
|
|
4796
|
+
const THUMB_SIZE = 40;
|
|
4555
4797
|
const SwitchThumb = (_ref2) => {
|
|
4556
4798
|
let {
|
|
4557
4799
|
checked = false
|
|
@@ -4560,16 +4802,19 @@ const SwitchThumb = (_ref2) => {
|
|
|
4560
4802
|
|
|
4561
4803
|
return /*#__PURE__*/jsxRuntime.jsx(Box, _extends__default['default']({
|
|
4562
4804
|
position: "absolute",
|
|
4563
|
-
width:
|
|
4564
|
-
height:
|
|
4565
|
-
borderRadius: "
|
|
4566
|
-
left:
|
|
4567
|
-
top:
|
|
4805
|
+
width: polished.rem(THUMB_SIZE),
|
|
4806
|
+
height: polished.rem(THUMB_SIZE),
|
|
4807
|
+
borderRadius: "full",
|
|
4808
|
+
left: '50%',
|
|
4809
|
+
top: '50%',
|
|
4568
4810
|
__css: {
|
|
4569
|
-
|
|
4570
|
-
transform: checked ? `translate(${"1.25rem"})` : 'none',
|
|
4811
|
+
transform: `translateX(calc(-50% ${checked ? '+' : '-'} ${polished.rem((TRAIL_WIDTH - CIRCLE_SIZE_INACTIVE_CHECKED - BORDER_WIDTH * 4) / 2)})) translateY(-50%)`,
|
|
4571
4812
|
WebkitTapHighlightColor: 'transparent',
|
|
4572
|
-
transition: '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)'
|
|
4813
|
+
transition: '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)',
|
|
4814
|
+
'& > input': {
|
|
4815
|
+
width: THUMB_SIZE,
|
|
4816
|
+
height: THUMB_SIZE
|
|
4817
|
+
}
|
|
4573
4818
|
}
|
|
4574
4819
|
}, otherProps));
|
|
4575
4820
|
};
|
|
@@ -4582,22 +4827,32 @@ const SwitchCircle = (_ref3) => {
|
|
|
4582
4827
|
return /*#__PURE__*/jsxRuntime.jsx(Box, _extends__default['default']({
|
|
4583
4828
|
__css: {
|
|
4584
4829
|
position: 'absolute',
|
|
4585
|
-
width:
|
|
4586
|
-
height:
|
|
4587
|
-
boxShadow: 2,
|
|
4830
|
+
width: checked ? polished.rem(CIRCLE_SIZE_INACTIVE_CHECKED) : polished.rem(CIRCLE_SIZE_INACTIVE_UNCHECKED),
|
|
4831
|
+
height: checked ? polished.rem(CIRCLE_SIZE_INACTIVE_CHECKED) : polished.rem(CIRCLE_SIZE_INACTIVE_UNCHECKED),
|
|
4588
4832
|
boxSizing: 'border-box',
|
|
4589
|
-
|
|
4590
|
-
borderStyle: 'solid',
|
|
4591
|
-
borderRadius: '50%',
|
|
4833
|
+
borderRadius: 'full',
|
|
4592
4834
|
pointerEvents: 'none',
|
|
4593
4835
|
zIndex: 1,
|
|
4594
|
-
backgroundColor: checked ? 'primary' : '
|
|
4595
|
-
borderColor: checked ? 'primary' : '#fff',
|
|
4836
|
+
backgroundColor: checked ? 'on.primary' : 'outline',
|
|
4596
4837
|
top: '50%',
|
|
4597
4838
|
left: '50%',
|
|
4598
4839
|
transform: 'translate(-50%, -50%)',
|
|
4599
|
-
transition: 'inherit'
|
|
4840
|
+
transition: 'inherit',
|
|
4841
|
+
'[data-switch-thumb=""]:active ~ &, [data-switch-thumb=""]:focus-visible ~ &, [data-switch-thumb=""]:hover ~ &': {
|
|
4842
|
+
backgroundColor: checked ? 'primary-container' : 'on.surface-variant'
|
|
4843
|
+
},
|
|
4844
|
+
'[data-switch-thumb=""]:active ~ &, [data-switch-thumb=""]:focus-visible ~ &': {
|
|
4845
|
+
height: checked ? CIRCLE_SIZE_ACTIVE_CHECKED : CIRCLE_SIZE_ACTIVE_UNCHECKED,
|
|
4846
|
+
width: checked ? CIRCLE_SIZE_ACTIVE_CHECKED : CIRCLE_SIZE_ACTIVE_UNCHECKED
|
|
4847
|
+
},
|
|
4848
|
+
'[data-switch-thumb=""]:disabled ~ &': {
|
|
4849
|
+
opacity: checked ? 1 : 0.38,
|
|
4850
|
+
backgroundColor: checked ? 'surface' : 'on.surface',
|
|
4851
|
+
height: checked ? CIRCLE_SIZE_INACTIVE_CHECKED : CIRCLE_SIZE_INACTIVE_UNCHECKED,
|
|
4852
|
+
width: checked ? CIRCLE_SIZE_INACTIVE_CHECKED : CIRCLE_SIZE_INACTIVE_UNCHECKED
|
|
4853
|
+
}
|
|
4600
4854
|
},
|
|
4855
|
+
"data-switch-circle": "",
|
|
4601
4856
|
role: "presentation",
|
|
4602
4857
|
"aria-hidden": "true"
|
|
4603
4858
|
}, otherProps));
|
|
@@ -4622,13 +4877,14 @@ const SwitchInner = /*#__PURE__*/react$1.forwardRef(function SwitchInner(props,
|
|
|
4622
4877
|
minWidth: "auto",
|
|
4623
4878
|
children: /*#__PURE__*/jsxRuntime.jsxs(Box, {
|
|
4624
4879
|
position: "relative",
|
|
4625
|
-
opacity: disabled ? 0.38 : 1,
|
|
4626
4880
|
children: [/*#__PURE__*/jsxRuntime.jsx(SwitchTrail, {
|
|
4627
|
-
checked: checked
|
|
4881
|
+
checked: checked,
|
|
4882
|
+
disabled: disabled
|
|
4628
4883
|
}), /*#__PURE__*/jsxRuntime.jsxs(SwitchThumb, {
|
|
4629
4884
|
checked: checked,
|
|
4630
4885
|
children: [/*#__PURE__*/jsxRuntime.jsx(RippleBox, _extends__default['default']({
|
|
4631
4886
|
as: Comp,
|
|
4887
|
+
role: "switch",
|
|
4632
4888
|
type: "checkbox",
|
|
4633
4889
|
checked: checked,
|
|
4634
4890
|
onChange: onChange,
|
|
@@ -4640,21 +4896,22 @@ const SwitchInner = /*#__PURE__*/react$1.forwardRef(function SwitchInner(props,
|
|
|
4640
4896
|
hoverOpacity: 0.04,
|
|
4641
4897
|
focusOpacity: 0.12,
|
|
4642
4898
|
center: true,
|
|
4643
|
-
disabled: disabled
|
|
4899
|
+
disabled: disabled,
|
|
4900
|
+
"data-switch-thumb": ""
|
|
4644
4901
|
}, otherProps, {
|
|
4645
4902
|
__css: _extends__default['default']({
|
|
4646
4903
|
top: '50%',
|
|
4647
4904
|
left: '50%',
|
|
4648
4905
|
backgroundColor: 'transparent',
|
|
4649
4906
|
transform: 'translate(-50%, -50%)',
|
|
4650
|
-
width:
|
|
4651
|
-
height:
|
|
4907
|
+
width: '100%',
|
|
4908
|
+
height: '100%',
|
|
4652
4909
|
appearance: 'none',
|
|
4653
4910
|
':focus': {
|
|
4654
4911
|
outline: 'none'
|
|
4655
4912
|
},
|
|
4656
4913
|
border: 'none',
|
|
4657
|
-
borderRadius: '
|
|
4914
|
+
borderRadius: 'full',
|
|
4658
4915
|
zIndex: 1,
|
|
4659
4916
|
position: 'absolute'
|
|
4660
4917
|
}, __css)
|
|
@@ -4901,7 +5158,7 @@ const TabPanel = /*#__PURE__*/react$1.forwardRef(function TabPanel(props, forwar
|
|
|
4901
5158
|
const Table = /*#__PURE__*/react$1.forwardRef((props, ref) => {
|
|
4902
5159
|
const {
|
|
4903
5160
|
children,
|
|
4904
|
-
elevation =
|
|
5161
|
+
elevation = 1
|
|
4905
5162
|
} = props,
|
|
4906
5163
|
rest = _objectWithoutPropertiesLoose__default['default'](props, ["children", "elevation"]);
|
|
4907
5164
|
|
|
@@ -5075,6 +5332,7 @@ exports.BaseLine = BaseLine;
|
|
|
5075
5332
|
exports.BottomSheet = BottomSheet;
|
|
5076
5333
|
exports.Box = Box;
|
|
5077
5334
|
exports.Button = Button;
|
|
5335
|
+
exports.ButtonGroup = ButtonGroup;
|
|
5078
5336
|
exports.CheckBox = CheckBox;
|
|
5079
5337
|
exports.Chip = ButtonChip;
|
|
5080
5338
|
exports.ChoiceChip = ChoiceChip;
|
|
@@ -5136,6 +5394,7 @@ exports.alpha = alpha;
|
|
|
5136
5394
|
exports.appearAnimation = appearAnimation;
|
|
5137
5395
|
exports.base = base;
|
|
5138
5396
|
exports.getBackgroundOverlay = getBackgroundOverlay;
|
|
5397
|
+
exports.getColorOverlay = getColorOverlay;
|
|
5139
5398
|
exports.getDarkThemeBackgroundOverlay = getDarkThemeBackgroundOverlay;
|
|
5140
5399
|
exports.getTheme = getTheme;
|
|
5141
5400
|
exports.rippleStyle = rippleStyle;
|