@primer/react 0.0.0-20261109161837 → 0.0.0-20261109223425

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-20261109161837
3
+ ## 0.0.0-20261109223425
4
4
 
5
5
  ### Minor Changes
6
6
 
@@ -18,9 +18,9 @@
18
18
 
19
19
  - Fake entry to force publishing
20
20
 
21
- - [#8628](https://github.com/primer/react/pull/8628) [`41f29c8`](https://github.com/primer/react/commit/41f29c845663936043618af29dcb71de4c9384b2) Thanks [@joshblack](https://github.com/joshblack)! - SkeletonAvatar, SkeletonText: Preserve the requested size and shape regardless of stylesheet load order
21
+ - [#8725](https://github.com/primer/react/pull/8725) [`155203f`](https://github.com/primer/react/commit/155203f2eac0987a1e588d020c7969d284c9b01f) Thanks [@mattcosta7](https://github.com/mattcosta7)! - useAnchoredPosition: Skip re-renders when the overlay position is unchanged, and reposition when `side` or `align` changes while open. This reduces re-renders in ActionMenu, SelectPanel, Autocomplete and AnchoredOverlay.
22
22
 
23
- - [#8681](https://github.com/primer/react/pull/8681) [`b776831`](https://github.com/primer/react/commit/b776831c2cf0961c5bb35cea1087974eb6c76488) Thanks [@mattcosta7](https://github.com/mattcosta7)! - SkeletonBox, SkeletonText, SkeletonAvatar, ProgressBar: Run the loading shimmer animation on the compositor to reduce main-thread work while skeletons are visible
23
+ - [#8628](https://github.com/primer/react/pull/8628) [`41f29c8`](https://github.com/primer/react/commit/41f29c845663936043618af29dcb71de4c9384b2) Thanks [@joshblack](https://github.com/joshblack)! - SkeletonAvatar, SkeletonText: Preserve the requested size and shape regardless of stylesheet load order
24
24
 
25
25
  - [#8562](https://github.com/primer/react/pull/8562) [`ee46232`](https://github.com/primer/react/commit/ee46232fafa24701415b21eed60cca68e589cf1c) Thanks [@joshblack](https://github.com/joshblack)! - useOnEscapePress, useOnOutsideClick: Improve performance when callbacks change between renders.
26
26
 
@@ -0,0 +1,2 @@
1
+ @keyframes prc-ProgressBar-shimmer-hIHBF{0%{mask-position:200%}to{mask-position:0}}.prc-ProgressBar-ProgressBarItem-mDIlB{--progress-width: ;--progress-bg: ;background-color:var(--progress-bg);width:var(--progress-width)}@media (prefers-reduced-motion:no-preference){.prc-ProgressBar-ProgressBarItem-mDIlB[data-animated=true]{animation-duration:1s;animation-iteration-count:infinite;animation-name:prc-ProgressBar-shimmer-hIHBF;mask-image:linear-gradient(75deg,#000 30%,rgba(0,0,0,.65) 80%);mask-size:200%}}.prc-ProgressBar-ProgressBarContainer-tCYE2{background-color:var(--progressBar-track-bgColor,#d1d9e0);border-radius:var(--borderRadius-small,.1875rem);display:flex;gap:2px;outline:solid 1px var(--progressBar-track-borderColor,#ffffff00);outline-offset:-1px;overflow:hidden}.prc-ProgressBar-ProgressBarContainer-tCYE2:where([data-progress-display=inline]){display:inline-flex}.prc-ProgressBar-ProgressBarContainer-tCYE2:where([data-progress-bar-size=default]){height:8px}.prc-ProgressBar-ProgressBarContainer-tCYE2:where([data-progress-bar-size=small]){height:5px}.prc-ProgressBar-ProgressBarContainer-tCYE2:where([data-progress-bar-size=large]){height:10px}@media (forced-colors:active){:root{--progress-bg:LinkText;--progressBar-track-bgColor:CanvasText}.prc-ProgressBar-ProgressBarContainer-tCYE2,.prc-ProgressBar-ProgressBarItem-mDIlB{forced-color-adjust:none}}
2
+ /*# sourceMappingURL=ProgressBar-e403d83d.css.map */
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/ProgressBar/ProgressBar.module.css.js"],"names":[],"mappings":"AAAA,yCACE,GACE,kBACF,CAEA,GACE,eACF,CACF,CAEA,uCAEE,kBAAkB,CAClB,eAAe,CAIf,mCAAoC,CAFpC,2BAaF,CATE,8CACE,2DAIE,qBAAsB,CACtB,kCAAmC,CAFnC,4CAAuB,CAFvB,8DAAoE,CACpE,cAIF,CACF,CAGF,4CAGE,yDAAkD,CAClD,gDAAwC,CAHxC,YAAa,CAIb,OAAQ,CACR,gEAAuD,CACvD,mBAAoB,CALpB,eAsBF,CAfE,kFACE,mBACF,CAEA,oFACE,UACF,CAEA,kFACE,UACF,CAEA,kFACE,WACF,CAGF,8BACE,MACE,sBAAuB,CACvB,sCACF,CAEA,mFAEE,wBACF,CACF","file":"ProgressBar-e403d83d.css","sourcesContent":["@keyframes shimmer {\n from {\n mask-position: 200%;\n }\n\n to {\n mask-position: 0%;\n }\n}\n\n.ProgressBarItem {\n /* these are passed from the component */\n --progress-width: ;\n --progress-bg: ;\n\n width: var(--progress-width);\n /* stylelint-disable-next-line primer/colors */\n background-color: var(--progress-bg);\n\n @media (prefers-reduced-motion: no-preference) {\n &[data-animated='true'] {\n mask-image: linear-gradient(75deg, #000 30%, rgb(0, 0, 0, 0.65) 80%);\n mask-size: 200%;\n animation-name: shimmer;\n animation-duration: 1s;\n animation-iteration-count: infinite;\n }\n }\n}\n\n.ProgressBarContainer {\n display: flex;\n overflow: hidden;\n background-color: var(--progressBar-track-bgColor);\n border-radius: var(--borderRadius-small);\n gap: 2px;\n outline: solid 1px var(--progressBar-track-borderColor);\n outline-offset: -1px;\n\n &:where([data-progress-display='inline']) {\n display: inline-flex;\n }\n\n &:where([data-progress-bar-size='default']) {\n height: 8px;\n }\n\n &:where([data-progress-bar-size='small']) {\n height: 5px;\n }\n\n &:where([data-progress-bar-size='large']) {\n height: 10px;\n }\n}\n\n@media (forced-colors: active) {\n :root {\n --progress-bg: LinkText;\n --progressBar-track-bgColor: CanvasText;\n }\n\n .ProgressBarContainer,\n .ProgressBarItem {\n forced-color-adjust: none;\n }\n}\n"]}
@@ -1,4 +1,4 @@
1
- import "./ProgressBar-3d1db6c7.css";
1
+ import "./ProgressBar-e403d83d.css";
2
2
  //#region src/ProgressBar/ProgressBar.module.css.js
3
3
  var ProgressBar_module_css_default = {
4
4
  "ProgressBarItem": "prc-ProgressBar-ProgressBarItem-mDIlB",
@@ -0,0 +1,2 @@
1
+ @keyframes prc-Skeleton-shimmer-mE-VG{0%{mask-position:200%}to{mask-position:0}}.prc-Skeleton-skeleton-Hkezl{animation:prc-Skeleton-shimmer-mE-VG;background-color:var(--skeletonLoader-bgColor,#818b981a)}@media (prefers-reduced-motion:no-preference){.prc-Skeleton-skeleton-Hkezl{animation:prc-Skeleton-shimmer-mE-VG;animation-duration:var(--base-duration-1000,[ object Object ]);animation-iteration-count:infinite;mask-image:linear-gradient(75deg,#000 30%,rgba(0,0,0,.65) 80%);mask-size:200%}}@media (forced-colors:active){.prc-Skeleton-skeleton-Hkezl{outline:1px solid transparent;outline-offset:-1px}}
2
+ /*# sourceMappingURL=skeleton-27888827.css.map */
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/Skeleton/skeleton.module.css.js"],"names":[],"mappings":"AAAA,sCACE,GACE,kBACF,CAEA,GACE,eACF,CACF,CAGA,6BAEE,oCAAkB,CADlB,wDAeF,CAZE,8CAJF,6BAOI,oCAAkB,CAClB,8DAA6C,CAC7C,kCAAmC,CAJnC,8DAAoE,CACpE,cAUJ,CANE,CAEA,8BAZF,6BAaI,6BAA8B,CAC9B,mBAEJ,CADE","file":"skeleton-27888827.css","sourcesContent":["@keyframes shimmer {\n from {\n mask-position: 200%;\n }\n\n to {\n mask-position: 0%;\n }\n}\n\n/* stylelint-disable-next-line selector-class-pattern -- Shared utility, not a component class. */\n.skeleton {\n background-color: var(--skeletonLoader-bgColor);\n animation: shimmer;\n\n @media (prefers-reduced-motion: no-preference) {\n mask-image: linear-gradient(75deg, #000 30%, rgb(0, 0, 0, 0.65) 80%);\n mask-size: 200%;\n animation: shimmer;\n animation-duration: var(--base-duration-1000);\n animation-iteration-count: infinite;\n }\n\n @media (forced-colors: active) {\n outline: 1px solid transparent;\n outline-offset: -1px;\n }\n}\n"]}
@@ -1,4 +1,4 @@
1
- import "./skeleton-bdbe6bf2.css";
1
+ import "./skeleton-27888827.css";
2
2
  //#region src/Skeleton/skeleton.module.css.js
3
3
  var skeleton_module_css_default = {
4
4
  "skeleton": "prc-Skeleton-skeleton-Hkezl",
@@ -38,38 +38,36 @@ function useAnchoredPosition(settings, dependencies = []) {
38
38
  const enabled = (_settings$enabled = settings === null || settings === void 0 ? void 0 : settings.enabled) !== null && _settings$enabled !== void 0 ? _settings$enabled : true;
39
39
  const savedOnPositionChange = React.useRef(settings === null || settings === void 0 ? void 0 : settings.onPositionChange);
40
40
  const [position, setPosition] = React.useState(void 0);
41
- const [_, setPrevHeight] = React.useState(void 0);
41
+ const prevHeightRef = React.useRef(void 0);
42
42
  const topPositionChanged = (prevPosition, newPosition) => {
43
43
  return prevPosition && ["outside-top", "inside-top"].includes(prevPosition.anchorSide) && (prevPosition.anchorSide !== newPosition.anchorSide || prevPosition.top < newPosition.top);
44
44
  };
45
- const updateElementHeight = () => {
46
- let heightUpdated = false;
47
- setPrevHeight((prevHeight) => {
48
- var _floatingElementRef$c, _floatingElementRef$c2;
49
- if (prevHeight && prevHeight > ((_floatingElementRef$c = (_floatingElementRef$c2 = floatingElementRef.current) === null || _floatingElementRef$c2 === void 0 ? void 0 : _floatingElementRef$c2.clientHeight) !== null && _floatingElementRef$c !== void 0 ? _floatingElementRef$c : 0)) {
50
- requestAnimationFrame(() => {
51
- floatingElementRef.current.style.height = `${prevHeight}px`;
52
- });
53
- heightUpdated = true;
54
- }
55
- return prevHeight;
56
- });
57
- return heightUpdated;
45
+ const updateElementHeight = (prevHeight) => {
46
+ var _floatingElementRef$c, _floatingElementRef$c2;
47
+ if (prevHeight && prevHeight > ((_floatingElementRef$c = (_floatingElementRef$c2 = floatingElementRef.current) === null || _floatingElementRef$c2 === void 0 ? void 0 : _floatingElementRef$c2.clientHeight) !== null && _floatingElementRef$c !== void 0 ? _floatingElementRef$c : 0)) {
48
+ requestAnimationFrame(() => {
49
+ floatingElementRef.current.style.height = `${prevHeight}px`;
50
+ });
51
+ return true;
52
+ }
53
+ return false;
58
54
  };
59
55
  const updatePosition = React.useCallback(() => {
60
- var _floatingElementRef$c5;
61
56
  if (!enabled) return;
57
+ const prevMeasured = prevHeightRef.current;
58
+ const prevHeight = (prevMeasured === null || prevMeasured === void 0 ? void 0 : prevMeasured.element) === floatingElementRef.current ? prevMeasured.height : void 0;
62
59
  if (floatingElementRef.current instanceof Element && anchorElementRef.current instanceof Element) {
63
60
  const newPosition = getAnchoredPosition(floatingElementRef.current, anchorElementRef.current, settings);
64
61
  setPosition((prev) => {
65
62
  if (settings !== null && settings !== void 0 && settings.pinPosition && topPositionChanged(prev, newPosition)) {
66
63
  var _anchorElementRef$cur, _anchorElementRef$cur2, _floatingElementRef$c3, _floatingElementRef$c4;
67
- if (((_anchorElementRef$cur = (_anchorElementRef$cur2 = anchorElementRef.current) === null || _anchorElementRef$cur2 === void 0 ? void 0 : _anchorElementRef$cur2.getBoundingClientRect().top) !== null && _anchorElementRef$cur !== void 0 ? _anchorElementRef$cur : 0) > ((_floatingElementRef$c3 = (_floatingElementRef$c4 = floatingElementRef.current) === null || _floatingElementRef$c4 === void 0 ? void 0 : _floatingElementRef$c4.clientHeight) !== null && _floatingElementRef$c3 !== void 0 ? _floatingElementRef$c3 : 0) && updateElementHeight()) return prev;
64
+ if (((_anchorElementRef$cur = (_anchorElementRef$cur2 = anchorElementRef.current) === null || _anchorElementRef$cur2 === void 0 ? void 0 : _anchorElementRef$cur2.getBoundingClientRect().top) !== null && _anchorElementRef$cur !== void 0 ? _anchorElementRef$cur : 0) > ((_floatingElementRef$c3 = (_floatingElementRef$c4 = floatingElementRef.current) === null || _floatingElementRef$c4 === void 0 ? void 0 : _floatingElementRef$c4.clientHeight) !== null && _floatingElementRef$c3 !== void 0 ? _floatingElementRef$c3 : 0) && updateElementHeight(prevHeight)) return prev;
68
65
  }
69
66
  if (prev && prev.anchorSide === newPosition.anchorSide) {
70
67
  var _savedOnPositionChang;
71
68
  (_savedOnPositionChang = savedOnPositionChange.current) === null || _savedOnPositionChang === void 0 || _savedOnPositionChang.call(savedOnPositionChange, newPosition);
72
69
  }
70
+ if (prev && prev.top === newPosition.top && prev.left === newPosition.left && prev.anchorSide === newPosition.anchorSide && prev.anchorAlign === newPosition.anchorAlign) return prev;
73
71
  return newPosition;
74
72
  });
75
73
  } else {
@@ -77,11 +75,21 @@ function useAnchoredPosition(settings, dependencies = []) {
77
75
  setPosition(void 0);
78
76
  (_savedOnPositionChang2 = savedOnPositionChange.current) === null || _savedOnPositionChang2 === void 0 || _savedOnPositionChang2.call(savedOnPositionChange, void 0);
79
77
  }
80
- setPrevHeight((_floatingElementRef$c5 = floatingElementRef.current) === null || _floatingElementRef$c5 === void 0 ? void 0 : _floatingElementRef$c5.clientHeight);
78
+ prevHeightRef.current = floatingElementRef.current ? {
79
+ element: floatingElementRef.current,
80
+ height: floatingElementRef.current.clientHeight
81
+ } : void 0;
81
82
  }, [
82
83
  floatingElementRef,
83
84
  anchorElementRef,
84
85
  enabled,
86
+ settings === null || settings === void 0 ? void 0 : settings.side,
87
+ settings === null || settings === void 0 ? void 0 : settings.align,
88
+ settings === null || settings === void 0 ? void 0 : settings.anchorOffset,
89
+ settings === null || settings === void 0 ? void 0 : settings.alignmentOffset,
90
+ settings === null || settings === void 0 ? void 0 : settings.allowOutOfBounds,
91
+ settings === null || settings === void 0 ? void 0 : settings.displayInViewport,
92
+ settings === null || settings === void 0 ? void 0 : settings.pinPosition,
85
93
  ...dependencies
86
94
  ]);
87
95
  useIsomorphicLayoutEffect(() => {
@@ -105,6 +113,11 @@ function useAnchoredPosition(settings, dependencies = []) {
105
113
  }
106
114
  }, [updatePosition]);
107
115
  useResizeObserver(updatePosition, void 0, [], enabled);
116
+ React.useEffect(() => {
117
+ if (!enabled) return;
118
+ window.addEventListener("resize", updatePosition);
119
+ return () => window.removeEventListener("resize", updatePosition);
120
+ }, [enabled, updatePosition]);
108
121
  useResizeObserver(updatePosition, floatingElementRef, [], enabled);
109
122
  const scrollAncestorsCacheRef = React.useRef({
110
123
  anchor: null,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@primer/react",
3
3
  "type": "module",
4
- "version": "0.0.0-20261109161837",
4
+ "version": "0.0.0-20261109223425",
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",
@@ -169,7 +169,7 @@
169
169
  "rolldown-plugin-dts": "^0.26.0",
170
170
  "rolldown-plugin-import-css": "^0.0.0",
171
171
  "rolldown-plugin-preserve-directives": "^0.0.0",
172
- "storybook": "10.6.6",
172
+ "storybook": "10.6.5",
173
173
  "terser": "5.36.0",
174
174
  "ts-toolbelt": "9.6.0",
175
175
  "tsx": "4.20.3",
@@ -1,2 +0,0 @@
1
- @keyframes prc-ProgressBar-shimmer-hIHBF{0%{transform:translateX(0)}to{transform:translateX(66.66667%)}}.prc-ProgressBar-ProgressBarItem-mDIlB{--progress-width: ;--progress-bg: ;background-color:var(--progress-bg);width:var(--progress-width)}@media (prefers-reduced-motion:no-preference){.prc-ProgressBar-ProgressBarItem-mDIlB[data-animated=true]{background-color:transparent;isolation:isolate;overflow:hidden;position:relative}.prc-ProgressBar-ProgressBarItem-mDIlB[data-animated=true]:before{animation-duration:1s;animation-iteration-count:infinite;animation-name:prc-ProgressBar-shimmer-hIHBF;background-color:var(--progress-bg);bottom:0;content:"";left:-200%;mask-image:linear-gradient(75deg,#000 30%,rgba(0,0,0,.65) 80%);mask-size:66.66667% 100%;position:absolute;top:0;width:300%;z-index:-1}}.prc-ProgressBar-ProgressBarContainer-tCYE2{background-color:var(--progressBar-track-bgColor,#d1d9e0);border-radius:var(--borderRadius-small,.1875rem);display:flex;gap:2px;outline:solid 1px var(--progressBar-track-borderColor,#ffffff00);outline-offset:-1px;overflow:hidden}.prc-ProgressBar-ProgressBarContainer-tCYE2:where([data-progress-display=inline]){display:inline-flex}.prc-ProgressBar-ProgressBarContainer-tCYE2:where([data-progress-bar-size=default]){height:8px}.prc-ProgressBar-ProgressBarContainer-tCYE2:where([data-progress-bar-size=small]){height:5px}.prc-ProgressBar-ProgressBarContainer-tCYE2:where([data-progress-bar-size=large]){height:10px}@media (forced-colors:active){:root{--progress-bg:LinkText;--progressBar-track-bgColor:CanvasText}.prc-ProgressBar-ProgressBarContainer-tCYE2,.prc-ProgressBar-ProgressBarItem-mDIlB{forced-color-adjust:none}}
2
- /*# sourceMappingURL=ProgressBar-3d1db6c7.css.map */
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/ProgressBar/ProgressBar.module.css.js"],"names":[],"mappings":"AACA,yCACE,GACE,uBACF,CAEA,GACE,+BACF,CACF,CAEA,uCAEE,kBAAkB,CAClB,eAAe,CAIf,mCAAoC,CAFpC,2BA8BF,CA1BE,8CACE,2DAIE,4BAA6B,CAC7B,iBAAkB,CAHlB,eAAgB,CADhB,iBAsBF,CAhBE,kEAaE,qBAAsB,CACtB,kCAAmC,CAFnC,4CAAuB,CAHvB,mCAAoC,CANpC,QAAS,CAIT,UAAW,CAHX,UAAW,CAMX,8DAAoE,CACpE,wBAA8B,CAV9B,iBAAkB,CAClB,KAAM,CAIN,UAAW,CADX,UAUF,CAEJ,CAGF,4CAGE,yDAAkD,CAClD,gDAAwC,CAHxC,YAAa,CAIb,OAAQ,CACR,gEAAuD,CACvD,mBAAoB,CALpB,eAsBF,CAfE,kFACE,mBACF,CAEA,oFACE,UACF,CAEA,kFACE,UACF,CAEA,kFACE,WACF,CAGF,8BACE,MACE,sBAAuB,CACvB,sCACF,CAEA,mFAEE,wBACF,CACF","file":"ProgressBar-3d1db6c7.css","sourcesContent":["/* See Skeleton/skeleton.module.css: a masked layer moved with `transform` so the compositor can run the shimmer */\n@keyframes shimmer {\n from {\n transform: translateX(0);\n }\n\n to {\n transform: translateX(calc(200% / 3));\n }\n}\n\n.ProgressBarItem {\n /* these are passed from the component */\n --progress-width: ;\n --progress-bg: ;\n\n width: var(--progress-width);\n /* stylelint-disable-next-line primer/colors */\n background-color: var(--progress-bg);\n\n @media (prefers-reduced-motion: no-preference) {\n &[data-animated='true'] {\n position: relative;\n overflow: hidden;\n /* The shimmer layer paints the background so the mask can move with it */\n background-color: transparent;\n isolation: isolate;\n\n &::before {\n position: absolute;\n top: 0;\n bottom: 0;\n left: -200%;\n z-index: -1;\n width: 300%;\n content: '';\n /* stylelint-disable-next-line primer/colors */\n background-color: var(--progress-bg);\n mask-image: linear-gradient(75deg, #000 30%, rgb(0, 0, 0, 0.65) 80%);\n mask-size: calc(200% / 3) 100%;\n animation-name: shimmer;\n animation-duration: 1s;\n animation-iteration-count: infinite;\n }\n }\n }\n}\n\n.ProgressBarContainer {\n display: flex;\n overflow: hidden;\n background-color: var(--progressBar-track-bgColor);\n border-radius: var(--borderRadius-small);\n gap: 2px;\n outline: solid 1px var(--progressBar-track-borderColor);\n outline-offset: -1px;\n\n &:where([data-progress-display='inline']) {\n display: inline-flex;\n }\n\n &:where([data-progress-bar-size='default']) {\n height: 8px;\n }\n\n &:where([data-progress-bar-size='small']) {\n height: 5px;\n }\n\n &:where([data-progress-bar-size='large']) {\n height: 10px;\n }\n}\n\n@media (forced-colors: active) {\n :root {\n --progress-bg: LinkText;\n --progressBar-track-bgColor: CanvasText;\n }\n\n .ProgressBarContainer,\n .ProgressBarItem {\n forced-color-adjust: none;\n }\n}\n"]}
@@ -1,2 +0,0 @@
1
- @keyframes prc-Skeleton-shimmer-mE-VG{0%{transform:translateX(0)}to{transform:translateX(66.66667%)}}.prc-Skeleton-skeleton-Hkezl{background-color:var(--skeletonLoader-bgColor,#818b981a)}@media (prefers-reduced-motion:no-preference){.prc-Skeleton-skeleton-Hkezl{background-color:transparent;isolation:isolate;overflow:hidden;position:relative}.prc-Skeleton-skeleton-Hkezl:before{animation:prc-Skeleton-shimmer-mE-VG;animation-duration:var(--base-duration-1000,[ object Object ]);animation-iteration-count:infinite;background-color:var(--skeletonLoader-bgColor,#818b981a);bottom:0;content:"";left:-200%;mask-image:linear-gradient(75deg,#000 30%,rgba(0,0,0,.65) 80%);mask-size:66.66667% 100%;position:absolute;top:0;width:300%;z-index:-1}}@media (forced-colors:active){.prc-Skeleton-skeleton-Hkezl{outline:1px solid transparent;outline-offset:-1px}}
2
- /*# sourceMappingURL=skeleton-bdbe6bf2.css.map */
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/Skeleton/skeleton.module.css.js"],"names":[],"mappings":"AAKA,sCACE,GACE,uBACF,CAEA,GACE,+BACF,CACF,CAGA,6BACE,wDA8BF,CA5BE,8CAHF,6BAOI,4BAA6B,CAC7B,iBAAkB,CAHlB,eAAgB,CADhB,iBA2BJ,CArBI,oCAWE,oCAAkB,CAClB,8DAA6C,CAC7C,kCAAmC,CALnC,wDAA+C,CAL/C,QAAS,CAIT,UAAW,CAHX,UAAW,CAKX,8DAAoE,CACpE,wBAA8B,CAT9B,iBAAkB,CAClB,KAAM,CAIN,UAAW,CADX,UASF,CACF,CAEA,8BA3BF,6BA4BI,6BAA8B,CAC9B,mBAEJ,CADE","file":"skeleton-bdbe6bf2.css","sourcesContent":["/*\n * The shimmer moves a masked layer with `transform` instead of animating `mask-position`, so the compositor can run it\n * without a style recalc and repaint on every frame. The layer is 3x the box width and its mask tile is 2x the box\n * width (the previous `mask-size: 200%`), so translating it by one tile reproduces the previous mask positions exactly.\n */\n@keyframes shimmer {\n from {\n transform: translateX(0);\n }\n\n to {\n transform: translateX(calc(200% / 3));\n }\n}\n\n/* stylelint-disable-next-line selector-class-pattern -- Shared utility, not a component class. */\n.skeleton {\n background-color: var(--skeletonLoader-bgColor);\n\n @media (prefers-reduced-motion: no-preference) {\n position: relative;\n overflow: hidden;\n /* The shimmer layer paints the background so the mask can move with it */\n background-color: transparent;\n isolation: isolate;\n\n &::before {\n position: absolute;\n top: 0;\n bottom: 0;\n left: -200%;\n z-index: -1;\n width: 300%;\n content: '';\n background-color: var(--skeletonLoader-bgColor);\n mask-image: linear-gradient(75deg, #000 30%, rgb(0, 0, 0, 0.65) 80%);\n mask-size: calc(200% / 3) 100%;\n animation: shimmer;\n animation-duration: var(--base-duration-1000);\n animation-iteration-count: infinite;\n }\n }\n\n @media (forced-colors: active) {\n outline: 1px solid transparent;\n outline-offset: -1px;\n }\n}\n"]}