@react-spectrum/s2 3.0.0-nightly-e228ed814-250129 → 3.0.0-nightly-016590a4a-250131

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 (283) hide show
  1. package/dist/Accordion.cjs +3 -3
  2. package/dist/Accordion.css +2 -2
  3. package/dist/Accordion.mjs +3 -3
  4. package/dist/ActionBar.cjs +47 -47
  5. package/dist/ActionBar.css +51 -51
  6. package/dist/ActionBar.mjs +47 -47
  7. package/dist/ActionButton.cjs +97 -97
  8. package/dist/ActionButton.css +96 -96
  9. package/dist/ActionButton.mjs +97 -97
  10. package/dist/ActionButtonGroup.cjs +11 -11
  11. package/dist/ActionButtonGroup.css +9 -9
  12. package/dist/ActionButtonGroup.mjs +11 -11
  13. package/dist/AlertDialog.cjs +3 -3
  14. package/dist/AlertDialog.css +3 -3
  15. package/dist/AlertDialog.mjs +3 -3
  16. package/dist/Avatar.cjs +17 -17
  17. package/dist/Avatar.css +14 -14
  18. package/dist/Avatar.mjs +17 -17
  19. package/dist/AvatarGroup.cjs +100 -100
  20. package/dist/AvatarGroup.css +34 -34
  21. package/dist/AvatarGroup.mjs +100 -100
  22. package/dist/Badge.cjs +92 -67
  23. package/dist/Badge.cjs.map +1 -1
  24. package/dist/Badge.css +168 -92
  25. package/dist/Badge.css.map +1 -1
  26. package/dist/Badge.mjs +92 -67
  27. package/dist/Badge.mjs.map +1 -1
  28. package/dist/Breadcrumbs.cjs +115 -115
  29. package/dist/Breadcrumbs.css +89 -89
  30. package/dist/Breadcrumbs.mjs +115 -115
  31. package/dist/Button.cjs +236 -152
  32. package/dist/Button.cjs.map +1 -1
  33. package/dist/Button.css +309 -165
  34. package/dist/Button.css.map +1 -1
  35. package/dist/Button.mjs +236 -152
  36. package/dist/Button.mjs.map +1 -1
  37. package/dist/ButtonGroup.cjs +19 -19
  38. package/dist/ButtonGroup.css +15 -15
  39. package/dist/ButtonGroup.mjs +19 -19
  40. package/dist/Card.cjs +264 -261
  41. package/dist/Card.cjs.map +1 -1
  42. package/dist/Card.css +210 -198
  43. package/dist/Card.css.map +1 -1
  44. package/dist/Card.mjs +264 -261
  45. package/dist/Card.mjs.map +1 -1
  46. package/dist/CardView.cjs +15 -15
  47. package/dist/CardView.css +18 -18
  48. package/dist/CardView.mjs +15 -15
  49. package/dist/CenterBaseline.cjs +1 -1
  50. package/dist/CenterBaseline.css +2 -2
  51. package/dist/CenterBaseline.mjs +1 -1
  52. package/dist/Checkbox.cjs +124 -73
  53. package/dist/Checkbox.cjs.map +1 -1
  54. package/dist/Checkbox.css +201 -81
  55. package/dist/Checkbox.css.map +1 -1
  56. package/dist/Checkbox.mjs +124 -73
  57. package/dist/Checkbox.mjs.map +1 -1
  58. package/dist/CheckboxGroup.cjs +49 -49
  59. package/dist/CheckboxGroup.css +41 -41
  60. package/dist/CheckboxGroup.mjs +49 -49
  61. package/dist/ClearButton.cjs +15 -15
  62. package/dist/ClearButton.css +17 -17
  63. package/dist/ClearButton.mjs +15 -15
  64. package/dist/CloseButton.cjs +35 -35
  65. package/dist/CloseButton.css +33 -33
  66. package/dist/CloseButton.mjs +35 -35
  67. package/dist/ColorArea.cjs +22 -22
  68. package/dist/ColorArea.css +15 -15
  69. package/dist/ColorArea.mjs +22 -22
  70. package/dist/ColorField.cjs +38 -38
  71. package/dist/ColorField.css +32 -32
  72. package/dist/ColorField.mjs +38 -38
  73. package/dist/ColorHandle.cjs +27 -21
  74. package/dist/ColorHandle.cjs.map +1 -1
  75. package/dist/ColorHandle.css +93 -45
  76. package/dist/ColorHandle.css.map +1 -1
  77. package/dist/ColorHandle.mjs +27 -21
  78. package/dist/ColorHandle.mjs.map +1 -1
  79. package/dist/ColorSlider.cjs +52 -52
  80. package/dist/ColorSlider.css +51 -51
  81. package/dist/ColorSlider.mjs +52 -52
  82. package/dist/ColorSwatch.cjs +27 -24
  83. package/dist/ColorSwatch.cjs.map +1 -1
  84. package/dist/ColorSwatch.css +41 -29
  85. package/dist/ColorSwatch.css.map +1 -1
  86. package/dist/ColorSwatch.mjs +27 -24
  87. package/dist/ColorSwatch.mjs.map +1 -1
  88. package/dist/ColorSwatchPicker.cjs +23 -23
  89. package/dist/ColorSwatchPicker.css +60 -48
  90. package/dist/ColorSwatchPicker.css.map +1 -1
  91. package/dist/ColorSwatchPicker.mjs +23 -23
  92. package/dist/ColorWheel.cjs +22 -22
  93. package/dist/ColorWheel.css +16 -16
  94. package/dist/ColorWheel.mjs +22 -22
  95. package/dist/ComboBox.cjs +80 -80
  96. package/dist/ComboBox.css +88 -88
  97. package/dist/ComboBox.mjs +80 -80
  98. package/dist/Content.cjs.map +1 -1
  99. package/dist/Content.mjs.map +1 -1
  100. package/dist/ContextualHelp.cjs +5 -5
  101. package/dist/ContextualHelp.css +38 -38
  102. package/dist/ContextualHelp.mjs +5 -5
  103. package/dist/CustomDialog.cjs +31 -31
  104. package/dist/CustomDialog.css +25 -25
  105. package/dist/CustomDialog.mjs +31 -31
  106. package/dist/Dialog.cjs +17 -17
  107. package/dist/Dialog.css +64 -64
  108. package/dist/Dialog.mjs +17 -17
  109. package/dist/Disclosure.cjs +111 -108
  110. package/dist/Disclosure.cjs.map +1 -1
  111. package/dist/Disclosure.css +124 -112
  112. package/dist/Disclosure.css.map +1 -1
  113. package/dist/Disclosure.mjs +111 -108
  114. package/dist/Disclosure.mjs.map +1 -1
  115. package/dist/Divider.cjs +26 -26
  116. package/dist/Divider.css +16 -16
  117. package/dist/Divider.mjs +26 -26
  118. package/dist/DropZone.cjs +56 -47
  119. package/dist/DropZone.cjs.map +1 -1
  120. package/dist/DropZone.css +80 -56
  121. package/dist/DropZone.css.map +1 -1
  122. package/dist/DropZone.mjs +56 -47
  123. package/dist/DropZone.mjs.map +1 -1
  124. package/dist/Field.cjs +204 -150
  125. package/dist/Field.cjs.map +1 -1
  126. package/dist/Field.css +246 -150
  127. package/dist/Field.css.map +1 -1
  128. package/dist/Field.mjs +204 -150
  129. package/dist/Field.mjs.map +1 -1
  130. package/dist/Form.cjs +10 -10
  131. package/dist/Form.css +9 -9
  132. package/dist/Form.mjs +10 -10
  133. package/dist/FullscreenDialog.cjs +5 -5
  134. package/dist/FullscreenDialog.css +72 -72
  135. package/dist/FullscreenDialog.mjs +5 -5
  136. package/dist/IllustratedMessage.cjs +134 -134
  137. package/dist/IllustratedMessage.css +69 -69
  138. package/dist/IllustratedMessage.mjs +134 -134
  139. package/dist/Image.cjs +12 -12
  140. package/dist/Image.css +13 -13
  141. package/dist/Image.mjs +12 -12
  142. package/dist/InlineAlert.cjs +104 -77
  143. package/dist/InlineAlert.cjs.map +1 -1
  144. package/dist/InlineAlert.css +149 -77
  145. package/dist/InlineAlert.css.map +1 -1
  146. package/dist/InlineAlert.mjs +104 -77
  147. package/dist/InlineAlert.mjs.map +1 -1
  148. package/dist/Link.cjs +31 -31
  149. package/dist/Link.css +30 -30
  150. package/dist/Link.mjs +31 -31
  151. package/dist/Menu.cjs +269 -264
  152. package/dist/Menu.cjs.map +1 -1
  153. package/dist/Menu.css +152 -152
  154. package/dist/Menu.css.map +1 -1
  155. package/dist/Menu.mjs +270 -265
  156. package/dist/Menu.mjs.map +1 -1
  157. package/dist/Meter.cjs +85 -85
  158. package/dist/Meter.css +81 -81
  159. package/dist/Meter.mjs +85 -85
  160. package/dist/Modal.cjs +48 -48
  161. package/dist/Modal.css +46 -46
  162. package/dist/Modal.mjs +48 -48
  163. package/dist/NumberField.cjs +115 -115
  164. package/dist/NumberField.css +114 -114
  165. package/dist/NumberField.mjs +115 -115
  166. package/dist/Picker.cjs +193 -175
  167. package/dist/Picker.cjs.map +1 -1
  168. package/dist/Picker.css +223 -163
  169. package/dist/Picker.css.map +1 -1
  170. package/dist/Picker.mjs +193 -175
  171. package/dist/Picker.mjs.map +1 -1
  172. package/dist/Popover.cjs +84 -78
  173. package/dist/Popover.cjs.map +1 -1
  174. package/dist/Popover.css +89 -65
  175. package/dist/Popover.css.map +1 -1
  176. package/dist/Popover.mjs +84 -78
  177. package/dist/Popover.mjs.map +1 -1
  178. package/dist/ProgressBar.cjs +98 -98
  179. package/dist/ProgressBar.css +92 -92
  180. package/dist/ProgressBar.mjs +98 -98
  181. package/dist/ProgressCircle.cjs +17 -17
  182. package/dist/ProgressCircle.css +15 -15
  183. package/dist/ProgressCircle.mjs +17 -17
  184. package/dist/Provider.cjs +4 -4
  185. package/dist/Provider.css +5 -5
  186. package/dist/Provider.mjs +4 -4
  187. package/dist/Radio.cjs +152 -80
  188. package/dist/Radio.cjs.map +1 -1
  189. package/dist/Radio.css +240 -96
  190. package/dist/Radio.css.map +1 -1
  191. package/dist/Radio.mjs +152 -80
  192. package/dist/Radio.mjs.map +1 -1
  193. package/dist/RadioGroup.cjs +47 -47
  194. package/dist/RadioGroup.css +41 -41
  195. package/dist/RadioGroup.mjs +47 -47
  196. package/dist/SearchField.cjs +42 -42
  197. package/dist/SearchField.css +47 -47
  198. package/dist/SearchField.mjs +42 -42
  199. package/dist/SegmentedControl.cjs +101 -89
  200. package/dist/SegmentedControl.cjs.map +1 -1
  201. package/dist/SegmentedControl.css +140 -92
  202. package/dist/SegmentedControl.css.map +1 -1
  203. package/dist/SegmentedControl.mjs +101 -89
  204. package/dist/SegmentedControl.mjs.map +1 -1
  205. package/dist/Slider.cjs +229 -196
  206. package/dist/Slider.cjs.map +1 -1
  207. package/dist/Slider.css +221 -149
  208. package/dist/Slider.css.map +1 -1
  209. package/dist/Slider.mjs +229 -196
  210. package/dist/Slider.mjs.map +1 -1
  211. package/dist/StatusLight.cjs +56 -56
  212. package/dist/StatusLight.css +59 -59
  213. package/dist/StatusLight.mjs +56 -56
  214. package/dist/Switch.cjs +107 -74
  215. package/dist/Switch.cjs.map +1 -1
  216. package/dist/Switch.css +141 -69
  217. package/dist/Switch.css.map +1 -1
  218. package/dist/Switch.mjs +107 -74
  219. package/dist/Switch.mjs.map +1 -1
  220. package/dist/TableView.cjs +280 -253
  221. package/dist/TableView.cjs.map +1 -1
  222. package/dist/TableView.css +199 -163
  223. package/dist/TableView.css.map +1 -1
  224. package/dist/TableView.mjs +280 -253
  225. package/dist/TableView.mjs.map +1 -1
  226. package/dist/Tabs.cjs +493 -197
  227. package/dist/Tabs.cjs.map +1 -1
  228. package/dist/Tabs.css +250 -134
  229. package/dist/Tabs.css.map +1 -1
  230. package/dist/Tabs.mjs +494 -198
  231. package/dist/Tabs.mjs.map +1 -1
  232. package/dist/TabsPicker.cjs +415 -0
  233. package/dist/TabsPicker.cjs.map +1 -0
  234. package/dist/TabsPicker.css +482 -0
  235. package/dist/TabsPicker.css.map +1 -0
  236. package/dist/TabsPicker.mjs +409 -0
  237. package/dist/TabsPicker.mjs.map +1 -0
  238. package/dist/TagGroup.cjs +148 -148
  239. package/dist/TagGroup.css +134 -134
  240. package/dist/TagGroup.mjs +148 -148
  241. package/dist/TextField.cjs +59 -59
  242. package/dist/TextField.css +62 -62
  243. package/dist/TextField.mjs +59 -59
  244. package/dist/ToggleButton.cjs +3 -3
  245. package/dist/ToggleButton.css +12 -12
  246. package/dist/ToggleButton.mjs +3 -3
  247. package/dist/Tooltip.cjs +60 -57
  248. package/dist/Tooltip.cjs.map +1 -1
  249. package/dist/Tooltip.css +83 -71
  250. package/dist/Tooltip.css.map +1 -1
  251. package/dist/Tooltip.mjs +60 -57
  252. package/dist/Tooltip.mjs.map +1 -1
  253. package/dist/TreeView.cjs +465 -0
  254. package/dist/TreeView.cjs.map +1 -0
  255. package/dist/TreeView.css +632 -0
  256. package/dist/TreeView.css.map +1 -0
  257. package/dist/TreeView.mjs +455 -0
  258. package/dist/TreeView.mjs.map +1 -0
  259. package/dist/main.cjs +4 -0
  260. package/dist/main.cjs.map +1 -1
  261. package/dist/module.mjs +3 -1
  262. package/dist/module.mjs.map +1 -1
  263. package/dist/types.d.ts +33 -8
  264. package/dist/types.d.ts.map +1 -1
  265. package/icons/Skeleton.cjs +2 -2
  266. package/icons/Skeleton.css +5 -5
  267. package/icons/Skeleton.mjs +2 -2
  268. package/package.json +21 -19
  269. package/src/Badge.tsx +4 -1
  270. package/src/Content.tsx +2 -1
  271. package/src/Menu.tsx +2 -0
  272. package/src/Tabs.tsx +450 -144
  273. package/src/TabsPicker.tsx +350 -0
  274. package/src/TreeView.tsx +497 -0
  275. package/src/index.ts +2 -0
  276. package/style/__tests__/style-macro.test.js +18 -18
  277. package/style/dist/spectrum-theme.cjs +20 -10
  278. package/style/dist/spectrum-theme.cjs.map +1 -1
  279. package/style/dist/spectrum-theme.mjs +20 -10
  280. package/style/dist/spectrum-theme.mjs.map +1 -1
  281. package/style/dist/types.d.ts +4 -0
  282. package/style/dist/types.d.ts.map +1 -1
  283. package/style/spectrum-theme.ts +18 -11
package/dist/DropZone.cjs CHANGED
@@ -40,73 +40,82 @@ $parcel$export(module.exports, "DropZone", () => $797cda10ca96fc86$export$3c6489
40
40
  const $797cda10ca96fc86$export$14a72053295ff9a6 = /*#__PURE__*/ (0, $faaBC$react.createContext)(null);
41
41
  const $797cda10ca96fc86$var$dropzone = function anonymous(props, overrides) {
42
42
  let rules = " .";
43
- let matches = (overrides || '').match(/(?:^|\s)(?:y|z|A|B|__a|_9|h|_6|_5|__B|__d|__e|__b|__c|V|__R|Y|_a|W|X|l|q|r|k|o|p)[^\s]+/g) || [];
43
+ let matches = (overrides || '').match(/(?:^|\s)(?:B|C|D|E|__d|__c|g|_9|_8|__E|__g|__h|__e|__f|Y|__U|_b|_d|Z|_a|k|p|q|j|n|o)[^\s]+/g) || [];
44
44
  rules += matches.join('');
45
- let $V = false;
46
- for (let p of matches)if (/^\s*V/.test(p)) $V = true;
47
- rules += ' _0d';
45
+ let $Y = false;
46
+ for (let p of matches)if (/^\s*Y/.test(p)) $Y = true;
48
47
  rules += ' _3d';
49
- rules += ' _2c';
50
- if (!$V) rules += ' Vc';
51
- rules += ' _d-bc1l9oh';
52
- rules += ' _d-1uotwbwg';
53
- rules += ' _d-eo0c6sf';
54
- rules += ' _d-enzzrge';
55
- rules += ' _d-enzykdd';
56
- rules += ' _d-enzwzjc';
57
- rules += ' _d-enzrfpb';
58
- rules += ' _da';
48
+ rules += ' _6d';
49
+ rules += ' _5c';
50
+ if (!$Y) rules += ' Yc';
51
+ rules += ' _g-bc1l9oh';
52
+ rules += ' _g-1uotwbwg';
53
+ rules += ' _g-eo0c6sf';
54
+ rules += ' _g-enzzrge';
55
+ rules += ' _g-enzykdd';
56
+ rules += ' _g-enzwzjc';
57
+ rules += ' _g-enzrfpb';
58
+ rules += ' _ga';
59
59
  rules += ' ao';
60
- if (props.isDropTarget) rules += ' wa';
61
- else rules += ' wb';
60
+ if (props.isDropTarget) rules += ' za';
61
+ else rules += ' zb';
62
62
  if (props.isDropTarget) rules += ' br';
63
+ rules += ' tc';
63
64
  rules += ' uc';
64
- rules += ' vc';
65
+ rules += ' rc';
65
66
  rules += ' sc';
66
- rules += ' tc';
67
- if (props.isFocusVisible) rules += ' cx';
68
- else if (props.isDropTarget) rules += ' cx';
69
- else rules += ' ci';
70
- rules += ' _wd';
71
- rules += ' _xd';
72
- rules += ' _yd';
67
+ if (props.isFocusVisible) rules += ' xx';
68
+ else if (props.isDropTarget) rules += ' xx';
69
+ else rules += ' xi';
70
+ if (props.isFocusVisible) rules += ' yx';
71
+ else if (props.isDropTarget) rules += ' yx';
72
+ else rules += ' yi';
73
+ if (props.isFocusVisible) rules += ' vx';
74
+ else if (props.isDropTarget) rules += ' vx';
75
+ else rules += ' vi';
76
+ if (props.isFocusVisible) rules += ' wx';
77
+ else if (props.isDropTarget) rules += ' wx';
78
+ else rules += ' wi';
73
79
  rules += ' _zd';
74
- rules += ' Eh';
80
+ rules += ' _Ad';
81
+ rules += ' _Bd';
82
+ rules += ' _Cd';
83
+ rules += ' Hh';
84
+ rules += ' Ih';
75
85
  rules += ' Fh';
76
- rules += ' Ch';
77
- rules += ' Dh';
86
+ rules += ' Gh';
78
87
  return rules;
79
88
  };
80
89
  const $797cda10ca96fc86$var$banner = function anonymous(props) {
81
90
  let rules = " .";
82
- rules += ' Va';
83
- rules += ' Za';
84
- rules += ' _ba';
85
- rules += ' y_d';
86
- rules += ' z_d';
87
- rules += ' _0d';
88
- rules += ' _2c';
91
+ rules += ' Ya';
92
+ rules += ' _ca';
93
+ rules += ' _ea';
94
+ rules += ' B_d';
95
+ rules += ' C_d';
89
96
  rules += ' _3d';
90
- rules += ' o-375tou';
91
- rules += ' le';
92
- if (props.size === "L") rules += ' r___L';
93
- else if (props.size === "S") rules += ' r__Z';
94
- else rules += ' r___v';
97
+ rules += ' _5c';
98
+ rules += ' _6d';
99
+ rules += ' n-375tot';
100
+ rules += ' ke';
101
+ if (props.size === "L") rules += ' q___L';
102
+ else if (props.size === "S") rules += ' q__Z';
103
+ else rules += ' q___v';
95
104
  if (props.isPressed) rules += ' b_____S';
96
105
  else if (props.isFocusVisible) rules += ' b_____S';
97
106
  else if (props.isHovered) rules += ' b_____S';
98
107
  else rules += ' b_____R';
99
- rules += ' _wc';
100
- rules += ' _xc';
101
- rules += ' _yc';
102
108
  rules += ' _zc';
109
+ rules += ' _Ac';
110
+ rules += ' _Bc';
111
+ rules += ' _Cc';
103
112
  rules += ' ac';
104
- rules += ' _fd';
105
- rules += ' E-17c1d5h';
113
+ rules += ' _id';
114
+ rules += ' H-17c1d5h';
115
+ rules += ' I-17c1d5h';
106
116
  rules += ' F-17c1d5h';
107
- rules += ' C-17c1d5h';
108
- rules += ' D-17c1d5h';
109
- rules += ' -_375tou_o-I';
117
+ rules += ' G-17c1d5h';
118
+ rules += ' -_375tot_n-I';
110
119
  return rules;
111
120
  };
112
121
  const $797cda10ca96fc86$export$3c6489d84dc98b6 = /*#__PURE__*/ (0, $faaBC$react.forwardRef)(function DropZone(props, ref) {
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;AA+BM,MAAM,0DAAkB,CAAA,GAAA,0BAAY,EAA4D;AAEvG,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BC,MAAM,2CAAW,WAAW,GAAG,CAAA,GAAA,uBAAS,EAAE,SAAS,SAAS,KAAoB,EAAE,GAA2B;IAClH,IAAI,kBAAkB,CAAA,GAAA,gDAA0B,EAAE,CAAA,GAAA,mDAAW,GAAG;IAChE,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,iDAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,QACF,OAAO,KACR,GAAG;IACJ,IAAI,SAAS,CAAA,GAAA,mCAAQ,EAAE;IAEvB,qBACE,gCAAC,CAAA,GAAA,mCAAU;QACR,GAAG,KAAK;QACT,KAAK;QACL,OAAO,MAAM,YAAY;QACzB,WAAW,CAAA,cAAe,AAAC,CAAA,MAAM,gBAAgB,IAAI,EAAC,IAAK,+BAAS,aAAa,MAAM,MAAM;kBAC5F,CAAA,4BACC;;kCACE,gCAAC,CAAA,GAAA,mDAAwB,EAAE,QAAQ;wBAAC,OAAO;4BAAC,cAAc;4BAAM,cAAc,YAAY,YAAY;kCAAE;wBAAI;kCACzG,MAAM,QAAQ;;oBAEf,YAAY,YAAY,IAAI,MAAM,QAAQ,kBAC1C,gCAAC;wBAAI,WAAW,6BAAO;kCAAC;wBAAI;kCAC1B,cAAA,gCAAC;sCACE,MAAM,cAAc,GAAG,MAAM,cAAc,GAAG,gBAAgB,MAAM,CAAC;;;;;;AAQtF","sources":["packages/@react-spectrum/s2/src/DropZone.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 {ContextValue, DropZoneRenderProps, DropZone as RACDropZone, DropZoneProps as RACDropZoneProps} from 'react-aria-components';\nimport {createContext, forwardRef, ReactNode} from 'react';\nimport {DOMProps, DOMRef, DOMRefValue} from '@react-types/shared';\nimport {getAllowedOverrides, StylesPropWithHeight, UnsafeStyles} from './style-utils' with {type: 'macro'};\nimport {IllustratedMessageContext} from './IllustratedMessage';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {style} from '../style' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface DropZoneProps extends Omit<RACDropZoneProps, 'className' | 'style' | 'children' | 'isDisabled' | 'onHover' | 'onHoverStart' | 'onHoverEnd' | 'onHoverChange'>, UnsafeStyles, DOMProps {\n /** Spectrum-defined styles, returned by the `style()` macro. */\n styles?: StylesPropWithHeight,\n /** The content to display in the drop zone. */\n children?: ReactNode,\n /** Whether the drop zone has been filled. */\n isFilled?: boolean,\n /** The message to replace the default banner message that is shown when the drop zone is filled. */\n replaceMessage?: string,\n /**\n * The size of the DropZone.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L'\n}\n\nexport const DropZoneContext = createContext<ContextValue<DropZoneProps, DOMRefValue<HTMLDivElement>>>(null);\n\nconst dropzone = style<DropZoneRenderProps>({\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n position: 'relative',\n fontFamily: 'sans',\n color: 'gray-900',\n borderStyle: {\n default: 'dashed',\n isDropTarget: 'solid'\n },\n backgroundColor: {\n isDropTarget: 'blue-200'\n },\n borderWidth: 2,\n borderColor: {\n default: 'gray-300',\n isDropTarget: 'blue-800',\n isFocusVisible: 'blue-800'\n },\n borderRadius: 'lg',\n padding: 24\n}, getAllowedOverrides({height: true}));\n\nconst banner = style({\n position: 'absolute',\n left: 0,\n right: 0,\n marginX: 'auto',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n minHeight: 20,\n width: 'fit',\n maxWidth: {\n default: 192,\n size: {\n S: 160,\n L: 208\n }\n },\n backgroundColor: 'accent',\n borderRadius: 'default',\n color: 'white',\n fontWeight: 'bold',\n padding: '[calc((self(minHeight))/1.5)]'\n});\n\n/**\n * A drop zone is an area into which one or multiple objects can be dragged and dropped.\n */\nexport const DropZone = /*#__PURE__*/ forwardRef(function DropZone(props: DropZoneProps, ref: DOMRef<HTMLDivElement>) {\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/s2');\n [props, ref] = useSpectrumContextProps(props, ref, DropZoneContext);\n let {\n size = 'M'\n } = props;\n let domRef = useDOMRef(ref);\n\n return (\n <RACDropZone\n {...props}\n ref={domRef}\n style={props.UNSAFE_style}\n className={renderProps => (props.UNSAFE_className || '') + dropzone(renderProps, props.styles)}>\n {renderProps => (\n <>\n <IllustratedMessageContext.Provider value={{isInDropZone: true, isDropTarget: renderProps.isDropTarget, size}}>\n {props.children}\n </IllustratedMessageContext.Provider>\n {(renderProps.isDropTarget && props.isFilled) &&\n <div className={banner({size})}>\n <span>\n {props.replaceMessage ? props.replaceMessage : stringFormatter.format('dropzone.replaceMessage')}\n </span>\n </div>\n }\n </>\n )}\n </RACDropZone>\n );\n});\n"],"names":[],"version":3,"file":"DropZone.cjs.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;AA+BM,MAAM,0DAAkB,CAAA,GAAA,0BAAY,EAA4D;AAEvG,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BC,MAAM,2CAAW,WAAW,GAAG,CAAA,GAAA,uBAAS,EAAE,SAAS,SAAS,KAAoB,EAAE,GAA2B;IAClH,IAAI,kBAAkB,CAAA,GAAA,gDAA0B,EAAE,CAAA,GAAA,mDAAW,GAAG;IAChE,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,iDAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,QACF,OAAO,KACR,GAAG;IACJ,IAAI,SAAS,CAAA,GAAA,mCAAQ,EAAE;IAEvB,qBACE,gCAAC,CAAA,GAAA,mCAAU;QACR,GAAG,KAAK;QACT,KAAK;QACL,OAAO,MAAM,YAAY;QACzB,WAAW,CAAA,cAAe,AAAC,CAAA,MAAM,gBAAgB,IAAI,EAAC,IAAK,+BAAS,aAAa,MAAM,MAAM;kBAC5F,CAAA,4BACC;;kCACE,gCAAC,CAAA,GAAA,mDAAwB,EAAE,QAAQ;wBAAC,OAAO;4BAAC,cAAc;4BAAM,cAAc,YAAY,YAAY;kCAAE;wBAAI;kCACzG,MAAM,QAAQ;;oBAEf,YAAY,YAAY,IAAI,MAAM,QAAQ,kBAC1C,gCAAC;wBAAI,WAAW,6BAAO;kCAAC;wBAAI;kCAC1B,cAAA,gCAAC;sCACE,MAAM,cAAc,GAAG,MAAM,cAAc,GAAG,gBAAgB,MAAM,CAAC;;;;;;AAQtF","sources":["packages/@react-spectrum/s2/src/DropZone.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 {ContextValue, DropZoneRenderProps, DropZone as RACDropZone, DropZoneProps as RACDropZoneProps} from 'react-aria-components';\nimport {createContext, forwardRef, ReactNode} from 'react';\nimport {DOMProps, DOMRef, DOMRefValue} from '@react-types/shared';\nimport {getAllowedOverrides, StylesPropWithHeight, UnsafeStyles} from './style-utils' with {type: 'macro'};\nimport {IllustratedMessageContext} from './IllustratedMessage';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {style} from '../style' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface DropZoneProps extends Omit<RACDropZoneProps, 'className' | 'style' | 'children' | 'isDisabled' | 'onHover' | 'onHoverStart' | 'onHoverEnd' | 'onHoverChange'>, UnsafeStyles, DOMProps {\n /** Spectrum-defined styles, returned by the `style()` macro. */\n styles?: StylesPropWithHeight,\n /** The content to display in the drop zone. */\n children?: ReactNode,\n /** Whether the drop zone has been filled. */\n isFilled?: boolean,\n /** The message to replace the default banner message that is shown when the drop zone is filled. */\n replaceMessage?: string,\n /**\n * The size of the DropZone.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L'\n}\n\nexport const DropZoneContext = createContext<ContextValue<DropZoneProps, DOMRefValue<HTMLDivElement>>>(null);\n\nconst dropzone = style<DropZoneRenderProps>({\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n position: 'relative',\n fontFamily: 'sans',\n color: 'gray-900',\n borderStyle: {\n default: 'dashed',\n isDropTarget: 'solid'\n },\n backgroundColor: {\n isDropTarget: 'blue-200'\n },\n borderWidth: 2,\n borderColor: {\n default: 'gray-300',\n isDropTarget: 'blue-800',\n isFocusVisible: 'blue-800'\n },\n borderRadius: 'lg',\n padding: 24\n}, getAllowedOverrides({height: true}));\n\nconst banner = style({\n position: 'absolute',\n left: 0,\n right: 0,\n marginX: 'auto',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n minHeight: 20,\n width: 'fit',\n maxWidth: {\n default: 192,\n size: {\n S: 160,\n L: 208\n }\n },\n backgroundColor: 'accent',\n borderRadius: 'default',\n color: 'white',\n fontWeight: 'bold',\n padding: '[calc((self(minHeight))/1.5)]'\n});\n\n/**\n * A drop zone is an area into which one or multiple objects can be dragged and dropped.\n */\nexport const DropZone = /*#__PURE__*/ forwardRef(function DropZone(props: DropZoneProps, ref: DOMRef<HTMLDivElement>) {\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/s2');\n [props, ref] = useSpectrumContextProps(props, ref, DropZoneContext);\n let {\n size = 'M'\n } = props;\n let domRef = useDOMRef(ref);\n\n return (\n <RACDropZone\n {...props}\n ref={domRef}\n style={props.UNSAFE_style}\n className={renderProps => (props.UNSAFE_className || '') + dropzone(renderProps, props.styles)}>\n {renderProps => (\n <>\n <IllustratedMessageContext.Provider value={{isInDropZone: true, isDropTarget: renderProps.isDropTarget, size}}>\n {props.children}\n </IllustratedMessageContext.Provider>\n {(renderProps.isDropTarget && props.isFilled) &&\n <div className={banner({size})}>\n <span>\n {props.replaceMessage ? props.replaceMessage : stringFormatter.format('dropzone.replaceMessage')}\n </span>\n </div>\n }\n </>\n )}\n </RACDropZone>\n );\n});\n"],"names":[],"version":3,"file":"DropZone.cjs.map"}
package/dist/DropZone.css CHANGED
@@ -1,9 +1,9 @@
1
1
  @layer _.a {
2
- .Vc {
2
+ .Yc {
3
3
  position: relative;
4
4
  }
5
5
 
6
- ._da {
6
+ ._ga {
7
7
  font-family: adobe-clean-variable, adobe-clean, ui-sans-serif, system-ui, sans-serif;
8
8
  }
9
9
 
@@ -11,11 +11,11 @@
11
11
  color: var(--lightningcss-light, #131313) var(--lightningcss-dark, #f2f2f2);
12
12
  }
13
13
 
14
- .wb {
14
+ .zb {
15
15
  border-style: dashed;
16
16
  }
17
17
 
18
- .wa {
18
+ .za {
19
19
  border-style: solid;
20
20
  }
21
21
 
@@ -23,111 +23,135 @@
23
23
  background-color: var(--lightningcss-light, #e5f0fe) var(--lightningcss-dark, #0f1c52);
24
24
  }
25
25
 
26
- .uc {
26
+ .tc {
27
27
  border-top-width: 2px;
28
28
  }
29
29
 
30
- .vc {
30
+ .uc {
31
31
  border-bottom-width: 2px;
32
32
  }
33
33
 
34
- .sc {
34
+ .rc {
35
35
  border-inline-start-width: 2px;
36
36
  }
37
37
 
38
- .tc {
38
+ .sc {
39
39
  border-inline-end-width: 2px;
40
40
  }
41
41
 
42
- .ci {
43
- border-color: var(--lightningcss-light, #dadada) var(--lightningcss-dark, #393939);
42
+ .xi {
43
+ border-top-color: var(--lightningcss-light, #dadada) var(--lightningcss-dark, #393939);
44
+ }
45
+
46
+ .xx {
47
+ border-top-color: var(--lightningcss-light, #4b75ff) var(--lightningcss-dark, #4069fd);
48
+ }
49
+
50
+ .yi {
51
+ border-bottom-color: var(--lightningcss-light, #dadada) var(--lightningcss-dark, #393939);
52
+ }
53
+
54
+ .yx {
55
+ border-bottom-color: var(--lightningcss-light, #4b75ff) var(--lightningcss-dark, #4069fd);
56
+ }
57
+
58
+ .vi {
59
+ border-inline-start-color: var(--lightningcss-light, #dadada) var(--lightningcss-dark, #393939);
44
60
  }
45
61
 
46
- .cx {
47
- border-color: var(--lightningcss-light, #4b75ff) var(--lightningcss-dark, #4069fd);
62
+ .vx {
63
+ border-inline-start-color: var(--lightningcss-light, #4b75ff) var(--lightningcss-dark, #4069fd);
48
64
  }
49
65
 
50
- ._wd {
66
+ .wi {
67
+ border-inline-end-color: var(--lightningcss-light, #dadada) var(--lightningcss-dark, #393939);
68
+ }
69
+
70
+ .wx {
71
+ border-inline-end-color: var(--lightningcss-light, #4b75ff) var(--lightningcss-dark, #4069fd);
72
+ }
73
+
74
+ ._zd {
51
75
  border-start-start-radius: .625rem;
52
76
  }
53
77
 
54
- ._xd {
78
+ ._Ad {
55
79
  border-start-end-radius: .625rem;
56
80
  }
57
81
 
58
- ._yd {
82
+ ._Bd {
59
83
  border-end-start-radius: .625rem;
60
84
  }
61
85
 
62
- ._zd {
86
+ ._Cd {
63
87
  border-end-end-radius: .625rem;
64
88
  }
65
89
 
66
- .Eh {
90
+ .Hh {
67
91
  padding-top: 1.5rem;
68
92
  }
69
93
 
70
- .Fh {
94
+ .Ih {
71
95
  padding-bottom: 1.5rem;
72
96
  }
73
97
 
74
- .Ch {
98
+ .Fh {
75
99
  padding-inline-start: 1.5rem;
76
100
  }
77
101
 
78
- .Dh {
102
+ .Gh {
79
103
  padding-inline-end: 1.5rem;
80
104
  }
81
105
 
82
- .Va {
106
+ .Ya {
83
107
  position: absolute;
84
108
  }
85
109
 
86
- .Za {
110
+ ._ca {
87
111
  left: 0;
88
112
  }
89
113
 
90
- ._ba {
114
+ ._ea {
91
115
  right: 0;
92
116
  }
93
117
 
94
- .y_d {
118
+ .B_d {
95
119
  margin-inline-start: auto;
96
120
  }
97
121
 
98
- .z_d {
122
+ .C_d {
99
123
  margin-inline-end: auto;
100
124
  }
101
125
 
102
- ._0d {
126
+ ._3d {
103
127
  display: flex;
104
128
  }
105
129
 
106
- ._2c {
130
+ ._5c {
107
131
  align-items: center;
108
132
  }
109
133
 
110
- ._3d {
134
+ ._6d {
111
135
  justify-content: center;
112
136
  }
113
137
 
114
- .o-375tou {
115
- min-height: var(--o);
138
+ .n-375tot {
139
+ min-height: var(--n);
116
140
  }
117
141
 
118
- .le {
142
+ .ke {
119
143
  width: fit-content;
120
144
  }
121
145
 
122
- .r___v {
146
+ .q___v {
123
147
  max-width: calc(12rem * var(--s2-scale));
124
148
  }
125
149
 
126
- .r__Z {
150
+ .q__Z {
127
151
  max-width: calc(10rem * var(--s2-scale));
128
152
  }
129
153
 
130
- .r___L {
154
+ .q___L {
131
155
  max-width: calc(13rem * var(--s2-scale));
132
156
  }
133
157
 
@@ -139,19 +163,19 @@
139
163
  background-color: var(--lightningcss-light, #274dea) var(--lightningcss-dark, #345bf8);
140
164
  }
141
165
 
142
- ._wc {
166
+ ._zc {
143
167
  border-start-start-radius: .5rem;
144
168
  }
145
169
 
146
- ._xc {
170
+ ._Ac {
147
171
  border-start-end-radius: .5rem;
148
172
  }
149
173
 
150
- ._yc {
174
+ ._Bc {
151
175
  border-end-start-radius: .5rem;
152
176
  }
153
177
 
154
- ._zc {
178
+ ._Cc {
155
179
  border-end-end-radius: .5rem;
156
180
  }
157
181
 
@@ -159,71 +183,71 @@
159
183
  color: #fff;
160
184
  }
161
185
 
162
- ._fd {
186
+ ._id {
163
187
  font-variation-settings: "wght" 700;
164
188
  font-synthesis-weight: none;
165
189
  font-weight: 700;
166
190
  }
167
191
 
168
- .E-17c1d5h {
169
- padding-top: calc((var(--o)) / 1.5);
192
+ .H-17c1d5h {
193
+ padding-top: calc((var(--n)) / 1.5);
170
194
  }
171
195
 
172
- .F-17c1d5h {
173
- padding-bottom: calc((var(--o)) / 1.5);
196
+ .I-17c1d5h {
197
+ padding-bottom: calc((var(--n)) / 1.5);
174
198
  }
175
199
 
176
- .C-17c1d5h {
177
- padding-inline-start: calc((var(--o)) / 1.5);
200
+ .F-17c1d5h {
201
+ padding-inline-start: calc((var(--n)) / 1.5);
178
202
  }
179
203
 
180
- .D-17c1d5h {
181
- padding-inline-end: calc((var(--o)) / 1.5);
204
+ .G-17c1d5h {
205
+ padding-inline-end: calc((var(--n)) / 1.5);
182
206
  }
183
207
 
184
- .-_375tou_o-I {
185
- --o: calc(1.25rem * var(--s2-scale));
208
+ .-_375tot_n-I {
209
+ --n: calc(1.25rem * var(--s2-scale));
186
210
  }
187
211
  }
188
212
 
189
213
  @layer _.b {
190
- ._d-enzrfpb:lang(ar) {
214
+ ._g-enzrfpb:lang(ar) {
191
215
  font-family: myriad-arabic, ui-sans-serif, system-ui, sans-serif;
192
216
  }
193
217
  }
194
218
 
195
219
  @layer _.c {
196
- ._d-enzwzjc:lang(he) {
220
+ ._g-enzwzjc:lang(he) {
197
221
  font-family: myriad-hebrew, ui-sans-serif, system-ui, sans-serif;
198
222
  }
199
223
  }
200
224
 
201
225
  @layer _.d {
202
- ._d-enzykdd:lang(ja) {
226
+ ._g-enzykdd:lang(ja) {
203
227
  font-family: adobe-clean-han-japanese, Hiragino Kaku Gothic ProN, ヒラギノ角ゴ ProN W3, Osaka, YuGothic, Yu Gothic, メイリオ, Meiryo, MS Pゴシック, MS PGothic, sans-serif;
204
228
  }
205
229
  }
206
230
 
207
231
  @layer _.e {
208
- ._d-enzzrge:lang(ko) {
232
+ ._g-enzzrge:lang(ko) {
209
233
  font-family: adobe-clean-han-korean, source-han-korean, Malgun Gothic, Apple Gothic, sans-serif;
210
234
  }
211
235
  }
212
236
 
213
237
  @layer _.f {
214
- ._d-eo0c6sf:lang(zh) {
238
+ ._g-eo0c6sf:lang(zh) {
215
239
  font-family: adobe-clean-han-traditional, source-han-traditional, MingLiu, Heiti TC Light, sans-serif;
216
240
  }
217
241
  }
218
242
 
219
243
  @layer _.g {
220
- ._d-1uotwbwg:lang(zh-hant) {
244
+ ._g-1uotwbwg:lang(zh-hant) {
221
245
  font-family: adobe-clean-han-traditional, source-han-traditional, MingLiu, Microsoft JhengHei UI, Microsoft JhengHei, Heiti TC Light, sans-serif;
222
246
  }
223
247
  }
224
248
 
225
249
  @layer _.h {
226
- ._d-bc1l9oh:is(:lang(zh-Hans), :lang(zh-CN), :lang(zh-SG)) {
250
+ ._g-bc1l9oh:is(:lang(zh-Hans), :lang(zh-CN), :lang(zh-SG)) {
227
251
  font-family: adobe-clean-han-simplified-c, source-han-simplified-c, SimSun, Heiti SC Light, sans-serif;
228
252
  }
229
253
  }
@@ -1 +1 @@
1
- {"mappings":"AC2CiB;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAwBF;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;AAxBE;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA","sources":["1c1855bb3a6aeea4","packages/@react-spectrum/s2/src/DropZone.tsx"],"sourcesContent":["@import \"ab564bdb126b567b\";\n@import \"d5049ba06c2da1c6\";\n","/*\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 {ContextValue, DropZoneRenderProps, DropZone as RACDropZone, DropZoneProps as RACDropZoneProps} from 'react-aria-components';\nimport {createContext, forwardRef, ReactNode} from 'react';\nimport {DOMProps, DOMRef, DOMRefValue} from '@react-types/shared';\nimport {getAllowedOverrides, StylesPropWithHeight, UnsafeStyles} from './style-utils' with {type: 'macro'};\nimport {IllustratedMessageContext} from './IllustratedMessage';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {style} from '../style' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface DropZoneProps extends Omit<RACDropZoneProps, 'className' | 'style' | 'children' | 'isDisabled' | 'onHover' | 'onHoverStart' | 'onHoverEnd' | 'onHoverChange'>, UnsafeStyles, DOMProps {\n /** Spectrum-defined styles, returned by the `style()` macro. */\n styles?: StylesPropWithHeight,\n /** The content to display in the drop zone. */\n children?: ReactNode,\n /** Whether the drop zone has been filled. */\n isFilled?: boolean,\n /** The message to replace the default banner message that is shown when the drop zone is filled. */\n replaceMessage?: string,\n /**\n * The size of the DropZone.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L'\n}\n\nexport const DropZoneContext = createContext<ContextValue<DropZoneProps, DOMRefValue<HTMLDivElement>>>(null);\n\nconst dropzone = style<DropZoneRenderProps>({\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n position: 'relative',\n fontFamily: 'sans',\n color: 'gray-900',\n borderStyle: {\n default: 'dashed',\n isDropTarget: 'solid'\n },\n backgroundColor: {\n isDropTarget: 'blue-200'\n },\n borderWidth: 2,\n borderColor: {\n default: 'gray-300',\n isDropTarget: 'blue-800',\n isFocusVisible: 'blue-800'\n },\n borderRadius: 'lg',\n padding: 24\n}, getAllowedOverrides({height: true}));\n\nconst banner = style({\n position: 'absolute',\n left: 0,\n right: 0,\n marginX: 'auto',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n minHeight: 20,\n width: 'fit',\n maxWidth: {\n default: 192,\n size: {\n S: 160,\n L: 208\n }\n },\n backgroundColor: 'accent',\n borderRadius: 'default',\n color: 'white',\n fontWeight: 'bold',\n padding: '[calc((self(minHeight))/1.5)]'\n});\n\n/**\n * A drop zone is an area into which one or multiple objects can be dragged and dropped.\n */\nexport const DropZone = /*#__PURE__*/ forwardRef(function DropZone(props: DropZoneProps, ref: DOMRef<HTMLDivElement>) {\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/s2');\n [props, ref] = useSpectrumContextProps(props, ref, DropZoneContext);\n let {\n size = 'M'\n } = props;\n let domRef = useDOMRef(ref);\n\n return (\n <RACDropZone\n {...props}\n ref={domRef}\n style={props.UNSAFE_style}\n className={renderProps => (props.UNSAFE_className || '') + dropzone(renderProps, props.styles)}>\n {renderProps => (\n <>\n <IllustratedMessageContext.Provider value={{isInDropZone: true, isDropTarget: renderProps.isDropTarget, size}}>\n {props.children}\n </IllustratedMessageContext.Provider>\n {(renderProps.isDropTarget && props.isFilled) &&\n <div className={banner({size})}>\n <span>\n {props.replaceMessage ? props.replaceMessage : stringFormatter.format('dropzone.replaceMessage')}\n </span>\n </div>\n }\n </>\n )}\n </RACDropZone>\n );\n});\n"],"names":[],"version":3,"file":"DropZone.css.map"}
1
+ {"mappings":"AC2CiB;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAwBF;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;AAxBE;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA","sources":["1c1855bb3a6aeea4","packages/@react-spectrum/s2/src/DropZone.tsx"],"sourcesContent":["@import \"ab564bdb126b567b\";\n@import \"d5049ba06c2da1c6\";\n","/*\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 {ContextValue, DropZoneRenderProps, DropZone as RACDropZone, DropZoneProps as RACDropZoneProps} from 'react-aria-components';\nimport {createContext, forwardRef, ReactNode} from 'react';\nimport {DOMProps, DOMRef, DOMRefValue} from '@react-types/shared';\nimport {getAllowedOverrides, StylesPropWithHeight, UnsafeStyles} from './style-utils' with {type: 'macro'};\nimport {IllustratedMessageContext} from './IllustratedMessage';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {style} from '../style' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface DropZoneProps extends Omit<RACDropZoneProps, 'className' | 'style' | 'children' | 'isDisabled' | 'onHover' | 'onHoverStart' | 'onHoverEnd' | 'onHoverChange'>, UnsafeStyles, DOMProps {\n /** Spectrum-defined styles, returned by the `style()` macro. */\n styles?: StylesPropWithHeight,\n /** The content to display in the drop zone. */\n children?: ReactNode,\n /** Whether the drop zone has been filled. */\n isFilled?: boolean,\n /** The message to replace the default banner message that is shown when the drop zone is filled. */\n replaceMessage?: string,\n /**\n * The size of the DropZone.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L'\n}\n\nexport const DropZoneContext = createContext<ContextValue<DropZoneProps, DOMRefValue<HTMLDivElement>>>(null);\n\nconst dropzone = style<DropZoneRenderProps>({\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n position: 'relative',\n fontFamily: 'sans',\n color: 'gray-900',\n borderStyle: {\n default: 'dashed',\n isDropTarget: 'solid'\n },\n backgroundColor: {\n isDropTarget: 'blue-200'\n },\n borderWidth: 2,\n borderColor: {\n default: 'gray-300',\n isDropTarget: 'blue-800',\n isFocusVisible: 'blue-800'\n },\n borderRadius: 'lg',\n padding: 24\n}, getAllowedOverrides({height: true}));\n\nconst banner = style({\n position: 'absolute',\n left: 0,\n right: 0,\n marginX: 'auto',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n minHeight: 20,\n width: 'fit',\n maxWidth: {\n default: 192,\n size: {\n S: 160,\n L: 208\n }\n },\n backgroundColor: 'accent',\n borderRadius: 'default',\n color: 'white',\n fontWeight: 'bold',\n padding: '[calc((self(minHeight))/1.5)]'\n});\n\n/**\n * A drop zone is an area into which one or multiple objects can be dragged and dropped.\n */\nexport const DropZone = /*#__PURE__*/ forwardRef(function DropZone(props: DropZoneProps, ref: DOMRef<HTMLDivElement>) {\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/s2');\n [props, ref] = useSpectrumContextProps(props, ref, DropZoneContext);\n let {\n size = 'M'\n } = props;\n let domRef = useDOMRef(ref);\n\n return (\n <RACDropZone\n {...props}\n ref={domRef}\n style={props.UNSAFE_style}\n className={renderProps => (props.UNSAFE_className || '') + dropzone(renderProps, props.styles)}>\n {renderProps => (\n <>\n <IllustratedMessageContext.Provider value={{isInDropZone: true, isDropTarget: renderProps.isDropTarget, size}}>\n {props.children}\n </IllustratedMessageContext.Provider>\n {(renderProps.isDropTarget && props.isFilled) &&\n <div className={banner({size})}>\n <span>\n {props.replaceMessage ? props.replaceMessage : stringFormatter.format('dropzone.replaceMessage')}\n </span>\n </div>\n }\n </>\n )}\n </RACDropZone>\n );\n});\n"],"names":[],"version":3,"file":"DropZone.css.map"}
package/dist/DropZone.mjs CHANGED
@@ -33,73 +33,82 @@ function $parcel$interopDefault(a) {
33
33
  const $fb6e45fba2483f65$export$14a72053295ff9a6 = /*#__PURE__*/ (0, $4h9kk$createContext)(null);
34
34
  const $fb6e45fba2483f65$var$dropzone = function anonymous(props, overrides) {
35
35
  let rules = " .";
36
- let matches = (overrides || '').match(/(?:^|\s)(?:y|z|A|B|__a|_9|h|_6|_5|__B|__d|__e|__b|__c|V|__R|Y|_a|W|X|l|q|r|k|o|p)[^\s]+/g) || [];
36
+ let matches = (overrides || '').match(/(?:^|\s)(?:B|C|D|E|__d|__c|g|_9|_8|__E|__g|__h|__e|__f|Y|__U|_b|_d|Z|_a|k|p|q|j|n|o)[^\s]+/g) || [];
37
37
  rules += matches.join('');
38
- let $V = false;
39
- for (let p of matches)if (/^\s*V/.test(p)) $V = true;
40
- rules += ' _0d';
38
+ let $Y = false;
39
+ for (let p of matches)if (/^\s*Y/.test(p)) $Y = true;
41
40
  rules += ' _3d';
42
- rules += ' _2c';
43
- if (!$V) rules += ' Vc';
44
- rules += ' _d-bc1l9oh';
45
- rules += ' _d-1uotwbwg';
46
- rules += ' _d-eo0c6sf';
47
- rules += ' _d-enzzrge';
48
- rules += ' _d-enzykdd';
49
- rules += ' _d-enzwzjc';
50
- rules += ' _d-enzrfpb';
51
- rules += ' _da';
41
+ rules += ' _6d';
42
+ rules += ' _5c';
43
+ if (!$Y) rules += ' Yc';
44
+ rules += ' _g-bc1l9oh';
45
+ rules += ' _g-1uotwbwg';
46
+ rules += ' _g-eo0c6sf';
47
+ rules += ' _g-enzzrge';
48
+ rules += ' _g-enzykdd';
49
+ rules += ' _g-enzwzjc';
50
+ rules += ' _g-enzrfpb';
51
+ rules += ' _ga';
52
52
  rules += ' ao';
53
- if (props.isDropTarget) rules += ' wa';
54
- else rules += ' wb';
53
+ if (props.isDropTarget) rules += ' za';
54
+ else rules += ' zb';
55
55
  if (props.isDropTarget) rules += ' br';
56
+ rules += ' tc';
56
57
  rules += ' uc';
57
- rules += ' vc';
58
+ rules += ' rc';
58
59
  rules += ' sc';
59
- rules += ' tc';
60
- if (props.isFocusVisible) rules += ' cx';
61
- else if (props.isDropTarget) rules += ' cx';
62
- else rules += ' ci';
63
- rules += ' _wd';
64
- rules += ' _xd';
65
- rules += ' _yd';
60
+ if (props.isFocusVisible) rules += ' xx';
61
+ else if (props.isDropTarget) rules += ' xx';
62
+ else rules += ' xi';
63
+ if (props.isFocusVisible) rules += ' yx';
64
+ else if (props.isDropTarget) rules += ' yx';
65
+ else rules += ' yi';
66
+ if (props.isFocusVisible) rules += ' vx';
67
+ else if (props.isDropTarget) rules += ' vx';
68
+ else rules += ' vi';
69
+ if (props.isFocusVisible) rules += ' wx';
70
+ else if (props.isDropTarget) rules += ' wx';
71
+ else rules += ' wi';
66
72
  rules += ' _zd';
67
- rules += ' Eh';
73
+ rules += ' _Ad';
74
+ rules += ' _Bd';
75
+ rules += ' _Cd';
76
+ rules += ' Hh';
77
+ rules += ' Ih';
68
78
  rules += ' Fh';
69
- rules += ' Ch';
70
- rules += ' Dh';
79
+ rules += ' Gh';
71
80
  return rules;
72
81
  };
73
82
  const $fb6e45fba2483f65$var$banner = function anonymous(props) {
74
83
  let rules = " .";
75
- rules += ' Va';
76
- rules += ' Za';
77
- rules += ' _ba';
78
- rules += ' y_d';
79
- rules += ' z_d';
80
- rules += ' _0d';
81
- rules += ' _2c';
84
+ rules += ' Ya';
85
+ rules += ' _ca';
86
+ rules += ' _ea';
87
+ rules += ' B_d';
88
+ rules += ' C_d';
82
89
  rules += ' _3d';
83
- rules += ' o-375tou';
84
- rules += ' le';
85
- if (props.size === "L") rules += ' r___L';
86
- else if (props.size === "S") rules += ' r__Z';
87
- else rules += ' r___v';
90
+ rules += ' _5c';
91
+ rules += ' _6d';
92
+ rules += ' n-375tot';
93
+ rules += ' ke';
94
+ if (props.size === "L") rules += ' q___L';
95
+ else if (props.size === "S") rules += ' q__Z';
96
+ else rules += ' q___v';
88
97
  if (props.isPressed) rules += ' b_____S';
89
98
  else if (props.isFocusVisible) rules += ' b_____S';
90
99
  else if (props.isHovered) rules += ' b_____S';
91
100
  else rules += ' b_____R';
92
- rules += ' _wc';
93
- rules += ' _xc';
94
- rules += ' _yc';
95
101
  rules += ' _zc';
102
+ rules += ' _Ac';
103
+ rules += ' _Bc';
104
+ rules += ' _Cc';
96
105
  rules += ' ac';
97
- rules += ' _fd';
98
- rules += ' E-17c1d5h';
106
+ rules += ' _id';
107
+ rules += ' H-17c1d5h';
108
+ rules += ' I-17c1d5h';
99
109
  rules += ' F-17c1d5h';
100
- rules += ' C-17c1d5h';
101
- rules += ' D-17c1d5h';
102
- rules += ' -_375tou_o-I';
110
+ rules += ' G-17c1d5h';
111
+ rules += ' -_375tot_n-I';
103
112
  return rules;
104
113
  };
105
114
  const $fb6e45fba2483f65$export$3c6489d84dc98b6 = /*#__PURE__*/ (0, $4h9kk$forwardRef)(function DropZone(props, ref) {
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;AA+BM,MAAM,0DAAkB,CAAA,GAAA,oBAAY,EAA4D;AAEvG,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BC,MAAM,2CAAW,WAAW,GAAG,CAAA,GAAA,iBAAS,EAAE,SAAS,SAAS,KAAoB,EAAE,GAA2B;IAClH,IAAI,kBAAkB,CAAA,GAAA,kCAA0B,EAAE,CAAA,GAAA,+CAAW,GAAG;IAChE,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,QACF,OAAO,KACR,GAAG;IACJ,IAAI,SAAS,CAAA,GAAA,gBAAQ,EAAE;IAEvB,qBACE,gBAAC,CAAA,GAAA,eAAU;QACR,GAAG,KAAK;QACT,KAAK;QACL,OAAO,MAAM,YAAY;QACzB,WAAW,CAAA,cAAe,AAAC,CAAA,MAAM,gBAAgB,IAAI,EAAC,IAAK,+BAAS,aAAa,MAAM,MAAM;kBAC5F,CAAA,4BACC;;kCACE,gBAAC,CAAA,GAAA,yCAAwB,EAAE,QAAQ;wBAAC,OAAO;4BAAC,cAAc;4BAAM,cAAc,YAAY,YAAY;kCAAE;wBAAI;kCACzG,MAAM,QAAQ;;oBAEf,YAAY,YAAY,IAAI,MAAM,QAAQ,kBAC1C,gBAAC;wBAAI,WAAW,6BAAO;kCAAC;wBAAI;kCAC1B,cAAA,gBAAC;sCACE,MAAM,cAAc,GAAG,MAAM,cAAc,GAAG,gBAAgB,MAAM,CAAC;;;;;;AAQtF","sources":["packages/@react-spectrum/s2/src/DropZone.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 {ContextValue, DropZoneRenderProps, DropZone as RACDropZone, DropZoneProps as RACDropZoneProps} from 'react-aria-components';\nimport {createContext, forwardRef, ReactNode} from 'react';\nimport {DOMProps, DOMRef, DOMRefValue} from '@react-types/shared';\nimport {getAllowedOverrides, StylesPropWithHeight, UnsafeStyles} from './style-utils' with {type: 'macro'};\nimport {IllustratedMessageContext} from './IllustratedMessage';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {style} from '../style' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface DropZoneProps extends Omit<RACDropZoneProps, 'className' | 'style' | 'children' | 'isDisabled' | 'onHover' | 'onHoverStart' | 'onHoverEnd' | 'onHoverChange'>, UnsafeStyles, DOMProps {\n /** Spectrum-defined styles, returned by the `style()` macro. */\n styles?: StylesPropWithHeight,\n /** The content to display in the drop zone. */\n children?: ReactNode,\n /** Whether the drop zone has been filled. */\n isFilled?: boolean,\n /** The message to replace the default banner message that is shown when the drop zone is filled. */\n replaceMessage?: string,\n /**\n * The size of the DropZone.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L'\n}\n\nexport const DropZoneContext = createContext<ContextValue<DropZoneProps, DOMRefValue<HTMLDivElement>>>(null);\n\nconst dropzone = style<DropZoneRenderProps>({\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n position: 'relative',\n fontFamily: 'sans',\n color: 'gray-900',\n borderStyle: {\n default: 'dashed',\n isDropTarget: 'solid'\n },\n backgroundColor: {\n isDropTarget: 'blue-200'\n },\n borderWidth: 2,\n borderColor: {\n default: 'gray-300',\n isDropTarget: 'blue-800',\n isFocusVisible: 'blue-800'\n },\n borderRadius: 'lg',\n padding: 24\n}, getAllowedOverrides({height: true}));\n\nconst banner = style({\n position: 'absolute',\n left: 0,\n right: 0,\n marginX: 'auto',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n minHeight: 20,\n width: 'fit',\n maxWidth: {\n default: 192,\n size: {\n S: 160,\n L: 208\n }\n },\n backgroundColor: 'accent',\n borderRadius: 'default',\n color: 'white',\n fontWeight: 'bold',\n padding: '[calc((self(minHeight))/1.5)]'\n});\n\n/**\n * A drop zone is an area into which one or multiple objects can be dragged and dropped.\n */\nexport const DropZone = /*#__PURE__*/ forwardRef(function DropZone(props: DropZoneProps, ref: DOMRef<HTMLDivElement>) {\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/s2');\n [props, ref] = useSpectrumContextProps(props, ref, DropZoneContext);\n let {\n size = 'M'\n } = props;\n let domRef = useDOMRef(ref);\n\n return (\n <RACDropZone\n {...props}\n ref={domRef}\n style={props.UNSAFE_style}\n className={renderProps => (props.UNSAFE_className || '') + dropzone(renderProps, props.styles)}>\n {renderProps => (\n <>\n <IllustratedMessageContext.Provider value={{isInDropZone: true, isDropTarget: renderProps.isDropTarget, size}}>\n {props.children}\n </IllustratedMessageContext.Provider>\n {(renderProps.isDropTarget && props.isFilled) &&\n <div className={banner({size})}>\n <span>\n {props.replaceMessage ? props.replaceMessage : stringFormatter.format('dropzone.replaceMessage')}\n </span>\n </div>\n }\n </>\n )}\n </RACDropZone>\n );\n});\n"],"names":[],"version":3,"file":"DropZone.mjs.map"}
1
+ {"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;AA+BM,MAAM,0DAAkB,CAAA,GAAA,oBAAY,EAA4D;AAEvG,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BC,MAAM,2CAAW,WAAW,GAAG,CAAA,GAAA,iBAAS,EAAE,SAAS,SAAS,KAAoB,EAAE,GAA2B;IAClH,IAAI,kBAAkB,CAAA,GAAA,kCAA0B,EAAE,CAAA,GAAA,+CAAW,GAAG;IAChE,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,QACF,OAAO,KACR,GAAG;IACJ,IAAI,SAAS,CAAA,GAAA,gBAAQ,EAAE;IAEvB,qBACE,gBAAC,CAAA,GAAA,eAAU;QACR,GAAG,KAAK;QACT,KAAK;QACL,OAAO,MAAM,YAAY;QACzB,WAAW,CAAA,cAAe,AAAC,CAAA,MAAM,gBAAgB,IAAI,EAAC,IAAK,+BAAS,aAAa,MAAM,MAAM;kBAC5F,CAAA,4BACC;;kCACE,gBAAC,CAAA,GAAA,yCAAwB,EAAE,QAAQ;wBAAC,OAAO;4BAAC,cAAc;4BAAM,cAAc,YAAY,YAAY;kCAAE;wBAAI;kCACzG,MAAM,QAAQ;;oBAEf,YAAY,YAAY,IAAI,MAAM,QAAQ,kBAC1C,gBAAC;wBAAI,WAAW,6BAAO;kCAAC;wBAAI;kCAC1B,cAAA,gBAAC;sCACE,MAAM,cAAc,GAAG,MAAM,cAAc,GAAG,gBAAgB,MAAM,CAAC;;;;;;AAQtF","sources":["packages/@react-spectrum/s2/src/DropZone.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 {ContextValue, DropZoneRenderProps, DropZone as RACDropZone, DropZoneProps as RACDropZoneProps} from 'react-aria-components';\nimport {createContext, forwardRef, ReactNode} from 'react';\nimport {DOMProps, DOMRef, DOMRefValue} from '@react-types/shared';\nimport {getAllowedOverrides, StylesPropWithHeight, UnsafeStyles} from './style-utils' with {type: 'macro'};\nimport {IllustratedMessageContext} from './IllustratedMessage';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {style} from '../style' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface DropZoneProps extends Omit<RACDropZoneProps, 'className' | 'style' | 'children' | 'isDisabled' | 'onHover' | 'onHoverStart' | 'onHoverEnd' | 'onHoverChange'>, UnsafeStyles, DOMProps {\n /** Spectrum-defined styles, returned by the `style()` macro. */\n styles?: StylesPropWithHeight,\n /** The content to display in the drop zone. */\n children?: ReactNode,\n /** Whether the drop zone has been filled. */\n isFilled?: boolean,\n /** The message to replace the default banner message that is shown when the drop zone is filled. */\n replaceMessage?: string,\n /**\n * The size of the DropZone.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L'\n}\n\nexport const DropZoneContext = createContext<ContextValue<DropZoneProps, DOMRefValue<HTMLDivElement>>>(null);\n\nconst dropzone = style<DropZoneRenderProps>({\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n position: 'relative',\n fontFamily: 'sans',\n color: 'gray-900',\n borderStyle: {\n default: 'dashed',\n isDropTarget: 'solid'\n },\n backgroundColor: {\n isDropTarget: 'blue-200'\n },\n borderWidth: 2,\n borderColor: {\n default: 'gray-300',\n isDropTarget: 'blue-800',\n isFocusVisible: 'blue-800'\n },\n borderRadius: 'lg',\n padding: 24\n}, getAllowedOverrides({height: true}));\n\nconst banner = style({\n position: 'absolute',\n left: 0,\n right: 0,\n marginX: 'auto',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n minHeight: 20,\n width: 'fit',\n maxWidth: {\n default: 192,\n size: {\n S: 160,\n L: 208\n }\n },\n backgroundColor: 'accent',\n borderRadius: 'default',\n color: 'white',\n fontWeight: 'bold',\n padding: '[calc((self(minHeight))/1.5)]'\n});\n\n/**\n * A drop zone is an area into which one or multiple objects can be dragged and dropped.\n */\nexport const DropZone = /*#__PURE__*/ forwardRef(function DropZone(props: DropZoneProps, ref: DOMRef<HTMLDivElement>) {\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/s2');\n [props, ref] = useSpectrumContextProps(props, ref, DropZoneContext);\n let {\n size = 'M'\n } = props;\n let domRef = useDOMRef(ref);\n\n return (\n <RACDropZone\n {...props}\n ref={domRef}\n style={props.UNSAFE_style}\n className={renderProps => (props.UNSAFE_className || '') + dropzone(renderProps, props.styles)}>\n {renderProps => (\n <>\n <IllustratedMessageContext.Provider value={{isInDropZone: true, isDropTarget: renderProps.isDropTarget, size}}>\n {props.children}\n </IllustratedMessageContext.Provider>\n {(renderProps.isDropTarget && props.isFilled) &&\n <div className={banner({size})}>\n <span>\n {props.replaceMessage ? props.replaceMessage : stringFormatter.format('dropzone.replaceMessage')}\n </span>\n </div>\n }\n </>\n )}\n </RACDropZone>\n );\n});\n"],"names":[],"version":3,"file":"DropZone.mjs.map"}