@react-spectrum/s2 0.10.1 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/dist/ComboBox.cjs +19 -4
  2. package/dist/ComboBox.cjs.map +1 -1
  3. package/dist/ComboBox.css.map +1 -1
  4. package/dist/ComboBox.mjs +19 -4
  5. package/dist/ComboBox.mjs.map +1 -1
  6. package/dist/DatePicker.cjs +2 -5
  7. package/dist/DatePicker.cjs.map +1 -1
  8. package/dist/DatePicker.css.map +1 -1
  9. package/dist/DatePicker.mjs +2 -5
  10. package/dist/DatePicker.mjs.map +1 -1
  11. package/dist/DateRangePicker.cjs +2 -5
  12. package/dist/DateRangePicker.cjs.map +1 -1
  13. package/dist/DateRangePicker.css.map +1 -1
  14. package/dist/DateRangePicker.mjs +2 -5
  15. package/dist/DateRangePicker.mjs.map +1 -1
  16. package/dist/SelectBoxGroup.cjs +342 -0
  17. package/dist/SelectBoxGroup.cjs.map +1 -0
  18. package/dist/SelectBoxGroup.css +503 -0
  19. package/dist/SelectBoxGroup.css.map +1 -0
  20. package/dist/SelectBoxGroup.mjs +335 -0
  21. package/dist/SelectBoxGroup.mjs.map +1 -0
  22. package/dist/SkeletonCollection.cjs +6 -1
  23. package/dist/SkeletonCollection.cjs.map +1 -1
  24. package/dist/SkeletonCollection.mjs +7 -2
  25. package/dist/SkeletonCollection.mjs.map +1 -1
  26. package/dist/Tabs.cjs +102 -77
  27. package/dist/Tabs.cjs.map +1 -1
  28. package/dist/Tabs.css +8 -4
  29. package/dist/Tabs.css.map +1 -1
  30. package/dist/Tabs.mjs +102 -77
  31. package/dist/Tabs.mjs.map +1 -1
  32. package/dist/main.cjs +5 -0
  33. package/dist/main.cjs.map +1 -1
  34. package/dist/module.mjs +3 -1
  35. package/dist/module.mjs.map +1 -1
  36. package/dist/types.d.ts +43 -1
  37. package/dist/types.d.ts.map +1 -1
  38. package/package.json +21 -21
  39. package/src/ComboBox.tsx +20 -5
  40. package/src/DatePicker.tsx +1 -7
  41. package/src/DateRangePicker.tsx +1 -7
  42. package/src/SelectBoxGroup.tsx +408 -0
  43. package/src/SkeletonCollection.tsx +6 -2
  44. package/src/Tabs.tsx +49 -24
  45. package/src/index.ts +2 -0
  46. package/style/dist/main.cjs +24 -24
  47. package/style/dist/module.mjs +13 -13
  48. package/style/dist/properties.mjs +3 -3
  49. package/style/dist/spectrum-theme.cjs +219 -219
  50. package/style/dist/spectrum-theme.mjs +210 -210
  51. package/style/dist/style-macro.cjs +80 -80
  52. package/style/dist/style-macro.mjs +75 -75
@@ -0,0 +1,335 @@
1
+ import "./SelectBoxGroup.css";
2
+ import {box as $9b405e0f8095dce0$export$827f4ee28efc37, iconStyles as $9b405e0f8095dce0$export$2c99b98b77550cb4} from "./Checkbox.mjs";
3
+ import $81cf3d4588736e7d$export$2e2bcd8739ae039 from "./Checkmark.mjs";
4
+ import {IllustrationContext as $ac8c32e6775ddd1f$export$207c7561471de4bd} from "../icons/Icon.mjs";
5
+ import {pressScale as $10ea7662e51a285b$export$56e8cba416805d8d} from "./pressScale.mjs";
6
+ import {TextContext as $8e847109a6ab556d$export$9afb8bc826b033ea} from "./Content.mjs";
7
+ import {useSpectrumContextProps as $5ce63c423902f47d$export$764f6146fadd77f7} from "../icons/useSpectrumContextProps.mjs";
8
+ import {jsx as $hsEDv$jsx, jsxs as $hsEDv$jsxs, Fragment as $hsEDv$Fragment} from "react/jsx-runtime";
9
+ import {ListBoxItem as $hsEDv$ListBoxItem, Provider as $hsEDv$Provider, DEFAULT_SLOT as $hsEDv$DEFAULT_SLOT, ListBox as $hsEDv$ListBox} from "react-aria-components";
10
+ import {createContext as $hsEDv$createContext, useContext as $hsEDv$useContext, useRef as $hsEDv$useRef, forwardRef as $hsEDv$forwardRef, useMemo as $hsEDv$useMemo} from "react";
11
+
12
+ /*
13
+ * Copyright 2025 Adobe. All rights reserved.
14
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
15
+ * you may not use this file except in compliance with the License. You may obtain a copy
16
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
17
+ *
18
+ * Unless required by applicable law or agreed to in writing, software distributed under
19
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language
20
+ * governing permissions and limitations under the License.
21
+ */
22
+
23
+
24
+
25
+
26
+
27
+
28
+
29
+
30
+ const $e1ab128dc6578df7$var$SelectBoxContext = /*#__PURE__*/ (0, $hsEDv$createContext)({
31
+ orientation: 'vertical'
32
+ });
33
+ const $e1ab128dc6578df7$export$cad91f7528e8dc08 = /*#__PURE__*/ (0, $hsEDv$createContext)(null);
34
+ const $e1ab128dc6578df7$var$labelOnly = ':has([slot=label]):not(:has([slot=description]))';
35
+ const $e1ab128dc6578df7$var$noIllustration = ':not(:has([slot=illustration]))';
36
+ const $e1ab128dc6578df7$var$selectBoxStyles = function anonymous(props, overrides) {
37
+ let rules = " ";
38
+ let position = false;
39
+ let width = false;
40
+ let minWidth = false;
41
+ let maxWidth = false;
42
+ let matches = (overrides || '').matchAll(/(?:^|\s)(J|G|I|H|_u|_v|_s|__A|_d|_J|z|y|B|A|_P|_9|W|_l|_A|_z|Z|N|L)[^\s]+/g);
43
+ for (let p of matches){
44
+ if (p[1] === "_P") position = true;
45
+ if (p[1] === "Z") width = true;
46
+ if (p[1] === "N") minWidth = true;
47
+ if (p[1] === "L") maxWidth = true;
48
+ rules += p[0];
49
+ }
50
+ if (props.isFocusVisible) rules += ' _Lf11';
51
+ else rules += ' _Le11';
52
+ rules += ' Oh11';
53
+ rules += ' _Mc11';
54
+ rules += ' _Kd11';
55
+ rules += ' se11';
56
+ rules += ' __yM8Mfn11';
57
+ if (!position) rules += ' _Pc11';
58
+ rules += ' uk11';
59
+ rules += ' uch11';
60
+ rules += ' udi11';
61
+ rules += ' uea11';
62
+ rules += ' ugb11';
63
+ rules += ' uhd11';
64
+ rules += ' uje11';
65
+ rules += ' u2NhKxcl11';
66
+ rules += ' uic11';
67
+ rules += ' -_6BNtrc-c11';
68
+ rules += ' vx11';
69
+ rules += ' wb11';
70
+ rules += ' xb11';
71
+ rules += ' _xa11';
72
+ rules += ' _Fd11';
73
+ rules += ' _FezxGHba11';
74
+ rules += ' _FnuYUweb11';
75
+ if (props.isDisabled) rules += ' pp11';
76
+ rules += ' ri11';
77
+ rules += ' _oa11';
78
+ rules += ' _Nc11';
79
+ rules += ' Pc11';
80
+ if (props.orientation === "horizontal") {
81
+ if (!width) rules += ' ZAK24ue11';
82
+ } else if (!width) rules += ' Z75oWv11';
83
+ if (props.orientation === "horizontal") rules += ' Fd11';
84
+ else rules += ' F75oWv11';
85
+ if (props.orientation === "horizontal") {
86
+ if (!minWidth) rules += ' NBzUiud11';
87
+ } else if (!minWidth) rules += ' NQGV3L11';
88
+ if (props.orientation === "horizontal") {
89
+ if (!maxWidth) rules += ' LILqIYb11';
90
+ } else if (!maxWidth) rules += ' L75oWv11';
91
+ if (props.orientation === "horizontal") rules += ' MKniM11';
92
+ else rules += ' MQGV3L11';
93
+ if (props.orientation === "horizontal") rules += ' KDvO7ld11';
94
+ else rules += ' K75oWv11';
95
+ if (props.orientation === "horizontal") rules += ' Tf11';
96
+ else rules += ' Th11';
97
+ if (props.orientation === "horizontal") rules += ' Qf11';
98
+ else rules += ' Qh11';
99
+ if (props.orientation === "horizontal") rules += ' Sk11';
100
+ if (props.orientation === "horizontal") rules += ' Rh11';
101
+ if (props.orientation === "horizontal") {
102
+ rules += ' CtXiS9b11';
103
+ rules += ' CbWiMddxbX3ib11';
104
+ } else if (props.orientation === "vertical") rules += ' CfwsTtd11';
105
+ if (props.orientation === "horizontal") {
106
+ rules += ' EtYIsBb11';
107
+ rules += ' E1099pdfYMhHd11';
108
+ } else if (props.orientation === "vertical") rules += ' EOwqVhc11';
109
+ if (props.orientation === "horizontal") rules += ' DJSAqje11';
110
+ if (props.orientation === "vertical") rules += ' _cb11';
111
+ rules += ' oc11';
112
+ rules += ' nc11';
113
+ rules += ' kc11';
114
+ rules += ' jc11';
115
+ rules += ' _jf11';
116
+ if (props.isDisabled) rules += ' iA11';
117
+ else if (props.isSelected) rules += ' in11';
118
+ else rules += ' iA11';
119
+ if (props.isDisabled) rules += ' gH11';
120
+ else rules += ' g_g11';
121
+ if (props.isDisabled) rules += ' _nd11';
122
+ else if (props.isSelected) rules += ' _nb11';
123
+ else if (props.isHovered) rules += ' _nb11';
124
+ else rules += ' _na11';
125
+ rules += ' _kc11';
126
+ rules += ' hc11';
127
+ rules += ' mc11';
128
+ rules += ' lc11';
129
+ rules += ' Yd11';
130
+ rules += ' Xb11';
131
+ rules += ' _2b11';
132
+ return rules;
133
+ };
134
+ const $e1ab128dc6578df7$var$illustrationContainer = function anonymous(props) {
135
+ let rules = " ";
136
+ rules += ' zTZ8xtd11';
137
+ rules += ' yTZ8xtd11';
138
+ rules += ' BTZ8xtd11';
139
+ rules += ' ATZ8xtd11';
140
+ rules += ' _dc11';
141
+ rules += ' __Ab11';
142
+ rules += ' Nl11';
143
+ rules += ' Mk11';
144
+ if (props.isDisabled) rules += ' -_8sjo0b-pp11';
145
+ else {
146
+ if (props.isPressed) rules += ' -_8sjo0b-po11';
147
+ else if (props.isFocusVisible) rules += ' -_8sjo0b-po11';
148
+ else if (props.isHovered) rules += ' -_8sjo0b-po11';
149
+ else rules += ' -_8sjo0b-pt11';
150
+ }
151
+ return rules;
152
+ };
153
+ const $e1ab128dc6578df7$var$descriptionText = function anonymous(props) {
154
+ let rules = " ";
155
+ rules += ' z9u7zPc11';
156
+ rules += ' y9u7zPc11';
157
+ rules += ' B9u7zPc11';
158
+ rules += ' A9u7zPc11';
159
+ rules += ' _dc11';
160
+ if (props.orientation === "vertical") rules += ' sk11';
161
+ else rules += ' sb11';
162
+ rules += ' _Nc11';
163
+ rules += ' Pc11';
164
+ if (props.orientation === "horizontal") rules += ' _Wd11';
165
+ else rules += ' _Wa11';
166
+ if (props.isDisabled) rules += ' pp11';
167
+ else {
168
+ if (props.isPressed) rules += ' po11';
169
+ else if (props.isFocusVisible) rules += ' po11';
170
+ else if (props.isHovered) rules += ' po11';
171
+ else rules += ' pt11';
172
+ }
173
+ return rules;
174
+ };
175
+ const $e1ab128dc6578df7$var$labelText = function anonymous(props) {
176
+ let rules = " ";
177
+ rules += ' zv6x9r11';
178
+ rules += ' yv6x9r11';
179
+ rules += ' Bv6x9r11';
180
+ rules += ' Av6x9r11';
181
+ rules += ' _dc11';
182
+ if (props.orientation === "horizontal") rules += ' __Ad11';
183
+ else rules += ' __Ab11';
184
+ rules += ' Za11';
185
+ rules += ' _Nc11';
186
+ rules += ' Pc11';
187
+ rules += ' Na11';
188
+ if (props.orientation === "horizontal") rules += ' _Wd11';
189
+ else rules += ' _Wa11';
190
+ rules += ' _7c11';
191
+ rules += ' _Yb11';
192
+ if (props.orientation === "horizontal") {
193
+ rules += ' wd11';
194
+ rules += ' xd11';
195
+ rules += ' _xa11';
196
+ rules += ' wX0cczbc11';
197
+ rules += ' xX0cczbc11';
198
+ rules += ' _xX0cczba11';
199
+ }
200
+ if (props.isDisabled) rules += ' pp11';
201
+ else {
202
+ if (props.isPressed) rules += ' po11';
203
+ else if (props.isFocusVisible) rules += ' po11';
204
+ else if (props.isHovered) rules += ' po11';
205
+ else rules += ' pt11';
206
+ }
207
+ return rules;
208
+ };
209
+ const $e1ab128dc6578df7$var$gridStyles = function anonymous(props, overrides) {
210
+ let rules = " ";
211
+ rules += ((overrides || '').match(/(?:^|\s)(J|G|I|H|_u|_v|_s|__A|_d|_J|z|y|B|A|_P|_9|W|_l|_A|_z|Z|N|L)[^\s]+/g) || []).join('');
212
+ rules += ' se11';
213
+ rules += ' __yM8Mfn11';
214
+ rules += ' Uj11';
215
+ rules += ' qj11';
216
+ rules += ' _Ca11';
217
+ if (props.orientation === "vertical") rules += ' -SFnbic-Z75oWv11';
218
+ else if (props.orientation === "horizontal") rules += ' -SFnbic-ZAK24ue11';
219
+ if (props.orientation === "vertical") rules += ' DbFoS411';
220
+ else if (props.orientation === "horizontal") rules += ' DbFoS411';
221
+ return rules;
222
+ };
223
+ function $e1ab128dc6578df7$export$ebde6d4e7862fe9d(props) {
224
+ let { children: children, isDisabled: individualDisabled = false, UNSAFE_style: UNSAFE_style, UNSAFE_className: UNSAFE_className, styles: styles, ...otherProps } = props;
225
+ let { orientation: orientation = 'vertical', isDisabled: groupDisabled = false } = (0, $hsEDv$useContext)($e1ab128dc6578df7$var$SelectBoxContext);
226
+ const isDisabled = individualDisabled || groupDisabled;
227
+ const ref = (0, $hsEDv$useRef)(null);
228
+ return /*#__PURE__*/ (0, $hsEDv$jsx)((0, $hsEDv$ListBoxItem), {
229
+ isDisabled: isDisabled,
230
+ ref: ref,
231
+ className: (renderProps)=>(UNSAFE_className || '') + $e1ab128dc6578df7$var$selectBoxStyles({
232
+ ...renderProps,
233
+ orientation: orientation
234
+ }, styles),
235
+ style: (0, $10ea7662e51a285b$export$56e8cba416805d8d)(ref, UNSAFE_style),
236
+ ...otherProps,
237
+ children: ({ isSelected: isSelected, isDisabled: isDisabled, isHovered: isHovered })=>{
238
+ return /*#__PURE__*/ (0, $hsEDv$jsxs)((0, $hsEDv$Fragment), {
239
+ children: [
240
+ /*#__PURE__*/ (0, $hsEDv$jsx)("div", {
241
+ className: " _Pa11 WJ11 _AI11 _Ob11",
242
+ "aria-hidden": "true",
243
+ children: !isDisabled && /*#__PURE__*/ (0, $hsEDv$jsx)("div", {
244
+ className: (0, $9b405e0f8095dce0$export$827f4ee28efc37)({
245
+ isSelected: isSelected,
246
+ isDisabled: isDisabled,
247
+ size: 'M'
248
+ }),
249
+ children: /*#__PURE__*/ (0, $hsEDv$jsx)((0, $81cf3d4588736e7d$export$2e2bcd8739ae039), {
250
+ size: "S",
251
+ className: (0, $9b405e0f8095dce0$export$2c99b98b77550cb4)
252
+ })
253
+ })
254
+ }),
255
+ /*#__PURE__*/ (0, $hsEDv$jsx)((0, $hsEDv$Provider), {
256
+ values: [
257
+ [
258
+ (0, $ac8c32e6775ddd1f$export$207c7561471de4bd),
259
+ {
260
+ size: 'S',
261
+ styles: $e1ab128dc6578df7$var$illustrationContainer({
262
+ size: 'S',
263
+ orientation: orientation,
264
+ isDisabled: isDisabled,
265
+ isHovered: isHovered
266
+ })
267
+ }
268
+ ],
269
+ [
270
+ (0, $8e847109a6ab556d$export$9afb8bc826b033ea),
271
+ {
272
+ slots: {
273
+ [(0, $hsEDv$DEFAULT_SLOT)]: {
274
+ styles: $e1ab128dc6578df7$var$labelText({
275
+ orientation: orientation,
276
+ isDisabled: isDisabled,
277
+ isHovered: isHovered
278
+ })
279
+ },
280
+ label: {
281
+ styles: $e1ab128dc6578df7$var$labelText({
282
+ orientation: orientation,
283
+ isDisabled: isDisabled,
284
+ isHovered: isHovered
285
+ })
286
+ },
287
+ description: {
288
+ styles: $e1ab128dc6578df7$var$descriptionText({
289
+ orientation: orientation,
290
+ isDisabled: isDisabled,
291
+ isHovered: isHovered
292
+ })
293
+ }
294
+ }
295
+ }
296
+ ]
297
+ ],
298
+ children: children
299
+ })
300
+ ]
301
+ });
302
+ }
303
+ });
304
+ }
305
+ const $e1ab128dc6578df7$export$da87cf13fc2ef3d8 = /*#__PURE__*/ (0, $hsEDv$forwardRef)(function SelectBoxGroup(props, ref) {
306
+ [props, ref] = (0, $5ce63c423902f47d$export$764f6146fadd77f7)(props, ref, $e1ab128dc6578df7$export$cad91f7528e8dc08);
307
+ let { children: children, selectionMode: selectionMode = 'single', orientation: orientation = 'vertical', isDisabled: isDisabled = false, UNSAFE_className: UNSAFE_className, UNSAFE_style: UNSAFE_style, styles: styles, ...otherProps } = props;
308
+ const selectBoxContextValue = (0, $hsEDv$useMemo)(()=>{
309
+ const contextValue = {
310
+ orientation: orientation,
311
+ isDisabled: isDisabled
312
+ };
313
+ return contextValue;
314
+ }, [
315
+ orientation,
316
+ isDisabled
317
+ ]);
318
+ return /*#__PURE__*/ (0, $hsEDv$jsx)((0, $hsEDv$ListBox), {
319
+ selectionMode: selectionMode,
320
+ layout: "grid",
321
+ className: (UNSAFE_className || '') + $e1ab128dc6578df7$var$gridStyles({
322
+ orientation: orientation
323
+ }, styles),
324
+ style: UNSAFE_style,
325
+ ...otherProps,
326
+ children: /*#__PURE__*/ (0, $hsEDv$jsx)($e1ab128dc6578df7$var$SelectBoxContext.Provider, {
327
+ value: selectBoxContextValue,
328
+ children: children
329
+ })
330
+ });
331
+ });
332
+
333
+
334
+ export {$e1ab128dc6578df7$export$cad91f7528e8dc08 as SelectBoxGroupContext, $e1ab128dc6578df7$export$ebde6d4e7862fe9d as SelectBox, $e1ab128dc6578df7$export$da87cf13fc2ef3d8 as SelectBoxGroup};
335
+ //# sourceMappingURL=SelectBoxGroup.mjs.map
@@ -0,0 +1 @@
1
+ {"mappings":"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","sources":["packages/@react-spectrum/s2/src/SelectBoxGroup.tsx"],"sourcesContent":["/*\n * Copyright 2025 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {baseColor, focusRing, style} from '../style' with {type: 'macro'};\nimport {box, iconStyles} from './Checkbox';\nimport Checkmark from '../ui-icons/Checkmark';\nimport {\n ContextValue,\n DEFAULT_SLOT,\n ListBox,\n ListBoxItem,\n ListBoxProps,\n Provider\n} from 'react-aria-components';\nimport {DOMRef, DOMRefValue, GlobalDOMAttributes, Key, Orientation} from '@react-types/shared';\nimport {getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {IllustrationContext} from '../src/Icon';\nimport {pressScale} from './pressScale';\nimport React, {createContext, forwardRef, ReactNode, useContext, useMemo, useRef} from 'react';\nimport {TextContext} from './Content';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface SelectBoxGroupProps<T> extends StyleProps, Omit<ListBoxProps<T>, keyof GlobalDOMAttributes | 'layout' | 'dragAndDropHooks' | 'dependencies' | 'renderEmptyState' | 'children' | 'onAction' | 'shouldFocusOnHover' | 'selectionBehavior' | 'shouldSelectOnPressUp' | 'shouldFocusWrap' | 'style' | 'className'> {\n /**\n * The SelectBox elements contained within the SelectBoxGroup.\n */\n children: ReactNode,\n /**\n * The layout direction of the content in each SelectBox.\n * @default 'vertical'\n */\n orientation?: Orientation,\n /**\n * The selection mode for the SelectBoxGroup.\n * @default 'single'\n */\n selectionMode?: 'single' | 'multiple',\n /**\n * Whether the SelectBoxGroup is disabled.\n */\n isDisabled?: boolean\n}\n\nexport interface SelectBoxProps extends StyleProps {\n /** The unique id of the SelectBox. */\n id?: Key,\n /** A string representation of the SelectBox's contents, used for features like typeahead. */\n textValue?: string,\n /** An accessibility label for this item. */\n 'aria-label'?: string,\n /**\n * The contents of the SelectBox.\n */\n children: ReactNode,\n /**\n * Whether the SelectBox is disabled.\n */\n isDisabled?: boolean\n}\n\ninterface SelectBoxContextValue {\n allowMultiSelect?: boolean,\n orientation?: Orientation,\n isDisabled?: boolean\n}\n\nconst SelectBoxContext = createContext<SelectBoxContextValue>({orientation: 'vertical'});\nexport const SelectBoxGroupContext = createContext<ContextValue<Partial<SelectBoxGroupProps<any>>, DOMRefValue<HTMLDivElement>>>(null);\n\nconst labelOnly = ':has([slot=label]):not(:has([slot=description]))';\nconst noIllustration = ':not(:has([slot=illustration]))';\nconst selectBoxStyles = style({\n ...focusRing(),\n display: 'grid',\n gridAutoRows: '1fr',\n position: 'relative',\n font: 'ui',\n cursor: 'default',\n boxSizing: 'border-box',\n overflow: 'hidden',\n width: {\n default: 170,\n orientation: {\n horizontal: 368\n }\n },\n height: {\n default: 170,\n orientation: {\n horizontal: 'auto'\n }\n },\n minWidth: {\n default: 144,\n orientation: {\n horizontal: 188\n }\n },\n maxWidth: {\n default: 170,\n orientation: {\n horizontal: 480\n }\n },\n minHeight: {\n default: 144,\n orientation: {\n horizontal: 80\n }\n },\n maxHeight: {\n default: 170,\n orientation: {\n horizontal: 240\n }\n },\n padding: {\n default: 24,\n orientation: {\n horizontal: 16\n }\n },\n paddingStart: {\n orientation: {\n horizontal: 32\n }\n },\n paddingEnd: {\n orientation: {\n horizontal: 24\n }\n },\n gridTemplateAreas: {\n orientation: {\n vertical: [\n 'illustration',\n '.',\n 'label'\n ],\n horizontal: {\n default: [\n 'illustration . label',\n 'illustration . description'\n ],\n [labelOnly]: [\n 'illustration . label'\n ]\n }\n }\n },\n gridTemplateRows: {\n orientation: {\n vertical: ['min-content', 8, 'min-content'],\n horizontal: {\n default: ['min-content', 2, 'min-content'],\n [noIllustration]: ['min-content']\n }\n }\n },\n gridTemplateColumns: {\n orientation: {\n horizontal: 'min-content 10px 1fr'\n }\n },\n alignContent: {\n orientation: {\n vertical: 'center'\n }\n },\n borderRadius: 'lg',\n borderStyle: 'solid',\n borderColor: {\n default: 'transparent',\n isSelected: 'gray-900',\n isDisabled: 'transparent'\n },\n backgroundColor: {\n default: 'layer-2',\n isDisabled: 'disabled'\n },\n color: {\n isDisabled: 'disabled'\n },\n boxShadow: {\n default: 'emphasized',\n isHovered: 'elevated',\n isSelected: 'elevated',\n isDisabled: 'none'\n },\n borderWidth: 2,\n transition: 'default'\n}, getAllowedOverrides());\n\nconst illustrationContainer = style({\n gridArea: 'illustration',\n alignSelf: 'center',\n justifySelf: 'center',\n minSize: 48,\n '--iconPrimary': {\n type: 'color',\n value: {\n default: baseColor('neutral'),\n isDisabled: 'disabled'\n }\n }\n});\n\nconst descriptionText = style({\n gridArea: 'description',\n alignSelf: 'center',\n display: {\n default: 'block',\n orientation: {\n vertical: 'none'\n }\n },\n overflow: 'hidden',\n textAlign: {\n default: 'center',\n orientation: {\n horizontal: 'start'\n }\n },\n color: {\n default: baseColor('neutral'),\n isDisabled: 'disabled'\n }\n});\n\nconst labelText = style({\n gridArea: 'label',\n alignSelf: 'center',\n justifySelf: {\n default: 'center',\n orientation: {\n horizontal: 'start'\n }\n },\n width: '100%',\n overflow: 'hidden',\n minWidth: 0,\n textAlign: {\n default: 'center',\n orientation: {\n horizontal: 'start'\n }\n },\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis',\n fontWeight: {\n orientation: {\n horizontal: 'bold'\n }\n },\n color: {\n default: baseColor('neutral'),\n isDisabled: 'disabled'\n }\n});\n\nconst gridStyles = style<{orientation?: Orientation}>({\n display: 'grid',\n gridAutoRows: '1fr',\n gap: 24,\n justifyContent: 'center',\n '--size': {\n type: 'width',\n value: {\n orientation: {\n horizontal: 368,\n vertical: 170\n }\n }\n },\n gridTemplateColumns: {\n orientation: {\n horizontal: 'repeat(auto-fit, var(--size))',\n vertical: 'repeat(auto-fit, var(--size))'\n }\n }\n}, getAllowedOverrides());\n\n/**\n * SelectBox is a single selectable item in a SelectBoxGroup.\n */\nexport function SelectBox(props: SelectBoxProps): ReactNode {\n let {children, isDisabled: individualDisabled = false, UNSAFE_style, UNSAFE_className, styles, ...otherProps} = props;\n \n let {\n orientation = 'vertical',\n isDisabled: groupDisabled = false\n } = useContext(SelectBoxContext);\n\n const isDisabled = individualDisabled || groupDisabled;\n const ref = useRef<HTMLDivElement>(null);\n\n return (\n <ListBoxItem\n isDisabled={isDisabled}\n ref={ref}\n className={renderProps => (UNSAFE_className || '') + selectBoxStyles({\n ...renderProps,\n orientation\n }, styles)}\n style={pressScale(ref, UNSAFE_style)}\n {...otherProps}>\n {({isSelected, isDisabled, isHovered}) => {\n return (\n <>\n <div \n className={style({\n position: 'absolute',\n top: 8,\n insetStart: 8,\n pointerEvents: 'none'\n })}\n aria-hidden=\"true\">\n {!isDisabled && (\n <div\n className={box({\n isSelected,\n isDisabled,\n size: 'M'\n } as any)}>\n <Checkmark \n size=\"S\" \n className={iconStyles} />\n </div>\n )}\n </div>\n <Provider\n values={[\n [IllustrationContext, {\n size: 'S',\n styles: illustrationContainer({size: 'S', orientation, isDisabled, isHovered})\n }],\n [TextContext, {\n slots: {\n [DEFAULT_SLOT]: {\n styles: labelText({orientation, isDisabled, isHovered})\n },\n label: {\n styles: labelText({orientation, isDisabled, isHovered})\n },\n description: {\n styles: descriptionText({orientation, isDisabled, isHovered})\n }\n }\n }]\n ]}>\n {children}\n </Provider>\n </>\n );\n }}\n </ListBoxItem>\n );\n}\n\n/*\n * SelectBoxGroup allows users to select one or more options from a list.\n */\nexport const SelectBoxGroup = /*#__PURE__*/ forwardRef(function SelectBoxGroup<T extends object>(props: SelectBoxGroupProps<T>, ref: DOMRef<HTMLDivElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, SelectBoxGroupContext);\n\n let {\n children,\n selectionMode = 'single',\n orientation = 'vertical',\n isDisabled = false,\n UNSAFE_className,\n UNSAFE_style,\n styles,\n ...otherProps\n } = props;\n\n const selectBoxContextValue = useMemo(\n () => {\n const contextValue = {\n orientation,\n isDisabled\n };\n return contextValue;\n },\n [orientation, isDisabled]\n );\n\n return (\n <ListBox\n selectionMode={selectionMode}\n layout=\"grid\"\n className={(UNSAFE_className || '') + gridStyles({orientation}, styles)}\n style={UNSAFE_style}\n {...otherProps}>\n <SelectBoxContext.Provider value={selectBoxContextValue}>\n {children}\n </SelectBoxContext.Provider>\n </ListBox>\n );\n});\n"],"names":[],"version":3,"file":"SelectBoxGroup.mjs.map"}
@@ -22,7 +22,12 @@ $parcel$export(module.exports, "SkeletonCollection", () => $f28b5a582c8ff5e1$exp
22
22
 
23
23
 
24
24
  let $f28b5a582c8ff5e1$var$cache = new WeakMap();
25
- const $f28b5a582c8ff5e1$export$4365333b6bb1c86b = (0, $elu7H$reactariacollections.createLeafComponent)('skeleton', (props, ref, node)=>{
25
+ class $f28b5a582c8ff5e1$var$SkeletonNode extends (0, $elu7H$reactariacollections.CollectionNode) {
26
+ static{
27
+ this.type = 'skeleton';
28
+ }
29
+ }
30
+ const $f28b5a582c8ff5e1$export$4365333b6bb1c86b = (0, $elu7H$reactariacollections.createLeafComponent)($f28b5a582c8ff5e1$var$SkeletonNode, (props, ref, node)=>{
26
31
  // Cache rendering based on node object identity. This allows the children function to randomize
27
32
  // its content (e.g. heights) and preserve on re-renders.
28
33
  // TODO: do we need a `dependencies` prop here?
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;AAUD,IAAI,8BAAQ,IAAI;AAKT,MAAM,4CAAqB,CAAA,GAAA,+CAAkB,EAAE,YAAY,CAAC,OAAgC,KAAK;IACtG,gGAAgG;IAChG,yDAAyD;IACzD,+CAA+C;IAC/C,IAAI,SAAS,4BAAM,GAAG,CAAC;IACvB,IAAI,CAAC,QAAQ;QACX,uBACE,gCAAC,CAAA,GAAA,kCAAO;YAAE,SAAS;sBAChB,MAAM,QAAQ;;QAGnB,4BAAM,GAAG,CAAC,MAAM;IAClB;IACA,OAAO;AACT","sources":["packages/@react-spectrum/s2/src/SkeletonCollection.tsx"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {createLeafComponent} from '@react-aria/collections';\nimport {ReactNode} from 'react';\nimport {Skeleton} from './Skeleton';\n\nexport interface SkeletonCollectionProps {\n children: () => ReactNode\n}\n\nlet cache = new WeakMap();\n\n/**\n * A SkeletonCollection generates placeholder content within a collection component such as CardView.\n */\nexport const SkeletonCollection = createLeafComponent('skeleton', (props: SkeletonCollectionProps, ref, node) => {\n // Cache rendering based on node object identity. This allows the children function to randomize\n // its content (e.g. heights) and preserve on re-renders.\n // TODO: do we need a `dependencies` prop here?\n let cached = cache.get(node);\n if (!cached) {\n cached = (\n <Skeleton isLoading>\n {props.children()}\n </Skeleton>\n );\n cache.set(node, cached);\n }\n return cached;\n});\n"],"names":[],"version":3,"file":"SkeletonCollection.cjs.map"}
1
+ {"mappings":";;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;AAUD,IAAI,8BAAQ,IAAI;AAEhB,MAAM,2CAAqB,CAAA,GAAA,0CAAa;;aACtB,OAAO;;AACzB;AAKO,MAAM,4CAAqB,CAAA,GAAA,+CAAkB,EAAE,oCAAc,CAAC,OAAgC,KAAK;IACxG,gGAAgG;IAChG,yDAAyD;IACzD,+CAA+C;IAC/C,IAAI,SAAS,4BAAM,GAAG,CAAC;IACvB,IAAI,CAAC,QAAQ;QACX,uBACE,gCAAC,CAAA,GAAA,kCAAO;YAAE,SAAS;sBAChB,MAAM,QAAQ;;QAGnB,4BAAM,GAAG,CAAC,MAAM;IAClB;IACA,OAAO;AACT","sources":["packages/@react-spectrum/s2/src/SkeletonCollection.tsx"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {CollectionNode, createLeafComponent} from '@react-aria/collections';\nimport {ReactNode} from 'react';\nimport {Skeleton} from './Skeleton';\n\nexport interface SkeletonCollectionProps {\n children: () => ReactNode\n}\n\nlet cache = new WeakMap();\n\nclass SkeletonNode extends CollectionNode<unknown> {\n static readonly type = 'skeleton';\n}\n\n/**\n * A SkeletonCollection generates placeholder content within a collection component such as CardView.\n */\nexport const SkeletonCollection = createLeafComponent(SkeletonNode, (props: SkeletonCollectionProps, ref, node) => {\n // Cache rendering based on node object identity. This allows the children function to randomize\n // its content (e.g. heights) and preserve on re-renders.\n // TODO: do we need a `dependencies` prop here?\n let cached = cache.get(node);\n if (!cached) {\n cached = (\n <Skeleton isLoading>\n {props.children()}\n </Skeleton>\n );\n cache.set(node, cached);\n }\n return cached;\n});\n"],"names":[],"version":3,"file":"SkeletonCollection.cjs.map"}
@@ -1,6 +1,6 @@
1
1
  import {Skeleton as $5ad421ec19460c48$export$8f31e4c4a37b8e9c} from "../icons/Skeleton.mjs";
2
2
  import {jsx as $iRmNJ$jsx} from "react/jsx-runtime";
3
- import {createLeafComponent as $iRmNJ$createLeafComponent} from "@react-aria/collections";
3
+ import {CollectionNode as $iRmNJ$CollectionNode, createLeafComponent as $iRmNJ$createLeafComponent} from "@react-aria/collections";
4
4
 
5
5
  /*
6
6
  * Copyright 2024 Adobe. All rights reserved.
@@ -16,7 +16,12 @@ import {createLeafComponent as $iRmNJ$createLeafComponent} from "@react-aria/col
16
16
 
17
17
 
18
18
  let $00cf18afd94ad18c$var$cache = new WeakMap();
19
- const $00cf18afd94ad18c$export$4365333b6bb1c86b = (0, $iRmNJ$createLeafComponent)('skeleton', (props, ref, node)=>{
19
+ class $00cf18afd94ad18c$var$SkeletonNode extends (0, $iRmNJ$CollectionNode) {
20
+ static{
21
+ this.type = 'skeleton';
22
+ }
23
+ }
24
+ const $00cf18afd94ad18c$export$4365333b6bb1c86b = (0, $iRmNJ$createLeafComponent)($00cf18afd94ad18c$var$SkeletonNode, (props, ref, node)=>{
20
25
  // Cache rendering based on node object identity. This allows the children function to randomize
21
26
  // its content (e.g. heights) and preserve on re-renders.
22
27
  // TODO: do we need a `dependencies` prop here?
@@ -1 +1 @@
1
- {"mappings":";;;;AAAA;;;;;;;;;;CAUC;;;AAUD,IAAI,8BAAQ,IAAI;AAKT,MAAM,4CAAqB,CAAA,GAAA,0BAAkB,EAAE,YAAY,CAAC,OAAgC,KAAK;IACtG,gGAAgG;IAChG,yDAAyD;IACzD,+CAA+C;IAC/C,IAAI,SAAS,4BAAM,GAAG,CAAC;IACvB,IAAI,CAAC,QAAQ;QACX,uBACE,gBAAC,CAAA,GAAA,yCAAO;YAAE,SAAS;sBAChB,MAAM,QAAQ;;QAGnB,4BAAM,GAAG,CAAC,MAAM;IAClB;IACA,OAAO;AACT","sources":["packages/@react-spectrum/s2/src/SkeletonCollection.tsx"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {createLeafComponent} from '@react-aria/collections';\nimport {ReactNode} from 'react';\nimport {Skeleton} from './Skeleton';\n\nexport interface SkeletonCollectionProps {\n children: () => ReactNode\n}\n\nlet cache = new WeakMap();\n\n/**\n * A SkeletonCollection generates placeholder content within a collection component such as CardView.\n */\nexport const SkeletonCollection = createLeafComponent('skeleton', (props: SkeletonCollectionProps, ref, node) => {\n // Cache rendering based on node object identity. This allows the children function to randomize\n // its content (e.g. heights) and preserve on re-renders.\n // TODO: do we need a `dependencies` prop here?\n let cached = cache.get(node);\n if (!cached) {\n cached = (\n <Skeleton isLoading>\n {props.children()}\n </Skeleton>\n );\n cache.set(node, cached);\n }\n return cached;\n});\n"],"names":[],"version":3,"file":"SkeletonCollection.mjs.map"}
1
+ {"mappings":";;;;AAAA;;;;;;;;;;CAUC;;;AAUD,IAAI,8BAAQ,IAAI;AAEhB,MAAM,2CAAqB,CAAA,GAAA,qBAAa;;aACtB,OAAO;;AACzB;AAKO,MAAM,4CAAqB,CAAA,GAAA,0BAAkB,EAAE,oCAAc,CAAC,OAAgC,KAAK;IACxG,gGAAgG;IAChG,yDAAyD;IACzD,+CAA+C;IAC/C,IAAI,SAAS,4BAAM,GAAG,CAAC;IACvB,IAAI,CAAC,QAAQ;QACX,uBACE,gBAAC,CAAA,GAAA,yCAAO;YAAE,SAAS;sBAChB,MAAM,QAAQ;;QAGnB,4BAAM,GAAG,CAAC,MAAM;IAClB;IACA,OAAO;AACT","sources":["packages/@react-spectrum/s2/src/SkeletonCollection.tsx"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {CollectionNode, createLeafComponent} from '@react-aria/collections';\nimport {ReactNode} from 'react';\nimport {Skeleton} from './Skeleton';\n\nexport interface SkeletonCollectionProps {\n children: () => ReactNode\n}\n\nlet cache = new WeakMap();\n\nclass SkeletonNode extends CollectionNode<unknown> {\n static readonly type = 'skeleton';\n}\n\n/**\n * A SkeletonCollection generates placeholder content within a collection component such as CardView.\n */\nexport const SkeletonCollection = createLeafComponent(SkeletonNode, (props: SkeletonCollectionProps, ref, node) => {\n // Cache rendering based on node object identity. This allows the children function to randomize\n // its content (e.g. heights) and preserve on re-renders.\n // TODO: do we need a `dependencies` prop here?\n let cached = cache.get(node);\n if (!cached) {\n cached = (\n <Skeleton isLoading>\n {props.children()}\n </Skeleton>\n );\n cache.set(node, cached);\n }\n return cached;\n});\n"],"names":[],"version":3,"file":"SkeletonCollection.mjs.map"}