@backstage/ui 0.7.2-next.2 → 0.8.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 +29 -0
- package/css/styles.css +6411 -8180
- package/dist/components/Avatar/Avatar.esm.js +21 -7
- package/dist/components/Avatar/Avatar.esm.js.map +1 -1
- package/dist/components/Avatar/Avatar.module.css.esm.js +8 -0
- package/dist/components/Avatar/Avatar.module.css.esm.js.map +1 -0
- package/dist/components/Box/Box.esm.js +20 -23
- package/dist/components/Box/Box.esm.js.map +1 -1
- package/dist/components/Box/Box.module.css.esm.js +8 -0
- package/dist/components/Box/Box.module.css.esm.js.map +1 -0
- package/dist/components/Button/Button.esm.js +10 -19
- package/dist/components/Button/Button.esm.js.map +1 -1
- package/dist/components/Button/Button.module.css.esm.js +8 -0
- package/dist/components/Button/Button.module.css.esm.js.map +1 -0
- package/dist/components/ButtonIcon/ButtonIcon.esm.js +14 -12
- package/dist/components/ButtonIcon/ButtonIcon.esm.js.map +1 -1
- package/dist/components/ButtonIcon/ButtonIcon.module.css.esm.js +8 -0
- package/dist/components/ButtonIcon/ButtonIcon.module.css.esm.js.map +1 -0
- package/dist/components/ButtonLink/ButtonLink.esm.js +8 -13
- package/dist/components/ButtonLink/ButtonLink.esm.js.map +1 -1
- package/dist/components/Card/Card.esm.js +46 -28
- package/dist/components/Card/Card.esm.js.map +1 -1
- package/dist/components/Card/Card.module.css.esm.js +8 -0
- package/dist/components/Card/Card.module.css.esm.js.map +1 -0
- package/dist/components/Checkbox/Checkbox.esm.js +14 -49
- package/dist/components/Checkbox/Checkbox.esm.js.map +1 -1
- package/dist/components/Checkbox/Checkbox.module.css.esm.js +8 -0
- package/dist/components/Checkbox/Checkbox.module.css.esm.js.map +1 -0
- package/dist/components/Collapsible/Collapsible.esm.js +14 -9
- package/dist/components/Collapsible/Collapsible.esm.js.map +1 -1
- package/dist/components/Collapsible/Collapsible.module.css.esm.js +8 -0
- package/dist/components/Collapsible/Collapsible.module.css.esm.js.map +1 -0
- package/dist/components/Container/Container.esm.js +22 -25
- package/dist/components/Container/Container.esm.js.map +1 -1
- package/dist/components/Container/Container.module.css.esm.js +8 -0
- package/dist/components/Container/Container.module.css.esm.js.map +1 -0
- package/dist/components/Dialog/Dialog.esm.js +103 -0
- package/dist/components/Dialog/Dialog.esm.js.map +1 -0
- package/dist/components/Dialog/Dialog.module.css.esm.js +8 -0
- package/dist/components/Dialog/Dialog.module.css.esm.js.map +1 -0
- package/dist/components/FieldError/FieldError.esm.js +5 -2
- package/dist/components/FieldError/FieldError.esm.js.map +1 -1
- package/dist/components/FieldError/FieldError.module.css.esm.js +8 -0
- package/dist/components/FieldError/FieldError.module.css.esm.js.map +1 -0
- package/dist/components/FieldLabel/FieldLabel.esm.js +50 -13
- package/dist/components/FieldLabel/FieldLabel.esm.js.map +1 -1
- package/dist/components/FieldLabel/FieldLabel.module.css.esm.js +8 -0
- package/dist/components/FieldLabel/FieldLabel.module.css.esm.js.map +1 -0
- package/dist/components/Flex/Flex.esm.js +22 -18
- package/dist/components/Flex/Flex.esm.js.map +1 -1
- package/dist/components/Flex/Flex.module.css.esm.js +8 -0
- package/dist/components/Flex/Flex.module.css.esm.js.map +1 -0
- package/dist/components/Grid/Grid.esm.js +41 -29
- package/dist/components/Grid/Grid.esm.js.map +1 -1
- package/dist/components/Grid/Grid.module.css.esm.js +8 -0
- package/dist/components/Grid/Grid.module.css.esm.js.map +1 -0
- package/dist/components/Header/Header.esm.js +22 -11
- package/dist/components/Header/Header.esm.js.map +1 -1
- package/dist/components/Header/Header.module.css.esm.js +8 -0
- package/dist/components/Header/Header.module.css.esm.js.map +1 -0
- package/dist/components/Header/HeaderToolbar.esm.js +71 -7
- package/dist/components/Header/HeaderToolbar.esm.js.map +1 -1
- package/dist/components/HeaderPage/HeaderPage.esm.js +51 -31
- package/dist/components/HeaderPage/HeaderPage.esm.js.map +1 -1
- package/dist/components/HeaderPage/HeaderPage.module.css.esm.js +8 -0
- package/dist/components/HeaderPage/HeaderPage.module.css.esm.js.map +1 -0
- package/dist/components/Link/Link.esm.js +26 -15
- package/dist/components/Link/Link.esm.js.map +1 -1
- package/dist/components/Link/Link.module.css.esm.js +8 -0
- package/dist/components/Link/Link.module.css.esm.js.map +1 -0
- package/dist/components/Menu/Menu.esm.js +376 -118
- package/dist/components/Menu/Menu.esm.js.map +1 -1
- package/dist/components/Menu/Menu.module.css.esm.js +8 -0
- package/dist/components/Menu/Menu.module.css.esm.js.map +1 -0
- package/dist/components/Popover/Popover.module.css.esm.js +8 -0
- package/dist/components/Popover/Popover.module.css.esm.js.map +1 -0
- package/dist/components/RadioGroup/RadioGroup.esm.js +6 -5
- package/dist/components/RadioGroup/RadioGroup.esm.js.map +1 -1
- package/dist/components/RadioGroup/RadioGroup.module.css.esm.js +8 -0
- package/dist/components/RadioGroup/RadioGroup.module.css.esm.js.map +1 -0
- package/dist/components/SearchField/SearchField.esm.js +44 -23
- package/dist/components/SearchField/SearchField.esm.js.map +1 -1
- package/dist/components/SearchField/SearchField.module.css.esm.js +8 -0
- package/dist/components/SearchField/SearchField.module.css.esm.js.map +1 -0
- package/dist/components/Select/Select.esm.js +60 -25
- package/dist/components/Select/Select.esm.js.map +1 -1
- package/dist/components/Select/Select.module.css.esm.js +8 -0
- package/dist/components/Select/Select.module.css.esm.js.map +1 -0
- package/dist/components/Skeleton/Skeleton.esm.js +12 -4
- package/dist/components/Skeleton/Skeleton.esm.js.map +1 -1
- package/dist/components/Skeleton/Skeleton.module.css.esm.js +8 -0
- package/dist/components/Skeleton/Skeleton.module.css.esm.js.map +1 -0
- package/dist/components/Switch/Switch.esm.js +22 -6
- package/dist/components/Switch/Switch.esm.js.map +1 -1
- package/dist/components/Switch/Switch.module.css.esm.js +8 -0
- package/dist/components/Switch/Switch.module.css.esm.js.map +1 -0
- package/dist/components/Table/Table.module.css.esm.js +8 -0
- package/dist/components/Table/Table.module.css.esm.js.map +1 -0
- package/dist/components/Table/components/Cell.esm.js +44 -17
- package/dist/components/Table/components/Cell.esm.js.map +1 -1
- package/dist/components/Table/components/CellProfile.esm.js +71 -26
- package/dist/components/Table/components/CellProfile.esm.js.map +1 -1
- package/dist/components/Table/components/Column.esm.js +39 -9
- package/dist/components/Table/components/Column.esm.js.map +1 -1
- package/dist/components/Table/components/Row.esm.js +19 -11
- package/dist/components/Table/components/Row.esm.js.map +1 -1
- package/dist/components/Table/components/Table.esm.js +8 -3
- package/dist/components/Table/components/Table.esm.js.map +1 -1
- package/dist/components/Table/components/TableBody.esm.js +13 -2
- package/dist/components/Table/components/TableBody.esm.js.map +1 -1
- package/dist/components/Table/components/TableHeader.esm.js +20 -10
- package/dist/components/Table/components/TableHeader.esm.js.map +1 -1
- package/dist/components/TablePagination/TablePagination.esm.js +80 -63
- package/dist/components/TablePagination/TablePagination.esm.js.map +1 -1
- package/dist/components/TablePagination/TablePagination.module.css.esm.js +8 -0
- package/dist/components/TablePagination/TablePagination.module.css.esm.js.map +1 -0
- package/dist/components/Tabs/Tabs.esm.js +55 -31
- package/dist/components/Tabs/Tabs.esm.js.map +1 -1
- package/dist/components/Tabs/Tabs.module.css.esm.js +8 -0
- package/dist/components/Tabs/Tabs.module.css.esm.js.map +1 -0
- package/dist/components/Tabs/TabsIndicators.esm.js +14 -2
- package/dist/components/Tabs/TabsIndicators.esm.js.map +1 -1
- package/dist/components/TagGroup/TagGroup.esm.js +35 -19
- package/dist/components/TagGroup/TagGroup.esm.js.map +1 -1
- package/dist/components/TagGroup/TagGroup.module.css.esm.js +8 -0
- package/dist/components/TagGroup/TagGroup.module.css.esm.js.map +1 -0
- package/dist/components/Text/Text.esm.js +10 -19
- package/dist/components/Text/Text.esm.js.map +1 -1
- package/dist/components/Text/Text.module.css.esm.js +8 -0
- package/dist/components/Text/Text.module.css.esm.js.map +1 -0
- package/dist/components/TextField/TextField.esm.js +29 -16
- package/dist/components/TextField/TextField.esm.js.map +1 -1
- package/dist/components/TextField/TextField.module.css.esm.js +8 -0
- package/dist/components/TextField/TextField.module.css.esm.js.map +1 -0
- package/dist/components/Tooltip/Tooltip.esm.js +19 -7
- package/dist/components/Tooltip/Tooltip.esm.js.map +1 -1
- package/dist/components/Tooltip/Tooltip.module.css.esm.js +8 -0
- package/dist/components/Tooltip/Tooltip.module.css.esm.js.map +1 -0
- package/dist/hooks/useStyles.esm.js +65 -9
- package/dist/hooks/useStyles.esm.js.map +1 -1
- package/dist/index.d.ts +148 -433
- package/dist/index.esm.js +1 -9
- package/dist/index.esm.js.map +1 -1
- package/dist/node_modules_dist/style-inject/dist/style-inject.es.esm.js +29 -0
- package/dist/node_modules_dist/style-inject/dist/style-inject.es.esm.js.map +1 -0
- package/dist/utils/componentDefinitions.esm.js +113 -16
- package/dist/utils/componentDefinitions.esm.js.map +1 -1
- package/dist/utils/utilityClassMap.esm.js +189 -0
- package/dist/utils/utilityClassMap.esm.js.map +1 -0
- package/package.json +3 -3
- package/dist/components/Box/Box.props.esm.js +0 -7
- package/dist/components/Box/Box.props.esm.js.map +0 -1
- package/dist/components/Flex/Flex.props.esm.js +0 -31
- package/dist/components/Flex/Flex.props.esm.js.map +0 -1
- package/dist/components/Grid/Grid.props.esm.js +0 -58
- package/dist/components/Grid/Grid.props.esm.js.map +0 -1
- package/dist/components/Icon/Icon.esm.js +0 -29
- package/dist/components/Icon/Icon.esm.js.map +0 -1
- package/dist/components/Icon/context.esm.js +0 -10
- package/dist/components/Icon/context.esm.js.map +0 -1
- package/dist/components/Icon/icons.esm.js +0 -63
- package/dist/components/Icon/icons.esm.js.map +0 -1
- package/dist/components/Icon/provider.esm.js +0 -12
- package/dist/components/Icon/provider.esm.js.map +0 -1
- package/dist/components/ScrollArea/ScrollArea.esm.js +0 -63
- package/dist/components/ScrollArea/ScrollArea.esm.js.map +0 -1
- package/dist/props/display.props.esm.js +0 -12
- package/dist/props/display.props.esm.js.map +0 -1
- package/dist/props/gap-props.esm.js +0 -15
- package/dist/props/gap-props.esm.js.map +0 -1
- package/dist/props/height.props.esm.js +0 -23
- package/dist/props/height.props.esm.js.map +0 -1
- package/dist/props/margin.props.esm.js +0 -54
- package/dist/props/margin.props.esm.js.map +0 -1
- package/dist/props/padding.props.esm.js +0 -54
- package/dist/props/padding.props.esm.js.map +0 -1
- package/dist/props/position.props.esm.js +0 -18
- package/dist/props/position.props.esm.js.map +0 -1
- package/dist/props/prop-def.esm.js +0 -4
- package/dist/props/prop-def.esm.js.map +0 -1
- package/dist/props/spacing.props.esm.js +0 -28
- package/dist/props/spacing.props.esm.js.map +0 -1
- package/dist/props/width.props.esm.js +0 -23
- package/dist/props/width.props.esm.js.map +0 -1
- package/dist/utils/extractProps.esm.js +0 -49
- package/dist/utils/extractProps.esm.js.map +0 -1
|
@@ -5,28 +5,35 @@ import clsx from 'clsx';
|
|
|
5
5
|
import { useStyles } from '../../hooks/useStyles.esm.js';
|
|
6
6
|
import { isExternalLink } from '../../utils/isExternalLink.esm.js';
|
|
7
7
|
import { useNavigate, useHref } from 'react-router-dom';
|
|
8
|
+
import styles from './TagGroup.module.css.esm.js';
|
|
8
9
|
|
|
9
|
-
const TagGroup = ({
|
|
10
|
-
|
|
11
|
-
children,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}) => {
|
|
15
|
-
const { classNames } = useStyles("TagGroup");
|
|
16
|
-
return /* @__PURE__ */ jsx(TagGroup$1, { className: classNames.group, ...props, children: /* @__PURE__ */ jsx(
|
|
17
|
-
TagList,
|
|
10
|
+
const TagGroup = (props) => {
|
|
11
|
+
const { classNames, cleanedProps } = useStyles("TagGroup", props);
|
|
12
|
+
const { items, children, renderEmptyState, ...rest } = cleanedProps;
|
|
13
|
+
return /* @__PURE__ */ jsx(
|
|
14
|
+
TagGroup$1,
|
|
18
15
|
{
|
|
19
|
-
className: classNames.
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
16
|
+
className: clsx(classNames.group, styles[classNames.group]),
|
|
17
|
+
...rest,
|
|
18
|
+
children: /* @__PURE__ */ jsx(
|
|
19
|
+
TagList,
|
|
20
|
+
{
|
|
21
|
+
className: clsx(classNames.list, styles[classNames.list]),
|
|
22
|
+
items,
|
|
23
|
+
renderEmptyState,
|
|
24
|
+
children
|
|
25
|
+
}
|
|
26
|
+
)
|
|
23
27
|
}
|
|
24
|
-
)
|
|
28
|
+
);
|
|
25
29
|
};
|
|
26
30
|
const Tag = (props) => {
|
|
27
|
-
const {
|
|
31
|
+
const { classNames, cleanedProps } = useStyles("TagGroup", {
|
|
32
|
+
size: "small",
|
|
33
|
+
...props
|
|
34
|
+
});
|
|
35
|
+
const { children, className, icon, size, href, ...rest } = cleanedProps;
|
|
28
36
|
const textValue = typeof children === "string" ? children : void 0;
|
|
29
|
-
const { classNames } = useStyles("TagGroup");
|
|
30
37
|
const navigate = useNavigate();
|
|
31
38
|
const isLink = href !== void 0;
|
|
32
39
|
const isExternal = isExternalLink(href);
|
|
@@ -34,17 +41,26 @@ const Tag = (props) => {
|
|
|
34
41
|
Tag$1,
|
|
35
42
|
{
|
|
36
43
|
textValue,
|
|
37
|
-
className: clsx(classNames.tag, className),
|
|
44
|
+
className: clsx(classNames.tag, styles[classNames.tag], className),
|
|
38
45
|
"data-size": size,
|
|
39
46
|
href,
|
|
40
47
|
...rest,
|
|
41
48
|
children: ({ allowsRemoving }) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
42
|
-
icon && /* @__PURE__ */ jsx(
|
|
49
|
+
icon && /* @__PURE__ */ jsx(
|
|
50
|
+
"span",
|
|
51
|
+
{
|
|
52
|
+
className: clsx(classNames.tagIcon, styles[classNames.tagIcon]),
|
|
53
|
+
children: icon
|
|
54
|
+
}
|
|
55
|
+
),
|
|
43
56
|
children,
|
|
44
57
|
allowsRemoving && /* @__PURE__ */ jsx(
|
|
45
58
|
Button,
|
|
46
59
|
{
|
|
47
|
-
className:
|
|
60
|
+
className: clsx(
|
|
61
|
+
classNames.tagRemoveButton,
|
|
62
|
+
styles[classNames.tagRemoveButton]
|
|
63
|
+
),
|
|
48
64
|
slot: "remove",
|
|
49
65
|
children: /* @__PURE__ */ jsx(RiCloseCircleLine, { size: 16 })
|
|
50
66
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TagGroup.esm.js","sources":["../../../src/components/TagGroup/TagGroup.tsx"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { TagProps, TagGroupProps } from './types';\nimport {\n TagGroup as ReactAriaTagGroup,\n TagList as ReactAriaTagList,\n Tag as ReactAriaTag,\n Button as ReactAriaButton,\n RouterProvider,\n} from 'react-aria-components';\nimport type { ReactNode } from 'react';\nimport { RiCloseCircleLine } from '@remixicon/react';\nimport clsx from 'clsx';\nimport { useStyles } from '../../hooks/useStyles';\nimport { isExternalLink } from '../../utils/isExternalLink';\nimport { useNavigate, useHref } from 'react-router-dom';\n\n/**\n * A component that renders a list of tags.\n *\n * @public\n */\nexport const TagGroup = <T extends object>(
|
|
1
|
+
{"version":3,"file":"TagGroup.esm.js","sources":["../../../src/components/TagGroup/TagGroup.tsx"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { TagProps, TagGroupProps } from './types';\nimport {\n TagGroup as ReactAriaTagGroup,\n TagList as ReactAriaTagList,\n Tag as ReactAriaTag,\n Button as ReactAriaButton,\n RouterProvider,\n} from 'react-aria-components';\nimport type { ReactNode } from 'react';\nimport { RiCloseCircleLine } from '@remixicon/react';\nimport clsx from 'clsx';\nimport { useStyles } from '../../hooks/useStyles';\nimport { isExternalLink } from '../../utils/isExternalLink';\nimport { useNavigate, useHref } from 'react-router-dom';\nimport styles from './TagGroup.module.css';\n\n/**\n * A component that renders a list of tags.\n *\n * @public\n */\nexport const TagGroup = <T extends object>(props: TagGroupProps<T>) => {\n const { classNames, cleanedProps } = useStyles('TagGroup', props);\n const { items, children, renderEmptyState, ...rest } = cleanedProps;\n\n return (\n <ReactAriaTagGroup\n className={clsx(classNames.group, styles[classNames.group])}\n {...rest}\n >\n <ReactAriaTagList\n className={clsx(classNames.list, styles[classNames.list])}\n items={items}\n renderEmptyState={renderEmptyState}\n >\n {children}\n </ReactAriaTagList>\n </ReactAriaTagGroup>\n );\n};\n\n/**\n * A component that renders a tag.\n *\n * @public\n */\nexport const Tag = (props: TagProps) => {\n const { classNames, cleanedProps } = useStyles('TagGroup', {\n size: 'small',\n ...props,\n });\n const { children, className, icon, size, href, ...rest } = cleanedProps;\n const textValue = typeof children === 'string' ? children : undefined;\n const navigate = useNavigate();\n const isLink = href !== undefined;\n const isExternal = isExternalLink(href);\n\n const content = (\n <ReactAriaTag\n textValue={textValue}\n className={clsx(classNames.tag, styles[classNames.tag], className)}\n data-size={size}\n href={href}\n {...rest}\n >\n {({ allowsRemoving }) => (\n <>\n {icon && (\n <span\n className={clsx(classNames.tagIcon, styles[classNames.tagIcon])}\n >\n {icon}\n </span>\n )}\n {children as ReactNode}\n {allowsRemoving && (\n <ReactAriaButton\n className={clsx(\n classNames.tagRemoveButton,\n styles[classNames.tagRemoveButton],\n )}\n slot=\"remove\"\n >\n <RiCloseCircleLine size={16} />\n </ReactAriaButton>\n )}\n </>\n )}\n </ReactAriaTag>\n );\n\n if (isLink && !isExternal) {\n return (\n <RouterProvider navigate={navigate} useHref={useHref}>\n {content}\n </RouterProvider>\n );\n }\n\n return content;\n};\n"],"names":["ReactAriaTagGroup","ReactAriaTagList","ReactAriaTag","ReactAriaButton"],"mappings":";;;;;;;;;AAqCO,MAAM,QAAA,GAAW,CAAmB,KAAA,KAA4B;AACrE,EAAA,MAAM,EAAE,UAAA,EAAY,YAAA,EAAa,GAAI,SAAA,CAAU,YAAY,KAAK,CAAA;AAChE,EAAA,MAAM,EAAE,KAAA,EAAO,QAAA,EAAU,gBAAA,EAAkB,GAAG,MAAK,GAAI,YAAA;AAEvD,EAAA,uBACE,GAAA;AAAA,IAACA,UAAA;AAAA,IAAA;AAAA,MACC,WAAW,IAAA,CAAK,UAAA,CAAW,OAAO,MAAA,CAAO,UAAA,CAAW,KAAK,CAAC,CAAA;AAAA,MACzD,GAAG,IAAA;AAAA,MAEJ,QAAA,kBAAA,GAAA;AAAA,QAACC,OAAA;AAAA,QAAA;AAAA,UACC,WAAW,IAAA,CAAK,UAAA,CAAW,MAAM,MAAA,CAAO,UAAA,CAAW,IAAI,CAAC,CAAA;AAAA,UACxD,KAAA;AAAA,UACA,gBAAA;AAAA,UAEC;AAAA;AAAA;AACH;AAAA,GACF;AAEJ;AAOO,MAAM,GAAA,GAAM,CAAC,KAAA,KAAoB;AACtC,EAAA,MAAM,EAAE,UAAA,EAAY,YAAA,EAAa,GAAI,UAAU,UAAA,EAAY;AAAA,IACzD,IAAA,EAAM,OAAA;AAAA,IACN,GAAG;AAAA,GACJ,CAAA;AACD,EAAA,MAAM,EAAE,UAAU,SAAA,EAAW,IAAA,EAAM,MAAM,IAAA,EAAM,GAAG,MAAK,GAAI,YAAA;AAC3D,EAAA,MAAM,SAAA,GAAY,OAAO,QAAA,KAAa,QAAA,GAAW,QAAA,GAAW,MAAA;AAC5D,EAAA,MAAM,WAAW,WAAA,EAAY;AAC7B,EAAA,MAAM,SAAS,IAAA,KAAS,MAAA;AACxB,EAAA,MA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*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n@layer components {\n .TagGroup-module_bui-TagList__3GmM2 {\n display: flex;\n flex-wrap: wrap;\n gap: var(--bui-space-2);\n }\n\n .TagGroup-module_bui-Tag__29R-y {\n color: var(--bui-fg-primary);\n background-color: var(--bui-gray-2);\n border-radius: var(--bui-radius-2);\n display: flex;\n align-items: center;\n justify-content: center;\n font-weight: var(--bui-font-weight-regular);\n gap: var(--bui-space-1);\n transition-property: background-color, box-shadow, color;\n transition-duration: 0.2s;\n transition-timing-function: ease-in-out;\n box-sizing: border-box;\n }\n\n .TagGroup-module_bui-Tag__29R-y[data-size='small'] {\n height: 26px;\n padding: 0 var(--bui-space-2);\n font-size: var(--bui-font-size-1);\n }\n\n .TagGroup-module_bui-Tag__29R-y[data-size='medium'] {\n height: 32px;\n padding: 0 var(--bui-space-2);\n font-size: var(--bui-font-size-2);\n }\n\n .TagGroup-module_bui-Tag__29R-y[data-hovered] {\n background-color: var(--bui-gray-3);\n cursor: pointer;\n }\n\n .TagGroup-module_bui-Tag__29R-y[data-focus-visible] {\n outline: 2px solid var(--bui-ring);\n outline-offset: 1px;\n }\n\n .TagGroup-module_bui-Tag__29R-y[data-selected] {\n box-shadow: inset 0 0 0 1px var(--bui-gray-8);\n }\n\n .TagGroup-module_bui-Tag__29R-y[data-disabled] {\n color: var(--bui-fg-disabled);\n cursor: not-allowed;\n }\n\n .TagGroup-module_bui-TagRemoveButton__2uLh- {\n background-color: transparent;\n border: none;\n cursor: pointer;\n color: var(--bui-fg-primary);\n padding: 0;\n margin: 0;\n width: 1rem;\n height: 1rem;\n }\n\n .TagGroup-module_bui-TagIcon__3Hl1U {\n display: flex;\n align-items: center;\n justify-content: center;\n transition: color 0.2s ease-in-out;\n\n svg {\n width: 1rem;\n height: 1rem;\n }\n }\n}\n";
|
|
4
|
+
var styles = {"bui-TagList":"TagGroup-module_bui-TagList__3GmM2","bui-Tag":"TagGroup-module_bui-Tag__29R-y","bui-TagRemoveButton":"TagGroup-module_bui-TagRemoveButton__2uLh-","bui-TagIcon":"TagGroup-module_bui-TagIcon__3Hl1U"};
|
|
5
|
+
styleInject(css_248z);
|
|
6
|
+
|
|
7
|
+
export { styles as default };
|
|
8
|
+
//# sourceMappingURL=TagGroup.module.css.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TagGroup.module.css.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -2,32 +2,23 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import { forwardRef } from 'react';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
import { useStyles } from '../../hooks/useStyles.esm.js';
|
|
5
|
+
import stylesText from './Text.module.css.esm.js';
|
|
5
6
|
|
|
6
|
-
function TextComponent({
|
|
7
|
-
as
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
style,
|
|
14
|
-
...restProps
|
|
15
|
-
}, ref) {
|
|
16
|
-
const Component = as || "span";
|
|
17
|
-
const { classNames, dataAttributes } = useStyles("Text", {
|
|
18
|
-
variant,
|
|
19
|
-
weight,
|
|
20
|
-
color
|
|
7
|
+
function TextComponent(props, ref) {
|
|
8
|
+
const Component = props.as || "span";
|
|
9
|
+
const { classNames, dataAttributes, cleanedProps } = useStyles("Text", {
|
|
10
|
+
variant: "body-medium",
|
|
11
|
+
weight: "regular",
|
|
12
|
+
color: "primary",
|
|
13
|
+
...props
|
|
21
14
|
});
|
|
15
|
+
const { className, ...restProps } = cleanedProps;
|
|
22
16
|
return /* @__PURE__ */ jsx(
|
|
23
17
|
Component,
|
|
24
18
|
{
|
|
25
19
|
ref,
|
|
26
|
-
className: clsx(classNames.root, className),
|
|
27
|
-
"data-truncate": truncate,
|
|
28
|
-
"data-as": as,
|
|
20
|
+
className: clsx(classNames.root, stylesText[classNames.root], className),
|
|
29
21
|
...dataAttributes,
|
|
30
|
-
style,
|
|
31
22
|
...restProps
|
|
32
23
|
}
|
|
33
24
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.esm.js","sources":["../../../src/components/Text/Text.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 clsx from 'clsx';\nimport type { ElementType } from 'react';\nimport type { TextProps } from './types';\nimport { useStyles } from '../../hooks/useStyles';\n\nfunction TextComponent<T extends ElementType = 'span'>(\n
|
|
1
|
+
{"version":3,"file":"Text.esm.js","sources":["../../../src/components/Text/Text.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 clsx from 'clsx';\nimport type { ElementType } from 'react';\nimport type { TextProps } from './types';\nimport { useStyles } from '../../hooks/useStyles';\nimport styles from './Text.module.css';\n\nfunction TextComponent<T extends ElementType = 'span'>(\n props: TextProps<T>,\n ref: React.Ref<any>,\n) {\n const Component = props.as || 'span';\n\n const { classNames, dataAttributes, cleanedProps } = useStyles('Text', {\n variant: 'body-medium',\n weight: 'regular',\n color: 'primary',\n ...props,\n });\n\n const { className, ...restProps } = cleanedProps;\n\n return (\n <Component\n ref={ref}\n className={clsx(classNames.root, styles[classNames.root], className)}\n {...dataAttributes}\n {...restProps}\n />\n );\n}\n\nTextComponent.displayName = 'Text';\n\n/** @public */\nexport const Text = forwardRef(TextComponent) as {\n <T extends ElementType = 'p'>(\n props: TextProps<T> & { ref?: React.ComponentPropsWithRef<T>['ref'] },\n ): React.ReactElement<TextProps<T>, T>;\n displayName: string;\n};\n\nText.displayName = 'Text';\n"],"names":["styles"],"mappings":";;;;;;AAuBA,SAAS,aAAA,CACP,OACA,GAAA,EACA;AACA,EAAA,MAAM,SAAA,GAAY,MAAM,EAAA,IAAM,MAAA;AAE9B,EAAA,MAAM,EAAE,UAAA,EAAY,cAAA,EAAgB,YAAA,EAAa,GAAI,UAAU,MAAA,EAAQ;AAAA,IACrE,OAAA,EAAS,aAAA;AAAA,IACT,MAAA,EAAQ,SAAA;AAAA,IACR,KAAA,EAAO,SAAA;AAAA,IACP,GAAG;AAAA,GACJ,CAAA;AAED,EAAA,MAAM,EAAE,SAAA,EAAW,GAAG,SAAA,EAAU,GAAI,YAAA;AAEpC,EAAA,uBACE,GAAA;AAAA,IAAC,SAAA;AAAA,IAAA;AAAA,MACC,GAAA;AAAA,MACA,SAAA,EAAW,KAAK,UAAA,CAAW,IAAA,EAAMA,WAAO,UAAA,CAAW,IAAI,GAAG,SAAS,CAAA;AAAA,MAClE,GAAG,cAAA;AAAA,MACH,GAAG;AAAA;AAAA,GACN;AAEJ;AAEA,aAAA,CAAc,WAAA,GAAc,MAAA;AAGrB,MAAM,IAAA,GAAO,WAAW,aAAa;AAO5C,IAAA,CAAK,WAAA,GAAc,MAAA;;;;"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import styleInject from '../../node_modules_dist/style-inject/dist/style-inject.es.esm.js';
|
|
2
|
+
|
|
3
|
+
var css_248z = "/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n@layer components {\n .Text-module_bui-Text__7NvCl {\n font-family: var(--bui-font-regular);\n padding: 0;\n margin: 0;\n }\n\n .Text-module_bui-Text__7NvCl[data-variant='title-large'] {\n font-size: var(--bui-font-size-8);\n line-height: 140%;\n }\n\n .Text-module_bui-Text__7NvCl[data-variant='title-medium'] {\n font-size: var(--bui-font-size-7);\n line-height: 140%;\n }\n\n .Text-module_bui-Text__7NvCl[data-variant='title-small'] {\n font-size: var(--bui-font-size-6);\n line-height: 140%;\n }\n\n .Text-module_bui-Text__7NvCl[data-variant='title-x-small'] {\n font-size: var(--bui-font-size-5);\n line-height: 140%;\n }\n\n .Text-module_bui-Text__7NvCl[data-variant='body-large'] {\n font-size: var(--bui-font-size-4);\n line-height: 140%;\n }\n\n .Text-module_bui-Text__7NvCl[data-variant='body-medium'] {\n font-size: var(--bui-font-size-3);\n line-height: 140%;\n }\n\n .Text-module_bui-Text__7NvCl[data-variant='body-small'] {\n font-size: var(--bui-font-size-2);\n line-height: 140%;\n }\n\n .Text-module_bui-Text__7NvCl[data-variant='body-x-small'] {\n font-size: var(--bui-font-size-1);\n line-height: 140%;\n }\n\n .Text-module_bui-Text__7NvCl[data-weight='regular'] {\n font-weight: var(--bui-font-weight-regular);\n }\n\n .Text-module_bui-Text__7NvCl[data-weight='bold'] {\n font-weight: var(--bui-font-weight-bold);\n }\n\n .Text-module_bui-Text__7NvCl[data-color='primary'] {\n color: var(--bui-fg-primary);\n }\n\n .Text-module_bui-Text__7NvCl[data-color='secondary'] {\n color: var(--bui-fg-secondary);\n }\n\n .Text-module_bui-Text__7NvCl[data-color='danger'] {\n color: var(--bui-fg-danger);\n }\n\n .Text-module_bui-Text__7NvCl[data-color='warning'] {\n color: var(--bui-fg-warning);\n }\n\n .Text-module_bui-Text__7NvCl[data-color='success'] {\n color: var(--bui-fg-success);\n }\n\n .Text-module_bui-Text__7NvCl[data-truncate] {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .Text-module_bui-Text__7NvCl[data-as='span'],\n .Text-module_bui-Text__7NvCl[data-as='label'],\n .Text-module_bui-Text__7NvCl[data-as='strong'],\n .Text-module_bui-Text__7NvCl[data-as='em'],\n .Text-module_bui-Text__7NvCl[data-as='small'] {\n display: inline-block;\n }\n}\n";
|
|
4
|
+
var stylesText = {"bui-Text":"Text-module_bui-Text__7NvCl"};
|
|
5
|
+
styleInject(css_248z);
|
|
6
|
+
|
|
7
|
+
export { stylesText as default };
|
|
8
|
+
//# sourceMappingURL=Text.module.css.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Text.module.css.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -5,21 +5,14 @@ import clsx from 'clsx';
|
|
|
5
5
|
import { FieldLabel } from '../FieldLabel/FieldLabel.esm.js';
|
|
6
6
|
import { FieldError } from '../FieldError/FieldError.esm.js';
|
|
7
7
|
import { useStyles } from '../../hooks/useStyles.esm.js';
|
|
8
|
+
import stylesTextField from './TextField.module.css.esm.js';
|
|
8
9
|
|
|
9
10
|
const TextField = forwardRef(
|
|
10
11
|
(props, ref) => {
|
|
11
12
|
const {
|
|
12
|
-
className,
|
|
13
|
-
icon,
|
|
14
|
-
size = "small",
|
|
15
13
|
label,
|
|
16
|
-
secondaryLabel,
|
|
17
|
-
description,
|
|
18
|
-
isRequired,
|
|
19
14
|
"aria-label": ariaLabel,
|
|
20
|
-
"aria-labelledby": ariaLabelledBy
|
|
21
|
-
placeholder,
|
|
22
|
-
...rest
|
|
15
|
+
"aria-labelledby": ariaLabelledBy
|
|
23
16
|
} = props;
|
|
24
17
|
useEffect(() => {
|
|
25
18
|
if (!label && !ariaLabel && !ariaLabelledBy) {
|
|
@@ -28,17 +21,31 @@ const TextField = forwardRef(
|
|
|
28
21
|
);
|
|
29
22
|
}
|
|
30
23
|
}, [label, ariaLabel, ariaLabelledBy]);
|
|
31
|
-
const { classNames, dataAttributes } = useStyles(
|
|
32
|
-
|
|
33
|
-
|
|
24
|
+
const { classNames, dataAttributes, style, cleanedProps } = useStyles(
|
|
25
|
+
"TextField",
|
|
26
|
+
{
|
|
27
|
+
size: "small",
|
|
28
|
+
...props
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
const {
|
|
32
|
+
className,
|
|
33
|
+
description,
|
|
34
|
+
icon,
|
|
35
|
+
isRequired,
|
|
36
|
+
secondaryLabel,
|
|
37
|
+
placeholder,
|
|
38
|
+
...rest
|
|
39
|
+
} = cleanedProps;
|
|
34
40
|
const secondaryLabelText = secondaryLabel || (isRequired ? "Required" : null);
|
|
35
41
|
return /* @__PURE__ */ jsxs(
|
|
36
42
|
TextField$1,
|
|
37
43
|
{
|
|
38
|
-
className: clsx(classNames.root, className),
|
|
44
|
+
className: clsx(classNames.root, stylesTextField[classNames.root], className),
|
|
39
45
|
...dataAttributes,
|
|
40
46
|
"aria-label": ariaLabel,
|
|
41
47
|
"aria-labelledby": ariaLabelledBy,
|
|
48
|
+
style,
|
|
42
49
|
...rest,
|
|
43
50
|
ref,
|
|
44
51
|
children: [
|
|
@@ -53,13 +60,19 @@ const TextField = forwardRef(
|
|
|
53
60
|
/* @__PURE__ */ jsxs(
|
|
54
61
|
"div",
|
|
55
62
|
{
|
|
56
|
-
className:
|
|
63
|
+
className: clsx(
|
|
64
|
+
classNames.inputWrapper,
|
|
65
|
+
stylesTextField[classNames.inputWrapper]
|
|
66
|
+
),
|
|
57
67
|
"data-size": dataAttributes["data-size"],
|
|
58
68
|
children: [
|
|
59
69
|
icon && /* @__PURE__ */ jsx(
|
|
60
70
|
"div",
|
|
61
71
|
{
|
|
62
|
-
className:
|
|
72
|
+
className: clsx(
|
|
73
|
+
classNames.inputIcon,
|
|
74
|
+
stylesTextField[classNames.inputIcon]
|
|
75
|
+
),
|
|
63
76
|
"data-size": dataAttributes["data-size"],
|
|
64
77
|
"aria-hidden": "true",
|
|
65
78
|
children: icon
|
|
@@ -68,7 +81,7 @@ const TextField = forwardRef(
|
|
|
68
81
|
/* @__PURE__ */ jsx(
|
|
69
82
|
Input,
|
|
70
83
|
{
|
|
71
|
-
className: classNames.input,
|
|
84
|
+
className: clsx(classNames.input, stylesTextField[classNames.input]),
|
|
72
85
|
...icon && { "data-icon": true },
|
|
73
86
|
placeholder
|
|
74
87
|
}
|
|
@@ -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';\
|
|
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';\nimport type { TextFieldProps } from './types';\nimport { useStyles } from '../../hooks/useStyles';\nimport styles from './TextField.module.css';\n\n/** @public */\nexport const TextField = forwardRef<HTMLDivElement, TextFieldProps>(\n (props, ref) => {\n const {\n label,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n } = props;\n\n useEffect(() => {\n if (!label && !ariaLabel && !ariaLabelledBy) {\n console.warn(\n 'TextField requires either a visible label, aria-label, or aria-labelledby for accessibility',\n );\n }\n }, [label, ariaLabel, ariaLabelledBy]);\n\n const { classNames, dataAttributes, style, cleanedProps } = useStyles(\n 'TextField',\n {\n size: 'small',\n ...props,\n },\n );\n\n const {\n className,\n description,\n icon,\n isRequired,\n secondaryLabel,\n placeholder,\n ...rest\n } = cleanedProps;\n\n // If a secondary label is provided, use it. Otherwise, use 'Required' if the field is required.\n const secondaryLabelText =\n secondaryLabel || (isRequired ? 'Required' : null);\n\n return (\n <AriaTextField\n className={clsx(classNames.root, styles[classNames.root], className)}\n {...dataAttributes}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n style={style}\n {...rest}\n ref={ref}\n >\n <FieldLabel\n label={label}\n secondaryLabel={secondaryLabelText}\n description={description}\n />\n <div\n className={clsx(\n classNames.inputWrapper,\n styles[classNames.inputWrapper],\n )}\n data-size={dataAttributes['data-size']}\n >\n {icon && (\n <div\n className={clsx(\n classNames.inputIcon,\n styles[classNames.inputIcon],\n )}\n data-size={dataAttributes['data-size']}\n aria-hidden=\"true\"\n >\n {icon}\n </div>\n )}\n <Input\n className={clsx(classNames.input, styles[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","styles"],"mappings":";;;;;;;;;AA0BO,MAAM,SAAA,GAAY,UAAA;AAAA,EACvB,CAAC,OAAO,GAAA,KAAQ;AACd,IAAA,MAAM;AAAA,MACJ,KAAA;AAAA,MACA,YAAA,EAAc,SAAA;AAAA,MACd,iBAAA,EAAmB;AAAA,KACrB,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,EAAgB,KAAA,EAAO,cAAa,GAAI,SAAA;AAAA,MAC1D,WAAA;AAAA,MACA;AAAA,QACE,IAAA,EAAM,OAAA;AAAA,QACN,GAAG;AAAA;AACL,KACF;AAEA,IAAA,MAAM;AAAA,MACJ,SAAA;AAAA,MACA,WAAA;AAAA,MACA,IAAA;AAAA,MACA,UAAA;AAAA,MACA,cAAA;AAAA,MACA,WAAA;AAAA,MACA,GAAG;AAAA,KACL,GAAI,YAAA;AAGJ,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,KAAK,UAAA,CAAW,IAAA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|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import styleInject from '../../node_modules_dist/style-inject/dist/style-inject.es.esm.js';
|
|
2
|
+
|
|
3
|
+
var css_248z = "/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n@layer components {\n .TextField-module_bui-TextField__1KBy4 {\n display: flex;\n flex-direction: column;\n font-family: var(--bui-font-regular);\n width: 100%;\n flex-shrink: 0;\n }\n\n .TextField-module_bui-InputWrapper__25yD_ {\n position: relative;\n\n &[data-size='small'] .TextField-module_bui-Input__1Uojs {\n height: 2rem;\n }\n\n &[data-size='medium'] .TextField-module_bui-Input__1Uojs {\n height: 2.5rem;\n }\n\n &[data-size='small'] .TextField-module_bui-Input__1Uojs[data-icon] {\n padding-left: var(--bui-space-8);\n }\n\n &[data-size='medium'] .TextField-module_bui-Input__1Uojs[data-icon] {\n padding-left: var(--bui-space-9);\n }\n }\n\n .TextField-module_bui-InputIcon__2KDAe {\n position: absolute;\n left: var(--bui-space-3);\n top: 50%;\n transform: translateY(-50%);\n margin-right: var(--bui-space-1);\n color: var(--bui-fg-primary);\n flex-shrink: 0;\n pointer-events: none;\n /* To animate the icon when the input is collapsed */\n transition: left 0.2s ease-in-out;\n\n &[data-size='small'],\n &[data-size='small'] svg {\n width: 1rem;\n height: 1rem;\n }\n\n &[data-size='medium'],\n &[data-size='medium'] svg {\n width: 1.25rem;\n height: 1.25rem;\n }\n }\n\n .TextField-module_bui-Input__1Uojs {\n display: flex;\n align-items: center;\n padding: 0 var(--bui-space-3);\n border-radius: var(--bui-radius-2);\n border: 1px solid var(--bui-border);\n background-color: var(--bui-bg-surface-1);\n font-size: var(--bui-font-size-3);\n font-family: var(--bui-font-regular);\n font-weight: var(--bui-font-weight-regular);\n color: var(--bui-fg-primary);\n transition: border-color 0.2s ease-in-out, outline-color 0.2s ease-in-out;\n width: 100%;\n height: 100%;\n cursor: inherit;\n\n &::-webkit-search-cancel-button,\n &::-webkit-search-decoration {\n -webkit-appearance: none;\n }\n\n &::placeholder {\n color: var(--bui-fg-secondary);\n }\n\n &[data-focused] {\n outline-color: var(--bui-border-pressed);\n outline-width: 0px;\n }\n\n &[data-hovered] {\n border-color: var(--bui-border-hover);\n }\n\n &[data-focused] {\n border-color: var(--bui-border-pressed);\n outline-width: 0px;\n }\n\n &[data-invalid] {\n border-color: var(--bui-fg-danger);\n }\n\n &[data-disabled] {\n opacity: 0.5;\n cursor: not-allowed;\n border: 1px solid var(--bui-border-disabled);\n }\n }\n}\n";
|
|
4
|
+
var stylesTextField = {"bui-TextField":"TextField-module_bui-TextField__1KBy4","bui-InputWrapper":"TextField-module_bui-InputWrapper__25yD_","bui-Input":"TextField-module_bui-Input__1Uojs","bui-InputIcon":"TextField-module_bui-InputIcon__2KDAe"};
|
|
5
|
+
styleInject(css_248z);
|
|
6
|
+
|
|
7
|
+
export { stylesTextField as default };
|
|
8
|
+
//# sourceMappingURL=TextField.module.css.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextField.module.css.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -3,25 +3,37 @@ import { forwardRef } from 'react';
|
|
|
3
3
|
import { Tooltip as Tooltip$1, OverlayArrow, TooltipTrigger as TooltipTrigger$1 } from 'react-aria-components';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import { useStyles } from '../../hooks/useStyles.esm.js';
|
|
6
|
+
import styles from './Tooltip.module.css.esm.js';
|
|
6
7
|
|
|
7
8
|
const TooltipTrigger = (props) => {
|
|
8
9
|
const { delay = 600 } = props;
|
|
9
10
|
return /* @__PURE__ */ jsx(TooltipTrigger$1, { delay, ...props });
|
|
10
11
|
};
|
|
11
12
|
const Tooltip = forwardRef(
|
|
12
|
-
(
|
|
13
|
-
const { classNames } = useStyles("Tooltip");
|
|
13
|
+
(props, ref) => {
|
|
14
|
+
const { classNames, cleanedProps } = useStyles("Tooltip", props);
|
|
15
|
+
const { className, children, ...rest } = cleanedProps;
|
|
14
16
|
return /* @__PURE__ */ jsxs(
|
|
15
17
|
Tooltip$1,
|
|
16
18
|
{
|
|
17
|
-
className: clsx(
|
|
19
|
+
className: clsx(
|
|
20
|
+
classNames.tooltip,
|
|
21
|
+
styles[classNames.tooltip],
|
|
22
|
+
className
|
|
23
|
+
),
|
|
18
24
|
...rest,
|
|
19
25
|
ref,
|
|
20
26
|
children: [
|
|
21
|
-
/* @__PURE__ */ jsx(
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
27
|
+
/* @__PURE__ */ jsx(
|
|
28
|
+
OverlayArrow,
|
|
29
|
+
{
|
|
30
|
+
className: clsx(classNames.arrow, styles[classNames.arrow]),
|
|
31
|
+
children: /* @__PURE__ */ jsxs("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", children: [
|
|
32
|
+
/* @__PURE__ */ jsx("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" }),
|
|
33
|
+
/* @__PURE__ */ jsx("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" })
|
|
34
|
+
] })
|
|
35
|
+
}
|
|
36
|
+
),
|
|
25
37
|
children
|
|
26
38
|
]
|
|
27
39
|
}
|
|
@@ -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 (
|
|
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';\nimport styles from './Tooltip.module.css';\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 (props, ref) => {\n const { classNames, cleanedProps } = useStyles('Tooltip', props);\n const { className, children, ...rest } = cleanedProps;\n\n return (\n <AriaTooltip\n className={clsx(\n classNames.tooltip,\n styles[classNames.tooltip],\n className,\n )}\n {...rest}\n ref={ref}\n >\n <OverlayArrow\n className={clsx(classNames.arrow, styles[classNames.arrow])}\n >\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":";;;;;;;AA6BO,MAAM,cAAA,GAAiB,CAAC,KAAA,KAAwC;AACrE,EAAA,MAAM,EAAE,KAAA,GAA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
2
|
+
|
|
3
|
+
var css_248z = "/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n@layer components {\n .Tooltip-module_bui-Tooltip__1xkDA {\n box-shadow: 0 10px 15px -3px rgba(0 0 0 / 0.1),\n 0 4px 6px -4px rgba(0 0 0 / 0.1);\n border-radius: 4px;\n background: var(--bui-bg-surface-1);\n border: 1px solid var(--bui-gray-3);\n forced-color-adjust: none;\n outline: none;\n padding: var(--bui-space-2) var(--bui-space-3);\n max-width: 240px;\n /* fixes FF gap */\n transform: translate3d(0, 0, 0);\n transition: transform 200ms, opacity 200ms;\n font-size: var(--bui-font-size-3);\n font-family: var(--bui-font-regular);\n color: var(--bui-fg-primary);\n\n &[data-entering],\n &[data-exiting] {\n transform: var(--origin);\n opacity: 0;\n }\n\n --tooltip-offset: var(--bui-space-3);\n\n &[data-placement='top'] {\n margin-bottom: var(--tooltip-offset);\n --origin: translateY(4px);\n }\n\n &[data-placement='right'] {\n margin-left: var(--tooltip-offset);\n --origin: translateX(-4px);\n }\n\n &[data-placement='bottom'] {\n margin-top: var(--tooltip-offset);\n --origin: translateY(-4px);\n }\n\n &[data-placement='left'] {\n margin-right: var(--tooltip-offset);\n --origin: translateX(4px);\n }\n }\n\n .Tooltip-module_bui-TooltipArrow__3lFI0 {\n & svg {\n display: block;\n\n /* The tooltip is rendered overlaying the main\n tooltip element by 1px. This causes the borders\n to overlap, which causes minor visual artifacts\n with transparent border colors. To mitigate this,\n we split the stroke and fill across separate\n elements in order to guarantee that the stroke is\n always overlaying a consistent color. */\n path:nth-child(1) {\n fill: var(--bui-bg-surface-1);\n }\n\n path:nth-child(2) {\n fill: var(--bui-gray-3);\n }\n\n /* The arrow svg overlaps the tooltip by 2px, so we\n need to adjust the margins accordingly. */\n --tooltip-arrow-overlap: -2px;\n }\n\n &[data-placement='top'] svg {\n margin-top: var(--tooltip-arrow-overlap);\n }\n\n &[data-placement='bottom'] svg {\n margin-bottom: var(--tooltip-arrow-overlap);\n transform: rotate(180deg);\n }\n\n &[data-placement='right'] svg {\n margin-right: var(--tooltip-arrow-overlap);\n transform: rotate(90deg);\n }\n\n &[data-placement='left'] svg {\n margin-left: var(--tooltip-arrow-overlap);\n transform: rotate(-90deg);\n }\n }\n\n [data-theme='dark'] {\n .Tooltip-module_bui-Tooltip__1xkDA {\n background: var(--bui-bg-surface-2);\n box-shadow: none;\n border: 1px solid var(--bui-gray-4);\n }\n\n .Tooltip-module_bui-TooltipArrow__3lFI0 {\n svg path:nth-child(1) {\n fill: var(--bui-bg-surface-2);\n }\n\n svg path:nth-child(2) {\n fill: var(--bui-gray-4);\n }\n }\n }\n}\n";
|
|
4
|
+
var styles = {"bui-Tooltip":"Tooltip-module_bui-Tooltip__1xkDA","bui-TooltipArrow":"Tooltip-module_bui-TooltipArrow__3lFI0"};
|
|
5
|
+
styleInject(css_248z);
|
|
6
|
+
|
|
7
|
+
export { styles as default };
|
|
8
|
+
//# sourceMappingURL=Tooltip.module.css.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tooltip.module.css.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { useBreakpoint, breakpoints } from './useBreakpoint.esm.js';
|
|
2
2
|
import { componentDefinitions } from '../utils/componentDefinitions.esm.js';
|
|
3
|
+
import { utilityClassMap } from '../utils/utilityClassMap.esm.js';
|
|
3
4
|
|
|
4
5
|
function resolveResponsiveValue(value, breakpoint) {
|
|
5
6
|
if (typeof value === "string") {
|
|
@@ -22,23 +23,78 @@ function resolveResponsiveValue(value, breakpoint) {
|
|
|
22
23
|
}
|
|
23
24
|
function useStyles(componentName, props = {}) {
|
|
24
25
|
const { breakpoint } = useBreakpoint();
|
|
25
|
-
const
|
|
26
|
+
const componentDefinition = componentDefinitions[componentName];
|
|
27
|
+
const classNames = componentDefinition.classNames;
|
|
28
|
+
const utilityPropNames = ("utilityProps" in componentDefinition ? componentDefinition.utilityProps : []) || [];
|
|
29
|
+
const dataAttributeNames = "dataAttributes" in componentDefinition ? Object.keys(componentDefinition.dataAttributes || {}) : [];
|
|
30
|
+
const incomingStyle = props.style || {};
|
|
26
31
|
const dataAttributes = {};
|
|
27
|
-
const
|
|
28
|
-
|
|
32
|
+
for (const key of dataAttributeNames) {
|
|
33
|
+
const value = props[key];
|
|
29
34
|
if (value !== void 0 && value !== null) {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
35
|
+
if (typeof value === "boolean" || typeof value === "number") {
|
|
36
|
+
dataAttributes[`data-${key}`] = String(value);
|
|
37
|
+
} else {
|
|
38
|
+
const resolvedValue = resolveResponsiveValue(value, breakpoint);
|
|
39
|
+
if (resolvedValue !== void 0) {
|
|
40
|
+
dataAttributes[`data-${key}`] = resolvedValue;
|
|
41
|
+
}
|
|
34
42
|
}
|
|
35
43
|
}
|
|
36
44
|
}
|
|
45
|
+
const utilityClassList = [];
|
|
46
|
+
const generatedStyle = {};
|
|
47
|
+
const handleUtilityValue = (key, val, prefix = "") => {
|
|
48
|
+
const utilityConfig = utilityClassMap[key];
|
|
49
|
+
if (!utilityConfig) {
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
if (utilityConfig.values.length > 0 && utilityConfig.values.includes(val)) {
|
|
53
|
+
const className = prefix ? `${prefix}${utilityConfig.class}-${val}` : `${utilityConfig.class}-${val}`;
|
|
54
|
+
utilityClassList.push(className);
|
|
55
|
+
} else if (utilityConfig.cssVar) {
|
|
56
|
+
const cssVarKey = prefix ? `${utilityConfig.cssVar}-${prefix.slice(0, -1)}` : utilityConfig.cssVar;
|
|
57
|
+
generatedStyle[cssVarKey] = val;
|
|
58
|
+
const className = prefix ? `${prefix}${utilityConfig.class}` : utilityConfig.class;
|
|
59
|
+
utilityClassList.push(className);
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
for (const key of utilityPropNames) {
|
|
63
|
+
const value = props[key];
|
|
64
|
+
if (value === void 0 || value === null) {
|
|
65
|
+
continue;
|
|
66
|
+
}
|
|
67
|
+
if (typeof value === "object" && value !== null) {
|
|
68
|
+
const breakpointValues = value;
|
|
69
|
+
for (const bp in breakpointValues) {
|
|
70
|
+
const prefix = bp === "initial" ? "" : `${bp}:`;
|
|
71
|
+
handleUtilityValue(key, breakpointValues[bp], prefix);
|
|
72
|
+
}
|
|
73
|
+
} else {
|
|
74
|
+
handleUtilityValue(key, value);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
const utilityPropsSet = new Set(utilityPropNames);
|
|
78
|
+
const cleanedPropsBase = Object.keys(props).reduce((acc, key) => {
|
|
79
|
+
if (!utilityPropsSet.has(key)) {
|
|
80
|
+
acc[key] = props[key];
|
|
81
|
+
}
|
|
82
|
+
return acc;
|
|
83
|
+
}, {});
|
|
84
|
+
const mergedStyle = {
|
|
85
|
+
...generatedStyle,
|
|
86
|
+
...incomingStyle
|
|
87
|
+
};
|
|
88
|
+
const cleanedProps = {
|
|
89
|
+
...cleanedPropsBase,
|
|
90
|
+
style: mergedStyle
|
|
91
|
+
};
|
|
37
92
|
return {
|
|
38
93
|
classNames,
|
|
39
94
|
dataAttributes,
|
|
40
|
-
|
|
41
|
-
|
|
95
|
+
utilityClasses: utilityClassList.join(" "),
|
|
96
|
+
style: mergedStyle,
|
|
97
|
+
cleanedProps
|
|
42
98
|
};
|
|
43
99
|
}
|
|
44
100
|
|
|
@@ -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,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;;;;"}
|
|
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';\nimport { utilityClassMap } from '../utils/utilityClassMap';\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 - All component props\n * @returns Object with classNames, dataAttributes, utilityClasses, style, and cleanedProps\n */\nexport function useStyles<\n T extends ComponentDefinitionName,\n P extends Record<string, any> = Record<string, any>,\n>(\n componentName: T,\n props: P = {} as P,\n): {\n classNames: ComponentClassNames<T>;\n dataAttributes: Record<string, string>;\n utilityClasses: string;\n style: React.CSSProperties;\n cleanedProps: P;\n} {\n const { breakpoint } = useBreakpoint();\n const componentDefinition = componentDefinitions[componentName];\n const classNames = componentDefinition.classNames as ComponentClassNames<T>;\n const utilityPropNames =\n ('utilityProps' in componentDefinition\n ? componentDefinition.utilityProps\n : []) || [];\n\n // Extract data attribute names from component definition\n const dataAttributeNames =\n 'dataAttributes' in componentDefinition\n ? Object.keys(componentDefinition.dataAttributes || {})\n : [];\n\n // Extract existing style from props\n const incomingStyle = props.style || {};\n\n // Generate data attributes from component definition\n const dataAttributes: Record<string, string> = {};\n for (const key of dataAttributeNames) {\n const value = props[key];\n if (value !== undefined && value !== null) {\n // Handle boolean and number values directly\n if (typeof value === 'boolean' || typeof value === 'number') {\n dataAttributes[`data-${key}`] = String(value);\n } else {\n const resolvedValue = resolveResponsiveValue(value, breakpoint);\n if (resolvedValue !== undefined) {\n dataAttributes[`data-${key}`] = resolvedValue;\n }\n }\n }\n }\n\n // Generate utility classes and custom styles from component's allowed utility props\n const utilityClassList: string[] = [];\n const generatedStyle: React.CSSProperties = {};\n\n const handleUtilityValue = (\n key: string,\n val: unknown,\n prefix: string = '',\n ) => {\n // Get utility class configuration for this key\n const utilityConfig = utilityClassMap[key as keyof typeof utilityClassMap];\n\n if (!utilityConfig) {\n // Skip if no config found for this key\n return;\n }\n\n // Check if value is in the list of valid values for this utility\n if (\n utilityConfig.values.length > 0 &&\n utilityConfig.values.includes(val as string | number)\n ) {\n // Generate utility class with value suffix and optional breakpoint prefix\n const className = prefix\n ? `${prefix}${utilityConfig.class}-${val}`\n : `${utilityConfig.class}-${val}`;\n utilityClassList.push(className);\n } else if (utilityConfig.cssVar) {\n // Custom value - add CSS custom property AND utility class name\n // Only if cssVar is defined (properties with fixed values don't have cssVar)\n const cssVarKey = prefix\n ? `${utilityConfig.cssVar}-${prefix.slice(0, -1)}`\n : utilityConfig.cssVar;\n // CSS custom properties need to be set on the style object as strings\n (generatedStyle as Record<string, unknown>)[cssVarKey] = val;\n\n // Add utility class name (without value suffix) with optional breakpoint prefix\n const className = prefix\n ? `${prefix}${utilityConfig.class}`\n : utilityConfig.class;\n utilityClassList.push(className);\n }\n // If no cssVar and value is not in valid values, skip (invalid value for fixed-value property)\n };\n\n for (const key of utilityPropNames) {\n const value = props[key];\n if (value === undefined || value === null) {\n continue;\n }\n\n // Check if value is a responsive object\n if (typeof value === 'object' && value !== null) {\n const breakpointValues = value as { [key: string]: unknown };\n // Handle responsive object values\n for (const bp in breakpointValues) {\n const prefix = bp === 'initial' ? '' : `${bp}:`;\n handleUtilityValue(key, breakpointValues[bp], prefix);\n }\n } else {\n // Handle simple value\n handleUtilityValue(key, value);\n }\n }\n\n // Create cleaned props by excluding only utility props\n // All other props (including data attributes, style, children, etc.) remain\n const utilityPropsSet = new Set<string>(utilityPropNames);\n\n const cleanedPropsBase = Object.keys(props).reduce((acc, key) => {\n if (!utilityPropsSet.has(key)) {\n acc[key] = props[key];\n }\n return acc;\n }, {} as any);\n\n // Merge incoming style with generated styles (incoming styles take precedence)\n const mergedStyle = {\n ...generatedStyle,\n ...incomingStyle,\n };\n\n // Add merged style to cleanedProps\n const cleanedProps = {\n ...cleanedPropsBase,\n style: mergedStyle,\n } as P;\n\n return {\n classNames,\n dataAttributes,\n utilityClasses: utilityClassList.join(' '),\n style: mergedStyle,\n cleanedProps,\n };\n}\n"],"names":[],"mappings":";;;;AA0BA,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,CAId,aAAA,EACA,KAAA,GAAW,EAAC,EAOZ;AACA,EAAA,MAAM,EAAE,UAAA,EAAW,GAAI,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