@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,11 +1,11 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import { InputProps } from './Input';
|
|
3
|
-
import { BoxProps } from '../Box';
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { InputProps } from './Input';
|
|
3
|
+
import type { BoxProps } from '../Box';
|
|
4
4
|
export declare type TextFieldProps = Omit<InputProps, 'value' | 'defaultValue'> & {
|
|
5
5
|
variant?: 'outlined' | 'filled';
|
|
6
6
|
containerProps?: Omit<BoxProps, 'color'>;
|
|
7
7
|
color?: 'primary' | 'secondary';
|
|
8
|
-
label?:
|
|
8
|
+
label?: ReactNode;
|
|
9
9
|
helperText?: string;
|
|
10
10
|
maxLength?: number;
|
|
11
11
|
hideCharacterCounter?: boolean;
|
|
@@ -13,7 +13,7 @@ export declare type TextFieldProps = Omit<InputProps, 'value' | 'defaultValue'>
|
|
|
13
13
|
value?: string;
|
|
14
14
|
multiline?: boolean;
|
|
15
15
|
error?: boolean | string;
|
|
16
|
-
leadingIcon?:
|
|
17
|
-
trailingIcon?:
|
|
16
|
+
leadingIcon?: ReactNode;
|
|
17
|
+
trailingIcon?: ReactNode;
|
|
18
18
|
};
|
|
19
|
-
export declare const TextField:
|
|
19
|
+
export declare const TextField: import("react").ForwardRefExoticComponent<Pick<TextFieldProps, "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" | "form" | "label" | "pattern" | "list" | "error" | "step" | "autoFocus" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "type" | "multiple" | "alt" | "autoComplete" | "accept" | "capture" | "checked" | "maxLength" | "minLength" | "src" | "crossOrigin" | "enterKeyHint" | "max" | "min" | "readOnly" | "required" | "multiline" | "hasLabel" | "leadingIcon" | "trailingIcon" | "containerProps" | "helperText" | "hideCharacterCounter"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import
|
|
2
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
+
var _excluded = ["type", "id", "variant", "color", "value", "defaultValue", "error", "disabled", "maxLength", "hideCharacterCounter", "label", "placeholder", "helperText", "multiline", "onChange", "onFocus", "onBlur", "leadingIcon", "trailingIcon", "containerProps"];
|
|
3
5
|
import { forwardRef, useState, useId } from 'react';
|
|
4
6
|
import { wrapEvent, useControlledState } from '@basic-ui/core';
|
|
5
7
|
import { Input } from './Input';
|
|
@@ -11,7 +13,7 @@ import { Box } from '../Box';
|
|
|
11
13
|
import { IconContainer } from './IconContainer';
|
|
12
14
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
15
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
|
-
|
|
16
|
+
var componentMap = {
|
|
15
17
|
outlined: OutlinedContainer,
|
|
16
18
|
filled: FilledContainer
|
|
17
19
|
};
|
|
@@ -24,58 +26,74 @@ function characterCounter(value, maxLength) {
|
|
|
24
26
|
return "".concat(typeof value === 'string' ? value.length : 0, " / ").concat(maxLength);
|
|
25
27
|
}
|
|
26
28
|
|
|
27
|
-
export
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
29
|
+
export var TextField = /*#__PURE__*/forwardRef(function TextField(props, forwardedRef) {
|
|
30
|
+
var _props$type = props.type,
|
|
31
|
+
type = _props$type === void 0 ? 'text' : _props$type,
|
|
32
|
+
idProp = props.id,
|
|
33
|
+
_props$variant = props.variant,
|
|
34
|
+
variant = _props$variant === void 0 ? 'outlined' : _props$variant,
|
|
35
|
+
_props$color = props.color,
|
|
36
|
+
color = _props$color === void 0 ? 'primary' : _props$color,
|
|
37
|
+
valueProp = props.value,
|
|
38
|
+
_props$defaultValue = props.defaultValue,
|
|
39
|
+
defaultValue = _props$defaultValue === void 0 ? '' : _props$defaultValue,
|
|
40
|
+
error = props.error,
|
|
41
|
+
disabled = props.disabled,
|
|
42
|
+
maxLength = props.maxLength,
|
|
43
|
+
_props$hideCharacterC = props.hideCharacterCounter,
|
|
44
|
+
hideCharacterCounter = _props$hideCharacterC === void 0 ? false : _props$hideCharacterC,
|
|
45
|
+
_props$label = props.label,
|
|
46
|
+
label = _props$label === void 0 ? null : _props$label,
|
|
47
|
+
placeholder = props.placeholder,
|
|
48
|
+
helperTextProp = props.helperText,
|
|
49
|
+
multiline = props.multiline,
|
|
50
|
+
onChangeProp = props.onChange,
|
|
51
|
+
onFocus = props.onFocus,
|
|
52
|
+
onBlur = props.onBlur,
|
|
53
|
+
_props$leadingIcon = props.leadingIcon,
|
|
54
|
+
leadingIcon = _props$leadingIcon === void 0 ? null : _props$leadingIcon,
|
|
55
|
+
_props$trailingIcon = props.trailingIcon,
|
|
56
|
+
trailingIcon = _props$trailingIcon === void 0 ? null : _props$trailingIcon,
|
|
57
|
+
containerProps = props.containerProps,
|
|
58
|
+
otherProps = _objectWithoutProperties(props, _excluded);
|
|
51
59
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
60
|
+
var _useControlledState = useControlledState(valueProp, onChangeProp, defaultValue, function (setState) {
|
|
61
|
+
return function (e) {
|
|
62
|
+
setState(e.target.value);
|
|
63
|
+
};
|
|
64
|
+
}),
|
|
65
|
+
_useControlledState2 = _slicedToArray(_useControlledState, 2),
|
|
66
|
+
value = _useControlledState2[0],
|
|
67
|
+
onChange = _useControlledState2[1];
|
|
68
|
+
|
|
69
|
+
var _useState = useState(false),
|
|
70
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
71
|
+
hasFocus = _useState2[0],
|
|
72
|
+
setHasFocus = _useState2[1];
|
|
73
|
+
|
|
74
|
+
var Container = componentMap[variant] || OutlinedContainer;
|
|
75
|
+
var fallbackId = useId();
|
|
76
|
+
var theme = useTheme();
|
|
59
77
|
|
|
60
|
-
|
|
78
|
+
var handleFocus = function handleFocus() {
|
|
61
79
|
setHasFocus(true);
|
|
62
80
|
};
|
|
63
81
|
|
|
64
|
-
|
|
82
|
+
var handleBlur = function handleBlur() {
|
|
65
83
|
setHasFocus(false);
|
|
66
84
|
};
|
|
67
85
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
86
|
+
var hasError = Boolean(error);
|
|
87
|
+
var helperText = typeof error === 'string' ? error : helperTextProp;
|
|
88
|
+
var id = idProp || fallbackId;
|
|
89
|
+
var inputId = "".concat(id, "-text-field");
|
|
90
|
+
var helperTextId = helperText ? "".concat(id, "-helper-text") : undefined;
|
|
91
|
+
var labelIsFloating = hasFocus || typeof value === 'string' && value.length > 0;
|
|
74
92
|
return /*#__PURE__*/_jsxs(Box, {
|
|
75
93
|
display: "inline-flex",
|
|
76
94
|
flexDirection: "column",
|
|
77
95
|
width: "100%",
|
|
78
|
-
children: [/*#__PURE__*/_jsxs(Container, _extends({
|
|
96
|
+
children: [/*#__PURE__*/_jsxs(Container, _extends(_extends({
|
|
79
97
|
theme: theme,
|
|
80
98
|
label: label,
|
|
81
99
|
color: color,
|
|
@@ -85,7 +103,7 @@ export const TextField = /*#__PURE__*/forwardRef(function TextField(props, forwa
|
|
|
85
103
|
hasFocus: hasFocus,
|
|
86
104
|
disabled: disabled,
|
|
87
105
|
leadingIcon: Boolean(leadingIcon)
|
|
88
|
-
}, containerProps, {
|
|
106
|
+
}, containerProps), {}, {
|
|
89
107
|
children: [leadingIcon && /*#__PURE__*/_jsx(IconContainer, {
|
|
90
108
|
position: "start",
|
|
91
109
|
children: leadingIcon
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"TextField.js","names":["forwardRef","useState","useId","wrapEvent","useControlledState","Input","useTheme","FilledContainer","OutlinedContainer","HelperText","Box","IconContainer","componentMap","outlined","filled","characterCounter","value","maxLength","undefined","length","TextField","props","forwardedRef","type","idProp","id","variant","color","valueProp","defaultValue","error","disabled","hideCharacterCounter","label","placeholder","helperTextProp","helperText","multiline","onChangeProp","onChange","onFocus","onBlur","leadingIcon","trailingIcon","containerProps","otherProps","setState","e","target","hasFocus","setHasFocus","Container","fallbackId","theme","handleFocus","handleBlur","hasError","Boolean","inputId","helperTextId","labelIsFloating"],"sources":["../../../src/TextField/TextField.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport { forwardRef, useState, useId } from 'react';\nimport { wrapEvent, useControlledState } from '@basic-ui/core';\n\nimport type { InputProps } from './Input';\nimport { Input } from './Input';\nimport { useTheme } from '../theme';\nimport { FilledContainer } from './FilledContainer';\nimport { OutlinedContainer } from './OutlinedContainer';\nimport { HelperText } from './HelperText';\nimport type { BoxProps } from '../Box';\nimport { Box } from '../Box';\nimport { IconContainer } from './IconContainer';\n\nconst componentMap = {\n outlined: OutlinedContainer,\n filled: FilledContainer,\n};\n\nfunction characterCounter(\n value: string | number | string[],\n maxLength?: number\n) {\n if (maxLength === undefined) {\n return null;\n }\n\n return `${typeof value === 'string' ? value.length : 0} / ${maxLength}`;\n}\n\nexport type TextFieldProps = Omit<InputProps, 'value' | 'defaultValue'> & {\n variant?: 'outlined' | 'filled';\n containerProps?: Omit<BoxProps, 'color'>;\n color?: 'primary' | 'secondary';\n label?: ReactNode;\n helperText?: string;\n maxLength?: number;\n hideCharacterCounter?: boolean;\n defaultValue?: string;\n value?: string;\n multiline?: boolean;\n error?: boolean | string;\n leadingIcon?: ReactNode;\n trailingIcon?: ReactNode;\n};\n\nexport const TextField = forwardRef<HTMLInputElement, TextFieldProps>(\n function TextField(props, forwardedRef) {\n const {\n type = 'text',\n id: idProp,\n variant = 'outlined',\n color = 'primary',\n value: valueProp,\n defaultValue = '',\n error,\n disabled,\n maxLength,\n hideCharacterCounter = false,\n label = null,\n placeholder,\n helperText: helperTextProp,\n multiline,\n onChange: onChangeProp,\n onFocus,\n onBlur,\n leadingIcon = null,\n trailingIcon = null,\n containerProps,\n ...otherProps\n } = props;\n const [value, onChange] = useControlledState(\n valueProp,\n onChangeProp,\n defaultValue,\n (setState) => (e) => {\n setState(e.target.value);\n }\n );\n const [hasFocus, setHasFocus] = useState(false);\n\n const Container = componentMap[variant] || OutlinedContainer;\n\n const fallbackId = useId();\n\n const theme = useTheme();\n\n const handleFocus = () => {\n setHasFocus(true);\n };\n\n const handleBlur = () => {\n setHasFocus(false);\n };\n\n const hasError = Boolean(error);\n const helperText = typeof error === 'string' ? error : helperTextProp;\n\n const id = idProp || fallbackId;\n const inputId = `${id}-text-field`;\n const helperTextId = helperText ? `${id}-helper-text` : undefined;\n\n const labelIsFloating =\n hasFocus || (typeof value === 'string' && value.length > 0);\n\n return (\n <Box display=\"inline-flex\" flexDirection=\"column\" width=\"100%\">\n <Container\n theme={theme}\n label={label}\n color={color}\n error={hasError}\n labelIsFloating={labelIsFloating}\n inputId={inputId}\n hasFocus={hasFocus}\n disabled={disabled}\n leadingIcon={Boolean(leadingIcon)}\n {...containerProps}\n >\n {leadingIcon && (\n <IconContainer position=\"start\">{leadingIcon}</IconContainer>\n )}\n <Input\n ref={forwardedRef}\n as={multiline ? 'textarea' : 'input'}\n variant={variant}\n type={type}\n id={inputId}\n onFocus={wrapEvent(onFocus, handleFocus)}\n onBlur={wrapEvent(onBlur, handleBlur)}\n onChange={onChange}\n value={value}\n theme={theme}\n placeholder={placeholder}\n disabled={disabled}\n aria-disabled={disabled ? 'true' : undefined}\n maxLength={maxLength}\n multiline={multiline}\n aria-describedby={helperTextId}\n hasLabel={!!label}\n leadingIcon={Boolean(leadingIcon)}\n trailingIcon={Boolean(trailingIcon)}\n {...otherProps}\n />\n {trailingIcon && (\n <IconContainer position=\"end\">{trailingIcon}</IconContainer>\n )}\n </Container>\n\n <HelperText\n error={hasError}\n disabled={disabled}\n leftSide={helperText && <span id={helperTextId}>{helperText}</span>}\n rightSide={\n !hideCharacterCounter &&\n characterCounter(value as string, maxLength)\n }\n />\n </Box>\n );\n }\n);\n"],"mappings":";;;;AACA,SAASA,UAAT,EAAqBC,QAArB,EAA+BC,KAA/B,QAA4C,OAA5C;AACA,SAASC,SAAT,EAAoBC,kBAApB,QAA8C,gBAA9C;AAGA,SAASC,KAAT,QAAsB,SAAtB;AACA,SAASC,QAAT,QAAyB,UAAzB;AACA,SAASC,eAAT,QAAgC,mBAAhC;AACA,SAASC,iBAAT,QAAkC,qBAAlC;AACA,SAASC,UAAT,QAA2B,cAA3B;AAEA,SAASC,GAAT,QAAoB,QAApB;AACA,SAASC,aAAT,QAA8B,iBAA9B;;;AAEA,IAAMC,YAAY,GAAG;EACnBC,QAAQ,EAAEL,iBADS;EAEnBM,MAAM,EAAEP;AAFW,CAArB;;AAKA,SAASQ,gBAAT,CACEC,KADF,EAEEC,SAFF,EAGE;EACA,IAAIA,SAAS,KAAKC,SAAlB,EAA6B;IAC3B,OAAO,IAAP;EACD;;EAED,iBAAU,OAAOF,KAAP,KAAiB,QAAjB,GAA4BA,KAAK,CAACG,MAAlC,GAA2C,CAArD,gBAA4DF,SAA5D;AACD;;AAkBD,OAAO,IAAMG,SAAS,gBAAGpB,UAAU,CACjC,SAASoB,SAAT,CAAmBC,KAAnB,EAA0BC,YAA1B,EAAwC;EACtC,kBAsBID,KAtBJ,CACEE,IADF;EAAA,IACEA,IADF,4BACS,MADT;EAAA,IAEMC,MAFN,GAsBIH,KAtBJ,CAEEI,EAFF;EAAA,qBAsBIJ,KAtBJ,CAGEK,OAHF;EAAA,IAGEA,OAHF,+BAGY,UAHZ;EAAA,mBAsBIL,KA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|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
1
|
+
export var PADDING_LEFT_WITH_ICON = 14;
|
|
2
|
+
export var PADDING_LEFT_WITHOUT_ICON = 16;
|
|
3
|
+
export var ICON_WIDTH = 24;
|
|
4
|
+
export var PADDING_RIGHT_WITH_ICON = 12;
|
|
5
|
+
export var PADDING_RIGHT_WITHOUT_ICON = 16;
|
|
6
6
|
//# sourceMappingURL=consts.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"consts.js","names":["PADDING_LEFT_WITH_ICON","PADDING_LEFT_WITHOUT_ICON","ICON_WIDTH","PADDING_RIGHT_WITH_ICON","PADDING_RIGHT_WITHOUT_ICON"],"sources":["../../../src/TextField/consts.ts"],"sourcesContent":["export const PADDING_LEFT_WITH_ICON = 14;\nexport const PADDING_LEFT_WITHOUT_ICON = 16;\n\nexport const ICON_WIDTH = 24;\n\nexport const PADDING_RIGHT_WITH_ICON = 12;\nexport const PADDING_RIGHT_WITHOUT_ICON = 16;\n"],"mappings":"AAAA,OAAO,IAAMA,sBAAsB,GAAG,EAA/B;AACP,OAAO,IAAMC,yBAAyB,GAAG,EAAlC;AAEP,OAAO,IAAMC,UAAU,GAAG,EAAnB;AAEP,OAAO,IAAMC,uBAAuB,GAAG,EAAhC;AACP,OAAO,IAAMC,0BAA0B,GAAG,EAAnC"}
|
|
File without changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/TextField/index.ts"],"sourcesContent":["export * from './TextField';\nexport * from './FilledContainer';\nexport * from './OutlinedContainer';\nexport * from './HelperText';\n"],"mappings":"AAAA,cAAc,aAAd;AACA,cAAc,mBAAd;AACA,cAAc,qBAAd;AACA,cAAc,cAAd"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Color, ColorPickerProps as BaseColorPickerProps } from '@basic-ui/color-picker';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import type { Color, ColorPickerProps as BaseColorPickerProps } from '@basic-ui/color-picker';
|
|
2
|
+
import type { FC } from 'react';
|
|
3
|
+
import type { BoxProps } from '../Box';
|
|
4
4
|
export declare type ColorPickerProps = (Omit<BoxProps, 'color' | 'onChange'> & BaseColorPickerProps) & {
|
|
5
5
|
color: Color;
|
|
6
6
|
onChange: (color: Color) => void;
|
|
7
7
|
};
|
|
8
|
-
export declare const ColorPicker:
|
|
8
|
+
export declare const ColorPicker: FC<ColorPickerProps>;
|
|
@@ -1,30 +1,31 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["color", "onChange", "width", "height"];
|
|
3
4
|
import { ColorPicker as _BaseColorPicker, Hue as _Hue, HueCursor as _HueCursor, Saturation as _Saturation, SaturationCursor as _SaturationCursor } from '@basic-ui/color-picker';
|
|
4
5
|
import { Box } from '../Box';
|
|
5
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
7
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
export
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
otherProps =
|
|
8
|
+
var BaseColorPicker = _BaseColorPicker;
|
|
9
|
+
var Hue = _Hue;
|
|
10
|
+
var HueCursor = _HueCursor;
|
|
11
|
+
var Saturation = _Saturation;
|
|
12
|
+
var SaturationCursor = _SaturationCursor;
|
|
13
|
+
export var ColorPicker = function ColorPicker(_ref) {
|
|
14
|
+
var color = _ref.color,
|
|
15
|
+
onChange = _ref.onChange,
|
|
16
|
+
_ref$width = _ref.width,
|
|
17
|
+
width = _ref$width === void 0 ? 450 : _ref$width,
|
|
18
|
+
_ref$height = _ref.height,
|
|
19
|
+
height = _ref$height === void 0 ? 225 : _ref$height,
|
|
20
|
+
otherProps = _objectWithoutProperties(_ref, _excluded);
|
|
20
21
|
|
|
21
|
-
return /*#__PURE__*/_jsxs(BaseColorPicker, _extends({
|
|
22
|
+
return /*#__PURE__*/_jsxs(BaseColorPicker, _extends(_extends({
|
|
22
23
|
as: Box,
|
|
23
24
|
width: width,
|
|
24
25
|
height: height,
|
|
25
26
|
onChange: onChange,
|
|
26
27
|
color: color
|
|
27
|
-
}, otherProps, {
|
|
28
|
+
}, otherProps), {}, {
|
|
28
29
|
children: [/*#__PURE__*/_jsx(Saturation, {
|
|
29
30
|
as: Box,
|
|
30
31
|
sx: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"ColorPicker.js","names":["ColorPicker","_BaseColorPicker","Hue","_Hue","HueCursor","_HueCursor","Saturation","_Saturation","SaturationCursor","_SaturationCursor","Box","BaseColorPicker","color","onChange","width","height","otherProps","position","touchAction","userSelect","backgroundImage","border","borderRadius","boxShadow","boxSizing","transform"],"sources":["../../../src/ThemeExplorer/ColorPicker.tsx"],"sourcesContent":["import type {\n Color,\n ColorPickerProps as BaseColorPickerProps,\n HueProps,\n HueCursorProps,\n SaturationProps,\n SaturationCursorProps,\n} from '@basic-ui/color-picker';\nimport {\n ColorPicker as _BaseColorPicker,\n Hue as _Hue,\n HueCursor as _HueCursor,\n Saturation as _Saturation,\n SaturationCursor as _SaturationCursor,\n} from '@basic-ui/color-picker';\nimport type { FC } from 'react';\n\nimport type { BoxProps } from '../Box';\nimport { Box } from '../Box';\n\nexport type ColorPickerProps = (Omit<BoxProps, 'color' | 'onChange'> &\n BaseColorPickerProps) & {\n color: Color;\n onChange: (color: Color) => void;\n};\n\nconst BaseColorPicker: FC<\n Omit<BoxProps, 'color' | 'onChange'> & BaseColorPickerProps\n> = _BaseColorPicker as any;\nconst Hue: FC<BoxProps & HueProps> = _Hue as any;\nconst HueCursor: FC<BoxProps & HueCursorProps> = _HueCursor as any;\nconst Saturation: FC<BoxProps & SaturationProps> = _Saturation as any;\nconst SaturationCursor: FC<BoxProps & SaturationCursorProps> =\n _SaturationCursor as any;\n\nexport const ColorPicker: FC<ColorPickerProps> = ({\n color,\n onChange,\n width = 450,\n height = 225,\n ...otherProps\n}) => {\n return (\n <BaseColorPicker\n as={Box}\n width={width}\n height={height}\n onChange={onChange}\n color={color}\n {...otherProps}\n >\n <Saturation\n as={Box}\n sx={{\n position: 'relative',\n touchAction: 'none',\n userSelect: 'none',\n width: '100%',\n backgroundImage:\n 'linear-gradient(transparent, black), linear-gradient(to right, white, transparent)',\n }}\n >\n <SaturationCursor\n as={Box}\n sx={{\n position: 'absolute',\n width: '20px',\n height: '20px',\n border: '2px solid #ffffff',\n borderRadius: 'full',\n boxShadow: '0 0 15px 0 rgba(0, 0, 0, 0.15)',\n boxSizing: 'border-box',\n transform: 'translate(-10px, -10px)',\n }}\n />\n </Saturation>\n <Hue\n as={Box}\n sx={{\n position: 'relative',\n touchAction: 'none',\n userSelect: 'none',\n width: '100%',\n height: '12px',\n backgroundImage: `linear-gradient(to right, rgb(255, 0, 0), rgb(255, 255, 0), rgb(0, 255, 0), rgb(0, 255, 255), rgb(0, 0, 255), rgb(255, 0, 255), rgb(255, 0, 0))`,\n }}\n >\n <HueCursor\n as={Box}\n sx={{\n position: 'absolute',\n width: '20px',\n height: '20px',\n border: '2px solid #ffffff',\n borderRadius: 'full',\n boxShadow: 'rgba(0, 0, 0, 0.2) 0px 0px 0px 0.5px',\n boxSizing: 'border-box',\n transform: 'translate(-10px, -4px)',\n }}\n />\n </Hue>\n </BaseColorPicker>\n );\n};\n"],"mappings":";;;AAQA,SACEA,WAAW,IAAIC,gBADjB,EAEEC,GAAG,IAAIC,IAFT,EAGEC,SAAS,IAAIC,UAHf,EAIEC,UAAU,IAAIC,WAJhB,EAKEC,gB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UAAU,EAAE,MAHV;QAIFL,KAAK,EAAE,MAJL;QAKFC,MAAM,EAAE,MALN;QAMFK,eAAe;MANb,CAFN;MAAA,uBAWE,KAAC,SAAD;QACE,EAAE,EAAEV,GADN;QAEE,EAAE,EAAE;UACFO,QAAQ,EAAE,UADR;UAEFH,KAAK,EAAE,MAFL;UAGFC,MAAM,EAAE,MAHN;UAIFM,MAAM,EAAE,mBAJN;UAKFC,YAAY,EAAE,MALZ;UAMFC,SAAS,EAAE,sCANT;UAOFC,SAAS,EAAE,YAPT;UAQFC,SAAS,EAAE;QART;MAFN;IAXF,EAjCF;EAAA,GADF;AA6DD,CApEM"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { Color } from '@basic-ui/color-picker';
|
|
3
|
-
import { TextFieldProps } from '../';
|
|
2
|
+
import type { Color } from '@basic-ui/color-picker';
|
|
3
|
+
import type { TextFieldProps } from '../';
|
|
4
4
|
export interface TextFieldColorPickerProps extends Omit<TextFieldProps, 'value' | 'defaultValue' | 'onChange'> {
|
|
5
5
|
value?: Color;
|
|
6
6
|
defaultValue?: Color;
|
|
@@ -1,38 +1,54 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import
|
|
2
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
+
var _excluded = ["value", "defaultValue", "onChange", "disabled"];
|
|
3
5
|
import { toColor } from '@basic-ui/color-picker';
|
|
4
6
|
import { Popper, useControlledState, useOnClickOutside } from '@basic-ui/core';
|
|
5
|
-
import { alpha, Box, TextField, Button } from '../';
|
|
6
7
|
import { useRef, useState, memo, useCallback } from 'react';
|
|
8
|
+
import { alpha, Box, TextField, Button } from '../';
|
|
7
9
|
import { ColorPicker } from './ColorPicker';
|
|
8
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
11
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
10
12
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
|
-
export
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
otherProps = _objectWithoutPropertiesLoose(props, ["value", "defaultValue", "onChange", "disabled"]);
|
|
13
|
+
export var TextFieldColorPicker = /*#__PURE__*/memo(function (props) {
|
|
14
|
+
var valueProp = props.value,
|
|
15
|
+
_props$defaultValue = props.defaultValue,
|
|
16
|
+
defaultValue = _props$defaultValue === void 0 ? toColor('hex', '#33ff33') : _props$defaultValue,
|
|
17
|
+
onChangeProp = props.onChange,
|
|
18
|
+
disabled = props.disabled,
|
|
19
|
+
otherProps = _objectWithoutProperties(props, _excluded);
|
|
19
20
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
21
|
+
var _useState = useState(false),
|
|
22
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
23
|
+
popoverOpen = _useState2[0],
|
|
24
|
+
setPopoverOpen = _useState2[1];
|
|
25
|
+
|
|
26
|
+
var _useState3 = useState((valueProp === null || valueProp === void 0 ? void 0 : valueProp.hex) || defaultValue.hex),
|
|
27
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
28
|
+
text = _useState4[0],
|
|
29
|
+
setText = _useState4[1];
|
|
30
|
+
|
|
31
|
+
var _useControlledState = useControlledState(valueProp, onChangeProp, defaultValue, function (setState) {
|
|
32
|
+
return function (v) {
|
|
33
|
+
setState(v);
|
|
34
|
+
setText(v.hex);
|
|
35
|
+
};
|
|
36
|
+
}),
|
|
37
|
+
_useControlledState2 = _slicedToArray(_useControlledState, 2),
|
|
38
|
+
value = _useControlledState2[0],
|
|
39
|
+
_onChange = _useControlledState2[1];
|
|
40
|
+
|
|
41
|
+
var _onChange2 = useCallback(function (color) {
|
|
27
42
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
28
43
|
_onChange(color);
|
|
29
44
|
|
|
30
45
|
setText(color.hex.replace('#', ''));
|
|
31
46
|
}, [_onChange]);
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
47
|
+
|
|
48
|
+
var popoverRef = useRef(null);
|
|
49
|
+
var buttonRef = useRef(null);
|
|
50
|
+
useOnClickOutside(popoverRef, function (e) {
|
|
51
|
+
if (e.target === (buttonRef === null || buttonRef === void 0 ? void 0 : buttonRef.current)) {
|
|
36
52
|
return;
|
|
37
53
|
}
|
|
38
54
|
|
|
@@ -49,7 +65,11 @@ export const TextFieldColorPicker = /*#__PURE__*/memo(props => {
|
|
|
49
65
|
},
|
|
50
66
|
color: "on.surface",
|
|
51
67
|
ref: buttonRef,
|
|
52
|
-
onClick: ()
|
|
68
|
+
onClick: function onClick() {
|
|
69
|
+
return setPopoverOpen(function (open) {
|
|
70
|
+
return !open;
|
|
71
|
+
});
|
|
72
|
+
},
|
|
53
73
|
disabled: disabled,
|
|
54
74
|
sx: {
|
|
55
75
|
pointerEvents: 'all',
|
|
@@ -65,10 +85,11 @@ export const TextFieldColorPicker = /*#__PURE__*/memo(props => {
|
|
|
65
85
|
}),
|
|
66
86
|
maxLength: 6,
|
|
67
87
|
hideCharacterCounter: true,
|
|
68
|
-
onChange: e
|
|
88
|
+
onChange: function onChange(e) {
|
|
69
89
|
if (e.target.value.match(/^[a-fA-F0-9]{6}$/)) {
|
|
70
90
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
71
|
-
|
|
91
|
+
_onChange2(toColor('hex', '#' + e.target.value));
|
|
92
|
+
|
|
72
93
|
return;
|
|
73
94
|
}
|
|
74
95
|
|
|
@@ -88,7 +109,7 @@ export const TextFieldColorPicker = /*#__PURE__*/memo(props => {
|
|
|
88
109
|
children: /*#__PURE__*/_jsx(ColorPicker, {
|
|
89
110
|
color: value // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
90
111
|
,
|
|
91
|
-
onChange:
|
|
112
|
+
onChange: _onChange2,
|
|
92
113
|
width: 220,
|
|
93
114
|
height: 220
|
|
94
115
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"TextFieldColorPicker.js","names":["toColor","Popper","useControlledState","useOnClickOutside","useRef","useState","memo","useCallback","alpha","Box","TextField","Button","ColorPicker","TextFieldColorPicker","props","valueProp","value","defaultValue","onChangeProp","onChange","disabled","otherProps","popoverOpen","setPopoverOpen","hex","text","setText","setState","v","_onChange","color","replace","popoverRef","buttonRef","e","target","current","backgroundColor","open","pointerEvents","cursor","width","height","borderRadius","borderWidth","borderColor","borderStyle","outlineColor","match","zIndex"],"sources":["../../../src/ThemeExplorer/TextFieldColorPicker.tsx"],"sourcesContent":["import type { Color } from '@basic-ui/color-picker';\nimport { toColor } from '@basic-ui/color-picker';\nimport { Popper, useControlledState, useOnClickOutside } from '@basic-ui/core';\nimport { useRef, useState, memo, useCallback } from 'react';\n\nimport type { TextFieldProps } from '../';\nimport { alpha, Box, TextField, Button } from '../';\nimport { ColorPicker } from './ColorPicker';\n\nexport interface TextFieldColorPickerProps\n extends Omit<TextFieldProps, 'value' | 'defaultValue' | 'onChange'> {\n value?: Color;\n defaultValue?: Color;\n onChange?: (color: Color) => void;\n}\n\nexport const TextFieldColorPicker = memo<TextFieldColorPickerProps>((props) => {\n const {\n value: valueProp,\n defaultValue = toColor('hex', '#33ff33'),\n onChange: onChangeProp,\n disabled,\n ...otherProps\n } = props;\n\n const [popoverOpen, setPopoverOpen] = useState(false);\n const [text, setText] = useState(valueProp?.hex || defaultValue.hex);\n const [value, _onChange] = useControlledState<Color, any, []>(\n valueProp,\n onChangeProp as any,\n defaultValue,\n (setState) => (v: any) => {\n setState(v);\n setText(v.hex);\n }\n );\n\n const onChange = useCallback(\n (color: Color) => {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n _onChange!(color);\n setText(color.hex.replace('#', ''));\n },\n [_onChange]\n );\n\n const popoverRef = useRef<HTMLDivElement>(null);\n const buttonRef = useRef<HTMLButtonElement>(null);\n useOnClickOutside(popoverRef, (e) => {\n if (e.target === buttonRef?.current) {\n return;\n }\n setPopoverOpen(false);\n });\n\n return (\n <>\n <TextField\n disabled={disabled}\n value={text.replace('#', '')}\n leadingIcon={'#'}\n trailingIcon={\n <Button\n style={{ backgroundColor: value.hex }}\n color=\"on.surface\"\n ref={buttonRef}\n onClick={() => setPopoverOpen((open) => !open)}\n disabled={disabled}\n sx={{\n pointerEvents: 'all',\n cursor: 'pointer',\n width: 32,\n height: 32,\n borderRadius: 'extra-small',\n borderWidth: '1px',\n borderColor: alpha('on.surface', 0.38),\n borderStyle: 'solid',\n outlineColor: 'transparent',\n }}\n />\n }\n maxLength={6}\n hideCharacterCounter\n onChange={(e) => {\n if (e.target.value.match(/^[a-fA-F0-9]{6}$/)) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n onChange!(toColor('hex', '#' + e.target.value));\n return;\n }\n setText(e.target.value);\n }}\n {...otherProps}\n />\n {popoverOpen && (\n <Popper\n anchorEl={buttonRef}\n placement=\"bottom-end\"\n style={{ zIndex: 2 }}\n >\n <Box ref={popoverRef} py={2}>\n <Box boxShadow={4}>\n <ColorPicker\n color={value}\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n onChange={onChange!}\n width={220}\n height={220}\n />\n </Box>\n </Box>\n </Popper>\n )}\n </>\n );\n});\n"],"mappings":";;;;AACA,SAASA,OAAT,QAAwB,wBAAxB;AACA,SAASC,MAAT,EAAiBC,kBAAjB,EAAqCC,iBAArC,QAA8D,gBAA9D;AACA,SAASC,MAAT,EAAiBC,QAAjB,EAA2BC,IAA3B,EAAiCC,WAAjC,QAAoD,OAApD;AAGA,SAASC,KAAT,EAAgBC,GAAhB,EAAqBC,SAArB,EAAgCC,MAAhC,QAA8C,KAA9C;AACA,SAASC,WAAT,QAA4B,eAA5B;;;;AAS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,CAAC,CAACC,MAAF,CAASnB,KAAV,CAAP;MACD;IAjCH,GAkCMK,UAlCN,EADF,EAqCGC,WAAW,iBACV,KAAC,MAAD;MACE,QAAQ,EAAEW,SADZ;MAEE,SAAS,EAAC,YAFZ;MAGE,KAAK,EAAE;QAAEgB,MAAM,EAAE;MAAV,CAHT;MAAA,uBAKE,KAAC,GAAD;QAAK,GAAG,EAAEjB,UAAV;QAAsB,EAAE,EAAE,CAA1B;QAAA,uBACE,KAAC,GAAD;UAAK,SAAS,EAAE,CAAhB;UAAA,uBACE,KAAC,WAAD;YACE,KAAK,EAAEhB,KADT,CAEE;YAFF;YAGE,QAAQ,EAAEG,UAHZ;YAIE,KAAK,EAAE,GAJT;YAKE,MAAM,EAAE;UALV;QADF;MADF;IALF,EAtCJ;EAAA,EADF;AA2DD,CAlGuC,CAAjC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ComponentType } from 'react';
|
|
2
|
+
export interface ThemeBuilderProps {
|
|
3
|
+
CodeHighlightingComponent?: ComponentType<{
|
|
4
|
+
children: string;
|
|
5
|
+
className: string;
|
|
6
|
+
showButtons?: boolean;
|
|
7
|
+
}>;
|
|
8
|
+
}
|
|
9
|
+
export declare const ThemeBuilder: (props: ThemeBuilderProps) => JSX.Element | null;
|