@backstage/ui 0.12.0 → 0.13.0-next.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (189) hide show
  1. package/CHANGELOG.md +120 -0
  2. package/dist/components/Accordion/Accordion.esm.js +4 -2
  3. package/dist/components/Accordion/Accordion.esm.js.map +1 -1
  4. package/dist/components/Accordion/Accordion.module.css.esm.js +2 -2
  5. package/dist/components/Accordion/definition.esm.js +4 -2
  6. package/dist/components/Accordion/definition.esm.js.map +1 -1
  7. package/dist/components/Alert/definition.esm.js +1 -1
  8. package/dist/components/Avatar/Avatar.esm.js +8 -28
  9. package/dist/components/Avatar/Avatar.esm.js.map +1 -1
  10. package/dist/components/Avatar/definition.esm.js +17 -4
  11. package/dist/components/Avatar/definition.esm.js.map +1 -1
  12. package/dist/components/Box/definition.esm.js +1 -1
  13. package/dist/components/Button/definition.esm.js +2 -3
  14. package/dist/components/Button/definition.esm.js.map +1 -1
  15. package/dist/components/ButtonIcon/definition.esm.js +2 -3
  16. package/dist/components/ButtonIcon/definition.esm.js.map +1 -1
  17. package/dist/components/ButtonLink/definition.esm.js +2 -3
  18. package/dist/components/ButtonLink/definition.esm.js.map +1 -1
  19. package/dist/components/Card/Card.esm.js +1 -1
  20. package/dist/components/Card/Card.esm.js.map +1 -1
  21. package/dist/components/Card/definition.esm.js +1 -1
  22. package/dist/components/Checkbox/Checkbox.esm.js +10 -17
  23. package/dist/components/Checkbox/Checkbox.esm.js.map +1 -1
  24. package/dist/components/Checkbox/definition.esm.js +16 -5
  25. package/dist/components/Checkbox/definition.esm.js.map +1 -1
  26. package/dist/components/Container/Container.esm.js +8 -13
  27. package/dist/components/Container/Container.esm.js.map +1 -1
  28. package/dist/components/Container/Container.module.css.esm.js +2 -2
  29. package/dist/components/Container/definition.esm.js +16 -2
  30. package/dist/components/Container/definition.esm.js.map +1 -1
  31. package/dist/components/Dialog/Dialog.esm.js +26 -59
  32. package/dist/components/Dialog/Dialog.esm.js.map +1 -1
  33. package/dist/components/Dialog/Dialog.module.css.esm.js +2 -2
  34. package/dist/components/Dialog/definition.esm.js +52 -8
  35. package/dist/components/Dialog/definition.esm.js.map +1 -1
  36. package/dist/components/FieldError/FieldError.esm.js +4 -13
  37. package/dist/components/FieldError/FieldError.esm.js.map +1 -1
  38. package/dist/components/FieldError/definition.esm.js +14 -2
  39. package/dist/components/FieldError/definition.esm.js.map +1 -1
  40. package/dist/components/FieldLabel/FieldLabel.esm.js +14 -59
  41. package/dist/components/FieldLabel/FieldLabel.esm.js.map +1 -1
  42. package/dist/components/FieldLabel/definition.esm.js +19 -2
  43. package/dist/components/FieldLabel/definition.esm.js.map +1 -1
  44. package/dist/components/Flex/Flex.esm.js +11 -22
  45. package/dist/components/Flex/Flex.esm.js.map +1 -1
  46. package/dist/components/Flex/definition.esm.js +19 -13
  47. package/dist/components/Flex/definition.esm.js.map +1 -1
  48. package/dist/components/FullPage/FullPage.esm.js +4 -13
  49. package/dist/components/FullPage/FullPage.esm.js.map +1 -1
  50. package/dist/components/FullPage/definition.esm.js +14 -2
  51. package/dist/components/FullPage/definition.esm.js.map +1 -1
  52. package/dist/components/Grid/Grid.esm.js +19 -40
  53. package/dist/components/Grid/Grid.esm.js.map +1 -1
  54. package/dist/components/Grid/definition.esm.js +30 -26
  55. package/dist/components/Grid/definition.esm.js.map +1 -1
  56. package/dist/components/HeaderPage/HeaderPage.esm.js +38 -60
  57. package/dist/components/HeaderPage/HeaderPage.esm.js.map +1 -1
  58. package/dist/components/HeaderPage/definition.esm.js +18 -2
  59. package/dist/components/HeaderPage/definition.esm.js.map +1 -1
  60. package/dist/components/Link/Link.esm.js +6 -34
  61. package/dist/components/Link/Link.esm.js.map +1 -1
  62. package/dist/components/Link/definition.esm.js +20 -15
  63. package/dist/components/Link/definition.esm.js.map +1 -1
  64. package/dist/components/Menu/Menu.esm.js +162 -343
  65. package/dist/components/Menu/Menu.esm.js.map +1 -1
  66. package/dist/components/Menu/Menu.module.css.esm.js +2 -2
  67. package/dist/components/Menu/definition.esm.js +113 -17
  68. package/dist/components/Menu/definition.esm.js.map +1 -1
  69. package/dist/components/PasswordField/PasswordField.esm.js +17 -52
  70. package/dist/components/PasswordField/PasswordField.esm.js.map +1 -1
  71. package/dist/components/PasswordField/PasswordField.module.css.esm.js +2 -2
  72. package/dist/components/PasswordField/definition.esm.js +28 -11
  73. package/dist/components/PasswordField/definition.esm.js.map +1 -1
  74. package/dist/components/PluginHeader/PluginHeader.esm.js +33 -46
  75. package/dist/components/PluginHeader/PluginHeader.esm.js.map +1 -1
  76. package/dist/components/PluginHeader/PluginHeader.module.css.esm.js +2 -2
  77. package/dist/components/PluginHeader/definition.esm.js +21 -3
  78. package/dist/components/PluginHeader/definition.esm.js.map +1 -1
  79. package/dist/components/Popover/Popover.esm.js +24 -32
  80. package/dist/components/Popover/Popover.esm.js.map +1 -1
  81. package/dist/components/Popover/Popover.module.css.esm.js +2 -2
  82. package/dist/components/Popover/definition.esm.js +16 -2
  83. package/dist/components/Popover/definition.esm.js.map +1 -1
  84. package/dist/components/RadioGroup/RadioGroup.esm.js +25 -44
  85. package/dist/components/RadioGroup/RadioGroup.esm.js.map +1 -1
  86. package/dist/components/RadioGroup/RadioGroup.module.css.esm.js +2 -2
  87. package/dist/components/RadioGroup/definition.esm.js +30 -5
  88. package/dist/components/RadioGroup/definition.esm.js.map +1 -1
  89. package/dist/components/SearchField/SearchField.esm.js +25 -45
  90. package/dist/components/SearchField/SearchField.esm.js.map +1 -1
  91. package/dist/components/SearchField/SearchField.module.css.esm.js +2 -2
  92. package/dist/components/SearchField/definition.esm.js +20 -5
  93. package/dist/components/SearchField/definition.esm.js.map +1 -1
  94. package/dist/components/Select/Select.esm.js +14 -23
  95. package/dist/components/Select/Select.esm.js.map +1 -1
  96. package/dist/components/Select/Select.module.css.esm.js +2 -2
  97. package/dist/components/Select/SelectContent.esm.js +8 -31
  98. package/dist/components/Select/SelectContent.esm.js.map +1 -1
  99. package/dist/components/Select/SelectListBox.esm.js +21 -44
  100. package/dist/components/Select/SelectListBox.esm.js.map +1 -1
  101. package/dist/components/Select/SelectTrigger.esm.js +8 -14
  102. package/dist/components/Select/SelectTrigger.esm.js.map +1 -1
  103. package/dist/components/Select/definition.esm.js +67 -17
  104. package/dist/components/Select/definition.esm.js.map +1 -1
  105. package/dist/components/Skeleton/Skeleton.esm.js +9 -13
  106. package/dist/components/Skeleton/Skeleton.esm.js.map +1 -1
  107. package/dist/components/Skeleton/definition.esm.js +18 -2
  108. package/dist/components/Skeleton/definition.esm.js.map +1 -1
  109. package/dist/components/Switch/Switch.esm.js +7 -22
  110. package/dist/components/Switch/Switch.esm.js.map +1 -1
  111. package/dist/components/Switch/definition.esm.js +15 -2
  112. package/dist/components/Switch/definition.esm.js.map +1 -1
  113. package/dist/components/Table/components/Cell.esm.js +4 -17
  114. package/dist/components/Table/components/Cell.esm.js.map +1 -1
  115. package/dist/components/Table/components/CellProfile.esm.js +12 -41
  116. package/dist/components/Table/components/CellProfile.esm.js.map +1 -1
  117. package/dist/components/Table/components/CellText.esm.js +39 -73
  118. package/dist/components/Table/components/CellText.esm.js.map +1 -1
  119. package/dist/components/Table/components/Column.esm.js +8 -36
  120. package/dist/components/Table/components/Column.esm.js.map +1 -1
  121. package/dist/components/Table/components/Row.esm.js +9 -19
  122. package/dist/components/Table/components/Row.esm.js.map +1 -1
  123. package/dist/components/Table/components/Table.esm.js +7 -0
  124. package/dist/components/Table/components/Table.esm.js.map +1 -1
  125. package/dist/components/Table/components/TableBody.esm.js +4 -12
  126. package/dist/components/Table/components/TableBody.esm.js.map +1 -1
  127. package/dist/components/Table/components/TableHeader.esm.js +19 -29
  128. package/dist/components/Table/components/TableHeader.esm.js.map +1 -1
  129. package/dist/components/Table/components/TableRoot.esm.js +5 -7
  130. package/dist/components/Table/components/TableRoot.esm.js.map +1 -1
  131. package/dist/components/Table/definition.esm.js +97 -21
  132. package/dist/components/Table/definition.esm.js.map +1 -1
  133. package/dist/components/TablePagination/TablePagination.esm.js +24 -32
  134. package/dist/components/TablePagination/TablePagination.esm.js.map +1 -1
  135. package/dist/components/TablePagination/definition.esm.js +32 -2
  136. package/dist/components/TablePagination/definition.esm.js.map +1 -1
  137. package/dist/components/Tabs/Tabs.esm.js +40 -63
  138. package/dist/components/Tabs/Tabs.esm.js.map +1 -1
  139. package/dist/components/Tabs/TabsIndicators.esm.js +6 -18
  140. package/dist/components/Tabs/TabsIndicators.esm.js.map +1 -1
  141. package/dist/components/Tabs/definition.esm.js +62 -10
  142. package/dist/components/Tabs/definition.esm.js.map +1 -1
  143. package/dist/components/TagGroup/TagGroup.esm.js +36 -63
  144. package/dist/components/TagGroup/TagGroup.esm.js.map +1 -1
  145. package/dist/components/TagGroup/definition.esm.js +35 -8
  146. package/dist/components/TagGroup/definition.esm.js.map +1 -1
  147. package/dist/components/Text/Text.esm.js +6 -13
  148. package/dist/components/Text/Text.esm.js.map +1 -1
  149. package/dist/components/Text/definition.esm.js +18 -14
  150. package/dist/components/Text/definition.esm.js.map +1 -1
  151. package/dist/components/TextField/TextField.esm.js +16 -41
  152. package/dist/components/TextField/TextField.esm.js.map +1 -1
  153. package/dist/components/TextField/definition.esm.js +19 -6
  154. package/dist/components/TextField/definition.esm.js.map +1 -1
  155. package/dist/components/ToggleButton/ToggleButton.esm.js +11 -23
  156. package/dist/components/ToggleButton/ToggleButton.esm.js.map +1 -1
  157. package/dist/components/ToggleButton/definition.esm.js +17 -4
  158. package/dist/components/ToggleButton/definition.esm.js.map +1 -1
  159. package/dist/components/ToggleButtonGroup/ToggleButtonGroup.esm.js +5 -18
  160. package/dist/components/ToggleButtonGroup/ToggleButtonGroup.esm.js.map +1 -1
  161. package/dist/components/ToggleButtonGroup/definition.esm.js +14 -4
  162. package/dist/components/ToggleButtonGroup/definition.esm.js.map +1 -1
  163. package/dist/components/Tooltip/Tooltip.esm.js +24 -30
  164. package/dist/components/Tooltip/Tooltip.esm.js.map +1 -1
  165. package/dist/components/Tooltip/Tooltip.module.css.esm.js +2 -2
  166. package/dist/components/Tooltip/definition.esm.js +16 -2
  167. package/dist/components/Tooltip/definition.esm.js.map +1 -1
  168. package/dist/components/VisuallyHidden/VisuallyHidden.esm.js +4 -12
  169. package/dist/components/VisuallyHidden/VisuallyHidden.esm.js.map +1 -1
  170. package/dist/components/VisuallyHidden/definition.esm.js +14 -2
  171. package/dist/components/VisuallyHidden/definition.esm.js.map +1 -1
  172. package/dist/css/styles.css +2 -4
  173. package/dist/hooks/useBg.esm.js +11 -2
  174. package/dist/hooks/useBg.esm.js.map +1 -1
  175. package/dist/hooks/useBreakpoint.esm.js +67 -27
  176. package/dist/hooks/useBreakpoint.esm.js.map +1 -1
  177. package/dist/hooks/useDefinition/helpers.esm.js +24 -1
  178. package/dist/hooks/useDefinition/helpers.esm.js.map +1 -1
  179. package/dist/hooks/useDefinition/useDefinition.esm.js +12 -22
  180. package/dist/hooks/useDefinition/useDefinition.esm.js.map +1 -1
  181. package/dist/index.d.ts +860 -273
  182. package/dist/index.esm.js +2 -2
  183. package/package.json +6 -4
  184. package/dist/components/PluginHeader/PluginHeaderToolbar.esm.js +0 -94
  185. package/dist/components/PluginHeader/PluginHeaderToolbar.esm.js.map +0 -1
  186. package/dist/hooks/useMediaQuery.esm.js +0 -47
  187. package/dist/hooks/useMediaQuery.esm.js.map +0 -1
  188. package/dist/hooks/useStyles.esm.js +0 -53
  189. package/dist/hooks/useStyles.esm.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Menu.esm.js","sources":["../../../src/components/Menu/Menu.tsx"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n MenuTrigger as RAMenuTrigger,\n Popover as RAPopover,\n MenuItem as RAMenuItem,\n Menu as RAMenu,\n MenuSection as RAMenuSection,\n Header as RAMenuHeader,\n Separator as RAMenuSeparator,\n SubmenuTrigger as RAMenuSubmenuTrigger,\n Autocomplete as RAAutocomplete,\n SearchField as RASearchField,\n Input as RAInput,\n Button as RAButton,\n ListBox as RAListBox,\n ListBoxItem as RAListBoxItem,\n useFilter,\n Virtualizer,\n ListLayout,\n} from 'react-aria-components';\nimport { useStyles } from '../../hooks/useStyles';\nimport { MenuDefinition } from './definition';\nimport type {\n MenuTriggerProps,\n SubmenuTriggerProps,\n MenuProps,\n MenuAutocompleteProps,\n MenuItemProps,\n MenuSectionProps,\n MenuSeparatorProps,\n MenuListBoxProps,\n MenuListBoxItemProps,\n MenuAutocompleteListBoxProps,\n} from './types';\nimport {\n RiArrowRightSLine,\n RiCheckLine,\n RiCloseCircleLine,\n} from '@remixicon/react';\nimport {\n isInternalLink,\n createRoutingRegistration,\n} from '../InternalLinkProvider';\nimport styles from './Menu.module.css';\nimport clsx from 'clsx';\n\nconst { RoutingProvider, useRoutingRegistrationEffect } =\n createRoutingRegistration();\n\n// The height will be used for virtualized menus. It should match the size set in CSS for each menu item.\nconst rowHeight = 32;\n\nconst MenuEmptyState = () => {\n const { classNames } = useStyles(MenuDefinition);\n\n return (\n <div className={clsx(classNames.emptyState, styles[classNames.emptyState])}>\n No results found.\n </div>\n );\n};\n\n/** @public */\nexport const MenuTrigger = (props: MenuTriggerProps) => {\n return <RAMenuTrigger {...props} />;\n};\n\n/** @public */\nexport const SubmenuTrigger = (props: SubmenuTriggerProps) => {\n return <RAMenuSubmenuTrigger {...props} />;\n};\n\n/** @public */\nexport const Menu = (props: MenuProps<object>) => {\n const { classNames, cleanedProps } = useStyles(MenuDefinition, props);\n const {\n className,\n placement = 'bottom start',\n virtualized = false,\n maxWidth,\n maxHeight,\n style,\n ...rest\n } = cleanedProps;\n\n let newMaxWidth = maxWidth || (virtualized ? '260px' : 'undefined');\n\n const menuContent = (\n <RAMenu\n className={clsx(classNames.content, styles[classNames.content])}\n renderEmptyState={() => <MenuEmptyState />}\n style={{ width: newMaxWidth, maxHeight, ...style }}\n {...rest}\n />\n );\n\n return (\n <RoutingProvider>\n <RAPopover\n className={clsx(\n classNames.popover,\n styles[classNames.popover],\n className,\n )}\n placement={placement}\n >\n {virtualized ? (\n <Virtualizer\n layout={ListLayout}\n layoutOptions={{\n rowHeight,\n }}\n >\n {menuContent}\n </Virtualizer>\n ) : (\n menuContent\n )}\n </RAPopover>\n </RoutingProvider>\n );\n};\n\n/** @public */\nexport const MenuListBox = (props: MenuListBoxProps<object>) => {\n const { classNames, cleanedProps } = useStyles(MenuDefinition, props);\n const {\n className,\n selectionMode = 'single',\n placement = 'bottom start',\n virtualized = false,\n maxWidth,\n maxHeight,\n style,\n ...rest\n } = cleanedProps;\n let newMaxWidth = maxWidth || (virtualized ? '260px' : 'undefined');\n\n const listBoxContent = (\n <RAListBox\n className={clsx(classNames.content, styles[classNames.content])}\n selectionMode={selectionMode}\n style={{ width: newMaxWidth, maxHeight, ...style }}\n {...rest}\n />\n );\n\n return (\n <RAPopover\n className={clsx(\n classNames.popover,\n styles[classNames.popover],\n className,\n )}\n placement={placement}\n >\n {virtualized ? (\n <Virtualizer\n layout={ListLayout}\n layoutOptions={{\n rowHeight,\n }}\n >\n {listBoxContent}\n </Virtualizer>\n ) : (\n listBoxContent\n )}\n </RAPopover>\n );\n};\n\n/** @public */\nexport const MenuAutocomplete = (props: MenuAutocompleteProps<object>) => {\n const { classNames, cleanedProps } = useStyles(MenuDefinition, props);\n const {\n className,\n placement = 'bottom start',\n virtualized = false,\n maxWidth,\n maxHeight,\n style,\n ...rest\n } = cleanedProps;\n const { contains } = useFilter({ sensitivity: 'base' });\n let newMaxWidth = maxWidth || (virtualized ? '260px' : 'undefined');\n\n const menuContent = (\n <RAMenu\n className={clsx(classNames.content, styles[classNames.content])}\n renderEmptyState={() => <MenuEmptyState />}\n style={{ width: newMaxWidth, maxHeight, ...style }}\n {...rest}\n />\n );\n\n return (\n <RoutingProvider>\n <RAPopover\n className={clsx(\n classNames.popover,\n styles[classNames.popover],\n className,\n )}\n placement={placement}\n >\n <RAAutocomplete filter={contains}>\n <RASearchField\n className={clsx(\n classNames.searchField,\n styles[classNames.searchField],\n )}\n aria-label={props.placeholder || 'Search'}\n >\n <RAInput\n className={clsx(\n classNames.searchFieldInput,\n styles[classNames.searchFieldInput],\n )}\n placeholder={props.placeholder || 'Search...'}\n />\n <RAButton\n className={clsx(\n classNames.searchFieldClear,\n styles[classNames.searchFieldClear],\n )}\n >\n <RiCloseCircleLine />\n </RAButton>\n </RASearchField>\n {virtualized ? (\n <Virtualizer\n layout={ListLayout}\n layoutOptions={{\n rowHeight,\n }}\n >\n {menuContent}\n </Virtualizer>\n ) : (\n menuContent\n )}\n </RAAutocomplete>\n </RAPopover>\n </RoutingProvider>\n );\n};\n\n/** @public */\nexport const MenuAutocompleteListbox = (\n props: MenuAutocompleteListBoxProps<object>,\n) => {\n const { classNames, cleanedProps } = useStyles(MenuDefinition, props);\n const {\n className,\n selectionMode = 'single',\n placement = 'bottom start',\n virtualized = false,\n maxWidth,\n maxHeight,\n style,\n ...rest\n } = cleanedProps;\n const { contains } = useFilter({ sensitivity: 'base' });\n let newMaxWidth = maxWidth || (virtualized ? '260px' : 'undefined');\n\n const listBoxContent = (\n <RAListBox\n className={clsx(classNames.content, styles[classNames.content])}\n renderEmptyState={() => <MenuEmptyState />}\n selectionMode={selectionMode}\n style={{ width: newMaxWidth, maxHeight, ...style }}\n {...rest}\n />\n );\n\n return (\n <RAPopover\n className={clsx(\n classNames.popover,\n styles[classNames.popover],\n className,\n )}\n placement={placement}\n >\n <RAAutocomplete filter={contains}>\n <RASearchField\n className={clsx(\n classNames.searchField,\n styles[classNames.searchField],\n )}\n aria-label={props.placeholder || 'Search'}\n >\n <RAInput\n className={clsx(\n classNames.searchFieldInput,\n styles[classNames.searchFieldInput],\n )}\n placeholder={props.placeholder || 'Search...'}\n />\n <RAButton\n className={clsx(\n classNames.searchFieldClear,\n styles[classNames.searchFieldClear],\n )}\n >\n <RiCloseCircleLine />\n </RAButton>\n </RASearchField>\n {virtualized ? (\n <Virtualizer\n layout={ListLayout}\n layoutOptions={{\n rowHeight,\n }}\n >\n {listBoxContent}\n </Virtualizer>\n ) : (\n listBoxContent\n )}\n </RAAutocomplete>\n </RAPopover>\n );\n};\n\n/** @public */\nexport const MenuItem = (props: MenuItemProps) => {\n const { classNames, cleanedProps } = useStyles(MenuDefinition, props);\n const {\n className,\n iconStart,\n color = 'primary',\n children,\n href,\n ...rest\n } = cleanedProps;\n\n useRoutingRegistrationEffect(href);\n\n // External links open in new tab via window.open instead of client-side routing\n if (href && !isInternalLink(href)) {\n return (\n <RAMenuItem\n className={clsx(classNames.item, styles[classNames.item], className)}\n data-color={color}\n textValue={typeof children === 'string' ? children : undefined}\n onAction={() => window.open(href, '_blank', 'noopener,noreferrer')}\n {...rest}\n >\n <div\n className={clsx(\n classNames.itemWrapper,\n styles[classNames.itemWrapper],\n )}\n >\n <div\n className={clsx(\n classNames.itemContent,\n styles[classNames.itemContent],\n )}\n >\n {iconStart}\n {children}\n </div>\n <div\n className={clsx(classNames.itemArrow, styles[classNames.itemArrow])}\n >\n <RiArrowRightSLine />\n </div>\n </div>\n </RAMenuItem>\n );\n }\n\n return (\n <RAMenuItem\n className={clsx(classNames.item, styles[classNames.item], className)}\n data-color={color}\n href={href}\n textValue={typeof children === 'string' ? children : undefined}\n {...rest}\n >\n <div\n className={clsx(classNames.itemWrapper, styles[classNames.itemWrapper])}\n >\n <div\n className={clsx(\n classNames.itemContent,\n styles[classNames.itemContent],\n )}\n >\n {iconStart}\n {children}\n </div>\n <div\n className={clsx(classNames.itemArrow, styles[classNames.itemArrow])}\n >\n <RiArrowRightSLine />\n </div>\n </div>\n </RAMenuItem>\n );\n};\n\n/** @public */\nexport const MenuListBoxItem = (props: MenuListBoxItemProps) => {\n const { classNames, cleanedProps } = useStyles(MenuDefinition, props);\n const { children, className, ...rest } = cleanedProps;\n\n return (\n <RAListBoxItem\n textValue={\n typeof props.children === 'string' ? props.children : undefined\n }\n className={clsx(\n classNames.itemListBox,\n styles[classNames.itemListBox],\n className,\n )}\n {...rest}\n >\n <div\n className={clsx(classNames.itemWrapper, styles[classNames.itemWrapper])}\n >\n <div\n className={clsx(\n classNames.itemContent,\n styles[classNames.itemContent],\n )}\n >\n <div\n className={clsx(\n classNames.itemListBoxCheck,\n styles[classNames.itemListBoxCheck],\n )}\n >\n <RiCheckLine />\n </div>\n {children}\n </div>\n </div>\n </RAListBoxItem>\n );\n};\n\n/** @public */\nexport const MenuSection = (props: MenuSectionProps<object>) => {\n const { classNames, cleanedProps } = useStyles(MenuDefinition, props);\n const { children, className, title, ...rest } = cleanedProps;\n\n return (\n <RAMenuSection\n className={clsx(\n classNames.section,\n styles[classNames.section],\n className,\n )}\n {...rest}\n >\n <RAMenuHeader\n className={clsx(\n classNames.sectionHeader,\n styles[classNames.sectionHeader],\n )}\n >\n {title}\n </RAMenuHeader>\n {children}\n </RAMenuSection>\n );\n};\n\n/** @public */\nexport const MenuSeparator = (props: MenuSeparatorProps) => {\n const { classNames, cleanedProps } = useStyles(MenuDefinition, props);\n const { className, ...rest } = cleanedProps;\n\n return (\n <RAMenuSeparator\n className={clsx(\n classNames.separator,\n styles[classNames.separator],\n className,\n )}\n {...rest}\n />\n );\n};\n"],"names":["RAMenuTrigger","RAMenuSubmenuTrigger","RAMenu","RAPopover","RAListBox","RAAutocomplete","RASearchField","RAInput","RAButton","RAMenuItem","RAListBoxItem","RAMenuSection","RAMenuHeader","RAMenuSeparator"],"mappings":";;;;;;;;;AA6DA,MAAM,EAAE,eAAA,EAAiB,4BAAA,EAA6B,GACpD,yBAAA,EAA0B;AAG5B,MAAM,SAAA,GAAY,EAAA;AAElB,MAAM,iBAAiB,MAAM;AAC3B,EAAA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GACH;AAEJ;AAGO,MAAM,aAAA,GAAgB,CAAC,KAAA,KAA8B;AAC1D,EAAA,MAAM,EAAE,UAAA,EAAY,YAAA,EAAa,GAAI,SAAA,CAAU,gBAAgB,KAAK,CAAA;AACpE,EAAA,MAAM,EAAE,SAAA,EAAW,GAAG,IAAA,EAAK,GAAI,YAAA;AAE/B,EAAA,uBACE,GAAA;AAAA,IAACC,SAAA;AAAA,IAAA;AAAA,MACC,SAAA,EAAW,IAAA;AAAA,QACT,UAAA,CAAW,SAAA;AAAA,QACX,MAAA,CAAO,WAAW,SAAS,CAAA;AAAA,QAC3B;AAAA,OACF;AAAA,MACC,GAAG;AAAA;AAAA,GACN;AAEJ;;;;"}
1
+ {"version":3,"file":"Menu.esm.js","sources":["../../../src/components/Menu/Menu.tsx"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n MenuTrigger as RAMenuTrigger,\n Popover as RAPopover,\n MenuItem as RAMenuItem,\n Menu as RAMenu,\n MenuSection as RAMenuSection,\n Header as RAMenuHeader,\n Separator as RAMenuSeparator,\n SubmenuTrigger as RAMenuSubmenuTrigger,\n Autocomplete as RAAutocomplete,\n SearchField as RASearchField,\n Input as RAInput,\n Button as RAButton,\n ListBox as RAListBox,\n ListBoxItem as RAListBoxItem,\n useFilter,\n Virtualizer,\n ListLayout,\n} from 'react-aria-components';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport {\n MenuDefinition,\n MenuListBoxDefinition,\n MenuAutocompleteDefinition,\n MenuAutocompleteListboxDefinition,\n MenuItemDefinition,\n MenuListBoxItemDefinition,\n MenuSectionDefinition,\n MenuSeparatorDefinition,\n MenuEmptyStateDefinition,\n} from './definition';\nimport type {\n MenuTriggerProps,\n SubmenuTriggerProps,\n MenuProps,\n MenuAutocompleteProps,\n MenuItemProps,\n MenuSectionProps,\n MenuSeparatorProps,\n MenuListBoxProps,\n MenuListBoxItemProps,\n MenuAutocompleteListBoxProps,\n} from './types';\nimport {\n RiArrowRightSLine,\n RiCheckLine,\n RiCloseCircleLine,\n} from '@remixicon/react';\nimport {\n isInternalLink,\n createRoutingRegistration,\n} from '../InternalLinkProvider';\nimport { Box } from '../Box';\nimport { BgReset } from '../../hooks/useBg';\n\nconst { RoutingProvider, useRoutingRegistrationEffect } =\n createRoutingRegistration();\n\n// The height will be used for virtualized menus. It should match the size set in CSS for each menu item.\nconst rowHeight = 32;\n\nconst MenuEmptyState = () => {\n const { ownProps } = useDefinition(MenuEmptyStateDefinition, {});\n\n return <div className={ownProps.classes.root}>No results found.</div>;\n};\n\n/** @public */\nexport const MenuTrigger = (props: MenuTriggerProps) => {\n return <RAMenuTrigger {...props} />;\n};\n\n/** @public */\nexport const SubmenuTrigger = (props: SubmenuTriggerProps) => {\n return <RAMenuSubmenuTrigger {...props} />;\n};\n\n/** @public */\nexport const Menu = (props: MenuProps<object>) => {\n const { ownProps, restProps } = useDefinition(MenuDefinition, props);\n const { classes, placement, virtualized, maxWidth, maxHeight, style } =\n ownProps;\n\n let newMaxWidth = maxWidth || (virtualized ? '260px' : 'undefined');\n\n const menuContent = (\n <RAMenu\n className={classes.content}\n renderEmptyState={() => <MenuEmptyState />}\n style={{ width: newMaxWidth, maxHeight, ...style }}\n {...restProps}\n />\n );\n\n return (\n <RoutingProvider>\n <RAPopover className={classes.root} placement={placement}>\n <BgReset>\n <Box bg=\"neutral\" className={classes.inner}>\n {virtualized ? (\n <Virtualizer\n layout={ListLayout}\n layoutOptions={{\n rowHeight,\n }}\n >\n {menuContent}\n </Virtualizer>\n ) : (\n menuContent\n )}\n </Box>\n </BgReset>\n </RAPopover>\n </RoutingProvider>\n );\n};\n\n/** @public */\nexport const MenuListBox = (props: MenuListBoxProps<object>) => {\n const { ownProps, restProps } = useDefinition(MenuListBoxDefinition, props);\n const {\n classes,\n selectionMode,\n placement,\n virtualized,\n maxWidth,\n maxHeight,\n style,\n } = ownProps;\n let newMaxWidth = maxWidth || (virtualized ? '260px' : 'undefined');\n\n const listBoxContent = (\n <RAListBox\n className={classes.content}\n selectionMode={selectionMode}\n style={{ width: newMaxWidth, maxHeight, ...style }}\n {...restProps}\n />\n );\n\n return (\n <RAPopover className={classes.root} placement={placement}>\n <BgReset>\n <Box bg=\"neutral\" className={classes.inner}>\n {virtualized ? (\n <Virtualizer\n layout={ListLayout}\n layoutOptions={{\n rowHeight,\n }}\n >\n {listBoxContent}\n </Virtualizer>\n ) : (\n listBoxContent\n )}\n </Box>\n </BgReset>\n </RAPopover>\n );\n};\n\n/** @public */\nexport const MenuAutocomplete = (props: MenuAutocompleteProps<object>) => {\n const { ownProps, restProps } = useDefinition(\n MenuAutocompleteDefinition,\n props,\n );\n const {\n classes,\n placement,\n virtualized,\n maxWidth,\n maxHeight,\n style,\n placeholder,\n } = ownProps;\n const { contains } = useFilter({ sensitivity: 'base' });\n let newMaxWidth = maxWidth || (virtualized ? '260px' : 'undefined');\n\n const menuContent = (\n <RAMenu\n className={classes.content}\n renderEmptyState={() => <MenuEmptyState />}\n style={{ width: newMaxWidth, maxHeight, ...style }}\n {...restProps}\n />\n );\n\n return (\n <RoutingProvider>\n <RAPopover className={classes.root} placement={placement}>\n <BgReset>\n <Box bg=\"neutral\" className={classes.inner}>\n <RAAutocomplete filter={contains}>\n <RASearchField\n className={classes.searchField}\n aria-label={placeholder || 'Search'}\n >\n <RAInput\n className={classes.searchFieldInput}\n placeholder={placeholder || 'Search...'}\n />\n <RAButton className={classes.searchFieldClear}>\n <RiCloseCircleLine />\n </RAButton>\n </RASearchField>\n {virtualized ? (\n <Virtualizer\n layout={ListLayout}\n layoutOptions={{\n rowHeight,\n }}\n >\n {menuContent}\n </Virtualizer>\n ) : (\n menuContent\n )}\n </RAAutocomplete>\n </Box>\n </BgReset>\n </RAPopover>\n </RoutingProvider>\n );\n};\n\n/** @public */\nexport const MenuAutocompleteListbox = (\n props: MenuAutocompleteListBoxProps<object>,\n) => {\n const { ownProps, restProps } = useDefinition(\n MenuAutocompleteListboxDefinition,\n props,\n );\n const {\n classes,\n selectionMode,\n placement,\n virtualized,\n maxWidth,\n maxHeight,\n style,\n placeholder,\n } = ownProps;\n const { contains } = useFilter({ sensitivity: 'base' });\n let newMaxWidth = maxWidth || (virtualized ? '260px' : 'undefined');\n\n const listBoxContent = (\n <RAListBox\n className={classes.content}\n renderEmptyState={() => <MenuEmptyState />}\n selectionMode={selectionMode}\n style={{ width: newMaxWidth, maxHeight, ...style }}\n {...restProps}\n />\n );\n\n return (\n <RAPopover className={classes.root} placement={placement}>\n <BgReset>\n <Box bg=\"neutral\" className={classes.inner}>\n <RAAutocomplete filter={contains}>\n <RASearchField\n className={classes.searchField}\n aria-label={placeholder || 'Search'}\n >\n <RAInput\n className={classes.searchFieldInput}\n placeholder={placeholder || 'Search...'}\n />\n <RAButton className={classes.searchFieldClear}>\n <RiCloseCircleLine />\n </RAButton>\n </RASearchField>\n {virtualized ? (\n <Virtualizer\n layout={ListLayout}\n layoutOptions={{\n rowHeight,\n }}\n >\n {listBoxContent}\n </Virtualizer>\n ) : (\n listBoxContent\n )}\n </RAAutocomplete>\n </Box>\n </BgReset>\n </RAPopover>\n );\n};\n\n/** @public */\nexport const MenuItem = (props: MenuItemProps) => {\n const { ownProps, restProps, dataAttributes } = useDefinition(\n MenuItemDefinition,\n props,\n );\n const { classes, iconStart, children, href } = ownProps;\n\n useRoutingRegistrationEffect(href);\n\n // External links open in new tab via window.open instead of client-side routing\n if (href && !isInternalLink(href)) {\n return (\n <RAMenuItem\n className={classes.root}\n {...dataAttributes}\n textValue={typeof children === 'string' ? children : undefined}\n onAction={() => window.open(href, '_blank', 'noopener,noreferrer')}\n {...restProps}\n >\n <div className={classes.itemWrapper}>\n <div className={classes.itemContent}>\n {iconStart}\n {children}\n </div>\n <div className={classes.itemArrow}>\n <RiArrowRightSLine />\n </div>\n </div>\n </RAMenuItem>\n );\n }\n\n return (\n <RAMenuItem\n className={classes.root}\n {...dataAttributes}\n href={href}\n textValue={typeof children === 'string' ? children : undefined}\n {...restProps}\n >\n <div className={classes.itemWrapper}>\n <div className={classes.itemContent}>\n {iconStart}\n {children}\n </div>\n <div className={classes.itemArrow}>\n <RiArrowRightSLine />\n </div>\n </div>\n </RAMenuItem>\n );\n};\n\n/** @public */\nexport const MenuListBoxItem = (props: MenuListBoxItemProps) => {\n const { ownProps, restProps } = useDefinition(\n MenuListBoxItemDefinition,\n props,\n );\n const { classes, children } = ownProps;\n\n return (\n <RAListBoxItem\n textValue={typeof children === 'string' ? children : undefined}\n className={classes.root}\n {...restProps}\n >\n <div className={classes.itemWrapper}>\n <div className={classes.itemContent}>\n <div className={classes.check}>\n <RiCheckLine />\n </div>\n {children}\n </div>\n </div>\n </RAListBoxItem>\n );\n};\n\n/** @public */\nexport const MenuSection = (props: MenuSectionProps<object>) => {\n const { ownProps, restProps } = useDefinition(MenuSectionDefinition, props);\n const { classes, children, title } = ownProps;\n\n return (\n <RAMenuSection className={classes.root} {...restProps}>\n <RAMenuHeader className={classes.header}>{title}</RAMenuHeader>\n {children}\n </RAMenuSection>\n );\n};\n\n/** @public */\nexport const MenuSeparator = (props: MenuSeparatorProps) => {\n const { ownProps, restProps } = useDefinition(MenuSeparatorDefinition, props);\n\n return <RAMenuSeparator className={ownProps.classes.root} {...restProps} />;\n};\n"],"names":["RAMenuTrigger","RAMenuSubmenuTrigger","RAMenu","RAPopover","RAListBox","RAAutocomplete","RASearchField","RAInput","RAButton","RAMenuItem","RAListBoxItem","RAMenuSection","RAMenuHeader","RAMenuSeparator"],"mappings":";;;;;;;;;;AAuEA,MAAM,EAAE,eAAA,EAAiB,4BAAA,EAA6B,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AA;AAC1E,EAAA,MAAM,EAAE,OAAA,EAAS,QAAA,EAAU,KAAA,EAAM,GAAI,QAAA;AAErC,EAAA,4BACGC,aAAA,EAAA,EAAc,SAAA,EAAW,OAAA,CAAQ,IAAA,EAAO,GAAG,SAAA,EAC1C,QAAA,EAAA;AAAA,oBAAA,GAAA,CAACC,MAAA,EAAA,EAAa,SAAA,EAAW,OAAA,CAAQ,MAAA,EAAS,QAAA,EAAA,KAAA,EAAM,CAAA;AAAA,IAC/C;AAAA,GAAA,EACH,CAAA;AAEJ;AAGO,MAAM,aAAA,GAAgB,CAAC,KAAA,KAA8B;AAC1D,EAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAU,GAAI,aAAA,CAAc,yBAAyB,KAAK,CAAA;AAE5E,EAAA,2BAAQC,SAAA,EAAA,EAAgB,SAAA,EAAW,SAAS,OAAA,CAAQ,IAAA,EAAO,GAAG,SAAA,EAAW,CAAA;AAC3E;;;;"}
@@ -1,7 +1,7 @@
1
1
  import styleInject from '../../node_modules_dist/style-inject/dist/style-inject.es.esm.js';
2
2
 
3
- var css_248z = "/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n@layer tokens, base, components, utilities;\n\n@layer components {\n .Menu_bui-MenuPopover__3ab632bf18 {\n display: flex;\n flex-direction: column;\n box-shadow: var(--bui-shadow);\n border: 1px solid var(--bui-border-1);\n border-radius: var(--bui-radius-2);\n background: var(--bui-bg-popover);\n color: var(--bui-fg-primary);\n outline: none;\n transition: transform 200ms, opacity 200ms;\n /* Let React Aria handle height constraints naturally */\n min-height: 0;\n /* Remove overflow from popover since ScrollArea will handle it */\n overflow: hidden;\n\n &[data-entering],\n &[data-exiting] {\n transform: var(--origin);\n opacity: 0;\n }\n\n &[data-placement='top'] {\n --origin: translateY(8px);\n }\n\n &[data-placement='bottom'] {\n --origin: translateY(-8px);\n }\n\n &[data-placement='right'] {\n --origin: translateX(-8px);\n }\n\n &[data-placement='left'] {\n --origin: translateX(8px);\n }\n }\n\n .Menu_bui-MenuContent__3ab632bf18 {\n max-height: inherit;\n box-sizing: border-box;\n overflow: auto;\n min-width: 150px;\n box-sizing: border-box;\n outline: none;\n padding-block: var(--bui-space-1);\n }\n\n .Menu_bui-MenuItem__3ab632bf18 {\n padding-inline: var(--bui-space-1);\n display: block;\n\n &[data-focused] .Menu_bui-MenuItemWrapper__3ab632bf18 {\n background: var(--bui-bg-neutral-2);\n color: var(--bui-fg-primary);\n }\n\n &[data-open] .Menu_bui-MenuItemWrapper__3ab632bf18 {\n background: var(--bui-bg-neutral-2);\n color: var(--bui-fg-primary);\n }\n\n &[data-color='danger'] .Menu_bui-MenuItemWrapper__3ab632bf18 {\n color: var(--bui-fg-danger);\n }\n\n &[data-color='danger'][data-focused] .Menu_bui-MenuItemWrapper__3ab632bf18 {\n background: var(--bui-bg-danger);\n color: var(--bui-fg-danger);\n }\n\n &[data-has-submenu] {\n & > .Menu_bui-MenuItemWrapper__3ab632bf18 > .Menu_bui-MenuItemArrow__3ab632bf18 {\n display: block;\n }\n }\n }\n\n .Menu_bui-MenuItemWrapper__3ab632bf18 {\n display: flex;\n align-items: center;\n justify-content: space-between;\n height: 2rem;\n padding-inline: var(--bui-space-2);\n border-radius: var(--bui-radius-2);\n outline: none;\n cursor: default;\n color: var(--bui-fg-primary);\n font-size: var(--bui-font-size-3);\n gap: var(--bui-space-6);\n }\n\n .Menu_bui-MenuItemListBox__3ab632bf18 {\n padding-inline: var(--bui-space-1);\n display: block;\n\n &:hover .Menu_bui-MenuItemWrapper__3ab632bf18 {\n background: var(--bui-bg-neutral-2);\n color: var(--bui-fg-primary);\n }\n\n &[data-selected] .Menu_bui-MenuItemListBoxCheck__3ab632bf18 {\n & > svg {\n opacity: 1;\n color: var(--bui-fg-primary);\n }\n }\n }\n\n .Menu_bui-MenuItemListBoxCheck__3ab632bf18 {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 1rem;\n height: 1rem;\n\n & > svg {\n opacity: 0;\n width: 1rem;\n height: 1rem;\n }\n }\n\n .Menu_bui-MenuItemContent__3ab632bf18 {\n display: flex;\n align-items: center;\n gap: var(--bui-space-2);\n\n & > svg {\n width: 1rem;\n height: 1rem;\n }\n }\n\n .Menu_bui-MenuItemArrow__3ab632bf18 {\n display: none;\n width: 1rem;\n height: 1rem;\n\n & > svg {\n width: 1rem;\n height: 1rem;\n }\n }\n\n .Menu_bui-MenuSection__3ab632bf18 {\n &:first-child .Menu_bui-MenuSectionHeader__3ab632bf18 {\n padding-top: 0;\n }\n }\n\n .Menu_bui-MenuSectionHeader__3ab632bf18 {\n height: 2rem;\n display: flex;\n align-items: center;\n padding-top: var(--bui-space-3);\n padding-left: var(--bui-space-3);\n color: var(--bui-fg-primary);\n font-size: var(--bui-font-size-1);\n font-weight: bold;\n letter-spacing: 0.05rem;\n text-transform: uppercase;\n }\n\n .Menu_bui-MenuSeparator__3ab632bf18 {\n height: 1px;\n background: var(--bui-border-1);\n margin-inline: var(--bui-space-1_5);\n margin-block: var(--bui-space-1);\n }\n\n .Menu_bui-MenuSearchField__3ab632bf18 {\n font-family: var(--bui-font-regular);\n width: 100%;\n flex-shrink: 0;\n display: flex;\n align-items: center;\n border-bottom: 1px solid var(--bui-border-1);\n background-color: var(--bui-bg-neutral-1);\n height: 2rem;\n\n &[data-empty] {\n .Menu_bui-MenuSearchFieldClear__3ab632bf18 {\n visibility: hidden;\n }\n }\n }\n\n .Menu_bui-MenuSearchFieldInput__3ab632bf18 {\n flex: 1;\n display: flex;\n align-items: center;\n padding: 0;\n border: none;\n background-color: transparent;\n font-size: var(--bui-font-size-3);\n font-family: var(--bui-font-regular);\n font-weight: var(--bui-font-weight-regular);\n color: var(--bui-fg-primary);\n width: 100%;\n height: 100%;\n outline: none;\n cursor: inherit;\n\n &::-webkit-search-cancel-button,\n &::-webkit-search-decoration {\n -webkit-appearance: none;\n }\n\n &::placeholder {\n color: var(--bui-fg-secondary);\n }\n\n &:first-child {\n padding-inline: var(--bui-space-3) 0;\n }\n }\n\n .Menu_bui-MenuSearchFieldClear__3ab632bf18 {\n flex: 0 0 auto;\n display: grid;\n place-content: center;\n background-color: transparent;\n border: none;\n padding: 0;\n margin: 0;\n cursor: pointer;\n color: var(--bui-fg-secondary);\n transition: color 0.2s ease-in-out;\n width: 2rem;\n height: 2rem;\n\n &:hover {\n color: var(--bui-fg-primary);\n }\n\n & > svg {\n width: 1rem;\n height: 1rem;\n }\n }\n\n .Menu_bui-MenuEmptyState__3ab632bf18 {\n padding-inline: var(--bui-space-3);\n padding-block: var(--bui-space-2);\n color: var(--bui-fg-secondary);\n font-size: var(--bui-font-size-3);\n font-family: var(--bui-font-regular);\n font-weight: var(--bui-font-weight-regular);\n }\n}\n";
4
- var styles = {"bui-MenuPopover":"Menu_bui-MenuPopover__3ab632bf18","bui-MenuContent":"Menu_bui-MenuContent__3ab632bf18","bui-MenuItem":"Menu_bui-MenuItem__3ab632bf18","bui-MenuItemWrapper":"Menu_bui-MenuItemWrapper__3ab632bf18","bui-MenuItemArrow":"Menu_bui-MenuItemArrow__3ab632bf18","bui-MenuItemListBox":"Menu_bui-MenuItemListBox__3ab632bf18","bui-MenuItemListBoxCheck":"Menu_bui-MenuItemListBoxCheck__3ab632bf18","bui-MenuItemContent":"Menu_bui-MenuItemContent__3ab632bf18","bui-MenuSection":"Menu_bui-MenuSection__3ab632bf18","bui-MenuSectionHeader":"Menu_bui-MenuSectionHeader__3ab632bf18","bui-MenuSeparator":"Menu_bui-MenuSeparator__3ab632bf18","bui-MenuSearchField":"Menu_bui-MenuSearchField__3ab632bf18","bui-MenuSearchFieldClear":"Menu_bui-MenuSearchFieldClear__3ab632bf18","bui-MenuSearchFieldInput":"Menu_bui-MenuSearchFieldInput__3ab632bf18","bui-MenuEmptyState":"Menu_bui-MenuEmptyState__3ab632bf18"};
3
+ var css_248z = "/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n@layer tokens, base, components, utilities;\n\n@layer components {\n .Menu_bui-MenuPopover__4a32956efb {\n --menu-border-radius: var(--bui-radius-2);\n display: flex;\n flex-direction: column;\n box-shadow: var(--bui-shadow);\n border: 1px solid var(--bui-border-1);\n border-radius: var(--menu-border-radius);\n background: var(--bui-bg-app);\n color: var(--bui-fg-primary);\n outline: none;\n transition: transform 200ms, opacity 200ms;\n /* Let React Aria handle height constraints naturally */\n min-height: 0;\n /* Remove overflow from popover since ScrollArea will handle it */\n overflow: hidden;\n\n &[data-entering],\n &[data-exiting] {\n transform: var(--origin);\n opacity: 0;\n }\n\n &[data-placement='top'] {\n --origin: translateY(8px);\n }\n\n &[data-placement='bottom'] {\n --origin: translateY(-8px);\n }\n\n &[data-placement='right'] {\n --origin: translateX(-8px);\n }\n\n &[data-placement='left'] {\n --origin: translateX(8px);\n }\n }\n\n .Menu_bui-MenuInner__4a32956efb {\n border-radius: var(--menu-border-radius);\n display: flex;\n flex-direction: column;\n min-height: 0;\n overflow: hidden;\n }\n\n .Menu_bui-MenuContent__4a32956efb {\n max-height: inherit;\n box-sizing: border-box;\n overflow: auto;\n min-width: 150px;\n box-sizing: border-box;\n outline: none;\n padding-block: var(--bui-space-1);\n }\n\n .Menu_bui-MenuItem__4a32956efb {\n padding-inline: var(--bui-space-1);\n display: block;\n\n &:focus-visible {\n outline: none;\n }\n\n &[data-focus-visible] {\n outline: 2px solid var(--bui-ring);\n outline-offset: -2px;\n }\n\n &[data-focused] .Menu_bui-MenuItemWrapper__4a32956efb {\n background: var(--bui-bg-neutral-2);\n color: var(--bui-fg-primary);\n }\n\n &[data-open] .Menu_bui-MenuItemWrapper__4a32956efb {\n background: var(--bui-bg-neutral-2);\n color: var(--bui-fg-primary);\n }\n\n &[data-color='danger'] .Menu_bui-MenuItemWrapper__4a32956efb {\n color: var(--bui-fg-danger);\n }\n\n &[data-color='danger'][data-focused] .Menu_bui-MenuItemWrapper__4a32956efb {\n background: var(--bui-bg-danger);\n color: var(--bui-fg-danger);\n }\n\n &[data-has-submenu] {\n & > .Menu_bui-MenuItemWrapper__4a32956efb > .Menu_bui-MenuItemArrow__4a32956efb {\n display: block;\n }\n }\n }\n\n .Menu_bui-MenuItemWrapper__4a32956efb {\n display: flex;\n align-items: center;\n justify-content: space-between;\n height: 2rem;\n padding-inline: var(--bui-space-2);\n border-radius: var(--bui-radius-2);\n outline: none;\n cursor: default;\n color: var(--bui-fg-primary);\n font-size: var(--bui-font-size-3);\n gap: var(--bui-space-6);\n }\n\n .Menu_bui-MenuItemListBox__4a32956efb {\n padding-inline: var(--bui-space-1);\n display: block;\n\n &:hover .Menu_bui-MenuItemWrapper__4a32956efb {\n background: var(--bui-bg-neutral-2);\n color: var(--bui-fg-primary);\n }\n\n &[data-selected] .Menu_bui-MenuItemListBoxCheck__4a32956efb {\n & > svg {\n opacity: 1;\n color: var(--bui-fg-primary);\n }\n }\n }\n\n .Menu_bui-MenuItemListBoxCheck__4a32956efb {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 1rem;\n height: 1rem;\n\n & > svg {\n opacity: 0;\n width: 1rem;\n height: 1rem;\n }\n }\n\n .Menu_bui-MenuItemContent__4a32956efb {\n display: flex;\n align-items: center;\n gap: var(--bui-space-2);\n\n & > svg {\n width: 1rem;\n height: 1rem;\n }\n }\n\n .Menu_bui-MenuItemArrow__4a32956efb {\n display: none;\n width: 1rem;\n height: 1rem;\n\n & > svg {\n width: 1rem;\n height: 1rem;\n }\n }\n\n .Menu_bui-MenuSection__4a32956efb {\n &:first-child .Menu_bui-MenuSectionHeader__4a32956efb {\n padding-top: 0;\n }\n }\n\n .Menu_bui-MenuSectionHeader__4a32956efb {\n height: 2rem;\n display: flex;\n align-items: center;\n padding-top: var(--bui-space-3);\n padding-left: var(--bui-space-3);\n color: var(--bui-fg-primary);\n font-size: var(--bui-font-size-1);\n font-weight: bold;\n letter-spacing: 0.05rem;\n text-transform: uppercase;\n }\n\n .Menu_bui-MenuSeparator__4a32956efb {\n height: 1px;\n background: var(--bui-border-1);\n margin-inline: var(--bui-space-1_5);\n margin-block: var(--bui-space-1);\n }\n\n .Menu_bui-MenuSearchField__4a32956efb {\n font-family: var(--bui-font-regular);\n width: 100%;\n flex-shrink: 0;\n display: flex;\n align-items: center;\n border-bottom: 1px solid var(--bui-border-1);\n background-color: var(--bui-bg-neutral-1);\n height: 2rem;\n\n &[data-empty] {\n .Menu_bui-MenuSearchFieldClear__4a32956efb {\n visibility: hidden;\n }\n }\n }\n\n .Menu_bui-MenuSearchFieldInput__4a32956efb {\n flex: 1;\n display: flex;\n align-items: center;\n padding: 0;\n border: none;\n background-color: transparent;\n font-size: var(--bui-font-size-3);\n font-family: var(--bui-font-regular);\n font-weight: var(--bui-font-weight-regular);\n color: var(--bui-fg-primary);\n width: 100%;\n height: 100%;\n outline: none;\n cursor: inherit;\n\n &::-webkit-search-cancel-button,\n &::-webkit-search-decoration {\n -webkit-appearance: none;\n }\n\n &::placeholder {\n color: var(--bui-fg-secondary);\n }\n\n &:first-child {\n padding-inline: var(--bui-space-3) 0;\n }\n }\n\n .Menu_bui-MenuSearchFieldClear__4a32956efb {\n flex: 0 0 auto;\n display: grid;\n place-content: center;\n background-color: transparent;\n border: none;\n padding: 0;\n margin: 0;\n cursor: pointer;\n color: var(--bui-fg-secondary);\n transition: color 0.2s ease-in-out;\n width: 2rem;\n height: 2rem;\n\n &:hover {\n color: var(--bui-fg-primary);\n }\n\n & > svg {\n width: 1rem;\n height: 1rem;\n }\n }\n\n .Menu_bui-MenuEmptyState__4a32956efb {\n padding-inline: var(--bui-space-3);\n padding-block: var(--bui-space-2);\n color: var(--bui-fg-secondary);\n font-size: var(--bui-font-size-3);\n font-family: var(--bui-font-regular);\n font-weight: var(--bui-font-weight-regular);\n }\n}\n";
4
+ var styles = {"bui-MenuPopover":"Menu_bui-MenuPopover__4a32956efb","bui-MenuInner":"Menu_bui-MenuInner__4a32956efb","bui-MenuContent":"Menu_bui-MenuContent__4a32956efb","bui-MenuItem":"Menu_bui-MenuItem__4a32956efb","bui-MenuItemWrapper":"Menu_bui-MenuItemWrapper__4a32956efb","bui-MenuItemArrow":"Menu_bui-MenuItemArrow__4a32956efb","bui-MenuItemListBox":"Menu_bui-MenuItemListBox__4a32956efb","bui-MenuItemListBoxCheck":"Menu_bui-MenuItemListBoxCheck__4a32956efb","bui-MenuItemContent":"Menu_bui-MenuItemContent__4a32956efb","bui-MenuSection":"Menu_bui-MenuSection__4a32956efb","bui-MenuSectionHeader":"Menu_bui-MenuSectionHeader__4a32956efb","bui-MenuSeparator":"Menu_bui-MenuSeparator__4a32956efb","bui-MenuSearchField":"Menu_bui-MenuSearchField__4a32956efb","bui-MenuSearchFieldClear":"Menu_bui-MenuSearchFieldClear__4a32956efb","bui-MenuSearchFieldInput":"Menu_bui-MenuSearchFieldInput__4a32956efb","bui-MenuEmptyState":"Menu_bui-MenuEmptyState__4a32956efb"};
5
5
  styleInject(css_248z);
6
6
 
7
7
  export { styles as default };
@@ -1,23 +1,119 @@
1
- const MenuDefinition = {
1
+ import 'react/jsx-runtime';
2
+ import 'clsx';
3
+ import '../../hooks/useBreakpoint.esm.js';
4
+ import '../../hooks/useBg.esm.js';
5
+ import '../../hooks/useDefinition/helpers.esm.js';
6
+ import { defineComponent } from '../../hooks/useDefinition/defineComponent.esm.js';
7
+ import styles from './Menu.module.css.esm.js';
8
+
9
+ const menuPopoverClassNames = {
10
+ root: "bui-MenuPopover",
11
+ inner: "bui-MenuInner",
12
+ content: "bui-MenuContent"
13
+ };
14
+ const menuAutocompleteClassNames = {
15
+ ...menuPopoverClassNames,
16
+ searchField: "bui-MenuSearchField",
17
+ searchFieldInput: "bui-MenuSearchFieldInput",
18
+ searchFieldClear: "bui-MenuSearchFieldClear"
19
+ };
20
+ const menuPopoverPropDefs = {
21
+ placement: { default: "bottom start" },
22
+ virtualized: { default: false },
23
+ maxWidth: {},
24
+ maxHeight: {},
25
+ style: {},
26
+ className: {}
27
+ };
28
+ const MenuDefinition = defineComponent()({
29
+ styles,
30
+ classNames: menuPopoverClassNames,
31
+ propDefs: menuPopoverPropDefs
32
+ });
33
+ const MenuListBoxDefinition = defineComponent()({
34
+ styles,
35
+ classNames: menuPopoverClassNames,
36
+ propDefs: {
37
+ ...menuPopoverPropDefs,
38
+ selectionMode: { default: "single" }
39
+ }
40
+ });
41
+ const MenuAutocompleteDefinition = defineComponent()({
42
+ styles,
43
+ classNames: menuAutocompleteClassNames,
44
+ propDefs: {
45
+ ...menuPopoverPropDefs,
46
+ placeholder: {}
47
+ }
48
+ });
49
+ const MenuAutocompleteListboxDefinition = defineComponent()({
50
+ styles,
51
+ classNames: menuAutocompleteClassNames,
52
+ propDefs: {
53
+ ...menuPopoverPropDefs,
54
+ placeholder: {},
55
+ selectionMode: { default: "single" }
56
+ }
57
+ });
58
+ const MenuItemDefinition = defineComponent()({
59
+ styles,
2
60
  classNames: {
3
- root: "bui-Menu",
4
- popover: "bui-MenuPopover",
5
- content: "bui-MenuContent",
6
- section: "bui-MenuSection",
7
- sectionHeader: "bui-MenuSectionHeader",
8
- item: "bui-MenuItem",
9
- itemListBox: "bui-MenuItemListBox",
10
- itemListBoxCheck: "bui-MenuItemListBoxCheck",
61
+ root: "bui-MenuItem",
11
62
  itemWrapper: "bui-MenuItemWrapper",
12
63
  itemContent: "bui-MenuItemContent",
13
- itemArrow: "bui-MenuItemArrow",
14
- separator: "bui-MenuSeparator",
15
- searchField: "bui-MenuSearchField",
16
- searchFieldInput: "bui-MenuSearchFieldInput",
17
- searchFieldClear: "bui-MenuSearchFieldClear",
18
- emptyState: "bui-MenuEmptyState"
64
+ itemArrow: "bui-MenuItemArrow"
65
+ },
66
+ propDefs: {
67
+ iconStart: {},
68
+ children: {},
69
+ color: { dataAttribute: true, default: "primary" },
70
+ href: {},
71
+ className: {}
19
72
  }
20
- };
73
+ });
74
+ const MenuListBoxItemDefinition = defineComponent()({
75
+ styles,
76
+ classNames: {
77
+ root: "bui-MenuItemListBox",
78
+ itemWrapper: "bui-MenuItemWrapper",
79
+ itemContent: "bui-MenuItemContent",
80
+ check: "bui-MenuItemListBoxCheck"
81
+ },
82
+ propDefs: {
83
+ children: {},
84
+ className: {}
85
+ }
86
+ });
87
+ const MenuSectionDefinition = defineComponent()({
88
+ styles,
89
+ classNames: {
90
+ root: "bui-MenuSection",
91
+ header: "bui-MenuSectionHeader"
92
+ },
93
+ propDefs: {
94
+ title: {},
95
+ children: {},
96
+ className: {}
97
+ }
98
+ });
99
+ const MenuSeparatorDefinition = defineComponent()(
100
+ {
101
+ styles,
102
+ classNames: {
103
+ root: "bui-MenuSeparator"
104
+ },
105
+ propDefs: {
106
+ className: {}
107
+ }
108
+ }
109
+ );
110
+ const MenuEmptyStateDefinition = defineComponent()({
111
+ styles,
112
+ classNames: {
113
+ root: "bui-MenuEmptyState"
114
+ },
115
+ propDefs: {}
116
+ });
21
117
 
22
- export { MenuDefinition };
118
+ export { MenuAutocompleteDefinition, MenuAutocompleteListboxDefinition, MenuDefinition, MenuEmptyStateDefinition, MenuItemDefinition, MenuListBoxDefinition, MenuListBoxItemDefinition, MenuSectionDefinition, MenuSeparatorDefinition };
23
119
  //# sourceMappingURL=definition.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"definition.esm.js","sources":["../../../src/components/Menu/definition.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { ComponentDefinition } from '../../types';\n\n/**\n * Component definition for Menu\n * @public\n */\nexport const MenuDefinition = {\n classNames: {\n root: 'bui-Menu',\n popover: 'bui-MenuPopover',\n content: 'bui-MenuContent',\n section: 'bui-MenuSection',\n sectionHeader: 'bui-MenuSectionHeader',\n item: 'bui-MenuItem',\n itemListBox: 'bui-MenuItemListBox',\n itemListBoxCheck: 'bui-MenuItemListBoxCheck',\n itemWrapper: 'bui-MenuItemWrapper',\n itemContent: 'bui-MenuItemContent',\n itemArrow: 'bui-MenuItemArrow',\n separator: 'bui-MenuSeparator',\n searchField: 'bui-MenuSearchField',\n searchFieldInput: 'bui-MenuSearchFieldInput',\n searchFieldClear: 'bui-MenuSearchFieldClear',\n emptyState: 'bui-MenuEmptyState',\n },\n} as const satisfies ComponentDefinition;\n"],"names":[],"mappings":"AAsBO,MAAM,cAAA,GAAiB;AAAA,EAC5B,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,UAAA;AAAA,IACN,OAAA,EAAS,iBAAA;AAAA,IACT,OAAA,EAAS,iBAAA;AAAA,IACT,OAAA,EAAS,iBAAA;AAAA,IACT,aAAA,EAAe,uBAAA;AAAA,IACf,IAAA,EAAM,cAAA;AAAA,IACN,WAAA,EAAa,qBAAA;AAAA,IACb,gBAAA,EAAkB,0BAAA;AAAA,IAClB,WAAA,EAAa,qBAAA;AAAA,IACb,WAAA,EAAa,qBAAA;AAAA,IACb,SAAA,EAAW,mBAAA;AAAA,IACX,SAAA,EAAW,mBAAA;AAAA,IACX,WAAA,EAAa,qBAAA;AAAA,IACb,gBAAA,EAAkB,0BAAA;AAAA,IAClB,gBAAA,EAAkB,0BAAA;AAAA,IAClB,UAAA,EAAY;AAAA;AAEhB;;;;"}
1
+ {"version":3,"file":"definition.esm.js","sources":["../../../src/components/Menu/definition.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { defineComponent } from '../../hooks/useDefinition';\nimport type {\n MenuOwnProps,\n MenuListBoxOwnProps,\n MenuAutocompleteOwnProps,\n MenuAutocompleteListBoxOwnProps,\n MenuItemOwnProps,\n MenuListBoxItemOwnProps,\n MenuSectionOwnProps,\n MenuSeparatorOwnProps,\n} from './types';\nimport styles from './Menu.module.css';\n\n// Shared classNames for all popover-based menu variants\nconst menuPopoverClassNames = {\n root: 'bui-MenuPopover',\n inner: 'bui-MenuInner',\n content: 'bui-MenuContent',\n} as const;\n\n// Shared classNames for autocomplete menu variants\nconst menuAutocompleteClassNames = {\n ...menuPopoverClassNames,\n searchField: 'bui-MenuSearchField',\n searchFieldInput: 'bui-MenuSearchFieldInput',\n searchFieldClear: 'bui-MenuSearchFieldClear',\n} as const;\n\n// Shared propDefs for all popover-based menu variants\nconst menuPopoverPropDefs = {\n placement: { default: 'bottom start' },\n virtualized: { default: false },\n maxWidth: {},\n maxHeight: {},\n style: {},\n className: {},\n} as const;\n\n/**\n * Component definition for Menu\n * @public\n */\nexport const MenuDefinition = defineComponent<MenuOwnProps>()({\n styles,\n classNames: menuPopoverClassNames,\n propDefs: menuPopoverPropDefs,\n});\n\n/** @internal */\nexport const MenuListBoxDefinition = defineComponent<MenuListBoxOwnProps>()({\n styles,\n classNames: menuPopoverClassNames,\n propDefs: {\n ...menuPopoverPropDefs,\n selectionMode: { default: 'single' },\n },\n});\n\n/** @internal */\nexport const MenuAutocompleteDefinition =\n defineComponent<MenuAutocompleteOwnProps>()({\n styles,\n classNames: menuAutocompleteClassNames,\n propDefs: {\n ...menuPopoverPropDefs,\n placeholder: {},\n },\n });\n\n/** @internal */\nexport const MenuAutocompleteListboxDefinition =\n defineComponent<MenuAutocompleteListBoxOwnProps>()({\n styles,\n classNames: menuAutocompleteClassNames,\n propDefs: {\n ...menuPopoverPropDefs,\n placeholder: {},\n selectionMode: { default: 'single' },\n },\n });\n\n/** @internal */\nexport const MenuItemDefinition = defineComponent<MenuItemOwnProps>()({\n styles,\n classNames: {\n root: 'bui-MenuItem',\n itemWrapper: 'bui-MenuItemWrapper',\n itemContent: 'bui-MenuItemContent',\n itemArrow: 'bui-MenuItemArrow',\n },\n propDefs: {\n iconStart: {},\n children: {},\n color: { dataAttribute: true, default: 'primary' },\n href: {},\n className: {},\n },\n});\n\n/** @internal */\nexport const MenuListBoxItemDefinition =\n defineComponent<MenuListBoxItemOwnProps>()({\n styles,\n classNames: {\n root: 'bui-MenuItemListBox',\n itemWrapper: 'bui-MenuItemWrapper',\n itemContent: 'bui-MenuItemContent',\n check: 'bui-MenuItemListBoxCheck',\n },\n propDefs: {\n children: {},\n className: {},\n },\n });\n\n/** @internal */\nexport const MenuSectionDefinition = defineComponent<MenuSectionOwnProps>()({\n styles,\n classNames: {\n root: 'bui-MenuSection',\n header: 'bui-MenuSectionHeader',\n },\n propDefs: {\n title: {},\n children: {},\n className: {},\n },\n});\n\n/** @internal */\nexport const MenuSeparatorDefinition = defineComponent<MenuSeparatorOwnProps>()(\n {\n styles,\n classNames: {\n root: 'bui-MenuSeparator',\n },\n propDefs: {\n className: {},\n },\n },\n);\n\n/** @internal */\nexport const MenuEmptyStateDefinition = defineComponent<{}>()({\n styles,\n classNames: {\n root: 'bui-Men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MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA,UAAU;AACZ,CAAC;;;;"}
@@ -1,60 +1,37 @@
1
1
  import { jsxs, jsx } from 'react/jsx-runtime';
2
2
  import { forwardRef, useEffect, useState } from 'react';
3
3
  import { TextField, Input, Button } from 'react-aria-components';
4
- import clsx from 'clsx';
5
4
  import { FieldLabel } from '../FieldLabel/FieldLabel.esm.js';
5
+ import { useDefinition } from '../../hooks/useDefinition/useDefinition.esm.js';
6
+ import '../FieldLabel/FieldLabel.module.css.esm.js';
6
7
  import { FieldError } from '../FieldError/FieldError.esm.js';
7
- import { useStyles } from '../../hooks/useStyles.esm.js';
8
+ import '../FieldError/FieldError.module.css.esm.js';
8
9
  import { PasswordFieldDefinition } from './definition.esm.js';
9
10
  import { RiEyeLine, RiEyeOffLine } from '@remixicon/react';
10
- import stylesPasswordField from './PasswordField.module.css.esm.js';
11
11
 
12
12
  const PasswordField = forwardRef(
13
13
  (props, ref) => {
14
- const {
15
- label,
16
- "aria-label": ariaLabel,
17
- "aria-labelledby": ariaLabelledBy
18
- } = props;
14
+ const { ownProps, restProps, dataAttributes } = useDefinition(
15
+ PasswordFieldDefinition,
16
+ props
17
+ );
18
+ const { classes, label, icon, secondaryLabel, placeholder, description } = ownProps;
19
19
  useEffect(() => {
20
- if (!label && !ariaLabel && !ariaLabelledBy) {
20
+ if (!label && !restProps["aria-label"] && !restProps["aria-labelledby"]) {
21
21
  console.warn(
22
22
  "PasswordField requires either a visible label, aria-label, or aria-labelledby for accessibility"
23
23
  );
24
24
  }
25
- }, [label, ariaLabel, ariaLabelledBy]);
26
- const {
27
- classNames: classNamesPasswordField,
28
- dataAttributes,
29
- cleanedProps
30
- } = useStyles(PasswordFieldDefinition, {
31
- size: "small",
32
- ...props
33
- });
34
- const {
35
- className,
36
- description,
37
- icon,
38
- isRequired,
39
- secondaryLabel,
40
- placeholder,
41
- ...rest
42
- } = cleanedProps;
43
- const secondaryLabelText = secondaryLabel || (isRequired ? "Required" : null);
25
+ }, [label, restProps["aria-label"], restProps["aria-labelledby"]]);
26
+ const secondaryLabelText = secondaryLabel || (restProps.isRequired ? "Required" : null);
44
27
  const [isVisible, setIsVisible] = useState(false);
45
28
  return /* @__PURE__ */ jsxs(
46
29
  TextField,
47
30
  {
48
- className: clsx(
49
- classNamesPasswordField.root,
50
- stylesPasswordField[classNamesPasswordField.root],
51
- className
52
- ),
31
+ className: classes.root,
53
32
  ...dataAttributes,
54
- "aria-label": ariaLabel,
55
- "aria-labelledby": ariaLabelledBy,
56
33
  type: "password",
57
- ...rest,
34
+ ...restProps,
58
35
  ref,
59
36
  children: [
60
37
  /* @__PURE__ */ jsx(
@@ -68,19 +45,13 @@ const PasswordField = forwardRef(
68
45
  /* @__PURE__ */ jsxs(
69
46
  "div",
70
47
  {
71
- className: clsx(
72
- classNamesPasswordField.inputWrapper,
73
- stylesPasswordField[classNamesPasswordField.inputWrapper]
74
- ),
48
+ className: classes.inputWrapper,
75
49
  "data-size": dataAttributes["data-size"],
76
50
  children: [
77
51
  icon && /* @__PURE__ */ jsx(
78
52
  "div",
79
53
  {
80
- className: clsx(
81
- classNamesPasswordField.inputIcon,
82
- stylesPasswordField[classNamesPasswordField.inputIcon]
83
- ),
54
+ className: classes.inputIcon,
84
55
  "data-size": dataAttributes["data-size"],
85
56
  "aria-hidden": "true",
86
57
  children: icon
@@ -89,10 +60,7 @@ const PasswordField = forwardRef(
89
60
  /* @__PURE__ */ jsx(
90
61
  Input,
91
62
  {
92
- className: clsx(
93
- classNamesPasswordField.input,
94
- stylesPasswordField[classNamesPasswordField.input]
95
- ),
63
+ className: classes.input,
96
64
  ...icon && { "data-icon": true },
97
65
  placeholder,
98
66
  type: isVisible ? "text" : "password"
@@ -107,10 +75,7 @@ const PasswordField = forwardRef(
107
75
  "aria-controls": isVisible ? "text" : "password",
108
76
  "aria-expanded": isVisible,
109
77
  onPress: () => setIsVisible((v) => !v),
110
- className: clsx(
111
- classNamesPasswordField.inputVisibility,
112
- stylesPasswordField[classNamesPasswordField.inputVisibility]
113
- ),
78
+ className: classes.inputVisibility,
114
79
  children: isVisible ? /* @__PURE__ */ jsx(RiEyeLine, {}) : /* @__PURE__ */ jsx(RiEyeOffLine, {})
115
80
  }
116
81
  )
@@ -1 +1 @@
1
- {"version":3,"file":"PasswordField.esm.js","sources":["../../../src/components/PasswordField/PasswordField.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { forwardRef, useEffect, useState } from 'react';\nimport {\n Input,\n TextField as AriaTextField,\n Button as RAButton,\n} from 'react-aria-components';\nimport clsx from 'clsx';\nimport { FieldLabel } from '../FieldLabel';\nimport { FieldError } from '../FieldError';\n\nimport type { PasswordFieldProps } from './types';\nimport { useStyles } from '../../hooks/useStyles';\nimport { PasswordFieldDefinition } from './definition';\nimport { RiEyeLine, RiEyeOffLine } from '@remixicon/react';\nimport stylesPasswordField from './PasswordField.module.css';\n\n/** @public */\nexport const PasswordField = forwardRef<HTMLDivElement, PasswordFieldProps>(\n (props, ref) => {\n const {\n label,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n } = props;\n\n useEffect(() => {\n if (!label && !ariaLabel && !ariaLabelledBy) {\n console.warn(\n 'PasswordField requires either a visible label, aria-label, or aria-labelledby for accessibility',\n );\n }\n }, [label, ariaLabel, ariaLabelledBy]);\n\n const {\n classNames: classNamesPasswordField,\n dataAttributes,\n cleanedProps,\n } = useStyles(PasswordFieldDefinition, {\n size: 'small',\n ...props,\n });\n\n const {\n className,\n description,\n icon,\n isRequired,\n secondaryLabel,\n placeholder,\n ...rest\n } = cleanedProps;\n\n // If a secondary label is provided, use it. Otherwise, use 'Required' if the field is required.\n const secondaryLabelText =\n secondaryLabel || (isRequired ? 'Required' : null);\n\n // Manage secret visibility toggle\n const [isVisible, setIsVisible] = useState(false);\n\n return (\n <AriaTextField\n className={clsx(\n classNamesPasswordField.root,\n stylesPasswordField[classNamesPasswordField.root],\n className,\n )}\n {...dataAttributes}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n type=\"password\"\n {...rest}\n ref={ref}\n >\n <FieldLabel\n label={label}\n secondaryLabel={secondaryLabelText}\n description={description}\n />\n <div\n className={clsx(\n classNamesPasswordField.inputWrapper,\n stylesPasswordField[classNamesPasswordField.inputWrapper],\n )}\n data-size={dataAttributes['data-size']}\n >\n {icon && (\n <div\n className={clsx(\n classNamesPasswordField.inputIcon,\n stylesPasswordField[classNamesPasswordField.inputIcon],\n )}\n data-size={dataAttributes['data-size']}\n aria-hidden=\"true\"\n >\n {icon}\n </div>\n )}\n <Input\n className={clsx(\n classNamesPasswordField.input,\n stylesPasswordField[classNamesPasswordField.input],\n )}\n {...(icon && { 'data-icon': true })}\n placeholder={placeholder}\n type={isVisible ? 'text' : 'password'}\n />\n <RAButton\n data-size={dataAttributes['data-size']}\n data-variant={'tertiary'}\n aria-label={isVisible ? 'Hide value' : 'Show value'}\n aria-controls={isVisible ? 'text' : 'password'}\n aria-expanded={isVisible}\n onPress={() => setIsVisible(v => !v)}\n className={clsx(\n classNamesPasswordField.inputVisibility,\n stylesPasswordField[classNamesPasswordField.inputVisibility],\n )}\n >\n {isVisible ? <RiEyeLine /> : <RiEyeOffLine />}\n </RAButton>\n </div>\n <FieldError />\n </AriaTextField>\n );\n },\n);\n\nPasswordField.displayName = 'PasswordField';\n"],"names":["AriaTextField","RAButton"],"mappings":";;;;;;;;;;;AAiCO,MAAM,aAAA,GAAgB,UAAA;AAAA,EAC3B,CAAC,OAAO,GA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EAAS,MAAM,YAAA,CAAa,CAAA,CAAA,KAAK,CAAC,CAAC,CAAA;AAAA,oBACnC,SAAA,EAAW,IAAA;AAAA,sBACT,uBAAA,CAAwB,eAAA;AAAA,sBACxB,mBAAA,CAAoB,wBAAwB,eAAe;AAAA,qBAC7D;AAAA,oBAEC,QAAA,EAAA,SAAA,mBAAY,GAAA,CAAC,SAAA,EAAA,EAAU,CAAA,uBAAM,YAAA,EAAA,EAAa;AAAA;AAAA;AAC7C;AAAA;AAAA,WACF;AAAA,8BACC,UAAA,EAAA,EAAW;AAAA;AAAA;AAAA,KACd;AAAA,EAEJ;AACF;AAEA,aAAA,CAAc,WAAA,GAAc,eAAA;;;;"}
1
+ {"version":3,"file":"PasswordField.esm.js","sources":["../../../src/components/PasswordField/PasswordField.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { forwardRef, useEffect, useState } from 'react';\nimport {\n Input,\n TextField as AriaTextField,\n Button as RAButton,\n} from 'react-aria-components';\nimport { FieldLabel } from '../FieldLabel';\nimport { FieldError } from '../FieldError';\n\nimport type { PasswordFieldProps } from './types';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport { PasswordFieldDefinition } from './definition';\nimport { RiEyeLine, RiEyeOffLine } from '@remixicon/react';\n\n/** @public */\nexport const PasswordField = forwardRef<HTMLDivElement, PasswordFieldProps>(\n (props, ref) => {\n const { ownProps, restProps, dataAttributes } = useDefinition(\n PasswordFieldDefinition,\n props,\n );\n const { classes, label, icon, secondaryLabel, placeholder, description } =\n ownProps;\n\n useEffect(() => {\n if (!label && !restProps['aria-label'] && !restProps['aria-labelledby']) {\n console.warn(\n 'PasswordField requires either a visible label, aria-label, or aria-labelledby for accessibility',\n );\n }\n }, [label, restProps['aria-label'], restProps['aria-labelledby']]);\n\n // If a secondary label is provided, use it. Otherwise, use 'Required' if the field is required.\n const secondaryLabelText =\n secondaryLabel || (restProps.isRequired ? 'Required' : null);\n\n // Manage secret visibility toggle\n const [isVisible, setIsVisible] = useState(false);\n\n return (\n <AriaTextField\n className={classes.root}\n {...dataAttributes}\n type=\"password\"\n {...restProps}\n ref={ref}\n >\n <FieldLabel\n label={label}\n secondaryLabel={secondaryLabelText}\n description={description}\n />\n <div\n className={classes.inputWrapper}\n data-size={dataAttributes['data-size']}\n >\n {icon && (\n <div\n className={classes.inputIcon}\n data-size={dataAttributes['data-size']}\n aria-hidden=\"true\"\n >\n {icon}\n </div>\n )}\n <Input\n className={classes.input}\n {...(icon && { 'data-icon': true })}\n placeholder={placeholder}\n type={isVisible ? 'text' : 'password'}\n />\n <RAButton\n data-size={dataAttributes['data-size']}\n data-variant={'tertiary'}\n aria-label={isVisible ? 'Hide value' : 'Show value'}\n aria-controls={isVisible ? 'text' : 'password'}\n aria-expanded={isVisible}\n onPress={() => setIsVisible(v => !v)}\n className={classes.inputVisibility}\n >\n {isVisible ? <RiEyeLine /> : <RiEyeOffLine />}\n </RAButton>\n </div>\n <FieldError />\n </AriaTextField>\n );\n },\n);\n\nPasswordField.displayName = 'PasswordField';\n"],"names":["AriaTextField","RAButton"],"mappings":";;;;;;;;;;;AA+BO,MAAM,aAAA,GAAgB,UAAA;AAAA,EAC3B,CAAC,OAAO,GAAA,KAAQ;AACd,IAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAW,cAAA,EAAe,GAAI,aAAA;AAAA,MAC9C,uBAAA;AAAA,MACA;AAAA,KACF;AACA,IAAA,MAAM,EAAE,OAAA,EAAS,KAAA,EAAO,MAAM,cAAA,EAAgB,WAAA,EAAa,aAAY,GACrE,QAAA;AAEF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AA,oBACC,WAAW,OAAA,CAAQ,KAAA;AAAA,oBAClB,GAAI,IAAA,IAAQ,EAAE,WAAA,EAAa,IAAA,EAAK;AAAA,oBACjC,WAAA;AAAA,oBACA,IAAA,EAAM,YAAY,MAAA,GAAS;AAAA;AAAA,iBAC7B;AAAA,gCACA,GAAA;AAAA,kBAACC,MAAA;AAAA,kBAAA;AAAA,oBACC,WAAA,EAAW,eAAe,WAAW,CAAA;AAAA,oBACrC,cAAA,EAAc,UAAA;AAAA,oBACd,YAAA,EAAY,YAAY,YAAA,GAAe,YAAA;AAAA,oBACvC,eAAA,EAAe,YAAY,MAAA,GAAS,UAAA;AAAA,oBACpC,eAAA,EAAe,SAAA;AAAA,oBACf,OAAA,EAAS,MAAM,YAAA,CAAa,CAAA,CAAA,KAAK,CAAC,CAAC,CAAA;AAAA,oBACnC,WAAW,OAAA,CAAQ,eAAA;AAAA,oBAElB,QAAA,EAAA,SAAA,mBAAY,GAAA,CAAC,SAAA,EAAA,EAAU,CAAA,uBAAM,YAAA,EAAA,EAAa;AAAA;AAAA;AAC7C;AAAA;AAAA,WACF;AAAA,8BACC,UAAA,EAAA,EAAW;AAAA;AAAA;AAAA,KACd;AAAA,EAEJ;AACF;AAEA,aAAA,CAAc,WAAA,GAAc,eAAA;;;;"}
@@ -1,8 +1,8 @@
1
1
  import styleInject from '../../node_modules_dist/style-inject/dist/style-inject.es.esm.js';
2
2
 
3
3
  var css_248z = "/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n@layer tokens, base, components, utilities;\n\n@layer components {\n .PasswordField_bui-PasswordField__aa0b36a0a3 {\n display: flex;\n flex-direction: column;\n font-family: var(--bui-font-regular);\n width: 100%;\n flex-shrink: 0;\n\n &[data-size='small'] {\n --password-field-item-height: 2rem;\n }\n\n &[data-size='medium'] {\n --password-field-item-height: 2.5rem;\n }\n }\n\n .PasswordField_bui-PasswordFieldInputWrapper__aa0b36a0a3 {\n display: flex;\n align-items: center;\n border-radius: var(--bui-radius-2);\n border: 1px solid var(--bui-border-2);\n background-color: var(--bui-bg-neutral-1);\n transition: border-color 0.2s ease-in-out, outline-color 0.2s ease-in-out;\n\n &[data-size='small'] {\n height: 2rem;\n }\n\n &[data-size='medium'] {\n height: 2.5rem;\n }\n\n &:has([data-invalid]) {\n border-color: var(--bui-fg-danger);\n }\n\n &:has([data-disabled]) {\n opacity: 0.5;\n cursor: not-allowed;\n }\n }\n\n .PasswordField_bui-PasswordFieldIcon__aa0b36a0a3 {\n flex: 0 0 auto;\n display: grid;\n place-content: center;\n color: var(--bui-fg-primary);\n pointer-events: none;\n width: var(--password-field-item-height);\n height: var(--password-field-item-height);\n\n & svg {\n .PasswordField_bui-PasswordField__aa0b36a0a3[data-size='small'] & {\n width: 1rem;\n height: 1rem;\n }\n\n .PasswordField_bui-PasswordField__aa0b36a0a3[data-size='medium'] & {\n width: 1.25rem;\n height: 1.25rem;\n }\n }\n }\n\n .PasswordField_bui-PasswordFieldInput__aa0b36a0a3 {\n flex: 1;\n display: flex;\n align-items: center;\n padding: 0;\n border: none;\n background-color: transparent;\n font-size: var(--bui-font-size-3);\n font-family: var(--bui-font-regular);\n font-weight: var(--bui-font-weight-regular);\n color: var(--bui-fg-primary);\n width: 100%;\n height: 100%;\n outline: none;\n\n &::-webkit-search-cancel-button,\n &::-webkit-search-decoration {\n -webkit-appearance: none;\n }\n\n &::placeholder {\n color: var(--bui-fg-secondary);\n }\n\n &[data-disabled] {\n cursor: not-allowed;\n }\n\n &:first-child {\n .PasswordField_bui-PasswordField__aa0b36a0a3[data-size='small'] & {\n padding-inline: var(--bui-space-3) 0;\n }\n\n .PasswordField_bui-PasswordField__aa0b36a0a3[data-size='medium'] & {\n padding-inline: var(--bui-space-4) 0;\n }\n }\n }\n\n .PasswordField_bui-PasswordFieldVisibility__aa0b36a0a3 {\n flex: 0 0 auto;\n display: grid;\n place-content: center;\n background-color: transparent;\n cursor: pointer;\n border: none;\n padding: 0;\n margin: 0;\n color: var(--bui-fg-primary);\n width: var(--password-field-item-height);\n height: var(--password-field-item-height);\n\n & svg {\n .PasswordField_bui-PasswordField__aa0b36a0a3[data-size='small'] & {\n width: 1rem;\n height: 1rem;\n }\n\n .PasswordField_bui-PasswordField__aa0b36a0a3[data-size='medium'] & {\n width: 1.25rem;\n height: 1.25rem;\n }\n }\n }\n}\n";
4
- var stylesPasswordField = {"bui-PasswordField":"PasswordField_bui-PasswordField__aa0b36a0a3","bui-PasswordFieldInputWrapper":"PasswordField_bui-PasswordFieldInputWrapper__aa0b36a0a3","bui-PasswordFieldIcon":"PasswordField_bui-PasswordFieldIcon__aa0b36a0a3","bui-PasswordFieldInput":"PasswordField_bui-PasswordFieldInput__aa0b36a0a3","bui-PasswordFieldVisibility":"PasswordField_bui-PasswordFieldVisibility__aa0b36a0a3"};
4
+ var styles = {"bui-PasswordField":"PasswordField_bui-PasswordField__aa0b36a0a3","bui-PasswordFieldInputWrapper":"PasswordField_bui-PasswordFieldInputWrapper__aa0b36a0a3","bui-PasswordFieldIcon":"PasswordField_bui-PasswordFieldIcon__aa0b36a0a3","bui-PasswordFieldInput":"PasswordField_bui-PasswordFieldInput__aa0b36a0a3","bui-PasswordFieldVisibility":"PasswordField_bui-PasswordFieldVisibility__aa0b36a0a3"};
5
5
  styleInject(css_248z);
6
6
 
7
- export { stylesPasswordField as default };
7
+ export { styles as default };
8
8
  //# sourceMappingURL=PasswordField.module.css.esm.js.map
@@ -1,15 +1,32 @@
1
- const PasswordFieldDefinition = {
2
- classNames: {
3
- root: "bui-PasswordField",
4
- inputWrapper: "bui-PasswordFieldInputWrapper",
5
- input: "bui-PasswordFieldInput",
6
- inputIcon: "bui-PasswordFieldIcon",
7
- inputVisibility: "bui-PasswordFieldVisibility"
8
- },
9
- dataAttributes: {
10
- size: ["small", "medium"]
1
+ import 'react/jsx-runtime';
2
+ import 'clsx';
3
+ import '../../hooks/useBreakpoint.esm.js';
4
+ import '../../hooks/useBg.esm.js';
5
+ import '../../hooks/useDefinition/helpers.esm.js';
6
+ import { defineComponent } from '../../hooks/useDefinition/defineComponent.esm.js';
7
+ import styles from './PasswordField.module.css.esm.js';
8
+
9
+ const PasswordFieldDefinition = defineComponent()(
10
+ {
11
+ styles,
12
+ classNames: {
13
+ root: "bui-PasswordField",
14
+ inputWrapper: "bui-PasswordFieldInputWrapper",
15
+ input: "bui-PasswordFieldInput",
16
+ inputIcon: "bui-PasswordFieldIcon",
17
+ inputVisibility: "bui-PasswordFieldVisibility"
18
+ },
19
+ propDefs: {
20
+ size: { dataAttribute: true, default: "small" },
21
+ className: {},
22
+ icon: {},
23
+ placeholder: {},
24
+ label: {},
25
+ description: {},
26
+ secondaryLabel: {}
27
+ }
11
28
  }
12
- };
29
+ );
13
30
 
14
31
  export { PasswordFieldDefinition };
15
32
  //# sourceMappingURL=definition.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"definition.esm.js","sources":["../../../src/components/PasswordField/definition.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { ComponentDefinition } from '../../types';\n\n/**\n * Component definition for PasswordField\n * @public\n */\nexport const PasswordFieldDefinition = {\n classNames: {\n root: 'bui-PasswordField',\n inputWrapper: 'bui-PasswordFieldInputWrapper',\n input: 'bui-PasswordFieldInput',\n inputIcon: 'bui-PasswordFieldIcon',\n inputVisibility: 'bui-PasswordFieldVisibility',\n },\n dataAttributes: {\n size: ['small', 'medium'] as const,\n },\n} as const satisfies ComponentDefinition;\n"],"names":[],"mappings":"AAsBO,MAAM,uBAAA,GAA0B;AAAA,EACrC,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,mBAAA;AAAA,IACN,YAAA,EAAc,+BAAA;AAAA,IACd,KAAA,EAAO,wBAAA;AAAA,IACP,SAAA,EAAW,uBAAA;AAAA,IACX,eAAA,EAAiB;AAAA,GACnB;AAAA,EACA,cAAA,EAAgB;AAAA,IACd,IAAA,EAAM,CAAC,OAAA,EAAS,QAAQ;AAAA;AAE5B;;;;"}
1
+ {"version":3,"file":"definition.esm.js","sources":["../../../src/components/PasswordField/definition.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { defineComponent } from '../../hooks/useDefinition';\nimport type { PasswordFieldOwnProps } from './types';\nimport styles from './PasswordField.module.css';\n\n/**\n * Component definition for PasswordField\n * @public\n */\nexport const PasswordFieldDefinition = defineComponent<PasswordFieldOwnProps>()(\n {\n styles,\n classNames: {\n root: 'bui-PasswordField',\n inputWrapper: 'bui-PasswordFieldInputWrapper',\n input: 'bui-PasswordFieldInput',\n inputIcon: 'bui-PasswordFieldIcon',\n inputVisibility: 'bui-PasswordFieldVisibility',\n },\n propDefs: {\n size: { dataAttribute: true, default: 'small' },\n className: {},\n icon: {},\n placeholder: {},\n label: {},\n description: {},\n secondaryLabel: {},\n },\n },\n);\n"],"names":[],"mappings":";;;;;;;;AAwBO,MAAM,0BAA0B,eAAA,EAAuC;AAAA,EAC5E;AAAA,IACE,MAAA;AAAA,IACA,UAAA,EAAY;AAAA,MACV,IAAA,EAAM,mBAAA;AAAA,MACN,YAAA,EAAc,+BAAA;AAAA,MACd,KAAA,EAAO,wBAAA;AAAA,MACP,SAAA,EAAW,uBAAA;AAAA,MACX,eAAA,EAAiB;AAAA,KACnB;AAAA,IACA,QAAA,EAAU;AAAA,MACR,IAAA,EAAM,EAAE,aAAA,EAAe,IAAA,EAAM,SAAS,OAAA,EAAQ;AAAA,MAC9C,WAAW,EAAC;AAAA,MACZ,MAAM,EAAC;AAAA,MACP,aAAa,EAAC;AAAA,MACd,OAAO,EAAC;AAAA,MACR,aAAa,EAAC;AAAA,MACd,gBAAgB;AAAC;AACnB;AAEJ;;;;"}