@backstage/ui 0.15.0-next.0 → 0.15.0-next.2
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 +78 -0
- package/dist/components/Accordion/Accordion.module.css.esm.js +2 -2
- package/dist/components/Box/Box.module.css.esm.js +2 -2
- package/dist/components/Card/Card.module.css.esm.js +2 -2
- package/dist/components/Checkbox/Checkbox.module.css.esm.js +2 -2
- package/dist/components/Combobox/Combobox.esm.js +72 -0
- package/dist/components/Combobox/Combobox.esm.js.map +1 -0
- package/dist/components/Combobox/Combobox.module.css.esm.js +8 -0
- package/dist/components/Combobox/Combobox.module.css.esm.js.map +1 -0
- package/dist/components/Combobox/ComboboxInput.esm.js +21 -0
- package/dist/components/Combobox/ComboboxInput.esm.js.map +1 -0
- package/dist/components/Combobox/ComboboxListBox.esm.js +46 -0
- package/dist/components/Combobox/ComboboxListBox.esm.js.map +1 -0
- package/dist/components/Combobox/definition.esm.js +74 -0
- package/dist/components/Combobox/definition.esm.js.map +1 -0
- package/dist/components/Container/Container.module.css.esm.js +2 -2
- package/dist/components/Flex/Flex.module.css.esm.js +2 -2
- package/dist/components/Grid/Grid.module.css.esm.js +2 -2
- package/dist/components/Header/Header.esm.js +187 -28
- package/dist/components/Header/Header.esm.js.map +1 -1
- package/dist/components/Header/Header.module.css.esm.js +2 -2
- package/dist/components/Header/HeaderMetadataStatus.esm.js +32 -0
- package/dist/components/Header/HeaderMetadataStatus.esm.js.map +1 -0
- package/dist/components/Header/HeaderMetadataStatus.module.css.esm.js +8 -0
- package/dist/components/Header/HeaderMetadataStatus.module.css.esm.js.map +1 -0
- package/dist/components/Header/HeaderMetadataUsers.esm.js +92 -0
- package/dist/components/Header/HeaderMetadataUsers.esm.js.map +1 -0
- package/dist/components/Header/HeaderMetadataUsers.module.css.esm.js +8 -0
- package/dist/components/Header/HeaderMetadataUsers.module.css.esm.js.map +1 -0
- package/dist/components/Header/definition.esm.js +22 -3
- package/dist/components/Header/definition.esm.js.map +1 -1
- package/dist/components/Link/Link.esm.js +7 -2
- package/dist/components/Link/Link.esm.js.map +1 -1
- package/dist/components/Link/Link.module.css.esm.js +2 -2
- package/dist/components/PluginHeader/PluginHeader.esm.js +8 -17
- package/dist/components/PluginHeader/PluginHeader.esm.js.map +1 -1
- package/dist/components/PluginHeader/PluginHeader.module.css.esm.js +2 -2
- package/dist/components/Select/Select.module.css.esm.js +2 -2
- package/dist/components/Select/SelectContent.esm.js.map +1 -1
- package/dist/components/Select/SelectListBox.esm.js +26 -12
- package/dist/components/Select/SelectListBox.esm.js.map +1 -1
- package/dist/components/Select/definition.esm.js +20 -4
- package/dist/components/Select/definition.esm.js.map +1 -1
- package/dist/components/Table/hooks/useCompletePagination.esm.js +28 -11
- package/dist/components/Table/hooks/useCompletePagination.esm.js.map +1 -1
- package/dist/components/Table/hooks/useDebouncedValue.esm.js +16 -0
- package/dist/components/Table/hooks/useDebouncedValue.esm.js.map +1 -0
- package/dist/css/styles.css +34 -0
- package/dist/hooks/useDefinition/useDefinition.esm.js +8 -6
- package/dist/hooks/useDefinition/useDefinition.esm.js.map +1 -1
- package/dist/hooks/useResolvedHref.esm.js +17 -0
- package/dist/hooks/useResolvedHref.esm.js.map +1 -0
- package/dist/index.d.ts +313 -52
- package/dist/index.esm.js +4 -0
- package/dist/index.esm.js.map +1 -1
- package/dist/provider/BUIProvider.esm.js +3 -2
- package/dist/provider/BUIProvider.esm.js.map +1 -1
- package/package.json +8 -3
|
@@ -5,38 +5,197 @@ import '../Text/Text.module.css.esm.js';
|
|
|
5
5
|
import { RiArrowRightSLine } from '@remixicon/react';
|
|
6
6
|
import { HeaderNav } from './HeaderNav.esm.js';
|
|
7
7
|
import { HeaderDefinition } from './definition.esm.js';
|
|
8
|
-
import {
|
|
9
|
-
import '
|
|
8
|
+
import { sanitizeUrl } from '@braintree/sanitize-url';
|
|
9
|
+
import { Lexer } from 'marked';
|
|
10
10
|
import { Link } from '../Link/Link.esm.js';
|
|
11
11
|
import '../Link/Link.module.css.esm.js';
|
|
12
|
+
import { useMemo, useRef, useState, useEffect, Fragment as Fragment$1 } from 'react';
|
|
12
13
|
|
|
14
|
+
const getScrollParent = (element) => {
|
|
15
|
+
let parent = element?.parentElement;
|
|
16
|
+
while (parent) {
|
|
17
|
+
const { overflow, overflowX, overflowY } = window.getComputedStyle(parent);
|
|
18
|
+
if (/(auto|scroll|overlay|hidden)/.test(`${overflow}${overflowX}${overflowY}`)) {
|
|
19
|
+
return parent;
|
|
20
|
+
}
|
|
21
|
+
parent = parent.parentElement;
|
|
22
|
+
}
|
|
23
|
+
return null;
|
|
24
|
+
};
|
|
25
|
+
const isStickySentinelOutOfView = (sentinel, root) => {
|
|
26
|
+
const sentinelRect = sentinel.getBoundingClientRect();
|
|
27
|
+
const rootTop = root ? root.getBoundingClientRect().top : 0;
|
|
28
|
+
return sentinelRect.bottom <= rootTop;
|
|
29
|
+
};
|
|
30
|
+
function renderInlineMarkdown(text) {
|
|
31
|
+
return Lexer.lexInline(text).map((token, i) => {
|
|
32
|
+
if (token.type === "link") {
|
|
33
|
+
const href = sanitizeUrl(token.href);
|
|
34
|
+
if (href === "about:blank") return token.text;
|
|
35
|
+
return /* @__PURE__ */ jsx(Link, { href, standalone: true, children: token.text }, i);
|
|
36
|
+
}
|
|
37
|
+
return token.raw;
|
|
38
|
+
});
|
|
39
|
+
}
|
|
13
40
|
const Header = (props) => {
|
|
14
|
-
const { ownProps } = useDefinition(HeaderDefinition, props
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
41
|
+
const { ownProps, dataAttributes } = useDefinition(HeaderDefinition, props, {
|
|
42
|
+
classNameTarget: "content"
|
|
43
|
+
});
|
|
44
|
+
const {
|
|
45
|
+
classes,
|
|
46
|
+
title,
|
|
47
|
+
tabs,
|
|
48
|
+
activeTabId,
|
|
49
|
+
customActions,
|
|
50
|
+
breadcrumbs,
|
|
51
|
+
description,
|
|
52
|
+
tags,
|
|
53
|
+
metadata,
|
|
54
|
+
sticky
|
|
55
|
+
} = ownProps;
|
|
56
|
+
const descriptionNodes = useMemo(
|
|
57
|
+
() => description ? renderInlineMarkdown(description) : null,
|
|
58
|
+
[description]
|
|
59
|
+
);
|
|
60
|
+
const stickySentinelRef = useRef(null);
|
|
61
|
+
const [isStuck, setIsStuck] = useState(false);
|
|
62
|
+
useEffect(() => {
|
|
63
|
+
if (!sticky) {
|
|
64
|
+
setIsStuck(false);
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
const sentinel = stickySentinelRef.current;
|
|
68
|
+
if (!sentinel) {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
const root = getScrollParent(sentinel);
|
|
72
|
+
if (typeof IntersectionObserver === "undefined") {
|
|
73
|
+
const updateStuckState = () => {
|
|
74
|
+
setIsStuck(isStickySentinelOutOfView(sentinel, root));
|
|
75
|
+
};
|
|
76
|
+
const scrollTarget = root ?? window;
|
|
77
|
+
updateStuckState();
|
|
78
|
+
scrollTarget.addEventListener("scroll", updateStuckState, {
|
|
79
|
+
passive: true
|
|
80
|
+
});
|
|
81
|
+
window.addEventListener("resize", updateStuckState);
|
|
82
|
+
return () => {
|
|
83
|
+
scrollTarget.removeEventListener("scroll", updateStuckState);
|
|
84
|
+
window.removeEventListener("resize", updateStuckState);
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
const observer = new IntersectionObserver(
|
|
88
|
+
([entry]) => {
|
|
89
|
+
setIsStuck(!entry.isIntersecting);
|
|
90
|
+
},
|
|
91
|
+
{ root, threshold: 0 }
|
|
92
|
+
);
|
|
93
|
+
observer.observe(sentinel);
|
|
94
|
+
return () => {
|
|
95
|
+
observer.disconnect();
|
|
96
|
+
};
|
|
97
|
+
}, [sticky]);
|
|
98
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
99
|
+
/* @__PURE__ */ jsx("div", { className: classes.headerTop, "data-sticky": sticky || void 0, children: tags && tags.length > 0 && /* @__PURE__ */ jsx("ul", { className: classes.tags, children: tags.map((tag, i) => /* @__PURE__ */ jsx(
|
|
100
|
+
"li",
|
|
101
|
+
{
|
|
102
|
+
className: classes.tag,
|
|
103
|
+
children: tag.href ? /* @__PURE__ */ jsx(
|
|
104
|
+
Link,
|
|
105
|
+
{
|
|
106
|
+
href: tag.href,
|
|
107
|
+
variant: "body-medium",
|
|
108
|
+
color: "secondary",
|
|
109
|
+
standalone: true,
|
|
110
|
+
children: tag.label
|
|
111
|
+
}
|
|
112
|
+
) : /* @__PURE__ */ jsx(Text, { variant: "body-medium", color: "secondary", children: tag.label })
|
|
113
|
+
},
|
|
114
|
+
`${i}:${tag.label}:${tag.href ?? ""}`
|
|
115
|
+
)) }) }),
|
|
116
|
+
sticky && /* @__PURE__ */ jsx(
|
|
117
|
+
"div",
|
|
118
|
+
{
|
|
119
|
+
ref: stickySentinelRef,
|
|
120
|
+
className: classes.stickySentinel,
|
|
121
|
+
"data-sticky": "",
|
|
122
|
+
"aria-hidden": "true"
|
|
123
|
+
}
|
|
124
|
+
),
|
|
125
|
+
/* @__PURE__ */ jsxs(
|
|
126
|
+
"div",
|
|
127
|
+
{
|
|
128
|
+
className: classes.content,
|
|
129
|
+
"data-sticky": sticky || void 0,
|
|
130
|
+
"data-stuck": isStuck || void 0,
|
|
131
|
+
"data-has-tags": tags && tags.length > 0 ? "" : void 0,
|
|
132
|
+
...dataAttributes,
|
|
133
|
+
children: [
|
|
134
|
+
/* @__PURE__ */ jsx("div", { className: classes.titleStack, children: isStuck ? /* @__PURE__ */ jsxs("div", { className: classes.breadcrumbsSmall, children: [
|
|
135
|
+
breadcrumbs && breadcrumbs.map((breadcrumb) => /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
136
|
+
/* @__PURE__ */ jsx(
|
|
137
|
+
Link,
|
|
138
|
+
{
|
|
139
|
+
href: breadcrumb.href,
|
|
140
|
+
color: "secondary",
|
|
141
|
+
className: classes.breadcrumbLinkSmall,
|
|
142
|
+
standalone: true,
|
|
143
|
+
children: breadcrumb.label
|
|
144
|
+
}
|
|
145
|
+
),
|
|
146
|
+
/* @__PURE__ */ jsx(
|
|
147
|
+
RiArrowRightSLine,
|
|
148
|
+
{
|
|
149
|
+
className: classes.breadcrumbSeparator,
|
|
150
|
+
size: 16,
|
|
151
|
+
color: "var(--bui-fg-secondary)"
|
|
152
|
+
}
|
|
153
|
+
)
|
|
154
|
+
] }, breadcrumb.label)),
|
|
155
|
+
/* @__PURE__ */ jsx("h2", { className: classes.titleSmall, children: title })
|
|
156
|
+
] }) : /* @__PURE__ */ jsxs("div", { className: classes.breadcrumbs, children: [
|
|
157
|
+
breadcrumbs && breadcrumbs.map((breadcrumb) => /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
158
|
+
/* @__PURE__ */ jsx(
|
|
159
|
+
Link,
|
|
160
|
+
{
|
|
161
|
+
href: breadcrumb.href,
|
|
162
|
+
color: "secondary",
|
|
163
|
+
className: classes.breadcrumbLink,
|
|
164
|
+
standalone: true,
|
|
165
|
+
children: breadcrumb.label
|
|
166
|
+
}
|
|
167
|
+
),
|
|
168
|
+
/* @__PURE__ */ jsx(
|
|
169
|
+
RiArrowRightSLine,
|
|
170
|
+
{
|
|
171
|
+
className: classes.breadcrumbSeparator,
|
|
172
|
+
size: 16,
|
|
173
|
+
color: "var(--bui-fg-secondary)"
|
|
174
|
+
}
|
|
175
|
+
)
|
|
176
|
+
] }, breadcrumb.label)),
|
|
177
|
+
/* @__PURE__ */ jsx("h2", { className: classes.title, children: title })
|
|
178
|
+
] }) }),
|
|
179
|
+
/* @__PURE__ */ jsx("div", { className: classes.controls, children: customActions })
|
|
180
|
+
]
|
|
181
|
+
}
|
|
182
|
+
),
|
|
183
|
+
/* @__PURE__ */ jsxs("div", { className: classes.headerBottom, "data-sticky": sticky || void 0, children: [
|
|
184
|
+
description && /* @__PURE__ */ jsx(
|
|
185
|
+
Text,
|
|
186
|
+
{
|
|
187
|
+
variant: "body-medium",
|
|
188
|
+
color: "secondary",
|
|
189
|
+
className: classes.description,
|
|
190
|
+
children: descriptionNodes
|
|
191
|
+
}
|
|
192
|
+
),
|
|
193
|
+
metadata && metadata.length > 0 && /* @__PURE__ */ jsx("dl", { className: classes.metaRow, children: metadata.map((item, i) => /* @__PURE__ */ jsxs("div", { className: classes.metaItem, children: [
|
|
194
|
+
/* @__PURE__ */ jsx("dt", { children: /* @__PURE__ */ jsx(Text, { variant: "body-medium", color: "secondary", children: item.label }) }),
|
|
195
|
+
/* @__PURE__ */ jsx("dd", { children: typeof item.value === "string" ? /* @__PURE__ */ jsx(Text, { variant: "body-medium", children: item.value }) : item.value })
|
|
196
|
+
] }, `${i}:${item.label}`)) }),
|
|
197
|
+
tabs && /* @__PURE__ */ jsx("div", { className: classes.tabsWrapper, children: /* @__PURE__ */ jsx(HeaderNav, { tabs, activeTabId }) })
|
|
198
|
+
] })
|
|
40
199
|
] });
|
|
41
200
|
};
|
|
42
201
|
const HeaderPage = Header;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Header.esm.js","sources":["../../../src/components/Header/Header.tsx"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { HeaderProps } from './types';\nimport { Text } from '../Text';\nimport { RiArrowRightSLine } from '@remixicon/react';\nimport { HeaderNav } from './HeaderNav';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport { HeaderDefinition } from './definition';\nimport { Container } from '../Container';\nimport { Link } from '../Link';\nimport { Fragment } from 'react/jsx-runtime';\n\n/**\n * A secondary header with title, breadcrumbs, tabs, and actions.\n *\n * @public\n */\nexport const Header = (props: HeaderProps) => {\n const { ownProps } = useDefinition(HeaderDefinition, props);\n const { classes, title, tabs, activeTabId, customActions, breadcrumbs } =\n ownProps;\n\n return (\n <Container className={classes.root}>\n <div className={classes.content}>\n <div className={classes.breadcrumbs}>\n {breadcrumbs &&\n breadcrumbs.map(breadcrumb => (\n <Fragment key={breadcrumb.label}>\n <Link\n href={breadcrumb.href}\n variant=\"title-small\"\n weight=\"bold\"\n color=\"secondary\"\n truncate\n style={{ maxWidth: '240px' }}\n standalone\n >\n {breadcrumb.label}\n </Link>\n <RiArrowRightSLine size={16} color=\"var(--bui-fg-secondary)\" />\n </Fragment>\n ))}\n <Text variant=\"title-small\" weight=\"bold\" as=\"h2\">\n {title}\n </Text>\n </div>\n <div className={classes.controls}>{customActions}</div>\n </div>\n {tabs && (\n <div className={classes.tabsWrapper}>\n <HeaderNav tabs={tabs} activeTabId={activeTabId} />\n </div>\n )}\n </Container>\n );\n};\n\n/**\n * @public\n * @deprecated Use {@link Header} instead.\n */\nexport const HeaderPage = Header;\n"],"names":[],"mappings":";;;;;;;;;;;;AA+BO,MAAM,MAAA,GAAS,CAAC,KAAA,KAAuB;AAC5C,EAAA,MAAM,EAAE,QAAA,EAAS,GAAI,aAAA,CAAc,kBAAkB,KAAK,CAAA;AAC1D,EAAA,MAAM,EAAE,OAAA,EAAS,KAAA,EAAO,MAAM,WAAA,EAAa,aAAA,EAAe,aAAY,GACpE,QAAA;AAEF,EAAA,uBACE,IAAA,CAAC,SAAA,EAAA,EAAU,SAAA,EAAW,OAAA,CA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AAA,GAAA,EAEJ,CAAA;AAEJ;AAMO,MAAM,UAAA,GAAa;;;;"}
|
|
1
|
+
{"version":3,"file":"Header.esm.js","sources":["../../../src/components/Header/Header.tsx"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { HeaderProps } from './types';\nimport { Text } from '../Text';\nimport { RiArrowRightSLine } from '@remixicon/react';\nimport { HeaderNav } from './HeaderNav';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport { HeaderDefinition } from './definition';\nimport { sanitizeUrl } from '@braintree/sanitize-url';\nimport { Lexer } from 'marked';\nimport { Link } from '../Link';\nimport { Fragment, useEffect, useMemo, useRef, useState } from 'react';\n\nconst getScrollParent = (element: HTMLElement | null): Element | null => {\n let parent = element?.parentElement;\n\n while (parent) {\n const { overflow, overflowX, overflowY } = window.getComputedStyle(parent);\n\n if (\n /(auto|scroll|overlay|hidden)/.test(`${overflow}${overflowX}${overflowY}`)\n ) {\n return parent;\n }\n\n parent = parent.parentElement;\n }\n\n return null;\n};\n\nconst isStickySentinelOutOfView = (\n sentinel: HTMLElement,\n root: Element | null,\n) => {\n const sentinelRect = sentinel.getBoundingClientRect();\n const rootTop = root ? root.getBoundingClientRect().top : 0;\n\n return sentinelRect.bottom <= rootTop;\n};\n\n/**\n * Parses inline Markdown links in a string and returns an array of React nodes.\n * URLs are sanitized via `@braintree/sanitize-url`; unsafe URLs are rendered as\n * plain text. Uses `marked` instead of `react-markdown` to avoid ESM issues.\n */\nfunction renderInlineMarkdown(text: string): React.ReactNode[] {\n return Lexer.lexInline(text).map((token, i) => {\n if (token.type === 'link') {\n const href = sanitizeUrl(token.href);\n if (href === 'about:blank') return token.text;\n return (\n <Link key={i} href={href} standalone>\n {token.text}\n </Link>\n );\n }\n return token.raw;\n });\n}\n\n/**\n * A secondary header with title, breadcrumbs, tabs, and actions.\n *\n * @public\n */\nexport const Header = (props: HeaderProps) => {\n const { ownProps, dataAttributes } = useDefinition(HeaderDefinition, props, {\n classNameTarget: 'content',\n });\n const {\n classes,\n title,\n tabs,\n activeTabId,\n customActions,\n breadcrumbs,\n description,\n tags,\n metadata,\n sticky,\n } = ownProps;\n\n const descriptionNodes = useMemo(\n () => (description ? renderInlineMarkdown(description) : null),\n [description],\n );\n\n // The sentinel sits directly before the sticky content and leaves the\n // viewport when the content becomes stuck, letting us toggle stuck styling.\n const stickySentinelRef = useRef<HTMLDivElement>(null);\n const [isStuck, setIsStuck] = useState(false);\n\n useEffect(() => {\n if (!sticky) {\n setIsStuck(false);\n return;\n }\n\n const sentinel = stickySentinelRef.current;\n if (!sentinel) {\n return;\n }\n\n const root = getScrollParent(sentinel);\n\n if (typeof IntersectionObserver === 'undefined') {\n const updateStuckState = () => {\n setIsStuck(isStickySentinelOutOfView(sentinel, root));\n };\n const scrollTarget = root ?? window;\n\n updateStuckState();\n scrollTarget.addEventListener('scroll', updateStuckState, {\n passive: true,\n });\n window.addEventListener('resize', updateStuckState);\n\n return () => {\n scrollTarget.removeEventListener('scroll', updateStuckState);\n window.removeEventListener('resize', updateStuckState);\n };\n }\n\n const observer = new IntersectionObserver(\n ([entry]) => {\n setIsStuck(!entry.isIntersecting);\n },\n { root, threshold: 0 },\n );\n\n observer.observe(sentinel);\n\n return () => {\n observer.disconnect();\n };\n }, [sticky]);\n\n return (\n <>\n <div className={classes.headerTop} data-sticky={sticky || undefined}>\n {tags && tags.length > 0 && (\n <ul className={classes.tags}>\n {tags.map((tag, i) => (\n <li\n key={`${i}:${tag.label}:${tag.href ?? ''}`}\n className={classes.tag}\n >\n {tag.href ? (\n <Link\n href={tag.href}\n variant=\"body-medium\"\n color=\"secondary\"\n standalone\n >\n {tag.label}\n </Link>\n ) : (\n <Text variant=\"body-medium\" color=\"secondary\">\n {tag.label}\n </Text>\n )}\n </li>\n ))}\n </ul>\n )}\n </div>\n {sticky && (\n <div\n ref={stickySentinelRef}\n className={classes.stickySentinel}\n data-sticky=\"\"\n aria-hidden=\"true\"\n />\n )}\n <div\n className={classes.content}\n data-sticky={sticky || undefined}\n data-stuck={isStuck || undefined}\n data-has-tags={tags && tags.length > 0 ? '' : undefined}\n {...dataAttributes}\n >\n <div className={classes.titleStack}>\n {isStuck ? (\n <div className={classes.breadcrumbsSmall}>\n {breadcrumbs &&\n breadcrumbs.map(breadcrumb => (\n <Fragment key={breadcrumb.label}>\n <Link\n href={breadcrumb.href}\n color=\"secondary\"\n className={classes.breadcrumbLinkSmall}\n standalone\n >\n {breadcrumb.label}\n </Link>\n <RiArrowRightSLine\n className={classes.breadcrumbSeparator}\n size={16}\n color=\"var(--bui-fg-secondary)\"\n />\n </Fragment>\n ))}\n <h2 className={classes.titleSmall}>{title}</h2>\n </div>\n ) : (\n <div className={classes.breadcrumbs}>\n {breadcrumbs &&\n breadcrumbs.map(breadcrumb => (\n <Fragment key={breadcrumb.label}>\n <Link\n href={breadcrumb.href}\n color=\"secondary\"\n className={classes.breadcrumbLink}\n standalone\n >\n {breadcrumb.label}\n </Link>\n <RiArrowRightSLine\n className={classes.breadcrumbSeparator}\n size={16}\n color=\"var(--bui-fg-secondary)\"\n />\n </Fragment>\n ))}\n <h2 className={classes.title}>{title}</h2>\n </div>\n )}\n </div>\n <div className={classes.controls}>{customActions}</div>\n </div>\n <div className={classes.headerBottom} data-sticky={sticky || undefined}>\n {description && (\n <Text\n variant=\"body-medium\"\n color=\"secondary\"\n className={classes.description}\n >\n {descriptionNodes}\n </Text>\n )}\n {metadata && metadata.length > 0 && (\n <dl className={classes.metaRow}>\n {metadata.map((item, i) => (\n <div key={`${i}:${item.label}`} className={classes.metaItem}>\n <dt>\n <Text variant=\"body-medium\" color=\"secondary\">\n {item.label}\n </Text>\n </dt>\n <dd>\n {typeof item.value === 'string' ? (\n <Text variant=\"body-medium\">{item.value}</Text>\n ) : (\n item.value\n )}\n </dd>\n </div>\n ))}\n </dl>\n )}\n {tabs && (\n <div className={classes.tabsWrapper}>\n <HeaderNav tabs={tabs} activeTabId={activeTabId} />\n </div>\n )}\n </div>\n </>\n );\n};\n\n/**\n * @public\n * @deprecated Use {@link Header} instead.\n */\nexport const HeaderPage = Header;\n"],"names":["Fragment"],"mappings":";;;;;;;;;;;;;AA2BA,MAAM,eAAA,GAAkB,CAAC,OAAA,KAAgD;AACvE,EAAA,IAAI,SAAS,OAAA,EAAS,aAAA;AAEtB,EAAA,OAAO,MAAA,EAAQ;AACb,IAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAW,WAAU,GAAI,MAAA,CAAO,iBAAiB,MAAM,CAAA;AAEzE,IAAA,IACE,8BAAA,CAA+B,KAAK,CAAA,EAAG,QAAQ,GAAG,SAAS,CAAA,EAAG,SAAS,CAAA,CAAE,CAAA,EACzE;AACA,MAAA,OAAO,MAAA;AAAA,IACT;AAEA,IAAA,MAAA,GAAS,MAAA,CAAO,aAAA;AAAA,EAClB;AAEA,EAAA,OAAO,IAAA;AACT,CAAA;AAEA,MAAM,yBAAA,GAA4B,CAChC,QAAA,EACA,IAAA,KACG;AACH,EAAA,MAAM,YAAA,GAAe,SAAS,qBAAA,EAAsB;AACpD,EAAA,MAAM,OAAA,GAAU,IAAA,GAAO,IAAA,CAAK,qBAAA,GAAwB,GAAA,GAAM,CAAA;AAE1D,EAAA,OAAO,aAAa,MAAA,IAAU,OAAA;AAChC,CAAA;AAOA,SAAS,qBAAqB,IAAA,EAAiC;AAC7D,EAAA,OAAO,MAAM,SAAA,CAAU,IAAI,EAAE,GAAA,CAAI,CAAC,OAAO,CAAA,KAAM;AAC7C,IAAA,IAAI,KAAA,CAAM,SAAS,MAAA,EAAQ;AACzB,MAAA,MAAM,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;AAAA,OAAA,EAAA,EAZQ,GAAG,CAAC,CAAA,CAAA,EAAI,KAAK,KAAK,CAAA,CAa5B,CACD,CAAA,EACH,CAAA;AAAA,MAED,IAAA,oBACC,GAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,OAAA,CAAQ,aACtB,QAAA,kBAAA,GAAA,CAAC,SAAA,EAAA,EAAU,IAAA,EAAY,WAAA,EAA0B,CAAA,EACnD;AAAA,KAAA,EAEJ;AAAA,GAAA,EACF,CAAA;AAEJ;AAMO,MAAM,UAAA,GAAa;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import styleInject from '../../node_modules_dist/style-inject/dist/style-inject.es.esm.js';
|
|
2
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 tokens, base, components, utilities;\n\n@layer components {\n .Header_bui-
|
|
4
|
-
var styles = {"bui-
|
|
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 tokens, base, components, utilities;\n\n@layer components {\n .Header_bui-HeaderBottom__88cf7f55e4 {\n display: flex;\n flex-direction: column;\n gap: var(--bui-space-3);\n margin-bottom: var(--bui-space-5);\n }\n\n .Header_bui-HeaderTop__88cf7f55e4,\n .Header_bui-HeaderContent__88cf7f55e4,\n .Header_bui-HeaderBottom__88cf7f55e4 {\n width: 100%;\n padding-inline: var(--bui-space-5);\n box-sizing: border-box;\n }\n\n .Header_bui-HeaderStickySentinel__88cf7f55e4 {\n height: 1px;\n margin-bottom: -1px;\n pointer-events: none;\n }\n\n .Header_bui-HeaderContent__88cf7f55e4 {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n gap: var(--bui-space-3);\n padding-top: var(--bui-space-3);\n padding-bottom: var(--bui-space-3);\n }\n\n .Header_bui-HeaderContent__88cf7f55e4[data-has-tags] {\n padding-top: var(--bui-space-2);\n }\n\n .Header_bui-HeaderContent__88cf7f55e4[data-sticky] {\n position: sticky;\n top: 0;\n z-index: 10;\n background-color: var(--bui-bg-app);\n\n &[data-on-bg='neutral-1'] {\n background-color: var(--bui-bg-neutral-1);\n }\n\n &[data-on-bg='neutral-2'] {\n background-color: var(--bui-bg-neutral-2);\n }\n\n &[data-on-bg='neutral-3'] {\n background-color: var(--bui-bg-neutral-3);\n }\n }\n\n .Header_bui-HeaderContent__88cf7f55e4[data-sticky]::after {\n position: absolute;\n right: 0;\n bottom: 0;\n left: 0;\n height: 1px;\n content: '';\n background-color: var(--bui-border-1);\n opacity: 0;\n transition: opacity 200ms ease;\n }\n\n .Header_bui-HeaderContent__88cf7f55e4[data-stuck]::after {\n opacity: 1;\n }\n\n .Header_bui-HeaderTabsWrapper__88cf7f55e4 {\n margin-left: -8px;\n }\n\n .Header_bui-HeaderControls__88cf7f55e4 {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: var(--bui-space-2);\n flex-shrink: 0;\n }\n\n .Header_bui-HeaderTitleStack__88cf7f55e4 {\n position: relative;\n flex: 1 1 auto;\n height: 1lh;\n min-width: 0;\n font-size: var(--bui-font-size-6);\n line-height: 140%;\n overflow: hidden;\n }\n\n .Header_bui-HeaderBreadcrumbs__88cf7f55e4,\n .Header_bui-HeaderBreadcrumbsSmall__88cf7f55e4 {\n position: absolute;\n inset-inline: 0;\n top: 50%;\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: var(--bui-space-2);\n min-width: 0;\n transform: translateY(-50%);\n }\n\n .Header_bui-HeaderBreadcrumbsSmall__88cf7f55e4 {\n gap: var(--bui-space-1);\n }\n\n .Header_bui-HeaderBreadcrumbs__88cf7f55e4 .Header_bui-HeaderBreadcrumbLink__88cf7f55e4,\n .Header_bui-HeaderBreadcrumbsSmall__88cf7f55e4 .Header_bui-HeaderBreadcrumbLinkSmall__88cf7f55e4 {\n max-width: 240px;\n overflow: hidden;\n font-family: var(--bui-font-regular);\n font-weight: var(--bui-font-weight-bold);\n line-height: inherit;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .Header_bui-HeaderBreadcrumbs__88cf7f55e4 .Header_bui-HeaderBreadcrumbLink__88cf7f55e4 {\n font-size: inherit;\n }\n\n .Header_bui-HeaderBreadcrumbsSmall__88cf7f55e4 .Header_bui-HeaderBreadcrumbLinkSmall__88cf7f55e4 {\n font-size: var(--bui-font-size-4);\n }\n\n .Header_bui-HeaderBreadcrumbSeparator__88cf7f55e4 {\n flex-shrink: 0;\n }\n\n .Header_bui-HeaderTitle__88cf7f55e4,\n .Header_bui-HeaderTitleSmall__88cf7f55e4 {\n margin: 0;\n padding: 0;\n flex: 1 1 auto;\n min-width: 0;\n font-family: var(--bui-font-regular);\n font-weight: var(--bui-font-weight-bold);\n line-height: inherit;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .Header_bui-HeaderTitle__88cf7f55e4 {\n font-size: inherit;\n }\n\n .Header_bui-HeaderTitleSmall__88cf7f55e4 {\n font-size: var(--bui-font-size-4);\n }\n\n .Header_bui-HeaderTags__88cf7f55e4 {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: var(--bui-space-2);\n flex-wrap: wrap;\n list-style: none;\n margin: 0;\n padding: 0;\n }\n\n .Header_bui-HeaderTag__88cf7f55e4 {\n display: flex;\n align-items: center;\n gap: var(--bui-space-2);\n }\n\n .Header_bui-HeaderTag__88cf7f55e4 + .Header_bui-HeaderTag__88cf7f55e4::before {\n content: '';\n width: 3px;\n height: 3px;\n border-radius: 50%;\n background-color: var(--bui-fg-secondary);\n flex-shrink: 0;\n }\n\n .Header_bui-HeaderMetaRow__88cf7f55e4 {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: var(--bui-space-5);\n flex-wrap: wrap;\n margin: 0;\n }\n\n .Header_bui-HeaderMetaItem__88cf7f55e4 {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: var(--bui-space-2);\n\n dd {\n margin: 0;\n }\n }\n}\n";
|
|
4
|
+
var styles = {"bui-HeaderBottom":"Header_bui-HeaderBottom__88cf7f55e4","bui-HeaderTop":"Header_bui-HeaderTop__88cf7f55e4","bui-HeaderContent":"Header_bui-HeaderContent__88cf7f55e4","bui-HeaderStickySentinel":"Header_bui-HeaderStickySentinel__88cf7f55e4","bui-HeaderTabsWrapper":"Header_bui-HeaderTabsWrapper__88cf7f55e4","bui-HeaderControls":"Header_bui-HeaderControls__88cf7f55e4","bui-HeaderTitleStack":"Header_bui-HeaderTitleStack__88cf7f55e4","bui-HeaderBreadcrumbs":"Header_bui-HeaderBreadcrumbs__88cf7f55e4","bui-HeaderBreadcrumbsSmall":"Header_bui-HeaderBreadcrumbsSmall__88cf7f55e4","bui-HeaderBreadcrumbLink":"Header_bui-HeaderBreadcrumbLink__88cf7f55e4","bui-HeaderBreadcrumbLinkSmall":"Header_bui-HeaderBreadcrumbLinkSmall__88cf7f55e4","bui-HeaderBreadcrumbSeparator":"Header_bui-HeaderBreadcrumbSeparator__88cf7f55e4","bui-HeaderTitle":"Header_bui-HeaderTitle__88cf7f55e4","bui-HeaderTitleSmall":"Header_bui-HeaderTitleSmall__88cf7f55e4","bui-HeaderTags":"Header_bui-HeaderTags__88cf7f55e4","bui-HeaderTag":"Header_bui-HeaderTag__88cf7f55e4","bui-HeaderMetaRow":"Header_bui-HeaderMetaRow__88cf7f55e4","bui-HeaderMetaItem":"Header_bui-HeaderMetaItem__88cf7f55e4"};
|
|
5
5
|
styleInject(css_248z);
|
|
6
6
|
|
|
7
7
|
export { styles as default };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { Text } from '../Text/Text.esm.js';
|
|
3
|
+
import 'clsx';
|
|
4
|
+
import '../../hooks/useBreakpoint.esm.js';
|
|
5
|
+
import '../../hooks/useBg.esm.js';
|
|
6
|
+
import '../../hooks/useDefinition/helpers.esm.js';
|
|
7
|
+
import '../../analytics/useAnalytics.esm.js';
|
|
8
|
+
import 'react-router-dom';
|
|
9
|
+
import '../Text/Text.module.css.esm.js';
|
|
10
|
+
import { Link } from '../Link/Link.esm.js';
|
|
11
|
+
import '../Link/Link.module.css.esm.js';
|
|
12
|
+
import styles from './HeaderMetadataStatus.module.css.esm.js';
|
|
13
|
+
|
|
14
|
+
const HeaderMetadataStatus = ({
|
|
15
|
+
label,
|
|
16
|
+
color,
|
|
17
|
+
href
|
|
18
|
+
}) => {
|
|
19
|
+
return /* @__PURE__ */ jsxs("div", { className: styles.single, children: [
|
|
20
|
+
/* @__PURE__ */ jsx(
|
|
21
|
+
"span",
|
|
22
|
+
{
|
|
23
|
+
"aria-hidden": "true",
|
|
24
|
+
className: `${styles.dot} ${styles[`dot-${color}`]}`
|
|
25
|
+
}
|
|
26
|
+
),
|
|
27
|
+
/* @__PURE__ */ jsx(Text, { variant: "body-medium", children: href ? /* @__PURE__ */ jsx(Link, { href, standalone: true, children: label }) : label })
|
|
28
|
+
] });
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export { HeaderMetadataStatus };
|
|
32
|
+
//# sourceMappingURL=HeaderMetadataStatus.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HeaderMetadataStatus.esm.js","sources":["../../../src/components/Header/HeaderMetadataStatus.tsx"],"sourcesContent":["/*\n * Copyright 2026 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 { HeaderMetadataStatusProps } from './types';\nimport { Text } from '../Text';\nimport { Link } from '../Link';\nimport styles from './HeaderMetadataStatus.module.css';\n\n/**\n * Displays a single status indicator as a coloured dot with a label inside a\n * Header metadata value. Optionally renders the label as a link when href is provided.\n *\n * @public\n */\nexport const HeaderMetadataStatus = ({\n label,\n color,\n href,\n}: HeaderMetadataStatusProps) => {\n return (\n <div className={styles.single}>\n <span\n aria-hidden=\"true\"\n className={`${styles.dot} ${styles[`dot-${color}`]}`}\n />\n <Text variant=\"body-medium\">\n {href ? (\n <Link href={href} standalone>\n {label}\n </Link>\n ) : (\n label\n )}\n </Text>\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;AA2BO,MAAM,uBAAuB,CAAC;AAAA,EACnC,KAAA;AAAA,EACA,KAAA;AAAA,EACA;AACF,CAAA,KAAiC;AAC/B,EAAA,uBACE,IAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,MAAA,CAAO,MAAA,EACrB,QAAA,EAAA;AAAA,oBAAA,GAAA;AAAA,MAAC,MAAA;AAAA,MAAA;AAAA,QACC,aAAA,EAAY,MAAA;AAAA,QACZ,SAAA,EAAW,GAAG,MAAA,CAAO,GAAG,IAAI,MAAA,CAAO,CAAA,IAAA,EAAO,KAAK,CAAA,CAAE,CAAC,CAAA;AAAA;AAAA,KACpD;AAAA,oBACA,GAAA,CAAC,IAAA,EAAA,EAAK,OAAA,EAAQ,aAAA,EACX,QAAA,EAAA,IAAA,mBACC,GAAA,CAAC,IAAA,EAAA,EAAK,IAAA,EAAY,UAAA,EAAU,IAAA,EACzB,QAAA,EAAA,KAAA,EACH,CAAA,GAEA,KAAA,EAEJ;AAAA,GAAA,EACF,CAAA;AAEJ;;;;"}
|
|
@@ -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 2026 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 tokens, base, components, utilities;\n\n@layer components {\n .HeaderMetadataStatus_single__eb0b2e23ff {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: var(--bui-space-2);\n }\n\n .HeaderMetadataStatus_dot__eb0b2e23ff {\n width: 8px;\n height: 8px;\n border-radius: 50%;\n flex-shrink: 0;\n }\n\n .HeaderMetadataStatus_dot-danger__eb0b2e23ff {\n background-color: var(--bui-fg-danger);\n }\n\n .HeaderMetadataStatus_dot-warning__eb0b2e23ff {\n background-color: var(--bui-fg-warning);\n }\n\n .HeaderMetadataStatus_dot-success__eb0b2e23ff {\n background-color: var(--bui-fg-success);\n }\n\n .HeaderMetadataStatus_dot-info__eb0b2e23ff {\n background-color: var(--bui-fg-info);\n }\n}\n";
|
|
4
|
+
var styles = {"single":"HeaderMetadataStatus_single__eb0b2e23ff","dot":"HeaderMetadataStatus_dot__eb0b2e23ff","dot-danger":"HeaderMetadataStatus_dot-danger__eb0b2e23ff","dot-warning":"HeaderMetadataStatus_dot-warning__eb0b2e23ff","dot-success":"HeaderMetadataStatus_dot-success__eb0b2e23ff","dot-info":"HeaderMetadataStatus_dot-info__eb0b2e23ff"};
|
|
5
|
+
styleInject(css_248z);
|
|
6
|
+
|
|
7
|
+
export { styles as default };
|
|
8
|
+
//# sourceMappingURL=HeaderMetadataStatus.module.css.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HeaderMetadataStatus.module.css.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { Avatar } from '../Avatar/Avatar.esm.js';
|
|
3
|
+
import 'clsx';
|
|
4
|
+
import '../../hooks/useBreakpoint.esm.js';
|
|
5
|
+
import '../../hooks/useBg.esm.js';
|
|
6
|
+
import '../../hooks/useDefinition/helpers.esm.js';
|
|
7
|
+
import '../../analytics/useAnalytics.esm.js';
|
|
8
|
+
import 'react-router-dom';
|
|
9
|
+
import '../Avatar/Avatar.module.css.esm.js';
|
|
10
|
+
import { TooltipTrigger, Tooltip } from '../Tooltip/Tooltip.esm.js';
|
|
11
|
+
import '../Tooltip/Tooltip.module.css.esm.js';
|
|
12
|
+
import { Text } from '../Text/Text.esm.js';
|
|
13
|
+
import '../Text/Text.module.css.esm.js';
|
|
14
|
+
import { Link } from '../Link/Link.esm.js';
|
|
15
|
+
import '../Link/Link.module.css.esm.js';
|
|
16
|
+
import { Pressable } from 'react-aria';
|
|
17
|
+
import styles from './HeaderMetadataUsers.module.css.esm.js';
|
|
18
|
+
|
|
19
|
+
const HeaderMetadataUsers = ({
|
|
20
|
+
users
|
|
21
|
+
}) => {
|
|
22
|
+
if (users.length === 0) return null;
|
|
23
|
+
if (users.length === 1) {
|
|
24
|
+
const user = users[0];
|
|
25
|
+
if (user.href) {
|
|
26
|
+
return /* @__PURE__ */ jsxs(
|
|
27
|
+
Link,
|
|
28
|
+
{
|
|
29
|
+
href: user.href,
|
|
30
|
+
variant: "body-medium",
|
|
31
|
+
standalone: true,
|
|
32
|
+
className: styles.single,
|
|
33
|
+
children: [
|
|
34
|
+
/* @__PURE__ */ jsx(
|
|
35
|
+
Avatar,
|
|
36
|
+
{
|
|
37
|
+
src: user.src ?? "data:,",
|
|
38
|
+
name: user.name,
|
|
39
|
+
size: "small",
|
|
40
|
+
purpose: "decoration"
|
|
41
|
+
}
|
|
42
|
+
),
|
|
43
|
+
user.name
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
return /* @__PURE__ */ jsxs("div", { className: styles.single, children: [
|
|
49
|
+
/* @__PURE__ */ jsx(
|
|
50
|
+
Avatar,
|
|
51
|
+
{
|
|
52
|
+
src: user.src ?? "data:,",
|
|
53
|
+
name: user.name,
|
|
54
|
+
size: "small",
|
|
55
|
+
purpose: "decoration"
|
|
56
|
+
}
|
|
57
|
+
),
|
|
58
|
+
/* @__PURE__ */ jsx(Text, { variant: "body-medium", children: user.name })
|
|
59
|
+
] });
|
|
60
|
+
}
|
|
61
|
+
return /* @__PURE__ */ jsx("ul", { className: styles.stack, children: users.map((user, i) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs(TooltipTrigger, { children: [
|
|
62
|
+
user.href ? /* @__PURE__ */ jsx(
|
|
63
|
+
Link,
|
|
64
|
+
{
|
|
65
|
+
href: user.href,
|
|
66
|
+
"aria-label": user.name,
|
|
67
|
+
className: styles.avatarLink,
|
|
68
|
+
children: /* @__PURE__ */ jsx(
|
|
69
|
+
Avatar,
|
|
70
|
+
{
|
|
71
|
+
src: user.src ?? "data:,",
|
|
72
|
+
name: user.name,
|
|
73
|
+
size: "small",
|
|
74
|
+
purpose: "decoration"
|
|
75
|
+
}
|
|
76
|
+
)
|
|
77
|
+
}
|
|
78
|
+
) : /* @__PURE__ */ jsx(Pressable, { children: /* @__PURE__ */ jsx(
|
|
79
|
+
Avatar,
|
|
80
|
+
{
|
|
81
|
+
src: user.src ?? "data:,",
|
|
82
|
+
name: user.name,
|
|
83
|
+
size: "small",
|
|
84
|
+
purpose: "informative"
|
|
85
|
+
}
|
|
86
|
+
) }),
|
|
87
|
+
/* @__PURE__ */ jsx(Tooltip, { children: user.name })
|
|
88
|
+
] }) }, user.href ?? `${i}:${user.name}`)) });
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
export { HeaderMetadataUsers };
|
|
92
|
+
//# sourceMappingURL=HeaderMetadataUsers.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HeaderMetadataUsers.esm.js","sources":["../../../src/components/Header/HeaderMetadataUsers.tsx"],"sourcesContent":["/*\n * Copyright 2026 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 { HeaderMetadataUser } from './types';\nimport { Avatar } from '../Avatar';\nimport { Tooltip, TooltipTrigger } from '../Tooltip';\nimport { Text } from '../Text';\nimport { Link } from '../Link';\nimport { Pressable } from 'react-aria';\nimport styles from './HeaderMetadataUsers.module.css';\n\n/**\n * Displays a list of users as avatars inside a Header metadata value.\n * A single user shows the avatar with their name beside it.\n * Multiple users show avatars in a row with the name revealed on hover via tooltip.\n * When a user has an `href`, the avatar and name become links.\n *\n * @public\n */\nexport const HeaderMetadataUsers = ({\n users,\n}: {\n users: HeaderMetadataUser[];\n}) => {\n if (users.length === 0) return null;\n\n if (users.length === 1) {\n const user = users[0];\n if (user.href) {\n return (\n <Link\n href={user.href}\n variant=\"body-medium\"\n standalone\n className={styles.single}\n >\n <Avatar\n src={user.src ?? 'data:,'}\n name={user.name}\n size=\"small\"\n purpose=\"decoration\"\n />\n {user.name}\n </Link>\n );\n }\n\n return (\n <div className={styles.single}>\n <Avatar\n src={user.src ?? 'data:,'}\n name={user.name}\n size=\"small\"\n purpose=\"decoration\"\n />\n <Text variant=\"body-medium\">{user.name}</Text>\n </div>\n );\n }\n\n return (\n <ul className={styles.stack}>\n {users.map((user, i) => (\n <li key={user.href ?? `${i}:${user.name}`}>\n <TooltipTrigger>\n {user.href ? (\n <Link\n href={user.href}\n aria-label={user.name}\n className={styles.avatarLink}\n >\n <Avatar\n src={user.src ?? 'data:,'}\n name={user.name}\n size=\"small\"\n purpose=\"decoration\"\n />\n </Link>\n ) : (\n <Pressable>\n <Avatar\n src={user.src ?? 'data:,'}\n name={user.name}\n size=\"small\"\n purpose=\"informative\"\n />\n </Pressable>\n )}\n <Tooltip>{user.name}</Tooltip>\n </TooltipTrigger>\n </li>\n ))}\n </ul>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAgCO,MAAM,sBAAsB,CAAC;AAAA,EAClC;AACF,CAAA,KAEM;AACJ,EAAA,IAAI,KAAA,CAAM,MAAA,KAAW,CAAA,EAAG,OAAO,IAAA;AAE/B,EAAA,IAAI,KAAA,CAAM,WAAW,CAAA,EAAG;AACtB,IAAA,MAAM,IAAA,GAAO,MAAM,CAAC,CAAA;AACpB,IAAA,IAAI,KAAK,IAAA,EAAM;AACb,MAAA,uBACE,IAAA;AAAA,QAAC,IAAA;AAAA,QAAA;AAAA,UACC,MAAM,IAAA,CAAK,IAAA;AAAA,UACX,OAAA,EAAQ,aAAA;AAAA,UACR,UAAA,EAAU,IAAA;AAAA,UACV,WAAW,MAAA,CAAO,MAAA;AAAA,UAElB,QAAA,EAAA;AAAA,4BAAA,GAAA;AAAA,cAAC,MAAA;AAAA,cAAA;AAAA,gBACC,GAAA,EAAK,KAAK,GAAA,IAAO,QAAA;AAAA,gBACjB,MAAM,IAAA,CAAK,IAAA;AAAA,gBACX,IAAA,EAAK,OAAA;AAAA,gBACL,OAAA,EAA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AO,QAAA;AAAA,QACjB,MAAM,IAAA,CAAK,IAAA;AAAA,QACX,IAAA,EAAK,OAAA;AAAA,QACL,OAAA,EAAQ;AAAA;AAAA,KACV,EACF,CAAA;AAAA,oBAEF,GAAA,CAAC,OAAA,EAAA,EAAS,QAAA,EAAA,IAAA,CAAK,IAAA,EAAK;AAAA,GAAA,EACtB,CAAA,EAAA,EA1BO,IAAA,CAAK,IAAA,IAAQ,CAAA,EAAG,CAAC,IAAI,IAAA,CAAK,IAAI,CAAA,CA2BvC,CACD,CAAA,EACH,CAAA;AAEJ;;;;"}
|
|
@@ -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 2026 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 tokens, base, components, utilities;\n\n@layer components {\n .HeaderMetadataUsers_single__24e14a3de1 {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: var(--bui-space-2);\n }\n\n .HeaderMetadataUsers_stack__24e14a3de1 {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: var(--bui-space-1);\n list-style: none;\n margin: 0;\n padding: 0;\n }\n\n .HeaderMetadataUsers_avatarLink__24e14a3de1 {\n display: flex;\n text-decoration: none;\n }\n}\n";
|
|
4
|
+
var styles = {"single":"HeaderMetadataUsers_single__24e14a3de1","stack":"HeaderMetadataUsers_stack__24e14a3de1","avatarLink":"HeaderMetadataUsers_avatarLink__24e14a3de1"};
|
|
5
|
+
styleInject(css_248z);
|
|
6
|
+
|
|
7
|
+
export { styles as default };
|
|
8
|
+
//# sourceMappingURL=HeaderMetadataUsers.module.css.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HeaderMetadataUsers.module.css.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -10,12 +10,27 @@ import styles from './Header.module.css.esm.js';
|
|
|
10
10
|
|
|
11
11
|
const HeaderDefinition = defineComponent()({
|
|
12
12
|
styles,
|
|
13
|
+
bg: "consumer",
|
|
13
14
|
classNames: {
|
|
14
|
-
|
|
15
|
+
headerTop: "bui-HeaderTop",
|
|
16
|
+
stickySentinel: "bui-HeaderStickySentinel",
|
|
15
17
|
content: "bui-HeaderContent",
|
|
18
|
+
headerBottom: "bui-HeaderBottom",
|
|
16
19
|
breadcrumbs: "bui-HeaderBreadcrumbs",
|
|
20
|
+
breadcrumbsSmall: "bui-HeaderBreadcrumbsSmall",
|
|
21
|
+
breadcrumbLink: "bui-HeaderBreadcrumbLink",
|
|
22
|
+
breadcrumbLinkSmall: "bui-HeaderBreadcrumbLinkSmall",
|
|
23
|
+
breadcrumbSeparator: "bui-HeaderBreadcrumbSeparator",
|
|
24
|
+
titleStack: "bui-HeaderTitleStack",
|
|
25
|
+
title: "bui-HeaderTitle",
|
|
26
|
+
titleSmall: "bui-HeaderTitleSmall",
|
|
17
27
|
tabsWrapper: "bui-HeaderTabsWrapper",
|
|
18
|
-
controls: "bui-HeaderControls"
|
|
28
|
+
controls: "bui-HeaderControls",
|
|
29
|
+
tags: "bui-HeaderTags",
|
|
30
|
+
tag: "bui-HeaderTag",
|
|
31
|
+
description: "bui-HeaderDescription",
|
|
32
|
+
metaRow: "bui-HeaderMetaRow",
|
|
33
|
+
metaItem: "bui-HeaderMetaItem"
|
|
19
34
|
},
|
|
20
35
|
propDefs: {
|
|
21
36
|
title: {},
|
|
@@ -23,7 +38,11 @@ const HeaderDefinition = defineComponent()({
|
|
|
23
38
|
tabs: {},
|
|
24
39
|
activeTabId: {},
|
|
25
40
|
breadcrumbs: {},
|
|
26
|
-
|
|
41
|
+
description: {},
|
|
42
|
+
tags: {},
|
|
43
|
+
metadata: {},
|
|
44
|
+
className: {},
|
|
45
|
+
sticky: {}
|
|
27
46
|
}
|
|
28
47
|
});
|
|
29
48
|
const HeaderPageDefinition = HeaderDefinition;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definition.esm.js","sources":["../../../src/components/Header/definition.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 { defineComponent } from '../../hooks/useDefinition';\nimport type { HeaderOwnProps } from './types';\nimport styles from './Header.module.css';\n\n/**\n * Component definition for Header\n * @public\n */\nexport const HeaderDefinition = defineComponent<HeaderOwnProps>()({\n styles,\n classNames: {\n
|
|
1
|
+
{"version":3,"file":"definition.esm.js","sources":["../../../src/components/Header/definition.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 { defineComponent } from '../../hooks/useDefinition';\nimport type { HeaderOwnProps } from './types';\nimport styles from './Header.module.css';\n\n/**\n * Component definition for Header\n * @public\n */\nexport const HeaderDefinition = defineComponent<HeaderOwnProps>()({\n styles,\n bg: 'consumer',\n classNames: {\n headerTop: 'bui-HeaderTop',\n stickySentinel: 'bui-HeaderStickySentinel',\n content: 'bui-HeaderContent',\n headerBottom: 'bui-HeaderBottom',\n breadcrumbs: 'bui-HeaderBreadcrumbs',\n breadcrumbsSmall: 'bui-HeaderBreadcrumbsSmall',\n breadcrumbLink: 'bui-HeaderBreadcrumbLink',\n breadcrumbLinkSmall: 'bui-HeaderBreadcrumbLinkSmall',\n breadcrumbSeparator: 'bui-HeaderBreadcrumbSeparator',\n titleStack: 'bui-HeaderTitleStack',\n title: 'bui-HeaderTitle',\n titleSmall: 'bui-HeaderTitleSmall',\n tabsWrapper: 'bui-HeaderTabsWrapper',\n controls: 'bui-HeaderControls',\n tags: 'bui-HeaderTags',\n tag: 'bui-HeaderTag',\n description: 'bui-HeaderDescription',\n metaRow: 'bui-HeaderMetaRow',\n metaItem: 'bui-HeaderMetaItem',\n },\n propDefs: {\n title: {},\n customActions: {},\n tabs: {},\n activeTabId: {},\n breadcrumbs: {},\n description: {},\n tags: {},\n metadata: {},\n className: {},\n sticky: {},\n },\n});\n\n/**\n * @public\n * @deprecated Use {@link HeaderDefinition} instead.\n */\nexport const HeaderPageDefinition = HeaderDefinition;\n"],"names":[],"mappings":";;;;;;;;;;AAwBO,MAAM,gBAAA,GAAmB,iBAAgC,CAAE;AAAA,EAChE,MAAA;AAAA,EACA,EAAA,EAAI,UAAA;AAAA,EACJ,UAAA,EAAY;AAAA,IACV,SAAA,EAAW,eAAA;AAAA,IACX,cAAA,EAAgB,0BAAA;AAAA,IAChB,OAAA,EAAS,mBAAA;AAAA,IACT,YAAA,EAAc,kBAAA;AAAA,IACd,WAAA,EAAa,uBAAA;AAAA,IACb,gBAAA,EAAkB,4BAAA;AAAA,IAClB,cAAA,EAAgB,0BAAA;AAAA,IAChB,mBAAA,EAAqB,+BAAA;AAAA,IACrB,mBAAA,EAAqB,+BAAA;AAAA,IACrB,UAAA,EAAY,sBAAA;AAAA,IACZ,KAAA,EAAO,iBAAA;AAAA,IACP,UAAA,EAAY,sBAAA;AAAA,IACZ,WAAA,EAAa,uBAAA;AAAA,IACb,QAAA,EAAU,oBAAA;AAAA,IACV,IAAA,EAAM,gBAAA;AAAA,IACN,GAAA,EAAK,eAAA;AAAA,IACL,WAAA,EAAa,uBAAA;AAAA,IACb,OAAA,EAAS,mBAAA;AAAA,IACT,QAAA,EAAU;AAAA,GACZ;AAAA,EACA,QAAA,EAAU;AAAA,IACR,OAAO,EAAC;AAAA,IACR,eAAe,EAAC;AAAA,IAChB,MAAM,EAAC;AAAA,IACP,aAAa,EAAC;AAAA,IACd,aAAa,EAAC;AAAA,IACd,aAAa,EAAC;AAAA,IACd,MAAM,EAAC;AAAA,IACP,UAAU,EAAC;AAAA,IACX,WAAW,EAAC;AAAA,IACZ,QAAQ;AAAC;AAEb,CAAC;AAMM,MAAM,oBAAA,GAAuB;;;;"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { forwardRef, useRef } from 'react';
|
|
3
|
-
import { useLink } from 'react-aria';
|
|
3
|
+
import { useLink, useFocusRing, mergeProps } from 'react-aria';
|
|
4
4
|
import { useDefinition } from '../../hooks/useDefinition/useDefinition.esm.js';
|
|
5
|
+
import { useResolvedHref } from '../../hooks/useResolvedHref.esm.js';
|
|
5
6
|
import { LinkDefinition } from './definition.esm.js';
|
|
6
7
|
import { getNodeText } from '../../analytics/getNodeText.esm.js';
|
|
7
8
|
|
|
@@ -14,6 +15,8 @@ const LinkInternal = forwardRef((props, ref) => {
|
|
|
14
15
|
const internalRef = useRef(null);
|
|
15
16
|
const linkRef = ref || internalRef;
|
|
16
17
|
const { linkProps } = useLink(restProps, linkRef);
|
|
18
|
+
const { isFocusVisible, focusProps } = useFocusRing();
|
|
19
|
+
const resolvedHref = useResolvedHref(restProps.href);
|
|
17
20
|
const handleClick = (e) => {
|
|
18
21
|
linkProps.onClick?.(e);
|
|
19
22
|
const text = restProps["aria-label"] ?? getNodeText(children) ?? String(restProps.href ?? "");
|
|
@@ -24,12 +27,14 @@ const LinkInternal = forwardRef((props, ref) => {
|
|
|
24
27
|
return /* @__PURE__ */ jsx(
|
|
25
28
|
"a",
|
|
26
29
|
{
|
|
27
|
-
...linkProps,
|
|
30
|
+
...mergeProps(linkProps, focusProps),
|
|
28
31
|
...dataAttributes,
|
|
29
32
|
...restProps,
|
|
33
|
+
href: resolvedHref,
|
|
30
34
|
ref: linkRef,
|
|
31
35
|
title,
|
|
32
36
|
className: classes.root,
|
|
37
|
+
"data-focus-visible": isFocusVisible || void 0,
|
|
33
38
|
onClick: handleClick,
|
|
34
39
|
children
|
|
35
40
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Link.esm.js","sources":["../../../src/components/Link/Link.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { forwardRef, useRef } from 'react';\nimport { useLink } from 'react-aria';\nimport type { LinkProps } from './types';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport { LinkDefinition } from './definition';\nimport { getNodeText } from '../../analytics/getNodeText';\n\nconst LinkInternal = forwardRef<HTMLAnchorElement, LinkProps>((props, ref) => {\n const { ownProps, restProps, dataAttributes, analytics } = useDefinition(\n LinkDefinition,\n props,\n );\n const { classes, title, children } = ownProps;\n\n const internalRef = useRef<HTMLAnchorElement>(null);\n const linkRef = (ref || internalRef) as React.RefObject<HTMLAnchorElement>;\n\n const { linkProps } = useLink(restProps, linkRef);\n\n const handleClick = (e: React.MouseEvent<HTMLAnchorElement>) => {\n linkProps.onClick?.(e);\n const text =\n restProps['aria-label'] ??\n getNodeText(children) ??\n String(restProps.href ?? '');\n analytics.captureEvent('click', text, {\n attributes: { to: String(restProps.href ?? '') },\n });\n };\n\n return (\n <a\n {...linkProps}\n {...dataAttributes}\n {...(restProps as React.AnchorHTMLAttributes<HTMLAnchorElement>)}\n ref={linkRef}\n title={title}\n className={classes.root}\n onClick={handleClick}\n >\n {children}\n </a>\n );\n});\n\nLinkInternal.displayName = 'LinkInternal';\n\n/**\n * A styled anchor element that supports analytics event tracking on click.\n *\n * @public\n */\nexport const Link = forwardRef<HTMLAnchorElement, LinkProps>((props, ref) => {\n return <LinkInternal {...props} ref={ref} />;\n});\n\nLink.displayName = 'Link';\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Link.esm.js","sources":["../../../src/components/Link/Link.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { forwardRef, useRef } from 'react';\nimport { mergeProps, useFocusRing, useLink } from 'react-aria';\nimport type { LinkProps } from './types';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport { useResolvedHref } from '../../hooks/useResolvedHref';\nimport { LinkDefinition } from './definition';\nimport { getNodeText } from '../../analytics/getNodeText';\n\nconst LinkInternal = forwardRef<HTMLAnchorElement, LinkProps>((props, ref) => {\n const { ownProps, restProps, dataAttributes, analytics } = useDefinition(\n LinkDefinition,\n props,\n );\n const { classes, title, children } = ownProps;\n\n const internalRef = useRef<HTMLAnchorElement>(null);\n const linkRef = (ref || internalRef) as React.RefObject<HTMLAnchorElement>;\n\n const { linkProps } = useLink(restProps, linkRef);\n const { isFocusVisible, focusProps } = useFocusRing();\n const resolvedHref = useResolvedHref(restProps.href);\n\n const handleClick = (e: React.MouseEvent<HTMLAnchorElement>) => {\n linkProps.onClick?.(e);\n const text =\n restProps['aria-label'] ??\n getNodeText(children) ??\n String(restProps.href ?? '');\n analytics.captureEvent('click', text, {\n attributes: { to: String(restProps.href ?? '') },\n });\n };\n\n return (\n <a\n {...mergeProps(linkProps, focusProps)}\n {...dataAttributes}\n {...(restProps as React.AnchorHTMLAttributes<HTMLAnchorElement>)}\n href={resolvedHref}\n ref={linkRef}\n title={title}\n className={classes.root}\n data-focus-visible={isFocusVisible || undefined}\n onClick={handleClick}\n >\n {children}\n </a>\n );\n});\n\nLinkInternal.displayName = 'LinkInternal';\n\n/**\n * A styled anchor element that supports analytics event tracking on click.\n *\n * @public\n */\nexport const Link = forwardRef<HTMLAnchorElement, LinkProps>((props, ref) => {\n return <LinkInternal {...props} ref={ref} />;\n});\n\nLink.displayName = 'Link';\n"],"names":[],"mappings":";;;;;;;;AAwBA,MAAM,YAAA,GAAe,UAAA,CAAyC,CAAC,KAAA,EAAO,GAAA,KAAQ;AAC5E,EAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAW,cAAA,EAAgB,WAAU,GAAI,aAAA;AAAA,IACzD,cAAA;AAAA,IACA;AAAA,GACF;AACA,EAAA,MAAM,EAAE,OAAA,EAAS,KAAA,EAAO,QAAA,EAAS,GAAI,QAAA;AAErC,EAAA,MAAM,WAAA,GAAc,OAA0B,IAAI,CAAA;AAClD,EAAA,MAAM,UAAW,GAAA,IAAO,WAAA;AAExB,EAAA,MAAM,EAAE,SAAA,EAAU,GAAI,OAAA,CAAQ,WAAW,OAAO,CAAA;AAChD,EAAA,MAAM,EAAE,cAAA,EAAgB,UAAA,EAAW,GAAI,YAAA,EAAa;AACpD,EAAA,MAAM,YAAA,GAAe,eAAA,CAAgB,SAAA,CAAU,IAAI,CAAA;AAEnD,EAAA,MAAM,WAAA,GAAc,CAAC,CAAA,KAA2C;AAC9D,IAAA,SAAA,CAAU,UAAU,CAAC,CAAA;AACrB,IAAA,MAAM,IAAA,GACJ,SAAA,CAAU,YAAY,CAAA,IACtB,WAAA,CAAY,QAAQ,CAAA,IACpB,MAAA,CAAO,SAAA,CAAU,IAAA,IAAQ,EAAE,CAAA;AAC7B,IAAA,SAAA,CAAU,YAAA,CAAa,SAAS,IAAA,EAAM;AAAA,MACpC,YAAY,EAAE,EAAA,EAAI,OAAO,SAAA,CAAU,IAAA,IAAQ,EAAE,CAAA;AAAE,KAChD,CAAA;AAAA,EACH,CAAA;AAEA,EAAA,uBACE,GAAA;AAAA,IAAC,GAAA;AAAA,IAAA;AAAA,MACE,GAAG,UAAA,CAAW,SAAA,EAAW,UAAU,CAAA;AAAA,MACnC,GAAG,cAAA;AAAA,MACH,GAAI,SAAA;AAAA,MACL,IAAA,EAAM,YAAA;AAAA,MACN,GAAA,EAAK,OAAA;AAAA,MACL,KAAA;AAAA,MACA,WAAW,OAAA,CAAQ,IAAA;AAAA,MACnB,sBAAoB,cAAA,IAAkB,MAAA;AAAA,MACtC,OAAA,EAAS,WAAA;AAAA,MAER;AAAA;AAAA,GACH;AAEJ,CAAC,CAAA;AAED,YAAA,CAAa,WAAA,GAAc,cAAA;AAOpB,MAAM,IAAA,GAAO,UAAA,CAAyC,CAAC,KAAA,EAAO,GAAA,KAAQ;AAC3E,EAAA,uBAAO,GAAA,CAAC,YAAA,EAAA,EAAc,GAAG,KAAA,EAAO,GAAA,EAAU,CAAA;AAC5C,CAAC;AAED,IAAA,CAAK,WAAA,GAAc,MAAA;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import styleInject from '../../node_modules_dist/style-inject/dist/style-inject.es.esm.js';
|
|
2
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 tokens, base, components, utilities;\n\n@layer components {\n .Link_bui-
|
|
4
|
-
var styles = {"bui-Link":"Link_bui-
|
|
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 tokens, base, components, utilities;\n\n@layer components {\n .Link_bui-Link__b9cba1725b {\n font-family: var(--bui-font-regular);\n padding: 0;\n margin: 0;\n cursor: pointer;\n display: inline-block;\n\n text-decoration-line: underline;\n text-decoration-style: solid;\n text-decoration-thickness: min(2px, max(1px, 0.05em));\n text-underline-offset: calc(0.025em + 2px);\n text-decoration-color: color-mix(in srgb, currentColor 30%, transparent);\n\n &:hover {\n text-decoration-line: underline;\n text-decoration-style: solid;\n text-decoration-thickness: min(2px, max(1px, 0.05em));\n text-underline-offset: calc(0.025em + 2px);\n text-decoration-color: color-mix(in srgb, currentColor 30%, transparent);\n }\n\n &[data-focus-visible] {\n outline: 2px solid var(--bui-ring);\n outline-offset: 2px;\n }\n }\n\n .Link_bui-Link__b9cba1725b[data-variant='title-large'] {\n font-size: var(--bui-font-size-8);\n line-height: 140%;\n }\n\n .Link_bui-Link__b9cba1725b[data-variant='title-medium'] {\n font-size: var(--bui-font-size-7);\n line-height: 140%;\n }\n\n .Link_bui-Link__b9cba1725b[data-variant='title-small'] {\n font-size: var(--bui-font-size-6);\n line-height: 140%;\n }\n\n .Link_bui-Link__b9cba1725b[data-variant='title-x-small'] {\n font-size: var(--bui-font-size-5);\n line-height: 140%;\n }\n\n .Link_bui-Link__b9cba1725b[data-variant='body-large'] {\n font-size: var(--bui-font-size-4);\n line-height: 140%;\n }\n\n .Link_bui-Link__b9cba1725b[data-variant='body-medium'] {\n font-size: var(--bui-font-size-3);\n line-height: 140%;\n }\n\n .Link_bui-Link__b9cba1725b[data-variant='body-small'] {\n font-size: var(--bui-font-size-2);\n line-height: 140%;\n }\n\n .Link_bui-Link__b9cba1725b[data-variant='body-x-small'] {\n font-size: var(--bui-font-size-1);\n line-height: 140%;\n }\n\n .Link_bui-Link__b9cba1725b[data-weight='regular'] {\n font-weight: var(--bui-font-weight-regular);\n }\n\n .Link_bui-Link__b9cba1725b[data-weight='bold'] {\n font-weight: var(--bui-font-weight-bold);\n }\n\n .Link_bui-Link__b9cba1725b[data-color='primary'] {\n color: var(--bui-fg-primary);\n }\n\n .Link_bui-Link__b9cba1725b[data-color='secondary'] {\n color: var(--bui-fg-secondary);\n }\n\n .Link_bui-Link__b9cba1725b[data-color='danger'] {\n color: var(--bui-fg-danger);\n }\n\n .Link_bui-Link__b9cba1725b[data-color='warning'] {\n color: var(--bui-fg-warning);\n }\n\n .Link_bui-Link__b9cba1725b[data-color='success'] {\n color: var(--bui-fg-success);\n }\n\n .Link_bui-Link__b9cba1725b[data-color='info'] {\n color: var(--bui-fg-info);\n }\n\n .Link_bui-Link__b9cba1725b[data-truncate] {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .Link_bui-Link__b9cba1725b[data-standalone] {\n text-decoration-line: none;\n\n &:hover {\n text-decoration-line: underline;\n text-decoration-style: solid;\n text-decoration-thickness: min(2px, max(1px, 0.05em));\n text-underline-offset: calc(0.025em + 2px);\n text-decoration-color: color-mix(in srgb, currentColor 30%, transparent);\n }\n }\n}\n";
|
|
4
|
+
var styles = {"bui-Link":"Link_bui-Link__b9cba1725b"};
|
|
5
5
|
styleInject(css_248z);
|
|
6
6
|
|
|
7
7
|
export { styles as default };
|