@backstage/ui 0.7.2-next.2 → 0.8.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 (186) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/css/styles.css +6398 -8163
  3. package/dist/components/Avatar/Avatar.esm.js +21 -7
  4. package/dist/components/Avatar/Avatar.esm.js.map +1 -1
  5. package/dist/components/Avatar/Avatar.module.css.esm.js +8 -0
  6. package/dist/components/Avatar/Avatar.module.css.esm.js.map +1 -0
  7. package/dist/components/Box/Box.esm.js +20 -23
  8. package/dist/components/Box/Box.esm.js.map +1 -1
  9. package/dist/components/Box/Box.module.css.esm.js +8 -0
  10. package/dist/components/Box/Box.module.css.esm.js.map +1 -0
  11. package/dist/components/Button/Button.esm.js +10 -19
  12. package/dist/components/Button/Button.esm.js.map +1 -1
  13. package/dist/components/Button/Button.module.css.esm.js +8 -0
  14. package/dist/components/Button/Button.module.css.esm.js.map +1 -0
  15. package/dist/components/ButtonIcon/ButtonIcon.esm.js +14 -12
  16. package/dist/components/ButtonIcon/ButtonIcon.esm.js.map +1 -1
  17. package/dist/components/ButtonIcon/ButtonIcon.module.css.esm.js +8 -0
  18. package/dist/components/ButtonIcon/ButtonIcon.module.css.esm.js.map +1 -0
  19. package/dist/components/ButtonLink/ButtonLink.esm.js +8 -13
  20. package/dist/components/ButtonLink/ButtonLink.esm.js.map +1 -1
  21. package/dist/components/Card/Card.esm.js +46 -28
  22. package/dist/components/Card/Card.esm.js.map +1 -1
  23. package/dist/components/Card/Card.module.css.esm.js +8 -0
  24. package/dist/components/Card/Card.module.css.esm.js.map +1 -0
  25. package/dist/components/Checkbox/Checkbox.esm.js +14 -49
  26. package/dist/components/Checkbox/Checkbox.esm.js.map +1 -1
  27. package/dist/components/Checkbox/Checkbox.module.css.esm.js +8 -0
  28. package/dist/components/Checkbox/Checkbox.module.css.esm.js.map +1 -0
  29. package/dist/components/Collapsible/Collapsible.esm.js +14 -9
  30. package/dist/components/Collapsible/Collapsible.esm.js.map +1 -1
  31. package/dist/components/Collapsible/Collapsible.module.css.esm.js +8 -0
  32. package/dist/components/Collapsible/Collapsible.module.css.esm.js.map +1 -0
  33. package/dist/components/Container/Container.esm.js +22 -25
  34. package/dist/components/Container/Container.esm.js.map +1 -1
  35. package/dist/components/Container/Container.module.css.esm.js +8 -0
  36. package/dist/components/Container/Container.module.css.esm.js.map +1 -0
  37. package/dist/components/Dialog/Dialog.esm.js +103 -0
  38. package/dist/components/Dialog/Dialog.esm.js.map +1 -0
  39. package/dist/components/Dialog/Dialog.module.css.esm.js +8 -0
  40. package/dist/components/Dialog/Dialog.module.css.esm.js.map +1 -0
  41. package/dist/components/FieldError/FieldError.esm.js +5 -2
  42. package/dist/components/FieldError/FieldError.esm.js.map +1 -1
  43. package/dist/components/FieldError/FieldError.module.css.esm.js +8 -0
  44. package/dist/components/FieldError/FieldError.module.css.esm.js.map +1 -0
  45. package/dist/components/FieldLabel/FieldLabel.esm.js +50 -13
  46. package/dist/components/FieldLabel/FieldLabel.esm.js.map +1 -1
  47. package/dist/components/FieldLabel/FieldLabel.module.css.esm.js +8 -0
  48. package/dist/components/FieldLabel/FieldLabel.module.css.esm.js.map +1 -0
  49. package/dist/components/Flex/Flex.esm.js +22 -18
  50. package/dist/components/Flex/Flex.esm.js.map +1 -1
  51. package/dist/components/Flex/Flex.module.css.esm.js +8 -0
  52. package/dist/components/Flex/Flex.module.css.esm.js.map +1 -0
  53. package/dist/components/Grid/Grid.esm.js +41 -29
  54. package/dist/components/Grid/Grid.esm.js.map +1 -1
  55. package/dist/components/Grid/Grid.module.css.esm.js +8 -0
  56. package/dist/components/Grid/Grid.module.css.esm.js.map +1 -0
  57. package/dist/components/Header/Header.esm.js +22 -11
  58. package/dist/components/Header/Header.esm.js.map +1 -1
  59. package/dist/components/Header/Header.module.css.esm.js +8 -0
  60. package/dist/components/Header/Header.module.css.esm.js.map +1 -0
  61. package/dist/components/Header/HeaderToolbar.esm.js +71 -7
  62. package/dist/components/Header/HeaderToolbar.esm.js.map +1 -1
  63. package/dist/components/HeaderPage/HeaderPage.esm.js +51 -31
  64. package/dist/components/HeaderPage/HeaderPage.esm.js.map +1 -1
  65. package/dist/components/HeaderPage/HeaderPage.module.css.esm.js +8 -0
  66. package/dist/components/HeaderPage/HeaderPage.module.css.esm.js.map +1 -0
  67. package/dist/components/Link/Link.esm.js +26 -15
  68. package/dist/components/Link/Link.esm.js.map +1 -1
  69. package/dist/components/Link/Link.module.css.esm.js +8 -0
  70. package/dist/components/Link/Link.module.css.esm.js.map +1 -0
  71. package/dist/components/Menu/Menu.esm.js +376 -118
  72. package/dist/components/Menu/Menu.esm.js.map +1 -1
  73. package/dist/components/Menu/Menu.module.css.esm.js +8 -0
  74. package/dist/components/Menu/Menu.module.css.esm.js.map +1 -0
  75. package/dist/components/Popover/Popover.module.css.esm.js +8 -0
  76. package/dist/components/Popover/Popover.module.css.esm.js.map +1 -0
  77. package/dist/components/RadioGroup/RadioGroup.esm.js +6 -5
  78. package/dist/components/RadioGroup/RadioGroup.esm.js.map +1 -1
  79. package/dist/components/RadioGroup/RadioGroup.module.css.esm.js +8 -0
  80. package/dist/components/RadioGroup/RadioGroup.module.css.esm.js.map +1 -0
  81. package/dist/components/SearchField/SearchField.esm.js +44 -23
  82. package/dist/components/SearchField/SearchField.esm.js.map +1 -1
  83. package/dist/components/SearchField/SearchField.module.css.esm.js +8 -0
  84. package/dist/components/SearchField/SearchField.module.css.esm.js.map +1 -0
  85. package/dist/components/Select/Select.esm.js +60 -25
  86. package/dist/components/Select/Select.esm.js.map +1 -1
  87. package/dist/components/Select/Select.module.css.esm.js +8 -0
  88. package/dist/components/Select/Select.module.css.esm.js.map +1 -0
  89. package/dist/components/Skeleton/Skeleton.esm.js +12 -4
  90. package/dist/components/Skeleton/Skeleton.esm.js.map +1 -1
  91. package/dist/components/Skeleton/Skeleton.module.css.esm.js +8 -0
  92. package/dist/components/Skeleton/Skeleton.module.css.esm.js.map +1 -0
  93. package/dist/components/Switch/Switch.esm.js +22 -6
  94. package/dist/components/Switch/Switch.esm.js.map +1 -1
  95. package/dist/components/Switch/Switch.module.css.esm.js +8 -0
  96. package/dist/components/Switch/Switch.module.css.esm.js.map +1 -0
  97. package/dist/components/Table/Table.module.css.esm.js +8 -0
  98. package/dist/components/Table/Table.module.css.esm.js.map +1 -0
  99. package/dist/components/Table/components/Cell.esm.js +44 -17
  100. package/dist/components/Table/components/Cell.esm.js.map +1 -1
  101. package/dist/components/Table/components/CellProfile.esm.js +71 -26
  102. package/dist/components/Table/components/CellProfile.esm.js.map +1 -1
  103. package/dist/components/Table/components/Column.esm.js +39 -9
  104. package/dist/components/Table/components/Column.esm.js.map +1 -1
  105. package/dist/components/Table/components/Row.esm.js +19 -11
  106. package/dist/components/Table/components/Row.esm.js.map +1 -1
  107. package/dist/components/Table/components/Table.esm.js +8 -3
  108. package/dist/components/Table/components/Table.esm.js.map +1 -1
  109. package/dist/components/Table/components/TableBody.esm.js +13 -2
  110. package/dist/components/Table/components/TableBody.esm.js.map +1 -1
  111. package/dist/components/Table/components/TableHeader.esm.js +20 -10
  112. package/dist/components/Table/components/TableHeader.esm.js.map +1 -1
  113. package/dist/components/TablePagination/TablePagination.esm.js +80 -63
  114. package/dist/components/TablePagination/TablePagination.esm.js.map +1 -1
  115. package/dist/components/TablePagination/TablePagination.module.css.esm.js +8 -0
  116. package/dist/components/TablePagination/TablePagination.module.css.esm.js.map +1 -0
  117. package/dist/components/Tabs/Tabs.esm.js +55 -31
  118. package/dist/components/Tabs/Tabs.esm.js.map +1 -1
  119. package/dist/components/Tabs/Tabs.module.css.esm.js +8 -0
  120. package/dist/components/Tabs/Tabs.module.css.esm.js.map +1 -0
  121. package/dist/components/Tabs/TabsIndicators.esm.js +14 -2
  122. package/dist/components/Tabs/TabsIndicators.esm.js.map +1 -1
  123. package/dist/components/TagGroup/TagGroup.esm.js +35 -19
  124. package/dist/components/TagGroup/TagGroup.esm.js.map +1 -1
  125. package/dist/components/TagGroup/TagGroup.module.css.esm.js +8 -0
  126. package/dist/components/TagGroup/TagGroup.module.css.esm.js.map +1 -0
  127. package/dist/components/Text/Text.esm.js +10 -19
  128. package/dist/components/Text/Text.esm.js.map +1 -1
  129. package/dist/components/Text/Text.module.css.esm.js +8 -0
  130. package/dist/components/Text/Text.module.css.esm.js.map +1 -0
  131. package/dist/components/TextField/TextField.esm.js +29 -16
  132. package/dist/components/TextField/TextField.esm.js.map +1 -1
  133. package/dist/components/TextField/TextField.module.css.esm.js +8 -0
  134. package/dist/components/TextField/TextField.module.css.esm.js.map +1 -0
  135. package/dist/components/Tooltip/Tooltip.esm.js +19 -7
  136. package/dist/components/Tooltip/Tooltip.esm.js.map +1 -1
  137. package/dist/components/Tooltip/Tooltip.module.css.esm.js +8 -0
  138. package/dist/components/Tooltip/Tooltip.module.css.esm.js.map +1 -0
  139. package/dist/hooks/useStyles.esm.js +65 -9
  140. package/dist/hooks/useStyles.esm.js.map +1 -1
  141. package/dist/index.d.ts +148 -433
  142. package/dist/index.esm.js +1 -9
  143. package/dist/index.esm.js.map +1 -1
  144. package/dist/node_modules_dist/style-inject/dist/style-inject.es.esm.js +29 -0
  145. package/dist/node_modules_dist/style-inject/dist/style-inject.es.esm.js.map +1 -0
  146. package/dist/utils/componentDefinitions.esm.js +113 -16
  147. package/dist/utils/componentDefinitions.esm.js.map +1 -1
  148. package/dist/utils/utilityClassMap.esm.js +189 -0
  149. package/dist/utils/utilityClassMap.esm.js.map +1 -0
  150. package/package.json +3 -3
  151. package/dist/components/Box/Box.props.esm.js +0 -7
  152. package/dist/components/Box/Box.props.esm.js.map +0 -1
  153. package/dist/components/Flex/Flex.props.esm.js +0 -31
  154. package/dist/components/Flex/Flex.props.esm.js.map +0 -1
  155. package/dist/components/Grid/Grid.props.esm.js +0 -58
  156. package/dist/components/Grid/Grid.props.esm.js.map +0 -1
  157. package/dist/components/Icon/Icon.esm.js +0 -29
  158. package/dist/components/Icon/Icon.esm.js.map +0 -1
  159. package/dist/components/Icon/context.esm.js +0 -10
  160. package/dist/components/Icon/context.esm.js.map +0 -1
  161. package/dist/components/Icon/icons.esm.js +0 -63
  162. package/dist/components/Icon/icons.esm.js.map +0 -1
  163. package/dist/components/Icon/provider.esm.js +0 -12
  164. package/dist/components/Icon/provider.esm.js.map +0 -1
  165. package/dist/components/ScrollArea/ScrollArea.esm.js +0 -63
  166. package/dist/components/ScrollArea/ScrollArea.esm.js.map +0 -1
  167. package/dist/props/display.props.esm.js +0 -12
  168. package/dist/props/display.props.esm.js.map +0 -1
  169. package/dist/props/gap-props.esm.js +0 -15
  170. package/dist/props/gap-props.esm.js.map +0 -1
  171. package/dist/props/height.props.esm.js +0 -23
  172. package/dist/props/height.props.esm.js.map +0 -1
  173. package/dist/props/margin.props.esm.js +0 -54
  174. package/dist/props/margin.props.esm.js.map +0 -1
  175. package/dist/props/padding.props.esm.js +0 -54
  176. package/dist/props/padding.props.esm.js.map +0 -1
  177. package/dist/props/position.props.esm.js +0 -18
  178. package/dist/props/position.props.esm.js.map +0 -1
  179. package/dist/props/prop-def.esm.js +0 -4
  180. package/dist/props/prop-def.esm.js.map +0 -1
  181. package/dist/props/spacing.props.esm.js +0 -28
  182. package/dist/props/spacing.props.esm.js.map +0 -1
  183. package/dist/props/width.props.esm.js +0 -23
  184. package/dist/props/width.props.esm.js.map +0 -1
  185. package/dist/utils/extractProps.esm.js +0 -49
  186. package/dist/utils/extractProps.esm.js.map +0 -1
@@ -1,25 +1,29 @@
1
- import { forwardRef, createElement } from 'react';
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import { forwardRef } from 'react';
2
3
  import clsx from 'clsx';
3
- import { flexPropDefs } from './Flex.props.esm.js';
4
- import { extractProps } from '../../utils/extractProps.esm.js';
5
- import { gapPropDefs } from '../../props/gap-props.esm.js';
6
- import { spacingPropDefs } from '../../props/spacing.props.esm.js';
7
4
  import { useStyles } from '../../hooks/useStyles.esm.js';
5
+ import styles from './Flex.module.css.esm.js';
8
6
 
9
7
  const Flex = forwardRef((props, ref) => {
10
- const propDefs = {
11
- ...gapPropDefs,
12
- ...flexPropDefs,
13
- ...spacingPropDefs
14
- };
15
- const { classNames } = useStyles("Flex");
16
- const { className, style } = extractProps(props, propDefs);
17
- return createElement("div", {
18
- ref,
19
- className: clsx(classNames.root, className),
20
- style,
21
- children: props.children
22
- });
8
+ const { classNames, utilityClasses, style, cleanedProps } = useStyles(
9
+ "Flex",
10
+ { gap: "4", ...props }
11
+ );
12
+ const { className, ...rest } = cleanedProps;
13
+ return /* @__PURE__ */ jsx(
14
+ "div",
15
+ {
16
+ ref,
17
+ className: clsx(
18
+ classNames.root,
19
+ utilityClasses,
20
+ styles[classNames.root],
21
+ className
22
+ ),
23
+ style,
24
+ ...rest
25
+ }
26
+ );
23
27
  });
24
28
 
25
29
  export { Flex };
@@ -1 +1 @@
1
- {"version":3,"file":"Flex.esm.js","sources":["../../../src/components/Flex/Flex.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createElement, forwardRef } from 'react';\nimport { FlexProps } from './types';\nimport clsx from 'clsx';\nimport { flexPropDefs } from './Flex.props';\nimport { extractProps } from '../../utils/extractProps';\nimport { gapPropDefs } from '../../props/gap-props';\nimport { spacingPropDefs } from '../../props/spacing.props';\nimport { useStyles } from '../../hooks/useStyles';\n\n/** @public */\nexport const Flex = forwardRef<HTMLDivElement, FlexProps>((props, ref) => {\n const propDefs = {\n ...gapPropDefs,\n ...flexPropDefs,\n ...spacingPropDefs,\n };\n\n const { classNames } = useStyles('Flex');\n const { className, style } = extractProps(props, propDefs);\n\n return createElement('div', {\n ref,\n className: clsx(classNames.root, className),\n style,\n children: props.children,\n });\n});\n"],"names":[],"mappings":";;;;;;;;AA0BO,MAAM,IAAA,GAAO,UAAA,CAAsC,CAAC,KAAA,EAAO,GAAA,KAAQ;AACxE,EAAA,MAAM,QAAA,GAAW;AAAA,IACf,GAAG,WAAA;AAAA,IACH,GAAG,YAAA;AAAA,IACH,GAAG;AAAA,GACL;AAEA,EAAA,MAAM,EAAE,UAAA,EAAW,GAAI,SAAA,CAAU,MAAM,CAAA;AACvC,EAAA,MAAM,EAAE,SAAA,EAAW,KAAA,EAAM,GAAI,YAAA,CAAa,OAAO,QAAQ,CAAA;AAEzD,EAAA,OAAO,cAAc,KAAA,EAAO;AAAA,IAC1B,GAAA;AAAA,IACA,SAAA,EAAW,IAAA,CAAK,UAAA,CAAW,IAAA,EAAM,SAAS,CAAA;AAAA,IAC1C,KAAA;AAAA,IACA,UAAU,KAAA,CAAM;AAAA,GACjB,CAAA;AACH,CAAC;;;;"}
1
+ {"version":3,"file":"Flex.esm.js","sources":["../../../src/components/Flex/Flex.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 } from 'react';\nimport { FlexProps } from './types';\nimport clsx from 'clsx';\nimport { useStyles } from '../../hooks/useStyles';\nimport styles from './Flex.module.css';\n\n/** @public */\nexport const Flex = forwardRef<HTMLDivElement, FlexProps>((props, ref) => {\n const { classNames, utilityClasses, style, cleanedProps } = useStyles(\n 'Flex',\n { gap: '4', ...props },\n );\n\n const { className, ...rest } = cleanedProps;\n\n return (\n <div\n ref={ref}\n className={clsx(\n classNames.root,\n utilityClasses,\n styles[classNames.root],\n className,\n )}\n style={style}\n {...rest}\n />\n );\n});\n"],"names":[],"mappings":";;;;;;AAuBO,MAAM,IAAA,GAAO,UAAA,CAAsC,CAAC,KAAA,EAAO,GAAA,KAAQ;AACxE,EAAA,MAAM,EAAE,UAAA,EAAY,cAAA,EAAgB,KAAA,EAAO,cAAa,GAAI,SAAA;AAAA,IAC1D,MAAA;AAAA,IACA,EAAE,GAAA,EAAK,GAAA,EAAK,GAAG,KAAA;AAAM,GACvB;AAEA,EAAA,MAAM,EAAE,SAAA,EAAW,GAAG,IAAA,EAAK,GAAI,YAAA;AAE/B,EAAA,uBACE,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,GAAA;AAAA,MACA,SAAA,EAAW,IAAA;AAAA,QACT,UAAA,CAAW,IAAA;AAAA,QACX,cAAA;AAAA,QACA,MAAA,CAAO,WAAW,IAAI,CAAA;AAAA,QACtB;AAAA,OACF;AAAA,MACA,KAAA;AAAA,MACC,GAAG;AAAA;AAAA,GACN;AAEJ,CAAC;;;;"}
@@ -0,0 +1,8 @@
1
+ import styleInject from '../../node_modules_dist/style-inject/dist/style-inject.es.esm.js';
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 components {\n .Flex-module_bui-Flex__3kax7 {\n display: flex;\n\n /* This helps when using `truncate` on text inside a flex container */\n min-width: 0;\n }\n}\n";
4
+ var styles = {"bui-Flex":"Flex-module_bui-Flex__3kax7"};
5
+ styleInject(css_248z);
6
+
7
+ export { styles as default };
8
+ //# sourceMappingURL=Flex.module.css.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Flex.module.css.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -1,38 +1,50 @@
1
- import { forwardRef, createElement } from 'react';
2
- import { gapPropDefs } from '../../props/gap-props.esm.js';
3
- import { extractProps } from '../../utils/extractProps.esm.js';
4
- import { gridPropDefs, gridItemPropDefs } from './Grid.props.esm.js';
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import { forwardRef } from 'react';
5
3
  import clsx from 'clsx';
6
- import { spacingPropDefs } from '../../props/spacing.props.esm.js';
7
4
  import { useStyles } from '../../hooks/useStyles.esm.js';
5
+ import styles from './Grid.module.css.esm.js';
8
6
 
9
7
  const GridRoot = forwardRef((props, ref) => {
10
- const propDefs = {
11
- ...gapPropDefs,
12
- ...gridPropDefs,
13
- ...spacingPropDefs
14
- };
15
- const { classNames } = useStyles("Grid");
16
- const { className, style } = extractProps(props, propDefs);
17
- return createElement("div", {
18
- ref,
19
- className: clsx(classNames.root, className),
20
- style,
21
- children: props.children
22
- });
8
+ const { classNames, utilityClasses, style, cleanedProps } = useStyles(
9
+ "Grid",
10
+ { columns: "auto", gap: "4", ...props }
11
+ );
12
+ const { className, ...rest } = cleanedProps;
13
+ return /* @__PURE__ */ jsx(
14
+ "div",
15
+ {
16
+ ref,
17
+ className: clsx(
18
+ classNames.root,
19
+ utilityClasses,
20
+ styles[classNames.root],
21
+ className
22
+ ),
23
+ style,
24
+ ...rest
25
+ }
26
+ );
23
27
  });
24
28
  const GridItem = forwardRef((props, ref) => {
25
- const propDefs = {
26
- ...gridItemPropDefs
27
- };
28
- const { classNames } = useStyles("Grid");
29
- const { className, style } = extractProps(props, propDefs);
30
- return createElement("div", {
31
- ref,
32
- className: clsx(classNames.item, className),
33
- style,
34
- children: props.children
35
- });
29
+ const { classNames, utilityClasses, style, cleanedProps } = useStyles(
30
+ "GridItem",
31
+ props
32
+ );
33
+ const { className, ...rest } = cleanedProps;
34
+ return /* @__PURE__ */ jsx(
35
+ "div",
36
+ {
37
+ ref,
38
+ className: clsx(
39
+ classNames.root,
40
+ utilityClasses,
41
+ styles[classNames.root],
42
+ className
43
+ ),
44
+ style,
45
+ ...rest
46
+ }
47
+ );
36
48
  });
37
49
  const Grid = {
38
50
  Root: GridRoot,
@@ -1 +1 @@
1
- {"version":3,"file":"Grid.esm.js","sources":["../../../src/components/Grid/Grid.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createElement, forwardRef } from 'react';\nimport { gapPropDefs } from '../../props/gap-props';\nimport { extractProps } from '../../utils/extractProps';\nimport { gridItemPropDefs, gridPropDefs } from './Grid.props';\nimport clsx from 'clsx';\nimport type { GridItemProps, GridProps } from './types';\nimport { spacingPropDefs } from '../../props/spacing.props';\nimport { useStyles } from '../../hooks/useStyles';\n\nconst GridRoot = forwardRef<HTMLDivElement, GridProps>((props, ref) => {\n const propDefs = {\n ...gapPropDefs,\n ...gridPropDefs,\n ...spacingPropDefs,\n };\n\n const { classNames } = useStyles('Grid');\n\n const { className, style } = extractProps(props, propDefs);\n\n return createElement('div', {\n ref,\n className: clsx(classNames.root, className),\n style,\n children: props.children,\n });\n});\n\nconst GridItem = forwardRef<HTMLDivElement, GridItemProps>((props, ref) => {\n const propDefs = {\n ...gridItemPropDefs,\n };\n\n const { classNames } = useStyles('Grid');\n const { className, style } = extractProps(props, propDefs);\n\n return createElement('div', {\n ref,\n className: clsx(classNames.item, className),\n style,\n children: props.children,\n });\n});\n\n/** @public */\nexport const Grid = {\n Root: GridRoot,\n Item: GridItem,\n};\n"],"names":[],"mappings":";;;;;;;;AAyBA,MAAM,QAAA,GAAW,UAAA,CAAsC,CAAC,KAAA,EAAO,GAAA,KAAQ;AACrE,EAAA,MAAM,QAAA,GAAW;AAAA,IACf,GAAG,WAAA;AAAA,IACH,GAAG,YAAA;AAAA,IACH,GAAG;AAAA,GACL;AAEA,EAAA,MAAM,EAAE,UAAA,EAAW,GAAI,SAAA,CAAU,MAAM,CAAA;AAEvC,EAAA,MAAM,EAAE,SAAA,EAAW,KAAA,EAAM,GAAI,YAAA,CAAa,OAAO,QAAQ,CAAA;AAEzD,EAAA,OAAO,cAAc,KAAA,EAAO;AAAA,IAC1B,GAAA;AAAA,IACA,SAAA,EAAW,IAAA,CAAK,UAAA,CAAW,IAAA,EAAM,SAAS,CAAA;AAAA,IAC1C,KAAA;AAAA,IACA,UAAU,KAAA,CAAM;AAAA,GACjB,CAAA;AACH,CAAC,CAAA;AAED,MAAM,QAAA,GAAW,UAAA,CAA0C,CAAC,KAAA,EAAO,GAAA,KAAQ;AACzE,EAAA,MAAM,QAAA,GAAW;AAAA,IACf,GAAG;AAAA,GACL;AAEA,EAAA,MAAM,EAAE,UAAA,EAAW,GAAI,SAAA,CAAU,MAAM,CAAA;AACvC,EAAA,MAAM,EAAE,SAAA,EAAW,KAAA,EAAM,GAAI,YAAA,CAAa,OAAO,QAAQ,CAAA;AAEzD,EAAA,OAAO,cAAc,KAAA,EAAO;AAAA,IAC1B,GAAA;AAAA,IACA,SAAA,EAAW,IAAA,CAAK,UAAA,CAAW,IAAA,EAAM,SAAS,CAAA;AAAA,IAC1C,KAAA;AAAA,IACA,UAAU,KAAA,CAAM;AAAA,GACjB,CAAA;AACH,CAAC,CAAA;AAGM,MAAM,IAAA,GAAO;AAAA,EAClB,IAAA,EAAM,QAAA;AAAA,EACN,IAAA,EAAM;AACR;;;;"}
1
+ {"version":3,"file":"Grid.esm.js","sources":["../../../src/components/Grid/Grid.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 } from 'react';\nimport clsx from 'clsx';\nimport type { GridItemProps, GridProps } from './types';\nimport { useStyles } from '../../hooks/useStyles';\nimport styles from './Grid.module.css';\n\nconst GridRoot = forwardRef<HTMLDivElement, GridProps>((props, ref) => {\n const { classNames, utilityClasses, style, cleanedProps } = useStyles(\n 'Grid',\n { columns: 'auto', gap: '4', ...props },\n );\n\n const { className, ...rest } = cleanedProps;\n\n return (\n <div\n ref={ref}\n className={clsx(\n classNames.root,\n utilityClasses,\n styles[classNames.root],\n className,\n )}\n style={style}\n {...rest}\n />\n );\n});\n\nconst GridItem = forwardRef<HTMLDivElement, GridItemProps>((props, ref) => {\n const { classNames, utilityClasses, style, cleanedProps } = useStyles(\n 'GridItem',\n props,\n );\n\n const { className, ...rest } = cleanedProps;\n\n return (\n <div\n ref={ref}\n className={clsx(\n classNames.root,\n utilityClasses,\n styles[classNames.root],\n className,\n )}\n style={style}\n {...rest}\n />\n );\n});\n\n/** @public */\nexport const Grid = {\n Root: GridRoot,\n Item: GridItem,\n};\n"],"names":[],"mappings":";;;;;;AAsBA,MAAM,QAAA,GAAW,UAAA,CAAsC,CAAC,KAAA,EAAO,GAAA,KAAQ;AACrE,EAAA,MAAM,EAAE,UAAA,EAAY,cAAA,EAAgB,KAAA,EAAO,cAAa,GAAI,SAAA;AAAA,IAC1D,MAAA;AAAA,IACA,EAAE,OAAA,EAAS,MAAA,EAAQ,GAAA,EAAK,GAAA,EAAK,GAAG,KAAA;AAAM,GACxC;AAEA,EAAA,MAAM,EAAE,SAAA,EAAW,GAAG,IAAA,EAAK,GAAI,YAAA;AAE/B,EAAA,uBACE,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,GAAA;AAAA,MACA,SAAA,EAAW,IAAA;AAAA,QACT,UAAA,CAAW,IAAA;AAAA,QACX,cAAA;AAAA,QACA,MAAA,CAAO,WAAW,IAAI,CAAA;AAAA,QACtB;AAAA,OACF;AAAA,MACA,KAAA;AAAA,MACC,GAAG;AAAA;AAAA,GACN;AAEJ,CAAC,CAAA;AAED,MAAM,QAAA,GAAW,UAAA,CAA0C,CAAC,KAAA,EAAO,GAAA,KAAQ;AACzE,EAAA,MAAM,EAAE,UAAA,EAAY,cAAA,EAAgB,KAAA,EAAO,cAAa,GAAI,SAAA;AAAA,IAC1D,UAAA;AAAA,IACA;AAAA,GACF;AAEA,EAAA,MAAM,EAAE,SAAA,EAAW,GAAG,IAAA,EAAK,GAAI,YAAA;AAE/B,EAAA,uBACE,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,GAAA;AAAA,MACA,SAAA,EAAW,IAAA;AAAA,QACT,UAAA,CAAW,IAAA;AAAA,QACX,cAAA;AAAA,QACA,MAAA,CAAO,WAAW,IAAI,CAAA;AAAA,QACtB;AAAA,OACF;AAAA,MACA,KAAA;AAAA,MACC,GAAG;AAAA;AAAA,GACN;AAEJ,CAAC,CAAA;AAGM,MAAM,IAAA,GAAO;AAAA,EAClB,IAAA,EAAM,QAAA;AAAA,EACN,IAAA,EAAM;AACR;;;;"}
@@ -0,0 +1,8 @@
1
+ import styleInject from '../../node_modules_dist/style-inject/dist/style-inject.es.esm.js';
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 components {\n .Grid-module_bui-Grid__3vX0y {\n display: grid;\n }\n}\n";
4
+ var styles = {"bui-Grid":"Grid-module_bui-Grid__3vX0y"};
5
+ styleInject(css_248z);
6
+
7
+ export { styles as default };
8
+ //# sourceMappingURL=Grid.module.css.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Grid.module.css.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -2,10 +2,12 @@ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
2
2
  import { HeaderToolbar } from './HeaderToolbar.esm.js';
3
3
  import { Tabs, TabList, Tab } from '../Tabs/Tabs.esm.js';
4
4
  import { useStyles } from '../../hooks/useStyles.esm.js';
5
+ import styles from './Header.module.css.esm.js';
6
+ import clsx from 'clsx';
5
7
 
6
8
  const Header = (props) => {
7
- const { tabs, icon, title, titleLink, customActions, onTabSelectionChange } = props;
8
- const { classNames } = useStyles("Header");
9
+ const { classNames, cleanedProps } = useStyles("Header", props);
10
+ const { tabs, icon, title, titleLink, customActions, onTabSelectionChange } = cleanedProps;
9
11
  const hasTabs = tabs && tabs.length > 0;
10
12
  return /* @__PURE__ */ jsxs(Fragment, { children: [
11
13
  /* @__PURE__ */ jsx(
@@ -18,16 +20,25 @@ const Header = (props) => {
18
20
  hasTabs
19
21
  }
20
22
  ),
21
- tabs && /* @__PURE__ */ jsx("div", { className: classNames.tabsWrapper, children: /* @__PURE__ */ jsx(Tabs, { onSelectionChange: onTabSelectionChange, children: /* @__PURE__ */ jsx(TabList, { children: tabs?.map((tab) => /* @__PURE__ */ jsx(
22
- Tab,
23
+ tabs && /* @__PURE__ */ jsx(
24
+ "div",
23
25
  {
24
- id: tab.id,
25
- href: tab.href,
26
- matchStrategy: tab.matchStrategy,
27
- children: tab.label
28
- },
29
- tab.id
30
- )) }) }) })
26
+ className: clsx(
27
+ classNames.tabsWrapper,
28
+ styles[classNames.tabsWrapper]
29
+ ),
30
+ children: /* @__PURE__ */ jsx(Tabs, { onSelectionChange: onTabSelectionChange, children: /* @__PURE__ */ jsx(TabList, { children: tabs?.map((tab) => /* @__PURE__ */ jsx(
31
+ Tab,
32
+ {
33
+ id: tab.id,
34
+ href: tab.href,
35
+ matchStrategy: tab.matchStrategy,
36
+ children: tab.label
37
+ },
38
+ tab.id
39
+ )) }) })
40
+ }
41
+ )
31
42
  ] });
32
43
  };
33
44
 
@@ -1 +1 @@
1
- {"version":3,"file":"Header.esm.js","sources":["../../../src/components/Header/Header.tsx"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { HeaderProps } from './types';\nimport { HeaderToolbar } from './HeaderToolbar';\nimport { Tabs, TabList, Tab } from '../Tabs';\nimport { useStyles } from '../../hooks/useStyles';\nimport { type NavigateOptions } from 'react-router-dom';\n\ndeclare module 'react-aria-components' {\n interface RouterConfig {\n routerOptions: NavigateOptions;\n }\n}\n\n/**\n * A component that renders a toolbar.\n *\n * @public\n */\nexport const Header = (props: HeaderProps) => {\n const { tabs, icon, title, titleLink, customActions, onTabSelectionChange } =\n props;\n\n const { classNames } = useStyles('Header');\n\n const hasTabs = tabs && tabs.length > 0;\n\n return (\n <>\n <HeaderToolbar\n icon={icon}\n title={title}\n titleLink={titleLink}\n customActions={customActions}\n hasTabs={hasTabs}\n />\n {tabs && (\n <div className={classNames.tabsWrapper}>\n <Tabs onSelectionChange={onTabSelectionChange}>\n <TabList>\n {tabs?.map(tab => (\n <Tab\n key={tab.id}\n id={tab.id}\n href={tab.href}\n matchStrategy={tab.matchStrategy}\n >\n {tab.label}\n </Tab>\n ))}\n </TabList>\n </Tabs>\n </div>\n )}\n </>\n );\n};\n"],"names":[],"mappings":";;;;;AAiCO,MAAM,MAAA,GAAS,CAAC,KAAA,KAAuB;AAC5C,EAAA,MAAM,EAAE,IAAA,EAAM,IAAA,EAAM,OAAO,SAAA,EAAW,aAAA,EAAe,sBAAqB,GACxE,KAAA;AAEF,EAAA,MAAM,EAAE,UAAA,EAAW,GAAI,SAAA,CAAU,QAAQ,CAAA;AAEzC,EAAA,MAAM,OAAA,GAAU,IAAA,IAAQ,IAAA,CAAK,MAAA,GAAS,CAAA;AAEtC,EAAA,uBACE,IAAA,CAAA,QAAA,EAAA,EACE,QAAA,EAAA;AAAA,oBAAA,GAAA;AAAA,MAAC,aAAA;AAAA,MAAA;AAAA,QACC,IAAA;AAAA,QACA,KAAA;AAAA,QACA,SAAA;AAAA,QACA,aAAA;AAAA,QACA;AAAA;AAAA,KACF;AAAA,IACC,IAAA,oBACC,GAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,WAAW,WAAA,EACzB,QAAA,kBAAA,GAAA,CAAC,IAAA,EAAA,EAAK,iBAAA,EAAmB,oBAAA,EACvB,QAAA,kBAAA,GAAA,CAAC,OAAA,EAAA,EACE,QAAA,EAAA,IAAA,EAAM,IAAI,CAAA,GAAA,qBACT,GAAA;AAAA,MAAC,GAAA;AAAA,MAAA;AAAA,QAEC,IAAI,GAAA,CAAI,EAAA;AAAA,QACR,MAAM,GAAA,CAAI,IAAA;AAAA,QACV,eAAe,GAAA,CAAI,aAAA;AAAA,QAElB,QAAA,EAAA,GAAA,CAAI;AAAA,OAAA;AAAA,MALA,GAAA,CAAI;AAAA,KAOZ,CAAA,EACH,CAAA,EACF,CAAA,EACF;AAAA,GAAA,EAEJ,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"Header.esm.js","sources":["../../../src/components/Header/Header.tsx"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { HeaderProps } from './types';\nimport { HeaderToolbar } from './HeaderToolbar';\nimport { Tabs, TabList, Tab } from '../Tabs';\nimport { useStyles } from '../../hooks/useStyles';\nimport { type NavigateOptions } from 'react-router-dom';\nimport styles from './Header.module.css';\nimport clsx from 'clsx';\n\ndeclare module 'react-aria-components' {\n interface RouterConfig {\n routerOptions: NavigateOptions;\n }\n}\n\n/**\n * A component that renders a toolbar.\n *\n * @public\n */\nexport const Header = (props: HeaderProps) => {\n const { classNames, cleanedProps } = useStyles('Header', props);\n const { tabs, icon, title, titleLink, customActions, onTabSelectionChange } =\n cleanedProps;\n\n const hasTabs = tabs && tabs.length > 0;\n\n return (\n <>\n <HeaderToolbar\n icon={icon}\n title={title}\n titleLink={titleLink}\n customActions={customActions}\n hasTabs={hasTabs}\n />\n {tabs && (\n <div\n className={clsx(\n classNames.tabsWrapper,\n styles[classNames.tabsWrapper],\n )}\n >\n <Tabs onSelectionChange={onTabSelectionChange}>\n <TabList>\n {tabs?.map(tab => (\n <Tab\n key={tab.id}\n id={tab.id}\n href={tab.href}\n matchStrategy={tab.matchStrategy}\n >\n {tab.label}\n </Tab>\n ))}\n </TabList>\n </Tabs>\n </div>\n )}\n </>\n );\n};\n"],"names":[],"mappings":";;;;;;;AAmCO,MAAM,MAAA,GAAS,CAAC,KAAA,KAAuB;AAC5C,EAAA,MAAM,EAAE,UAAA,EAAY,YAAA,EAAa,GAAI,SAAA,CAAU,UAAU,KAAK,CAAA;AAC9D,EAAA,MAAM,EAAE,IAAA,EAAM,IAAA,EAAM,OAAO,SAAA,EAAW,aAAA,EAAe,sBAAqB,GACxE,YAAA;AAEF,EAAA,MAAM,OAAA,GAAU,IAAA,IAAQ,IAAA,CAAK,MAAA,GAAS,CAAA;AAEtC,EAAA,uBACE,IAAA,CAAA,QAAA,EAAA,EACE,QAAA,EAAA;AAAA,oBAAA,GAAA;AAAA,MAAC,aAAA;AAAA,MAAA;AAAA,QACC,IAAA;AAAA,QACA,KAAA;AAAA,QACA,SAAA;AAAA,QACA,aAAA;AAAA,QACA;AAAA;AAAA,KACF;AAAA,IACC,IAAA,oBACC,GAAA;AAAA,MAAC,KAAA;AAAA,MAAA;AAAA,QACC,SAAA,EAAW,IAAA;AAAA,UACT,UAAA,CAAW,WAAA;AAAA,UACX,MAAA,CAAO,WAAW,WAAW;AAAA,SAC/B;AAAA,QAEA,QAAA,kBAAA,GAAA,CAAC,QAAK,iBAAA,EAAmB,oBAAA,EACvB,8BAAC,OAAA,EAAA,EACE,QAAA,EAAA,IAAA,EAAM,IAAI,CAAA,GAAA,qBACT,GAAA;AAAA,UAAC,GAAA;AAAA,UAAA;AAAA,YAEC,IAAI,GAAA,CAAI,EAAA;AAAA,YACR,MAAM,GAAA,CAAI,IAAA;AAAA,YACV,eAAe,GAAA,CAAI,aAAA;AAAA,YAElB,QAAA,EAAA,GAAA,CAAI;AAAA,WAAA;AAAA,UALA,GAAA,CAAI;AAAA,SAOZ,GACH,CAAA,EACF;AAAA;AAAA;AACF,GAAA,EAEJ,CAAA;AAEJ;;;;"}
@@ -0,0 +1,8 @@
1
+ import styleInject from '../../node_modules_dist/style-inject/dist/style-inject.es.esm.js';
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 components {\n .Header-module_bui-HeaderToolbar__1HcPN {\n margin-bottom: var(--bui-space-6);\n\n &::before {\n content: '';\n position: absolute;\n top: 0;\n left: 0px;\n right: 0px;\n height: 16px;\n background-color: var(--bui-bg);\n z-index: 0;\n }\n\n &[data-has-tabs='true'] {\n margin-bottom: 0;\n }\n }\n\n .Header-module_bui-HeaderToolbarWrapper__1WJwf {\n position: relative;\n z-index: 1;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n background-color: var(--bui-bg-surface-1);\n padding-inline: var(--bui-space-5);\n border-bottom: 1px solid var(--bui-border);\n color: var(--bui-fg-primary);\n height: 52px;\n }\n\n .Header-module_bui-HeaderToolbarContent__8b9nS {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: var(--bui-space-2);\n }\n\n .Header-module_bui-HeaderToolbarName__2E-_b {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: var(--bui-space-2);\n font-size: var(--bui-font-size-3);\n font-weight: var(--bui-font-weight-regular);\n flex-shrink: 0;\n }\n\n .Header-module_bui-HeaderToolbarIcon__1JjN5 {\n width: 16px;\n height: 16px;\n color: var(--bui-fg-primary);\n\n & svg {\n width: 100%;\n height: 100%;\n }\n }\n\n .Header-module_bui-HeaderToolbarControls__1EtQC {\n position: absolute;\n right: var(--bui-space-5);\n top: 50%;\n transform: translateY(-50%);\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: var(--bui-space-2);\n }\n\n .Header-module_bui-HeaderTabsWrapper__19BXF {\n margin-bottom: var(--bui-space-4);\n padding-inline: var(--bui-space-3);\n border-bottom: 1px solid var(--bui-border);\n background-color: var(--bui-bg-surface-1);\n }\n}\n";
4
+ var styles = {"bui-HeaderToolbar":"Header-module_bui-HeaderToolbar__1HcPN","bui-HeaderToolbarWrapper":"Header-module_bui-HeaderToolbarWrapper__1WJwf","bui-HeaderToolbarContent":"Header-module_bui-HeaderToolbarContent__8b9nS","bui-HeaderToolbarName":"Header-module_bui-HeaderToolbarName__2E-_b","bui-HeaderToolbarIcon":"Header-module_bui-HeaderToolbarIcon__1JjN5","bui-HeaderToolbarControls":"Header-module_bui-HeaderToolbarControls__1EtQC","bui-HeaderTabsWrapper":"Header-module_bui-HeaderTabsWrapper__19BXF"};
5
+ styleInject(css_248z);
6
+
7
+ export { styles as default };
8
+ //# sourceMappingURL=Header.module.css.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Header.module.css.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -5,22 +5,86 @@ import { useRef } from 'react';
5
5
  import { RiShapesLine } from '@remixicon/react';
6
6
  import { Text } from '../Text/Text.esm.js';
7
7
  import { useNavigate, useHref } from 'react-router-dom';
8
+ import styles from './Header.module.css.esm.js';
9
+ import clsx from 'clsx';
8
10
 
9
11
  const HeaderToolbar = (props) => {
10
- const { icon, title, titleLink, customActions, hasTabs } = props;
11
- const { classNames } = useStyles("Header");
12
+ const { classNames, cleanedProps } = useStyles("Header", props);
13
+ const { icon, title, titleLink, customActions, hasTabs } = cleanedProps;
12
14
  let navigate = useNavigate();
13
15
  const toolbarWrapperRef = useRef(null);
14
16
  const toolbarContentRef = useRef(null);
15
17
  const toolbarControlsRef = useRef(null);
16
18
  const titleContent = /* @__PURE__ */ jsxs(Fragment, { children: [
17
- /* @__PURE__ */ jsx("div", { className: classNames.toolbarIcon, children: icon || /* @__PURE__ */ jsx(RiShapesLine, {}) }),
19
+ /* @__PURE__ */ jsx(
20
+ "div",
21
+ {
22
+ className: clsx(classNames.toolbarIcon, styles[classNames.toolbarIcon]),
23
+ children: icon || /* @__PURE__ */ jsx(RiShapesLine, {})
24
+ }
25
+ ),
18
26
  /* @__PURE__ */ jsx(Text, { variant: "body-medium", children: title || "Your plugin" })
19
27
  ] });
20
- return /* @__PURE__ */ jsx(RouterProvider, { navigate, useHref, children: /* @__PURE__ */ jsx("div", { className: classNames.toolbar, "data-has-tabs": hasTabs, children: /* @__PURE__ */ jsxs("div", { className: classNames.toolbarWrapper, ref: toolbarWrapperRef, children: [
21
- /* @__PURE__ */ jsx("div", { className: classNames.toolbarContent, ref: toolbarContentRef, children: /* @__PURE__ */ jsx(Text, { as: "h1", variant: "body-medium", children: titleLink ? /* @__PURE__ */ jsx(Link, { className: classNames.toolbarName, href: titleLink, children: titleContent }) : /* @__PURE__ */ jsx("div", { className: classNames.toolbarName, children: titleContent }) }) }),
22
- /* @__PURE__ */ jsx("div", { className: classNames.toolbarControls, ref: toolbarControlsRef, children: customActions })
23
- ] }) }) });
28
+ return /* @__PURE__ */ jsx(RouterProvider, { navigate, useHref, children: /* @__PURE__ */ jsx(
29
+ "div",
30
+ {
31
+ className: clsx(classNames.toolbar, styles[classNames.toolbar]),
32
+ "data-has-tabs": hasTabs,
33
+ children: /* @__PURE__ */ jsxs(
34
+ "div",
35
+ {
36
+ className: clsx(
37
+ classNames.toolbarWrapper,
38
+ styles[classNames.toolbarWrapper]
39
+ ),
40
+ ref: toolbarWrapperRef,
41
+ children: [
42
+ /* @__PURE__ */ jsx(
43
+ "div",
44
+ {
45
+ className: clsx(
46
+ classNames.toolbarContent,
47
+ styles[classNames.toolbarContent]
48
+ ),
49
+ ref: toolbarContentRef,
50
+ children: /* @__PURE__ */ jsx(Text, { as: "h1", variant: "body-medium", children: titleLink ? /* @__PURE__ */ jsx(
51
+ Link,
52
+ {
53
+ className: clsx(
54
+ classNames.toolbarName,
55
+ styles[classNames.toolbarName]
56
+ ),
57
+ href: titleLink,
58
+ children: titleContent
59
+ }
60
+ ) : /* @__PURE__ */ jsx(
61
+ "div",
62
+ {
63
+ className: clsx(
64
+ classNames.toolbarName,
65
+ styles[classNames.toolbarName]
66
+ ),
67
+ children: titleContent
68
+ }
69
+ ) })
70
+ }
71
+ ),
72
+ /* @__PURE__ */ jsx(
73
+ "div",
74
+ {
75
+ className: clsx(
76
+ classNames.toolbarControls,
77
+ styles[classNames.toolbarControls]
78
+ ),
79
+ ref: toolbarControlsRef,
80
+ children: customActions
81
+ }
82
+ )
83
+ ]
84
+ }
85
+ )
86
+ }
87
+ ) });
24
88
  };
25
89
 
26
90
  export { HeaderToolbar };
@@ -1 +1 @@
1
- {"version":3,"file":"HeaderToolbar.esm.js","sources":["../../../src/components/Header/HeaderToolbar.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 { Link, RouterProvider } from 'react-aria-components';\nimport { useStyles } from '../../hooks/useStyles';\nimport { useRef } from 'react';\nimport { RiShapesLine } from '@remixicon/react';\nimport type { HeaderToolbarProps } from './types';\nimport { Text } from '../Text';\nimport { useNavigate, useHref } from 'react-router-dom';\n\n/**\n * A component that renders a toolbar.\n *\n * @internal\n */\nexport const HeaderToolbar = (props: HeaderToolbarProps) => {\n const { icon, title, titleLink, customActions, hasTabs } = props;\n const { classNames } = useStyles('Header');\n let navigate = useNavigate();\n\n // Refs for collision detection\n const toolbarWrapperRef = useRef<HTMLDivElement>(null);\n const toolbarContentRef = useRef<HTMLDivElement>(null);\n const toolbarControlsRef = useRef<HTMLDivElement>(null);\n\n const titleContent = (\n <>\n <div className={classNames.toolbarIcon}>{icon || <RiShapesLine />}</div>\n <Text variant=\"body-medium\">{title || 'Your plugin'}</Text>\n </>\n );\n\n return (\n <RouterProvider navigate={navigate} useHref={useHref}>\n <div className={classNames.toolbar} data-has-tabs={hasTabs}>\n <div className={classNames.toolbarWrapper} ref={toolbarWrapperRef}>\n <div className={classNames.toolbarContent} ref={toolbarContentRef}>\n <Text as=\"h1\" variant=\"body-medium\">\n {titleLink ? (\n <Link className={classNames.toolbarName} href={titleLink}>\n {titleContent}\n </Link>\n ) : (\n <div className={classNames.toolbarName}>{titleContent}</div>\n )}\n </Text>\n </div>\n <div className={classNames.toolbarControls} ref={toolbarControlsRef}>\n {customActions}\n </div>\n </div>\n </div>\n </RouterProvider>\n );\n};\n"],"names":[],"mappings":";;;;;;;;AA6BO,MAAM,aAAA,GAAgB,CAAC,KAAA,KAA8B;AAC1D,EAAA,MAAM,EAAE,IAAA,EAAM,KAAA,EAAO,SAAA,EAAW,aAAA,EAAe,SAAQ,GAAI,KAAA;AAC3D,EAAA,MAAM,EAAE,UAAA,EAAW,GAAI,SAAA,CAAU,QAAQ,CAAA;AACzC,EAAA,IAAI,WAAW,WAAA,EAAY;AAG3B,EAAA,MAAM,iBAAA,GAAoB,OAAuB,IAAI,CAAA;AACrD,EAAA,MAAM,iBAAA,GAAoB,OAAuB,IAAI,CAAA;AACrD,EAAA,MAAM,kBAAA,GAAqB,OAAuB,IAAI,CAAA;AAEtD,EAAA,MAAM,+BACJ,IAAA,CAAA,QAAA,EAAA,EACE,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,SAAI,SAAA,EAAW,UAAA,CAAW,aAAc,QAAA,EAAA,IAAA,oBAAQ,GAAA,CAAC,gBAAa,CAAA,EAAG,CAAA;AAAA,oBAClE,GAAA,CAAC,IAAA,EAAA,EAAK,OAAA,EAAQ,aAAA,EAAe,mBAAS,aAAA,EAAc;AAAA,GAAA,EACtD,CAAA;AAGF,EAAA,2BACG,cAAA,EAAA,EAAe,QAAA,EAAoB,OAAA,EAClC,QAAA,kBAAA,GAAA,CAAC,SAAI,SAAA,EAAW,UAAA,CAAW,OAAA,EAAS,eAAA,EAAe,SACjD,QAAA,kBAAA,IAAA,CAAC,KAAA,EAAA,EAAI,WAAW,UAAA,CAAW,cAAA,EAAgB,KAAK,iBAAA,EAC9C,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,UAAA,CAAW,cAAA,EAAgB,GAAA,EAAK,iBAAA,EAC9C,QAAA,kBAAA,GAAA,CAAC,IAAA,EAAA,EAAK,EAAA,EAAG,IAAA,EAAK,OAAA,EAAQ,aAAA,EACnB,QAAA,EAAA,SAAA,mBACC,GAAA,CAAC,IAAA,EAAA,EAAK,SAAA,EAAW,UAAA,CAAW,WAAA,EAAa,IAAA,EAAM,SAAA,EAC5C,QAAA,EAAA,YAAA,EACH,CAAA,mBAEA,GAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,UAAA,CAAW,WAAA,EAAc,QAAA,EAAA,YAAA,EAAa,GAE1D,CAAA,EACF,CAAA;AAAA,wBACC,KAAA,EAAA,EAAI,SAAA,EAAW,WAAW,eAAA,EAAiB,GAAA,EAAK,oBAC9C,QAAA,EAAA,aAAA,EACH;AAAA,GAAA,EACF,GACF,CAAA,EACF,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"HeaderToolbar.esm.js","sources":["../../../src/components/Header/HeaderToolbar.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 { Link, RouterProvider } from 'react-aria-components';\nimport { useStyles } from '../../hooks/useStyles';\nimport { useRef } from 'react';\nimport { RiShapesLine } from '@remixicon/react';\nimport type { HeaderToolbarProps } from './types';\nimport { Text } from '../Text';\nimport { useNavigate, useHref } from 'react-router-dom';\nimport styles from './Header.module.css';\nimport clsx from 'clsx';\n\n/**\n * A component that renders a toolbar.\n *\n * @internal\n */\nexport const HeaderToolbar = (props: HeaderToolbarProps) => {\n const { classNames, cleanedProps } = useStyles('Header', props);\n const { icon, title, titleLink, customActions, hasTabs } = cleanedProps;\n let navigate = useNavigate();\n\n // Refs for collision detection\n const toolbarWrapperRef = useRef<HTMLDivElement>(null);\n const toolbarContentRef = useRef<HTMLDivElement>(null);\n const toolbarControlsRef = useRef<HTMLDivElement>(null);\n\n const titleContent = (\n <>\n <div\n className={clsx(classNames.toolbarIcon, styles[classNames.toolbarIcon])}\n >\n {icon || <RiShapesLine />}\n </div>\n <Text variant=\"body-medium\">{title || 'Your plugin'}</Text>\n </>\n );\n\n return (\n <RouterProvider navigate={navigate} useHref={useHref}>\n <div\n className={clsx(classNames.toolbar, styles[classNames.toolbar])}\n data-has-tabs={hasTabs}\n >\n <div\n className={clsx(\n classNames.toolbarWrapper,\n styles[classNames.toolbarWrapper],\n )}\n ref={toolbarWrapperRef}\n >\n <div\n className={clsx(\n classNames.toolbarContent,\n styles[classNames.toolbarContent],\n )}\n ref={toolbarContentRef}\n >\n <Text as=\"h1\" variant=\"body-medium\">\n {titleLink ? (\n <Link\n className={clsx(\n classNames.toolbarName,\n styles[classNames.toolbarName],\n )}\n href={titleLink}\n >\n {titleContent}\n </Link>\n ) : (\n <div\n className={clsx(\n classNames.toolbarName,\n styles[classNames.toolbarName],\n )}\n >\n {titleContent}\n </div>\n )}\n </Text>\n </div>\n <div\n className={clsx(\n classNames.toolbarControls,\n styles[classNames.toolbarControls],\n )}\n ref={toolbarControlsRef}\n >\n {customActions}\n </div>\n </div>\n </div>\n </RouterProvider>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;AA+BO,MAAM,aAAA,GAAgB,CAAC,KAAA,KAA8B;AAC1D,EAAA,MAAM,EAAE,UAAA,EAAY,YAAA,EAAa,GAAI,SAAA,CAAU,UAAU,KAAK,CAAA;AAC9D,EAAA,MAAM,EAAE,IAAA,EAAM,KAAA,EAAO,SAAA,EAAW,aAAA,EAAe,SAAQ,GAAI,YAAA;AAC3D,EAAA,IAAI,WAAW,WAAA,EAAY;AAG3B,EAAA,MAAM,iBAAA,GAAoB,OAAuB,IAAI,CAAA;AACrD,EAAA,MAAM,iBAAA,GAAoB,OAAuB,IAAI,CAAA;AACrD,EAAA,MAAM,kBAAA,GAAqB,OAAuB,IAAI,CAAA;AAEtD,EAAA,MAAM,+BACJ,IAAA,CAAA,QAAA,EAAA,EACE,QAAA,EAAA;AAAA,oBAAA,GAAA;AAAA,MAAC,KAAA;AAAA,MAAA;AAAA,QACC,WAAW,IAAA,CAAK,UAAA,CAAW,aAAa,MAAA,CAAO,UAAA,CAAW,WAAW,CAAC,CAAA;AAAA,QAErE,QAAA,EAAA,IAAA,wBAAS,YAAA,EAAA,EAAa;AAAA;AAAA,KACzB;AAAA,oBACA,GAAA,CAAC,IAAA,EAAA,EAAK,OAAA,EAAQ,aAAA,EAAe,mBAAS,aAAA,EAAc;AAAA,GAAA,EACtD,CAAA;AAGF,EAAA,uBACE,GAAA,CAAC,cAAA,EAAA,EAAe,QAAA,EAAoB,OAAA,EAClC,QAAA,kBAAA,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,WAAW,IAAA,CAAK,UAAA,CAAW,SAAS,MAAA,CAAO,UAAA,CAAW,OAAO,CAAC,CAAA;AAAA,MAC9D,eAAA,EAAe,OAAA;AAAA,MAEf,QAAA,kBAAA,IAAA;AAAA,QAAC,KAAA;AAAA,QAAA;AAAA,UACC,SAAA,EAAW,IAAA;AAAA,YACT,UAAA,CAAW,cAAA;AAAA,YACX,MAAA,CAAO,WAAW,cAAc;AAAA,WAClC;AAAA,UACA,GAAA,EAAK,iBAAA;AAAA,UAEL,QAAA,EAAA;AAAA,4BAAA,GAAA;AAAA,cAAC,KAAA;AAAA,cAAA;AAAA,gBACC,SAAA,EAAW,IAAA;AAAA,kBACT,UAAA,CAAW,cAAA;AAAA,kBACX,MAAA,CAAO,WAAW,cAAc;AAAA,iBAClC;AAAA,gBACA,GAAA,EAAK,iBAAA;AAAA,gBAEL,8BAAC,IAAA,EAAA,EAAK,EAAA,EAAG,IAAA,EAAK,OAAA,EAAQ,eACnB,QAAA,EAAA,SAAA,mBACC,GAAA;AAAA,kBAAC,IAAA;AAAA,kBAAA;AAAA,oBACC,SAAA,EAAW,IAAA;AAAA,sBACT,UAAA,CAAW,WAAA;AAAA,sBACX,MAAA,CAAO,WAAW,WAAW;AAAA,qBAC/B;AAAA,oBACA,IAAA,EAAM,SAAA;AAAA,oBAEL,QAAA,EAAA;AAAA;AAAA,iBACH,mBAEA,GAAA;AAAA,kBAAC,KAAA;AAAA,kBAAA;AAAA,oBACC,SAAA,EAAW,IAAA;AAAA,sBACT,UAAA,CAAW,WAAA;AAAA,sBACX,MAAA,CAAO,WAAW,WAAW;AAAA,qBAC/B;AAAA,oBAEC,QAAA,EAAA;AAAA;AAAA,iBACH,EAEJ;AAAA;AAAA,aACF;AAAA,4BACA,GAAA;AAAA,cAAC,KAAA;AAAA,cAAA;AAAA,gBACC,SAAA,EAAW,IAAA;AAAA,kBACT,UAAA,CAAW,eAAA;AAAA,kBACX,MAAA,CAAO,WAAW,eAAe;AAAA,iBACnC;AAAA,gBACA,GAAA,EAAK,kBAAA;AAAA,gBAEJ,QAAA,EAAA;AAAA;AAAA;AACH;AAAA;AAAA;AACF;AAAA,GACF,EACF,CAAA;AAEJ;;;;"}
@@ -5,42 +5,62 @@ import { Tabs, TabList, Tab } from '../Tabs/Tabs.esm.js';
5
5
  import { useStyles } from '../../hooks/useStyles.esm.js';
6
6
  import { Container } from '../Container/Container.esm.js';
7
7
  import { Link } from '../Link/Link.esm.js';
8
+ import styles from './HeaderPage.module.css.esm.js';
9
+ import clsx from 'clsx';
8
10
 
9
11
  const HeaderPage = (props) => {
10
- const { title, tabs, customActions, breadcrumbs } = props;
11
- const { classNames } = useStyles("HeaderPage");
12
- return /* @__PURE__ */ jsxs(Container, { className: classNames.root, children: [
13
- /* @__PURE__ */ jsxs("div", { className: classNames.content, children: [
14
- /* @__PURE__ */ jsxs("div", { className: classNames.breadcrumbs, children: [
15
- breadcrumbs && breadcrumbs.map((breadcrumb) => /* @__PURE__ */ jsxs(Fragment, { children: [
16
- /* @__PURE__ */ jsx(
17
- Link,
18
- {
19
- href: breadcrumb.href,
20
- variant: "title-small",
21
- weight: "bold",
22
- color: "secondary",
23
- truncate: true,
24
- style: { maxWidth: "240px" },
25
- children: breadcrumb.label
26
- }
12
+ const { classNames, cleanedProps } = useStyles("HeaderPage", props);
13
+ const { title, tabs, customActions, breadcrumbs } = cleanedProps;
14
+ return /* @__PURE__ */ jsxs(Container, { className: clsx(classNames.root, styles[classNames.root]), children: [
15
+ /* @__PURE__ */ jsxs("div", { className: clsx(classNames.content, styles[classNames.content]), children: [
16
+ /* @__PURE__ */ jsxs(
17
+ "div",
18
+ {
19
+ className: clsx(
20
+ classNames.breadcrumbs,
21
+ styles[classNames.breadcrumbs]
27
22
  ),
28
- /* @__PURE__ */ jsx(RiArrowRightSLine, { size: 16, color: "var(--bui-fg-secondary)" })
29
- ] }, breadcrumb.label)),
30
- /* @__PURE__ */ jsx(Text, { variant: "title-small", weight: "bold", as: "h2", children: title })
31
- ] }),
32
- /* @__PURE__ */ jsx("div", { className: classNames.controls, children: customActions })
23
+ children: [
24
+ breadcrumbs && breadcrumbs.map((breadcrumb) => /* @__PURE__ */ jsxs(Fragment, { children: [
25
+ /* @__PURE__ */ jsx(
26
+ Link,
27
+ {
28
+ href: breadcrumb.href,
29
+ variant: "title-small",
30
+ weight: "bold",
31
+ color: "secondary",
32
+ truncate: true,
33
+ style: { maxWidth: "240px" },
34
+ children: breadcrumb.label
35
+ }
36
+ ),
37
+ /* @__PURE__ */ jsx(RiArrowRightSLine, { size: 16, color: "var(--bui-fg-secondary)" })
38
+ ] }, breadcrumb.label)),
39
+ /* @__PURE__ */ jsx(Text, { variant: "title-small", weight: "bold", as: "h2", children: title })
40
+ ]
41
+ }
42
+ ),
43
+ /* @__PURE__ */ jsx("div", { className: clsx(classNames.controls, styles[classNames.controls]), children: customActions })
33
44
  ] }),
34
- tabs && /* @__PURE__ */ jsx("div", { className: classNames.tabsWrapper, children: /* @__PURE__ */ jsx(Tabs, { children: /* @__PURE__ */ jsx(TabList, { children: tabs.map((tab) => /* @__PURE__ */ jsx(
35
- Tab,
45
+ tabs && /* @__PURE__ */ jsx(
46
+ "div",
36
47
  {
37
- id: tab.id,
38
- href: tab.href,
39
- matchStrategy: tab.matchStrategy,
40
- children: tab.label
41
- },
42
- tab.id
43
- )) }) }) })
48
+ className: clsx(
49
+ classNames.tabsWrapper,
50
+ styles[classNames.tabsWrapper]
51
+ ),
52
+ children: /* @__PURE__ */ jsx(Tabs, { children: /* @__PURE__ */ jsx(TabList, { children: tabs.map((tab) => /* @__PURE__ */ jsx(
53
+ Tab,
54
+ {
55
+ id: tab.id,
56
+ href: tab.href,
57
+ matchStrategy: tab.matchStrategy,
58
+ children: tab.label
59
+ },
60
+ tab.id
61
+ )) }) })
62
+ }
63
+ )
44
64
  ] });
45
65
  };
46
66
 
@@ -1 +1 @@
1
- {"version":3,"file":"HeaderPage.esm.js","sources":["../../../src/components/HeaderPage/HeaderPage.tsx"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { HeaderPageProps } from './types';\nimport { Text } from '../Text';\nimport { RiArrowRightSLine } from '@remixicon/react';\nimport { Tabs, TabList, Tab } from '../Tabs';\nimport { useStyles } from '../../hooks/useStyles';\nimport { Container } from '../Container';\nimport { Link } from '../Link';\nimport { Fragment } from 'react/jsx-runtime';\n\n/**\n * A component that renders a header page.\n *\n * @public\n */\nexport const HeaderPage = (props: HeaderPageProps) => {\n const { title, tabs, customActions, breadcrumbs } = props;\n const { classNames } = useStyles('HeaderPage');\n\n return (\n <Container className={classNames.root}>\n <div className={classNames.content}>\n <div className={classNames.breadcrumbs}>\n {breadcrumbs &&\n breadcrumbs.map(breadcrumb => (\n <Fragment key={breadcrumb.label}>\n <Link\n href={breadcrumb.href}\n variant=\"title-small\"\n weight=\"bold\"\n color=\"secondary\"\n truncate\n style={{ maxWidth: '240px' }}\n >\n {breadcrumb.label}\n </Link>\n <RiArrowRightSLine size={16} color=\"var(--bui-fg-secondary)\" />\n </Fragment>\n ))}\n <Text variant=\"title-small\" weight=\"bold\" as=\"h2\">\n {title}\n </Text>\n </div>\n <div className={classNames.controls}>{customActions}</div>\n </div>\n {tabs && (\n <div className={classNames.tabsWrapper}>\n <Tabs>\n <TabList>\n {tabs.map(tab => (\n <Tab\n key={tab.id}\n id={tab.id}\n href={tab.href}\n matchStrategy={tab.matchStrategy}\n >\n {tab.label}\n </Tab>\n ))}\n </TabList>\n </Tabs>\n </div>\n )}\n </Container>\n );\n};\n"],"names":[],"mappings":";;;;;;;;AA8BO,MAAM,UAAA,GAAa,CAAC,KAAA,KAA2B;AACpD,EAAA,MAAM,EAAE,KAAA,EAAO,IAAA,EAAM,aAAA,EAAe,aAAY,GAAI,KAAA;AACpD,EAAA,MAAM,EAAE,UAAA,EAAW,GAAI,SAAA,CAAU,YAAY,CAAA;AAE7C,EAAA,uBACE,IAAA,CAAC,SAAA,EAAA,EAAU,SAAA,EAAW,UAAA,CAAW,IAAA,EAC/B,QAAA,EAAA;AAAA,oBAAA,IAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,UAAA,CAAW,OAAA,EACzB,QAAA,EAAA;AAAA,sBAAA,IAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,UAAA,CAAW,WAAA,EACxB,QAAA,EAAA;AAAA,QAAA,WAAA,IACC,WAAA,CAAY,GAAA,CAAI,CAAA,UAAA,qBACd,IAAA,CAAC,QAAA,EAAA,EACC,QAAA,EAAA;AAAA,0BAAA,GAAA;AAAA,YAAC,IAAA;AAAA,YAAA;AAAA,cACC,MAAM,UAAA,CAAW,IAAA;AAAA,cACjB,OAAA,EAAQ,aAAA;AAAA,cACR,MAAA,EAAO,MAAA;AAAA,cACP,KAAA,EAAM,WAAA;AAAA,cACN,QAAA,EAAQ,IAAA;AAAA,cACR,KAAA,EAAO,EAAE,QAAA,EAAU,OAAA,EAAQ;AAAA,cAE1B,QAAA,EAAA,UAAA,CAAW;AAAA;AAAA,WACd;AAAA,0BACA,GAAA,CAAC,iBAAA,EAAA,EAAkB,IAAA,EAAM,EAAA,EAAI,OAAM,yBAAA,EAA0B;AAAA,SAAA,EAAA,EAXhD,UAAA,CAAW,KAY1B,CACD,CAAA;AAAA,wBACH,GAAA,CAAC,QAAK,OAAA,EAAQ,aAAA,EAAc,QAAO,MAAA,EAAO,EAAA,EAAG,MAC1C,QAAA,EAAA,KAAA,EACH;AAAA,OAAA,EACF,CAAA;AAAA,sBACA,GAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,UAAA,CAAW,UAAW,QAAA,EAAA,aAAA,EAAc;AAAA,KAAA,EACtD,CAAA;AAAA,IACC,IAAA,oBACC,GAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,UAAA,CAAW,WAAA,EACzB,QAAA,kBAAA,GAAA,CAAC,IAAA,EAAA,EACC,QAAA,kBAAA,GAAA,CAAC,OAAA,EAAA,EACE,QAAA,EAAA,IAAA,CAAK,GAAA,CAAI,CAAA,GAAA,qBACR,GAAA;AAAA,MAAC,GAAA;AAAA,MAAA;AAAA,QAEC,IAAI,GAAA,CAAI,EAAA;AAAA,QACR,MAAM,GAAA,CAAI,IAAA;AAAA,QACV,eAAe,GAAA,CAAI,aAAA;AAAA,QAElB,QAAA,EAAA,GAAA,CAAI;AAAA,OAAA;AAAA,MALA,GAAA,CAAI;AAAA,KAOZ,CAAA,EACH,CAAA,EACF,CAAA,EACF;AAAA,GAAA,EAEJ,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"HeaderPage.esm.js","sources":["../../../src/components/HeaderPage/HeaderPage.tsx"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { HeaderPageProps } from './types';\nimport { Text } from '../Text';\nimport { RiArrowRightSLine } from '@remixicon/react';\nimport { Tabs, TabList, Tab } from '../Tabs';\nimport { useStyles } from '../../hooks/useStyles';\nimport { Container } from '../Container';\nimport { Link } from '../Link';\nimport { Fragment } from 'react/jsx-runtime';\nimport styles from './HeaderPage.module.css';\nimport clsx from 'clsx';\n\n/**\n * A component that renders a header page.\n *\n * @public\n */\nexport const HeaderPage = (props: HeaderPageProps) => {\n const { classNames, cleanedProps } = useStyles('HeaderPage', props);\n const { title, tabs, customActions, breadcrumbs } = cleanedProps;\n\n return (\n <Container className={clsx(classNames.root, styles[classNames.root])}>\n <div className={clsx(classNames.content, styles[classNames.content])}>\n <div\n className={clsx(\n classNames.breadcrumbs,\n styles[classNames.breadcrumbs],\n )}\n >\n {breadcrumbs &&\n breadcrumbs.map(breadcrumb => (\n <Fragment key={breadcrumb.label}>\n <Link\n href={breadcrumb.href}\n variant=\"title-small\"\n weight=\"bold\"\n color=\"secondary\"\n truncate\n style={{ maxWidth: '240px' }}\n >\n {breadcrumb.label}\n </Link>\n <RiArrowRightSLine size={16} color=\"var(--bui-fg-secondary)\" />\n </Fragment>\n ))}\n <Text variant=\"title-small\" weight=\"bold\" as=\"h2\">\n {title}\n </Text>\n </div>\n <div className={clsx(classNames.controls, styles[classNames.controls])}>\n {customActions}\n </div>\n </div>\n {tabs && (\n <div\n className={clsx(\n classNames.tabsWrapper,\n styles[classNames.tabsWrapper],\n )}\n >\n <Tabs>\n <TabList>\n {tabs.map(tab => (\n <Tab\n key={tab.id}\n id={tab.id}\n href={tab.href}\n matchStrategy={tab.matchStrategy}\n >\n {tab.label}\n </Tab>\n ))}\n </TabList>\n </Tabs>\n </div>\n )}\n </Container>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;AAgCO,MAAM,UAAA,GAAa,CAAC,KAAA,KAA2B;AACpD,EAAA,MAAM,EAAE,UAAA,EAAY,YAAA,EAAa,GAAI,SAAA,CAAU,cAAc,KAAK,CAAA;AAClE,EAAA,MAAM,EAAE,KAAA,EAAO,IAAA,EAAM,aAAA,EAAe,aAAY,GAAI,YAAA;AAEpD,EAAA,uBACE,IAAA,CAAC,SAAA,EAAA,EAAU,SAAA,EAAW,IAAA,CAAK,UAAA,CAAW,MAAM,MAAA,CAAO,UAAA,CAAW,IAAI,CAAC,CAAA,EACjE,QAAA,EAAA;AAAA,oBAAA,IAAA,CAAC,KAAA,EAAA,EAAI,WAAW,IAAA,CAAK,UAAA,CAAW,SAAS,MAAA,CAAO,UAAA,CAAW,OAAO,CAAC,CAAA,EACjE,QAAA,EAAA;AAAA,sBAAA,IAAA;AAAA,QAAC,KAAA;AAAA,QAAA;AAAA,UACC,SAAA,EAAW,IAAA;AAAA,YACT,UAAA,CAAW,WAAA;AAAA,YACX,MAAA,CAAO,WAAW,WAAW;AAAA,WAC/B;AAAA,UAEC,QAAA,EAAA;AAAA,YAAA,WAAA,IACC,WAAA,CAAY,GAAA,CAAI,CAAA,UAAA,qBACd,IAAA,CAAC,QAAA,EAAA,EACC,QAAA,EAAA;AAAA,8BAAA,GAAA;AAAA,gBAAC,IAAA;AAAA,gBAAA;AAAA,kBACC,MAAM,UAAA,CAAW,IAAA;AAAA,kBACjB,OAAA,EAAQ,aAAA;AAAA,kBACR,MAAA,EAAO,MAAA;AAAA,kBACP,KAAA,EAAM,WAAA;AAAA,kBACN,QAAA,EAAQ,IAAA;AAAA,kBACR,KAAA,EAAO,EAAE,QAAA,EAAU,OAAA,EAAQ;AAAA,kBAE1B,QAAA,EAAA,UAAA,CAAW;AAAA;AAAA,eACd;AAAA,8BACA,GAAA,CAAC,iBAAA,EAAA,EAAkB,IAAA,EAAM,EAAA,EAAI,OAAM,yBAAA,EAA0B;AAAA,aAAA,EAAA,EAXhD,UAAA,CAAW,KAY1B,CACD,CAAA;AAAA,4BACH,GAAA,CAAC,QAAK,OAAA,EAAQ,aAAA,EAAc,QAAO,MAAA,EAAO,EAAA,EAAG,MAC1C,QAAA,EAAA,KAAA,EACH;AAAA;AAAA;AAAA,OACF;AAAA,sBACA,GAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,IAAA,CAAK,UAAA,CAAW,QAAA,EAAU,MAAA,CAAO,UAAA,CAAW,QAAQ,CAAC,CAAA,EAClE,QAAA,EAAA,aAAA,EACH;AAAA,KAAA,EACF,CAAA;AAAA,IACC,IAAA,oBACC,GAAA;AAAA,MAAC,KAAA;AAAA,MAAA;AAAA,QACC,SAAA,EAAW,IAAA;AAAA,UACT,UAAA,CAAW,WAAA;AAAA,UACX,MAAA,CAAO,WAAW,WAAW;AAAA,SAC/B;AAAA,QAEA,8BAAC,IAAA,EAAA,EACC,QAAA,kBAAA,GAAA,CAAC,OAAA,EAAA,EACE,QAAA,EAAA,IAAA,CAAK,IAAI,CAAA,GAAA,qBACR,GAAA;AAAA,UAAC,GAAA;AAAA,UAAA;AAAA,YAEC,IAAI,GAAA,CAAI,EAAA;AAAA,YACR,MAAM,GAAA,CAAI,IAAA;AAAA,YACV,eAAe,GAAA,CAAI,aAAA;AAAA,YAElB,QAAA,EAAA,GAAA,CAAI;AAAA,WAAA;AAAA,UALA,GAAA,CAAI;AAAA,SAOZ,GACH,CAAA,EACF;AAAA;AAAA;AACF,GAAA,EAEJ,CAAA;AAEJ;;;;"}
@@ -0,0 +1,8 @@
1
+ import styleInject from '../../node_modules_dist/style-inject/dist/style-inject.es.esm.js';
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 components {\n .HeaderPage-module_bui-HeaderPage__1V9A4 {\n display: flex;\n flex-direction: column;\n gap: var(--bui-space-1);\n margin-top: var(--bui-space-6);\n margin-bottom: var(--bui-space-6);\n }\n\n .HeaderPage-module_bui-HeaderPageContent__ImRWi {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n }\n\n .HeaderPage-module_bui-HeaderPageTabsWrapper__1Fcx4 {\n margin-left: -8px;\n }\n\n .HeaderPage-module_bui-HeaderPageControls__2tefX {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: var(--bui-space-2);\n }\n\n .HeaderPage-module_bui-HeaderPageBreadcrumbs__wUkYx {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: var(--bui-space-2);\n }\n}\n";
4
+ var styles = {"bui-HeaderPage":"HeaderPage-module_bui-HeaderPage__1V9A4","bui-HeaderPageContent":"HeaderPage-module_bui-HeaderPageContent__ImRWi","bui-HeaderPageTabsWrapper":"HeaderPage-module_bui-HeaderPageTabsWrapper__1Fcx4","bui-HeaderPageControls":"HeaderPage-module_bui-HeaderPageControls__2tefX","bui-HeaderPageBreadcrumbs":"HeaderPage-module_bui-HeaderPageBreadcrumbs__wUkYx"};
5
+ styleInject(css_248z);
6
+
7
+ export { styles as default };
8
+ //# sourceMappingURL=HeaderPage.module.css.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HeaderPage.module.css.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -5,31 +5,36 @@ import clsx from 'clsx';
5
5
  import { useStyles } from '../../hooks/useStyles.esm.js';
6
6
  import { useNavigate, useHref } from 'react-router-dom';
7
7
  import { isExternalLink } from '../../utils/isExternalLink.esm.js';
8
+ import stylesLink from './Link.module.css.esm.js';
9
+ import stylesText from '../Text/Text.module.css.esm.js';
8
10
 
9
11
  const Link = forwardRef((props, ref) => {
10
12
  const navigate = useNavigate();
13
+ const { classNames: classNamesLink } = useStyles("Link", props);
11
14
  const {
12
- className,
13
- variant = "body",
14
- weight = "regular",
15
- color = "primary",
16
- truncate,
17
- href,
18
- ...restProps
19
- } = props;
20
- const { classNames: linkClassNames } = useStyles("Link");
21
- const { classNames: textClassNames, dataAttributes: textDataAttributes } = useStyles("Text", {
22
- variant,
23
- weight,
24
- color
15
+ classNames: classNamesText,
16
+ dataAttributes: textDataAttributes,
17
+ cleanedProps
18
+ } = useStyles("Text", {
19
+ variant: "body",
20
+ weight: "regular",
21
+ color: "primary",
22
+ ...props
25
23
  });
24
+ const { className, variant, weight, color, truncate, href, ...restProps } = cleanedProps;
26
25
  const isExternal = isExternalLink(href);
27
26
  if (isExternal) {
28
27
  return /* @__PURE__ */ jsx(
29
28
  Link$1,
30
29
  {
31
30
  ref,
32
- className: clsx(textClassNames.root, linkClassNames.root, className),
31
+ className: clsx(
32
+ classNamesText.root,
33
+ classNamesLink.root,
34
+ stylesText[classNamesText.root],
35
+ stylesLink[classNamesLink.root],
36
+ className
37
+ ),
33
38
  "data-truncate": truncate,
34
39
  href,
35
40
  ...textDataAttributes,
@@ -41,7 +46,13 @@ const Link = forwardRef((props, ref) => {
41
46
  Link$1,
42
47
  {
43
48
  ref,
44
- className: clsx(textClassNames.root, linkClassNames.root, className),
49
+ className: clsx(
50
+ classNamesText.root,
51
+ classNamesLink.root,
52
+ stylesText[classNamesText.root],
53
+ stylesLink[classNamesLink.root],
54
+ className
55
+ ),
45
56
  "data-truncate": truncate,
46
57
  ...textDataAttributes,
47
58
  href,