@backstage/ui 0.18.0 → 0.19.0

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 (263) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/dist/analytics/getNodeText.esm.js.map +1 -1
  3. package/dist/analytics/useAnalytics.esm.js.map +1 -1
  4. package/dist/components/Accordion/Accordion.esm.js.map +1 -1
  5. package/dist/components/Accordion/Accordion.module.css.esm.js +2 -2
  6. package/dist/components/Accordion/Accordion.module.css.esm.js.map +1 -1
  7. package/dist/components/Accordion/definition.esm.js.map +1 -1
  8. package/dist/components/Alert/Alert.esm.js.map +1 -1
  9. package/dist/components/Alert/Alert.module.css.esm.js +2 -2
  10. package/dist/components/Alert/Alert.module.css.esm.js.map +1 -1
  11. package/dist/components/Alert/definition.esm.js.map +1 -1
  12. package/dist/components/Avatar/Avatar.esm.js.map +1 -1
  13. package/dist/components/Avatar/Avatar.module.css.esm.js +2 -2
  14. package/dist/components/Avatar/Avatar.module.css.esm.js.map +1 -1
  15. package/dist/components/Avatar/definition.esm.js.map +1 -1
  16. package/dist/components/Badge/Badge.esm.js.map +1 -1
  17. package/dist/components/Badge/Badge.module.css.esm.js +2 -2
  18. package/dist/components/Badge/Badge.module.css.esm.js.map +1 -1
  19. package/dist/components/Badge/definition.esm.js.map +1 -1
  20. package/dist/components/Box/Box.esm.js.map +1 -1
  21. package/dist/components/Box/Box.module.css.esm.js +2 -2
  22. package/dist/components/Box/Box.module.css.esm.js.map +1 -1
  23. package/dist/components/Box/definition.esm.js.map +1 -1
  24. package/dist/components/Button/Button.esm.js.map +1 -1
  25. package/dist/components/Button/Button.module.css.esm.js +2 -2
  26. package/dist/components/Button/Button.module.css.esm.js.map +1 -1
  27. package/dist/components/Button/definition.esm.js.map +1 -1
  28. package/dist/components/ButtonIcon/ButtonIcon.esm.js.map +1 -1
  29. package/dist/components/ButtonIcon/ButtonIcon.module.css.esm.js +2 -2
  30. package/dist/components/ButtonIcon/ButtonIcon.module.css.esm.js.map +1 -1
  31. package/dist/components/ButtonIcon/definition.esm.js.map +1 -1
  32. package/dist/components/ButtonLink/ButtonLink.esm.js.map +1 -1
  33. package/dist/components/ButtonLink/ButtonLink.module.css.esm.js +2 -2
  34. package/dist/components/ButtonLink/ButtonLink.module.css.esm.js.map +1 -1
  35. package/dist/components/ButtonLink/definition.esm.js.map +1 -1
  36. package/dist/components/Card/Card.esm.js.map +1 -1
  37. package/dist/components/Card/Card.module.css.esm.js +2 -2
  38. package/dist/components/Card/Card.module.css.esm.js.map +1 -1
  39. package/dist/components/Card/definition.esm.js.map +1 -1
  40. package/dist/components/Checkbox/Checkbox.esm.js.map +1 -1
  41. package/dist/components/Checkbox/Checkbox.module.css.esm.js +2 -2
  42. package/dist/components/Checkbox/Checkbox.module.css.esm.js.map +1 -1
  43. package/dist/components/Checkbox/definition.esm.js.map +1 -1
  44. package/dist/components/CheckboxGroup/CheckboxGroup.esm.js.map +1 -1
  45. package/dist/components/CheckboxGroup/CheckboxGroup.module.css.esm.js +2 -2
  46. package/dist/components/CheckboxGroup/CheckboxGroup.module.css.esm.js.map +1 -1
  47. package/dist/components/CheckboxGroup/definition.esm.js.map +1 -1
  48. package/dist/components/Combobox/Combobox.esm.js +72 -10
  49. package/dist/components/Combobox/Combobox.esm.js.map +1 -1
  50. package/dist/components/Combobox/Combobox.module.css.esm.js +2 -2
  51. package/dist/components/Combobox/Combobox.module.css.esm.js.map +1 -1
  52. package/dist/components/Combobox/ComboboxInput.esm.js.map +1 -1
  53. package/dist/components/Combobox/ComboboxItem.esm.js.map +1 -1
  54. package/dist/components/Combobox/ComboboxListBox.esm.js +11 -34
  55. package/dist/components/Combobox/ComboboxListBox.esm.js.map +1 -1
  56. package/dist/components/Combobox/definition.esm.js +1 -1
  57. package/dist/components/Combobox/definition.esm.js.map +1 -1
  58. package/dist/components/Combobox/useAsyncComboboxState.esm.js.map +1 -1
  59. package/dist/components/Container/Container.esm.js.map +1 -1
  60. package/dist/components/Container/Container.module.css.esm.js +2 -2
  61. package/dist/components/Container/Container.module.css.esm.js.map +1 -1
  62. package/dist/components/Container/definition.esm.js.map +1 -1
  63. package/dist/components/DatePicker/DatePicker.esm.js.map +1 -1
  64. package/dist/components/DatePicker/DatePicker.module.css.esm.js +2 -2
  65. package/dist/components/DatePicker/DatePicker.module.css.esm.js.map +1 -1
  66. package/dist/components/DatePicker/DatePickerCalendar.esm.js.map +1 -1
  67. package/dist/components/DatePicker/DatePickerGroup.esm.js.map +1 -1
  68. package/dist/components/DatePicker/definition.esm.js.map +1 -1
  69. package/dist/components/DateRangePicker/DateRangePicker.esm.js.map +1 -1
  70. package/dist/components/DateRangePicker/DateRangePicker.module.css.esm.js +2 -2
  71. package/dist/components/DateRangePicker/DateRangePicker.module.css.esm.js.map +1 -1
  72. package/dist/components/DateRangePicker/DateRangePickerCalendar.esm.js.map +1 -1
  73. package/dist/components/DateRangePicker/DateRangePickerGroup.esm.js.map +1 -1
  74. package/dist/components/DateRangePicker/definition.esm.js.map +1 -1
  75. package/dist/components/Dialog/Dialog.esm.js.map +1 -1
  76. package/dist/components/Dialog/Dialog.module.css.esm.js +2 -2
  77. package/dist/components/Dialog/Dialog.module.css.esm.js.map +1 -1
  78. package/dist/components/Dialog/definition.esm.js.map +1 -1
  79. package/dist/components/FieldError/FieldError.esm.js.map +1 -1
  80. package/dist/components/FieldError/FieldError.module.css.esm.js +2 -2
  81. package/dist/components/FieldError/FieldError.module.css.esm.js.map +1 -1
  82. package/dist/components/FieldError/definition.esm.js.map +1 -1
  83. package/dist/components/FieldLabel/FieldLabel.esm.js.map +1 -1
  84. package/dist/components/FieldLabel/FieldLabel.module.css.esm.js +2 -2
  85. package/dist/components/FieldLabel/FieldLabel.module.css.esm.js.map +1 -1
  86. package/dist/components/FieldLabel/definition.esm.js.map +1 -1
  87. package/dist/components/Flex/Flex.esm.js.map +1 -1
  88. package/dist/components/Flex/Flex.module.css.esm.js +2 -2
  89. package/dist/components/Flex/Flex.module.css.esm.js.map +1 -1
  90. package/dist/components/Flex/definition.esm.js.map +1 -1
  91. package/dist/components/FullPage/FullPage.esm.js.map +1 -1
  92. package/dist/components/FullPage/FullPage.module.css.esm.js +2 -2
  93. package/dist/components/FullPage/FullPage.module.css.esm.js.map +1 -1
  94. package/dist/components/FullPage/definition.esm.js.map +1 -1
  95. package/dist/components/Grid/Grid.esm.js.map +1 -1
  96. package/dist/components/Grid/Grid.module.css.esm.js +2 -2
  97. package/dist/components/Grid/Grid.module.css.esm.js.map +1 -1
  98. package/dist/components/Grid/definition.esm.js.map +1 -1
  99. package/dist/components/Header/Header.esm.js.map +1 -1
  100. package/dist/components/Header/Header.module.css.esm.js +2 -2
  101. package/dist/components/Header/Header.module.css.esm.js.map +1 -1
  102. package/dist/components/Header/HeaderMetadataStatus.esm.js.map +1 -1
  103. package/dist/components/Header/HeaderMetadataStatus.module.css.esm.js +2 -2
  104. package/dist/components/Header/HeaderMetadataStatus.module.css.esm.js.map +1 -1
  105. package/dist/components/Header/HeaderMetadataUsers.esm.js.map +1 -1
  106. package/dist/components/Header/HeaderMetadataUsers.module.css.esm.js +2 -2
  107. package/dist/components/Header/HeaderMetadataUsers.module.css.esm.js.map +1 -1
  108. package/dist/components/Header/HeaderNav.esm.js.map +1 -1
  109. package/dist/components/Header/HeaderNav.module.css.esm.js +2 -2
  110. package/dist/components/Header/HeaderNav.module.css.esm.js.map +1 -1
  111. package/dist/components/Header/HeaderNavDefinition.esm.js.map +1 -1
  112. package/dist/components/Header/HeaderNavIndicators.esm.js.map +1 -1
  113. package/dist/components/Header/definition.esm.js.map +1 -1
  114. package/dist/components/Link/Link.esm.js.map +1 -1
  115. package/dist/components/Link/Link.module.css.esm.js +2 -2
  116. package/dist/components/Link/Link.module.css.esm.js.map +1 -1
  117. package/dist/components/Link/definition.esm.js.map +1 -1
  118. package/dist/components/List/List.esm.js.map +1 -1
  119. package/dist/components/List/List.module.css.esm.js +2 -2
  120. package/dist/components/List/List.module.css.esm.js.map +1 -1
  121. package/dist/components/List/definition.esm.js.map +1 -1
  122. package/dist/components/Menu/Menu.esm.js.map +1 -1
  123. package/dist/components/Menu/Menu.module.css.esm.js +2 -2
  124. package/dist/components/Menu/Menu.module.css.esm.js.map +1 -1
  125. package/dist/components/Menu/definition.esm.js.map +1 -1
  126. package/dist/components/NumberField/NumberField.esm.js.map +1 -1
  127. package/dist/components/NumberField/NumberField.module.css.esm.js +2 -2
  128. package/dist/components/NumberField/NumberField.module.css.esm.js.map +1 -1
  129. package/dist/components/NumberField/definition.esm.js.map +1 -1
  130. package/dist/components/PasswordField/PasswordField.esm.js.map +1 -1
  131. package/dist/components/PasswordField/PasswordField.module.css.esm.js +2 -2
  132. package/dist/components/PasswordField/PasswordField.module.css.esm.js.map +1 -1
  133. package/dist/components/PasswordField/definition.esm.js.map +1 -1
  134. package/dist/components/PluginHeader/PluginHeader.esm.js.map +1 -1
  135. package/dist/components/PluginHeader/PluginHeader.module.css.esm.js +2 -2
  136. package/dist/components/PluginHeader/PluginHeader.module.css.esm.js.map +1 -1
  137. package/dist/components/PluginHeader/PluginHeaderBreadcrumbs.esm.js.map +1 -1
  138. package/dist/components/PluginHeader/definition.esm.js.map +1 -1
  139. package/dist/components/PluginHeader/useIsTruncated.esm.js.map +1 -1
  140. package/dist/components/Popover/Popover.esm.js.map +1 -1
  141. package/dist/components/Popover/Popover.module.css.esm.js +2 -2
  142. package/dist/components/Popover/Popover.module.css.esm.js.map +1 -1
  143. package/dist/components/Popover/definition.esm.js.map +1 -1
  144. package/dist/components/RadioGroup/RadioGroup.esm.js.map +1 -1
  145. package/dist/components/RadioGroup/RadioGroup.module.css.esm.js +2 -2
  146. package/dist/components/RadioGroup/RadioGroup.module.css.esm.js.map +1 -1
  147. package/dist/components/RadioGroup/definition.esm.js.map +1 -1
  148. package/dist/components/SearchAutocomplete/SearchAutocomplete.esm.js.map +1 -1
  149. package/dist/components/SearchAutocomplete/SearchAutocomplete.module.css.esm.js +2 -2
  150. package/dist/components/SearchAutocomplete/SearchAutocomplete.module.css.esm.js.map +1 -1
  151. package/dist/components/SearchAutocomplete/definition.esm.js.map +1 -1
  152. package/dist/components/SearchField/SearchField.esm.js.map +1 -1
  153. package/dist/components/SearchField/SearchField.module.css.esm.js +2 -2
  154. package/dist/components/SearchField/SearchField.module.css.esm.js.map +1 -1
  155. package/dist/components/SearchField/definition.esm.js.map +1 -1
  156. package/dist/components/Select/Select.esm.js.map +1 -1
  157. package/dist/components/Select/Select.module.css.esm.js +2 -2
  158. package/dist/components/Select/Select.module.css.esm.js.map +1 -1
  159. package/dist/components/Select/SelectContent.esm.js.map +1 -1
  160. package/dist/components/Select/SelectItem.esm.js.map +1 -1
  161. package/dist/components/Select/SelectListBox.esm.js.map +1 -1
  162. package/dist/components/Select/SelectTrigger.esm.js.map +1 -1
  163. package/dist/components/Select/definition.esm.js.map +1 -1
  164. package/dist/components/Skeleton/Skeleton.esm.js.map +1 -1
  165. package/dist/components/Skeleton/Skeleton.module.css.esm.js +2 -2
  166. package/dist/components/Skeleton/Skeleton.module.css.esm.js.map +1 -1
  167. package/dist/components/Skeleton/definition.esm.js.map +1 -1
  168. package/dist/components/Slider/Slider.esm.js.map +1 -1
  169. package/dist/components/Slider/Slider.module.css.esm.js +2 -2
  170. package/dist/components/Slider/Slider.module.css.esm.js.map +1 -1
  171. package/dist/components/Slider/definition.esm.js.map +1 -1
  172. package/dist/components/Switch/Switch.esm.js.map +1 -1
  173. package/dist/components/Switch/Switch.module.css.esm.js +2 -2
  174. package/dist/components/Switch/Switch.module.css.esm.js.map +1 -1
  175. package/dist/components/Switch/definition.esm.js.map +1 -1
  176. package/dist/components/Table/Table.module.css.esm.js +2 -2
  177. package/dist/components/Table/Table.module.css.esm.js.map +1 -1
  178. package/dist/components/Table/components/Cell.esm.js.map +1 -1
  179. package/dist/components/Table/components/CellProfile.esm.js.map +1 -1
  180. package/dist/components/Table/components/CellText.esm.js.map +1 -1
  181. package/dist/components/Table/components/Column.esm.js.map +1 -1
  182. package/dist/components/Table/components/Row.esm.js.map +1 -1
  183. package/dist/components/Table/components/Table.esm.js.map +1 -1
  184. package/dist/components/Table/components/TableBody.esm.js.map +1 -1
  185. package/dist/components/Table/components/TableBodySkeleton.esm.js.map +1 -1
  186. package/dist/components/Table/components/TableHeader.esm.js.map +1 -1
  187. package/dist/components/Table/components/TableRoot.esm.js.map +1 -1
  188. package/dist/components/Table/definition.esm.js.map +1 -1
  189. package/dist/components/Table/hooks/getEffectivePageSize.esm.js.map +1 -1
  190. package/dist/components/Table/hooks/useCompletePagination.esm.js.map +1 -1
  191. package/dist/components/Table/hooks/useCursorPagination.esm.js.map +1 -1
  192. package/dist/components/Table/hooks/useDebouncedReload.esm.js.map +1 -1
  193. package/dist/components/Table/hooks/useDebouncedValue.esm.js.map +1 -1
  194. package/dist/components/Table/hooks/useOffsetPagination.esm.js.map +1 -1
  195. package/dist/components/Table/hooks/usePageCache.esm.js.map +1 -1
  196. package/dist/components/Table/hooks/useQueryState.esm.js.map +1 -1
  197. package/dist/components/Table/hooks/useStableCallback.esm.js.map +1 -1
  198. package/dist/components/Table/hooks/useTable.esm.js.map +1 -1
  199. package/dist/components/TablePagination/TablePagination.esm.js.map +1 -1
  200. package/dist/components/TablePagination/TablePagination.module.css.esm.js +2 -2
  201. package/dist/components/TablePagination/TablePagination.module.css.esm.js.map +1 -1
  202. package/dist/components/TablePagination/definition.esm.js.map +1 -1
  203. package/dist/components/Tabs/Tabs.esm.js.map +1 -1
  204. package/dist/components/Tabs/Tabs.module.css.esm.js +2 -2
  205. package/dist/components/Tabs/Tabs.module.css.esm.js.map +1 -1
  206. package/dist/components/Tabs/TabsIndicators.esm.js.map +1 -1
  207. package/dist/components/Tabs/definition.esm.js.map +1 -1
  208. package/dist/components/TagGroup/TagGroup.esm.js.map +1 -1
  209. package/dist/components/TagGroup/TagGroup.module.css.esm.js +2 -2
  210. package/dist/components/TagGroup/TagGroup.module.css.esm.js.map +1 -1
  211. package/dist/components/TagGroup/definition.esm.js.map +1 -1
  212. package/dist/components/Text/Text.esm.js.map +1 -1
  213. package/dist/components/Text/Text.module.css.esm.js +2 -2
  214. package/dist/components/Text/Text.module.css.esm.js.map +1 -1
  215. package/dist/components/Text/definition.esm.js.map +1 -1
  216. package/dist/components/TextAreaField/TextAreaField.esm.js.map +1 -1
  217. package/dist/components/TextAreaField/TextAreaField.module.css.esm.js +2 -2
  218. package/dist/components/TextAreaField/TextAreaField.module.css.esm.js.map +1 -1
  219. package/dist/components/TextAreaField/definition.esm.js.map +1 -1
  220. package/dist/components/TextField/TextField.esm.js.map +1 -1
  221. package/dist/components/TextField/TextField.module.css.esm.js +2 -2
  222. package/dist/components/TextField/TextField.module.css.esm.js.map +1 -1
  223. package/dist/components/TextField/definition.esm.js.map +1 -1
  224. package/dist/components/ToggleButton/ToggleButton.esm.js.map +1 -1
  225. package/dist/components/ToggleButton/ToggleButton.module.css.esm.js +2 -2
  226. package/dist/components/ToggleButton/ToggleButton.module.css.esm.js.map +1 -1
  227. package/dist/components/ToggleButton/definition.esm.js.map +1 -1
  228. package/dist/components/ToggleButtonGroup/ToggleButtonGroup.esm.js.map +1 -1
  229. package/dist/components/ToggleButtonGroup/ToggleButtonGroup.module.css.esm.js +2 -2
  230. package/dist/components/ToggleButtonGroup/ToggleButtonGroup.module.css.esm.js.map +1 -1
  231. package/dist/components/ToggleButtonGroup/definition.esm.js.map +1 -1
  232. package/dist/components/Tooltip/Tooltip.esm.js.map +1 -1
  233. package/dist/components/Tooltip/Tooltip.module.css.esm.js +2 -2
  234. package/dist/components/Tooltip/Tooltip.module.css.esm.js.map +1 -1
  235. package/dist/components/Tooltip/definition.esm.js.map +1 -1
  236. package/dist/components/VisuallyHidden/VisuallyHidden.esm.js.map +1 -1
  237. package/dist/components/VisuallyHidden/VisuallyHidden.module.css.esm.js +2 -2
  238. package/dist/components/VisuallyHidden/VisuallyHidden.module.css.esm.js.map +1 -1
  239. package/dist/components/VisuallyHidden/definition.esm.js.map +1 -1
  240. package/dist/css/styles.css +39 -1
  241. package/dist/hooks/useBg.esm.js.map +1 -1
  242. package/dist/hooks/useBreakpoint.esm.js.map +1 -1
  243. package/dist/hooks/useCollectionAdapter.esm.js.map +1 -1
  244. package/dist/hooks/useDefinition/defineComponent.esm.js.map +1 -1
  245. package/dist/hooks/useDefinition/helpers.esm.js.map +1 -1
  246. package/dist/hooks/useDefinition/useDefinition.esm.js.map +1 -1
  247. package/dist/hooks/useDefinition/useDefinitionNavigation.esm.js.map +1 -1
  248. package/dist/hooks/useDelayedVisibility.esm.js.map +1 -1
  249. package/dist/hooks/useIsomorphicLayoutEffect.esm.js.map +1 -1
  250. package/dist/hooks/useResolvedHref.esm.js.map +1 -1
  251. package/dist/hooks/useTrackedSelectionKeys.esm.js.map +1 -1
  252. package/dist/index.d.ts +7 -2
  253. package/dist/navigation/BUIRoutingProvider.esm.js.map +1 -1
  254. package/dist/navigation/useNavigation.esm.js.map +1 -1
  255. package/dist/navigation/useRouting.esm.js.map +1 -1
  256. package/dist/node_modules_dist/style-inject/dist/style-inject.es.esm.js.map +1 -1
  257. package/dist/provider/BUIContext.esm.js.map +1 -1
  258. package/dist/provider/BUIProvider.esm.js.map +1 -1
  259. package/dist/utils/linkUtils.esm.js.map +1 -1
  260. package/dist/utils/selectableCollection.esm.js +13 -1
  261. package/dist/utils/selectableCollection.esm.js.map +1 -1
  262. package/dist/utils/utilityClassMap.esm.js.map +1 -1
  263. package/package.json +6 -6
package/CHANGELOG.md CHANGED
@@ -1,5 +1,50 @@
1
1
  # @backstage/ui
2
2
 
3
+ ## 0.19.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 4e7a710: Updated React Aria dependencies to React Aria Components 1.22.0, React Aria 3.53.0, and React Stately 3.51.0. Existing Checkbox, Radio, and Switch implementations are retained.
8
+
9
+ **Migration:**
10
+
11
+ `MenuSection` no longer accepts `disabledKeys`. Move `disabledKeys` to `Menu` or set `isDisabled` on the affected `MenuItem` components.
12
+
13
+ Programmatic clicks on Checkbox and Switch labels no longer toggle their selection. Target the input when activating these controls programmatically, and use a full pointer interaction when simulating label clicks in tests.
14
+
15
+ **Affected components:** Checkbox, Menu, Switch
16
+
17
+ ### Patch Changes
18
+
19
+ - 46659eb: The `--bui-bg-app` token now follows the page's `color-scheme` until a theme mode is set. While the app loads, the page background then matches a dark theme instead of showing as light. Browsers without `light-dark()` support keep the light value until the theme mode is set, as before.
20
+ - 6c9ed14: Fixed `Combobox` keyboard selection while filtering. With `search`, or with `items` and no `search`, the arrow keys now move through the matching options only, and Enter selects the highlighted one. Screen readers also announce the number of matching options. As with a `Combobox` without `search`, opening the list with the button or on focus shows every option until the user types. With `search.filter`, Escape and blur now restore the label of the selected option even when the filter excludes it. In that case, the number of options announced to screen readers still counts the hidden selected option.
21
+
22
+ **Affected components:** Combobox
23
+
24
+ - b313f2d: Added a `theme` CSS cascade layer between `components` and `utilities`. BUI leaves it empty: put your app's brand overrides in `@layer theme` to win over component styles without raising specificity, while utility props still take precedence. Existing styles are unaffected.
25
+
26
+ If your app already declares its own layer named `theme`, its rules now sit below BUI's utility classes instead of above them.
27
+
28
+ ## 0.19.0-next.0
29
+
30
+ ### Minor Changes
31
+
32
+ - 4e7a710: Updated React Aria dependencies to React Aria Components 1.22.0, React Aria 3.53.0, and React Stately 3.51.0. Existing Checkbox, Radio, and Switch implementations are retained.
33
+
34
+ **Migration:**
35
+
36
+ `MenuSection` no longer accepts `disabledKeys`. Move `disabledKeys` to `Menu` or set `isDisabled` on the affected `MenuItem` components.
37
+
38
+ Programmatic clicks on Checkbox and Switch labels no longer toggle their selection. Target the input when activating these controls programmatically, and use a full pointer interaction when simulating label clicks in tests.
39
+
40
+ **Affected components:** Checkbox, Menu, Switch
41
+
42
+ ### Patch Changes
43
+
44
+ - 6c9ed14: Fixed `Combobox` keyboard selection while filtering. With `search`, or with `items` and no `search`, the arrow keys now move through the matching options only, and Enter selects the highlighted one. Screen readers also announce the number of matching options. As with a `Combobox` without `search`, opening the list with the button or on focus shows every option until the user types. With `search.filter`, Escape and blur now restore the label of the selected option even when the filter excludes it. In that case, the number of options announced to screen readers still counts the hidden selected option.
45
+
46
+ **Affected components:** Combobox
47
+
3
48
  ## 0.18.0
4
49
 
5
50
  ### Minor Changes
@@ -1 +1 @@
1
- {"version":3,"file":"getNodeText.esm.js","sources":["../../src/analytics/getNodeText.ts"],"sourcesContent":["/*\n * Copyright 2026 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { type ReactNode, isValidElement, Children } from 'react';\n\n/**\n * Recursively extracts text content from a React node tree.\n * Returns undefined if no text content is found (e.g. icon-only children\n * or render functions).\n *\n * @public\n */\nexport function getNodeText(\n node: ReactNode | ((...args: any[]) => ReactNode),\n): string | undefined {\n if (typeof node === 'function') {\n return undefined;\n }\n if (Array.isArray(node)) {\n const text = Children.map(node, getNodeText)?.filter(Boolean).join(' ');\n return text || undefined;\n }\n if (isValidElement(node)) {\n return getNodeText(node.props.children);\n }\n if (typeof node === 'string' || typeof node === 'number') {\n return String(node);\n }\n return undefined;\n}\n"],"names":[],"mappings":";;AAyBO,SAAS,YACd,IAAA,EACoB;AACpB,EAAA,IAAI,OAAO,SAAS,UAAA,EAAY;AAC9B,IAAA,OAAO,MAAA;AAAA,EACT;AACA,EAAA,IAAI,KAAA,CAAM,OAAA,CAAQ,IAAI,CAAA,EAAG;AACvB,IAAA,MAAM,IAAA,GAAO,QAAA,CAAS,GAAA,CAAI,IAAA,EAAM,WAAW,GAAG,MAAA,CAAO,OAAO,CAAA,CAAE,IAAA,CAAK,GAAG,CAAA;AACtE,IAAA,OAAO,IAAA,IAAQ,MAAA;AAAA,EACjB;AACA,EAAA,IAAI,cAAA,CAAe,IAAI,CAAA,EAAG;AACxB,IAAA,OAAO,WAAA,CAAY,IAAA,CAAK,KAAA,CAAM,QAAQ,CAAA;AAAA,EACxC;AACA,EAAA,IAAI,OAAO,IAAA,KAAS,QAAA,IAAY,OAAO,SAAS,QAAA,EAAU;AACxD,IAAA,OAAO,OAAO,IAAI,CAAA;AAAA,EACpB;AACA,EAAA,OAAO,MAAA;AACT;;;;"}
1
+ {"version":3,"file":"getNodeText.esm.js","sources":["../../src/analytics/getNodeText.ts"],"sourcesContent":["/*\n * Copyright 2026 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { type ReactNode, isValidElement, Children } from 'react';\n\n/**\n * Recursively extracts text content from a React node tree.\n * Returns undefined if no text content is found (e.g. icon-only children\n * or render functions).\n *\n * @public\n */\nexport function getNodeText(\n node: ReactNode | ((...args: any[]) => ReactNode),\n): string | undefined {\n if (typeof node === 'function') {\n return undefined;\n }\n if (Array.isArray(node)) {\n const text = Children.map(node, getNodeText)?.filter(Boolean).join(' ');\n return text || undefined;\n }\n if (isValidElement(node)) {\n return getNodeText(node.props.children);\n }\n if (typeof node === 'string' || typeof node === 'number') {\n return String(node);\n }\n return undefined;\n}\n"],"names":[],"mappings":";;AAyBO,SAAS,YACd,IAAA,EACoB;AACpB,EAAA,IAAI,OAAO,SAAS,UAAA,EAAY;AAC9B,IAAA,OAAO,MAAA;AAAA,EACT;AACA,EAAA,IAAI,KAAA,CAAM,OAAA,CAAQ,IAAI,CAAA,EAAG;AACvB,IAAA,MAAM,IAAA,GAAO,QAAA,CAAS,GAAA,CAAI,IAAA,EAAM,WAAW,GAAG,MAAA,CAAO,OAAO,CAAA,CAAE,IAAA,CAAK,GAAG,CAAA;AACtE,IAAA,OAAO,IAAA,IAAQ,MAAA;AAAA,EACjB;AACA,EAAA,IAAI,cAAA,CAAe,IAAI,CAAA,EAAG;AACxB,IAAA,OAAO,WAAA,CAAY,IAAA,CAAK,KAAA,CAAM,QAAQ,CAAA;AAAA,EACxC;AACA,EAAA,IAAI,OAAO,IAAA,KAAS,QAAA,IAAY,OAAO,SAAS,QAAA,EAAU;AACxD,IAAA,OAAO,OAAO,IAAI,CAAA;AAAA,EACpB;AACA,EAAA,OAAO,MAAA;AACT;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useAnalytics.esm.js","sources":["../../src/analytics/useAnalytics.ts"],"sourcesContent":["/*\n * Copyright 2026 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useContext, useRef } from 'react';\nimport type { AnalyticsTracker, UseAnalyticsFn } from './types';\nimport { BUIContext } from '../provider/BUIContext';\n\n/** @internal */\nexport const noopTracker: AnalyticsTracker = {\n captureEvent: () => {},\n};\n\nconst noopUseAnalytics: UseAnalyticsFn = () => noopTracker;\n\n/**\n * Returns an AnalyticsTracker for capturing analytics events.\n *\n * By default returns a noop tracker. When a `BUIProvider` is present\n * in the tree, returns the tracker provided by the consumer's hook.\n *\n * @public\n */\nexport function useAnalytics(): AnalyticsTracker {\n const context = useContext(BUIContext);\n const ctx = context?.atVersion(2) ?? context?.atVersion(1);\n const impl = ctx?.useAnalytics ?? noopUseAnalytics;\n\n if (process.env.NODE_ENV !== 'production') {\n const prevImpl = useRef(impl);\n if (\n (prevImpl.current === noopUseAnalytics) !==\n (impl === noopUseAnalytics)\n ) {\n throw new Error(\n '@backstage/ui: The analytics hook changed between a noop and a real ' +\n 'implementation. Ensure <BUIProvider> wraps all BUI components from first render.',\n );\n }\n prevImpl.current = impl;\n }\n\n return impl();\n}\n"],"names":[],"mappings":";;;AAqBO,MAAM,WAAA,GAAgC;AAAA,EAC3C,cAAc,MAAM;AAAA,EAAC;AACvB;AAEA,MAAM,mBAAmC,MAAM,WAAA;AAUxC,SAAS,YAAA,GAAiC;AAC/C,EAAA,MAAM,OAAA,GAAU,WAAW,UAAU,CAAA;AACrC,EAAA,MAAM,MAAM,OAAA,EAAS,SAAA,CAAU,CAAC,CAAA,IAAK,OAAA,EAAS,UAAU,CAAC,CAAA;AACzD,EAAA,MAAM,IAAA,GAAO,KAAK,YAAA,IAAgB,gBAAA;AAElC,EAAA,IAAI,OAAA,CAAQ,GAAA,CAAI,QAAA,KAAa,YAAA,EAAc;AACzC,IAAA,MAAM,QAAA,GAAW,OAAO,IAAI,CAAA;AAC5B,IAAA,IACG,QAAA,CAAS,OAAA,KAAY,gBAAA,MACrB,IAAA,KAAS,gBAAA,CAAA,EACV;AACA,MAAA,MAAM,IAAI,KAAA;AAAA,QACR;AAAA,OAEF;AAAA,IACF;AACA,IAAA,QAAA,CAAS,OAAA,GAAU,IAAA;AAAA,EACrB;AAEA,EAAA,OAAO,IAAA,EAAK;AACd;;;;"}
1
+ {"version":3,"file":"useAnalytics.esm.js","sources":["../../src/analytics/useAnalytics.ts"],"sourcesContent":["/*\n * Copyright 2026 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useContext, useRef } from 'react';\nimport type { AnalyticsTracker, UseAnalyticsFn } from './types';\nimport { BUIContext } from '../provider/BUIContext';\n\n/** @internal */\nexport const noopTracker: AnalyticsTracker = {\n captureEvent: () => {},\n};\n\nconst noopUseAnalytics: UseAnalyticsFn = () => noopTracker;\n\n/**\n * Returns an AnalyticsTracker for capturing analytics events.\n *\n * By default returns a noop tracker. When a `BUIProvider` is present\n * in the tree, returns the tracker provided by the consumer's hook.\n *\n * @public\n */\nexport function useAnalytics(): AnalyticsTracker {\n const context = useContext(BUIContext);\n const ctx = context?.atVersion(2) ?? context?.atVersion(1);\n const impl = ctx?.useAnalytics ?? noopUseAnalytics;\n\n if (process.env.NODE_ENV !== 'production') {\n const prevImpl = useRef(impl);\n if (\n (prevImpl.current === noopUseAnalytics) !==\n (impl === noopUseAnalytics)\n ) {\n throw new Error(\n '@backstage/ui: The analytics hook changed between a noop and a real ' +\n 'implementation. Ensure <BUIProvider> wraps all BUI components from first render.',\n );\n }\n prevImpl.current = impl;\n }\n\n return impl();\n}\n"],"names":[],"mappings":";;;AAqBO,MAAM,WAAA,GAAgC;AAAA,EAC3C,cAAc,MAAM;AAAA,EAAC;AACvB;AAEA,MAAM,mBAAmC,MAAM,WAAA;AAUxC,SAAS,YAAA,GAAiC;AAC/C,EAAA,MAAM,OAAA,GAAU,WAAW,UAAU,CAAA;AACrC,EAAA,MAAM,MAAM,OAAA,EAAS,SAAA,CAAU,CAAC,CAAA,IAAK,OAAA,EAAS,UAAU,CAAC,CAAA;AACzD,EAAA,MAAM,IAAA,GAAO,KAAK,YAAA,IAAgB,gBAAA;AAElC,EAAA,IAAI,OAAA,CAAQ,GAAA,CAAI,QAAA,KAAa,YAAA,EAAc;AACzC,IAAA,MAAM,QAAA,GAAW,OAAO,IAAI,CAAA;AAC5B,IAAA,IACG,QAAA,CAAS,OAAA,KAAY,gBAAA,MACrB,IAAA,KAAS,gBAAA,CAAA,EACV;AACA,MAAA,MAAM,IAAI,KAAA;AAAA,QACR;AAAA,OAEF;AAAA,IACF;AACA,IAAA,QAAA,CAAS,OAAA,GAAU,IAAA;AAAA,EACrB;AAEA,EAAA,OAAO,IAAA,EAAK;AACd;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Accordion.esm.js","sources":["../../../src/components/Accordion/Accordion.tsx"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { forwardRef, Ref } from 'react';\nimport {\n Disclosure as RADisclosure,\n Button as RAButton,\n DisclosurePanel as RADisclosurePanel,\n DisclosureGroup as RADisclosureGroup,\n Heading as RAHeading,\n} from 'react-aria-components';\nimport { RiArrowDownSLine } from '@remixicon/react';\nimport type {\n AccordionProps,\n AccordionTriggerProps,\n AccordionPanelProps,\n AccordionGroupProps,\n} from './types';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport {\n AccordionDefinition,\n AccordionTriggerDefinition,\n AccordionPanelDefinition,\n AccordionGroupDefinition,\n} from './definition';\nimport { Flex } from '../Flex';\n\n/**\n * A collapsible section that reveals or hides its content when the trigger is activated.\n *\n * @public\n */\nexport const Accordion = forwardRef(\n (props: AccordionProps, ref: Ref<React.ElementRef<typeof RADisclosure>>) => {\n const { ownProps, restProps, dataAttributes } = useDefinition(\n AccordionDefinition,\n props,\n );\n const { classes, childrenWithBgProvider } = ownProps;\n\n return (\n <RADisclosure\n ref={ref}\n className={classes.root}\n {...dataAttributes}\n {...restProps}\n >\n {childrenWithBgProvider}\n </RADisclosure>\n );\n },\n);\n\nAccordion.displayName = 'Accordion';\n\n/**\n * The clickable heading that toggles the visibility of an accordion panel.\n *\n * @public\n */\nexport const AccordionTrigger = forwardRef(\n (\n props: AccordionTriggerProps,\n ref: Ref<React.ElementRef<typeof RAHeading>>,\n ) => {\n const { ownProps, restProps, dataAttributes } = useDefinition(\n AccordionTriggerDefinition,\n props,\n );\n const { classes, title, subtitle, children } = ownProps;\n\n return (\n <RAHeading\n ref={ref}\n className={classes.root}\n {...dataAttributes}\n {...restProps}\n >\n <RAButton slot=\"trigger\" className={classes.button}>\n {children ? (\n children\n ) : (\n <Flex gap=\"2\" align=\"center\">\n <span className={classes.title}>{title}</span>\n {subtitle && <span className={classes.subtitle}>{subtitle}</span>}\n </Flex>\n )}\n\n <RiArrowDownSLine className={classes.icon} size={16} />\n </RAButton>\n </RAHeading>\n );\n },\n);\n\nAccordionTrigger.displayName = 'AccordionTrigger';\n\n/**\n * The content area of an accordion that is revealed when the trigger is activated.\n *\n * @public\n */\nexport const AccordionPanel = forwardRef(\n (\n props: AccordionPanelProps,\n ref: Ref<React.ElementRef<typeof RADisclosurePanel>>,\n ) => {\n const { ownProps, restProps, dataAttributes } = useDefinition(\n AccordionPanelDefinition,\n props,\n );\n const { classes } = ownProps;\n\n return (\n <RADisclosurePanel\n ref={ref}\n className={classes.root}\n {...dataAttributes}\n {...restProps}\n />\n );\n },\n);\n\nAccordionPanel.displayName = 'AccordionPanel';\n\n/**\n * A container that groups multiple Accordion items, optionally allowing several panels to be expanded at once.\n *\n * @public\n */\nexport const AccordionGroup = forwardRef(\n (\n props: AccordionGroupProps,\n ref: Ref<React.ElementRef<typeof RADisclosureGroup>>,\n ) => {\n const { ownProps, restProps, dataAttributes } = useDefinition(\n AccordionGroupDefinition,\n props,\n );\n const { classes, allowsMultiple } = ownProps;\n\n return (\n <RADisclosureGroup\n ref={ref}\n allowsMultipleExpanded={allowsMultiple}\n className={classes.root}\n {...dataAttributes}\n {...restProps}\n />\n );\n },\n);\n\nAccordionGroup.displayName = 'A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AClB,GAAG,cAAA;AAAA,QACH,GAAG;AAAA;AAAA,KACN;AAAA,EAEJ;AACF;AAEA,cAAA,CAAe,WAAA,GAAc,gBAAA;;;;"}
1
+ {"version":3,"file":"Accordion.esm.js","sources":["../../../src/components/Accordion/Accordion.tsx"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { forwardRef, Ref } from 'react';\nimport {\n Disclosure as RADisclosure,\n Button as RAButton,\n DisclosurePanel as RADisclosurePanel,\n DisclosureGroup as RADisclosureGroup,\n Heading as RAHeading,\n} from 'react-aria-components';\nimport { RiArrowDownSLine } from '@remixicon/react';\nimport type {\n AccordionProps,\n AccordionTriggerProps,\n AccordionPanelProps,\n AccordionGroupProps,\n} from './types';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport {\n AccordionDefinition,\n AccordionTriggerDefinition,\n AccordionPanelDefinition,\n AccordionGroupDefinition,\n} from './definition';\nimport { Flex } from '../Flex';\n\n/**\n * A collapsible section that reveals or hides its content when the trigger is activated.\n *\n * @public\n */\nexport const Accordion = forwardRef(\n (props: AccordionProps, ref: Ref<React.ElementRef<typeof RADisclosure>>) => {\n const { ownProps, restProps, dataAttributes } = useDefinition(\n AccordionDefinition,\n props,\n );\n const { classes, childrenWithBgProvider } = ownProps;\n\n return (\n <RADisclosure\n ref={ref}\n className={classes.root}\n {...dataAttributes}\n {...restProps}\n >\n {childrenWithBgProvider}\n </RADisclosure>\n );\n },\n);\n\nAccordion.displayName = 'Accordion';\n\n/**\n * The clickable heading that toggles the visibility of an accordion panel.\n *\n * @public\n */\nexport const AccordionTrigger = forwardRef(\n (\n props: AccordionTriggerProps,\n ref: Ref<React.ElementRef<typeof RAHeading>>,\n ) => {\n const { ownProps, restProps, dataAttributes } = useDefinition(\n AccordionTriggerDefinition,\n props,\n );\n const { classes, title, subtitle, children } = ownProps;\n\n return (\n <RAHeading\n ref={ref}\n className={classes.root}\n {...dataAttributes}\n {...restProps}\n >\n <RAButton slot=\"trigger\" className={classes.button}>\n {children ? (\n children\n ) : (\n <Flex gap=\"2\" align=\"center\">\n <span className={classes.title}>{title}</span>\n {subtitle && <span className={classes.subtitle}>{subtitle}</span>}\n </Flex>\n )}\n\n <RiArrowDownSLine className={classes.icon} size={16} />\n </RAButton>\n </RAHeading>\n );\n },\n);\n\nAccordionTrigger.displayName = 'AccordionTrigger';\n\n/**\n * The content area of an accordion that is revealed when the trigger is activated.\n *\n * @public\n */\nexport const AccordionPanel = forwardRef(\n (\n props: AccordionPanelProps,\n ref: Ref<React.ElementRef<typeof RADisclosurePanel>>,\n ) => {\n const { ownProps, restProps, dataAttributes } = useDefinition(\n AccordionPanelDefinition,\n props,\n );\n const { classes } = ownProps;\n\n return (\n <RADisclosurePanel\n ref={ref}\n className={classes.root}\n {...dataAttributes}\n {...restProps}\n />\n );\n },\n);\n\nAccordionPanel.displayName = 'AccordionPanel';\n\n/**\n * A container that groups multiple Accordion items, optionally allowing several panels to be expanded at once.\n *\n * @public\n */\nexport const AccordionGroup = forwardRef(\n (\n props: AccordionGroupProps,\n ref: Ref<React.ElementRef<typeof RADisclosureGroup>>,\n ) => {\n const { ownProps, restProps, dataAttributes } = useDefinition(\n AccordionGroupDefinition,\n props,\n );\n const { classes, allowsMultiple } = ownProps;\n\n return (\n <RADisclosureGroup\n ref={ref}\n allowsMultipleExpanded={allowsMultiple}\n className={classes.root}\n {...dataAttributes}\n {...restProps}\n />\n );\n },\n);\n\nAccordionGroup.displayName = 'AccordionGroup';\n"],"names":["RADisclosure","RAHeading","RAButton","RADisclosurePanel","RADisclosureGroup"],"mappings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AEA,cAAA,CAAe,WAAA,GAAc,gBAAA;;"}
@@ -1,7 +1,7 @@
1
1
  import styleInject from '../../node_modules_dist/style-inject/dist/style-inject.es.esm.js';
2
2
 
3
- var css_248z = "/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n@layer tokens, base, components, utilities;\n\n@layer components {\n .Accordion_bui-Accordion__c1521aeef0 {\n width: 100%;\n border-radius: var(--bui-radius-3);\n padding: var(--bui-space-3);\n }\n\n .Accordion_bui-Accordion__c1521aeef0[data-bg='danger'],\n .Accordion_bui-Accordion__c1521aeef0[data-bg='warning'],\n .Accordion_bui-Accordion__c1521aeef0[data-bg='success'] {\n background-color: transparent;\n }\n\n .Accordion_bui-AccordionTrigger__c1521aeef0 {\n all: unset;\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: space-between;\n }\n\n .Accordion_bui-AccordionTriggerButton__c1521aeef0 {\n all: unset;\n width: 100%;\n color: var(--bui-fg-primary);\n display: flex;\n align-items: center;\n justify-content: space-between;\n cursor: pointer;\n text-align: left;\n\n &[data-focus-visible] {\n outline: none;\n transition: none;\n box-shadow: inset 0 0 0 2px var(--bui-ring);\n }\n\n &[data-disabled='true'] {\n background-color: transparent;\n color: var(--bui-fg-disabled);\n cursor: not-allowed;\n }\n }\n\n .Accordion_bui-AccordionTriggerTitle__c1521aeef0 {\n font-size: var(--bui-font-size-4);\n font-weight: var(--bui-font-weight-bold);\n line-height: 140%;\n }\n\n .Accordion_bui-AccordionTriggerSubtitle__c1521aeef0 {\n font-size: var(--bui-font-size-2);\n line-height: 140%;\n color: var(--bui-fg-secondary);\n }\n\n .Accordion_bui-AccordionTriggerIcon__c1521aeef0 {\n transition: transform 150ms ease-out;\n flex-shrink: 0;\n width: 1rem;\n height: 1rem;\n\n .Accordion_bui-Accordion__c1521aeef0[data-expanded='true'] > .Accordion_bui-AccordionTrigger__c1521aeef0 & {\n transform: rotate(180deg);\n }\n }\n\n .Accordion_bui-AccordionPanel__c1521aeef0 {\n .Accordion_bui-Accordion__c1521aeef0[data-expanded='true'] > & {\n padding-top: var(--bui-space-1);\n }\n }\n\n .Accordion_bui-AccordionGroup__c1521aeef0 {\n display: flex;\n flex-direction: column;\n gap: var(--bui-space-3);\n width: 100%;\n }\n}\n";
4
- var styles = {"bui-Accordion":"Accordion_bui-Accordion__c1521aeef0","bui-AccordionTrigger":"Accordion_bui-AccordionTrigger__c1521aeef0","bui-AccordionTriggerButton":"Accordion_bui-AccordionTriggerButton__c1521aeef0","bui-AccordionTriggerTitle":"Accordion_bui-AccordionTriggerTitle__c1521aeef0","bui-AccordionTriggerSubtitle":"Accordion_bui-AccordionTriggerSubtitle__c1521aeef0","bui-AccordionTriggerIcon":"Accordion_bui-AccordionTriggerIcon__c1521aeef0","bui-AccordionPanel":"Accordion_bui-AccordionPanel__c1521aeef0","bui-AccordionGroup":"Accordion_bui-AccordionGroup__c1521aeef0"};
3
+ var css_248z = "/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n@layer tokens, base, components, theme, utilities;\n\n@layer components {\n .Accordion_bui-Accordion__5d4e39b610 {\n width: 100%;\n border-radius: var(--bui-radius-3);\n padding: var(--bui-space-3);\n }\n\n .Accordion_bui-Accordion__5d4e39b610[data-bg='danger'],\n .Accordion_bui-Accordion__5d4e39b610[data-bg='warning'],\n .Accordion_bui-Accordion__5d4e39b610[data-bg='success'] {\n background-color: transparent;\n }\n\n .Accordion_bui-AccordionTrigger__5d4e39b610 {\n all: unset;\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: space-between;\n }\n\n .Accordion_bui-AccordionTriggerButton__5d4e39b610 {\n all: unset;\n width: 100%;\n color: var(--bui-fg-primary);\n display: flex;\n align-items: center;\n justify-content: space-between;\n cursor: pointer;\n text-align: left;\n\n &[data-focus-visible] {\n outline: none;\n transition: none;\n box-shadow: inset 0 0 0 2px var(--bui-ring);\n }\n\n &[data-disabled='true'] {\n background-color: transparent;\n color: var(--bui-fg-disabled);\n cursor: not-allowed;\n }\n }\n\n .Accordion_bui-AccordionTriggerTitle__5d4e39b610 {\n font-size: var(--bui-font-size-4);\n font-weight: var(--bui-font-weight-bold);\n line-height: 140%;\n }\n\n .Accordion_bui-AccordionTriggerSubtitle__5d4e39b610 {\n font-size: var(--bui-font-size-2);\n line-height: 140%;\n color: var(--bui-fg-secondary);\n }\n\n .Accordion_bui-AccordionTriggerIcon__5d4e39b610 {\n transition: transform 150ms ease-out;\n flex-shrink: 0;\n width: 1rem;\n height: 1rem;\n\n .Accordion_bui-Accordion__5d4e39b610[data-expanded='true'] > .Accordion_bui-AccordionTrigger__5d4e39b610 & {\n transform: rotate(180deg);\n }\n }\n\n .Accordion_bui-AccordionPanel__5d4e39b610 {\n .Accordion_bui-Accordion__5d4e39b610[data-expanded='true'] > & {\n padding-top: var(--bui-space-1);\n }\n }\n\n .Accordion_bui-AccordionGroup__5d4e39b610 {\n display: flex;\n flex-direction: column;\n gap: var(--bui-space-3);\n width: 100%;\n }\n}\n";
4
+ var styles = {"bui-Accordion":"Accordion_bui-Accordion__5d4e39b610","bui-AccordionTrigger":"Accordion_bui-AccordionTrigger__5d4e39b610","bui-AccordionTriggerButton":"Accordion_bui-AccordionTriggerButton__5d4e39b610","bui-AccordionTriggerTitle":"Accordion_bui-AccordionTriggerTitle__5d4e39b610","bui-AccordionTriggerSubtitle":"Accordion_bui-AccordionTriggerSubtitle__5d4e39b610","bui-AccordionTriggerIcon":"Accordion_bui-AccordionTriggerIcon__5d4e39b610","bui-AccordionPanel":"Accordion_bui-AccordionPanel__5d4e39b610","bui-AccordionGroup":"Accordion_bui-AccordionGroup__5d4e39b610"};
5
5
  styleInject(css_248z);
6
6
 
7
7
  export { styles as default };
@@ -1 +1 @@
1
- {"version":3,"file":"Accordion.module.css.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
1
+ {"version":3,"file":"Accordion.module.css.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"definition.esm.js","sources":["../../../src/components/Accordion/definition.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { defineComponent } from '../../hooks/useDefinition';\nimport type {\n AccordionOwnProps,\n AccordionTriggerOwnProps,\n AccordionPanelOwnProps,\n AccordionGroupOwnProps,\n} from './types';\nimport styles from './Accordion.module.css';\n\n/**\n * Component definition for Accordion\n * @public\n */\nexport const AccordionDefinition = defineComponent<AccordionOwnProps>()({\n styles,\n classNames: {\n root: 'bui-Accordion',\n },\n bg: 'provider',\n propDefs: {\n bg: { dataAttribute: true, default: 'neutral' },\n children: {},\n className: {},\n },\n});\n\n/**\n * Component definition for AccordionTrigger\n * @public\n */\nexport const AccordionTriggerDefinition =\n defineComponent<AccordionTriggerOwnProps>()({\n styles,\n classNames: {\n root: 'bui-AccordionTrigger',\n button: 'bui-AccordionTriggerButton',\n title: 'bui-AccordionTriggerTitle',\n subtitle: 'bui-AccordionTriggerSubtitle',\n icon: 'bui-AccordionTriggerIcon',\n },\n propDefs: {\n className: {},\n title: {},\n subtitle: {},\n children: {},\n },\n });\n\n/**\n * Component definition for AccordionPanel\n * @public\n */\nexport const AccordionPanelDefinition =\n defineComponent<AccordionPanelOwnProps>()({\n styles,\n classNames: {\n root: 'bui-AccordionPanel',\n },\n propDefs: {\n className: {},\n },\n });\n\n/**\n * Component definition for AccordionGroup\n * @public\n */\nexport const AccordionGroupDefinition =\n defineComponent<AccordionGroupOwnProps>()({\n styles,\n classNames: {\n root: 'bui-AccordionGroup',\n },\n propDefs: {\n className: {},\n allowsMultiple: { default: false },\n },\n });\n"],"names":[],"mappings":";;;;;;;;;;;;AA6BO,MAAM,mBAAA,GAAsB,iBAAmC,CAAE;AAAA,EACtE,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA,EAAA,EAAI,UAAA;AAAA,EACJ,QAAA,EAAU;AAAA,IACR,EAAA,EAAI,EAAE,aAAA,EAAe,IAAA,EAAM,SAAS,SAAA,EAAU;AAAA,IAC9C,UAAU,EAAC;AAAA,IACX,WAAW;AAAC;AAEhB,CAAC;AAMM,MAAM,0BAAA,GACX,iBAA0C,CAAE;AAAA,EAC1C,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,sBAAA;AAAA,IACN,MAAA,EAAQ,4BAAA;AAAA,IACR,KAAA,EAAO,2BAAA;AAAA,IACP,QAAA,EAAU,8BAAA;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA,QAAA,EAAU;AAAA,IACR,WAAW,EAAC;AAAA,IACZ,OAAO,EAAC;AAAA,IACR,UAAU,EAAC;AAAA,IACX,UAAU;AAAC;AAEf,CAAC;AAMI,MAAM,wBAAA,GACX,iBAAwC,CAAE;AAAA,EACxC,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA,QAAA,EAAU;AAAA,IACR,WAAW;AAAC;AAEhB,CAAC;AAMI,MAAM,wBAAA,GACX,iBAAwC,CAAE;AAAA,EACxC,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA,QAAA,EAAU;AAAA,IACR,WAAW,EAAC;AAAA,IACZ,cAAA,EAAgB,EAAE,OAAA,EAAS,KAAA;AAAM;AAErC,CAAC;;;;"}
1
+ {"version":3,"file":"definition.esm.js","sources":["../../../src/components/Accordion/definition.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { defineComponent } from '../../hooks/useDefinition';\nimport type {\n AccordionOwnProps,\n AccordionTriggerOwnProps,\n AccordionPanelOwnProps,\n AccordionGroupOwnProps,\n} from './types';\nimport styles from './Accordion.module.css';\n\n/**\n * Component definition for Accordion\n * @public\n */\nexport const AccordionDefinition = defineComponent<AccordionOwnProps>()({\n styles,\n classNames: {\n root: 'bui-Accordion',\n },\n bg: 'provider',\n propDefs: {\n bg: { dataAttribute: true, default: 'neutral' },\n children: {},\n className: {},\n },\n});\n\n/**\n * Component definition for AccordionTrigger\n * @public\n */\nexport const AccordionTriggerDefinition =\n defineComponent<AccordionTriggerOwnProps>()({\n styles,\n classNames: {\n root: 'bui-AccordionTrigger',\n button: 'bui-AccordionTriggerButton',\n title: 'bui-AccordionTriggerTitle',\n subtitle: 'bui-AccordionTriggerSubtitle',\n icon: 'bui-AccordionTriggerIcon',\n },\n propDefs: {\n className: {},\n title: {},\n subtitle: {},\n children: {},\n },\n });\n\n/**\n * Component definition for AccordionPanel\n * @public\n */\nexport const AccordionPanelDefinition =\n defineComponent<AccordionPanelOwnProps>()({\n styles,\n classNames: {\n root: 'bui-AccordionPanel',\n },\n propDefs: {\n className: {},\n },\n });\n\n/**\n * Component definition for AccordionGroup\n * @public\n */\nexport const AccordionGroupDefinition =\n defineComponent<AccordionGroupOwnProps>()({\n styles,\n classNames: {\n root: 'bui-AccordionGroup',\n },\n propDefs: {\n className: {},\n allowsMultiple: { default: false },\n },\n });\n"],"names":[],"mappings":";;;;;;;;;;;;AA6BO,MAAM,mBAAA,GAAsB,iBAAmC,CAAE;AAAA,EACtE,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA,EAAA,EAAI,UAAA;AAAA,EACJ,QAAA,EAAU;AAAA,IACR,EAAA,EAAI,EAAE,aAAA,EAAe,IAAA,EAAM,SAAS,SAAA,EAAU;AAAA,IAC9C,UAAU,EAAC;AAAA,IACX,WAAW;AAAC;AAEhB,CAAC;AAMM,MAAM,0BAAA,GACX,iBAA0C,CAAE;AAAA,EAC1C,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,sBAAA;AAAA,IACN,MAAA,EAAQ,4BAAA;AAAA,IACR,KAAA,EAAO,2BAAA;AAAA,IACP,QAAA,EAAU,8BAAA;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA,QAAA,EAAU;AAAA,IACR,WAAW,EAAC;AAAA,IACZ,OAAO,EAAC;AAAA,IACR,UAAU,EAAC;AAAA,IACX,UAAU;AAAC;AAEf,CAAC;AAMI,MAAM,wBAAA,GACX,iBAAwC,CAAE;AAAA,EACxC,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA,QAAA,EAAU;AAAA,IACR,WAAW;AAAC;AAEhB,CAAC;AAMI,MAAM,wBAAA,GACX,iBAAwC,CAAE;AAAA,EACxC,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA,QAAA,EAAU;AAAA,IACR,WAAW,EAAC;AAAA,IACZ,cAAA,EAAgB,EAAE,OAAA,EAAS,KAAA;AAAM;AAErC,CAAC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Alert.esm.js","sources":["../../../src/components/Alert/Alert.tsx"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { forwardRef, Ref, isValidElement, ReactElement } from 'react';\nimport { ProgressBar } from 'react-aria-components';\nimport {\n RiLoader4Line,\n RiInformationLine,\n RiCheckLine,\n RiErrorWarningLine,\n RiAlertLine,\n} from '@remixicon/react';\nimport type { AlertProps } from './types';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport { AlertDefinition } from './definition';\n\n/**\n * A component for displaying alert messages with different status levels.\n *\n * @remarks\n * The Alert component supports multiple status variants (info, success, warning, danger)\n * and can display icons, pending states, and custom actions. It automatically handles\n * icon selection based on status when the icon prop is set to true.\n *\n * @example\n * Basic usage with title only:\n * ```tsx\n * <Alert status=\"info\" title=\"This is an informational message\" />\n * ```\n *\n * @example\n * With title and description:\n * ```tsx\n * <Alert\n * status=\"warning\"\n * icon={true}\n * title=\"Pending Review\"\n * description=\"Please review the following items before proceeding.\"\n * />\n * ```\n *\n * @example\n * With custom actions and pending state:\n * ```tsx\n * <Alert\n * status=\"success\"\n * icon={true}\n * title=\"Operation completed\"\n * description=\"Your changes have been saved successfully.\"\n * isPending={isProcessing}\n * customActions={\n * <>\n * <Button size=\"small\" variant=\"tertiary\">Dismiss</Button>\n * <Button size=\"small\" variant=\"primary\">View</Button>\n * </>\n * }\n * />\n * ```\n *\n * @public\n */\nexport const Alert = forwardRef(\n (props: AlertProps, ref: Ref<HTMLDivElement>) => {\n const { ownProps, restProps, dataAttributes, utilityStyle } = useDefinition(\n AlertDefinition,\n // Merge deprecated `loading` into `isPending` so data attributes and\n // internal logic only need to check a single prop.\n {\n ...props,\n isPending:\n props.isPending || props.loading\n ? true\n : props.isPending ?? props.loading,\n },\n );\n const {\n classes,\n status,\n icon,\n isPending,\n customActions,\n title,\n description,\n style,\n } = ownProps;\n\n // Determine which icon to render\n const getStatusIcon = (): ReactElement | null => {\n // If icon is explicitly false, don't render any icon\n if (icon === false) {\n return null;\n }\n\n // If icon is a custom React element, use it\n if (isValidElement(icon)) {\n return icon;\n }\n\n // If icon is true, auto-select based on status\n if (icon === true) {\n switch (status) {\n case 'success':\n return <RiCheckLine aria-hidden=\"true\" />;\n case 'warning':\n return <RiErrorWarningLine aria-hidden=\"true\" />;\n case 'danger':\n return <RiAlertLine aria-hidden=\"true\" />;\n case 'info':\n default:\n return <RiInformationLine aria-hidden=\"true\" />;\n }\n }\n\n // Default: no icon\n return null;\n };\n\n const statusIcon = getStatusIcon();\n\n return (\n <div\n className={classes.root}\n ref={ref}\n style={{ ...style, ...utilityStyle }}\n {...dataAttributes}\n {...restProps}\n data-has-description={description ? 'true' : 'false'}\n >\n <div className={classes.contentWrapper}>\n {isPending ? (\n <div className={classes.icon}>\n <ProgressBar\n aria-label=\"Loading\"\n isIndeterminate\n className={classes.spinner}\n >\n <RiLoader4Line aria-hidden=\"true\" />\n </ProgressBar>\n </div>\n ) : (\n statusIcon && <div className={classes.icon}>{statusIcon}</div>\n )}\n\n <div className={classes.content}>\n {title && <div className={classes.title}>{title}</div>}\n {description && (\n <div className={classes.description}>{description}</div>\n )}\n </div>\n </div>\n\n {customActions && (\n <div className={classes.actions}>{customActions}</div>\n )}\n </div>\n );\n },\n);\n\nAlert.displayName = 'Alert';\n"],"names":[],"mappings":";;;;;;;AA0EO,MAAM,KAAA,GAAQ,UAAA;AAAA,EACnB,CAAC,OAAmB,GAAA,KAA6B;AAC/C,IAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAW,cAAA,EAAgB,cAAa,GAAI,aAAA;AAAA,MAC5D,eAAA;AAAA;AAAA;AAAA,MAGA;AAAA,QACE,GAAG,KAAA;AAAA,QACH,SAAA,EACE,MAAM,SAAA,IAAa,KAAA,CAAM,UACrB,IAAA,GACA,KAAA,CAAM,aAAa,KAAA,CAAM;AAAA;AACjC,KACF;AACA,IAAA,MAAM;AAAA,MACJ,OAAA;AAAA,MACA,MAAA;AAAA,MACA,IAAA;AAAA,MACA,SAAA;AAAA,MACA,aAAA;AAAA,MACA,KAAA;AAAA,MACA,WAAA;AAAA,MACA;AAAA,KACF,GAAI,QAAA;AAGJ,IAAA,MAAM,gBAAgB,MAA2B;AAE/C,MAAA,IAAI,SAAS,KAAA,EAAO;AAClB,QAAA,OAAO,IAAA;AAAA,MACT;AAGA,MAAA,IAAI,cAAA,CAAe,IAAI,CAAA,EAAG;AACxB,QAAA,OAAO,IAAA;AAAA,MACT;AAGA,MAAA,IAAI,SAAS,IAAA,EAAM;AACjB,QAAA,QAAQ,MAAA;AAAQ,UACd,KAAK,SAAA;AACH,YAAA,uBAAO,GAAA,CAAC,WAAA,EAAA,EAAY,aAAA,EAAY,MAAA,EAAO,CAAA;AAAA,UACzC,KAAK,SAAA;AACH,YAAA,uBAAO,GAAA,CAAC,kBAAA,EAAA,EAAmB,aAAA,EAAY,MAAA,EAAO,CAAA;AAAA,UAChD,KAAK,QAAA;AACH,YAAA,uBAAO,GAAA,CAAC,WAAA,EAAA,EAAY,aAAA,EAAY,MAAA,EAAO,CAAA;AAAA,UACzC,KAAK,MAAA;AAAA,UACL;AAC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C,GAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,OAAA,CAAQ,aAAc,QAAA,EAAA,WAAA,EAAY;AAAA,aAAA,EAEtD;AAAA,WAAA,EACF,CAAA;AAAA,UAEC,iCACC,GAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,OAAA,CAAQ,SAAU,QAAA,EAAA,aAAA,EAAc;AAAA;AAAA;AAAA,KAEpD;AAAA,EAEJ;AACF;AAEA,KAAA,CAAM,WAAA,GAAc,OAAA;;;;"}
1
+ {"version":3,"file":"Alert.esm.js","sources":["../../../src/components/Alert/Alert.tsx"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { forwardRef, Ref, isValidElement, ReactElement } from 'react';\nimport { ProgressBar } from 'react-aria-components';\nimport {\n RiLoader4Line,\n RiInformationLine,\n RiCheckLine,\n RiErrorWarningLine,\n RiAlertLine,\n} from '@remixicon/react';\nimport type { AlertProps } from './types';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport { AlertDefinition } from './definition';\n\n/**\n * A component for displaying alert messages with different status levels.\n *\n * @remarks\n * The Alert component supports multiple status variants (info, success, warning, danger)\n * and can display icons, pending states, and custom actions. It automatically handles\n * icon selection based on status when the icon prop is set to true.\n *\n * @example\n * Basic usage with title only:\n * ```tsx\n * <Alert status=\"info\" title=\"This is an informational message\" />\n * ```\n *\n * @example\n * With title and description:\n * ```tsx\n * <Alert\n * status=\"warning\"\n * icon={true}\n * title=\"Pending Review\"\n * description=\"Please review the following items before proceeding.\"\n * />\n * ```\n *\n * @example\n * With custom actions and pending state:\n * ```tsx\n * <Alert\n * status=\"success\"\n * icon={true}\n * title=\"Operation completed\"\n * description=\"Your changes have been saved successfully.\"\n * isPending={isProcessing}\n * customActions={\n * <>\n * <Button size=\"small\" variant=\"tertiary\">Dismiss</Button>\n * <Button size=\"small\" variant=\"primary\">View</Button>\n * </>\n * }\n * />\n * ```\n *\n * @public\n */\nexport const Alert = forwardRef(\n (props: AlertProps, ref: Ref<HTMLDivElement>) => {\n const { ownProps, restProps, dataAttributes, utilityStyle } = useDefinition(\n AlertDefinition,\n // Merge deprecated `loading` into `isPending` so data attributes and\n // internal logic only need to check a single prop.\n {\n ...props,\n isPending:\n props.isPending || props.loading\n ? true\n : props.isPending ?? props.loading,\n },\n );\n const {\n classes,\n status,\n icon,\n isPending,\n customActions,\n title,\n description,\n style,\n } = ownProps;\n\n // Determine which icon to render\n const getStatusIcon = (): ReactElement | null => {\n // If icon is explicitly false, don't render any icon\n if (icon === false) {\n return null;\n }\n\n // If icon is a custom React element, use it\n if (isValidElement(icon)) {\n return icon;\n }\n\n // If icon is true, auto-select based on status\n if (icon === true) {\n switch (status) {\n case 'success':\n return <RiCheckLine aria-hidden=\"true\" />;\n case 'warning':\n return <RiErrorWarningLine aria-hidden=\"true\" />;\n case 'danger':\n return <RiAlertLine aria-hidden=\"true\" />;\n case 'info':\n default:\n return <RiInformationLine aria-hidden=\"true\" />;\n }\n }\n\n // Default: no icon\n return null;\n };\n\n const statusIcon = getStatusIcon();\n\n return (\n <div\n className={classes.root}\n ref={ref}\n style={{ ...style, ...utilityStyle }}\n {...dataAttributes}\n {...restProps}\n data-has-description={description ? 'true' : 'false'}\n >\n <div className={classes.contentWrapper}>\n {isPending ? (\n <div className={classes.icon}>\n <ProgressBar\n aria-label=\"Loading\"\n isIndeterminate\n className={classes.spinner}\n >\n <RiLoader4Line aria-hidden=\"true\" />\n </ProgressBar>\n </div>\n ) : (\n statusIcon && <div className={classes.icon}>{statusIcon}</div>\n )}\n\n <div className={classes.content}>\n {title && <div className={classes.title}>{title}</div>}\n {description && (\n <div className={classes.description}>{description}</div>\n )}\n </div>\n </div>\n\n {customActions && (\n <div className={classes.actions}>{customActions}</div>\n )}\n </div>\n );\n },\n);\n\nAlert.displayName = 'Alert';\n"],"names":[],"mappings":";;;;;;;AA0EO,MAAM,KAAA,GAAQ,UAAA;AAAA,EACnB,CAAC,OAAmB,GAAA,KAA6B;AAC/C,IAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAW,cAAA,EAAgB,cAAa,GAAI,aAAA;AAAA,MAC5D,eAAA;AAAA;AAAA;AAAA,MAGA;AAAA,QACE,GAAG,KAAA;AAAA,QACH,SAAA,EACE,MAAM,SAAA,IAAa,KAAA,CAAM,UACrB,IAAA,GACA,KAAA,CAAM,aAAa,KAAA,CAAM;AAAA;AACjC,KACF;AACA,IAAA,MAAM;AAAA,MACJ,OAAA;AAAA,MACA,MAAA;AAAA,MACA,IAAA;AAAA,MACA,SAAA;AAAA,MACA,aAAA;AAAA,MACA,KAAA;AAAA,MACA,WAAA;AAAA,MACA;AAAA,KACF,GAAI,QAAA;AAGJ,IAAA,MAAM,gBAAgB,MAA2B;AAE/C,MAAA,IAAI,SAAS,KAAA,EAAO;AAClB,QAAA,OAAO,IAAA;AAAA,MACT;AAGA,MAAA,IAAI,cAAA,CAAe,IAAI,CAAA,EAAG;AACxB,QAAA,OAAO,IAAA;AAAA,MACT;AAGA,MAAA,IAAI,SAAS,IAAA,EAAM;AACjB,QAAA,QAAQ,MAAA;AAAQ,UACd,KAAK,SAAA;AACH,YAAA,uBAAO,GAAA,CAAC,WAAA,EAAA,EAAY,aAAA,EAAY,MAAA,EAAO,CAAA;AAAA,UACzC,KAAK,SAAA;AACH,YAAA,uBAAO,GAAA,CAAC,kBAAA,EAAA,EAAmB,aAAA,EAAY,MAAA,EAAO,CAAA;AAAA,UAChD,KAAK,QAAA;AACH,YAAA,uBAAO,GAAA,CAAC,WAAA,EAAA,EAAY,aAAA,EAAY,MAAA,EAAO,CA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EAAA,KAAA,EAAM,CAAA;AAAA,cAC/C,+BACC,GAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,OAAA,CAAQ,aAAc,QAAA,EAAA,WAAA,EAAY;AAAA,aAAA,EAEtD;AAAA,WAAA,EACF,CAAA;AAAA,UAEC,iCACC,GAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,OAAA,CAAQ,SAAU,QAAA,EAAA,aAAA,EAAc;AAAA;AAAA;AAAA,KAEpD;AAAA,EAEJ;AACF;AAEA,KAAA,CAAM,WAAA,GAAc,OAAA;;"}
@@ -1,7 +1,7 @@
1
1
  import styleInject from '../../node_modules_dist/style-inject/dist/style-inject.es.esm.js';
2
2
 
3
- var css_248z = "/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n@layer tokens, base, components, utilities;\n\n@layer components {\n .Alert_bui-Alert__aec8196e6c {\n --alert-bg: var(--bui-bg-neutral-1);\n --alert-fg: var(--bui-fg-primary);\n\n display: flex;\n gap: var(--bui-space-6);\n padding: var(--bui-space-3) var(--bui-space-3);\n border-radius: var(--bui-radius-3);\n font-family: var(--bui-font-regular);\n font-size: var(--bui-font-size-3);\n line-height: 1.5;\n\n /* Apply variables */\n background-color: var(--alert-bg);\n color: var(--alert-fg);\n }\n\n .Alert_bui-Alert__aec8196e6c[data-status='info'] {\n --alert-bg: var(--bui-bg-info);\n --alert-fg: var(--bui-fg-info-on-bg);\n }\n\n .Alert_bui-Alert__aec8196e6c[data-status='success'] {\n --alert-bg: var(--bui-bg-success);\n --alert-fg: var(--bui-fg-success-on-bg);\n }\n\n .Alert_bui-Alert__aec8196e6c[data-status='warning'] {\n --alert-bg: var(--bui-bg-warning);\n --alert-fg: var(--bui-fg-warning-on-bg);\n }\n\n .Alert_bui-Alert__aec8196e6c[data-status='danger'] {\n --alert-bg: var(--bui-bg-danger);\n --alert-fg: var(--bui-fg-danger-on-bg);\n }\n\n .Alert_bui-AlertIcon__aec8196e6c {\n flex-shrink: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n\n svg {\n width: 1rem;\n height: 1rem;\n }\n\n /* Add slight top margin when there's a description for better alignment */\n .Alert_bui-Alert__aec8196e6c[data-has-description='true'] & {\n margin-top: 0.125rem;\n }\n }\n\n .Alert_bui-AlertContentWrapper__aec8196e6c {\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n gap: var(--bui-space-3);\n flex: 1;\n min-width: 0;\n\n /* Center align when there's no description */\n .Alert_bui-Alert__aec8196e6c[data-has-description='false'] & {\n align-items: center;\n }\n }\n\n .Alert_bui-AlertContent__aec8196e6c {\n flex: 1;\n min-width: 0;\n word-wrap: break-word;\n }\n\n .Alert_bui-AlertTitle__aec8196e6c {\n font-weight: var(--bui-font-weight-bold);\n font-size: var(--bui-font-size-3);\n }\n\n .Alert_bui-AlertDescription__aec8196e6c {\n font-size: var(--bui-font-size-2);\n opacity: 0.9;\n }\n\n .Alert_bui-AlertSpinner__aec8196e6c {\n display: flex;\n\n & svg {\n width: 1rem;\n height: 1rem;\n animation: Alert_bui-spin__aec8196e6c 1s linear infinite;\n }\n }\n\n .Alert_bui-AlertActions__aec8196e6c {\n flex-shrink: 0;\n display: flex;\n align-items: center;\n gap: var(--bui-space-2);\n margin-left: auto;\n }\n\n @media (prefers-reduced-motion: reduce) {\n .Alert_bui-AlertSpinner__aec8196e6c svg {\n animation: none;\n }\n }\n\n @keyframes Alert_bui-spin__aec8196e6c {\n from {\n transform: rotate(0deg);\n }\n\n to {\n transform: rotate(360deg);\n }\n }\n}\n";
4
- var styles = {"bui-Alert":"Alert_bui-Alert__aec8196e6c","bui-AlertIcon":"Alert_bui-AlertIcon__aec8196e6c","bui-AlertContentWrapper":"Alert_bui-AlertContentWrapper__aec8196e6c","bui-AlertContent":"Alert_bui-AlertContent__aec8196e6c","bui-AlertTitle":"Alert_bui-AlertTitle__aec8196e6c","bui-AlertDescription":"Alert_bui-AlertDescription__aec8196e6c","bui-AlertSpinner":"Alert_bui-AlertSpinner__aec8196e6c","bui-spin":"Alert_bui-spin__aec8196e6c","bui-AlertActions":"Alert_bui-AlertActions__aec8196e6c"};
3
+ var css_248z = "/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n@layer tokens, base, components, theme, utilities;\n\n@layer components {\n .Alert_bui-Alert__b6f5bf78f7 {\n --alert-bg: var(--bui-bg-neutral-1);\n --alert-fg: var(--bui-fg-primary);\n\n display: flex;\n gap: var(--bui-space-6);\n padding: var(--bui-space-3) var(--bui-space-3);\n border-radius: var(--bui-radius-3);\n font-family: var(--bui-font-regular);\n font-size: var(--bui-font-size-3);\n line-height: 1.5;\n\n /* Apply variables */\n background-color: var(--alert-bg);\n color: var(--alert-fg);\n }\n\n .Alert_bui-Alert__b6f5bf78f7[data-status='info'] {\n --alert-bg: var(--bui-bg-info);\n --alert-fg: var(--bui-fg-info-on-bg);\n }\n\n .Alert_bui-Alert__b6f5bf78f7[data-status='success'] {\n --alert-bg: var(--bui-bg-success);\n --alert-fg: var(--bui-fg-success-on-bg);\n }\n\n .Alert_bui-Alert__b6f5bf78f7[data-status='warning'] {\n --alert-bg: var(--bui-bg-warning);\n --alert-fg: var(--bui-fg-warning-on-bg);\n }\n\n .Alert_bui-Alert__b6f5bf78f7[data-status='danger'] {\n --alert-bg: var(--bui-bg-danger);\n --alert-fg: var(--bui-fg-danger-on-bg);\n }\n\n .Alert_bui-AlertIcon__b6f5bf78f7 {\n flex-shrink: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n\n svg {\n width: 1rem;\n height: 1rem;\n }\n\n /* Add slight top margin when there's a description for better alignment */\n .Alert_bui-Alert__b6f5bf78f7[data-has-description='true'] & {\n margin-top: 0.125rem;\n }\n }\n\n .Alert_bui-AlertContentWrapper__b6f5bf78f7 {\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n gap: var(--bui-space-3);\n flex: 1;\n min-width: 0;\n\n /* Center align when there's no description */\n .Alert_bui-Alert__b6f5bf78f7[data-has-description='false'] & {\n align-items: center;\n }\n }\n\n .Alert_bui-AlertContent__b6f5bf78f7 {\n flex: 1;\n min-width: 0;\n word-wrap: break-word;\n }\n\n .Alert_bui-AlertTitle__b6f5bf78f7 {\n font-weight: var(--bui-font-weight-bold);\n font-size: var(--bui-font-size-3);\n }\n\n .Alert_bui-AlertDescription__b6f5bf78f7 {\n font-size: var(--bui-font-size-2);\n opacity: 0.9;\n }\n\n .Alert_bui-AlertSpinner__b6f5bf78f7 {\n display: flex;\n\n & svg {\n width: 1rem;\n height: 1rem;\n animation: Alert_bui-spin__b6f5bf78f7 1s linear infinite;\n }\n }\n\n .Alert_bui-AlertActions__b6f5bf78f7 {\n flex-shrink: 0;\n display: flex;\n align-items: center;\n gap: var(--bui-space-2);\n margin-left: auto;\n }\n\n @media (prefers-reduced-motion: reduce) {\n .Alert_bui-AlertSpinner__b6f5bf78f7 svg {\n animation: none;\n }\n }\n\n @keyframes Alert_bui-spin__b6f5bf78f7 {\n from {\n transform: rotate(0deg);\n }\n\n to {\n transform: rotate(360deg);\n }\n }\n}\n";
4
+ var styles = {"bui-Alert":"Alert_bui-Alert__b6f5bf78f7","bui-AlertIcon":"Alert_bui-AlertIcon__b6f5bf78f7","bui-AlertContentWrapper":"Alert_bui-AlertContentWrapper__b6f5bf78f7","bui-AlertContent":"Alert_bui-AlertContent__b6f5bf78f7","bui-AlertTitle":"Alert_bui-AlertTitle__b6f5bf78f7","bui-AlertDescription":"Alert_bui-AlertDescription__b6f5bf78f7","bui-AlertSpinner":"Alert_bui-AlertSpinner__b6f5bf78f7","bui-spin":"Alert_bui-spin__b6f5bf78f7","bui-AlertActions":"Alert_bui-AlertActions__b6f5bf78f7"};
5
5
  styleInject(css_248z);
6
6
 
7
7
  export { styles as default };
@@ -1 +1 @@
1
- {"version":3,"file":"Alert.module.css.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
1
+ {"version":3,"file":"Alert.module.css.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"definition.esm.js","sources":["../../../src/components/Alert/definition.ts"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { defineComponent } from '../../hooks/useDefinition';\nimport type { AlertOwnProps } from './types';\nimport styles from './Alert.module.css';\n\n/**\n * Component definition for Alert\n * @public\n */\nexport const AlertDefinition = defineComponent<AlertOwnProps>()({\n styles,\n classNames: {\n root: 'bui-Alert',\n contentWrapper: 'bui-AlertContentWrapper',\n content: 'bui-AlertContent',\n title: 'bui-AlertTitle',\n description: 'bui-AlertDescription',\n icon: 'bui-AlertIcon',\n spinner: 'bui-AlertSpinner',\n actions: 'bui-AlertActions',\n },\n propDefs: {\n status: { dataAttribute: true, default: 'info' },\n isPending: { dataAttribute: true },\n loading: { dataAttribute: true },\n icon: {},\n customActions: {},\n title: {},\n description: {},\n className: {},\n style: {},\n },\n utilityProps: ['m', 'mb', 'ml', 'mr', 'mt', 'mx', 'my'],\n});\n"],"names":[],"mappings":";;;;;;;;;;;;AAwBO,MAAM,eAAA,GAAkB,iBAA+B,CAAE;AAAA,EAC9D,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,WAAA;AAAA,IACN,cAAA,EAAgB,yBAAA;AAAA,IAChB,OAAA,EAAS,kBAAA;AAAA,IACT,KAAA,EAAO,gBAAA;AAAA,IACP,WAAA,EAAa,sBAAA;AAAA,IACb,IAAA,EAAM,eAAA;AAAA,IACN,OAAA,EAAS,kBAAA;AAAA,IACT,OAAA,EAAS;AAAA,GACX;AAAA,EACA,QAAA,EAAU;AAAA,IACR,MAAA,EAAQ,EAAE,aAAA,EAAe,IAAA,EAAM,SAAS,MAAA,EAAO;AAAA,IAC/C,SAAA,EAAW,EAAE,aAAA,EAAe,IAAA,EAAK;AAAA,IACjC,OAAA,EAAS,EAAE,aAAA,EAAe,IAAA,EAAK;AAAA,IAC/B,MAAM,EAAC;AAAA,IACP,eAAe,EAAC;AAAA,IAChB,OAAO,EAAC;AAAA,IACR,aAAa,EAAC;AAAA,IACd,WAAW,EAAC;AAAA,IACZ,OAAO;AAAC,GACV;AAAA,EACA,YAAA,EAAc,CAAC,GAAA,EAAK,IAAA,EAAM,MAAM,IAAA,EAAM,IAAA,EAAM,MAAM,IAAI;AACxD,CAAC;;;;"}
1
+ {"version":3,"file":"definition.esm.js","sources":["../../../src/components/Alert/definition.ts"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { defineComponent } from '../../hooks/useDefinition';\nimport type { AlertOwnProps } from './types';\nimport styles from './Alert.module.css';\n\n/**\n * Component definition for Alert\n * @public\n */\nexport const AlertDefinition = defineComponent<AlertOwnProps>()({\n styles,\n classNames: {\n root: 'bui-Alert',\n contentWrapper: 'bui-AlertContentWrapper',\n content: 'bui-AlertContent',\n title: 'bui-AlertTitle',\n description: 'bui-AlertDescription',\n icon: 'bui-AlertIcon',\n spinner: 'bui-AlertSpinner',\n actions: 'bui-AlertActions',\n },\n propDefs: {\n status: { dataAttribute: true, default: 'info' },\n isPending: { dataAttribute: true },\n loading: { dataAttribute: true },\n icon: {},\n customActions: {},\n title: {},\n description: {},\n className: {},\n style: {},\n },\n utilityProps: ['m', 'mb', 'ml', 'mr', 'mt', 'mx', 'my'],\n});\n"],"names":[],"mappings":";;;;;;;;;;;;AAwBO,MAAM,eAAA,GAAkB,iBAA+B,CAAE;AAAA,EAC9D,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,WAAA;AAAA,IACN,cAAA,EAAgB,yBAAA;AAAA,IAChB,OAAA,EAAS,kBAAA;AAAA,IACT,KAAA,EAAO,gBAAA;AAAA,IACP,WAAA,EAAa,sBAAA;AAAA,IACb,IAAA,EAAM,eAAA;AAAA,IACN,OAAA,EAAS,kBAAA;AAAA,IACT,OAAA,EAAS;AAAA,GACX;AAAA,EACA,QAAA,EAAU;AAAA,IACR,MAAA,EAAQ,EAAE,aAAA,EAAe,IAAA,EAAM,SAAS,MAAA,EAAO;AAAA,IAC/C,SAAA,EAAW,EAAE,aAAA,EAAe,IAAA,EAAK;AAAA,IACjC,OAAA,EAAS,EAAE,aAAA,EAAe,IAAA,EAAK;AAAA,IAC/B,MAAM,EAAC;AAAA,IACP,eAAe,EAAC;AAAA,IAChB,OAAO,EAAC;AAAA,IACR,aAAa,EAAC;AAAA,IACd,WAAW,EAAC;AAAA,IACZ,OAAO;AAAC,GACV;AAAA,EACA,YAAA,EAAc,CAAC,GAAA,EAAK,IAAA,EAAM,MAAM,IAAA,EAAM,IAAA,EAAM,MAAM,IAAI;AACxD,CAAC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Avatar.esm.js","sources":["../../../src/components/Avatar/Avatar.tsx"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { forwardRef, useState, useEffect } from 'react';\nimport { AvatarProps } from './types';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport { AvatarDefinition } from './definition';\n\n/**\n * Displays a user's profile image with an automatic fallback to their initials when the image fails to load.\n *\n * @public\n */\nexport const Avatar = forwardRef<HTMLDivElement, AvatarProps>((props, ref) => {\n const { ownProps, restProps, dataAttributes } = useDefinition(\n AvatarDefinition,\n props,\n );\n\n const { classes, size, src, name, purpose } = ownProps;\n\n const [imageStatus, setImageStatus] = useState<\n 'loading' | 'loaded' | 'error'\n >('loading');\n\n useEffect(() => {\n setImageStatus('loading');\n const img = new Image();\n img.onload = () => setImageStatus('loaded');\n img.onerror = () => setImageStatus('error');\n img.src = src;\n\n return () => {\n img.onload = null;\n img.onerror = null;\n };\n }, [src]);\n\n const initialsCount = ['x-small', 'small'].includes(size) ? 1 : 2;\n\n const initials = name\n .split(' ')\n .map(word => word[0])\n .join('')\n .toUpperCase()\n .slice(0, initialsCount);\n\n return (\n <div\n ref={ref}\n role=\"img\"\n aria-label={purpose === 'informative' ? name : undefined}\n aria-hidden={purpose === 'decoration' ? true : undefined}\n className={classes.root}\n {...dataAttributes}\n {...restProps}\n >\n {imageStatus === 'loaded' ? (\n <img src={src} alt=\"\" className={classes.image} />\n ) : (\n <div aria-hidden=\"true\" className={classes.fallback}>\n {initials}\n </div>\n )}\n </div>\n );\n});\n\nAvatar.displayName = 'Avatar';\n"],"names":[],"mappings":";;;;;AA0BO,MAAM,MAAA,GAAS,UAAA,CAAwC,CAAC,KAAA,EAAO,GAAA,KAAQ;AAC5E,EAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAW,cAAA,EAAe,GAAI,aAAA;AAAA,IAC9C,gBAAA;AAAA,IACA;AAAA,GACF;AAEA,EAAA,MAAM,EAAE,OAAA,EAAS,IAAA,EAAM,GAAA,EAAK,IAAA,EAAM,SAAQ,GAAI,QAAA;AAE9C,EAAA,MAAM,CAAC,WAAA,EAAa,cAAc,CAAA,GAAI,SAEpC,SAAS,CAAA;AAEX,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,cAAA,CAAe,SAAS,CAAA;AACxB,IAAA,MAAM,GAAA,GAAM,IAAI,KAAA,EAAM;AACtB,IAAA,GAAA,CAAI,MAAA,GAAS,MAAM,cAAA,CAAe,QAAQ,CAAA;AAC1C,IAAA,GAAA,CAAI,OAAA,GAAU,MAAM,cAAA,CAAe,OAAO,CAAA;AAC1C,IAAA,GAAA,CAAI,GAAA,GAAM,GAAA;AAEV,IAAA,OAAO,MAAM;AACX,MAAA,GAAA,CAAI,MAAA,GAAS,IAAA;AACb,MAAA,GAAA,CAAI,OAAA,GAAU,IAAA;AAAA,IAChB,CAAA;AAAA,EACF,CAAA,EAAG,CAAC,GAAG,CAAC,CAAA;AAER,EAAA,MAAM,aAAA,GAAgB,CAAC,SAAA,EAAW,OAAO,EAAE,QAAA,CAAS,IAAI,IAAI,CAAA,GAAI,CAAA;AAEhE,EAAA,MAAM,WAAW,IAAA,CACd,KAAA,CAAM,GAAG,CAAA,CACT,GAAA,CAAI,UAAQ,IAAA,CAAK,CAAC,CAAC,CAAA,CACnB,KAAK,EAAE,CAAA,CACP,aAAY,CACZ,KAAA,CAAM,GAAG,aAAa,CAAA;AAEzB,EAAA,uBACE,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,GAAA;AAAA,MACA,IAAA,EAAK,KAAA;AAAA,MACL,YAAA,EAAY,OAAA,KAAY,aAAA,GAAgB,IAAA,GAAO,MAAA;AAAA,MAC/C,aAAA,EAAa,OAAA,KAAY,YAAA,GAAe,IAAA,GAAO,MAAA;AAAA,MAC/C,WAAW,OAAA,CAAQ,IAAA;AAAA,MAClB,GAAG,cAAA;AAAA,MACH,GAAG,SAAA;AAAA,MAEH,0BAAgB,QAAA,mBACf,GAAA,CAAC,SAAI,GAAA,EAAU,GAAA,EAAI,IAAG,SAAA,EAAW,OAAA,CAAQ,KAAA,EAAO,CAAA,uBAE/C,KAAA,EAAA,EAAI,aAAA,EAAY,QAAO,SAAA,EAAW,OAAA,CAAQ,UACxC,QAAA,EAAA,QAAA,EACH;AAAA;AAAA,GAEJ;AAEJ,CAAC;AAED,MAAA,CAAO,WAAA,GAAc,QAAA;;;;"}
1
+ {"version":3,"file":"Avatar.esm.js","sources":["../../../src/components/Avatar/Avatar.tsx"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { forwardRef, useState, useEffect } from 'react';\nimport { AvatarProps } from './types';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport { AvatarDefinition } from './definition';\n\n/**\n * Displays a user's profile image with an automatic fallback to their initials when the image fails to load.\n *\n * @public\n */\nexport const Avatar = forwardRef<HTMLDivElement, AvatarProps>((props, ref) => {\n const { ownProps, restProps, dataAttributes } = useDefinition(\n AvatarDefinition,\n props,\n );\n\n const { classes, size, src, name, purpose } = ownProps;\n\n const [imageStatus, setImageStatus] = useState<\n 'loading' | 'loaded' | 'error'\n >('loading');\n\n useEffect(() => {\n setImageStatus('loading');\n const img = new Image();\n img.onload = () => setImageStatus('loaded');\n img.onerror = () => setImageStatus('error');\n img.src = src;\n\n return () => {\n img.onload = null;\n img.onerror = null;\n };\n }, [src]);\n\n const initialsCount = ['x-small', 'small'].includes(size) ? 1 : 2;\n\n const initials = name\n .split(' ')\n .map(word => word[0])\n .join('')\n .toUpperCase()\n .slice(0, initialsCount);\n\n return (\n <div\n ref={ref}\n role=\"img\"\n aria-label={purpose === 'informative' ? name : undefined}\n aria-hidden={purpose === 'decoration' ? true : undefined}\n className={classes.root}\n {...dataAttributes}\n {...restProps}\n >\n {imageStatus === 'loaded' ? (\n <img src={src} alt=\"\" className={classes.image} />\n ) : (\n <div aria-hidden=\"true\" className={classes.fallback}>\n {initials}\n </div>\n )}\n </div>\n );\n});\n\nAvatar.displayName = 'Avatar';\n"],"names":[],"mappings":";;;;;AA0BO,MAAM,MAAA,GAAS,UAAA,CAAwC,CAAC,KAAA,EAAO,GAAA,KAAQ;AAC5E,EAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAW,cAAA,EAAe,GAAI,aAAA;AAAA,IAC9C,gBAAA;AAAA,IACA;AAAA,GACF;AAEA,EAAA,MAAM,EAAE,OAAA,EAAS,IAAA,EAAM,GAAA,EAAK,IAAA,EAAM,SAAQ,GAAI,QAAA;AAE9C,EAAA,MAAM,CAAC,WAAA,EAAa,cAAc,CAAA,GAAI,SAEpC,SAAS,CAAA;AAEX,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,cAAA,CAAe,SAAS,CAAA;AACxB,IAAA,MAAM,GAAA,GAAM,IAAI,KAAA,EAAM;AACtB,IAAA,GAAA,CAAI,MAAA,GAAS,MAAM,cAAA,CAAe,QAAQ,CAAA;AA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/dist/style-inject.es.esm.js';
2
2
 
3
- var css_248z = "/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n@layer tokens, base, components, utilities;\n\n@layer components {\n .Avatar_bui-AvatarRoot__428369439a {\n display: inline-flex;\n justify-content: center;\n align-items: center;\n vertical-align: middle;\n border-radius: 100%;\n user-select: none;\n font-weight: 500;\n color: var(--bui-fg-primary);\n background-color: var(--bui-bg-neutral-2);\n font-size: 1rem;\n line-height: 1;\n overflow: hidden;\n flex-shrink: 0;\n height: 2rem;\n width: 2rem;\n }\n\n .Avatar_bui-AvatarRoot__428369439a[data-size='x-small'] {\n height: 1.25rem;\n width: 1.25rem;\n }\n\n .Avatar_bui-AvatarRoot__428369439a[data-size='small'] {\n height: 1.5rem;\n width: 1.5rem;\n }\n\n .Avatar_bui-AvatarRoot__428369439a[data-size='medium'] {\n height: 2rem;\n width: 2rem;\n }\n\n .Avatar_bui-AvatarRoot__428369439a[data-size='large'] {\n height: 2.5rem;\n width: 2.5rem;\n }\n\n .Avatar_bui-AvatarRoot__428369439a[data-size='x-large'] {\n height: 3rem;\n width: 3rem;\n }\n\n .Avatar_bui-AvatarImage__428369439a {\n object-fit: cover;\n height: 100%;\n width: 100%;\n display: block;\n }\n\n .Avatar_bui-AvatarFallback__428369439a {\n align-items: center;\n display: flex;\n justify-content: center;\n height: 100%;\n width: 100%;\n font-size: var(--bui-font-size-3);\n font-weight: var(--bui-font-weight-regular);\n box-shadow: inset 0 0 0 1px var(--bui-border-2);\n border-radius: var(--bui-radius-full);\n }\n}\n";
4
- var styles = {"bui-AvatarRoot":"Avatar_bui-AvatarRoot__428369439a","bui-AvatarImage":"Avatar_bui-AvatarImage__428369439a","bui-AvatarFallback":"Avatar_bui-AvatarFallback__428369439a"};
3
+ var css_248z = "/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n@layer tokens, base, components, theme, utilities;\n\n@layer components {\n .Avatar_bui-AvatarRoot__49bb4896a9 {\n display: inline-flex;\n justify-content: center;\n align-items: center;\n vertical-align: middle;\n border-radius: 100%;\n user-select: none;\n font-weight: 500;\n color: var(--bui-fg-primary);\n background-color: var(--bui-bg-neutral-2);\n font-size: 1rem;\n line-height: 1;\n overflow: hidden;\n flex-shrink: 0;\n height: 2rem;\n width: 2rem;\n }\n\n .Avatar_bui-AvatarRoot__49bb4896a9[data-size='x-small'] {\n height: 1.25rem;\n width: 1.25rem;\n }\n\n .Avatar_bui-AvatarRoot__49bb4896a9[data-size='small'] {\n height: 1.5rem;\n width: 1.5rem;\n }\n\n .Avatar_bui-AvatarRoot__49bb4896a9[data-size='medium'] {\n height: 2rem;\n width: 2rem;\n }\n\n .Avatar_bui-AvatarRoot__49bb4896a9[data-size='large'] {\n height: 2.5rem;\n width: 2.5rem;\n }\n\n .Avatar_bui-AvatarRoot__49bb4896a9[data-size='x-large'] {\n height: 3rem;\n width: 3rem;\n }\n\n .Avatar_bui-AvatarImage__49bb4896a9 {\n object-fit: cover;\n height: 100%;\n width: 100%;\n display: block;\n }\n\n .Avatar_bui-AvatarFallback__49bb4896a9 {\n align-items: center;\n display: flex;\n justify-content: center;\n height: 100%;\n width: 100%;\n font-size: var(--bui-font-size-3);\n font-weight: var(--bui-font-weight-regular);\n box-shadow: inset 0 0 0 1px var(--bui-border-2);\n border-radius: var(--bui-radius-full);\n }\n}\n";
4
+ var styles = {"bui-AvatarRoot":"Avatar_bui-AvatarRoot__49bb4896a9","bui-AvatarImage":"Avatar_bui-AvatarImage__49bb4896a9","bui-AvatarFallback":"Avatar_bui-AvatarFallback__49bb4896a9"};
5
5
  styleInject(css_248z);
6
6
 
7
7
  export { styles as default };
@@ -1 +1 @@
1
- {"version":3,"file":"Avatar.module.css.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
1
+ {"version":3,"file":"Avatar.module.css.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"definition.esm.js","sources":["../../../src/components/Avatar/definition.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { defineComponent } from '../../hooks/useDefinition';\nimport type { AvatarOwnProps } from './types';\nimport styles from './Avatar.module.css';\n\n/**\n * Component definition for Avatar\n * @public\n */\nexport const AvatarDefinition = defineComponent<AvatarOwnProps>()({\n styles,\n classNames: {\n root: 'bui-AvatarRoot',\n image: 'bui-AvatarImage',\n fallback: 'bui-AvatarFallback',\n },\n propDefs: {\n size: { dataAttribute: true, default: 'medium' },\n purpose: { default: 'informative' },\n src: {},\n name: {},\n className: {},\n },\n});\n"],"names":[],"mappings":";;;;;;;;;;;;AAwBO,MAAM,gBAAA,GAAmB,iBAAgC,CAAE;AAAA,EAChE,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,gBAAA;AAAA,IACN,KAAA,EAAO,iBAAA;AAAA,IACP,QAAA,EAAU;AAAA,GACZ;AAAA,EACA,QAAA,EAAU;AAAA,IACR,IAAA,EAAM,EAAE,aAAA,EAAe,IAAA,EAAM,SAAS,QAAA,EAAS;AAAA,IAC/C,OAAA,EAAS,EAAE,OAAA,EAAS,aAAA,EAAc;AAAA,IAClC,KAAK,EAAC;AAAA,IACN,MAAM,EAAC;AAAA,IACP,WAAW;AAAC;AAEhB,CAAC;;;;"}
1
+ {"version":3,"file":"definition.esm.js","sources":["../../../src/components/Avatar/definition.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { defineComponent } from '../../hooks/useDefinition';\nimport type { AvatarOwnProps } from './types';\nimport styles from './Avatar.module.css';\n\n/**\n * Component definition for Avatar\n * @public\n */\nexport const AvatarDefinition = defineComponent<AvatarOwnProps>()({\n styles,\n classNames: {\n root: 'bui-AvatarRoot',\n image: 'bui-AvatarImage',\n fallback: 'bui-AvatarFallback',\n },\n propDefs: {\n size: { dataAttribute: true, default: 'medium' },\n purpose: { default: 'informative' },\n src: {},\n name: {},\n className: {},\n },\n});\n"],"names":[],"mappings":";;;;;;;;;;;;AAwBO,MAAM,gBAAA,GAAmB,iBAAgC,CAAE;AAAA,EAChE,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,gBAAA;AAAA,IACN,KAAA,EAAO,iBAAA;AAAA,IACP,QAAA,EAAU;AAAA,GACZ;AAAA,EACA,QAAA,EAAU;AAAA,IACR,IAAA,EAAM,EAAE,aAAA,EAAe,IAAA,EAAM,SAAS,QAAA,EAAS;AAAA,IAC/C,OAAA,EAAS,EAAE,OAAA,EAAS,aAAA,EAAc;AAAA,IAClC,KAAK,EAAC;AAAA,IACN,MAAM,EAAC;AAAA,IACP,WAAW;AAAC;AAEhB,CAAC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Badge.esm.js","sources":["../../../src/components/Badge/Badge.tsx"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { BadgeProps } from './types';\nimport { forwardRef } from 'react';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport { BadgeDefinition } from './definition';\n\n/**\n * A non-interactive badge for labeling or categorizing content.\n *\n * @public\n */\nexport const Badge = forwardRef<HTMLSpanElement, BadgeProps>((props, ref) => {\n const { ownProps, restProps, dataAttributes } = useDefinition(\n BadgeDefinition,\n props,\n );\n const { classes, children, icon } = ownProps;\n\n return (\n <span ref={ref} className={classes.root} {...dataAttributes} {...restProps}>\n {icon && <span className={classes.icon}>{icon}</span>}\n {children}\n </span>\n );\n});\n"],"names":[],"mappings":";;;;;AA0BO,MAAM,KAAA,GAAQ,UAAA,CAAwC,CAAC,KAAA,EAAO,GAAA,KAAQ;AAC3E,EAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAW,cAAA,EAAe,GAAI,aAAA;AAAA,IAC9C,eAAA;AAAA,IACA;AAAA,GACF;AACA,EAAA,MAAM,EAAE,OAAA,EAAS,QAAA,EAAU,IAAA,EAAK,GAAI,QAAA;AAEpC,EAAA,uBACE,IAAA,CAAC,UAAK,GAAA,EAAU,SAAA,EAAW,QAAQ,IAAA,EAAO,GAAG,cAAA,EAAiB,GAAG,SAAA,EAC9D,QAAA,EAAA;AAAA,IAAA,IAAA,oBAAQ,GAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAW,OAAA,CAAQ,MAAO,QAAA,EAAA,IAAA,EAAK,CAAA;AAAA,IAC7C;AAAA,GAAA,EACH,CAAA;AAEJ,CAAC;;;;"}
1
+ {"version":3,"file":"Badge.esm.js","sources":["../../../src/components/Badge/Badge.tsx"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { BadgeProps } from './types';\nimport { forwardRef } from 'react';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport { BadgeDefinition } from './definition';\n\n/**\n * A non-interactive badge for labeling or categorizing content.\n *\n * @public\n */\nexport const Badge = forwardRef<HTMLSpanElement, BadgeProps>((props, ref) => {\n const { ownProps, restProps, dataAttributes } = useDefinition(\n BadgeDefinition,\n props,\n );\n const { classes, children, icon } = ownProps;\n\n return (\n <span ref={ref} className={classes.root} {...dataAttributes} {...restProps}>\n {icon && <span className={classes.icon}>{icon}</span>}\n {children}\n </span>\n );\n});\n"],"names":[],"mappings":";;;;;AA0BO,MAAM,KAAA,GAAQ,UAAA,CAAwC,CAAC,KAAA,EAAO,GAAA,KAAQ;AAC3E,EAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAW,cAAA,EAAe,GAAI,aAAA;AAAA,IAC9C,eAAA;AAAA,IACA;AAAA,GACF;AACA,EAAA,MAAM,EAAE,OAAA,EAAS,QAAA,EAAU,IAAA,EAAK,GAAI,QAAA;AAEpC,EAAA,uBACE,IAAA,CAAC,UAAK,GAAA,EAAU,SAAA,EAAW,QAAQ,IAAA,EAAO,GAAG,cAAA,EAAiB,GAAG,SAAA,EAC9D,QAAA,EAAA;AAAA,IAAA,IAAA,oBAAQ,GAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAW,OAAA,CAAQ,MAAO,QAAA,EAAA,IAAA,EAAK,CAAA;AAAA,IAC7C;AAAA,GAAA,EACH,CAAA;AAEJ,CAAC;;"}
@@ -1,7 +1,7 @@
1
1
  import styleInject from '../../node_modules_dist/style-inject/dist/style-inject.es.esm.js';
2
2
 
3
- var css_248z = "/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n@layer tokens, base, components, utilities;\n\n@layer components {\n .Badge_bui-Badge__be9b3c2ab1 {\n color: var(--bui-fg-primary);\n background-color: var(--bui-bg-neutral-1);\n border-radius: var(--bui-radius-2);\n display: inline-flex;\n align-items: center;\n justify-content: center;\n font-weight: var(--bui-font-weight-regular);\n line-height: 1.15;\n gap: var(--bui-space-1);\n\n &[data-on-bg='neutral-1'] {\n background-color: var(--bui-bg-neutral-2);\n }\n\n &[data-on-bg='neutral-2'] {\n background-color: var(--bui-bg-neutral-3);\n }\n\n &[data-on-bg='neutral-3'] {\n background-color: var(--bui-bg-neutral-4);\n }\n }\n\n .Badge_bui-Badge__be9b3c2ab1[data-size='small'] {\n height: 26px;\n padding: 0 var(--bui-space-2);\n font-size: var(--bui-font-size-1);\n }\n\n .Badge_bui-Badge__be9b3c2ab1[data-size='medium'] {\n height: 32px;\n padding: 0 var(--bui-space-2);\n font-size: var(--bui-font-size-2);\n }\n\n .Badge_bui-BadgeIcon__be9b3c2ab1 {\n display: flex;\n align-items: center;\n justify-content: center;\n\n svg {\n width: 1rem;\n height: 1rem;\n }\n }\n}\n";
4
- var styles = {"bui-Badge":"Badge_bui-Badge__be9b3c2ab1","bui-BadgeIcon":"Badge_bui-BadgeIcon__be9b3c2ab1"};
3
+ var css_248z = "/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n@layer tokens, base, components, theme, utilities;\n\n@layer components {\n .Badge_bui-Badge__7a25904b6a {\n color: var(--bui-fg-primary);\n background-color: var(--bui-bg-neutral-1);\n border-radius: var(--bui-radius-2);\n display: inline-flex;\n align-items: center;\n justify-content: center;\n font-weight: var(--bui-font-weight-regular);\n line-height: 1.15;\n gap: var(--bui-space-1);\n\n &[data-on-bg='neutral-1'] {\n background-color: var(--bui-bg-neutral-2);\n }\n\n &[data-on-bg='neutral-2'] {\n background-color: var(--bui-bg-neutral-3);\n }\n\n &[data-on-bg='neutral-3'] {\n background-color: var(--bui-bg-neutral-4);\n }\n }\n\n .Badge_bui-Badge__7a25904b6a[data-size='small'] {\n height: 26px;\n padding: 0 var(--bui-space-2);\n font-size: var(--bui-font-size-1);\n }\n\n .Badge_bui-Badge__7a25904b6a[data-size='medium'] {\n height: 32px;\n padding: 0 var(--bui-space-2);\n font-size: var(--bui-font-size-2);\n }\n\n .Badge_bui-BadgeIcon__7a25904b6a {\n display: flex;\n align-items: center;\n justify-content: center;\n\n svg {\n width: 1rem;\n height: 1rem;\n }\n }\n}\n";
4
+ var styles = {"bui-Badge":"Badge_bui-Badge__7a25904b6a","bui-BadgeIcon":"Badge_bui-BadgeIcon__7a25904b6a"};
5
5
  styleInject(css_248z);
6
6
 
7
7
  export { styles as default };
@@ -1 +1 @@
1
- {"version":3,"file":"Badge.module.css.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
1
+ {"version":3,"file":"Badge.module.css.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"definition.esm.js","sources":["../../../src/components/Badge/definition.ts"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { defineComponent } from '../../hooks/useDefinition';\nimport type { BadgeOwnProps } from './types';\nimport styles from './Badge.module.css';\n\n/**\n * Component definition for Badge\n * @public\n */\nexport const BadgeDefinition = defineComponent<BadgeOwnProps>()({\n styles,\n classNames: {\n root: 'bui-Badge',\n icon: 'bui-BadgeIcon',\n },\n bg: 'consumer',\n propDefs: {\n icon: {},\n size: { dataAttribute: true, default: 'small' },\n children: {},\n className: {},\n },\n});\n"],"names":[],"mappings":";;;;;;;;;;;;AAwBO,MAAM,eAAA,GAAkB,iBAA+B,CAAE;AAAA,EAC9D,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,WAAA;AAAA,IACN,IAAA,EAAM;AAAA,GACR;AAAA,EACA,EAAA,EAAI,UAAA;AAAA,EACJ,QAAA,EAAU;AAAA,IACR,MAAM,EAAC;AAAA,IACP,IAAA,EAAM,EAAE,aAAA,EAAe,IAAA,EAAM,SAAS,OAAA,EAAQ;AAAA,IAC9C,UAAU,EAAC;AAAA,IACX,WAAW;AAAC;AAEhB,CAAC;;;;"}
1
+ {"version":3,"file":"definition.esm.js","sources":["../../../src/components/Badge/definition.ts"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { defineComponent } from '../../hooks/useDefinition';\nimport type { BadgeOwnProps } from './types';\nimport styles from './Badge.module.css';\n\n/**\n * Component definition for Badge\n * @public\n */\nexport const BadgeDefinition = defineComponent<BadgeOwnProps>()({\n styles,\n classNames: {\n root: 'bui-Badge',\n icon: 'bui-BadgeIcon',\n },\n bg: 'consumer',\n propDefs: {\n icon: {},\n size: { dataAttribute: true, default: 'small' },\n children: {},\n className: {},\n },\n});\n"],"names":[],"mappings":";;;;;;;;;;;;AAwBO,MAAM,eAAA,GAAkB,iBAA+B,CAAE;AAAA,EAC9D,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,WAAA;AAAA,IACN,IAAA,EAAM;AAAA,GACR;AAAA,EACA,EAAA,EAAI,UAAA;AAAA,EACJ,QAAA,EAAU;AAAA,IACR,MAAM,EAAC;AAAA,IACP,IAAA,EAAM,EAAE,aAAA,EAAe,IAAA,EAAM,SAAS,OAAA,EAAQ;AAAA,IAC9C,UAAU,EAAC;AAAA,IACX,WAAW;AAAC;AAEhB,CAAC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Box.esm.js","sources":["../../../src/components/Box/Box.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createElement, forwardRef } from 'react';\nimport { BoxProps } from './types';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport { BoxDefinition } from './definition';\n\n/**\n * A general-purpose layout primitive that can render as any HTML element and supports spacing, sizing, and background props.\n *\n * @public\n */\nexport const Box = forwardRef<HTMLDivElement, BoxProps>((props, ref) => {\n const { ownProps, restProps, dataAttributes, utilityStyle } = useDefinition(\n BoxDefinition,\n props,\n );\n const { classes, as, childrenWithBgProvider } = ownProps;\n\n return createElement(\n as,\n {\n ref,\n className: classes.root,\n style: { ...utilityStyle, ...ownProps.style },\n ...dataAttributes,\n ...restProps,\n },\n childrenWithBgProvider,\n );\n});\n\nBox.displayName = 'Box';\n"],"names":[],"mappings":";;;;AA0BO,MAAM,GAAA,GAAM,UAAA,CAAqC,CAAC,KAAA,EAAO,GAAA,KAAQ;AACtE,EAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAW,cAAA,EAAgB,cAAa,GAAI,aAAA;AAAA,IAC5D,aAAA;AAAA,IACA;AAAA,GACF;AACA,EAAA,MAAM,EAAE,OAAA,EAAS,EAAA,EAAI,sBAAA,EAAuB,GAAI,QAAA;AAEhD,EAAA,OAAO,aAAA;AAAA,IACL,EAAA;AAAA,IACA;AAAA,MACE,GAAA;AAAA,MACA,WAAW,OAAA,CAAQ,IAAA;AAAA,MACnB,OAAO,EAAE,GAAG,YAAA,EAAc,GAAG,SAAS,KAAA,EAAM;AAAA,MAC5C,GAAG,cAAA;AAAA,MACH,GAAG;AAAA,KACL;AAAA,IACA;AAAA,GACF;AACF,CAAC;AAED,GAAA,CAAI,WAAA,GAAc,KAAA;;;;"}
1
+ {"version":3,"file":"Box.esm.js","sources":["../../../src/components/Box/Box.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createElement, forwardRef } from 'react';\nimport { BoxProps } from './types';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport { BoxDefinition } from './definition';\n\n/**\n * A general-purpose layout primitive that can render as any HTML element and supports spacing, sizing, and background props.\n *\n * @public\n */\nexport const Box = forwardRef<HTMLDivElement, BoxProps>((props, ref) => {\n const { ownProps, restProps, dataAttributes, utilityStyle } = useDefinition(\n BoxDefinition,\n props,\n );\n const { classes, as, childrenWithBgProvider } = ownProps;\n\n return createElement(\n as,\n {\n ref,\n className: classes.root,\n style: { ...utilityStyle, ...ownProps.style },\n ...dataAttributes,\n ...restProps,\n },\n childrenWithBgProvider,\n );\n});\n\nBox.displayName = 'Box';\n"],"names":[],"mappings":";;;;AA0BO,MAAM,GAAA,GAAM,UAAA,CAAqC,CAAC,KAAA,EAAO,GAAA,KAAQ;AACtE,EAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAW,cAAA,EAAgB,cAAa,GAAI,aAAA;AAAA,IAC5D,aAAA;AAAA,IACA;AAAA,GACF;AACA,EAAA,MAAM,EAAE,OAAA,EAAS,EAAA,EAAI,sBAAA,EAAuB,GAAI,QAAA;AAEhD,EAAA,OAAO,aAAA;AAAA,IACL,EAAA;AAAA,IACA;AAAA,MACE,GAAA;AAAA,MACA,WAAW,OAAA,CAAQ,IAAA;AAAA,MACnB,OAAO,EAAE,GAAG,YAAA,EAAc,GAAG,SAAS,KAAA,EAAM;AAAA,MAC5C,GAAG,cAAA;AAAA,MACH,GAAG;AAAA,KACL;AAAA,IACA;AAAA,GACF;AACF,CAAC;AAED,GAAA,CAAI,WAAA,GAAc,KAAA;;"}
@@ -1,7 +1,7 @@
1
1
  import styleInject from '../../node_modules_dist/style-inject/dist/style-inject.es.esm.js';
2
2
 
3
- var css_248z = "/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n@layer tokens, base, components, utilities;\n\n@layer components {\n .Box_bui-Box__ab80215ae2 {\n font-family: var(--bui-font-regular);\n font-weight: var(--bui-font-weight-regular);\n color: var(--bui-fg-primary);\n }\n}\n";
4
- var styles = {"bui-Box":"Box_bui-Box__ab80215ae2"};
3
+ var css_248z = "/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n@layer tokens, base, components, theme, utilities;\n\n@layer components {\n .Box_bui-Box__a36843388d {\n font-family: var(--bui-font-regular);\n font-weight: var(--bui-font-weight-regular);\n color: var(--bui-fg-primary);\n }\n}\n";
4
+ var styles = {"bui-Box":"Box_bui-Box__a36843388d"};
5
5
  styleInject(css_248z);
6
6
 
7
7
  export { styles as default };
@@ -1 +1 @@
1
- {"version":3,"file":"Box.module.css.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
1
+ {"version":3,"file":"Box.module.css.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"definition.esm.js","sources":["../../../src/components/Box/definition.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { defineComponent } from '../../hooks/useDefinition';\nimport type { BoxOwnProps } from './types';\nimport styles from './Box.module.css';\n\n/**\n * Component definition for Box\n * @public\n */\nexport const BoxDefinition = defineComponent<BoxOwnProps>()({\n styles,\n classNames: {\n root: 'bui-Box',\n },\n bg: 'provider',\n propDefs: {\n as: { default: 'div' },\n bg: { dataAttribute: true },\n children: {},\n className: {},\n style: {},\n },\n utilityProps: [\n 'm',\n 'mb',\n 'ml',\n 'mr',\n 'mt',\n 'mx',\n 'my',\n 'p',\n 'pb',\n 'pl',\n 'pr',\n 'pt',\n 'px',\n 'py',\n 'position',\n 'display',\n 'grow',\n 'shrink',\n 'basis',\n 'width',\n 'minWidth',\n 'maxWidth',\n 'height',\n 'minHeight',\n 'maxHeight',\n ],\n});\n"],"names":[],"mappings":";;;;;;;;;;;;AAwBO,MAAM,aAAA,GAAgB,iBAA6B,CAAE;AAAA,EAC1D,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA,EAAA,EAAI,UAAA;AAAA,EACJ,QAAA,EAAU;AAAA,IACR,EAAA,EAAI,EAAE,OAAA,EAAS,KAAA,EAAM;AAAA,IACrB,EAAA,EAAI,EAAE,aAAA,EAAe,IAAA,EAAK;AAAA,IAC1B,UAAU,EAAC;AAAA,IACX,WAAW,EAAC;AAAA,IACZ,OAAO;AAAC,GACV;AAAA,EACA,YAAA,EAAc;AAAA,IACZ,GAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,GAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,UAAA;AAAA,IACA,SAAA;AAAA,IACA,MAAA;AAAA,IACA,QAAA;AAAA,IACA,OAAA;AAAA,IACA,OAAA;AAAA,IACA,UAAA;AAAA,IACA,UAAA;AAAA,IACA,QAAA;AAAA,IACA,WAAA;AAAA,IACA;AAAA;AAEJ,CAAC;;;;"}
1
+ {"version":3,"file":"definition.esm.js","sources":["../../../src/components/Box/definition.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { defineComponent } from '../../hooks/useDefinition';\nimport type { BoxOwnProps } from './types';\nimport styles from './Box.module.css';\n\n/**\n * Component definition for Box\n * @public\n */\nexport const BoxDefinition = defineComponent<BoxOwnProps>()({\n styles,\n classNames: {\n root: 'bui-Box',\n },\n bg: 'provider',\n propDefs: {\n as: { default: 'div' },\n bg: { dataAttribute: true },\n children: {},\n className: {},\n style: {},\n },\n utilityProps: [\n 'm',\n 'mb',\n 'ml',\n 'mr',\n 'mt',\n 'mx',\n 'my',\n 'p',\n 'pb',\n 'pl',\n 'pr',\n 'pt',\n 'px',\n 'py',\n 'position',\n 'display',\n 'grow',\n 'shrink',\n 'basis',\n 'width',\n 'minWidth',\n 'maxWidth',\n 'height',\n 'minHeight',\n 'maxHeight',\n ],\n});\n"],"names":[],"mappings":";;;;;;;;;;;;AAwBO,MAAM,aAAA,GAAgB,iBAA6B,CAAE;AAAA,EAC1D,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA,EAAA,EAAI,UAAA;AAAA,EACJ,QAAA,EAAU;AAAA,IACR,EAAA,EAAI,EAAE,OAAA,EAAS,KAAA,EAAM;AAAA,IACrB,EAAA,EAAI,EAAE,aAAA,EAAe,IAAA,EAAK;AAAA,IAC1B,UAAU,EAAC;AAAA,IACX,WAAW,EAAC;AAAA,IACZ,OAAO;AAAC,GACV;AAAA,EACA,YAAA,EAAc;AAAA,IACZ,GAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,GAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,UAAA;AAAA,IACA,SAAA;AAAA,IACA,MAAA;AAAA,IACA,QAAA;AAAA,IACA,OAAA;AAAA,IACA,OAAA;AAAA,IACA,UAAA;AAAA,IACA,UAAA;AAAA,IACA,QAAA;AAAA,IACA,WAAA;AAAA,IACA;AAAA;AAEJ,CAAC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Button.esm.js","sources":["../../../src/components/Button/Button.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { forwardRef, Ref } from 'react';\nimport { Button as RAButton, ProgressBar } from 'react-aria-components';\nimport { RiLoader4Line } from '@remixicon/react';\nimport type { ButtonProps } from './types';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport { ButtonDefinition } from './definition';\n\n/**\n * A button component built on React Aria Components that provides accessible\n * interactive elements for triggering actions.\n *\n * @remarks\n * The Button component supports multiple variants (primary, secondary, tertiary, danger),\n * sizes (small, medium), and states including loading and disabled. It automatically\n * handles keyboard navigation, focus management, and ARIA attributes for accessibility.\n *\n * @example\n * Basic usage:\n * ```tsx\n * <Button>Click me</Button>\n * ```\n *\n * @example\n * With icons and loading state:\n * ```tsx\n * <Button\n * variant=\"primary\"\n * size=\"medium\"\n * iconStart={<IconComponent />}\n * isPending={isSubmitting}\n * >\n * Submit\n * </Button>\n * ```\n *\n * @public\n */\nexport const Button = forwardRef(\n (props: ButtonProps, ref: Ref<HTMLButtonElement>) => {\n const { ownProps, restProps, dataAttributes } = useDefinition(\n ButtonDefinition,\n // Merge deprecated `loading` into `isPending` so data attributes and\n // internal logic only need to check a single prop.\n {\n ...props,\n isPending:\n props.isPending || props.loading\n ? true\n : props.isPending ?? props.loading,\n },\n );\n const { classes, iconStart, iconEnd, isPending, children } = ownProps;\n\n return (\n <RAButton\n className={classes.root}\n ref={ref}\n isPending={isPending}\n {...dataAttributes}\n {...restProps}\n >\n {({ isPending }) => (\n <>\n <span className={classes.content}>\n {iconStart}\n {children}\n {iconEnd}\n </span>\n\n {isPending && (\n <ProgressBar\n aria-label=\"Loading\"\n isIndeterminate\n className={classes.spinner}\n >\n <RiLoader4Line aria-hidden=\"true\" />\n </ProgressBar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A,EAEJ;AACF;AAEA,MAAA,CAAO,WAAA,GAAc,QAAA;;;;"}
1
+ {"version":3,"file":"Button.esm.js","sources":["../../../src/components/Button/Button.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { forwardRef, Ref } from 'react';\nimport { Button as RAButton, ProgressBar } from 'react-aria-components';\nimport { RiLoader4Line } from '@remixicon/react';\nimport type { ButtonProps } from './types';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport { ButtonDefinition } from './definition';\n\n/**\n * A button component built on React Aria Components that provides accessible\n * interactive elements for triggering actions.\n *\n * @remarks\n * The Button component supports multiple variants (primary, secondary, tertiary, danger),\n * sizes (small, medium), and states including loading and disabled. It automatically\n * handles keyboard navigation, focus management, and ARIA attributes for accessibility.\n *\n * @example\n * Basic usage:\n * ```tsx\n * <Button>Click me</Button>\n * ```\n *\n * @example\n * With icons and loading state:\n * ```tsx\n * <Button\n * variant=\"primary\"\n * size=\"medium\"\n * iconStart={<IconComponent />}\n * isPending={isSubmitting}\n * >\n * Submit\n * </Button>\n * ```\n *\n * @public\n */\nexport const Button = forwardRef(\n (props: ButtonProps, ref: Ref<HTMLButtonElement>) => {\n const { ownProps, restProps, dataAttributes } = useDefinition(\n ButtonDefinition,\n // Merge deprecated `loading` into `isPending` so data attributes and\n // internal logic only need to check a single prop.\n {\n ...props,\n isPending:\n props.isPending || props.loading\n ? true\n : props.isPending ?? props.loading,\n },\n );\n const { classes, iconStart, iconEnd, isPending, children } = ownProps;\n\n return (\n <RAButton\n className={classes.root}\n ref={ref}\n isPending={isPending}\n {...dataAttributes}\n {...restProps}\n >\n {({ isPending }) => (\n <>\n <span className={classes.content}>\n {iconStart}\n {children}\n {iconEnd}\n </span>\n\n {isPending && (\n <ProgressBar\n aria-label=\"Loading\"\n isIndeterminate\n className={classes.spinner}\n >\n <RiLoader4Line aria-hidden=\"true\" />\n </ProgressBar>\n )}\n </>\n )}\n </RAButton>\n );\n },\n);\n\nButton.displayName = 'Button';\n"],"names":["RAButton","isPending"],"mappings":";;;;;;;AAqDO,MAAM,MAAA,GAAS,UAAA;AAAA,EACpB,CAAC,OAAoB,GAAA,KAAgC;AACnD,IAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAW,cAAA,EAAe,GAAI,aAAA;AAAA,MAC9C,gBAAA;AAAA;AAAA;AAAA,MAGA;AAAA,QACE,GAAG,KAAA;AAAA,QACH,SAAA,EACE,MAAM,SAAA,IAAa,KAAA,CAAM,UACrB,IAAA,GACA,KAAA,CAAM,aAAa,KAAA,CAAM;AAAA;AACjC,KACF;AACA,IAAA,MAAM,EAAE,OAAA,EAAS,SAAA,EAAW,OAAA,EAAS,SAAA,EAAW,UAAS,GAAI,QAAA;AAE7D,IAAA,uBACE,GAAA;AAAA,MAACA,QAAA;AAAA,MAAA;AAAA,QACC,WAAW,OAAA,CAAQ,IAAA;AAAA,QACnB,GAAA;AAAA,QACA,SAAA;AAAA,QACC,GAAG,cAAA;AAAA,QACH,GAAG,SAAA;AAAA,QAEH,QAAA,EAAA,CAAC,EAAE,SAAA,EAAAC,UAAAA,uBACF,IAAA,CAAA,QAAA,EAAA,EACE,QAAA,EAAA;AAAA,0BAAA,IAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAW,OAAA,CAAQ,OAAA,EACtB,QAAA,EAAA;AAAA,YAAA,SAAA;AAAA,YACA,QAAA;AAAA,YACA;AAAA,WAAA,EACH,CAAA;AAAA,UAECA,UAAAA,oBACC,GAAA;AAAA,YAAC,WAAA;AAAA,YAAA;AAAA,cACC,YAAA,EAAW,SAAA;AAAA,cACX,eAAA,EAAe,IAAA;AAAA,cACf,WAAW,OAAA,CAAQ,OAAA;AAAA,cAEnB,QAAA,kBAAA,GAAA,CAAC,aAAA,EAAA,EAAc,aAAA,EAAY,MAAA,EAAO;AAAA;AAAA;AACpC,SAAA,EAEJ;AAAA;AAAA,KAEJ;AAAA,EAEJ;AACF;AAEA,MAAA,CAAO,WAAA,GAAc,QAAA;;"}
@@ -1,7 +1,7 @@
1
1
  import styleInject from '../../node_modules_dist/style-inject/dist/style-inject.es.esm.js';
2
2
 
3
- var css_248z = "/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n@layer tokens, base, components, utilities;\n\n@layer components {\n .Button_bui-Button__ce50652a10 {\n --loading-duration: 200ms;\n --bg: transparent;\n --bg-hover: transparent;\n --bg-active: transparent;\n --fg: inherit;\n\n position: relative;\n display: inline-flex;\n border: none;\n user-select: none;\n font-family: var(--bui-font-regular);\n font-weight: var(--bui-font-weight-bold);\n line-height: 1.15;\n padding: 0;\n cursor: pointer;\n border-radius: var(--bui-radius-2);\n flex-shrink: 0;\n transition: background-color var(--loading-duration) ease-out,\n box-shadow var(--loading-duration) ease-out;\n\n /* Apply variables */\n color: var(--fg);\n background-color: var(--bg);\n\n &:hover {\n background-color: var(--bg-hover);\n transition: background-color 150ms ease;\n }\n\n &:active {\n background-color: var(--bg-active);\n }\n\n &[data-disabled='true'] {\n cursor: not-allowed;\n }\n\n &[data-ispending='true'] {\n cursor: wait;\n }\n }\n\n .Button_bui-Button__ce50652a10[data-variant='primary'] {\n --bg: var(--bui-bg-solid);\n --bg-hover: var(--bui-bg-solid-hover);\n --bg-active: var(--bui-bg-solid-pressed);\n --fg: var(--bui-fg-solid);\n\n &[data-disabled='true'],\n &[data-ispending='true'] {\n --bg: var(--bui-bg-solid-disabled);\n --bg-hover: var(--bui-bg-solid-disabled);\n --bg-active: var(--bui-bg-solid-disabled);\n --fg: var(--bui-fg-solid-disabled);\n }\n\n &[data-focus-visible] {\n outline: 2px solid var(--bui-ring);\n outline-offset: 2px;\n }\n }\n\n .Button_bui-Button__ce50652a10[data-variant='primary'][data-destructive='true'] {\n /* Custom properties matching future token names (without bui- prefix) */\n --bg-solid-danger: #dc2626;\n --bg-solid-danger-hover: #b91c1c;\n --bg-solid-danger-pressed: #991b1b;\n --bg-solid-danger-disabled: #fca5a5;\n --fg-solid-danger: var(--bui-white);\n\n [data-theme-mode='dark'] & {\n --bg-solid-danger: #ef4444;\n --bg-solid-danger-hover: #dc2626;\n --bg-solid-danger-pressed: #b91c1c;\n --bg-solid-danger-disabled: #7f1d1d;\n }\n\n --bg: var(--bg-solid-danger);\n --bg-hover: var(--bg-solid-danger-hover);\n --bg-active: var(--bg-solid-danger-pressed);\n --fg: var(--fg-solid-danger);\n\n &[data-disabled='true'],\n &[data-ispending='true'] {\n --bg: var(--bg-solid-danger-disabled);\n --bg-hover: var(--bg-solid-danger-disabled);\n --bg-active: var(--bg-solid-danger-disabled);\n }\n\n &[data-focus-visible] {\n outline: 2px solid var(--bui-border-danger);\n outline-offset: 2px;\n }\n }\n\n .Button_bui-Button__ce50652a10[data-variant='secondary'] {\n --bg: var(--bui-bg-neutral-1);\n --bg-hover: var(--bui-bg-neutral-1-hover);\n --bg-active: var(--bui-bg-neutral-1-pressed);\n --fg: var(--bui-fg-primary);\n\n &[data-on-bg='neutral-1'] {\n --bg: var(--bui-bg-neutral-2);\n --bg-hover: var(--bui-bg-neutral-2-hover);\n --bg-active: var(--bui-bg-neutral-2-pressed);\n }\n\n &[data-on-bg='neutral-2'] {\n --bg: var(--bui-bg-neutral-3);\n --bg-hover: var(--bui-bg-neutral-3-hover);\n --bg-active: var(--bui-bg-neutral-3-pressed);\n }\n\n &[data-on-bg='neutral-3'] {\n --bg: var(--bui-bg-neutral-4);\n --bg-hover: var(--bui-bg-neutral-4-hover);\n --bg-active: var(--bui-bg-neutral-4-pressed);\n }\n\n &[data-disabled='true'],\n &[data-ispending='true'] {\n --bg-hover: var(--bg);\n --bg-active: var(--bg);\n --fg: var(--bui-fg-disabled);\n }\n\n &[data-focus-visible] {\n outline: none;\n transition: none;\n box-shadow: inset 0 0 0 2px var(--bui-ring);\n }\n }\n\n .Button_bui-Button__ce50652a10[data-variant='secondary'][data-destructive='true'] {\n /* Custom properties for hover/active states (no tokens exist yet) */\n --bg-danger-hover: #fecaca;\n --bg-danger-pressed: #fca5a5;\n\n [data-theme-mode='dark'] & {\n --bg-danger-hover: #450a0a;\n --bg-danger-pressed: #7f1d1d;\n }\n\n --bg: var(--bui-bg-danger);\n --bg-hover: var(--bg-danger-hover);\n --bg-active: var(--bg-danger-pressed);\n --fg: var(--bui-fg-danger);\n\n &[data-disabled='true'],\n &[data-ispending='true'] {\n --bg-hover: var(--bg);\n --bg-active: var(--bg);\n --fg: var(--bui-fg-disabled);\n }\n\n &[data-focus-visible] {\n box-shadow: inset 0 0 0 2px var(--bui-border-danger);\n }\n }\n\n .Button_bui-Button__ce50652a10[data-variant='tertiary'] {\n --bg-hover: var(--bui-bg-neutral-1-hover);\n --bg-active: var(--bui-bg-neutral-1-pressed);\n --fg: var(--bui-fg-primary);\n\n &[data-on-bg='neutral-1'] {\n --bg-hover: var(--bui-bg-neutral-2-hover);\n --bg-active: var(--bui-bg-neutral-2-pressed);\n }\n\n &[data-on-bg='neutral-2'] {\n --bg-hover: var(--bui-bg-neutral-3-hover);\n --bg-active: var(--bui-bg-neutral-3-pressed);\n }\n\n &[data-on-bg='neutral-3'] {\n --bg-hover: var(--bui-bg-neutral-4-hover);\n --bg-active: var(--bui-bg-neutral-4-pressed);\n }\n\n &[data-disabled='true'],\n &[data-ispending='true'] {\n --bg-hover: var(--bg);\n --bg-active: var(--bg);\n --fg: var(--bui-fg-disabled);\n }\n\n &[data-focus-visible] {\n outline: none;\n transition: none;\n box-shadow: inset 0 0 0 2px var(--bui-ring);\n }\n }\n\n .Button_bui-Button__ce50652a10[data-variant='tertiary'][data-destructive='true'] {\n /* Custom properties for hover/active states (no tokens exist yet) */\n --bg-danger-hover: #fecaca;\n --bg-danger-pressed: #fca5a5;\n\n [data-theme-mode='dark'] & {\n --bg-danger-hover: #450a0a;\n --bg-danger-pressed: #7f1d1d;\n }\n\n --bg-hover: var(--bui-bg-danger);\n --bg-active: var(--bg-danger-pressed);\n --fg: var(--bui-fg-danger);\n\n &[data-disabled='true'],\n &[data-ispending='true'] {\n --bg-hover: var(--bg);\n --bg-active: var(--bg);\n --fg: var(--bui-fg-disabled);\n }\n\n &[data-focus-visible] {\n box-shadow: inset 0 0 0 2px var(--bui-border-danger);\n }\n }\n\n .Button_bui-Button__ce50652a10[data-size='small'] {\n font-size: var(--bui-font-size-3);\n padding: 0 var(--bui-space-2);\n height: 2rem;\n\n svg {\n width: 1rem;\n height: 1rem;\n }\n }\n\n .Button_bui-Button__ce50652a10[data-size='medium'] {\n font-size: var(--bui-font-size-4);\n padding: 0 var(--bui-space-3);\n height: 2.5rem;\n\n svg {\n width: 1.25rem;\n height: 1.25rem;\n }\n }\n\n .Button_bui-ButtonContent__ce50652a10 {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: var(--bui-space-1_5);\n height: 100%;\n width: 100%;\n transition: opacity var(--loading-duration) ease-out;\n\n .Button_bui-Button__ce50652a10[data-ispending='true'] & {\n opacity: 0;\n }\n }\n\n .Button_bui-ButtonSpinner__ce50652a10 {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n display: flex;\n opacity: 0;\n transition: opacity var(--loading-duration) ease-in;\n\n .Button_bui-Button__ce50652a10[data-ispending='true'] & {\n opacity: 1;\n }\n\n & svg {\n animation: Button_bui-spin__ce50652a10 1s linear infinite;\n }\n }\n\n @media (prefers-reduced-motion: reduce) {\n .Button_bui-Button__ce50652a10 {\n transition-duration: 50ms;\n }\n\n .Button_bui-ButtonContent__ce50652a10 {\n transition-duration: 50ms;\n }\n\n .Button_bui-ButtonSpinner__ce50652a10 {\n transition-duration: 50ms;\n }\n\n .Button_bui-ButtonSpinner__ce50652a10 svg {\n animation: none;\n }\n }\n\n @keyframes Button_bui-spin__ce50652a10 {\n from {\n transform: rotate(0deg);\n }\n\n to {\n transform: rotate(360deg);\n }\n }\n}\n";
4
- var styles = {"bui-Button":"Button_bui-Button__ce50652a10","bui-ButtonContent":"Button_bui-ButtonContent__ce50652a10","bui-ButtonSpinner":"Button_bui-ButtonSpinner__ce50652a10","bui-spin":"Button_bui-spin__ce50652a10"};
3
+ var css_248z = "/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n@layer tokens, base, components, theme, utilities;\n\n@layer components {\n .Button_bui-Button__56261dcf70 {\n --loading-duration: 200ms;\n --bg: transparent;\n --bg-hover: transparent;\n --bg-active: transparent;\n --fg: inherit;\n\n position: relative;\n display: inline-flex;\n border: none;\n user-select: none;\n font-family: var(--bui-font-regular);\n font-weight: var(--bui-font-weight-bold);\n line-height: 1.15;\n padding: 0;\n cursor: pointer;\n border-radius: var(--bui-radius-2);\n flex-shrink: 0;\n transition: background-color var(--loading-duration) ease-out,\n box-shadow var(--loading-duration) ease-out;\n\n /* Apply variables */\n color: var(--fg);\n background-color: var(--bg);\n\n &:hover {\n background-color: var(--bg-hover);\n transition: background-color 150ms ease;\n }\n\n &:active {\n background-color: var(--bg-active);\n }\n\n &[data-disabled='true'] {\n cursor: not-allowed;\n }\n\n &[data-ispending='true'] {\n cursor: wait;\n }\n }\n\n .Button_bui-Button__56261dcf70[data-variant='primary'] {\n --bg: var(--bui-bg-solid);\n --bg-hover: var(--bui-bg-solid-hover);\n --bg-active: var(--bui-bg-solid-pressed);\n --fg: var(--bui-fg-solid);\n\n &[data-disabled='true'],\n &[data-ispending='true'] {\n --bg: var(--bui-bg-solid-disabled);\n --bg-hover: var(--bui-bg-solid-disabled);\n --bg-active: var(--bui-bg-solid-disabled);\n --fg: var(--bui-fg-solid-disabled);\n }\n\n &[data-focus-visible] {\n outline: 2px solid var(--bui-ring);\n outline-offset: 2px;\n }\n }\n\n .Button_bui-Button__56261dcf70[data-variant='primary'][data-destructive='true'] {\n /* Custom properties matching future token names (without bui- prefix) */\n --bg-solid-danger: #dc2626;\n --bg-solid-danger-hover: #b91c1c;\n --bg-solid-danger-pressed: #991b1b;\n --bg-solid-danger-disabled: #fca5a5;\n --fg-solid-danger: var(--bui-white);\n\n [data-theme-mode='dark'] & {\n --bg-solid-danger: #ef4444;\n --bg-solid-danger-hover: #dc2626;\n --bg-solid-danger-pressed: #b91c1c;\n --bg-solid-danger-disabled: #7f1d1d;\n }\n\n --bg: var(--bg-solid-danger);\n --bg-hover: var(--bg-solid-danger-hover);\n --bg-active: var(--bg-solid-danger-pressed);\n --fg: var(--fg-solid-danger);\n\n &[data-disabled='true'],\n &[data-ispending='true'] {\n --bg: var(--bg-solid-danger-disabled);\n --bg-hover: var(--bg-solid-danger-disabled);\n --bg-active: var(--bg-solid-danger-disabled);\n }\n\n &[data-focus-visible] {\n outline: 2px solid var(--bui-border-danger);\n outline-offset: 2px;\n }\n }\n\n .Button_bui-Button__56261dcf70[data-variant='secondary'] {\n --bg: var(--bui-bg-neutral-1);\n --bg-hover: var(--bui-bg-neutral-1-hover);\n --bg-active: var(--bui-bg-neutral-1-pressed);\n --fg: var(--bui-fg-primary);\n\n &[data-on-bg='neutral-1'] {\n --bg: var(--bui-bg-neutral-2);\n --bg-hover: var(--bui-bg-neutral-2-hover);\n --bg-active: var(--bui-bg-neutral-2-pressed);\n }\n\n &[data-on-bg='neutral-2'] {\n --bg: var(--bui-bg-neutral-3);\n --bg-hover: var(--bui-bg-neutral-3-hover);\n --bg-active: var(--bui-bg-neutral-3-pressed);\n }\n\n &[data-on-bg='neutral-3'] {\n --bg: var(--bui-bg-neutral-4);\n --bg-hover: var(--bui-bg-neutral-4-hover);\n --bg-active: var(--bui-bg-neutral-4-pressed);\n }\n\n &[data-disabled='true'],\n &[data-ispending='true'] {\n --bg-hover: var(--bg);\n --bg-active: var(--bg);\n --fg: var(--bui-fg-disabled);\n }\n\n &[data-focus-visible] {\n outline: none;\n transition: none;\n box-shadow: inset 0 0 0 2px var(--bui-ring);\n }\n }\n\n .Button_bui-Button__56261dcf70[data-variant='secondary'][data-destructive='true'] {\n /* Custom properties for hover/active states (no tokens exist yet) */\n --bg-danger-hover: #fecaca;\n --bg-danger-pressed: #fca5a5;\n\n [data-theme-mode='dark'] & {\n --bg-danger-hover: #450a0a;\n --bg-danger-pressed: #7f1d1d;\n }\n\n --bg: var(--bui-bg-danger);\n --bg-hover: var(--bg-danger-hover);\n --bg-active: var(--bg-danger-pressed);\n --fg: var(--bui-fg-danger);\n\n &[data-disabled='true'],\n &[data-ispending='true'] {\n --bg-hover: var(--bg);\n --bg-active: var(--bg);\n --fg: var(--bui-fg-disabled);\n }\n\n &[data-focus-visible] {\n box-shadow: inset 0 0 0 2px var(--bui-border-danger);\n }\n }\n\n .Button_bui-Button__56261dcf70[data-variant='tertiary'] {\n --bg-hover: var(--bui-bg-neutral-1-hover);\n --bg-active: var(--bui-bg-neutral-1-pressed);\n --fg: var(--bui-fg-primary);\n\n &[data-on-bg='neutral-1'] {\n --bg-hover: var(--bui-bg-neutral-2-hover);\n --bg-active: var(--bui-bg-neutral-2-pressed);\n }\n\n &[data-on-bg='neutral-2'] {\n --bg-hover: var(--bui-bg-neutral-3-hover);\n --bg-active: var(--bui-bg-neutral-3-pressed);\n }\n\n &[data-on-bg='neutral-3'] {\n --bg-hover: var(--bui-bg-neutral-4-hover);\n --bg-active: var(--bui-bg-neutral-4-pressed);\n }\n\n &[data-disabled='true'],\n &[data-ispending='true'] {\n --bg-hover: var(--bg);\n --bg-active: var(--bg);\n --fg: var(--bui-fg-disabled);\n }\n\n &[data-focus-visible] {\n outline: none;\n transition: none;\n box-shadow: inset 0 0 0 2px var(--bui-ring);\n }\n }\n\n .Button_bui-Button__56261dcf70[data-variant='tertiary'][data-destructive='true'] {\n /* Custom properties for hover/active states (no tokens exist yet) */\n --bg-danger-hover: #fecaca;\n --bg-danger-pressed: #fca5a5;\n\n [data-theme-mode='dark'] & {\n --bg-danger-hover: #450a0a;\n --bg-danger-pressed: #7f1d1d;\n }\n\n --bg-hover: var(--bui-bg-danger);\n --bg-active: var(--bg-danger-pressed);\n --fg: var(--bui-fg-danger);\n\n &[data-disabled='true'],\n &[data-ispending='true'] {\n --bg-hover: var(--bg);\n --bg-active: var(--bg);\n --fg: var(--bui-fg-disabled);\n }\n\n &[data-focus-visible] {\n box-shadow: inset 0 0 0 2px var(--bui-border-danger);\n }\n }\n\n .Button_bui-Button__56261dcf70[data-size='small'] {\n font-size: var(--bui-font-size-3);\n padding: 0 var(--bui-space-2);\n height: 2rem;\n\n svg {\n width: 1rem;\n height: 1rem;\n }\n }\n\n .Button_bui-Button__56261dcf70[data-size='medium'] {\n font-size: var(--bui-font-size-4);\n padding: 0 var(--bui-space-3);\n height: 2.5rem;\n\n svg {\n width: 1.25rem;\n height: 1.25rem;\n }\n }\n\n .Button_bui-ButtonContent__56261dcf70 {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: var(--bui-space-1_5);\n height: 100%;\n width: 100%;\n transition: opacity var(--loading-duration) ease-out;\n\n .Button_bui-Button__56261dcf70[data-ispending='true'] & {\n opacity: 0;\n }\n }\n\n .Button_bui-ButtonSpinner__56261dcf70 {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n display: flex;\n opacity: 0;\n transition: opacity var(--loading-duration) ease-in;\n\n .Button_bui-Button__56261dcf70[data-ispending='true'] & {\n opacity: 1;\n }\n\n & svg {\n animation: Button_bui-spin__56261dcf70 1s linear infinite;\n }\n }\n\n @media (prefers-reduced-motion: reduce) {\n .Button_bui-Button__56261dcf70 {\n transition-duration: 50ms;\n }\n\n .Button_bui-ButtonContent__56261dcf70 {\n transition-duration: 50ms;\n }\n\n .Button_bui-ButtonSpinner__56261dcf70 {\n transition-duration: 50ms;\n }\n\n .Button_bui-ButtonSpinner__56261dcf70 svg {\n animation: none;\n }\n }\n\n @keyframes Button_bui-spin__56261dcf70 {\n from {\n transform: rotate(0deg);\n }\n\n to {\n transform: rotate(360deg);\n }\n }\n}\n";
4
+ var styles = {"bui-Button":"Button_bui-Button__56261dcf70","bui-ButtonContent":"Button_bui-ButtonContent__56261dcf70","bui-ButtonSpinner":"Button_bui-ButtonSpinner__56261dcf70","bui-spin":"Button_bui-spin__56261dcf70"};
5
5
  styleInject(css_248z);
6
6
 
7
7
  export { styles as default };
@@ -1 +1 @@
1
- {"version":3,"file":"Button.module.css.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
1
+ {"version":3,"file":"Button.module.css.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"definition.esm.js","sources":["../../../src/components/Button/definition.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { defineComponent } from '../../hooks/useDefinition';\nimport type { ButtonOwnProps } from './types';\nimport styles from './Button.module.css';\n\n/**\n * Component definition for Button\n * @public\n */\nexport const ButtonDefinition = defineComponent<ButtonOwnProps>()({\n styles,\n classNames: {\n root: 'bui-Button',\n content: 'bui-ButtonContent',\n spinner: 'bui-ButtonSpinner',\n },\n bg: 'consumer',\n propDefs: {\n size: { dataAttribute: true, default: 'small' },\n variant: { dataAttribute: true, default: 'primary' },\n destructive: { dataAttribute: true },\n isPending: { dataAttribute: true },\n loading: { dataAttribute: true },\n iconStart: {},\n iconEnd: {},\n children: {},\n className: {},\n },\n});\n"],"names":[],"mappings":";;;;;;;;;;;;AAwBO,MAAM,gBAAA,GAAmB,iBAAgC,CAAE;AAAA,EAChE,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,YAAA;AAAA,IACN,OAAA,EAAS,mBAAA;AAAA,IACT,OAAA,EAAS;AAAA,GACX;AAAA,EACA,EAAA,EAAI,UAAA;AAAA,EACJ,QAAA,EAAU;AAAA,IACR,IAAA,EAAM,EAAE,aAAA,EAAe,IAAA,EAAM,SAAS,OAAA,EAAQ;AAAA,IAC9C,OAAA,EAAS,EAAE,aAAA,EAAe,IAAA,EAAM,SAAS,SAAA,EAAU;AAAA,IACnD,WAAA,EAAa,EAAE,aAAA,EAAe,IAAA,EAAK;AAAA,IACnC,SAAA,EAAW,EAAE,aAAA,EAAe,IAAA,EAAK;AAAA,IACjC,OAAA,EAAS,EAAE,aAAA,EAAe,IAAA,EAAK;AAAA,IAC/B,WAAW,EAAC;AAAA,IACZ,SAAS,EAAC;AAAA,IACV,UAAU,EAAC;AAAA,IACX,WAAW;AAAC;AAEhB,CAAC;;;;"}
1
+ {"version":3,"file":"definition.esm.js","sources":["../../../src/components/Button/definition.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { defineComponent } from '../../hooks/useDefinition';\nimport type { ButtonOwnProps } from './types';\nimport styles from './Button.module.css';\n\n/**\n * Component definition for Button\n * @public\n */\nexport const ButtonDefinition = defineComponent<ButtonOwnProps>()({\n styles,\n classNames: {\n root: 'bui-Button',\n content: 'bui-ButtonContent',\n spinner: 'bui-ButtonSpinner',\n },\n bg: 'consumer',\n propDefs: {\n size: { dataAttribute: true, default: 'small' },\n variant: { dataAttribute: true, default: 'primary' },\n destructive: { dataAttribute: true },\n isPending: { dataAttribute: true },\n loading: { dataAttribute: true },\n iconStart: {},\n iconEnd: {},\n children: {},\n className: {},\n },\n});\n"],"names":[],"mappings":";;;;;;;;;;;;AAwBO,MAAM,gBAAA,GAAmB,iBAAgC,CAAE;AAAA,EAChE,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,YAAA;AAAA,IACN,OAAA,EAAS,mBAAA;AAAA,IACT,OAAA,EAAS;AAAA,GACX;AAAA,EACA,EAAA,EAAI,UAAA;AAAA,EACJ,QAAA,EAAU;AAAA,IACR,IAAA,EAAM,EAAE,aAAA,EAAe,IAAA,EAAM,SAAS,OAAA,EAAQ;AAAA,IAC9C,OAAA,EAAS,EAAE,aAAA,EAAe,IAAA,EAAM,SAAS,SAAA,EAAU;AAAA,IACnD,WAAA,EAAa,EAAE,aAAA,EAAe,IAAA,EAAK;AAAA,IACnC,SAAA,EAAW,EAAE,aAAA,EAAe,IAAA,EAAK;AAAA,IACjC,OAAA,EAAS,EAAE,aAAA,EAAe,IAAA,EAAK;AAAA,IAC/B,WAAW,EAAC;AAAA,IACZ,SAAS,EAAC;AAAA,IACV,UAAU,EAAC;AAAA,IACX,WAAW;AAAC;AAEhB,CAAC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonIcon.esm.js","sources":["../../../src/components/ButtonIcon/ButtonIcon.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { forwardRef, Ref } from 'react';\nimport { Button as RAButton, ProgressBar } from 'react-aria-components';\nimport { RiLoader4Line } from '@remixicon/react';\nimport type { ButtonIconProps } from './types';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport { ButtonIconDefinition } from './definition';\n\n/**\n * An icon-only button that supports a loading state and requires an accessible label.\n *\n * @public\n */\nexport const ButtonIcon = forwardRef(\n (props: ButtonIconProps, ref: Ref<HTMLButtonElement>) => {\n const { ownProps, restProps, dataAttributes } = useDefinition(\n ButtonIconDefinition,\n // Merge deprecated `loading` into `isPending` so data attributes and\n // internal logic only need to check a single prop.\n {\n ...props,\n isPending:\n props.isPending || props.loading\n ? true\n : props.isPending ?? props.loading,\n },\n );\n const { classes, icon, isPending } = ownProps;\n\n return (\n <RAButton\n className={classes.root}\n ref={ref}\n isPending={isPending}\n {...dataAttributes}\n {...restProps}\n >\n {({ isPending }) => (\n <>\n <span className={classes.content}>{icon}</span>\n\n {isPending && (\n <ProgressBar\n aria-label=\"Loading\"\n isIndeterminate\n className={classes.spinner}\n >\n <RiLoader4Line aria-hidden=\"true\" />\n </ProgressBar>\n )}\n </>\n )}\n </RAButton>\n );\n },\n);\n\nButtonIcon.displayName = 'ButtonIcon';\n"],"names":["RAButton","isPending"],"mappings":";;;;;;;AA4B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ors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { forwardRef, Ref } from 'react';\nimport { Button as RAButton, ProgressBar } from 'react-aria-components';\nimport { RiLoader4Line } from '@remixicon/react';\nimport type { ButtonIconProps } from './types';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport { ButtonIconDefinition } from './definition';\n\n/**\n * An icon-only button that supports a loading state and requires an accessible label.\n *\n * @public\n */\nexport const ButtonIcon = forwardRef(\n (props: ButtonIconProps, ref: Ref<HTMLButtonElement>) => {\n const { ownProps, restProps, dataAttributes } = useDefinition(\n ButtonIconDefinition,\n // Merge deprecated `loading` into `isPending` so data attributes and\n // internal logic only need to check a single prop.\n {\n ...props,\n isPending:\n props.isPending || props.loading\n ? true\n : props.isPending ?? props.loading,\n },\n );\n const { classes, icon, isPending } = ownProps;\n\n return (\n <RAButton\n className={classes.root}\n ref={ref}\n isPending={isPending}\n {...dataAttributes}\n {...restProps}\n >\n {({ isPending }) => (\n <>\n <span className={classes.content}>{icon}</span>\n\n {isPending && (\n <ProgressBar\n aria-label=\"Loading\"\n isIndeterminate\n className={classes.spinner}\n >\n <RiLoader4Line aria-hidden=\"true\" />\n </ProgressBar>\n )}\n </>\n )}\n </RAButton>\n );\n },\n);\n\nButtonIcon.displayName = 'ButtonIcon';\n"],"names":["RAButton","isPending"],"mappings":";;;;;;;AA4BO,MAAM,UAAA,GAAa,UAAA;AAAA,EACxB,CAAC,OAAwB,GAAA,KAAgC;AACvD,IAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAW,cAAA,EAAe,GAAI,aAAA;AAAA,MAC9C,oBAAA;AAAA;AAAA;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