@primer/react 38.2.0 → 38.3.0-rc.29e27efda
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.
Potentially problematic release.
This version of @primer/react might be problematic. Click here for more details.
- package/CHANGELOG.md +16 -0
- package/dist/ActionList/ActionList-370a46b8.css +2 -0
- package/dist/ActionList/ActionList-370a46b8.css.map +1 -0
- package/dist/ActionList/ActionList.module.css.js +2 -2
- package/dist/ActionList/ActionListContainerContext.d.ts +1 -1
- package/dist/ActionList/ActionListContainerContext.d.ts.map +1 -1
- package/dist/ActionMenu/ActionMenu.d.ts +3 -3
- package/dist/ActionMenu/ActionMenu.d.ts.map +1 -1
- package/dist/ActionMenu/ActionMenu.js +1 -1
- package/dist/Autocomplete/AutocompleteMenu.d.ts +2 -2
- package/dist/Autocomplete/AutocompleteMenu.d.ts.map +1 -1
- package/dist/Banner/Banner-c1744c4b.css +1 -1
- package/dist/Banner/Banner-c1744c4b.css.map +1 -1
- package/dist/Banner/Banner.d.ts +10 -0
- package/dist/Banner/Banner.d.ts.map +1 -1
- package/dist/Banner/Banner.js +4 -2
- package/dist/Banner/index.d.ts +1 -0
- package/dist/Banner/index.d.ts.map +1 -1
- package/dist/Blankslate/Blankslate-2be5efdc.css +1 -1
- package/dist/Blankslate/Blankslate-2be5efdc.css.map +1 -1
- package/dist/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
- package/dist/Breadcrumbs/Breadcrumbs.js +6 -0
- package/dist/Button/ButtonBase-781fba8b.css +1 -1
- package/dist/Button/ButtonBase-781fba8b.css.map +1 -1
- package/dist/Button/ButtonBase.d.ts.map +1 -1
- package/dist/Button/types.d.ts +3 -3
- package/dist/Button/types.d.ts.map +1 -1
- package/dist/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/Details/Details.d.ts.map +1 -1
- package/dist/Details/Details.js +3 -1
- package/dist/FilteredActionList/FilteredActionList.d.ts +19 -1
- package/dist/FilteredActionList/FilteredActionList.d.ts.map +1 -1
- package/dist/FilteredActionList/FilteredActionList.js +9 -5
- package/dist/FilteredActionList/types.d.ts +1 -1
- package/dist/FilteredActionList/types.d.ts.map +1 -1
- package/dist/KeybindingHint/key-names.js +1 -1
- package/dist/NavList/NavList.d.ts.map +1 -1
- package/dist/Overlay/Overlay.d.ts.map +1 -1
- package/dist/Overlay/Overlay.js +3 -1
- package/dist/Radio/Radio.d.ts.map +1 -1
- package/dist/SegmentedControl/SegmentedControl-5cfe12ab.css +2 -0
- package/dist/SegmentedControl/SegmentedControl-5cfe12ab.css.map +1 -0
- package/dist/SegmentedControl/SegmentedControl.d.ts.map +1 -1
- package/dist/SegmentedControl/SegmentedControl.js +115 -52
- package/dist/SegmentedControl/SegmentedControl.module.css.js +2 -2
- package/dist/SegmentedControl/SegmentedControlButton.d.ts +2 -2
- package/dist/SegmentedControl/SegmentedControlButton.d.ts.map +1 -1
- package/dist/SegmentedControl/SegmentedControlIconButton.d.ts +1 -1
- package/dist/SegmentedControl/SegmentedControlIconButton.d.ts.map +1 -1
- package/dist/SelectPanel/SelectPanel.d.ts +9 -9
- package/dist/SelectPanel/SelectPanel.d.ts.map +1 -1
- package/dist/SelectPanel/SelectPanelMessage.d.ts +1 -1
- package/dist/SelectPanel/SelectPanelMessage.d.ts.map +1 -1
- package/dist/SkeletonText/SkeletonText-5cf908c1.css +1 -1
- package/dist/SkeletonText/SkeletonText-5cf908c1.css.map +1 -1
- package/dist/Text/Text-ca7603b7.css +1 -1
- package/dist/Text/Text-ca7603b7.css.map +1 -1
- package/dist/Textarea/Textarea.d.ts.map +1 -1
- package/dist/ThemeProvider.js +1 -1
- package/dist/Tooltip/Tooltip-fffa9948.css +1 -1
- package/dist/Tooltip/Tooltip-fffa9948.css.map +1 -1
- package/dist/TooltipV2/Tooltip-5a80d7b2.css +1 -1
- package/dist/TooltipV2/Tooltip-5a80d7b2.css.map +1 -1
- package/dist/UnderlineNav/UnderlineNav.d.ts +1 -1
- package/dist/UnderlineNav/UnderlineNav.d.ts.map +1 -1
- package/dist/UnderlineNav/UnderlineNav.js +3 -0
- package/dist/UnderlineNav/UnderlineNavItem.d.ts +6 -1
- package/dist/UnderlineNav/UnderlineNavItem.d.ts.map +1 -1
- package/dist/UnderlineNav/UnderlineNavItem.js +39 -33
- package/dist/UnderlineNav/types.d.ts +2 -2
- package/dist/UnderlineNav/types.d.ts.map +1 -1
- package/dist/VisuallyHidden/VisuallyHidden.d.ts +1 -1
- package/dist/deprecated/ActionList/List.d.ts +1 -1
- package/dist/deprecated/ActionList/List.d.ts.map +1 -1
- package/dist/experimental/IssueLabel/IssueLabel-d9c2c5cf.css +1 -1
- package/dist/experimental/IssueLabel/IssueLabel-d9c2c5cf.css.map +1 -1
- package/dist/experimental/SelectPanel2/SelectPanel.d.ts +3 -3
- package/dist/experimental/SelectPanel2/SelectPanel.d.ts.map +1 -1
- package/dist/experimental/SelectPanel2/SelectPanel.js +1 -0
- package/dist/internal/components/{UnderlineTabbedInterface-addc90dd.css → UnderlineTabbedInterface-20c3ba3d.css} +1 -1
- package/dist/internal/components/UnderlineTabbedInterface-20c3ba3d.css.map +1 -0
- package/dist/internal/components/UnderlineTabbedInterface.d.ts +1 -1
- package/dist/internal/components/UnderlineTabbedInterface.d.ts.map +1 -1
- package/dist/internal/components/UnderlineTabbedInterface.module.css.js +1 -1
- package/dist/utils/polymorphic.d.ts +1 -1
- package/dist/utils/polymorphic.d.ts.map +1 -1
- package/generated/components.json +53 -7
- package/package.json +2 -1
- package/dist/ActionList/ActionList-46e9c2db.css +0 -2
- package/dist/ActionList/ActionList-46e9c2db.css.map +0 -1
- package/dist/SegmentedControl/SegmentedControl-7f79ab74.css +0 -2
- package/dist/SegmentedControl/SegmentedControl-7f79ab74.css.map +0 -1
- package/dist/internal/components/UnderlineTabbedInterface-addc90dd.css.map +0 -1
|
@@ -3,16 +3,16 @@ import React, { useRef, useState } from 'react';
|
|
|
3
3
|
import SegmentedControlButton from './SegmentedControlButton.js';
|
|
4
4
|
import { SegmentedControlIconButton } from './SegmentedControlIconButton.js';
|
|
5
5
|
import { ActionList } from '../ActionList/index.js';
|
|
6
|
-
import {
|
|
6
|
+
import { getResponsiveAttributes } from '../internal/utils/getResponsiveAttributes.js';
|
|
7
7
|
import { isElement } from 'react-is';
|
|
8
8
|
import classes from './SegmentedControl.module.css.js';
|
|
9
9
|
import { clsx } from 'clsx';
|
|
10
10
|
import { isSlot } from '../utils/is-slot.js';
|
|
11
|
-
import { jsx,
|
|
11
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
12
12
|
import { ActionMenu } from '../ActionMenu/ActionMenu.js';
|
|
13
13
|
|
|
14
14
|
const Root = t0 => {
|
|
15
|
-
const $ = c(
|
|
15
|
+
const $ = c(54);
|
|
16
16
|
let ariaLabel;
|
|
17
17
|
let ariaLabelledby;
|
|
18
18
|
let children;
|
|
@@ -67,8 +67,6 @@ const Root = t0 => {
|
|
|
67
67
|
t2 = $[12];
|
|
68
68
|
}
|
|
69
69
|
const isUncontrolled = t2;
|
|
70
|
-
const responsiveVariant = useResponsiveValue(variant, "default");
|
|
71
|
-
const isFullWidth = useResponsiveValue(fullWidth, false);
|
|
72
70
|
let t3;
|
|
73
71
|
if ($[13] !== children) {
|
|
74
72
|
const selectedSegments = React.Children.toArray(children).map(_temp2);
|
|
@@ -82,15 +80,28 @@ const Root = t0 => {
|
|
|
82
80
|
const selectedIndexExternal = t3;
|
|
83
81
|
const [selectedIndexInternalState, setSelectedIndexInternalState] = useState(selectedIndexExternal);
|
|
84
82
|
const selectedIndex = isUncontrolled ? selectedIndexInternalState : selectedIndexExternal;
|
|
83
|
+
let hasDropdownVariant;
|
|
85
84
|
let t4;
|
|
86
|
-
if ($[15] !== ariaLabel || $[16] !== ariaLabelledby || $[17] !== children || $[18] !==
|
|
85
|
+
if ($[15] !== ariaLabel || $[16] !== ariaLabelledby || $[17] !== children || $[18] !== isUncontrolled || $[19] !== onChange || $[20] !== selectedIndex || $[21] !== variant) {
|
|
87
86
|
const selectedChild = /*#__PURE__*/React.isValidElement(React.Children.toArray(children)[selectedIndex]) ? React.Children.toArray(children)[selectedIndex] : undefined;
|
|
88
87
|
const getChildIcon = _temp4;
|
|
89
88
|
const getChildText = _temp5;
|
|
90
89
|
if (!ariaLabel && !ariaLabelledby) {
|
|
91
90
|
console.warn("Use the `aria-label` or `aria-labelledby` prop to provide an accessible label for assistive technologies");
|
|
92
91
|
}
|
|
93
|
-
|
|
92
|
+
const responsiveVariant = typeof variant === "object" ? variant : undefined;
|
|
93
|
+
let t5;
|
|
94
|
+
if ($[24] !== responsiveVariant) {
|
|
95
|
+
t5 = responsiveVariant ? Object.values(responsiveVariant).includes("dropdown") : false;
|
|
96
|
+
$[24] = responsiveVariant;
|
|
97
|
+
$[25] = t5;
|
|
98
|
+
} else {
|
|
99
|
+
t5 = $[25];
|
|
100
|
+
}
|
|
101
|
+
hasDropdownVariant = t5;
|
|
102
|
+
t4 = hasDropdownVariant && /*#__PURE__*/jsx("div", {
|
|
103
|
+
className: classes.DropdownContainer,
|
|
104
|
+
...getResponsiveAttributes("variant", variant),
|
|
94
105
|
children: /*#__PURE__*/jsxs(ActionMenu, {
|
|
95
106
|
children: [/*#__PURE__*/jsx(ActionMenu.Button, {
|
|
96
107
|
"aria-label": ariaLabel && `${getChildText(selectedChild)}, ${ariaLabel}`,
|
|
@@ -118,15 +129,50 @@ const Root = t0 => {
|
|
|
118
129
|
})
|
|
119
130
|
})]
|
|
120
131
|
})
|
|
121
|
-
})
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
132
|
+
});
|
|
133
|
+
$[15] = ariaLabel;
|
|
134
|
+
$[16] = ariaLabelledby;
|
|
135
|
+
$[17] = children;
|
|
136
|
+
$[18] = isUncontrolled;
|
|
137
|
+
$[19] = onChange;
|
|
138
|
+
$[20] = selectedIndex;
|
|
139
|
+
$[21] = variant;
|
|
140
|
+
$[22] = hasDropdownVariant;
|
|
141
|
+
$[23] = t4;
|
|
142
|
+
} else {
|
|
143
|
+
hasDropdownVariant = $[22];
|
|
144
|
+
t4 = $[23];
|
|
145
|
+
}
|
|
146
|
+
const dropdownContent = t4;
|
|
147
|
+
let t5;
|
|
148
|
+
if ($[26] !== className) {
|
|
149
|
+
t5 = clsx(classes.SegmentedControl, className);
|
|
150
|
+
$[26] = className;
|
|
151
|
+
$[27] = t5;
|
|
152
|
+
} else {
|
|
153
|
+
t5 = $[27];
|
|
154
|
+
}
|
|
155
|
+
let t6;
|
|
156
|
+
if ($[28] !== fullWidth) {
|
|
157
|
+
t6 = getResponsiveAttributes("full-width", fullWidth);
|
|
158
|
+
$[28] = fullWidth;
|
|
159
|
+
$[29] = t6;
|
|
160
|
+
} else {
|
|
161
|
+
t6 = $[29];
|
|
162
|
+
}
|
|
163
|
+
let t7;
|
|
164
|
+
if ($[30] !== variant) {
|
|
165
|
+
t7 = getResponsiveAttributes("variant", variant);
|
|
166
|
+
$[30] = variant;
|
|
167
|
+
$[31] = t7;
|
|
168
|
+
} else {
|
|
169
|
+
t7 = $[31];
|
|
170
|
+
}
|
|
171
|
+
let t8;
|
|
172
|
+
if ($[32] !== children || $[33] !== isUncontrolled || $[34] !== onChange || $[35] !== selectedIndex) {
|
|
173
|
+
let t9;
|
|
174
|
+
if ($[37] !== isUncontrolled || $[38] !== onChange || $[39] !== selectedIndex) {
|
|
175
|
+
t9 = (child_2, index_0) => {
|
|
130
176
|
if (! /*#__PURE__*/React.isValidElement(child_2)) {
|
|
131
177
|
return null;
|
|
132
178
|
}
|
|
@@ -145,46 +191,63 @@ const Root = t0 => {
|
|
|
145
191
|
...child_2.props.style
|
|
146
192
|
}
|
|
147
193
|
};
|
|
148
|
-
if (responsiveVariant === "hideLabels" && /*#__PURE__*/React.isValidElement(child_2) && (child_2.type === SegmentedControlButton || isSlot(child_2, SegmentedControlButton))) {
|
|
149
|
-
const {
|
|
150
|
-
"aria-label": childAriaLabel,
|
|
151
|
-
leadingVisual: leadingVisual_0,
|
|
152
|
-
leadingIcon,
|
|
153
|
-
children: childPropsChildren,
|
|
154
|
-
...restChildProps
|
|
155
|
-
} = child_2.props;
|
|
156
|
-
const visual = leadingVisual_0 !== null && leadingVisual_0 !== void 0 ? leadingVisual_0 : leadingIcon;
|
|
157
|
-
if (!visual) {
|
|
158
|
-
console.warn("A `leadingVisual` or `leadingIcon` prop is required when hiding visible labels");
|
|
159
|
-
} else {
|
|
160
|
-
return /*#__PURE__*/jsx(SegmentedControlIconButton, {
|
|
161
|
-
"aria-label": childAriaLabel || childPropsChildren,
|
|
162
|
-
icon: visual,
|
|
163
|
-
className: classes.IconButton,
|
|
164
|
-
...sharedChildProps,
|
|
165
|
-
...restChildProps
|
|
166
|
-
});
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
194
|
return /*#__PURE__*/React.cloneElement(child_2, sharedChildProps);
|
|
170
|
-
}
|
|
195
|
+
};
|
|
196
|
+
$[37] = isUncontrolled;
|
|
197
|
+
$[38] = onChange;
|
|
198
|
+
$[39] = selectedIndex;
|
|
199
|
+
$[40] = t9;
|
|
200
|
+
} else {
|
|
201
|
+
t9 = $[40];
|
|
202
|
+
}
|
|
203
|
+
t8 = React.Children.map(children, t9);
|
|
204
|
+
$[32] = children;
|
|
205
|
+
$[33] = isUncontrolled;
|
|
206
|
+
$[34] = onChange;
|
|
207
|
+
$[35] = selectedIndex;
|
|
208
|
+
$[36] = t8;
|
|
209
|
+
} else {
|
|
210
|
+
t8 = $[36];
|
|
211
|
+
}
|
|
212
|
+
let t9;
|
|
213
|
+
if ($[41] !== ariaLabel || $[42] !== ariaLabelledby || $[43] !== rest || $[44] !== size || $[45] !== t5 || $[46] !== t6 || $[47] !== t7 || $[48] !== t8) {
|
|
214
|
+
t9 = /*#__PURE__*/jsx("ul", {
|
|
215
|
+
"aria-label": ariaLabel,
|
|
216
|
+
"aria-labelledby": ariaLabelledby,
|
|
217
|
+
ref: segmentedControlContainerRef,
|
|
218
|
+
className: t5,
|
|
219
|
+
...t6,
|
|
220
|
+
...t7,
|
|
221
|
+
"data-size": size,
|
|
222
|
+
...rest,
|
|
223
|
+
children: t8
|
|
171
224
|
});
|
|
172
|
-
$[
|
|
173
|
-
$[
|
|
174
|
-
$[
|
|
175
|
-
$[
|
|
176
|
-
$[
|
|
177
|
-
$[
|
|
178
|
-
$[
|
|
179
|
-
$[
|
|
180
|
-
$[
|
|
181
|
-
|
|
182
|
-
$[
|
|
183
|
-
|
|
225
|
+
$[41] = ariaLabel;
|
|
226
|
+
$[42] = ariaLabelledby;
|
|
227
|
+
$[43] = rest;
|
|
228
|
+
$[44] = size;
|
|
229
|
+
$[45] = t5;
|
|
230
|
+
$[46] = t6;
|
|
231
|
+
$[47] = t7;
|
|
232
|
+
$[48] = t8;
|
|
233
|
+
$[49] = t9;
|
|
234
|
+
} else {
|
|
235
|
+
t9 = $[49];
|
|
236
|
+
}
|
|
237
|
+
const segmentedControlContent = t9;
|
|
238
|
+
let t10;
|
|
239
|
+
if ($[50] !== dropdownContent || $[51] !== hasDropdownVariant || $[52] !== segmentedControlContent) {
|
|
240
|
+
t10 = hasDropdownVariant ? /*#__PURE__*/jsxs(Fragment, {
|
|
241
|
+
children: [dropdownContent, segmentedControlContent]
|
|
242
|
+
}) : segmentedControlContent;
|
|
243
|
+
$[50] = dropdownContent;
|
|
244
|
+
$[51] = hasDropdownVariant;
|
|
245
|
+
$[52] = segmentedControlContent;
|
|
246
|
+
$[53] = t10;
|
|
184
247
|
} else {
|
|
185
|
-
|
|
248
|
+
t10 = $[53];
|
|
186
249
|
}
|
|
187
|
-
return
|
|
250
|
+
return t10;
|
|
188
251
|
};
|
|
189
252
|
Root.displayName = 'SegmentedControl';
|
|
190
253
|
const SegmentedControl = Object.assign(Root, {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import './SegmentedControl-
|
|
1
|
+
import './SegmentedControl-5cfe12ab.css';
|
|
2
2
|
|
|
3
|
-
var classes = {"SegmentedControl":"prc-SegmentedControl-SegmentedControl-e7570","Item":"prc-SegmentedControl-Item-7Aq6h","Counter":"prc-SegmentedControl-Counter--H-pM","Button":"prc-SegmentedControl-Button-ojWXD","IconButton":"prc-SegmentedControl-IconButton-O80Eh","Content":"prc-SegmentedControl-Content-gnQ4n","
|
|
3
|
+
var classes = {"SegmentedControl":"prc-SegmentedControl-SegmentedControl-e7570","Text":"prc-SegmentedControl-Text-c5gSh","DropdownContainer":"prc-SegmentedControl-DropdownContainer-QSnSd","Item":"prc-SegmentedControl-Item-7Aq6h","Counter":"prc-SegmentedControl-Counter--H-pM","Button":"prc-SegmentedControl-Button-ojWXD","IconButton":"prc-SegmentedControl-IconButton-O80Eh","Content":"prc-SegmentedControl-Content-gnQ4n","LeadingIcon":"prc-SegmentedControl-LeadingIcon-dAHA8"};
|
|
4
4
|
|
|
5
5
|
export { classes as default };
|
|
@@ -10,9 +10,9 @@ export type SegmentedControlButtonProps = {
|
|
|
10
10
|
/** Whether the segment is selected. This is used for uncontrolled `SegmentedControls` to pick one `SegmentedControlButton` that is selected on the initial render. */
|
|
11
11
|
defaultSelected?: boolean;
|
|
12
12
|
/** The leading visual comes before item label */
|
|
13
|
-
leadingVisual?: React.FunctionComponent<React.PropsWithChildren<IconProps>> | React.ReactElement
|
|
13
|
+
leadingVisual?: React.FunctionComponent<React.PropsWithChildren<IconProps>> | React.ReactElement<any>;
|
|
14
14
|
/** @deprecated Use `leadingVisual` instead. The leading icon comes before item label */
|
|
15
|
-
leadingIcon?: React.FunctionComponent<React.PropsWithChildren<IconProps>> | React.ReactElement
|
|
15
|
+
leadingIcon?: React.FunctionComponent<React.PropsWithChildren<IconProps>> | React.ReactElement<any>;
|
|
16
16
|
/** Optional counter to display on the right side of the button */
|
|
17
17
|
count?: number | string;
|
|
18
18
|
} & ButtonHTMLAttributes<HTMLButtonElement | HTMLLIElement>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SegmentedControlButton.d.ts","sourceRoot":"","sources":["../../src/SegmentedControl/SegmentedControlButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,OAAO,CAAA;AAC/C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,wBAAwB,CAAA;AAMrD,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,gBAAgB,CAAA;AAEpD,MAAM,MAAM,2BAA2B,GAAG;IACxC,+CAA+C;IAC/C,QAAQ,EAAE,MAAM,CAAA;IAChB,oKAAoK;IACpK,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,sKAAsK;IACtK,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,iDAAiD;
|
|
1
|
+
{"version":3,"file":"SegmentedControlButton.d.ts","sourceRoot":"","sources":["../../src/SegmentedControl/SegmentedControlButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,OAAO,CAAA;AAC/C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,wBAAwB,CAAA;AAMrD,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,gBAAgB,CAAA;AAEpD,MAAM,MAAM,2BAA2B,GAAG;IACxC,+CAA+C;IAC/C,QAAQ,EAAE,MAAM,CAAA;IAChB,oKAAoK;IACpK,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,sKAAsK;IACtK,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,iDAAiD;IAEjD,aAAa,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAAC,iBAAiB,CAAC,SAAS,CAAC,CAAC,GAAG,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,CAAA;IACrG,wFAAwF;IAExF,WAAW,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAAC,iBAAiB,CAAC,SAAS,CAAC,CAAC,GAAG,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,CAAA;IACnG,kEAAkE;IAClE,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CACxB,GAAG,oBAAoB,CAAC,iBAAiB,GAAG,aAAa,CAAC,CAAA;AAE3D,QAAA,MAAM,sBAAsB,EAAE,gBAAgB,CAAC,KAAK,CAAC,iBAAiB,CAAC,2BAA2B,CAAC,CAiClG,CAAA;AAED,eAAe,sBAAsB,CAAA"}
|
|
@@ -6,7 +6,7 @@ import type { FCWithSlotMarker } from '../utils/types';
|
|
|
6
6
|
export type SegmentedControlIconButtonProps = {
|
|
7
7
|
'aria-label': string;
|
|
8
8
|
/** The icon that represents the segmented control item */
|
|
9
|
-
icon: React.FunctionComponent<React.PropsWithChildren<IconProps>> | React.ReactElement
|
|
9
|
+
icon: React.FunctionComponent<React.PropsWithChildren<IconProps>> | React.ReactElement<any>;
|
|
10
10
|
/** Whether the segment is selected. This is used for controlled SegmentedControls, and needs to be updated using the onChange handler on SegmentedControl. */
|
|
11
11
|
selected?: boolean;
|
|
12
12
|
/** Whether the segment is selected. This is used for uncontrolled SegmentedControls to pick one SegmentedControlButton that is selected on the initial render. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SegmentedControlIconButton.d.ts","sourceRoot":"","sources":["../../src/SegmentedControl/SegmentedControlIconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,OAAO,CAAA;AAC/C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,wBAAwB,CAAA;AAGrD,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,cAAc,CAAA;AAIlD,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,gBAAgB,CAAA;AAEpD,MAAM,MAAM,+BAA+B,GAAG;IAC5C,YAAY,EAAE,MAAM,CAAA;IACpB,0DAA0D;
|
|
1
|
+
{"version":3,"file":"SegmentedControlIconButton.d.ts","sourceRoot":"","sources":["../../src/SegmentedControl/SegmentedControlIconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,OAAO,CAAA;AAC/C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,wBAAwB,CAAA;AAGrD,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,cAAc,CAAA;AAIlD,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,gBAAgB,CAAA;AAEpD,MAAM,MAAM,+BAA+B,GAAG;IAC5C,YAAY,EAAE,MAAM,CAAA;IACpB,0DAA0D;IAE1D,IAAI,EAAE,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAAC,iBAAiB,CAAC,SAAS,CAAC,CAAC,GAAG,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,CAAA;IAC3F,8JAA8J;IAC9J,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,kKAAkK;IAClK,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,kFAAkF;IAClF,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,oCAAoC;IACpC,gBAAgB,CAAC,EAAE,gBAAgB,CAAA;CACpC,GAAG,oBAAoB,CAAC,iBAAiB,GAAG,aAAa,CAAC,CAAA;AAE3D,eAAO,MAAM,0BAA0B,EAAE,gBAAgB,CAAC,KAAK,CAAC,iBAAiB,CAAC,+BAA+B,CAAC,CAiDjH,CAAA;AAID,eAAe,0BAA0B,CAAA"}
|
|
@@ -17,8 +17,8 @@ interface SelectPanelMultiSelection {
|
|
|
17
17
|
export type InitialLoadingType = 'spinner' | 'skeleton';
|
|
18
18
|
export type SelectPanelSecondaryAction = React.ReactElement<typeof SecondaryButton> | React.ReactElement<typeof SecondaryLink>;
|
|
19
19
|
interface SelectPanelBaseProps {
|
|
20
|
-
title?: string | React.ReactElement
|
|
21
|
-
subtitle?: string | React.ReactElement
|
|
20
|
+
title?: string | React.ReactElement<any>;
|
|
21
|
+
subtitle?: string | React.ReactElement<any>;
|
|
22
22
|
onOpenChange: (open: boolean, gesture: 'anchor-click' | 'anchor-key-press' | 'click-outside' | 'escape' | 'selection' | 'cancel') => void;
|
|
23
23
|
secondaryAction?: SelectPanelSecondaryAction;
|
|
24
24
|
placeholder?: string;
|
|
@@ -27,20 +27,20 @@ interface SelectPanelBaseProps {
|
|
|
27
27
|
initialLoadingType?: InitialLoadingType;
|
|
28
28
|
className?: string;
|
|
29
29
|
notice?: {
|
|
30
|
-
text: string | React.ReactElement
|
|
30
|
+
text: string | React.ReactElement<any>;
|
|
31
31
|
variant: 'info' | 'warning' | 'error';
|
|
32
32
|
};
|
|
33
33
|
message?: {
|
|
34
34
|
title: string;
|
|
35
|
-
body: string | React.ReactElement
|
|
35
|
+
body: string | React.ReactElement<any>;
|
|
36
36
|
variant: 'empty' | 'error' | 'warning';
|
|
37
37
|
icon?: React.ComponentType<IconProps>;
|
|
38
|
-
action?: React.ReactElement
|
|
38
|
+
action?: React.ReactElement<any>;
|
|
39
39
|
};
|
|
40
40
|
/**
|
|
41
41
|
* @deprecated Use `secondaryAction` instead.
|
|
42
42
|
*/
|
|
43
|
-
footer?: string | React.ReactElement
|
|
43
|
+
footer?: string | React.ReactElement<any>;
|
|
44
44
|
showSelectedOptionsFirst?: boolean;
|
|
45
45
|
/**
|
|
46
46
|
* Whether to disable fullscreen behavior on narrow viewports.
|
|
@@ -67,9 +67,9 @@ export declare const SelectPanel: typeof Panel & {
|
|
|
67
67
|
SecondaryActionButton: React.FC<ButtonProps>;
|
|
68
68
|
SecondaryActionLink: React.FC<LinkButtonProps & {
|
|
69
69
|
alignContent?: import("../Button/types").AlignContent;
|
|
70
|
-
icon?: React.FunctionComponent<IconProps> | React.ElementType | React.ReactElement | null;
|
|
71
|
-
leadingVisual?: React.ElementType | React.ReactElement | null;
|
|
72
|
-
trailingVisual?: React.ElementType | React.ReactElement | null;
|
|
70
|
+
icon?: React.FunctionComponent<IconProps> | React.ElementType | React.ReactElement<any> | null;
|
|
71
|
+
leadingVisual?: React.ElementType | React.ReactElement<any> | null;
|
|
72
|
+
trailingVisual?: React.ElementType | React.ReactElement<any> | null;
|
|
73
73
|
trailingAction?: React.ElementType | null;
|
|
74
74
|
children?: React.ReactNode;
|
|
75
75
|
count?: number | string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectPanel.d.ts","sourceRoot":"","sources":["../../src/SelectPanel/SelectPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAsC,KAAK,SAAS,EAAC,MAAM,wBAAwB,CAAA;AAC1F,OAAO,KAAK,EAAE,EAA+E,KAAK,GAAG,EAAC,MAAM,OAAO,CAAA;AACnH,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,oBAAoB,CAAA;AAE5D,OAAO,KAAK,EAAC,iCAAiC,EAAC,MAAM,oCAAoC,CAAA;AACzF,OAAO,KAAK,EAAC,uBAAuB,EAAC,MAAM,uBAAuB,CAAA;AAGlE,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,YAAY,CAAA;AAE5C,OAAO,KAAK,EAAY,SAAS,EAAC,MAAM,IAAI,CAAA;AAiB5C,OAAO,KAAK,EAAC,WAAW,EAAE,eAAe,EAAC,MAAM,iBAAiB,CAAA;AAiCjE,UAAU,0BAA0B;IAClC,QAAQ,EAAE,SAAS,GAAG,SAAS,CAAA;IAC/B,gBAAgB,EAAE,CAAC,QAAQ,EAAE,SAAS,GAAG,SAAS,KAAK,IAAI,CAAA;CAC5D;AAED,UAAU,yBAAyB;IACjC,QAAQ,EAAE,SAAS,EAAE,CAAA;IACrB,gBAAgB,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,KAAK,IAAI,CAAA;CAClD;AAED,MAAM,MAAM,kBAAkB,GAAG,SAAS,GAAG,UAAU,CAAA;AACvD,MAAM,MAAM,0B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7 +16,7 @@ export type SelectPanelMessageProps = {
|
|
|
16
16
|
* Ensure the action element is accessible by providing appropriate ARIA attributes
|
|
17
17
|
* and making it keyboard-navigable.
|
|
18
18
|
*/
|
|
19
|
-
action?: React.ReactElement
|
|
19
|
+
action?: React.ReactElement<any>;
|
|
20
20
|
};
|
|
21
21
|
export declare const SelectPanelMessage: React.FC<SelectPanelMessageProps>;
|
|
22
22
|
//# sourceMappingURL=SelectPanelMessage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectPanelMessage.d.ts","sourceRoot":"","sources":["../../src/SelectPanel/SelectPanelMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,OAAO,EAAY,KAAK,SAAS,EAAC,MAAM,wBAAwB,CAAA;AAIhE,MAAM,MAAM,uBAAuB,GAAG;IACpC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,OAAO,GAAG,OAAO,GAAG,SAAS,CAAA;IACtC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;OAGG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,SAAS,CAAC,CAAA;IACrC;;;;;OAKG;
|
|
1
|
+
{"version":3,"file":"SelectPanelMessage.d.ts","sourceRoot":"","sources":["../../src/SelectPanel/SelectPanelMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,OAAO,EAAY,KAAK,SAAS,EAAC,MAAM,wBAAwB,CAAA;AAIhE,MAAM,MAAM,uBAAuB,GAAG;IACpC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,OAAO,GAAG,OAAO,GAAG,SAAS,CAAA;IACtC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;OAGG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,SAAS,CAAC,CAAA;IACrC;;;;;OAKG;IAEH,MAAM,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,CAAA;CACjC,CAAA;AAED,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAkBhE,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
.prc-SkeletonText-SkeletonText-tW5nH{--font-size:var(--text-body-size-medium,0.875rem);--line-height:var(--text-body-lineHeight-medium,1.
|
|
1
|
+
.prc-SkeletonText-SkeletonText-tW5nH{--font-size:var(--text-body-size-medium,0.875rem);--line-height:var(--text-body-lineHeight-medium,1.42857);--leading:calc(var(--font-size)*var(--line-height) - var(--font-size))}@supports (margin-block:mod(1px,1px)){.prc-SkeletonText-SkeletonText-tW5nH{--leading:mod(var(--font-size) * var(--line-height),var(--font-size))}}.prc-SkeletonText-SkeletonText-tW5nH{border-radius:var(--borderRadius-small,.1875rem);height:var(--font-size);margin-block:calc(var(--leading)/2)}.prc-SkeletonText-SkeletonText-tW5nH:where([data-in-multiline]){margin-block-end:calc(var(--leading)*2)}.prc-SkeletonText-SkeletonText-tW5nH:where([data-in-multiline]):last-child{margin-bottom:0;max-width:65%;min-width:50px}.prc-SkeletonText-SkeletonText-tW5nH:where([data-text-skeleton-size=display]),.prc-SkeletonText-SkeletonText-tW5nH:where([data-text-skeleton-size=titleLarge]){border-radius:var(--borderRadius-medium,.375rem)}.prc-SkeletonText-SkeletonText-tW5nH:where([data-text-skeleton-size=display]){--font-size:var(--text-display-size,2.5rem);--line-height:var(--text-display-lineHeight,1.4)}.prc-SkeletonText-SkeletonText-tW5nH:where([data-text-skeleton-size=titleLarge]){--font-size:var(--text-title-size-large,2rem);--line-height:var(--text-title-lineHeight-large,1.5)}.prc-SkeletonText-SkeletonText-tW5nH:where([data-text-skeleton-size=titleMedium]){--font-size:var(--text-title-size-medium,1.25rem);--line-height:var(--text-title-lineHeight-medium,1.6)}.prc-SkeletonText-SkeletonText-tW5nH:where([data-text-skeleton-size=titleSmall]){--font-size:var(--text-title-size-small,1rem);--line-height:var(--text-title-lineHeight-small,1.5)}.prc-SkeletonText-SkeletonText-tW5nH:where([data-text-skeleton-size=subtitle]){--font-size:var(--text-subtitle-size,1.25rem);--line-height:var(--text-subtitle-lineHeight,1.6)}.prc-SkeletonText-SkeletonText-tW5nH:where([data-text-skeleton-size=bodyLarge]){--font-size:var(--text-body-size-large,1rem);--line-height:var(--text-body-lineHeight-large,1.5)}.prc-SkeletonText-SkeletonText-tW5nH:where([data-text-skeleton-size=bodySmall]){--font-size:var(--text-body-size-small,0.75rem);--line-height:var(--text-body-lineHeight-small,1.66667)}.prc-SkeletonText-SkeletonTextWrapper-3Z0sU{padding-block:.1px}
|
|
2
2
|
/*# sourceMappingURL=SkeletonText-5cf908c1.css.map */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/SkeletonText/SkeletonText.module.css"],"names":[],"mappings":"AAAA,qCACE,iDAAyC,CACzC,
|
|
1
|
+
{"version":3,"sources":["../src/SkeletonText/SkeletonText.module.css"],"names":[],"mappings":"AAAA,qCACE,iDAAyC,CACzC,wDAAiD,CACjD,sEA6DF,CA3DE,sCALF,qCAMI,qEA0DJ,CAzDE,CAPF,qCAUE,gDAAwC,CADxC,uBAAwB,CAGxB,mCAoDF,CAlDE,gEAEE,uCAOF,CALE,2EAGE,eAAgB,CADhB,aAAc,CADd,cAGF,CAGF,+JAEE,gDACF,CAEA,8EACE,2CAAqC,CACrC,gDACF,CAEA,iFACE,6CAAyC,CACzC,oDACF,CAEA,kFACE,iDAA0C,CAC1C,qDACF,CAEA,iFACE,6CAAyC,CACzC,oDACF,CAEA,+EACE,6CAAsC,CACtC,iDACF,CAEA,gFACE,4CAAwC,CACxC,mDACF,CAEA,gFACE,+CAAwC,CACxC,uDACF,CAGF,4CAEE,kBACF","file":"SkeletonText-5cf908c1.css","sourcesContent":[".SkeletonText {\n --font-size: var(--text-body-size-medium);\n --line-height: var(--text-body-lineHeight-medium);\n --leading: calc(var(--font-size) * var(--line-height) - var(--font-size));\n\n @supports (margin-block: mod(1px, 1px)) {\n --leading: mod(var(--font-size) * var(--line-height), var(--font-size));\n }\n\n height: var(--font-size);\n border-radius: var(--borderRadius-small);\n /* stylelint-disable-next-line primer/spacing */\n margin-block: calc(var(--leading) / 2);\n\n &:where([data-in-multiline]) {\n /* stylelint-disable-next-line primer/spacing */\n margin-block-end: calc(var(--leading) * 2);\n\n &:last-child {\n min-width: 50px;\n max-width: 65%;\n margin-bottom: 0;\n }\n }\n\n &:where([data-text-skeleton-size='display']),\n &:where([data-text-skeleton-size='titleLarge']) {\n border-radius: var(--borderRadius-medium);\n }\n\n &:where([data-text-skeleton-size='display']) {\n --font-size: var(--text-display-size);\n --line-height: var(--text-display-lineHeight);\n }\n\n &:where([data-text-skeleton-size='titleLarge']) {\n --font-size: var(--text-title-size-large);\n --line-height: var(--text-title-lineHeight-large);\n }\n\n &:where([data-text-skeleton-size='titleMedium']) {\n --font-size: var(--text-title-size-medium);\n --line-height: var(--text-title-lineHeight-medium);\n }\n\n &:where([data-text-skeleton-size='titleSmall']) {\n --font-size: var(--text-title-size-small);\n --line-height: var(--text-title-lineHeight-small);\n }\n\n &:where([data-text-skeleton-size='subtitle']) {\n --font-size: var(--text-subtitle-size);\n --line-height: var(--text-subtitle-lineHeight);\n }\n\n &:where([data-text-skeleton-size='bodyLarge']) {\n --font-size: var(--text-body-size-large);\n --line-height: var(--text-body-lineHeight-large);\n }\n\n &:where([data-text-skeleton-size='bodySmall']) {\n --font-size: var(--text-body-size-small);\n --line-height: var(--text-body-lineHeight-small);\n }\n}\n\n.SkeletonTextWrapper {\n /* stylelint-disable-next-line primer/spacing */\n padding-block: 0.1px;\n}\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
.prc-Text-Text-0ima0:where([data-size=small]){font-size:var(--text-body-size-small,.75rem);line-height:var(--text-body-lineHeight-small,1.
|
|
1
|
+
.prc-Text-Text-0ima0:where([data-size=small]){font-size:var(--text-body-size-small,.75rem);line-height:var(--text-body-lineHeight-small,1.66667)}.prc-Text-Text-0ima0:where([data-size=medium]){font-size:var(--text-body-size-medium,.875rem);line-height:var(--text-body-lineHeight-medium,1.42857)}.prc-Text-Text-0ima0:where([data-size=large]){font-size:var(--text-body-size-large,1rem);line-height:var(--text-body-lineHeight-large,1.5)}.prc-Text-Text-0ima0:where([data-weight=light]){font-weight:var(--base-text-weight-light,300)}.prc-Text-Text-0ima0:where([data-weight=normal]){font-weight:var(--base-text-weight-normal,400)}.prc-Text-Text-0ima0:where([data-weight=medium]){font-weight:var(--base-text-weight-medium,500)}.prc-Text-Text-0ima0:where([data-weight=semibold]){font-weight:var(--base-text-weight-semibold,600)}
|
|
2
2
|
/*# sourceMappingURL=Text-ca7603b7.css.map */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/Text/Text.module.css"],"names":[],"mappings":"AACE,8CACE,4CAAsC,CACtC,
|
|
1
|
+
{"version":3,"sources":["../src/Text/Text.module.css"],"names":[],"mappings":"AACE,8CACE,4CAAsC,CACtC,qDACF,CAEA,+CACE,8CAAuC,CACvC,sDACF,CAEA,8CACE,0CAAsC,CACtC,iDACF,CAEA,gDACE,6CACF,CAEA,iDACE,8CACF,CAEA,iDACE,8CACF,CAEA,mDACE,gDACF","file":"Text-ca7603b7.css","sourcesContent":[".Text {\n &:where([data-size='small']) {\n font-size: var(--text-body-size-small);\n line-height: var(--text-body-lineHeight-small);\n }\n\n &:where([data-size='medium']) {\n font-size: var(--text-body-size-medium);\n line-height: var(--text-body-lineHeight-medium);\n }\n\n &:where([data-size='large']) {\n font-size: var(--text-body-size-large);\n line-height: var(--text-body-lineHeight-large);\n }\n\n &:where([data-weight='light']) {\n font-weight: var(--base-text-weight-light);\n }\n\n &:where([data-weight='normal']) {\n font-weight: var(--base-text-weight-normal);\n }\n\n &:where([data-weight='medium']) {\n font-weight: var(--base-text-weight-medium);\n }\n\n &:where([data-weight='semibold']) {\n font-weight: var(--base-text-weight-semibold);\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Textarea.d.ts","sourceRoot":"","sources":["../../src/Textarea/Textarea.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,sBAAsB,EAAe,MAAM,OAAO,CAAA;AAC/D,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,qCAAqC,CAAA;AAE7E,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,gBAAgB,CAAA;AAElD,eAAO,MAAM,qBAAqB,IAAI,CAAA;AACtC,eAAO,MAAM,qBAAqB,KAAK,CAAA;AACvC,eAAO,MAAM,uBAAuB,SAAS,CAAA;AAE7C,MAAM,MAAM,aAAa,GAAG;IAC1B;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;OAEG;IACH,gBAAgB,CAAC,EAAE,oBAAoB,CAAA;IACvC;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;IACf;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,YAAY,GAAG,UAAU,CAAA;IACpD;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;CAC5B,GAAG,sBAAsB,CAAC,mBAAmB,CAAC,CAAA;AAE/C;;;GAGG;AACH,QAAA,MAAM,QAAQ;IA1CZ;;OAEG;eACQ,OAAO;IAClB;;OAEG;uBACgB,oBAAoB;IACvC;;OAEG;YACK,OAAO;IACf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eACQ,OAAO;IAClB;;OAEG;uBACgB,oBAAoB;IACvC;;OAEG;YACK,OAAO;IACf;;OAEG;aACM,MAAM,GAAG,MAAM,GAAG,YAAY,GAAG,UAAU;IACpD;;OAEG;eACQ,OAAO;IAClB;;OAEG;gBACS,MAAM;IAClB;;OAEG;gBACS,MAAM;IAClB;;OAEG;gBACS,MAAM;IAClB;;OAEG;YACK,KAAK,CAAC,aAAa;2FAwD5B,CAAA;wBAK0B,cAAc,CAAC,OAAO,QAAQ,CAAC;AAA1D,wBAA0D"}
|
package/dist/ThemeProvider.js
CHANGED
|
@@ -26,7 +26,7 @@ const getServerHandoff = id => {
|
|
|
26
26
|
const serverData = (_document$getElementB = document.getElementById(`__PRIMER_DATA_${id}__`)) === null || _document$getElementB === void 0 ? void 0 : _document$getElementB.textContent;
|
|
27
27
|
if (serverData) return JSON.parse(serverData);
|
|
28
28
|
} catch (_error) {
|
|
29
|
-
// if document/element does not exist or JSON is invalid,
|
|
29
|
+
// if document/element does not exist or JSON is invalid, suppress error
|
|
30
30
|
}
|
|
31
31
|
return {};
|
|
32
32
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
.prc-Tooltip-Tooltip--1XZX{display:inline-block;position:relative}.prc-Tooltip-Tooltip--1XZX:after{display:none;font:normal normal var(--text-body-size-small,.75rem) /var(--text-body-lineHeight-small,1.
|
|
1
|
+
.prc-Tooltip-Tooltip--1XZX{display:inline-block;position:relative}.prc-Tooltip-Tooltip--1XZX:after{display:none;font:normal normal var(--text-body-size-small,.75rem) /var(--text-body-lineHeight-small,1.66667) var(--fontStack-system,-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji");padding:.5em .75em;position:absolute;z-index:1000000;-webkit-font-smoothing:subpixel-antialiased;color:var(--tooltip-fgColor,var(--fgColor-onEmphasis,var(--color-fg-on-emphasis)));letter-spacing:normal;text-align:center;-webkit-text-decoration:none;text-decoration:none;text-shadow:none;text-transform:none;word-wrap:break-word;background:var(--tooltip-bgColor,var(--bgColor-emphasis,var(--color-neutral-emphasis-plus)));border-radius:var(--borderRadius-medium,.375rem);content:attr(aria-label);opacity:0;pointer-events:none;white-space:pre}@keyframes prc-Tooltip-tooltip-appear-Vhjuv{0%{opacity:0}to{opacity:1}}.prc-Tooltip-Tooltip--1XZX:active:after,.prc-Tooltip-Tooltip--1XZX:focus-within:after,.prc-Tooltip-Tooltip--1XZX:focus:after,.prc-Tooltip-Tooltip--1XZX:hover:after{animation-delay:0s;animation-duration:.1s;animation-fill-mode:forwards;animation-name:prc-Tooltip-tooltip-appear-Vhjuv;animation-timing-function:ease-in;display:inline-block;-webkit-text-decoration:none;text-decoration:none}.prc-Tooltip-Tooltip--noDelay-Kl98W:active:after,.prc-Tooltip-Tooltip--noDelay-Kl98W:focus-within:after,.prc-Tooltip-Tooltip--noDelay-Kl98W:focus:after,.prc-Tooltip-Tooltip--noDelay-Kl98W:hover:after{animation-delay:0s}.prc-Tooltip-Tooltip--multiline-5KYEu:active:after,.prc-Tooltip-Tooltip--multiline-5KYEu:focus-within:after,.prc-Tooltip-Tooltip--multiline-5KYEu:focus:after,.prc-Tooltip-Tooltip--multiline-5KYEu:hover:after{display:table-cell}.prc-Tooltip-Tooltip--s-Z845o:after,.prc-Tooltip-Tooltip--se-4uqz7:after,.prc-Tooltip-Tooltip--sw-P5gHD:after{margin-top:6px;right:50%;top:100%}.prc-Tooltip-Tooltip--se-4uqz7:after{left:50%;margin-left:calc(var(--base-size-16,1rem)*-1);right:auto}.prc-Tooltip-Tooltip--sw-P5gHD:after{margin-right:calc(var(--base-size-16,1rem)*-1)}.prc-Tooltip-Tooltip--n-BOOzB:after,.prc-Tooltip-Tooltip--ne-t2n1x:after,.prc-Tooltip-Tooltip--nw-PVis4:after{bottom:100%;margin-bottom:6px;right:50%}.prc-Tooltip-Tooltip--ne-t2n1x:after{left:50%;margin-left:calc(var(--base-size-16,1rem)*-1);right:auto}.prc-Tooltip-Tooltip--nw-PVis4:after{margin-right:calc(var(--base-size-16,1rem)*-1)}.prc-Tooltip-Tooltip--n-BOOzB:after,.prc-Tooltip-Tooltip--s-Z845o:after{transform:translateX(50%)}.prc-Tooltip-Tooltip--w-c6nR3:after{margin-right:6px;right:100%}.prc-Tooltip-Tooltip--e-a4x1s:after,.prc-Tooltip-Tooltip--w-c6nR3:after{bottom:50%;transform:translateY(50%)}.prc-Tooltip-Tooltip--e-a4x1s:after{left:100%;margin-left:6px}.prc-Tooltip-Tooltip--multiline-5KYEu:after{max-width:250px;width:max-content;word-wrap:break-word;border-collapse:separate;white-space:pre-line}.prc-Tooltip-Tooltip--multiline-5KYEu.prc-Tooltip-Tooltip--n-BOOzB:after,.prc-Tooltip-Tooltip--multiline-5KYEu.prc-Tooltip-Tooltip--s-Z845o:after{left:50%;right:auto;transform:translateX(-50%)}.prc-Tooltip-Tooltip--multiline-5KYEu.prc-Tooltip-Tooltip--e-a4x1s:after,.prc-Tooltip-Tooltip--multiline-5KYEu.prc-Tooltip-Tooltip--w-c6nR3:after{right:100%}.prc-Tooltip-Tooltip--alignRight-DdgpM:after{margin-right:0;right:0}.prc-Tooltip-Tooltip--alignLeft-7wr84:after{left:0;margin-left:0}
|
|
2
2
|
/*# sourceMappingURL=Tooltip-fffa9948.css.map */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/Tooltip/Tooltip.module.css"],"names":[],"mappings":"AAEA,2BAEE,oBAAqB,CADrB,iBAEF,CAEA,iCAGE,YAAa,CAGb
|
|
1
|
+
{"version":3,"sources":["../src/Tooltip/Tooltip.module.css"],"names":[],"mappings":"AAEA,2BAEE,oBAAqB,CADrB,iBAEF,CAEA,iCAGE,YAAa,CAGb,gPAA2G,CAD3G,kBAAqB,CAJrB,iBAAkB,CAClB,eAAgB,CAKhB,2CAA4C,CAC5C,kFAAwD,CAKxD,qBAAsB,CAJtB,iBAAkB,CAClB,4BAAqB,CAArB,oBAAqB,CACrB,gBAAiB,CACjB,mBAAoB,CAEpB,oBAAqB,CAIrB,4FAA2D,CAC3D,gDAAyC,CAFzC,wBAAyB,CAGzB,SAAU,CAJV,mBAAoB,CADpB,eAMF,CAGA,4CACE,GACE,SACF,CAEA,GACE,SACF,CACF,CAEA,oKAUE,kBAAmB,CAHnB,sBAAwB,CACxB,4BAA6B,CAF7B,+CAA8B,CAG9B,iCAAkC,CALlC,oBAAqB,CACrB,4BAAqB,CAArB,oBAMF,CAEA,wMAIE,kBACF,CAEA,gNAIE,kBACF,CAGA,8GAME,cAAe,CAFf,SAAU,CADV,QAIF,CAEA,qCAEE,QAAS,CACT,6CAA2C,CAF3C,UAGF,CAEA,qCACE,8CACF,CAGA,8GAIE,WAAY,CAEZ,iBAAkB,CAHlB,SAIF,CAEA,qCAEE,QAAS,CACT,6CAA2C,CAF3C,UAGF,CAEA,qCACE,8CACF,CAGA,wEAEE,yBACF,CAGA,oCAIE,gBAAiB,CAHjB,UAKF,CAGA,wEAPE,UAAW,CAGX,yBAUF,CANA,oCAEE,SAAU,CAEV,eAEF,CAEA,4CAEE,eAAgB,CADhB,iBAAkB,CAElB,oBAAqB,CAErB,wBAAyB,CADzB,oBAEF,CAEA,kJAGE,QAAS,CADT,UAAW,CAEX,0BACF,CAEA,kJAEE,UACF,CAEA,6CAEE,cAAe,CADf,OAEF,CAEA,4CACE,MAAO,CACP,aACF","file":"Tooltip-fffa9948.css","sourcesContent":["/* stylelint-disable primer/typography, primer/borders, selector-class-pattern */\n\n.Tooltip {\n position: relative;\n display: inline-block;\n}\n\n.Tooltip::after {\n position: absolute;\n z-index: 1000000;\n display: none;\n /* stylelint-disable-next-line primer/spacing */\n padding: 0.5em 0.75em;\n font: normal normal var(--text-body-size-small) / var(--text-body-lineHeight-small) var(--fontStack-system);\n -webkit-font-smoothing: subpixel-antialiased;\n color: var(--tooltip-fgColor, var(--fgColor-onEmphasis));\n text-align: center;\n text-decoration: none;\n text-shadow: none;\n text-transform: none;\n letter-spacing: normal;\n word-wrap: break-word;\n white-space: pre;\n pointer-events: none;\n content: attr(aria-label);\n background: var(--tooltip-bgColor, var(--bgColor-emphasis));\n border-radius: var(--borderRadius-medium);\n opacity: 0;\n}\n\n/* delay animation for tooltip */\n@keyframes tooltip-appear {\n from {\n opacity: 0;\n }\n\n to {\n opacity: 1;\n }\n}\n\n.Tooltip:hover::after,\n.Tooltip:active::after,\n.Tooltip:focus::after,\n.Tooltip:focus-within::after {\n display: inline-block;\n text-decoration: none;\n animation-name: tooltip-appear;\n animation-duration: 0.1s;\n animation-fill-mode: forwards;\n animation-timing-function: ease-in;\n animation-delay: 0s;\n}\n\n.Tooltip--noDelay:hover::after,\n.Tooltip--noDelay:active::after,\n.Tooltip--noDelay:focus::after,\n.Tooltip--noDelay:focus-within::after {\n animation-delay: 0s;\n}\n\n.Tooltip--multiline:hover::after,\n.Tooltip--multiline:active::after,\n.Tooltip--multiline:focus::after,\n.Tooltip--multiline:focus-within::after {\n display: table-cell;\n}\n\n/* Tooltipped south */\n.Tooltip--s::after,\n.Tooltip--se::after,\n.Tooltip--sw::after {\n top: 100%;\n right: 50%;\n /* stylelint-disable-next-line primer/spacing */\n margin-top: 6px;\n}\n\n.Tooltip--se::after {\n right: auto;\n left: 50%;\n margin-left: calc(-1 * var(--base-size-16));\n}\n\n.Tooltip--sw::after {\n margin-right: calc(-1 * var(--base-size-16));\n}\n\n/* Tooltips above the object */\n.Tooltip--n::after,\n.Tooltip--ne::after,\n.Tooltip--nw::after {\n right: 50%;\n bottom: 100%;\n /* stylelint-disable-next-line primer/spacing */\n margin-bottom: 6px;\n}\n\n.Tooltip--ne::after {\n right: auto;\n left: 50%;\n margin-left: calc(-1 * var(--base-size-16));\n}\n\n.Tooltip--nw::after {\n margin-right: calc(-1 * var(--base-size-16));\n}\n\n/* Move the tooltip body to the center of the object. */\n.Tooltip--s::after,\n.Tooltip--n::after {\n transform: translateX(50%);\n}\n\n/* Tooltipped to the left */\n.Tooltip--w::after {\n right: 100%;\n bottom: 50%;\n /* stylelint-disable-next-line primer/spacing */\n margin-right: 6px;\n transform: translateY(50%);\n}\n\n/* tooltipped to the right */\n.Tooltip--e::after {\n bottom: 50%;\n left: 100%;\n /* stylelint-disable-next-line primer/spacing */\n margin-left: 6px;\n transform: translateY(50%);\n}\n\n.Tooltip--multiline::after {\n width: max-content;\n max-width: 250px;\n word-wrap: break-word;\n white-space: pre-line;\n border-collapse: separate;\n}\n\n.Tooltip--multiline.Tooltip--s::after,\n.Tooltip--multiline.Tooltip--n::after {\n right: auto;\n left: 50%;\n transform: translateX(-50%);\n}\n\n.Tooltip--multiline.Tooltip--w::after,\n.Tooltip--multiline.Tooltip--e::after {\n right: 100%;\n}\n\n.Tooltip--alignRight::after {\n right: 0;\n margin-right: 0;\n}\n\n.Tooltip--alignLeft::after {\n left: 0;\n margin-left: 0;\n}\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
@keyframes prc-TooltipV2-tooltip-appear-hLf77{0%{opacity:0}to{opacity:1}}.prc-TooltipV2-Tooltip-cYMVY{display:none}.prc-TooltipV2-Tooltip-cYMVY[popover]{margin:auto;max-width:250px;overflow:visible;padding:var(--overlay-paddingBlock-condensed,.25rem) var(--overlay-padding-condensed,.5rem);position:absolute;width:max-content;clip:auto;color:var(--tooltip-fgColor,#fff);font:var(--text-body-shorthand-small,400 .75rem/1.
|
|
1
|
+
@keyframes prc-TooltipV2-tooltip-appear-hLf77{0%{opacity:0}to{opacity:1}}.prc-TooltipV2-Tooltip-cYMVY{display:none}.prc-TooltipV2-Tooltip-cYMVY[popover]{margin:auto;max-width:250px;overflow:visible;padding:var(--overlay-paddingBlock-condensed,.25rem) var(--overlay-padding-condensed,.5rem);position:absolute;width:max-content;clip:auto;color:var(--tooltip-fgColor,#fff);font:var(--text-body-shorthand-small,400 .75rem/1.66667 -apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji");text-align:center;word-wrap:break-word;background:var(--tooltip-bgColor,#25292e);border:0;border-radius:var(--borderRadius-medium,.375rem);white-space:normal;-webkit-font-smoothing:subpixel-antialiased;inset:auto;text-wrap:balance}.prc-TooltipV2-Tooltip-cYMVY[popover]:popover-open{display:block}.prc-TooltipV2-Tooltip-cYMVY[popover].\\:popover-open{display:block}@media (forced-colors:active){.prc-TooltipV2-Tooltip-cYMVY{outline:1px solid transparent}}.prc-TooltipV2-Tooltip-cYMVY:after{content:"";display:block;height:var(--overlay-offset,.25rem);left:0;position:absolute;right:0}.prc-TooltipV2-Tooltip-cYMVY[data-direction=n]:after,.prc-TooltipV2-Tooltip-cYMVY[data-direction=ne]:after,.prc-TooltipV2-Tooltip-cYMVY[data-direction=nw]:after{top:100%}.prc-TooltipV2-Tooltip-cYMVY[data-direction=s]:after,.prc-TooltipV2-Tooltip-cYMVY[data-direction=se]:after,.prc-TooltipV2-Tooltip-cYMVY[data-direction=sw]:after{bottom:100%}.prc-TooltipV2-Tooltip-cYMVY[data-direction=w]:after{left:100%}.prc-TooltipV2-Tooltip-cYMVY[data-direction=e]:after,.prc-TooltipV2-Tooltip-cYMVY[data-direction=w]:after{bottom:0;content:"";display:block;height:100%;position:absolute;width:8px}.prc-TooltipV2-Tooltip-cYMVY[data-direction=e]:after{margin-left:-8px;right:100%}@media screen and (prefers-reduced-motion:no-preference){.prc-TooltipV2-Tooltip-cYMVY:popover-open,.prc-TooltipV2-Tooltip-cYMVY:popover-open:before{animation-delay:0s;animation-duration:.1s;animation-fill-mode:forwards;animation-name:prc-TooltipV2-tooltip-appear-hLf77;animation-timing-function:ease-in}.prc-TooltipV2-Tooltip-cYMVY.\\:popover-open,.prc-TooltipV2-Tooltip-cYMVY.\\:popover-open:before{animation-delay:0s;animation-duration:.1s;animation-fill-mode:forwards;animation-name:prc-TooltipV2-tooltip-appear-hLf77;animation-timing-function:ease-in}}.prc-TooltipV2-KeybindingHintContainer-iabqv.prc-TooltipV2-HasTextBefore-cCzYC{margin-left:var(--base-size-6,.375rem)}
|
|
2
2
|
/*# sourceMappingURL=Tooltip-5a80d7b2.css.map */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/TooltipV2/Tooltip.module.css"],"names":[],"mappings":"AACA,8CACE,GACE,SACF,CAEA,GACE,SACF,CACF,CAEA,6BAEE,YA6GF,CA3GE,sCAME,WAAY,CAHZ,eAAgB,CAMhB,gBAAiB,CAJjB,2FAA+E,CAJ/E,iBAAkB,CAClB,iBAAkB,CAQlB,SAAU,CAEV,iCAA6B,CAD7B
|
|
1
|
+
{"version":3,"sources":["../src/TooltipV2/Tooltip.module.css"],"names":[],"mappings":"AACA,8CACE,GACE,SACF,CAEA,GACE,SACF,CACF,CAEA,6BAEE,YA6GF,CA3GE,sCAME,WAAY,CAHZ,eAAgB,CAMhB,gBAAiB,CAJjB,2FAA+E,CAJ/E,iBAAkB,CAClB,iBAAkB,CAQlB,SAAU,CAEV,iCAA6B,CAD7B,gLAAsC,CAEtC,iBAAkB,CAClB,oBAAqB,CAErB,yCAAkC,CAClC,QAAS,CACT,gDAAyC,CAHzC,kBAAmB,CAInB,2CAA4C,CAC5C,UAAW,CACX,iBACF,CAGA,mDACE,aACF,CAIA,sDACE,aACF,CAEA,8BAvCF,6BAwCI,6BAuEJ,CAtEE,CAGA,mCAME,UAAW,CAFX,aAAc,CACd,mCAA6B,CAF7B,MAAO,CAFP,iBAAkB,CAClB,OAKF,CAGA,iKAGE,QACF,CAEA,iKAGE,WACF,CAEA,qDAGE,SAKF,CAGA,0GATE,QAAS,CAKT,UAAW,CAHX,aAAc,CAEd,WAAY,CALZ,iBAAkB,CAIlB,SAgBF,CAVA,qDAQE,gBAAiB,CANjB,UAQF,CAGA,yDAEE,2FAME,kBAAmB,CAHnB,sBAAwB,CACxB,4BAA6B,CAF7B,iDAA8B,CAG9B,iCAEF,CAGA,iGAME,kBAAmB,CAHnB,sBAAwB,CACxB,4BAA6B,CAF7B,iDAA8B,CAG9B,iCAEF,CACF,CAGF,+EACE,sCACF","file":"Tooltip-5a80d7b2.css","sourcesContent":["/* Animation definition */\n@keyframes tooltip-appear {\n from {\n opacity: 0;\n }\n\n to {\n opacity: 1;\n }\n}\n\n.Tooltip {\n /* Overriding the default popover styles */\n display: none;\n\n &[popover] {\n position: absolute;\n width: max-content;\n max-width: 250px;\n /* stylelint-disable-next-line primer/spacing */\n padding: var(--overlay-paddingBlock-condensed) var(--overlay-padding-condensed);\n margin: auto;\n\n /* for scrollbar */\n overflow: visible;\n clip: auto;\n font: var(--text-body-shorthand-small);\n color: var(--tooltip-fgColor);\n text-align: center;\n word-wrap: break-word;\n white-space: normal;\n background: var(--tooltip-bgColor);\n border: 0;\n border-radius: var(--borderRadius-medium);\n -webkit-font-smoothing: subpixel-antialiased;\n inset: auto;\n text-wrap: balance;\n }\n\n /* class name in chrome is :popover-open */\n &[popover]:popover-open {\n display: block;\n }\n\n /* class name in firefox and safari is \\:popover-open */\n /* stylelint-disable-next-line selector-class-pattern */\n &[popover]:global(.\\\\:popover-open) {\n display: block;\n }\n\n @media (forced-colors: active) {\n outline: 1px solid transparent;\n }\n\n /* This is needed to keep the tooltip open when the user leaves the trigger element to hover tooltip */\n &::after {\n position: absolute;\n right: 0;\n left: 0;\n display: block;\n height: var(--overlay-offset);\n content: '';\n }\n\n /* South, East, Southeast, Southwest after */\n &[data-direction='n']::after,\n &[data-direction='ne']::after,\n &[data-direction='nw']::after {\n top: 100%;\n }\n\n &[data-direction='s']::after,\n &[data-direction='se']::after,\n &[data-direction='sw']::after {\n bottom: 100%;\n }\n\n &[data-direction='w']::after {\n position: absolute;\n bottom: 0;\n left: 100%;\n display: block;\n width: 8px;\n height: 100%;\n content: '';\n }\n\n /* East before and after */\n &[data-direction='e']::after {\n position: absolute;\n right: 100%;\n bottom: 0;\n display: block;\n width: 8px;\n height: 100%;\n /* stylelint-disable-next-line primer/spacing */\n margin-left: -8px;\n content: '';\n }\n\n /* Only show animations if users don't have a preference for reduced motion */\n @media screen and (prefers-reduced-motion: no-preference) {\n /* Animation styles */\n &:popover-open,\n &:popover-open::before {\n animation-name: tooltip-appear;\n animation-duration: 0.1s;\n animation-fill-mode: forwards;\n animation-timing-function: ease-in;\n animation-delay: 0s;\n }\n\n /* Animation styles */\n &:global(.\\\\:popover-open) /* stylelint-disable-line selector-class-pattern */,\n &:global(.\\\\:popover-open)::before /* stylelint-disable-line selector-class-pattern */ {\n animation-name: tooltip-appear;\n animation-duration: 0.1s;\n animation-fill-mode: forwards;\n animation-timing-function: ease-in;\n animation-delay: 0s;\n }\n }\n}\n\n.KeybindingHintContainer.HasTextBefore {\n margin-left: var(--base-size-6);\n}\n"]}
|
|
@@ -16,6 +16,6 @@ export type UnderlineNavProps = {
|
|
|
16
16
|
variant?: 'inset' | 'flush';
|
|
17
17
|
};
|
|
18
18
|
export declare const MORE_BTN_WIDTH = 86;
|
|
19
|
-
export declare const getValidChildren: (children: React.ReactNode) => React.ReactElement[];
|
|
19
|
+
export declare const getValidChildren: (children: React.ReactNode) => React.ReactElement<any>[];
|
|
20
20
|
export declare const UnderlineNav: React.ForwardRefExoticComponent<UnderlineNavProps & React.RefAttributes<unknown>>;
|
|
21
21
|
//# sourceMappingURL=UnderlineNav.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UnderlineNav.d.ts","sourceRoot":"","sources":["../../src/UnderlineNav/UnderlineNav.tsx"],"names":[],"mappings":"AACA,OAAO,KAA6D,MAAM,OAAO,CAAA;AAmBjF,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;
|
|
1
|
+
{"version":3,"file":"UnderlineNav.d.ts","sourceRoot":"","sources":["../../src/UnderlineNav/UnderlineNav.tsx"],"names":[],"mappings":"AACA,OAAO,KAA6D,MAAM,OAAO,CAAA;AAmBjF,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;AAuEhC,eAAO,MAAM,gBAAgB,GAAI,UAAU,KAAK,CAAC,SAAS,KAEgC,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,EAChH,CAAA;AAgCD,eAAO,MAAM,YAAY,mFA8RxB,CAAA"}
|
|
@@ -33,7 +33,9 @@ const overflowEffect = (navWidth, moreMenuWidth, childArray, childWidthArray, no
|
|
|
33
33
|
const numberOfItemsWithoutIconPossible = calculatePossibleItems(noIconChildWidthArray, navWidth);
|
|
34
34
|
// We need to take more menu width into account when calculating the number of items possible
|
|
35
35
|
const numberOfItemsPossibleWithMoreMenu = calculatePossibleItems(noIconChildWidthArray, navWidth, moreMenuWidth || MORE_BTN_WIDTH);
|
|
36
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
36
37
|
const items = [];
|
|
38
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
37
39
|
const menuItems = [];
|
|
38
40
|
|
|
39
41
|
// First, we check if we can fit all the items with their icons
|
|
@@ -79,6 +81,7 @@ const overflowEffect = (navWidth, moreMenuWidth, childArray, childWidthArray, no
|
|
|
79
81
|
}, iconsVisible);
|
|
80
82
|
};
|
|
81
83
|
const getValidChildren = children => {
|
|
84
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
82
85
|
return React.Children.toArray(children).filter(child => /*#__PURE__*/React.isValidElement(child));
|
|
83
86
|
};
|
|
84
87
|
const calculatePossibleItems = (childWidthArray, navWidth, moreMenuWidth = 0) => {
|
|
@@ -27,8 +27,13 @@ export type UnderlineNavItemProps = {
|
|
|
27
27
|
'aria-current'?: 'page' | 'step' | 'location' | 'date' | 'time' | 'true' | 'false' | boolean;
|
|
28
28
|
/**
|
|
29
29
|
* Icon before the text
|
|
30
|
+
* @deprecated Use the `leadingVisual` prop instead
|
|
30
31
|
*/
|
|
31
|
-
icon?: React.FunctionComponent<IconProps> | React.ReactElement
|
|
32
|
+
icon?: React.FunctionComponent<IconProps> | React.ReactElement<any>;
|
|
33
|
+
/**
|
|
34
|
+
* Render a visual before the text
|
|
35
|
+
*/
|
|
36
|
+
leadingVisual?: React.ReactElement;
|
|
32
37
|
/**
|
|
33
38
|
* Renders `UnderlineNav.Item` as given component i.e. react-router's Link
|
|
34
39
|
**/
|
|
@@ -1 +1 @@
|
|
|
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;IAC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