@backstage/ui 0.17.1 → 0.18.0-next.1

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 (184) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/analytics/useAnalytics.esm.js +5 -5
  3. package/dist/analytics/useAnalytics.esm.js.map +1 -1
  4. package/dist/components/Accordion/definition.esm.js +3 -1
  5. package/dist/components/Accordion/definition.esm.js.map +1 -1
  6. package/dist/components/Alert/definition.esm.js +3 -1
  7. package/dist/components/Alert/definition.esm.js.map +1 -1
  8. package/dist/components/Avatar/definition.esm.js +3 -1
  9. package/dist/components/Avatar/definition.esm.js.map +1 -1
  10. package/dist/components/Badge/Badge.module.css.esm.js +2 -2
  11. package/dist/components/Badge/definition.esm.js +3 -1
  12. package/dist/components/Badge/definition.esm.js.map +1 -1
  13. package/dist/components/Box/definition.esm.js +3 -1
  14. package/dist/components/Box/definition.esm.js.map +1 -1
  15. package/dist/components/Button/Button.module.css.esm.js +2 -2
  16. package/dist/components/Button/definition.esm.js +3 -1
  17. package/dist/components/Button/definition.esm.js.map +1 -1
  18. package/dist/components/ButtonIcon/definition.esm.js +3 -1
  19. package/dist/components/ButtonIcon/definition.esm.js.map +1 -1
  20. package/dist/components/ButtonLink/ButtonLink.esm.js +39 -23
  21. package/dist/components/ButtonLink/ButtonLink.esm.js.map +1 -1
  22. package/dist/components/ButtonLink/ButtonLink.module.css.esm.js +2 -2
  23. package/dist/components/ButtonLink/definition.esm.js +4 -1
  24. package/dist/components/ButtonLink/definition.esm.js.map +1 -1
  25. package/dist/components/Card/Card.esm.js +2 -1
  26. package/dist/components/Card/Card.esm.js.map +1 -1
  27. package/dist/components/Card/Card.module.css.esm.js +2 -2
  28. package/dist/components/Card/definition.esm.js +3 -1
  29. package/dist/components/Card/definition.esm.js.map +1 -1
  30. package/dist/components/Checkbox/Checkbox.module.css.esm.js +2 -2
  31. package/dist/components/Checkbox/definition.esm.js +3 -1
  32. package/dist/components/Checkbox/definition.esm.js.map +1 -1
  33. package/dist/components/CheckboxGroup/definition.esm.js +3 -1
  34. package/dist/components/CheckboxGroup/definition.esm.js.map +1 -1
  35. package/dist/components/Combobox/Combobox.module.css.esm.js +2 -2
  36. package/dist/components/Combobox/ComboboxItem.esm.js +37 -11
  37. package/dist/components/Combobox/ComboboxItem.esm.js.map +1 -1
  38. package/dist/components/Combobox/definition.esm.js +4 -1
  39. package/dist/components/Combobox/definition.esm.js.map +1 -1
  40. package/dist/components/Container/definition.esm.js +3 -1
  41. package/dist/components/Container/definition.esm.js.map +1 -1
  42. package/dist/components/DatePicker/DatePicker.module.css.esm.js +2 -2
  43. package/dist/components/DatePicker/definition.esm.js +3 -1
  44. package/dist/components/DatePicker/definition.esm.js.map +1 -1
  45. package/dist/components/DateRangePicker/DateRangePicker.module.css.esm.js +2 -2
  46. package/dist/components/DateRangePicker/definition.esm.js +3 -1
  47. package/dist/components/DateRangePicker/definition.esm.js.map +1 -1
  48. package/dist/components/Dialog/Dialog.module.css.esm.js +2 -2
  49. package/dist/components/Dialog/definition.esm.js +3 -1
  50. package/dist/components/Dialog/definition.esm.js.map +1 -1
  51. package/dist/components/FieldError/FieldError.module.css.esm.js +2 -2
  52. package/dist/components/FieldError/definition.esm.js +3 -1
  53. package/dist/components/FieldError/definition.esm.js.map +1 -1
  54. package/dist/components/FieldLabel/FieldLabel.module.css.esm.js +2 -2
  55. package/dist/components/FieldLabel/definition.esm.js +3 -1
  56. package/dist/components/FieldLabel/definition.esm.js.map +1 -1
  57. package/dist/components/Flex/definition.esm.js +3 -1
  58. package/dist/components/Flex/definition.esm.js.map +1 -1
  59. package/dist/components/FullPage/definition.esm.js +3 -1
  60. package/dist/components/FullPage/definition.esm.js.map +1 -1
  61. package/dist/components/Grid/definition.esm.js +3 -1
  62. package/dist/components/Grid/definition.esm.js.map +1 -1
  63. package/dist/components/Header/HeaderMetadataStatus.esm.js +3 -1
  64. package/dist/components/Header/HeaderMetadataStatus.esm.js.map +1 -1
  65. package/dist/components/Header/HeaderMetadataUsers.esm.js +3 -1
  66. package/dist/components/Header/HeaderMetadataUsers.esm.js.map +1 -1
  67. package/dist/components/Header/HeaderNav.esm.js +67 -24
  68. package/dist/components/Header/HeaderNav.esm.js.map +1 -1
  69. package/dist/components/Header/HeaderNav.module.css.esm.js +2 -2
  70. package/dist/components/Header/HeaderNavDefinition.esm.js +4 -1
  71. package/dist/components/Header/HeaderNavDefinition.esm.js.map +1 -1
  72. package/dist/components/Header/definition.esm.js +3 -1
  73. package/dist/components/Header/definition.esm.js.map +1 -1
  74. package/dist/components/Link/Link.esm.js +64 -23
  75. package/dist/components/Link/Link.esm.js.map +1 -1
  76. package/dist/components/Link/definition.esm.js +4 -1
  77. package/dist/components/Link/definition.esm.js.map +1 -1
  78. package/dist/components/List/List.esm.js +3 -2
  79. package/dist/components/List/List.esm.js.map +1 -1
  80. package/dist/components/List/List.module.css.esm.js +2 -2
  81. package/dist/components/List/definition.esm.js +3 -1
  82. package/dist/components/List/definition.esm.js.map +1 -1
  83. package/dist/components/Menu/Menu.esm.js +48 -14
  84. package/dist/components/Menu/Menu.esm.js.map +1 -1
  85. package/dist/components/Menu/Menu.module.css.esm.js +2 -2
  86. package/dist/components/Menu/definition.esm.js +5 -1
  87. package/dist/components/Menu/definition.esm.js.map +1 -1
  88. package/dist/components/NumberField/NumberField.module.css.esm.js +2 -2
  89. package/dist/components/NumberField/definition.esm.js +3 -1
  90. package/dist/components/NumberField/definition.esm.js.map +1 -1
  91. package/dist/components/PasswordField/PasswordField.module.css.esm.js +2 -2
  92. package/dist/components/PasswordField/definition.esm.js +3 -1
  93. package/dist/components/PasswordField/definition.esm.js.map +1 -1
  94. package/dist/components/PluginHeader/PluginHeaderBreadcrumbs.esm.js +3 -1
  95. package/dist/components/PluginHeader/PluginHeaderBreadcrumbs.esm.js.map +1 -1
  96. package/dist/components/PluginHeader/definition.esm.js +3 -1
  97. package/dist/components/PluginHeader/definition.esm.js.map +1 -1
  98. package/dist/components/Popover/definition.esm.js +3 -1
  99. package/dist/components/Popover/definition.esm.js.map +1 -1
  100. package/dist/components/RadioGroup/RadioGroup.module.css.esm.js +2 -2
  101. package/dist/components/RadioGroup/definition.esm.js +3 -1
  102. package/dist/components/RadioGroup/definition.esm.js.map +1 -1
  103. package/dist/components/SearchAutocomplete/SearchAutocomplete.esm.js +23 -5
  104. package/dist/components/SearchAutocomplete/SearchAutocomplete.esm.js.map +1 -1
  105. package/dist/components/SearchAutocomplete/SearchAutocomplete.module.css.esm.js +2 -2
  106. package/dist/components/SearchAutocomplete/definition.esm.js +4 -1
  107. package/dist/components/SearchAutocomplete/definition.esm.js.map +1 -1
  108. package/dist/components/SearchField/SearchField.module.css.esm.js +2 -2
  109. package/dist/components/SearchField/definition.esm.js +3 -1
  110. package/dist/components/SearchField/definition.esm.js.map +1 -1
  111. package/dist/components/Select/Select.module.css.esm.js +2 -2
  112. package/dist/components/Select/SelectItem.esm.js +17 -3
  113. package/dist/components/Select/SelectItem.esm.js.map +1 -1
  114. package/dist/components/Select/definition.esm.js +4 -1
  115. package/dist/components/Select/definition.esm.js.map +1 -1
  116. package/dist/components/Skeleton/definition.esm.js +3 -1
  117. package/dist/components/Skeleton/definition.esm.js.map +1 -1
  118. package/dist/components/Slider/Slider.module.css.esm.js +2 -2
  119. package/dist/components/Slider/definition.esm.js +3 -1
  120. package/dist/components/Slider/definition.esm.js.map +1 -1
  121. package/dist/components/Switch/Switch.module.css.esm.js +2 -2
  122. package/dist/components/Switch/definition.esm.js +3 -1
  123. package/dist/components/Switch/definition.esm.js.map +1 -1
  124. package/dist/components/Table/Table.module.css.esm.js +2 -2
  125. package/dist/components/Table/components/Row.esm.js +9 -9
  126. package/dist/components/Table/components/Row.esm.js.map +1 -1
  127. package/dist/components/Table/components/Table.esm.js +5 -3
  128. package/dist/components/Table/components/Table.esm.js.map +1 -1
  129. package/dist/components/Table/components/TableBodySkeleton.esm.js +3 -1
  130. package/dist/components/Table/components/TableBodySkeleton.esm.js.map +1 -1
  131. package/dist/components/Table/components/TableRoot.esm.js +3 -2
  132. package/dist/components/Table/components/TableRoot.esm.js.map +1 -1
  133. package/dist/components/Table/definition.esm.js +3 -2
  134. package/dist/components/Table/definition.esm.js.map +1 -1
  135. package/dist/components/TablePagination/TablePagination.esm.js +3 -1
  136. package/dist/components/TablePagination/TablePagination.esm.js.map +1 -1
  137. package/dist/components/TablePagination/definition.esm.js +3 -1
  138. package/dist/components/TablePagination/definition.esm.js.map +1 -1
  139. package/dist/components/Tabs/Tabs.esm.js +38 -15
  140. package/dist/components/Tabs/Tabs.esm.js.map +1 -1
  141. package/dist/components/Tabs/Tabs.module.css.esm.js +2 -2
  142. package/dist/components/Tabs/definition.esm.js +4 -1
  143. package/dist/components/Tabs/definition.esm.js.map +1 -1
  144. package/dist/components/TagGroup/TagGroup.esm.js +12 -12
  145. package/dist/components/TagGroup/TagGroup.esm.js.map +1 -1
  146. package/dist/components/TagGroup/TagGroup.module.css.esm.js +2 -2
  147. package/dist/components/TagGroup/definition.esm.js +3 -2
  148. package/dist/components/TagGroup/definition.esm.js.map +1 -1
  149. package/dist/components/Text/definition.esm.js +3 -1
  150. package/dist/components/Text/definition.esm.js.map +1 -1
  151. package/dist/components/TextAreaField/definition.esm.js +3 -1
  152. package/dist/components/TextAreaField/definition.esm.js.map +1 -1
  153. package/dist/components/TextField/TextField.module.css.esm.js +2 -2
  154. package/dist/components/TextField/definition.esm.js +3 -1
  155. package/dist/components/TextField/definition.esm.js.map +1 -1
  156. package/dist/components/ToggleButton/ToggleButton.module.css.esm.js +2 -2
  157. package/dist/components/ToggleButton/definition.esm.js +3 -1
  158. package/dist/components/ToggleButton/definition.esm.js.map +1 -1
  159. package/dist/components/ToggleButtonGroup/definition.esm.js +3 -1
  160. package/dist/components/ToggleButtonGroup/definition.esm.js.map +1 -1
  161. package/dist/components/Tooltip/Tooltip.module.css.esm.js +2 -2
  162. package/dist/components/Tooltip/definition.esm.js +3 -1
  163. package/dist/components/Tooltip/definition.esm.js.map +1 -1
  164. package/dist/components/VisuallyHidden/definition.esm.js +3 -1
  165. package/dist/components/VisuallyHidden/definition.esm.js.map +1 -1
  166. package/dist/css/styles.css +4 -7
  167. package/dist/hooks/useDefinition/useDefinition.esm.js +8 -13
  168. package/dist/hooks/useDefinition/useDefinition.esm.js.map +1 -1
  169. package/dist/hooks/useDefinition/useDefinitionNavigation.esm.js +50 -0
  170. package/dist/hooks/useDefinition/useDefinitionNavigation.esm.js.map +1 -0
  171. package/dist/index.d.ts +32 -8
  172. package/dist/navigation/BUIRoutingProvider.esm.js +44 -0
  173. package/dist/navigation/BUIRoutingProvider.esm.js.map +1 -0
  174. package/dist/navigation/useNavigation.esm.js +130 -0
  175. package/dist/navigation/useNavigation.esm.js.map +1 -0
  176. package/dist/navigation/useRouting.esm.js +27 -0
  177. package/dist/navigation/useRouting.esm.js.map +1 -0
  178. package/dist/provider/BUIContext.esm.js +6 -0
  179. package/dist/provider/BUIContext.esm.js.map +1 -0
  180. package/dist/provider/BUIProvider.esm.js +5 -13
  181. package/dist/provider/BUIProvider.esm.js.map +1 -1
  182. package/dist/utils/linkUtils.esm.js +6 -12
  183. package/dist/utils/linkUtils.esm.js.map +1 -1
  184. package/package.json +5 -4
@@ -1 +1 @@
1
- {"version":3,"file":"definition.esm.js","sources":["../../../src/components/TagGroup/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 { TagGroupOwnProps, TagOwnProps } from './types';\nimport styles from './TagGroup.module.css';\n\n/**\n * Component definition for TagGroup\n * @public\n */\nexport const TagGroupDefinition = defineComponent<TagGroupOwnProps>()({\n styles,\n classNames: {\n root: 'bui-TagGroup',\n list: 'bui-TagList',\n },\n propDefs: {\n items: {},\n children: {},\n renderEmptyState: {},\n className: {},\n },\n});\n\n/** @internal */\nexport const TagDefinition = defineComponent<TagOwnProps>()({\n styles,\n classNames: {\n root: 'bui-Tag',\n icon: 'bui-TagIcon',\n removeButton: 'bui-TagRemoveButton',\n },\n analytics: true,\n propDefs: {\n noTrack: {},\n icon: {},\n size: { dataAttribute: true, default: 'small' },\n href: {},\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,IAAA,EAAM;AAAA,GACR;AAAA,EACA,QAAA,EAAU;AAAA,IACR,OAAO,EAAC;AAAA,IACR,UAAU,EAAC;AAAA,IACX,kBAAkB,EAAC;AAAA,IACnB,WAAW;AAAC;AAEhB,CAAC;AAGM,MAAM,aAAA,GAAgB,iBAA6B,CAAE;AAAA,EAC1D,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,SAAA;AAAA,IACN,IAAA,EAAM,aAAA;AAAA,IACN,YAAA,EAAc;AAAA,GAChB;AAAA,EACA,SAAA,EAAW,IAAA;AAAA,EACX,QAAA,EAAU;AAAA,IACR,SAAS,EAAC;AAAA,IACV,MAAM,EAAC;AAAA,IACP,IAAA,EAAM,EAAE,aAAA,EAAe,IAAA,EAAM,SAAS,OAAA,EAAQ;AAAA,IAC9C,MAAM,EAAC;AAAA,IACP,UAAU,EAAC;AAAA,IACX,WAAW;AAAC;AAEhB,CAAC;;;;"}
1
+ {"version":3,"file":"definition.esm.js","sources":["../../../src/components/TagGroup/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 { TagGroupOwnProps, TagOwnProps } from './types';\nimport styles from './TagGroup.module.css';\n\n/**\n * Component definition for TagGroup\n * @public\n */\nexport const TagGroupDefinition = defineComponent<TagGroupOwnProps>()({\n styles,\n classNames: {\n root: 'bui-TagGroup',\n list: 'bui-TagList',\n },\n propDefs: {\n items: {},\n children: {},\n renderEmptyState: {},\n className: {},\n },\n});\n\n/** @internal */\nexport const TagDefinition = defineComponent<TagOwnProps>()({\n styles,\n classNames: {\n root: 'bui-Tag',\n icon: 'bui-TagIcon',\n removeButton: 'bui-TagRemoveButton',\n },\n analytics: true,\n propDefs: {\n noTrack: {},\n icon: {},\n size: { dataAttribute: true, default: 'small' },\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,IAAA,EAAM;AAAA,GACR;AAAA,EACA,QAAA,EAAU;AAAA,IACR,OAAO,EAAC;AAAA,IACR,UAAU,EAAC;AAAA,IACX,kBAAkB,EAAC;AAAA,IACnB,WAAW;AAAC;AAEhB,CAAC;AAGM,MAAM,aAAA,GAAgB,iBAA6B,CAAE;AAAA,EAC1D,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,SAAA;AAAA,IACN,IAAA,EAAM,aAAA;AAAA,IACN,YAAA,EAAc;AAAA,GAChB;AAAA,EACA,SAAA,EAAW,IAAA;AAAA,EACX,QAAA,EAAU;AAAA,IACR,SAAS,EAAC;AAAA,IACV,MAAM,EAAC;AAAA,IACP,IAAA,EAAM,EAAE,aAAA,EAAe,IAAA,EAAM,SAAS,OAAA,EAAQ;AAAA,IAC9C,UAAU,EAAC;AAAA,IACX,WAAW;AAAC;AAEhB,CAAC;;;;"}
@@ -3,8 +3,10 @@ import 'clsx';
3
3
  import '../../hooks/useBreakpoint.esm.js';
4
4
  import '../../hooks/useBg.esm.js';
5
5
  import '../../hooks/useDefinition/helpers.esm.js';
6
- import '../../analytics/useAnalytics.esm.js';
6
+ import 'react';
7
+ import '../../provider/BUIContext.esm.js';
7
8
  import 'react-router-dom';
9
+ import '@backstage/version-bridge';
8
10
  import { defineComponent } from '../../hooks/useDefinition/defineComponent.esm.js';
9
11
  import styles from './Text.module.css.esm.js';
10
12
 
@@ -1 +1 @@
1
- {"version":3,"file":"definition.esm.js","sources":["../../../src/components/Text/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 { TextOwnProps } from './types';\nimport styles from './Text.module.css';\n\n/**\n * Component definition for Text\n * @public\n */\nexport const TextDefinition = defineComponent<TextOwnProps>()({\n styles,\n classNames: {\n root: 'bui-Text',\n },\n propDefs: {\n as: { default: 'span' },\n variant: { dataAttribute: true, default: 'body-medium' },\n weight: { dataAttribute: true, default: 'regular' },\n color: { dataAttribute: true, default: 'primary' },\n truncate: { dataAttribute: true },\n className: {},\n },\n});\n"],"names":[],"mappings":";;;;;;;;;;AAwBO,MAAM,cAAA,GAAiB,iBAA8B,CAAE;AAAA,EAC5D,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA,QAAA,EAAU;AAAA,IACR,EAAA,EAAI,EAAE,OAAA,EAAS,MAAA,EAAO;AAAA,IACtB,OAAA,EAAS,EAAE,aAAA,EAAe,IAAA,EAAM,SAAS,aAAA,EAAc;AAAA,IACvD,MAAA,EAAQ,EAAE,aAAA,EAAe,IAAA,EAAM,SAAS,SAAA,EAAU;AAAA,IAClD,KAAA,EAAO,EAAE,aAAA,EAAe,IAAA,EAAM,SAAS,SAAA,EAAU;AAAA,IACjD,QAAA,EAAU,EAAE,aAAA,EAAe,IAAA,EAAK;AAAA,IAChC,WAAW;AAAC;AAEhB,CAAC;;;;"}
1
+ {"version":3,"file":"definition.esm.js","sources":["../../../src/components/Text/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 { TextOwnProps } from './types';\nimport styles from './Text.module.css';\n\n/**\n * Component definition for Text\n * @public\n */\nexport const TextDefinition = defineComponent<TextOwnProps>()({\n styles,\n classNames: {\n root: 'bui-Text',\n },\n propDefs: {\n as: { default: 'span' },\n variant: { dataAttribute: true, default: 'body-medium' },\n weight: { dataAttribute: true, default: 'regular' },\n color: { dataAttribute: true, default: 'primary' },\n truncate: { dataAttribute: true },\n className: {},\n },\n});\n"],"names":[],"mappings":";;;;;;;;;;;;AAwBO,MAAM,cAAA,GAAiB,iBAA8B,CAAE;AAAA,EAC5D,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA,QAAA,EAAU;AAAA,IACR,EAAA,EAAI,EAAE,OAAA,EAAS,MAAA,EAAO;AAAA,IACtB,OAAA,EAAS,EAAE,aAAA,EAAe,IAAA,EAAM,SAAS,aAAA,EAAc;AAAA,IACvD,MAAA,EAAQ,EAAE,aAAA,EAAe,IAAA,EAAM,SAAS,SAAA,EAAU;AAAA,IAClD,KAAA,EAAO,EAAE,aAAA,EAAe,IAAA,EAAM,SAAS,SAAA,EAAU;AAAA,IACjD,QAAA,EAAU,EAAE,aAAA,EAAe,IAAA,EAAK;AAAA,IAChC,WAAW;AAAC;AAEhB,CAAC;;;;"}
@@ -3,8 +3,10 @@ import 'clsx';
3
3
  import '../../hooks/useBreakpoint.esm.js';
4
4
  import '../../hooks/useBg.esm.js';
5
5
  import '../../hooks/useDefinition/helpers.esm.js';
6
- import '../../analytics/useAnalytics.esm.js';
6
+ import 'react';
7
+ import '../../provider/BUIContext.esm.js';
7
8
  import 'react-router-dom';
9
+ import '@backstage/version-bridge';
8
10
  import { defineComponent } from '../../hooks/useDefinition/defineComponent.esm.js';
9
11
  import styles from './TextAreaField.module.css.esm.js';
10
12
 
@@ -1 +1 @@
1
- {"version":3,"file":"definition.esm.js","sources":["../../../src/components/TextAreaField/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 { TextAreaFieldOwnProps } from './types';\nimport styles from './TextAreaField.module.css';\n\n/**\n * Component definition for TextAreaField\n * @public\n */\nexport const TextAreaFieldDefinition = defineComponent<TextAreaFieldOwnProps>()(\n {\n styles,\n classNames: {\n root: 'bui-TextAreaField',\n textArea: 'bui-TextArea',\n },\n bg: 'consumer',\n propDefs: {\n size: { dataAttribute: true, default: 'small' },\n className: {},\n placeholder: {},\n rows: { default: 3 },\n label: {},\n description: {},\n secondaryLabel: {},\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,QAAA,EAAU;AAAA,KACZ;AAAA,IACA,EAAA,EAAI,UAAA;AAAA,IACJ,QAAA,EAAU;AAAA,MACR,IAAA,EAAM,EAAE,aAAA,EAAe,IAAA,EAAM,SAAS,OAAA,EAAQ;AAAA,MAC9C,WAAW,EAAC;AAAA,MACZ,aAAa,EAAC;AAAA,MACd,IAAA,EAAM,EAAE,OAAA,EAAS,CAAA,EAAE;AAAA,MACnB,OAAO,EAAC;AAAA,MACR,aAAa,EAAC;AAAA,MACd,gBAAgB;AAAC;AACnB;AAEJ;;;;"}
1
+ {"version":3,"file":"definition.esm.js","sources":["../../../src/components/TextAreaField/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 { TextAreaFieldOwnProps } from './types';\nimport styles from './TextAreaField.module.css';\n\n/**\n * Component definition for TextAreaField\n * @public\n */\nexport const TextAreaFieldDefinition = defineComponent<TextAreaFieldOwnProps>()(\n {\n styles,\n classNames: {\n root: 'bui-TextAreaField',\n textArea: 'bui-TextArea',\n },\n bg: 'consumer',\n propDefs: {\n size: { dataAttribute: true, default: 'small' },\n className: {},\n placeholder: {},\n rows: { default: 3 },\n label: {},\n description: {},\n secondaryLabel: {},\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,QAAA,EAAU;AAAA,KACZ;AAAA,IACA,EAAA,EAAI,UAAA;AAAA,IACJ,QAAA,EAAU;AAAA,MACR,IAAA,EAAM,EAAE,aAAA,EAAe,IAAA,EAAM,SAAS,OAAA,EAAQ;AAAA,MAC9C,WAAW,EAAC;AAAA,MACZ,aAAa,EAAC;AAAA,MACd,IAAA,EAAM,EAAE,OAAA,EAAS,CAAA,EAAE;AAAA,MACnB,OAAO,EAAC;AAAA,MACR,aAAa,EAAC;AAAA,MACd,gBAAgB;AAAC;AACnB;AAEJ;;;;"}
@@ -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 .TextField_bui-TextField__4a2695a9f1 {\n display: flex;\n flex-direction: column;\n font-family: var(--bui-font-regular);\n width: 100%;\n flex: 1;\n\n &[data-on-bg='neutral-1'] .TextField_bui-Input__4a2695a9f1 {\n background-color: var(--bui-bg-neutral-2);\n }\n\n &[data-on-bg='neutral-2'] .TextField_bui-Input__4a2695a9f1 {\n background-color: var(--bui-bg-neutral-3);\n }\n\n &[data-on-bg='neutral-3'] .TextField_bui-Input__4a2695a9f1 {\n background-color: var(--bui-bg-neutral-4);\n }\n }\n\n .TextField_bui-InputWrapper__4a2695a9f1 {\n position: relative;\n\n &[data-size='small'] .TextField_bui-Input__4a2695a9f1 {\n height: 2rem;\n }\n\n &[data-size='medium'] .TextField_bui-Input__4a2695a9f1 {\n height: 2.5rem;\n }\n\n &[data-size='small'] .TextField_bui-Input__4a2695a9f1[data-icon] {\n padding-left: var(--bui-space-8);\n }\n\n &[data-size='medium'] .TextField_bui-Input__4a2695a9f1[data-icon] {\n padding-left: var(--bui-space-9);\n }\n }\n\n .TextField_bui-InputIcon__4a2695a9f1 {\n position: absolute;\n left: var(--bui-space-3);\n top: 50%;\n transform: translateY(-50%);\n margin-right: var(--bui-space-1);\n color: var(--bui-fg-primary);\n flex-shrink: 0;\n pointer-events: none;\n /* To animate the icon when the input is collapsed */\n transition: left 0.2s ease-in-out;\n\n &[data-size='small'],\n &[data-size='small'] svg {\n width: 1rem;\n height: 1rem;\n }\n\n &[data-size='medium'],\n &[data-size='medium'] svg {\n width: 1.25rem;\n height: 1.25rem;\n }\n }\n\n .TextField_bui-Input__4a2695a9f1 {\n display: flex;\n align-items: center;\n padding: 0 var(--bui-space-3);\n border-radius: var(--bui-radius-2);\n border: none;\n background-color: var(--bui-bg-neutral-1);\n font-size: var(--bui-font-size-3);\n font-family: var(--bui-font-regular);\n font-weight: var(--bui-font-weight-regular);\n color: var(--bui-fg-primary);\n transition: box-shadow 0.2s ease-in-out;\n width: 100%;\n height: 100%;\n cursor: inherit;\n\n &[data-focused] {\n outline: none;\n box-shadow: inset 0 0 0 1px var(--bui-ring);\n }\n\n &::-webkit-search-cancel-button,\n &::-webkit-search-decoration {\n -webkit-appearance: none;\n }\n\n &::placeholder {\n color: var(--bui-fg-secondary);\n }\n\n &[data-invalid] {\n box-shadow: inset 0 0 0 1px var(--bui-border-danger);\n }\n\n &[data-disabled] {\n opacity: 0.5;\n cursor: not-allowed;\n }\n }\n}\n";
4
- var styles = {"bui-TextField":"TextField_bui-TextField__4a2695a9f1","bui-Input":"TextField_bui-Input__4a2695a9f1","bui-InputWrapper":"TextField_bui-InputWrapper__4a2695a9f1","bui-InputIcon":"TextField_bui-InputIcon__4a2695a9f1"};
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 .TextField_bui-TextField__f1417704c5 {\n display: flex;\n flex-direction: column;\n font-family: var(--bui-font-regular);\n width: 100%;\n flex: 1;\n\n &[data-on-bg='neutral-1'] .TextField_bui-Input__f1417704c5 {\n background-color: var(--bui-bg-neutral-2);\n }\n\n &[data-on-bg='neutral-2'] .TextField_bui-Input__f1417704c5 {\n background-color: var(--bui-bg-neutral-3);\n }\n\n &[data-on-bg='neutral-3'] .TextField_bui-Input__f1417704c5 {\n background-color: var(--bui-bg-neutral-4);\n }\n }\n\n .TextField_bui-InputWrapper__f1417704c5 {\n position: relative;\n\n &[data-size='small'] .TextField_bui-Input__f1417704c5 {\n height: 2rem;\n }\n\n &[data-size='medium'] .TextField_bui-Input__f1417704c5 {\n height: 2.5rem;\n }\n\n &[data-size='small'] .TextField_bui-Input__f1417704c5[data-icon] {\n padding-left: var(--bui-space-8);\n }\n\n &[data-size='medium'] .TextField_bui-Input__f1417704c5[data-icon] {\n padding-left: var(--bui-space-9);\n }\n }\n\n .TextField_bui-InputIcon__f1417704c5 {\n position: absolute;\n left: var(--bui-space-3);\n top: 50%;\n transform: translateY(-50%);\n margin-right: var(--bui-space-1);\n color: var(--bui-fg-primary);\n flex-shrink: 0;\n pointer-events: none;\n /* To animate the icon when the input is collapsed */\n transition: left 0.2s ease-in-out;\n\n &[data-size='small'],\n &[data-size='small'] svg {\n width: 1rem;\n height: 1rem;\n }\n\n &[data-size='medium'],\n &[data-size='medium'] svg {\n width: 1.25rem;\n height: 1.25rem;\n }\n }\n\n .TextField_bui-Input__f1417704c5 {\n display: flex;\n align-items: center;\n padding: 0 var(--bui-space-3);\n border-radius: var(--bui-radius-2);\n border: none;\n background-color: var(--bui-bg-neutral-1);\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 transition: box-shadow 0.2s ease-in-out;\n width: 100%;\n height: 100%;\n cursor: inherit;\n\n &[data-focused] {\n outline: none;\n box-shadow: inset 0 0 0 1px var(--bui-ring);\n }\n\n &::-webkit-search-cancel-button,\n &::-webkit-search-decoration {\n -webkit-appearance: none;\n }\n\n &::placeholder {\n color: var(--bui-fg-secondary);\n }\n\n &[data-invalid] {\n box-shadow: inset 0 0 0 1px var(--bui-border-danger);\n }\n\n &[data-disabled] {\n opacity: 0.5;\n cursor: not-allowed;\n }\n }\n}\n";
4
+ var styles = {"bui-TextField":"TextField_bui-TextField__f1417704c5","bui-Input":"TextField_bui-Input__f1417704c5","bui-InputWrapper":"TextField_bui-InputWrapper__f1417704c5","bui-InputIcon":"TextField_bui-InputIcon__f1417704c5"};
5
5
  styleInject(css_248z);
6
6
 
7
7
  export { styles as default };
@@ -3,8 +3,10 @@ import 'clsx';
3
3
  import '../../hooks/useBreakpoint.esm.js';
4
4
  import '../../hooks/useBg.esm.js';
5
5
  import '../../hooks/useDefinition/helpers.esm.js';
6
- import '../../analytics/useAnalytics.esm.js';
6
+ import 'react';
7
+ import '../../provider/BUIContext.esm.js';
7
8
  import 'react-router-dom';
9
+ import '@backstage/version-bridge';
8
10
  import { defineComponent } from '../../hooks/useDefinition/defineComponent.esm.js';
9
11
  import styles from './TextField.module.css.esm.js';
10
12
 
@@ -1 +1 @@
1
- {"version":3,"file":"definition.esm.js","sources":["../../../src/components/TextField/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 { TextFieldOwnProps } from './types';\nimport styles from './TextField.module.css';\n\n/**\n * Component definition for TextField\n * @public\n */\nexport const TextFieldDefinition = defineComponent<TextFieldOwnProps>()({\n styles,\n classNames: {\n root: 'bui-TextField',\n inputWrapper: 'bui-InputWrapper',\n input: 'bui-Input',\n inputIcon: 'bui-InputIcon',\n inputAction: 'bui-InputAction',\n },\n bg: 'consumer',\n propDefs: {\n size: { dataAttribute: true, default: 'small' },\n className: {},\n icon: {},\n placeholder: {},\n label: {},\n description: {},\n secondaryLabel: {},\n },\n});\n"],"names":[],"mappings":";;;;;;;;;;AAwBO,MAAM,mBAAA,GAAsB,iBAAmC,CAAE;AAAA,EACtE,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,eAAA;AAAA,IACN,YAAA,EAAc,kBAAA;AAAA,IACd,KAAA,EAAO,WAAA;AAAA,IACP,SAAA,EAAW,eAAA;AAAA,IACX,WAAA,EAAa;AAAA,GACf;AAAA,EACA,EAAA,EAAI,UAAA;AAAA,EACJ,QAAA,EAAU;AAAA,IACR,IAAA,EAAM,EAAE,aAAA,EAAe,IAAA,EAAM,SAAS,OAAA,EAAQ;AAAA,IAC9C,WAAW,EAAC;AAAA,IACZ,MAAM,EAAC;AAAA,IACP,aAAa,EAAC;AAAA,IACd,OAAO,EAAC;AAAA,IACR,aAAa,EAAC;AAAA,IACd,gBAAgB;AAAC;AAErB,CAAC;;;;"}
1
+ {"version":3,"file":"definition.esm.js","sources":["../../../src/components/TextField/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 { TextFieldOwnProps } from './types';\nimport styles from './TextField.module.css';\n\n/**\n * Component definition for TextField\n * @public\n */\nexport const TextFieldDefinition = defineComponent<TextFieldOwnProps>()({\n styles,\n classNames: {\n root: 'bui-TextField',\n inputWrapper: 'bui-InputWrapper',\n input: 'bui-Input',\n inputIcon: 'bui-InputIcon',\n inputAction: 'bui-InputAction',\n },\n bg: 'consumer',\n propDefs: {\n size: { dataAttribute: true, default: 'small' },\n className: {},\n icon: {},\n placeholder: {},\n label: {},\n description: {},\n secondaryLabel: {},\n },\n});\n"],"names":[],"mappings":";;;;;;;;;;;;AAwBO,MAAM,mBAAA,GAAsB,iBAAmC,CAAE;AAAA,EACtE,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,eAAA;AAAA,IACN,YAAA,EAAc,kBAAA;AAAA,IACd,KAAA,EAAO,WAAA;AAAA,IACP,SAAA,EAAW,eAAA;AAAA,IACX,WAAA,EAAa;AAAA,GACf;AAAA,EACA,EAAA,EAAI,UAAA;AAAA,EACJ,QAAA,EAAU;AAAA,IACR,IAAA,EAAM,EAAE,aAAA,EAAe,IAAA,EAAM,SAAS,OAAA,EAAQ;AAAA,IAC9C,WAAW,EAAC;AAAA,IACZ,MAAM,EAAC;AAAA,IACP,aAAa,EAAC;AAAA,IACd,OAAO,EAAC;AAAA,IACR,aAAa,EAAC;AAAA,IACd,gBAAgB;AAAC;AAErB,CAAC;;;;"}
@@ -1,7 +1,7 @@
1
1
  import styleInject from '../../node_modules_dist/style-inject/dist/style-inject.es.esm.js';
2
2
 
3
- var css_248z = "/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n@layer tokens, base, components, utilities;\n\n@layer components {\n .ToggleButton_bui-ToggleButton__2462ed92ac {\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: var(--bui-space-1_5);\n border: none;\n border-radius: var(--bui-radius-2);\n background: var(--bui-bg-neutral-1);\n color: var(--bui-fg-primary);\n font-family: var(--bui-font-regular);\n font-weight: var(--bui-font-weight-bold);\n padding: 0 var(--bui-space-2);\n cursor: pointer;\n transition: background-color 150ms ease, box-shadow 150ms ease,\n color 150ms ease, transform 100ms ease;\n\n &[data-selected],\n &[data-pressed] {\n background: var(--bui-bg-solid);\n color: var(--bui-fg-solid);\n }\n\n &:not([data-selected])[data-hovered] {\n background: var(--bui-bg-neutral-2);\n }\n\n &[data-disabled] {\n background: var(--bui-bg-neutral-1-disabled);\n color: var(--bui-fg-disabled);\n }\n\n &[data-disabled][data-hovered] {\n background: var(--bui-bg-neutral-1-disabled);\n }\n\n &[data-disabled][data-selected] {\n background: var(--bui-bg-solid-disabled);\n color: var(--bui-fg-disabled);\n }\n }\n\n .ToggleButton_bui-ToggleButton__2462ed92ac[data-focus-visible] {\n outline: none;\n box-shadow: inset 0 0 0 2px var(--bui-ring);\n }\n\n .ToggleButton_bui-ToggleButton__2462ed92ac[data-disabled] {\n cursor: not-allowed;\n }\n\n .ToggleButton_bui-ToggleButton__2462ed92ac[data-pressed] {\n transform: scale(0.98);\n }\n\n .ToggleButton_bui-ToggleButton__2462ed92ac[data-disabled][data-pressed] {\n transform: none;\n }\n\n .ToggleButton_bui-ToggleButton__2462ed92ac[data-size='small'] {\n height: 2rem;\n font-size: var(--bui-font-size-3);\n padding: 0 var(--bui-space-2);\n\n svg {\n width: 1rem;\n height: 1rem;\n }\n }\n\n .ToggleButton_bui-ToggleButton__2462ed92ac[data-size='medium'] {\n height: 2.5rem;\n font-size: var(--bui-font-size-4);\n padding: 0 var(--bui-space-3);\n\n svg {\n width: 1.25rem;\n height: 1.25rem;\n }\n }\n\n .ToggleButton_bui-ToggleButtonContent__2462ed92ac {\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";
4
- var styles = {"bui-ToggleButton":"ToggleButton_bui-ToggleButton__2462ed92ac","bui-ToggleButtonContent":"ToggleButton_bui-ToggleButtonContent__2462ed92ac"};
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 .ToggleButton_bui-ToggleButton__fd69df28b6 {\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: var(--bui-space-1_5);\n border: none;\n border-radius: var(--bui-radius-2);\n background: var(--bui-bg-neutral-1);\n color: var(--bui-fg-primary);\n font-family: var(--bui-font-regular);\n font-weight: var(--bui-font-weight-bold);\n line-height: 1.15;\n padding: 0 var(--bui-space-2);\n cursor: pointer;\n transition: background-color 150ms ease, box-shadow 150ms ease,\n color 150ms ease, transform 100ms ease;\n\n &[data-selected],\n &[data-pressed] {\n background: var(--bui-bg-solid);\n color: var(--bui-fg-solid);\n }\n\n &:not([data-selected])[data-hovered] {\n background: var(--bui-bg-neutral-2);\n }\n\n &[data-disabled] {\n background: var(--bui-bg-neutral-1-disabled);\n color: var(--bui-fg-disabled);\n }\n\n &[data-disabled][data-hovered] {\n background: var(--bui-bg-neutral-1-disabled);\n }\n\n &[data-disabled][data-selected] {\n background: var(--bui-bg-solid-disabled);\n color: var(--bui-fg-disabled);\n }\n }\n\n .ToggleButton_bui-ToggleButton__fd69df28b6[data-focus-visible] {\n outline: none;\n box-shadow: inset 0 0 0 2px var(--bui-ring);\n }\n\n .ToggleButton_bui-ToggleButton__fd69df28b6[data-disabled] {\n cursor: not-allowed;\n }\n\n .ToggleButton_bui-ToggleButton__fd69df28b6[data-pressed] {\n transform: scale(0.98);\n }\n\n .ToggleButton_bui-ToggleButton__fd69df28b6[data-disabled][data-pressed] {\n transform: none;\n }\n\n .ToggleButton_bui-ToggleButton__fd69df28b6[data-size='small'] {\n height: 2rem;\n font-size: var(--bui-font-size-3);\n padding: 0 var(--bui-space-2);\n\n svg {\n width: 1rem;\n height: 1rem;\n }\n }\n\n .ToggleButton_bui-ToggleButton__fd69df28b6[data-size='medium'] {\n height: 2.5rem;\n font-size: var(--bui-font-size-4);\n padding: 0 var(--bui-space-3);\n\n svg {\n width: 1.25rem;\n height: 1.25rem;\n }\n }\n\n .ToggleButton_bui-ToggleButtonContent__fd69df28b6 {\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";
4
+ var styles = {"bui-ToggleButton":"ToggleButton_bui-ToggleButton__fd69df28b6","bui-ToggleButtonContent":"ToggleButton_bui-ToggleButtonContent__fd69df28b6"};
5
5
  styleInject(css_248z);
6
6
 
7
7
  export { styles as default };
@@ -3,8 +3,10 @@ import 'clsx';
3
3
  import '../../hooks/useBreakpoint.esm.js';
4
4
  import '../../hooks/useBg.esm.js';
5
5
  import '../../hooks/useDefinition/helpers.esm.js';
6
- import '../../analytics/useAnalytics.esm.js';
6
+ import 'react';
7
+ import '../../provider/BUIContext.esm.js';
7
8
  import 'react-router-dom';
9
+ import '@backstage/version-bridge';
8
10
  import { defineComponent } from '../../hooks/useDefinition/defineComponent.esm.js';
9
11
  import styles from './ToggleButton.module.css.esm.js';
10
12
 
@@ -1 +1 @@
1
- {"version":3,"file":"definition.esm.js","sources":["../../../src/components/ToggleButton/definition.ts"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { defineComponent } from '../../hooks/useDefinition';\nimport type { ToggleButtonOwnProps } from './types';\nimport styles from './ToggleButton.module.css';\n\n/**\n * Component definition for ToggleButton\n * @public\n */\nexport const ToggleButtonDefinition = defineComponent<ToggleButtonOwnProps>()({\n styles,\n classNames: {\n root: 'bui-ToggleButton',\n content: 'bui-ToggleButtonContent',\n },\n propDefs: {\n size: { dataAttribute: true, default: 'small' },\n iconStart: {},\n iconEnd: {},\n children: {},\n className: {},\n },\n});\n"],"names":[],"mappings":";;;;;;;;;;AAwBO,MAAM,sBAAA,GAAyB,iBAAsC,CAAE;AAAA,EAC5E,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,kBAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA,EACA,QAAA,EAAU;AAAA,IACR,IAAA,EAAM,EAAE,aAAA,EAAe,IAAA,EAAM,SAAS,OAAA,EAAQ;AAAA,IAC9C,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/ToggleButton/definition.ts"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { defineComponent } from '../../hooks/useDefinition';\nimport type { ToggleButtonOwnProps } from './types';\nimport styles from './ToggleButton.module.css';\n\n/**\n * Component definition for ToggleButton\n * @public\n */\nexport const ToggleButtonDefinition = defineComponent<ToggleButtonOwnProps>()({\n styles,\n classNames: {\n root: 'bui-ToggleButton',\n content: 'bui-ToggleButtonContent',\n },\n propDefs: {\n size: { dataAttribute: true, default: 'small' },\n iconStart: {},\n iconEnd: {},\n children: {},\n className: {},\n },\n});\n"],"names":[],"mappings":";;;;;;;;;;;;AAwBO,MAAM,sBAAA,GAAyB,iBAAsC,CAAE;AAAA,EAC5E,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,kBAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA,EACA,QAAA,EAAU;AAAA,IACR,IAAA,EAAM,EAAE,aAAA,EAAe,IAAA,EAAM,SAAS,OAAA,EAAQ;AAAA,IAC9C,WAAW,EAAC;AAAA,IACZ,SAAS,EAAC;AAAA,IACV,UAAU,EAAC;AAAA,IACX,WAAW;AAAC;AAEhB,CAAC;;;;"}
@@ -3,8 +3,10 @@ import 'clsx';
3
3
  import '../../hooks/useBreakpoint.esm.js';
4
4
  import '../../hooks/useBg.esm.js';
5
5
  import '../../hooks/useDefinition/helpers.esm.js';
6
- import '../../analytics/useAnalytics.esm.js';
6
+ import 'react';
7
+ import '../../provider/BUIContext.esm.js';
7
8
  import 'react-router-dom';
9
+ import '@backstage/version-bridge';
8
10
  import { defineComponent } from '../../hooks/useDefinition/defineComponent.esm.js';
9
11
  import styles from './ToggleButtonGroup.module.css.esm.js';
10
12
 
@@ -1 +1 @@
1
- {"version":3,"file":"definition.esm.js","sources":["../../../src/components/ToggleButtonGroup/definition.ts"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { defineComponent } from '../../hooks/useDefinition';\nimport type { ToggleButtonGroupOwnProps } from './types';\nimport styles from './ToggleButtonGroup.module.css';\n\n/**\n * Component definition for ToggleButtonGroup\n * @public\n */\nexport const ToggleButtonGroupDefinition =\n defineComponent<ToggleButtonGroupOwnProps>()({\n styles,\n classNames: {\n root: 'bui-ToggleButtonGroup',\n },\n propDefs: {\n className: {},\n children: {},\n },\n });\n"],"names":[],"mappings":";;;;;;;;;;AAwBO,MAAM,2BAAA,GACX,iBAA2C,CAAE;AAAA,EAC3C,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA,QAAA,EAAU;AAAA,IACR,WAAW,EAAC;AAAA,IACZ,UAAU;AAAC;AAEf,CAAC;;;;"}
1
+ {"version":3,"file":"definition.esm.js","sources":["../../../src/components/ToggleButtonGroup/definition.ts"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { defineComponent } from '../../hooks/useDefinition';\nimport type { ToggleButtonGroupOwnProps } from './types';\nimport styles from './ToggleButtonGroup.module.css';\n\n/**\n * Component definition for ToggleButtonGroup\n * @public\n */\nexport const ToggleButtonGroupDefinition =\n defineComponent<ToggleButtonGroupOwnProps>()({\n styles,\n classNames: {\n root: 'bui-ToggleButtonGroup',\n },\n propDefs: {\n className: {},\n children: {},\n },\n });\n"],"names":[],"mappings":";;;;;;;;;;;;AAwBO,MAAM,2BAAA,GACX,iBAA2C,CAAE;AAAA,EAC3C,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA,QAAA,EAAU;AAAA,IACR,WAAW,EAAC;AAAA,IACZ,UAAU;AAAC;AAEf,CAAC;;;;"}
@@ -1,7 +1,7 @@
1
1
  import styleInject from '../../node_modules_dist/style-inject/dist/style-inject.es.esm.js';
2
2
 
3
- var css_248z = "/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n@layer tokens, base, components, utilities;\n\n@layer components {\n .Tooltip_bui-Tooltip__9a58b614bf {\n --tooltip-border-radius: 4px;\n box-shadow: var(--bui-shadow);\n border-radius: var(--tooltip-border-radius);\n background: var(--bui-bg-app);\n border: 1px solid var(--bui-border-1);\n forced-color-adjust: none;\n outline: none;\n max-width: 240px;\n /* fixes FF gap */\n transform: translate3d(0, 0, 0);\n transition: transform 200ms, opacity 200ms;\n font-size: var(--bui-font-size-3);\n font-family: var(--bui-font-regular);\n color: var(--bui-fg-primary);\n\n &[data-entering],\n &[data-exiting] {\n transform: var(--origin);\n opacity: 0;\n }\n\n --tooltip-offset: var(--bui-space-3);\n\n &[data-placement='top'] {\n margin-bottom: var(--tooltip-offset);\n --origin: translateY(4px);\n }\n\n &[data-placement='right'] {\n margin-left: var(--tooltip-offset);\n --origin: translateX(-4px);\n }\n\n &[data-placement='bottom'] {\n margin-top: var(--tooltip-offset);\n --origin: translateY(-4px);\n }\n\n &[data-placement='left'] {\n margin-right: var(--tooltip-offset);\n --origin: translateX(4px);\n }\n }\n\n .Tooltip_bui-TooltipContent__9a58b614bf {\n padding: var(--bui-space-2) var(--bui-space-3);\n border-radius: var(--tooltip-border-radius);\n }\n\n .Tooltip_bui-TooltipArrow__9a58b614bf {\n & svg {\n display: block;\n\n /* The tooltip is rendered overlaying the main\n tooltip element by 1px. This causes the borders\n to overlap, which causes minor visual artifacts\n with transparent border colors. To mitigate this,\n we split the stroke and fill across separate\n elements in order to guarantee that the stroke is\n always overlaying a consistent color. */\n use:nth-of-type(1) {\n fill: var(--bui-bg-app);\n }\n use:nth-of-type(2) {\n fill: var(--bui-bg-neutral-1);\n }\n\n path {\n fill: var(--bui-border-1);\n }\n\n /* The arrow svg overlaps the tooltip by 2px, so we\n need to adjust the margins accordingly. */\n --tooltip-arrow-overlap: -2px;\n }\n\n &[data-placement='top'] svg {\n margin-top: var(--tooltip-arrow-overlap);\n }\n\n &[data-placement='bottom'] svg {\n margin-bottom: var(--tooltip-arrow-overlap);\n transform: rotate(180deg);\n }\n\n &[data-placement='right'] svg {\n margin-right: var(--tooltip-arrow-overlap);\n transform: rotate(90deg);\n }\n\n &[data-placement='left'] svg {\n margin-left: var(--tooltip-arrow-overlap);\n transform: rotate(-90deg);\n }\n }\n}\n";
4
- var styles = {"bui-Tooltip":"Tooltip_bui-Tooltip__9a58b614bf","bui-TooltipContent":"Tooltip_bui-TooltipContent__9a58b614bf","bui-TooltipArrow":"Tooltip_bui-TooltipArrow__9a58b614bf"};
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 .Tooltip_bui-Tooltip__9b7aa5ff7e {\n --tooltip-border-radius: 4px;\n box-shadow: var(--bui-shadow);\n border-radius: var(--tooltip-border-radius);\n background: var(--bui-bg-app);\n border: 1px solid var(--bui-border-1);\n forced-color-adjust: none;\n outline: none;\n max-width: 240px;\n /* fixes FF gap */\n transform: translate3d(0, 0, 0);\n transition: transform 200ms, opacity 200ms;\n font-size: var(--bui-font-size-3);\n font-family: var(--bui-font-regular);\n line-height: 1.15;\n color: var(--bui-fg-primary);\n\n &[data-entering],\n &[data-exiting] {\n transform: var(--origin);\n opacity: 0;\n }\n\n --tooltip-offset: var(--bui-space-3);\n\n &[data-placement='top'] {\n margin-bottom: var(--tooltip-offset);\n --origin: translateY(4px);\n }\n\n &[data-placement='right'] {\n margin-left: var(--tooltip-offset);\n --origin: translateX(-4px);\n }\n\n &[data-placement='bottom'] {\n margin-top: var(--tooltip-offset);\n --origin: translateY(-4px);\n }\n\n &[data-placement='left'] {\n margin-right: var(--tooltip-offset);\n --origin: translateX(4px);\n }\n }\n\n .Tooltip_bui-TooltipContent__9b7aa5ff7e {\n padding: var(--bui-space-2) var(--bui-space-3);\n border-radius: var(--tooltip-border-radius);\n }\n\n .Tooltip_bui-TooltipArrow__9b7aa5ff7e {\n & svg {\n display: block;\n\n /* The tooltip is rendered overlaying the main\n tooltip element by 1px. This causes the borders\n to overlap, which causes minor visual artifacts\n with transparent border colors. To mitigate this,\n we split the stroke and fill across separate\n elements in order to guarantee that the stroke is\n always overlaying a consistent color. */\n use:nth-of-type(1) {\n fill: var(--bui-bg-app);\n }\n use:nth-of-type(2) {\n fill: var(--bui-bg-neutral-1);\n }\n\n path {\n fill: var(--bui-border-1);\n }\n\n /* The arrow svg overlaps the tooltip by 2px, so we\n need to adjust the margins accordingly. */\n --tooltip-arrow-overlap: -2px;\n }\n\n &[data-placement='top'] svg {\n margin-top: var(--tooltip-arrow-overlap);\n }\n\n &[data-placement='bottom'] svg {\n margin-bottom: var(--tooltip-arrow-overlap);\n transform: rotate(180deg);\n }\n\n &[data-placement='right'] svg {\n margin-right: var(--tooltip-arrow-overlap);\n transform: rotate(90deg);\n }\n\n &[data-placement='left'] svg {\n margin-left: var(--tooltip-arrow-overlap);\n transform: rotate(-90deg);\n }\n }\n}\n";
4
+ var styles = {"bui-Tooltip":"Tooltip_bui-Tooltip__9b7aa5ff7e","bui-TooltipContent":"Tooltip_bui-TooltipContent__9b7aa5ff7e","bui-TooltipArrow":"Tooltip_bui-TooltipArrow__9b7aa5ff7e"};
5
5
  styleInject(css_248z);
6
6
 
7
7
  export { styles as default };
@@ -3,8 +3,10 @@ import 'clsx';
3
3
  import '../../hooks/useBreakpoint.esm.js';
4
4
  import '../../hooks/useBg.esm.js';
5
5
  import '../../hooks/useDefinition/helpers.esm.js';
6
- import '../../analytics/useAnalytics.esm.js';
6
+ import 'react';
7
+ import '../../provider/BUIContext.esm.js';
7
8
  import 'react-router-dom';
9
+ import '@backstage/version-bridge';
8
10
  import { defineComponent } from '../../hooks/useDefinition/defineComponent.esm.js';
9
11
  import styles from './Tooltip.module.css.esm.js';
10
12
 
@@ -1 +1 @@
1
- {"version":3,"file":"definition.esm.js","sources":["../../../src/components/Tooltip/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 { TooltipOwnProps } from './types';\nimport styles from './Tooltip.module.css';\n\n/**\n * Component definition for Tooltip\n * @public\n */\nexport const TooltipDefinition = defineComponent<TooltipOwnProps>()({\n styles,\n classNames: {\n tooltip: 'bui-Tooltip',\n content: 'bui-TooltipContent',\n arrow: 'bui-TooltipArrow',\n },\n propDefs: {\n children: {},\n className: {},\n },\n});\n"],"names":[],"mappings":";;;;;;;;;;AAwBO,MAAM,iBAAA,GAAoB,iBAAiC,CAAE;AAAA,EAClE,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,OAAA,EAAS,aAAA;AAAA,IACT,OAAA,EAAS,oBAAA;AAAA,IACT,KAAA,EAAO;AAAA,GACT;AAAA,EACA,QAAA,EAAU;AAAA,IACR,UAAU,EAAC;AAAA,IACX,WAAW;AAAC;AAEhB,CAAC;;;;"}
1
+ {"version":3,"file":"definition.esm.js","sources":["../../../src/components/Tooltip/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 { TooltipOwnProps } from './types';\nimport styles from './Tooltip.module.css';\n\n/**\n * Component definition for Tooltip\n * @public\n */\nexport const TooltipDefinition = defineComponent<TooltipOwnProps>()({\n styles,\n classNames: {\n tooltip: 'bui-Tooltip',\n content: 'bui-TooltipContent',\n arrow: 'bui-TooltipArrow',\n },\n propDefs: {\n children: {},\n className: {},\n },\n});\n"],"names":[],"mappings":";;;;;;;;;;;;AAwBO,MAAM,iBAAA,GAAoB,iBAAiC,CAAE;AAAA,EAClE,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,OAAA,EAAS,aAAA;AAAA,IACT,OAAA,EAAS,oBAAA;AAAA,IACT,KAAA,EAAO;AAAA,GACT;AAAA,EACA,QAAA,EAAU;AAAA,IACR,UAAU,EAAC;AAAA,IACX,WAAW;AAAC;AAEhB,CAAC;;;;"}
@@ -3,8 +3,10 @@ import 'clsx';
3
3
  import '../../hooks/useBreakpoint.esm.js';
4
4
  import '../../hooks/useBg.esm.js';
5
5
  import '../../hooks/useDefinition/helpers.esm.js';
6
- import '../../analytics/useAnalytics.esm.js';
6
+ import 'react';
7
+ import '../../provider/BUIContext.esm.js';
7
8
  import 'react-router-dom';
9
+ import '@backstage/version-bridge';
8
10
  import { defineComponent } from '../../hooks/useDefinition/defineComponent.esm.js';
9
11
  import styles from './VisuallyHidden.module.css.esm.js';
10
12
 
@@ -1 +1 @@
1
- {"version":3,"file":"definition.esm.js","sources":["../../../src/components/VisuallyHidden/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 { VisuallyHiddenOwnProps } from './types';\nimport styles from './VisuallyHidden.module.css';\n\n/**\n * Component definition for VisuallyHidden\n * @public\n */\nexport const VisuallyHiddenDefinition =\n defineComponent<VisuallyHiddenOwnProps>()({\n styles,\n classNames: {\n root: 'bui-VisuallyHidden',\n },\n propDefs: {\n className: {},\n },\n });\n"],"names":[],"mappings":";;;;;;;;;;AAwBO,MAAM,wBAAA,GACX,iBAAwC,CAAE;AAAA,EACxC,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA,QAAA,EAAU;AAAA,IACR,WAAW;AAAC;AAEhB,CAAC;;;;"}
1
+ {"version":3,"file":"definition.esm.js","sources":["../../../src/components/VisuallyHidden/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 { VisuallyHiddenOwnProps } from './types';\nimport styles from './VisuallyHidden.module.css';\n\n/**\n * Component definition for VisuallyHidden\n * @public\n */\nexport const VisuallyHiddenDefinition =\n defineComponent<VisuallyHiddenOwnProps>()({\n styles,\n classNames: {\n root: 'bui-VisuallyHidden',\n },\n propDefs: {\n className: {},\n },\n });\n"],"names":[],"mappings":";;;;;;;;;;;;AAwBO,MAAM,wBAAA,GACX,iBAAwC,CAAE;AAAA,EACxC,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA,QAAA,EAAU;AAAA,IACR,WAAW;AAAC;AAEhB,CAAC;;;;"}
@@ -372,17 +372,15 @@ Use a better box model (opinionated).
372
372
 
373
373
  /**
374
374
  1. Improve consistency of default fonts in all browsers. (https://github.com/sindresorhus/modern-normalize/issues/3)
375
- 2. Correct the line height in all browsers.
376
- 3. Prevent adjustments of font size after orientation changes in iOS.
377
- 4. Use a more readable tab size (opinionated).
375
+ 2. Prevent adjustments of font size after orientation changes in iOS.
376
+ 3. Use a more readable tab size (opinionated).
378
377
  */
379
378
 
380
379
  html {
381
380
  font-family: system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif,
382
381
  'Apple Color Emoji', 'Segoe UI Emoji'; /* 1 */
383
- line-height: 1.15; /* 2 */
384
- -webkit-text-size-adjust: 100%; /* 3 */
385
- tab-size: 4; /* 4 */
382
+ -webkit-text-size-adjust: 100%; /* 2 */
383
+ tab-size: 4; /* 3 */
386
384
  }
387
385
 
388
386
  /*
@@ -484,7 +482,6 @@ Forms
484
482
  textarea {
485
483
  font-family: inherit; /* 1 */
486
484
  font-size: 100%; /* 1 */
487
- line-height: 1.15; /* 1 */
488
485
  margin: 0; /* 2 */
489
486
  }
490
487
 
@@ -4,25 +4,19 @@ import { useBreakpoint } from '../useBreakpoint.esm.js';
4
4
  import { useBgProvider, useBgConsumer, BgProvider } from '../useBg.esm.js';
5
5
  import { resolveDefinitionProps, processUtilityProps } from './helpers.esm.js';
6
6
  import { useAnalytics, noopTracker } from '../../analytics/useAnalytics.esm.js';
7
- import { useInRouterContext, useResolvedPath, createPath } from 'react-router-dom';
8
- import { isExternalLink } from '../../utils/linkUtils.esm.js';
7
+ import { useDefinitionNavigation } from './useDefinitionNavigation.esm.js';
9
8
 
10
9
  function useDefinition(definition, props, options) {
11
10
  const { breakpoint } = useBreakpoint();
12
- let hrefResolvedProps = props;
13
- const hasRouter = useInRouterContext();
14
- if (hasRouter) {
15
- const rawHref = props.href;
16
- const resolved = useResolvedPath(rawHref ?? "");
17
- if (rawHref !== void 0 && !isExternalLink(rawHref)) {
18
- hrefResolvedProps = { ...props, href: createPath(resolved) };
19
- }
20
- }
21
11
  const { ownPropsResolved, restProps } = resolveDefinitionProps(
22
12
  definition,
23
- hrefResolvedProps,
13
+ props,
24
14
  breakpoint
25
15
  );
16
+ let navigation;
17
+ if (definition.navigation) {
18
+ navigation = useDefinitionNavigation(definition.navigation);
19
+ }
26
20
  const dataAttributes = {};
27
21
  for (const [key, config] of Object.entries(definition.propDefs)) {
28
22
  const finalValue = ownPropsResolved[key];
@@ -79,7 +73,8 @@ function useDefinition(definition, props, options) {
79
73
  restProps,
80
74
  dataAttributes,
81
75
  utilityStyle,
82
- ...definition.analytics ? { analytics } : {}
76
+ ...definition.analytics ? { analytics } : {},
77
+ ...definition.navigation ? { navigation } : {}
83
78
  };
84
79
  }
85
80
 
@@ -1 +1 @@
1
- {"version":3,"file":"useDefinition.esm.js","sources":["../../../src/hooks/useDefinition/useDefinition.tsx"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ReactNode } from 'react';\nimport clsx from 'clsx';\nimport { useBreakpoint } from '../useBreakpoint';\nimport { useBgProvider, useBgConsumer, BgProvider } from '../useBg';\nimport { resolveDefinitionProps, processUtilityProps } from './helpers';\nimport { useAnalytics } from '../../analytics/useAnalytics';\nimport { noopTracker } from '../../analytics/useAnalytics';\nimport {\n useResolvedPath,\n useInRouterContext,\n createPath,\n} from 'react-router-dom';\nimport { isExternalLink } from '../../utils/linkUtils';\nimport type {\n ComponentConfig,\n UseDefinitionOptions,\n UseDefinitionResult,\n UtilityKeys,\n} from './types';\n\nexport function useDefinition<\n D extends ComponentConfig<any, any>,\n P extends Record<string, any>,\n>(\n definition: D,\n props: P,\n options?: UseDefinitionOptions<D>,\n): UseDefinitionResult<D, P> {\n const { breakpoint } = useBreakpoint();\n\n let hrefResolvedProps = props;\n const hasRouter = useInRouterContext();\n if (hasRouter) {\n const rawHref = (props as any).href;\n const resolved = useResolvedPath(rawHref ?? '');\n if (rawHref !== undefined && !isExternalLink(rawHref)) {\n hrefResolvedProps = { ...props, href: createPath(resolved) } as P;\n }\n }\n\n // Resolve all props centrally applies responsive values and defaults\n const { ownPropsResolved, restProps } = resolveDefinitionProps(\n definition,\n hrefResolvedProps,\n breakpoint,\n );\n\n const dataAttributes: Record<string, string | undefined> = {};\n\n for (const [key, config] of Object.entries(definition.propDefs)) {\n const finalValue = ownPropsResolved[key];\n\n if (finalValue !== undefined) {\n // Skip data-bg for bg prop when the provider path handles it\n if (key === 'bg' && definition.bg === 'provider') continue;\n\n if ((config as any).dataAttribute) {\n // eslint-disable-next-line no-restricted-syntax\n dataAttributes[`data-${key.toLowerCase()}`] = String(finalValue);\n }\n }\n }\n\n // Provider: resolve bg and provide context for children\n const providerBg = useBgProvider(\n definition.bg === 'provider' ? ownPropsResolved.bg : undefined,\n );\n\n // Consumer: read parent context bg\n const consumerBg = useBgConsumer();\n\n // Provider: set data-bg from the resolved provider bg\n if (definition.bg === 'provider' && providerBg.bg !== undefined) {\n dataAttributes['data-bg'] = String(providerBg.bg);\n }\n\n // Consumer: set data-on-bg from the parent context\n if (definition.bg === 'consumer' && consumerBg.bg !== undefined) {\n dataAttributes['data-on-bg'] = String(consumerBg.bg);\n }\n\n const { utilityClasses, utilityStyle } = processUtilityProps<UtilityKeys<D>>(\n props,\n (definition.utilityProps ?? []) as readonly UtilityKeys<D>[],\n );\n\n // Analytics: conditionally call useAnalytics based on definition flag\n let analytics = noopTracker;\n if (definition.analytics) {\n const tracker = useAnalytics();\n analytics = ownPropsResolved.noTrack ? noopTracker : tracker;\n }\n\n const utilityTarget =\n options?.utilityTarget !== undefined ? options.utilityTarget : 'root';\n const classNameTarget =\n options?.classNameTarget !== undefined ? options.classNameTarget : 'root';\n\n const classes: Record<string, string> = {};\n\n for (const [name, cssKey] of Object.entries(definition.classNames)) {\n classes[name] = clsx(\n cssKey as string,\n definition.styles[cssKey as keyof typeof definition.styles],\n utilityTarget === name && utilityClasses,\n classNameTarget === name && ownPropsResolved.className,\n );\n }\n\n let children: ReactNode | undefined;\n let childrenWithBgProvider: ReactNode | undefined;\n\n if (definition.bg === 'provider') {\n childrenWithBgProvider = providerBg.bg ? (\n <BgProvider bg={providerBg.bg}>{props.children}</BgProvider>\n ) : (\n props.children\n );\n } else {\n children = props.children;\n }\n\n return {\n ownProps: {\n classes,\n ...ownPropsResolved,\n ...(definition.bg === 'provider'\n ? { childrenWithBgProvider }\n : { children }),\n },\n restProps,\n dataAttributes,\n utilityStyle,\n ...(definition.analytics ? { analytics } : {}),\n } as unknown as UseDefinitionResult<D, P>;\n}\n"],"names":[],"mappings":"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"}
1
+ {"version":3,"file":"useDefinition.esm.js","sources":["../../../src/hooks/useDefinition/useDefinition.tsx"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ReactNode } from 'react';\nimport clsx from 'clsx';\nimport { useBreakpoint } from '../useBreakpoint';\nimport { useBgProvider, useBgConsumer, BgProvider } from '../useBg';\nimport { resolveDefinitionProps, processUtilityProps } from './helpers';\nimport { useAnalytics } from '../../analytics/useAnalytics';\nimport { noopTracker } from '../../analytics/useAnalytics';\nimport { useDefinitionNavigation } from './useDefinitionNavigation';\nimport type {\n ComponentConfig,\n UseDefinitionOptions,\n UseDefinitionResult,\n UtilityKeys,\n} from './types';\n\nexport function useDefinition<\n D extends ComponentConfig<any, any>,\n P extends Record<string, any>,\n>(\n definition: D,\n props: P,\n options?: UseDefinitionOptions<D>,\n): UseDefinitionResult<D, P> {\n const { breakpoint } = useBreakpoint();\n\n // Resolve all props centrally applies responsive values and defaults\n const { ownPropsResolved, restProps } = resolveDefinitionProps(\n definition,\n props,\n breakpoint,\n );\n\n let navigation;\n if (definition.navigation) {\n // Component definitions are module constants, so this hook condition is\n // stable for the lifetime of the component.\n navigation = useDefinitionNavigation(definition.navigation);\n }\n\n const dataAttributes: Record<string, string | undefined> = {};\n\n for (const [key, config] of Object.entries(definition.propDefs)) {\n const finalValue = ownPropsResolved[key];\n\n if (finalValue !== undefined) {\n // Skip data-bg for bg prop when the provider path handles it\n if (key === 'bg' && definition.bg === 'provider') continue;\n\n if ((config as any).dataAttribute) {\n // eslint-disable-next-line no-restricted-syntax\n dataAttributes[`data-${key.toLowerCase()}`] = String(finalValue);\n }\n }\n }\n\n // Provider: resolve bg and provide context for children\n const providerBg = useBgProvider(\n definition.bg === 'provider' ? ownPropsResolved.bg : undefined,\n );\n\n // Consumer: read parent context bg\n const consumerBg = useBgConsumer();\n\n // Provider: set data-bg from the resolved provider bg\n if (definition.bg === 'provider' && providerBg.bg !== undefined) {\n dataAttributes['data-bg'] = String(providerBg.bg);\n }\n\n // Consumer: set data-on-bg from the parent context\n if (definition.bg === 'consumer' && consumerBg.bg !== undefined) {\n dataAttributes['data-on-bg'] = String(consumerBg.bg);\n }\n\n const { utilityClasses, utilityStyle } = processUtilityProps<UtilityKeys<D>>(\n props,\n (definition.utilityProps ?? []) as readonly UtilityKeys<D>[],\n );\n\n // Analytics: conditionally call useAnalytics based on definition flag\n let analytics = noopTracker;\n if (definition.analytics) {\n const tracker = useAnalytics();\n analytics = ownPropsResolved.noTrack ? noopTracker : tracker;\n }\n\n const utilityTarget =\n options?.utilityTarget !== undefined ? options.utilityTarget : 'root';\n const classNameTarget =\n options?.classNameTarget !== undefined ? options.classNameTarget : 'root';\n\n const classes: Record<string, string> = {};\n\n for (const [name, cssKey] of Object.entries(definition.classNames)) {\n classes[name] = clsx(\n cssKey as string,\n definition.styles[cssKey as keyof typeof definition.styles],\n utilityTarget === name && utilityClasses,\n classNameTarget === name && ownPropsResolved.className,\n );\n }\n\n let children: ReactNode | undefined;\n let childrenWithBgProvider: ReactNode | undefined;\n\n if (definition.bg === 'provider') {\n childrenWithBgProvider = providerBg.bg ? (\n <BgProvider bg={providerBg.bg}>{props.children}</BgProvider>\n ) : (\n props.children\n );\n } else {\n children = props.children;\n }\n\n return {\n ownProps: {\n classes,\n ...ownPropsResolved,\n ...(definition.bg === 'provider'\n ? { childrenWithBgProvider }\n : { children }),\n },\n restProps,\n dataAttributes,\n utilityStyle,\n ...(definition.analytics ? { analytics } : {}),\n ...(definition.navigation ? { navigation } : {}),\n } as unknown as UseDefinitionResult<D, P>;\n}\n"],"names":[],"mappings":"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"}
@@ -0,0 +1,50 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import { useAnchorNavigation } from '../../navigation/useNavigation.esm.js';
3
+ import { useRoutingIntegration } from '../../navigation/useRouting.esm.js';
4
+
5
+ function NavigationView({
6
+ navigation,
7
+ view: View,
8
+ viewProps
9
+ }) {
10
+ const props = { ...viewProps, navigation };
11
+ return /* @__PURE__ */ jsx(View, { ...props });
12
+ }
13
+ function RoutedAnchorNavigation({
14
+ props,
15
+ view,
16
+ viewProps
17
+ }) {
18
+ const navigation = useAnchorNavigation(props);
19
+ return /* @__PURE__ */ jsx(NavigationView, { navigation, view, viewProps });
20
+ }
21
+ function NativeAnchorNavigation({
22
+ props,
23
+ view,
24
+ viewProps
25
+ }) {
26
+ let navigation = {
27
+ type: "none",
28
+ canMatchRoute: false
29
+ };
30
+ if (props.href) {
31
+ navigation = {
32
+ type: "native",
33
+ canMatchRoute: false,
34
+ ariaHref: props.href,
35
+ browserHref: props.href
36
+ };
37
+ }
38
+ return /* @__PURE__ */ jsx(NavigationView, { navigation, view, viewProps });
39
+ }
40
+ function useDefinitionNavigation(_config) {
41
+ const routing = useRoutingIntegration({ fallback: true });
42
+ const inRouterContext = routing.useInRouterContext();
43
+ if (inRouterContext) {
44
+ return RoutedAnchorNavigation;
45
+ }
46
+ return NativeAnchorNavigation;
47
+ }
48
+
49
+ export { useDefinitionNavigation };
50
+ //# sourceMappingURL=useDefinitionNavigation.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useDefinitionNavigation.esm.js","sources":["../../../src/hooks/useDefinition/useDefinitionNavigation.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 type { ComponentType, ReactElement } from 'react';\nimport {\n useAnchorNavigation,\n type AnchorNavigation,\n type NavigationProps,\n} from '../../navigation/useNavigation';\nimport { useRoutingIntegration } from '../../navigation/useRouting';\nimport type {\n DefinitionNavigationComponent,\n DefinitionNavigationConfig,\n} from './types';\n\ntype NavigationResolverProps<N, P extends object> = {\n props: NavigationProps;\n view: ComponentType<P & { navigation: N }>;\n viewProps: P;\n};\n\ntype AnchorNavigationProps<P extends object> = NavigationResolverProps<\n AnchorNavigation,\n P\n>;\n\nfunction NavigationView<N, P extends object>({\n navigation,\n view: View,\n viewProps,\n}: Omit<NavigationResolverProps<N, P>, 'props'> & {\n navigation: N;\n}): ReactElement {\n const props = { ...viewProps, navigation } as P & { navigation: N };\n return <View {...props} />;\n}\n\nfunction RoutedAnchorNavigation<P extends object>({\n props,\n view,\n viewProps,\n}: AnchorNavigationProps<P>): ReactElement {\n const navigation = useAnchorNavigation(props);\n return (\n <NavigationView navigation={navigation} view={view} viewProps={viewProps} />\n );\n}\n\nfunction NativeAnchorNavigation<P extends object>({\n props,\n view,\n viewProps,\n}: AnchorNavigationProps<P>): ReactElement {\n let navigation: AnchorNavigation = {\n type: 'none',\n canMatchRoute: false,\n };\n if (props.href) {\n navigation = {\n type: 'native',\n canMatchRoute: false,\n ariaHref: props.href,\n browserHref: props.href,\n };\n }\n\n return (\n <NavigationView navigation={navigation} view={view} viewProps={viewProps} />\n );\n}\n\n/**\n * Selects a resolver component so router-specific hooks only mount when a\n * React Router context is available. The resolver injects the normalized\n * navigation into the component view as an ordinary React prop.\n */\nexport function useDefinitionNavigation(\n _config: DefinitionNavigationConfig,\n): DefinitionNavigationComponent {\n const routing = useRoutingIntegration({ fallback: true });\n const inRouterContext = routing.useInRouterContext();\n\n if (inRouterContext) {\n return RoutedAnchorNavigation;\n }\n return NativeAnchorNavigation;\n}\n"],"names":[],"mappings":";;;;AAuCA,SAAS,cAAA,CAAoC;AAAA,EAC3C,UAAA;AAAA,EACA,IAAA,EAAM,IAAA;AAAA,EACN;AACF,CAAA,EAEiB;AACf,EAAA,MAAM,KAAA,GAAQ,EAAE,GAAG,SAAA,EAAW,UAAA,EAAW;AACzC,EAAA,uBAAO,GAAA,CAAC,IAAA,EAAA,EAAM,GAAG,KAAA,EAAO,CAAA;AAC1B;AAEA,SAAS,sBAAA,CAAyC;AAAA,EAChD,KAAA;AAAA,EACA,IAAA;AAAA,EACA;AACF,CAAA,EAA2C;AACzC,EAAA,MAAM,UAAA,GAAa,oBAAoB,KAAK,CAAA;AAC5C,EAAA,uBACE,GAAA,CAAC,cAAA,EAAA,EAAe,UAAA,EAAwB,IAAA,EAAY,SAAA,EAAsB,CAAA;AAE9E;AAEA,SAAS,sBAAA,CAAyC;AAAA,EAChD,KAAA;AAAA,EACA,IAAA;AAAA,EACA;AACF,CAAA,EAA2C;AACzC,EAAA,IAAI,UAAA,GAA+B;AAAA,IACjC,IAAA,EAAM,MAAA;AAAA,IACN,aAAA,EAAe;AAAA,GACjB;AACA,EAAA,IAAI,MAAM,IAAA,EAAM;AACd,IAAA,UAAA,GAAa;AAAA,MACX,IAAA,EAAM,QAAA;AAAA,MACN,aAAA,EAAe,KAAA;AAAA,MACf,UAAU,KAAA,CAAM,IAAA;AAAA,MAChB,aAAa,KAAA,CAAM;AAAA,KACrB;AAAA,EACF;AAEA,EAAA,uBACE,GAAA,CAAC,cAAA,EAAA,EAAe,UAAA,EAAwB,IAAA,EAAY,SAAA,EAAsB,CAAA;AAE9E;AAOO,SAAS,wBACd,OAAA,EAC+B;AAC/B,EAAA,MAAM,OAAA,GAAU,qBAAA,CAAsB,EAAE,QAAA,EAAU,MAAM,CAAA;AACxD,EAAA,MAAM,eAAA,GAAkB,QAAQ,kBAAA,EAAmB;AAEnD,EAAA,IAAI,eAAA,EAAiB;AACnB,IAAA,OAAO,sBAAA;AAAA,EACT;AACA,EAAA,OAAO,sBAAA;AACT;;;;"}
package/dist/index.d.ts CHANGED
@@ -1491,7 +1491,7 @@ type TabOwnProps = {
1491
1491
  *
1492
1492
  * @public
1493
1493
  */
1494
- interface TabProps extends TabOwnProps, Omit<TabProps$1, keyof TabOwnProps> {
1494
+ interface TabProps extends TabOwnProps, Omit<TabProps$1, keyof TabOwnProps | 'render'> {
1495
1495
  }
1496
1496
  /**
1497
1497
  * Own props for the TabPanel component.
@@ -1894,6 +1894,9 @@ declare const HeaderNavItemDefinition: {
1894
1894
  readonly root: "bui-HeaderNavItem";
1895
1895
  };
1896
1896
  readonly analytics: true;
1897
+ readonly navigation: {
1898
+ readonly type: "anchor";
1899
+ };
1897
1900
  readonly propDefs: {
1898
1901
  readonly noTrack: {};
1899
1902
  readonly id: {};
@@ -2012,7 +2015,7 @@ type ButtonLinkOwnProps = {
2012
2015
  *
2013
2016
  * @public
2014
2017
  */
2015
- interface ButtonLinkProps extends Omit<LinkProps$1, keyof ButtonLinkOwnProps>, ButtonLinkOwnProps {
2018
+ interface ButtonLinkProps extends Omit<LinkProps$1, keyof ButtonLinkOwnProps | 'render'>, ButtonLinkOwnProps {
2016
2019
  }
2017
2020
 
2018
2021
  /**
@@ -2036,6 +2039,9 @@ declare const ButtonLinkDefinition: {
2036
2039
  };
2037
2040
  readonly bg: "consumer";
2038
2041
  readonly analytics: true;
2042
+ readonly navigation: {
2043
+ readonly type: "anchor";
2044
+ };
2039
2045
  readonly propDefs: {
2040
2046
  readonly noTrack: {};
2041
2047
  readonly size: {
@@ -2413,7 +2419,7 @@ type ComboboxItemOwnProps = {
2413
2419
  className?: string;
2414
2420
  };
2415
2421
  /** @public */
2416
- type ComboboxItemProps<T extends object = object> = ComboboxItemOwnProps & Omit<ListBoxItemProps<T>, keyof ComboboxItemOwnProps>;
2422
+ type ComboboxItemProps<T extends object = object> = ComboboxItemOwnProps & Omit<ListBoxItemProps<T>, keyof ComboboxItemOwnProps | 'render'>;
2417
2423
  /** @public */
2418
2424
  type ComboboxItemTextOwnProps = {
2419
2425
  title: string;
@@ -2560,6 +2566,9 @@ declare const ComboboxItemDefinition: {
2560
2566
  readonly indicator: "bui-ComboboxItemIndicator";
2561
2567
  readonly content: "bui-ComboboxItemContent";
2562
2568
  };
2569
+ readonly navigation: {
2570
+ readonly type: "anchor";
2571
+ };
2563
2572
  readonly propDefs: {
2564
2573
  readonly children: {};
2565
2574
  readonly textValue: {};
@@ -3740,7 +3749,7 @@ type MenuItemOwnProps = {
3740
3749
  className?: string;
3741
3750
  };
3742
3751
  /** @public */
3743
- interface MenuItemProps extends MenuItemOwnProps, Omit<MenuItemProps$1, keyof MenuItemOwnProps> {
3752
+ interface MenuItemProps extends MenuItemOwnProps, Omit<MenuItemProps$1, keyof MenuItemOwnProps | 'render'> {
3744
3753
  }
3745
3754
  /** @public */
3746
3755
  type MenuListBoxItemOwnProps = {
@@ -3748,7 +3757,7 @@ type MenuListBoxItemOwnProps = {
3748
3757
  className?: string;
3749
3758
  };
3750
3759
  /** @public */
3751
- interface MenuListBoxItemProps extends MenuListBoxItemOwnProps, Omit<ListBoxItemProps, keyof MenuListBoxItemOwnProps> {
3760
+ interface MenuListBoxItemProps extends MenuListBoxItemOwnProps, Omit<ListBoxItemProps, keyof MenuListBoxItemOwnProps | 'render'> {
3752
3761
  }
3753
3762
  /** @public */
3754
3763
  type MenuSectionOwnProps = {
@@ -3962,7 +3971,7 @@ type SearchAutocompleteItemOwnProps = {
3962
3971
  className?: string;
3963
3972
  };
3964
3973
  /** @public */
3965
- interface SearchAutocompleteItemProps extends SearchAutocompleteItemOwnProps, Omit<ListBoxItemProps, keyof SearchAutocompleteItemOwnProps> {
3974
+ interface SearchAutocompleteItemProps extends SearchAutocompleteItemOwnProps, Omit<ListBoxItemProps, keyof SearchAutocompleteItemOwnProps | 'render'> {
3966
3975
  }
3967
3976
 
3968
3977
  /**
@@ -4104,7 +4113,7 @@ type LinkOwnProps = {
4104
4113
  className?: string;
4105
4114
  };
4106
4115
  /** @public */
4107
- interface LinkProps extends Omit<LinkProps$1, 'children' | 'className'>, LinkOwnProps {
4116
+ interface LinkProps extends Omit<LinkProps$1, 'children' | 'className' | 'render'>, LinkOwnProps {
4108
4117
  }
4109
4118
 
4110
4119
  /**
@@ -4126,6 +4135,9 @@ declare const LinkDefinition: {
4126
4135
  readonly root: "bui-Link";
4127
4136
  };
4128
4137
  readonly analytics: true;
4138
+ readonly navigation: {
4139
+ readonly type: "anchor";
4140
+ };
4129
4141
  readonly propDefs: {
4130
4142
  readonly noTrack: {};
4131
4143
  readonly variant: {
@@ -4458,7 +4470,7 @@ type SelectItemOwnProps = {
4458
4470
  className?: string;
4459
4471
  };
4460
4472
  /** @public */
4461
- type SelectItemProps<T extends object = object> = SelectItemOwnProps & Omit<ListBoxItemProps<T>, keyof SelectItemOwnProps | 'textValue'> & {
4473
+ type SelectItemProps<T extends object = object> = SelectItemOwnProps & Omit<ListBoxItemProps<T>, keyof SelectItemOwnProps | 'render' | 'textValue'> & {
4462
4474
  textValue: string;
4463
4475
  };
4464
4476
  /** @public */
@@ -4616,6 +4628,9 @@ declare const SelectItemDefinition: {
4616
4628
  readonly indicator: "bui-SelectItemIndicator";
4617
4629
  readonly content: "bui-SelectItemContent";
4618
4630
  };
4631
+ readonly navigation: {
4632
+ readonly type: "anchor";
4633
+ };
4619
4634
  readonly propDefs: {
4620
4635
  readonly children: {};
4621
4636
  readonly showSelectionIndicator: {};
@@ -4972,6 +4987,15 @@ type BUIProviderProps = {
4972
4987
  /**
4973
4988
  * Provides integration capabilities to all descendant BUI components.
4974
4989
  *
4990
+ * When rendered inside the Backstage app router, BUI components use
4991
+ * client-side navigation for internal links. Relative destinations resolve
4992
+ * from the route of the component that renders the link, and the router
4993
+ * basename applies once.
4994
+ *
4995
+ * External and scheme links, downloads, and links with non-self targets use the
4996
+ * browser's native navigation. BUI components rendered outside React Router use
4997
+ * native links without throwing.
4998
+ *
4975
4999
  * @example
4976
5000
  * ```tsx
4977
5001
  * import { BUIProvider } from '@backstage/ui';