@backstage/ui 0.7.0-next.2 → 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 +35 -0
- package/css/styles.css +393 -196
- 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 +9 -9
- 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 -12
- package/dist/components/Header/Header.esm.js.map +1 -1
- package/dist/components/Header/HeaderToolbar.esm.js +5 -125
- package/dist/components/Header/HeaderToolbar.esm.js.map +1 -1
- package/dist/components/HeaderPage/HeaderPage.esm.js +21 -30
- 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 +1 -13
- 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 +27 -4
- package/dist/components/SearchField/SearchField.esm.js.map +1 -1
- package/dist/components/Select/Select.esm.js +0 -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 +30 -0
- package/dist/components/Table/components/Cell.esm.js.map +1 -0
- package/dist/components/Table/components/CellProfile.esm.js +41 -0
- package/dist/components/Table/components/CellProfile.esm.js.map +1 -0
- package/dist/components/Table/components/Column.esm.js +17 -0
- package/dist/components/Table/components/Column.esm.js.map +1 -0
- package/dist/components/Table/components/Row.esm.js +38 -0
- package/dist/components/Table/components/Row.esm.js.map +1 -0
- package/dist/components/Table/components/Table.esm.js +18 -0
- package/dist/components/Table/components/Table.esm.js.map +1 -0
- package/dist/components/Table/components/TableBody.esm.js +11 -0
- package/dist/components/Table/components/TableBody.esm.js.map +1 -0
- package/dist/components/Table/components/TableHeader.esm.js +20 -0
- package/dist/components/Table/components/TableHeader.esm.js.map +1 -0
- package/dist/components/Table/hooks/useTable.esm.js +116 -0
- package/dist/components/Table/hooks/useTable.esm.js.map +1 -0
- package/dist/components/TablePagination/TablePagination.esm.js +127 -0
- package/dist/components/TablePagination/TablePagination.esm.js.map +1 -0
- 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 +289 -157
- package/dist/index.esm.js +12 -4
- 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 +32 -22
- package/dist/utils/componentDefinitions.esm.js.map +1 -1
- package/dist/utils/extractProps.esm.js.map +1 -1
- package/dist/utils/isExternalLink.esm.js +16 -0
- package/dist/utils/isExternalLink.esm.js.map +1 -0
- package/package.json +3 -15
- package/dist/components/DataTable/DataTable.esm.js +0 -26
- package/dist/components/DataTable/DataTable.esm.js.map +0 -1
- package/dist/components/DataTable/Pagination/DataTablePagination.esm.js +0 -84
- package/dist/components/DataTable/Pagination/DataTablePagination.esm.js.map +0 -1
- package/dist/components/DataTable/Root/DataTableRoot.esm.js +0 -24
- package/dist/components/DataTable/Root/DataTableRoot.esm.js.map +0 -1
- package/dist/components/DataTable/Table/DataTableTable.esm.js +0 -64
- package/dist/components/DataTable/Table/DataTableTable.esm.js.map +0 -1
- package/dist/components/Menu/Combobox.esm.js +0 -211
- package/dist/components/Menu/Combobox.esm.js.map +0 -1
- package/dist/components/Select/Select.styles.css.esm.js +0 -7
- package/dist/components/Select/Select.styles.css.esm.js.map +0 -1
- package/dist/components/Table/Table.esm.js +0 -68
- package/dist/components/Table/Table.esm.js.map +0 -1
- package/dist/components/Table/TableCell/TableCell.esm.js +0 -13
- package/dist/components/Table/TableCell/TableCell.esm.js.map +0 -1
- package/dist/components/Table/TableCellLink/TableCellLink.esm.js +0 -28
- package/dist/components/Table/TableCellLink/TableCellLink.esm.js.map +0 -1
- package/dist/components/Table/TableCellProfile/TableCellProfile.esm.js +0 -40
- package/dist/components/Table/TableCellProfile/TableCellProfile.esm.js.map +0 -1
- package/dist/components/Table/TableCellText/TableCellText.esm.js +0 -27
- package/dist/components/Table/TableCellText/TableCellText.esm.js.map +0 -1
- package/dist/node_modules_dist/style-inject/dist/style-inject.es.esm.js +0 -29
- package/dist/node_modules_dist/style-inject/dist/style-inject.es.esm.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Avatar.esm.js","sources":["../../../src/components/Avatar/Avatar.tsx"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { forwardRef, ElementRef } from 'react';\nimport { Avatar as AvatarPrimitive } from '@base-ui-components/react/avatar';\nimport clsx from 'clsx';\nimport { AvatarProps } from './types';\nimport { useStyles } from '../../hooks/useStyles';\n\n/** @public */\nexport const Avatar = forwardRef<\n ElementRef<typeof AvatarPrimitive.Root>,\n AvatarProps\n>((props, ref) => {\n const { className, src, name, size = 'medium', ...rest } = props;\n const { classNames } = useStyles('Avatar', {\n size,\n });\n\n return (\n <AvatarPrimitive.Root\n ref={ref}\n className={clsx(classNames.root, className)}\n data-size={size}\n {...rest}\n >\n <AvatarPrimitive.Image className={classNames.image} src={src} />\n <AvatarPrimitive.Fallback className={classNames.fallback}>\n {(name || '')\n .split(' ')\n .map(word => word[0])\n .join('')\n .toLocaleUpperCase('en-US')\n .slice(0, 2)}\n </AvatarPrimitive.Fallback>\n </AvatarPrimitive.Root>\n );\n});\n\nAvatar.displayName = AvatarPrimitive.Root.displayName;\n"],"names":["AvatarPrimitive"],"mappings":";;;;;;AAuBO,MAAM,
|
|
1
|
+
{"version":3,"file":"Avatar.esm.js","sources":["../../../src/components/Avatar/Avatar.tsx"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { forwardRef, ElementRef } from 'react';\nimport { Avatar as AvatarPrimitive } from '@base-ui-components/react/avatar';\nimport clsx from 'clsx';\nimport { AvatarProps } from './types';\nimport { useStyles } from '../../hooks/useStyles';\n\n/** @public */\nexport const Avatar = forwardRef<\n ElementRef<typeof AvatarPrimitive.Root>,\n AvatarProps\n>((props, ref) => {\n const { className, src, name, size = 'medium', ...rest } = props;\n const { classNames } = useStyles('Avatar', {\n size,\n });\n\n return (\n <AvatarPrimitive.Root\n ref={ref}\n className={clsx(classNames.root, className)}\n data-size={size}\n {...rest}\n >\n <AvatarPrimitive.Image className={classNames.image} src={src} />\n <AvatarPrimitive.Fallback className={classNames.fallback}>\n {(name || '')\n .split(' ')\n .map(word => word[0])\n .join('')\n .toLocaleUpperCase('en-US')\n .slice(0, 2)}\n </AvatarPrimitive.Fallback>\n </AvatarPrimitive.Root>\n );\n});\n\nAvatar.displayName = AvatarPrimitive.Root.displayName;\n"],"names":["AvatarPrimitive"],"mappings":";;;;;;AAuBO,MAAM,MAAA,GAAS,UAAA,CAGpB,CAAC,KAAA,EAAO,GAAA,KAAQ;AAChB,EAAA,MAAM,EAAE,WAAW,GAAA,EAAK,IAAA,EAAM,OAAO,QAAA,EAAU,GAAG,MAAK,GAAI,KAAA;AAC3D,EAAA,MAAM,EAAE,UAAA,EAAW,GAAI,SAAA,CAAU,QAAA,EAAU;AAAA,IACzC;AAAA,GACD,CAAA;AAED,EAAA,uBACE,IAAA;AAAA,IAACA,QAAA,CAAgB,IAAA;AAAA,IAAhB;AAAA,MACC,GAAA;AAAA,MACA,SAAA,EAAW,IAAA,CAAK,UAAA,CAAW,IAAA,EAAM,SAAS,CAAA;AAAA,MAC1C,WAAA,EAAW,IAAA;AAAA,MACV,GAAG,IAAA;AAAA,MAEJ,QAAA,EAAA;AAAA,wBAAA,GAAA,CAACA,SAAgB,KAAA,EAAhB,EAAsB,SAAA,EAAW,UAAA,CAAW,OAAO,GAAA,EAAU,CAAA;AAAA,wBAC9D,GAAA,CAACA,QAAA,CAAgB,QAAA,EAAhB,EAAyB,SAAA,EAAW,UAAA,CAAW,QAAA,EAC5C,QAAA,EAAA,CAAA,IAAA,IAAQ,EAAA,EACP,KAAA,CAAM,GAAG,CAAA,CACT,GAAA,CAAI,CAAA,IAAA,KAAQ,IAAA,CAAK,CAAC,CAAC,CAAA,CACnB,IAAA,CAAK,EAAE,CAAA,CACP,iBAAA,CAAkB,OAAO,CAAA,CACzB,KAAA,CAAM,CAAA,EAAG,CAAC,CAAA,EACf;AAAA;AAAA;AAAA,GACF;AAEJ,CAAC;AAED,MAAA,CAAO,WAAA,GAAcA,SAAgB,IAAA,CAAK,WAAA;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Box.esm.js","sources":["../../../src/components/Box/Box.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 { createElement, forwardRef } from 'react';\nimport { BoxProps } from './types';\nimport clsx from 'clsx';\nimport { extractProps } from '../../utils/extractProps';\nimport { spacingPropDefs } from '../../props/spacing.props';\nimport { boxPropDefs } from './Box.props';\nimport { widthPropDefs } from '../../props/width.props';\nimport { heightPropDefs } from '../../props/height.props';\nimport { positionPropDefs } from '../../props/position.props';\nimport { displayPropDefs } from '../../props/display.props';\nimport { useStyles } from '../../hooks/useStyles';\n\n/** @public */\nexport const Box = forwardRef<HTMLDivElement, BoxProps>((props, ref) => {\n const { children } = props;\n\n const propDefs = {\n ...spacingPropDefs,\n ...widthPropDefs,\n ...heightPropDefs,\n ...positionPropDefs,\n ...displayPropDefs,\n ...boxPropDefs,\n };\n\n const { classNames } = useStyles('Box');\n const { className, style } = extractProps(props, propDefs);\n\n return createElement(props.as || 'div', {\n ref,\n className: clsx(classNames.root, className),\n style,\n children,\n });\n});\n\nBox.displayName = 'Box';\n"],"names":[],"mappings":";;;;;;;;;;;AA6BO,MAAM,GAAM,
|
|
1
|
+
{"version":3,"file":"Box.esm.js","sources":["../../../src/components/Box/Box.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 { createElement, forwardRef } from 'react';\nimport { BoxProps } from './types';\nimport clsx from 'clsx';\nimport { extractProps } from '../../utils/extractProps';\nimport { spacingPropDefs } from '../../props/spacing.props';\nimport { boxPropDefs } from './Box.props';\nimport { widthPropDefs } from '../../props/width.props';\nimport { heightPropDefs } from '../../props/height.props';\nimport { positionPropDefs } from '../../props/position.props';\nimport { displayPropDefs } from '../../props/display.props';\nimport { useStyles } from '../../hooks/useStyles';\n\n/** @public */\nexport const Box = forwardRef<HTMLDivElement, BoxProps>((props, ref) => {\n const { children } = props;\n\n const propDefs = {\n ...spacingPropDefs,\n ...widthPropDefs,\n ...heightPropDefs,\n ...positionPropDefs,\n ...displayPropDefs,\n ...boxPropDefs,\n };\n\n const { classNames } = useStyles('Box');\n const { className, style } = extractProps(props, propDefs);\n\n return createElement(props.as || 'div', {\n ref,\n className: clsx(classNames.root, className),\n style,\n children,\n });\n});\n\nBox.displayName = 'Box';\n"],"names":[],"mappings":";;;;;;;;;;;AA6BO,MAAM,GAAA,GAAM,UAAA,CAAqC,CAAC,KAAA,EAAO,GAAA,KAAQ;AACtE,EAAA,MAAM,EAAE,UAAS,GAAI,KAAA;AAErB,EAAA,MAAM,QAAA,GAAW;AAAA,IACf,GAAG,eAAA;AAAA,IACH,GAAG,aAAA;AAAA,IACH,GAAG,cAAA;AAAA,IACH,GAAG,gBAAA;AAAA,IACH,GAAG,eAAA;AAAA,IACH,GAAG;AAAA,GACL;AAEA,EAAA,MAAM,EAAE,UAAA,EAAW,GAAI,SAAA,CAAU,KAAK,CAAA;AACtC,EAAA,MAAM,EAAE,SAAA,EAAW,KAAA,EAAM,GAAI,YAAA,CAAa,OAAO,QAAQ,CAAA;AAEzD,EAAA,OAAO,aAAA,CAAc,KAAA,CAAM,EAAA,IAAM,KAAA,EAAO;AAAA,IACtC,GAAA;AAAA,IACA,SAAA,EAAW,IAAA,CAAK,UAAA,CAAW,IAAA,EAAM,SAAS,CAAA;AAAA,IAC1C,KAAA;AAAA,IACA;AAAA,GACD,CAAA;AACH,CAAC;AAED,GAAA,CAAI,WAAA,GAAc,KAAA;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Box.props.esm.js","sources":["../../../src/components/Box/Box.props.ts"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { PropDef, GetPropDefTypes } from '../../props/prop-def';\n\nconst as = ['div', 'span'] as const;\n\n/** @public */\nconst boxPropDefs = {\n as: { type: 'enum', values: as, default: 'div' },\n} satisfies {\n as: PropDef<(typeof as)[number]>;\n};\n\n// Use all of the imported prop defs to ensure that JSDoc works\n/** @public */\ntype BoxOwnProps = GetPropDefTypes<typeof boxPropDefs>;\n\nexport { boxPropDefs };\nexport type { BoxOwnProps };\n"],"names":[],"mappings":"AAkBA,MAAM,EAAA,GAAK,CAAC,KAAA,EAAO,MAAM,CAAA;AAGzB,MAAM,
|
|
1
|
+
{"version":3,"file":"Box.props.esm.js","sources":["../../../src/components/Box/Box.props.ts"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { PropDef, GetPropDefTypes } from '../../props/prop-def';\n\nconst as = ['div', 'span'] as const;\n\n/** @public */\nconst boxPropDefs = {\n as: { type: 'enum', values: as, default: 'div' },\n} satisfies {\n as: PropDef<(typeof as)[number]>;\n};\n\n// Use all of the imported prop defs to ensure that JSDoc works\n/** @public */\ntype BoxOwnProps = GetPropDefTypes<typeof boxPropDefs>;\n\nexport { boxPropDefs };\nexport type { BoxOwnProps };\n"],"names":[],"mappings":"AAkBA,MAAM,EAAA,GAAK,CAAC,KAAA,EAAO,MAAM,CAAA;AAGzB,MAAM,WAAA,GAAc;AAAA,EAClB,IAAI,EAAE,IAAA,EAAM,QAAQ,MAAA,EAAQ,EAAA,EAAI,SAAS,KAAA;AAC3C;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.esm.js","sources":["../../../src/components/Button/Button.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 clsx from 'clsx';\nimport { forwardRef, Ref } from 'react';\nimport { Button as RAButton } from 'react-aria-components';\nimport type { ButtonProps } from './types';\nimport { useStyles } from '../../hooks/useStyles';\n\n/** @public */\nexport const Button = forwardRef(\n (props: ButtonProps, ref: Ref<HTMLButtonElement>) => {\n const {\n size = 'small',\n variant = 'primary',\n iconStart,\n iconEnd,\n children,\n className,\n ...rest\n } = props;\n\n const { classNames, dataAttributes } = useStyles('Button', {\n size,\n variant,\n });\n\n return (\n <RAButton\n className={clsx(classNames.root, className)}\n ref={ref}\n {...dataAttributes}\n {...rest}\n >\n {iconStart}\n {children}\n {iconEnd}\n </RAButton>\n );\n },\n);\n\nButton.displayName = 'Button';\n"],"names":["RAButton"],"mappings":";;;;;;AAuBO,MAAM,
|
|
1
|
+
{"version":3,"file":"Button.esm.js","sources":["../../../src/components/Button/Button.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 clsx from 'clsx';\nimport { forwardRef, Ref } from 'react';\nimport { Button as RAButton } from 'react-aria-components';\nimport type { ButtonProps } from './types';\nimport { useStyles } from '../../hooks/useStyles';\n\n/** @public */\nexport const Button = forwardRef(\n (props: ButtonProps, ref: Ref<HTMLButtonElement>) => {\n const {\n size = 'small',\n variant = 'primary',\n iconStart,\n iconEnd,\n children,\n className,\n ...rest\n } = props;\n\n const { classNames, dataAttributes } = useStyles('Button', {\n size,\n variant,\n });\n\n return (\n <RAButton\n className={clsx(classNames.root, className)}\n ref={ref}\n {...dataAttributes}\n {...rest}\n >\n {iconStart}\n {children}\n {iconEnd}\n </RAButton>\n );\n },\n);\n\nButton.displayName = 'Button';\n"],"names":["RAButton"],"mappings":";;;;;;AAuBO,MAAM,MAAA,GAAS,UAAA;AAAA,EACpB,CAAC,OAAoB,GAAA,KAAgC;AACnD,IAAA,MAAM;AAAA,MACJ,IAAA,GAAO,OAAA;AAAA,MACP,OAAA,GAAU,SAAA;AAAA,MACV,SAAA;AAAA,MACA,OAAA;AAAA,MACA,QAAA;AAAA,MACA,SAAA;AAAA,MACA,GAAG;AAAA,KACL,GAAI,KAAA;AAEJ,IAAA,MAAM,EAAE,UAAA,EAAY,cAAA,EAAe,GAAI,UAAU,QAAA,EAAU;AAAA,MACzD,IAAA;AAAA,MACA;AAAA,KACD,CAAA;AAED,IAAA,uBACE,IAAA;AAAA,MAACA,QAAA;AAAA,MAAA;AAAA,QACC,SAAA,EAAW,IAAA,CAAK,UAAA,CAAW,IAAA,EAAM,SAAS,CAAA;AAAA,QAC1C,GAAA;AAAA,QACC,GAAG,cAAA;AAAA,QACH,GAAG,IAAA;AAAA,QAEH,QAAA,EAAA;AAAA,UAAA,SAAA;AAAA,UACA,QAAA;AAAA,UACA;AAAA;AAAA;AAAA,KACH;AAAA,EAEJ;AACF;AAEA,MAAA,CAAO,WAAA,GAAc,QAAA;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonIcon.esm.js","sources":["../../../src/components/ButtonIcon/ButtonIcon.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 clsx from 'clsx';\nimport { forwardRef, Ref } from 'react';\nimport { Button as RAButton } from 'react-aria-components';\nimport type { ButtonIconProps } from './types';\nimport { useStyles } from '../../hooks/useStyles';\n\n/** @public */\nexport const ButtonIcon = forwardRef(\n (props: ButtonIconProps, ref: Ref<HTMLButtonElement>) => {\n const {\n size = 'small',\n variant = 'primary',\n icon,\n className,\n style,\n ...rest\n } = props;\n\n const { classNames, dataAttributes } = useStyles('Button', {\n size,\n variant,\n });\n\n const { classNames: classNamesButtonIcon } = useStyles('ButtonIcon');\n\n return (\n <RAButton\n className={clsx(classNames.root, classNamesButtonIcon.root, className)}\n ref={ref}\n {...dataAttributes}\n {...rest}\n >\n {icon}\n </RAButton>\n );\n },\n);\n\nButtonIcon.displayName = 'ButtonIcon';\n"],"names":["RAButton"],"mappings":";;;;;;AAuBO,MAAM,
|
|
1
|
+
{"version":3,"file":"ButtonIcon.esm.js","sources":["../../../src/components/ButtonIcon/ButtonIcon.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 clsx from 'clsx';\nimport { forwardRef, Ref } from 'react';\nimport { Button as RAButton } from 'react-aria-components';\nimport type { ButtonIconProps } from './types';\nimport { useStyles } from '../../hooks/useStyles';\n\n/** @public */\nexport const ButtonIcon = forwardRef(\n (props: ButtonIconProps, ref: Ref<HTMLButtonElement>) => {\n const {\n size = 'small',\n variant = 'primary',\n icon,\n className,\n style,\n ...rest\n } = props;\n\n const { classNames, dataAttributes } = useStyles('Button', {\n size,\n variant,\n });\n\n const { classNames: classNamesButtonIcon } = useStyles('ButtonIcon');\n\n return (\n <RAButton\n className={clsx(classNames.root, classNamesButtonIcon.root, className)}\n ref={ref}\n {...dataAttributes}\n {...rest}\n >\n {icon}\n </RAButton>\n );\n },\n);\n\nButtonIcon.displayName = 'ButtonIcon';\n"],"names":["RAButton"],"mappings":";;;;;;AAuBO,MAAM,UAAA,GAAa,UAAA;AAAA,EACxB,CAAC,OAAwB,GAAA,KAAgC;AACvD,IAAA,MAAM;AAAA,MACJ,IAAA,GAAO,OAAA;AAAA,MACP,OAAA,GAAU,SAAA;AAAA,MACV,IAAA;AAAA,MACA,SAAA;AAAA,MACA,KAAA;AAAA,MACA,GAAG;AAAA,KACL,GAAI,KAAA;AAEJ,IAAA,MAAM,EAAE,UAAA,EAAY,cAAA,EAAe,GAAI,UAAU,QAAA,EAAU;AAAA,MACzD,IAAA;AAAA,MACA;AAAA,KACD,CAAA;AAED,IAAA,MAAM,EAAE,UAAA,EAAY,oBAAA,EAAqB,GAAI,UAAU,YAAY,CAAA;AAEnE,IAAA,uBACE,GAAA;AAAA,MAACA,MAAA;AAAA,MAAA;AAAA,QACC,WAAW,IAAA,CAAK,UAAA,CAAW,IAAA,EAAM,oBAAA,CAAqB,MAAM,SAAS,CAAA;AAAA,QACrE,GAAA;AAAA,QACC,GAAG,cAAA;AAAA,QACH,GAAG,IAAA;AAAA,QAEH,QAAA,EAAA;AAAA;AAAA,KACH;AAAA,EAEJ;AACF;AAEA,UAAA,CAAW,WAAA,GAAc,YAAA;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonLink.esm.js","sources":["../../../src/components/ButtonLink/ButtonLink.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 clsx from 'clsx';\nimport { forwardRef, Ref } from 'react';\nimport { Link as RALink } from 'react-aria-components';\nimport type { ButtonLinkProps } from './types';\nimport { useStyles } from '../../hooks/useStyles';\n\n/** @public */\nexport const ButtonLink = forwardRef(\n (props: ButtonLinkProps, ref: Ref<HTMLAnchorElement>) => {\n const {\n size = 'small',\n variant = 'primary',\n iconStart,\n iconEnd,\n children,\n className,\n ...rest\n } = props;\n\n const { classNames, dataAttributes } = useStyles('Button', {\n size,\n variant,\n });\n\n const { classNames: classNamesButtonLink } = useStyles('ButtonLink');\n\n return (\n <RALink\n className={clsx(classNames.root, classNamesButtonLink.root, className)}\n ref={ref}\n {...dataAttributes}\n {...rest}\n >\n {iconStart}\n {children}\n {iconEnd}\n </RALink>\n );\n },\n);\n\nButtonLink.displayName = 'ButtonLink';\n"],"names":["RALink"],"mappings":";;;;;;AAuBO,MAAM,
|
|
1
|
+
{"version":3,"file":"ButtonLink.esm.js","sources":["../../../src/components/ButtonLink/ButtonLink.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 clsx from 'clsx';\nimport { forwardRef, Ref } from 'react';\nimport { Link as RALink } from 'react-aria-components';\nimport type { ButtonLinkProps } from './types';\nimport { useStyles } from '../../hooks/useStyles';\n\n/** @public */\nexport const ButtonLink = forwardRef(\n (props: ButtonLinkProps, ref: Ref<HTMLAnchorElement>) => {\n const {\n size = 'small',\n variant = 'primary',\n iconStart,\n iconEnd,\n children,\n className,\n ...rest\n } = props;\n\n const { classNames, dataAttributes } = useStyles('Button', {\n size,\n variant,\n });\n\n const { classNames: classNamesButtonLink } = useStyles('ButtonLink');\n\n return (\n <RALink\n className={clsx(classNames.root, classNamesButtonLink.root, className)}\n ref={ref}\n {...dataAttributes}\n {...rest}\n >\n {iconStart}\n {children}\n {iconEnd}\n </RALink>\n );\n },\n);\n\nButtonLink.displayName = 'ButtonLink';\n"],"names":["RALink"],"mappings":";;;;;;AAuBO,MAAM,UAAA,GAAa,UAAA;AAAA,EACxB,CAAC,OAAwB,GAAA,KAAgC;AACvD,IAAA,MAAM;AAAA,MACJ,IAAA,GAAO,OAAA;AAAA,MACP,OAAA,GAAU,SAAA;AAAA,MACV,SAAA;AAAA,MACA,OAAA;AAAA,MACA,QAAA;AAAA,MACA,SAAA;AAAA,MACA,GAAG;AAAA,KACL,GAAI,KAAA;AAEJ,IAAA,MAAM,EAAE,UAAA,EAAY,cAAA,EAAe,GAAI,UAAU,QAAA,EAAU;AAAA,MACzD,IAAA;AAAA,MACA;AAAA,KACD,CAAA;AAED,IAAA,MAAM,EAAE,UAAA,EAAY,oBAAA,EAAqB,GAAI,UAAU,YAAY,CAAA;AAEnE,IAAA,uBACE,IAAA;AAAA,MAACA,IAAA;AAAA,MAAA;AAAA,QACC,WAAW,IAAA,CAAK,UAAA,CAAW,IAAA,EAAM,oBAAA,CAAqB,MAAM,SAAS,CAAA;AAAA,QACrE,GAAA;AAAA,QACC,GAAG,cAAA;AAAA,QACH,GAAG,IAAA;AAAA,QAEH,QAAA,EAAA;AAAA,UAAA,SAAA;AAAA,UACA,QAAA;AAAA,UACA;AAAA;AAAA;AAAA,KACH;AAAA,EAEJ;AACF;AAEA,UAAA,CAAW,WAAA,GAAc,YAAA;;;;"}
|
|
@@ -9,14 +9,14 @@ const Card = forwardRef((props, ref) => {
|
|
|
9
9
|
const { classNames } = useStyles("Card");
|
|
10
10
|
return /* @__PURE__ */ jsx("div", { ref, className: clsx(classNames.root, className), ...rest });
|
|
11
11
|
});
|
|
12
|
-
forwardRef(
|
|
12
|
+
const CardHeader = forwardRef(
|
|
13
13
|
(props, ref) => {
|
|
14
14
|
const { className, ...rest } = props;
|
|
15
15
|
const { classNames } = useStyles("Card");
|
|
16
16
|
return /* @__PURE__ */ jsx("div", { ref, className: clsx(classNames.header, className), ...rest });
|
|
17
17
|
}
|
|
18
18
|
);
|
|
19
|
-
forwardRef(
|
|
19
|
+
const CardBody = forwardRef(
|
|
20
20
|
(props, ref) => {
|
|
21
21
|
const { children, className, ...rest } = props;
|
|
22
22
|
const { classNames } = useStyles("Card");
|
|
@@ -41,7 +41,7 @@ forwardRef(
|
|
|
41
41
|
);
|
|
42
42
|
}
|
|
43
43
|
);
|
|
44
|
-
forwardRef(
|
|
44
|
+
const CardFooter = forwardRef(
|
|
45
45
|
(props, ref) => {
|
|
46
46
|
const { className, ...rest } = props;
|
|
47
47
|
const { classNames } = useStyles("Card");
|
|
@@ -49,5 +49,5 @@ forwardRef(
|
|
|
49
49
|
}
|
|
50
50
|
);
|
|
51
51
|
|
|
52
|
-
export { Card };
|
|
52
|
+
export { Card, CardBody, CardFooter, CardHeader };
|
|
53
53
|
//# sourceMappingURL=Card.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.esm.js","sources":["../../../src/components/Card/Card.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 } from '../ScrollArea';\nimport clsx from 'clsx';\nimport { useStyles } from '../../hooks/useStyles';\nimport type {\n CardProps,\n CardHeaderProps,\n CardBodyProps,\n CardFooterProps,\n} from './types';\n\n/**\n * Card component.\n *\n * @public\n */\nexport const Card = forwardRef<HTMLDivElement, CardProps>((props, ref) => {\n const { className, ...rest } = props;\n const { classNames } = useStyles('Card');\n\n return (\n <div ref={ref} className={clsx(classNames.root, className)} {...rest} />\n );\n});\n\n/**\n * CardHeader component.\n *\n * @public\n */\nexport const CardHeader = forwardRef<HTMLDivElement, CardHeaderProps>(\n (props, ref) => {\n const { className, ...rest } = props;\n const { classNames } = useStyles('Card');\n\n return (\n <div ref={ref} className={clsx(classNames.header, className)} {...rest} />\n );\n },\n);\n\n/**\n * CardBody component.\n *\n * @public\n */\nexport const CardBody = forwardRef<HTMLDivElement, CardBodyProps>(\n (props, ref) => {\n const { children, className, ...rest } = props;\n const { classNames } = useStyles('Card');\n\n return (\n <ScrollArea.Root\n ref={ref}\n className={clsx(classNames.body, className)}\n {...rest}\n >\n <ScrollArea.Viewport style={{ paddingInline: 'var(--bui-space-3)' }}>\n {children}\n </ScrollArea.Viewport>\n <ScrollArea.Scrollbar\n orientation=\"vertical\"\n style={{ margin: '0 0.25rem' }}\n >\n <ScrollArea.Thumb />\n </ScrollArea.Scrollbar>\n </ScrollArea.Root>\n );\n },\n);\n\n/**\n * CardFooter component.\n *\n * @public\n */\nexport const CardFooter = forwardRef<HTMLDivElement, CardFooterProps>(\n (props, ref) => {\n const { className, ...rest } = props;\n const { classNames } = useStyles('Card');\n\n return (\n <div ref={ref} className={clsx(classNames.footer, className)} {...rest} />\n );\n },\n);\n"],"names":[],"mappings":";;;;;;AAgCO,MAAM,
|
|
1
|
+
{"version":3,"file":"Card.esm.js","sources":["../../../src/components/Card/Card.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 } from '../ScrollArea';\nimport clsx from 'clsx';\nimport { useStyles } from '../../hooks/useStyles';\nimport type {\n CardProps,\n CardHeaderProps,\n CardBodyProps,\n CardFooterProps,\n} from './types';\n\n/**\n * Card component.\n *\n * @public\n */\nexport const Card = forwardRef<HTMLDivElement, CardProps>((props, ref) => {\n const { className, ...rest } = props;\n const { classNames } = useStyles('Card');\n\n return (\n <div ref={ref} className={clsx(classNames.root, className)} {...rest} />\n );\n});\n\n/**\n * CardHeader component.\n *\n * @public\n */\nexport const CardHeader = forwardRef<HTMLDivElement, CardHeaderProps>(\n (props, ref) => {\n const { className, ...rest } = props;\n const { classNames } = useStyles('Card');\n\n return (\n <div ref={ref} className={clsx(classNames.header, className)} {...rest} />\n );\n },\n);\n\n/**\n * CardBody component.\n *\n * @public\n */\nexport const CardBody = forwardRef<HTMLDivElement, CardBodyProps>(\n (props, ref) => {\n const { children, className, ...rest } = props;\n const { classNames } = useStyles('Card');\n\n return (\n <ScrollArea.Root\n ref={ref}\n className={clsx(classNames.body, className)}\n {...rest}\n >\n <ScrollArea.Viewport style={{ paddingInline: 'var(--bui-space-3)' }}>\n {children}\n </ScrollArea.Viewport>\n <ScrollArea.Scrollbar\n orientation=\"vertical\"\n style={{ margin: '0 0.25rem' }}\n >\n <ScrollArea.Thumb />\n </ScrollArea.Scrollbar>\n </ScrollArea.Root>\n );\n },\n);\n\n/**\n * CardFooter component.\n *\n * @public\n */\nexport const CardFooter = forwardRef<HTMLDivElement, CardFooterProps>(\n (props, ref) => {\n const { className, ...rest } = props;\n const { classNames } = useStyles('Card');\n\n return (\n <div ref={ref} className={clsx(classNames.footer, className)} {...rest} />\n );\n },\n);\n"],"names":[],"mappings":";;;;;;AAgCO,MAAM,IAAA,GAAO,UAAA,CAAsC,CAAC,KAAA,EAAO,GAAA,KAAQ;AACxE,EAAA,MAAM,EAAE,SAAA,EAAW,GAAG,IAAA,EAAK,GAAI,KAAA;AAC/B,EAAA,MAAM,EAAE,UAAA,EAAW,GAAI,SAAA,CAAU,MAAM,CAAA;AAEvC,EAAA,uBACE,GAAA,CAAC,KAAA,EAAA,EAAI,GAAA,EAAU,SAAA,EAAW,IAAA,CAAK,WAAW,IAAA,EAAM,SAAS,CAAA,EAAI,GAAG,IAAA,EAAM,CAAA;AAE1E,CAAC;AAOM,MAAM,UAAA,GAAa,UAAA;AAAA,EACxB,CAAC,OAAO,GAAA,KAAQ;AACd,IAAA,MAAM,EAAE,SAAA,EAAW,GAAG,IAAA,EAAK,GAAI,KAAA;AAC/B,IAAA,MAAM,EAAE,UAAA,EAAW,GAAI,SAAA,CAAU,MAAM,CAAA;AAEvC,IAAA,uBACE,GAAA,CAAC,KAAA,EAAA,EAAI,GAAA,EAAU,SAAA,EAAW,IAAA,CAAK,WAAW,MAAA,EAAQ,SAAS,CAAA,EAAI,GAAG,IAAA,EAAM,CAAA;AAAA,EAE5E;AACF;AAOO,MAAM,QAAA,GAAW,UAAA;AAAA,EACtB,CAAC,OAAO,GAAA,KAAQ;AACd,IAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAW,GAAG,MAAK,GAAI,KAAA;AACzC,IAAA,MAAM,EAAE,UAAA,EAAW,GAAI,SAAA,CAAU,MAAM,CAAA;AAEvC,IAAA,uBACE,IAAA;AAAA,MAAC,UAAA,CAAW,IAAA;AAAA,MAAX;AAAA,QACC,GAAA;AAAA,QACA,SAAA,EAAW,IAAA,CAAK,UAAA,CAAW,IAAA,EAAM,SAAS,CAAA;AAAA,QACzC,GAAG,IAAA;AAAA,QAEJ,QAAA,EAAA;AAAA,0BAAA,GAAA,CAAC,UAAA,CAAW,UAAX,EAAoB,KAAA,EAAO,EAAE,aAAA,EAAe,oBAAA,IAC1C,QAAA,EACH,CAAA;AAAA,0BACA,GAAA;AAAA,YAAC,UAAA,CAAW,SAAA;AAAA,YAAX;AAAA,cACC,WAAA,EAAY,UAAA;AAAA,cACZ,KAAA,EAAO,EAAE,MAAA,EAAQ,WAAA,EAAY;AAAA,cAE7B,QAAA,kBAAA,GAAA,CAAC,UAAA,CAAW,KAAA,EAAX,EAAiB;AAAA;AAAA;AACpB;AAAA;AAAA,KACF;AAAA,EAEJ;AACF;AAOO,MAAM,UAAA,GAAa,UAAA;AAAA,EACxB,CAAC,OAAO,GAAA,KAAQ;AACd,IAAA,MAAM,EAAE,SAAA,EAAW,GAAG,IAAA,EAAK,GAAI,KAAA;AAC/B,IAAA,MAAM,EAAE,UAAA,EAAW,GAAI,SAAA,CAAU,MAAM,CAAA;AAEvC,IAAA,uBACE,GAAA,CAAC,KAAA,EAAA,EAAI,GAAA,EAAU,SAAA,EAAW,IAAA,CAAK,WAAW,MAAA,EAAQ,SAAS,CAAA,EAAI,GAAG,IAAA,EAAM,CAAA;AAAA,EAE5E;AACF;;;;"}
|
|
@@ -10,27 +10,27 @@ import '../Avatar/Avatar.esm.js';
|
|
|
10
10
|
import '../Button/Button.esm.js';
|
|
11
11
|
import '../Card/Card.esm.js';
|
|
12
12
|
import '../Collapsible/Collapsible.esm.js';
|
|
13
|
-
import '../DataTable/DataTable.esm.js';
|
|
14
13
|
import '../FieldLabel/FieldLabel.esm.js';
|
|
15
|
-
import '
|
|
16
|
-
import '../Tabs/Tabs.esm.js';
|
|
14
|
+
import 'react-aria-components';
|
|
17
15
|
import { useStyles } from '../../hooks/useStyles.esm.js';
|
|
18
|
-
import '../Menu/Menu.esm.js';
|
|
19
|
-
import '../Text/Text.esm.js';
|
|
20
|
-
import '../ButtonIcon/ButtonIcon.esm.js';
|
|
21
16
|
import '@remixicon/react';
|
|
17
|
+
import '../Text/Text.esm.js';
|
|
18
|
+
import 'react-router-dom';
|
|
19
|
+
import '../Tabs/Tabs.esm.js';
|
|
20
|
+
import '../Link/Link.esm.js';
|
|
22
21
|
import { Icon } from '../Icon/Icon.esm.js';
|
|
22
|
+
import '../ButtonIcon/ButtonIcon.esm.js';
|
|
23
23
|
import '../ButtonLink/ButtonLink.esm.js';
|
|
24
24
|
import '../RadioGroup/RadioGroup.esm.js';
|
|
25
|
-
import '../Table/
|
|
25
|
+
import '../Table/components/Cell.esm.js';
|
|
26
|
+
import clsx from 'clsx';
|
|
27
|
+
import '@base-ui-components/react/avatar';
|
|
26
28
|
import '../TextField/TextField.esm.js';
|
|
27
29
|
import '../Tooltip/Tooltip.esm.js';
|
|
28
30
|
import '../ScrollArea/ScrollArea.esm.js';
|
|
29
31
|
import '../SearchField/SearchField.esm.js';
|
|
30
|
-
import '../Link/Link.esm.js';
|
|
31
32
|
import '../Select/Select.esm.js';
|
|
32
33
|
import '../Switch/Switch.esm.js';
|
|
33
|
-
import clsx from 'clsx';
|
|
34
34
|
|
|
35
35
|
const Checkbox = forwardRef(
|
|
36
36
|
(props, ref) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.esm.js","sources":["../../../src/components/Checkbox/Checkbox.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 { Checkbox as CheckboxPrimitive } from '@base-ui-components/react/checkbox';\nimport { Icon } from '../..';\nimport type { CheckboxProps } from './types';\nimport { useStyles } from '../../hooks/useStyles';\nimport clsx from 'clsx';\n\n/** @public */\nexport const Checkbox = forwardRef<HTMLButtonElement, CheckboxProps>(\n (props, ref) => {\n const {\n label,\n checked,\n onChange,\n disabled,\n required,\n className,\n name,\n value,\n style,\n } = props;\n\n const { classNames } = useStyles('Checkbox');\n\n const checkboxElement = (\n <CheckboxPrimitive.Root\n ref={ref}\n className={clsx(classNames.root, className)}\n checked={checked}\n onCheckedChange={onChange}\n disabled={disabled}\n required={required}\n name={name}\n value={value}\n style={style}\n >\n <CheckboxPrimitive.Indicator className={classNames.indicator}>\n <Icon name=\"check\" size={12} />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n );\n\n return label ? (\n <label className={classNames.label}>\n {checkboxElement}\n {label}\n </label>\n ) : (\n checkboxElement\n );\n },\n);\n"],"names":["CheckboxPrimitive"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBO,MAAM,
|
|
1
|
+
{"version":3,"file":"Checkbox.esm.js","sources":["../../../src/components/Checkbox/Checkbox.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 { Checkbox as CheckboxPrimitive } from '@base-ui-components/react/checkbox';\nimport { Icon } from '../..';\nimport type { CheckboxProps } from './types';\nimport { useStyles } from '../../hooks/useStyles';\nimport clsx from 'clsx';\n\n/** @public */\nexport const Checkbox = forwardRef<HTMLButtonElement, CheckboxProps>(\n (props, ref) => {\n const {\n label,\n checked,\n onChange,\n disabled,\n required,\n className,\n name,\n value,\n style,\n } = props;\n\n const { classNames } = useStyles('Checkbox');\n\n const checkboxElement = (\n <CheckboxPrimitive.Root\n ref={ref}\n className={clsx(classNames.root, className)}\n checked={checked}\n onCheckedChange={onChange}\n disabled={disabled}\n required={required}\n name={name}\n value={value}\n style={style}\n >\n <CheckboxPrimitive.Indicator className={classNames.indicator}>\n <Icon name=\"check\" size={12} />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n );\n\n return label ? (\n <label className={classNames.label}>\n {checkboxElement}\n {label}\n </label>\n ) : (\n checkboxElement\n );\n },\n);\n"],"names":["CheckboxPrimitive"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBO,MAAM,QAAA,GAAW,UAAA;AAAA,EACtB,CAAC,OAAO,GAAA,KAAQ;AACd,IAAA,MAAM;AAAA,MACJ,KAAA;AAAA,MACA,OAAA;AAAA,MACA,QAAA;AAAA,MACA,QAAA;AAAA,MACA,QAAA;AAAA,MACA,SAAA;AAAA,MACA,IAAA;AAAA,MACA,KAAA;AAAA,MACA;AAAA,KACF,GAAI,KAAA;AAEJ,IAAA,MAAM,EAAE,UAAA,EAAW,GAAI,SAAA,CAAU,UAAU,CAAA;AAE3C,IAAA,MAAM,eAAA,mBACJ,GAAA;AAAA,MAACA,UAAA,CAAkB,IAAA;AAAA,MAAlB;AAAA,QACC,GAAA;AAAA,QACA,SAAA,EAAW,IAAA,CAAK,UAAA,CAAW,IAAA,EAAM,SAAS,CAAA;AAAA,QAC1C,OAAA;AAAA,QACA,eAAA,EAAiB,QAAA;AAAA,QACjB,QAAA;AAAA,QACA,QAAA;AAAA,QACA,IAAA;AAAA,QACA,KAAA;AAAA,QACA,KAAA;AAAA,QAEA,QAAA,kBAAA,GAAA,CAACA,UAAA,CAAkB,SAAA,EAAlB,EAA4B,SAAA,EAAW,UAAA,CAAW,SAAA,EACjD,QAAA,kBAAA,GAAA,CAAC,IAAA,EAAA,EAAK,IAAA,EAAK,OAAA,EAAQ,IAAA,EAAM,IAAI,CAAA,EAC/B;AAAA;AAAA,KACF;AAGF,IAAA,OAAO,KAAA,mBACL,IAAA,CAAC,OAAA,EAAA,EAAM,SAAA,EAAW,WAAW,KAAA,EAC1B,QAAA,EAAA;AAAA,MAAA,eAAA;AAAA,MACA;AAAA,KAAA,EACH,CAAA,GAEA,eAAA;AAAA,EAEJ;AACF;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Collapsible.esm.js","sources":["../../../src/components/Collapsible/Collapsible.tsx"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { forwardRef } from 'react';\nimport { Collapsible as CollapsiblePrimitive } from '@base-ui-components/react/collapsible';\nimport clsx from 'clsx';\nimport { useStyles } from '../../hooks/useStyles';\n\nconst CollapsibleRoot = forwardRef<\n React.ElementRef<typeof CollapsiblePrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof CollapsiblePrimitive.Root>\n>(({ className, ...props }, ref) => {\n const { classNames } = useStyles('Collapsible');\n\n return (\n <CollapsiblePrimitive.Root\n ref={ref}\n className={clsx(classNames.root, className)}\n {...props}\n />\n );\n});\nCollapsibleRoot.displayName = CollapsiblePrimitive.Root.displayName;\n\nconst CollapsibleTrigger = forwardRef<\n React.ElementRef<typeof CollapsiblePrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof CollapsiblePrimitive.Trigger>\n>(({ className, ...props }, ref) => {\n const { classNames } = useStyles('Collapsible');\n\n return (\n <CollapsiblePrimitive.Trigger\n ref={ref}\n className={clsx(classNames.trigger, className)}\n {...props}\n />\n );\n});\nCollapsibleTrigger.displayName = CollapsiblePrimitive.Trigger.displayName;\n\nconst CollapsiblePanel = forwardRef<\n React.ElementRef<typeof CollapsiblePrimitive.Panel>,\n React.ComponentPropsWithoutRef<typeof CollapsiblePrimitive.Panel>\n>(({ className, ...props }, ref) => {\n const { classNames } = useStyles('Collapsible');\n\n return (\n <CollapsiblePrimitive.Panel\n ref={ref}\n className={clsx(classNames.panel, className)}\n {...props}\n />\n );\n});\nCollapsiblePanel.displayName = CollapsiblePrimitive.Panel.displayName;\n\n/**\n * Collapsible is a component that allows you to collapse and expand content.\n * It is a wrapper around the CollapsiblePrimitive component from base-ui-components.\n *\n * @public\n */\nexport const Collapsible = {\n Root: CollapsibleRoot,\n Trigger: CollapsibleTrigger,\n Panel: CollapsiblePanel,\n};\n"],"names":["CollapsiblePrimitive"],"mappings":";;;;;;AAqBA,MAAM,eAAA,GAAkB,WAGtB,CAAC,EAAE,WAAW,GAAG,KAAA,IAAS,
|
|
1
|
+
{"version":3,"file":"Collapsible.esm.js","sources":["../../../src/components/Collapsible/Collapsible.tsx"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { forwardRef } from 'react';\nimport { Collapsible as CollapsiblePrimitive } from '@base-ui-components/react/collapsible';\nimport clsx from 'clsx';\nimport { useStyles } from '../../hooks/useStyles';\n\nconst CollapsibleRoot = forwardRef<\n React.ElementRef<typeof CollapsiblePrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof CollapsiblePrimitive.Root>\n>(({ className, ...props }, ref) => {\n const { classNames } = useStyles('Collapsible');\n\n return (\n <CollapsiblePrimitive.Root\n ref={ref}\n className={clsx(classNames.root, className)}\n {...props}\n />\n );\n});\nCollapsibleRoot.displayName = CollapsiblePrimitive.Root.displayName;\n\nconst CollapsibleTrigger = forwardRef<\n React.ElementRef<typeof CollapsiblePrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof CollapsiblePrimitive.Trigger>\n>(({ className, ...props }, ref) => {\n const { classNames } = useStyles('Collapsible');\n\n return (\n <CollapsiblePrimitive.Trigger\n ref={ref}\n className={clsx(classNames.trigger, className)}\n {...props}\n />\n );\n});\nCollapsibleTrigger.displayName = CollapsiblePrimitive.Trigger.displayName;\n\nconst CollapsiblePanel = forwardRef<\n React.ElementRef<typeof CollapsiblePrimitive.Panel>,\n React.ComponentPropsWithoutRef<typeof CollapsiblePrimitive.Panel>\n>(({ className, ...props }, ref) => {\n const { classNames } = useStyles('Collapsible');\n\n return (\n <CollapsiblePrimitive.Panel\n ref={ref}\n className={clsx(classNames.panel, className)}\n {...props}\n />\n );\n});\nCollapsiblePanel.displayName = CollapsiblePrimitive.Panel.displayName;\n\n/**\n * Collapsible is a component that allows you to collapse and expand content.\n * It is a wrapper around the CollapsiblePrimitive component from base-ui-components.\n *\n * @public\n */\nexport const Collapsible = {\n Root: CollapsibleRoot,\n Trigger: CollapsibleTrigger,\n Panel: CollapsiblePanel,\n};\n"],"names":["CollapsiblePrimitive"],"mappings":";;;;;;AAqBA,MAAM,eAAA,GAAkB,WAGtB,CAAC,EAAE,WAAW,GAAG,KAAA,IAAS,GAAA,KAAQ;AAClC,EAAA,MAAM,EAAE,UAAA,EAAW,GAAI,SAAA,CAAU,aAAa,CAAA;AAE9C,EAAA,uBACE,GAAA;AAAA,IAACA,aAAA,CAAqB,IAAA;AAAA,IAArB;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,eAAA,CAAgB,WAAA,GAAcA,cAAqB,IAAA,CAAK,WAAA;AAExD,MAAM,kBAAA,GAAqB,WAGzB,CAAC,EAAE,WAAW,GAAG,KAAA,IAAS,GAAA,KAAQ;AAClC,EAAA,MAAM,EAAE,UAAA,EAAW,GAAI,SAAA,CAAU,aAAa,CAAA;AAE9C,EAAA,uBACE,GAAA;AAAA,IAACA,aAAA,CAAqB,OAAA;AAAA,IAArB;AAAA,MACC,GAAA;AAAA,MACA,SAAA,EAAW,IAAA,CAAK,UAAA,CAAW,OAAA,EAAS,SAAS,CAAA;AAAA,MAC5C,GAAG;AAAA;AAAA,GACN;AAEJ,CAAC,CAAA;AACD,kBAAA,CAAmB,WAAA,GAAcA,cAAqB,OAAA,CAAQ,WAAA;AAE9D,MAAM,gBAAA,GAAmB,WAGvB,CAAC,EAAE,WAAW,GAAG,KAAA,IAAS,GAAA,KAAQ;AAClC,EAAA,MAAM,EAAE,UAAA,EAAW,GAAI,SAAA,CAAU,aAAa,CAAA;AAE9C,EAAA,uBACE,GAAA;AAAA,IAACA,aAAA,CAAqB,KAAA;AAAA,IAArB;AAAA,MACC,GAAA;AAAA,MACA,SAAA,EAAW,IAAA,CAAK,UAAA,CAAW,KAAA,EAAO,SAAS,CAAA;AAAA,MAC1C,GAAG;AAAA;AAAA,GACN;AAEJ,CAAC,CAAA;AACD,gBAAA,CAAiB,WAAA,GAAcA,cAAqB,KAAA,CAAM,WAAA;AAQnD,MAAM,WAAA,GAAc;AAAA,EACzB,IAAA,EAAM,eAAA;AAAA,EACN,OAAA,EAAS,kBAAA;AAAA,EACT,KAAA,EAAO;AACT;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Container.esm.js","sources":["../../../src/components/Container/Container.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 { createElement, forwardRef } from 'react';\nimport { ContainerProps } from './types';\nimport clsx from 'clsx';\nimport { displayPropDefs } from '../../props/display.props';\nimport { extractProps } from '../../utils/extractProps';\nimport { spacingPropDefs } from '../../props/spacing.props';\nimport { useStyles } from '../../hooks/useStyles';\n\n/** @public */\nexport const Container = forwardRef<HTMLDivElement, ContainerProps>(\n (props, ref) => {\n const { children } = props;\n\n const { classNames } = useStyles('Container');\n\n // Create a subset of spacing props that match the interface\n const containerSpacingProps = {\n my: spacingPropDefs.my,\n mt: spacingPropDefs.mt,\n mb: spacingPropDefs.mb,\n py: spacingPropDefs.py,\n pt: spacingPropDefs.pt,\n pb: spacingPropDefs.pb,\n };\n\n const propDefs = {\n ...displayPropDefs,\n ...containerSpacingProps,\n };\n const { className, style } = extractProps(props, propDefs);\n\n return createElement('div', {\n ref,\n className: clsx(classNames.root, className),\n style,\n children,\n });\n },\n);\n"],"names":[],"mappings":";;;;;;;AAyBO,MAAM,
|
|
1
|
+
{"version":3,"file":"Container.esm.js","sources":["../../../src/components/Container/Container.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 { createElement, forwardRef } from 'react';\nimport { ContainerProps } from './types';\nimport clsx from 'clsx';\nimport { displayPropDefs } from '../../props/display.props';\nimport { extractProps } from '../../utils/extractProps';\nimport { spacingPropDefs } from '../../props/spacing.props';\nimport { useStyles } from '../../hooks/useStyles';\n\n/** @public */\nexport const Container = forwardRef<HTMLDivElement, ContainerProps>(\n (props, ref) => {\n const { children } = props;\n\n const { classNames } = useStyles('Container');\n\n // Create a subset of spacing props that match the interface\n const containerSpacingProps = {\n my: spacingPropDefs.my,\n mt: spacingPropDefs.mt,\n mb: spacingPropDefs.mb,\n py: spacingPropDefs.py,\n pt: spacingPropDefs.pt,\n pb: spacingPropDefs.pb,\n };\n\n const propDefs = {\n ...displayPropDefs,\n ...containerSpacingProps,\n };\n const { className, style } = extractProps(props, propDefs);\n\n return createElement('div', {\n ref,\n className: clsx(classNames.root, className),\n style,\n children,\n });\n },\n);\n"],"names":[],"mappings":";;;;;;;AAyBO,MAAM,SAAA,GAAY,UAAA;AAAA,EACvB,CAAC,OAAO,GAAA,KAAQ;AACd,IAAA,MAAM,EAAE,UAAS,GAAI,KAAA;AAErB,IAAA,MAAM,EAAE,UAAA,EAAW,GAAI,SAAA,CAAU,WAAW,CAAA;AAG5C,IAAA,MAAM,qBAAA,GAAwB;AAAA,MAC5B,IAAI,eAAA,CAAgB,EAAA;AAAA,MACpB,IAAI,eAAA,CAAgB,EAAA;AAAA,MACpB,IAAI,eAAA,CAAgB,EAAA;AAAA,MACpB,IAAI,eAAA,CAAgB,EAAA;AAAA,MACpB,IAAI,eAAA,CAAgB,EAAA;AAAA,MACpB,IAAI,eAAA,CAAgB;AAAA,KACtB;AAEA,IAAA,MAAM,QAAA,GAAW;AAAA,MACf,GAAG,eAAA;AAAA,MACH,GAAG;AAAA,KACL;AACA,IAAA,MAAM,EAAE,SAAA,EAAW,KAAA,EAAM,GAAI,YAAA,CAAa,OAAO,QAAQ,CAAA;AAEzD,IAAA,OAAO,cAAc,KAAA,EAAO;AAAA,MAC1B,GAAA;AAAA,MACA,SAAA,EAAW,IAAA,CAAK,UAAA,CAAW,IAAA,EAAM,SAAS,CAAA;AAAA,MAC1C,KAAA;AAAA,MACA;AAAA,KACD,CAAA;AAAA,EACH;AACF;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldError.esm.js","sources":["../../../src/components/FieldError/FieldError.tsx"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { forwardRef } from 'react';\nimport {\n FieldError as AriaFieldError,\n type FieldErrorProps,\n} from 'react-aria-components';\nimport clsx from 'clsx';\n\n/** @public */\nexport const FieldError = forwardRef<HTMLDivElement, FieldErrorProps>(\n (props: FieldErrorProps, ref) => {\n const { className, ...rest } = props;\n\n return (\n <AriaFieldError\n className={clsx('bui-FieldError', className)}\n ref={ref}\n {...rest}\n />\n );\n },\n);\n\nFieldError.displayName = 'FieldError';\n"],"names":["AriaFieldError"],"mappings":";;;;;AAwBO,MAAM,
|
|
1
|
+
{"version":3,"file":"FieldError.esm.js","sources":["../../../src/components/FieldError/FieldError.tsx"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { forwardRef } from 'react';\nimport {\n FieldError as AriaFieldError,\n type FieldErrorProps,\n} from 'react-aria-components';\nimport clsx from 'clsx';\n\n/** @public */\nexport const FieldError = forwardRef<HTMLDivElement, FieldErrorProps>(\n (props: FieldErrorProps, ref) => {\n const { className, ...rest } = props;\n\n return (\n <AriaFieldError\n className={clsx('bui-FieldError', className)}\n ref={ref}\n {...rest}\n />\n );\n },\n);\n\nFieldError.displayName = 'FieldError';\n"],"names":["AriaFieldError"],"mappings":";;;;;AAwBO,MAAM,UAAA,GAAa,UAAA;AAAA,EACxB,CAAC,OAAwB,GAAA,KAAQ;AAC/B,IAAA,MAAM,EAAE,SAAA,EAAW,GAAG,IAAA,EAAK,GAAI,KAAA;AAE/B,IAAA,uBACE,GAAA;AAAA,MAACA,YAAA;AAAA,MAAA;AAAA,QACC,SAAA,EAAW,IAAA,CAAK,gBAAA,EAAkB,SAAS,CAAA;AAAA,QAC3C,GAAA;AAAA,QACC,GAAG;AAAA;AAAA,KACN;AAAA,EAEJ;AACF;AAEA,UAAA,CAAW,WAAA,GAAc,YAAA;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldLabel.esm.js","sources":["../../../src/components/FieldLabel/FieldLabel.tsx"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Label } from 'react-aria-components';\nimport { forwardRef } from 'react';\nimport type { FieldLabelProps } from './types';\nimport { useStyles } from '../../hooks/useStyles';\n\n/** @public */\nexport const FieldLabel = forwardRef<HTMLDivElement, FieldLabelProps>(\n (props: FieldLabelProps, ref) => {\n const { label, secondaryLabel, description, htmlFor, id, ...rest } = props;\n\n const { classNames } = useStyles('FieldLabel');\n\n if (!label) return null;\n\n return (\n <div className={classNames.root} {...rest} ref={ref}>\n {label && (\n <Label className={classNames.label} htmlFor={htmlFor} id={id}>\n {label}\n {secondaryLabel && (\n <span aria-hidden=\"true\" className={classNames.secondaryLabel}>\n ({secondaryLabel})\n </span>\n )}\n </Label>\n )}\n {description && (\n <div className={classNames.description}>{description}</div>\n )}\n </div>\n );\n },\n);\n\nFieldLabel.displayName = 'FieldLabel';\n"],"names":[],"mappings":";;;;;AAqBO,MAAM,
|
|
1
|
+
{"version":3,"file":"FieldLabel.esm.js","sources":["../../../src/components/FieldLabel/FieldLabel.tsx"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Label } from 'react-aria-components';\nimport { forwardRef } from 'react';\nimport type { FieldLabelProps } from './types';\nimport { useStyles } from '../../hooks/useStyles';\n\n/** @public */\nexport const FieldLabel = forwardRef<HTMLDivElement, FieldLabelProps>(\n (props: FieldLabelProps, ref) => {\n const { label, secondaryLabel, description, htmlFor, id, ...rest } = props;\n\n const { classNames } = useStyles('FieldLabel');\n\n if (!label) return null;\n\n return (\n <div className={classNames.root} {...rest} ref={ref}>\n {label && (\n <Label className={classNames.label} htmlFor={htmlFor} id={id}>\n {label}\n {secondaryLabel && (\n <span aria-hidden=\"true\" className={classNames.secondaryLabel}>\n ({secondaryLabel})\n </span>\n )}\n </Label>\n )}\n {description && (\n <div className={classNames.description}>{description}</div>\n )}\n </div>\n );\n },\n);\n\nFieldLabel.displayName = 'FieldLabel';\n"],"names":[],"mappings":";;;;;AAqBO,MAAM,UAAA,GAAa,UAAA;AAAA,EACxB,CAAC,OAAwB,GAAA,KAAQ;AAC/B,IAAA,MAAM,EAAE,OAAO,cAAA,EAAgB,WAAA,EAAa,SAAS,EAAA,EAAI,GAAG,MAAK,GAAI,KAAA;AAErE,IAAA,MAAM,EAAE,UAAA,EAAW,GAAI,SAAA,CAAU,YAAY,CAAA;AAE7C,IAAA,IAAI,CAAC,OAAO,OAAO,IAAA;AAEnB,IAAA,4BACG,KAAA,EAAA,EAAI,SAAA,EAAW,WAAW,IAAA,EAAO,GAAG,MAAM,GAAA,EACxC,QAAA,EAAA;AAAA,MAAA,KAAA,yBACE,KAAA,EAAA,EAAM,SAAA,EAAW,UAAA,CAAW,KAAA,EAAO,SAAkB,EAAA,EACnD,QAAA,EAAA;AAAA,QAAA,KAAA;AAAA,QACA,kCACC,IAAA,CAAC,MAAA,EAAA,EAAK,eAAY,MAAA,EAAO,SAAA,EAAW,WAAW,cAAA,EAAgB,QAAA,EAAA;AAAA,UAAA,GAAA;AAAA,UAC3D,cAAA;AAAA,UAAe;AAAA,SAAA,EACnB;AAAA,OAAA,EAEJ,CAAA;AAAA,MAED,+BACC,GAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,UAAA,CAAW,aAAc,QAAA,EAAA,WAAA,EAAY;AAAA,KAAA,EAEzD,CAAA;AAAA,EAEJ;AACF;AAEA,UAAA,CAAW,WAAA,GAAc,YAAA;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Flex.esm.js","sources":["../../../src/components/Flex/Flex.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createElement, forwardRef } from 'react';\nimport { FlexProps } from './types';\nimport clsx from 'clsx';\nimport { flexPropDefs } from './Flex.props';\nimport { extractProps } from '../../utils/extractProps';\nimport { gapPropDefs } from '../../props/gap-props';\nimport { spacingPropDefs } from '../../props/spacing.props';\nimport { useStyles } from '../../hooks/useStyles';\n\n/** @public */\nexport const Flex = forwardRef<HTMLDivElement, FlexProps>((props, ref) => {\n const propDefs = {\n ...gapPropDefs,\n ...flexPropDefs,\n ...spacingPropDefs,\n };\n\n const { classNames } = useStyles('Flex');\n const { className, style } = extractProps(props, propDefs);\n\n return createElement('div', {\n ref,\n className: clsx(classNames.root, className),\n style,\n children: props.children,\n });\n});\n"],"names":[],"mappings":";;;;;;;;AA0BO,MAAM,
|
|
1
|
+
{"version":3,"file":"Flex.esm.js","sources":["../../../src/components/Flex/Flex.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createElement, forwardRef } from 'react';\nimport { FlexProps } from './types';\nimport clsx from 'clsx';\nimport { flexPropDefs } from './Flex.props';\nimport { extractProps } from '../../utils/extractProps';\nimport { gapPropDefs } from '../../props/gap-props';\nimport { spacingPropDefs } from '../../props/spacing.props';\nimport { useStyles } from '../../hooks/useStyles';\n\n/** @public */\nexport const Flex = forwardRef<HTMLDivElement, FlexProps>((props, ref) => {\n const propDefs = {\n ...gapPropDefs,\n ...flexPropDefs,\n ...spacingPropDefs,\n };\n\n const { classNames } = useStyles('Flex');\n const { className, style } = extractProps(props, propDefs);\n\n return createElement('div', {\n ref,\n className: clsx(classNames.root, className),\n style,\n children: props.children,\n });\n});\n"],"names":[],"mappings":";;;;;;;;AA0BO,MAAM,IAAA,GAAO,UAAA,CAAsC,CAAC,KAAA,EAAO,GAAA,KAAQ;AACxE,EAAA,MAAM,QAAA,GAAW;AAAA,IACf,GAAG,WAAA;AAAA,IACH,GAAG,YAAA;AAAA,IACH,GAAG;AAAA,GACL;AAEA,EAAA,MAAM,EAAE,UAAA,EAAW,GAAI,SAAA,CAAU,MAAM,CAAA;AACvC,EAAA,MAAM,EAAE,SAAA,EAAW,KAAA,EAAM,GAAI,YAAA,CAAa,OAAO,QAAQ,CAAA;AAEzD,EAAA,OAAO,cAAc,KAAA,EAAO;AAAA,IAC1B,GAAA;AAAA,IACA,SAAA,EAAW,IAAA,CAAK,UAAA,CAAW,IAAA,EAAM,SAAS,CAAA;AAAA,IAC1C,KAAA;AAAA,IACA,UAAU,KAAA,CAAM;AAAA,GACjB,CAAA;AACH,CAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Flex.props.esm.js","sources":["../../../src/components/Flex/Flex.props.ts"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { PropDef, GetPropDefTypes } from '../../props/prop-def';\n\nconst alignValues = ['start', 'center', 'end', 'baseline', 'stretch'] as const;\nconst directionValues = [\n 'row',\n 'column',\n 'row-reverse',\n 'column-reverse',\n] as const;\nconst justifyValues = ['start', 'center', 'end', 'between'] as const;\n\n/** @public */\nconst flexPropDefs = {\n align: {\n type: 'enum',\n className: 'bui-align',\n values: alignValues,\n responsive: true,\n },\n direction: {\n type: 'enum',\n className: 'bui-fd',\n values: directionValues,\n responsive: true,\n },\n justify: {\n type: 'enum',\n className: 'bui-jc',\n values: justifyValues,\n responsive: true,\n },\n} satisfies {\n align: PropDef<(typeof alignValues)[number]>;\n direction: PropDef<(typeof directionValues)[number]>;\n justify: PropDef<(typeof justifyValues)[number]>;\n};\n\n/** @public */\ntype FlexOwnProps = GetPropDefTypes<typeof flexPropDefs>;\n\nexport { flexPropDefs };\nexport type { FlexOwnProps };\n"],"names":[],"mappings":"AAkBA,MAAM,cAAc,CAAC,OAAA,EAAS,
|
|
1
|
+
{"version":3,"file":"Flex.props.esm.js","sources":["../../../src/components/Flex/Flex.props.ts"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { PropDef, GetPropDefTypes } from '../../props/prop-def';\n\nconst alignValues = ['start', 'center', 'end', 'baseline', 'stretch'] as const;\nconst directionValues = [\n 'row',\n 'column',\n 'row-reverse',\n 'column-reverse',\n] as const;\nconst justifyValues = ['start', 'center', 'end', 'between'] as const;\n\n/** @public */\nconst flexPropDefs = {\n align: {\n type: 'enum',\n className: 'bui-align',\n values: alignValues,\n responsive: true,\n },\n direction: {\n type: 'enum',\n className: 'bui-fd',\n values: directionValues,\n responsive: true,\n },\n justify: {\n type: 'enum',\n className: 'bui-jc',\n values: justifyValues,\n responsive: true,\n },\n} satisfies {\n align: PropDef<(typeof alignValues)[number]>;\n direction: PropDef<(typeof directionValues)[number]>;\n justify: PropDef<(typeof justifyValues)[number]>;\n};\n\n/** @public */\ntype FlexOwnProps = GetPropDefTypes<typeof flexPropDefs>;\n\nexport { flexPropDefs };\nexport type { FlexOwnProps };\n"],"names":[],"mappings":"AAkBA,MAAM,cAAc,CAAC,OAAA,EAAS,QAAA,EAAU,KAAA,EAAO,YAAY,SAAS,CAAA;AACpE,MAAM,eAAA,GAAkB;AAAA,EACtB,KAAA;AAAA,EACA,QAAA;AAAA,EACA,aAAA;AAAA,EACA;AACF,CAAA;AACA,MAAM,aAAA,GAAgB,CAAC,OAAA,EAAS,QAAA,EAAU,OAAO,SAAS,CAAA;AAG1D,MAAM,YAAA,GAAe;AAAA,EACnB,KAAA,EAAO;AAAA,IACL,IAAA,EAAM,MAAA;AAAA,IACN,SAAA,EAAW,WAAA;AAAA,IACX,MAAA,EAAQ,WAAA;AAAA,IACR,UAAA,EAAY;AAAA,GACd;AAAA,EACA,SAAA,EAAW;AAAA,IACT,IAAA,EAAM,MAAA;AAAA,IACN,SAAA,EAAW,QAAA;AAAA,IACX,MAAA,EAAQ,eAAA;AAAA,IACR,UAAA,EAAY;AAAA,GACd;AAAA,EACA,OAAA,EAAS;AAAA,IACP,IAAA,EAAM,MAAA;AAAA,IACN,SAAA,EAAW,QAAA;AAAA,IACX,MAAA,EAAQ,aAAA;AAAA,IACR,UAAA,EAAY;AAAA;AAEhB;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Grid.esm.js","sources":["../../../src/components/Grid/Grid.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createElement, forwardRef } from 'react';\nimport { gapPropDefs } from '../../props/gap-props';\nimport { extractProps } from '../../utils/extractProps';\nimport { gridItemPropDefs, gridPropDefs } from './Grid.props';\nimport clsx from 'clsx';\nimport type { GridItemProps, GridProps } from './types';\nimport { spacingPropDefs } from '../../props/spacing.props';\nimport { useStyles } from '../../hooks/useStyles';\n\nconst GridRoot = forwardRef<HTMLDivElement, GridProps>((props, ref) => {\n const propDefs = {\n ...gapPropDefs,\n ...gridPropDefs,\n ...spacingPropDefs,\n };\n\n const { classNames } = useStyles('Grid');\n\n const { className, style } = extractProps(props, propDefs);\n\n return createElement('div', {\n ref,\n className: clsx(classNames.root, className),\n style,\n children: props.children,\n });\n});\n\nconst GridItem = forwardRef<HTMLDivElement, GridItemProps>((props, ref) => {\n const propDefs = {\n ...gridItemPropDefs,\n };\n\n const { classNames } = useStyles('Grid');\n const { className, style } = extractProps(props, propDefs);\n\n return createElement('div', {\n ref,\n className: clsx(classNames.item, className),\n style,\n children: props.children,\n });\n});\n\n/** @public */\nexport const Grid = {\n Root: GridRoot,\n Item: GridItem,\n};\n"],"names":[],"mappings":";;;;;;;;AAyBA,MAAM,
|
|
1
|
+
{"version":3,"file":"Grid.esm.js","sources":["../../../src/components/Grid/Grid.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createElement, forwardRef } from 'react';\nimport { gapPropDefs } from '../../props/gap-props';\nimport { extractProps } from '../../utils/extractProps';\nimport { gridItemPropDefs, gridPropDefs } from './Grid.props';\nimport clsx from 'clsx';\nimport type { GridItemProps, GridProps } from './types';\nimport { spacingPropDefs } from '../../props/spacing.props';\nimport { useStyles } from '../../hooks/useStyles';\n\nconst GridRoot = forwardRef<HTMLDivElement, GridProps>((props, ref) => {\n const propDefs = {\n ...gapPropDefs,\n ...gridPropDefs,\n ...spacingPropDefs,\n };\n\n const { classNames } = useStyles('Grid');\n\n const { className, style } = extractProps(props, propDefs);\n\n return createElement('div', {\n ref,\n className: clsx(classNames.root, className),\n style,\n children: props.children,\n });\n});\n\nconst GridItem = forwardRef<HTMLDivElement, GridItemProps>((props, ref) => {\n const propDefs = {\n ...gridItemPropDefs,\n };\n\n const { classNames } = useStyles('Grid');\n const { className, style } = extractProps(props, propDefs);\n\n return createElement('div', {\n ref,\n className: clsx(classNames.item, className),\n style,\n children: props.children,\n });\n});\n\n/** @public */\nexport const Grid = {\n Root: GridRoot,\n Item: GridItem,\n};\n"],"names":[],"mappings":";;;;;;;;AAyBA,MAAM,QAAA,GAAW,UAAA,CAAsC,CAAC,KAAA,EAAO,GAAA,KAAQ;AACrE,EAAA,MAAM,QAAA,GAAW;AAAA,IACf,GAAG,WAAA;AAAA,IACH,GAAG,YAAA;AAAA,IACH,GAAG;AAAA,GACL;AAEA,EAAA,MAAM,EAAE,UAAA,EAAW,GAAI,SAAA,CAAU,MAAM,CAAA;AAEvC,EAAA,MAAM,EAAE,SAAA,EAAW,KAAA,EAAM,GAAI,YAAA,CAAa,OAAO,QAAQ,CAAA;AAEzD,EAAA,OAAO,cAAc,KAAA,EAAO;AAAA,IAC1B,GAAA;AAAA,IACA,SAAA,EAAW,IAAA,CAAK,UAAA,CAAW,IAAA,EAAM,SAAS,CAAA;AAAA,IAC1C,KAAA;AAAA,IACA,UAAU,KAAA,CAAM;AAAA,GACjB,CAAA;AACH,CAAC,CAAA;AAED,MAAM,QAAA,GAAW,UAAA,CAA0C,CAAC,KAAA,EAAO,GAAA,KAAQ;AACzE,EAAA,MAAM,QAAA,GAAW;AAAA,IACf,GAAG;AAAA,GACL;AAEA,EAAA,MAAM,EAAE,UAAA,EAAW,GAAI,SAAA,CAAU,MAAM,CAAA;AACvC,EAAA,MAAM,EAAE,SAAA,EAAW,KAAA,EAAM,GAAI,YAAA,CAAa,OAAO,QAAQ,CAAA;AAEzD,EAAA,OAAO,cAAc,KAAA,EAAO;AAAA,IAC1B,GAAA;AAAA,IACA,SAAA,EAAW,IAAA,CAAK,UAAA,CAAW,IAAA,EAAM,SAAS,CAAA;AAAA,IAC1C,KAAA;AAAA,IACA,UAAU,KAAA,CAAM;AAAA,GACjB,CAAA;AACH,CAAC,CAAA;AAGM,MAAM,IAAA,GAAO;AAAA,EAClB,IAAA,EAAM,QAAA;AAAA,EACN,IAAA,EAAM;AACR;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Grid.props.esm.js","sources":["../../../src/components/Grid/Grid.props.ts"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { PropDef, GetPropDefTypes } from '../../props/prop-def';\n\nconst columnsValues = [\n '1',\n '2',\n '3',\n '4',\n '5',\n '6',\n '7',\n '8',\n '9',\n '10',\n '11',\n '12',\n 'auto',\n] as const;\n\n/** @public */\nconst gridPropDefs = {\n columns: {\n type: 'enum | string',\n className: 'bui-columns',\n customProperties: ['--columns'],\n values: columnsValues,\n responsive: true,\n default: 'auto',\n },\n} satisfies {\n columns: PropDef<(typeof columnsValues)[number]>;\n};\n\n/** @public */\nconst gridItemPropDefs = {\n colSpan: {\n type: 'enum | string',\n className: 'bui-col-span',\n customProperties: ['--col-span'],\n values: columnsValues,\n responsive: true,\n },\n colEnd: {\n type: 'enum | string',\n className: 'bui-col-end',\n customProperties: ['--col-end'],\n values: columnsValues,\n responsive: true,\n },\n colStart: {\n type: 'enum | string',\n className: 'bui-col-start',\n customProperties: ['--col-start'],\n values: columnsValues,\n responsive: true,\n },\n rowSpan: {\n type: 'enum | string',\n className: 'bui-row-span',\n customProperties: ['--row-span'],\n values: columnsValues,\n responsive: true,\n },\n} satisfies {\n colSpan: PropDef<(typeof columnsValues)[number]>;\n colEnd: PropDef<(typeof columnsValues)[number]>;\n colStart: PropDef<(typeof columnsValues)[number]>;\n rowSpan: PropDef<(typeof columnsValues)[number]>;\n};\n\n/** @public */\ntype GridOwnProps = GetPropDefTypes<typeof gridPropDefs>;\n\n/** @public */\ntype GridItemOwnProps = GetPropDefTypes<typeof gridItemPropDefs>;\n\nexport { gridPropDefs, gridItemPropDefs };\nexport type { GridOwnProps, GridItemOwnProps };\n"],"names":[],"mappings":"AAkBA,MAAM,
|
|
1
|
+
{"version":3,"file":"Grid.props.esm.js","sources":["../../../src/components/Grid/Grid.props.ts"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { PropDef, GetPropDefTypes } from '../../props/prop-def';\n\nconst columnsValues = [\n '1',\n '2',\n '3',\n '4',\n '5',\n '6',\n '7',\n '8',\n '9',\n '10',\n '11',\n '12',\n 'auto',\n] as const;\n\n/** @public */\nconst gridPropDefs = {\n columns: {\n type: 'enum | string',\n className: 'bui-columns',\n customProperties: ['--columns'],\n values: columnsValues,\n responsive: true,\n default: 'auto',\n },\n} satisfies {\n columns: PropDef<(typeof columnsValues)[number]>;\n};\n\n/** @public */\nconst gridItemPropDefs = {\n colSpan: {\n type: 'enum | string',\n className: 'bui-col-span',\n customProperties: ['--col-span'],\n values: columnsValues,\n responsive: true,\n },\n colEnd: {\n type: 'enum | string',\n className: 'bui-col-end',\n customProperties: ['--col-end'],\n values: columnsValues,\n responsive: true,\n },\n colStart: {\n type: 'enum | string',\n className: 'bui-col-start',\n customProperties: ['--col-start'],\n values: columnsValues,\n responsive: true,\n },\n rowSpan: {\n type: 'enum | string',\n className: 'bui-row-span',\n customProperties: ['--row-span'],\n values: columnsValues,\n responsive: true,\n },\n} satisfies {\n colSpan: PropDef<(typeof columnsValues)[number]>;\n colEnd: PropDef<(typeof columnsValues)[number]>;\n colStart: PropDef<(typeof columnsValues)[number]>;\n rowSpan: PropDef<(typeof columnsValues)[number]>;\n};\n\n/** @public */\ntype GridOwnProps = GetPropDefTypes<typeof gridPropDefs>;\n\n/** @public */\ntype GridItemOwnProps = GetPropDefTypes<typeof gridItemPropDefs>;\n\nexport { gridPropDefs, gridItemPropDefs };\nexport type { GridOwnProps, GridItemOwnProps };\n"],"names":[],"mappings":"AAkBA,MAAM,aAAA,GAAgB;AAAA,EACpB,GAAA;AAAA,EACA,GAAA;AAAA,EACA,GAAA;AAAA,EACA,GAAA;AAAA,EACA,GAAA;AAAA,EACA,GAAA;AAAA,EACA,GAAA;AAAA,EACA,GAAA;AAAA,EACA,GAAA;AAAA,EACA,IAAA;AAAA,EACA,IAAA;AAAA,EACA,IAAA;AAAA,EACA;AACF,CAAA;AAGA,MAAM,YAAA,GAAe;AAAA,EACnB,OAAA,EAAS;AAAA,IACP,IAAA,EAAM,eAAA;AAAA,IACN,SAAA,EAAW,aAAA;AAAA,IACX,gBAAA,EAAkB,CAAC,WAAW,CAAA;AAAA,IAC9B,MAAA,EAAQ,aAAA;AAAA,IACR,UAAA,EAAY,IAAA;AAAA,IACZ,OAAA,EAAS;AAAA;AAEb;AAKA,MAAM,gBAAA,GAAmB;AAAA,EACvB,OAAA,EAAS;AAAA,IACP,IAAA,EAAM,eAAA;AAAA,IACN,SAAA,EAAW,cAAA;AAAA,IACX,gBAAA,EAAkB,CAAC,YAAY,CAAA;AAAA,IAC/B,MAAA,EAAQ,aAAA;AAAA,IACR,UAAA,EAAY;AAAA,GACd;AAAA,EACA,MAAA,EAAQ;AAAA,IACN,IAAA,EAAM,eAAA;AAAA,IACN,SAAA,EAAW,aAAA;AAAA,IACX,gBAAA,EAAkB,CAAC,WAAW,CAAA;AAAA,IAC9B,MAAA,EAAQ,aAAA;AAAA,IACR,UAAA,EAAY;AAAA,GACd;AAAA,EACA,QAAA,EAAU;AAAA,IACR,IAAA,EAAM,eAAA;AAAA,IACN,SAAA,EAAW,eAAA;AAAA,IACX,gBAAA,EAAkB,CAAC,aAAa,CAAA;AAAA,IAChC,MAAA,EAAQ,aAAA;AAAA,IACR,UAAA,EAAY;AAAA,GACd;AAAA,EACA,OAAA,EAAS;AAAA,IACP,IAAA,EAAM,eAAA;AAAA,IACN,SAAA,EAAW,cAAA;AAAA,IACX,gBAAA,EAAkB,CAAC,YAAY,CAAA;AAAA,IAC/B,MAAA,EAAQ,aAAA;AAAA,IACR,UAAA,EAAY;AAAA;AAEhB;;;;"}
|
|
@@ -4,16 +4,7 @@ import { Tabs, TabList, Tab } from '../Tabs/Tabs.esm.js';
|
|
|
4
4
|
import { useStyles } from '../../hooks/useStyles.esm.js';
|
|
5
5
|
|
|
6
6
|
const Header = (props) => {
|
|
7
|
-
const {
|
|
8
|
-
tabs,
|
|
9
|
-
icon,
|
|
10
|
-
title,
|
|
11
|
-
titleLink,
|
|
12
|
-
menuItems,
|
|
13
|
-
breadcrumbs,
|
|
14
|
-
customActions,
|
|
15
|
-
onTabSelectionChange
|
|
16
|
-
} = props;
|
|
7
|
+
const { tabs, icon, title, titleLink, customActions, onTabSelectionChange } = props;
|
|
17
8
|
const { classNames } = useStyles("Header");
|
|
18
9
|
const hasTabs = tabs && tabs.length > 0;
|
|
19
10
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
@@ -23,8 +14,6 @@ const Header = (props) => {
|
|
|
23
14
|
icon,
|
|
24
15
|
title,
|
|
25
16
|
titleLink,
|
|
26
|
-
menuItems,
|
|
27
|
-
breadcrumbs,
|
|
28
17
|
customActions,
|
|
29
18
|
hasTabs
|
|
30
19
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Header.esm.js","sources":["../../../src/components/Header/Header.tsx"],"sourcesContent":["/*\n * Copyright
|
|
1
|
+
{"version":3,"file":"Header.esm.js","sources":["../../../src/components/Header/Header.tsx"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { HeaderProps } from './types';\nimport { HeaderToolbar } from './HeaderToolbar';\nimport { Tabs, TabList, Tab } from '../Tabs';\nimport { useStyles } from '../../hooks/useStyles';\nimport { type NavigateOptions } from 'react-router-dom';\n\ndeclare module 'react-aria-components' {\n interface RouterConfig {\n routerOptions: NavigateOptions;\n }\n}\n\n/**\n * A component that renders a toolbar.\n *\n * @public\n */\nexport const Header = (props: HeaderProps) => {\n const { tabs, icon, title, titleLink, customActions, onTabSelectionChange } =\n props;\n\n const { classNames } = useStyles('Header');\n\n const hasTabs = tabs && tabs.length > 0;\n\n return (\n <>\n <HeaderToolbar\n icon={icon}\n title={title}\n titleLink={titleLink}\n customActions={customActions}\n hasTabs={hasTabs}\n />\n {tabs && (\n <div className={classNames.tabsWrapper}>\n <Tabs onSelectionChange={onTabSelectionChange}>\n <TabList>\n {tabs?.map(tab => (\n <Tab\n key={tab.id}\n id={tab.id}\n href={tab.href}\n matchStrategy={tab.matchStrategy}\n >\n {tab.label}\n </Tab>\n ))}\n </TabList>\n </Tabs>\n </div>\n )}\n </>\n );\n};\n"],"names":[],"mappings":";;;;;AAiCO,MAAM,MAAA,GAAS,CAAC,KAAA,KAAuB;AAC5C,EAAA,MAAM,EAAE,IAAA,EAAM,IAAA,EAAM,OAAO,SAAA,EAAW,aAAA,EAAe,sBAAqB,GACxE,KAAA;AAEF,EAAA,MAAM,EAAE,UAAA,EAAW,GAAI,SAAA,CAAU,QAAQ,CAAA;AAEzC,EAAA,MAAM,OAAA,GAAU,IAAA,IAAQ,IAAA,CAAK,MAAA,GAAS,CAAA;AAEtC,EAAA,uBACE,IAAA,CAAA,QAAA,EAAA,EACE,QAAA,EAAA;AAAA,oBAAA,GAAA;AAAA,MAAC,aAAA;AAAA,MAAA;AAAA,QACC,IAAA;AAAA,QACA,KAAA;AAAA,QACA,SAAA;AAAA,QACA,aAAA;AAAA,QACA;AAAA;AAAA,KACF;AAAA,IACC,IAAA,oBACC,GAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,WAAW,WAAA,EACzB,QAAA,kBAAA,GAAA,CAAC,IAAA,EAAA,EAAK,iBAAA,EAAmB,oBAAA,EACvB,QAAA,kBAAA,GAAA,CAAC,OAAA,EAAA,EACE,QAAA,EAAA,IAAA,EAAM,IAAI,CAAA,GAAA,qBACT,GAAA;AAAA,MAAC,GAAA;AAAA,MAAA;AAAA,QAEC,IAAI,GAAA,CAAI,EAAA;AAAA,QACR,MAAM,GAAA,CAAI,IAAA;AAAA,QACV,eAAe,GAAA,CAAI,aAAA;AAAA,QAElB,QAAA,EAAA,GAAA,CAAI;AAAA,OAAA;AAAA,MALA,GAAA,CAAI;AAAA,KAOZ,CAAA,EACH,CAAA,EACF,CAAA,EACF;AAAA,GAAA,EAEJ,CAAA;AAEJ;;;;"}
|
|
@@ -1,145 +1,25 @@
|
|
|
1
1
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { RouterProvider, Link } from 'react-aria-components';
|
|
3
3
|
import { useStyles } from '../../hooks/useStyles.esm.js';
|
|
4
|
-
import { useRef
|
|
5
|
-
import { RiShapesLine
|
|
6
|
-
import { ButtonIcon } from '../ButtonIcon/ButtonIcon.esm.js';
|
|
7
|
-
import { Menu } from '../Menu/Menu.esm.js';
|
|
4
|
+
import { useRef } from 'react';
|
|
5
|
+
import { RiShapesLine } from '@remixicon/react';
|
|
8
6
|
import { Text } from '../Text/Text.esm.js';
|
|
9
7
|
import { useNavigate, useHref } from 'react-router-dom';
|
|
10
|
-
import { gsap } from 'gsap';
|
|
11
|
-
import { ScrollTrigger } from 'gsap/ScrollTrigger';
|
|
12
|
-
import { useGSAP } from '@gsap/react';
|
|
13
8
|
|
|
14
|
-
gsap.registerPlugin(ScrollTrigger);
|
|
15
9
|
const HeaderToolbar = (props) => {
|
|
16
|
-
const {
|
|
17
|
-
icon,
|
|
18
|
-
title,
|
|
19
|
-
titleLink,
|
|
20
|
-
menuItems,
|
|
21
|
-
breadcrumbs,
|
|
22
|
-
customActions,
|
|
23
|
-
hasTabs
|
|
24
|
-
} = props;
|
|
10
|
+
const { icon, title, titleLink, customActions, hasTabs } = props;
|
|
25
11
|
const { classNames } = useStyles("Header");
|
|
26
12
|
let navigate = useNavigate();
|
|
27
13
|
const toolbarWrapperRef = useRef(null);
|
|
28
14
|
const toolbarContentRef = useRef(null);
|
|
29
15
|
const toolbarControlsRef = useRef(null);
|
|
30
|
-
const breadcrumbsRef = useRef(null);
|
|
31
|
-
const [showBreadcrumbs, setShowBreadcrumbs] = useState(true);
|
|
32
|
-
useEffect(() => {
|
|
33
|
-
const wrapper = toolbarWrapperRef.current;
|
|
34
|
-
if (!wrapper) return;
|
|
35
|
-
const resizeObserver = new ResizeObserver(() => {
|
|
36
|
-
const wrapper2 = toolbarWrapperRef.current;
|
|
37
|
-
const content = toolbarContentRef.current;
|
|
38
|
-
const options = toolbarControlsRef.current;
|
|
39
|
-
if (!wrapper2 || !content) return;
|
|
40
|
-
const wrapperRect = wrapper2.getBoundingClientRect();
|
|
41
|
-
const wrapperWidth = wrapperRect.width;
|
|
42
|
-
const wrapperPadding = 24;
|
|
43
|
-
const availableWidth = wrapperWidth - wrapperPadding;
|
|
44
|
-
const contentRect = content.getBoundingClientRect();
|
|
45
|
-
const contentWidth = contentRect?.width || 0;
|
|
46
|
-
const optionsRect = options?.getBoundingClientRect();
|
|
47
|
-
const optionsWidth = optionsRect?.width || 0;
|
|
48
|
-
const shouldShowBreadcrumbs = contentWidth + optionsWidth + 32 <= availableWidth;
|
|
49
|
-
setShowBreadcrumbs(
|
|
50
|
-
(prev) => prev !== shouldShowBreadcrumbs ? shouldShowBreadcrumbs : prev
|
|
51
|
-
);
|
|
52
|
-
});
|
|
53
|
-
resizeObserver.observe(wrapper);
|
|
54
|
-
return () => {
|
|
55
|
-
resizeObserver.disconnect();
|
|
56
|
-
};
|
|
57
|
-
}, []);
|
|
58
|
-
useGSAP(() => {
|
|
59
|
-
gsap.to(breadcrumbsRef.current, {
|
|
60
|
-
scrollTrigger: {
|
|
61
|
-
start: "10% 10%",
|
|
62
|
-
end: "20% 20%",
|
|
63
|
-
scrub: true
|
|
64
|
-
},
|
|
65
|
-
opacity: 1,
|
|
66
|
-
duration: 1,
|
|
67
|
-
ease: "power2.inOut"
|
|
68
|
-
});
|
|
69
|
-
});
|
|
70
16
|
const titleContent = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
71
17
|
/* @__PURE__ */ jsx("div", { className: classNames.toolbarIcon, children: icon || /* @__PURE__ */ jsx(RiShapesLine, {}) }),
|
|
72
18
|
/* @__PURE__ */ jsx(Text, { variant: "body-medium", children: title || "Your plugin" })
|
|
73
19
|
] });
|
|
74
20
|
return /* @__PURE__ */ jsx(RouterProvider, { navigate, useHref, children: /* @__PURE__ */ jsx("div", { className: classNames.toolbar, "data-has-tabs": hasTabs, children: /* @__PURE__ */ jsxs("div", { className: classNames.toolbarWrapper, ref: toolbarWrapperRef, children: [
|
|
75
|
-
/* @__PURE__ */
|
|
76
|
-
|
|
77
|
-
breadcrumbs && /* @__PURE__ */ jsxs(
|
|
78
|
-
"div",
|
|
79
|
-
{
|
|
80
|
-
ref: breadcrumbsRef,
|
|
81
|
-
className: classNames.breadcrumbs,
|
|
82
|
-
style: {
|
|
83
|
-
opacity: 0,
|
|
84
|
-
visibility: showBreadcrumbs ? "visible" : "hidden"
|
|
85
|
-
},
|
|
86
|
-
children: [
|
|
87
|
-
/* @__PURE__ */ jsx(
|
|
88
|
-
RiArrowRightSLine,
|
|
89
|
-
{
|
|
90
|
-
size: 16,
|
|
91
|
-
className: classNames.breadcrumbSeparator
|
|
92
|
-
}
|
|
93
|
-
),
|
|
94
|
-
breadcrumbs.map((breadcrumb, index) => /* @__PURE__ */ jsxs("div", { className: classNames.breadcrumb, children: [
|
|
95
|
-
/* @__PURE__ */ jsx(
|
|
96
|
-
Link,
|
|
97
|
-
{
|
|
98
|
-
href: breadcrumb.href,
|
|
99
|
-
className: classNames.breadcrumbLink,
|
|
100
|
-
"data-active": index === breadcrumbs.length - 1,
|
|
101
|
-
children: breadcrumb.label
|
|
102
|
-
}
|
|
103
|
-
),
|
|
104
|
-
index < breadcrumbs.length - 1 && /* @__PURE__ */ jsx(
|
|
105
|
-
RiArrowRightSLine,
|
|
106
|
-
{
|
|
107
|
-
size: 16,
|
|
108
|
-
className: classNames.breadcrumbSeparator
|
|
109
|
-
}
|
|
110
|
-
)
|
|
111
|
-
] }, breadcrumb.label))
|
|
112
|
-
]
|
|
113
|
-
}
|
|
114
|
-
)
|
|
115
|
-
] }),
|
|
116
|
-
/* @__PURE__ */ jsxs("div", { className: classNames.toolbarControls, ref: toolbarControlsRef, children: [
|
|
117
|
-
customActions,
|
|
118
|
-
menuItems && /* @__PURE__ */ jsxs(Menu.Root, { children: [
|
|
119
|
-
/* @__PURE__ */ jsx(
|
|
120
|
-
Menu.Trigger,
|
|
121
|
-
{
|
|
122
|
-
render: (props2) => /* @__PURE__ */ jsx(
|
|
123
|
-
ButtonIcon,
|
|
124
|
-
{
|
|
125
|
-
size: "small",
|
|
126
|
-
icon: /* @__PURE__ */ jsx(RiMore2Line, {}),
|
|
127
|
-
variant: "tertiary",
|
|
128
|
-
...props2
|
|
129
|
-
}
|
|
130
|
-
)
|
|
131
|
-
}
|
|
132
|
-
),
|
|
133
|
-
/* @__PURE__ */ jsx(Menu.Portal, { children: /* @__PURE__ */ jsx(Menu.Positioner, { sideOffset: 4, align: "end", children: /* @__PURE__ */ jsx(Menu.Popup, { children: menuItems.map((option) => /* @__PURE__ */ jsx(
|
|
134
|
-
Menu.Item,
|
|
135
|
-
{
|
|
136
|
-
onClick: () => option.onClick?.(),
|
|
137
|
-
children: option.label
|
|
138
|
-
},
|
|
139
|
-
option.value
|
|
140
|
-
)) }) }) })
|
|
141
|
-
] })
|
|
142
|
-
] })
|
|
21
|
+
/* @__PURE__ */ jsx("div", { className: classNames.toolbarContent, ref: toolbarContentRef, children: /* @__PURE__ */ jsx(Text, { as: "h1", variant: "body-medium", children: titleLink ? /* @__PURE__ */ jsx(Link, { className: classNames.toolbarName, href: titleLink, children: titleContent }) : /* @__PURE__ */ jsx("div", { className: classNames.toolbarName, children: titleContent }) }) }),
|
|
22
|
+
/* @__PURE__ */ jsx("div", { className: classNames.toolbarControls, ref: toolbarControlsRef, children: customActions })
|
|
143
23
|
] }) }) });
|
|
144
24
|
};
|
|
145
25
|
|