@primer/react 0.0.0-20260220184804 → 0.0.0-20260220191813
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 +2 -26
- package/dist/ActionList/ActionList-f4ac3b54.css +2 -0
- package/dist/ActionList/ActionList-f4ac3b54.css.map +1 -0
- package/dist/ActionList/ActionList.module.css.js +1 -1
- package/dist/ActionList/Item.d.ts.map +1 -1
- package/dist/ActionList/Item.js +0 -1
- package/dist/Autocomplete/Autocomplete.js +159 -76
- package/dist/Autocomplete/AutocompleteMenu.js +333 -128
- package/dist/Autocomplete/AutocompleteOverlay.js +130 -49
- package/dist/Banner/Banner.js +238 -64
- package/dist/Blankslate/{Blankslate-a039d79a.css → Blankslate-f5a9755a.css} +2 -2
- package/dist/Blankslate/Blankslate-f5a9755a.css.map +1 -0
- package/dist/Blankslate/Blankslate.module.css.js +1 -1
- package/dist/Button/Button.js +34 -11
- package/dist/Button/IconButton.js +140 -51
- package/dist/Button/LinkButton.js +39 -11
- package/dist/Checkbox/Checkbox.js +163 -55
- package/dist/Dialog/Dialog.js +347 -105
- package/dist/FilteredActionList/FilteredActionList.d.ts +1 -16
- package/dist/FilteredActionList/FilteredActionList.d.ts.map +1 -1
- package/dist/FilteredActionList/FilteredActionList.js +42 -147
- package/dist/Overlay/Overlay-43cda449.css +2 -0
- package/dist/Overlay/Overlay-43cda449.css.map +1 -0
- package/dist/Overlay/Overlay.module.css.js +1 -1
- package/dist/PageLayout/PageLayout-cb491b47.css +2 -0
- package/dist/PageLayout/PageLayout-cb491b47.css.map +1 -0
- package/dist/PageLayout/PageLayout.d.ts +2 -72
- package/dist/PageLayout/PageLayout.d.ts.map +1 -1
- package/dist/PageLayout/PageLayout.js +1235 -750
- package/dist/PageLayout/PageLayout.module.css.js +2 -2
- package/dist/PageLayout/usePaneWidth.d.ts +5 -18
- package/dist/PageLayout/usePaneWidth.d.ts.map +1 -1
- package/dist/PageLayout/usePaneWidth.js +111 -125
- package/dist/SelectPanel/SelectPanel.d.ts +1 -1
- package/dist/SelectPanel/SelectPanel.d.ts.map +1 -1
- package/dist/SelectPanel/SelectPanel.js +1 -3
- package/dist/SplitPageLayout/SplitPageLayout.d.ts +1 -4
- package/dist/SplitPageLayout/SplitPageLayout.d.ts.map +1 -1
- package/dist/SplitPageLayout/SplitPageLayout.js +2 -54
- package/dist/Text/Text.d.ts +1 -1
- package/dist/Text/Text.d.ts.map +1 -1
- package/dist/Text/Text.js +13 -10
- package/dist/UnderlineNav/UnderlineNav-bec9faaa.css +2 -0
- package/dist/UnderlineNav/UnderlineNav-bec9faaa.css.map +1 -0
- package/dist/UnderlineNav/UnderlineNav.d.ts.map +1 -1
- package/dist/UnderlineNav/UnderlineNav.js +84 -323
- package/dist/UnderlineNav/UnderlineNav.module.css.js +2 -2
- package/dist/UnderlineNav/UnderlineNavContext.d.ts +4 -11
- package/dist/UnderlineNav/UnderlineNavContext.d.ts.map +1 -1
- package/dist/UnderlineNav/UnderlineNavContext.js +2 -3
- package/dist/UnderlineNav/UnderlineNavItem-db9dc5d0.css +2 -0
- package/dist/UnderlineNav/UnderlineNavItem-db9dc5d0.css.map +1 -0
- package/dist/UnderlineNav/UnderlineNavItem.d.ts.map +1 -1
- package/dist/UnderlineNav/UnderlineNavItem.js +161 -59
- package/dist/UnderlineNav/UnderlineNavItem.module.css.js +1 -1
- package/dist/experimental/SelectPanel2/SelectPanel.js +593 -209
- package/dist/experimental/UnderlinePanels/UnderlinePanels-133b9c25.css +2 -0
- package/dist/experimental/UnderlinePanels/UnderlinePanels-133b9c25.css.map +1 -0
- package/dist/experimental/UnderlinePanels/UnderlinePanels.module.css.js +1 -1
- package/dist/hooks/useRefObjectAsForwardedRef.d.ts.map +1 -1
- package/dist/hooks/useRefObjectAsForwardedRef.js +2 -10
- package/dist/hooks/useScrollFlash.d.ts.map +1 -1
- package/dist/hooks/useScrollFlash.js +22 -14
- package/dist/hooks/useSlots.d.ts +6 -50
- package/dist/hooks/useSlots.d.ts.map +1 -1
- package/dist/hooks/useSlots.js +36 -114
- package/dist/internal/components/UnderlineTabbedInterface-6bea1152.css +2 -0
- package/dist/internal/components/UnderlineTabbedInterface-6bea1152.css.map +1 -0
- package/dist/internal/components/UnderlineTabbedInterface.d.ts +0 -1
- package/dist/internal/components/UnderlineTabbedInterface.d.ts.map +1 -1
- package/dist/internal/components/UnderlineTabbedInterface.js +41 -48
- package/dist/internal/components/UnderlineTabbedInterface.module.css.js +1 -1
- package/generated/components.json +2 -194
- package/package.json +2 -2
- package/dist/ActionList/ActionList-c04a02d6.css +0 -2
- package/dist/ActionList/ActionList-c04a02d6.css.map +0 -1
- package/dist/Blankslate/Blankslate-a039d79a.css.map +0 -1
- package/dist/Overlay/Overlay-15519c09.css +0 -2
- package/dist/Overlay/Overlay-15519c09.css.map +0 -1
- package/dist/PageLayout/PageLayout-06f4c069.css +0 -2
- package/dist/PageLayout/PageLayout-06f4c069.css.map +0 -1
- package/dist/UnderlineNav/UnderlineNav-4344d9b0.css +0 -2
- package/dist/UnderlineNav/UnderlineNav-4344d9b0.css.map +0 -1
- package/dist/UnderlineNav/UnderlineNavItem-b65e8fd3.css +0 -2
- package/dist/UnderlineNav/UnderlineNavItem-b65e8fd3.css.map +0 -1
- package/dist/UnderlineNav/styles.d.ts +0 -16
- package/dist/UnderlineNav/styles.d.ts.map +0 -1
- package/dist/UnderlineNav/styles.js +0 -19
- package/dist/experimental/UnderlinePanels/UnderlinePanels-e4b325b9.css +0 -2
- package/dist/experimental/UnderlinePanels/UnderlinePanels-e4b325b9.css.map +0 -1
- package/dist/internal/components/UnderlineTabbedInterface-4197ee28.css +0 -2
- package/dist/internal/components/UnderlineTabbedInterface-4197ee28.css.map +0 -1
package/dist/Text/Text.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { c } from 'react-compiler-runtime';
|
|
2
2
|
import { clsx } from 'clsx';
|
|
3
|
+
import React from 'react';
|
|
3
4
|
import classes from './Text.module.css.js';
|
|
4
5
|
import { fixedForwardRef } from '../utils/modern-polymorphic.js';
|
|
5
6
|
import { jsx } from 'react/jsx-runtime';
|
|
7
|
+
import { useRefObjectAsForwardedRef } from '../hooks/useRefObjectAsForwardedRef.js';
|
|
6
8
|
|
|
7
9
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
8
10
|
function Text(props, ref) {
|
|
9
|
-
const $ = c(
|
|
11
|
+
const $ = c(14);
|
|
10
12
|
let className;
|
|
11
13
|
let rest;
|
|
12
14
|
let size;
|
|
@@ -34,6 +36,8 @@ function Text(props, ref) {
|
|
|
34
36
|
weight = $[5];
|
|
35
37
|
}
|
|
36
38
|
const Component = t0 === undefined ? "span" : t0;
|
|
39
|
+
const innerRef = React.useRef(null);
|
|
40
|
+
useRefObjectAsForwardedRef(ref, innerRef);
|
|
37
41
|
let t1;
|
|
38
42
|
if ($[6] !== className) {
|
|
39
43
|
t1 = clsx(className, classes.Text);
|
|
@@ -43,23 +47,22 @@ function Text(props, ref) {
|
|
|
43
47
|
t1 = $[7];
|
|
44
48
|
}
|
|
45
49
|
let t2;
|
|
46
|
-
if ($[8] !== Component || $[9] !==
|
|
50
|
+
if ($[8] !== Component || $[9] !== rest || $[10] !== size || $[11] !== t1 || $[12] !== weight) {
|
|
47
51
|
t2 = /*#__PURE__*/jsx(Component, {
|
|
48
52
|
className: t1,
|
|
49
53
|
"data-size": size,
|
|
50
54
|
"data-weight": weight,
|
|
51
55
|
...rest,
|
|
52
|
-
ref:
|
|
56
|
+
ref: innerRef
|
|
53
57
|
});
|
|
54
58
|
$[8] = Component;
|
|
55
|
-
$[9] =
|
|
56
|
-
$[10] =
|
|
57
|
-
$[11] =
|
|
58
|
-
$[12] =
|
|
59
|
-
$[13] =
|
|
60
|
-
$[14] = t2;
|
|
59
|
+
$[9] = rest;
|
|
60
|
+
$[10] = size;
|
|
61
|
+
$[11] = t1;
|
|
62
|
+
$[12] = weight;
|
|
63
|
+
$[13] = t2;
|
|
61
64
|
} else {
|
|
62
|
-
t2 = $[
|
|
65
|
+
t2 = $[13];
|
|
63
66
|
}
|
|
64
67
|
return t2;
|
|
65
68
|
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
.prc-UnderlineNav-UnderlineWrapper-GWONT{animation:prc-UnderlineNav-detect-overflow-6HuSH linear;animation-timeline:scroll(self block)}.prc-UnderlineNav-UnderlineWrapper-GWONT[data-hide-icons=true]{--UnderlineNav_icons-display:none}.prc-UnderlineNav-UnderlineWrapper-GWONT[data-has-overflow=true]{--UnderlineNav_moreButton-visibility:visible}@keyframes prc-UnderlineNav-detect-overflow-6HuSH{0%,to{--UnderlineNav_moreButton-visibility:visible;--UnderlineNav_icons-display:none}}.prc-UnderlineNav-ItemsList-oj8gN [data-component=icon]{display:var(--UnderlineNav_icons-display,inline)}.prc-UnderlineNav-MoreButtonContainer-Dnrq6{align-items:center;display:flex;visibility:var(--UnderlineNav_moreButton-visibility,hidden)}.prc-UnderlineNav-OverflowMenuItem-7SG7M [aria-current] .prc-UnderlineNav-OverflowMenuItemLabel-F80v6{font-weight:var(--base-text-weight-semibold,600)}.prc-UnderlineNav-MoreButtonDivider-dN0a-{border-left:var(--borderWidth-default,.0625rem) solid var(--borderColor-muted,var(--color-border-muted));display:inline-block;height:var(--base-size-24,1.5rem);margin-right:var(--base-size-4,.25rem);width:0}.prc-UnderlineNav-MoreButton-Y8soj{background:transparent;border:0;box-shadow:none;font-weight:var(--base-text-weight-normal,400);margin:0;padding:var(--base-size-4,.25rem) var(--base-size-8,.5rem)}.prc-UnderlineNav-MoreButton-Y8soj>[data-component=trailingVisual]{margin-left:0}
|
|
2
|
+
/*# sourceMappingURL=UnderlineNav-bec9faaa.css.map */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/UnderlineNav/UnderlineNav.module.css.js"],"names":[],"mappings":"AAAA,yCAIE,uDAAiC,CACjC,qCASF,CAPE,+DACE,iCACF,CAEA,iEACE,4CACF,CAGF,kDACE,MAEE,4CAA6C,CAC7C,iCACF,CACF,CAEA,wDACE,gDACF,CAEA,4CAGE,kBAAmB,CAFnB,YAAa,CACb,2DAEF,CAEA,sGACE,gDACF,CAEA,0CAEE,wGAAsE,CADtE,oBAAqB,CAIrB,iCAA2B,CAD3B,sCAAgC,CADhC,OAGF,CAEA,mCAGE,sBAAuB,CADvB,QAAS,CAGT,eAAgB,CADhB,8CAA2C,CAH3C,QAAS,CAQT,0DAKF,CAHE,mEACE,aACF","file":"UnderlineNav-bec9faaa.css","sourcesContent":[".UnderlineWrapper {\n /* Progressive enhancement: Detect overflow using scroll-based animations.\n The idiomatic way would be a scroll-state container query but browser support\n is slightly better for animations. */\n animation: detect-overflow linear;\n animation-timeline: scroll(self block);\n\n &[data-hide-icons='true'] {\n --UnderlineNav_icons-display: none;\n }\n\n &[data-has-overflow='true'] {\n --UnderlineNav_moreButton-visibility: visible;\n }\n}\n\n@keyframes detect-overflow {\n 0%,\n 100% {\n --UnderlineNav_moreButton-visibility: visible;\n --UnderlineNav_icons-display: none;\n }\n}\n\n.ItemsList [data-component='icon'] {\n display: var(--UnderlineNav_icons-display, inline);\n}\n\n.MoreButtonContainer {\n display: flex;\n visibility: var(--UnderlineNav_moreButton-visibility, hidden);\n align-items: center;\n}\n\n.OverflowMenuItem [aria-current] .OverflowMenuItemLabel {\n font-weight: var(--base-text-weight-semibold);\n}\n\n.MoreButtonDivider {\n display: inline-block;\n border-left: var(--borderWidth-default) solid var(--borderColor-muted);\n width: 0;\n margin-right: var(--base-size-4);\n height: var(--base-size-24);\n}\n\n.MoreButton {\n margin: 0; /* reset Safari extra margin */\n border: 0;\n background: transparent;\n font-weight: var(--base-text-weight-normal);\n box-shadow: none;\n padding-top: var(--base-size-4);\n padding-bottom: var(--base-size-4);\n padding-left: var(--base-size-8);\n padding-right: var(--base-size-8);\n\n & > [data-component='trailingVisual'] {\n margin-left: 0;\n }\n}\n"]}
|
|
@@ -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;AAWjF,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,GAAI,UAAU,KAAK,CAAC,SAAS,KAEgC,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,EAChH,CAAA;AAED,eAAO,MAAM,YAAY,mFA0IxB,CAAA"}
|
|
@@ -1,119 +1,20 @@
|
|
|
1
|
-
import React, { forwardRef, useRef, useState,
|
|
2
|
-
import { UnderlineNavContext } from './UnderlineNavContext.js';
|
|
3
|
-
import { useResizeObserver } from '../hooks/useResizeObserver.js';
|
|
1
|
+
import React, { forwardRef, useRef, useState, useCallback, useEffect } from 'react';
|
|
4
2
|
import VisuallyHidden from '../_VisuallyHidden.js';
|
|
5
|
-
import { dividerStyles, baseMenuMinWidth, menuItemStyles } from './styles.js';
|
|
6
|
-
import { UnderlineWrapper, UnderlineItemList, LoadingCounter, GAP } from '../internal/components/UnderlineTabbedInterface.js';
|
|
7
|
-
import { TriangleDownIcon } from '@primer/octicons-react';
|
|
8
|
-
import { useOnEscapePress } from '../hooks/useOnEscapePress.js';
|
|
9
|
-
import { useOnOutsideClick } from '../hooks/useOnOutsideClick.js';
|
|
10
|
-
import { useId } from '../hooks/useId.js';
|
|
11
3
|
import { ActionList } from '../ActionList/index.js';
|
|
4
|
+
import { UnderlineWrapper, UnderlineItemList, LoadingCounter } from '../internal/components/UnderlineTabbedInterface.js';
|
|
12
5
|
import { invariant } from '../utils/invariant.js';
|
|
13
6
|
import classes from './UnderlineNav.module.css.js';
|
|
14
|
-
import {
|
|
15
|
-
import { jsxs, jsx
|
|
16
|
-
import { ButtonComponent } from '../Button/Button.js';
|
|
7
|
+
import { UnderlineNavContext } from './UnderlineNavContext.js';
|
|
8
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
17
9
|
import CounterLabel from '../CounterLabel/CounterLabel.js';
|
|
10
|
+
import { ActionMenu } from '../ActionMenu/ActionMenu.js';
|
|
18
11
|
|
|
19
|
-
// When page is loaded, we don't have ref for the more button as it is not on the DOM yet.
|
|
20
|
-
// However, we need to calculate number of possible items when the more button present as well. So using the width of the more button as a constant.
|
|
21
|
-
const MORE_BTN_WIDTH = 86;
|
|
22
12
|
// 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.
|
|
23
|
-
const MORE_BTN_HEIGHT =
|
|
24
|
-
const overflowEffect = (navWidth, moreMenuWidth, childArray, childWidthArray, noIconChildWidthArray, updateListAndMenu) => {
|
|
25
|
-
let iconsVisible = true;
|
|
26
|
-
if (childWidthArray.length === 0) {
|
|
27
|
-
updateListAndMenu({
|
|
28
|
-
items: childArray,
|
|
29
|
-
menuItems: []
|
|
30
|
-
}, iconsVisible, false);
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
const numberOfItemsPossible = calculatePossibleItems(childWidthArray, navWidth);
|
|
34
|
-
const numberOfItemsWithoutIconPossible = calculatePossibleItems(noIconChildWidthArray, navWidth);
|
|
35
|
-
// We need to take more menu width into account when calculating the number of items possible
|
|
36
|
-
const numberOfItemsPossibleWithMoreMenu = calculatePossibleItems(noIconChildWidthArray, navWidth, moreMenuWidth || MORE_BTN_WIDTH);
|
|
37
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
38
|
-
const items = [];
|
|
39
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
40
|
-
const menuItems = [];
|
|
41
|
-
|
|
42
|
-
// First, we check if we can fit all the items with their icons
|
|
43
|
-
if (childArray.length <= numberOfItemsPossible) {
|
|
44
|
-
items.push(...childArray);
|
|
45
|
-
} else if (childArray.length <= numberOfItemsWithoutIconPossible) {
|
|
46
|
-
// if we can't fit all the items with their icons, we check if we can fit all the items without their icons
|
|
47
|
-
iconsVisible = false;
|
|
48
|
-
items.push(...childArray);
|
|
49
|
-
} else {
|
|
50
|
-
// if we can't fit all the items without their icons, we keep the icons hidden and show the ones that doesn't fit into the list in the overflow menu
|
|
51
|
-
iconsVisible = false;
|
|
52
|
-
|
|
53
|
-
/* Below is an accessibility requirement. Never show only one item in the overflow menu.
|
|
54
|
-
* If there is only one item left to display in the overflow menu according to the calculation,
|
|
55
|
-
* we need to pull another item from the list into the overflow menu.
|
|
56
|
-
*/
|
|
57
|
-
const numberOfItemsInMenu = childArray.length - numberOfItemsPossibleWithMoreMenu;
|
|
58
|
-
const numberOfListItems = numberOfItemsInMenu === 1 ? numberOfItemsPossibleWithMoreMenu - 1 : numberOfItemsPossibleWithMoreMenu;
|
|
59
|
-
for (const [index, child] of childArray.entries()) {
|
|
60
|
-
if (index < numberOfListItems) {
|
|
61
|
-
items.push(child);
|
|
62
|
-
} else {
|
|
63
|
-
const ariaCurrent = child.props['aria-current'];
|
|
64
|
-
const isCurrent = Boolean(ariaCurrent) && ariaCurrent !== 'false';
|
|
65
|
-
// We need to make sure to keep the selected item always visible.
|
|
66
|
-
// To do that, we swap the selected item with the last item in the list to make it visible. (When there is at least 1 item in the list to swap.)
|
|
67
|
-
if (isCurrent && numberOfListItems > 0) {
|
|
68
|
-
// If selected item couldn't make in to the list, we swap it with the last item in the list.
|
|
69
|
-
const indexToReplaceAt = numberOfListItems - 1; // because we are replacing the last item in the list
|
|
70
|
-
// splice method modifies the array by removing 1 item here at the given index and replace it with the "child" element then returns the removed item.
|
|
71
|
-
const propsectiveAction = items.splice(indexToReplaceAt, 1, child)[0];
|
|
72
|
-
menuItems.push(propsectiveAction);
|
|
73
|
-
} else {
|
|
74
|
-
menuItems.push(child);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
updateListAndMenu({
|
|
80
|
-
items,
|
|
81
|
-
menuItems
|
|
82
|
-
}, iconsVisible, true);
|
|
83
|
-
};
|
|
13
|
+
const MORE_BTN_HEIGHT = 32;
|
|
84
14
|
const getValidChildren = children => {
|
|
85
15
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
86
16
|
return React.Children.toArray(children).filter(child => /*#__PURE__*/React.isValidElement(child));
|
|
87
17
|
};
|
|
88
|
-
const calculatePossibleItems = (childWidthArray, navWidth, moreMenuWidth = 0) => {
|
|
89
|
-
const widthToFit = navWidth - moreMenuWidth;
|
|
90
|
-
let breakpoint = childWidthArray.length; // assume all items will fit
|
|
91
|
-
let sumsOfChildWidth = 0;
|
|
92
|
-
for (const [index, childWidth] of childWidthArray.entries()) {
|
|
93
|
-
sumsOfChildWidth = sumsOfChildWidth + childWidth.width + GAP;
|
|
94
|
-
if (sumsOfChildWidth > widthToFit) {
|
|
95
|
-
breakpoint = index;
|
|
96
|
-
break;
|
|
97
|
-
} else {
|
|
98
|
-
continue;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
return breakpoint;
|
|
102
|
-
};
|
|
103
|
-
|
|
104
|
-
// Inline styles converted from baseMenuStyles for use as CSSProperties
|
|
105
|
-
const baseMenuInlineStyles = {
|
|
106
|
-
position: 'absolute',
|
|
107
|
-
zIndex: 1,
|
|
108
|
-
top: '90%',
|
|
109
|
-
boxShadow: '0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24)',
|
|
110
|
-
borderRadius: 12,
|
|
111
|
-
background: 'var(--overlay-bgColor)',
|
|
112
|
-
listStyle: 'none',
|
|
113
|
-
minWidth: `${baseMenuMinWidth}px`,
|
|
114
|
-
maxWidth: '640px',
|
|
115
|
-
right: 0
|
|
116
|
-
};
|
|
117
18
|
const UnderlineNav = /*#__PURE__*/forwardRef(({
|
|
118
19
|
as = 'nav',
|
|
119
20
|
'aria-label': ariaLabel,
|
|
@@ -122,41 +23,31 @@ const UnderlineNav = /*#__PURE__*/forwardRef(({
|
|
|
122
23
|
className,
|
|
123
24
|
children
|
|
124
25
|
}, forwardedRef) => {
|
|
125
|
-
var _listRef$current2;
|
|
126
26
|
const backupRef = useRef(null);
|
|
127
27
|
const navRef = forwardedRef !== null && forwardedRef !== void 0 ? forwardedRef : backupRef;
|
|
128
28
|
const listRef = useRef(null);
|
|
129
|
-
const moreMenuRef = useRef(null);
|
|
130
|
-
const moreMenuBtnRef = useRef(null);
|
|
131
|
-
const containerRef = React.useRef(null);
|
|
132
|
-
const disclosureWidgetId = useId();
|
|
133
|
-
const [isWidgetOpen, setIsWidgetOpen] = useState(false);
|
|
134
|
-
const [iconsVisible, setIconsVisible] = useState(true);
|
|
135
|
-
const [childWidthArray, setChildWidthArray] = useState([]);
|
|
136
|
-
const [noIconChildWidthArray, setNoIconChildWidthArray] = useState([]);
|
|
137
|
-
// Track whether the initial overflow calculation is complete to prevent CLS
|
|
138
|
-
const [isOverflowMeasured, setIsOverflowMeasured] = useState(false);
|
|
139
|
-
const validChildren = getValidChildren(children);
|
|
140
|
-
|
|
141
|
-
// Responsive props object manages which items are in the list and which items are in the menu.
|
|
142
|
-
const [responsiveProps, setResponsiveProps] = useState({
|
|
143
|
-
items: validChildren,
|
|
144
|
-
menuItems: []
|
|
145
|
-
});
|
|
146
29
|
|
|
147
|
-
|
|
148
|
-
const
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
const
|
|
30
|
+
/** Tracks whether any item has ever overflowed for the lifecycle of this component. Used to prevent flickering. */
|
|
31
|
+
const [isOrEverHasOverflowed, setIsOrEverHasOverflowed] = useState(false);
|
|
32
|
+
const [registeredItems, setRegisteredItems] = useState(() => new Map());
|
|
33
|
+
const registerItem = useCallback((id, menuItemProps) => {
|
|
34
|
+
setRegisteredItems(prev => {
|
|
35
|
+
if (menuItemProps === null && prev.get(id) === null) return prev;
|
|
36
|
+
if (menuItemProps !== null) setIsOrEverHasOverflowed(true);
|
|
37
|
+
const copy = new Map(prev);
|
|
38
|
+
copy.set(id, menuItemProps);
|
|
39
|
+
return copy;
|
|
40
|
+
});
|
|
41
|
+
}, []);
|
|
42
|
+
const unregisterItem = useCallback(id => {
|
|
43
|
+
setRegisteredItems(prev => {
|
|
44
|
+
if (!prev.has(id)) return prev;
|
|
45
|
+
const copy = new Map(prev);
|
|
46
|
+
copy.delete(id);
|
|
47
|
+
return copy;
|
|
48
|
+
});
|
|
49
|
+
}, []);
|
|
50
|
+
const validChildren = getValidChildren(children);
|
|
160
51
|
if (process.env.NODE_ENV !== "production") {
|
|
161
52
|
// Practically, this is not a conditional hook, it is just making sure this hook runs only on DEV not PROD.
|
|
162
53
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
@@ -169,216 +60,86 @@ const UnderlineNav = /*#__PURE__*/forwardRef(({
|
|
|
169
60
|
!ariaLabel ? process.env.NODE_ENV !== "production" ? invariant(false, 'Use the `aria-label` prop to provide an accessible label for assistive technology') : invariant(false) : void 0;
|
|
170
61
|
});
|
|
171
62
|
}
|
|
172
|
-
|
|
173
|
-
var _noIconChildWidthArra, _noIconChildWidthArra2;
|
|
174
|
-
return (_noIconChildWidthArra = (_noIconChildWidthArra2 = noIconChildWidthArray.find(item => item.text === itemText)) === null || _noIconChildWidthArra2 === void 0 ? void 0 : _noIconChildWidthArra2.width) !== null && _noIconChildWidthArra !== void 0 ? _noIconChildWidthArra : 0;
|
|
175
|
-
}
|
|
176
|
-
const swapMenuItemWithListItem = (prospectiveListItem, indexOfProspectiveListItem, event, callback) => {
|
|
177
|
-
var _navRef$current$getBo, _navRef$current, _listRef$current$getB, _listRef$current;
|
|
178
|
-
// get the selected menu item's width
|
|
179
|
-
const widthToFitIntoList = getItemsWidth(prospectiveListItem.props.children);
|
|
180
|
-
// Check if there is any empty space on the right side of the list
|
|
181
|
-
const availableSpace = ((_navRef$current$getBo = (_navRef$current = navRef.current) === null || _navRef$current === void 0 ? void 0 : _navRef$current.getBoundingClientRect().width) !== null && _navRef$current$getBo !== void 0 ? _navRef$current$getBo : 0) - ((_listRef$current$getB = (_listRef$current = listRef.current) === null || _listRef$current === void 0 ? void 0 : _listRef$current.getBoundingClientRect().width) !== null && _listRef$current$getB !== void 0 ? _listRef$current$getB : 0);
|
|
182
|
-
|
|
183
|
-
// Calculate how many items need to be pulled in to the menu to make room for the selected menu item
|
|
184
|
-
// I.e. if we need to pull 2 items in (index 0 and index 1), breakpoint (index) will return 1.
|
|
185
|
-
const index = getBreakpointForItemSwapping(widthToFitIntoList, availableSpace);
|
|
186
|
-
const indexToSliceAt = responsiveProps.items.length - 1 - index;
|
|
187
|
-
// Form the new list of items
|
|
188
|
-
const itemsLeftInList = [...responsiveProps.items].slice(0, indexToSliceAt);
|
|
189
|
-
const updatedItemList = [...itemsLeftInList, prospectiveListItem];
|
|
190
|
-
// Form the new menu items
|
|
191
|
-
const itemsToAddToMenu = [...responsiveProps.items].slice(indexToSliceAt);
|
|
192
|
-
const updatedMenuItems = [...menuItems];
|
|
193
|
-
// Add itemsToAddToMenu array's items to the menu at the index of the prospectiveListItem and remove 1 count of items (prospectiveListItem)
|
|
194
|
-
updatedMenuItems.splice(indexOfProspectiveListItem, 1, ...itemsToAddToMenu);
|
|
195
|
-
callback({
|
|
196
|
-
items: updatedItemList,
|
|
197
|
-
menuItems: updatedMenuItems
|
|
198
|
-
}, false, true);
|
|
199
|
-
};
|
|
200
|
-
// How many items do we need to pull in to the menu to make room for the selected menu item.
|
|
201
|
-
function getBreakpointForItemSwapping(widthToFitIntoList, availableSpace) {
|
|
202
|
-
let widthToSwap = 0;
|
|
203
|
-
let breakpoint = 0;
|
|
204
|
-
for (const [index, item] of [...responsiveProps.items].reverse().entries()) {
|
|
205
|
-
widthToSwap += getItemsWidth(item.props.children);
|
|
206
|
-
if (widthToFitIntoList < widthToSwap + availableSpace) {
|
|
207
|
-
breakpoint = index;
|
|
208
|
-
break;
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
return breakpoint;
|
|
212
|
-
}
|
|
213
|
-
const updateListAndMenu = useCallback((props, displayIcons, overflowMeasured) => {
|
|
214
|
-
setResponsiveProps(props);
|
|
215
|
-
setIconsVisible(displayIcons);
|
|
216
|
-
if (overflowMeasured) {
|
|
217
|
-
setIsOverflowMeasured(true);
|
|
218
|
-
}
|
|
219
|
-
}, []);
|
|
220
|
-
const setChildrenWidth = useCallback(size => {
|
|
221
|
-
setChildWidthArray(arr => {
|
|
222
|
-
const newArr = [...arr, size];
|
|
223
|
-
return newArr;
|
|
224
|
-
});
|
|
225
|
-
}, []);
|
|
226
|
-
const setNoIconChildrenWidth = useCallback(size => {
|
|
227
|
-
setNoIconChildWidthArray(arr => {
|
|
228
|
-
const newArr = [...arr, size];
|
|
229
|
-
return newArr;
|
|
230
|
-
});
|
|
231
|
-
}, []);
|
|
232
|
-
const closeOverlay = React.useCallback(() => {
|
|
233
|
-
setIsWidgetOpen(false);
|
|
234
|
-
}, [setIsWidgetOpen]);
|
|
235
|
-
const focusOnMoreMenuBtn = React.useCallback(() => {
|
|
236
|
-
var _moreMenuBtnRef$curre;
|
|
237
|
-
(_moreMenuBtnRef$curre = moreMenuBtnRef.current) === null || _moreMenuBtnRef$curre === void 0 ? void 0 : _moreMenuBtnRef$curre.focus();
|
|
238
|
-
}, []);
|
|
239
|
-
const onAnchorClick = useCallback(event => {
|
|
240
|
-
if (event.defaultPrevented || event.button !== 0) {
|
|
241
|
-
return;
|
|
242
|
-
}
|
|
243
|
-
setIsWidgetOpen(isWidgetOpen => !isWidgetOpen);
|
|
244
|
-
}, []);
|
|
245
|
-
useOnEscapePress(event => {
|
|
246
|
-
if (isWidgetOpen) {
|
|
247
|
-
event.preventDefault();
|
|
248
|
-
closeOverlay();
|
|
249
|
-
focusOnMoreMenuBtn();
|
|
250
|
-
}
|
|
251
|
-
}, [isWidgetOpen]);
|
|
252
|
-
useOnOutsideClick({
|
|
253
|
-
onClickOutside: closeOverlay,
|
|
254
|
-
containerRef,
|
|
255
|
-
ignoreClickRefs: [moreMenuBtnRef]
|
|
256
|
-
});
|
|
257
|
-
useResizeObserver(resizeObserverEntries => {
|
|
258
|
-
var _moreMenuRef$current$, _moreMenuRef$current;
|
|
259
|
-
const navWidth = resizeObserverEntries[0].contentRect.width;
|
|
260
|
-
const moreMenuWidth = (_moreMenuRef$current$ = (_moreMenuRef$current = moreMenuRef.current) === null || _moreMenuRef$current === void 0 ? void 0 : _moreMenuRef$current.getBoundingClientRect().width) !== null && _moreMenuRef$current$ !== void 0 ? _moreMenuRef$current$ : 0;
|
|
261
|
-
navWidth !== 0 && overflowEffect(navWidth, moreMenuWidth, validChildren, childWidthArray, noIconChildWidthArray, updateListAndMenu);
|
|
262
|
-
}, navRef);
|
|
263
|
-
|
|
264
|
-
// Compute menuInlineStyles if needed
|
|
265
|
-
let menuInlineStyles = {
|
|
266
|
-
...baseMenuInlineStyles
|
|
267
|
-
};
|
|
268
|
-
if (containerRef.current && listRef.current) {
|
|
269
|
-
const {
|
|
270
|
-
left
|
|
271
|
-
} = getAnchoredPosition(containerRef.current, listRef.current, {
|
|
272
|
-
align: 'start',
|
|
273
|
-
side: 'outside-bottom'
|
|
274
|
-
});
|
|
275
|
-
menuInlineStyles = {
|
|
276
|
-
...baseMenuInlineStyles,
|
|
277
|
-
right: undefined,
|
|
278
|
-
left
|
|
279
|
-
};
|
|
280
|
-
}
|
|
63
|
+
const menuItems = Array.from(registeredItems.entries()).filter(entry => entry[1] !== null);
|
|
281
64
|
return /*#__PURE__*/jsxs(UnderlineNavContext.Provider, {
|
|
282
65
|
value: {
|
|
283
|
-
setChildrenWidth,
|
|
284
|
-
setNoIconChildrenWidth,
|
|
285
66
|
loadingCounters,
|
|
286
|
-
|
|
67
|
+
registerItem,
|
|
68
|
+
unregisterItem
|
|
287
69
|
},
|
|
288
70
|
children: [ariaLabel && /*#__PURE__*/jsx(VisuallyHidden, {
|
|
289
71
|
as: "h2",
|
|
290
72
|
children: `${ariaLabel} navigation`
|
|
291
|
-
}), /*#__PURE__*/
|
|
73
|
+
}), /*#__PURE__*/jsxs(UnderlineWrapper, {
|
|
292
74
|
as: as,
|
|
293
75
|
"aria-label": ariaLabel,
|
|
294
76
|
className: className,
|
|
295
77
|
ref: navRef,
|
|
296
78
|
"data-variant": variant,
|
|
297
|
-
"data-overflow-
|
|
298
|
-
|
|
79
|
+
"data-overflow-mode": "wrap"
|
|
80
|
+
// Force icons to stay hidden, avoiding flickering as icons create/remove overflow
|
|
81
|
+
,
|
|
82
|
+
"data-hide-icons": isOrEverHasOverflowed ? 'true' : 'false'
|
|
83
|
+
// Ensure button is shown (after initial render) on browsers that don't support scroll-driven animations
|
|
84
|
+
,
|
|
85
|
+
"data-has-overflow": menuItems.length > 0 ? 'true' : 'false',
|
|
86
|
+
children: [/*#__PURE__*/jsx(UnderlineItemList, {
|
|
299
87
|
ref: listRef,
|
|
300
88
|
role: "list",
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
89
|
+
className: classes.ItemsList,
|
|
90
|
+
children: children
|
|
91
|
+
}), /*#__PURE__*/jsxs("div", {
|
|
92
|
+
style: {
|
|
93
|
+
height: `${MORE_BTN_HEIGHT}px`
|
|
94
|
+
},
|
|
95
|
+
className: classes.MoreButtonContainer,
|
|
96
|
+
children: [/*#__PURE__*/jsx("div", {
|
|
97
|
+
className: classes.MoreButtonDivider
|
|
98
|
+
}), /*#__PURE__*/jsxs(ActionMenu, {
|
|
99
|
+
children: [/*#__PURE__*/jsx(ActionMenu.Button, {
|
|
312
100
|
className: classes.MoreButton,
|
|
313
|
-
"
|
|
314
|
-
"
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
children: [/*#__PURE__*/jsxs(VisuallyHidden, {
|
|
320
|
-
as: "span",
|
|
321
|
-
children: [`${ariaLabel}`, "\xA0"]
|
|
322
|
-
}), "Menu"]
|
|
323
|
-
}) : /*#__PURE__*/jsxs(Fragment, {
|
|
324
|
-
children: ["More", /*#__PURE__*/jsxs(VisuallyHidden, {
|
|
325
|
-
as: "span",
|
|
326
|
-
children: ["\xA0", `${ariaLabel} items`]
|
|
327
|
-
})]
|
|
328
|
-
})
|
|
101
|
+
"data-component": "overflow-menu-button",
|
|
102
|
+
children: /*#__PURE__*/jsxs("span", {
|
|
103
|
+
children: ["More", /*#__PURE__*/jsx(VisuallyHidden, {
|
|
104
|
+
as: "span",
|
|
105
|
+
children: "\xA0 items"
|
|
106
|
+
})]
|
|
329
107
|
})
|
|
330
|
-
}), /*#__PURE__*/jsx(
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
return /*#__PURE__*/jsx(ActionList.LinkItem, {
|
|
355
|
-
style: menuItemStyles,
|
|
356
|
-
onClick: event => {
|
|
357
|
-
// When there are no items in the list, do not run the swap function as we want to keep everything in the menu.
|
|
358
|
-
!onlyMenuVisible && swapMenuItemWithListItem(menuItem, index, event, updateListAndMenu);
|
|
359
|
-
closeOverlay();
|
|
360
|
-
focusOnMoreMenuBtn();
|
|
361
|
-
// fire onSelect event that comes from the UnderlineNav.Item (if it is defined)
|
|
362
|
-
typeof onSelect === 'function' && onSelect(event);
|
|
363
|
-
},
|
|
364
|
-
...menuItemProps,
|
|
365
|
-
children: /*#__PURE__*/jsxs("span", {
|
|
366
|
-
className: classes.MenuItemContent,
|
|
367
|
-
children: [menuItemChildren, loadingCounters ? /*#__PURE__*/jsx(LoadingCounter, {}) : counter !== undefined && /*#__PURE__*/jsx("span", {
|
|
368
|
-
"data-component": "counter",
|
|
369
|
-
children: /*#__PURE__*/jsx(CounterLabel, {
|
|
370
|
-
children: counter
|
|
108
|
+
}), /*#__PURE__*/jsx(ActionMenu.Overlay, {
|
|
109
|
+
children: /*#__PURE__*/jsx(ActionList, {
|
|
110
|
+
children: menuItems.map(([key, allProps]) => {
|
|
111
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
112
|
+
const {
|
|
113
|
+
children: menuItemChildren,
|
|
114
|
+
counter,
|
|
115
|
+
as,
|
|
116
|
+
onSelect,
|
|
117
|
+
...menuItemProps
|
|
118
|
+
} = allProps;
|
|
119
|
+
return /*#__PURE__*/jsxs(ActionList.LinkItem, {
|
|
120
|
+
className: classes.OverflowMenuItem,
|
|
121
|
+
onClick: event => onSelect === null || onSelect === void 0 ? void 0 : onSelect(event),
|
|
122
|
+
...menuItemProps,
|
|
123
|
+
children: [/*#__PURE__*/jsx("span", {
|
|
124
|
+
className: classes.OverflowMenuItemLabel,
|
|
125
|
+
children: menuItemChildren
|
|
126
|
+
}), /*#__PURE__*/jsx(ActionList.TrailingVisual, {
|
|
127
|
+
children: loadingCounters ? /*#__PURE__*/jsx(LoadingCounter, {}) : counter !== undefined && /*#__PURE__*/jsx("span", {
|
|
128
|
+
"data-component": "counter",
|
|
129
|
+
children: /*#__PURE__*/jsx(CounterLabel, {
|
|
130
|
+
children: counter
|
|
131
|
+
})
|
|
371
132
|
})
|
|
372
133
|
})]
|
|
373
|
-
})
|
|
374
|
-
}
|
|
134
|
+
}, key);
|
|
135
|
+
})
|
|
375
136
|
})
|
|
376
137
|
})]
|
|
377
138
|
})]
|
|
378
|
-
})
|
|
139
|
+
})]
|
|
379
140
|
})]
|
|
380
141
|
});
|
|
381
142
|
});
|
|
382
143
|
UnderlineNav.displayName = 'UnderlineNav';
|
|
383
144
|
|
|
384
|
-
export {
|
|
145
|
+
export { UnderlineNav, getValidChildren };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import './UnderlineNav-
|
|
1
|
+
import './UnderlineNav-bec9faaa.css';
|
|
2
2
|
|
|
3
|
-
var classes = {"
|
|
3
|
+
var classes = {"UnderlineWrapper":"prc-UnderlineNav-UnderlineWrapper-GWONT","detect-overflow":"prc-UnderlineNav-detect-overflow-6HuSH","ItemsList":"prc-UnderlineNav-ItemsList-oj8gN","MoreButtonContainer":"prc-UnderlineNav-MoreButtonContainer-Dnrq6","OverflowMenuItem":"prc-UnderlineNav-OverflowMenuItem-7SG7M","OverflowMenuItemLabel":"prc-UnderlineNav-OverflowMenuItemLabel-F80v6","MoreButtonDivider":"prc-UnderlineNav-MoreButtonDivider-dN0a-","MoreButton":"prc-UnderlineNav-MoreButton-Y8soj"};
|
|
4
4
|
|
|
5
5
|
export { classes as default };
|
|
@@ -1,14 +1,7 @@
|
|
|
1
|
-
import type
|
|
2
|
-
export declare const UnderlineNavContext:
|
|
3
|
-
setChildrenWidth: React.Dispatch<{
|
|
4
|
-
text: string;
|
|
5
|
-
width: number;
|
|
6
|
-
}>;
|
|
7
|
-
setNoIconChildrenWidth: React.Dispatch<{
|
|
8
|
-
text: string;
|
|
9
|
-
width: number;
|
|
10
|
-
}>;
|
|
1
|
+
import type { UnderlineNavItemProps } from './UnderlineNavItem';
|
|
2
|
+
export declare const UnderlineNavContext: import("react").Context<{
|
|
11
3
|
loadingCounters: boolean;
|
|
12
|
-
|
|
4
|
+
registerItem: (id: string, props: UnderlineNavItemProps | null) => void;
|
|
5
|
+
unregisterItem: (id: string) => void;
|
|
13
6
|
}>;
|
|
14
7
|
//# sourceMappingURL=UnderlineNavContext.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UnderlineNavContext.d.ts","sourceRoot":"","sources":["../../src/UnderlineNav/UnderlineNavContext.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"UnderlineNavContext.d.ts","sourceRoot":"","sources":["../../src/UnderlineNav/UnderlineNavContext.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,qBAAqB,EAAC,MAAM,oBAAoB,CAAA;AAE7D,eAAO,MAAM,mBAAmB;qBACb,OAAO;kBACV,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,qBAAqB,GAAG,IAAI,KAAK,IAAI;oBACvD,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI;EAKpC,CAAA"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { createContext } from 'react';
|
|
2
2
|
|
|
3
3
|
const UnderlineNavContext = /*#__PURE__*/createContext({
|
|
4
|
-
setChildrenWidth: () => null,
|
|
5
|
-
setNoIconChildrenWidth: () => null,
|
|
6
4
|
loadingCounters: false,
|
|
7
|
-
|
|
5
|
+
registerItem: () => {},
|
|
6
|
+
unregisterItem: () => {}
|
|
8
7
|
});
|
|
9
8
|
|
|
10
9
|
export { UnderlineNavContext };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/UnderlineNav/UnderlineNavItem.module.css.js"],"names":[],"mappings":"AAAA,yCAGE,kBAAmB,CAFnB,YAAa,CACb,qBAAsB,CAEtB,eACF","file":"UnderlineNavItem-db9dc5d0.css","sourcesContent":[".UnderlineNavItem {\n display: flex;\n flex-direction: column;\n align-items: center;\n overflow: hidden;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UnderlineNavItem.d.ts","sourceRoot":"","sources":["../../src/UnderlineNav/UnderlineNavItem.tsx"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"UnderlineNavItem.d.ts","sourceRoot":"","sources":["../../src/UnderlineNav/UnderlineNavItem.tsx"],"names":[],"mappings":"AACA,OAAO,KAAmE,MAAM,OAAO,CAAA;AACvF,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,wBAAwB,CAAA;AACrD,OAAO,KAAK,EAAC,mBAAmB,IAAI,8BAA8B,EAAC,MAAM,sBAAsB,CAAA;AAM/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;IAE1B;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAA;IAExG;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,CAAA;IAE5F;;;OAGG;IAEH,IAAI,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,SAAS,CAAC,GAAG,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,CAAA;IAEnE;;OAEG;IACH,aAAa,CAAC,EAAE,KAAK,CAAC,YAAY,CAAA;IAElC;;QAEI;IACJ,EAAE,CAAC,EAAE,KAAK,CAAC,WAAW,GAAG,GAAG,CAAA;IAE5B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CAC1B,GAAG,SAAS,CAAA;AAEb,eAAO,MAAM,gBAAgB,EA+EvB,8BAA8B,CAAC,GAAG,EAAE,qBAAqB,CAAC,CAAA"}
|