@primer/react 37.32.0-rc.f648ca0d1 → 38.0.0-rc.0

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.
Files changed (50) hide show
  1. package/CHANGELOG.md +17 -1
  2. package/dist/browser.esm.js +2 -2
  3. package/dist/browser.esm.js.map +1 -1
  4. package/dist/browser.umd.js +2 -2
  5. package/dist/browser.umd.js.map +1 -1
  6. package/dist/components.css +4 -3
  7. package/generated/components.json +29 -25
  8. package/lib/Autocomplete/AutocompleteMenu.js +7 -7
  9. package/lib/CircleOcticon/CircleOcticon.d.ts +3 -0
  10. package/lib/CircleOcticon/CircleOcticon.d.ts.map +1 -1
  11. package/lib/CircleOcticon/CircleOcticon.js +3 -0
  12. package/lib/ConfirmationDialog/ConfirmationDialog.d.ts +8 -0
  13. package/lib/ConfirmationDialog/ConfirmationDialog.d.ts.map +1 -1
  14. package/lib/ConfirmationDialog/ConfirmationDialog.js +6 -2
  15. package/lib/ProgressBar/ProgressBar-a0957632.css +2 -0
  16. package/lib/ProgressBar/ProgressBar-a0957632.css.map +1 -0
  17. package/lib/ProgressBar/ProgressBar.d.ts.map +1 -1
  18. package/lib/ProgressBar/ProgressBar.js +53 -49
  19. package/lib/ProgressBar/ProgressBar.module.css.js +1 -1
  20. package/{lib-esm/Radio/Radio-b2a92b7d.css → lib/Radio/Radio-df9a5c02.css} +2 -2
  21. package/{lib-esm/Radio/Radio-b2a92b7d.css.map → lib/Radio/Radio-df9a5c02.css.map} +1 -1
  22. package/lib/Radio/Radio.module.css.js +1 -1
  23. package/lib/Select/Select.js +61 -53
  24. package/lib/SelectPanel/SelectPanel.js +2 -2
  25. package/lib/SubNav/SubNav.d.ts +8 -16
  26. package/lib/SubNav/SubNav.d.ts.map +1 -1
  27. package/lib/SubNav/SubNav.js +3 -6
  28. package/lib-esm/Autocomplete/AutocompleteMenu.js +1 -1
  29. package/lib-esm/CircleOcticon/CircleOcticon.d.ts +3 -0
  30. package/lib-esm/CircleOcticon/CircleOcticon.js +3 -0
  31. package/lib-esm/ConfirmationDialog/ConfirmationDialog.d.ts +8 -0
  32. package/lib-esm/ConfirmationDialog/ConfirmationDialog.js +6 -2
  33. package/lib-esm/ProgressBar/ProgressBar-a0957632.css +2 -0
  34. package/lib-esm/ProgressBar/ProgressBar-a0957632.css.map +1 -0
  35. package/lib-esm/ProgressBar/ProgressBar.js +53 -49
  36. package/lib-esm/ProgressBar/ProgressBar.module.css.js +1 -1
  37. package/{lib/Radio/Radio-b2a92b7d.css → lib-esm/Radio/Radio-df9a5c02.css} +2 -2
  38. package/{lib/Radio/Radio-b2a92b7d.css.map → lib-esm/Radio/Radio-df9a5c02.css.map} +1 -1
  39. package/lib-esm/Radio/Radio.module.css.js +1 -1
  40. package/lib-esm/Select/Select.js +61 -53
  41. package/lib-esm/SelectPanel/SelectPanel.js +1 -1
  42. package/lib-esm/SubNav/SubNav.d.ts +8 -16
  43. package/lib-esm/SubNav/SubNav.js +3 -6
  44. package/package.json +3 -2
  45. package/lib/ProgressBar/ProgressBar-430cdef7.css +0 -2
  46. package/lib/ProgressBar/ProgressBar-430cdef7.css.map +0 -1
  47. package/lib/node_modules/@github/mini-throttle/dist/index.js +0 -43
  48. package/lib-esm/ProgressBar/ProgressBar-430cdef7.css +0 -2
  49. package/lib-esm/ProgressBar/ProgressBar-430cdef7.css.map +0 -1
  50. package/lib-esm/node_modules/@github/mini-throttle/dist/index.js +0 -40
@@ -70,7 +70,7 @@ const ArrowIndicator = t0 => {
70
70
  };
71
71
  const Select = /*#__PURE__*/React__default.default.forwardRef((t0, ref) => {
72
72
  var _ref, _defaultValue;
73
- const $ = reactCompilerRuntime.c(39);
73
+ const $ = reactCompilerRuntime.c(41);
74
74
  let block;
75
75
  let children;
76
76
  let className;
@@ -125,93 +125,101 @@ const Select = /*#__PURE__*/React__default.default.forwardRef((t0, ref) => {
125
125
  sx = $[11];
126
126
  validationStatus = $[12];
127
127
  }
128
- const t1 = validationStatus === "error" ? "true" : "false";
129
- const t2 = disabled && Select_module.Disabled;
130
- let t3;
131
- if ($[13] !== className || $[14] !== t2) {
132
- t3 = clsx.clsx(className, Select_module.Select, t2);
128
+ let t1;
129
+ if ($[13] !== className) {
130
+ t1 = clsx.clsx(Select_module.TextInputWrapper, className);
133
131
  $[13] = className;
134
- $[14] = t2;
132
+ $[14] = t1;
133
+ } else {
134
+ t1 = $[14];
135
+ }
136
+ const t2 = validationStatus === "error" ? "true" : "false";
137
+ const t3 = disabled && Select_module.Disabled;
138
+ let t4;
139
+ if ($[15] !== t3) {
140
+ t4 = clsx.clsx(Select_module.Select, t3);
135
141
  $[15] = t3;
142
+ $[16] = t4;
136
143
  } else {
137
- t3 = $[15];
144
+ t4 = $[16];
138
145
  }
139
- const t4 = Boolean(placeholder);
140
- const t5 = (_ref = (_defaultValue = defaultValue) !== null && _defaultValue !== void 0 ? _defaultValue : placeholder) !== null && _ref !== void 0 ? _ref : undefined;
141
- let t6;
142
- if ($[16] !== placeholder || $[17] !== required) {
143
- t6 = placeholder && /*#__PURE__*/jsxRuntime.jsx("option", {
146
+ const t5 = Boolean(placeholder);
147
+ const t6 = (_ref = (_defaultValue = defaultValue) !== null && _defaultValue !== void 0 ? _defaultValue : placeholder) !== null && _ref !== void 0 ? _ref : undefined;
148
+ let t7;
149
+ if ($[17] !== placeholder || $[18] !== required) {
150
+ t7 = placeholder && /*#__PURE__*/jsxRuntime.jsx("option", {
144
151
  value: "",
145
152
  disabled: required,
146
153
  hidden: required,
147
154
  children: placeholder
148
155
  });
149
- $[16] = placeholder;
150
- $[17] = required;
151
- $[18] = t6;
156
+ $[17] = placeholder;
157
+ $[18] = required;
158
+ $[19] = t7;
152
159
  } else {
153
- t6 = $[18];
160
+ t7 = $[19];
154
161
  }
155
- let t7;
156
- if ($[19] !== children || $[20] !== disabled || $[21] !== ref || $[22] !== required || $[23] !== rest || $[24] !== t1 || $[25] !== t3 || $[26] !== t4 || $[27] !== t5 || $[28] !== t6) {
157
- t7 = /*#__PURE__*/jsxRuntime.jsxs("select", {
162
+ let t8;
163
+ if ($[20] !== children || $[21] !== disabled || $[22] !== ref || $[23] !== required || $[24] !== rest || $[25] !== t2 || $[26] !== t4 || $[27] !== t5 || $[28] !== t6 || $[29] !== t7) {
164
+ t8 = /*#__PURE__*/jsxRuntime.jsxs("select", {
158
165
  ...rest,
159
166
  ref: ref,
160
167
  required: required,
161
168
  disabled: disabled,
162
- "aria-invalid": t1,
163
- className: t3,
164
- "data-hasplaceholder": t4,
165
- defaultValue: t5,
166
- children: [t6, children]
169
+ "aria-invalid": t2,
170
+ className: t4,
171
+ "data-hasplaceholder": t5,
172
+ defaultValue: t6,
173
+ children: [t7, children]
167
174
  });
168
- $[19] = children;
169
- $[20] = disabled;
170
- $[21] = ref;
171
- $[22] = required;
172
- $[23] = rest;
173
- $[24] = t1;
174
- $[25] = t3;
175
+ $[20] = children;
176
+ $[21] = disabled;
177
+ $[22] = ref;
178
+ $[23] = required;
179
+ $[24] = rest;
180
+ $[25] = t2;
175
181
  $[26] = t4;
176
182
  $[27] = t5;
177
183
  $[28] = t6;
178
184
  $[29] = t7;
185
+ $[30] = t8;
179
186
  } else {
180
- t7 = $[29];
187
+ t8 = $[30];
181
188
  }
182
- let t8;
183
- if ($[30] === Symbol.for("react.memo_cache_sentinel")) {
184
- t8 = /*#__PURE__*/jsxRuntime.jsx(ArrowIndicator, {
189
+ let t9;
190
+ if ($[31] === Symbol.for("react.memo_cache_sentinel")) {
191
+ t9 = /*#__PURE__*/jsxRuntime.jsx(ArrowIndicator, {
185
192
  className: Select_module.ArrowIndicator
186
193
  });
187
- $[30] = t8;
194
+ $[31] = t9;
188
195
  } else {
189
- t8 = $[30];
196
+ t9 = $[31];
190
197
  }
191
- let t9;
192
- if ($[31] !== block || $[32] !== contrast || $[33] !== disabled || $[34] !== size || $[35] !== sx || $[36] !== t7 || $[37] !== validationStatus) {
193
- t9 = /*#__PURE__*/jsxRuntime.jsxs(TextInputWrapper.TextInputWrapper, {
198
+ let t10;
199
+ if ($[32] !== block || $[33] !== contrast || $[34] !== disabled || $[35] !== size || $[36] !== sx || $[37] !== t1 || $[38] !== t8 || $[39] !== validationStatus) {
200
+ t10 = /*#__PURE__*/jsxRuntime.jsxs(TextInputWrapper.TextInputWrapper, {
194
201
  block: block,
195
202
  contrast: contrast,
196
203
  disabled: disabled,
197
204
  size: size,
198
205
  validationStatus: validationStatus,
199
- className: Select_module.TextInputWrapper,
206
+ className: t1,
200
207
  sx: sx,
201
- children: [t7, t8]
208
+ children: [t8, t9]
202
209
  });
203
- $[31] = block;
204
- $[32] = contrast;
205
- $[33] = disabled;
206
- $[34] = size;
207
- $[35] = sx;
208
- $[36] = t7;
209
- $[37] = validationStatus;
210
- $[38] = t9;
210
+ $[32] = block;
211
+ $[33] = contrast;
212
+ $[34] = disabled;
213
+ $[35] = size;
214
+ $[36] = sx;
215
+ $[37] = t1;
216
+ $[38] = t8;
217
+ $[39] = validationStatus;
218
+ $[40] = t10;
211
219
  } else {
212
- t9 = $[38];
220
+ t10 = $[40];
213
221
  }
214
- return t9;
222
+ return t10;
215
223
  });
216
224
  const Option = props => {
217
225
  const $ = reactCompilerRuntime.c(2);
@@ -13,7 +13,7 @@ var FilteredActionListLoaders = require('../FilteredActionList/FilteredActionLis
13
13
  var liveRegionElement = require('@primer/live-region-element');
14
14
  var SelectPanel_module = require('./SelectPanel.module.css.js');
15
15
  var clsx = require('clsx');
16
- var index = require('../node_modules/@github/mini-throttle/dist/index.js');
16
+ var miniThrottle = require('@github/mini-throttle');
17
17
  var useResponsiveValue = require('../hooks/useResponsiveValue.js');
18
18
  var jsxRuntime = require('react/jsx-runtime');
19
19
  var useFeatureFlag = require('../FeatureFlags/useFeatureFlag.js');
@@ -318,7 +318,7 @@ function Panel({
318
318
  }
319
319
  initialHeightRef.current = window.visualViewport.height;
320
320
  initialScaleRef.current = window.visualViewport.scale;
321
- const handleViewportChange = index.debounce(() => {
321
+ const handleViewportChange = miniThrottle.debounce(() => {
322
322
  if (window.visualViewport) {
323
323
  const currentScale = window.visualViewport.scale;
324
324
  const isZooming = currentScale !== initialScaleRef.current;
@@ -1,27 +1,19 @@
1
1
  import type { To } from 'history';
2
2
  import React from 'react';
3
- import type { ComponentProps } from '../utils/types';
4
- import type { SxProp } from '../sx';
5
- type StyledSubNavProps = React.ComponentProps<'nav'> & {
3
+ export type SubNavProps = React.ComponentProps<'nav'> & {
6
4
  actions?: React.ReactNode;
7
5
  align?: 'right';
8
6
  full?: boolean;
9
7
  label?: string;
10
- } & SxProp;
11
- type StyledSubNavLinksProps = React.ComponentProps<'div'> & SxProp;
12
- type StyledSubNavLinkProps = React.ComponentProps<'a'> & {
8
+ };
9
+ export type SubNavLinksProps = React.ComponentProps<'div'>;
10
+ export type SubNavLinkProps = React.ComponentProps<'a'> & {
13
11
  to?: To;
14
12
  selected?: boolean;
15
- } & SxProp;
16
- declare const SubNav: React.ForwardRefExoticComponent<Omit<StyledSubNavProps, "ref"> & React.RefAttributes<HTMLElement>>;
17
- declare const SubNavLinks: React.ForwardRefExoticComponent<Omit<StyledSubNavLinksProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
18
- declare const SubNavLink: React.ForwardRefExoticComponent<Omit<StyledSubNavLinkProps, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
19
- export type SubNavProps = ComponentProps<typeof SubNav>;
20
- export type SubNavLinksProps = ComponentProps<typeof SubNavLinks>;
21
- export type SubNavLinkProps = ComponentProps<typeof SubNavLink>;
22
- declare const _default: React.ForwardRefExoticComponent<Omit<StyledSubNavProps, "ref"> & React.RefAttributes<HTMLElement>> & {
23
- Link: React.ForwardRefExoticComponent<Omit<StyledSubNavLinkProps, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
24
- Links: React.ForwardRefExoticComponent<Omit<StyledSubNavLinksProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
13
+ };
14
+ declare const _default: React.ForwardRefExoticComponent<Omit<SubNavProps, "ref"> & React.RefAttributes<HTMLElement>> & {
15
+ Link: React.ForwardRefExoticComponent<Omit<SubNavLinkProps, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
16
+ Links: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
25
17
  };
26
18
  export default _default;
27
19
  //# sourceMappingURL=SubNav.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SubNav.d.ts","sourceRoot":"","sources":["../../src/SubNav/SubNav.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,EAAE,EAAC,MAAM,SAAS,CAAA;AAC/B,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,gBAAgB,CAAA;AAGlD,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,OAAO,CAAA;AAGjC,KAAK,iBAAiB,GAAG,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IACrD,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,GAAG,MAAM,CAAA;AACV,KAAK,sBAAsB,GAAG,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG,MAAM,CAAA;AAClE,KAAK,qBAAqB,GAAG,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,GAAG;IAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAC,GAAG,MAAM,CAAA;AAE/F,QAAA,MAAM,MAAM,oGAgBV,CAAA;AAKF,QAAA,MAAM,WAAW,4GAQhB,CAAA;AAKD,QAAA,MAAM,UAAU,8GAef,CAAA;AAID,MAAM,MAAM,WAAW,GAAG,cAAc,CAAC,OAAO,MAAM,CAAC,CAAA;AACvD,MAAM,MAAM,gBAAgB,GAAG,cAAc,CAAC,OAAO,WAAW,CAAC,CAAA;AACjE,MAAM,MAAM,eAAe,GAAG,cAAc,CAAC,OAAO,UAAU,CAAC,CAAA;;;;;AAC/D,wBAA4E"}
1
+ {"version":3,"file":"SubNav.d.ts","sourceRoot":"","sources":["../../src/SubNav/SubNav.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,EAAE,EAAC,MAAM,SAAS,CAAA;AAC/B,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,MAAM,MAAM,WAAW,GAAG,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IACtD,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA;AACD,MAAM,MAAM,gBAAgB,GAAG,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,CAAA;AAC1D,MAAM,MAAM,eAAe,GAAG,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,GAAG;IAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAC,CAAA;;;;;AA8CvF,wBAA4E"}
@@ -4,7 +4,6 @@ var reactCompilerRuntime = require('react-compiler-runtime');
4
4
  var clsx = require('clsx');
5
5
  var React = require('react');
6
6
  var SubNav_module = require('./SubNav.module.css.js');
7
- var BoxWithFallback = require('../internal/components/BoxWithFallback.js');
8
7
  var jsxRuntime = require('react/jsx-runtime');
9
8
 
10
9
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
@@ -78,8 +77,7 @@ const SubNav = /*#__PURE__*/React__default.default.forwardRef(function SubNav(t0
78
77
  }
79
78
  let t5;
80
79
  if ($[13] !== forwardRef || $[14] !== label || $[15] !== rest || $[16] !== t1 || $[17] !== t3 || $[18] !== t4) {
81
- t5 = /*#__PURE__*/jsxRuntime.jsxs(BoxWithFallback.BoxWithFallback, {
82
- as: "nav",
80
+ t5 = /*#__PURE__*/jsxRuntime.jsxs("nav", {
83
81
  ref: forwardRef,
84
82
  className: t1,
85
83
  "aria-label": label,
@@ -132,7 +130,7 @@ const SubNavLinks = /*#__PURE__*/React__default.default.forwardRef((t0, forwardR
132
130
  }
133
131
  let t2;
134
132
  if ($[6] !== children || $[7] !== forwardRef || $[8] !== rest || $[9] !== t1) {
135
- t2 = /*#__PURE__*/jsxRuntime.jsx(BoxWithFallback.BoxWithFallback, {
133
+ t2 = /*#__PURE__*/jsxRuntime.jsx("div", {
136
134
  ref: forwardRef,
137
135
  className: t1,
138
136
  ...rest,
@@ -182,8 +180,7 @@ const SubNavLink = /*#__PURE__*/React__default.default.forwardRef((t0, forwardRe
182
180
  }
183
181
  let t2;
184
182
  if ($[6] !== children || $[7] !== forwardRef || $[8] !== rest || $[9] !== t1) {
185
- t2 = /*#__PURE__*/jsxRuntime.jsx(BoxWithFallback.BoxWithFallback, {
186
- as: "a",
183
+ t2 = /*#__PURE__*/jsxRuntime.jsx("a", {
187
184
  ref: forwardRef,
188
185
  className: t1,
189
186
  "data-selected": rest.selected,
@@ -1,5 +1,5 @@
1
1
  import React, { useContext, useRef, useState, useMemo, useEffect } from 'react';
2
- import { debounce } from '../node_modules/@github/mini-throttle/dist/index.js';
2
+ import { debounce } from '@github/mini-throttle';
3
3
  import { announce } from '@primer/live-region-element';
4
4
  import { scrollIntoView } from '@primer/behaviors';
5
5
  import { ActionList } from '../ActionList/index.js';
@@ -8,6 +8,9 @@ export type CircleOcticonProps = {
8
8
  size?: IconProps['size'];
9
9
  }>>;
10
10
  } & BoxProps;
11
+ /**
12
+ * @deprecated This component is deprecated. Replace component with specific icon imports from `@primer/octicons-react` and customized styling.)
13
+ */
11
14
  declare function CircleOcticon(props: CircleOcticonProps): React.JSX.Element;
12
15
  export default CircleOcticon;
13
16
  //# sourceMappingURL=CircleOcticon.d.ts.map
@@ -2,6 +2,9 @@ import { c } from 'react-compiler-runtime';
2
2
  import { jsx } from 'react/jsx-runtime';
3
3
  import Box from '../Box/Box.js';
4
4
 
5
+ /**
6
+ * @deprecated This component is deprecated. Replace component with specific icon imports from `@primer/octicons-react` and customized styling.)
7
+ */
5
8
  function CircleOcticon(props) {
6
9
  const $ = c(21);
7
10
  let IconComponent;
@@ -26,6 +26,14 @@ export interface ConfirmationDialogProps {
26
26
  * The type of button to use for the confirm button. Default: Button.
27
27
  */
28
28
  confirmButtonType?: 'normal' | 'primary' | 'danger';
29
+ /**
30
+ * Whether the cancel button is in a loading state. Default: false.
31
+ */
32
+ cancelButtonLoading?: boolean;
33
+ /**
34
+ * Whether the confirm button is in a loading state. Default: false.
35
+ */
36
+ confirmButtonLoading?: boolean;
29
37
  /**
30
38
  * Additional class names to apply to the dialog
31
39
  */
@@ -69,6 +69,8 @@ const ConfirmationDialog = props => {
69
69
  cancelButtonContent = 'Cancel',
70
70
  confirmButtonContent = 'OK',
71
71
  confirmButtonType = 'normal',
72
+ cancelButtonLoading = false,
73
+ confirmButtonLoading = false,
72
74
  children,
73
75
  className,
74
76
  width = 'medium',
@@ -84,13 +86,15 @@ const ConfirmationDialog = props => {
84
86
  const cancelButton = {
85
87
  content: cancelButtonContent,
86
88
  onClick: onCancelButtonClick,
87
- autoFocus: isConfirmationDangerous
89
+ autoFocus: isConfirmationDangerous,
90
+ loading: cancelButtonLoading
88
91
  };
89
92
  const confirmButton = {
90
93
  content: confirmButtonContent,
91
94
  buttonType: confirmButtonType,
92
95
  onClick: onConfirmButtonClick,
93
- autoFocus: !isConfirmationDangerous
96
+ autoFocus: !isConfirmationDangerous,
97
+ loading: confirmButtonLoading
94
98
  };
95
99
  const footerButtons = [cancelButton, confirmButton];
96
100
  return /*#__PURE__*/jsx(Dialog, {
@@ -0,0 +1,2 @@
1
+ @keyframes prc-ProgressBar-shimmer-i1RxN{0%{mask-position:200%}to{mask-position:0}}.prc-ProgressBar-ProgressBarItem-stL6O{background-color:var(--progress-bg);width:var(--progress-width)}@media (prefers-reduced-motion:no-preference){.prc-ProgressBar-ProgressBarItem-stL6O[data-animated=true]{animation-duration:1s;animation-iteration-count:infinite;animation-name:prc-ProgressBar-shimmer-i1RxN;mask-image:linear-gradient(75deg,#000 30%,rgba(0,0,0,.65) 80%);mask-size:200%}}.prc-ProgressBar-ProgressBarContainer-E-z8S{background-color:var(--progressBar-track-bgColor);border-radius:var(--borderRadius-small,.1875rem);display:flex;gap:2px;outline:solid 1px var(--progressBar-track-borderColor);outline-offset:-1px;overflow:hidden}.prc-ProgressBar-ProgressBarContainer-E-z8S:where([data-progress-display=inline]){display:inline-flex}.prc-ProgressBar-ProgressBarContainer-E-z8S:where([data-progress-bar-size=default]){height:8px}.prc-ProgressBar-ProgressBarContainer-E-z8S:where([data-progress-bar-size=small]){height:5px}.prc-ProgressBar-ProgressBarContainer-E-z8S:where([data-progress-bar-size=large]){height:10px}
2
+ /*# sourceMappingURL=ProgressBar-a0957632.css.map */
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/ProgressBar/ProgressBar.module.css"],"names":[],"mappings":"AAAA,yCACE,GACE,kBACF,CAEA,GACE,eACF,CACF,CAEA,uCAGE,mCAAoC,CAFpC,2BAaF,CATE,8CACE,2DAIE,qBAAsB,CACtB,kCAAmC,CAFnC,4CAAuB,CAFvB,8DAAqE,CACrE,cAIF,CACF,CAGF,4CAIE,iDAAkD,CAClD,gDAAwC,CAJxC,YAAa,CAKb,OAAQ,CACR,sDAAuD,CACvD,mBAAoB,CANpB,eAuBF,CAfE,kFACE,mBACF,CAEA,oFACE,UACF,CAEA,kFACE,UACF,CAEA,kFACE,WACF","file":"ProgressBar-a0957632.css","sourcesContent":["@keyframes shimmer {\n from {\n mask-position: 200%;\n }\n\n to {\n mask-position: 0%;\n }\n}\n\n.ProgressBarItem {\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%, rgba(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 /* stylelint-disable-next-line primer/colors */\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"]}
@@ -6,10 +6,11 @@ import { BoxWithFallback } from '../internal/components/BoxWithFallback.js';
6
6
  import { jsx } from 'react/jsx-runtime';
7
7
 
8
8
  const Item = /*#__PURE__*/forwardRef((t0, forwardRef) => {
9
- const $ = c(32);
9
+ const $ = c(33);
10
10
  let ariaLabel;
11
11
  let ariaValueNow;
12
12
  let ariaValueText;
13
+ let bg;
13
14
  let className;
14
15
  let progress;
15
16
  let rest;
@@ -22,93 +23,96 @@ const Item = /*#__PURE__*/forwardRef((t0, forwardRef) => {
22
23
  "aria-valuetext": ariaValueText,
23
24
  className,
24
25
  style,
26
+ bg,
25
27
  ...rest
26
28
  } = t0);
27
29
  $[0] = t0;
28
30
  $[1] = ariaLabel;
29
31
  $[2] = ariaValueNow;
30
32
  $[3] = ariaValueText;
31
- $[4] = className;
32
- $[5] = progress;
33
- $[6] = rest;
34
- $[7] = style;
33
+ $[4] = bg;
34
+ $[5] = className;
35
+ $[6] = progress;
36
+ $[7] = rest;
37
+ $[8] = style;
35
38
  } else {
36
39
  ariaLabel = $[1];
37
40
  ariaValueNow = $[2];
38
41
  ariaValueText = $[3];
39
- className = $[4];
40
- progress = $[5];
41
- rest = $[6];
42
- style = $[7];
42
+ bg = $[4];
43
+ className = $[5];
44
+ progress = $[6];
45
+ rest = $[7];
46
+ style = $[8];
43
47
  }
44
48
  const progressAsNumber = typeof progress === "string" ? parseInt(progress, 10) : progress;
45
49
  let t1;
46
- if ($[8] !== ariaValueNow || $[9] !== progressAsNumber) {
50
+ if ($[9] !== ariaValueNow || $[10] !== progressAsNumber) {
47
51
  var _ariaValueNow;
48
52
  t1 = (_ariaValueNow = ariaValueNow) !== null && _ariaValueNow !== void 0 ? _ariaValueNow : progressAsNumber !== undefined && progressAsNumber >= 0 ? Math.round(progressAsNumber) : 0;
49
- $[8] = ariaValueNow;
50
- $[9] = progressAsNumber;
51
- $[10] = t1;
53
+ $[9] = ariaValueNow;
54
+ $[10] = progressAsNumber;
55
+ $[11] = t1;
52
56
  } else {
53
- t1 = $[10];
57
+ t1 = $[11];
54
58
  }
55
59
  let t2;
56
- if ($[11] !== ariaValueText || $[12] !== t1) {
60
+ if ($[12] !== ariaValueText || $[13] !== t1) {
57
61
  t2 = {
58
62
  "aria-valuenow": t1,
59
63
  "aria-valuemin": 0,
60
64
  "aria-valuemax": 100,
61
65
  "aria-valuetext": ariaValueText
62
66
  };
63
- $[11] = ariaValueText;
64
- $[12] = t1;
65
- $[13] = t2;
67
+ $[12] = ariaValueText;
68
+ $[13] = t1;
69
+ $[14] = t2;
66
70
  } else {
67
- t2 = $[13];
71
+ t2 = $[14];
68
72
  }
69
73
  const ariaAttributes = t2;
70
74
  let styles;
71
- if ($[14] !== progress || $[15] !== rest.bg) {
75
+ if ($[15] !== bg || $[16] !== progress) {
72
76
  styles = {};
73
77
  let t3;
74
- if ($[17] !== rest.bg) {
75
- t3 = rest.bg && rest.bg.split(".");
76
- $[17] = rest.bg;
77
- $[18] = t3;
78
+ if ($[18] !== bg) {
79
+ t3 = bg && bg.split(".");
80
+ $[18] = bg;
81
+ $[19] = t3;
78
82
  } else {
79
- t3 = $[18];
83
+ t3 = $[19];
80
84
  }
81
85
  const bgType = t3;
82
86
  styles["--progress-width"] = progress ? `${progress}%` : "0%";
83
- styles["--progress-bg"] = bgType && `var(--bgColor-${bgType[0]}-${bgType[1]})` || "var(--bgColor-success-emphasis)";
84
- $[14] = progress;
85
- $[15] = rest.bg;
86
- $[16] = styles;
87
+ styles["--progress-bg"] = bgType && `var(--bgColor-${bgType[0]}-${bgType[1] || "emphasis"})` || "var(--bgColor-success-emphasis)";
88
+ $[15] = bg;
89
+ $[16] = progress;
90
+ $[17] = styles;
87
91
  } else {
88
- styles = $[16];
92
+ styles = $[17];
89
93
  }
90
94
  let t3;
91
- if ($[19] !== className) {
95
+ if ($[20] !== className) {
92
96
  t3 = clsx(className, classes.ProgressBarItem);
93
- $[19] = className;
94
- $[20] = t3;
97
+ $[20] = className;
98
+ $[21] = t3;
95
99
  } else {
96
- t3 = $[20];
100
+ t3 = $[21];
97
101
  }
98
102
  let t4;
99
- if ($[21] !== style || $[22] !== styles) {
103
+ if ($[22] !== style || $[23] !== styles) {
100
104
  t4 = {
101
105
  ...styles,
102
106
  ...style
103
107
  };
104
- $[21] = style;
105
- $[22] = styles;
106
- $[23] = t4;
108
+ $[22] = style;
109
+ $[23] = styles;
110
+ $[24] = t4;
107
111
  } else {
108
- t4 = $[23];
112
+ t4 = $[24];
109
113
  }
110
114
  let t5;
111
- if ($[24] !== ariaAttributes || $[25] !== ariaLabel || $[26] !== forwardRef || $[27] !== progress || $[28] !== rest || $[29] !== t3 || $[30] !== t4) {
115
+ if ($[25] !== ariaAttributes || $[26] !== ariaLabel || $[27] !== forwardRef || $[28] !== progress || $[29] !== rest || $[30] !== t3 || $[31] !== t4) {
112
116
  t5 = /*#__PURE__*/jsx(BoxWithFallback, {
113
117
  as: "span",
114
118
  className: t3,
@@ -120,16 +124,16 @@ const Item = /*#__PURE__*/forwardRef((t0, forwardRef) => {
120
124
  style: t4,
121
125
  ...ariaAttributes
122
126
  });
123
- $[24] = ariaAttributes;
124
- $[25] = ariaLabel;
125
- $[26] = forwardRef;
126
- $[27] = progress;
127
- $[28] = rest;
128
- $[29] = t3;
129
- $[30] = t4;
130
- $[31] = t5;
127
+ $[25] = ariaAttributes;
128
+ $[26] = ariaLabel;
129
+ $[27] = forwardRef;
130
+ $[28] = progress;
131
+ $[29] = rest;
132
+ $[30] = t3;
133
+ $[31] = t4;
134
+ $[32] = t5;
131
135
  } else {
132
- t5 = $[31];
136
+ t5 = $[32];
133
137
  }
134
138
  return t5;
135
139
  });
@@ -1,4 +1,4 @@
1
- import './ProgressBar-430cdef7.css';
1
+ import './ProgressBar-a0957632.css';
2
2
 
3
3
  var classes = {"ProgressBarItem":"prc-ProgressBar-ProgressBarItem-stL6O","ProgressBarContainer":"prc-ProgressBar-ProgressBarContainer-E-z8S"};
4
4
 
@@ -1,2 +1,2 @@
1
- .prc-Radio-Radio-Ly4MR{border-radius:var(--borderRadius-full,100vh);transition:background-color,border-color 80ms cubic-bezier(.33,1,.68,1)}.prc-Radio-Radio-Ly4MR:where(:checked){background-color:var(--control-checked-fgColor-rest,var(--color-switch-track-checked-fg));border-color:var(--control-checked-bgColor-rest,var(--color-switch-track-checked-bg));border-width:var(--borderWidth-thicker,.25rem)}.prc-Radio-Radio-Ly4MR:where(:checked):disabled{background-color:var(--fgColor-muted,var(--color-fg-muted));border-color:var(--fgColor-muted,var(--color-fg-muted));cursor:not-allowed}.prc-Radio-Radio-Ly4MR:focus,.prc-Radio-Radio-Ly4MR:focus-within{box-shadow:none;outline:2px solid var(--focus-outlineColor,var(--color-accent-fg));outline-offset:2px}@media (forced-colors:active){.prc-Radio-Radio-Ly4MR{background-color:canvastext;border-color:canvastext}}
2
- /*# sourceMappingURL=Radio-b2a92b7d.css.map */
1
+ .prc-Radio-Radio-Ly4MR{border-radius:var(--borderRadius-full,100vh);transition:background-color,border-color 80ms cubic-bezier(.33,1,.68,1)}.prc-Radio-Radio-Ly4MR:where(:checked){background-color:var(--control-checked-fgColor-rest,var(--color-switch-track-checked-fg));border-color:var(--control-checked-bgColor-rest,var(--color-switch-track-checked-bg));border-width:var(--borderWidth-thicker,.25rem)}.prc-Radio-Radio-Ly4MR:where(:checked):disabled{background-color:var(--fgColor-muted,var(--color-fg-muted));border-color:var(--fgColor-muted,var(--color-fg-muted));cursor:not-allowed}.prc-Radio-Radio-Ly4MR:focus-visible{box-shadow:none;outline:2px solid var(--focus-outlineColor,var(--color-accent-fg));outline-offset:2px}@media (forced-colors:active){.prc-Radio-Radio-Ly4MR{background-color:canvastext;border-color:canvastext}}
2
+ /*# sourceMappingURL=Radio-df9a5c02.css.map */
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/Radio/Radio.module.css","../../postcss-preset-primer/src/mixins/focusOutline.css"],"names":[],"mappings":"AAAA,uBACE,4CAA8C,CAC9C,uEA+BF,CA3BE,uCAEE,yFAAqD,CAIrD,qFAAiD,CACjD,8CASF,CAPE,gDAGE,2DAAsC,CAEtC,uDAAkC,CAJlC,kBAKF,CAGF,iECrBA,eAAgB,CAFhB,kEAAgC,CAChC,kBDyBA,CAEA,8BA7BF,uBA8BI,2BAA4B,CAC5B,uBAEJ,CADE","file":"Radio-b2a92b7d.css","sourcesContent":[".Radio {\n border-radius: var(--borderRadius-full, 100vh);\n transition:\n background-color,\n border-color 80ms cubic-bezier(0.33, 1, 0.68, 1); /* checked -> unchecked - add 120ms delay to fully see animation-out */\n\n &:where(:checked) {\n /* stylelint-disable-next-line primer/colors */\n background-color: var(--control-checked-fgColor-rest);\n\n /* using bgColor here to avoid a border change in dark high contrast */\n /* stylelint-disable-next-line primer/colors */\n border-color: var(--control-checked-bgColor-rest);\n border-width: var(--borderWidth-thicker);\n\n &:disabled {\n cursor: not-allowed;\n /* stylelint-disable-next-line primer/colors */\n background-color: var(--fgColor-muted);\n /* stylelint-disable-next-line primer/colors */\n border-color: var(--fgColor-muted);\n }\n }\n\n &:focus,\n &:focus-within {\n @mixin focusOutline 2px;\n }\n\n @media (forced-colors: active) {\n background-color: canvastext;\n border-color: canvastext;\n }\n}\n","@define-mixin focusOutline $outlineOffset: -2px, $outlineColor: var(--focus-outlineColor) {\n outline: 2px solid $outlineColor;\n outline-offset: $outlineOffset;\n box-shadow: none;\n}\n"]}
1
+ {"version":3,"sources":["../src/Radio/Radio.module.css","../../postcss-preset-primer/src/mixins/focusOutline.css"],"names":[],"mappings":"AAAA,uBACE,4CAA8C,CAC9C,uEA8BF,CA1BE,uCAEE,yFAAqD,CAIrD,qFAAiD,CACjD,8CASF,CAPE,gDAGE,2DAAsC,CAEtC,uDAAkC,CAJlC,kBAKF,CAGF,qCCrBA,eAAgB,CAFhB,kEAAgC,CAChC,kBDwBA,CAEA,8BA5BF,uBA6BI,2BAA4B,CAC5B,uBAEJ,CADE","file":"Radio-df9a5c02.css","sourcesContent":[".Radio {\n border-radius: var(--borderRadius-full, 100vh);\n transition:\n background-color,\n border-color 80ms cubic-bezier(0.33, 1, 0.68, 1); /* checked -> unchecked - add 120ms delay to fully see animation-out */\n\n &:where(:checked) {\n /* stylelint-disable-next-line primer/colors */\n background-color: var(--control-checked-fgColor-rest);\n\n /* using bgColor here to avoid a border change in dark high contrast */\n /* stylelint-disable-next-line primer/colors */\n border-color: var(--control-checked-bgColor-rest);\n border-width: var(--borderWidth-thicker);\n\n &:disabled {\n cursor: not-allowed;\n /* stylelint-disable-next-line primer/colors */\n background-color: var(--fgColor-muted);\n /* stylelint-disable-next-line primer/colors */\n border-color: var(--fgColor-muted);\n }\n }\n\n &:focus-visible {\n @mixin focusOutline 2px;\n }\n\n @media (forced-colors: active) {\n background-color: canvastext;\n border-color: canvastext;\n }\n}\n","@define-mixin focusOutline $outlineOffset: -2px, $outlineColor: var(--focus-outlineColor) {\n outline: 2px solid $outlineColor;\n outline-offset: $outlineOffset;\n box-shadow: none;\n}\n"]}
@@ -1,4 +1,4 @@
1
- import './Radio-b2a92b7d.css';
1
+ import './Radio-df9a5c02.css';
2
2
 
3
3
  var classes = {"Radio":"prc-Radio-Radio-Ly4MR"};
4
4