@basic-ui/material 1.0.0-alpha.1 → 1.0.0-alpha.12
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 +1372 -1306
- 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.d.ts +0 -0
- package/build/esm/Alert/index.js +0 -0
- 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.d.ts +0 -0
- package/build/esm/AppBar/context.js +0 -0
- package/build/esm/AppBar/context.js.map +1 -1
- package/build/esm/AppBar/index.d.ts +0 -0
- package/build/esm/AppBar/index.js +0 -0
- package/build/esm/AppBar/index.js.map +1 -1
- package/build/esm/Badge/Badge.d.ts +1 -1
- package/build/esm/Badge/Badge.js +0 -0
- package/build/esm/Badge/Badge.js.map +1 -1
- package/build/esm/Badge/index.d.ts +0 -0
- package/build/esm/Badge/index.js +0 -0
- package/build/esm/Badge/index.js.map +1 -1
- package/build/esm/BaseLine/BaseLine.d.ts +0 -0
- package/build/esm/BaseLine/BaseLine.js +0 -0
- package/build/esm/BaseLine/BaseLine.js.map +1 -1
- package/build/esm/BaseLine/index.d.ts +0 -0
- package/build/esm/BaseLine/index.js +0 -0
- 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 +4 -3
- package/build/esm/BottomSheet/BottomSheetSurface.js.map +1 -1
- package/build/esm/BottomSheet/index.d.ts +0 -0
- package/build/esm/BottomSheet/index.js +0 -0
- 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.d.ts +0 -0
- package/build/esm/Box/index.js +0 -0
- package/build/esm/Box/index.js.map +1 -1
- package/build/esm/Button/BaseButton.d.ts +3 -3
- package/build/esm/Button/BaseButton.js +5 -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.d.ts +0 -0
- package/build/esm/Button/FloatingActionButton.js +1 -1
- package/build/esm/Button/FloatingActionButton.js.map +1 -1
- package/build/esm/Button/IconButton.d.ts +0 -0
- 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 +0 -0
- package/build/esm/Button/OutlinedButton.js.map +1 -1
- package/build/esm/Button/TransparentButton.d.ts +1 -1
- package/build/esm/Button/TransparentButton.js +0 -0
- package/build/esm/Button/TransparentButton.js.map +1 -1
- package/build/esm/Button/context.d.ts +0 -0
- package/build/esm/Button/context.js +0 -0
- package/build/esm/Button/context.js.map +1 -1
- package/build/esm/Button/index.d.ts +0 -0
- package/build/esm/Button/index.js +0 -0
- 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 +0 -0
- package/build/esm/CheckBox/CheckPath.js.map +1 -1
- package/build/esm/CheckBox/IndeterminatePath.d.ts +0 -1
- package/build/esm/CheckBox/IndeterminatePath.js +0 -0
- package/build/esm/CheckBox/IndeterminatePath.js.map +1 -1
- package/build/esm/CheckBox/index.d.ts +0 -0
- package/build/esm/CheckBox/index.js +0 -0
- 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.d.ts +0 -0
- package/build/esm/Chip/Chip.js +0 -0
- 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.d.ts +0 -0
- package/build/esm/Chip/index.js +0 -0
- package/build/esm/Chip/index.js.map +1 -1
- package/build/esm/Combobox/Combobox.d.ts +13 -13
- package/build/esm/Combobox/Combobox.js +21 -13
- package/build/esm/Combobox/Combobox.js.map +1 -1
- package/build/esm/Combobox/index.d.ts +0 -0
- package/build/esm/Combobox/index.js +0 -0
- 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.d.ts +0 -0
- package/build/esm/Dialog/index.js +1 -0
- package/build/esm/Dialog/index.js.map +1 -1
- package/build/esm/Dialog/useDialogAnimation.d.ts +0 -0
- 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.d.ts +0 -0
- package/build/esm/Divider/index.js +0 -0
- 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.d.ts +0 -0
- package/build/esm/FloatingLabel/index.js +0 -0
- 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.d.ts +0 -0
- package/build/esm/LineRipple/index.js +0 -0
- package/build/esm/LineRipple/index.js.map +1 -1
- package/build/esm/Link/Link.d.ts +3 -3
- package/build/esm/Link/Link.js +2 -2
- package/build/esm/Link/Link.js.map +1 -1
- package/build/esm/Link/index.d.ts +0 -0
- package/build/esm/Link/index.js +0 -0
- 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.d.ts +0 -0
- package/build/esm/List/index.js +0 -0
- package/build/esm/List/index.js.map +1 -1
- package/build/esm/ListItem/ListItem.d.ts +5 -5
- package/build/esm/ListItem/ListItem.js +7 -6
- 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.d.ts +0 -0
- package/build/esm/ListItem/index.js +0 -0
- package/build/esm/ListItem/index.js.map +1 -1
- package/build/esm/Menu/Menu.d.ts +6 -6
- package/build/esm/Menu/Menu.js +13 -7
- package/build/esm/Menu/Menu.js.map +1 -1
- package/build/esm/Menu/animation.d.ts +0 -0
- package/build/esm/Menu/animation.js +0 -0
- package/build/esm/Menu/animation.js.map +1 -1
- package/build/esm/Menu/index.d.ts +0 -0
- package/build/esm/Menu/index.js +0 -0
- 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.d.ts +0 -0
- package/build/esm/NotchedOutline/context.js +0 -0
- package/build/esm/NotchedOutline/context.js.map +1 -1
- package/build/esm/NotchedOutline/index.d.ts +0 -0
- package/build/esm/NotchedOutline/index.js +0 -0
- 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.d.ts +0 -0
- package/build/esm/Paper/index.js +0 -0
- 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.d.ts +0 -0
- package/build/esm/ProgressSpinner/index.js +0 -0
- package/build/esm/ProgressSpinner/index.js.map +1 -1
- package/build/esm/RadioButton/RadioButton.d.ts +0 -0
- 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.d.ts +0 -0
- package/build/esm/RadioButton/index.js +0 -0
- package/build/esm/RadioButton/index.js.map +1 -1
- package/build/esm/Ripple/Ripple.d.ts +0 -0
- package/build/esm/Ripple/Ripple.js +0 -0
- 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.d.ts +0 -0
- package/build/esm/Ripple/constants.js +0 -0
- package/build/esm/Ripple/constants.js.map +1 -1
- package/build/esm/Ripple/index.d.ts +0 -0
- package/build/esm/Ripple/index.js +0 -0
- package/build/esm/Ripple/index.js.map +1 -1
- package/build/esm/Ripple/keyframes.d.ts +0 -0
- package/build/esm/Ripple/keyframes.js +0 -0
- package/build/esm/Ripple/keyframes.js.map +1 -1
- package/build/esm/Ripple/useRipple.d.ts +0 -0
- 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 +5 -5
- package/build/esm/Ripple/useRippleSurface.js +64 -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 +5 -5
- 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 +0 -0
- package/build/esm/Select/context.js.map +1 -1
- package/build/esm/Select/defaultRender.d.ts +2 -1
- package/build/esm/Select/defaultRender.js +0 -0
- package/build/esm/Select/defaultRender.js.map +1 -1
- package/build/esm/Select/index.d.ts +0 -0
- package/build/esm/Select/index.js +0 -0
- package/build/esm/Select/index.js.map +1 -1
- package/build/esm/Select/styledComponents.d.ts +9 -9
- package/build/esm/Select/styledComponents.js +8 -6
- package/build/esm/Select/styledComponents.js.map +1 -1
- package/build/esm/SelectItem/SelectItem.d.ts +1 -1
- package/build/esm/SelectItem/SelectItem.js +6 -5
- package/build/esm/SelectItem/SelectItem.js.map +1 -1
- package/build/esm/SelectItem/index.d.ts +0 -0
- package/build/esm/SelectItem/index.js +0 -0
- 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.d.ts +0 -0
- package/build/esm/SelectionControl/index.js +0 -0
- 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.d.ts +0 -0
- package/build/esm/Skeleton/animation.js +0 -0
- package/build/esm/Skeleton/animation.js.map +1 -1
- package/build/esm/Skeleton/index.d.ts +0 -0
- package/build/esm/Skeleton/index.js +0 -0
- package/build/esm/Skeleton/index.js.map +1 -1
- package/build/esm/Snackbar/Snackbar.d.ts +3 -3
- package/build/esm/Snackbar/Snackbar.js +9 -9
- 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.d.ts +0 -0
- package/build/esm/Snackbar/index.js +0 -0
- 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.d.ts +0 -0
- package/build/esm/Switch/index.js +0 -0
- package/build/esm/Switch/index.js.map +1 -1
- package/build/esm/Switch/styledComponents.d.ts +0 -0
- 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.d.ts +0 -0
- package/build/esm/Tab/TabPanels.js +0 -0
- package/build/esm/Tab/TabPanels.js.map +1 -1
- package/build/esm/Tab/Tabs.d.ts +0 -0
- package/build/esm/Tab/Tabs.js +0 -0
- package/build/esm/Tab/Tabs.js.map +1 -1
- package/build/esm/Tab/context.d.ts +0 -0
- package/build/esm/Tab/context.js +0 -0
- package/build/esm/Tab/context.js.map +1 -1
- package/build/esm/Tab/index.d.ts +0 -0
- package/build/esm/Tab/index.js +0 -0
- 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 +0 -0
- package/build/esm/TabIndicator/context.js.map +1 -1
- package/build/esm/TabIndicator/index.d.ts +0 -0
- package/build/esm/TabIndicator/index.js +0 -0
- 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.d.ts +0 -0
- package/build/esm/Table/context.js +0 -0
- package/build/esm/Table/context.js.map +1 -1
- package/build/esm/Table/index.d.ts +0 -0
- package/build/esm/Table/index.js +0 -0
- package/build/esm/Table/index.js.map +1 -1
- package/build/esm/Text/LoremIpsum.d.ts +0 -0
- 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.d.ts +0 -0
- package/build/esm/Text/index.js +0 -0
- 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 +5 -5
- 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.d.ts +0 -0
- package/build/esm/TextField/consts.js +0 -0
- package/build/esm/TextField/consts.js.map +1 -1
- package/build/esm/TextField/index.d.ts +0 -0
- package/build/esm/TextField/index.js +0 -0
- package/build/esm/TextField/index.js.map +1 -1
- package/build/esm/ThemeExplorer/ColorPicker.d.ts +0 -0
- package/build/esm/ThemeExplorer/ColorPicker.js +4 -3
- package/build/esm/ThemeExplorer/ColorPicker.js.map +1 -1
- package/build/esm/ThemeExplorer/TextFieldColorPicker.d.ts +0 -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 +9 -0
- package/build/esm/ThemeExplorer/ThemeBuilder.js +244 -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 +24 -20
- package/build/esm/ThemeExplorer/components.js.map +1 -1
- 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.d.ts +0 -0
- package/build/esm/ThemeExplorer/makeColorScheme.js +0 -0
- package/build/esm/ThemeExplorer/makeColorScheme.js.map +1 -1
- package/build/esm/ThemeExplorer/useDeferredColor.d.ts +0 -0
- package/build/esm/ThemeExplorer/useDeferredColor.js +4 -5
- 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.d.ts +0 -0
- package/build/esm/Tooltip/index.js +0 -0
- package/build/esm/Tooltip/index.js.map +1 -1
- package/build/esm/color.d.ts +2 -0
- package/build/esm/color.js +9 -4
- package/build/esm/color.js.map +1 -1
- package/build/esm/css.d.ts +0 -0
- package/build/esm/css.js +0 -0
- package/build/esm/css.js.map +1 -1
- package/build/esm/hooks/useAnimation.d.ts +0 -0
- package/build/esm/hooks/useAnimation.js +3 -3
- package/build/esm/hooks/useAnimation.js.map +1 -1
- package/build/esm/index.d.ts +2 -1
- package/build/esm/index.js +2 -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.d.ts +0 -0
- package/build/esm/theme/index.js +0 -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.d.ts +0 -0
- package/build/esm/theme/typography-raleway.js +0 -0
- package/build/esm/theme/typography-raleway.js.map +1 -1
- package/build/esm/theme/typography-roboto.d.ts +0 -0
- package/build/esm/theme/typography-roboto.js +0 -0
- 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 +0 -0
- package/build/esm/theme/useTheme.js.map +1 -1
- package/build/tsconfig-build.tsbuildinfo +1 -0
- package/package.json +8 -8
- package/src/Alert/Alert.tsx +1 -1
- package/src/AppBar/AppBar.tsx +4 -3
- package/src/BottomSheet/BottomSheetSurface.tsx +5 -4
- package/src/Box/Box.tsx +6 -8
- package/src/Button/BaseButton.tsx +3 -11
- package/src/Button/Button.story.tsx +21 -4
- 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 +9 -10
- 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 +2 -5
- package/src/List/List.tsx +4 -4
- package/src/ListItem/ListItem.tsx +6 -6
- package/src/ListItem/ListItemText.tsx +6 -7
- package/src/Menu/Menu.tsx +5 -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 +77 -61
- package/src/Select/Select.tsx +11 -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 +13 -11
- 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/Snackbar/Snackbar.tsx +6 -6
- 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 +3 -3
- package/src/TextField/TextField.tsx +4 -4
- package/src/ThemeExplorer/ThemeBuilder.story.tsx +1 -159
- package/src/ThemeExplorer/ThemeBuilder.tsx +198 -0
- package/src/ThemeExplorer/ThemeColors.tsx +1 -1
- package/src/ThemeExplorer/components.tsx +24 -16
- package/src/ThemeExplorer/index.ts +1 -0
- package/src/ThemeExplorer/useDeferredColor.tsx +2 -3
- 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 +26 -5
- package/src/index.ts +2 -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
|
-
[`.${DARK_THEME_CLASS} &, &.${DARK_THEME_CLASS}`]:
|
|
599
|
+
[`.${dynamicTheme.DARK_THEME_CLASS} &, &.${dynamicTheme.DARK_THEME_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',
|
|
@@ -830,30 +721,34 @@ const BaseButton = /*#__PURE__*/react$1.forwardRef((props, ref) => {
|
|
|
830
721
|
minWidth: 'auto',
|
|
831
722
|
'&::-moz-focus-inner': {
|
|
832
723
|
border: 0
|
|
833
|
-
}
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
724
|
+
},
|
|
725
|
+
...styledSystem.variant({
|
|
726
|
+
scale: 'buttons.variants',
|
|
727
|
+
prop: 'variant',
|
|
728
|
+
variants: {
|
|
729
|
+
text: {}
|
|
730
|
+
}
|
|
731
|
+
})({
|
|
732
|
+
variant: variantProp,
|
|
733
|
+
theme
|
|
734
|
+
}),
|
|
735
|
+
...styledSystem.variant({
|
|
736
|
+
scale: 'buttons.elevations',
|
|
737
|
+
prop: 'elevation',
|
|
738
|
+
variants: {
|
|
739
|
+
none: {}
|
|
740
|
+
}
|
|
741
|
+
})({
|
|
742
|
+
elevation,
|
|
743
|
+
theme
|
|
744
|
+
}),
|
|
745
|
+
...__css
|
|
746
|
+
},
|
|
747
|
+
...otherProps
|
|
748
|
+
});
|
|
854
749
|
});
|
|
855
750
|
|
|
856
|
-
const TransparentButton = /*#__PURE__*/_styled__default[
|
|
751
|
+
const TransparentButton = /*#__PURE__*/_styled__default["default"](BaseButton, process.env.NODE_ENV === "production" ? {
|
|
857
752
|
target: "e18rm4q20"
|
|
858
753
|
} : {
|
|
859
754
|
target: "e18rm4q20",
|
|
@@ -907,7 +802,7 @@ function getRippleProperties$3(theme) {
|
|
|
907
802
|
};
|
|
908
803
|
}
|
|
909
804
|
|
|
910
|
-
const FilledButton = /*#__PURE__*/_styled__default[
|
|
805
|
+
const FilledButton = /*#__PURE__*/_styled__default["default"](BaseButton, process.env.NODE_ENV === "production" ? {
|
|
911
806
|
target: "ex8w9nt0"
|
|
912
807
|
} : {
|
|
913
808
|
target: "ex8w9nt0",
|
|
@@ -931,10 +826,10 @@ const FilledButton = /*#__PURE__*/_styled__default['default'](BaseButton, proces
|
|
|
931
826
|
outlineOffset: '2px'
|
|
932
827
|
}
|
|
933
828
|
}), ({
|
|
934
|
-
color = 'primary'
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
})
|
|
829
|
+
color = 'primary'
|
|
830
|
+
}) => color === 'surface' && css.css({
|
|
831
|
+
background: mixColor('surface', 'primary', 0.05)
|
|
832
|
+
}), ({
|
|
938
833
|
color = 'primary',
|
|
939
834
|
theme,
|
|
940
835
|
isGroupedButton = false
|
|
@@ -960,7 +855,7 @@ const FilledButton = /*#__PURE__*/_styled__default['default'](BaseButton, proces
|
|
|
960
855
|
borderLeftWidth: 0
|
|
961
856
|
}
|
|
962
857
|
}
|
|
963
|
-
}, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
858
|
+
}, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkZpbGxlZEJ1dHRvbi50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBUTRCIiwiZmlsZSI6IkZpbGxlZEJ1dHRvbi50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5pbXBvcnQgeyByZWFkYWJsZUNvbG9yLCByZW0gfSBmcm9tICdwb2xpc2hlZCc7XG5pbXBvcnQgeyBnZXQsIGNzcyB9IGZyb20gJ0BzdHlsZWQtc3lzdGVtL2Nzcyc7XG5cbmltcG9ydCB7IEJhc2VCdXR0b24gfSBmcm9tICcuL0Jhc2VCdXR0b24nO1xuaW1wb3J0IHR5cGUgeyBUaGVtZSB9IGZyb20gJy4uL3RoZW1lJztcbmltcG9ydCB7IGFscGhhLCBtaXhDb2xvciB9IGZyb20gJy4uL2NvbG9yJztcblxuZXhwb3J0IGNvbnN0IEZpbGxlZEJ1dHRvbiA9IHN0eWxlZChCYXNlQnV0dG9uKShcbiAgKHsgY29sb3IgPSAncHJpbWFyeScsIHRoZW1lIH0pID0+XG4gICAgY3NzKHtcbiAgICAgIGJhY2tncm91bmRDb2xvcjogZ2V0KHRoZW1lLCBgY29sb3JzLiR7U3RyaW5nKGNvbG9yKX1gKSB8fCBjb2xvcixcbiAgICAgIGNvbG9yOlxuICAgICAgICBnZXQodGhlbWUsIGBjb2xvcnMub24uJHtTdHJpbmcoY29sb3IpfWApIHx8XG4gICAgICAgICh0eXBlb2YgY29sb3IgPT09ICdzdHJpbmcnID8gcmVhZGFibGVDb2xvcihjb2xvcikgOiB1bmRlZmluZWQpLFxuICAgICAgJyY6ZGlzYWJsZWQnOiB7XG4gICAgICAgIGNvbG9yOiBhbHBoYSgnb24uc3VyZmFjZScsIDAuMzgpLFxuICAgICAgICBiYWNrZ3JvdW5kOiBgbGluZWFyLWdyYWRpZW50KCR7Z2V0KHRoZW1lLCAnY29sb3JzLnN1cmZhY2UnKX0sICR7Z2V0KFxuICAgICAgICAgIHRoZW1lLFxuICAgICAgICAgICdjb2xvcnMuc3VyZmFjZSdcbiAgICAgICAgKX0pLCAke2FscGhhKCdvbi5zdXJmYWNlJywgMC4xMikodGhlbWUpfWAsXG4gICAgICAgIGJhY2tncm91bmRCbGVuZE1vZGU6ICdvdmVybGF5JyxcbiAgICAgICAgY3Vyc29yOiAnZGVmYXVsdCcsXG4gICAgICB9LFxuICAgICAgJyY6Zm9jdXMtdmlzaWJsZSc6IHtcbiAgICAgICAgb3V0bGluZUNvbG9yOiBnZXQodGhlbWUsIGBjb2xvcnMuJHtTdHJpbmcoY29sb3IpfWApIHx8IGNvbG9yLFxuICAgICAgICBvdXRsaW5lV2lkdGg6IDIsXG4gICAgICAgIG91dGxpbmVTdHlsZTogJ2F1dG8nLFxuICAgICAgICBvdXRsaW5lT2Zmc2V0OiAnMnB4JyxcbiAgICAgIH0sXG4gICAgfSksXG4gICh7IGNvbG9yID0gJ3ByaW1hcnknIH0pID0+XG4gICAgY29sb3IgPT09ICdzdXJmYWNlJyAmJlxuICAgIGNzcyh7IGJhY2tncm91bmQ6IG1peENvbG9yKCdzdXJmYWNlJywgJ3ByaW1hcnknLCAwLjA1KSB9KSxcbiAgKHsgY29sb3IgPSAncHJpbWFyeScsIHRoZW1lLCBpc0dyb3VwZWRCdXR0b24gPSBmYWxzZSB9KSA9PlxuICAgIGlzR3JvdXBlZEJ1dHRvbiAmJiB7XG4gICAgICAnW2RhdGEtYnV0dG9uLWdyb3VwPVwiXCJdICYnOiB7XG4gICAgICAgIGJvcmRlckNvbG9yOlxuICAgICAgICAgIGdldCh0aGVtZSwgYGNvbG9ycy5vbi4ke1N0cmluZyhjb2xvcil9YCkgfHxcbiAgICAgICAgICAodHlwZW9mIGNvbG9yID09PSAnc3RyaW5nJyA/IHJlYWRhYmxlQ29sb3IoY29sb3IpIDogdW5kZWZpbmVkKSxcbiAgICAgICAgJzpmaXJzdC1vZi10eXBlJzoge1xuICAgICAgICAgIGJvcmRlclRvcFJpZ2h0UmFkaXVzOiAwLFxuICAgICAgICAgIGJvcmRlckJvdHRvbVJpZ2h0UmFkaXVzOiAwLFxuICAgICAgICAgIGJvcmRlclJpZ2h0U3R5bGU6ICdzb2xpZCcsXG4gICAgICAgICAgYm9yZGVyUmlnaHRXaWR0aDogcmVtKDEpLFxuICAgICAgICB9LFxuICAgICAgICAnOm5vdCg6Zmlyc3Qtb2YtdHlwZSk6bm90KDpsYXN0LW9mLXR5cGUpJzoge1xuICAgICAgICAgIGJvcmRlclJhZGl1czogMCxcbiAgICAgICAgfSxcbiAgICAgICAgJzpsYXN0LW9mLXR5cGUnOiB7XG4gICAgICAgICAgYm9yZGVyVG9wTGVmdFJhZGl1czogMCxcbiAgICAgICAgICBib3JkZXJCb3R0b21MZWZ0UmFkaXVzOiAwLFxuICAgICAgICAgIGJvcmRlckxlZnRTdHlsZTogJ3NvbGlkJyxcbiAgICAgICAgICBib3JkZXJMZWZ0V2lkdGg6IHJlbSgxKSxcbiAgICAgICAgfSxcbiAgICAgICAgJzpsYXN0LW9mLXR5cGU6bnRoLW9mLXR5cGUoMiknOiB7XG4gICAgICAgICAgYm9yZGVyTGVmdFdpZHRoOiAwLFxuICAgICAgICB9LFxuICAgICAgfSxcbiAgICB9XG4pO1xuXG5leHBvcnQgZnVuY3Rpb24gZ2V0UmlwcGxlUHJvcGVydGllcyh0aGVtZTogVGhlbWUpIHtcbiAgcmV0dXJuIHtcbiAgICBob3Zlck9wYWNpdHk6IGdldCh0aGVtZSwgYGJ1dHRvbnMub3ZlcmxheXMuZmlsbGVkLmhvdmVyLm9wYWNpdHlgKSxcbiAgICBmb2N1c09wYWNpdHk6IGdldCh0aGVtZSwgYGJ1dHRvbnMub3ZlcmxheXMuZmlsbGVkLmZvY3VzLm9wYWNpdHlgKSxcbiAgICBwcmVzc2VkT3BhY2l0eTogZ2V0KHRoZW1lLCBgYnV0dG9ucy5vdmVybGF5cy5maWxsZWQucHJlc3NlZC5vcGFjaXR5YCksXG4gICAgcmlwcGxlRW5hYmxlZDogZmFsc2UsXG4gIH07XG59XG4iXX0= */");
|
|
964
859
|
function getRippleProperties$2(theme) {
|
|
965
860
|
return {
|
|
966
861
|
hoverOpacity: css.get(theme, `buttons.overlays.filled.hover.opacity`),
|
|
@@ -971,12 +866,12 @@ function getRippleProperties$2(theme) {
|
|
|
971
866
|
}
|
|
972
867
|
|
|
973
868
|
function getRippleProperties$1(theme) {
|
|
974
|
-
return
|
|
869
|
+
return { ...getRippleProperties$2(theme),
|
|
975
870
|
rippleEnabled: true
|
|
976
|
-
}
|
|
871
|
+
};
|
|
977
872
|
}
|
|
978
873
|
|
|
979
|
-
const OutlinedButton = /*#__PURE__*/_styled__default[
|
|
874
|
+
const OutlinedButton = /*#__PURE__*/_styled__default["default"](TransparentButton, process.env.NODE_ENV === "production" ? {
|
|
980
875
|
target: "eo0fwlz0"
|
|
981
876
|
} : {
|
|
982
877
|
target: "eo0fwlz0",
|
|
@@ -1023,19 +918,19 @@ const OutlinedButton = /*#__PURE__*/_styled__default['default'](TransparentButto
|
|
|
1023
918
|
}, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIk91dGxpbmVkQnV0dG9uLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFPOEIiLCJmaWxlIjoiT3V0bGluZWRCdXR0b24udHN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQHN0eWxlZC1zeXN0ZW0vY3NzJztcbmltcG9ydCB7IHJlbSB9IGZyb20gJ3BvbGlzaGVkJztcblxuaW1wb3J0IHsgYWxwaGEgfSBmcm9tICcuLi9jb2xvcic7XG5pbXBvcnQgeyBUcmFuc3BhcmVudEJ1dHRvbiB9IGZyb20gJy4vVHJhbnNwYXJlbnRCdXR0b24nO1xuXG5leHBvcnQgY29uc3QgT3V0bGluZWRCdXR0b24gPSBzdHlsZWQoVHJhbnNwYXJlbnRCdXR0b24pKFxuICBjc3Moe1xuICAgIGJvcmRlclN0eWxlOiAnc29saWQnLFxuICAgIGJvcmRlcldpZHRoOiByZW0oMSksXG4gICAgYm9yZGVyQ29sb3I6ICdvdXRsaW5lJyxcbiAgICBib3hTaGFkb3c6IDAsXG4gICAgJyY6Zm9jdXMsOiZhY3RpdmUsOiZob3Zlcic6IHsgYm94U2hhZG93OiAwIH0sXG4gICAgJyY6Zm9jdXMtdmlzaWJsZSwmOmFjdGl2ZSc6IHtcbiAgICAgIGJvcmRlckNvbG9yOiAnY3VycmVudENvbG9yJyxcbiAgICB9LFxuICAgICcmOmRpc2FibGVkJzoge1xuICAgICAgY29sb3I6IGFscGhhKCdvbi5zdXJmYWNlJywgMC4zOCksXG4gICAgICBib3JkZXJDb2xvcjogYWxwaGEoJ29uLnN1cmZhY2UnLCAwLjEyKSxcbiAgICAgIGN1cnNvcjogJ2RlZmF1bHQnLFxuICAgIH0sXG4gIH0pLFxuICAoeyBpc0dyb3VwZWRCdXR0b24gPSBmYWxzZSB9KSA9PlxuICAgIGlzR3JvdXBlZEJ1dHRvbiAmJiB7XG4gICAgICAnW2RhdGEtYnV0dG9uLWdyb3VwPVwiXCJdICYnOiB7XG4gICAgICAgICc6Zmlyc3Qtb2YtdHlwZSc6IHtcbiAgICAgICAgICBib3JkZXJUb3BSaWdodFJhZGl1czogMCxcbiAgICAgICAgICBib3JkZXJCb3R0b21SaWdodFJhZGl1czogMCxcbiAgICAgICAgfSxcbiAgICAgICAgJzpub3QoOmZpcnN0LW9mLXR5cGUpOm5vdCg6bGFzdC1vZi10eXBlKSc6IHtcbiAgICAgICAgICBib3JkZXJSYWRpdXM6IDAsXG4gICAgICAgICAgYm9yZGVyUmlnaHRXaWR0aDogMCxcbiAgICAgICAgICBib3JkZXJMZWZ0V2lkdGg6IDAsXG4gICAgICAgIH0sXG4gICAgICAgICc6bGFzdC1vZi10eXBlJzoge1xuICAgICAgICAgIGJvcmRlclRvcExlZnRSYWRpdXM6IDAsXG4gICAgICAgICAgYm9yZGVyQm90dG9tTGVmdFJhZGl1czogMCxcbiAgICAgICAgICBib3JkZXJMZWZ0U3R5bGU6ICdzb2xpZCcsXG4gICAgICAgICAgYm9yZGVyTGVmdFdpZHRoOiByZW0oMSksXG4gICAgICAgIH0sXG4gICAgICAgICc6bGFzdC1vZi10eXBlOm50aC1vZi10eXBlKDIpJzoge1xuICAgICAgICAgIGJvcmRlckxlZnRXaWR0aDogMCxcbiAgICAgICAgfSxcbiAgICAgIH0sXG4gICAgfVxuKTtcbiJdfQ== */");
|
|
1024
919
|
|
|
1025
920
|
function getRippleProperties(theme) {
|
|
1026
|
-
return
|
|
921
|
+
return { ...getRippleProperties$2(theme),
|
|
1027
922
|
center: true,
|
|
1028
923
|
rippleEnabled: true
|
|
1029
|
-
}
|
|
924
|
+
};
|
|
1030
925
|
}
|
|
1031
926
|
|
|
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[
|
|
927
|
+
const RIPPLE_BACKGROUND_COLOR = `--css-${hash__default["default"]('basic-ui-ripple-fg-bg-color')}`;
|
|
928
|
+
const RIPPLE_TRANSLATE_START = `--css-${hash__default["default"]('basic-ui-ripple-fg-translate-start')}`;
|
|
929
|
+
const RIPPLE_TRANSLATE_END = `--css-${hash__default["default"]('basic-ui-ripple-fg-translate-end')}`;
|
|
930
|
+
const RIPPLE_SCALE_END = `--css-${hash__default["default"]('basic-ui-ripple-fg-scale')}`;
|
|
931
|
+
const RIPPLE_OPACITY_END = `--css-${hash__default["default"]('basic-ui-ripple-fg-opacity')}`;
|
|
932
|
+
const RIPPLE_SIZE = `--css-${hash__default["default"]('basic-ui-ripple-fg-size')}`;
|
|
933
|
+
const RIPPLE_POSITION = `--css-${hash__default["default"]('basic-ui-ripple-fg-position')}`;
|
|
1039
934
|
|
|
1040
935
|
const rippleStyle = ({
|
|
1041
936
|
animation
|
|
@@ -1055,7 +950,7 @@ const rippleStyle = ({
|
|
|
1055
950
|
animation,
|
|
1056
951
|
willChange: 'opacity,transform'
|
|
1057
952
|
});
|
|
1058
|
-
const Ripple = _styled__default[
|
|
953
|
+
const Ripple = _styled__default["default"]("div", process.env.NODE_ENV === "production" ? {
|
|
1059
954
|
target: "ebk8cct0"
|
|
1060
955
|
} : {
|
|
1061
956
|
target: "ebk8cct0",
|
|
@@ -1129,9 +1024,11 @@ function calculateRipplePosition(rect, clientX, clientY, center = false) {
|
|
|
1129
1024
|
x: clientX - rect.left,
|
|
1130
1025
|
y: clientY - rect.top
|
|
1131
1026
|
};
|
|
1132
|
-
return
|
|
1133
|
-
state: 'entering'
|
|
1134
|
-
|
|
1027
|
+
return {
|
|
1028
|
+
state: 'entering',
|
|
1029
|
+
...rippleStart,
|
|
1030
|
+
...getScale(rect)
|
|
1031
|
+
};
|
|
1135
1032
|
}
|
|
1136
1033
|
|
|
1137
1034
|
const useRipple = opts => {
|
|
@@ -1161,19 +1058,22 @@ const useRipple = opts => {
|
|
|
1161
1058
|
|
|
1162
1059
|
const setLeft = () => {
|
|
1163
1060
|
rippleState.current = 'left';
|
|
1164
|
-
setRipple(
|
|
1061
|
+
setRipple({ ...defaultRipple
|
|
1062
|
+
});
|
|
1165
1063
|
};
|
|
1166
1064
|
|
|
1167
1065
|
const setLeaving = () => {
|
|
1168
1066
|
clearTimeout(enteringTimeout.current);
|
|
1169
1067
|
rippleState.current = 'leaving';
|
|
1170
|
-
setRipple(ripple =>
|
|
1068
|
+
setRipple(ripple => ({ ...ripple
|
|
1069
|
+
}));
|
|
1171
1070
|
leavingTimeout.current = window.setTimeout(setLeft, leaveDuration);
|
|
1172
1071
|
};
|
|
1173
1072
|
|
|
1174
1073
|
const setEntered = () => {
|
|
1175
1074
|
rippleState.current = 'entered';
|
|
1176
|
-
setRipple(ripple =>
|
|
1075
|
+
setRipple(ripple => ({ ...ripple
|
|
1076
|
+
}));
|
|
1177
1077
|
|
|
1178
1078
|
if (shouldLeave.current) {
|
|
1179
1079
|
setLeaving();
|
|
@@ -1193,7 +1093,8 @@ const useRipple = opts => {
|
|
|
1193
1093
|
clearTimeout(enteringTimeout.current);
|
|
1194
1094
|
shouldLeave.current = false;
|
|
1195
1095
|
rippleState.current = 'restart';
|
|
1196
|
-
setRipple(
|
|
1096
|
+
setRipple({ ...defaultRipple
|
|
1097
|
+
});
|
|
1197
1098
|
restartTimeout.current = requestAnimationFrame(() => {
|
|
1198
1099
|
rippleState.current = 'entering';
|
|
1199
1100
|
setRipple(calculateRipplePosition(rect, clientX, clientY, center));
|
|
@@ -1247,13 +1148,11 @@ const disabledHandler = () => {
|
|
|
1247
1148
|
};
|
|
1248
1149
|
|
|
1249
1150
|
function useRippleHandlers(opts) {
|
|
1250
|
-
const
|
|
1251
|
-
{
|
|
1151
|
+
const {
|
|
1252
1152
|
activate,
|
|
1253
|
-
deactivate
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1153
|
+
deactivate,
|
|
1154
|
+
...rest
|
|
1155
|
+
} = useRipple(opts); // Pointer activation
|
|
1257
1156
|
|
|
1258
1157
|
const handlePointerUp = () => {
|
|
1259
1158
|
window.removeEventListener('pointerup', handlePointerUp);
|
|
@@ -1292,13 +1191,14 @@ function useRippleHandlers(opts) {
|
|
|
1292
1191
|
window.addEventListener('keyup', handleKeyUp);
|
|
1293
1192
|
};
|
|
1294
1193
|
|
|
1295
|
-
return
|
|
1194
|
+
return {
|
|
1296
1195
|
handleKeyDown: opts.disabled ? disabledHandler : handleKeyDown,
|
|
1297
|
-
handlePointerDown: opts.disabled ? disabledHandler : handlePointerDown
|
|
1298
|
-
|
|
1196
|
+
handlePointerDown: opts.disabled ? disabledHandler : handlePointerDown,
|
|
1197
|
+
...rest
|
|
1198
|
+
};
|
|
1299
1199
|
}
|
|
1300
1200
|
|
|
1301
|
-
function useRippleSurface(opts) {
|
|
1201
|
+
function useRippleSurface(opts = {}) {
|
|
1302
1202
|
let {
|
|
1303
1203
|
// eslint-disable-next-line prefer-const
|
|
1304
1204
|
baseOpacity = 0,
|
|
@@ -1307,16 +1207,14 @@ function useRippleSurface(opts) {
|
|
|
1307
1207
|
pressedOpacity = 0.12,
|
|
1308
1208
|
rippleColor = 'on.surface'
|
|
1309
1209
|
} = opts;
|
|
1310
|
-
|
|
1311
1210
|
const {
|
|
1312
1211
|
onKeyDown,
|
|
1313
1212
|
onPointerDown,
|
|
1314
1213
|
style = {},
|
|
1315
1214
|
disabled,
|
|
1316
|
-
rippleEnabled = true
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1215
|
+
rippleEnabled = true,
|
|
1216
|
+
...rippleProps
|
|
1217
|
+
} = opts;
|
|
1320
1218
|
const theme = useTheme();
|
|
1321
1219
|
rippleColor = css.get(theme, `colors.${rippleColor}`) || rippleColor;
|
|
1322
1220
|
|
|
@@ -1331,13 +1229,13 @@ function useRippleSurface(opts) {
|
|
|
1331
1229
|
handlePointerDown,
|
|
1332
1230
|
style: animationStyle,
|
|
1333
1231
|
animation
|
|
1334
|
-
} = useRippleHandlers(
|
|
1232
|
+
} = useRippleHandlers({
|
|
1335
1233
|
opacity: Number(pressedOpacity),
|
|
1336
1234
|
backgroundColor: rippleColor,
|
|
1337
|
-
disabled
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
const css$1 =
|
|
1235
|
+
disabled,
|
|
1236
|
+
...rippleProps
|
|
1237
|
+
});
|
|
1238
|
+
const css$1 = react$1.useMemo(() => ({
|
|
1341
1239
|
overflow: 'hidden',
|
|
1342
1240
|
position: 'relative',
|
|
1343
1241
|
cursor: 'pointer',
|
|
@@ -1364,12 +1262,12 @@ function useRippleSurface(opts) {
|
|
|
1364
1262
|
},
|
|
1365
1263
|
'&:focus-visible::before': {
|
|
1366
1264
|
opacity: focusOpacity
|
|
1367
|
-
}
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1265
|
+
},
|
|
1266
|
+
...(!rippleEnabled && {
|
|
1267
|
+
'&:active::before': {
|
|
1268
|
+
opacity: pressedOpacity
|
|
1269
|
+
}
|
|
1270
|
+
}),
|
|
1373
1271
|
'&[aria-pressed="true"]::before': {
|
|
1374
1272
|
opacity: baseOpacity + pressedOpacity
|
|
1375
1273
|
},
|
|
@@ -1378,26 +1276,30 @@ function useRippleSurface(opts) {
|
|
|
1378
1276
|
},
|
|
1379
1277
|
'&[aria-pressed="true"]:focus-visible::before': {
|
|
1380
1278
|
opacity: pressedOpacity + focusOpacity
|
|
1381
|
-
}
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1279
|
+
},
|
|
1280
|
+
...(!rippleEnabled && {
|
|
1281
|
+
'&[aria-pressed="true"]:active::before': {
|
|
1282
|
+
opacity: pressedOpacity + pressedOpacity
|
|
1283
|
+
}
|
|
1284
|
+
}),
|
|
1387
1285
|
['&: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
1286
|
opacity: 0
|
|
1389
1287
|
},
|
|
1390
1288
|
'&:disabled,&[data-disabled]': {
|
|
1391
1289
|
cursor: 'default'
|
|
1392
|
-
}
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1290
|
+
},
|
|
1291
|
+
// ripple
|
|
1292
|
+
...(rippleEnabled && {
|
|
1293
|
+
'&::after': { ...rippleStyle({
|
|
1294
|
+
animation
|
|
1295
|
+
})
|
|
1296
|
+
}
|
|
1297
|
+
})
|
|
1298
|
+
}), [animation, baseOpacity, focusOpacity, hoverOpacity, pressedOpacity, rippleColor, rippleEnabled]);
|
|
1399
1299
|
return {
|
|
1400
|
-
style:
|
|
1300
|
+
style: { ...animationStyle,
|
|
1301
|
+
...style
|
|
1302
|
+
},
|
|
1401
1303
|
onKeyDown: core.wrapEvent(onKeyDown, handleKeyDown),
|
|
1402
1304
|
onPointerDown: core.wrapEvent(onPointerDown, handlePointerDown),
|
|
1403
1305
|
__css: css$1
|
|
@@ -1408,23 +1310,46 @@ const RippleBox = /*#__PURE__*/react$1.forwardRef(function RippleBox(props, forw
|
|
|
1408
1310
|
const {
|
|
1409
1311
|
as = 'div',
|
|
1410
1312
|
__css,
|
|
1313
|
+
// Cherry picking the ripple props to prevent it from falling down to
|
|
1314
|
+
// the Box component
|
|
1315
|
+
onKeyDown,
|
|
1411
1316
|
// eslint-disable-line @typescript-eslint/no-unused-vars
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1317
|
+
onPointerDown,
|
|
1318
|
+
// eslint-disable-line @typescript-eslint/no-unused-vars
|
|
1319
|
+
baseOpacity,
|
|
1320
|
+
// eslint-disable-line @typescript-eslint/no-unused-vars
|
|
1321
|
+
hoverOpacity,
|
|
1322
|
+
// eslint-disable-line @typescript-eslint/no-unused-vars
|
|
1323
|
+
focusOpacity,
|
|
1324
|
+
// eslint-disable-line @typescript-eslint/no-unused-vars
|
|
1325
|
+
pressedOpacity,
|
|
1326
|
+
// eslint-disable-line @typescript-eslint/no-unused-vars
|
|
1327
|
+
rippleColor,
|
|
1328
|
+
// eslint-disable-line @typescript-eslint/no-unused-vars
|
|
1329
|
+
center,
|
|
1330
|
+
// eslint-disable-line @typescript-eslint/no-unused-vars
|
|
1331
|
+
disabled,
|
|
1332
|
+
// eslint-disable-line @typescript-eslint/no-unused-vars
|
|
1333
|
+
rippleEnabled,
|
|
1334
|
+
// eslint-disable-line @typescript-eslint/no-unused-vars
|
|
1335
|
+
style,
|
|
1336
|
+
// eslint-disable-line @typescript-eslint/no-unused-vars
|
|
1337
|
+
...otherProps
|
|
1338
|
+
} = props;
|
|
1339
|
+
const {
|
|
1340
|
+
__css: rippleCss,
|
|
1341
|
+
...rippleProps
|
|
1342
|
+
} = useRippleSurface(props);
|
|
1343
|
+
return /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
1423
1344
|
as: as,
|
|
1424
1345
|
ref: forwardedRef,
|
|
1425
|
-
__css:
|
|
1426
|
-
|
|
1427
|
-
|
|
1346
|
+
__css: { ...rippleCss,
|
|
1347
|
+
...__css
|
|
1348
|
+
},
|
|
1349
|
+
disabled,
|
|
1350
|
+
...otherProps,
|
|
1351
|
+
...rippleProps
|
|
1352
|
+
});
|
|
1428
1353
|
});
|
|
1429
1354
|
|
|
1430
1355
|
const ButtonGroupContext = /*#__PURE__*/react$1.createContext(null);
|
|
@@ -1462,30 +1387,28 @@ function getFallbackElevation(variant = 'text') {
|
|
|
1462
1387
|
|
|
1463
1388
|
const Button = /*#__PURE__*/react$1.forwardRef(function Button(props, forwardedRef) {
|
|
1464
1389
|
const buttonGroup = useButtonGroupContext();
|
|
1465
|
-
|
|
1466
1390
|
const {
|
|
1467
1391
|
children,
|
|
1468
|
-
variant =
|
|
1392
|
+
variant = buttonGroup?.variant || 'text',
|
|
1469
1393
|
onPointerDown: onPointerDownProp,
|
|
1470
1394
|
onKeyDown: onKeyDownProp,
|
|
1471
1395
|
color = 'primary',
|
|
1472
1396
|
disabled = false,
|
|
1473
1397
|
elevation = getFallbackElevation(props.variant),
|
|
1474
|
-
style: styleProp
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1398
|
+
style: styleProp,
|
|
1399
|
+
...otherProps
|
|
1400
|
+
} = props;
|
|
1478
1401
|
const theme = useTheme();
|
|
1479
1402
|
const Comp = componentMapping[variant];
|
|
1480
1403
|
const getRippleProperties = rippleMapping[variant];
|
|
1481
|
-
const rippleProps = useRippleSurface(
|
|
1404
|
+
const rippleProps = useRippleSurface({ ...getRippleProperties(theme),
|
|
1482
1405
|
rippleColor: 'currentColor',
|
|
1483
1406
|
disabled,
|
|
1484
1407
|
style: styleProp,
|
|
1485
1408
|
onKeyDown: onKeyDownProp,
|
|
1486
1409
|
onPointerDown: onPointerDownProp
|
|
1487
|
-
})
|
|
1488
|
-
return /*#__PURE__*/jsxRuntime.jsx(Comp,
|
|
1410
|
+
});
|
|
1411
|
+
return /*#__PURE__*/jsxRuntime.jsx(Comp, {
|
|
1489
1412
|
ref: forwardedRef,
|
|
1490
1413
|
variant: variant,
|
|
1491
1414
|
theme: theme,
|
|
@@ -1493,49 +1416,50 @@ const Button = /*#__PURE__*/react$1.forwardRef(function Button(props, forwardedR
|
|
|
1493
1416
|
"aria-disabled": disabled ? 'true' : undefined,
|
|
1494
1417
|
color: color,
|
|
1495
1418
|
elevation: elevation,
|
|
1496
|
-
isGroupedButton: Boolean(buttonGroup)
|
|
1497
|
-
|
|
1419
|
+
isGroupedButton: Boolean(buttonGroup),
|
|
1420
|
+
...rippleProps,
|
|
1421
|
+
...otherProps,
|
|
1498
1422
|
children: children
|
|
1499
|
-
})
|
|
1423
|
+
});
|
|
1500
1424
|
});
|
|
1501
1425
|
|
|
1502
1426
|
const ButtonGroup = /*#__PURE__*/react$1.forwardRef(function ButtonGroup(props, forwardedRef) {
|
|
1503
1427
|
const {
|
|
1504
1428
|
as: Comp = 'div',
|
|
1505
1429
|
variant = 'text',
|
|
1506
|
-
direction = 'row'
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1430
|
+
direction = 'row',
|
|
1431
|
+
...otherProps
|
|
1432
|
+
} = props;
|
|
1510
1433
|
const value = react$1.useMemo(() => ({
|
|
1511
1434
|
direction,
|
|
1512
1435
|
variant
|
|
1513
1436
|
}), [direction, variant]);
|
|
1514
1437
|
return /*#__PURE__*/jsxRuntime.jsx(ButtonGroupContext.Provider, {
|
|
1515
1438
|
value: value,
|
|
1516
|
-
children: /*#__PURE__*/jsxRuntime.jsx(Comp,
|
|
1439
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Comp, {
|
|
1517
1440
|
ref: forwardedRef,
|
|
1518
1441
|
role: "group",
|
|
1519
1442
|
"data-button-group": "",
|
|
1520
|
-
"data-button-group-direction": direction
|
|
1521
|
-
|
|
1443
|
+
"data-button-group-direction": direction,
|
|
1444
|
+
...otherProps
|
|
1445
|
+
})
|
|
1522
1446
|
});
|
|
1523
1447
|
});
|
|
1524
1448
|
|
|
1525
1449
|
const AppBarButton = /*#__PURE__*/react$1.forwardRef(function AppBarButton(props, forwardedRef) {
|
|
1526
1450
|
const {
|
|
1527
|
-
variant = 'icon'
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1451
|
+
variant = 'icon',
|
|
1452
|
+
...otherProps
|
|
1453
|
+
} = props;
|
|
1531
1454
|
const {
|
|
1532
1455
|
variant: appbarVariant
|
|
1533
1456
|
} = useAppBarContext();
|
|
1534
|
-
return /*#__PURE__*/jsxRuntime.jsx(Button,
|
|
1457
|
+
return /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
1535
1458
|
ref: forwardedRef,
|
|
1536
1459
|
variant: variant,
|
|
1537
|
-
color: appbarVariant === 'default' ? 'on.surface' : `on.${appbarVariant}
|
|
1538
|
-
|
|
1460
|
+
color: appbarVariant === 'default' ? 'on.surface' : `on.${appbarVariant}`,
|
|
1461
|
+
...otherProps
|
|
1462
|
+
});
|
|
1539
1463
|
});
|
|
1540
1464
|
|
|
1541
1465
|
const mappings = {
|
|
@@ -1556,56 +1480,58 @@ const mappings = {
|
|
|
1556
1480
|
const Text = /*#__PURE__*/react$1.forwardRef(function Text(props, forwardedRef) {
|
|
1557
1481
|
const {
|
|
1558
1482
|
as,
|
|
1559
|
-
variant = '
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1483
|
+
variant = 'body-medium',
|
|
1484
|
+
...otherProps
|
|
1485
|
+
} = props;
|
|
1563
1486
|
let Comp = as;
|
|
1564
1487
|
|
|
1565
1488
|
if (!Comp) {
|
|
1566
1489
|
Comp = mappings[variant] || 'p';
|
|
1567
1490
|
}
|
|
1568
1491
|
|
|
1569
|
-
return /*#__PURE__*/jsxRuntime.jsx(Box,
|
|
1492
|
+
return /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
1570
1493
|
as: Comp,
|
|
1571
1494
|
ref: forwardedRef,
|
|
1572
1495
|
tx: "text",
|
|
1573
1496
|
variant: variant,
|
|
1574
1497
|
__css: {
|
|
1575
1498
|
color: 'inherit'
|
|
1576
|
-
}
|
|
1577
|
-
|
|
1499
|
+
},
|
|
1500
|
+
...otherProps
|
|
1501
|
+
});
|
|
1578
1502
|
});
|
|
1579
1503
|
|
|
1580
1504
|
const Alert = /*#__PURE__*/react$1.forwardRef(function Alert(props, forwardedRef) {
|
|
1581
1505
|
const {
|
|
1582
1506
|
as = 'div',
|
|
1583
1507
|
color = 'secondary',
|
|
1584
|
-
__css
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
return /*#__PURE__*/jsxRuntime.jsx(Text, _extends__default['default']({
|
|
1508
|
+
__css,
|
|
1509
|
+
...otherProps
|
|
1510
|
+
} = props;
|
|
1511
|
+
return /*#__PURE__*/jsxRuntime.jsx(Text, {
|
|
1589
1512
|
ref: forwardedRef,
|
|
1590
1513
|
as: as,
|
|
1591
|
-
variant: "
|
|
1592
|
-
__css:
|
|
1514
|
+
variant: "body-medium",
|
|
1515
|
+
__css: {
|
|
1593
1516
|
p: 3,
|
|
1594
1517
|
bg: alpha(color, 0.1),
|
|
1595
1518
|
borderRadius: 'extra-small',
|
|
1596
1519
|
borderColor: alpha(color, 0.2),
|
|
1597
1520
|
borderStyle: 'solid',
|
|
1598
|
-
borderWidth: "0.0625rem"
|
|
1599
|
-
|
|
1600
|
-
|
|
1521
|
+
borderWidth: "0.0625rem",
|
|
1522
|
+
...__css
|
|
1523
|
+
},
|
|
1524
|
+
...otherProps
|
|
1525
|
+
});
|
|
1601
1526
|
});
|
|
1602
1527
|
|
|
1603
1528
|
const Badge = /*#__PURE__*/react$1.forwardRef(function Badge(props, forwardedRef) {
|
|
1604
|
-
const
|
|
1605
|
-
|
|
1606
|
-
return /*#__PURE__*/jsxRuntime.jsx(Box,
|
|
1607
|
-
ref: forwardedRef
|
|
1608
|
-
|
|
1529
|
+
const { ...otherProps
|
|
1530
|
+
} = props;
|
|
1531
|
+
return /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
1532
|
+
ref: forwardedRef,
|
|
1533
|
+
...otherProps
|
|
1534
|
+
});
|
|
1609
1535
|
});
|
|
1610
1536
|
|
|
1611
1537
|
const BaseLine = () => {
|
|
@@ -1746,13 +1672,12 @@ const BaseLine = () => {
|
|
|
1746
1672
|
|
|
1747
1673
|
const Scrim = /*#__PURE__*/react$1.forwardRef(function Scrim(props, forwardedRef) {
|
|
1748
1674
|
const {
|
|
1749
|
-
__css
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
return /*#__PURE__*/jsxRuntime.jsx(Box, _extends__default['default']({
|
|
1675
|
+
__css,
|
|
1676
|
+
...otherProps
|
|
1677
|
+
} = props;
|
|
1678
|
+
return /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
1754
1679
|
ref: forwardedRef,
|
|
1755
|
-
__css:
|
|
1680
|
+
__css: {
|
|
1756
1681
|
position: 'fixed',
|
|
1757
1682
|
top: '0',
|
|
1758
1683
|
left: '0',
|
|
@@ -1763,20 +1688,21 @@ const Scrim = /*#__PURE__*/react$1.forwardRef(function Scrim(props, forwardedRef
|
|
|
1763
1688
|
backgroundColor: alpha('#000', 0.32),
|
|
1764
1689
|
willChange: 'opacity',
|
|
1765
1690
|
zIndex: -1,
|
|
1766
|
-
pointerEvents: 'none'
|
|
1767
|
-
|
|
1768
|
-
|
|
1691
|
+
pointerEvents: 'none',
|
|
1692
|
+
...__css
|
|
1693
|
+
},
|
|
1694
|
+
...otherProps
|
|
1695
|
+
});
|
|
1769
1696
|
});
|
|
1770
1697
|
|
|
1771
1698
|
const DialogContainer = /*#__PURE__*/react$1.forwardRef(function DialogContainer(props, forwardedRef) {
|
|
1772
1699
|
const {
|
|
1773
|
-
__css
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
return /*#__PURE__*/jsxRuntime.jsx(Box, _extends__default['default']({
|
|
1700
|
+
__css,
|
|
1701
|
+
...otherProps
|
|
1702
|
+
} = props;
|
|
1703
|
+
return /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
1778
1704
|
ref: forwardedRef,
|
|
1779
|
-
__css:
|
|
1705
|
+
__css: {
|
|
1780
1706
|
position: 'absolute',
|
|
1781
1707
|
display: 'flex',
|
|
1782
1708
|
alignItems: 'center',
|
|
@@ -1785,9 +1711,11 @@ const DialogContainer = /*#__PURE__*/react$1.forwardRef(function DialogContainer
|
|
|
1785
1711
|
height: '100%',
|
|
1786
1712
|
willChange: 'transform,opacity',
|
|
1787
1713
|
transformOrigin: 'center center',
|
|
1788
|
-
pointerEvents: 'none'
|
|
1789
|
-
|
|
1790
|
-
|
|
1714
|
+
pointerEvents: 'none',
|
|
1715
|
+
...__css
|
|
1716
|
+
},
|
|
1717
|
+
...otherProps
|
|
1718
|
+
});
|
|
1791
1719
|
});
|
|
1792
1720
|
|
|
1793
1721
|
function useAnimation(opts) {
|
|
@@ -1811,22 +1739,22 @@ function useAnimation(opts) {
|
|
|
1811
1739
|
open: openProp
|
|
1812
1740
|
});
|
|
1813
1741
|
const handleClose = react$1.useCallback(() => {
|
|
1814
|
-
setAnimation(animation => animation.state === 'closed' ? animation :
|
|
1742
|
+
setAnimation(animation => animation.state === 'closed' ? animation : { ...animation,
|
|
1815
1743
|
state: 'close',
|
|
1816
1744
|
style: animationStyle.close || animationStyle.closed,
|
|
1817
1745
|
timing: closeTimeoutInMilliseconds
|
|
1818
|
-
})
|
|
1746
|
+
});
|
|
1819
1747
|
}, [animationStyle, closeTimeoutInMilliseconds]);
|
|
1820
1748
|
const handleOpen = react$1.useCallback(() => {
|
|
1821
|
-
setAnimation(animation => animation.state === 'open' ? animation :
|
|
1749
|
+
setAnimation(animation => animation.state === 'open' ? animation : { ...animation,
|
|
1822
1750
|
open: true,
|
|
1823
1751
|
state: 'opening',
|
|
1824
1752
|
style: animationStyle.opening || animationStyle.closed
|
|
1825
|
-
})
|
|
1753
|
+
});
|
|
1826
1754
|
}, [animationStyle]);
|
|
1827
1755
|
react$1.useEffect(() => {
|
|
1828
1756
|
if (state === 'opening') {
|
|
1829
|
-
setAnimation(animation =>
|
|
1757
|
+
setAnimation(animation => ({ ...animation,
|
|
1830
1758
|
state: 'open',
|
|
1831
1759
|
style: animationStyle.open,
|
|
1832
1760
|
timing: openTimeoutInMilliseconds
|
|
@@ -1906,26 +1834,26 @@ const styles = {
|
|
|
1906
1834
|
};
|
|
1907
1835
|
function useDialogAnimation(opts) {
|
|
1908
1836
|
const {
|
|
1909
|
-
mode = 'grow'
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1837
|
+
mode = 'grow',
|
|
1838
|
+
...otherOpts
|
|
1839
|
+
} = opts;
|
|
1913
1840
|
const {
|
|
1914
1841
|
open,
|
|
1915
1842
|
state,
|
|
1916
1843
|
style,
|
|
1917
1844
|
timing
|
|
1918
|
-
} = useAnimation(
|
|
1845
|
+
} = useAnimation({
|
|
1919
1846
|
styles,
|
|
1920
|
-
mode
|
|
1921
|
-
|
|
1847
|
+
mode,
|
|
1848
|
+
...otherOpts
|
|
1849
|
+
});
|
|
1922
1850
|
const scrimOpacity = state === 'open' ? 1 : 0;
|
|
1923
|
-
const transition = `opacity ${timing}ms
|
|
1924
|
-
const scrimTransition = `opacity ${timing * 0.4 | 0}ms
|
|
1851
|
+
const transition = `opacity ${timing}ms ${EASING_STANDARD},transform ${timing}ms ${EASING_STANDARD}`;
|
|
1852
|
+
const scrimTransition = `opacity ${timing * 0.4 | 0}ms ${EASING_STANDARD}`;
|
|
1925
1853
|
return {
|
|
1926
|
-
containerStyle:
|
|
1854
|
+
containerStyle: { ...style,
|
|
1927
1855
|
transition
|
|
1928
|
-
}
|
|
1856
|
+
},
|
|
1929
1857
|
scrimStyle: {
|
|
1930
1858
|
opacity: scrimOpacity,
|
|
1931
1859
|
transition: scrimTransition
|
|
@@ -1939,43 +1867,45 @@ const DialogBackdrop = /*#__PURE__*/react$1.forwardRef(function DialogBackdrop(p
|
|
|
1939
1867
|
const {
|
|
1940
1868
|
open,
|
|
1941
1869
|
onClose,
|
|
1942
|
-
__css
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1870
|
+
__css,
|
|
1871
|
+
...otherProps
|
|
1872
|
+
} = props;
|
|
1946
1873
|
const pointerEvents = open ? undefined : 'none';
|
|
1947
|
-
return /*#__PURE__*/jsxRuntime.jsx(ModalBackdrop,
|
|
1874
|
+
return /*#__PURE__*/jsxRuntime.jsx(ModalBackdrop, {
|
|
1948
1875
|
as: Box,
|
|
1949
1876
|
ref: forwardedRef,
|
|
1950
1877
|
onClose: onClose,
|
|
1951
1878
|
style: {
|
|
1952
1879
|
pointerEvents
|
|
1953
1880
|
},
|
|
1954
|
-
__css:
|
|
1881
|
+
__css: {
|
|
1955
1882
|
position: 'fixed',
|
|
1956
1883
|
top: '0',
|
|
1957
1884
|
left: '0',
|
|
1958
1885
|
right: '0',
|
|
1959
1886
|
bottom: '0',
|
|
1960
|
-
zIndex: 'dialog'
|
|
1961
|
-
|
|
1962
|
-
|
|
1887
|
+
zIndex: 'dialog',
|
|
1888
|
+
// Can't set overflow auto here otherwise slide animation
|
|
1889
|
+
...__css
|
|
1890
|
+
},
|
|
1891
|
+
...otherProps
|
|
1892
|
+
});
|
|
1963
1893
|
});
|
|
1964
1894
|
|
|
1965
1895
|
const Modal$1 = core.Modal;
|
|
1966
1896
|
const BottomSheetSurface = /*#__PURE__*/react$1.forwardRef(function BottomSheetSurface(props, forwardedRef) {
|
|
1967
1897
|
const {
|
|
1968
|
-
__css
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1898
|
+
__css,
|
|
1899
|
+
...otherProps
|
|
1900
|
+
} = props;
|
|
1972
1901
|
const theme = useTheme();
|
|
1973
|
-
return /*#__PURE__*/jsxRuntime.jsx(Modal$1,
|
|
1902
|
+
return /*#__PURE__*/jsxRuntime.jsx(Modal$1, {
|
|
1974
1903
|
ref: forwardedRef,
|
|
1975
1904
|
as: Paper,
|
|
1976
1905
|
theme: theme,
|
|
1977
|
-
elevation:
|
|
1978
|
-
|
|
1906
|
+
elevation: 3,
|
|
1907
|
+
darkThemeBackgroundOverlay: 3,
|
|
1908
|
+
__css: {
|
|
1979
1909
|
position: 'absolute',
|
|
1980
1910
|
bg: 'surface',
|
|
1981
1911
|
bottom: 0,
|
|
@@ -1987,18 +1917,19 @@ const BottomSheetSurface = /*#__PURE__*/react$1.forwardRef(function BottomSheetS
|
|
|
1987
1917
|
maxWidth: "37.5rem",
|
|
1988
1918
|
maxHeight: '50%',
|
|
1989
1919
|
overflow: 'auto',
|
|
1990
|
-
pointerEvents: 'auto'
|
|
1991
|
-
|
|
1992
|
-
|
|
1920
|
+
pointerEvents: 'auto',
|
|
1921
|
+
...__css
|
|
1922
|
+
},
|
|
1923
|
+
...otherProps
|
|
1924
|
+
});
|
|
1993
1925
|
});
|
|
1994
1926
|
|
|
1995
1927
|
const BottomSheet = /*#__PURE__*/react$1.forwardRef(function BottomSheet(props, forwardedRef) {
|
|
1996
1928
|
const {
|
|
1997
1929
|
open: openProp = false,
|
|
1998
|
-
onClose
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
1930
|
+
onClose,
|
|
1931
|
+
...otherProps
|
|
1932
|
+
} = props;
|
|
2002
1933
|
const {
|
|
2003
1934
|
containerStyle,
|
|
2004
1935
|
scrimStyle,
|
|
@@ -2020,9 +1951,10 @@ const BottomSheet = /*#__PURE__*/react$1.forwardRef(function BottomSheet(props,
|
|
|
2020
1951
|
__css: scrimStyle
|
|
2021
1952
|
}), /*#__PURE__*/jsxRuntime.jsx(DialogContainer, {
|
|
2022
1953
|
__css: containerStyle,
|
|
2023
|
-
children: /*#__PURE__*/jsxRuntime.jsx(BottomSheetSurface,
|
|
2024
|
-
ref: forwardedRef
|
|
2025
|
-
|
|
1954
|
+
children: /*#__PURE__*/jsxRuntime.jsx(BottomSheetSurface, {
|
|
1955
|
+
ref: forwardedRef,
|
|
1956
|
+
...otherProps
|
|
1957
|
+
})
|
|
2026
1958
|
})]
|
|
2027
1959
|
})
|
|
2028
1960
|
});
|
|
@@ -2042,16 +1974,15 @@ const Input = /*#__PURE__*/react$1.forwardRef(function Input(props, forwardedRef
|
|
|
2042
1974
|
hasLabel = true,
|
|
2043
1975
|
leadingIcon,
|
|
2044
1976
|
trailingIcon,
|
|
2045
|
-
multiline
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
as: as,
|
|
1977
|
+
multiline,
|
|
1978
|
+
...otherProps
|
|
1979
|
+
} = props;
|
|
1980
|
+
return /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
1981
|
+
as: as,
|
|
2051
1982
|
ref: forwardedRef,
|
|
2052
|
-
multiline: multiline
|
|
2053
|
-
|
|
2054
|
-
__css:
|
|
1983
|
+
multiline: multiline,
|
|
1984
|
+
...otherProps,
|
|
1985
|
+
__css: {
|
|
2055
1986
|
WebkitTapHighlightColor: 'transparent',
|
|
2056
1987
|
appearance: 'none',
|
|
2057
1988
|
outline: 'none',
|
|
@@ -2067,16 +1998,16 @@ const Input = /*#__PURE__*/react$1.forwardRef(function Input(props, forwardedRef
|
|
|
2067
1998
|
letterSpacing: "0.03125rem",
|
|
2068
1999
|
textAlign: 'left',
|
|
2069
2000
|
display: 'flex',
|
|
2070
|
-
alignItems: 'center'
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2001
|
+
alignItems: 'center',
|
|
2002
|
+
...(!multiline && {
|
|
2003
|
+
overflow: 'hidden',
|
|
2004
|
+
whiteSpace: 'nowrap',
|
|
2005
|
+
textOverflow: 'ellipsis'
|
|
2006
|
+
}),
|
|
2076
2007
|
'::placeholder': {
|
|
2077
2008
|
opacity: 0,
|
|
2078
2009
|
color: variant === 'filled' ? alpha('on.surface-variant', 0.87) : alpha('on.surface-variant', 0.6),
|
|
2079
|
-
transition: `opacity .18s
|
|
2010
|
+
transition: `opacity .18s ${EASING_STANDARD}`
|
|
2080
2011
|
},
|
|
2081
2012
|
':disabled::placeholder': {
|
|
2082
2013
|
color: alpha('on.surface', 0.38)
|
|
@@ -2097,19 +2028,23 @@ const Input = /*#__PURE__*/react$1.forwardRef(function Input(props, forwardedRef
|
|
|
2097
2028
|
}
|
|
2098
2029
|
},
|
|
2099
2030
|
paddingLeft: leadingIcon ? polished.rem(PADDING_LEFT_WITH_ICON + ICON_WIDTH + PADDING_LEFT_WITHOUT_ICON) : polished.rem(PADDING_LEFT_WITHOUT_ICON),
|
|
2100
|
-
paddingRight: trailingIcon ? polished.rem(PADDING_RIGHT_WITH_ICON + ICON_WIDTH + PADDING_RIGHT_WITHOUT_ICON) : polished.rem(PADDING_RIGHT_WITHOUT_ICON)
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2031
|
+
paddingRight: trailingIcon ? polished.rem(PADDING_RIGHT_WITH_ICON + ICON_WIDTH + PADDING_RIGHT_WITHOUT_ICON) : polished.rem(PADDING_RIGHT_WITHOUT_ICON),
|
|
2032
|
+
...(variant === 'outlined' && {
|
|
2033
|
+
paddingTop: "1rem",
|
|
2034
|
+
paddingBottom: "1rem"
|
|
2035
|
+
}),
|
|
2036
|
+
...(variant === 'filled' && {
|
|
2037
|
+
paddingTop: hasLabel ? "1.5rem" : "1rem",
|
|
2038
|
+
paddingBottom: hasLabel ? "0.5rem" : "1rem"
|
|
2039
|
+
}),
|
|
2040
|
+
...(multiline && {
|
|
2041
|
+
resize: 'vertical',
|
|
2042
|
+
paddingTop: 0,
|
|
2043
|
+
marginTop: variant === 'outlined' || !hasLabel ? "1.125rem" : "1.625rem"
|
|
2044
|
+
}),
|
|
2045
|
+
...__css
|
|
2046
|
+
}
|
|
2047
|
+
});
|
|
2113
2048
|
});
|
|
2114
2049
|
|
|
2115
2050
|
const notchedoutlineContext = /*#__PURE__*/react$1.createContext(null);
|
|
@@ -2128,19 +2063,18 @@ const FloatingLabel = /*#__PURE__*/react$1.forwardRef(function FloatingLabel(pro
|
|
|
2128
2063
|
style = {},
|
|
2129
2064
|
translateX: translateXProp,
|
|
2130
2065
|
translateY: translateYProp,
|
|
2131
|
-
children
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2066
|
+
children,
|
|
2067
|
+
...otherProps
|
|
2068
|
+
} = props;
|
|
2135
2069
|
const ctx = useNotchedOutlineContext();
|
|
2136
2070
|
const notchStart = ctx ? ctx.notchStart : 0;
|
|
2137
2071
|
const Text$1 = Text;
|
|
2138
2072
|
const translateX = translateXProp !== undefined ? translateXProp : notchStart - offsetX;
|
|
2139
2073
|
const translateY = translateYProp !== undefined ? translateYProp : -height / 2;
|
|
2140
2074
|
const transform = active ? `translate(${polished.rem(translateX)}, ${polished.rem(translateY)}) scale(${scale})` : undefined;
|
|
2141
|
-
return /*#__PURE__*/jsxRuntime.jsx(Text$1,
|
|
2075
|
+
return /*#__PURE__*/jsxRuntime.jsx(Text$1, {
|
|
2142
2076
|
as: "label",
|
|
2143
|
-
variant: "
|
|
2077
|
+
variant: "body-large",
|
|
2144
2078
|
ref: forwardedRef,
|
|
2145
2079
|
__css: {
|
|
2146
2080
|
position: 'absolute',
|
|
@@ -2150,15 +2084,16 @@ const FloatingLabel = /*#__PURE__*/react$1.forwardRef(function FloatingLabel(pro
|
|
|
2150
2084
|
left: polished.rem(offsetX),
|
|
2151
2085
|
height: typeof height === 'number' ? polished.rem(height) : height,
|
|
2152
2086
|
transformOrigin: 'left center',
|
|
2153
|
-
transition: `transform ${transitionTime}ms
|
|
2087
|
+
transition: `transform ${transitionTime}ms ${EASING_STANDARD}, color ${transitionTime}ms ${EASING_STANDARD}`,
|
|
2154
2088
|
pointerEvents: 'none'
|
|
2155
2089
|
},
|
|
2156
|
-
style:
|
|
2157
|
-
transform
|
|
2158
|
-
|
|
2159
|
-
|
|
2090
|
+
style: {
|
|
2091
|
+
transform,
|
|
2092
|
+
...style
|
|
2093
|
+
},
|
|
2094
|
+
...otherProps,
|
|
2160
2095
|
children: children
|
|
2161
|
-
})
|
|
2096
|
+
});
|
|
2162
2097
|
});
|
|
2163
2098
|
|
|
2164
2099
|
const LineRipple = /*#__PURE__*/react$1.forwardRef(function LineRipple(props, forwardedRef) {
|
|
@@ -2169,10 +2104,9 @@ const LineRipple = /*#__PURE__*/react$1.forwardRef(function LineRipple(props, fo
|
|
|
2169
2104
|
active = false,
|
|
2170
2105
|
posx = -1,
|
|
2171
2106
|
style: styleProp = {},
|
|
2172
|
-
__css
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2107
|
+
__css,
|
|
2108
|
+
...otherProps
|
|
2109
|
+
} = props;
|
|
2176
2110
|
const [style, setStyle] = react$1.useState();
|
|
2177
2111
|
const theme = useTheme();
|
|
2178
2112
|
const leaveTimeout = react$1.useRef();
|
|
@@ -2197,13 +2131,15 @@ const LineRipple = /*#__PURE__*/react$1.forwardRef(function LineRipple(props, fo
|
|
|
2197
2131
|
clearTimeout(leaveTimeout.current);
|
|
2198
2132
|
};
|
|
2199
2133
|
}, [active, posx, transitionDuration]);
|
|
2200
|
-
return /*#__PURE__*/jsxRuntime.jsx(Box,
|
|
2134
|
+
return /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
2201
2135
|
as: asProp,
|
|
2202
2136
|
ref: forwardedRef,
|
|
2203
2137
|
bg: color,
|
|
2204
2138
|
theme: theme,
|
|
2205
|
-
style:
|
|
2206
|
-
|
|
2139
|
+
style: { ...style,
|
|
2140
|
+
...styleProp
|
|
2141
|
+
},
|
|
2142
|
+
__css: {
|
|
2207
2143
|
position: 'absolute',
|
|
2208
2144
|
bottom: '0',
|
|
2209
2145
|
left: '0',
|
|
@@ -2212,10 +2148,12 @@ const LineRipple = /*#__PURE__*/react$1.forwardRef(function LineRipple(props, fo
|
|
|
2212
2148
|
zIndex: 1,
|
|
2213
2149
|
transform: 'scaleX(0)',
|
|
2214
2150
|
transformOrigin: 'center center',
|
|
2215
|
-
transition: `transform ${transitionDuration}ms
|
|
2216
|
-
opacity: 0
|
|
2217
|
-
|
|
2218
|
-
|
|
2151
|
+
transition: `transform ${transitionDuration}ms ${EASING_STANDARD},opacity ${transitionDuration}ms ${EASING_STANDARD}`,
|
|
2152
|
+
opacity: 0,
|
|
2153
|
+
...__css
|
|
2154
|
+
},
|
|
2155
|
+
...otherProps
|
|
2156
|
+
});
|
|
2219
2157
|
});
|
|
2220
2158
|
|
|
2221
2159
|
const makeSelector$1 = state => `input:${state} ~ &,` + `select:${state} ~ &,` + `button:${state} ~ &,` + `textarea:${state} ~ &`;
|
|
@@ -2226,7 +2164,7 @@ const Overlay = props => {
|
|
|
2226
2164
|
} = props;
|
|
2227
2165
|
const theme = useTheme();
|
|
2228
2166
|
return /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
2229
|
-
__css:
|
|
2167
|
+
__css: {
|
|
2230
2168
|
position: 'absolute',
|
|
2231
2169
|
top: 0,
|
|
2232
2170
|
bottom: 0,
|
|
@@ -2245,10 +2183,11 @@ const Overlay = props => {
|
|
|
2245
2183
|
cursor: 'default',
|
|
2246
2184
|
color: alpha('on.surface', 0.6),
|
|
2247
2185
|
opacity: 0.02
|
|
2248
|
-
}
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2186
|
+
},
|
|
2187
|
+
...(forceActive && {
|
|
2188
|
+
opacity: css.get(theme, `buttons.overlays.transparent.focus.opacity`)
|
|
2189
|
+
})
|
|
2190
|
+
}
|
|
2252
2191
|
});
|
|
2253
2192
|
};
|
|
2254
2193
|
|
|
@@ -2278,20 +2217,19 @@ const FilledContainer = /*#__PURE__*/react$1.forwardRef(function FilledContainer
|
|
|
2278
2217
|
error = false,
|
|
2279
2218
|
disabled = false,
|
|
2280
2219
|
forceActive = false,
|
|
2281
|
-
leadingIcon
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2220
|
+
leadingIcon,
|
|
2221
|
+
...otherProps
|
|
2222
|
+
} = props;
|
|
2285
2223
|
const finalLabelHeight = 16;
|
|
2286
2224
|
const labelHeight = finalLabelHeight / 0.75;
|
|
2287
2225
|
const inputHeight = 56;
|
|
2288
2226
|
const color = error ? 'error' : colorProp;
|
|
2289
2227
|
const active = hasFocus || forceActive;
|
|
2290
|
-
return /*#__PURE__*/jsxRuntime.jsxs(Box,
|
|
2228
|
+
return /*#__PURE__*/jsxRuntime.jsxs(Box, {
|
|
2291
2229
|
ref: forwardedRef,
|
|
2292
2230
|
disabled: disabled,
|
|
2293
2231
|
active: active || error,
|
|
2294
|
-
__css:
|
|
2232
|
+
__css: {
|
|
2295
2233
|
position: 'relative',
|
|
2296
2234
|
lineHeight: 0,
|
|
2297
2235
|
width: '100%',
|
|
@@ -2300,14 +2238,16 @@ const FilledContainer = /*#__PURE__*/react$1.forwardRef(function FilledContainer
|
|
|
2300
2238
|
boxSizing: 'border-box',
|
|
2301
2239
|
borderTopRightRadius: "0.25rem",
|
|
2302
2240
|
borderTopLeftRadius: "0.25rem",
|
|
2303
|
-
color: alpha('on.surface-variant', 0.87)
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2241
|
+
color: alpha('on.surface-variant', 0.87),
|
|
2242
|
+
...(disabled && {
|
|
2243
|
+
backgroundColor: alpha('on.surface-variant', 0.08),
|
|
2244
|
+
color: alpha('on.surface-variant', 0.38)
|
|
2245
|
+
}),
|
|
2246
|
+
...(active && {
|
|
2247
|
+
color: 'primary'
|
|
2248
|
+
})
|
|
2249
|
+
},
|
|
2250
|
+
...otherProps,
|
|
2311
2251
|
children: [label && /*#__PURE__*/jsxRuntime.jsx(FloatingLabel, {
|
|
2312
2252
|
height: inputHeight,
|
|
2313
2253
|
offsetX: leadingIcon ? PADDING_LEFT_WITH_ICON + ICON_WIDTH + PADDING_LEFT_WITHOUT_ICON : PADDING_LEFT_WITHOUT_ICON,
|
|
@@ -2327,18 +2267,18 @@ const FilledContainer = /*#__PURE__*/react$1.forwardRef(function FilledContainer
|
|
|
2327
2267
|
active: active || error,
|
|
2328
2268
|
color: color
|
|
2329
2269
|
})]
|
|
2330
|
-
})
|
|
2270
|
+
});
|
|
2331
2271
|
});
|
|
2332
2272
|
|
|
2333
2273
|
const NOTCH_PADDING = 4;
|
|
2334
2274
|
|
|
2335
2275
|
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]`;
|
|
2336
2276
|
|
|
2337
|
-
const InnerContainer = /*#__PURE__*/_styled__default[
|
|
2338
|
-
shouldForwardProp: shouldForwardProp__default[
|
|
2277
|
+
const InnerContainer = /*#__PURE__*/_styled__default["default"]('div', process.env.NODE_ENV === "production" ? {
|
|
2278
|
+
shouldForwardProp: shouldForwardProp__default["default"],
|
|
2339
2279
|
target: "ejp8zhv0"
|
|
2340
2280
|
} : {
|
|
2341
|
-
shouldForwardProp: shouldForwardProp__default[
|
|
2281
|
+
shouldForwardProp: shouldForwardProp__default["default"],
|
|
2342
2282
|
target: "ejp8zhv0",
|
|
2343
2283
|
label: "InnerContainer"
|
|
2344
2284
|
})("position:absolute;display:flex;left:0;top:0;bottom:0;width:100%;height:100%;pointer-events:none;", ({
|
|
@@ -2378,32 +2318,32 @@ const InnerContainer = /*#__PURE__*/_styled__default['default']('div', process.e
|
|
|
2378
2318
|
};
|
|
2379
2319
|
}
|
|
2380
2320
|
|
|
2381
|
-
const inactiveStyle =
|
|
2321
|
+
const inactiveStyle = {
|
|
2382
2322
|
color: 'on.surface-variant',
|
|
2383
|
-
borderColor: 'outline'
|
|
2384
|
-
|
|
2385
|
-
|
|
2323
|
+
borderColor: 'outline',
|
|
2324
|
+
...borderStyling(borderRadius, borderWidth)
|
|
2325
|
+
};
|
|
2386
2326
|
const hoverStyle = {
|
|
2387
2327
|
borderColor: 'on.surface',
|
|
2388
2328
|
color: 'on.surface-variant'
|
|
2389
2329
|
};
|
|
2390
|
-
|
|
2391
|
-
const focusStyle = _extends__default['default']({
|
|
2330
|
+
const focusStyle = {
|
|
2392
2331
|
borderColor: color,
|
|
2393
|
-
color: alpha(color, 0.87)
|
|
2394
|
-
|
|
2395
|
-
|
|
2332
|
+
color: alpha(color, 0.87),
|
|
2333
|
+
...borderStyling(borderRadius, borderWidthWhenFocused)
|
|
2334
|
+
};
|
|
2396
2335
|
const disabledStyle = {
|
|
2397
2336
|
borderColor: alpha('on.surface', 0.06),
|
|
2398
2337
|
color: alpha('on.surface', 0.38)
|
|
2399
2338
|
};
|
|
2400
2339
|
return css.css({
|
|
2401
2340
|
// notch items styles when not focused
|
|
2402
|
-
['[data-notch-outline-item]']:
|
|
2341
|
+
['[data-notch-outline-item]']: {
|
|
2403
2342
|
boxSizing: 'border-box',
|
|
2404
2343
|
borderStyle,
|
|
2405
|
-
transition: `border-color .15s
|
|
2406
|
-
|
|
2344
|
+
transition: `border-color .15s ${EASING_STANDARD}`,
|
|
2345
|
+
...(forceActive ? focusStyle : inactiveStyle)
|
|
2346
|
+
},
|
|
2407
2347
|
// notch items styles when input is hovered
|
|
2408
2348
|
[makeSelector('hover:not([disabled]):not(:focus)')]: forceActive ? focusStyle : hoverStyle,
|
|
2409
2349
|
// notch items styles when input is focused
|
|
@@ -2411,7 +2351,7 @@ const InnerContainer = /*#__PURE__*/_styled__default['default']('div', process.e
|
|
|
2411
2351
|
// notch items styles when input is disabled
|
|
2412
2352
|
[makeSelector('disabled')]: disabledStyle
|
|
2413
2353
|
});
|
|
2414
|
-
}, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
2354
|
+
}, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlZENvbXBvbmVudHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBc0I4QiIsImZpbGUiOiJzdHlsZWRDb21wb25lbnRzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuaW1wb3J0IHsgcmVtIH0gZnJvbSAncG9saXNoZWQnO1xuaW1wb3J0IHNob3VsZEZvcndhcmRQcm9wIGZyb20gJ0BzdHlsZWQtc3lzdGVtL3Nob3VsZC1mb3J3YXJkLXByb3AnO1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQHN0eWxlZC1zeXN0ZW0vY3NzJztcblxuaW1wb3J0IHsgYWxwaGEgfSBmcm9tICcuLi9jb2xvcic7XG5pbXBvcnQgdHlwZSB7IFRoZW1lIH0gZnJvbSAnLi4vdGhlbWUnO1xuaW1wb3J0IHsgRUFTSU5HX1NUQU5EQVJEIH0gZnJvbSAnLi4vbW90aW9uJztcblxuZXhwb3J0IGNvbnN0IE5PVENIX1BBRERJTkcgPSA0O1xuXG5jb25zdCBtYWtlU2VsZWN0b3IgPSAoXG4gIHN0YXRlOlxuICAgIHwgJ2hvdmVyOm5vdChbZGlzYWJsZWRdKTpub3QoOmZvY3VzKSdcbiAgICB8ICdmb2N1czpub3QoW2Rpc2FibGVkXSknXG4gICAgfCAnZGlzYWJsZWQnXG4pID0+XG4gIGBpbnB1dDoke3N0YXRlfSB+ICYgW2RhdGEtbm90Y2gtb3V0bGluZS1pdGVtXSxgICtcbiAgYHNlbGVjdDoke3N0YXRlfSB+ICYgW2RhdGEtbm90Y2gtb3V0bGluZS1pdGVtXSxgICtcbiAgYFtyb2xlPVwiYnV0dG9uXCJdOiR7c3RhdGV9IH4gJiBbZGF0YS1ub3RjaC1vdXRsaW5lLWl0ZW1dLGAgK1xuICBgdGV4dGFyZWE6JHtzdGF0ZX0gfiAmIFtkYXRhLW5vdGNoLW91dGxpbmUtaXRlbV1gO1xuXG5leHBvcnQgY29uc3QgSW5uZXJDb250YWluZXIgPSBzdHlsZWQoJ2RpdicsIHtcbiAgc2hvdWxkRm9yd2FyZFByb3AsXG59KTx7XG4gIGNvbG9yPzogc3RyaW5nO1xuICB0aGVtZT86IFRoZW1lO1xuICBib3JkZXJSYWRpdXM6IG51bWJlcjtcbiAgYm9yZGVyV2lkdGg6IG51bWJlcjtcbiAgYm9yZGVyV2lkdGhXaGVuRm9jdXNlZDogbnVtYmVyO1xuICBib3JkZXJTdHlsZTogc3RyaW5nO1xuICBub3RjaFN0YXJ0OiBudW1iZXI7XG4gIGZvcmNlQWN0aXZlPzogYm9vbGVhbjtcbn0+KFxuICB7XG4gICAgcG9zaXRpb246ICdhYnNvbHV0ZScsXG4gICAgZGlzcGxheTogJ2ZsZXgnLFxuICAgIGxlZnQ6IDAsXG4gICAgdG9wOiAwLFxuICAgIGJvdHRvbTogMCxcbiAgICB3aWR0aDogJzEwMCUnLFxuICAgIGhlaWdodDogJzEwMCUnLFxuICAgIHBvaW50ZXJFdmVudHM6ICdub25lJyxcbiAgfSxcbiAgKHtcbiAgICBjb2xvciA9ICdvbi5zdXJmYWNlJyxcbiAgICBib3JkZXJSYWRpdXM6IGJvcmRlclJhZGl1c1B4LFxuICAgIGJvcmRlcldpZHRoOiBib3JkZXJXaWR0aFB4LFxuICAgIGJvcmRlcldpZHRoV2hlbkZvY3VzZWQ6IGJvcmRlcldpZHRoV2hlbkZvY3VzZWRQeCxcbiAgICBib3JkZXJTdHlsZSxcbiAgICBub3RjaFN0YXJ0LFxuICAgIGZvcmNlQWN0aXZlID0gZmFsc2UsXG4gIH0pID0+IHtcbiAgICBjb25zdCB3aWR0aCA9IHJlbShub3RjaFN0YXJ0IC0gTk9UQ0hfUEFERElORyk7XG4gICAgY29uc3QgYm9yZGVyUmFkaXVzID0gcmVtKGJvcmRlclJhZGl1c1B4KTtcbiAgICBjb25zdCBib3JkZXJXaWR0aCA9IHJlbShib3JkZXJXaWR0aFB4KTtcbiAgICBjb25zdCBib3JkZXJXaWR0aFdoZW5Gb2N1c2VkID0gcmVtKGJvcmRlcldpZHRoV2hlbkZvY3VzZWRQeCk7XG5cbiAgICBmdW5jdGlvbiBib3JkZXJTdHlsaW5nKGJvcmRlclJhZGl1czogc3RyaW5nLCBib3JkZXJXaWR0aDogc3RyaW5nKSB7XG4gICAgICByZXR1cm4ge1xuICAgICAgICBbJyZbZGF0YS1ub3RjaC1vdXRsaW5lLWl0ZW09XCJzdGFydFwiXSddOiB7XG4gICAgICAgICAgYm9yZGVyVG9wTGVmdFJhZGl1czogYm9yZGVyUmFkaXVzLFxuICAgICAgICAgIGJvcmRlckJvdHRvbUxlZnRSYWRpdXM6IGJvcmRlclJhZGl1cyxcbiAgICAgICAgICBib3JkZXJXaWR0aDogYm9yZGVyV2lkdGgsXG4gICAgICAgICAgYm9yZGVyUmlnaHRXaWR0aDogMCxcbiAgICAgICAgICB3aWR0aCxcbiAgICAgICAgfSxcbiAgICAgICAgWycmW2RhdGEtbm90Y2gtb3V0bGluZS1pdGVtPVwibWlkZGxlXCJdJ106IHtcbiAgICAgICAgICBib3JkZXJXaWR0aDogMCxcbiAgICAgICAgICBib3JkZXJCb3R0b21XaWR0aDogYm9yZGVyV2lkdGgsXG4gICAgICAgIH0sXG4gICAgICAgIFsnJltkYXRhLW5vdGNoLW91dGxpbmUtaXRlbT1cImVuZFwiXSddOiB7XG4gICAgICAgICAgYm9yZGVyV2lkdGg6IGJvcmRlcldpZHRoLFxuICAgICAgICAgIGJvcmRlckxlZnQ6IDAsXG4gICAgICAgICAgYm9yZGVyVG9wUmlnaHRSYWRpdXM6IGJvcmRlclJhZGl1cyxcbiAgICAgICAgICBib3JkZXJCb3R0b21SaWdodFJhZGl1czogYm9yZGVyUmFkaXVzLFxuICAgICAgICAgIGZsZXg6IDEsXG4gICAgICAgIH0sXG4gICAgICB9O1xuICAgIH1cblxuICAgIGNvbnN0IGluYWN0aXZlU3R5bGUgPSB7XG4gICAgICBjb2xvcjogJ29uLnN1cmZhY2UtdmFyaWFudCcsXG4gICAgICBib3JkZXJDb2xvcjogJ291dGxpbmUnLFxuICAgICAgLi4uYm9yZGVyU3R5bGluZyhib3JkZXJSYWRpdXMsIGJvcmRlcldpZHRoKSxcbiAgICB9O1xuXG4gICAgY29uc3QgaG92ZXJTdHlsZSA9IHtcbiAgICAgIGJvcmRlckNvbG9yOiAnb24uc3VyZmFjZScsXG4gICAgICBjb2xvcjogJ29uLnN1cmZhY2UtdmFyaWFudCcsXG4gICAgfTtcblxuICAgIGNvbnN0IGZvY3VzU3R5bGUgPSB7XG4gICAgICBib3JkZXJDb2xvcjogY29sb3IsXG4gICAgICBjb2xvcjogYWxwaGEoY29sb3IsIDAuODcpLFxuICAgICAgLi4uYm9yZGVyU3R5bGluZyhib3JkZXJSYWRpdXMsIGJvcmRlcldpZHRoV2hlbkZvY3VzZWQpLFxuICAgIH07XG5cbiAgICBjb25zdCBkaXNhYmxlZFN0eWxlID0ge1xuICAgICAgYm9yZGVyQ29sb3I6IGFscGhhKCdvbi5zdXJmYWNlJywgMC4wNiksXG4gICAgICBjb2xvcjogYWxwaGEoJ29uLnN1cmZhY2UnLCAwLjM4KSxcbiAgICB9O1xuXG4gICAgcmV0dXJuIGNzcyh7XG4gICAgICAvLyBub3RjaCBpdGVtcyBzdHlsZXMgd2hlbiBub3QgZm9jdXNlZFxuICAgICAgWydbZGF0YS1ub3RjaC1vdXRsaW5lLWl0ZW1dJ106IHtcbiAgICAgICAgYm94U2l6aW5nOiAnYm9yZGVyLWJveCcsXG4gICAgICAgIGJvcmRlclN0eWxlLFxuICAgICAgICB0cmFuc2l0aW9uOiBgYm9yZGVyLWNvbG9yIC4xNXMgJHtFQVNJTkdfU1RBTkRBUkR9YCxcbiAgICAgICAgLi4uKGZvcmNlQWN0aXZlID8gZm9jdXNTdHlsZSA6IGluYWN0aXZlU3R5bGUpLFxuICAgICAgfSxcbiAgICAgIC8vIG5vdGNoIGl0ZW1zIHN0eWxlcyB3aGVuIGlucHV0IGlzIGhvdmVyZWRcbiAgICAgIFttYWtlU2VsZWN0b3IoJ2hvdmVyOm5vdChbZGlzYWJsZWRdKTpub3QoOmZvY3VzKScpXTogZm9yY2VBY3RpdmVcbiAgICAgICAgPyBmb2N1c1N0eWxlXG4gICAgICAgIDogaG92ZXJTdHlsZSxcbiAgICAgIC8vIG5vdGNoIGl0ZW1zIHN0eWxlcyB3aGVuIGlucHV0IGlzIGZvY3VzZWRcbiAgICAgIFttYWtlU2VsZWN0b3IoJ2ZvY3VzOm5vdChbZGlzYWJsZWRdKScpXTogZm9jdXNTdHlsZSxcbiAgICAgIC8vIG5vdGNoIGl0ZW1zIHN0eWxlcyB3aGVuIGlucHV0IGlzIGRpc2FibGVkXG4gICAgICBbbWFrZVNlbGVjdG9yKCdkaXNhYmxlZCcpXTogZGlzYWJsZWRTdHlsZSxcbiAgICB9KTtcbiAgfVxuKTtcbiJdfQ== */");
|
|
2415
2355
|
|
|
2416
2356
|
const NotchedOutline = /*#__PURE__*/react$1.forwardRef(function NotchedOutline(props, forwardedRef) {
|
|
2417
2357
|
let {
|
|
@@ -2425,12 +2365,11 @@ const NotchedOutline = /*#__PURE__*/react$1.forwardRef(function NotchedOutline(p
|
|
|
2425
2365
|
notchActive = false,
|
|
2426
2366
|
forceActive = false,
|
|
2427
2367
|
children,
|
|
2428
|
-
label
|
|
2368
|
+
label,
|
|
2369
|
+
...otherProps
|
|
2429
2370
|
/* eslint-enable prefer-const */
|
|
2430
2371
|
|
|
2431
|
-
} = props
|
|
2432
|
-
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
|
|
2433
|
-
|
|
2372
|
+
} = props; // Minimum notch start position that makes sense. Otherwise it will mess up with the border/border radii
|
|
2434
2373
|
|
|
2435
2374
|
const MIN_NOTCH_POSX = (props.borderRadius || 0) + NOTCH_PADDING;
|
|
2436
2375
|
const theme = useTheme();
|
|
@@ -2439,9 +2378,9 @@ const NotchedOutline = /*#__PURE__*/react$1.forwardRef(function NotchedOutline(p
|
|
|
2439
2378
|
value: {
|
|
2440
2379
|
notchStart
|
|
2441
2380
|
},
|
|
2442
|
-
children: [children, /*#__PURE__*/jsxRuntime.jsxs(InnerContainer,
|
|
2443
|
-
ref: forwardedRef
|
|
2444
|
-
|
|
2381
|
+
children: [children, /*#__PURE__*/jsxRuntime.jsxs(InnerContainer, {
|
|
2382
|
+
ref: forwardedRef,
|
|
2383
|
+
...otherProps,
|
|
2445
2384
|
color: borderColor,
|
|
2446
2385
|
theme: theme,
|
|
2447
2386
|
borderRadius: borderRadius,
|
|
@@ -2461,7 +2400,7 @@ const NotchedOutline = /*#__PURE__*/react$1.forwardRef(function NotchedOutline(p
|
|
|
2461
2400
|
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
2462
2401
|
"data-notch-outline-item": "end"
|
|
2463
2402
|
})]
|
|
2464
|
-
})
|
|
2403
|
+
})]
|
|
2465
2404
|
});
|
|
2466
2405
|
});
|
|
2467
2406
|
|
|
@@ -2475,20 +2414,17 @@ const OutlinedContainer = /*#__PURE__*/react$1.forwardRef(function OutlinedConta
|
|
|
2475
2414
|
children,
|
|
2476
2415
|
error,
|
|
2477
2416
|
color: colorProp = 'primary',
|
|
2478
|
-
leadingIcon
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2417
|
+
leadingIcon,
|
|
2418
|
+
...otherProps
|
|
2419
|
+
} = props;
|
|
2482
2420
|
const [labelWidth, setLabelWidth] = react$1.useState(0);
|
|
2483
2421
|
const labelRef = react$1.useRef(null);
|
|
2484
2422
|
useEnhancedEffect$1(() => {
|
|
2485
2423
|
const element = labelRef.current;
|
|
2486
2424
|
|
|
2487
2425
|
if (element) {
|
|
2488
|
-
var _document, _document$fonts, _document$fonts$ready;
|
|
2489
|
-
|
|
2490
2426
|
setLabelWidth(element.offsetWidth);
|
|
2491
|
-
|
|
2427
|
+
document?.fonts?.ready?.then(() => {
|
|
2492
2428
|
// set the label width again once the fonts have been loaded
|
|
2493
2429
|
requestAnimationFrame(() => {
|
|
2494
2430
|
setLabelWidth(element.offsetWidth);
|
|
@@ -2498,10 +2434,10 @@ const OutlinedContainer = /*#__PURE__*/react$1.forwardRef(function OutlinedConta
|
|
|
2498
2434
|
}, [label]);
|
|
2499
2435
|
const color = error ? 'error' : colorProp;
|
|
2500
2436
|
const inputHeight = 56;
|
|
2501
|
-
return /*#__PURE__*/jsxRuntime.jsx(Box,
|
|
2437
|
+
return /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
2502
2438
|
position: "relative",
|
|
2503
|
-
lineHeight: 0
|
|
2504
|
-
|
|
2439
|
+
lineHeight: 0,
|
|
2440
|
+
...otherProps,
|
|
2505
2441
|
children: /*#__PURE__*/jsxRuntime.jsx(NotchedOutline, {
|
|
2506
2442
|
ref: forwardedRef,
|
|
2507
2443
|
borderRadius: 4,
|
|
@@ -2522,7 +2458,7 @@ const OutlinedContainer = /*#__PURE__*/react$1.forwardRef(function OutlinedConta
|
|
|
2522
2458
|
}),
|
|
2523
2459
|
children: children
|
|
2524
2460
|
})
|
|
2525
|
-
})
|
|
2461
|
+
});
|
|
2526
2462
|
});
|
|
2527
2463
|
|
|
2528
2464
|
const HelperText = /*#__PURE__*/react$1.forwardRef(function HelperText(props, forwardedRef) {
|
|
@@ -2532,9 +2468,9 @@ const HelperText = /*#__PURE__*/react$1.forwardRef(function HelperText(props, fo
|
|
|
2532
2468
|
color: colorProp,
|
|
2533
2469
|
error = false,
|
|
2534
2470
|
disabled = false,
|
|
2535
|
-
__css
|
|
2536
|
-
|
|
2537
|
-
|
|
2471
|
+
__css,
|
|
2472
|
+
...otherProps
|
|
2473
|
+
} = props;
|
|
2538
2474
|
|
|
2539
2475
|
if (!leftSide && !rightSide) {
|
|
2540
2476
|
return null;
|
|
@@ -2550,24 +2486,25 @@ const HelperText = /*#__PURE__*/react$1.forwardRef(function HelperText(props, fo
|
|
|
2550
2486
|
color = alpha('on.surface', 0.6);
|
|
2551
2487
|
}
|
|
2552
2488
|
|
|
2553
|
-
return /*#__PURE__*/jsxRuntime.jsxs(Text,
|
|
2489
|
+
return /*#__PURE__*/jsxRuntime.jsxs(Text, {
|
|
2554
2490
|
as: "div",
|
|
2555
2491
|
px: 16,
|
|
2556
2492
|
display: "flex",
|
|
2557
2493
|
pt: 1,
|
|
2558
2494
|
color: color,
|
|
2559
|
-
variant: "
|
|
2495
|
+
variant: "label-small",
|
|
2560
2496
|
ref: forwardedRef,
|
|
2561
2497
|
lineHeight: "normal",
|
|
2562
|
-
__css:
|
|
2563
|
-
color
|
|
2564
|
-
|
|
2565
|
-
|
|
2498
|
+
__css: {
|
|
2499
|
+
color,
|
|
2500
|
+
...__css
|
|
2501
|
+
},
|
|
2502
|
+
...otherProps,
|
|
2566
2503
|
children: [leftSide, rightSide && /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
2567
2504
|
ml: "auto",
|
|
2568
2505
|
children: rightSide
|
|
2569
2506
|
})]
|
|
2570
|
-
})
|
|
2507
|
+
});
|
|
2571
2508
|
});
|
|
2572
2509
|
|
|
2573
2510
|
const IconContainer = ({
|
|
@@ -2628,10 +2565,9 @@ const TextField = /*#__PURE__*/react$1.forwardRef(function TextField(props, forw
|
|
|
2628
2565
|
onBlur,
|
|
2629
2566
|
leadingIcon = null,
|
|
2630
2567
|
trailingIcon = null,
|
|
2631
|
-
containerProps
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2568
|
+
containerProps,
|
|
2569
|
+
...otherProps
|
|
2570
|
+
} = props;
|
|
2635
2571
|
const [value, onChange] = core.useControlledState(valueProp, onChangeProp, defaultValue, setState => e => {
|
|
2636
2572
|
setState(e.target.value);
|
|
2637
2573
|
});
|
|
@@ -2658,7 +2594,7 @@ const TextField = /*#__PURE__*/react$1.forwardRef(function TextField(props, forw
|
|
|
2658
2594
|
display: "inline-flex",
|
|
2659
2595
|
flexDirection: "column",
|
|
2660
2596
|
width: "100%",
|
|
2661
|
-
children: [/*#__PURE__*/jsxRuntime.jsxs(Container,
|
|
2597
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs(Container, {
|
|
2662
2598
|
theme: theme,
|
|
2663
2599
|
label: label,
|
|
2664
2600
|
color: color,
|
|
@@ -2667,12 +2603,12 @@ const TextField = /*#__PURE__*/react$1.forwardRef(function TextField(props, forw
|
|
|
2667
2603
|
inputId: inputId,
|
|
2668
2604
|
hasFocus: hasFocus,
|
|
2669
2605
|
disabled: disabled,
|
|
2670
|
-
leadingIcon: Boolean(leadingIcon)
|
|
2671
|
-
|
|
2606
|
+
leadingIcon: Boolean(leadingIcon),
|
|
2607
|
+
...containerProps,
|
|
2672
2608
|
children: [leadingIcon && /*#__PURE__*/jsxRuntime.jsx(IconContainer, {
|
|
2673
2609
|
position: "start",
|
|
2674
2610
|
children: leadingIcon
|
|
2675
|
-
}), /*#__PURE__*/jsxRuntime.jsx(Input,
|
|
2611
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Input, {
|
|
2676
2612
|
ref: forwardedRef,
|
|
2677
2613
|
as: multiline ? 'textarea' : 'input',
|
|
2678
2614
|
variant: variant,
|
|
@@ -2691,12 +2627,13 @@ const TextField = /*#__PURE__*/react$1.forwardRef(function TextField(props, forw
|
|
|
2691
2627
|
"aria-describedby": helperTextId,
|
|
2692
2628
|
hasLabel: !!label,
|
|
2693
2629
|
leadingIcon: Boolean(leadingIcon),
|
|
2694
|
-
trailingIcon: Boolean(trailingIcon)
|
|
2695
|
-
|
|
2630
|
+
trailingIcon: Boolean(trailingIcon),
|
|
2631
|
+
...otherProps
|
|
2632
|
+
}), trailingIcon && /*#__PURE__*/jsxRuntime.jsx(IconContainer, {
|
|
2696
2633
|
position: "end",
|
|
2697
2634
|
children: trailingIcon
|
|
2698
2635
|
})]
|
|
2699
|
-
})
|
|
2636
|
+
}), /*#__PURE__*/jsxRuntime.jsx(HelperText, {
|
|
2700
2637
|
error: hasError,
|
|
2701
2638
|
disabled: disabled,
|
|
2702
2639
|
leftSide: helperText && /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
@@ -2717,11 +2654,10 @@ const List = /*#__PURE__*/react$1.forwardRef(function List(props, forwardedRef)
|
|
|
2717
2654
|
px = 0,
|
|
2718
2655
|
outlined = true,
|
|
2719
2656
|
variant = 'square',
|
|
2720
|
-
__css = {}
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
return /*#__PURE__*/jsxRuntime.jsx(Paper, _extends__default['default']({
|
|
2657
|
+
__css = {},
|
|
2658
|
+
...otherProps
|
|
2659
|
+
} = props;
|
|
2660
|
+
return /*#__PURE__*/jsxRuntime.jsx(Paper, {
|
|
2725
2661
|
as: innerAs || as,
|
|
2726
2662
|
ref: forwardedRef,
|
|
2727
2663
|
py: py,
|
|
@@ -2730,10 +2666,12 @@ const List = /*#__PURE__*/react$1.forwardRef(function List(props, forwardedRef)
|
|
|
2730
2666
|
darkThemeBackgroundOverlay: elevation,
|
|
2731
2667
|
variant: variant,
|
|
2732
2668
|
outlined: outlined,
|
|
2733
|
-
__css:
|
|
2734
|
-
width: '100%'
|
|
2735
|
-
|
|
2736
|
-
|
|
2669
|
+
__css: {
|
|
2670
|
+
width: '100%',
|
|
2671
|
+
...__css
|
|
2672
|
+
},
|
|
2673
|
+
...otherProps
|
|
2674
|
+
});
|
|
2737
2675
|
});
|
|
2738
2676
|
|
|
2739
2677
|
const ListItem = /*#__PURE__*/react$1.forwardRef(function ListItem(props, forwardedRef) {
|
|
@@ -2746,26 +2684,26 @@ const ListItem = /*#__PURE__*/react$1.forwardRef(function ListItem(props, forwar
|
|
|
2746
2684
|
disabled = false,
|
|
2747
2685
|
color: colorProp,
|
|
2748
2686
|
rippleColor,
|
|
2749
|
-
__css
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2687
|
+
__css,
|
|
2688
|
+
...otherProps
|
|
2689
|
+
} = props;
|
|
2753
2690
|
const selected = ariaSelectedProp || selectedProp;
|
|
2754
2691
|
const color = rippleColor || colorProp || 'primary';
|
|
2755
2692
|
const theme = useTheme();
|
|
2756
2693
|
const baseOpacity = 0.12;
|
|
2757
2694
|
const hoverOpacity = 0.16;
|
|
2758
2695
|
const focusOpacity = 0.24;
|
|
2759
|
-
return /*#__PURE__*/jsxRuntime.jsx(Box,
|
|
2696
|
+
return /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
2760
2697
|
ref: forwardedRef,
|
|
2761
2698
|
as: innerAs || as,
|
|
2762
2699
|
theme: theme,
|
|
2763
2700
|
display: "flex",
|
|
2764
2701
|
"data-disabled": disabled ? '' : undefined,
|
|
2765
2702
|
"aria-selected": selected ? 'true' : undefined,
|
|
2766
|
-
disabled: disabled
|
|
2767
|
-
|
|
2768
|
-
__css:
|
|
2703
|
+
disabled: disabled,
|
|
2704
|
+
...otherProps,
|
|
2705
|
+
__css: {
|
|
2706
|
+
variant: 'text.label-large',
|
|
2769
2707
|
px: 3,
|
|
2770
2708
|
py: "0.75rem",
|
|
2771
2709
|
transition: 'background-color 75ms linear',
|
|
@@ -2784,6 +2722,7 @@ const ListItem = /*#__PURE__*/react$1.forwardRef(function ListItem(props, forwar
|
|
|
2784
2722
|
},
|
|
2785
2723
|
'&[aria-selected="true"]': {
|
|
2786
2724
|
backgroundColor: alpha(color, baseOpacity + 0.12),
|
|
2725
|
+
color,
|
|
2787
2726
|
':hover': {
|
|
2788
2727
|
backgroundColor: alpha(color, hoverOpacity + 0.12)
|
|
2789
2728
|
},
|
|
@@ -2801,26 +2740,26 @@ const ListItem = /*#__PURE__*/react$1.forwardRef(function ListItem(props, forwar
|
|
|
2801
2740
|
cursor: 'default'
|
|
2802
2741
|
},
|
|
2803
2742
|
textDecoration: 'none',
|
|
2804
|
-
WebkitTapHighlightColor: 'transparent'
|
|
2805
|
-
|
|
2743
|
+
WebkitTapHighlightColor: 'transparent',
|
|
2744
|
+
...__css
|
|
2745
|
+
},
|
|
2806
2746
|
children: children
|
|
2807
|
-
})
|
|
2747
|
+
});
|
|
2808
2748
|
});
|
|
2809
2749
|
|
|
2810
2750
|
const ListItemText = /*#__PURE__*/react$1.forwardRef(function ListItemText(props, forwardedRef) {
|
|
2811
2751
|
const {
|
|
2812
2752
|
as: Comp = 'div',
|
|
2813
2753
|
text,
|
|
2814
|
-
secondaryText
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
}, otherProps, {
|
|
2754
|
+
secondaryText,
|
|
2755
|
+
...otherProps
|
|
2756
|
+
} = props;
|
|
2757
|
+
return /*#__PURE__*/jsxRuntime.jsxs(Comp, {
|
|
2758
|
+
ref: forwardedRef,
|
|
2759
|
+
...otherProps,
|
|
2821
2760
|
children: [text, secondaryText && /*#__PURE__*/jsxRuntime.jsx(Text, {
|
|
2822
2761
|
as: "span",
|
|
2823
|
-
variant: "
|
|
2762
|
+
variant: "body-small",
|
|
2824
2763
|
display: "block",
|
|
2825
2764
|
__css: {
|
|
2826
2765
|
color: 'currentColor',
|
|
@@ -2828,7 +2767,7 @@ const ListItemText = /*#__PURE__*/react$1.forwardRef(function ListItemText(props
|
|
|
2828
2767
|
},
|
|
2829
2768
|
children: secondaryText
|
|
2830
2769
|
})]
|
|
2831
|
-
})
|
|
2770
|
+
});
|
|
2832
2771
|
});
|
|
2833
2772
|
|
|
2834
2773
|
// Combobox
|
|
@@ -2837,33 +2776,34 @@ const ComboboxCore = core.Combobox;
|
|
|
2837
2776
|
const Combobox = /*#__PURE__*/react$1.forwardRef((props, forwardedRef) => {
|
|
2838
2777
|
const {
|
|
2839
2778
|
as = 'div',
|
|
2840
|
-
__css
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
return /*#__PURE__*/jsxRuntime.jsx(ComboboxCore, _extends__default['default']({
|
|
2779
|
+
__css,
|
|
2780
|
+
...otherProps
|
|
2781
|
+
} = props;
|
|
2782
|
+
return /*#__PURE__*/jsxRuntime.jsx(ComboboxCore, {
|
|
2845
2783
|
as: Box,
|
|
2846
2784
|
ref: forwardedRef,
|
|
2847
2785
|
innerAs: as,
|
|
2848
|
-
__css:
|
|
2849
|
-
position: 'relative'
|
|
2850
|
-
|
|
2851
|
-
|
|
2786
|
+
__css: {
|
|
2787
|
+
position: 'relative',
|
|
2788
|
+
...__css
|
|
2789
|
+
},
|
|
2790
|
+
...otherProps
|
|
2791
|
+
});
|
|
2852
2792
|
}); /////////////////////////////////////////////////////
|
|
2853
2793
|
// ComboboxInput
|
|
2854
2794
|
|
|
2855
2795
|
const ComboboxInputCore = core.ComboboxInput;
|
|
2856
2796
|
const ComboboxInput = /*#__PURE__*/react$1.forwardRef((props, forwardedRef) => {
|
|
2857
2797
|
const {
|
|
2858
|
-
as = 'input'
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
return /*#__PURE__*/jsxRuntime.jsx(ComboboxInputCore, _extends__default['default']({
|
|
2798
|
+
as = 'input',
|
|
2799
|
+
...otherProps
|
|
2800
|
+
} = props;
|
|
2801
|
+
return /*#__PURE__*/jsxRuntime.jsx(ComboboxInputCore, {
|
|
2863
2802
|
as: TextField,
|
|
2864
2803
|
ref: forwardedRef,
|
|
2865
|
-
innerAs: as
|
|
2866
|
-
|
|
2804
|
+
innerAs: as,
|
|
2805
|
+
...otherProps
|
|
2806
|
+
});
|
|
2867
2807
|
}); /////////////////////////////////////////////////////
|
|
2868
2808
|
// ComboboxList
|
|
2869
2809
|
|
|
@@ -2871,97 +2811,98 @@ const ComboboxListCore = core.ComboboxList;
|
|
|
2871
2811
|
const ComboboxList = /*#__PURE__*/react$1.forwardRef((props, forwardedRef) => {
|
|
2872
2812
|
const {
|
|
2873
2813
|
as = 'ul',
|
|
2874
|
-
__css
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
return /*#__PURE__*/jsxRuntime.jsx(ComboboxListCore, _extends__default['default']({
|
|
2814
|
+
__css,
|
|
2815
|
+
...otherProps
|
|
2816
|
+
} = props;
|
|
2817
|
+
return /*#__PURE__*/jsxRuntime.jsx(ComboboxListCore, {
|
|
2879
2818
|
as: List,
|
|
2880
2819
|
ref: forwardedRef,
|
|
2881
2820
|
innerAs: as,
|
|
2882
2821
|
outlined: false,
|
|
2883
2822
|
elevation: 2,
|
|
2884
2823
|
darkThemeBackgroundOverlay: 2,
|
|
2885
|
-
__css:
|
|
2824
|
+
__css: {
|
|
2886
2825
|
maxHeight: "18.75rem",
|
|
2887
2826
|
overflowY: 'auto',
|
|
2888
|
-
borderRadius: '
|
|
2827
|
+
borderRadius: 'extra-small',
|
|
2889
2828
|
'[data-popper-placement="top"] &': {
|
|
2890
2829
|
transformOrigin: 'bottom center'
|
|
2891
2830
|
},
|
|
2892
2831
|
'[data-popper-placement="bottom"] &': {
|
|
2893
2832
|
transformOrigin: 'top center'
|
|
2894
|
-
}
|
|
2895
|
-
|
|
2896
|
-
|
|
2833
|
+
},
|
|
2834
|
+
...__css
|
|
2835
|
+
},
|
|
2836
|
+
...otherProps
|
|
2837
|
+
});
|
|
2897
2838
|
}); /////////////////////////////////////////////////////
|
|
2898
2839
|
// ComboboxPopperBox
|
|
2899
2840
|
|
|
2900
2841
|
const PopperCore = core.Popper;
|
|
2901
|
-
const ComboboxPopperBox = /*#__PURE__*/react$1.forwardRef((
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
props = _objectWithoutPropertiesLoose__default['default'](_ref, ["__css", "anchorEl", "as"]);
|
|
2908
|
-
|
|
2842
|
+
const ComboboxPopperBox = /*#__PURE__*/react$1.forwardRef(({
|
|
2843
|
+
__css,
|
|
2844
|
+
anchorEl,
|
|
2845
|
+
as = 'div',
|
|
2846
|
+
...props
|
|
2847
|
+
}, forwardedRef) => {
|
|
2909
2848
|
const ctx = core.useComboBoxContext();
|
|
2910
|
-
return /*#__PURE__*/jsxRuntime.jsx(PopperCore,
|
|
2849
|
+
return /*#__PURE__*/jsxRuntime.jsx(PopperCore, {
|
|
2911
2850
|
as: Box,
|
|
2912
2851
|
innerAs: as,
|
|
2913
2852
|
ref: forwardedRef,
|
|
2914
2853
|
anchorEl: anchorEl || ctx.inputRef,
|
|
2915
|
-
__css:
|
|
2854
|
+
__css: {
|
|
2916
2855
|
zIndex: 1,
|
|
2917
|
-
width: '100%'
|
|
2918
|
-
|
|
2919
|
-
|
|
2856
|
+
width: '100%',
|
|
2857
|
+
...__css
|
|
2858
|
+
},
|
|
2859
|
+
...props
|
|
2860
|
+
});
|
|
2920
2861
|
}); /////////////////////////////////////////////////////
|
|
2921
2862
|
// ComboboxPopover
|
|
2922
2863
|
|
|
2923
2864
|
const ComboboxPopoverCore = core.ComboboxPopover;
|
|
2924
2865
|
const ComboboxPopover = /*#__PURE__*/react$1.forwardRef((props, forwardedRef) => {
|
|
2925
2866
|
const {
|
|
2926
|
-
as = 'div'
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
return /*#__PURE__*/jsxRuntime.jsx(ComboboxPopoverCore, _extends__default['default']({
|
|
2867
|
+
as = 'div',
|
|
2868
|
+
...otherProps
|
|
2869
|
+
} = props;
|
|
2870
|
+
return /*#__PURE__*/jsxRuntime.jsx(ComboboxPopoverCore, {
|
|
2931
2871
|
as: ComboboxPopperBox,
|
|
2932
2872
|
ref: forwardedRef,
|
|
2933
|
-
innerAs: as
|
|
2934
|
-
|
|
2873
|
+
innerAs: as,
|
|
2874
|
+
...otherProps
|
|
2875
|
+
});
|
|
2935
2876
|
}); /////////////////////////////////////////////////////
|
|
2936
2877
|
// ComboboxOption
|
|
2937
2878
|
|
|
2938
2879
|
const ComboboxOptionCore = core.ComboboxOption;
|
|
2939
2880
|
const ComboboxOption = /*#__PURE__*/react$1.forwardRef((props, forwardedRef) => {
|
|
2940
2881
|
const {
|
|
2941
|
-
as = 'li'
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
return /*#__PURE__*/jsxRuntime.jsx(ComboboxOptionCore, _extends__default['default']({
|
|
2882
|
+
as = 'li',
|
|
2883
|
+
...otherProps
|
|
2884
|
+
} = props;
|
|
2885
|
+
return /*#__PURE__*/jsxRuntime.jsx(ComboboxOptionCore, {
|
|
2946
2886
|
as: ListItem,
|
|
2947
2887
|
ref: forwardedRef,
|
|
2948
|
-
innerAs: as
|
|
2949
|
-
|
|
2888
|
+
innerAs: as,
|
|
2889
|
+
...otherProps
|
|
2890
|
+
});
|
|
2950
2891
|
}); /////////////////////////////////////////////////////
|
|
2951
2892
|
// ComboboxLabel
|
|
2952
2893
|
|
|
2953
2894
|
const ComboboxLabelCore = core.ComboboxLabel;
|
|
2954
2895
|
const ComboboxLabel = /*#__PURE__*/react$1.forwardRef((props, forwardedRef) => {
|
|
2955
2896
|
const {
|
|
2956
|
-
as = 'label'
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
return /*#__PURE__*/jsxRuntime.jsx(ComboboxLabelCore, _extends__default['default']({
|
|
2897
|
+
as = 'label',
|
|
2898
|
+
...otherProps
|
|
2899
|
+
} = props;
|
|
2900
|
+
return /*#__PURE__*/jsxRuntime.jsx(ComboboxLabelCore, {
|
|
2961
2901
|
as: Text,
|
|
2962
2902
|
ref: forwardedRef,
|
|
2963
|
-
innerAs: as
|
|
2964
|
-
|
|
2903
|
+
innerAs: as,
|
|
2904
|
+
...otherProps
|
|
2905
|
+
});
|
|
2965
2906
|
}); /////////////////////////////////////////////////////
|
|
2966
2907
|
// ComboboxButton
|
|
2967
2908
|
|
|
@@ -2970,23 +2911,22 @@ const ComboboxButton = /*#__PURE__*/react$1.forwardRef((props, forwardedRef) =>
|
|
|
2970
2911
|
const {
|
|
2971
2912
|
as = 'button',
|
|
2972
2913
|
__css,
|
|
2973
|
-
children
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
return /*#__PURE__*/jsxRuntime.jsx(ComboboxButtonCore, _extends__default['default']({
|
|
2914
|
+
children,
|
|
2915
|
+
...otherProps
|
|
2916
|
+
} = props;
|
|
2917
|
+
return /*#__PURE__*/jsxRuntime.jsx(ComboboxButtonCore, {
|
|
2978
2918
|
as: Button,
|
|
2979
2919
|
ref: forwardedRef,
|
|
2980
2920
|
innerAs: as,
|
|
2981
2921
|
tabIndex: -1,
|
|
2982
2922
|
variant: "icon",
|
|
2983
|
-
__css:
|
|
2923
|
+
__css: {
|
|
2984
2924
|
zIndex: 1,
|
|
2985
2925
|
width: "2.5rem",
|
|
2986
2926
|
height: "2.5rem",
|
|
2987
2927
|
px: 0,
|
|
2988
2928
|
'& > svg': {
|
|
2989
|
-
transition:
|
|
2929
|
+
transition: `transform .15s ${EASING_STANDARD}, color .15s ${EASING_STANDARD}`
|
|
2990
2930
|
},
|
|
2991
2931
|
'&[aria-expanded="false"] > svg': {
|
|
2992
2932
|
color: alpha('on.surface', 0.54)
|
|
@@ -2994,9 +2934,10 @@ const ComboboxButton = /*#__PURE__*/react$1.forwardRef((props, forwardedRef) =>
|
|
|
2994
2934
|
'&[aria-expanded="true"] > svg': {
|
|
2995
2935
|
transform: 'rotate(180deg)',
|
|
2996
2936
|
color: 'currentColor'
|
|
2997
|
-
}
|
|
2998
|
-
|
|
2999
|
-
|
|
2937
|
+
},
|
|
2938
|
+
...__css
|
|
2939
|
+
},
|
|
2940
|
+
...otherProps,
|
|
3000
2941
|
children: children || /*#__PURE__*/jsxRuntime.jsx("svg", {
|
|
3001
2942
|
"aria-hidden": true,
|
|
3002
2943
|
viewBox: "0 0 24 24",
|
|
@@ -3006,12 +2947,12 @@ const ComboboxButton = /*#__PURE__*/react$1.forwardRef((props, forwardedRef) =>
|
|
|
3006
2947
|
d: "M7 10l5 5 5-5z"
|
|
3007
2948
|
})
|
|
3008
2949
|
})
|
|
3009
|
-
})
|
|
2950
|
+
});
|
|
3010
2951
|
});
|
|
3011
2952
|
|
|
3012
2953
|
const offset = 29.78333854675293; // document.querySelector(path).getTotalLength()
|
|
3013
2954
|
|
|
3014
|
-
const Path = _styled__default[
|
|
2955
|
+
const Path = _styled__default["default"]("path", process.env.NODE_ENV === "production" ? {
|
|
3015
2956
|
target: "e1v8gifn0"
|
|
3016
2957
|
} : {
|
|
3017
2958
|
target: "e1v8gifn0",
|
|
@@ -3035,7 +2976,7 @@ const CheckPath = ({
|
|
|
3035
2976
|
});
|
|
3036
2977
|
};
|
|
3037
2978
|
|
|
3038
|
-
const Line = _styled__default[
|
|
2979
|
+
const Line = _styled__default["default"]("line", process.env.NODE_ENV === "production" ? {
|
|
3039
2980
|
target: "eat3a050"
|
|
3040
2981
|
} : {
|
|
3041
2982
|
target: "eat3a050",
|
|
@@ -3062,19 +3003,19 @@ const IndeterminatePath = ({
|
|
|
3062
3003
|
});
|
|
3063
3004
|
};
|
|
3064
3005
|
|
|
3065
|
-
const CheckBoxIcon = /*#__PURE__*/react$1.forwardRef(function CheckBoxIcon(
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
return /*#__PURE__*/jsxRuntime.jsx(Box,
|
|
3006
|
+
const CheckBoxIcon = /*#__PURE__*/react$1.forwardRef(function CheckBoxIcon({
|
|
3007
|
+
__css = {},
|
|
3008
|
+
as = 'div',
|
|
3009
|
+
indeterminate,
|
|
3010
|
+
checked,
|
|
3011
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
3012
|
+
disabled,
|
|
3013
|
+
backgroundColor,
|
|
3014
|
+
borderColor,
|
|
3015
|
+
opacity,
|
|
3016
|
+
...otherProps
|
|
3017
|
+
}, forwardedRef) {
|
|
3018
|
+
return /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
3078
3019
|
as: as,
|
|
3079
3020
|
ref: forwardedRef,
|
|
3080
3021
|
backgroundColor: backgroundColor,
|
|
@@ -3087,13 +3028,13 @@ const CheckBoxIcon = /*#__PURE__*/react$1.forwardRef(function CheckBoxIcon(_ref,
|
|
|
3087
3028
|
borderStyle: 'solid',
|
|
3088
3029
|
width: "1.125rem",
|
|
3089
3030
|
height: "1.125rem",
|
|
3090
|
-
transition:
|
|
3031
|
+
transition: `background-color 90ms 0s ${EASING_STANDARD}, border-color 90ms 0s ${EASING_STANDARD}, opacity 90ms 0s ${EASING_STANDARD}`,
|
|
3091
3032
|
'& > svg': {
|
|
3092
3033
|
display: 'block'
|
|
3093
3034
|
},
|
|
3094
3035
|
__css
|
|
3095
|
-
}
|
|
3096
|
-
|
|
3036
|
+
},
|
|
3037
|
+
...otherProps,
|
|
3097
3038
|
children: /*#__PURE__*/jsxRuntime.jsxs("svg", {
|
|
3098
3039
|
viewBox: "0 0 24 24",
|
|
3099
3040
|
children: [/*#__PURE__*/jsxRuntime.jsx(CheckPath, {
|
|
@@ -3102,48 +3043,51 @@ const CheckBoxIcon = /*#__PURE__*/react$1.forwardRef(function CheckBoxIcon(_ref,
|
|
|
3102
3043
|
checked: checked && indeterminate
|
|
3103
3044
|
})]
|
|
3104
3045
|
})
|
|
3105
|
-
})
|
|
3046
|
+
});
|
|
3106
3047
|
});
|
|
3107
3048
|
|
|
3108
3049
|
const SelectionControlLabel = /*#__PURE__*/react$1.forwardRef(function SelectionControlLabel(props, forwardedRef) {
|
|
3109
3050
|
const {
|
|
3110
3051
|
as = 'label',
|
|
3111
|
-
__css
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
return /*#__PURE__*/jsxRuntime.jsx(Box, _extends__default['default']({
|
|
3052
|
+
__css,
|
|
3053
|
+
...otherProps
|
|
3054
|
+
} = props;
|
|
3055
|
+
return /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
3116
3056
|
ref: forwardedRef,
|
|
3117
3057
|
as: as,
|
|
3118
|
-
__css:
|
|
3058
|
+
__css: {
|
|
3119
3059
|
display: 'inline-flex',
|
|
3120
3060
|
position: 'relative',
|
|
3121
3061
|
alignItems: 'center',
|
|
3122
|
-
WebkitTapHighlightColor: 'transparent'
|
|
3123
|
-
|
|
3124
|
-
|
|
3062
|
+
WebkitTapHighlightColor: 'transparent',
|
|
3063
|
+
...__css
|
|
3064
|
+
},
|
|
3065
|
+
...otherProps
|
|
3066
|
+
});
|
|
3125
3067
|
});
|
|
3126
3068
|
|
|
3127
3069
|
const SelectionControlText = /*#__PURE__*/react$1.forwardRef(function SelectionControlText(props, forwardedRef) {
|
|
3128
3070
|
const {
|
|
3129
3071
|
as = 'span',
|
|
3130
3072
|
disabled,
|
|
3131
|
-
__css
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
return /*#__PURE__*/jsxRuntime.jsx(Text, _extends__default['default']({
|
|
3073
|
+
__css,
|
|
3074
|
+
...otherProps
|
|
3075
|
+
} = props;
|
|
3076
|
+
return /*#__PURE__*/jsxRuntime.jsx(Text, {
|
|
3136
3077
|
ref: forwardedRef,
|
|
3137
3078
|
as: as,
|
|
3138
|
-
__css:
|
|
3139
|
-
p: 1
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3079
|
+
__css: {
|
|
3080
|
+
p: 1,
|
|
3081
|
+
...(disabled ? {
|
|
3082
|
+
color: alpha('on.surface', 0.38)
|
|
3083
|
+
} : {
|
|
3084
|
+
cursor: 'pointer',
|
|
3085
|
+
color: alpha('on.surface', 0.87)
|
|
3086
|
+
}),
|
|
3087
|
+
...__css
|
|
3088
|
+
},
|
|
3089
|
+
...otherProps
|
|
3090
|
+
});
|
|
3147
3091
|
});
|
|
3148
3092
|
|
|
3149
3093
|
const CheckBoxCore$1 = core.CheckBox;
|
|
@@ -3166,10 +3110,9 @@ const CheckBoxInner = /*#__PURE__*/react$1.forwardRef(function CheckBoxInner(pro
|
|
|
3166
3110
|
indeterminate = false,
|
|
3167
3111
|
onChange,
|
|
3168
3112
|
icon = /*#__PURE__*/jsxRuntime.jsx(CheckBoxIcon, {}),
|
|
3169
|
-
__css
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
-
|
|
3113
|
+
__css,
|
|
3114
|
+
...otherProps
|
|
3115
|
+
} = props;
|
|
3173
3116
|
const color = checked ? 'primary' : 'on.surface';
|
|
3174
3117
|
const theme = useTheme();
|
|
3175
3118
|
const [backgroundColor, borderColor, opacity] = getColors(disabled, checked);
|
|
@@ -3177,7 +3120,7 @@ const CheckBoxInner = /*#__PURE__*/react$1.forwardRef(function CheckBoxInner(pro
|
|
|
3177
3120
|
position: "relative",
|
|
3178
3121
|
display: "inline-block",
|
|
3179
3122
|
minWidth: "auto",
|
|
3180
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(RippleBox,
|
|
3123
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(RippleBox, {
|
|
3181
3124
|
as: Comp,
|
|
3182
3125
|
type: "checkbox",
|
|
3183
3126
|
checked: checked,
|
|
@@ -3191,9 +3134,9 @@ const CheckBoxInner = /*#__PURE__*/react$1.forwardRef(function CheckBoxInner(pro
|
|
|
3191
3134
|
center: true,
|
|
3192
3135
|
disabled: disabled,
|
|
3193
3136
|
"aria-checked": indeterminate ? checked ? 'mixed' : 'false' : checked ? 'true' : 'false',
|
|
3194
|
-
"data-indeterminate": indeterminate ? '' : undefined
|
|
3195
|
-
|
|
3196
|
-
__css:
|
|
3137
|
+
"data-indeterminate": indeterminate ? '' : undefined,
|
|
3138
|
+
...otherProps,
|
|
3139
|
+
__css: {
|
|
3197
3140
|
top: 0,
|
|
3198
3141
|
left: 0,
|
|
3199
3142
|
width: "2.5rem",
|
|
@@ -3205,9 +3148,10 @@ const CheckBoxInner = /*#__PURE__*/react$1.forwardRef(function CheckBoxInner(pro
|
|
|
3205
3148
|
border: 'none',
|
|
3206
3149
|
borderRadius: 'full',
|
|
3207
3150
|
zIndex: 1,
|
|
3208
|
-
position: 'absolute'
|
|
3209
|
-
|
|
3210
|
-
|
|
3151
|
+
position: 'absolute',
|
|
3152
|
+
...__css
|
|
3153
|
+
}
|
|
3154
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
3211
3155
|
__css: {
|
|
3212
3156
|
position: 'relative',
|
|
3213
3157
|
top: 0,
|
|
@@ -3237,17 +3181,18 @@ const CheckBox = /*#__PURE__*/react$1.forwardRef(function CheckBox(props, forwar
|
|
|
3237
3181
|
as = 'input',
|
|
3238
3182
|
icon = /*#__PURE__*/jsxRuntime.jsx(CheckBoxIcon, {}),
|
|
3239
3183
|
disabled,
|
|
3240
|
-
children
|
|
3241
|
-
|
|
3242
|
-
|
|
3184
|
+
children,
|
|
3185
|
+
...otherProps
|
|
3186
|
+
} = props;
|
|
3243
3187
|
|
|
3244
|
-
const inner = /*#__PURE__*/jsxRuntime.jsx(CheckBoxCore$1,
|
|
3188
|
+
const inner = /*#__PURE__*/jsxRuntime.jsx(CheckBoxCore$1, {
|
|
3245
3189
|
as: CheckBoxInner,
|
|
3246
3190
|
innerAs: as,
|
|
3247
3191
|
ref: forwardedRef,
|
|
3248
3192
|
icon: icon,
|
|
3249
|
-
disabled: disabled
|
|
3250
|
-
|
|
3193
|
+
disabled: disabled,
|
|
3194
|
+
...otherProps
|
|
3195
|
+
});
|
|
3251
3196
|
|
|
3252
3197
|
if (!children) {
|
|
3253
3198
|
return inner;
|
|
@@ -3262,9 +3207,10 @@ const CheckBox = /*#__PURE__*/react$1.forwardRef(function CheckBox(props, forwar
|
|
|
3262
3207
|
});
|
|
3263
3208
|
|
|
3264
3209
|
function getFilledCSS(theme, bg, color, disabled) {
|
|
3265
|
-
return
|
|
3266
|
-
|
|
3267
|
-
|
|
3210
|
+
return { ...(!disabled && bg !== 'surface' ? {
|
|
3211
|
+
bg
|
|
3212
|
+
} : { ...getColorOverlay(theme, 'surface', 'primary', 0.05)
|
|
3213
|
+
}),
|
|
3268
3214
|
color,
|
|
3269
3215
|
'&::before': {
|
|
3270
3216
|
backgroundColor: 'currentColor',
|
|
@@ -3282,22 +3228,23 @@ function getFilledCSS(theme, bg, color, disabled) {
|
|
|
3282
3228
|
},
|
|
3283
3229
|
'& > *': {
|
|
3284
3230
|
zIndex: 1
|
|
3285
|
-
}
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
|
|
3231
|
+
},
|
|
3232
|
+
...(disabled && {
|
|
3233
|
+
boxShadow: 0,
|
|
3234
|
+
bg: alpha('on.surface', 0.32)
|
|
3235
|
+
})
|
|
3236
|
+
};
|
|
3290
3237
|
}
|
|
3291
3238
|
|
|
3292
3239
|
function getOutlinedCSS(theme, bg, color, borderOpacity) {
|
|
3293
|
-
return
|
|
3294
|
-
|
|
3295
|
-
|
|
3240
|
+
return { ...(bg !== 'surface' ? {
|
|
3241
|
+
bg
|
|
3242
|
+
} : getDarkThemeBackgroundOverlay(theme, 2)),
|
|
3296
3243
|
color: color,
|
|
3297
3244
|
borderColor: alpha(color, borderOpacity),
|
|
3298
3245
|
borderStyle: 'solid',
|
|
3299
3246
|
borderWidth: "0.0625rem"
|
|
3300
|
-
}
|
|
3247
|
+
};
|
|
3301
3248
|
}
|
|
3302
3249
|
|
|
3303
3250
|
const ChipBase = /*#__PURE__*/react$1.forwardRef(function Chip(props, forwardedRef) {
|
|
@@ -3309,16 +3256,15 @@ const ChipBase = /*#__PURE__*/react$1.forwardRef(function Chip(props, forwardedR
|
|
|
3309
3256
|
backgroundColor: backgroundColorProp = 'surface',
|
|
3310
3257
|
borderOpacity: borderOpacityProp = 0.24,
|
|
3311
3258
|
children,
|
|
3312
|
-
disabled = false
|
|
3313
|
-
|
|
3314
|
-
|
|
3315
|
-
|
|
3259
|
+
disabled = false,
|
|
3260
|
+
...otherProps
|
|
3261
|
+
} = props;
|
|
3316
3262
|
const theme = useTheme();
|
|
3317
|
-
return /*#__PURE__*/jsxRuntime.jsx(Box,
|
|
3263
|
+
return /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
3318
3264
|
as: as,
|
|
3319
3265
|
"data-disabled": disabled ? '' : undefined,
|
|
3320
3266
|
ref: forwardedRef,
|
|
3321
|
-
__css:
|
|
3267
|
+
__css: {
|
|
3322
3268
|
boxSizing: 'border-box',
|
|
3323
3269
|
position: 'relative',
|
|
3324
3270
|
display: 'inline-flex',
|
|
@@ -3337,22 +3283,24 @@ const ChipBase = /*#__PURE__*/react$1.forwardRef(function Chip(props, forwardedR
|
|
|
3337
3283
|
minWidth: 'auto',
|
|
3338
3284
|
'&::-moz-focus-inner': {
|
|
3339
3285
|
border: 0
|
|
3340
|
-
}
|
|
3341
|
-
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
|
|
3353
|
-
|
|
3286
|
+
},
|
|
3287
|
+
...styledSystem.variant({
|
|
3288
|
+
scale: 'chips.variants',
|
|
3289
|
+
prop: 'variant',
|
|
3290
|
+
variants: {
|
|
3291
|
+
text: {}
|
|
3292
|
+
}
|
|
3293
|
+
})({
|
|
3294
|
+
variant: variantProp,
|
|
3295
|
+
theme
|
|
3296
|
+
}),
|
|
3297
|
+
...(variantProp === 'filled' ? getFilledCSS(theme, backgroundColorProp, colorProp, disabled) : getOutlinedCSS(theme, backgroundColorProp, colorProp, borderOpacityProp)),
|
|
3298
|
+
opacity: disabled ? 0.38 : 1,
|
|
3299
|
+
...__css
|
|
3300
|
+
},
|
|
3301
|
+
...otherProps,
|
|
3354
3302
|
children: children
|
|
3355
|
-
})
|
|
3303
|
+
});
|
|
3356
3304
|
});
|
|
3357
3305
|
|
|
3358
3306
|
const ButtonChip = /*#__PURE__*/react$1.forwardRef(function ButtonChip(props, forwardedRef) {
|
|
@@ -3363,20 +3311,20 @@ const ButtonChip = /*#__PURE__*/react$1.forwardRef(function ButtonChip(props, fo
|
|
|
3363
3311
|
leadingIcon,
|
|
3364
3312
|
trailingIcon,
|
|
3365
3313
|
children,
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3314
|
+
color,
|
|
3315
|
+
__css,
|
|
3316
|
+
...otherProps
|
|
3317
|
+
} = props;
|
|
3370
3318
|
const theme = useTheme();
|
|
3371
3319
|
const isClickable = onClick && !disabledProp;
|
|
3372
|
-
return /*#__PURE__*/jsxRuntime.jsx(ChipBase,
|
|
3320
|
+
return /*#__PURE__*/jsxRuntime.jsx(ChipBase, {
|
|
3373
3321
|
as: "div",
|
|
3374
3322
|
onClick: isClickable ? onClick : undefined,
|
|
3375
3323
|
disabled: disabledProp,
|
|
3376
3324
|
color: "on.surface",
|
|
3377
3325
|
backgroundColor: "surface",
|
|
3378
|
-
__css: __css
|
|
3379
|
-
|
|
3326
|
+
__css: __css,
|
|
3327
|
+
...otherProps,
|
|
3380
3328
|
children: /*#__PURE__*/jsxRuntime.jsxs(RippleBox, {
|
|
3381
3329
|
as: as,
|
|
3382
3330
|
role: isClickable ? 'button' : undefined,
|
|
@@ -3413,7 +3361,7 @@ const ButtonChip = /*#__PURE__*/react$1.forwardRef(function ButtonChip(props, fo
|
|
|
3413
3361
|
},
|
|
3414
3362
|
children: [leadingIcon, children, trailingIcon]
|
|
3415
3363
|
})
|
|
3416
|
-
})
|
|
3364
|
+
});
|
|
3417
3365
|
});
|
|
3418
3366
|
|
|
3419
3367
|
const InnerInput = /*#__PURE__*/react$1.forwardRef(function InnerInput(props, forwardedRef) {
|
|
@@ -3431,19 +3379,18 @@ const InnerInput = /*#__PURE__*/react$1.forwardRef(function InnerInput(props, fo
|
|
|
3431
3379
|
leadingIcon,
|
|
3432
3380
|
trailingIcon,
|
|
3433
3381
|
children,
|
|
3434
|
-
__css
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3382
|
+
__css,
|
|
3383
|
+
...otherProps
|
|
3384
|
+
} = props;
|
|
3438
3385
|
const theme = useTheme();
|
|
3439
|
-
return /*#__PURE__*/jsxRuntime.jsx(ChipBase,
|
|
3386
|
+
return /*#__PURE__*/jsxRuntime.jsx(ChipBase, {
|
|
3440
3387
|
as: "label",
|
|
3441
3388
|
disabled: disabled,
|
|
3442
3389
|
backgroundColor: checked ? color + '-container' : 'surface',
|
|
3443
3390
|
color: checked ? 'on.' + color + '-container' : 'on.surface',
|
|
3444
3391
|
borderOpacity: checked ? 0 : 0.24,
|
|
3445
|
-
__css: __css
|
|
3446
|
-
|
|
3392
|
+
__css: __css,
|
|
3393
|
+
...otherProps,
|
|
3447
3394
|
children: /*#__PURE__*/jsxRuntime.jsxs(Box, {
|
|
3448
3395
|
as: "span",
|
|
3449
3396
|
__css: {
|
|
@@ -3489,87 +3436,91 @@ const InnerInput = /*#__PURE__*/react$1.forwardRef(function InnerInput(props, fo
|
|
|
3489
3436
|
}
|
|
3490
3437
|
}), leadingIcon, children, trailingIcon]
|
|
3491
3438
|
})
|
|
3492
|
-
})
|
|
3439
|
+
});
|
|
3493
3440
|
});
|
|
3494
3441
|
const ChoiceChip = /*#__PURE__*/react$1.forwardRef(function ChoiceChip(props, forwardedRef) {
|
|
3495
3442
|
const {
|
|
3496
|
-
type = 'checkbox'
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
|
|
3443
|
+
type = 'checkbox',
|
|
3444
|
+
...otherProps
|
|
3445
|
+
} = props;
|
|
3500
3446
|
const Comp = type === 'radio' ? core.RadioButton : core.CheckBox;
|
|
3501
|
-
return /*#__PURE__*/jsxRuntime.jsx(Comp,
|
|
3447
|
+
return /*#__PURE__*/jsxRuntime.jsx(Comp, {
|
|
3502
3448
|
ref: forwardedRef,
|
|
3503
3449
|
as: InnerInput,
|
|
3504
|
-
type: type
|
|
3505
|
-
|
|
3450
|
+
type: type,
|
|
3451
|
+
...otherProps
|
|
3452
|
+
});
|
|
3506
3453
|
});
|
|
3507
3454
|
|
|
3508
3455
|
const Divider = /*#__PURE__*/react$1.forwardRef(function Divider(props, forwardedRef) {
|
|
3509
3456
|
const {
|
|
3510
3457
|
as = 'div',
|
|
3511
3458
|
direction = 'horizontal',
|
|
3512
|
-
__css
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
return /*#__PURE__*/jsxRuntime.jsx(Box, _extends__default['default']({
|
|
3459
|
+
__css,
|
|
3460
|
+
...otherProps
|
|
3461
|
+
} = props;
|
|
3462
|
+
return /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
3517
3463
|
ref: forwardedRef,
|
|
3518
3464
|
as: as,
|
|
3519
|
-
role: "separator"
|
|
3520
|
-
|
|
3521
|
-
__css:
|
|
3465
|
+
role: "separator",
|
|
3466
|
+
...otherProps,
|
|
3467
|
+
__css: {
|
|
3522
3468
|
border: 'none',
|
|
3523
|
-
listStyleType: 'none'
|
|
3524
|
-
|
|
3525
|
-
|
|
3526
|
-
|
|
3527
|
-
|
|
3528
|
-
|
|
3529
|
-
|
|
3530
|
-
|
|
3531
|
-
|
|
3532
|
-
|
|
3533
|
-
|
|
3534
|
-
|
|
3535
|
-
|
|
3469
|
+
listStyleType: 'none',
|
|
3470
|
+
...(direction === 'horizontal' && {
|
|
3471
|
+
height: 0,
|
|
3472
|
+
borderBottomWidth: "0.0625rem",
|
|
3473
|
+
borderBottomStyle: 'solid',
|
|
3474
|
+
borderBottomColor: alpha('on.surface', 0.12)
|
|
3475
|
+
}),
|
|
3476
|
+
...(direction === 'vertical' && {
|
|
3477
|
+
width: 0,
|
|
3478
|
+
borderRightWidth: "0.0625rem",
|
|
3479
|
+
borderRightStyle: 'solid',
|
|
3480
|
+
borderRightColor: alpha('on.surface', 0.12)
|
|
3481
|
+
}),
|
|
3482
|
+
...__css
|
|
3483
|
+
}
|
|
3484
|
+
});
|
|
3536
3485
|
});
|
|
3537
3486
|
|
|
3538
3487
|
const Modal = core.Modal;
|
|
3539
3488
|
const DialogSurface = /*#__PURE__*/react$1.forwardRef(function DialogSurface(props, forwardedRef) {
|
|
3540
3489
|
const {
|
|
3541
3490
|
__css,
|
|
3542
|
-
variant: variantProp = 'base'
|
|
3543
|
-
|
|
3544
|
-
|
|
3545
|
-
|
|
3491
|
+
variant: variantProp = 'base',
|
|
3492
|
+
...otherProps
|
|
3493
|
+
} = props;
|
|
3546
3494
|
const theme = useTheme();
|
|
3547
3495
|
const overlayValue = styledSystem.get(theme, 'dialogs.backgroundColorOverlay') || 0;
|
|
3548
|
-
return /*#__PURE__*/jsxRuntime.jsx(Modal,
|
|
3496
|
+
return /*#__PURE__*/jsxRuntime.jsx(Modal, {
|
|
3549
3497
|
ref: forwardedRef,
|
|
3550
3498
|
as: Paper,
|
|
3551
3499
|
theme: theme,
|
|
3552
3500
|
elevation: 3,
|
|
3553
3501
|
darkThemeBackgroundOverlay: overlayValue,
|
|
3554
|
-
__css:
|
|
3502
|
+
__css: {
|
|
3555
3503
|
position: 'relative',
|
|
3556
3504
|
borderRadius: 'small',
|
|
3557
3505
|
width: '100%',
|
|
3558
3506
|
maxWidth: "37.5rem",
|
|
3559
3507
|
maxHeight: '100%',
|
|
3560
3508
|
overflow: 'auto',
|
|
3561
|
-
pointerEvents: 'auto'
|
|
3562
|
-
|
|
3563
|
-
|
|
3564
|
-
|
|
3565
|
-
|
|
3566
|
-
|
|
3567
|
-
|
|
3568
|
-
|
|
3569
|
-
|
|
3570
|
-
|
|
3571
|
-
|
|
3572
|
-
|
|
3509
|
+
pointerEvents: 'auto',
|
|
3510
|
+
...styledSystem.variant({
|
|
3511
|
+
scale: 'dialogs.variants',
|
|
3512
|
+
prop: 'variant',
|
|
3513
|
+
variants: {
|
|
3514
|
+
base: {}
|
|
3515
|
+
}
|
|
3516
|
+
})({
|
|
3517
|
+
variant: variantProp,
|
|
3518
|
+
theme
|
|
3519
|
+
}),
|
|
3520
|
+
...__css
|
|
3521
|
+
},
|
|
3522
|
+
...otherProps
|
|
3523
|
+
});
|
|
3573
3524
|
});
|
|
3574
3525
|
|
|
3575
3526
|
const Dialog = /*#__PURE__*/react$1.forwardRef(function Dialog(props, forwardedRef) {
|
|
@@ -3583,10 +3534,9 @@ const Dialog = /*#__PURE__*/react$1.forwardRef(function Dialog(props, forwardedR
|
|
|
3583
3534
|
containerProps,
|
|
3584
3535
|
scrimProps,
|
|
3585
3536
|
openTimeoutInMilliseconds,
|
|
3586
|
-
closeTimeoutInMilliseconds
|
|
3587
|
-
|
|
3588
|
-
|
|
3589
|
-
|
|
3537
|
+
closeTimeoutInMilliseconds,
|
|
3538
|
+
...otherProps
|
|
3539
|
+
} = props;
|
|
3590
3540
|
const {
|
|
3591
3541
|
containerStyle,
|
|
3592
3542
|
scrimStyle,
|
|
@@ -3603,22 +3553,24 @@ const Dialog = /*#__PURE__*/react$1.forwardRef(function Dialog(props, forwardedR
|
|
|
3603
3553
|
}
|
|
3604
3554
|
|
|
3605
3555
|
return /*#__PURE__*/jsxRuntime.jsx(core.Portal, {
|
|
3606
|
-
children: /*#__PURE__*/jsxRuntime.jsxs(DialogBackdrop,
|
|
3556
|
+
children: /*#__PURE__*/jsxRuntime.jsxs(DialogBackdrop, {
|
|
3607
3557
|
onClose: onClose,
|
|
3608
3558
|
open: openProp,
|
|
3609
3559
|
disableCloseOnClick: disableBackdropClick,
|
|
3610
|
-
disableEscapeKeyDown: disableEscapeKeyDown
|
|
3611
|
-
|
|
3612
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(Scrim,
|
|
3613
|
-
__css: scrimStyle
|
|
3614
|
-
|
|
3615
|
-
|
|
3616
|
-
|
|
3617
|
-
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
|
|
3560
|
+
disableEscapeKeyDown: disableEscapeKeyDown,
|
|
3561
|
+
...backdropProps,
|
|
3562
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Scrim, {
|
|
3563
|
+
__css: scrimStyle,
|
|
3564
|
+
...scrimProps
|
|
3565
|
+
}), /*#__PURE__*/jsxRuntime.jsx(DialogContainer, {
|
|
3566
|
+
__css: containerStyle,
|
|
3567
|
+
...containerProps,
|
|
3568
|
+
children: /*#__PURE__*/jsxRuntime.jsx(DialogSurface, {
|
|
3569
|
+
ref: forwardedRef,
|
|
3570
|
+
...otherProps
|
|
3571
|
+
})
|
|
3572
|
+
})]
|
|
3573
|
+
})
|
|
3622
3574
|
});
|
|
3623
3575
|
});
|
|
3624
3576
|
|
|
@@ -3626,14 +3578,13 @@ const Link = /*#__PURE__*/react$1.forwardRef(function Link(props, forwardedRef)
|
|
|
3626
3578
|
const {
|
|
3627
3579
|
as: asProp = 'a',
|
|
3628
3580
|
color = 'primary',
|
|
3629
|
-
__css
|
|
3630
|
-
|
|
3631
|
-
|
|
3632
|
-
|
|
3633
|
-
return /*#__PURE__*/jsxRuntime.jsx(Box, _extends__default['default']({
|
|
3581
|
+
__css,
|
|
3582
|
+
...otherProps
|
|
3583
|
+
} = props;
|
|
3584
|
+
return /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
3634
3585
|
ref: forwardedRef,
|
|
3635
3586
|
as: asProp,
|
|
3636
|
-
__css:
|
|
3587
|
+
__css: {
|
|
3637
3588
|
fontFamily: 'inherit',
|
|
3638
3589
|
fontSize: 'inherit',
|
|
3639
3590
|
fontWeight: 'inherit',
|
|
@@ -3652,11 +3603,13 @@ const Link = /*#__PURE__*/react$1.forwardRef(function Link(props, forwardedRef)
|
|
|
3652
3603
|
'&:active': {
|
|
3653
3604
|
bg: alpha(color, 0.16)
|
|
3654
3605
|
},
|
|
3655
|
-
WebkitTapHighlightColor: 'transparent'
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
|
|
3659
|
-
|
|
3606
|
+
WebkitTapHighlightColor: 'transparent',
|
|
3607
|
+
...__css
|
|
3608
|
+
},
|
|
3609
|
+
...otherProps
|
|
3610
|
+
});
|
|
3611
|
+
});
|
|
3612
|
+
|
|
3660
3613
|
const growAnimation = react.keyframes({
|
|
3661
3614
|
'0%': {
|
|
3662
3615
|
opacity: 0,
|
|
@@ -3672,91 +3625,219 @@ const growAnimation = react.keyframes({
|
|
|
3672
3625
|
});
|
|
3673
3626
|
|
|
3674
3627
|
const MenuListCore = core.MenuList;
|
|
3675
|
-
const MenuList = /*#__PURE__*/react$1.forwardRef((
|
|
3676
|
-
|
|
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
|
-
}, props));
|
|
3705
|
-
}); /////////////////////////////////////////////////////
|
|
3628
|
+
const MenuList = /*#__PURE__*/react$1.forwardRef(({
|
|
3629
|
+
as = 'ul',
|
|
3630
|
+
__css,
|
|
3631
|
+
...props
|
|
3632
|
+
}, ref) => /*#__PURE__*/jsxRuntime.jsx(MenuListCore, {
|
|
3633
|
+
as: List,
|
|
3634
|
+
innerAs: as,
|
|
3635
|
+
ref: ref,
|
|
3636
|
+
elevation: 2,
|
|
3637
|
+
darkThemeBackgroundOverlay: 2,
|
|
3638
|
+
outlined: false,
|
|
3639
|
+
variant: "default",
|
|
3640
|
+
__css: {
|
|
3641
|
+
minWidth: "7rem",
|
|
3642
|
+
maxWidth: "17.5rem",
|
|
3643
|
+
maxHeight: "18.75rem",
|
|
3644
|
+
borderRadius: 'extra-small',
|
|
3645
|
+
overflowY: 'auto',
|
|
3646
|
+
'[data-popper-placement="top"] &': {
|
|
3647
|
+
transformOrigin: 'bottom center'
|
|
3648
|
+
},
|
|
3649
|
+
'[data-popper-placement="bottom"] &': {
|
|
3650
|
+
transformOrigin: 'top center'
|
|
3651
|
+
},
|
|
3652
|
+
animation: `${growAnimation} .12s ${EASING_STANDARD}`,
|
|
3653
|
+
...__css
|
|
3654
|
+
},
|
|
3655
|
+
...props
|
|
3656
|
+
})); /////////////////////////////////////////////////////
|
|
3706
3657
|
// MenuItem
|
|
3707
3658
|
|
|
3708
|
-
const MenuItem = /*#__PURE__*/react$1.forwardRef((
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
|
|
3716
|
-
|
|
3717
|
-
ref: ref
|
|
3718
|
-
}, props));
|
|
3719
|
-
}); /////////////////////////////////////////////////////
|
|
3659
|
+
const MenuItem = /*#__PURE__*/react$1.forwardRef(({
|
|
3660
|
+
as = 'li',
|
|
3661
|
+
...props
|
|
3662
|
+
}, ref) => /*#__PURE__*/jsxRuntime.jsx(core.MenuItem, {
|
|
3663
|
+
as: ListItem,
|
|
3664
|
+
innerAs: as,
|
|
3665
|
+
ref: ref,
|
|
3666
|
+
...props
|
|
3667
|
+
})); /////////////////////////////////////////////////////
|
|
3720
3668
|
// MenuButton
|
|
3721
3669
|
|
|
3722
|
-
const MenuButton = /*#__PURE__*/react$1.forwardRef((
|
|
3723
|
-
|
|
3724
|
-
|
|
3725
|
-
|
|
3726
|
-
|
|
3727
|
-
|
|
3728
|
-
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
ref: ref
|
|
3732
|
-
}, props));
|
|
3733
|
-
}); /////////////////////////////////////////////////////
|
|
3670
|
+
const MenuButton = /*#__PURE__*/react$1.forwardRef(({
|
|
3671
|
+
as = 'button',
|
|
3672
|
+
...props
|
|
3673
|
+
}, ref) => /*#__PURE__*/jsxRuntime.jsx(core.MenuButton, {
|
|
3674
|
+
as: Button,
|
|
3675
|
+
innerAs: as,
|
|
3676
|
+
ref: ref,
|
|
3677
|
+
...props
|
|
3678
|
+
})); /////////////////////////////////////////////////////
|
|
3734
3679
|
// MenuPopover
|
|
3735
3680
|
|
|
3736
3681
|
const MenuPopoverCore = core.MenuPopover;
|
|
3737
|
-
const MenuPopover = /*#__PURE__*/react$1.forwardRef((
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3682
|
+
const MenuPopover = /*#__PURE__*/react$1.forwardRef(({
|
|
3683
|
+
as,
|
|
3684
|
+
__css,
|
|
3685
|
+
...props
|
|
3686
|
+
}, ref) => /*#__PURE__*/jsxRuntime.jsx(MenuPopoverCore, {
|
|
3687
|
+
as: Box,
|
|
3688
|
+
innerAs: as,
|
|
3689
|
+
ref: ref,
|
|
3690
|
+
__css: {
|
|
3691
|
+
zIndex: 'tooltip',
|
|
3692
|
+
...__css
|
|
3693
|
+
},
|
|
3694
|
+
...props
|
|
3695
|
+
}));
|
|
3743
3696
|
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
__css
|
|
3749
|
-
|
|
3750
|
-
|
|
3751
|
-
|
|
3697
|
+
const NavRailIndicator = /*#__PURE__*/react$1.forwardRef(function NavRailIndicator(props, forwardedRef) {
|
|
3698
|
+
const {
|
|
3699
|
+
as = 'div',
|
|
3700
|
+
children,
|
|
3701
|
+
__css,
|
|
3702
|
+
...otherProps
|
|
3703
|
+
} = props;
|
|
3704
|
+
return /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
3705
|
+
color: "currentColor",
|
|
3706
|
+
ref: forwardedRef,
|
|
3707
|
+
as: as,
|
|
3708
|
+
"data-nav-rail-item-indicator": "",
|
|
3709
|
+
...otherProps,
|
|
3710
|
+
__css: {
|
|
3711
|
+
width: '100%',
|
|
3712
|
+
height: '100%',
|
|
3713
|
+
maxWidth: "3.5rem",
|
|
3714
|
+
maxHeight: "3.5rem",
|
|
3715
|
+
borderRadius: 'full',
|
|
3716
|
+
bg: 'var(--indicator-background-color)',
|
|
3717
|
+
display: 'flex',
|
|
3718
|
+
alignItems: 'center',
|
|
3719
|
+
justifyContent: 'center',
|
|
3720
|
+
minHeight: "2rem",
|
|
3721
|
+
transition: `background-color .2s ${EASING_STANDARD}`,
|
|
3722
|
+
pointerEvents: 'none',
|
|
3723
|
+
...__css
|
|
3724
|
+
},
|
|
3725
|
+
children: children
|
|
3726
|
+
});
|
|
3727
|
+
});
|
|
3728
|
+
const NavRailLabel = /*#__PURE__*/react$1.forwardRef(function NavRailLabel(props, forwardedRef) {
|
|
3729
|
+
const {
|
|
3730
|
+
as = 'div',
|
|
3731
|
+
children,
|
|
3732
|
+
__css,
|
|
3733
|
+
...otherProps
|
|
3734
|
+
} = props;
|
|
3735
|
+
return /*#__PURE__*/jsxRuntime.jsx(Text, {
|
|
3736
|
+
ref: forwardedRef,
|
|
3737
|
+
as: as,
|
|
3738
|
+
variant: "label-small",
|
|
3739
|
+
lineHeight: 1,
|
|
3740
|
+
...otherProps,
|
|
3741
|
+
__css: {
|
|
3742
|
+
pt: "0.25rem",
|
|
3743
|
+
pb: "0.75rem",
|
|
3744
|
+
color: 'inherit',
|
|
3745
|
+
pointerEvents: 'none',
|
|
3746
|
+
...__css
|
|
3747
|
+
},
|
|
3748
|
+
children: children
|
|
3749
|
+
});
|
|
3750
|
+
});
|
|
3751
|
+
const NavRailItem = /*#__PURE__*/react$1.forwardRef(function NavRailItem(props, forwardedRef) {
|
|
3752
|
+
const {
|
|
3753
|
+
as = 'button',
|
|
3754
|
+
children,
|
|
3755
|
+
color = 'primary-container',
|
|
3756
|
+
selected = false,
|
|
3757
|
+
disabled = false,
|
|
3758
|
+
style,
|
|
3759
|
+
onKeyDown,
|
|
3760
|
+
onPointerDown,
|
|
3761
|
+
__css,
|
|
3762
|
+
...otherProps
|
|
3763
|
+
} = props;
|
|
3764
|
+
const theme = useTheme();
|
|
3765
|
+
const baseOpacity = 0,
|
|
3766
|
+
hoverOpacity = 0.04,
|
|
3767
|
+
focusOpacity = 0.12,
|
|
3768
|
+
pressedOpacity = 0.12;
|
|
3769
|
+
const ripple = useRippleSurface({
|
|
3770
|
+
rippleColor: 'currentColor',
|
|
3771
|
+
onKeyDown,
|
|
3772
|
+
onPointerDown,
|
|
3773
|
+
baseOpacity,
|
|
3774
|
+
hoverOpacity,
|
|
3775
|
+
focusOpacity,
|
|
3776
|
+
pressedOpacity
|
|
3777
|
+
}); // Apply ripple from nav item to nav indicator
|
|
3778
|
+
|
|
3779
|
+
const rippleCss = react$1.useMemo(() => {
|
|
3780
|
+
const ret = {};
|
|
3781
|
+
const keys = Object.keys(ripple.__css);
|
|
3782
|
+
|
|
3783
|
+
for (const key of keys) {
|
|
3784
|
+
if (!key.startsWith('&')) {
|
|
3785
|
+
ret['& [data-nav-rail-item-indicator]'] = ret['& [data-nav-rail-item-indicator]'] || {};
|
|
3786
|
+
ret['& [data-nav-rail-item-indicator]'][key] = ripple.__css[key];
|
|
3787
|
+
continue;
|
|
3788
|
+
}
|
|
3789
|
+
|
|
3790
|
+
const newKey = key.replace(/(.+?)::(before|after)/g, '$1 [data-nav-rail-item-indicator]::$2');
|
|
3791
|
+
ret[newKey] = ripple.__css[key];
|
|
3792
|
+
}
|
|
3793
|
+
|
|
3794
|
+
return ret;
|
|
3795
|
+
}, [ripple.__css]);
|
|
3796
|
+
return /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
3797
|
+
ref: forwardedRef,
|
|
3798
|
+
as: as,
|
|
3799
|
+
...otherProps,
|
|
3800
|
+
onPointerDown: ripple.onPointerDown,
|
|
3801
|
+
onKeyDown: ripple.onKeyDown,
|
|
3802
|
+
"aria-pressed": selected,
|
|
3803
|
+
type: "button",
|
|
3804
|
+
style: { ...ripple.style,
|
|
3805
|
+
...style
|
|
3806
|
+
},
|
|
3807
|
+
disabled: disabled,
|
|
3808
|
+
__css: {
|
|
3809
|
+
display: 'flex',
|
|
3810
|
+
flexDirection: 'column',
|
|
3811
|
+
alignItems: 'center',
|
|
3812
|
+
transition: `color .2s ${EASING_STANDARD}`,
|
|
3813
|
+
color: selected ? `on.${color}` : 'on.surface-variant',
|
|
3814
|
+
'--indicator-background-color': selected ? styledSystem.get(theme, `colors.${color}`) : 'transparent',
|
|
3815
|
+
border: 'none',
|
|
3816
|
+
':focus': {
|
|
3817
|
+
outline: 'none'
|
|
3818
|
+
},
|
|
3819
|
+
backgroundColor: 'transparent',
|
|
3820
|
+
margin: 0,
|
|
3821
|
+
padding: 0,
|
|
3822
|
+
px: "0.75rem",
|
|
3823
|
+
minHeight: "3.75rem",
|
|
3824
|
+
height: "3.75rem",
|
|
3825
|
+
cursor: 'pointer',
|
|
3826
|
+
textDecoration: 'none',
|
|
3827
|
+
WebkitTapHighlightColor: 'transparent',
|
|
3828
|
+
...rippleCss,
|
|
3829
|
+
...__css
|
|
3830
|
+
},
|
|
3831
|
+
children: children
|
|
3832
|
+
});
|
|
3752
3833
|
});
|
|
3753
3834
|
|
|
3754
3835
|
const innerDivRotate = react.keyframes({
|
|
3755
3836
|
'0%': {
|
|
3756
|
-
|
|
3837
|
+
transform: 'rotate(-90deg)'
|
|
3757
3838
|
},
|
|
3758
3839
|
'100%': {
|
|
3759
|
-
transform: 'rotate(
|
|
3840
|
+
transform: 'rotate(270deg)'
|
|
3760
3841
|
}
|
|
3761
3842
|
});
|
|
3762
3843
|
const circleIndeterminate = react.keyframes({
|
|
@@ -3779,32 +3860,33 @@ const ProgressSpinner = /*#__PURE__*/react$1.forwardRef(function ProgressSpinner
|
|
|
3779
3860
|
__css,
|
|
3780
3861
|
progress: progressProp,
|
|
3781
3862
|
thickness = 3.6,
|
|
3782
|
-
size = 40
|
|
3783
|
-
|
|
3784
|
-
|
|
3785
|
-
|
|
3863
|
+
size = 40,
|
|
3864
|
+
...otherProps
|
|
3865
|
+
} = props;
|
|
3786
3866
|
const indeterminate = progressProp === undefined;
|
|
3787
|
-
const progress = progressProp
|
|
3867
|
+
const progress = progressProp ?? 0;
|
|
3788
3868
|
const circumference = 2 * Math.PI * ((SIZE - thickness) / 2);
|
|
3789
|
-
return /*#__PURE__*/jsxRuntime.jsx(Box,
|
|
3790
|
-
ref: forwardedRef
|
|
3791
|
-
|
|
3792
|
-
__css:
|
|
3869
|
+
return /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
3870
|
+
ref: forwardedRef,
|
|
3871
|
+
...otherProps,
|
|
3872
|
+
__css: {
|
|
3793
3873
|
color: 'primary',
|
|
3794
3874
|
display: 'inline-block',
|
|
3795
3875
|
width: polished.rem(size),
|
|
3796
|
-
height: polished.rem(size)
|
|
3797
|
-
|
|
3876
|
+
height: polished.rem(size),
|
|
3877
|
+
...__css
|
|
3878
|
+
},
|
|
3798
3879
|
children: /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
3799
|
-
__css:
|
|
3880
|
+
__css: {
|
|
3800
3881
|
display: 'inline-block',
|
|
3801
3882
|
width: '100%',
|
|
3802
|
-
height: '100%'
|
|
3803
|
-
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
|
|
3807
|
-
|
|
3883
|
+
height: '100%',
|
|
3884
|
+
transformOrigin: '50% 50%',
|
|
3885
|
+
transform: 'rotate(-90deg)',
|
|
3886
|
+
...(indeterminate && {
|
|
3887
|
+
animation: `${innerDivRotate} 1.4s linear infinite`
|
|
3888
|
+
})
|
|
3889
|
+
},
|
|
3808
3890
|
children: /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
3809
3891
|
as: "svg",
|
|
3810
3892
|
viewBox: "22 22 44 44",
|
|
@@ -3821,26 +3903,23 @@ const ProgressSpinner = /*#__PURE__*/react$1.forwardRef(function ProgressSpinner
|
|
|
3821
3903
|
strokeDashoffset: `${((100 - progress) / 100 * circumference).toFixed(3)}px`
|
|
3822
3904
|
},
|
|
3823
3905
|
__css: indeterminate ? {
|
|
3824
|
-
animation: `${circleIndeterminate} 1.4s ease-in-out infinite
|
|
3825
|
-
strokeDasharray: '80px, 200px',
|
|
3826
|
-
strokeDashoffset: '0px'
|
|
3906
|
+
animation: `${circleIndeterminate} 1.4s ease-in-out infinite`
|
|
3827
3907
|
} : {
|
|
3828
|
-
transition:
|
|
3908
|
+
transition: `stroke-dashoffset 300ms ${EASING_STANDARD} 0ms`,
|
|
3829
3909
|
strokeDasharray: circumference.toFixed(3)
|
|
3830
3910
|
}
|
|
3831
3911
|
})
|
|
3832
3912
|
})
|
|
3833
3913
|
})
|
|
3834
|
-
})
|
|
3914
|
+
});
|
|
3835
3915
|
});
|
|
3836
3916
|
|
|
3837
3917
|
const RadioButtonIcon = /*#__PURE__*/react$1.forwardRef(function RadioButtonIcon(props, forwardedRef) {
|
|
3838
3918
|
const {
|
|
3839
|
-
checked
|
|
3840
|
-
|
|
3841
|
-
|
|
3842
|
-
|
|
3843
|
-
return /*#__PURE__*/jsxRuntime.jsx(Box, _extends__default['default']({
|
|
3919
|
+
checked,
|
|
3920
|
+
...otherProps
|
|
3921
|
+
} = props;
|
|
3922
|
+
return /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
3844
3923
|
ref: forwardedRef,
|
|
3845
3924
|
__css: {
|
|
3846
3925
|
borderColor: 'currentColor',
|
|
@@ -3850,19 +3929,19 @@ const RadioButtonIcon = /*#__PURE__*/react$1.forwardRef(function RadioButtonIcon
|
|
|
3850
3929
|
width: '100%',
|
|
3851
3930
|
height: '100%',
|
|
3852
3931
|
p: "0.1875rem"
|
|
3853
|
-
}
|
|
3854
|
-
|
|
3932
|
+
},
|
|
3933
|
+
...otherProps,
|
|
3855
3934
|
children: /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
3856
3935
|
__css: {
|
|
3857
3936
|
backgroundColor: 'currentColor',
|
|
3858
3937
|
borderRadius: 'full',
|
|
3859
3938
|
width: '100%',
|
|
3860
3939
|
height: '100%',
|
|
3861
|
-
transition:
|
|
3940
|
+
transition: `transform .12s ${EASING_STANDARD} 0ms,background-color .12s ${EASING_STANDARD} 0ms`,
|
|
3862
3941
|
transform: checked ? 'scale(1)' : 'scale(0)'
|
|
3863
3942
|
}
|
|
3864
3943
|
})
|
|
3865
|
-
})
|
|
3944
|
+
});
|
|
3866
3945
|
});
|
|
3867
3946
|
|
|
3868
3947
|
const RadioButtonInner = /*#__PURE__*/react$1.forwardRef(function RadioButtonInner(props, forwardedRef) {
|
|
@@ -3870,17 +3949,16 @@ const RadioButtonInner = /*#__PURE__*/react$1.forwardRef(function RadioButtonInn
|
|
|
3870
3949
|
innerAs: as,
|
|
3871
3950
|
checked,
|
|
3872
3951
|
disabled,
|
|
3873
|
-
__css
|
|
3874
|
-
|
|
3875
|
-
|
|
3876
|
-
|
|
3952
|
+
__css,
|
|
3953
|
+
...otherProps
|
|
3954
|
+
} = props;
|
|
3877
3955
|
const color = 'primary';
|
|
3878
3956
|
const theme = useTheme();
|
|
3879
3957
|
return /*#__PURE__*/jsxRuntime.jsxs(Box, {
|
|
3880
3958
|
position: "relative",
|
|
3881
3959
|
display: "inline-block",
|
|
3882
3960
|
minWidth: "auto",
|
|
3883
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(RippleBox,
|
|
3961
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(RippleBox, {
|
|
3884
3962
|
as: as,
|
|
3885
3963
|
checked: checked,
|
|
3886
3964
|
ref: forwardedRef,
|
|
@@ -3891,7 +3969,7 @@ const RadioButtonInner = /*#__PURE__*/react$1.forwardRef(function RadioButtonInn
|
|
|
3891
3969
|
center: true,
|
|
3892
3970
|
disabled: disabled,
|
|
3893
3971
|
theme: theme,
|
|
3894
|
-
__css:
|
|
3972
|
+
__css: {
|
|
3895
3973
|
top: 0,
|
|
3896
3974
|
left: 0,
|
|
3897
3975
|
width: "2.5rem",
|
|
@@ -3903,9 +3981,11 @@ const RadioButtonInner = /*#__PURE__*/react$1.forwardRef(function RadioButtonInn
|
|
|
3903
3981
|
border: 'none',
|
|
3904
3982
|
borderRadius: 'full',
|
|
3905
3983
|
zIndex: 1,
|
|
3906
|
-
position: 'absolute'
|
|
3907
|
-
|
|
3908
|
-
|
|
3984
|
+
position: 'absolute',
|
|
3985
|
+
...__css
|
|
3986
|
+
},
|
|
3987
|
+
...otherProps
|
|
3988
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
3909
3989
|
__css: {
|
|
3910
3990
|
position: 'relative',
|
|
3911
3991
|
top: 0,
|
|
@@ -3932,16 +4012,17 @@ const RadioButton = /*#__PURE__*/react$1.forwardRef(function RadioButton(props,
|
|
|
3932
4012
|
const {
|
|
3933
4013
|
as = 'input',
|
|
3934
4014
|
children,
|
|
3935
|
-
disabled
|
|
3936
|
-
|
|
3937
|
-
|
|
4015
|
+
disabled,
|
|
4016
|
+
...otherProps
|
|
4017
|
+
} = props;
|
|
3938
4018
|
|
|
3939
|
-
const inner = /*#__PURE__*/jsxRuntime.jsx(core.RadioButton,
|
|
4019
|
+
const inner = /*#__PURE__*/jsxRuntime.jsx(core.RadioButton, {
|
|
3940
4020
|
as: RadioButtonInner,
|
|
3941
4021
|
innerAs: as,
|
|
3942
4022
|
ref: forwardedRef,
|
|
3943
|
-
disabled: disabled
|
|
3944
|
-
|
|
4023
|
+
disabled: disabled,
|
|
4024
|
+
...otherProps
|
|
4025
|
+
});
|
|
3945
4026
|
|
|
3946
4027
|
if (!children) {
|
|
3947
4028
|
return inner;
|
|
@@ -3957,54 +4038,51 @@ const RadioButton = /*#__PURE__*/react$1.forwardRef(function RadioButton(props,
|
|
|
3957
4038
|
|
|
3958
4039
|
const RadioGroup = /*#__PURE__*/react$1.forwardRef(function RadioGroup(props, forwardedRef) {
|
|
3959
4040
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
3960
|
-
const
|
|
3961
|
-
|
|
3962
|
-
|
|
4041
|
+
const {
|
|
4042
|
+
as,
|
|
4043
|
+
...otherProps
|
|
4044
|
+
} = props;
|
|
4045
|
+
return /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
3963
4046
|
as: core.RadioGroup,
|
|
3964
|
-
ref: forwardedRef
|
|
3965
|
-
|
|
4047
|
+
ref: forwardedRef,
|
|
4048
|
+
...otherProps
|
|
4049
|
+
});
|
|
3966
4050
|
});
|
|
3967
4051
|
|
|
3968
|
-
const Select$1 = /*#__PURE__*/react$1.forwardRef((
|
|
3969
|
-
|
|
3970
|
-
|
|
3971
|
-
|
|
3972
|
-
props = _objectWithoutPropertiesLoose__default['default'](_ref, ["as"]);
|
|
3973
|
-
|
|
4052
|
+
const Select$1 = /*#__PURE__*/react$1.forwardRef(({
|
|
4053
|
+
as: asProp = 'select',
|
|
4054
|
+
...props
|
|
4055
|
+
}, forwardedRef) => {
|
|
3974
4056
|
const InputSelect = Input;
|
|
3975
|
-
return /*#__PURE__*/jsxRuntime.jsx(InputSelect,
|
|
4057
|
+
return /*#__PURE__*/jsxRuntime.jsx(InputSelect, {
|
|
3976
4058
|
as: asProp,
|
|
3977
|
-
ref: forwardedRef
|
|
3978
|
-
|
|
4059
|
+
ref: forwardedRef,
|
|
4060
|
+
...props
|
|
4061
|
+
});
|
|
3979
4062
|
});
|
|
3980
|
-
const SelectButtonInner = /*#__PURE__*/react$1.forwardRef((
|
|
3981
|
-
|
|
3982
|
-
|
|
3983
|
-
|
|
3984
|
-
props = _objectWithoutPropertiesLoose__default['default'](_ref2, ["innerAs"]);
|
|
3985
|
-
|
|
4063
|
+
const SelectButtonInner = /*#__PURE__*/react$1.forwardRef(({
|
|
4064
|
+
innerAs = 'div',
|
|
4065
|
+
...props
|
|
4066
|
+
}, forwardedRef) => {
|
|
3986
4067
|
const InputButton = Input;
|
|
3987
|
-
return /*#__PURE__*/jsxRuntime.jsx(InputButton,
|
|
4068
|
+
return /*#__PURE__*/jsxRuntime.jsx(InputButton, {
|
|
3988
4069
|
as: innerAs,
|
|
3989
4070
|
ref: forwardedRef,
|
|
3990
|
-
tabIndex: 0
|
|
3991
|
-
|
|
3992
|
-
});
|
|
3993
|
-
const SelectButton = /*#__PURE__*/react$1.forwardRef((_ref3, ref) => {
|
|
3994
|
-
let {
|
|
3995
|
-
as,
|
|
3996
|
-
children
|
|
3997
|
-
} = _ref3,
|
|
3998
|
-
props = _objectWithoutPropertiesLoose__default['default'](_ref3, ["as", "children"]);
|
|
3999
|
-
|
|
4000
|
-
return /*#__PURE__*/jsxRuntime.jsx(core.MenuButton, _extends__default['default']({
|
|
4001
|
-
as: SelectButtonInner,
|
|
4002
|
-
innerAs: as,
|
|
4003
|
-
ref: ref
|
|
4004
|
-
}, props, {
|
|
4005
|
-
children: children
|
|
4006
|
-
}));
|
|
4071
|
+
tabIndex: 0,
|
|
4072
|
+
...props
|
|
4073
|
+
});
|
|
4007
4074
|
});
|
|
4075
|
+
const SelectButton = /*#__PURE__*/react$1.forwardRef(({
|
|
4076
|
+
as,
|
|
4077
|
+
children,
|
|
4078
|
+
...props
|
|
4079
|
+
}, ref) => /*#__PURE__*/jsxRuntime.jsx(core.MenuButton, {
|
|
4080
|
+
as: SelectButtonInner,
|
|
4081
|
+
innerAs: as,
|
|
4082
|
+
ref: ref,
|
|
4083
|
+
...props,
|
|
4084
|
+
children: children
|
|
4085
|
+
}));
|
|
4008
4086
|
|
|
4009
4087
|
const selectContext = /*#__PURE__*/react$1.createContext({
|
|
4010
4088
|
native: false,
|
|
@@ -4018,11 +4096,10 @@ const useSelectContext = () => react$1.useContext(selectContext);
|
|
|
4018
4096
|
|
|
4019
4097
|
const SelectIcon = /*#__PURE__*/react$1.forwardRef(function SelectIcon(props, forwardedRef) {
|
|
4020
4098
|
const {
|
|
4021
|
-
open
|
|
4022
|
-
|
|
4023
|
-
|
|
4024
|
-
|
|
4025
|
-
return /*#__PURE__*/jsxRuntime.jsx(Box, _extends__default['default']({
|
|
4099
|
+
open,
|
|
4100
|
+
...otherProps
|
|
4101
|
+
} = props;
|
|
4102
|
+
return /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
4026
4103
|
ref: forwardedRef,
|
|
4027
4104
|
as: "svg",
|
|
4028
4105
|
"aria-hidden": true,
|
|
@@ -4036,14 +4113,14 @@ const SelectIcon = /*#__PURE__*/react$1.forwardRef(function SelectIcon(props, fo
|
|
|
4036
4113
|
color: open ? 'primary' : alpha('on.surface', 0.54),
|
|
4037
4114
|
pointerEvents: 'none',
|
|
4038
4115
|
transform: open ? 'rotate(180deg)' : undefined,
|
|
4039
|
-
transition:
|
|
4040
|
-
}
|
|
4041
|
-
|
|
4116
|
+
transition: `transform .15s ${EASING_STANDARD}, color .15s ${EASING_STANDARD}`
|
|
4117
|
+
},
|
|
4118
|
+
...otherProps,
|
|
4042
4119
|
children: /*#__PURE__*/jsxRuntime.jsx("path", {
|
|
4043
4120
|
fill: "currentColor",
|
|
4044
4121
|
d: "M7 10l5 5 5-5z"
|
|
4045
4122
|
})
|
|
4046
|
-
})
|
|
4123
|
+
});
|
|
4047
4124
|
});
|
|
4048
4125
|
|
|
4049
4126
|
const makeDefaultRender = children => val => {
|
|
@@ -4069,8 +4146,6 @@ const componentMap = {
|
|
|
4069
4146
|
filled: FilledContainer
|
|
4070
4147
|
};
|
|
4071
4148
|
const Select = /*#__PURE__*/react$1.forwardRef(function Select(props, forwardedRef) {
|
|
4072
|
-
var _buttonRef$current;
|
|
4073
|
-
|
|
4074
4149
|
const {
|
|
4075
4150
|
id: idProp,
|
|
4076
4151
|
variant = 'outlined',
|
|
@@ -4088,10 +4163,9 @@ const Select = /*#__PURE__*/react$1.forwardRef(function Select(props, forwardedR
|
|
|
4088
4163
|
native = false,
|
|
4089
4164
|
children,
|
|
4090
4165
|
renderValue: renderValueProp,
|
|
4091
|
-
leadingIcon = null
|
|
4092
|
-
|
|
4093
|
-
|
|
4094
|
-
|
|
4166
|
+
leadingIcon = null,
|
|
4167
|
+
...otherProps
|
|
4168
|
+
} = props;
|
|
4095
4169
|
const [value, onChange] = core.useControlledState(valueProp, onChangeProp, defaultValue, setState => (e, v) => {
|
|
4096
4170
|
setState(v);
|
|
4097
4171
|
});
|
|
@@ -4162,7 +4236,7 @@ const Select = /*#__PURE__*/react$1.forwardRef(function Select(props, forwardedR
|
|
|
4162
4236
|
children: [leadingIcon && /*#__PURE__*/jsxRuntime.jsx(IconContainer, {
|
|
4163
4237
|
position: "start",
|
|
4164
4238
|
children: leadingIcon
|
|
4165
|
-
}), /*#__PURE__*/jsxRuntime.jsx(Comp,
|
|
4239
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Comp, {
|
|
4166
4240
|
ref: core.assignMultipleRefs(forwardedRef, buttonRef),
|
|
4167
4241
|
variant: variant,
|
|
4168
4242
|
id: inputId,
|
|
@@ -4177,15 +4251,15 @@ const Select = /*#__PURE__*/react$1.forwardRef(function Select(props, forwardedR
|
|
|
4177
4251
|
"aria-describedby": helperTextId,
|
|
4178
4252
|
hasLabel: !!label,
|
|
4179
4253
|
leadingIcon: Boolean(leadingIcon),
|
|
4180
|
-
trailingIcon: true
|
|
4181
|
-
|
|
4254
|
+
trailingIcon: true,
|
|
4255
|
+
...otherProps,
|
|
4182
4256
|
children: native ? children : renderValue(value)
|
|
4183
|
-
})
|
|
4257
|
+
}), !native && /*#__PURE__*/jsxRuntime.jsx(MenuPopover, {
|
|
4184
4258
|
usePortal: true,
|
|
4185
4259
|
children: /*#__PURE__*/jsxRuntime.jsx(MenuList, {
|
|
4186
4260
|
defaultActiveItemValue: value,
|
|
4187
4261
|
style: {
|
|
4188
|
-
minWidth: buttonRef
|
|
4262
|
+
minWidth: buttonRef?.current?.offsetWidth
|
|
4189
4263
|
},
|
|
4190
4264
|
role: "listbox",
|
|
4191
4265
|
children: children
|
|
@@ -4211,10 +4285,9 @@ const SelectItem = /*#__PURE__*/react$1.forwardRef(function SelectItem(props, fo
|
|
|
4211
4285
|
onSelect: onSelectProp,
|
|
4212
4286
|
children,
|
|
4213
4287
|
value: valueProp,
|
|
4214
|
-
disabled
|
|
4215
|
-
|
|
4216
|
-
|
|
4217
|
-
|
|
4288
|
+
disabled,
|
|
4289
|
+
...otherProps
|
|
4290
|
+
} = props;
|
|
4218
4291
|
const {
|
|
4219
4292
|
native,
|
|
4220
4293
|
onSelect,
|
|
@@ -4223,13 +4296,13 @@ const SelectItem = /*#__PURE__*/react$1.forwardRef(function SelectItem(props, fo
|
|
|
4223
4296
|
const value = valueProp !== undefined && valueProp !== null ? String(valueProp) : children;
|
|
4224
4297
|
|
|
4225
4298
|
if (native) {
|
|
4226
|
-
return /*#__PURE__*/jsxRuntime.jsx("option",
|
|
4299
|
+
return /*#__PURE__*/jsxRuntime.jsx("option", {
|
|
4227
4300
|
ref: forwardedRef,
|
|
4228
4301
|
value: value,
|
|
4229
|
-
disabled: disabled
|
|
4230
|
-
|
|
4302
|
+
disabled: disabled,
|
|
4303
|
+
...otherProps,
|
|
4231
4304
|
children: children
|
|
4232
|
-
})
|
|
4305
|
+
});
|
|
4233
4306
|
}
|
|
4234
4307
|
|
|
4235
4308
|
if (children === undefined && disabled) {
|
|
@@ -4237,17 +4310,17 @@ const SelectItem = /*#__PURE__*/react$1.forwardRef(function SelectItem(props, fo
|
|
|
4237
4310
|
}
|
|
4238
4311
|
|
|
4239
4312
|
const selected = value === String(selectedValue);
|
|
4240
|
-
return /*#__PURE__*/jsxRuntime.jsx(Comp,
|
|
4313
|
+
return /*#__PURE__*/jsxRuntime.jsx(Comp, {
|
|
4241
4314
|
as: MenuItem,
|
|
4242
4315
|
onSelect: core.wrapEvent(onSelectProp, onSelect),
|
|
4243
4316
|
"data-value": value,
|
|
4244
4317
|
disabled: disabled,
|
|
4245
4318
|
ref: forwardedRef,
|
|
4246
4319
|
role: "option",
|
|
4247
|
-
selected: selected
|
|
4248
|
-
|
|
4320
|
+
selected: selected,
|
|
4321
|
+
...otherProps,
|
|
4249
4322
|
children: children || ZERO_WIDTH_SPACE
|
|
4250
|
-
})
|
|
4323
|
+
});
|
|
4251
4324
|
});
|
|
4252
4325
|
|
|
4253
4326
|
const pulseAnimation = react.keyframes({
|
|
@@ -4297,22 +4370,24 @@ const Skeleton = /*#__PURE__*/react$1.forwardRef(function Skeleton(props, forwar
|
|
|
4297
4370
|
const {
|
|
4298
4371
|
as = 'span',
|
|
4299
4372
|
__css,
|
|
4300
|
-
animation = 'pulse'
|
|
4301
|
-
|
|
4302
|
-
|
|
4303
|
-
|
|
4373
|
+
animation = 'pulse',
|
|
4374
|
+
...otherProps
|
|
4375
|
+
} = props;
|
|
4304
4376
|
const theme = useTheme();
|
|
4305
|
-
return /*#__PURE__*/jsxRuntime.jsx(Box,
|
|
4377
|
+
return /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
4306
4378
|
ref: forwardedRef,
|
|
4307
4379
|
as: as,
|
|
4308
|
-
__css:
|
|
4380
|
+
__css: {
|
|
4309
4381
|
height: '1.2em',
|
|
4310
4382
|
display: 'inline-block',
|
|
4311
|
-
backgroundColor: alpha('on.surface', 0.11)
|
|
4312
|
-
|
|
4313
|
-
|
|
4314
|
-
|
|
4315
|
-
|
|
4383
|
+
backgroundColor: alpha('on.surface', 0.11),
|
|
4384
|
+
...(animation === 'pulse' ? pulseAnimationStyle() : waveAnimationStyle({
|
|
4385
|
+
theme
|
|
4386
|
+
})),
|
|
4387
|
+
...__css
|
|
4388
|
+
},
|
|
4389
|
+
...otherProps
|
|
4390
|
+
});
|
|
4316
4391
|
});
|
|
4317
4392
|
|
|
4318
4393
|
const appearAnimation = react.keyframes({
|
|
@@ -4328,18 +4403,19 @@ const appearAnimation = react.keyframes({
|
|
|
4328
4403
|
const DelayAppearance = /*#__PURE__*/react$1.forwardRef(function DelayAppearance(props, forwardedRef) {
|
|
4329
4404
|
const {
|
|
4330
4405
|
timeoutInMilliseconds = 500,
|
|
4331
|
-
__css
|
|
4332
|
-
|
|
4333
|
-
|
|
4334
|
-
|
|
4335
|
-
return /*#__PURE__*/jsxRuntime.jsx(Box, _extends__default['default']({
|
|
4406
|
+
__css,
|
|
4407
|
+
...otherProps
|
|
4408
|
+
} = props;
|
|
4409
|
+
return /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
4336
4410
|
ref: forwardedRef,
|
|
4337
4411
|
timeoutInMilliseconds: timeoutInMilliseconds,
|
|
4338
|
-
__css:
|
|
4412
|
+
__css: {
|
|
4339
4413
|
animation: `0s linear ${timeoutInMilliseconds}ms forwards ${appearAnimation}`,
|
|
4340
|
-
visibility: 'hidden'
|
|
4341
|
-
|
|
4342
|
-
|
|
4414
|
+
visibility: 'hidden',
|
|
4415
|
+
...__css
|
|
4416
|
+
},
|
|
4417
|
+
...otherProps
|
|
4418
|
+
});
|
|
4343
4419
|
});
|
|
4344
4420
|
|
|
4345
4421
|
const StackItemContext = /*#__PURE__*/react$1.createContext(null);
|
|
@@ -4370,9 +4446,7 @@ function useStackItem({
|
|
|
4370
4446
|
}
|
|
4371
4447
|
|
|
4372
4448
|
react$1.useLayoutEffect(() => {
|
|
4373
|
-
|
|
4374
|
-
|
|
4375
|
-
const height = (_ref$current$getBound = (_ref$current = ref.current) == null ? void 0 : _ref$current.getBoundingClientRect().height) != null ? _ref$current$getBound : 0;
|
|
4449
|
+
const height = ref.current?.getBoundingClientRect().height ?? 0;
|
|
4376
4450
|
onSetHeight(height);
|
|
4377
4451
|
|
|
4378
4452
|
if (isExiting) {
|
|
@@ -4509,7 +4583,7 @@ const StackProvider = ({
|
|
|
4509
4583
|
const onAddItemRef = react$1.useRef(null);
|
|
4510
4584
|
|
|
4511
4585
|
function onAddItem(element) {
|
|
4512
|
-
onAddItemRef.current
|
|
4586
|
+
onAddItemRef.current?.(element);
|
|
4513
4587
|
}
|
|
4514
4588
|
|
|
4515
4589
|
return /*#__PURE__*/jsxRuntime.jsxs(StackContext.Provider, {
|
|
@@ -4641,7 +4715,7 @@ const commonStyle = {
|
|
|
4641
4715
|
};
|
|
4642
4716
|
|
|
4643
4717
|
function getTransition(timems) {
|
|
4644
|
-
return `opacity ${timems}ms
|
|
4718
|
+
return `opacity ${timems}ms ${EASING_STANDARD},transform ${timems}ms ${EASING_STANDARD}`;
|
|
4645
4719
|
}
|
|
4646
4720
|
|
|
4647
4721
|
const defaultAnimation = {
|
|
@@ -4680,28 +4754,34 @@ function useSnackbarAnimation(ref, timeout) {
|
|
|
4680
4754
|
switch (state) {
|
|
4681
4755
|
case 'entering':
|
|
4682
4756
|
return {
|
|
4683
|
-
style:
|
|
4757
|
+
style: { ...animateFn('entering', translateY),
|
|
4684
4758
|
visibility: 'hidden'
|
|
4685
|
-
}
|
|
4686
|
-
placementStyle:
|
|
4759
|
+
},
|
|
4760
|
+
placementStyle: { ...placementStyle,
|
|
4761
|
+
...commonStyle
|
|
4762
|
+
},
|
|
4687
4763
|
onClose
|
|
4688
4764
|
};
|
|
4689
4765
|
|
|
4690
4766
|
case 'entered':
|
|
4691
4767
|
return {
|
|
4692
|
-
style:
|
|
4768
|
+
style: { ...animateFn('entered', translateY),
|
|
4693
4769
|
transition: getTransition(TRANSITION_TIME)
|
|
4694
|
-
}
|
|
4695
|
-
placementStyle:
|
|
4770
|
+
},
|
|
4771
|
+
placementStyle: { ...placementStyle,
|
|
4772
|
+
...commonStyle
|
|
4773
|
+
},
|
|
4696
4774
|
onClose
|
|
4697
4775
|
};
|
|
4698
4776
|
|
|
4699
4777
|
case 'exiting':
|
|
4700
4778
|
return {
|
|
4701
|
-
style:
|
|
4779
|
+
style: { ...animateFn('exiting', translateY),
|
|
4702
4780
|
transition: getTransition(TRANSITION_TIME)
|
|
4703
|
-
}
|
|
4704
|
-
placementStyle:
|
|
4781
|
+
},
|
|
4782
|
+
placementStyle: { ...placementStyle,
|
|
4783
|
+
...commonStyle
|
|
4784
|
+
},
|
|
4705
4785
|
onClose
|
|
4706
4786
|
};
|
|
4707
4787
|
}
|
|
@@ -4710,30 +4790,28 @@ function useSnackbarAnimation(ref, timeout) {
|
|
|
4710
4790
|
const Snackbar = /*#__PURE__*/react$1.forwardRef(function Snackbar(props, forwardedRef) {
|
|
4711
4791
|
const {
|
|
4712
4792
|
colorMode
|
|
4713
|
-
} = useColorMode();
|
|
4793
|
+
} = dynamicTheme.useColorMode();
|
|
4714
4794
|
const ref = react$1.useRef(null);
|
|
4715
|
-
|
|
4716
4795
|
const {
|
|
4717
4796
|
__css,
|
|
4718
4797
|
action,
|
|
4719
4798
|
children,
|
|
4720
4799
|
style: styleProp,
|
|
4721
4800
|
timeout = 5000,
|
|
4722
|
-
dismissible
|
|
4723
|
-
|
|
4724
|
-
|
|
4725
|
-
|
|
4801
|
+
dismissible,
|
|
4802
|
+
...otherProps
|
|
4803
|
+
} = props;
|
|
4726
4804
|
const {
|
|
4727
4805
|
onClose,
|
|
4728
4806
|
placementStyle,
|
|
4729
4807
|
style
|
|
4730
4808
|
} = useSnackbarAnimation(ref, timeout);
|
|
4731
|
-
return /*#__PURE__*/jsxRuntime.jsxs(Paper,
|
|
4809
|
+
return /*#__PURE__*/jsxRuntime.jsxs(Paper, {
|
|
4732
4810
|
elevation: 4,
|
|
4733
4811
|
darkThemeBackgroundOverlay: 4,
|
|
4734
|
-
className: colorMode === 'default' ? DARK_THEME_CLASS : DEFAULT_THEME_CLASS,
|
|
4812
|
+
className: colorMode === 'default' ? dynamicTheme.DARK_THEME_CLASS : dynamicTheme.DEFAULT_THEME_CLASS,
|
|
4735
4813
|
ref: core.assignMultipleRefs(forwardedRef, ref),
|
|
4736
|
-
__css:
|
|
4814
|
+
__css: {
|
|
4737
4815
|
boxShadow: 4,
|
|
4738
4816
|
py: "0.375rem",
|
|
4739
4817
|
pl: 3,
|
|
@@ -4744,12 +4822,16 @@ const Snackbar = /*#__PURE__*/react$1.forwardRef(function Snackbar(props, forwar
|
|
|
4744
4822
|
borderRadius: 'extra-small',
|
|
4745
4823
|
color: 'on.surface',
|
|
4746
4824
|
flexDirection: 'row',
|
|
4747
|
-
willChange: 'transform,opacity'
|
|
4748
|
-
|
|
4749
|
-
|
|
4750
|
-
|
|
4825
|
+
willChange: 'transform,opacity',
|
|
4826
|
+
...placementStyle,
|
|
4827
|
+
...__css
|
|
4828
|
+
},
|
|
4829
|
+
style: { ...style,
|
|
4830
|
+
...styleProp
|
|
4831
|
+
},
|
|
4832
|
+
...otherProps,
|
|
4751
4833
|
children: [/*#__PURE__*/jsxRuntime.jsx(Text, {
|
|
4752
|
-
variant: "
|
|
4834
|
+
variant: "body-medium",
|
|
4753
4835
|
as: "span",
|
|
4754
4836
|
py: 2,
|
|
4755
4837
|
children: children
|
|
@@ -4763,7 +4845,7 @@ const Snackbar = /*#__PURE__*/react$1.forwardRef(function Snackbar(props, forwar
|
|
|
4763
4845
|
onClick: onClose
|
|
4764
4846
|
}) : action
|
|
4765
4847
|
})]
|
|
4766
|
-
})
|
|
4848
|
+
});
|
|
4767
4849
|
});
|
|
4768
4850
|
|
|
4769
4851
|
const BORDER_WIDTH = 2;
|
|
@@ -4773,93 +4855,85 @@ const CIRCLE_SIZE_INACTIVE_CHECKED = 24;
|
|
|
4773
4855
|
const CIRCLE_SIZE_ACTIVE_CHECKED = 28;
|
|
4774
4856
|
const CIRCLE_SIZE_INACTIVE_UNCHECKED = 16;
|
|
4775
4857
|
const CIRCLE_SIZE_ACTIVE_UNCHECKED = 28;
|
|
4776
|
-
const SwitchTrail = (
|
|
4777
|
-
|
|
4778
|
-
|
|
4779
|
-
|
|
4780
|
-
|
|
4781
|
-
|
|
4782
|
-
|
|
4783
|
-
|
|
4784
|
-
|
|
4785
|
-
|
|
4786
|
-
|
|
4787
|
-
|
|
4788
|
-
|
|
4789
|
-
|
|
4790
|
-
backgroundColor: checked ? 'primary' : 'surface-variant',
|
|
4791
|
-
borderColor: checked ? 'primary' : 'outline'
|
|
4792
|
-
}, disabled && {
|
|
4858
|
+
const SwitchTrail = ({
|
|
4859
|
+
checked = false,
|
|
4860
|
+
disabled = false,
|
|
4861
|
+
...otherProps
|
|
4862
|
+
}) => /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
4863
|
+
__css: {
|
|
4864
|
+
width: polished.rem(TRAIL_WIDTH),
|
|
4865
|
+
height: polished.rem(TRAIL_HEIGHT),
|
|
4866
|
+
borderRadius: polished.rem(TRAIL_HEIGHT / 2),
|
|
4867
|
+
borderWidth: polished.rem(BORDER_WIDTH),
|
|
4868
|
+
borderStyle: 'solid',
|
|
4869
|
+
backgroundColor: checked ? 'primary' : 'surface-variant',
|
|
4870
|
+
borderColor: checked ? 'primary' : 'outline',
|
|
4871
|
+
...(disabled && {
|
|
4793
4872
|
opacity: 0.12,
|
|
4794
4873
|
backgroundColor: checked ? 'on.surface' : 'surface-variant',
|
|
4795
4874
|
borderColor: 'on.surface'
|
|
4796
4875
|
})
|
|
4797
|
-
},
|
|
4798
|
-
|
|
4876
|
+
},
|
|
4877
|
+
...otherProps
|
|
4878
|
+
});
|
|
4799
4879
|
const THUMB_SIZE = 40;
|
|
4800
|
-
const SwitchThumb = (
|
|
4801
|
-
|
|
4802
|
-
|
|
4803
|
-
|
|
4804
|
-
|
|
4805
|
-
|
|
4806
|
-
|
|
4807
|
-
|
|
4808
|
-
|
|
4809
|
-
|
|
4810
|
-
|
|
4811
|
-
|
|
4812
|
-
|
|
4813
|
-
|
|
4814
|
-
|
|
4815
|
-
|
|
4816
|
-
|
|
4817
|
-
'& > input': {
|
|
4818
|
-
width: THUMB_SIZE,
|
|
4819
|
-
height: THUMB_SIZE
|
|
4820
|
-
}
|
|
4880
|
+
const SwitchThumb = ({
|
|
4881
|
+
checked = false,
|
|
4882
|
+
...otherProps
|
|
4883
|
+
}) => /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
4884
|
+
position: "absolute",
|
|
4885
|
+
width: polished.rem(THUMB_SIZE),
|
|
4886
|
+
height: polished.rem(THUMB_SIZE),
|
|
4887
|
+
borderRadius: "full",
|
|
4888
|
+
left: '50%',
|
|
4889
|
+
top: '50%',
|
|
4890
|
+
__css: {
|
|
4891
|
+
transform: `translateX(calc(-50% ${checked ? '+' : '-'} ${polished.rem((TRAIL_WIDTH - CIRCLE_SIZE_INACTIVE_CHECKED - BORDER_WIDTH * 4) / 2)})) translateY(-50%)`,
|
|
4892
|
+
WebkitTapHighlightColor: 'transparent',
|
|
4893
|
+
transition: `background-color 90ms ${EASING_STANDARD},border-color 90ms ${EASING_STANDARD},transform 90ms ${EASING_STANDARD},height 90ms ${EASING_STANDARD},width 90ms ${EASING_STANDARD}`,
|
|
4894
|
+
'& > input': {
|
|
4895
|
+
width: THUMB_SIZE,
|
|
4896
|
+
height: THUMB_SIZE
|
|
4821
4897
|
}
|
|
4822
|
-
},
|
|
4823
|
-
|
|
4824
|
-
|
|
4825
|
-
|
|
4826
|
-
|
|
4827
|
-
|
|
4828
|
-
|
|
4829
|
-
|
|
4830
|
-
|
|
4831
|
-
|
|
4832
|
-
|
|
4833
|
-
|
|
4834
|
-
|
|
4835
|
-
|
|
4836
|
-
|
|
4837
|
-
|
|
4838
|
-
|
|
4839
|
-
|
|
4840
|
-
|
|
4841
|
-
|
|
4842
|
-
|
|
4843
|
-
|
|
4844
|
-
'[data-switch-thumb=""]:active ~ &, [data-switch-thumb=""]:focus-visible ~ &, [data-switch-thumb=""]:hover ~ &': {
|
|
4845
|
-
backgroundColor: checked ? 'primary-container' : 'on.surface-variant'
|
|
4846
|
-
},
|
|
4847
|
-
'[data-switch-thumb=""]:active ~ &, [data-switch-thumb=""]:focus-visible ~ &': {
|
|
4848
|
-
height: checked ? CIRCLE_SIZE_ACTIVE_CHECKED : CIRCLE_SIZE_ACTIVE_UNCHECKED,
|
|
4849
|
-
width: checked ? CIRCLE_SIZE_ACTIVE_CHECKED : CIRCLE_SIZE_ACTIVE_UNCHECKED
|
|
4850
|
-
},
|
|
4851
|
-
'[data-switch-thumb=""]:disabled ~ &': {
|
|
4852
|
-
opacity: checked ? 1 : 0.38,
|
|
4853
|
-
backgroundColor: checked ? 'surface' : 'on.surface',
|
|
4854
|
-
height: checked ? CIRCLE_SIZE_INACTIVE_CHECKED : CIRCLE_SIZE_INACTIVE_UNCHECKED,
|
|
4855
|
-
width: checked ? CIRCLE_SIZE_INACTIVE_CHECKED : CIRCLE_SIZE_INACTIVE_UNCHECKED
|
|
4856
|
-
}
|
|
4898
|
+
},
|
|
4899
|
+
...otherProps
|
|
4900
|
+
});
|
|
4901
|
+
const SwitchCircle = ({
|
|
4902
|
+
checked = false,
|
|
4903
|
+
...otherProps
|
|
4904
|
+
}) => /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
4905
|
+
__css: {
|
|
4906
|
+
position: 'absolute',
|
|
4907
|
+
width: checked ? polished.rem(CIRCLE_SIZE_INACTIVE_CHECKED) : polished.rem(CIRCLE_SIZE_INACTIVE_UNCHECKED),
|
|
4908
|
+
height: checked ? polished.rem(CIRCLE_SIZE_INACTIVE_CHECKED) : polished.rem(CIRCLE_SIZE_INACTIVE_UNCHECKED),
|
|
4909
|
+
boxSizing: 'border-box',
|
|
4910
|
+
borderRadius: 'full',
|
|
4911
|
+
pointerEvents: 'none',
|
|
4912
|
+
zIndex: 1,
|
|
4913
|
+
backgroundColor: checked ? 'on.primary' : 'outline',
|
|
4914
|
+
top: '50%',
|
|
4915
|
+
left: '50%',
|
|
4916
|
+
transform: 'translate(-50%, -50%)',
|
|
4917
|
+
transition: 'inherit',
|
|
4918
|
+
'[data-switch-thumb=""]:active ~ &, [data-switch-thumb=""]:focus-visible ~ &, [data-switch-thumb=""]:hover ~ &': {
|
|
4919
|
+
backgroundColor: checked ? 'primary-container' : 'on.surface-variant'
|
|
4857
4920
|
},
|
|
4858
|
-
|
|
4859
|
-
|
|
4860
|
-
|
|
4861
|
-
|
|
4862
|
-
|
|
4921
|
+
'[data-switch-thumb=""]:active ~ &, [data-switch-thumb=""]:focus-visible ~ &': {
|
|
4922
|
+
height: checked ? CIRCLE_SIZE_ACTIVE_CHECKED : CIRCLE_SIZE_ACTIVE_UNCHECKED,
|
|
4923
|
+
width: checked ? CIRCLE_SIZE_ACTIVE_CHECKED : CIRCLE_SIZE_ACTIVE_UNCHECKED
|
|
4924
|
+
},
|
|
4925
|
+
'[data-switch-thumb=""]:disabled ~ &': {
|
|
4926
|
+
opacity: checked ? 1 : 0.38,
|
|
4927
|
+
backgroundColor: checked ? 'surface' : 'on.surface',
|
|
4928
|
+
height: checked ? CIRCLE_SIZE_INACTIVE_CHECKED : CIRCLE_SIZE_INACTIVE_UNCHECKED,
|
|
4929
|
+
width: checked ? CIRCLE_SIZE_INACTIVE_CHECKED : CIRCLE_SIZE_INACTIVE_UNCHECKED
|
|
4930
|
+
}
|
|
4931
|
+
},
|
|
4932
|
+
"data-switch-circle": "",
|
|
4933
|
+
role: "presentation",
|
|
4934
|
+
"aria-hidden": "true",
|
|
4935
|
+
...otherProps
|
|
4936
|
+
});
|
|
4863
4937
|
|
|
4864
4938
|
const CheckBoxCore = core.CheckBox;
|
|
4865
4939
|
const SwitchInner = /*#__PURE__*/react$1.forwardRef(function SwitchInner(props, forwardedRef) {
|
|
@@ -4868,10 +4942,9 @@ const SwitchInner = /*#__PURE__*/react$1.forwardRef(function SwitchInner(props,
|
|
|
4868
4942
|
disabled,
|
|
4869
4943
|
checked,
|
|
4870
4944
|
onChange,
|
|
4871
|
-
__css
|
|
4872
|
-
|
|
4873
|
-
|
|
4874
|
-
|
|
4945
|
+
__css,
|
|
4946
|
+
...otherProps
|
|
4947
|
+
} = props;
|
|
4875
4948
|
const color = checked ? 'primary' : 'on.surface';
|
|
4876
4949
|
const theme = useTheme();
|
|
4877
4950
|
return /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
@@ -4885,7 +4958,7 @@ const SwitchInner = /*#__PURE__*/react$1.forwardRef(function SwitchInner(props,
|
|
|
4885
4958
|
disabled: disabled
|
|
4886
4959
|
}), /*#__PURE__*/jsxRuntime.jsxs(SwitchThumb, {
|
|
4887
4960
|
checked: checked,
|
|
4888
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(RippleBox,
|
|
4961
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(RippleBox, {
|
|
4889
4962
|
as: Comp,
|
|
4890
4963
|
role: "switch",
|
|
4891
4964
|
type: "checkbox",
|
|
@@ -4900,9 +4973,9 @@ const SwitchInner = /*#__PURE__*/react$1.forwardRef(function SwitchInner(props,
|
|
|
4900
4973
|
focusOpacity: 0.12,
|
|
4901
4974
|
center: true,
|
|
4902
4975
|
disabled: disabled,
|
|
4903
|
-
"data-switch-thumb": ""
|
|
4904
|
-
|
|
4905
|
-
__css:
|
|
4976
|
+
"data-switch-thumb": "",
|
|
4977
|
+
...otherProps,
|
|
4978
|
+
__css: {
|
|
4906
4979
|
top: '50%',
|
|
4907
4980
|
left: '50%',
|
|
4908
4981
|
backgroundColor: 'transparent',
|
|
@@ -4916,9 +4989,10 @@ const SwitchInner = /*#__PURE__*/react$1.forwardRef(function SwitchInner(props,
|
|
|
4916
4989
|
border: 'none',
|
|
4917
4990
|
borderRadius: 'full',
|
|
4918
4991
|
zIndex: 1,
|
|
4919
|
-
position: 'absolute'
|
|
4920
|
-
|
|
4921
|
-
|
|
4992
|
+
position: 'absolute',
|
|
4993
|
+
...__css
|
|
4994
|
+
}
|
|
4995
|
+
}), /*#__PURE__*/jsxRuntime.jsx(SwitchCircle, {
|
|
4922
4996
|
checked: checked
|
|
4923
4997
|
})]
|
|
4924
4998
|
})]
|
|
@@ -4929,16 +5003,17 @@ const Switch = /*#__PURE__*/react$1.forwardRef(function Switch(props, forwardedR
|
|
|
4929
5003
|
const {
|
|
4930
5004
|
as = 'input',
|
|
4931
5005
|
disabled,
|
|
4932
|
-
children
|
|
4933
|
-
|
|
4934
|
-
|
|
5006
|
+
children,
|
|
5007
|
+
...otherProps
|
|
5008
|
+
} = props;
|
|
4935
5009
|
|
|
4936
|
-
const inner = /*#__PURE__*/jsxRuntime.jsx(CheckBoxCore,
|
|
5010
|
+
const inner = /*#__PURE__*/jsxRuntime.jsx(CheckBoxCore, {
|
|
4937
5011
|
as: SwitchInner,
|
|
4938
5012
|
innerAs: as,
|
|
4939
5013
|
ref: forwardedRef,
|
|
4940
|
-
disabled: disabled
|
|
4941
|
-
|
|
5014
|
+
disabled: disabled,
|
|
5015
|
+
...otherProps
|
|
5016
|
+
});
|
|
4942
5017
|
|
|
4943
5018
|
if (!children) {
|
|
4944
5019
|
return inner;
|
|
@@ -4967,10 +5042,9 @@ const TabIndicator = /*#__PURE__*/react$1.forwardRef(function TabIndicator(props
|
|
|
4967
5042
|
const {
|
|
4968
5043
|
as = 'span',
|
|
4969
5044
|
selected,
|
|
4970
|
-
color = 'primary'
|
|
4971
|
-
|
|
4972
|
-
|
|
4973
|
-
|
|
5045
|
+
color = 'primary',
|
|
5046
|
+
...otherProps
|
|
5047
|
+
} = props;
|
|
4974
5048
|
const ref = react$1.useRef(null);
|
|
4975
5049
|
const {
|
|
4976
5050
|
currentIndicator
|
|
@@ -4997,7 +5071,7 @@ const TabIndicator = /*#__PURE__*/react$1.forwardRef(function TabIndicator(props
|
|
|
4997
5071
|
currentIndicator.current = ref.current;
|
|
4998
5072
|
}
|
|
4999
5073
|
}, [selected]);
|
|
5000
|
-
return /*#__PURE__*/jsxRuntime.jsx(Box,
|
|
5074
|
+
return /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
5001
5075
|
as: as,
|
|
5002
5076
|
ref: core.assignMultipleRefs(ref, forwardedRef),
|
|
5003
5077
|
width: "100%",
|
|
@@ -5009,10 +5083,11 @@ const TabIndicator = /*#__PURE__*/react$1.forwardRef(function TabIndicator(props
|
|
|
5009
5083
|
transform: `scale(1)`,
|
|
5010
5084
|
opacity: selected ? 1 : 0,
|
|
5011
5085
|
transformOrigin: 'left',
|
|
5012
|
-
transition:
|
|
5086
|
+
transition: `transform .25s ${EASING_STANDARD}`,
|
|
5013
5087
|
zIndex: 1
|
|
5014
|
-
}
|
|
5015
|
-
|
|
5088
|
+
},
|
|
5089
|
+
...otherProps
|
|
5090
|
+
});
|
|
5016
5091
|
});
|
|
5017
5092
|
|
|
5018
5093
|
const TabListContext = /*#__PURE__*/react$1.createContext({
|
|
@@ -5026,29 +5101,28 @@ const useTabListContext = () => react$1.useContext(TabListContext);
|
|
|
5026
5101
|
|
|
5027
5102
|
const TabListInner = /*#__PURE__*/react$1.forwardRef(function TabListInner(props, forwardedRef) {
|
|
5028
5103
|
const {
|
|
5029
|
-
innerAs
|
|
5030
|
-
|
|
5031
|
-
|
|
5032
|
-
|
|
5033
|
-
return /*#__PURE__*/jsxRuntime.jsx(Box, _extends__default['default']({
|
|
5104
|
+
innerAs,
|
|
5105
|
+
...otherProps
|
|
5106
|
+
} = props;
|
|
5107
|
+
return /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
5034
5108
|
as: innerAs,
|
|
5035
5109
|
ref: forwardedRef,
|
|
5036
5110
|
__css: {
|
|
5037
5111
|
minWidth: "22.5rem",
|
|
5038
5112
|
display: 'flex',
|
|
5039
5113
|
alignItems: 'center'
|
|
5040
|
-
}
|
|
5041
|
-
|
|
5114
|
+
},
|
|
5115
|
+
...otherProps
|
|
5116
|
+
});
|
|
5042
5117
|
});
|
|
5043
5118
|
const TabList = /*#__PURE__*/react$1.forwardRef(function TabList(props, forwardedRef) {
|
|
5044
5119
|
const {
|
|
5045
5120
|
as = 'div',
|
|
5046
5121
|
indicatorColor = 'primary',
|
|
5047
5122
|
textColor = 'on.surface',
|
|
5048
|
-
selectedTextColor
|
|
5049
|
-
|
|
5050
|
-
|
|
5051
|
-
|
|
5123
|
+
selectedTextColor,
|
|
5124
|
+
...otherProps
|
|
5125
|
+
} = props;
|
|
5052
5126
|
const currentIndicator = react$1.useRef(null);
|
|
5053
5127
|
return /*#__PURE__*/jsxRuntime.jsx(TabListProvider, {
|
|
5054
5128
|
value: {
|
|
@@ -5060,11 +5134,12 @@ const TabList = /*#__PURE__*/react$1.forwardRef(function TabList(props, forwarde
|
|
|
5060
5134
|
value: {
|
|
5061
5135
|
currentIndicator
|
|
5062
5136
|
},
|
|
5063
|
-
children: /*#__PURE__*/jsxRuntime.jsx(core.TabList,
|
|
5137
|
+
children: /*#__PURE__*/jsxRuntime.jsx(core.TabList, {
|
|
5064
5138
|
as: TabListInner,
|
|
5065
5139
|
innerAs: as,
|
|
5066
|
-
ref: forwardedRef
|
|
5067
|
-
|
|
5140
|
+
ref: forwardedRef,
|
|
5141
|
+
...otherProps
|
|
5142
|
+
})
|
|
5068
5143
|
})
|
|
5069
5144
|
});
|
|
5070
5145
|
});
|
|
@@ -5074,10 +5149,9 @@ const TabInner = /*#__PURE__*/react$1.forwardRef(function Tab(props, forwardedRe
|
|
|
5074
5149
|
innerAs,
|
|
5075
5150
|
selected,
|
|
5076
5151
|
children,
|
|
5077
|
-
disabled
|
|
5078
|
-
|
|
5079
|
-
|
|
5080
|
-
|
|
5152
|
+
disabled,
|
|
5153
|
+
...otherProps
|
|
5154
|
+
} = props;
|
|
5081
5155
|
const {
|
|
5082
5156
|
textColor,
|
|
5083
5157
|
indicatorColor,
|
|
@@ -5086,9 +5160,9 @@ const TabInner = /*#__PURE__*/react$1.forwardRef(function Tab(props, forwardedRe
|
|
|
5086
5160
|
return /*#__PURE__*/jsxRuntime.jsxs(Box, {
|
|
5087
5161
|
position: "relative",
|
|
5088
5162
|
display: "flex",
|
|
5089
|
-
|
|
5163
|
+
flex: 1,
|
|
5090
5164
|
flexDirection: "column",
|
|
5091
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(RippleBox,
|
|
5165
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(RippleBox, {
|
|
5092
5166
|
as: innerAs,
|
|
5093
5167
|
ref: forwardedRef,
|
|
5094
5168
|
rippleColor: indicatorColor,
|
|
@@ -5105,17 +5179,17 @@ const TabInner = /*#__PURE__*/react$1.forwardRef(function Tab(props, forwardedRe
|
|
|
5105
5179
|
},
|
|
5106
5180
|
width: '100%',
|
|
5107
5181
|
alignItems: 'center'
|
|
5108
|
-
}
|
|
5109
|
-
|
|
5182
|
+
},
|
|
5183
|
+
...otherProps,
|
|
5110
5184
|
children: /*#__PURE__*/jsxRuntime.jsx(Text, {
|
|
5111
5185
|
as: "span",
|
|
5112
|
-
variant: "
|
|
5186
|
+
variant: "label-large",
|
|
5113
5187
|
color: "inherit",
|
|
5114
5188
|
height: "100%",
|
|
5115
5189
|
textAlign: "center",
|
|
5116
5190
|
children: children
|
|
5117
5191
|
})
|
|
5118
|
-
})
|
|
5192
|
+
}), /*#__PURE__*/jsxRuntime.jsx(TabIndicator, {
|
|
5119
5193
|
selected: selected,
|
|
5120
5194
|
color: indicatorColor
|
|
5121
5195
|
})]
|
|
@@ -5123,59 +5197,58 @@ const TabInner = /*#__PURE__*/react$1.forwardRef(function Tab(props, forwardedRe
|
|
|
5123
5197
|
});
|
|
5124
5198
|
const Tab = /*#__PURE__*/react$1.forwardRef(function Tab(props, forwardedRef) {
|
|
5125
5199
|
const {
|
|
5126
|
-
as = 'button'
|
|
5127
|
-
|
|
5128
|
-
|
|
5129
|
-
|
|
5130
|
-
return /*#__PURE__*/jsxRuntime.jsx(core.Tab, _extends__default['default']({
|
|
5200
|
+
as = 'button',
|
|
5201
|
+
...otherProps
|
|
5202
|
+
} = props;
|
|
5203
|
+
return /*#__PURE__*/jsxRuntime.jsx(core.Tab, {
|
|
5131
5204
|
as: TabInner,
|
|
5132
5205
|
innerAs: as,
|
|
5133
|
-
ref: forwardedRef
|
|
5134
|
-
|
|
5206
|
+
ref: forwardedRef,
|
|
5207
|
+
...otherProps
|
|
5208
|
+
});
|
|
5135
5209
|
});
|
|
5136
5210
|
|
|
5137
5211
|
const TabPanelInner = /*#__PURE__*/react$1.forwardRef(function TabPanelInner(props, forwardedRef) {
|
|
5138
5212
|
const {
|
|
5139
|
-
innerAs
|
|
5140
|
-
|
|
5141
|
-
|
|
5142
|
-
|
|
5143
|
-
return /*#__PURE__*/jsxRuntime.jsx(Box, _extends__default['default']({
|
|
5213
|
+
innerAs,
|
|
5214
|
+
...otherProps
|
|
5215
|
+
} = props;
|
|
5216
|
+
return /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
5144
5217
|
as: innerAs,
|
|
5145
|
-
ref: forwardedRef
|
|
5146
|
-
|
|
5218
|
+
ref: forwardedRef,
|
|
5219
|
+
...otherProps
|
|
5220
|
+
});
|
|
5147
5221
|
});
|
|
5148
5222
|
const TabPanel = /*#__PURE__*/react$1.forwardRef(function TabPanel(props, forwardedRef) {
|
|
5149
5223
|
const {
|
|
5150
|
-
as = 'div'
|
|
5151
|
-
|
|
5152
|
-
|
|
5153
|
-
|
|
5154
|
-
return /*#__PURE__*/jsxRuntime.jsx(core.TabPanel, _extends__default['default']({
|
|
5224
|
+
as = 'div',
|
|
5225
|
+
...otherProps
|
|
5226
|
+
} = props;
|
|
5227
|
+
return /*#__PURE__*/jsxRuntime.jsx(core.TabPanel, {
|
|
5155
5228
|
as: TabPanelInner,
|
|
5156
5229
|
innerAs: as,
|
|
5157
|
-
ref: forwardedRef
|
|
5158
|
-
|
|
5230
|
+
ref: forwardedRef,
|
|
5231
|
+
...otherProps
|
|
5232
|
+
});
|
|
5159
5233
|
});
|
|
5160
5234
|
|
|
5161
5235
|
const Table = /*#__PURE__*/react$1.forwardRef((props, ref) => {
|
|
5162
5236
|
const {
|
|
5163
5237
|
children,
|
|
5164
|
-
elevation = 1
|
|
5165
|
-
|
|
5166
|
-
|
|
5167
|
-
|
|
5168
|
-
return /*#__PURE__*/jsxRuntime.jsx(Paper, _extends__default['default']({
|
|
5238
|
+
elevation = 1,
|
|
5239
|
+
...rest
|
|
5240
|
+
} = props;
|
|
5241
|
+
return /*#__PURE__*/jsxRuntime.jsx(Paper, {
|
|
5169
5242
|
ref: ref,
|
|
5170
5243
|
role: "table",
|
|
5171
5244
|
display: "flex",
|
|
5172
5245
|
width: "100%",
|
|
5173
5246
|
flexDirection: "column",
|
|
5174
5247
|
elevation: elevation,
|
|
5175
|
-
darkThemeBackgroundOverlay: elevation
|
|
5176
|
-
|
|
5248
|
+
darkThemeBackgroundOverlay: elevation,
|
|
5249
|
+
...rest,
|
|
5177
5250
|
children: children
|
|
5178
|
-
})
|
|
5251
|
+
});
|
|
5179
5252
|
});
|
|
5180
5253
|
|
|
5181
5254
|
const TableHeadContext = /*#__PURE__*/react$1.createContext(false);
|
|
@@ -5186,146 +5259,135 @@ const useTableHeadContext = () => react$1.useContext(TableHeadContext);
|
|
|
5186
5259
|
|
|
5187
5260
|
const TableBody = /*#__PURE__*/react$1.forwardRef((props, ref) => {
|
|
5188
5261
|
const {
|
|
5189
|
-
children
|
|
5190
|
-
|
|
5191
|
-
|
|
5192
|
-
|
|
5193
|
-
return /*#__PURE__*/jsxRuntime.jsx(Box, _extends__default['default']({
|
|
5262
|
+
children,
|
|
5263
|
+
...rest
|
|
5264
|
+
} = props;
|
|
5265
|
+
return /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
5194
5266
|
ref: ref,
|
|
5195
|
-
role: "rowgroup"
|
|
5196
|
-
|
|
5267
|
+
role: "rowgroup",
|
|
5268
|
+
...rest,
|
|
5197
5269
|
children: children
|
|
5198
|
-
})
|
|
5270
|
+
});
|
|
5199
5271
|
});
|
|
5200
5272
|
|
|
5201
5273
|
const TableHead = /*#__PURE__*/react$1.forwardRef((props, ref) => {
|
|
5202
5274
|
const {
|
|
5203
5275
|
children,
|
|
5204
|
-
__css
|
|
5205
|
-
|
|
5206
|
-
|
|
5207
|
-
|
|
5208
|
-
return /*#__PURE__*/jsxRuntime.jsx(TableBody, _extends__default['default']({
|
|
5276
|
+
__css,
|
|
5277
|
+
...rest
|
|
5278
|
+
} = props;
|
|
5279
|
+
return /*#__PURE__*/jsxRuntime.jsx(TableBody, {
|
|
5209
5280
|
ref: ref,
|
|
5210
|
-
__css:
|
|
5281
|
+
__css: {
|
|
5211
5282
|
borderBottomStyle: 'solid',
|
|
5212
5283
|
borderBottomWidth: "0.0625rem",
|
|
5213
|
-
borderBottomColor: alpha('on.surface', 0.12)
|
|
5214
|
-
|
|
5215
|
-
|
|
5284
|
+
borderBottomColor: alpha('on.surface', 0.12),
|
|
5285
|
+
...__css
|
|
5286
|
+
},
|
|
5287
|
+
...rest,
|
|
5216
5288
|
children: /*#__PURE__*/jsxRuntime.jsx(TableHeadProvider, {
|
|
5217
5289
|
value: true,
|
|
5218
5290
|
children: children
|
|
5219
5291
|
})
|
|
5220
|
-
})
|
|
5292
|
+
});
|
|
5221
5293
|
});
|
|
5222
5294
|
|
|
5223
5295
|
const TableCell = /*#__PURE__*/react$1.forwardRef((props, ref) => {
|
|
5224
5296
|
const {
|
|
5225
5297
|
children,
|
|
5226
|
-
__css
|
|
5227
|
-
|
|
5228
|
-
|
|
5229
|
-
|
|
5298
|
+
__css,
|
|
5299
|
+
...rest
|
|
5300
|
+
} = props;
|
|
5230
5301
|
const isHeadCell = useTableHeadContext();
|
|
5231
|
-
return /*#__PURE__*/jsxRuntime.jsx(Box,
|
|
5302
|
+
return /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
5232
5303
|
ref: ref,
|
|
5233
5304
|
px: 1,
|
|
5234
5305
|
py: 3,
|
|
5235
5306
|
role: isHeadCell ? 'columnheader' : 'cell',
|
|
5236
|
-
__css:
|
|
5307
|
+
__css: {
|
|
5237
5308
|
whiteSpace: 'nowrap',
|
|
5238
5309
|
overflow: 'hidden',
|
|
5239
5310
|
textOverflow: 'ellipsis',
|
|
5240
5311
|
fontWeight: isHeadCell ? 'medium' : undefined,
|
|
5241
|
-
color: 'on.surface'
|
|
5242
|
-
|
|
5243
|
-
|
|
5312
|
+
color: 'on.surface',
|
|
5313
|
+
...__css
|
|
5314
|
+
},
|
|
5315
|
+
...rest,
|
|
5244
5316
|
children: children
|
|
5245
|
-
})
|
|
5317
|
+
});
|
|
5246
5318
|
});
|
|
5247
5319
|
|
|
5248
5320
|
const TableRow = /*#__PURE__*/react$1.forwardRef((props, ref) => {
|
|
5249
5321
|
const {
|
|
5250
5322
|
children,
|
|
5251
|
-
__css
|
|
5252
|
-
|
|
5253
|
-
|
|
5254
|
-
|
|
5255
|
-
return /*#__PURE__*/jsxRuntime.jsx(Text, _extends__default['default']({
|
|
5323
|
+
__css,
|
|
5324
|
+
...rest
|
|
5325
|
+
} = props;
|
|
5326
|
+
return /*#__PURE__*/jsxRuntime.jsx(Text, {
|
|
5256
5327
|
ref: ref,
|
|
5257
5328
|
as: "div",
|
|
5258
5329
|
role: "row",
|
|
5259
5330
|
display: "flex",
|
|
5260
5331
|
flexDirection: "row",
|
|
5261
5332
|
width: "100%",
|
|
5262
|
-
variant: "
|
|
5333
|
+
variant: "body-medium",
|
|
5263
5334
|
px: 2,
|
|
5264
|
-
__css:
|
|
5335
|
+
__css: {
|
|
5265
5336
|
borderBottomStyle: 'solid',
|
|
5266
5337
|
borderBottomWidth: "0.0625rem",
|
|
5267
5338
|
borderBottomColor: alpha('on.surface', 0.12),
|
|
5268
5339
|
'&:last-of-type': {
|
|
5269
5340
|
borderBottom: 'none'
|
|
5270
|
-
}
|
|
5271
|
-
|
|
5272
|
-
|
|
5341
|
+
},
|
|
5342
|
+
...__css
|
|
5343
|
+
},
|
|
5344
|
+
...rest,
|
|
5273
5345
|
children: children
|
|
5274
|
-
})
|
|
5346
|
+
});
|
|
5275
5347
|
});
|
|
5276
5348
|
|
|
5277
5349
|
const BaseTooltip = core.Tooltip;
|
|
5278
5350
|
const Tooltip = /*#__PURE__*/react$1.forwardRef(function Tooltip(props, forwardedRef) {
|
|
5279
5351
|
const {
|
|
5280
5352
|
placement = 'bottom',
|
|
5281
|
-
__css
|
|
5282
|
-
|
|
5283
|
-
|
|
5284
|
-
|
|
5285
|
-
return /*#__PURE__*/jsxRuntime.jsx(BaseTooltip, _extends__default['default']({
|
|
5353
|
+
__css,
|
|
5354
|
+
...otherProps
|
|
5355
|
+
} = props;
|
|
5356
|
+
return /*#__PURE__*/jsxRuntime.jsx(BaseTooltip, {
|
|
5286
5357
|
as: core.Popper,
|
|
5287
5358
|
innerAs: Box,
|
|
5288
5359
|
ref: forwardedRef,
|
|
5289
5360
|
placement: placement,
|
|
5290
5361
|
distance: 8,
|
|
5291
|
-
__css:
|
|
5362
|
+
__css: {
|
|
5363
|
+
variant: ['text.body-medium', 'text.body-small'],
|
|
5292
5364
|
bg: alpha('#616161', 0.9),
|
|
5293
5365
|
color: '#fff',
|
|
5294
|
-
|
|
5295
|
-
|
|
5296
|
-
|
|
5297
|
-
|
|
5298
|
-
|
|
5299
|
-
|
|
5300
|
-
|
|
5301
|
-
|
|
5302
|
-
}, __css)
|
|
5303
|
-
}, otherProps));
|
|
5366
|
+
px: 2,
|
|
5367
|
+
py: 1,
|
|
5368
|
+
borderRadius: 'extra-small',
|
|
5369
|
+
zIndex: 'tooltip',
|
|
5370
|
+
...__css
|
|
5371
|
+
},
|
|
5372
|
+
...otherProps
|
|
5373
|
+
});
|
|
5304
5374
|
});
|
|
5305
5375
|
|
|
5306
5376
|
Object.defineProperty(exports, 'Menu', {
|
|
5307
5377
|
enumerable: true,
|
|
5308
|
-
get: function () {
|
|
5309
|
-
return core.Menu;
|
|
5310
|
-
}
|
|
5378
|
+
get: function () { return core.Menu; }
|
|
5311
5379
|
});
|
|
5312
5380
|
Object.defineProperty(exports, 'TabPanels', {
|
|
5313
5381
|
enumerable: true,
|
|
5314
|
-
get: function () {
|
|
5315
|
-
return core.TabPanels;
|
|
5316
|
-
}
|
|
5382
|
+
get: function () { return core.TabPanels; }
|
|
5317
5383
|
});
|
|
5318
5384
|
Object.defineProperty(exports, 'Tabs', {
|
|
5319
5385
|
enumerable: true,
|
|
5320
|
-
get: function () {
|
|
5321
|
-
return core.Tabs;
|
|
5322
|
-
}
|
|
5386
|
+
get: function () { return core.Tabs; }
|
|
5323
5387
|
});
|
|
5324
5388
|
Object.defineProperty(exports, 'useComboBoxContext', {
|
|
5325
5389
|
enumerable: true,
|
|
5326
|
-
get: function () {
|
|
5327
|
-
return core.useComboBoxContext;
|
|
5328
|
-
}
|
|
5390
|
+
get: function () { return core.useComboBoxContext; }
|
|
5329
5391
|
});
|
|
5330
5392
|
exports.Alert = Alert;
|
|
5331
5393
|
exports.AppBar = AppBar;
|
|
@@ -5340,8 +5402,6 @@ exports.ButtonGroup = ButtonGroup;
|
|
|
5340
5402
|
exports.CheckBox = CheckBox;
|
|
5341
5403
|
exports.Chip = ButtonChip;
|
|
5342
5404
|
exports.ChoiceChip = ChoiceChip;
|
|
5343
|
-
exports.ColorModeContext = ColorModeContext;
|
|
5344
|
-
exports.ColorModeProvider = ColorModeProvider;
|
|
5345
5405
|
exports.Combobox = Combobox;
|
|
5346
5406
|
exports.ComboboxButton = ComboboxButton;
|
|
5347
5407
|
exports.ComboboxInput = ComboboxInput;
|
|
@@ -5349,11 +5409,16 @@ exports.ComboboxLabel = ComboboxLabel;
|
|
|
5349
5409
|
exports.ComboboxList = ComboboxList;
|
|
5350
5410
|
exports.ComboboxOption = ComboboxOption;
|
|
5351
5411
|
exports.ComboboxPopover = ComboboxPopover;
|
|
5352
|
-
exports.DARK_THEME_CLASS = DARK_THEME_CLASS;
|
|
5353
|
-
exports.DEFAULT_THEME_CLASS = DEFAULT_THEME_CLASS;
|
|
5354
5412
|
exports.DelayAppearance = DelayAppearance;
|
|
5355
5413
|
exports.Dialog = Dialog;
|
|
5356
5414
|
exports.Divider = Divider;
|
|
5415
|
+
exports.EASING_EMPHASIZED = EASING_EMPHASIZED;
|
|
5416
|
+
exports.EASING_EMPHASIZED_ACCELERATE = EASING_EMPHASIZED_ACCELERATE;
|
|
5417
|
+
exports.EASING_EMPHASIZED_DECELERATE = EASING_EMPHASIZED_DECELERATE;
|
|
5418
|
+
exports.EASING_LINEAR = EASING_LINEAR;
|
|
5419
|
+
exports.EASING_STANDARD = EASING_STANDARD;
|
|
5420
|
+
exports.EASING_STANDARD_ACCELERATE = EASING_STANDARD_ACCELERATE;
|
|
5421
|
+
exports.EASING_STANDARD_DECELERATE = EASING_STANDARD_DECELERATE;
|
|
5357
5422
|
exports.FilledContainer = FilledContainer;
|
|
5358
5423
|
exports.FloatingLabel = FloatingLabel;
|
|
5359
5424
|
exports.HelperText = HelperText;
|
|
@@ -5366,6 +5431,9 @@ exports.MenuButton = MenuButton;
|
|
|
5366
5431
|
exports.MenuItem = MenuItem;
|
|
5367
5432
|
exports.MenuList = MenuList;
|
|
5368
5433
|
exports.MenuPopover = MenuPopover;
|
|
5434
|
+
exports.NavRailIndicator = NavRailIndicator;
|
|
5435
|
+
exports.NavRailItem = NavRailItem;
|
|
5436
|
+
exports.NavRailLabel = NavRailLabel;
|
|
5369
5437
|
exports.NotchedOutline = NotchedOutline;
|
|
5370
5438
|
exports.OutlinedContainer = OutlinedContainer;
|
|
5371
5439
|
exports.Paper = Paper;
|
|
@@ -5380,7 +5448,6 @@ exports.Skeleton = Skeleton;
|
|
|
5380
5448
|
exports.Snackbar = Snackbar;
|
|
5381
5449
|
exports.StackProvider = StackProvider;
|
|
5382
5450
|
exports.Switch = Switch;
|
|
5383
|
-
exports.THEME_LOCAL_STORAGE_KEY = THEME_LOCAL_STORAGE_KEY;
|
|
5384
5451
|
exports.Tab = Tab;
|
|
5385
5452
|
exports.TabIndicator = TabIndicator;
|
|
5386
5453
|
exports.TabIndicatorProvider = TabIndicatorProvider;
|
|
@@ -5400,12 +5467,11 @@ exports.base = base;
|
|
|
5400
5467
|
exports.getBackgroundOverlay = getBackgroundOverlay;
|
|
5401
5468
|
exports.getColorOverlay = getColorOverlay;
|
|
5402
5469
|
exports.getDarkThemeBackgroundOverlay = getDarkThemeBackgroundOverlay;
|
|
5403
|
-
exports.
|
|
5470
|
+
exports.mixColor = mixColor;
|
|
5404
5471
|
exports.rippleStyle = rippleStyle;
|
|
5405
5472
|
exports.sx = sx;
|
|
5406
5473
|
exports.theme = theme;
|
|
5407
5474
|
exports.useAppBarContext = useAppBarContext;
|
|
5408
|
-
exports.useColorMode = useColorMode;
|
|
5409
5475
|
exports.useRipple = useRipple;
|
|
5410
5476
|
exports.useRippleHandlers = useRippleHandlers;
|
|
5411
5477
|
exports.useRippleSurface = useRippleSurface;
|