@backstage/ui 0.0.0-nightly-20250813024231 → 0.0.0-nightly-20250815024739
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 +2 -1
- package/css/styles.css +2 -55
- 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.map +1 -1
- package/dist/components/Checkbox/Checkbox.esm.js +7 -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.map +1 -1
- package/dist/components/Header/HeaderToolbar.esm.js +0 -3
- package/dist/components/Header/HeaderToolbar.esm.js.map +1 -1
- package/dist/components/HeaderPage/HeaderPage.esm.js +55 -90
- 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/Combobox.esm.js +7 -9
- package/dist/components/Menu/Combobox.esm.js.map +1 -1
- package/dist/components/Menu/Menu.esm.js.map +1 -1
- package/dist/components/RadioGroup/RadioGroup.esm.js.map +1 -1
- package/dist/components/ScrollArea/ScrollArea.esm.js.map +1 -1
- package/dist/components/SearchField/SearchField.esm.js.map +1 -1
- package/dist/components/Select/Select.esm.js.map +1 -1
- package/dist/components/Skeleton/Skeleton.esm.js.map +1 -1
- package/dist/components/Switch/Switch.esm.js.map +1 -1
- package/dist/components/Table/components/Cell.esm.js.map +1 -1
- package/dist/components/Table/components/CellProfile.esm.js.map +1 -1
- package/dist/components/Table/components/Column.esm.js.map +1 -1
- package/dist/components/Table/components/Row.esm.js.map +1 -1
- package/dist/components/Table/components/Table.esm.js.map +1 -1
- package/dist/components/Table/components/TableBody.esm.js.map +1 -1
- package/dist/components/Table/components/TableHeader.esm.js.map +1 -1
- package/dist/components/Table/hooks/useTable.esm.js.map +1 -1
- package/dist/components/TablePagination/TablePagination.esm.js +7 -9
- 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/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 +2 -12
- 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 +2 -12
- 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
|
@@ -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;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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,5 +1,5 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { ReactNode, ReactElement, ElementType, ComponentPropsWithRef,
|
|
2
|
+
import { ReactNode, ReactElement, ElementType, ComponentPropsWithRef, ForwardRefExoticComponent, ComponentProps, RefAttributes } from 'react';
|
|
3
3
|
import { RemixiconComponentType } from '@remixicon/react';
|
|
4
4
|
import { Avatar as Avatar$1 } from '@base-ui-components/react/avatar';
|
|
5
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';
|
|
@@ -131,10 +131,6 @@ declare const componentDefinitions: {
|
|
|
131
131
|
readonly toolbarControls: "bui-HeaderToolbarControls";
|
|
132
132
|
readonly toolbarIcon: "bui-HeaderToolbarIcon";
|
|
133
133
|
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
134
|
readonly tabsWrapper: "bui-HeaderTabsWrapper";
|
|
139
135
|
};
|
|
140
136
|
};
|
|
@@ -142,15 +138,9 @@ declare const componentDefinitions: {
|
|
|
142
138
|
readonly classNames: {
|
|
143
139
|
readonly root: "bui-HeaderPage";
|
|
144
140
|
readonly content: "bui-HeaderPageContent";
|
|
141
|
+
readonly breadcrumbs: "bui-HeaderPageBreadcrumbs";
|
|
145
142
|
readonly tabsWrapper: "bui-HeaderPageTabsWrapper";
|
|
146
143
|
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
144
|
};
|
|
155
145
|
};
|
|
156
146
|
readonly Heading: {
|
|
@@ -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;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AAA;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;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spacing.props.esm.js","sources":["../../src/props/spacing.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 { paddingPropDefs } from './padding.props';\nimport { marginPropDefs } from './margin.props';\n\nexport const spacingValues = [\n '0.5',\n '1',\n '1.5',\n '2',\n '3',\n '4',\n '5',\n '6',\n '7',\n '8',\n '9',\n '10',\n '11',\n '12',\n '13',\n '14',\n];\n\nexport const spacingPropDefs = {\n ...paddingPropDefs(spacingValues),\n ...marginPropDefs(spacingValues),\n};\n"],"names":[],"mappings":";;;AAkBO,MAAM,
|
|
1
|
+
{"version":3,"file":"spacing.props.esm.js","sources":["../../src/props/spacing.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 { paddingPropDefs } from './padding.props';\nimport { marginPropDefs } from './margin.props';\n\nexport const spacingValues = [\n '0.5',\n '1',\n '1.5',\n '2',\n '3',\n '4',\n '5',\n '6',\n '7',\n '8',\n '9',\n '10',\n '11',\n '12',\n '13',\n '14',\n];\n\nexport const spacingPropDefs = {\n ...paddingPropDefs(spacingValues),\n ...marginPropDefs(spacingValues),\n};\n"],"names":[],"mappings":";;;AAkBO,MAAM,aAAA,GAAgB;AAAA,EAC3B,KAAA;AAAA,EACA,GAAA;AAAA,EACA,KAAA;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,IAAA;AAAA,EACA;AACF;AAEO,MAAM,eAAA,GAAkB;AAAA,EAC7B,GAAG,gBAAgB,aAAa,CAAA;AAAA,EAChC,GAAG,eAAe,aAAa;AACjC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"width.props.esm.js","sources":["../../src/props/width.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 { GetPropDefTypes, PropDef } from './prop-def';\n\n/** @public */\nconst widthPropDefs = {\n width: {\n type: 'string',\n className: 'bui-w',\n customProperties: ['--width'],\n responsive: true,\n },\n minWidth: {\n type: 'string',\n className: 'bui-min-w',\n customProperties: ['--min-width'],\n responsive: true,\n },\n maxWidth: {\n type: 'string',\n className: 'bui-max-w',\n customProperties: ['--max-width'],\n responsive: true,\n },\n} satisfies {\n width: PropDef<string>;\n minWidth: PropDef<string>;\n maxWidth: PropDef<string>;\n};\n\n/** @public */\ntype WidthProps = GetPropDefTypes<typeof widthPropDefs>;\n\nexport { widthPropDefs };\nexport type { WidthProps };\n"],"names":[],"mappings":"AAkBA,MAAM,
|
|
1
|
+
{"version":3,"file":"width.props.esm.js","sources":["../../src/props/width.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 { GetPropDefTypes, PropDef } from './prop-def';\n\n/** @public */\nconst widthPropDefs = {\n width: {\n type: 'string',\n className: 'bui-w',\n customProperties: ['--width'],\n responsive: true,\n },\n minWidth: {\n type: 'string',\n className: 'bui-min-w',\n customProperties: ['--min-width'],\n responsive: true,\n },\n maxWidth: {\n type: 'string',\n className: 'bui-max-w',\n customProperties: ['--max-width'],\n responsive: true,\n },\n} satisfies {\n width: PropDef<string>;\n minWidth: PropDef<string>;\n maxWidth: PropDef<string>;\n};\n\n/** @public */\ntype WidthProps = GetPropDefTypes<typeof widthPropDefs>;\n\nexport { widthPropDefs };\nexport type { WidthProps };\n"],"names":[],"mappings":"AAkBA,MAAM,aAAA,GAAgB;AAAA,EACpB,KAAA,EAAO;AAAA,IACL,IAAA,EAAM,QAAA;AAAA,IACN,SAAA,EAAW,OAAA;AAAA,IACX,gBAAA,EAAkB,CAAC,SAAS,CAAA;AAAA,IAC5B,UAAA,EAAY;AAAA,GACd;AAAA,EACA,QAAA,EAAU;AAAA,IACR,IAAA,EAAM,QAAA;AAAA,IACN,SAAA,EAAW,WAAA;AAAA,IACX,gBAAA,EAAkB,CAAC,aAAa,CAAA;AAAA,IAChC,UAAA,EAAY;AAAA,GACd;AAAA,EACA,QAAA,EAAU;AAAA,IACR,IAAA,EAAM,QAAA;AAAA,IACN,SAAA,EAAW,WAAA;AAAA,IACX,gBAAA,EAAkB,CAAC,aAAa,CAAA;AAAA,IAChC,UAAA,EAAY;AAAA;AAEhB;;;;"}
|
|
@@ -90,10 +90,6 @@ const componentDefinitions = {
|
|
|
90
90
|
toolbarControls: "bui-HeaderToolbarControls",
|
|
91
91
|
toolbarIcon: "bui-HeaderToolbarIcon",
|
|
92
92
|
toolbarName: "bui-HeaderToolbarName",
|
|
93
|
-
breadcrumbs: "bui-HeaderBreadcrumbs",
|
|
94
|
-
breadcrumb: "bui-HeaderBreadcrumb",
|
|
95
|
-
breadcrumbLink: "bui-HeaderBreadcrumbLink",
|
|
96
|
-
breadcrumbSeparator: "bui-HeaderBreadcrumbSeparator",
|
|
97
93
|
tabsWrapper: "bui-HeaderTabsWrapper"
|
|
98
94
|
}
|
|
99
95
|
},
|
|
@@ -101,15 +97,9 @@ const componentDefinitions = {
|
|
|
101
97
|
classNames: {
|
|
102
98
|
root: "bui-HeaderPage",
|
|
103
99
|
content: "bui-HeaderPageContent",
|
|
104
|
-
tabsWrapper: "bui-HeaderPageTabsWrapper",
|
|
105
|
-
controls: "bui-HeaderPageControls",
|
|
106
|
-
sticky: "bui-HeaderPageSticky",
|
|
107
|
-
stickyWrapper: "bui-HeaderPageStickyWrapper",
|
|
108
|
-
stickyContent: "bui-HeaderPageStickyContent",
|
|
109
100
|
breadcrumbs: "bui-HeaderPageBreadcrumbs",
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
breadcrumbSeparator: "bui-HeaderPageBreadcrumbSeparator"
|
|
101
|
+
tabsWrapper: "bui-HeaderPageTabsWrapper",
|
|
102
|
+
controls: "bui-HeaderPageControls"
|
|
113
103
|
}
|
|
114
104
|
},
|
|
115
105
|
Heading: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"componentDefinitions.esm.js","sources":["../../src/utils/componentDefinitions.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { ComponentDefinition } from '../types';\n\n/**\n * Component definitions for the Backstage UI library\n * @public\n */\nexport const componentDefinitions = {\n Avatar: {\n classNames: {\n root: 'bui-AvatarRoot',\n image: 'bui-AvatarImage',\n fallback: 'bui-AvatarFallback',\n },\n dataAttributes: {\n size: ['small', 'medium', 'large'] as const,\n },\n },\n Box: {\n classNames: {\n root: 'bui-Box',\n },\n },\n Button: {\n classNames: {\n root: 'bui-Button',\n },\n dataAttributes: {\n size: ['small', 'medium', 'large'] as const,\n variant: ['primary', 'secondary', 'tertiary'] as const,\n },\n },\n ButtonIcon: {\n classNames: {\n root: 'bui-ButtonIcon',\n },\n },\n ButtonLink: {\n classNames: {\n root: 'bui-ButtonLink',\n },\n },\n Card: {\n classNames: {\n root: 'bui-Card',\n header: 'bui-CardHeader',\n body: 'bui-CardBody',\n footer: 'bui-CardFooter',\n },\n },\n Checkbox: {\n classNames: {\n root: 'bui-CheckboxRoot',\n label: 'bui-CheckboxLabel',\n indicator: 'bui-CheckboxIndicator',\n },\n dataAttributes: {\n checked: [true, false] as const,\n },\n },\n Collapsible: {\n classNames: {\n root: 'bui-CollapsibleRoot',\n trigger: 'bui-CollapsibleTrigger',\n panel: 'bui-CollapsiblePanel',\n },\n },\n Container: {\n classNames: {\n root: 'bui-Container',\n },\n },\n FieldLabel: {\n classNames: {\n root: 'bui-FieldLabelWrapper',\n label: 'bui-FieldLabel',\n secondaryLabel: 'bui-FieldSecondaryLabel',\n description: 'bui-FieldDescription',\n },\n },\n Flex: {\n classNames: {\n root: 'bui-Flex',\n },\n },\n Grid: {\n classNames: {\n root: 'bui-Grid',\n item: 'bui-GridItem',\n },\n },\n Header: {\n classNames: {\n toolbar: 'bui-HeaderToolbar',\n toolbarWrapper: 'bui-HeaderToolbarWrapper',\n toolbarContent: 'bui-HeaderToolbarContent',\n toolbarControls: 'bui-HeaderToolbarControls',\n toolbarIcon: 'bui-HeaderToolbarIcon',\n toolbarName: 'bui-HeaderToolbarName',\n breadcrumbs: 'bui-HeaderBreadcrumbs',\n breadcrumb: 'bui-HeaderBreadcrumb',\n breadcrumbLink: 'bui-HeaderBreadcrumbLink',\n breadcrumbSeparator: 'bui-HeaderBreadcrumbSeparator',\n tabsWrapper: 'bui-HeaderTabsWrapper',\n },\n },\n HeaderPage: {\n classNames: {\n root: 'bui-HeaderPage',\n content: 'bui-HeaderPageContent',\n tabsWrapper: 'bui-HeaderPageTabsWrapper',\n controls: 'bui-HeaderPageControls',\n sticky: 'bui-HeaderPageSticky',\n stickyWrapper: 'bui-HeaderPageStickyWrapper',\n stickyContent: 'bui-HeaderPageStickyContent',\n breadcrumbs: 'bui-HeaderPageBreadcrumbs',\n breadcrumb: 'bui-HeaderPageBreadcrumb',\n breadcrumbLink: 'bui-HeaderPageBreadcrumbLink',\n breadcrumbSeparator: 'bui-HeaderPageBreadcrumbSeparator',\n },\n },\n Heading: {\n classNames: {\n root: 'bui-Heading',\n },\n dataAttributes: {\n variant: ['title1', 'title2', 'title3', 'subtitle'] as const,\n color: ['primary', 'secondary', 'muted'] as const,\n truncate: [true, false] as const,\n },\n },\n Icon: {\n classNames: {\n root: 'bui-Icon',\n },\n },\n Link: {\n classNames: {\n root: 'bui-Link',\n },\n dataAttributes: {\n variant: ['subtitle', 'body', 'caption', 'label'] as const,\n weight: ['regular', 'bold'] as const,\n },\n },\n List: {\n classNames: {\n root: 'bui-List',\n row: 'bui-ListRow',\n label: 'bui-ListLabel',\n },\n },\n Menu: {\n classNames: {\n trigger: 'bui-MenuTrigger',\n backdrop: 'bui-MenuBackdrop',\n positioner: 'bui-MenuPositioner',\n popup: 'bui-MenuPopup',\n arrow: 'bui-MenuArrow',\n item: 'bui-MenuItem',\n group: 'bui-MenuGroup',\n groupLabel: 'bui-MenuGroupLabel',\n radioGroup: 'bui-MenuRadioGroup',\n radioItem: 'bui-MenuRadioItem',\n radioItemIndicator: 'bui-MenuRadioItemIndicator',\n checkboxItem: 'bui-MenuCheckboxItem',\n checkboxItemIndicator: 'bui-MenuCheckboxItemIndicator',\n submenuTrigger: 'bui-MenuSubmenuTrigger',\n separator: 'bui-MenuSeparator',\n },\n },\n Popover: {\n classNames: {\n root: 'bui-Popover',\n },\n },\n RadioGroup: {\n classNames: {\n root: 'bui-RadioGroup',\n content: 'bui-RadioGroupContent',\n radio: 'bui-Radio',\n },\n },\n ScrollArea: {\n classNames: {\n root: 'bui-ScrollAreaRoot',\n viewport: 'bui-ScrollAreaViewport',\n scrollbar: 'bui-ScrollAreaScrollbar',\n thumb: 'bui-ScrollAreaThumb',\n },\n },\n SearchField: {\n classNames: {\n root: 'bui-SearchField',\n clear: 'bui-InputClear',\n },\n dataAttributes: {\n startCollapsed: [true, false] as const,\n },\n },\n Select: {\n classNames: {\n root: 'bui-Select',\n trigger: 'bui-SelectTrigger',\n value: 'bui-SelectValue',\n icon: 'bui-SelectIcon',\n list: 'bui-SelectList',\n item: 'bui-SelectItem',\n itemIndicator: 'bui-SelectItemIndicator',\n itemLabel: 'bui-SelectItemLabel',\n },\n dataAttributes: {\n size: ['small', 'medium'] as const,\n },\n },\n Skeleton: {\n classNames: {\n root: 'bui-Skeleton',\n },\n },\n Switch: {\n classNames: {\n root: 'bui-Switch',\n indicator: 'bui-SwitchIndicator',\n },\n },\n Table: {\n classNames: {\n table: 'bui-Table',\n header: 'bui-TableHeader',\n body: 'bui-TableBody',\n row: 'bui-TableRow',\n head: 'bui-TableHead',\n headSortButton: 'bui-TableHeadSortButton',\n caption: 'bui-TableCaption',\n cell: 'bui-TableCell',\n cellContentWrapper: 'bui-TableCellContentWrapper',\n cellContent: 'bui-TableCellContent',\n cellIcon: 'bui-TableCellIcon',\n cellProfileAvatar: 'bui-TableCellProfileAvatar',\n cellProfileAvatarImage: 'bui-TableCellProfileAvatarImage',\n cellProfileAvatarFallback: 'bui-TableCellProfileAvatarFallback',\n cellProfileName: 'bui-TableCellProfileName',\n cellProfileLink: 'bui-TableCellProfileLink',\n },\n },\n Tabs: {\n classNames: {\n tabs: 'bui-Tabs',\n tabList: 'bui-TabList',\n tabListWrapper: 'bui-TabListWrapper',\n tab: 'bui-Tab',\n tabActive: 'bui-TabActive',\n tabHovered: 'bui-TabHovered',\n panel: 'bui-TabPanel',\n },\n },\n Text: {\n classNames: {\n root: 'bui-Text',\n },\n dataAttributes: {\n variant: ['subtitle', 'body', 'caption', 'label'] as const,\n weight: ['regular', 'bold'] as const,\n color: ['primary', 'secondary', 'danger', 'warning', 'success'] as const,\n truncate: [true, false] as const,\n },\n },\n TextField: {\n classNames: {\n root: 'bui-TextField',\n inputWrapper: 'bui-InputWrapper',\n input: 'bui-Input',\n inputIcon: 'bui-InputIcon',\n },\n dataAttributes: {\n invalid: [true, false] as const,\n disabled: [true, false] as const,\n },\n },\n Tooltip: {\n classNames: {\n tooltip: 'bui-Tooltip',\n arrow: 'bui-TooltipArrow',\n },\n },\n} as const satisfies Record<string, ComponentDefinition>;\n"],"names":[],"mappings":"AAsBO,MAAM,oBAAuB,GAAA;AAAA,EAClC,MAAQ,EAAA;AAAA,IACN,UAAY,EAAA;AAAA,MACV,IAAM,EAAA,gBAAA;AAAA,MACN,KAAO,EAAA,iBAAA;AAAA,MACP,QAAU,EAAA;AAAA,KACZ;AAAA,IACA,cAAgB,EAAA;AAAA,MACd,IAAM,EAAA,CAAC,OAAS,EAAA,QAAA,EAAU,OAAO;AAAA;AACnC,GACF;AAAA,EACA,GAAK,EAAA;AAAA,IACH,UAAY,EAAA;AAAA,MACV,IAAM,EAAA;AAAA;AACR,GACF;AAAA,EACA,MAAQ,EAAA;AAAA,IACN,UAAY,EAAA;AAAA,MACV,IAAM,EAAA;AAAA,KACR;AAAA,IACA,cAAgB,EAAA;AAAA,MACd,IAAM,EAAA,CAAC,OAAS,EAAA,QAAA,EAAU,OAAO,CAAA;AAAA,MACjC,OAAS,EAAA,CAAC,SAAW,EAAA,WAAA,EAAa,UAAU;AAAA;AAC9C,GACF;AAAA,EACA,UAAY,EAAA;AAAA,IACV,UAAY,EAAA;AAAA,MACV,IAAM,EAAA;AAAA;AACR,GACF;AAAA,EACA,UAAY,EAAA;AAAA,IACV,UAAY,EAAA;AAAA,MACV,IAAM,EAAA;AAAA;AACR,G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AAA,aAAA;AAAA,MACT,cAAgB,EAAA,oBAAA;AAAA,MAChB,GAAK,EAAA,SAAA;AAAA,MACL,SAAW,EAAA,eAAA;AAAA,MACX,UAAY,EAAA,gBAAA;AAAA,MACZ,KAAO,EAAA;AAAA;AACT,GACF;AAAA,EACA,IAAM,EAAA;AAAA,IACJ,UAAY,EAAA;AAAA,MACV,IAAM,EAAA;AAAA,KACR;AAAA,IACA,cAAgB,EAAA;AAAA,MACd,OAAS,EAAA,CAAC,UAAY,EAAA,MAAA,EAAQ,WAAW,OAAO,CAAA;AAAA,MAChD,MAAA,EAAQ,CAAC,SAAA,EAAW,MAAM,CAAA;AAAA,MAC1B,OAAO,CAAC,SAAA,EAAW,WAAa,EAAA,QAAA,EAAU,WAAW,SAAS,CAAA;AAAA,MAC9D,QAAA,EAAU,CAAC,IAAA,EAAM,KAAK;AAAA;AACxB,GACF;AAAA,EACA,SAAW,EAAA;AAAA,IACT,UAAY,EAAA;AAAA,MACV,IAAM,EAAA,eAAA;AAAA,MACN,YAAc,EAAA,kBAAA;AAAA,MACd,KAAO,EAAA,WAAA;AAAA,MACP,SAAW,EAAA;AAAA,KACb;AAAA,IACA,cAAgB,EAAA;AAAA,MACd,OAAA,EAAS,CAAC,IAAA,EAAM,KAAK,CAAA;AAAA,MACrB,QAAA,EAAU,CAAC,IAAA,EAAM,KAAK;AAAA;AACxB,GACF;AAAA,EACA,OAAS,EAAA;AAAA,IACP,UAAY,EAAA;AAAA,MACV,OAAS,EAAA,aAAA;AAAA,MACT,KAAO,EAAA;AAAA;AACT;AAEJ;;;;"}
|
|
1
|
+
{"version":3,"file":"componentDefinitions.esm.js","sources":["../../src/utils/componentDefinitions.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { ComponentDefinition } from '../types';\n\n/**\n * Component definitions for the Backstage UI library\n * @public\n */\nexport const componentDefinitions = {\n Avatar: {\n classNames: {\n root: 'bui-AvatarRoot',\n image: 'bui-AvatarImage',\n fallback: 'bui-AvatarFallback',\n },\n dataAttributes: {\n size: ['small', 'medium', 'large'] as const,\n },\n },\n Box: {\n classNames: {\n root: 'bui-Box',\n },\n },\n Button: {\n classNames: {\n root: 'bui-Button',\n },\n dataAttributes: {\n size: ['small', 'medium', 'large'] as const,\n variant: ['primary', 'secondary', 'tertiary'] as const,\n },\n },\n ButtonIcon: {\n classNames: {\n root: 'bui-ButtonIcon',\n },\n },\n ButtonLink: {\n classNames: {\n root: 'bui-ButtonLink',\n },\n },\n Card: {\n classNames: {\n root: 'bui-Card',\n header: 'bui-CardHeader',\n body: 'bui-CardBody',\n footer: 'bui-CardFooter',\n },\n },\n Checkbox: {\n classNames: {\n root: 'bui-CheckboxRoot',\n label: 'bui-CheckboxLabel',\n indicator: 'bui-CheckboxIndicator',\n },\n dataAttributes: {\n checked: [true, false] as const,\n },\n },\n Collapsible: {\n classNames: {\n root: 'bui-CollapsibleRoot',\n trigger: 'bui-CollapsibleTrigger',\n panel: 'bui-CollapsiblePanel',\n },\n },\n Container: {\n classNames: {\n root: 'bui-Container',\n },\n },\n FieldLabel: {\n classNames: {\n root: 'bui-FieldLabelWrapper',\n label: 'bui-FieldLabel',\n secondaryLabel: 'bui-FieldSecondaryLabel',\n description: 'bui-FieldDescription',\n },\n },\n Flex: {\n classNames: {\n root: 'bui-Flex',\n },\n },\n Grid: {\n classNames: {\n root: 'bui-Grid',\n item: 'bui-GridItem',\n },\n },\n Header: {\n classNames: {\n toolbar: 'bui-HeaderToolbar',\n toolbarWrapper: 'bui-HeaderToolbarWrapper',\n toolbarContent: 'bui-HeaderToolbarContent',\n toolbarControls: 'bui-HeaderToolbarControls',\n toolbarIcon: 'bui-HeaderToolbarIcon',\n toolbarName: 'bui-HeaderToolbarName',\n tabsWrapper: 'bui-HeaderTabsWrapper',\n },\n },\n HeaderPage: {\n classNames: {\n root: 'bui-HeaderPage',\n content: 'bui-HeaderPageContent',\n breadcrumbs: 'bui-HeaderPageBreadcrumbs',\n tabsWrapper: 'bui-HeaderPageTabsWrapper',\n controls: 'bui-HeaderPageControls',\n },\n },\n Heading: {\n classNames: {\n root: 'bui-Heading',\n },\n dataAttributes: {\n variant: ['title1', 'title2', 'title3', 'subtitle'] as const,\n color: ['primary', 'secondary', 'muted'] as const,\n truncate: [true, false] as const,\n },\n },\n Icon: {\n classNames: {\n root: 'bui-Icon',\n },\n },\n Link: {\n classNames: {\n root: 'bui-Link',\n },\n dataAttributes: {\n variant: ['subtitle', 'body', 'caption', 'label'] as const,\n weight: ['regular', 'bold'] as const,\n },\n },\n List: {\n classNames: {\n root: 'bui-List',\n row: 'bui-ListRow',\n label: 'bui-ListLabel',\n },\n },\n Menu: {\n classNames: {\n trigger: 'bui-MenuTrigger',\n backdrop: 'bui-MenuBackdrop',\n positioner: 'bui-MenuPositioner',\n popup: 'bui-MenuPopup',\n arrow: 'bui-MenuArrow',\n item: 'bui-MenuItem',\n group: 'bui-MenuGroup',\n groupLabel: 'bui-MenuGroupLabel',\n radioGroup: 'bui-MenuRadioGroup',\n radioItem: 'bui-MenuRadioItem',\n radioItemIndicator: 'bui-MenuRadioItemIndicator',\n checkboxItem: 'bui-MenuCheckboxItem',\n checkboxItemIndicator: 'bui-MenuCheckboxItemIndicator',\n submenuTrigger: 'bui-MenuSubmenuTrigger',\n separator: 'bui-MenuSeparator',\n },\n },\n Popover: {\n classNames: {\n root: 'bui-Popover',\n },\n },\n RadioGroup: {\n classNames: {\n root: 'bui-RadioGroup',\n content: 'bui-RadioGroupContent',\n radio: 'bui-Radio',\n },\n },\n ScrollArea: {\n classNames: {\n root: 'bui-ScrollAreaRoot',\n viewport: 'bui-ScrollAreaViewport',\n scrollbar: 'bui-ScrollAreaScrollbar',\n thumb: 'bui-ScrollAreaThumb',\n },\n },\n SearchField: {\n classNames: {\n root: 'bui-SearchField',\n clear: 'bui-InputClear',\n },\n dataAttributes: {\n startCollapsed: [true, false] as const,\n },\n },\n Select: {\n classNames: {\n root: 'bui-Select',\n trigger: 'bui-SelectTrigger',\n value: 'bui-SelectValue',\n icon: 'bui-SelectIcon',\n list: 'bui-SelectList',\n item: 'bui-SelectItem',\n itemIndicator: 'bui-SelectItemIndicator',\n itemLabel: 'bui-SelectItemLabel',\n },\n dataAttributes: {\n size: ['small', 'medium'] as const,\n },\n },\n Skeleton: {\n classNames: {\n root: 'bui-Skeleton',\n },\n },\n Switch: {\n classNames: {\n root: 'bui-Switch',\n indicator: 'bui-SwitchIndicator',\n },\n },\n Table: {\n classNames: {\n table: 'bui-Table',\n header: 'bui-TableHeader',\n body: 'bui-TableBody',\n row: 'bui-TableRow',\n head: 'bui-TableHead',\n headSortButton: 'bui-TableHeadSortButton',\n caption: 'bui-TableCaption',\n cell: 'bui-TableCell',\n cellContentWrapper: 'bui-TableCellContentWrapper',\n cellContent: 'bui-TableCellContent',\n cellIcon: 'bui-TableCellIcon',\n cellProfileAvatar: 'bui-TableCellProfileAvatar',\n cellProfileAvatarImage: 'bui-TableCellProfileAvatarImage',\n cellProfileAvatarFallback: 'bui-TableCellProfileAvatarFallback',\n cellProfileName: 'bui-TableCellProfileName',\n cellProfileLink: 'bui-TableCellProfileLink',\n },\n },\n Tabs: {\n classNames: {\n tabs: 'bui-Tabs',\n tabList: 'bui-TabList',\n tabListWrapper: 'bui-TabListWrapper',\n tab: 'bui-Tab',\n tabActive: 'bui-TabActive',\n tabHovered: 'bui-TabHovered',\n panel: 'bui-TabPanel',\n },\n },\n Text: {\n classNames: {\n root: 'bui-Text',\n },\n dataAttributes: {\n variant: ['subtitle', 'body', 'caption', 'label'] as const,\n weight: ['regular', 'bold'] as const,\n color: ['primary', 'secondary', 'danger', 'warning', 'success'] as const,\n truncate: [true, false] as const,\n },\n },\n TextField: {\n classNames: {\n root: 'bui-TextField',\n inputWrapper: 'bui-InputWrapper',\n input: 'bui-Input',\n inputIcon: 'bui-InputIcon',\n },\n dataAttributes: {\n invalid: [true, false] as const,\n disabled: [true, false] as const,\n },\n },\n Tooltip: {\n classNames: {\n tooltip: 'bui-Tooltip',\n arrow: 'bui-TooltipArrow',\n },\n },\n} as const satisfies Record<string, ComponentDefinition>;\n"],"names":[],"mappings":"AAsBO,MAAM,oBAAA,GAAuB;AAAA,EAClC,MAAA,EAAQ;AAAA,IACN,UAAA,EAAY;AAAA,MACV,IAAA,EAAM,gBAAA;AAAA,MACN,KAAA,EAAO,iBAAA;AAAA,MACP,QAAA,EAAU;AAAA,KACZ;AAAA,IACA,cAAA,EAAgB;AAAA,MACd,IAAA,EAAM,CAAC,OAAA,EAAS,QAAA,EAAU,OAAO;AAAA;AACnC,GACF;AAAA,EACA,GAAA,EAAK;AAAA,IACH,UAAA,EAAY;AAAA,MACV,IAAA,EAAM;AAAA;AACR,GACF;AAAA,EACA,MAAA,EAAQ;AAAA,IACN,UAAA,EAAY;AAAA,MACV,IAAA,EAAM;AAAA,KACR;AAAA,IACA,cAAA,EAAgB;AAAA,MACd,IAAA,EAAM,CAAC,OAAA,EAAS,QAAA,EAAU,OAAO,CAAA;AAAA,MACjC,OAAA,EAAS,CAAC,SAAA,EAAW,WAAA,EAAa,UAAU;AAAA;AAC9C,GACF;AAAA,EACA,UAAA,EAAY;AAAA,IACV,UAAA,EAAY;AAAA,MACV,IAAA,EAAM;AAAA;AACR,GACF;AAAA,EACA,UAAA,EAAY;AAAA,IACV,UAAA,EAAY;AAAA,MACV,IAAA,EAAM;AAAA;AACR,GACF;AAAA,EACA,IAAA,EAAM;AAAA,IACJ,UAAA,EAAY;AAAA,MACV,IAAA,EAAM,UAAA;AAAA,MACN,MAAA,EAAQ,gBAAA;AAAA,MACR,IAAA,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AA,EAAa,QAAA,EAAU,WAAW,SAAS,CAAA;AAAA,MAC9D,QAAA,EAAU,CAAC,IAAA,EAAM,KAAK;AAAA;AACxB,GACF;AAAA,EACA,SAAA,EAAW;AAAA,IACT,UAAA,EAAY;AAAA,MACV,IAAA,EAAM,eAAA;AAAA,MACN,YAAA,EAAc,kBAAA;AAAA,MACd,KAAA,EAAO,WAAA;AAAA,MACP,SAAA,EAAW;AAAA,KACb;AAAA,IACA,cAAA,EAAgB;AAAA,MACd,OAAA,EAAS,CAAC,IAAA,EAAM,KAAK,CAAA;AAAA,MACrB,QAAA,EAAU,CAAC,IAAA,EAAM,KAAK;AAAA;AACxB,GACF;AAAA,EACA,OAAA,EAAS;AAAA,IACP,UAAA,EAAY;AAAA,MACV,OAAA,EAAS,aAAA;AAAA,MACT,KAAA,EAAO;AAAA;AACT;AAEJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extractProps.esm.js","sources":["../../src/utils/extractProps.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\ntype BasePropDef = {\n type: string;\n values?: readonly unknown[];\n default?: unknown;\n required?: boolean;\n className?: string;\n responsive?: true;\n customProperties?: string[];\n};\n\nexport function extractProps(\n props: {\n className?: string;\n style?: React.CSSProperties;\n children?: React.ReactNode;\n as?: keyof JSX.IntrinsicElements;\n [key: string]: any;\n },\n propDefs: { [name in string]: BasePropDef },\n) {\n let className: string[] = (props.className || '').split(' ');\n let style: React.CSSProperties = { ...props.style };\n\n for (const key in propDefs) {\n const propDef = propDefs[key];\n\n // Check if the prop is present or has a default value\n if (!Object.hasOwn(props, key) && !propDef.hasOwnProperty('default')) {\n continue; // Skip processing if neither is present\n }\n\n const value = Object.hasOwn(props, key)\n ? (props[key] as unknown)\n : propDefs[key].default;\n const propDefsValues = propDef.values;\n const propDefsCustomProperties = propDef.customProperties;\n const propDefsClassName = propDef.className;\n const isResponsive = propDef.responsive;\n\n const handleValue = (val: unknown, prefix: string = '') => {\n // Skip adding class name if the key is \"as\"\n if (key === 'as') return;\n\n if (propDefsValues?.includes(val)) {\n className.push(`${prefix}${propDefsClassName}-${val}`);\n } else {\n if (propDefsCustomProperties) {\n for (const customProperty of propDefsCustomProperties) {\n const customPropertyKey =\n isResponsive && prefix\n ? `${customProperty}-${prefix.slice(0, -1)}`\n : customProperty;\n style[customPropertyKey as keyof typeof style] = val as any;\n }\n }\n className.push(`${prefix}${propDefsClassName}`);\n }\n };\n\n if (isResponsive && typeof value === 'object' && value !== null) {\n const breakpointValues = value as { [key: string]: unknown };\n // Handle responsive object values\n for (const breakpoint in breakpointValues) {\n const prefix = breakpoint === 'initial' ? '' : `${breakpoint}:`;\n handleValue(breakpointValues[breakpoint], prefix);\n }\n } else {\n handleValue(value);\n }\n }\n\n // Ensure keys from props that are defined in propDefs are removed\n const cleanedProps = Object.keys(props).reduce((acc, key) => {\n if (!propDefs.hasOwnProperty(key)) {\n acc[key] = props[key];\n }\n return acc;\n }, {} as { [key: string]: any });\n\n const newClassNames = className\n .filter(name => name && name.trim() !== '')\n .join(' ');\n\n return { ...cleanedProps, className: newClassNames, style };\n}\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"extractProps.esm.js","sources":["../../src/utils/extractProps.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\ntype BasePropDef = {\n type: string;\n values?: readonly unknown[];\n default?: unknown;\n required?: boolean;\n className?: string;\n responsive?: true;\n customProperties?: string[];\n};\n\nexport function extractProps(\n props: {\n className?: string;\n style?: React.CSSProperties;\n children?: React.ReactNode;\n as?: keyof JSX.IntrinsicElements;\n [key: string]: any;\n },\n propDefs: { [name in string]: BasePropDef },\n) {\n let className: string[] = (props.className || '').split(' ');\n let style: React.CSSProperties = { ...props.style };\n\n for (const key in propDefs) {\n const propDef = propDefs[key];\n\n // Check if the prop is present or has a default value\n if (!Object.hasOwn(props, key) && !propDef.hasOwnProperty('default')) {\n continue; // Skip processing if neither is present\n }\n\n const value = Object.hasOwn(props, key)\n ? (props[key] as unknown)\n : propDefs[key].default;\n const propDefsValues = propDef.values;\n const propDefsCustomProperties = propDef.customProperties;\n const propDefsClassName = propDef.className;\n const isResponsive = propDef.responsive;\n\n const handleValue = (val: unknown, prefix: string = '') => {\n // Skip adding class name if the key is \"as\"\n if (key === 'as') return;\n\n if (propDefsValues?.includes(val)) {\n className.push(`${prefix}${propDefsClassName}-${val}`);\n } else {\n if (propDefsCustomProperties) {\n for (const customProperty of propDefsCustomProperties) {\n const customPropertyKey =\n isResponsive && prefix\n ? `${customProperty}-${prefix.slice(0, -1)}`\n : customProperty;\n style[customPropertyKey as keyof typeof style] = val as any;\n }\n }\n className.push(`${prefix}${propDefsClassName}`);\n }\n };\n\n if (isResponsive && typeof value === 'object' && value !== null) {\n const breakpointValues = value as { [key: string]: unknown };\n // Handle responsive object values\n for (const breakpoint in breakpointValues) {\n const prefix = breakpoint === 'initial' ? '' : `${breakpoint}:`;\n handleValue(breakpointValues[breakpoint], prefix);\n }\n } else {\n handleValue(value);\n }\n }\n\n // Ensure keys from props that are defined in propDefs are removed\n const cleanedProps = Object.keys(props).reduce((acc, key) => {\n if (!propDefs.hasOwnProperty(key)) {\n acc[key] = props[key];\n }\n return acc;\n }, {} as { [key: string]: any });\n\n const newClassNames = className\n .filter(name => name && name.trim() !== '')\n .join(' ');\n\n return { ...cleanedProps, className: newClassNames, style };\n}\n"],"names":[],"mappings":"AA0BO,SAAS,YAAA,CACd,OAOA,QAAA,EACA;AACA,EAAA,IAAI,SAAA,GAAA,CAAuB,KAAA,CAAM,SAAA,IAAa,EAAA,EAAI,MAAM,GAAG,CAAA;AAC3D,EAAA,IAAI,KAAA,GAA6B,EAAE,GAAG,KAAA,CAAM,KAAA,EAAM;AAElD,EAAA,KAAA,MAAW,OAAO,QAAA,EAAU;AAC1B,IAAA,MAAM,OAAA,GAAU,SAAS,GAAG,CAAA;AAG5B,IAAA,IAAI,CAAC,MAAA,CAAO,MAAA,CAAO,KAAA,EAAO,GAAG,KAAK,CAAC,OAAA,CAAQ,cAAA,CAAe,SAAS,CAAA,EAAG;AACpE,MAAA;AAAA,IACF;AAEA,IAAA,MAAM,KAAA,GAAQ,MAAA,CAAO,MAAA,CAAO,KAAA,EAAO,GAAG,CAAA,GACjC,KAAA,CAAM,GAAG,CAAA,GACV,QAAA,CAAS,GAAG,CAAA,CAAE,OAAA;AAClB,IAAA,MAAM,iBAAiB,OAAA,CAAQ,MAAA;AAC/B,IAAA,MAAM,2BAA2B,OAAA,CAAQ,gBAAA;AACzC,IAAA,MAAM,oBAAoB,OAAA,CAAQ,SAAA;AAClC,IAAA,MAAM,eAAe,OAAA,CAAQ,UAAA;AAE7B,IAAA,MAAM,WAAA,GAAc,CAAC,GAAA,EAAc,MAAA,GAAiB,EAAA,KAAO;AAEzD,MAAA,IAAI,QAAQ,IAAA,EAAM;AAElB,MAAA,IAAI,cAAA,EAAgB,QAAA,CAAS,GAAG,CAAA,EAAG;AACjC,QAAA,SAAA,CAAU,KAAK,CAAA,EAAG,MAAM,GAAG,iBAAiB,CAAA,CAAA,EAAI,GAAG,CAAA,CAAE,CAAA;AAAA,MACvD,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AAA,IAAA,KAAQ,IAAA,IAAQ,IAAA,CAAK,IAAA,EAAK,KAAM,EAAE,CAAA,CACzC,IAAA,CAAK,GAAG,CAAA;AAEX,EAAA,OAAO,EAAE,GAAG,YAAA,EAAc,SAAA,EAAW,eAAe,KAAA,EAAM;AAC5D;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isExternalLink.esm.js","sources":["../../src/utils/isExternalLink.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\n/**\n * Determines if a link is external.\n * @param href - The href of the link.\n * @returns True if the link is external, false otherwise.\n * @internal\n */\nexport function isExternalLink(href?: string): boolean {\n if (!href) return false;\n\n // Check if it's an absolute URL with protocol\n if (href.startsWith('http://') || href.startsWith('https://')) {\n return true;\n }\n\n // Check if it's a protocol-relative URL\n if (href.startsWith('//')) {\n return true;\n }\n\n // Check if it's a mailto: or tel: link\n if (href.startsWith('mailto:') || href.startsWith('tel:')) {\n return true;\n }\n\n return false;\n}\n"],"names":[],"mappings":"AAsBO,SAAS,eAAe,
|
|
1
|
+
{"version":3,"file":"isExternalLink.esm.js","sources":["../../src/utils/isExternalLink.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\n/**\n * Determines if a link is external.\n * @param href - The href of the link.\n * @returns True if the link is external, false otherwise.\n * @internal\n */\nexport function isExternalLink(href?: string): boolean {\n if (!href) return false;\n\n // Check if it's an absolute URL with protocol\n if (href.startsWith('http://') || href.startsWith('https://')) {\n return true;\n }\n\n // Check if it's a protocol-relative URL\n if (href.startsWith('//')) {\n return true;\n }\n\n // Check if it's a mailto: or tel: link\n if (href.startsWith('mailto:') || href.startsWith('tel:')) {\n return true;\n }\n\n return false;\n}\n"],"names":[],"mappings":"AAsBO,SAAS,eAAe,IAAA,EAAwB;AACrD,EAAA,IAAI,CAAC,MAAM,OAAO,KAAA;AAGlB,EAAA,IAAI,KAAK,UAAA,CAAW,SAAS,KAAK,IAAA,CAAK,UAAA,CAAW,UAAU,CAAA,EAAG;AAC7D,IAAA,OAAO,IAAA;AAAA,EACT;AAGA,EAAA,IAAI,IAAA,CAAK,UAAA,CAAW,IAAI,CAAA,EAAG;AACzB,IAAA,OAAO,IAAA;AAAA,EACT;AAGA,EAAA,IAAI,KAAK,UAAA,CAAW,SAAS,KAAK,IAAA,CAAK,UAAA,CAAW,MAAM,CAAA,EAAG;AACzD,IAAA,OAAO,IAAA;AAAA,EACT;AAEA,EAAA,OAAO,KAAA;AACT;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/ui",
|
|
3
|
-
"version": "0.0.0-nightly-
|
|
3
|
+
"version": "0.0.0-nightly-20250815024739",
|
|
4
4
|
"backstage": {
|
|
5
5
|
"role": "web-library"
|
|
6
6
|
},
|
|
@@ -28,7 +28,6 @@
|
|
|
28
28
|
],
|
|
29
29
|
"scripts": {
|
|
30
30
|
"build": "yarn build:app && yarn build:css",
|
|
31
|
-
"build-storybook": "storybook build",
|
|
32
31
|
"build:app": "backstage-cli package build",
|
|
33
32
|
"build:css": "node scripts/build-css.mjs",
|
|
34
33
|
"build:css:watch": "node scripts/build-css.mjs --watch",
|
|
@@ -36,33 +35,22 @@
|
|
|
36
35
|
"lint": "backstage-cli package lint",
|
|
37
36
|
"prepack": "backstage-cli package prepack",
|
|
38
37
|
"postpack": "backstage-cli package postpack",
|
|
39
|
-
"start": "concurrently \"yarn build:css:watch\" \"yarn storybook\"",
|
|
40
|
-
"storybook": "storybook dev -p 6006",
|
|
41
38
|
"test": "backstage-cli package test"
|
|
42
39
|
},
|
|
43
40
|
"dependencies": {
|
|
44
41
|
"@base-ui-components/react": "1.0.0-alpha.7",
|
|
45
|
-
"@gsap/react": "^2.1.2",
|
|
46
42
|
"@remixicon/react": "^4.6.0",
|
|
43
|
+
"@storybook/test": "^8.6.12",
|
|
47
44
|
"@tanstack/react-table": "^8.21.3",
|
|
48
45
|
"clsx": "^2.1.1",
|
|
49
|
-
"gsap": "^3.13.0",
|
|
50
46
|
"react-aria-components": "^1.10.1"
|
|
51
47
|
},
|
|
52
48
|
"devDependencies": {
|
|
53
|
-
"@backstage/cli": "0.0.0-nightly-
|
|
54
|
-
"@storybook/addon-essentials": "^8.6.12",
|
|
55
|
-
"@storybook/addon-interactions": "^8.6.12",
|
|
56
|
-
"@storybook/addon-styling-webpack": "^1.0.1",
|
|
57
|
-
"@storybook/addon-webpack5-compiler-swc": "^3.0.0",
|
|
58
|
-
"@storybook/blocks": "^8.6.12",
|
|
49
|
+
"@backstage/cli": "0.0.0-nightly-20250815024739",
|
|
59
50
|
"@storybook/react": "^8.6.12",
|
|
60
|
-
"@storybook/react-webpack5": "^8.6.12",
|
|
61
|
-
"@storybook/test": "^8.6.12",
|
|
62
51
|
"@types/react": "^18.0.0",
|
|
63
52
|
"@types/react-dom": "^18.0.0",
|
|
64
53
|
"chalk": "^5.4.1",
|
|
65
|
-
"concurrently": "^9.2.0",
|
|
66
54
|
"eslint-plugin-storybook": "^0.12.0",
|
|
67
55
|
"glob": "^11.0.1",
|
|
68
56
|
"globals": "^15.11.0",
|