@basic-ui/material 1.0.0-alpha.14 → 1.0.0-alpha.17
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 +298 -56
- package/build/cjs/index.js.map +1 -1
- package/build/esm/Alert/Alert.d.ts +1 -1
- package/build/esm/AppBar/AppBarButton.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/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/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/Combobox/Combobox.js +4 -3
- package/build/esm/Combobox/Combobox.js.map +1 -1
- package/build/esm/Dialog/Dialog.d.ts +1 -1
- package/build/esm/Dialog/DialogBackdrop.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/Link/Link.d.ts +1 -1
- package/build/esm/Link/Link.js +12 -0
- package/build/esm/Link/Link.js.map +1 -1
- package/build/esm/ListItem/ListItem.d.ts +3 -1
- package/build/esm/ListItem/ListItem.js +46 -43
- package/build/esm/ListItem/ListItem.js.map +1 -1
- package/build/esm/Menu/Menu.d.ts +4 -4
- package/build/esm/NavRail/NavRailItem.d.ts +3 -3
- package/build/esm/Paper/Paper.d.ts +1 -1
- package/build/esm/RadioButton/RadioGroup.d.ts +1 -1
- package/build/esm/Ripple/useRippleSurface.d.ts +1 -0
- package/build/esm/Ripple/useRippleSurface.js +17 -16
- package/build/esm/Ripple/useRippleSurface.js.map +1 -1
- package/build/esm/Select/Select.d.ts +1 -1
- package/build/esm/Select/Select.js +4 -0
- package/build/esm/Select/Select.js.map +1 -1
- package/build/esm/Select/SelectIcon.d.ts +1 -1
- package/build/esm/SelectItem/SelectItem.d.ts +5 -2
- package/build/esm/SelectItem/SelectItem.js +17 -4
- package/build/esm/SelectItem/SelectItem.js.map +1 -1
- package/build/esm/SelectionControl/SelectionControlText.d.ts +1 -1
- package/build/esm/Skeleton/Skeleton.d.ts +1 -1
- package/build/esm/Slider/Slider.d.ts +17 -0
- package/build/esm/Slider/Slider.js +224 -0
- package/build/esm/Slider/Slider.js.map +1 -0
- package/build/esm/Slider/index.d.ts +1 -0
- package/build/esm/Slider/index.js +2 -0
- package/build/esm/Slider/index.js.map +1 -0
- package/build/esm/Snackbar/Snackbar.d.ts +1 -1
- package/build/esm/Snackbar/Snackbar.js +4 -4
- package/build/esm/Snackbar/Snackbar.js.map +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/TableHead.d.ts +1 -1
- package/build/esm/Table/TableRow.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/OutlinedContainer.js +13 -5
- package/build/esm/TextField/OutlinedContainer.js.map +1 -1
- package/build/esm/TextField/TextField.d.ts +1 -1
- package/build/esm/ThemeExplorer/BorderSlider.d.ts +7 -0
- package/build/esm/ThemeExplorer/BorderSlider.js +78 -0
- package/build/esm/ThemeExplorer/BorderSlider.js.map +1 -0
- package/build/esm/ThemeExplorer/ColorSchemePicker.d.ts +10 -0
- package/build/esm/ThemeExplorer/ColorSchemePicker.js +54 -0
- package/build/esm/ThemeExplorer/ColorSchemePicker.js.map +1 -0
- package/build/esm/ThemeExplorer/FontAutoComplete.d.ts +9 -0
- package/build/esm/ThemeExplorer/FontAutoComplete.js +128 -0
- package/build/esm/ThemeExplorer/FontAutoComplete.js.map +1 -0
- package/build/esm/ThemeExplorer/ThemeBuilder.d.ts +2 -0
- package/build/esm/ThemeExplorer/ThemeBuilder.js +232 -94
- package/build/esm/ThemeExplorer/ThemeBuilder.js.map +1 -1
- package/build/esm/ThemeExplorer/components.js +4 -4
- package/build/esm/ThemeExplorer/components.js.map +1 -1
- package/build/esm/ThemeExplorer/googleFonts.d.ts +1 -0
- package/build/esm/ThemeExplorer/googleFonts.js +7 -0
- package/build/esm/ThemeExplorer/googleFonts.js.map +1 -0
- package/build/esm/ThemeExplorer/updateGoogleFonts.js +70 -0
- package/build/esm/ThemeExplorer/updateGoogleFonts.js.map +1 -0
- package/build/esm/ThemeExplorer/useDeferredColor.js +3 -4
- package/build/esm/ThemeExplorer/useDeferredColor.js.map +1 -1
- package/build/esm/Tooltip/Tooltip.d.ts +1 -1
- package/build/esm/color.js +2 -2
- package/build/esm/color.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 -6
- package/src/Combobox/Combobox.tsx +5 -2
- package/src/Link/Link.tsx +12 -0
- package/src/ListItem/ListItem.tsx +48 -42
- package/src/Ripple/useRippleSurface.ts +8 -2
- package/src/Select/PaymentMethodSelect.story.tsx +17 -24
- package/src/Select/Select.tsx +6 -0
- package/src/SelectItem/SelectItem.tsx +13 -3
- package/src/Slider/Slider.story.tsx +36 -0
- package/src/Slider/Slider.tsx +275 -0
- package/src/Slider/index.ts +1 -0
- package/src/Snackbar/Snackbar.tsx +5 -5
- package/src/TextField/OutlinedContainer.tsx +8 -3
- package/src/ThemeExplorer/BorderSlider.tsx +73 -0
- package/src/ThemeExplorer/ColorSchemePicker.tsx +55 -0
- package/src/ThemeExplorer/FontAutoComplete.tsx +139 -0
- package/src/ThemeExplorer/ThemeBuilder.story.tsx +2 -1
- package/src/ThemeExplorer/ThemeBuilder.tsx +223 -84
- package/src/ThemeExplorer/components.tsx +4 -4
- package/src/ThemeExplorer/googleFonts.ts +1436 -0
- package/src/ThemeExplorer/updateGoogleFonts.js +33 -0
- package/src/ThemeExplorer/useDeferredColor.tsx +3 -6
- package/src/color.ts +2 -2
- package/src/index.ts +1 -0
package/build/cjs/index.js
CHANGED
|
@@ -596,7 +596,7 @@ function getDarkThemeBackgroundOverlay(theme, backgroundOverlay, overlayColor =
|
|
|
596
596
|
}
|
|
597
597
|
|
|
598
598
|
return {
|
|
599
|
-
[`.${dynamicTheme.
|
|
599
|
+
[`.${dynamicTheme.DARK_SCHEME_CLASS} &, &.${dynamicTheme.DARK_SCHEME_CLASS}`]: { ...getBackgroundOverlay(theme, backgroundOverlay, overlayColor)
|
|
600
600
|
}
|
|
601
601
|
};
|
|
602
602
|
}
|
|
@@ -1205,7 +1205,9 @@ function useRippleSurface(opts = {}) {
|
|
|
1205
1205
|
hoverOpacity = 0.04,
|
|
1206
1206
|
focusOpacity = 0.12,
|
|
1207
1207
|
pressedOpacity = 0.12,
|
|
1208
|
-
rippleColor = 'on.surface'
|
|
1208
|
+
rippleColor = 'on.surface',
|
|
1209
|
+
// eslint-disable-next-line prefer-const
|
|
1210
|
+
mouseFocus = false
|
|
1209
1211
|
} = opts;
|
|
1210
1212
|
const {
|
|
1211
1213
|
onKeyDown,
|
|
@@ -1235,6 +1237,7 @@ function useRippleSurface(opts = {}) {
|
|
|
1235
1237
|
disabled,
|
|
1236
1238
|
...rippleProps
|
|
1237
1239
|
});
|
|
1240
|
+
const focusPseudoClass = mouseFocus ? 'focus' : 'focus-visible';
|
|
1238
1241
|
const css$1 = react$1.useMemo(() => ({
|
|
1239
1242
|
overflow: 'hidden',
|
|
1240
1243
|
position: 'relative',
|
|
@@ -1260,7 +1263,7 @@ function useRippleSurface(opts = {}) {
|
|
|
1260
1263
|
'&:hover::before': {
|
|
1261
1264
|
opacity: hoverOpacity
|
|
1262
1265
|
},
|
|
1263
|
-
|
|
1266
|
+
[`&:${focusPseudoClass}::before`]: {
|
|
1264
1267
|
opacity: focusOpacity
|
|
1265
1268
|
},
|
|
1266
1269
|
...(!rippleEnabled && {
|
|
@@ -1274,7 +1277,7 @@ function useRippleSurface(opts = {}) {
|
|
|
1274
1277
|
'&[aria-pressed="true"]:hover::before': {
|
|
1275
1278
|
opacity: pressedOpacity + hoverOpacity
|
|
1276
1279
|
},
|
|
1277
|
-
|
|
1280
|
+
[`&[aria-pressed="true"]:${focusPseudoClass}::before`]: {
|
|
1278
1281
|
opacity: pressedOpacity + focusOpacity
|
|
1279
1282
|
},
|
|
1280
1283
|
...(!rippleEnabled && {
|
|
@@ -1295,7 +1298,7 @@ function useRippleSurface(opts = {}) {
|
|
|
1295
1298
|
})
|
|
1296
1299
|
}
|
|
1297
1300
|
})
|
|
1298
|
-
}), [animation, baseOpacity, focusOpacity, hoverOpacity, pressedOpacity, rippleColor, rippleEnabled]);
|
|
1301
|
+
}), [animation, baseOpacity, focusOpacity, focusPseudoClass, hoverOpacity, pressedOpacity, rippleColor, rippleEnabled]);
|
|
1299
1302
|
return {
|
|
1300
1303
|
style: { ...animationStyle,
|
|
1301
1304
|
...style
|
|
@@ -2424,12 +2427,17 @@ const OutlinedContainer = /*#__PURE__*/react$1.forwardRef(function OutlinedConta
|
|
|
2424
2427
|
|
|
2425
2428
|
if (element) {
|
|
2426
2429
|
setLabelWidth(element.offsetWidth);
|
|
2427
|
-
|
|
2430
|
+
|
|
2431
|
+
function handleFontsLoaded() {
|
|
2428
2432
|
// set the label width again once the fonts have been loaded
|
|
2429
2433
|
requestAnimationFrame(() => {
|
|
2430
|
-
setLabelWidth(element.offsetWidth);
|
|
2434
|
+
if (element) setLabelWidth(element.offsetWidth);
|
|
2431
2435
|
});
|
|
2432
|
-
}
|
|
2436
|
+
}
|
|
2437
|
+
|
|
2438
|
+
document.fonts?.addEventListener?.('loadingdone', handleFontsLoaded);
|
|
2439
|
+
document.fonts?.ready?.then(handleFontsLoaded);
|
|
2440
|
+
return () => document.fonts?.removeEventListener?.('loadingdone', handleFontsLoaded);
|
|
2433
2441
|
}
|
|
2434
2442
|
}, [label]);
|
|
2435
2443
|
const color = error ? 'error' : colorProp;
|
|
@@ -2674,6 +2682,47 @@ const List = /*#__PURE__*/react$1.forwardRef(function List(props, forwardedRef)
|
|
|
2674
2682
|
});
|
|
2675
2683
|
});
|
|
2676
2684
|
|
|
2685
|
+
const listItemStyle = (color, hoverOpacity = 0.16, focusOpacity = 0.24) => ({
|
|
2686
|
+
variant: 'text.label-large',
|
|
2687
|
+
px: 3,
|
|
2688
|
+
py: "0.75rem",
|
|
2689
|
+
transition: 'background-color 75ms linear',
|
|
2690
|
+
backgroundColor: 'transparent',
|
|
2691
|
+
color: alpha('on.surface', 0.87),
|
|
2692
|
+
cursor: 'pointer',
|
|
2693
|
+
display: 'flex',
|
|
2694
|
+
alignItems: 'center',
|
|
2695
|
+
textDecoration: 'none',
|
|
2696
|
+
':hover': {
|
|
2697
|
+
backgroundColor: alpha('on.surface', hoverOpacity)
|
|
2698
|
+
},
|
|
2699
|
+
':focus': {
|
|
2700
|
+
outline: 'none',
|
|
2701
|
+
backgroundColor: alpha('on.surface', focusOpacity)
|
|
2702
|
+
},
|
|
2703
|
+
':active': {
|
|
2704
|
+
backgroundColor: alpha('on.surface', focusOpacity)
|
|
2705
|
+
},
|
|
2706
|
+
'&[aria-selected="true"]': {
|
|
2707
|
+
backgroundColor: alpha(color, 0.08),
|
|
2708
|
+
color,
|
|
2709
|
+
':hover': {
|
|
2710
|
+
backgroundColor: alpha(color, hoverOpacity)
|
|
2711
|
+
},
|
|
2712
|
+
':focus': {
|
|
2713
|
+
outline: 'none',
|
|
2714
|
+
backgroundColor: alpha(color, focusOpacity)
|
|
2715
|
+
},
|
|
2716
|
+
':active': {
|
|
2717
|
+
backgroundColor: alpha(color, focusOpacity)
|
|
2718
|
+
}
|
|
2719
|
+
},
|
|
2720
|
+
'&[data-disabled]': {
|
|
2721
|
+
color: alpha('on.surface', 0.6),
|
|
2722
|
+
backgroundColor: 'transparent',
|
|
2723
|
+
cursor: 'default'
|
|
2724
|
+
}
|
|
2725
|
+
});
|
|
2677
2726
|
const ListItem = /*#__PURE__*/react$1.forwardRef(function ListItem(props, forwardedRef) {
|
|
2678
2727
|
const {
|
|
2679
2728
|
as = 'div',
|
|
@@ -2690,9 +2739,6 @@ const ListItem = /*#__PURE__*/react$1.forwardRef(function ListItem(props, forwar
|
|
|
2690
2739
|
const selected = ariaSelectedProp || selectedProp;
|
|
2691
2740
|
const color = rippleColor || colorProp || 'primary';
|
|
2692
2741
|
const theme = useTheme();
|
|
2693
|
-
const baseOpacity = 0.12;
|
|
2694
|
-
const hoverOpacity = 0.16;
|
|
2695
|
-
const focusOpacity = 0.24;
|
|
2696
2742
|
return /*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
2697
2743
|
ref: forwardedRef,
|
|
2698
2744
|
as: innerAs || as,
|
|
@@ -2702,45 +2748,7 @@ const ListItem = /*#__PURE__*/react$1.forwardRef(function ListItem(props, forwar
|
|
|
2702
2748
|
"aria-selected": selected ? 'true' : undefined,
|
|
2703
2749
|
disabled: disabled,
|
|
2704
2750
|
...otherProps,
|
|
2705
|
-
__css: {
|
|
2706
|
-
variant: 'text.label-large',
|
|
2707
|
-
px: 3,
|
|
2708
|
-
py: "0.75rem",
|
|
2709
|
-
transition: 'background-color 75ms linear',
|
|
2710
|
-
backgroundColor: 'transparent',
|
|
2711
|
-
color: alpha('on.surface', 0.87),
|
|
2712
|
-
cursor: 'pointer',
|
|
2713
|
-
':hover': {
|
|
2714
|
-
backgroundColor: alpha('on.surface', hoverOpacity)
|
|
2715
|
-
},
|
|
2716
|
-
':focus': {
|
|
2717
|
-
outline: 'none',
|
|
2718
|
-
backgroundColor: alpha('on.surface', focusOpacity)
|
|
2719
|
-
},
|
|
2720
|
-
':active': {
|
|
2721
|
-
backgroundColor: alpha('on.surface', baseOpacity + 0.12)
|
|
2722
|
-
},
|
|
2723
|
-
'&[aria-selected="true"]': {
|
|
2724
|
-
backgroundColor: alpha(color, baseOpacity + 0.12),
|
|
2725
|
-
color,
|
|
2726
|
-
':hover': {
|
|
2727
|
-
backgroundColor: alpha(color, hoverOpacity + 0.12)
|
|
2728
|
-
},
|
|
2729
|
-
':focus': {
|
|
2730
|
-
outline: 'none',
|
|
2731
|
-
backgroundColor: alpha(color, focusOpacity + 0.12)
|
|
2732
|
-
},
|
|
2733
|
-
':active': {
|
|
2734
|
-
backgroundColor: alpha(color, baseOpacity + 0.24)
|
|
2735
|
-
}
|
|
2736
|
-
},
|
|
2737
|
-
'&[data-disabled]': {
|
|
2738
|
-
color: alpha('on.surface', 0.6),
|
|
2739
|
-
backgroundColor: 'transparent',
|
|
2740
|
-
cursor: 'default'
|
|
2741
|
-
},
|
|
2742
|
-
textDecoration: 'none',
|
|
2743
|
-
WebkitTapHighlightColor: 'transparent',
|
|
2751
|
+
__css: { ...listItemStyle(color),
|
|
2744
2752
|
...__css
|
|
2745
2753
|
},
|
|
2746
2754
|
children: children
|
|
@@ -2831,6 +2839,8 @@ const ComboboxList = /*#__PURE__*/react$1.forwardRef((props, forwardedRef) => {
|
|
|
2831
2839
|
'[data-popper-placement="bottom"] &': {
|
|
2832
2840
|
transformOrigin: 'top center'
|
|
2833
2841
|
},
|
|
2842
|
+
'& [data-reach-combobox-option=""]': { ...listItemStyle('primary')
|
|
2843
|
+
},
|
|
2834
2844
|
...__css
|
|
2835
2845
|
},
|
|
2836
2846
|
...otherProps
|
|
@@ -2883,7 +2893,7 @@ const ComboboxOption = /*#__PURE__*/react$1.forwardRef((props, forwardedRef) =>
|
|
|
2883
2893
|
...otherProps
|
|
2884
2894
|
} = props;
|
|
2885
2895
|
return /*#__PURE__*/jsxRuntime.jsx(ComboboxOptionCore, {
|
|
2886
|
-
as:
|
|
2896
|
+
as: Box,
|
|
2887
2897
|
ref: forwardedRef,
|
|
2888
2898
|
innerAs: as,
|
|
2889
2899
|
...otherProps
|
|
@@ -3592,6 +3602,12 @@ const Link = /*#__PURE__*/react$1.forwardRef(function Link(props, forwardedRef)
|
|
|
3592
3602
|
letterSpacing: 'inherit',
|
|
3593
3603
|
color,
|
|
3594
3604
|
textDecoration: 'underline',
|
|
3605
|
+
background: 'none',
|
|
3606
|
+
border: 'none',
|
|
3607
|
+
borderRadius: 'extra-small',
|
|
3608
|
+
'button&': {
|
|
3609
|
+
cursor: 'pointer'
|
|
3610
|
+
},
|
|
3595
3611
|
'&:hover,&:focus': {
|
|
3596
3612
|
textDecoration: 'none'
|
|
3597
3613
|
},
|
|
@@ -3603,6 +3619,12 @@ const Link = /*#__PURE__*/react$1.forwardRef(function Link(props, forwardedRef)
|
|
|
3603
3619
|
'&:active': {
|
|
3604
3620
|
bg: alpha(color, 0.16)
|
|
3605
3621
|
},
|
|
3622
|
+
'&[aria-disabled="true"],&:disabled': {
|
|
3623
|
+
color: 'on.surface',
|
|
3624
|
+
opacity: 0.38,
|
|
3625
|
+
cursor: 'default',
|
|
3626
|
+
pointerEvents: 'none'
|
|
3627
|
+
},
|
|
3606
3628
|
WebkitTapHighlightColor: 'transparent',
|
|
3607
3629
|
...__css
|
|
3608
3630
|
},
|
|
@@ -3656,7 +3678,7 @@ const MenuList = /*#__PURE__*/react$1.forwardRef(({
|
|
|
3656
3678
|
})); /////////////////////////////////////////////////////
|
|
3657
3679
|
// MenuItem
|
|
3658
3680
|
|
|
3659
|
-
const MenuItem = /*#__PURE__*/react$1.forwardRef(({
|
|
3681
|
+
const MenuItem$1 = /*#__PURE__*/react$1.forwardRef(({
|
|
3660
3682
|
as = 'li',
|
|
3661
3683
|
...props
|
|
3662
3684
|
}, ref) => /*#__PURE__*/jsxRuntime.jsx(core.MenuItem, {
|
|
@@ -4262,6 +4284,10 @@ const Select = /*#__PURE__*/react$1.forwardRef(function Select(props, forwardedR
|
|
|
4262
4284
|
minWidth: buttonRef?.current?.offsetWidth
|
|
4263
4285
|
},
|
|
4264
4286
|
role: "listbox",
|
|
4287
|
+
__css: {
|
|
4288
|
+
'& [data-menu-item=""]': { ...listItemStyle('primary')
|
|
4289
|
+
}
|
|
4290
|
+
},
|
|
4265
4291
|
children: children
|
|
4266
4292
|
})
|
|
4267
4293
|
})]
|
|
@@ -4278,6 +4304,15 @@ const Select = /*#__PURE__*/react$1.forwardRef(function Select(props, forwardedR
|
|
|
4278
4304
|
});
|
|
4279
4305
|
});
|
|
4280
4306
|
|
|
4307
|
+
const MenuItem = /*#__PURE__*/react$1.forwardRef(({
|
|
4308
|
+
as = 'li',
|
|
4309
|
+
...props
|
|
4310
|
+
}, ref) => /*#__PURE__*/jsxRuntime.jsx(core.MenuItem, {
|
|
4311
|
+
as: Box,
|
|
4312
|
+
innerAs: as,
|
|
4313
|
+
ref: ref,
|
|
4314
|
+
...props
|
|
4315
|
+
}));
|
|
4281
4316
|
const ZERO_WIDTH_SPACE = '\u200b';
|
|
4282
4317
|
const SelectItem = /*#__PURE__*/react$1.forwardRef(function SelectItem(props, forwardedRef) {
|
|
4283
4318
|
const {
|
|
@@ -4317,6 +4352,7 @@ const SelectItem = /*#__PURE__*/react$1.forwardRef(function SelectItem(props, fo
|
|
|
4317
4352
|
disabled: disabled,
|
|
4318
4353
|
ref: forwardedRef,
|
|
4319
4354
|
role: "option",
|
|
4355
|
+
"aria-selected": selected ? 'true' : undefined,
|
|
4320
4356
|
selected: selected,
|
|
4321
4357
|
...otherProps,
|
|
4322
4358
|
children: children || ZERO_WIDTH_SPACE
|
|
@@ -4418,6 +4454,205 @@ const DelayAppearance = /*#__PURE__*/react$1.forwardRef(function DelayAppearance
|
|
|
4418
4454
|
});
|
|
4419
4455
|
});
|
|
4420
4456
|
|
|
4457
|
+
const SliderInput = /*#__PURE__*/react$1.forwardRef(({
|
|
4458
|
+
as = 'div',
|
|
4459
|
+
__css,
|
|
4460
|
+
...props
|
|
4461
|
+
}, ref) => /*#__PURE__*/jsxRuntime.jsx(core.SliderInput, {
|
|
4462
|
+
as: Box,
|
|
4463
|
+
innerAs: as,
|
|
4464
|
+
ref: ref,
|
|
4465
|
+
...props,
|
|
4466
|
+
__css: {
|
|
4467
|
+
maxWidth: '100%',
|
|
4468
|
+
cursor: 'pointer',
|
|
4469
|
+
'&[data-orientation="horizontal"]': {
|
|
4470
|
+
height: "0.25rem"
|
|
4471
|
+
},
|
|
4472
|
+
'&[data-orientation="vertical"]': {
|
|
4473
|
+
width: "0.25rem",
|
|
4474
|
+
height: '250px',
|
|
4475
|
+
maxHeight: '100%'
|
|
4476
|
+
},
|
|
4477
|
+
'&[data-disabled]': {
|
|
4478
|
+
opacity: 0.5,
|
|
4479
|
+
pointerEvents: 'none'
|
|
4480
|
+
},
|
|
4481
|
+
...__css
|
|
4482
|
+
}
|
|
4483
|
+
})); /////////////////////////////////////////////////////
|
|
4484
|
+
// SliderHandle
|
|
4485
|
+
|
|
4486
|
+
const SliderHandle = /*#__PURE__*/react$1.forwardRef(({
|
|
4487
|
+
as = 'div',
|
|
4488
|
+
__css,
|
|
4489
|
+
children,
|
|
4490
|
+
...props
|
|
4491
|
+
}, ref) => /*#__PURE__*/jsxRuntime.jsxs(core.SliderHandle, {
|
|
4492
|
+
as: RippleBox,
|
|
4493
|
+
innerAs: as,
|
|
4494
|
+
ref: ref,
|
|
4495
|
+
rippleColor: "currentColor",
|
|
4496
|
+
hoverOpacity: 0.12,
|
|
4497
|
+
focusOpacity: 0.24,
|
|
4498
|
+
pressedOpacity: 0.24,
|
|
4499
|
+
mouseFocus: true,
|
|
4500
|
+
center: true,
|
|
4501
|
+
__css: {
|
|
4502
|
+
position: 'relative',
|
|
4503
|
+
width: "2.5rem",
|
|
4504
|
+
height: "2.5rem",
|
|
4505
|
+
color: 'primary',
|
|
4506
|
+
borderRadius: 'full',
|
|
4507
|
+
zIndex: 1,
|
|
4508
|
+
transformOrigin: 'center',
|
|
4509
|
+
userSelect: 'none',
|
|
4510
|
+
'&[aria-orientation="horizontal"]': {
|
|
4511
|
+
top: '50%',
|
|
4512
|
+
transform: 'translateY(-50%)'
|
|
4513
|
+
},
|
|
4514
|
+
'&[aria-orientation="horizontal"]:focus': {
|
|
4515
|
+
transform: 'translateY(-50%)'
|
|
4516
|
+
},
|
|
4517
|
+
'&[aria-orientation="vertical"]': {
|
|
4518
|
+
left: '50%',
|
|
4519
|
+
transform: 'translateX(-50%)'
|
|
4520
|
+
},
|
|
4521
|
+
':focus': {
|
|
4522
|
+
outline: 'none'
|
|
4523
|
+
},
|
|
4524
|
+
...__css
|
|
4525
|
+
},
|
|
4526
|
+
...props,
|
|
4527
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Box, {
|
|
4528
|
+
__css: {
|
|
4529
|
+
bg: 'currentColor',
|
|
4530
|
+
width: '50%',
|
|
4531
|
+
height: '50%',
|
|
4532
|
+
borderRadius: 'full',
|
|
4533
|
+
pointerEvents: 'none',
|
|
4534
|
+
position: 'absolute',
|
|
4535
|
+
top: '50%',
|
|
4536
|
+
left: '50%',
|
|
4537
|
+
transform: 'translate(-50%, -50%)',
|
|
4538
|
+
boxShadow: 1
|
|
4539
|
+
}
|
|
4540
|
+
}), children]
|
|
4541
|
+
})); /////////////////////////////////////////////////////
|
|
4542
|
+
// SliderMarker
|
|
4543
|
+
|
|
4544
|
+
const SliderMarker = /*#__PURE__*/react$1.forwardRef(({
|
|
4545
|
+
as = 'div',
|
|
4546
|
+
__css,
|
|
4547
|
+
...props
|
|
4548
|
+
}, ref) => /*#__PURE__*/jsxRuntime.jsx(core.SliderMarker, {
|
|
4549
|
+
as: Box,
|
|
4550
|
+
innerAs: as,
|
|
4551
|
+
ref: ref,
|
|
4552
|
+
...props,
|
|
4553
|
+
__css: {
|
|
4554
|
+
transformOrigin: 'center',
|
|
4555
|
+
borderRadius: 'full',
|
|
4556
|
+
width: '2px',
|
|
4557
|
+
height: '2px',
|
|
4558
|
+
'&[data-orientation="horizontal"]': {
|
|
4559
|
+
top: '50%',
|
|
4560
|
+
transform: 'translate(-50%, -50%)'
|
|
4561
|
+
},
|
|
4562
|
+
'&[data-orientation="vertical"]': {
|
|
4563
|
+
left: '50%',
|
|
4564
|
+
transform: 'translate(-50%, -50%)'
|
|
4565
|
+
},
|
|
4566
|
+
bg: alpha('primary', 0.8),
|
|
4567
|
+
'&[data-state="at-value"],&[data-state="under-value"]': {
|
|
4568
|
+
bg: alpha('on.primary', 0.8)
|
|
4569
|
+
},
|
|
4570
|
+
...__css
|
|
4571
|
+
}
|
|
4572
|
+
})); /////////////////////////////////////////////////////
|
|
4573
|
+
// SliderTrack
|
|
4574
|
+
|
|
4575
|
+
const SliderTrack = /*#__PURE__*/react$1.forwardRef(({
|
|
4576
|
+
as = 'div',
|
|
4577
|
+
__css,
|
|
4578
|
+
...props
|
|
4579
|
+
}, ref) => /*#__PURE__*/jsxRuntime.jsx(core.SliderTrack, {
|
|
4580
|
+
as: Box,
|
|
4581
|
+
innerAs: as,
|
|
4582
|
+
ref: ref,
|
|
4583
|
+
...props,
|
|
4584
|
+
__css: {
|
|
4585
|
+
position: 'relative',
|
|
4586
|
+
borderRadius: 'full',
|
|
4587
|
+
bg: alpha('primary', 0.38),
|
|
4588
|
+
'&[data-orientation="horizontal"]': {
|
|
4589
|
+
width: '100%',
|
|
4590
|
+
height: 'inherit'
|
|
4591
|
+
},
|
|
4592
|
+
'&[data-orientation="vertical"]': {
|
|
4593
|
+
width: 'inherit',
|
|
4594
|
+
height: '100%'
|
|
4595
|
+
},
|
|
4596
|
+
'&::before': {
|
|
4597
|
+
content: '""',
|
|
4598
|
+
position: 'absolute'
|
|
4599
|
+
},
|
|
4600
|
+
'&[data-orientation="horizontal"]::before': {
|
|
4601
|
+
width: '100%',
|
|
4602
|
+
height: '1.5rem',
|
|
4603
|
+
top: 'calc(-0.5rem - 1px)',
|
|
4604
|
+
left: '0'
|
|
4605
|
+
},
|
|
4606
|
+
'&[data-orientation="vertical"]::before': {
|
|
4607
|
+
width: '1.5rem',
|
|
4608
|
+
height: '100%',
|
|
4609
|
+
top: '0',
|
|
4610
|
+
left: 'calc(-0.5rem - 1px)'
|
|
4611
|
+
},
|
|
4612
|
+
...__css
|
|
4613
|
+
}
|
|
4614
|
+
})); /////////////////////////////////////////////////////
|
|
4615
|
+
// SliderRange
|
|
4616
|
+
|
|
4617
|
+
const SliderRange = /*#__PURE__*/react$1.forwardRef(({
|
|
4618
|
+
as = 'div',
|
|
4619
|
+
__css,
|
|
4620
|
+
...props
|
|
4621
|
+
}, ref) => /*#__PURE__*/jsxRuntime.jsx(core.SliderRange, {
|
|
4622
|
+
as: Box,
|
|
4623
|
+
innerAs: as,
|
|
4624
|
+
ref: ref,
|
|
4625
|
+
__css: {
|
|
4626
|
+
borderRadius: 'inherit',
|
|
4627
|
+
bg: 'primary',
|
|
4628
|
+
left: '0',
|
|
4629
|
+
bottom: '0',
|
|
4630
|
+
top: '50%',
|
|
4631
|
+
'&[data-orientation="horizontal"]': {
|
|
4632
|
+
height: '150%'
|
|
4633
|
+
},
|
|
4634
|
+
'&[data-orientation="vertical"]': {
|
|
4635
|
+
width: '150%'
|
|
4636
|
+
},
|
|
4637
|
+
transform: 'translateY(-50%)',
|
|
4638
|
+
...__css
|
|
4639
|
+
},
|
|
4640
|
+
...props
|
|
4641
|
+
}));
|
|
4642
|
+
const Slider = /*#__PURE__*/react$1.forwardRef(function Slider(props, forwardedRef) {
|
|
4643
|
+
const {
|
|
4644
|
+
children,
|
|
4645
|
+
...otherProps
|
|
4646
|
+
} = props;
|
|
4647
|
+
return /*#__PURE__*/jsxRuntime.jsx(SliderInput, { ...otherProps,
|
|
4648
|
+
ref: forwardedRef,
|
|
4649
|
+
"data-reach-slider": "",
|
|
4650
|
+
children: /*#__PURE__*/jsxRuntime.jsxs(SliderTrack, {
|
|
4651
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(SliderRange, {}), /*#__PURE__*/jsxRuntime.jsx(SliderHandle, {}), children]
|
|
4652
|
+
})
|
|
4653
|
+
});
|
|
4654
|
+
});
|
|
4655
|
+
|
|
4421
4656
|
const StackItemContext = /*#__PURE__*/react$1.createContext(null);
|
|
4422
4657
|
StackItemContext.displayName = 'StackItemContext';
|
|
4423
4658
|
function useStackItem({
|
|
@@ -4789,8 +5024,8 @@ function useSnackbarAnimation(ref, timeout) {
|
|
|
4789
5024
|
|
|
4790
5025
|
const Snackbar = /*#__PURE__*/react$1.forwardRef(function Snackbar(props, forwardedRef) {
|
|
4791
5026
|
const {
|
|
4792
|
-
|
|
4793
|
-
} = dynamicTheme.
|
|
5027
|
+
colorScheme
|
|
5028
|
+
} = dynamicTheme.useColorScheme();
|
|
4794
5029
|
const ref = react$1.useRef(null);
|
|
4795
5030
|
const {
|
|
4796
5031
|
__css,
|
|
@@ -4809,7 +5044,7 @@ const Snackbar = /*#__PURE__*/react$1.forwardRef(function Snackbar(props, forwar
|
|
|
4809
5044
|
return /*#__PURE__*/jsxRuntime.jsxs(Paper, {
|
|
4810
5045
|
elevation: 4,
|
|
4811
5046
|
darkThemeBackgroundOverlay: 4,
|
|
4812
|
-
className:
|
|
5047
|
+
className: colorScheme === 'light' ? dynamicTheme.DARK_SCHEME_CLASS : dynamicTheme.LIGHT_SCHEME_CLASS,
|
|
4813
5048
|
ref: core.assignMultipleRefs(forwardedRef, ref),
|
|
4814
5049
|
__css: {
|
|
4815
5050
|
boxShadow: 4,
|
|
@@ -5428,7 +5663,7 @@ exports.List = List;
|
|
|
5428
5663
|
exports.ListItem = ListItem;
|
|
5429
5664
|
exports.ListItemText = ListItemText;
|
|
5430
5665
|
exports.MenuButton = MenuButton;
|
|
5431
|
-
exports.MenuItem = MenuItem;
|
|
5666
|
+
exports.MenuItem = MenuItem$1;
|
|
5432
5667
|
exports.MenuList = MenuList;
|
|
5433
5668
|
exports.MenuPopover = MenuPopover;
|
|
5434
5669
|
exports.NavRailIndicator = NavRailIndicator;
|
|
@@ -5445,6 +5680,12 @@ exports.RippleBox = RippleBox;
|
|
|
5445
5680
|
exports.Select = Select;
|
|
5446
5681
|
exports.SelectItem = SelectItem;
|
|
5447
5682
|
exports.Skeleton = Skeleton;
|
|
5683
|
+
exports.Slider = Slider;
|
|
5684
|
+
exports.SliderHandle = SliderHandle;
|
|
5685
|
+
exports.SliderInput = SliderInput;
|
|
5686
|
+
exports.SliderMarker = SliderMarker;
|
|
5687
|
+
exports.SliderRange = SliderRange;
|
|
5688
|
+
exports.SliderTrack = SliderTrack;
|
|
5448
5689
|
exports.Snackbar = Snackbar;
|
|
5449
5690
|
exports.StackProvider = StackProvider;
|
|
5450
5691
|
exports.Switch = Switch;
|
|
@@ -5467,6 +5708,7 @@ exports.base = base;
|
|
|
5467
5708
|
exports.getBackgroundOverlay = getBackgroundOverlay;
|
|
5468
5709
|
exports.getColorOverlay = getColorOverlay;
|
|
5469
5710
|
exports.getDarkThemeBackgroundOverlay = getDarkThemeBackgroundOverlay;
|
|
5711
|
+
exports.listItemStyle = listItemStyle;
|
|
5470
5712
|
exports.mixColor = mixColor;
|
|
5471
5713
|
exports.rippleStyle = rippleStyle;
|
|
5472
5714
|
exports.sx = sx;
|