@primer/react 0.0.0-20260326174612 → 0.0.0-20260326183142
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 +1 -38
- package/dist/ActionBar/ActionBar.d.ts +1 -1
- package/dist/ActionBar/index.d.ts +1 -1
- package/dist/ActionList/LinkItem.d.ts +3 -6
- package/dist/ActionList/LinkItem.d.ts.map +1 -1
- package/dist/ActionList/LinkItem.js +87 -42
- package/dist/ActionList/index.d.ts +1 -25
- package/dist/ActionList/index.d.ts.map +1 -1
- package/dist/ActionMenu/{ActionMenu-58362ca7.css → ActionMenu-53493541.css} +2 -2
- package/dist/ActionMenu/ActionMenu-53493541.css.map +1 -0
- package/dist/ActionMenu/ActionMenu.d.ts.map +1 -1
- package/dist/ActionMenu/ActionMenu.js +2 -5
- package/dist/ActionMenu/ActionMenu.module.css.js +1 -1
- package/dist/Banner/Banner.js +1 -1
- package/dist/Breadcrumbs/Breadcrumbs.d.ts +8 -23
- package/dist/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
- package/dist/Breadcrumbs/Breadcrumbs.js +65 -27
- package/dist/Button/{ButtonBase-4da3fa22.css → ButtonBase-6659abcf.css} +2 -2
- package/dist/Button/ButtonBase-6659abcf.css.map +1 -0
- package/dist/Button/ButtonBase.js +1 -1
- package/dist/Button/ButtonBase.module.css.js +2 -2
- package/dist/Button/types.d.ts +1 -1
- package/dist/Button/types.d.ts.map +1 -1
- package/dist/Details/Details.js +1 -1
- package/dist/Dialog/{Dialog-b577691f.css → Dialog-2de477b3.css} +2 -2
- package/dist/Dialog/Dialog-2de477b3.css.map +1 -0
- package/dist/Dialog/Dialog.d.ts.map +1 -1
- package/dist/Dialog/Dialog.js +1 -29
- package/dist/Dialog/Dialog.module.css.js +1 -1
- package/dist/FeatureFlags/DefaultFeatureFlags.js +1 -1
- package/dist/FilteredActionList/FilteredActionList-02db90c6.css +2 -0
- package/dist/FilteredActionList/FilteredActionList-02db90c6.css.map +1 -0
- package/dist/FilteredActionList/FilteredActionList.module.css.js +1 -1
- package/dist/IndexTable/IndexTable-5e45cbdd.css +2 -0
- package/dist/IndexTable/IndexTable-5e45cbdd.css.map +1 -0
- package/dist/IndexTable/IndexTable.d.ts +166 -0
- package/dist/IndexTable/IndexTable.d.ts.map +1 -0
- package/dist/IndexTable/IndexTable.js +1693 -0
- package/dist/IndexTable/IndexTable.module.css.js +5 -0
- package/dist/IndexTable/IndexTableContext.d.ts +21 -0
- package/dist/IndexTable/IndexTableContext.d.ts.map +1 -0
- package/dist/IndexTable/IndexTableContext.js +16 -0
- package/dist/IndexTable/index.d.ts +33 -0
- package/dist/IndexTable/index.d.ts.map +1 -0
- package/dist/IndexTable/index.js +34 -0
- package/dist/IndexTable/useSelection.d.ts +32 -0
- package/dist/IndexTable/useSelection.d.ts.map +1 -0
- package/dist/IndexTable/useSelection.js +151 -0
- package/dist/Link/{Link-ba423096.css → Link-968346ff.css} +2 -2
- package/dist/Link/Link-968346ff.css.map +1 -0
- package/dist/Link/Link.js +1 -2
- package/dist/Link/Link.module.css.js +1 -1
- package/dist/NavList/NavList.d.ts +3 -20
- package/dist/NavList/NavList.d.ts.map +1 -1
- package/dist/NavList/NavList.js +124 -50
- package/dist/Overlay/{Overlay-f81a131d.css → Overlay-2e0ce8db.css} +2 -2
- package/dist/Overlay/Overlay-2e0ce8db.css.map +1 -0
- package/dist/Overlay/Overlay.d.ts.map +1 -1
- package/dist/Overlay/Overlay.js +22 -35
- package/dist/Overlay/Overlay.module.css.js +1 -1
- package/dist/SelectPanel/SelectPanel.d.ts +2 -2
- package/dist/SelectPanel/SelectPanel.d.ts.map +1 -1
- package/dist/SelectPanel/SelectPanel.js +0 -2
- package/dist/Timeline/Timeline-19bef8c5.css +2 -0
- package/dist/Timeline/Timeline-19bef8c5.css.map +1 -0
- package/dist/Timeline/Timeline.d.ts +1 -1
- package/dist/Timeline/Timeline.d.ts.map +1 -1
- package/dist/Timeline/Timeline.js +14 -27
- package/dist/Timeline/Timeline.module.css.js +1 -1
- package/dist/TooltipV2/{Tooltip-dd983e5b.css → Tooltip-fcb90d9c.css} +2 -2
- package/dist/TooltipV2/Tooltip-fcb90d9c.css.map +1 -0
- package/dist/TooltipV2/Tooltip.d.ts +1 -1
- package/dist/TooltipV2/Tooltip.d.ts.map +1 -1
- package/dist/TooltipV2/Tooltip.js +11 -17
- package/dist/TooltipV2/Tooltip.module.css.js +2 -2
- package/dist/hooks/index.d.ts +0 -1
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/useProvidedRefOrCreate.d.ts +0 -12
- package/dist/hooks/useProvidedRefOrCreate.d.ts.map +1 -1
- package/dist/hooks/useProvidedRefOrCreate.js +0 -12
- package/dist/hooks/useRefObjectAsForwardedRef.d.ts +0 -12
- package/dist/hooks/useRefObjectAsForwardedRef.d.ts.map +1 -1
- package/dist/hooks/useRefObjectAsForwardedRef.js +0 -12
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroup.d.ts.map +1 -1
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroup.js +8 -17
- package/dist/internal/hooks/useMergedRefs.d.ts +2 -0
- package/dist/internal/hooks/useMergedRefs.d.ts.map +1 -0
- package/dist/internal/hooks/useMergedRefs.js +16 -0
- package/generated/components.json +6 -20
- package/generated/hooks.json +0 -22
- package/package.json +1 -1
- package/dist/ActionMenu/ActionMenu-58362ca7.css.map +0 -1
- package/dist/Button/ButtonBase-4da3fa22.css.map +0 -1
- package/dist/Dialog/Dialog-b577691f.css.map +0 -1
- package/dist/FilteredActionList/FilteredActionList-6808e67a.css +0 -2
- package/dist/FilteredActionList/FilteredActionList-6808e67a.css.map +0 -1
- package/dist/Link/Link-ba423096.css.map +0 -1
- package/dist/Overlay/Overlay-f81a131d.css.map +0 -1
- package/dist/Timeline/Timeline-4d67684a.css +0 -2
- package/dist/Timeline/Timeline-4d67684a.css.map +0 -1
- package/dist/TooltipV2/Tooltip-dd983e5b.css.map +0 -1
- package/dist/hooks/useMergedRefs.d.ts +0 -51
- package/dist/hooks/useMergedRefs.d.ts.map +0 -1
- package/dist/hooks/useMergedRefs.js +0 -86
package/CHANGELOG.md
CHANGED
|
@@ -1,48 +1,11 @@
|
|
|
1
1
|
# @primer/react
|
|
2
2
|
|
|
3
|
-
## 0.0.0-
|
|
4
|
-
|
|
5
|
-
### Minor Changes
|
|
6
|
-
|
|
7
|
-
- [#7700](https://github.com/primer/react/pull/7700) [`91bf343`](https://github.com/primer/react/commit/91bf343210483be373f7ec5ce1ba652518a9ce4c) Thanks [@francinelucca](https://github.com/francinelucca)! - ActionMenu: Graduate `primer_react_action_menu_display_in_viewport_inside_dialog` feature flag. ActionMenu now automatically uses `displayInViewport` when rendered inside a Dialog, without requiring the feature flag.
|
|
8
|
-
|
|
9
|
-
- [#7699](https://github.com/primer/react/pull/7699) [`1505d9b`](https://github.com/primer/react/commit/1505d9b06bbcbb1d6bf87b4d21461d79b71eff10) Thanks [@francinelucca](https://github.com/francinelucca)! - SelectPanel: Add `displayInViewport` prop
|
|
10
|
-
|
|
11
|
-
- [#7662](https://github.com/primer/react/pull/7662) [`39c8cf3`](https://github.com/primer/react/commit/39c8cf30254268d770422b9d890d96da51d35d89) Thanks [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)! - Timeline: Update `clipSidebar` prop to accept `'start'`, `'end'`, or `'both'` in addition to `boolean`. Use `'start'` to only clip the top, `'end'` to only clip the bottom, or `'both'`/`true` to clip both ends.
|
|
3
|
+
## 0.0.0-20260326183142
|
|
12
4
|
|
|
13
5
|
### Patch Changes
|
|
14
6
|
|
|
15
|
-
- [#7690](https://github.com/primer/react/pull/7690) [`b492cc8`](https://github.com/primer/react/commit/b492cc82efdb68189a070dfa7fcd88f18cc9d7b4) Thanks [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)! - fix(Button): Apply inline-flex display to loading wrapper for link variant buttons
|
|
16
|
-
|
|
17
|
-
- [#7696](https://github.com/primer/react/pull/7696) [`1acb7d3`](https://github.com/primer/react/commit/1acb7d3dc416094e481ac9b45d3fa45ebd527c86) Thanks [@francinelucca](https://github.com/francinelucca)! - Fix item dividers not visible in SelectPanel and FilteredActionList when `showItemDividers` is enabled, caused by `content-visibility: auto` clipping the absolutely-positioned divider pseudo-elements.
|
|
18
|
-
|
|
19
7
|
- Fake entry to force publishing
|
|
20
8
|
|
|
21
|
-
- [#7683](https://github.com/primer/react/pull/7683) [`f05fcac`](https://github.com/primer/react/commit/f05fcacedafe8a9a1af9caa6a762403d47851250) Thanks [@liuliu-dev](https://github.com/liuliu-dev)! - Dialog: dynamically switch footer button layout based on available height.
|
|
22
|
-
|
|
23
|
-
- [#7676](https://github.com/primer/react/pull/7676) [`35ca056`](https://github.com/primer/react/commit/35ca05690910ffb8286a2aeef01c043af377a6c2) Thanks [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)! - Remove link underline effect on hover for both Link (inline) and Button with variant link (no visuals)
|
|
24
|
-
|
|
25
|
-
- [#7631](https://github.com/primer/react/pull/7631) [`0ecaf6f`](https://github.com/primer/react/commit/0ecaf6f64c50235081416515b7d5b6b2e364b33f) Thanks [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)! - Add test to validate that the `muted` prop is not leaked as a bare DOM attribute on `Link`
|
|
26
|
-
|
|
27
|
-
## 38.17.0
|
|
28
|
-
|
|
29
|
-
### Minor Changes
|
|
30
|
-
|
|
31
|
-
- [#7658](https://github.com/primer/react/pull/7658) [`259fdff`](https://github.com/primer/react/commit/259fdff67550e328b851129a78e87413ddb07229) Thanks [@hussam-i-am](https://github.com/hussam-i-am)! - fix(polymorphic): Improve prop passthrough for ActionList.LinkItem and Breadcrumbs.Item
|
|
32
|
-
|
|
33
|
-
- [#7672](https://github.com/primer/react/pull/7672) [`77735f9`](https://github.com/primer/react/commit/77735f975c71b267130899fc1fd7b47bcb5f062d) Thanks [@iansan5653](https://github.com/iansan5653)! - - New: Exposes new `useMergedRefs` hook that can merge two refs into a single combined ref
|
|
34
|
-
|
|
35
|
-
- Deprecates `useRefObjectAsForwardedRef`; see doc comment for migration instructions
|
|
36
|
-
- Deprecates `useProvidedRefOrCreate`; see doc comment for migration instructions
|
|
37
|
-
|
|
38
|
-
- [#7623](https://github.com/primer/react/pull/7623) [`42847d1`](https://github.com/primer/react/commit/42847d1bb943c2db6d2309dfd604e8d3ab55d387) Thanks [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)! - `IconButton`: `keybindingHint` now accepts `string[]` in addition to `string`. Multiple hints are rendered joined with "or".
|
|
39
|
-
|
|
40
|
-
### Patch Changes
|
|
41
|
-
|
|
42
|
-
- [#7510](https://github.com/primer/react/pull/7510) [`8fa988b`](https://github.com/primer/react/commit/8fa988ba613117874657af722ef6de768b0e0eb8) Thanks [@francinelucca](https://github.com/francinelucca)! - chore: ensure max-height does not surpass viewport height in Overlay, ActionMenu under feature flag
|
|
43
|
-
|
|
44
|
-
- [#7682](https://github.com/primer/react/pull/7682) [`8aed331`](https://github.com/primer/react/commit/8aed331f9dcb8c51d86bf531f7e331a6ccd23d9a) Thanks [@llastflowers](https://github.com/llastflowers)! - Update CheckboxOrRadioGroup.tsx to add `required` announcement
|
|
45
|
-
|
|
46
9
|
## 38.16.0
|
|
47
10
|
|
|
48
11
|
### Minor Changes
|
|
@@ -118,7 +118,7 @@ export declare const ActionBarMenu: React.ForwardRefExoticComponent<{
|
|
|
118
118
|
description?: string;
|
|
119
119
|
tooltipDirection?: import("../TooltipV2").TooltipDirection;
|
|
120
120
|
keyshortcuts?: string;
|
|
121
|
-
keybindingHint?: string
|
|
121
|
+
keybindingHint?: string;
|
|
122
122
|
} & Omit<import("..").ButtonBaseProps, "aria-label" | "aria-labelledby"> & React.RefAttributes<unknown>>;
|
|
123
123
|
export declare const VerticalDivider: () => React.JSX.Element | null;
|
|
124
124
|
export {};
|
|
@@ -20,7 +20,7 @@ declare const ActionBar: import("react").FC<import("react").PropsWithChildren<im
|
|
|
20
20
|
description?: string;
|
|
21
21
|
tooltipDirection?: import("../TooltipV2").TooltipDirection;
|
|
22
22
|
keyshortcuts?: string;
|
|
23
|
-
keybindingHint?: string
|
|
23
|
+
keybindingHint?: string;
|
|
24
24
|
} & Omit<import("..").ButtonBaseProps, "aria-label" | "aria-labelledby"> & import("react").RefAttributes<unknown>>;
|
|
25
25
|
};
|
|
26
26
|
export default ActionBar;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type {
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ForwardRefComponent as PolymorphicForwardRefComponent } from '../utils/polymorphic';
|
|
3
3
|
import type { ActionListItemProps } from './shared';
|
|
4
4
|
type LinkProps = {
|
|
5
5
|
download?: string;
|
|
@@ -14,9 +14,6 @@ type LinkProps = {
|
|
|
14
14
|
className?: string;
|
|
15
15
|
};
|
|
16
16
|
export type ActionListLinkItemProps = Pick<ActionListItemProps, 'active' | 'children' | 'inactiveText' | 'variant' | 'size'> & LinkProps;
|
|
17
|
-
declare const
|
|
18
|
-
as?: As | undefined;
|
|
19
|
-
} & React.RefAttributes<unknown>) => React.ReactNode;
|
|
20
|
-
export declare const LinkItem: WithSlotMarker<typeof LinkItemComponent>;
|
|
17
|
+
export declare const LinkItem: PolymorphicForwardRefComponent<"a", ActionListLinkItemProps>;
|
|
21
18
|
export {};
|
|
22
19
|
//# sourceMappingURL=LinkItem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinkItem.d.ts","sourceRoot":"","sources":["../../src/ActionList/LinkItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"LinkItem.d.ts","sourceRoot":"","sources":["../../src/ActionList/LinkItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,EAAC,mBAAmB,IAAI,8BAA8B,EAAC,MAAM,sBAAsB,CAAA;AAG/F,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,UAAU,CAAA;AAGjD,KAAK,SAAS,GAAG;IACf,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,cAAc,CAAC,EAAE,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,CAAC,gBAAgB,CAAC,CAAA;IAChF,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAGD,MAAM,MAAM,uBAAuB,GAAG,IAAI,CACxC,mBAAmB,EACnB,QAAQ,GAAG,UAAU,GAAG,cAAc,GAAG,SAAS,GAAG,MAAM,CAC5D,GACC,SAAS,CAAA;AAEX,eAAO,MAAM,QAAQ,EA4BhB,8BAA8B,CAAC,GAAG,EAAE,uBAAuB,CAAC,CAAA"}
|
|
@@ -1,46 +1,62 @@
|
|
|
1
|
+
import { c } from 'react-compiler-runtime';
|
|
2
|
+
import React from 'react';
|
|
1
3
|
import { Item } from './Item.js';
|
|
2
|
-
import { fixedForwardRef } from '../utils/modern-polymorphic.js';
|
|
3
4
|
import { jsx } from 'react/jsx-runtime';
|
|
4
5
|
import Link from '../Link/Link.js';
|
|
5
6
|
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
7
|
+
const LinkItem = /*#__PURE__*/React.forwardRef((t0, forwardedRef) => {
|
|
8
|
+
const $ = c(22);
|
|
9
|
+
let Component;
|
|
10
|
+
let active;
|
|
11
|
+
let className;
|
|
12
|
+
let inactiveText;
|
|
13
|
+
let props;
|
|
14
|
+
let size;
|
|
15
|
+
let variant;
|
|
16
|
+
if ($[0] !== t0) {
|
|
17
|
+
({
|
|
18
|
+
active,
|
|
19
|
+
inactiveText,
|
|
20
|
+
variant,
|
|
21
|
+
size,
|
|
22
|
+
as: Component,
|
|
23
|
+
className,
|
|
24
|
+
...props
|
|
25
|
+
} = t0);
|
|
26
|
+
$[0] = t0;
|
|
27
|
+
$[1] = Component;
|
|
28
|
+
$[2] = active;
|
|
29
|
+
$[3] = className;
|
|
30
|
+
$[4] = inactiveText;
|
|
31
|
+
$[5] = props;
|
|
32
|
+
$[6] = size;
|
|
33
|
+
$[7] = variant;
|
|
34
|
+
} else {
|
|
35
|
+
Component = $[1];
|
|
36
|
+
active = $[2];
|
|
37
|
+
className = $[3];
|
|
38
|
+
inactiveText = $[4];
|
|
39
|
+
props = $[5];
|
|
40
|
+
size = $[6];
|
|
41
|
+
variant = $[7];
|
|
42
|
+
}
|
|
43
|
+
const t1 = inactiveText ? true : undefined;
|
|
44
|
+
let t2;
|
|
45
|
+
if ($[8] !== Component || $[9] !== forwardedRef || $[10] !== inactiveText || $[11] !== props) {
|
|
46
|
+
t2 = t3 => {
|
|
47
|
+
const {
|
|
48
|
+
children,
|
|
49
|
+
onClick,
|
|
50
|
+
...rest
|
|
51
|
+
} = t3;
|
|
27
52
|
const clickHandler = event => {
|
|
28
53
|
onClick && onClick(event);
|
|
29
54
|
props.onClick && props.onClick(event);
|
|
30
55
|
};
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
// Type safety for the polymorphic `as` prop is enforced at the
|
|
39
|
-
// LinkItem boundary via fixedForwardRef. Internally we widen
|
|
40
|
-
// Link's type so TypeScript doesn't re-check the generic
|
|
41
|
-
// constraint across two polymorphic layers.
|
|
42
|
-
const InternalLink = Link;
|
|
43
|
-
return /*#__PURE__*/jsx(InternalLink, {
|
|
56
|
+
return inactiveText ? /*#__PURE__*/jsx("span", {
|
|
57
|
+
...rest,
|
|
58
|
+
children: children
|
|
59
|
+
}) : /*#__PURE__*/jsx(Link, {
|
|
44
60
|
as: Component,
|
|
45
61
|
...rest,
|
|
46
62
|
...props,
|
|
@@ -48,13 +64,42 @@ const LinkItemComponent = fixedForwardRef(({
|
|
|
48
64
|
ref: forwardedRef,
|
|
49
65
|
children: children
|
|
50
66
|
});
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
67
|
+
};
|
|
68
|
+
$[8] = Component;
|
|
69
|
+
$[9] = forwardedRef;
|
|
70
|
+
$[10] = inactiveText;
|
|
71
|
+
$[11] = props;
|
|
72
|
+
$[12] = t2;
|
|
73
|
+
} else {
|
|
74
|
+
t2 = $[12];
|
|
75
|
+
}
|
|
76
|
+
let t3;
|
|
77
|
+
if ($[13] !== active || $[14] !== className || $[15] !== inactiveText || $[16] !== props.children || $[17] !== size || $[18] !== t1 || $[19] !== t2 || $[20] !== variant) {
|
|
78
|
+
t3 = /*#__PURE__*/jsx(Item, {
|
|
79
|
+
className: className,
|
|
80
|
+
active: active,
|
|
81
|
+
inactiveText: inactiveText,
|
|
82
|
+
"data-inactive": t1,
|
|
83
|
+
variant: variant,
|
|
84
|
+
size: size,
|
|
85
|
+
_PrivateItemWrapper: t2,
|
|
86
|
+
children: props.children
|
|
87
|
+
});
|
|
88
|
+
$[13] = active;
|
|
89
|
+
$[14] = className;
|
|
90
|
+
$[15] = inactiveText;
|
|
91
|
+
$[16] = props.children;
|
|
92
|
+
$[17] = size;
|
|
93
|
+
$[18] = t1;
|
|
94
|
+
$[19] = t2;
|
|
95
|
+
$[20] = variant;
|
|
96
|
+
$[21] = t3;
|
|
97
|
+
} else {
|
|
98
|
+
t3 = $[21];
|
|
99
|
+
}
|
|
100
|
+
return t3;
|
|
58
101
|
});
|
|
102
|
+
LinkItem.displayName = 'ActionList.LinkItem';
|
|
103
|
+
LinkItem.__SLOT__ = Symbol('ActionList.LinkItem');
|
|
59
104
|
|
|
60
105
|
export { LinkItem };
|
|
@@ -84,31 +84,7 @@ export declare const ActionList: (<As extends React.ElementType = "ul">(props: (
|
|
|
84
84
|
__SLOT__: symbol;
|
|
85
85
|
};
|
|
86
86
|
/** A `Item` that renders a full-size anchor inside ListItem */
|
|
87
|
-
LinkItem: import("../utils/
|
|
88
|
-
download?: string;
|
|
89
|
-
href?: string;
|
|
90
|
-
hrefLang?: string;
|
|
91
|
-
media?: string;
|
|
92
|
-
ping?: string;
|
|
93
|
-
rel?: string;
|
|
94
|
-
target?: string;
|
|
95
|
-
type?: string;
|
|
96
|
-
referrerPolicy?: React.AnchorHTMLAttributes<HTMLAnchorElement>["referrerPolicy"];
|
|
97
|
-
className?: string;
|
|
98
|
-
} extends infer T ? T extends import("react").ComponentPropsWithRef<import("react").ElementType extends As ? "a" : As> & Pick<import("./shared").ActionListItemProps, "children" | "size" | "active" | "variant" | "inactiveText"> & {
|
|
99
|
-
download?: string;
|
|
100
|
-
href?: string;
|
|
101
|
-
hrefLang?: string;
|
|
102
|
-
media?: string;
|
|
103
|
-
ping?: string;
|
|
104
|
-
rel?: string;
|
|
105
|
-
target?: string;
|
|
106
|
-
type?: string;
|
|
107
|
-
referrerPolicy?: React.AnchorHTMLAttributes<HTMLAnchorElement>["referrerPolicy"];
|
|
108
|
-
className?: string;
|
|
109
|
-
} ? T extends unknown ? Omit<T, "as"> : never : never : never) & {
|
|
110
|
-
as?: As | undefined;
|
|
111
|
-
} & import("react").RefAttributes<unknown>) => React.ReactNode)>;
|
|
87
|
+
LinkItem: import("../utils/polymorphic").ForwardRefComponent<"a", import("./LinkItem").ActionListLinkItemProps>;
|
|
112
88
|
/** Visually separates `Item`s or `Group`s in an `ActionList`. */
|
|
113
89
|
Divider: import("../utils/types").FCWithSlotMarker<import("react").PropsWithChildren<import("./Divider").ActionListDividerProps>>;
|
|
114
90
|
/** Secondary text which provides additional information about an `Item`. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ActionList/index.ts"],"names":[],"mappings":"AAUA,YAAY,EAAC,eAAe,EAAC,MAAM,UAAU,CAAA;AAC7C,YAAY,EAAC,oBAAoB,EAAE,2BAA2B,EAAC,MAAM,SAAS,CAAA;AAC9E,YAAY,EAAC,mBAAmB,EAAC,MAAM,UAAU,CAAA;AACjD,YAAY,EAAC,uBAAuB,EAAC,MAAM,YAAY,CAAA;AACvD,YAAY,EAAC,sBAAsB,EAAC,MAAM,WAAW,CAAA;AACrD,YAAY,EAAC,0BAA0B,EAAC,MAAM,eAAe,CAAA;AAC7D,YAAY,EAAC,4BAA4B,EAAE,6BAA6B,EAAC,MAAM,WAAW,CAAA;AAC1F,YAAY,EAAC,sBAAsB,EAAC,MAAM,WAAW,CAAA;AACrD,YAAY,EAAC,6BAA6B,EAAC,MAAM,kBAAkB,CAAA;AAEnE;;GAEG;AACH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;IACrB,mDAAmD;;IAGnD,yCAAyC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAGzC,+DAA+D
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ActionList/index.ts"],"names":[],"mappings":"AAUA,YAAY,EAAC,eAAe,EAAC,MAAM,UAAU,CAAA;AAC7C,YAAY,EAAC,oBAAoB,EAAE,2BAA2B,EAAC,MAAM,SAAS,CAAA;AAC9E,YAAY,EAAC,mBAAmB,EAAC,MAAM,UAAU,CAAA;AACjD,YAAY,EAAC,uBAAuB,EAAC,MAAM,YAAY,CAAA;AACvD,YAAY,EAAC,sBAAsB,EAAC,MAAM,WAAW,CAAA;AACrD,YAAY,EAAC,0BAA0B,EAAC,MAAM,eAAe,CAAA;AAC7D,YAAY,EAAC,4BAA4B,EAAE,6BAA6B,EAAC,MAAM,WAAW,CAAA;AAC1F,YAAY,EAAC,sBAAsB,EAAC,MAAM,WAAW,CAAA;AACrD,YAAY,EAAC,6BAA6B,EAAC,MAAM,kBAAkB,CAAA;AAEnE;;GAEG;AACH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;IACrB,mDAAmD;;IAGnD,yCAAyC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAGzC,+DAA+D;;IAG/D,iEAAiE;;IAGjE,4EAA4E;;IAG5E,uDAAuD;;IAGvD,sDAAsD;;IAGtD,mCAAmC;;IAGnC,qCAAqC;;IAGrC,uBAAuB;;CAEvB,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
.prc-ActionMenu-ActionMenuContainer-Om1Qz{max-height:100vh}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-variant=fullscreen]){padding-top:var(--base-size-36,2.25rem)}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-overflow-auto]){overflow:auto}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-overflow-hidden]){overflow:hidden}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-overflow-scroll]){overflow:scroll}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-overflow-visible]){overflow:visible}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-max-height-xsmall]){max-height:192px}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-max-height-small]){max-height:256px}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-max-height-medium]){max-height:320px}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-max-height-large]){max-height:432px}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-max-height-xlarge]){max-height:600px}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-max-height-
|
|
2
|
-
/*# sourceMappingURL=ActionMenu-
|
|
1
|
+
.prc-ActionMenu-ActionMenuContainer-Om1Qz{max-height:100vh}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-variant=fullscreen]){padding-top:var(--base-size-36,2.25rem)}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-overflow-auto]){overflow:auto}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-overflow-hidden]){overflow:hidden}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-overflow-scroll]){overflow:scroll}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-overflow-visible]){overflow:visible}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-max-height-xsmall]){max-height:192px}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-max-height-small]){max-height:256px}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-max-height-medium]){max-height:320px}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-max-height-large]){max-height:432px}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-max-height-xlarge]){max-height:600px}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-max-height-fit-content]){max-height:-moz-fit-content;max-height:fit-content}
|
|
2
|
+
/*# sourceMappingURL=ActionMenu-53493541.css.map */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/ActionMenu/ActionMenu.module.css.js"],"names":[],"mappings":"AAAA,0CAEE,gBA+CF,CA7CE,2EACE,uCACF,CAGA,sEACE,aACF,CAEA,wEACE,eACF,CAEA,wEACE,eACF,CAEA,yEACE,gBACF,CAGA,0EACE,gBACF,CAEA,yEACE,gBACF,CAEA,0EACE,gBACF,CAEA,yEACE,gBACF,CAEA,0EACE,gBACF,CAEA,+EACE,2BAAuB,CAAvB,sBACF","file":"ActionMenu-53493541.css","sourcesContent":[".ActionMenuContainer {\n /* add default max height */\n max-height: 100vh;\n\n &:where([data-variant='fullscreen']) {\n padding-top: var(--base-size-36);\n }\n\n /* Overflow variants */\n &:where([data-overflow-auto]) {\n overflow: auto;\n }\n\n &:where([data-overflow-hidden]) {\n overflow: hidden;\n }\n\n &:where([data-overflow-scroll]) {\n overflow: scroll;\n }\n\n &:where([data-overflow-visible]) {\n overflow: visible;\n }\n\n /* Max-height size tokens (mirror Overlay sizes) */\n &:where([data-max-height-xsmall]) {\n max-height: 192px;\n }\n\n &:where([data-max-height-small]) {\n max-height: 256px;\n }\n\n &:where([data-max-height-medium]) {\n max-height: 320px;\n }\n\n &:where([data-max-height-large]) {\n max-height: 432px;\n }\n\n &:where([data-max-height-xlarge]) {\n max-height: 600px;\n }\n\n &:where([data-max-height-fit-content]) {\n max-height: fit-content;\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionMenu.d.ts","sourceRoot":"","sources":["../../src/ActionMenu/ActionMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8D,MAAM,OAAO,CAAA;AAGlF,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,oBAAoB,CAAA;AAE5D,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,YAAY,CAAA;AAI5C,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,WAAW,CAAA;AAC1C,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,mBAAmB,CAAA;AAIrD,OAAO,KAAK,EAAC,mBAAmB,IAAI,8BAA8B,EAAC,MAAM,sBAAsB,CAAA;AAK/F,OAAO,KAAK,EAAC,gBAAgB,EAAE,cAAc,EAAC,MAAM,sBAAsB,CAAA;AAI1E,MAAM,MAAM,gBAAgB,GAAG,CAC7B,OAAO,EAAE,cAAc,GAAG,eAAe,GAAG,QAAQ,GAAG,KAAK,GAAG,aAAa,GAAG,YAAY,GAAG,OAAO,KAClG,IAAI,CAAA;AAET,MAAM,MAAM,gBAAgB,GAAG,IAAI,CACjC,oBAAoB,EACpB,WAAW,GAAG,cAAc,GAAG,MAAM,GAAG,QAAQ,GAAG,UAAU,CAC9D,GAAG;IACF,OAAO,CAAC,EAAE,gBAAgB,CAAA;IAC1B,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB,CAAA;AAGD,MAAM,MAAM,eAAe,GAAG;IAC5B;;OAEG;IAEH,QAAQ,EAAE,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,EAAE,GAAG,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,CAAA;IAE7D;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAA;IAEd;;OAEG;IACH,YAAY,CAAC,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,IAAI,CAAA;CACpC,GAAG,IAAI,CAAC,oBAAoB,EAAE,WAAW,CAAC,CAAA;AA8I3C,MAAM,MAAM,qBAAqB,GAAG;IAAC,QAAQ,EAAE,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;IAAC,EAAE,CAAC,EAAE,MAAM,CAAA;CAAC,GAAG,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,CAAA;AA2DxH,6CAA6C;AAC7C,MAAM,MAAM,qBAAqB,GAAG,WAAW,CAAA;AAe/C,KAAK,gBAAgB,GAAG,OAAO,CAAC,YAAY,CAAC,GAC3C,IAAI,CAAC,oBAAoB,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,GAAG,mBAAmB,CAAC,GAAG;IAC/E;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,gBAAgB,CAAC,EAAE,CAAC,EAAC,QAAQ,EAAC,EAAE;QAAC,QAAQ,EAAE,cAAc,CAAA;KAAC,KAAK,IAAI,CAAA;CACpE,CAAA;
|
|
1
|
+
{"version":3,"file":"ActionMenu.d.ts","sourceRoot":"","sources":["../../src/ActionMenu/ActionMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8D,MAAM,OAAO,CAAA;AAGlF,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,oBAAoB,CAAA;AAE5D,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,YAAY,CAAA;AAI5C,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,WAAW,CAAA;AAC1C,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,mBAAmB,CAAA;AAIrD,OAAO,KAAK,EAAC,mBAAmB,IAAI,8BAA8B,EAAC,MAAM,sBAAsB,CAAA;AAK/F,OAAO,KAAK,EAAC,gBAAgB,EAAE,cAAc,EAAC,MAAM,sBAAsB,CAAA;AAI1E,MAAM,MAAM,gBAAgB,GAAG,CAC7B,OAAO,EAAE,cAAc,GAAG,eAAe,GAAG,QAAQ,GAAG,KAAK,GAAG,aAAa,GAAG,YAAY,GAAG,OAAO,KAClG,IAAI,CAAA;AAET,MAAM,MAAM,gBAAgB,GAAG,IAAI,CACjC,oBAAoB,EACpB,WAAW,GAAG,cAAc,GAAG,MAAM,GAAG,QAAQ,GAAG,UAAU,CAC9D,GAAG;IACF,OAAO,CAAC,EAAE,gBAAgB,CAAA;IAC1B,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB,CAAA;AAGD,MAAM,MAAM,eAAe,GAAG;IAC5B;;OAEG;IAEH,QAAQ,EAAE,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,EAAE,GAAG,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,CAAA;IAE7D;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAA;IAEd;;OAEG;IACH,YAAY,CAAC,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,IAAI,CAAA;CACpC,GAAG,IAAI,CAAC,oBAAoB,EAAE,WAAW,CAAC,CAAA;AA8I3C,MAAM,MAAM,qBAAqB,GAAG;IAAC,QAAQ,EAAE,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;IAAC,EAAE,CAAC,EAAE,MAAM,CAAA;CAAC,GAAG,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,CAAA;AA2DxH,6CAA6C;AAC7C,MAAM,MAAM,qBAAqB,GAAG,WAAW,CAAA;AAe/C,KAAK,gBAAgB,GAAG,OAAO,CAAC,YAAY,CAAC,GAC3C,IAAI,CAAC,oBAAoB,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,GAAG,mBAAmB,CAAC,GAAG;IAC/E;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,gBAAgB,CAAC,EAAE,CAAC,EAAC,QAAQ,EAAC,EAAE;QAAC,QAAQ,EAAE,cAAc,CAAA;KAAC,KAAK,IAAI,CAAA;CACpE,CAAA;AAgHH,eAAO,MAAM,UAAU;;;kBA7LP,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC;aAC5B,MAAM;;;;CA4L4E,CAAA"}
|
|
@@ -264,7 +264,7 @@ const Overlay = ({
|
|
|
264
264
|
}
|
|
265
265
|
}
|
|
266
266
|
}, [anchorRef]);
|
|
267
|
-
const
|
|
267
|
+
const featureFlagDisplayInViewportInsideDialog = useFeatureFlag('primer_react_action_menu_display_in_viewport_inside_dialog');
|
|
268
268
|
const isInsideDialog = useContext(DialogContext) !== undefined;
|
|
269
269
|
return /*#__PURE__*/jsx(AnchoredOverlay, {
|
|
270
270
|
anchorRef: anchorRef,
|
|
@@ -283,14 +283,11 @@ const Overlay = ({
|
|
|
283
283
|
},
|
|
284
284
|
onPositionChange: onPositionChange,
|
|
285
285
|
variant: variant,
|
|
286
|
-
displayInViewport: displayInViewport !== undefined ? displayInViewport : isInsideDialog,
|
|
286
|
+
displayInViewport: displayInViewport !== undefined ? displayInViewport : featureFlagDisplayInViewportInsideDialog && isInsideDialog,
|
|
287
287
|
children: /*#__PURE__*/jsx("div", {
|
|
288
288
|
ref: containerRef,
|
|
289
289
|
className: styles.ActionMenuContainer,
|
|
290
290
|
"data-variant": responsiveVariant,
|
|
291
|
-
...(featureFlagMaxHeightClampToViewport ? {
|
|
292
|
-
'data-max-height-clamp-to-viewport': ''
|
|
293
|
-
} : {}),
|
|
294
291
|
...(overlayProps.overflow ? {
|
|
295
292
|
[`data-overflow-${overlayProps.overflow}`]: ''
|
|
296
293
|
} : {}),
|
package/dist/Banner/Banner.js
CHANGED
|
@@ -3,7 +3,7 @@ import React, { useEffect, forwardRef } from 'react';
|
|
|
3
3
|
import { XIcon, AlertIcon, InfoIcon, CheckCircleIcon, StopIcon } from '@primer/octicons-react';
|
|
4
4
|
import { IconButton } from '../Button/IconButton.js';
|
|
5
5
|
import { ButtonComponent } from '../Button/Button.js';
|
|
6
|
-
import { useMergedRefs } from '../hooks/useMergedRefs.js';
|
|
6
|
+
import { useMergedRefs } from '../internal/hooks/useMergedRefs.js';
|
|
7
7
|
import { useId } from '../hooks/useId.js';
|
|
8
8
|
import classes from './Banner.module.css.js';
|
|
9
9
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { To } from 'history';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { type PolymorphicProps } from '../utils/modern-polymorphic';
|
|
4
3
|
export type BreadcrumbsProps = React.PropsWithChildren<{
|
|
5
4
|
/**
|
|
6
5
|
* Optional class name for the breadcrumbs container.
|
|
@@ -28,38 +27,24 @@ declare function Breadcrumbs({ className, children, style, overflow, variant }:
|
|
|
28
27
|
declare namespace Breadcrumbs {
|
|
29
28
|
var displayName: string;
|
|
30
29
|
}
|
|
31
|
-
type
|
|
30
|
+
type DistributiveOmit<T, TOmitted extends PropertyKey> = T extends any ? Omit<T, TOmitted> : never;
|
|
31
|
+
type StyledBreadcrumbsItemProps<As extends React.ElementType> = {
|
|
32
|
+
as?: As;
|
|
32
33
|
to?: To;
|
|
33
34
|
selected?: boolean;
|
|
34
|
-
|
|
35
|
+
className?: string;
|
|
36
|
+
style?: React.CSSProperties;
|
|
37
|
+
} & DistributiveOmit<React.ComponentPropsWithRef<React.ElementType extends As ? 'a' : As>, 'as'>;
|
|
35
38
|
export type BreadcrumbsItemProps<As extends React.ElementType = 'a'> = StyledBreadcrumbsItemProps<As>;
|
|
36
39
|
declare const _default: typeof Breadcrumbs & {
|
|
37
|
-
Item:
|
|
38
|
-
to?: To;
|
|
39
|
-
selected?: boolean;
|
|
40
|
-
} extends infer T ? T extends React.ComponentPropsWithRef<React.ElementType extends As ? "a" : As> & {
|
|
41
|
-
to?: To;
|
|
42
|
-
selected?: boolean;
|
|
43
|
-
} ? T extends unknown ? Omit<T, "as"> : never : never : never) & {
|
|
44
|
-
as?: As | undefined;
|
|
45
|
-
} & React.RefAttributes<any>) => React.ReactNode) & {
|
|
46
|
-
displayName: string;
|
|
47
|
-
};
|
|
40
|
+
Item: React.ForwardRefExoticComponent<Omit<StyledBreadcrumbsItemProps<React.ElementType<any, keyof React.JSX.IntrinsicElements>>, "ref"> & React.RefAttributes<any>>;
|
|
48
41
|
};
|
|
49
42
|
export default _default;
|
|
50
43
|
/**
|
|
51
44
|
* @deprecated Use the `Breadcrumbs` component instead (i.e. `<Breadcrumb>` → `<Breadcrumbs>`)
|
|
52
45
|
*/
|
|
53
46
|
export declare const Breadcrumb: typeof Breadcrumbs & {
|
|
54
|
-
Item: <
|
|
55
|
-
to?: To;
|
|
56
|
-
selected?: boolean;
|
|
57
|
-
} extends infer T ? T extends React.ComponentPropsWithRef<React.ElementType extends As ? "a" : As> & {
|
|
58
|
-
to?: To;
|
|
59
|
-
selected?: boolean;
|
|
60
|
-
} ? T extends unknown ? Omit<T, "as"> : never : never : never) & {
|
|
61
|
-
as?: As | undefined;
|
|
62
|
-
} & React.RefAttributes<any>) => React.ReactNode;
|
|
47
|
+
Item: React.ForwardRefExoticComponent<Omit<StyledBreadcrumbsItemProps<React.ElementType<any, keyof React.JSX.IntrinsicElements>>, "ref"> & React.RefAttributes<any>>;
|
|
63
48
|
};
|
|
64
49
|
/**
|
|
65
50
|
* @deprecated Use the `BreadcrumbsProps` type instead
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Breadcrumbs.d.ts","sourceRoot":"","sources":["../../src/Breadcrumbs/Breadcrumbs.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,EAAE,EAAC,MAAM,SAAS,CAAA;AAC/B,OAAO,KAA6E,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"Breadcrumbs.d.ts","sourceRoot":"","sources":["../../src/Breadcrumbs/Breadcrumbs.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,EAAE,EAAC,MAAM,SAAS,CAAA;AAC/B,OAAO,KAA6E,MAAM,OAAO,CAAA;AAYjG,MAAM,MAAM,gBAAgB,GAAG,KAAK,CAAC,iBAAiB,CAAC;IACrD;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,gBAAgB,CAAA;IAC7C;;;;OAIG;IACH,OAAO,CAAC,EAAE,QAAQ,GAAG,UAAU,CAAA;IAC/B;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;CAC5B,CAAC,CAAA;AA2GF,iBAAS,WAAW,CAAC,EAAC,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAiB,EAAE,OAAkB,EAAC,EAAE,gBAAgB,qBA+MzG;kBA/MQ,WAAW;;;AA4NpB,KAAK,gBAAgB,CAAC,CAAC,EAAE,QAAQ,SAAS,WAAW,IAAI,CAAC,SAAS,GAAG,GAAG,IAAI,CAAC,CAAC,EAAE,QAAQ,CAAC,GAAG,KAAK,CAAA;AAElG,KAAK,0BAA0B,CAAC,EAAE,SAAS,KAAK,CAAC,WAAW,IAAI;IAC9D,EAAE,CAAC,EAAE,EAAE,CAAA;IACP,EAAE,CAAC,EAAE,EAAE,CAAA;IACP,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;CAC5B,GAAG,gBAAgB,CAAC,KAAK,CAAC,qBAAqB,CAAC,KAAK,CAAC,WAAW,SAAS,EAAE,GAAG,GAAG,GAAG,EAAE,CAAC,EAAE,IAAI,CAAC,CAAA;AAwBhG,MAAM,MAAM,oBAAoB,CAAC,EAAE,SAAS,KAAK,CAAC,WAAW,GAAG,GAAG,IAAI,0BAA0B,CAAC,EAAE,CAAC,CAAA;;;;AACrG,wBAAkE;AAElE;;GAEG;AACH,eAAO,MAAM,UAAU;;CAAsD,CAAA;AAE7E;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,gBAAgB,CAAA;AAE9C;;GAEG;AACH,MAAM,MAAM,mBAAmB,CAAC,EAAE,SAAS,KAAK,CAAC,WAAW,GAAG,GAAG,IAAI,oBAAoB,CAAC,EAAE,CAAC,CAAA"}
|
|
@@ -8,7 +8,6 @@ import { KebabHorizontalIcon } from '@primer/octicons-react';
|
|
|
8
8
|
import { useResizeObserver } from '../hooks/useResizeObserver.js';
|
|
9
9
|
import { useOnEscapePress } from '../hooks/useOnEscapePress.js';
|
|
10
10
|
import { useOnOutsideClick } from '../hooks/useOnOutsideClick.js';
|
|
11
|
-
import { fixedForwardRef } from '../utils/modern-polymorphic.js';
|
|
12
11
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
13
12
|
import { useFeatureFlag } from '../FeatureFlags/useFeatureFlag.js';
|
|
14
13
|
import Details from '../Details/Details.js';
|
|
@@ -400,26 +399,69 @@ const ItemSeparator = () => {
|
|
|
400
399
|
}
|
|
401
400
|
return t0;
|
|
402
401
|
};
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
402
|
+
|
|
403
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
404
|
+
|
|
405
|
+
function BreadcrumbsItemComponent(props, ref) {
|
|
406
|
+
const $ = c(14);
|
|
407
|
+
let className;
|
|
408
|
+
let rest;
|
|
409
|
+
let selected;
|
|
410
|
+
let t0;
|
|
411
|
+
if ($[0] !== props) {
|
|
412
|
+
({
|
|
413
|
+
as: t0,
|
|
414
|
+
selected,
|
|
415
|
+
className,
|
|
416
|
+
...rest
|
|
417
|
+
} = props);
|
|
418
|
+
$[0] = props;
|
|
419
|
+
$[1] = className;
|
|
420
|
+
$[2] = rest;
|
|
421
|
+
$[3] = selected;
|
|
422
|
+
$[4] = t0;
|
|
423
|
+
} else {
|
|
424
|
+
className = $[1];
|
|
425
|
+
rest = $[2];
|
|
426
|
+
selected = $[3];
|
|
427
|
+
t0 = $[4];
|
|
428
|
+
}
|
|
429
|
+
const Component = t0 === undefined ? "a" : t0;
|
|
430
|
+
const t1 = selected && "selected";
|
|
431
|
+
let t2;
|
|
432
|
+
if ($[5] !== className || $[6] !== t1) {
|
|
433
|
+
t2 = clsx(className, classes.Item, t1);
|
|
434
|
+
$[5] = className;
|
|
435
|
+
$[6] = t1;
|
|
436
|
+
$[7] = t2;
|
|
437
|
+
} else {
|
|
438
|
+
t2 = $[7];
|
|
439
|
+
}
|
|
440
|
+
const t3 = selected ? "page" : undefined;
|
|
441
|
+
let t4;
|
|
442
|
+
if ($[8] !== Component || $[9] !== ref || $[10] !== rest || $[11] !== t2 || $[12] !== t3) {
|
|
443
|
+
t4 = /*#__PURE__*/jsx(Component, {
|
|
444
|
+
className: t2,
|
|
445
|
+
"aria-current": t3,
|
|
446
|
+
ref: ref,
|
|
447
|
+
...rest
|
|
448
|
+
});
|
|
449
|
+
$[8] = Component;
|
|
450
|
+
$[9] = ref;
|
|
451
|
+
$[10] = rest;
|
|
452
|
+
$[11] = t2;
|
|
453
|
+
$[12] = t3;
|
|
454
|
+
$[13] = t4;
|
|
455
|
+
} else {
|
|
456
|
+
t4 = $[13];
|
|
457
|
+
}
|
|
458
|
+
return t4;
|
|
459
|
+
}
|
|
460
|
+
BreadcrumbsItemComponent.displayName = 'Breadcrumbs.Item';
|
|
461
|
+
const BreadcrumbsItem = /*#__PURE__*/React.forwardRef(BreadcrumbsItemComponent);
|
|
417
462
|
Breadcrumbs.displayName = 'Breadcrumbs';
|
|
418
|
-
const BreadcrumbsItemWithDisplayName = Object.assign(BreadcrumbsItem, {
|
|
419
|
-
displayName: 'Breadcrumbs.Item'
|
|
420
|
-
});
|
|
421
463
|
var Breadcrumbs_default = Object.assign(Breadcrumbs, {
|
|
422
|
-
Item:
|
|
464
|
+
Item: BreadcrumbsItem
|
|
423
465
|
});
|
|
424
466
|
|
|
425
467
|
/**
|
|
@@ -437,15 +479,11 @@ const Breadcrumb = Object.assign(Breadcrumbs, {
|
|
|
437
479
|
* @deprecated Use the `BreadcrumbsItemProps` type instead
|
|
438
480
|
*/
|
|
439
481
|
function _temp(item, index) {
|
|
440
|
-
const
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
as: Component,
|
|
444
|
-
...itemProps
|
|
445
|
-
} = item.props;
|
|
482
|
+
const href = item.props.href;
|
|
483
|
+
const children = item.props.children;
|
|
484
|
+
const selected = item.props.selected;
|
|
446
485
|
return /*#__PURE__*/jsx(ActionList.LinkItem, {
|
|
447
|
-
|
|
448
|
-
...itemProps,
|
|
486
|
+
href: href,
|
|
449
487
|
"aria-current": selected ? "page" : undefined,
|
|
450
488
|
children: children
|
|
451
489
|
}, index);
|