@primer/react 0.0.0-20260508174823 → 0.0.0-20260508193930
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 +4 -16
- package/dist/ActionBar/ActionBar-e2c44be2.css +2 -0
- package/dist/ActionBar/ActionBar-e2c44be2.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 +293 -381
- 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-ec9e15fc.css → AnchoredOverlay-0c26c5f8.css} +2 -2
- package/dist/AnchoredOverlay/AnchoredOverlay-0c26c5f8.css.map +1 -0
- package/dist/AnchoredOverlay/AnchoredOverlay.d.ts.map +1 -1
- package/dist/AnchoredOverlay/AnchoredOverlay.js +26 -63
- 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 +0 -6
- package/dist/BranchName/BranchName.js +0 -1
- package/dist/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
- package/dist/Breadcrumbs/Breadcrumbs.js +0 -3
- package/dist/ButtonGroup/ButtonGroup.d.ts.map +1 -1
- package/dist/ButtonGroup/ButtonGroup.js +0 -1
- package/dist/Checkbox/Checkbox.d.ts +0 -1
- package/dist/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/Checkbox/Checkbox.js +5 -10
- package/dist/CheckboxGroup/CheckboxGroup.js +0 -1
- package/dist/CircleBadge/CircleBadge.d.ts.map +1 -1
- package/dist/CircleBadge/CircleBadge.js +28 -44
- package/dist/ConfirmationDialog/ConfirmationDialog.d.ts.map +1 -1
- package/dist/ConfirmationDialog/ConfirmationDialog.js +0 -1
- package/dist/CounterLabel/CounterLabel.d.ts +0 -2
- package/dist/CounterLabel/CounterLabel.d.ts.map +1 -1
- package/dist/CounterLabel/CounterLabel.js +90 -25
- package/dist/DataTable/sorting.d.ts +1 -1
- package/dist/Dialog/Dialog.d.ts +0 -1
- package/dist/Dialog/Dialog.d.ts.map +1 -1
- package/dist/Dialog/Dialog.js +14 -26
- package/dist/FeatureFlags/DefaultFeatureFlags.d.ts.map +1 -1
- package/dist/FeatureFlags/DefaultFeatureFlags.js +1 -2
- 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 +1 -3
- 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-a41224b2.css +0 -2
- package/dist/ActionBar/ActionBar-a41224b2.css.map +0 -1
- package/dist/AnchoredOverlay/AnchoredOverlay-ec9e15fc.css.map +0 -1
|
@@ -1,35 +1,100 @@
|
|
|
1
|
+
import { c } from 'react-compiler-runtime';
|
|
1
2
|
import { clsx } from 'clsx';
|
|
2
3
|
import { forwardRef } from 'react';
|
|
3
4
|
import classes from './CounterLabel.module.css.js';
|
|
4
|
-
import { jsxs, Fragment
|
|
5
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
5
6
|
import { VisuallyHidden } from '../VisuallyHidden/VisuallyHidden.js';
|
|
6
7
|
|
|
7
|
-
const CounterLabel = /*#__PURE__*/forwardRef(({
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
className
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
[
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
8
|
+
const CounterLabel = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
|
|
9
|
+
const $ = c(21);
|
|
10
|
+
let children;
|
|
11
|
+
let className;
|
|
12
|
+
let rest;
|
|
13
|
+
let scheme;
|
|
14
|
+
let variant;
|
|
15
|
+
if ($[0] !== t0) {
|
|
16
|
+
({
|
|
17
|
+
variant,
|
|
18
|
+
scheme,
|
|
19
|
+
className,
|
|
20
|
+
children,
|
|
21
|
+
...rest
|
|
22
|
+
} = t0);
|
|
23
|
+
$[0] = t0;
|
|
24
|
+
$[1] = children;
|
|
25
|
+
$[2] = className;
|
|
26
|
+
$[3] = rest;
|
|
27
|
+
$[4] = scheme;
|
|
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", {
|
|
27
75
|
...counterProps,
|
|
28
|
-
|
|
29
|
-
className: clsx(className, classes.CounterLabel),
|
|
76
|
+
className: t3,
|
|
30
77
|
children: children
|
|
31
|
-
})
|
|
32
|
-
|
|
78
|
+
});
|
|
79
|
+
$[14] = children;
|
|
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;
|
|
33
98
|
});
|
|
34
99
|
CounterLabel.displayName = 'CounterLabel';
|
|
35
100
|
|
|
@@ -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):
|
|
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,7 +30,6 @@ 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;
|
|
34
33
|
/**
|
|
35
34
|
* Title of the Dialog. Also serves as the aria-label for this Dialog.
|
|
36
35
|
*/
|
|
@@ -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,QAAQ,CAAA;IAExD;;OAEG;IACH,OAAO,EAAE,KAAK,CAAC,SAAS,CAAA;IAExB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;IAEnB;;;OAGG;IAC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MAAM,OAAO,QAAQ,CAAA;AAC/C,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,SAAS,CAAA;AAiDjD,eAAO,MAAM,aAAa,mCAAqD,CAAA;AA8Q/E,eAAO,MAAM,MAAM;;;;;;;;;;iBAjEuC,iBAAiB,EAAE;;;iBAmCf,MAAM,IAAI;;CAuCtE,CAAA"}
|
package/dist/Dialog/Dialog.js
CHANGED
|
@@ -85,7 +85,6 @@ 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,
|
|
89
88
|
title = 'Dialog',
|
|
90
89
|
subtitle = '',
|
|
91
90
|
renderHeader,
|
|
@@ -193,7 +192,6 @@ const _Dialog = /*#__PURE__*/React.forwardRef((props, forwardedRef) => {
|
|
|
193
192
|
} : Object.fromEntries(Object.entries(position).map(([key, value]) => {
|
|
194
193
|
return [`data-position-${key}`, value];
|
|
195
194
|
}));
|
|
196
|
-
const dataComponent = dataComponentProp !== null && dataComponentProp !== void 0 ? dataComponentProp : 'Dialog';
|
|
197
195
|
return /*#__PURE__*/jsx(DialogContext.Provider, {
|
|
198
196
|
value: DIALOG_CONTEXT_VALUE,
|
|
199
197
|
children: /*#__PURE__*/jsx(Portal, {
|
|
@@ -224,7 +222,6 @@ const _Dialog = /*#__PURE__*/React.forwardRef((props, forwardedRef) => {
|
|
|
224
222
|
"data-footer-button-layout": hasFooter ? footerButtonLayout : undefined,
|
|
225
223
|
className: clsx(className, classes.Dialog),
|
|
226
224
|
style: style,
|
|
227
|
-
"data-component": dataComponent,
|
|
228
225
|
children: [header, /*#__PURE__*/jsx(ScrollableRegion, {
|
|
229
226
|
"aria-labelledby": dialogLabelId,
|
|
230
227
|
className: classes.DialogOverflowWrapper,
|
|
@@ -243,8 +240,7 @@ const Header = /*#__PURE__*/React.forwardRef(function Header({
|
|
|
243
240
|
return /*#__PURE__*/jsx("div", {
|
|
244
241
|
ref: forwardRef,
|
|
245
242
|
className: clsx(className, classes.Header),
|
|
246
|
-
...rest
|
|
247
|
-
"data-component": "Dialog.Header"
|
|
243
|
+
...rest
|
|
248
244
|
});
|
|
249
245
|
});
|
|
250
246
|
Header.displayName = 'Dialog.Header';
|
|
@@ -255,8 +251,7 @@ const Title = /*#__PURE__*/React.forwardRef(function Title({
|
|
|
255
251
|
return /*#__PURE__*/jsx("h1", {
|
|
256
252
|
ref: forwardRef,
|
|
257
253
|
className: clsx(className, classes.Title),
|
|
258
|
-
...rest
|
|
259
|
-
"data-component": "Dialog.Title"
|
|
254
|
+
...rest
|
|
260
255
|
});
|
|
261
256
|
});
|
|
262
257
|
Title.displayName = 'Dialog.Title';
|
|
@@ -267,8 +262,7 @@ const Subtitle = /*#__PURE__*/React.forwardRef(function Subtitle({
|
|
|
267
262
|
return /*#__PURE__*/jsx("h2", {
|
|
268
263
|
ref: forwardRef,
|
|
269
264
|
className: clsx(className, classes.Subtitle),
|
|
270
|
-
...rest
|
|
271
|
-
"data-component": "Dialog.Subtitle"
|
|
265
|
+
...rest
|
|
272
266
|
});
|
|
273
267
|
});
|
|
274
268
|
Subtitle.displayName = 'Dialog.Subtitle';
|
|
@@ -279,8 +273,7 @@ const Body = /*#__PURE__*/React.forwardRef(function Body({
|
|
|
279
273
|
return /*#__PURE__*/jsx("div", {
|
|
280
274
|
ref: forwardRef,
|
|
281
275
|
className: clsx(className, classes.Body),
|
|
282
|
-
...rest
|
|
283
|
-
"data-component": "Dialog.Body"
|
|
276
|
+
...rest
|
|
284
277
|
});
|
|
285
278
|
});
|
|
286
279
|
Body.displayName = 'Dialog.Body';
|
|
@@ -291,8 +284,7 @@ const Footer = /*#__PURE__*/React.forwardRef(function Footer({
|
|
|
291
284
|
return /*#__PURE__*/jsx("div", {
|
|
292
285
|
ref: forwardRef,
|
|
293
286
|
className: clsx(className, classes.Footer),
|
|
294
|
-
...rest
|
|
295
|
-
"data-component": "Dialog.Footer"
|
|
287
|
+
...rest
|
|
296
288
|
});
|
|
297
289
|
});
|
|
298
290
|
Footer.displayName = 'Dialog.Footer';
|
|
@@ -321,17 +313,14 @@ const Buttons = ({
|
|
|
321
313
|
autoFocus = false,
|
|
322
314
|
...buttonProps
|
|
323
315
|
} = dialogButtonProps;
|
|
324
|
-
return /*#__PURE__*/jsx(
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
ref: autoFocus && autoFocusCount === 0 ? (autoFocusCount++, autoFocusRef) : null,
|
|
333
|
-
children: content
|
|
334
|
-
})
|
|
316
|
+
return /*#__PURE__*/jsx(ButtonComponent, {
|
|
317
|
+
...buttonProps,
|
|
318
|
+
// 'normal' value is equivalent to 'default', this is used for backwards compatibility
|
|
319
|
+
variant: buttonType === 'normal' ? 'default' : buttonType
|
|
320
|
+
// @ts-expect-error it needs a non nullable ref
|
|
321
|
+
,
|
|
322
|
+
ref: autoFocus && autoFocusCount === 0 ? (autoFocusCount++, autoFocusRef) : null,
|
|
323
|
+
children: content
|
|
335
324
|
}, index);
|
|
336
325
|
})
|
|
337
326
|
});
|
|
@@ -343,8 +332,7 @@ const CloseButton = ({
|
|
|
343
332
|
icon: XIcon,
|
|
344
333
|
"aria-label": "Close",
|
|
345
334
|
onClick: onClose,
|
|
346
|
-
variant: "invisible"
|
|
347
|
-
"data-component": "Dialog.CloseButton"
|
|
335
|
+
variant: "invisible"
|
|
348
336
|
});
|
|
349
337
|
};
|
|
350
338
|
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,kBAI9B,CAAA"}
|
|
@@ -3,8 +3,7 @@ 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
|
|
7
|
-
primer_react_styled_react_use_primer_theme_providers: false
|
|
6
|
+
primer_react_select_panel_order_selected_at_top: false
|
|
8
7
|
});
|
|
9
8
|
|
|
10
9
|
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>, "size" | "aria-label" | "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?:
|
|
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]) | RefObject<HTMLAnchorElement> | null | undefined;
|
|
52
52
|
}) | (Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
53
|
-
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]) | RefObject<HTMLButtonElement> | null | undefined;
|
|
54
54
|
}) | (Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
55
|
-
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]) | RefObject<HTMLSpanElement> | 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;
|
|
14
13
|
id: string;
|
|
15
14
|
name: string;
|
|
16
15
|
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;
|
|
42
41
|
id: string;
|
|
43
42
|
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;
|
|
51
50
|
id: string;
|
|
52
51
|
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
|
-
isEqual?: ((value1: any, value2: any) => boolean) | undefined;
|
|
13
12
|
isPropUpdateDisabled?: boolean | undefined;
|
|
13
|
+
isEqual?: ((value1: any, value2: any) => 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;IACtC,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;AAyHD,YAAY,EAAC,8BAA8B,EAAC,MAAM,6BAA6B,CAAA;;;;;;;;;;AAC/E,wBAIE"}
|
|
@@ -18,8 +18,7 @@ const CheckboxOrRadioGroup = ({
|
|
|
18
18
|
disabled = false,
|
|
19
19
|
id: idProp,
|
|
20
20
|
required = false,
|
|
21
|
-
className
|
|
22
|
-
...restProps
|
|
21
|
+
className
|
|
23
22
|
}) => {
|
|
24
23
|
const [slots, rest] = useSlots(children, {
|
|
25
24
|
caption: CheckboxOrRadioGroupCaption,
|
|
@@ -48,7 +47,6 @@ const CheckboxOrRadioGroup = ({
|
|
|
48
47
|
},
|
|
49
48
|
children: /*#__PURE__*/jsxs("div", {
|
|
50
49
|
children: [/*#__PURE__*/jsxs(Component, {
|
|
51
|
-
...restProps,
|
|
52
50
|
className: clsx(className, classes.GroupFieldset),
|
|
53
51
|
"data-validation": validationChild ? '' : undefined,
|
|
54
52
|
...(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>, "size" | "aria-label" | "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<"light" | "light_high_contrast" | "light_colorblind" | "light_tritanopia" | "dark" | "dark_dimmed" | "dark_high_contrast" | "dark_colorblind" | "dark_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 { useEffect } from 'react';
|
|
2
|
+
declare const useIsomorphicLayoutEffect: typeof useEffect;
|
|
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,EAAC,SAAS,EAAkB,MAAM,OAAO,CAAA;AAEhD,QAAA,MAAM,yBAAyB,kBAOhB,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-20260508193930",
|
|
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": "^5.9.2",
|
|
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:center;display:flex;gap:var(--actionbar-gap,var(--stack-gap-condensed,.5rem));list-style:none;margin-bottom:-1px;min-width:0;position:relative;white-space:nowrap}.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-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);width:var(--borderWidth-thin,.0625rem)}.prc-ActionBar-Group-peNCk{display:flex;gap:inherit}
|
|
2
|
-
/*# sourceMappingURL=ActionBar-a41224b2.css.map */
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/ActionBar/ActionBar.module.css.js"],"names":[],"mappings":"AAAA,0BAUE,kBAAmB,CARnB,YAAa,CASb,yDAAqD,CAFrD,eAAgB,CAFhB,kBAAmB,CAJnB,WAAY,CAFZ,iBAAkB,CAOlB,kBAiBF,CAXE,iDACE,iBAKF,CAHE,8EACE,kCACF,CAGF,sDACE,iDACF,CAGF,yBAIE,kBAAmB,CAHnB,YAAa,CAEb,wBAAyB,CADzB,uCAOF,CAHE,kDACE,gBACF,CAIA,oCAME,6CAAoC,CAFpC,UAAW,CAHX,aAAc,CAEd,kCAA2B,CAD3B,sCAKF,CAGF,2BACE,YAAa,CACb,WACF","file":"ActionBar-a41224b2.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 white-space: nowrap;\n list-style: none;\n align-items: center;\n gap: var(--actionbar-gap, var(--stack-gap-condensed));\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\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 }\n}\n\n.Group {\n display: flex;\n gap: inherit;\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,WAsDF,CAnDE,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,mEAWE,sCAAgC,CAVhC,kBAAmB,CASnB,oDAAsD,CAEtD,iFACF,CAEA,oEACE,kBAAmB,CAEnB,qCAA+B,CAD/B,oDAAsD,CAEtD,kFACF,CAGF,uCAGE,QAAS,CAFT,mBAAoB,CACpB,oDAA8C,CAE9C,UACF,CAEA,wCACE,iBAAkB,CAElB,QAAS,CADT,oDAA8C,CAE9C,UACF","file":"AnchoredOverlay-ec9e15fc.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 /* Falls back to `anchor(top)` when JS hasn't overridden it. JS sets the\n override when the overlay's bottom would overflow the viewport so we\n can lift it up to keep the bottom edge on screen, mirroring the JS\n anchored-positioning code path.\n\n This override only applies when CSS cannot find space using the default position -\n or any of its defined fallbacks.\n */\n top: var(--anchored-overlay-top-override, 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: var(--anchored-overlay-top-override, 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"]}
|