@primer/react 0.0.0-20260508164446 → 0.0.0-20260508174823
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 +16 -4
- package/dist/ActionBar/ActionBar-a41224b2.css +2 -0
- package/dist/ActionBar/ActionBar-a41224b2.css.map +1 -0
- package/dist/ActionBar/ActionBar.d.ts +1 -1
- package/dist/ActionBar/ActionBar.d.ts.map +1 -1
- package/dist/ActionBar/ActionBar.js +381 -293
- package/dist/ActionBar/ActionBar.module.css.js +2 -2
- package/dist/ActionBar/index.d.ts +1 -1
- package/dist/ActionList/LinkItem.d.ts +1 -1
- package/dist/ActionList/index.d.ts +2 -2
- package/dist/AnchoredOverlay/{AnchoredOverlay-0c26c5f8.css → AnchoredOverlay-ec9e15fc.css} +2 -2
- package/dist/AnchoredOverlay/AnchoredOverlay-ec9e15fc.css.map +1 -0
- package/dist/AnchoredOverlay/AnchoredOverlay.d.ts.map +1 -1
- package/dist/AnchoredOverlay/AnchoredOverlay.js +63 -26
- package/dist/AnchoredOverlay/AnchoredOverlay.module.css.js +1 -1
- package/dist/Autocomplete/Autocomplete.d.ts +1 -1
- package/dist/Blankslate/Blankslate.d.ts.map +1 -1
- package/dist/Blankslate/Blankslate.js +6 -0
- package/dist/BranchName/BranchName.js +1 -0
- package/dist/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
- package/dist/Breadcrumbs/Breadcrumbs.js +3 -0
- package/dist/ButtonGroup/ButtonGroup.d.ts.map +1 -1
- package/dist/ButtonGroup/ButtonGroup.js +1 -0
- package/dist/Checkbox/Checkbox.d.ts +1 -0
- package/dist/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/Checkbox/Checkbox.js +10 -5
- package/dist/CheckboxGroup/CheckboxGroup.js +1 -0
- package/dist/CircleBadge/CircleBadge.d.ts.map +1 -1
- package/dist/CircleBadge/CircleBadge.js +44 -28
- package/dist/ConfirmationDialog/ConfirmationDialog.d.ts.map +1 -1
- package/dist/ConfirmationDialog/ConfirmationDialog.js +1 -0
- package/dist/CounterLabel/CounterLabel.d.ts +2 -0
- package/dist/CounterLabel/CounterLabel.d.ts.map +1 -1
- package/dist/CounterLabel/CounterLabel.js +25 -90
- package/dist/DataTable/sorting.d.ts +1 -1
- package/dist/Dialog/Dialog.d.ts +1 -0
- package/dist/Dialog/Dialog.d.ts.map +1 -1
- package/dist/Dialog/Dialog.js +26 -14
- package/dist/FeatureFlags/DefaultFeatureFlags.d.ts.map +1 -1
- package/dist/FeatureFlags/DefaultFeatureFlags.js +2 -1
- package/dist/TextInput/TextInput.d.ts +1 -1
- package/dist/TextInputWithTokens/TextInputWithTokens.d.ts +3 -3
- package/dist/experimental/SelectPanel2/mock-story-data.d.ts +3 -3
- package/dist/hooks/useSyncedState.d.ts +1 -1
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroup.d.ts +1 -1
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroup.d.ts.map +1 -1
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroup.js +3 -1
- package/dist/internal/components/TextInputInnerAction.d.ts +1 -1
- package/dist/theme.d.ts +1 -1
- package/dist/utils/useIsomorphicLayoutEffect.d.ts +2 -2
- package/dist/utils/useIsomorphicLayoutEffect.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/ActionBar/ActionBar-e2c44be2.css +0 -2
- package/dist/ActionBar/ActionBar-e2c44be2.css.map +0 -1
- package/dist/AnchoredOverlay/AnchoredOverlay-0c26c5f8.css.map +0 -1
|
@@ -1,100 +1,35 @@
|
|
|
1
|
-
import { c } from 'react-compiler-runtime';
|
|
2
1
|
import { clsx } from 'clsx';
|
|
3
2
|
import { forwardRef } from 'react';
|
|
4
3
|
import classes from './CounterLabel.module.css.js';
|
|
5
|
-
import {
|
|
4
|
+
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
6
5
|
import { VisuallyHidden } from '../VisuallyHidden/VisuallyHidden.js';
|
|
7
6
|
|
|
8
|
-
const CounterLabel = /*#__PURE__*/forwardRef((
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
$[5] = variant;
|
|
29
|
-
} else {
|
|
30
|
-
children = $[1];
|
|
31
|
-
className = $[2];
|
|
32
|
-
rest = $[3];
|
|
33
|
-
scheme = $[4];
|
|
34
|
-
variant = $[5];
|
|
35
|
-
}
|
|
36
|
-
let t1;
|
|
37
|
-
if ($[6] !== children) {
|
|
38
|
-
t1 = /*#__PURE__*/jsxs(VisuallyHidden, {
|
|
39
|
-
children: ["\xA0(", children, ")"]
|
|
40
|
-
});
|
|
41
|
-
$[6] = children;
|
|
42
|
-
$[7] = t1;
|
|
43
|
-
} else {
|
|
44
|
-
t1 = $[7];
|
|
45
|
-
}
|
|
46
|
-
const label = t1;
|
|
47
|
-
const inferredVariant = variant || scheme || "secondary";
|
|
48
|
-
let t2;
|
|
49
|
-
if ($[8] !== forwardedRef || $[9] !== inferredVariant || $[10] !== rest) {
|
|
50
|
-
t2 = {
|
|
51
|
-
ref: forwardedRef,
|
|
52
|
-
"aria-hidden": "true",
|
|
53
|
-
"data-variant": inferredVariant,
|
|
54
|
-
...rest
|
|
55
|
-
};
|
|
56
|
-
$[8] = forwardedRef;
|
|
57
|
-
$[9] = inferredVariant;
|
|
58
|
-
$[10] = rest;
|
|
59
|
-
$[11] = t2;
|
|
60
|
-
} else {
|
|
61
|
-
t2 = $[11];
|
|
62
|
-
}
|
|
63
|
-
const counterProps = t2;
|
|
64
|
-
let t3;
|
|
65
|
-
if ($[12] !== className) {
|
|
66
|
-
t3 = clsx(className, classes.CounterLabel);
|
|
67
|
-
$[12] = className;
|
|
68
|
-
$[13] = t3;
|
|
69
|
-
} else {
|
|
70
|
-
t3 = $[13];
|
|
71
|
-
}
|
|
72
|
-
let t4;
|
|
73
|
-
if ($[14] !== children || $[15] !== counterProps || $[16] !== t3) {
|
|
74
|
-
t4 = /*#__PURE__*/jsx("span", {
|
|
7
|
+
const CounterLabel = /*#__PURE__*/forwardRef(({
|
|
8
|
+
variant,
|
|
9
|
+
scheme,
|
|
10
|
+
className,
|
|
11
|
+
children,
|
|
12
|
+
['data-component']: dataComponent,
|
|
13
|
+
...rest
|
|
14
|
+
}, forwardedRef) => {
|
|
15
|
+
const label = /*#__PURE__*/jsxs(VisuallyHidden, {
|
|
16
|
+
children: ["\xA0(", children, ")"]
|
|
17
|
+
});
|
|
18
|
+
const inferredVariant = variant || scheme || 'secondary';
|
|
19
|
+
const counterProps = {
|
|
20
|
+
ref: forwardedRef,
|
|
21
|
+
['aria-hidden']: 'true',
|
|
22
|
+
['data-variant']: inferredVariant,
|
|
23
|
+
...rest
|
|
24
|
+
};
|
|
25
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
26
|
+
children: [/*#__PURE__*/jsx("span", {
|
|
75
27
|
...counterProps,
|
|
76
|
-
|
|
28
|
+
"data-component": dataComponent !== null && dataComponent !== void 0 ? dataComponent : 'CounterLabel',
|
|
29
|
+
className: clsx(className, classes.CounterLabel),
|
|
77
30
|
children: children
|
|
78
|
-
})
|
|
79
|
-
|
|
80
|
-
$[15] = counterProps;
|
|
81
|
-
$[16] = t3;
|
|
82
|
-
$[17] = t4;
|
|
83
|
-
} else {
|
|
84
|
-
t4 = $[17];
|
|
85
|
-
}
|
|
86
|
-
let t5;
|
|
87
|
-
if ($[18] !== label || $[19] !== t4) {
|
|
88
|
-
t5 = /*#__PURE__*/jsxs(Fragment, {
|
|
89
|
-
children: [t4, label]
|
|
90
|
-
});
|
|
91
|
-
$[18] = label;
|
|
92
|
-
$[19] = t4;
|
|
93
|
-
$[20] = t5;
|
|
94
|
-
} else {
|
|
95
|
-
t5 = $[20];
|
|
96
|
-
}
|
|
97
|
-
return t5;
|
|
31
|
+
}), label]
|
|
32
|
+
});
|
|
98
33
|
});
|
|
99
34
|
CounterLabel.displayName = 'CounterLabel';
|
|
100
35
|
|
|
@@ -7,7 +7,7 @@ export declare function transition(direction: Exclude<SortDirection, 'NONE'>): E
|
|
|
7
7
|
/**
|
|
8
8
|
* A sort strategy for comparing any two values
|
|
9
9
|
*/
|
|
10
|
-
export declare function basic<T>(a: T, b: T): 1 | 0 |
|
|
10
|
+
export declare function basic<T>(a: T, b: T): -1 | 0 | 1;
|
|
11
11
|
/**
|
|
12
12
|
* A sort strategy for comparing two `Date` values. Also includes support for
|
|
13
13
|
* values from `Date.now()`
|
package/dist/Dialog/Dialog.d.ts
CHANGED
|
@@ -30,6 +30,7 @@ export type DialogButtonProps = Omit<ButtonProps, 'content'> & {
|
|
|
30
30
|
* Props to customize the rendering of the Dialog.
|
|
31
31
|
*/
|
|
32
32
|
export interface DialogProps {
|
|
33
|
+
'data-component'?: string;
|
|
33
34
|
/**
|
|
34
35
|
* Title of the Dialog. Also serves as the aria-label for this Dialog.
|
|
35
36
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../src/Dialog/Dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsE,MAAM,OAAO,CAAA;AAC1F,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,WAAW,CAAA;AAW1C,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,6BAA6B,CAAA;AAChE,OAAO,KAAK,EAAC,mBAAmB,IAAI,8BAA8B,EAAC,MAAM,sBAAsB,CAAA;AAgB/F;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAAC,WAAW,EAAE,SAAS,CAAC,GAAG;IAC7D;;OAEG;IACH,UAAU,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,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Q,CAAC,CAAA;IAE/G;;;;;OAKG;IACH,KAAK,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAA;IAEnC;;;OAGG;IACH,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAA;IAEpD;;OAEG;IACH,eAAe,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAA;IAErD;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;CAC5B;AAED;;GAEG;AACH,MAAM,WAAW,iBAAkB,SAAQ,WAAW;IACpD;;;OAGG;IACH,aAAa,EAAE,MAAM,CAAA;IAErB;;;OAGG;IACH,mBAAmB,EAAE,MAAM,CAAA;CAC5B;AAGD,QAAA,MAAM,SAAS;;;;CAIL,CAAA;AAGV,QAAA,MAAM,QAAQ;;;;;CAKJ,CAAA;AAEV,MAAM,MAAM,WAAW,GAAG,MAAM,OAAO,QAAQ,CAAA;AAC/C,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,SAAS,CAAA;AAiDjD,eAAO,MAAM,aAAa,mCAAqD,CAAA;AA4R/E,eAAO,MAAM,MAAM;;;;;;;;;;iBA1EuC,iBAAiB,EAAE;;;iBAoCf,MAAM,IAAI;;CA+CtE,CAAA"}
|
package/dist/Dialog/Dialog.js
CHANGED
|
@@ -85,6 +85,7 @@ const DIALOG_CONTEXT_VALUE = Object.freeze({});
|
|
|
85
85
|
const _Dialog = /*#__PURE__*/React.forwardRef((props, forwardedRef) => {
|
|
86
86
|
var _slots$header, _slots$body, _slots$footer;
|
|
87
87
|
const {
|
|
88
|
+
'data-component': dataComponentProp,
|
|
88
89
|
title = 'Dialog',
|
|
89
90
|
subtitle = '',
|
|
90
91
|
renderHeader,
|
|
@@ -192,6 +193,7 @@ const _Dialog = /*#__PURE__*/React.forwardRef((props, forwardedRef) => {
|
|
|
192
193
|
} : Object.fromEntries(Object.entries(position).map(([key, value]) => {
|
|
193
194
|
return [`data-position-${key}`, value];
|
|
194
195
|
}));
|
|
196
|
+
const dataComponent = dataComponentProp !== null && dataComponentProp !== void 0 ? dataComponentProp : 'Dialog';
|
|
195
197
|
return /*#__PURE__*/jsx(DialogContext.Provider, {
|
|
196
198
|
value: DIALOG_CONTEXT_VALUE,
|
|
197
199
|
children: /*#__PURE__*/jsx(Portal, {
|
|
@@ -222,6 +224,7 @@ const _Dialog = /*#__PURE__*/React.forwardRef((props, forwardedRef) => {
|
|
|
222
224
|
"data-footer-button-layout": hasFooter ? footerButtonLayout : undefined,
|
|
223
225
|
className: clsx(className, classes.Dialog),
|
|
224
226
|
style: style,
|
|
227
|
+
"data-component": dataComponent,
|
|
225
228
|
children: [header, /*#__PURE__*/jsx(ScrollableRegion, {
|
|
226
229
|
"aria-labelledby": dialogLabelId,
|
|
227
230
|
className: classes.DialogOverflowWrapper,
|
|
@@ -240,7 +243,8 @@ const Header = /*#__PURE__*/React.forwardRef(function Header({
|
|
|
240
243
|
return /*#__PURE__*/jsx("div", {
|
|
241
244
|
ref: forwardRef,
|
|
242
245
|
className: clsx(className, classes.Header),
|
|
243
|
-
...rest
|
|
246
|
+
...rest,
|
|
247
|
+
"data-component": "Dialog.Header"
|
|
244
248
|
});
|
|
245
249
|
});
|
|
246
250
|
Header.displayName = 'Dialog.Header';
|
|
@@ -251,7 +255,8 @@ const Title = /*#__PURE__*/React.forwardRef(function Title({
|
|
|
251
255
|
return /*#__PURE__*/jsx("h1", {
|
|
252
256
|
ref: forwardRef,
|
|
253
257
|
className: clsx(className, classes.Title),
|
|
254
|
-
...rest
|
|
258
|
+
...rest,
|
|
259
|
+
"data-component": "Dialog.Title"
|
|
255
260
|
});
|
|
256
261
|
});
|
|
257
262
|
Title.displayName = 'Dialog.Title';
|
|
@@ -262,7 +267,8 @@ const Subtitle = /*#__PURE__*/React.forwardRef(function Subtitle({
|
|
|
262
267
|
return /*#__PURE__*/jsx("h2", {
|
|
263
268
|
ref: forwardRef,
|
|
264
269
|
className: clsx(className, classes.Subtitle),
|
|
265
|
-
...rest
|
|
270
|
+
...rest,
|
|
271
|
+
"data-component": "Dialog.Subtitle"
|
|
266
272
|
});
|
|
267
273
|
});
|
|
268
274
|
Subtitle.displayName = 'Dialog.Subtitle';
|
|
@@ -273,7 +279,8 @@ const Body = /*#__PURE__*/React.forwardRef(function Body({
|
|
|
273
279
|
return /*#__PURE__*/jsx("div", {
|
|
274
280
|
ref: forwardRef,
|
|
275
281
|
className: clsx(className, classes.Body),
|
|
276
|
-
...rest
|
|
282
|
+
...rest,
|
|
283
|
+
"data-component": "Dialog.Body"
|
|
277
284
|
});
|
|
278
285
|
});
|
|
279
286
|
Body.displayName = 'Dialog.Body';
|
|
@@ -284,7 +291,8 @@ const Footer = /*#__PURE__*/React.forwardRef(function Footer({
|
|
|
284
291
|
return /*#__PURE__*/jsx("div", {
|
|
285
292
|
ref: forwardRef,
|
|
286
293
|
className: clsx(className, classes.Footer),
|
|
287
|
-
...rest
|
|
294
|
+
...rest,
|
|
295
|
+
"data-component": "Dialog.Footer"
|
|
288
296
|
});
|
|
289
297
|
});
|
|
290
298
|
Footer.displayName = 'Dialog.Footer';
|
|
@@ -313,14 +321,17 @@ const Buttons = ({
|
|
|
313
321
|
autoFocus = false,
|
|
314
322
|
...buttonProps
|
|
315
323
|
} = dialogButtonProps;
|
|
316
|
-
return /*#__PURE__*/jsx(
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
+
return /*#__PURE__*/jsx("div", {
|
|
325
|
+
"data-component": "Dialog.FooterButton",
|
|
326
|
+
children: /*#__PURE__*/jsx(ButtonComponent, {
|
|
327
|
+
...buttonProps,
|
|
328
|
+
// 'normal' value is equivalent to 'default', this is used for backwards compatibility
|
|
329
|
+
variant: buttonType === 'normal' ? 'default' : buttonType
|
|
330
|
+
// @ts-expect-error it needs a non nullable ref
|
|
331
|
+
,
|
|
332
|
+
ref: autoFocus && autoFocusCount === 0 ? (autoFocusCount++, autoFocusRef) : null,
|
|
333
|
+
children: content
|
|
334
|
+
})
|
|
324
335
|
}, index);
|
|
325
336
|
})
|
|
326
337
|
});
|
|
@@ -332,7 +343,8 @@ const CloseButton = ({
|
|
|
332
343
|
icon: XIcon,
|
|
333
344
|
"aria-label": "Close",
|
|
334
345
|
onClick: onClose,
|
|
335
|
-
variant: "invisible"
|
|
346
|
+
variant: "invisible",
|
|
347
|
+
"data-component": "Dialog.CloseButton"
|
|
336
348
|
});
|
|
337
349
|
};
|
|
338
350
|
CloseButton.displayName = "CloseButton";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultFeatureFlags.d.ts","sourceRoot":"","sources":["../../src/FeatureFlags/DefaultFeatureFlags.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,gBAAgB,EAAC,MAAM,oBAAoB,CAAA;AAEnD,eAAO,MAAM,mBAAmB,
|
|
1
|
+
{"version":3,"file":"DefaultFeatureFlags.d.ts","sourceRoot":"","sources":["../../src/FeatureFlags/DefaultFeatureFlags.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,gBAAgB,EAAC,MAAM,oBAAoB,CAAA;AAEnD,eAAO,MAAM,mBAAmB,kBAK9B,CAAA"}
|
|
@@ -3,7 +3,8 @@ import { FeatureFlagScope } from './FeatureFlagScope.js';
|
|
|
3
3
|
const DefaultFeatureFlags = FeatureFlagScope.create({
|
|
4
4
|
primer_react_css_anchor_positioning: false,
|
|
5
5
|
primer_react_select_panel_fullscreen_on_narrow: false,
|
|
6
|
-
primer_react_select_panel_order_selected_at_top: false
|
|
6
|
+
primer_react_select_panel_order_selected_at_top: false,
|
|
7
|
+
primer_react_styled_react_use_primer_theme_providers: false
|
|
7
8
|
});
|
|
8
9
|
|
|
9
10
|
export { DefaultFeatureFlags };
|
|
@@ -37,7 +37,7 @@ export type TextInputNonPassthroughProps = {
|
|
|
37
37
|
export type TextInputProps = Merge<React.ComponentPropsWithoutRef<'input'>, TextInputNonPassthroughProps>;
|
|
38
38
|
declare const _default: PolymorphicForwardRefComponent<"input", TextInputProps> & {
|
|
39
39
|
__SLOT__: symbol;
|
|
40
|
-
Action: React.ForwardRefExoticComponent<Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "
|
|
40
|
+
Action: React.ForwardRefExoticComponent<Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "aria-label" | "size" | "tooltipDirection"> & {
|
|
41
41
|
children?: React.ReactNode;
|
|
42
42
|
"aria-label"?: string;
|
|
43
43
|
tooltipDirection?: "n" | "ne" | "e" | "se" | "s" | "sw" | "w" | "nw";
|
|
@@ -48,11 +48,11 @@ declare const TextInputWithTokens: React.ForwardRefExoticComponent<{
|
|
|
48
48
|
* The array of tokens to render
|
|
49
49
|
*/
|
|
50
50
|
tokens: any[] | (Omit<(Omit<React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> & {
|
|
51
|
-
ref?: ((instance: HTMLAnchorElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) |
|
|
51
|
+
ref?: RefObject<HTMLAnchorElement> | ((instance: HTMLAnchorElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | null | undefined;
|
|
52
52
|
}) | (Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
53
|
-
ref?: ((instance: HTMLButtonElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) |
|
|
53
|
+
ref?: RefObject<HTMLButtonElement> | ((instance: HTMLButtonElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | null | undefined;
|
|
54
54
|
}) | (Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
55
|
-
ref?: ((instance: HTMLSpanElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) |
|
|
55
|
+
ref?: RefObject<HTMLSpanElement> | ((instance: HTMLSpanElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | null | undefined;
|
|
56
56
|
}), keyof import("..").TokenProps> & import("..").TokenProps & {
|
|
57
57
|
as?: "a" | "button" | "span" | undefined;
|
|
58
58
|
})[];
|
|
@@ -10,10 +10,10 @@ declare const data: {
|
|
|
10
10
|
login: string;
|
|
11
11
|
recommended: boolean;
|
|
12
12
|
} | {
|
|
13
|
+
recommended?: undefined;
|
|
13
14
|
id: string;
|
|
14
15
|
name: string;
|
|
15
16
|
login: string;
|
|
16
|
-
recommended?: undefined;
|
|
17
17
|
})[];
|
|
18
18
|
labels: ({
|
|
19
19
|
color: string;
|
|
@@ -38,18 +38,18 @@ declare const data: {
|
|
|
38
38
|
name: string;
|
|
39
39
|
trailingInfo: string;
|
|
40
40
|
} | {
|
|
41
|
+
trailingInfo?: undefined;
|
|
41
42
|
id: string;
|
|
42
43
|
name: string;
|
|
43
|
-
trailingInfo?: undefined;
|
|
44
44
|
})[];
|
|
45
45
|
tags: ({
|
|
46
46
|
id: string;
|
|
47
47
|
name: string;
|
|
48
48
|
trailingInfo: string;
|
|
49
49
|
} | {
|
|
50
|
+
trailingInfo?: undefined;
|
|
50
51
|
id: string;
|
|
51
52
|
name: string;
|
|
52
|
-
trailingInfo?: undefined;
|
|
53
53
|
})[];
|
|
54
54
|
repos: {
|
|
55
55
|
org: string;
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* This is adapted almost directly from https://beta.reactjs.org/learn/you-might-not-need-an-effect#adjusting-some-state-when-a-prop-changes
|
|
10
10
|
*/
|
|
11
11
|
export declare const useSyncedState: <T>(initialValue: T | (() => T), { isPropUpdateDisabled, isEqual }?: {
|
|
12
|
-
isPropUpdateDisabled?: boolean | undefined;
|
|
13
12
|
isEqual?: ((value1: any, value2: any) => boolean) | undefined;
|
|
13
|
+
isPropUpdateDisabled?: boolean | undefined;
|
|
14
14
|
}) => readonly [T, import("react").Dispatch<import("react").SetStateAction<T>>];
|
|
15
15
|
//# sourceMappingURL=useSyncedState.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxOrRadioGroup.d.ts","sourceRoot":"","sources":["../../../../src/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAazB,MAAM,MAAM,yBAAyB,GAAG;
|
|
1
|
+
{"version":3,"file":"CheckboxOrRadioGroup.d.ts","sourceRoot":"","sources":["../../../../src/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAazB,MAAM,MAAM,yBAAyB,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,UAAU,CAAC,GAAG;IAC5F,oCAAoC;IACpC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;OAEG;IACH,CAAC,iBAAiB,CAAC,CAAC,EAAE,MAAM,CAAA;IAC5B;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;;OAGG;IACH,EAAE,CAAC,EAAE,MAAM,CAAA;IACX;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AA2HD,YAAY,EAAC,8BAA8B,EAAC,MAAM,6BAA6B,CAAA;;;;;;;;;;AAC/E,wBAIE"}
|
|
@@ -18,7 +18,8 @@ const CheckboxOrRadioGroup = ({
|
|
|
18
18
|
disabled = false,
|
|
19
19
|
id: idProp,
|
|
20
20
|
required = false,
|
|
21
|
-
className
|
|
21
|
+
className,
|
|
22
|
+
...restProps
|
|
22
23
|
}) => {
|
|
23
24
|
const [slots, rest] = useSlots(children, {
|
|
24
25
|
caption: CheckboxOrRadioGroupCaption,
|
|
@@ -47,6 +48,7 @@ const CheckboxOrRadioGroup = ({
|
|
|
47
48
|
},
|
|
48
49
|
children: /*#__PURE__*/jsxs("div", {
|
|
49
50
|
children: [/*#__PURE__*/jsxs(Component, {
|
|
51
|
+
...restProps,
|
|
50
52
|
className: clsx(className, classes.GroupFieldset),
|
|
51
53
|
"data-validation": validationChild ? '' : undefined,
|
|
52
54
|
...(labelChild ? {
|
|
@@ -16,7 +16,7 @@ export type TextInputActionProps = Omit<React.ButtonHTMLAttributes<HTMLButtonEle
|
|
|
16
16
|
*/
|
|
17
17
|
variant?: ButtonProps['variant'];
|
|
18
18
|
};
|
|
19
|
-
declare const TextInputAction: React.ForwardRefExoticComponent<Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "
|
|
19
|
+
declare const TextInputAction: React.ForwardRefExoticComponent<Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "aria-label" | "size" | "tooltipDirection"> & {
|
|
20
20
|
/** @deprecated Text input action buttons should only use icon buttons */
|
|
21
21
|
children?: React.ReactNode;
|
|
22
22
|
/** Text that appears in a tooltip. If an icon is passed, this is also used as the label used by assistive technologies. */
|
package/dist/theme.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ declare const theme: {
|
|
|
29
29
|
xlarge: string;
|
|
30
30
|
};
|
|
31
31
|
space: string[];
|
|
32
|
-
colorSchemes: Record<"
|
|
32
|
+
colorSchemes: Record<"dark" | "dark_colorblind" | "dark_dimmed" | "dark_high_contrast" | "dark_tritanopia" | "light" | "light_colorblind" | "light_high_contrast" | "light_tritanopia", {
|
|
33
33
|
colors: Partial<{
|
|
34
34
|
colors: {
|
|
35
35
|
canvasDefaultTransparent: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const useIsomorphicLayoutEffect: typeof
|
|
1
|
+
import { useLayoutEffect } from 'react';
|
|
2
|
+
declare const useIsomorphicLayoutEffect: typeof useLayoutEffect;
|
|
3
3
|
export default useIsomorphicLayoutEffect;
|
|
4
4
|
//# sourceMappingURL=useIsomorphicLayoutEffect.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useIsomorphicLayoutEffect.d.ts","sourceRoot":"","sources":["../../src/utils/useIsomorphicLayoutEffect.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"useIsomorphicLayoutEffect.d.ts","sourceRoot":"","sources":["../../src/utils/useIsomorphicLayoutEffect.ts"],"names":[],"mappings":"AACA,OAAO,EAAY,eAAe,EAAC,MAAM,OAAO,CAAA;AAEhD,QAAA,MAAM,yBAAyB,wBAOhB,CAAA;AAEf,eAAe,yBAAyB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@primer/react",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.0-
|
|
4
|
+
"version": "0.0.0-20260508174823",
|
|
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",
|
|
@@ -178,7 +178,7 @@
|
|
|
178
178
|
"ts-toolbelt": "9.6.0",
|
|
179
179
|
"tsx": "4.20.3",
|
|
180
180
|
"typed-css-modules": "^0.9.1",
|
|
181
|
-
"typescript": "^
|
|
181
|
+
"typescript": "^6.0.3",
|
|
182
182
|
"typescript-plugin-css-modules": "^5.2.0",
|
|
183
183
|
"unist-util-find": "3.0.0",
|
|
184
184
|
"unist-util-find-before": "4.0.0",
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
.prc-ActionBar-List-9uz46{align-items:flex-start;animation:prc-ActionBar-detect-overflow-mAuJu linear;display:flex;gap:var(--actionbar-gap,var(--stack-gap-condensed,.5rem));height:var(--actionbar-height,var(--control-small-size,1.75rem));list-style:none;margin-bottom:-1px;min-width:0;overflow:hidden;position:relative;animation-timeline:scroll(self block)}.prc-ActionBar-List-9uz46[data-has-overflow=true]{--morebutton-display:flex}.prc-ActionBar-List-9uz46:where([data-size=small]){--actionbar-height:var(--control-small-size,1.75rem)}.prc-ActionBar-List-9uz46:where([data-size=medium]){--actionbar-height:var(--control-medium-size,2rem)}.prc-ActionBar-List-9uz46:where([data-size=large]){--actionbar-height:var(--control-large-size,2.5rem)}.prc-ActionBar-List-9uz46:where([data-gap=none]){--actionbar-gap:0}.prc-ActionBar-List-9uz46:where([data-gap=none]) .prc-ActionBar-Divider-6V8yH{padding:0 var(--base-size-8,.5rem)}.prc-ActionBar-List-9uz46:where([data-gap=condensed]){--actionbar-gap:var(--stack-gap-condensed,0.5rem)}.prc-ActionBar-List-9uz46 [data-overflowing]{visibility:hidden!important}@keyframes prc-ActionBar-detect-overflow-mAuJu{0%,to{--morebutton-display:flex}}.prc-ActionBar-Nav-9spON{align-items:center;display:flex;justify-content:flex-end;padding-inline:var(--base-size-16,1rem)}.prc-ActionBar-Nav-9spON:where([data-flush=true]){padding-inline:0}.prc-ActionBar-Divider-6V8yH:before{background:var(--borderColor-muted,#d1d9e0b3);content:"";display:block;height:var(--base-size-20,1.25rem);margin-top:calc((var(--actionbar-height) - var(--base-size-20,1.25rem))/2);width:var(--borderWidth-thin,.0625rem)}.prc-ActionBar-Group-peNCk,.prc-ActionBar-OverflowContainer-AkYZs{display:flex;gap:inherit}.prc-ActionBar-OverflowContainer-AkYZs{flex-wrap:wrap;justify-content:flex-end;overflow:hidden}.prc-ActionBar-MoreButton-RHqpx{display:var(--morebutton-display,none)}
|
|
2
|
-
/*# sourceMappingURL=ActionBar-e2c44be2.css.map */
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/ActionBar/ActionBar.module.css.js"],"names":[],"mappings":"AAAA,0BASE,sBAAuB,CASvB,oDAAiC,CAhBjC,YAAa,CAQb,yDAAqD,CAGrD,gEAA0D,CAL1D,eAAgB,CADhB,kBAAmB,CAJnB,WAAY,CAQZ,eAAgB,CAVhB,iBAAkB,CAkBlB,qCAsCF,CAnCE,kDACE,yBACF,CAEA,mDACE,oDACF,CAEA,oDACE,kDACF,CAEA,mDACE,mDACF,CAGA,iDACE,iBAKF,CAHE,8EACE,kCACF,CAGF,sDACE,iDACF,CAEA,6CAIE,2BACF,CAGF,+CACE,MAEE,yBACF,CACF,CAEA,yBAIE,kBAAmB,CAHnB,YAAa,CAEb,wBAAyB,CADzB,uCAOF,CAHE,kDACE,gBACF,CAIA,oCAME,6CAAoC,CAFpC,UAAW,CAHX,aAAc,CAEd,kCAA2B,CAK3B,0EAAqE,CANrE,sCAOF,CAQF,kEAJE,YAAa,CACb,WASF,CANA,uCAEE,cAAe,CAEf,wBAAyB,CACzB,eACF,CAEA,gCACE,sCACF","file":"ActionBar-e2c44be2.css","sourcesContent":[".List {\n position: relative;\n display: flex;\n min-width: 0;\n\n /* wonder why this is here */\n /* stylelint-disable-next-line primer/spacing */\n margin-bottom: -1px;\n list-style: none;\n align-items: flex-start;\n gap: var(--actionbar-gap, var(--stack-gap-condensed));\n overflow: hidden;\n /* Explicit height is required to clip wrapped items */\n height: var(--actionbar-height, var(--control-small-size));\n\n /* Scroll-based animations have no effect unless the container is scrollable (has overflow, even with overflow:hidden)\n so we can use them to detect overflow. It would be cleaner to use scroll-state container queries for this, but\n browser support for scroll-driven animations is slightly better. */\n animation: detect-overflow linear;\n animation-timeline: scroll(self block);\n\n /* After initial render, JS is used to control visibility which provides progressive enhancement for unsupported browsers */\n &[data-has-overflow='true'] {\n --morebutton-display: flex;\n }\n\n &:where([data-size='small']) {\n --actionbar-height: var(--control-small-size);\n }\n\n &:where([data-size='medium']) {\n --actionbar-height: var(--control-medium-size);\n }\n\n &:where([data-size='large']) {\n --actionbar-height: var(--control-large-size);\n }\n\n /* Gap scale (mirrors Stack) */\n &:where([data-gap='none']) {\n --actionbar-gap: 0;\n\n .Divider {\n padding: 0 var(--base-size-8);\n }\n }\n\n &:where([data-gap='condensed']) {\n --actionbar-gap: var(--stack-gap-condensed);\n }\n\n & [data-overflowing] {\n /* Hide overflowing items. Even though they are clipped by `overflow: hidden`, setting `visibility: hidden` ensures\n they can't accidentally be shown and also hides them from screen readers / keyboard nav. `!important` prevents\n consumers from unintentionally overriding this and breaking accessibility. */\n visibility: hidden !important;\n }\n}\n\n@keyframes detect-overflow {\n 0%,\n 100% {\n --morebutton-display: flex;\n }\n}\n\n.Nav {\n display: flex;\n padding-inline: var(--base-size-16);\n justify-content: flex-end;\n align-items: center;\n\n &:where([data-flush='true']) {\n padding-inline: 0;\n }\n}\n\n.Divider {\n &::before {\n display: block;\n width: var(--borderWidth-thin);\n height: var(--base-size-20);\n content: '';\n /* stylelint-disable-next-line primer/colors */\n background: var(--borderColor-muted);\n /* stylelint-disable-next-line primer/spacing */\n margin-top: calc((var(--actionbar-height) - var(--base-size-20)) / 2);\n }\n}\n\n.Group {\n display: flex;\n gap: inherit;\n}\n\n.OverflowContainer {\n display: flex;\n flex-wrap: wrap;\n gap: inherit;\n justify-content: flex-end;\n overflow: hidden;\n}\n\n.MoreButton {\n display: var(--morebutton-display, none);\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/AnchoredOverlay/AnchoredOverlay.module.css.js"],"names":[],"mappings":"AAAA,0DACE,iBACF,CAEA,iDAIE,YAAa,CAHb,iBAAkB,CAElB,8BAAyB,CADzB,4BAOF,CAHE,mDANF,iDAOI,mBAEJ,CADE,CAGF,2CACE,oEAGwB,CACxB,mCAAoC,CAEpC,wBAA0B,CAD1B,WA8CF,CA3CE,oDAIE,QAAS,CAHT,UAAW,CACX,QAAS,CAGT,cAAe,CAFf,SAGF,CAEA,qEAGE,iBAAkB,CADlB,oDAOF,CAJE,sFACE,SAAU,CACV,sEACF,CAGF,kEAEE,kBAAmB,CACnB,iBAAkB,CAFlB,uCAQF,CAJE,mFACE,SAAU,CACV,mBACF,CAGF,mEAGE,sCAAgC,CAFhC,kBAAmB,CACnB,eAAgB,CAEhB,iFACF,CAEA,oEACE,kBAAmB,CAEnB,qCAA+B,CAD/B,eAAgB,CAEhB,kFACF,CAGF,uCAGE,QAAS,CAFT,mBAAoB,CACpB,oDAA8C,CAE9C,UACF,CAEA,wCACE,iBAAkB,CAElB,QAAS,CADT,oDAA8C,CAE9C,UACF","file":"AnchoredOverlay-0c26c5f8.css","sourcesContent":[".ResponsiveCloseButtonContainer {\n position: relative;\n}\n\n.ResponsiveCloseButton {\n position: absolute;\n top: var(--base-size-8);\n right: var(--base-size-8);\n display: none;\n\n @media screen and (--viewportRange-narrow) {\n display: inline-grid;\n }\n}\n\n.AnchoredOverlay {\n position-try-fallbacks:\n flip-block,\n flip-inline,\n flip-block flip-inline;\n position-visibility: anchors-visible;\n z-index: 100;\n position: fixed !important;\n\n &[popover] {\n inset: auto;\n margin: 0;\n padding: 0;\n border: 0;\n max-width: none;\n }\n\n &[data-side='outside-bottom'] {\n /* stylelint-disable primer/spacing */\n top: calc(anchor(bottom) + var(--base-size-4));\n left: anchor(left);\n\n &[data-align='left'] {\n left: auto;\n right: calc(anchor(right) - var(--anchored-overlay-anchor-offset-left));\n }\n }\n\n &[data-side='outside-top'] {\n margin-bottom: var(--base-size-4);\n bottom: anchor(top);\n left: anchor(left);\n\n &[data-align='left'] {\n left: auto;\n right: anchor(right);\n }\n }\n\n &[data-side='outside-left'] {\n right: anchor(left);\n top: anchor(top);\n margin-right: var(--base-size-4);\n position-try-fallbacks: flip-inline, flip-block, flip-start, --outside-left-to-bottom;\n }\n\n &[data-side='outside-right'] {\n left: anchor(right);\n top: anchor(top);\n margin-left: var(--base-size-4);\n position-try-fallbacks: flip-inline, flip-block, flip-start, --outside-right-to-bottom;\n }\n}\n\n@position-try --outside-left-to-bottom {\n right: anchor(right);\n top: calc(anchor(bottom) + var(--base-size-4));\n margin: 0;\n width: auto;\n}\n\n@position-try --outside-right-to-bottom {\n left: anchor(left);\n top: calc(anchor(bottom) + var(--base-size-4));\n margin: 0;\n width: auto;\n}\n"]}
|