@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
@@ -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 .ButtonIcon_bui-ButtonIcon__29f40c7d21 {\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 align-items: center;\n justify-content: center;\n border: none;\n user-select: none;\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 .ButtonIcon_bui-ButtonIcon__29f40c7d21[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 .ButtonIcon_bui-ButtonIcon__29f40c7d21[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 .ButtonIcon_bui-ButtonIcon__29f40c7d21[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 .ButtonIcon_bui-ButtonIcon__29f40c7d21[data-size='small'] {\n width: 2rem;\n height: 2rem;\n\n svg {\n width: 1rem;\n height: 1rem;\n }\n }\n\n .ButtonIcon_bui-ButtonIcon__29f40c7d21[data-size='medium'] {\n width: 2.5rem;\n height: 2.5rem;\n\n svg {\n width: 1.25rem;\n height: 1.25rem;\n }\n }\n\n .ButtonIcon_bui-ButtonIconContent__29f40c7d21 {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n width: 100%;\n transition: opacity var(--loading-duration) ease-out;\n\n .ButtonIcon_bui-ButtonIcon__29f40c7d21[data-ispending='true'] & {\n opacity: 0;\n }\n }\n\n .ButtonIcon_bui-ButtonIconSpinner__29f40c7d21 {\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 .ButtonIcon_bui-ButtonIcon__29f40c7d21[data-ispending='true'] & {\n opacity: 1;\n }\n\n & svg {\n animation: ButtonIcon_bui-spin__29f40c7d21 1s linear infinite;\n }\n }\n\n @media (prefers-reduced-motion: reduce) {\n .ButtonIcon_bui-ButtonIcon__29f40c7d21 {\n transition-duration: 50ms;\n }\n\n .ButtonIcon_bui-ButtonIconContent__29f40c7d21 {\n transition-duration: 50ms;\n }\n\n .ButtonIcon_bui-ButtonIconSpinner__29f40c7d21 {\n transition-duration: 50ms;\n }\n\n .ButtonIcon_bui-ButtonIconSpinner__29f40c7d21 svg {\n animation: none;\n }\n }\n\n @keyframes ButtonIcon_bui-spin__29f40c7d21 {\n from {\n transform: rotate(0deg);\n }\n\n to {\n transform: rotate(360deg);\n }\n }\n}\n";
4
- var styles = {"bui-ButtonIcon":"ButtonIcon_bui-ButtonIcon__29f40c7d21","bui-ButtonIconContent":"ButtonIcon_bui-ButtonIconContent__29f40c7d21","bui-ButtonIconSpinner":"ButtonIcon_bui-ButtonIconSpinner__29f40c7d21","bui-spin":"ButtonIcon_bui-spin__29f40c7d21"};
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 .ButtonIcon_bui-ButtonIcon__26aa8eaa38 {\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 align-items: center;\n justify-content: center;\n border: none;\n user-select: none;\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 .ButtonIcon_bui-ButtonIcon__26aa8eaa38[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 .ButtonIcon_bui-ButtonIcon__26aa8eaa38[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 .ButtonIcon_bui-ButtonIcon__26aa8eaa38[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 .ButtonIcon_bui-ButtonIcon__26aa8eaa38[data-size='small'] {\n width: 2rem;\n height: 2rem;\n\n svg {\n width: 1rem;\n height: 1rem;\n }\n }\n\n .ButtonIcon_bui-ButtonIcon__26aa8eaa38[data-size='medium'] {\n width: 2.5rem;\n height: 2.5rem;\n\n svg {\n width: 1.25rem;\n height: 1.25rem;\n }\n }\n\n .ButtonIcon_bui-ButtonIconContent__26aa8eaa38 {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n width: 100%;\n transition: opacity var(--loading-duration) ease-out;\n\n .ButtonIcon_bui-ButtonIcon__26aa8eaa38[data-ispending='true'] & {\n opacity: 0;\n }\n }\n\n .ButtonIcon_bui-ButtonIconSpinner__26aa8eaa38 {\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 .ButtonIcon_bui-ButtonIcon__26aa8eaa38[data-ispending='true'] & {\n opacity: 1;\n }\n\n & svg {\n animation: ButtonIcon_bui-spin__26aa8eaa38 1s linear infinite;\n }\n }\n\n @media (prefers-reduced-motion: reduce) {\n .ButtonIcon_bui-ButtonIcon__26aa8eaa38 {\n transition-duration: 50ms;\n }\n\n .ButtonIcon_bui-ButtonIconContent__26aa8eaa38 {\n transition-duration: 50ms;\n }\n\n .ButtonIcon_bui-ButtonIconSpinner__26aa8eaa38 {\n transition-duration: 50ms;\n }\n\n .ButtonIcon_bui-ButtonIconSpinner__26aa8eaa38 svg {\n animation: none;\n }\n }\n\n @keyframes ButtonIcon_bui-spin__26aa8eaa38 {\n from {\n transform: rotate(0deg);\n }\n\n to {\n transform: rotate(360deg);\n }\n }\n}\n";
4
+ var styles = {"bui-ButtonIcon":"ButtonIcon_bui-ButtonIcon__26aa8eaa38","bui-ButtonIconContent":"ButtonIcon_bui-ButtonIconContent__26aa8eaa38","bui-ButtonIconSpinner":"ButtonIcon_bui-ButtonIconSpinner__26aa8eaa38","bui-spin":"ButtonIcon_bui-spin__26aa8eaa38"};
5
5
  styleInject(css_248z);
6
6
 
7
7
  export { styles as default };
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonIcon.module.css.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
1
+ {"version":3,"file":"ButtonIcon.module.css.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"definition.esm.js","sources":["../../../src/components/ButtonIcon/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 { ButtonIconOwnProps } from './types';\nimport styles from './ButtonIcon.module.css';\n\n/**\n * Component definition for ButtonIcon\n * @public\n */\nexport const ButtonIconDefinition = defineComponent<ButtonIconOwnProps>()({\n styles,\n classNames: {\n root: 'bui-ButtonIcon',\n content: 'bui-ButtonIconContent',\n spinner: 'bui-ButtonIconSpinner',\n },\n bg: 'consumer',\n propDefs: {\n size: { dataAttribute: true, default: 'small' },\n variant: { dataAttribute: true, default: 'primary' },\n isPending: { dataAttribute: true },\n loading: { dataAttribute: true },\n icon: {},\n className: {},\n },\n});\n"],"names":[],"mappings":";;;;;;;;;;;;AAwBO,MAAM,oBAAA,GAAuB,iBAAoC,CAAE;AAAA,EACxE,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,gBAAA;AAAA,IACN,OAAA,EAAS,uBAAA;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,SAAA,EAAW,EAAE,aAAA,EAAe,IAAA,EAAK;AAAA,IACjC,OAAA,EAAS,EAAE,aAAA,EAAe,IAAA,EAAK;AAAA,IAC/B,MAAM,EAAC;AAAA,IACP,WAAW;AAAC;AAEhB,CAAC;;;;"}
1
+ {"version":3,"file":"definition.esm.js","sources":["../../../src/components/ButtonIcon/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 { ButtonIconOwnProps } from './types';\nimport styles from './ButtonIcon.module.css';\n\n/**\n * Component definition for ButtonIcon\n * @public\n */\nexport const ButtonIconDefinition = defineComponent<ButtonIconOwnProps>()({\n styles,\n classNames: {\n root: 'bui-ButtonIcon',\n content: 'bui-ButtonIconContent',\n spinner: 'bui-ButtonIconSpinner',\n },\n bg: 'consumer',\n propDefs: {\n size: { dataAttribute: true, default: 'small' },\n variant: { dataAttribute: true, default: 'primary' },\n isPending: { dataAttribute: true },\n loading: { dataAttribute: true },\n icon: {},\n className: {},\n },\n});\n"],"names":[],"mappings":";;;;;;;;;;;;AAwBO,MAAM,oBAAA,GAAuB,iBAAoC,CAAE;AAAA,EACxE,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,gBAAA;AAAA,IACN,OAAA,EAAS,uBAAA;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,SAAA,EAAW,EAAE,aAAA,EAAe,IAAA,EAAK;AAAA,IACjC,OAAA,EAAS,EAAE,aAAA,EAAe,IAAA,EAAK;AAAA,IAC/B,MAAM,EAAC;AAAA,IACP,WAAW;AAAC;AAEhB,CAAC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonLink.esm.js","sources":["../../../src/components/ButtonLink/ButtonLink.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 { Link as RALink } from 'react-aria-components';\nimport type { ButtonLinkProps } from './types';\nimport {\n useDefinition,\n type UseDefinitionResult,\n} from '../../hooks/useDefinition';\nimport { ButtonLinkDefinition } from './definition';\nimport { getNodeText } from '../../analytics/getNodeText';\nimport {\n getReactAriaAnchorProps,\n type AnchorNavigation,\n} from '../../navigation/useNavigation';\n\ntype ButtonLinkViewProps = {\n definitionResult: UseDefinitionResult<\n typeof ButtonLinkDefinition,\n ButtonLinkProps\n >;\n navigation: AnchorNavigation;\n forwardedRef: Ref<HTMLAnchorElement>;\n};\n\nfunction ButtonLinkView({\n definitionResult,\n navigation,\n forwardedRef,\n}: ButtonLinkViewProps) {\n const { ownProps, restProps, dataAttributes, analytics } = definitionResult;\n const { classes, iconStart, iconEnd, children } = ownProps;\n const navigationProps = restProps.isDisabled\n ? { href: undefined, routerOptions: undefined, render: undefined }\n : getReactAriaAnchorProps(navigation, restProps);\n\n const handlePress: typeof restProps.onPress = e => {\n restProps.onPress?.(e);\n const text =\n restProps['aria-label'] ??\n getNodeText(children) ??\n String(restProps.href ?? '');\n analytics.captureEvent('click', text, {\n attributes: { to: String(restProps.href ?? '') },\n });\n };\n\n return (\n <RALink\n className={classes.root}\n ref={forwardedRef}\n {...dataAttributes}\n {...restProps}\n {...navigationProps}\n onPress={handlePress}\n >\n <span className={classes.content}>\n {iconStart}\n {children}\n {iconEnd}\n </span>\n </RALink>\n );\n}\n\n/**\n * A button-styled anchor element for navigation, supporting optional start and end icon slots and analytics event tracking.\n *\n * @public\n */\nexport const ButtonLink = forwardRef(\n (props: ButtonLinkProps, ref: Ref<HTMLAnchorElement>) => {\n const definitionResult = useDefinition(ButtonLinkDefinition, props);\n const Navigation = definitionResult.navigation;\n\n return (\n <Navigation\n props={definitionResult.restProps}\n view={ButtonLinkView}\n viewProps={{ definitionResult, forwardedRef: ref }}\n />\n );\n },\n);\n\nButtonLink.displayName = 'ButtonLink';\n"],"names":["RALink"],"mappings":";;;;;;;;AAuCA,SAAS,cAAA,CAAe;AAAA,EACtB,gBAAA;AAAA,EACA,UAAA;AAAA,EACA;AACF,CAAA,EAAwB;AACtB,EAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAW,cAAA,EAAgB,WAAU,GAAI,gBAAA;AAC3D,EAAA,MAAM,EAAE,OAAA,EAAS,SAAA,EAAW,OAAA,EAAS,UAAS,GAAI,QAAA;AAClD,EAAA,MAAM,eAAA,GAAkB,SAAA,CAAU,UAAA,GAC9B,EAAE,IAAA,EAAM,MAAA,EAAW,aAAA,EAAe,MAAA,EAAW,MAAA,EAAQ,MAAA,EAAU,GAC/D,uBAAA,CAAwB,YAAY,SAAS,CAAA;AAEjD,EAAA,MAAM,cAAwC,CAAA,CAAA,KAAK;AACjD,IAAA,SAAA,CAAU,UAAU,CAAC,CAAA;AACrB,IAAA,MAAM,IAAA,GACJ,SAAA,CAAU,YAAY,CAAA,IACtB,WAAA,CAAY,QAAQ,CAAA,IACpB,MAAA,CAAO,SAAA,CAAU,IAAA,IAAQ,EAAE,CAAA;AAC7B,IAAA,SAAA,CAAU,YAAA,CAAa,SAAS,IAAA,EAAM;AAAA,MACpC,YAAY,EAAE,EAAA,EAAI,OAAO,SAAA,CAAU,IAAA,IAAQ,EAAE,CAAA;AAAE,KAChD,CAAA;AAAA,EACH,CAAA;AAEA,EAAA,uBACE,GAAA;AAAA,IAACA,IAAA;AAAA,IAAA;AAAA,MACC,WAAW,OAAA,CAAQ,IAAA;AAAA,MACnB,GAAA,EAAK,YAAA;AAAA,MACJ,GAAG,cAAA;AAAA,MACH,GAAG,SAAA;AAAA,MACH,GAAG,eAAA;AAAA,MACJ,OAAA,EAAS,WAAA;AAAA,MAET,QAAA,kBAAA,IAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAW,OAAA,CAAQ,OAAA,EACtB,QAAA,EAAA;AAAA,QAAA,SAAA;AAAA,QACA,QAAA;AAAA,QACA;AAAA,OAAA,EACH;AAAA;AAAA,GACF;AAEJ;AAOO,MAAM,UAAA,GAAa,UAAA;AAAA,EACxB,CAAC,OAAwB,GAAA,KAAgC;AACvD,IAAA,MAAM,gBAAA,GAAmB,aAAA,CAAc,oBAAA,EAAsB,KAAK,CAAA;AAClE,IAAA,MAAM,aAAa,gBAAA,CAAiB,UAAA;AAEpC,IAAA,uBACE,GAAA;AAAA,MAAC,UAAA;AAAA,MAAA;AAAA,QACC,OAAO,gBAAA,CAAiB,SAAA;AAAA,QACxB,IAAA,EAAM,cAAA;AAAA,QACN,SAAA,EAAW,EAAE,gBAAA,EAAkB,YAAA,EAAc,GAAA;AAAI;AAAA,KACnD;AAAA,EAEJ;AACF;AAEA,UAAA,CAAW,WAAA,GAAc,YAAA;;;;"}
1
+ {"version":3,"file":"ButtonLink.esm.js","sources":["../../../src/components/ButtonLink/ButtonLink.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 { Link as RALink } from 'react-aria-components';\nimport type { ButtonLinkProps } from './types';\nimport {\n useDefinition,\n type UseDefinitionResult,\n} from '../../hooks/useDefinition';\nimport { ButtonLinkDefinition } from './definition';\nimport { getNodeText } from '../../analytics/getNodeText';\nimport {\n getReactAriaAnchorProps,\n type AnchorNavigation,\n} from '../../navigation/useNavigation';\n\ntype ButtonLinkViewProps = {\n definitionResult: UseDefinitionResult<\n typeof ButtonLinkDefinition,\n ButtonLinkProps\n >;\n navigation: AnchorNavigation;\n forwardedRef: Ref<HTMLAnchorElement>;\n};\n\nfunction ButtonLinkView({\n definitionResult,\n navigation,\n forwardedRef,\n}: ButtonLinkViewProps) {\n const { ownProps, restProps, dataAttributes, analytics } = definitionResult;\n const { classes, iconStart, iconEnd, children } = ownProps;\n const navigationProps = restProps.isDisabled\n ? { href: undefined, routerOptions: undefined, render: undefined }\n : getReactAriaAnchorProps(navigation, restProps);\n\n const handlePress: typeof restProps.onPress = e => {\n restProps.onPress?.(e);\n const text =\n restProps['aria-label'] ??\n getNodeText(children) ??\n String(restProps.href ?? '');\n analytics.captureEvent('click', text, {\n attributes: { to: String(restProps.href ?? '') },\n });\n };\n\n return (\n <RALink\n className={classes.root}\n ref={forwardedRef}\n {...dataAttributes}\n {...restProps}\n {...navigationProps}\n onPress={handlePress}\n >\n <span className={classes.content}>\n {iconStart}\n {children}\n {iconEnd}\n </span>\n </RALink>\n );\n}\n\n/**\n * A button-styled anchor element for navigation, supporting optional start and end icon slots and analytics event tracking.\n *\n * @public\n */\nexport const ButtonLink = forwardRef(\n (props: ButtonLinkProps, ref: Ref<HTMLAnchorElement>) => {\n const definitionResult = useDefinition(ButtonLinkDefinition, props);\n const Navigation = definitionResult.navigation;\n\n return (\n <Navigation\n props={definitionResult.restProps}\n view={ButtonLinkView}\n viewProps={{ definitionResult, forwardedRef: ref }}\n />\n );\n },\n);\n\nButtonLink.displayName = 'ButtonLink';\n"],"names":["RALink"],"mappings":";;;;;;;;AAuCA,SAAS,cAAA,CAAe;AAAA,EACtB,gBAAA;AAAA,EACA,UAAA;AAAA,EACA;AACF,CAAA,EAAwB;AACtB,EAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAW,cAAA,EAAgB,WAAU,GAAI,gBAAA;AAC3D,EAAA,MAAM,EAAE,OAAA,EAAS,SAAA,EAAW,OAAA,EAAS,UAAS,GAAI,QAAA;AAClD,EAAA,MAAM,eAAA,GAAkB,SAAA,CAAU,UAAA,GAC9B,EAAE,IAAA,EAAM,MAAA,EAAW,aAAA,EAAe,MAAA,EAAW,MAAA,EAAQ,MAAA,EAAU,GAC/D,uBAAA,CAAwB,YAAY,SAAS,CAAA;AAEjD,EAAA,MAAM,cAAwC,CAAA,CAAA,KAAK;AACjD,IAAA,SAAA,CAAU,UAAU,CAAC,CAAA;AACrB,IAAA,MAAM,IAAA,GACJ,SAAA,CAAU,YAAY,CAAA,IACtB,WAAA,CAAY,QAAQ,CAAA,IACpB,MAAA,CAAO,SAAA,CAAU,IAAA,IAAQ,EAAE,CAAA;AAC7B,IAAA,SAAA,CAAU,YAAA,CAAa,SAAS,IAAA,EAAM;AAAA,MACpC,YAAY,EAAE,EAAA,EAAI,OAAO,SAAA,CAAU,IAAA,IAAQ,EAAE,CAAA;AAAE,KAChD,CAAA;AAAA,EACH,CAAA;AAEA,EAAA,uBACE,GAAA;AAAA,IAACA,IAAA;AAAA,IAAA;AAAA,MACC,WAAW,OAAA,CAAQ,IAAA;AAAA,MACnB,GAAA,EAAK,YAAA;AAAA,MACJ,GAAG,cAAA;AAAA,MACH,GAAG,SAAA;AAAA,MACH,GAAG,eAAA;AAAA,MACJ,OAAA,EAAS,WAAA;AAAA,MAET,QAAA,kBAAA,IAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAW,OAAA,CAAQ,OAAA,EACtB,QAAA,EAAA;AAAA,QAAA,SAAA;AAAA,QACA,QAAA;AAAA,QACA;AAAA,OAAA,EACH;AAAA;AAAA,GACF;AAEJ;AAOO,MAAM,UAAA,GAAa,UAAA;AAAA,EACxB,CAAC,OAAwB,GAAA,KAAgC;AACvD,IAAA,MAAM,gBAAA,GAAmB,aAAA,CAAc,oBAAA,EAAsB,KAAK,CAAA;AAClE,IAAA,MAAM,aAAa,gBAAA,CAAiB,UAAA;AAEpC,IAAA,uBACE,GAAA;AAAA,MAAC,UAAA;AAAA,MAAA;AAAA,QACC,OAAO,gBAAA,CAAiB,SAAA;AAAA,QACxB,IAAA,EAAM,cAAA;AAAA,QACN,SAAA,EAAW,EAAE,gBAAA,EAAkB,YAAA,EAAc,GAAA;AAAI;AAAA,KACnD;AAAA,EAEJ;AACF;AAEA,UAAA,CAAW,WAAA,GAAc,YAAA;;"}
@@ -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 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\n@layer tokens, base, components, utilities;\n\n@layer components {\n .ButtonLink_bui-ButtonLink__07e7850838 {\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 text-decoration: none;\n transition: background-color 200ms ease-out, box-shadow 200ms 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\n .ButtonLink_bui-ButtonLink__07e7850838[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 --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 .ButtonLink_bui-ButtonLink__07e7850838[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 --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 .ButtonLink_bui-ButtonLink__07e7850838[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 --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 .ButtonLink_bui-ButtonLink__07e7850838[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 .ButtonLink_bui-ButtonLink__07e7850838[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 .ButtonLink_bui-ButtonLinkContent__07e7850838 {\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 }\n\n @media (prefers-reduced-motion: reduce) {\n .ButtonLink_bui-ButtonLink__07e7850838 {\n transition-duration: 50ms;\n }\n }\n}\n";
4
- var styles = {"bui-ButtonLink":"ButtonLink_bui-ButtonLink__07e7850838","bui-ButtonLinkContent":"ButtonLink_bui-ButtonLinkContent__07e7850838"};
3
+ var css_248z = "/*\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\n@layer tokens, base, components, theme, utilities;\n\n@layer components {\n .ButtonLink_bui-ButtonLink__497c7aed01 {\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 text-decoration: none;\n transition: background-color 200ms ease-out, box-shadow 200ms 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\n .ButtonLink_bui-ButtonLink__497c7aed01[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 --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 .ButtonLink_bui-ButtonLink__497c7aed01[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 --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 .ButtonLink_bui-ButtonLink__497c7aed01[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 --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 .ButtonLink_bui-ButtonLink__497c7aed01[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 .ButtonLink_bui-ButtonLink__497c7aed01[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 .ButtonLink_bui-ButtonLinkContent__497c7aed01 {\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 }\n\n @media (prefers-reduced-motion: reduce) {\n .ButtonLink_bui-ButtonLink__497c7aed01 {\n transition-duration: 50ms;\n }\n }\n}\n";
4
+ var styles = {"bui-ButtonLink":"ButtonLink_bui-ButtonLink__497c7aed01","bui-ButtonLinkContent":"ButtonLink_bui-ButtonLinkContent__497c7aed01"};
5
5
  styleInject(css_248z);
6
6
 
7
7
  export { styles as default };
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonLink.module.css.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
1
+ {"version":3,"file":"ButtonLink.module.css.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"definition.esm.js","sources":["../../../src/components/ButtonLink/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 { ButtonLinkOwnProps } from './types';\nimport styles from './ButtonLink.module.css';\n\n/**\n * Component definition for ButtonLink\n * @public\n */\nexport const ButtonLinkDefinition = defineComponent<ButtonLinkOwnProps>()({\n styles,\n classNames: {\n root: 'bui-ButtonLink',\n content: 'bui-ButtonLinkContent',\n },\n bg: 'consumer',\n analytics: true,\n navigation: { type: 'anchor' },\n propDefs: {\n noTrack: {},\n size: { dataAttribute: true, default: 'small' },\n variant: { dataAttribute: true, default: 'primary' },\n iconStart: {},\n iconEnd: {},\n children: {},\n className: {},\n },\n});\n"],"names":[],"mappings":";;;;;;;;;;;;AAwBO,MAAM,oBAAA,GAAuB,iBAAoC,CAAE;AAAA,EACxE,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,gBAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA,EACA,EAAA,EAAI,UAAA;AAAA,EACJ,SAAA,EAAW,IAAA;AAAA,EACX,UAAA,EAAY,EAAE,IAAA,EAAM,QAAA,EAAS;AAAA,EAC7B,QAAA,EAAU;AAAA,IACR,SAAS,EAAC;AAAA,IACV,IAAA,EAAM,EAAE,aAAA,EAAe,IAAA,EAAM,SAAS,OAAA,EAAQ;AAAA,IAC9C,OAAA,EAAS,EAAE,aAAA,EAAe,IAAA,EAAM,SAAS,SAAA,EAAU;AAAA,IACnD,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/ButtonLink/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 { ButtonLinkOwnProps } from './types';\nimport styles from './ButtonLink.module.css';\n\n/**\n * Component definition for ButtonLink\n * @public\n */\nexport const ButtonLinkDefinition = defineComponent<ButtonLinkOwnProps>()({\n styles,\n classNames: {\n root: 'bui-ButtonLink',\n content: 'bui-ButtonLinkContent',\n },\n bg: 'consumer',\n analytics: true,\n navigation: { type: 'anchor' },\n propDefs: {\n noTrack: {},\n size: { dataAttribute: true, default: 'small' },\n variant: { dataAttribute: true, default: 'primary' },\n iconStart: {},\n iconEnd: {},\n children: {},\n className: {},\n },\n});\n"],"names":[],"mappings":";;;;;;;;;;;;AAwBO,MAAM,oBAAA,GAAuB,iBAAoC,CAAE;AAAA,EACxE,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,gBAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA,EACA,EAAA,EAAI,UAAA;AAAA,EACJ,SAAA,EAAW,IAAA;AAAA,EACX,UAAA,EAAY,EAAE,IAAA,EAAM,QAAA,EAAS;AAAA,EAC7B,QAAA,EAAU;AAAA,IACR,SAAS,EAAC;AAAA,IACV,IAAA,EAAM,EAAE,aAAA,EAAe,IAAA,EAAM,SAAS,OAAA,EAAQ;AAAA,IAC9C,OAAA,EAAS,EAAE,aAAA,EAAe,IAAA,EAAM,SAAS,SAAA,EAAU;AAAA,IACnD,WAAW,EAAC;AAAA,IACZ,SAAS,EAAC;AAAA,IACV,UAAU,EAAC;AAAA,IACX,WAAW;AAAC;AAEhB,CAAC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Card.esm.js","sources":["../../../src/components/Card/Card.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, useCallback, useRef } from 'react';\nimport { Button as RAButton } from 'react-aria-components';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport {\n CardDefinition,\n CardHeaderDefinition,\n CardBodyDefinition,\n CardFooterDefinition,\n} from './definition';\nimport type {\n CardProps,\n CardHeaderProps,\n CardBodyProps,\n CardFooterProps,\n} from './types';\nimport { Box } from '../Box/Box';\nimport { Link } from '../Link';\n\nconst INTERACTIVE_ELEMENT_SELECTOR =\n 'a[href],button,input,select,textarea,[role=\"button\"],[role=\"link\"],[tabindex]:not([tabindex=\"-1\"])';\n\n/**\n * Card component.\n *\n * @public\n */\nexport const Card = forwardRef<HTMLDivElement, CardProps>((props, ref) => {\n const { ownProps, restProps, dataAttributes, utilityStyle } = useDefinition(\n CardDefinition,\n props,\n );\n const {\n classes,\n children,\n onPress,\n href,\n label,\n target: linkTarget,\n rel,\n download,\n } = ownProps;\n const isInteractive = !!(onPress || href);\n\n const triggerRef = useRef<HTMLAnchorElement | HTMLButtonElement>(null);\n\n const handleClick = useCallback(\n (e: React.MouseEvent<HTMLDivElement>) => {\n if (!isInteractive || !triggerRef.current) return;\n\n // Don't delegate if the click target is the trigger itself\n if (triggerRef.current.contains(e.target as Node)) return;\n\n // Don't delegate if the user clicked a nested interactive element\n const targetNode = e.target as Node | null;\n const targetElement =\n targetNode instanceof Element ? targetNode : targetNode?.parentElement;\n if (targetElement?.closest(INTERACTIVE_ELEMENT_SELECTOR)) return;\n\n // Don't delegate if the user is selecting text\n if (window.getSelection()?.toString()) return;\n\n triggerRef.current.dispatchEvent(\n new MouseEvent('click', {\n bubbles: true,\n cancelable: true,\n ctrlKey: e.ctrlKey,\n metaKey: e.metaKey,\n shiftKey: e.shiftKey,\n altKey: e.altKey,\n }),\n );\n },\n [isInteractive],\n );\n\n return (\n <Box\n as=\"article\"\n bg=\"neutral\"\n ref={ref}\n className={classes.root}\n data-interactive={isInteractive || undefined}\n {...dataAttributes}\n {...restProps}\n onClick={isInteractive ? handleClick : undefined}\n style={{ ...utilityStyle, ...ownProps.style }}\n >\n {href && (\n <Link\n ref={triggerRef as React.Ref<HTMLAnchorElement>}\n className={classes.trigger}\n href={href}\n target={linkTarget}\n rel={rel}\n download={download}\n aria-label={label}\n />\n )}\n {onPress && !href && (\n <RAButton\n ref={triggerRef as React.Ref<HTMLButtonElement>}\n className={classes.trigger}\n onPress={onPress}\n aria-label={label}\n />\n )}\n {children}\n </Box>\n );\n});\n\nCard.displayName = 'Card';\n\n/**\n * CardHeader component.\n *\n * @public\n */\nexport const CardHeader = forwardRef<HTMLDivElement, CardHeaderProps>(\n (props, ref) => {\n const { ownProps, restProps } = useDefinition(CardHeaderDefinition, props);\n const { classes, children } = ownProps;\n\n return (\n <div ref={ref} className={classes.root} {...restProps}>\n {children}\n </div>\n );\n },\n);\n\nCardHeader.displayName = 'CardHeader';\n\n/**\n * CardBody component.\n *\n * @public\n */\nexport const CardBody = forwardRef<HTMLDivElement, CardBodyProps>(\n (props, ref) => {\n const { ownProps, restProps } = useDefinition(CardBodyDefinition, props);\n const { classes, children } = ownProps;\n\n return (\n <div ref={ref} className={classes.root} {...restProps}>\n {children}\n </div>\n );\n },\n);\n\nCardBody.displayName = 'CardBody';\n\n/**\n * CardFooter component.\n *\n * @public\n */\nexport const CardFooter = forwardRef<HTMLDivElement, CardFooterProps>(\n (props, ref) => {\n const { ownProps, restProps } = useDefinition(CardFooterDefinition, props);\n const { classes, children } = ownProps;\n\n return (\n <div ref={ref} className={classes.root} {...restProps}>\n {children}\n </div>\n );\n },\n);\n\nCardFooter.displayName = 'CardFooter';\n"],"names":["RAButton"],"mappings":";;;;;;;;;AAkCA,MAAM,4BAAA,GACJ,oGAAA;AAOK,MAAM,IAAA,GAAO,UAAA,CAAsC,CAAC,KAAA,EAAO,GAAA,KAAQ;AACxE,EAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAW,cAAA,EAAgB,cAAa,GAAI,aAAA;AAAA,IAC5D,cA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,MAAM,QAAA,GAAW,UAAA;AAAA,EACtB,CAAC,OAAO,GAAA,KAAQ;AACd,IAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAU,GAAI,aAAA,CAAc,oBAAoB,KAAK,CAAA;AACvE,IAAA,MAAM,EAAE,OAAA,EAAS,QAAA,EAAS,GAAI,QAAA;AAE9B,IAAA,uBACE,GAAA,CAAC,SAAI,GAAA,EAAU,SAAA,EAAW,QAAQ,IAAA,EAAO,GAAG,WACzC,QAAA,EACH,CAAA;AAAA,EAEJ;AACF;AAEA,QAAA,CAAS,WAAA,GAAc,UAAA;AAOhB,MAAM,UAAA,GAAa,UAAA;AAAA,EACxB,CAAC,OAAO,GAAA,KAAQ;AACd,IAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAU,GAAI,aAAA,CAAc,sBAAsB,KAAK,CAAA;AACzE,IAAA,MAAM,EAAE,OAAA,EAAS,QAAA,EAAS,GAAI,QAAA;AAE9B,IAAA,uBACE,GAAA,CAAC,SAAI,GAAA,EAAU,SAAA,EAAW,QAAQ,IAAA,EAAO,GAAG,WACzC,QAAA,EACH,CAAA;AAAA,EAEJ;AACF;AAEA,UAAA,CAAW,WAAA,GAAc,YAAA;;;;"}
1
+ {"version":3,"file":"Card.esm.js","sources":["../../../src/components/Card/Card.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, useCallback, useRef } from 'react';\nimport { Button as RAButton } from 'react-aria-components';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport {\n CardDefinition,\n CardHeaderDefinition,\n CardBodyDefinition,\n CardFooterDefinition,\n} from './definition';\nimport type {\n CardProps,\n CardHeaderProps,\n CardBodyProps,\n CardFooterProps,\n} from './types';\nimport { Box } from '../Box/Box';\nimport { Link } from '../Link';\n\nconst INTERACTIVE_ELEMENT_SELECTOR =\n 'a[href],button,input,select,textarea,[role=\"button\"],[role=\"link\"],[tabindex]:not([tabindex=\"-1\"])';\n\n/**\n * Card component.\n *\n * @public\n */\nexport const Card = forwardRef<HTMLDivElement, CardProps>((props, ref) => {\n const { ownProps, restProps, dataAttributes, utilityStyle } = useDefinition(\n CardDefinition,\n props,\n );\n const {\n classes,\n children,\n onPress,\n href,\n label,\n target: linkTarget,\n rel,\n download,\n } = ownProps;\n const isInteractive = !!(onPress || href);\n\n const triggerRef = useRef<HTMLAnchorElement | HTMLButtonElement>(null);\n\n const handleClick = useCallback(\n (e: React.MouseEvent<HTMLDivElement>) => {\n if (!isInteractive || !triggerRef.current) return;\n\n // Don't delegate if the click target is the trigger itself\n if (triggerRef.current.contains(e.target as Node)) return;\n\n // Don't delegate if the user clicked a nested interactive element\n const targetNode = e.target as Node | null;\n const targetElement =\n targetNode instanceof Element ? targetNode : targetNode?.parentElement;\n if (targetElement?.closest(INTERACTIVE_ELEMENT_SELECTOR)) return;\n\n // Don't delegate if the user is selecting text\n if (window.getSelection()?.toString()) return;\n\n triggerRef.current.dispatchEvent(\n new MouseEvent('click', {\n bubbles: true,\n cancelable: true,\n ctrlKey: e.ctrlKey,\n metaKey: e.metaKey,\n shiftKey: e.shiftKey,\n altKey: e.altKey,\n }),\n );\n },\n [isInteractive],\n );\n\n return (\n <Box\n as=\"article\"\n bg=\"neutral\"\n ref={ref}\n className={classes.root}\n data-interactive={isInteractive || undefined}\n {...dataAttributes}\n {...restProps}\n onClick={isInteractive ? handleClick : undefined}\n style={{ ...utilityStyle, ...ownProps.style }}\n >\n {href && (\n <Link\n ref={triggerRef as React.Ref<HTMLAnchorElement>}\n className={classes.trigger}\n href={href}\n target={linkTarget}\n rel={rel}\n download={download}\n aria-label={label}\n />\n )}\n {onPress && !href && (\n <RAButton\n ref={triggerRef as React.Ref<HTMLButtonElement>}\n className={classes.trigger}\n onPress={onPress}\n aria-label={label}\n />\n )}\n {children}\n </Box>\n );\n});\n\nCard.displayName = 'Card';\n\n/**\n * CardHeader component.\n *\n * @public\n */\nexport const CardHeader = forwardRef<HTMLDivElement, CardHeaderProps>(\n (props, ref) => {\n const { ownProps, restProps } = useDefinition(CardHeaderDefinition, props);\n const { classes, children } = ownProps;\n\n return (\n <div ref={ref} className={classes.root} {...restProps}>\n {children}\n </div>\n );\n },\n);\n\nCardHeader.displayName = 'CardHeader';\n\n/**\n * CardBody component.\n *\n * @public\n */\nexport const CardBody = forwardRef<HTMLDivElement, CardBodyProps>(\n (props, ref) => {\n const { ownProps, restProps } = useDefinition(CardBodyDefinition, props);\n const { classes, children } = ownProps;\n\n return (\n <div ref={ref} className={classes.root} {...restProps}>\n {children}\n </div>\n );\n },\n);\n\nCardBody.displayName = 'CardBody';\n\n/**\n * CardFooter component.\n *\n * @public\n */\nexport const CardFooter = forwardRef<HTMLDivElement, CardFooterProps>(\n (props, ref) => {\n const { ownProps, restProps } = useDefinition(CardFooterDefinition, props);\n const { classes, children } = ownProps;\n\n return (\n <div ref={ref} className={classes.root} {...restProps}>\n {children}\n </div>\n );\n },\n);\n\nCardFooter.displayName = 'CardFooter';\n"],"names":["RAButton"],"mappings":";;;;;;;;;AAkCA,MAAM,4BAAA,GACJ,oGAAA;AAOK,MAAM,IAAA,GAAO,UAAA,CAAsC,CAAC,KAAA,EAAO,GAAA,KAAQ;AACxE,EAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAW,cAAA,EAAgB,cAAa,GAAI,aAAA;AAAA,IAC5D,cAAA;AAAA,IACA;AAAA,GACF;AACA,EAAA,MAAM;AAAA,IACJ,OAAA;AAAA,IACA,QAAA;AAAA,IACA,OAAA;AAAA,IACA,IAAA;AAAA,IACA,KAAA;AAAA,IACA,MAAA,E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A;AACvE,IAAA,MAAM,EAAE,OAAA,EAAS,QAAA,EAAS,GAAI,QAAA;AAE9B,IAAA,uBACE,GAAA,CAAC,SAAI,GAAA,EAAU,SAAA,EAAW,QAAQ,IAAA,EAAO,GAAG,WACzC,QAAA,EACH,CAAA;AAAA,EAEJ;AACF;AAEA,QAAA,CAAS,WAAA,GAAc,UAAA;AAOhB,MAAM,UAAA,GAAa,UAAA;AAAA,EACxB,CAAC,OAAO,GAAA,KAAQ;AACd,IAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAU,GAAI,aAAA,CAAc,sBAAsB,KAAK,CAAA;AACzE,IAAA,MAAM,EAAE,OAAA,EAAS,QAAA,EAAS,GAAI,QAAA;AAE9B,IAAA,uBACE,GAAA,CAAC,SAAI,GAAA,EAAU,SAAA,EAAW,QAAQ,IAAA,EAAO,GAAG,WACzC,QAAA,EACH,CAAA;AAAA,EAEJ;AACF;AAEA,UAAA,CAAW,WAAA,GAAc,YAAA;;"}
@@ -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 .Card_bui-Card__e5bd994e73 {\n display: flex;\n flex-direction: column;\n border-radius: var(--bui-radius-3);\n color: var(--bui-fg-primary);\n line-height: 1.15;\n overflow: auto;\n min-height: 0;\n width: 100%;\n position: relative;\n padding: var(--bui-space-3);\n }\n\n .Card_bui-Card__e5bd994e73:has(.Card_bui-CardHeader__e5bd994e73, .Card_bui-CardBody__e5bd994e73, .Card_bui-CardFooter__e5bd994e73) {\n padding: 0;\n }\n\n /*\n * Cursor and hover tint are applied at the card level so they cover the\n * entire surface.\n */\n .Card_bui-Card__e5bd994e73[data-interactive] {\n cursor: pointer;\n\n &::after {\n content: '';\n position: absolute;\n inset: 0;\n background: color-mix(in srgb, currentColor 5%, transparent);\n border-radius: inherit;\n pointer-events: none;\n z-index: 3;\n opacity: 0;\n transition: opacity 200ms ease-in-out;\n }\n\n &:hover::after {\n opacity: 1;\n }\n }\n\n .Card_bui-Card__e5bd994e73[data-interactive]:has(.Card_bui-CardTrigger__e5bd994e73[data-focus-visible]) {\n outline: 2px solid var(--bui-ring);\n outline-offset: -2px;\n }\n\n .Card_bui-CardTrigger__e5bd994e73 {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0 0 0 0);\n clip-path: inset(100%);\n white-space: nowrap;\n border: 0;\n }\n\n .Card_bui-CardHeader__e5bd994e73 {\n padding-inline: var(--bui-space-3);\n padding-block: var(--bui-space-3);\n }\n\n .Card_bui-CardBody__e5bd994e73 {\n flex: 1;\n min-height: var(--bui-space-6);\n overflow: auto;\n padding-inline: var(--bui-space-3);\n padding-block: var(--bui-space-3);\n }\n\n @keyframes Card_bui-card-body-shadow__e5bd994e73 {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n\n .Card_bui-Card__e5bd994e73:has(.Card_bui-CardHeader__e5bd994e73) .Card_bui-CardBody__e5bd994e73 {\n padding-block-start: 0;\n }\n\n .Card_bui-Card__e5bd994e73:has(.Card_bui-CardFooter__e5bd994e73) .Card_bui-CardBody__e5bd994e73 {\n padding-block-end: 0;\n }\n\n @supports (animation-timeline: scroll()) {\n .Card_bui-Card__e5bd994e73:has(.Card_bui-CardHeader__e5bd994e73) .Card_bui-CardBody__e5bd994e73::before {\n content: '';\n position: sticky;\n top: 0;\n display: block;\n height: 1.5rem;\n margin-bottom: -1.5rem;\n background: linear-gradient(\n to bottom,\n var(--bui-bg-inherit),\n rgb(from var(--bui-bg-inherit) r g b / 0)\n );\n pointer-events: none;\n opacity: 0;\n animation: Card_bui-card-body-shadow__e5bd994e73 linear both;\n animation-timeline: scroll();\n animation-range: 0px 2.5rem;\n }\n\n .Card_bui-Card__e5bd994e73:has(.Card_bui-CardFooter__e5bd994e73) .Card_bui-CardBody__e5bd994e73::after {\n content: '';\n position: sticky;\n bottom: 0;\n display: block;\n height: 1.5rem;\n margin-top: -1.5rem;\n background: linear-gradient(\n to top,\n var(--bui-bg-inherit),\n rgb(from var(--bui-bg-inherit) r g b / 0)\n );\n pointer-events: none;\n opacity: 0;\n animation: Card_bui-card-body-shadow__e5bd994e73 linear forwards,\n Card_bui-card-body-shadow__e5bd994e73 linear forwards reverse;\n animation-timeline: scroll(), scroll();\n animation-range: 0px 1px, calc(100% - 2.5rem) 100%;\n }\n }\n\n .Card_bui-CardFooter__e5bd994e73 {\n padding-inline: var(--bui-space-3);\n padding-block: var(--bui-space-3);\n }\n}\n";
4
- var styles = {"bui-Card":"Card_bui-Card__e5bd994e73","bui-CardHeader":"Card_bui-CardHeader__e5bd994e73","bui-CardBody":"Card_bui-CardBody__e5bd994e73","bui-CardFooter":"Card_bui-CardFooter__e5bd994e73","bui-CardTrigger":"Card_bui-CardTrigger__e5bd994e73","bui-card-body-shadow":"Card_bui-card-body-shadow__e5bd994e73"};
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 .Card_bui-Card__605b0cf698 {\n display: flex;\n flex-direction: column;\n border-radius: var(--bui-radius-3);\n color: var(--bui-fg-primary);\n line-height: 1.15;\n overflow: auto;\n min-height: 0;\n width: 100%;\n position: relative;\n padding: var(--bui-space-3);\n }\n\n .Card_bui-Card__605b0cf698:has(.Card_bui-CardHeader__605b0cf698, .Card_bui-CardBody__605b0cf698, .Card_bui-CardFooter__605b0cf698) {\n padding: 0;\n }\n\n /*\n * Cursor and hover tint are applied at the card level so they cover the\n * entire surface.\n */\n .Card_bui-Card__605b0cf698[data-interactive] {\n cursor: pointer;\n\n &::after {\n content: '';\n position: absolute;\n inset: 0;\n background: color-mix(in srgb, currentColor 5%, transparent);\n border-radius: inherit;\n pointer-events: none;\n z-index: 3;\n opacity: 0;\n transition: opacity 200ms ease-in-out;\n }\n\n &:hover::after {\n opacity: 1;\n }\n }\n\n .Card_bui-Card__605b0cf698[data-interactive]:has(.Card_bui-CardTrigger__605b0cf698[data-focus-visible]) {\n outline: 2px solid var(--bui-ring);\n outline-offset: -2px;\n }\n\n .Card_bui-CardTrigger__605b0cf698 {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0 0 0 0);\n clip-path: inset(100%);\n white-space: nowrap;\n border: 0;\n }\n\n .Card_bui-CardHeader__605b0cf698 {\n padding-inline: var(--bui-space-3);\n padding-block: var(--bui-space-3);\n }\n\n .Card_bui-CardBody__605b0cf698 {\n flex: 1;\n min-height: var(--bui-space-6);\n overflow: auto;\n padding-inline: var(--bui-space-3);\n padding-block: var(--bui-space-3);\n }\n\n @keyframes Card_bui-card-body-shadow__605b0cf698 {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n\n .Card_bui-Card__605b0cf698:has(.Card_bui-CardHeader__605b0cf698) .Card_bui-CardBody__605b0cf698 {\n padding-block-start: 0;\n }\n\n .Card_bui-Card__605b0cf698:has(.Card_bui-CardFooter__605b0cf698) .Card_bui-CardBody__605b0cf698 {\n padding-block-end: 0;\n }\n\n @supports (animation-timeline: scroll()) {\n .Card_bui-Card__605b0cf698:has(.Card_bui-CardHeader__605b0cf698) .Card_bui-CardBody__605b0cf698::before {\n content: '';\n position: sticky;\n top: 0;\n display: block;\n height: 1.5rem;\n margin-bottom: -1.5rem;\n background: linear-gradient(\n to bottom,\n var(--bui-bg-inherit),\n rgb(from var(--bui-bg-inherit) r g b / 0)\n );\n pointer-events: none;\n opacity: 0;\n animation: Card_bui-card-body-shadow__605b0cf698 linear both;\n animation-timeline: scroll();\n animation-range: 0px 2.5rem;\n }\n\n .Card_bui-Card__605b0cf698:has(.Card_bui-CardFooter__605b0cf698) .Card_bui-CardBody__605b0cf698::after {\n content: '';\n position: sticky;\n bottom: 0;\n display: block;\n height: 1.5rem;\n margin-top: -1.5rem;\n background: linear-gradient(\n to top,\n var(--bui-bg-inherit),\n rgb(from var(--bui-bg-inherit) r g b / 0)\n );\n pointer-events: none;\n opacity: 0;\n animation: Card_bui-card-body-shadow__605b0cf698 linear forwards,\n Card_bui-card-body-shadow__605b0cf698 linear forwards reverse;\n animation-timeline: scroll(), scroll();\n animation-range: 0px 1px, calc(100% - 2.5rem) 100%;\n }\n }\n\n .Card_bui-CardFooter__605b0cf698 {\n padding-inline: var(--bui-space-3);\n padding-block: var(--bui-space-3);\n }\n}\n";
4
+ var styles = {"bui-Card":"Card_bui-Card__605b0cf698","bui-CardHeader":"Card_bui-CardHeader__605b0cf698","bui-CardBody":"Card_bui-CardBody__605b0cf698","bui-CardFooter":"Card_bui-CardFooter__605b0cf698","bui-CardTrigger":"Card_bui-CardTrigger__605b0cf698","bui-card-body-shadow":"Card_bui-card-body-shadow__605b0cf698"};
5
5
  styleInject(css_248z);
6
6
 
7
7
  export { styles as default };
@@ -1 +1 @@
1
- {"version":3,"file":"Card.module.css.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
1
+ {"version":3,"file":"Card.module.css.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"definition.esm.js","sources":["../../../src/components/Card/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 CardOwnProps,\n CardHeaderOwnProps,\n CardBodyOwnProps,\n CardFooterOwnProps,\n} from './types';\nimport styles from './Card.module.css';\n\n/**\n * Component definition for Card\n * @public\n */\nexport const CardDefinition = defineComponent<CardOwnProps>()({\n styles,\n classNames: {\n root: 'bui-Card',\n trigger: 'bui-CardTrigger',\n },\n propDefs: {\n children: {},\n className: {},\n onPress: {},\n href: {},\n label: {},\n target: {},\n rel: {},\n download: {},\n style: {},\n },\n utilityProps: ['grow', 'shrink', 'basis'],\n});\n\n/**\n * Component definition for CardHeader\n * @public\n */\nexport const CardHeaderDefinition = defineComponent<CardHeaderOwnProps>()({\n styles,\n classNames: {\n root: 'bui-CardHeader',\n },\n propDefs: {\n children: {},\n className: {},\n },\n});\n\n/**\n * Component definition for CardBody\n * @public\n */\nexport const CardBodyDefinition = defineComponent<CardBodyOwnProps>()({\n styles,\n classNames: {\n root: 'bui-CardBody',\n },\n propDefs: {\n children: {},\n className: {},\n },\n});\n\n/**\n * Component definition for CardFooter\n * @public\n */\nexport const CardFooterDefinition = defineComponent<CardFooterOwnProps>()({\n styles,\n classNames: {\n root: 'bui-CardFooter',\n },\n propDefs: {\n children: {},\n className: {},\n },\n});\n"],"names":[],"mappings":";;;;;;;;;;;;AA6BO,MAAM,cAAA,GAAiB,iBAA8B,CAAE;AAAA,EAC5D,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,UAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA,EACA,QAAA,EAAU;AAAA,IACR,UAAU,EAAC;AAAA,IACX,WAAW,EAAC;AAAA,IACZ,SAAS,EAAC;AAAA,IACV,MAAM,EAAC;AAAA,IACP,OAAO,EAAC;AAAA,IACR,QAAQ,EAAC;AAAA,IACT,KAAK,EAAC;AAAA,IACN,UAAU,EAAC;AAAA,IACX,OAAO;AAAC,GACV;AAAA,EACA,YAAA,EAAc,CAAC,MAAA,EAAQ,QAAA,EAAU,OAAO;AAC1C,CAAC;AAMM,MAAM,oBAAA,GAAuB,iBAAoC,CAAE;AAAA,EACxE,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA,QAAA,EAAU;AAAA,IACR,UAAU,EAAC;AAAA,IACX,WAAW;AAAC;AAEhB,CAAC;AAMM,MAAM,kBAAA,GAAqB,iBAAkC,CAAE;AAAA,EACpE,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA,QAAA,EAAU;AAAA,IACR,UAAU,EAAC;AAAA,IACX,WAAW;AAAC;AAEhB,CAAC;AAMM,MAAM,oBAAA,GAAuB,iBAAoC,CAAE;AAAA,EACxE,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA,QAAA,EAAU;AAAA,IACR,UAAU,EAAC;AAAA,IACX,WAAW;AAAC;AAEhB,CAAC;;;;"}
1
+ {"version":3,"file":"definition.esm.js","sources":["../../../src/components/Card/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 CardOwnProps,\n CardHeaderOwnProps,\n CardBodyOwnProps,\n CardFooterOwnProps,\n} from './types';\nimport styles from './Card.module.css';\n\n/**\n * Component definition for Card\n * @public\n */\nexport const CardDefinition = defineComponent<CardOwnProps>()({\n styles,\n classNames: {\n root: 'bui-Card',\n trigger: 'bui-CardTrigger',\n },\n propDefs: {\n children: {},\n className: {},\n onPress: {},\n href: {},\n label: {},\n target: {},\n rel: {},\n download: {},\n style: {},\n },\n utilityProps: ['grow', 'shrink', 'basis'],\n});\n\n/**\n * Component definition for CardHeader\n * @public\n */\nexport const CardHeaderDefinition = defineComponent<CardHeaderOwnProps>()({\n styles,\n classNames: {\n root: 'bui-CardHeader',\n },\n propDefs: {\n children: {},\n className: {},\n },\n});\n\n/**\n * Component definition for CardBody\n * @public\n */\nexport const CardBodyDefinition = defineComponent<CardBodyOwnProps>()({\n styles,\n classNames: {\n root: 'bui-CardBody',\n },\n propDefs: {\n children: {},\n className: {},\n },\n});\n\n/**\n * Component definition for CardFooter\n * @public\n */\nexport const CardFooterDefinition = defineComponent<CardFooterOwnProps>()({\n styles,\n classNames: {\n root: 'bui-CardFooter',\n },\n propDefs: {\n children: {},\n className: {},\n },\n});\n"],"names":[],"mappings":";;;;;;;;;;;;AA6BO,MAAM,cAAA,GAAiB,iBAA8B,CAAE;AAAA,EAC5D,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,UAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA,EACA,QAAA,EAAU;AAAA,IACR,UAAU,EAAC;AAAA,IACX,WAAW,EAAC;AAAA,IACZ,SAAS,EAAC;AAAA,IACV,MAAM,EAAC;AAAA,IACP,OAAO,EAAC;AAAA,IACR,QAAQ,EAAC;AAAA,IACT,KAAK,EAAC;AAAA,IACN,UAAU,EAAC;AAAA,IACX,OAAO;AAAC,GACV;AAAA,EACA,YAAA,EAAc,CAAC,MAAA,EAAQ,QAAA,EAAU,OAAO;AAC1C,CAAC;AAMM,MAAM,oBAAA,GAAuB,iBAAoC,CAAE;AAAA,EACxE,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA,QAAA,EAAU;AAAA,IACR,UAAU,EAAC;AAAA,IACX,WAAW;AAAC;AAEhB,CAAC;AAMM,MAAM,kBAAA,GAAqB,iBAAkC,CAAE;AAAA,EACpE,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA,QAAA,EAAU;AAAA,IACR,UAAU,EAAC;AAAA,IACX,WAAW;AAAC;AAEhB,CAAC;AAMM,MAAM,oBAAA,GAAuB,iBAAoC,CAAE;AAAA,EACxE,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA,QAAA,EAAU;AAAA,IACR,UAAU,EAAC;AAAA,IACX,WAAW;AAAC;AAEhB,CAAC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Checkbox.esm.js","sources":["../../../src/components/Checkbox/Checkbox.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, useEffect } from 'react';\nimport { Checkbox as RACheckbox } from 'react-aria-components';\nimport type { CheckboxProps } from './types';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport { CheckboxDefinition } from './definition';\nimport { RiCheckLine, RiSubtractLine } from '@remixicon/react';\n\n/**\n * A form checkbox input with support for indeterminate state and accessible labeling.\n *\n * @public\n */\nexport const Checkbox = forwardRef<HTMLLabelElement, CheckboxProps>(\n (props, ref) => {\n const { ownProps, restProps, dataAttributes } = useDefinition(\n CheckboxDefinition,\n props,\n );\n const { classes, children } = ownProps;\n const ariaLabel = restProps['aria-label'];\n const ariaLabelledBy = restProps['aria-labelledby'];\n\n useEffect(() => {\n if (!children && !ariaLabel && !ariaLabelledBy) {\n console.warn(\n 'Checkbox requires either a visible label, aria-label, or aria-labelledby for accessibility',\n );\n }\n }, [children, ariaLabel, ariaLabelledBy]);\n\n return (\n <RACheckbox\n ref={ref}\n className={classes.root}\n {...dataAttributes}\n {...restProps}\n >\n {({ isIndeterminate }) => (\n <>\n <div className={classes.indicator} aria-hidden=\"true\">\n {isIndeterminate ? (\n <RiSubtractLine size={12} />\n ) : (\n <RiCheckLine size={12} />\n )}\n </div>\n {children != null && <div>{children}</div>}\n </>\n )}\n </RACheckbox>\n );\n },\n);\n"],"names":["RACheckbox"],"mappings":";;;;;;;AA4BO,MAAM,QAAA,GAAW,UAAA;AAAA,EACtB,CAAC,OAAO,GAAA,KAAQ;AACd,IAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAW,cAAA,EAAe,GAAI,aAAA;AAAA,MAC9C,kBAAA;AAAA,MACA;AAAA,KACF;AACA,IAAA,MAAM,EAAE,OAAA,EAAS,QAAA,EAAS,GAAI,QAAA;AAC9B,IAAA,MAAM,SAAA,GAAY,UAAU,YAAY,CAAA;AACxC,IAAA,MAAM,cAAA,GAAiB,UAAU,iBAAiB,CAAA;AAElD,IAAA,SAAA,CAAU,MAAM;AACd,MAAA,IAAI,CAAC,QAAA,IAAY,CAAC,SAAA,IAAa,CAAC,cAAA,EAAgB;AAC9C,QAAA,OAAA,CAAQ,IAAA;AAAA,UACN;AAAA,SACF;AAAA,MACF;AAAA,IACF,CAAA,EAAG,CAAC,QAAA,EAAU,SAAA,EAAW,cAAc,CAAC,CAAA;AAExC,IAAA,uBACE,GAAA;AAAA,MAACA,UAAA;AAAA,MAAA;AAAA,QACC,GAAA;AAAA,QACA,WAAW,OAAA,CAAQ,IAAA;AAAA,QAClB,GAAG,cAAA;AAAA,QACH,GAAG,SAAA;AAAA,QAEH,QAAA,EAAA,CAAC,EAAE,eAAA,EAAgB,qBAClB,IAAA,CAAA,QAAA,EAAA,EACE,QAAA,EAAA;AAAA,0BAAA,GAAA,CAAC,SAAI,SAAA,EAAW,OAAA,CAAQ,SAAA,EAAW,aAAA,EAAY,QAC5C,QAAA,EAAA,eAAA,mBACC,GAAA,CAAC,cAAA,EAAA,EAAe,IAAA,EAAM,IAAI,CAAA,mBAE1B,GAAA,CAAC,WAAA,EAAA,EAAY,IAAA,EAAM,IAAI,CAAA,EAE3B,CAAA;AAAA,UACC,QAAA,IAAY,IAAA,oBAAQ,GAAA,CAAC,KAAA,EAAA,EAAK,QAAA,EAAS;AAAA,SAAA,EACtC;AAAA;AAAA,KAEJ;AAAA,EAEJ;AACF;;;;"}
1
+ {"version":3,"file":"Checkbox.esm.js","sources":["../../../src/components/Checkbox/Checkbox.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, useEffect } from 'react';\nimport { Checkbox as RACheckbox } from 'react-aria-components';\nimport type { CheckboxProps } from './types';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport { CheckboxDefinition } from './definition';\nimport { RiCheckLine, RiSubtractLine } from '@remixicon/react';\n\n/**\n * A form checkbox input with support for indeterminate state and accessible labeling.\n *\n * @public\n */\nexport const Checkbox = forwardRef<HTMLLabelElement, CheckboxProps>(\n (props, ref) => {\n const { ownProps, restProps, dataAttributes } = useDefinition(\n CheckboxDefinition,\n props,\n );\n const { classes, children } = ownProps;\n const ariaLabel = restProps['aria-label'];\n const ariaLabelledBy = restProps['aria-labelledby'];\n\n useEffect(() => {\n if (!children && !ariaLabel && !ariaLabelledBy) {\n console.warn(\n 'Checkbox requires either a visible label, aria-label, or aria-labelledby for accessibility',\n );\n }\n }, [children, ariaLabel, ariaLabelledBy]);\n\n return (\n <RACheckbox\n ref={ref}\n className={classes.root}\n {...dataAttributes}\n {...restProps}\n >\n {({ isIndeterminate }) => (\n <>\n <div className={classes.indicator} aria-hidden=\"true\">\n {isIndeterminate ? (\n <RiSubtractLine size={12} />\n ) : (\n <RiCheckLine size={12} />\n )}\n </div>\n {children != null && <div>{children}</div>}\n </>\n )}\n </RACheckbox>\n );\n },\n);\n"],"names":["RACheckbox"],"mappings":";;;;;;;AA4BO,MAAM,QAAA,GAAW,UAAA;AAAA,EACtB,CAAC,OAAO,GAAA,KAAQ;AACd,IAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAW,cAAA,EAAe,GAAI,aAAA;AAAA,MAC9C,kBAAA;AAAA,MACA;AAAA,KACF;AACA,IAAA,MAAM,EAAE,OAAA,EAAS,QAAA,EAAS,GAAI,QAAA;AAC9B,IAAA,MAAM,SAAA,GAAY,UAAU,YAAY,CAAA;AACxC,IAAA,MAAM,cAAA,GAAiB,UAAU,iBAAiB,CAAA;AAElD,IAAA,SAAA,CAAU,MAAM;AACd,MAAA,IAAI,CAAC,QAAA,IAAY,CAAC,SAAA,IAAa,CAAC,cAAA,EAAgB;AAC9C,QAAA,OAAA,CAAQ,IAAA;AAAA,UACN;AAAA,SACF;AAAA,MACF;AAAA,IACF,CAAA,EAAG,CAAC,QAAA,EAAU,SAAA,EAAW,cAAc,CAAC,CAAA;AAExC,IAAA,uBACE,GAAA;AAAA,MAACA,UAAA;AAAA,MAAA;AAAA,QACC,GAAA;AAAA,QACA,WAAW,OAAA,CAAQ,IAAA;AAAA,QAClB,GAAG,cAAA;AAAA,QACH,GAAG,SAAA;AAAA,QAEH,QAAA,EAAA,CAAC,EAAE,eAAA,EAAgB,qBAClB,IAAA,CAAA,QAAA,EAAA,EACE,QAAA,EAAA;AAAA,0BAAA,GAAA,CAAC,SAAI,SAAA,EAAW,OAAA,CAAQ,SAAA,EAAW,aAAA,EAAY,QAC5C,QAAA,EAAA,eAAA,mBACC,GAAA,CAAC,cAAA,EAAA,EAAe,IAAA,EAAM,IAAI,CAAA,mBAE1B,GAAA,CAAC,WAAA,EAAA,EAAY,IAAA,EAAM,IAAI,CAAA,EAE3B,CAAA;AAAA,UACC,QAAA,IAAY,IAAA,oBAAQ,GAAA,CAAC,KAAA,EAAA,EAAK,QAAA,EAAS;AAAA,SAAA,EACtC;AAAA;AAAA,KAEJ;AAAA,EAEJ;AACF;;"}
@@ -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 .Checkbox_bui-Checkbox__b6f4f2b0fa {\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n gap: var(--bui-space-2);\n font-size: var(--bui-font-size-3);\n font-family: var(--bui-font-regular);\n font-weight: var(--bui-font-weight-regular);\n line-height: 1.15;\n color: var(--bui-fg-primary);\n user-select: none;\n cursor: pointer;\n }\n\n .Checkbox_bui-Checkbox__b6f4f2b0fa[data-disabled] {\n cursor: not-allowed;\n opacity: 0.5;\n }\n\n .Checkbox_bui-CheckboxIndicator__b6f4f2b0fa {\n border: none;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 1rem;\n height: 1rem;\n box-shadow: inset 0 0 0 1px var(--bui-border-2);\n border-radius: 2px;\n transition: background-color 0.2s ease-in-out;\n background-color: var(--bui-bg-neutral-1);\n padding: 0;\n flex-shrink: 0;\n color: transparent;\n\n .Checkbox_bui-Checkbox__b6f4f2b0fa[data-focus-visible] & {\n transition: none;\n outline: 2px solid var(--bui-ring);\n outline-offset: 2px;\n }\n\n .Checkbox_bui-Checkbox__b6f4f2b0fa[data-selected] & {\n background-color: var(--bui-bg-solid);\n box-shadow: none;\n color: var(--bui-fg-solid);\n }\n\n .Checkbox_bui-Checkbox__b6f4f2b0fa[data-indeterminate] & {\n background-color: var(--bui-bg-neutral-1);\n box-shadow: inset 0 0 0 1px var(--bui-border-2);\n color: var(--bui-fg-primary);\n }\n\n .Checkbox_bui-Checkbox__b6f4f2b0fa[data-invalid] & {\n box-shadow: inset 0 0 0 1px var(--bui-border-danger);\n }\n\n .Checkbox_bui-Checkbox__b6f4f2b0fa[data-invalid][data-selected] & {\n background-color: var(--bui-border-danger);\n box-shadow: none;\n }\n\n .Checkbox_bui-Checkbox__b6f4f2b0fa[data-invalid][data-indeterminate] & {\n box-shadow: inset 0 0 0 1px var(--bui-border-danger);\n }\n\n @media (prefers-reduced-motion: reduce) {\n & {\n transition: none;\n }\n }\n }\n}\n";
4
- var styles = {"bui-Checkbox":"Checkbox_bui-Checkbox__b6f4f2b0fa","bui-CheckboxIndicator":"Checkbox_bui-CheckboxIndicator__b6f4f2b0fa"};
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 .Checkbox_bui-Checkbox__ac2af4498c {\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n gap: var(--bui-space-2);\n font-size: var(--bui-font-size-3);\n font-family: var(--bui-font-regular);\n font-weight: var(--bui-font-weight-regular);\n line-height: 1.15;\n color: var(--bui-fg-primary);\n user-select: none;\n cursor: pointer;\n }\n\n .Checkbox_bui-Checkbox__ac2af4498c[data-disabled] {\n cursor: not-allowed;\n opacity: 0.5;\n }\n\n .Checkbox_bui-CheckboxIndicator__ac2af4498c {\n border: none;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 1rem;\n height: 1rem;\n box-shadow: inset 0 0 0 1px var(--bui-border-2);\n border-radius: 2px;\n transition: background-color 0.2s ease-in-out;\n background-color: var(--bui-bg-neutral-1);\n padding: 0;\n flex-shrink: 0;\n color: transparent;\n\n .Checkbox_bui-Checkbox__ac2af4498c[data-focus-visible] & {\n transition: none;\n outline: 2px solid var(--bui-ring);\n outline-offset: 2px;\n }\n\n .Checkbox_bui-Checkbox__ac2af4498c[data-selected] & {\n background-color: var(--bui-bg-solid);\n box-shadow: none;\n color: var(--bui-fg-solid);\n }\n\n .Checkbox_bui-Checkbox__ac2af4498c[data-indeterminate] & {\n background-color: var(--bui-bg-neutral-1);\n box-shadow: inset 0 0 0 1px var(--bui-border-2);\n color: var(--bui-fg-primary);\n }\n\n .Checkbox_bui-Checkbox__ac2af4498c[data-invalid] & {\n box-shadow: inset 0 0 0 1px var(--bui-border-danger);\n }\n\n .Checkbox_bui-Checkbox__ac2af4498c[data-invalid][data-selected] & {\n background-color: var(--bui-border-danger);\n box-shadow: none;\n }\n\n .Checkbox_bui-Checkbox__ac2af4498c[data-invalid][data-indeterminate] & {\n box-shadow: inset 0 0 0 1px var(--bui-border-danger);\n }\n\n @media (prefers-reduced-motion: reduce) {\n & {\n transition: none;\n }\n }\n }\n}\n";
4
+ var styles = {"bui-Checkbox":"Checkbox_bui-Checkbox__ac2af4498c","bui-CheckboxIndicator":"Checkbox_bui-CheckboxIndicator__ac2af4498c"};
5
5
  styleInject(css_248z);
6
6
 
7
7
  export { styles as default };
@@ -1 +1 @@
1
- {"version":3,"file":"Checkbox.module.css.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
1
+ {"version":3,"file":"Checkbox.module.css.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"definition.esm.js","sources":["../../../src/components/Checkbox/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 { CheckboxOwnProps } from './types';\nimport styles from './Checkbox.module.css';\n\n/**\n * Component definition for Checkbox\n * @public\n */\nexport const CheckboxDefinition = defineComponent<CheckboxOwnProps>()({\n styles,\n classNames: {\n root: 'bui-Checkbox',\n indicator: 'bui-CheckboxIndicator',\n },\n propDefs: {\n children: {},\n className: {},\n },\n});\n"],"names":[],"mappings":";;;;;;;;;;;;AAwBO,MAAM,kBAAA,GAAqB,iBAAkC,CAAE;AAAA,EACpE,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,cAAA;AAAA,IACN,SAAA,EAAW;AAAA,GACb;AAAA,EACA,QAAA,EAAU;AAAA,IACR,UAAU,EAAC;AAAA,IACX,WAAW;AAAC;AAEhB,CAAC;;;;"}
1
+ {"version":3,"file":"definition.esm.js","sources":["../../../src/components/Checkbox/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 { CheckboxOwnProps } from './types';\nimport styles from './Checkbox.module.css';\n\n/**\n * Component definition for Checkbox\n * @public\n */\nexport const CheckboxDefinition = defineComponent<CheckboxOwnProps>()({\n styles,\n classNames: {\n root: 'bui-Checkbox',\n indicator: 'bui-CheckboxIndicator',\n },\n propDefs: {\n children: {},\n className: {},\n },\n});\n"],"names":[],"mappings":";;;;;;;;;;;;AAwBO,MAAM,kBAAA,GAAqB,iBAAkC,CAAE;AAAA,EACpE,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,cAAA;AAAA,IACN,SAAA,EAAW;AAAA,GACb;AAAA,EACA,QAAA,EAAU;AAAA,IACR,UAAU,EAAC;AAAA,IACX,WAAW;AAAC;AAEhB,CAAC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"CheckboxGroup.esm.js","sources":["../../../src/components/CheckboxGroup/CheckboxGroup.tsx"],"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 { forwardRef, useEffect } from 'react';\nimport { CheckboxGroup as RACheckboxGroup } from 'react-aria-components';\nimport type { CheckboxGroupProps } from './types';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport { CheckboxGroupDefinition } from './definition';\nimport { FieldLabel } from '../FieldLabel';\nimport { FieldError } from '../FieldError';\n\n/**\n * A group of checkboxes for selecting multiple options from a list.\n * @public\n */\nexport const CheckboxGroup = forwardRef<HTMLDivElement, CheckboxGroupProps>(\n (props, ref) => {\n const { ownProps, restProps } = useDefinition(\n CheckboxGroupDefinition,\n props,\n );\n const {\n classes,\n label,\n secondaryLabel,\n description,\n isRequired,\n orientation,\n children,\n } = ownProps;\n\n const ariaLabel = restProps['aria-label'];\n const ariaLabelledBy = restProps['aria-labelledby'];\n\n useEffect(() => {\n if (!label && !ariaLabel && !ariaLabelledBy) {\n console.warn(\n 'CheckboxGroup requires either a visible label, aria-label, or aria-labelledby for accessibility',\n );\n }\n }, [label, ariaLabel, ariaLabelledBy]);\n\n const secondaryLabelText =\n secondaryLabel || (isRequired ? 'Required' : null);\n\n return (\n <RACheckboxGroup\n ref={ref}\n className={classes.root}\n isRequired={isRequired}\n data-orientation={orientation}\n {...restProps}\n >\n <FieldLabel\n label={label}\n secondaryLabel={secondaryLabelText}\n description={description}\n descriptionSlot=\"description\"\n />\n <div className={classes.content}>{children}</div>\n <FieldError />\n </RACheckboxGroup>\n );\n },\n);\n\nCheckboxGroup.displayName = 'CheckboxGroup';\n"],"names":["RACheckboxGroup"],"mappings":";;;;;;;;;;AA4BO,MAAM,aAAA,GAAgB,UAAA;AAAA,EAC3B,CAAC,OAAO,GAAA,KAAQ;AACd,IAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAU,GAAI,aAAA;AAAA,MAC9B,uBAAA;AAAA,MACA;AAAA,KACF;AACA,IAAA,MAAM;AAAA,MACJ,OAAA;AAAA,MACA,KAAA;AAAA,MACA,cAAA;AAAA,MACA,WAAA;AAAA,MACA,UAAA;AAAA,MACA,WAAA;AAAA,MACA;AAAA,KACF,GAAI,QAAA;AAEJ,IAAA,MAAM,SAAA,GAAY,UAAU,YAAY,CAAA;AACxC,IAAA,MAAM,cAAA,GAAiB,UAAU,iBAAiB,CAAA;AAElD,IAAA,SAAA,CAAU,MAAM;AACd,MAAA,IAAI,CAAC,KAAA,IAAS,CAAC,SAAA,IAAa,CAAC,cAAA,EAAgB;AAC3C,QAAA,OAAA,CAAQ,IAAA;AAAA,UACN;AAAA,SACF;AAAA,MACF;AAAA,IACF,CAAA,EAAG,CAAC,KAAA,EAAO,SAAA,EAAW,cAAc,CAAC,CAAA;AAErC,IAAA,MAAM,kBAAA,GACJ,cAAA,KAAmB,UAAA,GAAa,UAAA,GAAa,IAAA,CAAA;AAE/C,IAAA,uBACE,IAAA;AAAA,MAACA,eAAA;AAAA,MAAA;AAAA,QACC,GAAA;AAAA,QACA,WAAW,OAAA,CAAQ,IAAA;AAAA,QACnB,UAAA;AAAA,QACA,kBAAA,EAAkB,WAAA;AAAA,QACjB,GAAG,SAAA;AAAA,QAEJ,QAAA,EAAA;AAAA,0BAAA,GAAA;AAAA,YAAC,UAAA;AAAA,YAAA;AAAA,cACC,KAAA;AAAA,cACA,cAAA,EAAgB,kBAAA;AAAA,cAChB,WAAA;AAAA,cACA,eAAA,EAAgB;AAAA;AAAA,WAClB;AAAA,0BACA,GAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,OAAA,CAAQ,SAAU,QAAA,EAAS,CAAA;AAAA,8BAC1C,UAAA,EAAA,EAAW;AAAA;AAAA;AAAA,KACd;AAAA,EAEJ;AACF;AAEA,aAAA,CAAc,WAAA,GAAc,eAAA;;;;"}
1
+ {"version":3,"file":"CheckboxGroup.esm.js","sources":["../../../src/components/CheckboxGroup/CheckboxGroup.tsx"],"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 { forwardRef, useEffect } from 'react';\nimport { CheckboxGroup as RACheckboxGroup } from 'react-aria-components';\nimport type { CheckboxGroupProps } from './types';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport { CheckboxGroupDefinition } from './definition';\nimport { FieldLabel } from '../FieldLabel';\nimport { FieldError } from '../FieldError';\n\n/**\n * A group of checkboxes for selecting multiple options from a list.\n * @public\n */\nexport const CheckboxGroup = forwardRef<HTMLDivElement, CheckboxGroupProps>(\n (props, ref) => {\n const { ownProps, restProps } = useDefinition(\n CheckboxGroupDefinition,\n props,\n );\n const {\n classes,\n label,\n secondaryLabel,\n description,\n isRequired,\n orientation,\n children,\n } = ownProps;\n\n const ariaLabel = restProps['aria-label'];\n const ariaLabelledBy = restProps['aria-labelledby'];\n\n useEffect(() => {\n if (!label && !ariaLabel && !ariaLabelledBy) {\n console.warn(\n 'CheckboxGroup requires either a visible label, aria-label, or aria-labelledby for accessibility',\n );\n }\n }, [label, ariaLabel, ariaLabelledBy]);\n\n const secondaryLabelText =\n secondaryLabel || (isRequired ? 'Required' : null);\n\n return (\n <RACheckboxGroup\n ref={ref}\n className={classes.root}\n isRequired={isRequired}\n data-orientation={orientation}\n {...restProps}\n >\n <FieldLabel\n label={label}\n secondaryLabel={secondaryLabelText}\n description={description}\n descriptionSlot=\"description\"\n />\n <div className={classes.content}>{children}</div>\n <FieldError />\n </RACheckboxGroup>\n );\n },\n);\n\nCheckboxGroup.displayName = 'CheckboxGroup';\n"],"names":["RACheckboxGroup"],"mappings":";;;;;;;;;;AA4BO,MAAM,aAAA,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KACd;AAAA,EAEJ;AACF;AAEA,aAAA,CAAc,WAAA,GAAc,eAAA;;"}
@@ -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 = "@layer tokens, base, components, utilities;\n\n@layer components {\n .CheckboxGroup_bui-CheckboxGroup__b7c8b55111 {\n display: flex;\n flex-direction: column;\n }\n\n .CheckboxGroup_bui-CheckboxGroup__b7c8b55111[data-orientation='horizontal'] .CheckboxGroup_bui-CheckboxGroupContent__b7c8b55111 {\n flex-direction: row;\n gap: var(--bui-space-4);\n }\n\n .CheckboxGroup_bui-CheckboxGroupContent__b7c8b55111 {\n display: flex;\n flex-direction: column;\n gap: var(--bui-space-2);\n }\n}\n";
4
- var styles = {"bui-CheckboxGroup":"CheckboxGroup_bui-CheckboxGroup__b7c8b55111","bui-CheckboxGroupContent":"CheckboxGroup_bui-CheckboxGroupContent__b7c8b55111"};
3
+ var css_248z = "@layer tokens, base, components, theme, utilities;\n\n@layer components {\n .CheckboxGroup_bui-CheckboxGroup__9ea462f89b {\n display: flex;\n flex-direction: column;\n }\n\n .CheckboxGroup_bui-CheckboxGroup__9ea462f89b[data-orientation='horizontal'] .CheckboxGroup_bui-CheckboxGroupContent__9ea462f89b {\n flex-direction: row;\n gap: var(--bui-space-4);\n }\n\n .CheckboxGroup_bui-CheckboxGroupContent__9ea462f89b {\n display: flex;\n flex-direction: column;\n gap: var(--bui-space-2);\n }\n}\n";
4
+ var styles = {"bui-CheckboxGroup":"CheckboxGroup_bui-CheckboxGroup__9ea462f89b","bui-CheckboxGroupContent":"CheckboxGroup_bui-CheckboxGroupContent__9ea462f89b"};
5
5
  styleInject(css_248z);
6
6
 
7
7
  export { styles as default };
@@ -1 +1 @@
1
- {"version":3,"file":"CheckboxGroup.module.css.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
1
+ {"version":3,"file":"CheckboxGroup.module.css.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"definition.esm.js","sources":["../../../src/components/CheckboxGroup/definition.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 { defineComponent } from '../../hooks/useDefinition';\nimport type { CheckboxGroupOwnProps } from './types';\nimport styles from './CheckboxGroup.module.css';\n\n/**\n * Component definition for CheckboxGroup\n * @public\n */\nexport const CheckboxGroupDefinition = defineComponent<CheckboxGroupOwnProps>()(\n {\n styles,\n classNames: {\n root: 'bui-CheckboxGroup',\n content: 'bui-CheckboxGroupContent',\n },\n propDefs: {\n className: {},\n children: {},\n label: {},\n secondaryLabel: {},\n description: {},\n isRequired: {},\n orientation: {},\n },\n },\n);\n"],"names":[],"mappings":";;;;;;;;;;;;AAwBO,MAAM,0BAA0B,eAAA,EAAuC;AAAA,EAC5E;AAAA,IACE,MAAA;AAAA,IACA,UAAA,EAAY;AAAA,MACV,IAAA,EAAM,mBAAA;AAAA,MACN,OAAA,EAAS;AAAA,KACX;AAAA,IACA,QAAA,EAAU;AAAA,MACR,WAAW,EAAC;AAAA,MACZ,UAAU,EAAC;AAAA,MACX,OAAO,EAAC;AAAA,MACR,gBAAgB,EAAC;AAAA,MACjB,aAAa,EAAC;AAAA,MACd,YAAY,EAAC;AAAA,MACb,aAAa;AAAC;AAChB;AAEJ;;;;"}
1
+ {"version":3,"file":"definition.esm.js","sources":["../../../src/components/CheckboxGroup/definition.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 { defineComponent } from '../../hooks/useDefinition';\nimport type { CheckboxGroupOwnProps } from './types';\nimport styles from './CheckboxGroup.module.css';\n\n/**\n * Component definition for CheckboxGroup\n * @public\n */\nexport const CheckboxGroupDefinition = defineComponent<CheckboxGroupOwnProps>()(\n {\n styles,\n classNames: {\n root: 'bui-CheckboxGroup',\n content: 'bui-CheckboxGroupContent',\n },\n propDefs: {\n className: {},\n children: {},\n label: {},\n secondaryLabel: {},\n description: {},\n isRequired: {},\n orientation: {},\n },\n },\n);\n"],"names":[],"mappings":";;;;;;;;;;;;AAwBO,MAAM,0BAA0B,eAAA,EAAuC;AAAA,EAC5E;AAAA,IACE,MAAA;AAAA,IACA,UAAA,EAAY;AAAA,MACV,IAAA,EAAM,mBAAA;AAAA,MACN,OAAA,EAAS;AAAA,KACX;AAAA,IACA,QAAA,EAAU;AAAA,MACR,WAAW,EAAC;AAAA,MACZ,UAAU,EAAC;AAAA,MACX,OAAO,EAAC;AAAA,MACR,gBAAgB,EAAC;AAAA,MACjB,aAAa,EAAC;AAAA,MACd,YAAY,EAAC;AAAA,MACb,aAAa;AAAC;AAChB;AAEJ;;"}
@@ -1,5 +1,5 @@
1
1
  import { jsxs, jsx } from 'react/jsx-runtime';
2
- import { forwardRef, useEffect } from 'react';
2
+ import { forwardRef, useEffect, useState } from 'react';
3
3
  import { ComboBox } from 'react-aria-components';
4
4
  import { useFilter } from 'react-aria';
5
5
  import { useDefinition } from '../../hooks/useDefinition/useDefinition.esm.js';
@@ -13,7 +13,7 @@ import '../FieldError/FieldError.module.css.esm.js';
13
13
  import { ComboboxInput } from './ComboboxInput.esm.js';
14
14
  import { ComboboxListBox } from './ComboboxListBox.esm.js';
15
15
  import { useCollectionAdapter } from '../../hooks/useCollectionAdapter.esm.js';
16
- import { resolveCollectionSource, isAsyncListSource } from '../../utils/selectableCollection.esm.js';
16
+ import { resolveCollectionSource, isAsyncListSource, filterOptionSections, normalizeOptions } from '../../utils/selectableCollection.esm.js';
17
17
  import { useAsyncComboboxState, getAsyncComboboxItemTextValue } from './useAsyncComboboxState.esm.js';
18
18
 
19
19
  function resolveComboboxStateProps({
@@ -87,10 +87,11 @@ function ComboboxImpl(props, ref) {
87
87
  retainSelectedItems: false
88
88
  });
89
89
  const renderedItems = collectionSource.rendersItems ? collection.canonicalItems : void 0;
90
- const rootItems = renderedItems ?? (collectionSource.options !== void 0 && search !== void 0 ? collection.canonicalItems : void 0);
91
90
  const searchProps = typeof search === "object" ? search : void 0;
92
- const isDirectAsyncServer = searchProps?.mode === "server" && isAsyncListSource(collectionSource.source);
93
- const shouldDisableRootFilter = searchProps?.mode === "server" || searchProps?.filter !== void 0;
91
+ const isServerSearch = searchProps?.mode === "server";
92
+ const isDirectAsyncServer = isServerSearch && isAsyncListSource(collectionSource.source);
93
+ const hasCustomFilter = searchProps?.filter !== void 0;
94
+ const rootItems = isServerSearch || hasCustomFilter ? collection.canonicalItems : void 0;
94
95
  const {
95
96
  value,
96
97
  defaultValue,
@@ -99,6 +100,7 @@ function ComboboxImpl(props, ref) {
99
100
  defaultInputValue,
100
101
  onInputChange,
101
102
  menuTrigger = "focus",
103
+ onOpenChange,
102
104
  ...ariaProps
103
105
  } = restProps;
104
106
  const asyncComboboxProps = isDirectAsyncServer ? {
@@ -122,18 +124,78 @@ function ComboboxImpl(props, ref) {
122
124
  collection,
123
125
  hasSearch: search !== void 0
124
126
  });
125
- const defaultFilter = shouldDisableRootFilter ? () => true : contains;
127
+ const [uncontrolledInputValue, setUncontrolledInputValue] = useState(
128
+ comboboxStateProps.defaultInputValue ?? ""
129
+ );
130
+ const currentInputValue = comboboxStateProps.inputValue ?? uncontrolledInputValue;
131
+ const [isMenuOpen, setIsMenuOpen] = useState(false);
132
+ const [showAllOptions, setShowAllOptions] = useState(false);
133
+ const [lastInputValue, setLastInputValue] = useState(currentInputValue);
134
+ if (lastInputValue !== currentInputValue) {
135
+ setLastInputValue(currentInputValue);
136
+ setShowAllOptions(false);
137
+ }
138
+ const keyProps = ariaProps;
139
+ const [uncontrolledSelectedKey, setUncontrolledSelectedKey] = useState(
140
+ comboboxStateProps.defaultValue ?? keyProps.defaultSelectedKey ?? null
141
+ );
142
+ let selectedKey = uncontrolledSelectedKey;
143
+ if (comboboxStateProps.value !== void 0) {
144
+ selectedKey = comboboxStateProps.value;
145
+ } else if (keyProps.selectedKey !== void 0) {
146
+ selectedKey = keyProps.selectedKey;
147
+ }
148
+ const customFilterQuery = hasCustomFilter && isMenuOpen && !showAllOptions ? currentInputValue : void 0;
149
+ const optionFilter = collectionSource.rendersItems ? void 0 : searchProps?.filter;
150
+ let hiddenKey;
151
+ const keepsSelected = (id, matches) => {
152
+ if (matches || id !== selectedKey) {
153
+ return matches;
154
+ }
155
+ hiddenKey = id;
156
+ return true;
157
+ };
158
+ const filteredOptions = optionFilter && customFilterQuery !== void 0 && collectionSource.options ? filterOptionSections(
159
+ normalizeOptions(collectionSource.options),
160
+ customFilterQuery,
161
+ (option, query) => keepsSelected(option.id, optionFilter(option, query))
162
+ ) : collectionSource.options;
163
+ const itemFilter = collectionSource.rendersItems ? searchProps?.filter : void 0;
164
+ const filteredItems = itemFilter && customFilterQuery !== void 0 && renderedItems ? renderedItems.filter(
165
+ (item) => keepsSelected(item.id, itemFilter(item, customFilterQuery))
166
+ ) : renderedItems;
167
+ const disabledKeys = hiddenKey === void 0 ? keyProps.disabledKeys : [...keyProps.disabledKeys ?? [], hiddenKey];
168
+ const handleChange = (key) => {
169
+ setUncontrolledSelectedKey(key);
170
+ comboboxStateProps.onChange?.(key);
171
+ };
172
+ const handleInputChange = (nextInputValue) => {
173
+ setUncontrolledInputValue(nextInputValue);
174
+ setShowAllOptions(false);
175
+ comboboxStateProps.onInputChange?.(nextInputValue);
176
+ };
177
+ const handleOpenChange = (isOpen, trigger) => {
178
+ setIsMenuOpen(isOpen);
179
+ if (isOpen) {
180
+ setShowAllOptions(trigger !== "input");
181
+ }
182
+ onOpenChange?.(isOpen, trigger);
183
+ };
126
184
  const getItemTextValue = isDirectAsyncServer && items !== void 0 ? getAsyncComboboxItemTextValue : void 0;
127
185
  return /* @__PURE__ */ jsxs(
128
186
  ComboBox,
129
187
  {
130
188
  className: classes.root,
131
- defaultFilter,
189
+ defaultFilter: contains,
132
190
  items: rootItems,
133
191
  ...dataAttributes,
134
192
  ref,
135
193
  ...ariaProps,
136
194
  ...comboboxStateProps,
195
+ disabledKeys,
196
+ onChange: handleChange,
197
+ onInputChange: handleInputChange,
198
+ onOpenChange: handleOpenChange,
137
199
  menuTrigger,
138
200
  allowsEmptyCollection: true,
139
201
  children: [
@@ -151,10 +213,10 @@ function ComboboxImpl(props, ref) {
151
213
  /* @__PURE__ */ jsx(Popover, { className: classes.popover, hideArrow: true, ...dataAttributes, children: /* @__PURE__ */ jsx(
152
214
  ComboboxListBox,
153
215
  {
154
- options: collectionSource.options,
155
- items: renderedItems,
216
+ options: filteredOptions,
217
+ items: filteredItems,
218
+ hiddenKey,
156
219
  dependencies,
157
- search,
158
220
  loading: collection.loading,
159
221
  isStale: collection.isStale,
160
222
  getItemTextValue,
@@ -1 +1 @@
1
- {"version":3,"file":"Combobox.esm.js","sources":["../../../src/components/Combobox/Combobox.tsx"],"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 { forwardRef, useEffect } from 'react';\nimport { ComboBox as AriaComboBox } from 'react-aria-components';\nimport { useFilter } from 'react-aria';\nimport type {\n ComboboxAsyncItemsProps,\n ComboboxAsyncOptionsProps,\n ComboboxItemsProps,\n ComboboxListBoxOwnProps,\n ComboboxOptionsProps,\n ComboboxProps,\n ComboboxServerItem,\n ComboboxServerItemsProps,\n ComboboxServerOptionsProps,\n ComboboxStaticProps,\n} from './types';\nimport type { Key } from 'react-aria-components';\nimport type {\n AsyncListSource,\n CollectionItem,\n NormalizedOption,\n} from '../../types/selectableCollection';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport { ComboboxDefinition } from './definition';\nimport { Popover } from '../Popover';\nimport { FieldLabel } from '../FieldLabel';\nimport { FieldError } from '../FieldError';\nimport { ComboboxInput } from './ComboboxInput';\nimport { ComboboxListBox } from './ComboboxListBox';\nimport {\n useCollectionAdapter,\n type CollectionAdapterResult,\n} from '../../hooks/useCollectionAdapter';\nimport {\n isAsyncListSource,\n resolveCollectionSource,\n} from '../../utils/selectableCollection';\nimport {\n getAsyncComboboxItemTextValue,\n useAsyncComboboxState,\n} from './useAsyncComboboxState';\n\ntype ComboboxRuntimeStateProps<T extends CollectionItem> = {\n value?: Key | T | null;\n defaultValue?: Key | T | null;\n onChange?: ((value: Key | null) => void) | ((value: T | null) => void);\n inputValue?: string;\n defaultInputValue?: string;\n onInputChange?: (value: string) => void;\n};\n\ntype ComboboxAriaStateProps = {\n value?: Key | null;\n defaultValue?: Key | null;\n onChange?: (value: Key | null) => void;\n inputValue?: string;\n defaultInputValue?: string;\n onInputChange?: (value: string) => void;\n};\n\ntype AsyncComboboxState = {\n value: Key | null;\n inputValue: string;\n onChange: (value: Key | null) => void;\n onInputChange: (value: string) => void;\n};\n\nfunction resolveComboboxStateProps<T extends CollectionItem>({\n runtimeState,\n asyncState,\n collection,\n hasSearch,\n}: {\n runtimeState: ComboboxRuntimeStateProps<T>;\n asyncState?: AsyncComboboxState;\n collection: CollectionAdapterResult<T>;\n hasSearch: boolean;\n}): ComboboxAriaStateProps {\n if (asyncState) {\n return asyncState;\n }\n\n const selectionProps = {\n value: runtimeState.value as Key | null | undefined,\n defaultValue: runtimeState.defaultValue as Key | null | undefined,\n onChange: runtimeState.onChange as\n | ((value: Key | null) => void)\n | undefined,\n };\n\n if (hasSearch) {\n return {\n ...selectionProps,\n inputValue: collection.inputValue,\n defaultInputValue: collection.defaultInputValue,\n onInputChange: collection.onInputChange,\n };\n }\n\n return {\n ...selectionProps,\n inputValue: runtimeState.inputValue,\n defaultInputValue: runtimeState.defaultInputValue,\n onInputChange: runtimeState.onInputChange,\n };\n}\n\n/**\n * A text input combined with a dropdown list of options. The user can type to filter\n * suggestions, navigate with the keyboard, and pick a value. With\n * `allowsCustomValue`, unmatched typed text can remain in the input without\n * selecting an option. The suggestions open when the input receives focus by\n * default. Use `menuTrigger` to customize this behavior.\n *\n * @public\n */\nfunction ComboboxImpl<T extends CollectionItem = NormalizedOption>(\n props: ComboboxProps<T>,\n ref: React.ForwardedRef<HTMLDivElement>,\n) {\n const { contains } = useFilter({ sensitivity: 'base' });\n const { ownProps, restProps, dataAttributes } = useDefinition(\n ComboboxDefinition,\n props,\n );\n const {\n classes,\n label,\n description,\n options,\n items,\n children,\n dependencies,\n icon,\n placeholder,\n isRequired,\n secondaryLabel,\n search,\n loading,\n } = ownProps;\n\n const ariaLabel = restProps['aria-label'];\n const ariaLabelledBy = restProps['aria-labelledby'];\n\n useEffect(() => {\n if (!label && !ariaLabel && !ariaLabelledBy) {\n console.warn(\n 'Combobox requires either a visible label, aria-label, or aria-labelledby for accessibility',\n );\n }\n }, [label, ariaLabel, ariaLabelledBy]);\n\n const secondaryLabelText = secondaryLabel || (isRequired ? 'Required' : null);\n const collectionSource = resolveCollectionSource<T>({\n options,\n items: items as Iterable<T> | AsyncListSource<T> | undefined,\n });\n const collection = useCollectionAdapter({\n items: collectionSource.source,\n search,\n loading,\n retainSelectedItems: false,\n });\n const renderedItems = collectionSource.rendersItems\n ? collection.canonicalItems\n : undefined;\n const rootItems =\n renderedItems ??\n (collectionSource.options !== undefined && search !== undefined\n ? collection.canonicalItems\n : undefined);\n const searchProps = typeof search === 'object' ? search : undefined;\n const isDirectAsyncServer =\n searchProps?.mode === 'server' &&\n isAsyncListSource(collectionSource.source);\n const shouldDisableRootFilter =\n searchProps?.mode === 'server' || searchProps?.filter !== undefined;\n const {\n value,\n defaultValue,\n onChange,\n inputValue,\n defaultInputValue,\n onInputChange,\n menuTrigger = 'focus',\n ...ariaProps\n } = restProps as typeof restProps & ComboboxRuntimeStateProps<T>;\n const asyncComboboxProps = isDirectAsyncServer\n ? {\n source: collectionSource.source as AsyncListSource<T>,\n value: value as T | null | undefined,\n defaultValue: defaultValue as T | null | undefined,\n onChange: onChange as ((value: T | null) => void) | undefined,\n allowsCustomValue: restProps.allowsCustomValue,\n }\n : undefined;\n const asyncComboboxState = useAsyncComboboxState(asyncComboboxProps);\n const comboboxStateProps = resolveComboboxStateProps({\n runtimeState: {\n value,\n defaultValue,\n onChange,\n inputValue,\n defaultInputValue,\n onInputChange,\n },\n asyncState: asyncComboboxState,\n collection,\n hasSearch: search !== undefined,\n });\n const defaultFilter = shouldDisableRootFilter ? () => true : contains;\n const getItemTextValue =\n isDirectAsyncServer && items !== undefined\n ? getAsyncComboboxItemTextValue\n : undefined;\n\n return (\n <AriaComboBox<T>\n className={classes.root}\n defaultFilter={defaultFilter}\n items={rootItems}\n {...dataAttributes}\n ref={ref}\n {...ariaProps}\n {...comboboxStateProps}\n menuTrigger={menuTrigger}\n allowsEmptyCollection\n >\n <FieldLabel\n label={label}\n secondaryLabel={secondaryLabelText}\n description={description}\n descriptionSlot=\"description\"\n />\n <ComboboxInput icon={icon} placeholder={placeholder} />\n <FieldError />\n <Popover className={classes.popover} hideArrow {...dataAttributes}>\n <ComboboxListBox\n options={collectionSource.options}\n items={renderedItems}\n dependencies={dependencies}\n search={search as never}\n loading={collection.loading}\n isStale={collection.isStale}\n getItemTextValue={getItemTextValue}\n >\n {children as ComboboxListBoxOwnProps<T>['children']}\n </ComboboxListBox>\n </Popover>\n </AriaComboBox>\n );\n}\n\n/** @public */\nexport const Combobox = forwardRef(ComboboxImpl) as unknown as {\n (\n props: ComboboxOptionsProps & React.RefAttributes<HTMLDivElement>,\n ): React.ReactElement;\n (\n props: ComboboxAsyncOptionsProps & React.RefAttributes<HTMLDivElement>,\n ): React.ReactElement;\n <T extends { id: Key }>(\n props: ComboboxItemsProps<T> & React.RefAttributes<HTMLDivElement>,\n ): React.ReactElement;\n <T extends { id: Key }>(\n props: ComboboxAsyncItemsProps<T> & React.RefAttributes<HTMLDivElement>,\n ): React.ReactElement;\n (\n props: ComboboxStaticProps & React.RefAttributes<HTMLDivElement>,\n ): React.ReactElement;\n (\n props: ComboboxServerOptionsProps & React.RefAttributes<HTMLDivElement>,\n ): React.ReactElement;\n <T extends ComboboxServerItem>(\n props: ComboboxServerItemsProps<T> & React.RefAttributes<HTMLDivElement>,\n ): React.ReactElement;\n displayName?: string;\n};\n\nCombobox.displayName = 'Combobox';\n"],"names":["AriaComboBox"],"mappings":";;;;;;;;;;;;;;;;;;AAkFA,SAAS,yBAAA,CAAoD;AAAA,EAC3D,YAAA;AAAA,EACA,UAAA;AAAA,EACA,UAAA;AAAA,EACA;AACF,CAAA,EAK2B;AACzB,EAAA,IAAI,UAAA,EAAY;AACd,IAAA,OAAO,UAAA;AAAA,EACT;AAEA,EAAA,MAAM,cAAA,GAAiB;AAAA,IACrB,OAAO,YAAA,CAAa,KAAA;AAAA,IACpB,cAAc,YAAA,CAAa,YAAA;AAAA,IAC3B,UAAU,YAAA,CAAa;AAAA,GAGzB;AAEA,EAAA,IAAI,SAAA,EAAW;AACb,IAAA,OAAO;AAAA,MACL,GAAG,cAAA;AAAA,MACH,YAAY,UAAA,CAAW,UAAA;AAAA,MACvB,mBAAmB,UAAA,CAAW,iBAAA;AAAA,MAC9B,eAAe,UAAA,CAAW;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CAAS,WAAA,GAAc,UAAA;;;;"}
1
+ {"version":3,"file":"Combobox.esm.js","sources":["../../../src/components/Combobox/Combobox.tsx"],"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 { forwardRef, useEffect, useState } from 'react';\nimport { ComboBox as AriaComboBox } from 'react-aria-components';\nimport { useFilter } from 'react-aria';\nimport type {\n ComboboxAsyncItemsProps,\n ComboboxAsyncOptionsProps,\n ComboboxItemsProps,\n ComboboxListBoxOwnProps,\n ComboboxOptionsProps,\n ComboboxProps,\n ComboboxServerItem,\n ComboboxServerItemsProps,\n ComboboxServerOptionsProps,\n ComboboxStaticProps,\n} from './types';\nimport type {\n ComboBoxProps as AriaComboBoxProps,\n Key,\n} from 'react-aria-components';\nimport type {\n AsyncListSource,\n CollectionItem,\n NormalizedOption,\n} from '../../types/selectableCollection';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport { ComboboxDefinition } from './definition';\nimport { Popover } from '../Popover';\nimport { FieldLabel } from '../FieldLabel';\nimport { FieldError } from '../FieldError';\nimport { ComboboxInput } from './ComboboxInput';\nimport { ComboboxListBox } from './ComboboxListBox';\nimport {\n useCollectionAdapter,\n type CollectionAdapterResult,\n} from '../../hooks/useCollectionAdapter';\nimport {\n filterOptionSections,\n isAsyncListSource,\n normalizeOptions,\n resolveCollectionSource,\n} from '../../utils/selectableCollection';\nimport {\n getAsyncComboboxItemTextValue,\n useAsyncComboboxState,\n} from './useAsyncComboboxState';\n\ntype ComboboxRuntimeStateProps<T extends CollectionItem> = {\n value?: Key | T | null;\n defaultValue?: Key | T | null;\n onChange?: ((value: Key | null) => void) | ((value: T | null) => void);\n inputValue?: string;\n defaultInputValue?: string;\n onInputChange?: (value: string) => void;\n};\n\ntype ComboboxAriaStateProps = {\n value?: Key | null;\n defaultValue?: Key | null;\n onChange?: (value: Key | null) => void;\n inputValue?: string;\n defaultInputValue?: string;\n onInputChange?: (value: string) => void;\n};\n\ntype AsyncComboboxState = {\n value: Key | null;\n inputValue: string;\n onChange: (value: Key | null) => void;\n onInputChange: (value: string) => void;\n};\n\nfunction resolveComboboxStateProps<T extends CollectionItem>({\n runtimeState,\n asyncState,\n collection,\n hasSearch,\n}: {\n runtimeState: ComboboxRuntimeStateProps<T>;\n asyncState?: AsyncComboboxState;\n collection: CollectionAdapterResult<T>;\n hasSearch: boolean;\n}): ComboboxAriaStateProps {\n if (asyncState) {\n return asyncState;\n }\n\n const selectionProps = {\n value: runtimeState.value as Key | null | undefined,\n defaultValue: runtimeState.defaultValue as Key | null | undefined,\n onChange: runtimeState.onChange as\n | ((value: Key | null) => void)\n | undefined,\n };\n\n if (hasSearch) {\n return {\n ...selectionProps,\n inputValue: collection.inputValue,\n defaultInputValue: collection.defaultInputValue,\n onInputChange: collection.onInputChange,\n };\n }\n\n return {\n ...selectionProps,\n inputValue: runtimeState.inputValue,\n defaultInputValue: runtimeState.defaultInputValue,\n onInputChange: runtimeState.onInputChange,\n };\n}\n\n/**\n * A text input combined with a dropdown list of options. The user can type to filter\n * suggestions, navigate with the keyboard, and pick a value. With\n * `allowsCustomValue`, unmatched typed text can remain in the input without\n * selecting an option. The suggestions open when the input receives focus by\n * default. Use `menuTrigger` to customize this behavior.\n *\n * @public\n */\nfunction ComboboxImpl<T extends CollectionItem = NormalizedOption>(\n props: ComboboxProps<T>,\n ref: React.ForwardedRef<HTMLDivElement>,\n) {\n const { contains } = useFilter({ sensitivity: 'base' });\n const { ownProps, restProps, dataAttributes } = useDefinition(\n ComboboxDefinition,\n props,\n );\n const {\n classes,\n label,\n description,\n options,\n items,\n children,\n dependencies,\n icon,\n placeholder,\n isRequired,\n secondaryLabel,\n search,\n loading,\n } = ownProps;\n\n const ariaLabel = restProps['aria-label'];\n const ariaLabelledBy = restProps['aria-labelledby'];\n\n useEffect(() => {\n if (!label && !ariaLabel && !ariaLabelledBy) {\n console.warn(\n 'Combobox requires either a visible label, aria-label, or aria-labelledby for accessibility',\n );\n }\n }, [label, ariaLabel, ariaLabelledBy]);\n\n const secondaryLabelText = secondaryLabel || (isRequired ? 'Required' : null);\n const collectionSource = resolveCollectionSource<T>({\n options,\n items: items as Iterable<T> | AsyncListSource<T> | undefined,\n });\n const collection = useCollectionAdapter({\n items: collectionSource.source,\n search,\n loading,\n retainSelectedItems: false,\n });\n const renderedItems = collectionSource.rendersItems\n ? collection.canonicalItems\n : undefined;\n const searchProps = typeof search === 'object' ? search : undefined;\n const isServerSearch = searchProps?.mode === 'server';\n const isDirectAsyncServer =\n isServerSearch && isAsyncListSource(collectionSource.source);\n const hasCustomFilter = searchProps?.filter !== undefined;\n // React Aria builds the collection from the list box children and filters it\n // by text unless items are passed. Passing items turns that filter off, so\n // the server or the custom filter decides which options the list box renders.\n const rootItems =\n isServerSearch || hasCustomFilter ? collection.canonicalItems : undefined;\n const {\n value,\n defaultValue,\n onChange,\n inputValue,\n defaultInputValue,\n onInputChange,\n menuTrigger = 'focus',\n onOpenChange,\n ...ariaProps\n } = restProps as typeof restProps & ComboboxRuntimeStateProps<T>;\n const asyncComboboxProps = isDirectAsyncServer\n ? {\n source: collectionSource.source as AsyncListSource<T>,\n value: value as T | null | undefined,\n defaultValue: defaultValue as T | null | undefined,\n onChange: onChange as ((value: T | null) => void) | undefined,\n allowsCustomValue: restProps.allowsCustomValue,\n }\n : undefined;\n const asyncComboboxState = useAsyncComboboxState(asyncComboboxProps);\n const comboboxStateProps = resolveComboboxStateProps({\n runtimeState: {\n value,\n defaultValue,\n onChange,\n inputValue,\n defaultInputValue,\n onInputChange,\n },\n asyncState: asyncComboboxState,\n collection,\n hasSearch: search !== undefined,\n });\n const [uncontrolledInputValue, setUncontrolledInputValue] = useState(\n comboboxStateProps.defaultInputValue ?? '',\n );\n const currentInputValue =\n comboboxStateProps.inputValue ?? uncontrolledInputValue;\n const [isMenuOpen, setIsMenuOpen] = useState(false);\n const [showAllOptions, setShowAllOptions] = useState(false);\n const [lastInputValue, setLastInputValue] = useState(currentInputValue);\n if (lastInputValue !== currentInputValue) {\n setLastInputValue(currentInputValue);\n setShowAllOptions(false);\n }\n // The deprecated `selectedKey` and `defaultSelectedKey` props still reach\n // React Aria, so the selection mirror honors them too.\n const keyProps = ariaProps as {\n selectedKey?: Key | null;\n defaultSelectedKey?: Key | null;\n disabledKeys?: Iterable<Key>;\n };\n const [uncontrolledSelectedKey, setUncontrolledSelectedKey] = useState(\n comboboxStateProps.defaultValue ?? keyProps.defaultSelectedKey ?? null,\n );\n let selectedKey = uncontrolledSelectedKey;\n if (comboboxStateProps.value !== undefined) {\n selectedKey = comboboxStateProps.value;\n } else if (keyProps.selectedKey !== undefined) {\n selectedKey = keyProps.selectedKey;\n }\n // Like React Aria's own filtering, the custom filter only applies once the\n // input text changes in the open menu.\n const customFilterQuery =\n hasCustomFilter && isMenuOpen && !showAllOptions\n ? currentInputValue\n : undefined;\n // `search` mixes the options and items variants, so each branch narrows the\n // filter to the type it renders.\n const optionFilter = collectionSource.rendersItems\n ? undefined\n : (searchProps?.filter as\n | ((option: NormalizedOption, query: string) => boolean)\n | undefined);\n // React Aria reads the selected option's label from the collection when it\n // restores the input on Escape or blur, and the collection only holds the\n // options the list box renders. So the selected option stays in the\n // collection even when the filter excludes it, but it is disabled so the\n // keyboard skips it, and the list box hides it.\n let hiddenKey: Key | undefined;\n const keepsSelected = (id: Key, matches: boolean) => {\n if (matches || id !== selectedKey) {\n return matches;\n }\n hiddenKey = id;\n return true;\n };\n const filteredOptions =\n optionFilter && customFilterQuery !== undefined && collectionSource.options\n ? filterOptionSections(\n normalizeOptions(collectionSource.options),\n customFilterQuery,\n (option, query) =>\n keepsSelected(option.id, optionFilter(option, query)),\n )\n : collectionSource.options;\n const itemFilter = collectionSource.rendersItems\n ? (searchProps?.filter as ((item: T, query: string) => boolean) | undefined)\n : undefined;\n const filteredItems =\n itemFilter && customFilterQuery !== undefined && renderedItems\n ? renderedItems.filter(item =>\n keepsSelected(item.id, itemFilter(item, customFilterQuery)),\n )\n : renderedItems;\n const disabledKeys =\n hiddenKey === undefined\n ? keyProps.disabledKeys\n : [...(keyProps.disabledKeys ?? []), hiddenKey];\n const handleChange = (key: Key | null) => {\n setUncontrolledSelectedKey(key);\n comboboxStateProps.onChange?.(key);\n };\n const handleInputChange = (nextInputValue: string) => {\n setUncontrolledInputValue(nextInputValue);\n // The mirror misses the label React Aria shows for a default selection, so\n // an edit back to the mirrored value must still start filtering.\n setShowAllOptions(false);\n comboboxStateProps.onInputChange?.(nextInputValue);\n };\n const handleOpenChange: NonNullable<AriaComboBoxProps<T>['onOpenChange']> = (\n isOpen,\n trigger,\n ) => {\n setIsMenuOpen(isOpen);\n if (isOpen) {\n setShowAllOptions(trigger !== 'input');\n }\n onOpenChange?.(isOpen, trigger);\n };\n const getItemTextValue =\n isDirectAsyncServer && items !== undefined\n ? getAsyncComboboxItemTextValue\n : undefined;\n\n return (\n <AriaComboBox<T>\n className={classes.root}\n defaultFilter={contains}\n items={rootItems}\n {...dataAttributes}\n ref={ref}\n {...ariaProps}\n {...comboboxStateProps}\n disabledKeys={disabledKeys}\n onChange={handleChange}\n onInputChange={handleInputChange}\n onOpenChange={handleOpenChange}\n menuTrigger={menuTrigger}\n allowsEmptyCollection\n >\n <FieldLabel\n label={label}\n secondaryLabel={secondaryLabelText}\n description={description}\n descriptionSlot=\"description\"\n />\n <ComboboxInput icon={icon} placeholder={placeholder} />\n <FieldError />\n <Popover className={classes.popover} hideArrow {...dataAttributes}>\n <ComboboxListBox\n options={filteredOptions}\n items={filteredItems}\n hiddenKey={hiddenKey}\n dependencies={dependencies}\n loading={collection.loading}\n isStale={collection.isStale}\n getItemTextValue={getItemTextValue}\n >\n {children as ComboboxListBoxOwnProps<T>['children']}\n </ComboboxListBox>\n </Popover>\n </AriaComboBox>\n );\n}\n\n/** @public */\nexport const Combobox = forwardRef(ComboboxImpl) as unknown as {\n (\n props: ComboboxOptionsProps & React.RefAttributes<HTMLDivElement>,\n ): React.ReactElement;\n (\n props: ComboboxAsyncOptionsProps & React.RefAttributes<HTMLDivElement>,\n ): React.ReactElement;\n <T extends { id: Key }>(\n props: ComboboxItemsProps<T> & React.RefAttributes<HTMLDivElement>,\n ): React.ReactElement;\n <T extends { id: Key }>(\n props: ComboboxAsyncItemsProps<T> & React.RefAttributes<HTMLDivElement>,\n ): React.ReactElement;\n (\n props: ComboboxStaticProps & React.RefAttributes<HTMLDivElement>,\n ): React.ReactElement;\n (\n props: ComboboxServerOptionsProps & React.RefAttributes<HTMLDivElement>,\n ): React.ReactElement;\n <T extends ComboboxServerItem>(\n props: ComboboxServerItemsProps<T> & React.RefAttributes<HTMLDivElement>,\n ): React.ReactElement;\n displayName?: string;\n};\n\nCombobox.displayName = 'Combobox';\n"],"names":["AriaComboBox"],"mappings":";;;;;;;;;;;;;;;;;;AAuFA,SAAS,yBAAA,CAAoD;AAAA,EAC3D,YAAA;AAAA,EACA,UAAA;AAAA,EACA,UAAA;AAAA,EACA;AACF,CAAA,EAK2B;AACzB,EAAA,IAAI,UAAA,EAAY;AACd,IAAA,OAAO,UAAA;AAAA,EACT;AAEA,EAAA,MAAM,cAAA,GAAiB;AAAA,IACrB,OAAO,YAAA,CAAa,KAAA;AAAA,IACpB,cAAc,YAAA,CAAa,YAAA;AAAA,IAC3B,UAAU,YAAA,CAAa;AAAA,GAGzB;AAEA,EAAA,IAAI,SAAA,EAAW;AACb,IAAA,OAAO;AAAA,MACL,GAAG,cAAA;AAAA,MACH,YAAY,UAAA,CAAW,UAAA;AAAA,MACvB,mBAAmB,UAAA,CAAW,iBAAA;AAAA,MAC9B,eAAe,UAAA,CAAW;AAAA,KAC5B;AAAA,EACF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