@backstage/ui 0.14.1 → 0.14.3

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 CHANGED
@@ -1,5 +1,19 @@
1
1
  # @backstage/ui
2
2
 
3
+ ## 0.14.3
4
+
5
+ ### Patch Changes
6
+
7
+ - a58f74d: Fixed external URLs in BUI link components being rewritten as in-app paths when the app is served under a non-root base path. Absolute URLs (`http://`, `https://`, `//`, `mailto:`, `tel:`) are now passed through unchanged. Internal `href` values are resolved against the current `basename` exactly once, which also fixes a latent issue where internal link clicks under a non-root base path could navigate to a URL with the `basename` prefix doubled.
8
+
9
+ **Affected components:** ButtonLink, Card, Link, Menu, Tab, Table, Tag
10
+
11
+ ## 0.14.2
12
+
13
+ ### Patch Changes
14
+
15
+ - 3f6e04c: Tightened React Aria dependency version ranges from `^` to `~` to prevent unintended minor version upgrades.
16
+
3
17
  ## 0.14.1
4
18
 
5
19
  ### Patch Changes
@@ -2,6 +2,7 @@ import { jsx } from 'react/jsx-runtime';
2
2
  import { forwardRef, useRef } from 'react';
3
3
  import { useLink } 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,7 @@ 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 resolvedHref = useResolvedHref(restProps.href);
17
19
  const handleClick = (e) => {
18
20
  linkProps.onClick?.(e);
19
21
  const text = restProps["aria-label"] ?? getNodeText(children) ?? String(restProps.href ?? "");
@@ -27,6 +29,7 @@ const LinkInternal = forwardRef((props, ref) => {
27
29
  ...linkProps,
28
30
  ...dataAttributes,
29
31
  ...restProps,
32
+ href: resolvedHref,
30
33
  ref: linkRef,
31
34
  title,
32
35
  className: classes.root,
@@ -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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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
+ {"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 { 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 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 {...linkProps}\n {...dataAttributes}\n {...(restProps as React.AnchorHTMLAttributes<HTMLAnchorElement>)}\n href={resolvedHref}\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":";;;;;;;;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,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,SAAA;AAAA,MACH,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,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;;;;"}
@@ -5,15 +5,22 @@ import { useBgProvider, useBgConsumer, BgProvider } from '../useBg.esm.js';
5
5
  import { resolveDefinitionProps, processUtilityProps } from './helpers.esm.js';
6
6
  import { useAnalytics, noopTracker } from '../../analytics/useAnalytics.esm.js';
7
7
  import { useInRouterContext, useHref } from 'react-router-dom';
8
+ import { isExternalLink } from '../../utils/linkUtils.esm.js';
8
9
 
9
10
  function useDefinition(definition, props, options) {
10
11
  const { breakpoint } = useBreakpoint();
11
12
  let hrefResolvedProps = props;
12
13
  const hasRouter = useInRouterContext();
13
14
  if (hasRouter) {
14
- const absoluteHref = useHref(props.href ?? "");
15
- if (props.href !== void 0) {
16
- hrefResolvedProps = { ...props, href: absoluteHref };
15
+ const rawHref = props.href;
16
+ const basename = useHref("/").replace(/\/+$/, "") || "/";
17
+ const absoluteHref = useHref(rawHref ?? "");
18
+ if (rawHref !== void 0 && !isExternalLink(rawHref)) {
19
+ let stripped = absoluteHref;
20
+ if (basename !== "/" && (absoluteHref === basename || absoluteHref.startsWith(`${basename}/`))) {
21
+ stripped = absoluteHref === basename ? "/" : absoluteHref.slice(basename.length);
22
+ }
23
+ hrefResolvedProps = { ...props, href: stripped };
17
24
  }
18
25
  }
19
26
  const { ownPropsResolved, restProps } = resolveDefinitionProps(
@@ -1 +1 @@
1
- {"version":3,"file":"useDefinition.esm.js","sources":["../../../src/hooks/useDefinition/useDefinition.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 { ReactNode } from 'react';\nimport clsx from 'clsx';\nimport { useBreakpoint } from '../useBreakpoint';\nimport { useBgProvider, useBgConsumer, BgProvider } from '../useBg';\nimport { resolveDefinitionProps, processUtilityProps } from './helpers';\nimport { useAnalytics } from '../../analytics/useAnalytics';\nimport { noopTracker } from '../../analytics/useAnalytics';\nimport { useInRouterContext, useHref } from 'react-router-dom';\nimport type {\n ComponentConfig,\n UseDefinitionOptions,\n UseDefinitionResult,\n UtilityKeys,\n} from './types';\n\nexport function useDefinition<\n D extends ComponentConfig<any, any>,\n P extends Record<string, any>,\n>(\n definition: D,\n props: P,\n options?: UseDefinitionOptions<D>,\n): UseDefinitionResult<D, P> {\n const { breakpoint } = useBreakpoint();\n\n // Turn relative href into an absolute path using the current route\n // context, so that client-side navigation works correctly.\n let hrefResolvedProps = props;\n const hasRouter = useInRouterContext();\n // useHref throws outside a Router, so we guard with useInRouterContext.\n // The guard is safe because a component's router context does not\n // change during its lifetime, keeping the hook call count stable.\n if (hasRouter) {\n const absoluteHref = useHref((props as any).href ?? '');\n if ((props as any).href !== undefined) {\n hrefResolvedProps = { ...props, href: absoluteHref } as P;\n }\n }\n\n // Resolve all props centrally — applies responsive values and defaults\n const { ownPropsResolved, restProps } = resolveDefinitionProps(\n definition,\n hrefResolvedProps,\n breakpoint,\n );\n\n const dataAttributes: Record<string, string | undefined> = {};\n\n for (const [key, config] of Object.entries(definition.propDefs)) {\n const finalValue = ownPropsResolved[key];\n\n if (finalValue !== undefined) {\n // Skip data-bg for bg prop when the provider path handles it\n if (key === 'bg' && definition.bg === 'provider') continue;\n\n if ((config as any).dataAttribute) {\n // eslint-disable-next-line no-restricted-syntax\n dataAttributes[`data-${key.toLowerCase()}`] = String(finalValue);\n }\n }\n }\n\n // Provider: resolve bg and provide context for children\n const providerBg = useBgProvider(\n definition.bg === 'provider' ? ownPropsResolved.bg : undefined,\n );\n\n // Consumer: read parent context bg\n const consumerBg = useBgConsumer();\n\n // Provider: set data-bg from the resolved provider bg\n if (definition.bg === 'provider' && providerBg.bg !== undefined) {\n dataAttributes['data-bg'] = String(providerBg.bg);\n }\n\n // Consumer: set data-on-bg from the parent context\n if (definition.bg === 'consumer' && consumerBg.bg !== undefined) {\n dataAttributes['data-on-bg'] = String(consumerBg.bg);\n }\n\n const { utilityClasses, utilityStyle } = processUtilityProps<UtilityKeys<D>>(\n props,\n (definition.utilityProps ?? []) as readonly UtilityKeys<D>[],\n );\n\n // Analytics: conditionally call useAnalytics based on definition flag\n let analytics = noopTracker;\n if (definition.analytics) {\n const tracker = useAnalytics();\n analytics = ownPropsResolved.noTrack ? noopTracker : tracker;\n }\n\n const utilityTarget = options?.utilityTarget ?? 'root';\n const classNameTarget = options?.classNameTarget ?? 'root';\n\n const classes: Record<string, string> = {};\n\n for (const [name, cssKey] of Object.entries(definition.classNames)) {\n classes[name] = clsx(\n cssKey as string,\n definition.styles[cssKey as keyof typeof definition.styles],\n utilityTarget === name && utilityClasses,\n classNameTarget === name && ownPropsResolved.className,\n );\n }\n\n let children: ReactNode | undefined;\n let childrenWithBgProvider: ReactNode | undefined;\n\n if (definition.bg === 'provider') {\n childrenWithBgProvider = providerBg.bg ? (\n <BgProvider bg={providerBg.bg}>{props.children}</BgProvider>\n ) : (\n props.children\n );\n } else {\n children = props.children;\n }\n\n return {\n ownProps: {\n classes,\n ...ownPropsResolved,\n ...(definition.bg === 'provider'\n ? { childrenWithBgProvider }\n : { children }),\n },\n restProps,\n dataAttributes,\n utilityStyle,\n ...(definition.analytics ? { analytics } : {}),\n } as unknown as UseDefinitionResult<D, P>;\n}\n"],"names":[],"mappings":";;;;;;;;AA+BO,SAAS,aAAA,CAId,UAAA,EACA,KAAA,EACA,OAAA,EAC2B;AAC3B,EAAA,MAAM,EAAE,UAAA,EAAW,GAAI,aAAA,EAAc;AAIrC,EAAA,IAAI,iBAAA,GAAoB,KAAA;AACxB,EAAA,MAAM,YAAY,kBAAA,EAAmB;AAIrC,EAAA,IAAI,SAAA,EAAW;AACb,IAAA,MAAM,YAAA,GAAe,OAAA,CAAS,KAAA,CAAc,IAAA,IAAQ,EAAE,CAAA;AACtD,IAAA,IAAK,KAAA,CAAc,SAAS,MAAA,EAAW;AACrC,MAAA,iBAAA,GAAoB,EAAE,GAAG,KAAA,EAAO,IAAA,EAAM,YAAA,EAAa;AAAA,IACrD;AAAA,EACF;AAGA,EAAA,MAAM,EAAE,gBAAA,EAAkB,SAAA,EAAU,GAAI,sBAAA;AAAA,IACtC,UAAA;AAAA,IACA,iBAAA;AAAA,IACA;AAAA,GACF;AAEA,EAAA,MAAM,iBAAqD,EAAC;AAE5D,EAAA,KAAA,MAAW,CAAC,KAAK,MAAM,CAAA,IAAK,OAAO,OAAA,CAAQ,UAAA,CAAW,QAAQ,CAAA,EAAG;AAC/D,IAAA,MAAM,UAAA,GAAa,iBAAiB,GAAG,CAAA;AAEvC,IAAA,IAAI,eAAe,MAAA,EAAW;AAE5B,MAAA,IAAI,GAAA,KAAQ,IAAA,IAAQ,UAAA,CAAW,EAAA,KAAO,UAAA,EAAY;AAElD,MAAA,IAAK,OAAe,aAAA,EAAe;AAEjC,QAAA,cAAA,CAAe,QAAQ,GAAA,CAAI,WAAA,EAAa,CAAA,CAAE,CAAA,GAAI,OAA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,MAC1D,kBAAkB,IAAA,IAAQ,cAAA;AAAA,MAC1B,eAAA,KAAoB,QAAQ,gBAAA,CAAiB;AAAA,KAC/C;AAAA,EACF;AAEA,EAAA,IAAI,QAAA;AACJ,EAAA,IAAI,sBAAA;AAEJ,EAAA,IAAI,UAAA,CAAW,OAAO,UAAA,EAAY;AAChC,IAAA,sBAAA,GAAyB,UAAA,CAAW,EAAA,mBAClC,GAAA,CAAC,UAAA,EAAA,EAAW,EAAA,EAAI,WAAW,EAAA,EAAK,QAAA,EAAA,KAAA,CAAM,QAAA,EAAS,CAAA,GAE/C,KAAA,CAAM,QAAA;AAAA,EAEV,CAAA,MAAO;AACL,IAAA,QAAA,GAAW,KAAA,CAAM,QAAA;AAAA,EACnB;AAEA,EAAA,OAAO;AAAA,IACL,QAAA,EAAU;AAAA,MACR,OAAA;AAAA,MACA,GAAG,gBAAA;AAAA,MACH,GAAI,WAAW,EAAA,KAAO,UAAA,GAClB,EAAE,sBAAA,EAAuB,GACzB,EAAE,QAAA;AAAS,KACjB;AAAA,IACA,SAAA;AAAA,IACA,cAAA;AAAA,IACA,YAAA;AAAA,IACA,GAAI,UAAA,CAAW,SAAA,GAAY,EAAE,SAAA,KAAc;AAAC,GAC9C;AACF;;;;"}
1
+ {"version":3,"file":"useDefinition.esm.js","sources":["../../../src/hooks/useDefinition/useDefinition.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 { ReactNode } from 'react';\nimport clsx from 'clsx';\nimport { useBreakpoint } from '../useBreakpoint';\nimport { useBgProvider, useBgConsumer, BgProvider } from '../useBg';\nimport { resolveDefinitionProps, processUtilityProps } from './helpers';\nimport { useAnalytics } from '../../analytics/useAnalytics';\nimport { noopTracker } from '../../analytics/useAnalytics';\nimport { useHref, useInRouterContext } from 'react-router-dom';\nimport { isExternalLink } from '../../utils/linkUtils';\nimport type {\n ComponentConfig,\n UseDefinitionOptions,\n UseDefinitionResult,\n UtilityKeys,\n} from './types';\n\nexport function useDefinition<\n D extends ComponentConfig<any, any>,\n P extends Record<string, any>,\n>(\n definition: D,\n props: P,\n options?: UseDefinitionOptions<D>,\n): UseDefinitionResult<D, P> {\n const { breakpoint } = useBreakpoint();\n\n // Pre-resolve href at component render time (where route context is\n // correct), so that click-navigation has a correct absolute path\n // regardless of where useNavigate is called. `useHref` returns the\n // path with basename prepended; strip it so the output is the\n // canonical pre-basename form that react-router's downstream useHref\n // and navigate both expect as input (avoids double-prefixing).\n // External URLs bypass resolution.\n let hrefResolvedProps = props;\n const hasRouter = useInRouterContext();\n if (hasRouter) {\n const rawHref = (props as any).href;\n // useHref('/') returns the router's basename. Strip trailing slashes\n // so the prefix check works regardless of how the consumer configured\n // their <Router basename>.\n const basename = useHref('/').replace(/\\/+$/, '') || '/';\n const absoluteHref = useHref(rawHref ?? '');\n if (rawHref !== undefined && !isExternalLink(rawHref)) {\n let stripped = absoluteHref;\n if (\n basename !== '/' &&\n (absoluteHref === basename || absoluteHref.startsWith(`${basename}/`))\n ) {\n stripped =\n absoluteHref === basename ? '/' : absoluteHref.slice(basename.length);\n }\n hrefResolvedProps = { ...props, href: stripped } as P;\n }\n }\n\n // Resolve all props centrally — applies responsive values and defaults\n const { ownPropsResolved, restProps } = resolveDefinitionProps(\n definition,\n hrefResolvedProps,\n breakpoint,\n );\n\n const dataAttributes: Record<string, string | undefined> = {};\n\n for (const [key, config] of Object.entries(definition.propDefs)) {\n const finalValue = ownPropsResolved[key];\n\n if (finalValue !== undefined) {\n // Skip data-bg for bg prop when the provider path handles it\n if (key === 'bg' && definition.bg === 'provider') continue;\n\n if ((config as any).dataAttribute) {\n // eslint-disable-next-line no-restricted-syntax\n dataAttributes[`data-${key.toLowerCase()}`] = String(finalValue);\n }\n }\n }\n\n // Provider: resolve bg and provide context for children\n const providerBg = useBgProvider(\n definition.bg === 'provider' ? ownPropsResolved.bg : undefined,\n );\n\n // Consumer: read parent context bg\n const consumerBg = useBgConsumer();\n\n // Provider: set data-bg from the resolved provider bg\n if (definition.bg === 'provider' && providerBg.bg !== undefined) {\n dataAttributes['data-bg'] = String(providerBg.bg);\n }\n\n // Consumer: set data-on-bg from the parent context\n if (definition.bg === 'consumer' && consumerBg.bg !== undefined) {\n dataAttributes['data-on-bg'] = String(consumerBg.bg);\n }\n\n const { utilityClasses, utilityStyle } = processUtilityProps<UtilityKeys<D>>(\n props,\n (definition.utilityProps ?? []) as readonly UtilityKeys<D>[],\n );\n\n // Analytics: conditionally call useAnalytics based on definition flag\n let analytics = noopTracker;\n if (definition.analytics) {\n const tracker = useAnalytics();\n analytics = ownPropsResolved.noTrack ? noopTracker : tracker;\n }\n\n const utilityTarget = options?.utilityTarget ?? 'root';\n const classNameTarget = options?.classNameTarget ?? 'root';\n\n const classes: Record<string, string> = {};\n\n for (const [name, cssKey] of Object.entries(definition.classNames)) {\n classes[name] = clsx(\n cssKey as string,\n definition.styles[cssKey as keyof typeof definition.styles],\n utilityTarget === name && utilityClasses,\n classNameTarget === name && ownPropsResolved.className,\n );\n }\n\n let children: ReactNode | undefined;\n let childrenWithBgProvider: ReactNode | undefined;\n\n if (definition.bg === 'provider') {\n childrenWithBgProvider = providerBg.bg ? (\n <BgProvider bg={providerBg.bg}>{props.children}</BgProvider>\n ) : (\n props.children\n );\n } else {\n children = props.children;\n }\n\n return {\n ownProps: {\n classes,\n ...ownPropsResolved,\n ...(definition.bg === 'provider'\n ? { childrenWithBgProvider }\n : { children }),\n },\n restProps,\n dataAttributes,\n utilityStyle,\n ...(definition.analytics ? { analytics } : {}),\n } as unknown as UseDefinitionResult<D, P>;\n}\n"],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,EAAC;AAEzC,EAAA,KAAA,MAAW,CAAC,MAAM,MAAM,CAAA,IAAK,OAAO,OAAA,CAAQ,UAAA,CAAW,UAAU,CAAA,EAAG;AAClE,IAAA,OAAA,CAAQ,IAAI,CAAA,GAAI,IAAA;AAAA,MACd,MAAA;AAAA,MACA,UAAA,CAAW,OAAO,MAAwC,CAAA;AAAA,MAC1D,kBAAkB,IAAA,IAAQ,cAAA;AAAA,MAC1B,eAAA,KAAoB,QAAQ,gBAAA,CAAiB;AAAA,KAC/C;AAAA,EACF;AAEA,EAAA,IAAI,QAAA;AACJ,EAAA,IAAI,sBAAA;AAEJ,EAAA,IAAI,UAAA,CAAW,OAAO,UAAA,EAAY;AAChC,IAAA,sBAAA,GAAyB,UAAA,CAAW,EAAA,mBAClC,GAAA,CAAC,UAAA,EAAA,EAAW,EAAA,EAAI,WAAW,EAAA,EAAK,QAAA,EAAA,KAAA,CAAM,QAAA,EAAS,CAAA,GAE/C,KAAA,CAAM,QAAA;AAAA,EAEV,CAAA,MAAO;AACL,IAAA,QAAA,GAAW,KAAA,CAAM,QAAA;AAAA,EACnB;AAEA,EAAA,OAAO;AAAA,IACL,QAAA,EAAU;AAAA,MACR,OAAA;AAAA,MACA,GAAG,gBAAA;AAAA,MACH,GAAI,WAAW,EAAA,KAAO,UAAA,GAClB,EAAE,sBAAA,EAAuB,GACzB,EAAE,QAAA;AAAS,KACjB;AAAA,IACA,SAAA;AAAA,IACA,cAAA;AAAA,IACA,YAAA;AAAA,IACA,GAAI,UAAA,CAAW,SAAA,GAAY,EAAE,SAAA,KAAc;AAAC,GAC9C;AACF;;;;"}
@@ -0,0 +1,17 @@
1
+ import { useInRouterContext, useHref } from 'react-router-dom';
2
+ import { isExternalLink } from '../utils/linkUtils.esm.js';
3
+
4
+ function useResolvedHref(href) {
5
+ const hasRouter = useInRouterContext();
6
+ if (!hasRouter) {
7
+ return href;
8
+ }
9
+ const resolved = useHref(href ?? "");
10
+ if (!href || isExternalLink(href)) {
11
+ return href;
12
+ }
13
+ return resolved;
14
+ }
15
+
16
+ export { useResolvedHref };
17
+ //# sourceMappingURL=useResolvedHref.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useResolvedHref.esm.js","sources":["../../src/hooks/useResolvedHref.ts"],"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 { useHref, useInRouterContext } from 'react-router-dom';\nimport { isExternalLink } from '../utils/linkUtils';\n\n/**\n * Resolves an href for rendering. External URLs are returned unchanged;\n * internal paths are resolved through react-router's useHref so they\n * respect the current basename and route context.\n *\n * @internal\n */\nexport function useResolvedHref(href: string): string;\nexport function useResolvedHref(href: string | undefined): string | undefined;\nexport function useResolvedHref(href: string | undefined): string | undefined {\n const hasRouter = useInRouterContext();\n // useHref throws outside a Router, so we guard with useInRouterContext.\n // The guard is safe because a component's router context does not\n // change during its lifetime, keeping the hook call count stable.\n if (!hasRouter) {\n return href;\n }\n const resolved = useHref(href ?? '');\n if (!href || isExternalLink(href)) {\n return href;\n }\n return resolved;\n}\n"],"names":[],"mappings":";;;AA4BO,SAAS,gBAAgB,IAAA,EAA8C;AAC5E,EAAA,MAAM,YAAY,kBAAA,EAAmB;AAIrC,EAAA,IAAI,CAAC,SAAA,EAAW;AACd,IAAA,OAAO,IAAA;AAAA,EACT;AACA,EAAA,MAAM,QAAA,GAAW,OAAA,CAAQ,IAAA,IAAQ,EAAE,CAAA;AACnC,EAAA,IAAI,CAAC,IAAA,IAAQ,cAAA,CAAe,IAAI,CAAA,EAAG;AACjC,IAAA,OAAO,IAAA;AAAA,EACT;AACA,EAAA,OAAO,QAAA;AACT;;;;"}
@@ -1,9 +1,10 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
2
  import { useMemo } from 'react';
3
3
  import { RouterProvider } from 'react-aria-components';
4
- import { useInRouterContext, useNavigate, useHref } from 'react-router-dom';
4
+ import { useInRouterContext, useNavigate } from 'react-router-dom';
5
5
  import { createVersionedValueMap } from '@backstage/version-bridge';
6
6
  import { BUIContext } from '../analytics/useAnalytics.esm.js';
7
+ import { useResolvedHref } from '../hooks/useResolvedHref.esm.js';
7
8
 
8
9
  function BUIProvider(props) {
9
10
  const { useAnalytics, children } = props;
@@ -21,7 +22,7 @@ function BUIProvider(props) {
21
22
  }
22
23
  function RoutedContent({ children }) {
23
24
  const navigate = useNavigate();
24
- return /* @__PURE__ */ jsx(RouterProvider, { navigate, useHref, children });
25
+ return /* @__PURE__ */ jsx(RouterProvider, { navigate, useHref: useResolvedHref, children });
25
26
  }
26
27
 
27
28
  export { BUIProvider };
@@ -1 +1 @@
1
- {"version":3,"file":"BUIProvider.esm.js","sources":["../../src/provider/BUIProvider.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 { useMemo, type ReactNode } from 'react';\nimport { RouterProvider } from 'react-aria-components';\nimport { useInRouterContext, useNavigate, useHref } from 'react-router-dom';\nimport { createVersionedValueMap } from '@backstage/version-bridge';\nimport { BUIContext } from '../analytics/useAnalytics';\nimport type { UseAnalyticsFn } from '../analytics/types';\n\n/** @public */\nexport type BUIProviderProps = {\n useAnalytics?: UseAnalyticsFn;\n children: ReactNode;\n};\n\n/**\n * Provides integration capabilities to all descendant BUI components.\n *\n * @example\n * ```tsx\n * import { BUIProvider } from '@backstage/ui';\n * import { useAnalytics as useBackstageAnalytics } from '@backstage/core-plugin-api';\n *\n * function App() {\n * return (\n * <BUIProvider useAnalytics={useBackstageAnalytics}>\n * <AppContent />\n * </BUIProvider>\n * );\n * }\n * ```\n *\n * @public\n */\nexport function BUIProvider(props: BUIProviderProps) {\n const { useAnalytics, children } = props;\n const value = useMemo(\n () =>\n createVersionedValueMap({\n 1: { useAnalytics },\n }),\n [useAnalytics],\n );\n\n const content = (\n <BUIContext.Provider value={value}>{children}</BUIContext.Provider>\n );\n\n if (useInRouterContext()) {\n return <RoutedContent>{content}</RoutedContent>;\n }\n\n return content;\n}\n\nfunction RoutedContent({ children }: { children: ReactNode }) {\n const navigate = useNavigate();\n return (\n <RouterProvider navigate={navigate} useHref={useHref}>\n {children}\n </RouterProvider>\n );\n}\n"],"names":[],"mappings":";;;;;;;AAgDO,SAAS,YAAY,KAAA,EAAyB;AACnD,EAAA,MAAM,EAAE,YAAA,EAAc,QAAA,EAAS,GAAI,KAAA;AACnC,EAAA,MAAM,KAAA,GAAQ,OAAA;AAAA,IACZ,MACE,uBAAA,CAAwB;AAAA,MACtB,CAAA,EAAG,EAAE,YAAA;AAAa,KACnB,CAAA;AAAA,IACH,CAAC,YAAY;AAAA,GACf;AAEA,EAAA,MAAM,0BACJ,GAAA,CAAC,UAAA,CAAW,QAAA,EAAX,EAAoB,OAAe,QAAA,EAAS,CAAA;AAG/C,EAAA,IAAI,oBAAmB,EAAG;AACxB,IAAA,uBAAO,GAAA,CAAC,iBAAe,QAAA,EAAA,OAAA,EAAQ,CAAA;AAAA,EACjC;AAEA,EAAA,OAAO,OAAA;AACT;AAEA,SAAS,aAAA,CAAc,EAAE,QAAA,EAAS,EAA4B;AAC5D,EAAA,MAAM,WAAW,WAAA,EAAY;AAC7B,EAAA,uBACE,GAAA,CAAC,cAAA,EAAA,EAAe,QAAA,EAAoB,OAAA,EACjC,QAAA,EACH,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"BUIProvider.esm.js","sources":["../../src/provider/BUIProvider.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 { useMemo, type ReactNode } from 'react';\nimport { RouterProvider } from 'react-aria-components';\nimport { useInRouterContext, useNavigate } from 'react-router-dom';\nimport { createVersionedValueMap } from '@backstage/version-bridge';\nimport { BUIContext } from '../analytics/useAnalytics';\nimport { useResolvedHref } from '../hooks/useResolvedHref';\nimport type { UseAnalyticsFn } from '../analytics/types';\n\n/** @public */\nexport type BUIProviderProps = {\n useAnalytics?: UseAnalyticsFn;\n children: ReactNode;\n};\n\n/**\n * Provides integration capabilities to all descendant BUI components.\n *\n * @example\n * ```tsx\n * import { BUIProvider } from '@backstage/ui';\n * import { useAnalytics as useBackstageAnalytics } from '@backstage/core-plugin-api';\n *\n * function App() {\n * return (\n * <BUIProvider useAnalytics={useBackstageAnalytics}>\n * <AppContent />\n * </BUIProvider>\n * );\n * }\n * ```\n *\n * @public\n */\nexport function BUIProvider(props: BUIProviderProps) {\n const { useAnalytics, children } = props;\n const value = useMemo(\n () =>\n createVersionedValueMap({\n 1: { useAnalytics },\n }),\n [useAnalytics],\n );\n\n const content = (\n <BUIContext.Provider value={value}>{children}</BUIContext.Provider>\n );\n\n if (useInRouterContext()) {\n return <RoutedContent>{content}</RoutedContent>;\n }\n\n return content;\n}\n\nfunction RoutedContent({ children }: { children: ReactNode }) {\n const navigate = useNavigate();\n return (\n <RouterProvider navigate={navigate} useHref={useResolvedHref}>\n {children}\n </RouterProvider>\n );\n}\n"],"names":[],"mappings":";;;;;;;;AAiDO,SAAS,YAAY,KAAA,EAAyB;AACnD,EAAA,MAAM,EAAE,YAAA,EAAc,QAAA,EAAS,GAAI,KAAA;AACnC,EAAA,MAAM,KAAA,GAAQ,OAAA;AAAA,IACZ,MACE,uBAAA,CAAwB;AAAA,MACtB,CAAA,EAAG,EAAE,YAAA;AAAa,KACnB,CAAA;AAAA,IACH,CAAC,YAAY;AAAA,GACf;AAEA,EAAA,MAAM,0BACJ,GAAA,CAAC,UAAA,CAAW,QAAA,EAAX,EAAoB,OAAe,QAAA,EAAS,CAAA;AAG/C,EAAA,IAAI,oBAAmB,EAAG;AACxB,IAAA,uBAAO,GAAA,CAAC,iBAAe,QAAA,EAAA,OAAA,EAAQ,CAAA;AAAA,EACjC;AAEA,EAAA,OAAO,OAAA;AACT;AAEA,SAAS,aAAA,CAAc,EAAE,QAAA,EAAS,EAA4B;AAC5D,EAAA,MAAM,WAAW,WAAA,EAAY;AAC7B,EAAA,uBACE,GAAA,CAAC,cAAA,EAAA,EAAe,QAAA,EAAoB,OAAA,EAAS,iBAC1C,QAAA,EACH,CAAA;AAEJ;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/ui",
3
- "version": "0.14.1",
3
+ "version": "0.14.3",
4
4
  "backstage": {
5
5
  "role": "web-library"
6
6
  },
@@ -54,9 +54,9 @@
54
54
  "@remixicon/react": "^4.6.0",
55
55
  "@tanstack/react-table": "^8.21.3",
56
56
  "clsx": "^2.1.1",
57
- "react-aria": "^3.48.0",
58
- "react-aria-components": "^1.17.0",
59
- "react-stately": "^3.46.0",
57
+ "react-aria": "~3.48.0",
58
+ "react-aria-components": "~1.17.0",
59
+ "react-stately": "~3.46.0",
60
60
  "use-sync-external-store": "^1.4.0"
61
61
  },
62
62
  "devDependencies": {