@react-spectrum/s2 3.0.0-nightly-93c26d8bd-241028 → 3.0.0-nightly-07431f4b1-241030

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 (273) hide show
  1. package/dist/Accordion.cjs +1 -1
  2. package/dist/Accordion.cjs.map +1 -1
  3. package/dist/Accordion.css.map +1 -1
  4. package/dist/Accordion.mjs +2 -2
  5. package/dist/Accordion.mjs.map +1 -1
  6. package/dist/ActionButton.cjs +10 -32
  7. package/dist/ActionButton.cjs.map +1 -1
  8. package/dist/ActionButton.css +20 -60
  9. package/dist/ActionButton.css.map +1 -1
  10. package/dist/ActionButton.mjs +10 -32
  11. package/dist/ActionButton.mjs.map +1 -1
  12. package/dist/Avatar.cjs +2 -4
  13. package/dist/Avatar.cjs.map +1 -1
  14. package/dist/Avatar.css +4 -16
  15. package/dist/Avatar.css.map +1 -1
  16. package/dist/Avatar.mjs +2 -4
  17. package/dist/Avatar.mjs.map +1 -1
  18. package/dist/Badge.cjs +5 -16
  19. package/dist/Badge.cjs.map +1 -1
  20. package/dist/Badge.css +10 -30
  21. package/dist/Badge.css.map +1 -1
  22. package/dist/Badge.mjs +5 -16
  23. package/dist/Badge.mjs.map +1 -1
  24. package/dist/Breadcrumbs.cjs +12 -41
  25. package/dist/Breadcrumbs.cjs.map +1 -1
  26. package/dist/Breadcrumbs.css +38 -86
  27. package/dist/Breadcrumbs.css.map +1 -1
  28. package/dist/Breadcrumbs.mjs +12 -41
  29. package/dist/Breadcrumbs.mjs.map +1 -1
  30. package/dist/Button.cjs +19 -59
  31. package/dist/Button.cjs.map +1 -1
  32. package/dist/Button.css +37 -113
  33. package/dist/Button.css.map +1 -1
  34. package/dist/Button.mjs +19 -59
  35. package/dist/Button.mjs.map +1 -1
  36. package/dist/Card.cjs +27 -67
  37. package/dist/Card.cjs.map +1 -1
  38. package/dist/Card.css +42 -117
  39. package/dist/Card.css.map +1 -1
  40. package/dist/Card.mjs +27 -67
  41. package/dist/Card.mjs.map +1 -1
  42. package/dist/Checkbox.cjs +9 -27
  43. package/dist/Checkbox.cjs.map +1 -1
  44. package/dist/Checkbox.css +17 -49
  45. package/dist/Checkbox.css.map +1 -1
  46. package/dist/Checkbox.mjs +9 -27
  47. package/dist/Checkbox.mjs.map +1 -1
  48. package/dist/CheckboxGroup.cjs +5 -16
  49. package/dist/CheckboxGroup.cjs.map +1 -1
  50. package/dist/CheckboxGroup.css +10 -30
  51. package/dist/CheckboxGroup.css.map +1 -1
  52. package/dist/CheckboxGroup.mjs +5 -16
  53. package/dist/CheckboxGroup.mjs.map +1 -1
  54. package/dist/ClearButton.cjs +6 -17
  55. package/dist/ClearButton.cjs.map +1 -1
  56. package/dist/ClearButton.css +11 -35
  57. package/dist/ClearButton.css.map +1 -1
  58. package/dist/ClearButton.mjs +6 -17
  59. package/dist/ClearButton.mjs.map +1 -1
  60. package/dist/CloseButton.cjs +10 -32
  61. package/dist/CloseButton.cjs.map +1 -1
  62. package/dist/CloseButton.css +20 -64
  63. package/dist/CloseButton.css.map +1 -1
  64. package/dist/CloseButton.mjs +10 -32
  65. package/dist/CloseButton.mjs.map +1 -1
  66. package/dist/ColorArea.cjs +4 -16
  67. package/dist/ColorArea.cjs.map +1 -1
  68. package/dist/ColorArea.css +8 -28
  69. package/dist/ColorArea.css.map +1 -1
  70. package/dist/ColorArea.mjs +4 -16
  71. package/dist/ColorArea.mjs.map +1 -1
  72. package/dist/ColorField.cjs +5 -16
  73. package/dist/ColorField.cjs.map +1 -1
  74. package/dist/ColorField.css +10 -30
  75. package/dist/ColorField.css.map +1 -1
  76. package/dist/ColorField.mjs +5 -16
  77. package/dist/ColorField.mjs.map +1 -1
  78. package/dist/ColorHandle.cjs +5 -15
  79. package/dist/ColorHandle.cjs.map +1 -1
  80. package/dist/ColorHandle.css +10 -30
  81. package/dist/ColorHandle.css.map +1 -1
  82. package/dist/ColorHandle.mjs +5 -15
  83. package/dist/ColorHandle.mjs.map +1 -1
  84. package/dist/ColorSlider.cjs +6 -17
  85. package/dist/ColorSlider.cjs.map +1 -1
  86. package/dist/ColorSlider.css +34 -50
  87. package/dist/ColorSlider.css.map +1 -1
  88. package/dist/ColorSlider.mjs +6 -17
  89. package/dist/ColorSlider.mjs.map +1 -1
  90. package/dist/ColorSwatch.cjs +8 -26
  91. package/dist/ColorSwatch.cjs.map +1 -1
  92. package/dist/ColorSwatch.css +16 -52
  93. package/dist/ColorSwatch.css.map +1 -1
  94. package/dist/ColorSwatch.mjs +8 -26
  95. package/dist/ColorSwatch.mjs.map +1 -1
  96. package/dist/ColorSwatchPicker.cjs +6 -16
  97. package/dist/ColorSwatchPicker.cjs.map +1 -1
  98. package/dist/ColorSwatchPicker.css +8 -28
  99. package/dist/ColorSwatchPicker.css.map +1 -1
  100. package/dist/ColorSwatchPicker.mjs +6 -16
  101. package/dist/ColorSwatchPicker.mjs.map +1 -1
  102. package/dist/ComboBox.cjs +22 -71
  103. package/dist/ComboBox.cjs.map +1 -1
  104. package/dist/ComboBox.css +64 -152
  105. package/dist/ComboBox.css.map +1 -1
  106. package/dist/ComboBox.mjs +22 -71
  107. package/dist/ComboBox.mjs.map +1 -1
  108. package/dist/ContextualHelp.cjs +1 -1
  109. package/dist/ContextualHelp.css +2 -6
  110. package/dist/ContextualHelp.css.map +1 -1
  111. package/dist/ContextualHelp.mjs +1 -1
  112. package/dist/Dialog.cjs +2 -2
  113. package/dist/Dialog.css +2 -2
  114. package/dist/Dialog.mjs +2 -2
  115. package/dist/Disclosure.cjs +34 -68
  116. package/dist/Disclosure.cjs.map +1 -1
  117. package/dist/Disclosure.css +55 -91
  118. package/dist/Disclosure.css.map +1 -1
  119. package/dist/Disclosure.mjs +36 -70
  120. package/dist/Disclosure.mjs.map +1 -1
  121. package/dist/DropZone.cjs +2 -4
  122. package/dist/DropZone.cjs.map +1 -1
  123. package/dist/DropZone.css +4 -16
  124. package/dist/DropZone.css.map +1 -1
  125. package/dist/DropZone.mjs +2 -4
  126. package/dist/DropZone.mjs.map +1 -1
  127. package/dist/Field.cjs +16 -47
  128. package/dist/Field.cjs.map +1 -1
  129. package/dist/Field.css +31 -95
  130. package/dist/Field.css.map +1 -1
  131. package/dist/Field.mjs +16 -47
  132. package/dist/Field.mjs.map +1 -1
  133. package/dist/IllustratedMessage.cjs +6 -20
  134. package/dist/IllustratedMessage.cjs.map +1 -1
  135. package/dist/IllustratedMessage.css +10 -24
  136. package/dist/IllustratedMessage.css.map +1 -1
  137. package/dist/IllustratedMessage.mjs +6 -20
  138. package/dist/IllustratedMessage.mjs.map +1 -1
  139. package/dist/Image.cjs +2 -2
  140. package/dist/Image.css +2 -2
  141. package/dist/Image.mjs +2 -2
  142. package/dist/InlineAlert.cjs +2 -5
  143. package/dist/InlineAlert.cjs.map +1 -1
  144. package/dist/InlineAlert.css +11 -15
  145. package/dist/InlineAlert.css.map +1 -1
  146. package/dist/InlineAlert.mjs +2 -5
  147. package/dist/InlineAlert.mjs.map +1 -1
  148. package/dist/Menu.cjs +22 -67
  149. package/dist/Menu.cjs.map +1 -1
  150. package/dist/Menu.css +32 -96
  151. package/dist/Menu.css.map +1 -1
  152. package/dist/Menu.mjs +22 -67
  153. package/dist/Menu.mjs.map +1 -1
  154. package/dist/Meter.cjs +22 -68
  155. package/dist/Meter.cjs.map +1 -1
  156. package/dist/Meter.css +63 -139
  157. package/dist/Meter.css.map +1 -1
  158. package/dist/Meter.mjs +22 -68
  159. package/dist/Meter.mjs.map +1 -1
  160. package/dist/Modal.cjs +2 -2
  161. package/dist/Modal.css +2 -2
  162. package/dist/Modal.mjs +2 -2
  163. package/dist/NumberField.cjs +23 -71
  164. package/dist/NumberField.cjs.map +1 -1
  165. package/dist/NumberField.css +63 -146
  166. package/dist/NumberField.css.map +1 -1
  167. package/dist/NumberField.mjs +23 -71
  168. package/dist/NumberField.mjs.map +1 -1
  169. package/dist/Picker.cjs +23 -67
  170. package/dist/Picker.cjs.map +1 -1
  171. package/dist/Picker.css +50 -130
  172. package/dist/Picker.css.map +1 -1
  173. package/dist/Picker.mjs +23 -67
  174. package/dist/Picker.mjs.map +1 -1
  175. package/dist/ProgressBar.cjs +23 -69
  176. package/dist/ProgressBar.cjs.map +1 -1
  177. package/dist/ProgressBar.css +64 -140
  178. package/dist/ProgressBar.css.map +1 -1
  179. package/dist/ProgressBar.mjs +23 -69
  180. package/dist/ProgressBar.mjs.map +1 -1
  181. package/dist/ProgressCircle.cjs +6 -20
  182. package/dist/ProgressCircle.cjs.map +1 -1
  183. package/dist/ProgressCircle.css +12 -40
  184. package/dist/ProgressCircle.css.map +1 -1
  185. package/dist/ProgressCircle.mjs +6 -20
  186. package/dist/ProgressCircle.mjs.map +1 -1
  187. package/dist/Provider.css +7 -0
  188. package/dist/Provider.css.map +1 -1
  189. package/dist/Radio.cjs +8 -26
  190. package/dist/Radio.cjs.map +1 -1
  191. package/dist/Radio.css +16 -48
  192. package/dist/Radio.css.map +1 -1
  193. package/dist/Radio.mjs +8 -26
  194. package/dist/Radio.mjs.map +1 -1
  195. package/dist/RadioGroup.cjs +5 -16
  196. package/dist/RadioGroup.cjs.map +1 -1
  197. package/dist/RadioGroup.css +10 -30
  198. package/dist/RadioGroup.css.map +1 -1
  199. package/dist/RadioGroup.mjs +5 -16
  200. package/dist/RadioGroup.mjs.map +1 -1
  201. package/dist/SearchField.cjs +5 -16
  202. package/dist/SearchField.cjs.map +1 -1
  203. package/dist/SearchField.css +10 -30
  204. package/dist/SearchField.css.map +1 -1
  205. package/dist/SearchField.mjs +5 -16
  206. package/dist/SearchField.mjs.map +1 -1
  207. package/dist/SegmentedControl.cjs +8 -14
  208. package/dist/SegmentedControl.cjs.map +1 -1
  209. package/dist/SegmentedControl.css +9 -29
  210. package/dist/SegmentedControl.css.map +1 -1
  211. package/dist/SegmentedControl.mjs +8 -14
  212. package/dist/SegmentedControl.mjs.map +1 -1
  213. package/dist/Slider.cjs +63 -196
  214. package/dist/Slider.cjs.map +1 -1
  215. package/dist/Slider.css +61 -181
  216. package/dist/Slider.css.map +1 -1
  217. package/dist/Slider.mjs +63 -196
  218. package/dist/Slider.mjs.map +1 -1
  219. package/dist/StatusLight.cjs +9 -27
  220. package/dist/StatusLight.cjs.map +1 -1
  221. package/dist/StatusLight.css +17 -49
  222. package/dist/StatusLight.css.map +1 -1
  223. package/dist/StatusLight.mjs +9 -27
  224. package/dist/StatusLight.mjs.map +1 -1
  225. package/dist/Switch.cjs +6 -15
  226. package/dist/Switch.cjs.map +1 -1
  227. package/dist/Switch.css +10 -26
  228. package/dist/Switch.css.map +1 -1
  229. package/dist/Switch.mjs +6 -15
  230. package/dist/Switch.mjs.map +1 -1
  231. package/dist/TableView.cjs +42 -86
  232. package/dist/TableView.cjs.map +1 -1
  233. package/dist/TableView.css +65 -129
  234. package/dist/TableView.css.map +1 -1
  235. package/dist/TableView.mjs +42 -86
  236. package/dist/TableView.mjs.map +1 -1
  237. package/dist/Tabs.cjs +4 -15
  238. package/dist/Tabs.cjs.map +1 -1
  239. package/dist/Tabs.css +18 -34
  240. package/dist/Tabs.css.map +1 -1
  241. package/dist/Tabs.mjs +4 -15
  242. package/dist/Tabs.mjs.map +1 -1
  243. package/dist/TagGroup.cjs +14 -37
  244. package/dist/TagGroup.cjs.map +1 -1
  245. package/dist/TagGroup.css +23 -67
  246. package/dist/TagGroup.css.map +1 -1
  247. package/dist/TagGroup.mjs +14 -37
  248. package/dist/TagGroup.mjs.map +1 -1
  249. package/dist/TextField.cjs +11 -34
  250. package/dist/TextField.cjs.map +1 -1
  251. package/dist/TextField.css +22 -66
  252. package/dist/TextField.css.map +1 -1
  253. package/dist/TextField.mjs +11 -34
  254. package/dist/TextField.mjs.map +1 -1
  255. package/dist/Tooltip.cjs +2 -4
  256. package/dist/Tooltip.cjs.map +1 -1
  257. package/dist/Tooltip.css +4 -12
  258. package/dist/Tooltip.css.map +1 -1
  259. package/dist/Tooltip.mjs +2 -4
  260. package/dist/Tooltip.mjs.map +1 -1
  261. package/dist/types.d.ts.map +1 -1
  262. package/package.json +17 -17
  263. package/page.css +7 -0
  264. package/src/Accordion.tsx +1 -1
  265. package/src/Disclosure.tsx +13 -7
  266. package/src/page.macro.ts +11 -0
  267. package/style/dist/spectrum-theme.cjs +2 -8
  268. package/style/dist/spectrum-theme.cjs.map +1 -1
  269. package/style/dist/spectrum-theme.mjs +2 -8
  270. package/style/dist/spectrum-theme.mjs.map +1 -1
  271. package/style/dist/types.d.ts +1 -4
  272. package/style/dist/types.d.ts.map +1 -1
  273. package/style/spectrum-theme.ts +4 -4
@@ -1 +1 @@
1
- {"mappings":";;;;;;;AAAA;;;;;;;;;;CAUC;;;;;AAyBD,SAAS,kCAAY,KAAuB,EAAE,GAAoC;IAChF,IAAI,SAAS,CAAA,GAAA,sBAAc,EAAE;IAE7B,qBACE,gBAAC,CAAA,GAAA,aAAK;QACH,GAAG,KAAK;QACT,KAAK;QACL,WAAW,CAAA,cAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eAgBvB;gBAAC,GAAG,WAAW;gBAAE,MAAM,MAAM,IAAI,IAAI;YAAG;kBAC3C,cAAA,gBAAC,CAAA,GAAA,wCAAQ;YAAE,MAAM,MAAM,IAAI,IAAI;;;AAGrC;AAEA,IAAI,0DAAe,CAAA,GAAA,iBAAS,EAAE","sources":["packages/@react-spectrum/s2/src/ClearButton.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 {\n Button,\n ButtonProps,\n ButtonRenderProps\n} from 'react-aria-components';\nimport CrossIcon from '../ui-icons/Cross';\nimport {FocusableRef} from '@react-types/shared';\nimport {forwardRef} from 'react';\nimport {style} from '../style' with {type: 'macro'};\nimport {useFocusableRef} from '@react-spectrum/utils';\n\ninterface ClearButtonStyleProps {\n /**\n * The size of the ClearButton.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L' | 'XL'\n}\n\ninterface ClearButtonRenderProps extends ButtonRenderProps, ClearButtonStyleProps {}\ninterface ClearButtonProps extends ButtonProps, ClearButtonStyleProps {}\n\nfunction ClearButton(props: ClearButtonProps, ref: FocusableRef<HTMLButtonElement>) {\n let domRef = useFocusableRef(ref);\n\n return (\n <Button\n {...props}\n ref={domRef}\n className={renderProps => style<ClearButtonRenderProps>({\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n height: 'full',\n width: 'control',\n flexShrink: 0,\n borderStyle: 'none',\n outlineStyle: 'none',\n backgroundColor: 'transparent',\n padding: 0,\n color: '[inherit]',\n '--iconPrimary': {\n type: 'fill',\n value: 'currentColor'\n }\n })({...renderProps, size: props.size || 'M'})}>\n <CrossIcon size={props.size || 'M'} />\n </Button>\n );\n}\n\nlet _ClearButton = forwardRef(ClearButton);\nexport {_ClearButton as ClearButton};\n"],"names":[],"version":3,"file":"ClearButton.mjs.map"}
1
+ {"mappings":";;;;;;;AAAA;;;;;;;;;;CAUC;;;;;AAyBD,SAAS,kCAAY,KAAuB,EAAE,GAAoC;IAChF,IAAI,SAAS,CAAA,GAAA,sBAAc,EAAE;IAE7B,qBACE,gBAAC,CAAA,GAAA,aAAK;QACH,GAAG,KAAK;QACT,KAAK;QACL,WAAW,CAAA,cAAe;;;;;;;;;;;;;;;;;;;;;;eAgBvB;gBAAC,GAAG,WAAW;gBAAE,MAAM,MAAM,IAAI,IAAI;YAAG;kBAC3C,cAAA,gBAAC,CAAA,GAAA,wCAAQ;YAAE,MAAM,MAAM,IAAI,IAAI;;;AAGrC;AAEA,IAAI,0DAAe,CAAA,GAAA,iBAAS,EAAE","sources":["packages/@react-spectrum/s2/src/ClearButton.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 {\n Button,\n ButtonProps,\n ButtonRenderProps\n} from 'react-aria-components';\nimport CrossIcon from '../ui-icons/Cross';\nimport {FocusableRef} from '@react-types/shared';\nimport {forwardRef} from 'react';\nimport {style} from '../style' with {type: 'macro'};\nimport {useFocusableRef} from '@react-spectrum/utils';\n\ninterface ClearButtonStyleProps {\n /**\n * The size of the ClearButton.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L' | 'XL'\n}\n\ninterface ClearButtonRenderProps extends ButtonRenderProps, ClearButtonStyleProps {}\ninterface ClearButtonProps extends ButtonProps, ClearButtonStyleProps {}\n\nfunction ClearButton(props: ClearButtonProps, ref: FocusableRef<HTMLButtonElement>) {\n let domRef = useFocusableRef(ref);\n\n return (\n <Button\n {...props}\n ref={domRef}\n className={renderProps => style<ClearButtonRenderProps>({\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n height: 'full',\n width: 'control',\n flexShrink: 0,\n borderStyle: 'none',\n outlineStyle: 'none',\n backgroundColor: 'transparent',\n padding: 0,\n color: '[inherit]',\n '--iconPrimary': {\n type: 'fill',\n value: 'currentColor'\n }\n })({...renderProps, size: props.size || 'M'})}>\n <CrossIcon size={props.size || 'M'} />\n </Button>\n );\n}\n\nlet _ClearButton = forwardRef(ClearButton);\nexport {_ClearButton as ClearButton};\n"],"names":[],"version":3,"file":"ClearButton.mjs.map"}
@@ -53,39 +53,17 @@ const $2f907cb84c6e9e75$var$styles = function anonymous(props, overrides) {
53
53
  rules += ' _1c';
54
54
  rules += ' _2d';
55
55
  if (!$l) {
56
- if (props.size === "XL") {
57
- rules += ' lby';
58
- rules += ' lx';
59
- } else if (props.size === "L") {
60
- rules += ' lbu';
61
- rules += ' lr';
62
- } else if (props.size === "S") {
63
- rules += ' lbn';
64
- rules += ' lm';
65
- } else if (props.size === "XS") {
66
- rules += ' lbl';
67
- rules += ' lk';
68
- } else {
69
- rules += ' lbr';
70
- rules += ' lq';
71
- }
72
- }
73
- if (props.size === "XL") {
74
- rules += ' kby';
75
- rules += ' kx';
76
- } else if (props.size === "L") {
77
- rules += ' kbu';
78
- rules += ' kr';
79
- } else if (props.size === "S") {
80
- rules += ' kbn';
81
- rules += ' km';
82
- } else if (props.size === "XS") {
83
- rules += ' kbl';
84
- rules += ' kk';
85
- } else {
86
- rules += ' kbr';
87
- rules += ' kq';
56
+ if (props.size === "XL") rules += ' ln';
57
+ else if (props.size === "L") rules += ' ll';
58
+ else if (props.size === "S") rules += ' lh';
59
+ else if (props.size === "XS") rules += ' lg';
60
+ else rules += ' lj';
88
61
  }
62
+ if (props.size === "XL") rules += ' kn';
63
+ else if (props.size === "L") rules += ' kl';
64
+ else if (props.size === "S") rules += ' kh';
65
+ else if (props.size === "XS") rules += ' kg';
66
+ else rules += ' kj';
89
67
  rules += ' _vf';
90
68
  rules += ' _wf';
91
69
  rules += ' _xf';
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;AAsBD,MAAM,wCAAkB;IACtB,SAAS;IACT,aAAa;QACX,OAAO;QACP,OAAO;IACT;AACF;AAEA,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2CN,SAAS,kCAAY,KAAuB,EAAE,GAAoC;IAChF,IAAI,gBAAC,YAAY,oBAAE,mBAAmB,IAAG,GAAG;IAC5C,IAAI,SAAS,CAAA,GAAA,yCAAc,EAAE;IAC7B,qBACE,gCAAC,CAAA,GAAA,iCAAK;QACH,GAAG,KAAK;QACT,KAAK;QACL,OAAO,CAAA,GAAA,oCAAS,EAAE,QAAQ;QAC1B,WAAW,CAAA,cAAe,mBAAmB,6BAAO,aAAa,MAAM,MAAM;kBAC7E,cAAA,gCAAC,CAAA,GAAA,iCAAQ;YAAE,MAAM,AAAC;gBAAC,GAAG;gBAAK,GAAG;gBAAM,GAAG;gBAAO,IAAI;YAAM,CAAW,CAAC,MAAM,IAAI,IAAI,IAAI;;;AAG5F;AAEA,IAAI,0DAAe,CAAA,GAAA,uBAAS,EAAE","sources":["packages/@react-spectrum/s2/src/CloseButton.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 {baseColor, focusRing, style} from '../style' with {type: 'macro'};\nimport {Button, ButtonProps} from 'react-aria-components';\nimport CrossIcon from '../ui-icons/Cross';\nimport {FocusableRef} from '@react-types/shared';\nimport {forwardRef} from 'react';\nimport {getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {pressScale} from './pressScale';\nimport {useFocusableRef} from '@react-spectrum/utils';\n\ninterface CloseButtonProps extends Omit<ButtonProps, 'className' | 'style' | 'children'>, StyleProps {\n /**\n * The size of the CloseButton.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L' | 'XL',\n /** The static color style to apply. Useful when the Button appears over a color background. */\n staticColor?: 'white' | 'black'\n}\n\nconst hoverBackground = {\n default: 'gray-100',\n staticColor: {\n white: 'transparent-white-100',\n black: 'transparent-black-100'\n }\n} as const;\n\nconst styles = style({\n ...focusRing(),\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n size: 'control',\n borderRadius: 'full',\n padding: 0,\n borderStyle: 'none',\n transition: 'default',\n backgroundColor: {\n default: 'transparent',\n isHovered: hoverBackground,\n isFocusVisible: hoverBackground,\n isPressed: hoverBackground\n },\n '--iconPrimary': {\n type: 'color',\n value: {\n default: 'neutral',\n isDisabled: 'disabled',\n staticColor: {\n white: {\n default: baseColor('transparent-white-800'),\n isDisabled: 'transparent-white-400'\n },\n black: {\n default: baseColor('transparent-black-800'),\n isDisabled: 'transparent-black-400'\n }\n }\n }\n },\n outlineColor: {\n default: 'focus-ring',\n staticColor: {\n white: 'white',\n black: 'black'\n },\n forcedColors: 'Highlight'\n }\n}, getAllowedOverrides());\n\nfunction CloseButton(props: CloseButtonProps, ref: FocusableRef<HTMLButtonElement>) {\n let {UNSAFE_style, UNSAFE_className = ''} = props;\n let domRef = useFocusableRef(ref);\n return (\n <Button\n {...props}\n ref={domRef}\n style={pressScale(domRef, UNSAFE_style)}\n className={renderProps => UNSAFE_className + styles(renderProps, props.styles)}>\n <CrossIcon size={({S: 'L', M: 'XL', L: 'XXL', XL: 'XXXL'} as const)[props.size || 'M']} />\n </Button>\n );\n}\n\nlet _CloseButton = forwardRef(CloseButton);\nexport {_CloseButton as CloseButton};\n"],"names":[],"version":3,"file":"CloseButton.cjs.map"}
1
+ {"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;AAsBD,MAAM,wCAAkB;IACtB,SAAS;IACT,aAAa;QACX,OAAO;QACP,OAAO;IACT;AACF;AAEA,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2CN,SAAS,kCAAY,KAAuB,EAAE,GAAoC;IAChF,IAAI,gBAAC,YAAY,oBAAE,mBAAmB,IAAG,GAAG;IAC5C,IAAI,SAAS,CAAA,GAAA,yCAAc,EAAE;IAC7B,qBACE,gCAAC,CAAA,GAAA,iCAAK;QACH,GAAG,KAAK;QACT,KAAK;QACL,OAAO,CAAA,GAAA,oCAAS,EAAE,QAAQ;QAC1B,WAAW,CAAA,cAAe,mBAAmB,6BAAO,aAAa,MAAM,MAAM;kBAC7E,cAAA,gCAAC,CAAA,GAAA,iCAAQ;YAAE,MAAM,AAAC;gBAAC,GAAG;gBAAK,GAAG;gBAAM,GAAG;gBAAO,IAAI;YAAM,CAAW,CAAC,MAAM,IAAI,IAAI,IAAI;;;AAG5F;AAEA,IAAI,0DAAe,CAAA,GAAA,uBAAS,EAAE","sources":["packages/@react-spectrum/s2/src/CloseButton.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 {baseColor, focusRing, style} from '../style' with {type: 'macro'};\nimport {Button, ButtonProps} from 'react-aria-components';\nimport CrossIcon from '../ui-icons/Cross';\nimport {FocusableRef} from '@react-types/shared';\nimport {forwardRef} from 'react';\nimport {getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {pressScale} from './pressScale';\nimport {useFocusableRef} from '@react-spectrum/utils';\n\ninterface CloseButtonProps extends Omit<ButtonProps, 'className' | 'style' | 'children'>, StyleProps {\n /**\n * The size of the CloseButton.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L' | 'XL',\n /** The static color style to apply. Useful when the Button appears over a color background. */\n staticColor?: 'white' | 'black'\n}\n\nconst hoverBackground = {\n default: 'gray-100',\n staticColor: {\n white: 'transparent-white-100',\n black: 'transparent-black-100'\n }\n} as const;\n\nconst styles = style({\n ...focusRing(),\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n size: 'control',\n borderRadius: 'full',\n padding: 0,\n borderStyle: 'none',\n transition: 'default',\n backgroundColor: {\n default: 'transparent',\n isHovered: hoverBackground,\n isFocusVisible: hoverBackground,\n isPressed: hoverBackground\n },\n '--iconPrimary': {\n type: 'color',\n value: {\n default: 'neutral',\n isDisabled: 'disabled',\n staticColor: {\n white: {\n default: baseColor('transparent-white-800'),\n isDisabled: 'transparent-white-400'\n },\n black: {\n default: baseColor('transparent-black-800'),\n isDisabled: 'transparent-black-400'\n }\n }\n }\n },\n outlineColor: {\n default: 'focus-ring',\n staticColor: {\n white: 'white',\n black: 'black'\n },\n forcedColors: 'Highlight'\n }\n}, getAllowedOverrides());\n\nfunction CloseButton(props: CloseButtonProps, ref: FocusableRef<HTMLButtonElement>) {\n let {UNSAFE_style, UNSAFE_className = ''} = props;\n let domRef = useFocusableRef(ref);\n return (\n <Button\n {...props}\n ref={domRef}\n style={pressScale(domRef, UNSAFE_style)}\n className={renderProps => UNSAFE_className + styles(renderProps, props.styles)}>\n <CrossIcon size={({S: 'L', M: 'XL', L: 'XXL', XL: 'XXXL'} as const)[props.size || 'M']} />\n </Button>\n );\n}\n\nlet _CloseButton = forwardRef(CloseButton);\nexport {_CloseButton as CloseButton};\n"],"names":[],"version":3,"file":"CloseButton.cjs.map"}
@@ -43,44 +43,44 @@
43
43
  justify-content: center;
44
44
  }
45
45
 
46
- .lq {
47
- width: 2rem;
46
+ .lj {
47
+ width: calc(2rem * var(--s2-scale));
48
48
  }
49
49
 
50
- .lk {
51
- width: 1.25rem;
50
+ .lg {
51
+ width: calc(1.25rem * var(--s2-scale));
52
52
  }
53
53
 
54
- .lm {
55
- width: 1.5rem;
54
+ .lh {
55
+ width: calc(1.5rem * var(--s2-scale));
56
56
  }
57
57
 
58
- .lr {
59
- width: 2.5rem;
58
+ .ll {
59
+ width: calc(2.5rem * var(--s2-scale));
60
60
  }
61
61
 
62
- .lx {
63
- width: 3rem;
62
+ .ln {
63
+ width: calc(3rem * var(--s2-scale));
64
64
  }
65
65
 
66
- .kq {
67
- height: 2rem;
66
+ .kj {
67
+ height: calc(2rem * var(--s2-scale));
68
68
  }
69
69
 
70
- .kk {
71
- height: 1.25rem;
70
+ .kg {
71
+ height: calc(1.25rem * var(--s2-scale));
72
72
  }
73
73
 
74
- .km {
75
- height: 1.5rem;
74
+ .kh {
75
+ height: calc(1.5rem * var(--s2-scale));
76
76
  }
77
77
 
78
- .kr {
79
- height: 2.5rem;
78
+ .kl {
79
+ height: calc(2.5rem * var(--s2-scale));
80
80
  }
81
81
 
82
- .kx {
83
- height: 3rem;
82
+ .kn {
83
+ height: calc(3rem * var(--s2-scale));
84
84
  }
85
85
 
86
86
  ._vf {
@@ -193,48 +193,4 @@
193
193
  }
194
194
  }
195
195
  }
196
-
197
- @layer _.b.b {
198
- @media not ((hover: hover) and (pointer: fine)) {
199
- .lbr {
200
- width: 2.5rem;
201
- }
202
-
203
- .lbl {
204
- width: 1.5625rem;
205
- }
206
-
207
- .lbn {
208
- width: 1.875rem;
209
- }
210
-
211
- .lbu {
212
- width: 3.125rem;
213
- }
214
-
215
- .lby {
216
- width: 3.75rem;
217
- }
218
-
219
- .kbr {
220
- height: 2.5rem;
221
- }
222
-
223
- .kbl {
224
- height: 1.5625rem;
225
- }
226
-
227
- .kbn {
228
- height: 1.875rem;
229
- }
230
-
231
- .kbu {
232
- height: 3.125rem;
233
- }
234
-
235
- .kby {
236
- height: 3.75rem;
237
- }
238
- }
239
- }
240
196
  /*# sourceMappingURL=CloseButton.css.map */
@@ -1 +1 @@
1
- {"mappings":"AAwCe;;;;AAAA;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;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;AAAA;;AAAA;EAAA;IAAA;;;;;;AAAA;EAAA;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA","sources":["packages/@react-spectrum/s2/src/CloseButton.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 {baseColor, focusRing, style} from '../style' with {type: 'macro'};\nimport {Button, ButtonProps} from 'react-aria-components';\nimport CrossIcon from '../ui-icons/Cross';\nimport {FocusableRef} from '@react-types/shared';\nimport {forwardRef} from 'react';\nimport {getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {pressScale} from './pressScale';\nimport {useFocusableRef} from '@react-spectrum/utils';\n\ninterface CloseButtonProps extends Omit<ButtonProps, 'className' | 'style' | 'children'>, StyleProps {\n /**\n * The size of the CloseButton.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L' | 'XL',\n /** The static color style to apply. Useful when the Button appears over a color background. */\n staticColor?: 'white' | 'black'\n}\n\nconst hoverBackground = {\n default: 'gray-100',\n staticColor: {\n white: 'transparent-white-100',\n black: 'transparent-black-100'\n }\n} as const;\n\nconst styles = style({\n ...focusRing(),\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n size: 'control',\n borderRadius: 'full',\n padding: 0,\n borderStyle: 'none',\n transition: 'default',\n backgroundColor: {\n default: 'transparent',\n isHovered: hoverBackground,\n isFocusVisible: hoverBackground,\n isPressed: hoverBackground\n },\n '--iconPrimary': {\n type: 'color',\n value: {\n default: 'neutral',\n isDisabled: 'disabled',\n staticColor: {\n white: {\n default: baseColor('transparent-white-800'),\n isDisabled: 'transparent-white-400'\n },\n black: {\n default: baseColor('transparent-black-800'),\n isDisabled: 'transparent-black-400'\n }\n }\n }\n },\n outlineColor: {\n default: 'focus-ring',\n staticColor: {\n white: 'white',\n black: 'black'\n },\n forcedColors: 'Highlight'\n }\n}, getAllowedOverrides());\n\nfunction CloseButton(props: CloseButtonProps, ref: FocusableRef<HTMLButtonElement>) {\n let {UNSAFE_style, UNSAFE_className = ''} = props;\n let domRef = useFocusableRef(ref);\n return (\n <Button\n {...props}\n ref={domRef}\n style={pressScale(domRef, UNSAFE_style)}\n className={renderProps => UNSAFE_className + styles(renderProps, props.styles)}>\n <CrossIcon size={({S: 'L', M: 'XL', L: 'XXL', XL: 'XXXL'} as const)[props.size || 'M']} />\n </Button>\n );\n}\n\nlet _CloseButton = forwardRef(CloseButton);\nexport {_CloseButton as CloseButton};\n"],"names":[],"version":3,"file":"CloseButton.css.map"}
1
+ {"mappings":"AAwCe;;;;AAAA;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;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;AAAA;;AAAA;EAAA;IAAA","sources":["packages/@react-spectrum/s2/src/CloseButton.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 {baseColor, focusRing, style} from '../style' with {type: 'macro'};\nimport {Button, ButtonProps} from 'react-aria-components';\nimport CrossIcon from '../ui-icons/Cross';\nimport {FocusableRef} from '@react-types/shared';\nimport {forwardRef} from 'react';\nimport {getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {pressScale} from './pressScale';\nimport {useFocusableRef} from '@react-spectrum/utils';\n\ninterface CloseButtonProps extends Omit<ButtonProps, 'className' | 'style' | 'children'>, StyleProps {\n /**\n * The size of the CloseButton.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L' | 'XL',\n /** The static color style to apply. Useful when the Button appears over a color background. */\n staticColor?: 'white' | 'black'\n}\n\nconst hoverBackground = {\n default: 'gray-100',\n staticColor: {\n white: 'transparent-white-100',\n black: 'transparent-black-100'\n }\n} as const;\n\nconst styles = style({\n ...focusRing(),\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n size: 'control',\n borderRadius: 'full',\n padding: 0,\n borderStyle: 'none',\n transition: 'default',\n backgroundColor: {\n default: 'transparent',\n isHovered: hoverBackground,\n isFocusVisible: hoverBackground,\n isPressed: hoverBackground\n },\n '--iconPrimary': {\n type: 'color',\n value: {\n default: 'neutral',\n isDisabled: 'disabled',\n staticColor: {\n white: {\n default: baseColor('transparent-white-800'),\n isDisabled: 'transparent-white-400'\n },\n black: {\n default: baseColor('transparent-black-800'),\n isDisabled: 'transparent-black-400'\n }\n }\n }\n },\n outlineColor: {\n default: 'focus-ring',\n staticColor: {\n white: 'white',\n black: 'black'\n },\n forcedColors: 'Highlight'\n }\n}, getAllowedOverrides());\n\nfunction CloseButton(props: CloseButtonProps, ref: FocusableRef<HTMLButtonElement>) {\n let {UNSAFE_style, UNSAFE_className = ''} = props;\n let domRef = useFocusableRef(ref);\n return (\n <Button\n {...props}\n ref={domRef}\n style={pressScale(domRef, UNSAFE_style)}\n className={renderProps => UNSAFE_className + styles(renderProps, props.styles)}>\n <CrossIcon size={({S: 'L', M: 'XL', L: 'XXL', XL: 'XXXL'} as const)[props.size || 'M']} />\n </Button>\n );\n}\n\nlet _CloseButton = forwardRef(CloseButton);\nexport {_CloseButton as CloseButton};\n"],"names":[],"version":3,"file":"CloseButton.css.map"}
@@ -47,39 +47,17 @@ const $a9cda54c4f47ce52$var$styles = function anonymous(props, overrides) {
47
47
  rules += ' _1c';
48
48
  rules += ' _2d';
49
49
  if (!$l) {
50
- if (props.size === "XL") {
51
- rules += ' lby';
52
- rules += ' lx';
53
- } else if (props.size === "L") {
54
- rules += ' lbu';
55
- rules += ' lr';
56
- } else if (props.size === "S") {
57
- rules += ' lbn';
58
- rules += ' lm';
59
- } else if (props.size === "XS") {
60
- rules += ' lbl';
61
- rules += ' lk';
62
- } else {
63
- rules += ' lbr';
64
- rules += ' lq';
65
- }
66
- }
67
- if (props.size === "XL") {
68
- rules += ' kby';
69
- rules += ' kx';
70
- } else if (props.size === "L") {
71
- rules += ' kbu';
72
- rules += ' kr';
73
- } else if (props.size === "S") {
74
- rules += ' kbn';
75
- rules += ' km';
76
- } else if (props.size === "XS") {
77
- rules += ' kbl';
78
- rules += ' kk';
79
- } else {
80
- rules += ' kbr';
81
- rules += ' kq';
50
+ if (props.size === "XL") rules += ' ln';
51
+ else if (props.size === "L") rules += ' ll';
52
+ else if (props.size === "S") rules += ' lh';
53
+ else if (props.size === "XS") rules += ' lg';
54
+ else rules += ' lj';
82
55
  }
56
+ if (props.size === "XL") rules += ' kn';
57
+ else if (props.size === "L") rules += ' kl';
58
+ else if (props.size === "S") rules += ' kh';
59
+ else if (props.size === "XS") rules += ' kg';
60
+ else rules += ' kj';
83
61
  rules += ' _vf';
84
62
  rules += ' _wf';
85
63
  rules += ' _xf';
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;AAsBD,MAAM,wCAAkB;IACtB,SAAS;IACT,aAAa;QACX,OAAO;QACP,OAAO;IACT;AACF;AAEA,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2CN,SAAS,kCAAY,KAAuB,EAAE,GAAoC;IAChF,IAAI,gBAAC,YAAY,oBAAE,mBAAmB,IAAG,GAAG;IAC5C,IAAI,SAAS,CAAA,GAAA,sBAAc,EAAE;IAC7B,qBACE,gBAAC,CAAA,GAAA,aAAK;QACH,GAAG,KAAK;QACT,KAAK;QACL,OAAO,CAAA,GAAA,yCAAS,EAAE,QAAQ;QAC1B,WAAW,CAAA,cAAe,mBAAmB,6BAAO,aAAa,MAAM,MAAM;kBAC7E,cAAA,gBAAC,CAAA,GAAA,wCAAQ;YAAE,MAAM,AAAC;gBAAC,GAAG;gBAAK,GAAG;gBAAM,GAAG;gBAAO,IAAI;YAAM,CAAW,CAAC,MAAM,IAAI,IAAI,IAAI;;;AAG5F;AAEA,IAAI,0DAAe,CAAA,GAAA,iBAAS,EAAE","sources":["packages/@react-spectrum/s2/src/CloseButton.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 {baseColor, focusRing, style} from '../style' with {type: 'macro'};\nimport {Button, ButtonProps} from 'react-aria-components';\nimport CrossIcon from '../ui-icons/Cross';\nimport {FocusableRef} from '@react-types/shared';\nimport {forwardRef} from 'react';\nimport {getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {pressScale} from './pressScale';\nimport {useFocusableRef} from '@react-spectrum/utils';\n\ninterface CloseButtonProps extends Omit<ButtonProps, 'className' | 'style' | 'children'>, StyleProps {\n /**\n * The size of the CloseButton.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L' | 'XL',\n /** The static color style to apply. Useful when the Button appears over a color background. */\n staticColor?: 'white' | 'black'\n}\n\nconst hoverBackground = {\n default: 'gray-100',\n staticColor: {\n white: 'transparent-white-100',\n black: 'transparent-black-100'\n }\n} as const;\n\nconst styles = style({\n ...focusRing(),\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n size: 'control',\n borderRadius: 'full',\n padding: 0,\n borderStyle: 'none',\n transition: 'default',\n backgroundColor: {\n default: 'transparent',\n isHovered: hoverBackground,\n isFocusVisible: hoverBackground,\n isPressed: hoverBackground\n },\n '--iconPrimary': {\n type: 'color',\n value: {\n default: 'neutral',\n isDisabled: 'disabled',\n staticColor: {\n white: {\n default: baseColor('transparent-white-800'),\n isDisabled: 'transparent-white-400'\n },\n black: {\n default: baseColor('transparent-black-800'),\n isDisabled: 'transparent-black-400'\n }\n }\n }\n },\n outlineColor: {\n default: 'focus-ring',\n staticColor: {\n white: 'white',\n black: 'black'\n },\n forcedColors: 'Highlight'\n }\n}, getAllowedOverrides());\n\nfunction CloseButton(props: CloseButtonProps, ref: FocusableRef<HTMLButtonElement>) {\n let {UNSAFE_style, UNSAFE_className = ''} = props;\n let domRef = useFocusableRef(ref);\n return (\n <Button\n {...props}\n ref={domRef}\n style={pressScale(domRef, UNSAFE_style)}\n className={renderProps => UNSAFE_className + styles(renderProps, props.styles)}>\n <CrossIcon size={({S: 'L', M: 'XL', L: 'XXL', XL: 'XXXL'} as const)[props.size || 'M']} />\n </Button>\n );\n}\n\nlet _CloseButton = forwardRef(CloseButton);\nexport {_CloseButton as CloseButton};\n"],"names":[],"version":3,"file":"CloseButton.mjs.map"}
1
+ {"mappings":";;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;AAsBD,MAAM,wCAAkB;IACtB,SAAS;IACT,aAAa;QACX,OAAO;QACP,OAAO;IACT;AACF;AAEA,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2CN,SAAS,kCAAY,KAAuB,EAAE,GAAoC;IAChF,IAAI,gBAAC,YAAY,oBAAE,mBAAmB,IAAG,GAAG;IAC5C,IAAI,SAAS,CAAA,GAAA,sBAAc,EAAE;IAC7B,qBACE,gBAAC,CAAA,GAAA,aAAK;QACH,GAAG,KAAK;QACT,KAAK;QACL,OAAO,CAAA,GAAA,yCAAS,EAAE,QAAQ;QAC1B,WAAW,CAAA,cAAe,mBAAmB,6BAAO,aAAa,MAAM,MAAM;kBAC7E,cAAA,gBAAC,CAAA,GAAA,wCAAQ;YAAE,MAAM,AAAC;gBAAC,GAAG;gBAAK,GAAG;gBAAM,GAAG;gBAAO,IAAI;YAAM,CAAW,CAAC,MAAM,IAAI,IAAI,IAAI;;;AAG5F;AAEA,IAAI,0DAAe,CAAA,GAAA,iBAAS,EAAE","sources":["packages/@react-spectrum/s2/src/CloseButton.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 {baseColor, focusRing, style} from '../style' with {type: 'macro'};\nimport {Button, ButtonProps} from 'react-aria-components';\nimport CrossIcon from '../ui-icons/Cross';\nimport {FocusableRef} from '@react-types/shared';\nimport {forwardRef} from 'react';\nimport {getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {pressScale} from './pressScale';\nimport {useFocusableRef} from '@react-spectrum/utils';\n\ninterface CloseButtonProps extends Omit<ButtonProps, 'className' | 'style' | 'children'>, StyleProps {\n /**\n * The size of the CloseButton.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L' | 'XL',\n /** The static color style to apply. Useful when the Button appears over a color background. */\n staticColor?: 'white' | 'black'\n}\n\nconst hoverBackground = {\n default: 'gray-100',\n staticColor: {\n white: 'transparent-white-100',\n black: 'transparent-black-100'\n }\n} as const;\n\nconst styles = style({\n ...focusRing(),\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n size: 'control',\n borderRadius: 'full',\n padding: 0,\n borderStyle: 'none',\n transition: 'default',\n backgroundColor: {\n default: 'transparent',\n isHovered: hoverBackground,\n isFocusVisible: hoverBackground,\n isPressed: hoverBackground\n },\n '--iconPrimary': {\n type: 'color',\n value: {\n default: 'neutral',\n isDisabled: 'disabled',\n staticColor: {\n white: {\n default: baseColor('transparent-white-800'),\n isDisabled: 'transparent-white-400'\n },\n black: {\n default: baseColor('transparent-black-800'),\n isDisabled: 'transparent-black-400'\n }\n }\n }\n },\n outlineColor: {\n default: 'focus-ring',\n staticColor: {\n white: 'white',\n black: 'black'\n },\n forcedColors: 'Highlight'\n }\n}, getAllowedOverrides());\n\nfunction CloseButton(props: CloseButtonProps, ref: FocusableRef<HTMLButtonElement>) {\n let {UNSAFE_style, UNSAFE_className = ''} = props;\n let domRef = useFocusableRef(ref);\n return (\n <Button\n {...props}\n ref={domRef}\n style={pressScale(domRef, UNSAFE_style)}\n className={renderProps => UNSAFE_className + styles(renderProps, props.styles)}>\n <CrossIcon size={({S: 'L', M: 'XL', L: 'XXL', XL: 'XXXL'} as const)[props.size || 'M']} />\n </Button>\n );\n}\n\nlet _CloseButton = forwardRef(CloseButton);\nexport {_CloseButton as CloseButton};\n"],"names":[],"version":3,"file":"CloseButton.mjs.map"}
@@ -61,22 +61,10 @@ function $4c6639e34959fe36$var$ColorArea(props, ref) {
61
61
  if (/^\s*o/.test(p)) $o = true;
62
62
  }
63
63
  if (!$U) rules += ' Uc';
64
- if (!$l) {
65
- rules += ' lbQ';
66
- rules += ' lP';
67
- }
68
- if (!$k) {
69
- rules += ' kbQ';
70
- rules += ' kP';
71
- }
72
- if (!$q) {
73
- rules += ' qbC';
74
- rules += ' qB';
75
- }
76
- if (!$o) {
77
- rules += ' obC';
78
- rules += ' oB';
79
- }
64
+ if (!$l) rules += ' lx';
65
+ if (!$k) rules += ' kx';
66
+ if (!$q) rules += ' qp';
67
+ if (!$o) rules += ' op';
80
68
  rules += ' _vc';
81
69
  rules += ' _wc';
82
70
  rules += ' _xc';
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;AAiBM,MAAM,0DAAmB,CAAA,GAAA,0BAAY,EAA6D;AAEzG,SAAS,gCAAU,KAAqB,EAAE,GAA2B;IACnE,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,iDAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,oBAAC,mBAAmB,kBAAI,YAAY,UAAE,MAAM,EAAC,GAAG;IACpD,IAAI,eAAe,CAAA,GAAA,mCAAQ,EAAE;IAC7B,qBACE,gCAAC,CAAA,GAAA,oCAAY;QACV,GAAG,KAAK;QACT,KAAK;QACL,OAAO,CAAC,gBAAC,YAAY,cAAE,UAAU,EAAC,GAAM,CAAA;gBACtC,GAAG,YAAY;gBACf,YAAY,aAAa,YAAY,aAAa,UAAU;gBAC5D,kEAAkE;gBAClE,UAAU;gBACV,GAAG,YAAY;YACjB,CAAA;QACA,WAAW,CAAA,cAAe,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAkBL,aAAa;kBACpD,CAAC,SAAC,KAAK,EAAC,iBACN,gCAAC,CAAA,GAAA,qCAAU;gBACV,cAAc;gBACd,aAAa,IAAM,MAAM,gBAAgB;;;AAInD;AAEA;;CAEC,GACD,IAAI,0DAAa,CAAA,GAAA,uBAAS,EAAE","sources":["packages/@react-spectrum/s2/src/ColorArea.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 {\n ColorArea as AriaColorArea,\n ColorAreaProps as AriaColorAreaProps,\n ContextValue\n} from 'react-aria-components';\nimport {ColorHandle} from './ColorHandle';\nimport {createContext, forwardRef} from 'react';\nimport {DOMRef, DOMRefValue} from '@react-types/shared';\nimport {getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {style} from '../style' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface ColorAreaProps extends Omit<AriaColorAreaProps, 'children' | 'className' | 'style'>, StyleProps {}\n\nexport const ColorAreaContext = createContext<ContextValue<ColorAreaProps, DOMRefValue<HTMLDivElement>>>(null);\n\nfunction ColorArea(props: ColorAreaProps, ref: DOMRef<HTMLDivElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, ColorAreaContext);\n let {UNSAFE_className = '', UNSAFE_style, styles} = props;\n let containerRef = useDOMRef(ref);\n return (\n <AriaColorArea\n {...props}\n ref={containerRef}\n style={({defaultStyle, isDisabled}) => ({\n ...defaultStyle,\n background: isDisabled ? undefined : defaultStyle.background,\n // Move position: relative to style macro so it can be overridden.\n position: undefined,\n ...UNSAFE_style\n })}\n className={renderProps => UNSAFE_className + style({\n position: 'relative',\n size: 192,\n minSize: 64,\n borderRadius: 'default',\n outlineColor: {\n default: 'gray-1000/10',\n forcedColors: 'ButtonBorder'\n },\n outlineWidth: 1,\n outlineOffset: -1,\n outlineStyle: {\n default: 'solid',\n isDisabled: 'none'\n },\n backgroundColor: {\n isDisabled: 'disabled'\n }\n }, getAllowedOverrides({height: true}))(renderProps, styles)}>\n {({state}) =>\n (<ColorHandle\n containerRef={containerRef}\n getPosition={() => state.getThumbPosition()} />)\n }\n </AriaColorArea>\n );\n}\n\n/**\n * A ColorArea allows users to adjust two channels of an RGB, HSL or HSB color value against a two-dimensional gradient background.\n */\nlet _ColorArea = forwardRef(ColorArea);\nexport {_ColorArea as ColorArea};\n"],"names":[],"version":3,"file":"ColorArea.cjs.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;AAiBM,MAAM,0DAAmB,CAAA,GAAA,0BAAY,EAA6D;AAEzG,SAAS,gCAAU,KAAqB,EAAE,GAA2B;IACnE,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,iDAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,oBAAC,mBAAmB,kBAAI,YAAY,UAAE,MAAM,EAAC,GAAG;IACpD,IAAI,eAAe,CAAA,GAAA,mCAAQ,EAAE;IAC7B,qBACE,gCAAC,CAAA,GAAA,oCAAY;QACV,GAAG,KAAK;QACT,KAAK;QACL,OAAO,CAAC,gBAAC,YAAY,cAAE,UAAU,EAAC,GAAM,CAAA;gBACtC,GAAG,YAAY;gBACf,YAAY,aAAa,YAAY,aAAa,UAAU;gBAC5D,kEAAkE;gBAClE,UAAU;gBACV,GAAG,YAAY;YACjB,CAAA;QACA,WAAW,CAAA,cAAe,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAkBL,aAAa;kBACpD,CAAC,SAAC,KAAK,EAAC,iBACN,gCAAC,CAAA,GAAA,qCAAU;gBACV,cAAc;gBACd,aAAa,IAAM,MAAM,gBAAgB;;;AAInD;AAEA;;CAEC,GACD,IAAI,0DAAa,CAAA,GAAA,uBAAS,EAAE","sources":["packages/@react-spectrum/s2/src/ColorArea.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 {\n ColorArea as AriaColorArea,\n ColorAreaProps as AriaColorAreaProps,\n ContextValue\n} from 'react-aria-components';\nimport {ColorHandle} from './ColorHandle';\nimport {createContext, forwardRef} from 'react';\nimport {DOMRef, DOMRefValue} from '@react-types/shared';\nimport {getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {style} from '../style' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface ColorAreaProps extends Omit<AriaColorAreaProps, 'children' | 'className' | 'style'>, StyleProps {}\n\nexport const ColorAreaContext = createContext<ContextValue<ColorAreaProps, DOMRefValue<HTMLDivElement>>>(null);\n\nfunction ColorArea(props: ColorAreaProps, ref: DOMRef<HTMLDivElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, ColorAreaContext);\n let {UNSAFE_className = '', UNSAFE_style, styles} = props;\n let containerRef = useDOMRef(ref);\n return (\n <AriaColorArea\n {...props}\n ref={containerRef}\n style={({defaultStyle, isDisabled}) => ({\n ...defaultStyle,\n background: isDisabled ? undefined : defaultStyle.background,\n // Move position: relative to style macro so it can be overridden.\n position: undefined,\n ...UNSAFE_style\n })}\n className={renderProps => UNSAFE_className + style({\n position: 'relative',\n size: 192,\n minSize: 64,\n borderRadius: 'default',\n outlineColor: {\n default: 'gray-1000/10',\n forcedColors: 'ButtonBorder'\n },\n outlineWidth: 1,\n outlineOffset: -1,\n outlineStyle: {\n default: 'solid',\n isDisabled: 'none'\n },\n backgroundColor: {\n isDisabled: 'disabled'\n }\n }, getAllowedOverrides({height: true}))(renderProps, styles)}>\n {({state}) =>\n (<ColorHandle\n containerRef={containerRef}\n getPosition={() => state.getThumbPosition()} />)\n }\n </AriaColorArea>\n );\n}\n\n/**\n * A ColorArea allows users to adjust two channels of an RGB, HSL or HSB color value against a two-dimensional gradient background.\n */\nlet _ColorArea = forwardRef(ColorArea);\nexport {_ColorArea as ColorArea};\n"],"names":[],"version":3,"file":"ColorArea.cjs.map"}
@@ -7,20 +7,20 @@
7
7
  position: relative;
8
8
  }
9
9
 
10
- .lP {
11
- width: 12rem;
10
+ .lx {
11
+ width: calc(12rem * var(--s2-scale));
12
12
  }
13
13
 
14
- .kP {
15
- height: 12rem;
14
+ .kx {
15
+ height: calc(12rem * var(--s2-scale));
16
16
  }
17
17
 
18
- .qB {
19
- min-width: 4rem;
18
+ .qp {
19
+ min-width: calc(4rem * var(--s2-scale));
20
20
  }
21
21
 
22
- .oB {
23
- min-height: 4rem;
22
+ .op {
23
+ min-height: calc(4rem * var(--s2-scale));
24
24
  }
25
25
 
26
26
  ._vc {
@@ -66,26 +66,6 @@
66
66
 
67
67
  @layer _.b, UNSAFE_overrides;
68
68
 
69
- @layer _.b.b {
70
- @media not ((hover: hover) and (pointer: fine)) {
71
- .lbQ {
72
- width: 15rem;
73
- }
74
-
75
- .kbQ {
76
- height: 15rem;
77
- }
78
-
79
- .qbC {
80
- min-width: 5rem;
81
- }
82
-
83
- .obC {
84
- min-height: 5rem;
85
- }
86
- }
87
- }
88
-
89
69
  @layer _.b.a {
90
70
  @media (forced-colors: active) {
91
71
  .da_____v {
@@ -1 +1 @@
1
- {"mappings":"AA4CmD;;;;AAAA;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;AAAA;;AAAA;EAAA;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;;;AAAA;EAAA;IAAA","sources":["packages/@react-spectrum/s2/src/ColorArea.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 {\n ColorArea as AriaColorArea,\n ColorAreaProps as AriaColorAreaProps,\n ContextValue\n} from 'react-aria-components';\nimport {ColorHandle} from './ColorHandle';\nimport {createContext, forwardRef} from 'react';\nimport {DOMRef, DOMRefValue} from '@react-types/shared';\nimport {getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {style} from '../style' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface ColorAreaProps extends Omit<AriaColorAreaProps, 'children' | 'className' | 'style'>, StyleProps {}\n\nexport const ColorAreaContext = createContext<ContextValue<ColorAreaProps, DOMRefValue<HTMLDivElement>>>(null);\n\nfunction ColorArea(props: ColorAreaProps, ref: DOMRef<HTMLDivElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, ColorAreaContext);\n let {UNSAFE_className = '', UNSAFE_style, styles} = props;\n let containerRef = useDOMRef(ref);\n return (\n <AriaColorArea\n {...props}\n ref={containerRef}\n style={({defaultStyle, isDisabled}) => ({\n ...defaultStyle,\n background: isDisabled ? undefined : defaultStyle.background,\n // Move position: relative to style macro so it can be overridden.\n position: undefined,\n ...UNSAFE_style\n })}\n className={renderProps => UNSAFE_className + style({\n position: 'relative',\n size: 192,\n minSize: 64,\n borderRadius: 'default',\n outlineColor: {\n default: 'gray-1000/10',\n forcedColors: 'ButtonBorder'\n },\n outlineWidth: 1,\n outlineOffset: -1,\n outlineStyle: {\n default: 'solid',\n isDisabled: 'none'\n },\n backgroundColor: {\n isDisabled: 'disabled'\n }\n }, getAllowedOverrides({height: true}))(renderProps, styles)}>\n {({state}) =>\n (<ColorHandle\n containerRef={containerRef}\n getPosition={() => state.getThumbPosition()} />)\n }\n </AriaColorArea>\n );\n}\n\n/**\n * A ColorArea allows users to adjust two channels of an RGB, HSL or HSB color value against a two-dimensional gradient background.\n */\nlet _ColorArea = forwardRef(ColorArea);\nexport {_ColorArea as ColorArea};\n"],"names":[],"version":3,"file":"ColorArea.css.map"}
1
+ {"mappings":"AA4CmD;;;;AAAA;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;AAAA;;AAAA;EAAA;IAAA","sources":["packages/@react-spectrum/s2/src/ColorArea.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 {\n ColorArea as AriaColorArea,\n ColorAreaProps as AriaColorAreaProps,\n ContextValue\n} from 'react-aria-components';\nimport {ColorHandle} from './ColorHandle';\nimport {createContext, forwardRef} from 'react';\nimport {DOMRef, DOMRefValue} from '@react-types/shared';\nimport {getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {style} from '../style' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface ColorAreaProps extends Omit<AriaColorAreaProps, 'children' | 'className' | 'style'>, StyleProps {}\n\nexport const ColorAreaContext = createContext<ContextValue<ColorAreaProps, DOMRefValue<HTMLDivElement>>>(null);\n\nfunction ColorArea(props: ColorAreaProps, ref: DOMRef<HTMLDivElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, ColorAreaContext);\n let {UNSAFE_className = '', UNSAFE_style, styles} = props;\n let containerRef = useDOMRef(ref);\n return (\n <AriaColorArea\n {...props}\n ref={containerRef}\n style={({defaultStyle, isDisabled}) => ({\n ...defaultStyle,\n background: isDisabled ? undefined : defaultStyle.background,\n // Move position: relative to style macro so it can be overridden.\n position: undefined,\n ...UNSAFE_style\n })}\n className={renderProps => UNSAFE_className + style({\n position: 'relative',\n size: 192,\n minSize: 64,\n borderRadius: 'default',\n outlineColor: {\n default: 'gray-1000/10',\n forcedColors: 'ButtonBorder'\n },\n outlineWidth: 1,\n outlineOffset: -1,\n outlineStyle: {\n default: 'solid',\n isDisabled: 'none'\n },\n backgroundColor: {\n isDisabled: 'disabled'\n }\n }, getAllowedOverrides({height: true}))(renderProps, styles)}>\n {({state}) =>\n (<ColorHandle\n containerRef={containerRef}\n getPosition={() => state.getThumbPosition()} />)\n }\n </AriaColorArea>\n );\n}\n\n/**\n * A ColorArea allows users to adjust two channels of an RGB, HSL or HSB color value against a two-dimensional gradient background.\n */\nlet _ColorArea = forwardRef(ColorArea);\nexport {_ColorArea as ColorArea};\n"],"names":[],"version":3,"file":"ColorArea.css.map"}
@@ -54,22 +54,10 @@ function $40a2b649525568ab$var$ColorArea(props, ref) {
54
54
  if (/^\s*o/.test(p)) $o = true;
55
55
  }
56
56
  if (!$U) rules += ' Uc';
57
- if (!$l) {
58
- rules += ' lbQ';
59
- rules += ' lP';
60
- }
61
- if (!$k) {
62
- rules += ' kbQ';
63
- rules += ' kP';
64
- }
65
- if (!$q) {
66
- rules += ' qbC';
67
- rules += ' qB';
68
- }
69
- if (!$o) {
70
- rules += ' obC';
71
- rules += ' oB';
72
- }
57
+ if (!$l) rules += ' lx';
58
+ if (!$k) rules += ' kx';
59
+ if (!$q) rules += ' qp';
60
+ if (!$o) rules += ' op';
73
61
  rules += ' _vc';
74
62
  rules += ' _wc';
75
63
  rules += ' _xc';
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;AAiBM,MAAM,0DAAmB,CAAA,GAAA,oBAAY,EAA6D;AAEzG,SAAS,gCAAU,KAAqB,EAAE,GAA2B;IACnE,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,oBAAC,mBAAmB,kBAAI,YAAY,UAAE,MAAM,EAAC,GAAG;IACpD,IAAI,eAAe,CAAA,GAAA,gBAAQ,EAAE;IAC7B,qBACE,gBAAC,CAAA,GAAA,gBAAY;QACV,GAAG,KAAK;QACT,KAAK;QACL,OAAO,CAAC,gBAAC,YAAY,cAAE,UAAU,EAAC,GAAM,CAAA;gBACtC,GAAG,YAAY;gBACf,YAAY,aAAa,YAAY,aAAa,UAAU;gBAC5D,kEAAkE;gBAClE,UAAU;gBACV,GAAG,YAAY;YACjB,CAAA;QACA,WAAW,CAAA,cAAe,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAkBL,aAAa;kBACpD,CAAC,SAAC,KAAK,EAAC,iBACN,gBAAC,CAAA,GAAA,yCAAU;gBACV,cAAc;gBACd,aAAa,IAAM,MAAM,gBAAgB;;;AAInD;AAEA;;CAEC,GACD,IAAI,0DAAa,CAAA,GAAA,iBAAS,EAAE","sources":["packages/@react-spectrum/s2/src/ColorArea.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 {\n ColorArea as AriaColorArea,\n ColorAreaProps as AriaColorAreaProps,\n ContextValue\n} from 'react-aria-components';\nimport {ColorHandle} from './ColorHandle';\nimport {createContext, forwardRef} from 'react';\nimport {DOMRef, DOMRefValue} from '@react-types/shared';\nimport {getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {style} from '../style' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface ColorAreaProps extends Omit<AriaColorAreaProps, 'children' | 'className' | 'style'>, StyleProps {}\n\nexport const ColorAreaContext = createContext<ContextValue<ColorAreaProps, DOMRefValue<HTMLDivElement>>>(null);\n\nfunction ColorArea(props: ColorAreaProps, ref: DOMRef<HTMLDivElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, ColorAreaContext);\n let {UNSAFE_className = '', UNSAFE_style, styles} = props;\n let containerRef = useDOMRef(ref);\n return (\n <AriaColorArea\n {...props}\n ref={containerRef}\n style={({defaultStyle, isDisabled}) => ({\n ...defaultStyle,\n background: isDisabled ? undefined : defaultStyle.background,\n // Move position: relative to style macro so it can be overridden.\n position: undefined,\n ...UNSAFE_style\n })}\n className={renderProps => UNSAFE_className + style({\n position: 'relative',\n size: 192,\n minSize: 64,\n borderRadius: 'default',\n outlineColor: {\n default: 'gray-1000/10',\n forcedColors: 'ButtonBorder'\n },\n outlineWidth: 1,\n outlineOffset: -1,\n outlineStyle: {\n default: 'solid',\n isDisabled: 'none'\n },\n backgroundColor: {\n isDisabled: 'disabled'\n }\n }, getAllowedOverrides({height: true}))(renderProps, styles)}>\n {({state}) =>\n (<ColorHandle\n containerRef={containerRef}\n getPosition={() => state.getThumbPosition()} />)\n }\n </AriaColorArea>\n );\n}\n\n/**\n * A ColorArea allows users to adjust two channels of an RGB, HSL or HSB color value against a two-dimensional gradient background.\n */\nlet _ColorArea = forwardRef(ColorArea);\nexport {_ColorArea as ColorArea};\n"],"names":[],"version":3,"file":"ColorArea.mjs.map"}
1
+ {"mappings":";;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;AAiBM,MAAM,0DAAmB,CAAA,GAAA,oBAAY,EAA6D;AAEzG,SAAS,gCAAU,KAAqB,EAAE,GAA2B;IACnE,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,oBAAC,mBAAmB,kBAAI,YAAY,UAAE,MAAM,EAAC,GAAG;IACpD,IAAI,eAAe,CAAA,GAAA,gBAAQ,EAAE;IAC7B,qBACE,gBAAC,CAAA,GAAA,gBAAY;QACV,GAAG,KAAK;QACT,KAAK;QACL,OAAO,CAAC,gBAAC,YAAY,cAAE,UAAU,EAAC,GAAM,CAAA;gBACtC,GAAG,YAAY;gBACf,YAAY,aAAa,YAAY,aAAa,UAAU;gBAC5D,kEAAkE;gBAClE,UAAU;gBACV,GAAG,YAAY;YACjB,CAAA;QACA,WAAW,CAAA,cAAe,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAkBL,aAAa;kBACpD,CAAC,SAAC,KAAK,EAAC,iBACN,gBAAC,CAAA,GAAA,yCAAU;gBACV,cAAc;gBACd,aAAa,IAAM,MAAM,gBAAgB;;;AAInD;AAEA;;CAEC,GACD,IAAI,0DAAa,CAAA,GAAA,iBAAS,EAAE","sources":["packages/@react-spectrum/s2/src/ColorArea.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 {\n ColorArea as AriaColorArea,\n ColorAreaProps as AriaColorAreaProps,\n ContextValue\n} from 'react-aria-components';\nimport {ColorHandle} from './ColorHandle';\nimport {createContext, forwardRef} from 'react';\nimport {DOMRef, DOMRefValue} from '@react-types/shared';\nimport {getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {style} from '../style' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface ColorAreaProps extends Omit<AriaColorAreaProps, 'children' | 'className' | 'style'>, StyleProps {}\n\nexport const ColorAreaContext = createContext<ContextValue<ColorAreaProps, DOMRefValue<HTMLDivElement>>>(null);\n\nfunction ColorArea(props: ColorAreaProps, ref: DOMRef<HTMLDivElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, ColorAreaContext);\n let {UNSAFE_className = '', UNSAFE_style, styles} = props;\n let containerRef = useDOMRef(ref);\n return (\n <AriaColorArea\n {...props}\n ref={containerRef}\n style={({defaultStyle, isDisabled}) => ({\n ...defaultStyle,\n background: isDisabled ? undefined : defaultStyle.background,\n // Move position: relative to style macro so it can be overridden.\n position: undefined,\n ...UNSAFE_style\n })}\n className={renderProps => UNSAFE_className + style({\n position: 'relative',\n size: 192,\n minSize: 64,\n borderRadius: 'default',\n outlineColor: {\n default: 'gray-1000/10',\n forcedColors: 'ButtonBorder'\n },\n outlineWidth: 1,\n outlineOffset: -1,\n outlineStyle: {\n default: 'solid',\n isDisabled: 'none'\n },\n backgroundColor: {\n isDisabled: 'disabled'\n }\n }, getAllowedOverrides({height: true}))(renderProps, styles)}>\n {({state}) =>\n (<ColorHandle\n containerRef={containerRef}\n getPosition={() => state.getThumbPosition()} />)\n }\n </AriaColorArea>\n );\n}\n\n/**\n * A ColorArea allows users to adjust two channels of an RGB, HSL or HSB color value against a two-dimensional gradient background.\n */\nlet _ColorArea = forwardRef(ColorArea);\nexport {_ColorArea as ColorArea};\n"],"names":[],"version":3,"file":"ColorArea.mjs.map"}
@@ -100,22 +100,11 @@ function $c7ab41f1e9757931$var$ColorField(props, ref) {
100
100
  rules += ' _1d';
101
101
  rules += ' _f-1x99dlob';
102
102
  rules += ' _fa';
103
- if (props.size === "XL") {
104
- rules += ' -aqrvqh_k-by';
105
- rules += ' -aqrvqh_k-x';
106
- } else if (props.size === "L") {
107
- rules += ' -aqrvqh_k-bu';
108
- rules += ' -aqrvqh_k-r';
109
- } else if (props.size === "S") {
110
- rules += ' -aqrvqh_k-bn';
111
- rules += ' -aqrvqh_k-m';
112
- } else if (props.size === "XS") {
113
- rules += ' -aqrvqh_k-bl';
114
- rules += ' -aqrvqh_k-k';
115
- } else {
116
- rules += ' -aqrvqh_k-br';
117
- rules += ' -aqrvqh_k-q';
118
- }
103
+ if (props.size === "XL") rules += ' -aqrvqh_k-n';
104
+ else if (props.size === "L") rules += ' -aqrvqh_k-l';
105
+ else if (props.size === "S") rules += ' -aqrvqh_k-h';
106
+ else if (props.size === "XS") rules += ' -aqrvqh_k-g';
107
+ else rules += ' -aqrvqh_k-j';
119
108
  rules += ' -_1inj1bc_i--prjw07';
120
109
  rules += ' je';
121
110
  rules += ' __R-yksgrp';
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;AA0BM,MAAM,0DAAoB,CAAA,GAAA,0BAAY,EAA+C;AAE5F,SAAS,iCAAW,KAAsB,EAAE,GAAsB;IAChE,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,iDAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,cAAc,CAAA,GAAA,uBAAS,EAAE,CAAA,GAAA,qCAAU;IACvC,QAAQ,CAAA,GAAA,sCAAW,EAAE;IACrB,IAAI,SACF,KAAK,eACL,WAAW,gBACX,YAAY,sBACZ,kBAAkB,iBAClB,gBAAgB,mBAChB,aAAa,uBACb,YAAY,oBACZ,mBAAmB,YACnB,MAAM,EACN,GAAG,YACJ,GAAG;IAEJ,sCAAsC;IACtC,IAAI,SAAS,CAAA,GAAA,mBAAK,EAAkB;IACpC,IAAI,WAAW,CAAA,GAAA,mBAAK,EAAoB;IACxC,CAAA,GAAA,gCAAkB,EAAE,KAAK,IAAO,CAAA;YAC9B,GAAG,CAAA,GAAA,4CAAiB,EAAE,QAAQ,SAAS;YACvC;gBACE,IAAI,SAAS,OAAO,EAClB,SAAS,OAAO,CAAC,MAAM;YAE3B;YACA;gBACE,OAAO,SAAS,OAAO;YACzB;QACF,CAAA;IAEA,qBACE,gCAAC,CAAA,GAAA,qCAAa;QACX,GAAG,UAAU;QACd,KAAK;QACL,OAAO;QACP,WAAW,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAAsC;YAClE,MAAM,MAAM,IAAI;2BAChB;YACA,UAAU,CAAC,CAAC;QACd,GAAG;kBACF,CAAC,cAAC,UAAU,aAAE,SAAS,EAAC,iBAAM;;kCAC7B,gCAAC,CAAA,GAAA,oCAAS;wBACR,YAAY;wBACZ,YAAY,MAAM,UAAU;wBAC5B,MAAM,MAAM,IAAI;wBAChB,eAAe;wBACf,YAAY;wBACZ,oBAAoB;wBACpB,gBAAgB,MAAM,cAAc;kCACnC;;kCAEH,iCAAC,CAAA,GAAA,oCAAS;wBAAE,MAAK;wBAAe,YAAY;wBAAY,WAAW;wBAAW,MAAM,MAAM,IAAI;;0CAC5F,gCAAC,CAAA,GAAA,+BAAI;gCAAE,KAAK;;4BACX,2BAAa,gCAAC,CAAA,GAAA,wCAAa;gCAAE,YAAY;;;;kCAE5C,gCAAC,CAAA,GAAA,kCAAO;wBACN,MAAM,MAAM,IAAI;wBAChB,YAAY;wBACZ,WAAW;wBACX,aAAa;kCACZ;;;;;AAKX;AAEA;;CAEC,GACD,MAAM,0DAAc,CAAA,GAAA,uBAAS,EAAE","sources":["packages/@react-spectrum/s2/src/ColorField.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 {\n ColorField as AriaColorField,\n ColorFieldProps as AriaColorFieldProps,\n ContextValue\n} from 'react-aria-components';\nimport {createContext, forwardRef, Ref, useContext, useImperativeHandle, useRef} from 'react';\nimport {createFocusableRef} from '@react-spectrum/utils';\nimport {field, getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {FieldErrorIcon, FieldGroup, FieldLabel, HelpText, Input} from './Field';\nimport {FormContext, useFormProps} from './Form';\nimport {HelpTextProps, SpectrumLabelableProps} from '@react-types/shared';\nimport {style} from '../style' with {type: 'macro'};\nimport {TextFieldRef} from '@react-types/textfield';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface ColorFieldProps extends Omit<AriaColorFieldProps, 'children' | 'className' | 'style'>, StyleProps, SpectrumLabelableProps, HelpTextProps {\n /**\n * The size of the color field.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L' | 'XL'\n}\n\nexport const ColorFieldContext = createContext<ContextValue<ColorFieldProps, TextFieldRef>>(null);\n\nfunction ColorField(props: ColorFieldProps, ref: Ref<TextFieldRef>) {\n [props, ref] = useSpectrumContextProps(props, ref, ColorFieldContext);\n let formContext = useContext(FormContext);\n props = useFormProps(props);\n let {\n label,\n description,\n errorMessage,\n necessityIndicator,\n labelPosition = 'top',\n labelAlign = 'start',\n UNSAFE_style,\n UNSAFE_className = '',\n styles,\n ...fieldProps\n } = props;\n\n // Expose imperative interface for ref\n let domRef = useRef<HTMLDivElement>(null);\n let inputRef = useRef<HTMLInputElement>(null);\n useImperativeHandle(ref, () => ({\n ...createFocusableRef(domRef, inputRef),\n select() {\n if (inputRef.current) {\n inputRef.current.select();\n }\n },\n getInputElement() {\n return inputRef.current;\n }\n }));\n\n return (\n <AriaColorField\n {...fieldProps}\n ref={domRef}\n style={UNSAFE_style}\n className={UNSAFE_className + style(field(), getAllowedOverrides())({\n size: props.size,\n labelPosition,\n isInForm: !!formContext\n }, styles)}>\n {({isDisabled, isInvalid}) => (<>\n <FieldLabel\n isDisabled={isDisabled}\n isRequired={props.isRequired}\n size={props.size}\n labelPosition={labelPosition}\n labelAlign={labelAlign}\n necessityIndicator={necessityIndicator}\n contextualHelp={props.contextualHelp}>\n {label}\n </FieldLabel>\n <FieldGroup role=\"presentation\" isDisabled={isDisabled} isInvalid={isInvalid} size={props.size}>\n <Input ref={inputRef} />\n {isInvalid && <FieldErrorIcon isDisabled={isDisabled} />}\n </FieldGroup>\n <HelpText\n size={props.size}\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n description={description}>\n {errorMessage}\n </HelpText>\n </>)}\n </AriaColorField>\n );\n}\n\n/**\n * A color field allows users to edit a hex color or individual color channel value.\n */\nconst _ColorField = forwardRef(ColorField);\nexport {_ColorField as ColorField};\n"],"names":[],"version":3,"file":"ColorField.cjs.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;AA0BM,MAAM,0DAAoB,CAAA,GAAA,0BAAY,EAA+C;AAE5F,SAAS,iCAAW,KAAsB,EAAE,GAAsB;IAChE,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,iDAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,cAAc,CAAA,GAAA,uBAAS,EAAE,CAAA,GAAA,qCAAU;IACvC,QAAQ,CAAA,GAAA,sCAAW,EAAE;IACrB,IAAI,SACF,KAAK,eACL,WAAW,gBACX,YAAY,sBACZ,kBAAkB,iBAClB,gBAAgB,mBAChB,aAAa,uBACb,YAAY,oBACZ,mBAAmB,YACnB,MAAM,EACN,GAAG,YACJ,GAAG;IAEJ,sCAAsC;IACtC,IAAI,SAAS,CAAA,GAAA,mBAAK,EAAkB;IACpC,IAAI,WAAW,CAAA,GAAA,mBAAK,EAAoB;IACxC,CAAA,GAAA,gCAAkB,EAAE,KAAK,IAAO,CAAA;YAC9B,GAAG,CAAA,GAAA,4CAAiB,EAAE,QAAQ,SAAS;YACvC;gBACE,IAAI,SAAS,OAAO,EAClB,SAAS,OAAO,CAAC,MAAM;YAE3B;YACA;gBACE,OAAO,SAAS,OAAO;YACzB;QACF,CAAA;IAEA,qBACE,gCAAC,CAAA,GAAA,qCAAa;QACX,GAAG,UAAU;QACd,KAAK;QACL,OAAO;QACP,WAAW,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAAsC;YAClE,MAAM,MAAM,IAAI;2BAChB;YACA,UAAU,CAAC,CAAC;QACd,GAAG;kBACF,CAAC,cAAC,UAAU,aAAE,SAAS,EAAC,iBAAM;;kCAC7B,gCAAC,CAAA,GAAA,oCAAS;wBACR,YAAY;wBACZ,YAAY,MAAM,UAAU;wBAC5B,MAAM,MAAM,IAAI;wBAChB,eAAe;wBACf,YAAY;wBACZ,oBAAoB;wBACpB,gBAAgB,MAAM,cAAc;kCACnC;;kCAEH,iCAAC,CAAA,GAAA,oCAAS;wBAAE,MAAK;wBAAe,YAAY;wBAAY,WAAW;wBAAW,MAAM,MAAM,IAAI;;0CAC5F,gCAAC,CAAA,GAAA,+BAAI;gCAAE,KAAK;;4BACX,2BAAa,gCAAC,CAAA,GAAA,wCAAa;gCAAE,YAAY;;;;kCAE5C,gCAAC,CAAA,GAAA,kCAAO;wBACN,MAAM,MAAM,IAAI;wBAChB,YAAY;wBACZ,WAAW;wBACX,aAAa;kCACZ;;;;;AAKX;AAEA;;CAEC,GACD,MAAM,0DAAc,CAAA,GAAA,uBAAS,EAAE","sources":["packages/@react-spectrum/s2/src/ColorField.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 {\n ColorField as AriaColorField,\n ColorFieldProps as AriaColorFieldProps,\n ContextValue\n} from 'react-aria-components';\nimport {createContext, forwardRef, Ref, useContext, useImperativeHandle, useRef} from 'react';\nimport {createFocusableRef} from '@react-spectrum/utils';\nimport {field, getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {FieldErrorIcon, FieldGroup, FieldLabel, HelpText, Input} from './Field';\nimport {FormContext, useFormProps} from './Form';\nimport {HelpTextProps, SpectrumLabelableProps} from '@react-types/shared';\nimport {style} from '../style' with {type: 'macro'};\nimport {TextFieldRef} from '@react-types/textfield';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface ColorFieldProps extends Omit<AriaColorFieldProps, 'children' | 'className' | 'style'>, StyleProps, SpectrumLabelableProps, HelpTextProps {\n /**\n * The size of the color field.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L' | 'XL'\n}\n\nexport const ColorFieldContext = createContext<ContextValue<ColorFieldProps, TextFieldRef>>(null);\n\nfunction ColorField(props: ColorFieldProps, ref: Ref<TextFieldRef>) {\n [props, ref] = useSpectrumContextProps(props, ref, ColorFieldContext);\n let formContext = useContext(FormContext);\n props = useFormProps(props);\n let {\n label,\n description,\n errorMessage,\n necessityIndicator,\n labelPosition = 'top',\n labelAlign = 'start',\n UNSAFE_style,\n UNSAFE_className = '',\n styles,\n ...fieldProps\n } = props;\n\n // Expose imperative interface for ref\n let domRef = useRef<HTMLDivElement>(null);\n let inputRef = useRef<HTMLInputElement>(null);\n useImperativeHandle(ref, () => ({\n ...createFocusableRef(domRef, inputRef),\n select() {\n if (inputRef.current) {\n inputRef.current.select();\n }\n },\n getInputElement() {\n return inputRef.current;\n }\n }));\n\n return (\n <AriaColorField\n {...fieldProps}\n ref={domRef}\n style={UNSAFE_style}\n className={UNSAFE_className + style(field(), getAllowedOverrides())({\n size: props.size,\n labelPosition,\n isInForm: !!formContext\n }, styles)}>\n {({isDisabled, isInvalid}) => (<>\n <FieldLabel\n isDisabled={isDisabled}\n isRequired={props.isRequired}\n size={props.size}\n labelPosition={labelPosition}\n labelAlign={labelAlign}\n necessityIndicator={necessityIndicator}\n contextualHelp={props.contextualHelp}>\n {label}\n </FieldLabel>\n <FieldGroup role=\"presentation\" isDisabled={isDisabled} isInvalid={isInvalid} size={props.size}>\n <Input ref={inputRef} />\n {isInvalid && <FieldErrorIcon isDisabled={isDisabled} />}\n </FieldGroup>\n <HelpText\n size={props.size}\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n description={description}>\n {errorMessage}\n </HelpText>\n </>)}\n </AriaColorField>\n );\n}\n\n/**\n * A color field allows users to edit a hex color or individual color channel value.\n */\nconst _ColorField = forwardRef(ColorField);\nexport {_ColorField as ColorField};\n"],"names":[],"version":3,"file":"ColorField.cjs.map"}
@@ -74,24 +74,24 @@
74
74
  line-height: 1.3;
75
75
  }
76
76
 
77
- .-aqrvqh_k-q {
78
- --field-height: 2rem;
77
+ .-aqrvqh_k-j {
78
+ --field-height: calc(2rem * var(--s2-scale));
79
79
  }
80
80
 
81
- .-aqrvqh_k-k {
82
- --field-height: 1.25rem;
81
+ .-aqrvqh_k-g {
82
+ --field-height: calc(1.25rem * var(--s2-scale));
83
83
  }
84
84
 
85
- .-aqrvqh_k-m {
86
- --field-height: 1.5rem;
85
+ .-aqrvqh_k-h {
86
+ --field-height: calc(1.5rem * var(--s2-scale));
87
87
  }
88
88
 
89
- .-aqrvqh_k-r {
90
- --field-height: 2.5rem;
89
+ .-aqrvqh_k-l {
90
+ --field-height: calc(2.5rem * var(--s2-scale));
91
91
  }
92
92
 
93
- .-aqrvqh_k-x {
94
- --field-height: 3rem;
93
+ .-aqrvqh_k-n {
94
+ --field-height: calc(3rem * var(--s2-scale));
95
95
  }
96
96
 
97
97
  .-_1inj1bc_i--prjw07 {
@@ -136,26 +136,6 @@
136
136
  ._dbj {
137
137
  font-size: 1.375rem;
138
138
  }
139
-
140
- .-aqrvqh_k-br {
141
- --field-height: 2.5rem;
142
- }
143
-
144
- .-aqrvqh_k-bl {
145
- --field-height: 1.5625rem;
146
- }
147
-
148
- .-aqrvqh_k-bn {
149
- --field-height: 1.875rem;
150
- }
151
-
152
- .-aqrvqh_k-bu {
153
- --field-height: 3.125rem;
154
- }
155
-
156
- .-aqrvqh_k-by {
157
- --field-height: 3.75rem;
158
- }
159
139
  }
160
140
  }
161
141
  /*# sourceMappingURL=ColorField.css.map */
@@ -1 +1 @@
1
- {"mappings":"AA2EoC;;;;AAAA;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;;;;;AAAA;EAAA;;;;;AAAA;;AAAA;EAAA;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA","sources":["packages/@react-spectrum/s2/src/ColorField.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 {\n ColorField as AriaColorField,\n ColorFieldProps as AriaColorFieldProps,\n ContextValue\n} from 'react-aria-components';\nimport {createContext, forwardRef, Ref, useContext, useImperativeHandle, useRef} from 'react';\nimport {createFocusableRef} from '@react-spectrum/utils';\nimport {field, getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {FieldErrorIcon, FieldGroup, FieldLabel, HelpText, Input} from './Field';\nimport {FormContext, useFormProps} from './Form';\nimport {HelpTextProps, SpectrumLabelableProps} from '@react-types/shared';\nimport {style} from '../style' with {type: 'macro'};\nimport {TextFieldRef} from '@react-types/textfield';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface ColorFieldProps extends Omit<AriaColorFieldProps, 'children' | 'className' | 'style'>, StyleProps, SpectrumLabelableProps, HelpTextProps {\n /**\n * The size of the color field.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L' | 'XL'\n}\n\nexport const ColorFieldContext = createContext<ContextValue<ColorFieldProps, TextFieldRef>>(null);\n\nfunction ColorField(props: ColorFieldProps, ref: Ref<TextFieldRef>) {\n [props, ref] = useSpectrumContextProps(props, ref, ColorFieldContext);\n let formContext = useContext(FormContext);\n props = useFormProps(props);\n let {\n label,\n description,\n errorMessage,\n necessityIndicator,\n labelPosition = 'top',\n labelAlign = 'start',\n UNSAFE_style,\n UNSAFE_className = '',\n styles,\n ...fieldProps\n } = props;\n\n // Expose imperative interface for ref\n let domRef = useRef<HTMLDivElement>(null);\n let inputRef = useRef<HTMLInputElement>(null);\n useImperativeHandle(ref, () => ({\n ...createFocusableRef(domRef, inputRef),\n select() {\n if (inputRef.current) {\n inputRef.current.select();\n }\n },\n getInputElement() {\n return inputRef.current;\n }\n }));\n\n return (\n <AriaColorField\n {...fieldProps}\n ref={domRef}\n style={UNSAFE_style}\n className={UNSAFE_className + style(field(), getAllowedOverrides())({\n size: props.size,\n labelPosition,\n isInForm: !!formContext\n }, styles)}>\n {({isDisabled, isInvalid}) => (<>\n <FieldLabel\n isDisabled={isDisabled}\n isRequired={props.isRequired}\n size={props.size}\n labelPosition={labelPosition}\n labelAlign={labelAlign}\n necessityIndicator={necessityIndicator}\n contextualHelp={props.contextualHelp}>\n {label}\n </FieldLabel>\n <FieldGroup role=\"presentation\" isDisabled={isDisabled} isInvalid={isInvalid} size={props.size}>\n <Input ref={inputRef} />\n {isInvalid && <FieldErrorIcon isDisabled={isDisabled} />}\n </FieldGroup>\n <HelpText\n size={props.size}\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n description={description}>\n {errorMessage}\n </HelpText>\n </>)}\n </AriaColorField>\n );\n}\n\n/**\n * A color field allows users to edit a hex color or individual color channel value.\n */\nconst _ColorField = forwardRef(ColorField);\nexport {_ColorField as ColorField};\n"],"names":[],"version":3,"file":"ColorField.css.map"}
1
+ {"mappings":"AA2EoC;;;;AAAA;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;;;;;AAAA;EAAA;;;;;AAAA;;AAAA;EAAA;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA","sources":["packages/@react-spectrum/s2/src/ColorField.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 {\n ColorField as AriaColorField,\n ColorFieldProps as AriaColorFieldProps,\n ContextValue\n} from 'react-aria-components';\nimport {createContext, forwardRef, Ref, useContext, useImperativeHandle, useRef} from 'react';\nimport {createFocusableRef} from '@react-spectrum/utils';\nimport {field, getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {FieldErrorIcon, FieldGroup, FieldLabel, HelpText, Input} from './Field';\nimport {FormContext, useFormProps} from './Form';\nimport {HelpTextProps, SpectrumLabelableProps} from '@react-types/shared';\nimport {style} from '../style' with {type: 'macro'};\nimport {TextFieldRef} from '@react-types/textfield';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface ColorFieldProps extends Omit<AriaColorFieldProps, 'children' | 'className' | 'style'>, StyleProps, SpectrumLabelableProps, HelpTextProps {\n /**\n * The size of the color field.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L' | 'XL'\n}\n\nexport const ColorFieldContext = createContext<ContextValue<ColorFieldProps, TextFieldRef>>(null);\n\nfunction ColorField(props: ColorFieldProps, ref: Ref<TextFieldRef>) {\n [props, ref] = useSpectrumContextProps(props, ref, ColorFieldContext);\n let formContext = useContext(FormContext);\n props = useFormProps(props);\n let {\n label,\n description,\n errorMessage,\n necessityIndicator,\n labelPosition = 'top',\n labelAlign = 'start',\n UNSAFE_style,\n UNSAFE_className = '',\n styles,\n ...fieldProps\n } = props;\n\n // Expose imperative interface for ref\n let domRef = useRef<HTMLDivElement>(null);\n let inputRef = useRef<HTMLInputElement>(null);\n useImperativeHandle(ref, () => ({\n ...createFocusableRef(domRef, inputRef),\n select() {\n if (inputRef.current) {\n inputRef.current.select();\n }\n },\n getInputElement() {\n return inputRef.current;\n }\n }));\n\n return (\n <AriaColorField\n {...fieldProps}\n ref={domRef}\n style={UNSAFE_style}\n className={UNSAFE_className + style(field(), getAllowedOverrides())({\n size: props.size,\n labelPosition,\n isInForm: !!formContext\n }, styles)}>\n {({isDisabled, isInvalid}) => (<>\n <FieldLabel\n isDisabled={isDisabled}\n isRequired={props.isRequired}\n size={props.size}\n labelPosition={labelPosition}\n labelAlign={labelAlign}\n necessityIndicator={necessityIndicator}\n contextualHelp={props.contextualHelp}>\n {label}\n </FieldLabel>\n <FieldGroup role=\"presentation\" isDisabled={isDisabled} isInvalid={isInvalid} size={props.size}>\n <Input ref={inputRef} />\n {isInvalid && <FieldErrorIcon isDisabled={isDisabled} />}\n </FieldGroup>\n <HelpText\n size={props.size}\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n description={description}>\n {errorMessage}\n </HelpText>\n </>)}\n </AriaColorField>\n );\n}\n\n/**\n * A color field allows users to edit a hex color or individual color channel value.\n */\nconst _ColorField = forwardRef(ColorField);\nexport {_ColorField as ColorField};\n"],"names":[],"version":3,"file":"ColorField.css.map"}