@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
|
@@ -9,9 +9,6 @@ import { isValidElementType } from "react-is";
|
|
|
9
9
|
import { CheckIcon } from "@primer/octicons-react";
|
|
10
10
|
//#region src/deprecated/ActionList/Item.tsx
|
|
11
11
|
/**
|
|
12
|
-
* Contract for props passed to the `Item` component.
|
|
13
|
-
*/
|
|
14
|
-
/**
|
|
15
12
|
* An actionable or selectable `Item` with an optional icon and description.
|
|
16
13
|
*/
|
|
17
14
|
const Item = /*#__PURE__*/ React.forwardRef((itemProps, ref) => {
|
|
@@ -138,9 +135,9 @@ const Item = /*#__PURE__*/ React.forwardRef((itemProps, ref) => {
|
|
|
138
135
|
} else t11 = $[34];
|
|
139
136
|
let t12;
|
|
140
137
|
if ($[35] !== selected || $[36] !== selectionVariant) {
|
|
141
|
-
t12 = !!selected === selected &&
|
|
138
|
+
t12 = !!selected === selected && /* @__PURE__ */ jsx("div", {
|
|
142
139
|
className: Item_module_css_default.BaseVisualContainer,
|
|
143
|
-
children: selectionVariant === "multiple" ?
|
|
140
|
+
children: selectionVariant === "multiple" ? /* @__PURE__ */ jsx(Fragment$1, { children: /* @__PURE__ */ jsxs("svg", {
|
|
144
141
|
className: Item_module_css_default.MultiSelectIcon,
|
|
145
142
|
"data-selected": selected ? "" : void 0,
|
|
146
143
|
width: "16",
|
|
@@ -148,18 +145,18 @@ const Item = /*#__PURE__*/ React.forwardRef((itemProps, ref) => {
|
|
|
148
145
|
viewBox: "0 0 16 16",
|
|
149
146
|
xmlns: "http://www.w3.org/2000/svg",
|
|
150
147
|
"aria-hidden": "true",
|
|
151
|
-
children: [
|
|
148
|
+
children: [/* @__PURE__ */ jsx("rect", {
|
|
152
149
|
x: "2",
|
|
153
150
|
y: "2",
|
|
154
151
|
width: "12",
|
|
155
152
|
height: "12",
|
|
156
153
|
rx: "4"
|
|
157
|
-
}),
|
|
154
|
+
}), /* @__PURE__ */ jsx("path", {
|
|
158
155
|
fillRule: "evenodd",
|
|
159
156
|
strokeWidth: "0",
|
|
160
157
|
d: "M4.03231 8.69862C3.84775 8.20646 4.49385 7.77554 4.95539 7.77554C5.41693 7.77554 6.80154 9.85246 6.80154 9.85246C6.80154 9.85246 10.2631 4.314 10.4938 4.08323C10.7246 3.85246 11.8785 4.08323 11.4169 5.00631C11.0081 5.82388 7.26308 11.4678 7.26308 11.4678C7.26308 11.4678 6.80154 12.1602 6.34 11.4678C5.87846 10.7755 4.21687 9.19077 4.03231 8.69862Z"
|
|
161
158
|
})]
|
|
162
|
-
}) }) : selected &&
|
|
159
|
+
}) }) : selected && /* @__PURE__ */ jsx(CheckIcon, { fill: "var(--fgColor-default)" })
|
|
163
160
|
});
|
|
164
161
|
$[35] = selected;
|
|
165
162
|
$[36] = selectionVariant;
|
|
@@ -167,11 +164,11 @@ const Item = /*#__PURE__*/ React.forwardRef((itemProps, ref) => {
|
|
|
167
164
|
} else t12 = $[37];
|
|
168
165
|
let t13;
|
|
169
166
|
if ($[38] !== LeadingVisual || $[39] !== disabled || $[40] !== variant) {
|
|
170
|
-
t13 = LeadingVisual &&
|
|
167
|
+
t13 = LeadingVisual && /* @__PURE__ */ jsx("div", {
|
|
171
168
|
className: Item_module_css_default.LeadingVisualContainer,
|
|
172
169
|
"data-variant": variant,
|
|
173
170
|
"data-disabled": disabled ? "" : void 0,
|
|
174
|
-
children:
|
|
171
|
+
children: /* @__PURE__ */ jsx(LeadingVisual, {})
|
|
175
172
|
});
|
|
176
173
|
$[38] = LeadingVisual;
|
|
177
174
|
$[39] = disabled;
|
|
@@ -188,7 +185,7 @@ const Item = /*#__PURE__*/ React.forwardRef((itemProps, ref) => {
|
|
|
188
185
|
const t16 = t15;
|
|
189
186
|
let t17;
|
|
190
187
|
if ($[44] !== labelId || $[45] !== text) {
|
|
191
|
-
t17 = text ?
|
|
188
|
+
t17 = text ? /* @__PURE__ */ jsx("span", {
|
|
192
189
|
id: labelId,
|
|
193
190
|
children: text
|
|
194
191
|
}) : null;
|
|
@@ -198,14 +195,14 @@ const Item = /*#__PURE__*/ React.forwardRef((itemProps, ref) => {
|
|
|
198
195
|
} else t17 = $[46];
|
|
199
196
|
let t18;
|
|
200
197
|
if ($[47] !== description || $[48] !== descriptionId || $[49] !== descriptionVariant) {
|
|
201
|
-
t18 = description ?
|
|
198
|
+
t18 = description ? /* @__PURE__ */ jsx("span", {
|
|
202
199
|
id: descriptionId,
|
|
203
200
|
style: {
|
|
204
201
|
"--description-container-margin-left": descriptionVariant === "inline" ? "var(--base-size-8)" : 0,
|
|
205
202
|
"--description-container-flex-basis": descriptionVariant === "inline" ? 0 : "auto"
|
|
206
203
|
},
|
|
207
204
|
className: Item_module_css_default.DescriptionContainer,
|
|
208
|
-
children: descriptionVariant === "block" ? description :
|
|
205
|
+
children: descriptionVariant === "block" ? description : /* @__PURE__ */ jsx(Truncate_default, {
|
|
209
206
|
title: description,
|
|
210
207
|
inline: true,
|
|
211
208
|
maxWidth: "100%",
|
|
@@ -219,7 +216,7 @@ const Item = /*#__PURE__*/ React.forwardRef((itemProps, ref) => {
|
|
|
219
216
|
} else t18 = $[50];
|
|
220
217
|
let t19;
|
|
221
218
|
if ($[51] !== children || $[52] !== t16 || $[53] !== t17 || $[54] !== t18) {
|
|
222
|
-
t19 =
|
|
219
|
+
t19 = /* @__PURE__ */ jsxs("div", {
|
|
223
220
|
style: t16,
|
|
224
221
|
className: Item_module_css_default.MainContent,
|
|
225
222
|
children: [
|
|
@@ -236,16 +233,16 @@ const Item = /*#__PURE__*/ React.forwardRef((itemProps, ref) => {
|
|
|
236
233
|
} else t19 = $[55];
|
|
237
234
|
let t20;
|
|
238
235
|
if ($[56] !== TrailingIcon || $[57] !== TrailingVisual || $[58] !== disabled || $[59] !== trailingText || $[60] !== variant) {
|
|
239
|
-
t20 = TrailingVisual ?
|
|
236
|
+
t20 = TrailingVisual ? /* @__PURE__ */ jsx("div", {
|
|
240
237
|
className: Item_module_css_default.TrailingContent,
|
|
241
238
|
"data-variant": variant,
|
|
242
239
|
"data-disabled": disabled ? "" : void 0,
|
|
243
|
-
children: typeof TrailingVisual !== "string" && isValidElementType(TrailingVisual) ?
|
|
244
|
-
}) : TrailingIcon || trailingText ?
|
|
240
|
+
children: typeof TrailingVisual !== "string" && isValidElementType(TrailingVisual) ? /* @__PURE__ */ jsx(TrailingVisual, {}) : TrailingVisual
|
|
241
|
+
}) : TrailingIcon || trailingText ? /* @__PURE__ */ jsxs("div", {
|
|
245
242
|
className: Item_module_css_default.TrailingContent,
|
|
246
243
|
"data-variant": variant,
|
|
247
244
|
"data-disabled": disabled ? "" : void 0,
|
|
248
|
-
children: [trailingText, TrailingIcon &&
|
|
245
|
+
children: [trailingText, TrailingIcon && /* @__PURE__ */ jsx(TrailingIcon, {})]
|
|
249
246
|
}) : null;
|
|
250
247
|
$[56] = TrailingIcon;
|
|
251
248
|
$[57] = TrailingVisual;
|
|
@@ -256,7 +253,7 @@ const Item = /*#__PURE__*/ React.forwardRef((itemProps, ref) => {
|
|
|
256
253
|
} else t20 = $[61];
|
|
257
254
|
let t21;
|
|
258
255
|
if ($[62] !== t19 || $[63] !== t20) {
|
|
259
|
-
t21 =
|
|
256
|
+
t21 = /* @__PURE__ */ jsxs("div", {
|
|
260
257
|
className: Item_module_css_default.DividedContent,
|
|
261
258
|
"data-component": "ActionList.DividedContent",
|
|
262
259
|
children: [t19, t20]
|
|
@@ -267,7 +264,7 @@ const Item = /*#__PURE__*/ React.forwardRef((itemProps, ref) => {
|
|
|
267
264
|
} else t21 = $[64];
|
|
268
265
|
let t22;
|
|
269
266
|
if ($[65] !== Component || $[66] !== clickHandler || $[67] !== id || $[68] !== keyPressHandler || $[69] !== props || $[70] !== ref || $[71] !== selected || $[72] !== t11 || $[73] !== t12 || $[74] !== t13 || $[75] !== t21 || $[76] !== t5 || $[77] !== t6 || $[78] !== t7 || $[79] !== t8 || $[80] !== variant) {
|
|
270
|
-
t22 =
|
|
267
|
+
t22 = /* @__PURE__ */ jsxs(Component, {
|
|
271
268
|
ref,
|
|
272
269
|
tabIndex: t5,
|
|
273
270
|
"data-variant": variant,
|
|
@@ -8,21 +8,12 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
8
8
|
import { clsx } from "clsx";
|
|
9
9
|
//#region src/deprecated/ActionList/List.tsx
|
|
10
10
|
/**
|
|
11
|
-
* Contract for props passed to the `List` component.
|
|
12
|
-
*/
|
|
13
|
-
/**
|
|
14
|
-
* Contract for props passed to the `List` component, when its `Item`s are collected in `Group`s.
|
|
15
|
-
*/
|
|
16
|
-
/**
|
|
17
11
|
* Asserts that the given value fulfills the `GroupedListProps` contract.
|
|
18
12
|
* @param props A value which fulfills either the `ListPropsBase` or the `GroupedListProps` contract.
|
|
19
13
|
*/
|
|
20
14
|
function isGroupedListProps(props) {
|
|
21
15
|
return "groupMetadata" in props;
|
|
22
16
|
}
|
|
23
|
-
/**
|
|
24
|
-
* Contract for props passed to the `List` component.
|
|
25
|
-
*/
|
|
26
17
|
const listStyles = {
|
|
27
18
|
fontSize: "var(--text-body-size-medium, 14px)",
|
|
28
19
|
lineHeight: "20px"
|
|
@@ -60,7 +51,7 @@ const List = /*#__PURE__*/ React.forwardRef((props, forwardedRef) => {
|
|
|
60
51
|
const renderGroup = (groupProps) => {
|
|
61
52
|
var _ref;
|
|
62
53
|
const GroupComponent = ((_ref = "renderGroup" in groupProps && groupProps.renderGroup) !== null && _ref !== void 0 ? _ref : restProps.renderGroup) || Group;
|
|
63
|
-
return
|
|
54
|
+
return /* @__PURE__ */ createElement(GroupComponent, {
|
|
64
55
|
...groupProps,
|
|
65
56
|
key: groupProps.groupId
|
|
66
57
|
});
|
|
@@ -69,7 +60,7 @@ const List = /*#__PURE__*/ React.forwardRef((props, forwardedRef) => {
|
|
|
69
60
|
var _ref2, _ref3, _itemProps$id;
|
|
70
61
|
const ItemComponent = "renderItem" in itemProps && itemProps.renderItem || restProps.renderItem || Item;
|
|
71
62
|
const key = (_ref2 = (_ref3 = "key" in itemProps ? itemProps.key : void 0) !== null && _ref3 !== void 0 ? _ref3 : (_itemProps$id = itemProps.id) === null || _itemProps$id === void 0 ? void 0 : _itemProps$id.toString()) !== null && _ref2 !== void 0 ? _ref2 : itemIndex.toString();
|
|
72
|
-
return
|
|
63
|
+
return /* @__PURE__ */ createElement(ItemComponent, {
|
|
73
64
|
showDivider: restProps.showItemDividers,
|
|
74
65
|
selectionVariant: restProps.selectionVariant,
|
|
75
66
|
...itemProps,
|
|
@@ -132,7 +123,7 @@ const List = /*#__PURE__*/ React.forwardRef((props, forwardedRef) => {
|
|
|
132
123
|
const { header, ...groupProps_0 } = t3;
|
|
133
124
|
const hasFilledHeader = (header === null || header === void 0 ? void 0 : header.variant) === "filled";
|
|
134
125
|
const shouldShowDivider = index_0 > 0 && !hasFilledHeader;
|
|
135
|
-
return
|
|
126
|
+
return /* @__PURE__ */ jsxs(React.Fragment, { children: [shouldShowDivider ? /* @__PURE__ */ jsx(Divider, {}, `${groupProps_0.groupId}-divider`) : null, renderGroup({
|
|
136
127
|
style: {
|
|
137
128
|
...index_0 === 0 && firstGroupStyle,
|
|
138
129
|
...index_0 === groups.length - 1 && lastGroupStyle,
|
|
@@ -147,7 +138,7 @@ const List = /*#__PURE__*/ React.forwardRef((props, forwardedRef) => {
|
|
|
147
138
|
});
|
|
148
139
|
let t5;
|
|
149
140
|
if ($[8] !== forwardedRef || $[9] !== restProps || $[10] !== t0 || $[11] !== t2 || $[12] !== t4) {
|
|
150
|
-
t5 =
|
|
141
|
+
t5 = /* @__PURE__ */ jsx("div", {
|
|
151
142
|
...restProps,
|
|
152
143
|
ref: forwardedRef,
|
|
153
144
|
className: t0,
|
|
@@ -6,14 +6,13 @@ import { AnchoredOverlay } from "../AnchoredOverlay/AnchoredOverlay.js";
|
|
|
6
6
|
import { Item } from "./ActionList/Item.js";
|
|
7
7
|
import { Divider } from "./ActionList/Divider.js";
|
|
8
8
|
import { List } from "./ActionList/List.js";
|
|
9
|
-
import "react";
|
|
10
9
|
import { jsx } from "react/jsx-runtime";
|
|
11
10
|
//#region src/deprecated/ActionMenu.tsx
|
|
12
11
|
const ActionMenuItem = (props) => {
|
|
13
12
|
const $ = c(2);
|
|
14
13
|
let t0;
|
|
15
14
|
if ($[0] !== props) {
|
|
16
|
-
t0 =
|
|
15
|
+
t0 = /* @__PURE__ */ jsx(Item, {
|
|
17
16
|
role: "menuitem",
|
|
18
17
|
...props
|
|
19
18
|
});
|
|
@@ -23,8 +22,7 @@ const ActionMenuItem = (props) => {
|
|
|
23
22
|
return t0;
|
|
24
23
|
};
|
|
25
24
|
ActionMenuItem.displayName = "ActionMenu.Item";
|
|
26
|
-
const defaultRenderAnchor = (props) =>
|
|
27
|
-
defaultRenderAnchor.displayName = "defaultRenderAnchor";
|
|
25
|
+
const defaultRenderAnchor = (props) => /* @__PURE__ */ jsx(ButtonComponent, { ...props });
|
|
28
26
|
const ActionMenuBase = (t0) => {
|
|
29
27
|
const $ = c(35);
|
|
30
28
|
let anchorContent;
|
|
@@ -123,7 +121,7 @@ const ActionMenuBase = (t0) => {
|
|
|
123
121
|
const itemsToRender = t5;
|
|
124
122
|
let t6;
|
|
125
123
|
if ($[24] !== itemsToRender || $[25] !== listProps) {
|
|
126
|
-
t6 =
|
|
124
|
+
t6 = /* @__PURE__ */ jsx(List, {
|
|
127
125
|
...listProps,
|
|
128
126
|
role: "menu",
|
|
129
127
|
items: itemsToRender
|
|
@@ -134,7 +132,7 @@ const ActionMenuBase = (t0) => {
|
|
|
134
132
|
} else t6 = $[26];
|
|
135
133
|
let t7;
|
|
136
134
|
if ($[27] !== anchorRef || $[28] !== combinedOpenState || $[29] !== onClose || $[30] !== onOpen || $[31] !== overlayProps || $[32] !== renderMenuAnchor || $[33] !== t6) {
|
|
137
|
-
t7 =
|
|
135
|
+
t7 = /* @__PURE__ */ jsx(AnchoredOverlay, {
|
|
138
136
|
renderAnchor: renderMenuAnchor,
|
|
139
137
|
anchorRef,
|
|
140
138
|
open: combinedOpenState,
|
|
@@ -32,7 +32,7 @@ function DialogHeader(t0) {
|
|
|
32
32
|
if (React.Children.toArray(children).every(_temp)) {
|
|
33
33
|
let t2;
|
|
34
34
|
if ($[5] !== children) {
|
|
35
|
-
t2 =
|
|
35
|
+
t2 = /* @__PURE__ */ jsx("span", {
|
|
36
36
|
className: Dialog_module_css_default.HeaderChild,
|
|
37
37
|
children
|
|
38
38
|
});
|
|
@@ -50,7 +50,7 @@ function DialogHeader(t0) {
|
|
|
50
50
|
} else t3 = $[8];
|
|
51
51
|
let t4;
|
|
52
52
|
if ($[9] !== Component || $[10] !== children || $[11] !== rest || $[12] !== t3) {
|
|
53
|
-
t4 =
|
|
53
|
+
t4 = /* @__PURE__ */ jsx(Component, {
|
|
54
54
|
...t2,
|
|
55
55
|
className: t3,
|
|
56
56
|
children
|
|
@@ -134,10 +134,10 @@ const Dialog = /*#__PURE__*/ forwardRef((t0, forwardedRef) => {
|
|
|
134
134
|
const { getDialogProps } = useDialog(t4);
|
|
135
135
|
let t5;
|
|
136
136
|
if ($[17] !== Component || $[18] !== children || $[19] !== className || $[20] !== getDialogProps || $[21] !== isOpen || $[22] !== mergedRef || $[23] !== onCloseClick || $[24] !== props) {
|
|
137
|
-
t5 = isOpen ?
|
|
137
|
+
t5 = isOpen ? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("span", {
|
|
138
138
|
className: Dialog_module_css_default.Overlay,
|
|
139
139
|
ref: overlayRef
|
|
140
|
-
}),
|
|
140
|
+
}), /* @__PURE__ */ jsxs(Component, {
|
|
141
141
|
tabIndex: -1,
|
|
142
142
|
ref: mergedRef,
|
|
143
143
|
role: "dialog",
|
|
@@ -146,7 +146,7 @@ const Dialog = /*#__PURE__*/ forwardRef((t0, forwardedRef) => {
|
|
|
146
146
|
...getDialogProps(),
|
|
147
147
|
className: clsx(Dialog_module_css_default.Dialog, className),
|
|
148
148
|
"data-width": props.wide ? "wide" : props.narrow ? "narrow" : "default",
|
|
149
|
-
children: [
|
|
149
|
+
children: [/* @__PURE__ */ jsx(IconButton, {
|
|
150
150
|
icon: XIcon,
|
|
151
151
|
ref: closeButtonRef,
|
|
152
152
|
onClick: onCloseClick,
|
|
@@ -55,7 +55,7 @@ function UnderlineNav(t0) {
|
|
|
55
55
|
} else t3 = $[13];
|
|
56
56
|
let t4;
|
|
57
57
|
if ($[14] !== children) {
|
|
58
|
-
t4 =
|
|
58
|
+
t4 = /* @__PURE__ */ jsx("div", {
|
|
59
59
|
className: t3,
|
|
60
60
|
children
|
|
61
61
|
});
|
|
@@ -64,7 +64,7 @@ function UnderlineNav(t0) {
|
|
|
64
64
|
} else t4 = $[15];
|
|
65
65
|
let t5;
|
|
66
66
|
if ($[16] !== actions) {
|
|
67
|
-
t5 = actions &&
|
|
67
|
+
t5 = actions && /* @__PURE__ */ jsx("div", {
|
|
68
68
|
className: clsx(UnderlineNav_module_css_default.UnderlineNavActions, "PRC-UnderlineNav-actions"),
|
|
69
69
|
children: actions
|
|
70
70
|
});
|
|
@@ -73,7 +73,7 @@ function UnderlineNav(t0) {
|
|
|
73
73
|
} else t5 = $[17];
|
|
74
74
|
let t6;
|
|
75
75
|
if ($[18] !== label || $[19] !== navClasses || $[20] !== rest || $[21] !== t4 || $[22] !== t5) {
|
|
76
|
-
t6 =
|
|
76
|
+
t6 = /* @__PURE__ */ jsxs("nav", {
|
|
77
77
|
className: navClasses,
|
|
78
78
|
"aria-label": label,
|
|
79
79
|
...rest,
|
|
@@ -114,7 +114,7 @@ const UnderlineNavLink = /*#__PURE__*/ React.forwardRef(function UnderlineNavLin
|
|
|
114
114
|
const t2 = selected ? "" : void 0;
|
|
115
115
|
let t3;
|
|
116
116
|
if ($[6] !== forwardRef || $[7] !== linkClasses || $[8] !== props || $[9] !== t2) {
|
|
117
|
-
t3 =
|
|
117
|
+
t3 = /* @__PURE__ */ jsx("a", {
|
|
118
118
|
ref: forwardRef,
|
|
119
119
|
"data-selected": t2,
|
|
120
120
|
className: linkClasses,
|
|
@@ -75,7 +75,7 @@ function IssueLabel(t0) {
|
|
|
75
75
|
}
|
|
76
76
|
let t6;
|
|
77
77
|
if ($[19] !== BaseComponent || $[20] !== children || $[21] !== rest || $[22] !== sharedProps) {
|
|
78
|
-
t6 =
|
|
78
|
+
t6 = /* @__PURE__ */ jsx(BaseComponent, {
|
|
79
79
|
...rest,
|
|
80
80
|
...sharedProps,
|
|
81
81
|
children
|
|
@@ -91,7 +91,7 @@ function IssueLabel(t0) {
|
|
|
91
91
|
if ("href" in props) {
|
|
92
92
|
let t6;
|
|
93
93
|
if ($[24] !== children || $[25] !== props || $[26] !== sharedProps) {
|
|
94
|
-
t6 =
|
|
94
|
+
t6 = /* @__PURE__ */ jsx("a", {
|
|
95
95
|
...props,
|
|
96
96
|
...sharedProps,
|
|
97
97
|
children
|
|
@@ -106,7 +106,7 @@ function IssueLabel(t0) {
|
|
|
106
106
|
if ("onClick" in props) {
|
|
107
107
|
let t6;
|
|
108
108
|
if ($[28] !== children || $[29] !== props || $[30] !== sharedProps) {
|
|
109
|
-
t6 =
|
|
109
|
+
t6 = /* @__PURE__ */ jsx("button", {
|
|
110
110
|
type: "button",
|
|
111
111
|
...props,
|
|
112
112
|
...sharedProps,
|
|
@@ -121,7 +121,7 @@ function IssueLabel(t0) {
|
|
|
121
121
|
}
|
|
122
122
|
let t6;
|
|
123
123
|
if ($[32] !== children || $[33] !== props || $[34] !== sharedProps) {
|
|
124
|
-
t6 =
|
|
124
|
+
t6 = /* @__PURE__ */ jsx("span", {
|
|
125
125
|
...props,
|
|
126
126
|
...sharedProps,
|
|
127
127
|
children
|
|
@@ -141,7 +141,7 @@ const Panel = ({ title, description, variant: propsVariant, selectionVariant = "
|
|
|
141
141
|
let maxHeightValue = heightMap[maxHeight];
|
|
142
142
|
if (currentVariant === "bottom-sheet") maxHeightValue = "calc(100vh - 64px)";
|
|
143
143
|
else if (currentVariant === "full-screen") maxHeightValue = "100vh";
|
|
144
|
-
return
|
|
144
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [Anchor, /* @__PURE__ */ jsx(BaseOverlay, {
|
|
145
145
|
as: "dialog",
|
|
146
146
|
ref: dialogRef,
|
|
147
147
|
"aria-labelledby": `${panelId}--title`,
|
|
@@ -162,7 +162,7 @@ const Panel = ({ title, description, variant: propsVariant, selectionVariant = "
|
|
|
162
162
|
onClick: (event) => {
|
|
163
163
|
if (event.target === event.currentTarget) onClickOutside();
|
|
164
164
|
},
|
|
165
|
-
children: internalOpen &&
|
|
165
|
+
children: internalOpen && /* @__PURE__ */ jsx(Fragment$1, { children: /* @__PURE__ */ jsx(SelectPanelContext.Provider, {
|
|
166
166
|
value: {
|
|
167
167
|
panelId,
|
|
168
168
|
title,
|
|
@@ -174,15 +174,15 @@ const Panel = ({ title, description, variant: propsVariant, selectionVariant = "
|
|
|
174
174
|
selectionVariant,
|
|
175
175
|
moveFocusToList
|
|
176
176
|
},
|
|
177
|
-
children:
|
|
177
|
+
children: /* @__PURE__ */ jsxs("form", {
|
|
178
178
|
method: "dialog",
|
|
179
179
|
onSubmit: onInternalSubmit,
|
|
180
180
|
className: SelectPanel_module_css_default.Form,
|
|
181
181
|
children: [
|
|
182
|
-
(_slots$header = slots.header) !== null && _slots$header !== void 0 ? _slots$header :
|
|
183
|
-
|
|
182
|
+
(_slots$header = slots.header) !== null && _slots$header !== void 0 ? _slots$header : /* @__PURE__ */ jsx(SelectPanelHeader, {}),
|
|
183
|
+
/* @__PURE__ */ jsx("div", {
|
|
184
184
|
className: SelectPanel_module_css_default.Container,
|
|
185
|
-
children:
|
|
185
|
+
children: /* @__PURE__ */ jsx(ActionListContainerContext.Provider, {
|
|
186
186
|
value: {
|
|
187
187
|
container: "SelectPanel",
|
|
188
188
|
listRole: "listbox",
|
|
@@ -208,12 +208,12 @@ const SelectPanelButton = /*#__PURE__*/ React.forwardRef((props, anchorRef) => {
|
|
|
208
208
|
const label = document.querySelector(`[for='${inputProps.id}']`);
|
|
209
209
|
if (label !== null && label !== void 0 && label.textContent) setLabelText(label.textContent);
|
|
210
210
|
}, [inputProps.id]);
|
|
211
|
-
if (labelText) return
|
|
211
|
+
if (labelText) return /* @__PURE__ */ jsx(ButtonComponent, {
|
|
212
212
|
ref: anchorRef,
|
|
213
213
|
"aria-label": `${anchorRef.current.textContent}, ${labelText}`,
|
|
214
214
|
...inputProps
|
|
215
215
|
});
|
|
216
|
-
else return
|
|
216
|
+
else return /* @__PURE__ */ jsx(ButtonComponent, {
|
|
217
217
|
ref: anchorRef,
|
|
218
218
|
...props
|
|
219
219
|
});
|
|
@@ -222,44 +222,44 @@ SelectPanelButton.__SLOT__ = Symbol("SelectPanel.Button");
|
|
|
222
222
|
const SelectPanelHeader = ({ children, onBack, className, ...props }) => {
|
|
223
223
|
const [slots, childrenWithoutSlots] = useSlots(children, { searchInput: SelectPanelSearchInput });
|
|
224
224
|
const { title, description, panelId, onCancel, onClearSelection } = React.useContext(SelectPanelContext);
|
|
225
|
-
return
|
|
225
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
226
226
|
className: clsx(SelectPanel_module_css_default.Header, className),
|
|
227
227
|
...props,
|
|
228
228
|
children: [
|
|
229
|
-
|
|
229
|
+
/* @__PURE__ */ jsxs("div", {
|
|
230
230
|
className: SelectPanel_module_css_default.HeaderContent,
|
|
231
231
|
"data-description": description ? true : void 0,
|
|
232
232
|
"data-search-input": slots.searchInput ? true : void 0,
|
|
233
|
-
children: [
|
|
233
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
234
234
|
className: SelectPanel_module_css_default.FlexBox,
|
|
235
|
-
children: [onBack ?
|
|
235
|
+
children: [onBack ? /* @__PURE__ */ jsx(IconButton, {
|
|
236
236
|
type: "button",
|
|
237
237
|
variant: "invisible",
|
|
238
238
|
icon: ArrowLeftIcon,
|
|
239
239
|
"aria-label": "Back",
|
|
240
240
|
onClick: () => onBack()
|
|
241
|
-
}) : null,
|
|
241
|
+
}) : null, /* @__PURE__ */ jsxs("div", {
|
|
242
242
|
className: SelectPanel_module_css_default.TitleWrapper,
|
|
243
243
|
"data-description": description ? true : void 0,
|
|
244
244
|
"data-on-back": onBack ? true : void 0,
|
|
245
|
-
children: [
|
|
245
|
+
children: [/* @__PURE__ */ jsx(Heading, {
|
|
246
246
|
as: "h1",
|
|
247
247
|
id: `${panelId}--title`,
|
|
248
248
|
className: SelectPanel_module_css_default.Title,
|
|
249
249
|
children: title
|
|
250
|
-
}), description ?
|
|
250
|
+
}), description ? /* @__PURE__ */ jsx("span", {
|
|
251
251
|
id: `${panelId}--description`,
|
|
252
252
|
className: SelectPanel_module_css_default.Description,
|
|
253
253
|
children: description
|
|
254
254
|
}) : null]
|
|
255
255
|
})]
|
|
256
|
-
}),
|
|
256
|
+
}), /* @__PURE__ */ jsxs("div", { children: [onClearSelection ? /* @__PURE__ */ jsx(IconButton, {
|
|
257
257
|
type: "button",
|
|
258
258
|
variant: "invisible",
|
|
259
259
|
icon: FilterRemoveIcon,
|
|
260
260
|
"aria-label": "Clear selection",
|
|
261
261
|
onClick: onClearSelection
|
|
262
|
-
}) : null,
|
|
262
|
+
}) : null, /* @__PURE__ */ jsx(IconButton, {
|
|
263
263
|
type: "button",
|
|
264
264
|
variant: "invisible",
|
|
265
265
|
icon: XIcon,
|
|
@@ -272,7 +272,6 @@ const SelectPanelHeader = ({ children, onBack, className, ...props }) => {
|
|
|
272
272
|
]
|
|
273
273
|
});
|
|
274
274
|
};
|
|
275
|
-
SelectPanelHeader.displayName = "SelectPanelHeader";
|
|
276
275
|
SelectPanelHeader.__SLOT__ = Symbol("SelectPanel.Header");
|
|
277
276
|
const SelectPanelSearchInput = ({ onChange: propsOnChange, onKeyDown: propsOnKeyDown, className, ...props }) => {
|
|
278
277
|
const inputRef = /*#__PURE__*/ React.createRef();
|
|
@@ -288,12 +287,12 @@ const SelectPanelSearchInput = ({ onChange: propsOnChange, onKeyDown: propsOnKey
|
|
|
288
287
|
}
|
|
289
288
|
if (typeof propsOnKeyDown === "function") propsOnKeyDown(event);
|
|
290
289
|
};
|
|
291
|
-
return
|
|
290
|
+
return /* @__PURE__ */ jsx(TextInput_default, {
|
|
292
291
|
ref: inputRef,
|
|
293
292
|
block: true,
|
|
294
293
|
leadingVisual: SearchIcon,
|
|
295
294
|
placeholder: "Search",
|
|
296
|
-
trailingAction:
|
|
295
|
+
trailingAction: /* @__PURE__ */ jsx(TextInput_default.Action, {
|
|
297
296
|
icon: XCircleFillIcon,
|
|
298
297
|
"aria-label": "Clear",
|
|
299
298
|
tooltipDirection: "w",
|
|
@@ -312,7 +311,6 @@ const SelectPanelSearchInput = ({ onChange: propsOnChange, onKeyDown: propsOnKey
|
|
|
312
311
|
...props
|
|
313
312
|
});
|
|
314
313
|
};
|
|
315
|
-
SelectPanelSearchInput.displayName = "SelectPanelSearchInput";
|
|
316
314
|
SelectPanelSearchInput.__SLOT__ = Symbol("SelectPanel.SearchInput");
|
|
317
315
|
const FooterContext = /*#__PURE__*/ React.createContext(false);
|
|
318
316
|
const SelectPanelFooter = ({ ...props }) => {
|
|
@@ -320,23 +318,23 @@ const SelectPanelFooter = ({ ...props }) => {
|
|
|
320
318
|
const hidePrimaryActions = selectionVariant === "instant";
|
|
321
319
|
const buttonSize = useResponsiveValue(responsiveButtonSizes, "small");
|
|
322
320
|
if (hidePrimaryActions && !props.children) return null;
|
|
323
|
-
return
|
|
321
|
+
return /* @__PURE__ */ jsx(FooterContext.Provider, {
|
|
324
322
|
value: true,
|
|
325
|
-
children:
|
|
323
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
326
324
|
className: SelectPanel_module_css_default.Footer,
|
|
327
325
|
"data-hide-primary-actions": hidePrimaryActions || void 0,
|
|
328
|
-
children: [
|
|
326
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
329
327
|
className: SelectPanel_module_css_default.FooterContent,
|
|
330
328
|
"data-hide-primary-actions": hidePrimaryActions || void 0,
|
|
331
329
|
children: props.children
|
|
332
|
-
}), hidePrimaryActions ? null :
|
|
330
|
+
}), hidePrimaryActions ? null : /* @__PURE__ */ jsxs("div", {
|
|
333
331
|
className: SelectPanel_module_css_default.FooterActions,
|
|
334
|
-
children: [
|
|
332
|
+
children: [/* @__PURE__ */ jsx(ButtonComponent, {
|
|
335
333
|
type: "button",
|
|
336
334
|
size: buttonSize,
|
|
337
335
|
onClick: () => onCancel(),
|
|
338
336
|
children: "Cancel"
|
|
339
|
-
}),
|
|
337
|
+
}), /* @__PURE__ */ jsx(ButtonComponent, {
|
|
340
338
|
type: "submit",
|
|
341
339
|
size: buttonSize,
|
|
342
340
|
variant: "primary",
|
|
@@ -346,21 +344,19 @@ const SelectPanelFooter = ({ ...props }) => {
|
|
|
346
344
|
})
|
|
347
345
|
});
|
|
348
346
|
};
|
|
349
|
-
SelectPanelFooter.displayName = "SelectPanelFooter";
|
|
350
347
|
SelectPanelFooter.__SLOT__ = Symbol("SelectPanel.Footer");
|
|
351
348
|
const SecondaryButton = (props) => {
|
|
352
349
|
const size = useResponsiveValue(responsiveButtonSizes, "small");
|
|
353
|
-
return
|
|
350
|
+
return /* @__PURE__ */ jsx(ButtonComponent, {
|
|
354
351
|
type: "button",
|
|
355
352
|
size,
|
|
356
353
|
block: true,
|
|
357
354
|
...props
|
|
358
355
|
});
|
|
359
356
|
};
|
|
360
|
-
SecondaryButton.displayName = "SecondaryButton";
|
|
361
357
|
const SecondaryLink = ({ className, ...props }) => {
|
|
362
358
|
const size = useResponsiveValue(responsiveButtonSizes, "small");
|
|
363
|
-
return
|
|
359
|
+
return /* @__PURE__ */ jsx(ButtonComponent, {
|
|
364
360
|
as: Link,
|
|
365
361
|
size,
|
|
366
362
|
variant: "invisible",
|
|
@@ -370,68 +366,65 @@ const SecondaryLink = ({ className, ...props }) => {
|
|
|
370
366
|
children: props.children
|
|
371
367
|
});
|
|
372
368
|
};
|
|
373
|
-
SecondaryLink.displayName = "SecondaryLink";
|
|
374
369
|
const SecondaryCheckbox = ({ id, children, className, ...props }) => {
|
|
375
370
|
const checkboxId = useId$1(id);
|
|
376
371
|
const { selectionVariant } = React.useContext(SelectPanelContext);
|
|
377
372
|
selectionVariant === "instant" && invariant(false, "Sorry! SelectPanel.SecondaryAction with variant=\"checkbox\" is not allowed inside selectionVariant=\"instant\"");
|
|
378
|
-
return
|
|
373
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
379
374
|
className: SelectPanel_module_css_default.SecondaryCheckbox,
|
|
380
|
-
children: [
|
|
375
|
+
children: [/* @__PURE__ */ jsx(Checkbox, {
|
|
381
376
|
id: checkboxId,
|
|
382
377
|
className: clsx(SelectPanel_module_css_default.Checkbox, className),
|
|
383
378
|
...props
|
|
384
|
-
}),
|
|
379
|
+
}), /* @__PURE__ */ jsx(InputLabel, {
|
|
385
380
|
htmlFor: checkboxId,
|
|
386
381
|
className: SelectPanel_module_css_default.SmallText,
|
|
387
382
|
children
|
|
388
383
|
})]
|
|
389
384
|
});
|
|
390
385
|
};
|
|
391
|
-
SecondaryCheckbox.displayName = "SecondaryCheckbox";
|
|
392
386
|
const SelectPanelSecondaryAction = ({ variant, ...props }) => {
|
|
393
387
|
!React.useContext(FooterContext) && invariant(false, "SelectPanel.SecondaryAction is only allowed inside SelectPanel.Footer");
|
|
394
|
-
if (variant === "button") return
|
|
395
|
-
else if (variant === "link") return
|
|
396
|
-
else if (variant === "checkbox") return
|
|
388
|
+
if (variant === "button") return /* @__PURE__ */ jsx(SecondaryButton, { ...props });
|
|
389
|
+
else if (variant === "link") return /* @__PURE__ */ jsx(SecondaryLink, { ...props });
|
|
390
|
+
else if (variant === "checkbox") return /* @__PURE__ */ jsx(SecondaryCheckbox, { ...props });
|
|
397
391
|
};
|
|
398
392
|
const SelectPanelLoading = ({ children = "Fetching items..." }) => {
|
|
399
|
-
return
|
|
393
|
+
return /* @__PURE__ */ jsxs(AriaStatus, {
|
|
400
394
|
announceOnShow: true,
|
|
401
395
|
className: SelectPanel_module_css_default.SelectPanelLoading,
|
|
402
|
-
children: [
|
|
396
|
+
children: [/* @__PURE__ */ jsx(Spinner, {
|
|
403
397
|
size: "medium",
|
|
404
398
|
srText: null
|
|
405
|
-
}),
|
|
399
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
406
400
|
className: SelectPanel_module_css_default.LoadingText,
|
|
407
401
|
children
|
|
408
402
|
})]
|
|
409
403
|
});
|
|
410
404
|
};
|
|
411
|
-
SelectPanelLoading.displayName = "SelectPanelLoading";
|
|
412
405
|
const SelectPanelMessage = ({ variant = "warning", size = variant === "empty" ? "full" : "inline", title, children }) => {
|
|
413
406
|
const MessageWrapper = variant === "empty" ? "div" : AriaStatus;
|
|
414
|
-
if (size === "full") return
|
|
407
|
+
if (size === "full") return /* @__PURE__ */ jsxs(MessageWrapper, {
|
|
415
408
|
className: SelectPanel_module_css_default.MessageFull,
|
|
416
409
|
children: [
|
|
417
|
-
variant !== "empty" ?
|
|
410
|
+
variant !== "empty" ? /* @__PURE__ */ jsx(Octicon, {
|
|
418
411
|
icon: AlertIcon,
|
|
419
412
|
className: clsx(SelectPanel_module_css_default.Octicon, variant === "error" ? SelectPanel_module_css_default.Error : void 0, variant === "warning" ? SelectPanel_module_css_default.Warning : void 0)
|
|
420
413
|
}) : null,
|
|
421
|
-
|
|
414
|
+
/* @__PURE__ */ jsx("span", {
|
|
422
415
|
className: SelectPanel_module_css_default.MessageTitle,
|
|
423
416
|
children: title
|
|
424
417
|
}),
|
|
425
|
-
|
|
418
|
+
/* @__PURE__ */ jsx("span", {
|
|
426
419
|
className: SelectPanel_module_css_default.MessageContent,
|
|
427
420
|
children
|
|
428
421
|
})
|
|
429
422
|
]
|
|
430
423
|
});
|
|
431
|
-
else return
|
|
424
|
+
else return /* @__PURE__ */ jsxs(MessageWrapper, {
|
|
432
425
|
className: SelectPanel_module_css_default.MessageInline,
|
|
433
426
|
"data-variant": variant,
|
|
434
|
-
children: [
|
|
427
|
+
children: [/* @__PURE__ */ jsx(AlertIcon, { size: 16 }), /* @__PURE__ */ jsx("div", { children })]
|
|
435
428
|
});
|
|
436
429
|
};
|
|
437
430
|
const SelectPanel = Object.assign(Panel, {
|
|
@@ -77,7 +77,7 @@ function Tabs(props) {
|
|
|
77
77
|
useIsomorphicLayoutEffect(t3, t4);
|
|
78
78
|
let t5;
|
|
79
79
|
if ($[12] !== children || $[13] !== contextValue) {
|
|
80
|
-
t5 =
|
|
80
|
+
t5 = /* @__PURE__ */ jsx(TabsContext.Provider, {
|
|
81
81
|
value: contextValue,
|
|
82
82
|
children
|
|
83
83
|
});
|