@sentry/scraps 0.5.0 → 0.7.0
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/README.md +95 -3
- package/dist/alert/alert.js +10 -7
- package/dist/badge/tag.js +4 -2
- package/dist/button/button.js +1 -0
- package/dist/button/linkButton.js +1 -0
- package/dist/button/styles.js +157 -152
- package/dist/codeBlock/codeBlock.js +1 -0
- package/dist/compactSelect/compactSelect.d.ts +2 -2
- package/dist/compactSelect/compactSelect.js +37 -23
- package/dist/compactSelect/control.js +14 -10
- package/dist/compactSelect/gridList/index.js +35 -36
- package/dist/compactSelect/gridList/option.d.ts +4 -1
- package/dist/compactSelect/gridList/option.js +4 -3
- package/dist/compactSelect/gridList/section.d.ts +10 -3
- package/dist/compactSelect/gridList/section.js +16 -33
- package/dist/compactSelect/listBox/index.d.ts +1 -1
- package/dist/compactSelect/listBox/index.js +46 -58
- package/dist/compactSelect/listBox/section.d.ts +10 -8
- package/dist/compactSelect/listBox/section.js +11 -30
- package/dist/compactSelect/styles.d.ts +6 -7
- package/dist/compactSelect/styles.js +1 -23
- package/dist/compactSelect/utils.js +2 -6
- package/dist/dateTime/config.d.ts +23 -0
- package/dist/dateTime/config.js +50 -0
- package/dist/dateTime/context.d.ts +18 -0
- package/dist/dateTime/context.js +46 -0
- package/dist/dateTime/dateTime.d.ts +6 -0
- package/dist/dateTime/dateTime.js +30 -0
- package/dist/dateTime/format.d.ts +24 -0
- package/dist/dateTime/format.js +45 -0
- package/dist/dateTime/index.d.ts +6 -0
- package/dist/dateTime/index.js +6 -0
- package/dist/dateTime/intlFormatter.d.ts +9 -0
- package/dist/dateTime/intlFormatter.js +16 -0
- package/dist/dateTime/parseDate.d.ts +3 -0
- package/dist/dateTime/parseDate.js +12 -0
- package/dist/diagnostics/context.d.ts +12 -0
- package/dist/diagnostics/context.js +11 -0
- package/dist/diagnostics/index.d.ts +2 -0
- package/dist/diagnostics/index.js +1 -0
- package/dist/disclosure/disclosure.js +1 -1
- package/dist/dragHandle/dragHandle.js +3 -5
- package/dist/dropdownMenu/context.d.ts +36 -11
- package/dist/dropdownMenu/context.js +2 -1
- package/dist/dropdownMenu/dropdownMenu.d.ts +2 -2
- package/dist/dropdownMenu/dropdownMenu.js +9 -3
- package/dist/dropdownMenu/item.d.ts +7 -8
- package/dist/dropdownMenu/item.js +43 -77
- package/dist/dropdownMenu/list.d.ts +31 -5
- package/dist/dropdownMenu/list.js +154 -133
- package/dist/dropdownMenu/useDropdownMenuKeyboard.d.ts +5 -241
- package/dist/dropdownMenu/useDropdownMenuKeyboard.js +5 -29
- package/dist/dropdownMenu/useDropdownMenuRowLayout.js +6 -14
- package/dist/dropdownMenu/useDropdownRootMenuState.d.ts +13 -0
- package/dist/dropdownMenu/useDropdownRootMenuState.js +30 -0
- package/dist/dropdownMenu/useDropdownSubmenuState.d.ts +19 -0
- package/dist/dropdownMenu/useDropdownSubmenuState.js +25 -0
- package/dist/dropdownMenu/utils.js +5 -7
- package/dist/duration/formatElapsedDuration.d.ts +4 -0
- package/dist/duration/formatElapsedDuration.js +10 -0
- package/dist/duration/getDuration.d.ts +68 -0
- package/dist/duration/getDuration.js +80 -0
- package/dist/duration/index.d.ts +2 -0
- package/dist/duration/index.js +2 -0
- package/dist/form/field/radioGroupField.d.ts +7 -0
- package/dist/form/field/radioGroupField.js +14 -0
- package/dist/form/field/selectField.d.ts +3 -4
- package/dist/form/field/selectField.js +16 -24
- package/dist/{compactSelect/fzf.d.ts → fzf.d.ts} +1 -0
- package/dist/{compactSelect/fzf.js → fzf.js} +5 -1
- package/dist/layout/container.d.ts +24 -7
- package/dist/layout/container.js +9 -12
- package/dist/layout/flex.js +1 -1
- package/dist/layout/grid.js +2 -2
- package/dist/layout/index.d.ts +1 -1
- package/dist/layout/index.js +1 -1
- package/dist/layout/stack.js +1 -1
- package/dist/layout/styles.d.ts +28 -7
- package/dist/layout/styles.js +76 -16
- package/dist/layout/surface.d.ts +2 -2
- package/dist/layout/surface.js +6 -3
- package/dist/legacyDatetime.d.ts +21 -0
- package/dist/legacyDatetime.js +13 -0
- package/dist/link/index.d.ts +1 -1
- package/dist/link/index.js +1 -1
- package/dist/link/linkBehaviorContext.d.ts +9 -0
- package/dist/link/linkBehaviorContext.js +37 -7
- package/dist/menu/menu.d.ts +1 -3
- package/dist/menu/menu.js +5 -6
- package/dist/menu/selectValue.d.ts +2 -6
- package/dist/modal/components.js +2 -2
- package/dist/overlayArrow.js +2 -2
- package/dist/relativeTime/getRelativeDate.d.ts +14 -0
- package/dist/relativeTime/getRelativeDate.js +107 -0
- package/dist/relativeTime/index.d.ts +3 -0
- package/dist/relativeTime/index.js +3 -0
- package/dist/relativeTime/relativeTime.d.ts +55 -0
- package/dist/relativeTime/relativeTime.js +102 -0
- package/dist/relativeTime/useRelativeTimeFormatter.d.ts +2 -0
- package/dist/relativeTime/useRelativeTimeFormatter.js +10 -0
- package/dist/select/chips.d.ts +14 -0
- package/dist/select/chips.js +45 -0
- package/dist/select/filter.js +7 -11
- package/dist/select/index.d.ts +1 -1
- package/dist/select/indicators.d.ts +11 -0
- package/dist/select/indicators.js +61 -0
- package/dist/select/menu.d.ts +44 -0
- package/dist/select/menu.js +103 -0
- package/dist/select/option.d.ts +23 -15
- package/dist/select/option.js +66 -58
- package/dist/select/options.d.ts +31 -0
- package/dist/select/options.js +74 -0
- package/dist/select/select.d.ts +24 -11
- package/dist/select/select.js +527 -429
- package/dist/select/styles.d.ts +148 -2
- package/dist/select/styles.js +156 -1
- package/dist/select/types.d.ts +6 -7
- package/dist/select/types.js +4 -0
- package/dist/select/utils.d.ts +2 -0
- package/dist/select/utils.js +4 -0
- package/dist/separator/separator.d.ts +2 -2
- package/dist/separator/separator.js +4 -3
- package/dist/slot/slot.js +16 -12
- package/dist/tabs/context.d.ts +9 -0
- package/dist/tabs/context.js +9 -0
- package/dist/tabs/index.d.ts +2 -4
- package/dist/tabs/index.js +1 -3
- package/dist/tabs/item.d.ts +16 -5
- package/dist/tabs/tab.js +9 -4
- package/dist/tabs/tabList.d.ts +5 -5
- package/dist/tabs/tabList.js +8 -6
- package/dist/tabs/tabPanels.d.ts +2 -3
- package/dist/tabs/tabPanels.js +1 -1
- package/dist/tabs/tabs.d.ts +46 -31
- package/dist/tabs/tabs.js +38 -35
- package/dist/text/prose.d.ts +2 -2
- package/dist/theme/index.d.ts +2 -0
- package/dist/theme/index.js +2 -0
- package/dist/theme/theme.d.ts +34 -34
- package/dist/theme/theme.js +9 -0
- package/dist/theme/types.d.ts +21 -2
- package/dist/theme/useResolvedTheme.d.ts +12 -0
- package/dist/theme/useResolvedTheme.js +20 -0
- package/dist/theme/variables.css +1116 -0
- package/dist/theme/variables.d.ts +985 -0
- package/dist/theme/variables.js +455 -0
- package/dist/translation/index.d.ts +1 -0
- package/dist/translation/index.js +1 -0
- package/dist/translation/translate.d.ts +9 -0
- package/dist/translation/translate.js +5 -0
- package/dist/translation/translationContext.d.ts +2 -1
- package/dist/translation/translationContext.js +2 -1
- package/dist/useVirtualCollection.d.ts +14 -1
- package/dist/useVirtualCollection.js +59 -3
- package/fonts/OFL.txt +94 -0
- package/fonts/roboto-mono-variable-cyrillic-ext.woff2 +0 -0
- package/fonts/roboto-mono-variable-cyrillic.woff2 +0 -0
- package/fonts/roboto-mono-variable-greek.woff2 +0 -0
- package/fonts/roboto-mono-variable-latin-ext.woff2 +0 -0
- package/fonts/roboto-mono-variable-vietnamese.woff2 +0 -0
- package/fonts/roboto-mono-variable.woff2 +0 -0
- package/fonts/rubik-variable-cyrillic-ext.woff2 +0 -0
- package/fonts/rubik-variable-cyrillic.woff2 +0 -0
- package/fonts/rubik-variable-latin-ext.woff2 +0 -0
- package/fonts/rubik-variable.woff2 +0 -0
- package/fonts.css +211 -0
- package/package.json +39 -15
- package/dist/compactSelect/useVirtualizedItems.d.ts +0 -52
- package/dist/compactSelect/useVirtualizedItems.js +0 -74
- package/dist/datetime.d.ts +0 -39
- package/dist/datetime.js +0 -20
- package/dist/dropdownMenu/useSafetyTriangle.d.ts +0 -12
- package/dist/dropdownMenu/useSafetyTriangle.js +0 -119
- package/dist/select/reactSelectWrapper.d.ts +0 -8
- package/dist/select/reactSelectWrapper.js +0 -25
- package/dist/select/virtualizedMenuList.d.ts +0 -24
- package/dist/select/virtualizedMenuList.js +0 -123
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { getSnapshot } from "../dateTime/config.js";
|
|
2
|
+
const units = [
|
|
3
|
+
{
|
|
4
|
+
unit: 'year',
|
|
5
|
+
size: 31536000000,
|
|
6
|
+
long: (count, { tn })=>tn('year', 'years', count),
|
|
7
|
+
short: ({ t })=>t('yr'),
|
|
8
|
+
narrow: ({ t })=>t('y')
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
unit: 'month',
|
|
12
|
+
size: 2629800000,
|
|
13
|
+
long: (count, { tn })=>tn('month', 'months', count),
|
|
14
|
+
short: ({ t })=>t('mo'),
|
|
15
|
+
narrow: ({ pgettext })=>pgettext('abbreviated months', 'm')
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
unit: 'week',
|
|
19
|
+
size: 604800000,
|
|
20
|
+
long: (count, { tn })=>tn('week', 'weeks', count),
|
|
21
|
+
short: ({ t })=>t('wk'),
|
|
22
|
+
narrow: ({ t })=>t('w')
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
unit: 'day',
|
|
26
|
+
size: 86400000,
|
|
27
|
+
long: (count, { tn })=>tn('day', 'days', count),
|
|
28
|
+
short: ({ t })=>t('d'),
|
|
29
|
+
narrow: ({ t })=>t('d')
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
unit: 'hour',
|
|
33
|
+
size: 3600000,
|
|
34
|
+
long: (count, { tn })=>tn('hour', 'hours', count),
|
|
35
|
+
short: ({ t })=>t('hr'),
|
|
36
|
+
narrow: ({ t })=>t('h')
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
unit: 'minute',
|
|
40
|
+
size: 60000,
|
|
41
|
+
long: (count, { tn })=>tn('minute', 'minutes', count),
|
|
42
|
+
short: ({ t })=>t('min'),
|
|
43
|
+
narrow: ({ pgettext })=>pgettext('abbreviated minutes', 'm')
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
unit: 'second',
|
|
47
|
+
size: 1000,
|
|
48
|
+
long: (count, { tn })=>tn('second', 'seconds', count),
|
|
49
|
+
short: ({ t })=>t('s'),
|
|
50
|
+
narrow: ({ t })=>t('s')
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
unit: 'millisecond',
|
|
54
|
+
size: 1,
|
|
55
|
+
long: (count, { tn })=>tn('millisecond', 'milliseconds', count),
|
|
56
|
+
short: ({ t })=>t('ms'),
|
|
57
|
+
narrow: ({ t })=>t('ms')
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
unit: 'microsecond',
|
|
61
|
+
size: 0.001,
|
|
62
|
+
long: (count, { tn })=>tn('microsecond', 'microseconds', count),
|
|
63
|
+
short: ()=>'μs',
|
|
64
|
+
narrow: ()=>'μs'
|
|
65
|
+
}
|
|
66
|
+
];
|
|
67
|
+
function getDuration(seconds, options = {}) {
|
|
68
|
+
return getDurationWithMessages(seconds, options, getSnapshot().messages);
|
|
69
|
+
}
|
|
70
|
+
function getDurationWithMessages(seconds, { precision = 0, style = 'long', absolute = false, minimumUnit = 'millisecond' }, messages) {
|
|
71
|
+
const milliseconds = 1000 * seconds;
|
|
72
|
+
const magnitude = Math.abs(milliseconds);
|
|
73
|
+
const unit = units.find(({ size, unit })=>magnitude >= size || minimumUnit === unit) ?? units[8];
|
|
74
|
+
const value = (absolute ? magnitude : milliseconds) / unit.size;
|
|
75
|
+
const label = value.toFixed(precision);
|
|
76
|
+
if ('long' !== style) return `${label}${unit[style](messages)}`;
|
|
77
|
+
const count = precision <= 0 ? Math.round(value) : value;
|
|
78
|
+
return `${label} ${unit.long(count, messages)}`;
|
|
79
|
+
}
|
|
80
|
+
export { getDuration, getDurationWithMessages };
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type * as React from 'react';
|
|
2
|
+
import { type ToggleCardProps } from '../../toggleCard/index.js';
|
|
2
3
|
export interface RadioGroupProps<T extends string> {
|
|
3
4
|
children: (components: {
|
|
5
|
+
Card: (props: RadioCardProps<NoInfer<T>>) => React.JSX.Element;
|
|
4
6
|
Item: (props: RadioItemProps<NoInfer<T>>) => React.JSX.Element;
|
|
5
7
|
}) => React.ReactNode;
|
|
6
8
|
onChange: (value: NoInfer<T>) => void;
|
|
@@ -12,5 +14,10 @@ interface RadioItemProps<T extends string> {
|
|
|
12
14
|
value: T;
|
|
13
15
|
description?: React.ReactNode;
|
|
14
16
|
}
|
|
17
|
+
interface RadioCardProps<T extends string> {
|
|
18
|
+
children: React.ReactNode;
|
|
19
|
+
value: T;
|
|
20
|
+
padding?: ToggleCardProps['padding'];
|
|
21
|
+
}
|
|
15
22
|
export declare const RadioGroupField: <T extends string>(props: RadioGroupProps<T>) => React.JSX.Element;
|
|
16
23
|
export {};
|
|
@@ -8,6 +8,7 @@ import { useFieldContext } from "../formContext.js";
|
|
|
8
8
|
import { Flex, Stack } from "../../layout/index.js";
|
|
9
9
|
import { Radio } from "../../radio/index.js";
|
|
10
10
|
import { Text } from "../../text/index.js";
|
|
11
|
+
import { ToggleCard } from "../../toggleCard/index.js";
|
|
11
12
|
import { useAutoSaveIndicator } from "./baseField.js";
|
|
12
13
|
function RadioGroup({ children, value, onChange, disabled }) {
|
|
13
14
|
const field = useFieldContext();
|
|
@@ -85,7 +86,20 @@ function RadioItem({ children, value, description }) {
|
|
|
85
86
|
]
|
|
86
87
|
});
|
|
87
88
|
}
|
|
89
|
+
function RadioCard({ children, value, padding }) {
|
|
90
|
+
const { checked, onChange, ...fieldProps } = useGroupItemContext(value);
|
|
91
|
+
return /*#__PURE__*/ jsx(ToggleCard, {
|
|
92
|
+
...fieldProps,
|
|
93
|
+
variant: "radio",
|
|
94
|
+
padding: padding,
|
|
95
|
+
value: value,
|
|
96
|
+
checked: checked,
|
|
97
|
+
onChange: ()=>onChange(value, true),
|
|
98
|
+
children: children
|
|
99
|
+
});
|
|
100
|
+
}
|
|
88
101
|
const radioGroupComponents = {
|
|
102
|
+
Card: RadioCard,
|
|
89
103
|
Item: RadioItem
|
|
90
104
|
};
|
|
91
105
|
const RadioGroupField = RadioGroup;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import type { BaseSelectProps,
|
|
1
|
+
import type { BaseSelectProps, SelectSelectionProps, SelectValue } from '../../select/index.js';
|
|
2
2
|
import { type BaseFieldProps } from './baseField.js';
|
|
3
|
-
type BaseSelectFieldProps<TValue, TOption extends SelectValue<TValue>> = Omit<BaseSelectProps<TValue, TOption
|
|
3
|
+
type BaseSelectFieldProps<TValue, TOption extends SelectValue<TValue>> = Omit<BaseSelectProps<TValue, TOption, SelectValue<TValue | string>>, 'onBlur' | 'disabled' | 'ref' | 'inputRef' | 'id' | 'options'> & BaseFieldProps<HTMLInputElement> & {
|
|
4
4
|
options: ReadonlyArray<TOption & SelectValue<TValue>>;
|
|
5
|
-
components?: Omit<SelectComponents<TOption>, 'Indicators'>;
|
|
6
5
|
};
|
|
7
6
|
export type SelectFieldProps<TValue, TOption extends SelectValue<TValue> = SelectValue<TValue>> = BaseSelectFieldProps<TValue, TOption> & SelectSelectionProps<TValue>;
|
|
8
|
-
export declare function SelectField<TValue, TOption extends SelectValue<TValue> = SelectValue<TValue>>({ onChange, disabled, multiple, clearable, value, ref, ...props }: SelectFieldProps<TValue, TOption>): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare function SelectField<TValue, TOption extends SelectValue<TValue> = SelectValue<TValue>>({ onChange, disabled, multiple, clearable, trailingItems, value, ref, ...props }: SelectFieldProps<TValue, TOption>): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
9
8
|
export {};
|
|
@@ -1,23 +1,12 @@
|
|
|
1
1
|
import { jsx, jsxs } from "@emotion/react/jsx-runtime";
|
|
2
|
-
import { useRef } from "react";
|
|
2
|
+
import { Fragment, useRef } from "react";
|
|
3
3
|
import { useAutoSaveContext } from "../autoSaveContext.js";
|
|
4
|
-
import { Container
|
|
4
|
+
import { Container } from "../../layout/index.js";
|
|
5
5
|
import { Select } from "../../select/index.js";
|
|
6
|
-
import { BaseField
|
|
7
|
-
function
|
|
8
|
-
const indicator = useAutoSaveIndicator();
|
|
9
|
-
return /*#__PURE__*/ jsxs(Flex, {
|
|
10
|
-
padding: "0 sm",
|
|
11
|
-
gap: "sm",
|
|
12
|
-
align: "center",
|
|
13
|
-
children: [
|
|
14
|
-
indicator,
|
|
15
|
-
children
|
|
16
|
-
]
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
function SelectField({ onChange, disabled, multiple, clearable, value, ref, ...props }) {
|
|
6
|
+
import { BaseField } from "./baseField.js";
|
|
7
|
+
function SelectField({ onChange, disabled, multiple, clearable, trailingItems, value, ref, ...props }) {
|
|
20
8
|
const autoSaveContext = useAutoSaveContext();
|
|
9
|
+
const changeValue = onChange;
|
|
21
10
|
const selectVariantProps = multiple ? {
|
|
22
11
|
multiple: true,
|
|
23
12
|
clearable,
|
|
@@ -32,20 +21,23 @@ function SelectField({ onChange, disabled, multiple, clearable, value, ref, ...p
|
|
|
32
21
|
return /*#__PURE__*/ jsx(BaseField, {
|
|
33
22
|
disabled: disabled,
|
|
34
23
|
ref: ref,
|
|
35
|
-
children: ({ id, ref: fieldRef, ...fieldProps })=>/*#__PURE__*/ jsx(Container, {
|
|
24
|
+
children: ({ id, ref: fieldRef, ...fieldProps }, { indicator })=>/*#__PURE__*/ jsx(Container, {
|
|
36
25
|
flex: 1,
|
|
37
26
|
minWidth: 0,
|
|
38
27
|
children: /*#__PURE__*/ jsx(Select, {
|
|
39
28
|
...fieldProps,
|
|
40
29
|
...props,
|
|
41
30
|
...selectVariantProps,
|
|
31
|
+
creatable: props.creatable,
|
|
42
32
|
id: id,
|
|
43
33
|
inputRef: fieldRef,
|
|
44
34
|
blurInputOnSelect: false,
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
35
|
+
trailingItems: /*#__PURE__*/ jsxs(Fragment, {
|
|
36
|
+
children: [
|
|
37
|
+
indicator,
|
|
38
|
+
trailingItems
|
|
39
|
+
]
|
|
40
|
+
}),
|
|
49
41
|
onOpenChange: (isOpen)=>{
|
|
50
42
|
isMenuOpenRef.current = isOpen;
|
|
51
43
|
props.onOpenChange?.(isOpen);
|
|
@@ -53,15 +45,15 @@ function SelectField({ onChange, disabled, multiple, clearable, value, ref, ...p
|
|
|
53
45
|
},
|
|
54
46
|
onChange: (option)=>{
|
|
55
47
|
if (multiple) {
|
|
56
|
-
|
|
48
|
+
changeValue(Array.isArray(option) ? option.map((o)=>o.value) : []);
|
|
57
49
|
if (autoSaveContext && !isMenuOpenRef.current) fieldProps.onBlur();
|
|
58
50
|
} else {
|
|
59
51
|
if (!option) {
|
|
60
|
-
|
|
52
|
+
changeValue(null);
|
|
61
53
|
if (autoSaveContext) fieldProps.onBlur();
|
|
62
54
|
return;
|
|
63
55
|
}
|
|
64
|
-
|
|
56
|
+
if (!Array.isArray(option)) changeValue(option.value);
|
|
65
57
|
fieldProps.onBlur();
|
|
66
58
|
}
|
|
67
59
|
}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
function getSearchScore(text, search) {
|
|
2
|
+
const { end, score } = fzf(text, search.toLowerCase(), false);
|
|
3
|
+
return -1 === end ? 0 : Math.max(1, score);
|
|
4
|
+
}
|
|
1
5
|
const scoreMatch = 16;
|
|
2
6
|
const scoreGapStart = -3;
|
|
3
7
|
const scoreGapExtention = -1;
|
|
@@ -148,4 +152,4 @@ function calculateScore(text, pattern, sidx, eidx, caseSensitive) {
|
|
|
148
152
|
matches
|
|
149
153
|
];
|
|
150
154
|
}
|
|
151
|
-
export { fzf };
|
|
155
|
+
export { fzf, getSearchScore };
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { CSS } from '../cssTypes.js';
|
|
3
|
-
import type { BorderVariant, RadiusSize, SpaceSize
|
|
3
|
+
import type { BackgroundToken, BorderVariant, BorderWidthToken, RadiusSize, SpaceSize } from '../theme/index.js';
|
|
4
4
|
import { type Responsive, type Shorthand } from './styles.js';
|
|
5
5
|
type Margin = SpaceSize | 'auto' | '0';
|
|
6
6
|
interface ContainerLayoutProps {
|
|
7
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Background color, as a path into `tokens.background`.
|
|
9
|
+
*/
|
|
10
|
+
background?: Responsive<BackgroundToken>;
|
|
8
11
|
display?: Responsive<CSS['display']>;
|
|
9
12
|
padding?: Responsive<Shorthand<SpaceSize, 4>>;
|
|
10
13
|
paddingTop?: Responsive<SpaceSize>;
|
|
@@ -45,11 +48,25 @@ interface ContainerLayoutProps {
|
|
|
45
48
|
height?: Responsive<CSS['height']>;
|
|
46
49
|
minHeight?: Responsive<CSS['minHeight']>;
|
|
47
50
|
maxHeight?: Responsive<CSS['maxHeight']>;
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
/**
|
|
52
|
+
* Draws a solid border on all sides in this color, as a path into
|
|
53
|
+
* `tokens.border`. The width defaults to 1px; set `borderWidth` to change it.
|
|
54
|
+
* `none` removes the border.
|
|
55
|
+
*/
|
|
56
|
+
borderColor?: Responsive<BorderVariant>;
|
|
57
|
+
/**
|
|
58
|
+
* Draws a solid border on one side in this color. Its width comes from
|
|
59
|
+
* `borderWidth`, 1px by default. `none` removes that side.
|
|
60
|
+
*/
|
|
61
|
+
borderTopColor?: Responsive<BorderVariant>;
|
|
62
|
+
borderBottomColor?: Responsive<BorderVariant>;
|
|
63
|
+
borderLeftColor?: Responsive<BorderVariant>;
|
|
64
|
+
borderRightColor?: Responsive<BorderVariant>;
|
|
65
|
+
/**
|
|
66
|
+
* Width of the drawn border sides, as a key of `theme.border`. Set alone, it
|
|
67
|
+
* draws a border on all sides in the `primary` color.
|
|
68
|
+
*/
|
|
69
|
+
borderWidth?: Responsive<BorderWidthToken>;
|
|
53
70
|
area?: Responsive<CSS['gridArea']>;
|
|
54
71
|
row?: Responsive<CSS['gridRow']>;
|
|
55
72
|
column?: Responsive<CSS['gridColumn']>;
|
package/dist/layout/container.js
CHANGED
|
@@ -3,17 +3,18 @@ import { useMemo, useRef } from "react";
|
|
|
3
3
|
import is_prop_valid from "@emotion/is-prop-valid";
|
|
4
4
|
import styled from "@emotion/styled";
|
|
5
5
|
import { mergeRefs } from "@react-aria/utils";
|
|
6
|
-
import { ContainerQueryProvider,
|
|
6
|
+
import { ContainerQueryProvider, getBackground, getBorderStyles, getMargin, getRadius, getSpacing, rc } from "./styles.js";
|
|
7
7
|
const omitContainerProps = new Set([
|
|
8
8
|
'alignSelf',
|
|
9
9
|
'area',
|
|
10
10
|
'as',
|
|
11
11
|
'background',
|
|
12
|
-
'
|
|
13
|
-
'
|
|
14
|
-
'
|
|
15
|
-
'
|
|
16
|
-
'
|
|
12
|
+
'borderColor',
|
|
13
|
+
'borderTopColor',
|
|
14
|
+
'borderBottomColor',
|
|
15
|
+
'borderLeftColor',
|
|
16
|
+
'borderRightColor',
|
|
17
|
+
'borderWidth',
|
|
17
18
|
'bottom',
|
|
18
19
|
'column',
|
|
19
20
|
'contain',
|
|
@@ -118,7 +119,7 @@ const Container = styled((props)=>{
|
|
|
118
119
|
${(p)=>rc('margin-left', p.marginLeft, p.theme, getMargin)};
|
|
119
120
|
${(p)=>rc('margin-right', p.marginRight, p.theme, getMargin)};
|
|
120
121
|
|
|
121
|
-
${(p)=>rc('background', p.background, p.theme,
|
|
122
|
+
${(p)=>rc('background', p.background, p.theme, getBackground)};
|
|
122
123
|
|
|
123
124
|
${(p)=>rc('border-radius', p.radius, p.theme, getRadius)};
|
|
124
125
|
|
|
@@ -143,11 +144,7 @@ const Container = styled((props)=>{
|
|
|
143
144
|
${(p)=>rc('align-self', p.alignSelf, p.theme)};
|
|
144
145
|
${(p)=>rc('justify-self', p.justifySelf, p.theme)};
|
|
145
146
|
|
|
146
|
-
${(p)=>
|
|
147
|
-
${(p)=>rc('border-top', p.borderTop, p.theme, getBorder)};
|
|
148
|
-
${(p)=>rc('border-bottom', p.borderBottom, p.theme, getBorder)};
|
|
149
|
-
${(p)=>rc('border-left', p.borderLeft, p.theme, getBorder)};
|
|
150
|
-
${(p)=>rc('border-right', p.borderRight, p.theme, getBorder)};
|
|
147
|
+
${(p)=>getBorderStyles(p, p.theme)};
|
|
151
148
|
|
|
152
149
|
${(p)=>rc('visibility', p.visibility, p.theme)};
|
|
153
150
|
${(p)=>rc('white-space', p.whiteSpace, p.theme)};
|
package/dist/layout/flex.js
CHANGED
|
@@ -23,7 +23,7 @@ const Flex = styled(Container, {
|
|
|
23
23
|
${(p)=>rc('flex', p.flex, p.theme)};
|
|
24
24
|
${(p)=>rc('justify-content', p.justify, p.theme, (value)=>void 0 === value ? void 0 : FLEX_JUSTIFY_CONTENT[value])};
|
|
25
25
|
|
|
26
|
-
${(p)=>rc('align-items', p.align, p.theme, (value
|
|
26
|
+
${(p)=>rc('align-items', p.align, p.theme, (value)=>{
|
|
27
27
|
switch(value){
|
|
28
28
|
case 'start':
|
|
29
29
|
return 'flex-start';
|
package/dist/layout/grid.js
CHANGED
|
@@ -30,7 +30,7 @@ const Grid = styled(Container, {
|
|
|
30
30
|
${(p)=>rc('grid-auto-rows', p.autoRows, p.theme)};
|
|
31
31
|
${(p)=>rc('grid-auto-flow', p.flow, p.theme)};
|
|
32
32
|
|
|
33
|
-
${(p)=>rc('justify-content', p.justify, p.theme, (value
|
|
33
|
+
${(p)=>rc('justify-content', p.justify, p.theme, (value)=>{
|
|
34
34
|
switch(value){
|
|
35
35
|
case 'start':
|
|
36
36
|
return 'start';
|
|
@@ -51,7 +51,7 @@ const Grid = styled(Container, {
|
|
|
51
51
|
}
|
|
52
52
|
})};
|
|
53
53
|
|
|
54
|
-
${(p)=>rc('align-content', p.alignContent, p.theme, (value
|
|
54
|
+
${(p)=>rc('align-content', p.alignContent, p.theme, (value)=>{
|
|
55
55
|
switch(value){
|
|
56
56
|
case 'start':
|
|
57
57
|
return 'start';
|
package/dist/layout/index.d.ts
CHANGED
|
@@ -9,5 +9,5 @@ export { Stack, type StackProps } from './stack.js';
|
|
|
9
9
|
export { ContainerQueryContext, ContainerQueryProvider, type Responsive, type ResponsiveKey,
|
|
10
10
|
/** @public */
|
|
11
11
|
useContainerBreakpoint, useHasContainerQuery, useResponsivePropValue, } from './styles.js';
|
|
12
|
-
export {
|
|
12
|
+
export { getMargin, getRadius, getSpacing } from './styles.js';
|
|
13
13
|
export { FLEX_JUSTIFY_CONTENT, type FlexJustify } from './styles.js';
|
package/dist/layout/index.js
CHANGED
|
@@ -3,4 +3,4 @@ export { Surface } from "./surface.js";
|
|
|
3
3
|
export { Flex } from "./flex.js";
|
|
4
4
|
export { Grid } from "./grid.js";
|
|
5
5
|
export { Stack } from "./stack.js";
|
|
6
|
-
export { ContainerQueryContext, ContainerQueryProvider, FLEX_JUSTIFY_CONTENT,
|
|
6
|
+
export { ContainerQueryContext, ContainerQueryProvider, FLEX_JUSTIFY_CONTENT, getMargin, getRadius, getSpacing, useContainerBreakpoint, useHasContainerQuery, useResponsivePropValue } from "./styles.js";
|
package/dist/layout/stack.js
CHANGED
|
@@ -46,7 +46,7 @@ const StackSeparator = styled((props)=>{
|
|
|
46
46
|
return /*#__PURE__*/ jsx(Separator, {
|
|
47
47
|
...props,
|
|
48
48
|
orientation: 'horizontal' === orientation ? 'vertical' : 'horizontal',
|
|
49
|
-
|
|
49
|
+
borderColor: props.borderColor ?? 'primary'
|
|
50
50
|
});
|
|
51
51
|
})``;
|
|
52
52
|
const Stack = Object.assign(StackComponent, {
|
package/dist/layout/styles.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { ReactNode, RefObject } from 'react';
|
|
2
|
-
import type { BorderVariant, BreakpointSize, ContainerBreakpointSize, RadiusSize, SpaceSize, Theme } from '../theme/index.js';
|
|
3
|
-
|
|
4
|
-
export declare function rc<T>(property: string, value: Responsive<T> | undefined, theme: Theme, resolver?: (value: T | undefined, breakpoint: ResponsiveBreakpoint | undefined, theme: Theme) => string | undefined): string | undefined;
|
|
2
|
+
import type { BackgroundToken, BorderVariant, BorderWidthToken, BreakpointSize, ContainerBreakpointSize, RadiusSize, SpaceSize, Theme } from '../theme/index.js';
|
|
3
|
+
export declare function rc<T>(property: string, value: Responsive<T> | undefined, theme: Theme, resolver?: (value: T | undefined, theme: Theme) => string | undefined): string | undefined;
|
|
5
4
|
type Margin = SpaceSize | 'auto' | '0';
|
|
6
5
|
/**
|
|
7
6
|
* The `justify` vocabulary a flex container accepts, and its mapping onto CSS
|
|
@@ -38,10 +37,32 @@ export type Shorthand<T extends string, N extends 4 | 2> = N extends 4 ? `${T} $
|
|
|
38
37
|
type ScreenBreakpoint = `screen:${BreakpointSize}`;
|
|
39
38
|
export type ResponsiveKey = ContainerBreakpointSize | ScreenBreakpoint;
|
|
40
39
|
export type Responsive<T> = T | Partial<Record<ResponsiveKey, T>>;
|
|
41
|
-
export declare function
|
|
42
|
-
export declare function
|
|
43
|
-
|
|
44
|
-
|
|
40
|
+
export declare function getBackground(background: BackgroundToken | undefined, theme: Theme): string | undefined;
|
|
41
|
+
export declare function getBorderWidth(borderWidth: BorderWidthToken | undefined, theme: Theme): string | undefined;
|
|
42
|
+
interface BorderProps {
|
|
43
|
+
borderBottomColor?: Responsive<BorderVariant>;
|
|
44
|
+
borderColor?: Responsive<BorderVariant>;
|
|
45
|
+
borderLeftColor?: Responsive<BorderVariant>;
|
|
46
|
+
borderRightColor?: Responsive<BorderVariant>;
|
|
47
|
+
borderTopColor?: Responsive<BorderVariant>;
|
|
48
|
+
borderWidth?: Responsive<BorderWidthToken>;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Sets the style and color of one border edge (or of all edges, for `border`).
|
|
52
|
+
* `rc` makes the first defined breakpoint the base, so the edge is drawn at
|
|
53
|
+
* every width.
|
|
54
|
+
*/
|
|
55
|
+
export declare function getBorderEdge(property: string, value: Responsive<BorderVariant>, theme: Theme): string;
|
|
56
|
+
/**
|
|
57
|
+
* Resolves the border props into CSS. `borderColor` draws all sides, a side
|
|
58
|
+
* color draws one side, and `borderWidth` sets the width of the drawn sides.
|
|
59
|
+
* The width defaults to 1px, and `borderWidth` alone draws all sides in the
|
|
60
|
+
* `primary` color.
|
|
61
|
+
*/
|
|
62
|
+
export declare function getBorderStyles(props: BorderProps, theme: Theme): string | undefined;
|
|
63
|
+
export declare function getRadius(radius: Shorthand<RadiusSize, 4> | undefined, theme: Theme): string | undefined;
|
|
64
|
+
export declare function getSpacing(spacing: Shorthand<SpaceSize, 4> | undefined, theme: Theme): string | undefined;
|
|
65
|
+
export declare function getMargin(margin: Shorthand<Margin, 4> | undefined, theme: Theme): string | undefined;
|
|
45
66
|
/**
|
|
46
67
|
* Resolves a `Responsive<T>` prop to its current value in JS, across both the
|
|
47
68
|
* container and viewport axes — the JS mirror of what `rc()` emits as CSS.
|
package/dist/layout/styles.js
CHANGED
|
@@ -3,15 +3,15 @@ import { createContext, useCallback, useContext, useLayoutEffect, useMemo, useSt
|
|
|
3
3
|
import { useTheme } from "@emotion/react";
|
|
4
4
|
function rc(property, value, theme, resolver) {
|
|
5
5
|
if (!isResponsive(value)) {
|
|
6
|
-
const resolvedValue = resolver ? resolver(value,
|
|
6
|
+
const resolvedValue = resolver ? resolver(value, theme) : value;
|
|
7
7
|
if (void 0 === resolvedValue) return;
|
|
8
8
|
return `${property}: ${resolvedValue};`;
|
|
9
9
|
}
|
|
10
10
|
let first = true;
|
|
11
11
|
const declarations = [];
|
|
12
|
-
const emit = (propKey,
|
|
12
|
+
const emit = (propKey, atRule, size)=>{
|
|
13
13
|
const v = value[propKey];
|
|
14
|
-
const resolvedValue = resolver ? resolver(v,
|
|
14
|
+
const resolvedValue = resolver ? resolver(v, theme) : v;
|
|
15
15
|
if (void 0 === resolvedValue) return;
|
|
16
16
|
if (first) {
|
|
17
17
|
first = false;
|
|
@@ -22,8 +22,8 @@ function rc(property, value, theme, resolver) {
|
|
|
22
22
|
${property}: ${resolvedValue};
|
|
23
23
|
}`);
|
|
24
24
|
};
|
|
25
|
-
for (const breakpoint of CONTAINER_ORDER)emit(breakpoint,
|
|
26
|
-
for (const { key, token } of VIEWPORT_ORDER)emit(key,
|
|
25
|
+
for (const breakpoint of CONTAINER_ORDER)emit(breakpoint, '@container', theme.container[breakpoint]);
|
|
26
|
+
for (const { key, token } of VIEWPORT_ORDER)emit(key, '@media', theme.breakpoints[token]);
|
|
27
27
|
return declarations.join('');
|
|
28
28
|
}
|
|
29
29
|
const CONTAINER_ORDER = [
|
|
@@ -95,27 +95,87 @@ function resolveMargin(sizeComponent, theme) {
|
|
|
95
95
|
if ('0' === sizeComponent) return '0';
|
|
96
96
|
return theme.space[sizeComponent] ?? theme.space['0'];
|
|
97
97
|
}
|
|
98
|
-
function
|
|
99
|
-
if (
|
|
100
|
-
|
|
101
|
-
|
|
98
|
+
function getBackground(background, theme) {
|
|
99
|
+
if (void 0 === background) return;
|
|
100
|
+
let node = theme.tokens.background;
|
|
101
|
+
for (const segment of background.split('.'))node = node[segment];
|
|
102
|
+
return node;
|
|
102
103
|
}
|
|
103
|
-
function
|
|
104
|
+
function borderValue(path, theme) {
|
|
105
|
+
let node = theme.tokens.border;
|
|
106
|
+
for (const segment of path.split('.'))node = node[segment];
|
|
107
|
+
return node;
|
|
108
|
+
}
|
|
109
|
+
function getBorderWidth(borderWidth, theme) {
|
|
110
|
+
if (void 0 === borderWidth) return;
|
|
111
|
+
return theme.border[borderWidth];
|
|
112
|
+
}
|
|
113
|
+
function getBorderStyle(border) {
|
|
104
114
|
if (void 0 === border) return;
|
|
105
|
-
|
|
106
|
-
|
|
115
|
+
return 'none' === border ? 'none' : 'solid';
|
|
116
|
+
}
|
|
117
|
+
function getBorderColor(border, theme) {
|
|
118
|
+
if (void 0 === border) return;
|
|
119
|
+
return borderValue('none' === border ? 'primary' : border, theme);
|
|
120
|
+
}
|
|
121
|
+
const BORDER_SIDES = [
|
|
122
|
+
[
|
|
123
|
+
'top',
|
|
124
|
+
'borderTopColor'
|
|
125
|
+
],
|
|
126
|
+
[
|
|
127
|
+
'bottom',
|
|
128
|
+
'borderBottomColor'
|
|
129
|
+
],
|
|
130
|
+
[
|
|
131
|
+
'left',
|
|
132
|
+
'borderLeftColor'
|
|
133
|
+
],
|
|
134
|
+
[
|
|
135
|
+
'right',
|
|
136
|
+
'borderRightColor'
|
|
137
|
+
]
|
|
138
|
+
];
|
|
139
|
+
function hasValue(value) {
|
|
140
|
+
if (isResponsive(value)) return Object.values(value).some((v)=>void 0 !== v);
|
|
141
|
+
return void 0 !== value;
|
|
142
|
+
}
|
|
143
|
+
function getBorderEdge(property, value, theme) {
|
|
144
|
+
return [
|
|
145
|
+
rc(`${property}-style`, value, theme, getBorderStyle),
|
|
146
|
+
rc(`${property}-color`, value, theme, getBorderColor)
|
|
147
|
+
].join('');
|
|
148
|
+
}
|
|
149
|
+
function getBorderStyles(props, theme) {
|
|
150
|
+
const sides = BORDER_SIDES.flatMap(([side, prop])=>{
|
|
151
|
+
const value = props[prop];
|
|
152
|
+
return hasValue(value) ? [
|
|
153
|
+
[
|
|
154
|
+
side,
|
|
155
|
+
value
|
|
156
|
+
]
|
|
157
|
+
] : [];
|
|
158
|
+
});
|
|
159
|
+
const allSides = hasValue(props.borderColor) ? props.borderColor : hasValue(props.borderWidth) && 0 === sides.length ? 'primary' : void 0;
|
|
160
|
+
if (void 0 === allSides && 0 === sides.length) return;
|
|
161
|
+
return [
|
|
162
|
+
void 0 === allSides ? void 0 : getBorderEdge('border', allSides, theme),
|
|
163
|
+
0 === sides.length ? void 0 : `&{${sides.map(([side, value])=>getBorderEdge(`border-${side}`, value, theme)).join('')}}`,
|
|
164
|
+
`border-width: ${theme.border.md};`,
|
|
165
|
+
rc('border-width', props.borderWidth, theme, getBorderWidth)
|
|
166
|
+
].filter(Boolean).join('');
|
|
107
167
|
}
|
|
108
|
-
function getRadius(radius,
|
|
168
|
+
function getRadius(radius, theme) {
|
|
109
169
|
if (void 0 === radius) return;
|
|
110
170
|
if (radius.length < 3) return resolveRadius(radius, theme);
|
|
111
171
|
return radius.split(' ').map((size)=>resolveRadius(size, theme)).join(' ');
|
|
112
172
|
}
|
|
113
|
-
function getSpacing(spacing,
|
|
173
|
+
function getSpacing(spacing, theme) {
|
|
114
174
|
if (void 0 === spacing) return;
|
|
115
175
|
if (spacing.length < 3) return resolveSpacing(spacing, theme);
|
|
116
176
|
return spacing.split(' ').map((size)=>resolveSpacing(size, theme)).join(' ');
|
|
117
177
|
}
|
|
118
|
-
function getMargin(margin,
|
|
178
|
+
function getMargin(margin, theme) {
|
|
119
179
|
if (void 0 === margin) return;
|
|
120
180
|
if (margin.length < 3) return resolveMargin(margin, theme);
|
|
121
181
|
return margin.split(' ').map((size)=>resolveMargin(size, theme)).join(' ');
|
|
@@ -234,4 +294,4 @@ function ContainerQueryProvider({ elementRef, children }) {
|
|
|
234
294
|
children: children
|
|
235
295
|
});
|
|
236
296
|
}
|
|
237
|
-
export { ContainerQueryContext, ContainerQueryProvider, FLEX_JUSTIFY_CONTENT,
|
|
297
|
+
export { ContainerQueryContext, ContainerQueryProvider, FLEX_JUSTIFY_CONTENT, getBackground, getBorderEdge, getBorderStyles, getBorderWidth, getMargin, getRadius, getSpacing, rc, useActiveBreakpoint, useContainerBreakpoint, useHasContainerQuery, useResponsivePropResolver, useResponsivePropValue };
|
package/dist/layout/surface.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type * as React from 'react';
|
|
2
2
|
import { type ContainerElement, type ContainerProps } from './container.js';
|
|
3
3
|
import type { SurfaceVariant } from '../theme/index.js';
|
|
4
|
-
interface FlatSurfaceProps<T extends ContainerElement = 'div'> extends Omit<ContainerProps<T>, 'background' | '
|
|
4
|
+
interface FlatSurfaceProps<T extends ContainerElement = 'div'> extends Omit<ContainerProps<T>, 'background' | 'borderColor'> {
|
|
5
5
|
elevation?: never;
|
|
6
6
|
variant?: SurfaceVariant;
|
|
7
7
|
}
|
|
8
|
-
interface OverlaySurfaceProps<T extends ContainerElement = 'div'> extends Omit<ContainerProps<T>, 'background' | '
|
|
8
|
+
interface OverlaySurfaceProps<T extends ContainerElement = 'div'> extends Omit<ContainerProps<T>, 'background' | 'borderColor'> {
|
|
9
9
|
variant: 'overlay';
|
|
10
10
|
elevation?: 'low' | 'medium' | 'high';
|
|
11
11
|
}
|
package/dist/layout/surface.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from "@emotion/react/jsx-runtime";
|
|
2
2
|
import styled from "@emotion/styled";
|
|
3
3
|
import { Container } from "./container.js";
|
|
4
|
-
import {
|
|
4
|
+
import { getBorderStyles, getRadius, rc } from "./styles.js";
|
|
5
5
|
function isRenderFunction(props) {
|
|
6
6
|
return 'function' == typeof props.children;
|
|
7
7
|
}
|
|
@@ -11,7 +11,7 @@ const Surface = styled((props)=>{
|
|
|
11
11
|
});
|
|
12
12
|
const { variant, elevation: _, ...rest } = props;
|
|
13
13
|
if ('overlay' === variant) return /*#__PURE__*/ jsx(Container, {
|
|
14
|
-
|
|
14
|
+
borderColor: "primary",
|
|
15
15
|
radius: rest.radius ?? 'md',
|
|
16
16
|
...rest
|
|
17
17
|
});
|
|
@@ -21,7 +21,10 @@ const Surface = styled((props)=>{
|
|
|
21
21
|
});
|
|
22
22
|
})`
|
|
23
23
|
${(p)=>rc('background', p.variant, p.theme, (v)=>v ? p.theme.tokens.background[v] : void 0)};
|
|
24
|
-
${(p)=>
|
|
24
|
+
${(p)=>'overlay' === p.variant ? getBorderStyles({
|
|
25
|
+
...p,
|
|
26
|
+
borderColor: 'primary'
|
|
27
|
+
}, p.theme) : void 0};
|
|
25
28
|
${(p)=>rc('border-radius', p.radius ?? ('overlay' === p.variant ? 'md' : void 0), p.theme, getRadius)};
|
|
26
29
|
${(p)=>rc('box-shadow', p.elevation ?? ('overlay' === p.variant ? 'low' : void 0), p.theme, (v)=>v ? p.theme.shadow[v] : void 0)};
|
|
27
30
|
`;
|