@basic-ui/material 1.0.0-alpha.36 → 1.0.0-alpha.38
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 +140 -15
- package/build/cjs/index.js.map +1 -1
- package/build/esm/Alert/Alert.d.ts +1 -1
- package/build/esm/AppBar/AppBar.d.ts +1 -1
- package/build/esm/AppBar/AppBarButton.d.ts +1 -1
- package/build/esm/Badge/Badge.d.ts +1 -1
- package/build/esm/BottomSheet/BottomSheet.d.ts +1 -1
- package/build/esm/BottomSheet/BottomSheetSurface.d.ts +1 -1
- package/build/esm/Button/BaseButton.d.ts +1 -1
- package/build/esm/Button/Button.d.ts +1 -1
- package/build/esm/Button/ButtonGroup.d.ts +1 -1
- package/build/esm/Button/FilledButton.d.ts +1 -1
- package/build/esm/Button/OutlinedButton.d.ts +1 -1
- package/build/esm/Button/TransparentButton.d.ts +1 -1
- package/build/esm/CheckBox/CheckBox.d.ts +1 -1
- package/build/esm/CheckBox/CheckBoxIcon.d.ts +1 -1
- package/build/esm/Chip/ButtonChip.d.ts +1 -1
- package/build/esm/Chip/ChipBase.d.ts +1 -1
- package/build/esm/Chip/ChoiceChip.d.ts +1 -1
- package/build/esm/Combobox/Combobox.d.ts +7 -7
- package/build/esm/Dialog/Dialog.d.ts +1 -1
- package/build/esm/Dialog/DialogBackdrop.d.ts +1 -1
- package/build/esm/Dialog/DialogContainer.d.ts +1 -1
- package/build/esm/Dialog/DialogSurface.d.ts +1 -1
- package/build/esm/Dialog/Scrim.d.ts +1 -1
- package/build/esm/Divider/Divider.d.ts +1 -1
- package/build/esm/LineRipple/LineRipple.d.ts +1 -1
- package/build/esm/Link/Link.d.ts +1 -1
- package/build/esm/List/List.d.ts +1 -1
- package/build/esm/ListItem/ListItem.d.ts +1 -1
- package/build/esm/Menu/Menu.d.ts +5 -5
- package/build/esm/Menu/index.d.ts +1 -0
- package/build/esm/Menu/index.js +1 -0
- package/build/esm/Menu/index.js.map +1 -1
- package/build/esm/NavRail/NavRailItem.d.ts +3 -3
- package/build/esm/Paper/Paper.d.ts +1 -1
- package/build/esm/Popover/Popover.d.ts +20 -0
- package/build/esm/Popover/Popover.js +74 -0
- package/build/esm/Popover/Popover.js.map +1 -0
- package/build/esm/Popover/PopoverContainer.d.ts +4 -0
- package/build/esm/Popover/PopoverContainer.js +20 -0
- package/build/esm/Popover/PopoverContainer.js.map +1 -0
- package/build/esm/Popover/PopoverSurface.d.ts +5 -0
- package/build/esm/Popover/PopoverSurface.js +41 -0
- package/build/esm/Popover/PopoverSurface.js.map +1 -0
- package/build/esm/Popover/index.d.ts +1 -0
- package/build/esm/Popover/index.js +2 -0
- package/build/esm/Popover/index.js.map +1 -0
- package/build/esm/ProgressSpinner/ProgressSpinner.d.ts +1 -1
- package/build/esm/RadioButton/RadioGroup.d.ts +1 -1
- package/build/esm/Select/CustomContainerExample.d.ts +1 -1
- package/build/esm/Select/SelectIcon.d.ts +1 -1
- package/build/esm/SelectionControl/SelectionControlLabel.d.ts +1 -1
- package/build/esm/SelectionControl/SelectionControlText.d.ts +1 -1
- package/build/esm/Skeleton/DelayAppearance.d.ts +1 -1
- package/build/esm/Skeleton/Skeleton.d.ts +1 -1
- package/build/esm/Slider/Slider.d.ts +6 -6
- package/build/esm/Snackbar/Snackbar.d.ts +1 -1
- package/build/esm/Switch/Switch.d.ts +1 -1
- package/build/esm/Tab/Tab.d.ts +1 -1
- package/build/esm/Tab/TabList.d.ts +1 -1
- package/build/esm/Tab/TabPanel.d.ts +1 -1
- package/build/esm/TabIndicator/TabIndicator.d.ts +1 -1
- package/build/esm/Table/Table.d.ts +1 -1
- package/build/esm/Table/TableBody.d.ts +1 -1
- package/build/esm/Table/TableCell.d.ts +1 -1
- package/build/esm/Table/TableHead.d.ts +1 -1
- package/build/esm/Table/TableRow.d.ts +1 -1
- package/build/esm/Text/Text.d.ts +1 -1
- package/build/esm/TextField/FilledContainer.d.ts +1 -1
- package/build/esm/TextField/HelperText.d.ts +1 -1
- package/build/esm/TextField/Input.d.ts +1 -1
- package/build/esm/TextField/OutlinedContainer.d.ts +1 -1
- package/build/esm/TextField/TextField.d.ts +1 -1
- package/build/esm/Tooltip/Tooltip.d.ts +1 -1
- package/build/esm/Tooltip/Tooltip.js +24 -12
- package/build/esm/Tooltip/Tooltip.js.map +1 -1
- package/build/esm/index.d.ts +1 -0
- package/build/esm/index.js +1 -0
- package/build/esm/index.js.map +1 -1
- package/build/tsconfig-build.tsbuildinfo +1 -1
- package/package.json +6 -4
- package/src/Menu/index.ts +1 -0
- package/src/Popover/Popover.story.tsx +29 -0
- package/src/Popover/Popover.tsx +95 -0
- package/src/Popover/PopoverContainer.tsx +25 -0
- package/src/Popover/PopoverSurface.tsx +51 -0
- package/src/Popover/index.ts +1 -0
- package/src/Tooltip/Tooltip.tsx +19 -12
- package/src/index.ts +1 -0
- package/tailwind/package.json +5 -0
- package/theme-explorer/package.json +5 -0
- package/build/esm/ThemeExplorer/importGoogleFont.d.ts +0 -4
- package/build/esm/ThemeExplorer/importGoogleFont.js +0 -25
- package/build/esm/ThemeExplorer/importGoogleFont.js.map +0 -1
- package/build/esm/tailwind/makeTailwindTheme.d.ts +0 -5
- package/build/esm/tailwind/makeTailwindTheme.js +0 -32
- package/build/esm/tailwind/makeTailwindTheme.js.map +0 -1
package/build/cjs/index.js
CHANGED
|
@@ -1929,14 +1929,14 @@ const DialogBackdrop = /*#__PURE__*/react$1.forwardRef(function DialogBackdrop(p
|
|
|
1929
1929
|
});
|
|
1930
1930
|
});
|
|
1931
1931
|
|
|
1932
|
-
const Modal$
|
|
1932
|
+
const Modal$2 = core.Modal;
|
|
1933
1933
|
const BottomSheetSurface = /*#__PURE__*/react$1.forwardRef(function BottomSheetSurface(props, forwardedRef) {
|
|
1934
1934
|
const {
|
|
1935
1935
|
__css,
|
|
1936
1936
|
...otherProps
|
|
1937
1937
|
} = props;
|
|
1938
1938
|
const theme = useTheme();
|
|
1939
|
-
return /*#__PURE__*/jsxRuntime.jsx(Modal$
|
|
1939
|
+
return /*#__PURE__*/jsxRuntime.jsx(Modal$2, {
|
|
1940
1940
|
ref: forwardedRef,
|
|
1941
1941
|
as: Paper,
|
|
1942
1942
|
theme: theme,
|
|
@@ -3529,7 +3529,7 @@ const Divider = /*#__PURE__*/react$1.forwardRef(function Divider(props, forwarde
|
|
|
3529
3529
|
});
|
|
3530
3530
|
});
|
|
3531
3531
|
|
|
3532
|
-
const Modal = core.Modal;
|
|
3532
|
+
const Modal$1 = core.Modal;
|
|
3533
3533
|
const DialogSurface = /*#__PURE__*/react$1.forwardRef(function DialogSurface(props, forwardedRef) {
|
|
3534
3534
|
const {
|
|
3535
3535
|
__css,
|
|
@@ -3538,7 +3538,7 @@ const DialogSurface = /*#__PURE__*/react$1.forwardRef(function DialogSurface(pro
|
|
|
3538
3538
|
} = props;
|
|
3539
3539
|
const theme = useTheme();
|
|
3540
3540
|
const overlayValue = styledSystem.get(theme, 'dialogs.backgroundColorOverlay') || 0;
|
|
3541
|
-
return /*#__PURE__*/jsxRuntime.jsx(Modal, {
|
|
3541
|
+
return /*#__PURE__*/jsxRuntime.jsx(Modal$1, {
|
|
3542
3542
|
ref: forwardedRef,
|
|
3543
3543
|
as: Paper,
|
|
3544
3544
|
theme: theme,
|
|
@@ -3899,6 +3899,117 @@ const NavRailItem = /*#__PURE__*/react$1.forwardRef(function NavRailItem(props,
|
|
|
3899
3899
|
});
|
|
3900
3900
|
});
|
|
3901
3901
|
|
|
3902
|
+
const Modal = core.Modal;
|
|
3903
|
+
const PopoverSurface = /*#__PURE__*/react$1.forwardRef(function PopoverSurface(props, forwardedRef) {
|
|
3904
|
+
const {
|
|
3905
|
+
__css,
|
|
3906
|
+
...otherProps
|
|
3907
|
+
} = props;
|
|
3908
|
+
const theme = useTheme();
|
|
3909
|
+
const overlayValue = styledSystem.get(theme, 'dialogs.backgroundColorOverlay') || 0;
|
|
3910
|
+
return /*#__PURE__*/jsxRuntime.jsx(Modal, {
|
|
3911
|
+
ref: forwardedRef,
|
|
3912
|
+
as: Paper,
|
|
3913
|
+
theme: theme,
|
|
3914
|
+
elevation: 3,
|
|
3915
|
+
darkThemeBackgroundOverlay: overlayValue,
|
|
3916
|
+
__css: {
|
|
3917
|
+
position: 'relative',
|
|
3918
|
+
borderRadius: 'extra-small',
|
|
3919
|
+
overflow: 'auto',
|
|
3920
|
+
pointerEvents: 'auto',
|
|
3921
|
+
willChange: 'transform,opacity',
|
|
3922
|
+
'[data-popper-placement="top"] &': {
|
|
3923
|
+
transformOrigin: 'bottom center'
|
|
3924
|
+
},
|
|
3925
|
+
'[data-popper-placement="bottom"] &': {
|
|
3926
|
+
transformOrigin: 'top center'
|
|
3927
|
+
},
|
|
3928
|
+
animation: `${growAnimation} .12s ${EASING_STANDARD}`,
|
|
3929
|
+
...__css
|
|
3930
|
+
},
|
|
3931
|
+
...otherProps
|
|
3932
|
+
});
|
|
3933
|
+
});
|
|
3934
|
+
|
|
3935
|
+
const PopoverContainer = /*#__PURE__*/react$1.forwardRef(function PopoverContainer(props, forwardedRef) {
|
|
3936
|
+
const {
|
|
3937
|
+
__css,
|
|
3938
|
+
...otherProps
|
|
3939
|
+
} = props;
|
|
3940
|
+
return /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
3941
|
+
ref: forwardedRef,
|
|
3942
|
+
__css: {
|
|
3943
|
+
minWidth: ['100vw', 'auto'],
|
|
3944
|
+
px: [3, 0],
|
|
3945
|
+
pointerEvents: 'none',
|
|
3946
|
+
...__css
|
|
3947
|
+
},
|
|
3948
|
+
...otherProps
|
|
3949
|
+
});
|
|
3950
|
+
});
|
|
3951
|
+
|
|
3952
|
+
const Popover = /*#__PURE__*/react$1.forwardRef(function Popover({
|
|
3953
|
+
portalSelector,
|
|
3954
|
+
open,
|
|
3955
|
+
anchorEl,
|
|
3956
|
+
placement = 'bottom',
|
|
3957
|
+
strategy = 'fixed',
|
|
3958
|
+
modifiers,
|
|
3959
|
+
skidding,
|
|
3960
|
+
distance = 0,
|
|
3961
|
+
offsetFn,
|
|
3962
|
+
arrowPadding,
|
|
3963
|
+
onClose,
|
|
3964
|
+
children,
|
|
3965
|
+
backdropProps,
|
|
3966
|
+
containerProps,
|
|
3967
|
+
disableBackdropClick,
|
|
3968
|
+
disableEscapeKeyDown,
|
|
3969
|
+
...otherProps
|
|
3970
|
+
}, forwardedRef) {
|
|
3971
|
+
const ref = react$1.useRef(null);
|
|
3972
|
+
react$1.useEffect(() => {
|
|
3973
|
+
if (!anchorEl || !anchorEl.current) {
|
|
3974
|
+
console.warn('<Popover /> will not open because it does not have an anchor element defined');
|
|
3975
|
+
}
|
|
3976
|
+
}, [anchorEl]);
|
|
3977
|
+
|
|
3978
|
+
if (!open || !anchorEl || !anchorEl.current) {
|
|
3979
|
+
return null;
|
|
3980
|
+
}
|
|
3981
|
+
|
|
3982
|
+
return /*#__PURE__*/jsxRuntime.jsx(core.Portal, {
|
|
3983
|
+
selector: portalSelector,
|
|
3984
|
+
children: /*#__PURE__*/jsxRuntime.jsx(DialogBackdrop, {
|
|
3985
|
+
onClose: onClose,
|
|
3986
|
+
open: open,
|
|
3987
|
+
disableCloseOnClick: disableBackdropClick,
|
|
3988
|
+
disableEscapeKeyDown: disableEscapeKeyDown,
|
|
3989
|
+
...backdropProps,
|
|
3990
|
+
children: /*#__PURE__*/jsxRuntime.jsx(core.Popper, {
|
|
3991
|
+
as: Box,
|
|
3992
|
+
innerAs: "div",
|
|
3993
|
+
anchorEl: anchorEl,
|
|
3994
|
+
placement: placement,
|
|
3995
|
+
strategy: strategy,
|
|
3996
|
+
modifiers: modifiers,
|
|
3997
|
+
skidding: skidding,
|
|
3998
|
+
distance: distance,
|
|
3999
|
+
offsetFn: offsetFn,
|
|
4000
|
+
arrowPadding: arrowPadding,
|
|
4001
|
+
children: /*#__PURE__*/jsxRuntime.jsx(PopoverContainer, { ...containerProps,
|
|
4002
|
+
children: /*#__PURE__*/jsxRuntime.jsx(PopoverSurface, {
|
|
4003
|
+
ref: core.assignMultipleRefs(forwardedRef, ref),
|
|
4004
|
+
...otherProps,
|
|
4005
|
+
children: children
|
|
4006
|
+
})
|
|
4007
|
+
})
|
|
4008
|
+
})
|
|
4009
|
+
})
|
|
4010
|
+
});
|
|
4011
|
+
});
|
|
4012
|
+
|
|
3902
4013
|
const innerDivRotate = react.keyframes({
|
|
3903
4014
|
'0%': {
|
|
3904
4015
|
transform: 'rotate(-90deg)'
|
|
@@ -5830,26 +5941,38 @@ const BaseTooltip = core.Tooltip;
|
|
|
5830
5941
|
const Tooltip = /*#__PURE__*/react$1.forwardRef(function Tooltip(props, forwardedRef) {
|
|
5831
5942
|
const {
|
|
5832
5943
|
placement = 'bottom',
|
|
5944
|
+
children,
|
|
5833
5945
|
__css,
|
|
5834
5946
|
...otherProps
|
|
5835
5947
|
} = props;
|
|
5948
|
+
const cssStyle = {
|
|
5949
|
+
variant: ['text.body-medium', 'text.body-small'],
|
|
5950
|
+
bg: alpha('#616161', 0.9),
|
|
5951
|
+
color: '#fff',
|
|
5952
|
+
px: 2,
|
|
5953
|
+
py: 1,
|
|
5954
|
+
borderRadius: 'extra-small',
|
|
5955
|
+
zIndex: 'tooltip',
|
|
5956
|
+
...__css
|
|
5957
|
+
};
|
|
5958
|
+
|
|
5959
|
+
if (!children) {
|
|
5960
|
+
return /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
5961
|
+
ref: forwardedRef,
|
|
5962
|
+
__css: cssStyle,
|
|
5963
|
+
...otherProps
|
|
5964
|
+
});
|
|
5965
|
+
}
|
|
5966
|
+
|
|
5836
5967
|
return /*#__PURE__*/jsxRuntime.jsx(BaseTooltip, {
|
|
5837
5968
|
as: core.Popper,
|
|
5838
5969
|
innerAs: Box,
|
|
5839
5970
|
ref: forwardedRef,
|
|
5840
5971
|
placement: placement,
|
|
5841
5972
|
distance: 8,
|
|
5842
|
-
__css:
|
|
5843
|
-
|
|
5844
|
-
|
|
5845
|
-
color: '#fff',
|
|
5846
|
-
px: 2,
|
|
5847
|
-
py: 1,
|
|
5848
|
-
borderRadius: 'extra-small',
|
|
5849
|
-
zIndex: 'tooltip',
|
|
5850
|
-
...__css
|
|
5851
|
-
},
|
|
5852
|
-
...otherProps
|
|
5973
|
+
__css: cssStyle,
|
|
5974
|
+
...otherProps,
|
|
5975
|
+
children: children
|
|
5853
5976
|
});
|
|
5854
5977
|
});
|
|
5855
5978
|
|
|
@@ -5919,6 +6042,7 @@ exports.NavRailLabel = NavRailLabel;
|
|
|
5919
6042
|
exports.NotchedOutline = NotchedOutline;
|
|
5920
6043
|
exports.OutlinedContainer = OutlinedContainer;
|
|
5921
6044
|
exports.Paper = Paper;
|
|
6045
|
+
exports.Popover = Popover;
|
|
5922
6046
|
exports.ProgressSpinner = ProgressSpinner;
|
|
5923
6047
|
exports.RadioButton = RadioButton;
|
|
5924
6048
|
exports.RadioGroup = RadioGroup;
|
|
@@ -5955,6 +6079,7 @@ exports.base = base;
|
|
|
5955
6079
|
exports.getBackgroundOverlay = getBackgroundOverlay;
|
|
5956
6080
|
exports.getColorOverlay = getColorOverlay;
|
|
5957
6081
|
exports.getDarkThemeBackgroundOverlay = getDarkThemeBackgroundOverlay;
|
|
6082
|
+
exports.growAnimation = growAnimation;
|
|
5958
6083
|
exports.listItemStyle = listItemStyle;
|
|
5959
6084
|
exports.mixColor = mixColor;
|
|
5960
6085
|
exports.rippleStyle = rippleStyle;
|