@backstage/ui 0.7.0-next.3 → 0.7.1-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +30 -0
- package/css/styles.css +263 -176
- package/dist/components/Avatar/Avatar.esm.js.map +1 -1
- package/dist/components/Box/Box.esm.js.map +1 -1
- package/dist/components/Box/Box.props.esm.js.map +1 -1
- package/dist/components/Button/Button.esm.js.map +1 -1
- package/dist/components/ButtonIcon/ButtonIcon.esm.js.map +1 -1
- package/dist/components/ButtonLink/ButtonLink.esm.js.map +1 -1
- package/dist/components/Card/Card.esm.js +4 -4
- package/dist/components/Card/Card.esm.js.map +1 -1
- package/dist/components/Checkbox/Checkbox.esm.js +5 -8
- package/dist/components/Checkbox/Checkbox.esm.js.map +1 -1
- package/dist/components/Collapsible/Collapsible.esm.js.map +1 -1
- package/dist/components/Container/Container.esm.js.map +1 -1
- package/dist/components/FieldError/FieldError.esm.js.map +1 -1
- package/dist/components/FieldLabel/FieldLabel.esm.js.map +1 -1
- package/dist/components/Flex/Flex.esm.js.map +1 -1
- package/dist/components/Flex/Flex.props.esm.js.map +1 -1
- package/dist/components/Grid/Grid.esm.js.map +1 -1
- package/dist/components/Grid/Grid.props.esm.js.map +1 -1
- package/dist/components/Header/Header.esm.js +1 -10
- package/dist/components/Header/Header.esm.js.map +1 -1
- package/dist/components/Header/HeaderToolbar.esm.js +3 -34
- package/dist/components/Header/HeaderToolbar.esm.js.map +1 -1
- package/dist/components/HeaderPage/HeaderPage.esm.js +30 -93
- package/dist/components/HeaderPage/HeaderPage.esm.js.map +1 -1
- package/dist/components/Icon/Icon.esm.js.map +1 -1
- package/dist/components/Icon/context.esm.js.map +1 -1
- package/dist/components/Icon/icons.esm.js +1 -1
- package/dist/components/Icon/icons.esm.js.map +1 -1
- package/dist/components/Icon/provider.esm.js.map +1 -1
- package/dist/components/Link/Link.esm.js.map +1 -1
- package/dist/components/Menu/Menu.esm.js +144 -202
- package/dist/components/Menu/Menu.esm.js.map +1 -1
- package/dist/components/RadioGroup/RadioGroup.esm.js.map +1 -1
- package/dist/components/ScrollArea/ScrollArea.esm.js.map +1 -1
- package/dist/components/SearchField/SearchField.esm.js.map +1 -1
- package/dist/components/Select/Select.esm.js +2 -0
- package/dist/components/Select/Select.esm.js.map +1 -1
- package/dist/components/Skeleton/Skeleton.esm.js.map +1 -1
- package/dist/components/Switch/Switch.esm.js.map +1 -1
- package/dist/components/Table/components/Cell.esm.js.map +1 -1
- package/dist/components/Table/components/CellProfile.esm.js.map +1 -1
- package/dist/components/Table/components/Column.esm.js.map +1 -1
- package/dist/components/Table/components/Row.esm.js.map +1 -1
- package/dist/components/Table/components/Table.esm.js.map +1 -1
- package/dist/components/Table/components/TableBody.esm.js.map +1 -1
- package/dist/components/Table/components/TableHeader.esm.js.map +1 -1
- package/dist/components/Table/hooks/useTable.esm.js.map +1 -1
- package/dist/components/TablePagination/TablePagination.esm.js +5 -8
- package/dist/components/TablePagination/TablePagination.esm.js.map +1 -1
- package/dist/components/Tabs/Tabs.esm.js.map +1 -1
- package/dist/components/Tabs/TabsIndicators.esm.js.map +1 -1
- package/dist/components/TagGroup/TagGroup.esm.js +62 -0
- package/dist/components/TagGroup/TagGroup.esm.js.map +1 -0
- package/dist/components/Text/Text.esm.js.map +1 -1
- package/dist/components/TextField/TextField.esm.js.map +1 -1
- package/dist/components/Tooltip/Tooltip.esm.js.map +1 -1
- package/dist/hooks/useBreakpoint.esm.js.map +1 -1
- package/dist/hooks/useIsomorphicLayoutEffect.esm.js.map +1 -1
- package/dist/hooks/useMediaQuery.esm.js.map +1 -1
- package/dist/hooks/useStyles.esm.js.map +1 -1
- package/dist/index.d.ts +137 -72
- package/dist/index.esm.js +3 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/props/display.props.esm.js.map +1 -1
- package/dist/props/gap-props.esm.js.map +1 -1
- package/dist/props/height.props.esm.js.map +1 -1
- package/dist/props/margin.props.esm.js.map +1 -1
- package/dist/props/padding.props.esm.js.map +1 -1
- package/dist/props/position.props.esm.js.map +1 -1
- package/dist/props/prop-def.esm.js.map +1 -1
- package/dist/props/spacing.props.esm.js.map +1 -1
- package/dist/props/width.props.esm.js.map +1 -1
- package/dist/utils/componentDefinitions.esm.js +25 -26
- package/dist/utils/componentDefinitions.esm.js.map +1 -1
- package/dist/utils/extractProps.esm.js.map +1 -1
- package/dist/utils/isExternalLink.esm.js.map +1 -1
- package/package.json +3 -15
- package/dist/components/Menu/Combobox.esm.js +0 -214
- package/dist/components/Menu/Combobox.esm.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextField.esm.js","sources":["../../../src/components/TextField/TextField.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { forwardRef, useEffect } from 'react';\nimport { Input, TextField as AriaTextField } from 'react-aria-components';\nimport clsx from 'clsx';\nimport { FieldLabel } from '../FieldLabel';\nimport { FieldError } from '../FieldError';\n\nimport type { TextFieldProps } from './types';\nimport { useStyles } from '../../hooks/useStyles';\n\n/** @public */\nexport const TextField = forwardRef<HTMLDivElement, TextFieldProps>(\n (props, ref) => {\n const {\n className,\n icon,\n size = 'small',\n label,\n secondaryLabel,\n description,\n isRequired,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n placeholder,\n ...rest\n } = props;\n\n useEffect(() => {\n if (!label && !ariaLabel && !ariaLabelledBy) {\n console.warn(\n 'TextField requires either a visible label, aria-label, or aria-labelledby for accessibility',\n );\n }\n }, [label, ariaLabel, ariaLabelledBy]);\n\n const { classNames, dataAttributes } = useStyles('TextField', {\n size,\n });\n\n // If a secondary label is provided, use it. Otherwise, use 'Required' if the field is required.\n const secondaryLabelText =\n secondaryLabel || (isRequired ? 'Required' : null);\n\n return (\n <AriaTextField\n className={clsx(classNames.root, className)}\n {...dataAttributes}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n {...rest}\n ref={ref}\n >\n <FieldLabel\n label={label}\n secondaryLabel={secondaryLabelText}\n description={description}\n />\n <div\n className={classNames.inputWrapper}\n data-size={dataAttributes['data-size']}\n >\n {icon && (\n <div\n className={classNames.inputIcon}\n data-size={dataAttributes['data-size']}\n aria-hidden=\"true\"\n >\n {icon}\n </div>\n )}\n <Input\n className={classNames.input}\n {...(icon && { 'data-icon': true })}\n placeholder={placeholder}\n />\n </div>\n <FieldError />\n </AriaTextField>\n );\n },\n);\n\nTextField.displayName = 'TextField';\n"],"names":["AriaTextField"],"mappings":";;;;;;;;AA0BO,MAAM,
|
|
1
|
+
{"version":3,"file":"TextField.esm.js","sources":["../../../src/components/TextField/TextField.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { forwardRef, useEffect } from 'react';\nimport { Input, TextField as AriaTextField } from 'react-aria-components';\nimport clsx from 'clsx';\nimport { FieldLabel } from '../FieldLabel';\nimport { FieldError } from '../FieldError';\n\nimport type { TextFieldProps } from './types';\nimport { useStyles } from '../../hooks/useStyles';\n\n/** @public */\nexport const TextField = forwardRef<HTMLDivElement, TextFieldProps>(\n (props, ref) => {\n const {\n className,\n icon,\n size = 'small',\n label,\n secondaryLabel,\n description,\n isRequired,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n placeholder,\n ...rest\n } = props;\n\n useEffect(() => {\n if (!label && !ariaLabel && !ariaLabelledBy) {\n console.warn(\n 'TextField requires either a visible label, aria-label, or aria-labelledby for accessibility',\n );\n }\n }, [label, ariaLabel, ariaLabelledBy]);\n\n const { classNames, dataAttributes } = useStyles('TextField', {\n size,\n });\n\n // If a secondary label is provided, use it. Otherwise, use 'Required' if the field is required.\n const secondaryLabelText =\n secondaryLabel || (isRequired ? 'Required' : null);\n\n return (\n <AriaTextField\n className={clsx(classNames.root, className)}\n {...dataAttributes}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n {...rest}\n ref={ref}\n >\n <FieldLabel\n label={label}\n secondaryLabel={secondaryLabelText}\n description={description}\n />\n <div\n className={classNames.inputWrapper}\n data-size={dataAttributes['data-size']}\n >\n {icon && (\n <div\n className={classNames.inputIcon}\n data-size={dataAttributes['data-size']}\n aria-hidden=\"true\"\n >\n {icon}\n </div>\n )}\n <Input\n className={classNames.input}\n {...(icon && { 'data-icon': true })}\n placeholder={placeholder}\n />\n </div>\n <FieldError />\n </AriaTextField>\n );\n },\n);\n\nTextField.displayName = 'TextField';\n"],"names":["AriaTextField"],"mappings":";;;;;;;;AA0BO,MAAM,SAAA,GAAY,UAAA;AAAA,EACvB,CAAC,OAAO,GAAA,KAAQ;AACd,IAAA,MAAM;AAAA,MACJ,SAAA;AAAA,MACA,IAAA;AAAA,MACA,IAAA,GAAO,OAAA;AAAA,MACP,KAAA;AAAA,MACA,cAAA;AAAA,MACA,WAAA;AAAA,MACA,UAAA;AAAA,MACA,YAAA,EAAc,SAAA;AAAA,MACd,iBAAA,EAAmB,cAAA;AAAA,MACnB,WAAA;AAAA,MACA,GAAG;AAAA,KACL,GAAI,KAAA;AAEJ,IAAA,SAAA,CAAU,MAAM;AACd,MAAA,IAAI,CAAC,KAAA,IAAS,CAAC,SAAA,IAAa,CAAC,cAAA,EAAgB;AAC3C,QAAA,OAAA,CAAQ,IAAA;AAAA,UACN;AAAA,SACF;AAAA,MACF;AAAA,IACF,CAAA,EAAG,CAAC,KAAA,EAAO,SAAA,EAAW,cAAc,CAAC,CAAA;AAErC,IAAA,MAAM,EAAE,UAAA,EAAY,cAAA,EAAe,GAAI,UAAU,WAAA,EAAa;AAAA,MAC5D;AAAA,KACD,CAAA;AAGD,IAAA,MAAM,kBAAA,GACJ,cAAA,KAAmB,UAAA,GAAa,UAAA,GAAa,IAAA,CAAA;AAE/C,IAAA,uBACE,IAAA;AAAA,MAACA,WAAA;AAAA,MAAA;AAAA,QACC,SAAA,EAAW,IAAA,CAAK,UAAA,CAAW,IAAA,EAAM,SAAS,CAAA;AAAA,QACzC,GAAG,cAAA;AAAA,QACJ,YAAA,EAAY,SAAA;AAAA,QACZ,iBAAA,EAAiB,cAAA;AAAA,QAChB,GAAG,IAAA;AAAA,QACJ,GAAA;AAAA,QAEA,QAAA,EAAA;AAAA,0BAAA,GAAA;AAAA,YAAC,UAAA;AAAA,YAAA;AAAA,cACC,KAAA;AAAA,cACA,cAAA,EAAgB,kBAAA;AAAA,cAChB;AAAA;AAAA,WACF;AAAA,0BACA,IAAA;AAAA,YAAC,KAAA;AAAA,YAAA;AAAA,cACC,WAAW,UAAA,CAAW,YAAA;AAAA,cACtB,WAAA,EAAW,eAAe,WAAW,CAAA;AAAA,cAEpC,QAAA,EAAA;AAAA,gBAAA,IAAA,oBACC,GAAA;AAAA,kBAAC,KAAA;AAAA,kBAAA;AAAA,oBACC,WAAW,UAAA,CAAW,SAAA;AAAA,oBACtB,WAAA,EAAW,eAAe,WAAW,CAAA;AAAA,oBACrC,aAAA,EAAY,MAAA;AAAA,oBAEX,QAAA,EAAA;AAAA;AAAA,iBACH;AAAA,gCAEF,GAAA;AAAA,kBAAC,KAAA;AAAA,kBAAA;AAAA,oBACC,WAAW,UAAA,CAAW,KAAA;AAAA,oBACrB,GAAI,IAAA,IAAQ,EAAE,WAAA,EAAa,IAAA,EAAK;AAAA,oBACjC;AAAA;AAAA;AACF;AAAA;AAAA,WACF;AAAA,8BACC,UAAA,EAAA,EAAW;AAAA;AAAA;AAAA,KACd;AAAA,EAEJ;AACF;AAEA,SAAA,CAAU,WAAA,GAAc,WAAA;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.esm.js","sources":["../../../src/components/Tooltip/Tooltip.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { forwardRef } from 'react';\nimport {\n OverlayArrow,\n Tooltip as AriaTooltip,\n TooltipTrigger as AriaTooltipTrigger,\n TooltipTriggerComponentProps,\n} from 'react-aria-components';\nimport clsx from 'clsx';\nimport { TooltipProps } from './types';\nimport { useStyles } from '../../hooks/useStyles';\n\n/** @public */\nexport const TooltipTrigger = (props: TooltipTriggerComponentProps) => {\n const { delay = 600 } = props;\n\n return <AriaTooltipTrigger delay={delay} {...props} />;\n};\n\n/** @public */\nexport const Tooltip = forwardRef<HTMLDivElement, TooltipProps>(\n ({ className, children, ...rest }, ref) => {\n const { classNames } = useStyles('Tooltip');\n\n return (\n <AriaTooltip\n className={clsx(classNames.tooltip, className)}\n {...rest}\n ref={ref}\n >\n <OverlayArrow className={classNames.arrow}>\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\n <path d=\"M10.3356 7.39793L15.1924 3.02682C15.9269 2.36577 16.8801 2 17.8683 2H20V7.94781e-07L1.74846e-07 -9.53674e-07L0 2L1.4651 2C2.4532 2 3.4064 2.36577 4.1409 3.02682L8.9977 7.39793C9.378 7.7402 9.9553 7.74021 10.3356 7.39793Z\" />\n <path d=\"M11.0046 8.14124C10.2439 8.82575 9.08939 8.82578 8.32869 8.14122L3.47189 3.77011C2.92109 3.27432 2.20619 2.99999 1.46509 2.99999L4.10999 3L8.99769 7.39793C9.37799 7.7402 9.95529 7.7402 10.3356 7.39793L15.2226 3L17.8683 2.99999C17.1271 2.99999 16.4122 3.27432 15.8614 3.77011L11.0046 8.14124Z\" />\n </svg>\n </OverlayArrow>\n {children}\n </AriaTooltip>\n );\n },\n);\n\nTooltip.displayName = 'Tooltip';\n"],"names":["AriaTooltipTrigger","AriaTooltip"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"Tooltip.esm.js","sources":["../../../src/components/Tooltip/Tooltip.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { forwardRef } from 'react';\nimport {\n OverlayArrow,\n Tooltip as AriaTooltip,\n TooltipTrigger as AriaTooltipTrigger,\n TooltipTriggerComponentProps,\n} from 'react-aria-components';\nimport clsx from 'clsx';\nimport { TooltipProps } from './types';\nimport { useStyles } from '../../hooks/useStyles';\n\n/** @public */\nexport const TooltipTrigger = (props: TooltipTriggerComponentProps) => {\n const { delay = 600 } = props;\n\n return <AriaTooltipTrigger delay={delay} {...props} />;\n};\n\n/** @public */\nexport const Tooltip = forwardRef<HTMLDivElement, TooltipProps>(\n ({ className, children, ...rest }, ref) => {\n const { classNames } = useStyles('Tooltip');\n\n return (\n <AriaTooltip\n className={clsx(classNames.tooltip, className)}\n {...rest}\n ref={ref}\n >\n <OverlayArrow className={classNames.arrow}>\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\n <path d=\"M10.3356 7.39793L15.1924 3.02682C15.9269 2.36577 16.8801 2 17.8683 2H20V7.94781e-07L1.74846e-07 -9.53674e-07L0 2L1.4651 2C2.4532 2 3.4064 2.36577 4.1409 3.02682L8.9977 7.39793C9.378 7.7402 9.9553 7.74021 10.3356 7.39793Z\" />\n <path d=\"M11.0046 8.14124C10.2439 8.82575 9.08939 8.82578 8.32869 8.14122L3.47189 3.77011C2.92109 3.27432 2.20619 2.99999 1.46509 2.99999L4.10999 3L8.99769 7.39793C9.37799 7.7402 9.95529 7.7402 10.3356 7.39793L15.2226 3L17.8683 2.99999C17.1271 2.99999 16.4122 3.27432 15.8614 3.77011L11.0046 8.14124Z\" />\n </svg>\n </OverlayArrow>\n {children}\n </AriaTooltip>\n );\n },\n);\n\nTooltip.displayName = 'Tooltip';\n"],"names":["AriaTooltipTrigger","AriaTooltip"],"mappings":";;;;;;AA4BO,MAAM,cAAA,GAAiB,CAAC,KAAA,KAAwC;AACrE,EAAA,MAAM,EAAE,KAAA,GAAQ,GAAA,EAAI,GAAI,KAAA;AAExB,EAAA,uBAAO,GAAA,CAACA,gBAAA,EAAA,EAAmB,KAAA,EAAe,GAAG,KAAA,EAAO,CAAA;AACtD;AAGO,MAAM,OAAA,GAAU,UAAA;AAAA,EACrB,CAAC,EAAE,SAAA,EAAW,UAAU,GAAG,IAAA,IAAQ,GAAA,KAAQ;AACzC,IAAA,MAAM,EAAE,UAAA,EAAW,GAAI,SAAA,CAAU,SAAS,CAAA;AAE1C,IAAA,uBACE,IAAA;AAAA,MAACC,SAAA;AAAA,MAAA;AAAA,QACC,SAAA,EAAW,IAAA,CAAK,UAAA,CAAW,OAAA,EAAS,SAAS,CAAA;AAAA,QAC5C,GAAG,IAAA;AAAA,QACJ,GAAA;AAAA,QAEA,QAAA,EAAA;AAAA,0BAAA,GAAA,CAAC,YAAA,EAAA,EAAa,SAAA,EAAW,UAAA,CAAW,KAAA,EAClC,QAAA,kBAAA,IAAA,CAAC,KAAA,EAAA,EAAI,KAAA,EAAM,IAAA,EAAK,MAAA,EAAO,IAAA,EAAK,OAAA,EAAQ,WAAA,EAAY,MAAK,MAAA,EACnD,QAAA,EAAA;AAAA,4BAAA,GAAA,CAAC,MAAA,EAAA,EAAK,GAAE,8NAAA,EAA+N,CAAA;AAAA,4BACvO,GAAA,CAAC,MAAA,EAAA,EAAK,CAAA,EAAE,qSAAA,EAAsS;AAAA,WAAA,EAChT,CAAA,EACF,CAAA;AAAA,UACC;AAAA;AAAA;AAAA,KACH;AAAA,EAEJ;AACF;AAEA,OAAA,CAAQ,WAAA,GAAc,SAAA;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useBreakpoint.esm.js","sources":["../../src/hooks/useBreakpoint.ts"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useMediaQuery } from './useMediaQuery';\nimport type { Breakpoint } from '../types';\n\nexport const breakpoints: { name: string; id: Breakpoint; value: number }[] = [\n { name: 'Initial', id: 'initial', value: 0 },\n { name: 'Extra Small', id: 'xs', value: 640 },\n { name: 'Small', id: 'sm', value: 768 },\n { name: 'Medium', id: 'md', value: 1024 },\n { name: 'Large', id: 'lg', value: 1280 },\n { name: 'Extra Large', id: 'xl', value: 1536 },\n];\n\n/** @public */\nexport const useBreakpoint = () => {\n // Call all media queries at the top level\n const matches = breakpoints.map(breakpoint => {\n return useMediaQuery(`(min-width: ${breakpoint.value}px)`);\n });\n\n // Pre-calculate all the up/down values we need\n const upMatches = new Map(\n breakpoints.map(bp => [bp.id, useMediaQuery(`(min-width: ${bp.value}px)`)]),\n );\n\n const downMatches = new Map(\n breakpoints.map(bp => [\n bp.id,\n useMediaQuery(`(max-width: ${bp.value - 1}px)`),\n ]),\n );\n\n let breakpoint: Breakpoint = breakpoints[0].id;\n for (let i = matches.length - 1; i >= 0; i--) {\n if (matches[i]) {\n breakpoint = breakpoints[i].id;\n break;\n }\n }\n\n return {\n breakpoint,\n up: (key: Breakpoint): boolean => {\n return upMatches.get(key) ?? false;\n },\n down: (key: Breakpoint): boolean => {\n return downMatches.get(key) ?? false;\n },\n };\n};\n"],"names":["breakpoint"],"mappings":";;AAkBO,MAAM,
|
|
1
|
+
{"version":3,"file":"useBreakpoint.esm.js","sources":["../../src/hooks/useBreakpoint.ts"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useMediaQuery } from './useMediaQuery';\nimport type { Breakpoint } from '../types';\n\nexport const breakpoints: { name: string; id: Breakpoint; value: number }[] = [\n { name: 'Initial', id: 'initial', value: 0 },\n { name: 'Extra Small', id: 'xs', value: 640 },\n { name: 'Small', id: 'sm', value: 768 },\n { name: 'Medium', id: 'md', value: 1024 },\n { name: 'Large', id: 'lg', value: 1280 },\n { name: 'Extra Large', id: 'xl', value: 1536 },\n];\n\n/** @public */\nexport const useBreakpoint = () => {\n // Call all media queries at the top level\n const matches = breakpoints.map(breakpoint => {\n return useMediaQuery(`(min-width: ${breakpoint.value}px)`);\n });\n\n // Pre-calculate all the up/down values we need\n const upMatches = new Map(\n breakpoints.map(bp => [bp.id, useMediaQuery(`(min-width: ${bp.value}px)`)]),\n );\n\n const downMatches = new Map(\n breakpoints.map(bp => [\n bp.id,\n useMediaQuery(`(max-width: ${bp.value - 1}px)`),\n ]),\n );\n\n let breakpoint: Breakpoint = breakpoints[0].id;\n for (let i = matches.length - 1; i >= 0; i--) {\n if (matches[i]) {\n breakpoint = breakpoints[i].id;\n break;\n }\n }\n\n return {\n breakpoint,\n up: (key: Breakpoint): boolean => {\n return upMatches.get(key) ?? false;\n },\n down: (key: Breakpoint): boolean => {\n return downMatches.get(key) ?? false;\n },\n };\n};\n"],"names":["breakpoint"],"mappings":";;AAkBO,MAAM,WAAA,GAAiE;AAAA,EAC5E,EAAE,IAAA,EAAM,SAAA,EAAW,EAAA,EAAI,SAAA,EAAW,OAAO,CAAA,EAAE;AAAA,EAC3C,EAAE,IAAA,EAAM,aAAA,EAAe,EAAA,EAAI,IAAA,EAAM,OAAO,GAAA,EAAI;AAAA,EAC5C,EAAE,IAAA,EAAM,OAAA,EAAS,EAAA,EAAI,IAAA,EAAM,OAAO,GAAA,EAAI;AAAA,EACtC,EAAE,IAAA,EAAM,QAAA,EAAU,EAAA,EAAI,IAAA,EAAM,OAAO,IAAA,EAAK;AAAA,EACxC,EAAE,IAAA,EAAM,OAAA,EAAS,EAAA,EAAI,IAAA,EAAM,OAAO,IAAA,EAAK;AAAA,EACvC,EAAE,IAAA,EAAM,aAAA,EAAe,EAAA,EAAI,IAAA,EAAM,OAAO,IAAA;AAC1C;AAGO,MAAM,gBAAgB,MAAM;AAEjC,EAAA,MAAM,OAAA,GAAU,WAAA,CAAY,GAAA,CAAI,CAAAA,WAAAA,KAAc;AAC5C,IAAA,OAAO,aAAA,CAAc,CAAA,YAAA,EAAeA,WAAAA,CAAW,KAAK,CAAA,GAAA,CAAK,CAAA;AAAA,EAC3D,CAAC,CAAA;AAGD,EAAA,MAAM,YAAY,IAAI,GAAA;AAAA,IACpB,WAAA,CAAY,GAAA,CAAI,CAAA,EAAA,KAAM,CAAC,EAAA,CAAG,EAAA,EAAI,aAAA,CAAc,CAAA,YAAA,EAAe,EAAA,CAAG,KAAK,CAAA,GAAA,CAAK,CAAC,CAAC;AAAA,GAC5E;AAEA,EAAA,MAAM,cAAc,IAAI,GAAA;AAAA,IACtB,WAAA,CAAY,IAAI,CAAA,EAAA,KAAM;AAAA,MACpB,EAAA,CAAG,EAAA;AAAA,MACH,aAAA,CAAc,CAAA,YAAA,EAAe,EAAA,CAAG,KAAA,GAAQ,CAAC,CAAA,GAAA,CAAK;AAAA,KAC/C;AAAA,GACH;AAEA,EAAA,IAAI,UAAA,GAAyB,WAAA,CAAY,CAAC,CAAA,CAAE,EAAA;AAC5C,EAAA,KAAA,IAAS,IAAI,OAAA,CAAQ,MAAA,GAAS,CAAA,EAAG,CAAA,IAAK,GAAG,CAAA,EAAA,EAAK;AAC5C,IAAA,IAAI,OAAA,CAAQ,CAAC,CAAA,EAAG;AACd,MAAA,UAAA,GAAa,WAAA,CAAY,CAAC,CAAA,CAAE,EAAA;AAC5B,MAAA;AAAA,IACF;AAAA,EACF;AAEA,EAAA,OAAO;AAAA,IACL,UAAA;AAAA,IACA,EAAA,EAAI,CAAC,GAAA,KAA6B;AAChC,MAAA,OAAO,SAAA,CAAU,GAAA,CAAI,GAAG,CAAA,IAAK,KAAA;AAAA,IAC/B,CAAA;AAAA,IACA,IAAA,EAAM,CAAC,GAAA,KAA6B;AAClC,MAAA,OAAO,WAAA,CAAY,GAAA,CAAI,GAAG,CAAA,IAAK,KAAA;AAAA,IACjC;AAAA,GACF;AACF;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useIsomorphicLayoutEffect.esm.js","sources":["../../src/hooks/useIsomorphicLayoutEffect.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useEffect, useLayoutEffect } from 'react';\n\nexport const useIsomorphicLayoutEffect =\n typeof window !== 'undefined' ? useLayoutEffect : useEffect;\n"],"names":[],"mappings":";;AAiBO,MAAM,
|
|
1
|
+
{"version":3,"file":"useIsomorphicLayoutEffect.esm.js","sources":["../../src/hooks/useIsomorphicLayoutEffect.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useEffect, useLayoutEffect } from 'react';\n\nexport const useIsomorphicLayoutEffect =\n typeof window !== 'undefined' ? useLayoutEffect : useEffect;\n"],"names":[],"mappings":";;AAiBO,MAAM,yBAAA,GACX,OAAO,MAAA,KAAW,WAAA,GAAc,eAAA,GAAkB;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMediaQuery.esm.js","sources":["../../src/hooks/useMediaQuery.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useState } from 'react';\n\nimport { useIsomorphicLayoutEffect } from './useIsomorphicLayoutEffect';\n\ntype UseMediaQueryOptions = {\n defaultValue?: boolean;\n initializeWithValue?: boolean;\n};\n\nconst IS_SERVER = typeof window === 'undefined';\n\nexport function useMediaQuery(\n query: string,\n {\n defaultValue = false,\n initializeWithValue = true,\n }: UseMediaQueryOptions = {},\n): boolean {\n const getMatches = (query: string): boolean => {\n if (IS_SERVER) {\n return defaultValue;\n }\n return window.matchMedia(query).matches;\n };\n\n const [matches, setMatches] = useState<boolean>(() => {\n if (initializeWithValue) {\n return getMatches(query);\n }\n return defaultValue;\n });\n\n // Handles the change event of the media query.\n function handleChange() {\n setMatches(getMatches(query));\n }\n\n useIsomorphicLayoutEffect(() => {\n const matchMedia = window.matchMedia(query);\n\n // Triggered at the first client-side load and if query changes\n handleChange();\n\n // Use deprecated `addListener` and `removeListener` to support Safari < 14 (#135)\n if (matchMedia.addListener) {\n matchMedia.addListener(handleChange);\n } else {\n matchMedia.addEventListener('change', handleChange);\n }\n\n return () => {\n if (matchMedia.removeListener) {\n matchMedia.removeListener(handleChange);\n } else {\n matchMedia.removeEventListener('change', handleChange);\n }\n };\n }, [query]);\n\n return matches;\n}\n"],"names":["query"],"mappings":";;;AAwBA,MAAM,SAAA,GAAY,OAAO,
|
|
1
|
+
{"version":3,"file":"useMediaQuery.esm.js","sources":["../../src/hooks/useMediaQuery.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useState } from 'react';\n\nimport { useIsomorphicLayoutEffect } from './useIsomorphicLayoutEffect';\n\ntype UseMediaQueryOptions = {\n defaultValue?: boolean;\n initializeWithValue?: boolean;\n};\n\nconst IS_SERVER = typeof window === 'undefined';\n\nexport function useMediaQuery(\n query: string,\n {\n defaultValue = false,\n initializeWithValue = true,\n }: UseMediaQueryOptions = {},\n): boolean {\n const getMatches = (query: string): boolean => {\n if (IS_SERVER) {\n return defaultValue;\n }\n return window.matchMedia(query).matches;\n };\n\n const [matches, setMatches] = useState<boolean>(() => {\n if (initializeWithValue) {\n return getMatches(query);\n }\n return defaultValue;\n });\n\n // Handles the change event of the media query.\n function handleChange() {\n setMatches(getMatches(query));\n }\n\n useIsomorphicLayoutEffect(() => {\n const matchMedia = window.matchMedia(query);\n\n // Triggered at the first client-side load and if query changes\n handleChange();\n\n // Use deprecated `addListener` and `removeListener` to support Safari < 14 (#135)\n if (matchMedia.addListener) {\n matchMedia.addListener(handleChange);\n } else {\n matchMedia.addEventListener('change', handleChange);\n }\n\n return () => {\n if (matchMedia.removeListener) {\n matchMedia.removeListener(handleChange);\n } else {\n matchMedia.removeEventListener('change', handleChange);\n }\n };\n }, [query]);\n\n return matches;\n}\n"],"names":["query"],"mappings":";;;AAwBA,MAAM,SAAA,GAAY,OAAO,MAAA,KAAW,WAAA;AAE7B,SAAS,cACd,KAAA,EACA;AAAA,EACE,YAAA,GAAe,KAAA;AAAA,EACf,mBAAA,GAAsB;AACxB,CAAA,GAA0B,EAAC,EAClB;AACT,EAAA,MAAM,UAAA,GAAa,CAACA,MAAAA,KAA2B;AAC7C,IAAA,IAAI,SAAA,EAAW;AACb,MAAA,OAAO,YAAA;AAAA,IACT;AACA,IAAA,OAAO,MAAA,CAAO,UAAA,CAAWA,MAAK,CAAA,CAAE,OAAA;AAAA,EAClC,CAAA;AAEA,EAAA,MAAM,CAAC,OAAA,EAAS,UAAU,CAAA,GAAI,SAAkB,MAAM;AACpD,IAAA,IAAI,mBAAA,EAAqB;AACvB,MAAA,OAAO,WAAW,KAAK,CAAA;AAAA,IACzB;AACA,IAAA,OAAO,YAAA;AAAA,EACT,CAAC,CAAA;AAGD,EAAA,SAAS,YAAA,GAAe;AACtB,IAAA,UAAA,CAAW,UAAA,CAAW,KAAK,CAAC,CAAA;AAAA,EAC9B;AAEA,EAAA,yBAAA,CAA0B,MAAM;AAC9B,IAAA,MAAM,UAAA,GAAa,MAAA,CAAO,UAAA,CAAW,KAAK,CAAA;AAG1C,IAAA,YAAA,EAAa;AAGb,IAAA,IAAI,WAAW,WAAA,EAAa;AAC1B,MAAA,UAAA,CAAW,YAAY,YAAY,CAAA;AAAA,IACrC,CAAA,MAAO;AACL,MAAA,UAAA,CAAW,gBAAA,CAAiB,UAAU,YAAY,CAAA;AAAA,IACpD;AAEA,IAAA,OAAO,MAAM;AACX,MAAA,IAAI,WAAW,cAAA,EAAgB;AAC7B,QAAA,UAAA,CAAW,eAAe,YAAY,CAAA;AAAA,MACxC,CAAA,MAAO;AACL,QAAA,UAAA,CAAW,mBAAA,CAAoB,UAAU,YAAY,CAAA;AAAA,MACvD;AAAA,IACF,CAAA;AAAA,EACF,CAAA,EAAG,CAAC,KAAK,CAAC,CAAA;AAEV,EAAA,OAAO,OAAA;AACT;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useStyles.esm.js","sources":["../../src/hooks/useStyles.ts"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useBreakpoint, breakpoints } from './useBreakpoint';\nimport { componentDefinitions } from '../utils/componentDefinitions';\nimport type { ComponentDefinitionName, ComponentClassNames } from '../types';\n\n/**\n * Resolve a responsive value based on the current breakpoint\n * @param value - The responsive value (string or object with breakpoint keys)\n * @param breakpoint - The current breakpoint\n * @returns The resolved value for the current breakpoint\n */\nfunction resolveResponsiveValue(\n value: string | Record<string, string>,\n breakpoint: string,\n): string | undefined {\n if (typeof value === 'string') {\n return value;\n }\n\n if (typeof value === 'object' && value !== null) {\n const index = breakpoints.findIndex(b => b.id === breakpoint);\n\n // Look for value at current breakpoint or smaller\n for (let i = index; i >= 0; i--) {\n if (value[breakpoints[i].id]) {\n return value[breakpoints[i].id];\n }\n }\n\n // If no value found, check from smallest breakpoint up\n for (let i = 0; i < breakpoints.length; i++) {\n if (value[breakpoints[i].id]) {\n return value[breakpoints[i].id];\n }\n }\n }\n\n return undefined;\n}\n\n/**\n * React hook to get class names and data attributes for a component with responsive support\n * @param componentName - The name of the component\n * @param props - Object with prop values (can be responsive)\n * @returns Object with classNames and dataAttributes\n */\nexport function useStyles<T extends ComponentDefinitionName>(\n componentName: T,\n props: Record<string, any> = {},\n): {\n classNames: ComponentClassNames<T>;\n dataAttributes: Record<string, string>;\n resolvedProps: Record<string, string>;\n} {\n const { breakpoint } = useBreakpoint();\n const classNames = componentDefinitions[componentName]\n .classNames as ComponentClassNames<T>;\n\n // Resolve responsive values and generate data attributes\n const dataAttributes: Record<string, string> = {};\n const resolvedProps: Record<string, string> = {};\n\n for (const [key, value] of Object.entries(props)) {\n if (value !== undefined && value !== null) {\n const resolvedValue = resolveResponsiveValue(value, breakpoint);\n if (resolvedValue !== undefined) {\n resolvedProps[key] = resolvedValue;\n dataAttributes[`data-${key}`] = resolvedValue;\n }\n }\n }\n\n return {\n classNames,\n dataAttributes,\n resolvedProps, // Also return resolved props for convenience\n };\n}\n"],"names":[],"mappings":";;;AAyBA,SAAS,sBAAA,CACP,OACA,
|
|
1
|
+
{"version":3,"file":"useStyles.esm.js","sources":["../../src/hooks/useStyles.ts"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useBreakpoint, breakpoints } from './useBreakpoint';\nimport { componentDefinitions } from '../utils/componentDefinitions';\nimport type { ComponentDefinitionName, ComponentClassNames } from '../types';\n\n/**\n * Resolve a responsive value based on the current breakpoint\n * @param value - The responsive value (string or object with breakpoint keys)\n * @param breakpoint - The current breakpoint\n * @returns The resolved value for the current breakpoint\n */\nfunction resolveResponsiveValue(\n value: string | Record<string, string>,\n breakpoint: string,\n): string | undefined {\n if (typeof value === 'string') {\n return value;\n }\n\n if (typeof value === 'object' && value !== null) {\n const index = breakpoints.findIndex(b => b.id === breakpoint);\n\n // Look for value at current breakpoint or smaller\n for (let i = index; i >= 0; i--) {\n if (value[breakpoints[i].id]) {\n return value[breakpoints[i].id];\n }\n }\n\n // If no value found, check from smallest breakpoint up\n for (let i = 0; i < breakpoints.length; i++) {\n if (value[breakpoints[i].id]) {\n return value[breakpoints[i].id];\n }\n }\n }\n\n return undefined;\n}\n\n/**\n * React hook to get class names and data attributes for a component with responsive support\n * @param componentName - The name of the component\n * @param props - Object with prop values (can be responsive)\n * @returns Object with classNames and dataAttributes\n */\nexport function useStyles<T extends ComponentDefinitionName>(\n componentName: T,\n props: Record<string, any> = {},\n): {\n classNames: ComponentClassNames<T>;\n dataAttributes: Record<string, string>;\n resolvedProps: Record<string, string>;\n} {\n const { breakpoint } = useBreakpoint();\n const classNames = componentDefinitions[componentName]\n .classNames as ComponentClassNames<T>;\n\n // Resolve responsive values and generate data attributes\n const dataAttributes: Record<string, string> = {};\n const resolvedProps: Record<string, string> = {};\n\n for (const [key, value] of Object.entries(props)) {\n if (value !== undefined && value !== null) {\n const resolvedValue = resolveResponsiveValue(value, breakpoint);\n if (resolvedValue !== undefined) {\n resolvedProps[key] = resolvedValue;\n dataAttributes[`data-${key}`] = resolvedValue;\n }\n }\n }\n\n return {\n classNames,\n dataAttributes,\n resolvedProps, // Also return resolved props for convenience\n };\n}\n"],"names":[],"mappings":";;;AAyBA,SAAS,sBAAA,CACP,OACA,UAAA,EACoB;AACpB,EAAA,IAAI,OAAO,UAAU,QAAA,EAAU;AAC7B,IAAA,OAAO,KAAA;AAAA,EACT;AAEA,EAAA,IAAI,OAAO,KAAA,KAAU,QAAA,IAAY,KAAA,KAAU,IAAA,EAAM;AAC/C,IAAA,MAAM,QAAQ,WAAA,CAAY,SAAA,CAAU,CAAA,CAAA,KAAK,CAAA,CAAE,OAAO,UAAU,CAAA;AAG5D,IAAA,KAAA,IAAS,CAAA,GAAI,KAAA,EAAO,CAAA,IAAK,CAAA,EAAG,CAAA,EAAA,EAAK;AAC/B,MAAA,IAAI,KAAA,CAAM,WAAA,CAAY,CAAC,CAAA,CAAE,EAAE,CAAA,EAAG;AAC5B,QAAA,OAAO,KAAA,CAAM,WAAA,CAAY,CAAC,CAAA,CAAE,EAAE,CAAA;AAAA,MAChC;AAAA,IACF;AAGA,IAAA,KAAA,IAAS,CAAA,GAAI,CAAA,EAAG,CAAA,GAAI,WAAA,CAAY,QAAQ,CAAA,EAAA,EAAK;AAC3C,MAAA,IAAI,KAAA,CAAM,WAAA,CAAY,CAAC,CAAA,CAAE,EAAE,CAAA,EAAG;AAC5B,QAAA,OAAO,KAAA,CAAM,WAAA,CAAY,CAAC,CAAA,CAAE,EAAE,CAAA;AAAA,MAChC;AAAA,IACF;AAAA,EACF;AAEA,EAAA,OAAO,MAAA;AACT;AAQO,SAAS,SAAA,CACd,aAAA,EACA,KAAA,GAA6B,EAAC,EAK9B;AACA,EAAA,MAAM,EAAE,UAAA,EAAW,GAAI,aAAA,EAAc;AACrC,EAAA,MAAM,UAAA,GAAa,oBAAA,CAAqB,aAAa,CAAA,CAClD,UAAA;AAGH,EAAA,MAAM,iBAAyC,EAAC;AAChD,EAAA,MAAM,gBAAwC,EAAC;AAE/C,EAAA,KAAA,MAAW,CAAC,GAAA,EAAK,KAAK,KAAK,MAAA,CAAO,OAAA,CAAQ,KAAK,CAAA,EAAG;AAChD,IAAA,IAAI,KAAA,KAAU,MAAA,IAAa,KAAA,KAAU,IAAA,EAAM;AACzC,MAAA,MAAM,aAAA,GAAgB,sBAAA,CAAuB,KAAA,EAAO,UAAU,CAAA;AAC9D,MAAA,IAAI,kBAAkB,MAAA,EAAW;AAC/B,QAAA,aAAA,CAAc,GAAG,CAAA,GAAI,aAAA;AACrB,QAAA,cAAA,CAAe,CAAA,KAAA,EAAQ,GAAG,CAAA,CAAE,CAAA,GAAI,aAAA;AAAA,MAClC;AAAA,IACF;AAAA,EACF;AAEA,EAAA,OAAO;AAAA,IACL,UAAA;AAAA,IACA,cAAA;AAAA,IACA;AAAA;AAAA,GACF;AACF;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { ReactNode, ReactElement, ElementType, ComponentPropsWithRef, ComponentProps
|
|
2
|
+
import { ReactNode, ReactElement, ElementType, ComponentPropsWithRef, ComponentProps } from 'react';
|
|
3
3
|
import { RemixiconComponentType } from '@remixicon/react';
|
|
4
4
|
import { Avatar as Avatar$1 } from '@base-ui-components/react/avatar';
|
|
5
|
-
import { ButtonProps as ButtonProps$1, TabsProps as TabsProps$1, TabListProps as TabListProps$1, TabProps as TabProps$1, TabPanelProps as TabPanelProps$1, LinkProps as LinkProps$1, RadioGroupProps as RadioGroupProps$1, RadioProps as RadioProps$1, TableProps, TableHeaderProps, TableBodyProps, ColumnProps, RowProps, CellProps as CellProps$1, TextFieldProps as TextFieldProps$1, TooltipProps as TooltipProps$1, TooltipTriggerComponentProps, SearchFieldProps as SearchFieldProps$1, SelectProps as SelectProps$1, SwitchProps as SwitchProps$1 } from 'react-aria-components';
|
|
5
|
+
import { ButtonProps as ButtonProps$1, TabsProps as TabsProps$1, TabListProps as TabListProps$1, TabProps as TabProps$1, TabPanelProps as TabPanelProps$1, LinkProps as LinkProps$1, RadioGroupProps as RadioGroupProps$1, RadioProps as RadioProps$1, TableProps, TableHeaderProps, TableBodyProps, ColumnProps, RowProps, CellProps as CellProps$1, TagGroupProps as TagGroupProps$1, TagListProps, TagProps as TagProps$1, TextFieldProps as TextFieldProps$1, TooltipProps as TooltipProps$1, TooltipTriggerComponentProps, MenuTriggerProps as MenuTriggerProps$1, SubmenuTriggerProps as SubmenuTriggerProps$1, MenuProps as MenuProps$1, PopoverProps, ListBoxProps, MenuItemProps as MenuItemProps$1, ListBoxItemProps, MenuSectionProps as MenuSectionProps$1, SeparatorProps, SearchFieldProps as SearchFieldProps$1, SelectProps as SelectProps$1, SwitchProps as SwitchProps$1 } from 'react-aria-components';
|
|
6
6
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
7
7
|
import { NavigateOptions } from 'react-router-dom';
|
|
8
8
|
import { Collapsible as Collapsible$1 } from '@base-ui-components/react/collapsible';
|
|
9
|
-
import { Menu as Menu$1 } from '@base-ui-components/react/menu';
|
|
10
9
|
import { ScrollArea as ScrollArea$1 } from '@base-ui-components/react/scroll-area';
|
|
11
10
|
|
|
12
11
|
/** @public */
|
|
@@ -131,10 +130,6 @@ declare const componentDefinitions: {
|
|
|
131
130
|
readonly toolbarControls: "bui-HeaderToolbarControls";
|
|
132
131
|
readonly toolbarIcon: "bui-HeaderToolbarIcon";
|
|
133
132
|
readonly toolbarName: "bui-HeaderToolbarName";
|
|
134
|
-
readonly breadcrumbs: "bui-HeaderBreadcrumbs";
|
|
135
|
-
readonly breadcrumb: "bui-HeaderBreadcrumb";
|
|
136
|
-
readonly breadcrumbLink: "bui-HeaderBreadcrumbLink";
|
|
137
|
-
readonly breadcrumbSeparator: "bui-HeaderBreadcrumbSeparator";
|
|
138
133
|
readonly tabsWrapper: "bui-HeaderTabsWrapper";
|
|
139
134
|
};
|
|
140
135
|
};
|
|
@@ -142,15 +137,9 @@ declare const componentDefinitions: {
|
|
|
142
137
|
readonly classNames: {
|
|
143
138
|
readonly root: "bui-HeaderPage";
|
|
144
139
|
readonly content: "bui-HeaderPageContent";
|
|
140
|
+
readonly breadcrumbs: "bui-HeaderPageBreadcrumbs";
|
|
145
141
|
readonly tabsWrapper: "bui-HeaderPageTabsWrapper";
|
|
146
142
|
readonly controls: "bui-HeaderPageControls";
|
|
147
|
-
readonly sticky: "bui-HeaderPageSticky";
|
|
148
|
-
readonly stickyWrapper: "bui-HeaderPageStickyWrapper";
|
|
149
|
-
readonly stickyContent: "bui-HeaderPageStickyContent";
|
|
150
|
-
readonly breadcrumbs: "bui-HeaderPageBreadcrumbs";
|
|
151
|
-
readonly breadcrumb: "bui-HeaderPageBreadcrumb";
|
|
152
|
-
readonly breadcrumbLink: "bui-HeaderPageBreadcrumbLink";
|
|
153
|
-
readonly breadcrumbSeparator: "bui-HeaderPageBreadcrumbSeparator";
|
|
154
143
|
};
|
|
155
144
|
};
|
|
156
145
|
readonly Heading: {
|
|
@@ -186,21 +175,21 @@ declare const componentDefinitions: {
|
|
|
186
175
|
};
|
|
187
176
|
readonly Menu: {
|
|
188
177
|
readonly classNames: {
|
|
189
|
-
readonly
|
|
190
|
-
readonly
|
|
191
|
-
readonly
|
|
192
|
-
readonly
|
|
193
|
-
readonly
|
|
178
|
+
readonly root: "bui-Menu";
|
|
179
|
+
readonly popover: "bui-MenuPopover";
|
|
180
|
+
readonly content: "bui-MenuContent";
|
|
181
|
+
readonly section: "bui-MenuSection";
|
|
182
|
+
readonly sectionHeader: "bui-MenuSectionHeader";
|
|
194
183
|
readonly item: "bui-MenuItem";
|
|
195
|
-
readonly
|
|
196
|
-
readonly
|
|
197
|
-
readonly
|
|
198
|
-
readonly
|
|
199
|
-
readonly radioItemIndicator: "bui-MenuRadioItemIndicator";
|
|
200
|
-
readonly checkboxItem: "bui-MenuCheckboxItem";
|
|
201
|
-
readonly checkboxItemIndicator: "bui-MenuCheckboxItemIndicator";
|
|
202
|
-
readonly submenuTrigger: "bui-MenuSubmenuTrigger";
|
|
184
|
+
readonly itemListBox: "bui-MenuItemListBox";
|
|
185
|
+
readonly itemListBoxCheck: "bui-MenuItemListBoxCheck";
|
|
186
|
+
readonly itemContent: "bui-MenuItemContent";
|
|
187
|
+
readonly itemArrow: "bui-MenuItemArrow";
|
|
203
188
|
readonly separator: "bui-MenuSeparator";
|
|
189
|
+
readonly searchField: "bui-MenuSearchField";
|
|
190
|
+
readonly searchFieldInput: "bui-MenuSearchFieldInput";
|
|
191
|
+
readonly searchFieldClear: "bui-MenuSearchFieldClear";
|
|
192
|
+
readonly emptyState: "bui-MenuEmptyState";
|
|
204
193
|
};
|
|
205
194
|
};
|
|
206
195
|
readonly Popover: {
|
|
@@ -289,6 +278,15 @@ declare const componentDefinitions: {
|
|
|
289
278
|
readonly panel: "bui-TabPanel";
|
|
290
279
|
};
|
|
291
280
|
};
|
|
281
|
+
readonly TagGroup: {
|
|
282
|
+
readonly classNames: {
|
|
283
|
+
readonly group: "bui-TagGroup";
|
|
284
|
+
readonly list: "bui-TagList";
|
|
285
|
+
readonly tag: "bui-Tag";
|
|
286
|
+
readonly tagIcon: "bui-TagIcon";
|
|
287
|
+
readonly tagRemoveButton: "bui-TagRemoveButton";
|
|
288
|
+
};
|
|
289
|
+
};
|
|
292
290
|
readonly Text: {
|
|
293
291
|
readonly classNames: {
|
|
294
292
|
readonly root: "bui-Text";
|
|
@@ -791,6 +789,24 @@ interface CardFooterProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
791
789
|
* @public
|
|
792
790
|
*/
|
|
793
791
|
declare const Card: react.ForwardRefExoticComponent<CardProps & react.RefAttributes<HTMLDivElement>>;
|
|
792
|
+
/**
|
|
793
|
+
* CardHeader component.
|
|
794
|
+
*
|
|
795
|
+
* @public
|
|
796
|
+
*/
|
|
797
|
+
declare const CardHeader: react.ForwardRefExoticComponent<CardHeaderProps & react.RefAttributes<HTMLDivElement>>;
|
|
798
|
+
/**
|
|
799
|
+
* CardBody component.
|
|
800
|
+
*
|
|
801
|
+
* @public
|
|
802
|
+
*/
|
|
803
|
+
declare const CardBody: react.ForwardRefExoticComponent<CardBodyProps & react.RefAttributes<HTMLDivElement>>;
|
|
804
|
+
/**
|
|
805
|
+
* CardFooter component.
|
|
806
|
+
*
|
|
807
|
+
* @public
|
|
808
|
+
*/
|
|
809
|
+
declare const CardFooter: react.ForwardRefExoticComponent<CardFooterProps & react.RefAttributes<HTMLDivElement>>;
|
|
794
810
|
|
|
795
811
|
/**
|
|
796
812
|
* Collapsible is a component that allows you to collapse and expand content.
|
|
@@ -907,7 +923,6 @@ interface HeaderProps {
|
|
|
907
923
|
title?: string;
|
|
908
924
|
titleLink?: string;
|
|
909
925
|
customActions?: React.ReactNode;
|
|
910
|
-
menuItems?: HeaderMenuItem[];
|
|
911
926
|
tabs?: HeaderTab[];
|
|
912
927
|
onTabSelectionChange?: TabsProps$1['onSelectionChange'];
|
|
913
928
|
}
|
|
@@ -927,16 +942,6 @@ interface HeaderTab {
|
|
|
927
942
|
*/
|
|
928
943
|
matchStrategy?: TabMatchStrategy;
|
|
929
944
|
}
|
|
930
|
-
/**
|
|
931
|
-
* Represents an option item in the header dropdown menu.
|
|
932
|
-
*
|
|
933
|
-
* @public
|
|
934
|
-
*/
|
|
935
|
-
interface HeaderMenuItem {
|
|
936
|
-
label: string;
|
|
937
|
-
value: string;
|
|
938
|
-
onClick?: () => void;
|
|
939
|
-
}
|
|
940
945
|
|
|
941
946
|
declare module 'react-aria-components' {
|
|
942
947
|
interface RouterConfig {
|
|
@@ -958,7 +963,6 @@ declare const Header: (props: HeaderProps) => react_jsx_runtime.JSX.Element;
|
|
|
958
963
|
interface HeaderPageProps {
|
|
959
964
|
title?: string;
|
|
960
965
|
customActions?: React.ReactNode;
|
|
961
|
-
menuItems?: HeaderMenuItem[];
|
|
962
966
|
tabs?: HeaderTab[];
|
|
963
967
|
breadcrumbs?: HeaderPageBreadcrumb[];
|
|
964
968
|
}
|
|
@@ -1178,6 +1182,42 @@ declare function useTable<T = any>(config?: UseTableConfig<T>): UseTableResult<T
|
|
|
1178
1182
|
*/
|
|
1179
1183
|
declare function TablePagination(props: TablePaginationProps): react_jsx_runtime.JSX.Element;
|
|
1180
1184
|
|
|
1185
|
+
/**
|
|
1186
|
+
* Props for the TagGroup component.
|
|
1187
|
+
*
|
|
1188
|
+
* @public
|
|
1189
|
+
*/
|
|
1190
|
+
interface TagGroupProps<T> extends Omit<TagGroupProps$1, 'children'>, Pick<TagListProps<T>, 'items' | 'children' | 'renderEmptyState'> {
|
|
1191
|
+
}
|
|
1192
|
+
/**
|
|
1193
|
+
* Props for the Tag component.
|
|
1194
|
+
*
|
|
1195
|
+
* @public
|
|
1196
|
+
*/
|
|
1197
|
+
interface TagProps extends TagProps$1 {
|
|
1198
|
+
/**
|
|
1199
|
+
* The icon to display in the chip.
|
|
1200
|
+
*/
|
|
1201
|
+
icon?: React.ReactNode;
|
|
1202
|
+
/**
|
|
1203
|
+
* The size of the chip.
|
|
1204
|
+
*/
|
|
1205
|
+
size?: 'small' | 'medium';
|
|
1206
|
+
}
|
|
1207
|
+
|
|
1208
|
+
/**
|
|
1209
|
+
* A component that renders a list of tags.
|
|
1210
|
+
*
|
|
1211
|
+
* @public
|
|
1212
|
+
*/
|
|
1213
|
+
declare const TagGroup: <T extends object>({ items, children, renderEmptyState, ...props }: TagGroupProps<T>) => react_jsx_runtime.JSX.Element;
|
|
1214
|
+
/**
|
|
1215
|
+
* A component that renders a tag.
|
|
1216
|
+
*
|
|
1217
|
+
* @public
|
|
1218
|
+
*/
|
|
1219
|
+
declare const Tag: (props: TagProps) => react_jsx_runtime.JSX.Element;
|
|
1220
|
+
|
|
1181
1221
|
/** @public */
|
|
1182
1222
|
type TextOwnProps = {
|
|
1183
1223
|
as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'span' | 'label' | 'div' | 'strong' | 'em' | 'small' | 'legend';
|
|
@@ -1228,43 +1268,68 @@ declare const TooltipTrigger: (props: TooltipTriggerComponentProps) => react_jsx
|
|
|
1228
1268
|
declare const Tooltip: react.ForwardRefExoticComponent<TooltipProps & react.RefAttributes<HTMLDivElement>>;
|
|
1229
1269
|
|
|
1230
1270
|
/** @public */
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
value: string;
|
|
1234
|
-
disabled?: boolean;
|
|
1235
|
-
};
|
|
1271
|
+
interface MenuTriggerProps extends MenuTriggerProps$1 {
|
|
1272
|
+
}
|
|
1236
1273
|
/** @public */
|
|
1237
|
-
interface
|
|
1238
|
-
options: MenuComboboxOption[];
|
|
1239
|
-
value?: string[];
|
|
1240
|
-
onValueChange?: (value: string[]) => void;
|
|
1241
|
-
multiselect?: boolean;
|
|
1242
|
-
closeParentOnEsc?: boolean;
|
|
1274
|
+
interface SubmenuTriggerProps extends SubmenuTriggerProps$1 {
|
|
1243
1275
|
}
|
|
1244
1276
|
/** @public */
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1277
|
+
interface MenuProps<T> extends MenuProps$1<T>, Omit<MenuProps$1<T>, 'children'> {
|
|
1278
|
+
placement?: PopoverProps['placement'];
|
|
1279
|
+
}
|
|
1280
|
+
/** @public */
|
|
1281
|
+
interface MenuListBoxProps<T> extends ListBoxProps<T>, Omit<ListBoxProps<T>, 'children'> {
|
|
1282
|
+
placement?: PopoverProps['placement'];
|
|
1283
|
+
}
|
|
1284
|
+
/** @public */
|
|
1285
|
+
interface MenuAutocompleteProps<T> extends MenuProps$1<T>, Omit<MenuProps$1<T>, 'children'> {
|
|
1286
|
+
placeholder?: string;
|
|
1287
|
+
placement?: PopoverProps['placement'];
|
|
1288
|
+
}
|
|
1289
|
+
/** @public */
|
|
1290
|
+
interface MenuAutocompleteListBoxProps<T> extends ListBoxProps<T>, Omit<ListBoxProps<T>, 'children'> {
|
|
1291
|
+
placeholder?: string;
|
|
1292
|
+
placement?: PopoverProps['placement'];
|
|
1293
|
+
}
|
|
1294
|
+
/** @public */
|
|
1295
|
+
interface MenuItemProps extends MenuItemProps$1, Omit<MenuItemProps$1, 'children'> {
|
|
1296
|
+
iconStart?: React.ReactNode;
|
|
1297
|
+
children: React.ReactNode;
|
|
1298
|
+
color?: 'primary' | 'danger';
|
|
1299
|
+
}
|
|
1300
|
+
/** @public */
|
|
1301
|
+
interface MenuListBoxItemProps extends ListBoxItemProps, Omit<ListBoxItemProps, 'children'> {
|
|
1302
|
+
children: React.ReactNode;
|
|
1303
|
+
}
|
|
1304
|
+
/** @public */
|
|
1305
|
+
interface MenuSectionProps<T> extends MenuSectionProps$1<T>, Omit<MenuSectionProps$1<T>, 'children'> {
|
|
1306
|
+
title: string;
|
|
1307
|
+
children: React.ReactNode;
|
|
1308
|
+
}
|
|
1309
|
+
/** @public */
|
|
1310
|
+
interface MenuSeparatorProps extends SeparatorProps {
|
|
1311
|
+
}
|
|
1265
1312
|
|
|
1266
1313
|
/** @public */
|
|
1267
|
-
declare const
|
|
1314
|
+
declare const MenuTrigger: (props: MenuTriggerProps) => react_jsx_runtime.JSX.Element;
|
|
1315
|
+
/** @public */
|
|
1316
|
+
declare const SubmenuTrigger: (props: SubmenuTriggerProps) => react_jsx_runtime.JSX.Element;
|
|
1317
|
+
/** @public */
|
|
1318
|
+
declare const Menu: (props: MenuProps<object>) => react_jsx_runtime.JSX.Element;
|
|
1319
|
+
/** @public */
|
|
1320
|
+
declare const MenuListBox: (props: MenuListBoxProps<object>) => react_jsx_runtime.JSX.Element;
|
|
1321
|
+
/** @public */
|
|
1322
|
+
declare const MenuAutocomplete: (props: MenuAutocompleteProps<object>) => react_jsx_runtime.JSX.Element;
|
|
1323
|
+
/** @public */
|
|
1324
|
+
declare const MenuAutocompleteListbox: (props: MenuAutocompleteListBoxProps<object>) => react_jsx_runtime.JSX.Element;
|
|
1325
|
+
/** @public */
|
|
1326
|
+
declare const MenuItem: (props: MenuItemProps) => react_jsx_runtime.JSX.Element;
|
|
1327
|
+
/** @public */
|
|
1328
|
+
declare const MenuListBoxItem: (props: MenuListBoxItemProps) => react_jsx_runtime.JSX.Element;
|
|
1329
|
+
/** @public */
|
|
1330
|
+
declare const MenuSection: (props: MenuSectionProps<object>) => react_jsx_runtime.JSX.Element;
|
|
1331
|
+
/** @public */
|
|
1332
|
+
declare const MenuSeparator: (props: MenuSeparatorProps) => react_jsx_runtime.JSX.Element;
|
|
1268
1333
|
|
|
1269
1334
|
/** @public */
|
|
1270
1335
|
declare const ScrollArea: {
|
|
@@ -1474,4 +1539,4 @@ declare const useBreakpoint: () => {
|
|
|
1474
1539
|
down: (key: Breakpoint) => boolean;
|
|
1475
1540
|
};
|
|
1476
1541
|
|
|
1477
|
-
export { type AlignItems, type ArbitraryStylingPropDef, Avatar, type AvatarProps, type BooleanPropDef, type Border, type BorderRadius, Box, type BoxOwnProps, type BoxProps, type Breakpoint, Button, ButtonIcon, type ButtonIconProps, ButtonLink, type ButtonLinkProps, type ButtonProps, Card, type CardBodyProps, type CardFooterProps, type CardHeaderProps, type CardProps, Cell, CellProfile, type CellProfileProps, type CellProps, Checkbox, type CheckboxProps, type ClassNamesMap, Collapsible, Column, type Columns, type ComponentClassNames, type ComponentDefinition, type ComponentDefinitionName, Container, type ContainerProps, type DataAttributeValues, type DataAttributesMap, type Display, type DisplayProps, type EnumOrStringPropDef, type EnumPropDef, FieldLabel, type FieldLabelProps, Flex, type FlexDirection, type FlexOwnProps, type FlexProps, type FlexWrap, type GapProps, type GetPropDefType, type GetPropDefTypes, Grid, type GridItemOwnProps, type GridItemProps, type GridOwnProps, type GridProps, Header,
|
|
1542
|
+
export { type AlignItems, type ArbitraryStylingPropDef, Avatar, type AvatarProps, type BooleanPropDef, type Border, type BorderRadius, Box, type BoxOwnProps, type BoxProps, type Breakpoint, Button, ButtonIcon, type ButtonIconProps, ButtonLink, type ButtonLinkProps, type ButtonProps, Card, CardBody, type CardBodyProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardProps, Cell, CellProfile, type CellProfileProps, type CellProps, Checkbox, type CheckboxProps, type ClassNamesMap, Collapsible, Column, type Columns, type ComponentClassNames, type ComponentDefinition, type ComponentDefinitionName, Container, type ContainerProps, type DataAttributeValues, type DataAttributesMap, type Display, type DisplayProps, type EnumOrStringPropDef, type EnumPropDef, FieldLabel, type FieldLabelProps, Flex, type FlexDirection, type FlexOwnProps, type FlexProps, type FlexWrap, type GapProps, type GetPropDefType, type GetPropDefTypes, Grid, type GridItemOwnProps, type GridItemProps, type GridOwnProps, type GridProps, Header, HeaderPage, type HeaderPageBreadcrumb, type HeaderPageProps, type HeaderProps, type HeaderTab, type HeightProps, Icon, IconContext, type IconContextProps, type IconMap, type IconNames, type IconProps, IconProvider, type IconProviderProps, type JustifyContent, Link, type LinkProps, type MarginProps, Menu, MenuAutocomplete, type MenuAutocompleteListBoxProps, MenuAutocompleteListbox, type MenuAutocompleteProps, MenuItem, type MenuItemProps, MenuListBox, MenuListBoxItem, type MenuListBoxItemProps, type MenuListBoxProps, type MenuProps, MenuSection, type MenuSectionProps, MenuSeparator, type MenuSeparatorProps, MenuTrigger, type MenuTriggerProps, type NonStylingPropDef, type PaddingProps, type PositionProps, type PropDef, Radio, RadioGroup, type RadioGroupProps, type RadioProps, type ReactNodePropDef, type RegularPropDef, type Responsive, type ResponsivePropDef, Row, ScrollArea, SearchField, type SearchFieldProps, Select, type SelectProps, Skeleton, type SkeletonProps, type Space, type SpaceProps, type StringPropDef, type StylingPropDef, SubmenuTrigger, type SubmenuTriggerProps, Switch, type SwitchProps, Tab, TabList, type TabListProps, type TabMatchStrategy, TabPanel, type TabPanelProps, type TabProps, Table, TableBody, TableHeader, TablePagination, type TablePaginationProps, Tabs, type TabsProps, Tag, TagGroup, type TagGroupProps, type TagProps, Text, type TextColorStatus, type TextColors, TextField, type TextFieldProps, type TextOwnProps, type TextProps, type TextVariants, type TextWeights, Tooltip, type TooltipProps, TooltipTrigger, type UseTableConfig, type UseTablePagination, type UseTablePaginationConfig, type UseTableResult, type UtilityProps, type WidthProps, boxPropDefs, breakpoints, componentDefinitions, displayPropDefs, flexPropDefs, gapPropDefs, gridItemPropDefs, gridPropDefs, heightPropDefs, icons, marginPropDefs, paddingPropDefs, positionPropDefs, useBreakpoint, useIcons, useTable, widthPropDefs };
|
package/dist/index.esm.js
CHANGED
|
@@ -8,7 +8,7 @@ export { flexPropDefs } from './components/Flex/Flex.props.esm.js';
|
|
|
8
8
|
export { Container } from './components/Container/Container.esm.js';
|
|
9
9
|
export { Avatar } from './components/Avatar/Avatar.esm.js';
|
|
10
10
|
export { Button } from './components/Button/Button.esm.js';
|
|
11
|
-
export { Card } from './components/Card/Card.esm.js';
|
|
11
|
+
export { Card, CardBody, CardFooter, CardHeader } from './components/Card/Card.esm.js';
|
|
12
12
|
export { Collapsible } from './components/Collapsible/Collapsible.esm.js';
|
|
13
13
|
export { FieldLabel } from './components/FieldLabel/FieldLabel.esm.js';
|
|
14
14
|
export { Header } from './components/Header/Header.esm.js';
|
|
@@ -30,10 +30,11 @@ export { CellProfile } from './components/Table/components/CellProfile.esm.js';
|
|
|
30
30
|
export { useTable } from './components/Table/hooks/useTable.esm.js';
|
|
31
31
|
export { TablePagination } from './components/TablePagination/TablePagination.esm.js';
|
|
32
32
|
export { Tab, TabList, TabPanel, Tabs } from './components/Tabs/Tabs.esm.js';
|
|
33
|
+
export { Tag, TagGroup } from './components/TagGroup/TagGroup.esm.js';
|
|
33
34
|
export { Text } from './components/Text/Text.esm.js';
|
|
34
35
|
export { TextField } from './components/TextField/TextField.esm.js';
|
|
35
36
|
export { Tooltip, TooltipTrigger } from './components/Tooltip/Tooltip.esm.js';
|
|
36
|
-
export { Menu } from './components/Menu/Menu.esm.js';
|
|
37
|
+
export { Menu, MenuAutocomplete, MenuAutocompleteListbox, MenuItem, MenuListBox, MenuListBoxItem, MenuSection, MenuSeparator, MenuTrigger, SubmenuTrigger } from './components/Menu/Menu.esm.js';
|
|
37
38
|
export { ScrollArea } from './components/ScrollArea/ScrollArea.esm.js';
|
|
38
39
|
export { SearchField } from './components/SearchField/SearchField.esm.js';
|
|
39
40
|
export { Link } from './components/Link/Link.esm.js';
|
package/dist/index.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"display.props.esm.js","sources":["../../src/props/display.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 './prop-def';\n\nconst displayValues = ['none', 'inline', 'inline-block', 'block'] as const;\n\n/** @public */\nconst displayPropDefs = {\n display: {\n type: 'enum',\n className: 'bui-display',\n values: displayValues,\n responsive: true,\n },\n} satisfies {\n display: PropDef<(typeof displayValues)[number]>;\n};\n\n/** @public */\ntype DisplayProps = GetPropDefTypes<typeof displayPropDefs>;\n\nexport { displayPropDefs };\nexport type { DisplayProps };\n"],"names":[],"mappings":"AAkBA,MAAM,
|
|
1
|
+
{"version":3,"file":"display.props.esm.js","sources":["../../src/props/display.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 './prop-def';\n\nconst displayValues = ['none', 'inline', 'inline-block', 'block'] as const;\n\n/** @public */\nconst displayPropDefs = {\n display: {\n type: 'enum',\n className: 'bui-display',\n values: displayValues,\n responsive: true,\n },\n} satisfies {\n display: PropDef<(typeof displayValues)[number]>;\n};\n\n/** @public */\ntype DisplayProps = GetPropDefTypes<typeof displayPropDefs>;\n\nexport { displayPropDefs };\nexport type { DisplayProps };\n"],"names":[],"mappings":"AAkBA,MAAM,aAAA,GAAgB,CAAC,MAAA,EAAQ,QAAA,EAAU,gBAAgB,OAAO,CAAA;AAGhE,MAAM,eAAA,GAAkB;AAAA,EACtB,OAAA,EAAS;AAAA,IACP,IAAA,EAAM,MAAA;AAAA,IACN,SAAA,EAAW,aAAA;AAAA,IACX,MAAA,EAAQ,aAAA;AAAA,IACR,UAAA,EAAY;AAAA;AAEhB;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gap-props.esm.js","sources":["../../src/props/gap-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 */\nimport { PropDef } from './prop-def';\nimport { GetPropDefTypes } from './prop-def';\nimport { spacingValues } from './spacing.props';\n\n/** @public */\nconst gapPropDefs = {\n gap: {\n type: 'enum | string',\n className: 'bui-gap',\n customProperties: ['--gap'],\n values: spacingValues,\n responsive: true,\n default: '4',\n },\n} satisfies {\n gap: PropDef<(typeof spacingValues)[number]>;\n};\n\n/** @public */\ntype GapProps = GetPropDefTypes<typeof gapPropDefs>;\n\nexport { gapPropDefs };\nexport type { GapProps };\n"],"names":[],"mappings":";;AAoBA,MAAM,
|
|
1
|
+
{"version":3,"file":"gap-props.esm.js","sources":["../../src/props/gap-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 */\nimport { PropDef } from './prop-def';\nimport { GetPropDefTypes } from './prop-def';\nimport { spacingValues } from './spacing.props';\n\n/** @public */\nconst gapPropDefs = {\n gap: {\n type: 'enum | string',\n className: 'bui-gap',\n customProperties: ['--gap'],\n values: spacingValues,\n responsive: true,\n default: '4',\n },\n} satisfies {\n gap: PropDef<(typeof spacingValues)[number]>;\n};\n\n/** @public */\ntype GapProps = GetPropDefTypes<typeof gapPropDefs>;\n\nexport { gapPropDefs };\nexport type { GapProps };\n"],"names":[],"mappings":";;AAoBA,MAAM,WAAA,GAAc;AAAA,EAClB,GAAA,EAAK;AAAA,IACH,IAAA,EAAM,eAAA;AAAA,IACN,SAAA,EAAW,SAAA;AAAA,IACX,gBAAA,EAAkB,CAAC,OAAO,CAAA;AAAA,IAC1B,MAAA,EAAQ,aAAA;AAAA,IACR,UAAA,EAAY,IAAA;AAAA,IACZ,OAAA,EAAS;AAAA;AAEb;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"height.props.esm.js","sources":["../../src/props/height.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 */\nimport type { PropDef, GetPropDefTypes } from './prop-def';\n\n/** @public */\nconst heightPropDefs = {\n height: {\n type: 'string',\n className: 'bui-h',\n customProperties: ['--height'],\n responsive: true,\n },\n minHeight: {\n type: 'string',\n className: 'bui-min-h',\n customProperties: ['--min-height'],\n responsive: true,\n },\n maxHeight: {\n type: 'string',\n className: 'bui-max-h',\n customProperties: ['--max-height'],\n responsive: true,\n },\n} satisfies {\n height: PropDef<string>;\n minHeight: PropDef<string>;\n maxHeight: PropDef<string>;\n};\n\n/** @public */\ntype HeightProps = GetPropDefTypes<typeof heightPropDefs>;\n\nexport { heightPropDefs };\nexport type { HeightProps };\n"],"names":[],"mappings":"AAkBA,MAAM,
|
|
1
|
+
{"version":3,"file":"height.props.esm.js","sources":["../../src/props/height.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 */\nimport type { PropDef, GetPropDefTypes } from './prop-def';\n\n/** @public */\nconst heightPropDefs = {\n height: {\n type: 'string',\n className: 'bui-h',\n customProperties: ['--height'],\n responsive: true,\n },\n minHeight: {\n type: 'string',\n className: 'bui-min-h',\n customProperties: ['--min-height'],\n responsive: true,\n },\n maxHeight: {\n type: 'string',\n className: 'bui-max-h',\n customProperties: ['--max-height'],\n responsive: true,\n },\n} satisfies {\n height: PropDef<string>;\n minHeight: PropDef<string>;\n maxHeight: PropDef<string>;\n};\n\n/** @public */\ntype HeightProps = GetPropDefTypes<typeof heightPropDefs>;\n\nexport { heightPropDefs };\nexport type { HeightProps };\n"],"names":[],"mappings":"AAkBA,MAAM,cAAA,GAAiB;AAAA,EACrB,MAAA,EAAQ;AAAA,IACN,IAAA,EAAM,QAAA;AAAA,IACN,SAAA,EAAW,OAAA;AAAA,IACX,gBAAA,EAAkB,CAAC,UAAU,CAAA;AAAA,IAC7B,UAAA,EAAY;AAAA,GACd;AAAA,EACA,SAAA,EAAW;AAAA,IACT,IAAA,EAAM,QAAA;AAAA,IACN,SAAA,EAAW,WAAA;AAAA,IACX,gBAAA,EAAkB,CAAC,cAAc,CAAA;AAAA,IACjC,UAAA,EAAY;AAAA,GACd;AAAA,EACA,SAAA,EAAW;AAAA,IACT,IAAA,EAAM,QAAA;AAAA,IACN,SAAA,EAAW,WAAA;AAAA,IACX,gBAAA,EAAkB,CAAC,cAAc,CAAA;AAAA,IACjC,UAAA,EAAY;AAAA;AAEhB;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"margin.props.esm.js","sources":["../../src/props/margin.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 */\nimport type { PropDef, GetPropDefTypes } from './prop-def';\n\n/** @public */\nconst marginPropDefs = (spacingValues: string[]) =>\n ({\n m: {\n type: 'enum | string',\n values: spacingValues,\n className: 'bui-m',\n customProperties: ['--m'],\n responsive: true,\n },\n mx: {\n type: 'enum | string',\n values: spacingValues,\n className: 'bui-mx',\n customProperties: ['--mx'],\n responsive: true,\n },\n my: {\n type: 'enum | string',\n values: spacingValues,\n className: 'bui-my',\n customProperties: ['--my'],\n responsive: true,\n },\n mt: {\n type: 'enum | string',\n values: spacingValues,\n className: 'bui-mt',\n customProperties: ['--mt'],\n responsive: true,\n },\n mr: {\n type: 'enum | string',\n values: spacingValues,\n className: 'bui-mr',\n customProperties: ['--mr'],\n responsive: true,\n },\n mb: {\n type: 'enum | string',\n values: spacingValues,\n className: 'bui-mb',\n customProperties: ['--mb'],\n responsive: true,\n },\n ml: {\n type: 'enum | string',\n values: spacingValues,\n className: 'bui-ml',\n customProperties: ['--ml'],\n responsive: true,\n },\n } satisfies {\n m: PropDef<(typeof spacingValues)[number]>;\n mx: PropDef<(typeof spacingValues)[number]>;\n my: PropDef<(typeof spacingValues)[number]>;\n mt: PropDef<(typeof spacingValues)[number]>;\n mr: PropDef<(typeof spacingValues)[number]>;\n mb: PropDef<(typeof spacingValues)[number]>;\n ml: PropDef<(typeof spacingValues)[number]>;\n });\n\n/** @public */\ntype MarginProps = GetPropDefTypes<typeof marginPropDefs>;\n\nexport { marginPropDefs };\nexport type { MarginProps };\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"margin.props.esm.js","sources":["../../src/props/margin.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 */\nimport type { PropDef, GetPropDefTypes } from './prop-def';\n\n/** @public */\nconst marginPropDefs = (spacingValues: string[]) =>\n ({\n m: {\n type: 'enum | string',\n values: spacingValues,\n className: 'bui-m',\n customProperties: ['--m'],\n responsive: true,\n },\n mx: {\n type: 'enum | string',\n values: spacingValues,\n className: 'bui-mx',\n customProperties: ['--mx'],\n responsive: true,\n },\n my: {\n type: 'enum | string',\n values: spacingValues,\n className: 'bui-my',\n customProperties: ['--my'],\n responsive: true,\n },\n mt: {\n type: 'enum | string',\n values: spacingValues,\n className: 'bui-mt',\n customProperties: ['--mt'],\n responsive: true,\n },\n mr: {\n type: 'enum | string',\n values: spacingValues,\n className: 'bui-mr',\n customProperties: ['--mr'],\n responsive: true,\n },\n mb: {\n type: 'enum | string',\n values: spacingValues,\n className: 'bui-mb',\n customProperties: ['--mb'],\n responsive: true,\n },\n ml: {\n type: 'enum | string',\n values: spacingValues,\n className: 'bui-ml',\n customProperties: ['--ml'],\n responsive: true,\n },\n } satisfies {\n m: PropDef<(typeof spacingValues)[number]>;\n mx: PropDef<(typeof spacingValues)[number]>;\n my: PropDef<(typeof spacingValues)[number]>;\n mt: PropDef<(typeof spacingValues)[number]>;\n mr: PropDef<(typeof spacingValues)[number]>;\n mb: PropDef<(typeof spacingValues)[number]>;\n ml: PropDef<(typeof spacingValues)[number]>;\n });\n\n/** @public */\ntype MarginProps = GetPropDefTypes<typeof marginPropDefs>;\n\nexport { marginPropDefs };\nexport type { MarginProps };\n"],"names":[],"mappings":"AAkBA,MAAM,cAAA,GAAiB,CAAC,aAAA,MACrB;AAAA,EACC,CAAA,EAAG;AAAA,IACD,IAAA,EAAM,eAAA;AAAA,IACN,MAAA,EAAQ,aAAA;AAAA,IACR,SAAA,EAAW,OAAA;AAAA,IACX,gBAAA,EAAkB,CAAC,KAAK,CAAA;AAAA,IACxB,UAAA,EAAY;AAAA,GACd;AAAA,EACA,EAAA,EAAI;AAAA,IACF,IAAA,EAAM,eAAA;AAAA,IACN,MAAA,EAAQ,aAAA;AAAA,IACR,SAAA,EAAW,QAAA;AAAA,IACX,gBAAA,EAAkB,CAAC,MAAM,CAAA;AAAA,IACzB,UAAA,EAAY;AAAA,GACd;AAAA,EACA,EAAA,EAAI;AAAA,IACF,IAAA,EAAM,eAAA;AAAA,IACN,MAAA,EAAQ,aAAA;AAAA,IACR,SAAA,EAAW,QAAA;AAAA,IACX,gBAAA,EAAkB,CAAC,MAAM,CAAA;AAAA,IACzB,UAAA,EAAY;AAAA,GACd;AAAA,EACA,EAAA,EAAI;AAAA,IACF,IAAA,EAAM,eAAA;AAAA,IACN,MAAA,EAAQ,aAAA;AAAA,IACR,SAAA,EAAW,QAAA;AAAA,IACX,gBAAA,EAAkB,CAAC,MAAM,CAAA;AAAA,IACzB,UAAA,EAAY;AAAA,GACd;AAAA,EACA,EAAA,EAAI;AAAA,IACF,IAAA,EAAM,eAAA;AAAA,IACN,MAAA,EAAQ,aAAA;AAAA,IACR,SAAA,EAAW,QAAA;AAAA,IACX,gBAAA,EAAkB,CAAC,MAAM,CAAA;AAAA,IACzB,UAAA,EAAY;AAAA,GACd;AAAA,EACA,EAAA,EAAI;AAAA,IACF,IAAA,EAAM,eAAA;AAAA,IACN,MAAA,EAAQ,aAAA;AAAA,IACR,SAAA,EAAW,QAAA;AAAA,IACX,gBAAA,EAAkB,CAAC,MAAM,CAAA;AAAA,IACzB,UAAA,EAAY;AAAA,GACd;AAAA,EACA,EAAA,EAAI;AAAA,IACF,IAAA,EAAM,eAAA;AAAA,IACN,MAAA,EAAQ,aAAA;AAAA,IACR,SAAA,EAAW,QAAA;AAAA,IACX,gBAAA,EAAkB,CAAC,MAAM,CAAA;AAAA,IACzB,UAAA,EAAY;AAAA;AAEhB,CAAA;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"padding.props.esm.js","sources":["../../src/props/padding.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 */\nimport { PropDef } from './prop-def';\nimport { GetPropDefTypes } from './prop-def';\n\n/** @public */\nconst paddingPropDefs = (spacingValues: string[]) =>\n ({\n p: {\n type: 'enum | string',\n className: 'bui-p',\n customProperties: ['--p'],\n values: spacingValues,\n responsive: true,\n },\n px: {\n type: 'enum | string',\n className: 'bui-px',\n customProperties: ['--px'],\n values: spacingValues,\n responsive: true,\n },\n py: {\n type: 'enum | string',\n className: 'bui-py',\n customProperties: ['--py'],\n values: spacingValues,\n responsive: true,\n },\n pt: {\n type: 'enum | string',\n className: 'bui-pt',\n customProperties: ['--pt'],\n values: spacingValues,\n responsive: true,\n },\n pr: {\n type: 'enum | string',\n className: 'bui-pr',\n customProperties: ['--pr'],\n values: spacingValues,\n responsive: true,\n },\n pb: {\n type: 'enum | string',\n className: 'bui-pb',\n customProperties: ['--pb'],\n values: spacingValues,\n responsive: true,\n },\n pl: {\n type: 'enum | string',\n className: 'bui-pl',\n customProperties: ['--pl'],\n values: spacingValues,\n responsive: true,\n },\n } satisfies {\n p: PropDef<(typeof spacingValues)[number]>;\n px: PropDef<(typeof spacingValues)[number]>;\n py: PropDef<(typeof spacingValues)[number]>;\n pt: PropDef<(typeof spacingValues)[number]>;\n pr: PropDef<(typeof spacingValues)[number]>;\n pb: PropDef<(typeof spacingValues)[number]>;\n pl: PropDef<(typeof spacingValues)[number]>;\n });\n\n/** @public */\ntype PaddingProps = GetPropDefTypes<typeof paddingPropDefs>;\n\nexport { paddingPropDefs };\nexport type { PaddingProps };\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"padding.props.esm.js","sources":["../../src/props/padding.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 */\nimport { PropDef } from './prop-def';\nimport { GetPropDefTypes } from './prop-def';\n\n/** @public */\nconst paddingPropDefs = (spacingValues: string[]) =>\n ({\n p: {\n type: 'enum | string',\n className: 'bui-p',\n customProperties: ['--p'],\n values: spacingValues,\n responsive: true,\n },\n px: {\n type: 'enum | string',\n className: 'bui-px',\n customProperties: ['--px'],\n values: spacingValues,\n responsive: true,\n },\n py: {\n type: 'enum | string',\n className: 'bui-py',\n customProperties: ['--py'],\n values: spacingValues,\n responsive: true,\n },\n pt: {\n type: 'enum | string',\n className: 'bui-pt',\n customProperties: ['--pt'],\n values: spacingValues,\n responsive: true,\n },\n pr: {\n type: 'enum | string',\n className: 'bui-pr',\n customProperties: ['--pr'],\n values: spacingValues,\n responsive: true,\n },\n pb: {\n type: 'enum | string',\n className: 'bui-pb',\n customProperties: ['--pb'],\n values: spacingValues,\n responsive: true,\n },\n pl: {\n type: 'enum | string',\n className: 'bui-pl',\n customProperties: ['--pl'],\n values: spacingValues,\n responsive: true,\n },\n } satisfies {\n p: PropDef<(typeof spacingValues)[number]>;\n px: PropDef<(typeof spacingValues)[number]>;\n py: PropDef<(typeof spacingValues)[number]>;\n pt: PropDef<(typeof spacingValues)[number]>;\n pr: PropDef<(typeof spacingValues)[number]>;\n pb: PropDef<(typeof spacingValues)[number]>;\n pl: PropDef<(typeof spacingValues)[number]>;\n });\n\n/** @public */\ntype PaddingProps = GetPropDefTypes<typeof paddingPropDefs>;\n\nexport { paddingPropDefs };\nexport type { PaddingProps };\n"],"names":[],"mappings":"AAmBA,MAAM,eAAA,GAAkB,CAAC,aAAA,MACtB;AAAA,EACC,CAAA,EAAG;AAAA,IACD,IAAA,EAAM,eAAA;AAAA,IACN,SAAA,EAAW,OAAA;AAAA,IACX,gBAAA,EAAkB,CAAC,KAAK,CAAA;AAAA,IACxB,MAAA,EAAQ,aAAA;AAAA,IACR,UAAA,EAAY;AAAA,GACd;AAAA,EACA,EAAA,EAAI;AAAA,IACF,IAAA,EAAM,eAAA;AAAA,IACN,SAAA,EAAW,QAAA;AAAA,IACX,gBAAA,EAAkB,CAAC,MAAM,CAAA;AAAA,IACzB,MAAA,EAAQ,aAAA;AAAA,IACR,UAAA,EAAY;AAAA,GACd;AAAA,EACA,EAAA,EAAI;AAAA,IACF,IAAA,EAAM,eAAA;AAAA,IACN,SAAA,EAAW,QAAA;AAAA,IACX,gBAAA,EAAkB,CAAC,MAAM,CAAA;AAAA,IACzB,MAAA,EAAQ,aAAA;AAAA,IACR,UAAA,EAAY;AAAA,GACd;AAAA,EACA,EAAA,EAAI;AAAA,IACF,IAAA,EAAM,eAAA;AAAA,IACN,SAAA,EAAW,QAAA;AAAA,IACX,gBAAA,EAAkB,CAAC,MAAM,CAAA;AAAA,IACzB,MAAA,EAAQ,aAAA;AAAA,IACR,UAAA,EAAY;AAAA,GACd;AAAA,EACA,EAAA,EAAI;AAAA,IACF,IAAA,EAAM,eAAA;AAAA,IACN,SAAA,EAAW,QAAA;AAAA,IACX,gBAAA,EAAkB,CAAC,MAAM,CAAA;AAAA,IACzB,MAAA,EAAQ,aAAA;AAAA,IACR,UAAA,EAAY;AAAA,GACd;AAAA,EACA,EAAA,EAAI;AAAA,IACF,IAAA,EAAM,eAAA;AAAA,IACN,SAAA,EAAW,QAAA;AAAA,IACX,gBAAA,EAAkB,CAAC,MAAM,CAAA;AAAA,IACzB,MAAA,EAAQ,aAAA;AAAA,IACR,UAAA,EAAY;AAAA,GACd;AAAA,EACA,EAAA,EAAI;AAAA,IACF,IAAA,EAAM,eAAA;AAAA,IACN,SAAA,EAAW,QAAA;AAAA,IACX,gBAAA,EAAkB,CAAC,MAAM,CAAA;AAAA,IACzB,MAAA,EAAQ,aAAA;AAAA,IACR,UAAA,EAAY;AAAA;AAEhB,CAAA;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"position.props.esm.js","sources":["../../src/props/position.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 */\nimport type { PropDef, GetPropDefTypes } from './prop-def';\n\n/** @public */\nconst positionValues = [\n 'static',\n 'relative',\n 'absolute',\n 'fixed',\n 'sticky',\n] as const;\n\n/** @public */\nconst positionPropDefs = {\n position: {\n type: 'enum',\n className: 'bui-position',\n values: positionValues,\n responsive: true,\n },\n} satisfies {\n position: PropDef<(typeof positionValues)[number]>;\n};\n\n// Use all of the imported prop defs to ensure that JSDoc works\n/** @public */\ntype PositionProps = GetPropDefTypes<typeof positionPropDefs>;\n\nexport { positionPropDefs };\nexport type { PositionProps };\n"],"names":[],"mappings":"AAkBA,MAAM,
|
|
1
|
+
{"version":3,"file":"position.props.esm.js","sources":["../../src/props/position.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 */\nimport type { PropDef, GetPropDefTypes } from './prop-def';\n\n/** @public */\nconst positionValues = [\n 'static',\n 'relative',\n 'absolute',\n 'fixed',\n 'sticky',\n] as const;\n\n/** @public */\nconst positionPropDefs = {\n position: {\n type: 'enum',\n className: 'bui-position',\n values: positionValues,\n responsive: true,\n },\n} satisfies {\n position: PropDef<(typeof positionValues)[number]>;\n};\n\n// Use all of the imported prop defs to ensure that JSDoc works\n/** @public */\ntype PositionProps = GetPropDefTypes<typeof positionPropDefs>;\n\nexport { positionPropDefs };\nexport type { PositionProps };\n"],"names":[],"mappings":"AAkBA,MAAM,cAAA,GAAiB;AAAA,EACrB,QAAA;AAAA,EACA,UAAA;AAAA,EACA,UAAA;AAAA,EACA,OAAA;AAAA,EACA;AACF,CAAA;AAGA,MAAM,gBAAA,GAAmB;AAAA,EACvB,QAAA,EAAU;AAAA,IACR,IAAA,EAAM,MAAA;AAAA,IACN,SAAA,EAAW,cAAA;AAAA,IACX,MAAA,EAAQ,cAAA;AAAA,IACR,UAAA,EAAY;AAAA;AAEhB;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prop-def.esm.js","sources":["../../src/props/prop-def.ts"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport type { ReactNode } from 'react';\nimport type { Breakpoint, Responsive } from '../types';\n\n/** @public */\nconst breakpoints = ['initial', 'xs', 'sm', 'md', 'lg', 'xl'] as Breakpoint[];\n\n/** @public */\nexport type BooleanPropDef = {\n type: 'boolean';\n default?: boolean;\n required?: boolean;\n className?: string;\n};\n\n/** @public */\nexport type StringPropDef = {\n type: 'string';\n default?: string;\n required?: boolean;\n};\n\n/** @public */\nexport type ReactNodePropDef = {\n type: 'ReactNode';\n default?: ReactNode;\n required?: boolean;\n};\n\n/** @public */\nexport type EnumPropDef<T> = {\n type: 'enum';\n values: readonly T[];\n default?: T;\n required?: boolean;\n};\n\n/** @public */\nexport type EnumOrStringPropDef<T> = {\n type: 'enum | string';\n values: readonly T[];\n default?: T | string;\n required?: boolean;\n};\n\n/** @public */\nexport type NonStylingPropDef = {\n className?: never;\n customProperties?: never;\n parseValue?: never;\n};\n\n/** @public */\nexport type StylingPropDef = {\n className: string;\n parseValue?: (value: string) => string | undefined;\n};\n\n/** @public */\nexport type ArbitraryStylingPropDef = {\n className: string;\n customProperties: `--${string}`[];\n parseValue?: (value: string) => string | undefined;\n};\n\n/** @public */\nexport type RegularPropDef<T> =\n | ReactNodePropDef\n | BooleanPropDef\n | (StringPropDef & ArbitraryStylingPropDef)\n | (StringPropDef & NonStylingPropDef)\n | (EnumPropDef<T> & StylingPropDef)\n | (EnumPropDef<T> & NonStylingPropDef)\n | (EnumOrStringPropDef<T> & ArbitraryStylingPropDef)\n | (EnumOrStringPropDef<T> & NonStylingPropDef);\n\n/** @public */\ntype ResponsivePropDef<T = any> = RegularPropDef<T> & {\n responsive: true;\n};\n\n/** @public */\ntype PropDef<T = any> = RegularPropDef<T> | ResponsivePropDef<T>;\n\n/** @public */\nexport type GetPropDefType<Def> = Def extends BooleanPropDef\n ? Def extends ResponsivePropDef\n ? Responsive<boolean>\n : boolean\n : Def extends StringPropDef\n ? Def extends ResponsivePropDef\n ? Responsive<string>\n : string\n : Def extends ReactNodePropDef\n ? Def extends ResponsivePropDef\n ? Responsive<ReactNode>\n : ReactNode\n : Def extends EnumOrStringPropDef<infer Type>\n ? Def extends ResponsivePropDef<infer Type extends string>\n ? Responsive<string | Type>\n : string | Type\n : Def extends EnumPropDef<infer Type>\n ? Def extends ResponsivePropDef<infer Type>\n ? Responsive<Type>\n : Type\n : never;\n\n/** @public */\ntype GetPropDefTypes<P> = {\n [K in keyof P]?: GetPropDefType<P[K]>;\n};\n\nexport { breakpoints };\nexport type {\n PropDef,\n GetPropDefTypes,\n ResponsivePropDef,\n Breakpoint,\n Responsive,\n};\n"],"names":[],"mappings":"AAmBA,MAAM,cAAc,CAAC,SAAA,EAAW,MAAM,
|
|
1
|
+
{"version":3,"file":"prop-def.esm.js","sources":["../../src/props/prop-def.ts"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport type { ReactNode } from 'react';\nimport type { Breakpoint, Responsive } from '../types';\n\n/** @public */\nconst breakpoints = ['initial', 'xs', 'sm', 'md', 'lg', 'xl'] as Breakpoint[];\n\n/** @public */\nexport type BooleanPropDef = {\n type: 'boolean';\n default?: boolean;\n required?: boolean;\n className?: string;\n};\n\n/** @public */\nexport type StringPropDef = {\n type: 'string';\n default?: string;\n required?: boolean;\n};\n\n/** @public */\nexport type ReactNodePropDef = {\n type: 'ReactNode';\n default?: ReactNode;\n required?: boolean;\n};\n\n/** @public */\nexport type EnumPropDef<T> = {\n type: 'enum';\n values: readonly T[];\n default?: T;\n required?: boolean;\n};\n\n/** @public */\nexport type EnumOrStringPropDef<T> = {\n type: 'enum | string';\n values: readonly T[];\n default?: T | string;\n required?: boolean;\n};\n\n/** @public */\nexport type NonStylingPropDef = {\n className?: never;\n customProperties?: never;\n parseValue?: never;\n};\n\n/** @public */\nexport type StylingPropDef = {\n className: string;\n parseValue?: (value: string) => string | undefined;\n};\n\n/** @public */\nexport type ArbitraryStylingPropDef = {\n className: string;\n customProperties: `--${string}`[];\n parseValue?: (value: string) => string | undefined;\n};\n\n/** @public */\nexport type RegularPropDef<T> =\n | ReactNodePropDef\n | BooleanPropDef\n | (StringPropDef & ArbitraryStylingPropDef)\n | (StringPropDef & NonStylingPropDef)\n | (EnumPropDef<T> & StylingPropDef)\n | (EnumPropDef<T> & NonStylingPropDef)\n | (EnumOrStringPropDef<T> & ArbitraryStylingPropDef)\n | (EnumOrStringPropDef<T> & NonStylingPropDef);\n\n/** @public */\ntype ResponsivePropDef<T = any> = RegularPropDef<T> & {\n responsive: true;\n};\n\n/** @public */\ntype PropDef<T = any> = RegularPropDef<T> | ResponsivePropDef<T>;\n\n/** @public */\nexport type GetPropDefType<Def> = Def extends BooleanPropDef\n ? Def extends ResponsivePropDef\n ? Responsive<boolean>\n : boolean\n : Def extends StringPropDef\n ? Def extends ResponsivePropDef\n ? Responsive<string>\n : string\n : Def extends ReactNodePropDef\n ? Def extends ResponsivePropDef\n ? Responsive<ReactNode>\n : ReactNode\n : Def extends EnumOrStringPropDef<infer Type>\n ? Def extends ResponsivePropDef<infer Type extends string>\n ? Responsive<string | Type>\n : string | Type\n : Def extends EnumPropDef<infer Type>\n ? Def extends ResponsivePropDef<infer Type>\n ? Responsive<Type>\n : Type\n : never;\n\n/** @public */\ntype GetPropDefTypes<P> = {\n [K in keyof P]?: GetPropDefType<P[K]>;\n};\n\nexport { breakpoints };\nexport type {\n PropDef,\n GetPropDefTypes,\n ResponsivePropDef,\n Breakpoint,\n Responsive,\n};\n"],"names":[],"mappings":"AAmBA,MAAM,cAAc,CAAC,SAAA,EAAW,MAAM,IAAA,EAAM,IAAA,EAAM,MAAM,IAAI;;;;"}
|