@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,10 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import { RippleBox, RippleBoxProps } from '../Ripple';
|
|
4
|
-
import { Box, BoxProps } from '../Box';
|
|
5
|
-
import { useTheme } from '../theme';
|
|
1
|
+
import type { ElementType, FC, InputHTMLAttributes, ReactElement } from 'react';
|
|
2
|
+
import { forwardRef, cloneElement } from 'react';
|
|
6
3
|
import { rem } from 'polished';
|
|
7
4
|
import { CheckBox as _CheckBoxCore } from '@basic-ui/core';
|
|
5
|
+
|
|
6
|
+
import type { RippleBoxProps } from '../Ripple';
|
|
7
|
+
import { RippleBox } from '../Ripple';
|
|
8
|
+
import type { BoxProps } from '../Box';
|
|
9
|
+
import { Box } from '../Box';
|
|
10
|
+
import { useTheme } from '../theme';
|
|
8
11
|
import { CheckBoxIcon } from './CheckBoxIcon';
|
|
9
12
|
import {
|
|
10
13
|
SelectionControlLabel,
|
|
@@ -12,20 +15,17 @@ import {
|
|
|
12
15
|
} from '../SelectionControl';
|
|
13
16
|
|
|
14
17
|
export interface CheckBoxProps
|
|
15
|
-
extends BoxProps<
|
|
16
|
-
|
|
17
|
-
React.InputHTMLAttributes<HTMLInputElement>
|
|
18
|
-
> {
|
|
19
|
-
as?: React.ElementType<any>;
|
|
18
|
+
extends BoxProps<HTMLInputElement, InputHTMLAttributes<HTMLInputElement>> {
|
|
19
|
+
as?: ElementType<any>;
|
|
20
20
|
checked?: boolean;
|
|
21
21
|
indeterminate?: boolean;
|
|
22
22
|
disabled?: boolean;
|
|
23
|
-
icon?:
|
|
23
|
+
icon?: ReactElement<{ checked?: boolean; disabled?: boolean }>;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
const CheckBoxCore:
|
|
26
|
+
const CheckBoxCore: FC<
|
|
27
27
|
CheckBoxProps & {
|
|
28
|
-
innerAs?:
|
|
28
|
+
innerAs?: ElementType<any>;
|
|
29
29
|
}
|
|
30
30
|
> = _CheckBoxCore as any;
|
|
31
31
|
|
|
@@ -1,16 +1,19 @@
|
|
|
1
|
+
import type { ElementType, ReactNode } from 'react';
|
|
1
2
|
import { forwardRef } from 'react';
|
|
2
|
-
import type * as React from 'react';
|
|
3
|
-
import { Box, BoxProps } from '../Box';
|
|
4
3
|
import { rem } from 'polished';
|
|
4
|
+
|
|
5
|
+
import type { BoxProps } from '../Box';
|
|
6
|
+
import { Box } from '../Box';
|
|
5
7
|
import { CheckPath } from './CheckPath';
|
|
6
8
|
import { IndeterminatePath } from './IndeterminatePath';
|
|
9
|
+
import { EASING_STANDARD } from '../motion';
|
|
7
10
|
|
|
8
11
|
export interface CheckBoxIconProps extends BoxProps {
|
|
9
|
-
as?:
|
|
12
|
+
as?: ElementType<any>;
|
|
10
13
|
checked?: boolean;
|
|
11
14
|
disabled?: boolean;
|
|
12
15
|
indeterminate?: boolean;
|
|
13
|
-
children?:
|
|
16
|
+
children?: ReactNode;
|
|
14
17
|
}
|
|
15
18
|
|
|
16
19
|
export const CheckBoxIcon = forwardRef<HTMLDivElement, CheckBoxIconProps>(
|
|
@@ -43,8 +46,7 @@ export const CheckBoxIcon = forwardRef<HTMLDivElement, CheckBoxIconProps>(
|
|
|
43
46
|
borderStyle: 'solid',
|
|
44
47
|
width: rem(18),
|
|
45
48
|
height: rem(18),
|
|
46
|
-
transition:
|
|
47
|
-
'background-color 90ms 0s cubic-bezier(0,0,.2,1), border-color 90ms 0s cubic-bezier(0,0,.2,1), opacity 90ms 0s cubic-bezier(0,0,.2,1)',
|
|
49
|
+
transition: `background-color 90ms 0s ${EASING_STANDARD}, border-color 90ms 0s ${EASING_STANDARD}, opacity 90ms 0s ${EASING_STANDARD}`,
|
|
48
50
|
'& > svg': {
|
|
49
51
|
display: 'block',
|
|
50
52
|
},
|
package/src/Chip/ButtonChip.tsx
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
1
2
|
import { forwardRef } from 'react';
|
|
2
|
-
import
|
|
3
|
-
|
|
3
|
+
import { rem } from 'polished';
|
|
4
|
+
|
|
5
|
+
import type { ChipBaseProps } from './ChipBase';
|
|
6
|
+
import { ChipBase } from './ChipBase';
|
|
4
7
|
import { RippleBox } from '../Ripple';
|
|
5
8
|
import { useTheme } from '../theme';
|
|
6
|
-
import { rem } from 'polished';
|
|
7
9
|
|
|
8
10
|
export type ButtonChipProps = ChipBaseProps & {
|
|
9
11
|
checked?: boolean;
|
|
10
12
|
disabled?: boolean;
|
|
11
|
-
leadingIcon?:
|
|
12
|
-
trailingIcon?:
|
|
13
|
+
leadingIcon?: ReactNode;
|
|
14
|
+
trailingIcon?: ReactNode;
|
|
13
15
|
};
|
|
14
16
|
|
|
15
17
|
export const ButtonChip = forwardRef<HTMLDivElement, ButtonChipProps>(
|
|
@@ -21,7 +23,7 @@ export const ButtonChip = forwardRef<HTMLDivElement, ButtonChipProps>(
|
|
|
21
23
|
leadingIcon,
|
|
22
24
|
trailingIcon,
|
|
23
25
|
children,
|
|
24
|
-
color
|
|
26
|
+
color,
|
|
25
27
|
__css,
|
|
26
28
|
...otherProps
|
|
27
29
|
} = props;
|
package/src/Chip/Chip.story.tsx
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Chip } from './';
|
|
2
2
|
import { Box } from '../Box';
|
|
3
3
|
import { Text } from '../Text';
|
|
4
|
-
import { alpha } from '../color';
|
|
5
4
|
import { RadioGroup } from '../RadioButton';
|
|
6
5
|
import { ChoiceChip } from './ChoiceChip';
|
|
7
6
|
import { LoremIpsum } from '../Text/LoremIpsum';
|
|
@@ -56,7 +55,7 @@ const Example = ({ variant, color = 'default' }) => {
|
|
|
56
55
|
|
|
57
56
|
return (
|
|
58
57
|
<Box>
|
|
59
|
-
<Text variant="
|
|
58
|
+
<Text variant="title-small" mb={2}>
|
|
60
59
|
Variant: {variant}, Color: {color}
|
|
61
60
|
</Text>
|
|
62
61
|
<Box my={2} display="flex" sx={{ gap: 2 }}>
|
package/src/Chip/ChipBase.tsx
CHANGED
|
@@ -1,18 +1,21 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'react';
|
|
1
2
|
import { forwardRef } from 'react';
|
|
2
|
-
import type * as React from 'react';
|
|
3
3
|
import { variant } from 'styled-system';
|
|
4
|
-
import {
|
|
5
|
-
|
|
4
|
+
import { rem } from 'polished';
|
|
5
|
+
|
|
6
|
+
import type { BoxProps } from '../Box';
|
|
7
|
+
import { Box } from '../Box';
|
|
8
|
+
import type { Theme } from '../theme';
|
|
9
|
+
import { useTheme } from '../theme';
|
|
6
10
|
import {
|
|
7
11
|
alpha,
|
|
8
12
|
getDarkThemeBackgroundOverlay,
|
|
9
13
|
getColorOverlay,
|
|
10
14
|
} from '../color';
|
|
11
|
-
import { rem } from 'polished';
|
|
12
15
|
|
|
13
16
|
export type ChipBaseProps<
|
|
14
17
|
H = HTMLDivElement,
|
|
15
|
-
Attr =
|
|
18
|
+
Attr = HTMLAttributes<H>
|
|
16
19
|
> = BoxProps<H, Attr> & {
|
|
17
20
|
variant?: 'filled' | 'outlined';
|
|
18
21
|
backgroundColor?: string;
|
|
@@ -32,7 +35,6 @@ function getFilledCSS(
|
|
|
32
35
|
? { bg }
|
|
33
36
|
: {
|
|
34
37
|
...getColorOverlay(theme, 'surface', 'primary', 0.05),
|
|
35
|
-
...getDarkThemeBackgroundOverlay(theme, 2),
|
|
36
38
|
}),
|
|
37
39
|
color,
|
|
38
40
|
'&::before': {
|
package/src/Chip/ChoiceChip.tsx
CHANGED
|
@@ -1,24 +1,27 @@
|
|
|
1
|
+
import type { FC, InputHTMLAttributes, ReactNode } from 'react';
|
|
1
2
|
import { forwardRef } from 'react';
|
|
2
|
-
import type * as React from 'react';
|
|
3
3
|
import { RadioButton, CheckBox } from '@basic-ui/core';
|
|
4
|
-
import {
|
|
5
|
-
|
|
4
|
+
import { rem } from 'polished';
|
|
5
|
+
|
|
6
|
+
import type { ChipBaseProps } from './ChipBase';
|
|
7
|
+
import { ChipBase } from './ChipBase';
|
|
8
|
+
import type { RippleBoxProps } from '../Ripple';
|
|
9
|
+
import { RippleBox } from '../Ripple';
|
|
6
10
|
import { useTheme } from '../theme';
|
|
7
11
|
import { Box } from '../Box';
|
|
8
|
-
import { rem } from 'polished';
|
|
9
12
|
|
|
10
13
|
export type ChoiceChipProps = ChipBaseProps<
|
|
11
14
|
HTMLInputElement,
|
|
12
|
-
|
|
15
|
+
InputHTMLAttributes<HTMLInputElement>
|
|
13
16
|
> & {
|
|
14
17
|
checked?: boolean;
|
|
15
18
|
disabled?: boolean;
|
|
16
19
|
type: 'checkbox' | 'radio';
|
|
17
|
-
leadingIcon?:
|
|
18
|
-
trailingIcon?:
|
|
20
|
+
leadingIcon?: ReactNode;
|
|
21
|
+
trailingIcon?: ReactNode;
|
|
19
22
|
};
|
|
20
23
|
|
|
21
|
-
const InnerInput:
|
|
24
|
+
const InnerInput: FC<any> = forwardRef<HTMLInputElement, ChoiceChipProps>(
|
|
22
25
|
function InnerInput(props, forwardedRef) {
|
|
23
26
|
const {
|
|
24
27
|
type,
|
|
@@ -66,7 +69,7 @@ const InnerInput: React.FC<any> = forwardRef<HTMLInputElement, ChoiceChipProps>(
|
|
|
66
69
|
<RippleBox<
|
|
67
70
|
RippleBoxProps<
|
|
68
71
|
HTMLInputElement,
|
|
69
|
-
|
|
72
|
+
InputHTMLAttributes<HTMLInputElement>
|
|
70
73
|
>
|
|
71
74
|
>
|
|
72
75
|
as="input"
|
|
@@ -113,9 +116,9 @@ export const ChoiceChip = forwardRef<HTMLInputElement, ChoiceChipProps>(
|
|
|
113
116
|
function ChoiceChip(props, forwardedRef) {
|
|
114
117
|
const { type = 'checkbox', ...otherProps } = props;
|
|
115
118
|
|
|
116
|
-
const Comp:
|
|
117
|
-
? RadioButton
|
|
118
|
-
|
|
119
|
+
const Comp: FC<ChoiceChipProps> = (
|
|
120
|
+
type === 'radio' ? RadioButton : CheckBox
|
|
121
|
+
) as any;
|
|
119
122
|
|
|
120
123
|
return (
|
|
121
124
|
<Comp ref={forwardedRef} as={InnerInput} type={type} {...otherProps} />
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import type { ChangeEvent } from 'react';
|
|
1
2
|
import { useMemo, useState } from 'react';
|
|
2
|
-
|
|
3
|
+
|
|
3
4
|
import {
|
|
4
5
|
Combobox,
|
|
5
6
|
ComboboxOption,
|
|
@@ -33,7 +34,7 @@ function UncontrolledClientSideExample({ initialValue = '' }) {
|
|
|
33
34
|
const [selected, setSelected] = useState(initialValue);
|
|
34
35
|
const results = useCityMatch(term);
|
|
35
36
|
|
|
36
|
-
const handleChange = (event:
|
|
37
|
+
const handleChange = (event: ChangeEvent<HTMLInputElement>) => {
|
|
37
38
|
setTerm(event.target.value);
|
|
38
39
|
};
|
|
39
40
|
|
|
@@ -91,7 +92,7 @@ function ControlledClientSideExample({ initialValue = '' }) {
|
|
|
91
92
|
const [selected, setSelected] = useState(initialValue);
|
|
92
93
|
const results = useCityMatch(term);
|
|
93
94
|
|
|
94
|
-
const handleChange = (event:
|
|
95
|
+
const handleChange = (event: ChangeEvent<HTMLInputElement>) => {
|
|
95
96
|
setTerm(event.target.value);
|
|
96
97
|
setSelected('');
|
|
97
98
|
};
|
|
@@ -1,32 +1,42 @@
|
|
|
1
|
-
import { FC,
|
|
2
|
-
import
|
|
1
|
+
import type { FC, HTMLAttributes, RefAttributes } from 'react';
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import type {
|
|
4
|
+
ComboboxProps as ComboboxPropsCore,
|
|
5
|
+
ComboboxInputProps as ComboboxInputPropsCore,
|
|
6
|
+
ComboboxLabelProps as ComboboxLabelPropsCore,
|
|
7
|
+
ComboboxListProps as ComboboxListPropsCore,
|
|
8
|
+
ComboboxOptionProps as ComboboxOptionPropsCore,
|
|
9
|
+
ComboboxPopoverProps as ComboboxPopoverPropsCore,
|
|
10
|
+
ComboboxButtonProps as ComboboxButtonPropsCore,
|
|
11
|
+
PopperProps as PopperCoreProps,
|
|
12
|
+
} from '@basic-ui/core';
|
|
3
13
|
import {
|
|
4
14
|
Combobox as _ComboboxCore,
|
|
5
|
-
ComboboxProps as ComboboxPropsCore,
|
|
6
15
|
ComboboxInput as _ComboboxInputCore,
|
|
7
|
-
ComboboxInputProps as ComboboxInputPropsCore,
|
|
8
16
|
ComboboxLabel as _ComboboxLabelCore,
|
|
9
|
-
ComboboxLabelProps as ComboboxLabelPropsCore,
|
|
10
17
|
ComboboxList as _ComboboxListCore,
|
|
11
|
-
ComboboxListProps as ComboboxListPropsCore,
|
|
12
18
|
ComboboxOption as _ComboboxOptionCore,
|
|
13
|
-
ComboboxOptionProps as ComboboxOptionPropsCore,
|
|
14
19
|
ComboboxPopover as _ComboboxPopoverCore,
|
|
15
|
-
ComboboxPopoverProps as ComboboxPopoverPropsCore,
|
|
16
20
|
ComboboxButton as _ComboboxButtonCore,
|
|
17
|
-
ComboboxButtonProps as ComboboxButtonPropsCore,
|
|
18
21
|
Popper as _PopperCore,
|
|
19
|
-
PopperProps as PopperCoreProps,
|
|
20
22
|
useComboBoxContext,
|
|
21
23
|
} from '@basic-ui/core';
|
|
22
|
-
import { Box, BoxProps } from '../Box';
|
|
23
|
-
import { TextField, TextFieldProps } from '../TextField';
|
|
24
|
-
import { List, ListProps } from '../List';
|
|
25
|
-
import { ListItem, ListItemProps } from '../ListItem';
|
|
26
|
-
import { Text, TextProps } from '../Text';
|
|
27
|
-
import { Button, ButtonProps } from '../Button';
|
|
28
24
|
import { rem } from 'polished';
|
|
25
|
+
|
|
26
|
+
import type { BoxProps } from '../Box';
|
|
27
|
+
import { Box } from '../Box';
|
|
28
|
+
import type { TextFieldProps } from '../TextField';
|
|
29
|
+
import { TextField } from '../TextField';
|
|
30
|
+
import type { ListProps } from '../List';
|
|
31
|
+
import { List } from '../List';
|
|
32
|
+
import type { ListItemProps } from '../ListItem';
|
|
33
|
+
import { ListItem } from '../ListItem';
|
|
34
|
+
import type { TextProps } from '../Text';
|
|
35
|
+
import { Text } from '../Text';
|
|
36
|
+
import type { ButtonProps } from '../Button';
|
|
37
|
+
import { Button } from '../Button';
|
|
29
38
|
import { alpha } from '../color';
|
|
39
|
+
import { EASING_STANDARD } from '../motion';
|
|
30
40
|
|
|
31
41
|
export { useComboBoxContext } from '@basic-ui/core';
|
|
32
42
|
|
|
@@ -34,7 +44,7 @@ export { useComboBoxContext } from '@basic-ui/core';
|
|
|
34
44
|
// Combobox
|
|
35
45
|
|
|
36
46
|
export type ComboboxProps = Omit<
|
|
37
|
-
BoxProps<HTMLDivElement,
|
|
47
|
+
BoxProps<HTMLDivElement, HTMLAttributes<HTMLDivElement>>,
|
|
38
48
|
'onSelect'
|
|
39
49
|
> &
|
|
40
50
|
ComboboxPropsCore;
|
|
@@ -63,7 +73,7 @@ export type ComboboxInputProps = Omit<
|
|
|
63
73
|
ComboboxInputPropsCore & TextFieldProps,
|
|
64
74
|
'ref'
|
|
65
75
|
> &
|
|
66
|
-
|
|
76
|
+
RefAttributes<HTMLInputElement>;
|
|
67
77
|
|
|
68
78
|
const ComboboxInputCore: FC<ComboboxInputProps> = _ComboboxInputCore as any;
|
|
69
79
|
|
|
@@ -85,7 +95,7 @@ export const ComboboxInput = forwardRef<HTMLInputElement, ComboboxInputProps>(
|
|
|
85
95
|
// ComboboxList
|
|
86
96
|
|
|
87
97
|
export type ComboboxListProps = Omit<ComboboxListPropsCore & ListProps, 'ref'> &
|
|
88
|
-
|
|
98
|
+
RefAttributes<HTMLUListElement>;
|
|
89
99
|
|
|
90
100
|
const ComboboxListCore: FC<ComboboxListProps> = _ComboboxListCore as any;
|
|
91
101
|
|
|
@@ -99,10 +109,11 @@ export const ComboboxList = forwardRef<HTMLUListElement, ComboboxListProps>(
|
|
|
99
109
|
innerAs={as}
|
|
100
110
|
outlined={false}
|
|
101
111
|
elevation={2}
|
|
112
|
+
darkThemeBackgroundOverlay={2}
|
|
102
113
|
__css={{
|
|
103
114
|
maxHeight: rem(300),
|
|
104
115
|
overflowY: 'auto',
|
|
105
|
-
borderRadius: '
|
|
116
|
+
borderRadius: 'extra-small',
|
|
106
117
|
'[data-popper-placement="top"] &': {
|
|
107
118
|
transformOrigin: 'bottom center',
|
|
108
119
|
},
|
|
@@ -145,7 +156,8 @@ const ComboboxPopperBox = forwardRef<HTMLDivElement, PopperProps>(
|
|
|
145
156
|
|
|
146
157
|
export type ComboboxPopoverProps = ComboboxPopoverPropsCore & ListProps;
|
|
147
158
|
|
|
148
|
-
const ComboboxPopoverCore: FC<ComboboxPopoverProps> =
|
|
159
|
+
const ComboboxPopoverCore: FC<ComboboxPopoverProps> =
|
|
160
|
+
_ComboboxPopoverCore as any;
|
|
149
161
|
|
|
150
162
|
export const ComboboxPopover = forwardRef<HTMLDivElement, ComboboxPopoverProps>(
|
|
151
163
|
(props, forwardedRef) => {
|
|
@@ -168,7 +180,7 @@ export type ComboboxOptionProps = Omit<
|
|
|
168
180
|
ComboboxOptionPropsCore & ListItemProps,
|
|
169
181
|
'ref'
|
|
170
182
|
> &
|
|
171
|
-
|
|
183
|
+
RefAttributes<HTMLLIElement>;
|
|
172
184
|
|
|
173
185
|
const ComboboxOptionCore: FC<ComboboxOptionProps> = _ComboboxOptionCore as any;
|
|
174
186
|
|
|
@@ -193,7 +205,7 @@ export type ComboboxLabelProps = Omit<
|
|
|
193
205
|
ComboboxLabelPropsCore & TextProps,
|
|
194
206
|
'ref'
|
|
195
207
|
> &
|
|
196
|
-
|
|
208
|
+
RefAttributes<HTMLLabelElement>;
|
|
197
209
|
|
|
198
210
|
const ComboboxLabelCore: FC<ComboboxLabelProps> = _ComboboxLabelCore as any;
|
|
199
211
|
|
|
@@ -236,8 +248,7 @@ export const ComboboxButton = forwardRef<
|
|
|
236
248
|
height: rem(40),
|
|
237
249
|
px: 0,
|
|
238
250
|
'& > svg': {
|
|
239
|
-
transition:
|
|
240
|
-
'transform .15s cubic-bezier(.4,0,.2,1), color .15s cubic-bezier(.4,0,.2,1)',
|
|
251
|
+
transition: `transform .15s ${EASING_STANDARD}, color .15s ${EASING_STANDARD}`,
|
|
241
252
|
},
|
|
242
253
|
'&[aria-expanded="false"] > svg': {
|
|
243
254
|
color: alpha('on.surface', 0.54),
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { useState } from 'react';
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
import type { DialogAnimationModes } from './';
|
|
4
|
+
import { Dialog } from './';
|
|
3
5
|
import { Button } from '../Button';
|
|
4
6
|
import { LoremIpsum } from '../Text/LoremIpsum';
|
|
5
7
|
import { Box } from '../Box';
|
package/src/Dialog/Dialog.tsx
CHANGED
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import { forwardRef } from 'react';
|
|
2
2
|
import { Portal } from '@basic-ui/core';
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
|
|
4
|
+
import type { ScrimProps } from './Scrim';
|
|
5
|
+
import { Scrim } from './Scrim';
|
|
6
|
+
import type { DialogContainerProps } from './DialogContainer';
|
|
7
|
+
import { DialogContainer } from './DialogContainer';
|
|
8
|
+
import type { DialogSurfaceProps } from './DialogSurface';
|
|
9
|
+
import { DialogSurface } from './DialogSurface';
|
|
6
10
|
import { useDialogAnimation } from './useDialogAnimation';
|
|
7
|
-
import {
|
|
11
|
+
import type { DialogBackdropProps } from './DialogBackdrop';
|
|
12
|
+
import { DialogBackdrop } from './DialogBackdrop';
|
|
8
13
|
import type { DialogAnimationModes } from './useDialogAnimation';
|
|
9
14
|
export type { DialogAnimationModes } from './useDialogAnimation';
|
|
10
15
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
+
import type { FC, Ref } from 'react';
|
|
1
2
|
import { forwardRef } from 'react';
|
|
2
|
-
import type
|
|
3
|
-
import {
|
|
4
|
-
ModalBackdrop as _ModalBackdrop,
|
|
5
|
-
ModalBackdropProps,
|
|
6
|
-
} from '@basic-ui/core';
|
|
7
|
-
import { Box, BoxProps } from '../Box';
|
|
3
|
+
import type { ModalBackdropProps } from '@basic-ui/core';
|
|
4
|
+
import { ModalBackdrop as _ModalBackdrop } from '@basic-ui/core';
|
|
8
5
|
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
import type { BoxProps } from '../Box';
|
|
7
|
+
import { Box } from '../Box';
|
|
8
|
+
|
|
9
|
+
const ModalBackdrop = _ModalBackdrop as FC<
|
|
10
|
+
DialogBackdropProps & { ref?: Ref<HTMLDivElement> }
|
|
11
11
|
>;
|
|
12
12
|
|
|
13
13
|
export type DialogBackdropProps = ModalBackdropProps &
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
+
import type { FC, Ref } from 'react';
|
|
1
2
|
import { forwardRef } from 'react';
|
|
2
|
-
import type
|
|
3
|
-
import { Modal as _Modal
|
|
4
|
-
import { Paper, PaperProps } from '../Paper';
|
|
5
|
-
import { useTheme } from '../theme';
|
|
3
|
+
import type { ModalProps } from '@basic-ui/core';
|
|
4
|
+
import { Modal as _Modal } from '@basic-ui/core';
|
|
6
5
|
import { rem } from 'polished';
|
|
7
6
|
import { get, variant } from 'styled-system';
|
|
8
|
-
import { getColorOverlay } from '../color';
|
|
9
7
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
import type { PaperProps } from '../Paper';
|
|
9
|
+
import { Paper } from '../Paper';
|
|
10
|
+
import { useTheme } from '../theme';
|
|
11
|
+
|
|
12
|
+
const Modal = _Modal as FC<DialogSurfaceProps & { ref?: Ref<HTMLDivElement> }>;
|
|
13
13
|
|
|
14
14
|
export type DialogSurfaceProps = ModalProps &
|
|
15
15
|
PaperProps & {
|
|
@@ -30,8 +30,8 @@ export const DialogSurface = forwardRef<HTMLDivElement, DialogSurfaceProps>(
|
|
|
30
30
|
as={Paper}
|
|
31
31
|
theme={theme}
|
|
32
32
|
elevation={3}
|
|
33
|
+
darkThemeBackgroundOverlay={overlayValue}
|
|
33
34
|
__css={{
|
|
34
|
-
...getColorOverlay(theme, 'surface', 'primary', overlayValue),
|
|
35
35
|
position: 'relative',
|
|
36
36
|
borderRadius: 'small',
|
|
37
37
|
width: '100%',
|
package/src/Dialog/Scrim.tsx
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { useAnimation } from '../hooks/useAnimation';
|
|
2
|
+
import { EASING_STANDARD } from '../motion';
|
|
2
3
|
|
|
3
4
|
const styles = {
|
|
4
5
|
slide: {
|
|
@@ -34,10 +35,8 @@ export function useDialogAnimation(opts: {
|
|
|
34
35
|
});
|
|
35
36
|
const scrimOpacity = state === 'open' ? 1 : 0;
|
|
36
37
|
|
|
37
|
-
const transition = `opacity ${timing}ms
|
|
38
|
-
const scrimTransition = `opacity ${
|
|
39
|
-
(timing * 0.4) | 0
|
|
40
|
-
}ms cubic-bezier(.4,0,.2,1)`;
|
|
38
|
+
const transition = `opacity ${timing}ms ${EASING_STANDARD},transform ${timing}ms ${EASING_STANDARD}`;
|
|
39
|
+
const scrimTransition = `opacity ${(timing * 0.4) | 0}ms ${EASING_STANDARD}`;
|
|
41
40
|
|
|
42
41
|
return {
|
|
43
42
|
containerStyle: { ...style, transition },
|
package/src/Divider/Divider.tsx
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
|
+
import type { ElementType } from 'react';
|
|
1
2
|
import { forwardRef } from 'react';
|
|
2
|
-
import type * as React from 'react';
|
|
3
|
-
import { Box, BoxProps } from '../Box';
|
|
4
3
|
import { rem } from 'polished';
|
|
4
|
+
|
|
5
|
+
import type { BoxProps } from '../Box';
|
|
6
|
+
import { Box } from '../Box';
|
|
5
7
|
import { alpha } from '../color';
|
|
6
8
|
|
|
7
9
|
export interface DividerProps extends BoxProps {
|
|
8
|
-
as?:
|
|
10
|
+
as?: ElementType<any>;
|
|
9
11
|
direction?: 'vertical' | 'horizontal';
|
|
10
12
|
}
|
|
11
13
|
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
+
import type { ComponentType, LabelHTMLAttributes, ReactNode } from 'react';
|
|
1
2
|
import { forwardRef } from 'react';
|
|
2
|
-
import type * as React from 'react';
|
|
3
|
-
import { Text as _Text } from '../Text';
|
|
4
3
|
import { rem } from 'polished';
|
|
4
|
+
|
|
5
|
+
import { Text as _Text } from '../Text';
|
|
5
6
|
import { useNotchedOutlineContext } from '../NotchedOutline/context';
|
|
7
|
+
import { EASING_STANDARD } from '../motion';
|
|
6
8
|
|
|
7
9
|
export interface FloatingLabelProps
|
|
8
|
-
extends
|
|
9
|
-
children?:
|
|
10
|
+
extends LabelHTMLAttributes<HTMLLabelElement> {
|
|
11
|
+
children?: ReactNode;
|
|
10
12
|
active?: boolean;
|
|
11
13
|
offsetX?: number;
|
|
12
14
|
height?: number;
|
|
@@ -35,7 +37,7 @@ export const FloatingLabel = forwardRef<HTMLLabelElement, FloatingLabelProps>(
|
|
|
35
37
|
const ctx = useNotchedOutlineContext();
|
|
36
38
|
const notchStart = ctx ? ctx.notchStart : 0;
|
|
37
39
|
|
|
38
|
-
const Text:
|
|
40
|
+
const Text: ComponentType<any> = _Text;
|
|
39
41
|
|
|
40
42
|
const translateX =
|
|
41
43
|
translateXProp !== undefined ? translateXProp : notchStart - offsetX;
|
|
@@ -49,7 +51,7 @@ export const FloatingLabel = forwardRef<HTMLLabelElement, FloatingLabelProps>(
|
|
|
49
51
|
return (
|
|
50
52
|
<Text
|
|
51
53
|
as="label"
|
|
52
|
-
variant="
|
|
54
|
+
variant="body-large"
|
|
53
55
|
ref={forwardedRef}
|
|
54
56
|
__css={{
|
|
55
57
|
position: 'absolute',
|
|
@@ -59,7 +61,7 @@ export const FloatingLabel = forwardRef<HTMLLabelElement, FloatingLabelProps>(
|
|
|
59
61
|
left: rem(offsetX),
|
|
60
62
|
height: typeof height === 'number' ? rem(height) : height,
|
|
61
63
|
transformOrigin: 'left center',
|
|
62
|
-
transition: `transform ${transitionTime}ms
|
|
64
|
+
transition: `transform ${transitionTime}ms ${EASING_STANDARD}, color ${transitionTime}ms ${EASING_STANDARD}`,
|
|
63
65
|
pointerEvents: 'none',
|
|
64
66
|
}}
|
|
65
67
|
style={{
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { useRef, useState } from 'react';
|
|
2
|
+
|
|
2
3
|
import { LineRipple } from './';
|
|
3
4
|
import { Box } from '../Box';
|
|
4
5
|
import { Text } from '../Text';
|
|
@@ -28,7 +29,7 @@ const Example = () => {
|
|
|
28
29
|
bg="#eee"
|
|
29
30
|
overflow="hidden"
|
|
30
31
|
>
|
|
31
|
-
<Text variant="
|
|
32
|
+
<Text variant="body-medium" style={{ zIndex: 1 }}>
|
|
32
33
|
Hello
|
|
33
34
|
</Text>
|
|
34
35
|
<LineRipple active={active} />
|
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import type { CSSProperties, ReactNode } from 'react';
|
|
2
|
+
import { forwardRef, useState, useRef, useEffect } from 'react';
|
|
3
3
|
import { rem } from 'polished';
|
|
4
|
+
|
|
4
5
|
import { useTheme } from '../theme';
|
|
5
|
-
import {
|
|
6
|
+
import type { BoxProps } from '../Box';
|
|
7
|
+
import { Box } from '../Box';
|
|
8
|
+
import { EASING_STANDARD } from '../motion';
|
|
6
9
|
|
|
7
10
|
export interface LineRippleProps extends BoxProps {
|
|
8
11
|
active?: boolean;
|
|
9
12
|
transitionDuration?: number;
|
|
10
13
|
posx?: number;
|
|
11
|
-
children?:
|
|
14
|
+
children?: ReactNode;
|
|
12
15
|
}
|
|
13
16
|
|
|
14
17
|
export const LineRipple = forwardRef<HTMLDivElement, LineRippleProps>(
|
|
@@ -67,7 +70,7 @@ export const LineRipple = forwardRef<HTMLDivElement, LineRippleProps>(
|
|
|
67
70
|
zIndex: 1,
|
|
68
71
|
transform: 'scaleX(0)',
|
|
69
72
|
transformOrigin: 'center center',
|
|
70
|
-
transition: `transform ${transitionDuration}ms
|
|
73
|
+
transition: `transform ${transitionDuration}ms ${EASING_STANDARD},opacity ${transitionDuration}ms ${EASING_STANDARD}`,
|
|
71
74
|
opacity: 0,
|
|
72
75
|
...__css,
|
|
73
76
|
}}
|
package/src/Link/Link.tsx
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
|
+
import type { AnchorHTMLAttributes } from 'react';
|
|
1
2
|
import { forwardRef } from 'react';
|
|
2
|
-
import type * as React from 'react';
|
|
3
|
-
import { Box, BoxProps } from '../Box';
|
|
4
3
|
import { rem } from 'polished';
|
|
4
|
+
|
|
5
|
+
import type { BoxProps } from '../Box';
|
|
6
|
+
import { Box } from '../Box';
|
|
5
7
|
import { alpha } from '../color';
|
|
6
8
|
|
|
7
9
|
export interface LinkProps
|
|
8
|
-
extends BoxProps<
|
|
9
|
-
HTMLAnchorElement,
|
|
10
|
-
React.AnchorHTMLAttributes<HTMLAnchorElement>
|
|
11
|
-
> {
|
|
10
|
+
extends BoxProps<HTMLAnchorElement, AnchorHTMLAttributes<HTMLAnchorElement>> {
|
|
12
11
|
color?: string;
|
|
13
12
|
// ReachRouter Props
|
|
14
13
|
to?: string;
|