@primer/react 38.1.0-rc.a72ba106c → 38.1.0-rc.c5ea35a01
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/README.md +16 -11
- package/dist/ActionBar/ActionBar.js +308 -148
- package/dist/ActionList/Item.d.ts.map +1 -1
- package/dist/ActionList/Item.js +3 -1
- package/dist/ActionMenu/ActionMenu.js +1 -1
- package/dist/Autocomplete/AutocompleteInput.d.ts.map +1 -1
- package/dist/Autocomplete/AutocompleteInput.js +0 -1
- package/dist/Autocomplete/AutocompleteMenu.js +334 -124
- package/dist/Avatar/Avatar.js +31 -23
- package/dist/Banner/Banner.d.ts.map +1 -1
- package/dist/Banner/Banner.js +0 -1
- package/dist/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
- package/dist/Breadcrumbs/Breadcrumbs.js +1 -0
- package/dist/Button/ButtonBase.d.ts.map +1 -1
- package/dist/Button/ButtonBase.js +0 -1
- package/dist/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/DataTable/Pagination.js +296 -87
- package/dist/Dialog/Dialog.js +1 -1
- package/dist/FilteredActionList/useAnnouncements.d.ts.map +1 -1
- package/dist/FilteredActionList/useAnnouncements.js +1 -0
- package/dist/Heading/Heading.d.ts.map +1 -1
- package/dist/Heading/Heading.js +0 -1
- package/dist/LabelGroup/LabelGroup.d.ts.map +1 -1
- package/dist/LabelGroup/LabelGroup.js +1 -0
- package/dist/Link/Link.d.ts.map +1 -1
- package/dist/Link/Link.js +0 -1
- package/dist/Portal/Portal.d.ts.map +1 -1
- package/dist/Portal/Portal.js +0 -1
- package/dist/SelectPanel/SelectPanel.d.ts.map +1 -1
- package/dist/SelectPanel/SelectPanel.js +0 -1
- package/dist/SkeletonAvatar/SkeletonAvatar.js +31 -23
- package/dist/ThemeProvider.d.ts.map +1 -1
- package/dist/ThemeProvider.js +1 -0
- 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/ToggleSwitch/ToggleSwitch.d.ts.map +1 -1
- package/dist/Token/IssueLabelToken.js +280 -57
- package/dist/Token/_RemoveTokenButton.d.ts +1 -1
- package/dist/Token/_RemoveTokenButton.d.ts.map +1 -1
- package/dist/Token/_RemoveTokenButton.js +4 -3
- package/dist/TooltipV2/Tooltip.d.ts.map +1 -1
- package/dist/TooltipV2/Tooltip.js +28 -25
- package/dist/TreeView/TreeView.d.ts.map +1 -1
- package/dist/TreeView/TreeView.js +5 -1
- package/dist/UnderlineNav/UnderlineNav.d.ts.map +1 -1
- package/dist/UnderlineNav/UnderlineNav.js +0 -1
- package/dist/deprecated/utils/create-slots.d.ts.map +1 -1
- package/dist/experimental/SelectPanel2/SelectPanel.d.ts.map +1 -1
- package/dist/experimental/SelectPanel2/SelectPanel.js +4 -2
- package/dist/hooks/useAnchoredPosition.d.ts.map +1 -1
- package/dist/hooks/useAnchoredPosition.js +0 -1
- package/dist/hooks/useControllableState.d.ts.map +1 -1
- package/dist/hooks/useControllableState.js +2 -0
- package/dist/hooks/useFocusTrap.d.ts.map +1 -1
- package/dist/hooks/useFocusTrap.js +0 -1
- package/dist/hooks/useFocusZone.d.ts.map +1 -1
- package/dist/hooks/useFocusZone.js +0 -1
- package/dist/hooks/useIsMacOS.d.ts.map +1 -1
- package/dist/hooks/useIsMacOS.js +3 -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} +14 -29
- package/dist/hooks/useMenuInitialFocus.d.ts.map +1 -1
- package/dist/hooks/useMenuInitialFocus.js +0 -1
- package/dist/hooks/useOnEscapePress.d.ts.map +1 -1
- package/dist/hooks/useOnEscapePress.js +0 -1
- package/dist/hooks/useRenderForcingRef.d.ts.map +1 -1
- package/dist/hooks/useRenderForcingRef.js +37 -7
- package/dist/hooks/useResizeObserver.d.ts.map +1 -1
- package/dist/hooks/useResizeObserver.js +0 -1
- 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/dist/hooks/useSafeTimeout.d.ts.map +1 -1
- package/dist/hooks/useSafeTimeout.js +0 -1
- package/dist/hooks/useScrollFlash.d.ts.map +1 -1
- package/dist/internal/components/ValidationAnimationContainer.d.ts.map +1 -1
- package/dist/internal/hooks/useFocus.d.ts.map +1 -1
- package/dist/internal/hooks/useMergedRefs.d.ts.map +1 -1
- package/dist/internal/hooks/useMergedRefs.js +0 -1
- package/generated/components.json +3 -3
- package/package.json +8 -8
- 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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectPanel.d.ts","sourceRoot":"","sources":["../../../src/experimental/SelectPanel2/SelectPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAA;AAGvE,OAAO,KAAK,EAAC,WAAW,EAAE,cAAc,EAAmB,SAAS,EAAE,aAAa,EAAC,MAAM,aAAa,CAAA;AAevG,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,uBAAuB,CAAA;AAMvD,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,gCAAgC,CAAA;AAInE,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,mBAAmB,CAAA;AACvD,OAAO,KAAK,EAAC,gBAAgB,EAAE,cAAc,EAAC,MAAM,mBAAmB,CAAA;AA2BvE,MAAM,MAAM,gBAAgB,GAAG;IAC7B,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,OAAO,CAAC,EAAE,UAAU,GAAG,OAAO,GAAG,eAAe,CAAC,UAAU,GAAG,OAAO,EAAE,aAAa,GAAG,cAAc,CAAC,CAAA;IACtG,gBAAgB,CAAC,EAAE,QAAQ,GAAG,UAAU,GAAG,SAAS,CAAA;IACpD,EAAE,CAAC,EAAE,MAAM,CAAA;IAEX,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAA;IAC9C,wBAAwB,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAA;IAEpD,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB,gBAAgB,CAAC,EAAE,SAAS,GAAG,CAAC,MAAM,IAAI,CAAC,CAAA;IAC3C,QAAQ,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,eAAe,CAAC,KAAK,IAAI,CAAA;IAG7D,KAAK,CAAC,EAAE,YAAY,CAAC,OAAO,CAAC,CAAA;IAC7B,MAAM,CAAC,EAAE,aAAa,CAAA;IACtB,SAAS,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,WAAW,CAAC,EAAE,QAAQ,CAAC,CAAA;IAExD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;
|
|
1
|
+
{"version":3,"file":"SelectPanel.d.ts","sourceRoot":"","sources":["../../../src/experimental/SelectPanel2/SelectPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAA;AAGvE,OAAO,KAAK,EAAC,WAAW,EAAE,cAAc,EAAmB,SAAS,EAAE,aAAa,EAAC,MAAM,aAAa,CAAA;AAevG,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,uBAAuB,CAAA;AAMvD,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,gCAAgC,CAAA;AAInE,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,mBAAmB,CAAA;AACvD,OAAO,KAAK,EAAC,gBAAgB,EAAE,cAAc,EAAC,MAAM,mBAAmB,CAAA;AA2BvE,MAAM,MAAM,gBAAgB,GAAG;IAC7B,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,OAAO,CAAC,EAAE,UAAU,GAAG,OAAO,GAAG,eAAe,CAAC,UAAU,GAAG,OAAO,EAAE,aAAa,GAAG,cAAc,CAAC,CAAA;IACtG,gBAAgB,CAAC,EAAE,QAAQ,GAAG,UAAU,GAAG,SAAS,CAAA;IACpD,EAAE,CAAC,EAAE,MAAM,CAAA;IAEX,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAA;IAC9C,wBAAwB,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAA;IAEpD,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB,gBAAgB,CAAC,EAAE,SAAS,GAAG,CAAC,MAAM,IAAI,CAAC,CAAA;IAC3C,QAAQ,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,eAAe,CAAC,KAAK,IAAI,CAAA;IAG7D,KAAK,CAAC,EAAE,YAAY,CAAC,OAAO,CAAC,CAAA;IAC7B,MAAM,CAAC,EAAE,aAAa,CAAA;IACtB,SAAS,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,WAAW,CAAC,EAAE,QAAQ,CAAC,CAAA;IAExD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAsdD,MAAM,MAAM,+BAA+B,GAAG;IAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAC,GAAG,CACxE,CAAC;IAAC,OAAO,EAAE,QAAQ,CAAA;CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC,CAAC,GAC7D,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAC,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC,GACxC,CAAC;IAAC,OAAO,EAAE,UAAU,CAAC;IAAC,EAAE,CAAC,EAAE,MAAM,CAAA;CAAC,GAAG,aAAa,CAAC,CACvD,CAAA;AAwBD,MAAM,MAAM,uBAAuB,GAAG;IAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAC,GAAG,CAChE;IACE,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,SAAS,GAAG,OAAO,GAAG,OAAO,CAAA;CACvC,GACD;IACE,IAAI,CAAC,EAAE,QAAQ,CAAA;IACf,KAAK,CAAC,EAAE,KAAK,CAAA;IACb,OAAO,EAAE,SAAS,GAAG,OAAO,CAAA;CAC7B,CACJ,CAAA;AAuCD,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;iBAxRoE,MAAM,IAAI;;;;;;;;;4BA6NxC,KAAK,CAAC,iBAAiB;;;CAmEnF,CAAA"}
|
|
@@ -85,7 +85,7 @@ const Panel = ({
|
|
|
85
85
|
};
|
|
86
86
|
const contents = React.Children.map(props.children, child => {
|
|
87
87
|
if (/*#__PURE__*/React.isValidElement(child) && (child.type === SelectPanelButton || isSlot(child, SelectPanelButton))) {
|
|
88
|
-
// eslint-disable-next-line react-
|
|
88
|
+
// eslint-disable-next-line react-hooks/immutability
|
|
89
89
|
Anchor = /*#__PURE__*/React.cloneElement(child, {
|
|
90
90
|
// @ts-ignore TODO
|
|
91
91
|
ref: anchorRef,
|
|
@@ -272,7 +272,9 @@ const SelectPanelButton = /*#__PURE__*/React.forwardRef((props, anchorRef) => {
|
|
|
272
272
|
}, [inputProps.id]);
|
|
273
273
|
if (labelText) {
|
|
274
274
|
return /*#__PURE__*/jsx(ButtonComponent, {
|
|
275
|
-
ref: anchorRef
|
|
275
|
+
ref: anchorRef
|
|
276
|
+
// eslint-disable-next-line react-hooks/refs
|
|
277
|
+
,
|
|
276
278
|
"aria-label": `${anchorRef.current.textContent}, ${labelText}`,
|
|
277
279
|
...inputProps
|
|
278
280
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAnchoredPosition.d.ts","sourceRoot":"","sources":["../../src/hooks/useAnchoredPosition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAC,cAAc,EAAE,gBAAgB,EAAC,MAAM,mBAAmB,CAAA;AAKvE,MAAM,WAAW,4BAA6B,SAAQ,OAAO,CAAC,gBAAgB,CAAC;IAC7E,kBAAkB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,CAAA;IAC7C,gBAAgB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,CAAA;IAC3C,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,cAAc,GAAG,SAAS,KAAK,IAAI,CAAA;CAClE;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CACjC,QAAQ,CAAC,EAAE,4BAA4B,EACvC,YAAY,GAAE,KAAK,CAAC,cAAmB,GACtC;IACD,kBAAkB,EAAE,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,CAAA;IAC5C,gBAAgB,EAAE,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,CAAA;IAC1C,QAAQ,EAAE,cAAc,GAAG,SAAS,CAAA;CACrC,
|
|
1
|
+
{"version":3,"file":"useAnchoredPosition.d.ts","sourceRoot":"","sources":["../../src/hooks/useAnchoredPosition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAC,cAAc,EAAE,gBAAgB,EAAC,MAAM,mBAAmB,CAAA;AAKvE,MAAM,WAAW,4BAA6B,SAAQ,OAAO,CAAC,gBAAgB,CAAC;IAC7E,kBAAkB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,CAAA;IAC7C,gBAAgB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,CAAA;IAC3C,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,cAAc,GAAG,SAAS,KAAK,IAAI,CAAA;CAClE;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CACjC,QAAQ,CAAC,EAAE,4BAA4B,EACvC,YAAY,GAAE,KAAK,CAAC,cAAmB,GACtC;IACD,kBAAkB,EAAE,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,CAAA;IAC5C,gBAAgB,EAAE,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,CAAA;IAC1C,QAAQ,EAAE,cAAc,GAAG,SAAS,CAAA;CACrC,CA6EA"}
|
|
@@ -67,7 +67,6 @@ function useAnchoredPosition(settings, dependencies = []) {
|
|
|
67
67
|
}
|
|
68
68
|
setPrevHeight((_floatingElementRef$c5 = floatingElementRef.current) === null || _floatingElementRef$c5 === void 0 ? void 0 : _floatingElementRef$c5.clientHeight);
|
|
69
69
|
},
|
|
70
|
-
// eslint-disable-next-line react-compiler/react-compiler
|
|
71
70
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
72
71
|
[floatingElementRef, anchorElementRef, ...dependencies]);
|
|
73
72
|
useIsomorphicLayoutEffect(() => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useControllableState.d.ts","sourceRoot":"","sources":["../../src/hooks/useControllableState.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,KAAK,wBAAwB,CAAC,CAAC,IAAI;IACjC;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;;;SAGK;IACL,YAAY,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAA;IAC3B;;OAEG;IACH,KAAK,CAAC,EAAE,CAAC,CAAA;IACT;;;;OAIG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAA;CAC9B,CAAA;AAED;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,EACtC,IAAe,EACf,YAAY,EACZ,KAAK,EACL,QAAQ,GACT,EAAE,wBAAwB,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"useControllableState.d.ts","sourceRoot":"","sources":["../../src/hooks/useControllableState.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,KAAK,wBAAwB,CAAC,CAAC,IAAI;IACjC;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;;;SAGK;IACL,YAAY,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAA;IAC3B;;OAEG;IACH,KAAK,CAAC,EAAE,CAAC,CAAA;IACT;;;;OAIG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAA;CAC9B,CAAA;AAED;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,EACtC,IAAe,EACf,YAAY,EACZ,KAAK,EACL,QAAQ,GACT,EAAE,wBAAwB,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAoE5E"}
|
|
@@ -51,6 +51,8 @@ function useControllableState({
|
|
|
51
51
|
process.env.NODE_ENV !== "production" ? warning(true, 'A component is changing a controlled %s component to be uncontrolled. ' + 'This is likely caused by the value changing to an undefined value ' + 'from a defined one. Decide between using a controlled or ' + 'uncontrolled value for the lifetime of the component. ' + 'More info: https://reactjs.org/link/controlled-components', name) : void 0;
|
|
52
52
|
}
|
|
53
53
|
}, [name, value]);
|
|
54
|
+
|
|
55
|
+
// eslint-disable-next-line react-hooks/refs
|
|
54
56
|
if (controlled.current === true) {
|
|
55
57
|
return [value, setState];
|
|
56
58
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFocusTrap.d.ts","sourceRoot":"","sources":["../../src/hooks/useFocusTrap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,MAAM,WAAW,qBAAqB;IACpC;;;OAGG;IACH,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAA;IAE3C;;;OAGG;IACH,eAAe,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAA;IAE9C;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;;OAGG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAE/B;;;;;OAKG;IACH,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAA;CAC9C;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAC1B,QAAQ,CAAC,EAAE,qBAAqB,EAChC,YAAY,GAAE,KAAK,CAAC,cAAmB,GACtC;IAAC,YAAY,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IAAC,eAAe,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAA;CAAC,
|
|
1
|
+
{"version":3,"file":"useFocusTrap.d.ts","sourceRoot":"","sources":["../../src/hooks/useFocusTrap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,MAAM,WAAW,qBAAqB;IACpC;;;OAGG;IACH,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAA;IAE3C;;;OAGG;IACH,eAAe,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAA;IAE9C;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;;OAGG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAE/B;;;;;OAKG;IACH,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAA;CAC9C;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAC1B,QAAQ,CAAC,EAAE,qBAAqB,EAChC,YAAY,GAAE,KAAK,CAAC,cAAmB,GACtC;IAAC,YAAY,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IAAC,eAAe,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAA;CAAC,CA2C7F"}
|
|
@@ -45,7 +45,6 @@ function useFocusTrap(settings, dependencies = []) {
|
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
},
|
|
48
|
-
// eslint-disable-next-line react-compiler/react-compiler
|
|
49
48
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
50
49
|
[containerRef, initialFocusRef, disabled, ...dependencies]);
|
|
51
50
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFocusZone.d.ts","sourceRoot":"","sources":["../../src/hooks/useFocusZone.ts"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAA;AAEtC,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,mBAAmB,CAAA;AAExD,OAAO,EAAC,SAAS,EAAC,MAAM,mBAAmB,CAAA;AAC3C,YAAY,EAAC,SAAS,EAAC,MAAM,mBAAmB,CAAA;AAEhD,MAAM,WAAW,qBAAsB,SAAQ,IAAI,CAAC,iBAAiB,EAAE,yBAAyB,CAAC;IAC/F;;;OAGG;IACH,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAA;IAE3C;;;OAGG;IACH,qBAAqB,CAAC,EAAE,OAAO,GAAG,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAA;IAE9D;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,wBAAgB,YAAY,CAC1B,QAAQ,GAAE,qBAA0B,EACpC,YAAY,GAAE,KAAK,CAAC,cAAmB,GACtC;IAAC,YAAY,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IAAC,0BAA0B,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAA;CAAC,
|
|
1
|
+
{"version":3,"file":"useFocusZone.d.ts","sourceRoot":"","sources":["../../src/hooks/useFocusZone.ts"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAA;AAEtC,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,mBAAmB,CAAA;AAExD,OAAO,EAAC,SAAS,EAAC,MAAM,mBAAmB,CAAA;AAC3C,YAAY,EAAC,SAAS,EAAC,MAAM,mBAAmB,CAAA;AAEhD,MAAM,WAAW,qBAAsB,SAAQ,IAAI,CAAC,iBAAiB,EAAE,yBAAyB,CAAC;IAC/F;;;OAGG;IACH,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAA;IAE3C;;;OAGG;IACH,qBAAqB,CAAC,EAAE,OAAO,GAAG,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAA;IAE9D;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,wBAAgB,YAAY,CAC1B,QAAQ,GAAE,qBAA0B,EACpC,YAAY,GAAE,KAAK,CAAC,cAAmB,GACtC;IAAC,YAAY,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IAAC,0BAA0B,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAA;CAAC,CAoCxG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useIsMacOS.d.ts","sourceRoot":"","sources":["../../src/hooks/useIsMacOS.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useIsMacOS.d.ts","sourceRoot":"","sources":["../../src/hooks/useIsMacOS.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,wBAAgB,UAAU,YASzB"}
|
package/dist/hooks/useIsMacOS.js
CHANGED
|
@@ -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,WAmExE;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,8 +2,8 @@ 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
|
|
6
|
-
const $ = c(
|
|
5
|
+
function useMedia(mediaQueryString, defaultState) {
|
|
6
|
+
const $ = c(8);
|
|
7
7
|
const features = useContext(MatchMediaContext);
|
|
8
8
|
let t0;
|
|
9
9
|
if ($[0] !== defaultState || $[1] !== features || $[2] !== mediaQueryString) {
|
|
@@ -23,28 +23,13 @@ function useMediaUnsafeSSR(mediaQueryString, defaultState) {
|
|
|
23
23
|
t0 = $[3];
|
|
24
24
|
}
|
|
25
25
|
const [matches, setMatches] = React.useState(t0);
|
|
26
|
+
if (features[mediaQueryString] !== undefined && matches !== features[mediaQueryString]) {
|
|
27
|
+
setMatches(features[mediaQueryString]);
|
|
28
|
+
}
|
|
26
29
|
let t1;
|
|
27
30
|
let t2;
|
|
28
31
|
if ($[4] !== features || $[5] !== mediaQueryString) {
|
|
29
32
|
t1 = () => {
|
|
30
|
-
if (features[mediaQueryString] !== undefined) {
|
|
31
|
-
setMatches(features[mediaQueryString]);
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
t2 = [features, mediaQueryString];
|
|
35
|
-
$[4] = features;
|
|
36
|
-
$[5] = mediaQueryString;
|
|
37
|
-
$[6] = t1;
|
|
38
|
-
$[7] = t2;
|
|
39
|
-
} else {
|
|
40
|
-
t1 = $[6];
|
|
41
|
-
t2 = $[7];
|
|
42
|
-
}
|
|
43
|
-
useEffect(t1, t2);
|
|
44
|
-
let t3;
|
|
45
|
-
let t4;
|
|
46
|
-
if ($[8] !== features || $[9] !== mediaQueryString) {
|
|
47
|
-
t3 = () => {
|
|
48
33
|
if (features[mediaQueryString] !== undefined) {
|
|
49
34
|
return;
|
|
50
35
|
}
|
|
@@ -66,16 +51,16 @@ function useMediaUnsafeSSR(mediaQueryString, defaultState) {
|
|
|
66
51
|
}
|
|
67
52
|
};
|
|
68
53
|
};
|
|
69
|
-
|
|
70
|
-
$[
|
|
71
|
-
$[
|
|
72
|
-
$[
|
|
73
|
-
$[
|
|
54
|
+
t2 = [features, mediaQueryString];
|
|
55
|
+
$[4] = features;
|
|
56
|
+
$[5] = mediaQueryString;
|
|
57
|
+
$[6] = t1;
|
|
58
|
+
$[7] = t2;
|
|
74
59
|
} else {
|
|
75
|
-
|
|
76
|
-
|
|
60
|
+
t1 = $[6];
|
|
61
|
+
t2 = $[7];
|
|
77
62
|
}
|
|
78
|
-
useEffect(
|
|
63
|
+
useEffect(t1, t2);
|
|
79
64
|
return matches;
|
|
80
65
|
}
|
|
81
66
|
// Used to keep track of overrides to specific media query features, this should
|
|
@@ -83,4 +68,4 @@ function useMediaUnsafeSSR(mediaQueryString, defaultState) {
|
|
|
83
68
|
// unavailable through devtools
|
|
84
69
|
const MatchMediaContext = /*#__PURE__*/createContext({});
|
|
85
70
|
|
|
86
|
-
export {
|
|
71
|
+
export { useMedia };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMenuInitialFocus.d.ts","sourceRoot":"","sources":["../../src/hooks/useMenuInitialFocus.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,eAAO,MAAM,mBAAmB,GAC9B,MAAM,OAAO,EACb,eAAe,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,EAC3C,YAAY,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,
|
|
1
|
+
{"version":3,"file":"useMenuInitialFocus.d.ts","sourceRoot":"","sources":["../../src/hooks/useMenuInitialFocus.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,eAAO,MAAM,mBAAmB,GAC9B,MAAM,OAAO,EACb,eAAe,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,EAC3C,YAAY,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,SAsEzC,CAAA"}
|
|
@@ -58,7 +58,6 @@ const useMenuInitialFocus = (open, containerRef, anchorRef) => {
|
|
|
58
58
|
},
|
|
59
59
|
// we don't want containerRef in dependencies
|
|
60
60
|
// because re-renders to containerRef while it's open should not fire initialMenuFocus
|
|
61
|
-
// eslint-disable-next-line react-compiler/react-compiler
|
|
62
61
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
63
62
|
[open, openingGesture, anchorRef]);
|
|
64
63
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useOnEscapePress.d.ts","sourceRoot":"","sources":["../../src/hooks/useOnEscapePress.ts"],"names":[],"mappings":"AA+BA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,gBAAgB,GAC3B,UAAU,CAAC,CAAC,EAAE,aAAa,KAAK,IAAI,EACpC,uBAAsB,KAAK,CAAC,cAA2B,KACtD,
|
|
1
|
+
{"version":3,"file":"useOnEscapePress.d.ts","sourceRoot":"","sources":["../../src/hooks/useOnEscapePress.ts"],"names":[],"mappings":"AA+BA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,gBAAgB,GAC3B,UAAU,CAAC,CAAC,EAAE,aAAa,KAAK,IAAI,EACpC,uBAAsB,KAAK,CAAC,cAA2B,KACtD,IAyBF,CAAA"}
|
|
@@ -46,7 +46,6 @@ let handlerId = 0;
|
|
|
46
46
|
* memoized. See `React.useCallback` for more info on memoization.
|
|
47
47
|
*/
|
|
48
48
|
const useOnEscapePress = (onEscape, callbackDependencies = [onEscape]) => {
|
|
49
|
-
// eslint-disable-next-line react-compiler/react-compiler
|
|
50
49
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
51
50
|
const escapeCallback = useCallback(onEscape, callbackDependencies);
|
|
52
51
|
const handler = useCallback(event => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useRenderForcingRef.d.ts","sourceRoot":"","sources":["../../src/hooks/useRenderForcingRef.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAmB,SAAS,EAAC,MAAM,OAAO,CAAA;AAGtD;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,IAAI,
|
|
1
|
+
{"version":3,"file":"useRenderForcingRef.d.ts","sourceRoot":"","sources":["../../src/hooks/useRenderForcingRef.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAmB,SAAS,EAAC,MAAM,OAAO,CAAA;AAGtD;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,IAAI,uCAKzC,IAAI,GAAG,IAAI,WAYvB"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c } from 'react-compiler-runtime';
|
|
2
|
+
import { useState, useRef, useEffect } from 'react';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* There are certain situations where a ref might be set after the current render cycle for a
|
|
@@ -7,14 +8,43 @@ import { useState, useRef, useCallback } from 'react';
|
|
|
7
8
|
* @type TRef The type of the RefObject which should be created.
|
|
8
9
|
*/
|
|
9
10
|
function useRenderForcingRef(value) {
|
|
11
|
+
const $ = c(5);
|
|
10
12
|
const [refCurrent, setRefCurrent] = useState(value || null);
|
|
11
13
|
const ref = useRef(null);
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
let t0;
|
|
15
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
16
|
+
t0 = newRef => {
|
|
17
|
+
ref.current = newRef;
|
|
18
|
+
setRefCurrent(newRef);
|
|
19
|
+
};
|
|
20
|
+
$[0] = t0;
|
|
21
|
+
} else {
|
|
22
|
+
t0 = $[0];
|
|
23
|
+
}
|
|
24
|
+
const setRef = t0;
|
|
25
|
+
let t1;
|
|
26
|
+
let t2;
|
|
27
|
+
if ($[1] !== refCurrent) {
|
|
28
|
+
t1 = () => {
|
|
29
|
+
ref.current = refCurrent;
|
|
30
|
+
};
|
|
31
|
+
t2 = [refCurrent];
|
|
32
|
+
$[1] = refCurrent;
|
|
33
|
+
$[2] = t1;
|
|
34
|
+
$[3] = t2;
|
|
35
|
+
} else {
|
|
36
|
+
t1 = $[2];
|
|
37
|
+
t2 = $[3];
|
|
38
|
+
}
|
|
39
|
+
useEffect(t1, t2);
|
|
40
|
+
let t3;
|
|
41
|
+
if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
|
|
42
|
+
t3 = [ref, setRef];
|
|
43
|
+
$[4] = t3;
|
|
44
|
+
} else {
|
|
45
|
+
t3 = $[4];
|
|
46
|
+
}
|
|
47
|
+
return t3;
|
|
18
48
|
}
|
|
19
49
|
|
|
20
50
|
export { useRenderForcingRef };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useResizeObserver.d.ts","sourceRoot":"","sources":["../../src/hooks/useResizeObserver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,OAAO,CAAA;AAKpC,MAAM,MAAM,sBAAsB,GAAG,CAAC,OAAO,EAAE,mBAAmB,EAAE,KAAK,IAAI,CAAA;AAE7E,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,eAAe,CAAA;CAC7B;AAED,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,WAAW,EACrD,QAAQ,EAAE,sBAAsB,EAChC,MAAM,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC,EACrB,SAAS,GAAE,OAAO,EAAO,
|
|
1
|
+
{"version":3,"file":"useResizeObserver.d.ts","sourceRoot":"","sources":["../../src/hooks/useResizeObserver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,OAAO,CAAA;AAKpC,MAAM,MAAM,sBAAsB,GAAG,CAAC,OAAO,EAAE,mBAAmB,EAAE,KAAK,IAAI,CAAA;AAE7E,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,eAAe,CAAA;CAC7B;AAED,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,WAAW,EACrD,QAAQ,EAAE,sBAAsB,EAChC,MAAM,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC,EACrB,SAAS,GAAE,OAAO,EAAO,QAgD1B"}
|
|
@@ -39,7 +39,6 @@ function useResizeObserver(callback, target, depsArray = []) {
|
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
// eslint-disable-next-line react-compiler/react-compiler
|
|
43
42
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
44
43
|
}, [target === null || target === void 0 ? void 0 : target.current, ...depsArray]);
|
|
45
44
|
}
|
|
@@ -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) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSafeTimeout.d.ts","sourceRoot":"","sources":["../../src/hooks/useSafeTimeout.ts"],"names":[],"mappings":"AAEA,KAAK,UAAU,GAAG,CAAC,OAAO,EAAE,YAAY,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,MAAM,CAAA;AACzF,KAAK,YAAY,GAAG,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;AAExC;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,cAAc,IAAI;IAAC,cAAc,EAAE,UAAU,CAAC;IAAC,gBAAgB,EAAE,YAAY,CAAA;CAAC,
|
|
1
|
+
{"version":3,"file":"useSafeTimeout.d.ts","sourceRoot":"","sources":["../../src/hooks/useSafeTimeout.ts"],"names":[],"mappings":"AAEA,KAAK,UAAU,GAAG,CAAC,OAAO,EAAE,YAAY,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,MAAM,CAAA;AACzF,KAAK,YAAY,GAAG,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;AAExC;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,cAAc,IAAI;IAAC,cAAc,EAAE,UAAU,CAAC;IAAC,gBAAgB,EAAE,YAAY,CAAA;CAAC,CA2BrG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useScrollFlash.d.ts","sourceRoot":"","sources":["../../src/hooks/useScrollFlash.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,kBAAkB,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,
|
|
1
|
+
{"version":3,"file":"useScrollFlash.d.ts","sourceRoot":"","sources":["../../src/hooks/useScrollFlash.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,kBAAkB,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,QAetF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ValidationAnimationContainer.d.ts","sourceRoot":"","sources":["../../../src/internal/components/ValidationAnimationContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,OAAO,CAAA;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,UAAU,KAAM,SAAQ,SAAS,CAAC,cAAc,CAAC;IAC/C,IAAI,CAAC,EAAE,OAAO,CAAA;CACf;AACD,QAAA,MAAM,4BAA4B,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAAC,
|
|
1
|
+
{"version":3,"file":"ValidationAnimationContainer.d.ts","sourceRoot":"","sources":["../../../src/internal/components/ValidationAnimationContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,OAAO,CAAA;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,UAAU,KAAM,SAAQ,SAAS,CAAC,cAAc,CAAC;IAC/C,IAAI,CAAC,EAAE,OAAO,CAAA;CACf;AACD,QAAA,MAAM,4BAA4B,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAmB1E,CAAA;AAED,eAAe,4BAA4B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFocus.d.ts","sourceRoot":"","sources":["../../../src/internal/hooks/useFocus.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,SAAS,EAAsB,MAAM,OAAO,CAAA;AAEzD,wBAAgB,QAAQ,
|
|
1
|
+
{"version":3,"file":"useFocus.d.ts","sourceRoot":"","sources":["../../../src/internal/hooks/useFocus.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,SAAS,EAAsB,MAAM,OAAO,CAAA;AAEzD,wBAAgB,QAAQ,0GAmBvB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMergedRefs.d.ts","sourceRoot":"","sources":["../../../src/internal/hooks/useMergedRefs.ts"],"names":[],"mappings":"AAEA,wBAAgB,aAAa,CAAC,CAAC,EAC7B,GAAG,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,GACvF,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"useMergedRefs.d.ts","sourceRoot":"","sources":["../../../src/internal/hooks/useMergedRefs.ts"],"names":[],"mappings":"AAEA,wBAAgB,aAAa,CAAC,CAAC,EAC7B,GAAG,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,GACvF,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAWtB"}
|
|
@@ -227,7 +227,7 @@
|
|
|
227
227
|
},
|
|
228
228
|
{
|
|
229
229
|
"id": "components-actionlist-features--child-with-side-effects",
|
|
230
|
-
"code": "() => {\n const user = users[0]\n const [selected, setSelected] = React.useState(true)\n const SideEffectDescription = () => {\n
|
|
230
|
+
"code": "() => {\n const user = users[0]\n const [selected, setSelected] = React.useState(true)\n const SideEffectDescription = () => {\n const [seconds, setSeconds] = React.useState(0)\n React.useEffect(() => {\n const fn = () => setSeconds((s) => s + 1)\n const interval = window.setInterval(fn, 1000)\n return () => window.clearInterval(interval)\n }, [])\n return <>{seconds} seconds passed</>\n }\n return (\n <ActionList\n selectionVariant=\"multiple\"\n role=\"listbox\"\n aria-label=\"Assignees\"\n >\n <ActionList.Item\n selected={selected}\n onSelect={() => setSelected(!selected)}\n role=\"option\"\n >\n <ActionList.LeadingVisual>\n <Avatar src={`https://avatars.githubusercontent.com/${user.login}`} />\n </ActionList.LeadingVisual>\n {user.login}\n <ActionList.Description>\n <SideEffectDescription />\n </ActionList.Description>\n </ActionList.Item>\n </ActionList>\n )\n}"
|
|
231
231
|
},
|
|
232
232
|
{
|
|
233
233
|
"id": "components-actionlist-features--inside-overlay",
|
|
@@ -988,7 +988,7 @@
|
|
|
988
988
|
},
|
|
989
989
|
{
|
|
990
990
|
"id": "components-autocomplete-features--in-a-dialog",
|
|
991
|
-
"code": "() => {\n const outerContainerRef = useRef<HTMLDivElement>(null)\n const [mounted, setMounted] = useState(false)\n const [isDialogOpen, setIsDialogOpen] = useState(false)\n useEffect(() => {\n if (outerContainerRef.current instanceof HTMLElement) {\n registerPortalRoot(outerContainerRef.current, 'outerContainer')\n setMounted(true)\n }\n }, [isDialogOpen])\n return (\n <>\n <Button onClick={() => setIsDialogOpen(true)}>Show dialog</Button>\n <Dialog\n aria-label=\"Dialog with autocomplete\"\n id=\"dialog-with-autocomplete\"\n isOpen={isDialogOpen}\n onDismiss={() => setIsDialogOpen(false)}\n >\n <div ref={outerContainerRef}>\n <form className={classes.FormPadding}>\n {mounted ? (\n <FormControl>\n <FormControl.Label id=\"autocompleteLabel\">\n Default label\n </FormControl.Label>\n <Autocomplete>\n <Autocomplete.Input data-testid=\"autocompleteInput\" />\n <Autocomplete.Overlay portalContainerName=\"outerContainer\">\n <Autocomplete.Menu\n items={items}\n selectedItemIds={[]}\n aria-labelledby=\"autocompleteLabel\"\n />\n </Autocomplete.Overlay>\n </Autocomplete>\n </FormControl>\n ) : null}\n </form>\n </div>\n </Dialog>\n <p>\n The Autocomplete.Overlay is portalled to a div inside the Dialog to\n ensure it appears above the dialog in the stacking context.\n </p>\n </>\n )\n}"
|
|
991
|
+
"code": "() => {\n const outerContainerRef = useRef<HTMLDivElement>(null)\n const [mounted, setMounted] = useState(false)\n const [isDialogOpen, setIsDialogOpen] = useState(false)\n useEffect(() => {\n if (outerContainerRef.current instanceof HTMLElement) {\n registerPortalRoot(outerContainerRef.current, 'outerContainer')\n // eslint-disable-next-line react-hooks/set-state-in-effect\n setMounted(true)\n }\n }, [isDialogOpen])\n return (\n <>\n <Button onClick={() => setIsDialogOpen(true)}>Show dialog</Button>\n <Dialog\n aria-label=\"Dialog with autocomplete\"\n id=\"dialog-with-autocomplete\"\n isOpen={isDialogOpen}\n onDismiss={() => setIsDialogOpen(false)}\n >\n <div ref={outerContainerRef}>\n <form className={classes.FormPadding}>\n {mounted ? (\n <FormControl>\n <FormControl.Label id=\"autocompleteLabel\">\n Default label\n </FormControl.Label>\n <Autocomplete>\n <Autocomplete.Input data-testid=\"autocompleteInput\" />\n <Autocomplete.Overlay portalContainerName=\"outerContainer\">\n <Autocomplete.Menu\n items={items}\n selectedItemIds={[]}\n aria-labelledby=\"autocompleteLabel\"\n />\n </Autocomplete.Overlay>\n </Autocomplete>\n </FormControl>\n ) : null}\n </form>\n </div>\n </Dialog>\n <p>\n The Autocomplete.Overlay is portalled to a div inside the Dialog to\n ensure it appears above the dialog in the stacking context.\n </p>\n </>\n )\n}"
|
|
992
992
|
}
|
|
993
993
|
],
|
|
994
994
|
"importPath": "@primer/react",
|
|
@@ -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.c5ea35a01",
|
|
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",
|
|
@@ -90,19 +90,19 @@
|
|
|
90
90
|
"hsluv": "1.0.1",
|
|
91
91
|
"lodash.isempty": "^4.4.0",
|
|
92
92
|
"lodash.isobject": "^3.0.2",
|
|
93
|
-
"react-compiler-runtime": "^
|
|
93
|
+
"react-compiler-runtime": "^1.0.0",
|
|
94
94
|
"react-intersection-observer": "^9.16.0"
|
|
95
95
|
},
|
|
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",
|
|
@@ -141,7 +141,7 @@
|
|
|
141
141
|
"babel-plugin-dev-expression": "0.2.3",
|
|
142
142
|
"babel-plugin-macros": "3.1.0",
|
|
143
143
|
"babel-plugin-open-source": "1.3.4",
|
|
144
|
-
"babel-plugin-react-compiler": "^
|
|
144
|
+
"babel-plugin-react-compiler": "^1.0.0",
|
|
145
145
|
"babel-plugin-transform-replace-expressions": "0.2.0",
|
|
146
146
|
"babel-polyfill": "6.26.0",
|
|
147
147
|
"chalk": "^5.4.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"}
|