@backstage/ui 0.7.0-next.3 → 0.7.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.
- package/CHANGELOG.md +23 -0
- package/css/styles.css +259 -176
- package/dist/components/Avatar/Avatar.esm.js.map +1 -1
- package/dist/components/Box/Box.esm.js.map +1 -1
- package/dist/components/Box/Box.props.esm.js.map +1 -1
- package/dist/components/Button/Button.esm.js.map +1 -1
- package/dist/components/ButtonIcon/ButtonIcon.esm.js.map +1 -1
- package/dist/components/ButtonLink/ButtonLink.esm.js.map +1 -1
- package/dist/components/Card/Card.esm.js +4 -4
- package/dist/components/Card/Card.esm.js.map +1 -1
- package/dist/components/Checkbox/Checkbox.esm.js +5 -8
- package/dist/components/Checkbox/Checkbox.esm.js.map +1 -1
- package/dist/components/Collapsible/Collapsible.esm.js.map +1 -1
- package/dist/components/Container/Container.esm.js.map +1 -1
- package/dist/components/FieldError/FieldError.esm.js.map +1 -1
- package/dist/components/FieldLabel/FieldLabel.esm.js.map +1 -1
- package/dist/components/Flex/Flex.esm.js.map +1 -1
- package/dist/components/Flex/Flex.props.esm.js.map +1 -1
- package/dist/components/Grid/Grid.esm.js.map +1 -1
- package/dist/components/Grid/Grid.props.esm.js.map +1 -1
- package/dist/components/Header/Header.esm.js +1 -10
- package/dist/components/Header/Header.esm.js.map +1 -1
- package/dist/components/Header/HeaderToolbar.esm.js +3 -34
- package/dist/components/Header/HeaderToolbar.esm.js.map +1 -1
- package/dist/components/HeaderPage/HeaderPage.esm.js +30 -93
- package/dist/components/HeaderPage/HeaderPage.esm.js.map +1 -1
- package/dist/components/Icon/Icon.esm.js.map +1 -1
- package/dist/components/Icon/context.esm.js.map +1 -1
- package/dist/components/Icon/icons.esm.js +1 -1
- package/dist/components/Icon/icons.esm.js.map +1 -1
- package/dist/components/Icon/provider.esm.js.map +1 -1
- package/dist/components/Link/Link.esm.js.map +1 -1
- package/dist/components/Menu/Menu.esm.js +144 -202
- package/dist/components/Menu/Menu.esm.js.map +1 -1
- package/dist/components/RadioGroup/RadioGroup.esm.js.map +1 -1
- package/dist/components/ScrollArea/ScrollArea.esm.js.map +1 -1
- package/dist/components/SearchField/SearchField.esm.js.map +1 -1
- package/dist/components/Select/Select.esm.js.map +1 -1
- package/dist/components/Skeleton/Skeleton.esm.js.map +1 -1
- package/dist/components/Switch/Switch.esm.js.map +1 -1
- package/dist/components/Table/components/Cell.esm.js.map +1 -1
- package/dist/components/Table/components/CellProfile.esm.js.map +1 -1
- package/dist/components/Table/components/Column.esm.js.map +1 -1
- package/dist/components/Table/components/Row.esm.js.map +1 -1
- package/dist/components/Table/components/Table.esm.js.map +1 -1
- package/dist/components/Table/components/TableBody.esm.js.map +1 -1
- package/dist/components/Table/components/TableHeader.esm.js.map +1 -1
- package/dist/components/Table/hooks/useTable.esm.js.map +1 -1
- package/dist/components/TablePagination/TablePagination.esm.js +5 -8
- package/dist/components/TablePagination/TablePagination.esm.js.map +1 -1
- package/dist/components/Tabs/Tabs.esm.js.map +1 -1
- package/dist/components/Tabs/TabsIndicators.esm.js.map +1 -1
- package/dist/components/TagGroup/TagGroup.esm.js +62 -0
- package/dist/components/TagGroup/TagGroup.esm.js.map +1 -0
- package/dist/components/Text/Text.esm.js.map +1 -1
- package/dist/components/TextField/TextField.esm.js.map +1 -1
- package/dist/components/Tooltip/Tooltip.esm.js.map +1 -1
- package/dist/hooks/useBreakpoint.esm.js.map +1 -1
- package/dist/hooks/useIsomorphicLayoutEffect.esm.js.map +1 -1
- package/dist/hooks/useMediaQuery.esm.js.map +1 -1
- package/dist/hooks/useStyles.esm.js.map +1 -1
- package/dist/index.d.ts +137 -72
- package/dist/index.esm.js +3 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/props/display.props.esm.js.map +1 -1
- package/dist/props/gap-props.esm.js.map +1 -1
- package/dist/props/height.props.esm.js.map +1 -1
- package/dist/props/margin.props.esm.js.map +1 -1
- package/dist/props/padding.props.esm.js.map +1 -1
- package/dist/props/position.props.esm.js.map +1 -1
- package/dist/props/prop-def.esm.js.map +1 -1
- package/dist/props/spacing.props.esm.js.map +1 -1
- package/dist/props/width.props.esm.js.map +1 -1
- package/dist/utils/componentDefinitions.esm.js +25 -26
- package/dist/utils/componentDefinitions.esm.js.map +1 -1
- package/dist/utils/extractProps.esm.js.map +1 -1
- package/dist/utils/isExternalLink.esm.js.map +1 -1
- package/package.json +3 -15
- package/dist/components/Menu/Combobox.esm.js +0 -214
- package/dist/components/Menu/Combobox.esm.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Icon.esm.js","sources":["../../../src/components/Icon/Icon.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 { ComponentType } from 'react';\nimport { useIcons } from './context';\nimport type { IconProps } from './types';\nimport clsx from 'clsx';\nimport { useStyles } from '../../hooks/useStyles';\n\n/** @public */\nexport const Icon = (props: IconProps) => {\n const { name, size, className, style, ...restProps } = props;\n const { icons } = useIcons();\n\n const BckstageIcon = icons[name] as ComponentType<Omit<IconProps, 'name'>>;\n\n if (!BckstageIcon) {\n console.error(`Icon \"${name}\" not found or is not a valid component.`);\n return null;\n }\n\n const { classNames } = useStyles('Icon');\n\n return (\n <BckstageIcon\n className={clsx(classNames.root, className)}\n style={{\n ...(size ? { width: size, height: size } : {}),\n ...style,\n }}\n {...restProps}\n />\n );\n};\n"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"Icon.esm.js","sources":["../../../src/components/Icon/Icon.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 { ComponentType } from 'react';\nimport { useIcons } from './context';\nimport type { IconProps } from './types';\nimport clsx from 'clsx';\nimport { useStyles } from '../../hooks/useStyles';\n\n/** @public */\nexport const Icon = (props: IconProps) => {\n const { name, size, className, style, ...restProps } = props;\n const { icons } = useIcons();\n\n const BckstageIcon = icons[name] as ComponentType<Omit<IconProps, 'name'>>;\n\n if (!BckstageIcon) {\n console.error(`Icon \"${name}\" not found or is not a valid component.`);\n return null;\n }\n\n const { classNames } = useStyles('Icon');\n\n return (\n <BckstageIcon\n className={clsx(classNames.root, className)}\n style={{\n ...(size ? { width: size, height: size } : {}),\n ...style,\n }}\n {...restProps}\n />\n );\n};\n"],"names":[],"mappings":";;;;;AAuBO,MAAM,IAAA,GAAO,CAAC,KAAA,KAAqB;AACxC,EAAA,MAAM,EAAE,IAAA,EAAM,IAAA,EAAM,WAAW,KAAA,EAAO,GAAG,WAAU,GAAI,KAAA;AACvD,EAAA,MAAM,EAAE,KAAA,EAAM,GAAI,QAAA,EAAS;AAE3B,EAAA,MAAM,YAAA,GAAe,MAAM,IAAI,CAAA;AAE/B,EAAA,IAAI,CAAC,YAAA,EAAc;AACjB,IAAA,OAAA,CAAQ,KAAA,CAAM,CAAA,MAAA,EAAS,IAAI,CAAA,wCAAA,CAA0C,CAAA;AACrE,IAAA,OAAO,IAAA;AAAA,EACT;AAEA,EAAA,MAAM,EAAE,UAAA,EAAW,GAAI,SAAA,CAAU,MAAM,CAAA;AAEvC,EAAA,uBACE,GAAA;AAAA,IAAC,YAAA;AAAA,IAAA;AAAA,MACC,SAAA,EAAW,IAAA,CAAK,UAAA,CAAW,IAAA,EAAM,SAAS,CAAA;AAAA,MAC1C,KAAA,EAAO;AAAA,QACL,GAAI,OAAO,EAAE,KAAA,EAAO,MAAM,MAAA,EAAQ,IAAA,KAAS,EAAC;AAAA,QAC5C,GAAG;AAAA,OACL;AAAA,MACC,GAAG;AAAA;AAAA,GACN;AAEJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.esm.js","sources":["../../../src/components/Icon/context.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 { createContext, useContext } from 'react';\nimport { icons } from './icons';\nimport type { IconContextProps } from './types';\n\n/** @public */\nexport const IconContext = createContext<IconContextProps>({\n icons,\n});\n\n/** @public */\nexport const useIcons = () => useContext(IconContext);\n"],"names":[],"mappings":";;;AAqBO,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"context.esm.js","sources":["../../../src/components/Icon/context.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 { createContext, useContext } from 'react';\nimport { icons } from './icons';\nimport type { IconContextProps } from './types';\n\n/** @public */\nexport const IconContext = createContext<IconContextProps>({\n icons,\n});\n\n/** @public */\nexport const useIcons = () => useContext(IconContext);\n"],"names":[],"mappings":";;;AAqBO,MAAM,cAAc,aAAA,CAAgC;AAAA,EACzD;AACF,CAAC;AAGM,MAAM,QAAA,GAAW,MAAM,UAAA,CAAW,WAAW;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { RiZoomOutLine, RiZoomInLine, RiYoutubeLine, RiUserLine, RiUploadLine, RiDeleteBin6Line, RiTerminalLine, RiSunLine, RiStarLine, RiSparklingLine, RiSidebarUnfoldLine, RiSidebarFoldLine, RiSearchLine, RiAddLine, RiMoonLine, RiHeartLine, RiGroupLine, RiGitRepositoryLine, RiGithubLine, RiFlowerLine, RiFilterLine, RiEyeOffLine, RiEyeLine, RiExternalLinkLine, RiDownloadLine, RiDiscordLine, RiCodeLine, RiCloudLine, RiCloseLine, RiArrowUpSLine, RiArrowRightSLine, RiArrowLeftSLine, RiArrowDownSLine, RiCheckDoubleLine, RiCheckLine, RiBugLine, RiBracketsLine, RiBracesLine, RiArrowUpCircleLine, RiArrowUpLine, RiArrowRightUpLine, RiArrowRightDownLine, RiArrowRightCircleLine, RiArrowRightLine, RiArrowLeftUpLine, RiArrowLeftDownLine, RiArrowLeftCircleLine, RiArrowLeftLine, RiArrowDropUpLine, RiArrowDropRightLine, RiArrowDropLeftLine, RiArrowDropDownLine, RiArrowDownCircleLine, RiArrowDownLine, RiAlertLine, RiAccountCircleLine } from '@remixicon/react';
|
|
2
2
|
|
|
3
3
|
const icons = {
|
|
4
4
|
"account-circle": RiAccountCircleLine,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icons.esm.js","sources":["../../../src/components/Icon/icons.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\n// We can add custom icons to the list outside of Remix\n\nimport type { IconMap } from './types';\nimport {\n RiHeartLine,\n RiArrowDownLine,\n RiCloudLine,\n RiArrowLeftLine,\n RiArrowRightLine,\n RiArrowUpLine,\n RiDeleteBin6Line,\n RiAddLine,\n RiArrowDownSLine,\n RiArrowUpSLine,\n RiArrowLeftSLine,\n RiArrowRightSLine,\n RiArrowDownCircleLine,\n RiArrowLeftCircleLine,\n RiArrowRightCircleLine,\n RiArrowUpCircleLine,\n RiCheckLine,\n RiMoonLine,\n RiSunLine,\n RiExternalLinkLine,\n RiArrowLeftDownLine,\n RiArrowRightDownLine,\n RiArrowLeftUpLine,\n RiArrowRightUpLine,\n RiArrowDropDownLine,\n RiArrowDropUpLine,\n RiArrowDropLeftLine,\n RiArrowDropRightLine,\n RiSparklingLine,\n RiFlowerLine,\n RiCodeLine,\n RiTerminalLine,\n RiBracketsLine,\n RiBracesLine,\n RiBugLine,\n RiGitRepositoryLine,\n RiCheckDoubleLine,\n RiFilterLine,\n RiEyeLine,\n RiEyeOffLine,\n RiDownloadLine,\n RiUploadLine,\n RiStarLine,\n RiSidebarFoldLine,\n RiSidebarUnfoldLine,\n RiZoomInLine,\n RiZoomOutLine,\n RiAlertLine,\n RiAccountCircleLine,\n RiGroupLine,\n RiUserLine,\n RiGithubLine,\n RiDiscordLine,\n RiYoutubeLine,\n RiCloseLine,\n RiSearchLine,\n} from '@remixicon/react';\n\n/** @public */\nexport const icons: IconMap = {\n 'account-circle': RiAccountCircleLine,\n alert: RiAlertLine,\n 'arrow-down': RiArrowDownLine,\n 'arrow-down-circle': RiArrowDownCircleLine,\n 'caret-down': RiArrowDropDownLine,\n 'caret-left': RiArrowDropLeftLine,\n 'caret-right': RiArrowDropRightLine,\n 'caret-up': RiArrowDropUpLine,\n 'arrow-left': RiArrowLeftLine,\n 'arrow-left-circle': RiArrowLeftCircleLine,\n 'arrow-left-down': RiArrowLeftDownLine,\n 'arrow-left-up': RiArrowLeftUpLine,\n 'arrow-right': RiArrowRightLine,\n 'arrow-right-circle': RiArrowRightCircleLine,\n 'arrow-right-down': RiArrowRightDownLine,\n 'arrow-right-up': RiArrowRightUpLine,\n 'arrow-up': RiArrowUpLine,\n 'arrow-up-circle': RiArrowUpCircleLine,\n braces: RiBracesLine,\n brackets: RiBracketsLine,\n bug: RiBugLine,\n check: RiCheckLine,\n 'check-double': RiCheckDoubleLine,\n 'chevron-down': RiArrowDownSLine,\n 'chevron-left': RiArrowLeftSLine,\n 'chevron-right': RiArrowRightSLine,\n 'chevron-up': RiArrowUpSLine,\n close: RiCloseLine,\n cloud: RiCloudLine,\n code: RiCodeLine,\n discord: RiDiscordLine,\n download: RiDownloadLine,\n 'external-link': RiExternalLinkLine,\n eye: RiEyeLine,\n 'eye-off': RiEyeOffLine,\n filter: RiFilterLine,\n flower: RiFlowerLine,\n github: RiGithubLine,\n 'git-repository': RiGitRepositoryLine,\n group: RiGroupLine,\n heart: RiHeartLine,\n moon: RiMoonLine,\n plus: RiAddLine,\n search: RiSearchLine,\n 'sidebar-fold': RiSidebarFoldLine,\n 'sidebar-unfold': RiSidebarUnfoldLine,\n sparkling: RiSparklingLine,\n star: RiStarLine,\n sun: RiSunLine,\n terminal: RiTerminalLine,\n trash: RiDeleteBin6Line,\n upload: RiUploadLine,\n user: RiUserLine,\n youtube: RiYoutubeLine,\n 'zoom-in': RiZoomInLine,\n 'zoom-out': RiZoomOutLine,\n} as const;\n"],"names":[],"mappings":";;AA+EO,MAAM,
|
|
1
|
+
{"version":3,"file":"icons.esm.js","sources":["../../../src/components/Icon/icons.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\n// We can add custom icons to the list outside of Remix\n\nimport type { IconMap } from './types';\nimport {\n RiHeartLine,\n RiArrowDownLine,\n RiCloudLine,\n RiArrowLeftLine,\n RiArrowRightLine,\n RiArrowUpLine,\n RiDeleteBin6Line,\n RiAddLine,\n RiArrowDownSLine,\n RiArrowUpSLine,\n RiArrowLeftSLine,\n RiArrowRightSLine,\n RiArrowDownCircleLine,\n RiArrowLeftCircleLine,\n RiArrowRightCircleLine,\n RiArrowUpCircleLine,\n RiCheckLine,\n RiMoonLine,\n RiSunLine,\n RiExternalLinkLine,\n RiArrowLeftDownLine,\n RiArrowRightDownLine,\n RiArrowLeftUpLine,\n RiArrowRightUpLine,\n RiArrowDropDownLine,\n RiArrowDropUpLine,\n RiArrowDropLeftLine,\n RiArrowDropRightLine,\n RiSparklingLine,\n RiFlowerLine,\n RiCodeLine,\n RiTerminalLine,\n RiBracketsLine,\n RiBracesLine,\n RiBugLine,\n RiGitRepositoryLine,\n RiCheckDoubleLine,\n RiFilterLine,\n RiEyeLine,\n RiEyeOffLine,\n RiDownloadLine,\n RiUploadLine,\n RiStarLine,\n RiSidebarFoldLine,\n RiSidebarUnfoldLine,\n RiZoomInLine,\n RiZoomOutLine,\n RiAlertLine,\n RiAccountCircleLine,\n RiGroupLine,\n RiUserLine,\n RiGithubLine,\n RiDiscordLine,\n RiYoutubeLine,\n RiCloseLine,\n RiSearchLine,\n} from '@remixicon/react';\n\n/** @public */\nexport const icons: IconMap = {\n 'account-circle': RiAccountCircleLine,\n alert: RiAlertLine,\n 'arrow-down': RiArrowDownLine,\n 'arrow-down-circle': RiArrowDownCircleLine,\n 'caret-down': RiArrowDropDownLine,\n 'caret-left': RiArrowDropLeftLine,\n 'caret-right': RiArrowDropRightLine,\n 'caret-up': RiArrowDropUpLine,\n 'arrow-left': RiArrowLeftLine,\n 'arrow-left-circle': RiArrowLeftCircleLine,\n 'arrow-left-down': RiArrowLeftDownLine,\n 'arrow-left-up': RiArrowLeftUpLine,\n 'arrow-right': RiArrowRightLine,\n 'arrow-right-circle': RiArrowRightCircleLine,\n 'arrow-right-down': RiArrowRightDownLine,\n 'arrow-right-up': RiArrowRightUpLine,\n 'arrow-up': RiArrowUpLine,\n 'arrow-up-circle': RiArrowUpCircleLine,\n braces: RiBracesLine,\n brackets: RiBracketsLine,\n bug: RiBugLine,\n check: RiCheckLine,\n 'check-double': RiCheckDoubleLine,\n 'chevron-down': RiArrowDownSLine,\n 'chevron-left': RiArrowLeftSLine,\n 'chevron-right': RiArrowRightSLine,\n 'chevron-up': RiArrowUpSLine,\n close: RiCloseLine,\n cloud: RiCloudLine,\n code: RiCodeLine,\n discord: RiDiscordLine,\n download: RiDownloadLine,\n 'external-link': RiExternalLinkLine,\n eye: RiEyeLine,\n 'eye-off': RiEyeOffLine,\n filter: RiFilterLine,\n flower: RiFlowerLine,\n github: RiGithubLine,\n 'git-repository': RiGitRepositoryLine,\n group: RiGroupLine,\n heart: RiHeartLine,\n moon: RiMoonLine,\n plus: RiAddLine,\n search: RiSearchLine,\n 'sidebar-fold': RiSidebarFoldLine,\n 'sidebar-unfold': RiSidebarUnfoldLine,\n sparkling: RiSparklingLine,\n star: RiStarLine,\n sun: RiSunLine,\n terminal: RiTerminalLine,\n trash: RiDeleteBin6Line,\n upload: RiUploadLine,\n user: RiUserLine,\n youtube: RiYoutubeLine,\n 'zoom-in': RiZoomInLine,\n 'zoom-out': RiZoomOutLine,\n} as const;\n"],"names":[],"mappings":";;AA+EO,MAAM,KAAA,GAAiB;AAAA,EAC5B,gBAAA,EAAkB,mBAAA;AAAA,EAClB,KAAA,EAAO,WAAA;AAAA,EACP,YAAA,EAAc,eAAA;AAAA,E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MAAA,EAAQ,YAAA;AAAA,EACR,cAAA,EAAgB,iBAAA;AAAA,EAChB,gBAAA,EAAkB,mBAAA;AAAA,EAClB,SAAA,EAAW,eAAA;AAAA,EACX,IAAA,EAAM,UAAA;AAAA,EACN,GAAA,EAAK,SAAA;AAAA,EACL,QAAA,EAAU,cAAA;AAAA,EACV,KAAA,EAAO,gBAAA;AAAA,EACP,MAAA,EAAQ,YAAA;AAAA,EACR,IAAA,EAAM,UAAA;AAAA,EACN,OAAA,EAAS,aAAA;AAAA,EACT,SAAA,EAAW,YAAA;AAAA,EACX,UAAA,EAAY;AACd;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider.esm.js","sources":["../../../src/components/Icon/provider.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 { icons } from './icons';\nimport { IconContext } from './context';\nimport type { IconProviderProps } from './types';\n\n/** @public */\nexport const IconProvider = (props: IconProviderProps) => {\n const { children, overrides } = props;\n\n // Merge provided overrides with default icons\n const combinedIcons = { ...icons, ...overrides };\n\n return (\n <IconContext.Provider value={{ icons: combinedIcons }}>\n {children}\n </IconContext.Provider>\n );\n};\n"],"names":[],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"provider.esm.js","sources":["../../../src/components/Icon/provider.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 { icons } from './icons';\nimport { IconContext } from './context';\nimport type { IconProviderProps } from './types';\n\n/** @public */\nexport const IconProvider = (props: IconProviderProps) => {\n const { children, overrides } = props;\n\n // Merge provided overrides with default icons\n const combinedIcons = { ...icons, ...overrides };\n\n return (\n <IconContext.Provider value={{ icons: combinedIcons }}>\n {children}\n </IconContext.Provider>\n );\n};\n"],"names":[],"mappings":";;;;AAqBO,MAAM,YAAA,GAAe,CAAC,KAAA,KAA6B;AACxD,EAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAU,GAAI,KAAA;AAGhC,EAAA,MAAM,aAAA,GAAgB,EAAE,GAAG,KAAA,EAAO,GAAG,SAAA,EAAU;AAE/C,EAAA,uBACE,GAAA,CAAC,YAAY,QAAA,EAAZ,EAAqB,OAAO,EAAE,KAAA,EAAO,aAAA,EAAc,EACjD,QAAA,EACH,CAAA;AAEJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Link.esm.js","sources":["../../../src/components/Link/Link.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { forwardRef } from 'react';\nimport { Link as AriaLink, RouterProvider } from 'react-aria-components';\nimport clsx from 'clsx';\nimport { useStyles } from '../../hooks/useStyles';\nimport type { LinkProps } from './types';\nimport { useNavigate, useHref } from 'react-router-dom';\nimport { isExternalLink } from '../../utils/isExternalLink';\n\n/** @public */\nexport const Link = forwardRef<HTMLAnchorElement, LinkProps>((props, ref) => {\n const navigate = useNavigate();\n const {\n className,\n variant = 'body',\n weight = 'regular',\n color = 'primary',\n truncate,\n href,\n ...restProps\n } = props;\n\n const { classNames: linkClassNames } = useStyles('Link');\n const { classNames: textClassNames, dataAttributes: textDataAttributes } =\n useStyles('Text', {\n variant,\n weight,\n color,\n });\n\n const isExternal = isExternalLink(href);\n\n // If it's an external link, render AriaLink without RouterProvider\n if (isExternal) {\n return (\n <AriaLink\n ref={ref}\n className={clsx(textClassNames.root, linkClassNames.root, className)}\n data-truncate={truncate}\n href={href}\n {...textDataAttributes}\n {...restProps}\n />\n );\n }\n\n // For internal links, use RouterProvider\n return (\n <RouterProvider navigate={navigate} useHref={useHref}>\n <AriaLink\n ref={ref}\n className={clsx(textClassNames.root, linkClassNames.root, className)}\n data-truncate={truncate}\n {...textDataAttributes}\n href={href}\n {...restProps}\n />\n </RouterProvider>\n );\n});\n\nLink.displayName = 'Link';\n"],"names":["AriaLink"],"mappings":";;;;;;;;AAyBO,MAAM,
|
|
1
|
+
{"version":3,"file":"Link.esm.js","sources":["../../../src/components/Link/Link.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { forwardRef } from 'react';\nimport { Link as AriaLink, RouterProvider } from 'react-aria-components';\nimport clsx from 'clsx';\nimport { useStyles } from '../../hooks/useStyles';\nimport type { LinkProps } from './types';\nimport { useNavigate, useHref } from 'react-router-dom';\nimport { isExternalLink } from '../../utils/isExternalLink';\n\n/** @public */\nexport const Link = forwardRef<HTMLAnchorElement, LinkProps>((props, ref) => {\n const navigate = useNavigate();\n const {\n className,\n variant = 'body',\n weight = 'regular',\n color = 'primary',\n truncate,\n href,\n ...restProps\n } = props;\n\n const { classNames: linkClassNames } = useStyles('Link');\n const { classNames: textClassNames, dataAttributes: textDataAttributes } =\n useStyles('Text', {\n variant,\n weight,\n color,\n });\n\n const isExternal = isExternalLink(href);\n\n // If it's an external link, render AriaLink without RouterProvider\n if (isExternal) {\n return (\n <AriaLink\n ref={ref}\n className={clsx(textClassNames.root, linkClassNames.root, className)}\n data-truncate={truncate}\n href={href}\n {...textDataAttributes}\n {...restProps}\n />\n );\n }\n\n // For internal links, use RouterProvider\n return (\n <RouterProvider navigate={navigate} useHref={useHref}>\n <AriaLink\n ref={ref}\n className={clsx(textClassNames.root, linkClassNames.root, className)}\n data-truncate={truncate}\n {...textDataAttributes}\n href={href}\n {...restProps}\n />\n </RouterProvider>\n );\n});\n\nLink.displayName = 'Link';\n"],"names":["AriaLink"],"mappings":";;;;;;;;AAyBO,MAAM,IAAA,GAAO,UAAA,CAAyC,CAAC,KAAA,EAAO,GAAA,KAAQ;AAC3E,EAAA,MAAM,WAAW,WAAA,EAAY;AAC7B,EAAA,MAAM;AAAA,IACJ,SAAA;AAAA,IACA,OAAA,GAAU,MAAA;AAAA,IACV,MAAA,GAAS,SAAA;AAAA,IACT,KAAA,GAAQ,SAAA;AAAA,IACR,QAAA;AAAA,IACA,IAAA;AAAA,IACA,GAAG;AAAA,GACL,GAAI,KAAA;AAEJ,EAAA,MAAM,EAAE,UAAA,EAAY,cAAA,EAAe,GAAI,UAAU,MAAM,CAAA;AACvD,EAAA,MAAM,EAAE,UAAA,EAAY,cAAA,EAAgB,gBAAgB,kBAAA,EAAmB,GACrE,UAAU,MAAA,EAAQ;AAAA,IAChB,OAAA;AAAA,IACA,MAAA;AAAA,IACA;AAAA,GACD,CAAA;AAEH,EAAA,MAAM,UAAA,GAAa,eAAe,IAAI,CAAA;AAGtC,EAAA,IAAI,UAAA,EAAY;AACd,IAAA,uBACE,GAAA;AAAA,MAACA,MAAA;AAAA,MAAA;AAAA,QACC,GAAA;AAAA,QACA,WAAW,IAAA,CAAK,cAAA,CAAe,IAAA,EAAM,cAAA,CAAe,MAAM,SAAS,CAAA;AAAA,QACnE,eAAA,EAAe,QAAA;AAAA,QACf,IAAA;AAAA,QACC,GAAG,kBAAA;AAAA,QACH,GAAG;AAAA;AAAA,KACN;AAAA,EAEJ;AAGA,EAAA,uBACE,GAAA,CAAC,cAAA,EAAA,EAAe,QAAA,EAAoB,OAAA,EAClC,QAAA,kBAAA,GAAA;AAAA,IAACA,MAAA;AAAA,IAAA;AAAA,MACC,GAAA;AAAA,MACA,WAAW,IAAA,CAAK,cAAA,CAAe,IAAA,EAAM,cAAA,CAAe,MAAM,SAAS,CAAA;AAAA,MACnE,eAAA,EAAe,QAAA;AAAA,MACd,GAAG,kBAAA;AAAA,MACJ,IAAA;AAAA,MACC,GAAG;AAAA;AAAA,GACN,EACF,CAAA;AAEJ,CAAC;AAED,IAAA,CAAK,WAAA,GAAc,MAAA;;;;"}
|
|
@@ -1,224 +1,166 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import clsx from 'clsx';
|
|
5
|
-
import { Combobox } from './Combobox.esm.js';
|
|
6
|
-
import '@remixicon/react';
|
|
7
|
-
import { Icon } from '../Icon/Icon.esm.js';
|
|
8
|
-
import '../Icon/context.esm.js';
|
|
2
|
+
import { MenuTrigger as MenuTrigger$1, SubmenuTrigger as SubmenuTrigger$1, Popover, Menu as Menu$1, ListBox, useFilter, Autocomplete, SearchField, Input, Button, MenuItem as MenuItem$1, RouterProvider, ListBoxItem, MenuSection as MenuSection$1, Header, Separator } from 'react-aria-components';
|
|
3
|
+
import { ScrollArea } from '../ScrollArea/ScrollArea.esm.js';
|
|
9
4
|
import { useStyles } from '../../hooks/useStyles.esm.js';
|
|
5
|
+
import { RiCloseCircleLine, RiArrowRightSLine, RiCheckLine } from '@remixicon/react';
|
|
6
|
+
import { isExternalLink } from '../../utils/isExternalLink.esm.js';
|
|
7
|
+
import { useNavigate, useHref } from 'react-router-dom';
|
|
10
8
|
|
|
11
|
-
const
|
|
9
|
+
const MenuEmptyState = () => {
|
|
12
10
|
const { classNames } = useStyles("Menu");
|
|
13
|
-
return /* @__PURE__ */ jsx(
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
const MenuBackdrop = forwardRef(({ className, ...props }, ref) => {
|
|
24
|
-
const { classNames } = useStyles("Menu");
|
|
25
|
-
return /* @__PURE__ */ jsx(
|
|
26
|
-
Menu$1.Backdrop,
|
|
27
|
-
{
|
|
28
|
-
ref,
|
|
29
|
-
className: clsx(classNames.backdrop, className),
|
|
30
|
-
...props
|
|
31
|
-
}
|
|
32
|
-
);
|
|
33
|
-
});
|
|
34
|
-
MenuBackdrop.displayName = Menu$1.Backdrop.displayName;
|
|
35
|
-
const MenuPositioner = forwardRef(({ className, ...props }, ref) => {
|
|
36
|
-
const { classNames } = useStyles("Menu");
|
|
37
|
-
return /* @__PURE__ */ jsx(
|
|
38
|
-
Menu$1.Positioner,
|
|
39
|
-
{
|
|
40
|
-
ref,
|
|
41
|
-
className: clsx(classNames.positioner, className),
|
|
42
|
-
...props
|
|
43
|
-
}
|
|
44
|
-
);
|
|
45
|
-
});
|
|
46
|
-
MenuPositioner.displayName = Menu$1.Positioner.displayName;
|
|
47
|
-
const MenuPopup = forwardRef(({ className, ...props }, ref) => {
|
|
48
|
-
const { classNames } = useStyles("Menu");
|
|
49
|
-
return /* @__PURE__ */ jsx(
|
|
50
|
-
Menu$1.Popup,
|
|
51
|
-
{
|
|
52
|
-
ref,
|
|
53
|
-
className: clsx(classNames.popup, className),
|
|
54
|
-
...props
|
|
55
|
-
}
|
|
56
|
-
);
|
|
57
|
-
});
|
|
58
|
-
MenuPopup.displayName = Menu$1.Popup.displayName;
|
|
59
|
-
const MenuArrow = forwardRef(({ className, ...props }, ref) => {
|
|
60
|
-
const { classNames } = useStyles("Menu");
|
|
61
|
-
return /* @__PURE__ */ jsx(
|
|
62
|
-
Menu$1.Arrow,
|
|
63
|
-
{
|
|
64
|
-
ref,
|
|
65
|
-
className: clsx(classNames.arrow, className),
|
|
66
|
-
...props
|
|
67
|
-
}
|
|
68
|
-
);
|
|
69
|
-
});
|
|
70
|
-
MenuArrow.displayName = Menu$1.Arrow.displayName;
|
|
71
|
-
const MenuItem = forwardRef(({ className, ...props }, ref) => {
|
|
72
|
-
const { classNames } = useStyles("Menu");
|
|
73
|
-
return /* @__PURE__ */ jsx(
|
|
74
|
-
Menu$1.Item,
|
|
75
|
-
{
|
|
76
|
-
ref,
|
|
77
|
-
className: clsx(classNames.item, className),
|
|
78
|
-
...props
|
|
79
|
-
}
|
|
80
|
-
);
|
|
81
|
-
});
|
|
82
|
-
MenuItem.displayName = Menu$1.Item.displayName;
|
|
83
|
-
const MenuGroup = forwardRef(({ className, ...props }, ref) => {
|
|
84
|
-
const { classNames } = useStyles("Menu");
|
|
85
|
-
return /* @__PURE__ */ jsx(
|
|
86
|
-
Menu$1.Group,
|
|
87
|
-
{
|
|
88
|
-
ref,
|
|
89
|
-
className: clsx(classNames.group, className),
|
|
90
|
-
...props
|
|
91
|
-
}
|
|
92
|
-
);
|
|
93
|
-
});
|
|
94
|
-
MenuGroup.displayName = Menu$1.Group.displayName;
|
|
95
|
-
const MenuGroupLabel = forwardRef(({ className, ...props }, ref) => {
|
|
96
|
-
const { classNames } = useStyles("Menu");
|
|
97
|
-
return /* @__PURE__ */ jsx(
|
|
98
|
-
Menu$1.GroupLabel,
|
|
99
|
-
{
|
|
100
|
-
ref,
|
|
101
|
-
className: clsx(classNames.groupLabel, className),
|
|
102
|
-
...props
|
|
103
|
-
}
|
|
104
|
-
);
|
|
105
|
-
});
|
|
106
|
-
MenuGroupLabel.displayName = Menu$1.GroupLabel.displayName;
|
|
107
|
-
const MenuRadioGroup = forwardRef(({ className, ...props }, ref) => {
|
|
108
|
-
const { classNames } = useStyles("Menu");
|
|
109
|
-
return /* @__PURE__ */ jsx(
|
|
110
|
-
Menu$1.RadioGroup,
|
|
111
|
-
{
|
|
112
|
-
ref,
|
|
113
|
-
className: clsx(classNames.radioGroup, className),
|
|
114
|
-
...props
|
|
115
|
-
}
|
|
116
|
-
);
|
|
117
|
-
});
|
|
118
|
-
MenuRadioGroup.displayName = Menu$1.RadioGroup.displayName;
|
|
119
|
-
const MenuRadioItem = forwardRef(({ className, ...props }, ref) => {
|
|
11
|
+
return /* @__PURE__ */ jsx("div", { className: classNames.emptyState, children: "No results found." });
|
|
12
|
+
};
|
|
13
|
+
const MenuTrigger = (props) => {
|
|
14
|
+
return /* @__PURE__ */ jsx(MenuTrigger$1, { ...props });
|
|
15
|
+
};
|
|
16
|
+
const SubmenuTrigger = (props) => {
|
|
17
|
+
return /* @__PURE__ */ jsx(SubmenuTrigger$1, { ...props });
|
|
18
|
+
};
|
|
19
|
+
const Menu = (props) => {
|
|
20
|
+
const { placement = "bottom start", ...rest } = props;
|
|
120
21
|
const { classNames } = useStyles("Menu");
|
|
121
|
-
return /* @__PURE__ */ jsx(
|
|
122
|
-
Menu$1.
|
|
123
|
-
{
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
22
|
+
return /* @__PURE__ */ jsx(Popover, { className: classNames.popover, placement, children: /* @__PURE__ */ jsxs(ScrollArea.Root, { children: [
|
|
23
|
+
/* @__PURE__ */ jsx(ScrollArea.Viewport, { children: /* @__PURE__ */ jsx(Menu$1, { className: classNames.content, ...rest, children: props.children }) }),
|
|
24
|
+
/* @__PURE__ */ jsx(ScrollArea.Scrollbar, { orientation: "vertical", style: {}, children: /* @__PURE__ */ jsx(ScrollArea.Thumb, {}) })
|
|
25
|
+
] }) });
|
|
26
|
+
};
|
|
27
|
+
const MenuListBox = (props) => {
|
|
28
|
+
const {
|
|
29
|
+
selectionMode = "single",
|
|
30
|
+
placement = "bottom start",
|
|
31
|
+
...rest
|
|
32
|
+
} = props;
|
|
132
33
|
const { classNames } = useStyles("Menu");
|
|
133
|
-
return /* @__PURE__ */ jsx(
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
})
|
|
142
|
-
|
|
143
|
-
|
|
34
|
+
return /* @__PURE__ */ jsx(Popover, { className: classNames.popover, placement, children: /* @__PURE__ */ jsxs(ScrollArea.Root, { children: [
|
|
35
|
+
/* @__PURE__ */ jsx(ScrollArea.Viewport, { children: /* @__PURE__ */ jsx(
|
|
36
|
+
ListBox,
|
|
37
|
+
{
|
|
38
|
+
className: classNames.content,
|
|
39
|
+
selectionMode,
|
|
40
|
+
...rest
|
|
41
|
+
}
|
|
42
|
+
) }),
|
|
43
|
+
/* @__PURE__ */ jsx(ScrollArea.Scrollbar, { orientation: "vertical", style: {}, children: /* @__PURE__ */ jsx(ScrollArea.Thumb, {}) })
|
|
44
|
+
] }) });
|
|
45
|
+
};
|
|
46
|
+
const MenuAutocomplete = (props) => {
|
|
47
|
+
const { placement = "bottom start", ...rest } = props;
|
|
144
48
|
const { classNames } = useStyles("Menu");
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
{
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
49
|
+
const { contains } = useFilter({ sensitivity: "base" });
|
|
50
|
+
return /* @__PURE__ */ jsx(Popover, { className: classNames.popover, placement, children: /* @__PURE__ */ jsxs(Autocomplete, { filter: contains, children: [
|
|
51
|
+
/* @__PURE__ */ jsxs(SearchField, { className: classNames.searchField, children: [
|
|
52
|
+
/* @__PURE__ */ jsx(
|
|
53
|
+
Input,
|
|
54
|
+
{
|
|
55
|
+
className: classNames.searchFieldInput,
|
|
56
|
+
"aria-label": "Search",
|
|
57
|
+
placeholder: props.placeholder || "Search..."
|
|
58
|
+
}
|
|
59
|
+
),
|
|
60
|
+
/* @__PURE__ */ jsx(Button, { className: classNames.searchFieldClear, children: /* @__PURE__ */ jsx(RiCloseCircleLine, {}) })
|
|
61
|
+
] }),
|
|
62
|
+
/* @__PURE__ */ jsxs(ScrollArea.Root, { children: [
|
|
63
|
+
/* @__PURE__ */ jsx(ScrollArea.Viewport, { children: /* @__PURE__ */ jsx(
|
|
64
|
+
Menu$1,
|
|
65
|
+
{
|
|
66
|
+
className: classNames.content,
|
|
67
|
+
renderEmptyState: () => /* @__PURE__ */ jsx(MenuEmptyState, {}),
|
|
68
|
+
...rest
|
|
69
|
+
}
|
|
70
|
+
) }),
|
|
71
|
+
/* @__PURE__ */ jsx(ScrollArea.Scrollbar, { orientation: "vertical", style: {}, children: /* @__PURE__ */ jsx(ScrollArea.Thumb, {}) })
|
|
72
|
+
] })
|
|
73
|
+
] }) });
|
|
74
|
+
};
|
|
75
|
+
const MenuAutocompleteListbox = (props) => {
|
|
76
|
+
const {
|
|
77
|
+
selectionMode = "single",
|
|
78
|
+
placement = "bottom start",
|
|
79
|
+
...rest
|
|
80
|
+
} = props;
|
|
156
81
|
const { classNames } = useStyles("Menu");
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
{
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
82
|
+
const { contains } = useFilter({ sensitivity: "base" });
|
|
83
|
+
return /* @__PURE__ */ jsx(Popover, { className: classNames.popover, placement, children: /* @__PURE__ */ jsxs(Autocomplete, { filter: contains, children: [
|
|
84
|
+
/* @__PURE__ */ jsxs(SearchField, { className: classNames.searchField, children: [
|
|
85
|
+
/* @__PURE__ */ jsx(
|
|
86
|
+
Input,
|
|
87
|
+
{
|
|
88
|
+
className: classNames.searchFieldInput,
|
|
89
|
+
"aria-label": "Search",
|
|
90
|
+
placeholder: props.placeholder || "Search..."
|
|
91
|
+
}
|
|
92
|
+
),
|
|
93
|
+
/* @__PURE__ */ jsx(Button, { className: classNames.searchFieldClear, children: /* @__PURE__ */ jsx(RiCloseCircleLine, {}) })
|
|
94
|
+
] }),
|
|
95
|
+
/* @__PURE__ */ jsxs(ScrollArea.Root, { children: [
|
|
96
|
+
/* @__PURE__ */ jsx(ScrollArea.Viewport, { children: /* @__PURE__ */ jsx(
|
|
97
|
+
ListBox,
|
|
98
|
+
{
|
|
99
|
+
className: classNames.content,
|
|
100
|
+
renderEmptyState: () => /* @__PURE__ */ jsx(MenuEmptyState, {}),
|
|
101
|
+
selectionMode,
|
|
102
|
+
...rest
|
|
103
|
+
}
|
|
104
|
+
) }),
|
|
105
|
+
/* @__PURE__ */ jsx(ScrollArea.Scrollbar, { orientation: "vertical", style: {}, children: /* @__PURE__ */ jsx(ScrollArea.Thumb, {}) })
|
|
106
|
+
] })
|
|
107
|
+
] }) });
|
|
108
|
+
};
|
|
109
|
+
const MenuItem = (props) => {
|
|
110
|
+
const { iconStart, color = "primary", children, href, ...rest } = props;
|
|
168
111
|
const { classNames } = useStyles("Menu");
|
|
169
|
-
|
|
170
|
-
|
|
112
|
+
const navigate = useNavigate();
|
|
113
|
+
const isLink = href !== void 0;
|
|
114
|
+
const isExternal = isExternalLink(href);
|
|
115
|
+
const content = /* @__PURE__ */ jsxs(
|
|
116
|
+
MenuItem$1,
|
|
171
117
|
{
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
118
|
+
className: classNames.item,
|
|
119
|
+
"data-color": color,
|
|
120
|
+
href,
|
|
121
|
+
textValue: typeof children === "string" ? children : void 0,
|
|
122
|
+
...rest,
|
|
175
123
|
children: [
|
|
176
|
-
/* @__PURE__ */
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
name: "chevron-right",
|
|
182
|
-
size: 20
|
|
183
|
-
}
|
|
184
|
-
)
|
|
124
|
+
/* @__PURE__ */ jsxs("div", { className: classNames.itemContent, children: [
|
|
125
|
+
iconStart,
|
|
126
|
+
children
|
|
127
|
+
] }),
|
|
128
|
+
/* @__PURE__ */ jsx("div", { className: classNames.itemArrow, children: /* @__PURE__ */ jsx(RiArrowRightSLine, {}) })
|
|
185
129
|
]
|
|
186
130
|
}
|
|
187
131
|
);
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
132
|
+
if (isLink && !isExternal) {
|
|
133
|
+
return /* @__PURE__ */ jsx(RouterProvider, { navigate, useHref, children: content });
|
|
134
|
+
}
|
|
135
|
+
return content;
|
|
136
|
+
};
|
|
137
|
+
const MenuListBoxItem = (props) => {
|
|
138
|
+
const { children, ...rest } = props;
|
|
191
139
|
const { classNames } = useStyles("Menu");
|
|
192
140
|
return /* @__PURE__ */ jsx(
|
|
193
|
-
|
|
141
|
+
ListBoxItem,
|
|
194
142
|
{
|
|
195
|
-
|
|
196
|
-
className:
|
|
197
|
-
...
|
|
143
|
+
textValue: typeof props.children === "string" ? props.children : void 0,
|
|
144
|
+
className: classNames.itemListBox,
|
|
145
|
+
...rest,
|
|
146
|
+
children: /* @__PURE__ */ jsxs("div", { className: classNames.itemContent, children: [
|
|
147
|
+
/* @__PURE__ */ jsx("div", { className: classNames.itemListBoxCheck, children: /* @__PURE__ */ jsx(RiCheckLine, {}) }),
|
|
148
|
+
children
|
|
149
|
+
] })
|
|
198
150
|
}
|
|
199
151
|
);
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
const
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
Group: MenuGroup,
|
|
212
|
-
GroupLabel: MenuGroupLabel,
|
|
213
|
-
RadioGroup: MenuRadioGroup,
|
|
214
|
-
RadioItem: MenuRadioItem,
|
|
215
|
-
RadioItemIndicator: MenuRadioItemIndicator,
|
|
216
|
-
CheckboxItem: MenuCheckboxItem,
|
|
217
|
-
CheckboxItemIndicator: MenuCheckboxItemIndicator,
|
|
218
|
-
SubmenuTrigger: MenuSubmenuTrigger,
|
|
219
|
-
Separator: MenuSeparator,
|
|
220
|
-
Combobox
|
|
152
|
+
};
|
|
153
|
+
const MenuSection = (props) => {
|
|
154
|
+
const { classNames } = useStyles("Menu");
|
|
155
|
+
return /* @__PURE__ */ jsxs(MenuSection$1, { className: classNames.section, ...props, children: [
|
|
156
|
+
/* @__PURE__ */ jsx(Header, { className: classNames.sectionHeader, children: props.title }),
|
|
157
|
+
props.children
|
|
158
|
+
] });
|
|
159
|
+
};
|
|
160
|
+
const MenuSeparator = (props) => {
|
|
161
|
+
const { classNames } = useStyles("Menu");
|
|
162
|
+
return /* @__PURE__ */ jsx(Separator, { className: classNames.separator, ...props });
|
|
221
163
|
};
|
|
222
164
|
|
|
223
|
-
export { Menu };
|
|
165
|
+
export { Menu, MenuAutocomplete, MenuAutocompleteListbox, MenuItem, MenuListBox, MenuListBoxItem, MenuSection, MenuSeparator, MenuTrigger, SubmenuTrigger };
|
|
224
166
|
//# sourceMappingURL=Menu.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Menu.esm.js","sources":["../../../src/components/Menu/Menu.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 { Menu as MenuPrimitive } from '@base-ui-components/react/menu';\nimport clsx from 'clsx';\nimport { MenuComponent } from './types';\nimport { Combobox } from './Combobox';\nimport { Icon } from '../Icon';\nimport { useStyles } from '../../hooks/useStyles';\n\nconst MenuTrigger = forwardRef<\n React.ElementRef<typeof MenuPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof MenuPrimitive.Trigger>\n>(({ className, ...props }, ref) => {\n const { classNames } = useStyles('Menu');\n\n return (\n <MenuPrimitive.Trigger\n ref={ref}\n className={clsx(classNames.trigger, className)}\n {...props}\n />\n );\n});\nMenuTrigger.displayName = MenuPrimitive.Trigger.displayName;\n\nconst MenuBackdrop = forwardRef<\n React.ElementRef<typeof MenuPrimitive.Backdrop>,\n React.ComponentPropsWithoutRef<typeof MenuPrimitive.Backdrop>\n>(({ className, ...props }, ref) => {\n const { classNames } = useStyles('Menu');\n\n return (\n <MenuPrimitive.Backdrop\n ref={ref}\n className={clsx(classNames.backdrop, className)}\n {...props}\n />\n );\n});\nMenuBackdrop.displayName = MenuPrimitive.Backdrop.displayName;\n\nconst MenuPositioner = forwardRef<\n React.ElementRef<typeof MenuPrimitive.Positioner>,\n React.ComponentPropsWithoutRef<typeof MenuPrimitive.Positioner>\n>(({ className, ...props }, ref) => {\n const { classNames } = useStyles('Menu');\n\n return (\n <MenuPrimitive.Positioner\n ref={ref}\n className={clsx(classNames.positioner, className)}\n {...props}\n />\n );\n});\nMenuPositioner.displayName = MenuPrimitive.Positioner.displayName;\n\nconst MenuPopup = forwardRef<\n React.ElementRef<typeof MenuPrimitive.Popup>,\n React.ComponentPropsWithoutRef<typeof MenuPrimitive.Popup>\n>(({ className, ...props }, ref) => {\n const { classNames } = useStyles('Menu');\n\n return (\n <MenuPrimitive.Popup\n ref={ref}\n className={clsx(classNames.popup, className)}\n {...props}\n />\n );\n});\nMenuPopup.displayName = MenuPrimitive.Popup.displayName;\n\nconst MenuArrow = forwardRef<\n React.ElementRef<typeof MenuPrimitive.Arrow>,\n React.ComponentPropsWithoutRef<typeof MenuPrimitive.Arrow>\n>(({ className, ...props }, ref) => {\n const { classNames } = useStyles('Menu');\n\n return (\n <MenuPrimitive.Arrow\n ref={ref}\n className={clsx(classNames.arrow, className)}\n {...props}\n />\n );\n});\nMenuArrow.displayName = MenuPrimitive.Arrow.displayName;\n\nconst MenuItem = forwardRef<\n React.ElementRef<typeof MenuPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof MenuPrimitive.Item>\n>(({ className, ...props }, ref) => {\n const { classNames } = useStyles('Menu');\n\n return (\n <MenuPrimitive.Item\n ref={ref}\n className={clsx(classNames.item, className)}\n {...props}\n />\n );\n});\nMenuItem.displayName = MenuPrimitive.Item.displayName;\n\nconst MenuGroup = forwardRef<\n React.ElementRef<typeof MenuPrimitive.Group>,\n React.ComponentPropsWithoutRef<typeof MenuPrimitive.Group>\n>(({ className, ...props }, ref) => {\n const { classNames } = useStyles('Menu');\n\n return (\n <MenuPrimitive.Group\n ref={ref}\n className={clsx(classNames.group, className)}\n {...props}\n />\n );\n});\nMenuGroup.displayName = MenuPrimitive.Group.displayName;\n\nconst MenuGroupLabel = forwardRef<\n React.ElementRef<typeof MenuPrimitive.GroupLabel>,\n React.ComponentPropsWithoutRef<typeof MenuPrimitive.GroupLabel>\n>(({ className, ...props }, ref) => {\n const { classNames } = useStyles('Menu');\n\n return (\n <MenuPrimitive.GroupLabel\n ref={ref}\n className={clsx(classNames.groupLabel, className)}\n {...props}\n />\n );\n});\nMenuGroupLabel.displayName = MenuPrimitive.GroupLabel.displayName;\n\nconst MenuRadioGroup = forwardRef<\n React.ElementRef<typeof MenuPrimitive.RadioGroup>,\n React.ComponentPropsWithoutRef<typeof MenuPrimitive.RadioGroup>\n>(({ className, ...props }, ref) => {\n const { classNames } = useStyles('Menu');\n\n return (\n <MenuPrimitive.RadioGroup\n ref={ref}\n className={clsx(classNames.radioGroup, className)}\n {...props}\n />\n );\n});\nMenuRadioGroup.displayName = MenuPrimitive.RadioGroup.displayName;\n\nconst MenuRadioItem = forwardRef<\n React.ElementRef<typeof MenuPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof MenuPrimitive.RadioItem>\n>(({ className, ...props }, ref) => {\n const { classNames } = useStyles('Menu');\n\n return (\n <MenuPrimitive.RadioItem\n ref={ref}\n className={clsx(classNames.radioItem, className)}\n {...props}\n />\n );\n});\nMenuRadioItem.displayName = MenuPrimitive.RadioItem.displayName;\n\nconst MenuRadioItemIndicator = forwardRef<\n React.ElementRef<typeof MenuPrimitive.RadioItemIndicator>,\n React.ComponentPropsWithoutRef<typeof MenuPrimitive.RadioItemIndicator>\n>(({ className, ...props }, ref) => {\n const { classNames } = useStyles('Menu');\n\n return (\n <MenuPrimitive.RadioItemIndicator\n ref={ref}\n className={clsx(classNames.radioItemIndicator, className)}\n {...props}\n />\n );\n});\nMenuRadioItemIndicator.displayName =\n MenuPrimitive.RadioItemIndicator.displayName;\n\nconst MenuCheckboxItem = forwardRef<\n React.ElementRef<typeof MenuPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof MenuPrimitive.CheckboxItem>\n>(({ className, ...props }, ref) => {\n const { classNames } = useStyles('Menu');\n\n return (\n <MenuPrimitive.CheckboxItem\n ref={ref}\n className={clsx(classNames.checkboxItem, className)}\n {...props}\n />\n );\n});\nMenuCheckboxItem.displayName = MenuPrimitive.CheckboxItem.displayName;\n\nconst MenuCheckboxItemIndicator = forwardRef<\n React.ElementRef<typeof MenuPrimitive.CheckboxItemIndicator>,\n React.ComponentPropsWithoutRef<typeof MenuPrimitive.CheckboxItemIndicator>\n>(({ className, ...props }, ref) => {\n const { classNames } = useStyles('Menu');\n\n return (\n <MenuPrimitive.CheckboxItemIndicator\n ref={ref}\n className={clsx(classNames.checkboxItemIndicator, className)}\n {...props}\n />\n );\n});\nMenuCheckboxItemIndicator.displayName =\n MenuPrimitive.CheckboxItemIndicator.displayName;\n\nconst MenuSubmenuTrigger = forwardRef<\n React.ElementRef<typeof MenuPrimitive.SubmenuTrigger>,\n React.ComponentPropsWithoutRef<typeof MenuPrimitive.SubmenuTrigger>\n>(({ className, children, ...props }, ref) => {\n const { classNames } = useStyles('Menu');\n\n return (\n <MenuPrimitive.SubmenuTrigger\n ref={ref}\n className={clsx(classNames.submenuTrigger, className)}\n {...props}\n >\n <div>{children}</div>\n <Icon\n aria-label=\"Submenu indicator icon\"\n name=\"chevron-right\"\n size={20}\n />\n </MenuPrimitive.SubmenuTrigger>\n );\n});\nMenuSubmenuTrigger.displayName = MenuPrimitive.SubmenuTrigger.displayName;\n\nconst MenuSeparator = forwardRef<\n React.ElementRef<typeof MenuPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof MenuPrimitive.Separator>\n>(({ className, ...props }, ref) => {\n const { classNames } = useStyles('Menu');\n\n return (\n <MenuPrimitive.Separator\n ref={ref}\n className={clsx(classNames.separator, className)}\n {...props}\n />\n );\n});\nMenuSeparator.displayName = MenuPrimitive.Separator.displayName;\n\n/** @public */\nexport const Menu: MenuComponent = {\n Root: MenuPrimitive.Root,\n Trigger: MenuTrigger,\n Portal: MenuPrimitive.Portal,\n Backdrop: MenuBackdrop,\n Positioner: MenuPositioner,\n Popup: MenuPopup,\n Arrow: MenuArrow,\n Item: MenuItem,\n Group: MenuGroup,\n GroupLabel: MenuGroupLabel,\n RadioGroup: MenuRadioGroup,\n RadioItem: MenuRadioItem,\n RadioItemIndicator: MenuRadioItemIndicator,\n CheckboxItem: MenuCheckboxItem,\n CheckboxItemIndicator: MenuCheckboxItemIndicator,\n SubmenuTrigger: MenuSubmenuTrigger,\n Separator: MenuSeparator,\n Combobox,\n};\n"],"names":["MenuPrimitive"],"mappings":";;;;;;;;;;AAwBA,MAAM,WAAA,GAAc,WAGlB,CAAC,EAAE,WAAW,GAAG,KAAA,IAAS,GAAQ,KAAA;AAClC,EAAA,MAAM,EAAE,UAAA,EAAe,GAAA,SAAA,CAAU,MAAM,CAAA;AAEvC,EACE,uBAAA,GAAA;AAAA,IAACA,MAAc,CAAA,OAAA;AAAA,IAAd;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AG;AAAA;AAAA,GACN;AAEJ,CAAC,CAAA;AACD,aAAc,CAAA,WAAA,GAAcA,OAAc,SAAU,CAAA,WAAA;AAG7C,MAAM,IAAsB,GAAA;AAAA,EACjC,MAAMA,MAAc,CAAA,IAAA;AAAA,EACpB,OAAS,EAAA,WAAA;AAAA,EACT,QAAQA,MAAc,CAAA,MAAA;AAAA,EACtB,QAAU,EAAA,YAAA;AAAA,EACV,UAAY,EAAA,cAAA;AAAA,EACZ,KAAO,EAAA,SAAA;AAAA,EACP,KAAO,EAAA,SAAA;AAAA,EACP,IAAM,EAAA,QAAA;AAAA,EACN,KAAO,EAAA,SAAA;AAAA,EACP,UAAY,EAAA,cAAA;AAAA,EACZ,UAAY,EAAA,cAAA;AAAA,EACZ,SAAW,EAAA,aAAA;AAAA,EACX,kBAAoB,EAAA,sBAAA;AAAA,EACpB,YAAc,EAAA,gBAAA;AAAA,EACd,qBAAuB,EAAA,yBAAA;AAAA,EACvB,cAAgB,EAAA,kBAAA;AAAA,EAChB,SAAW,EAAA,aAAA;AAAA,EACX;AACF;;;;"}
|
|
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 RouterProvider,\n} from 'react-aria-components';\nimport { ScrollArea } from '../ScrollArea';\nimport { useStyles } from '../../hooks/useStyles';\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 { isExternalLink } from '../../utils/isExternalLink';\nimport { useNavigate, useHref } from 'react-router-dom';\n\nconst MenuEmptyState = () => {\n const { classNames } = useStyles('Menu');\n\n return <div className={classNames.emptyState}>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 { placement = 'bottom start', ...rest } = props;\n const { classNames } = useStyles('Menu');\n\n return (\n <RAPopover className={classNames.popover} placement={placement}>\n <ScrollArea.Root>\n <ScrollArea.Viewport>\n <RAMenu className={classNames.content} {...rest}>\n {props.children}\n </RAMenu>\n </ScrollArea.Viewport>\n <ScrollArea.Scrollbar orientation=\"vertical\" style={{}}>\n <ScrollArea.Thumb />\n </ScrollArea.Scrollbar>\n </ScrollArea.Root>\n </RAPopover>\n );\n};\n\n/** @public */\nexport const MenuListBox = (props: MenuListBoxProps<object>) => {\n const {\n selectionMode = 'single',\n placement = 'bottom start',\n ...rest\n } = props;\n const { classNames } = useStyles('Menu');\n\n return (\n <RAPopover className={classNames.popover} placement={placement}>\n <ScrollArea.Root>\n <ScrollArea.Viewport>\n <RAListBox\n className={classNames.content}\n selectionMode={selectionMode}\n {...rest}\n />\n </ScrollArea.Viewport>\n <ScrollArea.Scrollbar orientation=\"vertical\" style={{}}>\n <ScrollArea.Thumb />\n </ScrollArea.Scrollbar>\n </ScrollArea.Root>\n </RAPopover>\n );\n};\n\n/** @public */\nexport const MenuAutocomplete = (props: MenuAutocompleteProps<object>) => {\n const { placement = 'bottom start', ...rest } = props;\n const { classNames } = useStyles('Menu');\n const { contains } = useFilter({ sensitivity: 'base' });\n\n return (\n <RAPopover className={classNames.popover} placement={placement}>\n <RAAutocomplete filter={contains}>\n <RASearchField className={classNames.searchField}>\n <RAInput\n className={classNames.searchFieldInput}\n aria-label=\"Search\"\n placeholder={props.placeholder || 'Search...'}\n />\n <RAButton className={classNames.searchFieldClear}>\n <RiCloseCircleLine />\n </RAButton>\n </RASearchField>\n <ScrollArea.Root>\n <ScrollArea.Viewport>\n <RAMenu\n className={classNames.content}\n renderEmptyState={() => <MenuEmptyState />}\n {...rest}\n />\n </ScrollArea.Viewport>\n <ScrollArea.Scrollbar orientation=\"vertical\" style={{}}>\n <ScrollArea.Thumb />\n </ScrollArea.Scrollbar>\n </ScrollArea.Root>\n </RAAutocomplete>\n </RAPopover>\n );\n};\n\n/** @public */\nexport const MenuAutocompleteListbox = (\n props: MenuAutocompleteListBoxProps<object>,\n) => {\n const {\n selectionMode = 'single',\n placement = 'bottom start',\n ...rest\n } = props;\n const { classNames } = useStyles('Menu');\n const { contains } = useFilter({ sensitivity: 'base' });\n\n return (\n <RAPopover className={classNames.popover} placement={placement}>\n <RAAutocomplete filter={contains}>\n <RASearchField className={classNames.searchField}>\n <RAInput\n className={classNames.searchFieldInput}\n aria-label=\"Search\"\n placeholder={props.placeholder || 'Search...'}\n />\n <RAButton className={classNames.searchFieldClear}>\n <RiCloseCircleLine />\n </RAButton>\n </RASearchField>\n <ScrollArea.Root>\n <ScrollArea.Viewport>\n <RAListBox\n className={classNames.content}\n renderEmptyState={() => <MenuEmptyState />}\n selectionMode={selectionMode}\n {...rest}\n />\n </ScrollArea.Viewport>\n <ScrollArea.Scrollbar orientation=\"vertical\" style={{}}>\n <ScrollArea.Thumb />\n </ScrollArea.Scrollbar>\n </ScrollArea.Root>\n </RAAutocomplete>\n </RAPopover>\n );\n};\n\n/** @public */\nexport const MenuItem = (props: MenuItemProps) => {\n const { iconStart, color = 'primary', children, href, ...rest } = props;\n const { classNames } = useStyles('Menu');\n const navigate = useNavigate();\n\n const isLink = href !== undefined;\n const isExternal = isExternalLink(href);\n\n const content = (\n <RAMenuItem\n className={classNames.item}\n data-color={color}\n href={href}\n textValue={typeof children === 'string' ? children : undefined}\n {...rest}\n >\n <div className={classNames.itemContent}>\n {iconStart}\n {children}\n </div>\n <div className={classNames.itemArrow}>\n <RiArrowRightSLine />\n </div>\n </RAMenuItem>\n );\n\n if (isLink && !isExternal) {\n return (\n <RouterProvider navigate={navigate} useHref={useHref}>\n {content}\n </RouterProvider>\n );\n }\n\n return content;\n};\n\n/** @public */\nexport const MenuListBoxItem = (props: MenuListBoxItemProps) => {\n const { children, ...rest } = props;\n const { classNames } = useStyles('Menu');\n\n return (\n <RAListBoxItem\n textValue={\n typeof props.children === 'string' ? props.children : undefined\n }\n className={classNames.itemListBox}\n {...rest}\n >\n <div className={classNames.itemContent}>\n <div className={classNames.itemListBoxCheck}>\n <RiCheckLine />\n </div>\n {children}\n </div>\n </RAListBoxItem>\n );\n};\n\n/** @public */\nexport const MenuSection = (props: MenuSectionProps<object>) => {\n const { classNames } = useStyles('Menu');\n\n return (\n <RAMenuSection className={classNames.section} {...props}>\n <RAMenuHeader className={classNames.sectionHeader}>\n {props.title}\n </RAMenuHeader>\n {props.children}\n </RAMenuSection>\n );\n};\n\n/** @public */\nexport const MenuSeparator = (props: MenuSeparatorProps) => {\n const { classNames } = useStyles('Menu');\n\n return <RAMenuSeparator className={classNames.separator} {...props} />;\n};\n"],"names":["RAMenuTrigger","RAMenuSubmenuTrigger","RAPopover","RAMenu","RAListBox","RAAutocomplete","RASearchField","RAInput","RAButton","R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,IAAA;AAAA,MACC,WACE,OAAO,KAAA,CAAM,QAAA,KAAa,QAAA,GAAW,MAAM,QAAA,GAAW,MAAA;AAAA,MAExD,WAAW,UAAA,CAAW,WAAA;AAAA,MACrB,GAAG,IAAA;AAAA,MAEJ,QAAA,kBAAA,IAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,UAAA,CAAW,WAAA,EACzB,QAAA,EAAA;AAAA,wBAAA,GAAA,CAAC,SAAI,SAAA,EAAW,UAAA,CAAW,gBAAA,EACzB,QAAA,kBAAA,GAAA,CAAC,eAAY,CAAA,EACf,CAAA;AAAA,QACC;AAAA,OAAA,EACH;AAAA;AAAA,GACF;AAEJ;AAGO,MAAM,WAAA,GAAc,CAAC,KAAA,KAAoC;AAC9D,EAAA,MAAM,EAAE,UAAA,EAAW,GAAI,SAAA,CAAU,MAAM,CAAA;AAEvC,EAAA,4BACGC,aAAA,EAAA,EAAc,SAAA,EAAW,UAAA,CAAW,OAAA,EAAU,GAAG,KAAA,EAChD,QAAA,EAAA;AAAA,oBAAA,GAAA,CAACC,MAAA,EAAA,EAAa,SAAA,EAAW,UAAA,CAAW,aAAA,EACjC,gBAAM,KAAA,EACT,CAAA;AAAA,IACC,KAAA,CAAM;AAAA,GAAA,EACT,CAAA;AAEJ;AAGO,MAAM,aAAA,GAAgB,CAAC,KAAA,KAA8B;AAC1D,EAAA,MAAM,EAAE,UAAA,EAAW,GAAI,SAAA,CAAU,MAAM,CAAA;AAEvC,EAAA,2BAAQC,SAAA,EAAA,EAAgB,SAAA,EAAW,UAAA,CAAW,SAAA,EAAY,GAAG,KAAA,EAAO,CAAA;AACtE;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioGroup.esm.js","sources":["../../../src/components/RadioGroup/RadioGroup.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 {\n RadioGroup as AriaRadioGroup,\n Radio as AriaRadio,\n} from 'react-aria-components';\nimport clsx from 'clsx';\nimport { FieldLabel } from '../FieldLabel';\nimport { FieldError } from '../FieldError';\nimport { useStyles } from '../../hooks/useStyles';\n\nimport type { RadioGroupProps, RadioProps } from './types';\n\n/** @public */\nexport const RadioGroup = forwardRef<HTMLDivElement, RadioGroupProps>(\n (props, ref) => {\n const {\n className,\n label,\n secondaryLabel,\n description,\n isRequired,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n children,\n ...rest\n } = props;\n\n const { classNames } = useStyles('RadioGroup');\n\n useEffect(() => {\n if (!label && !ariaLabel && !ariaLabelledBy) {\n console.warn(\n 'RadioGroup requires either a visible label, aria-label, or aria-labelledby for accessibility',\n );\n }\n }, [label, ariaLabel, ariaLabelledBy]);\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 return (\n <AriaRadioGroup\n className={clsx(classNames.root, className)}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n {...rest}\n ref={ref}\n >\n <FieldLabel\n label={label}\n secondaryLabel={secondaryLabelText}\n description={description}\n />\n <div className={classNames.content}>{children}</div>\n <FieldError />\n </AriaRadioGroup>\n );\n },\n);\n\nRadioGroup.displayName = 'RadioGroup';\n\n/** @public */\nexport const Radio = forwardRef<HTMLLabelElement, RadioProps>((props, ref) => {\n const { className, ...rest } = props;\n\n const { classNames } = useStyles('RadioGroup');\n\n return (\n <AriaRadio\n className={clsx(classNames.radio, className)}\n {...rest}\n ref={ref}\n />\n );\n});\n\nRadioGroup.displayName = 'RadioGroup';\n"],"names":["AriaRadioGroup","AriaRadio"],"mappings":";;;;;;;;AA6BO,MAAM,
|
|
1
|
+
{"version":3,"file":"RadioGroup.esm.js","sources":["../../../src/components/RadioGroup/RadioGroup.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 {\n RadioGroup as AriaRadioGroup,\n Radio as AriaRadio,\n} from 'react-aria-components';\nimport clsx from 'clsx';\nimport { FieldLabel } from '../FieldLabel';\nimport { FieldError } from '../FieldError';\nimport { useStyles } from '../../hooks/useStyles';\n\nimport type { RadioGroupProps, RadioProps } from './types';\n\n/** @public */\nexport const RadioGroup = forwardRef<HTMLDivElement, RadioGroupProps>(\n (props, ref) => {\n const {\n className,\n label,\n secondaryLabel,\n description,\n isRequired,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n children,\n ...rest\n } = props;\n\n const { classNames } = useStyles('RadioGroup');\n\n useEffect(() => {\n if (!label && !ariaLabel && !ariaLabelledBy) {\n console.warn(\n 'RadioGroup requires either a visible label, aria-label, or aria-labelledby for accessibility',\n );\n }\n }, [label, ariaLabel, ariaLabelledBy]);\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 return (\n <AriaRadioGroup\n className={clsx(classNames.root, className)}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n {...rest}\n ref={ref}\n >\n <FieldLabel\n label={label}\n secondaryLabel={secondaryLabelText}\n description={description}\n />\n <div className={classNames.content}>{children}</div>\n <FieldError />\n </AriaRadioGroup>\n );\n },\n);\n\nRadioGroup.displayName = 'RadioGroup';\n\n/** @public */\nexport const Radio = forwardRef<HTMLLabelElement, RadioProps>((props, ref) => {\n const { className, ...rest } = props;\n\n const { classNames } = useStyles('RadioGroup');\n\n return (\n <AriaRadio\n className={clsx(classNames.radio, className)}\n {...rest}\n ref={ref}\n />\n );\n});\n\nRadioGroup.displayName = 'RadioGroup';\n"],"names":["AriaRadioGroup","AriaRadio"],"mappings":";;;;;;;;AA6BO,MAAM,UAAA,GAAa,UAAA;AAAA,EACxB,CAAC,OAAO,GAAA,KAAQ;AACd,IAAA,MAAM;AAAA,MACJ,SAAA;AAAA,MACA,KAAA;AAAA,MACA,cAAA;AAAA,MACA,WAAA;AAAA,MACA,UAAA;AAAA,MACA,YAAA,EAAc,SAAA;AAAA,MACd,iBAAA,EAAmB,cAAA;AAAA,MACnB,QAAA;AAAA,MACA,GAAG;AAAA,KACL,GAAI,KAAA;AAEJ,IAAA,MAAM,EAAE,UAAA,EAAW,GAAI,SAAA,CAAU,YAAY,CAAA;AAE7C,IAAA,SAAA,CAAU,MAAM;AACd,MAAA,IAAI,CAAC,KAAA,IAAS,CAAC,SAAA,IAAa,CAAC,cAAA,EAAgB;AAC3C,QAAA,OAAA,CAAQ,IAAA;AAAA,UACN;AAAA,SACF;AAAA,MACF;AAAA,IACF,CAAA,EAAG,CAAC,KAAA,EAAO,SAAA,EAAW,cAAc,CAAC,CAAA;AAGrC,IAAA,MAAM,kBAAA,GACJ,cAAA,KAAmB,UAAA,GAAa,UAAA,GAAa,IAAA,CAAA;AAE/C,IAAA,uBACE,IAAA;AAAA,MAACA,YAAA;AAAA,MAAA;AAAA,QACC,SAAA,EAAW,IAAA,CAAK,UAAA,CAAW,IAAA,EAAM,SAAS,CAAA;AAAA,QAC1C,YAAA,EAAY,SAAA;AAAA,QACZ,iBAAA,EAAiB,cAAA;AAAA,QAChB,GAAG,IAAA;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;AAAA;AAAA,WACF;AAAA,0BACA,GAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,UAAA,CAAW,SAAU,QAAA,EAAS,CAAA;AAAA,8BAC7C,UAAA,EAAA,EAAW;AAAA;AAAA;AAAA,KACd;AAAA,EAEJ;AACF;AAEA,UAAA,CAAW,WAAA,GAAc,YAAA;AAGlB,MAAM,KAAA,GAAQ,UAAA,CAAyC,CAAC,KAAA,EAAO,GAAA,KAAQ;AAC5E,EAAA,MAAM,EAAE,SAAA,EAAW,GAAG,IAAA,EAAK,GAAI,KAAA;AAE/B,EAAA,MAAM,EAAE,UAAA,EAAW,GAAI,SAAA,CAAU,YAAY,CAAA;AAE7C,EAAA,uBACE,GAAA;AAAA,IAACC,OAAA;AAAA,IAAA;AAAA,MACC,SAAA,EAAW,IAAA,CAAK,UAAA,CAAW,KAAA,EAAO,SAAS,CAAA;AAAA,MAC1C,GAAG,IAAA;AAAA,MACJ;AAAA;AAAA,GACF;AAEJ,CAAC;AAED,UAAA,CAAW,WAAA,GAAc,YAAA;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScrollArea.esm.js","sources":["../../../src/components/ScrollArea/ScrollArea.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 { ScrollArea as ScrollAreaPrimitive } from '@base-ui-components/react/scroll-area';\nimport clsx from 'clsx';\nimport { useStyles } from '../../hooks/useStyles';\n\nconst ScrollAreaRoot = forwardRef<\n React.ElementRef<typeof ScrollAreaPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root>\n>(({ className, ...props }, ref) => {\n const { classNames } = useStyles('ScrollArea');\n\n return (\n <ScrollAreaPrimitive.Root\n ref={ref}\n className={clsx(classNames.root, className)}\n {...props}\n />\n );\n});\nScrollAreaRoot.displayName = ScrollAreaPrimitive.Root.displayName;\n\nconst ScrollAreaViewport = forwardRef<\n React.ElementRef<typeof ScrollAreaPrimitive.Viewport>,\n React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Viewport>\n>(({ className, ...props }, ref) => {\n const { classNames } = useStyles('ScrollArea');\n\n return (\n <ScrollAreaPrimitive.Viewport\n ref={ref}\n className={clsx(classNames.viewport, className)}\n {...props}\n />\n );\n});\nScrollAreaViewport.displayName = ScrollAreaPrimitive.Viewport.displayName;\n\nconst ScrollAreaScrollbar = forwardRef<\n React.ElementRef<typeof ScrollAreaPrimitive.Scrollbar>,\n React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Scrollbar>\n>(({ className, ...props }, ref) => {\n const { classNames } = useStyles('ScrollArea');\n\n return (\n <ScrollAreaPrimitive.Scrollbar\n ref={ref}\n className={clsx(classNames.scrollbar, className)}\n {...props}\n />\n );\n});\nScrollAreaScrollbar.displayName = ScrollAreaPrimitive.Scrollbar.displayName;\n\nconst ScrollAreaThumb = forwardRef<\n React.ElementRef<typeof ScrollAreaPrimitive.Thumb>,\n React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Thumb>\n>(({ className, ...props }, ref) => {\n const { classNames } = useStyles('ScrollArea');\n\n return (\n <ScrollAreaPrimitive.Thumb\n ref={ref}\n className={clsx(classNames.thumb, className)}\n {...props}\n />\n );\n});\nScrollAreaThumb.displayName = ScrollAreaPrimitive.Thumb.displayName;\n\n/** @public */\nexport const ScrollArea = {\n Root: ScrollAreaRoot,\n Viewport: ScrollAreaViewport,\n Scrollbar: ScrollAreaScrollbar,\n Thumb: ScrollAreaThumb,\n};\n"],"names":["ScrollAreaPrimitive"],"mappings":";;;;;;AAqBA,MAAM,cAAA,GAAiB,WAGrB,CAAC,EAAE,WAAW,GAAG,KAAA,IAAS,
|
|
1
|
+
{"version":3,"file":"ScrollArea.esm.js","sources":["../../../src/components/ScrollArea/ScrollArea.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 { ScrollArea as ScrollAreaPrimitive } from '@base-ui-components/react/scroll-area';\nimport clsx from 'clsx';\nimport { useStyles } from '../../hooks/useStyles';\n\nconst ScrollAreaRoot = forwardRef<\n React.ElementRef<typeof ScrollAreaPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root>\n>(({ className, ...props }, ref) => {\n const { classNames } = useStyles('ScrollArea');\n\n return (\n <ScrollAreaPrimitive.Root\n ref={ref}\n className={clsx(classNames.root, className)}\n {...props}\n />\n );\n});\nScrollAreaRoot.displayName = ScrollAreaPrimitive.Root.displayName;\n\nconst ScrollAreaViewport = forwardRef<\n React.ElementRef<typeof ScrollAreaPrimitive.Viewport>,\n React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Viewport>\n>(({ className, ...props }, ref) => {\n const { classNames } = useStyles('ScrollArea');\n\n return (\n <ScrollAreaPrimitive.Viewport\n ref={ref}\n className={clsx(classNames.viewport, className)}\n {...props}\n />\n );\n});\nScrollAreaViewport.displayName = ScrollAreaPrimitive.Viewport.displayName;\n\nconst ScrollAreaScrollbar = forwardRef<\n React.ElementRef<typeof ScrollAreaPrimitive.Scrollbar>,\n React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Scrollbar>\n>(({ className, ...props }, ref) => {\n const { classNames } = useStyles('ScrollArea');\n\n return (\n <ScrollAreaPrimitive.Scrollbar\n ref={ref}\n className={clsx(classNames.scrollbar, className)}\n {...props}\n />\n );\n});\nScrollAreaScrollbar.displayName = ScrollAreaPrimitive.Scrollbar.displayName;\n\nconst ScrollAreaThumb = forwardRef<\n React.ElementRef<typeof ScrollAreaPrimitive.Thumb>,\n React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Thumb>\n>(({ className, ...props }, ref) => {\n const { classNames } = useStyles('ScrollArea');\n\n return (\n <ScrollAreaPrimitive.Thumb\n ref={ref}\n className={clsx(classNames.thumb, className)}\n {...props}\n />\n );\n});\nScrollAreaThumb.displayName = ScrollAreaPrimitive.Thumb.displayName;\n\n/** @public */\nexport const ScrollArea = {\n Root: ScrollAreaRoot,\n Viewport: ScrollAreaViewport,\n Scrollbar: ScrollAreaScrollbar,\n Thumb: ScrollAreaThumb,\n};\n"],"names":["ScrollAreaPrimitive"],"mappings":";;;;;;AAqBA,MAAM,cAAA,GAAiB,WAGrB,CAAC,EAAE,WAAW,GAAG,KAAA,IAAS,GAAA,KAAQ;AAClC,EAAA,MAAM,EAAE,UAAA,EAAW,GAAI,SAAA,CAAU,YAAY,CAAA;AAE7C,EAAA,uBACE,GAAA;AAAA,IAACA,YAAA,CAAoB,IAAA;AAAA,IAApB;AAAA,MACC,GAAA;AAAA,MACA,SAAA,EAAW,IAAA,CAAK,UAAA,CAAW,IAAA,EAAM,SAAS,CAAA;AAAA,MACzC,GAAG;AAAA;AAAA,GACN;AAEJ,CAAC,CAAA;AACD,cAAA,CAAe,WAAA,GAAcA,aAAoB,IAAA,CAAK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