@primer/react 0.0.0-20260414191728 → 0.0.0-20260414205642
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,6 +1,6 @@
|
|
|
1
1
|
# @primer/react
|
|
2
2
|
|
|
3
|
-
## 0.0.0-
|
|
3
|
+
## 0.0.0-20260414205642
|
|
4
4
|
|
|
5
5
|
### Minor Changes
|
|
6
6
|
|
|
@@ -18,6 +18,8 @@
|
|
|
18
18
|
|
|
19
19
|
- [#7738](https://github.com/primer/react/pull/7738) [`f5f2869`](https://github.com/primer/react/commit/f5f28691d9e5c9f8495e8c592635d2b616f7cb49) Thanks [@francinelucca](https://github.com/francinelucca)! - ActionMenu, Table: Fix component mutation issue where `Object.assign` was modifying original `@primer/react` components. Now uses wrapper components to avoid side effects.
|
|
20
20
|
|
|
21
|
+
- [#7754](https://github.com/primer/react/pull/7754) [`b579017`](https://github.com/primer/react/commit/b579017d17516b22b36b754e62a5eb45b3c62cd8) Thanks [@liuliu-dev](https://github.com/liuliu-dev)! - Breadcrumbs: On narrow viewports, only show the current page breadcrumb and the overflow menu when `overflow="menu"` is set.
|
|
22
|
+
|
|
21
23
|
- [#7747](https://github.com/primer/react/pull/7747) [`b7dfb78`](https://github.com/primer/react/commit/b7dfb78079c50c6798aa4e09212aede701bf6c56) Thanks [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)! - Fix IssueLabelToken text contrast in light theme by updating the lightness-switch formula to use a division-based approach that properly produces a binary switch value for selecting black vs white text
|
|
22
24
|
|
|
23
25
|
- Fake entry to force publishing
|
|
@@ -123,10 +123,5 @@ export declare const ActionList: (<As extends React.ElementType = "ul">(props: (
|
|
|
123
123
|
GroupHeading: import("../utils/types").FCWithSlotMarker<import("react").PropsWithChildren<import("./Group").ActionListGroupHeadingProps>>;
|
|
124
124
|
/** Secondary action */
|
|
125
125
|
TrailingAction: import("../utils/polymorphic").ForwardRefComponent<"a" | "button", import("./TrailingAction").ActionListTrailingActionProps>;
|
|
126
|
-
/** Selection state for `Item`s in an `ActionList`. */
|
|
127
|
-
Selection: import("react").FC<import("react").PropsWithChildren<{
|
|
128
|
-
className?: string | undefined | undefined;
|
|
129
|
-
selected?: boolean | undefined;
|
|
130
|
-
}>>;
|
|
131
126
|
};
|
|
132
127
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ActionList/index.ts"],"names":[],"mappings":"
|
|
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"}
|
package/dist/ActionList/index.js
CHANGED
|
@@ -7,7 +7,6 @@ import { Description } from './Description.js';
|
|
|
7
7
|
import { TrailingAction } from './TrailingAction.js';
|
|
8
8
|
import { TrailingVisual, LeadingVisual } from './Visuals.js';
|
|
9
9
|
import { Heading } from './Heading.js';
|
|
10
|
-
import { Selection } from './Selection.js';
|
|
11
10
|
|
|
12
11
|
/**
|
|
13
12
|
* Collection of list-related components.
|
|
@@ -32,9 +31,7 @@ const ActionList = Object.assign(List, {
|
|
|
32
31
|
/** Heading for `ActionList.Group` */
|
|
33
32
|
GroupHeading,
|
|
34
33
|
/** Secondary action */
|
|
35
|
-
TrailingAction
|
|
36
|
-
/** Selection state for `Item`s in an `ActionList`. */
|
|
37
|
-
Selection
|
|
34
|
+
TrailingAction
|
|
38
35
|
});
|
|
39
36
|
|
|
40
37
|
export { ActionList };
|
|
@@ -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;AAUjG,OAAO,EAAC,KAAK,gBAAgB,EAAkB,MAAM,6BAA6B,CAAA;AAElF,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;AA8GF,iBAAS,WAAW,CAAC,EAAC,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAiB,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,EAAE,SAAS,KAAK,CAAC,WAAW;aANtB,EAAE;mBACI,OAAO;;aADb,EAAE;mBACI,OAAO;;;;CAgCuD,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"}
|
|
@@ -250,7 +250,9 @@ function Breadcrumbs({
|
|
|
250
250
|
const calculateOverflow = useCallback(availableWidth => {
|
|
251
251
|
let eHideRoot = effectiveHideRoot;
|
|
252
252
|
const MENU_BUTTON_WIDTH = menuButtonWidth;
|
|
253
|
-
const
|
|
253
|
+
const NARROW_BREAKPOINT = 544;
|
|
254
|
+
const isNarrow = availableWidth < NARROW_BREAKPOINT;
|
|
255
|
+
const MIN_VISIBLE_ITEMS = isNarrow && eHideRoot ? 1 : !eHideRoot ? 3 : 4;
|
|
254
256
|
const calculateVisibleItemsWidth = w => {
|
|
255
257
|
const widths_0 = w.reduce((sum, width) => sum + width + 16, 0);
|
|
256
258
|
return !eHideRoot ? rootItemWidth + widths_0 : widths_0;
|
package/package.json
CHANGED