@primer/react 38.1.0-rc.a72ba106c → 38.1.0-rc.b5ef6a423
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 +3 -1
- package/dist/ActionList/Item.d.ts.map +1 -1
- package/dist/ActionList/Item.js +3 -1
- package/dist/Timeline/Timeline-116393ee.css +2 -0
- package/dist/Timeline/Timeline-116393ee.css.map +1 -0
- package/dist/Timeline/Timeline.module.css.js +1 -1
- package/dist/hooks/{useMediaUnsafeSSR.d.ts → useMedia.d.ts} +6 -9
- package/dist/hooks/useMedia.d.ts.map +1 -0
- package/dist/hooks/{useMediaUnsafeSSR.js → useMedia.js} +2 -2
- package/dist/hooks/useResponsiveValue.d.ts +0 -2
- package/dist/hooks/useResponsiveValue.d.ts.map +1 -1
- package/dist/hooks/useResponsiveValue.js +5 -9
- package/generated/components.json +1 -1
- package/package.json +6 -6
- package/dist/Timeline/Timeline-e8e88a13.css +0 -2
- package/dist/Timeline/Timeline-e8e88a13.css.map +0 -1
- package/dist/hooks/useMediaUnsafeSSR.d.ts.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,10 +8,12 @@
|
|
|
8
8
|
|
|
9
9
|
- [#7063](https://github.com/primer/react/pull/7063) [`247c66a`](https://github.com/primer/react/commit/247c66a3c297afba73c6e9e3842cc15ff8a845c1) Thanks [@francinelucca](https://github.com/francinelucca)! - Feat: popover implement click outside
|
|
10
10
|
|
|
11
|
-
- [#
|
|
11
|
+
- [#7109](https://github.com/primer/react/pull/7109) [`34e7108`](https://github.com/primer/react/commit/34e71089ea7668d7b0ab4572f125d13b998e8754) Thanks [@adierkens](https://github.com/adierkens)! - Add support to ActionList for 'tablist' and 'tab' roles
|
|
12
12
|
|
|
13
13
|
### Patch Changes
|
|
14
14
|
|
|
15
|
+
- [#7124](https://github.com/primer/react/pull/7124) [`a746a83`](https://github.com/primer/react/commit/a746a83e68da54a7f66161b0f1d68bfbdc071ce6) Thanks [@lukasoppermann](https://github.com/lukasoppermann)! - Fixed Timeline.Break when followed by a condensed item and clip sidebar for condensed items.
|
|
16
|
+
|
|
15
17
|
- [#7060](https://github.com/primer/react/pull/7060) [`3468793`](https://github.com/primer/react/commit/3468793e15269d6d9f226ee7844921e44bfc4622) Thanks [@francinelucca](https://github.com/francinelucca)! - @primer/react: chore(Dialog): allow direct children
|
|
16
18
|
|
|
17
19
|
- [#7061](https://github.com/primer/react/pull/7061) [`e58e102`](https://github.com/primer/react/commit/e58e1027d7f3cdae5223c08d83f7b86918db370b) Thanks [@francinelucca](https://github.com/francinelucca)! - PageLayout: update wrapper dimensions to match PageLayout's root element
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Item.d.ts","sourceRoot":"","sources":["../../src/ActionList/Item.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAmBzB,KAAK,sBAAsB,GAAG;IAC5B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC3B,CAAA;AAED,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAEpD,CAAA;
|
|
1
|
+
{"version":3,"file":"Item.d.ts","sourceRoot":"","sources":["../../src/ActionList/Item.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAmBzB,KAAK,sBAAsB,GAAG;IAC5B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC3B,CAAA;AAED,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAEpD,CAAA;AAySD,QAAA,MAAM,IAAI,IAjRa,EAAE,SAAS,KAAK,CAAC,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoRjD,CAAA;AAEF,OAAO,EAAC,IAAI,EAAC,CAAA"}
|
package/dist/ActionList/Item.js
CHANGED
|
@@ -118,6 +118,8 @@ const UnwrappedItem = ({
|
|
|
118
118
|
if (selectionVariant === 'single') inferredItemRole = 'menuitemradio';else if (selectionVariant === 'multiple') inferredItemRole = 'menuitemcheckbox';else inferredItemRole = 'menuitem';
|
|
119
119
|
} else if (listRole === 'listbox') {
|
|
120
120
|
if (selectionVariant !== undefined && !role) inferredItemRole = 'option';
|
|
121
|
+
} else if (listRole === 'tablist') {
|
|
122
|
+
inferredItemRole = 'tab';
|
|
121
123
|
}
|
|
122
124
|
const itemRole = role || inferredItemRole;
|
|
123
125
|
if (slots.trailingAction) {
|
|
@@ -129,7 +131,7 @@ const UnwrappedItem = ({
|
|
|
129
131
|
if (itemRole === 'menuitemradio' || itemRole === 'menuitemcheckbox') inferredSelectionAttribute = 'aria-checked';else if (itemRole === 'option') inferredSelectionAttribute = 'aria-selected';
|
|
130
132
|
const itemSelectionAttribute = selectionAttribute || inferredSelectionAttribute;
|
|
131
133
|
// Ensures ActionList.Item retains list item semantics if a valid ARIA role is applied, or if item is inactive
|
|
132
|
-
const listItemSemantics =
|
|
134
|
+
const listItemSemantics = itemRole === 'option' || itemRole === 'menuitem' || itemRole === 'menuitemradio' || itemRole === 'menuitemcheckbox' || itemRole === 'tab';
|
|
133
135
|
const listRoleTypes = ['listbox', 'menu', 'list'];
|
|
134
136
|
const listSemantics = listRole && listRoleTypes.includes(listRole) || inactive || listItemSemantics;
|
|
135
137
|
const buttonSemantics = !listSemantics && !_PrivateItemWrapper;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
.prc-Timeline-Timeline-iQjcc{display:flex;flex-direction:column}.prc-Timeline-Timeline-iQjcc:where([data-clip-sidebar]) .prc-Timeline-TimelineItem-Sd-t-:first-child{padding-top:0}:is(.prc-Timeline-Timeline-iQjcc:where([data-clip-sidebar]) .prc-Timeline-TimelineItem-Sd-t-:first-child):where([data-condensed]):before{top:var(--base-size-12,.75rem)}.prc-Timeline-Timeline-iQjcc:where([data-clip-sidebar]) .prc-Timeline-TimelineItem-Sd-t-:last-child{padding-bottom:0}:is(.prc-Timeline-Timeline-iQjcc:where([data-clip-sidebar]) .prc-Timeline-TimelineItem-Sd-t-:last-child):where([data-condensed]):before{height:var(--base-size-12,.75rem)}.prc-Timeline-TimelineItem-Sd-t-{display:flex;margin-left:var(--base-size-16,1rem);padding:var(--base-size-16,1rem) 0;position:relative}.prc-Timeline-TimelineItem-Sd-t-:before{background-color:var(--borderColor-muted,var(--color-border-muted));bottom:0;content:"";display:block;left:0;position:absolute;top:0;width:2px}.prc-Timeline-TimelineItem-Sd-t-:where([data-condensed]){padding-bottom:0;padding-top:var(--base-size-4,.25rem)}.prc-Timeline-TimelineItem-Sd-t-:where([data-condensed]):last-child{padding-bottom:var(--base-size-16,1rem)}.prc-Timeline-TimelineItem-Sd-t-:where([data-condensed]) .prc-Timeline-TimelineBadge-BqMiN{background-color:var(--bgColor-default,var(--color-canvas-default));border:0;color:var(--fgColor-muted,var(--color-fg-muted));height:16px;margin-bottom:var(--base-size-8,.5rem);margin-top:var(--base-size-8,.5rem)}.prc-Timeline-TimelineBadgeWrapper-75vYD{position:relative;z-index:1}.prc-Timeline-TimelineBadge-BqMiN{align-items:center;background-color:var(--timelineBadge-bgColor,var(--color-timeline-badge-bg));border-color:var(--bgColor-default,var(--color-canvas-default));border-radius:50%;border-style:solid;border-width:var(--borderWidth-thick,.125rem);display:flex;flex-shrink:0;height:32px;justify-content:center;margin-left:-15px;margin-right:var(--base-size-8,.5rem);overflow:hidden;width:32px}.prc-Timeline-TimelineBadge-BqMiN,.prc-Timeline-TimelineBody-WWZY0{color:var(--fgColor-muted,var(--color-fg-muted))}.prc-Timeline-TimelineBody-WWZY0{flex:auto;font-size:var(--text-body-size-medium,.875rem);margin-top:var(--base-size-4,.25rem);max-width:100%;min-width:0}.prc-Timeline-TimelineBreak-dPnDJ{background-color:var(--bgColor-default,var(--color-canvas-default));border:0;border-top:var(--borderWidth-thicker,.25rem) solid var(--borderColor-default,var(--color-border-default));height:var(--base-size-24,1.5rem);margin:0;margin-bottom:calc(var(--base-size-16,1rem)*-1);margin-left:0;position:relative;z-index:1}.prc-Timeline-TimelineBreak-dPnDJ:has(+[data-condensed]){margin-bottom:calc(var(--base-size-12,.75rem)*-1)}
|
|
2
|
+
/*# sourceMappingURL=Timeline-116393ee.css.map */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/Timeline/Timeline.module.css"],"names":[],"mappings":"AAAA,6BACE,YAAa,CACb,qBAmBF,CAhBI,qGACE,aAKF,CAHE,yIACE,8BACF,CAGF,oGACE,gBAKF,CAHE,wIACE,iCACF,CAKN,iCAEE,YAAa,CAEb,oCAAgC,CADhC,kCAA8B,CAF9B,iBAkCF,CA7BE,wCASE,mEAA0C,CAN1C,QAAS,CAIT,UAAW,CAFX,aAAc,CADd,MAAO,CAHP,iBAAkB,CAClB,KAAM,CAIN,SAIF,CAEA,yDAEE,gBAAiB,CADjB,qCAeF,CAZE,oEACE,uCACF,CAEA,2FAKE,mEAAwC,CACxC,QAAS,CAFT,gDAA2B,CAH3B,WAAY,CAEZ,sCAAiC,CADjC,mCAKF,CAIJ,yCACE,iBAAkB,CAClB,SACF,CAEA,kCAkBE,kBAAmB,CANnB,4EAA8C,CAE9C,+DAAoC,CAGpC,iBAAkB,CAFlB,kBAAmB,CACnB,6CAAsC,CAftC,YAAa,CAMb,aAAc,CAJd,WAAY,CAgBZ,sBAAuB,CAbvB,iBAAkB,CAFlB,qCAAgC,CAIhC,eAAgB,CANhB,UAkBF,CAEA,mEAbE,gDAoBF,CAPA,iCAME,SAAU,CAFV,8CAAuC,CADvC,oCAA8B,CAD9B,cAAe,CADf,WAMF,CAEA,kCAOE,mEAAwC,CACxC,QAAS,CACT,yGAAuE,CANvE,iCAA2B,CAC3B,QAAS,CACT,+CAA6C,CAC7C,aAAc,CALd,iBAAkB,CAClB,SAYF,CAHE,yDACE,iDACF","file":"Timeline-116393ee.css","sourcesContent":[".Timeline {\n display: flex;\n flex-direction: column;\n\n &:where([data-clip-sidebar]) {\n .TimelineItem:first-child {\n padding-top: 0;\n\n &:where([data-condensed])::before {\n top: var(--base-size-12);\n }\n }\n\n .TimelineItem:last-child {\n padding-bottom: 0;\n\n &:where([data-condensed])::before {\n height: var(--base-size-12);\n }\n }\n }\n}\n\n.TimelineItem {\n position: relative;\n display: flex;\n padding: var(--base-size-16) 0;\n margin-left: var(--base-size-16);\n\n &::before {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n display: block;\n width: 2px;\n content: '';\n /* stylelint-disable-next-line primer/colors */\n background-color: var(--borderColor-muted);\n }\n\n &:where([data-condensed]) {\n padding-top: var(--base-size-4);\n padding-bottom: 0;\n\n &:last-child {\n padding-bottom: var(--base-size-16);\n }\n\n .TimelineBadge {\n height: 16px;\n margin-top: var(--base-size-8);\n margin-bottom: var(--base-size-8);\n color: var(--fgColor-muted);\n background-color: var(--bgColor-default);\n border: 0;\n }\n }\n}\n\n.TimelineBadgeWrapper {\n position: relative;\n z-index: 1;\n}\n\n.TimelineBadge {\n display: flex;\n width: 32px;\n height: 32px;\n margin-right: var(--base-size-8);\n /* stylelint-disable-next-line primer/spacing */\n margin-left: -15px;\n flex-shrink: 0;\n overflow: hidden;\n color: var(--fgColor-muted);\n\n /* TODOl not quite sure if this is the correct migration for this line */\n background-color: var(--timelineBadge-bgColor);\n /* stylelint-disable-next-line primer/colors */\n border-color: var(--bgColor-default);\n border-style: solid;\n border-width: var(--borderWidth-thick);\n border-radius: 50%;\n align-items: center;\n justify-content: center;\n}\n\n.TimelineBody {\n min-width: 0;\n max-width: 100%;\n margin-top: var(--base-size-4);\n font-size: var(--text-body-size-medium);\n color: var(--fgColor-muted);\n flex: auto;\n}\n\n.TimelineBreak {\n position: relative;\n z-index: 1;\n height: var(--base-size-24);\n margin: 0;\n margin-bottom: calc(-1 * var(--base-size-16));\n margin-left: 0;\n background-color: var(--bgColor-default);\n border: 0;\n border-top: var(--borderWidth-thicker) solid var(--borderColor-default);\n\n &:has(+ [data-condensed]) {\n margin-bottom: calc(-1 * var(--base-size-12));\n }\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import './Timeline-
|
|
1
|
+
import './Timeline-116393ee.css';
|
|
2
2
|
|
|
3
3
|
var classes = {"Timeline":"prc-Timeline-Timeline-iQjcc","TimelineItem":"prc-Timeline-TimelineItem-Sd-t-","TimelineBadge":"prc-Timeline-TimelineBadge-BqMiN","TimelineBadgeWrapper":"prc-Timeline-TimelineBadgeWrapper-75vYD","TimelineBody":"prc-Timeline-TimelineBody-WWZY0","TimelineBreak":"prc-Timeline-TimelineBreak-dPnDJ"};
|
|
4
4
|
|
|
@@ -1,21 +1,18 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
/**
|
|
3
|
-
* `
|
|
3
|
+
* `useMedia` will use the given `mediaQueryString` with `matchMedia` to
|
|
4
4
|
* determine if the document matches the media query string.
|
|
5
5
|
*
|
|
6
|
-
* If `MatchMedia` is used as an ancestor, `
|
|
6
|
+
* If `MatchMedia` is used as an ancestor, `useMedia` will instead use the
|
|
7
7
|
* value of the media query string, if available
|
|
8
8
|
*
|
|
9
|
-
* Warning: If rendering on the server, and no `defaultState` is provided,
|
|
10
|
-
* this could cause a hydration mismatch between server and client.
|
|
11
|
-
*
|
|
12
9
|
* @example
|
|
13
10
|
* function Example() {
|
|
14
|
-
* const coarsePointer =
|
|
11
|
+
* const coarsePointer = useMedia('(pointer: coarse)');
|
|
15
12
|
* // ...
|
|
16
13
|
* }
|
|
17
14
|
*/
|
|
18
|
-
export declare function
|
|
15
|
+
export declare function useMedia(mediaQueryString: string, defaultState?: boolean): boolean;
|
|
19
16
|
type MediaQueryFeatures = {
|
|
20
17
|
[key: string]: boolean | undefined;
|
|
21
18
|
};
|
|
@@ -25,7 +22,7 @@ type MatchMediaProps = {
|
|
|
25
22
|
};
|
|
26
23
|
/**
|
|
27
24
|
* Use `MatchMedia` to emulate media conditions by passing in feature
|
|
28
|
-
* queries to the `features` prop. If a component uses `
|
|
25
|
+
* queries to the `features` prop. If a component uses `useMedia` with the
|
|
29
26
|
* feature passed in to `MatchMedia` it will force its value to match what is
|
|
30
27
|
* provided to `MatchMedia`
|
|
31
28
|
*
|
|
@@ -39,4 +36,4 @@ type MatchMediaProps = {
|
|
|
39
36
|
*/
|
|
40
37
|
export declare function MatchMedia({ children, features }: MatchMediaProps): React.JSX.Element;
|
|
41
38
|
export {};
|
|
42
|
-
//# sourceMappingURL=
|
|
39
|
+
//# sourceMappingURL=useMedia.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useMedia.d.ts","sourceRoot":"","sources":["../../src/hooks/useMedia.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuD,MAAM,OAAO,CAAA;AAI3E;;;;;;;;;;;;GAYG;AACH,wBAAgB,QAAQ,CAAC,gBAAgB,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,OAAO,WAoExE;AAED,KAAK,kBAAkB,GAAG;IACxB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAA;CACnC,CAAA;AAOD,KAAK,eAAe,GAAG;IACrB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,QAAQ,CAAC,EAAE,kBAAkB,CAAA;CAC9B,CAAA;AAID;;;;;;;;;;;;;GAaG;AACH,wBAAgB,UAAU,CAAC,EAAC,QAAQ,EAAE,QAA0B,EAAC,EAAE,eAAe,qBAGjF"}
|
|
@@ -2,7 +2,7 @@ import { c } from 'react-compiler-runtime';
|
|
|
2
2
|
import React, { useContext, createContext, useEffect } from 'react';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
4
|
|
|
5
|
-
function
|
|
5
|
+
function useMedia(mediaQueryString, defaultState) {
|
|
6
6
|
const $ = c(12);
|
|
7
7
|
const features = useContext(MatchMediaContext);
|
|
8
8
|
let t0;
|
|
@@ -83,4 +83,4 @@ function useMediaUnsafeSSR(mediaQueryString, defaultState) {
|
|
|
83
83
|
// unavailable through devtools
|
|
84
84
|
const MatchMediaContext = /*#__PURE__*/createContext({});
|
|
85
85
|
|
|
86
|
-
export {
|
|
86
|
+
export { useMedia };
|
|
@@ -23,8 +23,6 @@ export declare function isResponsiveValue(value: any): value is ResponsiveValue<
|
|
|
23
23
|
* Resolves responsive values based on the current viewport width.
|
|
24
24
|
* For example, if the current viewport width is narrow (less than 768px), the value of `{regular: 'foo', narrow: 'bar'}` will resolve to `'bar'`.
|
|
25
25
|
*
|
|
26
|
-
* Warning: This hook is not fully SSR compatible as it relies on `useMediaUnsafeSSR` without a `defaultState`. Using `getResponsiveAttributes` is preferred to avoid hydration mismatches.
|
|
27
|
-
*
|
|
28
26
|
* @example
|
|
29
27
|
* const value = useResponsiveValue({regular: 'foo', narrow: 'bar'})
|
|
30
28
|
* console.log(value) // 'bar'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useResponsiveValue.d.ts","sourceRoot":"","sources":["../../src/hooks/useResponsiveValue.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useResponsiveValue.d.ts","sourceRoot":"","sources":["../../src/hooks/useResponsiveValue.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,cAAc;;;;CAI1B,CAAA;AAED,MAAM,MAAM,eAAe,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,EAAE,KAAK,GAAG,QAAQ,IAAI;IAC5E,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,OAAO,CAAC,EAAE,QAAQ,CAAA;IAClB,IAAI,CAAC,EAAE,KAAK,CAAA;CACb,CAAA;AAED;;;;GAIG;AACH,MAAM,MAAM,sBAAsB,CAAC,CAAC,IAChC,CAAC,CAAC,SAAS,eAAe,CAAC,MAAM,QAAQ,EAAE,MAAM,OAAO,EAAE,MAAM,KAAK,CAAC,GAAG,QAAQ,GAAG,OAAO,GAAG,KAAK,GAAG,KAAK,CAAC,GAE5G,OAAO,CAAC,CAAC,EAAE,eAAe,CAAC,GAAG,CAAC,CAAC,CAAA;AAEpC;;;GAGG;AAEH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,eAAe,CAAC,GAAG,CAAC,CAE3E;AAED;;;;;;;GAOG;AAEH,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,GAAG,sBAAsB,CAAC,CAAC,CAAC,GAAG,CAAC,CA0B7F"}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { canUseDOM } from '../utils/environment.js';
|
|
3
|
-
import { warning } from '../utils/warning.js';
|
|
1
|
+
import { useMedia } from './useMedia.js';
|
|
4
2
|
|
|
5
3
|
// This file contains utilities for working with responsive values.
|
|
6
4
|
|
|
@@ -35,17 +33,15 @@ function isResponsiveValue(value) {
|
|
|
35
33
|
* Resolves responsive values based on the current viewport width.
|
|
36
34
|
* For example, if the current viewport width is narrow (less than 768px), the value of `{regular: 'foo', narrow: 'bar'}` will resolve to `'bar'`.
|
|
37
35
|
*
|
|
38
|
-
* Warning: This hook is not fully SSR compatible as it relies on `useMediaUnsafeSSR` without a `defaultState`. Using `getResponsiveAttributes` is preferred to avoid hydration mismatches.
|
|
39
|
-
*
|
|
40
36
|
* @example
|
|
41
37
|
* const value = useResponsiveValue({regular: 'foo', narrow: 'bar'})
|
|
42
38
|
* console.log(value) // 'bar'
|
|
43
39
|
*/
|
|
40
|
+
// TODO: Improve SSR support
|
|
44
41
|
function useResponsiveValue(value, fallback) {
|
|
45
|
-
const isNarrowViewport =
|
|
46
|
-
const isRegularViewport =
|
|
47
|
-
const isWideViewport =
|
|
48
|
-
process.env.NODE_ENV !== "production" ? warning(!canUseDOM, "`useResponsiveValue` is not fully SSR compatible as it relies on `useMediaUnsafeSSR` without a `defaultState`. Using `getResponsiveAttributes` is preferred to avoid hydration mismatches.") : void 0;
|
|
42
|
+
const isNarrowViewport = useMedia(viewportRanges.narrow, false);
|
|
43
|
+
const isRegularViewport = useMedia(viewportRanges.regular, false);
|
|
44
|
+
const isWideViewport = useMedia(viewportRanges.wide, false);
|
|
49
45
|
if (isResponsiveValue(value)) {
|
|
50
46
|
const responsiveValue = value;
|
|
51
47
|
if (isNarrowViewport && "narrow" in responsiveValue) {
|
|
@@ -7434,7 +7434,7 @@
|
|
|
7434
7434
|
},
|
|
7435
7435
|
{
|
|
7436
7436
|
"id": "components-timeline-features--condensed-items",
|
|
7437
|
-
"code": "() => (\n <Timeline>\n <Timeline.Item condensed>\n <Timeline.Badge>\n <Octicon icon={GitCommitIcon} aria-label=\"Commit\" />\n </Timeline.Badge>\n <Timeline.Body>This is a message</Timeline.Body>\n </Timeline.Item>\n <Timeline.Item condensed>\n <Timeline.Badge>\n <Octicon icon={GitCommitIcon} aria-label=\"Commit\" />\n </Timeline.Badge>\n <Timeline.Body>This is a message</Timeline.Body>\n </Timeline.Item>\n </Timeline>\n)"
|
|
7437
|
+
"code": "() => (\n <Timeline>\n <Timeline.Item condensed>\n <Timeline.Badge>\n <Octicon icon={GitCommitIcon} aria-label=\"Commit\" />\n </Timeline.Badge>\n <Timeline.Body>This is a message</Timeline.Body>\n </Timeline.Item>\n <Timeline.Item condensed>\n <Timeline.Badge>\n <Octicon icon={GitCommitIcon} aria-label=\"Commit\" />\n </Timeline.Badge>\n <Timeline.Body>This is a message</Timeline.Body>\n </Timeline.Item>\n <Timeline.Break />\n <Timeline.Item condensed>\n <Timeline.Badge>\n <Octicon icon={GitCommitIcon} aria-label=\"Commit\" />\n </Timeline.Badge>\n <Timeline.Body>This is a message</Timeline.Body>\n </Timeline.Item>\n <Timeline.Item condensed>\n <Timeline.Badge>\n <Octicon icon={GitCommitIcon} aria-label=\"Commit\" />\n </Timeline.Badge>\n <Timeline.Body>This is a message</Timeline.Body>\n </Timeline.Item>\n </Timeline>\n)"
|
|
7438
7438
|
},
|
|
7439
7439
|
{
|
|
7440
7440
|
"id": "components-timeline-features--timeline-break",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@primer/react",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "38.1.0-rc.
|
|
4
|
+
"version": "38.1.0-rc.b5ef6a423",
|
|
5
5
|
"description": "An implementation of GitHub's Primer Design System using React",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"module": "./dist/index.js",
|
|
@@ -96,13 +96,13 @@
|
|
|
96
96
|
"devDependencies": {
|
|
97
97
|
"@actions/core": "1.11.1",
|
|
98
98
|
"@babel/cli": "7.28.3",
|
|
99
|
-
"@babel/core": "7.28.
|
|
100
|
-
"@babel/parser": "7.28.
|
|
99
|
+
"@babel/core": "7.28.5",
|
|
100
|
+
"@babel/parser": "7.28.5",
|
|
101
101
|
"@babel/plugin-proposal-nullish-coalescing-operator": "7.18.6",
|
|
102
102
|
"@babel/plugin-proposal-optional-chaining": "7.21.0",
|
|
103
103
|
"@babel/plugin-transform-modules-commonjs": "7.27.1",
|
|
104
|
-
"@babel/preset-react": "7.
|
|
105
|
-
"@babel/preset-typescript": "7.
|
|
104
|
+
"@babel/preset-react": "7.28.5",
|
|
105
|
+
"@babel/preset-typescript": "7.28.5",
|
|
106
106
|
"@figma/code-connect": "1.3.2",
|
|
107
107
|
"@primer/css": "^21.5.1",
|
|
108
108
|
"@primer/doc-gen": "^0.0.1",
|
|
@@ -164,7 +164,7 @@
|
|
|
164
164
|
"micromark-extension-frontmatter": "2.0.0",
|
|
165
165
|
"micromark-extension-mdxjs": "3.0.0",
|
|
166
166
|
"postcss-preset-primer": "^0.0.0",
|
|
167
|
-
"publint": "^0.3.
|
|
167
|
+
"publint": "^0.3.15",
|
|
168
168
|
"react": "18.3.1",
|
|
169
169
|
"react-dom": "18.3.1",
|
|
170
170
|
"react-is": "18.3.1",
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
.prc-Timeline-Timeline-iQjcc{display:flex;flex-direction:column}.prc-Timeline-Timeline-iQjcc:where([data-clip-sidebar]) .prc-Timeline-TimelineItem-Sd-t-:first-child{padding-top:0}.prc-Timeline-Timeline-iQjcc:where([data-clip-sidebar]) .prc-Timeline-TimelineItem-Sd-t-:last-child{padding-bottom:0}.prc-Timeline-TimelineItem-Sd-t-{display:flex;margin-left:var(--base-size-16,1rem);padding:var(--base-size-16,1rem) 0;position:relative}.prc-Timeline-TimelineItem-Sd-t-:before{background-color:var(--borderColor-muted,var(--color-border-muted));bottom:0;content:"";display:block;left:0;position:absolute;top:0;width:2px}.prc-Timeline-TimelineItem-Sd-t-:where([data-condensed]){padding-bottom:0;padding-top:var(--base-size-4,.25rem)}.prc-Timeline-TimelineItem-Sd-t-:where([data-condensed]):last-child{padding-bottom:var(--base-size-16,1rem)}.prc-Timeline-TimelineItem-Sd-t-:where([data-condensed]) .prc-Timeline-TimelineBadge-BqMiN{background-color:var(--bgColor-default,var(--color-canvas-default));border:0;color:var(--fgColor-muted,var(--color-fg-muted));height:16px;margin-bottom:var(--base-size-8,.5rem);margin-top:var(--base-size-8,.5rem)}.prc-Timeline-TimelineBadgeWrapper-75vYD{position:relative;z-index:1}.prc-Timeline-TimelineBadge-BqMiN{align-items:center;background-color:var(--timelineBadge-bgColor,var(--color-timeline-badge-bg));border-color:var(--bgColor-default,var(--color-canvas-default));border-radius:50%;border-style:solid;border-width:var(--borderWidth-thick,.125rem);display:flex;flex-shrink:0;height:32px;justify-content:center;margin-left:-15px;margin-right:var(--base-size-8,.5rem);overflow:hidden;width:32px}.prc-Timeline-TimelineBadge-BqMiN,.prc-Timeline-TimelineBody-WWZY0{color:var(--fgColor-muted,var(--color-fg-muted))}.prc-Timeline-TimelineBody-WWZY0{flex:auto;font-size:var(--text-body-size-medium,.875rem);margin-top:var(--base-size-4,.25rem);max-width:100%;min-width:0}.prc-Timeline-TimelineBreak-dPnDJ{background-color:var(--bgColor-default,var(--color-canvas-default));border:0;border-top:var(--borderWidth-thicker,.25rem) solid var(--borderColor-default,var(--color-border-default));height:var(--base-size-24,1.5rem);margin:0;margin-bottom:calc(var(--base-size-16,1rem)*-1);margin-left:0;position:relative;z-index:1}
|
|
2
|
-
/*# sourceMappingURL=Timeline-e8e88a13.css.map */
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/Timeline/Timeline.module.css"],"names":[],"mappings":"AAAA,6BACE,YAAa,CACb,qBAWF,CARI,qGACE,aACF,CAEA,oGACE,gBACF,CAIJ,iCAEE,YAAa,CAEb,oCAAgC,CADhC,kCAA8B,CAF9B,iBAkCF,CA7BE,wCASE,mEAA0C,CAN1C,QAAS,CAIT,UAAW,CAFX,aAAc,CADd,MAAO,CAHP,iBAAkB,CAClB,KAAM,CAIN,SAIF,CAEA,yDAEE,gBAAiB,CADjB,qCAeF,CAZE,oEACE,uCACF,CAEA,2FAKE,mEAAwC,CACxC,QAAS,CAFT,gDAA2B,CAH3B,WAAY,CAEZ,sCAAiC,CADjC,mCAKF,CAIJ,yCACE,iBAAkB,CAClB,SACF,CAEA,kCAkBE,kBAAmB,CANnB,4EAA8C,CAE9C,+DAAoC,CAGpC,iBAAkB,CAFlB,kBAAmB,CACnB,6CAAsC,CAftC,YAAa,CAMb,aAAc,CAJd,WAAY,CAgBZ,sBAAuB,CAbvB,iBAAkB,CAFlB,qCAAgC,CAIhC,eAAgB,CANhB,UAkBF,CAEA,mEAbE,gDAoBF,CAPA,iCAME,SAAU,CAFV,8CAAuC,CADvC,oCAA8B,CAD9B,cAAe,CADf,WAMF,CAEA,kCAOE,mEAAwC,CACxC,QAAS,CACT,yGAAuE,CANvE,iCAA2B,CAC3B,QAAS,CACT,+CAA6C,CAC7C,aAAc,CALd,iBAAkB,CAClB,SAQF","file":"Timeline-e8e88a13.css","sourcesContent":[".Timeline {\n display: flex;\n flex-direction: column;\n\n &:where([data-clip-sidebar]) {\n .TimelineItem:first-child {\n padding-top: 0;\n }\n\n .TimelineItem:last-child {\n padding-bottom: 0;\n }\n }\n}\n\n.TimelineItem {\n position: relative;\n display: flex;\n padding: var(--base-size-16) 0;\n margin-left: var(--base-size-16);\n\n &::before {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n display: block;\n width: 2px;\n content: '';\n /* stylelint-disable-next-line primer/colors */\n background-color: var(--borderColor-muted);\n }\n\n &:where([data-condensed]) {\n padding-top: var(--base-size-4);\n padding-bottom: 0;\n\n &:last-child {\n padding-bottom: var(--base-size-16);\n }\n\n .TimelineBadge {\n height: 16px;\n margin-top: var(--base-size-8);\n margin-bottom: var(--base-size-8);\n color: var(--fgColor-muted);\n background-color: var(--bgColor-default);\n border: 0;\n }\n }\n}\n\n.TimelineBadgeWrapper {\n position: relative;\n z-index: 1;\n}\n\n.TimelineBadge {\n display: flex;\n width: 32px;\n height: 32px;\n margin-right: var(--base-size-8);\n /* stylelint-disable-next-line primer/spacing */\n margin-left: -15px;\n flex-shrink: 0;\n overflow: hidden;\n color: var(--fgColor-muted);\n\n /* TODOl not quite sure if this is the correct migration for this line */\n background-color: var(--timelineBadge-bgColor);\n /* stylelint-disable-next-line primer/colors */\n border-color: var(--bgColor-default);\n border-style: solid;\n border-width: var(--borderWidth-thick);\n border-radius: 50%;\n align-items: center;\n justify-content: center;\n}\n\n.TimelineBody {\n min-width: 0;\n max-width: 100%;\n margin-top: var(--base-size-4);\n font-size: var(--text-body-size-medium);\n color: var(--fgColor-muted);\n flex: auto;\n}\n\n.TimelineBreak {\n position: relative;\n z-index: 1;\n height: var(--base-size-24);\n margin: 0;\n margin-bottom: calc(-1 * var(--base-size-16));\n margin-left: 0;\n background-color: var(--bgColor-default);\n border: 0;\n border-top: var(--borderWidth-thicker) solid var(--borderColor-default);\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useMediaUnsafeSSR.d.ts","sourceRoot":"","sources":["../../src/hooks/useMediaUnsafeSSR.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuD,MAAM,OAAO,CAAA;AAI3E;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,iBAAiB,CAAC,gBAAgB,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,OAAO,WAoEjF;AAED,KAAK,kBAAkB,GAAG;IACxB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAA;CACnC,CAAA;AAOD,KAAK,eAAe,GAAG;IACrB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,QAAQ,CAAC,EAAE,kBAAkB,CAAA;CAC9B,CAAA;AAID;;;;;;;;;;;;;GAaG;AACH,wBAAgB,UAAU,CAAC,EAAC,QAAQ,EAAE,QAA0B,EAAC,EAAE,eAAe,qBAGjF"}
|