@primer/react 38.40.2-rc.e319faf65 → 38.41.0-rc.27afe233f
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 +5 -1
- package/dist/ActionBar/ActionBar.js +30 -33
- package/dist/ActionList/Description.js +2 -2
- package/dist/ActionList/Divider.js +1 -1
- package/dist/ActionList/Group.js +12 -12
- package/dist/ActionList/GroupHeadingTrailingAction.js +1 -10
- package/dist/ActionList/Heading.js +1 -1
- package/dist/ActionList/Item.js +19 -19
- package/dist/ActionList/LinkItem.js +4 -4
- package/dist/ActionList/List.js +2 -2
- package/dist/ActionList/Selection.js +6 -6
- package/dist/ActionList/TrailingAction.js +3 -3
- package/dist/ActionList/Visuals.js +9 -9
- package/dist/ActionMenu/ActionMenu.js +8 -11
- package/dist/AnchoredOverlay/AnchoredOverlay.js +4 -4
- package/dist/Autocomplete/Autocomplete.js +3 -3
- package/dist/Autocomplete/AutocompleteInput.js +1 -1
- package/dist/Autocomplete/AutocompleteMenu.js +111 -106
- package/dist/Autocomplete/AutocompleteOverlay.js +2 -2
- package/dist/Avatar/Avatar.js +1 -1
- package/dist/AvatarStack/AvatarStack.js +3 -3
- package/dist/Banner/Banner.js +21 -21
- package/dist/BaseStyles.js +1 -1
- package/dist/Blankslate/Blankslate.js +10 -11
- package/dist/BranchName/BranchName.js +1 -1
- package/dist/Breadcrumbs/Breadcrumbs.js +20 -29
- package/dist/Button/Button.js +1 -1
- package/dist/Button/ButtonBase.js +8 -9
- package/dist/Button/IconButton.js +3 -3
- package/dist/Button/LinkButton.js +1 -1
- package/dist/ButtonGroup/ButtonGroup.js +2 -3
- package/dist/Card/Card.js +16 -16
- package/dist/Checkbox/Checkbox.js +1 -1
- package/dist/CheckboxGroup/CheckboxGroup.js +2 -2
- package/dist/CircleBadge/CircleBadge.js +2 -2
- package/dist/ConfirmationDialog/ConfirmationDialog.js +1 -5
- package/dist/CounterLabel/CounterLabel.js +2 -2
- package/dist/DataTable/DataTable.js +7 -8
- package/dist/DataTable/ErrorDialog.js +1 -1
- package/dist/DataTable/Pagination.js +23 -23
- package/dist/DataTable/Table.js +25 -27
- package/dist/DataTable/TableGroup.js +10 -10
- package/dist/Details/Details.js +2 -2
- package/dist/Dialog/Dialog.js +20 -23
- package/dist/FeatureFlags/FeatureFlags.js +1 -1
- package/dist/FilteredActionList/FilteredActionList.js +18 -19
- package/dist/FilteredActionList/FilteredActionListInput.js +2 -2
- package/dist/FilteredActionList/FilteredActionListLoaders.js +10 -11
- package/dist/Flash/Flash.js +1 -4
- package/dist/FormControl/FormControl.js +8 -8
- package/dist/FormControl/FormControlCaption.js +1 -1
- package/dist/FormControl/FormControlLabel.js +1 -1
- package/dist/FormControl/FormControlLeadingVisual.js +1 -1
- package/dist/FormControl/_FormControlValidation.js +1 -1
- package/dist/Header/Header.js +3 -3
- package/dist/Heading/Heading.js +1 -1
- package/dist/Hidden/Hidden.js +1 -1
- package/dist/InlineMessage/InlineMessage.js +11 -11
- package/dist/KeybindingHint/KeybindingHint.js +3 -3
- package/dist/KeybindingHint/components/Chord.js +3 -3
- package/dist/KeybindingHint/components/Key.js +3 -3
- package/dist/KeybindingHint/components/Sequence.js +1 -1
- package/dist/KeybindingHint/platform.js +0 -8
- package/dist/Label/Label.js +1 -1
- package/dist/LabelGroup/LabelGroup.js +18 -18
- package/dist/Link/Link.js +1 -1
- package/dist/NavList/NavList.js +24 -24
- package/dist/Octicon/Octicon.js +1 -4
- package/dist/Overlay/Overlay.js +3 -3
- package/dist/PageHeader/PageHeader.js +21 -21
- package/dist/PageLayout/DragHandle.js +1 -1
- package/dist/PageLayout/PageLayout.js +26 -26
- package/dist/PageLayout/usePaneWidth.js +0 -5
- package/dist/Pagehead/Pagehead.js +1 -1
- package/dist/Pagination/Pagination.js +9 -10
- package/dist/Popover/Popover.js +3 -3
- package/dist/ProgressBar/ProgressBar.js +3 -3
- package/dist/Radio/Radio.js +1 -1
- package/dist/RadioGroup/RadioGroup.js +2 -2
- package/dist/RelativeTime/RelativeTime.js +1 -1
- package/dist/ScrollableRegion/ScrollableRegion.js +1 -1
- package/dist/SegmentedControl/SegmentedControl.js +13 -13
- package/dist/SegmentedControl/SegmentedControlAction.js +6 -6
- package/dist/SegmentedControl/SegmentedControlButton.js +8 -8
- package/dist/SegmentedControl/SegmentedControlDivider.js +1 -1
- package/dist/SegmentedControl/SegmentedControlIconButton.js +5 -5
- package/dist/Select/Select.js +9 -9
- package/dist/SelectPanel/SelectPanel.js +24 -27
- package/dist/SelectPanel/SelectPanelMessage.js +5 -5
- package/dist/SideNav.js +2 -2
- package/dist/Skeleton/SkeletonBox.js +1 -1
- package/dist/SkeletonAvatar/SkeletonAvatar.js +1 -1
- package/dist/SkeletonText/SkeletonText.js +3 -3
- package/dist/Spinner/Spinner.js +5 -5
- package/dist/SplitPageLayout/SplitPageLayout.js +6 -6
- package/dist/Stack/Stack.js +2 -2
- package/dist/StateLabel/StateLabel.js +2 -2
- package/dist/SubNav/SubNav.js +5 -5
- package/dist/TabNav/TabNav.js +4 -10
- package/dist/Text/Text.js +1 -1
- package/dist/TextInput/TextInput.js +13 -13
- package/dist/TextInputWithTokens/TextInputWithTokens.js +12 -15
- package/dist/Textarea/Textarea.js +7 -7
- package/dist/ThemeProvider.js +1 -2
- package/dist/Timeline/Timeline.js +11 -14
- package/dist/ToggleSwitch/ToggleSwitch.js +18 -18
- package/dist/Token/IssueLabelToken.js +3 -3
- package/dist/Token/Token.js +7 -7
- package/dist/Token/TokenBase.js +1 -1
- package/dist/Token/_RemoveTokenButton.js +4 -5
- package/dist/Token/_TokenTextContainer.js +1 -1
- package/dist/Tooltip/Tooltip.js +2 -5
- package/dist/TooltipV2/Tooltip.js +7 -7
- package/dist/TopicTag/TopicTag.js +1 -1
- package/dist/TopicTag/TopicTagGroup.js +1 -1
- package/dist/TreeView/TreeView.js +52 -59
- package/dist/TreeView/useTypeahead.js +3 -3
- package/dist/Truncate/Truncate.js +1 -2
- package/dist/UnderlineNav/UnderlineNav.js +18 -18
- package/dist/UnderlineNav/UnderlineNavItem.js +2 -2
- package/dist/VisuallyHidden/VisuallyHidden.js +1 -1
- package/dist/_VisuallyHidden.js +1 -1
- package/dist/deprecated/ActionList/Divider.js +1 -1
- package/dist/deprecated/ActionList/Group.js +2 -5
- package/dist/deprecated/ActionList/Header.js +2 -5
- package/dist/deprecated/ActionList/Item.js +17 -20
- package/dist/deprecated/ActionList/List.js +4 -13
- package/dist/deprecated/ActionMenu.js +4 -6
- package/dist/deprecated/DialogV1/Dialog.js +5 -5
- package/dist/deprecated/FilteredSearch/FilteredSearch.js +1 -1
- package/dist/deprecated/UnderlineNav/UnderlineNav.js +4 -4
- package/dist/experimental/IssueLabel/IssueLabel.js +4 -4
- package/dist/experimental/SelectPanel2/SelectPanel.js +42 -49
- package/dist/experimental/Tabs/Tabs.js +1 -1
- package/dist/experimental/UnderlinePanels/UnderlinePanels.js +6 -9
- package/dist/hooks/useMergedRefs.js +0 -12
- package/dist/hooks/useResponsiveValue.js +0 -5
- package/dist/hooks/useSlots.js +0 -48
- package/dist/internal/components/ButtonReset.js +1 -1
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroup.js +9 -9
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupCaption.js +1 -1
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupLabel.js +4 -4
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupValidation.js +1 -1
- package/dist/internal/components/ConditionalWrapper.js +2 -2
- package/dist/internal/components/InputLabel.js +3 -3
- package/dist/internal/components/InputValidation.js +4 -4
- package/dist/internal/components/OverflowObserverProvider.js +1 -1
- package/dist/internal/components/TextInputInnerAction.js +6 -6
- package/dist/internal/components/TextInputInnerVisualSlot.js +5 -5
- package/dist/internal/components/TextInputWrapper.js +2 -2
- package/dist/internal/components/ThemeProviderBase.js +3 -3
- package/dist/internal/components/UnderlineTabbedInterface.js +11 -11
- package/dist/internal/components/UnstyledTextInput.js +1 -1
- package/dist/internal/components/ValidationAnimationContainer.js +2 -2
- package/dist/internal/hooks/useOverflowObserver.js +1 -2
- package/dist/live-region/Announce.js +1 -1
- package/dist/live-region/AriaAlert.js +1 -1
- package/dist/live-region/AriaStatus.js +1 -1
- package/dist/next/ThemeProvider.js +1 -1
- package/dist/utils/descendant-registry.js +1 -7
- package/dist/utils/modern-polymorphic.js +0 -10
- package/package.json +3 -3
|
@@ -15,7 +15,7 @@ function FilteredActionListBodyLoader(t0) {
|
|
|
15
15
|
case FilteredActionListLoadingTypes.bodySpinner: {
|
|
16
16
|
let t1;
|
|
17
17
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
18
|
-
t1 =
|
|
18
|
+
t1 = /* @__PURE__ */ jsx(LoadingSpinner, { "data-testid": "filtered-action-list-spinner" });
|
|
19
19
|
$[0] = t1;
|
|
20
20
|
} else t1 = $[0];
|
|
21
21
|
return t1;
|
|
@@ -24,7 +24,7 @@ function FilteredActionListBodyLoader(t0) {
|
|
|
24
24
|
const rows = height < SKELETON_ROW_HEIGHT ? SKELETON_MIN_ROWS : height / SKELETON_ROW_HEIGHT;
|
|
25
25
|
let t1;
|
|
26
26
|
if ($[1] !== rows) {
|
|
27
|
-
t1 =
|
|
27
|
+
t1 = /* @__PURE__ */ jsx(LoadingSkeleton, {
|
|
28
28
|
"data-testid": "filtered-action-list-skeleton",
|
|
29
29
|
rows
|
|
30
30
|
});
|
|
@@ -36,7 +36,7 @@ function FilteredActionListBodyLoader(t0) {
|
|
|
36
36
|
default: {
|
|
37
37
|
let t1;
|
|
38
38
|
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
39
|
-
t1 =
|
|
39
|
+
t1 = /* @__PURE__ */ jsx(Fragment, {});
|
|
40
40
|
$[3] = t1;
|
|
41
41
|
} else t1 = $[3];
|
|
42
42
|
return t1;
|
|
@@ -53,10 +53,10 @@ function LoadingSpinner(t0) {
|
|
|
53
53
|
} else props = $[1];
|
|
54
54
|
let t1;
|
|
55
55
|
if ($[2] !== props) {
|
|
56
|
-
t1 =
|
|
56
|
+
t1 = /* @__PURE__ */ jsx("div", {
|
|
57
57
|
className: FilteredActionListLoaders_module_css_default.LoadingSpinner,
|
|
58
58
|
"data-component": "FilteredActionList.Spinner",
|
|
59
|
-
children:
|
|
59
|
+
children: /* @__PURE__ */ jsx(Spinner, { ...props })
|
|
60
60
|
});
|
|
61
61
|
$[2] = props;
|
|
62
62
|
$[3] = t1;
|
|
@@ -85,10 +85,10 @@ function LoadingSkeleton(t0) {
|
|
|
85
85
|
} else t2 = $[4];
|
|
86
86
|
let t3;
|
|
87
87
|
if ($[5] !== props || $[6] !== t2) {
|
|
88
|
-
t3 =
|
|
88
|
+
t3 = /* @__PURE__ */ jsx("div", {
|
|
89
89
|
className: FilteredActionListLoaders_module_css_default.LoadingSkeletonContainer,
|
|
90
90
|
"data-component": "FilteredActionList.Skeleton",
|
|
91
|
-
children:
|
|
91
|
+
children: /* @__PURE__ */ jsx(Stack, {
|
|
92
92
|
direction: "vertical",
|
|
93
93
|
justify: "center",
|
|
94
94
|
gap: "condensed",
|
|
@@ -103,20 +103,19 @@ function LoadingSkeleton(t0) {
|
|
|
103
103
|
return t3;
|
|
104
104
|
}
|
|
105
105
|
function _temp(_, i) {
|
|
106
|
-
return
|
|
106
|
+
return /* @__PURE__ */ jsxs(Stack, {
|
|
107
107
|
direction: "horizontal",
|
|
108
108
|
gap: "condensed",
|
|
109
109
|
align: "center",
|
|
110
110
|
className: FilteredActionListLoaders_module_css_default.LoadingSkeletonRow,
|
|
111
|
-
children: [
|
|
111
|
+
children: [/* @__PURE__ */ jsx(SkeletonBox, {
|
|
112
112
|
width: "16px",
|
|
113
113
|
height: "16px"
|
|
114
|
-
}),
|
|
114
|
+
}), /* @__PURE__ */ jsx(SkeletonBox, {
|
|
115
115
|
height: "10px",
|
|
116
116
|
className: FilteredActionListLoaders_module_css_default.LoadingSkeleton
|
|
117
117
|
})]
|
|
118
118
|
}, i);
|
|
119
119
|
}
|
|
120
|
-
_temp.displayName = "_temp";
|
|
121
120
|
//#endregion
|
|
122
121
|
export { FilteredActionListBodyLoader, FilteredActionListLoadingTypes };
|
package/dist/Flash/Flash.js
CHANGED
|
@@ -7,9 +7,6 @@ import { clsx } from "clsx";
|
|
|
7
7
|
/**
|
|
8
8
|
* @deprecated Use `Banner` instead. If migration is not yet possible, import `Flash` from `@primer/react/deprecated`.
|
|
9
9
|
*/
|
|
10
|
-
/**
|
|
11
|
-
* @deprecated Use `Banner` instead. If migration is not yet possible, import `Flash` from `@primer/react/deprecated`.
|
|
12
|
-
*/
|
|
13
10
|
const Flash = /*#__PURE__*/ React.forwardRef(function Flash(t0, ref) {
|
|
14
11
|
const $ = c(15);
|
|
15
12
|
let className;
|
|
@@ -43,7 +40,7 @@ const Flash = /*#__PURE__*/ React.forwardRef(function Flash(t0, ref) {
|
|
|
43
40
|
const t4 = full ? "" : void 0;
|
|
44
41
|
let t5;
|
|
45
42
|
if ($[8] !== BaseComponent || $[9] !== ref || $[10] !== rest || $[11] !== t3 || $[12] !== t4 || $[13] !== variant) {
|
|
46
|
-
t5 =
|
|
43
|
+
t5 = /* @__PURE__ */ jsx(BaseComponent, {
|
|
47
44
|
...rest,
|
|
48
45
|
ref,
|
|
49
46
|
className: t3,
|
|
@@ -92,7 +92,7 @@ var FormControl_default = Object.assign(/* @__PURE__ */ React.forwardRef((t0, re
|
|
|
92
92
|
} else t5 = $[5];
|
|
93
93
|
let t6;
|
|
94
94
|
if ($[6] !== t4 || $[7] !== t5) {
|
|
95
|
-
t6 =
|
|
95
|
+
t6 = /* @__PURE__ */ jsxs("div", {
|
|
96
96
|
className: FormControl_module_css_default.ControlChoiceInputs,
|
|
97
97
|
children: [t4, t5]
|
|
98
98
|
});
|
|
@@ -102,7 +102,7 @@ var FormControl_default = Object.assign(/* @__PURE__ */ React.forwardRef((t0, re
|
|
|
102
102
|
} else t6 = $[8];
|
|
103
103
|
let t7;
|
|
104
104
|
if ($[9] !== disabled || $[10] !== slots.caption || $[11] !== slots.leadingVisual) {
|
|
105
|
-
t7 = slots.leadingVisual ?
|
|
105
|
+
t7 = slots.leadingVisual ? /* @__PURE__ */ jsx("div", {
|
|
106
106
|
className: FormControl_module_css_default.LeadingVisual,
|
|
107
107
|
"data-disabled": disabled ? "" : void 0,
|
|
108
108
|
"data-has-caption": slots.caption ? "" : void 0,
|
|
@@ -115,7 +115,7 @@ var FormControl_default = Object.assign(/* @__PURE__ */ React.forwardRef((t0, re
|
|
|
115
115
|
} else t7 = $[12];
|
|
116
116
|
let t8;
|
|
117
117
|
if ($[13] !== slots.caption || $[14] !== slots.label) {
|
|
118
|
-
t8 =
|
|
118
|
+
t8 = /* @__PURE__ */ jsxs("div", {
|
|
119
119
|
className: FormControl_module_css_default.LabelContainer,
|
|
120
120
|
children: [slots.label, slots.caption]
|
|
121
121
|
});
|
|
@@ -125,7 +125,7 @@ var FormControl_default = Object.assign(/* @__PURE__ */ React.forwardRef((t0, re
|
|
|
125
125
|
} else t8 = $[15];
|
|
126
126
|
let t9;
|
|
127
127
|
if ($[16] !== t6 || $[17] !== t7 || $[18] !== t8) {
|
|
128
|
-
t9 =
|
|
128
|
+
t9 = /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
129
129
|
t6,
|
|
130
130
|
t7,
|
|
131
131
|
t8
|
|
@@ -158,14 +158,14 @@ var FormControl_default = Object.assign(/* @__PURE__ */ React.forwardRef((t0, re
|
|
|
158
158
|
$[26] = validationMessageId;
|
|
159
159
|
$[27] = t11;
|
|
160
160
|
} else t11 = $[27];
|
|
161
|
-
const t12 = isChoiceInput || layout === "horizontal" ?
|
|
161
|
+
const t12 = isChoiceInput || layout === "horizontal" ? /* @__PURE__ */ jsx("div", {
|
|
162
162
|
ref,
|
|
163
163
|
"data-has-leading-visual": slots.leadingVisual ? "" : void 0,
|
|
164
164
|
className: clsx(className, FormControl_module_css_default.ControlHorizontalLayout),
|
|
165
165
|
style,
|
|
166
166
|
"data-component": "FormControl",
|
|
167
167
|
children: InputChildren
|
|
168
|
-
}) :
|
|
168
|
+
}) : /* @__PURE__ */ jsxs("div", {
|
|
169
169
|
ref,
|
|
170
170
|
"data-has-label": !isLabelHidden ? "" : void 0,
|
|
171
171
|
className: clsx(className, FormControl_module_css_default.ControlVerticalLayout),
|
|
@@ -181,7 +181,7 @@ var FormControl_default = Object.assign(/* @__PURE__ */ React.forwardRef((t0, re
|
|
|
181
181
|
"aria-describedby": [validationMessageId, captionId].filter(Boolean).join(" ")
|
|
182
182
|
}, InputComponent.props)),
|
|
183
183
|
childrenWithoutSlots.filter((child_2) => /*#__PURE__*/ React.isValidElement(child_2) && !expectedInputComponents.some((inputComponent_1) => child_2.type === inputComponent_1 || isSlot(child_2, inputComponent_1))),
|
|
184
|
-
slots.validation ?
|
|
184
|
+
slots.validation ? /* @__PURE__ */ jsx(ValidationAnimationContainer, {
|
|
185
185
|
show: true,
|
|
186
186
|
children: slots.validation
|
|
187
187
|
}) : null,
|
|
@@ -190,7 +190,7 @@ var FormControl_default = Object.assign(/* @__PURE__ */ React.forwardRef((t0, re
|
|
|
190
190
|
});
|
|
191
191
|
let t13;
|
|
192
192
|
if ($[28] !== T0 || $[29] !== t11 || $[30] !== t12) {
|
|
193
|
-
t13 =
|
|
193
|
+
t13 = /* @__PURE__ */ jsx(T0, {
|
|
194
194
|
value: t11,
|
|
195
195
|
children: t12
|
|
196
196
|
});
|
|
@@ -19,7 +19,7 @@ function FormControlCaption(t0) {
|
|
|
19
19
|
const t3 = disabled ? "" : void 0;
|
|
20
20
|
let t4;
|
|
21
21
|
if ($[2] !== children || $[3] !== style || $[4] !== t1 || $[5] !== t2 || $[6] !== t3) {
|
|
22
|
-
t4 =
|
|
22
|
+
t4 = /* @__PURE__ */ jsx(Text_default, {
|
|
23
23
|
id: t1,
|
|
24
24
|
className: t2,
|
|
25
25
|
"data-control-disabled": t3,
|
|
@@ -82,7 +82,7 @@ const FormControlLabel = (t0) => {
|
|
|
82
82
|
const labelProps = t2;
|
|
83
83
|
let t3;
|
|
84
84
|
if ($[23] !== children || $[24] !== labelProps) {
|
|
85
|
-
t3 =
|
|
85
|
+
t3 = /* @__PURE__ */ jsx(InputLabel, {
|
|
86
86
|
...labelProps,
|
|
87
87
|
"data-component": "FormControl.Label",
|
|
88
88
|
children
|
|
@@ -11,7 +11,7 @@ const FormControlLeadingVisual = (t0) => {
|
|
|
11
11
|
const t2 = captionId ? "" : void 0;
|
|
12
12
|
let t3;
|
|
13
13
|
if ($[0] !== children || $[1] !== style || $[2] !== t1 || $[3] !== t2) {
|
|
14
|
-
t3 =
|
|
14
|
+
t3 = /* @__PURE__ */ jsx("div", {
|
|
15
15
|
className: FormControlLeadingVisual_module_css_default.LeadingVisual,
|
|
16
16
|
"data-control-disabled": t1,
|
|
17
17
|
style,
|
|
@@ -10,7 +10,7 @@ const FormControlValidation = (t0) => {
|
|
|
10
10
|
const t1 = id || validationMessageId || "";
|
|
11
11
|
let t2;
|
|
12
12
|
if ($[0] !== children || $[1] !== className || $[2] !== style || $[3] !== t1 || $[4] !== variant) {
|
|
13
|
-
t2 =
|
|
13
|
+
t2 = /* @__PURE__ */ jsx(InputValidation, {
|
|
14
14
|
className,
|
|
15
15
|
validationStatus: variant,
|
|
16
16
|
id: t1,
|
package/dist/Header/Header.js
CHANGED
|
@@ -32,7 +32,7 @@ const Header = /*#__PURE__*/ React.forwardRef(function Header(t0, forwardRef) {
|
|
|
32
32
|
} else t2 = $[6];
|
|
33
33
|
let t3;
|
|
34
34
|
if ($[7] !== BaseComponent || $[8] !== children || $[9] !== forwardRef || $[10] !== rest || $[11] !== t2) {
|
|
35
|
-
t3 =
|
|
35
|
+
t3 = /* @__PURE__ */ jsx(BaseComponent, {
|
|
36
36
|
ref: forwardRef,
|
|
37
37
|
className: t2,
|
|
38
38
|
...rest,
|
|
@@ -76,7 +76,7 @@ const HeaderItem = /*#__PURE__*/ React.forwardRef(function HeaderItem(t0, forwar
|
|
|
76
76
|
} else t1 = $[6];
|
|
77
77
|
let t2;
|
|
78
78
|
if ($[7] !== children || $[8] !== forwardRef || $[9] !== full || $[10] !== rest || $[11] !== t1) {
|
|
79
|
-
t2 =
|
|
79
|
+
t2 = /* @__PURE__ */ jsx("div", {
|
|
80
80
|
ref: forwardRef,
|
|
81
81
|
className: t1,
|
|
82
82
|
"data-full": full,
|
|
@@ -122,7 +122,7 @@ const HeaderLink = /*#__PURE__*/ React.forwardRef(function HeaderLink(t0, forwar
|
|
|
122
122
|
} else t2 = $[6];
|
|
123
123
|
let t3;
|
|
124
124
|
if ($[7] !== BaseComponent || $[8] !== children || $[9] !== forwardRef || $[10] !== rest || $[11] !== t2) {
|
|
125
|
-
t3 =
|
|
125
|
+
t3 = /* @__PURE__ */ jsx(BaseComponent, {
|
|
126
126
|
ref: forwardRef,
|
|
127
127
|
className: t2,
|
|
128
128
|
...rest,
|
package/dist/Heading/Heading.js
CHANGED
|
@@ -50,7 +50,7 @@ const Heading = /*#__PURE__*/ forwardRef((t0, forwardedRef) => {
|
|
|
50
50
|
} else t4 = $[8];
|
|
51
51
|
let t5;
|
|
52
52
|
if ($[9] !== Component || $[10] !== mergedRef || $[11] !== props || $[12] !== t4 || $[13] !== variant) {
|
|
53
|
-
t5 =
|
|
53
|
+
t5 = /* @__PURE__ */ jsx(Component, {
|
|
54
54
|
className: t4,
|
|
55
55
|
"data-variant": variant,
|
|
56
56
|
"data-component": "Heading",
|
package/dist/Hidden/Hidden.js
CHANGED
|
@@ -6,25 +6,25 @@ import { isValidElementType } from "react-is";
|
|
|
6
6
|
import { AlertFillIcon, AlertIcon, CheckCircleFillIcon, CheckCircleIcon, InfoIcon } from "@primer/octicons-react";
|
|
7
7
|
//#region src/InlineMessage/InlineMessage.tsx
|
|
8
8
|
const icons = {
|
|
9
|
-
warning:
|
|
10
|
-
critical:
|
|
11
|
-
success:
|
|
12
|
-
unavailable:
|
|
9
|
+
warning: /* @__PURE__ */ jsx(AlertIcon, { className: InlineMessage_module_css_default.InlineMessageIcon }),
|
|
10
|
+
critical: /* @__PURE__ */ jsx(AlertIcon, { className: InlineMessage_module_css_default.InlineMessageIcon }),
|
|
11
|
+
success: /* @__PURE__ */ jsx(CheckCircleIcon, { className: InlineMessage_module_css_default.InlineMessageIcon }),
|
|
12
|
+
unavailable: /* @__PURE__ */ jsx(AlertIcon, { className: InlineMessage_module_css_default.InlineMessageIcon })
|
|
13
13
|
};
|
|
14
14
|
const smallIcons = {
|
|
15
|
-
warning:
|
|
15
|
+
warning: /* @__PURE__ */ jsx(AlertFillIcon, {
|
|
16
16
|
className: InlineMessage_module_css_default.InlineMessageIcon,
|
|
17
17
|
size: 12
|
|
18
18
|
}),
|
|
19
|
-
critical:
|
|
19
|
+
critical: /* @__PURE__ */ jsx(AlertFillIcon, {
|
|
20
20
|
className: InlineMessage_module_css_default.InlineMessageIcon,
|
|
21
21
|
size: 12
|
|
22
22
|
}),
|
|
23
|
-
success:
|
|
23
|
+
success: /* @__PURE__ */ jsx(CheckCircleFillIcon, {
|
|
24
24
|
className: InlineMessage_module_css_default.InlineMessageIcon,
|
|
25
25
|
size: 12
|
|
26
26
|
}),
|
|
27
|
-
unavailable:
|
|
27
|
+
unavailable: /* @__PURE__ */ jsx(AlertFillIcon, {
|
|
28
28
|
className: InlineMessage_module_css_default.InlineMessageIcon,
|
|
29
29
|
size: 12
|
|
30
30
|
})
|
|
@@ -61,7 +61,7 @@ function InlineMessage(t0) {
|
|
|
61
61
|
if (typeof LeadingVisual !== "string" && isValidElementType(LeadingVisual)) {
|
|
62
62
|
let t2;
|
|
63
63
|
if ($[7] !== LeadingVisual) {
|
|
64
|
-
t2 =
|
|
64
|
+
t2 = /* @__PURE__ */ jsx(LeadingVisual, { className: InlineMessage_module_css_default.InlineMessageIcon });
|
|
65
65
|
$[7] = LeadingVisual;
|
|
66
66
|
$[8] = t2;
|
|
67
67
|
} else t2 = $[8];
|
|
@@ -71,7 +71,7 @@ function InlineMessage(t0) {
|
|
|
71
71
|
else {
|
|
72
72
|
let t2;
|
|
73
73
|
if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
|
|
74
|
-
t2 =
|
|
74
|
+
t2 = /* @__PURE__ */ jsx(InfoIcon, { className: InlineMessage_module_css_default.InlineMessageIcon });
|
|
75
75
|
$[9] = t2;
|
|
76
76
|
} else t2 = $[9];
|
|
77
77
|
icon = t2;
|
|
@@ -85,7 +85,7 @@ function InlineMessage(t0) {
|
|
|
85
85
|
const t3 = (_variant = variant) !== null && _variant !== void 0 ? _variant : void 0;
|
|
86
86
|
let t4;
|
|
87
87
|
if ($[12] !== children || $[13] !== icon || $[14] !== rest || $[15] !== size || $[16] !== t2 || $[17] !== t3) {
|
|
88
|
-
t4 =
|
|
88
|
+
t4 = /* @__PURE__ */ jsxs("div", {
|
|
89
89
|
...rest,
|
|
90
90
|
className: t2,
|
|
91
91
|
"data-size": size,
|
|
@@ -18,7 +18,7 @@ const Kbd = (t0) => {
|
|
|
18
18
|
} else t1 = $[1];
|
|
19
19
|
let t2;
|
|
20
20
|
if ($[2] !== children || $[3] !== t1) {
|
|
21
|
-
t2 =
|
|
21
|
+
t2 = /* @__PURE__ */ jsx(Text_default, {
|
|
22
22
|
as: "kbd",
|
|
23
23
|
className: t1,
|
|
24
24
|
"data-testid": "keybinding-hint",
|
|
@@ -47,13 +47,13 @@ const KeybindingHint = /*#__PURE__*/ memo((t0) => {
|
|
|
47
47
|
}
|
|
48
48
|
let t1;
|
|
49
49
|
if ($[3] !== props) {
|
|
50
|
-
t1 =
|
|
50
|
+
t1 = /* @__PURE__ */ jsx(Sequence, { ...props });
|
|
51
51
|
$[3] = props;
|
|
52
52
|
$[4] = t1;
|
|
53
53
|
} else t1 = $[4];
|
|
54
54
|
let t2;
|
|
55
55
|
if ($[5] !== className || $[6] !== t1) {
|
|
56
|
-
t2 =
|
|
56
|
+
t2 = /* @__PURE__ */ jsx(Kbd, {
|
|
57
57
|
className,
|
|
58
58
|
children: t1
|
|
59
59
|
});
|
|
@@ -35,10 +35,10 @@ const Chord = (t0) => {
|
|
|
35
35
|
if ($[5] !== format || $[6] !== keys) {
|
|
36
36
|
let t10;
|
|
37
37
|
if ($[8] !== format) {
|
|
38
|
-
t10 = (k, i) =>
|
|
38
|
+
t10 = (k, i) => /* @__PURE__ */ jsxs(Fragment, { children: [i > 0 && format === "full" ? /* @__PURE__ */ jsx("span", {
|
|
39
39
|
"aria-hidden": true,
|
|
40
40
|
children: " + "
|
|
41
|
-
}) : " ",
|
|
41
|
+
}) : " ", /* @__PURE__ */ jsx(Key, {
|
|
42
42
|
name: k,
|
|
43
43
|
format
|
|
44
44
|
})] }, i);
|
|
@@ -52,7 +52,7 @@ const Chord = (t0) => {
|
|
|
52
52
|
} else t9 = $[7];
|
|
53
53
|
let t10;
|
|
54
54
|
if ($[10] !== t8 || $[11] !== t9) {
|
|
55
|
-
t10 =
|
|
55
|
+
t10 = /* @__PURE__ */ jsx(Text_default, {
|
|
56
56
|
"data-kbd-chord": true,
|
|
57
57
|
className: t8,
|
|
58
58
|
children: t9
|
|
@@ -18,7 +18,7 @@ const Key = (t0) => {
|
|
|
18
18
|
} else t1 = $[2];
|
|
19
19
|
let t2;
|
|
20
20
|
if ($[3] !== t1) {
|
|
21
|
-
t2 =
|
|
21
|
+
t2 = /* @__PURE__ */ jsx(VisuallyHidden, { children: t1 });
|
|
22
22
|
$[3] = t1;
|
|
23
23
|
$[4] = t2;
|
|
24
24
|
} else t2 = $[4];
|
|
@@ -32,7 +32,7 @@ const Key = (t0) => {
|
|
|
32
32
|
} else t3 = $[8];
|
|
33
33
|
let t4;
|
|
34
34
|
if ($[9] !== t3) {
|
|
35
|
-
t4 =
|
|
35
|
+
t4 = /* @__PURE__ */ jsx("span", {
|
|
36
36
|
"aria-hidden": true,
|
|
37
37
|
children: t3
|
|
38
38
|
});
|
|
@@ -41,7 +41,7 @@ const Key = (t0) => {
|
|
|
41
41
|
} else t4 = $[10];
|
|
42
42
|
let t5;
|
|
43
43
|
if ($[11] !== t2 || $[12] !== t4) {
|
|
44
|
-
t5 =
|
|
44
|
+
t5 = /* @__PURE__ */ jsxs(Fragment, { children: [t2, t4] });
|
|
45
45
|
$[11] = t2;
|
|
46
46
|
$[12] = t4;
|
|
47
47
|
$[13] = t5;
|
|
@@ -4,7 +4,7 @@ import { Fragment } from "react";
|
|
|
4
4
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
//#region src/KeybindingHint/components/Sequence.tsx
|
|
6
6
|
const splitSequence = (sequence) => sequence.split(" ");
|
|
7
|
-
const Sequence = ({ keys, ...chordProps }) => splitSequence(keys).map((c, i) =>
|
|
7
|
+
const Sequence = ({ keys, ...chordProps }) => splitSequence(keys).map((c, i) => /* @__PURE__ */ jsxs(Fragment, { children: [i > 0 && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(VisuallyHidden, { children: "then" }), " "] }), /* @__PURE__ */ jsx(Chord, {
|
|
8
8
|
keys: c,
|
|
9
9
|
...chordProps
|
|
10
10
|
})] }, i));
|
|
@@ -1,14 +1,6 @@
|
|
|
1
1
|
import { createContext, useContext, useSyncExternalStore } from "react";
|
|
2
2
|
import { isMacOS } from "@primer/behaviors/utils";
|
|
3
3
|
//#region src/KeybindingHint/platform.ts
|
|
4
|
-
/**
|
|
5
|
-
* The platform categories that affect how keyboard shortcut keys are displayed.
|
|
6
|
-
*
|
|
7
|
-
* - `apple`: Apple platforms (macOS and iOS/iPadOS), which use the Command and Option keys.
|
|
8
|
-
* - `windows`: Windows, which uses the Windows (Meta) key.
|
|
9
|
-
* - `other`: Any other platform (e.g. Linux, Android), where the Meta key does not map to a
|
|
10
|
-
* consistent label.
|
|
11
|
-
*/
|
|
12
4
|
const subscribe = () => () => {};
|
|
13
5
|
/** SSR-unsafe detection of iOS/iPadOS (in addition to macOS, which is detected separately). */
|
|
14
6
|
const ssrUnsafeIsIOS = () => {
|
package/dist/Label/Label.js
CHANGED
|
@@ -37,7 +37,7 @@ const Label = /*#__PURE__*/ React.forwardRef(function Label(t0, ref) {
|
|
|
37
37
|
} else t4 = $[7];
|
|
38
38
|
let t5;
|
|
39
39
|
if ($[8] !== Component || $[9] !== ref || $[10] !== rest || $[11] !== size || $[12] !== t4 || $[13] !== variant) {
|
|
40
|
-
t5 =
|
|
40
|
+
t5 = /* @__PURE__ */ jsx(Component, {
|
|
41
41
|
className: t4,
|
|
42
42
|
"data-size": size,
|
|
43
43
|
"data-variant": variant,
|
|
@@ -13,27 +13,27 @@ const getOverlayWidth = (buttonClientRect, containerRef, overlayPaddingPx) => {
|
|
|
13
13
|
var _containerRef$current;
|
|
14
14
|
return overlayPaddingPx + buttonClientRect.right - (((_containerRef$current = containerRef.current) === null || _containerRef$current === void 0 ? void 0 : _containerRef$current.getBoundingClientRect().left) || 0);
|
|
15
15
|
};
|
|
16
|
-
const InlineToggle = ({ collapseButtonRef, collapseInlineExpandedChildren, expandButtonRef, hiddenItemIds, isOverflowShown, showAllTokensInline }) => isOverflowShown ?
|
|
16
|
+
const InlineToggle = ({ collapseButtonRef, collapseInlineExpandedChildren, expandButtonRef, hiddenItemIds, isOverflowShown, showAllTokensInline }) => isOverflowShown ? /* @__PURE__ */ jsx(ButtonComponent, {
|
|
17
17
|
ref: collapseButtonRef,
|
|
18
18
|
onClick: collapseInlineExpandedChildren,
|
|
19
19
|
size: "small",
|
|
20
20
|
variant: "invisible",
|
|
21
21
|
children: "Show less"
|
|
22
|
-
}) : hiddenItemIds.length ?
|
|
22
|
+
}) : hiddenItemIds.length ? /* @__PURE__ */ jsxs(ButtonComponent, {
|
|
23
23
|
ref: expandButtonRef,
|
|
24
24
|
variant: "invisible",
|
|
25
25
|
size: "small",
|
|
26
26
|
onClick: showAllTokensInline,
|
|
27
|
-
children: [
|
|
27
|
+
children: [/* @__PURE__ */ jsxs(VisuallyHidden, { children: [
|
|
28
28
|
"Show +",
|
|
29
29
|
hiddenItemIds.length,
|
|
30
30
|
" more"
|
|
31
|
-
] }),
|
|
31
|
+
] }), /* @__PURE__ */ jsxs("span", {
|
|
32
32
|
"aria-hidden": "true",
|
|
33
33
|
children: ["+", hiddenItemIds.length]
|
|
34
34
|
})]
|
|
35
35
|
}) : null;
|
|
36
|
-
const OverlayToggle = ({ children, closeOverflowOverlay, expandButtonRef, hiddenItemIds, isOverflowShown, openOverflowOverlay, overlayPaddingPx, overlayWidth, totalLength }) => hiddenItemIds.length ?
|
|
36
|
+
const OverlayToggle = ({ children, closeOverflowOverlay, expandButtonRef, hiddenItemIds, isOverflowShown, openOverflowOverlay, overlayPaddingPx, overlayWidth, totalLength }) => hiddenItemIds.length ? /* @__PURE__ */ jsx(AnchoredOverlay, {
|
|
37
37
|
open: isOverflowShown,
|
|
38
38
|
onOpen: openOverflowOverlay,
|
|
39
39
|
onClose: closeOverflowOverlay,
|
|
@@ -44,16 +44,16 @@ const OverlayToggle = ({ children, closeOverflowOverlay, expandButtonRef, hidden
|
|
|
44
44
|
anchorRef: expandButtonRef,
|
|
45
45
|
anchorOffset: overlayPaddingPx * -1,
|
|
46
46
|
alignmentOffset: overlayPaddingPx * -1,
|
|
47
|
-
renderAnchor: (props) =>
|
|
47
|
+
renderAnchor: (props) => /* @__PURE__ */ jsxs(ButtonComponent, {
|
|
48
48
|
variant: "invisible",
|
|
49
49
|
size: "small",
|
|
50
50
|
...props,
|
|
51
51
|
ref: expandButtonRef,
|
|
52
|
-
children: [
|
|
52
|
+
children: [/* @__PURE__ */ jsxs(VisuallyHidden, { children: [
|
|
53
53
|
"Show +",
|
|
54
54
|
hiddenItemIds.length,
|
|
55
55
|
" more"
|
|
56
|
-
] }),
|
|
56
|
+
] }), /* @__PURE__ */ jsxs("span", {
|
|
57
57
|
"aria-hidden": "true",
|
|
58
58
|
children: ["+", hiddenItemIds.length]
|
|
59
59
|
})]
|
|
@@ -64,16 +64,16 @@ const OverlayToggle = ({ children, closeOverflowOverlay, expandButtonRef, hidden
|
|
|
64
64
|
"aria-label": `All ${totalLength} labels`,
|
|
65
65
|
"aria-modal": true
|
|
66
66
|
},
|
|
67
|
-
children:
|
|
67
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
68
68
|
className: LabelGroup_module_css_default.OverlayContainer,
|
|
69
69
|
style: {
|
|
70
70
|
width: overlayWidth,
|
|
71
71
|
padding: `${overlayPaddingPx}px`
|
|
72
72
|
},
|
|
73
|
-
children: [
|
|
73
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
74
74
|
className: LabelGroup_module_css_default.OverlayInner,
|
|
75
75
|
children
|
|
76
|
-
}),
|
|
76
|
+
}), /* @__PURE__ */ jsx(IconButton, {
|
|
77
77
|
onClick: closeOverflowOverlay,
|
|
78
78
|
icon: XIcon,
|
|
79
79
|
"aria-label": "Close",
|
|
@@ -192,19 +192,19 @@ const LabelGroup = ({ children, visibleChildCount, overflowStyle = "overlay", as
|
|
|
192
192
|
const isList = Component === "ul" || Component === "ol";
|
|
193
193
|
const ToggleWrapper = isList ? "li" : "span";
|
|
194
194
|
const ItemWrapperComponent = isList ? "li" : "span";
|
|
195
|
-
return visibleChildCount ?
|
|
195
|
+
return visibleChildCount ? /* @__PURE__ */ jsxs(Component, {
|
|
196
196
|
ref: containerRef,
|
|
197
197
|
"data-overflow": overflowStyle === "inline" && isOverflowShown ? "inline" : void 0,
|
|
198
198
|
"data-list": isList || void 0,
|
|
199
199
|
className: clsx(className, LabelGroup_module_css_default.Container),
|
|
200
200
|
"data-component": "LabelGroup",
|
|
201
|
-
children: [React.Children.map(children, (child, index) =>
|
|
201
|
+
children: [React.Children.map(children, (child, index) => /* @__PURE__ */ jsx(ItemWrapperComponent, {
|
|
202
202
|
"data-index": index,
|
|
203
203
|
className: clsx(LabelGroup_module_css_default.ItemWrapper, { [LabelGroup_module_css_default["ItemWrapper--hidden"]]: hiddenItemIds.includes(index.toString()) }),
|
|
204
204
|
children: child
|
|
205
|
-
}, index)),
|
|
205
|
+
}, index)), /* @__PURE__ */ jsx(ToggleWrapper, {
|
|
206
206
|
"data-component": "LabelGroup.Toggle",
|
|
207
|
-
children: overflowStyle === "inline" ?
|
|
207
|
+
children: overflowStyle === "inline" ? /* @__PURE__ */ jsx(InlineToggle, {
|
|
208
208
|
collapseButtonRef,
|
|
209
209
|
collapseInlineExpandedChildren,
|
|
210
210
|
expandButtonRef,
|
|
@@ -212,7 +212,7 @@ const LabelGroup = ({ children, visibleChildCount, overflowStyle = "overlay", as
|
|
|
212
212
|
isOverflowShown,
|
|
213
213
|
showAllTokensInline,
|
|
214
214
|
totalLength: React.Children.toArray(children).length
|
|
215
|
-
}) :
|
|
215
|
+
}) : /* @__PURE__ */ jsx(OverlayToggle, {
|
|
216
216
|
closeOverflowOverlay,
|
|
217
217
|
expandButtonRef,
|
|
218
218
|
hiddenItemIds,
|
|
@@ -224,13 +224,13 @@ const LabelGroup = ({ children, visibleChildCount, overflowStyle = "overlay", as
|
|
|
224
224
|
children
|
|
225
225
|
})
|
|
226
226
|
})]
|
|
227
|
-
}) :
|
|
227
|
+
}) : /* @__PURE__ */ jsx(Component, {
|
|
228
228
|
"data-overflow": "inline",
|
|
229
229
|
"data-list": isList || void 0,
|
|
230
230
|
className: clsx(className, LabelGroup_module_css_default.Container),
|
|
231
231
|
"data-component": "LabelGroup",
|
|
232
232
|
children: isList ? React.Children.map(children, (child, index) => {
|
|
233
|
-
return
|
|
233
|
+
return /* @__PURE__ */ jsx("li", { children: child }, index);
|
|
234
234
|
}) : children
|
|
235
235
|
});
|
|
236
236
|
};
|
package/dist/Link/Link.js
CHANGED
|
@@ -60,7 +60,7 @@ const UnwrappedLink = (props, ref) => {
|
|
|
60
60
|
const t4 = mergedRef;
|
|
61
61
|
let t5;
|
|
62
62
|
if ($[10] !== Component || $[11] !== inline || $[12] !== muted || $[13] !== restProps || $[14] !== t3 || $[15] !== t4) {
|
|
63
|
-
t5 =
|
|
63
|
+
t5 = /* @__PURE__ */ jsx(Component, {
|
|
64
64
|
className: t3,
|
|
65
65
|
"data-component": "Link",
|
|
66
66
|
"data-muted": muted,
|