@backstage/ui 0.18.0 → 0.19.0-next.0

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 (213) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/analytics/getNodeText.esm.js.map +1 -1
  3. package/dist/analytics/useAnalytics.esm.js.map +1 -1
  4. package/dist/components/Accordion/Accordion.esm.js.map +1 -1
  5. package/dist/components/Accordion/Accordion.module.css.esm.js.map +1 -1
  6. package/dist/components/Accordion/definition.esm.js.map +1 -1
  7. package/dist/components/Alert/Alert.esm.js.map +1 -1
  8. package/dist/components/Alert/Alert.module.css.esm.js.map +1 -1
  9. package/dist/components/Alert/definition.esm.js.map +1 -1
  10. package/dist/components/Avatar/Avatar.esm.js.map +1 -1
  11. package/dist/components/Avatar/Avatar.module.css.esm.js.map +1 -1
  12. package/dist/components/Avatar/definition.esm.js.map +1 -1
  13. package/dist/components/Badge/Badge.esm.js.map +1 -1
  14. package/dist/components/Badge/Badge.module.css.esm.js.map +1 -1
  15. package/dist/components/Badge/definition.esm.js.map +1 -1
  16. package/dist/components/Box/Box.esm.js.map +1 -1
  17. package/dist/components/Box/Box.module.css.esm.js.map +1 -1
  18. package/dist/components/Box/definition.esm.js.map +1 -1
  19. package/dist/components/Button/Button.esm.js.map +1 -1
  20. package/dist/components/Button/Button.module.css.esm.js.map +1 -1
  21. package/dist/components/Button/definition.esm.js.map +1 -1
  22. package/dist/components/ButtonIcon/ButtonIcon.esm.js.map +1 -1
  23. package/dist/components/ButtonIcon/ButtonIcon.module.css.esm.js.map +1 -1
  24. package/dist/components/ButtonIcon/definition.esm.js.map +1 -1
  25. package/dist/components/ButtonLink/ButtonLink.esm.js.map +1 -1
  26. package/dist/components/ButtonLink/ButtonLink.module.css.esm.js.map +1 -1
  27. package/dist/components/ButtonLink/definition.esm.js.map +1 -1
  28. package/dist/components/Card/Card.esm.js.map +1 -1
  29. package/dist/components/Card/Card.module.css.esm.js.map +1 -1
  30. package/dist/components/Card/definition.esm.js.map +1 -1
  31. package/dist/components/Checkbox/Checkbox.esm.js.map +1 -1
  32. package/dist/components/Checkbox/Checkbox.module.css.esm.js.map +1 -1
  33. package/dist/components/Checkbox/definition.esm.js.map +1 -1
  34. package/dist/components/CheckboxGroup/CheckboxGroup.esm.js.map +1 -1
  35. package/dist/components/CheckboxGroup/CheckboxGroup.module.css.esm.js.map +1 -1
  36. package/dist/components/CheckboxGroup/definition.esm.js.map +1 -1
  37. package/dist/components/Combobox/Combobox.esm.js +72 -10
  38. package/dist/components/Combobox/Combobox.esm.js.map +1 -1
  39. package/dist/components/Combobox/Combobox.module.css.esm.js.map +1 -1
  40. package/dist/components/Combobox/ComboboxInput.esm.js.map +1 -1
  41. package/dist/components/Combobox/ComboboxItem.esm.js.map +1 -1
  42. package/dist/components/Combobox/ComboboxListBox.esm.js +11 -34
  43. package/dist/components/Combobox/ComboboxListBox.esm.js.map +1 -1
  44. package/dist/components/Combobox/definition.esm.js +1 -1
  45. package/dist/components/Combobox/definition.esm.js.map +1 -1
  46. package/dist/components/Combobox/useAsyncComboboxState.esm.js.map +1 -1
  47. package/dist/components/Container/Container.esm.js.map +1 -1
  48. package/dist/components/Container/Container.module.css.esm.js.map +1 -1
  49. package/dist/components/Container/definition.esm.js.map +1 -1
  50. package/dist/components/DatePicker/DatePicker.esm.js.map +1 -1
  51. package/dist/components/DatePicker/DatePicker.module.css.esm.js.map +1 -1
  52. package/dist/components/DatePicker/DatePickerCalendar.esm.js.map +1 -1
  53. package/dist/components/DatePicker/DatePickerGroup.esm.js.map +1 -1
  54. package/dist/components/DatePicker/definition.esm.js.map +1 -1
  55. package/dist/components/DateRangePicker/DateRangePicker.esm.js.map +1 -1
  56. package/dist/components/DateRangePicker/DateRangePicker.module.css.esm.js.map +1 -1
  57. package/dist/components/DateRangePicker/DateRangePickerCalendar.esm.js.map +1 -1
  58. package/dist/components/DateRangePicker/DateRangePickerGroup.esm.js.map +1 -1
  59. package/dist/components/DateRangePicker/definition.esm.js.map +1 -1
  60. package/dist/components/Dialog/Dialog.esm.js.map +1 -1
  61. package/dist/components/Dialog/Dialog.module.css.esm.js.map +1 -1
  62. package/dist/components/Dialog/definition.esm.js.map +1 -1
  63. package/dist/components/FieldError/FieldError.esm.js.map +1 -1
  64. package/dist/components/FieldError/FieldError.module.css.esm.js.map +1 -1
  65. package/dist/components/FieldError/definition.esm.js.map +1 -1
  66. package/dist/components/FieldLabel/FieldLabel.esm.js.map +1 -1
  67. package/dist/components/FieldLabel/FieldLabel.module.css.esm.js.map +1 -1
  68. package/dist/components/FieldLabel/definition.esm.js.map +1 -1
  69. package/dist/components/Flex/Flex.esm.js.map +1 -1
  70. package/dist/components/Flex/Flex.module.css.esm.js.map +1 -1
  71. package/dist/components/Flex/definition.esm.js.map +1 -1
  72. package/dist/components/FullPage/FullPage.esm.js.map +1 -1
  73. package/dist/components/FullPage/FullPage.module.css.esm.js.map +1 -1
  74. package/dist/components/FullPage/definition.esm.js.map +1 -1
  75. package/dist/components/Grid/Grid.esm.js.map +1 -1
  76. package/dist/components/Grid/Grid.module.css.esm.js.map +1 -1
  77. package/dist/components/Grid/definition.esm.js.map +1 -1
  78. package/dist/components/Header/Header.esm.js.map +1 -1
  79. package/dist/components/Header/Header.module.css.esm.js.map +1 -1
  80. package/dist/components/Header/HeaderMetadataStatus.esm.js.map +1 -1
  81. package/dist/components/Header/HeaderMetadataStatus.module.css.esm.js.map +1 -1
  82. package/dist/components/Header/HeaderMetadataUsers.esm.js.map +1 -1
  83. package/dist/components/Header/HeaderMetadataUsers.module.css.esm.js.map +1 -1
  84. package/dist/components/Header/HeaderNav.esm.js.map +1 -1
  85. package/dist/components/Header/HeaderNav.module.css.esm.js.map +1 -1
  86. package/dist/components/Header/HeaderNavDefinition.esm.js.map +1 -1
  87. package/dist/components/Header/HeaderNavIndicators.esm.js.map +1 -1
  88. package/dist/components/Header/definition.esm.js.map +1 -1
  89. package/dist/components/Link/Link.esm.js.map +1 -1
  90. package/dist/components/Link/Link.module.css.esm.js.map +1 -1
  91. package/dist/components/Link/definition.esm.js.map +1 -1
  92. package/dist/components/List/List.esm.js.map +1 -1
  93. package/dist/components/List/List.module.css.esm.js.map +1 -1
  94. package/dist/components/List/definition.esm.js.map +1 -1
  95. package/dist/components/Menu/Menu.esm.js.map +1 -1
  96. package/dist/components/Menu/Menu.module.css.esm.js.map +1 -1
  97. package/dist/components/Menu/definition.esm.js.map +1 -1
  98. package/dist/components/NumberField/NumberField.esm.js.map +1 -1
  99. package/dist/components/NumberField/NumberField.module.css.esm.js.map +1 -1
  100. package/dist/components/NumberField/definition.esm.js.map +1 -1
  101. package/dist/components/PasswordField/PasswordField.esm.js.map +1 -1
  102. package/dist/components/PasswordField/PasswordField.module.css.esm.js.map +1 -1
  103. package/dist/components/PasswordField/definition.esm.js.map +1 -1
  104. package/dist/components/PluginHeader/PluginHeader.esm.js.map +1 -1
  105. package/dist/components/PluginHeader/PluginHeader.module.css.esm.js.map +1 -1
  106. package/dist/components/PluginHeader/PluginHeaderBreadcrumbs.esm.js.map +1 -1
  107. package/dist/components/PluginHeader/definition.esm.js.map +1 -1
  108. package/dist/components/PluginHeader/useIsTruncated.esm.js.map +1 -1
  109. package/dist/components/Popover/Popover.esm.js.map +1 -1
  110. package/dist/components/Popover/Popover.module.css.esm.js.map +1 -1
  111. package/dist/components/Popover/definition.esm.js.map +1 -1
  112. package/dist/components/RadioGroup/RadioGroup.esm.js.map +1 -1
  113. package/dist/components/RadioGroup/RadioGroup.module.css.esm.js.map +1 -1
  114. package/dist/components/RadioGroup/definition.esm.js.map +1 -1
  115. package/dist/components/SearchAutocomplete/SearchAutocomplete.esm.js.map +1 -1
  116. package/dist/components/SearchAutocomplete/SearchAutocomplete.module.css.esm.js.map +1 -1
  117. package/dist/components/SearchAutocomplete/definition.esm.js.map +1 -1
  118. package/dist/components/SearchField/SearchField.esm.js.map +1 -1
  119. package/dist/components/SearchField/SearchField.module.css.esm.js.map +1 -1
  120. package/dist/components/SearchField/definition.esm.js.map +1 -1
  121. package/dist/components/Select/Select.esm.js.map +1 -1
  122. package/dist/components/Select/Select.module.css.esm.js.map +1 -1
  123. package/dist/components/Select/SelectContent.esm.js.map +1 -1
  124. package/dist/components/Select/SelectItem.esm.js.map +1 -1
  125. package/dist/components/Select/SelectListBox.esm.js.map +1 -1
  126. package/dist/components/Select/SelectTrigger.esm.js.map +1 -1
  127. package/dist/components/Select/definition.esm.js.map +1 -1
  128. package/dist/components/Skeleton/Skeleton.esm.js.map +1 -1
  129. package/dist/components/Skeleton/Skeleton.module.css.esm.js.map +1 -1
  130. package/dist/components/Skeleton/definition.esm.js.map +1 -1
  131. package/dist/components/Slider/Slider.esm.js.map +1 -1
  132. package/dist/components/Slider/Slider.module.css.esm.js.map +1 -1
  133. package/dist/components/Slider/definition.esm.js.map +1 -1
  134. package/dist/components/Switch/Switch.esm.js.map +1 -1
  135. package/dist/components/Switch/Switch.module.css.esm.js.map +1 -1
  136. package/dist/components/Switch/definition.esm.js.map +1 -1
  137. package/dist/components/Table/Table.module.css.esm.js.map +1 -1
  138. package/dist/components/Table/components/Cell.esm.js.map +1 -1
  139. package/dist/components/Table/components/CellProfile.esm.js.map +1 -1
  140. package/dist/components/Table/components/CellText.esm.js.map +1 -1
  141. package/dist/components/Table/components/Column.esm.js.map +1 -1
  142. package/dist/components/Table/components/Row.esm.js.map +1 -1
  143. package/dist/components/Table/components/Table.esm.js.map +1 -1
  144. package/dist/components/Table/components/TableBody.esm.js.map +1 -1
  145. package/dist/components/Table/components/TableBodySkeleton.esm.js.map +1 -1
  146. package/dist/components/Table/components/TableHeader.esm.js.map +1 -1
  147. package/dist/components/Table/components/TableRoot.esm.js.map +1 -1
  148. package/dist/components/Table/definition.esm.js.map +1 -1
  149. package/dist/components/Table/hooks/getEffectivePageSize.esm.js.map +1 -1
  150. package/dist/components/Table/hooks/useCompletePagination.esm.js.map +1 -1
  151. package/dist/components/Table/hooks/useCursorPagination.esm.js.map +1 -1
  152. package/dist/components/Table/hooks/useDebouncedReload.esm.js.map +1 -1
  153. package/dist/components/Table/hooks/useDebouncedValue.esm.js.map +1 -1
  154. package/dist/components/Table/hooks/useOffsetPagination.esm.js.map +1 -1
  155. package/dist/components/Table/hooks/usePageCache.esm.js.map +1 -1
  156. package/dist/components/Table/hooks/useQueryState.esm.js.map +1 -1
  157. package/dist/components/Table/hooks/useStableCallback.esm.js.map +1 -1
  158. package/dist/components/Table/hooks/useTable.esm.js.map +1 -1
  159. package/dist/components/TablePagination/TablePagination.esm.js.map +1 -1
  160. package/dist/components/TablePagination/TablePagination.module.css.esm.js.map +1 -1
  161. package/dist/components/TablePagination/definition.esm.js.map +1 -1
  162. package/dist/components/Tabs/Tabs.esm.js.map +1 -1
  163. package/dist/components/Tabs/Tabs.module.css.esm.js.map +1 -1
  164. package/dist/components/Tabs/TabsIndicators.esm.js.map +1 -1
  165. package/dist/components/Tabs/definition.esm.js.map +1 -1
  166. package/dist/components/TagGroup/TagGroup.esm.js.map +1 -1
  167. package/dist/components/TagGroup/TagGroup.module.css.esm.js.map +1 -1
  168. package/dist/components/TagGroup/definition.esm.js.map +1 -1
  169. package/dist/components/Text/Text.esm.js.map +1 -1
  170. package/dist/components/Text/Text.module.css.esm.js.map +1 -1
  171. package/dist/components/Text/definition.esm.js.map +1 -1
  172. package/dist/components/TextAreaField/TextAreaField.esm.js.map +1 -1
  173. package/dist/components/TextAreaField/TextAreaField.module.css.esm.js.map +1 -1
  174. package/dist/components/TextAreaField/definition.esm.js.map +1 -1
  175. package/dist/components/TextField/TextField.esm.js.map +1 -1
  176. package/dist/components/TextField/TextField.module.css.esm.js.map +1 -1
  177. package/dist/components/TextField/definition.esm.js.map +1 -1
  178. package/dist/components/ToggleButton/ToggleButton.esm.js.map +1 -1
  179. package/dist/components/ToggleButton/ToggleButton.module.css.esm.js.map +1 -1
  180. package/dist/components/ToggleButton/definition.esm.js.map +1 -1
  181. package/dist/components/ToggleButtonGroup/ToggleButtonGroup.esm.js.map +1 -1
  182. package/dist/components/ToggleButtonGroup/ToggleButtonGroup.module.css.esm.js.map +1 -1
  183. package/dist/components/ToggleButtonGroup/definition.esm.js.map +1 -1
  184. package/dist/components/Tooltip/Tooltip.esm.js.map +1 -1
  185. package/dist/components/Tooltip/Tooltip.module.css.esm.js.map +1 -1
  186. package/dist/components/Tooltip/definition.esm.js.map +1 -1
  187. package/dist/components/VisuallyHidden/VisuallyHidden.esm.js.map +1 -1
  188. package/dist/components/VisuallyHidden/VisuallyHidden.module.css.esm.js.map +1 -1
  189. package/dist/components/VisuallyHidden/definition.esm.js.map +1 -1
  190. package/dist/css/styles.css +23 -1
  191. package/dist/hooks/useBg.esm.js.map +1 -1
  192. package/dist/hooks/useBreakpoint.esm.js.map +1 -1
  193. package/dist/hooks/useCollectionAdapter.esm.js.map +1 -1
  194. package/dist/hooks/useDefinition/defineComponent.esm.js.map +1 -1
  195. package/dist/hooks/useDefinition/helpers.esm.js.map +1 -1
  196. package/dist/hooks/useDefinition/useDefinition.esm.js.map +1 -1
  197. package/dist/hooks/useDefinition/useDefinitionNavigation.esm.js.map +1 -1
  198. package/dist/hooks/useDelayedVisibility.esm.js.map +1 -1
  199. package/dist/hooks/useIsomorphicLayoutEffect.esm.js.map +1 -1
  200. package/dist/hooks/useResolvedHref.esm.js.map +1 -1
  201. package/dist/hooks/useTrackedSelectionKeys.esm.js.map +1 -1
  202. package/dist/index.d.ts +7 -2
  203. package/dist/navigation/BUIRoutingProvider.esm.js.map +1 -1
  204. package/dist/navigation/useNavigation.esm.js.map +1 -1
  205. package/dist/navigation/useRouting.esm.js.map +1 -1
  206. package/dist/node_modules_dist/style-inject/dist/style-inject.es.esm.js.map +1 -1
  207. package/dist/provider/BUIContext.esm.js.map +1 -1
  208. package/dist/provider/BUIProvider.esm.js.map +1 -1
  209. package/dist/utils/linkUtils.esm.js.map +1 -1
  210. package/dist/utils/selectableCollection.esm.js +13 -1
  211. package/dist/utils/selectableCollection.esm.js.map +1 -1
  212. package/dist/utils/utilityClassMap.esm.js.map +1 -1
  213. package/package.json +7 -7
@@ -1 +1 @@
1
- {"version":3,"file":"TagGroup.esm.js","sources":["../../../src/components/TagGroup/TagGroup.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 { TagProps, TagGroupProps } from './types';\nimport {\n TagGroup as ReactAriaTagGroup,\n TagList as ReactAriaTagList,\n Tag as ReactAriaTag,\n Button as ReactAriaButton,\n} from 'react-aria-components';\nimport { forwardRef, type ReactNode } from 'react';\nimport { RiCloseCircleLine } from '@remixicon/react';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport { TagGroupDefinition, TagDefinition } from './definition';\nimport { getNodeText } from '../../analytics/getNodeText';\nimport { BUIRoutingProvider } from '../../navigation/BUIRoutingProvider';\n\n/**\n * A component that renders a list of tags.\n *\n * @public\n */\nexport const TagGroup = <T extends object>(props: TagGroupProps<T>) => {\n const { ownProps, restProps } = useDefinition(TagGroupDefinition, props);\n const { classes, items, children, renderEmptyState } = ownProps;\n\n return (\n <BUIRoutingProvider>\n <ReactAriaTagGroup className={classes.root} {...restProps}>\n <ReactAriaTagList\n className={classes.list}\n items={items}\n renderEmptyState={renderEmptyState}\n >\n {children}\n </ReactAriaTagList>\n </ReactAriaTagGroup>\n </BUIRoutingProvider>\n );\n};\n\n/**\n * A component that renders a tag.\n *\n * @public\n */\nexport const Tag = forwardRef<HTMLDivElement, TagProps>((props, ref) => {\n const { ownProps, restProps, dataAttributes, analytics } = useDefinition(\n TagDefinition,\n props,\n );\n const { classes, children, icon } = ownProps;\n const rawHref = restProps.href;\n const textValue = typeof children === 'string' ? children : undefined;\n\n const handlePress: typeof restProps.onPress = e => {\n restProps.onPress?.(e);\n if (rawHref) {\n const text =\n (restProps as React.AriaAttributes)['aria-label'] ??\n textValue ??\n getNodeText(children) ??\n String(rawHref);\n analytics.captureEvent('click', text, {\n attributes: { to: String(rawHref) },\n });\n }\n };\n\n return (\n <ReactAriaTag\n ref={ref}\n textValue={textValue}\n className={classes.root}\n {...dataAttributes}\n {...restProps}\n onPress={handlePress}\n >\n {({ allowsRemoving }) => (\n <>\n {icon && <span className={classes.icon}>{icon}</span>}\n {children as ReactNode}\n {allowsRemoving && (\n <ReactAriaButton className={classes.removeButton} slot=\"remove\">\n <RiCloseCircleLine size={16} />\n </ReactAriaButton>\n )}\n </>\n )}\n </ReactAriaTag>\n );\n});\n\nTag.displayName = 'Tag';\n"],"names":["ReactAriaTagGroup","ReactAriaTagList","ReactAriaTag","ReactAriaButton"],"mappings":";;;;;;;;;AAmCO,MAAM,QAAA,GAAW,CAAmB,KAAA,KAA4B;AACrE,EAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAU,GAAI,aAAA,CAAc,oBAAoB,KAAK,CAAA;AACvE,EAAA,MAAM,EAAE,OAAA,EAAS,KAAA,EAAO,QAAA,EAAU,kBAAiB,GAAI,QAAA;AAEvD,EAAA,uBACE,GAAA,CAAC,sBACC,QAAA,kBAAA,GAAA,CAACA,UAAA,EAAA,EAAkB,WAAW,OAAA,CAAQ,IAAA,EAAO,GAAG,SAAA,EAC9C,QAAA,kBAAA,GAAA;AAAA,IAACC,OAAA;AAAA,IAAA;AAAA,MACC,WAAW,OAAA,CAAQ,IAAA;AAAA,MACnB,KAAA;AAAA,MACA,gBAAA;AAAA,MAEC;AAAA;AAAA,KAEL,CAAA,EACF,CAAA;AAEJ;AAOO,MAAM,GAAA,GAAM,UAAA,CAAqC,CAAC,KAAA,EAAO,GAAA,KAAQ;AACtE,EAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAA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AC,iBAAA,EAAA,EAAkB,IAAA,EAAM,EAAA,EAAI,CAAA,EAC/B;AAAA,OAAA,EAEJ;AAAA;AAAA,GAEJ;AAEJ,CAAC;AAED,GAAA,CAAI,WAAA,GAAc,KAAA;;;;"}
1
+ {"version":3,"file":"TagGroup.esm.js","sources":["../../../src/components/TagGroup/TagGroup.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 { TagProps, TagGroupProps } from './types';\nimport {\n TagGroup as ReactAriaTagGroup,\n TagList as ReactAriaTagList,\n Tag as ReactAriaTag,\n Button as ReactAriaButton,\n} from 'react-aria-components';\nimport { forwardRef, type ReactNode } from 'react';\nimport { RiCloseCircleLine } from '@remixicon/react';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport { TagGroupDefinition, TagDefinition } from './definition';\nimport { getNodeText } from '../../analytics/getNodeText';\nimport { BUIRoutingProvider } from '../../navigation/BUIRoutingProvider';\n\n/**\n * A component that renders a list of tags.\n *\n * @public\n */\nexport const TagGroup = <T extends object>(props: TagGroupProps<T>) => {\n const { ownProps, restProps } = useDefinition(TagGroupDefinition, props);\n const { classes, items, children, renderEmptyState } = ownProps;\n\n return (\n <BUIRoutingProvider>\n <ReactAriaTagGroup className={classes.root} {...restProps}>\n <ReactAriaTagList\n className={classes.list}\n items={items}\n renderEmptyState={renderEmptyState}\n >\n {children}\n </ReactAriaTagList>\n </ReactAriaTagGroup>\n </BUIRoutingProvider>\n );\n};\n\n/**\n * A component that renders a tag.\n *\n * @public\n */\nexport const Tag = forwardRef<HTMLDivElement, TagProps>((props, ref) => {\n const { ownProps, restProps, dataAttributes, analytics } = useDefinition(\n TagDefinition,\n props,\n );\n const { classes, children, icon } = ownProps;\n const rawHref = restProps.href;\n const textValue = typeof children === 'string' ? children : undefined;\n\n const handlePress: typeof restProps.onPress = e => {\n restProps.onPress?.(e);\n if (rawHref) {\n const text =\n (restProps as React.AriaAttributes)['aria-label'] ??\n textValue ??\n getNodeText(children) ??\n String(rawHref);\n analytics.captureEvent('click', text, {\n attributes: { to: String(rawHref) },\n });\n }\n };\n\n return (\n <ReactAriaTag\n ref={ref}\n textValue={textValue}\n className={classes.root}\n {...dataAttributes}\n {...restProps}\n onPress={handlePress}\n >\n {({ allowsRemoving }) => (\n <>\n {icon && <span className={classes.icon}>{icon}</span>}\n {children as ReactNode}\n {allowsRemoving && (\n <ReactAriaButton className={classes.removeButton} slot=\"remove\">\n <RiCloseCircleLine size={16} />\n </ReactAriaButton>\n )}\n </>\n )}\n </ReactAriaTag>\n );\n});\n\nTag.displayName = 'Tag';\n"],"names":["ReactAriaTagGroup","ReactAriaTagList","ReactAriaTag","ReactAriaButton"],"mappings":";;;;;;;;;AAmCO,MAAM,QAAA,GAAW,CAAmB,KAAA,KAA4B;AACrE,EAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAU,GAAI,aAAA,CAAc,oBAAoB,KAAK,CAAA;AACvE,EAAA,MAAM,EAAE,OAAA,EAAS,KAAA,EAAO,QAAA,EAAU,kBAAiB,GAAI,QAAA;AAEvD,EAAA,uBACE,GAAA,CAAC,sBACC,QAAA,kBAAA,GAAA,CAACA,UAAA,EAAA,EAAkB,WAAW,OAAA,CAAQ,IAAA,EAAO,GAAG,SAAA,EAC9C,QAAA,kBAAA,GAAA;AAAA,IAACC,OAAA;AAAA,IAAA;AAAA,MACC,WAAW,OAAA,CAAQ,IAAA;AAAA,MACnB,KAAA;AAAA,MACA,gBAAA;AAAA,MAEC;AAAA;AAAA,KAEL,CAAA,EACF,CAAA;AAEJ;AAOO,MAAM,GAAA,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EAAA,EAAgB,SAAA,EAAW,OAAA,CAAQ,YAAA,EAAc,IAAA,EAAK,QAAA,EACrD,QAAA,kBAAA,GAAA,CAAC,iBAAA,EAAA,EAAkB,IAAA,EAAM,EAAA,EAAI,CAAA,EAC/B;AAAA,OAAA,EAEJ;AAAA;AAAA,GAEJ;AAEJ,CAAC;AAED,GAAA,CAAI,WAAA,GAAc,KAAA;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"TagGroup.module.css.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
1
+ {"version":3,"file":"TagGroup.module.css.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"definition.esm.js","sources":["../../../src/components/TagGroup/definition.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { defineComponent } from '../../hooks/useDefinition';\nimport type { TagGroupOwnProps, TagOwnProps } from './types';\nimport styles from './TagGroup.module.css';\n\n/**\n * Component definition for TagGroup\n * @public\n */\nexport const TagGroupDefinition = defineComponent<TagGroupOwnProps>()({\n styles,\n classNames: {\n root: 'bui-TagGroup',\n list: 'bui-TagList',\n },\n propDefs: {\n items: {},\n children: {},\n renderEmptyState: {},\n className: {},\n },\n});\n\n/** @internal */\nexport const TagDefinition = defineComponent<TagOwnProps>()({\n styles,\n classNames: {\n root: 'bui-Tag',\n icon: 'bui-TagIcon',\n removeButton: 'bui-TagRemoveButton',\n },\n analytics: true,\n propDefs: {\n noTrack: {},\n icon: {},\n size: { dataAttribute: true, default: 'small' },\n children: {},\n className: {},\n },\n});\n"],"names":[],"mappings":";;;;;;;;;;;;AAwBO,MAAM,kBAAA,GAAqB,iBAAkC,CAAE;AAAA,EACpE,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,cAAA;AAAA,IACN,IAAA,EAAM;AAAA,GACR;AAAA,EACA,QAAA,EAAU;AAAA,IACR,OAAO,EAAC;AAAA,IACR,UAAU,EAAC;AAAA,IACX,kBAAkB,EAAC;AAAA,IACnB,WAAW;AAAC;AAEhB,CAAC;AAGM,MAAM,aAAA,GAAgB,iBAA6B,CAAE;AAAA,EAC1D,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,SAAA;AAAA,IACN,IAAA,EAAM,aAAA;AAAA,IACN,YAAA,EAAc;AAAA,GAChB;AAAA,EACA,SAAA,EAAW,IAAA;AAAA,EACX,QAAA,EAAU;AAAA,IACR,SAAS,EAAC;AAAA,IACV,MAAM,EAAC;AAAA,IACP,IAAA,EAAM,EAAE,aAAA,EAAe,IAAA,EAAM,SAAS,OAAA,EAAQ;AAAA,IAC9C,UAAU,EAAC;AAAA,IACX,WAAW;AAAC;AAEhB,CAAC;;;;"}
1
+ {"version":3,"file":"definition.esm.js","sources":["../../../src/components/TagGroup/definition.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { defineComponent } from '../../hooks/useDefinition';\nimport type { TagGroupOwnProps, TagOwnProps } from './types';\nimport styles from './TagGroup.module.css';\n\n/**\n * Component definition for TagGroup\n * @public\n */\nexport const TagGroupDefinition = defineComponent<TagGroupOwnProps>()({\n styles,\n classNames: {\n root: 'bui-TagGroup',\n list: 'bui-TagList',\n },\n propDefs: {\n items: {},\n children: {},\n renderEmptyState: {},\n className: {},\n },\n});\n\n/** @internal */\nexport const TagDefinition = defineComponent<TagOwnProps>()({\n styles,\n classNames: {\n root: 'bui-Tag',\n icon: 'bui-TagIcon',\n removeButton: 'bui-TagRemoveButton',\n },\n analytics: true,\n propDefs: {\n noTrack: {},\n icon: {},\n size: { dataAttribute: true, default: 'small' },\n children: {},\n className: {},\n },\n});\n"],"names":[],"mappings":";;;;;;;;;;;;AAwBO,MAAM,kBAAA,GAAqB,iBAAkC,CAAE;AAAA,EACpE,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,cAAA;AAAA,IACN,IAAA,EAAM;AAAA,GACR;AAAA,EACA,QAAA,EAAU;AAAA,IACR,OAAO,EAAC;AAAA,IACR,UAAU,EAAC;AAAA,IACX,kBAAkB,EAAC;AAAA,IACnB,WAAW;AAAC;AAEhB,CAAC;AAGM,MAAM,aAAA,GAAgB,iBAA6B,CAAE;AAAA,EAC1D,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,SAAA;AAAA,IACN,IAAA,EAAM,aAAA;AAAA,IACN,YAAA,EAAc;AAAA,GAChB;AAAA,EACA,SAAA,EAAW,IAAA;AAAA,EACX,QAAA,EAAU;AAAA,IACR,SAAS,EAAC;AAAA,IACV,MAAM,EAAC;AAAA,IACP,IAAA,EAAM,EAAE,aAAA,EAAe,IAAA,EAAM,SAAS,OAAA,EAAQ;AAAA,IAC9C,UAAU,EAAC;AAAA,IACX,WAAW;AAAC;AAEhB,CAAC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Text.esm.js","sources":["../../../src/components/Text/Text.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 { ElementType } from 'react';\nimport type { TextProps } from './types';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport { TextDefinition } from './definition';\n\nfunction TextComponent<T extends ElementType = 'span'>(\n props: TextProps<T>,\n ref: React.Ref<any>,\n) {\n const { ownProps, restProps, dataAttributes } = useDefinition(\n TextDefinition,\n props,\n );\n const { classes, as } = ownProps;\n\n const Component = as;\n\n return (\n <Component\n ref={ref}\n className={classes.root}\n {...dataAttributes}\n {...restProps}\n />\n );\n}\n\nTextComponent.displayName = 'Text';\n\n/**\n * A typographic primitive that renders text with design system variants, weights, and colors, and can render as any HTML element.\n *\n * @public\n */\nexport const Text = forwardRef(TextComponent) as {\n <T extends ElementType = 'p'>(\n props: TextProps<T> & { ref?: React.ComponentPropsWithRef<T>['ref'] },\n ): React.ReactElement<TextProps<T>, T>;\n displayName: string;\n};\n\nText.displayName = 'Text';\n"],"names":[],"mappings":";;;;;AAsBA,SAAS,aAAA,CACP,OACA,GAAA,EACA;AACA,EAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAW,cAAA,EAAe,GAAI,aAAA;AAAA,IAC9C,cAAA;AAAA,IACA;AAAA,GACF;AACA,EAAA,MAAM,EAAE,OAAA,EAAS,EAAA,EAAG,GAAI,QAAA;AAExB,EAAA,MAAM,SAAA,GAAY,EAAA;AAElB,EAAA,uBACE,GAAA;AAAA,IAAC,SAAA;AAAA,IAAA;AAAA,MACC,GAAA;AAAA,MACA,WAAW,OAAA,CAAQ,IAAA;AAAA,MAClB,GAAG,cAAA;AAAA,MACH,GAAG;AAAA;AAAA,GACN;AAEJ;AAEA,aAAA,CAAc,WAAA,GAAc,MAAA;AAOrB,MAAM,IAAA,GAAO,WAAW,aAAa;AAO5C,IAAA,CAAK,WAAA,GAAc,MAAA;;;;"}
1
+ {"version":3,"file":"Text.esm.js","sources":["../../../src/components/Text/Text.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 { ElementType } from 'react';\nimport type { TextProps } from './types';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport { TextDefinition } from './definition';\n\nfunction TextComponent<T extends ElementType = 'span'>(\n props: TextProps<T>,\n ref: React.Ref<any>,\n) {\n const { ownProps, restProps, dataAttributes } = useDefinition(\n TextDefinition,\n props,\n );\n const { classes, as } = ownProps;\n\n const Component = as;\n\n return (\n <Component\n ref={ref}\n className={classes.root}\n {...dataAttributes}\n {...restProps}\n />\n );\n}\n\nTextComponent.displayName = 'Text';\n\n/**\n * A typographic primitive that renders text with design system variants, weights, and colors, and can render as any HTML element.\n *\n * @public\n */\nexport const Text = forwardRef(TextComponent) as {\n <T extends ElementType = 'p'>(\n props: TextProps<T> & { ref?: React.ComponentPropsWithRef<T>['ref'] },\n ): React.ReactElement<TextProps<T>, T>;\n displayName: string;\n};\n\nText.displayName = 'Text';\n"],"names":[],"mappings":";;;;;AAsBA,SAAS,aAAA,CACP,OACA,GAAA,EACA;AACA,EAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAW,cAAA,EAAe,GAAI,aAAA;AAAA,IAC9C,cAAA;AAAA,IACA;AAAA,GACF;AACA,EAAA,MAAM,EAAE,OAAA,EAAS,EAAA,EAAG,GAAI,QAAA;AAExB,EAAA,MAAM,SAAA,GAAY,EAAA;AAElB,EAAA,uBACE,GAAA;AAAA,IAAC,SAAA;AAAA,IAAA;AAAA,MACC,GAAA;AAAA,MACA,WAAW,OAAA,CAAQ,IAAA;AAAA,MAClB,GAAG,cAAA;AAAA,MACH,GAAG;AAAA;AAAA,GACN;AAEJ;AAEA,aAAA,CAAc,WAAA,GAAc,MAAA;AAOrB,MAAM,IAAA,GAAO,WAAW,aAAa;AAO5C,IAAA,CAAK,WAAA,GAAc,MAAA;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Text.module.css.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
1
+ {"version":3,"file":"Text.module.css.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"definition.esm.js","sources":["../../../src/components/Text/definition.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { defineComponent } from '../../hooks/useDefinition';\nimport type { TextOwnProps } from './types';\nimport styles from './Text.module.css';\n\n/**\n * Component definition for Text\n * @public\n */\nexport const TextDefinition = defineComponent<TextOwnProps>()({\n styles,\n classNames: {\n root: 'bui-Text',\n },\n propDefs: {\n as: { default: 'span' },\n variant: { dataAttribute: true, default: 'body-medium' },\n weight: { dataAttribute: true, default: 'regular' },\n color: { dataAttribute: true, default: 'primary' },\n truncate: { dataAttribute: true },\n className: {},\n },\n});\n"],"names":[],"mappings":";;;;;;;;;;;;AAwBO,MAAM,cAAA,GAAiB,iBAA8B,CAAE;AAAA,EAC5D,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA,QAAA,EAAU;AAAA,IACR,EAAA,EAAI,EAAE,OAAA,EAAS,MAAA,EAAO;AAAA,IACtB,OAAA,EAAS,EAAE,aAAA,EAAe,IAAA,EAAM,SAAS,aAAA,EAAc;AAAA,IACvD,MAAA,EAAQ,EAAE,aAAA,EAAe,IAAA,EAAM,SAAS,SAAA,EAAU;AAAA,IAClD,KAAA,EAAO,EAAE,aAAA,EAAe,IAAA,EAAM,SAAS,SAAA,EAAU;AAAA,IACjD,QAAA,EAAU,EAAE,aAAA,EAAe,IAAA,EAAK;AAAA,IAChC,WAAW;AAAC;AAEhB,CAAC;;;;"}
1
+ {"version":3,"file":"definition.esm.js","sources":["../../../src/components/Text/definition.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { defineComponent } from '../../hooks/useDefinition';\nimport type { TextOwnProps } from './types';\nimport styles from './Text.module.css';\n\n/**\n * Component definition for Text\n * @public\n */\nexport const TextDefinition = defineComponent<TextOwnProps>()({\n styles,\n classNames: {\n root: 'bui-Text',\n },\n propDefs: {\n as: { default: 'span' },\n variant: { dataAttribute: true, default: 'body-medium' },\n weight: { dataAttribute: true, default: 'regular' },\n color: { dataAttribute: true, default: 'primary' },\n truncate: { dataAttribute: true },\n className: {},\n },\n});\n"],"names":[],"mappings":";;;;;;;;;;;;AAwBO,MAAM,cAAA,GAAiB,iBAA8B,CAAE;AAAA,EAC5D,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA,QAAA,EAAU;AAAA,IACR,EAAA,EAAI,EAAE,OAAA,EAAS,MAAA,EAAO;AAAA,IACtB,OAAA,EAAS,EAAE,aAAA,EAAe,IAAA,EAAM,SAAS,aAAA,EAAc;AAAA,IACvD,MAAA,EAAQ,EAAE,aAAA,EAAe,IAAA,EAAM,SAAS,SAAA,EAAU;AAAA,IAClD,KAAA,EAAO,EAAE,aAAA,EAAe,IAAA,EAAM,SAAS,SAAA,EAAU;AAAA,IACjD,QAAA,EAAU,EAAE,aAAA,EAAe,IAAA,EAAK;AAAA,IAChC,WAAW;AAAC;AAEhB,CAAC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"TextAreaField.esm.js","sources":["../../../src/components/TextAreaField/TextAreaField.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { forwardRef, useEffect } from 'react';\nimport { TextArea, TextField as AriaTextField } from 'react-aria-components';\nimport { FieldLabel } from '../FieldLabel';\nimport { FieldError } from '../FieldError';\nimport type { TextAreaFieldProps } from './types';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport { TextAreaFieldDefinition } from './definition';\n\n/**\n * A multi-line text input with an integrated label and inline error display.\n *\n * @public\n */\nexport const TextAreaField = forwardRef<HTMLDivElement, TextAreaFieldProps>(\n (props, ref) => {\n const { ownProps, restProps, dataAttributes } = useDefinition(\n TextAreaFieldDefinition,\n props,\n );\n const { classes, label, secondaryLabel, placeholder, description, rows } =\n ownProps;\n\n useEffect(() => {\n if (!label && !restProps['aria-label'] && !restProps['aria-labelledby']) {\n console.warn(\n 'TextAreaField requires either a visible label, aria-label, or aria-labelledby for accessibility',\n );\n }\n }, [label, restProps['aria-label'], restProps['aria-labelledby']]);\n\n // If a secondary label is provided, use it. Otherwise, use 'Required' if the field is required.\n const secondaryLabelText =\n secondaryLabel || (restProps.isRequired ? 'Required' : null);\n\n return (\n <AriaTextField\n className={classes.root}\n {...dataAttributes}\n {...restProps}\n ref={ref}\n >\n <FieldLabel\n label={label}\n secondaryLabel={secondaryLabelText}\n description={description}\n descriptionSlot=\"description\"\n />\n <TextArea\n className={classes.textArea}\n data-size={dataAttributes['data-size']}\n placeholder={placeholder}\n rows={rows}\n />\n <FieldError />\n </AriaTextField>\n );\n },\n);\n\nTextAreaField.displayName = 'TextAreaField';\n"],"names":["AriaTextField"],"mappings":";;;;;;;;;;AA6BO,MAAM,aAAA,GAAgB,UAAA;AAAA,EAC3B,CAAC,OAAO,GAAA,KAAQ;AACd,IAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAW,cAAA,EAAe,GAAI,aAAA;AAAA,MAC9C,uBAAA;AAAA,MACA;AAAA,KACF;AACA,IAAA,MAAM,EAAE,OAAA,EAAS,KAAA,EAAO,gBAAgB,WAAA,EAAa,WAAA,EAAa,MAAK,GACrE,QAAA;AAEF,IAAA,SAAA,CAAU,MAAM;AACd,MAAA,IAAI,CAAC,SAAS,CAAC,SAAA,CAAU,YAAY,CAAA,IAAK,CAAC,SAAA,CAAU,iBAAiB,CAAA,EAAG;AACvE,QAAA,OAAA,CAAQ,IAAA;AAAA,UACN;AAAA,SACF;AAAA,MACF;AAAA,IACF,CAAA,EAAG,CAAC,KAAA,EAAO,SAAA,CAAU,YAAY,CAAA,EAAG,SAAA,CAAU,iBAAiB,CAAC,CAAC,CAAA;AAGjE,IAAA,MAAM,kBAAA,GACJ,cAAA,KAAmB,SAAA,CAAU,UAAA,GAAa,UAAA,GAAa,IAAA,CAAA;AAEzD,IAAA,uBACE,IAAA;AAAA,MAACA,SAAA;AAAA,MAAA;AAAA,QACC,WAAW,OAAA,CAAQ,IAAA;AAAA,QAClB,GAAG,cAAA;AAAA,QACH,GAAG,SAAA;AAAA,QACJ,GAAA;AAAA,QAEA,QAAA,EAAA;AAAA,0BAAA,GAAA;AAAA,YAAC,UAAA;AAAA,YAAA;AAAA,cACC,KAAA;AAAA,cACA,cAAA,EAAgB,kBAAA;AAAA,cAChB,WAAA;AAAA,cACA,eAAA,EAAgB;AAAA;AAAA,WAClB;AAAA,0BACA,GAAA;AAAA,YAAC,QAAA;AAAA,YAAA;AAAA,cACC,WAAW,OAAA,CAAQ,QAAA;AAAA,cACnB,WAAA,EAAW,eAAe,WAAW,CAAA;AAAA,cACrC,WAAA;AAAA,cACA;AAAA;AAAA,WACF;AAAA,8BACC,UAAA,EAAA,EAAW;AAAA;AAAA;AAAA,KACd;AAAA,EAEJ;AACF;AAEA,aAAA,CAAc,WAAA,GAAc,eAAA;;;;"}
1
+ {"version":3,"file":"TextAreaField.esm.js","sources":["../../../src/components/TextAreaField/TextAreaField.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { forwardRef, useEffect } from 'react';\nimport { TextArea, TextField as AriaTextField } from 'react-aria-components';\nimport { FieldLabel } from '../FieldLabel';\nimport { FieldError } from '../FieldError';\nimport type { TextAreaFieldProps } from './types';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport { TextAreaFieldDefinition } from './definition';\n\n/**\n * A multi-line text input with an integrated label and inline error display.\n *\n * @public\n */\nexport const TextAreaField = forwardRef<HTMLDivElement, TextAreaFieldProps>(\n (props, ref) => {\n const { ownProps, restProps, dataAttributes } = useDefinition(\n TextAreaFieldDefinition,\n props,\n );\n const { classes, label, secondaryLabel, placeholder, description, rows } =\n ownProps;\n\n useEffect(() => {\n if (!label && !restProps['aria-label'] && !restProps['aria-labelledby']) {\n console.warn(\n 'TextAreaField requires either a visible label, aria-label, or aria-labelledby for accessibility',\n );\n }\n }, [label, restProps['aria-label'], restProps['aria-labelledby']]);\n\n // If a secondary label is provided, use it. Otherwise, use 'Required' if the field is required.\n const secondaryLabelText =\n secondaryLabel || (restProps.isRequired ? 'Required' : null);\n\n return (\n <AriaTextField\n className={classes.root}\n {...dataAttributes}\n {...restProps}\n ref={ref}\n >\n <FieldLabel\n label={label}\n secondaryLabel={secondaryLabelText}\n description={description}\n descriptionSlot=\"description\"\n />\n <TextArea\n className={classes.textArea}\n data-size={dataAttributes['data-size']}\n placeholder={placeholder}\n rows={rows}\n />\n <FieldError />\n </AriaTextField>\n );\n },\n);\n\nTextAreaField.displayName = 'TextAreaField';\n"],"names":["AriaTextField"],"mappings":";;;;;;;;;;AA6BO,MAAM,aAAA,GAAgB,UAAA;AAAA,EAC3B,CAAC,OAAO,GAAA,KAAQ;AACd,IAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAW,cAAA,EAAe,GAAI,aAAA;AAAA,MAC9C,uBAAA;AAAA,MACA;AAAA,KACF;AACA,IAAA,MAAM,EAAE,OAAA,EAAS,KAAA,EAAO,gBAAgB,WAAA,EAAa,WAAA,EAAa,MAAK,GACrE,QAAA;AAEF,IAAA,SAAA,CAAU,MAAM;AACd,MAAA,IAAI,CAAC,SAAS,CAAC,SAAA,CAAU,YAAY,CAAA,IAAK,CAAC,SAAA,CAAU,iBAAiB,CAAA,EAAG;AACvE,QAAA,OAAA,CAAQ,IAAA;AAAA,UACN;AAAA,SACF;AAAA,MACF;AAAA,IACF,CAAA,EAAG,CAAC,KAAA,EAAO,SAAA,CAAU,YAAY,CAAA,EAAG,SAAA,CAAU,iBAAiB,CAAC,CAAC,CAAA;AAGjE,IAAA,MAAM,kBAAA,GACJ,cAAA,KAAmB,SAAA,CAAU,UAAA,GAAa,UAAA,GAAa,IAAA,CAAA;AAEzD,IAAA,uBACE,IAAA;AAAA,MAACA,SAAA;AAAA,MAAA;AAAA,QACC,WAAW,OAAA,CAAQ,IAAA;AAAA,QAClB,GAAG,cAAA;AAAA,QACH,GAAG,SAAA;AAAA,QACJ,GAAA;AAAA,QAEA,QAAA,EAAA;AAAA,0BAAA,GAAA;AAAA,YAAC,UAAA;AAAA,YAAA;AAAA,cACC,KAAA;AAAA,cACA,cAAA,EAAgB,kBAAA;AAAA,cAChB,WAAA;AAAA,cACA,eAAA,EAAgB;AAAA;AAAA,WAClB;AAAA,0BACA,GAAA;AAAA,YAAC,QAAA;AAAA,YAAA;AAAA,cACC,WAAW,OAAA,CAAQ,QAAA;AAAA,cACnB,WAAA,EAAW,eAAe,WAAW,CAAA;AAAA,cACrC,WAAA;AAAA,cACA;AAAA;AAAA,WACF;AAAA,8BACC,UAAA,EAAA,EAAW;AAAA;AAAA;AAAA,KACd;AAAA,EAEJ;AACF;AAEA,aAAA,CAAc,WAAA,GAAc,eAAA;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"TextAreaField.module.css.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
1
+ {"version":3,"file":"TextAreaField.module.css.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"definition.esm.js","sources":["../../../src/components/TextAreaField/definition.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { defineComponent } from '../../hooks/useDefinition';\nimport type { TextAreaFieldOwnProps } from './types';\nimport styles from './TextAreaField.module.css';\n\n/**\n * Component definition for TextAreaField\n * @public\n */\nexport const TextAreaFieldDefinition = defineComponent<TextAreaFieldOwnProps>()(\n {\n styles,\n classNames: {\n root: 'bui-TextAreaField',\n textArea: 'bui-TextArea',\n },\n bg: 'consumer',\n propDefs: {\n size: { dataAttribute: true, default: 'small' },\n className: {},\n placeholder: {},\n rows: { default: 3 },\n label: {},\n description: {},\n secondaryLabel: {},\n },\n },\n);\n"],"names":[],"mappings":";;;;;;;;;;;;AAwBO,MAAM,0BAA0B,eAAA,EAAuC;AAAA,EAC5E;AAAA,IACE,MAAA;AAAA,IACA,UAAA,EAAY;AAAA,MACV,IAAA,EAAM,mBAAA;AAAA,MACN,QAAA,EAAU;AAAA,KACZ;AAAA,IACA,EAAA,EAAI,UAAA;AAAA,IACJ,QAAA,EAAU;AAAA,MACR,IAAA,EAAM,EAAE,aAAA,EAAe,IAAA,EAAM,SAAS,OAAA,EAAQ;AAAA,MAC9C,WAAW,EAAC;AAAA,MACZ,aAAa,EAAC;AAAA,MACd,IAAA,EAAM,EAAE,OAAA,EAAS,CAAA,EAAE;AAAA,MACnB,OAAO,EAAC;AAAA,MACR,aAAa,EAAC;AAAA,MACd,gBAAgB;AAAC;AACnB;AAEJ;;;;"}
1
+ {"version":3,"file":"definition.esm.js","sources":["../../../src/components/TextAreaField/definition.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { defineComponent } from '../../hooks/useDefinition';\nimport type { TextAreaFieldOwnProps } from './types';\nimport styles from './TextAreaField.module.css';\n\n/**\n * Component definition for TextAreaField\n * @public\n */\nexport const TextAreaFieldDefinition = defineComponent<TextAreaFieldOwnProps>()(\n {\n styles,\n classNames: {\n root: 'bui-TextAreaField',\n textArea: 'bui-TextArea',\n },\n bg: 'consumer',\n propDefs: {\n size: { dataAttribute: true, default: 'small' },\n className: {},\n placeholder: {},\n rows: { default: 3 },\n label: {},\n description: {},\n secondaryLabel: {},\n },\n },\n);\n"],"names":[],"mappings":";;;;;;;;;;;;AAwBO,MAAM,0BAA0B,eAAA,EAAuC;AAAA,EAC5E;AAAA,IACE,MAAA;AAAA,IACA,UAAA,EAAY;AAAA,MACV,IAAA,EAAM,mBAAA;AAAA,MACN,QAAA,EAAU;AAAA,KACZ;AAAA,IACA,EAAA,EAAI,UAAA;AAAA,IACJ,QAAA,EAAU;AAAA,MACR,IAAA,EAAM,EAAE,aAAA,EAAe,IAAA,EAAM,SAAS,OAAA,EAAQ;AAAA,MAC9C,WAAW,EAAC;AAAA,MACZ,aAAa,EAAC;AAAA,MACd,IAAA,EAAM,EAAE,OAAA,EAAS,CAAA,EAAE;AAAA,MACnB,OAAO,EAAC;AAAA,MACR,aAAa,EAAC;AAAA,MACd,gBAAgB;AAAC;AACnB;AAEJ;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"TextField.esm.js","sources":["../../../src/components/TextField/TextField.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { forwardRef, useEffect } from 'react';\nimport { Input, TextField as AriaTextField } from 'react-aria-components';\nimport { FieldLabel } from '../FieldLabel';\nimport { FieldError } from '../FieldError';\nimport type { TextFieldProps } from './types';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport { TextFieldDefinition } from './definition';\n\n/**\n * A single-line text input with an integrated label, optional icon, and inline error display.\n *\n * @public\n */\nexport const TextField = forwardRef<HTMLDivElement, TextFieldProps>(\n (props, ref) => {\n const { ownProps, restProps, dataAttributes } = useDefinition(\n TextFieldDefinition,\n props,\n );\n const { classes, label, icon, secondaryLabel, placeholder, description } =\n ownProps;\n\n useEffect(() => {\n if (!label && !restProps['aria-label'] && !restProps['aria-labelledby']) {\n console.warn(\n 'TextField requires either a visible label, aria-label, or aria-labelledby for accessibility',\n );\n }\n }, [label, restProps['aria-label'], restProps['aria-labelledby']]);\n\n // If a secondary label is provided, use it. Otherwise, use 'Required' if the field is required.\n const secondaryLabelText =\n secondaryLabel || (restProps.isRequired ? 'Required' : null);\n\n return (\n <AriaTextField\n className={classes.root}\n {...dataAttributes}\n {...restProps}\n ref={ref}\n >\n <FieldLabel\n label={label}\n secondaryLabel={secondaryLabelText}\n description={description}\n descriptionSlot=\"description\"\n />\n <div\n className={classes.inputWrapper}\n data-size={dataAttributes['data-size']}\n >\n {icon && (\n <div\n className={classes.inputIcon}\n data-size={dataAttributes['data-size']}\n aria-hidden=\"true\"\n >\n {icon}\n </div>\n )}\n <Input\n className={classes.input}\n {...(icon && { 'data-icon': true })}\n placeholder={placeholder}\n />\n </div>\n <FieldError />\n </AriaTextField>\n );\n },\n);\n\nTextField.displayName = 'TextField';\n"],"names":["AriaTextField"],"mappings":";;;;;;;;;;AA6BO,MAAM,SAAA,GAAY,UAAA;AAAA,EACvB,CAAC,OAAO,GAAA,KAAQ;AACd,IAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAW,cAAA,EAAe,GAAI,aAAA;AAAA,MAC9C,mBAAA;AAAA,MACA;AAAA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AAA,kBAAC,KAAA;AAAA,kBAAA;AAAA,oBACC,WAAW,OAAA,CAAQ,KAAA;AAAA,oBAClB,GAAI,IAAA,IAAQ,EAAE,WAAA,EAAa,IAAA,EAAK;AAAA,oBACjC;AAAA;AAAA;AACF;AAAA;AAAA,WACF;AAAA,8BACC,UAAA,EAAA,EAAW;AAAA;AAAA;AAAA,KACd;AAAA,EAEJ;AACF;AAEA,SAAA,CAAU,WAAA,GAAc,WAAA;;;;"}
1
+ {"version":3,"file":"TextField.esm.js","sources":["../../../src/components/TextField/TextField.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { forwardRef, useEffect } from 'react';\nimport { Input, TextField as AriaTextField } from 'react-aria-components';\nimport { FieldLabel } from '../FieldLabel';\nimport { FieldError } from '../FieldError';\nimport type { TextFieldProps } from './types';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport { TextFieldDefinition } from './definition';\n\n/**\n * A single-line text input with an integrated label, optional icon, and inline error display.\n *\n * @public\n */\nexport const TextField = forwardRef<HTMLDivElement, TextFieldProps>(\n (props, ref) => {\n const { ownProps, restProps, dataAttributes } = useDefinition(\n TextFieldDefinition,\n props,\n );\n const { classes, label, icon, secondaryLabel, placeholder, description } =\n ownProps;\n\n useEffect(() => {\n if (!label && !restProps['aria-label'] && !restProps['aria-labelledby']) {\n console.warn(\n 'TextField requires either a visible label, aria-label, or aria-labelledby for accessibility',\n );\n }\n }, [label, restProps['aria-label'], restProps['aria-labelledby']]);\n\n // If a secondary label is provided, use it. Otherwise, use 'Required' if the field is required.\n const secondaryLabelText =\n secondaryLabel || (restProps.isRequired ? 'Required' : null);\n\n return (\n <AriaTextField\n className={classes.root}\n {...dataAttributes}\n {...restProps}\n ref={ref}\n >\n <FieldLabel\n label={label}\n secondaryLabel={secondaryLabelText}\n description={description}\n descriptionSlot=\"description\"\n />\n <div\n className={classes.inputWrapper}\n data-size={dataAttributes['data-size']}\n >\n {icon && (\n <div\n className={classes.inputIcon}\n data-size={dataAttributes['data-size']}\n aria-hidden=\"true\"\n >\n {icon}\n </div>\n )}\n <Input\n className={classes.input}\n {...(icon && { 'data-icon': true })}\n placeholder={placeholder}\n />\n </div>\n <FieldError />\n </AriaTextField>\n );\n },\n);\n\nTextField.displayName = 'TextField';\n"],"names":["AriaTextField"],"mappings":";;;;;;;;;;AA6BO,MAAM,SAAA,GAAY,UAAA;AAAA,EACvB,CAAC,OAAO,GAAA,KAAQ;AACd,IAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAW,cAAA,EAAe,GAAI,aAAA;AAAA,MAC9C,mBAAA;AAAA,MACA;AAAA,KACF;AACA,IAAA,MAAM,EAAE,OAAA,EAAS,KAAA,EAAO,MAAM,cAAA,EAAgB,WAAA,EAAa,aAAY,GACrE,QAAA;AAEF,IAAA,SAAA,CAAU,MAAM;AACd,MAAA,IAAI,CAAC,SAAS,CAAC,SAAA,CAAU,YAAY,CAAA,IAAK,CAAC,SAAA,CAAU,iBAAiB,CAAA,EAAG;AACvE,QAAA,OAAA,CAAQ,IAAA;AAAA,UACN;AAAA,SACF;AAAA,MACF;AAAA,IACF,CAAA,EAAG,CAAC,KAAA,EAAO,SAAA,CAAU,YAAY,CAAA,EAAG,SAAA,CAAU,iBAAiB,CAAC,CAAC,CAAA;AAGjE,IAAA,MAAM,kBAAA,GACJ,cAAA,KAAmB,SAAA,CAAU,UAAA,GAAa,UAAA,GAAa,IAAA,CAAA;AAEzD,IAAA,uBACE,IAAA;AAAA,MAACA,WAAA;AAAA,MAAA;AAAA,QACC,WAAW,OAAA,CAAQ,IAAA;AAAA,QAClB,GAAG,cAAA;AAAA,QACH,GAAG,SAAA;AAAA,QACJ,GAAA;AAAA,QAEA,QAAA,EAAA;AAAA,0BAAA,GAAA;AAAA,YAAC,UAAA;AAAA,YAAA;AAAA,cACC,KAAA;AAAA,cACA,cAAA,EAAgB,kBAAA;AAAA,cAChB,WAAA;AAAA,cACA,eAAA,EAAgB;AAAA;AAAA,WAClB;AAAA,0BACA,IAAA;AAAA,YAAC,KAAA;AAAA,YAAA;AAAA,cACC,WAAW,OAAA,CAAQ,YAAA;AAAA,cACnB,WAAA,EAAW,eAAe,WAAW,CAAA;AAAA,cAEpC,QAAA,EAAA;AAAA,gBAAA,IAAA,oBACC,GAAA;AAAA,kBAAC,KAAA;AAAA,kBAAA;AAAA,oBACC,WAAW,OAAA,CAAQ,SAAA;AAAA,oBACnB,WAAA,EAAW,eAAe,WAAW,CAAA;AAAA,oBACrC,aAAA,EAAY,MAAA;AAAA,oBAEX,QAAA,EAAA;AAAA;AAAA,iBACH;AAAA,gCAEF,GAAA;AAAA,kBAAC,KAAA;AAAA,kBAAA;AAAA,oBACC,WAAW,OAAA,CAAQ,KAAA;AAAA,oBAClB,GAAI,IAAA,IAAQ,EAAE,WAAA,EAAa,IAAA,EAAK;AAAA,oBACjC;AAAA;AAAA;AACF;AAAA;AAAA,WACF;AAAA,8BACC,UAAA,EAAA,EAAW;AAAA;AAAA;AAAA,KACd;AAAA,EAEJ;AACF;AAEA,SAAA,CAAU,WAAA,GAAc,WAAA;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"TextField.module.css.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
1
+ {"version":3,"file":"TextField.module.css.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"definition.esm.js","sources":["../../../src/components/TextField/definition.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { defineComponent } from '../../hooks/useDefinition';\nimport type { TextFieldOwnProps } from './types';\nimport styles from './TextField.module.css';\n\n/**\n * Component definition for TextField\n * @public\n */\nexport const TextFieldDefinition = defineComponent<TextFieldOwnProps>()({\n styles,\n classNames: {\n root: 'bui-TextField',\n inputWrapper: 'bui-InputWrapper',\n input: 'bui-Input',\n inputIcon: 'bui-InputIcon',\n inputAction: 'bui-InputAction',\n },\n bg: 'consumer',\n propDefs: {\n size: { dataAttribute: true, default: 'small' },\n className: {},\n icon: {},\n placeholder: {},\n label: {},\n description: {},\n secondaryLabel: {},\n },\n});\n"],"names":[],"mappings":";;;;;;;;;;;;AAwBO,MAAM,mBAAA,GAAsB,iBAAmC,CAAE;AAAA,EACtE,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,eAAA;AAAA,IACN,YAAA,EAAc,kBAAA;AAAA,IACd,KAAA,EAAO,WAAA;AAAA,IACP,SAAA,EAAW,eAAA;AAAA,IACX,WAAA,EAAa;AAAA,GACf;AAAA,EACA,EAAA,EAAI,UAAA;AAAA,EACJ,QAAA,EAAU;AAAA,IACR,IAAA,EAAM,EAAE,aAAA,EAAe,IAAA,EAAM,SAAS,OAAA,EAAQ;AAAA,IAC9C,WAAW,EAAC;AAAA,IACZ,MAAM,EAAC;AAAA,IACP,aAAa,EAAC;AAAA,IACd,OAAO,EAAC;AAAA,IACR,aAAa,EAAC;AAAA,IACd,gBAAgB;AAAC;AAErB,CAAC;;;;"}
1
+ {"version":3,"file":"definition.esm.js","sources":["../../../src/components/TextField/definition.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { defineComponent } from '../../hooks/useDefinition';\nimport type { TextFieldOwnProps } from './types';\nimport styles from './TextField.module.css';\n\n/**\n * Component definition for TextField\n * @public\n */\nexport const TextFieldDefinition = defineComponent<TextFieldOwnProps>()({\n styles,\n classNames: {\n root: 'bui-TextField',\n inputWrapper: 'bui-InputWrapper',\n input: 'bui-Input',\n inputIcon: 'bui-InputIcon',\n inputAction: 'bui-InputAction',\n },\n bg: 'consumer',\n propDefs: {\n size: { dataAttribute: true, default: 'small' },\n className: {},\n icon: {},\n placeholder: {},\n label: {},\n description: {},\n secondaryLabel: {},\n },\n});\n"],"names":[],"mappings":";;;;;;;;;;;;AAwBO,MAAM,mBAAA,GAAsB,iBAAmC,CAAE;AAAA,EACtE,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,eAAA;AAAA,IACN,YAAA,EAAc,kBAAA;AAAA,IACd,KAAA,EAAO,WAAA;AAAA,IACP,SAAA,EAAW,eAAA;AAAA,IACX,WAAA,EAAa;AAAA,GACf;AAAA,EACA,EAAA,EAAI,UAAA;AAAA,EACJ,QAAA,EAAU;AAAA,IACR,IAAA,EAAM,EAAE,aAAA,EAAe,IAAA,EAAM,SAAS,OAAA,EAAQ;AAAA,IAC9C,WAAW,EAAC;AAAA,IACZ,MAAM,EAAC;AAAA,IACP,aAAa,EAAC;AAAA,IACd,OAAO,EAAC;AAAA,IACR,aAAa,EAAC;AAAA,IACd,gBAAgB;AAAC;AAErB,CAAC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"ToggleButton.esm.js","sources":["../../../src/components/ToggleButton/ToggleButton.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, Ref } from 'react';\nimport { ToggleButton as AriaToggleButton } from 'react-aria-components';\nimport type { ToggleButtonProps } from './types';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport { ToggleButtonDefinition } from './definition';\n\n/**\n * A button that maintains a pressed or unpressed state, with optional start and end icon slots.\n *\n * @public\n */\nexport const ToggleButton = forwardRef(\n (props: ToggleButtonProps, ref: Ref<HTMLButtonElement>) => {\n const { ownProps, restProps, dataAttributes } = useDefinition(\n ToggleButtonDefinition,\n props,\n );\n const { classes, children, iconStart, iconEnd } = ownProps;\n\n return (\n <AriaToggleButton\n className={classes.root}\n ref={ref}\n {...dataAttributes}\n {...restProps}\n >\n {renderProps => {\n // If children is a function, call it with render props; otherwise use children as-is\n const renderedChildren =\n typeof children === 'function' ? children(renderProps) : children;\n\n return (\n <span className={classes.content} data-slot=\"content\">\n {iconStart}\n {renderedChildren}\n {iconEnd}\n </span>\n );\n }}\n </AriaToggleButton>\n );\n },\n);\n\nToggleButton.displayName = 'ToggleButton';\n"],"names":["AriaToggleButton"],"mappings":";;;;;;AA2BO,MAAM,YAAA,GAAe,UAAA;AAAA,EAC1B,CAAC,OAA0B,GAAA,KAAgC;AACzD,IAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAW,cAAA,EAAe,GAAI,aAAA;AAAA,MAC9C,sBAAA;AAAA,MACA;AAAA,KACF;AACA,IAAA,MAAM,EAAE,OAAA,EAAS,QAAA,EAAU,SAAA,EAAW,SAAQ,GAAI,QAAA;AAElD,IAAA,uBACE,GAAA;AAAA,MAACA,cAAA;AAAA,MAAA;AAAA,QACC,WAAW,OAAA,CAAQ,IAAA;AAAA,QACnB,GAAA;AAAA,QACC,GAAG,cAAA;AAAA,QACH,GAAG,SAAA;AAAA,QAEH,QAAA,EAAA,CAAA,WAAA,KAAe;AAEd,UAAA,MAAM,mBACJ,OAAO,QAAA,KAAa,UAAA,GAAa,QAAA,CAAS,WAAW,CAAA,GAAI,QAAA;AAE3D,UAAA,4BACG,MAAA,EAAA,EAAK,SAAA,EAAW,OAAA,CAAQ,OAAA,EAAS,aAAU,SAAA,EACzC,QAAA,EAAA;AAAA,YAAA,SAAA;AAAA,YACA,gBAAA;AAAA,YACA;AAAA,WAAA,EACH,CAAA;AAAA,QAEJ;AAAA;AAAA,KACF;AAAA,EAEJ;AACF;AAEA,YAAA,CAAa,WAAA,GAAc,cAAA;;;;"}
1
+ {"version":3,"file":"ToggleButton.esm.js","sources":["../../../src/components/ToggleButton/ToggleButton.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, Ref } from 'react';\nimport { ToggleButton as AriaToggleButton } from 'react-aria-components';\nimport type { ToggleButtonProps } from './types';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport { ToggleButtonDefinition } from './definition';\n\n/**\n * A button that maintains a pressed or unpressed state, with optional start and end icon slots.\n *\n * @public\n */\nexport const ToggleButton = forwardRef(\n (props: ToggleButtonProps, ref: Ref<HTMLButtonElement>) => {\n const { ownProps, restProps, dataAttributes } = useDefinition(\n ToggleButtonDefinition,\n props,\n );\n const { classes, children, iconStart, iconEnd } = ownProps;\n\n return (\n <AriaToggleButton\n className={classes.root}\n ref={ref}\n {...dataAttributes}\n {...restProps}\n >\n {renderProps => {\n // If children is a function, call it with render props; otherwise use children as-is\n const renderedChildren =\n typeof children === 'function' ? children(renderProps) : children;\n\n return (\n <span className={classes.content} data-slot=\"content\">\n {iconStart}\n {renderedChildren}\n {iconEnd}\n </span>\n );\n }}\n </AriaToggleButton>\n );\n },\n);\n\nToggleButton.displayName = 'ToggleButton';\n"],"names":["AriaToggleButton"],"mappings":";;;;;;AA2BO,MAAM,YAAA,GAAe,UAAA;AAAA,EAC1B,CAAC,OAA0B,GAAA,KAAgC;AACzD,IAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAW,cAAA,EAAe,GAAI,aAAA;AAAA,MAC9C,sBAAA;AAAA,MACA;AAAA,KACF;AACA,IAAA,MAAM,EAAE,OAAA,EAAS,QAAA,EAAU,SAAA,EAAW,SAAQ,GAAI,QAAA;AAElD,IAAA,uBACE,GAAA;AAAA,MAACA,cAAA;AAAA,MAAA;AAAA,QACC,WAAW,OAAA,CAAQ,IAAA;AAAA,QACnB,GAAA;AAAA,QACC,GAAG,cAAA;AAAA,QACH,GAAG,SAAA;AAAA,QAEH,QAAA,EAAA,CAAA,WAAA,KAAe;AAEd,UAAA,MAAM,mBACJ,OAAO,QAAA,KAAa,UAAA,GAAa,QAAA,CAAS,WAAW,CAAA,GAAI,QAAA;AAE3D,UAAA,4BACG,MAAA,EAAA,EAAK,SAAA,EAAW,OAAA,CAAQ,OAAA,EAAS,aAAU,SAAA,EACzC,QAAA,EAAA;AAAA,YAAA,SAAA;AAAA,YACA,gBAAA;AAAA,YACA;AAAA,WAAA,EACH,CAAA;AAAA,QAEJ;AAAA;AAAA,KACF;AAAA,EAEJ;AACF;AAEA,YAAA,CAAa,WAAA,GAAc,cAAA;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"ToggleButton.module.css.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
1
+ {"version":3,"file":"ToggleButton.module.css.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"definition.esm.js","sources":["../../../src/components/ToggleButton/definition.ts"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { defineComponent } from '../../hooks/useDefinition';\nimport type { ToggleButtonOwnProps } from './types';\nimport styles from './ToggleButton.module.css';\n\n/**\n * Component definition for ToggleButton\n * @public\n */\nexport const ToggleButtonDefinition = defineComponent<ToggleButtonOwnProps>()({\n styles,\n classNames: {\n root: 'bui-ToggleButton',\n content: 'bui-ToggleButtonContent',\n },\n propDefs: {\n size: { dataAttribute: true, default: 'small' },\n iconStart: {},\n iconEnd: {},\n children: {},\n className: {},\n },\n});\n"],"names":[],"mappings":";;;;;;;;;;;;AAwBO,MAAM,sBAAA,GAAyB,iBAAsC,CAAE;AAAA,EAC5E,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,kBAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA,EACA,QAAA,EAAU;AAAA,IACR,IAAA,EAAM,EAAE,aAAA,EAAe,IAAA,EAAM,SAAS,OAAA,EAAQ;AAAA,IAC9C,WAAW,EAAC;AAAA,IACZ,SAAS,EAAC;AAAA,IACV,UAAU,EAAC;AAAA,IACX,WAAW;AAAC;AAEhB,CAAC;;;;"}
1
+ {"version":3,"file":"definition.esm.js","sources":["../../../src/components/ToggleButton/definition.ts"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { defineComponent } from '../../hooks/useDefinition';\nimport type { ToggleButtonOwnProps } from './types';\nimport styles from './ToggleButton.module.css';\n\n/**\n * Component definition for ToggleButton\n * @public\n */\nexport const ToggleButtonDefinition = defineComponent<ToggleButtonOwnProps>()({\n styles,\n classNames: {\n root: 'bui-ToggleButton',\n content: 'bui-ToggleButtonContent',\n },\n propDefs: {\n size: { dataAttribute: true, default: 'small' },\n iconStart: {},\n iconEnd: {},\n children: {},\n className: {},\n },\n});\n"],"names":[],"mappings":";;;;;;;;;;;;AAwBO,MAAM,sBAAA,GAAyB,iBAAsC,CAAE;AAAA,EAC5E,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,kBAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA,EACA,QAAA,EAAU;AAAA,IACR,IAAA,EAAM,EAAE,aAAA,EAAe,IAAA,EAAM,SAAS,OAAA,EAAQ;AAAA,IAC9C,WAAW,EAAC;AAAA,IACZ,SAAS,EAAC;AAAA,IACV,UAAU,EAAC;AAAA,IACX,WAAW;AAAC;AAEhB,CAAC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"ToggleButtonGroup.esm.js","sources":["../../../src/components/ToggleButtonGroup/ToggleButtonGroup.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, Ref } from 'react';\nimport { ToggleButtonGroup as AriaToggleButtonGroup } from 'react-aria-components';\nimport type { ToggleButtonGroupProps } from './types';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport { ToggleButtonGroupDefinition } from './definition';\n\n/**\n * A container that groups ToggleButton items and manages their collective selection state.\n *\n * @public\n */\nexport const ToggleButtonGroup = forwardRef(\n (props: ToggleButtonGroupProps, ref: Ref<HTMLDivElement>) => {\n const { ownProps, restProps } = useDefinition(\n ToggleButtonGroupDefinition,\n props,\n );\n const { classes, children } = ownProps;\n\n return (\n <AriaToggleButtonGroup className={classes.root} ref={ref} {...restProps}>\n {children}\n </AriaToggleButtonGroup>\n );\n },\n);\n\nToggleButtonGroup.displayName = 'ToggleButtonGroup';\n"],"names":["AriaToggleButtonGroup"],"mappings":";;;;;;AA2BO,MAAM,iBAAA,GAAoB,UAAA;AAAA,EAC/B,CAAC,OAA+B,GAAA,KAA6B;AAC3D,IAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAU,GAAI,aAAA;AAAA,MAC9B,2BAAA;AAAA,MACA;AAAA,KACF;AACA,IAAA,MAAM,EAAE,OAAA,EAAS,QAAA,EAAS,GAAI,QAAA;AAE9B,IAAA,uBACE,GAAA,CAACA,uBAAsB,SAAA,EAAW,OAAA,CAAQ,MAAM,GAAA,EAAW,GAAG,WAC3D,QAAA,EACH,CAAA;AAAA,EAEJ;AACF;AAEA,iBAAA,CAAkB,WAAA,GAAc,mBAAA;;;;"}
1
+ {"version":3,"file":"ToggleButtonGroup.esm.js","sources":["../../../src/components/ToggleButtonGroup/ToggleButtonGroup.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, Ref } from 'react';\nimport { ToggleButtonGroup as AriaToggleButtonGroup } from 'react-aria-components';\nimport type { ToggleButtonGroupProps } from './types';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport { ToggleButtonGroupDefinition } from './definition';\n\n/**\n * A container that groups ToggleButton items and manages their collective selection state.\n *\n * @public\n */\nexport const ToggleButtonGroup = forwardRef(\n (props: ToggleButtonGroupProps, ref: Ref<HTMLDivElement>) => {\n const { ownProps, restProps } = useDefinition(\n ToggleButtonGroupDefinition,\n props,\n );\n const { classes, children } = ownProps;\n\n return (\n <AriaToggleButtonGroup className={classes.root} ref={ref} {...restProps}>\n {children}\n </AriaToggleButtonGroup>\n );\n },\n);\n\nToggleButtonGroup.displayName = 'ToggleButtonGroup';\n"],"names":["AriaToggleButtonGroup"],"mappings":";;;;;;AA2BO,MAAM,iBAAA,GAAoB,UAAA;AAAA,EAC/B,CAAC,OAA+B,GAAA,KAA6B;AAC3D,IAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAU,GAAI,aAAA;AAAA,MAC9B,2BAAA;AAAA,MACA;AAAA,KACF;AACA,IAAA,MAAM,EAAE,OAAA,EAAS,QAAA,EAAS,GAAI,QAAA;AAE9B,IAAA,uBACE,GAAA,CAACA,uBAAsB,SAAA,EAAW,OAAA,CAAQ,MAAM,GAAA,EAAW,GAAG,WAC3D,QAAA,EACH,CAAA;AAAA,EAEJ;AACF;AAEA,iBAAA,CAAkB,WAAA,GAAc,mBAAA;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"ToggleButtonGroup.module.css.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
1
+ {"version":3,"file":"ToggleButtonGroup.module.css.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"definition.esm.js","sources":["../../../src/components/ToggleButtonGroup/definition.ts"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { defineComponent } from '../../hooks/useDefinition';\nimport type { ToggleButtonGroupOwnProps } from './types';\nimport styles from './ToggleButtonGroup.module.css';\n\n/**\n * Component definition for ToggleButtonGroup\n * @public\n */\nexport const ToggleButtonGroupDefinition =\n defineComponent<ToggleButtonGroupOwnProps>()({\n styles,\n classNames: {\n root: 'bui-ToggleButtonGroup',\n },\n propDefs: {\n className: {},\n children: {},\n },\n });\n"],"names":[],"mappings":";;;;;;;;;;;;AAwBO,MAAM,2BAAA,GACX,iBAA2C,CAAE;AAAA,EAC3C,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA,QAAA,EAAU;AAAA,IACR,WAAW,EAAC;AAAA,IACZ,UAAU;AAAC;AAEf,CAAC;;;;"}
1
+ {"version":3,"file":"definition.esm.js","sources":["../../../src/components/ToggleButtonGroup/definition.ts"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { defineComponent } from '../../hooks/useDefinition';\nimport type { ToggleButtonGroupOwnProps } from './types';\nimport styles from './ToggleButtonGroup.module.css';\n\n/**\n * Component definition for ToggleButtonGroup\n * @public\n */\nexport const ToggleButtonGroupDefinition =\n defineComponent<ToggleButtonGroupOwnProps>()({\n styles,\n classNames: {\n root: 'bui-ToggleButtonGroup',\n },\n propDefs: {\n className: {},\n children: {},\n },\n });\n"],"names":[],"mappings":";;;;;;;;;;;;AAwBO,MAAM,2BAAA,GACX,iBAA2C,CAAE;AAAA,EAC3C,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA,QAAA,EAAU;AAAA,IACR,WAAW,EAAC;AAAA,IACZ,UAAU;AAAC;AAEf,CAAC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Tooltip.esm.js","sources":["../../../src/components/Tooltip/Tooltip.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 { useId } from 'react-aria';\nimport {\n OverlayArrow,\n Tooltip as AriaTooltip,\n TooltipTrigger as AriaTooltipTrigger,\n TooltipTriggerComponentProps,\n} from 'react-aria-components';\nimport type { TooltipProps } from './types';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport { TooltipDefinition } from './definition';\nimport { Box } from '../Box';\nimport { BgReset } from '../../hooks/useBg';\n\n/**\n * A wrapper that connects a trigger element to a Tooltip, controlling its show and hide behavior with a configurable delay.\n *\n * @public\n */\nexport const TooltipTrigger = (props: TooltipTriggerComponentProps) => {\n const { delay = 600 } = props;\n\n return <AriaTooltipTrigger delay={delay} {...props} />;\n};\n\n/**\n * A floating label that provides contextual information about an element when it receives hover or focus.\n *\n * @public\n */\nexport const Tooltip = forwardRef<HTMLDivElement, TooltipProps>(\n (props, ref) => {\n const { ownProps, restProps } = useDefinition(TooltipDefinition, props);\n const { classes, children } = ownProps;\n const svgPathId = useId();\n\n return (\n <AriaTooltip className={classes.tooltip} {...restProps} ref={ref}>\n <OverlayArrow className={classes.arrow}>\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\n <defs>\n <path\n id={svgPathId}\n fillRule=\"evenodd\"\n d=\"M10.3356 7.39793L15.1924 3.02682C15.9269 2.36577 16.8801 2 17.8683 2H20V7.94781e-07L1.74846e-07 -9.53674e-07L0 2L1.4651 2C2.4532 2 3.4064 2.36577 4.1409 3.02682L8.9977 7.39793C9.378 7.7402 9.9553 7.74021 10.3356 7.39793Z M11.0046 8.14124C10.2439 8.82575 9.08939 8.82578 8.32869 8.14122L3.47189 3.77011C2.92109 3.27432 2.20619 2.99999 1.46509 2.99999L4.10999 3L8.99769 7.39793C9.37799 7.7402 9.95529 7.7402 10.3356 7.39793L15.2226 3L17.8683 2.99999C17.1271 2.99999 16.4122 3.27432 15.8614 3.77011L11.0046 8.14124Z\"\n />\n </defs>\n\n <use href={`#${svgPathId}`} />\n <use href={`#${svgPathId}`} />\n\n <path d=\"M11.0046 8.14124C10.2439 8.82575 9.08939 8.82578 8.32869 8.14122L3.47189 3.77011C2.92109 3.27432 2.20619 2.99999 1.46509 2.99999L4.10999 3L8.99769 7.39793C9.37799 7.7402 9.95529 7.7402 10.3356 7.39793L15.2226 3L17.8683 2.99999C17.1271 2.99999 16.4122 3.27432 15.8614 3.77011L11.0046 8.14124Z\" />\n </svg>\n </OverlayArrow>\n <BgReset>\n <Box bg=\"neutral\" className={classes.content}>\n {children}\n </Box>\n </BgReset>\n </AriaTooltip>\n );\n },\n);\n\nTooltip.displayName = 'Tooltip';\n"],"names":["AriaTooltipTrigger","AriaTooltip"],"mappings":";;;;;;;;;;AAmCO,MAAM,cAAA,GAAiB,CAAC,KAAA,KAAwC;AACrE,EAAA,MAAM,EAAE,KAAA,GAAQ,GAAA,EAAI,GAAI,KAAA;AAExB,EAAA,uBAAO,GAAA,CAACA,gBAAA,EAAA,EAAmB,KAAA,EAAe,GAAG,KAAA,EAAO,CAAA;AACtD;AAOO,MAAM,OAAA,GAAU,UAAA;AAAA,EACrB,CAAC,OAAO,GAAA,KAAQ;AACd,IAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAU,GAAI,aAAA,CAAc,mBAAmB,KAAK,CAAA;AACtE,IAAA,MAAM,EAAE,OAAA,EAAS,QAAA,EAAS,GAAI,QAAA;AAC9B,IAAA,MAAM,YAAY,KAAA,EAAM;AAExB,IAAA,4BACGC,SAAA,EAAA,EAAY,SAAA,EAAW,QAAQ,OAAA,EAAU,GAAG,WAAW,GAAA,EACtD,QAAA,EAAA;AAAA,sBAAA,GAAA,CAAC,YAAA,EAAA,EAAa,SAAA,EAAW,OAAA,CAAQ,KAAA,EAC/B,QAAA,kBAAA,IAAA,CAAC,KAAA,EAAA,EAAI,KAAA,EAAM,IAAA,EAAK,MAAA,EAAO,IAAA,EAAK,OAAA,EAAQ,WAAA,EAAY,MAAK,MAAA,EACnD,QAAA,EAAA;AAAA,wBAAA,GAAA,CAAC,MAAA,EAAA,EACC,QAAA,kBAAA,GAAA;AAAA,UAAC,MAAA;AAAA,UAAA;AAAA,YACC,EAAA,EAAI,SAAA;AAAA,YACJ,QAAA,EAAS,SAAA;AAAA,YACT,CAAA,EAAE;AAAA;AAAA,SACJ,EACF,CAAA;AAAA,wBAEA,GAAA,CAAC,KAAA,EAAA,EAAI,IAAA,EAAM,CAAA,CAAA,EAAI,SAAS,CAAA,CAAA,EAAI,CAAA;AAAA,wBAC5B,GAAA,CAAC,KAAA,EAAA,EAAI,IAAA,EAAM,CAAA,CAAA,EAAI,SAAS,CAAA,CAAA,EAAI,CAAA;AAAA,wBAE5B,GAAA,CAAC,MAAA,EAAA,EAAK,CAAA,EAAE,qSAAA,EAAsS;AAAA,OAAA,EAChT,CAAA,EACF,CAAA;AAAA,sBACA,GAAA,CAAC,OAAA,EAAA,EACC,QAAA,kBAAA,GAAA,CAAC,GAAA,EAAA,EAAI,EAAA,EAAG,WAAU,SAAA,EAAW,OAAA,CAAQ,OAAA,EAClC,QAAA,EACH,CAAA,EACF;AAAA,KAAA,EACF,CAAA;AAAA,EAEJ;AACF;AAEA,OAAA,CAAQ,WAAA,GAAc,SAAA;;;;"}
1
+ {"version":3,"file":"Tooltip.esm.js","sources":["../../../src/components/Tooltip/Tooltip.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 { useId } from 'react-aria';\nimport {\n OverlayArrow,\n Tooltip as AriaTooltip,\n TooltipTrigger as AriaTooltipTrigger,\n TooltipTriggerComponentProps,\n} from 'react-aria-components';\nimport type { TooltipProps } from './types';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport { TooltipDefinition } from './definition';\nimport { Box } from '../Box';\nimport { BgReset } from '../../hooks/useBg';\n\n/**\n * A wrapper that connects a trigger element to a Tooltip, controlling its show and hide behavior with a configurable delay.\n *\n * @public\n */\nexport const TooltipTrigger = (props: TooltipTriggerComponentProps) => {\n const { delay = 600 } = props;\n\n return <AriaTooltipTrigger delay={delay} {...props} />;\n};\n\n/**\n * A floating label that provides contextual information about an element when it receives hover or focus.\n *\n * @public\n */\nexport const Tooltip = forwardRef<HTMLDivElement, TooltipProps>(\n (props, ref) => {\n const { ownProps, restProps } = useDefinition(TooltipDefinition, props);\n const { classes, children } = ownProps;\n const svgPathId = useId();\n\n return (\n <AriaTooltip className={classes.tooltip} {...restProps} ref={ref}>\n <OverlayArrow className={classes.arrow}>\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\n <defs>\n <path\n id={svgPathId}\n fillRule=\"evenodd\"\n d=\"M10.3356 7.39793L15.1924 3.02682C15.9269 2.36577 16.8801 2 17.8683 2H20V7.94781e-07L1.74846e-07 -9.53674e-07L0 2L1.4651 2C2.4532 2 3.4064 2.36577 4.1409 3.02682L8.9977 7.39793C9.378 7.7402 9.9553 7.74021 10.3356 7.39793Z M11.0046 8.14124C10.2439 8.82575 9.08939 8.82578 8.32869 8.14122L3.47189 3.77011C2.92109 3.27432 2.20619 2.99999 1.46509 2.99999L4.10999 3L8.99769 7.39793C9.37799 7.7402 9.95529 7.7402 10.3356 7.39793L15.2226 3L17.8683 2.99999C17.1271 2.99999 16.4122 3.27432 15.8614 3.77011L11.0046 8.14124Z\"\n />\n </defs>\n\n <use href={`#${svgPathId}`} />\n <use href={`#${svgPathId}`} />\n\n <path d=\"M11.0046 8.14124C10.2439 8.82575 9.08939 8.82578 8.32869 8.14122L3.47189 3.77011C2.92109 3.27432 2.20619 2.99999 1.46509 2.99999L4.10999 3L8.99769 7.39793C9.37799 7.7402 9.95529 7.7402 10.3356 7.39793L15.2226 3L17.8683 2.99999C17.1271 2.99999 16.4122 3.27432 15.8614 3.77011L11.0046 8.14124Z\" />\n </svg>\n </OverlayArrow>\n <BgReset>\n <Box bg=\"neutral\" className={classes.content}>\n {children}\n </Box>\n </BgReset>\n </AriaTooltip>\n );\n },\n);\n\nTooltip.displayName = 'Tooltip';\n"],"names":["AriaTooltipTrigger","A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E5B,GAAA,CAAC,MAAA,EAAA,EAAK,CAAA,EAAE,qSAAA,EAAsS;AAAA,OAAA,EAChT,CAAA,EACF,CAAA;AAAA,sBACA,GAAA,CAAC,OAAA,EAAA,EACC,QAAA,kBAAA,GAAA,CAAC,GAAA,EAAA,EAAI,EAAA,EAAG,WAAU,SAAA,EAAW,OAAA,CAAQ,OAAA,EAClC,QAAA,EACH,CAAA,EACF;AAAA,KAAA,EACF,CAAA;AAAA,EAEJ;AACF;AAEA,OAAA,CAAQ,WAAA,GAAc,SAAA;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Tooltip.module.css.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
1
+ {"version":3,"file":"Tooltip.module.css.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"definition.esm.js","sources":["../../../src/components/Tooltip/definition.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { defineComponent } from '../../hooks/useDefinition';\nimport type { TooltipOwnProps } from './types';\nimport styles from './Tooltip.module.css';\n\n/**\n * Component definition for Tooltip\n * @public\n */\nexport const TooltipDefinition = defineComponent<TooltipOwnProps>()({\n styles,\n classNames: {\n tooltip: 'bui-Tooltip',\n content: 'bui-TooltipContent',\n arrow: 'bui-TooltipArrow',\n },\n propDefs: {\n children: {},\n className: {},\n },\n});\n"],"names":[],"mappings":";;;;;;;;;;;;AAwBO,MAAM,iBAAA,GAAoB,iBAAiC,CAAE;AAAA,EAClE,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,OAAA,EAAS,aAAA;AAAA,IACT,OAAA,EAAS,oBAAA;AAAA,IACT,KAAA,EAAO;AAAA,GACT;AAAA,EACA,QAAA,EAAU;AAAA,IACR,UAAU,EAAC;AAAA,IACX,WAAW;AAAC;AAEhB,CAAC;;;;"}
1
+ {"version":3,"file":"definition.esm.js","sources":["../../../src/components/Tooltip/definition.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { defineComponent } from '../../hooks/useDefinition';\nimport type { TooltipOwnProps } from './types';\nimport styles from './Tooltip.module.css';\n\n/**\n * Component definition for Tooltip\n * @public\n */\nexport const TooltipDefinition = defineComponent<TooltipOwnProps>()({\n styles,\n classNames: {\n tooltip: 'bui-Tooltip',\n content: 'bui-TooltipContent',\n arrow: 'bui-TooltipArrow',\n },\n propDefs: {\n children: {},\n className: {},\n },\n});\n"],"names":[],"mappings":";;;;;;;;;;;;AAwBO,MAAM,iBAAA,GAAoB,iBAAiC,CAAE;AAAA,EAClE,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,OAAA,EAAS,aAAA;AAAA,IACT,OAAA,EAAS,oBAAA;AAAA,IACT,KAAA,EAAO;AAAA,GACT;AAAA,EACA,QAAA,EAAU;AAAA,IACR,UAAU,EAAC;AAAA,IACX,WAAW;AAAC;AAEhB,CAAC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"VisuallyHidden.esm.js","sources":["../../../src/components/VisuallyHidden/VisuallyHidden.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 { useDefinition } from '../../hooks/useDefinition';\nimport { VisuallyHiddenDefinition } from './definition';\nimport { VisuallyHiddenProps } from './types';\n\n/**\n * Visually hides content while keeping it accessible to screen readers.\n * Useful for descriptive labels and other screen-reader-only content.\n *\n * Note: This component is for content that should ALWAYS remain visually hidden.\n * For skip links that become visible on focus, use a different approach.\n *\n * @public\n */\nexport const VisuallyHidden = (props: VisuallyHiddenProps) => {\n const { ownProps, restProps } = useDefinition(\n VisuallyHiddenDefinition,\n props,\n );\n const { classes } = ownProps;\n\n return <div className={classes.root} {...restProps} />;\n};\n"],"names":[],"mappings":";;;;AA6BO,MAAM,cAAA,GAAiB,CAAC,KAAA,KAA+B;AAC5D,EAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAU,GAAI,aAAA;AAAA,IAC9B,wBAAA;AAAA,IACA;AAAA,GACF;AACA,EAAA,MAAM,EAAE,SAAQ,GAAI,QAAA;AAEpB,EAAA,2BAAQ,KAAA,EAAA,EAAI,SAAA,EAAW,OAAA,CAAQ,IAAA,EAAO,GAAG,SAAA,EAAW,CAAA;AACtD;;;;"}
1
+ {"version":3,"file":"VisuallyHidden.esm.js","sources":["../../../src/components/VisuallyHidden/VisuallyHidden.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 { useDefinition } from '../../hooks/useDefinition';\nimport { VisuallyHiddenDefinition } from './definition';\nimport { VisuallyHiddenProps } from './types';\n\n/**\n * Visually hides content while keeping it accessible to screen readers.\n * Useful for descriptive labels and other screen-reader-only content.\n *\n * Note: This component is for content that should ALWAYS remain visually hidden.\n * For skip links that become visible on focus, use a different approach.\n *\n * @public\n */\nexport const VisuallyHidden = (props: VisuallyHiddenProps) => {\n const { ownProps, restProps } = useDefinition(\n VisuallyHiddenDefinition,\n props,\n );\n const { classes } = ownProps;\n\n return <div className={classes.root} {...restProps} />;\n};\n"],"names":[],"mappings":";;;;AA6BO,MAAM,cAAA,GAAiB,CAAC,KAAA,KAA+B;AAC5D,EAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAU,GAAI,aAAA;AAAA,IAC9B,wBAAA;AAAA,IACA;AAAA,GACF;AACA,EAAA,MAAM,EAAE,SAAQ,GAAI,QAAA;AAEpB,EAAA,2BAAQ,KAAA,EAAA,EAAI,SAAA,EAAW,OAAA,CAAQ,IAAA,EAAO,GAAG,SAAA,EAAW,CAAA;AACtD;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"VisuallyHidden.module.css.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
1
+ {"version":3,"file":"VisuallyHidden.module.css.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"definition.esm.js","sources":["../../../src/components/VisuallyHidden/definition.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { defineComponent } from '../../hooks/useDefinition';\nimport type { VisuallyHiddenOwnProps } from './types';\nimport styles from './VisuallyHidden.module.css';\n\n/**\n * Component definition for VisuallyHidden\n * @public\n */\nexport const VisuallyHiddenDefinition =\n defineComponent<VisuallyHiddenOwnProps>()({\n styles,\n classNames: {\n root: 'bui-VisuallyHidden',\n },\n propDefs: {\n className: {},\n },\n });\n"],"names":[],"mappings":";;;;;;;;;;;;AAwBO,MAAM,wBAAA,GACX,iBAAwC,CAAE;AAAA,EACxC,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA,QAAA,EAAU;AAAA,IACR,WAAW;AAAC;AAEhB,CAAC;;;;"}
1
+ {"version":3,"file":"definition.esm.js","sources":["../../../src/components/VisuallyHidden/definition.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { defineComponent } from '../../hooks/useDefinition';\nimport type { VisuallyHiddenOwnProps } from './types';\nimport styles from './VisuallyHidden.module.css';\n\n/**\n * Component definition for VisuallyHidden\n * @public\n */\nexport const VisuallyHiddenDefinition =\n defineComponent<VisuallyHiddenOwnProps>()({\n styles,\n classNames: {\n root: 'bui-VisuallyHidden',\n },\n propDefs: {\n className: {},\n },\n });\n"],"names":[],"mappings":";;;;;;;;;;;;AAwBO,MAAM,wBAAA,GACX,iBAAwC,CAAE;AAAA,EACxC,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA,QAAA,EAAU;AAAA,IACR,WAAW;AAAC;AAEhB,CAAC;;"}
@@ -16,7 +16,6 @@
16
16
  * See the License for the specific language governing permissions and
17
17
  * limitations under the License.
18
18
  */
19
-
20
19
  /* Tokens */
21
20
  /*
22
21
  * Copyright 2024 The Backstage Authors
@@ -352,6 +351,7 @@
352
351
  }
353
352
 
354
353
  /* Base */
354
+
355
355
  /*! modern-normalize v3.0.1 | MIT License | https://github.com/sindresorhus/modern-normalize */
356
356
 
357
357
  /*
@@ -562,6 +562,7 @@ Add the correct display in Chrome and Safari.
562
562
  display: list-item;
563
563
  }
564
564
  }
565
+
565
566
  /*
566
567
  * Copyright 2024 The Backstage Authors
567
568
  *
@@ -650,6 +651,7 @@ Add the correct display in Chrome and Safari.
650
651
  /* Utilities */
651
652
 
652
653
  /* Padding */
654
+
653
655
  /*
654
656
  * Copyright 2025 The Backstage Authors
655
657
  *
@@ -1090,6 +1092,7 @@ Add the correct display in Chrome and Safari.
1090
1092
  }
1091
1093
  }
1092
1094
  }
1095
+
1093
1096
  /*
1094
1097
  * Copyright 2025 The Backstage Authors
1095
1098
  *
@@ -1530,6 +1533,7 @@ Add the correct display in Chrome and Safari.
1530
1533
  }
1531
1534
  }
1532
1535
  }
1536
+
1533
1537
  /*
1534
1538
  * Copyright 2025 The Backstage Authors
1535
1539
  *
@@ -1970,6 +1974,7 @@ Add the correct display in Chrome and Safari.
1970
1974
  }
1971
1975
  }
1972
1976
  }
1977
+
1973
1978
  /*
1974
1979
  * Copyright 2025 The Backstage Authors
1975
1980
  *
@@ -2410,6 +2415,7 @@ Add the correct display in Chrome and Safari.
2410
2415
  }
2411
2416
  }
2412
2417
  }
2418
+
2413
2419
  /*
2414
2420
  * Copyright 2025 The Backstage Authors
2415
2421
  *
@@ -2850,6 +2856,7 @@ Add the correct display in Chrome and Safari.
2850
2856
  }
2851
2857
  }
2852
2858
  }
2859
+
2853
2860
  /*
2854
2861
  * Copyright 2025 The Backstage Authors
2855
2862
  *
@@ -3392,6 +3399,7 @@ Add the correct display in Chrome and Safari.
3392
3399
  }
3393
3400
  }
3394
3401
  }
3402
+
3395
3403
  /*
3396
3404
  * Copyright 2025 The Backstage Authors
3397
3405
  *
@@ -3936,6 +3944,7 @@ Add the correct display in Chrome and Safari.
3936
3944
  }
3937
3945
 
3938
3946
  /* Margin */
3947
+
3939
3948
  /*
3940
3949
  * Copyright 2025 The Backstage Authors
3941
3950
  *
@@ -4376,6 +4385,7 @@ Add the correct display in Chrome and Safari.
4376
4385
  }
4377
4386
  }
4378
4387
  }
4388
+
4379
4389
  /*
4380
4390
  * Copyright 2025 The Backstage Authors
4381
4391
  *
@@ -4816,6 +4826,7 @@ Add the correct display in Chrome and Safari.
4816
4826
  }
4817
4827
  }
4818
4828
  }
4829
+
4819
4830
  /*
4820
4831
  * Copyright 2025 The Backstage Authors
4821
4832
  *
@@ -5256,6 +5267,7 @@ Add the correct display in Chrome and Safari.
5256
5267
  }
5257
5268
  }
5258
5269
  }
5270
+
5259
5271
  /*
5260
5272
  * Copyright 2025 The Backstage Authors
5261
5273
  *
@@ -5696,6 +5708,7 @@ Add the correct display in Chrome and Safari.
5696
5708
  }
5697
5709
  }
5698
5710
  }
5711
+
5699
5712
  /*
5700
5713
  * Copyright 2025 The Backstage Authors
5701
5714
  *
@@ -6136,6 +6149,7 @@ Add the correct display in Chrome and Safari.
6136
6149
  }
6137
6150
  }
6138
6151
  }
6152
+
6139
6153
  /*
6140
6154
  * Copyright 2025 The Backstage Authors
6141
6155
  *
@@ -6678,6 +6692,7 @@ Add the correct display in Chrome and Safari.
6678
6692
  }
6679
6693
  }
6680
6694
  }
6695
+
6681
6696
  /*
6682
6697
  * Copyright 2025 The Backstage Authors
6683
6698
  *
@@ -7222,6 +7237,7 @@ Add the correct display in Chrome and Safari.
7222
7237
  }
7223
7238
 
7224
7239
  /* Display */
7240
+
7225
7241
  /*
7226
7242
  * Copyright 2025 The Backstage Authors
7227
7243
  *
@@ -7352,6 +7368,7 @@ Add the correct display in Chrome and Safari.
7352
7368
  }
7353
7369
 
7354
7370
  /* Width */
7371
+
7355
7372
  /*
7356
7373
  * Copyright 2025 The Backstage Authors
7357
7374
  *
@@ -7458,6 +7475,7 @@ Add the correct display in Chrome and Safari.
7458
7475
  }
7459
7476
 
7460
7477
  /* Height */
7478
+
7461
7479
  /*
7462
7480
  * Copyright 2025 The Backstage Authors
7463
7481
  *
@@ -7564,6 +7582,7 @@ Add the correct display in Chrome and Safari.
7564
7582
  }
7565
7583
 
7566
7584
  /* Position */
7585
+
7567
7586
  /*
7568
7587
  * Copyright 2025 The Backstage Authors
7569
7588
  *
@@ -7718,6 +7737,7 @@ Add the correct display in Chrome and Safari.
7718
7737
  }
7719
7738
 
7720
7739
  /* Grid */
7740
+
7721
7741
  /*
7722
7742
  * Copyright 2025 The Backstage Authors
7723
7743
  *
@@ -9030,6 +9050,7 @@ Add the correct display in Chrome and Safari.
9030
9050
  }
9031
9051
 
9032
9052
  /* Gap */
9053
+
9033
9054
  /*
9034
9055
  * Copyright 2025 The Backstage Authors
9035
9056
  *
@@ -9472,6 +9493,7 @@ Add the correct display in Chrome and Safari.
9472
9493
  }
9473
9494
 
9474
9495
  /* Flex */
9496
+
9475
9497
  /*
9476
9498
  * Copyright 2025 The Backstage Authors
9477
9499
  *
@@ -1 +1 @@
1
- {"version":3,"file":"useBg.esm.js","sources":["../../src/hooks/useBg.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 { useContext, ReactNode } from 'react';\nimport {\n createVersionedContext,\n createVersionedValueMap,\n} from '@backstage/version-bridge';\nimport { ContainerBg, ProviderBg, Responsive } from '../types';\nimport { useBreakpoint } from './useBreakpoint';\nimport { resolveResponsiveValue } from './useDefinition/helpers';\n\n/** @public */\nexport interface BgContextValue {\n bg: ContainerBg | undefined;\n}\n\n/** @public */\nexport interface BgProviderProps {\n bg: ContainerBg;\n children: ReactNode;\n}\n\nconst BgContext = createVersionedContext<{\n 1: BgContextValue;\n}>('bg-context');\n\n/**\n * Increments a neutral bg level by one, capping at 'neutral-3'.\n * Intent backgrounds (danger, warning, success) pass through unchanged.\n *\n * The 'neutral-4' level is reserved for consumer component CSS and is\n * never set on providers.\n *\n * @internal\n */\nfunction incrementNeutralBg(bg: ContainerBg | undefined): ContainerBg {\n if (!bg) return 'neutral-1';\n if (bg === 'neutral-1') return 'neutral-2';\n if (bg === 'neutral-2') return 'neutral-3';\n if (bg === 'neutral-3') return 'neutral-3'; // capped at neutral-3\n // Intent values pass through unchanged\n return bg;\n}\n\n/**\n * Provider component that establishes the bg context for child components.\n *\n * @public\n */\nexport const BgProvider = ({ bg, children }: BgProviderProps) => {\n return (\n <BgContext.Provider value={createVersionedValueMap({ 1: { bg } })}>\n {children}\n </BgContext.Provider>\n );\n};\n\n/**\n * Resets the bg context to undefined, cutting any inherited neutral chain.\n * Use this inside overlay components (Popover, Tooltip, Dialog, Menu) so\n * their content always starts from neutral-1 regardless of where the trigger\n * is placed in the tree.\n *\n * @internal\n */\nexport const BgReset = ({ children }: { children: ReactNode }) => {\n return (\n <BgContext.Provider\n value={createVersionedValueMap({ 1: { bg: undefined } })}\n >\n {children}\n </BgContext.Provider>\n );\n};\n\n/**\n * Hook for consumer components (e.g. Button) to read the parent bg context.\n *\n * Returns the parent container's bg unchanged. The consumer component's CSS\n * handles the visual step-up (e.g. on a neutral-1 surface, the consumer\n * uses neutral-2 tokens via `data-on-bg`).\n *\n * @public\n */\nexport function useBgConsumer(): BgContextValue {\n const value = useContext(BgContext)?.atVersion(1);\n return value ?? { bg: undefined };\n}\n\n/**\n * Hook for provider components (e.g. Box, Card) to resolve and provide bg context.\n *\n * **Resolution rules:**\n *\n * - `bg` is `undefined` -- transparent, no context change, returns `{ bg: undefined }`.\n * This is the default for Box, Flex, and Grid (they do **not** auto-increment).\n * - `bg` is `'neutral'` -- when the parent bg is neutral, increments the neutral\n * level from the parent context, capping at `neutral-3`. When the parent bg is\n * an intent (`'danger'` | `'warning'` | `'success'`), the intent passes through\n * unchanged (i.e. `bg: 'neutral'` does not override the parent intent). The\n * increment is always relative to the parent; it is not possible to pin a\n * container to an explicit neutral level.\n * - `bg` is `'danger'` | `'warning'` | `'success'` -- sets the bg to that intent\n * explicitly, regardless of the parent value.\n *\n * **Capping:**\n *\n * Provider components cap at `neutral-3`. The `neutral-4` level is **not** a valid\n * prop value -- it exists only in consumer component CSS (e.g. a Button on a\n * `neutral-3` surface renders with `neutral-4` tokens via `data-on-bg`).\n *\n * The caller is responsible for wrapping children with `BgProvider` when the\n * resolved bg is defined.\n *\n * @public\n */\nexport function useBgProvider(bg?: Responsive<ProviderBg>): BgContextValue {\n const { breakpoint } = useBreakpoint();\n const context = useBgConsumer();\n\n if (bg === undefined) {\n return { bg: undefined };\n }\n\n const resolved = resolveResponsiveValue(bg, breakpoint);\n\n if (resolved === 'neutral') {\n return { bg: incrementNeutralBg(context.bg) };\n }\n\n return { bg: resolved };\n}\n"],"names":[],"mappings":";;;;;;AAoCA,MAAM,SAAA,GAAY,uBAEf,YAAY,CAAA;AAWf,SAAS,mBAAmB,EAAA,EAA0C;AACpE,EAAA,IAAI,CAAC,IAAI,OAAO,WAAA;AAChB,EAAA,IAAI,EAAA,KAAO,aAAa,OAAO,WAAA;AAC/B,EAAA,IAAI,EAAA,KAAO,aAAa,OAAO,WAAA;AAC/B,EAAA,IAAI,EAAA,KAAO,aAAa,OAAO,WAAA;AAE/B,EAAA,OAAO,EAAA;AACT;AAOO,MAAM,UAAA,GAAa,CAAC,EAAE,EAAA,EAAI,UAAS,KAAuB;AAC/D,EAAA,uBACE,GAAA,CAAC,SAAA,CAAU,QAAA,EAAV,EAAmB,KAAA,EAAO,uBAAA,CAAwB,EAAE,CAAA,EAAG,EAAE,EAAA,EAAG,EAAG,GAC7D,QAAA,EACH,CAAA;AAEJ;AAUO,MAAM,OAAA,GAAU,CAAC,EAAE,QAAA,EAAS,KAA+B;AAChE,EAAA,uBACE,GAAA;AAAA,IAAC,SAAA,CAAU,QAAA;AAAA,IAAV;AAAA,MACC,KAAA,EAAO,wBAAwB,EAAE,CAAA,EAAG,EAAE,EAAA,EAAI,MAAA,IAAa,CAAA;AAAA,MAEtD;AAAA;AAAA,GACH;AAEJ;AAWO,SAAS,aAAA,GAAgC;AAC9C,EAAA,MAAM,KAAA,GAAQ,UAAA,CAAW,SAAS,CAAA,EAAG,UAAU,CAAC,CAAA;AAChD,EAAA,OAAO,KAAA,IAAS,EAAE,EAAA,EAAI,MAAA,EAAU;AAClC;AA6BO,SAAS,cAAc,EAAA,EAA6C;AACzE,EAAA,MAAM,EAAE,UAAA,EAAW,GAAI,aAAA,EAAc;AACrC,EAAA,MAAM,UAAU,aAAA,EAAc;AAE9B,EAAA,IAAI,OAAO,MAAA,EAAW;AACpB,IAAA,OAAO,EAAE,IAAI,MAAA,EAAU;AAAA,EACzB;AAEA,EAAA,MAAM,QAAA,GAAW,sBAAA,CAAuB,EAAA,EAAI,UAAU,CAAA;AAEtD,EAAA,IAAI,aAAa,SAAA,EAAW;AAC1B,IAAA,OAAO,EAAE,EAAA,EAAI,kBAAA,CAAmB,OAAA,CAAQ,EAAE,CAAA,EAAE;AAAA,EAC9C;AAEA,EAAA,OAAO,EAAE,IAAI,QAAA,EAAS;AACxB;;;;"}
1
+ {"version":3,"file":"useBg.esm.js","sources":["../../src/hooks/useBg.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 { useContext, ReactNode } from 'react';\nimport {\n createVersionedContext,\n createVersionedValueMap,\n} from '@backstage/version-bridge';\nimport { ContainerBg, ProviderBg, Responsive } from '../types';\nimport { useBreakpoint } from './useBreakpoint';\nimport { resolveResponsiveValue } from './useDefinition/helpers';\n\n/** @public */\nexport interface BgContextValue {\n bg: ContainerBg | undefined;\n}\n\n/** @public */\nexport interface BgProviderProps {\n bg: ContainerBg;\n children: ReactNode;\n}\n\nconst BgContext = createVersionedContext<{\n 1: BgContextValue;\n}>('bg-context');\n\n/**\n * Increments a neutral bg level by one, capping at 'neutral-3'.\n * Intent backgrounds (danger, warning, success) pass through unchanged.\n *\n * The 'neutral-4' level is reserved for consumer component CSS and is\n * never set on providers.\n *\n * @internal\n */\nfunction incrementNeutralBg(bg: ContainerBg | undefined): ContainerBg {\n if (!bg) return 'neutral-1';\n if (bg === 'neutral-1') return 'neutral-2';\n if (bg === 'neutral-2') return 'neutral-3';\n if (bg === 'neutral-3') return 'neutral-3'; // capped at neutral-3\n // Intent values pass through unchanged\n return bg;\n}\n\n/**\n * Provider component that establishes the bg context for child components.\n *\n * @public\n */\nexport const BgProvider = ({ bg, children }: BgProviderProps) => {\n return (\n <BgContext.Provider value={createVersionedValueMap({ 1: { bg } })}>\n {children}\n </BgContext.Provider>\n );\n};\n\n/**\n * Resets the bg context to undefined, cutting any inherited neutral chain.\n * Use this inside overlay components (Popover, Tooltip, Dialog, Menu) so\n * their content always starts from neutral-1 regardless of where the trigger\n * is placed in the tree.\n *\n * @internal\n */\nexport const BgReset = ({ children }: { children: ReactNode }) => {\n return (\n <BgContext.Provider\n value={createVersionedValueMap({ 1: { bg: undefined } })}\n >\n {children}\n </BgContext.Provider>\n );\n};\n\n/**\n * Hook for consumer components (e.g. Button) to read the parent bg context.\n *\n * Returns the parent container's bg unchanged. The consumer component's CSS\n * handles the visual step-up (e.g. on a neutral-1 surface, the consumer\n * uses neutral-2 tokens via `data-on-bg`).\n *\n * @public\n */\nexport function useBgConsumer(): BgContextValue {\n const value = useContext(BgContext)?.atVersion(1);\n return value ?? { bg: undefined };\n}\n\n/**\n * Hook for provider components (e.g. Box, Card) to resolve and provide bg context.\n *\n * **Resolution rules:**\n *\n * - `bg` is `undefined` -- transparent, no context change, returns `{ bg: undefined }`.\n * This is the default for Box, Flex, and Grid (they do **not** auto-increment).\n * - `bg` is `'neutral'` -- when the parent bg is neutral, increments the neutral\n * level from the parent context, capping at `neutral-3`. When the parent bg is\n * an intent (`'danger'` | `'warning'` | `'success'`), the intent passes through\n * unchanged (i.e. `bg: 'neutral'` does not override the parent intent). The\n * increment is always relative to the parent; it is not possible to pin a\n * container to an explicit neutral level.\n * - `bg` is `'danger'` | `'warning'` | `'success'` -- sets the bg to that intent\n * explicitly, regardless of the parent value.\n *\n * **Capping:**\n *\n * Provider components cap at `neutral-3`. The `neutral-4` level is **not** a valid\n * prop value -- it exists only in consumer component CSS (e.g. a Button on a\n * `neutral-3` surface renders with `neutral-4` tokens via `data-on-bg`).\n *\n * The caller is responsible for wrapping children with `BgProvider` when the\n * resolved bg is defined.\n *\n * @public\n */\nexport function useBgProvider(bg?: Responsive<ProviderBg>): BgContextValue {\n const { breakpoint } = useBreakpoint();\n const context = useBgConsumer();\n\n if (bg === undefined) {\n return { bg: undefined };\n }\n\n const resolved = resolveResponsiveValue(bg, breakpoint);\n\n if (resolved === 'neutral') {\n return { bg: incrementNeutralBg(context.bg) };\n }\n\n return { bg: resolved };\n}\n"],"names":[],"mappings":";;;;;;AAoCA,MAAM,SAAA,GAAY,uBAEf,YAAY,CAAA;AAWf,SAAS,mBAAmB,EAAA,EAA0C;AACpE,EAAA,IAAI,CAAC,IAAI,OAAO,WA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C9C;AAEA,EAAA,OAAO,EAAE,IAAI,QAAA,EAAS;AACxB;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useBreakpoint.esm.js","sources":["../../src/hooks/useBreakpoint.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 */\nimport { useMemo } from 'react';\nimport { useSyncExternalStore } from 'use-sync-external-store/shim';\nimport type { Breakpoint } from '../types';\n\nexport const breakpoints: { name: string; id: Breakpoint; value: number }[] = [\n { name: 'Initial', id: 'initial', value: 0 },\n { name: 'Extra Small', id: 'xs', value: 640 },\n { name: 'Small', id: 'sm', value: 768 },\n { name: 'Medium', id: 'md', value: 1024 },\n { name: 'Large', id: 'lg', value: 1280 },\n { name: 'Extra Large', id: 'xl', value: 1536 },\n];\n\nconst breakpointIndex = new Map<Breakpoint, number>(\n breakpoints.map((bp, i) => [bp.id, i]),\n);\n\nfunction bpIndex(key: Breakpoint): number {\n return breakpointIndex.get(key) ?? 0;\n}\n\nconst IS_SERVER =\n typeof window === 'undefined' || typeof window.matchMedia === 'undefined';\n\nfunction computeBreakpoint(): Breakpoint {\n if (IS_SERVER) {\n return 'initial';\n }\n for (let i = breakpoints.length - 1; i >= 0; i--) {\n if (window.matchMedia(`(min-width: ${breakpoints[i].value}px)`).matches) {\n return breakpoints[i].id;\n }\n }\n return 'initial';\n}\n\n// --- Module-scoped singleton store ---\n// This is intentionally not a global singleton. Multiple copies of this module\n// (e.g. different package versions or module federation remotes) each get their\n// own store. This avoids cross-version coupling at the cost of a few extra\n// listeners, which is a fine trade-off.\n// `current` is initialized lazily on first client-side access.\n\nlet current: Breakpoint | undefined;\nconst listeners = new Set<() => void>();\nlet initialized = false;\n\nfunction ensureInitialized(): void {\n if (initialized || IS_SERVER) {\n return;\n }\n initialized = true;\n current = computeBreakpoint();\n\n // Register one listener per breakpoint. When any query fires, re-evaluate\n // all breakpoints to find the new active one. Notify subscribers only if\n // the active breakpoint actually changed.\n for (const bp of breakpoints) {\n const mql = window.matchMedia(`(min-width: ${bp.value}px)`);\n mql.addEventListener('change', () => {\n const next = computeBreakpoint();\n if (next !== current) {\n current = next;\n for (const cb of listeners) {\n cb();\n }\n }\n });\n }\n}\n\nfunction subscribe(callback: () => void): () => void {\n ensureInitialized();\n listeners.add(callback);\n return () => {\n listeners.delete(callback);\n };\n}\n\nfunction getSnapshot(): Breakpoint {\n ensureInitialized();\n return current ?? 'initial';\n}\n\nfunction getServerSnapshot(): Breakpoint {\n return 'initial';\n}\n\n/** @public */\nexport const useBreakpoint = () => {\n const breakpoint = useSyncExternalStore(\n subscribe,\n getSnapshot,\n getServerSnapshot,\n );\n\n return useMemo(\n () => ({\n breakpoint,\n up: (key: Breakpoint): boolean => bpIndex(breakpoint) >= bpIndex(key),\n down: (key: Breakpoint): boolean => bpIndex(breakpoint) < bpIndex(key),\n }),\n [breakpoint],\n );\n};\n"],"names":[],"mappings":";;;AAmBO,MAAM,WAAA,GAAiE;AAAA,EAC5E,EAAE,IAAA,EAAM,SAAA,EAAW,EAAA,EAAI,SAAA,EAAW,OAAO,CAAA,EAAE;AAAA,EAC3C,EAAE,IAAA,EAAM,aAAA,EAAe,EAAA,EAAI,IAAA,EAAM,OAAO,GAAA,EAAI;AAAA,EAC5C,EAAE,IAAA,EAAM,OAAA,EAAS,EAAA,EAAI,IAAA,EAAM,OAAO,GAAA,EAAI;AAAA,EACtC,EAAE,IAAA,EAAM,QAAA,EAAU,EAAA,EAAI,IAAA,EAAM,OAAO,IAAA,EAAK;AAAA,EACxC,EAAE,IAAA,EAAM,OAAA,EAAS,EAAA,EAAI,IAAA,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,CAAA,GAAA,CAAK,CAAA;AAC1D,IAAA,GAAA,CAAI,gBAAA,CAAiB,UAAU,MAAM;AACnC,MAAA,MAAM,OAAO,iBAAA,EAAkB;AAC/B,MAAA,IAAI,SAAS,OAAA,EAAS;AACpB,QAAA,OAAA,GAAU,IAAA;AACV,QAAA,KAAA,MAAW,MAAM,SAAA,EAAW;AAC1B,UAAA,EAAA,EAAG;AAAA,QACL;AAAA,MACF;AAAA,IACF,CAAC,CAAA;AAAA,EACH;AACF;AAEA,SAAS,UAAU,QAAA,EAAkC;AACnD,EAAA,iBAAA,EAAkB;AAClB,EAAA,SAAA,CAAU,IAAI,QAAQ,CAAA;AACtB,EAAA,OAAO,MAAM;AACX,IAAA,SAAA,CAAU,OAAO,QAAQ,CAAA;AAAA,EAC3B,CAAA;AACF;AAEA,SAAS,WAAA,GAA0B;AACjC,EAAA,iBAAA,EAAkB;AAClB,EAAA,OAAO,OAAA,IAAW,SAAA;AACpB;AAEA,SAAS,iBAAA,GAAgC;AACvC,EAAA,OAAO,SAAA;AACT;AAGO,MAAM,gBAAgB,MAAM;AACjC,EAAA,MAAM,UAAA,GAAa,oBAAA;AAAA,IACjB,SAAA;AAAA,IACA,WAAA;AAAA,IACA;AAAA,GACF;AAEA,EAAA,OAAO,OAAA;AAAA,IACL,OAAO;AAAA,MACL,UAAA;AAAA,MACA,IAAI,CAAC,GAAA,KAA6B,QAAQ,UAAU,CAAA,IAAK,QAAQ,GAAG,CAAA;AAAA,MACpE,MAAM,CAAC,GAAA,KAA6B,QAAQ,UAAU,CAAA,GAAI,QAAQ,GAAG;AAAA,KACvE,CAAA;AAAA,IACA,CAAC,UAAU;AAAA,GACb;AACF;;;;"}
1
+ {"version":3,"file":"useBreakpoint.esm.js","sources":["../../src/hooks/useBreakpoint.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 */\nimport { useMemo } from 'react';\nimport { useSyncExternalStore } from 'use-sync-external-store/shim';\nimport type { Breakpoint } from '../types';\n\nexport const breakpoints: { name: string; id: Breakpoint; value: number }[] = [\n { name: 'Initial', id: 'initial', value: 0 },\n { name: 'Extra Small', id: 'xs', value: 640 },\n { name: 'Small', id: 'sm', value: 768 },\n { name: 'Medium', id: 'md', value: 1024 },\n { name: 'Large', id: 'lg', value: 1280 },\n { name: 'Extra Large', id: 'xl', value: 1536 },\n];\n\nconst breakpointIndex = new Map<Breakpoint, number>(\n breakpoints.map((bp, i) => [bp.id, i]),\n);\n\nfunction bpIndex(key: Breakpoint): number {\n return breakpointIndex.get(key) ?? 0;\n}\n\nconst IS_SERVER =\n typeof window === 'undefined' || typeof window.matchMedia === 'undefined';\n\nfunction computeBreakpoint(): Breakpoint {\n if (IS_SERVER) {\n return 'initial';\n }\n for (let i = breakpoints.length - 1; i >= 0; i--) {\n if (window.matchMedia(`(min-width: ${breakpoints[i].value}px)`).matches) {\n return breakpoints[i].id;\n }\n }\n return 'initial';\n}\n\n// --- Module-scoped singleton store ---\n// This is intentionally not a global singleton. Multiple copies of this module\n// (e.g. different package versions or module federation remotes) each get their\n// own store. This avoids cross-version coupling at the cost of a few extra\n// listeners, which is a fine trade-off.\n// `current` is initialized lazily on first client-side access.\n\nlet current: Breakpoint | undefined;\nconst listeners = new Set<() => void>();\nlet initialized = false;\n\nfunction ensureInitialized(): void {\n if (initialized || IS_SERVER) {\n return;\n }\n initialized = true;\n current = computeBreakpoint();\n\n // Register one listener per breakpoint. When any query fires, re-evaluate\n // all breakpoints to find the new active one. Notify subscribers only if\n // the active breakpoint actually changed.\n for (const bp of breakpoints) {\n const mql = window.matchMedia(`(min-width: ${bp.value}px)`);\n mql.addEventListener('change', () => {\n const next = computeBreakpoint();\n if (next !== current) {\n current = next;\n for (const cb of listeners) {\n cb();\n }\n }\n });\n }\n}\n\nfunction subscribe(callback: () => void): () => void {\n ensureInitialized();\n listeners.add(callback);\n return () => {\n listeners.delete(callback);\n };\n}\n\nfunction getSnapshot(): Breakpoint {\n ensureInitialized();\n return current ?? 'initial';\n}\n\nfunction getServerSnapshot(): Breakpoint {\n return 'initial';\n}\n\n/** @public */\nexport const useBreakpoint = () => {\n const breakpoint = useSyncExternalStore(\n subscribe,\n getSnapshot,\n getServerSnapshot,\n );\n\n return useMemo(\n () => ({\n breakpoint,\n up: (key: Breakpoint): boolean => bpIndex(breakpoint) >= bpIndex(key),\n down: (key: Breakpoint): boolean => bpIndex(breakpoint) < bpIndex(key),\n }),\n [breakpoint],\n );\n};\n"],"names":[],"mappings":";;;AAmBO,MAAM,WAAA,GAAiE;AAAA,EAC5E,EAAE,IAAA,EAAM,SAAA,EAAW,EAAA,EAAI,SAAA,EAAW,OAAO,CAAA,EAAE;AAAA,EAC3C,EAAE,IAAA,EAAM,aAAA,EAAe,EAAA,EAAI,IAAA,EAAM,OAAO,GAAA,EAAI;AAAA,EAC5C,EAAE,IAAA,EAAM,OAAA,EAAS,EAAA,EAAI,IAAA,EAAM,OAAO,GAAA,EAAI;AAAA,EACtC,EAAE,IAAA,EAAM,QAAA,EAAU,EAAA,EAAI,IAAA,EAAM,OAAO,IAAA,EAAK;AAAA,EACxC,EAAE,IAAA,EAAM,OAAA,EAAS,EAAA,EAAI,IAAA,EAAM,OAAO,IAAA,EAAK;AAAA,EACvC,EAAE,IAAA,EAAM,aAAA,EAAe,EAAA,EAAI,IAAA,EAAM,OAAO,IAAA;AAC1C;AAEA,MAAM,kBAAkB,IAAI,GAAA;AAAA,EAC1B,WAAA,CAAY,IAAI,CAAC,EAAA,EAAI,MAAM,CAAC,EAAA,CAAG,EAAA,EAAI,CAAC,CAAC;AACvC,CAAA;AAE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QACL;AAAA,MACF;AAAA,IACF,CAAC,CAAA;AAAA,EACH;AACF;AAEA,SAAS,UAAU,QAAA,EAAkC;AACnD,EAAA,iBAAA,EAAkB;AAClB,EAAA,SAAA,CAAU,IAAI,QAAQ,CAAA;AACtB,EAAA,OAAO,MAAM;AACX,IAAA,SAAA,CAAU,OAAO,QAAQ,CAAA;AAAA,EAC3B,CAAA;AACF;AAEA,SAAS,WAAA,GAA0B;AACjC,EAAA,iBAAA,EAAkB;AAClB,EAAA,OAAO,OAAA,IAAW,SAAA;AACpB;AAEA,SAAS,iBAAA,GAAgC;AACvC,EAAA,OAAO,SAAA;AACT;AAGO,MAAM,gBAAgB,MAAM;AACjC,EAAA,MAAM,UAAA,GAAa,oBAAA;AAAA,IACjB,SAAA;AAAA,IACA,WAAA;AAAA,IACA;AAAA,GACF;AAEA,EAAA,OAAO,OAAA;AAAA,IACL,OAAO;AAAA,MACL,UAAA;AAAA,MACA,IAAI,CAAC,GAAA,KAA6B,QAAQ,UAAU,CAAA,IAAK,QAAQ,GAAG,CAAA;AAAA,MACpE,MAAM,CAAC,GAAA,KAA6B,QAAQ,UAAU,CAAA,GAAI,QAAQ,GAAG;AAAA,KACvE,CAAA;AAAA,IACA,CAAC,UAAU;AAAA,GACb;AACF;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useCollectionAdapter.esm.js","sources":["../../src/hooks/useCollectionAdapter.ts"],"sourcesContent":["/*\n * Copyright 2026 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useRef } from 'react';\nimport type { Key } from 'react-aria-components';\nimport type {\n AsyncListSource,\n CollectionItem,\n LoadingConfig,\n} from '../types/selectableCollection';\nimport { getItemKeys, isAsyncListSource } from '../utils/selectableCollection';\n\ntype CollectionAdapterSearch =\n | true\n | {\n mode?: 'client' | 'server';\n inputValue?: string;\n defaultInputValue?: string;\n onInputChange?: (value: string) => void;\n };\n\ntype UseCollectionAdapterProps<T extends CollectionItem> = {\n items: Iterable<T> | AsyncListSource<T>;\n selectedKeys?: Iterable<Key>;\n search?: CollectionAdapterSearch;\n loading?: LoadingConfig;\n retainSelectedItems?: boolean;\n};\n\n/** @internal */\nexport type CollectionAdapterResult<T extends CollectionItem> = {\n canonicalItems: T[];\n visibleIds?: Set<Key>;\n loading?: LoadingConfig;\n isStale: boolean;\n inputValue?: string;\n defaultInputValue?: string;\n onInputChange?: (value: string) => void;\n};\n\n/** @internal */\nexport function useCollectionAdapter<T extends CollectionItem>({\n items,\n selectedKeys = [],\n search,\n loading,\n retainSelectedItems = true,\n}: UseCollectionAdapterProps<T>): CollectionAdapterResult<T> {\n const retainedItems = useRef(new Map<Key, T>());\n let asyncSource: AsyncListSource<T> | undefined;\n let sourceItems: T[];\n\n if (isAsyncListSource(items)) {\n asyncSource = items;\n sourceItems = [...items.items];\n } else {\n sourceItems = Array.from(items);\n }\n\n const selectedIdSet = new Set(selectedKeys);\n const searchProps = typeof search === 'object' ? search : undefined;\n const isServerSearch = searchProps?.mode === 'server';\n\n for (const key of retainedItems.current.keys()) {\n if (!selectedIdSet.has(key)) {\n retainedItems.current.delete(key);\n }\n }\n\n for (const item of sourceItems) {\n if (selectedIdSet.has(item.id)) {\n retainedItems.current.set(item.id, item);\n }\n }\n\n const sourceIds = getItemKeys(sourceItems);\n const shouldRetainSelectedItems = isServerSearch && retainSelectedItems;\n let canonicalItems = sourceItems;\n let visibleIds: Set<Key> | undefined;\n\n if (shouldRetainSelectedItems) {\n const missingSelectedItems = Array.from(retainedItems.current.entries())\n .filter(([id]) => !sourceIds.has(id))\n .map(([, item]) => item);\n\n canonicalItems = [...sourceItems, ...missingSelectedItems];\n visibleIds = sourceIds;\n }\n\n let resolvedLoading = loading;\n if (asyncSource) {\n resolvedLoading = {\n state: asyncSource.loadingState,\n onLoadMore: asyncSource.loadMore,\n };\n }\n\n let inputValue = searchProps?.inputValue;\n let onInputChange = searchProps?.onInputChange;\n if (asyncSource && isServerSearch) {\n inputValue = asyncSource.filterText;\n onInputChange = asyncSource.setFilterText;\n }\n\n return {\n canonicalItems,\n visibleIds,\n loading: resolvedLoading,\n isStale:\n sourceItems.length > 0 &&\n (resolvedLoading?.state === 'filtering' ||\n resolvedLoading?.state === 'sorting'),\n inputValue,\n defaultInputValue: searchProps?.defaultInputValue,\n onInputChange,\n };\n}\n"],"names":[],"mappings":";;;AAsDO,SAAS,oBAAA,CAA+C;AAAA,EAC7D,KAAA;AAAA,EACA,eAAe,EAAC;AAAA,EAChB,MAAA;AAAA,EACA,OAAA;AAAA,EACA,mBAAA,GAAsB;AACxB,CAAA,EAA6D;AAC3D,EAAA,MAAM,aAAA,GAAgB,MAAA,iBAAO,IAAI,GAAA,EAAa,CAAA;AAC9C,EAAA,IAAI,WAAA;AACJ,EAAA,IAAI,WAAA;AAEJ,EAAA,IAAI,iBAAA,CAAkB,KAAK,CAAA,EAAG;AAC5B,IAAA,WAAA,GAAc,KAAA;AACd,IAAA,WAAA,GAAc,CAAC,GAAG,KAAA,CAAM,KAAK,CAAA;AAAA,EAC/B,CAAA,MAAO;AACL,IAAA,WAAA,GAAc,KAAA,CAAM,KAAK,KAAK,CAAA;AAAA,EAChC;AAEA,EAAA,MAAM,aAAA,GAAgB,IAAI,GAAA,CAAI,YAAY,CAAA;AAC1C,EAAA,MAAM,WAAA,GAAc,OAAO,MAAA,KAAW,QAAA,GAAW,MAAA,GAAS,MAAA;AAC1D,EAAA,MAAM,cAAA,GAAiB,aAAa,IAAA,KAAS,QAAA;AAE7C,EAAA,KAAA,MAAW,GAAA,IAAO,aAAA,CAAc,OAAA,CAAQ,IAAA,EAAK,EAAG;AAC9C,IAAA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,GAAa,WAAA,CAAY,UAAA;AACzB,IAAA,aAAA,GAAgB,WAAA,CAAY,aAAA;AAAA,EAC9B;AAEA,EAAA,OAAO;AAAA,IACL,cAAA;AAAA,IACA,UAAA;AAAA,IACA,OAAA,EAAS,eAAA;AAAA,IACT,OAAA,EACE,YAAY,MAAA,GAAS,CAAA,KACpB,iBAAiB,KAAA,KAAU,WAAA,IAC1B,iBAAiB,KAAA,KAAU,SAAA,CAAA;AAAA,IAC/B,UAAA;AAAA,IACA,mBAAmB,WAAA,EAAa,iBAAA;AAAA,IAChC;AAAA,GACF;AACF;;;;"}
1
+ {"version":3,"file":"useCollectionAdapter.esm.js","sources":["../../src/hooks/useCollectionAdapter.ts"],"sourcesContent":["/*\n * Copyright 2026 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useRef } from 'react';\nimport type { Key } from 'react-aria-components';\nimport type {\n AsyncListSource,\n CollectionItem,\n LoadingConfig,\n} from '../types/selectableCollection';\nimport { getItemKeys, isAsyncListSource } from '../utils/selectableCollection';\n\ntype CollectionAdapterSearch =\n | true\n | {\n mode?: 'client' | 'server';\n inputValue?: string;\n defaultInputValue?: string;\n onInputChange?: (value: string) => void;\n };\n\ntype UseCollectionAdapterProps<T extends CollectionItem> = {\n items: Iterable<T> | AsyncListSource<T>;\n selectedKeys?: Iterable<Key>;\n search?: CollectionAdapterSearch;\n loading?: LoadingConfig;\n retainSelectedItems?: boolean;\n};\n\n/** @internal */\nexport type CollectionAdapterResult<T extends CollectionItem> = {\n canonicalItems: T[];\n visibleIds?: Set<Key>;\n loading?: LoadingConfig;\n isStale: boolean;\n inputValue?: string;\n defaultInputValue?: string;\n onInputChange?: (value: string) => void;\n};\n\n/** @internal */\nexport function useCollectionAdapter<T extends CollectionItem>({\n items,\n selectedKeys = [],\n search,\n loading,\n retainSelectedItems = true,\n}: UseCollectionAdapterProps<T>): CollectionAdapterResult<T> {\n const retainedItems = useRef(new Map<Key, T>());\n let asyncSource: AsyncListSource<T> | undefined;\n let sourceItems: T[];\n\n if (isAsyncListSource(items)) {\n asyncSource = items;\n sourceItems = [...items.items];\n } else {\n sourceItems = Array.from(items);\n }\n\n const selectedIdSet = new Set(selectedKeys);\n const searchProps = typeof search === 'object' ? search : undefined;\n const isServerSearch = searchProps?.mode === 'server';\n\n for (const key of retainedItems.current.keys()) {\n if (!selectedIdSet.has(key)) {\n retainedItems.current.delete(key);\n }\n }\n\n for (const item of sourceItems) {\n if (selectedIdSet.has(item.id)) {\n retainedItems.current.set(item.id, item);\n }\n }\n\n const sourceIds = getItemKeys(sourceItems);\n const shouldRetainSelectedItems = isServerSearch && retainSelectedItems;\n let canonicalItems = sourceItems;\n let visibleIds: Set<Key> | undefined;\n\n if (shouldRetainSelectedItems) {\n const missingSelectedItems = Array.from(retainedItems.current.entries())\n .filter(([id]) => !sourceIds.has(id))\n .map(([, item]) => item);\n\n canonicalItems = [...sourceItems, ...missingSelectedItems];\n visibleIds = sourceIds;\n }\n\n let resolvedLoading = loading;\n if (asyncSource) {\n resolvedLoading = {\n state: asyncSource.loadingState,\n onLoadMore: asyncSource.loadMore,\n };\n }\n\n let inputValue = searchProps?.inputValue;\n let onInputChange = searchProps?.onInputChange;\n if (asyncSource && isServerSearch) {\n inputValue = asyncSource.filterText;\n onInputChange = asyncSource.setFilterText;\n }\n\n return {\n canonicalItems,\n visibleIds,\n loading: resolvedLoading,\n isStale:\n sourceItems.length > 0 &&\n (resolvedLoading?.state === 'filtering' ||\n resolvedLoading?.state === 'sorting'),\n inputValue,\n defaultInputValue: searchProps?.defaultInputValue,\n onInputChange,\n };\n}\n"],"names":[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Definition/defineComponent.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 {\n ComponentConfig,\n BgPropsConstraint,\n AnalyticsPropsConstraint,\n} from './types';\n\nexport function defineComponent<P extends Record<string, any>>() {\n return <\n const S extends Record<string, string>,\n const C extends ComponentConfig<P, S>,\n >(\n config: C &\n BgPropsConstraint<P, C['bg']> &\n AnalyticsPropsConstraint<P, C['analytics']>,\n ): C => config;\n}\n"],"names":[],"mappings":"AAsBO,SAAS,eAAA,GAAiD;AAC/D,EAAA,OAAO,CAIL,MAAA,KAGM,MAAA;AACV;;;;"}
1
+ {"version":3,"file":"defineComponent.esm.js","sources":["../../../src/hooks/useDefinition/defineComponent.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 {\n ComponentConfig,\n BgPropsConstraint,\n AnalyticsPropsConstraint,\n} from './types';\n\nexport function defineComponent<P extends Record<string, any>>() {\n return <\n const S extends Record<string, string>,\n const C extends ComponentConfig<P, S>,\n >(\n config: C &\n BgPropsConstraint<P, C['bg']> &\n AnalyticsPropsConstraint<P, C['analytics']>,\n ): C => config;\n}\n"],"names":[],"mappings":"AAsBO,SAAS,eAAA,GAAiD;AAC/D,EAAA,OAAO,CAIL,MAAA,KAGM,MAAA;AACV;;"}