@backstage/ui 0.12.1-next.0 → 0.13.0-next.2

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 (209) hide show
  1. package/CHANGELOG.md +142 -0
  2. package/dist/analytics/BUIProvider.esm.js +18 -0
  3. package/dist/analytics/BUIProvider.esm.js.map +1 -0
  4. package/dist/analytics/getNodeText.esm.js +21 -0
  5. package/dist/analytics/getNodeText.esm.js.map +1 -0
  6. package/dist/analytics/useAnalytics.esm.js +26 -0
  7. package/dist/analytics/useAnalytics.esm.js.map +1 -0
  8. package/dist/components/Accordion/Accordion.esm.js +1 -0
  9. package/dist/components/Accordion/Accordion.esm.js.map +1 -1
  10. package/dist/components/Accordion/definition.esm.js +3 -2
  11. package/dist/components/Accordion/definition.esm.js.map +1 -1
  12. package/dist/components/Alert/definition.esm.js +2 -1
  13. package/dist/components/Alert/definition.esm.js.map +1 -1
  14. package/dist/components/Avatar/Avatar.esm.js +8 -28
  15. package/dist/components/Avatar/Avatar.esm.js.map +1 -1
  16. package/dist/components/Avatar/definition.esm.js +18 -4
  17. package/dist/components/Avatar/definition.esm.js.map +1 -1
  18. package/dist/components/Box/definition.esm.js +2 -1
  19. package/dist/components/Box/definition.esm.js.map +1 -1
  20. package/dist/components/Button/definition.esm.js +3 -3
  21. package/dist/components/Button/definition.esm.js.map +1 -1
  22. package/dist/components/ButtonIcon/definition.esm.js +3 -3
  23. package/dist/components/ButtonIcon/definition.esm.js.map +1 -1
  24. package/dist/components/ButtonLink/ButtonLink.esm.js +10 -1
  25. package/dist/components/ButtonLink/ButtonLink.esm.js.map +1 -1
  26. package/dist/components/ButtonLink/definition.esm.js +5 -3
  27. package/dist/components/ButtonLink/definition.esm.js.map +1 -1
  28. package/dist/components/Card/Card.esm.js +67 -6
  29. package/dist/components/Card/Card.esm.js.map +1 -1
  30. package/dist/components/Card/Card.module.css.esm.js +2 -2
  31. package/dist/components/Card/definition.esm.js +11 -3
  32. package/dist/components/Card/definition.esm.js.map +1 -1
  33. package/dist/components/Checkbox/Checkbox.esm.js +10 -17
  34. package/dist/components/Checkbox/Checkbox.esm.js.map +1 -1
  35. package/dist/components/Checkbox/definition.esm.js +17 -5
  36. package/dist/components/Checkbox/definition.esm.js.map +1 -1
  37. package/dist/components/Container/Container.esm.js +8 -13
  38. package/dist/components/Container/Container.esm.js.map +1 -1
  39. package/dist/components/Container/Container.module.css.esm.js +2 -2
  40. package/dist/components/Container/definition.esm.js +17 -2
  41. package/dist/components/Container/definition.esm.js.map +1 -1
  42. package/dist/components/Dialog/Dialog.esm.js +26 -59
  43. package/dist/components/Dialog/Dialog.esm.js.map +1 -1
  44. package/dist/components/Dialog/Dialog.module.css.esm.js +2 -2
  45. package/dist/components/Dialog/definition.esm.js +53 -8
  46. package/dist/components/Dialog/definition.esm.js.map +1 -1
  47. package/dist/components/FieldError/FieldError.esm.js +4 -13
  48. package/dist/components/FieldError/FieldError.esm.js.map +1 -1
  49. package/dist/components/FieldError/definition.esm.js +15 -2
  50. package/dist/components/FieldError/definition.esm.js.map +1 -1
  51. package/dist/components/FieldLabel/FieldLabel.esm.js +14 -59
  52. package/dist/components/FieldLabel/FieldLabel.esm.js.map +1 -1
  53. package/dist/components/FieldLabel/definition.esm.js +20 -2
  54. package/dist/components/FieldLabel/definition.esm.js.map +1 -1
  55. package/dist/components/Flex/Flex.esm.js +12 -22
  56. package/dist/components/Flex/Flex.esm.js.map +1 -1
  57. package/dist/components/Flex/definition.esm.js +20 -13
  58. package/dist/components/Flex/definition.esm.js.map +1 -1
  59. package/dist/components/FullPage/FullPage.esm.js +4 -13
  60. package/dist/components/FullPage/FullPage.esm.js.map +1 -1
  61. package/dist/components/FullPage/definition.esm.js +15 -2
  62. package/dist/components/FullPage/definition.esm.js.map +1 -1
  63. package/dist/components/Grid/Grid.esm.js +21 -40
  64. package/dist/components/Grid/Grid.esm.js.map +1 -1
  65. package/dist/components/Grid/definition.esm.js +31 -26
  66. package/dist/components/Grid/definition.esm.js.map +1 -1
  67. package/dist/components/Header/Header.esm.js +55 -0
  68. package/dist/components/Header/Header.esm.js.map +1 -0
  69. package/dist/components/Header/Header.module.css.esm.js +8 -0
  70. package/dist/components/Header/Header.module.css.esm.js.map +1 -0
  71. package/dist/components/Header/definition.esm.js +30 -0
  72. package/dist/components/Header/definition.esm.js.map +1 -0
  73. package/dist/components/Link/Link.esm.js +15 -34
  74. package/dist/components/Link/Link.esm.js.map +1 -1
  75. package/dist/components/Link/definition.esm.js +23 -15
  76. package/dist/components/Link/definition.esm.js.map +1 -1
  77. package/dist/components/Menu/Menu.esm.js +180 -344
  78. package/dist/components/Menu/Menu.esm.js.map +1 -1
  79. package/dist/components/Menu/Menu.module.css.esm.js +2 -2
  80. package/dist/components/Menu/definition.esm.js +116 -17
  81. package/dist/components/Menu/definition.esm.js.map +1 -1
  82. package/dist/components/PasswordField/PasswordField.esm.js +17 -52
  83. package/dist/components/PasswordField/PasswordField.esm.js.map +1 -1
  84. package/dist/components/PasswordField/PasswordField.module.css.esm.js +2 -2
  85. package/dist/components/PasswordField/definition.esm.js +29 -11
  86. package/dist/components/PasswordField/definition.esm.js.map +1 -1
  87. package/dist/components/PluginHeader/PluginHeader.esm.js +35 -46
  88. package/dist/components/PluginHeader/PluginHeader.esm.js.map +1 -1
  89. package/dist/components/PluginHeader/PluginHeader.module.css.esm.js +2 -2
  90. package/dist/components/PluginHeader/definition.esm.js +22 -3
  91. package/dist/components/PluginHeader/definition.esm.js.map +1 -1
  92. package/dist/components/Popover/Popover.esm.js +24 -32
  93. package/dist/components/Popover/Popover.esm.js.map +1 -1
  94. package/dist/components/Popover/Popover.module.css.esm.js +2 -2
  95. package/dist/components/Popover/definition.esm.js +17 -2
  96. package/dist/components/Popover/definition.esm.js.map +1 -1
  97. package/dist/components/RadioGroup/RadioGroup.esm.js +25 -44
  98. package/dist/components/RadioGroup/RadioGroup.esm.js.map +1 -1
  99. package/dist/components/RadioGroup/definition.esm.js +31 -5
  100. package/dist/components/RadioGroup/definition.esm.js.map +1 -1
  101. package/dist/components/SearchField/SearchField.esm.js +25 -45
  102. package/dist/components/SearchField/SearchField.esm.js.map +1 -1
  103. package/dist/components/SearchField/SearchField.module.css.esm.js +2 -2
  104. package/dist/components/SearchField/definition.esm.js +22 -5
  105. package/dist/components/SearchField/definition.esm.js.map +1 -1
  106. package/dist/components/Select/Select.esm.js +14 -23
  107. package/dist/components/Select/Select.esm.js.map +1 -1
  108. package/dist/components/Select/Select.module.css.esm.js +2 -2
  109. package/dist/components/Select/SelectContent.esm.js +8 -31
  110. package/dist/components/Select/SelectContent.esm.js.map +1 -1
  111. package/dist/components/Select/SelectListBox.esm.js +21 -44
  112. package/dist/components/Select/SelectListBox.esm.js.map +1 -1
  113. package/dist/components/Select/SelectTrigger.esm.js +11 -14
  114. package/dist/components/Select/SelectTrigger.esm.js.map +1 -1
  115. package/dist/components/Select/definition.esm.js +69 -17
  116. package/dist/components/Select/definition.esm.js.map +1 -1
  117. package/dist/components/Skeleton/Skeleton.esm.js +9 -13
  118. package/dist/components/Skeleton/Skeleton.esm.js.map +1 -1
  119. package/dist/components/Skeleton/definition.esm.js +19 -2
  120. package/dist/components/Skeleton/definition.esm.js.map +1 -1
  121. package/dist/components/Switch/Switch.esm.js +7 -22
  122. package/dist/components/Switch/Switch.esm.js.map +1 -1
  123. package/dist/components/Switch/definition.esm.js +16 -2
  124. package/dist/components/Switch/definition.esm.js.map +1 -1
  125. package/dist/components/Table/Table.module.css.esm.js +2 -2
  126. package/dist/components/Table/components/Cell.esm.js +4 -17
  127. package/dist/components/Table/components/Cell.esm.js.map +1 -1
  128. package/dist/components/Table/components/CellProfile.esm.js +12 -41
  129. package/dist/components/Table/components/CellProfile.esm.js.map +1 -1
  130. package/dist/components/Table/components/CellText.esm.js +39 -73
  131. package/dist/components/Table/components/CellText.esm.js.map +1 -1
  132. package/dist/components/Table/components/Column.esm.js +8 -36
  133. package/dist/components/Table/components/Column.esm.js.map +1 -1
  134. package/dist/components/Table/components/Row.esm.js +22 -19
  135. package/dist/components/Table/components/Row.esm.js.map +1 -1
  136. package/dist/components/Table/components/Table.esm.js +8 -0
  137. package/dist/components/Table/components/Table.esm.js.map +1 -1
  138. package/dist/components/Table/components/TableBody.esm.js +4 -12
  139. package/dist/components/Table/components/TableBody.esm.js.map +1 -1
  140. package/dist/components/Table/components/TableHeader.esm.js +19 -29
  141. package/dist/components/Table/components/TableHeader.esm.js.map +1 -1
  142. package/dist/components/Table/components/TableRoot.esm.js +5 -7
  143. package/dist/components/Table/components/TableRoot.esm.js.map +1 -1
  144. package/dist/components/Table/definition.esm.js +101 -21
  145. package/dist/components/Table/definition.esm.js.map +1 -1
  146. package/dist/components/TablePagination/TablePagination.esm.js +24 -32
  147. package/dist/components/TablePagination/TablePagination.esm.js.map +1 -1
  148. package/dist/components/TablePagination/definition.esm.js +33 -2
  149. package/dist/components/TablePagination/definition.esm.js.map +1 -1
  150. package/dist/components/Tabs/Tabs.esm.js +57 -64
  151. package/dist/components/Tabs/Tabs.esm.js.map +1 -1
  152. package/dist/components/Tabs/TabsIndicators.esm.js +6 -18
  153. package/dist/components/Tabs/TabsIndicators.esm.js.map +1 -1
  154. package/dist/components/Tabs/definition.esm.js +65 -10
  155. package/dist/components/Tabs/definition.esm.js.map +1 -1
  156. package/dist/components/TagGroup/TagGroup.esm.js +49 -63
  157. package/dist/components/TagGroup/TagGroup.esm.js.map +1 -1
  158. package/dist/components/TagGroup/definition.esm.js +38 -8
  159. package/dist/components/TagGroup/definition.esm.js.map +1 -1
  160. package/dist/components/Text/Text.esm.js +6 -13
  161. package/dist/components/Text/Text.esm.js.map +1 -1
  162. package/dist/components/Text/definition.esm.js +19 -14
  163. package/dist/components/Text/definition.esm.js.map +1 -1
  164. package/dist/components/TextField/TextField.esm.js +16 -41
  165. package/dist/components/TextField/TextField.esm.js.map +1 -1
  166. package/dist/components/TextField/TextField.module.css.esm.js +2 -2
  167. package/dist/components/TextField/definition.esm.js +21 -6
  168. package/dist/components/TextField/definition.esm.js.map +1 -1
  169. package/dist/components/ToggleButton/ToggleButton.esm.js +11 -23
  170. package/dist/components/ToggleButton/ToggleButton.esm.js.map +1 -1
  171. package/dist/components/ToggleButton/definition.esm.js +18 -4
  172. package/dist/components/ToggleButton/definition.esm.js.map +1 -1
  173. package/dist/components/ToggleButtonGroup/ToggleButtonGroup.esm.js +5 -18
  174. package/dist/components/ToggleButtonGroup/ToggleButtonGroup.esm.js.map +1 -1
  175. package/dist/components/ToggleButtonGroup/definition.esm.js +15 -4
  176. package/dist/components/ToggleButtonGroup/definition.esm.js.map +1 -1
  177. package/dist/components/Tooltip/Tooltip.esm.js +24 -30
  178. package/dist/components/Tooltip/Tooltip.esm.js.map +1 -1
  179. package/dist/components/Tooltip/Tooltip.module.css.esm.js +2 -2
  180. package/dist/components/Tooltip/definition.esm.js +17 -2
  181. package/dist/components/Tooltip/definition.esm.js.map +1 -1
  182. package/dist/components/VisuallyHidden/VisuallyHidden.esm.js +4 -12
  183. package/dist/components/VisuallyHidden/VisuallyHidden.esm.js.map +1 -1
  184. package/dist/components/VisuallyHidden/definition.esm.js +15 -2
  185. package/dist/components/VisuallyHidden/definition.esm.js.map +1 -1
  186. package/dist/css/styles.css +2 -4
  187. package/dist/hooks/useBg.esm.js +11 -2
  188. package/dist/hooks/useBg.esm.js.map +1 -1
  189. package/dist/hooks/useBreakpoint.esm.js +67 -27
  190. package/dist/hooks/useBreakpoint.esm.js.map +1 -1
  191. package/dist/hooks/useDefinition/defineComponent.esm.js.map +1 -1
  192. package/dist/hooks/useDefinition/useDefinition.esm.js +10 -3
  193. package/dist/hooks/useDefinition/useDefinition.esm.js.map +1 -1
  194. package/dist/index.d.ts +1036 -282
  195. package/dist/index.esm.js +7 -4
  196. package/dist/index.esm.js.map +1 -1
  197. package/package.json +5 -3
  198. package/dist/components/HeaderPage/HeaderPage.esm.js +0 -76
  199. package/dist/components/HeaderPage/HeaderPage.esm.js.map +0 -1
  200. package/dist/components/HeaderPage/HeaderPage.module.css.esm.js +0 -8
  201. package/dist/components/HeaderPage/HeaderPage.module.css.esm.js.map +0 -1
  202. package/dist/components/HeaderPage/definition.esm.js +0 -12
  203. package/dist/components/HeaderPage/definition.esm.js.map +0 -1
  204. package/dist/components/PluginHeader/PluginHeaderToolbar.esm.js +0 -94
  205. package/dist/components/PluginHeader/PluginHeaderToolbar.esm.js.map +0 -1
  206. package/dist/hooks/useMediaQuery.esm.js +0 -47
  207. package/dist/hooks/useMediaQuery.esm.js.map +0 -1
  208. package/dist/hooks/useStyles.esm.js +0 -53
  209. package/dist/hooks/useStyles.esm.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Dialog.esm.js","sources":["../../../src/components/Dialog/Dialog.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 {\n Dialog as RADialog,\n DialogTrigger as RADialogTrigger,\n Modal,\n Heading,\n} from 'react-aria-components';\nimport clsx from 'clsx';\nimport type {\n DialogTriggerProps,\n DialogHeaderProps,\n DialogProps,\n DialogBodyProps,\n} from './types';\nimport { RiCloseLine } from '@remixicon/react';\nimport { Button } from '../Button';\nimport { useStyles } from '../../hooks/useStyles';\nimport { DialogDefinition } from './definition';\nimport { Flex } from '../Flex';\nimport styles from './Dialog.module.css';\n\n/** @public */\nexport const DialogTrigger = (props: DialogTriggerProps) => {\n return <RADialogTrigger {...props} />;\n};\n\n/** @public */\nexport const Dialog = forwardRef<React.ElementRef<typeof Modal>, DialogProps>(\n (props, ref) => {\n const { classNames, cleanedProps } = useStyles(DialogDefinition, props);\n const { className, children, width, height, style, ...rest } = cleanedProps;\n\n return (\n <Modal\n ref={ref}\n className={clsx(classNames.overlay, styles[classNames.overlay])}\n isDismissable\n isKeyboardDismissDisabled={false}\n {...rest}\n >\n <RADialog\n className={clsx(\n classNames.dialog,\n styles[classNames.dialog],\n className,\n )}\n style={{\n ['--bui-dialog-min-width' as keyof React.CSSProperties]:\n typeof width === 'number' ? `${width}px` : width || '400px',\n ['--bui-dialog-min-height' as keyof React.CSSProperties]: height\n ? typeof height === 'number'\n ? `${height}px`\n : height\n : 'auto',\n ...style,\n }}\n >\n {children}\n </RADialog>\n </Modal>\n );\n },\n);\n\nDialog.displayName = 'Dialog';\n\n/** @public */\nexport const DialogHeader = forwardRef<\n React.ElementRef<'div'>,\n DialogHeaderProps\n>((props, ref) => {\n const { classNames, cleanedProps } = useStyles(DialogDefinition, props);\n const { className, children, ...rest } = cleanedProps;\n\n return (\n <Flex\n ref={ref}\n className={clsx(classNames.header, styles[classNames.header], className)}\n {...rest}\n >\n <Heading\n slot=\"title\"\n className={clsx(classNames.headerTitle, styles[classNames.headerTitle])}\n >\n {children}\n </Heading>\n <Button name=\"close\" aria-label=\"Close\" variant=\"tertiary\" slot=\"close\">\n <RiCloseLine />\n </Button>\n </Flex>\n );\n});\nDialogHeader.displayName = 'DialogHeader';\n\n/** @public */\nexport const DialogBody = forwardRef<React.ElementRef<'div'>, DialogBodyProps>(\n (props, ref) => {\n const { classNames, cleanedProps } = useStyles(DialogDefinition, props);\n const { className, children, ...rest } = cleanedProps;\n\n return (\n <div\n className={clsx(classNames.body, styles[classNames.body], className)}\n ref={ref}\n {...rest}\n >\n {children}\n </div>\n );\n },\n);\n\nDialogBody.displayName = 'DialogBody';\n\n/** @public */\nexport const DialogFooter = forwardRef<\n React.ElementRef<'div'>,\n React.ComponentPropsWithoutRef<'div'>\n>((props, ref) => {\n const { classNames, cleanedProps } = useStyles(DialogDefinition, props);\n const { className, children, ...rest } = cleanedProps;\n\n return (\n <div\n ref={ref}\n className={clsx(classNames.footer, styles[classNames.footer], className)}\n {...rest}\n >\n {children}\n </div>\n );\n});\nDialogFooter.displayName = 'DialogFooter';\n"],"names":["RADialogTrigger","RADialog"],"mappings":"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"}
1
+ {"version":3,"file":"Dialog.esm.js","sources":["../../../src/components/Dialog/Dialog.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 {\n Dialog as RADialog,\n DialogTrigger as RADialogTrigger,\n Modal,\n Heading,\n} from 'react-aria-components';\nimport type {\n DialogTriggerProps,\n DialogHeaderProps,\n DialogProps,\n DialogBodyProps,\n DialogFooterProps,\n} from './types';\nimport { RiCloseLine } from '@remixicon/react';\nimport { Button } from '../Button';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport {\n DialogDefinition,\n DialogHeaderDefinition,\n DialogBodyDefinition,\n DialogFooterDefinition,\n} from './definition';\nimport { Box } from '../Box';\nimport { BgReset } from '../../hooks/useBg';\nimport { Flex } from '../Flex';\n\n/** @public */\nexport const DialogTrigger = (props: DialogTriggerProps) => {\n return <RADialogTrigger {...props} />;\n};\n\n/** @public */\nexport const Dialog = forwardRef<React.ElementRef<typeof Modal>, DialogProps>(\n (props, ref) => {\n const { ownProps, restProps } = useDefinition(DialogDefinition, props, {\n classNameTarget: 'dialog',\n });\n const { classes, children, width, height, style } = ownProps;\n\n return (\n <Modal\n ref={ref}\n className={classes.root}\n isDismissable\n isKeyboardDismissDisabled={false}\n {...restProps}\n >\n <RADialog\n className={classes.dialog}\n style={{\n ['--bui-dialog-min-width' as keyof React.CSSProperties]:\n typeof width === 'number' ? `${width}px` : width || '400px',\n ['--bui-dialog-min-height' as keyof React.CSSProperties]: height\n ? typeof height === 'number'\n ? `${height}px`\n : height\n : 'auto',\n ...style,\n }}\n >\n <BgReset>\n <Box bg=\"neutral\" className={classes.content}>\n {children}\n </Box>\n </BgReset>\n </RADialog>\n </Modal>\n );\n },\n);\n\nDialog.displayName = 'Dialog';\n\n/** @public */\nexport const DialogHeader = forwardRef<\n React.ElementRef<'div'>,\n DialogHeaderProps\n>((props, ref) => {\n const { ownProps, restProps } = useDefinition(DialogHeaderDefinition, props);\n const { classes, children } = ownProps;\n\n return (\n <Flex ref={ref} className={classes.root} {...restProps}>\n <Heading slot=\"title\" className={classes.title}>\n {children}\n </Heading>\n <Button name=\"close\" aria-label=\"Close\" variant=\"tertiary\" slot=\"close\">\n <RiCloseLine />\n </Button>\n </Flex>\n );\n});\nDialogHeader.displayName = 'DialogHeader';\n\n/** @public */\nexport const DialogBody = forwardRef<React.ElementRef<'div'>, DialogBodyProps>(\n (props, ref) => {\n const { ownProps, restProps } = useDefinition(DialogBodyDefinition, props);\n const { classes, children } = ownProps;\n\n return (\n <div className={classes.root} ref={ref} {...restProps}>\n {children}\n </div>\n );\n },\n);\n\nDialogBody.displayName = 'DialogBody';\n\n/** @public */\nexport const DialogFooter = forwardRef<\n React.ElementRef<'div'>,\n DialogFooterProps\n>((props, ref) => {\n const { ownProps, restProps } = useDefinition(DialogFooterDefinition, props);\n const { classes, children } = ownProps;\n\n return (\n <div ref={ref} className={classes.root} {...restProps}>\n {children}\n </div>\n );\n});\nDialogFooter.displayName = 'DialogFooter';\n"],"names":["RADialogTrigger","RADialog"],"mappings":"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"}
@@ -1,7 +1,7 @@
1
1
  import styleInject from '../../node_modules_dist/style-inject/dist/style-inject.es.esm.js';
2
2
 
3
- var css_248z = "/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n@layer tokens, base, components, utilities;\n\n@layer components {\n .Dialog_bui-DialogOverlay__c76e5a4658 {\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: color-mix(in srgb, var(--bui-bg-neutral-2) 80%, transparent);\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 1000;\n }\n\n [data-theme='dark'] .Dialog_bui-Dialog__c76e5a4658 {\n background: rgba(0, 0, 0, 0.5);\n }\n\n .Dialog_bui-DialogOverlay__c76e5a4658[data-entering] {\n animation: Dialog_fade-in__c76e5a4658 200ms ease-out forwards;\n }\n\n .Dialog_bui-DialogOverlay__c76e5a4658[data-exiting] {\n animation: Dialog_fade-out__c76e5a4658 150ms ease-out forwards;\n }\n\n .Dialog_bui-Dialog__c76e5a4658 {\n background: var(--bui-bg-popover);\n border-radius: 0.5rem;\n border: 1px solid var(--bui-border-1);\n color: var(--bui-fg-primary);\n position: relative;\n width: min(var(--bui-dialog-min-width, 400px), calc(100vw - 3rem));\n max-width: calc(100vw - 3rem);\n height: min(var(--bui-dialog-min-height, auto), calc(100vh - 3rem));\n max-height: calc(100vh - 3rem);\n display: flex;\n flex-direction: column;\n outline: none;\n }\n\n /* Dialog entering animation */\n .Dialog_bui-DialogOverlay__c76e5a4658[data-entering] .Dialog_bui-Dialog__c76e5a4658 {\n animation: Dialog_dialog-enter__c76e5a4658 150ms ease-out forwards;\n }\n\n /* Dialog exiting animation */\n .Dialog_bui-DialogOverlay__c76e5a4658[data-exiting] .Dialog_bui-Dialog__c76e5a4658 {\n animation: Dialog_dialog-exit__c76e5a4658 150ms ease-out forwards;\n }\n\n .Dialog_bui-DialogHeader__c76e5a4658 {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding-inline: var(--bui-space-3);\n padding-block: var(--bui-space-2);\n border-bottom: 1px solid var(--bui-border-1);\n }\n\n .Dialog_bui-DialogHeaderTitle__c76e5a4658 {\n font-size: var(--bui-font-size-3);\n font-weight: var(--bui-font-weight-bold);\n margin: 0;\n }\n\n .Dialog_bui-DialogFooter__c76e5a4658 {\n display: flex;\n align-items: center;\n justify-content: end;\n gap: var(--bui-space-2);\n padding-inline: var(--bui-space-3);\n padding-block: var(--bui-space-3);\n border-top: 1px solid var(--bui-border-1);\n }\n\n .Dialog_bui-DialogBody__c76e5a4658 {\n padding: var(--bui-space-3);\n flex: 1;\n overflow-y: auto;\n }\n\n /* Keyframe animations */\n @keyframes Dialog_fade-in__c76e5a4658 {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n\n @keyframes Dialog_fade-out__c76e5a4658 {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n }\n\n @keyframes Dialog_dialog-enter__c76e5a4658 {\n from {\n opacity: 0.5;\n transform: scale(0.8);\n }\n to {\n opacity: 1;\n transform: scale(1);\n }\n }\n\n @keyframes Dialog_dialog-exit__c76e5a4658 {\n from {\n opacity: 1;\n transform: scale(1);\n }\n to {\n opacity: 0;\n transform: scale(0.95);\n }\n }\n}\n";
4
- var styles = {"bui-DialogOverlay":"Dialog_bui-DialogOverlay__c76e5a4658","bui-Dialog":"Dialog_bui-Dialog__c76e5a4658","fade-in":"Dialog_fade-in__c76e5a4658","fade-out":"Dialog_fade-out__c76e5a4658","dialog-enter":"Dialog_dialog-enter__c76e5a4658","dialog-exit":"Dialog_dialog-exit__c76e5a4658","bui-DialogHeader":"Dialog_bui-DialogHeader__c76e5a4658","bui-DialogHeaderTitle":"Dialog_bui-DialogHeaderTitle__c76e5a4658","bui-DialogFooter":"Dialog_bui-DialogFooter__c76e5a4658","bui-DialogBody":"Dialog_bui-DialogBody__c76e5a4658"};
3
+ var css_248z = "/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n@layer tokens, base, components, utilities;\n\n@layer components {\n .Dialog_bui-DialogOverlay__dedd12875c {\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: color-mix(in srgb, var(--bui-bg-neutral-2) 80%, transparent);\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 1000;\n }\n\n [data-theme='dark'] .Dialog_bui-Dialog__dedd12875c {\n background: rgba(0, 0, 0, 0.5);\n }\n\n .Dialog_bui-DialogOverlay__dedd12875c[data-entering] {\n animation: Dialog_fade-in__dedd12875c 200ms ease-out forwards;\n }\n\n .Dialog_bui-DialogOverlay__dedd12875c[data-exiting] {\n animation: Dialog_fade-out__dedd12875c 150ms ease-out forwards;\n }\n\n .Dialog_bui-Dialog__dedd12875c {\n --dialog-border-radius: 0.5rem;\n background: var(--bui-bg-app);\n box-shadow: var(--bui-shadow);\n border-radius: var(--dialog-border-radius);\n border: 1px solid var(--bui-border-1);\n color: var(--bui-fg-primary);\n position: relative;\n width: min(var(--bui-dialog-min-width, 400px), calc(100vw - 3rem));\n max-width: calc(100vw - 3rem);\n height: min(var(--bui-dialog-min-height, auto), calc(100vh - 3rem));\n max-height: calc(100vh - 3rem);\n outline: none;\n }\n\n .Dialog_bui-DialogContent__dedd12875c {\n display: flex;\n flex-direction: column;\n border-radius: var(--dialog-border-radius);\n height: 100%;\n }\n\n /* Dialog entering animation */\n .Dialog_bui-DialogOverlay__dedd12875c[data-entering] .Dialog_bui-Dialog__dedd12875c {\n animation: Dialog_dialog-enter__dedd12875c 150ms ease-out forwards;\n }\n\n /* Dialog exiting animation */\n .Dialog_bui-DialogOverlay__dedd12875c[data-exiting] .Dialog_bui-Dialog__dedd12875c {\n animation: Dialog_dialog-exit__dedd12875c 150ms ease-out forwards;\n }\n\n .Dialog_bui-DialogHeader__dedd12875c {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding-inline: var(--bui-space-3);\n padding-block: var(--bui-space-2);\n border-bottom: 1px solid var(--bui-border-1);\n }\n\n .Dialog_bui-DialogHeaderTitle__dedd12875c {\n font-size: var(--bui-font-size-3);\n font-weight: var(--bui-font-weight-bold);\n margin: 0;\n }\n\n .Dialog_bui-DialogFooter__dedd12875c {\n display: flex;\n align-items: center;\n justify-content: end;\n gap: var(--bui-space-2);\n padding-inline: var(--bui-space-3);\n padding-block: var(--bui-space-3);\n border-top: 1px solid var(--bui-border-1);\n }\n\n .Dialog_bui-DialogBody__dedd12875c {\n padding: var(--bui-space-3);\n flex: 1;\n overflow-y: auto;\n }\n\n /* Keyframe animations */\n @keyframes Dialog_fade-in__dedd12875c {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n\n @keyframes Dialog_fade-out__dedd12875c {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n }\n\n @keyframes Dialog_dialog-enter__dedd12875c {\n from {\n opacity: 0.5;\n transform: scale(0.8);\n }\n to {\n opacity: 1;\n transform: scale(1);\n }\n }\n\n @keyframes Dialog_dialog-exit__dedd12875c {\n from {\n opacity: 1;\n transform: scale(1);\n }\n to {\n opacity: 0;\n transform: scale(0.95);\n }\n }\n}\n";
4
+ var styles = {"bui-DialogOverlay":"Dialog_bui-DialogOverlay__dedd12875c","bui-Dialog":"Dialog_bui-Dialog__dedd12875c","fade-in":"Dialog_fade-in__dedd12875c","fade-out":"Dialog_fade-out__dedd12875c","bui-DialogContent":"Dialog_bui-DialogContent__dedd12875c","dialog-enter":"Dialog_dialog-enter__dedd12875c","dialog-exit":"Dialog_dialog-exit__dedd12875c","bui-DialogHeader":"Dialog_bui-DialogHeader__dedd12875c","bui-DialogHeaderTitle":"Dialog_bui-DialogHeaderTitle__dedd12875c","bui-DialogFooter":"Dialog_bui-DialogFooter__dedd12875c","bui-DialogBody":"Dialog_bui-DialogBody__dedd12875c"};
5
5
  styleInject(css_248z);
6
6
 
7
7
  export { styles as default };
@@ -1,13 +1,58 @@
1
- const DialogDefinition = {
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 '../../analytics/useAnalytics.esm.js';
7
+ import { defineComponent } from '../../hooks/useDefinition/defineComponent.esm.js';
8
+ import styles from './Dialog.module.css.esm.js';
9
+
10
+ const DialogDefinition = defineComponent()({
11
+ styles,
2
12
  classNames: {
3
- overlay: "bui-DialogOverlay",
13
+ root: "bui-DialogOverlay",
4
14
  dialog: "bui-Dialog",
5
- header: "bui-DialogHeader",
6
- headerTitle: "bui-DialogHeaderTitle",
7
- body: "bui-DialogBody",
8
- footer: "bui-DialogFooter"
15
+ content: "bui-DialogContent"
16
+ },
17
+ propDefs: {
18
+ children: {},
19
+ className: {},
20
+ width: {},
21
+ height: {},
22
+ style: {}
23
+ }
24
+ });
25
+ const DialogHeaderDefinition = defineComponent()({
26
+ styles,
27
+ classNames: {
28
+ root: "bui-DialogHeader",
29
+ title: "bui-DialogHeaderTitle"
30
+ },
31
+ propDefs: {
32
+ children: {},
33
+ className: {}
34
+ }
35
+ });
36
+ const DialogBodyDefinition = defineComponent()({
37
+ styles,
38
+ classNames: {
39
+ root: "bui-DialogBody"
40
+ },
41
+ propDefs: {
42
+ children: {},
43
+ className: {}
44
+ }
45
+ });
46
+ const DialogFooterDefinition = defineComponent()({
47
+ styles,
48
+ classNames: {
49
+ root: "bui-DialogFooter"
50
+ },
51
+ propDefs: {
52
+ children: {},
53
+ className: {}
9
54
  }
10
- };
55
+ });
11
56
 
12
- export { DialogDefinition };
57
+ export { DialogBodyDefinition, DialogDefinition, DialogFooterDefinition, DialogHeaderDefinition };
13
58
  //# sourceMappingURL=definition.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"definition.esm.js","sources":["../../../src/components/Dialog/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 Dialog\n * @public\n */\nexport const DialogDefinition = {\n classNames: {\n overlay: 'bui-DialogOverlay',\n dialog: 'bui-Dialog',\n header: 'bui-DialogHeader',\n headerTitle: 'bui-DialogHeaderTitle',\n body: 'bui-DialogBody',\n footer: 'bui-DialogFooter',\n },\n} as const satisfies ComponentDefinition;\n"],"names":[],"mappings":"AAsBO,MAAM,gBAAA,GAAmB;AAAA,EAC9B,UAAA,EAAY;AAAA,IACV,OAAA,EAAS,mBAAA;AAAA,IACT,MAAA,EAAQ,YAAA;AAAA,IACR,MAAA,EAAQ,kBAAA;AAAA,IACR,WAAA,EAAa,uBAAA;AAAA,IACb,IAAA,EAAM,gBAAA;AAAA,IACN,MAAA,EAAQ;AAAA;AAEZ;;;;"}
1
+ {"version":3,"file":"definition.esm.js","sources":["../../../src/components/Dialog/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 DialogOwnProps,\n DialogHeaderOwnProps,\n DialogBodyOwnProps,\n DialogFooterOwnProps,\n} from './types';\nimport styles from './Dialog.module.css';\n\n/**\n * Component definition for Dialog\n * @public\n */\nexport const DialogDefinition = defineComponent<DialogOwnProps>()({\n styles,\n classNames: {\n root: 'bui-DialogOverlay',\n dialog: 'bui-Dialog',\n content: 'bui-DialogContent',\n },\n propDefs: {\n children: {},\n className: {},\n width: {},\n height: {},\n style: {},\n },\n});\n\n/**\n * Component definition for DialogHeader\n * @public\n */\nexport const DialogHeaderDefinition = defineComponent<DialogHeaderOwnProps>()({\n styles,\n classNames: {\n root: 'bui-DialogHeader',\n title: 'bui-DialogHeaderTitle',\n },\n propDefs: {\n children: {},\n className: {},\n },\n});\n\n/**\n * Component definition for DialogBody\n * @public\n */\nexport const DialogBodyDefinition = defineComponent<DialogBodyOwnProps>()({\n styles,\n classNames: {\n root: 'bui-DialogBody',\n },\n propDefs: {\n children: {},\n className: {},\n },\n});\n\n/**\n * Component definition for DialogFooter\n * @public\n */\nexport const DialogFooterDefinition = defineComponent<DialogFooterOwnProps>()({\n styles,\n classNames: {\n root: 'bui-DialogFooter',\n },\n propDefs: {\n children: {},\n className: {},\n },\n});\n"],"names":[],"mappings":";;;;;;;;;AA6BO,MAAM,gBAAA,GAAmB,iBAAgC,CAAE;AAAA,EAChE,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,mBAAA;AAAA,IACN,MAAA,EAAQ,YAAA;AAAA,IACR,OAAA,EAAS;AAAA,GACX;AAAA,EACA,QAAA,EAAU;AAAA,IACR,UAAU,EAAC;AAAA,IACX,WAAW,EAAC;AAAA,IACZ,OAAO,EAAC;AAAA,IACR,QAAQ,EAAC;AAAA,IACT,OAAO;AAAC;AAEZ,CAAC;AAMM,MAAM,sBAAA,GAAyB,iBAAsC,CAAE;AAAA,EAC5E,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,kBAAA;AAAA,IACN,KAAA,EAAO;AAAA,GACT;AAAA,EACA,QAAA,EAAU;AAAA,IACR,UAAU,EAAC;AAAA,IACX,WAAW;AAAC;AAEhB,CAAC;AAMM,MAAM,oBAAA,GAAuB,iBAAoC,CAAE;AAAA,EACxE,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA,QAAA,EAAU;AAAA,IACR,UAAU,EAAC;AAAA,IACX,WAAW;AAAC;AAEhB,CAAC;AAMM,MAAM,sBAAA,GAAyB,iBAAsC,CAAE;AAAA,EAC5E,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA,QAAA,EAAU;AAAA,IACR,UAAU,EAAC;AAAA,IACX,WAAW;AAAC;AAEhB,CAAC;;;;"}
@@ -1,23 +1,14 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
2
  import { forwardRef } from 'react';
3
3
  import { FieldError as FieldError$1 } from 'react-aria-components';
4
- import clsx from 'clsx';
5
- import styles from './FieldError.module.css.esm.js';
6
- import { useStyles } from '../../hooks/useStyles.esm.js';
4
+ import { useDefinition } from '../../hooks/useDefinition/useDefinition.esm.js';
7
5
  import { FieldErrorDefinition } from './definition.esm.js';
8
6
 
9
7
  const FieldError = forwardRef(
10
8
  (props, ref) => {
11
- const { classNames, cleanedProps } = useStyles(FieldErrorDefinition, props);
12
- const { className, ...rest } = cleanedProps;
13
- return /* @__PURE__ */ jsx(
14
- FieldError$1,
15
- {
16
- className: clsx(classNames.root, styles[classNames.root], className),
17
- ref,
18
- ...rest
19
- }
20
- );
9
+ const { ownProps, restProps } = useDefinition(FieldErrorDefinition, props);
10
+ const { classes } = ownProps;
11
+ return /* @__PURE__ */ jsx(FieldError$1, { className: classes.root, ref, ...restProps });
21
12
  }
22
13
  );
23
14
  FieldError.displayName = "FieldError";
@@ -1 +1 @@
1
- {"version":3,"file":"FieldError.esm.js","sources":["../../../src/components/FieldError/FieldError.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 {\n FieldError as AriaFieldError,\n type FieldErrorProps,\n} from 'react-aria-components';\nimport clsx from 'clsx';\nimport styles from './FieldError.module.css';\nimport { useStyles } from '../../hooks/useStyles';\nimport { FieldErrorDefinition } from './definition';\n\n/** @public */\nexport const FieldError = forwardRef<HTMLDivElement, FieldErrorProps>(\n (props: FieldErrorProps, ref) => {\n const { classNames, cleanedProps } = useStyles(FieldErrorDefinition, props);\n const { className, ...rest } = cleanedProps;\n\n return (\n <AriaFieldError\n className={clsx(classNames.root, styles[classNames.root], className)}\n ref={ref}\n {...rest}\n />\n );\n },\n);\n\nFieldError.displayName = 'FieldError';\n"],"names":["AriaFieldError"],"mappings":";;;;;;;;AA2BO,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,EAAE,SAAA,EAAW,GAAG,IAAA,EAAK,GAAI,YAAA;AAE/B,IAAA,uBACE,GAAA;AAAA,MAACA,YAAA;AAAA,MAAA;AAAA,QACC,SAAA,EAAW,KAAK,UAAA,CAAW,IAAA,EAAM,OAAO,UAAA,CAAW,IAAI,GAAG,SAAS,CAAA;AAAA,QACnE,GAAA;AAAA,QACC,GAAG;AAAA;AAAA,KACN;AAAA,EAEJ;AACF;AAEA,UAAA,CAAW,WAAA,GAAc,YAAA;;;;"}
1
+ {"version":3,"file":"FieldError.esm.js","sources":["../../../src/components/FieldError/FieldError.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 { FieldError as AriaFieldError } from 'react-aria-components';\nimport type { FieldErrorProps } from './types';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport { FieldErrorDefinition } from './definition';\n\n/** @public */\nexport const FieldError = forwardRef<HTMLDivElement, FieldErrorProps>(\n (props: FieldErrorProps, ref) => {\n const { ownProps, restProps } = useDefinition(FieldErrorDefinition, props);\n const { classes } = ownProps;\n\n return <AriaFieldError className={classes.root} ref={ref} {...restProps} />;\n },\n);\n\nFieldError.displayName = 'FieldError';\n"],"names":["AriaFieldError"],"mappings":";;;;;;AAuBO,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,SAAQ,GAAI,QAAA;AAEpB,IAAA,2BAAQA,YAAA,EAAA,EAAe,SAAA,EAAW,QAAQ,IAAA,EAAM,GAAA,EAAW,GAAG,SAAA,EAAW,CAAA;AAAA,EAC3E;AACF;AAEA,UAAA,CAAW,WAAA,GAAc,YAAA;;;;"}
@@ -1,8 +1,21 @@
1
- const FieldErrorDefinition = {
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 '../../analytics/useAnalytics.esm.js';
7
+ import { defineComponent } from '../../hooks/useDefinition/defineComponent.esm.js';
8
+ import styles from './FieldError.module.css.esm.js';
9
+
10
+ const FieldErrorDefinition = defineComponent()({
11
+ styles,
2
12
  classNames: {
3
13
  root: "bui-FieldError"
14
+ },
15
+ propDefs: {
16
+ className: {}
4
17
  }
5
- };
18
+ });
6
19
 
7
20
  export { FieldErrorDefinition };
8
21
  //# sourceMappingURL=definition.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"definition.esm.js","sources":["../../../src/components/FieldError/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 FieldError\n * @public\n */\nexport const FieldErrorDefinition = {\n classNames: {\n root: 'bui-FieldError',\n },\n} as const satisfies ComponentDefinition;\n"],"names":[],"mappings":"AAsBO,MAAM,oBAAA,GAAuB;AAAA,EAClC,UAAA,EAAY;AAAA,IACV,IAAA,EAAM;AAAA;AAEV;;;;"}
1
+ {"version":3,"file":"definition.esm.js","sources":["../../../src/components/FieldError/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 { FieldErrorOwnProps } from './types';\nimport styles from './FieldError.module.css';\n\n/**\n * Component definition for FieldError\n * @public\n */\nexport const FieldErrorDefinition = defineComponent<FieldErrorOwnProps>()({\n styles,\n classNames: {\n root: 'bui-FieldError',\n },\n propDefs: {\n className: {},\n },\n});\n"],"names":[],"mappings":";;;;;;;;;AAwBO,MAAM,oBAAA,GAAuB,iBAAoC,CAAE;AAAA,EACxE,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA,QAAA,EAAU;AAAA,IACR,WAAW;AAAC;AAEhB,CAAC;;;;"}
@@ -1,70 +1,25 @@
1
1
  import { jsxs, jsx } from 'react/jsx-runtime';
2
2
  import { Label } from 'react-aria-components';
3
3
  import { forwardRef } from 'react';
4
- import { useStyles } from '../../hooks/useStyles.esm.js';
4
+ import { useDefinition } from '../../hooks/useDefinition/useDefinition.esm.js';
5
5
  import { FieldLabelDefinition } from './definition.esm.js';
6
- import styles from './FieldLabel.module.css.esm.js';
7
- import clsx from 'clsx';
8
6
 
9
7
  const FieldLabel = forwardRef(
10
8
  (props, ref) => {
11
- const { classNames, cleanedProps } = useStyles(FieldLabelDefinition, props);
12
- const {
13
- className,
14
- label,
15
- secondaryLabel,
16
- description,
17
- htmlFor,
18
- id,
19
- ...rest
20
- } = cleanedProps;
9
+ const { ownProps, restProps } = useDefinition(FieldLabelDefinition, props);
10
+ const { classes, label, secondaryLabel, description, htmlFor, id } = ownProps;
21
11
  if (!label) return null;
22
- return /* @__PURE__ */ jsxs(
23
- "div",
24
- {
25
- className: clsx(classNames.root, styles[classNames.root], className),
26
- ...rest,
27
- ref,
28
- children: [
29
- label && /* @__PURE__ */ jsxs(
30
- Label,
31
- {
32
- className: clsx(classNames.label, styles[classNames.label]),
33
- htmlFor,
34
- id,
35
- children: [
36
- label,
37
- secondaryLabel && /* @__PURE__ */ jsxs(
38
- "span",
39
- {
40
- "aria-hidden": "true",
41
- className: clsx(
42
- classNames.secondaryLabel,
43
- styles[classNames.secondaryLabel]
44
- ),
45
- children: [
46
- "(",
47
- secondaryLabel,
48
- ")"
49
- ]
50
- }
51
- )
52
- ]
53
- }
54
- ),
55
- description && /* @__PURE__ */ jsx(
56
- "div",
57
- {
58
- className: clsx(
59
- classNames.description,
60
- styles[classNames.description]
61
- ),
62
- children: description
63
- }
64
- )
65
- ]
66
- }
67
- );
12
+ return /* @__PURE__ */ jsxs("div", { className: classes.root, ...restProps, ref, children: [
13
+ label && /* @__PURE__ */ jsxs(Label, { className: classes.label, htmlFor, id, children: [
14
+ label,
15
+ secondaryLabel && /* @__PURE__ */ jsxs("span", { "aria-hidden": "true", className: classes.secondaryLabel, children: [
16
+ "(",
17
+ secondaryLabel,
18
+ ")"
19
+ ] })
20
+ ] }),
21
+ description && /* @__PURE__ */ jsx("div", { className: classes.description, children: description })
22
+ ] });
68
23
  }
69
24
  );
70
25
  FieldLabel.displayName = "FieldLabel";
@@ -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,29 @@
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 '../../analytics/useAnalytics.esm.js';
7
+ import { defineComponent } from '../../hooks/useDefinition/defineComponent.esm.js';
8
+ import styles from './FieldLabel.module.css.esm.js';
9
+
10
+ const FieldLabelDefinition = defineComponent()({
11
+ styles,
2
12
  classNames: {
3
13
  root: "bui-FieldLabelWrapper",
4
14
  label: "bui-FieldLabel",
5
15
  secondaryLabel: "bui-FieldSecondaryLabel",
6
16
  description: "bui-FieldDescription"
17
+ },
18
+ propDefs: {
19
+ label: {},
20
+ secondaryLabel: {},
21
+ description: {},
22
+ htmlFor: {},
23
+ id: {},
24
+ className: {}
7
25
  }
8
- };
26
+ });
9
27
 
10
28
  export { FieldLabelDefinition };
11
29
  //# 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,27 @@
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, restProps } = 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
+ ...restProps,
20
+ children: childrenWithBgProvider
31
21
  }
32
22
  );
33
- return resolvedBg ? /* @__PURE__ */ jsx(BgProvider, { bg: resolvedBg, children: content }) : content;
34
23
  });
24
+ Flex.displayName = "Flex";
35
25
 
36
26
  export { Flex };
37
27
  //# 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, 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,7 +1,24 @@
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 '../../analytics/useAnalytics.esm.js';
7
+ import { defineComponent } from '../../hooks/useDefinition/defineComponent.esm.js';
8
+ import styles from './Flex.module.css.esm.js';
9
+
10
+ const FlexDefinition = defineComponent()({
11
+ styles,
2
12
  classNames: {
3
13
  root: "bui-Flex"
4
14
  },
15
+ bg: "provider",
16
+ propDefs: {
17
+ bg: { dataAttribute: true },
18
+ children: {},
19
+ className: {},
20
+ style: {}
21
+ },
5
22
  utilityProps: [
6
23
  "m",
7
24
  "mb",
@@ -21,18 +38,8 @@ const FlexDefinition = {
21
38
  "align",
22
39
  "justify",
23
40
  "direction"
24
- ],
25
- dataAttributes: {
26
- bg: [
27
- "neutral-1",
28
- "neutral-2",
29
- "neutral-3",
30
- "danger",
31
- "warning",
32
- "success"
33
- ]
34
- }
35
- };
41
+ ]
42
+ });
36
43
 
37
44
  export { FlexDefinition };
38
45
  //# 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,21 @@
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 '../../analytics/useAnalytics.esm.js';
7
+ import { defineComponent } from '../../hooks/useDefinition/defineComponent.esm.js';
8
+ import styles from './FullPage.module.css.esm.js';
9
+
10
+ const FullPageDefinition = defineComponent()({
11
+ styles,
2
12
  classNames: {
3
13
  root: "bui-FullPage"
14
+ },
15
+ propDefs: {
16
+ className: {}
4
17
  }
5
- };
18
+ });
6
19
 
7
20
  export { FullPageDefinition };
8
21
  //# 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;;;;"}