@react-spectrum/s2 3.0.0-nightly-326f48154-241216 → 3.0.0-nightly-fee532d6a-241217

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 (180) hide show
  1. package/dist/ActionButton.cjs +58 -80
  2. package/dist/ActionButton.cjs.map +1 -1
  3. package/dist/ActionButton.css +76 -96
  4. package/dist/ActionButton.css.map +1 -1
  5. package/dist/ActionButton.mjs +58 -80
  6. package/dist/ActionButton.mjs.map +1 -1
  7. package/dist/ActionButtonGroup.cjs.map +1 -1
  8. package/dist/ActionButtonGroup.css.map +1 -1
  9. package/dist/ActionButtonGroup.mjs.map +1 -1
  10. package/dist/Badge.cjs +66 -66
  11. package/dist/Badge.css +43 -43
  12. package/dist/Badge.mjs +66 -66
  13. package/dist/Breadcrumbs.cjs +6 -6
  14. package/dist/Breadcrumbs.css +4 -4
  15. package/dist/Breadcrumbs.mjs +6 -6
  16. package/dist/Button.cjs +89 -134
  17. package/dist/Button.cjs.map +1 -1
  18. package/dist/Button.css +102 -134
  19. package/dist/Button.css.map +1 -1
  20. package/dist/Button.mjs +89 -134
  21. package/dist/Button.mjs.map +1 -1
  22. package/dist/Card.cjs +4 -4
  23. package/dist/Card.css +3 -3
  24. package/dist/Card.mjs +4 -4
  25. package/dist/CardView.cjs +1 -1
  26. package/dist/CardView.css +1 -1
  27. package/dist/CardView.mjs +1 -1
  28. package/dist/Checkbox.cjs +10 -10
  29. package/dist/Checkbox.css +10 -10
  30. package/dist/Checkbox.mjs +10 -10
  31. package/dist/CloseButton.cjs +17 -28
  32. package/dist/CloseButton.cjs.map +1 -1
  33. package/dist/CloseButton.css +19 -31
  34. package/dist/CloseButton.css.map +1 -1
  35. package/dist/CloseButton.mjs +17 -28
  36. package/dist/CloseButton.mjs.map +1 -1
  37. package/dist/ColorArea.cjs +1 -1
  38. package/dist/ColorArea.css +1 -1
  39. package/dist/ColorArea.mjs +1 -1
  40. package/dist/ColorHandle.cjs +3 -3
  41. package/dist/ColorHandle.css +3 -3
  42. package/dist/ColorHandle.mjs +3 -3
  43. package/dist/ColorSlider.cjs +1 -1
  44. package/dist/ColorSlider.css +1 -1
  45. package/dist/ColorSlider.mjs +1 -1
  46. package/dist/ColorSwatchPicker.cjs +1 -1
  47. package/dist/ColorSwatchPicker.css +1 -1
  48. package/dist/ColorSwatchPicker.mjs +1 -1
  49. package/dist/ColorWheel.cjs +2 -2
  50. package/dist/ColorWheel.css +1 -1
  51. package/dist/ColorWheel.mjs +2 -2
  52. package/dist/ComboBox.cjs +5 -5
  53. package/dist/ComboBox.css +4 -4
  54. package/dist/ComboBox.mjs +5 -5
  55. package/dist/Disclosure.cjs +1 -1
  56. package/dist/Disclosure.css +1 -1
  57. package/dist/Disclosure.mjs +1 -1
  58. package/dist/Divider.cjs +8 -8
  59. package/dist/Divider.cjs.map +1 -1
  60. package/dist/Divider.css +13 -13
  61. package/dist/Divider.css.map +1 -1
  62. package/dist/Divider.mjs +8 -8
  63. package/dist/Divider.mjs.map +1 -1
  64. package/dist/DropZone.cjs +4 -4
  65. package/dist/DropZone.css +2 -2
  66. package/dist/DropZone.mjs +4 -4
  67. package/dist/Field.cjs +7 -8
  68. package/dist/Field.cjs.map +1 -1
  69. package/dist/Field.css +7 -11
  70. package/dist/Field.css.map +1 -1
  71. package/dist/Field.mjs +7 -8
  72. package/dist/Field.mjs.map +1 -1
  73. package/dist/InlineAlert.cjs +23 -23
  74. package/dist/InlineAlert.css +15 -15
  75. package/dist/InlineAlert.mjs +23 -23
  76. package/dist/Link.cjs +7 -6
  77. package/dist/Link.cjs.map +1 -1
  78. package/dist/Link.css +14 -14
  79. package/dist/Link.css.map +1 -1
  80. package/dist/Link.mjs +7 -6
  81. package/dist/Link.mjs.map +1 -1
  82. package/dist/Menu.cjs +26 -6
  83. package/dist/Menu.cjs.map +1 -1
  84. package/dist/Menu.css +3 -3
  85. package/dist/Menu.css.map +1 -1
  86. package/dist/Menu.mjs +27 -7
  87. package/dist/Menu.mjs.map +1 -1
  88. package/dist/Meter.cjs +13 -13
  89. package/dist/Meter.cjs.map +1 -1
  90. package/dist/Meter.css +18 -22
  91. package/dist/Meter.css.map +1 -1
  92. package/dist/Meter.mjs +13 -13
  93. package/dist/Meter.mjs.map +1 -1
  94. package/dist/Modal.cjs +1 -1
  95. package/dist/Modal.css +1 -1
  96. package/dist/Modal.mjs +1 -1
  97. package/dist/NumberField.cjs +4 -4
  98. package/dist/NumberField.css +4 -4
  99. package/dist/NumberField.mjs +4 -4
  100. package/dist/Picker.cjs +4 -4
  101. package/dist/Picker.css +4 -4
  102. package/dist/Picker.mjs +4 -4
  103. package/dist/Popover.cjs +3 -3
  104. package/dist/Popover.css +3 -3
  105. package/dist/Popover.mjs +3 -3
  106. package/dist/ProgressBar.cjs +20 -18
  107. package/dist/ProgressBar.cjs.map +1 -1
  108. package/dist/ProgressBar.css +20 -24
  109. package/dist/ProgressBar.css.map +1 -1
  110. package/dist/ProgressBar.mjs +20 -18
  111. package/dist/ProgressBar.mjs.map +1 -1
  112. package/dist/ProgressCircle.cjs +11 -9
  113. package/dist/ProgressCircle.cjs.map +1 -1
  114. package/dist/ProgressCircle.css +14 -14
  115. package/dist/ProgressCircle.css.map +1 -1
  116. package/dist/ProgressCircle.mjs +11 -9
  117. package/dist/ProgressCircle.mjs.map +1 -1
  118. package/dist/Provider.cjs +1 -1
  119. package/dist/Provider.css +1 -1
  120. package/dist/Provider.mjs +1 -1
  121. package/dist/Radio.cjs +6 -6
  122. package/dist/Radio.css +6 -6
  123. package/dist/Radio.mjs +6 -6
  124. package/dist/SearchField.cjs +1 -1
  125. package/dist/SearchField.css +1 -1
  126. package/dist/SearchField.mjs +1 -1
  127. package/dist/SegmentedControl.cjs +8 -8
  128. package/dist/SegmentedControl.css +8 -8
  129. package/dist/SegmentedControl.mjs +8 -8
  130. package/dist/Slider.cjs +8 -8
  131. package/dist/Slider.css +5 -5
  132. package/dist/Slider.mjs +8 -8
  133. package/dist/Switch.cjs +7 -7
  134. package/dist/Switch.css +6 -6
  135. package/dist/Switch.mjs +7 -7
  136. package/dist/TableView.cjs +17 -17
  137. package/dist/TableView.css +11 -11
  138. package/dist/TableView.mjs +17 -17
  139. package/dist/Tabs.cjs +5 -5
  140. package/dist/Tabs.css +5 -5
  141. package/dist/Tabs.mjs +5 -5
  142. package/dist/TabsPicker.cjs +1 -1
  143. package/dist/TabsPicker.css +1 -1
  144. package/dist/TabsPicker.mjs +1 -1
  145. package/dist/TagGroup.cjs +10 -10
  146. package/dist/TagGroup.css +8 -8
  147. package/dist/TagGroup.mjs +10 -10
  148. package/dist/ToggleButton.cjs +1 -0
  149. package/dist/ToggleButton.cjs.map +1 -1
  150. package/dist/ToggleButton.css.map +1 -1
  151. package/dist/ToggleButton.mjs +1 -0
  152. package/dist/ToggleButton.mjs.map +1 -1
  153. package/dist/Tooltip.cjs +1 -1
  154. package/dist/Tooltip.css +1 -1
  155. package/dist/Tooltip.mjs +1 -1
  156. package/dist/types.d.ts +9 -9
  157. package/dist/types.d.ts.map +1 -1
  158. package/package.json +18 -18
  159. package/src/ActionButton.tsx +19 -43
  160. package/src/ActionButtonGroup.tsx +1 -1
  161. package/src/Button.tsx +36 -79
  162. package/src/CloseButton.tsx +10 -20
  163. package/src/Divider.tsx +10 -16
  164. package/src/Field.tsx +2 -2
  165. package/src/Link.tsx +7 -12
  166. package/src/Menu.tsx +22 -6
  167. package/src/Meter.tsx +7 -14
  168. package/src/ProgressBar.tsx +8 -15
  169. package/src/ProgressCircle.tsx +12 -15
  170. package/src/ToggleButton.tsx +1 -0
  171. package/src/bar-utils.ts +3 -10
  172. package/src/style-utils.ts +15 -8
  173. package/style/dist/spectrum-theme.cjs +15 -1
  174. package/style/dist/spectrum-theme.cjs.map +1 -1
  175. package/style/dist/spectrum-theme.mjs +15 -1
  176. package/style/dist/spectrum-theme.mjs.map +1 -1
  177. package/style/dist/types.d.ts +40 -27
  178. package/style/dist/types.d.ts.map +1 -1
  179. package/style/spectrum-theme.ts +4 -2
  180. package/style/tokens.ts +30 -0
package/dist/Checkbox.mjs CHANGED
@@ -73,7 +73,7 @@ const $9b405e0f8095dce0$var$wrapper = function anonymous(props, overrides) {
73
73
  rules += ' _f-1x99dlob';
74
74
  rules += ' _fa';
75
75
  if (props.isDisabled) {
76
- rules += ' aa_____B';
76
+ rules += ' aa_____O';
77
77
  rules += ' aj';
78
78
  } else {
79
79
  if (props.isPressed) rules += ' ao';
@@ -94,7 +94,7 @@ const $9b405e0f8095dce0$export$827f4ee28efc37 = function anonymous(props) {
94
94
  let rules = " .";
95
95
  if (props.isFocusVisible) rules += ' _Lb';
96
96
  else rules += ' _La';
97
- rules += ' da_____z';
97
+ rules += ' da_____M';
98
98
  rules += ' dx';
99
99
  rules += ' _Nc';
100
100
  rules += ' _M-3t1z';
@@ -126,16 +126,16 @@ const $9b405e0f8095dce0$export$827f4ee28efc37 = function anonymous(props) {
126
126
  rules += ' _zb';
127
127
  if (props.isSelected) {
128
128
  if (props.isDisabled) {
129
- rules += ' ba_____B';
129
+ rules += ' ba_____O';
130
130
  rules += ' bj';
131
131
  } else if (props.isInvalid) {
132
- rules += ' ba_____C';
132
+ rules += ' ba_____P';
133
133
  if (props.isPressed) rules += ' bP';
134
134
  else if (props.isFocusVisible) rules += ' bP';
135
135
  else if (props.isHovered) rules += ' bP';
136
136
  else rules += ' bO';
137
137
  } else {
138
- rules += ' ba_____z';
138
+ rules += ' ba_____M';
139
139
  if (props.isEmphasized) {
140
140
  if (props.isPressed) rules += ' bz';
141
141
  else if (props.isFocusVisible) rules += ' bz';
@@ -149,21 +149,21 @@ const $9b405e0f8095dce0$export$827f4ee28efc37 = function anonymous(props) {
149
149
  }
150
150
  }
151
151
  } else {
152
- rules += ' ba_____u';
152
+ rules += ' ba_____H';
153
153
  rules += ' bd';
154
154
  }
155
155
  if (props.isSelected) rules += ' ca';
156
156
  else if (props.isDisabled) {
157
- rules += ' ca_____B';
157
+ rules += ' ca_____O';
158
158
  rules += ' cj';
159
159
  } else if (props.isInvalid) {
160
- rules += ' ca_____C';
160
+ rules += ' ca_____P';
161
161
  if (props.isPressed) rules += ' cQ';
162
162
  else if (props.isFocusVisible) rules += ' cP';
163
163
  else if (props.isHovered) rules += ' cP';
164
164
  else rules += ' cO';
165
165
  } else {
166
- rules += ' ca_____v';
166
+ rules += ' ca_____I';
167
167
  if (props.isPressed) rules += ' co';
168
168
  else if (props.isFocusVisible) rules += ' co';
169
169
  else if (props.isHovered) rules += ' co';
@@ -171,7 +171,7 @@ const $9b405e0f8095dce0$export$827f4ee28efc37 = function anonymous(props) {
171
171
  }
172
172
  return rules;
173
173
  };
174
- const $9b405e0f8095dce0$export$2c99b98b77550cb4 = " . -rwx0fg_e-B -rwx0fg_e-a_____Y";
174
+ const $9b405e0f8095dce0$export$2c99b98b77550cb4 = " . -rwx0fg_e-B -rwx0fg_e-a______b";
175
175
  const $9b405e0f8095dce0$var$iconSize = {
176
176
  S: 'XS',
177
177
  M: 'S',
@@ -38,12 +38,10 @@ $parcel$export(module.exports, "CloseButton", () => $2f907cb84c6e9e75$export$de6
38
38
 
39
39
 
40
40
 
41
+ // TODO(design): this is inconsistent with ActionButton
41
42
  const $2f907cb84c6e9e75$var$hoverBackground = {
42
43
  default: 'gray-100',
43
- staticColor: {
44
- white: 'transparent-white-100',
45
- black: 'transparent-black-100'
46
- }
44
+ isStaticColor: 'transparent-overlay-100'
47
45
  };
48
46
  const $2f907cb84c6e9e75$var$styles = function anonymous(props, overrides) {
49
47
  let rules = " .";
@@ -57,12 +55,13 @@ const $2f907cb84c6e9e75$var$styles = function anonymous(props, overrides) {
57
55
  }
58
56
  if (props.isFocusVisible) rules += ' _Lb';
59
57
  else rules += ' _La';
60
- rules += ' da_____z';
61
- if (props.staticColor === "black") rules += ' db';
62
- else if (props.staticColor === "white") rules += ' dc';
58
+ rules += ' da_____M';
59
+ if (props.isStaticColor) rules += ' d_____G';
63
60
  else rules += ' dx';
64
61
  rules += ' _Nc';
65
62
  rules += ' _M-3t1z';
63
+ if (props.staticColor === "white") rules += ' -_1de2x0q_b-b';
64
+ else if (props.staticColor === "black") rules += ' -_1de2x0q_b-c';
66
65
  rules += ' _Zd';
67
66
  rules += ' _1c';
68
67
  rules += ' _2d';
@@ -92,33 +91,22 @@ const $2f907cb84c6e9e75$var$styles = function anonymous(props, overrides) {
92
91
  rules += ' _Q-375x7f';
93
92
  rules += ' _Ra';
94
93
  if (props.isPressed) {
95
- if (props.staticColor === "black") rules += ' b_____k';
96
- else if (props.staticColor === "white") rules += ' b____7';
94
+ if (props.isStaticColor) rules += ' b_____x';
97
95
  else rules += ' bg';
98
96
  } else if (props.isFocusVisible) {
99
- if (props.staticColor === "black") rules += ' b_____k';
100
- else if (props.staticColor === "white") rules += ' b____7';
97
+ if (props.isStaticColor) rules += ' b_____x';
101
98
  else rules += ' bg';
102
99
  } else if (props.isHovered) {
103
- if (props.staticColor === "black") rules += ' b_____k';
104
- else if (props.staticColor === "white") rules += ' b____7';
100
+ if (props.isStaticColor) rules += ' b_____x';
105
101
  else rules += ' bg';
106
102
  } else rules += ' ba';
107
- if (props.staticColor === "black") {
108
- if (props.isDisabled) rules += ' -rwx0fg_a-_____n';
109
- else {
110
- if (props.isPressed) rules += ' -rwx0fg_a-_____s';
111
- else if (props.isFocusVisible) rules += ' -rwx0fg_a-_____s';
112
- else if (props.isHovered) rules += ' -rwx0fg_a-_____s';
113
- else rules += ' -rwx0fg_a-_____r';
114
- }
115
- } else if (props.staticColor === "white") {
116
- if (props.isDisabled) rules += ' -rwx0fg_a-_____a';
103
+ if (props.isStaticColor) {
104
+ if (props.isDisabled) rules += ' -rwx0fg_a-_____A';
117
105
  else {
118
- if (props.isPressed) rules += ' -rwx0fg_a-_____f';
119
- else if (props.isFocusVisible) rules += ' -rwx0fg_a-_____f';
120
- else if (props.isHovered) rules += ' -rwx0fg_a-_____f';
121
- else rules += ' -rwx0fg_a-_____e';
106
+ if (props.isPressed) rules += ' -rwx0fg_a-_____F';
107
+ else if (props.isFocusVisible) rules += ' -rwx0fg_a-_____F';
108
+ else if (props.isHovered) rules += ' -rwx0fg_a-_____F';
109
+ else rules += ' -rwx0fg_a-_____E';
122
110
  }
123
111
  } else if (props.isDisabled) rules += ' -rwx0fg_a-j';
124
112
  else {
@@ -143,7 +131,8 @@ const $2f907cb84c6e9e75$export$de65de8213222d10 = /*#__PURE__*/ (0, $bMS5K$react
143
131
  style: (0, $2061c83559b50a66$exports.pressScale)(domRef, UNSAFE_style),
144
132
  className: (renderProps)=>UNSAFE_className + $2f907cb84c6e9e75$var$styles({
145
133
  ...renderProps,
146
- staticColor: props.staticColor
134
+ staticColor: props.staticColor,
135
+ isStaticColor: !!props.staticColor
147
136
  }, props.styles),
148
137
  children: /*#__PURE__*/ (0, $bMS5K$reactjsxruntime.jsx)((0, $89dd175101ffc43a$exports.default), {
149
138
  size: {
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;AA0BD,MAAM,wCAAkB;IACtB,SAAS;IACT,aAAa;QACX,OAAO;QACP,OAAO;IACT;AACF;AAEA,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4CC,MAAM,0DAAqB,CAAA,GAAA,0BAAY,EAAwE;AAK/G,MAAM,0DAAc,CAAA,GAAA,uBAAS,EAAE,SAAS,YAAY,KAAuB,EAAE,GAAoC;IACtH,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,iDAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,gBAAC,YAAY,oBAAE,mBAAmB,IAAG,GAAG;IAC5C,IAAI,SAAS,CAAA,GAAA,yCAAc,EAAE;IAC7B,IAAI,kBAAkB,CAAA,GAAA,gDAA0B,EAAE,CAAA,GAAA,mDAAW,GAAG;IAChE,qBACE,gCAAC,CAAA,GAAA,iCAAK;QACH,GAAG,KAAK;QACT,KAAK;QACL,MAAK;QACL,cAAY,gBAAgB,MAAM,CAAC;QACnC,OAAO,CAAA,GAAA,oCAAS,EAAE,QAAQ;QAC1B,WAAW,CAAA,cAAe,mBAAmB,6BAAO;gBAAC,GAAG,WAAW;gBAAE,aAAa,MAAM,WAAW;YAAA,GAAG,MAAM,MAAM;kBAClH,cAAA,gCAAC,CAAA,GAAA,iCAAQ;YAAE,MAAM,AAAC;gBAAC,GAAG;gBAAK,GAAG;gBAAM,GAAG;gBAAO,IAAI;YAAM,CAAW,CAAC,MAAM,IAAI,IAAI,IAAI;;;AAG5F","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, ContextValue} from 'react-aria-components';\nimport {createContext, forwardRef} from 'react';\nimport CrossIcon from '../ui-icons/Cross';\nimport {FocusableRef, FocusableRefValue} from '@react-types/shared';\nimport {getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {pressScale} from './pressScale';\nimport {useFocusableRef} from '@react-spectrum/utils';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface CloseButtonProps extends Pick<ButtonProps, 'isDisabled'>, 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 flexShrink: 0,\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\nexport const CloseButtonContext = createContext<ContextValue<CloseButtonProps, FocusableRefValue<HTMLButtonElement>>>(null);\n\n/**\n * A CloseButton allows a user to dismiss a dialog.\n */\nexport const CloseButton = forwardRef(function CloseButton(props: CloseButtonProps, ref: FocusableRef<HTMLButtonElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, CloseButtonContext);\n let {UNSAFE_style, UNSAFE_className = ''} = props;\n let domRef = useFocusableRef(ref);\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/s2');\n return (\n <Button\n {...props}\n ref={domRef}\n slot=\"close\"\n aria-label={stringFormatter.format('dialog.dismiss')}\n style={pressScale(domRef, UNSAFE_style)}\n className={renderProps => UNSAFE_className + styles({...renderProps, staticColor: props.staticColor}, props.styles)}>\n <CrossIcon size={({S: 'L', M: 'XL', L: 'XXL', XL: 'XXXL'} as const)[props.size || 'M']} />\n </Button>\n );\n});\n"],"names":[],"version":3,"file":"CloseButton.cjs.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;AA0BD,uDAAuD;AACvD,MAAM,wCAAkB;IACtB,SAAS;IACT,eAAe;AACjB;AAEA,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCC,MAAM,0DAAqB,CAAA,GAAA,0BAAY,EAAwE;AAK/G,MAAM,0DAAc,CAAA,GAAA,uBAAS,EAAE,SAAS,YAAY,KAAuB,EAAE,GAAoC;IACtH,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,iDAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,gBAAC,YAAY,oBAAE,mBAAmB,IAAG,GAAG;IAC5C,IAAI,SAAS,CAAA,GAAA,yCAAc,EAAE;IAC7B,IAAI,kBAAkB,CAAA,GAAA,gDAA0B,EAAE,CAAA,GAAA,mDAAW,GAAG;IAChE,qBACE,gCAAC,CAAA,GAAA,iCAAK;QACH,GAAG,KAAK;QACT,KAAK;QACL,MAAK;QACL,cAAY,gBAAgB,MAAM,CAAC;QACnC,OAAO,CAAA,GAAA,oCAAS,EAAE,QAAQ;QAC1B,WAAW,CAAA,cAAe,mBAAmB,6BAAO;gBAAC,GAAG,WAAW;gBAAE,aAAa,MAAM,WAAW;gBAAE,eAAe,CAAC,CAAC,MAAM,WAAW;YAAA,GAAG,MAAM,MAAM;kBACtJ,cAAA,gCAAC,CAAA,GAAA,iCAAQ;YAAE,MAAM,AAAC;gBAAC,GAAG;gBAAK,GAAG;gBAAM,GAAG;gBAAO,IAAI;YAAM,CAAW,CAAC,MAAM,IAAI,IAAI,IAAI;;;AAG5F","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, ContextValue} from 'react-aria-components';\nimport {createContext, forwardRef} from 'react';\nimport CrossIcon from '../ui-icons/Cross';\nimport {FocusableRef, FocusableRefValue} from '@react-types/shared';\nimport {getAllowedOverrides, staticColor, StyleProps} from './style-utils' with {type: 'macro'};\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {pressScale} from './pressScale';\nimport {useFocusableRef} from '@react-spectrum/utils';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface CloseButtonProps extends Pick<ButtonProps, 'isDisabled'>, 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' | 'auto'\n}\n\n// TODO(design): this is inconsistent with ActionButton\nconst hoverBackground = {\n default: 'gray-100',\n isStaticColor: 'transparent-overlay-100'\n} as const;\n\nconst styles = style({\n ...focusRing(),\n ...staticColor(),\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n size: 'control',\n flexShrink: 0,\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 isStaticColor: {\n default: baseColor('transparent-overlay-800'),\n isDisabled: 'transparent-overlay-400'\n }\n }\n },\n outlineColor: {\n default: 'focus-ring',\n isStaticColor: 'transparent-overlay-1000',\n forcedColors: 'Highlight'\n }\n}, getAllowedOverrides());\n\nexport const CloseButtonContext = createContext<ContextValue<CloseButtonProps, FocusableRefValue<HTMLButtonElement>>>(null);\n\n/**\n * A CloseButton allows a user to dismiss a dialog.\n */\nexport const CloseButton = forwardRef(function CloseButton(props: CloseButtonProps, ref: FocusableRef<HTMLButtonElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, CloseButtonContext);\n let {UNSAFE_style, UNSAFE_className = ''} = props;\n let domRef = useFocusableRef(ref);\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/s2');\n return (\n <Button\n {...props}\n ref={domRef}\n slot=\"close\"\n aria-label={stringFormatter.format('dialog.dismiss')}\n style={pressScale(domRef, UNSAFE_style)}\n className={renderProps => UNSAFE_className + styles({...renderProps, staticColor: props.staticColor, isStaticColor: !!props.staticColor}, props.styles)}>\n <CrossIcon size={({S: 'L', M: 'XL', L: 'XXL', XL: 'XXXL'} as const)[props.size || 'M']} />\n </Button>\n );\n});\n"],"names":[],"version":3,"file":"CloseButton.cjs.map"}
@@ -15,12 +15,8 @@
15
15
  outline-color: var(--lightningcss-light, #4b75ff) var(--lightningcss-dark, #4069fd);
16
16
  }
17
17
 
18
- .dc {
19
- outline-color: #fff;
20
- }
21
-
22
- .db {
23
- outline-color: #000;
18
+ .d_____G {
19
+ outline-color: lch(from var(--s2-container-bg) calc((49.44 - l) * infinity) 0 0 / 1);
24
20
  }
25
21
 
26
22
  ._Nc {
@@ -31,6 +27,14 @@
31
27
  outline-offset: 2px;
32
28
  }
33
29
 
30
+ .-_1de2x0q_b-c {
31
+ --s2-container-bg: white;
32
+ }
33
+
34
+ .-_1de2x0q_b-b {
35
+ --s2-container-bg: black;
36
+ }
37
+
34
38
  ._Zd {
35
39
  display: flex;
36
40
  }
@@ -143,12 +147,8 @@
143
147
  background-color: var(--lightningcss-light, #e9e9e9) var(--lightningcss-dark, #2c2c2c);
144
148
  }
145
149
 
146
- .b____7 {
147
- background-color: #ffffff1c;
148
- }
149
-
150
- .b_____k {
151
- background-color: #00000017;
150
+ .b_____x {
151
+ background-color: lch(from var(--s2-container-bg) calc((49.44 - l) * infinity) 0 0 / .11);
152
152
  }
153
153
 
154
154
  .-rwx0fg_a-n {
@@ -163,28 +163,16 @@
163
163
  --iconPrimary: var(--lightningcss-light, #c6c6c6) var(--lightningcss-dark, #444);
164
164
  }
165
165
 
166
- .-rwx0fg_a-_____e {
167
- --iconPrimary: #ffffffd9;
168
- }
169
-
170
- .-rwx0fg_a-_____f {
171
- --iconPrimary: #fffffff0;
172
- }
173
-
174
- .-rwx0fg_a-_____a {
175
- --iconPrimary: #ffffff36;
176
- }
177
-
178
- .-rwx0fg_a-_____r {
179
- --iconPrimary: #000000d6;
166
+ .-rwx0fg_a-_____E {
167
+ --iconPrimary: lch(from var(--s2-container-bg) calc((49.44 - l) * infinity) 0 0 / .85);
180
168
  }
181
169
 
182
- .-rwx0fg_a-_____s {
183
- --iconPrimary: #000000ed;
170
+ .-rwx0fg_a-_____F {
171
+ --iconPrimary: lch(from var(--s2-container-bg) calc((49.44 - l) * infinity) 0 0 / .94);
184
172
  }
185
173
 
186
- .-rwx0fg_a-_____n {
187
- --iconPrimary: #00000038;
174
+ .-rwx0fg_a-_____A {
175
+ --iconPrimary: lch(from var(--s2-container-bg) calc((49.44 - l) * infinity) 0 0 / .21);
188
176
  }
189
177
  }
190
178
 
@@ -192,7 +180,7 @@
192
180
 
193
181
  @layer _.b.a {
194
182
  @media (forced-colors: active) {
195
- .da_____z {
183
+ .da_____M {
196
184
  outline-color: highlight;
197
185
  }
198
186
  }
@@ -1 +1 @@
1
- {"mappings":"AA4Ce;;;;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;;;;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, ContextValue} from 'react-aria-components';\nimport {createContext, forwardRef} from 'react';\nimport CrossIcon from '../ui-icons/Cross';\nimport {FocusableRef, FocusableRefValue} from '@react-types/shared';\nimport {getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {pressScale} from './pressScale';\nimport {useFocusableRef} from '@react-spectrum/utils';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface CloseButtonProps extends Pick<ButtonProps, 'isDisabled'>, 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 flexShrink: 0,\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\nexport const CloseButtonContext = createContext<ContextValue<CloseButtonProps, FocusableRefValue<HTMLButtonElement>>>(null);\n\n/**\n * A CloseButton allows a user to dismiss a dialog.\n */\nexport const CloseButton = forwardRef(function CloseButton(props: CloseButtonProps, ref: FocusableRef<HTMLButtonElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, CloseButtonContext);\n let {UNSAFE_style, UNSAFE_className = ''} = props;\n let domRef = useFocusableRef(ref);\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/s2');\n return (\n <Button\n {...props}\n ref={domRef}\n slot=\"close\"\n aria-label={stringFormatter.format('dialog.dismiss')}\n style={pressScale(domRef, UNSAFE_style)}\n className={renderProps => UNSAFE_className + styles({...renderProps, staticColor: props.staticColor}, props.styles)}>\n <CrossIcon size={({S: 'L', M: 'XL', L: 'XXL', XL: 'XXXL'} as const)[props.size || 'M']} />\n </Button>\n );\n});\n"],"names":[],"version":3,"file":"CloseButton.css.map"}
1
+ {"mappings":"AA0Ce;;;;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;;;;;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, ContextValue} from 'react-aria-components';\nimport {createContext, forwardRef} from 'react';\nimport CrossIcon from '../ui-icons/Cross';\nimport {FocusableRef, FocusableRefValue} from '@react-types/shared';\nimport {getAllowedOverrides, staticColor, StyleProps} from './style-utils' with {type: 'macro'};\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {pressScale} from './pressScale';\nimport {useFocusableRef} from '@react-spectrum/utils';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface CloseButtonProps extends Pick<ButtonProps, 'isDisabled'>, 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' | 'auto'\n}\n\n// TODO(design): this is inconsistent with ActionButton\nconst hoverBackground = {\n default: 'gray-100',\n isStaticColor: 'transparent-overlay-100'\n} as const;\n\nconst styles = style({\n ...focusRing(),\n ...staticColor(),\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n size: 'control',\n flexShrink: 0,\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 isStaticColor: {\n default: baseColor('transparent-overlay-800'),\n isDisabled: 'transparent-overlay-400'\n }\n }\n },\n outlineColor: {\n default: 'focus-ring',\n isStaticColor: 'transparent-overlay-1000',\n forcedColors: 'Highlight'\n }\n}, getAllowedOverrides());\n\nexport const CloseButtonContext = createContext<ContextValue<CloseButtonProps, FocusableRefValue<HTMLButtonElement>>>(null);\n\n/**\n * A CloseButton allows a user to dismiss a dialog.\n */\nexport const CloseButton = forwardRef(function CloseButton(props: CloseButtonProps, ref: FocusableRef<HTMLButtonElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, CloseButtonContext);\n let {UNSAFE_style, UNSAFE_className = ''} = props;\n let domRef = useFocusableRef(ref);\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/s2');\n return (\n <Button\n {...props}\n ref={domRef}\n slot=\"close\"\n aria-label={stringFormatter.format('dialog.dismiss')}\n style={pressScale(domRef, UNSAFE_style)}\n className={renderProps => UNSAFE_className + styles({...renderProps, staticColor: props.staticColor, isStaticColor: !!props.staticColor}, props.styles)}>\n <CrossIcon size={({S: 'L', M: 'XL', L: 'XXL', XL: 'XXXL'} as const)[props.size || 'M']} />\n </Button>\n );\n});\n"],"names":[],"version":3,"file":"CloseButton.css.map"}
@@ -32,12 +32,10 @@ function $parcel$interopDefault(a) {
32
32
 
33
33
 
34
34
 
35
+ // TODO(design): this is inconsistent with ActionButton
35
36
  const $a9cda54c4f47ce52$var$hoverBackground = {
36
37
  default: 'gray-100',
37
- staticColor: {
38
- white: 'transparent-white-100',
39
- black: 'transparent-black-100'
40
- }
38
+ isStaticColor: 'transparent-overlay-100'
41
39
  };
42
40
  const $a9cda54c4f47ce52$var$styles = function anonymous(props, overrides) {
43
41
  let rules = " .";
@@ -51,12 +49,13 @@ const $a9cda54c4f47ce52$var$styles = function anonymous(props, overrides) {
51
49
  }
52
50
  if (props.isFocusVisible) rules += ' _Lb';
53
51
  else rules += ' _La';
54
- rules += ' da_____z';
55
- if (props.staticColor === "black") rules += ' db';
56
- else if (props.staticColor === "white") rules += ' dc';
52
+ rules += ' da_____M';
53
+ if (props.isStaticColor) rules += ' d_____G';
57
54
  else rules += ' dx';
58
55
  rules += ' _Nc';
59
56
  rules += ' _M-3t1z';
57
+ if (props.staticColor === "white") rules += ' -_1de2x0q_b-b';
58
+ else if (props.staticColor === "black") rules += ' -_1de2x0q_b-c';
60
59
  rules += ' _Zd';
61
60
  rules += ' _1c';
62
61
  rules += ' _2d';
@@ -86,33 +85,22 @@ const $a9cda54c4f47ce52$var$styles = function anonymous(props, overrides) {
86
85
  rules += ' _Q-375x7f';
87
86
  rules += ' _Ra';
88
87
  if (props.isPressed) {
89
- if (props.staticColor === "black") rules += ' b_____k';
90
- else if (props.staticColor === "white") rules += ' b____7';
88
+ if (props.isStaticColor) rules += ' b_____x';
91
89
  else rules += ' bg';
92
90
  } else if (props.isFocusVisible) {
93
- if (props.staticColor === "black") rules += ' b_____k';
94
- else if (props.staticColor === "white") rules += ' b____7';
91
+ if (props.isStaticColor) rules += ' b_____x';
95
92
  else rules += ' bg';
96
93
  } else if (props.isHovered) {
97
- if (props.staticColor === "black") rules += ' b_____k';
98
- else if (props.staticColor === "white") rules += ' b____7';
94
+ if (props.isStaticColor) rules += ' b_____x';
99
95
  else rules += ' bg';
100
96
  } else rules += ' ba';
101
- if (props.staticColor === "black") {
102
- if (props.isDisabled) rules += ' -rwx0fg_a-_____n';
103
- else {
104
- if (props.isPressed) rules += ' -rwx0fg_a-_____s';
105
- else if (props.isFocusVisible) rules += ' -rwx0fg_a-_____s';
106
- else if (props.isHovered) rules += ' -rwx0fg_a-_____s';
107
- else rules += ' -rwx0fg_a-_____r';
108
- }
109
- } else if (props.staticColor === "white") {
110
- if (props.isDisabled) rules += ' -rwx0fg_a-_____a';
97
+ if (props.isStaticColor) {
98
+ if (props.isDisabled) rules += ' -rwx0fg_a-_____A';
111
99
  else {
112
- if (props.isPressed) rules += ' -rwx0fg_a-_____f';
113
- else if (props.isFocusVisible) rules += ' -rwx0fg_a-_____f';
114
- else if (props.isHovered) rules += ' -rwx0fg_a-_____f';
115
- else rules += ' -rwx0fg_a-_____e';
100
+ if (props.isPressed) rules += ' -rwx0fg_a-_____F';
101
+ else if (props.isFocusVisible) rules += ' -rwx0fg_a-_____F';
102
+ else if (props.isHovered) rules += ' -rwx0fg_a-_____F';
103
+ else rules += ' -rwx0fg_a-_____E';
116
104
  }
117
105
  } else if (props.isDisabled) rules += ' -rwx0fg_a-j';
118
106
  else {
@@ -137,7 +125,8 @@ const $a9cda54c4f47ce52$export$de65de8213222d10 = /*#__PURE__*/ (0, $5wH0g$forwa
137
125
  style: (0, $10ea7662e51a285b$export$56e8cba416805d8d)(domRef, UNSAFE_style),
138
126
  className: (renderProps)=>UNSAFE_className + $a9cda54c4f47ce52$var$styles({
139
127
  ...renderProps,
140
- staticColor: props.staticColor
128
+ staticColor: props.staticColor,
129
+ isStaticColor: !!props.staticColor
141
130
  }, props.styles),
142
131
  children: /*#__PURE__*/ (0, $5wH0g$jsx)((0, $bd983341bd35d639$export$2e2bcd8739ae039), {
143
132
  size: {
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;AA0BD,MAAM,wCAAkB;IACtB,SAAS;IACT,aAAa;QACX,OAAO;QACP,OAAO;IACT;AACF;AAEA,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4CC,MAAM,0DAAqB,CAAA,GAAA,oBAAY,EAAwE;AAK/G,MAAM,0DAAc,CAAA,GAAA,iBAAS,EAAE,SAAS,YAAY,KAAuB,EAAE,GAAoC;IACtH,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,gBAAC,YAAY,oBAAE,mBAAmB,IAAG,GAAG;IAC5C,IAAI,SAAS,CAAA,GAAA,sBAAc,EAAE;IAC7B,IAAI,kBAAkB,CAAA,GAAA,kCAA0B,EAAE,CAAA,GAAA,+CAAW,GAAG;IAChE,qBACE,gBAAC,CAAA,GAAA,aAAK;QACH,GAAG,KAAK;QACT,KAAK;QACL,MAAK;QACL,cAAY,gBAAgB,MAAM,CAAC;QACnC,OAAO,CAAA,GAAA,yCAAS,EAAE,QAAQ;QAC1B,WAAW,CAAA,cAAe,mBAAmB,6BAAO;gBAAC,GAAG,WAAW;gBAAE,aAAa,MAAM,WAAW;YAAA,GAAG,MAAM,MAAM;kBAClH,cAAA,gBAAC,CAAA,GAAA,wCAAQ;YAAE,MAAM,AAAC;gBAAC,GAAG;gBAAK,GAAG;gBAAM,GAAG;gBAAO,IAAI;YAAM,CAAW,CAAC,MAAM,IAAI,IAAI,IAAI;;;AAG5F","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, ContextValue} from 'react-aria-components';\nimport {createContext, forwardRef} from 'react';\nimport CrossIcon from '../ui-icons/Cross';\nimport {FocusableRef, FocusableRefValue} from '@react-types/shared';\nimport {getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {pressScale} from './pressScale';\nimport {useFocusableRef} from '@react-spectrum/utils';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface CloseButtonProps extends Pick<ButtonProps, 'isDisabled'>, 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 flexShrink: 0,\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\nexport const CloseButtonContext = createContext<ContextValue<CloseButtonProps, FocusableRefValue<HTMLButtonElement>>>(null);\n\n/**\n * A CloseButton allows a user to dismiss a dialog.\n */\nexport const CloseButton = forwardRef(function CloseButton(props: CloseButtonProps, ref: FocusableRef<HTMLButtonElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, CloseButtonContext);\n let {UNSAFE_style, UNSAFE_className = ''} = props;\n let domRef = useFocusableRef(ref);\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/s2');\n return (\n <Button\n {...props}\n ref={domRef}\n slot=\"close\"\n aria-label={stringFormatter.format('dialog.dismiss')}\n style={pressScale(domRef, UNSAFE_style)}\n className={renderProps => UNSAFE_className + styles({...renderProps, staticColor: props.staticColor}, props.styles)}>\n <CrossIcon size={({S: 'L', M: 'XL', L: 'XXL', XL: 'XXXL'} as const)[props.size || 'M']} />\n </Button>\n );\n});\n"],"names":[],"version":3,"file":"CloseButton.mjs.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;AA0BD,uDAAuD;AACvD,MAAM,wCAAkB;IACtB,SAAS;IACT,eAAe;AACjB;AAEA,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCC,MAAM,0DAAqB,CAAA,GAAA,oBAAY,EAAwE;AAK/G,MAAM,0DAAc,CAAA,GAAA,iBAAS,EAAE,SAAS,YAAY,KAAuB,EAAE,GAAoC;IACtH,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,gBAAC,YAAY,oBAAE,mBAAmB,IAAG,GAAG;IAC5C,IAAI,SAAS,CAAA,GAAA,sBAAc,EAAE;IAC7B,IAAI,kBAAkB,CAAA,GAAA,kCAA0B,EAAE,CAAA,GAAA,+CAAW,GAAG;IAChE,qBACE,gBAAC,CAAA,GAAA,aAAK;QACH,GAAG,KAAK;QACT,KAAK;QACL,MAAK;QACL,cAAY,gBAAgB,MAAM,CAAC;QACnC,OAAO,CAAA,GAAA,yCAAS,EAAE,QAAQ;QAC1B,WAAW,CAAA,cAAe,mBAAmB,6BAAO;gBAAC,GAAG,WAAW;gBAAE,aAAa,MAAM,WAAW;gBAAE,eAAe,CAAC,CAAC,MAAM,WAAW;YAAA,GAAG,MAAM,MAAM;kBACtJ,cAAA,gBAAC,CAAA,GAAA,wCAAQ;YAAE,MAAM,AAAC;gBAAC,GAAG;gBAAK,GAAG;gBAAM,GAAG;gBAAO,IAAI;YAAM,CAAW,CAAC,MAAM,IAAI,IAAI,IAAI;;;AAG5F","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, ContextValue} from 'react-aria-components';\nimport {createContext, forwardRef} from 'react';\nimport CrossIcon from '../ui-icons/Cross';\nimport {FocusableRef, FocusableRefValue} from '@react-types/shared';\nimport {getAllowedOverrides, staticColor, StyleProps} from './style-utils' with {type: 'macro'};\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {pressScale} from './pressScale';\nimport {useFocusableRef} from '@react-spectrum/utils';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface CloseButtonProps extends Pick<ButtonProps, 'isDisabled'>, 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' | 'auto'\n}\n\n// TODO(design): this is inconsistent with ActionButton\nconst hoverBackground = {\n default: 'gray-100',\n isStaticColor: 'transparent-overlay-100'\n} as const;\n\nconst styles = style({\n ...focusRing(),\n ...staticColor(),\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n size: 'control',\n flexShrink: 0,\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 isStaticColor: {\n default: baseColor('transparent-overlay-800'),\n isDisabled: 'transparent-overlay-400'\n }\n }\n },\n outlineColor: {\n default: 'focus-ring',\n isStaticColor: 'transparent-overlay-1000',\n forcedColors: 'Highlight'\n }\n}, getAllowedOverrides());\n\nexport const CloseButtonContext = createContext<ContextValue<CloseButtonProps, FocusableRefValue<HTMLButtonElement>>>(null);\n\n/**\n * A CloseButton allows a user to dismiss a dialog.\n */\nexport const CloseButton = forwardRef(function CloseButton(props: CloseButtonProps, ref: FocusableRef<HTMLButtonElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, CloseButtonContext);\n let {UNSAFE_style, UNSAFE_className = ''} = props;\n let domRef = useFocusableRef(ref);\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/s2');\n return (\n <Button\n {...props}\n ref={domRef}\n slot=\"close\"\n aria-label={stringFormatter.format('dialog.dismiss')}\n style={pressScale(domRef, UNSAFE_style)}\n className={renderProps => UNSAFE_className + styles({...renderProps, staticColor: props.staticColor, isStaticColor: !!props.staticColor}, props.styles)}>\n <CrossIcon size={({S: 'L', M: 'XL', L: 'XXL', XL: 'XXXL'} as const)[props.size || 'M']} />\n </Button>\n );\n});\n"],"names":[],"version":3,"file":"CloseButton.mjs.map"}
@@ -69,7 +69,7 @@ const $4c6639e34959fe36$export$b2103f68a961418e = /*#__PURE__*/ (0, $lfrPf$react
69
69
  rules += ' _wc';
70
70
  rules += ' _xc';
71
71
  rules += ' _yc';
72
- rules += ' da_____v';
72
+ rules += ' da_____I';
73
73
  rules += ' dp10';
74
74
  rules += ' _Nb';
75
75
  rules += ' _M-3hmpv';
@@ -68,7 +68,7 @@
68
68
 
69
69
  @layer _.b.a {
70
70
  @media (forced-colors: active) {
71
- .da_____v {
71
+ .da_____I {
72
72
  outline-color: buttonborder;
73
73
  }
74
74
  }
@@ -62,7 +62,7 @@ const $40a2b649525568ab$export$b2103f68a961418e = /*#__PURE__*/ (0, $dNfSU$forwa
62
62
  rules += ' _wc';
63
63
  rules += ' _xc';
64
64
  rules += ' _yc';
65
- rules += ' da_____v';
65
+ rules += ' da_____I';
66
66
  rules += ' dp10';
67
67
  rules += ' _Nb';
68
68
  rules += ' _M-3hmpv';
@@ -57,7 +57,7 @@ function $5b07976eb9e358fe$export$92862704de639678({ containerRef: containerRef,
57
57
  else rules += ' cc';
58
58
  rules += ' _Lb';
59
59
  rules += ' _Nb';
60
- rules += ' da_____v';
60
+ rules += ' da_____I';
61
61
  rules += ' db42';
62
62
  return rules;
63
63
  },
@@ -70,7 +70,7 @@ function $5b07976eb9e358fe$export$92862704de639678({ containerRef: containerRef,
70
70
  children: ({ isDragging: isDragging, color: color })=>/*#__PURE__*/ (0, $8hzuN$reactjsxruntime.jsxs)((0, $8hzuN$reactjsxruntime.Fragment), {
71
71
  children: [
72
72
  /*#__PURE__*/ (0, $8hzuN$reactjsxruntime.jsx)("div", {
73
- className: " . lb kb _vf _wf _xf _yf __na wa ub vb sb tb cb42 ca_____v"
73
+ className: " . lb kb _vf _wf _xf _yf __na wa ub vb sb tb cb42 ca_____I"
74
74
  }),
75
75
  /*#__PURE__*/ (0, $8hzuN$reactjsxruntime.jsx)($5b07976eb9e358fe$var$ColorLoupePortal, {
76
76
  isOpen: isDragging,
@@ -180,7 +180,7 @@ function $5b07976eb9e358fe$var$ColorLoupe({ isExiting: isExiting, onExited: onEx
180
180
  fill: color.toString()
181
181
  }),
182
182
  /*#__PURE__*/ (0, $8hzuN$reactjsxruntime.jsx)("path", {
183
- className: " . xb f_____n fa_____x eA",
183
+ className: " . xb f_____n fa_____K eA",
184
184
  d: "M25 3A21.98 21.98 0 003 25c0 6.2 4 14.794 11.568 24.853A144.233 144.233 0 0025 62.132a144.085 144.085 0 0010.4-12.239C42.99 39.816 47 31.209 47 25A21.98 21.98 0 0025 3m0-2a24 24 0 0124 24c0 16.255-24 40-24 40S1 41.255 1 25A24 24 0 0125 1z"
185
185
  })
186
186
  ]
@@ -160,15 +160,15 @@
160
160
 
161
161
  @layer _.b.a {
162
162
  @media (forced-colors: active) {
163
- .da_____v {
163
+ .da_____I {
164
164
  outline-color: buttonborder;
165
165
  }
166
166
 
167
- .ca_____v {
167
+ .ca_____I {
168
168
  border-color: buttonborder;
169
169
  }
170
170
 
171
- .fa_____x {
171
+ .fa_____K {
172
172
  stroke: buttonborder;
173
173
  }
174
174
  }
@@ -51,7 +51,7 @@ function $b4f7db7c45cd3de9$export$92862704de639678({ containerRef: containerRef,
51
51
  else rules += ' cc';
52
52
  rules += ' _Lb';
53
53
  rules += ' _Nb';
54
- rules += ' da_____v';
54
+ rules += ' da_____I';
55
55
  rules += ' db42';
56
56
  return rules;
57
57
  },
@@ -64,7 +64,7 @@ function $b4f7db7c45cd3de9$export$92862704de639678({ containerRef: containerRef,
64
64
  children: ({ isDragging: isDragging, color: color })=>/*#__PURE__*/ (0, $kShzN$jsxs)((0, $kShzN$Fragment), {
65
65
  children: [
66
66
  /*#__PURE__*/ (0, $kShzN$jsx)("div", {
67
- className: " . lb kb _vf _wf _xf _yf __na wa ub vb sb tb cb42 ca_____v"
67
+ className: " . lb kb _vf _wf _xf _yf __na wa ub vb sb tb cb42 ca_____I"
68
68
  }),
69
69
  /*#__PURE__*/ (0, $kShzN$jsx)($b4f7db7c45cd3de9$var$ColorLoupePortal, {
70
70
  isOpen: isDragging,
@@ -174,7 +174,7 @@ function $b4f7db7c45cd3de9$var$ColorLoupe({ isExiting: isExiting, onExited: onEx
174
174
  fill: color.toString()
175
175
  }),
176
176
  /*#__PURE__*/ (0, $kShzN$jsx)("path", {
177
- className: " . xb f_____n fa_____x eA",
177
+ className: " . xb f_____n fa_____K eA",
178
178
  d: "M25 3A21.98 21.98 0 003 25c0 6.2 4 14.794 11.568 24.853A144.233 144.233 0 0025 62.132a144.085 144.085 0 0010.4-12.239C42.99 39.816 47 31.209 47 25A21.98 21.98 0 0025 3m0-2a24 24 0 0124 24c0 16.255-24 40-24 40S1 41.255 1 25A24 24 0 0125 1z"
179
179
  })
180
180
  ]
@@ -136,7 +136,7 @@ const $fdd6f3d03620d438$export$44fd664bcca5b6fb = /*#__PURE__*/ (0, $hkRua$react
136
136
  rules += ' _wc';
137
137
  rules += ' _xc';
138
138
  rules += ' _yc';
139
- rules += ' da_____v';
139
+ rules += ' da_____I';
140
140
  rules += ' dp10';
141
141
  rules += ' _Nb';
142
142
  rules += ' _M-3hmpv';
@@ -245,7 +245,7 @@
245
245
 
246
246
  @layer _.b.a {
247
247
  @media (forced-colors: active) {
248
- .da_____v {
248
+ .da_____I {
249
249
  outline-color: buttonborder;
250
250
  }
251
251
  }
@@ -129,7 +129,7 @@ const $495db619596088aa$export$44fd664bcca5b6fb = /*#__PURE__*/ (0, $3i9ps$forwa
129
129
  rules += ' _wc';
130
130
  rules += ' _xc';
131
131
  rules += ' _yc';
132
- rules += ' da_____v';
132
+ rules += ' da_____I';
133
133
  rules += ' dp10';
134
134
  rules += ' _Nb';
135
135
  rules += ' _M-3hmpv';
@@ -70,7 +70,7 @@ function $a267e3efa7024819$var$useWrapper(swatch, color, rounding) {
70
70
  let rules = " .";
71
71
  if (props.isFocusVisible) rules += ' _Lb';
72
72
  else rules += ' _La';
73
- rules += ' da_____z';
73
+ rules += ' da_____M';
74
74
  rules += ' dx';
75
75
  rules += ' _Nc';
76
76
  rules += ' _M-3t1z';
@@ -188,7 +188,7 @@
188
188
 
189
189
  @layer _.b.a {
190
190
  @media (forced-colors: active) {
191
- .da_____z {
191
+ .da_____M {
192
192
  outline-color: highlight;
193
193
  }
194
194
  }
@@ -63,7 +63,7 @@ function $ba9c901b6c815fb9$var$useWrapper(swatch, color, rounding) {
63
63
  let rules = " .";
64
64
  if (props.isFocusVisible) rules += ' _Lb';
65
65
  else rules += ' _La';
66
- rules += ' da_____z';
66
+ rules += ' da_____M';
67
67
  rules += ' dx';
68
68
  rules += ' _Nc';
69
69
  rules += ' _M-3t1z';
@@ -58,7 +58,7 @@ const $0c1e31ce388fe468$export$f80663f808113381 = /*#__PURE__*/ (0, $lMAHP$react
58
58
  rules += ' _wf';
59
59
  rules += ' _xf';
60
60
  rules += ' _yf';
61
- rules += ' da_____v';
61
+ rules += ' da_____I';
62
62
  rules += ' dp10';
63
63
  rules += ' _Nb';
64
64
  rules += ' _M-3hmpv';
@@ -81,7 +81,7 @@ const $0c1e31ce388fe468$export$f80663f808113381 = /*#__PURE__*/ (0, $lMAHP$react
81
81
  rules += ' _wf';
82
82
  rules += ' _xf';
83
83
  rules += ' _yf';
84
- rules += ' da_____v';
84
+ rules += ' da_____I';
85
85
  rules += ' dp10';
86
86
  rules += ' _Nb';
87
87
  if (props.isDisabled) rules += ' _La';
@@ -68,7 +68,7 @@
68
68
 
69
69
  @layer _.b.a {
70
70
  @media (forced-colors: active) {
71
- .da_____v {
71
+ .da_____I {
72
72
  outline-color: buttonborder;
73
73
  }
74
74
  }
@@ -51,7 +51,7 @@ const $4a6afc95235907f0$export$f80663f808113381 = /*#__PURE__*/ (0, $j8ecy$forwa
51
51
  rules += ' _wf';
52
52
  rules += ' _xf';
53
53
  rules += ' _yf';
54
- rules += ' da_____v';
54
+ rules += ' da_____I';
55
55
  rules += ' dp10';
56
56
  rules += ' _Nb';
57
57
  rules += ' _M-3hmpv';
@@ -74,7 +74,7 @@ const $4a6afc95235907f0$export$f80663f808113381 = /*#__PURE__*/ (0, $j8ecy$forwa
74
74
  rules += ' _wf';
75
75
  rules += ' _xf';
76
76
  rules += ' _yf';
77
- rules += ' da_____v';
77
+ rules += ' da_____I';
78
78
  rules += ' dp10';
79
79
  rules += ' _Nb';
80
80
  if (props.isDisabled) rules += ' _La';