@basic-ui/material 1.0.0-alpha.2 → 1.0.0-alpha.21
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 +1669 -1354
- package/build/cjs/index.js.map +1 -1
- package/build/esm/Alert/Alert.d.ts +1 -1
- package/build/esm/Alert/Alert.js +3 -2
- package/build/esm/Alert/Alert.js.map +1 -1
- package/build/esm/Alert/index.js.map +1 -1
- package/build/esm/AppBar/AppBar.d.ts +3 -3
- package/build/esm/AppBar/AppBar.js +6 -5
- package/build/esm/AppBar/AppBar.js.map +1 -1
- package/build/esm/AppBar/AppBarButton.d.ts +1 -1
- package/build/esm/AppBar/AppBarButton.js +2 -1
- package/build/esm/AppBar/AppBarButton.js.map +1 -1
- package/build/esm/AppBar/context.js.map +1 -1
- package/build/esm/AppBar/index.js.map +1 -1
- package/build/esm/Badge/Badge.d.ts +1 -1
- package/build/esm/Badge/Badge.js.map +1 -1
- package/build/esm/Badge/index.js.map +1 -1
- package/build/esm/BaseLine/BaseLine.js.map +1 -1
- package/build/esm/BaseLine/index.js.map +1 -1
- package/build/esm/BottomSheet/BottomSheet.d.ts +1 -1
- package/build/esm/BottomSheet/BottomSheet.js +2 -1
- package/build/esm/BottomSheet/BottomSheet.js.map +1 -1
- package/build/esm/BottomSheet/BottomSheetSurface.d.ts +2 -2
- package/build/esm/BottomSheet/BottomSheetSurface.js +2 -2
- package/build/esm/BottomSheet/BottomSheetSurface.js.map +1 -1
- package/build/esm/BottomSheet/index.js.map +1 -1
- package/build/esm/Box/Box.d.ts +4 -4
- package/build/esm/Box/Box.js +1 -2
- package/build/esm/Box/Box.js.map +1 -1
- package/build/esm/Box/index.js.map +1 -1
- package/build/esm/Button/BaseButton.d.ts +3 -3
- package/build/esm/Button/BaseButton.js +6 -5
- package/build/esm/Button/BaseButton.js.map +1 -1
- package/build/esm/Button/Button.d.ts +4 -4
- package/build/esm/Button/Button.js +6 -6
- package/build/esm/Button/Button.js.map +1 -1
- package/build/esm/Button/ButtonGroup.d.ts +2 -2
- package/build/esm/Button/ButtonGroup.js +3 -2
- package/build/esm/Button/ButtonGroup.js.map +1 -1
- package/build/esm/Button/FilledButton.d.ts +1 -1
- package/build/esm/Button/FilledButton.js +6 -8
- package/build/esm/Button/FilledButton.js.map +1 -1
- package/build/esm/Button/FloatingActionButton.js +1 -1
- package/build/esm/Button/FloatingActionButton.js.map +1 -1
- package/build/esm/Button/IconButton.js +1 -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.map +1 -1
- package/build/esm/Button/TransparentButton.d.ts +1 -1
- package/build/esm/Button/TransparentButton.js.map +1 -1
- package/build/esm/Button/context.js.map +1 -1
- package/build/esm/Button/index.js.map +1 -1
- package/build/esm/CheckBox/CheckBox.d.ts +5 -5
- package/build/esm/CheckBox/CheckBox.js +6 -5
- package/build/esm/CheckBox/CheckBox.js.map +1 -1
- package/build/esm/CheckBox/CheckBoxIcon.d.ts +4 -4
- package/build/esm/CheckBox/CheckBoxIcon.js +6 -5
- package/build/esm/CheckBox/CheckBoxIcon.js.map +1 -1
- package/build/esm/CheckBox/CheckPath.d.ts +0 -1
- package/build/esm/CheckBox/CheckPath.js.map +1 -1
- package/build/esm/CheckBox/IndeterminatePath.d.ts +0 -1
- package/build/esm/CheckBox/IndeterminatePath.js.map +1 -1
- package/build/esm/CheckBox/index.js.map +1 -1
- package/build/esm/Chip/ButtonChip.d.ts +4 -4
- package/build/esm/Chip/ButtonChip.js +4 -4
- package/build/esm/Chip/ButtonChip.js.map +1 -1
- package/build/esm/Chip/Chip.js.map +1 -1
- package/build/esm/Chip/ChipBase.d.ts +3 -3
- package/build/esm/Chip/ChipBase.js +10 -10
- package/build/esm/Chip/ChipBase.js.map +1 -1
- package/build/esm/Chip/ChoiceChip.d.ts +5 -5
- package/build/esm/Chip/ChoiceChip.js +6 -5
- package/build/esm/Chip/ChoiceChip.js.map +1 -1
- package/build/esm/Chip/index.js.map +1 -1
- package/build/esm/Combobox/Combobox.d.ts +13 -13
- package/build/esm/Combobox/Combobox.js +25 -16
- package/build/esm/Combobox/Combobox.js.map +1 -1
- package/build/esm/Combobox/index.js.map +1 -1
- package/build/esm/Dialog/Dialog.d.ts +1 -1
- package/build/esm/Dialog/Dialog.js +6 -5
- package/build/esm/Dialog/Dialog.js.map +1 -1
- package/build/esm/Dialog/DialogBackdrop.d.ts +2 -2
- package/build/esm/Dialog/DialogBackdrop.js +2 -2
- package/build/esm/Dialog/DialogBackdrop.js.map +1 -1
- package/build/esm/Dialog/DialogContainer.d.ts +1 -1
- package/build/esm/Dialog/DialogContainer.js +2 -1
- package/build/esm/Dialog/DialogContainer.js.map +1 -1
- package/build/esm/Dialog/DialogSurface.d.ts +2 -2
- package/build/esm/Dialog/DialogSurface.js +4 -4
- package/build/esm/Dialog/DialogSurface.js.map +1 -1
- package/build/esm/Dialog/Scrim.d.ts +1 -1
- package/build/esm/Dialog/Scrim.js +2 -1
- package/build/esm/Dialog/Scrim.js.map +1 -1
- package/build/esm/Dialog/index.js +1 -0
- package/build/esm/Dialog/index.js.map +1 -1
- package/build/esm/Dialog/useDialogAnimation.js +6 -4
- package/build/esm/Dialog/useDialogAnimation.js.map +1 -1
- package/build/esm/Divider/Divider.d.ts +3 -3
- package/build/esm/Divider/Divider.js +7 -7
- package/build/esm/Divider/Divider.js.map +1 -1
- package/build/esm/Divider/index.js.map +1 -1
- package/build/esm/FloatingLabel/FloatingLabel.d.ts +4 -4
- package/build/esm/FloatingLabel/FloatingLabel.js +7 -6
- package/build/esm/FloatingLabel/FloatingLabel.js.map +1 -1
- package/build/esm/FloatingLabel/index.js.map +1 -1
- package/build/esm/LineRipple/LineRipple.d.ts +3 -3
- package/build/esm/LineRipple/LineRipple.js +5 -4
- package/build/esm/LineRipple/LineRipple.js.map +1 -1
- package/build/esm/LineRipple/index.js.map +1 -1
- package/build/esm/Link/Link.d.ts +3 -3
- package/build/esm/Link/Link.js +14 -2
- package/build/esm/Link/Link.js.map +1 -1
- package/build/esm/Link/index.js.map +1 -1
- package/build/esm/List/List.d.ts +5 -5
- package/build/esm/List/List.js +2 -2
- package/build/esm/List/List.js.map +1 -1
- package/build/esm/List/index.js.map +1 -1
- package/build/esm/ListItem/ListItem.d.ts +7 -5
- package/build/esm/ListItem/ListItem.js +50 -46
- package/build/esm/ListItem/ListItem.js.map +1 -1
- package/build/esm/ListItem/ListItemText.d.ts +6 -6
- package/build/esm/ListItem/ListItemText.js +5 -5
- package/build/esm/ListItem/ListItemText.js.map +1 -1
- package/build/esm/ListItem/index.js.map +1 -1
- package/build/esm/Menu/Menu.d.ts +9 -7
- package/build/esm/Menu/Menu.js +31 -11
- package/build/esm/Menu/Menu.js.map +1 -1
- package/build/esm/Menu/animation.js.map +1 -1
- package/build/esm/Menu/index.js.map +1 -1
- package/build/esm/NavRail/NavRailItem.d.ts +15 -0
- package/build/esm/NavRail/NavRailItem.js +150 -0
- package/build/esm/NavRail/NavRailItem.js.map +1 -0
- package/build/esm/NavRail/index.d.ts +1 -0
- package/build/esm/NavRail/index.js +2 -0
- package/build/esm/NavRail/index.js.map +1 -0
- package/build/esm/NotchedOutline/NotchedOutline.d.ts +5 -5
- package/build/esm/NotchedOutline/NotchedOutline.js +4 -4
- package/build/esm/NotchedOutline/NotchedOutline.js.map +1 -1
- package/build/esm/NotchedOutline/context.js.map +1 -1
- package/build/esm/NotchedOutline/index.js.map +1 -1
- package/build/esm/NotchedOutline/styledComponents.d.ts +114 -28
- package/build/esm/NotchedOutline/styledComponents.js +3 -2
- package/build/esm/NotchedOutline/styledComponents.js.map +1 -1
- package/build/esm/Paper/Paper.d.ts +4 -4
- package/build/esm/Paper/Paper.js +6 -6
- package/build/esm/Paper/Paper.js.map +1 -1
- package/build/esm/Paper/index.js.map +1 -1
- package/build/esm/ProgressSpinner/ProgressSpinner.d.ts +1 -1
- package/build/esm/ProgressSpinner/ProgressSpinner.js +14 -14
- package/build/esm/ProgressSpinner/ProgressSpinner.js.map +1 -1
- package/build/esm/ProgressSpinner/index.js.map +1 -1
- package/build/esm/RadioButton/RadioButton.js +4 -2
- package/build/esm/RadioButton/RadioButton.js.map +1 -1
- package/build/esm/RadioButton/RadioButtonIcon.d.ts +3 -3
- package/build/esm/RadioButton/RadioButtonIcon.js +6 -5
- package/build/esm/RadioButton/RadioButtonIcon.js.map +1 -1
- package/build/esm/RadioButton/RadioGroup.d.ts +1 -1
- package/build/esm/RadioButton/RadioGroup.js +2 -1
- package/build/esm/RadioButton/RadioGroup.js.map +1 -1
- package/build/esm/RadioButton/index.js.map +1 -1
- package/build/esm/Ripple/Ripple.js.map +1 -1
- package/build/esm/Ripple/RippleBox.d.ts +1 -2
- package/build/esm/Ripple/RippleBox.js +7 -6
- package/build/esm/Ripple/RippleBox.js.map +1 -1
- package/build/esm/Ripple/constants.js.map +1 -1
- package/build/esm/Ripple/index.js.map +1 -1
- package/build/esm/Ripple/keyframes.js.map +1 -1
- package/build/esm/Ripple/useRipple.js +2 -2
- package/build/esm/Ripple/useRipple.js.map +1 -1
- package/build/esm/Ripple/useRippleHandlers.d.ts +3 -3
- package/build/esm/Ripple/useRippleHandlers.js +2 -1
- package/build/esm/Ripple/useRippleHandlers.js.map +1 -1
- package/build/esm/Ripple/useRippleSurface.d.ts +6 -5
- package/build/esm/Ripple/useRippleSurface.js +65 -60
- package/build/esm/Ripple/useRippleSurface.js.map +1 -1
- package/build/esm/Select/Select.d.ts +6 -6
- package/build/esm/Select/Select.js +15 -6
- package/build/esm/Select/Select.js.map +1 -1
- package/build/esm/Select/SelectIcon.d.ts +3 -3
- package/build/esm/Select/SelectIcon.js +6 -5
- package/build/esm/Select/SelectIcon.js.map +1 -1
- package/build/esm/Select/context.d.ts +2 -2
- package/build/esm/Select/context.js.map +1 -1
- package/build/esm/Select/defaultRender.d.ts +2 -1
- package/build/esm/Select/defaultRender.js.map +1 -1
- package/build/esm/Select/index.js.map +1 -1
- package/build/esm/Select/styledComponents.d.ts +9 -9
- package/build/esm/Select/styledComponents.js +13 -22
- package/build/esm/Select/styledComponents.js.map +1 -1
- package/build/esm/SelectItem/SelectItem.d.ts +5 -2
- package/build/esm/SelectItem/SelectItem.js +21 -7
- package/build/esm/SelectItem/SelectItem.js.map +1 -1
- package/build/esm/SelectItem/index.js.map +1 -1
- package/build/esm/SelectionControl/SelectionControlLabel.d.ts +5 -5
- package/build/esm/SelectionControl/SelectionControlLabel.js +2 -2
- package/build/esm/SelectionControl/SelectionControlLabel.js.map +1 -1
- package/build/esm/SelectionControl/SelectionControlText.d.ts +4 -4
- package/build/esm/SelectionControl/SelectionControlText.js +4 -4
- package/build/esm/SelectionControl/SelectionControlText.js.map +1 -1
- package/build/esm/SelectionControl/index.js.map +1 -1
- package/build/esm/Skeleton/DelayAppearance.d.ts +3 -3
- package/build/esm/Skeleton/DelayAppearance.js +2 -2
- package/build/esm/Skeleton/DelayAppearance.js.map +1 -1
- package/build/esm/Skeleton/Skeleton.d.ts +6 -6
- package/build/esm/Skeleton/Skeleton.js +4 -4
- package/build/esm/Skeleton/Skeleton.js.map +1 -1
- package/build/esm/Skeleton/animation.js.map +1 -1
- package/build/esm/Skeleton/index.js.map +1 -1
- package/build/esm/Slider/Slider.d.ts +17 -0
- package/build/esm/Slider/Slider.js +224 -0
- package/build/esm/Slider/Slider.js.map +1 -0
- package/build/esm/Slider/index.d.ts +1 -0
- package/build/esm/Slider/index.js +2 -0
- package/build/esm/Slider/index.js.map +1 -0
- package/build/esm/Snackbar/Snackbar.d.ts +3 -3
- package/build/esm/Snackbar/Snackbar.js +12 -12
- package/build/esm/Snackbar/Snackbar.js.map +1 -1
- package/build/esm/Snackbar/Stack.d.ts +2 -3
- package/build/esm/Snackbar/Stack.js +4 -3
- package/build/esm/Snackbar/Stack.js.map +1 -1
- package/build/esm/Snackbar/index.js.map +1 -1
- package/build/esm/Snackbar/useSnackbarAnimation.d.ts +2 -2
- package/build/esm/Snackbar/useSnackbarAnimation.js +8 -7
- package/build/esm/Snackbar/useSnackbarAnimation.js.map +1 -1
- package/build/esm/Switch/Switch.d.ts +4 -5
- package/build/esm/Switch/Switch.js +6 -5
- package/build/esm/Switch/Switch.js.map +1 -1
- package/build/esm/Switch/index.js.map +1 -1
- package/build/esm/Switch/styledComponents.js +8 -4
- package/build/esm/Switch/styledComponents.js.map +1 -1
- package/build/esm/Tab/Tab.d.ts +3 -3
- package/build/esm/Tab/Tab.js +8 -7
- package/build/esm/Tab/Tab.js.map +1 -1
- package/build/esm/Tab/TabList.d.ts +1 -1
- package/build/esm/Tab/TabList.js +4 -2
- package/build/esm/Tab/TabList.js.map +1 -1
- package/build/esm/Tab/TabPanel.d.ts +1 -1
- package/build/esm/Tab/TabPanel.js +4 -2
- package/build/esm/Tab/TabPanel.js.map +1 -1
- package/build/esm/Tab/TabPanels.js.map +1 -1
- package/build/esm/Tab/Tabs.js.map +1 -1
- package/build/esm/Tab/context.js.map +1 -1
- package/build/esm/Tab/index.js.map +1 -1
- package/build/esm/TabIndicator/TabIndicator.d.ts +1 -1
- package/build/esm/TabIndicator/TabIndicator.js +4 -2
- package/build/esm/TabIndicator/TabIndicator.js.map +1 -1
- package/build/esm/TabIndicator/context.d.ts +2 -2
- package/build/esm/TabIndicator/context.js.map +1 -1
- package/build/esm/TabIndicator/index.js.map +1 -1
- package/build/esm/Table/Table.d.ts +1 -1
- package/build/esm/Table/Table.js +4 -3
- package/build/esm/Table/Table.js.map +1 -1
- package/build/esm/Table/TableBody.d.ts +1 -1
- package/build/esm/Table/TableBody.js +4 -3
- package/build/esm/Table/TableBody.js.map +1 -1
- package/build/esm/Table/TableCell.d.ts +1 -1
- package/build/esm/Table/TableCell.js +4 -3
- package/build/esm/Table/TableCell.js.map +1 -1
- package/build/esm/Table/TableHead.d.ts +1 -1
- package/build/esm/Table/TableHead.js +4 -3
- package/build/esm/Table/TableHead.js.map +1 -1
- package/build/esm/Table/TableRow.d.ts +1 -1
- package/build/esm/Table/TableRow.js +5 -4
- package/build/esm/Table/TableRow.js.map +1 -1
- package/build/esm/Table/context.js.map +1 -1
- package/build/esm/Table/index.js.map +1 -1
- package/build/esm/Text/LoremIpsum.js +1 -1
- package/build/esm/Text/LoremIpsum.js.map +1 -1
- package/build/esm/Text/Text.d.ts +8 -4
- package/build/esm/Text/Text.js +7 -3
- package/build/esm/Text/Text.js.map +1 -1
- package/build/esm/Text/index.js.map +1 -1
- package/build/esm/TextField/FilledContainer.d.ts +4 -4
- package/build/esm/TextField/FilledContainer.js +6 -6
- package/build/esm/TextField/FilledContainer.js.map +1 -1
- package/build/esm/TextField/HelperText.d.ts +5 -5
- package/build/esm/TextField/HelperText.js +5 -5
- package/build/esm/TextField/HelperText.js.map +1 -1
- package/build/esm/TextField/IconContainer.d.ts +2 -3
- package/build/esm/TextField/IconContainer.js +0 -1
- package/build/esm/TextField/IconContainer.js.map +1 -1
- package/build/esm/TextField/Input.d.ts +4 -4
- package/build/esm/TextField/Input.js +11 -9
- package/build/esm/TextField/Input.js.map +1 -1
- package/build/esm/TextField/OutlinedContainer.d.ts +4 -4
- package/build/esm/TextField/OutlinedContainer.js +17 -9
- package/build/esm/TextField/OutlinedContainer.js.map +1 -1
- package/build/esm/TextField/TextField.d.ts +5 -5
- package/build/esm/TextField/TextField.js +4 -4
- package/build/esm/TextField/TextField.js.map +1 -1
- package/build/esm/TextField/consts.js.map +1 -1
- package/build/esm/TextField/index.js.map +1 -1
- package/build/esm/ThemeExplorer/BorderSlider.d.ts +7 -0
- package/build/esm/ThemeExplorer/BorderSlider.js +78 -0
- package/build/esm/ThemeExplorer/BorderSlider.js.map +1 -0
- package/build/esm/ThemeExplorer/ColorPicker.js +4 -3
- package/build/esm/ThemeExplorer/ColorPicker.js.map +1 -1
- package/build/esm/ThemeExplorer/ColorSchemePicker.d.ts +10 -0
- package/build/esm/ThemeExplorer/ColorSchemePicker.js +54 -0
- package/build/esm/ThemeExplorer/ColorSchemePicker.js.map +1 -0
- package/build/esm/ThemeExplorer/FontAutoComplete.d.ts +9 -0
- package/build/esm/ThemeExplorer/FontAutoComplete.js +128 -0
- package/build/esm/ThemeExplorer/FontAutoComplete.js.map +1 -0
- package/build/esm/ThemeExplorer/TextFieldColorPicker.js +4 -3
- package/build/esm/ThemeExplorer/TextFieldColorPicker.js.map +1 -1
- package/build/esm/ThemeExplorer/ThemeBuilder.d.ts +11 -0
- package/build/esm/ThemeExplorer/ThemeBuilder.js +382 -0
- package/build/esm/ThemeExplorer/ThemeBuilder.js.map +1 -0
- package/build/esm/ThemeExplorer/ThemeColors.d.ts +2 -2
- package/build/esm/ThemeExplorer/ThemeColors.js +1 -1
- package/build/esm/ThemeExplorer/ThemeColors.js.map +1 -1
- package/build/esm/ThemeExplorer/components.d.ts +6 -7
- package/build/esm/ThemeExplorer/components.js +28 -24
- package/build/esm/ThemeExplorer/components.js.map +1 -1
- package/build/esm/ThemeExplorer/googleFonts.d.ts +1 -0
- package/build/esm/ThemeExplorer/googleFonts.js +7 -0
- package/build/esm/ThemeExplorer/googleFonts.js.map +1 -0
- package/build/esm/ThemeExplorer/importGoogleFont.d.ts +4 -0
- package/build/esm/ThemeExplorer/importGoogleFont.js +25 -0
- package/build/esm/ThemeExplorer/importGoogleFont.js.map +1 -0
- package/build/esm/ThemeExplorer/index.d.ts +1 -0
- package/build/esm/ThemeExplorer/index.js +2 -0
- package/build/esm/ThemeExplorer/index.js.map +1 -0
- package/build/esm/ThemeExplorer/makeColorScheme.js.map +1 -1
- package/build/esm/ThemeExplorer/updateGoogleFonts.js +70 -0
- package/build/esm/ThemeExplorer/updateGoogleFonts.js.map +1 -0
- package/build/esm/ThemeExplorer/useDeferredColor.js +5 -7
- package/build/esm/ThemeExplorer/useDeferredColor.js.map +1 -1
- package/build/esm/ThemeExplorer/useLocalStorageCachedState.d.ts +1 -1
- package/build/esm/ThemeExplorer/useLocalStorageCachedState.js +1 -1
- package/build/esm/ThemeExplorer/useLocalStorageCachedState.js.map +1 -1
- package/build/esm/Tooltip/Tooltip.d.ts +3 -3
- package/build/esm/Tooltip/Tooltip.js +7 -9
- package/build/esm/Tooltip/Tooltip.js.map +1 -1
- package/build/esm/Tooltip/index.js.map +1 -1
- package/build/esm/color.d.ts +2 -0
- package/build/esm/color.js +10 -5
- package/build/esm/color.js.map +1 -1
- package/build/esm/css.js.map +1 -1
- package/build/esm/hooks/useAnimation.js +3 -3
- package/build/esm/hooks/useAnimation.js.map +1 -1
- package/build/esm/index.d.ts +3 -1
- package/build/esm/index.js +3 -1
- package/build/esm/index.js.map +1 -1
- package/build/esm/motion.d.ts +7 -0
- package/build/esm/motion.js +8 -0
- package/build/esm/motion.js.map +1 -0
- package/build/esm/theme/index.js.map +1 -1
- package/build/esm/theme/theme.d.ts +114 -28
- package/build/esm/theme/theme.js +46 -38
- package/build/esm/theme/theme.js.map +1 -1
- package/build/esm/theme/typography-raleway.js.map +1 -1
- package/build/esm/theme/typography-roboto.js.map +1 -1
- package/build/esm/theme/useTheme.d.ts +557 -1
- package/build/esm/theme/useTheme.js.map +1 -1
- package/build/tsconfig-build.tsbuildinfo +1 -0
- package/package.json +10 -10
- package/src/Alert/Alert.tsx +1 -1
- package/src/AppBar/AppBar.tsx +4 -3
- package/src/BottomSheet/BottomSheetSurface.tsx +3 -3
- package/src/Box/Box.tsx +6 -8
- package/src/Button/BaseButton.tsx +4 -11
- package/src/Button/Button.story.tsx +6 -1
- package/src/Button/Button.tsx +4 -4
- package/src/Button/ButtonGroup.tsx +1 -1
- package/src/Button/FilledButton.tsx +4 -9
- package/src/Button/SpinnerButton.story.tsx +1 -1
- package/src/CheckBox/CheckBox.story.tsx +7 -6
- package/src/CheckBox/CheckBox.tsx +6 -10
- package/src/CheckBox/CheckBoxIcon.tsx +5 -5
- package/src/Chip/ButtonChip.tsx +3 -3
- package/src/Chip/Chip.story.tsx +1 -1
- package/src/Chip/ChipBase.tsx +2 -2
- package/src/Chip/ChoiceChip.tsx +7 -7
- package/src/Combobox/Combobox.story.tsx +3 -3
- package/src/Combobox/Combobox.tsx +14 -12
- package/src/Dialog/DialogBackdrop.tsx +3 -3
- package/src/Dialog/DialogSurface.tsx +2 -4
- package/src/Dialog/useDialogAnimation.tsx +3 -4
- package/src/Divider/Divider.tsx +2 -2
- package/src/FloatingLabel/FloatingLabel.tsx +7 -6
- package/src/LineRipple/LineRipple.story.tsx +1 -1
- package/src/LineRipple/LineRipple.tsx +4 -4
- package/src/Link/Link.tsx +14 -5
- package/src/List/List.tsx +4 -4
- package/src/ListItem/ListItem.tsx +52 -46
- package/src/ListItem/ListItemText.tsx +6 -7
- package/src/Menu/ContextMenu.story.tsx +34 -0
- package/src/Menu/Menu.tsx +19 -5
- package/src/NavRail/NavRail.story.tsx +190 -0
- package/src/NavRail/NavRailItem.tsx +176 -0
- package/src/NavRail/index.ts +1 -0
- package/src/NotchedOutline/NotchedOutline.tsx +4 -5
- package/src/NotchedOutline/styledComponents.ts +2 -1
- package/src/Paper/Paper.story.tsx +3 -3
- package/src/Paper/Paper.tsx +3 -3
- package/src/ProgressSpinner/ProgressSpinner.tsx +9 -9
- package/src/RadioButton/RadioButton.story.tsx +2 -2
- package/src/RadioButton/RadioButton.tsx +1 -1
- package/src/RadioButton/RadioButtonIcon.tsx +4 -5
- package/src/Ripple/Ripple.story.tsx +1 -1
- package/src/Ripple/RippleBox.tsx +1 -2
- package/src/Ripple/useRippleHandlers.ts +3 -3
- package/src/Ripple/useRippleSurface.ts +83 -61
- package/src/Select/PaymentMethodSelect.story.tsx +17 -24
- package/src/Select/Select.tsx +20 -6
- package/src/Select/SelectIcon.tsx +3 -4
- package/src/Select/context.ts +2 -1
- package/src/Select/defaultRender.ts +2 -1
- package/src/Select/styledComponents.tsx +12 -22
- package/src/SelectItem/SelectItem.tsx +13 -3
- package/src/SelectionControl/SelectionControlLabel.tsx +4 -8
- package/src/SelectionControl/SelectionControlText.tsx +3 -3
- package/src/Skeleton/DelayAppearance.tsx +2 -2
- package/src/Skeleton/Skeleton.story.tsx +2 -2
- package/src/Skeleton/Skeleton.tsx +6 -6
- package/src/Slider/Slider.story.tsx +36 -0
- package/src/Slider/Slider.tsx +275 -0
- package/src/Slider/index.ts +1 -0
- package/src/Snackbar/Snackbar.tsx +10 -10
- package/src/Snackbar/Stack.tsx +6 -9
- package/src/Snackbar/useSnackbarAnimation.ts +4 -3
- package/src/Switch/Switch.tsx +6 -10
- package/src/Switch/styledComponents.tsx +2 -2
- package/src/Tab/Tab.tsx +3 -7
- package/src/TabIndicator/TabIndicator.tsx +2 -1
- package/src/TabIndicator/context.ts +2 -1
- package/src/Table/TableRow.tsx +1 -1
- package/src/Text/LoremIpsum.tsx +1 -1
- package/src/Text/Text.story.tsx +42 -7
- package/src/Text/Text.tsx +25 -5
- package/src/TextField/FilledContainer.tsx +3 -3
- package/src/TextField/HelperText.tsx +5 -5
- package/src/TextField/IconContainer.tsx +2 -3
- package/src/TextField/Input.tsx +5 -4
- package/src/TextField/OutlinedContainer.tsx +11 -6
- package/src/TextField/TextField.tsx +4 -4
- package/src/ThemeExplorer/BorderSlider.tsx +73 -0
- package/src/ThemeExplorer/ColorSchemePicker.tsx +55 -0
- package/src/ThemeExplorer/FontAutoComplete.tsx +139 -0
- package/src/ThemeExplorer/ThemeBuilder.story.tsx +3 -160
- package/src/ThemeExplorer/ThemeBuilder.tsx +337 -0
- package/src/ThemeExplorer/ThemeColors.tsx +1 -1
- package/src/ThemeExplorer/components.tsx +28 -20
- package/src/ThemeExplorer/googleFonts.ts +1436 -0
- package/src/ThemeExplorer/index.ts +1 -0
- package/src/ThemeExplorer/updateGoogleFonts.js +33 -0
- package/src/ThemeExplorer/useDeferredColor.tsx +5 -9
- package/src/ThemeExplorer/useLocalStorageCachedState.ts +2 -2
- package/src/Tooltip/Tooltip.story.tsx +2 -2
- package/src/Tooltip/Tooltip.tsx +9 -11
- package/src/color.ts +27 -6
- package/src/index.ts +3 -1
- package/src/motion.ts +7 -0
- package/src/theme/theme.ts +51 -37
- package/build/esm/ColorMode/ColorModeProvider.d.ts +0 -7
- package/build/esm/ColorMode/ColorModeProvider.js +0 -92
- package/build/esm/ColorMode/ColorModeProvider.js.map +0 -1
- package/build/esm/ColorMode/color-mode.d.ts +0 -8
- package/build/esm/ColorMode/color-mode.js +0 -11
- package/build/esm/ColorMode/color-mode.js.map +0 -1
- package/build/esm/ColorMode/color-vars.d.ts +0 -4
- package/build/esm/ColorMode/color-vars.js +0 -58
- package/build/esm/ColorMode/color-vars.js.map +0 -1
- package/build/esm/ColorMode/constants.d.ts +0 -3
- package/build/esm/ColorMode/constants.js +0 -5
- package/build/esm/ColorMode/constants.js.map +0 -1
- package/build/esm/ColorMode/index.d.ts +0 -4
- package/build/esm/ColorMode/index.js +0 -5
- package/build/esm/ColorMode/index.js.map +0 -1
- package/build/esm/ListItem/context.d.ts +0 -7
- package/build/esm/ListItem/context.js +0 -10
- package/build/esm/ListItem/context.js.map +0 -1
- package/build/tsconfig.tsbuildinfo +0 -1
- package/src/ColorMode/ColorModeProvider.tsx +0 -97
- package/src/ColorMode/color-mode.ts +0 -20
- package/src/ColorMode/color-vars.ts +0 -56
- package/src/ColorMode/constants.ts +0 -5
- package/src/ColorMode/index.ts +0 -4
- package/src/ColorMode/tests/color-vars.test.ts +0 -9
- package/src/ThemeExplorer/ThemeExplorer.story.tsx +0 -43
package/build/cjs/index.js
CHANGED
|
@@ -2,28 +2,44 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var _extends = require('@babel/runtime/helpers/extends');
|
|
6
5
|
var css = require('@styled-system/css');
|
|
7
6
|
var polished = require('polished');
|
|
8
|
-
var
|
|
9
|
-
var _objectWithoutPropertiesLoose = require('@babel/runtime/helpers/objectWithoutPropertiesLoose');
|
|
7
|
+
var dynamicTheme = require('@basic-ui/dynamic-theme');
|
|
10
8
|
var react$1 = require('react');
|
|
11
9
|
var jsxRuntime = require('react/jsx-runtime');
|
|
12
|
-
var react = require('@emotion/react');
|
|
13
10
|
var _styled = require('@emotion/styled/base');
|
|
14
11
|
var styledSystem = require('styled-system');
|
|
15
12
|
var shouldForwardProp = require('@styled-system/should-forward-prop');
|
|
13
|
+
var react = require('@emotion/react');
|
|
16
14
|
var core = require('@basic-ui/core');
|
|
15
|
+
var hash = require('@emotion/hash');
|
|
17
16
|
|
|
18
17
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
19
18
|
|
|
20
|
-
var _extends__default = /*#__PURE__*/_interopDefaultLegacy(_extends);
|
|
21
|
-
var hash__default = /*#__PURE__*/_interopDefaultLegacy(hash);
|
|
22
|
-
var _objectWithoutPropertiesLoose__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutPropertiesLoose);
|
|
23
19
|
var _styled__default = /*#__PURE__*/_interopDefaultLegacy(_styled);
|
|
24
20
|
var shouldForwardProp__default = /*#__PURE__*/_interopDefaultLegacy(shouldForwardProp);
|
|
21
|
+
var hash__default = /*#__PURE__*/_interopDefaultLegacy(hash);
|
|
22
|
+
|
|
23
|
+
const EASING_EMPHASIZED = 'cubic-bezier(0.2, 0, 0, 1)';
|
|
24
|
+
const EASING_EMPHASIZED_ACCELERATE = 'cubic-bezier(0.3, 0, 0.8, 0.15)';
|
|
25
|
+
const EASING_EMPHASIZED_DECELERATE = 'cubic-bezier(0.05, 0.7, 0.1, 1)';
|
|
26
|
+
const EASING_LINEAR = 'cubic-bezier(0, 0, 1, 1)';
|
|
27
|
+
const EASING_STANDARD = 'cubic-bezier(0.2, 0, 0, 1)';
|
|
28
|
+
const EASING_STANDARD_ACCELERATE = 'cubic-bezier(0.3, 0, 1, 1)';
|
|
29
|
+
const EASING_STANDARD_DECELERATE = 'cubic-bezier(0, 0, 0, 1)';
|
|
25
30
|
|
|
26
31
|
// material theme preset
|
|
32
|
+
|
|
33
|
+
function font(fontFamily, lineHeight, fontSize, letterSpacing, weight) {
|
|
34
|
+
return {
|
|
35
|
+
fontFamily,
|
|
36
|
+
lineHeight: polished.rem(lineHeight),
|
|
37
|
+
fontSize: polished.rem(fontSize),
|
|
38
|
+
letterSpacing: polished.rem(letterSpacing),
|
|
39
|
+
fontWeight: weight
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
|
|
27
43
|
const theme = {
|
|
28
44
|
googleFonts: 'https://fonts.googleapis.com/css?family=Roboto+Mono|Roboto:300,400,500,600,700&display=swap',
|
|
29
45
|
colors: {
|
|
@@ -103,44 +119,19 @@ const theme = {
|
|
|
103
119
|
full: "6249.9375rem",
|
|
104
120
|
circle: '100%'
|
|
105
121
|
},
|
|
106
|
-
shadowsOriginal: {
|
|
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)',
|
|
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)',
|
|
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)',
|
|
110
|
-
3: '0 3px 3px -2px rgba(0,0,0,0.2),0 3px 4px 0 rgba(0,0,0,0.14),0 1px 8px 0 rgba(0,0,0,0.12)',
|
|
111
|
-
4: '0 2px 4px -1px rgba(0,0,0,0.2),0 4px 5px 0 rgba(0,0,0,0.14),0 1px 10px 0 rgba(0,0,0,0.12)',
|
|
112
|
-
5: '0 3px 5px -1px rgba(0,0,0,0.2),0 5px 8px 0 rgba(0,0,0,0.14),0 1px 14px 0 rgba(0,0,0,0.12)',
|
|
113
|
-
6: '0 3px 5px -1px rgba(0,0,0,0.2),0 6px 10px 0 rgba(0,0,0,0.14),0 1px 18px 0 rgba(0,0,0,0.12)',
|
|
114
|
-
7: '0 4px 5px -2px rgba(0,0,0,0.2),0 7px 10px 1px rgba(0,0,0,0.14),0 2px 16px 1px rgba(0,0,0,0.12)',
|
|
115
|
-
8: '0 5px 5px -3px rgba(0,0,0,0.2),0 8px 10px 1px rgba(0,0,0,0.14),0 3px 14px 2px rgba(0,0,0,0.12)',
|
|
116
|
-
9: '0 5px 6px -3px rgba(0,0,0,0.2),0 9px 12px 1px rgba(0,0,0,0.14),0 3px 16px 2px rgba(0,0,0,0.12)',
|
|
117
|
-
10: '0 6px 6px -3px rgba(0,0,0,0.2),0 10px 14px 1px rgba(0,0,0,0.14),0 4px 18px 3px rgba(0,0,0,0.12)',
|
|
118
|
-
11: '0 6px 7px -4px rgba(0,0,0,0.2),0 11px 15px 1px rgba(0,0,0,0.14),0 4px 20px 3px rgba(0,0,0,0.12)',
|
|
119
|
-
12: '0 7px 8px -4px rgba(0,0,0,0.2),0 12px 17px 2px rgba(0,0,0,0.14),0 5px 22px 4px rgba(0,0,0,0.12)',
|
|
120
|
-
13: '0 7px 8px -4px rgba(0,0,0,0.2),0 13px 19px 2px rgba(0,0,0,0.14),0 5px 24px 4px rgba(0,0,0,0.12)',
|
|
121
|
-
14: '0 7px 9px -4px rgba(0,0,0,0.2),0 14px 21px 2px rgba(0,0,0,0.14),0 5px 26px 4px rgba(0,0,0,0.12)',
|
|
122
|
-
15: '0 8px 9px -5px rgba(0,0,0,0.2),0 15px 22px 2px rgba(0,0,0,0.14),0 6px 28px 5px rgba(0,0,0,0.12)',
|
|
123
|
-
16: '0 8px 10px -5px rgba(0,0,0,0.2),0 16px 24px 2px rgba(0,0,0,0.14),0 6px 30px 5px rgba(0,0,0,0.12)',
|
|
124
|
-
17: '0 8px 11px -5px rgba(0,0,0,0.2),0 17px 26px 2px rgba(0,0,0,0.14),0 6px 32px 5px rgba(0,0,0,0.12)',
|
|
125
|
-
18: '0 9px 11px -5px rgba(0,0,0,0.2),0 18px 28px 2px rgba(0,0,0,0.14),0 7px 34px 6px rgba(0,0,0,0.12)',
|
|
126
|
-
19: '0 9px 12px -6px rgba(0,0,0,0.2),0 19px 29px 2px rgba(0,0,0,0.14),0 7px 36px 6px rgba(0,0,0,0.12)',
|
|
127
|
-
20: '0 10px 13px -6px rgba(0,0,0,0.2),0 20px 31px 3px rgba(0,0,0,0.14),0 8px 38px 7px rgba(0,0,0,0.12)',
|
|
128
|
-
21: '0 10px 13px -6px rgba(0,0,0,0.2),0 21px 33px 3px rgba(0,0,0,0.14),0 8px 40px 7px rgba(0,0,0,0.12)',
|
|
129
|
-
22: '0 10px 14px -6px rgba(0,0,0,0.2),0 22px 35px 3px rgba(0,0,0,0.14),0 8px 42px 7px rgba(0,0,0,0.12)',
|
|
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)',
|
|
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)'
|
|
132
|
-
},
|
|
133
122
|
shadows: {
|
|
134
123
|
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
124
|
1: '0 1px 2px rgba(0,0,0,0.3),0 1px 3px 1px rgba(0,0,0,0.15)',
|
|
136
125
|
2: '0 1px 2px rgba(0,0,0,0.3),0 2px 6px 2px rgba(0,0,0,0.15)',
|
|
137
|
-
3: '0
|
|
138
|
-
4: '0
|
|
139
|
-
5: '0
|
|
126
|
+
3: '0 1px 3px rgba(0,0,0,0.3),0 4px 8px 3px rgba(0,0,0,0.15)',
|
|
127
|
+
4: '0 2px 3px rgba(0,0,0,0.3),0 6px 10px 4px rgba(0,0,0,0.15)',
|
|
128
|
+
5: '0 4px 4px rgba(0,0,0,0.3),0 8px 12px 6px rgba(0,0,0,0.15)'
|
|
140
129
|
},
|
|
141
130
|
fonts: {
|
|
142
131
|
body: 'Roboto, sans-serif',
|
|
143
132
|
heading: 'Roboto, sans-serif',
|
|
133
|
+
brand: 'Roboto, sans-serif',
|
|
134
|
+
plain: 'Roboto, sans-serif',
|
|
144
135
|
monospace: '"Roboto Mono", monospace'
|
|
145
136
|
},
|
|
146
137
|
fontSizes: {
|
|
@@ -190,6 +181,21 @@ const theme = {
|
|
|
190
181
|
fontFamily: 'body',
|
|
191
182
|
lineHeight: 'body'
|
|
192
183
|
},
|
|
184
|
+
'display-large': font('brand', 64, 57, 0, 400),
|
|
185
|
+
'display-medium': font('brand', 52, 45, 0, 400),
|
|
186
|
+
'display-small': font('brand', 44, 36, 0, 400),
|
|
187
|
+
'headline-large': font('brand', 40, 32, 0, 400),
|
|
188
|
+
'headline-medium': font('brand', 36, 28, 0, 400),
|
|
189
|
+
'headline-small': font('brand', 32, 24, 0, 400),
|
|
190
|
+
'title-large': font('brand', 28, 22, 0, 400),
|
|
191
|
+
'title-medium': font('plain', 24, 16, 0.15, 500),
|
|
192
|
+
'title-small': font('plain', 20, 14, 0.1, 500),
|
|
193
|
+
'label-large': font('plain', 20, 14, 0.1, 500),
|
|
194
|
+
'label-medium': font('plain', 16, 12, 0.5, 500),
|
|
195
|
+
'label-small': font('plain', 16, 11, 0.5, 500),
|
|
196
|
+
'body-large': font('plain', 24, 16, 0.5, 400),
|
|
197
|
+
'body-medium': font('plain', 20, 14, 0.25, 400),
|
|
198
|
+
'body-small': font('plain', 16, 12, 0.4, 400),
|
|
193
199
|
h1: {
|
|
194
200
|
variant: 'text.heading',
|
|
195
201
|
fontWeight: 'light',
|
|
@@ -315,7 +321,7 @@ const theme = {
|
|
|
315
321
|
buttons: {
|
|
316
322
|
variants: {
|
|
317
323
|
base: {
|
|
318
|
-
variant: 'text.
|
|
324
|
+
variant: 'text.label-large',
|
|
319
325
|
boxShadow: 'none',
|
|
320
326
|
py: 0,
|
|
321
327
|
px: "1.5rem",
|
|
@@ -380,30 +386,36 @@ const theme = {
|
|
|
380
386
|
elevations: {
|
|
381
387
|
none: {},
|
|
382
388
|
default: {
|
|
383
|
-
transition:
|
|
389
|
+
transition: `box-shadow .28s ${EASING_STANDARD}`,
|
|
384
390
|
'&:hover': {
|
|
385
391
|
boxShadow: 1
|
|
386
392
|
},
|
|
387
|
-
'&:
|
|
393
|
+
'&:active,&:focus-visible,&:disabled': {
|
|
388
394
|
boxShadow: 0
|
|
389
395
|
}
|
|
390
396
|
},
|
|
391
397
|
elevated: {
|
|
392
|
-
transition:
|
|
398
|
+
transition: `box-shadow .28s ${EASING_STANDARD}`,
|
|
393
399
|
boxShadow: 1,
|
|
394
400
|
'&:hover': {
|
|
395
401
|
boxShadow: 2
|
|
396
402
|
},
|
|
403
|
+
'&:active,&:focus-visible': {
|
|
404
|
+
boxShadow: 1
|
|
405
|
+
},
|
|
397
406
|
'&:disabled,&:disabled:hover,&:disabled:focus,&:disabled:active': {
|
|
398
407
|
boxShadow: 0
|
|
399
408
|
}
|
|
400
409
|
},
|
|
401
410
|
floating: {
|
|
402
|
-
transition:
|
|
411
|
+
transition: `box-shadow .28s ${EASING_STANDARD}`,
|
|
403
412
|
boxShadow: 3,
|
|
404
413
|
':hover': {
|
|
405
414
|
boxShadow: 4
|
|
406
415
|
},
|
|
416
|
+
'&:active,&:focus-visible': {
|
|
417
|
+
boxShadow: 3
|
|
418
|
+
},
|
|
407
419
|
'&:disabled,&:disabled:hover,&:disabled:focus,&:disabled:active': {
|
|
408
420
|
boxShadow: 0
|
|
409
421
|
}
|
|
@@ -444,7 +456,7 @@ const theme = {
|
|
|
444
456
|
height: "2rem",
|
|
445
457
|
borderRadius: 'small',
|
|
446
458
|
outline: 'none',
|
|
447
|
-
transition:
|
|
459
|
+
transition: `box-shadow .28s ${EASING_STANDARD}`
|
|
448
460
|
},
|
|
449
461
|
filled: {
|
|
450
462
|
variant: 'chips.variants.base',
|
|
@@ -464,7 +476,7 @@ const theme = {
|
|
|
464
476
|
borderRadius: 'extra-large'
|
|
465
477
|
}
|
|
466
478
|
},
|
|
467
|
-
backgroundColorOverlay:
|
|
479
|
+
backgroundColorOverlay: 3
|
|
468
480
|
},
|
|
469
481
|
paper: {
|
|
470
482
|
overlays: {
|
|
@@ -529,154 +541,23 @@ const variant = ({
|
|
|
529
541
|
tx = 'variants'
|
|
530
542
|
}) => css.css(css.get(theme, tx + '.' + variant, css.get(theme, variant)))(theme);
|
|
531
543
|
|
|
532
|
-
const BoxBase = /*#__PURE__*/_styled__default[
|
|
533
|
-
shouldForwardProp: shouldForwardProp__default[
|
|
544
|
+
const BoxBase = /*#__PURE__*/_styled__default["default"]('div', process.env.NODE_ENV === "production" ? {
|
|
545
|
+
shouldForwardProp: shouldForwardProp__default["default"],
|
|
534
546
|
target: "e25ivq30"
|
|
535
547
|
} : {
|
|
536
|
-
shouldForwardProp: shouldForwardProp__default[
|
|
548
|
+
shouldForwardProp: shouldForwardProp__default["default"],
|
|
537
549
|
target: "e25ivq30",
|
|
538
550
|
label: "BoxBase"
|
|
539
|
-
})("box-sizing:border-box;margin:0;min-width:0;", base, variant, sx, props => props.css, styledSystem.compose(styledSystem.space, styledSystem.layout, styledSystem.typography, styledSystem.color, styledSystem.flexbox, styledSystem.border, styledSystem.grid, styledSystem.background, styledSystem.position, styledSystem.shadow), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
551
|
+
})("box-sizing:border-box;margin:0;min-width:0;", base, variant, sx, props => props.css, styledSystem.compose(styledSystem.space, styledSystem.layout, styledSystem.typography, styledSystem.color, styledSystem.flexbox, styledSystem.border, styledSystem.grid, styledSystem.background, styledSystem.position, styledSystem.shadow), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkJveC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBMEZnQiIsImZpbGUiOiJCb3gudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHR5cGUgeyBFbGVtZW50VHlwZSwgRkMsIEhUTUxBdHRyaWJ1dGVzLCBSZWZBdHRyaWJ1dGVzIH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IHsgZm9yd2FyZFJlZiB9IGZyb20gJ3JlYWN0JztcbmltcG9ydCB0eXBlIHsgQ1NTT2JqZWN0IH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuaW1wb3J0IHR5cGUge1xuICBTcGFjZVByb3BzLFxuICBMYXlvdXRQcm9wcyxcbiAgVHlwb2dyYXBoeVByb3BzLFxuICBDb2xvclByb3BzLFxuICBGbGV4Ym94UHJvcHMsXG4gIEJvcmRlclByb3BzLFxuICBHcmlkUHJvcHMsXG4gIEJhY2tncm91bmRQcm9wcyxcbiAgUG9zaXRpb25Qcm9wcyxcbiAgU2hhZG93UHJvcHMsXG4gIFJlc3BvbnNpdmVWYWx1ZSxcbn0gZnJvbSAnc3R5bGVkLXN5c3RlbSc7XG5pbXBvcnQge1xuICBjb21wb3NlLFxuICBzcGFjZSxcbiAgbGF5b3V0LFxuICB0eXBvZ3JhcGh5LFxuICBjb2xvcixcbiAgZmxleGJveCxcbiAgYm9yZGVyLFxuICBncmlkLFxuICBiYWNrZ3JvdW5kLFxuICBwb3NpdGlvbixcbiAgc2hhZG93LFxufSBmcm9tICdzdHlsZWQtc3lzdGVtJztcbmltcG9ydCB0eXBlIHtcbiAgU3lzdGVtU3R5bGVPYmplY3QsXG4gIFJlc3BvbnNpdmVTdHlsZVZhbHVlLFxufSBmcm9tICdAc3R5bGVkLXN5c3RlbS9jc3MnO1xuaW1wb3J0IHsgY3NzLCBnZXQgfSBmcm9tICdAc3R5bGVkLXN5c3RlbS9jc3MnO1xuaW1wb3J0IHNob3VsZEZvcndhcmRQcm9wIGZyb20gJ0BzdHlsZWQtc3lzdGVtL3Nob3VsZC1mb3J3YXJkLXByb3AnO1xuXG5pbXBvcnQgdHlwZSB7IFRoZW1lIH0gZnJvbSAnLi4vdGhlbWUnO1xuaW1wb3J0IHsgdXNlVGhlbWUgfSBmcm9tICcuLi90aGVtZSc7XG5cbmV4cG9ydCB0eXBlIFN4U3R5bGVQcm9wID1cbiAgfCBTeXN0ZW1TdHlsZU9iamVjdFxuICB8IFJlY29yZDxcbiAgICAgIHN0cmluZyxcbiAgICAgIHwgU3lzdGVtU3R5bGVPYmplY3RcbiAgICAgIHwgUmVzcG9uc2l2ZVN0eWxlVmFsdWU8bnVtYmVyIHwgc3RyaW5nPlxuICAgICAgfCBSZWNvcmQ8XG4gICAgICAgICAgc3RyaW5nLFxuICAgICAgICAgIFN5c3RlbVN0eWxlT2JqZWN0IHwgUmVzcG9uc2l2ZVN0eWxlVmFsdWU8bnVtYmVyIHwgc3RyaW5nPlxuICAgICAgICA+XG4gICAgPjtcblxuZXhwb3J0IGludGVyZmFjZSBCYXNlUHJvcHMge1xuICBhcz86IEVsZW1lbnRUeXBlPGFueT47XG4gIHN4PzogU3hTdHlsZVByb3A7XG4gIC8vIGNzcz86IENTU09iamVjdCB8ICgocHJvcHM6IHsgdGhlbWU6IFRoZW1lIH0pID0+IENTU09iamVjdCk7XG4gIF9fY3NzPzogU3hTdHlsZVByb3A7XG4gIHZhcmlhbnQ/OiBSZXNwb25zaXZlVmFsdWU8c3RyaW5nPjtcbiAgdHg/OiBzdHJpbmc7XG4gIHRoZW1lOiBUaGVtZTtcbn1cbmV4cG9ydCBjb25zdCBzeCA9ICh7IHRoZW1lLCBzeCB9OiBCYXNlUHJvcHMpID0+IGNzcyhzeCkodGhlbWUpIGFzIENTU09iamVjdDtcbmV4cG9ydCBjb25zdCBiYXNlID0gKHsgdGhlbWUsIF9fY3NzIH06IEJhc2VQcm9wcykgPT5cbiAgY3NzKF9fY3NzKSh0aGVtZSkgYXMgQ1NTT2JqZWN0O1xuZXhwb3J0IGNvbnN0IHZhcmlhbnQgPSAoe1xuICB0aGVtZSxcbiAgdmFyaWFudCA9ICdkZWZhdWx0JyxcbiAgdHggPSAndmFyaWFudHMnLFxufTogQmFzZVByb3BzKSA9PlxuICBjc3MoZ2V0KHRoZW1lLCB0eCArICcuJyArIHZhcmlhbnQsIGdldCh0aGVtZSwgdmFyaWFudCBhcyBhbnkpKSkoXG4gICAgdGhlbWVcbiAgKSBhcyBDU1NPYmplY3Q7XG5cbnR5cGUgS25vd25Cb3hQcm9wcyA9IEJhc2VQcm9wcyAmXG4gIFNwYWNlUHJvcHMgJlxuICBMYXlvdXRQcm9wcyAmXG4gIFR5cG9ncmFwaHlQcm9wcyAmXG4gIENvbG9yUHJvcHMgJlxuICBGbGV4Ym94UHJvcHMgJlxuICBCb3JkZXJQcm9wcyAmXG4gIEdyaWRQcm9wcyAmXG4gIEJhY2tncm91bmRQcm9wcyAmXG4gIFBvc2l0aW9uUHJvcHMgJlxuICBTaGFkb3dQcm9wcyAmIHsgekluZGV4PzogbnVtYmVyIHwgc3RyaW5nIH07XG5cbmV4cG9ydCB0eXBlIEJveFByb3BzPFxuICBIID0gSFRNTERpdkVsZW1lbnQsXG4gIEF0dHIgZXh0ZW5kcyBIVE1MQXR0cmlidXRlczxIPiA9IEhUTUxBdHRyaWJ1dGVzPEg+XG4+ID0gT21pdDxBdHRyLCBrZXlvZiBLbm93bkJveFByb3BzPiAmIFBhcnRpYWw8S25vd25Cb3hQcm9wcz4gJiBSZWZBdHRyaWJ1dGVzPEg+O1xuXG5jb25zdCBCb3hCYXNlID0gc3R5bGVkKCdkaXYnIGFzIHVua25vd24gYXMgRkMsIHtcbiAgc2hvdWxkRm9yd2FyZFByb3AsXG59KTxCb3hQcm9wczxIVE1MRGl2RWxlbWVudD4+KFxuICB7XG4gICAgYm94U2l6aW5nOiAnYm9yZGVyLWJveCcsXG4gICAgbWFyZ2luOiAwLFxuICAgIG1pbldpZHRoOiAwLFxuICB9LFxuICBiYXNlLFxuICB2YXJpYW50LFxuICBzeCxcbiAgKHByb3BzOiBhbnkpID0+IHByb3BzLmNzcyxcbiAgY29tcG9zZShcbiAgICBzcGFjZSxcbiAgICBsYXlvdXQsXG4gICAgdHlwb2dyYXBoeSxcbiAgICBjb2xvcixcbiAgICBmbGV4Ym94LFxuICAgIGJvcmRlcixcbiAgICBncmlkLFxuICAgIGJhY2tncm91bmQsXG4gICAgcG9zaXRpb24sXG4gICAgc2hhZG93XG4gIClcbik7XG5cbmV4cG9ydCBjb25zdCBCb3g6IDxcbiAgUHJvcHMgPSBCb3hQcm9wczxIVE1MRGl2RWxlbWVudCwgSFRNTEF0dHJpYnV0ZXM8SFRNTERpdkVsZW1lbnQ+PlxuPihcbiAgcHJvcHM6IFByb3BzXG4pID0+IEpTWC5FbGVtZW50ID0gZm9yd2FyZFJlZjxIVE1MRGl2RWxlbWVudCwgQm94UHJvcHM8SFRNTERpdkVsZW1lbnQ+PihcbiAgZnVuY3Rpb24gQm94KHByb3BzLCBmb3J3YXJkZWRSZWYpIHtcbiAgICBjb25zdCB0aGVtZSA9IHVzZVRoZW1lKCk7XG5cbiAgICByZXR1cm4gPEJveEJhc2UgcmVmPXtmb3J3YXJkZWRSZWZ9IHRoZW1lPXt0aGVtZX0gey4uLnByb3BzfSAvPjtcbiAgfVxuKSBhcyBhbnk7XG4iXX0= */");
|
|
540
552
|
|
|
541
553
|
const Box = /*#__PURE__*/react$1.forwardRef(function Box(props, forwardedRef) {
|
|
542
554
|
const theme = useTheme();
|
|
543
|
-
return /*#__PURE__*/jsxRuntime.jsx(BoxBase,
|
|
555
|
+
return /*#__PURE__*/jsxRuntime.jsx(BoxBase, {
|
|
544
556
|
ref: forwardedRef,
|
|
545
|
-
theme: theme
|
|
546
|
-
|
|
547
|
-
});
|
|
548
|
-
|
|
549
|
-
const ColorModeContext = /*#__PURE__*/react$1.createContext({
|
|
550
|
-
colorMode: 'default',
|
|
551
|
-
setColorMode: () => {
|
|
552
|
-
/*noop*/
|
|
553
|
-
}
|
|
554
|
-
});
|
|
555
|
-
const useColorMode = () => {
|
|
556
|
-
return react$1.useContext(ColorModeContext);
|
|
557
|
-
};
|
|
558
|
-
|
|
559
|
-
const THEME_LOCAL_STORAGE_KEY = 'basic-ui-theme';
|
|
560
|
-
const DEFAULT_THEME_CLASS = `css-${hash__default['default']('basic-ui-default-theme')}`;
|
|
561
|
-
const DARK_THEME_CLASS = `css-${hash__default['default']('basic-ui-dark-theme')}`;
|
|
562
|
-
|
|
563
|
-
function saveColorMode(colorMode, saveToStorage = true) {
|
|
564
|
-
if (saveToStorage) {
|
|
565
|
-
window.localStorage.setItem(THEME_LOCAL_STORAGE_KEY, colorMode || 'default');
|
|
566
|
-
}
|
|
567
|
-
|
|
568
|
-
const [add, remove] = colorMode === 'dark' ? [DARK_THEME_CLASS, DEFAULT_THEME_CLASS] : [DEFAULT_THEME_CLASS, DARK_THEME_CLASS];
|
|
569
|
-
|
|
570
|
-
if (!document.body.classList.contains(remove)) {
|
|
571
|
-
document.body.classList.add(add);
|
|
572
|
-
return;
|
|
573
|
-
}
|
|
574
|
-
|
|
575
|
-
document.body.classList.replace(remove, add);
|
|
576
|
-
}
|
|
577
|
-
|
|
578
|
-
const ColorModeProvider = props => {
|
|
579
|
-
const {
|
|
580
|
-
children,
|
|
581
|
-
styles
|
|
582
|
-
} = props;
|
|
583
|
-
const [colorMode, _setColorMode] = react$1.useState();
|
|
584
|
-
const setColorMode = react$1.useCallback((colorMode, saveToStorage = true) => {
|
|
585
|
-
saveColorMode(colorMode || 'default', saveToStorage);
|
|
586
|
-
|
|
587
|
-
_setColorMode(colorMode);
|
|
588
|
-
}, []);
|
|
589
|
-
const colorModeObject = react$1.useMemo(() => ({
|
|
590
|
-
colorMode,
|
|
591
|
-
setColorMode
|
|
592
|
-
}), [colorMode, setColorMode]);
|
|
593
|
-
react$1.useEffect(() => {
|
|
594
|
-
_setColorMode(document.body.classList.contains(DARK_THEME_CLASS) ? 'dark' : 'default');
|
|
595
|
-
|
|
596
|
-
const darkQuery = window.matchMedia('(prefers-color-scheme: dark)');
|
|
597
|
-
darkQuery == null ? void 0 : darkQuery.addListener(e => {
|
|
598
|
-
setColorMode(e.matches ? 'dark' : 'default', false);
|
|
599
|
-
});
|
|
600
|
-
}, [setColorMode]);
|
|
601
|
-
const globalStyles = react$1.useMemo(() => {
|
|
602
|
-
const ret = {
|
|
603
|
-
body: _extends__default['default']({
|
|
604
|
-
colorScheme: 'light'
|
|
605
|
-
}, styles['default'] || {})
|
|
606
|
-
};
|
|
607
|
-
ret[`.${DEFAULT_THEME_CLASS}`] = _extends__default['default']({
|
|
608
|
-
colorScheme: 'light'
|
|
609
|
-
}, styles['default'] || {});
|
|
610
|
-
|
|
611
|
-
for (const key in styles) {
|
|
612
|
-
if (key === 'default') {
|
|
613
|
-
continue;
|
|
614
|
-
}
|
|
615
|
-
|
|
616
|
-
ret[`.${DARK_THEME_CLASS}`] = _extends__default['default']({
|
|
617
|
-
colorScheme: 'dark'
|
|
618
|
-
}, styles[key]);
|
|
619
|
-
}
|
|
620
|
-
|
|
621
|
-
return ret;
|
|
622
|
-
}, [styles]);
|
|
623
|
-
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
624
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(react.Global, {
|
|
625
|
-
styles: globalStyles
|
|
626
|
-
}), /*#__PURE__*/jsxRuntime.jsx(ColorModeContext.Provider, {
|
|
627
|
-
value: colorModeObject,
|
|
628
|
-
children: children
|
|
629
|
-
})]
|
|
630
|
-
});
|
|
631
|
-
};
|
|
632
|
-
|
|
633
|
-
const toVarName = (key, suffix = '') => `--${key}${suffix ? `--${suffix}` : ''}`;
|
|
634
|
-
|
|
635
|
-
const toVarValue = (key, value, suffix = '') => `var(${toVarName(key, suffix)}, ${value})`;
|
|
636
|
-
|
|
637
|
-
function themify(obj, vars, root = '') {
|
|
638
|
-
Object.keys(obj).forEach(key => {
|
|
639
|
-
if (key === 'modes') {
|
|
640
|
-
return;
|
|
641
|
-
}
|
|
642
|
-
|
|
643
|
-
const value = obj[key];
|
|
644
|
-
const varName = root.length > 0 ? `${root}-${key}` : `${key}`;
|
|
645
|
-
|
|
646
|
-
if (typeof value === 'object') {
|
|
647
|
-
obj[key] = themify(obj[key], vars, varName);
|
|
648
|
-
} else {
|
|
649
|
-
vars[toVarName(varName)] = value;
|
|
650
|
-
obj[key] = toVarValue(varName, value);
|
|
651
|
-
|
|
652
|
-
try {
|
|
653
|
-
const rgb = polished.parseToRgb(value);
|
|
654
|
-
vars[toVarName(varName, 'rgb')] = `${rgb.red},${rgb.green},${rgb.blue}`;
|
|
655
|
-
obj[key + '_rgb'] = toVarValue(varName, value, 'rgb');
|
|
656
|
-
} catch (err) {// do nothing
|
|
657
|
-
}
|
|
658
|
-
}
|
|
659
|
-
});
|
|
660
|
-
return obj;
|
|
661
|
-
}
|
|
662
|
-
|
|
663
|
-
function getTheme(theme) {
|
|
664
|
-
const colorModes = {
|
|
665
|
-
default: {}
|
|
666
|
-
};
|
|
667
|
-
const themeClone = JSON.parse(JSON.stringify(theme)); // default
|
|
668
|
-
|
|
669
|
-
themeClone.colors = themify(themeClone.colors, colorModes.default, ''); // other modes
|
|
670
|
-
|
|
671
|
-
Object.keys(themeClone.colors.modes).forEach(key => {
|
|
672
|
-
colorModes[key] = {};
|
|
673
|
-
themeClone.colors.modes[key] = themify(themeClone.colors.modes[key], colorModes[key], '');
|
|
557
|
+
theme: theme,
|
|
558
|
+
...props
|
|
674
559
|
});
|
|
675
|
-
|
|
676
|
-
theme: themeClone,
|
|
677
|
-
colorModes
|
|
678
|
-
};
|
|
679
|
-
}
|
|
560
|
+
});
|
|
680
561
|
|
|
681
562
|
const alpha = (colorString, alphaValue) => theme => {
|
|
682
563
|
const color = css.get(theme, 'colors.' + colorString, colorString);
|
|
@@ -689,11 +570,16 @@ const alpha = (colorString, alphaValue) => theme => {
|
|
|
689
570
|
const rgb = polished.parseToRgb(color);
|
|
690
571
|
return `rgba(${rgb.red},${rgb.green},${rgb.blue},${alphaValue})`;
|
|
691
572
|
};
|
|
573
|
+
function mixColor(baseColor, overlayColor, overlayOpacity) {
|
|
574
|
+
return theme => {
|
|
575
|
+
baseColor = css.get(theme, `colors.${baseColor}`, baseColor);
|
|
576
|
+
overlayColor = overlayOpacity ? alpha(overlayColor, overlayOpacity)(theme) : css.get(theme, `colors.${overlayColor}`, overlayColor);
|
|
577
|
+
return `linear-gradient(${overlayColor}, ${overlayColor}), ${baseColor}`;
|
|
578
|
+
};
|
|
579
|
+
}
|
|
692
580
|
function getColorOverlay(theme, baseColor, overlayColor, overlayOpacity) {
|
|
693
|
-
baseColor = css.get(theme, `colors.${baseColor}`) || baseColor;
|
|
694
|
-
overlayColor = alpha(overlayColor, overlayOpacity)(theme);
|
|
695
581
|
return {
|
|
696
|
-
background:
|
|
582
|
+
background: mixColor(baseColor, overlayColor, overlayOpacity)(theme)
|
|
697
583
|
};
|
|
698
584
|
}
|
|
699
585
|
function getBackgroundOverlay(theme, backgroundOverlay, overlayColor = 'on.surface') {
|
|
@@ -710,7 +596,8 @@ function getDarkThemeBackgroundOverlay(theme, backgroundOverlay, overlayColor =
|
|
|
710
596
|
}
|
|
711
597
|
|
|
712
598
|
return {
|
|
713
|
-
[`.${
|
|
599
|
+
[`.${dynamicTheme.DARK_SCHEME_CLASS} &, &.${dynamicTheme.DARK_SCHEME_CLASS}`]: { ...getBackgroundOverlay(theme, backgroundOverlay, overlayColor)
|
|
600
|
+
}
|
|
714
601
|
};
|
|
715
602
|
}
|
|
716
603
|
|
|
@@ -721,27 +608,30 @@ const Paper = /*#__PURE__*/react$1.forwardRef(function Paper(props, forwardedRef
|
|
|
721
608
|
backgroundOverlay,
|
|
722
609
|
darkThemeBackgroundOverlay,
|
|
723
610
|
__css = {},
|
|
724
|
-
children
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
611
|
+
children,
|
|
612
|
+
...otherProps
|
|
613
|
+
} = props;
|
|
728
614
|
const theme = useTheme();
|
|
729
|
-
return /*#__PURE__*/jsxRuntime.jsx(Box,
|
|
615
|
+
return /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
730
616
|
ref: forwardedRef,
|
|
731
|
-
__css:
|
|
617
|
+
__css: {
|
|
732
618
|
backgroundColor: 'surface',
|
|
733
619
|
boxShadow: String(elevation),
|
|
734
620
|
':focus': {
|
|
735
621
|
outline: 'none'
|
|
736
|
-
}
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
622
|
+
},
|
|
623
|
+
...(outlined ? {
|
|
624
|
+
borderStyle: 'solid',
|
|
625
|
+
borderWidth: "0.0625rem",
|
|
626
|
+
borderColor: alpha('on.surface', 0.12)
|
|
627
|
+
} : {}),
|
|
628
|
+
...(backgroundOverlay ? getBackgroundOverlay(theme, backgroundOverlay, 'primary') : {}),
|
|
629
|
+
...(darkThemeBackgroundOverlay ? getDarkThemeBackgroundOverlay(theme, darkThemeBackgroundOverlay, 'primary') : {}),
|
|
630
|
+
...__css
|
|
631
|
+
},
|
|
632
|
+
...otherProps,
|
|
743
633
|
children: children
|
|
744
|
-
})
|
|
634
|
+
});
|
|
745
635
|
});
|
|
746
636
|
|
|
747
637
|
const AppBar = /*#__PURE__*/react$1.forwardRef(function AppBar(props, forwardedRef) {
|
|
@@ -749,10 +639,9 @@ const AppBar = /*#__PURE__*/react$1.forwardRef(function AppBar(props, forwardedR
|
|
|
749
639
|
elevation: elevationProp = 'default',
|
|
750
640
|
variant: variantProp = 'default',
|
|
751
641
|
size = 'default',
|
|
752
|
-
__css = {}
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
642
|
+
__css = {},
|
|
643
|
+
...otherProps
|
|
644
|
+
} = props;
|
|
756
645
|
const [elevation, setElevation] = react$1.useState(elevationProp);
|
|
757
646
|
const theme = useTheme();
|
|
758
647
|
react$1.useEffect(() => {
|
|
@@ -780,38 +669,40 @@ const AppBar = /*#__PURE__*/react$1.forwardRef(function AppBar(props, forwardedR
|
|
|
780
669
|
variant: variantProp,
|
|
781
670
|
size
|
|
782
671
|
},
|
|
783
|
-
children: /*#__PURE__*/jsxRuntime.jsx(Paper,
|
|
672
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Paper, {
|
|
784
673
|
ref: forwardedRef,
|
|
785
674
|
theme: theme,
|
|
786
675
|
variant: "square",
|
|
787
676
|
backgroundOverlay: elevation === 'elevated' && variantProp === 'default' ? css.get(theme, `appbar.elevations.${elevation}.boxShadow`, 2) : 0,
|
|
788
677
|
color: variantProp === 'default' || variantProp === 'transparent' ? 'on.surface' : `on.${variantProp}`,
|
|
789
|
-
__css:
|
|
678
|
+
__css: {
|
|
790
679
|
boxSizing: 'border-box',
|
|
791
680
|
display: 'inline-flex',
|
|
792
681
|
alignItems: 'center',
|
|
793
682
|
width: '100%',
|
|
794
683
|
overflow: 'hidden',
|
|
795
|
-
transition:
|
|
796
|
-
|
|
797
|
-
|
|
684
|
+
transition: `box-shadow .28s ${EASING_STANDARD}`,
|
|
685
|
+
...css.get(theme, `appbar.sizes.${size}`),
|
|
686
|
+
...css.get(theme, `appbar.variants.${variantProp}`),
|
|
687
|
+
...__css
|
|
688
|
+
},
|
|
689
|
+
...otherProps
|
|
690
|
+
})
|
|
798
691
|
});
|
|
799
692
|
});
|
|
800
693
|
|
|
801
694
|
const BaseButton = /*#__PURE__*/react$1.forwardRef((props, ref) => {
|
|
802
695
|
const theme = react.useTheme();
|
|
803
|
-
|
|
804
696
|
const {
|
|
805
697
|
__css,
|
|
806
698
|
variant: variantProp,
|
|
807
|
-
elevation
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
return /*#__PURE__*/jsxRuntime.jsx(Box, _extends__default['default']({
|
|
699
|
+
elevation,
|
|
700
|
+
...otherProps
|
|
701
|
+
} = props;
|
|
702
|
+
return /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
812
703
|
as: "button",
|
|
813
704
|
ref: ref,
|
|
814
|
-
__css:
|
|
705
|
+
__css: {
|
|
815
706
|
boxSizing: 'border-box',
|
|
816
707
|
position: 'relative',
|
|
817
708
|
appearance: 'none',
|
|
@@ -828,32 +719,37 @@ const BaseButton = /*#__PURE__*/react$1.forwardRef((props, ref) => {
|
|
|
828
719
|
touchAction: 'manipulation',
|
|
829
720
|
userSelect: 'none',
|
|
830
721
|
minWidth: 'auto',
|
|
722
|
+
whiteSpace: 'nowrap',
|
|
831
723
|
'&::-moz-focus-inner': {
|
|
832
724
|
border: 0
|
|
833
|
-
}
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
725
|
+
},
|
|
726
|
+
...styledSystem.variant({
|
|
727
|
+
scale: 'buttons.variants',
|
|
728
|
+
prop: 'variant',
|
|
729
|
+
variants: {
|
|
730
|
+
text: {}
|
|
731
|
+
}
|
|
732
|
+
})({
|
|
733
|
+
variant: variantProp,
|
|
734
|
+
theme
|
|
735
|
+
}),
|
|
736
|
+
...styledSystem.variant({
|
|
737
|
+
scale: 'buttons.elevations',
|
|
738
|
+
prop: 'elevation',
|
|
739
|
+
variants: {
|
|
740
|
+
none: {}
|
|
741
|
+
}
|
|
742
|
+
})({
|
|
743
|
+
elevation,
|
|
744
|
+
theme
|
|
745
|
+
}),
|
|
746
|
+
...__css
|
|
747
|
+
},
|
|
748
|
+
...otherProps
|
|
749
|
+
});
|
|
854
750
|
});
|
|
855
751
|
|
|
856
|
-
const TransparentButton = /*#__PURE__*/_styled__default[
|
|
752
|
+
const TransparentButton = /*#__PURE__*/_styled__default["default"](BaseButton, process.env.NODE_ENV === "production" ? {
|
|
857
753
|
target: "e18rm4q20"
|
|
858
754
|
} : {
|
|
859
755
|
target: "e18rm4q20",
|
|
@@ -907,7 +803,7 @@ function getRippleProperties$3(theme) {
|
|
|
907
803
|
};
|
|
908
804
|
}
|
|
909
805
|
|
|
910
|
-
const FilledButton = /*#__PURE__*/_styled__default[
|
|
806
|
+
const FilledButton = /*#__PURE__*/_styled__default["default"](BaseButton, process.env.NODE_ENV === "production" ? {
|
|
911
807
|
target: "ex8w9nt0"
|
|
912
808
|
} : {
|
|
913
809
|
target: "ex8w9nt0",
|
|
@@ -931,10 +827,10 @@ const FilledButton = /*#__PURE__*/_styled__default['default'](BaseButton, proces
|
|
|
931
827
|
outlineOffset: '2px'
|
|
932
828
|
}
|
|
933
829
|
}), ({
|
|
934
|
-
color = 'primary'
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
})
|
|
830
|
+
color = 'primary'
|
|
831
|
+
}) => color === 'surface' && css.css({
|
|
832
|
+
background: mixColor('surface', 'primary', 0.05)
|
|
833
|
+
}), ({
|
|
938
834
|
color = 'primary',
|
|
939
835
|
theme,
|
|
940
836
|
isGroupedButton = false
|
|
@@ -960,7 +856,7 @@ const FilledButton = /*#__PURE__*/_styled__default['default'](BaseButton, proces
|
|
|
960
856
|
borderLeftWidth: 0
|
|
961
857
|
}
|
|
962
858
|
}
|
|
963
|
-
}, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
859
|
+
}, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkZpbGxlZEJ1dHRvbi50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBUTRCIiwiZmlsZSI6IkZpbGxlZEJ1dHRvbi50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5pbXBvcnQgeyByZWFkYWJsZUNvbG9yLCByZW0gfSBmcm9tICdwb2xpc2hlZCc7XG5pbXBvcnQgeyBnZXQsIGNzcyB9IGZyb20gJ0BzdHlsZWQtc3lzdGVtL2Nzcyc7XG5cbmltcG9ydCB7IEJhc2VCdXR0b24gfSBmcm9tICcuL0Jhc2VCdXR0b24nO1xuaW1wb3J0IHR5cGUgeyBUaGVtZSB9IGZyb20gJy4uL3RoZW1lJztcbmltcG9ydCB7IGFscGhhLCBtaXhDb2xvciB9IGZyb20gJy4uL2NvbG9yJztcblxuZXhwb3J0IGNvbnN0IEZpbGxlZEJ1dHRvbiA9IHN0eWxlZChCYXNlQnV0dG9uKShcbiAgKHsgY29sb3IgPSAncHJpbWFyeScsIHRoZW1lIH0pID0+XG4gICAgY3NzKHtcbiAgICAgIGJhY2tncm91bmRDb2xvcjogZ2V0KHRoZW1lLCBgY29sb3JzLiR7U3RyaW5nKGNvbG9yKX1gKSB8fCBjb2xvcixcbiAgICAgIGNvbG9yOlxuICAgICAgICBnZXQodGhlbWUsIGBjb2xvcnMub24uJHtTdHJpbmcoY29sb3IpfWApIHx8XG4gICAgICAgICh0eXBlb2YgY29sb3IgPT09ICdzdHJpbmcnID8gcmVhZGFibGVDb2xvcihjb2xvcikgOiB1bmRlZmluZWQpLFxuICAgICAgJyY6ZGlzYWJsZWQnOiB7XG4gICAgICAgIGNvbG9yOiBhbHBoYSgnb24uc3VyZmFjZScsIDAuMzgpLFxuICAgICAgICBiYWNrZ3JvdW5kOiBgbGluZWFyLWdyYWRpZW50KCR7Z2V0KHRoZW1lLCAnY29sb3JzLnN1cmZhY2UnKX0sICR7Z2V0KFxuICAgICAgICAgIHRoZW1lLFxuICAgICAgICAgICdjb2xvcnMuc3VyZmFjZSdcbiAgICAgICAgKX0pLCAke2FscGhhKCdvbi5zdXJmYWNlJywgMC4xMikodGhlbWUpfWAsXG4gICAgICAgIGJhY2tncm91bmRCbGVuZE1vZGU6ICdvdmVybGF5JyxcbiAgICAgICAgY3Vyc29yOiAnZGVmYXVsdCcsXG4gICAgICB9LFxuICAgICAgJyY6Zm9jdXMtdmlzaWJsZSc6IHtcbiAgICAgICAgb3V0bGluZUNvbG9yOiBnZXQodGhlbWUsIGBjb2xvcnMuJHtTdHJpbmcoY29sb3IpfWApIHx8IGNvbG9yLFxuICAgICAgICBvdXRsaW5lV2lkdGg6IDIsXG4gICAgICAgIG91dGxpbmVTdHlsZTogJ2F1dG8nLFxuICAgICAgICBvdXRsaW5lT2Zmc2V0OiAnMnB4JyxcbiAgICAgIH0sXG4gICAgfSksXG4gICh7IGNvbG9yID0gJ3ByaW1hcnknIH0pID0+XG4gICAgY29sb3IgPT09ICdzdXJmYWNlJyAmJlxuICAgIGNzcyh7IGJhY2tncm91bmQ6IG1peENvbG9yKCdzdXJmYWNlJywgJ3ByaW1hcnknLCAwLjA1KSB9KSxcbiAgKHsgY29sb3IgPSAncHJpbWFyeScsIHRoZW1lLCBpc0dyb3VwZWRCdXR0b24gPSBmYWxzZSB9KSA9PlxuICAgIGlzR3JvdXBlZEJ1dHRvbiAmJiB7XG4gICAgICAnW2RhdGEtYnV0dG9uLWdyb3VwPVwiXCJdICYnOiB7XG4gICAgICAgIGJvcmRlckNvbG9yOlxuICAgICAgICAgIGdldCh0aGVtZSwgYGNvbG9ycy5vbi4ke1N0cmluZyhjb2xvcil9YCkgfHxcbiAgICAgICAgICAodHlwZW9mIGNvbG9yID09PSAnc3RyaW5nJyA/IHJlYWRhYmxlQ29sb3IoY29sb3IpIDogdW5kZWZpbmVkKSxcbiAgICAgICAgJzpmaXJzdC1vZi10eXBlJzoge1xuICAgICAgICAgIGJvcmRlclRvcFJpZ2h0UmFkaXVzOiAwLFxuICAgICAgICAgIGJvcmRlckJvdHRvbVJpZ2h0UmFkaXVzOiAwLFxuICAgICAgICAgIGJvcmRlclJpZ2h0U3R5bGU6ICdzb2xpZCcsXG4gICAgICAgICAgYm9yZGVyUmlnaHRXaWR0aDogcmVtKDEpLFxuICAgICAgICB9LFxuICAgICAgICAnOm5vdCg6Zmlyc3Qtb2YtdHlwZSk6bm90KDpsYXN0LW9mLXR5cGUpJzoge1xuICAgICAgICAgIGJvcmRlclJhZGl1czogMCxcbiAgICAgICAgfSxcbiAgICAgICAgJzpsYXN0LW9mLXR5cGUnOiB7XG4gICAgICAgICAgYm9yZGVyVG9wTGVmdFJhZGl1czogMCxcbiAgICAgICAgICBib3JkZXJCb3R0b21MZWZ0UmFkaXVzOiAwLFxuICAgICAgICAgIGJvcmRlckxlZnRTdHlsZTogJ3NvbGlkJyxcbiAgICAgICAgICBib3JkZXJMZWZ0V2lkdGg6IHJlbSgxKSxcbiAgICAgICAgfSxcbiAgICAgICAgJzpsYXN0LW9mLXR5cGU6bnRoLW9mLXR5cGUoMiknOiB7XG4gICAgICAgICAgYm9yZGVyTGVmdFdpZHRoOiAwLFxuICAgICAgICB9LFxuICAgICAgfSxcbiAgICB9XG4pO1xuXG5leHBvcnQgZnVuY3Rpb24gZ2V0UmlwcGxlUHJvcGVydGllcyh0aGVtZTogVGhlbWUpIHtcbiAgcmV0dXJuIHtcbiAgICBob3Zlck9wYWNpdHk6IGdldCh0aGVtZSwgYGJ1dHRvbnMub3ZlcmxheXMuZmlsbGVkLmhvdmVyLm9wYWNpdHlgKSxcbiAgICBmb2N1c09wYWNpdHk6IGdldCh0aGVtZSwgYGJ1dHRvbnMub3ZlcmxheXMuZmlsbGVkLmZvY3VzLm9wYWNpdHlgKSxcbiAgICBwcmVzc2VkT3BhY2l0eTogZ2V0KHRoZW1lLCBgYnV0dG9ucy5vdmVybGF5cy5maWxsZWQucHJlc3NlZC5vcGFjaXR5YCksXG4gICAgcmlwcGxlRW5hYmxlZDogZmFsc2UsXG4gIH07XG59XG4iXX0= */");
|
|
964
860
|
function getRippleProperties$2(theme) {
|
|
965
861
|
return {
|
|
966
862
|
hoverOpacity: css.get(theme, `buttons.overlays.filled.hover.opacity`),
|
|
@@ -971,12 +867,12 @@ function getRippleProperties$2(theme) {
|
|
|
971
867
|
}
|
|
972
868
|
|
|
973
869
|
function getRippleProperties$1(theme) {
|
|
974
|
-
return
|
|
870
|
+
return { ...getRippleProperties$2(theme),
|
|
975
871
|
rippleEnabled: true
|
|
976
|
-
}
|
|
872
|
+
};
|
|
977
873
|
}
|
|
978
874
|
|
|
979
|
-
const OutlinedButton = /*#__PURE__*/_styled__default[
|
|
875
|
+
const OutlinedButton = /*#__PURE__*/_styled__default["default"](TransparentButton, process.env.NODE_ENV === "production" ? {
|
|
980
876
|
target: "eo0fwlz0"
|
|
981
877
|
} : {
|
|
982
878
|
target: "eo0fwlz0",
|
|
@@ -1023,19 +919,19 @@ const OutlinedButton = /*#__PURE__*/_styled__default['default'](TransparentButto
|
|
|
1023
919
|
}, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIk91dGxpbmVkQnV0dG9uLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFPOEIiLCJmaWxlIjoiT3V0bGluZWRCdXR0b24udHN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQHN0eWxlZC1zeXN0ZW0vY3NzJztcbmltcG9ydCB7IHJlbSB9IGZyb20gJ3BvbGlzaGVkJztcblxuaW1wb3J0IHsgYWxwaGEgfSBmcm9tICcuLi9jb2xvcic7XG5pbXBvcnQgeyBUcmFuc3BhcmVudEJ1dHRvbiB9IGZyb20gJy4vVHJhbnNwYXJlbnRCdXR0b24nO1xuXG5leHBvcnQgY29uc3QgT3V0bGluZWRCdXR0b24gPSBzdHlsZWQoVHJhbnNwYXJlbnRCdXR0b24pKFxuICBjc3Moe1xuICAgIGJvcmRlclN0eWxlOiAnc29saWQnLFxuICAgIGJvcmRlcldpZHRoOiByZW0oMSksXG4gICAgYm9yZGVyQ29sb3I6ICdvdXRsaW5lJyxcbiAgICBib3hTaGFkb3c6IDAsXG4gICAgJyY6Zm9jdXMsOiZhY3RpdmUsOiZob3Zlcic6IHsgYm94U2hhZG93OiAwIH0sXG4gICAgJyY6Zm9jdXMtdmlzaWJsZSwmOmFjdGl2ZSc6IHtcbiAgICAgIGJvcmRlckNvbG9yOiAnY3VycmVudENvbG9yJyxcbiAgICB9LFxuICAgICcmOmRpc2FibGVkJzoge1xuICAgICAgY29sb3I6IGFscGhhKCdvbi5zdXJmYWNlJywgMC4zOCksXG4gICAgICBib3JkZXJDb2xvcjogYWxwaGEoJ29uLnN1cmZhY2UnLCAwLjEyKSxcbiAgICAgIGN1cnNvcjogJ2RlZmF1bHQnLFxuICAgIH0sXG4gIH0pLFxuICAoeyBpc0dyb3VwZWRCdXR0b24gPSBmYWxzZSB9KSA9PlxuICAgIGlzR3JvdXBlZEJ1dHRvbiAmJiB7XG4gICAgICAnW2RhdGEtYnV0dG9uLWdyb3VwPVwiXCJdICYnOiB7XG4gICAgICAgICc6Zmlyc3Qtb2YtdHlwZSc6IHtcbiAgICAgICAgICBib3JkZXJUb3BSaWdodFJhZGl1czogMCxcbiAgICAgICAgICBib3JkZXJCb3R0b21SaWdodFJhZGl1czogMCxcbiAgICAgICAgfSxcbiAgICAgICAgJzpub3QoOmZpcnN0LW9mLXR5cGUpOm5vdCg6bGFzdC1vZi10eXBlKSc6IHtcbiAgICAgICAgICBib3JkZXJSYWRpdXM6IDAsXG4gICAgICAgICAgYm9yZGVyUmlnaHRXaWR0aDogMCxcbiAgICAgICAgICBib3JkZXJMZWZ0V2lkdGg6IDAsXG4gICAgICAgIH0sXG4gICAgICAgICc6bGFzdC1vZi10eXBlJzoge1xuICAgICAgICAgIGJvcmRlclRvcExlZnRSYWRpdXM6IDAsXG4gICAgICAgICAgYm9yZGVyQm90dG9tTGVmdFJhZGl1czogMCxcbiAgICAgICAgICBib3JkZXJMZWZ0U3R5bGU6ICdzb2xpZCcsXG4gICAgICAgICAgYm9yZGVyTGVmdFdpZHRoOiByZW0oMSksXG4gICAgICAgIH0sXG4gICAgICAgICc6bGFzdC1vZi10eXBlOm50aC1vZi10eXBlKDIpJzoge1xuICAgICAgICAgIGJvcmRlckxlZnRXaWR0aDogMCxcbiAgICAgICAgfSxcbiAgICAgIH0sXG4gICAgfVxuKTtcbiJdfQ== */");
|
|
1024
920
|
|
|
1025
921
|
function getRippleProperties(theme) {
|
|
1026
|
-
return
|
|
922
|
+
return { ...getRippleProperties$2(theme),
|
|
1027
923
|
center: true,
|
|
1028
924
|
rippleEnabled: true
|
|
1029
|
-
}
|
|
925
|
+
};
|
|
1030
926
|
}
|
|
1031
927
|
|
|
1032
|
-
const RIPPLE_BACKGROUND_COLOR = `--css-${hash__default[
|
|
1033
|
-
const RIPPLE_TRANSLATE_START = `--css-${hash__default[
|
|
1034
|
-
const RIPPLE_TRANSLATE_END = `--css-${hash__default[
|
|
1035
|
-
const RIPPLE_SCALE_END = `--css-${hash__default[
|
|
1036
|
-
const RIPPLE_OPACITY_END = `--css-${hash__default[
|
|
1037
|
-
const RIPPLE_SIZE = `--css-${hash__default[
|
|
1038
|
-
const RIPPLE_POSITION = `--css-${hash__default[
|
|
928
|
+
const RIPPLE_BACKGROUND_COLOR = `--css-${hash__default["default"]('basic-ui-ripple-fg-bg-color')}`;
|
|
929
|
+
const RIPPLE_TRANSLATE_START = `--css-${hash__default["default"]('basic-ui-ripple-fg-translate-start')}`;
|
|
930
|
+
const RIPPLE_TRANSLATE_END = `--css-${hash__default["default"]('basic-ui-ripple-fg-translate-end')}`;
|
|
931
|
+
const RIPPLE_SCALE_END = `--css-${hash__default["default"]('basic-ui-ripple-fg-scale')}`;
|
|
932
|
+
const RIPPLE_OPACITY_END = `--css-${hash__default["default"]('basic-ui-ripple-fg-opacity')}`;
|
|
933
|
+
const RIPPLE_SIZE = `--css-${hash__default["default"]('basic-ui-ripple-fg-size')}`;
|
|
934
|
+
const RIPPLE_POSITION = `--css-${hash__default["default"]('basic-ui-ripple-fg-position')}`;
|
|
1039
935
|
|
|
1040
936
|
const rippleStyle = ({
|
|
1041
937
|
animation
|
|
@@ -1055,7 +951,7 @@ const rippleStyle = ({
|
|
|
1055
951
|
animation,
|
|
1056
952
|
willChange: 'opacity,transform'
|
|
1057
953
|
});
|
|
1058
|
-
const Ripple = _styled__default[
|
|
954
|
+
const Ripple = _styled__default["default"]("div", process.env.NODE_ENV === "production" ? {
|
|
1059
955
|
target: "ebk8cct0"
|
|
1060
956
|
} : {
|
|
1061
957
|
target: "ebk8cct0",
|
|
@@ -1129,9 +1025,11 @@ function calculateRipplePosition(rect, clientX, clientY, center = false) {
|
|
|
1129
1025
|
x: clientX - rect.left,
|
|
1130
1026
|
y: clientY - rect.top
|
|
1131
1027
|
};
|
|
1132
|
-
return
|
|
1133
|
-
state: 'entering'
|
|
1134
|
-
|
|
1028
|
+
return {
|
|
1029
|
+
state: 'entering',
|
|
1030
|
+
...rippleStart,
|
|
1031
|
+
...getScale(rect)
|
|
1032
|
+
};
|
|
1135
1033
|
}
|
|
1136
1034
|
|
|
1137
1035
|
const useRipple = opts => {
|
|
@@ -1161,19 +1059,22 @@ const useRipple = opts => {
|
|
|
1161
1059
|
|
|
1162
1060
|
const setLeft = () => {
|
|
1163
1061
|
rippleState.current = 'left';
|
|
1164
|
-
setRipple(
|
|
1062
|
+
setRipple({ ...defaultRipple
|
|
1063
|
+
});
|
|
1165
1064
|
};
|
|
1166
1065
|
|
|
1167
1066
|
const setLeaving = () => {
|
|
1168
1067
|
clearTimeout(enteringTimeout.current);
|
|
1169
1068
|
rippleState.current = 'leaving';
|
|
1170
|
-
setRipple(ripple =>
|
|
1069
|
+
setRipple(ripple => ({ ...ripple
|
|
1070
|
+
}));
|
|
1171
1071
|
leavingTimeout.current = window.setTimeout(setLeft, leaveDuration);
|
|
1172
1072
|
};
|
|
1173
1073
|
|
|
1174
1074
|
const setEntered = () => {
|
|
1175
1075
|
rippleState.current = 'entered';
|
|
1176
|
-
setRipple(ripple =>
|
|
1076
|
+
setRipple(ripple => ({ ...ripple
|
|
1077
|
+
}));
|
|
1177
1078
|
|
|
1178
1079
|
if (shouldLeave.current) {
|
|
1179
1080
|
setLeaving();
|
|
@@ -1193,7 +1094,8 @@ const useRipple = opts => {
|
|
|
1193
1094
|
clearTimeout(enteringTimeout.current);
|
|
1194
1095
|
shouldLeave.current = false;
|
|
1195
1096
|
rippleState.current = 'restart';
|
|
1196
|
-
setRipple(
|
|
1097
|
+
setRipple({ ...defaultRipple
|
|
1098
|
+
});
|
|
1197
1099
|
restartTimeout.current = requestAnimationFrame(() => {
|
|
1198
1100
|
rippleState.current = 'entering';
|
|
1199
1101
|
setRipple(calculateRipplePosition(rect, clientX, clientY, center));
|
|
@@ -1247,13 +1149,11 @@ const disabledHandler = () => {
|
|
|
1247
1149
|
};
|
|
1248
1150
|
|
|
1249
1151
|
function useRippleHandlers(opts) {
|
|
1250
|
-
const
|
|
1251
|
-
{
|
|
1152
|
+
const {
|
|
1252
1153
|
activate,
|
|
1253
|
-
deactivate
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1154
|
+
deactivate,
|
|
1155
|
+
...rest
|
|
1156
|
+
} = useRipple(opts); // Pointer activation
|
|
1257
1157
|
|
|
1258
1158
|
const handlePointerUp = () => {
|
|
1259
1159
|
window.removeEventListener('pointerup', handlePointerUp);
|
|
@@ -1292,31 +1192,32 @@ function useRippleHandlers(opts) {
|
|
|
1292
1192
|
window.addEventListener('keyup', handleKeyUp);
|
|
1293
1193
|
};
|
|
1294
1194
|
|
|
1295
|
-
return
|
|
1195
|
+
return {
|
|
1296
1196
|
handleKeyDown: opts.disabled ? disabledHandler : handleKeyDown,
|
|
1297
|
-
handlePointerDown: opts.disabled ? disabledHandler : handlePointerDown
|
|
1298
|
-
|
|
1197
|
+
handlePointerDown: opts.disabled ? disabledHandler : handlePointerDown,
|
|
1198
|
+
...rest
|
|
1199
|
+
};
|
|
1299
1200
|
}
|
|
1300
1201
|
|
|
1301
|
-
function useRippleSurface(opts) {
|
|
1202
|
+
function useRippleSurface(opts = {}) {
|
|
1302
1203
|
let {
|
|
1303
1204
|
// eslint-disable-next-line prefer-const
|
|
1304
1205
|
baseOpacity = 0,
|
|
1305
1206
|
hoverOpacity = 0.04,
|
|
1306
1207
|
focusOpacity = 0.12,
|
|
1307
1208
|
pressedOpacity = 0.12,
|
|
1308
|
-
rippleColor = 'on.surface'
|
|
1209
|
+
rippleColor = 'on.surface',
|
|
1210
|
+
// eslint-disable-next-line prefer-const
|
|
1211
|
+
mouseFocus = false
|
|
1309
1212
|
} = opts;
|
|
1310
|
-
|
|
1311
1213
|
const {
|
|
1312
1214
|
onKeyDown,
|
|
1313
1215
|
onPointerDown,
|
|
1314
1216
|
style = {},
|
|
1315
1217
|
disabled,
|
|
1316
|
-
rippleEnabled = true
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1218
|
+
rippleEnabled = true,
|
|
1219
|
+
...rippleProps
|
|
1220
|
+
} = opts;
|
|
1320
1221
|
const theme = useTheme();
|
|
1321
1222
|
rippleColor = css.get(theme, `colors.${rippleColor}`) || rippleColor;
|
|
1322
1223
|
|
|
@@ -1331,13 +1232,14 @@ function useRippleSurface(opts) {
|
|
|
1331
1232
|
handlePointerDown,
|
|
1332
1233
|
style: animationStyle,
|
|
1333
1234
|
animation
|
|
1334
|
-
} = useRippleHandlers(
|
|
1235
|
+
} = useRippleHandlers({
|
|
1335
1236
|
opacity: Number(pressedOpacity),
|
|
1336
1237
|
backgroundColor: rippleColor,
|
|
1337
|
-
disabled
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
const
|
|
1238
|
+
disabled,
|
|
1239
|
+
...rippleProps
|
|
1240
|
+
});
|
|
1241
|
+
const focusPseudoClass = mouseFocus ? 'focus' : 'focus-visible';
|
|
1242
|
+
const css$1 = react$1.useMemo(() => ({
|
|
1341
1243
|
overflow: 'hidden',
|
|
1342
1244
|
position: 'relative',
|
|
1343
1245
|
cursor: 'pointer',
|
|
@@ -1362,42 +1264,46 @@ function useRippleSurface(opts) {
|
|
|
1362
1264
|
'&:hover::before': {
|
|
1363
1265
|
opacity: hoverOpacity
|
|
1364
1266
|
},
|
|
1365
|
-
|
|
1267
|
+
[`&:${focusPseudoClass}::before`]: {
|
|
1366
1268
|
opacity: focusOpacity
|
|
1367
|
-
}
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1269
|
+
},
|
|
1270
|
+
...(!rippleEnabled && {
|
|
1271
|
+
'&:active::before': {
|
|
1272
|
+
opacity: pressedOpacity
|
|
1273
|
+
}
|
|
1274
|
+
}),
|
|
1373
1275
|
'&[aria-pressed="true"]::before': {
|
|
1374
1276
|
opacity: baseOpacity + pressedOpacity
|
|
1375
1277
|
},
|
|
1376
1278
|
'&[aria-pressed="true"]:hover::before': {
|
|
1377
1279
|
opacity: pressedOpacity + hoverOpacity
|
|
1378
1280
|
},
|
|
1379
|
-
|
|
1281
|
+
[`&[aria-pressed="true"]:${focusPseudoClass}::before`]: {
|
|
1380
1282
|
opacity: pressedOpacity + focusOpacity
|
|
1381
|
-
}
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1283
|
+
},
|
|
1284
|
+
...(!rippleEnabled && {
|
|
1285
|
+
'&[aria-pressed="true"]:active::before': {
|
|
1286
|
+
opacity: pressedOpacity + pressedOpacity
|
|
1287
|
+
}
|
|
1288
|
+
}),
|
|
1387
1289
|
['&: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']: {
|
|
1388
1290
|
opacity: 0
|
|
1389
1291
|
},
|
|
1390
1292
|
'&:disabled,&[data-disabled]': {
|
|
1391
1293
|
cursor: 'default'
|
|
1392
|
-
}
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1294
|
+
},
|
|
1295
|
+
// ripple
|
|
1296
|
+
...(rippleEnabled && {
|
|
1297
|
+
'&::after': { ...rippleStyle({
|
|
1298
|
+
animation
|
|
1299
|
+
})
|
|
1300
|
+
}
|
|
1301
|
+
})
|
|
1302
|
+
}), [animation, baseOpacity, focusOpacity, focusPseudoClass, hoverOpacity, pressedOpacity, rippleColor, rippleEnabled]);
|
|
1399
1303
|
return {
|
|
1400
|
-
style:
|
|
1304
|
+
style: { ...animationStyle,
|
|
1305
|
+
...style
|
|
1306
|
+
},
|
|
1401
1307
|
onKeyDown: core.wrapEvent(onKeyDown, handleKeyDown),
|
|
1402
1308
|
onPointerDown: core.wrapEvent(onPointerDown, handlePointerDown),
|
|
1403
1309
|
__css: css$1
|
|
@@ -1408,23 +1314,46 @@ const RippleBox = /*#__PURE__*/react$1.forwardRef(function RippleBox(props, forw
|
|
|
1408
1314
|
const {
|
|
1409
1315
|
as = 'div',
|
|
1410
1316
|
__css,
|
|
1317
|
+
// Cherry picking the ripple props to prevent it from falling down to
|
|
1318
|
+
// the Box component
|
|
1319
|
+
onKeyDown,
|
|
1411
1320
|
// eslint-disable-line @typescript-eslint/no-unused-vars
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1321
|
+
onPointerDown,
|
|
1322
|
+
// eslint-disable-line @typescript-eslint/no-unused-vars
|
|
1323
|
+
baseOpacity,
|
|
1324
|
+
// eslint-disable-line @typescript-eslint/no-unused-vars
|
|
1325
|
+
hoverOpacity,
|
|
1326
|
+
// eslint-disable-line @typescript-eslint/no-unused-vars
|
|
1327
|
+
focusOpacity,
|
|
1328
|
+
// eslint-disable-line @typescript-eslint/no-unused-vars
|
|
1329
|
+
pressedOpacity,
|
|
1330
|
+
// eslint-disable-line @typescript-eslint/no-unused-vars
|
|
1331
|
+
rippleColor,
|
|
1332
|
+
// eslint-disable-line @typescript-eslint/no-unused-vars
|
|
1333
|
+
center,
|
|
1334
|
+
// eslint-disable-line @typescript-eslint/no-unused-vars
|
|
1335
|
+
disabled,
|
|
1336
|
+
// eslint-disable-line @typescript-eslint/no-unused-vars
|
|
1337
|
+
rippleEnabled,
|
|
1338
|
+
// eslint-disable-line @typescript-eslint/no-unused-vars
|
|
1339
|
+
style,
|
|
1340
|
+
// eslint-disable-line @typescript-eslint/no-unused-vars
|
|
1341
|
+
...otherProps
|
|
1342
|
+
} = props;
|
|
1343
|
+
const {
|
|
1344
|
+
__css: rippleCss,
|
|
1345
|
+
...rippleProps
|
|
1346
|
+
} = useRippleSurface(props);
|
|
1347
|
+
return /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
1423
1348
|
as: as,
|
|
1424
1349
|
ref: forwardedRef,
|
|
1425
|
-
__css:
|
|
1426
|
-
|
|
1427
|
-
|
|
1350
|
+
__css: { ...rippleCss,
|
|
1351
|
+
...__css
|
|
1352
|
+
},
|
|
1353
|
+
disabled,
|
|
1354
|
+
...otherProps,
|
|
1355
|
+
...rippleProps
|
|
1356
|
+
});
|
|
1428
1357
|
});
|
|
1429
1358
|
|
|
1430
1359
|
const ButtonGroupContext = /*#__PURE__*/react$1.createContext(null);
|
|
@@ -1462,30 +1391,28 @@ function getFallbackElevation(variant = 'text') {
|
|
|
1462
1391
|
|
|
1463
1392
|
const Button = /*#__PURE__*/react$1.forwardRef(function Button(props, forwardedRef) {
|
|
1464
1393
|
const buttonGroup = useButtonGroupContext();
|
|
1465
|
-
|
|
1466
1394
|
const {
|
|
1467
1395
|
children,
|
|
1468
|
-
variant =
|
|
1396
|
+
variant = buttonGroup?.variant || 'text',
|
|
1469
1397
|
onPointerDown: onPointerDownProp,
|
|
1470
1398
|
onKeyDown: onKeyDownProp,
|
|
1471
1399
|
color = 'primary',
|
|
1472
1400
|
disabled = false,
|
|
1473
1401
|
elevation = getFallbackElevation(props.variant),
|
|
1474
|
-
style: styleProp
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1402
|
+
style: styleProp,
|
|
1403
|
+
...otherProps
|
|
1404
|
+
} = props;
|
|
1478
1405
|
const theme = useTheme();
|
|
1479
1406
|
const Comp = componentMapping[variant];
|
|
1480
1407
|
const getRippleProperties = rippleMapping[variant];
|
|
1481
|
-
const rippleProps = useRippleSurface(
|
|
1408
|
+
const rippleProps = useRippleSurface({ ...getRippleProperties(theme),
|
|
1482
1409
|
rippleColor: 'currentColor',
|
|
1483
1410
|
disabled,
|
|
1484
1411
|
style: styleProp,
|
|
1485
1412
|
onKeyDown: onKeyDownProp,
|
|
1486
1413
|
onPointerDown: onPointerDownProp
|
|
1487
|
-
})
|
|
1488
|
-
return /*#__PURE__*/jsxRuntime.jsx(Comp,
|
|
1414
|
+
});
|
|
1415
|
+
return /*#__PURE__*/jsxRuntime.jsx(Comp, {
|
|
1489
1416
|
ref: forwardedRef,
|
|
1490
1417
|
variant: variant,
|
|
1491
1418
|
theme: theme,
|
|
@@ -1493,49 +1420,50 @@ const Button = /*#__PURE__*/react$1.forwardRef(function Button(props, forwardedR
|
|
|
1493
1420
|
"aria-disabled": disabled ? 'true' : undefined,
|
|
1494
1421
|
color: color,
|
|
1495
1422
|
elevation: elevation,
|
|
1496
|
-
isGroupedButton: Boolean(buttonGroup)
|
|
1497
|
-
|
|
1423
|
+
isGroupedButton: Boolean(buttonGroup),
|
|
1424
|
+
...rippleProps,
|
|
1425
|
+
...otherProps,
|
|
1498
1426
|
children: children
|
|
1499
|
-
})
|
|
1427
|
+
});
|
|
1500
1428
|
});
|
|
1501
1429
|
|
|
1502
1430
|
const ButtonGroup = /*#__PURE__*/react$1.forwardRef(function ButtonGroup(props, forwardedRef) {
|
|
1503
1431
|
const {
|
|
1504
1432
|
as: Comp = 'div',
|
|
1505
1433
|
variant = 'text',
|
|
1506
|
-
direction = 'row'
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1434
|
+
direction = 'row',
|
|
1435
|
+
...otherProps
|
|
1436
|
+
} = props;
|
|
1510
1437
|
const value = react$1.useMemo(() => ({
|
|
1511
1438
|
direction,
|
|
1512
1439
|
variant
|
|
1513
1440
|
}), [direction, variant]);
|
|
1514
1441
|
return /*#__PURE__*/jsxRuntime.jsx(ButtonGroupContext.Provider, {
|
|
1515
1442
|
value: value,
|
|
1516
|
-
children: /*#__PURE__*/jsxRuntime.jsx(Comp,
|
|
1443
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Comp, {
|
|
1517
1444
|
ref: forwardedRef,
|
|
1518
1445
|
role: "group",
|
|
1519
1446
|
"data-button-group": "",
|
|
1520
|
-
"data-button-group-direction": direction
|
|
1521
|
-
|
|
1447
|
+
"data-button-group-direction": direction,
|
|
1448
|
+
...otherProps
|
|
1449
|
+
})
|
|
1522
1450
|
});
|
|
1523
1451
|
});
|
|
1524
1452
|
|
|
1525
1453
|
const AppBarButton = /*#__PURE__*/react$1.forwardRef(function AppBarButton(props, forwardedRef) {
|
|
1526
1454
|
const {
|
|
1527
|
-
variant = 'icon'
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1455
|
+
variant = 'icon',
|
|
1456
|
+
...otherProps
|
|
1457
|
+
} = props;
|
|
1531
1458
|
const {
|
|
1532
1459
|
variant: appbarVariant
|
|
1533
1460
|
} = useAppBarContext();
|
|
1534
|
-
return /*#__PURE__*/jsxRuntime.jsx(Button,
|
|
1461
|
+
return /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
1535
1462
|
ref: forwardedRef,
|
|
1536
1463
|
variant: variant,
|
|
1537
|
-
color: appbarVariant === 'default' ? 'on.surface' : `on.${appbarVariant}
|
|
1538
|
-
|
|
1464
|
+
color: appbarVariant === 'default' ? 'on.surface' : `on.${appbarVariant}`,
|
|
1465
|
+
...otherProps
|
|
1466
|
+
});
|
|
1539
1467
|
});
|
|
1540
1468
|
|
|
1541
1469
|
const mappings = {
|
|
@@ -1556,56 +1484,58 @@ const mappings = {
|
|
|
1556
1484
|
const Text = /*#__PURE__*/react$1.forwardRef(function Text(props, forwardedRef) {
|
|
1557
1485
|
const {
|
|
1558
1486
|
as,
|
|
1559
|
-
variant = '
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1487
|
+
variant = 'body-medium',
|
|
1488
|
+
...otherProps
|
|
1489
|
+
} = props;
|
|
1563
1490
|
let Comp = as;
|
|
1564
1491
|
|
|
1565
1492
|
if (!Comp) {
|
|
1566
1493
|
Comp = mappings[variant] || 'p';
|
|
1567
1494
|
}
|
|
1568
1495
|
|
|
1569
|
-
return /*#__PURE__*/jsxRuntime.jsx(Box,
|
|
1496
|
+
return /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
1570
1497
|
as: Comp,
|
|
1571
1498
|
ref: forwardedRef,
|
|
1572
1499
|
tx: "text",
|
|
1573
1500
|
variant: variant,
|
|
1574
1501
|
__css: {
|
|
1575
1502
|
color: 'inherit'
|
|
1576
|
-
}
|
|
1577
|
-
|
|
1503
|
+
},
|
|
1504
|
+
...otherProps
|
|
1505
|
+
});
|
|
1578
1506
|
});
|
|
1579
1507
|
|
|
1580
1508
|
const Alert = /*#__PURE__*/react$1.forwardRef(function Alert(props, forwardedRef) {
|
|
1581
1509
|
const {
|
|
1582
1510
|
as = 'div',
|
|
1583
1511
|
color = 'secondary',
|
|
1584
|
-
__css
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
return /*#__PURE__*/jsxRuntime.jsx(Text, _extends__default['default']({
|
|
1512
|
+
__css,
|
|
1513
|
+
...otherProps
|
|
1514
|
+
} = props;
|
|
1515
|
+
return /*#__PURE__*/jsxRuntime.jsx(Text, {
|
|
1589
1516
|
ref: forwardedRef,
|
|
1590
1517
|
as: as,
|
|
1591
|
-
variant: "
|
|
1592
|
-
__css:
|
|
1518
|
+
variant: "body-medium",
|
|
1519
|
+
__css: {
|
|
1593
1520
|
p: 3,
|
|
1594
1521
|
bg: alpha(color, 0.1),
|
|
1595
1522
|
borderRadius: 'extra-small',
|
|
1596
1523
|
borderColor: alpha(color, 0.2),
|
|
1597
1524
|
borderStyle: 'solid',
|
|
1598
|
-
borderWidth: "0.0625rem"
|
|
1599
|
-
|
|
1600
|
-
|
|
1525
|
+
borderWidth: "0.0625rem",
|
|
1526
|
+
...__css
|
|
1527
|
+
},
|
|
1528
|
+
...otherProps
|
|
1529
|
+
});
|
|
1601
1530
|
});
|
|
1602
1531
|
|
|
1603
1532
|
const Badge = /*#__PURE__*/react$1.forwardRef(function Badge(props, forwardedRef) {
|
|
1604
|
-
const
|
|
1605
|
-
|
|
1606
|
-
return /*#__PURE__*/jsxRuntime.jsx(Box,
|
|
1607
|
-
ref: forwardedRef
|
|
1608
|
-
|
|
1533
|
+
const { ...otherProps
|
|
1534
|
+
} = props;
|
|
1535
|
+
return /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
1536
|
+
ref: forwardedRef,
|
|
1537
|
+
...otherProps
|
|
1538
|
+
});
|
|
1609
1539
|
});
|
|
1610
1540
|
|
|
1611
1541
|
const BaseLine = () => {
|
|
@@ -1746,13 +1676,12 @@ const BaseLine = () => {
|
|
|
1746
1676
|
|
|
1747
1677
|
const Scrim = /*#__PURE__*/react$1.forwardRef(function Scrim(props, forwardedRef) {
|
|
1748
1678
|
const {
|
|
1749
|
-
__css
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
return /*#__PURE__*/jsxRuntime.jsx(Box, _extends__default['default']({
|
|
1679
|
+
__css,
|
|
1680
|
+
...otherProps
|
|
1681
|
+
} = props;
|
|
1682
|
+
return /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
1754
1683
|
ref: forwardedRef,
|
|
1755
|
-
__css:
|
|
1684
|
+
__css: {
|
|
1756
1685
|
position: 'fixed',
|
|
1757
1686
|
top: '0',
|
|
1758
1687
|
left: '0',
|
|
@@ -1763,20 +1692,21 @@ const Scrim = /*#__PURE__*/react$1.forwardRef(function Scrim(props, forwardedRef
|
|
|
1763
1692
|
backgroundColor: alpha('#000', 0.32),
|
|
1764
1693
|
willChange: 'opacity',
|
|
1765
1694
|
zIndex: -1,
|
|
1766
|
-
pointerEvents: 'none'
|
|
1767
|
-
|
|
1768
|
-
|
|
1695
|
+
pointerEvents: 'none',
|
|
1696
|
+
...__css
|
|
1697
|
+
},
|
|
1698
|
+
...otherProps
|
|
1699
|
+
});
|
|
1769
1700
|
});
|
|
1770
1701
|
|
|
1771
1702
|
const DialogContainer = /*#__PURE__*/react$1.forwardRef(function DialogContainer(props, forwardedRef) {
|
|
1772
1703
|
const {
|
|
1773
|
-
__css
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
return /*#__PURE__*/jsxRuntime.jsx(Box, _extends__default['default']({
|
|
1704
|
+
__css,
|
|
1705
|
+
...otherProps
|
|
1706
|
+
} = props;
|
|
1707
|
+
return /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
1778
1708
|
ref: forwardedRef,
|
|
1779
|
-
__css:
|
|
1709
|
+
__css: {
|
|
1780
1710
|
position: 'absolute',
|
|
1781
1711
|
display: 'flex',
|
|
1782
1712
|
alignItems: 'center',
|
|
@@ -1785,9 +1715,11 @@ const DialogContainer = /*#__PURE__*/react$1.forwardRef(function DialogContainer
|
|
|
1785
1715
|
height: '100%',
|
|
1786
1716
|
willChange: 'transform,opacity',
|
|
1787
1717
|
transformOrigin: 'center center',
|
|
1788
|
-
pointerEvents: 'none'
|
|
1789
|
-
|
|
1790
|
-
|
|
1718
|
+
pointerEvents: 'none',
|
|
1719
|
+
...__css
|
|
1720
|
+
},
|
|
1721
|
+
...otherProps
|
|
1722
|
+
});
|
|
1791
1723
|
});
|
|
1792
1724
|
|
|
1793
1725
|
function useAnimation(opts) {
|
|
@@ -1811,22 +1743,22 @@ function useAnimation(opts) {
|
|
|
1811
1743
|
open: openProp
|
|
1812
1744
|
});
|
|
1813
1745
|
const handleClose = react$1.useCallback(() => {
|
|
1814
|
-
setAnimation(animation => animation.state === 'closed' ? animation :
|
|
1746
|
+
setAnimation(animation => animation.state === 'closed' ? animation : { ...animation,
|
|
1815
1747
|
state: 'close',
|
|
1816
1748
|
style: animationStyle.close || animationStyle.closed,
|
|
1817
1749
|
timing: closeTimeoutInMilliseconds
|
|
1818
|
-
})
|
|
1750
|
+
});
|
|
1819
1751
|
}, [animationStyle, closeTimeoutInMilliseconds]);
|
|
1820
1752
|
const handleOpen = react$1.useCallback(() => {
|
|
1821
|
-
setAnimation(animation => animation.state === 'open' ? animation :
|
|
1753
|
+
setAnimation(animation => animation.state === 'open' ? animation : { ...animation,
|
|
1822
1754
|
open: true,
|
|
1823
1755
|
state: 'opening',
|
|
1824
1756
|
style: animationStyle.opening || animationStyle.closed
|
|
1825
|
-
})
|
|
1757
|
+
});
|
|
1826
1758
|
}, [animationStyle]);
|
|
1827
1759
|
react$1.useEffect(() => {
|
|
1828
1760
|
if (state === 'opening') {
|
|
1829
|
-
setAnimation(animation =>
|
|
1761
|
+
setAnimation(animation => ({ ...animation,
|
|
1830
1762
|
state: 'open',
|
|
1831
1763
|
style: animationStyle.open,
|
|
1832
1764
|
timing: openTimeoutInMilliseconds
|
|
@@ -1906,26 +1838,26 @@ const styles = {
|
|
|
1906
1838
|
};
|
|
1907
1839
|
function useDialogAnimation(opts) {
|
|
1908
1840
|
const {
|
|
1909
|
-
mode = 'grow'
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1841
|
+
mode = 'grow',
|
|
1842
|
+
...otherOpts
|
|
1843
|
+
} = opts;
|
|
1913
1844
|
const {
|
|
1914
1845
|
open,
|
|
1915
1846
|
state,
|
|
1916
1847
|
style,
|
|
1917
1848
|
timing
|
|
1918
|
-
} = useAnimation(
|
|
1849
|
+
} = useAnimation({
|
|
1919
1850
|
styles,
|
|
1920
|
-
mode
|
|
1921
|
-
|
|
1851
|
+
mode,
|
|
1852
|
+
...otherOpts
|
|
1853
|
+
});
|
|
1922
1854
|
const scrimOpacity = state === 'open' ? 1 : 0;
|
|
1923
|
-
const transition = `opacity ${timing}ms
|
|
1924
|
-
const scrimTransition = `opacity ${timing * 0.4 | 0}ms
|
|
1855
|
+
const transition = `opacity ${timing}ms ${EASING_STANDARD},transform ${timing}ms ${EASING_STANDARD}`;
|
|
1856
|
+
const scrimTransition = `opacity ${timing * 0.4 | 0}ms ${EASING_STANDARD}`;
|
|
1925
1857
|
return {
|
|
1926
|
-
containerStyle:
|
|
1858
|
+
containerStyle: { ...style,
|
|
1927
1859
|
transition
|
|
1928
|
-
}
|
|
1860
|
+
},
|
|
1929
1861
|
scrimStyle: {
|
|
1930
1862
|
opacity: scrimOpacity,
|
|
1931
1863
|
transition: scrimTransition
|
|
@@ -1939,44 +1871,45 @@ const DialogBackdrop = /*#__PURE__*/react$1.forwardRef(function DialogBackdrop(p
|
|
|
1939
1871
|
const {
|
|
1940
1872
|
open,
|
|
1941
1873
|
onClose,
|
|
1942
|
-
__css
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1874
|
+
__css,
|
|
1875
|
+
...otherProps
|
|
1876
|
+
} = props;
|
|
1946
1877
|
const pointerEvents = open ? undefined : 'none';
|
|
1947
|
-
return /*#__PURE__*/jsxRuntime.jsx(ModalBackdrop,
|
|
1878
|
+
return /*#__PURE__*/jsxRuntime.jsx(ModalBackdrop, {
|
|
1948
1879
|
as: Box,
|
|
1949
1880
|
ref: forwardedRef,
|
|
1950
1881
|
onClose: onClose,
|
|
1951
1882
|
style: {
|
|
1952
1883
|
pointerEvents
|
|
1953
1884
|
},
|
|
1954
|
-
__css:
|
|
1885
|
+
__css: {
|
|
1955
1886
|
position: 'fixed',
|
|
1956
1887
|
top: '0',
|
|
1957
1888
|
left: '0',
|
|
1958
1889
|
right: '0',
|
|
1959
1890
|
bottom: '0',
|
|
1960
|
-
zIndex: 'dialog'
|
|
1961
|
-
|
|
1962
|
-
|
|
1891
|
+
zIndex: 'dialog',
|
|
1892
|
+
// Can't set overflow auto here otherwise slide animation
|
|
1893
|
+
...__css
|
|
1894
|
+
},
|
|
1895
|
+
...otherProps
|
|
1896
|
+
});
|
|
1963
1897
|
});
|
|
1964
1898
|
|
|
1965
1899
|
const Modal$1 = core.Modal;
|
|
1966
1900
|
const BottomSheetSurface = /*#__PURE__*/react$1.forwardRef(function BottomSheetSurface(props, forwardedRef) {
|
|
1967
1901
|
const {
|
|
1968
|
-
__css
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1902
|
+
__css,
|
|
1903
|
+
...otherProps
|
|
1904
|
+
} = props;
|
|
1972
1905
|
const theme = useTheme();
|
|
1973
|
-
return /*#__PURE__*/jsxRuntime.jsx(Modal$1,
|
|
1906
|
+
return /*#__PURE__*/jsxRuntime.jsx(Modal$1, {
|
|
1974
1907
|
ref: forwardedRef,
|
|
1975
1908
|
as: Paper,
|
|
1976
1909
|
theme: theme,
|
|
1977
1910
|
elevation: 3,
|
|
1978
1911
|
darkThemeBackgroundOverlay: 3,
|
|
1979
|
-
__css:
|
|
1912
|
+
__css: {
|
|
1980
1913
|
position: 'absolute',
|
|
1981
1914
|
bg: 'surface',
|
|
1982
1915
|
bottom: 0,
|
|
@@ -1988,18 +1921,19 @@ const BottomSheetSurface = /*#__PURE__*/react$1.forwardRef(function BottomSheetS
|
|
|
1988
1921
|
maxWidth: "37.5rem",
|
|
1989
1922
|
maxHeight: '50%',
|
|
1990
1923
|
overflow: 'auto',
|
|
1991
|
-
pointerEvents: 'auto'
|
|
1992
|
-
|
|
1993
|
-
|
|
1924
|
+
pointerEvents: 'auto',
|
|
1925
|
+
...__css
|
|
1926
|
+
},
|
|
1927
|
+
...otherProps
|
|
1928
|
+
});
|
|
1994
1929
|
});
|
|
1995
1930
|
|
|
1996
1931
|
const BottomSheet = /*#__PURE__*/react$1.forwardRef(function BottomSheet(props, forwardedRef) {
|
|
1997
1932
|
const {
|
|
1998
1933
|
open: openProp = false,
|
|
1999
|
-
onClose
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
1934
|
+
onClose,
|
|
1935
|
+
...otherProps
|
|
1936
|
+
} = props;
|
|
2003
1937
|
const {
|
|
2004
1938
|
containerStyle,
|
|
2005
1939
|
scrimStyle,
|
|
@@ -2021,9 +1955,10 @@ const BottomSheet = /*#__PURE__*/react$1.forwardRef(function BottomSheet(props,
|
|
|
2021
1955
|
__css: scrimStyle
|
|
2022
1956
|
}), /*#__PURE__*/jsxRuntime.jsx(DialogContainer, {
|
|
2023
1957
|
__css: containerStyle,
|
|
2024
|
-
children: /*#__PURE__*/jsxRuntime.jsx(BottomSheetSurface,
|
|
2025
|
-
ref: forwardedRef
|
|
2026
|
-
|
|
1958
|
+
children: /*#__PURE__*/jsxRuntime.jsx(BottomSheetSurface, {
|
|
1959
|
+
ref: forwardedRef,
|
|
1960
|
+
...otherProps
|
|
1961
|
+
})
|
|
2027
1962
|
})]
|
|
2028
1963
|
})
|
|
2029
1964
|
});
|
|
@@ -2043,16 +1978,15 @@ const Input = /*#__PURE__*/react$1.forwardRef(function Input(props, forwardedRef
|
|
|
2043
1978
|
hasLabel = true,
|
|
2044
1979
|
leadingIcon,
|
|
2045
1980
|
trailingIcon,
|
|
2046
|
-
multiline
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
return /*#__PURE__*/jsxRuntime.jsx(Box, _extends__default['default']({
|
|
1981
|
+
multiline,
|
|
1982
|
+
...otherProps
|
|
1983
|
+
} = props;
|
|
1984
|
+
return /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
2051
1985
|
as: as,
|
|
2052
1986
|
ref: forwardedRef,
|
|
2053
|
-
multiline: multiline
|
|
2054
|
-
|
|
2055
|
-
__css:
|
|
1987
|
+
multiline: multiline,
|
|
1988
|
+
...otherProps,
|
|
1989
|
+
__css: {
|
|
2056
1990
|
WebkitTapHighlightColor: 'transparent',
|
|
2057
1991
|
appearance: 'none',
|
|
2058
1992
|
outline: 'none',
|
|
@@ -2068,16 +2002,16 @@ const Input = /*#__PURE__*/react$1.forwardRef(function Input(props, forwardedRef
|
|
|
2068
2002
|
letterSpacing: "0.03125rem",
|
|
2069
2003
|
textAlign: 'left',
|
|
2070
2004
|
display: 'flex',
|
|
2071
|
-
alignItems: 'center'
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2005
|
+
alignItems: 'center',
|
|
2006
|
+
...(!multiline && {
|
|
2007
|
+
overflow: 'hidden',
|
|
2008
|
+
whiteSpace: 'nowrap',
|
|
2009
|
+
textOverflow: 'ellipsis'
|
|
2010
|
+
}),
|
|
2077
2011
|
'::placeholder': {
|
|
2078
2012
|
opacity: 0,
|
|
2079
2013
|
color: variant === 'filled' ? alpha('on.surface-variant', 0.87) : alpha('on.surface-variant', 0.6),
|
|
2080
|
-
transition: `opacity .18s
|
|
2014
|
+
transition: `opacity .18s ${EASING_STANDARD}`
|
|
2081
2015
|
},
|
|
2082
2016
|
':disabled::placeholder': {
|
|
2083
2017
|
color: alpha('on.surface', 0.38)
|
|
@@ -2098,19 +2032,23 @@ const Input = /*#__PURE__*/react$1.forwardRef(function Input(props, forwardedRef
|
|
|
2098
2032
|
}
|
|
2099
2033
|
},
|
|
2100
2034
|
paddingLeft: leadingIcon ? polished.rem(PADDING_LEFT_WITH_ICON + ICON_WIDTH + PADDING_LEFT_WITHOUT_ICON) : polished.rem(PADDING_LEFT_WITHOUT_ICON),
|
|
2101
|
-
paddingRight: trailingIcon ? polished.rem(PADDING_RIGHT_WITH_ICON + ICON_WIDTH + PADDING_RIGHT_WITHOUT_ICON) : polished.rem(PADDING_RIGHT_WITHOUT_ICON)
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2035
|
+
paddingRight: trailingIcon ? polished.rem(PADDING_RIGHT_WITH_ICON + ICON_WIDTH + PADDING_RIGHT_WITHOUT_ICON) : polished.rem(PADDING_RIGHT_WITHOUT_ICON),
|
|
2036
|
+
...(variant === 'outlined' && {
|
|
2037
|
+
paddingTop: "1rem",
|
|
2038
|
+
paddingBottom: "1rem"
|
|
2039
|
+
}),
|
|
2040
|
+
...(variant === 'filled' && {
|
|
2041
|
+
paddingTop: hasLabel ? "1.5rem" : "1rem",
|
|
2042
|
+
paddingBottom: hasLabel ? "0.5rem" : "1rem"
|
|
2043
|
+
}),
|
|
2044
|
+
...(multiline && {
|
|
2045
|
+
resize: 'vertical',
|
|
2046
|
+
paddingTop: 0,
|
|
2047
|
+
marginTop: variant === 'outlined' || !hasLabel ? "1.125rem" : "1.625rem"
|
|
2048
|
+
}),
|
|
2049
|
+
...__css
|
|
2050
|
+
}
|
|
2051
|
+
});
|
|
2114
2052
|
});
|
|
2115
2053
|
|
|
2116
2054
|
const notchedoutlineContext = /*#__PURE__*/react$1.createContext(null);
|
|
@@ -2129,19 +2067,18 @@ const FloatingLabel = /*#__PURE__*/react$1.forwardRef(function FloatingLabel(pro
|
|
|
2129
2067
|
style = {},
|
|
2130
2068
|
translateX: translateXProp,
|
|
2131
2069
|
translateY: translateYProp,
|
|
2132
|
-
children
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2070
|
+
children,
|
|
2071
|
+
...otherProps
|
|
2072
|
+
} = props;
|
|
2136
2073
|
const ctx = useNotchedOutlineContext();
|
|
2137
2074
|
const notchStart = ctx ? ctx.notchStart : 0;
|
|
2138
2075
|
const Text$1 = Text;
|
|
2139
2076
|
const translateX = translateXProp !== undefined ? translateXProp : notchStart - offsetX;
|
|
2140
2077
|
const translateY = translateYProp !== undefined ? translateYProp : -height / 2;
|
|
2141
2078
|
const transform = active ? `translate(${polished.rem(translateX)}, ${polished.rem(translateY)}) scale(${scale})` : undefined;
|
|
2142
|
-
return /*#__PURE__*/jsxRuntime.jsx(Text$1,
|
|
2079
|
+
return /*#__PURE__*/jsxRuntime.jsx(Text$1, {
|
|
2143
2080
|
as: "label",
|
|
2144
|
-
variant: "
|
|
2081
|
+
variant: "body-large",
|
|
2145
2082
|
ref: forwardedRef,
|
|
2146
2083
|
__css: {
|
|
2147
2084
|
position: 'absolute',
|
|
@@ -2151,15 +2088,16 @@ const FloatingLabel = /*#__PURE__*/react$1.forwardRef(function FloatingLabel(pro
|
|
|
2151
2088
|
left: polished.rem(offsetX),
|
|
2152
2089
|
height: typeof height === 'number' ? polished.rem(height) : height,
|
|
2153
2090
|
transformOrigin: 'left center',
|
|
2154
|
-
transition: `transform ${transitionTime}ms
|
|
2091
|
+
transition: `transform ${transitionTime}ms ${EASING_STANDARD}, color ${transitionTime}ms ${EASING_STANDARD}`,
|
|
2155
2092
|
pointerEvents: 'none'
|
|
2156
2093
|
},
|
|
2157
|
-
style:
|
|
2158
|
-
transform
|
|
2159
|
-
|
|
2160
|
-
|
|
2094
|
+
style: {
|
|
2095
|
+
transform,
|
|
2096
|
+
...style
|
|
2097
|
+
},
|
|
2098
|
+
...otherProps,
|
|
2161
2099
|
children: children
|
|
2162
|
-
})
|
|
2100
|
+
});
|
|
2163
2101
|
});
|
|
2164
2102
|
|
|
2165
2103
|
const LineRipple = /*#__PURE__*/react$1.forwardRef(function LineRipple(props, forwardedRef) {
|
|
@@ -2170,10 +2108,9 @@ const LineRipple = /*#__PURE__*/react$1.forwardRef(function LineRipple(props, fo
|
|
|
2170
2108
|
active = false,
|
|
2171
2109
|
posx = -1,
|
|
2172
2110
|
style: styleProp = {},
|
|
2173
|
-
__css
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2111
|
+
__css,
|
|
2112
|
+
...otherProps
|
|
2113
|
+
} = props;
|
|
2177
2114
|
const [style, setStyle] = react$1.useState();
|
|
2178
2115
|
const theme = useTheme();
|
|
2179
2116
|
const leaveTimeout = react$1.useRef();
|
|
@@ -2198,13 +2135,15 @@ const LineRipple = /*#__PURE__*/react$1.forwardRef(function LineRipple(props, fo
|
|
|
2198
2135
|
clearTimeout(leaveTimeout.current);
|
|
2199
2136
|
};
|
|
2200
2137
|
}, [active, posx, transitionDuration]);
|
|
2201
|
-
return /*#__PURE__*/jsxRuntime.jsx(Box,
|
|
2138
|
+
return /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
2202
2139
|
as: asProp,
|
|
2203
2140
|
ref: forwardedRef,
|
|
2204
2141
|
bg: color,
|
|
2205
2142
|
theme: theme,
|
|
2206
|
-
style:
|
|
2207
|
-
|
|
2143
|
+
style: { ...style,
|
|
2144
|
+
...styleProp
|
|
2145
|
+
},
|
|
2146
|
+
__css: {
|
|
2208
2147
|
position: 'absolute',
|
|
2209
2148
|
bottom: '0',
|
|
2210
2149
|
left: '0',
|
|
@@ -2213,10 +2152,12 @@ const LineRipple = /*#__PURE__*/react$1.forwardRef(function LineRipple(props, fo
|
|
|
2213
2152
|
zIndex: 1,
|
|
2214
2153
|
transform: 'scaleX(0)',
|
|
2215
2154
|
transformOrigin: 'center center',
|
|
2216
|
-
transition: `transform ${transitionDuration}ms
|
|
2217
|
-
opacity: 0
|
|
2218
|
-
|
|
2219
|
-
|
|
2155
|
+
transition: `transform ${transitionDuration}ms ${EASING_STANDARD},opacity ${transitionDuration}ms ${EASING_STANDARD}`,
|
|
2156
|
+
opacity: 0,
|
|
2157
|
+
...__css
|
|
2158
|
+
},
|
|
2159
|
+
...otherProps
|
|
2160
|
+
});
|
|
2220
2161
|
});
|
|
2221
2162
|
|
|
2222
2163
|
const makeSelector$1 = state => `input:${state} ~ &,` + `select:${state} ~ &,` + `button:${state} ~ &,` + `textarea:${state} ~ &`;
|
|
@@ -2227,7 +2168,7 @@ const Overlay = props => {
|
|
|
2227
2168
|
} = props;
|
|
2228
2169
|
const theme = useTheme();
|
|
2229
2170
|
return /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
2230
|
-
__css:
|
|
2171
|
+
__css: {
|
|
2231
2172
|
position: 'absolute',
|
|
2232
2173
|
top: 0,
|
|
2233
2174
|
bottom: 0,
|
|
@@ -2246,10 +2187,11 @@ const Overlay = props => {
|
|
|
2246
2187
|
cursor: 'default',
|
|
2247
2188
|
color: alpha('on.surface', 0.6),
|
|
2248
2189
|
opacity: 0.02
|
|
2249
|
-
}
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2190
|
+
},
|
|
2191
|
+
...(forceActive && {
|
|
2192
|
+
opacity: css.get(theme, `buttons.overlays.transparent.focus.opacity`)
|
|
2193
|
+
})
|
|
2194
|
+
}
|
|
2253
2195
|
});
|
|
2254
2196
|
};
|
|
2255
2197
|
|
|
@@ -2279,20 +2221,19 @@ const FilledContainer = /*#__PURE__*/react$1.forwardRef(function FilledContainer
|
|
|
2279
2221
|
error = false,
|
|
2280
2222
|
disabled = false,
|
|
2281
2223
|
forceActive = false,
|
|
2282
|
-
leadingIcon
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2224
|
+
leadingIcon,
|
|
2225
|
+
...otherProps
|
|
2226
|
+
} = props;
|
|
2286
2227
|
const finalLabelHeight = 16;
|
|
2287
2228
|
const labelHeight = finalLabelHeight / 0.75;
|
|
2288
2229
|
const inputHeight = 56;
|
|
2289
2230
|
const color = error ? 'error' : colorProp;
|
|
2290
2231
|
const active = hasFocus || forceActive;
|
|
2291
|
-
return /*#__PURE__*/jsxRuntime.jsxs(Box,
|
|
2232
|
+
return /*#__PURE__*/jsxRuntime.jsxs(Box, {
|
|
2292
2233
|
ref: forwardedRef,
|
|
2293
2234
|
disabled: disabled,
|
|
2294
2235
|
active: active || error,
|
|
2295
|
-
__css:
|
|
2236
|
+
__css: {
|
|
2296
2237
|
position: 'relative',
|
|
2297
2238
|
lineHeight: 0,
|
|
2298
2239
|
width: '100%',
|
|
@@ -2301,14 +2242,16 @@ const FilledContainer = /*#__PURE__*/react$1.forwardRef(function FilledContainer
|
|
|
2301
2242
|
boxSizing: 'border-box',
|
|
2302
2243
|
borderTopRightRadius: "0.25rem",
|
|
2303
2244
|
borderTopLeftRadius: "0.25rem",
|
|
2304
|
-
color: alpha('on.surface-variant', 0.87)
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2245
|
+
color: alpha('on.surface-variant', 0.87),
|
|
2246
|
+
...(disabled && {
|
|
2247
|
+
backgroundColor: alpha('on.surface-variant', 0.08),
|
|
2248
|
+
color: alpha('on.surface-variant', 0.38)
|
|
2249
|
+
}),
|
|
2250
|
+
...(active && {
|
|
2251
|
+
color: 'primary'
|
|
2252
|
+
})
|
|
2253
|
+
},
|
|
2254
|
+
...otherProps,
|
|
2312
2255
|
children: [label && /*#__PURE__*/jsxRuntime.jsx(FloatingLabel, {
|
|
2313
2256
|
height: inputHeight,
|
|
2314
2257
|
offsetX: leadingIcon ? PADDING_LEFT_WITH_ICON + ICON_WIDTH + PADDING_LEFT_WITHOUT_ICON : PADDING_LEFT_WITHOUT_ICON,
|
|
@@ -2328,18 +2271,18 @@ const FilledContainer = /*#__PURE__*/react$1.forwardRef(function FilledContainer
|
|
|
2328
2271
|
active: active || error,
|
|
2329
2272
|
color: color
|
|
2330
2273
|
})]
|
|
2331
|
-
})
|
|
2274
|
+
});
|
|
2332
2275
|
});
|
|
2333
2276
|
|
|
2334
2277
|
const NOTCH_PADDING = 4;
|
|
2335
2278
|
|
|
2336
2279
|
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]`;
|
|
2337
2280
|
|
|
2338
|
-
const InnerContainer = /*#__PURE__*/_styled__default[
|
|
2339
|
-
shouldForwardProp: shouldForwardProp__default[
|
|
2281
|
+
const InnerContainer = /*#__PURE__*/_styled__default["default"]('div', process.env.NODE_ENV === "production" ? {
|
|
2282
|
+
shouldForwardProp: shouldForwardProp__default["default"],
|
|
2340
2283
|
target: "ejp8zhv0"
|
|
2341
2284
|
} : {
|
|
2342
|
-
shouldForwardProp: shouldForwardProp__default[
|
|
2285
|
+
shouldForwardProp: shouldForwardProp__default["default"],
|
|
2343
2286
|
target: "ejp8zhv0",
|
|
2344
2287
|
label: "InnerContainer"
|
|
2345
2288
|
})("position:absolute;display:flex;left:0;top:0;bottom:0;width:100%;height:100%;pointer-events:none;", ({
|
|
@@ -2379,32 +2322,32 @@ const InnerContainer = /*#__PURE__*/_styled__default['default']('div', process.e
|
|
|
2379
2322
|
};
|
|
2380
2323
|
}
|
|
2381
2324
|
|
|
2382
|
-
const inactiveStyle =
|
|
2325
|
+
const inactiveStyle = {
|
|
2383
2326
|
color: 'on.surface-variant',
|
|
2384
|
-
borderColor: 'outline'
|
|
2385
|
-
|
|
2386
|
-
|
|
2327
|
+
borderColor: 'outline',
|
|
2328
|
+
...borderStyling(borderRadius, borderWidth)
|
|
2329
|
+
};
|
|
2387
2330
|
const hoverStyle = {
|
|
2388
2331
|
borderColor: 'on.surface',
|
|
2389
2332
|
color: 'on.surface-variant'
|
|
2390
2333
|
};
|
|
2391
|
-
|
|
2392
|
-
const focusStyle = _extends__default['default']({
|
|
2334
|
+
const focusStyle = {
|
|
2393
2335
|
borderColor: color,
|
|
2394
|
-
color: alpha(color, 0.87)
|
|
2395
|
-
|
|
2396
|
-
|
|
2336
|
+
color: alpha(color, 0.87),
|
|
2337
|
+
...borderStyling(borderRadius, borderWidthWhenFocused)
|
|
2338
|
+
};
|
|
2397
2339
|
const disabledStyle = {
|
|
2398
2340
|
borderColor: alpha('on.surface', 0.06),
|
|
2399
2341
|
color: alpha('on.surface', 0.38)
|
|
2400
2342
|
};
|
|
2401
2343
|
return css.css({
|
|
2402
2344
|
// notch items styles when not focused
|
|
2403
|
-
['[data-notch-outline-item]']:
|
|
2345
|
+
['[data-notch-outline-item]']: {
|
|
2404
2346
|
boxSizing: 'border-box',
|
|
2405
2347
|
borderStyle,
|
|
2406
|
-
transition: `border-color .15s
|
|
2407
|
-
|
|
2348
|
+
transition: `border-color .15s ${EASING_STANDARD}`,
|
|
2349
|
+
...(forceActive ? focusStyle : inactiveStyle)
|
|
2350
|
+
},
|
|
2408
2351
|
// notch items styles when input is hovered
|
|
2409
2352
|
[makeSelector('hover:not([disabled]):not(:focus)')]: forceActive ? focusStyle : hoverStyle,
|
|
2410
2353
|
// notch items styles when input is focused
|
|
@@ -2412,7 +2355,7 @@ const InnerContainer = /*#__PURE__*/_styled__default['default']('div', process.e
|
|
|
2412
2355
|
// notch items styles when input is disabled
|
|
2413
2356
|
[makeSelector('disabled')]: disabledStyle
|
|
2414
2357
|
});
|
|
2415
|
-
}, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
2358
|
+
}, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlZENvbXBvbmVudHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBc0I4QiIsImZpbGUiOiJzdHlsZWRDb21wb25lbnRzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuaW1wb3J0IHsgcmVtIH0gZnJvbSAncG9saXNoZWQnO1xuaW1wb3J0IHNob3VsZEZvcndhcmRQcm9wIGZyb20gJ0BzdHlsZWQtc3lzdGVtL3Nob3VsZC1mb3J3YXJkLXByb3AnO1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQHN0eWxlZC1zeXN0ZW0vY3NzJztcblxuaW1wb3J0IHsgYWxwaGEgfSBmcm9tICcuLi9jb2xvcic7XG5pbXBvcnQgdHlwZSB7IFRoZW1lIH0gZnJvbSAnLi4vdGhlbWUnO1xuaW1wb3J0IHsgRUFTSU5HX1NUQU5EQVJEIH0gZnJvbSAnLi4vbW90aW9uJztcblxuZXhwb3J0IGNvbnN0IE5PVENIX1BBRERJTkcgPSA0O1xuXG5jb25zdCBtYWtlU2VsZWN0b3IgPSAoXG4gIHN0YXRlOlxuICAgIHwgJ2hvdmVyOm5vdChbZGlzYWJsZWRdKTpub3QoOmZvY3VzKSdcbiAgICB8ICdmb2N1czpub3QoW2Rpc2FibGVkXSknXG4gICAgfCAnZGlzYWJsZWQnXG4pID0+XG4gIGBpbnB1dDoke3N0YXRlfSB+ICYgW2RhdGEtbm90Y2gtb3V0bGluZS1pdGVtXSxgICtcbiAgYHNlbGVjdDoke3N0YXRlfSB+ICYgW2RhdGEtbm90Y2gtb3V0bGluZS1pdGVtXSxgICtcbiAgYFtyb2xlPVwiYnV0dG9uXCJdOiR7c3RhdGV9IH4gJiBbZGF0YS1ub3RjaC1vdXRsaW5lLWl0ZW1dLGAgK1xuICBgdGV4dGFyZWE6JHtzdGF0ZX0gfiAmIFtkYXRhLW5vdGNoLW91dGxpbmUtaXRlbV1gO1xuXG5leHBvcnQgY29uc3QgSW5uZXJDb250YWluZXIgPSBzdHlsZWQoJ2RpdicsIHtcbiAgc2hvdWxkRm9yd2FyZFByb3AsXG59KTx7XG4gIGNvbG9yPzogc3RyaW5nO1xuICB0aGVtZT86IFRoZW1lO1xuICBib3JkZXJSYWRpdXM6IG51bWJlcjtcbiAgYm9yZGVyV2lkdGg6IG51bWJlcjtcbiAgYm9yZGVyV2lkdGhXaGVuRm9jdXNlZDogbnVtYmVyO1xuICBib3JkZXJTdHlsZTogc3RyaW5nO1xuICBub3RjaFN0YXJ0OiBudW1iZXI7XG4gIGZvcmNlQWN0aXZlPzogYm9vbGVhbjtcbn0+KFxuICB7XG4gICAgcG9zaXRpb246ICdhYnNvbHV0ZScsXG4gICAgZGlzcGxheTogJ2ZsZXgnLFxuICAgIGxlZnQ6IDAsXG4gICAgdG9wOiAwLFxuICAgIGJvdHRvbTogMCxcbiAgICB3aWR0aDogJzEwMCUnLFxuICAgIGhlaWdodDogJzEwMCUnLFxuICAgIHBvaW50ZXJFdmVudHM6ICdub25lJyxcbiAgfSxcbiAgKHtcbiAgICBjb2xvciA9ICdvbi5zdXJmYWNlJyxcbiAgICBib3JkZXJSYWRpdXM6IGJvcmRlclJhZGl1c1B4LFxuICAgIGJvcmRlcldpZHRoOiBib3JkZXJXaWR0aFB4LFxuICAgIGJvcmRlcldpZHRoV2hlbkZvY3VzZWQ6IGJvcmRlcldpZHRoV2hlbkZvY3VzZWRQeCxcbiAgICBib3JkZXJTdHlsZSxcbiAgICBub3RjaFN0YXJ0LFxuICAgIGZvcmNlQWN0aXZlID0gZmFsc2UsXG4gIH0pID0+IHtcbiAgICBjb25zdCB3aWR0aCA9IHJlbShub3RjaFN0YXJ0IC0gTk9UQ0hfUEFERElORyk7XG4gICAgY29uc3QgYm9yZGVyUmFkaXVzID0gcmVtKGJvcmRlclJhZGl1c1B4KTtcbiAgICBjb25zdCBib3JkZXJXaWR0aCA9IHJlbShib3JkZXJXaWR0aFB4KTtcbiAgICBjb25zdCBib3JkZXJXaWR0aFdoZW5Gb2N1c2VkID0gcmVtKGJvcmRlcldpZHRoV2hlbkZvY3VzZWRQeCk7XG5cbiAgICBmdW5jdGlvbiBib3JkZXJTdHlsaW5nKGJvcmRlclJhZGl1czogc3RyaW5nLCBib3JkZXJXaWR0aDogc3RyaW5nKSB7XG4gICAgICByZXR1cm4ge1xuICAgICAgICBbJyZbZGF0YS1ub3RjaC1vdXRsaW5lLWl0ZW09XCJzdGFydFwiXSddOiB7XG4gICAgICAgICAgYm9yZGVyVG9wTGVmdFJhZGl1czogYm9yZGVyUmFkaXVzLFxuICAgICAgICAgIGJvcmRlckJvdHRvbUxlZnRSYWRpdXM6IGJvcmRlclJhZGl1cyxcbiAgICAgICAgICBib3JkZXJXaWR0aDogYm9yZGVyV2lkdGgsXG4gICAgICAgICAgYm9yZGVyUmlnaHRXaWR0aDogMCxcbiAgICAgICAgICB3aWR0aCxcbiAgICAgICAgfSxcbiAgICAgICAgWycmW2RhdGEtbm90Y2gtb3V0bGluZS1pdGVtPVwibWlkZGxlXCJdJ106IHtcbiAgICAgICAgICBib3JkZXJXaWR0aDogMCxcbiAgICAgICAgICBib3JkZXJCb3R0b21XaWR0aDogYm9yZGVyV2lkdGgsXG4gICAgICAgIH0sXG4gICAgICAgIFsnJltkYXRhLW5vdGNoLW91dGxpbmUtaXRlbT1cImVuZFwiXSddOiB7XG4gICAgICAgICAgYm9yZGVyV2lkdGg6IGJvcmRlcldpZHRoLFxuICAgICAgICAgIGJvcmRlckxlZnQ6IDAsXG4gICAgICAgICAgYm9yZGVyVG9wUmlnaHRSYWRpdXM6IGJvcmRlclJhZGl1cyxcbiAgICAgICAgICBib3JkZXJCb3R0b21SaWdodFJhZGl1czogYm9yZGVyUmFkaXVzLFxuICAgICAgICAgIGZsZXg6IDEsXG4gICAgICAgIH0sXG4gICAgICB9O1xuICAgIH1cblxuICAgIGNvbnN0IGluYWN0aXZlU3R5bGUgPSB7XG4gICAgICBjb2xvcjogJ29uLnN1cmZhY2UtdmFyaWFudCcsXG4gICAgICBib3JkZXJDb2xvcjogJ291dGxpbmUnLFxuICAgICAgLi4uYm9yZGVyU3R5bGluZyhib3JkZXJSYWRpdXMsIGJvcmRlcldpZHRoKSxcbiAgICB9O1xuXG4gICAgY29uc3QgaG92ZXJTdHlsZSA9IHtcbiAgICAgIGJvcmRlckNvbG9yOiAnb24uc3VyZmFjZScsXG4gICAgICBjb2xvcjogJ29uLnN1cmZhY2UtdmFyaWFudCcsXG4gICAgfTtcblxuICAgIGNvbnN0IGZvY3VzU3R5bGUgPSB7XG4gICAgICBib3JkZXJDb2xvcjogY29sb3IsXG4gICAgICBjb2xvcjogYWxwaGEoY29sb3IsIDAuODcpLFxuICAgICAgLi4uYm9yZGVyU3R5bGluZyhib3JkZXJSYWRpdXMsIGJvcmRlcldpZHRoV2hlbkZvY3VzZWQpLFxuICAgIH07XG5cbiAgICBjb25zdCBkaXNhYmxlZFN0eWxlID0ge1xuICAgICAgYm9yZGVyQ29sb3I6IGFscGhhKCdvbi5zdXJmYWNlJywgMC4wNiksXG4gICAgICBjb2xvcjogYWxwaGEoJ29uLnN1cmZhY2UnLCAwLjM4KSxcbiAgICB9O1xuXG4gICAgcmV0dXJuIGNzcyh7XG4gICAgICAvLyBub3RjaCBpdGVtcyBzdHlsZXMgd2hlbiBub3QgZm9jdXNlZFxuICAgICAgWydbZGF0YS1ub3RjaC1vdXRsaW5lLWl0ZW1dJ106IHtcbiAgICAgICAgYm94U2l6aW5nOiAnYm9yZGVyLWJveCcsXG4gICAgICAgIGJvcmRlclN0eWxlLFxuICAgICAgICB0cmFuc2l0aW9uOiBgYm9yZGVyLWNvbG9yIC4xNXMgJHtFQVNJTkdfU1RBTkRBUkR9YCxcbiAgICAgICAgLi4uKGZvcmNlQWN0aXZlID8gZm9jdXNTdHlsZSA6IGluYWN0aXZlU3R5bGUpLFxuICAgICAgfSxcbiAgICAgIC8vIG5vdGNoIGl0ZW1zIHN0eWxlcyB3aGVuIGlucHV0IGlzIGhvdmVyZWRcbiAgICAgIFttYWtlU2VsZWN0b3IoJ2hvdmVyOm5vdChbZGlzYWJsZWRdKTpub3QoOmZvY3VzKScpXTogZm9yY2VBY3RpdmVcbiAgICAgICAgPyBmb2N1c1N0eWxlXG4gICAgICAgIDogaG92ZXJTdHlsZSxcbiAgICAgIC8vIG5vdGNoIGl0ZW1zIHN0eWxlcyB3aGVuIGlucHV0IGlzIGZvY3VzZWRcbiAgICAgIFttYWtlU2VsZWN0b3IoJ2ZvY3VzOm5vdChbZGlzYWJsZWRdKScpXTogZm9jdXNTdHlsZSxcbiAgICAgIC8vIG5vdGNoIGl0ZW1zIHN0eWxlcyB3aGVuIGlucHV0IGlzIGRpc2FibGVkXG4gICAgICBbbWFrZVNlbGVjdG9yKCdkaXNhYmxlZCcpXTogZGlzYWJsZWRTdHlsZSxcbiAgICB9KTtcbiAgfVxuKTtcbiJdfQ== */");
|
|
2416
2359
|
|
|
2417
2360
|
const NotchedOutline = /*#__PURE__*/react$1.forwardRef(function NotchedOutline(props, forwardedRef) {
|
|
2418
2361
|
let {
|
|
@@ -2426,12 +2369,11 @@ const NotchedOutline = /*#__PURE__*/react$1.forwardRef(function NotchedOutline(p
|
|
|
2426
2369
|
notchActive = false,
|
|
2427
2370
|
forceActive = false,
|
|
2428
2371
|
children,
|
|
2429
|
-
label
|
|
2372
|
+
label,
|
|
2373
|
+
...otherProps
|
|
2430
2374
|
/* eslint-enable prefer-const */
|
|
2431
2375
|
|
|
2432
|
-
} = props
|
|
2433
|
-
otherProps = _objectWithoutPropertiesLoose__default['default'](props, ["borderRadius", "borderColor", "borderWidth", "borderStyle", "notchStart", "notchWidth", "notchActive", "forceActive", "children", "label"]); // Minimum notch start position that makes sense. Otherwise it will mess up with the border/border radii
|
|
2434
|
-
|
|
2376
|
+
} = props; // Minimum notch start position that makes sense. Otherwise it will mess up with the border/border radii
|
|
2435
2377
|
|
|
2436
2378
|
const MIN_NOTCH_POSX = (props.borderRadius || 0) + NOTCH_PADDING;
|
|
2437
2379
|
const theme = useTheme();
|
|
@@ -2440,9 +2382,9 @@ const NotchedOutline = /*#__PURE__*/react$1.forwardRef(function NotchedOutline(p
|
|
|
2440
2382
|
value: {
|
|
2441
2383
|
notchStart
|
|
2442
2384
|
},
|
|
2443
|
-
children: [children, /*#__PURE__*/jsxRuntime.jsxs(InnerContainer,
|
|
2444
|
-
ref: forwardedRef
|
|
2445
|
-
|
|
2385
|
+
children: [children, /*#__PURE__*/jsxRuntime.jsxs(InnerContainer, {
|
|
2386
|
+
ref: forwardedRef,
|
|
2387
|
+
...otherProps,
|
|
2446
2388
|
color: borderColor,
|
|
2447
2389
|
theme: theme,
|
|
2448
2390
|
borderRadius: borderRadius,
|
|
@@ -2462,7 +2404,7 @@ const NotchedOutline = /*#__PURE__*/react$1.forwardRef(function NotchedOutline(p
|
|
|
2462
2404
|
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
2463
2405
|
"data-notch-outline-item": "end"
|
|
2464
2406
|
})]
|
|
2465
|
-
})
|
|
2407
|
+
})]
|
|
2466
2408
|
});
|
|
2467
2409
|
});
|
|
2468
2410
|
|
|
@@ -2476,33 +2418,35 @@ const OutlinedContainer = /*#__PURE__*/react$1.forwardRef(function OutlinedConta
|
|
|
2476
2418
|
children,
|
|
2477
2419
|
error,
|
|
2478
2420
|
color: colorProp = 'primary',
|
|
2479
|
-
leadingIcon
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2421
|
+
leadingIcon,
|
|
2422
|
+
...otherProps
|
|
2423
|
+
} = props;
|
|
2483
2424
|
const [labelWidth, setLabelWidth] = react$1.useState(0);
|
|
2484
2425
|
const labelRef = react$1.useRef(null);
|
|
2485
2426
|
useEnhancedEffect$1(() => {
|
|
2486
2427
|
const element = labelRef.current;
|
|
2487
2428
|
|
|
2488
2429
|
if (element) {
|
|
2489
|
-
var _document, _document$fonts, _document$fonts$ready;
|
|
2490
|
-
|
|
2491
2430
|
setLabelWidth(element.offsetWidth);
|
|
2492
|
-
|
|
2431
|
+
|
|
2432
|
+
function handleFontsLoaded() {
|
|
2493
2433
|
// set the label width again once the fonts have been loaded
|
|
2494
2434
|
requestAnimationFrame(() => {
|
|
2495
|
-
setLabelWidth(element.offsetWidth);
|
|
2435
|
+
if (element) setLabelWidth(element.offsetWidth);
|
|
2496
2436
|
});
|
|
2497
|
-
}
|
|
2437
|
+
}
|
|
2438
|
+
|
|
2439
|
+
document.fonts?.addEventListener?.('loadingdone', handleFontsLoaded);
|
|
2440
|
+
document.fonts?.ready?.then(handleFontsLoaded);
|
|
2441
|
+
return () => document.fonts?.removeEventListener?.('loadingdone', handleFontsLoaded);
|
|
2498
2442
|
}
|
|
2499
2443
|
}, [label]);
|
|
2500
2444
|
const color = error ? 'error' : colorProp;
|
|
2501
2445
|
const inputHeight = 56;
|
|
2502
|
-
return /*#__PURE__*/jsxRuntime.jsx(Box,
|
|
2446
|
+
return /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
2503
2447
|
position: "relative",
|
|
2504
|
-
lineHeight: 0
|
|
2505
|
-
|
|
2448
|
+
lineHeight: 0,
|
|
2449
|
+
...otherProps,
|
|
2506
2450
|
children: /*#__PURE__*/jsxRuntime.jsx(NotchedOutline, {
|
|
2507
2451
|
ref: forwardedRef,
|
|
2508
2452
|
borderRadius: 4,
|
|
@@ -2523,7 +2467,7 @@ const OutlinedContainer = /*#__PURE__*/react$1.forwardRef(function OutlinedConta
|
|
|
2523
2467
|
}),
|
|
2524
2468
|
children: children
|
|
2525
2469
|
})
|
|
2526
|
-
})
|
|
2470
|
+
});
|
|
2527
2471
|
});
|
|
2528
2472
|
|
|
2529
2473
|
const HelperText = /*#__PURE__*/react$1.forwardRef(function HelperText(props, forwardedRef) {
|
|
@@ -2533,9 +2477,9 @@ const HelperText = /*#__PURE__*/react$1.forwardRef(function HelperText(props, fo
|
|
|
2533
2477
|
color: colorProp,
|
|
2534
2478
|
error = false,
|
|
2535
2479
|
disabled = false,
|
|
2536
|
-
__css
|
|
2537
|
-
|
|
2538
|
-
|
|
2480
|
+
__css,
|
|
2481
|
+
...otherProps
|
|
2482
|
+
} = props;
|
|
2539
2483
|
|
|
2540
2484
|
if (!leftSide && !rightSide) {
|
|
2541
2485
|
return null;
|
|
@@ -2551,24 +2495,25 @@ const HelperText = /*#__PURE__*/react$1.forwardRef(function HelperText(props, fo
|
|
|
2551
2495
|
color = alpha('on.surface', 0.6);
|
|
2552
2496
|
}
|
|
2553
2497
|
|
|
2554
|
-
return /*#__PURE__*/jsxRuntime.jsxs(Text,
|
|
2498
|
+
return /*#__PURE__*/jsxRuntime.jsxs(Text, {
|
|
2555
2499
|
as: "div",
|
|
2556
2500
|
px: 16,
|
|
2557
2501
|
display: "flex",
|
|
2558
2502
|
pt: 1,
|
|
2559
2503
|
color: color,
|
|
2560
|
-
variant: "
|
|
2504
|
+
variant: "label-small",
|
|
2561
2505
|
ref: forwardedRef,
|
|
2562
2506
|
lineHeight: "normal",
|
|
2563
|
-
__css:
|
|
2564
|
-
color
|
|
2565
|
-
|
|
2566
|
-
|
|
2507
|
+
__css: {
|
|
2508
|
+
color,
|
|
2509
|
+
...__css
|
|
2510
|
+
},
|
|
2511
|
+
...otherProps,
|
|
2567
2512
|
children: [leftSide, rightSide && /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
2568
2513
|
ml: "auto",
|
|
2569
2514
|
children: rightSide
|
|
2570
2515
|
})]
|
|
2571
|
-
})
|
|
2516
|
+
});
|
|
2572
2517
|
});
|
|
2573
2518
|
|
|
2574
2519
|
const IconContainer = ({
|
|
@@ -2629,10 +2574,9 @@ const TextField = /*#__PURE__*/react$1.forwardRef(function TextField(props, forw
|
|
|
2629
2574
|
onBlur,
|
|
2630
2575
|
leadingIcon = null,
|
|
2631
2576
|
trailingIcon = null,
|
|
2632
|
-
containerProps
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2577
|
+
containerProps,
|
|
2578
|
+
...otherProps
|
|
2579
|
+
} = props;
|
|
2636
2580
|
const [value, onChange] = core.useControlledState(valueProp, onChangeProp, defaultValue, setState => e => {
|
|
2637
2581
|
setState(e.target.value);
|
|
2638
2582
|
});
|
|
@@ -2659,7 +2603,7 @@ const TextField = /*#__PURE__*/react$1.forwardRef(function TextField(props, forw
|
|
|
2659
2603
|
display: "inline-flex",
|
|
2660
2604
|
flexDirection: "column",
|
|
2661
2605
|
width: "100%",
|
|
2662
|
-
children: [/*#__PURE__*/jsxRuntime.jsxs(Container,
|
|
2606
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs(Container, {
|
|
2663
2607
|
theme: theme,
|
|
2664
2608
|
label: label,
|
|
2665
2609
|
color: color,
|
|
@@ -2668,12 +2612,12 @@ const TextField = /*#__PURE__*/react$1.forwardRef(function TextField(props, forw
|
|
|
2668
2612
|
inputId: inputId,
|
|
2669
2613
|
hasFocus: hasFocus,
|
|
2670
2614
|
disabled: disabled,
|
|
2671
|
-
leadingIcon: Boolean(leadingIcon)
|
|
2672
|
-
|
|
2615
|
+
leadingIcon: Boolean(leadingIcon),
|
|
2616
|
+
...containerProps,
|
|
2673
2617
|
children: [leadingIcon && /*#__PURE__*/jsxRuntime.jsx(IconContainer, {
|
|
2674
2618
|
position: "start",
|
|
2675
2619
|
children: leadingIcon
|
|
2676
|
-
}), /*#__PURE__*/jsxRuntime.jsx(Input,
|
|
2620
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Input, {
|
|
2677
2621
|
ref: forwardedRef,
|
|
2678
2622
|
as: multiline ? 'textarea' : 'input',
|
|
2679
2623
|
variant: variant,
|
|
@@ -2692,12 +2636,13 @@ const TextField = /*#__PURE__*/react$1.forwardRef(function TextField(props, forw
|
|
|
2692
2636
|
"aria-describedby": helperTextId,
|
|
2693
2637
|
hasLabel: !!label,
|
|
2694
2638
|
leadingIcon: Boolean(leadingIcon),
|
|
2695
|
-
trailingIcon: Boolean(trailingIcon)
|
|
2696
|
-
|
|
2639
|
+
trailingIcon: Boolean(trailingIcon),
|
|
2640
|
+
...otherProps
|
|
2641
|
+
}), trailingIcon && /*#__PURE__*/jsxRuntime.jsx(IconContainer, {
|
|
2697
2642
|
position: "end",
|
|
2698
2643
|
children: trailingIcon
|
|
2699
2644
|
})]
|
|
2700
|
-
})
|
|
2645
|
+
}), /*#__PURE__*/jsxRuntime.jsx(HelperText, {
|
|
2701
2646
|
error: hasError,
|
|
2702
2647
|
disabled: disabled,
|
|
2703
2648
|
leftSide: helperText && /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
@@ -2718,11 +2663,10 @@ const List = /*#__PURE__*/react$1.forwardRef(function List(props, forwardedRef)
|
|
|
2718
2663
|
px = 0,
|
|
2719
2664
|
outlined = true,
|
|
2720
2665
|
variant = 'square',
|
|
2721
|
-
__css = {}
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
return /*#__PURE__*/jsxRuntime.jsx(Paper, _extends__default['default']({
|
|
2666
|
+
__css = {},
|
|
2667
|
+
...otherProps
|
|
2668
|
+
} = props;
|
|
2669
|
+
return /*#__PURE__*/jsxRuntime.jsx(Paper, {
|
|
2726
2670
|
as: innerAs || as,
|
|
2727
2671
|
ref: forwardedRef,
|
|
2728
2672
|
py: py,
|
|
@@ -2731,12 +2675,55 @@ const List = /*#__PURE__*/react$1.forwardRef(function List(props, forwardedRef)
|
|
|
2731
2675
|
darkThemeBackgroundOverlay: elevation,
|
|
2732
2676
|
variant: variant,
|
|
2733
2677
|
outlined: outlined,
|
|
2734
|
-
__css:
|
|
2735
|
-
width: '100%'
|
|
2736
|
-
|
|
2737
|
-
|
|
2678
|
+
__css: {
|
|
2679
|
+
width: '100%',
|
|
2680
|
+
...__css
|
|
2681
|
+
},
|
|
2682
|
+
...otherProps
|
|
2683
|
+
});
|
|
2738
2684
|
});
|
|
2739
2685
|
|
|
2686
|
+
const listItemStyle = (color, hoverOpacity = 0.16, focusOpacity = 0.24) => ({
|
|
2687
|
+
variant: 'text.label-large',
|
|
2688
|
+
px: 3,
|
|
2689
|
+
py: "0.75rem",
|
|
2690
|
+
transition: 'background-color 75ms linear',
|
|
2691
|
+
backgroundColor: 'transparent',
|
|
2692
|
+
color: alpha('on.surface', 0.87),
|
|
2693
|
+
cursor: 'pointer',
|
|
2694
|
+
display: 'flex',
|
|
2695
|
+
alignItems: 'center',
|
|
2696
|
+
textDecoration: 'none',
|
|
2697
|
+
':hover': {
|
|
2698
|
+
backgroundColor: alpha('on.surface', hoverOpacity)
|
|
2699
|
+
},
|
|
2700
|
+
':focus': {
|
|
2701
|
+
outline: 'none',
|
|
2702
|
+
backgroundColor: alpha('on.surface', focusOpacity)
|
|
2703
|
+
},
|
|
2704
|
+
':active': {
|
|
2705
|
+
backgroundColor: alpha('on.surface', focusOpacity)
|
|
2706
|
+
},
|
|
2707
|
+
'&[aria-selected="true"]': {
|
|
2708
|
+
backgroundColor: alpha(color, 0.08),
|
|
2709
|
+
color,
|
|
2710
|
+
':hover': {
|
|
2711
|
+
backgroundColor: alpha(color, hoverOpacity)
|
|
2712
|
+
},
|
|
2713
|
+
':focus': {
|
|
2714
|
+
outline: 'none',
|
|
2715
|
+
backgroundColor: alpha(color, focusOpacity)
|
|
2716
|
+
},
|
|
2717
|
+
':active': {
|
|
2718
|
+
backgroundColor: alpha(color, focusOpacity)
|
|
2719
|
+
}
|
|
2720
|
+
},
|
|
2721
|
+
'&[data-disabled]': {
|
|
2722
|
+
color: alpha('on.surface', 0.6),
|
|
2723
|
+
backgroundColor: 'transparent',
|
|
2724
|
+
cursor: 'default'
|
|
2725
|
+
}
|
|
2726
|
+
});
|
|
2740
2727
|
const ListItem = /*#__PURE__*/react$1.forwardRef(function ListItem(props, forwardedRef) {
|
|
2741
2728
|
const {
|
|
2742
2729
|
as = 'div',
|
|
@@ -2747,81 +2734,41 @@ const ListItem = /*#__PURE__*/react$1.forwardRef(function ListItem(props, forwar
|
|
|
2747
2734
|
disabled = false,
|
|
2748
2735
|
color: colorProp,
|
|
2749
2736
|
rippleColor,
|
|
2750
|
-
__css
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2737
|
+
__css,
|
|
2738
|
+
...otherProps
|
|
2739
|
+
} = props;
|
|
2754
2740
|
const selected = ariaSelectedProp || selectedProp;
|
|
2755
2741
|
const color = rippleColor || colorProp || 'primary';
|
|
2756
2742
|
const theme = useTheme();
|
|
2757
|
-
|
|
2758
|
-
const hoverOpacity = 0.16;
|
|
2759
|
-
const focusOpacity = 0.24;
|
|
2760
|
-
return /*#__PURE__*/jsxRuntime.jsx(Box, _extends__default['default']({
|
|
2743
|
+
return /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
2761
2744
|
ref: forwardedRef,
|
|
2762
2745
|
as: innerAs || as,
|
|
2763
2746
|
theme: theme,
|
|
2764
2747
|
display: "flex",
|
|
2765
2748
|
"data-disabled": disabled ? '' : undefined,
|
|
2766
2749
|
"aria-selected": selected ? 'true' : undefined,
|
|
2767
|
-
disabled: disabled
|
|
2768
|
-
|
|
2769
|
-
__css:
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
transition: 'background-color 75ms linear',
|
|
2773
|
-
backgroundColor: 'transparent',
|
|
2774
|
-
color: alpha('on.surface', 0.87),
|
|
2775
|
-
cursor: 'pointer',
|
|
2776
|
-
':hover': {
|
|
2777
|
-
backgroundColor: alpha('on.surface', hoverOpacity)
|
|
2778
|
-
},
|
|
2779
|
-
':focus': {
|
|
2780
|
-
outline: 'none',
|
|
2781
|
-
backgroundColor: alpha('on.surface', focusOpacity)
|
|
2782
|
-
},
|
|
2783
|
-
':active': {
|
|
2784
|
-
backgroundColor: alpha('on.surface', baseOpacity + 0.12)
|
|
2785
|
-
},
|
|
2786
|
-
'&[aria-selected="true"]': {
|
|
2787
|
-
backgroundColor: alpha(color, baseOpacity + 0.12),
|
|
2788
|
-
':hover': {
|
|
2789
|
-
backgroundColor: alpha(color, hoverOpacity + 0.12)
|
|
2790
|
-
},
|
|
2791
|
-
':focus': {
|
|
2792
|
-
outline: 'none',
|
|
2793
|
-
backgroundColor: alpha(color, focusOpacity + 0.12)
|
|
2794
|
-
},
|
|
2795
|
-
':active': {
|
|
2796
|
-
backgroundColor: alpha(color, baseOpacity + 0.24)
|
|
2797
|
-
}
|
|
2798
|
-
},
|
|
2799
|
-
'&[data-disabled]': {
|
|
2800
|
-
color: alpha('on.surface', 0.6),
|
|
2801
|
-
backgroundColor: 'transparent',
|
|
2802
|
-
cursor: 'default'
|
|
2803
|
-
},
|
|
2804
|
-
textDecoration: 'none',
|
|
2805
|
-
WebkitTapHighlightColor: 'transparent'
|
|
2806
|
-
}, css.get(theme, 'text.subtitle1'), __css),
|
|
2750
|
+
disabled: disabled,
|
|
2751
|
+
...otherProps,
|
|
2752
|
+
__css: { ...listItemStyle(color),
|
|
2753
|
+
...__css
|
|
2754
|
+
},
|
|
2807
2755
|
children: children
|
|
2808
|
-
})
|
|
2756
|
+
});
|
|
2809
2757
|
});
|
|
2810
2758
|
|
|
2811
2759
|
const ListItemText = /*#__PURE__*/react$1.forwardRef(function ListItemText(props, forwardedRef) {
|
|
2812
2760
|
const {
|
|
2813
2761
|
as: Comp = 'div',
|
|
2814
2762
|
text,
|
|
2815
|
-
secondaryText
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
}, otherProps, {
|
|
2763
|
+
secondaryText,
|
|
2764
|
+
...otherProps
|
|
2765
|
+
} = props;
|
|
2766
|
+
return /*#__PURE__*/jsxRuntime.jsxs(Comp, {
|
|
2767
|
+
ref: forwardedRef,
|
|
2768
|
+
...otherProps,
|
|
2822
2769
|
children: [text, secondaryText && /*#__PURE__*/jsxRuntime.jsx(Text, {
|
|
2823
2770
|
as: "span",
|
|
2824
|
-
variant: "
|
|
2771
|
+
variant: "body-small",
|
|
2825
2772
|
display: "block",
|
|
2826
2773
|
__css: {
|
|
2827
2774
|
color: 'currentColor',
|
|
@@ -2829,7 +2776,7 @@ const ListItemText = /*#__PURE__*/react$1.forwardRef(function ListItemText(props
|
|
|
2829
2776
|
},
|
|
2830
2777
|
children: secondaryText
|
|
2831
2778
|
})]
|
|
2832
|
-
})
|
|
2779
|
+
});
|
|
2833
2780
|
});
|
|
2834
2781
|
|
|
2835
2782
|
// Combobox
|
|
@@ -2838,33 +2785,34 @@ const ComboboxCore = core.Combobox;
|
|
|
2838
2785
|
const Combobox = /*#__PURE__*/react$1.forwardRef((props, forwardedRef) => {
|
|
2839
2786
|
const {
|
|
2840
2787
|
as = 'div',
|
|
2841
|
-
__css
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
return /*#__PURE__*/jsxRuntime.jsx(ComboboxCore, _extends__default['default']({
|
|
2788
|
+
__css,
|
|
2789
|
+
...otherProps
|
|
2790
|
+
} = props;
|
|
2791
|
+
return /*#__PURE__*/jsxRuntime.jsx(ComboboxCore, {
|
|
2846
2792
|
as: Box,
|
|
2847
2793
|
ref: forwardedRef,
|
|
2848
2794
|
innerAs: as,
|
|
2849
|
-
__css:
|
|
2850
|
-
position: 'relative'
|
|
2851
|
-
|
|
2852
|
-
|
|
2795
|
+
__css: {
|
|
2796
|
+
position: 'relative',
|
|
2797
|
+
...__css
|
|
2798
|
+
},
|
|
2799
|
+
...otherProps
|
|
2800
|
+
});
|
|
2853
2801
|
}); /////////////////////////////////////////////////////
|
|
2854
2802
|
// ComboboxInput
|
|
2855
2803
|
|
|
2856
2804
|
const ComboboxInputCore = core.ComboboxInput;
|
|
2857
2805
|
const ComboboxInput = /*#__PURE__*/react$1.forwardRef((props, forwardedRef) => {
|
|
2858
2806
|
const {
|
|
2859
|
-
as = 'input'
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
return /*#__PURE__*/jsxRuntime.jsx(ComboboxInputCore, _extends__default['default']({
|
|
2807
|
+
as = 'input',
|
|
2808
|
+
...otherProps
|
|
2809
|
+
} = props;
|
|
2810
|
+
return /*#__PURE__*/jsxRuntime.jsx(ComboboxInputCore, {
|
|
2864
2811
|
as: TextField,
|
|
2865
2812
|
ref: forwardedRef,
|
|
2866
|
-
innerAs: as
|
|
2867
|
-
|
|
2813
|
+
innerAs: as,
|
|
2814
|
+
...otherProps
|
|
2815
|
+
});
|
|
2868
2816
|
}); /////////////////////////////////////////////////////
|
|
2869
2817
|
// ComboboxList
|
|
2870
2818
|
|
|
@@ -2872,97 +2820,100 @@ const ComboboxListCore = core.ComboboxList;
|
|
|
2872
2820
|
const ComboboxList = /*#__PURE__*/react$1.forwardRef((props, forwardedRef) => {
|
|
2873
2821
|
const {
|
|
2874
2822
|
as = 'ul',
|
|
2875
|
-
__css
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
return /*#__PURE__*/jsxRuntime.jsx(ComboboxListCore, _extends__default['default']({
|
|
2823
|
+
__css,
|
|
2824
|
+
...otherProps
|
|
2825
|
+
} = props;
|
|
2826
|
+
return /*#__PURE__*/jsxRuntime.jsx(ComboboxListCore, {
|
|
2880
2827
|
as: List,
|
|
2881
2828
|
ref: forwardedRef,
|
|
2882
2829
|
innerAs: as,
|
|
2883
2830
|
outlined: false,
|
|
2884
2831
|
elevation: 2,
|
|
2885
2832
|
darkThemeBackgroundOverlay: 2,
|
|
2886
|
-
__css:
|
|
2833
|
+
__css: {
|
|
2887
2834
|
maxHeight: "18.75rem",
|
|
2888
2835
|
overflowY: 'auto',
|
|
2889
|
-
borderRadius: '
|
|
2836
|
+
borderRadius: 'extra-small',
|
|
2890
2837
|
'[data-popper-placement="top"] &': {
|
|
2891
2838
|
transformOrigin: 'bottom center'
|
|
2892
2839
|
},
|
|
2893
2840
|
'[data-popper-placement="bottom"] &': {
|
|
2894
2841
|
transformOrigin: 'top center'
|
|
2895
|
-
}
|
|
2896
|
-
|
|
2897
|
-
|
|
2842
|
+
},
|
|
2843
|
+
'& [data-reach-combobox-option=""]': { ...listItemStyle('primary')
|
|
2844
|
+
},
|
|
2845
|
+
...__css
|
|
2846
|
+
},
|
|
2847
|
+
...otherProps
|
|
2848
|
+
});
|
|
2898
2849
|
}); /////////////////////////////////////////////////////
|
|
2899
2850
|
// ComboboxPopperBox
|
|
2900
2851
|
|
|
2901
2852
|
const PopperCore = core.Popper;
|
|
2902
|
-
const ComboboxPopperBox = /*#__PURE__*/react$1.forwardRef((
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
props = _objectWithoutPropertiesLoose__default['default'](_ref, ["__css", "anchorEl", "as"]);
|
|
2909
|
-
|
|
2853
|
+
const ComboboxPopperBox = /*#__PURE__*/react$1.forwardRef(({
|
|
2854
|
+
__css,
|
|
2855
|
+
anchorEl,
|
|
2856
|
+
as = 'div',
|
|
2857
|
+
...props
|
|
2858
|
+
}, forwardedRef) => {
|
|
2910
2859
|
const ctx = core.useComboBoxContext();
|
|
2911
|
-
return /*#__PURE__*/jsxRuntime.jsx(PopperCore,
|
|
2860
|
+
return /*#__PURE__*/jsxRuntime.jsx(PopperCore, {
|
|
2912
2861
|
as: Box,
|
|
2913
2862
|
innerAs: as,
|
|
2914
2863
|
ref: forwardedRef,
|
|
2915
2864
|
anchorEl: anchorEl || ctx.inputRef,
|
|
2916
|
-
__css:
|
|
2865
|
+
__css: {
|
|
2917
2866
|
zIndex: 1,
|
|
2918
|
-
width: '100%'
|
|
2919
|
-
|
|
2920
|
-
|
|
2867
|
+
width: '100%',
|
|
2868
|
+
...__css
|
|
2869
|
+
},
|
|
2870
|
+
...props
|
|
2871
|
+
});
|
|
2921
2872
|
}); /////////////////////////////////////////////////////
|
|
2922
2873
|
// ComboboxPopover
|
|
2923
2874
|
|
|
2924
2875
|
const ComboboxPopoverCore = core.ComboboxPopover;
|
|
2925
2876
|
const ComboboxPopover = /*#__PURE__*/react$1.forwardRef((props, forwardedRef) => {
|
|
2926
2877
|
const {
|
|
2927
|
-
as = 'div'
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
return /*#__PURE__*/jsxRuntime.jsx(ComboboxPopoverCore, _extends__default['default']({
|
|
2878
|
+
as = 'div',
|
|
2879
|
+
...otherProps
|
|
2880
|
+
} = props;
|
|
2881
|
+
return /*#__PURE__*/jsxRuntime.jsx(ComboboxPopoverCore, {
|
|
2932
2882
|
as: ComboboxPopperBox,
|
|
2933
2883
|
ref: forwardedRef,
|
|
2934
|
-
innerAs: as
|
|
2935
|
-
|
|
2884
|
+
innerAs: as,
|
|
2885
|
+
...otherProps
|
|
2886
|
+
});
|
|
2936
2887
|
}); /////////////////////////////////////////////////////
|
|
2937
2888
|
// ComboboxOption
|
|
2938
2889
|
|
|
2939
2890
|
const ComboboxOptionCore = core.ComboboxOption;
|
|
2940
2891
|
const ComboboxOption = /*#__PURE__*/react$1.forwardRef((props, forwardedRef) => {
|
|
2941
2892
|
const {
|
|
2942
|
-
as = 'li'
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
as: ListItem,
|
|
2893
|
+
as = 'li',
|
|
2894
|
+
...otherProps
|
|
2895
|
+
} = props;
|
|
2896
|
+
return /*#__PURE__*/jsxRuntime.jsx(ComboboxOptionCore, {
|
|
2897
|
+
as: Box,
|
|
2948
2898
|
ref: forwardedRef,
|
|
2949
|
-
innerAs: as
|
|
2950
|
-
|
|
2899
|
+
innerAs: as,
|
|
2900
|
+
...otherProps
|
|
2901
|
+
});
|
|
2951
2902
|
}); /////////////////////////////////////////////////////
|
|
2952
2903
|
// ComboboxLabel
|
|
2953
2904
|
|
|
2954
2905
|
const ComboboxLabelCore = core.ComboboxLabel;
|
|
2955
2906
|
const ComboboxLabel = /*#__PURE__*/react$1.forwardRef((props, forwardedRef) => {
|
|
2956
2907
|
const {
|
|
2957
|
-
as = 'label'
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
return /*#__PURE__*/jsxRuntime.jsx(ComboboxLabelCore, _extends__default['default']({
|
|
2908
|
+
as = 'label',
|
|
2909
|
+
...otherProps
|
|
2910
|
+
} = props;
|
|
2911
|
+
return /*#__PURE__*/jsxRuntime.jsx(ComboboxLabelCore, {
|
|
2962
2912
|
as: Text,
|
|
2963
2913
|
ref: forwardedRef,
|
|
2964
|
-
innerAs: as
|
|
2965
|
-
|
|
2914
|
+
innerAs: as,
|
|
2915
|
+
...otherProps
|
|
2916
|
+
});
|
|
2966
2917
|
}); /////////////////////////////////////////////////////
|
|
2967
2918
|
// ComboboxButton
|
|
2968
2919
|
|
|
@@ -2971,23 +2922,22 @@ const ComboboxButton = /*#__PURE__*/react$1.forwardRef((props, forwardedRef) =>
|
|
|
2971
2922
|
const {
|
|
2972
2923
|
as = 'button',
|
|
2973
2924
|
__css,
|
|
2974
|
-
children
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
return /*#__PURE__*/jsxRuntime.jsx(ComboboxButtonCore, _extends__default['default']({
|
|
2925
|
+
children,
|
|
2926
|
+
...otherProps
|
|
2927
|
+
} = props;
|
|
2928
|
+
return /*#__PURE__*/jsxRuntime.jsx(ComboboxButtonCore, {
|
|
2979
2929
|
as: Button,
|
|
2980
2930
|
ref: forwardedRef,
|
|
2981
2931
|
innerAs: as,
|
|
2982
2932
|
tabIndex: -1,
|
|
2983
2933
|
variant: "icon",
|
|
2984
|
-
__css:
|
|
2934
|
+
__css: {
|
|
2985
2935
|
zIndex: 1,
|
|
2986
2936
|
width: "2.5rem",
|
|
2987
2937
|
height: "2.5rem",
|
|
2988
2938
|
px: 0,
|
|
2989
2939
|
'& > svg': {
|
|
2990
|
-
transition:
|
|
2940
|
+
transition: `transform .15s ${EASING_STANDARD}, color .15s ${EASING_STANDARD}`
|
|
2991
2941
|
},
|
|
2992
2942
|
'&[aria-expanded="false"] > svg': {
|
|
2993
2943
|
color: alpha('on.surface', 0.54)
|
|
@@ -2995,9 +2945,10 @@ const ComboboxButton = /*#__PURE__*/react$1.forwardRef((props, forwardedRef) =>
|
|
|
2995
2945
|
'&[aria-expanded="true"] > svg': {
|
|
2996
2946
|
transform: 'rotate(180deg)',
|
|
2997
2947
|
color: 'currentColor'
|
|
2998
|
-
}
|
|
2999
|
-
|
|
3000
|
-
|
|
2948
|
+
},
|
|
2949
|
+
...__css
|
|
2950
|
+
},
|
|
2951
|
+
...otherProps,
|
|
3001
2952
|
children: children || /*#__PURE__*/jsxRuntime.jsx("svg", {
|
|
3002
2953
|
"aria-hidden": true,
|
|
3003
2954
|
viewBox: "0 0 24 24",
|
|
@@ -3007,12 +2958,12 @@ const ComboboxButton = /*#__PURE__*/react$1.forwardRef((props, forwardedRef) =>
|
|
|
3007
2958
|
d: "M7 10l5 5 5-5z"
|
|
3008
2959
|
})
|
|
3009
2960
|
})
|
|
3010
|
-
})
|
|
2961
|
+
});
|
|
3011
2962
|
});
|
|
3012
2963
|
|
|
3013
2964
|
const offset = 29.78333854675293; // document.querySelector(path).getTotalLength()
|
|
3014
2965
|
|
|
3015
|
-
const Path = _styled__default[
|
|
2966
|
+
const Path = _styled__default["default"]("path", process.env.NODE_ENV === "production" ? {
|
|
3016
2967
|
target: "e1v8gifn0"
|
|
3017
2968
|
} : {
|
|
3018
2969
|
target: "e1v8gifn0",
|
|
@@ -3036,7 +2987,7 @@ const CheckPath = ({
|
|
|
3036
2987
|
});
|
|
3037
2988
|
};
|
|
3038
2989
|
|
|
3039
|
-
const Line = _styled__default[
|
|
2990
|
+
const Line = _styled__default["default"]("line", process.env.NODE_ENV === "production" ? {
|
|
3040
2991
|
target: "eat3a050"
|
|
3041
2992
|
} : {
|
|
3042
2993
|
target: "eat3a050",
|
|
@@ -3063,19 +3014,19 @@ const IndeterminatePath = ({
|
|
|
3063
3014
|
});
|
|
3064
3015
|
};
|
|
3065
3016
|
|
|
3066
|
-
const CheckBoxIcon = /*#__PURE__*/react$1.forwardRef(function CheckBoxIcon(
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
return /*#__PURE__*/jsxRuntime.jsx(Box,
|
|
3017
|
+
const CheckBoxIcon = /*#__PURE__*/react$1.forwardRef(function CheckBoxIcon({
|
|
3018
|
+
__css = {},
|
|
3019
|
+
as = 'div',
|
|
3020
|
+
indeterminate,
|
|
3021
|
+
checked,
|
|
3022
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
3023
|
+
disabled,
|
|
3024
|
+
backgroundColor,
|
|
3025
|
+
borderColor,
|
|
3026
|
+
opacity,
|
|
3027
|
+
...otherProps
|
|
3028
|
+
}, forwardedRef) {
|
|
3029
|
+
return /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
3079
3030
|
as: as,
|
|
3080
3031
|
ref: forwardedRef,
|
|
3081
3032
|
backgroundColor: backgroundColor,
|
|
@@ -3088,13 +3039,13 @@ const CheckBoxIcon = /*#__PURE__*/react$1.forwardRef(function CheckBoxIcon(_ref,
|
|
|
3088
3039
|
borderStyle: 'solid',
|
|
3089
3040
|
width: "1.125rem",
|
|
3090
3041
|
height: "1.125rem",
|
|
3091
|
-
transition:
|
|
3042
|
+
transition: `background-color 90ms 0s ${EASING_STANDARD}, border-color 90ms 0s ${EASING_STANDARD}, opacity 90ms 0s ${EASING_STANDARD}`,
|
|
3092
3043
|
'& > svg': {
|
|
3093
3044
|
display: 'block'
|
|
3094
3045
|
},
|
|
3095
3046
|
__css
|
|
3096
|
-
}
|
|
3097
|
-
|
|
3047
|
+
},
|
|
3048
|
+
...otherProps,
|
|
3098
3049
|
children: /*#__PURE__*/jsxRuntime.jsxs("svg", {
|
|
3099
3050
|
viewBox: "0 0 24 24",
|
|
3100
3051
|
children: [/*#__PURE__*/jsxRuntime.jsx(CheckPath, {
|
|
@@ -3103,48 +3054,51 @@ const CheckBoxIcon = /*#__PURE__*/react$1.forwardRef(function CheckBoxIcon(_ref,
|
|
|
3103
3054
|
checked: checked && indeterminate
|
|
3104
3055
|
})]
|
|
3105
3056
|
})
|
|
3106
|
-
})
|
|
3057
|
+
});
|
|
3107
3058
|
});
|
|
3108
3059
|
|
|
3109
3060
|
const SelectionControlLabel = /*#__PURE__*/react$1.forwardRef(function SelectionControlLabel(props, forwardedRef) {
|
|
3110
3061
|
const {
|
|
3111
3062
|
as = 'label',
|
|
3112
|
-
__css
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
return /*#__PURE__*/jsxRuntime.jsx(Box, _extends__default['default']({
|
|
3063
|
+
__css,
|
|
3064
|
+
...otherProps
|
|
3065
|
+
} = props;
|
|
3066
|
+
return /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
3117
3067
|
ref: forwardedRef,
|
|
3118
3068
|
as: as,
|
|
3119
|
-
__css:
|
|
3069
|
+
__css: {
|
|
3120
3070
|
display: 'inline-flex',
|
|
3121
3071
|
position: 'relative',
|
|
3122
3072
|
alignItems: 'center',
|
|
3123
|
-
WebkitTapHighlightColor: 'transparent'
|
|
3124
|
-
|
|
3125
|
-
|
|
3073
|
+
WebkitTapHighlightColor: 'transparent',
|
|
3074
|
+
...__css
|
|
3075
|
+
},
|
|
3076
|
+
...otherProps
|
|
3077
|
+
});
|
|
3126
3078
|
});
|
|
3127
3079
|
|
|
3128
3080
|
const SelectionControlText = /*#__PURE__*/react$1.forwardRef(function SelectionControlText(props, forwardedRef) {
|
|
3129
3081
|
const {
|
|
3130
3082
|
as = 'span',
|
|
3131
3083
|
disabled,
|
|
3132
|
-
__css
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
return /*#__PURE__*/jsxRuntime.jsx(Text, _extends__default['default']({
|
|
3084
|
+
__css,
|
|
3085
|
+
...otherProps
|
|
3086
|
+
} = props;
|
|
3087
|
+
return /*#__PURE__*/jsxRuntime.jsx(Text, {
|
|
3137
3088
|
ref: forwardedRef,
|
|
3138
3089
|
as: as,
|
|
3139
|
-
__css:
|
|
3140
|
-
p: 1
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3090
|
+
__css: {
|
|
3091
|
+
p: 1,
|
|
3092
|
+
...(disabled ? {
|
|
3093
|
+
color: alpha('on.surface', 0.38)
|
|
3094
|
+
} : {
|
|
3095
|
+
cursor: 'pointer',
|
|
3096
|
+
color: alpha('on.surface', 0.87)
|
|
3097
|
+
}),
|
|
3098
|
+
...__css
|
|
3099
|
+
},
|
|
3100
|
+
...otherProps
|
|
3101
|
+
});
|
|
3148
3102
|
});
|
|
3149
3103
|
|
|
3150
3104
|
const CheckBoxCore$1 = core.CheckBox;
|
|
@@ -3167,10 +3121,9 @@ const CheckBoxInner = /*#__PURE__*/react$1.forwardRef(function CheckBoxInner(pro
|
|
|
3167
3121
|
indeterminate = false,
|
|
3168
3122
|
onChange,
|
|
3169
3123
|
icon = /*#__PURE__*/jsxRuntime.jsx(CheckBoxIcon, {}),
|
|
3170
|
-
__css
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
|
|
3124
|
+
__css,
|
|
3125
|
+
...otherProps
|
|
3126
|
+
} = props;
|
|
3174
3127
|
const color = checked ? 'primary' : 'on.surface';
|
|
3175
3128
|
const theme = useTheme();
|
|
3176
3129
|
const [backgroundColor, borderColor, opacity] = getColors(disabled, checked);
|
|
@@ -3178,7 +3131,7 @@ const CheckBoxInner = /*#__PURE__*/react$1.forwardRef(function CheckBoxInner(pro
|
|
|
3178
3131
|
position: "relative",
|
|
3179
3132
|
display: "inline-block",
|
|
3180
3133
|
minWidth: "auto",
|
|
3181
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(RippleBox,
|
|
3134
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(RippleBox, {
|
|
3182
3135
|
as: Comp,
|
|
3183
3136
|
type: "checkbox",
|
|
3184
3137
|
checked: checked,
|
|
@@ -3192,9 +3145,9 @@ const CheckBoxInner = /*#__PURE__*/react$1.forwardRef(function CheckBoxInner(pro
|
|
|
3192
3145
|
center: true,
|
|
3193
3146
|
disabled: disabled,
|
|
3194
3147
|
"aria-checked": indeterminate ? checked ? 'mixed' : 'false' : checked ? 'true' : 'false',
|
|
3195
|
-
"data-indeterminate": indeterminate ? '' : undefined
|
|
3196
|
-
|
|
3197
|
-
__css:
|
|
3148
|
+
"data-indeterminate": indeterminate ? '' : undefined,
|
|
3149
|
+
...otherProps,
|
|
3150
|
+
__css: {
|
|
3198
3151
|
top: 0,
|
|
3199
3152
|
left: 0,
|
|
3200
3153
|
width: "2.5rem",
|
|
@@ -3206,9 +3159,10 @@ const CheckBoxInner = /*#__PURE__*/react$1.forwardRef(function CheckBoxInner(pro
|
|
|
3206
3159
|
border: 'none',
|
|
3207
3160
|
borderRadius: 'full',
|
|
3208
3161
|
zIndex: 1,
|
|
3209
|
-
position: 'absolute'
|
|
3210
|
-
|
|
3211
|
-
|
|
3162
|
+
position: 'absolute',
|
|
3163
|
+
...__css
|
|
3164
|
+
}
|
|
3165
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
3212
3166
|
__css: {
|
|
3213
3167
|
position: 'relative',
|
|
3214
3168
|
top: 0,
|
|
@@ -3238,17 +3192,18 @@ const CheckBox = /*#__PURE__*/react$1.forwardRef(function CheckBox(props, forwar
|
|
|
3238
3192
|
as = 'input',
|
|
3239
3193
|
icon = /*#__PURE__*/jsxRuntime.jsx(CheckBoxIcon, {}),
|
|
3240
3194
|
disabled,
|
|
3241
|
-
children
|
|
3242
|
-
|
|
3243
|
-
|
|
3195
|
+
children,
|
|
3196
|
+
...otherProps
|
|
3197
|
+
} = props;
|
|
3244
3198
|
|
|
3245
|
-
const inner = /*#__PURE__*/jsxRuntime.jsx(CheckBoxCore$1,
|
|
3199
|
+
const inner = /*#__PURE__*/jsxRuntime.jsx(CheckBoxCore$1, {
|
|
3246
3200
|
as: CheckBoxInner,
|
|
3247
3201
|
innerAs: as,
|
|
3248
3202
|
ref: forwardedRef,
|
|
3249
3203
|
icon: icon,
|
|
3250
|
-
disabled: disabled
|
|
3251
|
-
|
|
3204
|
+
disabled: disabled,
|
|
3205
|
+
...otherProps
|
|
3206
|
+
});
|
|
3252
3207
|
|
|
3253
3208
|
if (!children) {
|
|
3254
3209
|
return inner;
|
|
@@ -3263,9 +3218,10 @@ const CheckBox = /*#__PURE__*/react$1.forwardRef(function CheckBox(props, forwar
|
|
|
3263
3218
|
});
|
|
3264
3219
|
|
|
3265
3220
|
function getFilledCSS(theme, bg, color, disabled) {
|
|
3266
|
-
return
|
|
3267
|
-
|
|
3268
|
-
|
|
3221
|
+
return { ...(!disabled && bg !== 'surface' ? {
|
|
3222
|
+
bg
|
|
3223
|
+
} : { ...getColorOverlay(theme, 'surface', 'primary', 0.05)
|
|
3224
|
+
}),
|
|
3269
3225
|
color,
|
|
3270
3226
|
'&::before': {
|
|
3271
3227
|
backgroundColor: 'currentColor',
|
|
@@ -3283,22 +3239,23 @@ function getFilledCSS(theme, bg, color, disabled) {
|
|
|
3283
3239
|
},
|
|
3284
3240
|
'& > *': {
|
|
3285
3241
|
zIndex: 1
|
|
3286
|
-
}
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
|
|
3242
|
+
},
|
|
3243
|
+
...(disabled && {
|
|
3244
|
+
boxShadow: 0,
|
|
3245
|
+
bg: alpha('on.surface', 0.32)
|
|
3246
|
+
})
|
|
3247
|
+
};
|
|
3291
3248
|
}
|
|
3292
3249
|
|
|
3293
3250
|
function getOutlinedCSS(theme, bg, color, borderOpacity) {
|
|
3294
|
-
return
|
|
3295
|
-
|
|
3296
|
-
|
|
3251
|
+
return { ...(bg !== 'surface' ? {
|
|
3252
|
+
bg
|
|
3253
|
+
} : getDarkThemeBackgroundOverlay(theme, 2)),
|
|
3297
3254
|
color: color,
|
|
3298
3255
|
borderColor: alpha(color, borderOpacity),
|
|
3299
3256
|
borderStyle: 'solid',
|
|
3300
3257
|
borderWidth: "0.0625rem"
|
|
3301
|
-
}
|
|
3258
|
+
};
|
|
3302
3259
|
}
|
|
3303
3260
|
|
|
3304
3261
|
const ChipBase = /*#__PURE__*/react$1.forwardRef(function Chip(props, forwardedRef) {
|
|
@@ -3310,16 +3267,15 @@ const ChipBase = /*#__PURE__*/react$1.forwardRef(function Chip(props, forwardedR
|
|
|
3310
3267
|
backgroundColor: backgroundColorProp = 'surface',
|
|
3311
3268
|
borderOpacity: borderOpacityProp = 0.24,
|
|
3312
3269
|
children,
|
|
3313
|
-
disabled = false
|
|
3314
|
-
|
|
3315
|
-
|
|
3316
|
-
|
|
3270
|
+
disabled = false,
|
|
3271
|
+
...otherProps
|
|
3272
|
+
} = props;
|
|
3317
3273
|
const theme = useTheme();
|
|
3318
|
-
return /*#__PURE__*/jsxRuntime.jsx(Box,
|
|
3274
|
+
return /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
3319
3275
|
as: as,
|
|
3320
3276
|
"data-disabled": disabled ? '' : undefined,
|
|
3321
3277
|
ref: forwardedRef,
|
|
3322
|
-
__css:
|
|
3278
|
+
__css: {
|
|
3323
3279
|
boxSizing: 'border-box',
|
|
3324
3280
|
position: 'relative',
|
|
3325
3281
|
display: 'inline-flex',
|
|
@@ -3338,22 +3294,24 @@ const ChipBase = /*#__PURE__*/react$1.forwardRef(function Chip(props, forwardedR
|
|
|
3338
3294
|
minWidth: 'auto',
|
|
3339
3295
|
'&::-moz-focus-inner': {
|
|
3340
3296
|
border: 0
|
|
3341
|
-
}
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
|
|
3297
|
+
},
|
|
3298
|
+
...styledSystem.variant({
|
|
3299
|
+
scale: 'chips.variants',
|
|
3300
|
+
prop: 'variant',
|
|
3301
|
+
variants: {
|
|
3302
|
+
text: {}
|
|
3303
|
+
}
|
|
3304
|
+
})({
|
|
3305
|
+
variant: variantProp,
|
|
3306
|
+
theme
|
|
3307
|
+
}),
|
|
3308
|
+
...(variantProp === 'filled' ? getFilledCSS(theme, backgroundColorProp, colorProp, disabled) : getOutlinedCSS(theme, backgroundColorProp, colorProp, borderOpacityProp)),
|
|
3309
|
+
opacity: disabled ? 0.38 : 1,
|
|
3310
|
+
...__css
|
|
3311
|
+
},
|
|
3312
|
+
...otherProps,
|
|
3355
3313
|
children: children
|
|
3356
|
-
})
|
|
3314
|
+
});
|
|
3357
3315
|
});
|
|
3358
3316
|
|
|
3359
3317
|
const ButtonChip = /*#__PURE__*/react$1.forwardRef(function ButtonChip(props, forwardedRef) {
|
|
@@ -3364,20 +3322,20 @@ const ButtonChip = /*#__PURE__*/react$1.forwardRef(function ButtonChip(props, fo
|
|
|
3364
3322
|
leadingIcon,
|
|
3365
3323
|
trailingIcon,
|
|
3366
3324
|
children,
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
|
|
3325
|
+
color,
|
|
3326
|
+
__css,
|
|
3327
|
+
...otherProps
|
|
3328
|
+
} = props;
|
|
3371
3329
|
const theme = useTheme();
|
|
3372
3330
|
const isClickable = onClick && !disabledProp;
|
|
3373
|
-
return /*#__PURE__*/jsxRuntime.jsx(ChipBase,
|
|
3331
|
+
return /*#__PURE__*/jsxRuntime.jsx(ChipBase, {
|
|
3374
3332
|
as: "div",
|
|
3375
3333
|
onClick: isClickable ? onClick : undefined,
|
|
3376
3334
|
disabled: disabledProp,
|
|
3377
3335
|
color: "on.surface",
|
|
3378
3336
|
backgroundColor: "surface",
|
|
3379
|
-
__css: __css
|
|
3380
|
-
|
|
3337
|
+
__css: __css,
|
|
3338
|
+
...otherProps,
|
|
3381
3339
|
children: /*#__PURE__*/jsxRuntime.jsxs(RippleBox, {
|
|
3382
3340
|
as: as,
|
|
3383
3341
|
role: isClickable ? 'button' : undefined,
|
|
@@ -3414,7 +3372,7 @@ const ButtonChip = /*#__PURE__*/react$1.forwardRef(function ButtonChip(props, fo
|
|
|
3414
3372
|
},
|
|
3415
3373
|
children: [leadingIcon, children, trailingIcon]
|
|
3416
3374
|
})
|
|
3417
|
-
})
|
|
3375
|
+
});
|
|
3418
3376
|
});
|
|
3419
3377
|
|
|
3420
3378
|
const InnerInput = /*#__PURE__*/react$1.forwardRef(function InnerInput(props, forwardedRef) {
|
|
@@ -3432,19 +3390,18 @@ const InnerInput = /*#__PURE__*/react$1.forwardRef(function InnerInput(props, fo
|
|
|
3432
3390
|
leadingIcon,
|
|
3433
3391
|
trailingIcon,
|
|
3434
3392
|
children,
|
|
3435
|
-
__css
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3393
|
+
__css,
|
|
3394
|
+
...otherProps
|
|
3395
|
+
} = props;
|
|
3439
3396
|
const theme = useTheme();
|
|
3440
|
-
return /*#__PURE__*/jsxRuntime.jsx(ChipBase,
|
|
3397
|
+
return /*#__PURE__*/jsxRuntime.jsx(ChipBase, {
|
|
3441
3398
|
as: "label",
|
|
3442
3399
|
disabled: disabled,
|
|
3443
3400
|
backgroundColor: checked ? color + '-container' : 'surface',
|
|
3444
3401
|
color: checked ? 'on.' + color + '-container' : 'on.surface',
|
|
3445
3402
|
borderOpacity: checked ? 0 : 0.24,
|
|
3446
|
-
__css: __css
|
|
3447
|
-
|
|
3403
|
+
__css: __css,
|
|
3404
|
+
...otherProps,
|
|
3448
3405
|
children: /*#__PURE__*/jsxRuntime.jsxs(Box, {
|
|
3449
3406
|
as: "span",
|
|
3450
3407
|
__css: {
|
|
@@ -3490,87 +3447,91 @@ const InnerInput = /*#__PURE__*/react$1.forwardRef(function InnerInput(props, fo
|
|
|
3490
3447
|
}
|
|
3491
3448
|
}), leadingIcon, children, trailingIcon]
|
|
3492
3449
|
})
|
|
3493
|
-
})
|
|
3450
|
+
});
|
|
3494
3451
|
});
|
|
3495
3452
|
const ChoiceChip = /*#__PURE__*/react$1.forwardRef(function ChoiceChip(props, forwardedRef) {
|
|
3496
3453
|
const {
|
|
3497
|
-
type = 'checkbox'
|
|
3498
|
-
|
|
3499
|
-
|
|
3500
|
-
|
|
3454
|
+
type = 'checkbox',
|
|
3455
|
+
...otherProps
|
|
3456
|
+
} = props;
|
|
3501
3457
|
const Comp = type === 'radio' ? core.RadioButton : core.CheckBox;
|
|
3502
|
-
return /*#__PURE__*/jsxRuntime.jsx(Comp,
|
|
3458
|
+
return /*#__PURE__*/jsxRuntime.jsx(Comp, {
|
|
3503
3459
|
ref: forwardedRef,
|
|
3504
3460
|
as: InnerInput,
|
|
3505
|
-
type: type
|
|
3506
|
-
|
|
3461
|
+
type: type,
|
|
3462
|
+
...otherProps
|
|
3463
|
+
});
|
|
3507
3464
|
});
|
|
3508
3465
|
|
|
3509
3466
|
const Divider = /*#__PURE__*/react$1.forwardRef(function Divider(props, forwardedRef) {
|
|
3510
3467
|
const {
|
|
3511
3468
|
as = 'div',
|
|
3512
3469
|
direction = 'horizontal',
|
|
3513
|
-
__css
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
|
|
3521
|
-
|
|
3522
|
-
__css: _extends__default['default']({
|
|
3470
|
+
__css,
|
|
3471
|
+
...otherProps
|
|
3472
|
+
} = props;
|
|
3473
|
+
return /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
3474
|
+
ref: forwardedRef,
|
|
3475
|
+
as: as,
|
|
3476
|
+
role: "separator",
|
|
3477
|
+
...otherProps,
|
|
3478
|
+
__css: {
|
|
3523
3479
|
border: 'none',
|
|
3524
|
-
listStyleType: 'none'
|
|
3525
|
-
|
|
3526
|
-
|
|
3527
|
-
|
|
3528
|
-
|
|
3529
|
-
|
|
3530
|
-
|
|
3531
|
-
|
|
3532
|
-
|
|
3533
|
-
|
|
3534
|
-
|
|
3535
|
-
|
|
3536
|
-
|
|
3480
|
+
listStyleType: 'none',
|
|
3481
|
+
...(direction === 'horizontal' && {
|
|
3482
|
+
height: 0,
|
|
3483
|
+
borderBottomWidth: "0.0625rem",
|
|
3484
|
+
borderBottomStyle: 'solid',
|
|
3485
|
+
borderBottomColor: alpha('on.surface', 0.12)
|
|
3486
|
+
}),
|
|
3487
|
+
...(direction === 'vertical' && {
|
|
3488
|
+
width: 0,
|
|
3489
|
+
borderRightWidth: "0.0625rem",
|
|
3490
|
+
borderRightStyle: 'solid',
|
|
3491
|
+
borderRightColor: alpha('on.surface', 0.12)
|
|
3492
|
+
}),
|
|
3493
|
+
...__css
|
|
3494
|
+
}
|
|
3495
|
+
});
|
|
3537
3496
|
});
|
|
3538
3497
|
|
|
3539
3498
|
const Modal = core.Modal;
|
|
3540
3499
|
const DialogSurface = /*#__PURE__*/react$1.forwardRef(function DialogSurface(props, forwardedRef) {
|
|
3541
3500
|
const {
|
|
3542
3501
|
__css,
|
|
3543
|
-
variant: variantProp = 'base'
|
|
3544
|
-
|
|
3545
|
-
|
|
3546
|
-
|
|
3502
|
+
variant: variantProp = 'base',
|
|
3503
|
+
...otherProps
|
|
3504
|
+
} = props;
|
|
3547
3505
|
const theme = useTheme();
|
|
3548
3506
|
const overlayValue = styledSystem.get(theme, 'dialogs.backgroundColorOverlay') || 0;
|
|
3549
|
-
return /*#__PURE__*/jsxRuntime.jsx(Modal,
|
|
3507
|
+
return /*#__PURE__*/jsxRuntime.jsx(Modal, {
|
|
3550
3508
|
ref: forwardedRef,
|
|
3551
3509
|
as: Paper,
|
|
3552
3510
|
theme: theme,
|
|
3553
3511
|
elevation: 3,
|
|
3554
3512
|
darkThemeBackgroundOverlay: overlayValue,
|
|
3555
|
-
__css:
|
|
3513
|
+
__css: {
|
|
3556
3514
|
position: 'relative',
|
|
3557
3515
|
borderRadius: 'small',
|
|
3558
3516
|
width: '100%',
|
|
3559
3517
|
maxWidth: "37.5rem",
|
|
3560
3518
|
maxHeight: '100%',
|
|
3561
3519
|
overflow: 'auto',
|
|
3562
|
-
pointerEvents: 'auto'
|
|
3563
|
-
|
|
3564
|
-
|
|
3565
|
-
|
|
3566
|
-
|
|
3567
|
-
|
|
3568
|
-
|
|
3569
|
-
|
|
3570
|
-
|
|
3571
|
-
|
|
3572
|
-
|
|
3573
|
-
|
|
3520
|
+
pointerEvents: 'auto',
|
|
3521
|
+
...styledSystem.variant({
|
|
3522
|
+
scale: 'dialogs.variants',
|
|
3523
|
+
prop: 'variant',
|
|
3524
|
+
variants: {
|
|
3525
|
+
base: {}
|
|
3526
|
+
}
|
|
3527
|
+
})({
|
|
3528
|
+
variant: variantProp,
|
|
3529
|
+
theme
|
|
3530
|
+
}),
|
|
3531
|
+
...__css
|
|
3532
|
+
},
|
|
3533
|
+
...otherProps
|
|
3534
|
+
});
|
|
3574
3535
|
});
|
|
3575
3536
|
|
|
3576
3537
|
const Dialog = /*#__PURE__*/react$1.forwardRef(function Dialog(props, forwardedRef) {
|
|
@@ -3584,10 +3545,9 @@ const Dialog = /*#__PURE__*/react$1.forwardRef(function Dialog(props, forwardedR
|
|
|
3584
3545
|
containerProps,
|
|
3585
3546
|
scrimProps,
|
|
3586
3547
|
openTimeoutInMilliseconds,
|
|
3587
|
-
closeTimeoutInMilliseconds
|
|
3588
|
-
|
|
3589
|
-
|
|
3590
|
-
|
|
3548
|
+
closeTimeoutInMilliseconds,
|
|
3549
|
+
...otherProps
|
|
3550
|
+
} = props;
|
|
3591
3551
|
const {
|
|
3592
3552
|
containerStyle,
|
|
3593
3553
|
scrimStyle,
|
|
@@ -3604,22 +3564,24 @@ const Dialog = /*#__PURE__*/react$1.forwardRef(function Dialog(props, forwardedR
|
|
|
3604
3564
|
}
|
|
3605
3565
|
|
|
3606
3566
|
return /*#__PURE__*/jsxRuntime.jsx(core.Portal, {
|
|
3607
|
-
children: /*#__PURE__*/jsxRuntime.jsxs(DialogBackdrop,
|
|
3567
|
+
children: /*#__PURE__*/jsxRuntime.jsxs(DialogBackdrop, {
|
|
3608
3568
|
onClose: onClose,
|
|
3609
3569
|
open: openProp,
|
|
3610
3570
|
disableCloseOnClick: disableBackdropClick,
|
|
3611
|
-
disableEscapeKeyDown: disableEscapeKeyDown
|
|
3612
|
-
|
|
3613
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(Scrim,
|
|
3614
|
-
__css: scrimStyle
|
|
3615
|
-
|
|
3616
|
-
|
|
3617
|
-
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
|
|
3571
|
+
disableEscapeKeyDown: disableEscapeKeyDown,
|
|
3572
|
+
...backdropProps,
|
|
3573
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Scrim, {
|
|
3574
|
+
__css: scrimStyle,
|
|
3575
|
+
...scrimProps
|
|
3576
|
+
}), /*#__PURE__*/jsxRuntime.jsx(DialogContainer, {
|
|
3577
|
+
__css: containerStyle,
|
|
3578
|
+
...containerProps,
|
|
3579
|
+
children: /*#__PURE__*/jsxRuntime.jsx(DialogSurface, {
|
|
3580
|
+
ref: forwardedRef,
|
|
3581
|
+
...otherProps
|
|
3582
|
+
})
|
|
3583
|
+
})]
|
|
3584
|
+
})
|
|
3623
3585
|
});
|
|
3624
3586
|
});
|
|
3625
3587
|
|
|
@@ -3627,14 +3589,13 @@ const Link = /*#__PURE__*/react$1.forwardRef(function Link(props, forwardedRef)
|
|
|
3627
3589
|
const {
|
|
3628
3590
|
as: asProp = 'a',
|
|
3629
3591
|
color = 'primary',
|
|
3630
|
-
__css
|
|
3631
|
-
|
|
3632
|
-
|
|
3633
|
-
|
|
3634
|
-
return /*#__PURE__*/jsxRuntime.jsx(Box, _extends__default['default']({
|
|
3592
|
+
__css,
|
|
3593
|
+
...otherProps
|
|
3594
|
+
} = props;
|
|
3595
|
+
return /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
3635
3596
|
ref: forwardedRef,
|
|
3636
3597
|
as: asProp,
|
|
3637
|
-
__css:
|
|
3598
|
+
__css: {
|
|
3638
3599
|
fontFamily: 'inherit',
|
|
3639
3600
|
fontSize: 'inherit',
|
|
3640
3601
|
fontWeight: 'inherit',
|
|
@@ -3642,6 +3603,12 @@ const Link = /*#__PURE__*/react$1.forwardRef(function Link(props, forwardedRef)
|
|
|
3642
3603
|
letterSpacing: 'inherit',
|
|
3643
3604
|
color,
|
|
3644
3605
|
textDecoration: 'underline',
|
|
3606
|
+
background: 'none',
|
|
3607
|
+
border: 'none',
|
|
3608
|
+
borderRadius: 'extra-small',
|
|
3609
|
+
'button&': {
|
|
3610
|
+
cursor: 'pointer'
|
|
3611
|
+
},
|
|
3645
3612
|
'&:hover,&:focus': {
|
|
3646
3613
|
textDecoration: 'none'
|
|
3647
3614
|
},
|
|
@@ -3653,9 +3620,17 @@ const Link = /*#__PURE__*/react$1.forwardRef(function Link(props, forwardedRef)
|
|
|
3653
3620
|
'&:active': {
|
|
3654
3621
|
bg: alpha(color, 0.16)
|
|
3655
3622
|
},
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
|
|
3623
|
+
'&[aria-disabled="true"],&:disabled': {
|
|
3624
|
+
color: 'on.surface',
|
|
3625
|
+
opacity: 0.38,
|
|
3626
|
+
cursor: 'default',
|
|
3627
|
+
pointerEvents: 'none'
|
|
3628
|
+
},
|
|
3629
|
+
WebkitTapHighlightColor: 'transparent',
|
|
3630
|
+
...__css
|
|
3631
|
+
},
|
|
3632
|
+
...otherProps
|
|
3633
|
+
});
|
|
3659
3634
|
});
|
|
3660
3635
|
|
|
3661
3636
|
const growAnimation = react.keyframes({
|
|
@@ -3673,91 +3648,230 @@ const growAnimation = react.keyframes({
|
|
|
3673
3648
|
});
|
|
3674
3649
|
|
|
3675
3650
|
const MenuListCore = core.MenuList;
|
|
3676
|
-
const MenuList = /*#__PURE__*/react$1.forwardRef((
|
|
3677
|
-
|
|
3678
|
-
|
|
3679
|
-
|
|
3680
|
-
|
|
3681
|
-
|
|
3682
|
-
|
|
3683
|
-
|
|
3684
|
-
|
|
3685
|
-
|
|
3686
|
-
|
|
3687
|
-
|
|
3688
|
-
|
|
3689
|
-
|
|
3690
|
-
|
|
3691
|
-
|
|
3692
|
-
|
|
3693
|
-
|
|
3694
|
-
|
|
3695
|
-
|
|
3696
|
-
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
}, props));
|
|
3706
|
-
}); /////////////////////////////////////////////////////
|
|
3651
|
+
const MenuList = /*#__PURE__*/react$1.forwardRef(({
|
|
3652
|
+
as = 'ul',
|
|
3653
|
+
__css,
|
|
3654
|
+
...props
|
|
3655
|
+
}, ref) => /*#__PURE__*/jsxRuntime.jsx(MenuListCore, {
|
|
3656
|
+
as: List,
|
|
3657
|
+
innerAs: as,
|
|
3658
|
+
ref: ref,
|
|
3659
|
+
elevation: 2,
|
|
3660
|
+
darkThemeBackgroundOverlay: 2,
|
|
3661
|
+
outlined: false,
|
|
3662
|
+
variant: "default",
|
|
3663
|
+
__css: {
|
|
3664
|
+
minWidth: "7rem",
|
|
3665
|
+
maxWidth: "17.5rem",
|
|
3666
|
+
maxHeight: "18.75rem",
|
|
3667
|
+
borderRadius: 'extra-small',
|
|
3668
|
+
overflowY: 'auto',
|
|
3669
|
+
'[data-popper-placement="top"] &': {
|
|
3670
|
+
transformOrigin: 'bottom center'
|
|
3671
|
+
},
|
|
3672
|
+
'[data-popper-placement="bottom"] &': {
|
|
3673
|
+
transformOrigin: 'top center'
|
|
3674
|
+
},
|
|
3675
|
+
animation: `${growAnimation} .12s ${EASING_STANDARD}`,
|
|
3676
|
+
...__css
|
|
3677
|
+
},
|
|
3678
|
+
...props
|
|
3679
|
+
})); /////////////////////////////////////////////////////
|
|
3707
3680
|
// MenuItem
|
|
3708
3681
|
|
|
3709
|
-
const MenuItem = /*#__PURE__*/react$1.forwardRef((
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
|
-
ref: ref
|
|
3719
|
-
}, props));
|
|
3720
|
-
}); /////////////////////////////////////////////////////
|
|
3682
|
+
const MenuItem$1 = /*#__PURE__*/react$1.forwardRef(({
|
|
3683
|
+
as = 'li',
|
|
3684
|
+
...props
|
|
3685
|
+
}, ref) => /*#__PURE__*/jsxRuntime.jsx(core.MenuItem, {
|
|
3686
|
+
as: ListItem,
|
|
3687
|
+
innerAs: as,
|
|
3688
|
+
ref: ref,
|
|
3689
|
+
...props
|
|
3690
|
+
})); /////////////////////////////////////////////////////
|
|
3721
3691
|
// MenuButton
|
|
3722
3692
|
|
|
3723
|
-
const MenuButton = /*#__PURE__*/react$1.forwardRef((
|
|
3724
|
-
|
|
3725
|
-
|
|
3726
|
-
|
|
3727
|
-
|
|
3728
|
-
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
|
|
3693
|
+
const MenuButton = /*#__PURE__*/react$1.forwardRef(({
|
|
3694
|
+
as = 'button',
|
|
3695
|
+
...props
|
|
3696
|
+
}, ref) => /*#__PURE__*/jsxRuntime.jsx(core.MenuButton, {
|
|
3697
|
+
as: Button,
|
|
3698
|
+
innerAs: as,
|
|
3699
|
+
ref: ref,
|
|
3700
|
+
...props
|
|
3701
|
+
})); /////////////////////////////////////////////////////
|
|
3702
|
+
// ContextMenuTrigger
|
|
3703
|
+
|
|
3704
|
+
const ContextMenuTrigger = /*#__PURE__*/react$1.forwardRef(({
|
|
3705
|
+
as = 'div',
|
|
3706
|
+
...props
|
|
3707
|
+
}, ref) => /*#__PURE__*/jsxRuntime.jsx(core.ContextMenuTrigger, {
|
|
3708
|
+
as: Box,
|
|
3709
|
+
innerAs: as,
|
|
3710
|
+
ref: ref,
|
|
3711
|
+
...props
|
|
3712
|
+
})); /////////////////////////////////////////////////////
|
|
3735
3713
|
// MenuPopover
|
|
3736
3714
|
|
|
3737
3715
|
const MenuPopoverCore = core.MenuPopover;
|
|
3738
|
-
const MenuPopover = /*#__PURE__*/react$1.forwardRef((
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3716
|
+
const MenuPopover = /*#__PURE__*/react$1.forwardRef(({
|
|
3717
|
+
as,
|
|
3718
|
+
__css,
|
|
3719
|
+
...props
|
|
3720
|
+
}, ref) => /*#__PURE__*/jsxRuntime.jsx(MenuPopoverCore, {
|
|
3721
|
+
as: Box,
|
|
3722
|
+
innerAs: as,
|
|
3723
|
+
ref: ref,
|
|
3724
|
+
__css: {
|
|
3725
|
+
zIndex: 'tooltip',
|
|
3726
|
+
...__css
|
|
3727
|
+
},
|
|
3728
|
+
...props
|
|
3729
|
+
}));
|
|
3744
3730
|
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
__css
|
|
3750
|
-
|
|
3751
|
-
|
|
3752
|
-
|
|
3731
|
+
const NavRailIndicator = /*#__PURE__*/react$1.forwardRef(function NavRailIndicator(props, forwardedRef) {
|
|
3732
|
+
const {
|
|
3733
|
+
as = 'div',
|
|
3734
|
+
children,
|
|
3735
|
+
__css,
|
|
3736
|
+
...otherProps
|
|
3737
|
+
} = props;
|
|
3738
|
+
return /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
3739
|
+
color: "currentColor",
|
|
3740
|
+
ref: forwardedRef,
|
|
3741
|
+
as: as,
|
|
3742
|
+
"data-nav-rail-item-indicator": "",
|
|
3743
|
+
...otherProps,
|
|
3744
|
+
__css: {
|
|
3745
|
+
width: '100%',
|
|
3746
|
+
height: '100%',
|
|
3747
|
+
maxWidth: "3.5rem",
|
|
3748
|
+
maxHeight: "3.5rem",
|
|
3749
|
+
borderRadius: 'full',
|
|
3750
|
+
bg: 'var(--indicator-background-color)',
|
|
3751
|
+
display: 'flex',
|
|
3752
|
+
alignItems: 'center',
|
|
3753
|
+
justifyContent: 'center',
|
|
3754
|
+
minHeight: "2rem",
|
|
3755
|
+
transition: `background-color .2s ${EASING_STANDARD}`,
|
|
3756
|
+
pointerEvents: 'none',
|
|
3757
|
+
...__css
|
|
3758
|
+
},
|
|
3759
|
+
children: children
|
|
3760
|
+
});
|
|
3761
|
+
});
|
|
3762
|
+
const NavRailLabel = /*#__PURE__*/react$1.forwardRef(function NavRailLabel(props, forwardedRef) {
|
|
3763
|
+
const {
|
|
3764
|
+
as = 'div',
|
|
3765
|
+
children,
|
|
3766
|
+
__css,
|
|
3767
|
+
...otherProps
|
|
3768
|
+
} = props;
|
|
3769
|
+
return /*#__PURE__*/jsxRuntime.jsx(Text, {
|
|
3770
|
+
ref: forwardedRef,
|
|
3771
|
+
as: as,
|
|
3772
|
+
variant: "label-small",
|
|
3773
|
+
lineHeight: 1,
|
|
3774
|
+
...otherProps,
|
|
3775
|
+
__css: {
|
|
3776
|
+
pt: "0.25rem",
|
|
3777
|
+
pb: "0.75rem",
|
|
3778
|
+
color: 'inherit',
|
|
3779
|
+
pointerEvents: 'none',
|
|
3780
|
+
...__css
|
|
3781
|
+
},
|
|
3782
|
+
children: children
|
|
3783
|
+
});
|
|
3784
|
+
});
|
|
3785
|
+
const NavRailItem = /*#__PURE__*/react$1.forwardRef(function NavRailItem(props, forwardedRef) {
|
|
3786
|
+
const {
|
|
3787
|
+
as = 'button',
|
|
3788
|
+
children,
|
|
3789
|
+
color = 'primary-container',
|
|
3790
|
+
selected = false,
|
|
3791
|
+
disabled = false,
|
|
3792
|
+
style,
|
|
3793
|
+
onKeyDown,
|
|
3794
|
+
onPointerDown,
|
|
3795
|
+
__css,
|
|
3796
|
+
...otherProps
|
|
3797
|
+
} = props;
|
|
3798
|
+
const theme = useTheme();
|
|
3799
|
+
const baseOpacity = 0,
|
|
3800
|
+
hoverOpacity = 0.04,
|
|
3801
|
+
focusOpacity = 0.12,
|
|
3802
|
+
pressedOpacity = 0.12;
|
|
3803
|
+
const ripple = useRippleSurface({
|
|
3804
|
+
rippleColor: 'currentColor',
|
|
3805
|
+
onKeyDown,
|
|
3806
|
+
onPointerDown,
|
|
3807
|
+
baseOpacity,
|
|
3808
|
+
hoverOpacity,
|
|
3809
|
+
focusOpacity,
|
|
3810
|
+
pressedOpacity
|
|
3811
|
+
}); // Apply ripple from nav item to nav indicator
|
|
3812
|
+
|
|
3813
|
+
const rippleCss = react$1.useMemo(() => {
|
|
3814
|
+
const ret = {};
|
|
3815
|
+
const keys = Object.keys(ripple.__css);
|
|
3816
|
+
|
|
3817
|
+
for (const key of keys) {
|
|
3818
|
+
if (!key.startsWith('&')) {
|
|
3819
|
+
ret['& [data-nav-rail-item-indicator]'] = ret['& [data-nav-rail-item-indicator]'] || {};
|
|
3820
|
+
ret['& [data-nav-rail-item-indicator]'][key] = ripple.__css[key];
|
|
3821
|
+
continue;
|
|
3822
|
+
}
|
|
3823
|
+
|
|
3824
|
+
const newKey = key.replace(/(.+?)::(before|after)/g, '$1 [data-nav-rail-item-indicator]::$2');
|
|
3825
|
+
ret[newKey] = ripple.__css[key];
|
|
3826
|
+
}
|
|
3827
|
+
|
|
3828
|
+
return ret;
|
|
3829
|
+
}, [ripple.__css]);
|
|
3830
|
+
return /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
3831
|
+
ref: forwardedRef,
|
|
3832
|
+
as: as,
|
|
3833
|
+
...otherProps,
|
|
3834
|
+
onPointerDown: ripple.onPointerDown,
|
|
3835
|
+
onKeyDown: ripple.onKeyDown,
|
|
3836
|
+
"aria-pressed": selected,
|
|
3837
|
+
type: "button",
|
|
3838
|
+
style: { ...ripple.style,
|
|
3839
|
+
...style
|
|
3840
|
+
},
|
|
3841
|
+
disabled: disabled,
|
|
3842
|
+
__css: {
|
|
3843
|
+
display: 'flex',
|
|
3844
|
+
flexDirection: 'column',
|
|
3845
|
+
alignItems: 'center',
|
|
3846
|
+
transition: `color .2s ${EASING_STANDARD}`,
|
|
3847
|
+
color: selected ? `on.${color}` : 'on.surface-variant',
|
|
3848
|
+
'--indicator-background-color': selected ? styledSystem.get(theme, `colors.${color}`) : 'transparent',
|
|
3849
|
+
border: 'none',
|
|
3850
|
+
':focus': {
|
|
3851
|
+
outline: 'none'
|
|
3852
|
+
},
|
|
3853
|
+
backgroundColor: 'transparent',
|
|
3854
|
+
margin: 0,
|
|
3855
|
+
padding: 0,
|
|
3856
|
+
px: "0.75rem",
|
|
3857
|
+
minHeight: "3.75rem",
|
|
3858
|
+
height: "3.75rem",
|
|
3859
|
+
cursor: 'pointer',
|
|
3860
|
+
textDecoration: 'none',
|
|
3861
|
+
WebkitTapHighlightColor: 'transparent',
|
|
3862
|
+
...rippleCss,
|
|
3863
|
+
...__css
|
|
3864
|
+
},
|
|
3865
|
+
children: children
|
|
3866
|
+
});
|
|
3753
3867
|
});
|
|
3754
3868
|
|
|
3755
3869
|
const innerDivRotate = react.keyframes({
|
|
3756
3870
|
'0%': {
|
|
3757
|
-
|
|
3871
|
+
transform: 'rotate(-90deg)'
|
|
3758
3872
|
},
|
|
3759
3873
|
'100%': {
|
|
3760
|
-
transform: 'rotate(
|
|
3874
|
+
transform: 'rotate(270deg)'
|
|
3761
3875
|
}
|
|
3762
3876
|
});
|
|
3763
3877
|
const circleIndeterminate = react.keyframes({
|
|
@@ -3780,32 +3894,33 @@ const ProgressSpinner = /*#__PURE__*/react$1.forwardRef(function ProgressSpinner
|
|
|
3780
3894
|
__css,
|
|
3781
3895
|
progress: progressProp,
|
|
3782
3896
|
thickness = 3.6,
|
|
3783
|
-
size = 40
|
|
3784
|
-
|
|
3785
|
-
|
|
3786
|
-
|
|
3897
|
+
size = 40,
|
|
3898
|
+
...otherProps
|
|
3899
|
+
} = props;
|
|
3787
3900
|
const indeterminate = progressProp === undefined;
|
|
3788
|
-
const progress = progressProp
|
|
3901
|
+
const progress = progressProp ?? 0;
|
|
3789
3902
|
const circumference = 2 * Math.PI * ((SIZE - thickness) / 2);
|
|
3790
|
-
return /*#__PURE__*/jsxRuntime.jsx(Box,
|
|
3791
|
-
ref: forwardedRef
|
|
3792
|
-
|
|
3793
|
-
__css:
|
|
3903
|
+
return /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
3904
|
+
ref: forwardedRef,
|
|
3905
|
+
...otherProps,
|
|
3906
|
+
__css: {
|
|
3794
3907
|
color: 'primary',
|
|
3795
3908
|
display: 'inline-block',
|
|
3796
3909
|
width: polished.rem(size),
|
|
3797
|
-
height: polished.rem(size)
|
|
3798
|
-
|
|
3910
|
+
height: polished.rem(size),
|
|
3911
|
+
...__css
|
|
3912
|
+
},
|
|
3799
3913
|
children: /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
3800
|
-
__css:
|
|
3914
|
+
__css: {
|
|
3801
3915
|
display: 'inline-block',
|
|
3802
3916
|
width: '100%',
|
|
3803
|
-
height: '100%'
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
|
|
3917
|
+
height: '100%',
|
|
3918
|
+
transformOrigin: '50% 50%',
|
|
3919
|
+
transform: 'rotate(-90deg)',
|
|
3920
|
+
...(indeterminate && {
|
|
3921
|
+
animation: `${innerDivRotate} 1.4s linear infinite`
|
|
3922
|
+
})
|
|
3923
|
+
},
|
|
3809
3924
|
children: /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
3810
3925
|
as: "svg",
|
|
3811
3926
|
viewBox: "22 22 44 44",
|
|
@@ -3822,26 +3937,23 @@ const ProgressSpinner = /*#__PURE__*/react$1.forwardRef(function ProgressSpinner
|
|
|
3822
3937
|
strokeDashoffset: `${((100 - progress) / 100 * circumference).toFixed(3)}px`
|
|
3823
3938
|
},
|
|
3824
3939
|
__css: indeterminate ? {
|
|
3825
|
-
animation: `${circleIndeterminate} 1.4s ease-in-out infinite
|
|
3826
|
-
strokeDasharray: '80px, 200px',
|
|
3827
|
-
strokeDashoffset: '0px'
|
|
3940
|
+
animation: `${circleIndeterminate} 1.4s ease-in-out infinite`
|
|
3828
3941
|
} : {
|
|
3829
|
-
transition:
|
|
3942
|
+
transition: `stroke-dashoffset 300ms ${EASING_STANDARD} 0ms`,
|
|
3830
3943
|
strokeDasharray: circumference.toFixed(3)
|
|
3831
3944
|
}
|
|
3832
3945
|
})
|
|
3833
3946
|
})
|
|
3834
3947
|
})
|
|
3835
|
-
})
|
|
3948
|
+
});
|
|
3836
3949
|
});
|
|
3837
3950
|
|
|
3838
3951
|
const RadioButtonIcon = /*#__PURE__*/react$1.forwardRef(function RadioButtonIcon(props, forwardedRef) {
|
|
3839
3952
|
const {
|
|
3840
|
-
checked
|
|
3841
|
-
|
|
3842
|
-
|
|
3843
|
-
|
|
3844
|
-
return /*#__PURE__*/jsxRuntime.jsx(Box, _extends__default['default']({
|
|
3953
|
+
checked,
|
|
3954
|
+
...otherProps
|
|
3955
|
+
} = props;
|
|
3956
|
+
return /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
3845
3957
|
ref: forwardedRef,
|
|
3846
3958
|
__css: {
|
|
3847
3959
|
borderColor: 'currentColor',
|
|
@@ -3851,19 +3963,19 @@ const RadioButtonIcon = /*#__PURE__*/react$1.forwardRef(function RadioButtonIcon
|
|
|
3851
3963
|
width: '100%',
|
|
3852
3964
|
height: '100%',
|
|
3853
3965
|
p: "0.1875rem"
|
|
3854
|
-
}
|
|
3855
|
-
|
|
3966
|
+
},
|
|
3967
|
+
...otherProps,
|
|
3856
3968
|
children: /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
3857
3969
|
__css: {
|
|
3858
3970
|
backgroundColor: 'currentColor',
|
|
3859
3971
|
borderRadius: 'full',
|
|
3860
3972
|
width: '100%',
|
|
3861
3973
|
height: '100%',
|
|
3862
|
-
transition:
|
|
3974
|
+
transition: `transform .12s ${EASING_STANDARD} 0ms,background-color .12s ${EASING_STANDARD} 0ms`,
|
|
3863
3975
|
transform: checked ? 'scale(1)' : 'scale(0)'
|
|
3864
3976
|
}
|
|
3865
3977
|
})
|
|
3866
|
-
})
|
|
3978
|
+
});
|
|
3867
3979
|
});
|
|
3868
3980
|
|
|
3869
3981
|
const RadioButtonInner = /*#__PURE__*/react$1.forwardRef(function RadioButtonInner(props, forwardedRef) {
|
|
@@ -3871,17 +3983,16 @@ const RadioButtonInner = /*#__PURE__*/react$1.forwardRef(function RadioButtonInn
|
|
|
3871
3983
|
innerAs: as,
|
|
3872
3984
|
checked,
|
|
3873
3985
|
disabled,
|
|
3874
|
-
__css
|
|
3875
|
-
|
|
3876
|
-
|
|
3877
|
-
|
|
3986
|
+
__css,
|
|
3987
|
+
...otherProps
|
|
3988
|
+
} = props;
|
|
3878
3989
|
const color = 'primary';
|
|
3879
3990
|
const theme = useTheme();
|
|
3880
3991
|
return /*#__PURE__*/jsxRuntime.jsxs(Box, {
|
|
3881
3992
|
position: "relative",
|
|
3882
3993
|
display: "inline-block",
|
|
3883
3994
|
minWidth: "auto",
|
|
3884
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(RippleBox,
|
|
3995
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(RippleBox, {
|
|
3885
3996
|
as: as,
|
|
3886
3997
|
checked: checked,
|
|
3887
3998
|
ref: forwardedRef,
|
|
@@ -3892,7 +4003,7 @@ const RadioButtonInner = /*#__PURE__*/react$1.forwardRef(function RadioButtonInn
|
|
|
3892
4003
|
center: true,
|
|
3893
4004
|
disabled: disabled,
|
|
3894
4005
|
theme: theme,
|
|
3895
|
-
__css:
|
|
4006
|
+
__css: {
|
|
3896
4007
|
top: 0,
|
|
3897
4008
|
left: 0,
|
|
3898
4009
|
width: "2.5rem",
|
|
@@ -3904,9 +4015,11 @@ const RadioButtonInner = /*#__PURE__*/react$1.forwardRef(function RadioButtonInn
|
|
|
3904
4015
|
border: 'none',
|
|
3905
4016
|
borderRadius: 'full',
|
|
3906
4017
|
zIndex: 1,
|
|
3907
|
-
position: 'absolute'
|
|
3908
|
-
|
|
3909
|
-
|
|
4018
|
+
position: 'absolute',
|
|
4019
|
+
...__css
|
|
4020
|
+
},
|
|
4021
|
+
...otherProps
|
|
4022
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
3910
4023
|
__css: {
|
|
3911
4024
|
position: 'relative',
|
|
3912
4025
|
top: 0,
|
|
@@ -3933,16 +4046,17 @@ const RadioButton = /*#__PURE__*/react$1.forwardRef(function RadioButton(props,
|
|
|
3933
4046
|
const {
|
|
3934
4047
|
as = 'input',
|
|
3935
4048
|
children,
|
|
3936
|
-
disabled
|
|
3937
|
-
|
|
3938
|
-
|
|
4049
|
+
disabled,
|
|
4050
|
+
...otherProps
|
|
4051
|
+
} = props;
|
|
3939
4052
|
|
|
3940
|
-
const inner = /*#__PURE__*/jsxRuntime.jsx(core.RadioButton,
|
|
4053
|
+
const inner = /*#__PURE__*/jsxRuntime.jsx(core.RadioButton, {
|
|
3941
4054
|
as: RadioButtonInner,
|
|
3942
4055
|
innerAs: as,
|
|
3943
4056
|
ref: forwardedRef,
|
|
3944
|
-
disabled: disabled
|
|
3945
|
-
|
|
4057
|
+
disabled: disabled,
|
|
4058
|
+
...otherProps
|
|
4059
|
+
});
|
|
3946
4060
|
|
|
3947
4061
|
if (!children) {
|
|
3948
4062
|
return inner;
|
|
@@ -3958,54 +4072,40 @@ const RadioButton = /*#__PURE__*/react$1.forwardRef(function RadioButton(props,
|
|
|
3958
4072
|
|
|
3959
4073
|
const RadioGroup = /*#__PURE__*/react$1.forwardRef(function RadioGroup(props, forwardedRef) {
|
|
3960
4074
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
3961
|
-
const
|
|
3962
|
-
|
|
3963
|
-
|
|
4075
|
+
const {
|
|
4076
|
+
as,
|
|
4077
|
+
...otherProps
|
|
4078
|
+
} = props;
|
|
4079
|
+
return /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
3964
4080
|
as: core.RadioGroup,
|
|
3965
|
-
ref: forwardedRef
|
|
3966
|
-
|
|
4081
|
+
ref: forwardedRef,
|
|
4082
|
+
...otherProps
|
|
4083
|
+
});
|
|
3967
4084
|
});
|
|
3968
4085
|
|
|
3969
|
-
const Select$1 = /*#__PURE__*/react$1.forwardRef((
|
|
3970
|
-
|
|
3971
|
-
|
|
3972
|
-
|
|
3973
|
-
props = _objectWithoutPropertiesLoose__default['default'](_ref, ["as"]);
|
|
3974
|
-
|
|
4086
|
+
const Select$1 = /*#__PURE__*/react$1.forwardRef(({
|
|
4087
|
+
as: asProp = 'select',
|
|
4088
|
+
...props
|
|
4089
|
+
}, forwardedRef) => {
|
|
3975
4090
|
const InputSelect = Input;
|
|
3976
|
-
return /*#__PURE__*/jsxRuntime.jsx(InputSelect,
|
|
4091
|
+
return /*#__PURE__*/jsxRuntime.jsx(InputSelect, {
|
|
3977
4092
|
as: asProp,
|
|
3978
|
-
ref: forwardedRef
|
|
3979
|
-
}, props));
|
|
3980
|
-
});
|
|
3981
|
-
const SelectButtonInner = /*#__PURE__*/react$1.forwardRef((_ref2, forwardedRef) => {
|
|
3982
|
-
let {
|
|
3983
|
-
innerAs = 'div'
|
|
3984
|
-
} = _ref2,
|
|
3985
|
-
props = _objectWithoutPropertiesLoose__default['default'](_ref2, ["innerAs"]);
|
|
3986
|
-
|
|
3987
|
-
const InputButton = Input;
|
|
3988
|
-
return /*#__PURE__*/jsxRuntime.jsx(InputButton, _extends__default['default']({
|
|
3989
|
-
as: innerAs,
|
|
3990
4093
|
ref: forwardedRef,
|
|
3991
|
-
|
|
3992
|
-
}
|
|
3993
|
-
});
|
|
3994
|
-
const SelectButton = /*#__PURE__*/react$1.forwardRef((_ref3, ref) => {
|
|
3995
|
-
let {
|
|
3996
|
-
as,
|
|
3997
|
-
children
|
|
3998
|
-
} = _ref3,
|
|
3999
|
-
props = _objectWithoutPropertiesLoose__default['default'](_ref3, ["as", "children"]);
|
|
4000
|
-
|
|
4001
|
-
return /*#__PURE__*/jsxRuntime.jsx(core.MenuButton, _extends__default['default']({
|
|
4002
|
-
as: SelectButtonInner,
|
|
4003
|
-
innerAs: as,
|
|
4004
|
-
ref: ref
|
|
4005
|
-
}, props, {
|
|
4006
|
-
children: children
|
|
4007
|
-
}));
|
|
4094
|
+
...props
|
|
4095
|
+
});
|
|
4008
4096
|
});
|
|
4097
|
+
const SelectButton = /*#__PURE__*/react$1.forwardRef(({
|
|
4098
|
+
as = 'div',
|
|
4099
|
+
children,
|
|
4100
|
+
...props
|
|
4101
|
+
}, ref) => /*#__PURE__*/jsxRuntime.jsx(core.MenuButton, {
|
|
4102
|
+
as: Input,
|
|
4103
|
+
innerAs: as,
|
|
4104
|
+
ref: ref,
|
|
4105
|
+
tabIndex: 0,
|
|
4106
|
+
...props,
|
|
4107
|
+
children: children
|
|
4108
|
+
}));
|
|
4009
4109
|
|
|
4010
4110
|
const selectContext = /*#__PURE__*/react$1.createContext({
|
|
4011
4111
|
native: false,
|
|
@@ -4019,11 +4119,10 @@ const useSelectContext = () => react$1.useContext(selectContext);
|
|
|
4019
4119
|
|
|
4020
4120
|
const SelectIcon = /*#__PURE__*/react$1.forwardRef(function SelectIcon(props, forwardedRef) {
|
|
4021
4121
|
const {
|
|
4022
|
-
open
|
|
4023
|
-
|
|
4024
|
-
|
|
4025
|
-
|
|
4026
|
-
return /*#__PURE__*/jsxRuntime.jsx(Box, _extends__default['default']({
|
|
4122
|
+
open,
|
|
4123
|
+
...otherProps
|
|
4124
|
+
} = props;
|
|
4125
|
+
return /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
4027
4126
|
ref: forwardedRef,
|
|
4028
4127
|
as: "svg",
|
|
4029
4128
|
"aria-hidden": true,
|
|
@@ -4037,14 +4136,14 @@ const SelectIcon = /*#__PURE__*/react$1.forwardRef(function SelectIcon(props, fo
|
|
|
4037
4136
|
color: open ? 'primary' : alpha('on.surface', 0.54),
|
|
4038
4137
|
pointerEvents: 'none',
|
|
4039
4138
|
transform: open ? 'rotate(180deg)' : undefined,
|
|
4040
|
-
transition:
|
|
4041
|
-
}
|
|
4042
|
-
|
|
4139
|
+
transition: `transform .15s ${EASING_STANDARD}, color .15s ${EASING_STANDARD}`
|
|
4140
|
+
},
|
|
4141
|
+
...otherProps,
|
|
4043
4142
|
children: /*#__PURE__*/jsxRuntime.jsx("path", {
|
|
4044
4143
|
fill: "currentColor",
|
|
4045
4144
|
d: "M7 10l5 5 5-5z"
|
|
4046
4145
|
})
|
|
4047
|
-
})
|
|
4146
|
+
});
|
|
4048
4147
|
});
|
|
4049
4148
|
|
|
4050
4149
|
const makeDefaultRender = children => val => {
|
|
@@ -4070,10 +4169,9 @@ const componentMap = {
|
|
|
4070
4169
|
filled: FilledContainer
|
|
4071
4170
|
};
|
|
4072
4171
|
const Select = /*#__PURE__*/react$1.forwardRef(function Select(props, forwardedRef) {
|
|
4073
|
-
var _buttonRef$current;
|
|
4074
|
-
|
|
4075
4172
|
const {
|
|
4076
4173
|
id: idProp,
|
|
4174
|
+
name,
|
|
4077
4175
|
variant = 'outlined',
|
|
4078
4176
|
color = 'primary',
|
|
4079
4177
|
value: valueProp,
|
|
@@ -4089,10 +4187,9 @@ const Select = /*#__PURE__*/react$1.forwardRef(function Select(props, forwardedR
|
|
|
4089
4187
|
native = false,
|
|
4090
4188
|
children,
|
|
4091
4189
|
renderValue: renderValueProp,
|
|
4092
|
-
leadingIcon = null
|
|
4093
|
-
|
|
4094
|
-
|
|
4095
|
-
|
|
4190
|
+
leadingIcon = null,
|
|
4191
|
+
...otherProps
|
|
4192
|
+
} = props;
|
|
4096
4193
|
const [value, onChange] = core.useControlledState(valueProp, onChangeProp, defaultValue, setState => (e, v) => {
|
|
4097
4194
|
setState(v);
|
|
4098
4195
|
});
|
|
@@ -4146,7 +4243,10 @@ const Select = /*#__PURE__*/react$1.forwardRef(function Select(props, forwardedR
|
|
|
4146
4243
|
display: "inline-flex",
|
|
4147
4244
|
flexDirection: "column",
|
|
4148
4245
|
width: "100%",
|
|
4149
|
-
children: [/*#__PURE__*/jsxRuntime.
|
|
4246
|
+
children: [!native && /*#__PURE__*/jsxRuntime.jsx("input", {
|
|
4247
|
+
type: "hidden",
|
|
4248
|
+
name: name
|
|
4249
|
+
}), /*#__PURE__*/jsxRuntime.jsxs(Container, {
|
|
4150
4250
|
theme: theme,
|
|
4151
4251
|
label: label,
|
|
4152
4252
|
color: color,
|
|
@@ -4163,7 +4263,7 @@ const Select = /*#__PURE__*/react$1.forwardRef(function Select(props, forwardedR
|
|
|
4163
4263
|
children: [leadingIcon && /*#__PURE__*/jsxRuntime.jsx(IconContainer, {
|
|
4164
4264
|
position: "start",
|
|
4165
4265
|
children: leadingIcon
|
|
4166
|
-
}), /*#__PURE__*/jsxRuntime.jsx(Comp,
|
|
4266
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Comp, {
|
|
4167
4267
|
ref: core.assignMultipleRefs(forwardedRef, buttonRef),
|
|
4168
4268
|
variant: variant,
|
|
4169
4269
|
id: inputId,
|
|
@@ -4178,17 +4278,22 @@ const Select = /*#__PURE__*/react$1.forwardRef(function Select(props, forwardedR
|
|
|
4178
4278
|
"aria-describedby": helperTextId,
|
|
4179
4279
|
hasLabel: !!label,
|
|
4180
4280
|
leadingIcon: Boolean(leadingIcon),
|
|
4181
|
-
|
|
4182
|
-
|
|
4281
|
+
name: native ? name : undefined,
|
|
4282
|
+
trailingIcon: true,
|
|
4283
|
+
...otherProps,
|
|
4183
4284
|
children: native ? children : renderValue(value)
|
|
4184
|
-
})
|
|
4285
|
+
}), !native && /*#__PURE__*/jsxRuntime.jsx(MenuPopover, {
|
|
4185
4286
|
usePortal: true,
|
|
4186
4287
|
children: /*#__PURE__*/jsxRuntime.jsx(MenuList, {
|
|
4187
4288
|
defaultActiveItemValue: value,
|
|
4188
4289
|
style: {
|
|
4189
|
-
minWidth: buttonRef
|
|
4290
|
+
minWidth: buttonRef?.current?.offsetWidth
|
|
4190
4291
|
},
|
|
4191
4292
|
role: "listbox",
|
|
4293
|
+
__css: {
|
|
4294
|
+
'& [data-menu-item=""]': { ...listItemStyle('primary')
|
|
4295
|
+
}
|
|
4296
|
+
},
|
|
4192
4297
|
children: children
|
|
4193
4298
|
})
|
|
4194
4299
|
})]
|
|
@@ -4205,6 +4310,15 @@ const Select = /*#__PURE__*/react$1.forwardRef(function Select(props, forwardedR
|
|
|
4205
4310
|
});
|
|
4206
4311
|
});
|
|
4207
4312
|
|
|
4313
|
+
const MenuItem = /*#__PURE__*/react$1.forwardRef(({
|
|
4314
|
+
as = 'li',
|
|
4315
|
+
...props
|
|
4316
|
+
}, ref) => /*#__PURE__*/jsxRuntime.jsx(core.MenuItem, {
|
|
4317
|
+
as: Box,
|
|
4318
|
+
innerAs: as,
|
|
4319
|
+
ref: ref,
|
|
4320
|
+
...props
|
|
4321
|
+
}));
|
|
4208
4322
|
const ZERO_WIDTH_SPACE = '\u200b';
|
|
4209
4323
|
const SelectItem = /*#__PURE__*/react$1.forwardRef(function SelectItem(props, forwardedRef) {
|
|
4210
4324
|
const {
|
|
@@ -4212,10 +4326,9 @@ const SelectItem = /*#__PURE__*/react$1.forwardRef(function SelectItem(props, fo
|
|
|
4212
4326
|
onSelect: onSelectProp,
|
|
4213
4327
|
children,
|
|
4214
4328
|
value: valueProp,
|
|
4215
|
-
disabled
|
|
4216
|
-
|
|
4217
|
-
|
|
4218
|
-
|
|
4329
|
+
disabled,
|
|
4330
|
+
...otherProps
|
|
4331
|
+
} = props;
|
|
4219
4332
|
const {
|
|
4220
4333
|
native,
|
|
4221
4334
|
onSelect,
|
|
@@ -4224,13 +4337,13 @@ const SelectItem = /*#__PURE__*/react$1.forwardRef(function SelectItem(props, fo
|
|
|
4224
4337
|
const value = valueProp !== undefined && valueProp !== null ? String(valueProp) : children;
|
|
4225
4338
|
|
|
4226
4339
|
if (native) {
|
|
4227
|
-
return /*#__PURE__*/jsxRuntime.jsx("option",
|
|
4340
|
+
return /*#__PURE__*/jsxRuntime.jsx("option", {
|
|
4228
4341
|
ref: forwardedRef,
|
|
4229
4342
|
value: value,
|
|
4230
|
-
disabled: disabled
|
|
4231
|
-
|
|
4343
|
+
disabled: disabled,
|
|
4344
|
+
...otherProps,
|
|
4232
4345
|
children: children
|
|
4233
|
-
})
|
|
4346
|
+
});
|
|
4234
4347
|
}
|
|
4235
4348
|
|
|
4236
4349
|
if (children === undefined && disabled) {
|
|
@@ -4238,17 +4351,18 @@ const SelectItem = /*#__PURE__*/react$1.forwardRef(function SelectItem(props, fo
|
|
|
4238
4351
|
}
|
|
4239
4352
|
|
|
4240
4353
|
const selected = value === String(selectedValue);
|
|
4241
|
-
return /*#__PURE__*/jsxRuntime.jsx(Comp,
|
|
4354
|
+
return /*#__PURE__*/jsxRuntime.jsx(Comp, {
|
|
4242
4355
|
as: MenuItem,
|
|
4243
4356
|
onSelect: core.wrapEvent(onSelectProp, onSelect),
|
|
4244
4357
|
"data-value": value,
|
|
4245
4358
|
disabled: disabled,
|
|
4246
4359
|
ref: forwardedRef,
|
|
4247
4360
|
role: "option",
|
|
4248
|
-
selected: selected
|
|
4249
|
-
|
|
4361
|
+
"aria-selected": selected ? 'true' : undefined,
|
|
4362
|
+
selected: selected,
|
|
4363
|
+
...otherProps,
|
|
4250
4364
|
children: children || ZERO_WIDTH_SPACE
|
|
4251
|
-
})
|
|
4365
|
+
});
|
|
4252
4366
|
});
|
|
4253
4367
|
|
|
4254
4368
|
const pulseAnimation = react.keyframes({
|
|
@@ -4298,22 +4412,24 @@ const Skeleton = /*#__PURE__*/react$1.forwardRef(function Skeleton(props, forwar
|
|
|
4298
4412
|
const {
|
|
4299
4413
|
as = 'span',
|
|
4300
4414
|
__css,
|
|
4301
|
-
animation = 'pulse'
|
|
4302
|
-
|
|
4303
|
-
|
|
4304
|
-
|
|
4415
|
+
animation = 'pulse',
|
|
4416
|
+
...otherProps
|
|
4417
|
+
} = props;
|
|
4305
4418
|
const theme = useTheme();
|
|
4306
|
-
return /*#__PURE__*/jsxRuntime.jsx(Box,
|
|
4419
|
+
return /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
4307
4420
|
ref: forwardedRef,
|
|
4308
4421
|
as: as,
|
|
4309
|
-
__css:
|
|
4422
|
+
__css: {
|
|
4310
4423
|
height: '1.2em',
|
|
4311
4424
|
display: 'inline-block',
|
|
4312
|
-
backgroundColor: alpha('on.surface', 0.11)
|
|
4313
|
-
|
|
4314
|
-
|
|
4315
|
-
|
|
4316
|
-
|
|
4425
|
+
backgroundColor: alpha('on.surface', 0.11),
|
|
4426
|
+
...(animation === 'pulse' ? pulseAnimationStyle() : waveAnimationStyle({
|
|
4427
|
+
theme
|
|
4428
|
+
})),
|
|
4429
|
+
...__css
|
|
4430
|
+
},
|
|
4431
|
+
...otherProps
|
|
4432
|
+
});
|
|
4317
4433
|
});
|
|
4318
4434
|
|
|
4319
4435
|
const appearAnimation = react.keyframes({
|
|
@@ -4329,18 +4445,219 @@ const appearAnimation = react.keyframes({
|
|
|
4329
4445
|
const DelayAppearance = /*#__PURE__*/react$1.forwardRef(function DelayAppearance(props, forwardedRef) {
|
|
4330
4446
|
const {
|
|
4331
4447
|
timeoutInMilliseconds = 500,
|
|
4332
|
-
__css
|
|
4333
|
-
|
|
4334
|
-
|
|
4335
|
-
|
|
4336
|
-
return /*#__PURE__*/jsxRuntime.jsx(Box, _extends__default['default']({
|
|
4448
|
+
__css,
|
|
4449
|
+
...otherProps
|
|
4450
|
+
} = props;
|
|
4451
|
+
return /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
4337
4452
|
ref: forwardedRef,
|
|
4338
4453
|
timeoutInMilliseconds: timeoutInMilliseconds,
|
|
4339
|
-
__css:
|
|
4454
|
+
__css: {
|
|
4340
4455
|
animation: `0s linear ${timeoutInMilliseconds}ms forwards ${appearAnimation}`,
|
|
4341
|
-
visibility: 'hidden'
|
|
4342
|
-
|
|
4343
|
-
|
|
4456
|
+
visibility: 'hidden',
|
|
4457
|
+
...__css
|
|
4458
|
+
},
|
|
4459
|
+
...otherProps
|
|
4460
|
+
});
|
|
4461
|
+
});
|
|
4462
|
+
|
|
4463
|
+
const SliderInput = /*#__PURE__*/react$1.forwardRef(({
|
|
4464
|
+
as = 'div',
|
|
4465
|
+
__css,
|
|
4466
|
+
...props
|
|
4467
|
+
}, ref) => /*#__PURE__*/jsxRuntime.jsx(core.SliderInput, {
|
|
4468
|
+
as: Box,
|
|
4469
|
+
innerAs: as,
|
|
4470
|
+
ref: ref,
|
|
4471
|
+
...props,
|
|
4472
|
+
__css: {
|
|
4473
|
+
maxWidth: '100%',
|
|
4474
|
+
cursor: 'pointer',
|
|
4475
|
+
'&[data-orientation="horizontal"]': {
|
|
4476
|
+
height: "0.25rem"
|
|
4477
|
+
},
|
|
4478
|
+
'&[data-orientation="vertical"]': {
|
|
4479
|
+
width: "0.25rem",
|
|
4480
|
+
height: '250px',
|
|
4481
|
+
maxHeight: '100%'
|
|
4482
|
+
},
|
|
4483
|
+
'&[data-disabled]': {
|
|
4484
|
+
opacity: 0.5,
|
|
4485
|
+
pointerEvents: 'none'
|
|
4486
|
+
},
|
|
4487
|
+
...__css
|
|
4488
|
+
}
|
|
4489
|
+
})); /////////////////////////////////////////////////////
|
|
4490
|
+
// SliderHandle
|
|
4491
|
+
|
|
4492
|
+
const SliderHandle = /*#__PURE__*/react$1.forwardRef(({
|
|
4493
|
+
as = 'div',
|
|
4494
|
+
__css,
|
|
4495
|
+
children,
|
|
4496
|
+
...props
|
|
4497
|
+
}, ref) => /*#__PURE__*/jsxRuntime.jsxs(core.SliderHandle, {
|
|
4498
|
+
as: RippleBox,
|
|
4499
|
+
innerAs: as,
|
|
4500
|
+
ref: ref,
|
|
4501
|
+
rippleColor: "currentColor",
|
|
4502
|
+
hoverOpacity: 0.12,
|
|
4503
|
+
focusOpacity: 0.24,
|
|
4504
|
+
pressedOpacity: 0.24,
|
|
4505
|
+
mouseFocus: true,
|
|
4506
|
+
center: true,
|
|
4507
|
+
__css: {
|
|
4508
|
+
position: 'relative',
|
|
4509
|
+
width: "2.5rem",
|
|
4510
|
+
height: "2.5rem",
|
|
4511
|
+
color: 'primary',
|
|
4512
|
+
borderRadius: 'full',
|
|
4513
|
+
zIndex: 1,
|
|
4514
|
+
transformOrigin: 'center',
|
|
4515
|
+
userSelect: 'none',
|
|
4516
|
+
'&[aria-orientation="horizontal"]': {
|
|
4517
|
+
top: '50%',
|
|
4518
|
+
transform: 'translateY(-50%)'
|
|
4519
|
+
},
|
|
4520
|
+
'&[aria-orientation="horizontal"]:focus': {
|
|
4521
|
+
transform: 'translateY(-50%)'
|
|
4522
|
+
},
|
|
4523
|
+
'&[aria-orientation="vertical"]': {
|
|
4524
|
+
left: '50%',
|
|
4525
|
+
transform: 'translateX(-50%)'
|
|
4526
|
+
},
|
|
4527
|
+
':focus': {
|
|
4528
|
+
outline: 'none'
|
|
4529
|
+
},
|
|
4530
|
+
...__css
|
|
4531
|
+
},
|
|
4532
|
+
...props,
|
|
4533
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
4534
|
+
__css: {
|
|
4535
|
+
bg: 'currentColor',
|
|
4536
|
+
width: '50%',
|
|
4537
|
+
height: '50%',
|
|
4538
|
+
borderRadius: 'full',
|
|
4539
|
+
pointerEvents: 'none',
|
|
4540
|
+
position: 'absolute',
|
|
4541
|
+
top: '50%',
|
|
4542
|
+
left: '50%',
|
|
4543
|
+
transform: 'translate(-50%, -50%)',
|
|
4544
|
+
boxShadow: 1
|
|
4545
|
+
}
|
|
4546
|
+
}), children]
|
|
4547
|
+
})); /////////////////////////////////////////////////////
|
|
4548
|
+
// SliderMarker
|
|
4549
|
+
|
|
4550
|
+
const SliderMarker = /*#__PURE__*/react$1.forwardRef(({
|
|
4551
|
+
as = 'div',
|
|
4552
|
+
__css,
|
|
4553
|
+
...props
|
|
4554
|
+
}, ref) => /*#__PURE__*/jsxRuntime.jsx(core.SliderMarker, {
|
|
4555
|
+
as: Box,
|
|
4556
|
+
innerAs: as,
|
|
4557
|
+
ref: ref,
|
|
4558
|
+
...props,
|
|
4559
|
+
__css: {
|
|
4560
|
+
transformOrigin: 'center',
|
|
4561
|
+
borderRadius: 'full',
|
|
4562
|
+
width: '2px',
|
|
4563
|
+
height: '2px',
|
|
4564
|
+
'&[data-orientation="horizontal"]': {
|
|
4565
|
+
top: '50%',
|
|
4566
|
+
transform: 'translate(-50%, -50%)'
|
|
4567
|
+
},
|
|
4568
|
+
'&[data-orientation="vertical"]': {
|
|
4569
|
+
left: '50%',
|
|
4570
|
+
transform: 'translate(-50%, -50%)'
|
|
4571
|
+
},
|
|
4572
|
+
opacity: 0.38,
|
|
4573
|
+
bg: 'on.surface-variant',
|
|
4574
|
+
'&[data-state="at-value"],&[data-state="under-value"]': {
|
|
4575
|
+
bg: 'on.primary'
|
|
4576
|
+
},
|
|
4577
|
+
...__css
|
|
4578
|
+
}
|
|
4579
|
+
})); /////////////////////////////////////////////////////
|
|
4580
|
+
// SliderTrack
|
|
4581
|
+
|
|
4582
|
+
const SliderTrack = /*#__PURE__*/react$1.forwardRef(({
|
|
4583
|
+
as = 'div',
|
|
4584
|
+
__css,
|
|
4585
|
+
...props
|
|
4586
|
+
}, ref) => /*#__PURE__*/jsxRuntime.jsx(core.SliderTrack, {
|
|
4587
|
+
as: Box,
|
|
4588
|
+
innerAs: as,
|
|
4589
|
+
ref: ref,
|
|
4590
|
+
...props,
|
|
4591
|
+
__css: {
|
|
4592
|
+
position: 'relative',
|
|
4593
|
+
borderRadius: 'full',
|
|
4594
|
+
bg: 'surface-variant',
|
|
4595
|
+
'&[data-orientation="horizontal"]': {
|
|
4596
|
+
width: '100%',
|
|
4597
|
+
height: 'inherit'
|
|
4598
|
+
},
|
|
4599
|
+
'&[data-orientation="vertical"]': {
|
|
4600
|
+
width: 'inherit',
|
|
4601
|
+
height: '100%'
|
|
4602
|
+
},
|
|
4603
|
+
'&::before': {
|
|
4604
|
+
content: '""',
|
|
4605
|
+
position: 'absolute'
|
|
4606
|
+
},
|
|
4607
|
+
'&[data-orientation="horizontal"]::before': {
|
|
4608
|
+
width: '100%',
|
|
4609
|
+
height: '1.5rem',
|
|
4610
|
+
top: 'calc(-0.5rem - 1px)',
|
|
4611
|
+
left: '0'
|
|
4612
|
+
},
|
|
4613
|
+
'&[data-orientation="vertical"]::before': {
|
|
4614
|
+
width: '1.5rem',
|
|
4615
|
+
height: '100%',
|
|
4616
|
+
top: '0',
|
|
4617
|
+
left: 'calc(-0.5rem - 1px)'
|
|
4618
|
+
},
|
|
4619
|
+
...__css
|
|
4620
|
+
}
|
|
4621
|
+
})); /////////////////////////////////////////////////////
|
|
4622
|
+
// SliderRange
|
|
4623
|
+
|
|
4624
|
+
const SliderRange = /*#__PURE__*/react$1.forwardRef(({
|
|
4625
|
+
as = 'div',
|
|
4626
|
+
__css,
|
|
4627
|
+
...props
|
|
4628
|
+
}, ref) => /*#__PURE__*/jsxRuntime.jsx(core.SliderRange, {
|
|
4629
|
+
as: Box,
|
|
4630
|
+
innerAs: as,
|
|
4631
|
+
ref: ref,
|
|
4632
|
+
__css: {
|
|
4633
|
+
borderRadius: 'inherit',
|
|
4634
|
+
bg: 'primary',
|
|
4635
|
+
left: '0',
|
|
4636
|
+
bottom: '0',
|
|
4637
|
+
top: '50%',
|
|
4638
|
+
'&[data-orientation="horizontal"]': {
|
|
4639
|
+
height: '100%'
|
|
4640
|
+
},
|
|
4641
|
+
'&[data-orientation="vertical"]': {
|
|
4642
|
+
width: '100%'
|
|
4643
|
+
},
|
|
4644
|
+
transform: 'translateY(-50%)',
|
|
4645
|
+
...__css
|
|
4646
|
+
},
|
|
4647
|
+
...props
|
|
4648
|
+
}));
|
|
4649
|
+
const Slider = /*#__PURE__*/react$1.forwardRef(function Slider(props, forwardedRef) {
|
|
4650
|
+
const {
|
|
4651
|
+
children,
|
|
4652
|
+
...otherProps
|
|
4653
|
+
} = props;
|
|
4654
|
+
return /*#__PURE__*/jsxRuntime.jsx(SliderInput, { ...otherProps,
|
|
4655
|
+
ref: forwardedRef,
|
|
4656
|
+
"data-reach-slider": "",
|
|
4657
|
+
children: /*#__PURE__*/jsxRuntime.jsxs(SliderTrack, {
|
|
4658
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(SliderRange, {}), /*#__PURE__*/jsxRuntime.jsx(SliderHandle, {}), children]
|
|
4659
|
+
})
|
|
4660
|
+
});
|
|
4344
4661
|
});
|
|
4345
4662
|
|
|
4346
4663
|
const StackItemContext = /*#__PURE__*/react$1.createContext(null);
|
|
@@ -4371,9 +4688,7 @@ function useStackItem({
|
|
|
4371
4688
|
}
|
|
4372
4689
|
|
|
4373
4690
|
react$1.useLayoutEffect(() => {
|
|
4374
|
-
|
|
4375
|
-
|
|
4376
|
-
const height = (_ref$current$getBound = (_ref$current = ref.current) == null ? void 0 : _ref$current.getBoundingClientRect().height) != null ? _ref$current$getBound : 0;
|
|
4691
|
+
const height = ref.current?.getBoundingClientRect().height ?? 0;
|
|
4377
4692
|
onSetHeight(height);
|
|
4378
4693
|
|
|
4379
4694
|
if (isExiting) {
|
|
@@ -4510,7 +4825,7 @@ const StackProvider = ({
|
|
|
4510
4825
|
const onAddItemRef = react$1.useRef(null);
|
|
4511
4826
|
|
|
4512
4827
|
function onAddItem(element) {
|
|
4513
|
-
onAddItemRef.current
|
|
4828
|
+
onAddItemRef.current?.(element);
|
|
4514
4829
|
}
|
|
4515
4830
|
|
|
4516
4831
|
return /*#__PURE__*/jsxRuntime.jsxs(StackContext.Provider, {
|
|
@@ -4642,7 +4957,7 @@ const commonStyle = {
|
|
|
4642
4957
|
};
|
|
4643
4958
|
|
|
4644
4959
|
function getTransition(timems) {
|
|
4645
|
-
return `opacity ${timems}ms
|
|
4960
|
+
return `opacity ${timems}ms ${EASING_STANDARD},transform ${timems}ms ${EASING_STANDARD}`;
|
|
4646
4961
|
}
|
|
4647
4962
|
|
|
4648
4963
|
const defaultAnimation = {
|
|
@@ -4681,28 +4996,34 @@ function useSnackbarAnimation(ref, timeout) {
|
|
|
4681
4996
|
switch (state) {
|
|
4682
4997
|
case 'entering':
|
|
4683
4998
|
return {
|
|
4684
|
-
style:
|
|
4999
|
+
style: { ...animateFn('entering', translateY),
|
|
4685
5000
|
visibility: 'hidden'
|
|
4686
|
-
}
|
|
4687
|
-
placementStyle:
|
|
5001
|
+
},
|
|
5002
|
+
placementStyle: { ...placementStyle,
|
|
5003
|
+
...commonStyle
|
|
5004
|
+
},
|
|
4688
5005
|
onClose
|
|
4689
5006
|
};
|
|
4690
5007
|
|
|
4691
5008
|
case 'entered':
|
|
4692
5009
|
return {
|
|
4693
|
-
style:
|
|
5010
|
+
style: { ...animateFn('entered', translateY),
|
|
4694
5011
|
transition: getTransition(TRANSITION_TIME)
|
|
4695
|
-
}
|
|
4696
|
-
placementStyle:
|
|
5012
|
+
},
|
|
5013
|
+
placementStyle: { ...placementStyle,
|
|
5014
|
+
...commonStyle
|
|
5015
|
+
},
|
|
4697
5016
|
onClose
|
|
4698
5017
|
};
|
|
4699
5018
|
|
|
4700
5019
|
case 'exiting':
|
|
4701
5020
|
return {
|
|
4702
|
-
style:
|
|
5021
|
+
style: { ...animateFn('exiting', translateY),
|
|
4703
5022
|
transition: getTransition(TRANSITION_TIME)
|
|
4704
|
-
}
|
|
4705
|
-
placementStyle:
|
|
5023
|
+
},
|
|
5024
|
+
placementStyle: { ...placementStyle,
|
|
5025
|
+
...commonStyle
|
|
5026
|
+
},
|
|
4706
5027
|
onClose
|
|
4707
5028
|
};
|
|
4708
5029
|
}
|
|
@@ -4710,31 +5031,29 @@ function useSnackbarAnimation(ref, timeout) {
|
|
|
4710
5031
|
|
|
4711
5032
|
const Snackbar = /*#__PURE__*/react$1.forwardRef(function Snackbar(props, forwardedRef) {
|
|
4712
5033
|
const {
|
|
4713
|
-
|
|
4714
|
-
} =
|
|
5034
|
+
colorScheme
|
|
5035
|
+
} = dynamicTheme.useColorScheme();
|
|
4715
5036
|
const ref = react$1.useRef(null);
|
|
4716
|
-
|
|
4717
5037
|
const {
|
|
4718
5038
|
__css,
|
|
4719
5039
|
action,
|
|
4720
5040
|
children,
|
|
4721
5041
|
style: styleProp,
|
|
4722
5042
|
timeout = 5000,
|
|
4723
|
-
dismissible
|
|
4724
|
-
|
|
4725
|
-
|
|
4726
|
-
|
|
5043
|
+
dismissible,
|
|
5044
|
+
...otherProps
|
|
5045
|
+
} = props;
|
|
4727
5046
|
const {
|
|
4728
5047
|
onClose,
|
|
4729
5048
|
placementStyle,
|
|
4730
5049
|
style
|
|
4731
5050
|
} = useSnackbarAnimation(ref, timeout);
|
|
4732
|
-
return /*#__PURE__*/jsxRuntime.jsxs(Paper,
|
|
5051
|
+
return /*#__PURE__*/jsxRuntime.jsxs(Paper, {
|
|
4733
5052
|
elevation: 4,
|
|
4734
5053
|
darkThemeBackgroundOverlay: 4,
|
|
4735
|
-
className:
|
|
5054
|
+
className: colorScheme === 'light' ? dynamicTheme.DARK_SCHEME_CLASS : dynamicTheme.LIGHT_SCHEME_CLASS,
|
|
4736
5055
|
ref: core.assignMultipleRefs(forwardedRef, ref),
|
|
4737
|
-
__css:
|
|
5056
|
+
__css: {
|
|
4738
5057
|
boxShadow: 4,
|
|
4739
5058
|
py: "0.375rem",
|
|
4740
5059
|
pl: 3,
|
|
@@ -4745,12 +5064,16 @@ const Snackbar = /*#__PURE__*/react$1.forwardRef(function Snackbar(props, forwar
|
|
|
4745
5064
|
borderRadius: 'extra-small',
|
|
4746
5065
|
color: 'on.surface',
|
|
4747
5066
|
flexDirection: 'row',
|
|
4748
|
-
willChange: 'transform,opacity'
|
|
4749
|
-
|
|
4750
|
-
|
|
4751
|
-
|
|
5067
|
+
willChange: 'transform,opacity',
|
|
5068
|
+
...placementStyle,
|
|
5069
|
+
...__css
|
|
5070
|
+
},
|
|
5071
|
+
style: { ...style,
|
|
5072
|
+
...styleProp
|
|
5073
|
+
},
|
|
5074
|
+
...otherProps,
|
|
4752
5075
|
children: [/*#__PURE__*/jsxRuntime.jsx(Text, {
|
|
4753
|
-
variant: "
|
|
5076
|
+
variant: "body-medium",
|
|
4754
5077
|
as: "span",
|
|
4755
5078
|
py: 2,
|
|
4756
5079
|
children: children
|
|
@@ -4764,7 +5087,7 @@ const Snackbar = /*#__PURE__*/react$1.forwardRef(function Snackbar(props, forwar
|
|
|
4764
5087
|
onClick: onClose
|
|
4765
5088
|
}) : action
|
|
4766
5089
|
})]
|
|
4767
|
-
})
|
|
5090
|
+
});
|
|
4768
5091
|
});
|
|
4769
5092
|
|
|
4770
5093
|
const BORDER_WIDTH = 2;
|
|
@@ -4774,93 +5097,85 @@ const CIRCLE_SIZE_INACTIVE_CHECKED = 24;
|
|
|
4774
5097
|
const CIRCLE_SIZE_ACTIVE_CHECKED = 28;
|
|
4775
5098
|
const CIRCLE_SIZE_INACTIVE_UNCHECKED = 16;
|
|
4776
5099
|
const CIRCLE_SIZE_ACTIVE_UNCHECKED = 28;
|
|
4777
|
-
const SwitchTrail = (
|
|
4778
|
-
|
|
4779
|
-
|
|
4780
|
-
|
|
4781
|
-
|
|
4782
|
-
|
|
4783
|
-
|
|
4784
|
-
|
|
4785
|
-
|
|
4786
|
-
|
|
4787
|
-
|
|
4788
|
-
|
|
4789
|
-
|
|
4790
|
-
|
|
4791
|
-
backgroundColor: checked ? 'primary' : 'surface-variant',
|
|
4792
|
-
borderColor: checked ? 'primary' : 'outline'
|
|
4793
|
-
}, disabled && {
|
|
5100
|
+
const SwitchTrail = ({
|
|
5101
|
+
checked = false,
|
|
5102
|
+
disabled = false,
|
|
5103
|
+
...otherProps
|
|
5104
|
+
}) => /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
5105
|
+
__css: {
|
|
5106
|
+
width: polished.rem(TRAIL_WIDTH),
|
|
5107
|
+
height: polished.rem(TRAIL_HEIGHT),
|
|
5108
|
+
borderRadius: polished.rem(TRAIL_HEIGHT / 2),
|
|
5109
|
+
borderWidth: polished.rem(BORDER_WIDTH),
|
|
5110
|
+
borderStyle: 'solid',
|
|
5111
|
+
backgroundColor: checked ? 'primary' : 'surface-variant',
|
|
5112
|
+
borderColor: checked ? 'primary' : 'outline',
|
|
5113
|
+
...(disabled && {
|
|
4794
5114
|
opacity: 0.12,
|
|
4795
5115
|
backgroundColor: checked ? 'on.surface' : 'surface-variant',
|
|
4796
5116
|
borderColor: 'on.surface'
|
|
4797
5117
|
})
|
|
4798
|
-
},
|
|
4799
|
-
|
|
5118
|
+
},
|
|
5119
|
+
...otherProps
|
|
5120
|
+
});
|
|
4800
5121
|
const THUMB_SIZE = 40;
|
|
4801
|
-
const SwitchThumb = (
|
|
4802
|
-
|
|
4803
|
-
|
|
4804
|
-
|
|
4805
|
-
|
|
4806
|
-
|
|
4807
|
-
|
|
4808
|
-
|
|
4809
|
-
|
|
4810
|
-
|
|
4811
|
-
|
|
4812
|
-
|
|
4813
|
-
|
|
4814
|
-
|
|
4815
|
-
|
|
4816
|
-
|
|
4817
|
-
|
|
4818
|
-
'& > input': {
|
|
4819
|
-
width: THUMB_SIZE,
|
|
4820
|
-
height: THUMB_SIZE
|
|
4821
|
-
}
|
|
5122
|
+
const SwitchThumb = ({
|
|
5123
|
+
checked = false,
|
|
5124
|
+
...otherProps
|
|
5125
|
+
}) => /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
5126
|
+
position: "absolute",
|
|
5127
|
+
width: polished.rem(THUMB_SIZE),
|
|
5128
|
+
height: polished.rem(THUMB_SIZE),
|
|
5129
|
+
borderRadius: "full",
|
|
5130
|
+
left: '50%',
|
|
5131
|
+
top: '50%',
|
|
5132
|
+
__css: {
|
|
5133
|
+
transform: `translateX(calc(-50% ${checked ? '+' : '-'} ${polished.rem((TRAIL_WIDTH - CIRCLE_SIZE_INACTIVE_CHECKED - BORDER_WIDTH * 4) / 2)})) translateY(-50%)`,
|
|
5134
|
+
WebkitTapHighlightColor: 'transparent',
|
|
5135
|
+
transition: `background-color 90ms ${EASING_STANDARD},border-color 90ms ${EASING_STANDARD},transform 90ms ${EASING_STANDARD},height 90ms ${EASING_STANDARD},width 90ms ${EASING_STANDARD}`,
|
|
5136
|
+
'& > input': {
|
|
5137
|
+
width: THUMB_SIZE,
|
|
5138
|
+
height: THUMB_SIZE
|
|
4822
5139
|
}
|
|
4823
|
-
},
|
|
4824
|
-
|
|
4825
|
-
|
|
4826
|
-
|
|
4827
|
-
|
|
4828
|
-
|
|
4829
|
-
|
|
4830
|
-
|
|
4831
|
-
|
|
4832
|
-
|
|
4833
|
-
|
|
4834
|
-
|
|
4835
|
-
|
|
4836
|
-
|
|
4837
|
-
|
|
4838
|
-
|
|
4839
|
-
|
|
4840
|
-
|
|
4841
|
-
|
|
4842
|
-
|
|
4843
|
-
|
|
4844
|
-
|
|
4845
|
-
'[data-switch-thumb=""]:active ~ &, [data-switch-thumb=""]:focus-visible ~ &, [data-switch-thumb=""]:hover ~ &': {
|
|
4846
|
-
backgroundColor: checked ? 'primary-container' : 'on.surface-variant'
|
|
4847
|
-
},
|
|
4848
|
-
'[data-switch-thumb=""]:active ~ &, [data-switch-thumb=""]:focus-visible ~ &': {
|
|
4849
|
-
height: checked ? CIRCLE_SIZE_ACTIVE_CHECKED : CIRCLE_SIZE_ACTIVE_UNCHECKED,
|
|
4850
|
-
width: checked ? CIRCLE_SIZE_ACTIVE_CHECKED : CIRCLE_SIZE_ACTIVE_UNCHECKED
|
|
4851
|
-
},
|
|
4852
|
-
'[data-switch-thumb=""]:disabled ~ &': {
|
|
4853
|
-
opacity: checked ? 1 : 0.38,
|
|
4854
|
-
backgroundColor: checked ? 'surface' : 'on.surface',
|
|
4855
|
-
height: checked ? CIRCLE_SIZE_INACTIVE_CHECKED : CIRCLE_SIZE_INACTIVE_UNCHECKED,
|
|
4856
|
-
width: checked ? CIRCLE_SIZE_INACTIVE_CHECKED : CIRCLE_SIZE_INACTIVE_UNCHECKED
|
|
4857
|
-
}
|
|
5140
|
+
},
|
|
5141
|
+
...otherProps
|
|
5142
|
+
});
|
|
5143
|
+
const SwitchCircle = ({
|
|
5144
|
+
checked = false,
|
|
5145
|
+
...otherProps
|
|
5146
|
+
}) => /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
5147
|
+
__css: {
|
|
5148
|
+
position: 'absolute',
|
|
5149
|
+
width: checked ? polished.rem(CIRCLE_SIZE_INACTIVE_CHECKED) : polished.rem(CIRCLE_SIZE_INACTIVE_UNCHECKED),
|
|
5150
|
+
height: checked ? polished.rem(CIRCLE_SIZE_INACTIVE_CHECKED) : polished.rem(CIRCLE_SIZE_INACTIVE_UNCHECKED),
|
|
5151
|
+
boxSizing: 'border-box',
|
|
5152
|
+
borderRadius: 'full',
|
|
5153
|
+
pointerEvents: 'none',
|
|
5154
|
+
zIndex: 1,
|
|
5155
|
+
backgroundColor: checked ? 'on.primary' : 'outline',
|
|
5156
|
+
top: '50%',
|
|
5157
|
+
left: '50%',
|
|
5158
|
+
transform: 'translate(-50%, -50%)',
|
|
5159
|
+
transition: 'inherit',
|
|
5160
|
+
'[data-switch-thumb=""]:active ~ &, [data-switch-thumb=""]:focus-visible ~ &, [data-switch-thumb=""]:hover ~ &': {
|
|
5161
|
+
backgroundColor: checked ? 'primary-container' : 'on.surface-variant'
|
|
4858
5162
|
},
|
|
4859
|
-
|
|
4860
|
-
|
|
4861
|
-
|
|
4862
|
-
|
|
4863
|
-
|
|
5163
|
+
'[data-switch-thumb=""]:active ~ &, [data-switch-thumb=""]:focus-visible ~ &': {
|
|
5164
|
+
height: checked ? CIRCLE_SIZE_ACTIVE_CHECKED : CIRCLE_SIZE_ACTIVE_UNCHECKED,
|
|
5165
|
+
width: checked ? CIRCLE_SIZE_ACTIVE_CHECKED : CIRCLE_SIZE_ACTIVE_UNCHECKED
|
|
5166
|
+
},
|
|
5167
|
+
'[data-switch-thumb=""]:disabled ~ &': {
|
|
5168
|
+
opacity: checked ? 1 : 0.38,
|
|
5169
|
+
backgroundColor: checked ? 'surface' : 'on.surface',
|
|
5170
|
+
height: checked ? CIRCLE_SIZE_INACTIVE_CHECKED : CIRCLE_SIZE_INACTIVE_UNCHECKED,
|
|
5171
|
+
width: checked ? CIRCLE_SIZE_INACTIVE_CHECKED : CIRCLE_SIZE_INACTIVE_UNCHECKED
|
|
5172
|
+
}
|
|
5173
|
+
},
|
|
5174
|
+
"data-switch-circle": "",
|
|
5175
|
+
role: "presentation",
|
|
5176
|
+
"aria-hidden": "true",
|
|
5177
|
+
...otherProps
|
|
5178
|
+
});
|
|
4864
5179
|
|
|
4865
5180
|
const CheckBoxCore = core.CheckBox;
|
|
4866
5181
|
const SwitchInner = /*#__PURE__*/react$1.forwardRef(function SwitchInner(props, forwardedRef) {
|
|
@@ -4869,10 +5184,9 @@ const SwitchInner = /*#__PURE__*/react$1.forwardRef(function SwitchInner(props,
|
|
|
4869
5184
|
disabled,
|
|
4870
5185
|
checked,
|
|
4871
5186
|
onChange,
|
|
4872
|
-
__css
|
|
4873
|
-
|
|
4874
|
-
|
|
4875
|
-
|
|
5187
|
+
__css,
|
|
5188
|
+
...otherProps
|
|
5189
|
+
} = props;
|
|
4876
5190
|
const color = checked ? 'primary' : 'on.surface';
|
|
4877
5191
|
const theme = useTheme();
|
|
4878
5192
|
return /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
@@ -4886,7 +5200,7 @@ const SwitchInner = /*#__PURE__*/react$1.forwardRef(function SwitchInner(props,
|
|
|
4886
5200
|
disabled: disabled
|
|
4887
5201
|
}), /*#__PURE__*/jsxRuntime.jsxs(SwitchThumb, {
|
|
4888
5202
|
checked: checked,
|
|
4889
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(RippleBox,
|
|
5203
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(RippleBox, {
|
|
4890
5204
|
as: Comp,
|
|
4891
5205
|
role: "switch",
|
|
4892
5206
|
type: "checkbox",
|
|
@@ -4901,9 +5215,9 @@ const SwitchInner = /*#__PURE__*/react$1.forwardRef(function SwitchInner(props,
|
|
|
4901
5215
|
focusOpacity: 0.12,
|
|
4902
5216
|
center: true,
|
|
4903
5217
|
disabled: disabled,
|
|
4904
|
-
"data-switch-thumb": ""
|
|
4905
|
-
|
|
4906
|
-
__css:
|
|
5218
|
+
"data-switch-thumb": "",
|
|
5219
|
+
...otherProps,
|
|
5220
|
+
__css: {
|
|
4907
5221
|
top: '50%',
|
|
4908
5222
|
left: '50%',
|
|
4909
5223
|
backgroundColor: 'transparent',
|
|
@@ -4917,9 +5231,10 @@ const SwitchInner = /*#__PURE__*/react$1.forwardRef(function SwitchInner(props,
|
|
|
4917
5231
|
border: 'none',
|
|
4918
5232
|
borderRadius: 'full',
|
|
4919
5233
|
zIndex: 1,
|
|
4920
|
-
position: 'absolute'
|
|
4921
|
-
|
|
4922
|
-
|
|
5234
|
+
position: 'absolute',
|
|
5235
|
+
...__css
|
|
5236
|
+
}
|
|
5237
|
+
}), /*#__PURE__*/jsxRuntime.jsx(SwitchCircle, {
|
|
4923
5238
|
checked: checked
|
|
4924
5239
|
})]
|
|
4925
5240
|
})]
|
|
@@ -4930,16 +5245,17 @@ const Switch = /*#__PURE__*/react$1.forwardRef(function Switch(props, forwardedR
|
|
|
4930
5245
|
const {
|
|
4931
5246
|
as = 'input',
|
|
4932
5247
|
disabled,
|
|
4933
|
-
children
|
|
4934
|
-
|
|
4935
|
-
|
|
5248
|
+
children,
|
|
5249
|
+
...otherProps
|
|
5250
|
+
} = props;
|
|
4936
5251
|
|
|
4937
|
-
const inner = /*#__PURE__*/jsxRuntime.jsx(CheckBoxCore,
|
|
5252
|
+
const inner = /*#__PURE__*/jsxRuntime.jsx(CheckBoxCore, {
|
|
4938
5253
|
as: SwitchInner,
|
|
4939
5254
|
innerAs: as,
|
|
4940
5255
|
ref: forwardedRef,
|
|
4941
|
-
disabled: disabled
|
|
4942
|
-
|
|
5256
|
+
disabled: disabled,
|
|
5257
|
+
...otherProps
|
|
5258
|
+
});
|
|
4943
5259
|
|
|
4944
5260
|
if (!children) {
|
|
4945
5261
|
return inner;
|
|
@@ -4968,10 +5284,9 @@ const TabIndicator = /*#__PURE__*/react$1.forwardRef(function TabIndicator(props
|
|
|
4968
5284
|
const {
|
|
4969
5285
|
as = 'span',
|
|
4970
5286
|
selected,
|
|
4971
|
-
color = 'primary'
|
|
4972
|
-
|
|
4973
|
-
|
|
4974
|
-
|
|
5287
|
+
color = 'primary',
|
|
5288
|
+
...otherProps
|
|
5289
|
+
} = props;
|
|
4975
5290
|
const ref = react$1.useRef(null);
|
|
4976
5291
|
const {
|
|
4977
5292
|
currentIndicator
|
|
@@ -4998,7 +5313,7 @@ const TabIndicator = /*#__PURE__*/react$1.forwardRef(function TabIndicator(props
|
|
|
4998
5313
|
currentIndicator.current = ref.current;
|
|
4999
5314
|
}
|
|
5000
5315
|
}, [selected]);
|
|
5001
|
-
return /*#__PURE__*/jsxRuntime.jsx(Box,
|
|
5316
|
+
return /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
5002
5317
|
as: as,
|
|
5003
5318
|
ref: core.assignMultipleRefs(ref, forwardedRef),
|
|
5004
5319
|
width: "100%",
|
|
@@ -5010,10 +5325,11 @@ const TabIndicator = /*#__PURE__*/react$1.forwardRef(function TabIndicator(props
|
|
|
5010
5325
|
transform: `scale(1)`,
|
|
5011
5326
|
opacity: selected ? 1 : 0,
|
|
5012
5327
|
transformOrigin: 'left',
|
|
5013
|
-
transition:
|
|
5328
|
+
transition: `transform .25s ${EASING_STANDARD}`,
|
|
5014
5329
|
zIndex: 1
|
|
5015
|
-
}
|
|
5016
|
-
|
|
5330
|
+
},
|
|
5331
|
+
...otherProps
|
|
5332
|
+
});
|
|
5017
5333
|
});
|
|
5018
5334
|
|
|
5019
5335
|
const TabListContext = /*#__PURE__*/react$1.createContext({
|
|
@@ -5027,29 +5343,28 @@ const useTabListContext = () => react$1.useContext(TabListContext);
|
|
|
5027
5343
|
|
|
5028
5344
|
const TabListInner = /*#__PURE__*/react$1.forwardRef(function TabListInner(props, forwardedRef) {
|
|
5029
5345
|
const {
|
|
5030
|
-
innerAs
|
|
5031
|
-
|
|
5032
|
-
|
|
5033
|
-
|
|
5034
|
-
return /*#__PURE__*/jsxRuntime.jsx(Box, _extends__default['default']({
|
|
5346
|
+
innerAs,
|
|
5347
|
+
...otherProps
|
|
5348
|
+
} = props;
|
|
5349
|
+
return /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
5035
5350
|
as: innerAs,
|
|
5036
5351
|
ref: forwardedRef,
|
|
5037
5352
|
__css: {
|
|
5038
5353
|
minWidth: "22.5rem",
|
|
5039
5354
|
display: 'flex',
|
|
5040
5355
|
alignItems: 'center'
|
|
5041
|
-
}
|
|
5042
|
-
|
|
5356
|
+
},
|
|
5357
|
+
...otherProps
|
|
5358
|
+
});
|
|
5043
5359
|
});
|
|
5044
5360
|
const TabList = /*#__PURE__*/react$1.forwardRef(function TabList(props, forwardedRef) {
|
|
5045
5361
|
const {
|
|
5046
5362
|
as = 'div',
|
|
5047
5363
|
indicatorColor = 'primary',
|
|
5048
5364
|
textColor = 'on.surface',
|
|
5049
|
-
selectedTextColor
|
|
5050
|
-
|
|
5051
|
-
|
|
5052
|
-
|
|
5365
|
+
selectedTextColor,
|
|
5366
|
+
...otherProps
|
|
5367
|
+
} = props;
|
|
5053
5368
|
const currentIndicator = react$1.useRef(null);
|
|
5054
5369
|
return /*#__PURE__*/jsxRuntime.jsx(TabListProvider, {
|
|
5055
5370
|
value: {
|
|
@@ -5061,11 +5376,12 @@ const TabList = /*#__PURE__*/react$1.forwardRef(function TabList(props, forwarde
|
|
|
5061
5376
|
value: {
|
|
5062
5377
|
currentIndicator
|
|
5063
5378
|
},
|
|
5064
|
-
children: /*#__PURE__*/jsxRuntime.jsx(core.TabList,
|
|
5379
|
+
children: /*#__PURE__*/jsxRuntime.jsx(core.TabList, {
|
|
5065
5380
|
as: TabListInner,
|
|
5066
5381
|
innerAs: as,
|
|
5067
|
-
ref: forwardedRef
|
|
5068
|
-
|
|
5382
|
+
ref: forwardedRef,
|
|
5383
|
+
...otherProps
|
|
5384
|
+
})
|
|
5069
5385
|
})
|
|
5070
5386
|
});
|
|
5071
5387
|
});
|
|
@@ -5075,10 +5391,9 @@ const TabInner = /*#__PURE__*/react$1.forwardRef(function Tab(props, forwardedRe
|
|
|
5075
5391
|
innerAs,
|
|
5076
5392
|
selected,
|
|
5077
5393
|
children,
|
|
5078
|
-
disabled
|
|
5079
|
-
|
|
5080
|
-
|
|
5081
|
-
|
|
5394
|
+
disabled,
|
|
5395
|
+
...otherProps
|
|
5396
|
+
} = props;
|
|
5082
5397
|
const {
|
|
5083
5398
|
textColor,
|
|
5084
5399
|
indicatorColor,
|
|
@@ -5087,9 +5402,9 @@ const TabInner = /*#__PURE__*/react$1.forwardRef(function Tab(props, forwardedRe
|
|
|
5087
5402
|
return /*#__PURE__*/jsxRuntime.jsxs(Box, {
|
|
5088
5403
|
position: "relative",
|
|
5089
5404
|
display: "flex",
|
|
5090
|
-
|
|
5405
|
+
flex: 1,
|
|
5091
5406
|
flexDirection: "column",
|
|
5092
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(RippleBox,
|
|
5407
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(RippleBox, {
|
|
5093
5408
|
as: innerAs,
|
|
5094
5409
|
ref: forwardedRef,
|
|
5095
5410
|
rippleColor: indicatorColor,
|
|
@@ -5106,17 +5421,17 @@ const TabInner = /*#__PURE__*/react$1.forwardRef(function Tab(props, forwardedRe
|
|
|
5106
5421
|
},
|
|
5107
5422
|
width: '100%',
|
|
5108
5423
|
alignItems: 'center'
|
|
5109
|
-
}
|
|
5110
|
-
|
|
5424
|
+
},
|
|
5425
|
+
...otherProps,
|
|
5111
5426
|
children: /*#__PURE__*/jsxRuntime.jsx(Text, {
|
|
5112
5427
|
as: "span",
|
|
5113
|
-
variant: "
|
|
5428
|
+
variant: "label-large",
|
|
5114
5429
|
color: "inherit",
|
|
5115
5430
|
height: "100%",
|
|
5116
5431
|
textAlign: "center",
|
|
5117
5432
|
children: children
|
|
5118
5433
|
})
|
|
5119
|
-
})
|
|
5434
|
+
}), /*#__PURE__*/jsxRuntime.jsx(TabIndicator, {
|
|
5120
5435
|
selected: selected,
|
|
5121
5436
|
color: indicatorColor
|
|
5122
5437
|
})]
|
|
@@ -5124,59 +5439,58 @@ const TabInner = /*#__PURE__*/react$1.forwardRef(function Tab(props, forwardedRe
|
|
|
5124
5439
|
});
|
|
5125
5440
|
const Tab = /*#__PURE__*/react$1.forwardRef(function Tab(props, forwardedRef) {
|
|
5126
5441
|
const {
|
|
5127
|
-
as = 'button'
|
|
5128
|
-
|
|
5129
|
-
|
|
5130
|
-
|
|
5131
|
-
return /*#__PURE__*/jsxRuntime.jsx(core.Tab, _extends__default['default']({
|
|
5442
|
+
as = 'button',
|
|
5443
|
+
...otherProps
|
|
5444
|
+
} = props;
|
|
5445
|
+
return /*#__PURE__*/jsxRuntime.jsx(core.Tab, {
|
|
5132
5446
|
as: TabInner,
|
|
5133
5447
|
innerAs: as,
|
|
5134
|
-
ref: forwardedRef
|
|
5135
|
-
|
|
5448
|
+
ref: forwardedRef,
|
|
5449
|
+
...otherProps
|
|
5450
|
+
});
|
|
5136
5451
|
});
|
|
5137
5452
|
|
|
5138
5453
|
const TabPanelInner = /*#__PURE__*/react$1.forwardRef(function TabPanelInner(props, forwardedRef) {
|
|
5139
5454
|
const {
|
|
5140
|
-
innerAs
|
|
5141
|
-
|
|
5142
|
-
|
|
5143
|
-
|
|
5144
|
-
return /*#__PURE__*/jsxRuntime.jsx(Box, _extends__default['default']({
|
|
5455
|
+
innerAs,
|
|
5456
|
+
...otherProps
|
|
5457
|
+
} = props;
|
|
5458
|
+
return /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
5145
5459
|
as: innerAs,
|
|
5146
|
-
ref: forwardedRef
|
|
5147
|
-
|
|
5460
|
+
ref: forwardedRef,
|
|
5461
|
+
...otherProps
|
|
5462
|
+
});
|
|
5148
5463
|
});
|
|
5149
5464
|
const TabPanel = /*#__PURE__*/react$1.forwardRef(function TabPanel(props, forwardedRef) {
|
|
5150
5465
|
const {
|
|
5151
|
-
as = 'div'
|
|
5152
|
-
|
|
5153
|
-
|
|
5154
|
-
|
|
5155
|
-
return /*#__PURE__*/jsxRuntime.jsx(core.TabPanel, _extends__default['default']({
|
|
5466
|
+
as = 'div',
|
|
5467
|
+
...otherProps
|
|
5468
|
+
} = props;
|
|
5469
|
+
return /*#__PURE__*/jsxRuntime.jsx(core.TabPanel, {
|
|
5156
5470
|
as: TabPanelInner,
|
|
5157
5471
|
innerAs: as,
|
|
5158
|
-
ref: forwardedRef
|
|
5159
|
-
|
|
5472
|
+
ref: forwardedRef,
|
|
5473
|
+
...otherProps
|
|
5474
|
+
});
|
|
5160
5475
|
});
|
|
5161
5476
|
|
|
5162
5477
|
const Table = /*#__PURE__*/react$1.forwardRef((props, ref) => {
|
|
5163
5478
|
const {
|
|
5164
5479
|
children,
|
|
5165
|
-
elevation = 1
|
|
5166
|
-
|
|
5167
|
-
|
|
5168
|
-
|
|
5169
|
-
return /*#__PURE__*/jsxRuntime.jsx(Paper, _extends__default['default']({
|
|
5480
|
+
elevation = 1,
|
|
5481
|
+
...rest
|
|
5482
|
+
} = props;
|
|
5483
|
+
return /*#__PURE__*/jsxRuntime.jsx(Paper, {
|
|
5170
5484
|
ref: ref,
|
|
5171
5485
|
role: "table",
|
|
5172
5486
|
display: "flex",
|
|
5173
5487
|
width: "100%",
|
|
5174
5488
|
flexDirection: "column",
|
|
5175
5489
|
elevation: elevation,
|
|
5176
|
-
darkThemeBackgroundOverlay: elevation
|
|
5177
|
-
|
|
5490
|
+
darkThemeBackgroundOverlay: elevation,
|
|
5491
|
+
...rest,
|
|
5178
5492
|
children: children
|
|
5179
|
-
})
|
|
5493
|
+
});
|
|
5180
5494
|
});
|
|
5181
5495
|
|
|
5182
5496
|
const TableHeadContext = /*#__PURE__*/react$1.createContext(false);
|
|
@@ -5187,146 +5501,135 @@ const useTableHeadContext = () => react$1.useContext(TableHeadContext);
|
|
|
5187
5501
|
|
|
5188
5502
|
const TableBody = /*#__PURE__*/react$1.forwardRef((props, ref) => {
|
|
5189
5503
|
const {
|
|
5190
|
-
children
|
|
5191
|
-
|
|
5192
|
-
|
|
5193
|
-
|
|
5194
|
-
return /*#__PURE__*/jsxRuntime.jsx(Box, _extends__default['default']({
|
|
5504
|
+
children,
|
|
5505
|
+
...rest
|
|
5506
|
+
} = props;
|
|
5507
|
+
return /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
5195
5508
|
ref: ref,
|
|
5196
|
-
role: "rowgroup"
|
|
5197
|
-
|
|
5509
|
+
role: "rowgroup",
|
|
5510
|
+
...rest,
|
|
5198
5511
|
children: children
|
|
5199
|
-
})
|
|
5512
|
+
});
|
|
5200
5513
|
});
|
|
5201
5514
|
|
|
5202
5515
|
const TableHead = /*#__PURE__*/react$1.forwardRef((props, ref) => {
|
|
5203
5516
|
const {
|
|
5204
5517
|
children,
|
|
5205
|
-
__css
|
|
5206
|
-
|
|
5207
|
-
|
|
5208
|
-
|
|
5209
|
-
return /*#__PURE__*/jsxRuntime.jsx(TableBody, _extends__default['default']({
|
|
5518
|
+
__css,
|
|
5519
|
+
...rest
|
|
5520
|
+
} = props;
|
|
5521
|
+
return /*#__PURE__*/jsxRuntime.jsx(TableBody, {
|
|
5210
5522
|
ref: ref,
|
|
5211
|
-
__css:
|
|
5523
|
+
__css: {
|
|
5212
5524
|
borderBottomStyle: 'solid',
|
|
5213
5525
|
borderBottomWidth: "0.0625rem",
|
|
5214
|
-
borderBottomColor: alpha('on.surface', 0.12)
|
|
5215
|
-
|
|
5216
|
-
|
|
5526
|
+
borderBottomColor: alpha('on.surface', 0.12),
|
|
5527
|
+
...__css
|
|
5528
|
+
},
|
|
5529
|
+
...rest,
|
|
5217
5530
|
children: /*#__PURE__*/jsxRuntime.jsx(TableHeadProvider, {
|
|
5218
5531
|
value: true,
|
|
5219
5532
|
children: children
|
|
5220
5533
|
})
|
|
5221
|
-
})
|
|
5534
|
+
});
|
|
5222
5535
|
});
|
|
5223
5536
|
|
|
5224
5537
|
const TableCell = /*#__PURE__*/react$1.forwardRef((props, ref) => {
|
|
5225
5538
|
const {
|
|
5226
5539
|
children,
|
|
5227
|
-
__css
|
|
5228
|
-
|
|
5229
|
-
|
|
5230
|
-
|
|
5540
|
+
__css,
|
|
5541
|
+
...rest
|
|
5542
|
+
} = props;
|
|
5231
5543
|
const isHeadCell = useTableHeadContext();
|
|
5232
|
-
return /*#__PURE__*/jsxRuntime.jsx(Box,
|
|
5544
|
+
return /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
5233
5545
|
ref: ref,
|
|
5234
5546
|
px: 1,
|
|
5235
5547
|
py: 3,
|
|
5236
5548
|
role: isHeadCell ? 'columnheader' : 'cell',
|
|
5237
|
-
__css:
|
|
5549
|
+
__css: {
|
|
5238
5550
|
whiteSpace: 'nowrap',
|
|
5239
5551
|
overflow: 'hidden',
|
|
5240
5552
|
textOverflow: 'ellipsis',
|
|
5241
5553
|
fontWeight: isHeadCell ? 'medium' : undefined,
|
|
5242
|
-
color: 'on.surface'
|
|
5243
|
-
|
|
5244
|
-
|
|
5554
|
+
color: 'on.surface',
|
|
5555
|
+
...__css
|
|
5556
|
+
},
|
|
5557
|
+
...rest,
|
|
5245
5558
|
children: children
|
|
5246
|
-
})
|
|
5559
|
+
});
|
|
5247
5560
|
});
|
|
5248
5561
|
|
|
5249
5562
|
const TableRow = /*#__PURE__*/react$1.forwardRef((props, ref) => {
|
|
5250
5563
|
const {
|
|
5251
5564
|
children,
|
|
5252
|
-
__css
|
|
5253
|
-
|
|
5254
|
-
|
|
5255
|
-
|
|
5256
|
-
return /*#__PURE__*/jsxRuntime.jsx(Text, _extends__default['default']({
|
|
5565
|
+
__css,
|
|
5566
|
+
...rest
|
|
5567
|
+
} = props;
|
|
5568
|
+
return /*#__PURE__*/jsxRuntime.jsx(Text, {
|
|
5257
5569
|
ref: ref,
|
|
5258
5570
|
as: "div",
|
|
5259
5571
|
role: "row",
|
|
5260
5572
|
display: "flex",
|
|
5261
5573
|
flexDirection: "row",
|
|
5262
5574
|
width: "100%",
|
|
5263
|
-
variant: "
|
|
5575
|
+
variant: "body-medium",
|
|
5264
5576
|
px: 2,
|
|
5265
|
-
__css:
|
|
5577
|
+
__css: {
|
|
5266
5578
|
borderBottomStyle: 'solid',
|
|
5267
5579
|
borderBottomWidth: "0.0625rem",
|
|
5268
5580
|
borderBottomColor: alpha('on.surface', 0.12),
|
|
5269
5581
|
'&:last-of-type': {
|
|
5270
5582
|
borderBottom: 'none'
|
|
5271
|
-
}
|
|
5272
|
-
|
|
5273
|
-
|
|
5583
|
+
},
|
|
5584
|
+
...__css
|
|
5585
|
+
},
|
|
5586
|
+
...rest,
|
|
5274
5587
|
children: children
|
|
5275
|
-
})
|
|
5588
|
+
});
|
|
5276
5589
|
});
|
|
5277
5590
|
|
|
5278
5591
|
const BaseTooltip = core.Tooltip;
|
|
5279
5592
|
const Tooltip = /*#__PURE__*/react$1.forwardRef(function Tooltip(props, forwardedRef) {
|
|
5280
5593
|
const {
|
|
5281
5594
|
placement = 'bottom',
|
|
5282
|
-
__css
|
|
5283
|
-
|
|
5284
|
-
|
|
5285
|
-
|
|
5286
|
-
return /*#__PURE__*/jsxRuntime.jsx(BaseTooltip, _extends__default['default']({
|
|
5595
|
+
__css,
|
|
5596
|
+
...otherProps
|
|
5597
|
+
} = props;
|
|
5598
|
+
return /*#__PURE__*/jsxRuntime.jsx(BaseTooltip, {
|
|
5287
5599
|
as: core.Popper,
|
|
5288
5600
|
innerAs: Box,
|
|
5289
5601
|
ref: forwardedRef,
|
|
5290
5602
|
placement: placement,
|
|
5291
5603
|
distance: 8,
|
|
5292
|
-
__css:
|
|
5604
|
+
__css: {
|
|
5605
|
+
variant: ['text.body-medium', 'text.body-small'],
|
|
5293
5606
|
bg: alpha('#616161', 0.9),
|
|
5294
5607
|
color: '#fff',
|
|
5295
|
-
|
|
5296
|
-
|
|
5297
|
-
|
|
5298
|
-
|
|
5299
|
-
|
|
5300
|
-
|
|
5301
|
-
|
|
5302
|
-
|
|
5303
|
-
}, __css)
|
|
5304
|
-
}, otherProps));
|
|
5608
|
+
px: 2,
|
|
5609
|
+
py: 1,
|
|
5610
|
+
borderRadius: 'extra-small',
|
|
5611
|
+
zIndex: 'tooltip',
|
|
5612
|
+
...__css
|
|
5613
|
+
},
|
|
5614
|
+
...otherProps
|
|
5615
|
+
});
|
|
5305
5616
|
});
|
|
5306
5617
|
|
|
5307
5618
|
Object.defineProperty(exports, 'Menu', {
|
|
5308
5619
|
enumerable: true,
|
|
5309
|
-
get: function () {
|
|
5310
|
-
return core.Menu;
|
|
5311
|
-
}
|
|
5620
|
+
get: function () { return core.Menu; }
|
|
5312
5621
|
});
|
|
5313
5622
|
Object.defineProperty(exports, 'TabPanels', {
|
|
5314
5623
|
enumerable: true,
|
|
5315
|
-
get: function () {
|
|
5316
|
-
return core.TabPanels;
|
|
5317
|
-
}
|
|
5624
|
+
get: function () { return core.TabPanels; }
|
|
5318
5625
|
});
|
|
5319
5626
|
Object.defineProperty(exports, 'Tabs', {
|
|
5320
5627
|
enumerable: true,
|
|
5321
|
-
get: function () {
|
|
5322
|
-
return core.Tabs;
|
|
5323
|
-
}
|
|
5628
|
+
get: function () { return core.Tabs; }
|
|
5324
5629
|
});
|
|
5325
5630
|
Object.defineProperty(exports, 'useComboBoxContext', {
|
|
5326
5631
|
enumerable: true,
|
|
5327
|
-
get: function () {
|
|
5328
|
-
return core.useComboBoxContext;
|
|
5329
|
-
}
|
|
5632
|
+
get: function () { return core.useComboBoxContext; }
|
|
5330
5633
|
});
|
|
5331
5634
|
exports.Alert = Alert;
|
|
5332
5635
|
exports.AppBar = AppBar;
|
|
@@ -5341,8 +5644,6 @@ exports.ButtonGroup = ButtonGroup;
|
|
|
5341
5644
|
exports.CheckBox = CheckBox;
|
|
5342
5645
|
exports.Chip = ButtonChip;
|
|
5343
5646
|
exports.ChoiceChip = ChoiceChip;
|
|
5344
|
-
exports.ColorModeContext = ColorModeContext;
|
|
5345
|
-
exports.ColorModeProvider = ColorModeProvider;
|
|
5346
5647
|
exports.Combobox = Combobox;
|
|
5347
5648
|
exports.ComboboxButton = ComboboxButton;
|
|
5348
5649
|
exports.ComboboxInput = ComboboxInput;
|
|
@@ -5350,11 +5651,17 @@ exports.ComboboxLabel = ComboboxLabel;
|
|
|
5350
5651
|
exports.ComboboxList = ComboboxList;
|
|
5351
5652
|
exports.ComboboxOption = ComboboxOption;
|
|
5352
5653
|
exports.ComboboxPopover = ComboboxPopover;
|
|
5353
|
-
exports.
|
|
5354
|
-
exports.DEFAULT_THEME_CLASS = DEFAULT_THEME_CLASS;
|
|
5654
|
+
exports.ContextMenuTrigger = ContextMenuTrigger;
|
|
5355
5655
|
exports.DelayAppearance = DelayAppearance;
|
|
5356
5656
|
exports.Dialog = Dialog;
|
|
5357
5657
|
exports.Divider = Divider;
|
|
5658
|
+
exports.EASING_EMPHASIZED = EASING_EMPHASIZED;
|
|
5659
|
+
exports.EASING_EMPHASIZED_ACCELERATE = EASING_EMPHASIZED_ACCELERATE;
|
|
5660
|
+
exports.EASING_EMPHASIZED_DECELERATE = EASING_EMPHASIZED_DECELERATE;
|
|
5661
|
+
exports.EASING_LINEAR = EASING_LINEAR;
|
|
5662
|
+
exports.EASING_STANDARD = EASING_STANDARD;
|
|
5663
|
+
exports.EASING_STANDARD_ACCELERATE = EASING_STANDARD_ACCELERATE;
|
|
5664
|
+
exports.EASING_STANDARD_DECELERATE = EASING_STANDARD_DECELERATE;
|
|
5358
5665
|
exports.FilledContainer = FilledContainer;
|
|
5359
5666
|
exports.FloatingLabel = FloatingLabel;
|
|
5360
5667
|
exports.HelperText = HelperText;
|
|
@@ -5364,9 +5671,12 @@ exports.List = List;
|
|
|
5364
5671
|
exports.ListItem = ListItem;
|
|
5365
5672
|
exports.ListItemText = ListItemText;
|
|
5366
5673
|
exports.MenuButton = MenuButton;
|
|
5367
|
-
exports.MenuItem = MenuItem;
|
|
5674
|
+
exports.MenuItem = MenuItem$1;
|
|
5368
5675
|
exports.MenuList = MenuList;
|
|
5369
5676
|
exports.MenuPopover = MenuPopover;
|
|
5677
|
+
exports.NavRailIndicator = NavRailIndicator;
|
|
5678
|
+
exports.NavRailItem = NavRailItem;
|
|
5679
|
+
exports.NavRailLabel = NavRailLabel;
|
|
5370
5680
|
exports.NotchedOutline = NotchedOutline;
|
|
5371
5681
|
exports.OutlinedContainer = OutlinedContainer;
|
|
5372
5682
|
exports.Paper = Paper;
|
|
@@ -5378,10 +5688,15 @@ exports.RippleBox = RippleBox;
|
|
|
5378
5688
|
exports.Select = Select;
|
|
5379
5689
|
exports.SelectItem = SelectItem;
|
|
5380
5690
|
exports.Skeleton = Skeleton;
|
|
5691
|
+
exports.Slider = Slider;
|
|
5692
|
+
exports.SliderHandle = SliderHandle;
|
|
5693
|
+
exports.SliderInput = SliderInput;
|
|
5694
|
+
exports.SliderMarker = SliderMarker;
|
|
5695
|
+
exports.SliderRange = SliderRange;
|
|
5696
|
+
exports.SliderTrack = SliderTrack;
|
|
5381
5697
|
exports.Snackbar = Snackbar;
|
|
5382
5698
|
exports.StackProvider = StackProvider;
|
|
5383
5699
|
exports.Switch = Switch;
|
|
5384
|
-
exports.THEME_LOCAL_STORAGE_KEY = THEME_LOCAL_STORAGE_KEY;
|
|
5385
5700
|
exports.Tab = Tab;
|
|
5386
5701
|
exports.TabIndicator = TabIndicator;
|
|
5387
5702
|
exports.TabIndicatorProvider = TabIndicatorProvider;
|
|
@@ -5401,12 +5716,12 @@ exports.base = base;
|
|
|
5401
5716
|
exports.getBackgroundOverlay = getBackgroundOverlay;
|
|
5402
5717
|
exports.getColorOverlay = getColorOverlay;
|
|
5403
5718
|
exports.getDarkThemeBackgroundOverlay = getDarkThemeBackgroundOverlay;
|
|
5404
|
-
exports.
|
|
5719
|
+
exports.listItemStyle = listItemStyle;
|
|
5720
|
+
exports.mixColor = mixColor;
|
|
5405
5721
|
exports.rippleStyle = rippleStyle;
|
|
5406
5722
|
exports.sx = sx;
|
|
5407
5723
|
exports.theme = theme;
|
|
5408
5724
|
exports.useAppBarContext = useAppBarContext;
|
|
5409
|
-
exports.useColorMode = useColorMode;
|
|
5410
5725
|
exports.useRipple = useRipple;
|
|
5411
5726
|
exports.useRippleHandlers = useRippleHandlers;
|
|
5412
5727
|
exports.useRippleSurface = useRippleSurface;
|