@basic-ui/material 1.0.0-alpha.0 → 1.0.0-alpha.11
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 +1383 -1313
- package/build/cjs/index.js.map +1 -1
- package/build/esm/Alert/Alert.d.ts +2 -2
- package/build/esm/Alert/Alert.js +10 -9
- package/build/esm/Alert/Alert.js.map +1 -1
- package/build/esm/Alert/index.d.ts +0 -0
- package/build/esm/Alert/index.js.map +1 -1
- package/build/esm/AppBar/AppBar.d.ts +4 -4
- package/build/esm/AppBar/AppBar.js +28 -19
- package/build/esm/AppBar/AppBar.js.map +1 -1
- package/build/esm/AppBar/AppBarButton.d.ts +2 -2
- package/build/esm/AppBar/AppBarButton.js +9 -9
- package/build/esm/AppBar/AppBarButton.js.map +1 -1
- package/build/esm/AppBar/context.d.ts +1 -1
- package/build/esm/AppBar/context.js +6 -5
- package/build/esm/AppBar/context.js.map +1 -1
- package/build/esm/AppBar/index.d.ts +0 -0
- package/build/esm/AppBar/index.js.map +1 -1
- package/build/esm/Badge/Badge.d.ts +2 -2
- package/build/esm/Badge/Badge.js +2 -2
- package/build/esm/Badge/Badge.js.map +1 -1
- package/build/esm/Badge/index.d.ts +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 +4 -4
- package/build/esm/BaseLine/BaseLine.js.map +1 -1
- package/build/esm/BaseLine/index.d.ts +0 -0
- package/build/esm/BaseLine/index.js.map +1 -1
- package/build/esm/BottomSheet/BottomSheet.d.ts +2 -2
- package/build/esm/BottomSheet/BottomSheet.js +12 -13
- package/build/esm/BottomSheet/BottomSheet.js.map +1 -1
- package/build/esm/BottomSheet/BottomSheetSurface.d.ts +4 -4
- package/build/esm/BottomSheet/BottomSheetSurface.js +9 -9
- package/build/esm/BottomSheet/BottomSheetSurface.js.map +1 -1
- package/build/esm/BottomSheet/index.d.ts +0 -0
- package/build/esm/BottomSheet/index.js.map +1 -1
- package/build/esm/Box/Box.d.ts +8 -8
- package/build/esm/Box/Box.js +26 -19
- package/build/esm/Box/Box.js.map +1 -1
- package/build/esm/Box/index.d.ts +0 -0
- package/build/esm/Box/index.js.map +1 -1
- package/build/esm/Button/BaseButton.d.ts +4 -4
- package/build/esm/Button/BaseButton.js +14 -15
- package/build/esm/Button/BaseButton.js.map +1 -1
- package/build/esm/Button/Button.d.ts +5 -5
- package/build/esm/Button/Button.js +29 -24
- package/build/esm/Button/Button.js.map +1 -1
- package/build/esm/Button/ButtonGroup.d.ts +4 -4
- package/build/esm/Button/ButtonGroup.js +17 -13
- package/build/esm/Button/ButtonGroup.js.map +1 -1
- package/build/esm/Button/FilledButton.d.ts +2 -2
- package/build/esm/Button/FilledButton.js +57 -51
- package/build/esm/Button/FilledButton.js.map +1 -1
- package/build/esm/Button/FloatingActionButton.d.ts +1 -1
- package/build/esm/Button/FloatingActionButton.js +1 -1
- package/build/esm/Button/FloatingActionButton.js.map +1 -1
- package/build/esm/Button/IconButton.d.ts +1 -1
- package/build/esm/Button/IconButton.js +1 -1
- package/build/esm/Button/IconButton.js.map +1 -1
- package/build/esm/Button/OutlinedButton.d.ts +1 -1
- package/build/esm/Button/OutlinedButton.js +27 -25
- package/build/esm/Button/OutlinedButton.js.map +1 -1
- package/build/esm/Button/TransparentButton.d.ts +2 -2
- package/build/esm/Button/TransparentButton.js +45 -41
- package/build/esm/Button/TransparentButton.js.map +1 -1
- package/build/esm/Button/context.js +4 -2
- package/build/esm/Button/context.js.map +1 -1
- package/build/esm/Button/index.d.ts +0 -0
- package/build/esm/Button/index.js.map +1 -1
- package/build/esm/CheckBox/CheckBox.d.ts +6 -6
- package/build/esm/CheckBox/CheckBox.js +45 -37
- package/build/esm/CheckBox/CheckBox.js.map +1 -1
- package/build/esm/CheckBox/CheckBoxIcon.d.ts +5 -5
- package/build/esm/CheckBox/CheckBoxIcon.js +19 -16
- package/build/esm/CheckBox/CheckBoxIcon.js.map +1 -1
- package/build/esm/CheckBox/CheckPath.d.ts +0 -1
- package/build/esm/CheckBox/CheckPath.js +15 -14
- package/build/esm/CheckBox/CheckPath.js.map +1 -1
- package/build/esm/CheckBox/IndeterminatePath.d.ts +0 -1
- package/build/esm/CheckBox/IndeterminatePath.js +14 -13
- package/build/esm/CheckBox/IndeterminatePath.js.map +1 -1
- package/build/esm/CheckBox/index.d.ts +0 -0
- package/build/esm/CheckBox/index.js.map +1 -1
- package/build/esm/Chip/ButtonChip.d.ts +5 -5
- package/build/esm/Chip/ButtonChip.js +17 -17
- package/build/esm/Chip/ButtonChip.js.map +1 -1
- package/build/esm/Chip/Chip.d.ts +0 -0
- package/build/esm/Chip/Chip.js.map +1 -1
- package/build/esm/Chip/ChipBase.d.ts +4 -4
- package/build/esm/Chip/ChipBase.js +31 -26
- package/build/esm/Chip/ChipBase.js.map +1 -1
- package/build/esm/Chip/ChoiceChip.d.ts +6 -6
- package/build/esm/Chip/ChoiceChip.js +28 -28
- package/build/esm/Chip/ChoiceChip.js.map +1 -1
- package/build/esm/Chip/index.d.ts +0 -0
- package/build/esm/Chip/index.js.map +1 -1
- package/build/esm/Combobox/Combobox.d.ts +20 -20
- package/build/esm/Combobox/Combobox.js +62 -60
- package/build/esm/Combobox/Combobox.js.map +1 -1
- package/build/esm/Combobox/index.d.ts +0 -0
- package/build/esm/Combobox/index.js.map +1 -1
- package/build/esm/Dialog/Dialog.d.ts +5 -5
- package/build/esm/Dialog/Dialog.js +27 -27
- package/build/esm/Dialog/Dialog.js.map +1 -1
- package/build/esm/Dialog/DialogBackdrop.d.ts +4 -4
- package/build/esm/Dialog/DialogBackdrop.js +10 -11
- package/build/esm/Dialog/DialogBackdrop.js.map +1 -1
- package/build/esm/Dialog/DialogContainer.d.ts +1 -1
- package/build/esm/Dialog/DialogContainer.js +5 -6
- package/build/esm/Dialog/DialogContainer.js.map +1 -1
- package/build/esm/Dialog/DialogSurface.d.ts +4 -4
- package/build/esm/Dialog/DialogSurface.js +15 -15
- package/build/esm/Dialog/DialogSurface.js.map +1 -1
- package/build/esm/Dialog/Scrim.d.ts +1 -1
- package/build/esm/Dialog/Scrim.js +5 -6
- 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 +22 -21
- package/build/esm/Dialog/useDialogAnimation.js.map +1 -1
- package/build/esm/Divider/Divider.d.ts +4 -4
- package/build/esm/Divider/Divider.js +14 -13
- package/build/esm/Divider/Divider.js.map +1 -1
- package/build/esm/Divider/index.d.ts +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 +31 -26
- package/build/esm/FloatingLabel/FloatingLabel.js.map +1 -1
- package/build/esm/FloatingLabel/index.d.ts +0 -0
- package/build/esm/FloatingLabel/index.js.map +1 -1
- package/build/esm/LineRipple/LineRipple.d.ts +4 -4
- package/build/esm/LineRipple/LineRipple.js +30 -20
- package/build/esm/LineRipple/LineRipple.js.map +1 -1
- package/build/esm/LineRipple/index.d.ts +0 -0
- package/build/esm/LineRipple/index.js.map +1 -1
- package/build/esm/Link/Link.d.ts +4 -4
- package/build/esm/Link/Link.js +10 -9
- package/build/esm/Link/Link.js.map +1 -1
- package/build/esm/Link/index.d.ts +0 -0
- package/build/esm/Link/index.js.map +1 -1
- package/build/esm/List/List.d.ts +6 -6
- package/build/esm/List/List.js +20 -13
- package/build/esm/List/List.js.map +1 -1
- package/build/esm/List/index.d.ts +0 -0
- package/build/esm/List/index.js.map +1 -1
- package/build/esm/ListItem/ListItem.d.ts +6 -6
- package/build/esm/ListItem/ListItem.js +28 -24
- package/build/esm/ListItem/ListItem.js.map +1 -1
- package/build/esm/ListItem/ListItemText.d.ts +6 -6
- package/build/esm/ListItem/ListItemText.js +11 -11
- package/build/esm/ListItem/ListItemText.js.map +1 -1
- package/build/esm/ListItem/index.d.ts +0 -0
- package/build/esm/ListItem/index.js.map +1 -1
- package/build/esm/Menu/Menu.d.ts +11 -11
- package/build/esm/Menu/Menu.js +30 -27
- package/build/esm/Menu/Menu.js.map +1 -1
- package/build/esm/Menu/animation.d.ts +1 -1
- package/build/esm/Menu/animation.js +1 -1
- package/build/esm/Menu/animation.js.map +1 -1
- package/build/esm/Menu/index.d.ts +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 +27 -23
- package/build/esm/NotchedOutline/NotchedOutline.js.map +1 -1
- package/build/esm/NotchedOutline/context.d.ts +0 -0
- package/build/esm/NotchedOutline/context.js +6 -5
- package/build/esm/NotchedOutline/context.js.map +1 -1
- package/build/esm/NotchedOutline/index.d.ts +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 +54 -58
- package/build/esm/NotchedOutline/styledComponents.js.map +1 -1
- package/build/esm/Paper/Paper.d.ts +6 -5
- package/build/esm/Paper/Paper.js +18 -16
- package/build/esm/Paper/Paper.js.map +1 -1
- package/build/esm/Paper/index.d.ts +0 -0
- package/build/esm/Paper/index.js.map +1 -1
- package/build/esm/ProgressSpinner/ProgressSpinner.d.ts +1 -1
- package/build/esm/ProgressSpinner/ProgressSpinner.js +28 -28
- package/build/esm/ProgressSpinner/ProgressSpinner.js.map +1 -1
- package/build/esm/ProgressSpinner/index.d.ts +0 -0
- package/build/esm/ProgressSpinner/index.js.map +1 -1
- package/build/esm/RadioButton/RadioButton.d.ts +1 -1
- package/build/esm/RadioButton/RadioButton.js +18 -19
- package/build/esm/RadioButton/RadioButton.js.map +1 -1
- package/build/esm/RadioButton/RadioButtonIcon.d.ts +3 -3
- package/build/esm/RadioButton/RadioButtonIcon.js +9 -9
- package/build/esm/RadioButton/RadioButtonIcon.js.map +1 -1
- package/build/esm/RadioButton/RadioGroup.d.ts +3 -3
- package/build/esm/RadioButton/RadioGroup.js +6 -4
- package/build/esm/RadioButton/RadioGroup.js.map +1 -1
- package/build/esm/RadioButton/index.d.ts +0 -0
- package/build/esm/RadioButton/index.js.map +1 -1
- package/build/esm/Ripple/Ripple.d.ts +1 -1
- package/build/esm/Ripple/Ripple.js +21 -20
- package/build/esm/Ripple/Ripple.js.map +1 -1
- package/build/esm/Ripple/RippleBox.d.ts +4 -5
- package/build/esm/Ripple/RippleBox.js +26 -18
- package/build/esm/Ripple/RippleBox.js.map +1 -1
- package/build/esm/Ripple/constants.d.ts +0 -0
- package/build/esm/Ripple/constants.js +7 -7
- package/build/esm/Ripple/constants.js.map +1 -1
- package/build/esm/Ripple/index.d.ts +0 -0
- package/build/esm/Ripple/index.js.map +1 -1
- package/build/esm/Ripple/keyframes.d.ts +1 -1
- package/build/esm/Ripple/keyframes.js +3 -3
- package/build/esm/Ripple/keyframes.js.map +1 -1
- package/build/esm/Ripple/useRipple.d.ts +0 -0
- package/build/esm/Ripple/useRipple.js +57 -50
- package/build/esm/Ripple/useRipple.js.map +1 -1
- package/build/esm/Ripple/useRippleHandlers.d.ts +4 -4
- package/build/esm/Ripple/useRippleHandlers.js +14 -15
- package/build/esm/Ripple/useRippleHandlers.js.map +1 -1
- package/build/esm/Ripple/useRippleSurface.d.ts +5 -5
- package/build/esm/Ripple/useRippleSurface.js +92 -87
- package/build/esm/Ripple/useRippleSurface.js.map +1 -1
- package/build/esm/Select/Select.d.ts +8 -8
- package/build/esm/Select/Select.js +72 -50
- package/build/esm/Select/Select.js.map +1 -1
- package/build/esm/Select/SelectIcon.d.ts +4 -4
- package/build/esm/Select/SelectIcon.js +10 -10
- package/build/esm/Select/SelectIcon.js.map +1 -1
- package/build/esm/Select/context.d.ts +2 -2
- package/build/esm/Select/context.js +7 -6
- package/build/esm/Select/context.js.map +1 -1
- package/build/esm/Select/defaultRender.d.ts +2 -1
- package/build/esm/Select/defaultRender.js +12 -10
- package/build/esm/Select/defaultRender.js.map +1 -1
- package/build/esm/Select/index.d.ts +0 -0
- package/build/esm/Select/index.js.map +1 -1
- package/build/esm/Select/styledComponents.d.ts +10 -10
- package/build/esm/Select/styledComponents.js +20 -21
- package/build/esm/Select/styledComponents.js.map +1 -1
- package/build/esm/SelectItem/SelectItem.d.ts +2 -2
- package/build/esm/SelectItem/SelectItem.js +23 -23
- package/build/esm/SelectItem/SelectItem.js.map +1 -1
- package/build/esm/SelectItem/index.d.ts +0 -0
- package/build/esm/SelectItem/index.js.map +1 -1
- package/build/esm/SelectionControl/SelectionControlLabel.d.ts +6 -6
- package/build/esm/SelectionControl/SelectionControlLabel.js +7 -7
- package/build/esm/SelectionControl/SelectionControlLabel.js.map +1 -1
- package/build/esm/SelectionControl/SelectionControlText.d.ts +5 -5
- package/build/esm/SelectionControl/SelectionControlText.js +10 -10
- package/build/esm/SelectionControl/SelectionControlText.js.map +1 -1
- package/build/esm/SelectionControl/index.d.ts +0 -0
- package/build/esm/SelectionControl/index.js.map +1 -1
- package/build/esm/Skeleton/DelayAppearance.d.ts +5 -5
- package/build/esm/Skeleton/DelayAppearance.js +9 -9
- package/build/esm/Skeleton/DelayAppearance.js.map +1 -1
- package/build/esm/Skeleton/Skeleton.d.ts +7 -7
- package/build/esm/Skeleton/Skeleton.js +13 -12
- package/build/esm/Skeleton/Skeleton.js.map +1 -1
- package/build/esm/Skeleton/animation.d.ts +2 -2
- package/build/esm/Skeleton/animation.js +25 -22
- package/build/esm/Skeleton/animation.js.map +1 -1
- package/build/esm/Skeleton/index.d.ts +0 -0
- package/build/esm/Skeleton/index.js.map +1 -1
- package/build/esm/Snackbar/Snackbar.d.ts +4 -4
- package/build/esm/Snackbar/Snackbar.js +28 -28
- package/build/esm/Snackbar/Snackbar.js.map +1 -1
- package/build/esm/Snackbar/Stack.d.ts +2 -4
- package/build/esm/Snackbar/Stack.js +80 -66
- package/build/esm/Snackbar/Stack.js.map +1 -1
- package/build/esm/Snackbar/index.d.ts +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 +121 -85
- package/build/esm/Snackbar/useSnackbarAnimation.js.map +1 -1
- package/build/esm/Switch/Switch.d.ts +5 -6
- package/build/esm/Switch/Switch.js +24 -24
- package/build/esm/Switch/Switch.js.map +1 -1
- package/build/esm/Switch/index.d.ts +0 -0
- package/build/esm/Switch/index.js.map +1 -1
- package/build/esm/Switch/styledComponents.d.ts +0 -0
- package/build/esm/Switch/styledComponents.js +28 -26
- package/build/esm/Switch/styledComponents.js.map +1 -1
- package/build/esm/Tab/Tab.d.ts +5 -5
- package/build/esm/Tab/Tab.js +22 -23
- package/build/esm/Tab/Tab.js.map +1 -1
- package/build/esm/Tab/TabList.d.ts +3 -3
- package/build/esm/Tab/TabList.js +20 -19
- package/build/esm/Tab/TabList.js.map +1 -1
- package/build/esm/Tab/TabPanel.d.ts +3 -3
- package/build/esm/Tab/TabPanel.js +10 -11
- package/build/esm/Tab/TabPanel.js.map +1 -1
- package/build/esm/Tab/TabPanels.d.ts +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.map +1 -1
- package/build/esm/Tab/context.d.ts +0 -0
- package/build/esm/Tab/context.js +6 -5
- package/build/esm/Tab/context.js.map +1 -1
- package/build/esm/Tab/index.d.ts +0 -0
- package/build/esm/Tab/index.js.map +1 -1
- package/build/esm/TabIndicator/TabIndicator.d.ts +2 -2
- package/build/esm/TabIndicator/TabIndicator.js +25 -22
- package/build/esm/TabIndicator/TabIndicator.js.map +1 -1
- package/build/esm/TabIndicator/context.d.ts +2 -2
- package/build/esm/TabIndicator/context.js +6 -5
- package/build/esm/TabIndicator/context.js.map +1 -1
- package/build/esm/TabIndicator/index.d.ts +0 -0
- package/build/esm/TabIndicator/index.js.map +1 -1
- package/build/esm/Table/Table.d.ts +2 -2
- package/build/esm/Table/Table.js +11 -10
- package/build/esm/Table/Table.js.map +1 -1
- package/build/esm/Table/TableBody.d.ts +1 -1
- package/build/esm/Table/TableBody.js +7 -8
- package/build/esm/Table/TableBody.js.map +1 -1
- package/build/esm/Table/TableCell.d.ts +1 -1
- package/build/esm/Table/TableCell.js +9 -10
- package/build/esm/Table/TableCell.js.map +1 -1
- package/build/esm/Table/TableHead.d.ts +1 -1
- package/build/esm/Table/TableHead.js +8 -9
- package/build/esm/Table/TableHead.js.map +1 -1
- package/build/esm/Table/TableRow.d.ts +2 -2
- package/build/esm/Table/TableRow.js +9 -10
- package/build/esm/Table/TableRow.js.map +1 -1
- package/build/esm/Table/context.d.ts +0 -0
- package/build/esm/Table/context.js +6 -5
- package/build/esm/Table/context.js.map +1 -1
- package/build/esm/Table/index.d.ts +0 -0
- package/build/esm/Table/index.js.map +1 -1
- package/build/esm/Text/LoremIpsum.d.ts +1 -1
- package/build/esm/Text/LoremIpsum.js +7 -7
- package/build/esm/Text/LoremIpsum.js.map +1 -1
- package/build/esm/Text/Text.d.ts +9 -5
- package/build/esm/Text/Text.js +13 -9
- package/build/esm/Text/Text.js.map +1 -1
- package/build/esm/Text/index.d.ts +0 -0
- package/build/esm/Text/index.js.map +1 -1
- package/build/esm/TextField/FilledContainer.d.ts +5 -5
- package/build/esm/TextField/FilledContainer.js +60 -57
- package/build/esm/TextField/FilledContainer.js.map +1 -1
- package/build/esm/TextField/HelperText.d.ts +6 -6
- package/build/esm/TextField/HelperText.js +17 -16
- package/build/esm/TextField/HelperText.js.map +1 -1
- package/build/esm/TextField/IconContainer.d.ts +2 -3
- package/build/esm/TextField/IconContainer.js +14 -23
- package/build/esm/TextField/IconContainer.js.map +1 -1
- package/build/esm/TextField/Input.d.ts +5 -5
- package/build/esm/TextField/Input.js +23 -21
- package/build/esm/TextField/Input.js.map +1 -1
- package/build/esm/TextField/OutlinedContainer.d.ts +6 -6
- package/build/esm/TextField/OutlinedContainer.js +30 -24
- package/build/esm/TextField/OutlinedContainer.js.map +1 -1
- package/build/esm/TextField/TextField.d.ts +7 -7
- package/build/esm/TextField/TextField.js +61 -43
- package/build/esm/TextField/TextField.js.map +1 -1
- package/build/esm/TextField/consts.js +5 -5
- package/build/esm/TextField/consts.js.map +1 -1
- package/build/esm/TextField/index.d.ts +0 -0
- package/build/esm/TextField/index.js.map +1 -1
- package/build/esm/ThemeExplorer/ColorPicker.d.ts +4 -4
- package/build/esm/ThemeExplorer/ColorPicker.js +17 -16
- package/build/esm/ThemeExplorer/ColorPicker.js.map +1 -1
- package/build/esm/ThemeExplorer/TextFieldColorPicker.d.ts +2 -2
- package/build/esm/ThemeExplorer/TextFieldColorPicker.js +46 -25
- 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 +3 -3
- package/build/esm/ThemeExplorer/ThemeColors.js +4 -4
- package/build/esm/ThemeExplorer/ThemeColors.js.map +1 -1
- package/build/esm/ThemeExplorer/components.d.ts +7 -7
- package/build/esm/ThemeExplorer/components.js +82 -70
- 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 +1 -1
- package/build/esm/ThemeExplorer/makeColorScheme.js.map +1 -1
- package/build/esm/ThemeExplorer/useDeferredColor.d.ts +1 -1
- package/build/esm/ThemeExplorer/useDeferredColor.js +11 -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 +10 -3
- package/build/esm/ThemeExplorer/useLocalStorageCachedState.js.map +1 -1
- package/build/esm/Tooltip/Tooltip.d.ts +5 -5
- package/build/esm/Tooltip/Tooltip.js +13 -16
- package/build/esm/Tooltip/Tooltip.js.map +1 -1
- package/build/esm/Tooltip/index.d.ts +0 -0
- package/build/esm/Tooltip/index.js.map +1 -1
- package/build/esm/color.d.ts +5 -3
- package/build/esm/color.js +28 -17
- package/build/esm/color.js.map +1 -1
- package/build/esm/css.d.ts +0 -0
- package/build/esm/css.js.map +1 -1
- package/build/esm/hooks/useAnimation.d.ts +1 -1
- package/build/esm/hooks/useAnimation.js +54 -41
- package/build/esm/hooks/useAnimation.js.map +1 -1
- package/build/esm/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.map +1 -1
- package/build/esm/theme/theme.d.ts +114 -28
- package/build/esm/theme/theme.js +47 -39
- 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 +1 -1
- 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 +1 -1
- package/build/esm/theme/typography-roboto.js.map +1 -1
- package/build/esm/theme/useTheme.d.ts +115 -29
- package/build/esm/theme/useTheme.js +1 -1
- package/build/esm/theme/useTheme.js.map +1 -1
- package/build/tsconfig-build.tsbuildinfo +1 -0
- package/package.json +9 -8
- package/src/Alert/Alert.tsx +4 -2
- package/src/AppBar/AppBar.story.tsx +7 -6
- package/src/AppBar/AppBar.tsx +8 -5
- package/src/AppBar/AppBarButton.tsx +3 -1
- package/src/AppBar/context.ts +2 -1
- package/src/Badge/Badge.tsx +3 -1
- package/src/BaseLine/BaseLine.tsx +15 -11
- package/src/BottomSheet/BottomSheet.story.tsx +1 -0
- package/src/BottomSheet/BottomSheet.tsx +2 -1
- package/src/BottomSheet/BottomSheetSurface.tsx +11 -7
- package/src/Box/Box.tsx +25 -24
- package/src/Button/BaseButton.tsx +6 -12
- package/src/Button/Button.story.tsx +22 -4
- package/src/Button/Button.tsx +6 -5
- package/src/Button/ButtonGroup.tsx +5 -3
- package/src/Button/FilledButton.tsx +7 -11
- package/src/Button/FloatingActionButton.tsx +1 -1
- package/src/Button/IconButton.tsx +1 -1
- package/src/Button/OutlinedButton.tsx +3 -2
- package/src/Button/SpinnerButton.story.tsx +10 -11
- package/src/Button/TransparentButton.tsx +4 -4
- package/src/Button/context.tsx +1 -0
- package/src/CheckBox/CheckBox.story.tsx +9 -7
- package/src/CheckBox/CheckBox.tsx +13 -13
- package/src/CheckBox/CheckBoxIcon.tsx +8 -6
- package/src/Chip/ButtonChip.tsx +8 -6
- package/src/Chip/Chip.story.tsx +1 -2
- package/src/Chip/ChipBase.tsx +8 -6
- package/src/Chip/ChoiceChip.tsx +15 -12
- package/src/Combobox/Combobox.story.tsx +4 -3
- package/src/Combobox/Combobox.tsx +36 -25
- package/src/Dialog/Dialog.story.tsx +3 -1
- package/src/Dialog/Dialog.tsx +9 -4
- package/src/Dialog/DialogBackdrop.tsx +8 -8
- package/src/Dialog/DialogContainer.tsx +3 -1
- package/src/Dialog/DialogSurface.tsx +9 -9
- package/src/Dialog/Scrim.tsx +3 -1
- package/src/Dialog/useDialogAnimation.tsx +3 -4
- package/src/Divider/Divider.tsx +5 -3
- package/src/FloatingLabel/FloatingLabel.story.tsx +1 -0
- package/src/FloatingLabel/FloatingLabel.tsx +9 -7
- package/src/LineRipple/LineRipple.story.tsx +2 -1
- package/src/LineRipple/LineRipple.tsx +8 -5
- package/src/Link/Link.tsx +5 -6
- package/src/List/List.tsx +8 -5
- package/src/ListItem/ListItem.story.tsx +1 -0
- package/src/ListItem/ListItem.tsx +9 -7
- package/src/ListItem/ListItemText.tsx +7 -7
- package/src/Menu/Menu.tsx +23 -15
- package/src/Menu/animation.ts +1 -1
- 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.story.tsx +2 -1
- package/src/NotchedOutline/NotchedOutline.tsx +5 -5
- package/src/NotchedOutline/styledComponents.ts +5 -3
- package/src/Paper/Paper.story.tsx +5 -4
- package/src/Paper/Paper.tsx +24 -11
- package/src/ProgressSpinner/ProgressSpinner.story.tsx +1 -0
- package/src/ProgressSpinner/ProgressSpinner.tsx +14 -11
- package/src/RadioButton/RadioButton.story.tsx +3 -2
- package/src/RadioButton/RadioButton.tsx +10 -8
- package/src/RadioButton/RadioButtonIcon.tsx +5 -5
- package/src/RadioButton/RadioGroup.tsx +5 -5
- package/src/Ripple/Ripple.story.tsx +9 -3
- package/src/Ripple/Ripple.tsx +2 -1
- package/src/Ripple/RippleBox.tsx +8 -5
- package/src/Ripple/keyframes.ts +2 -1
- package/src/Ripple/useRipple.ts +1 -0
- package/src/Ripple/useRippleHandlers.ts +6 -4
- package/src/Ripple/useRippleSurface.ts +82 -64
- package/src/Select/PaymentMethodSelect.story.tsx +3 -1
- package/src/Select/Select.story.tsx +1 -0
- package/src/Select/Select.tsx +16 -9
- package/src/Select/SelectIcon.tsx +8 -6
- package/src/Select/context.ts +2 -1
- package/src/Select/defaultRender.ts +14 -13
- package/src/Select/styledComponents.tsx +17 -13
- package/src/SelectItem/SelectItem.tsx +4 -2
- package/src/SelectionControl/SelectionControlLabel.tsx +8 -9
- package/src/SelectionControl/SelectionControlText.tsx +6 -4
- package/src/Skeleton/DelayAppearance.tsx +6 -4
- package/src/Skeleton/Skeleton.story.tsx +2 -2
- package/src/Skeleton/Skeleton.tsx +9 -7
- package/src/Skeleton/animation.ts +3 -2
- package/src/Snackbar/Snackbar.story.tsx +1 -0
- package/src/Snackbar/Snackbar.tsx +9 -7
- package/src/Snackbar/Stack.tsx +7 -10
- package/src/Snackbar/useSnackbarAnimation.ts +6 -3
- package/src/Switch/Switch.tsx +13 -13
- package/src/Switch/styledComponents.tsx +16 -13
- package/src/Tab/Tab.tsx +10 -10
- package/src/Tab/TabList.tsx +5 -5
- package/src/Tab/TabPanel.tsx +5 -5
- package/src/TabIndicator/TabIndicator.tsx +8 -4
- package/src/TabIndicator/context.ts +2 -1
- package/src/Table/Table.tsx +4 -1
- package/src/Table/TableBody.tsx +3 -1
- package/src/Table/TableCell.tsx +3 -1
- package/src/Table/TableHead.tsx +4 -2
- package/src/Table/TableRow.tsx +5 -3
- package/src/Text/LoremIpsum.tsx +3 -2
- package/src/Text/Text.story.tsx +42 -7
- package/src/Text/Text.tsx +28 -6
- package/src/TextField/FilledContainer.tsx +7 -5
- package/src/TextField/HelperText.tsx +7 -6
- package/src/TextField/IconContainer.tsx +3 -3
- package/src/TextField/Input.tsx +9 -6
- package/src/TextField/OutlinedContainer.tsx +7 -5
- package/src/TextField/TextField.story.tsx +1 -0
- package/src/TextField/TextField.tsx +9 -6
- package/src/ThemeExplorer/ColorPicker.tsx +19 -16
- package/src/ThemeExplorer/TextFieldColorPicker.tsx +5 -2
- package/src/ThemeExplorer/ThemeBuilder.story.tsx +1 -163
- package/src/ThemeExplorer/ThemeBuilder.tsx +198 -0
- package/src/ThemeExplorer/ThemeColors.tsx +3 -2
- package/src/ThemeExplorer/components.tsx +27 -32
- package/src/ThemeExplorer/index.ts +1 -0
- package/src/ThemeExplorer/makeColorScheme.tsx +2 -1
- package/src/ThemeExplorer/useDeferredColor.tsx +4 -4
- package/src/ThemeExplorer/useLocalStorageCachedState.ts +2 -2
- package/src/Tooltip/Tooltip.story.tsx +3 -2
- package/src/Tooltip/Tooltip.tsx +15 -13
- package/src/color.ts +44 -21
- package/src/hooks/useAnimation.ts +2 -1
- package/src/index.ts +2 -1
- package/src/motion.ts +7 -0
- package/src/theme/theme.ts +51 -37
- package/src/theme/useTheme.ts +3 -1
- package/build/esm/ColorMode/ColorModeProvider.d.ts +0 -7
- package/build/esm/ColorMode/ColorModeProvider.js +0 -79
- 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 -50
- 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 -95
- 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 -42
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["checked"];
|
|
3
4
|
import { forwardRef } from 'react';
|
|
4
5
|
import { Box } from '../Box';
|
|
6
|
+
import { EASING_STANDARD } from '../motion';
|
|
5
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
} = props,
|
|
10
|
-
otherProps = _objectWithoutPropertiesLoose(props, ["checked"]);
|
|
8
|
+
export var RadioButtonIcon = /*#__PURE__*/forwardRef(function RadioButtonIcon(props, forwardedRef) {
|
|
9
|
+
var checked = props.checked,
|
|
10
|
+
otherProps = _objectWithoutProperties(props, _excluded);
|
|
11
11
|
|
|
12
|
-
return /*#__PURE__*/_jsx(Box, _extends({
|
|
12
|
+
return /*#__PURE__*/_jsx(Box, _extends(_extends({
|
|
13
13
|
ref: forwardedRef,
|
|
14
14
|
__css: {
|
|
15
15
|
borderColor: 'currentColor',
|
|
@@ -20,14 +20,14 @@ export const RadioButtonIcon = /*#__PURE__*/forwardRef(function RadioButtonIcon(
|
|
|
20
20
|
height: '100%',
|
|
21
21
|
p: "0.1875rem"
|
|
22
22
|
}
|
|
23
|
-
}, otherProps, {
|
|
23
|
+
}, otherProps), {}, {
|
|
24
24
|
children: /*#__PURE__*/_jsx(Box, {
|
|
25
25
|
__css: {
|
|
26
26
|
backgroundColor: 'currentColor',
|
|
27
27
|
borderRadius: 'full',
|
|
28
28
|
width: '100%',
|
|
29
29
|
height: '100%',
|
|
30
|
-
transition:
|
|
30
|
+
transition: "transform .12s ".concat(EASING_STANDARD, " 0ms,background-color .12s ").concat(EASING_STANDARD, " 0ms"),
|
|
31
31
|
transform: checked ? 'scale(1)' : 'scale(0)'
|
|
32
32
|
}
|
|
33
33
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"RadioButtonIcon.js","names":["forwardRef","Box","EASING_STANDARD","RadioButtonIcon","props","forwardedRef","checked","otherProps","borderColor","borderStyle","borderRadius","borderWidth","width","height","p","backgroundColor","transition","transform"],"sources":["../../../src/RadioButton/RadioButtonIcon.tsx"],"sourcesContent":["import type { HTMLAttributes } from 'react';\nimport { forwardRef } from 'react';\nimport { rem } from 'polished';\n\nimport { Box } from '../Box';\nimport { EASING_STANDARD } from '../motion';\n\nexport interface RadioButtonIconProps extends HTMLAttributes<HTMLDivElement> {\n checked?: boolean;\n disabled?: boolean;\n}\n\nexport const RadioButtonIcon = forwardRef<HTMLDivElement, RadioButtonIconProps>(\n function RadioButtonIcon(props, forwardedRef) {\n const { checked, ...otherProps } = props;\n\n return (\n <Box\n ref={forwardedRef}\n __css={{\n borderColor: 'currentColor',\n borderStyle: 'solid',\n borderRadius: 'full',\n borderWidth: rem(2),\n width: '100%',\n height: '100%',\n p: rem(3),\n }}\n {...otherProps}\n >\n <Box\n __css={{\n backgroundColor: 'currentColor',\n borderRadius: 'full',\n width: '100%',\n height: '100%',\n transition: `transform .12s ${EASING_STANDARD} 0ms,background-color .12s ${EASING_STANDARD} 0ms`,\n transform: checked ? 'scale(1)' : 'scale(0)',\n }}\n />\n </Box>\n );\n }\n);\n"],"mappings":";;;AACA,SAASA,UAAT,QAA2B,OAA3B;AAGA,SAASC,GAAT,QAAoB,QAApB;AACA,SAASC,eAAT,QAAgC,WAAhC;;AAOA,OAAO,IAAMC,eAAe,gBAAGH,UAAU,CACvC,SAASG,eAAT,CAAyBC,KAAzB,EAAgCC,YAAhC,EAA8C;EAC5C,IAAQC,OAAR,GAAmCF,KAAnC,CAAQE,OAAR;EAAA,IAAoBC,UAApB,4BAAmCH,KAAnC;;EAEA,oBACE,KAAC,GAAD;IACE,GAAG,EAAEC,YADP;IAEE,KAAK,EAAE;MACLG,WAAW,EAAE,cADR;MAELC,WAAW,EAAE,OAFR;MAGLC,YAAY,EAAE,MAHT;MAILC,WAAW,YAJN;MAKLC,KAAK,EAAE,MALF;MAMLC,MAAM,EAAE,MANH;MAOLC,CAAC;IAPI;EAFT,GAWMP,UAXN;IAAA,uBAaE,KAAC,GAAD;MACE,KAAK,EAAE;QACLQ,eAAe,EAAE,cADZ;QAELL,YAAY,EAAE,MAFT;QAGLE,KAAK,EAAE,MAHF;QAILC,MAAM,EAAE,MAJH;QAKLG,UAAU,2BAAoBd,eAApB,wCAAiEA,eAAjE,SALL;QAMLe,SAAS,EAAEX,OAAO,GAAG,UAAH,GAAgB;MAN7B;IADT;EAbF,GADF;AA0BD,CA9BsC,CAAlC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import type { RadioGroupProps as RadioGroupCoreProps } from '@basic-ui/core';
|
|
3
|
+
import type { BoxProps } from '../Box';
|
|
4
4
|
export declare type RadioGroupProps = Omit<BoxProps, 'onChange' | 'value' | 'defaultValue'> & RadioGroupCoreProps;
|
|
5
|
-
export declare const RadioGroup: import("react").ForwardRefExoticComponent<Pick<RadioGroupProps, "alignContent" | "alignItems" | "alignSelf" | "backgroundColor" | "backgroundImage" | "backgroundPosition" | "backgroundRepeat" | "backgroundSize" | "borderBottomColor" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderBottomStyle" | "borderBottomWidth" | "borderLeftColor" | "borderLeftStyle" | "borderLeftWidth" | "borderRightColor" | "borderRightStyle" | "borderRightWidth" | "borderTopColor" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderTopStyle" | "borderTopWidth" | "bottom" | "
|
|
5
|
+
export declare const RadioGroup: import("react").ForwardRefExoticComponent<Pick<RadioGroupProps, "boxShadow" | "fontWeight" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "backgroundColor" | "backgroundImage" | "backgroundPosition" | "backgroundRepeat" | "backgroundSize" | "borderBottomColor" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderBottomStyle" | "borderBottomWidth" | "borderLeftColor" | "borderLeftStyle" | "borderLeftWidth" | "borderRightColor" | "borderRightStyle" | "borderRightWidth" | "borderTopColor" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderTopStyle" | "borderTopWidth" | "bottom" | "color" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "opacity" | "order" | "overflowX" | "overflowY" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "textAlign" | "textShadow" | "top" | "translate" | "verticalAlign" | "width" | "background" | "border" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderStyle" | "borderTop" | "borderWidth" | "flex" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "overflow" | "padding" | "bg" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "p" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "variant" | "size" | "hidden" | "as" | "sx" | "__css" | "tx" | "theme" | "borderX" | "borderY" | "gridGap" | "gridColumnGap" | "gridRowGap" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "value" | "name" | "innerAs"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["as"];
|
|
3
4
|
import { forwardRef } from 'react';
|
|
4
|
-
import { Box } from '../Box';
|
|
5
5
|
import { RadioGroup as RadioGroupCore } from '@basic-ui/core';
|
|
6
|
+
import { Box } from '../Box';
|
|
6
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
-
export
|
|
8
|
+
export var RadioGroup = /*#__PURE__*/forwardRef(function RadioGroup(props, forwardedRef) {
|
|
8
9
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
9
|
-
|
|
10
|
+
var as = props.as,
|
|
11
|
+
otherProps = _objectWithoutProperties(props, _excluded);
|
|
10
12
|
|
|
11
13
|
return /*#__PURE__*/_jsx(Box, _extends({
|
|
12
14
|
as: RadioGroupCore,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"RadioGroup.js","names":["forwardRef","RadioGroup","RadioGroupCore","Box","props","forwardedRef","as","otherProps"],"sources":["../../../src/RadioButton/RadioGroup.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport type { RadioGroupProps as RadioGroupCoreProps } from '@basic-ui/core';\nimport { RadioGroup as RadioGroupCore } from '@basic-ui/core';\n\nimport type { BoxProps } from '../Box';\nimport { Box } from '../Box';\n\nexport type RadioGroupProps = Omit<\n BoxProps,\n 'onChange' | 'value' | 'defaultValue'\n> &\n RadioGroupCoreProps;\n\nexport const RadioGroup = forwardRef<HTMLDivElement, RadioGroupProps>(\n function RadioGroup(props, forwardedRef) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { as, ...otherProps } = props;\n\n return (\n <Box<RadioGroupProps>\n as={RadioGroupCore}\n ref={forwardedRef}\n {...otherProps}\n />\n );\n }\n);\n"],"mappings":";;;AAAA,SAASA,UAAT,QAA2B,OAA3B;AAEA,SAASC,UAAU,IAAIC,cAAvB,QAA6C,gBAA7C;AAGA,SAASC,GAAT,QAAoB,QAApB;;AAQA,OAAO,IAAMF,UAAU,gBAAGD,UAAU,CAClC,SAASC,UAAT,CAAoBG,KAApB,EAA2BC,YAA3B,EAAyC;EACvC;EACA,IAAQC,EAAR,GAA8BF,KAA9B,CAAQE,EAAR;EAAA,IAAeC,UAAf,4BAA8BH,KAA9B;;EAEA,oBACE,KAAC,GAAD;IACE,EAAE,EAAEF,cADN;IAEE,GAAG,EAAEG;EAFP,GAGME,UAHN,EADF;AAOD,CAZiC,CAA7B"}
|
|
File without changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/RadioButton/index.ts"],"sourcesContent":["export * from './RadioButton';\nexport * from './RadioGroup';\n"],"mappings":"AAAA,cAAc,eAAd;AACA,cAAc,cAAd"}
|
|
@@ -1,27 +1,28 @@
|
|
|
1
1
|
import _styled from "@emotion/styled/base";
|
|
2
2
|
import { RIPPLE_BACKGROUND_COLOR, RIPPLE_SIZE, RIPPLE_POSITION } from './constants';
|
|
3
|
-
export
|
|
4
|
-
animation
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
|
|
3
|
+
export var rippleStyle = function rippleStyle(_ref) {
|
|
4
|
+
var animation = _ref.animation;
|
|
5
|
+
return {
|
|
6
|
+
position: 'absolute',
|
|
7
|
+
boxSizing: 'content-box',
|
|
8
|
+
display: 'block',
|
|
9
|
+
content: '""',
|
|
10
|
+
width: "var(".concat(RIPPLE_SIZE, ")"),
|
|
11
|
+
height: "var(".concat(RIPPLE_SIZE, ")"),
|
|
12
|
+
top: "var(".concat(RIPPLE_POSITION, ")"),
|
|
13
|
+
left: "var(".concat(RIPPLE_POSITION, ")"),
|
|
14
|
+
backgroundColor: "var(".concat(RIPPLE_BACKGROUND_COLOR, ")"),
|
|
15
|
+
transformOrigin: 'center center',
|
|
16
|
+
opacity: 0,
|
|
17
|
+
borderRadius: '999999px',
|
|
18
|
+
animation: animation,
|
|
19
|
+
willChange: 'opacity,transform'
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export var Ripple = _styled("div", process.env.NODE_ENV === "production" ? {
|
|
22
23
|
target: "ebk8cct0"
|
|
23
24
|
} : {
|
|
24
25
|
target: "ebk8cct0",
|
|
25
26
|
label: "Ripple"
|
|
26
|
-
})(rippleStyle, "pointer-events:none;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
27
|
+
})(rippleStyle, "pointer-events:none;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9SaXBwbGUvUmlwcGxlLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUE4QnNCIiwiZmlsZSI6Ii4uLy4uLy4uL3NyYy9SaXBwbGUvUmlwcGxlLnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCB0eXBlIHsgQ1NTT2JqZWN0IH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG5pbXBvcnQge1xuICBSSVBQTEVfQkFDS0dST1VORF9DT0xPUixcbiAgUklQUExFX1NJWkUsXG4gIFJJUFBMRV9QT1NJVElPTixcbn0gZnJvbSAnLi9jb25zdGFudHMnO1xuXG5leHBvcnQgY29uc3QgcmlwcGxlU3R5bGUgPSAoe1xuICBhbmltYXRpb24sXG59OiB7XG4gIGFuaW1hdGlvbj86IHN0cmluZztcbn0pOiBDU1NPYmplY3QgPT4gKHtcbiAgcG9zaXRpb246ICdhYnNvbHV0ZScsXG4gIGJveFNpemluZzogJ2NvbnRlbnQtYm94JyxcbiAgZGlzcGxheTogJ2Jsb2NrJyxcbiAgY29udGVudDogJ1wiXCInLFxuICB3aWR0aDogYHZhcigke1JJUFBMRV9TSVpFfSlgLFxuICBoZWlnaHQ6IGB2YXIoJHtSSVBQTEVfU0laRX0pYCxcbiAgdG9wOiBgdmFyKCR7UklQUExFX1BPU0lUSU9OfSlgLFxuICBsZWZ0OiBgdmFyKCR7UklQUExFX1BPU0lUSU9OfSlgLFxuICBiYWNrZ3JvdW5kQ29sb3I6IGB2YXIoJHtSSVBQTEVfQkFDS0dST1VORF9DT0xPUn0pYCxcbiAgdHJhbnNmb3JtT3JpZ2luOiAnY2VudGVyIGNlbnRlcicsXG4gIG9wYWNpdHk6IDAsXG4gIGJvcmRlclJhZGl1czogJzk5OTk5OXB4JyxcbiAgYW5pbWF0aW9uLFxuICB3aWxsQ2hhbmdlOiAnb3BhY2l0eSx0cmFuc2Zvcm0nLFxufSk7XG5cbmV4cG9ydCBjb25zdCBSaXBwbGUgPSBzdHlsZWQuZGl2PHsgYW5pbWF0aW9uPzogc3RyaW5nIH0+KHJpcHBsZVN0eWxlLCB7XG4gIHBvaW50ZXJFdmVudHM6ICdub25lJyxcbn0pO1xuIl19 */"));
|
|
27
28
|
//# sourceMappingURL=Ripple.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"Ripple.js","names":["RIPPLE_BACKGROUND_COLOR","RIPPLE_SIZE","RIPPLE_POSITION","rippleStyle","animation","position","boxSizing","display","content","width","height","top","left","backgroundColor","transformOrigin","opacity","borderRadius","willChange","Ripple"],"sources":["../../../src/Ripple/Ripple.tsx"],"sourcesContent":["import styled from '@emotion/styled';\nimport type { CSSObject } from '@emotion/react';\n\nimport {\n RIPPLE_BACKGROUND_COLOR,\n RIPPLE_SIZE,\n RIPPLE_POSITION,\n} from './constants';\n\nexport const rippleStyle = ({\n animation,\n}: {\n animation?: string;\n}): CSSObject => ({\n position: 'absolute',\n boxSizing: 'content-box',\n display: 'block',\n content: '\"\"',\n width: `var(${RIPPLE_SIZE})`,\n height: `var(${RIPPLE_SIZE})`,\n top: `var(${RIPPLE_POSITION})`,\n left: `var(${RIPPLE_POSITION})`,\n backgroundColor: `var(${RIPPLE_BACKGROUND_COLOR})`,\n transformOrigin: 'center center',\n opacity: 0,\n borderRadius: '999999px',\n animation,\n willChange: 'opacity,transform',\n});\n\nexport const Ripple = styled.div<{ animation?: string }>(rippleStyle, {\n pointerEvents: 'none',\n});\n"],"mappings":";AAGA,SACEA,uBADF,EAEEC,WAFF,EAGEC,eAHF,QAIO,aAJP;AAMA,OAAO,IAAMC,WAAW,GAAG,SAAdA,WAAc;EAAA,IACzBC,SADyB,QACzBA,SADyB;EAAA,OAIT;IAChBC,QAAQ,EAAE,UADM;IAEhBC,SAAS,EAAE,aAFK;IAGhBC,OAAO,EAAE,OAHO;IAIhBC,OAAO,EAAE,IAJO;IAKhBC,KAAK,gBAASR,WAAT,MALW;IAMhBS,MAAM,gBAAST,WAAT,MANU;IAOhBU,GAAG,gBAAST,eAAT,MAPa;IAQhBU,IAAI,gBAASV,eAAT,MARY;IAShBW,eAAe,gBAASb,uBAAT,MATC;IAUhBc,eAAe,EAAE,eAVD;IAWhBC,OAAO,EAAE,CAXO;IAYhBC,YAAY,EAAE,UAZE;IAahBZ,SAAS,EAATA,SAbgB;IAchBa,UAAU,EAAE;EAdI,CAJS;AAAA,CAApB;AAqBP,OAAO,IAAMC,MAAM,GAAG;EAAA;AAAA;EAAA;EAAA;AAAA,GAAmCf,WAAnC,w5CAAf"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { HTMLAttributes } from 'react';
|
|
2
|
-
import type
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
export declare type RippleBoxProps<H extends HTMLElement = HTMLDivElement, Attr = React.HTMLAttributes<H>> = BoxProps<H, Attr> & UseRippleSurfaceOptions<H>;
|
|
1
|
+
import type { HTMLAttributes } from 'react';
|
|
2
|
+
import type { UseRippleSurfaceOptions } from './useRippleSurface';
|
|
3
|
+
import type { BoxProps } from '../Box';
|
|
4
|
+
export declare type RippleBoxProps<H extends HTMLElement = HTMLDivElement, Attr = HTMLAttributes<H>> = BoxProps<H, Attr> & UseRippleSurfaceOptions<H>;
|
|
6
5
|
export declare const RippleBox: <Props = RippleBoxProps<HTMLDivElement, HTMLAttributes<HTMLDivElement>>>(props: Props) => JSX.Element;
|
|
@@ -1,29 +1,37 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["as", "__css", "onKeyDown", "onPointerDown", "baseOpacity", "hoverOpacity", "focusOpacity", "pressedOpacity", "rippleColor", "center", "disabled", "rippleEnabled", "style"],
|
|
4
|
+
_excluded2 = ["__css"];
|
|
3
5
|
import { forwardRef } from 'react';
|
|
4
6
|
import { useRippleSurface } from './useRippleSurface';
|
|
5
7
|
import { Box } from '../Box';
|
|
6
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
-
export
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
export var RippleBox = /*#__PURE__*/forwardRef(function RippleBox(props, forwardedRef) {
|
|
10
|
+
var _props$as = props.as,
|
|
11
|
+
as = _props$as === void 0 ? 'div' : _props$as,
|
|
12
|
+
__css = props.__css,
|
|
13
|
+
onKeyDown = props.onKeyDown,
|
|
14
|
+
onPointerDown = props.onPointerDown,
|
|
15
|
+
baseOpacity = props.baseOpacity,
|
|
16
|
+
hoverOpacity = props.hoverOpacity,
|
|
17
|
+
focusOpacity = props.focusOpacity,
|
|
18
|
+
pressedOpacity = props.pressedOpacity,
|
|
19
|
+
rippleColor = props.rippleColor,
|
|
20
|
+
center = props.center,
|
|
21
|
+
disabled = props.disabled,
|
|
22
|
+
rippleEnabled = props.rippleEnabled,
|
|
23
|
+
style = props.style,
|
|
24
|
+
otherProps = _objectWithoutProperties(props, _excluded);
|
|
15
25
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
} = _useRippleSurface,
|
|
20
|
-
rippleProps = _objectWithoutPropertiesLoose(_useRippleSurface, ["__css"]);
|
|
26
|
+
var _useRippleSurface = useRippleSurface(props),
|
|
27
|
+
rippleCss = _useRippleSurface.__css,
|
|
28
|
+
rippleProps = _objectWithoutProperties(_useRippleSurface, _excluded2);
|
|
21
29
|
|
|
22
|
-
return /*#__PURE__*/_jsx(Box, _extends({
|
|
30
|
+
return /*#__PURE__*/_jsx(Box, _extends(_extends({
|
|
23
31
|
as: as,
|
|
24
32
|
ref: forwardedRef,
|
|
25
|
-
__css: _extends({}, rippleCss, __css),
|
|
26
|
-
disabled
|
|
27
|
-
}, otherProps, rippleProps));
|
|
33
|
+
__css: _extends(_extends({}, rippleCss), __css),
|
|
34
|
+
disabled: disabled
|
|
35
|
+
}, otherProps), rippleProps));
|
|
28
36
|
});
|
|
29
37
|
//# sourceMappingURL=RippleBox.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"RippleBox.js","names":["forwardRef","useRippleSurface","Box","RippleBox","props","forwardedRef","as","__css","onKeyDown","onPointerDown","baseOpacity","hoverOpacity","focusOpacity","pressedOpacity","rippleColor","center","disabled","rippleEnabled","style","otherProps","rippleCss","rippleProps"],"sources":["../../../src/Ripple/RippleBox.tsx"],"sourcesContent":["import type { HTMLAttributes } from 'react';\nimport { forwardRef } from 'react';\n\nimport type { UseRippleSurfaceOptions } from './useRippleSurface';\nimport { useRippleSurface } from './useRippleSurface';\nimport type { BoxProps } from '../Box';\nimport { Box } from '../Box';\n\nexport type RippleBoxProps<\n H extends HTMLElement = HTMLDivElement,\n Attr = HTMLAttributes<H>\n> = BoxProps<H, Attr> & UseRippleSurfaceOptions<H>;\n\nexport const RippleBox: <\n Props = RippleBoxProps<HTMLDivElement, HTMLAttributes<HTMLDivElement>>\n>(\n props: Props\n) => JSX.Element = forwardRef<HTMLDivElement, RippleBoxProps>(\n function RippleBox(props, forwardedRef) {\n const {\n as = 'div',\n __css,\n // Cherry picking the ripple props to prevent it from falling down to\n // the Box component\n onKeyDown, // eslint-disable-line @typescript-eslint/no-unused-vars\n onPointerDown, // eslint-disable-line @typescript-eslint/no-unused-vars\n baseOpacity, // eslint-disable-line @typescript-eslint/no-unused-vars\n hoverOpacity, // eslint-disable-line @typescript-eslint/no-unused-vars\n focusOpacity, // eslint-disable-line @typescript-eslint/no-unused-vars\n pressedOpacity, // eslint-disable-line @typescript-eslint/no-unused-vars\n rippleColor, // eslint-disable-line @typescript-eslint/no-unused-vars\n center, // eslint-disable-line @typescript-eslint/no-unused-vars\n disabled, // eslint-disable-line @typescript-eslint/no-unused-vars\n rippleEnabled, // eslint-disable-line @typescript-eslint/no-unused-vars\n style, // eslint-disable-line @typescript-eslint/no-unused-vars\n ...otherProps\n } = props;\n\n const { __css: rippleCss, ...rippleProps } = useRippleSurface(props);\n\n return (\n <Box\n as={as}\n ref={forwardedRef}\n __css={{ ...rippleCss, ...__css }}\n {...{ disabled }}\n {...otherProps}\n {...rippleProps}\n />\n );\n }\n) as any;\n"],"mappings":";;;;AACA,SAASA,UAAT,QAA2B,OAA3B;AAGA,SAASC,gBAAT,QAAiC,oBAAjC;AAEA,SAASC,GAAT,QAAoB,QAApB;;AAOA,OAAO,IAAMC,SAIG,gBAAGH,UAAU,CAC3B,SAASG,SAAT,CAAmBC,KAAnB,EAA0BC,YAA1B,EAAwC;EACtC,gBAiBID,KAjBJ,CACEE,EADF;EAAA,IACEA,EADF,0BACO,KADP;EAAA,IAEEC,KAFF,GAiBIH,KAjBJ,CAEEG,KAFF;EAAA,IAKEC,SALF,GAiBIJ,KAjBJ,CAKEI,SALF;EAAA,IAMEC,aANF,GAiBIL,KAjBJ,CAMEK,aANF;EAAA,IAOEC,WAPF,GAiBIN,KAjBJ,CAOEM,WAPF;EAAA,IAQEC,YARF,GAiBIP,KAjBJ,CAQEO,YARF;EAAA,IASEC,YATF,GAiBIR,KAjBJ,CASEQ,YATF;EAAA,IAUEC,cAVF,GAiBIT,KAjBJ,CAUES,cAVF;EAAA,IAWEC,WAXF,GAiBIV,KAjBJ,CAWEU,WAXF;EAAA,IAYEC,MAZF,GAiBIX,KAjBJ,CAYEW,MAZF;EAAA,IAaEC,QAbF,GAiBIZ,KAjBJ,CAaEY,QAbF;EAAA,IAcEC,aAdF,GAiBIb,KAjBJ,CAcEa,aAdF;EAAA,IAeEC,KAfF,GAiBId,KAjBJ,CAeEc,KAfF;EAAA,IAgBKC,UAhBL,4BAiBIf,KAjBJ;;EAmBA,wBAA6CH,gBAAgB,CAACG,KAAD,CAA7D;EAAA,IAAegB,SAAf,qBAAQb,KAAR;EAAA,IAA6Bc,WAA7B;;EAEA,oBACE,KAAC,GAAD;IACE,EAAE,EAAEf,EADN;IAEE,GAAG,EAAED,YAFP;IAGE,KAAK,wBAAOe,SAAP,GAAqBb,KAArB,CAHP;IAIQS,QAAQ,EAARA;EAJR,GAKMG,UALN,GAMME,WANN,EADF;AAUD,CAjC0B,CAJtB"}
|
|
File without changes
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import hash from '@emotion/hash';
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
2
|
+
export var RIPPLE_BACKGROUND_COLOR = "--css-".concat(hash('basic-ui-ripple-fg-bg-color'));
|
|
3
|
+
export var RIPPLE_TRANSLATE_START = "--css-".concat(hash('basic-ui-ripple-fg-translate-start'));
|
|
4
|
+
export var RIPPLE_TRANSLATE_END = "--css-".concat(hash('basic-ui-ripple-fg-translate-end'));
|
|
5
|
+
export var RIPPLE_SCALE_END = "--css-".concat(hash('basic-ui-ripple-fg-scale'));
|
|
6
|
+
export var RIPPLE_OPACITY_END = "--css-".concat(hash('basic-ui-ripple-fg-opacity'));
|
|
7
|
+
export var RIPPLE_SIZE = "--css-".concat(hash('basic-ui-ripple-fg-size'));
|
|
8
|
+
export var RIPPLE_POSITION = "--css-".concat(hash('basic-ui-ripple-fg-position'));
|
|
9
9
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"constants.js","names":["hash","RIPPLE_BACKGROUND_COLOR","RIPPLE_TRANSLATE_START","RIPPLE_TRANSLATE_END","RIPPLE_SCALE_END","RIPPLE_OPACITY_END","RIPPLE_SIZE","RIPPLE_POSITION"],"sources":["../../../src/Ripple/constants.ts"],"sourcesContent":["import hash from '@emotion/hash';\n\nexport const RIPPLE_BACKGROUND_COLOR = `--css-${hash(\n 'basic-ui-ripple-fg-bg-color'\n)}`;\nexport const RIPPLE_TRANSLATE_START = `--css-${hash(\n 'basic-ui-ripple-fg-translate-start'\n)}`;\nexport const RIPPLE_TRANSLATE_END = `--css-${hash(\n 'basic-ui-ripple-fg-translate-end'\n)}`;\nexport const RIPPLE_SCALE_END = `--css-${hash('basic-ui-ripple-fg-scale')}`;\nexport const RIPPLE_OPACITY_END = `--css-${hash('basic-ui-ripple-fg-opacity')}`;\nexport const RIPPLE_SIZE = `--css-${hash('basic-ui-ripple-fg-size')}`;\nexport const RIPPLE_POSITION = `--css-${hash('basic-ui-ripple-fg-position')}`;\n"],"mappings":"AAAA,OAAOA,IAAP,MAAiB,eAAjB;AAEA,OAAO,IAAMC,uBAAuB,mBAAYD,IAAI,CAClD,6BADkD,CAAhB,CAA7B;AAGP,OAAO,IAAME,sBAAsB,mBAAYF,IAAI,CACjD,oCADiD,CAAhB,CAA5B;AAGP,OAAO,IAAMG,oBAAoB,mBAAYH,IAAI,CAC/C,kCAD+C,CAAhB,CAA1B;AAGP,OAAO,IAAMI,gBAAgB,mBAAYJ,IAAI,CAAC,0BAAD,CAAhB,CAAtB;AACP,OAAO,IAAMK,kBAAkB,mBAAYL,IAAI,CAAC,4BAAD,CAAhB,CAAxB;AACP,OAAO,IAAMM,WAAW,mBAAYN,IAAI,CAAC,yBAAD,CAAhB,CAAjB;AACP,OAAO,IAAMO,eAAe,mBAAYP,IAAI,CAAC,6BAAD,CAAhB,CAArB"}
|
|
File without changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/Ripple/index.ts"],"sourcesContent":["export * from './Ripple';\nexport * from './RippleBox';\nexport * from './useRipple';\nexport * from './useRippleHandlers';\nexport * from './useRippleSurface';\n"],"mappings":"AAAA,cAAc,UAAd;AACA,cAAc,aAAd;AACA,cAAc,aAAd;AACA,cAAc,qBAAd;AACA,cAAc,oBAAd"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { keyframes } from '@emotion/react';
|
|
2
2
|
import { RIPPLE_TRANSLATE_START, RIPPLE_TRANSLATE_END, RIPPLE_OPACITY_END, RIPPLE_SCALE_END } from './constants';
|
|
3
|
-
export
|
|
3
|
+
export var radiusIn = keyframes({
|
|
4
4
|
from: {
|
|
5
5
|
transform: "translate(var(".concat(RIPPLE_TRANSLATE_START, ", 0)) scale(1)")
|
|
6
6
|
},
|
|
@@ -8,7 +8,7 @@ export const radiusIn = keyframes({
|
|
|
8
8
|
transform: "translate(var(".concat(RIPPLE_TRANSLATE_END, ", 0)) scale(var(").concat(RIPPLE_SCALE_END, ", 1))")
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
-
export
|
|
11
|
+
export var opacityIn = keyframes({
|
|
12
12
|
from: {
|
|
13
13
|
opacity: '0'
|
|
14
14
|
},
|
|
@@ -16,7 +16,7 @@ export const opacityIn = keyframes({
|
|
|
16
16
|
opacity: "var(".concat(RIPPLE_OPACITY_END, ")")
|
|
17
17
|
}
|
|
18
18
|
});
|
|
19
|
-
export
|
|
19
|
+
export var opacityOut = keyframes({
|
|
20
20
|
from: {
|
|
21
21
|
opacity: "var(".concat(RIPPLE_OPACITY_END, ")")
|
|
22
22
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"keyframes.js","names":["keyframes","RIPPLE_TRANSLATE_START","RIPPLE_TRANSLATE_END","RIPPLE_OPACITY_END","RIPPLE_SCALE_END","radiusIn","from","transform","to","opacityIn","opacity","opacityOut"],"sources":["../../../src/Ripple/keyframes.ts"],"sourcesContent":["import { keyframes } from '@emotion/react';\nimport type { Keyframes } from '@emotion/serialize';\n\nimport {\n RIPPLE_TRANSLATE_START,\n RIPPLE_TRANSLATE_END,\n RIPPLE_OPACITY_END,\n RIPPLE_SCALE_END,\n} from './constants';\n\nexport const radiusIn: Keyframes = keyframes({\n from: {\n transform: `translate(var(${RIPPLE_TRANSLATE_START}, 0)) scale(1)`,\n },\n to: {\n transform: `translate(var(${RIPPLE_TRANSLATE_END}, 0)) scale(var(${RIPPLE_SCALE_END}, 1))`,\n },\n});\n\nexport const opacityIn: Keyframes = keyframes({\n from: {\n opacity: '0',\n },\n to: {\n opacity: `var(${RIPPLE_OPACITY_END})`,\n },\n});\n\nexport const opacityOut: Keyframes = keyframes({\n from: {\n opacity: `var(${RIPPLE_OPACITY_END})`,\n },\n to: {\n opacity: '0',\n },\n});\n"],"mappings":"AAAA,SAASA,SAAT,QAA0B,gBAA1B;AAGA,SACEC,sBADF,EAEEC,oBAFF,EAGEC,kBAHF,EAIEC,gBAJF,QAKO,aALP;AAOA,OAAO,IAAMC,QAAmB,GAAGL,SAAS,CAAC;EAC3CM,IAAI,EAAE;IACJC,SAAS,0BAAmBN,sBAAnB;EADL,CADqC;EAI3CO,EAAE,EAAE;IACFD,SAAS,0BAAmBL,oBAAnB,6BAA0DE,gBAA1D;EADP;AAJuC,CAAD,CAArC;AASP,OAAO,IAAMK,SAAoB,GAAGT,SAAS,CAAC;EAC5CM,IAAI,EAAE;IACJI,OAAO,EAAE;EADL,CADsC;EAI5CF,EAAE,EAAE;IACFE,OAAO,gBAASP,kBAAT;EADL;AAJwC,CAAD,CAAtC;AASP,OAAO,IAAMQ,UAAqB,GAAGX,SAAS,CAAC;EAC7CM,IAAI,EAAE;IACJI,OAAO,gBAASP,kBAAT;EADH,CADuC;EAI7CK,EAAE,EAAE;IACFE,OAAO,EAAE;EADP;AAJyC,CAAD,CAAvC"}
|
|
File without changes
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
1
3
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
4
|
import { useState, useRef, useEffect } from 'react';
|
|
3
5
|
import { radiusIn, opacityIn, opacityOut } from './keyframes';
|
|
4
6
|
import { RIPPLE_TRANSLATE_START, RIPPLE_TRANSLATE_END, RIPPLE_OPACITY_END, RIPPLE_SCALE_END, RIPPLE_SIZE, RIPPLE_BACKGROUND_COLOR, RIPPLE_POSITION } from './constants';
|
|
5
|
-
|
|
7
|
+
var defaultRipple = {
|
|
6
8
|
x: 0,
|
|
7
9
|
y: 0,
|
|
8
10
|
size: 0,
|
|
@@ -16,18 +18,18 @@ const defaultRipple = {
|
|
|
16
18
|
// (calculated based on the diagonal plus a constant padding), and are clipped at the surface's border via
|
|
17
19
|
// `overflow: hidden`.
|
|
18
20
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
+
var getBoundedRadius = function getBoundedRadius(rect, padding) {
|
|
22
|
+
var hypotenuse = Math.sqrt(Math.pow(rect.width, 2) + Math.pow(rect.height, 2));
|
|
21
23
|
return hypotenuse + padding;
|
|
22
24
|
};
|
|
23
25
|
|
|
24
26
|
function getScale(rect) {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
var maxDim = Math.max(rect.height, rect.width);
|
|
28
|
+
var padding = 10;
|
|
29
|
+
var initialOriginScale = 0.6;
|
|
30
|
+
var maxRadius = getBoundedRadius(rect, padding); // Ripple is sized as a fraction of the largest dimension of the surface, then scales up using a CSS scale transform
|
|
29
31
|
|
|
30
|
-
|
|
32
|
+
var initialSize = Math.floor(maxDim * initialOriginScale);
|
|
31
33
|
return {
|
|
32
34
|
size: initialSize,
|
|
33
35
|
scale: maxRadius / initialSize,
|
|
@@ -36,66 +38,78 @@ function getScale(rect) {
|
|
|
36
38
|
};
|
|
37
39
|
}
|
|
38
40
|
|
|
39
|
-
function calculateRipplePosition(rect, clientX, clientY
|
|
40
|
-
|
|
41
|
+
function calculateRipplePosition(rect, clientX, clientY) {
|
|
42
|
+
var center = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
|
43
|
+
var rippleStart = center ? {
|
|
41
44
|
x: rect.width / 2,
|
|
42
45
|
y: rect.height / 2
|
|
43
46
|
} : {
|
|
44
47
|
x: clientX - rect.left,
|
|
45
48
|
y: clientY - rect.top
|
|
46
49
|
};
|
|
47
|
-
return _extends({
|
|
50
|
+
return _extends(_extends({
|
|
48
51
|
state: 'entering'
|
|
49
|
-
}, rippleStart, getScale(rect));
|
|
52
|
+
}, rippleStart), getScale(rect));
|
|
50
53
|
}
|
|
51
54
|
|
|
52
|
-
export
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
55
|
+
export var useRipple = function useRipple(opts) {
|
|
56
|
+
var _style;
|
|
57
|
+
|
|
58
|
+
var opacity = opts.opacity,
|
|
59
|
+
backgroundColor = opts.backgroundColor,
|
|
60
|
+
_opts$enterDuration = opts.enterDuration,
|
|
61
|
+
enterDuration = _opts$enterDuration === void 0 ? 225 : _opts$enterDuration,
|
|
62
|
+
_opts$leaveDuration = opts.leaveDuration,
|
|
63
|
+
leaveDuration = _opts$leaveDuration === void 0 ? 150 : _opts$leaveDuration; // rippleState must be a ref, because it accesses the current value
|
|
59
64
|
// inside closures... if we use state, it's gonna recapture
|
|
60
65
|
// the state variable and won't work correctly
|
|
61
66
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
67
|
+
var rippleState = useRef('left');
|
|
68
|
+
|
|
69
|
+
var _useState = useState(defaultRipple),
|
|
70
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
71
|
+
ripple = _useState2[0],
|
|
72
|
+
setRipple = _useState2[1];
|
|
73
|
+
|
|
74
|
+
var leavingTimeout = useRef();
|
|
75
|
+
var enteringTimeout = useRef();
|
|
76
|
+
var restartTimeout = useRef();
|
|
77
|
+
var shouldLeave = useRef(false); // clear timeouts to avoid setting state on unmounted component
|
|
68
78
|
|
|
69
|
-
useEffect(()
|
|
70
|
-
return ()
|
|
79
|
+
useEffect(function () {
|
|
80
|
+
return function () {
|
|
71
81
|
restartTimeout.current && cancelAnimationFrame(restartTimeout.current);
|
|
72
82
|
clearTimeout(enteringTimeout.current);
|
|
73
83
|
clearTimeout(leavingTimeout.current);
|
|
74
84
|
};
|
|
75
85
|
}, []); // State handling
|
|
76
86
|
|
|
77
|
-
|
|
87
|
+
var setLeft = function setLeft() {
|
|
78
88
|
rippleState.current = 'left';
|
|
79
89
|
setRipple(_extends({}, defaultRipple));
|
|
80
90
|
};
|
|
81
91
|
|
|
82
|
-
|
|
92
|
+
var setLeaving = function setLeaving() {
|
|
83
93
|
clearTimeout(enteringTimeout.current);
|
|
84
94
|
rippleState.current = 'leaving';
|
|
85
|
-
setRipple(
|
|
95
|
+
setRipple(function (ripple) {
|
|
96
|
+
return _extends({}, ripple);
|
|
97
|
+
});
|
|
86
98
|
leavingTimeout.current = window.setTimeout(setLeft, leaveDuration);
|
|
87
99
|
};
|
|
88
100
|
|
|
89
|
-
|
|
101
|
+
var setEntered = function setEntered() {
|
|
90
102
|
rippleState.current = 'entered';
|
|
91
|
-
setRipple(
|
|
103
|
+
setRipple(function (ripple) {
|
|
104
|
+
return _extends({}, ripple);
|
|
105
|
+
});
|
|
92
106
|
|
|
93
107
|
if (shouldLeave.current) {
|
|
94
108
|
setLeaving();
|
|
95
109
|
}
|
|
96
110
|
};
|
|
97
111
|
|
|
98
|
-
|
|
112
|
+
var deactivate = function deactivate() {
|
|
99
113
|
shouldLeave.current = true;
|
|
100
114
|
|
|
101
115
|
if (rippleState.current === 'entered') {
|
|
@@ -103,13 +117,14 @@ export const useRipple = opts => {
|
|
|
103
117
|
}
|
|
104
118
|
};
|
|
105
119
|
|
|
106
|
-
|
|
120
|
+
var activate = function activate(rect, clientX, clientY) {
|
|
121
|
+
var center = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
|
107
122
|
clearTimeout(leavingTimeout.current);
|
|
108
123
|
clearTimeout(enteringTimeout.current);
|
|
109
124
|
shouldLeave.current = false;
|
|
110
125
|
rippleState.current = 'restart';
|
|
111
126
|
setRipple(_extends({}, defaultRipple));
|
|
112
|
-
restartTimeout.current = requestAnimationFrame(()
|
|
127
|
+
restartTimeout.current = requestAnimationFrame(function () {
|
|
113
128
|
rippleState.current = 'entering';
|
|
114
129
|
setRipple(calculateRipplePosition(rect, clientX, clientY, center));
|
|
115
130
|
enteringTimeout.current = window.setTimeout(setEntered, enterDuration);
|
|
@@ -117,7 +132,7 @@ export const useRipple = opts => {
|
|
|
117
132
|
}; // Styling
|
|
118
133
|
|
|
119
134
|
|
|
120
|
-
|
|
135
|
+
var animation = undefined;
|
|
121
136
|
|
|
122
137
|
switch (rippleState.current) {
|
|
123
138
|
case 'entering':
|
|
@@ -130,29 +145,21 @@ export const useRipple = opts => {
|
|
|
130
145
|
break;
|
|
131
146
|
}
|
|
132
147
|
|
|
133
|
-
|
|
148
|
+
var style = {};
|
|
134
149
|
|
|
135
150
|
switch (rippleState.current) {
|
|
136
151
|
case 'entering':
|
|
137
152
|
case 'entered':
|
|
138
153
|
case 'leaving':
|
|
139
|
-
style = {
|
|
140
|
-
[RIPPLE_SIZE]: "".concat(ripple.size, "px"),
|
|
141
|
-
[RIPPLE_POSITION]: "".concat(-ripple.size / 2, "px"),
|
|
142
|
-
[RIPPLE_BACKGROUND_COLOR]: backgroundColor,
|
|
143
|
-
[RIPPLE_TRANSLATE_START]: "".concat(ripple.x, "px, ").concat(ripple.y, "px"),
|
|
144
|
-
[RIPPLE_TRANSLATE_END]: "".concat(ripple.centerX, "px, ").concat(ripple.centerY, "px"),
|
|
145
|
-
[RIPPLE_OPACITY_END]: opacity,
|
|
146
|
-
[RIPPLE_SCALE_END]: "".concat(ripple.scale)
|
|
147
|
-
};
|
|
154
|
+
style = (_style = {}, _defineProperty(_style, RIPPLE_SIZE, "".concat(ripple.size, "px")), _defineProperty(_style, RIPPLE_POSITION, "".concat(-ripple.size / 2, "px")), _defineProperty(_style, RIPPLE_BACKGROUND_COLOR, backgroundColor), _defineProperty(_style, RIPPLE_TRANSLATE_START, "".concat(ripple.x, "px, ").concat(ripple.y, "px")), _defineProperty(_style, RIPPLE_TRANSLATE_END, "".concat(ripple.centerX, "px, ").concat(ripple.centerY, "px")), _defineProperty(_style, RIPPLE_OPACITY_END, opacity), _defineProperty(_style, RIPPLE_SCALE_END, "".concat(ripple.scale)), _style);
|
|
148
155
|
break;
|
|
149
156
|
}
|
|
150
157
|
|
|
151
158
|
return {
|
|
152
|
-
activate,
|
|
153
|
-
deactivate,
|
|
154
|
-
style,
|
|
155
|
-
animation // key: counter,
|
|
159
|
+
activate: activate,
|
|
160
|
+
deactivate: deactivate,
|
|
161
|
+
style: style,
|
|
162
|
+
animation: animation // key: counter,
|
|
156
163
|
|
|
157
164
|
};
|
|
158
165
|
};
|