@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
package/dist/Checkbox.css CHANGED
@@ -7,7 +7,7 @@
7
7
  align-items: baseline;
8
8
  }
9
9
 
10
- .l7 {
10
+ .lJ {
11
11
  width: fit-content;
12
12
  }
13
13
 
@@ -89,36 +89,36 @@
89
89
  outline-offset: 2px;
90
90
  }
91
91
 
92
- .lj {
93
- width: 1rem;
92
+ .lf {
93
+ width: calc(1rem * var(--s2-scale));
94
94
  }
95
95
 
96
- .l8 {
97
- width: .875rem;
96
+ .lK {
97
+ width: calc(.875rem * var(--s2-scale));
98
98
  }
99
99
 
100
- .l_a {
101
- width: 1.125rem;
100
+ .lL {
101
+ width: calc(1.125rem * var(--s2-scale));
102
102
  }
103
103
 
104
- .lk {
105
- width: 1.25rem;
104
+ .lg {
105
+ width: calc(1.25rem * var(--s2-scale));
106
106
  }
107
107
 
108
- .kj {
109
- height: 1rem;
108
+ .kf {
109
+ height: calc(1rem * var(--s2-scale));
110
110
  }
111
111
 
112
- .k8 {
113
- height: .875rem;
112
+ .kK {
113
+ height: calc(.875rem * var(--s2-scale));
114
114
  }
115
115
 
116
- .k_a {
117
- height: 1.125rem;
116
+ .kL {
117
+ height: calc(1.125rem * var(--s2-scale));
118
118
  }
119
119
 
120
- .kk {
121
- height: 1.25rem;
120
+ .kg {
121
+ height: calc(1.25rem * var(--s2-scale));
122
122
  }
123
123
 
124
124
  ._vi {
@@ -327,38 +327,6 @@
327
327
  ._dbj {
328
328
  font-size: 1.375rem;
329
329
  }
330
-
331
- .lbk {
332
- width: 1.25rem;
333
- }
334
-
335
- .lb9 {
336
- width: 1.09375rem;
337
- }
338
-
339
- .lb_b {
340
- width: 1.40625rem;
341
- }
342
-
343
- .lbl {
344
- width: 1.5625rem;
345
- }
346
-
347
- .kbk {
348
- height: 1.25rem;
349
- }
350
-
351
- .kb9 {
352
- height: 1.09375rem;
353
- }
354
-
355
- .kb_b {
356
- height: 1.40625rem;
357
- }
358
-
359
- .kbl {
360
- height: 1.5625rem;
361
- }
362
330
  }
363
331
  }
364
332
 
@@ -1 +1 @@
1
- {"mappings":"AC6CgB;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAoBG;;;;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;;;;EA6CO;;;;;AAjEV;EAAA;;;;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;;AAAA;EAAA;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAoBG;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;;;AApBH;EAAA;IAAA;;;;IAoBG;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IA6CO;;;;;;AA7CP","sources":["547feb480bf9b133","packages/@react-spectrum/s2/src/Checkbox.tsx"],"sourcesContent":["@import \"bc01646daa9aaa9a\";\n@import \"4050adff4afc0e3e\";\n@import \"57a225a6b7ca79cd\";\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 {Checkbox as AriaCheckbox, CheckboxProps as AriaCheckboxProps, CheckboxGroupStateContext, CheckboxRenderProps, ContextValue, useSlottedContext} from 'react-aria-components';\nimport {baseColor, focusRing, style} from '../style' with {type: 'macro'};\nimport {CenterBaseline} from './CenterBaseline';\nimport CheckmarkIcon from '../ui-icons/Checkmark';\nimport {createContext, forwardRef, ReactNode, useContext, useRef} from 'react';\nimport DashIcon from '../ui-icons/Dash';\nimport {FocusableRef, FocusableRefValue} from '@react-types/shared';\nimport {FormContext, useFormProps} from './Form';\nimport {getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {pressScale} from './pressScale';\nimport {useFocusableRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\ninterface CheckboxStyleProps {\n /**\n * The size of the Checkbox.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L' | 'XL',\n /** Whether the Checkbox should be displayed with an emphasized style. */\n isEmphasized?: boolean\n}\n\ninterface RenderProps extends CheckboxRenderProps, CheckboxStyleProps {}\n\nexport interface CheckboxProps extends Omit<AriaCheckboxProps, 'className' | 'style' | 'children' | 'onHover' | 'onHoverStart' | 'onHoverEnd' | 'onHoverChange'>, StyleProps, CheckboxStyleProps {\n /** The label for the element. */\n children?: ReactNode\n}\n\nexport const CheckboxContext = createContext<ContextValue<CheckboxProps, FocusableRefValue<HTMLLabelElement>>>(null);\n\nconst wrapper = style({\n display: 'flex',\n columnGap: 'text-to-control',\n alignItems: 'baseline',\n width: 'fit',\n font: 'control',\n transition: 'colors',\n color: {\n default: 'neutral',\n isDisabled: {\n default: 'disabled',\n forcedColors: 'GrayText'\n }\n },\n gridColumnStart: {\n isInForm: 'field'\n },\n disableTapHighlight: true\n}, getAllowedOverrides());\n\nexport const box = style<RenderProps>({\n ...focusRing(),\n size: 'control-sm',\n borderRadius: 'control-sm',\n flexShrink: 0,\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n borderWidth: 2,\n boxSizing: 'border-box',\n borderStyle: 'solid',\n transition: 'default',\n forcedColorAdjust: 'none',\n backgroundColor: {\n default: 'gray-25',\n forcedColors: 'Background',\n isSelected: {\n default: 'neutral',\n isEmphasized: baseColor('accent-900'),\n forcedColors: 'Highlight',\n isInvalid: {\n default: baseColor('negative-900'),\n forcedColors: 'Mark'\n },\n isDisabled: {\n default: 'gray-400',\n forcedColors: 'GrayText'\n }\n }\n },\n borderColor: {\n default: baseColor('gray-800'),\n forcedColors: 'ButtonBorder',\n isInvalid: {\n default: 'negative',\n forcedColors: 'Mark'\n },\n isDisabled: {\n default: 'gray-400',\n forcedColors: 'GrayText'\n },\n isSelected: 'transparent'\n }\n});\n\nexport const iconStyles = style({\n '--iconPrimary': {\n type: 'fill',\n value: {\n default: 'gray-25',\n forcedColors: 'HighlightText'\n }\n }\n});\n\nconst iconSize = {\n S: 'XS',\n M: 'S',\n L: 'M',\n XL: 'L'\n} as const;\n\nfunction Checkbox({children, ...props}: CheckboxProps, ref: FocusableRef<HTMLLabelElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, CheckboxContext);\n let boxRef = useRef(null);\n let inputRef = useRef<HTMLInputElement | null>(null);\n let domRef = useFocusableRef(ref, inputRef);\n let isInForm = !!useContext(FormContext);\n props = useFormProps(props);\n let isInCheckboxGroup = !!useContext(CheckboxGroupStateContext);\n let ctx = useSlottedContext(CheckboxContext, props.slot);\n\n return (\n <AriaCheckbox\n {...props}\n ref={domRef}\n inputRef={inputRef}\n style={props.UNSAFE_style}\n className={renderProps => (props.UNSAFE_className || '') + wrapper({...renderProps, isInForm, size: props.size || 'M'}, props.styles)}>\n {renderProps => {\n let checkbox = (\n <div\n ref={boxRef}\n style={pressScale(boxRef)(renderProps)}\n className={box({\n ...renderProps,\n isSelected: renderProps.isSelected || renderProps.isIndeterminate,\n size: props.size || 'M',\n isEmphasized: isInCheckboxGroup ? ctx?.isEmphasized : props.isEmphasized\n })}>\n {renderProps.isIndeterminate &&\n <DashIcon size={iconSize[props.size || 'M']} className={iconStyles} />\n }\n {renderProps.isSelected && !renderProps.isIndeterminate &&\n <CheckmarkIcon size={iconSize[props.size || 'M']} className={iconStyles} />\n }\n </div>\n );\n\n // Only render checkbox without center baseline if no label.\n // This avoids expanding the checkbox height to the font's line height.\n if (!children) {\n return checkbox;\n }\n\n return (\n <>\n <CenterBaseline>\n {checkbox}\n </CenterBaseline>\n {children}\n </>\n );\n }}\n </AriaCheckbox>\n );\n}\n\n/**\n * Checkboxes allow users to select multiple items from a list of individual items,\n * or to mark one individual item as selected.\n */\nlet _Checkbox = forwardRef(Checkbox);\nexport {_Checkbox as Checkbox};\n"],"names":[],"version":3,"file":"Checkbox.css.map"}
1
+ {"mappings":"AC6CgB;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAoBG;;;;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;;;;EA6CO;;;;;AAjEV;EAAA;;;;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;;AAAA;EAAA;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;;;AAAA;EAAA;IAAA;;;;IAoBG;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IA6CO;;;;;;AA7CP","sources":["547feb480bf9b133","packages/@react-spectrum/s2/src/Checkbox.tsx"],"sourcesContent":["@import \"bc01646daa9aaa9a\";\n@import \"4050adff4afc0e3e\";\n@import \"57a225a6b7ca79cd\";\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 {Checkbox as AriaCheckbox, CheckboxProps as AriaCheckboxProps, CheckboxGroupStateContext, CheckboxRenderProps, ContextValue, useSlottedContext} from 'react-aria-components';\nimport {baseColor, focusRing, style} from '../style' with {type: 'macro'};\nimport {CenterBaseline} from './CenterBaseline';\nimport CheckmarkIcon from '../ui-icons/Checkmark';\nimport {createContext, forwardRef, ReactNode, useContext, useRef} from 'react';\nimport DashIcon from '../ui-icons/Dash';\nimport {FocusableRef, FocusableRefValue} from '@react-types/shared';\nimport {FormContext, useFormProps} from './Form';\nimport {getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {pressScale} from './pressScale';\nimport {useFocusableRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\ninterface CheckboxStyleProps {\n /**\n * The size of the Checkbox.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L' | 'XL',\n /** Whether the Checkbox should be displayed with an emphasized style. */\n isEmphasized?: boolean\n}\n\ninterface RenderProps extends CheckboxRenderProps, CheckboxStyleProps {}\n\nexport interface CheckboxProps extends Omit<AriaCheckboxProps, 'className' | 'style' | 'children' | 'onHover' | 'onHoverStart' | 'onHoverEnd' | 'onHoverChange'>, StyleProps, CheckboxStyleProps {\n /** The label for the element. */\n children?: ReactNode\n}\n\nexport const CheckboxContext = createContext<ContextValue<CheckboxProps, FocusableRefValue<HTMLLabelElement>>>(null);\n\nconst wrapper = style({\n display: 'flex',\n columnGap: 'text-to-control',\n alignItems: 'baseline',\n width: 'fit',\n font: 'control',\n transition: 'colors',\n color: {\n default: 'neutral',\n isDisabled: {\n default: 'disabled',\n forcedColors: 'GrayText'\n }\n },\n gridColumnStart: {\n isInForm: 'field'\n },\n disableTapHighlight: true\n}, getAllowedOverrides());\n\nexport const box = style<RenderProps>({\n ...focusRing(),\n size: 'control-sm',\n borderRadius: 'control-sm',\n flexShrink: 0,\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n borderWidth: 2,\n boxSizing: 'border-box',\n borderStyle: 'solid',\n transition: 'default',\n forcedColorAdjust: 'none',\n backgroundColor: {\n default: 'gray-25',\n forcedColors: 'Background',\n isSelected: {\n default: 'neutral',\n isEmphasized: baseColor('accent-900'),\n forcedColors: 'Highlight',\n isInvalid: {\n default: baseColor('negative-900'),\n forcedColors: 'Mark'\n },\n isDisabled: {\n default: 'gray-400',\n forcedColors: 'GrayText'\n }\n }\n },\n borderColor: {\n default: baseColor('gray-800'),\n forcedColors: 'ButtonBorder',\n isInvalid: {\n default: 'negative',\n forcedColors: 'Mark'\n },\n isDisabled: {\n default: 'gray-400',\n forcedColors: 'GrayText'\n },\n isSelected: 'transparent'\n }\n});\n\nexport const iconStyles = style({\n '--iconPrimary': {\n type: 'fill',\n value: {\n default: 'gray-25',\n forcedColors: 'HighlightText'\n }\n }\n});\n\nconst iconSize = {\n S: 'XS',\n M: 'S',\n L: 'M',\n XL: 'L'\n} as const;\n\nfunction Checkbox({children, ...props}: CheckboxProps, ref: FocusableRef<HTMLLabelElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, CheckboxContext);\n let boxRef = useRef(null);\n let inputRef = useRef<HTMLInputElement | null>(null);\n let domRef = useFocusableRef(ref, inputRef);\n let isInForm = !!useContext(FormContext);\n props = useFormProps(props);\n let isInCheckboxGroup = !!useContext(CheckboxGroupStateContext);\n let ctx = useSlottedContext(CheckboxContext, props.slot);\n\n return (\n <AriaCheckbox\n {...props}\n ref={domRef}\n inputRef={inputRef}\n style={props.UNSAFE_style}\n className={renderProps => (props.UNSAFE_className || '') + wrapper({...renderProps, isInForm, size: props.size || 'M'}, props.styles)}>\n {renderProps => {\n let checkbox = (\n <div\n ref={boxRef}\n style={pressScale(boxRef)(renderProps)}\n className={box({\n ...renderProps,\n isSelected: renderProps.isSelected || renderProps.isIndeterminate,\n size: props.size || 'M',\n isEmphasized: isInCheckboxGroup ? ctx?.isEmphasized : props.isEmphasized\n })}>\n {renderProps.isIndeterminate &&\n <DashIcon size={iconSize[props.size || 'M']} className={iconStyles} />\n }\n {renderProps.isSelected && !renderProps.isIndeterminate &&\n <CheckmarkIcon size={iconSize[props.size || 'M']} className={iconStyles} />\n }\n </div>\n );\n\n // Only render checkbox without center baseline if no label.\n // This avoids expanding the checkbox height to the font's line height.\n if (!children) {\n return checkbox;\n }\n\n return (\n <>\n <CenterBaseline>\n {checkbox}\n </CenterBaseline>\n {children}\n </>\n );\n }}\n </AriaCheckbox>\n );\n}\n\n/**\n * Checkboxes allow users to select multiple items from a list of individual items,\n * or to mark one individual item as selected.\n */\nlet _Checkbox = forwardRef(Checkbox);\nexport {_Checkbox as Checkbox};\n"],"names":[],"version":3,"file":"Checkbox.css.map"}
package/dist/Checkbox.mjs CHANGED
@@ -44,7 +44,7 @@ const $9b405e0f8095dce0$var$wrapper = function anonymous(props, overrides) {
44
44
  rules += ' _Zd';
45
45
  rules += ' jF';
46
46
  rules += ' _1d';
47
- if (!$l) rules += ' l7';
47
+ if (!$l) rules += ' lJ';
48
48
  rules += ' _c-bc1l9oh';
49
49
  rules += ' _c-1uotwbwg';
50
50
  rules += ' _c-eo0c6sf';
@@ -98,32 +98,14 @@ const $9b405e0f8095dce0$export$827f4ee28efc37 = function anonymous(props) {
98
98
  rules += ' dx';
99
99
  rules += ' _Nc';
100
100
  rules += ' _M-3t1z';
101
- if (props.size === "XL") {
102
- rules += ' lbl';
103
- rules += ' lk';
104
- } else if (props.size === "L") {
105
- rules += ' lb_b';
106
- rules += ' l_a';
107
- } else if (props.size === "S") {
108
- rules += ' lb9';
109
- rules += ' l8';
110
- } else {
111
- rules += ' lbk';
112
- rules += ' lj';
113
- }
114
- if (props.size === "XL") {
115
- rules += ' kbl';
116
- rules += ' kk';
117
- } else if (props.size === "L") {
118
- rules += ' kb_b';
119
- rules += ' k_a';
120
- } else if (props.size === "S") {
121
- rules += ' kb9';
122
- rules += ' k8';
123
- } else {
124
- rules += ' kbk';
125
- rules += ' kj';
126
- }
101
+ if (props.size === "XL") rules += ' lg';
102
+ else if (props.size === "L") rules += ' lL';
103
+ else if (props.size === "S") rules += ' lK';
104
+ else rules += ' lf';
105
+ if (props.size === "XL") rules += ' kg';
106
+ else if (props.size === "L") rules += ' kL';
107
+ else if (props.size === "S") rules += ' kK';
108
+ else rules += ' kf';
127
109
  rules += ' _vi';
128
110
  rules += ' _wi';
129
111
  rules += ' _xi';
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;AAiCM,MAAM,0DAAkB,CAAA,GAAA,oBAAY,EAAoE;AAE/G,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoBC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6CN,MAAM;AAUb,MAAM,iCAAW;IACf,GAAG;IACH,GAAG;IACH,GAAG;IACH,IAAI;AACN;AAEA,SAAS,+BAAS,YAAC,QAAQ,EAAE,GAAG,OAAqB,EAAE,GAAmC;IACxF,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,SAAS,CAAA,GAAA,aAAK,EAAE;IACpB,IAAI,WAAW,CAAA,GAAA,aAAK,EAA2B;IAC/C,IAAI,SAAS,CAAA,GAAA,sBAAc,EAAE,KAAK;IAClC,IAAI,WAAW,CAAC,CAAC,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,yCAAU;IACtC,QAAQ,CAAA,GAAA,yCAAW,EAAE;IACrB,IAAI,oBAAoB,CAAC,CAAC,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,gCAAwB;IAC7D,IAAI,MAAM,CAAA,GAAA,wBAAgB,EAAE,2CAAiB,MAAM,IAAI;IAEvD,qBACE,gBAAC,CAAA,GAAA,eAAW;QACT,GAAG,KAAK;QACT,KAAK;QACL,UAAU;QACV,OAAO,MAAM,YAAY;QACzB,WAAW,CAAA,cAAe,AAAC,CAAA,MAAM,gBAAgB,IAAI,EAAC,IAAK,8BAAQ;gBAAC,GAAG,WAAW;0BAAE;gBAAU,MAAM,MAAM,IAAI,IAAI;YAAG,GAAG,MAAM,MAAM;kBACnI,CAAA;YACC,IAAI,yBACF,iBAAC;gBACC,KAAK;gBACL,OAAO,CAAA,GAAA,yCAAS,EAAE,QAAQ;gBAC1B,WAAW,wCAAI;oBACb,GAAG,WAAW;oBACd,YAAY,YAAY,UAAU,IAAI,YAAY,eAAe;oBACjE,MAAM,MAAM,IAAI,IAAI;oBACpB,cAAc,oBAAoB,KAAK,eAAe,MAAM,YAAY;gBAC1E;;oBACC,YAAY,eAAe,kBAC1B,gBAAC,CAAA,GAAA,wCAAO;wBAAE,MAAM,8BAAQ,CAAC,MAAM,IAAI,IAAI,IAAI;wBAAE,WAAW;;oBAEzD,YAAY,UAAU,IAAI,CAAC,YAAY,eAAe,kBACrD,gBAAC,CAAA,GAAA,wCAAY;wBAAE,MAAM,8BAAQ,CAAC,MAAM,IAAI,IAAI,IAAI;wBAAE,WAAW;;;;YAKnE,4DAA4D;YAC5D,uEAAuE;YACvE,IAAI,CAAC,UACH,OAAO;YAGT,qBACE;;kCACE,gBAAC,CAAA,GAAA,yCAAa;kCACX;;oBAEF;;;QAGP;;AAGN;AAEA;;;CAGC,GACD,IAAI,0DAAY,CAAA,GAAA,iBAAS,EAAE","sources":["packages/@react-spectrum/s2/src/Checkbox.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 {Checkbox as AriaCheckbox, CheckboxProps as AriaCheckboxProps, CheckboxGroupStateContext, CheckboxRenderProps, ContextValue, useSlottedContext} from 'react-aria-components';\nimport {baseColor, focusRing, style} from '../style' with {type: 'macro'};\nimport {CenterBaseline} from './CenterBaseline';\nimport CheckmarkIcon from '../ui-icons/Checkmark';\nimport {createContext, forwardRef, ReactNode, useContext, useRef} from 'react';\nimport DashIcon from '../ui-icons/Dash';\nimport {FocusableRef, FocusableRefValue} from '@react-types/shared';\nimport {FormContext, useFormProps} from './Form';\nimport {getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {pressScale} from './pressScale';\nimport {useFocusableRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\ninterface CheckboxStyleProps {\n /**\n * The size of the Checkbox.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L' | 'XL',\n /** Whether the Checkbox should be displayed with an emphasized style. */\n isEmphasized?: boolean\n}\n\ninterface RenderProps extends CheckboxRenderProps, CheckboxStyleProps {}\n\nexport interface CheckboxProps extends Omit<AriaCheckboxProps, 'className' | 'style' | 'children' | 'onHover' | 'onHoverStart' | 'onHoverEnd' | 'onHoverChange'>, StyleProps, CheckboxStyleProps {\n /** The label for the element. */\n children?: ReactNode\n}\n\nexport const CheckboxContext = createContext<ContextValue<CheckboxProps, FocusableRefValue<HTMLLabelElement>>>(null);\n\nconst wrapper = style({\n display: 'flex',\n columnGap: 'text-to-control',\n alignItems: 'baseline',\n width: 'fit',\n font: 'control',\n transition: 'colors',\n color: {\n default: 'neutral',\n isDisabled: {\n default: 'disabled',\n forcedColors: 'GrayText'\n }\n },\n gridColumnStart: {\n isInForm: 'field'\n },\n disableTapHighlight: true\n}, getAllowedOverrides());\n\nexport const box = style<RenderProps>({\n ...focusRing(),\n size: 'control-sm',\n borderRadius: 'control-sm',\n flexShrink: 0,\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n borderWidth: 2,\n boxSizing: 'border-box',\n borderStyle: 'solid',\n transition: 'default',\n forcedColorAdjust: 'none',\n backgroundColor: {\n default: 'gray-25',\n forcedColors: 'Background',\n isSelected: {\n default: 'neutral',\n isEmphasized: baseColor('accent-900'),\n forcedColors: 'Highlight',\n isInvalid: {\n default: baseColor('negative-900'),\n forcedColors: 'Mark'\n },\n isDisabled: {\n default: 'gray-400',\n forcedColors: 'GrayText'\n }\n }\n },\n borderColor: {\n default: baseColor('gray-800'),\n forcedColors: 'ButtonBorder',\n isInvalid: {\n default: 'negative',\n forcedColors: 'Mark'\n },\n isDisabled: {\n default: 'gray-400',\n forcedColors: 'GrayText'\n },\n isSelected: 'transparent'\n }\n});\n\nexport const iconStyles = style({\n '--iconPrimary': {\n type: 'fill',\n value: {\n default: 'gray-25',\n forcedColors: 'HighlightText'\n }\n }\n});\n\nconst iconSize = {\n S: 'XS',\n M: 'S',\n L: 'M',\n XL: 'L'\n} as const;\n\nfunction Checkbox({children, ...props}: CheckboxProps, ref: FocusableRef<HTMLLabelElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, CheckboxContext);\n let boxRef = useRef(null);\n let inputRef = useRef<HTMLInputElement | null>(null);\n let domRef = useFocusableRef(ref, inputRef);\n let isInForm = !!useContext(FormContext);\n props = useFormProps(props);\n let isInCheckboxGroup = !!useContext(CheckboxGroupStateContext);\n let ctx = useSlottedContext(CheckboxContext, props.slot);\n\n return (\n <AriaCheckbox\n {...props}\n ref={domRef}\n inputRef={inputRef}\n style={props.UNSAFE_style}\n className={renderProps => (props.UNSAFE_className || '') + wrapper({...renderProps, isInForm, size: props.size || 'M'}, props.styles)}>\n {renderProps => {\n let checkbox = (\n <div\n ref={boxRef}\n style={pressScale(boxRef)(renderProps)}\n className={box({\n ...renderProps,\n isSelected: renderProps.isSelected || renderProps.isIndeterminate,\n size: props.size || 'M',\n isEmphasized: isInCheckboxGroup ? ctx?.isEmphasized : props.isEmphasized\n })}>\n {renderProps.isIndeterminate &&\n <DashIcon size={iconSize[props.size || 'M']} className={iconStyles} />\n }\n {renderProps.isSelected && !renderProps.isIndeterminate &&\n <CheckmarkIcon size={iconSize[props.size || 'M']} className={iconStyles} />\n }\n </div>\n );\n\n // Only render checkbox without center baseline if no label.\n // This avoids expanding the checkbox height to the font's line height.\n if (!children) {\n return checkbox;\n }\n\n return (\n <>\n <CenterBaseline>\n {checkbox}\n </CenterBaseline>\n {children}\n </>\n );\n }}\n </AriaCheckbox>\n );\n}\n\n/**\n * Checkboxes allow users to select multiple items from a list of individual items,\n * or to mark one individual item as selected.\n */\nlet _Checkbox = forwardRef(Checkbox);\nexport {_Checkbox as Checkbox};\n"],"names":[],"version":3,"file":"Checkbox.mjs.map"}
1
+ {"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;AAiCM,MAAM,0DAAkB,CAAA,GAAA,oBAAY,EAAoE;AAE/G,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoBC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6CN,MAAM;AAUb,MAAM,iCAAW;IACf,GAAG;IACH,GAAG;IACH,GAAG;IACH,IAAI;AACN;AAEA,SAAS,+BAAS,YAAC,QAAQ,EAAE,GAAG,OAAqB,EAAE,GAAmC;IACxF,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,SAAS,CAAA,GAAA,aAAK,EAAE;IACpB,IAAI,WAAW,CAAA,GAAA,aAAK,EAA2B;IAC/C,IAAI,SAAS,CAAA,GAAA,sBAAc,EAAE,KAAK;IAClC,IAAI,WAAW,CAAC,CAAC,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,yCAAU;IACtC,QAAQ,CAAA,GAAA,yCAAW,EAAE;IACrB,IAAI,oBAAoB,CAAC,CAAC,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,gCAAwB;IAC7D,IAAI,MAAM,CAAA,GAAA,wBAAgB,EAAE,2CAAiB,MAAM,IAAI;IAEvD,qBACE,gBAAC,CAAA,GAAA,eAAW;QACT,GAAG,KAAK;QACT,KAAK;QACL,UAAU;QACV,OAAO,MAAM,YAAY;QACzB,WAAW,CAAA,cAAe,AAAC,CAAA,MAAM,gBAAgB,IAAI,EAAC,IAAK,8BAAQ;gBAAC,GAAG,WAAW;0BAAE;gBAAU,MAAM,MAAM,IAAI,IAAI;YAAG,GAAG,MAAM,MAAM;kBACnI,CAAA;YACC,IAAI,yBACF,iBAAC;gBACC,KAAK;gBACL,OAAO,CAAA,GAAA,yCAAS,EAAE,QAAQ;gBAC1B,WAAW,wCAAI;oBACb,GAAG,WAAW;oBACd,YAAY,YAAY,UAAU,IAAI,YAAY,eAAe;oBACjE,MAAM,MAAM,IAAI,IAAI;oBACpB,cAAc,oBAAoB,KAAK,eAAe,MAAM,YAAY;gBAC1E;;oBACC,YAAY,eAAe,kBAC1B,gBAAC,CAAA,GAAA,wCAAO;wBAAE,MAAM,8BAAQ,CAAC,MAAM,IAAI,IAAI,IAAI;wBAAE,WAAW;;oBAEzD,YAAY,UAAU,IAAI,CAAC,YAAY,eAAe,kBACrD,gBAAC,CAAA,GAAA,wCAAY;wBAAE,MAAM,8BAAQ,CAAC,MAAM,IAAI,IAAI,IAAI;wBAAE,WAAW;;;;YAKnE,4DAA4D;YAC5D,uEAAuE;YACvE,IAAI,CAAC,UACH,OAAO;YAGT,qBACE;;kCACE,gBAAC,CAAA,GAAA,yCAAa;kCACX;;oBAEF;;;QAGP;;AAGN;AAEA;;;CAGC,GACD,IAAI,0DAAY,CAAA,GAAA,iBAAS,EAAE","sources":["packages/@react-spectrum/s2/src/Checkbox.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 {Checkbox as AriaCheckbox, CheckboxProps as AriaCheckboxProps, CheckboxGroupStateContext, CheckboxRenderProps, ContextValue, useSlottedContext} from 'react-aria-components';\nimport {baseColor, focusRing, style} from '../style' with {type: 'macro'};\nimport {CenterBaseline} from './CenterBaseline';\nimport CheckmarkIcon from '../ui-icons/Checkmark';\nimport {createContext, forwardRef, ReactNode, useContext, useRef} from 'react';\nimport DashIcon from '../ui-icons/Dash';\nimport {FocusableRef, FocusableRefValue} from '@react-types/shared';\nimport {FormContext, useFormProps} from './Form';\nimport {getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {pressScale} from './pressScale';\nimport {useFocusableRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\ninterface CheckboxStyleProps {\n /**\n * The size of the Checkbox.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L' | 'XL',\n /** Whether the Checkbox should be displayed with an emphasized style. */\n isEmphasized?: boolean\n}\n\ninterface RenderProps extends CheckboxRenderProps, CheckboxStyleProps {}\n\nexport interface CheckboxProps extends Omit<AriaCheckboxProps, 'className' | 'style' | 'children' | 'onHover' | 'onHoverStart' | 'onHoverEnd' | 'onHoverChange'>, StyleProps, CheckboxStyleProps {\n /** The label for the element. */\n children?: ReactNode\n}\n\nexport const CheckboxContext = createContext<ContextValue<CheckboxProps, FocusableRefValue<HTMLLabelElement>>>(null);\n\nconst wrapper = style({\n display: 'flex',\n columnGap: 'text-to-control',\n alignItems: 'baseline',\n width: 'fit',\n font: 'control',\n transition: 'colors',\n color: {\n default: 'neutral',\n isDisabled: {\n default: 'disabled',\n forcedColors: 'GrayText'\n }\n },\n gridColumnStart: {\n isInForm: 'field'\n },\n disableTapHighlight: true\n}, getAllowedOverrides());\n\nexport const box = style<RenderProps>({\n ...focusRing(),\n size: 'control-sm',\n borderRadius: 'control-sm',\n flexShrink: 0,\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n borderWidth: 2,\n boxSizing: 'border-box',\n borderStyle: 'solid',\n transition: 'default',\n forcedColorAdjust: 'none',\n backgroundColor: {\n default: 'gray-25',\n forcedColors: 'Background',\n isSelected: {\n default: 'neutral',\n isEmphasized: baseColor('accent-900'),\n forcedColors: 'Highlight',\n isInvalid: {\n default: baseColor('negative-900'),\n forcedColors: 'Mark'\n },\n isDisabled: {\n default: 'gray-400',\n forcedColors: 'GrayText'\n }\n }\n },\n borderColor: {\n default: baseColor('gray-800'),\n forcedColors: 'ButtonBorder',\n isInvalid: {\n default: 'negative',\n forcedColors: 'Mark'\n },\n isDisabled: {\n default: 'gray-400',\n forcedColors: 'GrayText'\n },\n isSelected: 'transparent'\n }\n});\n\nexport const iconStyles = style({\n '--iconPrimary': {\n type: 'fill',\n value: {\n default: 'gray-25',\n forcedColors: 'HighlightText'\n }\n }\n});\n\nconst iconSize = {\n S: 'XS',\n M: 'S',\n L: 'M',\n XL: 'L'\n} as const;\n\nfunction Checkbox({children, ...props}: CheckboxProps, ref: FocusableRef<HTMLLabelElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, CheckboxContext);\n let boxRef = useRef(null);\n let inputRef = useRef<HTMLInputElement | null>(null);\n let domRef = useFocusableRef(ref, inputRef);\n let isInForm = !!useContext(FormContext);\n props = useFormProps(props);\n let isInCheckboxGroup = !!useContext(CheckboxGroupStateContext);\n let ctx = useSlottedContext(CheckboxContext, props.slot);\n\n return (\n <AriaCheckbox\n {...props}\n ref={domRef}\n inputRef={inputRef}\n style={props.UNSAFE_style}\n className={renderProps => (props.UNSAFE_className || '') + wrapper({...renderProps, isInForm, size: props.size || 'M'}, props.styles)}>\n {renderProps => {\n let checkbox = (\n <div\n ref={boxRef}\n style={pressScale(boxRef)(renderProps)}\n className={box({\n ...renderProps,\n isSelected: renderProps.isSelected || renderProps.isIndeterminate,\n size: props.size || 'M',\n isEmphasized: isInCheckboxGroup ? ctx?.isEmphasized : props.isEmphasized\n })}>\n {renderProps.isIndeterminate &&\n <DashIcon size={iconSize[props.size || 'M']} className={iconStyles} />\n }\n {renderProps.isSelected && !renderProps.isIndeterminate &&\n <CheckmarkIcon size={iconSize[props.size || 'M']} className={iconStyles} />\n }\n </div>\n );\n\n // Only render checkbox without center baseline if no label.\n // This avoids expanding the checkbox height to the font's line height.\n if (!children) {\n return checkbox;\n }\n\n return (\n <>\n <CenterBaseline>\n {checkbox}\n </CenterBaseline>\n {children}\n </>\n );\n }}\n </AriaCheckbox>\n );\n}\n\n/**\n * Checkboxes allow users to select multiple items from a list of individual items,\n * or to mark one individual item as selected.\n */\nlet _Checkbox = forwardRef(Checkbox);\nexport {_Checkbox as Checkbox};\n"],"names":[],"version":3,"file":"Checkbox.mjs.map"}
@@ -91,22 +91,11 @@ function $883687908275b504$var$CheckboxGroup(props, ref) {
91
91
  rules += ' _1d';
92
92
  rules += ' _f-1x99dlob';
93
93
  rules += ' _fa';
94
- if (props.size === "XL") {
95
- rules += ' -aqrvqh_k-by';
96
- rules += ' -aqrvqh_k-x';
97
- } else if (props.size === "L") {
98
- rules += ' -aqrvqh_k-bu';
99
- rules += ' -aqrvqh_k-r';
100
- } else if (props.size === "S") {
101
- rules += ' -aqrvqh_k-bn';
102
- rules += ' -aqrvqh_k-m';
103
- } else if (props.size === "XS") {
104
- rules += ' -aqrvqh_k-bl';
105
- rules += ' -aqrvqh_k-k';
106
- } else {
107
- rules += ' -aqrvqh_k-br';
108
- rules += ' -aqrvqh_k-q';
109
- }
94
+ if (props.size === "XL") rules += ' -aqrvqh_k-n';
95
+ else if (props.size === "L") rules += ' -aqrvqh_k-l';
96
+ else if (props.size === "S") rules += ' -aqrvqh_k-h';
97
+ else if (props.size === "XS") rules += ' -aqrvqh_k-g';
98
+ else rules += ' -aqrvqh_k-j';
110
99
  rules += ' -_1inj1bc_i--vfy389';
111
100
  rules += ' je';
112
101
  rules += ' __R-yksgrp';
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;AAyCM,MAAM,0DAAuB,CAAA,GAAA,0BAAY,EAAiE;AAEjH,SAAS,oCAAc,KAAyB,EAAE,GAA2B;IAC3E,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,YACZ,QAAQ,iBACR,gBAAgB,mBAChB,aAAa,6BACb,qBAAqB,cACrB,OAAO,kBACP,cAAc,8BACd,mBAAmB,kBACnB,YAAY,gBACZ,YAAY,EACZ,GAAG,YACJ,GAAG;IACJ,IAAI,SAAS,CAAA,GAAA,mCAAQ,EAAE;IAEvB,qBACE,gCAAC,CAAA,GAAA,wCAAgB;QACd,GAAG,UAAU;QACd,KAAK;QACL,OAAO;QACP,WAAW,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAOJ;YACxB,MAAM,MAAM,IAAI;2BAChB;YACA,UAAU,CAAC,CAAC;QACd,GAAG,MAAM,MAAM;kBACd,CAAC,cAAC,UAAU,aAAE,SAAS,EAAC,iBAAM;;kCAC7B,gCAAC,CAAA,GAAA,oCAAS;wBACR,YAAY;wBACZ,YAAY,MAAM,UAAU;wBAC5B,MAAM;wBACN,eAAe;wBACf,YAAY;wBACZ,oBAAoB;wBACpB,gBAAgB,MAAM,cAAc;kCACnC;;kCAEH,gCAAC;wBACC,WAAW;;;;;;;;;;;;;;;0BAeR;yCAAC;wBAAW;kCACf,cAAA,gCAAC,CAAA,GAAA,qCAAU,EAAE,QAAQ;4BAAC,OAAO;gCAAC,GAAG,WAAW;sCAAE;4BAAI;sCAChD,cAAA,gCAAC,CAAA,GAAA,yCAAc,EAAE,QAAQ;gCAAC,OAAO;kDAAC;gCAAY;0CAC3C;;;;kCAIP,gCAAC,CAAA,GAAA,kCAAO;wBACN,MAAM;wBACN,YAAY;wBACZ,WAAW;wBACX,aAAa;wBACb,aAAa;kCACZ;;;;;AAKX;AAEA;;CAEC,GACD,IAAI,0DAAiB,CAAA,GAAA,uBAAS,EAAE","sources":["packages/@react-spectrum/s2/src/CheckboxGroup.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 CheckboxGroup as AriaCheckboxGroup,\n CheckboxGroupProps as AriaCheckboxGroupProps,\n ContextValue\n} from 'react-aria-components';\nimport {CheckboxContext} from './Checkbox';\nimport {createContext, forwardRef, ReactNode, useContext} from 'react';\nimport {DOMRef, DOMRefValue, HelpTextProps, Orientation, SpectrumLabelableProps} from '@react-types/shared';\nimport {field, getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {FieldLabel, HelpText} from './Field';\nimport {FormContext, useFormProps} from './Form';\nimport {style} from '../style' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface CheckboxGroupProps extends Omit<AriaCheckboxGroupProps, 'className' | 'style' | 'children'>, StyleProps, SpectrumLabelableProps, HelpTextProps {\n /**\n * The size of the Checkboxes in the CheckboxGroup.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L' | 'XL',\n /**\n * The axis the checkboxes should align with.\n *\n * @default 'vertical'\n */\n orientation?: Orientation,\n /**\n * The Checkboxes contained within the CheckboxGroup.\n */\n children?: ReactNode,\n /**\n * By default, checkboxes are not emphasized (gray).\n * The emphasized (blue) version provides visual prominence.\n */\n isEmphasized?: boolean\n}\n\nexport const CheckboxGroupContext = createContext<ContextValue<CheckboxGroupProps, DOMRefValue<HTMLDivElement>>>(null);\n\nfunction CheckboxGroup(props: CheckboxGroupProps, ref: DOMRef<HTMLDivElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, CheckboxGroupContext);\n let formContext = useContext(FormContext);\n props = useFormProps(props);\n let {\n label,\n description,\n errorMessage,\n children,\n labelPosition = 'top',\n labelAlign = 'start',\n necessityIndicator = 'icon',\n size = 'M',\n orientation = 'vertical',\n UNSAFE_className = '',\n UNSAFE_style,\n isEmphasized,\n ...groupProps\n } = props;\n let domRef = useDOMRef(ref);\n\n return (\n <AriaCheckboxGroup\n {...groupProps}\n ref={domRef}\n style={UNSAFE_style}\n className={UNSAFE_className + style({\n ...field(),\n // Double the usual gap because of the internal padding within checkbox that spectrum has.\n '--field-gap': {\n type: 'rowGap',\n value: '[calc(var(--field-height) - 1lh)]'\n }\n }, getAllowedOverrides())({\n size: props.size,\n labelPosition,\n isInForm: !!formContext\n }, props.styles)}>\n {({isDisabled, isInvalid}) => (<>\n <FieldLabel\n isDisabled={isDisabled}\n isRequired={props.isRequired}\n size={size}\n labelPosition={labelPosition}\n labelAlign={labelAlign}\n necessityIndicator={necessityIndicator}\n contextualHelp={props.contextualHelp}>\n {label}\n </FieldLabel>\n <div\n className={style({\n gridArea: 'input',\n display: 'flex',\n flexDirection: {\n orientation: {\n vertical: 'column',\n horizontal: 'row'\n }\n },\n lineHeight: 'ui',\n rowGap: '--field-gap',\n // Spectrum uses a fixed spacing value for horizontal,\n // but the gap changes depending on t-shirt size in vertical.\n columnGap: 16,\n flexWrap: 'wrap'\n })({orientation})}>\n <FormContext.Provider value={{...formContext, size}}>\n <CheckboxContext.Provider value={{isEmphasized}}>\n {children}\n </CheckboxContext.Provider>\n </FormContext.Provider>\n </div>\n <HelpText\n size={size}\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n description={description}\n showErrorIcon>\n {errorMessage}\n </HelpText>\n </>)}\n </AriaCheckboxGroup>\n );\n}\n\n/**\n * A CheckboxGroup allows users to select one or more items from a list of choices.\n */\nlet _CheckboxGroup = forwardRef(CheckboxGroup);\nexport {_CheckboxGroup as CheckboxGroup};\n"],"names":[],"version":3,"file":"CheckboxGroup.cjs.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;AAyCM,MAAM,0DAAuB,CAAA,GAAA,0BAAY,EAAiE;AAEjH,SAAS,oCAAc,KAAyB,EAAE,GAA2B;IAC3E,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,YACZ,QAAQ,iBACR,gBAAgB,mBAChB,aAAa,6BACb,qBAAqB,cACrB,OAAO,kBACP,cAAc,8BACd,mBAAmB,kBACnB,YAAY,gBACZ,YAAY,EACZ,GAAG,YACJ,GAAG;IACJ,IAAI,SAAS,CAAA,GAAA,mCAAQ,EAAE;IAEvB,qBACE,gCAAC,CAAA,GAAA,wCAAgB;QACd,GAAG,UAAU;QACd,KAAK;QACL,OAAO;QACP,WAAW,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAOJ;YACxB,MAAM,MAAM,IAAI;2BAChB;YACA,UAAU,CAAC,CAAC;QACd,GAAG,MAAM,MAAM;kBACd,CAAC,cAAC,UAAU,aAAE,SAAS,EAAC,iBAAM;;kCAC7B,gCAAC,CAAA,GAAA,oCAAS;wBACR,YAAY;wBACZ,YAAY,MAAM,UAAU;wBAC5B,MAAM;wBACN,eAAe;wBACf,YAAY;wBACZ,oBAAoB;wBACpB,gBAAgB,MAAM,cAAc;kCACnC;;kCAEH,gCAAC;wBACC,WAAW;;;;;;;;;;;;;;;0BAeR;yCAAC;wBAAW;kCACf,cAAA,gCAAC,CAAA,GAAA,qCAAU,EAAE,QAAQ;4BAAC,OAAO;gCAAC,GAAG,WAAW;sCAAE;4BAAI;sCAChD,cAAA,gCAAC,CAAA,GAAA,yCAAc,EAAE,QAAQ;gCAAC,OAAO;kDAAC;gCAAY;0CAC3C;;;;kCAIP,gCAAC,CAAA,GAAA,kCAAO;wBACN,MAAM;wBACN,YAAY;wBACZ,WAAW;wBACX,aAAa;wBACb,aAAa;kCACZ;;;;;AAKX;AAEA;;CAEC,GACD,IAAI,0DAAiB,CAAA,GAAA,uBAAS,EAAE","sources":["packages/@react-spectrum/s2/src/CheckboxGroup.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 CheckboxGroup as AriaCheckboxGroup,\n CheckboxGroupProps as AriaCheckboxGroupProps,\n ContextValue\n} from 'react-aria-components';\nimport {CheckboxContext} from './Checkbox';\nimport {createContext, forwardRef, ReactNode, useContext} from 'react';\nimport {DOMRef, DOMRefValue, HelpTextProps, Orientation, SpectrumLabelableProps} from '@react-types/shared';\nimport {field, getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {FieldLabel, HelpText} from './Field';\nimport {FormContext, useFormProps} from './Form';\nimport {style} from '../style' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface CheckboxGroupProps extends Omit<AriaCheckboxGroupProps, 'className' | 'style' | 'children'>, StyleProps, SpectrumLabelableProps, HelpTextProps {\n /**\n * The size of the Checkboxes in the CheckboxGroup.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L' | 'XL',\n /**\n * The axis the checkboxes should align with.\n *\n * @default 'vertical'\n */\n orientation?: Orientation,\n /**\n * The Checkboxes contained within the CheckboxGroup.\n */\n children?: ReactNode,\n /**\n * By default, checkboxes are not emphasized (gray).\n * The emphasized (blue) version provides visual prominence.\n */\n isEmphasized?: boolean\n}\n\nexport const CheckboxGroupContext = createContext<ContextValue<CheckboxGroupProps, DOMRefValue<HTMLDivElement>>>(null);\n\nfunction CheckboxGroup(props: CheckboxGroupProps, ref: DOMRef<HTMLDivElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, CheckboxGroupContext);\n let formContext = useContext(FormContext);\n props = useFormProps(props);\n let {\n label,\n description,\n errorMessage,\n children,\n labelPosition = 'top',\n labelAlign = 'start',\n necessityIndicator = 'icon',\n size = 'M',\n orientation = 'vertical',\n UNSAFE_className = '',\n UNSAFE_style,\n isEmphasized,\n ...groupProps\n } = props;\n let domRef = useDOMRef(ref);\n\n return (\n <AriaCheckboxGroup\n {...groupProps}\n ref={domRef}\n style={UNSAFE_style}\n className={UNSAFE_className + style({\n ...field(),\n // Double the usual gap because of the internal padding within checkbox that spectrum has.\n '--field-gap': {\n type: 'rowGap',\n value: '[calc(var(--field-height) - 1lh)]'\n }\n }, getAllowedOverrides())({\n size: props.size,\n labelPosition,\n isInForm: !!formContext\n }, props.styles)}>\n {({isDisabled, isInvalid}) => (<>\n <FieldLabel\n isDisabled={isDisabled}\n isRequired={props.isRequired}\n size={size}\n labelPosition={labelPosition}\n labelAlign={labelAlign}\n necessityIndicator={necessityIndicator}\n contextualHelp={props.contextualHelp}>\n {label}\n </FieldLabel>\n <div\n className={style({\n gridArea: 'input',\n display: 'flex',\n flexDirection: {\n orientation: {\n vertical: 'column',\n horizontal: 'row'\n }\n },\n lineHeight: 'ui',\n rowGap: '--field-gap',\n // Spectrum uses a fixed spacing value for horizontal,\n // but the gap changes depending on t-shirt size in vertical.\n columnGap: 16,\n flexWrap: 'wrap'\n })({orientation})}>\n <FormContext.Provider value={{...formContext, size}}>\n <CheckboxContext.Provider value={{isEmphasized}}>\n {children}\n </CheckboxContext.Provider>\n </FormContext.Provider>\n </div>\n <HelpText\n size={size}\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n description={description}\n showErrorIcon>\n {errorMessage}\n </HelpText>\n </>)}\n </AriaCheckboxGroup>\n );\n}\n\n/**\n * A CheckboxGroup allows users to select one or more items from a list of choices.\n */\nlet _CheckboxGroup = forwardRef(CheckboxGroup);\nexport {_CheckboxGroup as CheckboxGroup};\n"],"names":[],"version":3,"file":"CheckboxGroup.cjs.map"}
@@ -66,24 +66,24 @@
66
66
  align-items: baseline;
67
67
  }
68
68
 
69
- .-aqrvqh_k-q {
70
- --field-height: 2rem;
69
+ .-aqrvqh_k-j {
70
+ --field-height: calc(2rem * var(--s2-scale));
71
71
  }
72
72
 
73
- .-aqrvqh_k-k {
74
- --field-height: 1.25rem;
73
+ .-aqrvqh_k-g {
74
+ --field-height: calc(1.25rem * var(--s2-scale));
75
75
  }
76
76
 
77
- .-aqrvqh_k-m {
78
- --field-height: 1.5rem;
77
+ .-aqrvqh_k-h {
78
+ --field-height: calc(1.5rem * var(--s2-scale));
79
79
  }
80
80
 
81
- .-aqrvqh_k-r {
82
- --field-height: 2.5rem;
81
+ .-aqrvqh_k-l {
82
+ --field-height: calc(2.5rem * var(--s2-scale));
83
83
  }
84
84
 
85
- .-aqrvqh_k-x {
86
- --field-height: 3rem;
85
+ .-aqrvqh_k-n {
86
+ --field-height: calc(3rem * var(--s2-scale));
87
87
  }
88
88
 
89
89
  .-_1inj1bc_i--vfy389 {
@@ -172,26 +172,6 @@
172
172
  ._dbj {
173
173
  font-size: 1.375rem;
174
174
  }
175
-
176
- .-aqrvqh_k-br {
177
- --field-height: 2.5rem;
178
- }
179
-
180
- .-aqrvqh_k-bl {
181
- --field-height: 1.5625rem;
182
- }
183
-
184
- .-aqrvqh_k-bn {
185
- --field-height: 1.875rem;
186
- }
187
-
188
- .-aqrvqh_k-bu {
189
- --field-height: 3.125rem;
190
- }
191
-
192
- .-aqrvqh_k-by {
193
- --field-height: 3.75rem;
194
- }
195
175
  }
196
176
  }
197
177
 
@@ -1 +1 @@
1
- {"mappings":"AC+EoC;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;;;;;AAxBe;EAAA;;;;;AAAA;;AAAA;EAAA;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;;;AAwBf","sources":["229a9af52db930e6","packages/@react-spectrum/s2/src/CheckboxGroup.tsx"],"sourcesContent":["@import \"99c19d559a913dfe\";\n@import \"3a372fd4efad6d81\";\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 {\n CheckboxGroup as AriaCheckboxGroup,\n CheckboxGroupProps as AriaCheckboxGroupProps,\n ContextValue\n} from 'react-aria-components';\nimport {CheckboxContext} from './Checkbox';\nimport {createContext, forwardRef, ReactNode, useContext} from 'react';\nimport {DOMRef, DOMRefValue, HelpTextProps, Orientation, SpectrumLabelableProps} from '@react-types/shared';\nimport {field, getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {FieldLabel, HelpText} from './Field';\nimport {FormContext, useFormProps} from './Form';\nimport {style} from '../style' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface CheckboxGroupProps extends Omit<AriaCheckboxGroupProps, 'className' | 'style' | 'children'>, StyleProps, SpectrumLabelableProps, HelpTextProps {\n /**\n * The size of the Checkboxes in the CheckboxGroup.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L' | 'XL',\n /**\n * The axis the checkboxes should align with.\n *\n * @default 'vertical'\n */\n orientation?: Orientation,\n /**\n * The Checkboxes contained within the CheckboxGroup.\n */\n children?: ReactNode,\n /**\n * By default, checkboxes are not emphasized (gray).\n * The emphasized (blue) version provides visual prominence.\n */\n isEmphasized?: boolean\n}\n\nexport const CheckboxGroupContext = createContext<ContextValue<CheckboxGroupProps, DOMRefValue<HTMLDivElement>>>(null);\n\nfunction CheckboxGroup(props: CheckboxGroupProps, ref: DOMRef<HTMLDivElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, CheckboxGroupContext);\n let formContext = useContext(FormContext);\n props = useFormProps(props);\n let {\n label,\n description,\n errorMessage,\n children,\n labelPosition = 'top',\n labelAlign = 'start',\n necessityIndicator = 'icon',\n size = 'M',\n orientation = 'vertical',\n UNSAFE_className = '',\n UNSAFE_style,\n isEmphasized,\n ...groupProps\n } = props;\n let domRef = useDOMRef(ref);\n\n return (\n <AriaCheckboxGroup\n {...groupProps}\n ref={domRef}\n style={UNSAFE_style}\n className={UNSAFE_className + style({\n ...field(),\n // Double the usual gap because of the internal padding within checkbox that spectrum has.\n '--field-gap': {\n type: 'rowGap',\n value: '[calc(var(--field-height) - 1lh)]'\n }\n }, getAllowedOverrides())({\n size: props.size,\n labelPosition,\n isInForm: !!formContext\n }, props.styles)}>\n {({isDisabled, isInvalid}) => (<>\n <FieldLabel\n isDisabled={isDisabled}\n isRequired={props.isRequired}\n size={size}\n labelPosition={labelPosition}\n labelAlign={labelAlign}\n necessityIndicator={necessityIndicator}\n contextualHelp={props.contextualHelp}>\n {label}\n </FieldLabel>\n <div\n className={style({\n gridArea: 'input',\n display: 'flex',\n flexDirection: {\n orientation: {\n vertical: 'column',\n horizontal: 'row'\n }\n },\n lineHeight: 'ui',\n rowGap: '--field-gap',\n // Spectrum uses a fixed spacing value for horizontal,\n // but the gap changes depending on t-shirt size in vertical.\n columnGap: 16,\n flexWrap: 'wrap'\n })({orientation})}>\n <FormContext.Provider value={{...formContext, size}}>\n <CheckboxContext.Provider value={{isEmphasized}}>\n {children}\n </CheckboxContext.Provider>\n </FormContext.Provider>\n </div>\n <HelpText\n size={size}\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n description={description}\n showErrorIcon>\n {errorMessage}\n </HelpText>\n </>)}\n </AriaCheckboxGroup>\n );\n}\n\n/**\n * A CheckboxGroup allows users to select one or more items from a list of choices.\n */\nlet _CheckboxGroup = forwardRef(CheckboxGroup);\nexport {_CheckboxGroup as CheckboxGroup};\n"],"names":[],"version":3,"file":"CheckboxGroup.css.map"}
1
+ {"mappings":"AC+EoC;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;;;;;AAxBe;EAAA;;;;;AAAA;;AAAA;EAAA;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;;;AAwBf","sources":["229a9af52db930e6","packages/@react-spectrum/s2/src/CheckboxGroup.tsx"],"sourcesContent":["@import \"99c19d559a913dfe\";\n@import \"3a372fd4efad6d81\";\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 {\n CheckboxGroup as AriaCheckboxGroup,\n CheckboxGroupProps as AriaCheckboxGroupProps,\n ContextValue\n} from 'react-aria-components';\nimport {CheckboxContext} from './Checkbox';\nimport {createContext, forwardRef, ReactNode, useContext} from 'react';\nimport {DOMRef, DOMRefValue, HelpTextProps, Orientation, SpectrumLabelableProps} from '@react-types/shared';\nimport {field, getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {FieldLabel, HelpText} from './Field';\nimport {FormContext, useFormProps} from './Form';\nimport {style} from '../style' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface CheckboxGroupProps extends Omit<AriaCheckboxGroupProps, 'className' | 'style' | 'children'>, StyleProps, SpectrumLabelableProps, HelpTextProps {\n /**\n * The size of the Checkboxes in the CheckboxGroup.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L' | 'XL',\n /**\n * The axis the checkboxes should align with.\n *\n * @default 'vertical'\n */\n orientation?: Orientation,\n /**\n * The Checkboxes contained within the CheckboxGroup.\n */\n children?: ReactNode,\n /**\n * By default, checkboxes are not emphasized (gray).\n * The emphasized (blue) version provides visual prominence.\n */\n isEmphasized?: boolean\n}\n\nexport const CheckboxGroupContext = createContext<ContextValue<CheckboxGroupProps, DOMRefValue<HTMLDivElement>>>(null);\n\nfunction CheckboxGroup(props: CheckboxGroupProps, ref: DOMRef<HTMLDivElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, CheckboxGroupContext);\n let formContext = useContext(FormContext);\n props = useFormProps(props);\n let {\n label,\n description,\n errorMessage,\n children,\n labelPosition = 'top',\n labelAlign = 'start',\n necessityIndicator = 'icon',\n size = 'M',\n orientation = 'vertical',\n UNSAFE_className = '',\n UNSAFE_style,\n isEmphasized,\n ...groupProps\n } = props;\n let domRef = useDOMRef(ref);\n\n return (\n <AriaCheckboxGroup\n {...groupProps}\n ref={domRef}\n style={UNSAFE_style}\n className={UNSAFE_className + style({\n ...field(),\n // Double the usual gap because of the internal padding within checkbox that spectrum has.\n '--field-gap': {\n type: 'rowGap',\n value: '[calc(var(--field-height) - 1lh)]'\n }\n }, getAllowedOverrides())({\n size: props.size,\n labelPosition,\n isInForm: !!formContext\n }, props.styles)}>\n {({isDisabled, isInvalid}) => (<>\n <FieldLabel\n isDisabled={isDisabled}\n isRequired={props.isRequired}\n size={size}\n labelPosition={labelPosition}\n labelAlign={labelAlign}\n necessityIndicator={necessityIndicator}\n contextualHelp={props.contextualHelp}>\n {label}\n </FieldLabel>\n <div\n className={style({\n gridArea: 'input',\n display: 'flex',\n flexDirection: {\n orientation: {\n vertical: 'column',\n horizontal: 'row'\n }\n },\n lineHeight: 'ui',\n rowGap: '--field-gap',\n // Spectrum uses a fixed spacing value for horizontal,\n // but the gap changes depending on t-shirt size in vertical.\n columnGap: 16,\n flexWrap: 'wrap'\n })({orientation})}>\n <FormContext.Provider value={{...formContext, size}}>\n <CheckboxContext.Provider value={{isEmphasized}}>\n {children}\n </CheckboxContext.Provider>\n </FormContext.Provider>\n </div>\n <HelpText\n size={size}\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n description={description}\n showErrorIcon>\n {errorMessage}\n </HelpText>\n </>)}\n </AriaCheckboxGroup>\n );\n}\n\n/**\n * A CheckboxGroup allows users to select one or more items from a list of choices.\n */\nlet _CheckboxGroup = forwardRef(CheckboxGroup);\nexport {_CheckboxGroup as CheckboxGroup};\n"],"names":[],"version":3,"file":"CheckboxGroup.css.map"}
@@ -84,22 +84,11 @@ function $4f43ac2b11e2df05$var$CheckboxGroup(props, ref) {
84
84
  rules += ' _1d';
85
85
  rules += ' _f-1x99dlob';
86
86
  rules += ' _fa';
87
- if (props.size === "XL") {
88
- rules += ' -aqrvqh_k-by';
89
- rules += ' -aqrvqh_k-x';
90
- } else if (props.size === "L") {
91
- rules += ' -aqrvqh_k-bu';
92
- rules += ' -aqrvqh_k-r';
93
- } else if (props.size === "S") {
94
- rules += ' -aqrvqh_k-bn';
95
- rules += ' -aqrvqh_k-m';
96
- } else if (props.size === "XS") {
97
- rules += ' -aqrvqh_k-bl';
98
- rules += ' -aqrvqh_k-k';
99
- } else {
100
- rules += ' -aqrvqh_k-br';
101
- rules += ' -aqrvqh_k-q';
102
- }
87
+ if (props.size === "XL") rules += ' -aqrvqh_k-n';
88
+ else if (props.size === "L") rules += ' -aqrvqh_k-l';
89
+ else if (props.size === "S") rules += ' -aqrvqh_k-h';
90
+ else if (props.size === "XS") rules += ' -aqrvqh_k-g';
91
+ else rules += ' -aqrvqh_k-j';
103
92
  rules += ' -_1inj1bc_i--vfy389';
104
93
  rules += ' je';
105
94
  rules += ' __R-yksgrp';
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;AAyCM,MAAM,0DAAuB,CAAA,GAAA,oBAAY,EAAiE;AAEjH,SAAS,oCAAc,KAAyB,EAAE,GAA2B;IAC3E,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,cAAc,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,yCAAU;IACvC,QAAQ,CAAA,GAAA,yCAAW,EAAE;IACrB,IAAI,SACF,KAAK,eACL,WAAW,gBACX,YAAY,YACZ,QAAQ,iBACR,gBAAgB,mBAChB,aAAa,6BACb,qBAAqB,cACrB,OAAO,kBACP,cAAc,8BACd,mBAAmB,kBACnB,YAAY,gBACZ,YAAY,EACZ,GAAG,YACJ,GAAG;IACJ,IAAI,SAAS,CAAA,GAAA,gBAAQ,EAAE;IAEvB,qBACE,gBAAC,CAAA,GAAA,oBAAgB;QACd,GAAG,UAAU;QACd,KAAK;QACL,OAAO;QACP,WAAW,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAOJ;YACxB,MAAM,MAAM,IAAI;2BAChB;YACA,UAAU,CAAC,CAAC;QACd,GAAG,MAAM,MAAM;kBACd,CAAC,cAAC,UAAU,aAAE,SAAS,EAAC,iBAAM;;kCAC7B,gBAAC,CAAA,GAAA,yCAAS;wBACR,YAAY;wBACZ,YAAY,MAAM,UAAU;wBAC5B,MAAM;wBACN,eAAe;wBACf,YAAY;wBACZ,oBAAoB;wBACpB,gBAAgB,MAAM,cAAc;kCACnC;;kCAEH,gBAAC;wBACC,WAAW;;;;;;;;;;;;;;;0BAeR;yCAAC;wBAAW;kCACf,cAAA,gBAAC,CAAA,GAAA,yCAAU,EAAE,QAAQ;4BAAC,OAAO;gCAAC,GAAG,WAAW;sCAAE;4BAAI;sCAChD,cAAA,gBAAC,CAAA,GAAA,yCAAc,EAAE,QAAQ;gCAAC,OAAO;kDAAC;gCAAY;0CAC3C;;;;kCAIP,gBAAC,CAAA,GAAA,yCAAO;wBACN,MAAM;wBACN,YAAY;wBACZ,WAAW;wBACX,aAAa;wBACb,aAAa;kCACZ;;;;;AAKX;AAEA;;CAEC,GACD,IAAI,0DAAiB,CAAA,GAAA,iBAAS,EAAE","sources":["packages/@react-spectrum/s2/src/CheckboxGroup.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 CheckboxGroup as AriaCheckboxGroup,\n CheckboxGroupProps as AriaCheckboxGroupProps,\n ContextValue\n} from 'react-aria-components';\nimport {CheckboxContext} from './Checkbox';\nimport {createContext, forwardRef, ReactNode, useContext} from 'react';\nimport {DOMRef, DOMRefValue, HelpTextProps, Orientation, SpectrumLabelableProps} from '@react-types/shared';\nimport {field, getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {FieldLabel, HelpText} from './Field';\nimport {FormContext, useFormProps} from './Form';\nimport {style} from '../style' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface CheckboxGroupProps extends Omit<AriaCheckboxGroupProps, 'className' | 'style' | 'children'>, StyleProps, SpectrumLabelableProps, HelpTextProps {\n /**\n * The size of the Checkboxes in the CheckboxGroup.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L' | 'XL',\n /**\n * The axis the checkboxes should align with.\n *\n * @default 'vertical'\n */\n orientation?: Orientation,\n /**\n * The Checkboxes contained within the CheckboxGroup.\n */\n children?: ReactNode,\n /**\n * By default, checkboxes are not emphasized (gray).\n * The emphasized (blue) version provides visual prominence.\n */\n isEmphasized?: boolean\n}\n\nexport const CheckboxGroupContext = createContext<ContextValue<CheckboxGroupProps, DOMRefValue<HTMLDivElement>>>(null);\n\nfunction CheckboxGroup(props: CheckboxGroupProps, ref: DOMRef<HTMLDivElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, CheckboxGroupContext);\n let formContext = useContext(FormContext);\n props = useFormProps(props);\n let {\n label,\n description,\n errorMessage,\n children,\n labelPosition = 'top',\n labelAlign = 'start',\n necessityIndicator = 'icon',\n size = 'M',\n orientation = 'vertical',\n UNSAFE_className = '',\n UNSAFE_style,\n isEmphasized,\n ...groupProps\n } = props;\n let domRef = useDOMRef(ref);\n\n return (\n <AriaCheckboxGroup\n {...groupProps}\n ref={domRef}\n style={UNSAFE_style}\n className={UNSAFE_className + style({\n ...field(),\n // Double the usual gap because of the internal padding within checkbox that spectrum has.\n '--field-gap': {\n type: 'rowGap',\n value: '[calc(var(--field-height) - 1lh)]'\n }\n }, getAllowedOverrides())({\n size: props.size,\n labelPosition,\n isInForm: !!formContext\n }, props.styles)}>\n {({isDisabled, isInvalid}) => (<>\n <FieldLabel\n isDisabled={isDisabled}\n isRequired={props.isRequired}\n size={size}\n labelPosition={labelPosition}\n labelAlign={labelAlign}\n necessityIndicator={necessityIndicator}\n contextualHelp={props.contextualHelp}>\n {label}\n </FieldLabel>\n <div\n className={style({\n gridArea: 'input',\n display: 'flex',\n flexDirection: {\n orientation: {\n vertical: 'column',\n horizontal: 'row'\n }\n },\n lineHeight: 'ui',\n rowGap: '--field-gap',\n // Spectrum uses a fixed spacing value for horizontal,\n // but the gap changes depending on t-shirt size in vertical.\n columnGap: 16,\n flexWrap: 'wrap'\n })({orientation})}>\n <FormContext.Provider value={{...formContext, size}}>\n <CheckboxContext.Provider value={{isEmphasized}}>\n {children}\n </CheckboxContext.Provider>\n </FormContext.Provider>\n </div>\n <HelpText\n size={size}\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n description={description}\n showErrorIcon>\n {errorMessage}\n </HelpText>\n </>)}\n </AriaCheckboxGroup>\n );\n}\n\n/**\n * A CheckboxGroup allows users to select one or more items from a list of choices.\n */\nlet _CheckboxGroup = forwardRef(CheckboxGroup);\nexport {_CheckboxGroup as CheckboxGroup};\n"],"names":[],"version":3,"file":"CheckboxGroup.mjs.map"}
1
+ {"mappings":";;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;AAyCM,MAAM,0DAAuB,CAAA,GAAA,oBAAY,EAAiE;AAEjH,SAAS,oCAAc,KAAyB,EAAE,GAA2B;IAC3E,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,cAAc,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,yCAAU;IACvC,QAAQ,CAAA,GAAA,yCAAW,EAAE;IACrB,IAAI,SACF,KAAK,eACL,WAAW,gBACX,YAAY,YACZ,QAAQ,iBACR,gBAAgB,mBAChB,aAAa,6BACb,qBAAqB,cACrB,OAAO,kBACP,cAAc,8BACd,mBAAmB,kBACnB,YAAY,gBACZ,YAAY,EACZ,GAAG,YACJ,GAAG;IACJ,IAAI,SAAS,CAAA,GAAA,gBAAQ,EAAE;IAEvB,qBACE,gBAAC,CAAA,GAAA,oBAAgB;QACd,GAAG,UAAU;QACd,KAAK;QACL,OAAO;QACP,WAAW,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAOJ;YACxB,MAAM,MAAM,IAAI;2BAChB;YACA,UAAU,CAAC,CAAC;QACd,GAAG,MAAM,MAAM;kBACd,CAAC,cAAC,UAAU,aAAE,SAAS,EAAC,iBAAM;;kCAC7B,gBAAC,CAAA,GAAA,yCAAS;wBACR,YAAY;wBACZ,YAAY,MAAM,UAAU;wBAC5B,MAAM;wBACN,eAAe;wBACf,YAAY;wBACZ,oBAAoB;wBACpB,gBAAgB,MAAM,cAAc;kCACnC;;kCAEH,gBAAC;wBACC,WAAW;;;;;;;;;;;;;;;0BAeR;yCAAC;wBAAW;kCACf,cAAA,gBAAC,CAAA,GAAA,yCAAU,EAAE,QAAQ;4BAAC,OAAO;gCAAC,GAAG,WAAW;sCAAE;4BAAI;sCAChD,cAAA,gBAAC,CAAA,GAAA,yCAAc,EAAE,QAAQ;gCAAC,OAAO;kDAAC;gCAAY;0CAC3C;;;;kCAIP,gBAAC,CAAA,GAAA,yCAAO;wBACN,MAAM;wBACN,YAAY;wBACZ,WAAW;wBACX,aAAa;wBACb,aAAa;kCACZ;;;;;AAKX;AAEA;;CAEC,GACD,IAAI,0DAAiB,CAAA,GAAA,iBAAS,EAAE","sources":["packages/@react-spectrum/s2/src/CheckboxGroup.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 CheckboxGroup as AriaCheckboxGroup,\n CheckboxGroupProps as AriaCheckboxGroupProps,\n ContextValue\n} from 'react-aria-components';\nimport {CheckboxContext} from './Checkbox';\nimport {createContext, forwardRef, ReactNode, useContext} from 'react';\nimport {DOMRef, DOMRefValue, HelpTextProps, Orientation, SpectrumLabelableProps} from '@react-types/shared';\nimport {field, getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {FieldLabel, HelpText} from './Field';\nimport {FormContext, useFormProps} from './Form';\nimport {style} from '../style' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface CheckboxGroupProps extends Omit<AriaCheckboxGroupProps, 'className' | 'style' | 'children'>, StyleProps, SpectrumLabelableProps, HelpTextProps {\n /**\n * The size of the Checkboxes in the CheckboxGroup.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L' | 'XL',\n /**\n * The axis the checkboxes should align with.\n *\n * @default 'vertical'\n */\n orientation?: Orientation,\n /**\n * The Checkboxes contained within the CheckboxGroup.\n */\n children?: ReactNode,\n /**\n * By default, checkboxes are not emphasized (gray).\n * The emphasized (blue) version provides visual prominence.\n */\n isEmphasized?: boolean\n}\n\nexport const CheckboxGroupContext = createContext<ContextValue<CheckboxGroupProps, DOMRefValue<HTMLDivElement>>>(null);\n\nfunction CheckboxGroup(props: CheckboxGroupProps, ref: DOMRef<HTMLDivElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, CheckboxGroupContext);\n let formContext = useContext(FormContext);\n props = useFormProps(props);\n let {\n label,\n description,\n errorMessage,\n children,\n labelPosition = 'top',\n labelAlign = 'start',\n necessityIndicator = 'icon',\n size = 'M',\n orientation = 'vertical',\n UNSAFE_className = '',\n UNSAFE_style,\n isEmphasized,\n ...groupProps\n } = props;\n let domRef = useDOMRef(ref);\n\n return (\n <AriaCheckboxGroup\n {...groupProps}\n ref={domRef}\n style={UNSAFE_style}\n className={UNSAFE_className + style({\n ...field(),\n // Double the usual gap because of the internal padding within checkbox that spectrum has.\n '--field-gap': {\n type: 'rowGap',\n value: '[calc(var(--field-height) - 1lh)]'\n }\n }, getAllowedOverrides())({\n size: props.size,\n labelPosition,\n isInForm: !!formContext\n }, props.styles)}>\n {({isDisabled, isInvalid}) => (<>\n <FieldLabel\n isDisabled={isDisabled}\n isRequired={props.isRequired}\n size={size}\n labelPosition={labelPosition}\n labelAlign={labelAlign}\n necessityIndicator={necessityIndicator}\n contextualHelp={props.contextualHelp}>\n {label}\n </FieldLabel>\n <div\n className={style({\n gridArea: 'input',\n display: 'flex',\n flexDirection: {\n orientation: {\n vertical: 'column',\n horizontal: 'row'\n }\n },\n lineHeight: 'ui',\n rowGap: '--field-gap',\n // Spectrum uses a fixed spacing value for horizontal,\n // but the gap changes depending on t-shirt size in vertical.\n columnGap: 16,\n flexWrap: 'wrap'\n })({orientation})}>\n <FormContext.Provider value={{...formContext, size}}>\n <CheckboxContext.Provider value={{isEmphasized}}>\n {children}\n </CheckboxContext.Provider>\n </FormContext.Provider>\n </div>\n <HelpText\n size={size}\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n description={description}\n showErrorIcon>\n {errorMessage}\n </HelpText>\n </>)}\n </AriaCheckboxGroup>\n );\n}\n\n/**\n * A CheckboxGroup allows users to select one or more items from a list of choices.\n */\nlet _CheckboxGroup = forwardRef(CheckboxGroup);\nexport {_CheckboxGroup as CheckboxGroup};\n"],"names":[],"version":3,"file":"CheckboxGroup.mjs.map"}
@@ -36,23 +36,12 @@ function $4fb579ecc195bd2b$var$ClearButton(props, ref) {
36
36
  rules += ' _Zd';
37
37
  rules += ' _1c';
38
38
  rules += ' _2d';
39
- rules += ' k4';
40
- if (props.size === "XL") {
41
- rules += ' lby';
42
- rules += ' lx';
43
- } else if (props.size === "L") {
44
- rules += ' lbu';
45
- rules += ' lr';
46
- } else if (props.size === "S") {
47
- rules += ' lbn';
48
- rules += ' lm';
49
- } else if (props.size === "XS") {
50
- rules += ' lbl';
51
- rules += ' lk';
52
- } else {
53
- rules += ' lbr';
54
- rules += ' lq';
55
- }
39
+ rules += ' kG';
40
+ if (props.size === "XL") rules += ' ln';
41
+ else if (props.size === "L") rules += ' ll';
42
+ else if (props.size === "S") rules += ' lh';
43
+ else if (props.size === "XS") rules += ' lg';
44
+ else rules += ' lj';
56
45
  rules += ' _8-3t1x';
57
46
  rules += ' wf';
58
47
  rules += ' _La';
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;AAyBD,SAAS,kCAAY,KAAuB,EAAE,GAAoC;IAChF,IAAI,SAAS,CAAA,GAAA,yCAAc,EAAE;IAE7B,qBACE,gCAAC,CAAA,GAAA,iCAAK;QACH,GAAG,KAAK;QACT,KAAK;QACL,WAAW,CAAA,cAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eAgBvB;gBAAC,GAAG,WAAW;gBAAE,MAAM,MAAM,IAAI,IAAI;YAAG;kBAC3C,cAAA,gCAAC,CAAA,GAAA,iCAAQ;YAAE,MAAM,MAAM,IAAI,IAAI;;;AAGrC;AAEA,IAAI,0DAAe,CAAA,GAAA,uBAAS,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.cjs.map"}
1
+ {"mappings":";;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;AAyBD,SAAS,kCAAY,KAAuB,EAAE,GAAoC;IAChF,IAAI,SAAS,CAAA,GAAA,yCAAc,EAAE;IAE7B,qBACE,gCAAC,CAAA,GAAA,iCAAK;QACH,GAAG,KAAK;QACT,KAAK;QACL,WAAW,CAAA,cAAe;;;;;;;;;;;;;;;;;;;;;;eAgBvB;gBAAC,GAAG,WAAW;gBAAE,MAAM,MAAM,IAAI,IAAI;YAAG;kBAC3C,cAAA,gCAAC,CAAA,GAAA,iCAAQ;YAAE,MAAM,MAAM,IAAI,IAAI;;;AAGrC;AAEA,IAAI,0DAAe,CAAA,GAAA,uBAAS,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.cjs.map"}
@@ -15,28 +15,28 @@
15
15
  justify-content: center;
16
16
  }
17
17
 
18
- .k4 {
18
+ .kG {
19
19
  height: 100%;
20
20
  }
21
21
 
22
- .lq {
23
- width: 2rem;
22
+ .lj {
23
+ width: calc(2rem * var(--s2-scale));
24
24
  }
25
25
 
26
- .lk {
27
- width: 1.25rem;
26
+ .lg {
27
+ width: calc(1.25rem * var(--s2-scale));
28
28
  }
29
29
 
30
- .lm {
31
- width: 1.5rem;
30
+ .lh {
31
+ width: calc(1.5rem * var(--s2-scale));
32
32
  }
33
33
 
34
- .lr {
35
- width: 2.5rem;
34
+ .ll {
35
+ width: calc(2.5rem * var(--s2-scale));
36
36
  }
37
37
 
38
- .lx {
39
- width: 3rem;
38
+ .ln {
39
+ width: calc(3rem * var(--s2-scale));
40
40
  }
41
41
 
42
42
  ._8-3t1x {
@@ -81,28 +81,4 @@
81
81
  }
82
82
 
83
83
  @layer _.b, UNSAFE_overrides;
84
-
85
- @layer _.b.b {
86
- @media not ((hover: hover) and (pointer: fine)) {
87
- .lbr {
88
- width: 2.5rem;
89
- }
90
-
91
- .lbl {
92
- width: 1.5625rem;
93
- }
94
-
95
- .lbn {
96
- width: 1.875rem;
97
- }
98
-
99
- .lbu {
100
- width: 3.125rem;
101
- }
102
-
103
- .lby {
104
- width: 3.75rem;
105
- }
106
- }
107
- }
108
84
  /*# sourceMappingURL=ClearButton.css.map */
@@ -1 +1 @@
1
- {"mappings":"AA0CgC;;;;AAAA;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;AAAA;;AAAA;EAAA;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA","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.css.map"}
1
+ {"mappings":"AA0CgC;;;;AAAA;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;AAAA","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.css.map"}
@@ -30,23 +30,12 @@ function $f6a62e6e68437458$var$ClearButton(props, ref) {
30
30
  rules += ' _Zd';
31
31
  rules += ' _1c';
32
32
  rules += ' _2d';
33
- rules += ' k4';
34
- if (props.size === "XL") {
35
- rules += ' lby';
36
- rules += ' lx';
37
- } else if (props.size === "L") {
38
- rules += ' lbu';
39
- rules += ' lr';
40
- } else if (props.size === "S") {
41
- rules += ' lbn';
42
- rules += ' lm';
43
- } else if (props.size === "XS") {
44
- rules += ' lbl';
45
- rules += ' lk';
46
- } else {
47
- rules += ' lbr';
48
- rules += ' lq';
49
- }
33
+ rules += ' kG';
34
+ if (props.size === "XL") rules += ' ln';
35
+ else if (props.size === "L") rules += ' ll';
36
+ else if (props.size === "S") rules += ' lh';
37
+ else if (props.size === "XS") rules += ' lg';
38
+ else rules += ' lj';
50
39
  rules += ' _8-3t1x';
51
40
  rules += ' wf';
52
41
  rules += ' _La';