@hopper-ui/styled-system 0.2.8 → 1.0.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/CHANGELOG.md +13 -0
- package/dist/StyledSystemProvider.css +34 -34
- package/dist/StyledSystemProvider.d.ts +2 -2
- package/dist/StyledSystemProvider.js +10 -10
- package/dist/{chunk-4W2Y5NP7.js → chunk-36LPB7RX.js} +5 -5
- package/dist/{chunk-AGTKHWTQ.js → chunk-3IK64CCG.js} +3 -3
- package/dist/{chunk-6QQ7EFT3.js → chunk-7WKPFXQZ.js} +2 -2
- package/dist/{chunk-T2LQYER5.js → chunk-ACHT4RXQ.js} +55 -11
- package/dist/{chunk-QM2KKTRJ.js → chunk-HPTCF3O5.js} +1 -1
- package/dist/{chunk-7DJQGTVY.js → chunk-IZYWFDT7.js} +47 -469
- package/dist/{chunk-B6X5QHOR.js → chunk-RG533UHT.js} +15 -7
- package/dist/{chunk-4YLLB6OG.js → chunk-TAIACQMV.js} +1 -1
- package/dist/{chunk-C2ZCLERY.js → chunk-XISFZQD3.js} +35 -1
- package/dist/{chunk-ZAVRK5U2.js → chunk-Y6PI5JPG.js} +1 -1
- package/dist/global-styles/BodyStyleProvider.js +2 -2
- package/dist/html-wrappers/html.css +34 -34
- package/dist/html-wrappers/html.d.ts +35 -36
- package/dist/html-wrappers/html.js +4 -4
- package/dist/html-wrappers/htmlElement.css +34 -34
- package/dist/html-wrappers/htmlElement.d.ts +4 -2
- package/dist/html-wrappers/htmlElement.js +3 -3
- package/dist/index.css +34 -34
- package/dist/index.d.ts +4 -4
- package/dist/index.js +10 -10
- package/dist/styled-system-props.d.ts +4 -6
- package/dist/styled-system-root-css-class.js +1 -1
- package/dist/tokens/TokenProvider.js +4 -4
- package/dist/tokens/generated/light-semantic-tokens.js +1 -1
- package/dist/tokens/token-mappings.d.ts +54 -11
- package/dist/tokens/token-mappings.js +1 -1
- package/dist/tokens/tokens.js +2 -2
- package/dist/useStyledSystem.css +31 -31
- package/dist/useStyledSystem.d.ts +7 -4
- package/dist/useStyledSystem.js +2 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @hopper-ui/styled-system
|
|
2
2
|
|
|
3
|
+
## 1.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- 93a1a16: - Changed the useStyledSystem hook to return an object containing the className and the style, instead of merging it with the input props.
|
|
8
|
+
- Added some sizing options while we wait for the sizing tokens
|
|
9
|
+
|
|
10
|
+
## 0.3.0
|
|
11
|
+
|
|
12
|
+
### Minor Changes
|
|
13
|
+
|
|
14
|
+
- aa5d10b: Added font fallback to font tokens
|
|
15
|
+
|
|
3
16
|
## 0.2.8
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
|
@@ -1,132 +1,132 @@
|
|
|
1
1
|
/* css-module:/home/runner/work/wl-hopper/wl-hopper/packages/styled-system/src/UseStyledSystem.module.css/#css-module-data */
|
|
2
|
-
.UseStyledSystem-module__hop-b-
|
|
2
|
+
.UseStyledSystem-module__hop-b-hover___71ep8:hover {
|
|
3
3
|
--hop-b-hover: initial;
|
|
4
4
|
border: var(--hop-b-hover) !important;
|
|
5
5
|
}
|
|
6
|
-
.UseStyledSystem-module__hop-bb-
|
|
6
|
+
.UseStyledSystem-module__hop-bb-hover___ylhBC:hover {
|
|
7
7
|
--hop-bb-hover: initial;
|
|
8
8
|
border-bottom: var(--hop-bb-hover) !important;
|
|
9
9
|
}
|
|
10
|
-
.UseStyledSystem-module__hop-bl-
|
|
10
|
+
.UseStyledSystem-module__hop-bl-hover___TO68v:hover {
|
|
11
11
|
--hop-bl-hover: initial;
|
|
12
12
|
border-left: var(--hop-bl-hover) !important;
|
|
13
13
|
}
|
|
14
|
-
.UseStyledSystem-module__hop-br-
|
|
14
|
+
.UseStyledSystem-module__hop-br-hover___BcsdD:hover {
|
|
15
15
|
--hop-br-hover: initial;
|
|
16
16
|
border-right: var(--hop-br-hover) !important;
|
|
17
17
|
}
|
|
18
|
-
.UseStyledSystem-module__hop-bt-
|
|
18
|
+
.UseStyledSystem-module__hop-bt-hover___cy3wM:hover {
|
|
19
19
|
--hop-bt-hover: initial;
|
|
20
20
|
border-top: var(--hop-bt-hover) !important;
|
|
21
21
|
}
|
|
22
|
-
.UseStyledSystem-module__hop-b-
|
|
22
|
+
.UseStyledSystem-module__hop-b-focus___tmnq6:focus-visible {
|
|
23
23
|
--hop-b-focus: initial;
|
|
24
24
|
border: var(--hop-b-focus) !important;
|
|
25
25
|
}
|
|
26
|
-
.UseStyledSystem-module__hop-bb-
|
|
26
|
+
.UseStyledSystem-module__hop-bb-focus___G-HZ8:focus-visible {
|
|
27
27
|
--hop-bb-focus: initial;
|
|
28
28
|
border-bottom: var(--hop-bb-focus) !important;
|
|
29
29
|
}
|
|
30
|
-
.UseStyledSystem-module__hop-bl-
|
|
30
|
+
.UseStyledSystem-module__hop-bl-focus___kGmWM:focus-visible {
|
|
31
31
|
--hop-bl-focus: initial;
|
|
32
32
|
border-left: var(--hop-bl-focus) !important;
|
|
33
33
|
}
|
|
34
|
-
.UseStyledSystem-module__hop-br-
|
|
34
|
+
.UseStyledSystem-module__hop-br-focus___dUPR-:focus-visible {
|
|
35
35
|
--hop-br-focus: initial;
|
|
36
36
|
border-right: var(--hop-br-focus) !important;
|
|
37
37
|
}
|
|
38
|
-
.UseStyledSystem-module__hop-bt-
|
|
38
|
+
.UseStyledSystem-module__hop-bt-focus___Hrlw3:focus-visible {
|
|
39
39
|
--hop-bt-focus: initial;
|
|
40
40
|
border-top: var(--hop-bt-focus) !important;
|
|
41
41
|
}
|
|
42
|
-
.UseStyledSystem-module__hop-b-
|
|
42
|
+
.UseStyledSystem-module__hop-b-active___dHtWO:active {
|
|
43
43
|
--hop-b-active: initial;
|
|
44
44
|
border: var(--hop-b-active) !important;
|
|
45
45
|
}
|
|
46
|
-
.UseStyledSystem-module__hop-bb-
|
|
46
|
+
.UseStyledSystem-module__hop-bb-active___Egybw:active {
|
|
47
47
|
--hop-bb-active: initial;
|
|
48
48
|
border-bottom: var(--hop-bb-active) !important;
|
|
49
49
|
}
|
|
50
|
-
.UseStyledSystem-module__hop-bl-
|
|
50
|
+
.UseStyledSystem-module__hop-bl-active___jqw-D:active {
|
|
51
51
|
--hop-bl-active: initial;
|
|
52
52
|
border-left: var(--hop-bl-active) !important;
|
|
53
53
|
}
|
|
54
|
-
.UseStyledSystem-module__hop-br-
|
|
54
|
+
.UseStyledSystem-module__hop-br-active___ysPGE:active {
|
|
55
55
|
--hop-br-active: initial;
|
|
56
56
|
border-right: var(--hop-br-active) !important;
|
|
57
57
|
}
|
|
58
|
-
.UseStyledSystem-module__hop-bt-
|
|
58
|
+
.UseStyledSystem-module__hop-bt-active___C7xuD:active {
|
|
59
59
|
--hop-bt-active: initial;
|
|
60
60
|
border-top: var(--hop-bt-active) !important;
|
|
61
61
|
}
|
|
62
|
-
.UseStyledSystem-module__hop-bg-
|
|
62
|
+
.UseStyledSystem-module__hop-bg-hover___1W2CI:hover {
|
|
63
63
|
--hop-bg-hover: initial;
|
|
64
64
|
background-color: var(--hop-bg-hover) !important;
|
|
65
65
|
}
|
|
66
|
-
.UseStyledSystem-module__hop-bg-
|
|
66
|
+
.UseStyledSystem-module__hop-bg-focus___GQNcd:focus-visible {
|
|
67
67
|
--hop-bg-focus: initial;
|
|
68
68
|
background-color: var(--hop-bg-focus) !important;
|
|
69
69
|
}
|
|
70
|
-
.UseStyledSystem-module__hop-bg-
|
|
70
|
+
.UseStyledSystem-module__hop-bg-active___Bo-0I:active {
|
|
71
71
|
--hop-bg-active: initial;
|
|
72
72
|
background-color: var(--hop-bg-active) !important;
|
|
73
73
|
}
|
|
74
|
-
.UseStyledSystem-module__hop-bs-
|
|
74
|
+
.UseStyledSystem-module__hop-bs-hover___Z1cKa:hover {
|
|
75
75
|
--hop-bs-hover: initial;
|
|
76
76
|
box-shadow: var(--hop-bs-hover) !important;
|
|
77
77
|
}
|
|
78
|
-
.UseStyledSystem-module__hop-bs-
|
|
78
|
+
.UseStyledSystem-module__hop-bs-focus___tBUac:focus-visible {
|
|
79
79
|
--hop-bs-focus: initial;
|
|
80
80
|
box-shadow: var(--hop-bs-focus) !important;
|
|
81
81
|
}
|
|
82
|
-
.UseStyledSystem-module__hop-bs-
|
|
82
|
+
.UseStyledSystem-module__hop-bs-active___mkrRd:active {
|
|
83
83
|
--hop-bs-active: initial;
|
|
84
84
|
box-shadow: var(--hop-bs-active) !important;
|
|
85
85
|
}
|
|
86
|
-
.UseStyledSystem-module__hop-c-
|
|
86
|
+
.UseStyledSystem-module__hop-c-hover___wiNSV:hover {
|
|
87
87
|
--hop-c-hover: initial;
|
|
88
88
|
color: var(--hop-c-hover) !important;
|
|
89
89
|
}
|
|
90
|
-
.UseStyledSystem-module__hop-c-
|
|
90
|
+
.UseStyledSystem-module__hop-c-focus___59TkO:focus-visible {
|
|
91
91
|
--hop-c-focus: initial;
|
|
92
92
|
color: var(--hop-c-focus) !important;
|
|
93
93
|
}
|
|
94
|
-
.UseStyledSystem-module__hop-c-
|
|
94
|
+
.UseStyledSystem-module__hop-c-active___H8-u-:active {
|
|
95
95
|
--hop-c-active: initial;
|
|
96
96
|
color: var(--hop-c-active) !important;
|
|
97
97
|
}
|
|
98
|
-
.UseStyledSystem-module__hop-cs-
|
|
98
|
+
.UseStyledSystem-module__hop-cs-hover___igsh7:hover {
|
|
99
99
|
--hop-cs-hover: initial;
|
|
100
100
|
cursor: var(--hop-cs-hover) !important;
|
|
101
101
|
}
|
|
102
|
-
.UseStyledSystem-module__hop-f-
|
|
102
|
+
.UseStyledSystem-module__hop-f-hover___1Xk9j:hover {
|
|
103
103
|
--hop-f-hover: initial;
|
|
104
104
|
fill: var(--hop-f-hover) !important;
|
|
105
105
|
}
|
|
106
|
-
.UseStyledSystem-module__hop-f-
|
|
106
|
+
.UseStyledSystem-module__hop-f-focus___Ib-hw:focus-visible {
|
|
107
107
|
--hop-f-focus: initial;
|
|
108
108
|
fill: var(--hop-f-focus) !important;
|
|
109
109
|
}
|
|
110
|
-
.UseStyledSystem-module__hop-o-
|
|
110
|
+
.UseStyledSystem-module__hop-o-hover___gzbqv:hover {
|
|
111
111
|
--hop-o-hover: initial;
|
|
112
112
|
opacity: var(--hop-o-hover) !important;
|
|
113
113
|
}
|
|
114
|
-
.UseStyledSystem-module__hop-o-
|
|
114
|
+
.UseStyledSystem-module__hop-o-focus___Pmoy-:focus-visible {
|
|
115
115
|
--hop-o-focus: initial;
|
|
116
116
|
opacity: var(--hop-o-focus) !important;
|
|
117
117
|
}
|
|
118
|
-
.UseStyledSystem-module__hop-o-
|
|
118
|
+
.UseStyledSystem-module__hop-o-active___eu716:active {
|
|
119
119
|
--hop-o-active: initial;
|
|
120
120
|
opacity: var(--hop-o-active) !important;
|
|
121
121
|
}
|
|
122
|
-
.UseStyledSystem-module__hop-ol-
|
|
122
|
+
.UseStyledSystem-module__hop-ol-focus___aURRZ:focus-visible {
|
|
123
123
|
--hop-ol-focus: initial;
|
|
124
124
|
color: var(--hop-ol-focus) !important;
|
|
125
125
|
}
|
|
126
126
|
|
|
127
127
|
/* css-module:/home/runner/work/wl-hopper/wl-hopper/packages/styled-system/src/html-wrappers/htmlElement.module.css/#css-module-data */
|
|
128
|
-
:where(.htmlElement-module__html-
|
|
129
|
-
:where(.htmlElement-module__html-
|
|
130
|
-
:where(.htmlElement-module__html-
|
|
128
|
+
:where(.htmlElement-module__html-element___f3WYL),
|
|
129
|
+
:where(.htmlElement-module__html-element___f3WYL::after),
|
|
130
|
+
:where(.htmlElement-module__html-element___f3WYL::before) {
|
|
131
131
|
box-sizing: border-box;
|
|
132
132
|
}
|
|
@@ -3,7 +3,6 @@ import { ReactNode } from 'react';
|
|
|
3
3
|
import { ColorSchemeOrSystem, ColorScheme } from './color-scheme/ColorSchemeContext.js';
|
|
4
4
|
import { DivProps } from './html-wrappers/html.js';
|
|
5
5
|
import { BreakpointProviderProps } from './responsive/BreakpointProvider.js';
|
|
6
|
-
import './html-wrappers/htmlElement.js';
|
|
7
6
|
import './styled-system-props.js';
|
|
8
7
|
import 'csstype';
|
|
9
8
|
import './responsive/useResponsiveValue.js';
|
|
@@ -11,6 +10,7 @@ import './responsive/Breakpoints.js';
|
|
|
11
10
|
import './tokens/token-mappings.js';
|
|
12
11
|
import 'react/jsx-runtime';
|
|
13
12
|
|
|
13
|
+
declare const GlobalStyledSystemProviderCssSelector = "hop-StyledSystemProvider";
|
|
14
14
|
interface StyledSystemProviderProps extends BreakpointProviderProps, DivProps {
|
|
15
15
|
/** The children of the component */
|
|
16
16
|
children: ReactNode;
|
|
@@ -41,4 +41,4 @@ interface StyledSystemProviderProps extends BreakpointProviderProps, DivProps {
|
|
|
41
41
|
*/
|
|
42
42
|
declare const _StyledSystemProvider: react.ForwardRefExoticComponent<Omit<StyledSystemProviderProps, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
43
43
|
|
|
44
|
-
export { _StyledSystemProvider as StyledSystemProvider, type StyledSystemProviderProps };
|
|
44
|
+
export { GlobalStyledSystemProviderCssSelector, _StyledSystemProvider as StyledSystemProvider, type StyledSystemProviderProps };
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
export { _StyledSystemProvider as StyledSystemProvider } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
export { GlobalStyledSystemProviderCssSelector, _StyledSystemProvider as StyledSystemProvider } from './chunk-36LPB7RX.js';
|
|
2
|
+
import './chunk-HPTCF3O5.js';
|
|
3
3
|
import './chunk-3YM73BQP.js';
|
|
4
4
|
import './chunk-B6ZBFYWJ.js';
|
|
5
|
-
import './chunk-
|
|
6
|
-
import './chunk-
|
|
5
|
+
import './chunk-XISFZQD3.js';
|
|
6
|
+
import './chunk-RG533UHT.js';
|
|
7
7
|
import './chunk-MCUHAIA4.js';
|
|
8
|
-
import './chunk-
|
|
9
|
-
import './chunk-
|
|
8
|
+
import './chunk-7WKPFXQZ.js';
|
|
9
|
+
import './chunk-TAIACQMV.js';
|
|
10
10
|
import './chunk-ZKEMKHXY.js';
|
|
11
|
-
import './chunk-
|
|
11
|
+
import './chunk-3IK64CCG.js';
|
|
12
12
|
import './chunk-RIORU7JO.js';
|
|
13
13
|
import './chunk-YPIK2HRL.js';
|
|
14
|
-
import './chunk-
|
|
15
|
-
import './chunk-
|
|
16
|
-
import './chunk-
|
|
14
|
+
import './chunk-Y6PI5JPG.js';
|
|
15
|
+
import './chunk-IZYWFDT7.js';
|
|
16
|
+
import './chunk-ACHT4RXQ.js';
|
|
17
17
|
import './chunk-PCGVOTW3.js';
|
|
18
18
|
import './chunk-SFOVKOPG.js';
|
|
19
19
|
import './chunk-VBKLISDI.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { BodyStyleProvider } from './chunk-
|
|
2
|
-
import { Div } from './chunk-
|
|
1
|
+
import { BodyStyleProvider } from './chunk-HPTCF3O5.js';
|
|
2
|
+
import { Div } from './chunk-XISFZQD3.js';
|
|
3
3
|
import { BreakpointProvider, DefaultUnsupportedMatchMediaBreakpoint } from './chunk-MCUHAIA4.js';
|
|
4
|
-
import { TokenProvider } from './chunk-
|
|
5
|
-
import { HopperRootCssClass, StyledSystemRootCssClass } from './chunk-
|
|
4
|
+
import { TokenProvider } from './chunk-7WKPFXQZ.js';
|
|
5
|
+
import { HopperRootCssClass, StyledSystemRootCssClass } from './chunk-Y6PI5JPG.js';
|
|
6
6
|
import { useColorScheme } from './chunk-KLNF34G6.js';
|
|
7
7
|
import { ColorSchemeContext } from './chunk-V7X6ANEM.js';
|
|
8
8
|
import clsx from 'clsx';
|
|
@@ -52,4 +52,4 @@ var StyledSystemProvider = (props, ref) => {
|
|
|
52
52
|
var _StyledSystemProvider = forwardRef(StyledSystemProvider);
|
|
53
53
|
_StyledSystemProvider.displayName = "StyledSystemProvider";
|
|
54
54
|
|
|
55
|
-
export { _StyledSystemProvider };
|
|
55
|
+
export { GlobalStyledSystemProviderCssSelector, _StyledSystemProvider };
|
|
@@ -139,9 +139,9 @@ var CoreTokens = {
|
|
|
139
139
|
"--hop-shadow-sm": "0 1px 6px 0 rgba(60, 60, 60, 0.10)",
|
|
140
140
|
"--hop-shadow-md": "0 4px 10px 4px rgba(60, 60, 60, 0.08)",
|
|
141
141
|
"--hop-shadow-lg": "0 10px 18px 8px rgba(60, 60, 60, 0.08)",
|
|
142
|
-
"--hop-font-family-primary": "ABC Favorit",
|
|
143
|
-
"--hop-font-family-secondary": "Inter",
|
|
144
|
-
"--hop-font-family-tertiary": "ABC Favorit Mono",
|
|
142
|
+
"--hop-font-family-primary": "'ABC Favorit', Helvetica, Arial, sans-serif",
|
|
143
|
+
"--hop-font-family-secondary": "'Inter', Helvetica, Arial, sans-serif",
|
|
144
|
+
"--hop-font-family-tertiary": "'ABC Favorit Mono', Consolas, 'SF Mono', monospace",
|
|
145
145
|
"--hop-font-size-120": "0.75rem",
|
|
146
146
|
"--hop-font-size-140": "0.875rem",
|
|
147
147
|
"--hop-font-size-160": "1rem",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Tokens } from './chunk-
|
|
1
|
+
import { Tokens } from './chunk-TAIACQMV.js';
|
|
2
2
|
import { useInsertStyleElement } from './chunk-RIORU7JO.js';
|
|
3
|
-
import { StyledSystemRootCssClass } from './chunk-
|
|
3
|
+
import { StyledSystemRootCssClass } from './chunk-Y6PI5JPG.js';
|
|
4
4
|
|
|
5
5
|
// src/tokens/TokenProvider.tsx
|
|
6
6
|
function TokenProvider() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HopperVariablePrefix, HopperColors, DataVizColors, BackgroundColors, TextColors, IconColors, Elevation, FontSize, FontWeight, LineHeight, FontFamily, Shape, CoreSpace, SemanticSimplePaddingSpace, SemanticComplexPaddingSpace, SemanticSimpleMarginSpace, SemanticComplexMarginSpace } from './chunk-PCGVOTW3.js';
|
|
2
2
|
import { parseResponsiveValue } from './chunk-SFOVKOPG.js';
|
|
3
|
-
import { isNil } from './chunk-U5R6ZXH3.js';
|
|
3
|
+
import { isNil, isObject } from './chunk-U5R6ZXH3.js';
|
|
4
4
|
|
|
5
5
|
// src/tokens/token-mappings.ts
|
|
6
6
|
var ColorExpressionTypes = [
|
|
@@ -51,7 +51,9 @@ var FontWeightMapping = createMapping(FontWeight);
|
|
|
51
51
|
var LineHeightMapping = createMapping(LineHeight);
|
|
52
52
|
var FontFamilyMapping = createMapping(FontFamily);
|
|
53
53
|
var BorderRadiusMapping = createMapping(Shape);
|
|
54
|
-
var SpaceMapping =
|
|
54
|
+
var SpaceMapping = {
|
|
55
|
+
...createMapping(CoreSpace)
|
|
56
|
+
};
|
|
55
57
|
var SimplePaddingMapping = {
|
|
56
58
|
...createMapping(SemanticSimplePaddingSpace),
|
|
57
59
|
...SpaceMapping
|
|
@@ -69,22 +71,61 @@ var ComplexMarginMapping = {
|
|
|
69
71
|
...createMapping(SemanticComplexMarginSpace)
|
|
70
72
|
};
|
|
71
73
|
var SizingMapping = {
|
|
72
|
-
...SpaceMapping
|
|
73
|
-
//
|
|
74
|
+
...SpaceMapping,
|
|
75
|
+
// tailwind like values for scaling since we don't have scale tokens
|
|
76
|
+
"100vw": "100vw",
|
|
77
|
+
"100svw": "100svw",
|
|
78
|
+
"100lvw": "100lvw",
|
|
79
|
+
"100dvw": "100dvw",
|
|
80
|
+
"100vh": "100vh",
|
|
81
|
+
"100svh": "100svh",
|
|
82
|
+
"100lvh": "100lvh",
|
|
83
|
+
"100dvh": "100dvh",
|
|
84
|
+
"1/2": "50%",
|
|
85
|
+
"1/3": "33.333333%",
|
|
86
|
+
"2/3": "66.666667%",
|
|
87
|
+
"1/4": "25%",
|
|
88
|
+
"2/4": "50%",
|
|
89
|
+
"3/4": "75%",
|
|
90
|
+
"1/5": "20%",
|
|
91
|
+
"2/5": "40%",
|
|
92
|
+
"3/5": "60%",
|
|
93
|
+
"4/5": "80%",
|
|
94
|
+
"1/6": "16.666667%",
|
|
95
|
+
"2/6": "33.333333%",
|
|
96
|
+
"3/6": "50%",
|
|
97
|
+
"4/6": "66.666667%",
|
|
98
|
+
"5/6": "83.333333%"
|
|
74
99
|
};
|
|
75
100
|
function parseResponsiveSystemValue(value, systemValues, matchedBreakpoints) {
|
|
76
101
|
if (isNil(value)) {
|
|
77
102
|
return value;
|
|
78
103
|
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
104
|
+
if (!isObject(value)) {
|
|
105
|
+
if (Array.isArray(value)) {
|
|
106
|
+
const systemValueArray = value.map((x) => getSystemValue(x, systemValues));
|
|
107
|
+
if (!isNil(systemValueArray) && systemValueArray.every((x) => !isNil(x))) {
|
|
108
|
+
return systemValueArray;
|
|
109
|
+
}
|
|
110
|
+
} else {
|
|
111
|
+
const systemValue = getSystemValue(value, systemValues);
|
|
112
|
+
if (!isNil(systemValue)) {
|
|
113
|
+
return systemValue;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
82
116
|
}
|
|
83
117
|
const underlyingValue = parseResponsiveValue(value, matchedBreakpoints);
|
|
84
118
|
if (!isNil(underlyingValue)) {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
119
|
+
if (Array.isArray(underlyingValue)) {
|
|
120
|
+
const underlyingSystemValue = underlyingValue.map((x) => getSystemValue(x, systemValues));
|
|
121
|
+
if (!isNil(underlyingSystemValue) && underlyingSystemValue.every((x) => !isNil(x))) {
|
|
122
|
+
return underlyingSystemValue;
|
|
123
|
+
}
|
|
124
|
+
} else {
|
|
125
|
+
const underlyingSystemValue = getSystemValue(underlyingValue, systemValues);
|
|
126
|
+
if (!isNil(underlyingSystemValue)) {
|
|
127
|
+
return underlyingSystemValue;
|
|
128
|
+
}
|
|
88
129
|
}
|
|
89
130
|
}
|
|
90
131
|
return underlyingValue;
|
|
@@ -92,5 +133,8 @@ function parseResponsiveSystemValue(value, systemValues, matchedBreakpoints) {
|
|
|
92
133
|
function getSystemValue(value, systemValues) {
|
|
93
134
|
return systemValues[value];
|
|
94
135
|
}
|
|
136
|
+
function getSizingValue(value) {
|
|
137
|
+
return SizingMapping[value] || value;
|
|
138
|
+
}
|
|
95
139
|
|
|
96
|
-
export { BackgroundColorMapping, BorderMapping, BorderRadiusMapping, BoxShadowMapping, ColorExpressionTypes, ColorMapping, ComplexMarginMapping, ComplexPaddingMapping, DataVizColorMapping, DefaultBorderWidthAndStyle, FontFamilyMapping, FontSizeMapping, FontWeightMapping, IconColorMapping, LineHeightMapping, SimpleMarginMapping, SimplePaddingMapping, SizingMapping, SpaceMapping, TextColorMapping, getSystemValue, parseResponsiveSystemValue };
|
|
140
|
+
export { BackgroundColorMapping, BorderMapping, BorderRadiusMapping, BoxShadowMapping, ColorExpressionTypes, ColorMapping, ComplexMarginMapping, ComplexPaddingMapping, DataVizColorMapping, DefaultBorderWidthAndStyle, FontFamilyMapping, FontSizeMapping, FontWeightMapping, IconColorMapping, LineHeightMapping, SimpleMarginMapping, SimplePaddingMapping, SizingMapping, SpaceMapping, TextColorMapping, getSizingValue, getSystemValue, parseResponsiveSystemValue };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useIsomorphicLayoutEffect } from './chunk-3YM73BQP.js';
|
|
2
2
|
import { ThemeComputedStyle } from './chunk-B6ZBFYWJ.js';
|
|
3
3
|
import { useInsertStyleElement } from './chunk-RIORU7JO.js';
|
|
4
|
-
import { StyledSystemRootCssClass } from './chunk-
|
|
4
|
+
import { StyledSystemRootCssClass } from './chunk-Y6PI5JPG.js';
|
|
5
5
|
import { isNil } from './chunk-U5R6ZXH3.js';
|
|
6
6
|
import { useColorSchemeContext } from './chunk-V7X6ANEM.js';
|
|
7
7
|
import { useRef, useState } from 'react';
|