@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.
Files changed (87) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/StyledSystemProvider.css +132 -1
  3. package/dist/StyledSystemProvider.d.ts +42 -4
  4. package/dist/StyledSystemProvider.js +26 -26
  5. package/dist/chunk-3YM73BQP.js +6 -0
  6. package/dist/chunk-7KCN3W6N.js +11 -0
  7. package/dist/chunk-AHDDZ2BQ.js +28 -0
  8. package/dist/chunk-BEEGWFNF.js +32 -0
  9. package/dist/chunk-GRF2SIQE.js +59 -0
  10. package/dist/chunk-GYREQTEK.js +30 -0
  11. package/dist/chunk-I37Y2R7V.js +4 -0
  12. package/dist/chunk-J4KAMS5Q.js +270 -0
  13. package/dist/chunk-JFESGV6Z.js +26 -0
  14. package/dist/chunk-JM7JTLPS.js +84 -0
  15. package/dist/chunk-KUUJ37DW.js +96 -0
  16. package/dist/chunk-LU33LZMJ.js +55 -0
  17. package/dist/chunk-O7PTTVQH.js +715 -0
  18. package/dist/chunk-Q3NLRNZN.js +881 -0
  19. package/dist/chunk-QWLE5PCU.js +29 -0
  20. package/dist/chunk-RIORU7JO.js +28 -0
  21. package/dist/chunk-S33PIM5T.js +41 -0
  22. package/dist/chunk-STEDL5VQ.js +25 -0
  23. package/dist/chunk-U3SI5QXV.js +911 -0
  24. package/dist/chunk-U5R6ZXH3.js +46 -0
  25. package/dist/chunk-V7X6ANEM.js +14 -0
  26. package/dist/chunk-X5OXC6DN.js +9 -0
  27. package/dist/chunk-XTX4KVWI.js +19 -0
  28. package/dist/chunk-XUHDFZZL.js +10 -0
  29. package/dist/chunk-YPIK2HRL.js +6 -0
  30. package/dist/chunk-ZFDLWGCR.js +39 -0
  31. package/dist/chunk-ZUVKM5DV.js +13 -0
  32. package/dist/color-scheme/ColorSchemeContext.d.ts +12 -0
  33. package/dist/color-scheme/ColorSchemeContext.js +2 -0
  34. package/dist/color-scheme/useColorScheme.d.ts +6 -0
  35. package/dist/color-scheme/useColorScheme.js +3 -0
  36. package/dist/color-scheme/useColorSchemeValue.d.ts +3 -0
  37. package/dist/color-scheme/useColorSchemeValue.js +3 -0
  38. package/dist/global-styles/BodyStyleProvider.d.ts +5 -0
  39. package/dist/global-styles/BodyStyleProvider.js +9 -0
  40. package/dist/html-wrappers/html.css +132 -0
  41. package/dist/{StyledSystemProvider-173b78af.d.ts → html-wrappers/html.d.ts} +8 -53
  42. package/dist/html-wrappers/html.js +11 -0
  43. package/dist/html-wrappers/htmlElement.css +132 -0
  44. package/dist/html-wrappers/htmlElement.d.ts +12 -0
  45. package/dist/html-wrappers/htmlElement.js +10 -0
  46. package/dist/index.css +132 -1
  47. package/dist/index.d.ts +23 -2385
  48. package/dist/index.js +27 -26
  49. package/dist/responsive/BreakpointContext.d.ts +10 -0
  50. package/dist/responsive/BreakpointContext.js +3 -0
  51. package/dist/responsive/BreakpointProvider.d.ts +12 -0
  52. package/dist/responsive/BreakpointProvider.js +6 -0
  53. package/dist/responsive/Breakpoints.d.ts +10 -0
  54. package/dist/responsive/Breakpoints.js +2 -0
  55. package/dist/responsive/useResponsiveValue.d.ts +11 -0
  56. package/dist/responsive/useResponsiveValue.js +5 -0
  57. package/dist/styled-system-props.d.ts +1246 -3
  58. package/dist/styled-system-props.js +2 -3
  59. package/dist/styled-system-root-css-class.js +2 -3
  60. package/dist/tokens/TokenProvider.d.ts +20 -0
  61. package/dist/tokens/TokenProvider.js +9 -0
  62. package/dist/tokens/generated/dark-semantic-tokens.d.ts +272 -0
  63. package/dist/tokens/generated/dark-semantic-tokens.js +2 -0
  64. package/dist/tokens/generated/light-semantic-tokens.d.ts +883 -0
  65. package/dist/tokens/generated/light-semantic-tokens.js +2 -0
  66. package/dist/tokens/generated/styled-system-to-token-mappings.d.ts +913 -0
  67. package/dist/tokens/generated/styled-system-to-token-mappings.js +2 -0
  68. package/dist/{styled-system-props-1c231c50.d.ts → tokens/token-mappings.d.ts} +2 -1258
  69. package/dist/tokens/token-mappings.js +7 -0
  70. package/dist/tokens/tokens.d.ts +1154 -0
  71. package/dist/tokens/tokens.js +4 -0
  72. package/dist/useStyledSystem.css +125 -1
  73. package/dist/useStyledSystem.d.ts +4 -1
  74. package/dist/useStyledSystem.js +9 -5
  75. package/dist/utils/assertion.d.ts +15 -0
  76. package/dist/utils/assertion.js +2 -0
  77. package/dist/utils/useInsertStyleElement.d.ts +6 -0
  78. package/dist/utils/useInsertStyleElement.js +4 -0
  79. package/dist/utils/useIsomorphicInsertionEffect.d.ts +16 -0
  80. package/dist/utils/useIsomorphicInsertionEffect.js +2 -0
  81. package/dist/utils/useIsomorphicLayoutEffect.d.ts +16 -0
  82. package/dist/utils/useIsomorphicLayoutEffect.js +2 -0
  83. package/dist/utils/useMediaQuery.d.ts +4 -0
  84. package/dist/utils/useMediaQuery.js +2 -0
  85. package/dist/utils/useThemeComputedStyle.d.ts +14 -0
  86. package/dist/utils/useThemeComputedStyle.js +3 -0
  87. package/package.json +2 -2
@@ -0,0 +1,715 @@
1
+ import { parseResponsiveSystemValue, ColorExpressionTypes, DefaultBorderWidthAndStyle, BackgroundColorMapping, BorderMapping, BorderRadiusMapping, BoxShadowMapping, TextColorMapping, SimpleMarginMapping, IconColorMapping, FontFamilyMapping, FontSizeMapping, FontWeightMapping, SizingMapping, LineHeightMapping, ComplexMarginMapping, ComplexPaddingMapping, SimplePaddingMapping } from './chunk-KUUJ37DW.js';
2
+ import { parseResponsiveValue } from './chunk-GYREQTEK.js';
3
+ import { useBreakpointContext } from './chunk-ZUVKM5DV.js';
4
+ import { isNil } from './chunk-U5R6ZXH3.js';
5
+ import { UnsafePrefix } from './chunk-I37Y2R7V.js';
6
+ import { __privateAdd, __publicField, __privateSet, __privateGet } from './chunk-JFESGV6Z.js';
7
+ import { useMemo } from 'react';
8
+
9
+ // css-module:./UseStyledSystem.module.css#css-module
10
+ var UseStyledSystem_module_default = { "hop-b-hover": "UseStyledSystem-module__hop-b-hover___WO7Si", "hop-bb-hover": "UseStyledSystem-module__hop-bb-hover___J7koW", "hop-bl-hover": "UseStyledSystem-module__hop-bl-hover___H6X11", "hop-br-hover": "UseStyledSystem-module__hop-br-hover___2ecDN", "hop-bt-hover": "UseStyledSystem-module__hop-bt-hover___m-WBU", "hop-b-focus": "UseStyledSystem-module__hop-b-focus___k8BIX", "hop-bb-focus": "UseStyledSystem-module__hop-bb-focus___vY533", "hop-bl-focus": "UseStyledSystem-module__hop-bl-focus___FMQH5", "hop-br-focus": "UseStyledSystem-module__hop-br-focus___QOQgk", "hop-bt-focus": "UseStyledSystem-module__hop-bt-focus___PGkY1", "hop-b-active": "UseStyledSystem-module__hop-b-active___XYsR5", "hop-bb-active": "UseStyledSystem-module__hop-bb-active___48kbq", "hop-bl-active": "UseStyledSystem-module__hop-bl-active___49LJt", "hop-br-active": "UseStyledSystem-module__hop-br-active___QGaMg", "hop-bt-active": "UseStyledSystem-module__hop-bt-active___4y2V1", "hop-bg-hover": "UseStyledSystem-module__hop-bg-hover___dUflJ", "hop-bg-focus": "UseStyledSystem-module__hop-bg-focus___RAUcc", "hop-bg-active": "UseStyledSystem-module__hop-bg-active___3hBq4", "hop-bs-hover": "UseStyledSystem-module__hop-bs-hover___iugX-", "hop-bs-focus": "UseStyledSystem-module__hop-bs-focus___kk-Qr", "hop-bs-active": "UseStyledSystem-module__hop-bs-active___X8-Nt", "hop-c-hover": "UseStyledSystem-module__hop-c-hover___pzags", "hop-c-focus": "UseStyledSystem-module__hop-c-focus___IgZlq", "hop-c-active": "UseStyledSystem-module__hop-c-active___s2HIc", "hop-cs-hover": "UseStyledSystem-module__hop-cs-hover___q-t-p", "hop-f-hover": "UseStyledSystem-module__hop-f-hover___PS8fe", "hop-f-focus": "UseStyledSystem-module__hop-f-focus___JOUzD", "hop-o-hover": "UseStyledSystem-module__hop-o-hover___NTBNQ", "hop-o-focus": "UseStyledSystem-module__hop-o-focus___odjgO", "hop-o-active": "UseStyledSystem-module__hop-o-active___wrBCC", "hop-ol-focus": "UseStyledSystem-module__hop-ol-focus___dRdaA" };
11
+
12
+ // src/useStyledSystem.ts
13
+ function createSystemValueHandler(systemValues) {
14
+ return (name, value, context) => {
15
+ const parsedValue = parseResponsiveSystemValue(value, systemValues, context.matchedBreakpoints);
16
+ if (!isNil(parsedValue)) {
17
+ context.addStyleValue(name, parsedValue);
18
+ }
19
+ };
20
+ }
21
+ function createPassthroughHandler() {
22
+ return (name, value, context) => {
23
+ const parsedValue = parseResponsiveValue(value, context.matchedBreakpoints);
24
+ if (!isNil(parsedValue)) {
25
+ context.addStyleValue(name, parsedValue);
26
+ }
27
+ };
28
+ }
29
+ function createAxisHandler(firstPropName, secondPropName, systemValues) {
30
+ const firstHandler = createSystemValueHandler(systemValues);
31
+ const secondHandler = createSystemValueHandler(systemValues);
32
+ return (_, value, context) => {
33
+ firstHandler(firstPropName, value, context);
34
+ secondHandler(secondPropName, value, context);
35
+ };
36
+ }
37
+ function createPseudoHandler(pseudoClassName, pseudoVariable, systemValues) {
38
+ const systemValueHandler = (name, value, context) => {
39
+ const parsedValue = parseResponsiveSystemValue(value, systemValues, context.matchedBreakpoints);
40
+ if (!isNil(parsedValue)) {
41
+ context.addClass(pseudoClassName);
42
+ context.addStyleValue(pseudoVariable, parsedValue);
43
+ }
44
+ };
45
+ const passThroughHandler = (name, value, context) => {
46
+ const parsedValue = parseResponsiveValue(value, context.matchedBreakpoints);
47
+ if (!isNil(parsedValue)) {
48
+ context.addClass(pseudoClassName);
49
+ context.addStyleValue(pseudoVariable, parsedValue);
50
+ }
51
+ };
52
+ return !isNil(systemValues) ? systemValueHandler : passThroughHandler;
53
+ }
54
+ function createBorderHandler(systemValues) {
55
+ return (name, value, context) => {
56
+ const parsedValue = parseResponsiveSystemValue(value, systemValues, context.matchedBreakpoints);
57
+ if (!isNil(parsedValue)) {
58
+ if (typeof parsedValue === "string" && ColorExpressionTypes.some((x) => parsedValue.startsWith(x))) {
59
+ context.addStyleValue(name, `${DefaultBorderWidthAndStyle} ${parsedValue}`);
60
+ } else {
61
+ context.addStyleValue(name, parsedValue);
62
+ }
63
+ }
64
+ };
65
+ }
66
+ function createBorderPseudoHandler(pseudoClassName, pseudoVariable, systemValues) {
67
+ return (name, value, context) => {
68
+ const parsedValue = parseResponsiveSystemValue(value, systemValues, context.matchedBreakpoints);
69
+ if (!isNil(parsedValue)) {
70
+ context.addClass(pseudoClassName);
71
+ if (typeof parsedValue === "string" && ColorExpressionTypes.some((x) => parsedValue.startsWith(x))) {
72
+ context.addStyleValue(pseudoVariable, `${DefaultBorderWidthAndStyle} ${parsedValue}`);
73
+ } else {
74
+ context.addStyleValue(pseudoVariable, parsedValue);
75
+ }
76
+ }
77
+ };
78
+ }
79
+ var gridColumnSpanHandler = (name, value, context) => {
80
+ const parsedValue = parseResponsiveValue(value, context.matchedBreakpoints);
81
+ if (!isNil(parsedValue)) {
82
+ context.addStyleValue("gridColumn", `span ${parsedValue} / span ${parsedValue}`);
83
+ }
84
+ };
85
+ var gridRowSpanHandler = (name, value, context) => {
86
+ const parsedValue = parseResponsiveValue(value, context.matchedBreakpoints);
87
+ if (!isNil(parsedValue)) {
88
+ context.addStyleValue("gridRow", `span ${parsedValue} / span ${parsedValue}`);
89
+ }
90
+ };
91
+ var PropsHandlers = {
92
+ alignContent: createPassthroughHandler(),
93
+ alignItems: createPassthroughHandler(),
94
+ alignSelf: createPassthroughHandler(),
95
+ aspectRatio: createPassthroughHandler(),
96
+ backgroundColor: createSystemValueHandler(BackgroundColorMapping),
97
+ backgroundColorActive: createPseudoHandler(UseStyledSystem_module_default["hop-bg-active"], "--hop-bg-active", BackgroundColorMapping),
98
+ backgroundColorFocus: createPseudoHandler(UseStyledSystem_module_default["hop-bg-focus"], "--hop-bg-focus", BackgroundColorMapping),
99
+ backgroundColorHover: createPseudoHandler(UseStyledSystem_module_default["hop-bg-hover"], "--hop-bg-hover", BackgroundColorMapping),
100
+ backgroundImage: createPassthroughHandler(),
101
+ backgroundPosition: createPassthroughHandler(),
102
+ backgroundRepeat: createPassthroughHandler(),
103
+ backgroundSize: createPassthroughHandler(),
104
+ border: createBorderHandler(BorderMapping),
105
+ borderBottom: createBorderHandler(BorderMapping),
106
+ borderBottomActive: createBorderPseudoHandler(UseStyledSystem_module_default["hop-bb-active"], "--hop-bb-active", BorderMapping),
107
+ borderBottomFocus: createBorderPseudoHandler(UseStyledSystem_module_default["hop-bb-focus"], "--hop-bb-focus", BorderMapping),
108
+ borderBottomHover: createBorderPseudoHandler(UseStyledSystem_module_default["hop-bb-hover"], "--hop-bb-hover", BorderMapping),
109
+ borderBottomLeftRadius: createSystemValueHandler(BorderRadiusMapping),
110
+ borderBottomRightRadius: createSystemValueHandler(BorderRadiusMapping),
111
+ borderActive: createBorderPseudoHandler(UseStyledSystem_module_default["hop-b-active"], "--hop-b-active", BorderMapping),
112
+ borderFocus: createBorderPseudoHandler(UseStyledSystem_module_default["hop-b-focus"], "--hop-b-focus", BorderMapping),
113
+ borderHover: createBorderPseudoHandler(UseStyledSystem_module_default["hop-b-hover"], "--hop-b-hover", BorderMapping),
114
+ borderLeft: createBorderHandler(BorderMapping),
115
+ borderLeftActive: createBorderPseudoHandler(UseStyledSystem_module_default["hop-bl-active"], "--hop-bl-active", BorderMapping),
116
+ borderLeftFocus: createBorderPseudoHandler(UseStyledSystem_module_default["hop-bl-focus"], "--hop-bl-focus", BorderMapping),
117
+ borderLeftHover: createBorderPseudoHandler(UseStyledSystem_module_default["hop-bl-hover"], "--hop-bl-hover", BorderMapping),
118
+ borderRadius: createSystemValueHandler(BorderRadiusMapping),
119
+ borderRight: createBorderHandler(BorderMapping),
120
+ borderRightActive: createBorderPseudoHandler(UseStyledSystem_module_default["hop-br-active"], "--hop-br-active", BorderMapping),
121
+ borderRightFocus: createBorderPseudoHandler(UseStyledSystem_module_default["hop-br-focus"], "--hop-br-focus", BorderMapping),
122
+ borderRightHover: createBorderPseudoHandler(UseStyledSystem_module_default["hop-br-hover"], "--hop-br-hover", BorderMapping),
123
+ borderTop: createBorderHandler(BorderMapping),
124
+ borderTopActive: createBorderPseudoHandler(UseStyledSystem_module_default["hop-bt-active"], "--hop-bt-active", BorderMapping),
125
+ borderTopFocus: createBorderPseudoHandler(UseStyledSystem_module_default["hop-bt-focus"], "--hop-bt-focus", BorderMapping),
126
+ borderTopHover: createBorderPseudoHandler(UseStyledSystem_module_default["hop-bt-hover"], "--hop-bt-hover", BorderMapping),
127
+ borderTopLeftRadius: createSystemValueHandler(BorderRadiusMapping),
128
+ borderTopRightRadius: createSystemValueHandler(BorderRadiusMapping),
129
+ bottom: createPassthroughHandler(),
130
+ boxShadow: createSystemValueHandler(BoxShadowMapping),
131
+ boxShadowActive: createPseudoHandler(UseStyledSystem_module_default["hop-bs-active"], "--hop-bs-active", BoxShadowMapping),
132
+ boxShadowFocus: createPseudoHandler(UseStyledSystem_module_default["hop-bs-focus"], "--hop-bs-focus", BoxShadowMapping),
133
+ boxShadowHover: createPseudoHandler(UseStyledSystem_module_default["hop-bs-hover"], "--hop-bs-hover", BoxShadowMapping),
134
+ color: createSystemValueHandler(TextColorMapping),
135
+ colorActive: createPseudoHandler(UseStyledSystem_module_default["hop-c-active"], "--hop-c-active", TextColorMapping),
136
+ colorFocus: createPseudoHandler(UseStyledSystem_module_default["hop-c-focus"], "--hop-c-focus", TextColorMapping),
137
+ colorHover: createPseudoHandler(UseStyledSystem_module_default["hop-c-hover"], "--hop-c-hover", TextColorMapping),
138
+ columnGap: createSystemValueHandler(SimpleMarginMapping),
139
+ content: createPassthroughHandler(),
140
+ contentVisibility: createPassthroughHandler(),
141
+ cursor: createPassthroughHandler(),
142
+ cursorHover: createPseudoHandler(UseStyledSystem_module_default["hop-cs-hover"], "--hop-cs-hover"),
143
+ display: createPassthroughHandler(),
144
+ fill: createSystemValueHandler(IconColorMapping),
145
+ fillFocus: createPseudoHandler(UseStyledSystem_module_default["hop-f-focus"], "--hop-f-focus", IconColorMapping),
146
+ fillHover: createPseudoHandler(UseStyledSystem_module_default["hop-f-hover"], "--hop-f-hover", IconColorMapping),
147
+ filter: createPassthroughHandler(),
148
+ flex: createPassthroughHandler(),
149
+ flexBasis: createPassthroughHandler(),
150
+ flexDirection: createPassthroughHandler(),
151
+ flexFlow: createPassthroughHandler(),
152
+ flexGrow: createPassthroughHandler(),
153
+ flexShrink: createPassthroughHandler(),
154
+ flexWrap: createPassthroughHandler(),
155
+ fontFamily: createSystemValueHandler(FontFamilyMapping),
156
+ fontSize: createSystemValueHandler(FontSizeMapping),
157
+ fontStyle: createPassthroughHandler(),
158
+ fontWeight: createSystemValueHandler(FontWeightMapping),
159
+ gap: createSystemValueHandler(SimpleMarginMapping),
160
+ grid: createPassthroughHandler(),
161
+ gridArea: createPassthroughHandler(),
162
+ gridAutoColumns: createSystemValueHandler(SizingMapping),
163
+ gridAutoFlow: createPassthroughHandler(),
164
+ gridAutoRows: createSystemValueHandler(SizingMapping),
165
+ gridColumn: createPassthroughHandler(),
166
+ gridColumnEnd: createPassthroughHandler(),
167
+ gridColumnSpan: gridColumnSpanHandler,
168
+ gridColumnStart: createPassthroughHandler(),
169
+ gridRow: createPassthroughHandler(),
170
+ gridRowEnd: createPassthroughHandler(),
171
+ gridRowSpan: gridRowSpanHandler,
172
+ gridRowStart: createPassthroughHandler(),
173
+ gridTemplate: createPassthroughHandler(),
174
+ gridTemplateAreas: createPassthroughHandler(),
175
+ gridTemplateColumns: createSystemValueHandler(SizingMapping),
176
+ gridTemplateRows: createSystemValueHandler(SizingMapping),
177
+ height: createSystemValueHandler(SizingMapping),
178
+ justifyContent: createPassthroughHandler(),
179
+ justifyItems: createPassthroughHandler(),
180
+ justifySelf: createPassthroughHandler(),
181
+ left: createPassthroughHandler(),
182
+ letterSpacing: createPassthroughHandler(),
183
+ lineHeight: createSystemValueHandler(LineHeightMapping),
184
+ margin: createSystemValueHandler(ComplexMarginMapping),
185
+ marginBottom: createSystemValueHandler(SimpleMarginMapping),
186
+ marginLeft: createSystemValueHandler(SimpleMarginMapping),
187
+ marginRight: createSystemValueHandler(SimpleMarginMapping),
188
+ marginTop: createSystemValueHandler(SimpleMarginMapping),
189
+ marginX: createAxisHandler("marginLeft", "marginRight", SimpleMarginMapping),
190
+ marginY: createAxisHandler("marginBottom", "marginTop", SimpleMarginMapping),
191
+ maxHeight: createSystemValueHandler(SizingMapping),
192
+ maxWidth: createSystemValueHandler(SizingMapping),
193
+ minHeight: createSystemValueHandler(SizingMapping),
194
+ minWidth: createSystemValueHandler(SizingMapping),
195
+ objectFit: createPassthroughHandler(),
196
+ objectPosition: createPassthroughHandler(),
197
+ opacity: createPassthroughHandler(),
198
+ opacityActive: createPseudoHandler(UseStyledSystem_module_default["hop-o-active"], "hop-o-active"),
199
+ opacityFocus: createPseudoHandler(UseStyledSystem_module_default["hop-o-focus"], "hop-o-focus"),
200
+ opacityHover: createPseudoHandler(UseStyledSystem_module_default["hop-o-hover"], "hop-o-hover"),
201
+ order: createPassthroughHandler(),
202
+ outline: createPassthroughHandler(),
203
+ outlineFocus: createPseudoHandler(UseStyledSystem_module_default["hop-ol-focus"], "hop-ol-focus"),
204
+ overflow: createPassthroughHandler(),
205
+ overflowX: createPassthroughHandler(),
206
+ overflowY: createPassthroughHandler(),
207
+ padding: createSystemValueHandler(ComplexPaddingMapping),
208
+ paddingBottom: createSystemValueHandler(SimplePaddingMapping),
209
+ paddingLeft: createSystemValueHandler(SimplePaddingMapping),
210
+ paddingRight: createSystemValueHandler(SimplePaddingMapping),
211
+ paddingTop: createSystemValueHandler(SimplePaddingMapping),
212
+ paddingX: createAxisHandler("paddingLeft", "paddingRight", SimplePaddingMapping),
213
+ paddingY: createAxisHandler("paddingBottom", "paddingTop", SimplePaddingMapping),
214
+ pointerEvents: createPassthroughHandler(),
215
+ position: createPassthroughHandler(),
216
+ resize: createPassthroughHandler(),
217
+ right: createPassthroughHandler(),
218
+ rowGap: createSystemValueHandler(SimpleMarginMapping),
219
+ stroke: createSystemValueHandler(IconColorMapping),
220
+ textAlign: createPassthroughHandler(),
221
+ textDecoration: createPassthroughHandler(),
222
+ textOverflow: createPassthroughHandler(),
223
+ textTransform: createPassthroughHandler(),
224
+ top: createPassthroughHandler(),
225
+ transform: createPassthroughHandler(),
226
+ transformOrigin: createPassthroughHandler(),
227
+ transformStyle: createPassthroughHandler(),
228
+ verticalAlign: createPassthroughHandler(),
229
+ visibility: createPassthroughHandler(),
230
+ whiteSpace: createPassthroughHandler(),
231
+ width: createSystemValueHandler(SizingMapping),
232
+ willChange: createPassthroughHandler(),
233
+ wordBreak: createPassthroughHandler(),
234
+ zIndex: createPassthroughHandler()
235
+ };
236
+ function isStyledSystemProp(name) {
237
+ return !isNil(PropsHandlers[name]);
238
+ }
239
+ var _classes, _style;
240
+ var StylingContext = class {
241
+ constructor(className, style, matchedBreakpoints) {
242
+ __privateAdd(this, _classes, void 0);
243
+ __privateAdd(this, _style, void 0);
244
+ __publicField(this, "matchedBreakpoints");
245
+ __privateSet(this, _classes, !isNil(className) ? [className] : []);
246
+ __privateSet(this, _style, { ...style });
247
+ this.matchedBreakpoints = matchedBreakpoints;
248
+ }
249
+ addClass(className) {
250
+ if (!__privateGet(this, _classes).includes(className)) {
251
+ __privateGet(this, _classes).push(className);
252
+ }
253
+ return this;
254
+ }
255
+ addStyleValue(name, value) {
256
+ __privateGet(this, _style)[name] = value;
257
+ return this;
258
+ }
259
+ computeStyling() {
260
+ const className = __privateGet(this, _classes).length !== 0 ? __privateGet(this, _classes).join(" ") : void 0;
261
+ const styleValue = Object.keys(__privateGet(this, _style)).length !== 0 ? __privateGet(this, _style) : void 0;
262
+ return { className, style: styleValue };
263
+ }
264
+ };
265
+ _classes = new WeakMap();
266
+ _style = new WeakMap();
267
+ function useStyledSystem(props) {
268
+ const {
269
+ alignContent,
270
+ alignItems,
271
+ alignSelf,
272
+ aspectRatio,
273
+ backgroundColor,
274
+ backgroundColorActive,
275
+ backgroundColorFocus,
276
+ backgroundColorHover,
277
+ backgroundImage,
278
+ backgroundPosition,
279
+ backgroundRepeat,
280
+ backgroundSize,
281
+ border,
282
+ borderBottom,
283
+ borderBottomActive,
284
+ borderBottomFocus,
285
+ borderBottomHover,
286
+ borderBottomLeftRadius,
287
+ borderBottomRightRadius,
288
+ borderFocus,
289
+ borderHover,
290
+ borderActive,
291
+ borderLeft,
292
+ borderLeftActive,
293
+ borderLeftFocus,
294
+ borderLeftHover,
295
+ borderRadius,
296
+ borderRight,
297
+ borderRightActive,
298
+ borderRightFocus,
299
+ borderRightHover,
300
+ borderTop,
301
+ borderTopActive,
302
+ borderTopFocus,
303
+ borderTopHover,
304
+ borderTopLeftRadius,
305
+ borderTopRightRadius,
306
+ bottom,
307
+ boxShadow,
308
+ boxShadowActive,
309
+ boxShadowFocus,
310
+ boxShadowHover,
311
+ className,
312
+ color,
313
+ colorActive,
314
+ colorFocus,
315
+ colorHover,
316
+ columnGap,
317
+ content,
318
+ contentVisibility,
319
+ cursor,
320
+ cursorHover,
321
+ display,
322
+ fill,
323
+ fillFocus,
324
+ fillHover,
325
+ filter,
326
+ flex,
327
+ flexBasis,
328
+ flexDirection,
329
+ flexFlow,
330
+ flexGrow,
331
+ flexShrink,
332
+ flexWrap,
333
+ fontFamily,
334
+ fontSize,
335
+ fontStyle,
336
+ fontWeight,
337
+ gap,
338
+ grid,
339
+ gridArea,
340
+ gridAutoColumns,
341
+ gridAutoFlow,
342
+ gridAutoRows,
343
+ gridColumn,
344
+ gridColumnEnd,
345
+ gridColumnSpan,
346
+ gridColumnStart,
347
+ gridRow,
348
+ gridRowEnd,
349
+ gridRowSpan,
350
+ gridRowStart,
351
+ gridTemplate,
352
+ gridTemplateAreas,
353
+ gridTemplateColumns,
354
+ gridTemplateRows,
355
+ height,
356
+ justifyContent,
357
+ justifyItems,
358
+ justifySelf,
359
+ left,
360
+ letterSpacing,
361
+ lineHeight,
362
+ margin,
363
+ marginBottom,
364
+ marginLeft,
365
+ marginRight,
366
+ marginTop,
367
+ marginX,
368
+ marginY,
369
+ maxHeight,
370
+ maxWidth,
371
+ minHeight,
372
+ minWidth,
373
+ objectFit,
374
+ objectPosition,
375
+ opacity,
376
+ opacityActive,
377
+ opacityFocus,
378
+ opacityHover,
379
+ order,
380
+ outline,
381
+ outlineFocus,
382
+ overflow,
383
+ overflowX,
384
+ overflowY,
385
+ padding,
386
+ paddingBottom,
387
+ paddingLeft,
388
+ paddingRight,
389
+ paddingTop,
390
+ paddingX,
391
+ paddingY,
392
+ pointerEvents,
393
+ position,
394
+ resize,
395
+ right,
396
+ rowGap,
397
+ stroke,
398
+ style,
399
+ textAlign,
400
+ textDecoration,
401
+ textOverflow,
402
+ textTransform,
403
+ top,
404
+ transition,
405
+ transform,
406
+ transformOrigin,
407
+ transformStyle,
408
+ verticalAlign,
409
+ visibility,
410
+ whiteSpace,
411
+ width,
412
+ willChange,
413
+ wordBreak,
414
+ zIndex,
415
+ UNSAFE_backgroundColor,
416
+ UNSAFE_backgroundColorActive,
417
+ UNSAFE_backgroundColorFocus,
418
+ UNSAFE_backgroundColorHover,
419
+ UNSAFE_border,
420
+ UNSAFE_borderActive,
421
+ UNSAFE_borderBottom,
422
+ UNSAFE_borderBottomActive,
423
+ UNSAFE_borderBottomFocus,
424
+ UNSAFE_borderBottomHover,
425
+ UNSAFE_borderBottomLeftRadius,
426
+ UNSAFE_borderBottomRightRadius,
427
+ UNSAFE_borderFocus,
428
+ UNSAFE_borderHover,
429
+ UNSAFE_borderLeft,
430
+ UNSAFE_borderLeftActive,
431
+ UNSAFE_borderLeftFocus,
432
+ UNSAFE_borderLeftHover,
433
+ UNSAFE_borderRadius,
434
+ UNSAFE_borderRight,
435
+ UNSAFE_borderRightActive,
436
+ UNSAFE_borderRightFocus,
437
+ UNSAFE_borderRightHover,
438
+ UNSAFE_borderTop,
439
+ UNSAFE_borderTopActive,
440
+ UNSAFE_borderTopFocus,
441
+ UNSAFE_borderTopHover,
442
+ UNSAFE_borderTopLeftRadius,
443
+ UNSAFE_borderTopRightRadius,
444
+ UNSAFE_boxShadow,
445
+ UNSAFE_color,
446
+ UNSAFE_columnGap,
447
+ UNSAFE_fill,
448
+ UNSAFE_fontFamily,
449
+ UNSAFE_fontSize,
450
+ UNSAFE_fontWeight,
451
+ UNSAFE_gap,
452
+ UNSAFE_gridAutoColumns,
453
+ UNSAFE_gridAutoRows,
454
+ UNSAFE_gridTemplateColumns,
455
+ UNSAFE_gridTemplateRows,
456
+ UNSAFE_height,
457
+ UNSAFE_lineHeight,
458
+ UNSAFE_margin,
459
+ UNSAFE_marginBottom,
460
+ UNSAFE_marginLeft,
461
+ UNSAFE_marginRight,
462
+ UNSAFE_marginTop,
463
+ UNSAFE_marginX,
464
+ UNSAFE_marginY,
465
+ UNSAFE_maxHeight,
466
+ UNSAFE_maxWidth,
467
+ UNSAFE_minHeight,
468
+ UNSAFE_minWidth,
469
+ UNSAFE_padding,
470
+ UNSAFE_paddingBottom,
471
+ UNSAFE_paddingLeft,
472
+ UNSAFE_paddingRight,
473
+ UNSAFE_paddingTop,
474
+ UNSAFE_paddingX,
475
+ UNSAFE_paddingY,
476
+ UNSAFE_rowGap,
477
+ UNSAFE_stroke,
478
+ UNSAFE_width,
479
+ ...rest
480
+ } = props;
481
+ const { matchedBreakpoints } = useBreakpointContext();
482
+ const styling = useMemo(() => {
483
+ const context = new StylingContext(className, style, matchedBreakpoints);
484
+ Object.keys(props).forEach((key) => {
485
+ const value = props[key];
486
+ if (!isNil(value)) {
487
+ const cssProperty = key.replace(UnsafePrefix, "");
488
+ const handler = PropsHandlers[cssProperty];
489
+ if (!isNil(handler)) {
490
+ handler(cssProperty, value, context);
491
+ }
492
+ }
493
+ });
494
+ return context.computeStyling();
495
+ }, [
496
+ alignContent,
497
+ alignItems,
498
+ alignSelf,
499
+ aspectRatio,
500
+ backgroundColor,
501
+ backgroundColorActive,
502
+ backgroundColorFocus,
503
+ backgroundColorHover,
504
+ backgroundImage,
505
+ backgroundPosition,
506
+ backgroundRepeat,
507
+ backgroundSize,
508
+ border,
509
+ borderBottom,
510
+ borderBottomActive,
511
+ borderBottomFocus,
512
+ borderBottomHover,
513
+ borderLeft,
514
+ borderLeftActive,
515
+ borderLeftFocus,
516
+ borderLeftHover,
517
+ borderRight,
518
+ borderRightActive,
519
+ borderRightFocus,
520
+ borderRightHover,
521
+ borderTop,
522
+ borderTopActive,
523
+ borderTopFocus,
524
+ borderTopHover,
525
+ borderActive,
526
+ borderFocus,
527
+ borderHover,
528
+ borderRadius,
529
+ borderBottomLeftRadius,
530
+ borderBottomRightRadius,
531
+ borderTopLeftRadius,
532
+ borderTopRightRadius,
533
+ boxShadow,
534
+ boxShadowActive,
535
+ boxShadowFocus,
536
+ boxShadowHover,
537
+ bottom,
538
+ matchedBreakpoints,
539
+ className,
540
+ color,
541
+ colorActive,
542
+ colorFocus,
543
+ colorHover,
544
+ columnGap,
545
+ content,
546
+ contentVisibility,
547
+ cursor,
548
+ cursorHover,
549
+ display,
550
+ fill,
551
+ fillFocus,
552
+ fillHover,
553
+ filter,
554
+ flex,
555
+ flexBasis,
556
+ flexDirection,
557
+ flexFlow,
558
+ flexGrow,
559
+ flexShrink,
560
+ flexWrap,
561
+ fontFamily,
562
+ fontSize,
563
+ fontStyle,
564
+ fontWeight,
565
+ gap,
566
+ grid,
567
+ gridArea,
568
+ gridAutoColumns,
569
+ gridAutoFlow,
570
+ gridAutoRows,
571
+ gridColumn,
572
+ gridColumnEnd,
573
+ gridColumnSpan,
574
+ gridColumnStart,
575
+ gridRow,
576
+ gridRowEnd,
577
+ gridRowSpan,
578
+ gridRowStart,
579
+ gridTemplate,
580
+ gridTemplateAreas,
581
+ gridTemplateColumns,
582
+ gridTemplateRows,
583
+ height,
584
+ justifyContent,
585
+ justifyItems,
586
+ justifySelf,
587
+ left,
588
+ letterSpacing,
589
+ lineHeight,
590
+ margin,
591
+ marginBottom,
592
+ marginLeft,
593
+ marginRight,
594
+ marginTop,
595
+ marginX,
596
+ marginY,
597
+ maxHeight,
598
+ maxWidth,
599
+ minHeight,
600
+ minWidth,
601
+ objectFit,
602
+ objectPosition,
603
+ opacity,
604
+ opacityActive,
605
+ opacityFocus,
606
+ opacityHover,
607
+ order,
608
+ outline,
609
+ outlineFocus,
610
+ overflow,
611
+ overflowX,
612
+ overflowY,
613
+ padding,
614
+ paddingBottom,
615
+ paddingLeft,
616
+ paddingRight,
617
+ paddingTop,
618
+ paddingX,
619
+ paddingY,
620
+ pointerEvents,
621
+ position,
622
+ resize,
623
+ right,
624
+ rowGap,
625
+ stroke,
626
+ style,
627
+ textAlign,
628
+ textDecoration,
629
+ textOverflow,
630
+ textTransform,
631
+ top,
632
+ transition,
633
+ transform,
634
+ transformOrigin,
635
+ transformStyle,
636
+ verticalAlign,
637
+ visibility,
638
+ whiteSpace,
639
+ width,
640
+ willChange,
641
+ wordBreak,
642
+ zIndex,
643
+ UNSAFE_backgroundColor,
644
+ UNSAFE_backgroundColorActive,
645
+ UNSAFE_backgroundColorFocus,
646
+ UNSAFE_backgroundColorHover,
647
+ UNSAFE_border,
648
+ UNSAFE_borderActive,
649
+ UNSAFE_borderBottom,
650
+ UNSAFE_borderBottomActive,
651
+ UNSAFE_borderBottomFocus,
652
+ UNSAFE_borderBottomHover,
653
+ UNSAFE_borderBottomLeftRadius,
654
+ UNSAFE_borderBottomRightRadius,
655
+ UNSAFE_borderFocus,
656
+ UNSAFE_borderHover,
657
+ UNSAFE_borderLeft,
658
+ UNSAFE_borderLeftActive,
659
+ UNSAFE_borderLeftFocus,
660
+ UNSAFE_borderLeftHover,
661
+ UNSAFE_borderRadius,
662
+ UNSAFE_borderRight,
663
+ UNSAFE_borderRightActive,
664
+ UNSAFE_borderRightFocus,
665
+ UNSAFE_borderRightHover,
666
+ UNSAFE_borderTop,
667
+ UNSAFE_borderTopActive,
668
+ UNSAFE_borderTopFocus,
669
+ UNSAFE_borderTopHover,
670
+ UNSAFE_borderTopLeftRadius,
671
+ UNSAFE_borderTopRightRadius,
672
+ UNSAFE_boxShadow,
673
+ UNSAFE_color,
674
+ UNSAFE_columnGap,
675
+ UNSAFE_fill,
676
+ UNSAFE_fontFamily,
677
+ UNSAFE_fontSize,
678
+ UNSAFE_fontWeight,
679
+ UNSAFE_gap,
680
+ UNSAFE_gridAutoColumns,
681
+ UNSAFE_gridAutoRows,
682
+ UNSAFE_gridTemplateColumns,
683
+ UNSAFE_gridTemplateRows,
684
+ UNSAFE_height,
685
+ UNSAFE_lineHeight,
686
+ UNSAFE_margin,
687
+ UNSAFE_marginBottom,
688
+ UNSAFE_marginLeft,
689
+ UNSAFE_marginRight,
690
+ UNSAFE_marginTop,
691
+ UNSAFE_marginX,
692
+ UNSAFE_marginY,
693
+ UNSAFE_maxHeight,
694
+ UNSAFE_maxWidth,
695
+ UNSAFE_minHeight,
696
+ UNSAFE_minWidth,
697
+ UNSAFE_padding,
698
+ UNSAFE_paddingBottom,
699
+ UNSAFE_paddingLeft,
700
+ UNSAFE_paddingRight,
701
+ UNSAFE_paddingTop,
702
+ UNSAFE_paddingX,
703
+ UNSAFE_paddingY,
704
+ UNSAFE_rowGap,
705
+ UNSAFE_stroke,
706
+ UNSAFE_width
707
+ ]);
708
+ return {
709
+ ...rest,
710
+ className: styling.className,
711
+ style: styling.style
712
+ };
713
+ }
714
+
715
+ export { isStyledSystemProp, useStyledSystem };