@react-spectrum/s2 0.9.0 → 0.9.2

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 (272) hide show
  1. package/dist/Accordion.cjs +2 -2
  2. package/dist/Accordion.css +2 -2
  3. package/dist/Accordion.mjs +2 -2
  4. package/dist/ActionBar.cjs +60 -60
  5. package/dist/ActionBar.css +59 -59
  6. package/dist/ActionBar.mjs +60 -60
  7. package/dist/ActionButton.cjs +187 -187
  8. package/dist/ActionButton.cjs.map +1 -1
  9. package/dist/ActionButton.css +134 -134
  10. package/dist/ActionButton.css.map +1 -1
  11. package/dist/ActionButton.mjs +187 -187
  12. package/dist/ActionButton.mjs.map +1 -1
  13. package/dist/ActionButtonGroup.cjs +15 -15
  14. package/dist/ActionButtonGroup.css +9 -9
  15. package/dist/ActionButtonGroup.mjs +15 -15
  16. package/dist/Add.cjs +10 -10
  17. package/dist/Add.css +6 -6
  18. package/dist/Add.mjs +10 -10
  19. package/dist/AlertDialog.cjs +3 -3
  20. package/dist/AlertDialog.css +3 -3
  21. package/dist/AlertDialog.mjs +3 -3
  22. package/dist/Asterisk.cjs +6 -6
  23. package/dist/Asterisk.css +4 -4
  24. package/dist/Asterisk.mjs +6 -6
  25. package/dist/Avatar.cjs +14 -14
  26. package/dist/Avatar.css +14 -14
  27. package/dist/Avatar.mjs +14 -14
  28. package/dist/AvatarGroup.cjs +120 -120
  29. package/dist/AvatarGroup.css +37 -37
  30. package/dist/AvatarGroup.mjs +120 -120
  31. package/dist/Badge.cjs +196 -196
  32. package/dist/Badge.css +129 -129
  33. package/dist/Badge.mjs +196 -196
  34. package/dist/Breadcrumbs.cjs +231 -231
  35. package/dist/Breadcrumbs.css +102 -102
  36. package/dist/Breadcrumbs.mjs +231 -231
  37. package/dist/Button.cjs +328 -328
  38. package/dist/Button.cjs.map +1 -1
  39. package/dist/Button.css +176 -176
  40. package/dist/Button.css.map +1 -1
  41. package/dist/Button.mjs +328 -328
  42. package/dist/Button.mjs.map +1 -1
  43. package/dist/ButtonGroup.cjs +20 -20
  44. package/dist/ButtonGroup.css +15 -15
  45. package/dist/ButtonGroup.mjs +20 -20
  46. package/dist/Card.cjs +294 -294
  47. package/dist/Card.css +205 -205
  48. package/dist/Card.mjs +294 -294
  49. package/dist/CardView.cjs +17 -17
  50. package/dist/CardView.css +17 -17
  51. package/dist/CardView.mjs +17 -17
  52. package/dist/CenterBaseline.cjs +1 -1
  53. package/dist/CenterBaseline.css +2 -2
  54. package/dist/CenterBaseline.mjs +1 -1
  55. package/dist/Checkbox.cjs +160 -160
  56. package/dist/Checkbox.css +94 -94
  57. package/dist/Checkbox.mjs +160 -160
  58. package/dist/CheckboxGroup.cjs +43 -43
  59. package/dist/CheckboxGroup.css +41 -41
  60. package/dist/CheckboxGroup.mjs +43 -43
  61. package/dist/Checkmark.cjs +12 -12
  62. package/dist/Checkmark.css +8 -8
  63. package/dist/Checkmark.mjs +12 -12
  64. package/dist/Chevron.cjs +12 -12
  65. package/dist/Chevron.css +10 -10
  66. package/dist/Chevron.mjs +12 -12
  67. package/dist/ClearButton.cjs +29 -29
  68. package/dist/ClearButton.css +29 -29
  69. package/dist/ClearButton.mjs +29 -29
  70. package/dist/CloseButton.cjs +54 -54
  71. package/dist/CloseButton.css +46 -46
  72. package/dist/CloseButton.mjs +54 -54
  73. package/dist/ColorArea.cjs +16 -16
  74. package/dist/ColorArea.css +16 -16
  75. package/dist/ColorArea.mjs +16 -16
  76. package/dist/ColorField.cjs +31 -31
  77. package/dist/ColorField.css +31 -31
  78. package/dist/ColorField.mjs +31 -31
  79. package/dist/ColorHandle.cjs +27 -27
  80. package/dist/ColorHandle.css +42 -42
  81. package/dist/ColorHandle.mjs +27 -27
  82. package/dist/ColorSlider.cjs +108 -108
  83. package/dist/ColorSlider.css +56 -56
  84. package/dist/ColorSlider.mjs +108 -108
  85. package/dist/ColorSwatch.cjs +29 -29
  86. package/dist/ColorSwatch.css +29 -29
  87. package/dist/ColorSwatch.mjs +29 -29
  88. package/dist/ColorSwatchPicker.cjs +27 -27
  89. package/dist/ColorSwatchPicker.css +46 -46
  90. package/dist/ColorSwatchPicker.mjs +27 -27
  91. package/dist/ColorWheel.cjs +26 -26
  92. package/dist/ColorWheel.css +17 -17
  93. package/dist/ColorWheel.mjs +26 -26
  94. package/dist/ComboBox.cjs +378 -376
  95. package/dist/ComboBox.cjs.map +1 -1
  96. package/dist/ComboBox.css +179 -179
  97. package/dist/ComboBox.css.map +1 -1
  98. package/dist/ComboBox.mjs +378 -376
  99. package/dist/ComboBox.mjs.map +1 -1
  100. package/dist/ContextualHelp.cjs +5 -5
  101. package/dist/ContextualHelp.cjs.map +1 -1
  102. package/dist/ContextualHelp.css +49 -49
  103. package/dist/ContextualHelp.css.map +1 -1
  104. package/dist/ContextualHelp.mjs +5 -5
  105. package/dist/ContextualHelp.mjs.map +1 -1
  106. package/dist/Cross.cjs +14 -14
  107. package/dist/Cross.css +10 -10
  108. package/dist/Cross.mjs +14 -14
  109. package/dist/CustomDialog.cjs +25 -25
  110. package/dist/CustomDialog.css +25 -25
  111. package/dist/CustomDialog.mjs +25 -25
  112. package/dist/Dash.cjs +10 -10
  113. package/dist/Dash.css +6 -6
  114. package/dist/Dash.mjs +10 -10
  115. package/dist/Dialog.cjs +17 -17
  116. package/dist/Dialog.css +70 -70
  117. package/dist/Dialog.mjs +17 -17
  118. package/dist/Disclosure.cjs +129 -129
  119. package/dist/Disclosure.css +104 -104
  120. package/dist/Disclosure.mjs +129 -129
  121. package/dist/Divider.cjs +25 -25
  122. package/dist/Divider.css +25 -25
  123. package/dist/Divider.mjs +25 -25
  124. package/dist/DropZone.cjs +58 -58
  125. package/dist/DropZone.css +54 -54
  126. package/dist/DropZone.mjs +58 -58
  127. package/dist/Field.cjs +340 -340
  128. package/dist/Field.cjs.map +1 -1
  129. package/dist/Field.css +144 -144
  130. package/dist/Field.mjs +340 -340
  131. package/dist/Field.mjs.map +1 -1
  132. package/dist/Form.cjs +9 -9
  133. package/dist/Form.css +9 -9
  134. package/dist/Form.mjs +9 -9
  135. package/dist/FullscreenDialog.cjs +5 -5
  136. package/dist/FullscreenDialog.css +79 -79
  137. package/dist/FullscreenDialog.mjs +5 -5
  138. package/dist/IllustratedMessage.cjs +219 -219
  139. package/dist/IllustratedMessage.css +74 -74
  140. package/dist/IllustratedMessage.mjs +219 -219
  141. package/dist/Image.cjs +14 -14
  142. package/dist/Image.cjs.map +1 -1
  143. package/dist/Image.css +14 -14
  144. package/dist/Image.css.map +1 -1
  145. package/dist/Image.mjs +14 -14
  146. package/dist/Image.mjs.map +1 -1
  147. package/dist/InlineAlert.cjs +108 -108
  148. package/dist/InlineAlert.css +90 -90
  149. package/dist/InlineAlert.mjs +108 -108
  150. package/dist/Link.cjs +49 -49
  151. package/dist/Link.css +41 -41
  152. package/dist/Link.mjs +49 -49
  153. package/dist/LinkOut.cjs +8 -8
  154. package/dist/LinkOut.css +8 -8
  155. package/dist/LinkOut.mjs +8 -8
  156. package/dist/Menu.cjs +422 -422
  157. package/dist/Menu.css +180 -180
  158. package/dist/Menu.mjs +422 -422
  159. package/dist/Meter.cjs +153 -153
  160. package/dist/Meter.css +95 -95
  161. package/dist/Meter.mjs +153 -153
  162. package/dist/Modal.cjs +58 -58
  163. package/dist/Modal.css +50 -50
  164. package/dist/Modal.mjs +58 -58
  165. package/dist/NotificationBadge.cjs +56 -56
  166. package/dist/NotificationBadge.css +51 -51
  167. package/dist/NotificationBadge.mjs +56 -56
  168. package/dist/NumberField.cjs +114 -118
  169. package/dist/NumberField.cjs.map +1 -1
  170. package/dist/NumberField.css +103 -103
  171. package/dist/NumberField.css.map +1 -1
  172. package/dist/NumberField.mjs +115 -119
  173. package/dist/NumberField.mjs.map +1 -1
  174. package/dist/Picker.cjs +273 -271
  175. package/dist/Picker.cjs.map +1 -1
  176. package/dist/Picker.css +169 -169
  177. package/dist/Picker.css.map +1 -1
  178. package/dist/Picker.mjs +273 -271
  179. package/dist/Picker.mjs.map +1 -1
  180. package/dist/Popover.cjs +85 -85
  181. package/dist/Popover.css +66 -66
  182. package/dist/Popover.mjs +85 -85
  183. package/dist/ProgressBar.cjs +163 -163
  184. package/dist/ProgressBar.css +103 -103
  185. package/dist/ProgressBar.mjs +163 -163
  186. package/dist/ProgressCircle.cjs +17 -17
  187. package/dist/ProgressCircle.css +17 -17
  188. package/dist/ProgressCircle.mjs +17 -17
  189. package/dist/Provider.cjs +10 -10
  190. package/dist/Provider.css +9 -9
  191. package/dist/Provider.mjs +10 -10
  192. package/dist/Radio.cjs +144 -144
  193. package/dist/Radio.css +81 -81
  194. package/dist/Radio.mjs +144 -144
  195. package/dist/RadioGroup.cjs +41 -41
  196. package/dist/RadioGroup.css +41 -41
  197. package/dist/RadioGroup.mjs +41 -41
  198. package/dist/SearchField.cjs +41 -41
  199. package/dist/SearchField.css +49 -49
  200. package/dist/SearchField.mjs +41 -41
  201. package/dist/SegmentedControl.cjs +171 -171
  202. package/dist/SegmentedControl.css +120 -120
  203. package/dist/SegmentedControl.mjs +171 -171
  204. package/dist/Slider.cjs +288 -288
  205. package/dist/Slider.css +152 -152
  206. package/dist/Slider.mjs +288 -288
  207. package/dist/StatusLight.cjs +115 -115
  208. package/dist/StatusLight.css +63 -63
  209. package/dist/StatusLight.mjs +115 -115
  210. package/dist/Switch.cjs +152 -152
  211. package/dist/Switch.css +76 -76
  212. package/dist/Switch.mjs +152 -152
  213. package/dist/TableView.cjs +310 -310
  214. package/dist/TableView.css +172 -172
  215. package/dist/TableView.mjs +310 -310
  216. package/dist/Tabs.cjs +113 -110
  217. package/dist/Tabs.cjs.map +1 -1
  218. package/dist/Tabs.css +92 -92
  219. package/dist/Tabs.css.map +1 -1
  220. package/dist/Tabs.mjs +113 -110
  221. package/dist/Tabs.mjs.map +1 -1
  222. package/dist/TabsPicker.cjs +123 -123
  223. package/dist/TabsPicker.css +112 -112
  224. package/dist/TabsPicker.mjs +123 -123
  225. package/dist/TagGroup.cjs +202 -202
  226. package/dist/TagGroup.cjs.map +1 -1
  227. package/dist/TagGroup.css +147 -147
  228. package/dist/TagGroup.css.map +1 -1
  229. package/dist/TagGroup.mjs +202 -202
  230. package/dist/TagGroup.mjs.map +1 -1
  231. package/dist/TextField.cjs +57 -57
  232. package/dist/TextField.css +57 -57
  233. package/dist/TextField.mjs +57 -57
  234. package/dist/Toast.cjs +118 -118
  235. package/dist/Toast.css +105 -105
  236. package/dist/Toast.mjs +118 -118
  237. package/dist/ToggleButton.cjs +3 -3
  238. package/dist/ToggleButton.css +12 -12
  239. package/dist/ToggleButton.mjs +3 -3
  240. package/dist/Tooltip.cjs +81 -81
  241. package/dist/Tooltip.css +68 -68
  242. package/dist/Tooltip.mjs +81 -81
  243. package/dist/TreeView.cjs +143 -149
  244. package/dist/TreeView.cjs.map +1 -1
  245. package/dist/TreeView.css +143 -143
  246. package/dist/TreeView.css.map +1 -1
  247. package/dist/TreeView.mjs +143 -149
  248. package/dist/TreeView.mjs.map +1 -1
  249. package/dist/types.d.ts +2 -2
  250. package/dist/types.d.ts.map +1 -1
  251. package/icons/Icon.cjs +10 -10
  252. package/icons/Icon.css +9 -9
  253. package/icons/Icon.mjs +10 -10
  254. package/icons/Skeleton.cjs +4 -3
  255. package/icons/Skeleton.cjs.map +1 -1
  256. package/icons/Skeleton.css +6 -6
  257. package/icons/Skeleton.css.map +1 -1
  258. package/icons/Skeleton.mjs +4 -3
  259. package/icons/Skeleton.mjs.map +1 -1
  260. package/package.json +45 -26
  261. package/src/ActionButton.tsx +1 -1
  262. package/src/Button.tsx +3 -3
  263. package/src/ComboBox.tsx +3 -2
  264. package/src/ContextualHelp.tsx +2 -2
  265. package/src/Image.tsx +1 -1
  266. package/src/NumberField.tsx +0 -2
  267. package/src/Picker.tsx +3 -2
  268. package/src/Skeleton.tsx +2 -1
  269. package/src/Tabs.tsx +7 -5
  270. package/src/TagGroup.tsx +1 -1
  271. package/src/TreeView.tsx +1 -6
  272. package/style/__tests__/style-macro.test.js +56 -56
@@ -1 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yCAAU;oBAAG;wBACZ,MAAM;wBACN,kHAAkH;wBAClH,iBAAiB;oBACnB;iBAAE;gBACF;oBAAC,CAAA,GAAA,yCAAU;oBAAG;wBACZ,QAAQ,CAAA,GAAA,yCAAa,EAAE;4BAAC,MAAM;4BAAQ,MAAM;wBAAmB;wBAC/D,MAAM;oBACR;iBAAE;aACH;sBACA,OAAO,MAAM,QAAQ,KAAK,yBAAW,gBAAC,CAAA,GAAA,yCAAG;0BAAG,MAAM,QAAQ;iBAAW,MAAM,QAAQ;;;AAI5F","sources":["packages/@react-spectrum/s2/src/Button.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, fontRelative, lightDark, linearGradient, style} from '../style' with {type: 'macro'};\nimport {ButtonRenderProps, ContextValue, Link, LinkProps, OverlayTriggerStateContext, Provider, Button as RACButton, ButtonProps as RACButtonProps} from 'react-aria-components';\nimport {centerBaseline} from './CenterBaseline';\nimport {control, getAllowedOverrides, staticColor, StyleProps} from './style-utils' with {type: 'macro'};\nimport {createContext, forwardRef, ReactNode, useContext, useEffect, useState} from 'react';\nimport {FocusableRef, FocusableRefValue} from '@react-types/shared';\nimport {IconContext} from './Icon';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {pressScale} from './pressScale';\nimport {ProgressCircle} from './ProgressCircle';\nimport {SkeletonContext} from './Skeleton';\nimport {Text, TextContext} from './Content';\nimport {useFocusableRef} from '@react-spectrum/utils';\nimport {useFormProps} from './Form';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\ninterface ButtonStyleProps {\n /**\n * The [visual style](https://spectrum.adobe.com/page/button/#Options) of the button.\n *\n * @default 'primary'\n */\n variant?: 'primary' | 'secondary' | 'accent' | 'negative' | 'premium' | 'genai',\n /**\n * The background style of the Button.\n *\n * @default 'fill'\n */\n fillStyle?: 'fill' | 'outline',\n /**\n * The size of the Button.\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\nexport interface ButtonProps extends Omit<RACButtonProps, 'className' | 'style' | 'children' | 'onHover' | 'onHoverStart' | 'onHoverEnd' | 'onHoverChange' | 'onClick'>, StyleProps, ButtonStyleProps {\n /** The content to display in the Button. */\n children: ReactNode\n}\n\nexport interface LinkButtonProps extends Omit<LinkProps, 'className' | 'style' | 'children' | 'onClick'>, StyleProps, ButtonStyleProps {\n /** The content to display in the Button. */\n children: ReactNode\n}\n\nexport const ButtonContext = createContext<ContextValue<Partial<ButtonProps>, FocusableRefValue<HTMLButtonElement>>>(null);\nexport const LinkButtonContext = createContext<ContextValue<Partial<ButtonProps>, FocusableRefValue<HTMLAnchorElement>>>(null);\n\nconst button = style<ButtonRenderProps & ButtonStyleProps & {isStaticColor: boolean}>({\n ...focusRing(),\n ...staticColor(),\n ...control({shape: 'pill', wrap: true, icon: true}),\n position: 'relative',\n justifyContent: 'center',\n textAlign: 'start',\n fontWeight: 'bold',\n userSelect: 'none',\n width: 'fit',\n textDecoration: 'none', // for link buttons\n transition: 'default',\n borderStyle: 'solid',\n borderWidth: {\n fillStyle: {\n fill: 0,\n outline: 2\n },\n variant: {\n premium: 0,\n genai: 0\n }\n },\n borderColor: {\n variant: {\n primary: baseColor('gray-800'),\n secondary: baseColor('gray-300')\n },\n isDisabled: 'disabled',\n isStaticColor: {\n variant: {\n primary: baseColor('transparent-overlay-800'),\n secondary: baseColor('transparent-overlay-300')\n },\n isDisabled: 'transparent-overlay-300'\n },\n forcedColors: {\n default: 'ButtonBorder',\n isHovered: 'Highlight',\n isDisabled: 'GrayText'\n }\n },\n backgroundColor: {\n fillStyle: {\n fill: {\n variant: {\n primary: baseColor('neutral'),\n secondary: baseColor('gray-100'),\n accent: {\n default: lightDark('accent-900', 'accent-700'),\n isHovered: lightDark('accent-1000', 'accent-600'),\n isPressed: lightDark('accent-1000', 'accent-600'),\n isFocused: lightDark('accent-1000', 'accent-600')\n },\n negative: {\n default: lightDark('negative-900', 'negative-700'),\n isHovered: lightDark('negative-1000', 'negative-600'),\n isPressed: lightDark('negative-1000', 'negative-600'),\n isFocused: lightDark('negative-1000', 'negative-600')\n },\n premium: 'gray-100',\n genai: 'gray-100'\n },\n isDisabled: 'disabled'\n },\n outline: {\n variant: {\n premium: 'gray-100',\n genai: 'gray-100'\n },\n default: 'transparent',\n isHovered: 'gray-100',\n isPressed: 'gray-100',\n isFocusVisible: 'gray-100',\n isDisabled: {\n default: 'transparent',\n variant: {\n premium: 'gray-100',\n genai: 'gray-100'\n }\n }\n }\n },\n isStaticColor: {\n fillStyle: {\n fill: {\n variant: {\n primary: baseColor('transparent-overlay-800'),\n secondary: baseColor('transparent-overlay-100'),\n premium: 'transparent-overlay-100',\n genai: 'transparent-overlay-100'\n },\n isDisabled: 'transparent-overlay-100'\n },\n outline: {\n variant: {\n premium: 'transparent-overlay-100',\n genai: 'transparent-overlay-100'\n },\n default: 'transparent',\n isHovered: 'transparent-overlay-100',\n isPressed: 'transparent-overlay-100',\n isFocusVisible: 'transparent-overlay-100',\n isDisabled: {\n default: 'transparent',\n variant: {\n premium: 'transparent-overlay-100',\n genai: 'transparent-overlay-100'\n }\n }\n }\n }\n },\n forcedColors: {\n fillStyle: {\n fill: {\n default: 'ButtonText',\n isHovered: 'Highlight',\n isDisabled: 'GrayText'\n },\n outline: 'ButtonFace'\n }\n }\n },\n color: {\n fillStyle: {\n fill: {\n variant: {\n primary: 'gray-25',\n secondary: baseColor('neutral'),\n accent: 'white',\n negative: 'white',\n premium: 'white',\n genai: 'white'\n },\n isDisabled: 'disabled'\n },\n outline: {\n default: baseColor('neutral'),\n variant: {\n premium: 'white',\n genai: 'white'\n },\n isDisabled: 'disabled'\n }\n },\n isStaticColor: {\n fillStyle: {\n fill: {\n variant: {\n primary: 'auto',\n secondary: baseColor('transparent-overlay-800'),\n premium: 'white',\n genai: 'white'\n }\n },\n outline: {\n variant: {\n premium: 'white',\n genai: 'white'\n },\n default: baseColor('transparent-overlay-800')\n }\n },\n isDisabled: 'transparent-overlay-400'\n },\n forcedColors: {\n fillStyle: {\n fill: {\n default: 'ButtonFace',\n isDisabled: 'HighlightText'\n },\n outline: {\n default: 'ButtonText',\n isDisabled: 'GrayText'\n }\n }\n }\n },\n '--iconPrimary': {\n type: 'fill',\n value: 'currentColor'\n },\n outlineColor: {\n default: 'focus-ring',\n isStaticColor: 'transparent-overlay-1000',\n forcedColors: 'Highlight'\n },\n forcedColorAdjust: 'none',\n disableTapHighlight: true\n}, getAllowedOverrides());\n\n// Put the gradient background on a separate element from the button to work around a Safari\n// bug where transitions of custom properties cause layout flickering if any properties use rems. 🤣\n// https://bugs.webkit.org/show_bug.cgi?id=285622\nconst gradient = style({\n position: 'absolute',\n inset: 0,\n zIndex: -1,\n transition: 'default',\n borderRadius: 'inherit',\n backgroundImage: {\n variant: {\n premium: {\n default: linearGradient('to bottom right', ['fuchsia-900', 0], ['indigo-900', 66], ['blue-900', 100]),\n isHovered: linearGradient('to bottom right', ['fuchsia-1000', 0], ['indigo-1000', 66], ['blue-1000', 100]),\n isPressed: linearGradient('to bottom right', ['fuchsia-1000', 0], ['indigo-1000', 66], ['blue-1000', 100]),\n isFocusVisible: linearGradient('to bottom right', ['fuchsia-1000', 0], ['indigo-1000', 66], ['blue-1000', 100])\n },\n genai: {\n default: linearGradient('to bottom right', ['red-900', 0], ['magenta-900', 33], ['indigo-900', 100]),\n isHovered: linearGradient('to bottom right', ['red-1000', 0], ['magenta-1000', 33], ['indigo-1000', 100]),\n isPressed: linearGradient('to bottom right', ['red-1000', 0], ['magenta-1000', 33], ['indigo-1000', 100]),\n isFocusVisible: linearGradient('to bottom right', ['red-1000', 0], ['magenta-1000', 33], ['indigo-1000', 100])\n }\n },\n isDisabled: 'none',\n forcedColors: 'none'\n },\n // Force gradient colors to remain static between light and dark theme.\n colorScheme: {\n variant: {\n premium: 'light',\n genai: 'light'\n }\n }\n});\n\n/**\n * Buttons allow users to perform an action.\n * They have multiple styles for various needs, and are ideal for calling attention to\n * where a user needs to do something in order to move forward in a flow.\n */\nexport const Button = forwardRef(function Button(props: ButtonProps, ref: FocusableRef<HTMLButtonElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, ButtonContext);\n props = useFormProps(props);\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/s2');\n let {\n isPending,\n variant = 'primary',\n fillStyle = 'fill',\n size = 'M',\n staticColor\n } = props;\n let domRef = useFocusableRef(ref);\n let overlayTriggerState = useContext(OverlayTriggerStateContext);\n\n let [isProgressVisible, setIsProgressVisible] = useState(false);\n useEffect(() => {\n let timeout: ReturnType<typeof setTimeout>;\n\n if (isPending) {\n // Start timer when isPending is set to true.\n timeout = setTimeout(() => {\n setIsProgressVisible(true);\n }, 1000);\n } else {\n // Exit loading state when isPending is set to false. */\n setIsProgressVisible(false);\n }\n return () => {\n // Clean up on unmount or when user removes isPending prop before entering loading state.\n clearTimeout(timeout);\n };\n }, [isPending]);\n\n return (\n <RACButton\n {...props}\n ref={domRef}\n style={pressScale(domRef, props.UNSAFE_style)}\n className={renderProps => (props.UNSAFE_className || '') + button({\n ...renderProps,\n // Retain hover styles when an overlay is open.\n isHovered: renderProps.isHovered || overlayTriggerState?.isOpen || false,\n isDisabled: renderProps.isDisabled || isProgressVisible,\n variant,\n fillStyle,\n size,\n staticColor,\n isStaticColor: !!staticColor\n }, props.styles)}>\n {(renderProps) => (<>\n {variant === 'genai' || variant === 'premium' \n ? (\n <span\n className={gradient({\n ...renderProps,\n // Retain hover styles when an overlay is open.\n isHovered: renderProps.isHovered || overlayTriggerState?.isOpen || false,\n isDisabled: renderProps.isDisabled || isProgressVisible,\n variant\n })} />\n )\n : null}\n <Provider\n values={[\n [SkeletonContext, null],\n [TextContext, {\n styles: style({\n paddingY: '--labelPadding',\n order: 1,\n opacity: {\n default: 1,\n isProgressVisible: 0\n }\n })({isProgressVisible}),\n // @ts-ignore data-attributes allowed on all JSX elements, but adding to DOMProps has been problematic in the past\n 'data-rsp-slot': 'text'\n }],\n [IconContext, {\n render: centerBaseline({slot: 'icon', styles: style({order: 0})}),\n styles: style({\n size: fontRelative(20),\n marginStart: '--iconMargin',\n flexShrink: 0,\n opacity: {\n default: 1,\n isProgressVisible: 0\n }\n })({isProgressVisible})\n }]\n ]}>\n {typeof props.children === 'string' ? <Text>{props.children}</Text> : props.children}\n {isPending &&\n <div\n className={style({\n position: 'absolute',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n opacity: {\n default: 0,\n isProgressVisible: 1\n }\n })({isProgressVisible, isPending})}>\n <ProgressCircle\n isIndeterminate\n aria-label={stringFormatter.format('button.pending')}\n size=\"S\"\n staticColor={staticColor}\n styles={style({\n size: {\n size: {\n S: 14,\n M: 18,\n L: 20,\n XL: 24\n }\n }\n })({size})} />\n </div>\n }\n </Provider>\n </>)}\n </RACButton>\n );\n});\n\n/**\n * A LinkButton combines the functionality of a link with the appearance of a button. Useful for allowing users to navigate to another page.\n */\nexport const LinkButton = forwardRef(function LinkButton(props: LinkButtonProps, ref: FocusableRef<HTMLAnchorElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, LinkButtonContext);\n props = useFormProps(props);\n let domRef = useFocusableRef(ref);\n let overlayTriggerState = useContext(OverlayTriggerStateContext);\n\n return (\n <Link\n {...props}\n ref={domRef}\n style={pressScale(domRef, props.UNSAFE_style)}\n className={renderProps => (props.UNSAFE_className || '') + button({\n ...renderProps,\n // Retain hover styles when an overlay is open.\n isHovered: renderProps.isHovered || overlayTriggerState?.isOpen || false,\n variant: props.variant || 'primary',\n fillStyle: props.fillStyle || 'fill',\n size: props.size || 'M',\n staticColor: props.staticColor,\n isStaticColor: !!props.staticColor,\n isPending: false\n }, props.styles)}>\n <Provider\n values={[\n [SkeletonContext, null],\n [TextContext, {\n styles: style({paddingY: '--labelPadding', order: 1}),\n // @ts-ignore data-attributes allowed on all JSX elements, but adding to DOMProps has been problematic in the past\n 'data-rsp-slot': 'text'\n }],\n [IconContext, {\n render: centerBaseline({slot: 'icon', styles: style({order: 0})}),\n styles: style({size: fontRelative(20), marginStart: '--iconMargin', flexShrink: 0})\n }]\n ]}>\n {typeof props.children === 'string' ? <Text>{props.children}</Text> : props.children}\n </Provider>\n </Link>\n );\n});\n"],"names":[],"version":3,"file":"Button.mjs.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;AAqDM,MAAM,0DAAgB,CAAA,GAAA,oBAAY,EAA4E;AAC9G,MAAM,0DAAoB,CAAA,GAAA,oBAAY,EAA4E;AAEzH,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgMN,4FAA4F;AAC5F,oGAAoG;AACpG,iDAAiD;AACjD,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsCC,MAAM,0DAAS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AQ,MAAM,YAAY;QAC5C,WAAW,CAAA,cAAe,AAAC,CAAA,MAAM,gBAAgB,IAAI,EAAC,IAAK,6BAAO;gBAChE,GAAG,WAAW;gBACd,+CAA+C;gBAC/C,WAAW,YAAY,SAAS,IAAI,qBAAqB,UAAU;gBACnE,SAAS,MAAM,OAAO,IAAI;gBAC1B,WAAW,MAAM,SAAS,IAAI;gBAC9B,MAAM,MAAM,IAAI,IAAI;gBACpB,aAAa,MAAM,WAAW;gBAC9B,eAAe,CAAC,CAAC,MAAM,WAAW;gBAClC,WAAW;YACb,GAAG,MAAM,MAAM;kBACf,cAAA,gBAAC,CAAA,GAAA,eAAO;YACN,QAAQ;gBACN;oBAAC,CAAA,GAAA,yCAAc;oBAAG;iBAAK;gBACvB;oBAAC,CAAA,GAAA,yCAAU;oBAAG;wBACZ,MAAM;wBACN,kHAAkH;wBAClH,iBAAiB;oBACnB;iBAAE;gBACF;oBAAC,CAAA,GAAA,yCAAU;oBAAG;wBACZ,QAAQ,CAAA,GAAA,yCAAa,EAAE;4BAAC,MAAM;4BAAQ,MAAM;wBAAmB;wBAC/D,MAAM;oBACR;iBAAE;aACH;sBACA,OAAO,MAAM,QAAQ,KAAK,yBAAW,gBAAC,CAAA,GAAA,yCAAG;0BAAG,MAAM,QAAQ;iBAAW,MAAM,QAAQ;;;AAI5F","sources":["packages/@react-spectrum/s2/src/Button.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, fontRelative, lightDark, linearGradient, style} from '../style' with {type: 'macro'};\nimport {ButtonRenderProps, ContextValue, Link, LinkProps, OverlayTriggerStateContext, Provider, Button as RACButton, ButtonProps as RACButtonProps} from 'react-aria-components';\nimport {centerBaseline} from './CenterBaseline';\nimport {control, getAllowedOverrides, staticColor, StyleProps} from './style-utils' with {type: 'macro'};\nimport {createContext, forwardRef, ReactNode, useContext, useEffect, useState} from 'react';\nimport {FocusableRef, FocusableRefValue} from '@react-types/shared';\nimport {IconContext} from './Icon';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {pressScale} from './pressScale';\nimport {ProgressCircle} from './ProgressCircle';\nimport {SkeletonContext} from './Skeleton';\nimport {Text, TextContext} from './Content';\nimport {useFocusableRef} from '@react-spectrum/utils';\nimport {useFormProps} from './Form';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\ninterface ButtonStyleProps {\n /**\n * The [visual style](https://spectrum.adobe.com/page/button/#Options) of the button.\n *\n * @default 'primary'\n */\n variant?: 'primary' | 'secondary' | 'accent' | 'negative' | 'premium' | 'genai',\n /**\n * The background style of the Button.\n *\n * @default 'fill'\n */\n fillStyle?: 'fill' | 'outline',\n /**\n * The size of the Button.\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\nexport interface ButtonProps extends Omit<RACButtonProps, 'className' | 'style' | 'children' | 'onHover' | 'onHoverStart' | 'onHoverEnd' | 'onHoverChange' | 'onClick'>, StyleProps, ButtonStyleProps {\n /** The content to display in the Button. */\n children: ReactNode\n}\n\nexport interface LinkButtonProps extends Omit<LinkProps, 'className' | 'style' | 'children' | 'onClick'>, StyleProps, ButtonStyleProps {\n /** The content to display in the Button. */\n children: ReactNode\n}\n\nexport const ButtonContext = createContext<ContextValue<Partial<ButtonProps>, FocusableRefValue<HTMLButtonElement>>>(null);\nexport const LinkButtonContext = createContext<ContextValue<Partial<ButtonProps>, FocusableRefValue<HTMLAnchorElement>>>(null);\n\nconst button = style<ButtonRenderProps & ButtonStyleProps & {isStaticColor: boolean}>({\n ...focusRing(),\n ...staticColor(),\n ...control({shape: 'pill', wrap: true, icon: true}),\n position: 'relative',\n justifyContent: 'center',\n textAlign: 'start',\n fontWeight: 'bold',\n userSelect: 'none',\n width: 'fit',\n textDecoration: 'none', // for link buttons\n transition: 'default',\n borderStyle: 'solid',\n borderWidth: {\n fillStyle: {\n fill: 0,\n outline: 2\n },\n variant: {\n premium: 0,\n genai: 0\n }\n },\n borderColor: {\n variant: {\n primary: baseColor('gray-800'),\n secondary: baseColor('gray-300')\n },\n isDisabled: 'disabled',\n isStaticColor: {\n variant: {\n primary: baseColor('transparent-overlay-800'),\n secondary: baseColor('transparent-overlay-300')\n },\n isDisabled: 'transparent-overlay-300'\n },\n forcedColors: {\n default: 'ButtonBorder',\n isHovered: 'Highlight',\n isDisabled: 'GrayText'\n }\n },\n backgroundColor: {\n fillStyle: {\n fill: {\n variant: {\n primary: baseColor('neutral'),\n secondary: baseColor('gray-100'),\n accent: {\n default: lightDark('accent-900', 'accent-700'),\n isHovered: lightDark('accent-1000', 'accent-600'),\n isPressed: lightDark('accent-1000', 'accent-600'),\n isFocusVisible: lightDark('accent-1000', 'accent-600')\n },\n negative: {\n default: lightDark('negative-900', 'negative-700'),\n isHovered: lightDark('negative-1000', 'negative-600'),\n isPressed: lightDark('negative-1000', 'negative-600'),\n isFocusVisible: lightDark('negative-1000', 'negative-600')\n },\n premium: 'gray-100',\n genai: 'gray-100'\n },\n isDisabled: 'disabled'\n },\n outline: {\n variant: {\n premium: 'gray-100',\n genai: 'gray-100'\n },\n default: 'transparent',\n isHovered: 'gray-100',\n isPressed: 'gray-100',\n isFocusVisible: 'gray-100',\n isDisabled: {\n default: 'transparent',\n variant: {\n premium: 'gray-100',\n genai: 'gray-100'\n }\n }\n }\n },\n isStaticColor: {\n fillStyle: {\n fill: {\n variant: {\n primary: baseColor('transparent-overlay-800'),\n secondary: baseColor('transparent-overlay-100'),\n premium: 'transparent-overlay-100',\n genai: 'transparent-overlay-100'\n },\n isDisabled: 'transparent-overlay-100'\n },\n outline: {\n variant: {\n premium: 'transparent-overlay-100',\n genai: 'transparent-overlay-100'\n },\n default: 'transparent',\n isHovered: 'transparent-overlay-100',\n isPressed: 'transparent-overlay-100',\n isFocusVisible: 'transparent-overlay-100',\n isDisabled: {\n default: 'transparent',\n variant: {\n premium: 'transparent-overlay-100',\n genai: 'transparent-overlay-100'\n }\n }\n }\n }\n },\n forcedColors: {\n fillStyle: {\n fill: {\n default: 'ButtonText',\n isHovered: 'Highlight',\n isDisabled: 'GrayText'\n },\n outline: 'ButtonFace'\n }\n }\n },\n color: {\n fillStyle: {\n fill: {\n variant: {\n primary: 'gray-25',\n secondary: baseColor('neutral'),\n accent: 'white',\n negative: 'white',\n premium: 'white',\n genai: 'white'\n },\n isDisabled: 'disabled'\n },\n outline: {\n default: baseColor('neutral'),\n variant: {\n premium: 'white',\n genai: 'white'\n },\n isDisabled: 'disabled'\n }\n },\n isStaticColor: {\n fillStyle: {\n fill: {\n variant: {\n primary: 'auto',\n secondary: baseColor('transparent-overlay-800'),\n premium: 'white',\n genai: 'white'\n }\n },\n outline: {\n variant: {\n premium: 'white',\n genai: 'white'\n },\n default: baseColor('transparent-overlay-800')\n }\n },\n isDisabled: 'transparent-overlay-400'\n },\n forcedColors: {\n fillStyle: {\n fill: {\n default: 'ButtonFace',\n isDisabled: 'HighlightText'\n },\n outline: {\n default: 'ButtonText',\n isDisabled: 'GrayText'\n }\n }\n }\n },\n '--iconPrimary': {\n type: 'fill',\n value: 'currentColor'\n },\n outlineColor: {\n default: 'focus-ring',\n isStaticColor: 'transparent-overlay-1000',\n forcedColors: 'Highlight'\n },\n forcedColorAdjust: 'none',\n disableTapHighlight: true\n}, getAllowedOverrides());\n\n// Put the gradient background on a separate element from the button to work around a Safari\n// bug where transitions of custom properties cause layout flickering if any properties use rems. 🤣\n// https://bugs.webkit.org/show_bug.cgi?id=285622\nconst gradient = style({\n position: 'absolute',\n inset: 0,\n zIndex: -1,\n transition: 'default',\n borderRadius: 'inherit',\n backgroundImage: {\n variant: {\n premium: {\n default: linearGradient('to bottom right', ['fuchsia-900', 0], ['indigo-900', 66], ['blue-900', 100]),\n isHovered: linearGradient('to bottom right', ['fuchsia-1000', 0], ['indigo-1000', 66], ['blue-1000', 100]),\n isPressed: linearGradient('to bottom right', ['fuchsia-1000', 0], ['indigo-1000', 66], ['blue-1000', 100]),\n isFocusVisible: linearGradient('to bottom right', ['fuchsia-1000', 0], ['indigo-1000', 66], ['blue-1000', 100])\n },\n genai: {\n default: linearGradient('to bottom right', ['red-900', 0], ['magenta-900', 33], ['indigo-900', 100]),\n isHovered: linearGradient('to bottom right', ['red-1000', 0], ['magenta-1000', 33], ['indigo-1000', 100]),\n isPressed: linearGradient('to bottom right', ['red-1000', 0], ['magenta-1000', 33], ['indigo-1000', 100]),\n isFocusVisible: linearGradient('to bottom right', ['red-1000', 0], ['magenta-1000', 33], ['indigo-1000', 100])\n }\n },\n isDisabled: 'none',\n forcedColors: 'none'\n },\n // Force gradient colors to remain static between light and dark theme.\n colorScheme: {\n variant: {\n premium: 'light',\n genai: 'light'\n }\n }\n});\n\n/**\n * Buttons allow users to perform an action.\n * They have multiple styles for various needs, and are ideal for calling attention to\n * where a user needs to do something in order to move forward in a flow.\n */\nexport const Button = forwardRef(function Button(props: ButtonProps, ref: FocusableRef<HTMLButtonElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, ButtonContext);\n props = useFormProps(props);\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/s2');\n let {\n isPending,\n variant = 'primary',\n fillStyle = 'fill',\n size = 'M',\n staticColor\n } = props;\n let domRef = useFocusableRef(ref);\n let overlayTriggerState = useContext(OverlayTriggerStateContext);\n\n let [isProgressVisible, setIsProgressVisible] = useState(false);\n useEffect(() => {\n let timeout: ReturnType<typeof setTimeout>;\n\n if (isPending) {\n // Start timer when isPending is set to true.\n timeout = setTimeout(() => {\n setIsProgressVisible(true);\n }, 1000);\n } else {\n // Exit loading state when isPending is set to false. */\n setIsProgressVisible(false);\n }\n return () => {\n // Clean up on unmount or when user removes isPending prop before entering loading state.\n clearTimeout(timeout);\n };\n }, [isPending]);\n\n return (\n <RACButton\n {...props}\n ref={domRef}\n style={pressScale(domRef, props.UNSAFE_style)}\n className={renderProps => (props.UNSAFE_className || '') + button({\n ...renderProps,\n // Retain hover styles when an overlay is open.\n isHovered: renderProps.isHovered || overlayTriggerState?.isOpen || false,\n isDisabled: renderProps.isDisabled || isProgressVisible,\n variant,\n fillStyle,\n size,\n staticColor,\n isStaticColor: !!staticColor\n }, props.styles)}>\n {(renderProps) => (<>\n {variant === 'genai' || variant === 'premium'\n ? (\n <span\n className={gradient({\n ...renderProps,\n // Retain hover styles when an overlay is open.\n isHovered: renderProps.isHovered || overlayTriggerState?.isOpen || false,\n isDisabled: renderProps.isDisabled || isProgressVisible,\n variant\n })} />\n )\n : null}\n <Provider\n values={[\n [SkeletonContext, null],\n [TextContext, {\n styles: style({\n paddingY: '--labelPadding',\n order: 1,\n opacity: {\n default: 1,\n isProgressVisible: 0\n }\n })({isProgressVisible}),\n // @ts-ignore data-attributes allowed on all JSX elements, but adding to DOMProps has been problematic in the past\n 'data-rsp-slot': 'text'\n }],\n [IconContext, {\n render: centerBaseline({slot: 'icon', styles: style({order: 0})}),\n styles: style({\n size: fontRelative(20),\n marginStart: '--iconMargin',\n flexShrink: 0,\n opacity: {\n default: 1,\n isProgressVisible: 0\n }\n })({isProgressVisible})\n }]\n ]}>\n {typeof props.children === 'string' ? <Text>{props.children}</Text> : props.children}\n {isPending &&\n <div\n className={style({\n position: 'absolute',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n opacity: {\n default: 0,\n isProgressVisible: 1\n }\n })({isProgressVisible, isPending})}>\n <ProgressCircle\n isIndeterminate\n aria-label={stringFormatter.format('button.pending')}\n size=\"S\"\n staticColor={staticColor}\n styles={style({\n size: {\n size: {\n S: 14,\n M: 18,\n L: 20,\n XL: 24\n }\n }\n })({size})} />\n </div>\n }\n </Provider>\n </>)}\n </RACButton>\n );\n});\n\n/**\n * A LinkButton combines the functionality of a link with the appearance of a button. Useful for allowing users to navigate to another page.\n */\nexport const LinkButton = forwardRef(function LinkButton(props: LinkButtonProps, ref: FocusableRef<HTMLAnchorElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, LinkButtonContext);\n props = useFormProps(props);\n let domRef = useFocusableRef(ref);\n let overlayTriggerState = useContext(OverlayTriggerStateContext);\n\n return (\n <Link\n {...props}\n ref={domRef}\n style={pressScale(domRef, props.UNSAFE_style)}\n className={renderProps => (props.UNSAFE_className || '') + button({\n ...renderProps,\n // Retain hover styles when an overlay is open.\n isHovered: renderProps.isHovered || overlayTriggerState?.isOpen || false,\n variant: props.variant || 'primary',\n fillStyle: props.fillStyle || 'fill',\n size: props.size || 'M',\n staticColor: props.staticColor,\n isStaticColor: !!props.staticColor,\n isPending: false\n }, props.styles)}>\n <Provider\n values={[\n [SkeletonContext, null],\n [TextContext, {\n styles: style({paddingY: '--labelPadding', order: 1}),\n // @ts-ignore data-attributes allowed on all JSX elements, but adding to DOMProps has been problematic in the past\n 'data-rsp-slot': 'text'\n }],\n [IconContext, {\n render: centerBaseline({slot: 'icon', styles: style({order: 0})}),\n styles: style({size: fontRelative(20), marginStart: '--iconMargin', flexShrink: 0})\n }]\n ]}>\n {typeof props.children === 'string' ? <Text>{props.children}</Text> : props.children}\n </Provider>\n </Link>\n );\n});\n"],"names":[],"version":3,"file":"Button.mjs.map"}
@@ -40,27 +40,27 @@ const $e1016b8947dbadb8$var$buttongroup = function anonymous(props, overrides) {
40
40
  if (p[1] === "_P") position = true;
41
41
  rules += p[0];
42
42
  }
43
- rules += ' sh9';
44
- if (!position) rules += ' _Pc9';
45
- if (props.size === "XL") rules += ' Ug9';
46
- else if (props.size === "L") rules += ' Ug9';
47
- else if (props.size === "M") rules += ' Ug9';
48
- else if (props.size === "S") rules += ' Ue9';
49
- if (props.size === "XL") rules += ' qg9';
50
- else if (props.size === "L") rules += ' qg9';
51
- else if (props.size === "M") rules += ' qg9';
52
- else if (props.size === "S") rules += ' qe9';
53
- if (props.orientation === "vertical") rules += ' _ta9';
54
- else rules += ' _tc9';
43
+ rules += ' sh91';
44
+ if (!position) rules += ' _Pc91';
45
+ if (props.size === "XL") rules += ' Ug91';
46
+ else if (props.size === "L") rules += ' Ug91';
47
+ else if (props.size === "M") rules += ' Ug91';
48
+ else if (props.size === "S") rules += ' Ue91';
49
+ if (props.size === "XL") rules += ' qg91';
50
+ else if (props.size === "L") rules += ' qg91';
51
+ else if (props.size === "M") rules += ' qg91';
52
+ else if (props.size === "S") rules += ' qe91';
53
+ if (props.orientation === "vertical") rules += ' _ta91';
54
+ else rules += ' _tc91';
55
55
  if (props.orientation === "vertical") {
56
- if (props.align === "center") rules += ' eb9';
57
- else if (props.align === "end") rules += ' ec9';
58
- else rules += ' ed9';
59
- } else rules += ' eb9';
56
+ if (props.align === "center") rules += ' eb91';
57
+ else if (props.align === "end") rules += ' ec91';
58
+ else rules += ' ed91';
59
+ } else rules += ' eb91';
60
60
  if (props.orientation === "vertical") {
61
- if (props.align === "center") rules += ' _Ca9';
62
- else if (props.align === "end") rules += ' _Cb9';
63
- else rules += ' _Cg9';
61
+ if (props.align === "center") rules += ' _Ca91';
62
+ else if (props.align === "end") rules += ' _Cb91';
63
+ else rules += ' _Cg91';
64
64
  }
65
65
  return rules;
66
66
  };
@@ -114,7 +114,7 @@ const $e1016b8947dbadb8$export$69b1032f2ecdf404 = /*#__PURE__*/ (0, $5rFNy$react
114
114
  });
115
115
  if (props.isHidden) return null;
116
116
  let context = {
117
- styles: " _va9",
117
+ styles: " _va91",
118
118
  size: size,
119
119
  isDisabled: isDisabled
120
120
  };
@@ -1,61 +1,61 @@
1
1
  @layer _.a {
2
- .sh9 {
2
+ .sh91 {
3
3
  display: inline-flex;
4
4
  }
5
5
 
6
- ._Pc9 {
6
+ ._Pc91 {
7
7
  position: relative;
8
8
  }
9
9
 
10
- .Ue9 {
10
+ .Ue91 {
11
11
  row-gap: .5rem;
12
12
  }
13
13
 
14
- .Ug9 {
14
+ .Ug91 {
15
15
  row-gap: .75rem;
16
16
  }
17
17
 
18
- .qe9 {
18
+ .qe91 {
19
19
  column-gap: .5rem;
20
20
  }
21
21
 
22
- .qg9 {
22
+ .qg91 {
23
23
  column-gap: .75rem;
24
24
  }
25
25
 
26
- ._tc9 {
26
+ ._tc91 {
27
27
  flex-direction: row;
28
28
  }
29
29
 
30
- ._ta9 {
30
+ ._ta91 {
31
31
  flex-direction: column;
32
32
  }
33
33
 
34
- .ed9 {
34
+ .ed91 {
35
35
  align-items: start;
36
36
  }
37
37
 
38
- .ec9 {
38
+ .ec91 {
39
39
  align-items: end;
40
40
  }
41
41
 
42
- .eb9 {
42
+ .eb91 {
43
43
  align-items: center;
44
44
  }
45
45
 
46
- ._Cg9 {
46
+ ._Cg91 {
47
47
  justify-content: start;
48
48
  }
49
49
 
50
- ._Cb9 {
50
+ ._Cb91 {
51
51
  justify-content: end;
52
52
  }
53
53
 
54
- ._Ca9 {
54
+ ._Ca91 {
55
55
  justify-content: center;
56
56
  }
57
57
 
58
- ._va9 {
58
+ ._va91 {
59
59
  flex-shrink: 0;
60
60
  }
61
61
  }
@@ -33,27 +33,27 @@ const $472eaa9a9b344b9a$var$buttongroup = function anonymous(props, overrides) {
33
33
  if (p[1] === "_P") position = true;
34
34
  rules += p[0];
35
35
  }
36
- rules += ' sh9';
37
- if (!position) rules += ' _Pc9';
38
- if (props.size === "XL") rules += ' Ug9';
39
- else if (props.size === "L") rules += ' Ug9';
40
- else if (props.size === "M") rules += ' Ug9';
41
- else if (props.size === "S") rules += ' Ue9';
42
- if (props.size === "XL") rules += ' qg9';
43
- else if (props.size === "L") rules += ' qg9';
44
- else if (props.size === "M") rules += ' qg9';
45
- else if (props.size === "S") rules += ' qe9';
46
- if (props.orientation === "vertical") rules += ' _ta9';
47
- else rules += ' _tc9';
36
+ rules += ' sh91';
37
+ if (!position) rules += ' _Pc91';
38
+ if (props.size === "XL") rules += ' Ug91';
39
+ else if (props.size === "L") rules += ' Ug91';
40
+ else if (props.size === "M") rules += ' Ug91';
41
+ else if (props.size === "S") rules += ' Ue91';
42
+ if (props.size === "XL") rules += ' qg91';
43
+ else if (props.size === "L") rules += ' qg91';
44
+ else if (props.size === "M") rules += ' qg91';
45
+ else if (props.size === "S") rules += ' qe91';
46
+ if (props.orientation === "vertical") rules += ' _ta91';
47
+ else rules += ' _tc91';
48
48
  if (props.orientation === "vertical") {
49
- if (props.align === "center") rules += ' eb9';
50
- else if (props.align === "end") rules += ' ec9';
51
- else rules += ' ed9';
52
- } else rules += ' eb9';
49
+ if (props.align === "center") rules += ' eb91';
50
+ else if (props.align === "end") rules += ' ec91';
51
+ else rules += ' ed91';
52
+ } else rules += ' eb91';
53
53
  if (props.orientation === "vertical") {
54
- if (props.align === "center") rules += ' _Ca9';
55
- else if (props.align === "end") rules += ' _Cb9';
56
- else rules += ' _Cg9';
54
+ if (props.align === "center") rules += ' _Ca91';
55
+ else if (props.align === "end") rules += ' _Cb91';
56
+ else rules += ' _Cg91';
57
57
  }
58
58
  return rules;
59
59
  };
@@ -107,7 +107,7 @@ const $472eaa9a9b344b9a$export$69b1032f2ecdf404 = /*#__PURE__*/ (0, $bnJX2$forwa
107
107
  });
108
108
  if (props.isHidden) return null;
109
109
  let context = {
110
- styles: " _va9",
110
+ styles: " _va91",
111
111
  size: size,
112
112
  isDisabled: isDisabled
113
113
  };