@hopper-ui/styled-system 0.2.1 → 0.2.3
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 +132 -1
- package/dist/StyledSystemProvider.d.ts +42 -4
- package/dist/StyledSystemProvider.js +26 -26
- package/dist/chunk-3YM73BQP.js +6 -0
- package/dist/chunk-7KCN3W6N.js +11 -0
- package/dist/chunk-AHDDZ2BQ.js +28 -0
- package/dist/chunk-BEEGWFNF.js +32 -0
- package/dist/chunk-GRF2SIQE.js +59 -0
- package/dist/chunk-GYREQTEK.js +30 -0
- package/dist/chunk-I37Y2R7V.js +4 -0
- package/dist/chunk-J4KAMS5Q.js +270 -0
- package/dist/chunk-JFESGV6Z.js +26 -0
- package/dist/chunk-JM7JTLPS.js +84 -0
- package/dist/chunk-KUUJ37DW.js +96 -0
- package/dist/chunk-LU33LZMJ.js +55 -0
- package/dist/chunk-O7PTTVQH.js +715 -0
- package/dist/chunk-Q3NLRNZN.js +881 -0
- package/dist/chunk-QWLE5PCU.js +29 -0
- package/dist/chunk-RIORU7JO.js +28 -0
- package/dist/chunk-S33PIM5T.js +41 -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-XTX4KVWI.js +19 -0
- package/dist/chunk-XUHDFZZL.js +10 -0
- package/dist/chunk-YPIK2HRL.js +6 -0
- package/dist/chunk-ZFDLWGCR.js +39 -0
- package/dist/chunk-ZUVKM5DV.js +13 -0
- package/dist/color-scheme/ColorSchemeContext.d.ts +12 -0
- package/dist/color-scheme/ColorSchemeContext.js +2 -0
- package/dist/color-scheme/useColorScheme.d.ts +6 -0
- package/dist/color-scheme/useColorScheme.js +3 -0
- package/dist/color-scheme/useColorSchemeValue.d.ts +3 -0
- package/dist/color-scheme/useColorSchemeValue.js +3 -0
- package/dist/global-styles/BodyStyleProvider.d.ts +5 -0
- package/dist/global-styles/BodyStyleProvider.js +9 -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 +11 -0
- package/dist/html-wrappers/htmlElement.css +132 -0
- package/dist/html-wrappers/htmlElement.d.ts +12 -0
- package/dist/html-wrappers/htmlElement.js +10 -0
- package/dist/index.css +132 -1
- package/dist/index.d.ts +23 -2385
- package/dist/index.js +27 -26
- package/dist/responsive/BreakpointContext.d.ts +10 -0
- package/dist/responsive/BreakpointContext.js +3 -0
- package/dist/responsive/BreakpointProvider.d.ts +12 -0
- package/dist/responsive/BreakpointProvider.js +6 -0
- package/dist/responsive/Breakpoints.d.ts +10 -0
- package/dist/responsive/Breakpoints.js +2 -0
- package/dist/responsive/useResponsiveValue.d.ts +11 -0
- package/dist/responsive/useResponsiveValue.js +5 -0
- package/dist/styled-system-props.d.ts +1246 -3
- package/dist/styled-system-props.js +2 -3
- package/dist/styled-system-root-css-class.js +2 -3
- package/dist/tokens/TokenProvider.d.ts +20 -0
- package/dist/tokens/TokenProvider.js +9 -0
- package/dist/tokens/generated/dark-semantic-tokens.d.ts +272 -0
- package/dist/tokens/generated/dark-semantic-tokens.js +2 -0
- package/dist/tokens/generated/light-semantic-tokens.d.ts +883 -0
- package/dist/tokens/generated/light-semantic-tokens.js +2 -0
- package/dist/tokens/generated/styled-system-to-token-mappings.d.ts +913 -0
- package/dist/tokens/generated/styled-system-to-token-mappings.js +2 -0
- package/dist/{styled-system-props-1c231c50.d.ts → tokens/token-mappings.d.ts} +2 -1258
- package/dist/tokens/token-mappings.js +7 -0
- package/dist/tokens/tokens.d.ts +1154 -0
- package/dist/tokens/tokens.js +4 -0
- package/dist/useStyledSystem.css +125 -1
- package/dist/useStyledSystem.d.ts +4 -1
- package/dist/useStyledSystem.js +9 -5
- package/dist/utils/assertion.d.ts +15 -0
- package/dist/utils/assertion.js +2 -0
- package/dist/utils/useInsertStyleElement.d.ts +6 -0
- package/dist/utils/useInsertStyleElement.js +4 -0
- package/dist/utils/useIsomorphicInsertionEffect.d.ts +16 -0
- package/dist/utils/useIsomorphicInsertionEffect.js +2 -0
- package/dist/utils/useIsomorphicLayoutEffect.d.ts +16 -0
- package/dist/utils/useIsomorphicLayoutEffect.js +2 -0
- package/dist/utils/useMediaQuery.d.ts +4 -0
- package/dist/utils/useMediaQuery.js +2 -0
- package/dist/utils/useThemeComputedStyle.d.ts +14 -0
- package/dist/utils/useThemeComputedStyle.js +3 -0
- package/package.json +2 -2
|
@@ -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-toad-25)",
|
|
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,26 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
+
var __publicField = (obj, key, value) => {
|
|
4
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
|
+
return value;
|
|
6
|
+
};
|
|
7
|
+
var __accessCheck = (obj, member, msg) => {
|
|
8
|
+
if (!member.has(obj))
|
|
9
|
+
throw TypeError("Cannot " + msg);
|
|
10
|
+
};
|
|
11
|
+
var __privateGet = (obj, member, getter) => {
|
|
12
|
+
__accessCheck(obj, member, "read from private field");
|
|
13
|
+
return getter ? getter.call(obj) : member.get(obj);
|
|
14
|
+
};
|
|
15
|
+
var __privateAdd = (obj, member, value) => {
|
|
16
|
+
if (member.has(obj))
|
|
17
|
+
throw TypeError("Cannot add the same private member more than once");
|
|
18
|
+
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
19
|
+
};
|
|
20
|
+
var __privateSet = (obj, member, value, setter) => {
|
|
21
|
+
__accessCheck(obj, member, "write to private field");
|
|
22
|
+
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
23
|
+
return value;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export { __privateAdd, __privateGet, __privateSet, __publicField };
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
// package.json
|
|
2
|
+
var package_default = {
|
|
3
|
+
name: "@hopper-ui/styled-system",
|
|
4
|
+
author: "Workleap",
|
|
5
|
+
version: "0.2.3",
|
|
6
|
+
description: "The styled-system package.",
|
|
7
|
+
license: "Apache-2.0",
|
|
8
|
+
repository: {
|
|
9
|
+
type: "git",
|
|
10
|
+
url: "git+https://github.com/gsoft-inc/wl-hopper.git",
|
|
11
|
+
directory: "packages/styled-system"
|
|
12
|
+
},
|
|
13
|
+
publishConfig: {
|
|
14
|
+
access: "public",
|
|
15
|
+
provenance: true
|
|
16
|
+
},
|
|
17
|
+
type: "module",
|
|
18
|
+
sideEffects: [
|
|
19
|
+
"*.css"
|
|
20
|
+
],
|
|
21
|
+
main: "dist/index.js",
|
|
22
|
+
types: "dist/index.d.ts",
|
|
23
|
+
style: "dist/index.css",
|
|
24
|
+
exports: {
|
|
25
|
+
".": {
|
|
26
|
+
import: "./dist/index.js",
|
|
27
|
+
types: "./dist/index.d.ts",
|
|
28
|
+
default: "./dist/index.js"
|
|
29
|
+
},
|
|
30
|
+
"./index.css": "./dist/index.css"
|
|
31
|
+
},
|
|
32
|
+
files: [
|
|
33
|
+
"/dist",
|
|
34
|
+
"CHANGELOG.md",
|
|
35
|
+
"README.md"
|
|
36
|
+
],
|
|
37
|
+
scripts: {
|
|
38
|
+
dev: "tsup --config ./tsup.dev.ts",
|
|
39
|
+
build: "tsup --config ./tsup.build.ts",
|
|
40
|
+
test: "jest"
|
|
41
|
+
},
|
|
42
|
+
peerDependencies: {
|
|
43
|
+
react: "*",
|
|
44
|
+
"react-dom": "*"
|
|
45
|
+
},
|
|
46
|
+
dependencies: {
|
|
47
|
+
clsx: "2.0.0",
|
|
48
|
+
"react-aria": "3.30.0"
|
|
49
|
+
},
|
|
50
|
+
devDependencies: {
|
|
51
|
+
"@hopper-ui/tokens": "workspace:*",
|
|
52
|
+
"@swc/core": "1.3.96",
|
|
53
|
+
"@swc/helpers": "0.5.3",
|
|
54
|
+
"@swc/jest": "0.2.29",
|
|
55
|
+
"@testing-library/jest-dom": "6.1.4",
|
|
56
|
+
"@testing-library/react": "14.1.0",
|
|
57
|
+
"@types/jest": "29.5.8",
|
|
58
|
+
"@types/react-dom": "18.2.17",
|
|
59
|
+
"@types/react-test-renderer": "18.0.6",
|
|
60
|
+
"@types/react": "18.2.38",
|
|
61
|
+
"@workleap/eslint-plugin": "3.0.0",
|
|
62
|
+
"@workleap/swc-configs": "2.1.2",
|
|
63
|
+
"@workleap/tsup-configs": "3.0.1",
|
|
64
|
+
"@workleap/typescript-configs": "3.0.2",
|
|
65
|
+
"identity-obj-proxy": "3.0.0",
|
|
66
|
+
"jest-environment-jsdom": "29.7.0",
|
|
67
|
+
jest: "29.7.0",
|
|
68
|
+
"postcss-modules": "6.0.0",
|
|
69
|
+
postcss: "8.4.31",
|
|
70
|
+
"react-dom": "18.2.0",
|
|
71
|
+
"react-test-renderer": "18.2.0",
|
|
72
|
+
react: "18.2.0",
|
|
73
|
+
"ts-jest": "29.1.1",
|
|
74
|
+
tsup: "7.2.0",
|
|
75
|
+
"type-fest": "4.7.1",
|
|
76
|
+
typescript: "5.2.2"
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
// src/styled-system-root-css-class.ts
|
|
81
|
+
var HopperRootCssClass = "hop";
|
|
82
|
+
var StyledSystemRootCssClass = `${HopperRootCssClass}-${package_default.version.replaceAll(".", "-")}`;
|
|
83
|
+
|
|
84
|
+
export { HopperRootCssClass, StyledSystemRootCssClass };
|
|
@@ -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 };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { BreakpointContext } from './chunk-ZUVKM5DV.js';
|
|
2
|
+
import { Breakpoints } from './chunk-XUHDFZZL.js';
|
|
3
|
+
import { supportsMatchMedia } from './chunk-STEDL5VQ.js';
|
|
4
|
+
import { useCallback, useState, useEffect } from 'react';
|
|
5
|
+
import { useIsSSR } from 'react-aria';
|
|
6
|
+
import { jsx } from 'react/jsx-runtime';
|
|
7
|
+
|
|
8
|
+
var DefaultUnsupportedMatchMediaBreakpoint = "lg";
|
|
9
|
+
function BreakpointProvider({
|
|
10
|
+
children,
|
|
11
|
+
unsupportedMatchMediaBreakpoint = DefaultUnsupportedMatchMediaBreakpoint
|
|
12
|
+
}) {
|
|
13
|
+
const matchedBreakpoints = useMatchedBreakpoints(unsupportedMatchMediaBreakpoint);
|
|
14
|
+
return /* @__PURE__ */ jsx(BreakpointContext.Provider, { value: { matchedBreakpoints }, children });
|
|
15
|
+
}
|
|
16
|
+
function useMatchedBreakpoints(unsupportedMatchMediaBreakpoint = DefaultUnsupportedMatchMediaBreakpoint) {
|
|
17
|
+
const getBreakpointHandler = useCallback(() => {
|
|
18
|
+
const entries = Object.entries(Breakpoints).sort(([, valueA], [, valueB]) => valueB - valueA);
|
|
19
|
+
const breakpointQueries = entries.map(([, value]) => `(min-width: ${value}px)`);
|
|
20
|
+
const matched = [];
|
|
21
|
+
for (const i in breakpointQueries) {
|
|
22
|
+
const query = breakpointQueries[i];
|
|
23
|
+
if (window.matchMedia(query).matches) {
|
|
24
|
+
matched.push(entries[i][0]);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
matched.push("base");
|
|
28
|
+
return matched;
|
|
29
|
+
}, []);
|
|
30
|
+
const [matchedBreakpoints, setMatchedBreakpoints] = useState(
|
|
31
|
+
supportsMatchMedia ? getBreakpointHandler() : [unsupportedMatchMediaBreakpoint]
|
|
32
|
+
);
|
|
33
|
+
useEffect(() => {
|
|
34
|
+
if (!supportsMatchMedia) {
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
const handleResize = () => {
|
|
38
|
+
const breakpointHandler = getBreakpointHandler();
|
|
39
|
+
setMatchedBreakpoints((previousMatchedBreakpoints) => {
|
|
40
|
+
if (previousMatchedBreakpoints.length !== breakpointHandler.length || previousMatchedBreakpoints.some((breakpoint, idx) => breakpoint !== breakpointHandler[idx])) {
|
|
41
|
+
return [...breakpointHandler];
|
|
42
|
+
}
|
|
43
|
+
return previousMatchedBreakpoints;
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
window.addEventListener("resize", handleResize);
|
|
47
|
+
return () => {
|
|
48
|
+
window.removeEventListener("resize", handleResize);
|
|
49
|
+
};
|
|
50
|
+
}, [getBreakpointHandler]);
|
|
51
|
+
const isSSR = useIsSSR();
|
|
52
|
+
return isSSR ? [unsupportedMatchMediaBreakpoint] : matchedBreakpoints;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export { BreakpointProvider, DefaultUnsupportedMatchMediaBreakpoint };
|