@react-spectrum/s2 0.10.0 → 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 (296) hide show
  1. package/dist/Accordion.cjs +2 -2
  2. package/dist/Accordion.css +2 -2
  3. package/dist/Accordion.mjs +2 -2
  4. package/dist/ActionBar.cjs +62 -62
  5. package/dist/ActionBar.css +61 -61
  6. package/dist/ActionBar.mjs +62 -62
  7. package/dist/ActionButton.cjs +202 -202
  8. package/dist/ActionButton.css +138 -138
  9. package/dist/ActionButton.mjs +202 -202
  10. package/dist/ActionButtonGroup.cjs +15 -15
  11. package/dist/ActionButtonGroup.css +9 -9
  12. package/dist/ActionButtonGroup.mjs +15 -15
  13. package/dist/Add.cjs +10 -10
  14. package/dist/Add.css +6 -6
  15. package/dist/Add.mjs +10 -10
  16. package/dist/AlertDialog.cjs +3 -3
  17. package/dist/AlertDialog.css +3 -3
  18. package/dist/AlertDialog.mjs +3 -3
  19. package/dist/Asterisk.cjs +6 -6
  20. package/dist/Asterisk.css +4 -4
  21. package/dist/Asterisk.mjs +6 -6
  22. package/dist/Avatar.cjs +14 -14
  23. package/dist/Avatar.css +14 -14
  24. package/dist/Avatar.mjs +14 -14
  25. package/dist/AvatarGroup.cjs +134 -134
  26. package/dist/AvatarGroup.css +33 -33
  27. package/dist/AvatarGroup.mjs +134 -134
  28. package/dist/Badge.cjs +206 -206
  29. package/dist/Badge.css +127 -127
  30. package/dist/Badge.mjs +206 -206
  31. package/dist/Breadcrumbs.cjs +254 -254
  32. package/dist/Breadcrumbs.css +109 -109
  33. package/dist/Breadcrumbs.mjs +254 -254
  34. package/dist/Button.cjs +341 -341
  35. package/dist/Button.css +177 -177
  36. package/dist/Button.mjs +341 -341
  37. package/dist/ButtonGroup.cjs +20 -20
  38. package/dist/ButtonGroup.css +15 -15
  39. package/dist/ButtonGroup.mjs +20 -20
  40. package/dist/Calendar.cjs +151 -139
  41. package/dist/Calendar.cjs.map +1 -1
  42. package/dist/Calendar.css +134 -134
  43. package/dist/Calendar.css.map +1 -1
  44. package/dist/Calendar.mjs +153 -141
  45. package/dist/Calendar.mjs.map +1 -1
  46. package/dist/Card.cjs +304 -304
  47. package/dist/Card.css +209 -209
  48. package/dist/Card.mjs +304 -304
  49. package/dist/CardView.cjs +16 -16
  50. package/dist/CardView.css +16 -16
  51. package/dist/CardView.mjs +16 -16
  52. package/dist/CenterBaseline.cjs +1 -1
  53. package/dist/CenterBaseline.css +2 -2
  54. package/dist/CenterBaseline.mjs +1 -1
  55. package/dist/Checkbox.cjs +170 -170
  56. package/dist/Checkbox.css +92 -92
  57. package/dist/Checkbox.mjs +170 -170
  58. package/dist/CheckboxGroup.cjs +45 -45
  59. package/dist/CheckboxGroup.css +38 -38
  60. package/dist/CheckboxGroup.mjs +45 -45
  61. package/dist/Checkmark.cjs +12 -12
  62. package/dist/Checkmark.css +8 -8
  63. package/dist/Checkmark.mjs +12 -12
  64. package/dist/Chevron.cjs +12 -12
  65. package/dist/Chevron.css +10 -10
  66. package/dist/Chevron.mjs +12 -12
  67. package/dist/ClearButton.cjs +29 -29
  68. package/dist/ClearButton.css +29 -29
  69. package/dist/ClearButton.mjs +29 -29
  70. package/dist/CloseButton.cjs +54 -54
  71. package/dist/CloseButton.css +46 -46
  72. package/dist/CloseButton.mjs +54 -54
  73. package/dist/ColorArea.cjs +16 -16
  74. package/dist/ColorArea.css +16 -16
  75. package/dist/ColorArea.mjs +16 -16
  76. package/dist/ColorField.cjs +32 -32
  77. package/dist/ColorField.css +28 -28
  78. package/dist/ColorField.mjs +32 -32
  79. package/dist/ColorHandle.cjs +27 -27
  80. package/dist/ColorHandle.css +42 -42
  81. package/dist/ColorHandle.mjs +27 -27
  82. package/dist/ColorSlider.cjs +118 -118
  83. package/dist/ColorSlider.css +54 -54
  84. package/dist/ColorSlider.mjs +118 -118
  85. package/dist/ColorSwatch.cjs +29 -29
  86. package/dist/ColorSwatch.css +29 -29
  87. package/dist/ColorSwatch.mjs +29 -29
  88. package/dist/ColorSwatchPicker.cjs +27 -27
  89. package/dist/ColorSwatchPicker.css +46 -46
  90. package/dist/ColorSwatchPicker.mjs +27 -27
  91. package/dist/ColorWheel.cjs +26 -26
  92. package/dist/ColorWheel.css +17 -17
  93. package/dist/ColorWheel.mjs +26 -26
  94. package/dist/ComboBox.cjs +415 -400
  95. package/dist/ComboBox.cjs.map +1 -1
  96. package/dist/ComboBox.css +181 -181
  97. package/dist/ComboBox.css.map +1 -1
  98. package/dist/ComboBox.mjs +415 -400
  99. package/dist/ComboBox.mjs.map +1 -1
  100. package/dist/ContextualHelp.cjs +5 -5
  101. package/dist/ContextualHelp.css +60 -60
  102. package/dist/ContextualHelp.mjs +5 -5
  103. package/dist/Cross.cjs +14 -14
  104. package/dist/Cross.css +10 -10
  105. package/dist/Cross.mjs +14 -14
  106. package/dist/CustomDialog.cjs +25 -25
  107. package/dist/CustomDialog.css +25 -25
  108. package/dist/CustomDialog.mjs +25 -25
  109. package/dist/Dash.cjs +10 -10
  110. package/dist/Dash.css +6 -6
  111. package/dist/Dash.mjs +10 -10
  112. package/dist/DateField.cjs +73 -73
  113. package/dist/DateField.css +77 -77
  114. package/dist/DateField.mjs +73 -73
  115. package/dist/DatePicker.cjs +182 -185
  116. package/dist/DatePicker.cjs.map +1 -1
  117. package/dist/DatePicker.css +126 -126
  118. package/dist/DatePicker.css.map +1 -1
  119. package/dist/DatePicker.mjs +182 -185
  120. package/dist/DatePicker.mjs.map +1 -1
  121. package/dist/DateRangePicker.cjs +58 -61
  122. package/dist/DateRangePicker.cjs.map +1 -1
  123. package/dist/DateRangePicker.css +60 -60
  124. package/dist/DateRangePicker.css.map +1 -1
  125. package/dist/DateRangePicker.mjs +58 -61
  126. package/dist/DateRangePicker.mjs.map +1 -1
  127. package/dist/Dialog.cjs +17 -17
  128. package/dist/Dialog.css +82 -82
  129. package/dist/Dialog.mjs +17 -17
  130. package/dist/Disclosure.cjs +135 -135
  131. package/dist/Disclosure.css +106 -106
  132. package/dist/Disclosure.mjs +135 -135
  133. package/dist/Divider.cjs +25 -25
  134. package/dist/Divider.css +25 -25
  135. package/dist/Divider.mjs +25 -25
  136. package/dist/DropZone.cjs +62 -62
  137. package/dist/DropZone.css +58 -58
  138. package/dist/DropZone.mjs +62 -62
  139. package/dist/Field.cjs +370 -370
  140. package/dist/Field.cjs.map +1 -1
  141. package/dist/Field.css +142 -142
  142. package/dist/Field.mjs +370 -370
  143. package/dist/Field.mjs.map +1 -1
  144. package/dist/Form.cjs +9 -9
  145. package/dist/Form.css +9 -9
  146. package/dist/Form.mjs +9 -9
  147. package/dist/FullscreenDialog.cjs +5 -5
  148. package/dist/FullscreenDialog.css +91 -91
  149. package/dist/FullscreenDialog.mjs +5 -5
  150. package/dist/IllustratedMessage.cjs +256 -256
  151. package/dist/IllustratedMessage.css +78 -78
  152. package/dist/IllustratedMessage.mjs +256 -256
  153. package/dist/Image.cjs +13 -13
  154. package/dist/Image.css +14 -14
  155. package/dist/Image.mjs +13 -13
  156. package/dist/InlineAlert.cjs +117 -117
  157. package/dist/InlineAlert.css +98 -98
  158. package/dist/InlineAlert.mjs +117 -117
  159. package/dist/Link.cjs +54 -54
  160. package/dist/Link.css +46 -46
  161. package/dist/Link.mjs +54 -54
  162. package/dist/LinkOut.cjs +8 -8
  163. package/dist/LinkOut.css +8 -8
  164. package/dist/LinkOut.mjs +8 -8
  165. package/dist/Menu.cjs +459 -459
  166. package/dist/Menu.css +185 -185
  167. package/dist/Menu.mjs +459 -459
  168. package/dist/Meter.cjs +163 -163
  169. package/dist/Meter.css +93 -93
  170. package/dist/Meter.mjs +163 -163
  171. package/dist/Modal.cjs +58 -58
  172. package/dist/Modal.css +50 -50
  173. package/dist/Modal.mjs +58 -58
  174. package/dist/NotificationBadge.cjs +58 -58
  175. package/dist/NotificationBadge.css +51 -51
  176. package/dist/NotificationBadge.mjs +58 -58
  177. package/dist/NumberField.cjs +115 -115
  178. package/dist/NumberField.css +100 -100
  179. package/dist/NumberField.mjs +115 -115
  180. package/dist/Picker.cjs +283 -283
  181. package/dist/Picker.css +169 -169
  182. package/dist/Picker.mjs +283 -283
  183. package/dist/Popover.cjs +86 -86
  184. package/dist/Popover.css +66 -66
  185. package/dist/Popover.mjs +86 -86
  186. package/dist/ProgressBar.cjs +173 -173
  187. package/dist/ProgressBar.css +101 -101
  188. package/dist/ProgressBar.mjs +173 -173
  189. package/dist/ProgressCircle.cjs +31 -31
  190. package/dist/ProgressCircle.css +24 -24
  191. package/dist/ProgressCircle.mjs +31 -31
  192. package/dist/Provider.cjs +11 -11
  193. package/dist/Provider.css +10 -10
  194. package/dist/Provider.mjs +11 -11
  195. package/dist/Radio.cjs +154 -154
  196. package/dist/Radio.css +79 -79
  197. package/dist/Radio.mjs +154 -154
  198. package/dist/RadioGroup.cjs +42 -42
  199. package/dist/RadioGroup.css +38 -38
  200. package/dist/RadioGroup.mjs +42 -42
  201. package/dist/RangeCalendar.cjs +32 -20
  202. package/dist/RangeCalendar.cjs.map +1 -1
  203. package/dist/RangeCalendar.css +10 -10
  204. package/dist/RangeCalendar.css.map +1 -1
  205. package/dist/RangeCalendar.mjs +34 -22
  206. package/dist/RangeCalendar.mjs.map +1 -1
  207. package/dist/SearchField.cjs +42 -42
  208. package/dist/SearchField.css +46 -46
  209. package/dist/SearchField.mjs +42 -42
  210. package/dist/SegmentedControl.cjs +181 -181
  211. package/dist/SegmentedControl.css +118 -118
  212. package/dist/SegmentedControl.mjs +181 -181
  213. package/dist/SelectBoxGroup.cjs +342 -0
  214. package/dist/SelectBoxGroup.cjs.map +1 -0
  215. package/dist/SelectBoxGroup.css +503 -0
  216. package/dist/SelectBoxGroup.css.map +1 -0
  217. package/dist/SelectBoxGroup.mjs +335 -0
  218. package/dist/SelectBoxGroup.mjs.map +1 -0
  219. package/dist/SkeletonCollection.cjs +6 -1
  220. package/dist/SkeletonCollection.cjs.map +1 -1
  221. package/dist/SkeletonCollection.mjs +7 -2
  222. package/dist/SkeletonCollection.mjs.map +1 -1
  223. package/dist/Slider.cjs +299 -299
  224. package/dist/Slider.css +151 -151
  225. package/dist/Slider.mjs +299 -299
  226. package/dist/StatusLight.cjs +125 -125
  227. package/dist/StatusLight.css +61 -61
  228. package/dist/StatusLight.mjs +125 -125
  229. package/dist/Switch.cjs +162 -162
  230. package/dist/Switch.css +74 -74
  231. package/dist/Switch.mjs +162 -162
  232. package/dist/TableView.cjs +319 -319
  233. package/dist/TableView.css +172 -172
  234. package/dist/TableView.mjs +319 -319
  235. package/dist/Tabs.cjs +213 -188
  236. package/dist/Tabs.cjs.map +1 -1
  237. package/dist/Tabs.css +105 -101
  238. package/dist/Tabs.css.map +1 -1
  239. package/dist/Tabs.mjs +213 -188
  240. package/dist/Tabs.mjs.map +1 -1
  241. package/dist/TabsPicker.cjs +127 -127
  242. package/dist/TabsPicker.css +111 -111
  243. package/dist/TabsPicker.mjs +127 -127
  244. package/dist/TagGroup.cjs +213 -213
  245. package/dist/TagGroup.css +147 -147
  246. package/dist/TagGroup.mjs +213 -213
  247. package/dist/TextField.cjs +59 -59
  248. package/dist/TextField.css +54 -54
  249. package/dist/TextField.mjs +59 -59
  250. package/dist/TimeField.cjs +52 -52
  251. package/dist/TimeField.css +48 -48
  252. package/dist/TimeField.mjs +52 -52
  253. package/dist/Toast.cjs +120 -120
  254. package/dist/Toast.css +107 -107
  255. package/dist/Toast.mjs +120 -120
  256. package/dist/ToggleButton.cjs +3 -3
  257. package/dist/ToggleButton.css +12 -12
  258. package/dist/ToggleButton.mjs +3 -3
  259. package/dist/Tooltip.cjs +83 -83
  260. package/dist/Tooltip.css +70 -70
  261. package/dist/Tooltip.mjs +83 -83
  262. package/dist/TreeView.cjs +146 -146
  263. package/dist/TreeView.css +147 -147
  264. package/dist/TreeView.mjs +146 -146
  265. package/dist/main.cjs +5 -0
  266. package/dist/main.cjs.map +1 -1
  267. package/dist/module.mjs +3 -1
  268. package/dist/module.mjs.map +1 -1
  269. package/dist/types.d.ts +43 -1
  270. package/dist/types.d.ts.map +1 -1
  271. package/icons/Icon.cjs +10 -10
  272. package/icons/Icon.css +9 -9
  273. package/icons/Icon.mjs +10 -10
  274. package/icons/Skeleton.cjs +2 -2
  275. package/icons/Skeleton.cjs.map +1 -1
  276. package/icons/Skeleton.css +6 -6
  277. package/icons/Skeleton.mjs +2 -2
  278. package/icons/Skeleton.mjs.map +1 -1
  279. package/package.json +21 -21
  280. package/src/Calendar.tsx +13 -6
  281. package/src/ComboBox.tsx +20 -5
  282. package/src/DatePicker.tsx +1 -7
  283. package/src/DateRangePicker.tsx +1 -7
  284. package/src/RangeCalendar.tsx +13 -6
  285. package/src/SelectBoxGroup.tsx +408 -0
  286. package/src/SkeletonCollection.tsx +6 -2
  287. package/src/Tabs.tsx +49 -24
  288. package/src/index.ts +2 -0
  289. package/style/__tests__/style-macro.test.js +162 -166
  290. package/style/dist/main.cjs +24 -24
  291. package/style/dist/module.mjs +13 -13
  292. package/style/dist/properties.mjs +3 -3
  293. package/style/dist/spectrum-theme.cjs +219 -219
  294. package/style/dist/spectrum-theme.mjs +210 -210
  295. package/style/dist/style-macro.cjs +80 -80
  296. 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"}