@primer/react 38.0.0-rc.3 → 38.0.0-rc.4
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 +66 -0
- package/dist/ActionBar/ActionBar.d.ts.map +1 -1
- package/dist/ActionBar/ActionBar.js +6 -2
- package/dist/ActionList/Description.d.ts.map +1 -1
- package/dist/ActionList/Description.js +0 -1
- package/dist/ActionList/Visuals.js +2 -2
- package/dist/Autocomplete/AutocompleteMenu.js +2 -2
- package/dist/BaseStyles.d.ts +1 -2
- package/dist/BaseStyles.d.ts.map +1 -1
- package/dist/BaseStyles.js +1 -3
- package/dist/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
- package/dist/Breadcrumbs/Breadcrumbs.js +34 -48
- package/dist/Button/ButtonBase.js +6 -6
- package/dist/Button/LinkButton.d.ts +3 -3
- package/dist/Button/LinkButton.d.ts.map +1 -1
- package/dist/Button/LinkButton.js +0 -3
- package/dist/Button/index.d.ts +1 -0
- package/dist/Button/index.d.ts.map +1 -1
- package/dist/ButtonGroup/ButtonGroup.d.ts +2 -3
- package/dist/ButtonGroup/ButtonGroup.d.ts.map +1 -1
- package/dist/ButtonGroup/ButtonGroup.js +41 -36
- package/dist/Checkbox/Checkbox.d.ts +1 -2
- package/dist/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/Checkbox/Checkbox.js +48 -79
- package/dist/CheckboxGroup/CheckboxGroup.d.ts +2 -3
- package/dist/CheckboxGroup/CheckboxGroup.d.ts.map +1 -1
- package/dist/CounterLabel/CounterLabel.d.ts +2 -3
- package/dist/CounterLabel/CounterLabel.d.ts.map +1 -1
- package/dist/CounterLabel/CounterLabel.js +1 -3
- package/dist/FilteredActionList/FilteredActionList-e1eb1b75.css +2 -0
- package/dist/FilteredActionList/FilteredActionList-e1eb1b75.css.map +1 -0
- package/dist/FilteredActionList/FilteredActionList.d.ts +2 -3
- package/dist/FilteredActionList/FilteredActionList.d.ts.map +1 -1
- package/dist/FilteredActionList/FilteredActionList.js +10 -9
- package/dist/FilteredActionList/FilteredActionList.module.css.js +2 -2
- package/dist/FilteredActionList/FilteredActionListLoaders-a46a8ea4.css +2 -0
- package/dist/FilteredActionList/FilteredActionListLoaders-a46a8ea4.css.map +1 -0
- package/dist/FilteredActionList/FilteredActionListLoaders.d.ts.map +1 -1
- package/dist/FilteredActionList/FilteredActionListLoaders.js +12 -29
- package/dist/FilteredActionList/FilteredActionListLoaders.module.css.js +2 -2
- package/dist/Flash/Flash.d.ts +1 -2
- package/dist/Flash/Flash.d.ts.map +1 -1
- package/dist/Flash/Flash.js +38 -45
- package/dist/Header/Header.d.ts +3 -4
- package/dist/Header/Header.d.ts.map +1 -1
- package/dist/Header/Header.js +10 -13
- package/dist/InlineMessage/InlineMessage.d.ts +1 -2
- package/dist/InlineMessage/InlineMessage.d.ts.map +1 -1
- package/dist/InlineMessage/InlineMessage.js +49 -65
- package/dist/PageHeader/PageHeader.d.ts +5 -5
- package/dist/PageHeader/PageHeader.d.ts.map +1 -1
- package/dist/PageHeader/PageHeader.js +330 -507
- package/dist/Pagehead/Pagehead.d.ts +2 -3
- package/dist/Pagehead/Pagehead.d.ts.map +1 -1
- package/dist/Pagehead/Pagehead.js +2 -2
- package/dist/ProgressBar/{ProgressBar-181186d4.css → ProgressBar-d27aca1d.css} +2 -2
- package/dist/ProgressBar/ProgressBar-d27aca1d.css.map +1 -0
- package/dist/ProgressBar/ProgressBar.d.ts +4 -9
- package/dist/ProgressBar/ProgressBar.d.ts.map +1 -1
- package/dist/ProgressBar/ProgressBar.js +9 -14
- package/dist/ProgressBar/ProgressBar.module.css.js +1 -1
- package/dist/ProgressBar/index.d.ts +2 -2
- package/dist/Radio/Radio.d.ts +1 -2
- package/dist/Radio/Radio.d.ts.map +1 -1
- package/dist/Radio/Radio.js +1 -3
- package/dist/RadioGroup/RadioGroup.d.ts +3 -4
- package/dist/RadioGroup/RadioGroup.d.ts.map +1 -1
- package/dist/RadioGroup/index.d.ts +1 -0
- package/dist/RadioGroup/index.d.ts.map +1 -1
- package/dist/RelativeTime/RelativeTime.d.ts +1 -3
- package/dist/RelativeTime/RelativeTime.d.ts.map +1 -1
- package/dist/Spinner/Spinner.d.ts +4 -5
- package/dist/Spinner/Spinner.d.ts.map +1 -1
- package/dist/Spinner/Spinner.js +49 -81
- package/dist/Timeline/Timeline.d.ts +11 -18
- package/dist/Timeline/Timeline.d.ts.map +1 -1
- package/dist/Timeline/Timeline.js +5 -6
- package/dist/ToggleSwitch/ToggleSwitch.d.ts +4 -0
- package/dist/ToggleSwitch/ToggleSwitch.d.ts.map +1 -1
- package/dist/ToggleSwitch/ToggleSwitch.js +195 -182
- package/dist/TreeView/TreeView-bdf34914.css +2 -0
- package/dist/TreeView/TreeView-bdf34914.css.map +1 -0
- package/dist/TreeView/TreeView.d.ts +15 -0
- package/dist/TreeView/TreeView.d.ts.map +1 -1
- package/dist/TreeView/TreeView.js +241 -10
- package/dist/TreeView/TreeView.module.css.js +2 -2
- package/dist/Truncate/Truncate.d.ts +1 -2
- package/dist/Truncate/Truncate.d.ts.map +1 -1
- package/dist/Truncate/Truncate.js +2 -6
- package/dist/UnderlineNav/UnderlineNav-78db938f.css +2 -0
- package/dist/UnderlineNav/UnderlineNav-78db938f.css.map +1 -0
- package/dist/UnderlineNav/UnderlineNav.d.ts +0 -3
- package/dist/UnderlineNav/UnderlineNav.d.ts.map +1 -1
- package/dist/UnderlineNav/UnderlineNav.js +8 -25
- package/dist/UnderlineNav/UnderlineNav.module.css.js +5 -0
- package/dist/UnderlineNav/UnderlineNavItem-b65e8fd3.css +2 -0
- package/dist/UnderlineNav/UnderlineNavItem-b65e8fd3.css.map +1 -0
- package/dist/UnderlineNav/UnderlineNavItem.d.ts +1 -2
- package/dist/UnderlineNav/UnderlineNavItem.d.ts.map +1 -1
- package/dist/UnderlineNav/UnderlineNavItem.js +49 -69
- package/dist/UnderlineNav/UnderlineNavItem.module.css.js +5 -0
- package/dist/UnderlineNav/styles.d.ts +1 -1
- package/dist/UnderlineNav/styles.js +1 -1
- package/dist/deprecated/FilteredSearch/FilteredSearch-d30f5bbc.css +2 -0
- package/dist/deprecated/FilteredSearch/FilteredSearch-d30f5bbc.css.map +1 -0
- package/dist/deprecated/FilteredSearch/FilteredSearch.d.ts +3 -4
- package/dist/deprecated/FilteredSearch/FilteredSearch.d.ts.map +1 -1
- package/dist/deprecated/FilteredSearch/FilteredSearch.js +48 -7
- package/dist/deprecated/FilteredSearch/FilteredSearch.module.css.js +5 -0
- package/dist/deprecated/index.d.ts +0 -2
- package/dist/deprecated/index.d.ts.map +1 -1
- package/dist/deprecated/index.js +0 -1
- package/dist/experimental/SelectPanel2/SelectPanel.js +2 -2
- package/dist/experimental/index.d.ts +2 -3
- package/dist/experimental/index.d.ts.map +1 -1
- package/dist/experimental/index.js +1 -2
- package/dist/index.d.ts +3 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -1
- package/dist/internal/components/TextInputInnerVisualSlot.js +2 -2
- package/dist/utils/create-component.d.ts +1 -3
- package/dist/utils/create-component.d.ts.map +1 -1
- package/dist/utils/create-component.js +3 -8
- package/generated/components.json +35 -242
- package/package.json +1 -1
- package/dist/DropdownStyles.d.ts +0 -4
- package/dist/DropdownStyles.d.ts.map +0 -1
- package/dist/FilteredActionList/FilteredActionList-96b126d7.css +0 -2
- package/dist/FilteredActionList/FilteredActionList-96b126d7.css.map +0 -1
- package/dist/FilteredActionList/FilteredActionListLoaders-6f14c45b.css +0 -2
- package/dist/FilteredActionList/FilteredActionListLoaders-6f14c45b.css.map +0 -1
- package/dist/PointerBox/PointerBox.d.ts +0 -28
- package/dist/PointerBox/PointerBox.d.ts.map +0 -1
- package/dist/PointerBox/PointerBox.js +0 -65
- package/dist/PointerBox/index.d.ts +0 -3
- package/dist/PointerBox/index.d.ts.map +0 -1
- package/dist/ProgressBar/ProgressBar-181186d4.css.map +0 -1
- package/dist/TreeView/TreeView-cd08cabc.css +0 -2
- package/dist/TreeView/TreeView-cd08cabc.css.map +0 -1
- package/dist/internal/components/Caret-e686f04c.css +0 -2
- package/dist/internal/components/Caret-e686f04c.css.map +0 -1
- package/dist/internal/components/Caret.js +0 -87
- package/dist/internal/components/Caret.module.css.js +0 -5
|
@@ -12,11 +12,16 @@ import { useSlots } from '../hooks/useSlots.js';
|
|
|
12
12
|
import { getAccessibleName } from './shared.js';
|
|
13
13
|
import { useRovingTabIndex, getFirstChildElement } from './useRovingTabIndex.js';
|
|
14
14
|
import { useTypeahead } from './useTypeahead.js';
|
|
15
|
+
import { Dialog } from '../Dialog/Dialog.js';
|
|
16
|
+
import { IconButton } from '../Button/IconButton.js';
|
|
17
|
+
import { ActionList } from '../ActionList/index.js';
|
|
15
18
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
16
|
-
import
|
|
19
|
+
import { useIsMacOS } from '../hooks/useIsMacOS.js';
|
|
20
|
+
import Spinner from '../Spinner/Spinner.js';
|
|
17
21
|
import Text from '../Text/Text.js';
|
|
18
22
|
import { SkeletonAvatar } from '../SkeletonAvatar/SkeletonAvatar.js';
|
|
19
23
|
import { SkeletonText } from '../SkeletonText/SkeletonText.js';
|
|
24
|
+
import { getAccessibleKeybindingHintString } from '../KeybindingHint/KeybindingHint.js';
|
|
20
25
|
|
|
21
26
|
const RootContext = /*#__PURE__*/React.createContext({
|
|
22
27
|
announceUpdate: () => {},
|
|
@@ -32,7 +37,8 @@ const ItemContext = /*#__PURE__*/React.createContext({
|
|
|
32
37
|
isExpanded: false,
|
|
33
38
|
setIsExpanded: () => {},
|
|
34
39
|
leadingVisualId: '',
|
|
35
|
-
trailingVisualId: ''
|
|
40
|
+
trailingVisualId: '',
|
|
41
|
+
trailingActionId: ''
|
|
36
42
|
});
|
|
37
43
|
|
|
38
44
|
// ----------------------------------------------------------------------------
|
|
@@ -217,7 +223,8 @@ const Item = /*#__PURE__*/React.forwardRef(({
|
|
|
217
223
|
children,
|
|
218
224
|
className,
|
|
219
225
|
'aria-label': ariaLabel,
|
|
220
|
-
'aria-labelledby': ariaLabelledby
|
|
226
|
+
'aria-labelledby': ariaLabelledby,
|
|
227
|
+
secondaryActions
|
|
221
228
|
}, ref) => {
|
|
222
229
|
const [slots, rest] = useSlots(children, {
|
|
223
230
|
leadingAction: LeadingAction,
|
|
@@ -230,6 +237,7 @@ const Item = /*#__PURE__*/React.forwardRef(({
|
|
|
230
237
|
const labelId = useId();
|
|
231
238
|
const leadingVisualId = useId();
|
|
232
239
|
const trailingVisualId = useId();
|
|
240
|
+
const trailingActionId = useId();
|
|
233
241
|
const [isExpanded, setIsExpanded] = useControllableState({
|
|
234
242
|
name: itemId,
|
|
235
243
|
// If the item was previously mounted, its expanded state might be cached.
|
|
@@ -252,7 +260,9 @@ const Item = /*#__PURE__*/React.forwardRef(({
|
|
|
252
260
|
childrenWithoutSubTree
|
|
253
261
|
} = useSubTree(rest);
|
|
254
262
|
const [isSubTreeEmpty, setIsSubTreeEmpty] = React.useState(!hasSubTree);
|
|
263
|
+
const [actionCommandPressed, setActionCommandPressed] = React.useState(false);
|
|
255
264
|
const [isFocused, setIsFocused] = React.useState(false);
|
|
265
|
+
const isMacOS = useIsMacOS();
|
|
256
266
|
|
|
257
267
|
// Set the expanded state and cache it
|
|
258
268
|
const setIsExpandedWithCache = React.useCallback(newIsExpanded => {
|
|
@@ -266,6 +276,18 @@ const Item = /*#__PURE__*/React.forwardRef(({
|
|
|
266
276
|
setIsExpandedWithCache(!isExpanded);
|
|
267
277
|
event === null || event === void 0 ? void 0 : event.stopPropagation();
|
|
268
278
|
}, [isExpanded, setIsExpandedWithCache]);
|
|
279
|
+
const activateActionsDialog = React.useCallback(() => {
|
|
280
|
+
if (!secondaryActions) return;
|
|
281
|
+
if (secondaryActions.length > 1) {
|
|
282
|
+
// If there are multiple secondary actions, open the action dialog
|
|
283
|
+
// as this allows users to select the action they want to interact with.
|
|
284
|
+
setActionCommandPressed(true);
|
|
285
|
+
} else {
|
|
286
|
+
// If there is only one secondary action, trigger it directly
|
|
287
|
+
const action = secondaryActions[0].onClick;
|
|
288
|
+
action();
|
|
289
|
+
}
|
|
290
|
+
}, [secondaryActions]);
|
|
269
291
|
const handleKeyDown = React.useCallback(event_0 => {
|
|
270
292
|
switch (event_0.key) {
|
|
271
293
|
case 'Enter':
|
|
@@ -291,9 +313,16 @@ const Item = /*#__PURE__*/React.forwardRef(({
|
|
|
291
313
|
event_0.stopPropagation();
|
|
292
314
|
setIsExpandedWithCache(false);
|
|
293
315
|
break;
|
|
316
|
+
case 'U':
|
|
317
|
+
case 'u':
|
|
318
|
+
if (!(event_0.shiftKey && (event_0.metaKey || event_0.ctrlKey))) return;
|
|
319
|
+
activateActionsDialog();
|
|
320
|
+
break;
|
|
294
321
|
}
|
|
295
|
-
}, [onSelect, setIsExpandedWithCache, toggle]);
|
|
322
|
+
}, [onSelect, setIsExpandedWithCache, toggle, activateActionsDialog]);
|
|
296
323
|
const ariaDescribedByIds = [slots.leadingVisual ? leadingVisualId : null, slots.trailingVisual ? trailingVisualId : null].filter(Boolean);
|
|
324
|
+
const shortcut = `Shift+${isMacOS ? 'Meta' : 'Control'}+U`;
|
|
325
|
+
const trailingActionShortcutText = `Press (${getAccessibleKeybindingHintString(shortcut, isMacOS)}) for more actions.`;
|
|
297
326
|
return /*#__PURE__*/jsx(ItemContext.Provider, {
|
|
298
327
|
value: {
|
|
299
328
|
itemId,
|
|
@@ -303,7 +332,8 @@ const Item = /*#__PURE__*/React.forwardRef(({
|
|
|
303
332
|
isExpanded,
|
|
304
333
|
setIsExpanded: setIsExpandedWithCache,
|
|
305
334
|
leadingVisualId,
|
|
306
|
-
trailingVisualId
|
|
335
|
+
trailingVisualId,
|
|
336
|
+
trailingActionId
|
|
307
337
|
},
|
|
308
338
|
children: /*#__PURE__*/jsxs("li", {
|
|
309
339
|
className: clsx('PRIVATE_TreeView-item', className, classes.TreeViewItem),
|
|
@@ -311,8 +341,8 @@ const Item = /*#__PURE__*/React.forwardRef(({
|
|
|
311
341
|
tabIndex: 0,
|
|
312
342
|
id: itemId,
|
|
313
343
|
role: "treeitem",
|
|
314
|
-
"aria-label": ariaLabel,
|
|
315
|
-
"aria-labelledby": ariaLabel ? undefined : ariaLabelledby || labelId,
|
|
344
|
+
"aria-label": secondaryActions ? ariaLabel ? `${ariaLabel}. ${trailingActionShortcutText}` : undefined : ariaLabel,
|
|
345
|
+
"aria-labelledby": ariaLabel ? undefined : `${ariaLabelledby || labelId} ${secondaryActions ? trailingActionId : ''}`.trim(),
|
|
316
346
|
"aria-describedby": ariaDescribedByIds.length ? ariaDescribedByIds.join(' ') : undefined,
|
|
317
347
|
"aria-level": level,
|
|
318
348
|
"aria-expanded": isSubTreeEmpty && (!isExpanded || !hasSubTree) || expanded === null ? undefined : isExpanded,
|
|
@@ -390,7 +420,15 @@ const Item = /*#__PURE__*/React.forwardRef(({
|
|
|
390
420
|
className: clsx('PRIVATE_TreeView-item-content-text', classes.TreeViewItemContentText),
|
|
391
421
|
children: childrenWithoutSubTree
|
|
392
422
|
}), slots.trailingVisual]
|
|
393
|
-
})
|
|
423
|
+
}), secondaryActions ? /*#__PURE__*/jsxs(Fragment, {
|
|
424
|
+
children: [/*#__PURE__*/jsx(TrailingAction, {
|
|
425
|
+
items: secondaryActions,
|
|
426
|
+
shortcutText: trailingActionShortcutText
|
|
427
|
+
}), actionCommandPressed ? /*#__PURE__*/jsx(ActionDialog, {
|
|
428
|
+
items: secondaryActions,
|
|
429
|
+
onClose: () => setActionCommandPressed(false)
|
|
430
|
+
}) : null]
|
|
431
|
+
}) : null]
|
|
394
432
|
}), subTree]
|
|
395
433
|
})
|
|
396
434
|
});
|
|
@@ -708,7 +746,7 @@ const LoadingItem = /*#__PURE__*/React.forwardRef((t0, ref) => {
|
|
|
708
746
|
let t2;
|
|
709
747
|
if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
|
|
710
748
|
t1 = /*#__PURE__*/jsx(LeadingVisual, {
|
|
711
|
-
children: /*#__PURE__*/jsx(
|
|
749
|
+
children: /*#__PURE__*/jsx(Spinner, {
|
|
712
750
|
size: "small"
|
|
713
751
|
})
|
|
714
752
|
});
|
|
@@ -1029,6 +1067,171 @@ const LeadingAction = props => {
|
|
|
1029
1067
|
return t5;
|
|
1030
1068
|
};
|
|
1031
1069
|
LeadingAction.displayName = 'TreeView.LeadingAction';
|
|
1070
|
+
// ----------------------------------------------------------------------------
|
|
1071
|
+
// TreeView.TrailingAction
|
|
1072
|
+
|
|
1073
|
+
const TrailingAction = props => {
|
|
1074
|
+
const $ = c(14);
|
|
1075
|
+
const {
|
|
1076
|
+
trailingActionId,
|
|
1077
|
+
itemId
|
|
1078
|
+
} = React.useContext(ItemContext);
|
|
1079
|
+
const {
|
|
1080
|
+
items,
|
|
1081
|
+
shortcutText
|
|
1082
|
+
} = props;
|
|
1083
|
+
let t0;
|
|
1084
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1085
|
+
t0 = clsx("PRIVATE_VisuallyHidden", classes.TreeViewVisuallyHidden);
|
|
1086
|
+
$[0] = t0;
|
|
1087
|
+
} else {
|
|
1088
|
+
t0 = $[0];
|
|
1089
|
+
}
|
|
1090
|
+
let t1;
|
|
1091
|
+
if ($[1] !== shortcutText || $[2] !== trailingActionId) {
|
|
1092
|
+
t1 = /*#__PURE__*/jsxs("div", {
|
|
1093
|
+
id: trailingActionId,
|
|
1094
|
+
className: t0,
|
|
1095
|
+
children: ["; ", shortcutText]
|
|
1096
|
+
});
|
|
1097
|
+
$[1] = shortcutText;
|
|
1098
|
+
$[2] = trailingActionId;
|
|
1099
|
+
$[3] = t1;
|
|
1100
|
+
} else {
|
|
1101
|
+
t1 = $[3];
|
|
1102
|
+
}
|
|
1103
|
+
let t2;
|
|
1104
|
+
if ($[4] !== itemId || $[5] !== items) {
|
|
1105
|
+
let t3;
|
|
1106
|
+
if ($[7] !== itemId) {
|
|
1107
|
+
t3 = (t4, index) => {
|
|
1108
|
+
const {
|
|
1109
|
+
label,
|
|
1110
|
+
onClick,
|
|
1111
|
+
icon
|
|
1112
|
+
} = t4;
|
|
1113
|
+
return /*#__PURE__*/jsx(IconButton, {
|
|
1114
|
+
icon: icon,
|
|
1115
|
+
variant: "invisible",
|
|
1116
|
+
"aria-label": label,
|
|
1117
|
+
className: classes.TreeViewItemTrailingActionButton,
|
|
1118
|
+
onClick: onClick,
|
|
1119
|
+
tabIndex: -1,
|
|
1120
|
+
"aria-hidden": true,
|
|
1121
|
+
onKeyDown: () => {
|
|
1122
|
+
const parentElement = document.getElementById(itemId);
|
|
1123
|
+
parentElement === null || parentElement === void 0 ? void 0 : parentElement.focus();
|
|
1124
|
+
}
|
|
1125
|
+
}, index);
|
|
1126
|
+
};
|
|
1127
|
+
$[7] = itemId;
|
|
1128
|
+
$[8] = t3;
|
|
1129
|
+
} else {
|
|
1130
|
+
t3 = $[8];
|
|
1131
|
+
}
|
|
1132
|
+
t2 = items.map(t3);
|
|
1133
|
+
$[4] = itemId;
|
|
1134
|
+
$[5] = items;
|
|
1135
|
+
$[6] = t2;
|
|
1136
|
+
} else {
|
|
1137
|
+
t2 = $[6];
|
|
1138
|
+
}
|
|
1139
|
+
let t3;
|
|
1140
|
+
if ($[9] !== t2) {
|
|
1141
|
+
t3 = /*#__PURE__*/jsx("div", {
|
|
1142
|
+
className: classes.TreeViewItemTrailingAction,
|
|
1143
|
+
"aria-hidden": true,
|
|
1144
|
+
onClick: _temp6,
|
|
1145
|
+
onKeyDown: _temp7,
|
|
1146
|
+
children: t2
|
|
1147
|
+
});
|
|
1148
|
+
$[9] = t2;
|
|
1149
|
+
$[10] = t3;
|
|
1150
|
+
} else {
|
|
1151
|
+
t3 = $[10];
|
|
1152
|
+
}
|
|
1153
|
+
let t4;
|
|
1154
|
+
if ($[11] !== t1 || $[12] !== t3) {
|
|
1155
|
+
t4 = /*#__PURE__*/jsxs(Fragment, {
|
|
1156
|
+
children: [t1, t3]
|
|
1157
|
+
});
|
|
1158
|
+
$[11] = t1;
|
|
1159
|
+
$[12] = t3;
|
|
1160
|
+
$[13] = t4;
|
|
1161
|
+
} else {
|
|
1162
|
+
t4 = $[13];
|
|
1163
|
+
}
|
|
1164
|
+
return t4;
|
|
1165
|
+
};
|
|
1166
|
+
TrailingAction.displayName = 'TreeView.TrailingAction';
|
|
1167
|
+
// ----------------------------------------------------------------------------
|
|
1168
|
+
// TreeView.ActionDialog
|
|
1169
|
+
|
|
1170
|
+
const ActionDialog = t0 => {
|
|
1171
|
+
const $ = c(10);
|
|
1172
|
+
const {
|
|
1173
|
+
items,
|
|
1174
|
+
onClose
|
|
1175
|
+
} = t0;
|
|
1176
|
+
const {
|
|
1177
|
+
itemId
|
|
1178
|
+
} = React.useContext(ItemContext);
|
|
1179
|
+
let t1;
|
|
1180
|
+
if ($[0] !== itemId || $[1] !== onClose) {
|
|
1181
|
+
t1 = () => {
|
|
1182
|
+
if (onClose) {
|
|
1183
|
+
onClose();
|
|
1184
|
+
}
|
|
1185
|
+
setTimeout(() => {
|
|
1186
|
+
const parentElement = document.getElementById(itemId);
|
|
1187
|
+
parentElement === null || parentElement === void 0 ? void 0 : parentElement.focus();
|
|
1188
|
+
});
|
|
1189
|
+
};
|
|
1190
|
+
$[0] = itemId;
|
|
1191
|
+
$[1] = onClose;
|
|
1192
|
+
$[2] = t1;
|
|
1193
|
+
} else {
|
|
1194
|
+
t1 = $[2];
|
|
1195
|
+
}
|
|
1196
|
+
let t2;
|
|
1197
|
+
if ($[3] !== items) {
|
|
1198
|
+
t2 = items.map(_temp0);
|
|
1199
|
+
$[3] = items;
|
|
1200
|
+
$[4] = t2;
|
|
1201
|
+
} else {
|
|
1202
|
+
t2 = $[4];
|
|
1203
|
+
}
|
|
1204
|
+
let t3;
|
|
1205
|
+
if ($[5] !== t2) {
|
|
1206
|
+
t3 = /*#__PURE__*/jsx(ActionList, {
|
|
1207
|
+
children: t2
|
|
1208
|
+
});
|
|
1209
|
+
$[5] = t2;
|
|
1210
|
+
$[6] = t3;
|
|
1211
|
+
} else {
|
|
1212
|
+
t3 = $[6];
|
|
1213
|
+
}
|
|
1214
|
+
let t4;
|
|
1215
|
+
if ($[7] !== t1 || $[8] !== t3) {
|
|
1216
|
+
t4 = /*#__PURE__*/jsx("div", {
|
|
1217
|
+
onClick: _temp8,
|
|
1218
|
+
onKeyDown: _temp9,
|
|
1219
|
+
children: /*#__PURE__*/jsx(Dialog, {
|
|
1220
|
+
title: "Supplemental actions",
|
|
1221
|
+
onClose: t1,
|
|
1222
|
+
children: t3
|
|
1223
|
+
})
|
|
1224
|
+
});
|
|
1225
|
+
$[7] = t1;
|
|
1226
|
+
$[8] = t3;
|
|
1227
|
+
$[9] = t4;
|
|
1228
|
+
} else {
|
|
1229
|
+
t4 = $[9];
|
|
1230
|
+
}
|
|
1231
|
+
return t4;
|
|
1232
|
+
};
|
|
1233
|
+
ActionDialog.displayName = 'TreeView.ActionDialog';
|
|
1234
|
+
|
|
1032
1235
|
// ----------------------------------------------------------------------------
|
|
1033
1236
|
// TreeView.DirectoryIcon
|
|
1034
1237
|
|
|
@@ -1100,7 +1303,7 @@ const ErrorDialog = t0 => {
|
|
|
1100
1303
|
let t3;
|
|
1101
1304
|
if ($[5] !== children || $[6] !== t2 || $[7] !== title) {
|
|
1102
1305
|
t3 = /*#__PURE__*/jsx("div", {
|
|
1103
|
-
onKeyDown:
|
|
1306
|
+
onKeyDown: _temp1,
|
|
1104
1307
|
children: /*#__PURE__*/jsx(ConfirmationDialog, {
|
|
1105
1308
|
title: title,
|
|
1106
1309
|
onClose: t2,
|
|
@@ -1150,6 +1353,34 @@ function _temp3(_, i) {
|
|
|
1150
1353
|
}
|
|
1151
1354
|
_temp3.displayName = "_temp3";
|
|
1152
1355
|
function _temp6(event) {
|
|
1356
|
+
return event.stopPropagation();
|
|
1357
|
+
}
|
|
1358
|
+
function _temp7(event_0) {
|
|
1359
|
+
return event_0.stopPropagation();
|
|
1360
|
+
}
|
|
1361
|
+
function _temp8(event) {
|
|
1362
|
+
event.stopPropagation();
|
|
1363
|
+
}
|
|
1364
|
+
function _temp9(event_0) {
|
|
1365
|
+
if (["Backspace", "ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown", "Enter"].includes(event_0.key)) {
|
|
1366
|
+
event_0.stopPropagation();
|
|
1367
|
+
}
|
|
1368
|
+
}
|
|
1369
|
+
function _temp0(t0, index) {
|
|
1370
|
+
const {
|
|
1371
|
+
label,
|
|
1372
|
+
onClick,
|
|
1373
|
+
icon: Icon
|
|
1374
|
+
} = t0;
|
|
1375
|
+
return /*#__PURE__*/jsxs(ActionList.Item, {
|
|
1376
|
+
onSelect: onClick,
|
|
1377
|
+
children: [/*#__PURE__*/jsx(ActionList.LeadingVisual, {
|
|
1378
|
+
children: /*#__PURE__*/jsx(Icon, {})
|
|
1379
|
+
}), label]
|
|
1380
|
+
}, index);
|
|
1381
|
+
}
|
|
1382
|
+
_temp0.displayName = "_temp0";
|
|
1383
|
+
function _temp1(event) {
|
|
1153
1384
|
if (["Backspace", "ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown", "Enter"].includes(event.key)) {
|
|
1154
1385
|
event.stopPropagation();
|
|
1155
1386
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import './TreeView-
|
|
1
|
+
import './TreeView-bdf34914.css';
|
|
2
2
|
|
|
3
|
-
var classes = {"TreeViewRootUlStyles":"prc-TreeView-TreeViewRootUlStyles-eZtxW","TreeViewItem":"prc-TreeView-TreeViewItem-ShJr0","TreeViewItemContainer":"prc-TreeView-TreeViewItemContainer--2Rkn","TreeViewItemSkeleton":"prc-TreeView-TreeViewItemSkeleton-fqk59","TreeViewItemToggle":"prc-TreeView-TreeViewItemToggle-gWUdE","TreeViewItemToggleHover":"prc-TreeView-TreeViewItemToggleHover-nEgP-","TreeViewItemToggleEnd":"prc-TreeView-TreeViewItemToggleEnd-t-AEB","TreeViewItemContent":"prc-TreeView-TreeViewItemContent-f0r0b","TreeViewItemContentText":"prc-TreeView-TreeViewItemContentText-smZM-","TreeViewItemVisual":"prc-TreeView-TreeViewItemVisual-dRlGq","TreeViewItemLeadingAction":"prc-TreeView-TreeViewItemLeadingAction-VXx8I","TreeViewItemLevelLine":"prc-TreeView-TreeViewItemLevelLine-KPSSL","TreeViewDirectoryIcon":"prc-TreeView-TreeViewDirectoryIcon-PHbeP","TreeViewVisuallyHidden":"prc-TreeView-TreeViewVisuallyHidden-4-mPv","TreeViewSkeletonItemContainerStyle":"prc-TreeView-TreeViewSkeletonItemContainerStyle-EB7p0","TreeItemSkeletonTextStyles":"prc-TreeView-TreeItemSkeletonTextStyles-wnBY9"};
|
|
3
|
+
var classes = {"TreeViewRootUlStyles":"prc-TreeView-TreeViewRootUlStyles-eZtxW","TreeViewItem":"prc-TreeView-TreeViewItem-ShJr0","TreeViewItemContainer":"prc-TreeView-TreeViewItemContainer--2Rkn","TreeViewItemSkeleton":"prc-TreeView-TreeViewItemSkeleton-fqk59","TreeViewItemToggle":"prc-TreeView-TreeViewItemToggle-gWUdE","TreeViewItemToggleHover":"prc-TreeView-TreeViewItemToggleHover-nEgP-","TreeViewItemToggleEnd":"prc-TreeView-TreeViewItemToggleEnd-t-AEB","TreeViewItemContent":"prc-TreeView-TreeViewItemContent-f0r0b","TreeViewItemContentText":"prc-TreeView-TreeViewItemContentText-smZM-","TreeViewItemVisual":"prc-TreeView-TreeViewItemVisual-dRlGq","TreeViewItemLeadingAction":"prc-TreeView-TreeViewItemLeadingAction-VXx8I","TreeViewItemTrailingAction":"prc-TreeView-TreeViewItemTrailingAction-EZETP","TreeViewItemTrailingActionButton":"prc-TreeView-TreeViewItemTrailingActionButton-u87Ku","TreeViewItemLevelLine":"prc-TreeView-TreeViewItemLevelLine-KPSSL","TreeViewDirectoryIcon":"prc-TreeView-TreeViewDirectoryIcon-PHbeP","TreeViewVisuallyHidden":"prc-TreeView-TreeViewVisuallyHidden-4-mPv","TreeViewSkeletonItemContainerStyle":"prc-TreeView-TreeViewSkeletonItemContainerStyle-EB7p0","TreeItemSkeletonTextStyles":"prc-TreeView-TreeItemSkeletonTextStyles-wnBY9"};
|
|
4
4
|
|
|
5
5
|
export { classes as default };
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { MaxWidthProps } from 'styled-system';
|
|
3
|
-
import type { SxProp } from '../sx';
|
|
4
3
|
import type { ForwardRefComponent as PolymorphicForwardRefComponent } from '../utils/polymorphic';
|
|
5
4
|
type TruncateProps = React.HTMLAttributes<HTMLElement> & {
|
|
6
5
|
title: string;
|
|
7
6
|
inline?: boolean;
|
|
8
7
|
expandable?: boolean;
|
|
9
|
-
} & MaxWidthProps
|
|
8
|
+
} & MaxWidthProps;
|
|
10
9
|
declare const Truncate: PolymorphicForwardRefComponent<"div", TruncateProps>;
|
|
11
10
|
export type { TruncateProps };
|
|
12
11
|
export default Truncate;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Truncate.d.ts","sourceRoot":"","sources":["../../src/Truncate/Truncate.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,eAAe,CAAA;AAChD,OAAO,KAAK,EAAC,
|
|
1
|
+
{"version":3,"file":"Truncate.d.ts","sourceRoot":"","sources":["../../src/Truncate/Truncate.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,eAAe,CAAA;AAChD,OAAO,KAAK,EAAC,mBAAmB,IAAI,8BAA8B,EAAC,MAAM,sBAAsB,CAAA;AAG/F,KAAK,aAAa,GAAG,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,GAAG;IACvD,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,GAAG,aAAa,CAAA;AAEjB,QAAA,MAAM,QAAQ,EAuBR,8BAA8B,CAAC,KAAK,EAAE,aAAa,CAAC,CAAA;AAM1D,YAAY,EAAC,aAAa,EAAC,CAAA;AAC3B,eAAe,QAAQ,CAAA"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { clsx } from 'clsx';
|
|
3
|
-
import { BoxWithFallback } from '../internal/components/BoxWithFallback.js';
|
|
4
3
|
import classes from './Truncate.module.css.js';
|
|
5
4
|
import { jsx } from 'react/jsx-runtime';
|
|
6
5
|
|
|
7
6
|
const Truncate = /*#__PURE__*/React.forwardRef(function Truncate({
|
|
8
|
-
as,
|
|
7
|
+
as: Component = 'div',
|
|
9
8
|
children,
|
|
10
9
|
className,
|
|
11
10
|
title,
|
|
@@ -13,13 +12,11 @@ const Truncate = /*#__PURE__*/React.forwardRef(function Truncate({
|
|
|
13
12
|
expandable,
|
|
14
13
|
maxWidth = 125,
|
|
15
14
|
style,
|
|
16
|
-
sx,
|
|
17
15
|
...rest
|
|
18
16
|
}, ref) {
|
|
19
|
-
return /*#__PURE__*/jsx(
|
|
17
|
+
return /*#__PURE__*/jsx(Component, {
|
|
20
18
|
...rest,
|
|
21
19
|
ref: ref,
|
|
22
|
-
as: as,
|
|
23
20
|
className: clsx(className, classes.Truncate),
|
|
24
21
|
"data-expandable": expandable,
|
|
25
22
|
"data-inline": inline,
|
|
@@ -28,7 +25,6 @@ const Truncate = /*#__PURE__*/React.forwardRef(function Truncate({
|
|
|
28
25
|
...style,
|
|
29
26
|
[`--truncate-max-width`]: typeof maxWidth === 'number' ? `${maxWidth}px` : typeof maxWidth === 'string' ? maxWidth : undefined
|
|
30
27
|
},
|
|
31
|
-
sx: sx,
|
|
32
28
|
children: children
|
|
33
29
|
});
|
|
34
30
|
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/UnderlineNav/UnderlineNav.module.css"],"names":[],"mappings":"AAAA,wCAEE,kBAAmB,CADnB,YAAa,CAEb,6BACF","file":"UnderlineNav-78db938f.css","sourcesContent":[".MenuItemContent {\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n"]}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { SxProp } from '../sx';
|
|
3
2
|
export type UnderlineNavProps = {
|
|
4
3
|
children: React.ReactNode;
|
|
5
4
|
'aria-label'?: React.AriaAttributes['aria-label'];
|
|
6
5
|
as?: React.ElementType;
|
|
7
6
|
className?: string;
|
|
8
|
-
sx?: SxProp['sx'];
|
|
9
7
|
/**
|
|
10
8
|
* loading state for all counters. It displays loading animation for individual counters (UnderlineNav.Item) until all are resolved. It is needed to prevent multiple layout shift.
|
|
11
9
|
*/
|
|
@@ -18,7 +16,6 @@ export type UnderlineNavProps = {
|
|
|
18
16
|
variant?: 'inset' | 'flush';
|
|
19
17
|
};
|
|
20
18
|
export declare const MORE_BTN_WIDTH = 86;
|
|
21
|
-
export declare const NavigationList: import("styled-components").StyledComponent<"ul", any, SxProp, never>;
|
|
22
19
|
export declare const MoreMenuListItem: import("styled-components").StyledComponent<"li", any, {}, never>;
|
|
23
20
|
export declare const getValidChildren: (children: React.ReactNode) => React.ReactElement[];
|
|
24
21
|
export declare const UnderlineNav: React.ForwardRefExoticComponent<UnderlineNavProps & React.RefAttributes<unknown>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UnderlineNav.d.ts","sourceRoot":"","sources":["../../src/UnderlineNav/UnderlineNav.tsx"],"names":[],"mappings":"AACA,OAAO,KAA6D,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"UnderlineNav.d.ts","sourceRoot":"","sources":["../../src/UnderlineNav/UnderlineNav.tsx"],"names":[],"mappings":"AACA,OAAO,KAA6D,MAAM,OAAO,CAAA;AAoBjF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,YAAY,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,YAAY,CAAC,CAAA;IACjD,EAAE,CAAC,EAAE,KAAK,CAAC,WAAW,CAAA;IACtB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,CAAA;CAC5B,CAAA;AAGD,eAAO,MAAM,cAAc,KAAK,CAAA;AAIhC,eAAO,MAAM,gBAAgB,mEAI5B,CAAA;AAkED,eAAO,MAAM,gBAAgB,GAAI,UAAU,KAAK,CAAC,SAAS,KACgC,KAAK,CAAC,YAAY,EAC3G,CAAA;AAkBD,eAAO,MAAM,YAAY,mFAiRxB,CAAA"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React, { forwardRef, useRef, useState, useEffect, useCallback } from 'react';
|
|
2
|
-
import sx from '../sx.js';
|
|
3
2
|
import { UnderlineNavContext } from './UnderlineNavContext.js';
|
|
4
3
|
import { useResizeObserver } from '../hooks/useResizeObserver.js';
|
|
5
4
|
import { useTheme } from '../ThemeProvider.js';
|
|
@@ -12,10 +11,9 @@ import { useOnEscapePress } from '../hooks/useOnEscapePress.js';
|
|
|
12
11
|
import { useOnOutsideClick } from '../hooks/useOnOutsideClick.js';
|
|
13
12
|
import { useId } from '../hooks/useId.js';
|
|
14
13
|
import { ActionList } from '../ActionList/index.js';
|
|
15
|
-
import { defaultSxProp } from '../utils/defaultSxProp.js';
|
|
16
14
|
import { invariant } from '../utils/invariant.js';
|
|
15
|
+
import classes from './UnderlineNav.module.css.js';
|
|
17
16
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
18
|
-
import Box from '../Box/Box.js';
|
|
19
17
|
import { ButtonComponent } from '../Button/Button.js';
|
|
20
18
|
import CounterLabel from '../CounterLabel/CounterLabel.js';
|
|
21
19
|
|
|
@@ -24,15 +22,9 @@ import CounterLabel from '../CounterLabel/CounterLabel.js';
|
|
|
24
22
|
const MORE_BTN_WIDTH = 86;
|
|
25
23
|
// The height is needed to make sure we don't have a layout shift when the more button is the only item in the nav.
|
|
26
24
|
const MORE_BTN_HEIGHT = 45;
|
|
27
|
-
|
|
28
|
-
// Needed this because passing a ref using HTMLULListElement to `Box` causes a type error
|
|
29
|
-
styled.ul.withConfig({
|
|
30
|
-
displayName: "UnderlineNav__NavigationList",
|
|
31
|
-
componentId: "sc-1jfr31k-0"
|
|
32
|
-
})(["", ";"], sx);
|
|
33
25
|
const MoreMenuListItem = styled.li.withConfig({
|
|
34
26
|
displayName: "UnderlineNav__MoreMenuListItem",
|
|
35
|
-
componentId: "sc-1jfr31k-
|
|
27
|
+
componentId: "sc-1jfr31k-0"
|
|
36
28
|
})(["display:flex;align-items:center;height:", "px;"], MORE_BTN_HEIGHT);
|
|
37
29
|
const overflowEffect = (navWidth, moreMenuWidth, childArray, childWidthArray, noIconChildWidthArray, updateListAndMenu) => {
|
|
38
30
|
let iconsVisible = true;
|
|
@@ -112,7 +104,6 @@ const calculatePossibleItems = (childWidthArray, navWidth, moreMenuWidth = 0) =>
|
|
|
112
104
|
const UnderlineNav = /*#__PURE__*/forwardRef(({
|
|
113
105
|
as = 'nav',
|
|
114
106
|
'aria-label': ariaLabel,
|
|
115
|
-
sx: sxProp = defaultSxProp,
|
|
116
107
|
loadingCounters = false,
|
|
117
108
|
variant = 'inset',
|
|
118
109
|
className,
|
|
@@ -271,15 +262,14 @@ const UnderlineNav = /*#__PURE__*/forwardRef(({
|
|
|
271
262
|
"aria-label": ariaLabel,
|
|
272
263
|
className: className,
|
|
273
264
|
ref: navRef,
|
|
274
|
-
sx: sxProp,
|
|
275
265
|
"data-variant": variant,
|
|
276
266
|
children: /*#__PURE__*/jsxs(UnderlineItemList, {
|
|
277
267
|
ref: listRef,
|
|
278
268
|
role: "list",
|
|
279
269
|
children: [listItems, menuItems.length > 0 && /*#__PURE__*/jsxs(MoreMenuListItem, {
|
|
280
270
|
ref: moreMenuRef,
|
|
281
|
-
children: [!onlyMenuVisible && /*#__PURE__*/jsx(
|
|
282
|
-
|
|
271
|
+
children: [!onlyMenuVisible && /*#__PURE__*/jsx("div", {
|
|
272
|
+
style: getDividerStyle(theme)
|
|
283
273
|
}), /*#__PURE__*/jsx(ButtonComponent, {
|
|
284
274
|
ref: moreMenuBtnRef,
|
|
285
275
|
sx: moreBtnStyles,
|
|
@@ -287,8 +277,7 @@ const UnderlineNav = /*#__PURE__*/forwardRef(({
|
|
|
287
277
|
"aria-expanded": isWidgetOpen,
|
|
288
278
|
onClick: onAnchorClick,
|
|
289
279
|
trailingAction: TriangleDownIcon,
|
|
290
|
-
children: /*#__PURE__*/jsx(
|
|
291
|
-
as: "span",
|
|
280
|
+
children: /*#__PURE__*/jsx("span", {
|
|
292
281
|
children: onlyMenuVisible ? /*#__PURE__*/jsxs(Fragment, {
|
|
293
282
|
children: [/*#__PURE__*/jsxs(VisuallyHidden, {
|
|
294
283
|
as: "span",
|
|
@@ -336,15 +325,9 @@ const UnderlineNav = /*#__PURE__*/forwardRef(({
|
|
|
336
325
|
typeof onSelect === 'function' && onSelect(event);
|
|
337
326
|
},
|
|
338
327
|
...menuItemProps,
|
|
339
|
-
children: /*#__PURE__*/jsxs(
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
display: 'flex',
|
|
343
|
-
alignItems: 'center',
|
|
344
|
-
justifyContent: 'space-between'
|
|
345
|
-
},
|
|
346
|
-
children: [menuItemChildren, loadingCounters ? /*#__PURE__*/jsx(LoadingCounter, {}) : counter !== undefined && /*#__PURE__*/jsx(Box, {
|
|
347
|
-
as: "span",
|
|
328
|
+
children: /*#__PURE__*/jsxs("span", {
|
|
329
|
+
className: classes.MenuItemContent,
|
|
330
|
+
children: [menuItemChildren, loadingCounters ? /*#__PURE__*/jsx(LoadingCounter, {}) : counter !== undefined && /*#__PURE__*/jsx("span", {
|
|
348
331
|
"data-component": "counter",
|
|
349
332
|
children: /*#__PURE__*/jsx(CounterLabel, {
|
|
350
333
|
children: counter
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/UnderlineNav/UnderlineNavItem.module.css"],"names":[],"mappings":"AAAA,yCAGE,kBAAmB,CAFnB,YAAa,CACb,qBAEF","file":"UnderlineNavItem-b65e8fd3.css","sourcesContent":[".UnderlineNavItem {\n display: flex;\n flex-direction: column;\n align-items: center;\n}\n"]}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { SxProp } from '../sx';
|
|
3
2
|
import type { IconProps } from '@primer/octicons-react';
|
|
4
3
|
import type { ForwardRefComponent as PolymorphicForwardRefComponent } from '../utils/polymorphic';
|
|
5
4
|
export type LinkProps = {
|
|
@@ -38,6 +37,6 @@ export type UnderlineNavItemProps = {
|
|
|
38
37
|
* Counter
|
|
39
38
|
*/
|
|
40
39
|
counter?: number | string;
|
|
41
|
-
} &
|
|
40
|
+
} & LinkProps;
|
|
42
41
|
export declare const UnderlineNavItem: PolymorphicForwardRefComponent<"a", UnderlineNavItemProps>;
|
|
43
42
|
//# sourceMappingURL=UnderlineNavItem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UnderlineNavItem.d.ts","sourceRoot":"","sources":["../../src/UnderlineNav/UnderlineNavItem.tsx"],"names":[],"mappings":"AACA,OAAO,KAAuC,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"UnderlineNavItem.d.ts","sourceRoot":"","sources":["../../src/UnderlineNav/UnderlineNavItem.tsx"],"names":[],"mappings":"AACA,OAAO,KAAuC,MAAM,OAAO,CAAA;AAC3D,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,wBAAwB,CAAA;AACrD,OAAO,KAAK,EAAC,mBAAmB,IAAI,8BAA8B,EAAC,MAAM,sBAAsB,CAAA;AAO/F,MAAM,MAAM,SAAS,GAAG;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,cAAc,CAAC,EAAE,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,CAAC,gBAAgB,CAAC,CAAA;CACjF,CAAA;AAED,MAAM,MAAM,qBAAqB,GAAG;IAClC;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAA;IACxG;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,CAAA;IAC5F;;OAEG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,SAAS,CAAC,GAAG,KAAK,CAAC,YAAY,CAAA;IAC9D;;QAEI;IACJ,EAAE,CAAC,EAAE,KAAK,CAAC,WAAW,GAAG,GAAG,CAAA;IAC5B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CAC1B,GAAG,SAAS,CAAA;AAEb,eAAO,MAAM,gBAAgB,EAsExB,8BAA8B,CAAC,GAAG,EAAE,qBAAqB,CAAC,CAAA"}
|