@hopper-ui/styled-system 0.2.0 → 0.2.2
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 +12 -0
- package/dist/StyledSystemProvider.css +132 -1
- package/dist/StyledSystemProvider.d.ts +42 -4
- package/dist/StyledSystemProvider.js +25 -26
- package/dist/chunk-2ITAI3PJ.js +270 -0
- package/dist/chunk-35LDZFKX.js +29 -0
- package/dist/chunk-3YM73BQP.js +6 -0
- package/dist/chunk-7HCELIKZ.js +41 -0
- package/dist/chunk-FYKLSVLR.js +39 -0
- package/dist/chunk-GYREQTEK.js +30 -0
- package/dist/chunk-I37Y2R7V.js +4 -0
- package/dist/chunk-IK6W4ZXH.js +11 -0
- package/dist/chunk-IP7TYBR3.js +19 -0
- package/dist/chunk-JBWKRDVA.js +27 -0
- package/dist/chunk-JQBON2KA.js +23 -0
- package/dist/chunk-KUUJ37DW.js +96 -0
- package/dist/chunk-LU33LZMJ.js +55 -0
- package/dist/chunk-OHW5NUAW.js +59 -0
- package/dist/chunk-Q3NLRNZN.js +881 -0
- package/dist/chunk-RIR7BXVF.js +711 -0
- package/dist/chunk-STEDL5VQ.js +25 -0
- package/dist/chunk-U3SI5QXV.js +911 -0
- package/dist/chunk-U5R6ZXH3.js +46 -0
- package/dist/chunk-V7X6ANEM.js +14 -0
- package/dist/chunk-X5OXC6DN.js +9 -0
- package/dist/chunk-XUHDFZZL.js +10 -0
- package/dist/chunk-YPIK2HRL.js +6 -0
- package/dist/chunk-ZO3DYLQJ.js +32 -0
- package/dist/chunk-ZQUJDDQL.js +84 -0
- package/dist/chunk-ZUVKM5DV.js +13 -0
- package/dist/color-scheme/ColorSchemeContext.d.ts +12 -0
- package/dist/color-scheme/ColorSchemeContext.js +1 -0
- package/dist/color-scheme/useColorScheme.d.ts +6 -0
- package/dist/color-scheme/useColorScheme.js +2 -0
- package/dist/color-scheme/useColorSchemeValue.d.ts +3 -0
- package/dist/color-scheme/useColorSchemeValue.js +2 -0
- package/dist/global-styles/BodyStyleProvider.d.ts +5 -0
- package/dist/global-styles/BodyStyleProvider.js +8 -0
- package/dist/html-wrappers/html.css +132 -0
- package/dist/{StyledSystemProvider-173b78af.d.ts → html-wrappers/html.d.ts} +8 -53
- package/dist/html-wrappers/html.js +10 -0
- package/dist/html-wrappers/htmlElement.css +132 -0
- package/dist/html-wrappers/htmlElement.d.ts +12 -0
- package/dist/html-wrappers/htmlElement.js +9 -0
- package/dist/index.css +132 -1
- package/dist/index.d.ts +23 -2385
- package/dist/index.js +26 -26
- package/dist/responsive/BreakpointContext.d.ts +10 -0
- package/dist/responsive/BreakpointContext.js +2 -0
- package/dist/responsive/BreakpointProvider.d.ts +12 -0
- package/dist/responsive/BreakpointProvider.js +5 -0
- package/dist/responsive/Breakpoints.d.ts +10 -0
- package/dist/responsive/Breakpoints.js +1 -0
- package/dist/responsive/useResponsiveValue.d.ts +11 -0
- package/dist/responsive/useResponsiveValue.js +4 -0
- package/dist/styled-system-props.d.ts +1246 -3
- package/dist/styled-system-props.js +1 -3
- package/dist/styled-system-root-css-class.js +1 -3
- package/dist/tokens/TokenProvider.d.ts +20 -0
- package/dist/tokens/TokenProvider.js +8 -0
- package/dist/tokens/generated/dark-semantic-tokens.d.ts +272 -0
- package/dist/tokens/generated/dark-semantic-tokens.js +1 -0
- package/dist/tokens/generated/light-semantic-tokens.d.ts +883 -0
- package/dist/tokens/generated/light-semantic-tokens.js +1 -0
- package/dist/tokens/generated/styled-system-to-token-mappings.d.ts +913 -0
- package/dist/tokens/generated/styled-system-to-token-mappings.js +1 -0
- package/dist/{styled-system-props-1c231c50.d.ts → tokens/token-mappings.d.ts} +2 -1258
- package/dist/tokens/token-mappings.js +6 -0
- package/dist/tokens/tokens.d.ts +1154 -0
- package/dist/tokens/tokens.js +3 -0
- package/dist/useStyledSystem.css +125 -1
- package/dist/useStyledSystem.d.ts +4 -1
- package/dist/useStyledSystem.js +8 -5
- package/dist/utils/assertion.d.ts +15 -0
- package/dist/utils/assertion.js +1 -0
- package/dist/utils/useInsertStyleElement.d.ts +6 -0
- package/dist/utils/useInsertStyleElement.js +3 -0
- package/dist/utils/useIsomorphicInsertionEffect.d.ts +16 -0
- package/dist/utils/useIsomorphicInsertionEffect.js +1 -0
- package/dist/utils/useIsomorphicLayoutEffect.d.ts +16 -0
- package/dist/utils/useIsomorphicLayoutEffect.js +1 -0
- package/dist/utils/useMediaQuery.d.ts +4 -0
- package/dist/utils/useMediaQuery.js +1 -0
- package/dist/utils/useThemeComputedStyle.d.ts +14 -0
- package/dist/utils/useThemeComputedStyle.js +2 -0
- package/package.json +4 -4
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
// src/tokens/generated/dark-semantic-tokens.ts
|
|
2
|
+
var DarkSemanticTokens = {
|
|
3
|
+
"--hop-upsell-border-active": "var(--hop-sunken-treasure-500)",
|
|
4
|
+
"--hop-upsell-text-active": "var(--hop-sunken-treasure-300)",
|
|
5
|
+
"--hop-upsell-icon-weakest": "var(--hop-sunken-treasure-100)",
|
|
6
|
+
"--hop-upsell-icon-weak": "var(--hop-sunken-treasure-300)",
|
|
7
|
+
"--hop-upsell-border": "var(--hop-sunken-treasure-200)",
|
|
8
|
+
"--hop-upsell-surface-hover": "var(--hop-sunken-treasure-100)",
|
|
9
|
+
"--hop-upsell-border-disabled": "var(--hop-sunken-treasure-700)",
|
|
10
|
+
"--hop-upsell-icon-active": "var(--hop-sunken-treasure-300)",
|
|
11
|
+
"--hop-upsell-surface-weak": "var(--hop-sunken-treasure-800)",
|
|
12
|
+
"--hop-upsell-surface-disabled": "var(--hop-sunken-treasure-700)",
|
|
13
|
+
"--hop-upsell-text": "var(--hop-sunken-treasure-900)",
|
|
14
|
+
"--hop-upsell-icon": "var(--hop-sunken-treasure-900)",
|
|
15
|
+
"--hop-upsell-text-hover": "var(--hop-sunken-treasure-700)",
|
|
16
|
+
"--hop-upsell-text-disabled": "var(--hop-sunken-treasure-300)",
|
|
17
|
+
"--hop-upsell-surface-active": "var(--hop-sunken-treasure-800)",
|
|
18
|
+
"--hop-upsell-surface": "var(--hop-sunken-treasure-50)",
|
|
19
|
+
"--hop-danger-border-active": "var(--hop-amanita-400)",
|
|
20
|
+
"--hop-danger-icon-active": "var(--hop-amanita-300)",
|
|
21
|
+
"--hop-danger-text-active": "var(--hop-amanita-300)",
|
|
22
|
+
"--hop-danger-surface": "var(--hop-amanita-200)",
|
|
23
|
+
"--hop-danger-text-hover": "var(--hop-amanita-200)",
|
|
24
|
+
"--hop-danger-surface-disabled": "var(--hop-amanita-600)",
|
|
25
|
+
"--hop-danger-surface-hover": "var(--hop-amanita-200)",
|
|
26
|
+
"--hop-danger-surface-strong": "var(--hop-amanita-300)",
|
|
27
|
+
"--hop-danger-surface-strong-hover": "var(--hop-amanita-200)",
|
|
28
|
+
"--hop-danger-surface-weak": "var(--hop-amanita-900)",
|
|
29
|
+
"--hop-danger-border-strong": "var(--hop-amanita-300)",
|
|
30
|
+
"--hop-danger-icon": "var(--hop-amanita-900)",
|
|
31
|
+
"--hop-danger-icon-weak": "var(--hop-amanita-100)",
|
|
32
|
+
"--hop-danger-text": "var(--hop-amanita-900)",
|
|
33
|
+
"--hop-danger-surface-active": "var(--hop-amanita-800)",
|
|
34
|
+
"--hop-danger-text-weak": "var(--hop-amanita-100)",
|
|
35
|
+
"--hop-danger-text-strong": "var(--hop-samoyed)",
|
|
36
|
+
"--hop-danger-text-strong-hover": "var(--hop-samoyed)",
|
|
37
|
+
"--hop-danger-icon-strong": "var(--hop-samoyed)",
|
|
38
|
+
"--hop-danger-icon-hover": "var(--hop-amanita-200)",
|
|
39
|
+
"--hop-danger-text-disabled": "var(--hop-amanita-600)",
|
|
40
|
+
"--hop-danger-icon-disabled": "var(--hop-amanita-600)",
|
|
41
|
+
"--hop-danger-border": "var(--hop-amanita-500)",
|
|
42
|
+
"--hop-primary-icon-active": "var(--hop-sapphire-200)",
|
|
43
|
+
"--hop-primary-border-active": "var(--hop-sapphire-300)",
|
|
44
|
+
"--hop-primary-text-active": "var(--hop-sapphire-200)",
|
|
45
|
+
"--hop-primary-icon-strong": "var(--hop-samoyed)",
|
|
46
|
+
"--hop-primary-icon-strong-hover": "var(--hop-sapphire-300)",
|
|
47
|
+
"--hop-primary-icon": "var(--hop-sapphire-200)",
|
|
48
|
+
"--hop-primary-border-focus": "var(--hop-sapphire-200)",
|
|
49
|
+
"--hop-primary-border": "var(--hop-sapphire-300)",
|
|
50
|
+
"--hop-primary-icon-hover": "var(--hop-sapphire-300)",
|
|
51
|
+
"--hop-primary-icon-disabled": "var(--hop-sapphire-700)",
|
|
52
|
+
"--hop-primary-surface-disabled": "var(--hop-sapphire-700)",
|
|
53
|
+
"--hop-primary-surface-focus": "var(--hop-sapphire-900)",
|
|
54
|
+
"--hop-primary-text-disabled": "var(--hop-sapphire-700)",
|
|
55
|
+
"--hop-primary-surface": "var(--hop-sapphire-200)",
|
|
56
|
+
"--hop-primary-surface-weak": "var(--hop-sapphire-800)",
|
|
57
|
+
"--hop-primary-surface-strong": "var(--hop-sapphire-400)",
|
|
58
|
+
"--hop-primary-surface-strong-hover": "var(--hop-sapphire-200)",
|
|
59
|
+
"--hop-primary-surface-strong-active": "var(--hop-sapphire-800)",
|
|
60
|
+
"--hop-primary-text": "var(--hop-sapphire-200)",
|
|
61
|
+
"--hop-primary-surface-hover": "var(--hop-sapphire-200)",
|
|
62
|
+
"--hop-primary-text-strong": "var(--hop-samoyed)",
|
|
63
|
+
"--hop-primary-text-strong-hover": "var(--hop-sapphire-300)",
|
|
64
|
+
"--hop-primary-text-hover": "var(--hop-sapphire-300)",
|
|
65
|
+
"--hop-primary-surface-active": "var(--hop-sapphire-800)",
|
|
66
|
+
"--hop-decorative-option9-border": "var(--hop-rock-400)",
|
|
67
|
+
"--hop-decorative-option9-icon": "var(--hop-samoyed)",
|
|
68
|
+
"--hop-decorative-option9-surface-weakest": "var(--hop-rock-200)",
|
|
69
|
+
"--hop-decorative-option9-surface-weak": "var(--hop-rock-300)",
|
|
70
|
+
"--hop-decorative-option9-surface-weak-hover": "var(--hop-rock-400)",
|
|
71
|
+
"--hop-decorative-option9-surface-strong": "var(--hop-rock-800)",
|
|
72
|
+
"--hop-decorative-option9-surface-hover": "var(--hop-rock-500)",
|
|
73
|
+
"--hop-decorative-option9-surface": "var(--hop-rock-400)",
|
|
74
|
+
"--hop-decorative-option9-text": "var(--hop-samoyed)",
|
|
75
|
+
"--hop-decorative-option9-text-weak": "var(--hop-rock-300)",
|
|
76
|
+
"--hop-decorative-option8-border": "var(--hop-amanita-400)",
|
|
77
|
+
"--hop-decorative-option8-icon": "var(--hop-amanita-900)",
|
|
78
|
+
"--hop-decorative-option8-surface-weakest": "var(--hop-amanita-25)",
|
|
79
|
+
"--hop-decorative-option8-surface-weak": "var(--hop-amanita-50)",
|
|
80
|
+
"--hop-decorative-option8-surface-weak-hover": "var(--hop-amanita-75)",
|
|
81
|
+
"--hop-decorative-option8-surface-strong": "var(--hop-amanita-100)",
|
|
82
|
+
"--hop-decorative-option8-surface-hover": "var(--hop-amanita-200)",
|
|
83
|
+
"--hop-decorative-option8-text-weak": "var(--hop-amanita-300)",
|
|
84
|
+
"--hop-decorative-option8-surface": "var(--hop-amanita-75)",
|
|
85
|
+
"--hop-decorative-option8-text": "var(--hop-amanita-900)",
|
|
86
|
+
"--hop-decorative-option7-border": "var(--hop-toad-400)",
|
|
87
|
+
"--hop-decorative-option7-icon": "var(--hop-toad-900)",
|
|
88
|
+
"--hop-decorative-option7-surface-weakest": "var(--hop-toad-25)",
|
|
89
|
+
"--hop-decorative-option7-surface-weak": "var(--hop-toad-50)",
|
|
90
|
+
"--hop-decorative-option7-surface-weak-hover": "var(--hop-toad-75)",
|
|
91
|
+
"--hop-decorative-option7-surface-strong": "var(--hop-toad-100)",
|
|
92
|
+
"--hop-decorative-option7-surface-hover": "var(--hop-toad-100)",
|
|
93
|
+
"--hop-decorative-option7-surface": "var(--hop-toad-50)",
|
|
94
|
+
"--hop-decorative-option7-text-weak": "var(--hop-toad-500)",
|
|
95
|
+
"--hop-decorative-option7-text": "var(--hop-toad-900)",
|
|
96
|
+
"--hop-decorative-option5-text-weak": "var(--hop-coastal-300)",
|
|
97
|
+
"--hop-decorative-option5-text": "var(--hop-coastal-900)",
|
|
98
|
+
"--hop-decorative-option5-surface-weakest": "var(--hop-coastal-25)",
|
|
99
|
+
"--hop-decorative-option5-surface-weak": "var(--hop-coastal-50)",
|
|
100
|
+
"--hop-decorative-option5-surface-weak-hover": "var(--hop-coastal-75)",
|
|
101
|
+
"--hop-decorative-option5-surface-strong": "var(--hop-coastal-100)",
|
|
102
|
+
"--hop-decorative-option5-surface-hover": "var(--hop-coastal-100)",
|
|
103
|
+
"--hop-decorative-option5-surface": "var(--hop-coastal-75)",
|
|
104
|
+
"--hop-decorative-option5-border": "var(--hop-coastal-400)",
|
|
105
|
+
"--hop-decorative-option5-icon": "var(--hop-coastal-900)",
|
|
106
|
+
"--hop-decorative-option6-surface-weakest": "var(--hop-sunken-treasure-25)",
|
|
107
|
+
"--hop-decorative-option6-surface-weak": "var(--hop-sunken-treasure-50)",
|
|
108
|
+
"--hop-decorative-option6-surface-weak-hover": "var(--hop-sunken-treasure-75)",
|
|
109
|
+
"--hop-decorative-option6-surface-strong": "var(--hop-sunken-treasure-100)",
|
|
110
|
+
"--hop-decorative-option6-surface-hover": "var(--hop-sunken-treasure-100)",
|
|
111
|
+
"--hop-decorative-option6-surface": "var(--hop-sunken-treasure-75)",
|
|
112
|
+
"--hop-decorative-option6-border": "var(--hop-sunken-treasure-400)",
|
|
113
|
+
"--hop-decorative-option6-icon": "var(--hop-sunken-treasure-900)",
|
|
114
|
+
"--hop-decorative-option6-text": "var(--hop-sunken-treasure-900)",
|
|
115
|
+
"--hop-decorative-option6-text-weak": "var(--hop-sunken-treasure-200)",
|
|
116
|
+
"--hop-decorative-option4-surface-weakest": "var(--hop-moss-25)",
|
|
117
|
+
"--hop-decorative-option4-surface-weak": "var(--hop-moss-50)",
|
|
118
|
+
"--hop-decorative-option4-surface-weak-hover": "var(--hop-moss-75)",
|
|
119
|
+
"--hop-decorative-option4-surface-strong": "var(--hop-moss-100)",
|
|
120
|
+
"--hop-decorative-option4-surface-hover": "var(--hop-moss-100)",
|
|
121
|
+
"--hop-decorative-option4-surface": "var(--hop-moss-75)",
|
|
122
|
+
"--hop-decorative-option4-border": "var(--hop-moss-400)",
|
|
123
|
+
"--hop-decorative-option4-icon": "var(--hop-moss-900)",
|
|
124
|
+
"--hop-decorative-option4-text-weak": "var(--hop-moss-400)",
|
|
125
|
+
"--hop-decorative-option4-text": "var(--hop-moss-900)",
|
|
126
|
+
"--hop-decorative-option3-surface-strong": "var(--hop-koi-200)",
|
|
127
|
+
"--hop-decorative-option3-surface-weakest": "var(--hop-koi-25)",
|
|
128
|
+
"--hop-decorative-option3-surface-weak": "var(--hop-koi-50)",
|
|
129
|
+
"--hop-decorative-option3-surface-weak-hover": "var(--hop-koi-75)",
|
|
130
|
+
"--hop-decorative-option3-surface-hover": "var(--hop-koi-200)",
|
|
131
|
+
"--hop-decorative-option3-surface": "var(--hop-koi-100)",
|
|
132
|
+
"--hop-decorative-option3-border": "var(--hop-koi-400)",
|
|
133
|
+
"--hop-decorative-option3-icon": "var(--hop-koi-900)",
|
|
134
|
+
"--hop-decorative-option3-text": "var(--hop-koi-900)",
|
|
135
|
+
"--hop-decorative-option3-text-weak": "var(--hop-koi-300)",
|
|
136
|
+
"--hop-decorative-option2-surface-weakest": "var(--hop-quetzal-25)",
|
|
137
|
+
"--hop-decorative-option2-surface-weak": "var(--hop-quetzal-50)",
|
|
138
|
+
"--hop-decorative-option2-surface-weak-hover": "var(--hop-quetzal-75)",
|
|
139
|
+
"--hop-decorative-option2-surface-strong": "var(--hop-quetzal-100)",
|
|
140
|
+
"--hop-decorative-option2-surface-hover": "var(--hop-quetzal-100)",
|
|
141
|
+
"--hop-decorative-option2-surface": "var(--hop-quetzal-75)",
|
|
142
|
+
"--hop-decorative-option2-text": "var(--hop-quetzal-900)",
|
|
143
|
+
"--hop-decorative-option2-text-weak": "var(--hop-quetzal-300)",
|
|
144
|
+
"--hop-decorative-option2-border": "var(--hop-quetzal-400)",
|
|
145
|
+
"--hop-decorative-option2-icon": "var(--hop-quetzal-900)",
|
|
146
|
+
"--hop-decorative-option1-surface-strong": "var(--hop-sapphire-200)",
|
|
147
|
+
"--hop-decorative-option1-surface-weakest": "var(--hop-sapphire-25)",
|
|
148
|
+
"--hop-decorative-option1-surface-weak": "var(--hop-sapphire-50)",
|
|
149
|
+
"--hop-decorative-option1-surface-weak-hover": "var(--hop-sapphire-75)",
|
|
150
|
+
"--hop-decorative-option1-surface-hover": "var(--hop-sapphire-200)",
|
|
151
|
+
"--hop-decorative-option1-surface": "var(--hop-sapphire-100)",
|
|
152
|
+
"--hop-decorative-option1-text-weak": "var(--hop-sapphire-300)",
|
|
153
|
+
"--hop-decorative-option1-border": "var(--hop-sapphire-400)",
|
|
154
|
+
"--hop-decorative-option1-icon": "var(--hop-sapphire-900)",
|
|
155
|
+
"--hop-decorative-option1-text": "var(--hop-sapphire-900)",
|
|
156
|
+
"--hop-neutral-text-hover": "var(--hop-rock-50)",
|
|
157
|
+
"--hop-neutral-surface-weakest-hover": "var(--hop-rock-800)",
|
|
158
|
+
"--hop-neutral-text-weak": "var(--hop-rock-200)",
|
|
159
|
+
"--hop-neutral-surface-disabled": "var(--hop-rock-700)",
|
|
160
|
+
"--hop-neutral-surface-active": "var(--hop-toad-25)",
|
|
161
|
+
"--hop-neutral-surface-weak": "var(--hop-rock-800)",
|
|
162
|
+
"--hop-neutral-surface": "var(--hop-abyss)",
|
|
163
|
+
"--hop-neutral-text-disabled": "var(--hop-rock-500)",
|
|
164
|
+
"--hop-neutral-text-active": "var(--hop-rock-900)",
|
|
165
|
+
"--hop-neutral-text-strong": "var(--hop-rock-900)",
|
|
166
|
+
"--hop-neutral-text": "var(--hop-rock-25)",
|
|
167
|
+
"--hop-neutral-text-weakest": "var(--hop-rock-400)",
|
|
168
|
+
"--hop-neutral-border-disabled": "var(--hop-rock-800)",
|
|
169
|
+
"--hop-neutral-border-strong-hover": "var(--hop-samoyed)",
|
|
170
|
+
"--hop-neutral-border-strong": "var(--hop-samoyed)",
|
|
171
|
+
"--hop-neutral-surface-strong": "var(--hop-samoyed)",
|
|
172
|
+
"--hop-neutral-surface-hover": "var(--hop-rock-800)",
|
|
173
|
+
"--hop-neutral-icon-disabled": "var(--hop-rock-500)",
|
|
174
|
+
"--hop-neutral-icon": "var(--hop-rock-25)",
|
|
175
|
+
"--hop-neutral-icon-weak": "var(--hop-rock-200)",
|
|
176
|
+
"--hop-neutral-border": "var(--hop-rock-500)",
|
|
177
|
+
"--hop-neutral-border-weak": "var(--hop-rock-800)",
|
|
178
|
+
"--hop-neutral-icon-weakest": "var(--hop-rock-400)",
|
|
179
|
+
"--hop-neutral-icon-strong": "var(--hop-rock-900)",
|
|
180
|
+
"--hop-neutral-icon-hover": "var(--hop-rock-50)",
|
|
181
|
+
"--hop-neutral-icon-active": "var(--hop-rock-900)",
|
|
182
|
+
"--hop-neutral-border-hover": "var(--hop-rock-300)",
|
|
183
|
+
"--hop-neutral-border-active": "var(--hop-toad-25)",
|
|
184
|
+
"--hop-neutral-surface-weak-hover": "var(--hop-rock-700)",
|
|
185
|
+
"--hop-neutral-border-weakest": "var(--hop-rock-800)",
|
|
186
|
+
"--hop-neutral-surface-weakest": "var(--hop-rock-900)",
|
|
187
|
+
"--hop-warning-icon-weakest": "var(--hop-koi-200)",
|
|
188
|
+
"--hop-warning-icon-weak": "var(--hop-koi-75)",
|
|
189
|
+
"--hop-warning-text-weak": "var(--hop-koi-75)",
|
|
190
|
+
"--hop-warning-surface": "var(--hop-koi-75)",
|
|
191
|
+
"--hop-warning-surface-strong": "var(--hop-koi-300)",
|
|
192
|
+
"--hop-warning-surface-weak": "var(--hop-koi-800)",
|
|
193
|
+
"--hop-warning-border": "var(--hop-koi-500)",
|
|
194
|
+
"--hop-warning-icon": "var(--hop-koi-900)",
|
|
195
|
+
"--hop-warning-text": "var(--hop-koi-900)",
|
|
196
|
+
"--hop-success-border": "var(--hop-moss-500)",
|
|
197
|
+
"--hop-success-icon-weak": "var(--hop-moss-75)",
|
|
198
|
+
"--hop-success-icon-weakest": "var(--hop-moss-200)",
|
|
199
|
+
"--hop-success-text-weak": "var(--hop-moss-75)",
|
|
200
|
+
"--hop-success-surface": "var(--hop-moss-75)",
|
|
201
|
+
"--hop-success-surface-strong": "var(--hop-moss-300)",
|
|
202
|
+
"--hop-success-text-hover": "var(--hop-moss-700)",
|
|
203
|
+
"--hop-success-text": "var(--hop-moss-900)",
|
|
204
|
+
"--hop-success-icon": "var(--hop-moss-900)",
|
|
205
|
+
"--hop-success-surface-weak": "var(--hop-moss-800)",
|
|
206
|
+
"--hop-information-icon-weakest": "var(--hop-coastal-200)",
|
|
207
|
+
"--hop-information-surface-strong": "var(--hop-coastal-300)",
|
|
208
|
+
"--hop-information-icon-weak": "var(--hop-coastal-300)",
|
|
209
|
+
"--hop-information-text": "var(--hop-coastal-900)",
|
|
210
|
+
"--hop-information-surface": "var(--hop-coastal-75)",
|
|
211
|
+
"--hop-information-surface-weak": "var(--hop-coastal-800)",
|
|
212
|
+
"--hop-information-text-weak": "var(--hop-coastal-75)",
|
|
213
|
+
"--hop-information-icon": "var(--hop-coastal-900)",
|
|
214
|
+
"--hop-information-border": "var(--hop-coastal-400)",
|
|
215
|
+
"--hop-status-neutral-surface-strong": "var(--hop-rock-100)",
|
|
216
|
+
"--hop-status-neutral-text": "var(--hop-rock-25)",
|
|
217
|
+
"--hop-status-neutral-icon": "var(--hop-rock-25)",
|
|
218
|
+
"--hop-status-neutral-surface": "var(--hop-abyss)",
|
|
219
|
+
"--hop-status-progress-surface-strong": "var(--hop-sapphire-200)",
|
|
220
|
+
"--hop-status-progress-icon": "var(--hop-sapphire-900)",
|
|
221
|
+
"--hop-status-progress-surface": "var(--hop-sapphire-100)",
|
|
222
|
+
"--hop-status-progress-text": "var(--hop-sapphire-900)",
|
|
223
|
+
"--hop-status-option6-surface-strong": "var(--hop-sunken-treasure-100)",
|
|
224
|
+
"--hop-status-option6-icon": "var(--hop-sunken-treasure-900)",
|
|
225
|
+
"--hop-status-option6-surface": "var(--hop-sunken-treasure-75)",
|
|
226
|
+
"--hop-status-option6-text": "var(--hop-sunken-treasure-900)",
|
|
227
|
+
"--hop-status-option5-surface-strong": "var(--hop-toad-100)",
|
|
228
|
+
"--hop-status-option5-icon": "var(--hop-toad-900)",
|
|
229
|
+
"--hop-status-option5-surface": "var(--hop-toad-200)",
|
|
230
|
+
"--hop-status-option5-text": "var(--hop-toad-900)",
|
|
231
|
+
"--hop-status-option1-surface-strong": "var(--hop-coastal-100)",
|
|
232
|
+
"--hop-status-option1-icon": "var(--hop-coastal-900)",
|
|
233
|
+
"--hop-status-option1-surface": "var(--hop-coastal-200)",
|
|
234
|
+
"--hop-status-option1-text": "var(--hop-coastal-900)",
|
|
235
|
+
"--hop-status-option2-surface-strong": "var(--hop-orchid-bloom-100)",
|
|
236
|
+
"--hop-status-option2-text": "var(--hop-orchid-bloom-900)",
|
|
237
|
+
"--hop-status-option2-surface": "var(--hop-orchid-bloom-200)",
|
|
238
|
+
"--hop-status-option2-icon": "var(--hop-orchid-bloom-900)",
|
|
239
|
+
"--hop-status-option3-surface-strong": "var(--hop-quetzal-100)",
|
|
240
|
+
"--hop-status-option3-icon": "var(--hop-quetzal-900)",
|
|
241
|
+
"--hop-status-option3-surface": "var(--hop-quetzal-200)",
|
|
242
|
+
"--hop-status-option3-text": "var(--hop-quetzal-900)",
|
|
243
|
+
"--hop-status-option4-surface-strong": "var(--hop-fog-100)",
|
|
244
|
+
"--hop-status-option4-icon": "var(--hop-fog-900)",
|
|
245
|
+
"--hop-status-option4-surface": "var(--hop-fog-200)",
|
|
246
|
+
"--hop-status-option4-text": "var(--hop-fog-900)",
|
|
247
|
+
"--hop-status-inactive-surface-strong": "var(--hop-rock-100)",
|
|
248
|
+
"--hop-status-inactive-icon": "var(--hop-rock-800)",
|
|
249
|
+
"--hop-status-inactive-surface": "var(--hop-rock-75)",
|
|
250
|
+
"--hop-status-inactive-text": "var(--hop-rock-900)",
|
|
251
|
+
"--hop-status-caution-surface-strong": "var(--hop-koi-200)",
|
|
252
|
+
"--hop-status-caution-icon": "var(--hop-koi-900)",
|
|
253
|
+
"--hop-status-caution-surface": "var(--hop-koi-75)",
|
|
254
|
+
"--hop-status-caution-text": "var(--hop-koi-900)",
|
|
255
|
+
"--hop-status-negative-surface-strong": "var(--hop-amanita-200)",
|
|
256
|
+
"--hop-status-negative-icon": "var(--hop-amanita-900)",
|
|
257
|
+
"--hop-status-negative-surface": "var(--hop-amanita-75)",
|
|
258
|
+
"--hop-status-negative-text": "var(--hop-amanita-900)",
|
|
259
|
+
"--hop-status-positive-icon": "var(--hop-moss-900)",
|
|
260
|
+
"--hop-status-positive-surface-strong": "var(--hop-moss-200)",
|
|
261
|
+
"--hop-status-positive-surface": "var(--hop-moss-75)",
|
|
262
|
+
"--hop-status-positive-text": "var(--hop-moss-900)",
|
|
263
|
+
"--hop-dataviz-unavailable": "var(--hop-rock-600)",
|
|
264
|
+
"--hop-dataviz-unavailable-weak": "var(--hop-rock-400)",
|
|
265
|
+
"--hop-dataviz-unavailable-strong": "var(--hop-rock-700)",
|
|
266
|
+
"--hop-dataviz-text-onlight": "var(--hop-rock-800)",
|
|
267
|
+
"--hop-dataviz-text-ondark": "var(--hop-samoyed)"
|
|
268
|
+
};
|
|
269
|
+
|
|
270
|
+
export { DarkSemanticTokens };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { useStyledSystem } from './chunk-RIR7BXVF.js';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import { jsx } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
// css-module:./htmlElement.module.css#css-module
|
|
7
|
+
var htmlElement_module_default = { "html-element": "htmlElement-module__html-element___xmRSa" };
|
|
8
|
+
function htmlElement(elementType) {
|
|
9
|
+
return forwardRef((props, ref) => {
|
|
10
|
+
const { className, children, ...rest } = useStyledSystem(props);
|
|
11
|
+
const As = elementType;
|
|
12
|
+
const classNames = clsx(
|
|
13
|
+
className,
|
|
14
|
+
htmlElement_module_default["html-element"],
|
|
15
|
+
`hop-html-${elementType}`
|
|
16
|
+
// this selector is not used, but could be used as a selector for the element type wrapper
|
|
17
|
+
);
|
|
18
|
+
return (
|
|
19
|
+
// It's too hard for typescript, a generic elementType, with generic props.
|
|
20
|
+
// Basically, the interface is HTMLProps of the elementType + styled system props.
|
|
21
|
+
// useStyledSystem removes the styled system props, so what is remaining is valid for the elementType.
|
|
22
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
23
|
+
// @ts-ignore
|
|
24
|
+
/* @__PURE__ */ jsx(As, { ref, className: classNames, ...rest, children })
|
|
25
|
+
);
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export { htmlElement };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { BodyStyleProvider } from './chunk-OHW5NUAW.js';
|
|
2
|
+
import { Div } from './chunk-FYKLSVLR.js';
|
|
3
|
+
import { BreakpointProvider, DefaultUnsupportedMatchMediaBreakpoint } from './chunk-LU33LZMJ.js';
|
|
4
|
+
import { TokenProvider } from './chunk-ZO3DYLQJ.js';
|
|
5
|
+
import { HopperRootCssClass, StyledSystemRootCssClass } from './chunk-ZQUJDDQL.js';
|
|
6
|
+
import { useColorScheme } from './chunk-IP7TYBR3.js';
|
|
7
|
+
import { ColorSchemeContext } from './chunk-V7X6ANEM.js';
|
|
8
|
+
import clsx from 'clsx';
|
|
9
|
+
import { useState, useCallback } from 'react';
|
|
10
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
11
|
+
|
|
12
|
+
function StyledSystemProvider({ children, withBodyStyle = false, withCssVariables = true, colorScheme = "light", defaultColorScheme = "light", unsupportedMatchMediaBreakpoint = DefaultUnsupportedMatchMediaBreakpoint, className, ...rest }) {
|
|
13
|
+
const [remoteColorScheme, setRemoteColorScheme] = useState();
|
|
14
|
+
const computedColorScheme = useColorScheme(remoteColorScheme ?? colorScheme, defaultColorScheme);
|
|
15
|
+
const setColorScheme = useCallback((newColorScheme) => {
|
|
16
|
+
setRemoteColorScheme(newColorScheme);
|
|
17
|
+
}, [setRemoteColorScheme]);
|
|
18
|
+
const classNames = clsx(
|
|
19
|
+
HopperRootCssClass,
|
|
20
|
+
`${HopperRootCssClass}-${computedColorScheme}`,
|
|
21
|
+
StyledSystemRootCssClass,
|
|
22
|
+
`${StyledSystemRootCssClass}-${computedColorScheme}`,
|
|
23
|
+
className
|
|
24
|
+
);
|
|
25
|
+
return /* @__PURE__ */ jsx(
|
|
26
|
+
ColorSchemeContext.Provider,
|
|
27
|
+
{
|
|
28
|
+
value: {
|
|
29
|
+
colorScheme: computedColorScheme,
|
|
30
|
+
setColorScheme
|
|
31
|
+
},
|
|
32
|
+
children: /* @__PURE__ */ jsx(BreakpointProvider, { unsupportedMatchMediaBreakpoint, children: /* @__PURE__ */ jsxs(Div, { className: classNames, ...rest, children: [
|
|
33
|
+
withBodyStyle && /* @__PURE__ */ jsx(BodyStyleProvider, {}),
|
|
34
|
+
withCssVariables && /* @__PURE__ */ jsx(TokenProvider, {}),
|
|
35
|
+
children
|
|
36
|
+
] }) })
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export { StyledSystemProvider };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { htmlElement } from './chunk-35LDZFKX.js';
|
|
2
|
+
|
|
3
|
+
// src/html-wrappers/html.ts
|
|
4
|
+
var Address = htmlElement("address");
|
|
5
|
+
var Article = htmlElement("article");
|
|
6
|
+
var Aside = htmlElement("aside");
|
|
7
|
+
var HtmlFooter = htmlElement("footer");
|
|
8
|
+
var HtmlH1 = htmlElement("h1");
|
|
9
|
+
var HtmlH2 = htmlElement("h2");
|
|
10
|
+
var HtmlH3 = htmlElement("h3");
|
|
11
|
+
var HtmlH4 = htmlElement("h4");
|
|
12
|
+
var HtmlH5 = htmlElement("h5");
|
|
13
|
+
var HtmlH6 = htmlElement("h6");
|
|
14
|
+
var HtmlHeader = htmlElement("header");
|
|
15
|
+
var Main = htmlElement("main");
|
|
16
|
+
var Nav = htmlElement("nav");
|
|
17
|
+
var HtmlSection = htmlElement("section");
|
|
18
|
+
var Div = htmlElement("div");
|
|
19
|
+
var HtmlParagraph = htmlElement("p");
|
|
20
|
+
var OL = htmlElement("ol");
|
|
21
|
+
var UL = htmlElement("ul");
|
|
22
|
+
var LI = htmlElement("li");
|
|
23
|
+
var A = htmlElement("a");
|
|
24
|
+
var Span = htmlElement("span");
|
|
25
|
+
var Img = htmlElement("img");
|
|
26
|
+
var Table = htmlElement("table");
|
|
27
|
+
var THead = htmlElement("thead");
|
|
28
|
+
var TBody = htmlElement("tbody");
|
|
29
|
+
var TFoot = htmlElement("tfoot");
|
|
30
|
+
var TH = htmlElement("th");
|
|
31
|
+
var TR = htmlElement("tr");
|
|
32
|
+
var TD = htmlElement("td");
|
|
33
|
+
var HtmlButton = htmlElement("button");
|
|
34
|
+
var HtmlForm = htmlElement("form");
|
|
35
|
+
var HtmlInput = htmlElement("input");
|
|
36
|
+
var HtmlLabel = htmlElement("label");
|
|
37
|
+
var HtmlTextArea = htmlElement("textarea");
|
|
38
|
+
|
|
39
|
+
export { A, Address, Article, Aside, Div, HtmlButton, HtmlFooter, HtmlForm, HtmlH1, HtmlH2, HtmlH3, HtmlH4, HtmlH5, HtmlH6, HtmlHeader, HtmlInput, HtmlLabel, HtmlParagraph, HtmlSection, HtmlTextArea, Img, LI, Main, Nav, OL, Span, TBody, TD, TFoot, TH, THead, TR, Table, UL };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { useBreakpointContext } from './chunk-ZUVKM5DV.js';
|
|
2
|
+
import { Breakpoints } from './chunk-XUHDFZZL.js';
|
|
3
|
+
import { isObject, isNil } from './chunk-U5R6ZXH3.js';
|
|
4
|
+
|
|
5
|
+
// src/responsive/useResponsiveValue.tsx
|
|
6
|
+
var ResponsiveKeys = [...Object.keys(Breakpoints), "base"];
|
|
7
|
+
function isResponsiveObject(obj) {
|
|
8
|
+
if (!isObject(obj)) {
|
|
9
|
+
return false;
|
|
10
|
+
}
|
|
11
|
+
return Object.keys(obj).every((key) => ResponsiveKeys.includes(key));
|
|
12
|
+
}
|
|
13
|
+
function parseResponsiveValue(value, matchedBreakpoints) {
|
|
14
|
+
if (isResponsiveObject(value)) {
|
|
15
|
+
for (let i = 0; i < matchedBreakpoints.length; i++) {
|
|
16
|
+
const responsiveValue = value[matchedBreakpoints[i]];
|
|
17
|
+
if (!isNil(responsiveValue)) {
|
|
18
|
+
return responsiveValue;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
return value["base"];
|
|
22
|
+
}
|
|
23
|
+
return value;
|
|
24
|
+
}
|
|
25
|
+
function useResponsiveValue(value) {
|
|
26
|
+
const { matchedBreakpoints } = useBreakpointContext();
|
|
27
|
+
return parseResponsiveValue(value, matchedBreakpoints);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export { isResponsiveObject, parseResponsiveValue, useResponsiveValue };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { DarkSemanticTokens } from './chunk-2ITAI3PJ.js';
|
|
2
|
+
import { CoreTokens, SemanticTokens } from './chunk-Q3NLRNZN.js';
|
|
3
|
+
|
|
4
|
+
// src/tokens/tokens.ts
|
|
5
|
+
var Tokens = {
|
|
6
|
+
Core: CoreTokens,
|
|
7
|
+
Semantic: SemanticTokens,
|
|
8
|
+
DarkSemantic: DarkSemanticTokens
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export { Tokens };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { useMediaQuery } from './chunk-STEDL5VQ.js';
|
|
2
|
+
|
|
3
|
+
// src/color-scheme/useColorScheme.ts
|
|
4
|
+
function useColorScheme(colorScheme, defaultColorScheme) {
|
|
5
|
+
const matchesLight = useMediaQuery("(prefers-color-scheme: light)");
|
|
6
|
+
const matchesDark = useMediaQuery("(prefers-color-scheme: dark)");
|
|
7
|
+
if (colorScheme === "system") {
|
|
8
|
+
if (matchesLight) {
|
|
9
|
+
return "light";
|
|
10
|
+
}
|
|
11
|
+
if (matchesDark) {
|
|
12
|
+
return "dark";
|
|
13
|
+
}
|
|
14
|
+
return defaultColorScheme ?? "light";
|
|
15
|
+
}
|
|
16
|
+
return colorScheme;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export { useColorScheme };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { useIsomorphicInsertionEffect } from './chunk-YPIK2HRL.js';
|
|
2
|
+
import { isNil } from './chunk-U5R6ZXH3.js';
|
|
3
|
+
|
|
4
|
+
// src/utils/useInsertStyleElement.ts
|
|
5
|
+
function useInsertStyleElement(elementId, cssContent, allowUpdates = true) {
|
|
6
|
+
useIsomorphicInsertionEffect(() => {
|
|
7
|
+
let element = document.getElementById(elementId);
|
|
8
|
+
if (isNil(element)) {
|
|
9
|
+
if (!isNil(cssContent)) {
|
|
10
|
+
element = document.createElement("style");
|
|
11
|
+
element.id = elementId;
|
|
12
|
+
document.head.appendChild(element);
|
|
13
|
+
element.innerText = formatInlineCss(cssContent);
|
|
14
|
+
return () => {
|
|
15
|
+
element?.remove();
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
} else if (allowUpdates) {
|
|
19
|
+
element.innerText = formatInlineCss(cssContent);
|
|
20
|
+
}
|
|
21
|
+
}, [elementId, cssContent]);
|
|
22
|
+
}
|
|
23
|
+
function formatInlineCss(str) {
|
|
24
|
+
return str?.replace(/(\r\n|\n|\r|\s\s)/gm, "") ?? "";
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export { useInsertStyleElement };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { isNil } from './chunk-U5R6ZXH3.js';
|
|
2
|
+
|
|
3
|
+
// src/utils/useThemeComputedStyle.ts
|
|
4
|
+
var ThemeComputedStyle = class {
|
|
5
|
+
#componentRef;
|
|
6
|
+
#scope;
|
|
7
|
+
constructor(componentRef, scope) {
|
|
8
|
+
this.#componentRef = componentRef;
|
|
9
|
+
this.#scope = scope;
|
|
10
|
+
}
|
|
11
|
+
getThemeElement() {
|
|
12
|
+
const themeElement = this.#componentRef.current?.closest(this.#scope);
|
|
13
|
+
if (isNil(themeElement)) {
|
|
14
|
+
throw new Error("Cannot find a theme element, is the scope assigned to a DOM element?");
|
|
15
|
+
}
|
|
16
|
+
return themeElement;
|
|
17
|
+
}
|
|
18
|
+
getPropertyValue(name) {
|
|
19
|
+
return window.getComputedStyle(this.getThemeElement()).getPropertyValue(name);
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export { ThemeComputedStyle };
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { HopperVariablePrefix, HopperColors, DataVizColors, BackgroundColors, TextColors, IconColors, Elevation, FontSize, FontWeight, LineHeight, FontFamily, Shape, CoreSpace, SemanticSimplePaddingSpace, SemanticComplexPaddingSpace, SemanticSimpleMarginSpace, SemanticComplexMarginSpace } from './chunk-U3SI5QXV.js';
|
|
2
|
+
import { parseResponsiveValue } from './chunk-GYREQTEK.js';
|
|
3
|
+
import { isNil } from './chunk-U5R6ZXH3.js';
|
|
4
|
+
|
|
5
|
+
// src/tokens/token-mappings.ts
|
|
6
|
+
var ColorExpressionTypes = [
|
|
7
|
+
"#",
|
|
8
|
+
"rgb",
|
|
9
|
+
"rgba",
|
|
10
|
+
"hsl",
|
|
11
|
+
"hsla"
|
|
12
|
+
];
|
|
13
|
+
var DefaultBorderWidthAndStyle = "1px solid";
|
|
14
|
+
function createMapping(mappings, template = createValueTemplate) {
|
|
15
|
+
return Object.entries(mappings).reduce((acc, [key, value]) => {
|
|
16
|
+
acc[key] = template(value);
|
|
17
|
+
return acc;
|
|
18
|
+
}, {});
|
|
19
|
+
}
|
|
20
|
+
function createValueTemplate(value) {
|
|
21
|
+
return `var(${`${HopperVariablePrefix}-${value}`})`;
|
|
22
|
+
}
|
|
23
|
+
function createBorderValueTemplate(value) {
|
|
24
|
+
return `${DefaultBorderWidthAndStyle} ${createValueTemplate(value)}`;
|
|
25
|
+
}
|
|
26
|
+
var ColorMapping = createMapping(HopperColors);
|
|
27
|
+
var DataVizColorMapping = createMapping(DataVizColors);
|
|
28
|
+
var BackgroundColorMapping = {
|
|
29
|
+
...createMapping(BackgroundColors),
|
|
30
|
+
...ColorMapping,
|
|
31
|
+
...DataVizColorMapping
|
|
32
|
+
};
|
|
33
|
+
var BorderMapping = {
|
|
34
|
+
...createMapping(BackgroundColors, createBorderValueTemplate),
|
|
35
|
+
...createMapping(HopperColors, createBorderValueTemplate),
|
|
36
|
+
...createMapping(DataVizColors, createBorderValueTemplate)
|
|
37
|
+
};
|
|
38
|
+
var TextColorMapping = {
|
|
39
|
+
...createMapping(TextColors),
|
|
40
|
+
...ColorMapping,
|
|
41
|
+
...DataVizColorMapping
|
|
42
|
+
};
|
|
43
|
+
var IconColorMapping = {
|
|
44
|
+
...createMapping(IconColors),
|
|
45
|
+
...ColorMapping,
|
|
46
|
+
...DataVizColorMapping
|
|
47
|
+
};
|
|
48
|
+
var BoxShadowMapping = createMapping(Elevation);
|
|
49
|
+
var FontSizeMapping = createMapping(FontSize);
|
|
50
|
+
var FontWeightMapping = createMapping(FontWeight);
|
|
51
|
+
var LineHeightMapping = createMapping(LineHeight);
|
|
52
|
+
var FontFamilyMapping = createMapping(FontFamily);
|
|
53
|
+
var BorderRadiusMapping = createMapping(Shape);
|
|
54
|
+
var SpaceMapping = createMapping(CoreSpace);
|
|
55
|
+
var SimplePaddingMapping = {
|
|
56
|
+
...createMapping(SemanticSimplePaddingSpace),
|
|
57
|
+
...SpaceMapping
|
|
58
|
+
};
|
|
59
|
+
var ComplexPaddingMapping = {
|
|
60
|
+
...SimplePaddingMapping,
|
|
61
|
+
...createMapping(SemanticComplexPaddingSpace)
|
|
62
|
+
};
|
|
63
|
+
var SimpleMarginMapping = {
|
|
64
|
+
...createMapping(SemanticSimpleMarginSpace),
|
|
65
|
+
...SpaceMapping
|
|
66
|
+
};
|
|
67
|
+
var ComplexMarginMapping = {
|
|
68
|
+
...SimpleMarginMapping,
|
|
69
|
+
...createMapping(SemanticComplexMarginSpace)
|
|
70
|
+
};
|
|
71
|
+
var SizingMapping = {
|
|
72
|
+
...SpaceMapping
|
|
73
|
+
// TODO: Sizing scale still missing, only core tokens are available at the moment
|
|
74
|
+
};
|
|
75
|
+
function parseResponsiveSystemValue(value, systemValues, matchedBreakpoints) {
|
|
76
|
+
if (isNil(value)) {
|
|
77
|
+
return value;
|
|
78
|
+
}
|
|
79
|
+
const systemValue = getSystemValue(value, systemValues);
|
|
80
|
+
if (!isNil(systemValue)) {
|
|
81
|
+
return systemValue;
|
|
82
|
+
}
|
|
83
|
+
const underlyingValue = parseResponsiveValue(value, matchedBreakpoints);
|
|
84
|
+
if (!isNil(underlyingValue)) {
|
|
85
|
+
const underlyingSystemValue = getSystemValue(underlyingValue, systemValues);
|
|
86
|
+
if (!isNil(underlyingSystemValue)) {
|
|
87
|
+
return underlyingSystemValue;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
return underlyingValue;
|
|
91
|
+
}
|
|
92
|
+
function getSystemValue(value, systemValues) {
|
|
93
|
+
return systemValues[value];
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export { BackgroundColorMapping, BorderMapping, BorderRadiusMapping, BoxShadowMapping, ColorExpressionTypes, ColorMapping, ComplexMarginMapping, ComplexPaddingMapping, DataVizColorMapping, DefaultBorderWidthAndStyle, FontFamilyMapping, FontSizeMapping, FontWeightMapping, IconColorMapping, LineHeightMapping, SimpleMarginMapping, SimplePaddingMapping, SizingMapping, SpaceMapping, TextColorMapping, getSystemValue, parseResponsiveSystemValue };
|