@backstage/ui 0.14.0-next.0 → 0.14.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 (142) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/dist/components/Accordion/Accordion.esm.js.map +1 -1
  3. package/dist/components/Accordion/definition.esm.js +1 -0
  4. package/dist/components/Accordion/definition.esm.js.map +1 -1
  5. package/dist/components/Alert/definition.esm.js +1 -0
  6. package/dist/components/Alert/definition.esm.js.map +1 -1
  7. package/dist/components/Avatar/Avatar.esm.js.map +1 -1
  8. package/dist/components/Avatar/Avatar.module.css.esm.js +2 -2
  9. package/dist/components/Avatar/definition.esm.js +1 -0
  10. package/dist/components/Avatar/definition.esm.js.map +1 -1
  11. package/dist/components/Box/Box.esm.js.map +1 -1
  12. package/dist/components/Box/definition.esm.js +1 -0
  13. package/dist/components/Box/definition.esm.js.map +1 -1
  14. package/dist/components/Button/definition.esm.js +1 -0
  15. package/dist/components/Button/definition.esm.js.map +1 -1
  16. package/dist/components/ButtonIcon/ButtonIcon.esm.js.map +1 -1
  17. package/dist/components/ButtonIcon/definition.esm.js +1 -0
  18. package/dist/components/ButtonIcon/definition.esm.js.map +1 -1
  19. package/dist/components/ButtonLink/ButtonLink.esm.js.map +1 -1
  20. package/dist/components/ButtonLink/definition.esm.js +2 -0
  21. package/dist/components/ButtonLink/definition.esm.js.map +1 -1
  22. package/dist/components/Card/definition.esm.js +2 -0
  23. package/dist/components/Card/definition.esm.js.map +1 -1
  24. package/dist/components/Checkbox/Checkbox.esm.js.map +1 -1
  25. package/dist/components/Checkbox/definition.esm.js +1 -0
  26. package/dist/components/Checkbox/definition.esm.js.map +1 -1
  27. package/dist/components/Container/Container.esm.js.map +1 -1
  28. package/dist/components/Container/definition.esm.js +1 -0
  29. package/dist/components/Container/definition.esm.js.map +1 -1
  30. package/dist/components/Dialog/Dialog.esm.js.map +1 -1
  31. package/dist/components/Dialog/definition.esm.js +1 -0
  32. package/dist/components/Dialog/definition.esm.js.map +1 -1
  33. package/dist/components/FieldError/FieldError.esm.js.map +1 -1
  34. package/dist/components/FieldError/definition.esm.js +1 -0
  35. package/dist/components/FieldError/definition.esm.js.map +1 -1
  36. package/dist/components/FieldLabel/FieldLabel.esm.js +10 -2
  37. package/dist/components/FieldLabel/FieldLabel.esm.js.map +1 -1
  38. package/dist/components/FieldLabel/definition.esm.js +2 -0
  39. package/dist/components/FieldLabel/definition.esm.js.map +1 -1
  40. package/dist/components/Flex/Flex.esm.js.map +1 -1
  41. package/dist/components/Flex/definition.esm.js +1 -0
  42. package/dist/components/Flex/definition.esm.js.map +1 -1
  43. package/dist/components/FullPage/definition.esm.js +1 -0
  44. package/dist/components/FullPage/definition.esm.js.map +1 -1
  45. package/dist/components/Grid/definition.esm.js +1 -0
  46. package/dist/components/Grid/definition.esm.js.map +1 -1
  47. package/dist/components/Header/Header.esm.js +1 -1
  48. package/dist/components/Header/HeaderNav.module.css.esm.js +2 -2
  49. package/dist/components/Header/HeaderNavDefinition.esm.js +1 -0
  50. package/dist/components/Header/HeaderNavDefinition.esm.js.map +1 -1
  51. package/dist/components/Header/definition.esm.js +1 -0
  52. package/dist/components/Header/definition.esm.js.map +1 -1
  53. package/dist/components/Link/Link.esm.js.map +1 -1
  54. package/dist/components/Link/definition.esm.js +2 -0
  55. package/dist/components/Link/definition.esm.js.map +1 -1
  56. package/dist/components/List/definition.esm.js +2 -0
  57. package/dist/components/List/definition.esm.js.map +1 -1
  58. package/dist/components/Menu/Menu.esm.js +2 -2
  59. package/dist/components/Menu/Menu.esm.js.map +1 -1
  60. package/dist/components/Menu/definition.esm.js +3 -0
  61. package/dist/components/Menu/definition.esm.js.map +1 -1
  62. package/dist/components/PasswordField/PasswordField.esm.js.map +1 -1
  63. package/dist/components/PasswordField/definition.esm.js +1 -0
  64. package/dist/components/PasswordField/definition.esm.js.map +1 -1
  65. package/dist/components/PluginHeader/definition.esm.js +1 -0
  66. package/dist/components/PluginHeader/definition.esm.js.map +1 -1
  67. package/dist/components/Popover/definition.esm.js +1 -0
  68. package/dist/components/Popover/definition.esm.js.map +1 -1
  69. package/dist/components/RadioGroup/RadioGroup.esm.js.map +1 -1
  70. package/dist/components/RadioGroup/definition.esm.js +1 -0
  71. package/dist/components/RadioGroup/definition.esm.js.map +1 -1
  72. package/dist/components/SearchAutocomplete/SearchAutocomplete.esm.js.map +1 -1
  73. package/dist/components/SearchAutocomplete/definition.esm.js +2 -0
  74. package/dist/components/SearchAutocomplete/definition.esm.js.map +1 -1
  75. package/dist/components/SearchField/SearchField.esm.js.map +1 -1
  76. package/dist/components/SearchField/definition.esm.js +1 -0
  77. package/dist/components/SearchField/definition.esm.js.map +1 -1
  78. package/dist/components/Select/Select.esm.js.map +1 -1
  79. package/dist/components/Select/definition.esm.js +1 -0
  80. package/dist/components/Select/definition.esm.js.map +1 -1
  81. package/dist/components/Skeleton/Skeleton.esm.js.map +1 -1
  82. package/dist/components/Skeleton/definition.esm.js +1 -0
  83. package/dist/components/Skeleton/definition.esm.js.map +1 -1
  84. package/dist/components/Slider/Slider.esm.js +76 -0
  85. package/dist/components/Slider/Slider.esm.js.map +1 -0
  86. package/dist/components/Slider/Slider.module.css.esm.js +8 -0
  87. package/dist/components/Slider/Slider.module.css.esm.js.map +1 -0
  88. package/dist/components/Slider/definition.esm.js +31 -0
  89. package/dist/components/Slider/definition.esm.js.map +1 -0
  90. package/dist/components/Switch/Switch.esm.js.map +1 -1
  91. package/dist/components/Switch/definition.esm.js +1 -0
  92. package/dist/components/Switch/definition.esm.js.map +1 -1
  93. package/dist/components/Table/components/Cell.esm.js.map +1 -1
  94. package/dist/components/Table/components/CellProfile.esm.js.map +1 -1
  95. package/dist/components/Table/components/CellText.esm.js.map +1 -1
  96. package/dist/components/Table/components/Column.esm.js.map +1 -1
  97. package/dist/components/Table/components/Row.esm.js.map +1 -1
  98. package/dist/components/Table/components/Table.esm.js +2 -1
  99. package/dist/components/Table/components/Table.esm.js.map +1 -1
  100. package/dist/components/Table/components/TableBody.esm.js.map +1 -1
  101. package/dist/components/Table/components/TableBodySkeleton.esm.js +1 -0
  102. package/dist/components/Table/components/TableBodySkeleton.esm.js.map +1 -1
  103. package/dist/components/Table/components/TableHeader.esm.js.map +1 -1
  104. package/dist/components/Table/components/TableRoot.esm.js.map +1 -1
  105. package/dist/components/Table/definition.esm.js +4 -0
  106. package/dist/components/Table/definition.esm.js.map +1 -1
  107. package/dist/components/Table/hooks/useCompletePagination.esm.js +10 -5
  108. package/dist/components/Table/hooks/useCompletePagination.esm.js.map +1 -1
  109. package/dist/components/Table/hooks/useTable.esm.js +28 -22
  110. package/dist/components/Table/hooks/useTable.esm.js.map +1 -1
  111. package/dist/components/TablePagination/TablePagination.esm.js +6 -4
  112. package/dist/components/TablePagination/TablePagination.esm.js.map +1 -1
  113. package/dist/components/TablePagination/definition.esm.js +3 -1
  114. package/dist/components/TablePagination/definition.esm.js.map +1 -1
  115. package/dist/components/Tabs/Tabs.esm.js +4 -4
  116. package/dist/components/Tabs/definition.esm.js +2 -0
  117. package/dist/components/Tabs/definition.esm.js.map +1 -1
  118. package/dist/components/TagGroup/definition.esm.js +2 -0
  119. package/dist/components/TagGroup/definition.esm.js.map +1 -1
  120. package/dist/components/Text/Text.esm.js.map +1 -1
  121. package/dist/components/Text/definition.esm.js +1 -0
  122. package/dist/components/Text/definition.esm.js.map +1 -1
  123. package/dist/components/TextField/TextField.esm.js.map +1 -1
  124. package/dist/components/TextField/definition.esm.js +1 -0
  125. package/dist/components/TextField/definition.esm.js.map +1 -1
  126. package/dist/components/ToggleButton/ToggleButton.esm.js.map +1 -1
  127. package/dist/components/ToggleButton/definition.esm.js +1 -0
  128. package/dist/components/ToggleButton/definition.esm.js.map +1 -1
  129. package/dist/components/ToggleButtonGroup/ToggleButtonGroup.esm.js.map +1 -1
  130. package/dist/components/ToggleButtonGroup/definition.esm.js +1 -0
  131. package/dist/components/ToggleButtonGroup/definition.esm.js.map +1 -1
  132. package/dist/components/Tooltip/Tooltip.esm.js.map +1 -1
  133. package/dist/components/Tooltip/definition.esm.js +1 -0
  134. package/dist/components/Tooltip/definition.esm.js.map +1 -1
  135. package/dist/components/VisuallyHidden/definition.esm.js +1 -0
  136. package/dist/components/VisuallyHidden/definition.esm.js.map +1 -1
  137. package/dist/hooks/useDefinition/useDefinition.esm.js +12 -1
  138. package/dist/hooks/useDefinition/useDefinition.esm.js.map +1 -1
  139. package/dist/index.d.ts +298 -49
  140. package/dist/index.esm.js +2 -0
  141. package/dist/index.esm.js.map +1 -1
  142. package/package.json +6 -6
@@ -7,7 +7,15 @@ import { FieldLabelDefinition } from './definition.esm.js';
7
7
  const FieldLabel = forwardRef(
8
8
  (props, ref) => {
9
9
  const { ownProps, restProps } = useDefinition(FieldLabelDefinition, props);
10
- const { classes, label, secondaryLabel, description, htmlFor, id } = ownProps;
10
+ const {
11
+ classes,
12
+ label,
13
+ secondaryLabel,
14
+ description,
15
+ htmlFor,
16
+ id,
17
+ descriptionId
18
+ } = ownProps;
11
19
  if (!label) return null;
12
20
  return /* @__PURE__ */ jsxs("div", { className: classes.root, ...restProps, ref, children: [
13
21
  label && /* @__PURE__ */ jsxs(Label, { className: classes.label, htmlFor, id, children: [
@@ -18,7 +26,7 @@ const FieldLabel = forwardRef(
18
26
  ")"
19
27
  ] })
20
28
  ] }),
21
- description && /* @__PURE__ */ jsx("div", { className: classes.description, children: description })
29
+ description && /* @__PURE__ */ jsx("div", { className: classes.description, id: descriptionId, children: description })
22
30
  ] });
23
31
  }
24
32
  );
@@ -1 +1 @@
1
- {"version":3,"file":"FieldLabel.esm.js","sources":["../../../src/components/FieldLabel/FieldLabel.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 */\nimport { Label } from 'react-aria-components';\nimport { forwardRef } from 'react';\nimport type { FieldLabelProps } from './types';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport { FieldLabelDefinition } from './definition';\n\n/** @public */\nexport const FieldLabel = forwardRef<HTMLDivElement, FieldLabelProps>(\n (props: FieldLabelProps, ref) => {\n const { ownProps, restProps } = useDefinition(FieldLabelDefinition, props);\n const { classes, label, secondaryLabel, description, htmlFor, id } =\n ownProps;\n\n if (!label) return null;\n\n return (\n <div className={classes.root} {...restProps} ref={ref}>\n {label && (\n <Label className={classes.label} htmlFor={htmlFor} id={id}>\n {label}\n {secondaryLabel && (\n <span aria-hidden=\"true\" className={classes.secondaryLabel}>\n ({secondaryLabel})\n </span>\n )}\n </Label>\n )}\n {description && (\n <div className={classes.description}>{description}</div>\n )}\n </div>\n );\n },\n);\n\nFieldLabel.displayName = 'FieldLabel';\n"],"names":[],"mappings":";;;;;;AAsBO,MAAM,UAAA,GAAa,UAAA;AAAA,EACxB,CAAC,OAAwB,GAAA,KAAQ;AAC/B,IAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAU,GAAI,aAAA,CAAc,sBAAsB,KAAK,CAAA;AACzE,IAAA,MAAM,EAAE,OAAA,EAAS,KAAA,EAAO,gBAAgB,WAAA,EAAa,OAAA,EAAS,IAAG,GAC/D,QAAA;AAEF,IAAA,IAAI,CAAC,OAAO,OAAO,IAAA;AAEnB,IAAA,4BACG,KAAA,EAAA,EAAI,SAAA,EAAW,QAAQ,IAAA,EAAO,GAAG,WAAW,GAAA,EAC1C,QAAA,EAAA;AAAA,MAAA,KAAA,yBACE,KAAA,EAAA,EAAM,SAAA,EAAW,OAAA,CAAQ,KAAA,EAAO,SAAkB,EAAA,EAChD,QAAA,EAAA;AAAA,QAAA,KAAA;AAAA,QACA,kCACC,IAAA,CAAC,MAAA,EAAA,EAAK,eAAY,MAAA,EAAO,SAAA,EAAW,QAAQ,cAAA,EAAgB,QAAA,EAAA;AAAA,UAAA,GAAA;AAAA,UACxD,cAAA;AAAA,UAAe;AAAA,SAAA,EACnB;AAAA,OAAA,EAEJ,CAAA;AAAA,MAED,+BACC,GAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,OAAA,CAAQ,aAAc,QAAA,EAAA,WAAA,EAAY;AAAA,KAAA,EAEtD,CAAA;AAAA,EAEJ;AACF;AAEA,UAAA,CAAW,WAAA,GAAc,YAAA;;;;"}
1
+ {"version":3,"file":"FieldLabel.esm.js","sources":["../../../src/components/FieldLabel/FieldLabel.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 */\nimport { Label } from 'react-aria-components';\nimport { forwardRef } from 'react';\nimport type { FieldLabelProps } from './types';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport { FieldLabelDefinition } from './definition';\n\n/**\n * Renders a label for a form field with optional secondary label and description text.\n *\n * @public\n */\nexport const FieldLabel = forwardRef<HTMLDivElement, FieldLabelProps>(\n (props: FieldLabelProps, ref) => {\n const { ownProps, restProps } = useDefinition(FieldLabelDefinition, props);\n const {\n classes,\n label,\n secondaryLabel,\n description,\n htmlFor,\n id,\n descriptionId,\n } = ownProps;\n\n if (!label) return null;\n\n return (\n <div className={classes.root} {...restProps} ref={ref}>\n {label && (\n <Label className={classes.label} htmlFor={htmlFor} id={id}>\n {label}\n {secondaryLabel && (\n <span aria-hidden=\"true\" className={classes.secondaryLabel}>\n ({secondaryLabel})\n </span>\n )}\n </Label>\n )}\n {description && (\n <div className={classes.description} id={descriptionId}>\n {description}\n </div>\n )}\n </div>\n );\n },\n);\n\nFieldLabel.displayName = 'FieldLabel';\n"],"names":[],"mappings":";;;;;;AA0BO,MAAM,UAAA,GAAa,UAAA;AAAA,EACxB,CAAC,OAAwB,GAAA,KAAQ;AAC/B,IAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAU,GAAI,aAAA,CAAc,sBAAsB,KAAK,CAAA;AACzE,IAAA,MAAM;AAAA,MACJ,OAAA;AAAA,MACA,KAAA;AAAA,MACA,cAAA;AAAA,MACA,WAAA;AAAA,MACA,OAAA;AAAA,MACA,EAAA;AAAA,MACA;AAAA,KACF,GAAI,QAAA;AAEJ,IAAA,IAAI,CAAC,OAAO,OAAO,IAAA;AAEnB,IAAA,4BACG,KAAA,EAAA,EAAI,SAAA,EAAW,QAAQ,IAAA,EAAO,GAAG,WAAW,GAAA,EAC1C,QAAA,EAAA;AAAA,MAAA,KAAA,yBACE,KAAA,EAAA,EAAM,SAAA,EAAW,OAAA,CAAQ,KAAA,EAAO,SAAkB,EAAA,EAChD,QAAA,EAAA;AAAA,QAAA,KAAA;AAAA,QACA,kCACC,IAAA,CAAC,MAAA,EAAA,EAAK,eAAY,MAAA,EAAO,SAAA,EAAW,QAAQ,cAAA,EAAgB,QAAA,EAAA;AAAA,UAAA,GAAA;AAAA,UACxD,cAAA;AAAA,UAAe;AAAA,SAAA,EACnB;AAAA,OAAA,EAEJ,CAAA;AAAA,MAED,WAAA,wBACE,KAAA,EAAA,EAAI,SAAA,EAAW,QAAQ,WAAA,EAAa,EAAA,EAAI,eACtC,QAAA,EAAA,WAAA,EACH;AAAA,KAAA,EAEJ,CAAA;AAAA,EAEJ;AACF;AAEA,UAAA,CAAW,WAAA,GAAc,YAAA;;;;"}
@@ -4,6 +4,7 @@ import '../../hooks/useBreakpoint.esm.js';
4
4
  import '../../hooks/useBg.esm.js';
5
5
  import '../../hooks/useDefinition/helpers.esm.js';
6
6
  import '../../analytics/useAnalytics.esm.js';
7
+ import 'react-router-dom';
7
8
  import { defineComponent } from '../../hooks/useDefinition/defineComponent.esm.js';
8
9
  import styles from './FieldLabel.module.css.esm.js';
9
10
 
@@ -21,6 +22,7 @@ const FieldLabelDefinition = defineComponent()({
21
22
  description: {},
22
23
  htmlFor: {},
23
24
  id: {},
25
+ descriptionId: {},
24
26
  className: {}
25
27
  }
26
28
  });
@@ -1 +1 @@
1
- {"version":3,"file":"definition.esm.js","sources":["../../../src/components/FieldLabel/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 { FieldLabelOwnProps } from './types';\nimport styles from './FieldLabel.module.css';\n\n/**\n * Component definition for FieldLabel\n * @public\n */\nexport const FieldLabelDefinition = defineComponent<FieldLabelOwnProps>()({\n styles,\n classNames: {\n root: 'bui-FieldLabelWrapper',\n label: 'bui-FieldLabel',\n secondaryLabel: 'bui-FieldSecondaryLabel',\n description: 'bui-FieldDescription',\n },\n propDefs: {\n label: {},\n secondaryLabel: {},\n description: {},\n htmlFor: {},\n id: {},\n className: {},\n },\n});\n"],"names":[],"mappings":";;;;;;;;;AAwBO,MAAM,oBAAA,GAAuB,iBAAoC,CAAE;AAAA,EACxE,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,uBAAA;AAAA,IACN,KAAA,EAAO,gBAAA;AAAA,IACP,cAAA,EAAgB,yBAAA;AAAA,IAChB,WAAA,EAAa;AAAA,GACf;AAAA,EACA,QAAA,EAAU;AAAA,IACR,OAAO,EAAC;AAAA,IACR,gBAAgB,EAAC;AAAA,IACjB,aAAa,EAAC;AAAA,IACd,SAAS,EAAC;AAAA,IACV,IAAI,EAAC;AAAA,IACL,WAAW;AAAC;AAEhB,CAAC;;;;"}
1
+ {"version":3,"file":"definition.esm.js","sources":["../../../src/components/FieldLabel/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 { FieldLabelOwnProps } from './types';\nimport styles from './FieldLabel.module.css';\n\n/**\n * Component definition for FieldLabel\n * @public\n */\nexport const FieldLabelDefinition = defineComponent<FieldLabelOwnProps>()({\n styles,\n classNames: {\n root: 'bui-FieldLabelWrapper',\n label: 'bui-FieldLabel',\n secondaryLabel: 'bui-FieldSecondaryLabel',\n description: 'bui-FieldDescription',\n },\n propDefs: {\n label: {},\n secondaryLabel: {},\n description: {},\n htmlFor: {},\n id: {},\n descriptionId: {},\n className: {},\n },\n});\n"],"names":[],"mappings":";;;;;;;;;;AAwBO,MAAM,oBAAA,GAAuB,iBAAoC,CAAE;AAAA,EACxE,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,uBAAA;AAAA,IACN,KAAA,EAAO,gBAAA;AAAA,IACP,cAAA,EAAgB,yBAAA;AAAA,IAChB,WAAA,EAAa;AAAA,GACf;AAAA,EACA,QAAA,EAAU;AAAA,IACR,OAAO,EAAC;AAAA,IACR,gBAAgB,EAAC;AAAA,IACjB,aAAa,EAAC;AAAA,IACd,SAAS,EAAC;AAAA,IACV,IAAI,EAAC;AAAA,IACL,eAAe,EAAC;AAAA,IAChB,WAAW;AAAC;AAEhB,CAAC;;;;"}
@@ -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 { forwardRef } from 'react';\nimport type { FlexProps } from './types';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport { FlexDefinition } from './definition';\n\n/** @public */\nexport const Flex = forwardRef<HTMLDivElement, FlexProps>((props, ref) => {\n const { ownProps, dataAttributes, utilityStyle, restProps } = useDefinition(\n FlexDefinition,\n { gap: '4', ...props },\n );\n const { classes, childrenWithBgProvider } = ownProps;\n\n return (\n <div\n ref={ref}\n className={classes.root}\n style={{ ...utilityStyle, ...ownProps.style }}\n {...dataAttributes}\n {...restProps}\n >\n {childrenWithBgProvider}\n </div>\n );\n});\n\nFlex.displayName = 'Flex';\n"],"names":[],"mappings":";;;;;AAsBO,MAAM,IAAA,GAAO,UAAA,CAAsC,CAAC,KAAA,EAAO,GAAA,KAAQ;AACxE,EAAA,MAAM,EAAE,QAAA,EAAU,cAAA,EAAgB,YAAA,EAAc,WAAU,GAAI,aAAA;AAAA,IAC5D,cAAA;AAAA,IACA,EAAE,GAAA,EAAK,GAAA,EAAK,GAAG,KAAA;AAAM,GACvB;AACA,EAAA,MAAM,EAAE,OAAA,EAAS,sBAAA,EAAuB,GAAI,QAAA;AAE5C,EAAA,uBACE,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,GAAA;AAAA,MACA,WAAW,OAAA,CAAQ,IAAA;AAAA,MACnB,OAAO,EAAE,GAAG,YAAA,EAAc,GAAG,SAAS,KAAA,EAAM;AAAA,MAC3C,GAAG,cAAA;AAAA,MACH,GAAG,SAAA;AAAA,MAEH,QAAA,EAAA;AAAA;AAAA,GACH;AAEJ,CAAC;AAED,IAAA,CAAK,WAAA,GAAc,MAAA;;;;"}
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 type { FlexProps } from './types';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport { FlexDefinition } from './definition';\n\n/**\n * A flexbox layout container with props for controlling gap, alignment, justification, and direction.\n *\n * @public\n */\nexport const Flex = forwardRef<HTMLDivElement, FlexProps>((props, ref) => {\n const { ownProps, dataAttributes, utilityStyle, restProps } = useDefinition(\n FlexDefinition,\n { gap: '4', ...props },\n );\n const { classes, childrenWithBgProvider } = ownProps;\n\n return (\n <div\n ref={ref}\n className={classes.root}\n style={{ ...utilityStyle, ...ownProps.style }}\n {...dataAttributes}\n {...restProps}\n >\n {childrenWithBgProvider}\n </div>\n );\n});\n\nFlex.displayName = 'Flex';\n"],"names":[],"mappings":";;;;;AA0BO,MAAM,IAAA,GAAO,UAAA,CAAsC,CAAC,KAAA,EAAO,GAAA,KAAQ;AACxE,EAAA,MAAM,EAAE,QAAA,EAAU,cAAA,EAAgB,YAAA,EAAc,WAAU,GAAI,aAAA;AAAA,IAC5D,cAAA;AAAA,IACA,EAAE,GAAA,EAAK,GAAA,EAAK,GAAG,KAAA;AAAM,GACvB;AACA,EAAA,MAAM,EAAE,OAAA,EAAS,sBAAA,EAAuB,GAAI,QAAA;AAE5C,EAAA,uBACE,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,GAAA;AAAA,MACA,WAAW,OAAA,CAAQ,IAAA;AAAA,MACnB,OAAO,EAAE,GAAG,YAAA,EAAc,GAAG,SAAS,KAAA,EAAM;AAAA,MAC3C,GAAG,cAAA;AAAA,MACH,GAAG,SAAA;AAAA,MAEH,QAAA,EAAA;AAAA;AAAA,GACH;AAEJ,CAAC;AAED,IAAA,CAAK,WAAA,GAAc,MAAA;;;;"}
@@ -4,6 +4,7 @@ import '../../hooks/useBreakpoint.esm.js';
4
4
  import '../../hooks/useBg.esm.js';
5
5
  import '../../hooks/useDefinition/helpers.esm.js';
6
6
  import '../../analytics/useAnalytics.esm.js';
7
+ import 'react-router-dom';
7
8
  import { defineComponent } from '../../hooks/useDefinition/defineComponent.esm.js';
8
9
  import styles from './Flex.module.css.esm.js';
9
10
 
@@ -1 +1 @@
1
- {"version":3,"file":"definition.esm.js","sources":["../../../src/components/Flex/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 { FlexOwnProps } from './types';\nimport styles from './Flex.module.css';\n\n/**\n * Component definition for Flex\n * @public\n */\nexport const FlexDefinition = defineComponent<FlexOwnProps>()({\n styles,\n classNames: {\n root: 'bui-Flex',\n },\n bg: 'provider',\n propDefs: {\n bg: { dataAttribute: true },\n children: {},\n className: {},\n style: {},\n },\n utilityProps: [\n 'm',\n 'mb',\n 'ml',\n 'mr',\n 'mt',\n 'mx',\n 'my',\n 'p',\n 'pb',\n 'pl',\n 'pr',\n 'pt',\n 'px',\n 'py',\n 'gap',\n 'align',\n 'justify',\n 'direction',\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,EAAA,EAAI,UAAA;AAAA,EACJ,QAAA,EAAU;AAAA,IACR,EAAA,EAAI,EAAE,aAAA,EAAe,IAAA,EAAK;AAAA,IAC1B,UAAU,EAAC;AAAA,IACX,WAAW,EAAC;AAAA,IACZ,OAAO;AAAC,GACV;AAAA,EACA,YAAA,EAAc;AAAA,IACZ,GAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,GAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,KAAA;AAAA,IACA,OAAA;AAAA,IACA,SAAA;AAAA,IACA;AAAA;AAEJ,CAAC;;;;"}
1
+ {"version":3,"file":"definition.esm.js","sources":["../../../src/components/Flex/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 { FlexOwnProps } from './types';\nimport styles from './Flex.module.css';\n\n/**\n * Component definition for Flex\n * @public\n */\nexport const FlexDefinition = defineComponent<FlexOwnProps>()({\n styles,\n classNames: {\n root: 'bui-Flex',\n },\n bg: 'provider',\n propDefs: {\n bg: { dataAttribute: true },\n children: {},\n className: {},\n style: {},\n },\n utilityProps: [\n 'm',\n 'mb',\n 'ml',\n 'mr',\n 'mt',\n 'mx',\n 'my',\n 'p',\n 'pb',\n 'pl',\n 'pr',\n 'pt',\n 'px',\n 'py',\n 'gap',\n 'align',\n 'justify',\n 'direction',\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,EAAA,EAAI,UAAA;AAAA,EACJ,QAAA,EAAU;AAAA,IACR,EAAA,EAAI,EAAE,aAAA,EAAe,IAAA,EAAK;AAAA,IAC1B,UAAU,EAAC;AAAA,IACX,WAAW,EAAC;AAAA,IACZ,OAAO;AAAC,GACV;AAAA,EACA,YAAA,EAAc;AAAA,IACZ,GAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,GAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,KAAA;AAAA,IACA,OAAA;AAAA,IACA,SAAA;AAAA,IACA;AAAA;AAEJ,CAAC;;;;"}
@@ -4,6 +4,7 @@ import '../../hooks/useBreakpoint.esm.js';
4
4
  import '../../hooks/useBg.esm.js';
5
5
  import '../../hooks/useDefinition/helpers.esm.js';
6
6
  import '../../analytics/useAnalytics.esm.js';
7
+ import 'react-router-dom';
7
8
  import { defineComponent } from '../../hooks/useDefinition/defineComponent.esm.js';
8
9
  import styles from './FullPage.module.css.esm.js';
9
10
 
@@ -1 +1 @@
1
- {"version":3,"file":"definition.esm.js","sources":["../../../src/components/FullPage/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 { FullPageOwnProps } from './types';\nimport styles from './FullPage.module.css';\n\n/**\n * Component definition for FullPage\n * @public\n */\nexport const FullPageDefinition = defineComponent<FullPageOwnProps>()({\n styles,\n classNames: {\n root: 'bui-FullPage',\n },\n propDefs: {\n className: {},\n },\n});\n"],"names":[],"mappings":";;;;;;;;;AAwBO,MAAM,kBAAA,GAAqB,iBAAkC,CAAE;AAAA,EACpE,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/FullPage/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 { FullPageOwnProps } from './types';\nimport styles from './FullPage.module.css';\n\n/**\n * Component definition for FullPage\n * @public\n */\nexport const FullPageDefinition = defineComponent<FullPageOwnProps>()({\n styles,\n classNames: {\n root: 'bui-FullPage',\n },\n propDefs: {\n className: {},\n },\n});\n"],"names":[],"mappings":";;;;;;;;;;AAwBO,MAAM,kBAAA,GAAqB,iBAAkC,CAAE;AAAA,EACpE,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA,QAAA,EAAU;AAAA,IACR,WAAW;AAAC;AAEhB,CAAC;;;;"}
@@ -4,6 +4,7 @@ import '../../hooks/useBreakpoint.esm.js';
4
4
  import '../../hooks/useBg.esm.js';
5
5
  import '../../hooks/useDefinition/helpers.esm.js';
6
6
  import '../../analytics/useAnalytics.esm.js';
7
+ import 'react-router-dom';
7
8
  import { defineComponent } from '../../hooks/useDefinition/defineComponent.esm.js';
8
9
  import styles from './Grid.module.css.esm.js';
9
10
 
@@ -1 +1 @@
1
- {"version":3,"file":"definition.esm.js","sources":["../../../src/components/Grid/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 { GridOwnProps, GridItemOwnProps } from './types';\nimport styles from './Grid.module.css';\n\n/**\n * Component definition for Grid\n * @public\n */\nexport const GridDefinition = defineComponent<GridOwnProps>()({\n styles,\n classNames: {\n root: 'bui-Grid',\n },\n bg: 'provider',\n propDefs: {\n bg: { dataAttribute: true },\n children: {},\n className: {},\n style: {},\n },\n utilityProps: [\n 'columns',\n 'gap',\n 'm',\n 'mb',\n 'ml',\n 'mr',\n 'mt',\n 'mx',\n 'my',\n 'p',\n 'pb',\n 'pl',\n 'pr',\n 'pt',\n 'px',\n 'py',\n ],\n});\n\n/**\n * Component definition for GridItem\n * @public\n */\nexport const GridItemDefinition = defineComponent<GridItemOwnProps>()({\n styles,\n classNames: {\n root: 'bui-GridItem',\n },\n bg: 'provider',\n propDefs: {\n bg: { dataAttribute: true },\n children: {},\n className: {},\n style: {},\n },\n utilityProps: ['colSpan', 'colEnd', 'colStart', 'rowSpan'],\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,EAAA,EAAI,UAAA;AAAA,EACJ,QAAA,EAAU;AAAA,IACR,EAAA,EAAI,EAAE,aAAA,EAAe,IAAA,EAAK;AAAA,IAC1B,UAAU,EAAC;AAAA,IACX,WAAW,EAAC;AAAA,IACZ,OAAO;AAAC,GACV;AAAA,EACA,YAAA,EAAc;AAAA,IACZ,SAAA;AAAA,IACA,KAAA;AAAA,IACA,GAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,GAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA;AAAA;AAEJ,CAAC;AAMM,MAAM,kBAAA,GAAqB,iBAAkC,CAAE;AAAA,EACpE,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA,EAAA,EAAI,UAAA;AAAA,EACJ,QAAA,EAAU;AAAA,IACR,EAAA,EAAI,EAAE,aAAA,EAAe,IAAA,EAAK;AAAA,IAC1B,UAAU,EAAC;AAAA,IACX,WAAW,EAAC;AAAA,IACZ,OAAO;AAAC,GACV;AAAA,EACA,YAAA,EAAc,CAAC,SAAA,EAAW,QAAA,EAAU,YAAY,SAAS;AAC3D,CAAC;;;;"}
1
+ {"version":3,"file":"definition.esm.js","sources":["../../../src/components/Grid/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 { GridOwnProps, GridItemOwnProps } from './types';\nimport styles from './Grid.module.css';\n\n/**\n * Component definition for Grid\n * @public\n */\nexport const GridDefinition = defineComponent<GridOwnProps>()({\n styles,\n classNames: {\n root: 'bui-Grid',\n },\n bg: 'provider',\n propDefs: {\n bg: { dataAttribute: true },\n children: {},\n className: {},\n style: {},\n },\n utilityProps: [\n 'columns',\n 'gap',\n 'm',\n 'mb',\n 'ml',\n 'mr',\n 'mt',\n 'mx',\n 'my',\n 'p',\n 'pb',\n 'pl',\n 'pr',\n 'pt',\n 'px',\n 'py',\n ],\n});\n\n/**\n * Component definition for GridItem\n * @public\n */\nexport const GridItemDefinition = defineComponent<GridItemOwnProps>()({\n styles,\n classNames: {\n root: 'bui-GridItem',\n },\n bg: 'provider',\n propDefs: {\n bg: { dataAttribute: true },\n children: {},\n className: {},\n style: {},\n },\n utilityProps: ['colSpan', 'colEnd', 'colStart', 'rowSpan'],\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,EAAA,EAAI,UAAA;AAAA,EACJ,QAAA,EAAU;AAAA,IACR,EAAA,EAAI,EAAE,aAAA,EAAe,IAAA,EAAK;AAAA,IAC1B,UAAU,EAAC;AAAA,IACX,WAAW,EAAC;AAAA,IACZ,OAAO;AAAC,GACV;AAAA,EACA,YAAA,EAAc;AAAA,IACZ,SAAA;AAAA,IACA,KAAA;AAAA,IACA,GAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,GAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA;AAAA;AAEJ,CAAC;AAMM,MAAM,kBAAA,GAAqB,iBAAkC,CAAE;AAAA,EACpE,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA,EAAA,EAAI,UAAA;AAAA,EACJ,QAAA,EAAU;AAAA,IACR,EAAA,EAAI,EAAE,aAAA,EAAe,IAAA,EAAK;AAAA,IAC1B,UAAU,EAAC;AAAA,IACX,WAAW,EAAC;AAAA,IACZ,OAAO;AAAC,GACV;AAAA,EACA,YAAA,EAAc,CAAC,SAAA,EAAW,QAAA,EAAU,YAAY,SAAS;AAC3D,CAAC;;;;"}
@@ -1,4 +1,4 @@
1
- import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
1
+ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
2
2
  import { Text } from '../Text/Text.esm.js';
3
3
  import { useDefinition } from '../../hooks/useDefinition/useDefinition.esm.js';
4
4
  import '../Text/Text.module.css.esm.js';
@@ -1,7 +1,7 @@
1
1
  import styleInject from '../../node_modules_dist/style-inject/dist/style-inject.es.esm.js';
2
2
 
3
- var css_248z = "/*\n * Copyright 2026 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n@layer tokens, base, components, utilities;\n\n@layer components {\n .HeaderNav_bui-HeaderNav__3fece2b79e {\n position: relative;\n\n /* CSS custom properties for indicator positioning — set by HeaderNavIndicators */\n --active-tab-left: 0px;\n --active-tab-right: 0px;\n --active-tab-top: 0px;\n --active-tab-bottom: 0px;\n --active-tab-width: 0px;\n --active-tab-height: 0px;\n --active-tab-opacity: 0;\n --active-transition-duration: 0s;\n\n --hovered-tab-left: 0px;\n --hovered-tab-right: 0px;\n --hovered-tab-top: 0px;\n --hovered-tab-bottom: 0px;\n --hovered-tab-width: 0px;\n --hovered-tab-height: 0px;\n --hovered-tab-opacity: 0;\n --hovered-transition-duration: 0s;\n }\n\n .HeaderNav_bui-HeaderNavList__3fece2b79e {\n display: flex;\n flex-direction: row;\n list-style: none;\n margin: 0;\n padding: 0;\n }\n\n .HeaderNav_bui-HeaderNavItem__3fece2b79e,\n .HeaderNav_bui-HeaderNavGroup__3fece2b79e {\n font-family: var(--bui-font-family);\n font-size: var(--bui-font-size-3);\n font-weight: var(--bui-font-weight-regular);\n color: var(--bui-fg-secondary);\n height: 36px;\n display: flex;\n gap: var(--bui-space-1);\n align-items: center;\n padding-inline: var(--bui-space-2);\n text-decoration: none;\n cursor: pointer;\n border: none;\n background: none;\n outline: none;\n }\n\n .HeaderNav_bui-HeaderNavItem__3fece2b79e[aria-current='page'],\n .HeaderNav_bui-HeaderNavGroup__3fece2b79e[aria-current='page'] {\n color: var(--bui-fg-primary);\n }\n\n .HeaderNav_bui-HeaderNavActive__3fece2b79e {\n pointer-events: none;\n position: absolute;\n bottom: -1px;\n left: calc(var(--active-tab-left) + var(--bui-space-2));\n width: calc(var(--active-tab-width) - var(--bui-space-4));\n height: 1px;\n background-color: var(--bui-fg-primary);\n border-radius: 4px;\n opacity: var(--active-tab-opacity);\n transition: left var(--active-transition-duration) ease-out,\n width var(--active-transition-duration) ease-out, opacity 0.15s;\n }\n\n .HeaderNav_bui-HeaderNavHovered__3fece2b79e {\n pointer-events: none;\n position: absolute;\n left: var(--hovered-tab-left);\n top: calc(var(--hovered-tab-top) + 4px);\n width: var(--hovered-tab-width);\n height: calc(var(--hovered-tab-height) - 8px);\n background-color: var(--bui-bg-neutral-2);\n border-radius: 4px;\n opacity: var(--hovered-tab-opacity);\n transition: left var(--hovered-transition-duration) ease-out,\n top var(--hovered-transition-duration) ease-out,\n width var(--hovered-transition-duration) ease-out,\n height var(--hovered-transition-duration) ease-out, opacity 0.15s;\n\n [data-focus-visible] & {\n outline: 2px solid var(--bui-ring);\n outline-offset: -2px;\n }\n }\n\n @media (prefers-reduced-motion: reduce) {\n .HeaderNav_bui-HeaderNavActive__3fece2b79e,\n .HeaderNav_bui-HeaderNavHovered__3fece2b79e {\n transition: none;\n }\n }\n}\n";
4
- var styles = {"bui-HeaderNav":"HeaderNav_bui-HeaderNav__3fece2b79e","bui-HeaderNavList":"HeaderNav_bui-HeaderNavList__3fece2b79e","bui-HeaderNavItem":"HeaderNav_bui-HeaderNavItem__3fece2b79e","bui-HeaderNavGroup":"HeaderNav_bui-HeaderNavGroup__3fece2b79e","bui-HeaderNavActive":"HeaderNav_bui-HeaderNavActive__3fece2b79e","bui-HeaderNavHovered":"HeaderNav_bui-HeaderNavHovered__3fece2b79e"};
3
+ var css_248z = "/*\n * Copyright 2026 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n@layer tokens, base, components, utilities;\n\n@layer components {\n .HeaderNav_bui-HeaderNav__203c060f73 {\n position: relative;\n\n /* CSS custom properties for indicator positioning — set by HeaderNavIndicators */\n --active-tab-left: 0px;\n --active-tab-right: 0px;\n --active-tab-top: 0px;\n --active-tab-bottom: 0px;\n --active-tab-width: 0px;\n --active-tab-height: 0px;\n --active-tab-opacity: 0;\n --active-transition-duration: 0s;\n\n --hovered-tab-left: 0px;\n --hovered-tab-right: 0px;\n --hovered-tab-top: 0px;\n --hovered-tab-bottom: 0px;\n --hovered-tab-width: 0px;\n --hovered-tab-height: 0px;\n --hovered-tab-opacity: 0;\n --hovered-transition-duration: 0s;\n }\n\n .HeaderNav_bui-HeaderNavList__203c060f73 {\n display: flex;\n flex-direction: row;\n list-style: none;\n margin: 0;\n padding: 0;\n }\n\n .HeaderNav_bui-HeaderNavItem__203c060f73,\n .HeaderNav_bui-HeaderNavGroup__203c060f73 {\n font-family: var(--bui-font-regular);\n font-size: var(--bui-font-size-3);\n font-weight: var(--bui-font-weight-regular);\n color: var(--bui-fg-secondary);\n height: 36px;\n display: flex;\n gap: var(--bui-space-1);\n align-items: center;\n padding-inline: var(--bui-space-2);\n text-decoration: none;\n cursor: pointer;\n position: relative;\n z-index: 2;\n border: none;\n background: none;\n outline: none;\n }\n\n .HeaderNav_bui-HeaderNavItem__203c060f73[aria-current='page'],\n .HeaderNav_bui-HeaderNavGroup__203c060f73[aria-current='page'] {\n color: var(--bui-fg-primary);\n }\n\n .HeaderNav_bui-HeaderNavActive__203c060f73 {\n pointer-events: none;\n position: absolute;\n bottom: -1px;\n left: calc(var(--active-tab-left) + var(--bui-space-2));\n width: calc(var(--active-tab-width) - var(--bui-space-4));\n height: 1px;\n background-color: var(--bui-fg-primary);\n border-radius: 4px;\n opacity: var(--active-tab-opacity);\n transition: left var(--active-transition-duration) ease-out,\n width var(--active-transition-duration) ease-out, opacity 0.15s;\n }\n\n .HeaderNav_bui-HeaderNavHovered__203c060f73 {\n pointer-events: none;\n position: absolute;\n left: var(--hovered-tab-left);\n top: calc(var(--hovered-tab-top) + 4px);\n width: var(--hovered-tab-width);\n height: calc(var(--hovered-tab-height) - 8px);\n background-color: var(--bui-bg-neutral-2);\n border-radius: 4px;\n opacity: var(--hovered-tab-opacity);\n transition: left var(--hovered-transition-duration) ease-out,\n top var(--hovered-transition-duration) ease-out,\n width var(--hovered-transition-duration) ease-out,\n height var(--hovered-transition-duration) ease-out, opacity 0.15s;\n\n [data-focus-visible] & {\n outline: 2px solid var(--bui-ring);\n outline-offset: -2px;\n }\n }\n\n @media (prefers-reduced-motion: reduce) {\n .HeaderNav_bui-HeaderNavActive__203c060f73,\n .HeaderNav_bui-HeaderNavHovered__203c060f73 {\n transition: none;\n }\n }\n}\n";
4
+ var styles = {"bui-HeaderNav":"HeaderNav_bui-HeaderNav__203c060f73","bui-HeaderNavList":"HeaderNav_bui-HeaderNavList__203c060f73","bui-HeaderNavItem":"HeaderNav_bui-HeaderNavItem__203c060f73","bui-HeaderNavGroup":"HeaderNav_bui-HeaderNavGroup__203c060f73","bui-HeaderNavActive":"HeaderNav_bui-HeaderNavActive__203c060f73","bui-HeaderNavHovered":"HeaderNav_bui-HeaderNavHovered__203c060f73"};
5
5
  styleInject(css_248z);
6
6
 
7
7
  export { styles as default };
@@ -4,6 +4,7 @@ import '../../hooks/useBreakpoint.esm.js';
4
4
  import '../../hooks/useBg.esm.js';
5
5
  import '../../hooks/useDefinition/helpers.esm.js';
6
6
  import '../../analytics/useAnalytics.esm.js';
7
+ import 'react-router-dom';
7
8
  import { defineComponent } from '../../hooks/useDefinition/defineComponent.esm.js';
8
9
  import styles from './HeaderNav.module.css.esm.js';
9
10
 
@@ -1 +1 @@
1
- {"version":3,"file":"HeaderNavDefinition.esm.js","sources":["../../../src/components/Header/HeaderNavDefinition.ts"],"sourcesContent":["/*\n * Copyright 2026 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { defineComponent } from '../../hooks/useDefinition';\nimport type { HeaderNavTabItem } from './types';\nimport styles from './HeaderNav.module.css';\n\n/** @public */\nexport const HeaderNavDefinition = defineComponent<{\n noTrack?: boolean;\n tabs: HeaderNavTabItem[];\n activeTabId?: string;\n children?: React.ReactNode;\n className?: string;\n}>()({\n styles,\n classNames: {\n root: 'bui-HeaderNav',\n list: 'bui-HeaderNavList',\n active: 'bui-HeaderNavActive',\n hovered: 'bui-HeaderNavHovered',\n },\n analytics: true,\n propDefs: {\n noTrack: {},\n tabs: {},\n activeTabId: {},\n children: {},\n className: {},\n },\n});\n\n/** @public */\nexport const HeaderNavItemDefinition = defineComponent<{\n className?: string;\n}>()({\n styles,\n classNames: {\n root: 'bui-HeaderNavItem',\n },\n propDefs: {\n className: {},\n },\n});\n\n/** @public */\nexport const HeaderNavGroupDefinition = defineComponent<{\n className?: string;\n}>()({\n styles,\n classNames: {\n root: 'bui-HeaderNavGroup',\n },\n propDefs: {\n className: {},\n },\n});\n"],"names":[],"mappings":";;;;;;;;;AAqBO,MAAM,mBAAA,GAAsB,iBAMhC,CAAE;AAAA,EACH,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,eAAA;AAAA,IACN,IAAA,EAAM,mBAAA;AAAA,IACN,MAAA,EAAQ,qBAAA;AAAA,IACR,OAAA,EAAS;AAAA,GACX;AAAA,EACA,SAAA,EAAW,IAAA;AAAA,EACX,QAAA,EAAU;AAAA,IACR,SAAS,EAAC;AAAA,IACV,MAAM,EAAC;AAAA,IACP,aAAa,EAAC;AAAA,IACd,UAAU,EAAC;AAAA,IACX,WAAW;AAAC;AAEhB,CAAC;AAGM,MAAM,uBAAA,GAA0B,iBAEpC,CAAE;AAAA,EACH,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA,QAAA,EAAU;AAAA,IACR,WAAW;AAAC;AAEhB,CAAC;AAGM,MAAM,wBAAA,GAA2B,iBAErC,CAAE;AAAA,EACH,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":"HeaderNavDefinition.esm.js","sources":["../../../src/components/Header/HeaderNavDefinition.ts"],"sourcesContent":["/*\n * Copyright 2026 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { defineComponent } from '../../hooks/useDefinition';\nimport type { HeaderNavTabItem } from './types';\nimport styles from './HeaderNav.module.css';\n\n/** @public */\nexport const HeaderNavDefinition = defineComponent<{\n noTrack?: boolean;\n tabs: HeaderNavTabItem[];\n activeTabId?: string;\n children?: React.ReactNode;\n className?: string;\n}>()({\n styles,\n classNames: {\n root: 'bui-HeaderNav',\n list: 'bui-HeaderNavList',\n active: 'bui-HeaderNavActive',\n hovered: 'bui-HeaderNavHovered',\n },\n analytics: true,\n propDefs: {\n noTrack: {},\n tabs: {},\n activeTabId: {},\n children: {},\n className: {},\n },\n});\n\n/** @public */\nexport const HeaderNavItemDefinition = defineComponent<{\n className?: string;\n}>()({\n styles,\n classNames: {\n root: 'bui-HeaderNavItem',\n },\n propDefs: {\n className: {},\n },\n});\n\n/** @public */\nexport const HeaderNavGroupDefinition = defineComponent<{\n className?: string;\n}>()({\n styles,\n classNames: {\n root: 'bui-HeaderNavGroup',\n },\n propDefs: {\n className: {},\n },\n});\n"],"names":[],"mappings":";;;;;;;;;;AAqBO,MAAM,mBAAA,GAAsB,iBAMhC,CAAE;AAAA,EACH,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,eAAA;AAAA,IACN,IAAA,EAAM,mBAAA;AAAA,IACN,MAAA,EAAQ,qBAAA;AAAA,IACR,OAAA,EAAS;AAAA,GACX;AAAA,EACA,SAAA,EAAW,IAAA;AAAA,EACX,QAAA,EAAU;AAAA,IACR,SAAS,EAAC;AAAA,IACV,MAAM,EAAC;AAAA,IACP,aAAa,EAAC;AAAA,IACd,UAAU,EAAC;AAAA,IACX,WAAW;AAAC;AAEhB,CAAC;AAGM,MAAM,uBAAA,GAA0B,iBAEpC,CAAE;AAAA,EACH,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA,QAAA,EAAU;AAAA,IACR,WAAW;AAAC;AAEhB,CAAC;AAGM,MAAM,wBAAA,GAA2B,iBAErC,CAAE;AAAA,EACH,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA,QAAA,EAAU;AAAA,IACR,WAAW;AAAC;AAEhB,CAAC;;;;"}
@@ -4,6 +4,7 @@ import '../../hooks/useBreakpoint.esm.js';
4
4
  import '../../hooks/useBg.esm.js';
5
5
  import '../../hooks/useDefinition/helpers.esm.js';
6
6
  import '../../analytics/useAnalytics.esm.js';
7
+ import 'react-router-dom';
7
8
  import { defineComponent } from '../../hooks/useDefinition/defineComponent.esm.js';
8
9
  import styles from './Header.module.css.esm.js';
9
10
 
@@ -1 +1 @@
1
- {"version":3,"file":"definition.esm.js","sources":["../../../src/components/Header/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 { HeaderOwnProps } from './types';\nimport styles from './Header.module.css';\n\n/**\n * Component definition for Header\n * @public\n */\nexport const HeaderDefinition = defineComponent<HeaderOwnProps>()({\n styles,\n classNames: {\n root: 'bui-Header',\n content: 'bui-HeaderContent',\n breadcrumbs: 'bui-HeaderBreadcrumbs',\n tabsWrapper: 'bui-HeaderTabsWrapper',\n controls: 'bui-HeaderControls',\n },\n propDefs: {\n title: {},\n customActions: {},\n tabs: {},\n activeTabId: {},\n breadcrumbs: {},\n className: {},\n },\n});\n\n/**\n * @public\n * @deprecated Use {@link HeaderDefinition} instead.\n */\nexport const HeaderPageDefinition = HeaderDefinition;\n"],"names":[],"mappings":";;;;;;;;;AAwBO,MAAM,gBAAA,GAAmB,iBAAgC,CAAE;AAAA,EAChE,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,YAAA;AAAA,IACN,OAAA,EAAS,mBAAA;AAAA,IACT,WAAA,EAAa,uBAAA;AAAA,IACb,WAAA,EAAa,uBAAA;AAAA,IACb,QAAA,EAAU;AAAA,GACZ;AAAA,EACA,QAAA,EAAU;AAAA,IACR,OAAO,EAAC;AAAA,IACR,eAAe,EAAC;AAAA,IAChB,MAAM,EAAC;AAAA,IACP,aAAa,EAAC;AAAA,IACd,aAAa,EAAC;AAAA,IACd,WAAW;AAAC;AAEhB,CAAC;AAMM,MAAM,oBAAA,GAAuB;;;;"}
1
+ {"version":3,"file":"definition.esm.js","sources":["../../../src/components/Header/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 { HeaderOwnProps } from './types';\nimport styles from './Header.module.css';\n\n/**\n * Component definition for Header\n * @public\n */\nexport const HeaderDefinition = defineComponent<HeaderOwnProps>()({\n styles,\n classNames: {\n root: 'bui-Header',\n content: 'bui-HeaderContent',\n breadcrumbs: 'bui-HeaderBreadcrumbs',\n tabsWrapper: 'bui-HeaderTabsWrapper',\n controls: 'bui-HeaderControls',\n },\n propDefs: {\n title: {},\n customActions: {},\n tabs: {},\n activeTabId: {},\n breadcrumbs: {},\n className: {},\n },\n});\n\n/**\n * @public\n * @deprecated Use {@link HeaderDefinition} instead.\n */\nexport const HeaderPageDefinition = HeaderDefinition;\n"],"names":[],"mappings":";;;;;;;;;;AAwBO,MAAM,gBAAA,GAAmB,iBAAgC,CAAE;AAAA,EAChE,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,YAAA;AAAA,IACN,OAAA,EAAS,mBAAA;AAAA,IACT,WAAA,EAAa,uBAAA;AAAA,IACb,WAAA,EAAa,uBAAA;AAAA,IACb,QAAA,EAAU;AAAA,GACZ;AAAA,EACA,QAAA,EAAU;AAAA,IACR,OAAO,EAAC;AAAA,IACR,eAAe,EAAC;AAAA,IAChB,MAAM,EAAC;AAAA,IACP,aAAa,EAAC;AAAA,IACd,aAAa,EAAC;AAAA,IACd,WAAW;AAAC;AAEhB,CAAC;AAMM,MAAM,oBAAA,GAAuB;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Link.esm.js","sources":["../../../src/components/Link/Link.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, useRef } from 'react';\nimport { useLink } from 'react-aria';\nimport type { LinkProps } from './types';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport { LinkDefinition } from './definition';\nimport { getNodeText } from '../../analytics/getNodeText';\n\nconst LinkInternal = forwardRef<HTMLAnchorElement, LinkProps>((props, ref) => {\n const { ownProps, restProps, dataAttributes, analytics } = useDefinition(\n LinkDefinition,\n props,\n );\n const { classes, title, children } = ownProps;\n\n const internalRef = useRef<HTMLAnchorElement>(null);\n const linkRef = (ref || internalRef) as React.RefObject<HTMLAnchorElement>;\n\n const { linkProps } = useLink(restProps, linkRef);\n\n const handleClick = (e: React.MouseEvent<HTMLAnchorElement>) => {\n linkProps.onClick?.(e);\n const text =\n restProps['aria-label'] ??\n getNodeText(children) ??\n String(restProps.href ?? '');\n analytics.captureEvent('click', text, {\n attributes: { to: String(restProps.href ?? '') },\n });\n };\n\n return (\n <a\n {...linkProps}\n {...dataAttributes}\n {...(restProps as React.AnchorHTMLAttributes<HTMLAnchorElement>)}\n ref={linkRef}\n title={title}\n className={classes.root}\n onClick={handleClick}\n >\n {children}\n </a>\n );\n});\n\nLinkInternal.displayName = 'LinkInternal';\n\n/** @public */\nexport const Link = forwardRef<HTMLAnchorElement, LinkProps>((props, ref) => {\n return <LinkInternal {...props} ref={ref} />;\n});\n\nLink.displ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EAAO,GAAA,KAAQ;AAC3E,EAAA,uBAAO,GAAA,CAAC,YAAA,EAAA,EAAc,GAAG,KAAA,EAAO,GAAA,EAAU,CAAA;AAC5C,CAAC;AAED,IAAA,CAAK,WAAA,GAAc,MAAA;;;;"}
1
+ {"version":3,"file":"Link.esm.js","sources":["../../../src/components/Link/Link.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, useRef } from 'react';\nimport { useLink } from 'react-aria';\nimport type { LinkProps } from './types';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport { LinkDefinition } from './definition';\nimport { getNodeText } from '../../analytics/getNodeText';\n\nconst LinkInternal = forwardRef<HTMLAnchorElement, LinkProps>((props, ref) => {\n const { ownProps, restProps, dataAttributes, analytics } = useDefinition(\n LinkDefinition,\n props,\n );\n const { classes, title, children } = ownProps;\n\n const internalRef = useRef<HTMLAnchorElement>(null);\n const linkRef = (ref || internalRef) as React.RefObject<HTMLAnchorElement>;\n\n const { linkProps } = useLink(restProps, linkRef);\n\n const handleClick = (e: React.MouseEvent<HTMLAnchorElement>) => {\n linkProps.onClick?.(e);\n const text =\n restProps['aria-label'] ??\n getNodeText(children) ??\n String(restProps.href ?? '');\n analytics.captureEvent('click', text, {\n attributes: { to: String(restProps.href ?? '') },\n });\n };\n\n return (\n <a\n {...linkProps}\n {...dataAttributes}\n {...(restProps as React.AnchorHTMLAttributes<HTMLAnchorElement>)}\n ref={linkRef}\n title={title}\n className={classes.root}\n onClick={handleClick}\n >\n {children}\n </a>\n );\n});\n\nLinkInternal.displayName = 'LinkInternal';\n\n/**\n * A styled anchor element that supports analytics event tracking on click.\n *\n * @public\n */\nexport const Link = forwardRef<HTMLAnchorElement, LinkProps>((props, ref) => {\n return <LinkInternal {...props} ref={ref} />;\n});\n\nLink.displayName = 'Link';\n"],"names":[],"mappings":";;;;;;;AAuBA,MAAM,YAAA,GAAe,UAAA,CAAyC,CAAC,KAAA,EAAO,GAAA,KAAQ;AAC5E,EAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAW,cAAA,EAAgB,WAAU,GAAI,aAAA;AAAA,IACzD,cAAA;AAAA,IACA;AAAA,GACF;AACA,EAAA,MAAM,EAAE,OAAA,EAAS,KAAA,EAAO,QAAA,EAAS,GAAI,QAAA;AAErC,EAAA,MAAM,WAAA,GAAc,OAA0B,IAAI,CAAA;AAClD,EAAA,MAAM,UAAW,GAAA,IAAO,WAAA;AAExB,EAAA,MAAM,EAAE,SAAA,EAAU,GAAI,OAAA,CAAQ,WAAW,OAAO,CAAA;AAEhD,EAAA,MAAM,WAAA,GAAc,CAAC,CAAA,KAA2C;AAC9D,IAAA,SAAA,CAAU,UAAU,CAAC,CAAA;AACrB,IAAA,MAAM,IAAA,GACJ,SAAA,CAAU,YAAY,CAAA,IACtB,WAAA,CAAY,QAAQ,CAAA,IACpB,MAAA,CAAO,SAAA,CAAU,IAAA,IAAQ,EAAE,CAAA;AAC7B,IAAA,SAAA,CAAU,YAAA,CAAa,SAAS,IAAA,EAAM;AAAA,MACpC,YAAY,EAAE,EAAA,EAAI,OAAO,SAAA,CAAU,IAAA,IAAQ,EAAE,CAAA;AAAE,KAChD,CAAA;AAAA,EACH,CAAA;AAEA,EAAA,uBACE,GAAA;AAAA,IAAC,GAAA;AAAA,IAAA;AAAA,MACE,GAAG,SAAA;AAAA,MACH,GAAG,cAAA;AAAA,MACH,GAAI,SAAA;AAAA,MACL,GAAA,EAAK,OAAA;AAAA,MACL,KAAA;AAAA,MACA,WAAW,OAAA,CAAQ,IAAA;AAAA,MACnB,OAAA,EAAS,WAAA;AAAA,MAER;AAAA;AAAA,GACH;AAEJ,CAAC,CAAA;AAED,YAAA,CAAa,WAAA,GAAc,cAAA;AAOpB,MAAM,IAAA,GAAO,UAAA,CAAyC,CAAC,KAAA,EAAO,GAAA,KAAQ;AAC3E,EAAA,uBAAO,GAAA,CAAC,YAAA,EAAA,EAAc,GAAG,KAAA,EAAO,GAAA,EAAU,CAAA;AAC5C,CAAC;AAED,IAAA,CAAK,WAAA,GAAc,MAAA;;;;"}
@@ -4,6 +4,7 @@ import '../../hooks/useBreakpoint.esm.js';
4
4
  import '../../hooks/useBg.esm.js';
5
5
  import '../../hooks/useDefinition/helpers.esm.js';
6
6
  import '../../analytics/useAnalytics.esm.js';
7
+ import 'react-router-dom';
7
8
  import { defineComponent } from '../../hooks/useDefinition/defineComponent.esm.js';
8
9
  import styles from './Link.module.css.esm.js';
9
10
 
@@ -13,6 +14,7 @@ const LinkDefinition = defineComponent()({
13
14
  root: "bui-Link"
14
15
  },
15
16
  analytics: true,
17
+ resolveHref: true,
16
18
  propDefs: {
17
19
  noTrack: {},
18
20
  variant: { dataAttribute: true, default: "body-medium" },
@@ -1 +1 @@
1
- {"version":3,"file":"definition.esm.js","sources":["../../../src/components/Link/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 { LinkOwnProps } from './types';\nimport styles from './Link.module.css';\n\n/**\n * Component definition for Link\n * @public\n */\nexport const LinkDefinition = defineComponent<LinkOwnProps>()({\n styles,\n classNames: {\n root: 'bui-Link',\n },\n analytics: true,\n propDefs: {\n noTrack: {},\n variant: { dataAttribute: true, default: 'body-medium' },\n weight: { dataAttribute: true, default: 'regular' },\n color: { dataAttribute: true, default: 'primary' },\n truncate: { dataAttribute: true },\n standalone: { dataAttribute: true },\n title: {},\n children: {},\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,SAAA,EAAW,IAAA;AAAA,EACX,QAAA,EAAU;AAAA,IACR,SAAS,EAAC;AAAA,IACV,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,UAAA,EAAY,EAAE,aAAA,EAAe,IAAA,EAAK;AAAA,IAClC,OAAO,EAAC;AAAA,IACR,UAAU,EAAC;AAAA,IACX,WAAW;AAAC;AAEhB,CAAC;;;;"}
1
+ {"version":3,"file":"definition.esm.js","sources":["../../../src/components/Link/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 { LinkOwnProps } from './types';\nimport styles from './Link.module.css';\n\n/**\n * Component definition for Link\n * @public\n */\nexport const LinkDefinition = defineComponent<LinkOwnProps>()({\n styles,\n classNames: {\n root: 'bui-Link',\n },\n analytics: true,\n resolveHref: true,\n propDefs: {\n noTrack: {},\n variant: { dataAttribute: true, default: 'body-medium' },\n weight: { dataAttribute: true, default: 'regular' },\n color: { dataAttribute: true, default: 'primary' },\n truncate: { dataAttribute: true },\n standalone: { dataAttribute: true },\n title: {},\n children: {},\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,SAAA,EAAW,IAAA;AAAA,EACX,WAAA,EAAa,IAAA;AAAA,EACb,QAAA,EAAU;AAAA,IACR,SAAS,EAAC;AAAA,IACV,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,UAAA,EAAY,EAAE,aAAA,EAAe,IAAA,EAAK;AAAA,IAClC,OAAO,EAAC;AAAA,IACR,UAAU,EAAC;AAAA,IACX,WAAW;AAAC;AAEhB,CAAC;;;;"}
@@ -4,6 +4,7 @@ import '../../hooks/useBreakpoint.esm.js';
4
4
  import '../../hooks/useBg.esm.js';
5
5
  import '../../hooks/useDefinition/helpers.esm.js';
6
6
  import '../../analytics/useAnalytics.esm.js';
7
+ import 'react-router-dom';
7
8
  import { defineComponent } from '../../hooks/useDefinition/defineComponent.esm.js';
8
9
  import styles from './List.module.css.esm.js';
9
10
 
@@ -22,6 +23,7 @@ const ListDefinition = defineComponent()({
22
23
  const ListRowDefinition = defineComponent()({
23
24
  styles,
24
25
  bg: "consumer",
26
+ resolveHref: true,
25
27
  classNames: {
26
28
  root: "bui-ListRow",
27
29
  check: "bui-ListRowCheck",
@@ -1 +1 @@
1
- {"version":3,"file":"definition.esm.js","sources":["../../../src/components/List/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 { ListOwnProps, ListRowOwnProps } from './types';\nimport styles from './List.module.css';\n\n/**\n * Component definition for List\n * @public\n */\nexport const ListDefinition = defineComponent<ListOwnProps>()({\n styles,\n classNames: {\n root: 'bui-List',\n },\n propDefs: {\n items: {},\n children: {},\n renderEmptyState: {},\n className: {},\n },\n});\n\n/**\n * Component definition for ListRow\n * @public\n */\nexport const ListRowDefinition = defineComponent<ListRowOwnProps>()({\n styles,\n bg: 'consumer',\n classNames: {\n root: 'bui-ListRow',\n check: 'bui-ListRowCheck',\n icon: 'bui-ListRowIcon',\n label: 'bui-ListRowLabel',\n description: 'bui-ListRowDescription',\n actions: 'bui-ListRowActions',\n },\n propDefs: {\n children: {},\n description: {},\n icon: {},\n menuItems: {},\n customActions: {},\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,OAAO,EAAC;AAAA,IACR,UAAU,EAAC;AAAA,IACX,kBAAkB,EAAC;AAAA,IACnB,WAAW;AAAC;AAEhB,CAAC;AAMM,MAAM,iBAAA,GAAoB,iBAAiC,CAAE;AAAA,EAClE,MAAA;AAAA,EACA,EAAA,EAAI,UAAA;AAAA,EACJ,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,aAAA;AAAA,IACN,KAAA,EAAO,kBAAA;AAAA,IACP,IAAA,EAAM,iBAAA;AAAA,IACN,KAAA,EAAO,kBAAA;AAAA,IACP,WAAA,EAAa,wBAAA;AAAA,IACb,OAAA,EAAS;AAAA,GACX;AAAA,EACA,QAAA,EAAU;AAAA,IACR,UAAU,EAAC;AAAA,IACX,aAAa,EAAC;AAAA,IACd,MAAM,EAAC;AAAA,IACP,WAAW,EAAC;AAAA,IACZ,eAAe,EAAC;AAAA,IAChB,WAAW;AAAC;AAEhB,CAAC;;;;"}
1
+ {"version":3,"file":"definition.esm.js","sources":["../../../src/components/List/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 { ListOwnProps, ListRowOwnProps } from './types';\nimport styles from './List.module.css';\n\n/**\n * Component definition for List\n * @public\n */\nexport const ListDefinition = defineComponent<ListOwnProps>()({\n styles,\n classNames: {\n root: 'bui-List',\n },\n propDefs: {\n items: {},\n children: {},\n renderEmptyState: {},\n className: {},\n },\n});\n\n/**\n * Component definition for ListRow\n * @public\n */\nexport const ListRowDefinition = defineComponent<ListRowOwnProps>()({\n styles,\n bg: 'consumer',\n resolveHref: true,\n classNames: {\n root: 'bui-ListRow',\n check: 'bui-ListRowCheck',\n icon: 'bui-ListRowIcon',\n label: 'bui-ListRowLabel',\n description: 'bui-ListRowDescription',\n actions: 'bui-ListRowActions',\n },\n propDefs: {\n children: {},\n description: {},\n icon: {},\n menuItems: {},\n customActions: {},\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,OAAO,EAAC;AAAA,IACR,UAAU,EAAC;AAAA,IACX,kBAAkB,EAAC;AAAA,IACnB,WAAW;AAAC;AAEhB,CAAC;AAMM,MAAM,iBAAA,GAAoB,iBAAiC,CAAE;AAAA,EAClE,MAAA;AAAA,EACA,EAAA,EAAI,UAAA;AAAA,EACJ,WAAA,EAAa,IAAA;AAAA,EACb,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,aAAA;AAAA,IACN,KAAA,EAAO,kBAAA;AAAA,IACP,IAAA,EAAM,iBAAA;AAAA,IACN,KAAA,EAAO,kBAAA;AAAA,IACP,WAAA,EAAa,wBAAA;AAAA,IACb,OAAA,EAAS;AAAA,GACX;AAAA,EACA,QAAA,EAAU;AAAA,IACR,UAAU,EAAC;AAAA,IACX,aAAa,EAAC;AAAA,IACd,MAAM,EAAC;AAAA,IACP,WAAW,EAAC;AAAA,IACZ,eAAe,EAAC;AAAA,IAChB,WAAW;AAAC;AAEhB,CAAC;;;;"}
@@ -1,7 +1,7 @@
1
1
  import { jsx, jsxs } from 'react/jsx-runtime';
2
- import { MenuTrigger as MenuTrigger$1, SubmenuTrigger as SubmenuTrigger$1, Menu as Menu$1, Popover, Virtualizer, ListLayout, ListBox, useFilter, Autocomplete, SearchField, Input, Button, MenuItem as MenuItem$1, ListBoxItem, MenuSection as MenuSection$1, Header, Separator } from 'react-aria-components';
2
+ import { Menu as Menu$1, Popover, Virtualizer, ListLayout, useFilter, Autocomplete, SearchField, Input, Button, ListBox, MenuItem as MenuItem$1, ListBoxItem, MenuSection as MenuSection$1, Header, Separator, MenuTrigger as MenuTrigger$1, SubmenuTrigger as SubmenuTrigger$1 } from 'react-aria-components';
3
3
  import { useDefinition } from '../../hooks/useDefinition/useDefinition.esm.js';
4
- import { MenuDefinition, MenuListBoxDefinition, MenuAutocompleteDefinition, MenuAutocompleteListboxDefinition, MenuItemDefinition, MenuListBoxItemDefinition, MenuSectionDefinition, MenuSeparatorDefinition, MenuEmptyStateDefinition } from './definition.esm.js';
4
+ import { MenuDefinition, MenuAutocompleteDefinition, MenuAutocompleteListboxDefinition, MenuItemDefinition, MenuListBoxDefinition, MenuListBoxItemDefinition, MenuSectionDefinition, MenuSeparatorDefinition, MenuEmptyStateDefinition } from './definition.esm.js';
5
5
  import { RiCloseCircleLine, RiArrowRightSLine, RiCheckLine } from '@remixicon/react';
6
6
  import { isInternalLink } from '../../utils/linkUtils.esm.js';
7
7
  import { getNodeText } from '../../analytics/getNodeText.esm.js';
@@ -1 +1 @@
1
- {"version":3,"file":"Menu.esm.js","sources":["../../../src/components/Menu/Menu.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 {\n MenuTrigger as RAMenuTrigger,\n Popover as RAPopover,\n MenuItem as RAMenuItem,\n Menu as RAMenu,\n MenuSection as RAMenuSection,\n Header as RAMenuHeader,\n Separator as RAMenuSeparator,\n SubmenuTrigger as RAMenuSubmenuTrigger,\n Autocomplete as RAAutocomplete,\n SearchField as RASearchField,\n Input as RAInput,\n Button as RAButton,\n ListBox as RAListBox,\n ListBoxItem as RAListBoxItem,\n useFilter,\n Virtualizer,\n ListLayout,\n} from 'react-aria-components';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport {\n MenuDefinition,\n MenuListBoxDefinition,\n MenuAutocompleteDefinition,\n MenuAutocompleteListboxDefinition,\n MenuItemDefinition,\n MenuListBoxItemDefinition,\n MenuSectionDefinition,\n MenuSeparatorDefinition,\n MenuEmptyStateDefinition,\n} from './definition';\nimport type {\n MenuTriggerProps,\n SubmenuTriggerProps,\n MenuProps,\n MenuAutocompleteProps,\n MenuItemProps,\n MenuSectionProps,\n MenuSeparatorProps,\n MenuListBoxProps,\n MenuListBoxItemProps,\n MenuAutocompleteListBoxProps,\n} from './types';\nimport {\n RiArrowRightSLine,\n RiCheckLine,\n RiCloseCircleLine,\n} from '@remixicon/react';\nimport { isInternalLink } from '../../utils/linkUtils';\nimport { getNodeText } from '../../analytics/getNodeText';\nimport { Box } from '../Box';\nimport { BgReset } from '../../hooks/useBg';\n\n// The height will be used for virtualized menus. It should match the size set in CSS for each menu item.\nconst rowHeight = 32;\n\nconst MenuEmptyState = () => {\n const { ownProps } = useDefinition(MenuEmptyStateDefinition, {});\n\n return <div className={ownProps.classes.root}>No results found.</div>;\n};\n\n/** @public */\nexport const MenuTrigger = (props: MenuTriggerProps) => {\n return <RAMenuTrigger {...props} />;\n};\n\n/** @public */\nexport const SubmenuTrigger = (props: SubmenuTriggerProps) => {\n return <RAMenuSubmenuTrigger {...props} />;\n};\n\n/** @public */\nexport const Menu = (props: MenuProps<object>) => {\n const { ownProps, restProps } = useDefinition(MenuDefinition, props);\n const { classes, placement, virtualized, maxWidth, maxHeight, style } =\n ownProps;\n\n let newMaxWidth = maxWidth || (virtualized ? '260px' : 'undefined');\n\n const menuContent = (\n <RAMenu\n className={classes.content}\n renderEmptyState={() => <MenuEmptyState />}\n style={{ width: newMaxWidth, maxHeight, ...style }}\n {...restProps}\n />\n );\n\n return (\n <RAPopover className={classes.root} placement={placement}>\n <BgReset>\n <Box bg=\"neutral\" className={classes.inner}>\n {virtualized ? (\n <Virtualizer\n layout={ListLayout}\n layoutOptions={{\n rowHeight,\n }}\n >\n {menuContent}\n </Virtualizer>\n ) : (\n menuContent\n )}\n </Box>\n </BgReset>\n </RAPopover>\n );\n};\n\n/** @public */\nexport const MenuListBox = (props: MenuListBoxProps<object>) => {\n const { ownProps, restProps } = useDefinition(MenuListBoxDefinition, props);\n const {\n classes,\n selectionMode,\n placement,\n virtualized,\n maxWidth,\n maxHeight,\n style,\n } = ownProps;\n let newMaxWidth = maxWidth || (virtualized ? '260px' : 'undefined');\n\n const listBoxContent = (\n <RAListBox\n className={classes.content}\n selectionMode={selectionMode}\n style={{ width: newMaxWidth, maxHeight, ...style }}\n {...restProps}\n />\n );\n\n return (\n <RAPopover className={classes.root} placement={placement}>\n <BgReset>\n <Box bg=\"neutral\" className={classes.inner}>\n {virtualized ? (\n <Virtualizer\n layout={ListLayout}\n layoutOptions={{\n rowHeight,\n }}\n >\n {listBoxContent}\n </Virtualizer>\n ) : (\n listBoxContent\n )}\n </Box>\n </BgReset>\n </RAPopover>\n );\n};\n\n/** @public */\nexport const MenuAutocomplete = (props: MenuAutocompleteProps<object>) => {\n const { ownProps, restProps } = useDefinition(\n MenuAutocompleteDefinition,\n props,\n );\n const {\n classes,\n placement,\n virtualized,\n maxWidth,\n maxHeight,\n style,\n placeholder,\n } = ownProps;\n const { contains } = useFilter({ sensitivity: 'base' });\n let newMaxWidth = maxWidth || (virtualized ? '260px' : 'undefined');\n\n const menuContent = (\n <RAMenu\n className={classes.content}\n renderEmptyState={() => <MenuEmptyState />}\n style={{ width: newMaxWidth, maxHeight, ...style }}\n {...restProps}\n />\n );\n\n return (\n <RAPopover className={classes.root} placement={placement}>\n <BgReset>\n <Box bg=\"neutral\" className={classes.inner}>\n <RAAutocomplete filter={contains}>\n <RASearchField\n className={classes.searchField}\n aria-label={placeholder || 'Search'}\n >\n <RAInput\n className={classes.searchFieldInput}\n placeholder={placeholder || 'Search...'}\n />\n <RAButton className={classes.searchFieldClear}>\n <RiCloseCircleLine />\n </RAButton>\n </RASearchField>\n {virtualized ? (\n <Virtualizer\n layout={ListLayout}\n layoutOptions={{\n rowHeight,\n }}\n >\n {menuContent}\n </Virtualizer>\n ) : (\n menuContent\n )}\n </RAAutocomplete>\n </Box>\n </BgReset>\n </RAPopover>\n );\n};\n\n/** @public */\nexport const MenuAutocompleteListbox = (\n props: MenuAutocompleteListBoxProps<object>,\n) => {\n const { ownProps, restProps } = useDefinition(\n MenuAutocompleteListboxDefinition,\n props,\n );\n const {\n classes,\n selectionMode,\n placement,\n virtualized,\n maxWidth,\n maxHeight,\n style,\n placeholder,\n } = ownProps;\n const { contains } = useFilter({ sensitivity: 'base' });\n let newMaxWidth = maxWidth || (virtualized ? '260px' : 'undefined');\n\n const listBoxContent = (\n <RAListBox\n className={classes.content}\n renderEmptyState={() => <MenuEmptyState />}\n selectionMode={selectionMode}\n style={{ width: newMaxWidth, maxHeight, ...style }}\n {...restProps}\n />\n );\n\n return (\n <RAPopover className={classes.root} placement={placement}>\n <BgReset>\n <Box bg=\"neutral\" className={classes.inner}>\n <RAAutocomplete filter={contains}>\n <RASearchField\n className={classes.searchField}\n aria-label={placeholder || 'Search'}\n >\n <RAInput\n className={classes.searchFieldInput}\n placeholder={placeholder || 'Search...'}\n />\n <RAButton className={classes.searchFieldClear}>\n <RiCloseCircleLine />\n </RAButton>\n </RASearchField>\n {virtualized ? (\n <Virtualizer\n layout={ListLayout}\n layoutOptions={{\n rowHeight,\n }}\n >\n {listBoxContent}\n </Virtualizer>\n ) : (\n listBoxContent\n )}\n </RAAutocomplete>\n </Box>\n </BgReset>\n </RAPopover>\n );\n};\n\n/** @public */\nexport const MenuItem = (props: MenuItemProps) => {\n const { ownProps, restProps, dataAttributes, analytics } = useDefinition(\n MenuItemDefinition,\n props,\n );\n const { classes, iconStart, children, href } = ownProps;\n\n const isExternal = href && !isInternalLink(href);\n\n return (\n <RAMenuItem\n className={classes.root}\n {...dataAttributes}\n href={href}\n target={isExternal ? '_blank' : undefined}\n rel={isExternal ? 'noopener noreferrer' : undefined}\n textValue={typeof children === 'string' ? children : undefined}\n {...restProps}\n onAction={() => {\n restProps.onAction?.();\n if (href) {\n const text =\n restProps['aria-label'] ?? getNodeText(children) ?? String(href);\n analytics.captureEvent('click', text, {\n attributes: { to: String(href) },\n });\n }\n }}\n >\n <div className={classes.itemContent}>\n {iconStart}\n {children}\n </div>\n <div className={classes.itemArrow}>\n <RiArrowRightSLine />\n </div>\n </RAMenuItem>\n );\n};\n\n/** @public */\nexport const MenuListBoxItem = (props: MenuListBoxItemProps) => {\n const { ownProps, restProps } = useDefinition(\n MenuListBoxItemDefinition,\n props,\n );\n const { classes, children } = ownProps;\n\n return (\n <RAListBoxItem\n textValue={typeof children === 'string' ? children : undefined}\n className={classes.root}\n {...restProps}\n >\n <div className={classes.itemContent}>\n <div className={classes.check}>\n <RiCheckLine />\n </div>\n {children}\n </div>\n </RAListBoxItem>\n );\n};\n\n/** @public */\nexport const MenuSection = (props: MenuSectionProps<object>) => {\n const { ownProps, restProps } = useDefinition(MenuSectionDefinition, props);\n const { classes, children, title } = ownProps;\n\n return (\n <RAMenuSection className={classes.root} {...restProps}>\n <RAMenuHeader className={classes.header}>{title}</RAMenuHeader>\n {children}\n </RAMenuSection>\n );\n};\n\n/** @public */\nexport const MenuSeparator = (props: MenuSeparatorProps) => {\n const { ownProps, restProps } = useDefinition(MenuSeparatorDefinition, props);\n\n return <RAMenuSeparator className={ownProps.classes.root} {...restProps} />;\n};\n"],"names":["RAMenuTrigger","RAMenuSubmenuTrigger","RAMenu","RAPopover","RAListBox","RAAutocomplete","RASearchField","RAInput","RAButton","RAMenuItem","RAListBoxItem","RAMenuSection","RAMenuHeader","RAMenuSeparator"],"mappings":";;;;;;;;;;;AAsEA,MAAM,SAAA,GAAY,EAAA;AAElB,MAAM,iBAAiB,MAAM;AAC3B,EAAA,MAAM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esm.js","sources":["../../../src/components/Menu/Menu.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 {\n MenuTrigger as RAMenuTrigger,\n Popover as RAPopover,\n MenuItem as RAMenuItem,\n Menu as RAMenu,\n MenuSection as RAMenuSection,\n Header as RAMenuHeader,\n Separator as RAMenuSeparator,\n SubmenuTrigger as RAMenuSubmenuTrigger,\n Autocomplete as RAAutocomplete,\n SearchField as RASearchField,\n Input as RAInput,\n Button as RAButton,\n ListBox as RAListBox,\n ListBoxItem as RAListBoxItem,\n useFilter,\n Virtualizer,\n ListLayout,\n} from 'react-aria-components';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport {\n MenuDefinition,\n MenuListBoxDefinition,\n MenuAutocompleteDefinition,\n MenuAutocompleteListboxDefinition,\n MenuItemDefinition,\n MenuListBoxItemDefinition,\n MenuSectionDefinition,\n MenuSeparatorDefinition,\n MenuEmptyStateDefinition,\n} from './definition';\nimport type {\n MenuTriggerProps,\n SubmenuTriggerProps,\n MenuProps,\n MenuAutocompleteProps,\n MenuItemProps,\n MenuSectionProps,\n MenuSeparatorProps,\n MenuListBoxProps,\n MenuListBoxItemProps,\n MenuAutocompleteListBoxProps,\n} from './types';\nimport {\n RiArrowRightSLine,\n RiCheckLine,\n RiCloseCircleLine,\n} from '@remixicon/react';\nimport { isInternalLink } from '../../utils/linkUtils';\nimport { getNodeText } from '../../analytics/getNodeText';\nimport { Box } from '../Box';\nimport { BgReset } from '../../hooks/useBg';\n\n// The height will be used for virtualized menus. It should match the size set in CSS for each menu item.\nconst rowHeight = 32;\n\nconst MenuEmptyState = () => {\n const { ownProps } = useDefinition(MenuEmptyStateDefinition, {});\n\n return <div className={ownProps.classes.root}>No results found.</div>;\n};\n\n/**\n * A wrapper that connects a trigger element to a dropdown menu, controlling its open and close state.\n *\n * @public\n */\nexport const MenuTrigger = (props: MenuTriggerProps) => {\n return <RAMenuTrigger {...props} />;\n};\n\n/** @public */\nexport const SubmenuTrigger = (props: SubmenuTriggerProps) => {\n return <RAMenuSubmenuTrigger {...props} />;\n};\n\n/** @public */\nexport const Menu = (props: MenuProps<object>) => {\n const { ownProps, restProps } = useDefinition(MenuDefinition, props);\n const { classes, placement, virtualized, maxWidth, maxHeight, style } =\n ownProps;\n\n let newMaxWidth = maxWidth || (virtualized ? '260px' : 'undefined');\n\n const menuContent = (\n <RAMenu\n className={classes.content}\n renderEmptyState={() => <MenuEmptyState />}\n style={{ width: newMaxWidth, maxHeight, ...style }}\n {...restProps}\n />\n );\n\n return (\n <RAPopover className={classes.root} placement={placement}>\n <BgReset>\n <Box bg=\"neutral\" className={classes.inner}>\n {virtualized ? (\n <Virtualizer\n layout={ListLayout}\n layoutOptions={{\n rowHeight,\n }}\n >\n {menuContent}\n </Virtualizer>\n ) : (\n menuContent\n )}\n </Box>\n </BgReset>\n </RAPopover>\n );\n};\n\n/** @public */\nexport const MenuListBox = (props: MenuListBoxProps<object>) => {\n const { ownProps, restProps } = useDefinition(MenuListBoxDefinition, props);\n const {\n classes,\n selectionMode,\n placement,\n virtualized,\n maxWidth,\n maxHeight,\n style,\n } = ownProps;\n let newMaxWidth = maxWidth || (virtualized ? '260px' : 'undefined');\n\n const listBoxContent = (\n <RAListBox\n className={classes.content}\n selectionMode={selectionMode}\n style={{ width: newMaxWidth, maxHeight, ...style }}\n {...restProps}\n />\n );\n\n return (\n <RAPopover className={classes.root} placement={placement}>\n <BgReset>\n <Box bg=\"neutral\" className={classes.inner}>\n {virtualized ? (\n <Virtualizer\n layout={ListLayout}\n layoutOptions={{\n rowHeight,\n }}\n >\n {listBoxContent}\n </Virtualizer>\n ) : (\n listBoxContent\n )}\n </Box>\n </BgReset>\n </RAPopover>\n );\n};\n\n/** @public */\nexport const MenuAutocomplete = (props: MenuAutocompleteProps<object>) => {\n const { ownProps, restProps } = useDefinition(\n MenuAutocompleteDefinition,\n props,\n );\n const {\n classes,\n placement,\n virtualized,\n maxWidth,\n maxHeight,\n style,\n placeholder,\n } = ownProps;\n const { contains } = useFilter({ sensitivity: 'base' });\n let newMaxWidth = maxWidth || (virtualized ? '260px' : 'undefined');\n\n const menuContent = (\n <RAMenu\n className={classes.content}\n renderEmptyState={() => <MenuEmptyState />}\n style={{ width: newMaxWidth, maxHeight, ...style }}\n {...restProps}\n />\n );\n\n return (\n <RAPopover className={classes.root} placement={placement}>\n <BgReset>\n <Box bg=\"neutral\" className={classes.inner}>\n <RAAutocomplete filter={contains}>\n <RASearchField\n className={classes.searchField}\n aria-label={placeholder || 'Search'}\n >\n <RAInput\n className={classes.searchFieldInput}\n placeholder={placeholder || 'Search...'}\n />\n <RAButton className={classes.searchFieldClear}>\n <RiCloseCircleLine />\n </RAButton>\n </RASearchField>\n {virtualized ? (\n <Virtualizer\n layout={ListLayout}\n layoutOptions={{\n rowHeight,\n }}\n >\n {menuContent}\n </Virtualizer>\n ) : (\n menuContent\n )}\n </RAAutocomplete>\n </Box>\n </BgReset>\n </RAPopover>\n );\n};\n\n/** @public */\nexport const MenuAutocompleteListbox = (\n props: MenuAutocompleteListBoxProps<object>,\n) => {\n const { ownProps, restProps } = useDefinition(\n MenuAutocompleteListboxDefinition,\n props,\n );\n const {\n classes,\n selectionMode,\n placement,\n virtualized,\n maxWidth,\n maxHeight,\n style,\n placeholder,\n } = ownProps;\n const { contains } = useFilter({ sensitivity: 'base' });\n let newMaxWidth = maxWidth || (virtualized ? '260px' : 'undefined');\n\n const listBoxContent = (\n <RAListBox\n className={classes.content}\n renderEmptyState={() => <MenuEmptyState />}\n selectionMode={selectionMode}\n style={{ width: newMaxWidth, maxHeight, ...style }}\n {...restProps}\n />\n );\n\n return (\n <RAPopover className={classes.root} placement={placement}>\n <BgReset>\n <Box bg=\"neutral\" className={classes.inner}>\n <RAAutocomplete filter={contains}>\n <RASearchField\n className={classes.searchField}\n aria-label={placeholder || 'Search'}\n >\n <RAInput\n className={classes.searchFieldInput}\n placeholder={placeholder || 'Search...'}\n />\n <RAButton className={classes.searchFieldClear}>\n <RiCloseCircleLine />\n </RAButton>\n </RASearchField>\n {virtualized ? (\n <Virtualizer\n layout={ListLayout}\n layoutOptions={{\n rowHeight,\n }}\n >\n {listBoxContent}\n </Virtualizer>\n ) : (\n listBoxContent\n )}\n </RAAutocomplete>\n </Box>\n </BgReset>\n </RAPopover>\n );\n};\n\n/** @public */\nexport const MenuItem = (props: MenuItemProps) => {\n const { ownProps, restProps, dataAttributes, analytics } = useDefinition(\n MenuItemDefinition,\n props,\n );\n const { classes, iconStart, children, href } = ownProps;\n\n const isExternal = href && !isInternalLink(href);\n\n return (\n <RAMenuItem\n className={classes.root}\n {...dataAttributes}\n href={href}\n target={isExternal ? '_blank' : undefined}\n rel={isExternal ? 'noopener noreferrer' : undefined}\n textValue={typeof children === 'string' ? children : undefined}\n {...restProps}\n onAction={() => {\n restProps.onAction?.();\n if (href) {\n const text =\n restProps['aria-label'] ?? getNodeText(children) ?? String(href);\n analytics.captureEvent('click', text, {\n attributes: { to: String(href) },\n });\n }\n }}\n >\n <div className={classes.itemContent}>\n {iconStart}\n {children}\n </div>\n <div className={classes.itemArrow}>\n <RiArrowRightSLine />\n </div>\n </RAMenuItem>\n );\n};\n\n/** @public */\nexport const MenuListBoxItem = (props: MenuListBoxItemProps) => {\n const { ownProps, restProps } = useDefinition(\n MenuListBoxItemDefinition,\n props,\n );\n const { classes, children } = ownProps;\n\n return (\n <RAListBoxItem\n textValue={typeof children === 'string' ? children : undefined}\n className={classes.root}\n {...restProps}\n >\n <div className={classes.itemContent}>\n <div className={classes.check}>\n <RiCheckLine />\n </div>\n {children}\n </div>\n </RAListBoxItem>\n );\n};\n\n/** @public */\nexport const MenuSection = (props: MenuSectionProps<object>) => {\n const { ownProps, restProps } = useDefinition(MenuSectionDefinition, props);\n const { classes, children, title } = ownProps;\n\n return (\n <RAMenuSection className={classes.root} {...restProps}>\n <RAMenuHeader className={classes.header}>{title}</RAMenuHeader>\n {children}\n </RAMenuSection>\n );\n};\n\n/** @public */\nexport const MenuSeparator = (props: MenuSeparatorProps) => {\n const { ownProps, restProps } = useDefinition(MenuSeparatorDefinition, props);\n\n return <RAMenuSeparator className={ownProps.classes.root} {...restProps} />;\n};\n"],"names":["RAMenuTrigger","RAMenuSubmenuTrigger","RAMenu","RAPopover","RAListBox","RAAutocomplete","RASearchField","RAInput","RAButton","RAMenuItem","RAListBoxItem","RAMenuSection","RAMenuHeader","RAMenuSeparator"],"mappings":";;;;;;;;;;;AAsEA,MAAM,SAAA,GAAY,EAAA;AAElB,MAAM,iBAAiB,MAAM;AAC3B,EAAA,MAAM,EAAE,QAAA,EAAS,GAAI,aAAA,CAAc,wBAAA,EAA0B,EAAE,CAAA;AAE/D,EAAA,2BAAQ,KAAA,EAAA,EAAI,SAAA,EAAW,QAAA,CAAS,OAAA,CAAQ,MAAM,QAAA,EAAA,mBAAA,EAAiB,CAAA;AACjE,CAAA;AAOO,MAAM,WAAA,GAAc,CAAC,KAAA,KAA4B;AACtD,EAAA,uBAAO,GAAA,CAACA,aAAA,EAAA,EAAe,GAAG,KAAA,EAAO,CAAA;AACnC;AAGO,MAAM,cAAA,GAAiB,CAAC,KAAA,KAA+B;AAC5D,EAAA,uBAAO,GAAA,CAACC,gBAAA,EAAA,EAAsB,GAAG,KAAA,EAAO,CAAA;AAC1C;AAGO,MAAM,IAAA,GAAO,CAAC,KAAA,KAA6B;AAChD,EAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAU,GAAI,aAAA,CAAc,gBAAgB,KAAK,CAAA;AACnE,EAAA,MAAM,EAAE,OAAA,EAAS,SAAA,EAAW,aAAa,QAAA,EA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MAAM,EAAE,OAAA,EAAS,QAAA,EAAU,KAAA,EAAM,GAAI,QAAA;AAErC,EAAA,4BACGC,aAAA,EAAA,EAAc,SAAA,EAAW,OAAA,CAAQ,IAAA,EAAO,GAAG,SAAA,EAC1C,QAAA,EAAA;AAAA,oBAAA,GAAA,CAACC,MAAA,EAAA,EAAa,SAAA,EAAW,OAAA,CAAQ,MAAA,EAAS,QAAA,EAAA,KAAA,EAAM,CAAA;AAAA,IAC/C;AAAA,GAAA,EACH,CAAA;AAEJ;AAGO,MAAM,aAAA,GAAgB,CAAC,KAAA,KAA8B;AAC1D,EAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAU,GAAI,aAAA,CAAc,yBAAyB,KAAK,CAAA;AAE5E,EAAA,2BAAQC,SAAA,EAAA,EAAgB,SAAA,EAAW,SAAS,OAAA,CAAQ,IAAA,EAAO,GAAG,SAAA,EAAW,CAAA;AAC3E;;;;"}
@@ -4,6 +4,7 @@ import '../../hooks/useBreakpoint.esm.js';
4
4
  import '../../hooks/useBg.esm.js';
5
5
  import '../../hooks/useDefinition/helpers.esm.js';
6
6
  import '../../analytics/useAnalytics.esm.js';
7
+ import 'react-router-dom';
7
8
  import { defineComponent } from '../../hooks/useDefinition/defineComponent.esm.js';
8
9
  import styles from './Menu.module.css.esm.js';
9
10
 
@@ -64,6 +65,7 @@ const MenuItemDefinition = defineComponent()({
64
65
  itemArrow: "bui-MenuItemArrow"
65
66
  },
66
67
  analytics: true,
68
+ resolveHref: true,
67
69
  propDefs: {
68
70
  iconStart: {},
69
71
  children: {},
@@ -75,6 +77,7 @@ const MenuItemDefinition = defineComponent()({
75
77
  });
76
78
  const MenuListBoxItemDefinition = defineComponent()({
77
79
  styles,
80
+ resolveHref: true,
78
81
  classNames: {
79
82
  root: "bui-MenuItemListBox",
80
83
  itemContent: "bui-MenuItemContent",
@@ -1 +1 @@
1
- {"version":3,"file":"definition.esm.js","sources":["../../../src/components/Menu/definition.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { defineComponent } from '../../hooks/useDefinition';\nimport type {\n MenuOwnProps,\n MenuListBoxOwnProps,\n MenuAutocompleteOwnProps,\n MenuAutocompleteListBoxOwnProps,\n MenuItemOwnProps,\n MenuListBoxItemOwnProps,\n MenuSectionOwnProps,\n MenuSeparatorOwnProps,\n} from './types';\nimport styles from './Menu.module.css';\n\n// Shared classNames for all popover-based menu variants\nconst menuPopoverClassNames = {\n root: 'bui-MenuPopover',\n inner: 'bui-MenuInner',\n content: 'bui-MenuContent',\n} as const;\n\n// Shared classNames for autocomplete menu variants\nconst menuAutocompleteClassNames = {\n ...menuPopoverClassNames,\n searchField: 'bui-MenuSearchField',\n searchFieldInput: 'bui-MenuSearchFieldInput',\n searchFieldClear: 'bui-MenuSearchFieldClear',\n} as const;\n\n// Shared propDefs for all popover-based menu variants\nconst menuPopoverPropDefs = {\n placement: { default: 'bottom start' },\n virtualized: { default: false },\n maxWidth: {},\n maxHeight: {},\n style: {},\n className: {},\n} as const;\n\n/**\n * Component definition for Menu\n * @public\n */\nexport const MenuDefinition = defineComponent<MenuOwnProps>()({\n styles,\n classNames: menuPopoverClassNames,\n propDefs: menuPopoverPropDefs,\n});\n\n/** @internal */\nexport const MenuListBoxDefinition = defineComponent<MenuListBoxOwnProps>()({\n styles,\n classNames: menuPopoverClassNames,\n propDefs: {\n ...menuPopoverPropDefs,\n selectionMode: { default: 'single' },\n },\n});\n\n/** @internal */\nexport const MenuAutocompleteDefinition =\n defineComponent<MenuAutocompleteOwnProps>()({\n styles,\n classNames: menuAutocompleteClassNames,\n propDefs: {\n ...menuPopoverPropDefs,\n placeholder: {},\n },\n });\n\n/** @internal */\nexport const MenuAutocompleteListboxDefinition =\n defineComponent<MenuAutocompleteListBoxOwnProps>()({\n styles,\n classNames: menuAutocompleteClassNames,\n propDefs: {\n ...menuPopoverPropDefs,\n placeholder: {},\n selectionMode: { default: 'single' },\n },\n });\n\n/** @internal */\nexport const MenuItemDefinition = defineComponent<MenuItemOwnProps>()({\n styles,\n classNames: {\n root: 'bui-MenuItem',\n itemContent: 'bui-MenuItemContent',\n itemArrow: 'bui-MenuItemArrow',\n },\n analytics: true,\n propDefs: {\n iconStart: {},\n children: {},\n color: { dataAttribute: true, default: 'primary' },\n href: {},\n noTrack: {},\n className: {},\n },\n});\n\n/** @internal */\nexport const MenuListBoxItemDefinition =\n defineComponent<MenuListBoxItemOwnProps>()({\n styles,\n classNames: {\n root: 'bui-MenuItemListBox',\n itemContent: 'bui-MenuItemContent',\n check: 'bui-MenuItemListBoxCheck',\n },\n propDefs: {\n children: {},\n className: {},\n },\n });\n\n/** @internal */\nexport const MenuSectionDefinition = defineComponent<MenuSectionOwnProps>()({\n styles,\n classNames: {\n root: 'bui-MenuSection',\n header: 'bui-MenuSectionHeader',\n },\n propDefs: {\n title: {},\n children: {},\n className: {},\n },\n});\n\n/** @internal */\nexport const MenuSeparatorDefinition = defineComponent<MenuSeparatorOwnProps>()(\n {\n styles,\n classNames: {\n root: 'bui-MenuSeparator',\n },\n propDefs: {\n className: {},\n },\n },\n);\n\n/** @internal */\nexport const MenuEmptyStateDefinition = defineComponent<{}>()({\n styles,\n classNames: {\n root: 'bui-MenuEmptyState',\n },\n propDefs: {},\n});\n"],"names":[],"mappings":";;;;;;;;;AA8BA,MAAM,qBAAA,GAAwB;AAAA,EAC5B,IAAA,EAAM,iBAAA;AAAA,EACN,KAAA,EAAO,eAAA;AAAA,EACP,OAAA,EAAS;AACX,CAAA;AAGA,MAAM,0BAAA,GAA6B;AAAA,EACjC,GAAG,qBAAA;A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b;AAAA,EACA,SAAA,EAAW,IAAA;AAAA,EACX,QAAA,EAAU;AAAA,IACR,WAAW,EAAC;AAAA,IACZ,UAAU,EAAC;AAAA,IACX,KAAA,EAAO,EAAE,aAAA,EAAe,IAAA,EAAM,SAAS,SAAA,EAAU;AAAA,IACjD,MAAM,EAAC;AAAA,IACP,SAAS,EAAC;AAAA,IACV,WAAW;AAAC;AAEhB,CAAC;AAGM,MAAM,yBAAA,GACX,iBAAyC,CAAE;AAAA,EACzC,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,qBAAA;AAAA,IACN,WAAA,EAAa,qBAAA;AAAA,IACb,KAAA,EAAO;AAAA,GACT;AAAA,EACA,QAAA,EAAU;AAAA,IACR,UAAU,EAAC;AAAA,IACX,WAAW;AAAC;AAEhB,CAAC;AAGI,MAAM,qBAAA,GAAwB,iBAAqC,CAAE;AAAA,EAC1E,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,iBAAA;AAAA,IACN,MAAA,EAAQ;AAAA,GACV;AAAA,EACA,QAAA,EAAU;AAAA,IACR,OAAO,EAAC;AAAA,IACR,UAAU,EAAC;AAAA,IACX,WAAW;AAAC;AAEhB,CAAC;AAGM,MAAM,0BAA0B,eAAA,EAAuC;AAAA,EAC5E;AAAA,IACE,MAAA;AAAA,IACA,UAAA,EAAY;AAAA,MACV,IAAA,EAAM;AAAA,KACR;AAAA,IACA,QAAA,EAAU;AAAA,MACR,WAAW;AAAC;AACd;AAEJ;AAGO,MAAM,wBAAA,GAA2B,iBAAoB,CAAE;AAAA,EAC5D,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA,UAAU;AACZ,CAAC;;;;"}
1
+ {"version":3,"file":"definition.esm.js","sources":["../../../src/components/Menu/definition.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { defineComponent } from '../../hooks/useDefinition';\nimport type {\n MenuOwnProps,\n MenuListBoxOwnProps,\n MenuAutocompleteOwnProps,\n MenuAutocompleteListBoxOwnProps,\n MenuItemOwnProps,\n MenuListBoxItemOwnProps,\n MenuSectionOwnProps,\n MenuSeparatorOwnProps,\n} from './types';\nimport styles from './Menu.module.css';\n\n// Shared classNames for all popover-based menu variants\nconst menuPopoverClassNames = {\n root: 'bui-MenuPopover',\n inner: 'bui-MenuInner',\n content: 'bui-MenuContent',\n} as const;\n\n// Shared classNames for autocomplete menu variants\nconst menuAutocompleteClassNames = {\n ...menuPopoverClassNames,\n searchField: 'bui-MenuSearchField',\n searchFieldInput: 'bui-MenuSearchFieldInput',\n searchFieldClear: 'bui-MenuSearchFieldClear',\n} as const;\n\n// Shared propDefs for all popover-based menu variants\nconst menuPopoverPropDefs = {\n placement: { default: 'bottom start' },\n virtualized: { default: false },\n maxWidth: {},\n maxHeight: {},\n style: {},\n className: {},\n} as const;\n\n/**\n * Component definition for Menu\n * @public\n */\nexport const MenuDefinition = defineComponent<MenuOwnProps>()({\n styles,\n classNames: menuPopoverClassNames,\n propDefs: menuPopoverPropDefs,\n});\n\n/** @internal */\nexport const MenuListBoxDefinition = defineComponent<MenuListBoxOwnProps>()({\n styles,\n classNames: menuPopoverClassNames,\n propDefs: {\n ...menuPopoverPropDefs,\n selectionMode: { default: 'single' },\n },\n});\n\n/** @internal */\nexport const MenuAutocompleteDefinition =\n defineComponent<MenuAutocompleteOwnProps>()({\n styles,\n classNames: menuAutocompleteClassNames,\n propDefs: {\n ...menuPopoverPropDefs,\n placeholder: {},\n },\n });\n\n/** @internal */\nexport const MenuAutocompleteListboxDefinition =\n defineComponent<MenuAutocompleteListBoxOwnProps>()({\n styles,\n classNames: menuAutocompleteClassNames,\n propDefs: {\n ...menuPopoverPropDefs,\n placeholder: {},\n selectionMode: { default: 'single' },\n },\n });\n\n/** @internal */\nexport const MenuItemDefinition = defineComponent<MenuItemOwnProps>()({\n styles,\n classNames: {\n root: 'bui-MenuItem',\n itemContent: 'bui-MenuItemContent',\n itemArrow: 'bui-MenuItemArrow',\n },\n analytics: true,\n resolveHref: true,\n propDefs: {\n iconStart: {},\n children: {},\n color: { dataAttribute: true, default: 'primary' },\n href: {},\n noTrack: {},\n className: {},\n },\n});\n\n/** @internal */\nexport const MenuListBoxItemDefinition =\n defineComponent<MenuListBoxItemOwnProps>()({\n styles,\n resolveHref: true,\n classNames: {\n root: 'bui-MenuItemListBox',\n itemContent: 'bui-MenuItemContent',\n check: 'bui-MenuItemListBoxCheck',\n },\n propDefs: {\n children: {},\n className: {},\n },\n });\n\n/** @internal */\nexport const MenuSectionDefinition = defineComponent<MenuSectionOwnProps>()({\n styles,\n classNames: {\n root: 'bui-MenuSection',\n header: 'bui-MenuSectionHeader',\n },\n propDefs: {\n title: {},\n children: {},\n className: {},\n },\n});\n\n/** @internal */\nexport const MenuSeparatorDefinition = defineComponent<MenuSeparatorOwnProps>()(\n {\n styles,\n classNames: {\n root: 'bui-MenuSeparator',\n },\n propDefs: {\n className: {},\n },\n },\n);\n\n/** @internal */\nexport const MenuEmptyStateDefinition = defineComponent<{}>()({\n styles,\n classNames: {\n root: 'bui-MenuEmptyState',\n },\n propDefs: {},\n});\n"],"names":[],"mappings":";;;;;;;;;;AA8BA,MAAM,qBAAA,GAAwB;AAAA,EAC5B,IAAA,EAAM,iBAAA;AAAA,EACN,KAAA,EAAO,eAAA;AAAA,EACP,OAAA,EAAS;AACX,CAAA;AAGA,MAAM,0BAAA,GAA6B;AAAA,EACjC,GAAG,qBAAA;AAAA,EACH,WAAA,EAAa,qBAAA;AAAA,EACb,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X,WAAA,EAAa,IAAA;AAAA,EACb,QAAA,EAAU;AAAA,IACR,WAAW,EAAC;AAAA,IACZ,UAAU,EAAC;AAAA,IACX,KAAA,EAAO,EAAE,aAAA,EAAe,IAAA,EAAM,SAAS,SAAA,EAAU;AAAA,IACjD,MAAM,EAAC;AAAA,IACP,SAAS,EAAC;AAAA,IACV,WAAW;AAAC;AAEhB,CAAC;AAGM,MAAM,yBAAA,GACX,iBAAyC,CAAE;AAAA,EACzC,MAAA;AAAA,EACA,WAAA,EAAa,IAAA;AAAA,EACb,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,qBAAA;AAAA,IACN,WAAA,EAAa,qBAAA;AAAA,IACb,KAAA,EAAO;AAAA,GACT;AAAA,EACA,QAAA,EAAU;AAAA,IACR,UAAU,EAAC;AAAA,IACX,WAAW;AAAC;AAEhB,CAAC;AAGI,MAAM,qBAAA,GAAwB,iBAAqC,CAAE;AAAA,EAC1E,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,iBAAA;AAAA,IACN,MAAA,EAAQ;AAAA,GACV;AAAA,EACA,QAAA,EAAU;AAAA,IACR,OAAO,EAAC;AAAA,IACR,UAAU,EAAC;AAAA,IACX,WAAW;AAAC;AAEhB,CAAC;AAGM,MAAM,0BAA0B,eAAA,EAAuC;AAAA,EAC5E;AAAA,IACE,MAAA;AAAA,IACA,UAAA,EAAY;AAAA,MACV,IAAA,EAAM;AAAA,KACR;AAAA,IACA,QAAA,EAAU;AAAA,MACR,WAAW;AAAC;AACd;AAEJ;AAGO,MAAM,wBAAA,GAA2B,iBAAoB,CAAE;AAAA,EAC5D,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA,UAAU;AACZ,CAAC;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"PasswordField.esm.js","sources":["../../../src/components/PasswordField/PasswordField.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { forwardRef, useEffect, useState } from 'react';\nimport {\n Input,\n TextField as AriaTextField,\n Button as RAButton,\n} from 'react-aria-components';\nimport { FieldLabel } from '../FieldLabel';\nimport { FieldError } from '../FieldError';\n\nimport type { PasswordFieldProps } from './types';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport { PasswordFieldDefinition } from './definition';\nimport { RiEyeLine, RiEyeOffLine } from '@remixicon/react';\n\n/** @public */\nexport const PasswordField = forwardRef<HTMLDivElement, PasswordFieldProps>(\n (props, ref) => {\n const { ownProps, restProps, dataAttributes } = useDefinition(\n PasswordFieldDefinition,\n props,\n );\n const { classes, label, icon, secondaryLabel, placeholder, description } =\n ownProps;\n\n useEffect(() => {\n if (!label && !restProps['aria-label'] && !restProps['aria-labelledby']) {\n console.warn(\n 'PasswordField requires either a visible label, aria-label, or aria-labelledby for accessibility',\n );\n }\n }, [label, restProps['aria-label'], restProps['aria-labelledby']]);\n\n // If a secondary label is provided, use it. Otherwise, use 'Required' if the field is required.\n const secondaryLabelText =\n secondaryLabel || (restProps.isRequired ? 'Required' : null);\n\n // Manage secret visibility toggle\n const [isVisible, setIsVisible] = useState(false);\n\n return (\n <AriaTextField\n className={classes.root}\n {...dataAttributes}\n type=\"password\"\n {...restProps}\n ref={ref}\n >\n <FieldLabel\n label={label}\n secondaryLabel={secondaryLabelText}\n description={description}\n />\n <div\n className={classes.inputWrapper}\n data-size={dataAttributes['data-size']}\n >\n {icon && (\n <div\n className={classes.inputIcon}\n data-size={dataAttributes['data-size']}\n aria-hidden=\"true\"\n >\n {icon}\n </div>\n )}\n <Input\n className={classes.input}\n {...(icon && { 'data-icon': true })}\n placeholder={placeholder}\n type={isVisible ? 'text' : 'password'}\n />\n <RAButton\n data-size={dataAttributes['data-size']}\n data-variant={'tertiary'}\n aria-label={isVisible ? 'Hide value' : 'Show value'}\n aria-controls={isVisible ? 'text' : 'password'}\n aria-expanded={isVisible}\n onPress={() => setIsVisible(v => !v)}\n className={classes.inputVisibility}\n >\n {isVisible ? <RiEyeLine /> : <RiEyeOffLine />}\n </RAButton>\n </div>\n <FieldError />\n </AriaTextField>\n );\n },\n);\n\nPasswordField.displayName = 'PasswordField';\n"],"names":["AriaTextField","RAButton"],"mappings":";;;;;;;;;;;AA+BO,MAAM,aAAA,GAAgB,UAAA;AAAA,EAC3B,CAAC,OAAO,GAAA,KAAQ;AACd,IAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAW,cAAA,EAAe,GAAI,aAAA;AAAA,MAC9C,uBAAA;AAAA,MACA;AAAA,KACF;AACA,IAAA,MAAM,EAAE,OAAA,EAAS,KAAA,EAAO,MAAM,cAAA,EAAgB,WAAA,EAAa,aAAY,GACrE,QAAA;AAEF,IAAA,SAAA,CAAU,MAAM;AACd,MAAA,IAAI,CAAC,SAAS,CAAC,SAAA,CAAU,YAAY,CAAA,IAAK,CAAC,SAAA,CAAU,iBAAiB,CAAA,EAAG;AACvE,QAAA,OAAA,CAAQ,IAAA;AAAA,UACN;AAAA,SACF;AAAA,MACF;AAAA,IACF,CAAA,EAAG,CAAC,KAAA,EAAO,SAAA,CAAU,YAAY,CAAA,EAAG,SAAA,CAAU,iBAAiB,CAAC,CAAC,CAAA;AAGjE,IAAA,MAAM,kBAAA,GACJ,cAAA,KAAmB,SAAA,CAAU,UAAA,GAAa,UAAA,GAAa,IAAA,CAAA;AAGzD,IAAA,MAAM,CAAC,SAAA,EAAW,YAAY,CAAA,GAAI,SAAS,KAAK,CAAA;AAEhD,IAAA,uBACE,IAAA;AAAA,MAACA,SAAA;AAAA,MAAA;AAAA,QACC,WA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AQ,eAAA;AAAA,oBAElB,QAAA,EAAA,SAAA,mBAAY,GAAA,CAAC,SAAA,EAAA,EAAU,CAAA,uBAAM,YAAA,EAAA,EAAa;AAAA;AAAA;AAC7C;AAAA;AAAA,WACF;AAAA,8BACC,UAAA,EAAA,EAAW;AAAA;AAAA;AAAA,KACd;AAAA,EAEJ;AACF;AAEA,aAAA,CAAc,WAAA,GAAc,eAAA;;;;"}
1
+ {"version":3,"file":"PasswordField.esm.js","sources":["../../../src/components/PasswordField/PasswordField.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { forwardRef, useEffect, useState } from 'react';\nimport {\n Input,\n TextField as AriaTextField,\n Button as RAButton,\n} from 'react-aria-components';\nimport { FieldLabel } from '../FieldLabel';\nimport { FieldError } from '../FieldError';\n\nimport type { PasswordFieldProps } from './types';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport { PasswordFieldDefinition } from './definition';\nimport { RiEyeLine, RiEyeOffLine } from '@remixicon/react';\n\n/**\n * A text input for password entry with a toggleable visibility button, integrated label, and inline error display.\n *\n * @public\n */\nexport const PasswordField = forwardRef<HTMLDivElement, PasswordFieldProps>(\n (props, ref) => {\n const { ownProps, restProps, dataAttributes } = useDefinition(\n PasswordFieldDefinition,\n props,\n );\n const { classes, label, icon, secondaryLabel, placeholder, description } =\n ownProps;\n\n useEffect(() => {\n if (!label && !restProps['aria-label'] && !restProps['aria-labelledby']) {\n console.warn(\n 'PasswordField requires either a visible label, aria-label, or aria-labelledby for accessibility',\n );\n }\n }, [label, restProps['aria-label'], restProps['aria-labelledby']]);\n\n // If a secondary label is provided, use it. Otherwise, use 'Required' if the field is required.\n const secondaryLabelText =\n secondaryLabel || (restProps.isRequired ? 'Required' : null);\n\n // Manage secret visibility toggle\n const [isVisible, setIsVisible] = useState(false);\n\n return (\n <AriaTextField\n className={classes.root}\n {...dataAttributes}\n type=\"password\"\n {...restProps}\n ref={ref}\n >\n <FieldLabel\n label={label}\n secondaryLabel={secondaryLabelText}\n description={description}\n />\n <div\n className={classes.inputWrapper}\n data-size={dataAttributes['data-size']}\n >\n {icon && (\n <div\n className={classes.inputIcon}\n data-size={dataAttributes['data-size']}\n aria-hidden=\"true\"\n >\n {icon}\n </div>\n )}\n <Input\n className={classes.input}\n {...(icon && { 'data-icon': true })}\n placeholder={placeholder}\n type={isVisible ? 'text' : 'password'}\n />\n <RAButton\n data-size={dataAttributes['data-size']}\n data-variant={'tertiary'}\n aria-label={isVisible ? 'Hide value' : 'Show value'}\n aria-controls={isVisible ? 'text' : 'password'}\n aria-expanded={isVisible}\n onPress={() => setIsVisible(v => !v)}\n className={classes.inputVisibility}\n >\n {isVisible ? <RiEyeLine /> : <RiEyeOffLine />}\n </RAButton>\n </div>\n <FieldError />\n </AriaTextField>\n );\n },\n);\n\nPasswordField.displayName = 'PasswordField';\n"],"names":["AriaTextField","RAButton"],"mappings":";;;;;;;;;;;AAmCO,MAAM,aAAA,GAAgB,UAAA;AAAA,EAC3B,CAAC,OAAO,GAAA,KAAQ;AACd,IAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAW,cAAA,EAAe,GAAI,aAAA;AAAA,MAC9C,uBAAA;AAAA,MACA;AAAA,KACF;AACA,IAAA,MAAM,EAAE,OAAA,EAAS,KAAA,EAAO,MAAM,cAAA,EAAgB,WAAA,EAAa,aAAY,GACrE,QAAA;AAEF,IAAA,SAAA,CAAU,MAAM;AACd,MAAA,IAAI,CAAC,SAAS,CAAC,SAAA,CAAU,YAAY,CAAA,IAAK,CAAC,SAAA,CAAU,iBAAiB,CAAA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,oBACA,IAAA,EAAM,YAAY,MAAA,GAAS;AAAA;AAAA,iBAC7B;AAAA,gCACA,GAAA;AAAA,kBAACC,MAAA;AAAA,kBAAA;AAAA,oBACC,WAAA,EAAW,eAAe,WAAW,CAAA;AAAA,oBACrC,cAAA,EAAc,UAAA;AAAA,oBACd,YAAA,EAAY,YAAY,YAAA,GAAe,YAAA;AAAA,oBACvC,eAAA,EAAe,YAAY,MAAA,GAAS,UAAA;AAAA,oBACpC,eAAA,EAAe,SAAA;AAAA,oBACf,OAAA,EAAS,MAAM,YAAA,CAAa,CAAA,CAAA,KAAK,CAAC,CAAC,CAAA;AAAA,oBACnC,WAAW,OAAA,CAAQ,eAAA;AAAA,oBAElB,QAAA,EAAA,SAAA,mBAAY,GAAA,CAAC,SAAA,EAAA,EAAU,CAAA,uBAAM,YAAA,EAAA,EAAa;AAAA;AAAA;AAC7C;AAAA;AAAA,WACF;AAAA,8BACC,UAAA,EAAA,EAAW;AAAA;AAAA;AAAA,KACd;AAAA,EAEJ;AACF;AAEA,aAAA,CAAc,WAAA,GAAc,eAAA;;;;"}
@@ -4,6 +4,7 @@ import '../../hooks/useBreakpoint.esm.js';
4
4
  import '../../hooks/useBg.esm.js';
5
5
  import '../../hooks/useDefinition/helpers.esm.js';
6
6
  import '../../analytics/useAnalytics.esm.js';
7
+ import 'react-router-dom';
7
8
  import { defineComponent } from '../../hooks/useDefinition/defineComponent.esm.js';
8
9
  import styles from './PasswordField.module.css.esm.js';
9
10
 
@@ -1 +1 @@
1
- {"version":3,"file":"definition.esm.js","sources":["../../../src/components/PasswordField/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 { PasswordFieldOwnProps } from './types';\nimport styles from './PasswordField.module.css';\n\n/**\n * Component definition for PasswordField\n * @public\n */\nexport const PasswordFieldDefinition = defineComponent<PasswordFieldOwnProps>()(\n {\n styles,\n classNames: {\n root: 'bui-PasswordField',\n inputWrapper: 'bui-PasswordFieldInputWrapper',\n input: 'bui-PasswordFieldInput',\n inputIcon: 'bui-PasswordFieldIcon',\n inputVisibility: 'bui-PasswordFieldVisibility',\n },\n propDefs: {\n size: { dataAttribute: true, default: 'small' },\n className: {},\n icon: {},\n placeholder: {},\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,YAAA,EAAc,+BAAA;AAAA,MACd,KAAA,EAAO,wBAAA;AAAA,MACP,SAAA,EAAW,uBAAA;AAAA,MACX,eAAA,EAAiB;AAAA,KACnB;AAAA,IACA,QAAA,EAAU;AAAA,MACR,IAAA,EAAM,EAAE,aAAA,EAAe,IAAA,EAAM,SAAS,OAAA,EAAQ;AAAA,MAC9C,WAAW,EAAC;AAAA,MACZ,MAAM,EAAC;AAAA,MACP,aAAa,EAAC;AAAA,MACd,OAAO,EAAC;AAAA,MACR,aAAa,EAAC;AAAA,MACd,gBAAgB;AAAC;AACnB;AAEJ;;;;"}
1
+ {"version":3,"file":"definition.esm.js","sources":["../../../src/components/PasswordField/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 { PasswordFieldOwnProps } from './types';\nimport styles from './PasswordField.module.css';\n\n/**\n * Component definition for PasswordField\n * @public\n */\nexport const PasswordFieldDefinition = defineComponent<PasswordFieldOwnProps>()(\n {\n styles,\n classNames: {\n root: 'bui-PasswordField',\n inputWrapper: 'bui-PasswordFieldInputWrapper',\n input: 'bui-PasswordFieldInput',\n inputIcon: 'bui-PasswordFieldIcon',\n inputVisibility: 'bui-PasswordFieldVisibility',\n },\n propDefs: {\n size: { dataAttribute: true, default: 'small' },\n className: {},\n icon: {},\n placeholder: {},\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,YAAA,EAAc,+BAAA;AAAA,MACd,KAAA,EAAO,wBAAA;AAAA,MACP,SAAA,EAAW,uBAAA;AAAA,MACX,eAAA,EAAiB;AAAA,KACnB;AAAA,IACA,QAAA,EAAU;AAAA,MACR,IAAA,EAAM,EAAE,aAAA,EAAe,IAAA,EAAM,SAAS,OAAA,EAAQ;AAAA,MAC9C,WAAW,EAAC;AAAA,MACZ,MAAM,EAAC;AAAA,MACP,aAAa,EAAC;AAAA,MACd,OAAO,EAAC;AAAA,MACR,aAAa,EAAC;AAAA,MACd,gBAAgB;AAAC;AACnB;AAEJ;;;;"}
@@ -4,6 +4,7 @@ import '../../hooks/useBreakpoint.esm.js';
4
4
  import '../../hooks/useBg.esm.js';
5
5
  import '../../hooks/useDefinition/helpers.esm.js';
6
6
  import '../../analytics/useAnalytics.esm.js';
7
+ import 'react-router-dom';
7
8
  import { defineComponent } from '../../hooks/useDefinition/defineComponent.esm.js';
8
9
  import styles from './PluginHeader.module.css.esm.js';
9
10
 
@@ -1 +1 @@
1
- {"version":3,"file":"definition.esm.js","sources":["../../../src/components/PluginHeader/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 { PluginHeaderOwnProps } from './types';\nimport styles from './PluginHeader.module.css';\n\n/**\n * Component definition for PluginHeader\n * @public\n */\nexport const PluginHeaderDefinition = defineComponent<PluginHeaderOwnProps>()({\n styles,\n classNames: {\n root: 'bui-PluginHeader',\n toolbar: 'bui-PluginHeaderToolbar',\n toolbarContent: 'bui-PluginHeaderToolbarContent',\n toolbarControls: 'bui-PluginHeaderToolbarControls',\n toolbarIcon: 'bui-PluginHeaderToolbarIcon',\n toolbarName: 'bui-PluginHeaderToolbarName',\n tabs: 'bui-PluginHeaderTabsWrapper',\n },\n propDefs: {\n icon: {},\n title: {},\n titleLink: {},\n customActions: {},\n tabs: {},\n onTabSelectionChange: {},\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,yBAAA;AAAA,IACT,cAAA,EAAgB,gCAAA;AAAA,IAChB,eAAA,EAAiB,iCAAA;AAAA,IACjB,WAAA,EAAa,6BAAA;AAAA,IACb,WAAA,EAAa,6BAAA;AAAA,IACb,IAAA,EAAM;AAAA,GACR;AAAA,EACA,QAAA,EAAU;AAAA,IACR,MAAM,EAAC;AAAA,IACP,OAAO,EAAC;AAAA,IACR,WAAW,EAAC;AAAA,IACZ,eAAe,EAAC;AAAA,IAChB,MAAM,EAAC;AAAA,IACP,sBAAsB,EAAC;AAAA,IACvB,WAAW;AAAC;AAEhB,CAAC;;;;"}
1
+ {"version":3,"file":"definition.esm.js","sources":["../../../src/components/PluginHeader/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 { PluginHeaderOwnProps } from './types';\nimport styles from './PluginHeader.module.css';\n\n/**\n * Component definition for PluginHeader\n * @public\n */\nexport const PluginHeaderDefinition = defineComponent<PluginHeaderOwnProps>()({\n styles,\n classNames: {\n root: 'bui-PluginHeader',\n toolbar: 'bui-PluginHeaderToolbar',\n toolbarContent: 'bui-PluginHeaderToolbarContent',\n toolbarControls: 'bui-PluginHeaderToolbarControls',\n toolbarIcon: 'bui-PluginHeaderToolbarIcon',\n toolbarName: 'bui-PluginHeaderToolbarName',\n tabs: 'bui-PluginHeaderTabsWrapper',\n },\n propDefs: {\n icon: {},\n title: {},\n titleLink: {},\n customActions: {},\n tabs: {},\n onTabSelectionChange: {},\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,yBAAA;AAAA,IACT,cAAA,EAAgB,gCAAA;AAAA,IAChB,eAAA,EAAiB,iCAAA;AAAA,IACjB,WAAA,EAAa,6BAAA;AAAA,IACb,WAAA,EAAa,6BAAA;AAAA,IACb,IAAA,EAAM;AAAA,GACR;AAAA,EACA,QAAA,EAAU;AAAA,IACR,MAAM,EAAC;AAAA,IACP,OAAO,EAAC;AAAA,IACR,WAAW,EAAC;AAAA,IACZ,eAAe,EAAC;AAAA,IAChB,MAAM,EAAC;AAAA,IACP,sBAAsB,EAAC;AAAA,IACvB,WAAW;AAAC;AAEhB,CAAC;;;;"}
@@ -4,6 +4,7 @@ import '../../hooks/useBreakpoint.esm.js';
4
4
  import '../../hooks/useBg.esm.js';
5
5
  import '../../hooks/useDefinition/helpers.esm.js';
6
6
  import '../../analytics/useAnalytics.esm.js';
7
+ import 'react-router-dom';
7
8
  import { defineComponent } from '../../hooks/useDefinition/defineComponent.esm.js';
8
9
  import styles from './Popover.module.css.esm.js';
9
10