@react-spectrum/utils 3.11.6 → 3.11.8
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/dist/BreakpointProvider.main.js +7 -7
- package/dist/BreakpointProvider.mjs +8 -8
- package/dist/BreakpointProvider.module.js +7 -7
- package/dist/Slots.main.js +1 -1
- package/dist/Slots.mjs +2 -2
- package/dist/Slots.module.js +1 -1
- package/dist/classNames.main.js +2 -2
- package/dist/classNames.mjs +3 -3
- package/dist/classNames.module.js +2 -2
- package/dist/getWrappedElement.main.js +1 -1
- package/dist/getWrappedElement.mjs +2 -2
- package/dist/getWrappedElement.module.js +1 -1
- package/dist/styleProps.main.js +103 -103
- package/dist/styleProps.mjs +104 -104
- package/dist/styleProps.module.js +103 -103
- package/dist/types.d.ts +9 -9
- package/dist/types.d.ts.map +1 -1
- package/dist/useDOMRef.main.js.map +1 -1
- package/dist/useDOMRef.mjs +1 -1
- package/dist/useDOMRef.module.js.map +1 -1
- package/dist/useHasChild.main.js +1 -1
- package/dist/useHasChild.main.js.map +1 -1
- package/dist/useHasChild.mjs +2 -2
- package/dist/useHasChild.module.js +1 -1
- package/dist/useHasChild.module.js.map +1 -1
- package/dist/useIsMobileDevice.main.js +1 -1
- package/dist/useIsMobileDevice.mjs +2 -2
- package/dist/useIsMobileDevice.module.js +1 -1
- package/dist/useMediaQuery.main.js +1 -1
- package/dist/useMediaQuery.mjs +2 -2
- package/dist/useMediaQuery.module.js +1 -1
- package/package.json +7 -7
- package/src/useDOMRef.ts +8 -8
- package/src/useHasChild.ts +3 -2
package/dist/styleProps.mjs
CHANGED
|
@@ -15,384 +15,384 @@ import {useLocale as $9Di9g$useLocale} from "@react-aria/i18n";
|
|
|
15
15
|
|
|
16
16
|
const $380ed8f3903c3931$export$fe9c6e915565b4e8 = {
|
|
17
17
|
margin: [
|
|
18
|
-
|
|
18
|
+
'margin',
|
|
19
19
|
$380ed8f3903c3931$export$abc24f5b99744ea6
|
|
20
20
|
],
|
|
21
21
|
marginStart: [
|
|
22
|
-
$380ed8f3903c3931$var$rtl(
|
|
22
|
+
$380ed8f3903c3931$var$rtl('marginLeft', 'marginRight'),
|
|
23
23
|
$380ed8f3903c3931$export$abc24f5b99744ea6
|
|
24
24
|
],
|
|
25
25
|
marginEnd: [
|
|
26
|
-
$380ed8f3903c3931$var$rtl(
|
|
26
|
+
$380ed8f3903c3931$var$rtl('marginRight', 'marginLeft'),
|
|
27
27
|
$380ed8f3903c3931$export$abc24f5b99744ea6
|
|
28
28
|
],
|
|
29
29
|
// marginLeft: ['marginLeft', dimensionValue],
|
|
30
30
|
// marginRight: ['marginRight', dimensionValue],
|
|
31
31
|
marginTop: [
|
|
32
|
-
|
|
32
|
+
'marginTop',
|
|
33
33
|
$380ed8f3903c3931$export$abc24f5b99744ea6
|
|
34
34
|
],
|
|
35
35
|
marginBottom: [
|
|
36
|
-
|
|
36
|
+
'marginBottom',
|
|
37
37
|
$380ed8f3903c3931$export$abc24f5b99744ea6
|
|
38
38
|
],
|
|
39
39
|
marginX: [
|
|
40
40
|
[
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
'marginLeft',
|
|
42
|
+
'marginRight'
|
|
43
43
|
],
|
|
44
44
|
$380ed8f3903c3931$export$abc24f5b99744ea6
|
|
45
45
|
],
|
|
46
46
|
marginY: [
|
|
47
47
|
[
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
'marginTop',
|
|
49
|
+
'marginBottom'
|
|
50
50
|
],
|
|
51
51
|
$380ed8f3903c3931$export$abc24f5b99744ea6
|
|
52
52
|
],
|
|
53
53
|
width: [
|
|
54
|
-
|
|
54
|
+
'width',
|
|
55
55
|
$380ed8f3903c3931$export$abc24f5b99744ea6
|
|
56
56
|
],
|
|
57
57
|
height: [
|
|
58
|
-
|
|
58
|
+
'height',
|
|
59
59
|
$380ed8f3903c3931$export$abc24f5b99744ea6
|
|
60
60
|
],
|
|
61
61
|
minWidth: [
|
|
62
|
-
|
|
62
|
+
'minWidth',
|
|
63
63
|
$380ed8f3903c3931$export$abc24f5b99744ea6
|
|
64
64
|
],
|
|
65
65
|
minHeight: [
|
|
66
|
-
|
|
66
|
+
'minHeight',
|
|
67
67
|
$380ed8f3903c3931$export$abc24f5b99744ea6
|
|
68
68
|
],
|
|
69
69
|
maxWidth: [
|
|
70
|
-
|
|
70
|
+
'maxWidth',
|
|
71
71
|
$380ed8f3903c3931$export$abc24f5b99744ea6
|
|
72
72
|
],
|
|
73
73
|
maxHeight: [
|
|
74
|
-
|
|
74
|
+
'maxHeight',
|
|
75
75
|
$380ed8f3903c3931$export$abc24f5b99744ea6
|
|
76
76
|
],
|
|
77
77
|
isHidden: [
|
|
78
|
-
|
|
78
|
+
'display',
|
|
79
79
|
$380ed8f3903c3931$var$hiddenValue
|
|
80
80
|
],
|
|
81
81
|
alignSelf: [
|
|
82
|
-
|
|
82
|
+
'alignSelf',
|
|
83
83
|
$380ed8f3903c3931$export$46b6c81d11d2c30a
|
|
84
84
|
],
|
|
85
85
|
justifySelf: [
|
|
86
|
-
|
|
86
|
+
'justifySelf',
|
|
87
87
|
$380ed8f3903c3931$export$46b6c81d11d2c30a
|
|
88
88
|
],
|
|
89
89
|
position: [
|
|
90
|
-
|
|
90
|
+
'position',
|
|
91
91
|
$380ed8f3903c3931$var$anyValue
|
|
92
92
|
],
|
|
93
93
|
zIndex: [
|
|
94
|
-
|
|
94
|
+
'zIndex',
|
|
95
95
|
$380ed8f3903c3931$var$anyValue
|
|
96
96
|
],
|
|
97
97
|
top: [
|
|
98
|
-
|
|
98
|
+
'top',
|
|
99
99
|
$380ed8f3903c3931$export$abc24f5b99744ea6
|
|
100
100
|
],
|
|
101
101
|
bottom: [
|
|
102
|
-
|
|
102
|
+
'bottom',
|
|
103
103
|
$380ed8f3903c3931$export$abc24f5b99744ea6
|
|
104
104
|
],
|
|
105
105
|
start: [
|
|
106
|
-
$380ed8f3903c3931$var$rtl(
|
|
106
|
+
$380ed8f3903c3931$var$rtl('left', 'right'),
|
|
107
107
|
$380ed8f3903c3931$export$abc24f5b99744ea6
|
|
108
108
|
],
|
|
109
109
|
end: [
|
|
110
|
-
$380ed8f3903c3931$var$rtl(
|
|
110
|
+
$380ed8f3903c3931$var$rtl('right', 'left'),
|
|
111
111
|
$380ed8f3903c3931$export$abc24f5b99744ea6
|
|
112
112
|
],
|
|
113
113
|
left: [
|
|
114
|
-
|
|
114
|
+
'left',
|
|
115
115
|
$380ed8f3903c3931$export$abc24f5b99744ea6
|
|
116
116
|
],
|
|
117
117
|
right: [
|
|
118
|
-
|
|
118
|
+
'right',
|
|
119
119
|
$380ed8f3903c3931$export$abc24f5b99744ea6
|
|
120
120
|
],
|
|
121
121
|
order: [
|
|
122
|
-
|
|
122
|
+
'order',
|
|
123
123
|
$380ed8f3903c3931$var$anyValue
|
|
124
124
|
],
|
|
125
125
|
flex: [
|
|
126
|
-
|
|
126
|
+
'flex',
|
|
127
127
|
$380ed8f3903c3931$var$flexValue
|
|
128
128
|
],
|
|
129
129
|
flexGrow: [
|
|
130
|
-
|
|
130
|
+
'flexGrow',
|
|
131
131
|
$380ed8f3903c3931$export$46b6c81d11d2c30a
|
|
132
132
|
],
|
|
133
133
|
flexShrink: [
|
|
134
|
-
|
|
134
|
+
'flexShrink',
|
|
135
135
|
$380ed8f3903c3931$export$46b6c81d11d2c30a
|
|
136
136
|
],
|
|
137
137
|
flexBasis: [
|
|
138
|
-
|
|
138
|
+
'flexBasis',
|
|
139
139
|
$380ed8f3903c3931$export$46b6c81d11d2c30a
|
|
140
140
|
],
|
|
141
141
|
gridArea: [
|
|
142
|
-
|
|
142
|
+
'gridArea',
|
|
143
143
|
$380ed8f3903c3931$export$46b6c81d11d2c30a
|
|
144
144
|
],
|
|
145
145
|
gridColumn: [
|
|
146
|
-
|
|
146
|
+
'gridColumn',
|
|
147
147
|
$380ed8f3903c3931$export$46b6c81d11d2c30a
|
|
148
148
|
],
|
|
149
149
|
gridColumnEnd: [
|
|
150
|
-
|
|
150
|
+
'gridColumnEnd',
|
|
151
151
|
$380ed8f3903c3931$export$46b6c81d11d2c30a
|
|
152
152
|
],
|
|
153
153
|
gridColumnStart: [
|
|
154
|
-
|
|
154
|
+
'gridColumnStart',
|
|
155
155
|
$380ed8f3903c3931$export$46b6c81d11d2c30a
|
|
156
156
|
],
|
|
157
157
|
gridRow: [
|
|
158
|
-
|
|
158
|
+
'gridRow',
|
|
159
159
|
$380ed8f3903c3931$export$46b6c81d11d2c30a
|
|
160
160
|
],
|
|
161
161
|
gridRowEnd: [
|
|
162
|
-
|
|
162
|
+
'gridRowEnd',
|
|
163
163
|
$380ed8f3903c3931$export$46b6c81d11d2c30a
|
|
164
164
|
],
|
|
165
165
|
gridRowStart: [
|
|
166
|
-
|
|
166
|
+
'gridRowStart',
|
|
167
167
|
$380ed8f3903c3931$export$46b6c81d11d2c30a
|
|
168
168
|
]
|
|
169
169
|
};
|
|
170
170
|
const $380ed8f3903c3931$export$e0705d1a55f297c = {
|
|
171
171
|
...$380ed8f3903c3931$export$fe9c6e915565b4e8,
|
|
172
172
|
backgroundColor: [
|
|
173
|
-
|
|
173
|
+
'backgroundColor',
|
|
174
174
|
$380ed8f3903c3931$var$backgroundColorValue
|
|
175
175
|
],
|
|
176
176
|
borderWidth: [
|
|
177
|
-
|
|
177
|
+
'borderWidth',
|
|
178
178
|
$380ed8f3903c3931$var$borderSizeValue
|
|
179
179
|
],
|
|
180
180
|
borderStartWidth: [
|
|
181
|
-
$380ed8f3903c3931$var$rtl(
|
|
181
|
+
$380ed8f3903c3931$var$rtl('borderLeftWidth', 'borderRightWidth'),
|
|
182
182
|
$380ed8f3903c3931$var$borderSizeValue
|
|
183
183
|
],
|
|
184
184
|
borderEndWidth: [
|
|
185
|
-
$380ed8f3903c3931$var$rtl(
|
|
185
|
+
$380ed8f3903c3931$var$rtl('borderRightWidth', 'borderLeftWidth'),
|
|
186
186
|
$380ed8f3903c3931$var$borderSizeValue
|
|
187
187
|
],
|
|
188
188
|
borderLeftWidth: [
|
|
189
|
-
|
|
189
|
+
'borderLeftWidth',
|
|
190
190
|
$380ed8f3903c3931$var$borderSizeValue
|
|
191
191
|
],
|
|
192
192
|
borderRightWidth: [
|
|
193
|
-
|
|
193
|
+
'borderRightWidth',
|
|
194
194
|
$380ed8f3903c3931$var$borderSizeValue
|
|
195
195
|
],
|
|
196
196
|
borderTopWidth: [
|
|
197
|
-
|
|
197
|
+
'borderTopWidth',
|
|
198
198
|
$380ed8f3903c3931$var$borderSizeValue
|
|
199
199
|
],
|
|
200
200
|
borderBottomWidth: [
|
|
201
|
-
|
|
201
|
+
'borderBottomWidth',
|
|
202
202
|
$380ed8f3903c3931$var$borderSizeValue
|
|
203
203
|
],
|
|
204
204
|
borderXWidth: [
|
|
205
205
|
[
|
|
206
|
-
|
|
207
|
-
|
|
206
|
+
'borderLeftWidth',
|
|
207
|
+
'borderRightWidth'
|
|
208
208
|
],
|
|
209
209
|
$380ed8f3903c3931$var$borderSizeValue
|
|
210
210
|
],
|
|
211
211
|
borderYWidth: [
|
|
212
212
|
[
|
|
213
|
-
|
|
214
|
-
|
|
213
|
+
'borderTopWidth',
|
|
214
|
+
'borderBottomWidth'
|
|
215
215
|
],
|
|
216
216
|
$380ed8f3903c3931$var$borderSizeValue
|
|
217
217
|
],
|
|
218
218
|
borderColor: [
|
|
219
|
-
|
|
219
|
+
'borderColor',
|
|
220
220
|
$380ed8f3903c3931$var$borderColorValue
|
|
221
221
|
],
|
|
222
222
|
borderStartColor: [
|
|
223
|
-
$380ed8f3903c3931$var$rtl(
|
|
223
|
+
$380ed8f3903c3931$var$rtl('borderLeftColor', 'borderRightColor'),
|
|
224
224
|
$380ed8f3903c3931$var$borderColorValue
|
|
225
225
|
],
|
|
226
226
|
borderEndColor: [
|
|
227
|
-
$380ed8f3903c3931$var$rtl(
|
|
227
|
+
$380ed8f3903c3931$var$rtl('borderRightColor', 'borderLeftColor'),
|
|
228
228
|
$380ed8f3903c3931$var$borderColorValue
|
|
229
229
|
],
|
|
230
230
|
borderLeftColor: [
|
|
231
|
-
|
|
231
|
+
'borderLeftColor',
|
|
232
232
|
$380ed8f3903c3931$var$borderColorValue
|
|
233
233
|
],
|
|
234
234
|
borderRightColor: [
|
|
235
|
-
|
|
235
|
+
'borderRightColor',
|
|
236
236
|
$380ed8f3903c3931$var$borderColorValue
|
|
237
237
|
],
|
|
238
238
|
borderTopColor: [
|
|
239
|
-
|
|
239
|
+
'borderTopColor',
|
|
240
240
|
$380ed8f3903c3931$var$borderColorValue
|
|
241
241
|
],
|
|
242
242
|
borderBottomColor: [
|
|
243
|
-
|
|
243
|
+
'borderBottomColor',
|
|
244
244
|
$380ed8f3903c3931$var$borderColorValue
|
|
245
245
|
],
|
|
246
246
|
borderXColor: [
|
|
247
247
|
[
|
|
248
|
-
|
|
249
|
-
|
|
248
|
+
'borderLeftColor',
|
|
249
|
+
'borderRightColor'
|
|
250
250
|
],
|
|
251
251
|
$380ed8f3903c3931$var$borderColorValue
|
|
252
252
|
],
|
|
253
253
|
borderYColor: [
|
|
254
254
|
[
|
|
255
|
-
|
|
256
|
-
|
|
255
|
+
'borderTopColor',
|
|
256
|
+
'borderBottomColor'
|
|
257
257
|
],
|
|
258
258
|
$380ed8f3903c3931$var$borderColorValue
|
|
259
259
|
],
|
|
260
260
|
borderRadius: [
|
|
261
|
-
|
|
261
|
+
'borderRadius',
|
|
262
262
|
$380ed8f3903c3931$var$borderRadiusValue
|
|
263
263
|
],
|
|
264
264
|
borderTopStartRadius: [
|
|
265
|
-
$380ed8f3903c3931$var$rtl(
|
|
265
|
+
$380ed8f3903c3931$var$rtl('borderTopLeftRadius', 'borderTopRightRadius'),
|
|
266
266
|
$380ed8f3903c3931$var$borderRadiusValue
|
|
267
267
|
],
|
|
268
268
|
borderTopEndRadius: [
|
|
269
|
-
$380ed8f3903c3931$var$rtl(
|
|
269
|
+
$380ed8f3903c3931$var$rtl('borderTopRightRadius', 'borderTopLeftRadius'),
|
|
270
270
|
$380ed8f3903c3931$var$borderRadiusValue
|
|
271
271
|
],
|
|
272
272
|
borderBottomStartRadius: [
|
|
273
|
-
$380ed8f3903c3931$var$rtl(
|
|
273
|
+
$380ed8f3903c3931$var$rtl('borderBottomLeftRadius', 'borderBottomRightRadius'),
|
|
274
274
|
$380ed8f3903c3931$var$borderRadiusValue
|
|
275
275
|
],
|
|
276
276
|
borderBottomEndRadius: [
|
|
277
|
-
$380ed8f3903c3931$var$rtl(
|
|
277
|
+
$380ed8f3903c3931$var$rtl('borderBottomRightRadius', 'borderBottomLeftRadius'),
|
|
278
278
|
$380ed8f3903c3931$var$borderRadiusValue
|
|
279
279
|
],
|
|
280
280
|
borderTopLeftRadius: [
|
|
281
|
-
|
|
281
|
+
'borderTopLeftRadius',
|
|
282
282
|
$380ed8f3903c3931$var$borderRadiusValue
|
|
283
283
|
],
|
|
284
284
|
borderTopRightRadius: [
|
|
285
|
-
|
|
285
|
+
'borderTopRightRadius',
|
|
286
286
|
$380ed8f3903c3931$var$borderRadiusValue
|
|
287
287
|
],
|
|
288
288
|
borderBottomLeftRadius: [
|
|
289
|
-
|
|
289
|
+
'borderBottomLeftRadius',
|
|
290
290
|
$380ed8f3903c3931$var$borderRadiusValue
|
|
291
291
|
],
|
|
292
292
|
borderBottomRightRadius: [
|
|
293
|
-
|
|
293
|
+
'borderBottomRightRadius',
|
|
294
294
|
$380ed8f3903c3931$var$borderRadiusValue
|
|
295
295
|
],
|
|
296
296
|
padding: [
|
|
297
|
-
|
|
297
|
+
'padding',
|
|
298
298
|
$380ed8f3903c3931$export$abc24f5b99744ea6
|
|
299
299
|
],
|
|
300
300
|
paddingStart: [
|
|
301
|
-
$380ed8f3903c3931$var$rtl(
|
|
301
|
+
$380ed8f3903c3931$var$rtl('paddingLeft', 'paddingRight'),
|
|
302
302
|
$380ed8f3903c3931$export$abc24f5b99744ea6
|
|
303
303
|
],
|
|
304
304
|
paddingEnd: [
|
|
305
|
-
$380ed8f3903c3931$var$rtl(
|
|
305
|
+
$380ed8f3903c3931$var$rtl('paddingRight', 'paddingLeft'),
|
|
306
306
|
$380ed8f3903c3931$export$abc24f5b99744ea6
|
|
307
307
|
],
|
|
308
308
|
paddingLeft: [
|
|
309
|
-
|
|
309
|
+
'paddingLeft',
|
|
310
310
|
$380ed8f3903c3931$export$abc24f5b99744ea6
|
|
311
311
|
],
|
|
312
312
|
paddingRight: [
|
|
313
|
-
|
|
313
|
+
'paddingRight',
|
|
314
314
|
$380ed8f3903c3931$export$abc24f5b99744ea6
|
|
315
315
|
],
|
|
316
316
|
paddingTop: [
|
|
317
|
-
|
|
317
|
+
'paddingTop',
|
|
318
318
|
$380ed8f3903c3931$export$abc24f5b99744ea6
|
|
319
319
|
],
|
|
320
320
|
paddingBottom: [
|
|
321
|
-
|
|
321
|
+
'paddingBottom',
|
|
322
322
|
$380ed8f3903c3931$export$abc24f5b99744ea6
|
|
323
323
|
],
|
|
324
324
|
paddingX: [
|
|
325
325
|
[
|
|
326
|
-
|
|
327
|
-
|
|
326
|
+
'paddingLeft',
|
|
327
|
+
'paddingRight'
|
|
328
328
|
],
|
|
329
329
|
$380ed8f3903c3931$export$abc24f5b99744ea6
|
|
330
330
|
],
|
|
331
331
|
paddingY: [
|
|
332
332
|
[
|
|
333
|
-
|
|
334
|
-
|
|
333
|
+
'paddingTop',
|
|
334
|
+
'paddingBottom'
|
|
335
335
|
],
|
|
336
336
|
$380ed8f3903c3931$export$abc24f5b99744ea6
|
|
337
337
|
],
|
|
338
338
|
overflow: [
|
|
339
|
-
|
|
339
|
+
'overflow',
|
|
340
340
|
$380ed8f3903c3931$export$46b6c81d11d2c30a
|
|
341
341
|
]
|
|
342
342
|
};
|
|
343
343
|
const $380ed8f3903c3931$var$borderStyleProps = {
|
|
344
|
-
borderWidth:
|
|
345
|
-
borderLeftWidth:
|
|
346
|
-
borderRightWidth:
|
|
347
|
-
borderTopWidth:
|
|
348
|
-
borderBottomWidth:
|
|
344
|
+
borderWidth: 'borderStyle',
|
|
345
|
+
borderLeftWidth: 'borderLeftStyle',
|
|
346
|
+
borderRightWidth: 'borderRightStyle',
|
|
347
|
+
borderTopWidth: 'borderTopStyle',
|
|
348
|
+
borderBottomWidth: 'borderBottomStyle'
|
|
349
349
|
};
|
|
350
350
|
function $380ed8f3903c3931$var$rtl(ltr, rtl) {
|
|
351
|
-
return (direction)=>direction ===
|
|
351
|
+
return (direction)=>direction === 'rtl' ? rtl : ltr;
|
|
352
352
|
}
|
|
353
353
|
const $380ed8f3903c3931$var$UNIT_RE = /(%|px|em|rem|vw|vh|auto|cm|mm|in|pt|pc|ex|ch|rem|vmin|vmax|fr)$/;
|
|
354
354
|
const $380ed8f3903c3931$var$FUNC_RE = /^\s*\w+\(/;
|
|
355
355
|
const $380ed8f3903c3931$var$SPECTRUM_VARIABLE_RE = /(static-)?size-\d+|single-line-(height|width)/g;
|
|
356
356
|
function $380ed8f3903c3931$export$abc24f5b99744ea6(value) {
|
|
357
|
-
if (typeof value ===
|
|
357
|
+
if (typeof value === 'number') return value + 'px';
|
|
358
358
|
if (!value) return undefined;
|
|
359
359
|
if ($380ed8f3903c3931$var$UNIT_RE.test(value)) return value;
|
|
360
|
-
if ($380ed8f3903c3931$var$FUNC_RE.test(value)) return value.replace($380ed8f3903c3931$var$SPECTRUM_VARIABLE_RE,
|
|
360
|
+
if ($380ed8f3903c3931$var$FUNC_RE.test(value)) return value.replace($380ed8f3903c3931$var$SPECTRUM_VARIABLE_RE, 'var(--spectrum-global-dimension-$&, var(--spectrum-alias-$&))');
|
|
361
361
|
return `var(--spectrum-global-dimension-${value}, var(--spectrum-alias-${value}))`;
|
|
362
362
|
}
|
|
363
363
|
function $380ed8f3903c3931$export$f348bec194f2e6b5(value, matchedBreakpoints) {
|
|
364
364
|
value = $380ed8f3903c3931$export$52dbfdbe1b2c3541(value, matchedBreakpoints);
|
|
365
365
|
return $380ed8f3903c3931$export$abc24f5b99744ea6(value);
|
|
366
366
|
}
|
|
367
|
-
function $380ed8f3903c3931$var$colorValue(value, type =
|
|
367
|
+
function $380ed8f3903c3931$var$colorValue(value, type = 'default', version = 5) {
|
|
368
368
|
if (version > 5) return `var(--spectrum-${value}, var(--spectrum-semantic-${value}-color-${type}))`;
|
|
369
369
|
return `var(--spectrum-legacy-color-${value}, var(--spectrum-global-color-${value}, var(--spectrum-semantic-${value}-color-${type})))`;
|
|
370
370
|
}
|
|
371
371
|
function $380ed8f3903c3931$var$backgroundColorValue(value, version = 5) {
|
|
372
372
|
if (!value) return undefined;
|
|
373
|
-
return `var(--spectrum-alias-background-color-${value}, ${$380ed8f3903c3931$var$colorValue(value,
|
|
373
|
+
return `var(--spectrum-alias-background-color-${value}, ${$380ed8f3903c3931$var$colorValue(value, 'background', version)})`;
|
|
374
374
|
}
|
|
375
375
|
function $380ed8f3903c3931$var$borderColorValue(value, version = 5) {
|
|
376
376
|
if (!value) return undefined;
|
|
377
|
-
if (value ===
|
|
378
|
-
return `var(--spectrum-alias-border-color-${value}, ${$380ed8f3903c3931$var$colorValue(value,
|
|
377
|
+
if (value === 'default') return 'var(--spectrum-alias-border-color)';
|
|
378
|
+
return `var(--spectrum-alias-border-color-${value}, ${$380ed8f3903c3931$var$colorValue(value, 'border', version)})`;
|
|
379
379
|
}
|
|
380
380
|
function $380ed8f3903c3931$var$borderSizeValue(value) {
|
|
381
|
-
return value && value !==
|
|
381
|
+
return value && value !== 'none' ? `var(--spectrum-alias-border-size-${value})` : '0';
|
|
382
382
|
}
|
|
383
383
|
function $380ed8f3903c3931$var$borderRadiusValue(value) {
|
|
384
384
|
if (!value) return undefined;
|
|
385
385
|
return `var(--spectrum-alias-border-radius-${value})`;
|
|
386
386
|
}
|
|
387
387
|
function $380ed8f3903c3931$var$hiddenValue(value) {
|
|
388
|
-
return value ?
|
|
388
|
+
return value ? 'none' : undefined;
|
|
389
389
|
}
|
|
390
390
|
function $380ed8f3903c3931$var$anyValue(value) {
|
|
391
391
|
return value;
|
|
392
392
|
}
|
|
393
393
|
function $380ed8f3903c3931$var$flexValue(value) {
|
|
394
|
-
if (typeof value ===
|
|
395
|
-
return
|
|
394
|
+
if (typeof value === 'boolean') return value ? '1' : undefined;
|
|
395
|
+
return '' + value;
|
|
396
396
|
}
|
|
397
397
|
function $380ed8f3903c3931$export$f3c39bb9534218d0(props, handlers, direction, matchedBreakpoints) {
|
|
398
398
|
let style = {};
|
|
@@ -400,15 +400,15 @@ function $380ed8f3903c3931$export$f3c39bb9534218d0(props, handlers, direction, m
|
|
|
400
400
|
let styleProp = handlers[key];
|
|
401
401
|
if (!styleProp || props[key] == null) continue;
|
|
402
402
|
let [name, convert] = styleProp;
|
|
403
|
-
if (typeof name ===
|
|
403
|
+
if (typeof name === 'function') name = name(direction);
|
|
404
404
|
let prop = $380ed8f3903c3931$export$52dbfdbe1b2c3541(props[key], matchedBreakpoints);
|
|
405
405
|
let value = convert(prop, props.colorVersion);
|
|
406
406
|
if (Array.isArray(name)) for (let k of name)style[k] = value;
|
|
407
407
|
else style[name] = value;
|
|
408
408
|
}
|
|
409
409
|
for(let prop in $380ed8f3903c3931$var$borderStyleProps)if (style[prop]) {
|
|
410
|
-
style[$380ed8f3903c3931$var$borderStyleProps[prop]] =
|
|
411
|
-
style.boxSizing =
|
|
410
|
+
style[$380ed8f3903c3931$var$borderStyleProps[prop]] = 'solid';
|
|
411
|
+
style.boxSizing = 'border-box';
|
|
412
412
|
}
|
|
413
413
|
return style;
|
|
414
414
|
}
|
|
@@ -417,7 +417,7 @@ function $380ed8f3903c3931$export$b8e6fb9d2dff3f41(props, handlers = $380ed8f390
|
|
|
417
417
|
let breakpointProvider = (0, $1051245f87c5981d$export$199d6754bdf4e1e3)();
|
|
418
418
|
let { direction: direction } = (0, $9Di9g$useLocale)();
|
|
419
419
|
let { matchedBreakpoints: matchedBreakpoints = (breakpointProvider === null || breakpointProvider === void 0 ? void 0 : breakpointProvider.matchedBreakpoints) || [
|
|
420
|
-
|
|
420
|
+
'base'
|
|
421
421
|
] } = options;
|
|
422
422
|
let styles = $380ed8f3903c3931$export$f3c39bb9534218d0(props, handlers, direction, matchedBreakpoints);
|
|
423
423
|
let style = {
|
|
@@ -441,7 +441,7 @@ function $380ed8f3903c3931$export$46b6c81d11d2c30a(value) {
|
|
|
441
441
|
return value;
|
|
442
442
|
}
|
|
443
443
|
function $380ed8f3903c3931$export$52dbfdbe1b2c3541(prop, matchedBreakpoints) {
|
|
444
|
-
if (prop && typeof prop ===
|
|
444
|
+
if (prop && typeof prop === 'object' && !Array.isArray(prop)) {
|
|
445
445
|
for(let i = 0; i < matchedBreakpoints.length; i++){
|
|
446
446
|
let breakpoint = matchedBreakpoints[i];
|
|
447
447
|
if (prop[breakpoint] != null) return prop[breakpoint];
|
|
@@ -453,4 +453,4 @@ function $380ed8f3903c3931$export$52dbfdbe1b2c3541(prop, matchedBreakpoints) {
|
|
|
453
453
|
|
|
454
454
|
|
|
455
455
|
export {$380ed8f3903c3931$export$fe9c6e915565b4e8 as baseStyleProps, $380ed8f3903c3931$export$abc24f5b99744ea6 as dimensionValue, $380ed8f3903c3931$export$46b6c81d11d2c30a as passthroughStyle, $380ed8f3903c3931$export$e0705d1a55f297c as viewStyleProps, $380ed8f3903c3931$export$f348bec194f2e6b5 as responsiveDimensionValue, $380ed8f3903c3931$export$52dbfdbe1b2c3541 as getResponsiveProp, $380ed8f3903c3931$export$f3c39bb9534218d0 as convertStyleProps, $380ed8f3903c3931$export$b8e6fb9d2dff3f41 as useStyleProps};
|
|
456
|
-
//# sourceMappingURL=styleProps.
|
|
456
|
+
//# sourceMappingURL=styleProps.module.js.map
|