@backstage/ui 0.12.0 → 0.13.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 (189) hide show
  1. package/CHANGELOG.md +120 -0
  2. package/dist/components/Accordion/Accordion.esm.js +4 -2
  3. package/dist/components/Accordion/Accordion.esm.js.map +1 -1
  4. package/dist/components/Accordion/Accordion.module.css.esm.js +2 -2
  5. package/dist/components/Accordion/definition.esm.js +4 -2
  6. package/dist/components/Accordion/definition.esm.js.map +1 -1
  7. package/dist/components/Alert/definition.esm.js +1 -1
  8. package/dist/components/Avatar/Avatar.esm.js +8 -28
  9. package/dist/components/Avatar/Avatar.esm.js.map +1 -1
  10. package/dist/components/Avatar/definition.esm.js +17 -4
  11. package/dist/components/Avatar/definition.esm.js.map +1 -1
  12. package/dist/components/Box/definition.esm.js +1 -1
  13. package/dist/components/Button/definition.esm.js +2 -3
  14. package/dist/components/Button/definition.esm.js.map +1 -1
  15. package/dist/components/ButtonIcon/definition.esm.js +2 -3
  16. package/dist/components/ButtonIcon/definition.esm.js.map +1 -1
  17. package/dist/components/ButtonLink/definition.esm.js +2 -3
  18. package/dist/components/ButtonLink/definition.esm.js.map +1 -1
  19. package/dist/components/Card/Card.esm.js +1 -1
  20. package/dist/components/Card/Card.esm.js.map +1 -1
  21. package/dist/components/Card/definition.esm.js +1 -1
  22. package/dist/components/Checkbox/Checkbox.esm.js +10 -17
  23. package/dist/components/Checkbox/Checkbox.esm.js.map +1 -1
  24. package/dist/components/Checkbox/definition.esm.js +16 -5
  25. package/dist/components/Checkbox/definition.esm.js.map +1 -1
  26. package/dist/components/Container/Container.esm.js +8 -13
  27. package/dist/components/Container/Container.esm.js.map +1 -1
  28. package/dist/components/Container/Container.module.css.esm.js +2 -2
  29. package/dist/components/Container/definition.esm.js +16 -2
  30. package/dist/components/Container/definition.esm.js.map +1 -1
  31. package/dist/components/Dialog/Dialog.esm.js +26 -59
  32. package/dist/components/Dialog/Dialog.esm.js.map +1 -1
  33. package/dist/components/Dialog/Dialog.module.css.esm.js +2 -2
  34. package/dist/components/Dialog/definition.esm.js +52 -8
  35. package/dist/components/Dialog/definition.esm.js.map +1 -1
  36. package/dist/components/FieldError/FieldError.esm.js +4 -13
  37. package/dist/components/FieldError/FieldError.esm.js.map +1 -1
  38. package/dist/components/FieldError/definition.esm.js +14 -2
  39. package/dist/components/FieldError/definition.esm.js.map +1 -1
  40. package/dist/components/FieldLabel/FieldLabel.esm.js +14 -59
  41. package/dist/components/FieldLabel/FieldLabel.esm.js.map +1 -1
  42. package/dist/components/FieldLabel/definition.esm.js +19 -2
  43. package/dist/components/FieldLabel/definition.esm.js.map +1 -1
  44. package/dist/components/Flex/Flex.esm.js +11 -22
  45. package/dist/components/Flex/Flex.esm.js.map +1 -1
  46. package/dist/components/Flex/definition.esm.js +19 -13
  47. package/dist/components/Flex/definition.esm.js.map +1 -1
  48. package/dist/components/FullPage/FullPage.esm.js +4 -13
  49. package/dist/components/FullPage/FullPage.esm.js.map +1 -1
  50. package/dist/components/FullPage/definition.esm.js +14 -2
  51. package/dist/components/FullPage/definition.esm.js.map +1 -1
  52. package/dist/components/Grid/Grid.esm.js +19 -40
  53. package/dist/components/Grid/Grid.esm.js.map +1 -1
  54. package/dist/components/Grid/definition.esm.js +30 -26
  55. package/dist/components/Grid/definition.esm.js.map +1 -1
  56. package/dist/components/HeaderPage/HeaderPage.esm.js +38 -60
  57. package/dist/components/HeaderPage/HeaderPage.esm.js.map +1 -1
  58. package/dist/components/HeaderPage/definition.esm.js +18 -2
  59. package/dist/components/HeaderPage/definition.esm.js.map +1 -1
  60. package/dist/components/Link/Link.esm.js +6 -34
  61. package/dist/components/Link/Link.esm.js.map +1 -1
  62. package/dist/components/Link/definition.esm.js +20 -15
  63. package/dist/components/Link/definition.esm.js.map +1 -1
  64. package/dist/components/Menu/Menu.esm.js +162 -343
  65. package/dist/components/Menu/Menu.esm.js.map +1 -1
  66. package/dist/components/Menu/Menu.module.css.esm.js +2 -2
  67. package/dist/components/Menu/definition.esm.js +113 -17
  68. package/dist/components/Menu/definition.esm.js.map +1 -1
  69. package/dist/components/PasswordField/PasswordField.esm.js +17 -52
  70. package/dist/components/PasswordField/PasswordField.esm.js.map +1 -1
  71. package/dist/components/PasswordField/PasswordField.module.css.esm.js +2 -2
  72. package/dist/components/PasswordField/definition.esm.js +28 -11
  73. package/dist/components/PasswordField/definition.esm.js.map +1 -1
  74. package/dist/components/PluginHeader/PluginHeader.esm.js +33 -46
  75. package/dist/components/PluginHeader/PluginHeader.esm.js.map +1 -1
  76. package/dist/components/PluginHeader/PluginHeader.module.css.esm.js +2 -2
  77. package/dist/components/PluginHeader/definition.esm.js +21 -3
  78. package/dist/components/PluginHeader/definition.esm.js.map +1 -1
  79. package/dist/components/Popover/Popover.esm.js +24 -32
  80. package/dist/components/Popover/Popover.esm.js.map +1 -1
  81. package/dist/components/Popover/Popover.module.css.esm.js +2 -2
  82. package/dist/components/Popover/definition.esm.js +16 -2
  83. package/dist/components/Popover/definition.esm.js.map +1 -1
  84. package/dist/components/RadioGroup/RadioGroup.esm.js +25 -44
  85. package/dist/components/RadioGroup/RadioGroup.esm.js.map +1 -1
  86. package/dist/components/RadioGroup/RadioGroup.module.css.esm.js +2 -2
  87. package/dist/components/RadioGroup/definition.esm.js +30 -5
  88. package/dist/components/RadioGroup/definition.esm.js.map +1 -1
  89. package/dist/components/SearchField/SearchField.esm.js +25 -45
  90. package/dist/components/SearchField/SearchField.esm.js.map +1 -1
  91. package/dist/components/SearchField/SearchField.module.css.esm.js +2 -2
  92. package/dist/components/SearchField/definition.esm.js +20 -5
  93. package/dist/components/SearchField/definition.esm.js.map +1 -1
  94. package/dist/components/Select/Select.esm.js +14 -23
  95. package/dist/components/Select/Select.esm.js.map +1 -1
  96. package/dist/components/Select/Select.module.css.esm.js +2 -2
  97. package/dist/components/Select/SelectContent.esm.js +8 -31
  98. package/dist/components/Select/SelectContent.esm.js.map +1 -1
  99. package/dist/components/Select/SelectListBox.esm.js +21 -44
  100. package/dist/components/Select/SelectListBox.esm.js.map +1 -1
  101. package/dist/components/Select/SelectTrigger.esm.js +8 -14
  102. package/dist/components/Select/SelectTrigger.esm.js.map +1 -1
  103. package/dist/components/Select/definition.esm.js +67 -17
  104. package/dist/components/Select/definition.esm.js.map +1 -1
  105. package/dist/components/Skeleton/Skeleton.esm.js +9 -13
  106. package/dist/components/Skeleton/Skeleton.esm.js.map +1 -1
  107. package/dist/components/Skeleton/definition.esm.js +18 -2
  108. package/dist/components/Skeleton/definition.esm.js.map +1 -1
  109. package/dist/components/Switch/Switch.esm.js +7 -22
  110. package/dist/components/Switch/Switch.esm.js.map +1 -1
  111. package/dist/components/Switch/definition.esm.js +15 -2
  112. package/dist/components/Switch/definition.esm.js.map +1 -1
  113. package/dist/components/Table/components/Cell.esm.js +4 -17
  114. package/dist/components/Table/components/Cell.esm.js.map +1 -1
  115. package/dist/components/Table/components/CellProfile.esm.js +12 -41
  116. package/dist/components/Table/components/CellProfile.esm.js.map +1 -1
  117. package/dist/components/Table/components/CellText.esm.js +39 -73
  118. package/dist/components/Table/components/CellText.esm.js.map +1 -1
  119. package/dist/components/Table/components/Column.esm.js +8 -36
  120. package/dist/components/Table/components/Column.esm.js.map +1 -1
  121. package/dist/components/Table/components/Row.esm.js +9 -19
  122. package/dist/components/Table/components/Row.esm.js.map +1 -1
  123. package/dist/components/Table/components/Table.esm.js +7 -0
  124. package/dist/components/Table/components/Table.esm.js.map +1 -1
  125. package/dist/components/Table/components/TableBody.esm.js +4 -12
  126. package/dist/components/Table/components/TableBody.esm.js.map +1 -1
  127. package/dist/components/Table/components/TableHeader.esm.js +19 -29
  128. package/dist/components/Table/components/TableHeader.esm.js.map +1 -1
  129. package/dist/components/Table/components/TableRoot.esm.js +5 -7
  130. package/dist/components/Table/components/TableRoot.esm.js.map +1 -1
  131. package/dist/components/Table/definition.esm.js +97 -21
  132. package/dist/components/Table/definition.esm.js.map +1 -1
  133. package/dist/components/TablePagination/TablePagination.esm.js +24 -32
  134. package/dist/components/TablePagination/TablePagination.esm.js.map +1 -1
  135. package/dist/components/TablePagination/definition.esm.js +32 -2
  136. package/dist/components/TablePagination/definition.esm.js.map +1 -1
  137. package/dist/components/Tabs/Tabs.esm.js +40 -63
  138. package/dist/components/Tabs/Tabs.esm.js.map +1 -1
  139. package/dist/components/Tabs/TabsIndicators.esm.js +6 -18
  140. package/dist/components/Tabs/TabsIndicators.esm.js.map +1 -1
  141. package/dist/components/Tabs/definition.esm.js +62 -10
  142. package/dist/components/Tabs/definition.esm.js.map +1 -1
  143. package/dist/components/TagGroup/TagGroup.esm.js +36 -63
  144. package/dist/components/TagGroup/TagGroup.esm.js.map +1 -1
  145. package/dist/components/TagGroup/definition.esm.js +35 -8
  146. package/dist/components/TagGroup/definition.esm.js.map +1 -1
  147. package/dist/components/Text/Text.esm.js +6 -13
  148. package/dist/components/Text/Text.esm.js.map +1 -1
  149. package/dist/components/Text/definition.esm.js +18 -14
  150. package/dist/components/Text/definition.esm.js.map +1 -1
  151. package/dist/components/TextField/TextField.esm.js +16 -41
  152. package/dist/components/TextField/TextField.esm.js.map +1 -1
  153. package/dist/components/TextField/definition.esm.js +19 -6
  154. package/dist/components/TextField/definition.esm.js.map +1 -1
  155. package/dist/components/ToggleButton/ToggleButton.esm.js +11 -23
  156. package/dist/components/ToggleButton/ToggleButton.esm.js.map +1 -1
  157. package/dist/components/ToggleButton/definition.esm.js +17 -4
  158. package/dist/components/ToggleButton/definition.esm.js.map +1 -1
  159. package/dist/components/ToggleButtonGroup/ToggleButtonGroup.esm.js +5 -18
  160. package/dist/components/ToggleButtonGroup/ToggleButtonGroup.esm.js.map +1 -1
  161. package/dist/components/ToggleButtonGroup/definition.esm.js +14 -4
  162. package/dist/components/ToggleButtonGroup/definition.esm.js.map +1 -1
  163. package/dist/components/Tooltip/Tooltip.esm.js +24 -30
  164. package/dist/components/Tooltip/Tooltip.esm.js.map +1 -1
  165. package/dist/components/Tooltip/Tooltip.module.css.esm.js +2 -2
  166. package/dist/components/Tooltip/definition.esm.js +16 -2
  167. package/dist/components/Tooltip/definition.esm.js.map +1 -1
  168. package/dist/components/VisuallyHidden/VisuallyHidden.esm.js +4 -12
  169. package/dist/components/VisuallyHidden/VisuallyHidden.esm.js.map +1 -1
  170. package/dist/components/VisuallyHidden/definition.esm.js +14 -2
  171. package/dist/components/VisuallyHidden/definition.esm.js.map +1 -1
  172. package/dist/css/styles.css +2 -4
  173. package/dist/hooks/useBg.esm.js +11 -2
  174. package/dist/hooks/useBg.esm.js.map +1 -1
  175. package/dist/hooks/useBreakpoint.esm.js +67 -27
  176. package/dist/hooks/useBreakpoint.esm.js.map +1 -1
  177. package/dist/hooks/useDefinition/helpers.esm.js +24 -1
  178. package/dist/hooks/useDefinition/helpers.esm.js.map +1 -1
  179. package/dist/hooks/useDefinition/useDefinition.esm.js +12 -22
  180. package/dist/hooks/useDefinition/useDefinition.esm.js.map +1 -1
  181. package/dist/index.d.ts +860 -273
  182. package/dist/index.esm.js +2 -2
  183. package/package.json +6 -4
  184. package/dist/components/PluginHeader/PluginHeaderToolbar.esm.js +0 -94
  185. package/dist/components/PluginHeader/PluginHeaderToolbar.esm.js.map +0 -1
  186. package/dist/hooks/useMediaQuery.esm.js +0 -47
  187. package/dist/hooks/useMediaQuery.esm.js.map +0 -1
  188. package/dist/hooks/useStyles.esm.js +0 -53
  189. package/dist/hooks/useStyles.esm.js.map +0 -1
@@ -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 { useStyles } from '../../hooks/useStyles';\nimport { FieldLabelDefinition } from './definition';\nimport styles from './FieldLabel.module.css';\nimport clsx from 'clsx';\n\n/** @public */\nexport const FieldLabel = forwardRef<HTMLDivElement, FieldLabelProps>(\n (props: FieldLabelProps, ref) => {\n const { classNames, cleanedProps } = useStyles(FieldLabelDefinition, props);\n const {\n className,\n label,\n secondaryLabel,\n description,\n htmlFor,\n id,\n ...rest\n } = cleanedProps;\n\n if (!label) return null;\n\n return (\n <div\n className={clsx(classNames.root, styles[classNames.root], className)}\n {...rest}\n ref={ref}\n >\n {label && (\n <Label\n className={clsx(classNames.label, styles[classNames.label])}\n htmlFor={htmlFor}\n id={id}\n >\n {label}\n {secondaryLabel && (\n <span\n aria-hidden=\"true\"\n className={clsx(\n classNames.secondaryLabel,\n styles[classNames.secondaryLabel],\n )}\n >\n ({secondaryLabel})\n </span>\n )}\n </Label>\n )}\n {description && (\n <div\n className={clsx(\n classNames.description,\n styles[classNames.description],\n )}\n >\n {description}\n </div>\n )}\n </div>\n );\n },\n);\n\nFieldLabel.displayName = 'FieldLabel';\n"],"names":[],"mappings":";;;;;;;;AAwBO,MAAM,UAAA,GAAa,UAAA;AAAA,EACxB,CAAC,OAAwB,GAAA,KAAQ;AAC/B,IAAA,MAAM,EAAE,UAAA,EAAY,YAAA,EAAa,GAAI,SAAA,CAAU,sBAAsB,KAAK,CAAA;AAC1E,IAAA,MAAM;AAAA,MACJ,SAAA;AAAA,MACA,KAAA;AAAA,MACA,cAAA;AAAA,MACA,WAAA;AAAA,MACA,OAAA;AAAA,MACA,EAAA;AAAA,MACA,GAAG;AAAA,KACL,GAAI,YAAA;AAEJ,IAAA,IAAI,CAAC,OAAO,OAAO,IAAA;AAEnB,IAAA,uBACE,IAAA;AAAA,MAAC,KAAA;AAAA,MAAA;AAAA,QACC,SAAA,EAAW,KAAK,UAAA,CAAW,IAAA,EAAM,OAAO,UAAA,CAAW,IAAI,GAAG,SAAS,CAAA;AAAA,QAClE,GAAG,IAAA;AAAA,QACJ,GAAA;AAAA,QAEC,QAAA,EAAA;AAAA,UAAA,KAAA,oBACC,IAAA;AAAA,YAAC,KAAA;AAAA,YAAA;AAAA,cACC,WAAW,IAAA,CAAK,UAAA,CAAW,OAAO,MAAA,CAAO,UAAA,CAAW,KAAK,CAAC,CAAA;AAAA,cAC1D,OAAA;AAAA,cACA,EAAA;AAAA,cAEC,QAAA,EAAA;AAAA,gBAAA,KAAA;AAAA,gBACA,cAAA,oBACC,IAAA;AAAA,kBAAC,MAAA;AAAA,kBAAA;AAAA,oBACC,aAAA,EAAY,MAAA;AAAA,oBACZ,SAAA,EAAW,IAAA;AAAA,sBACT,UAAA,CAAW,cAAA;AAAA,sBACX,MAAA,CAAO,WAAW,cAAc;AAAA,qBAClC;AAAA,oBACD,QAAA,EAAA;AAAA,sBAAA,GAAA;AAAA,sBACG,cAAA;AAAA,sBAAe;AAAA;AAAA;AAAA;AACnB;AAAA;AAAA,WAEJ;AAAA,UAED,WAAA,oBACC,GAAA;AAAA,YAAC,KAAA;AAAA,YAAA;AAAA,cACC,SAAA,EAAW,IAAA;AAAA,gBACT,UAAA,CAAW,WAAA;AAAA,gBACX,MAAA,CAAO,WAAW,WAAW;AAAA,eAC/B;AAAA,cAEC,QAAA,EAAA;AAAA;AAAA;AACH;AAAA;AAAA,KAEJ;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/** @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,11 +1,28 @@
1
- const FieldLabelDefinition = {
1
+ import 'react/jsx-runtime';
2
+ import 'clsx';
3
+ import '../../hooks/useBreakpoint.esm.js';
4
+ import '../../hooks/useBg.esm.js';
5
+ import '../../hooks/useDefinition/helpers.esm.js';
6
+ import { defineComponent } from '../../hooks/useDefinition/defineComponent.esm.js';
7
+ import styles from './FieldLabel.module.css.esm.js';
8
+
9
+ const FieldLabelDefinition = defineComponent()({
10
+ styles,
2
11
  classNames: {
3
12
  root: "bui-FieldLabelWrapper",
4
13
  label: "bui-FieldLabel",
5
14
  secondaryLabel: "bui-FieldSecondaryLabel",
6
15
  description: "bui-FieldDescription"
16
+ },
17
+ propDefs: {
18
+ label: {},
19
+ secondaryLabel: {},
20
+ description: {},
21
+ htmlFor: {},
22
+ id: {},
23
+ className: {}
7
24
  }
8
- };
25
+ });
9
26
 
10
27
  export { FieldLabelDefinition };
11
28
  //# sourceMappingURL=definition.esm.js.map
@@ -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 type { ComponentDefinition } from '../../types';\n\n/**\n * Component definition for FieldLabel\n * @public\n */\nexport const FieldLabelDefinition = {\n classNames: {\n root: 'bui-FieldLabelWrapper',\n label: 'bui-FieldLabel',\n secondaryLabel: 'bui-FieldSecondaryLabel',\n description: 'bui-FieldDescription',\n },\n} as const satisfies ComponentDefinition;\n"],"names":[],"mappings":"AAsBO,MAAM,oBAAA,GAAuB;AAAA,EAClC,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,uBAAA;AAAA,IACN,KAAA,EAAO,gBAAA;AAAA,IACP,cAAA,EAAgB,yBAAA;AAAA,IAChB,WAAA,EAAa;AAAA;AAEjB;;;;"}
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,37 +1,26 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
2
  import { forwardRef } from 'react';
3
- import clsx from 'clsx';
4
- import { useStyles } from '../../hooks/useStyles.esm.js';
3
+ import { useDefinition } from '../../hooks/useDefinition/useDefinition.esm.js';
5
4
  import { FlexDefinition } from './definition.esm.js';
6
- import styles from './Flex.module.css.esm.js';
7
- import { useBgProvider, BgProvider } from '../../hooks/useBg.esm.js';
8
5
 
9
6
  const Flex = forwardRef((props, ref) => {
10
- const { bg: resolvedBg } = useBgProvider(props.bg);
11
- const { classNames, dataAttributes, utilityClasses, style, cleanedProps } = useStyles(FlexDefinition, {
12
- gap: "4",
13
- ...props,
14
- bg: resolvedBg
15
- // Use resolved bg for data attribute
16
- });
17
- const { className, bg, ...rest } = cleanedProps;
18
- const content = /* @__PURE__ */ jsx(
7
+ const { ownProps, dataAttributes, utilityStyle } = useDefinition(
8
+ FlexDefinition,
9
+ { gap: "4", ...props }
10
+ );
11
+ const { classes, childrenWithBgProvider } = ownProps;
12
+ return /* @__PURE__ */ jsx(
19
13
  "div",
20
14
  {
21
15
  ref,
22
- className: clsx(
23
- classNames.root,
24
- utilityClasses,
25
- styles[classNames.root],
26
- className
27
- ),
28
- style,
16
+ className: classes.root,
17
+ style: { ...utilityStyle, ...ownProps.style },
29
18
  ...dataAttributes,
30
- ...rest
19
+ children: childrenWithBgProvider
31
20
  }
32
21
  );
33
- return resolvedBg ? /* @__PURE__ */ jsx(BgProvider, { bg: resolvedBg, children: content }) : content;
34
22
  });
23
+ Flex.displayName = "Flex";
35
24
 
36
25
  export { Flex };
37
26
  //# sourceMappingURL=Flex.esm.js.map
@@ -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 { FlexProps } from './types';\nimport clsx from 'clsx';\nimport { useStyles } from '../../hooks/useStyles';\nimport { FlexDefinition } from './definition';\nimport styles from './Flex.module.css';\nimport { BgProvider, useBgProvider } from '../../hooks/useBg';\n\n/** @public */\nexport const Flex = forwardRef<HTMLDivElement, FlexProps>((props, ref) => {\n const { bg: resolvedBg } = useBgProvider(props.bg);\n\n const { classNames, dataAttributes, utilityClasses, style, cleanedProps } =\n useStyles(FlexDefinition, {\n gap: '4',\n ...props,\n bg: resolvedBg, // Use resolved bg for data attribute\n });\n\n const { className, bg, ...rest } = cleanedProps;\n\n const content = (\n <div\n ref={ref}\n className={clsx(\n classNames.root,\n utilityClasses,\n styles[classNames.root],\n className,\n )}\n style={style}\n {...dataAttributes}\n {...rest}\n />\n );\n\n return resolvedBg ? (\n <BgProvider bg={resolvedBg}>{content}</BgProvider>\n ) : (\n content\n );\n});\n"],"names":[],"mappings":";;;;;;;;AAyBO,MAAM,IAAA,GAAO,UAAA,CAAsC,CAAC,KAAA,EAAO,GAAA,KAAQ;AACxE,EAAA,MAAM,EAAE,EAAA,EAAI,UAAA,EAAW,GAAI,aAAA,CAAc,MAAM,EAAE,CAAA;AAEjD,EAAA,MAAM,EAAE,YAAY,cAAA,EAAgB,cAAA,EAAgB,OAAO,YAAA,EAAa,GACtE,UAAU,cAAA,EAAgB;AAAA,IACxB,GAAA,EAAK,GAAA;AAAA,IACL,GAAG,KAAA;AAAA,IACH,EAAA,EAAI;AAAA;AAAA,GACL,CAAA;AAEH,EAAA,MAAM,EAAE,SAAA,EAAW,EAAA,EAAI,GAAG,MAAK,GAAI,YAAA;AAEnC,EAAA,MAAM,OAAA,mBACJ,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,GAAA;AAAA,MACA,SAAA,EAAW,IAAA;AAAA,QACT,UAAA,CAAW,IAAA;AAAA,QACX,cAAA;AAAA,QACA,MAAA,CAAO,WAAW,IAAI,CAAA;AAAA,QACtB;AAAA,OACF;AAAA,MACA,KAAA;AAAA,MACC,GAAG,cAAA;AAAA,MACH,GAAG;AAAA;AAAA,GACN;AAGF,EAAA,OAAO,6BACL,GAAA,CAAC,UAAA,EAAA,EAAW,EAAA,EAAI,UAAA,EAAa,mBAAQ,CAAA,GAErC,OAAA;AAEJ,CAAC;;;;"}
1
+ {"version":3,"file":"Flex.esm.js","sources":["../../../src/components/Flex/Flex.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { forwardRef } from 'react';\nimport 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 } = 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 >\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,EAAa,GAAI,aAAA;AAAA,IACjD,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,MAEH,QAAA,EAAA;AAAA;AAAA,GACH;AAEJ,CAAC;AAED,IAAA,CAAK,WAAA,GAAc,MAAA;;;;"}
@@ -1,7 +1,23 @@
1
- const FlexDefinition = {
1
+ import 'react/jsx-runtime';
2
+ import 'clsx';
3
+ import '../../hooks/useBreakpoint.esm.js';
4
+ import '../../hooks/useBg.esm.js';
5
+ import '../../hooks/useDefinition/helpers.esm.js';
6
+ import { defineComponent } from '../../hooks/useDefinition/defineComponent.esm.js';
7
+ import styles from './Flex.module.css.esm.js';
8
+
9
+ const FlexDefinition = defineComponent()({
10
+ styles,
2
11
  classNames: {
3
12
  root: "bui-Flex"
4
13
  },
14
+ bg: "provider",
15
+ propDefs: {
16
+ bg: { dataAttribute: true },
17
+ children: {},
18
+ className: {},
19
+ style: {}
20
+ },
5
21
  utilityProps: [
6
22
  "m",
7
23
  "mb",
@@ -21,18 +37,8 @@ const FlexDefinition = {
21
37
  "align",
22
38
  "justify",
23
39
  "direction"
24
- ],
25
- dataAttributes: {
26
- bg: [
27
- "neutral-1",
28
- "neutral-2",
29
- "neutral-3",
30
- "danger",
31
- "warning",
32
- "success"
33
- ]
34
- }
35
- };
40
+ ]
41
+ });
36
42
 
37
43
  export { FlexDefinition };
38
44
  //# sourceMappingURL=definition.esm.js.map
@@ -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 type { ComponentDefinition } from '../../types';\n\n/**\n * Component definition for Flex\n * @public\n */\nexport const FlexDefinition = {\n classNames: {\n root: 'bui-Flex',\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 dataAttributes: {\n bg: [\n 'neutral-1',\n 'neutral-2',\n 'neutral-3',\n 'danger',\n 'warning',\n 'success',\n ] as const,\n },\n} as const satisfies ComponentDefinition;\n"],"names":[],"mappings":"AAsBO,MAAM,cAAA,GAAiB;AAAA,EAC5B,UAAA,EAAY;AAAA,IACV,IAAA,EAAM;AAAA,GACR;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,GACF;AAAA,EACA,cAAA,EAAgB;AAAA,IACd,EAAA,EAAI;AAAA,MACF,WAAA;AAAA,MACA,WAAA;AAAA,MACA,WAAA;AAAA,MACA,QAAA;AAAA,MACA,SAAA;AAAA,MACA;AAAA;AACF;AAEJ;;;;"}
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,21 +1,12 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
2
  import { forwardRef } from 'react';
3
- import { useStyles } from '../../hooks/useStyles.esm.js';
3
+ import { useDefinition } from '../../hooks/useDefinition/useDefinition.esm.js';
4
4
  import { FullPageDefinition } from './definition.esm.js';
5
- import styles from './FullPage.module.css.esm.js';
6
- import clsx from 'clsx';
7
5
 
8
6
  const FullPage = forwardRef((props, ref) => {
9
- const { classNames, cleanedProps } = useStyles(FullPageDefinition, props);
10
- const { className, ...rest } = cleanedProps;
11
- return /* @__PURE__ */ jsx(
12
- "main",
13
- {
14
- ref,
15
- className: clsx(classNames.root, styles[classNames.root], className),
16
- ...rest
17
- }
18
- );
7
+ const { ownProps, restProps } = useDefinition(FullPageDefinition, props);
8
+ const { classes } = ownProps;
9
+ return /* @__PURE__ */ jsx("main", { ref, className: classes.root, ...restProps });
19
10
  });
20
11
 
21
12
  export { FullPage };
@@ -1 +1 @@
1
- {"version":3,"file":"FullPage.esm.js","sources":["../../../src/components/FullPage/FullPage.tsx"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { forwardRef } from 'react';\nimport type { FullPageProps } from './types';\nimport { useStyles } from '../../hooks/useStyles';\nimport { FullPageDefinition } from './definition';\nimport styles from './FullPage.module.css';\nimport clsx from 'clsx';\n\n/**\n * A component that fills the remaining viewport height below the Header.\n *\n * The FullPage component consumes the `--bui-header-height` CSS custom property\n * set by the Header component to calculate its height as\n * `calc(100dvh - var(--bui-header-height, 0px))`. Content inside the FullPage\n * scrolls independently while the Header stays visible.\n *\n * @public\n */\nexport const FullPage = forwardRef<HTMLElement, FullPageProps>((props, ref) => {\n const { classNames, cleanedProps } = useStyles(FullPageDefinition, props);\n const { className, ...rest } = cleanedProps;\n\n return (\n <main\n ref={ref}\n className={clsx(classNames.root, styles[classNames.root], className)}\n {...rest}\n />\n );\n});\n"],"names":[],"mappings":";;;;;;;AAiCO,MAAM,QAAA,GAAW,UAAA,CAAuC,CAAC,KAAA,EAAO,GAAA,KAAQ;AAC7E,EAAA,MAAM,EAAE,UAAA,EAAY,YAAA,EAAa,GAAI,SAAA,CAAU,oBAAoB,KAAK,CAAA;AACxE,EAAA,MAAM,EAAE,SAAA,EAAW,GAAG,IAAA,EAAK,GAAI,YAAA;AAE/B,EAAA,uBACE,GAAA;AAAA,IAAC,MAAA;AAAA,IAAA;AAAA,MACC,GAAA;AAAA,MACA,SAAA,EAAW,KAAK,UAAA,CAAW,IAAA,EAAM,OAAO,UAAA,CAAW,IAAI,GAAG,SAAS,CAAA;AAAA,MAClE,GAAG;AAAA;AAAA,GACN;AAEJ,CAAC;;;;"}
1
+ {"version":3,"file":"FullPage.esm.js","sources":["../../../src/components/FullPage/FullPage.tsx"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { forwardRef } from 'react';\nimport type { FullPageProps } from './types';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport { FullPageDefinition } from './definition';\n\n/**\n * A component that fills the remaining viewport height below the Header.\n *\n * The FullPage component consumes the `--bui-header-height` CSS custom property\n * set by the Header component to calculate its height as\n * `calc(100dvh - var(--bui-header-height, 0px))`. Content inside the FullPage\n * scrolls independently while the Header stays visible.\n *\n * @public\n */\nexport const FullPage = forwardRef<HTMLElement, FullPageProps>((props, ref) => {\n const { ownProps, restProps } = useDefinition(FullPageDefinition, props);\n const { classes } = ownProps;\n\n return <main ref={ref} className={classes.root} {...restProps} />;\n});\n"],"names":[],"mappings":";;;;;AA+BO,MAAM,QAAA,GAAW,UAAA,CAAuC,CAAC,KAAA,EAAO,GAAA,KAAQ;AAC7E,EAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAU,GAAI,aAAA,CAAc,oBAAoB,KAAK,CAAA;AACvE,EAAA,MAAM,EAAE,SAAQ,GAAI,QAAA;AAEpB,EAAA,2BAAQ,MAAA,EAAA,EAAK,GAAA,EAAU,WAAW,OAAA,CAAQ,IAAA,EAAO,GAAG,SAAA,EAAW,CAAA;AACjE,CAAC;;;;"}
@@ -1,8 +1,20 @@
1
- const FullPageDefinition = {
1
+ import 'react/jsx-runtime';
2
+ import 'clsx';
3
+ import '../../hooks/useBreakpoint.esm.js';
4
+ import '../../hooks/useBg.esm.js';
5
+ import '../../hooks/useDefinition/helpers.esm.js';
6
+ import { defineComponent } from '../../hooks/useDefinition/defineComponent.esm.js';
7
+ import styles from './FullPage.module.css.esm.js';
8
+
9
+ const FullPageDefinition = defineComponent()({
10
+ styles,
2
11
  classNames: {
3
12
  root: "bui-FullPage"
13
+ },
14
+ propDefs: {
15
+ className: {}
4
16
  }
5
- };
17
+ });
6
18
 
7
19
  export { FullPageDefinition };
8
20
  //# sourceMappingURL=definition.esm.js.map
@@ -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 type { ComponentDefinition } from '../../types';\n\n/**\n * Component definition for FullPage\n * @public\n */\nexport const FullPageDefinition = {\n classNames: {\n root: 'bui-FullPage',\n },\n} as const satisfies ComponentDefinition;\n"],"names":[],"mappings":"AAsBO,MAAM,kBAAA,GAAqB;AAAA,EAChC,UAAA,EAAY;AAAA,IACV,IAAA,EAAM;AAAA;AAEV;;;;"}
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,62 +1,41 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
2
  import { forwardRef } from 'react';
3
- import clsx from 'clsx';
4
- import { useStyles } from '../../hooks/useStyles.esm.js';
3
+ import { useDefinition } from '../../hooks/useDefinition/useDefinition.esm.js';
5
4
  import { GridDefinition, GridItemDefinition } from './definition.esm.js';
6
- import styles from './Grid.module.css.esm.js';
7
- import { useBgProvider, BgProvider } from '../../hooks/useBg.esm.js';
8
5
 
9
6
  const GridRoot = forwardRef((props, ref) => {
10
- const { bg: resolvedBg } = useBgProvider(props.bg);
11
- const { classNames, dataAttributes, utilityClasses, style, cleanedProps } = useStyles(GridDefinition, {
12
- columns: "auto",
13
- gap: "4",
14
- ...props,
15
- bg: resolvedBg
16
- // Use resolved bg for data attribute
17
- });
18
- const { className, bg, ...rest } = cleanedProps;
19
- const content = /* @__PURE__ */ jsx(
7
+ const { ownProps, dataAttributes, utilityStyle } = useDefinition(
8
+ GridDefinition,
9
+ { columns: "auto", gap: "4", ...props }
10
+ );
11
+ const { classes, childrenWithBgProvider } = ownProps;
12
+ return /* @__PURE__ */ jsx(
20
13
  "div",
21
14
  {
22
15
  ref,
23
- className: clsx(
24
- classNames.root,
25
- utilityClasses,
26
- styles[classNames.root],
27
- className
28
- ),
29
- style,
16
+ className: classes.root,
17
+ style: { ...utilityStyle, ...ownProps.style },
30
18
  ...dataAttributes,
31
- ...rest
19
+ children: childrenWithBgProvider
32
20
  }
33
21
  );
34
- return resolvedBg ? /* @__PURE__ */ jsx(BgProvider, { bg: resolvedBg, children: content }) : content;
35
22
  });
36
23
  const GridItem = forwardRef((props, ref) => {
37
- const { bg: resolvedBg } = useBgProvider(props.bg);
38
- const { classNames, dataAttributes, utilityClasses, style, cleanedProps } = useStyles(GridItemDefinition, {
39
- ...props,
40
- bg: resolvedBg
41
- // Use resolved bg for data attribute
42
- });
43
- const { className, bg, ...rest } = cleanedProps;
44
- const content = /* @__PURE__ */ jsx(
24
+ const { ownProps, dataAttributes, utilityStyle } = useDefinition(
25
+ GridItemDefinition,
26
+ props
27
+ );
28
+ const { classes, childrenWithBgProvider } = ownProps;
29
+ return /* @__PURE__ */ jsx(
45
30
  "div",
46
31
  {
47
32
  ref,
48
- className: clsx(
49
- classNames.root,
50
- utilityClasses,
51
- styles[classNames.root],
52
- className
53
- ),
54
- style,
33
+ className: classes.root,
34
+ style: { ...utilityStyle, ...ownProps.style },
55
35
  ...dataAttributes,
56
- ...rest
36
+ children: childrenWithBgProvider
57
37
  }
58
38
  );
59
- return resolvedBg ? /* @__PURE__ */ jsx(BgProvider, { bg: resolvedBg, children: content }) : content;
60
39
  });
61
40
  const Grid = {
62
41
  Root: GridRoot,
@@ -1 +1 @@
1
- {"version":3,"file":"Grid.esm.js","sources":["../../../src/components/Grid/Grid.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { forwardRef } from 'react';\nimport clsx from 'clsx';\nimport type { GridItemProps, GridProps } from './types';\nimport { useStyles } from '../../hooks/useStyles';\nimport { GridDefinition, GridItemDefinition } from './definition';\nimport styles from './Grid.module.css';\nimport { BgProvider, useBgProvider } from '../../hooks/useBg';\n\nconst GridRoot = forwardRef<HTMLDivElement, GridProps>((props, ref) => {\n const { bg: resolvedBg } = useBgProvider(props.bg);\n\n const { classNames, dataAttributes, utilityClasses, style, cleanedProps } =\n useStyles(GridDefinition, {\n columns: 'auto',\n gap: '4',\n ...props,\n bg: resolvedBg, // Use resolved bg for data attribute\n });\n\n const { className, bg, ...rest } = cleanedProps;\n\n const content = (\n <div\n ref={ref}\n className={clsx(\n classNames.root,\n utilityClasses,\n styles[classNames.root],\n className,\n )}\n style={style}\n {...dataAttributes}\n {...rest}\n />\n );\n\n return resolvedBg ? (\n <BgProvider bg={resolvedBg}>{content}</BgProvider>\n ) : (\n content\n );\n});\n\nconst GridItem = forwardRef<HTMLDivElement, GridItemProps>((props, ref) => {\n const { bg: resolvedBg } = useBgProvider(props.bg);\n\n const { classNames, dataAttributes, utilityClasses, style, cleanedProps } =\n useStyles(GridItemDefinition, {\n ...props,\n bg: resolvedBg, // Use resolved bg for data attribute\n });\n\n const { className, bg, ...rest } = cleanedProps;\n\n const content = (\n <div\n ref={ref}\n className={clsx(\n classNames.root,\n utilityClasses,\n styles[classNames.root],\n className,\n )}\n style={style}\n {...dataAttributes}\n {...rest}\n />\n );\n\n return resolvedBg ? (\n <BgProvider bg={resolvedBg}>{content}</BgProvider>\n ) : (\n content\n );\n});\n\n/** @public */\nexport const Grid = {\n Root: GridRoot,\n Item: GridItem,\n};\n"],"names":[],"mappings":";;;;;;;;AAwBA,MAAM,QAAA,GAAW,UAAA,CAAsC,CAAC,KAAA,EAAO,GAAA,KAAQ;AACrE,EAAA,MAAM,EAAE,EAAA,EAAI,UAAA,EAAW,GAAI,aAAA,CAAc,MAAM,EAAE,CAAA;AAEjD,EAAA,MAAM,EAAE,YAAY,cAAA,EAAgB,cAAA,EAAgB,OAAO,YAAA,EAAa,GACtE,UAAU,cAAA,EAAgB;AAAA,IACxB,OAAA,EAAS,MAAA;AAAA,IACT,GAAA,EAAK,GAAA;AAAA,IACL,GAAG,KAAA;AAAA,IACH,EAAA,EAAI;AAAA;AAAA,GACL,CAAA;AAEH,EAAA,MAAM,EAAE,SAAA,EAAW,EAAA,EAAI,GAAG,MAAK,GAAI,YAAA;AAEnC,EAAA,MAAM,OAAA,mBACJ,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,GAAA;AAAA,MACA,SAAA,EAAW,IAAA;AAAA,QACT,UAAA,CAAW,IAAA;AAAA,QACX,cAAA;AAAA,QACA,MAAA,CAAO,WAAW,IAAI,CAAA;AAAA,QACtB;AAAA,OACF;AAAA,MACA,KAAA;AAAA,MACC,GAAG,cAAA;AAAA,MACH,GAAG;AAAA;AAAA,GACN;AAGF,EAAA,OAAO,6BACL,GAAA,CAAC,UAAA,EAAA,EAAW,EAAA,EAAI,UAAA,EAAa,mBAAQ,CAAA,GAErC,OAAA;AAEJ,CAAC,CAAA;AAED,MAAM,QAAA,GAAW,UAAA,CAA0C,CAAC,KAAA,EAAO,GAAA,KAAQ;AACzE,EAAA,MAAM,EAAE,EAAA,EAAI,UAAA,EAAW,GAAI,aAAA,CAAc,MAAM,EAAE,CAAA;AAEjD,EAAA,MAAM,EAAE,YAAY,cAAA,EAAgB,cAAA,EAAgB,OAAO,YAAA,EAAa,GACtE,UAAU,kBAAA,EAAoB;AAAA,IAC5B,GAAG,KAAA;AAAA,IACH,EAAA,EAAI;AAAA;AAAA,GACL,CAAA;AAEH,EAAA,MAAM,EAAE,SAAA,EAAW,EAAA,EAAI,GAAG,MAAK,GAAI,YAAA;AAEnC,EAAA,MAAM,OAAA,mBACJ,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,GAAA;AAAA,MACA,SAAA,EAAW,IAAA;AAAA,QACT,UAAA,CAAW,IAAA;AAAA,QACX,cAAA;AAAA,QACA,MAAA,CAAO,WAAW,IAAI,CAAA;AAAA,QACtB;AAAA,OACF;AAAA,MACA,KAAA;AAAA,MACC,GAAG,cAAA;AAAA,MACH,GAAG;AAAA;AAAA,GACN;AAGF,EAAA,OAAO,6BACL,GAAA,CAAC,UAAA,EAAA,EAAW,EAAA,EAAI,UAAA,EAAa,mBAAQ,CAAA,GAErC,OAAA;AAEJ,CAAC,CAAA;AAGM,MAAM,IAAA,GAAO;AAAA,EAClB,IAAA,EAAM,QAAA;AAAA,EACN,IAAA,EAAM;AACR;;;;"}
1
+ {"version":3,"file":"Grid.esm.js","sources":["../../../src/components/Grid/Grid.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { forwardRef } from 'react';\nimport type { GridItemProps, GridProps } from './types';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport { GridDefinition, GridItemDefinition } from './definition';\n\nconst GridRoot = forwardRef<HTMLDivElement, GridProps>((props, ref) => {\n const { ownProps, dataAttributes, utilityStyle } = useDefinition(\n GridDefinition,\n { columns: 'auto', 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 >\n {childrenWithBgProvider}\n </div>\n );\n});\n\nconst GridItem = forwardRef<HTMLDivElement, GridItemProps>((props, ref) => {\n const { ownProps, dataAttributes, utilityStyle } = useDefinition(\n GridItemDefinition,\n 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 >\n {childrenWithBgProvider}\n </div>\n );\n});\n\n/** @public */\nexport const Grid = {\n Root: GridRoot,\n Item: GridItem,\n};\n"],"names":[],"mappings":";;;;;AAqBA,MAAM,QAAA,GAAW,UAAA,CAAsC,CAAC,KAAA,EAAO,GAAA,KAAQ;AACrE,EAAA,MAAM,EAAE,QAAA,EAAU,cAAA,EAAgB,YAAA,EAAa,GAAI,aAAA;AAAA,IACjD,cAAA;AAAA,IACA,EAAE,OAAA,EAAS,MAAA,EAAQ,GAAA,EAAK,GAAA,EAAK,GAAG,KAAA;AAAM,GACxC;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,MAEH,QAAA,EAAA;AAAA;AAAA,GACH;AAEJ,CAAC,CAAA;AAED,MAAM,QAAA,GAAW,UAAA,CAA0C,CAAC,KAAA,EAAO,GAAA,KAAQ;AACzE,EAAA,MAAM,EAAE,QAAA,EAAU,cAAA,EAAgB,YAAA,EAAa,GAAI,aAAA;AAAA,IACjD,kBAAA;AAAA,IACA;AAAA,GACF;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,MAEH,QAAA,EAAA;AAAA;AAAA,GACH;AAEJ,CAAC,CAAA;AAGM,MAAM,IAAA,GAAO;AAAA,EAClB,IAAA,EAAM,QAAA;AAAA,EACN,IAAA,EAAM;AACR;;;;"}
@@ -1,7 +1,23 @@
1
- const GridDefinition = {
1
+ import 'react/jsx-runtime';
2
+ import 'clsx';
3
+ import '../../hooks/useBreakpoint.esm.js';
4
+ import '../../hooks/useBg.esm.js';
5
+ import '../../hooks/useDefinition/helpers.esm.js';
6
+ import { defineComponent } from '../../hooks/useDefinition/defineComponent.esm.js';
7
+ import styles from './Grid.module.css.esm.js';
8
+
9
+ const GridDefinition = defineComponent()({
10
+ styles,
2
11
  classNames: {
3
12
  root: "bui-Grid"
4
13
  },
14
+ bg: "provider",
15
+ propDefs: {
16
+ bg: { dataAttribute: true },
17
+ children: {},
18
+ className: {},
19
+ style: {}
20
+ },
5
21
  utilityProps: [
6
22
  "columns",
7
23
  "gap",
@@ -19,34 +35,22 @@ const GridDefinition = {
19
35
  "pt",
20
36
  "px",
21
37
  "py"
22
- ],
23
- dataAttributes: {
24
- bg: [
25
- "neutral-1",
26
- "neutral-2",
27
- "neutral-3",
28
- "danger",
29
- "warning",
30
- "success"
31
- ]
32
- }
33
- };
34
- const GridItemDefinition = {
38
+ ]
39
+ });
40
+ const GridItemDefinition = defineComponent()({
41
+ styles,
35
42
  classNames: {
36
43
  root: "bui-GridItem"
37
44
  },
38
- utilityProps: ["colSpan", "colEnd", "colStart", "rowSpan"],
39
- dataAttributes: {
40
- bg: [
41
- "neutral-1",
42
- "neutral-2",
43
- "neutral-3",
44
- "danger",
45
- "warning",
46
- "success"
47
- ]
48
- }
49
- };
45
+ bg: "provider",
46
+ propDefs: {
47
+ bg: { dataAttribute: true },
48
+ children: {},
49
+ className: {},
50
+ style: {}
51
+ },
52
+ utilityProps: ["colSpan", "colEnd", "colStart", "rowSpan"]
53
+ });
50
54
 
51
55
  export { GridDefinition, GridItemDefinition };
52
56
  //# sourceMappingURL=definition.esm.js.map
@@ -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 type { ComponentDefinition } from '../../types';\n\n/**\n * Component definition for Grid\n * @public\n */\nexport const GridDefinition = {\n classNames: {\n root: 'bui-Grid',\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 dataAttributes: {\n bg: [\n 'neutral-1',\n 'neutral-2',\n 'neutral-3',\n 'danger',\n 'warning',\n 'success',\n ] as const,\n },\n} as const satisfies ComponentDefinition;\n\n/**\n * Component definition for GridItem\n * @public\n */\nexport const GridItemDefinition = {\n classNames: {\n root: 'bui-GridItem',\n },\n utilityProps: ['colSpan', 'colEnd', 'colStart', 'rowSpan'],\n dataAttributes: {\n bg: [\n 'neutral-1',\n 'neutral-2',\n 'neutral-3',\n 'danger',\n 'warning',\n 'success',\n ] as const,\n },\n} as const satisfies ComponentDefinition;\n"],"names":[],"mappings":"AAsBO,MAAM,cAAA,GAAiB;AAAA,EAC5B,UAAA,EAAY;AAAA,IACV,IAAA,EAAM;AAAA,GACR;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,GACF;AAAA,EACA,cAAA,EAAgB;AAAA,IACd,EAAA,EAAI;AAAA,MACF,WAAA;AAAA,MACA,WAAA;AAAA,MACA,WAAA;AAAA,MACA,QAAA;AAAA,MACA,SAAA;AAAA,MACA;AAAA;AACF;AAEJ;AAMO,MAAM,kBAAA,GAAqB;AAAA,EAChC,UAAA,EAAY;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA,YAAA,EAAc,CAAC,SAAA,EAAW,QAAA,EAAU,YAAY,SAAS,CAAA;AAAA,EACzD,cAAA,EAAgB;AAAA,IACd,EAAA,EAAI;AAAA,MACF,WAAA;AAAA,MACA,WAAA;AAAA,MACA,WAAA;AAAA,MACA,QAAA;AAAA,MACA,SAAA;AAAA,MACA;AAAA;AACF;AAEJ;;;;"}
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,75 +1,53 @@
1
1
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
2
2
  import { Text } from '../Text/Text.esm.js';
3
+ import { useDefinition } from '../../hooks/useDefinition/useDefinition.esm.js';
4
+ import '../Text/Text.module.css.esm.js';
3
5
  import { RiArrowRightSLine } from '@remixicon/react';
4
6
  import { Tabs, TabList, Tab } from '../Tabs/Tabs.esm.js';
5
- import { useStyles } from '../../hooks/useStyles.esm.js';
7
+ import '../Tabs/Tabs.module.css.esm.js';
6
8
  import { HeaderPageDefinition } from './definition.esm.js';
7
9
  import { Container } from '../Container/Container.esm.js';
10
+ import '../Container/Container.module.css.esm.js';
8
11
  import { Link } from '../Link/Link.esm.js';
9
- import styles from './HeaderPage.module.css.esm.js';
10
- import clsx from 'clsx';
12
+ import '../Link/Link.module.css.esm.js';
11
13
 
12
14
  const HeaderPage = (props) => {
13
- const { classNames, cleanedProps } = useStyles(HeaderPageDefinition, props);
14
- const { className, title, tabs, customActions, breadcrumbs } = cleanedProps;
15
- return /* @__PURE__ */ jsxs(
16
- Container,
17
- {
18
- className: clsx(classNames.root, styles[classNames.root], className),
19
- children: [
20
- /* @__PURE__ */ jsxs("div", { className: clsx(classNames.content, styles[classNames.content]), children: [
21
- /* @__PURE__ */ jsxs(
22
- "div",
15
+ const { ownProps } = useDefinition(HeaderPageDefinition, props);
16
+ const { classes, title, tabs, customActions, breadcrumbs } = ownProps;
17
+ return /* @__PURE__ */ jsxs(Container, { className: classes.root, children: [
18
+ /* @__PURE__ */ jsxs("div", { className: classes.content, children: [
19
+ /* @__PURE__ */ jsxs("div", { className: classes.breadcrumbs, children: [
20
+ breadcrumbs && breadcrumbs.map((breadcrumb) => /* @__PURE__ */ jsxs(Fragment, { children: [
21
+ /* @__PURE__ */ jsx(
22
+ Link,
23
23
  {
24
- className: clsx(
25
- classNames.breadcrumbs,
26
- styles[classNames.breadcrumbs]
27
- ),
28
- children: [
29
- breadcrumbs && breadcrumbs.map((breadcrumb) => /* @__PURE__ */ jsxs(Fragment, { children: [
30
- /* @__PURE__ */ jsx(
31
- Link,
32
- {
33
- href: breadcrumb.href,
34
- variant: "title-small",
35
- weight: "bold",
36
- color: "secondary",
37
- truncate: true,
38
- style: { maxWidth: "240px" },
39
- standalone: true,
40
- children: breadcrumb.label
41
- }
42
- ),
43
- /* @__PURE__ */ jsx(RiArrowRightSLine, { size: 16, color: "var(--bui-fg-secondary)" })
44
- ] }, breadcrumb.label)),
45
- /* @__PURE__ */ jsx(Text, { variant: "title-small", weight: "bold", as: "h2", children: title })
46
- ]
24
+ href: breadcrumb.href,
25
+ variant: "title-small",
26
+ weight: "bold",
27
+ color: "secondary",
28
+ truncate: true,
29
+ style: { maxWidth: "240px" },
30
+ standalone: true,
31
+ children: breadcrumb.label
47
32
  }
48
33
  ),
49
- /* @__PURE__ */ jsx("div", { className: clsx(classNames.controls, styles[classNames.controls]), children: customActions })
50
- ] }),
51
- tabs && /* @__PURE__ */ jsx(
52
- "div",
53
- {
54
- className: clsx(
55
- classNames.tabsWrapper,
56
- styles[classNames.tabsWrapper]
57
- ),
58
- children: /* @__PURE__ */ jsx(Tabs, { children: /* @__PURE__ */ jsx(TabList, { children: tabs.map((tab) => /* @__PURE__ */ jsx(
59
- Tab,
60
- {
61
- id: tab.id,
62
- href: tab.href,
63
- matchStrategy: tab.matchStrategy,
64
- children: tab.label
65
- },
66
- tab.id
67
- )) }) })
68
- }
69
- )
70
- ]
71
- }
72
- );
34
+ /* @__PURE__ */ jsx(RiArrowRightSLine, { size: 16, color: "var(--bui-fg-secondary)" })
35
+ ] }, breadcrumb.label)),
36
+ /* @__PURE__ */ jsx(Text, { variant: "title-small", weight: "bold", as: "h2", children: title })
37
+ ] }),
38
+ /* @__PURE__ */ jsx("div", { className: classes.controls, children: customActions })
39
+ ] }),
40
+ tabs && /* @__PURE__ */ jsx("div", { className: classes.tabsWrapper, children: /* @__PURE__ */ jsx(Tabs, { children: /* @__PURE__ */ jsx(TabList, { children: tabs.map((tab) => /* @__PURE__ */ jsx(
41
+ Tab,
42
+ {
43
+ id: tab.id,
44
+ href: tab.href,
45
+ matchStrategy: tab.matchStrategy,
46
+ children: tab.label
47
+ },
48
+ tab.id
49
+ )) }) }) })
50
+ ] });
73
51
  };
74
52
 
75
53
  export { HeaderPage };
@@ -1 +1 @@
1
- {"version":3,"file":"HeaderPage.esm.js","sources":["../../../src/components/HeaderPage/HeaderPage.tsx"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { HeaderPageProps } from './types';\nimport { Text } from '../Text';\nimport { RiArrowRightSLine } from '@remixicon/react';\nimport { Tabs, TabList, Tab } from '../Tabs';\nimport { useStyles } from '../../hooks/useStyles';\nimport { HeaderPageDefinition } from './definition';\nimport { Container } from '../Container';\nimport { Link } from '../Link';\nimport { Fragment } from 'react/jsx-runtime';\nimport styles from './HeaderPage.module.css';\nimport clsx from 'clsx';\n\n/**\n * A component that renders a header page.\n *\n * @public\n */\nexport const HeaderPage = (props: HeaderPageProps) => {\n const { classNames, cleanedProps } = useStyles(HeaderPageDefinition, props);\n const { className, title, tabs, customActions, breadcrumbs } = cleanedProps;\n\n return (\n <Container\n className={clsx(classNames.root, styles[classNames.root], className)}\n >\n <div className={clsx(classNames.content, styles[classNames.content])}>\n <div\n className={clsx(\n classNames.breadcrumbs,\n styles[classNames.breadcrumbs],\n )}\n >\n {breadcrumbs &&\n breadcrumbs.map(breadcrumb => (\n <Fragment key={breadcrumb.label}>\n <Link\n href={breadcrumb.href}\n variant=\"title-small\"\n weight=\"bold\"\n color=\"secondary\"\n truncate\n style={{ maxWidth: '240px' }}\n standalone\n >\n {breadcrumb.label}\n </Link>\n <RiArrowRightSLine size={16} color=\"var(--bui-fg-secondary)\" />\n </Fragment>\n ))}\n <Text variant=\"title-small\" weight=\"bold\" as=\"h2\">\n {title}\n </Text>\n </div>\n <div className={clsx(classNames.controls, styles[classNames.controls])}>\n {customActions}\n </div>\n </div>\n {tabs && (\n <div\n className={clsx(\n classNames.tabsWrapper,\n styles[classNames.tabsWrapper],\n )}\n >\n <Tabs>\n <TabList>\n {tabs.map(tab => (\n <Tab\n key={tab.id}\n id={tab.id}\n href={tab.href}\n matchStrategy={tab.matchStrategy}\n >\n {tab.label}\n </Tab>\n ))}\n </TabList>\n </Tabs>\n </div>\n )}\n </Container>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;AAiCO,MAAM,UAAA,GAAa,CAAC,KAAA,KAA2B;AACpD,EAAA,MAAM,EAAE,UAAA,EAAY,YAAA,EAAa,GAAI,SAAA,CAAU,sBAAsB,KAAK,CAAA;AAC1E,EAAA,MAAM,EAAE,SAAA,EAAW,KAAA,EAAO,IAAA,EAAM,aAAA,EAAe,aAAY,GAAI,YAAA;AAE/D,EAAA,uBACE,IAAA;AAAA,IAAC,SAAA;AAAA,IAAA;AAAA,MACC,SAAA,EAAW,KAAK,UAAA,CAAW,IAAA,EAAM,OAAO,UAAA,CAAW,IAAI,GAAG,SAAS,CAAA;AAAA,MAEnE,QAAA,EAAA;AAAA,wBAAA,IAAA,CAAC,KAAA,EAAA,EAAI,WAAW,IAAA,CAAK,UAAA,CAAW,SAAS,MAAA,CAAO,UAAA,CAAW,OAAO,CAAC,CAAA,EACjE,QAAA,EAAA;AAAA,0BAAA,IAAA;AAAA,YAAC,KAAA;AAAA,YAAA;AAAA,cACC,SAAA,EAAW,IAAA;AAAA,gBACT,UAAA,CAAW,WAAA;AAAA,gBACX,MAAA,CAAO,WAAW,WAAW;AAAA,eAC/B;AAAA,cAEC,QAAA,EAAA;AAAA,gBAAA,WAAA,IACC,WAAA,CAAY,GAAA,CAAI,CAAA,UAAA,qBACd,IAAA,CAAC,QAAA,EAAA,EACC,QAAA,EAAA;AAAA,kCAAA,GAAA;AAAA,oBAAC,IAAA;AAAA,oBAAA;AAAA,sBACC,MAAM,UAAA,CAAW,IAAA;AAAA,sBACjB,OAAA,EAAQ,aAAA;AAAA,sBACR,MAAA,EAAO,MAAA;AAAA,sBACP,KAAA,EAAM,WAAA;AAAA,sBACN,QAAA,EAAQ,IAAA;AAAA,sBACR,KAAA,EAAO,EAAE,QAAA,EAAU,OAAA,EAAQ;AAAA,sBAC3B,UAAA,EAAU,IAAA;AAAA,sBAET,QAAA,EAAA,UAAA,CAAW;AAAA;AAAA,mBACd;AAAA,kCACA,GAAA,CAAC,iBAAA,EAAA,EAAkB,IAAA,EAAM,EAAA,EAAI,OAAM,yBAAA,EAA0B;AAAA,iBAAA,EAAA,EAZhD,UAAA,CAAW,KAa1B,CACD,CAAA;AAAA,gCACH,GAAA,CAAC,QAAK,OAAA,EAAQ,aAAA,EAAc,QAAO,MAAA,EAAO,EAAA,EAAG,MAC1C,QAAA,EAAA,KAAA,EACH;AAAA;AAAA;AAAA,WACF;AAAA,0BACA,GAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,IAAA,CAAK,UAAA,CAAW,QAAA,EAAU,MAAA,CAAO,UAAA,CAAW,QAAQ,CAAC,CAAA,EAClE,QAAA,EAAA,aAAA,EACH;AAAA,SAAA,EACF,CAAA;AAAA,QACC,IAAA,oBACC,GAAA;AAAA,UAAC,KAAA;AAAA,UAAA;AAAA,YACC,SAAA,EAAW,IAAA;AAAA,cACT,UAAA,CAAW,WAAA;AAAA,cACX,MAAA,CAAO,WAAW,WAAW;AAAA,aAC/B;AAAA,YAEA,8BAAC,IAAA,EAAA,EACC,QAAA,kBAAA,GAAA,CAAC,OAAA,EAAA,EACE,QAAA,EAAA,IAAA,CAAK,IAAI,CAAA,GAAA,qBACR,GAAA;AAAA,cAAC,GAAA;AAAA,cAAA;AAAA,gBAEC,IAAI,GAAA,CAAI,EAAA;AAAA,gBACR,MAAM,GAAA,CAAI,IAAA;AAAA,gBACV,eAAe,GAAA,CAAI,aAAA;AAAA,gBAElB,QAAA,EAAA,GAAA,CAAI;AAAA,eAAA;AAAA,cALA,GAAA,CAAI;AAAA,aAOZ,GACH,CAAA,EACF;AAAA;AAAA;AACF;AAAA;AAAA,GAEJ;AAEJ;;;;"}
1
+ {"version":3,"file":"HeaderPage.esm.js","sources":["../../../src/components/HeaderPage/HeaderPage.tsx"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { HeaderPageProps } from './types';\nimport { Text } from '../Text';\nimport { RiArrowRightSLine } from '@remixicon/react';\nimport { Tabs, TabList, Tab } from '../Tabs';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport { HeaderPageDefinition } from './definition';\nimport { Container } from '../Container';\nimport { Link } from '../Link';\nimport { Fragment } from 'react/jsx-runtime';\n\n/**\n * A component that renders a header page.\n *\n * @public\n */\nexport const HeaderPage = (props: HeaderPageProps) => {\n const { ownProps } = useDefinition(HeaderPageDefinition, props);\n const { classes, title, tabs, customActions, breadcrumbs } = ownProps;\n\n return (\n <Container className={classes.root}>\n <div className={classes.content}>\n <div className={classes.breadcrumbs}>\n {breadcrumbs &&\n breadcrumbs.map(breadcrumb => (\n <Fragment key={breadcrumb.label}>\n <Link\n href={breadcrumb.href}\n variant=\"title-small\"\n weight=\"bold\"\n color=\"secondary\"\n truncate\n style={{ maxWidth: '240px' }}\n standalone\n >\n {breadcrumb.label}\n </Link>\n <RiArrowRightSLine size={16} color=\"var(--bui-fg-secondary)\" />\n </Fragment>\n ))}\n <Text variant=\"title-small\" weight=\"bold\" as=\"h2\">\n {title}\n </Text>\n </div>\n <div className={classes.controls}>{customActions}</div>\n </div>\n {tabs && (\n <div className={classes.tabsWrapper}>\n <Tabs>\n <TabList>\n {tabs.map(tab => (\n <Tab\n key={tab.id}\n id={tab.id}\n href={tab.href}\n matchStrategy={tab.matchStrategy}\n >\n {tab.label}\n </Tab>\n ))}\n </TabList>\n </Tabs>\n </div>\n )}\n </Container>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;AA+BO,MAAM,UAAA,GAAa,CAAC,KAAA,KAA2B;AACpD,EAAA,MAAM,EAAE,QAAA,EAAS,GAAI,aAAA,CAAc,sBAAsB,KAAK,CAAA;AAC9D,EAAA,MAAM,EAAE,OAAA,EAAS,KAAA,EAAO,IAAA,EAAM,aAAA,EAAe,aAAY,GAAI,QAAA;AAE7D,EAAA,uBACE,IAAA,CAAC,SAAA,EAAA,EAAU,SAAA,EAAW,OAAA,CAAQ,IAAA,EAC5B,QAAA,EAAA;AAAA,oBAAA,IAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,OAAA,CAAQ,OAAA,EACtB,QAAA,EAAA;AAAA,sBAAA,IAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,OAAA,CAAQ,WAAA,EACrB,QAAA,EAAA;AAAA,QAAA,WAAA,IACC,WAAA,CAAY,GAAA,CAAI,CAAA,UAAA,qBACd,IAAA,CAAC,QAAA,EAAA,EACC,QAAA,EAAA;AAAA,0BAAA,GAAA;AAAA,YAAC,IAAA;AAAA,YAAA;AAAA,cACC,MAAM,UAAA,CAAW,IAAA;AAAA,cACjB,OAAA,EAAQ,aAAA;AAAA,cACR,MAAA,EAAO,MAAA;AAAA,cACP,KAAA,EAAM,WAAA;AAAA,cACN,QAAA,EAAQ,IAAA;AAAA,cACR,KAAA,EAAO,EAAE,QAAA,EAAU,OAAA,EAAQ;AAAA,cAC3B,UAAA,EAAU,IAAA;AAAA,cAET,QAAA,EAAA,UAAA,CAAW;AAAA;AAAA,WACd;AAAA,0BACA,GAAA,CAAC,iBAAA,EAAA,EAAkB,IAAA,EAAM,EAAA,EAAI,OAAM,yBAAA,EAA0B;AAAA,SAAA,EAAA,EAZhD,UAAA,CAAW,KAa1B,CACD,CAAA;AAAA,wBACH,GAAA,CAAC,QAAK,OAAA,EAAQ,aAAA,EAAc,QAAO,MAAA,EAAO,EAAA,EAAG,MAC1C,QAAA,EAAA,KAAA,EACH;AAAA,OAAA,EACF,CAAA;AAAA,sBACA,GAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,OAAA,CAAQ,UAAW,QAAA,EAAA,aAAA,EAAc;AAAA,KAAA,EACnD,CAAA;AAAA,IACC,IAAA,oBACC,GAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,OAAA,CAAQ,WAAA,EACtB,QAAA,kBAAA,GAAA,CAAC,IAAA,EAAA,EACC,QAAA,kBAAA,GAAA,CAAC,OAAA,EAAA,EACE,QAAA,EAAA,IAAA,CAAK,GAAA,CAAI,CAAA,GAAA,qBACR,GAAA;AAAA,MAAC,GAAA;AAAA,MAAA;AAAA,QAEC,IAAI,GAAA,CAAI,EAAA;AAAA,QACR,MAAM,GAAA,CAAI,IAAA;AAAA,QACV,eAAe,GAAA,CAAI,aAAA;AAAA,QAElB,QAAA,EAAA,GAAA,CAAI;AAAA,OAAA;AAAA,MALA,GAAA,CAAI;AAAA,KAOZ,CAAA,EACH,CAAA,EACF,CAAA,EACF;AAAA,GAAA,EAEJ,CAAA;AAEJ;;;;"}