@teamturing/react-kit 2.13.0 → 2.14.1
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/dist/core/Pagination/index.d.ts +327 -0
- package/dist/core/Pill/index.d.ts +47 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +1789 -1392
- package/esm/core/Pagination/index.js +273 -0
- package/esm/core/Pill/index.js +129 -0
- package/esm/index.js +2 -0
- package/esm/packages/icons/esm/Folder.js +17 -0
- package/esm/packages/icons/esm/index.js +1 -0
- package/esm/packages/utils/esm/noop.js +6 -0
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1217,7 +1217,7 @@ function makeLatestValues(props, context, presenceContext, scrapeMotionValues) {
|
|
|
1217
1217
|
return values;
|
|
1218
1218
|
}
|
|
1219
1219
|
|
|
1220
|
-
const noop$
|
|
1220
|
+
const noop$2 = (any) => any;
|
|
1221
1221
|
|
|
1222
1222
|
class Queue {
|
|
1223
1223
|
constructor() {
|
|
@@ -1379,7 +1379,7 @@ function createRenderBatcher(scheduleNextBatch, allowKeepAlive) {
|
|
|
1379
1379
|
return { schedule, cancel, state, steps };
|
|
1380
1380
|
}
|
|
1381
1381
|
|
|
1382
|
-
const { schedule: frame, cancel: cancelFrame, state: frameData, steps, } = createRenderBatcher(typeof requestAnimationFrame !== "undefined" ? requestAnimationFrame : noop$
|
|
1382
|
+
const { schedule: frame, cancel: cancelFrame, state: frameData, steps, } = createRenderBatcher(typeof requestAnimationFrame !== "undefined" ? requestAnimationFrame : noop$2, true);
|
|
1383
1383
|
|
|
1384
1384
|
const svgMotionConfig = {
|
|
1385
1385
|
useVisualState: makeUseVisualState({
|
|
@@ -1629,9 +1629,9 @@ function fireSyntheticPointerEvent(name, handler) {
|
|
|
1629
1629
|
class PressGesture extends Feature {
|
|
1630
1630
|
constructor() {
|
|
1631
1631
|
super(...arguments);
|
|
1632
|
-
this.removeStartListeners = noop$
|
|
1633
|
-
this.removeEndListeners = noop$
|
|
1634
|
-
this.removeAccessibleListeners = noop$
|
|
1632
|
+
this.removeStartListeners = noop$2;
|
|
1633
|
+
this.removeEndListeners = noop$2;
|
|
1634
|
+
this.removeAccessibleListeners = noop$2;
|
|
1635
1635
|
this.startPointerPress = (startEvent, startInfo) => {
|
|
1636
1636
|
this.removeEndListeners();
|
|
1637
1637
|
if (this.isPressing)
|
|
@@ -1897,8 +1897,8 @@ function resolveVariant(visualElement, definition, custom) {
|
|
|
1897
1897
|
const optimizedAppearDataId = "framerAppearId";
|
|
1898
1898
|
const optimizedAppearDataAttribute = "data-" + camelToDash(optimizedAppearDataId);
|
|
1899
1899
|
|
|
1900
|
-
let warning = noop$
|
|
1901
|
-
let invariant = noop$
|
|
1900
|
+
let warning = noop$2;
|
|
1901
|
+
let invariant = noop$2;
|
|
1902
1902
|
if (process.env.NODE_ENV !== "production") {
|
|
1903
1903
|
warning = (check, message) => {
|
|
1904
1904
|
if (!check && typeof console !== "undefined") {
|
|
@@ -2024,7 +2024,7 @@ function binarySubdivide(x, lowerBound, upperBound, mX1, mX2) {
|
|
|
2024
2024
|
function cubicBezier(mX1, mY1, mX2, mY2) {
|
|
2025
2025
|
// If this is a linear gradient, return linear easing
|
|
2026
2026
|
if (mX1 === mY1 && mX2 === mY2)
|
|
2027
|
-
return noop$
|
|
2027
|
+
return noop$2;
|
|
2028
2028
|
const getTForX = (aX) => binarySubdivide(aX, 0, 1, mX1, mX2);
|
|
2029
2029
|
// If animation is at start/end, return t without easing
|
|
2030
2030
|
return (t) => t === 0 || t === 1 ? t : calcBezier(getTForX(t), mY1, mY2);
|
|
@@ -2057,7 +2057,7 @@ const backInOut = mirrorEasing(backIn);
|
|
|
2057
2057
|
const anticipate = (p) => (p *= 2) < 1 ? 0.5 * backIn(p) : 0.5 * (2 - Math.pow(2, -10 * (p - 1)));
|
|
2058
2058
|
|
|
2059
2059
|
const easingLookup = {
|
|
2060
|
-
linear: noop$
|
|
2060
|
+
linear: noop$2,
|
|
2061
2061
|
easeIn,
|
|
2062
2062
|
easeInOut,
|
|
2063
2063
|
easeOut,
|
|
@@ -2305,7 +2305,7 @@ const cssVarTokeniser = {
|
|
|
2305
2305
|
regex: cssVariableRegex,
|
|
2306
2306
|
countKey: "Vars",
|
|
2307
2307
|
token: "${v}",
|
|
2308
|
-
parse: noop$
|
|
2308
|
+
parse: noop$2,
|
|
2309
2309
|
};
|
|
2310
2310
|
const colorTokeniser = {
|
|
2311
2311
|
regex: colorRegex,
|
|
@@ -2474,7 +2474,7 @@ function createMixers(output, ease, customMixer) {
|
|
|
2474
2474
|
for (let i = 0; i < numMixers; i++) {
|
|
2475
2475
|
let mixer = mixerFactory(output[i], output[i + 1]);
|
|
2476
2476
|
if (ease) {
|
|
2477
|
-
const easingFunction = Array.isArray(ease) ? ease[i] || noop$
|
|
2477
|
+
const easingFunction = Array.isArray(ease) ? ease[i] || noop$2 : ease;
|
|
2478
2478
|
mixer = pipe(easingFunction, mixer);
|
|
2479
2479
|
}
|
|
2480
2480
|
mixers.push(mixer);
|
|
@@ -3365,7 +3365,7 @@ function createAcceleratedAnimation(value, valueName, { onUpdate, onComplete, ..
|
|
|
3365
3365
|
attachTimeline(timeline) {
|
|
3366
3366
|
animation.timeline = timeline;
|
|
3367
3367
|
animation.onfinish = null;
|
|
3368
|
-
return noop$
|
|
3368
|
+
return noop$2;
|
|
3369
3369
|
},
|
|
3370
3370
|
get time() {
|
|
3371
3371
|
return millisecondsToSeconds(animation.currentTime || 0);
|
|
@@ -3435,15 +3435,15 @@ function createInstantAnimation({ keyframes, delay, onUpdate, onComplete, }) {
|
|
|
3435
3435
|
time: 0,
|
|
3436
3436
|
speed: 1,
|
|
3437
3437
|
duration: 0,
|
|
3438
|
-
play: (noop$
|
|
3439
|
-
pause: (noop$
|
|
3440
|
-
stop: (noop$
|
|
3438
|
+
play: (noop$2),
|
|
3439
|
+
pause: (noop$2),
|
|
3440
|
+
stop: (noop$2),
|
|
3441
3441
|
then: (resolve) => {
|
|
3442
3442
|
resolve();
|
|
3443
3443
|
return Promise.resolve();
|
|
3444
3444
|
},
|
|
3445
|
-
cancel: (noop$
|
|
3446
|
-
complete: (noop$
|
|
3445
|
+
cancel: (noop$2),
|
|
3446
|
+
complete: (noop$2),
|
|
3447
3447
|
};
|
|
3448
3448
|
};
|
|
3449
3449
|
return delay
|
|
@@ -5721,8 +5721,8 @@ function getCurrentDirection(offset, lockThreshold = 10) {
|
|
|
5721
5721
|
class DragGesture extends Feature {
|
|
5722
5722
|
constructor(node) {
|
|
5723
5723
|
super(node);
|
|
5724
|
-
this.removeGroupControls = noop$
|
|
5725
|
-
this.removeListeners = noop$
|
|
5724
|
+
this.removeGroupControls = noop$2;
|
|
5725
|
+
this.removeListeners = noop$2;
|
|
5726
5726
|
this.controls = new VisualElementDragControls(node);
|
|
5727
5727
|
}
|
|
5728
5728
|
mount() {
|
|
@@ -5732,7 +5732,7 @@ class DragGesture extends Feature {
|
|
|
5732
5732
|
if (dragControls) {
|
|
5733
5733
|
this.removeGroupControls = dragControls.subscribe(this.controls);
|
|
5734
5734
|
}
|
|
5735
|
-
this.removeListeners = this.controls.addListeners() || noop$
|
|
5735
|
+
this.removeListeners = this.controls.addListeners() || noop$2;
|
|
5736
5736
|
}
|
|
5737
5737
|
unmount() {
|
|
5738
5738
|
this.removeGroupControls();
|
|
@@ -5748,7 +5748,7 @@ const asyncHandler = (handler) => (event, info) => {
|
|
|
5748
5748
|
class PanGesture extends Feature {
|
|
5749
5749
|
constructor() {
|
|
5750
5750
|
super(...arguments);
|
|
5751
|
-
this.removePointerDownListener = noop$
|
|
5751
|
+
this.removePointerDownListener = noop$2;
|
|
5752
5752
|
}
|
|
5753
5753
|
onPointerDown(pointerDownEvent) {
|
|
5754
5754
|
this.session = new PanSession(pointerDownEvent, this.createPanHandlers(), { transformPagePoint: this.node.getTransformPagePoint() });
|
|
@@ -6096,7 +6096,7 @@ function getRadius(values, radiusName) {
|
|
|
6096
6096
|
// )(p)
|
|
6097
6097
|
// }
|
|
6098
6098
|
const easeCrossfadeIn = compress(0, 0.5, circOut);
|
|
6099
|
-
const easeCrossfadeOut = compress(0.5, 0.95, noop$
|
|
6099
|
+
const easeCrossfadeOut = compress(0.5, 0.95, noop$2);
|
|
6100
6100
|
function compress(min, max, easing) {
|
|
6101
6101
|
return (p) => {
|
|
6102
6102
|
// Could replace ifs with clamp
|
|
@@ -7853,7 +7853,7 @@ const userAgentContains = (string) => typeof navigator !== "undefined" &&
|
|
|
7853
7853
|
*/
|
|
7854
7854
|
const roundPoint = userAgentContains("applewebkit/") && !userAgentContains("chrome/")
|
|
7855
7855
|
? Math.round
|
|
7856
|
-
: noop$
|
|
7856
|
+
: noop$2;
|
|
7857
7857
|
function roundAxis(axis) {
|
|
7858
7858
|
// Round to the nearest .5 pixels to support subpixel layouts
|
|
7859
7859
|
axis.min = roundPoint(axis.min);
|
|
@@ -11864,7 +11864,7 @@ const BreadcrumbsItemWrapper = styled__default.default.span`
|
|
|
11864
11864
|
}
|
|
11865
11865
|
}
|
|
11866
11866
|
`;
|
|
11867
|
-
var index$
|
|
11867
|
+
var index$6 = Object.assign(Breadcrumbs, {
|
|
11868
11868
|
Item: BreadcrumbsItem
|
|
11869
11869
|
});
|
|
11870
11870
|
|
|
@@ -13647,6 +13647,19 @@ const SvgFire = props => /*#__PURE__*/React__namespace.createElement("svg", _ext
|
|
|
13647
13647
|
d: "M10.373 2.847c-.021.287-.22 2.173-1.773 3.754-.144.145-.3.279-.465.4-.227.169-.616.462-1.021.787-.537.431-2.966 2.7-3.104 5.86 0 0-.586 7.212 7.136 8.276 0 0 2.5.531 5.223-1.214.061-.04.123-.078.187-.115.438-.257 2.76-1.767 3.368-5.192 0 0 .433-2.773-.768-4.942-.034-.06-.072-.117-.104-.177-.144-.273-.65-1.176-1.366-1.86a.699.699 0 0 0-.377-.191.565.565 0 0 0-.569.253c-.127.19-.761 1.139-1.045 1.49 0 0-.159.194-.12-.08 0 0 .515-2.576-1.264-5.153 0 0-1.107-1.719-2.807-2.578 0 0-.434-.273-.79-.117 0 0-.248.105-.325.66a1.583 1.583 0 0 0-.016.14Z"
|
|
13648
13648
|
}));
|
|
13649
13649
|
|
|
13650
|
+
const SvgFolder = props => /*#__PURE__*/React__namespace.createElement("svg", _extends({
|
|
13651
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
13652
|
+
width: "1em",
|
|
13653
|
+
height: "1em",
|
|
13654
|
+
fill: "none",
|
|
13655
|
+
viewBox: "0 0 24 24"
|
|
13656
|
+
}, props), /*#__PURE__*/React__namespace.createElement("path", {
|
|
13657
|
+
fill: "currentColor",
|
|
13658
|
+
fillRule: "evenodd",
|
|
13659
|
+
d: "M10.061 3.181a2.108 2.108 0 0 0-1.489-.617H4.106A2.106 2.106 0 0 0 2 4.67v.977h10.527l-2.466-2.466Zm9.834 3.466H2v12.684c0 1.163.943 2.105 2.106 2.105h15.789A2.103 2.103 0 0 0 22 19.331V8.752a2.104 2.104 0 0 0-2.105-2.105Z",
|
|
13660
|
+
clipRule: "evenodd"
|
|
13661
|
+
}));
|
|
13662
|
+
|
|
13650
13663
|
const SvgFrame = props => /*#__PURE__*/React__namespace.createElement("svg", _extends({
|
|
13651
13664
|
xmlns: "http://www.w3.org/2000/svg",
|
|
13652
13665
|
width: "1em",
|
|
@@ -15682,6 +15695,7 @@ var icons = /*#__PURE__*/Object.freeze({
|
|
|
15682
15695
|
FacebookIcon: SvgFacebook,
|
|
15683
15696
|
FilterIcon: SvgFilter,
|
|
15684
15697
|
FireIcon: SvgFire,
|
|
15698
|
+
FolderIcon: SvgFolder,
|
|
15685
15699
|
FrameIcon: SvgFrame,
|
|
15686
15700
|
GlassesIcon: SvgGlasses,
|
|
15687
15701
|
GraphIcon: SvgGraph,
|
|
@@ -16610,7 +16624,7 @@ function isTabbable(elem, strict = false) {
|
|
|
16610
16624
|
}
|
|
16611
16625
|
|
|
16612
16626
|
let signalSupported = false;
|
|
16613
|
-
function noop() {}
|
|
16627
|
+
function noop$1() {}
|
|
16614
16628
|
try {
|
|
16615
16629
|
const options = Object.create({}, {
|
|
16616
16630
|
signal: {
|
|
@@ -16619,8 +16633,8 @@ try {
|
|
|
16619
16633
|
}
|
|
16620
16634
|
}
|
|
16621
16635
|
});
|
|
16622
|
-
window.addEventListener('test', noop, options);
|
|
16623
|
-
window.removeEventListener('test', noop, options);
|
|
16636
|
+
window.addEventListener('test', noop$1, options);
|
|
16637
|
+
window.removeEventListener('test', noop$1, options);
|
|
16624
16638
|
} catch (e) {}
|
|
16625
16639
|
function featureSupported() {
|
|
16626
16640
|
return signalSupported;
|
|
@@ -17376,7 +17390,7 @@ const BaseDialog = styled__default.default.div(() => ({
|
|
|
17376
17390
|
overflow: 'hidden',
|
|
17377
17391
|
margin: 'auto'
|
|
17378
17392
|
}), sx);
|
|
17379
|
-
var index$
|
|
17393
|
+
var index$5 = /*#__PURE__*/React.forwardRef(Dialog);
|
|
17380
17394
|
|
|
17381
17395
|
const useDialogHandler = () => {
|
|
17382
17396
|
const [isOpen, setIsOpen] = React.useState(false);
|
|
@@ -19095,7 +19109,7 @@ const computePosition = (reference, floating, options) => {
|
|
|
19095
19109
|
});
|
|
19096
19110
|
};
|
|
19097
19111
|
|
|
19098
|
-
var index$
|
|
19112
|
+
var index$4 = typeof document !== 'undefined' ? React.useLayoutEffect : React.useEffect;
|
|
19099
19113
|
|
|
19100
19114
|
// Fork of `fast-deep-equal` that only does the comparisons we need and compares
|
|
19101
19115
|
// functions
|
|
@@ -19160,7 +19174,7 @@ function roundByDPR(element, value) {
|
|
|
19160
19174
|
|
|
19161
19175
|
function useLatestRef(value) {
|
|
19162
19176
|
const ref = React__namespace.useRef(value);
|
|
19163
|
-
index$
|
|
19177
|
+
index$4(() => {
|
|
19164
19178
|
ref.current = value;
|
|
19165
19179
|
});
|
|
19166
19180
|
return ref;
|
|
@@ -19245,7 +19259,7 @@ function useFloating(options) {
|
|
|
19245
19259
|
}
|
|
19246
19260
|
});
|
|
19247
19261
|
}, [latestMiddleware, placement, strategy, platformRef]);
|
|
19248
|
-
index$
|
|
19262
|
+
index$4(() => {
|
|
19249
19263
|
if (open === false && dataRef.current.isPositioned) {
|
|
19250
19264
|
dataRef.current.isPositioned = false;
|
|
19251
19265
|
setData(data => ({
|
|
@@ -19255,13 +19269,13 @@ function useFloating(options) {
|
|
|
19255
19269
|
}
|
|
19256
19270
|
}, [open]);
|
|
19257
19271
|
const isMountedRef = React__namespace.useRef(false);
|
|
19258
|
-
index$
|
|
19272
|
+
index$4(() => {
|
|
19259
19273
|
isMountedRef.current = true;
|
|
19260
19274
|
return () => {
|
|
19261
19275
|
isMountedRef.current = false;
|
|
19262
19276
|
};
|
|
19263
19277
|
}, []);
|
|
19264
|
-
index$
|
|
19278
|
+
index$4(() => {
|
|
19265
19279
|
if (referenceEl) referenceRef.current = referenceEl;
|
|
19266
19280
|
if (floatingEl) floatingRef.current = floatingEl;
|
|
19267
19281
|
if (referenceEl && floatingEl) {
|
|
@@ -19423,393 +19437,1115 @@ const OverlayPopper = ({
|
|
|
19423
19437
|
});
|
|
19424
19438
|
};
|
|
19425
19439
|
|
|
19426
|
-
|
|
19427
|
-
|
|
19428
|
-
|
|
19440
|
+
/**
|
|
19441
|
+
* 아무 행위도 하지 않는 함수입니다.
|
|
19442
|
+
*/
|
|
19443
|
+
function noop() {}
|
|
19444
|
+
|
|
19445
|
+
const Pagination = ({
|
|
19446
|
+
pages: propPages,
|
|
19447
|
+
currentPageIndex,
|
|
19448
|
+
aroundPageCount = 1,
|
|
19449
|
+
edgePageCount = 1,
|
|
19450
|
+
type = 'default',
|
|
19451
|
+
sx,
|
|
19452
|
+
onPageClick = noop,
|
|
19453
|
+
onPreviousClick = noop,
|
|
19454
|
+
onNextClick = noop,
|
|
19455
|
+
renderPage = (page, i) => /*#__PURE__*/jsxRuntimeExports.jsx(PaginationPage, {
|
|
19456
|
+
onClick: () => onPageClick(page, i),
|
|
19457
|
+
selected: i === currentPageIndex,
|
|
19458
|
+
children: page.label
|
|
19459
|
+
}),
|
|
19460
|
+
renderPageWrapper = (children, {
|
|
19461
|
+
label
|
|
19462
|
+
}, i) => /*#__PURE__*/jsxRuntimeExports.jsx(React.Fragment, {
|
|
19463
|
+
children: children
|
|
19464
|
+
}, [label, i].join('-')),
|
|
19465
|
+
renderPreviousPageDirection = ({
|
|
19466
|
+
previousPageDirectionProps
|
|
19467
|
+
}) => /*#__PURE__*/jsxRuntimeExports.jsxs(PaginationPageDirection, {
|
|
19468
|
+
...previousPageDirectionProps,
|
|
19469
|
+
children: [/*#__PURE__*/jsxRuntimeExports.jsx(SvgChevronLeft, {}), "\uC774\uC804"]
|
|
19470
|
+
}),
|
|
19471
|
+
renderNextPageDirection = ({
|
|
19472
|
+
nextPageDirectionProps
|
|
19473
|
+
}) => /*#__PURE__*/jsxRuntimeExports.jsxs(PaginationPageDirection, {
|
|
19474
|
+
...nextPageDirectionProps,
|
|
19475
|
+
children: ["\uB2E4\uC74C", /*#__PURE__*/jsxRuntimeExports.jsx(SvgChevronRight, {})]
|
|
19476
|
+
}),
|
|
19477
|
+
renderTruncationIndicator = () => /*#__PURE__*/jsxRuntimeExports.jsx(PaginationTruncationIndicator, {
|
|
19478
|
+
children: "\u2026"
|
|
19479
|
+
})
|
|
19480
|
+
}) => {
|
|
19481
|
+
const CURRENT_PAGE_COUNT = 1;
|
|
19482
|
+
const totalVisiblePageCount = CURRENT_PAGE_COUNT + 2 * aroundPageCount + 2 * edgePageCount;
|
|
19483
|
+
const pages = propPages.map((page, i) => ({
|
|
19484
|
+
page,
|
|
19485
|
+
originalIndex: i
|
|
19486
|
+
}));
|
|
19487
|
+
const totalPageCount = propPages.length;
|
|
19488
|
+
const isCurrentPageCloseToBeginEdge = currentPageIndex < edgePageCount + aroundPageCount + CURRENT_PAGE_COUNT;
|
|
19489
|
+
const isCurrentPageCloseToEndEdge = totalPageCount - (edgePageCount + aroundPageCount + CURRENT_PAGE_COUNT) < currentPageIndex + 1;
|
|
19490
|
+
const isTruncationNeeded = totalVisiblePageCount < totalPageCount;
|
|
19491
|
+
const renderPaginationPage = React.useCallback((page, i) => renderPageWrapper(renderPage(page, i), page, i), [currentPageIndex]);
|
|
19492
|
+
return /*#__PURE__*/jsxRuntimeExports.jsxs(BasePagination, {
|
|
19493
|
+
type: type,
|
|
19494
|
+
sx: sx,
|
|
19495
|
+
children: [renderPreviousPageDirection({
|
|
19496
|
+
previousPageDirectionProps: {
|
|
19497
|
+
onClick: () => onPreviousClick(currentPageIndex),
|
|
19498
|
+
disabled: currentPageIndex === 0
|
|
19499
|
+
}
|
|
19500
|
+
}), !isTruncationNeeded ? pages.map(({
|
|
19501
|
+
page,
|
|
19502
|
+
originalIndex
|
|
19503
|
+
}) => renderPaginationPage(page, originalIndex)) : isTruncationNeeded && isCurrentPageCloseToBeginEdge ? [pages.slice(0, edgePageCount + aroundPageCount * 2 + CURRENT_PAGE_COUNT).map(({
|
|
19504
|
+
page,
|
|
19505
|
+
originalIndex
|
|
19506
|
+
}) => renderPaginationPage(page, originalIndex)), /*#__PURE__*/jsxRuntimeExports.jsx(React.Fragment, {
|
|
19507
|
+
children: renderTruncationIndicator()
|
|
19508
|
+
}, 'end_truncation_indicator'), pages.slice(edgePageCount * -1).map(({
|
|
19509
|
+
page,
|
|
19510
|
+
originalIndex
|
|
19511
|
+
}) => renderPaginationPage(page, originalIndex))] : isTruncationNeeded && isCurrentPageCloseToEndEdge ? [pages.slice(0, edgePageCount).map(({
|
|
19512
|
+
page,
|
|
19513
|
+
originalIndex
|
|
19514
|
+
}) => renderPaginationPage(page, originalIndex)), /*#__PURE__*/jsxRuntimeExports.jsx(React.Fragment, {
|
|
19515
|
+
children: renderTruncationIndicator()
|
|
19516
|
+
}, 'begin_truncation_indicator'), pages.slice(totalPageCount - (edgePageCount + aroundPageCount * 2 + CURRENT_PAGE_COUNT)).map(({
|
|
19517
|
+
page,
|
|
19518
|
+
originalIndex
|
|
19519
|
+
}) => renderPaginationPage(page, originalIndex))] : [pages.slice(0, edgePageCount).map(({
|
|
19520
|
+
page,
|
|
19521
|
+
originalIndex
|
|
19522
|
+
}) => renderPaginationPage(page, originalIndex)), /*#__PURE__*/jsxRuntimeExports.jsx(React.Fragment, {
|
|
19523
|
+
children: renderTruncationIndicator()
|
|
19524
|
+
}, 'begin_truncation_indicator'), pages.slice(currentPageIndex - aroundPageCount, currentPageIndex + aroundPageCount + CURRENT_PAGE_COUNT).map(({
|
|
19525
|
+
page,
|
|
19526
|
+
originalIndex
|
|
19527
|
+
}) => renderPaginationPage(page, originalIndex)), /*#__PURE__*/jsxRuntimeExports.jsx(React.Fragment, {
|
|
19528
|
+
children: renderTruncationIndicator()
|
|
19529
|
+
}, 'end_truncation_indicator'), pages.slice(edgePageCount * -1).map(({
|
|
19530
|
+
page,
|
|
19531
|
+
originalIndex
|
|
19532
|
+
}) => renderPaginationPage(page, originalIndex))], renderNextPageDirection({
|
|
19533
|
+
nextPageDirectionProps: {
|
|
19534
|
+
onClick: () => onNextClick(currentPageIndex),
|
|
19535
|
+
disabled: currentPageIndex === totalPageCount - 1
|
|
19536
|
+
}
|
|
19537
|
+
})]
|
|
19538
|
+
});
|
|
19539
|
+
};
|
|
19540
|
+
const BasePagination = styled__default.default.nav`
|
|
19541
|
+
display: flex;
|
|
19542
|
+
align-items: center;
|
|
19543
|
+
justify-content: center;
|
|
19544
|
+
flex-wrap: nowrap;
|
|
19545
|
+
column-gap: ${({
|
|
19546
|
+
theme
|
|
19547
|
+
}) => forcePixelValue(theme.space[1])};
|
|
19548
|
+
|
|
19549
|
+
${variant({
|
|
19550
|
+
prop: 'type',
|
|
19551
|
+
variants: {
|
|
19552
|
+
default: {},
|
|
19553
|
+
simple: {
|
|
19554
|
+
'& > *:not(:first-child):not(:last-child)': {
|
|
19555
|
+
display: 'none !important'
|
|
19556
|
+
}
|
|
19557
|
+
}
|
|
19558
|
+
}
|
|
19559
|
+
})}
|
|
19429
19560
|
${sx}
|
|
19430
19561
|
`;
|
|
19562
|
+
const PaginationPage = styled__default.default(UnstyledButton)`
|
|
19563
|
+
transition: background-color 100ms;
|
|
19431
19564
|
|
|
19432
|
-
|
|
19433
|
-
|
|
19434
|
-
gapY = 0,
|
|
19435
|
-
children,
|
|
19436
|
-
alignItems = 'center',
|
|
19437
|
-
...props
|
|
19438
|
-
}, ref) => /*#__PURE__*/jsxRuntimeExports.jsx(BaseStack, {
|
|
19439
|
-
ref: ref,
|
|
19440
|
-
alignItems: alignItems,
|
|
19441
|
-
gapX: gapX,
|
|
19442
|
-
gapY: gapY,
|
|
19443
|
-
...props,
|
|
19444
|
-
children: children
|
|
19445
|
-
}));
|
|
19446
|
-
const BaseStack = styled__default.default(View)({
|
|
19447
|
-
display: 'flex',
|
|
19448
|
-
flexDirection: 'row',
|
|
19449
|
-
flexWrap: 'wrap'
|
|
19450
|
-
}, variant({
|
|
19451
|
-
prop: 'gapX',
|
|
19452
|
-
variants: Object.fromEntries(Object.entries(space).map(([key, value]) => {
|
|
19453
|
-
const styleValue = {
|
|
19454
|
-
'& > *': {
|
|
19455
|
-
px: forcePixelValue(value / 2)
|
|
19456
|
-
},
|
|
19457
|
-
'mx': forcePixelValue(-value / 2)
|
|
19458
|
-
};
|
|
19459
|
-
return [key, styleValue];
|
|
19460
|
-
}))
|
|
19461
|
-
}), variant({
|
|
19462
|
-
prop: 'gapY',
|
|
19463
|
-
variants: Object.fromEntries(Object.entries(space).map(([key, value]) => {
|
|
19464
|
-
const styleValue = {
|
|
19465
|
-
'& > *': {
|
|
19466
|
-
mt: forcePixelValue(value)
|
|
19467
|
-
},
|
|
19468
|
-
'mt': forcePixelValue(-value)
|
|
19469
|
-
};
|
|
19470
|
-
return [key, styleValue];
|
|
19471
|
-
}))
|
|
19472
|
-
}));
|
|
19473
|
-
const Item = ({
|
|
19474
|
-
children,
|
|
19475
|
-
...props
|
|
19476
|
-
}) => /*#__PURE__*/jsxRuntimeExports.jsx(View, {
|
|
19477
|
-
...props,
|
|
19478
|
-
children: children
|
|
19479
|
-
});
|
|
19480
|
-
var Stack$1 = Object.assign(Stack, {
|
|
19481
|
-
Item
|
|
19482
|
-
});
|
|
19483
|
-
|
|
19484
|
-
const StyledIcon = ({
|
|
19485
|
-
icon: Icon,
|
|
19486
|
-
sx,
|
|
19487
|
-
...props
|
|
19488
|
-
}) => /*#__PURE__*/jsxRuntimeExports.jsx(View, {
|
|
19489
|
-
...props,
|
|
19490
|
-
color: props.color,
|
|
19491
|
-
sx: {
|
|
19492
|
-
'& svg': {
|
|
19493
|
-
display: 'inline-flex',
|
|
19494
|
-
width: '100%',
|
|
19495
|
-
height: '100%'
|
|
19496
|
-
},
|
|
19497
|
-
...sx
|
|
19498
|
-
},
|
|
19499
|
-
children: /*#__PURE__*/jsxRuntimeExports.jsx(Icon, {})
|
|
19500
|
-
});
|
|
19565
|
+
height: ${forcePixelValue(32)};
|
|
19566
|
+
min-width: ${forcePixelValue(32)};
|
|
19501
19567
|
|
|
19502
|
-
|
|
19503
|
-
|
|
19504
|
-
|
|
19505
|
-
|
|
19506
|
-
|
|
19507
|
-
|
|
19508
|
-
|
|
19509
|
-
|
|
19568
|
+
border-radius: ${({
|
|
19569
|
+
theme
|
|
19570
|
+
}) => forcePixelValue(theme.radii.xs)};
|
|
19571
|
+
padding: ${({
|
|
19572
|
+
theme
|
|
19573
|
+
}) => `${forcePixelValue(theme.space[0])} ${forcePixelValue(theme.space[3])}`};
|
|
19574
|
+
background-color: ${({
|
|
19575
|
+
theme
|
|
19576
|
+
}) => theme.colors['bg/neutral/subtler']};
|
|
19510
19577
|
|
|
19511
|
-
|
|
19512
|
-
|
|
19578
|
+
font-size: ${({
|
|
19579
|
+
theme
|
|
19580
|
+
}) => forcePixelValue(theme.fontSizes.xs)};
|
|
19581
|
+
font-weight: ${({
|
|
19582
|
+
theme
|
|
19583
|
+
}) => theme.fontWeights.regular};
|
|
19584
|
+
line-height: ${({
|
|
19585
|
+
theme
|
|
19586
|
+
}) => theme.lineHeights[2]};
|
|
19587
|
+
color: ${({
|
|
19588
|
+
theme
|
|
19589
|
+
}) => theme.colors['text/neutral']};
|
|
19513
19590
|
|
|
19514
|
-
|
|
19515
|
-
|
|
19591
|
+
${({
|
|
19592
|
+
selected
|
|
19593
|
+
}) => selected ? styled.css`
|
|
19594
|
+
background-color: ${({
|
|
19595
|
+
theme
|
|
19596
|
+
}) => theme.colors['bg/neutral/bolder']};
|
|
19597
|
+
color: ${({
|
|
19598
|
+
theme
|
|
19599
|
+
}) => theme.colors['text/inverse']};
|
|
19600
|
+
` : styled.css`
|
|
19601
|
+
&:hover {
|
|
19602
|
+
background-color: ${({
|
|
19603
|
+
theme
|
|
19604
|
+
}) => theme.colors['bg/neutral/subtler/hovered']};
|
|
19605
|
+
}
|
|
19606
|
+
`}
|
|
19607
|
+
`;
|
|
19608
|
+
const PaginationPageDirection = styled__default.default(UnstyledButton)`
|
|
19609
|
+
transition: background-color 100ms;
|
|
19516
19610
|
|
|
19517
|
-
|
|
19518
|
-
|
|
19611
|
+
display: inline-flex;
|
|
19612
|
+
align-items: center;
|
|
19613
|
+
flex-wrap: nowrap;
|
|
19614
|
+
column-gap: ${({
|
|
19615
|
+
theme
|
|
19616
|
+
}) => forcePixelValue(theme.space[1])};
|
|
19519
19617
|
|
|
19520
|
-
|
|
19521
|
-
|
|
19618
|
+
height: ${forcePixelValue(32)};
|
|
19619
|
+
min-width: ${forcePixelValue(32)};
|
|
19522
19620
|
|
|
19523
|
-
|
|
19524
|
-
|
|
19621
|
+
border-radius: ${({
|
|
19622
|
+
theme
|
|
19623
|
+
}) => forcePixelValue(theme.radii.xs)};
|
|
19624
|
+
padding: ${({
|
|
19625
|
+
theme
|
|
19626
|
+
}) => `${forcePixelValue(theme.space[0])} ${forcePixelValue(theme.space[3])}`};
|
|
19627
|
+
background-color: ${({
|
|
19628
|
+
theme
|
|
19629
|
+
}) => theme.colors['bg/neutral/subtler']};
|
|
19525
19630
|
|
|
19526
|
-
|
|
19527
|
-
|
|
19631
|
+
font-size: ${({
|
|
19632
|
+
theme
|
|
19633
|
+
}) => forcePixelValue(theme.fontSizes.xs)};
|
|
19634
|
+
font-weight: ${({
|
|
19635
|
+
theme
|
|
19636
|
+
}) => theme.fontWeights.regular};
|
|
19637
|
+
line-height: ${({
|
|
19638
|
+
theme
|
|
19639
|
+
}) => theme.lineHeights[2]};
|
|
19640
|
+
color: ${({
|
|
19641
|
+
theme
|
|
19642
|
+
}) => theme.colors['text/neutral']};
|
|
19528
19643
|
|
|
19529
|
-
|
|
19530
|
-
|
|
19644
|
+
& svg {
|
|
19645
|
+
color: ${({
|
|
19646
|
+
theme
|
|
19647
|
+
}) => theme.colors['icon/accent/gray']};
|
|
19648
|
+
width: ${forcePixelValue(16)};
|
|
19649
|
+
height: ${forcePixelValue(16)};
|
|
19650
|
+
}
|
|
19531
19651
|
|
|
19532
|
-
|
|
19533
|
-
|
|
19652
|
+
&:hover:not(:disabled) {
|
|
19653
|
+
background-color: ${({
|
|
19654
|
+
theme
|
|
19655
|
+
}) => theme.colors['bg/neutral/subtler/hovered']};
|
|
19656
|
+
}
|
|
19657
|
+
&:disabled {
|
|
19658
|
+
cursor: not-allowed;
|
|
19659
|
+
color: ${({
|
|
19660
|
+
theme
|
|
19661
|
+
}) => theme.colors['text/disabled']};
|
|
19662
|
+
& > svg {
|
|
19663
|
+
color: ${({
|
|
19664
|
+
theme
|
|
19665
|
+
}) => theme.colors['icon/disabled']};
|
|
19666
|
+
}
|
|
19667
|
+
}
|
|
19668
|
+
`;
|
|
19669
|
+
const PaginationTruncationIndicator = styled__default.default.div`
|
|
19670
|
+
min-width: ${forcePixelValue(32)};
|
|
19534
19671
|
|
|
19535
|
-
|
|
19536
|
-
|
|
19672
|
+
border-radius: ${({
|
|
19673
|
+
theme
|
|
19674
|
+
}) => forcePixelValue(theme.radii.xs)};
|
|
19675
|
+
padding: ${({
|
|
19676
|
+
theme
|
|
19677
|
+
}) => `${forcePixelValue(theme.space[0])} ${forcePixelValue(theme.space[3])}`};
|
|
19678
|
+
background-color: ${({
|
|
19679
|
+
theme
|
|
19680
|
+
}) => theme.colors['bg/neutral/subtler']};
|
|
19537
19681
|
|
|
19538
|
-
|
|
19539
|
-
|
|
19682
|
+
font-size: ${({
|
|
19683
|
+
theme
|
|
19684
|
+
}) => forcePixelValue(theme.fontSizes.xs)};
|
|
19685
|
+
font-weight: ${({
|
|
19686
|
+
theme
|
|
19687
|
+
}) => theme.fontWeights.regular};
|
|
19688
|
+
line-height: ${({
|
|
19689
|
+
theme
|
|
19690
|
+
}) => theme.lineHeights[2]};
|
|
19691
|
+
color: ${({
|
|
19692
|
+
theme
|
|
19693
|
+
}) => theme.colors['text/neutral']};
|
|
19540
19694
|
|
|
19541
|
-
|
|
19542
|
-
var root$1 = freeGlobal$1 || freeSelf$1 || Function('return this')();
|
|
19695
|
+
pointer-events: none;
|
|
19543
19696
|
|
|
19544
|
-
|
|
19545
|
-
|
|
19697
|
+
${sx}
|
|
19698
|
+
`;
|
|
19699
|
+
var index$3 = Object.assign(Pagination, {
|
|
19700
|
+
Page: PaginationPage,
|
|
19701
|
+
PageDirection: PaginationPageDirection,
|
|
19702
|
+
TruncationIndicator: PaginationTruncationIndicator
|
|
19703
|
+
});
|
|
19546
19704
|
|
|
19547
|
-
|
|
19548
|
-
* Used to resolve the
|
|
19549
|
-
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
19550
|
-
* of values.
|
|
19551
|
-
*/
|
|
19552
|
-
var objectToString$1 = objectProto$1.toString;
|
|
19705
|
+
var reactIs = {exports: {}};
|
|
19553
19706
|
|
|
19554
|
-
|
|
19555
|
-
var nativeMax$1 = Math.max,
|
|
19556
|
-
nativeMin$1 = Math.min;
|
|
19707
|
+
var reactIs_production_min = {};
|
|
19557
19708
|
|
|
19558
19709
|
/**
|
|
19559
|
-
*
|
|
19560
|
-
*
|
|
19710
|
+
* @license React
|
|
19711
|
+
* react-is.production.min.js
|
|
19561
19712
|
*
|
|
19562
|
-
*
|
|
19563
|
-
* @memberOf _
|
|
19564
|
-
* @since 2.4.0
|
|
19565
|
-
* @category Date
|
|
19566
|
-
* @returns {number} Returns the timestamp.
|
|
19567
|
-
* @example
|
|
19713
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
19568
19714
|
*
|
|
19569
|
-
*
|
|
19570
|
-
*
|
|
19571
|
-
* }, _.now());
|
|
19572
|
-
* // => Logs the number of milliseconds it took for the deferred invocation.
|
|
19715
|
+
* This source code is licensed under the MIT license found in the
|
|
19716
|
+
* LICENSE file in the root directory of this source tree.
|
|
19573
19717
|
*/
|
|
19574
|
-
var
|
|
19575
|
-
|
|
19576
|
-
|
|
19718
|
+
var hasRequiredReactIs_production_min;
|
|
19719
|
+
function requireReactIs_production_min() {
|
|
19720
|
+
if (hasRequiredReactIs_production_min) return reactIs_production_min;
|
|
19721
|
+
hasRequiredReactIs_production_min = 1;
|
|
19722
|
+
var b = Symbol.for("react.element"),
|
|
19723
|
+
c = Symbol.for("react.portal"),
|
|
19724
|
+
d = Symbol.for("react.fragment"),
|
|
19725
|
+
e = Symbol.for("react.strict_mode"),
|
|
19726
|
+
f = Symbol.for("react.profiler"),
|
|
19727
|
+
g = Symbol.for("react.provider"),
|
|
19728
|
+
h = Symbol.for("react.context"),
|
|
19729
|
+
k = Symbol.for("react.server_context"),
|
|
19730
|
+
l = Symbol.for("react.forward_ref"),
|
|
19731
|
+
m = Symbol.for("react.suspense"),
|
|
19732
|
+
n = Symbol.for("react.suspense_list"),
|
|
19733
|
+
p = Symbol.for("react.memo"),
|
|
19734
|
+
q = Symbol.for("react.lazy"),
|
|
19735
|
+
t = Symbol.for("react.offscreen"),
|
|
19736
|
+
u;
|
|
19737
|
+
u = Symbol.for("react.module.reference");
|
|
19738
|
+
function v(a) {
|
|
19739
|
+
if ("object" === typeof a && null !== a) {
|
|
19740
|
+
var r = a.$$typeof;
|
|
19741
|
+
switch (r) {
|
|
19742
|
+
case b:
|
|
19743
|
+
switch (a = a.type, a) {
|
|
19744
|
+
case d:
|
|
19745
|
+
case f:
|
|
19746
|
+
case e:
|
|
19747
|
+
case m:
|
|
19748
|
+
case n:
|
|
19749
|
+
return a;
|
|
19750
|
+
default:
|
|
19751
|
+
switch (a = a && a.$$typeof, a) {
|
|
19752
|
+
case k:
|
|
19753
|
+
case h:
|
|
19754
|
+
case l:
|
|
19755
|
+
case q:
|
|
19756
|
+
case p:
|
|
19757
|
+
case g:
|
|
19758
|
+
return a;
|
|
19759
|
+
default:
|
|
19760
|
+
return r;
|
|
19761
|
+
}
|
|
19762
|
+
}
|
|
19763
|
+
case c:
|
|
19764
|
+
return r;
|
|
19765
|
+
}
|
|
19766
|
+
}
|
|
19767
|
+
}
|
|
19768
|
+
reactIs_production_min.ContextConsumer = h;
|
|
19769
|
+
reactIs_production_min.ContextProvider = g;
|
|
19770
|
+
reactIs_production_min.Element = b;
|
|
19771
|
+
reactIs_production_min.ForwardRef = l;
|
|
19772
|
+
reactIs_production_min.Fragment = d;
|
|
19773
|
+
reactIs_production_min.Lazy = q;
|
|
19774
|
+
reactIs_production_min.Memo = p;
|
|
19775
|
+
reactIs_production_min.Portal = c;
|
|
19776
|
+
reactIs_production_min.Profiler = f;
|
|
19777
|
+
reactIs_production_min.StrictMode = e;
|
|
19778
|
+
reactIs_production_min.Suspense = m;
|
|
19779
|
+
reactIs_production_min.SuspenseList = n;
|
|
19780
|
+
reactIs_production_min.isAsyncMode = function () {
|
|
19781
|
+
return !1;
|
|
19782
|
+
};
|
|
19783
|
+
reactIs_production_min.isConcurrentMode = function () {
|
|
19784
|
+
return !1;
|
|
19785
|
+
};
|
|
19786
|
+
reactIs_production_min.isContextConsumer = function (a) {
|
|
19787
|
+
return v(a) === h;
|
|
19788
|
+
};
|
|
19789
|
+
reactIs_production_min.isContextProvider = function (a) {
|
|
19790
|
+
return v(a) === g;
|
|
19791
|
+
};
|
|
19792
|
+
reactIs_production_min.isElement = function (a) {
|
|
19793
|
+
return "object" === typeof a && null !== a && a.$$typeof === b;
|
|
19794
|
+
};
|
|
19795
|
+
reactIs_production_min.isForwardRef = function (a) {
|
|
19796
|
+
return v(a) === l;
|
|
19797
|
+
};
|
|
19798
|
+
reactIs_production_min.isFragment = function (a) {
|
|
19799
|
+
return v(a) === d;
|
|
19800
|
+
};
|
|
19801
|
+
reactIs_production_min.isLazy = function (a) {
|
|
19802
|
+
return v(a) === q;
|
|
19803
|
+
};
|
|
19804
|
+
reactIs_production_min.isMemo = function (a) {
|
|
19805
|
+
return v(a) === p;
|
|
19806
|
+
};
|
|
19807
|
+
reactIs_production_min.isPortal = function (a) {
|
|
19808
|
+
return v(a) === c;
|
|
19809
|
+
};
|
|
19810
|
+
reactIs_production_min.isProfiler = function (a) {
|
|
19811
|
+
return v(a) === f;
|
|
19812
|
+
};
|
|
19813
|
+
reactIs_production_min.isStrictMode = function (a) {
|
|
19814
|
+
return v(a) === e;
|
|
19815
|
+
};
|
|
19816
|
+
reactIs_production_min.isSuspense = function (a) {
|
|
19817
|
+
return v(a) === m;
|
|
19818
|
+
};
|
|
19819
|
+
reactIs_production_min.isSuspenseList = function (a) {
|
|
19820
|
+
return v(a) === n;
|
|
19821
|
+
};
|
|
19822
|
+
reactIs_production_min.isValidElementType = function (a) {
|
|
19823
|
+
return "string" === typeof a || "function" === typeof a || a === d || a === f || a === e || a === m || a === n || a === t || "object" === typeof a && null !== a && (a.$$typeof === q || a.$$typeof === p || a.$$typeof === g || a.$$typeof === h || a.$$typeof === l || a.$$typeof === u || void 0 !== a.getModuleId) ? !0 : !1;
|
|
19824
|
+
};
|
|
19825
|
+
reactIs_production_min.typeOf = v;
|
|
19826
|
+
return reactIs_production_min;
|
|
19827
|
+
}
|
|
19828
|
+
|
|
19829
|
+
var reactIs_development = {};
|
|
19577
19830
|
|
|
19578
19831
|
/**
|
|
19579
|
-
*
|
|
19580
|
-
*
|
|
19581
|
-
* invoked. The debounced function comes with a `cancel` method to cancel
|
|
19582
|
-
* delayed `func` invocations and a `flush` method to immediately invoke them.
|
|
19583
|
-
* Provide `options` to indicate whether `func` should be invoked on the
|
|
19584
|
-
* leading and/or trailing edge of the `wait` timeout. The `func` is invoked
|
|
19585
|
-
* with the last arguments provided to the debounced function. Subsequent
|
|
19586
|
-
* calls to the debounced function return the result of the last `func`
|
|
19587
|
-
* invocation.
|
|
19588
|
-
*
|
|
19589
|
-
* **Note:** If `leading` and `trailing` options are `true`, `func` is
|
|
19590
|
-
* invoked on the trailing edge of the timeout only if the debounced function
|
|
19591
|
-
* is invoked more than once during the `wait` timeout.
|
|
19592
|
-
*
|
|
19593
|
-
* If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
|
|
19594
|
-
* until to the next tick, similar to `setTimeout` with a timeout of `0`.
|
|
19595
|
-
*
|
|
19596
|
-
* See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
|
|
19597
|
-
* for details over the differences between `_.debounce` and `_.throttle`.
|
|
19598
|
-
*
|
|
19599
|
-
* @static
|
|
19600
|
-
* @memberOf _
|
|
19601
|
-
* @since 0.1.0
|
|
19602
|
-
* @category Function
|
|
19603
|
-
* @param {Function} func The function to debounce.
|
|
19604
|
-
* @param {number} [wait=0] The number of milliseconds to delay.
|
|
19605
|
-
* @param {Object} [options={}] The options object.
|
|
19606
|
-
* @param {boolean} [options.leading=false]
|
|
19607
|
-
* Specify invoking on the leading edge of the timeout.
|
|
19608
|
-
* @param {number} [options.maxWait]
|
|
19609
|
-
* The maximum time `func` is allowed to be delayed before it's invoked.
|
|
19610
|
-
* @param {boolean} [options.trailing=true]
|
|
19611
|
-
* Specify invoking on the trailing edge of the timeout.
|
|
19612
|
-
* @returns {Function} Returns the new debounced function.
|
|
19613
|
-
* @example
|
|
19614
|
-
*
|
|
19615
|
-
* // Avoid costly calculations while the window size is in flux.
|
|
19616
|
-
* jQuery(window).on('resize', _.debounce(calculateLayout, 150));
|
|
19617
|
-
*
|
|
19618
|
-
* // Invoke `sendMail` when clicked, debouncing subsequent calls.
|
|
19619
|
-
* jQuery(element).on('click', _.debounce(sendMail, 300, {
|
|
19620
|
-
* 'leading': true,
|
|
19621
|
-
* 'trailing': false
|
|
19622
|
-
* }));
|
|
19832
|
+
* @license React
|
|
19833
|
+
* react-is.development.js
|
|
19623
19834
|
*
|
|
19624
|
-
*
|
|
19625
|
-
* var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
|
|
19626
|
-
* var source = new EventSource('/stream');
|
|
19627
|
-
* jQuery(source).on('message', debounced);
|
|
19835
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
19628
19836
|
*
|
|
19629
|
-
*
|
|
19630
|
-
*
|
|
19837
|
+
* This source code is licensed under the MIT license found in the
|
|
19838
|
+
* LICENSE file in the root directory of this source tree.
|
|
19631
19839
|
*/
|
|
19632
|
-
|
|
19633
|
-
|
|
19634
|
-
|
|
19635
|
-
|
|
19636
|
-
|
|
19637
|
-
|
|
19638
|
-
lastCallTime,
|
|
19639
|
-
lastInvokeTime = 0,
|
|
19640
|
-
leading = false,
|
|
19641
|
-
maxing = false,
|
|
19642
|
-
trailing = true;
|
|
19643
|
-
if (typeof func != 'function') {
|
|
19644
|
-
throw new TypeError(FUNC_ERROR_TEXT$1);
|
|
19645
|
-
}
|
|
19646
|
-
wait = toNumber$1(wait) || 0;
|
|
19647
|
-
if (isObject$1(options)) {
|
|
19648
|
-
leading = !!options.leading;
|
|
19649
|
-
maxing = 'maxWait' in options;
|
|
19650
|
-
maxWait = maxing ? nativeMax$1(toNumber$1(options.maxWait) || 0, wait) : maxWait;
|
|
19651
|
-
trailing = 'trailing' in options ? !!options.trailing : trailing;
|
|
19652
|
-
}
|
|
19653
|
-
function invokeFunc(time) {
|
|
19654
|
-
var args = lastArgs,
|
|
19655
|
-
thisArg = lastThis;
|
|
19656
|
-
lastArgs = lastThis = undefined;
|
|
19657
|
-
lastInvokeTime = time;
|
|
19658
|
-
result = func.apply(thisArg, args);
|
|
19659
|
-
return result;
|
|
19660
|
-
}
|
|
19661
|
-
function leadingEdge(time) {
|
|
19662
|
-
// Reset any `maxWait` timer.
|
|
19663
|
-
lastInvokeTime = time;
|
|
19664
|
-
// Start the timer for the trailing edge.
|
|
19665
|
-
timerId = setTimeout(timerExpired, wait);
|
|
19666
|
-
// Invoke the leading edge.
|
|
19667
|
-
return leading ? invokeFunc(time) : result;
|
|
19668
|
-
}
|
|
19669
|
-
function remainingWait(time) {
|
|
19670
|
-
var timeSinceLastCall = time - lastCallTime,
|
|
19671
|
-
timeSinceLastInvoke = time - lastInvokeTime,
|
|
19672
|
-
result = wait - timeSinceLastCall;
|
|
19673
|
-
return maxing ? nativeMin$1(result, maxWait - timeSinceLastInvoke) : result;
|
|
19674
|
-
}
|
|
19675
|
-
function shouldInvoke(time) {
|
|
19676
|
-
var timeSinceLastCall = time - lastCallTime,
|
|
19677
|
-
timeSinceLastInvoke = time - lastInvokeTime;
|
|
19840
|
+
var hasRequiredReactIs_development;
|
|
19841
|
+
function requireReactIs_development() {
|
|
19842
|
+
if (hasRequiredReactIs_development) return reactIs_development;
|
|
19843
|
+
hasRequiredReactIs_development = 1;
|
|
19844
|
+
if (process.env.NODE_ENV !== "production") {
|
|
19845
|
+
(function () {
|
|
19678
19846
|
|
|
19679
|
-
|
|
19680
|
-
|
|
19681
|
-
|
|
19682
|
-
|
|
19683
|
-
|
|
19684
|
-
|
|
19685
|
-
|
|
19686
|
-
|
|
19687
|
-
|
|
19688
|
-
|
|
19689
|
-
|
|
19690
|
-
|
|
19691
|
-
|
|
19692
|
-
|
|
19693
|
-
|
|
19847
|
+
// ATTENTION
|
|
19848
|
+
// When adding new symbols to this file,
|
|
19849
|
+
// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
|
|
19850
|
+
// The Symbol used to tag the ReactElement-like types.
|
|
19851
|
+
var REACT_ELEMENT_TYPE = Symbol.for('react.element');
|
|
19852
|
+
var REACT_PORTAL_TYPE = Symbol.for('react.portal');
|
|
19853
|
+
var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');
|
|
19854
|
+
var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');
|
|
19855
|
+
var REACT_PROFILER_TYPE = Symbol.for('react.profiler');
|
|
19856
|
+
var REACT_PROVIDER_TYPE = Symbol.for('react.provider');
|
|
19857
|
+
var REACT_CONTEXT_TYPE = Symbol.for('react.context');
|
|
19858
|
+
var REACT_SERVER_CONTEXT_TYPE = Symbol.for('react.server_context');
|
|
19859
|
+
var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');
|
|
19860
|
+
var REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');
|
|
19861
|
+
var REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');
|
|
19862
|
+
var REACT_MEMO_TYPE = Symbol.for('react.memo');
|
|
19863
|
+
var REACT_LAZY_TYPE = Symbol.for('react.lazy');
|
|
19864
|
+
var REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');
|
|
19694
19865
|
|
|
19695
|
-
|
|
19696
|
-
|
|
19697
|
-
|
|
19698
|
-
|
|
19699
|
-
|
|
19700
|
-
|
|
19701
|
-
|
|
19702
|
-
|
|
19703
|
-
|
|
19704
|
-
|
|
19705
|
-
|
|
19706
|
-
|
|
19707
|
-
|
|
19708
|
-
|
|
19866
|
+
// -----------------------------------------------------------------------------
|
|
19867
|
+
|
|
19868
|
+
var enableScopeAPI = false; // Experimental Create Event Handle API.
|
|
19869
|
+
var enableCacheElement = false;
|
|
19870
|
+
var enableTransitionTracing = false; // No known bugs, but needs performance testing
|
|
19871
|
+
|
|
19872
|
+
var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber
|
|
19873
|
+
// stuff. Intended to enable React core members to more easily debug scheduling
|
|
19874
|
+
// issues in DEV builds.
|
|
19875
|
+
|
|
19876
|
+
var enableDebugTracing = false; // Track which Fiber(s) schedule render work.
|
|
19877
|
+
|
|
19878
|
+
var REACT_MODULE_REFERENCE;
|
|
19879
|
+
{
|
|
19880
|
+
REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');
|
|
19881
|
+
}
|
|
19882
|
+
function isValidElementType(type) {
|
|
19883
|
+
if (typeof type === 'string' || typeof type === 'function') {
|
|
19884
|
+
return true;
|
|
19885
|
+
} // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
|
|
19886
|
+
|
|
19887
|
+
if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing) {
|
|
19888
|
+
return true;
|
|
19889
|
+
}
|
|
19890
|
+
if (typeof type === 'object' && type !== null) {
|
|
19891
|
+
if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE ||
|
|
19892
|
+
// This needs to include all possible module reference object
|
|
19893
|
+
// types supported by any Flight configuration anywhere since
|
|
19894
|
+
// we don't know which Flight build this will end up being used
|
|
19895
|
+
// with.
|
|
19896
|
+
type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {
|
|
19897
|
+
return true;
|
|
19898
|
+
}
|
|
19899
|
+
}
|
|
19900
|
+
return false;
|
|
19901
|
+
}
|
|
19902
|
+
function typeOf(object) {
|
|
19903
|
+
if (typeof object === 'object' && object !== null) {
|
|
19904
|
+
var $$typeof = object.$$typeof;
|
|
19905
|
+
switch ($$typeof) {
|
|
19906
|
+
case REACT_ELEMENT_TYPE:
|
|
19907
|
+
var type = object.type;
|
|
19908
|
+
switch (type) {
|
|
19909
|
+
case REACT_FRAGMENT_TYPE:
|
|
19910
|
+
case REACT_PROFILER_TYPE:
|
|
19911
|
+
case REACT_STRICT_MODE_TYPE:
|
|
19912
|
+
case REACT_SUSPENSE_TYPE:
|
|
19913
|
+
case REACT_SUSPENSE_LIST_TYPE:
|
|
19914
|
+
return type;
|
|
19915
|
+
default:
|
|
19916
|
+
var $$typeofType = type && type.$$typeof;
|
|
19917
|
+
switch ($$typeofType) {
|
|
19918
|
+
case REACT_SERVER_CONTEXT_TYPE:
|
|
19919
|
+
case REACT_CONTEXT_TYPE:
|
|
19920
|
+
case REACT_FORWARD_REF_TYPE:
|
|
19921
|
+
case REACT_LAZY_TYPE:
|
|
19922
|
+
case REACT_MEMO_TYPE:
|
|
19923
|
+
case REACT_PROVIDER_TYPE:
|
|
19924
|
+
return $$typeofType;
|
|
19925
|
+
default:
|
|
19926
|
+
return $$typeof;
|
|
19927
|
+
}
|
|
19928
|
+
}
|
|
19929
|
+
case REACT_PORTAL_TYPE:
|
|
19930
|
+
return $$typeof;
|
|
19931
|
+
}
|
|
19932
|
+
}
|
|
19933
|
+
return undefined;
|
|
19934
|
+
}
|
|
19935
|
+
var ContextConsumer = REACT_CONTEXT_TYPE;
|
|
19936
|
+
var ContextProvider = REACT_PROVIDER_TYPE;
|
|
19937
|
+
var Element = REACT_ELEMENT_TYPE;
|
|
19938
|
+
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
|
19939
|
+
var Fragment = REACT_FRAGMENT_TYPE;
|
|
19940
|
+
var Lazy = REACT_LAZY_TYPE;
|
|
19941
|
+
var Memo = REACT_MEMO_TYPE;
|
|
19942
|
+
var Portal = REACT_PORTAL_TYPE;
|
|
19943
|
+
var Profiler = REACT_PROFILER_TYPE;
|
|
19944
|
+
var StrictMode = REACT_STRICT_MODE_TYPE;
|
|
19945
|
+
var Suspense = REACT_SUSPENSE_TYPE;
|
|
19946
|
+
var SuspenseList = REACT_SUSPENSE_LIST_TYPE;
|
|
19947
|
+
var hasWarnedAboutDeprecatedIsAsyncMode = false;
|
|
19948
|
+
var hasWarnedAboutDeprecatedIsConcurrentMode = false; // AsyncMode should be deprecated
|
|
19949
|
+
|
|
19950
|
+
function isAsyncMode(object) {
|
|
19951
|
+
{
|
|
19952
|
+
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
|
|
19953
|
+
hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
|
|
19954
|
+
|
|
19955
|
+
console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 18+.');
|
|
19956
|
+
}
|
|
19957
|
+
}
|
|
19958
|
+
return false;
|
|
19959
|
+
}
|
|
19960
|
+
function isConcurrentMode(object) {
|
|
19961
|
+
{
|
|
19962
|
+
if (!hasWarnedAboutDeprecatedIsConcurrentMode) {
|
|
19963
|
+
hasWarnedAboutDeprecatedIsConcurrentMode = true; // Using console['warn'] to evade Babel and ESLint
|
|
19964
|
+
|
|
19965
|
+
console['warn']('The ReactIs.isConcurrentMode() alias has been deprecated, ' + 'and will be removed in React 18+.');
|
|
19966
|
+
}
|
|
19967
|
+
}
|
|
19968
|
+
return false;
|
|
19969
|
+
}
|
|
19970
|
+
function isContextConsumer(object) {
|
|
19971
|
+
return typeOf(object) === REACT_CONTEXT_TYPE;
|
|
19972
|
+
}
|
|
19973
|
+
function isContextProvider(object) {
|
|
19974
|
+
return typeOf(object) === REACT_PROVIDER_TYPE;
|
|
19975
|
+
}
|
|
19976
|
+
function isElement(object) {
|
|
19977
|
+
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
19978
|
+
}
|
|
19979
|
+
function isForwardRef(object) {
|
|
19980
|
+
return typeOf(object) === REACT_FORWARD_REF_TYPE;
|
|
19981
|
+
}
|
|
19982
|
+
function isFragment(object) {
|
|
19983
|
+
return typeOf(object) === REACT_FRAGMENT_TYPE;
|
|
19984
|
+
}
|
|
19985
|
+
function isLazy(object) {
|
|
19986
|
+
return typeOf(object) === REACT_LAZY_TYPE;
|
|
19987
|
+
}
|
|
19988
|
+
function isMemo(object) {
|
|
19989
|
+
return typeOf(object) === REACT_MEMO_TYPE;
|
|
19990
|
+
}
|
|
19991
|
+
function isPortal(object) {
|
|
19992
|
+
return typeOf(object) === REACT_PORTAL_TYPE;
|
|
19993
|
+
}
|
|
19994
|
+
function isProfiler(object) {
|
|
19995
|
+
return typeOf(object) === REACT_PROFILER_TYPE;
|
|
19996
|
+
}
|
|
19997
|
+
function isStrictMode(object) {
|
|
19998
|
+
return typeOf(object) === REACT_STRICT_MODE_TYPE;
|
|
19999
|
+
}
|
|
20000
|
+
function isSuspense(object) {
|
|
20001
|
+
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
|
20002
|
+
}
|
|
20003
|
+
function isSuspenseList(object) {
|
|
20004
|
+
return typeOf(object) === REACT_SUSPENSE_LIST_TYPE;
|
|
20005
|
+
}
|
|
20006
|
+
reactIs_development.ContextConsumer = ContextConsumer;
|
|
20007
|
+
reactIs_development.ContextProvider = ContextProvider;
|
|
20008
|
+
reactIs_development.Element = Element;
|
|
20009
|
+
reactIs_development.ForwardRef = ForwardRef;
|
|
20010
|
+
reactIs_development.Fragment = Fragment;
|
|
20011
|
+
reactIs_development.Lazy = Lazy;
|
|
20012
|
+
reactIs_development.Memo = Memo;
|
|
20013
|
+
reactIs_development.Portal = Portal;
|
|
20014
|
+
reactIs_development.Profiler = Profiler;
|
|
20015
|
+
reactIs_development.StrictMode = StrictMode;
|
|
20016
|
+
reactIs_development.Suspense = Suspense;
|
|
20017
|
+
reactIs_development.SuspenseList = SuspenseList;
|
|
20018
|
+
reactIs_development.isAsyncMode = isAsyncMode;
|
|
20019
|
+
reactIs_development.isConcurrentMode = isConcurrentMode;
|
|
20020
|
+
reactIs_development.isContextConsumer = isContextConsumer;
|
|
20021
|
+
reactIs_development.isContextProvider = isContextProvider;
|
|
20022
|
+
reactIs_development.isElement = isElement;
|
|
20023
|
+
reactIs_development.isForwardRef = isForwardRef;
|
|
20024
|
+
reactIs_development.isFragment = isFragment;
|
|
20025
|
+
reactIs_development.isLazy = isLazy;
|
|
20026
|
+
reactIs_development.isMemo = isMemo;
|
|
20027
|
+
reactIs_development.isPortal = isPortal;
|
|
20028
|
+
reactIs_development.isProfiler = isProfiler;
|
|
20029
|
+
reactIs_development.isStrictMode = isStrictMode;
|
|
20030
|
+
reactIs_development.isSuspense = isSuspense;
|
|
20031
|
+
reactIs_development.isSuspenseList = isSuspenseList;
|
|
20032
|
+
reactIs_development.isValidElementType = isValidElementType;
|
|
20033
|
+
reactIs_development.typeOf = typeOf;
|
|
20034
|
+
})();
|
|
19709
20035
|
}
|
|
19710
|
-
|
|
19711
|
-
|
|
20036
|
+
return reactIs_development;
|
|
20037
|
+
}
|
|
20038
|
+
|
|
20039
|
+
if (process.env.NODE_ENV === 'production') {
|
|
20040
|
+
reactIs.exports = requireReactIs_production_min();
|
|
20041
|
+
} else {
|
|
20042
|
+
reactIs.exports = requireReactIs_development();
|
|
20043
|
+
}
|
|
20044
|
+
var reactIsExports = reactIs.exports;
|
|
20045
|
+
|
|
20046
|
+
const Pill = ({
|
|
20047
|
+
text,
|
|
20048
|
+
size = 'm',
|
|
20049
|
+
variant = 'secondary',
|
|
20050
|
+
leadingVisual: LeadingVisual,
|
|
20051
|
+
onRemove,
|
|
20052
|
+
...props
|
|
20053
|
+
}, ref) => /*#__PURE__*/jsxRuntimeExports.jsxs(BasePill, {
|
|
20054
|
+
ref: ref,
|
|
20055
|
+
size: size,
|
|
20056
|
+
variant: variant,
|
|
20057
|
+
hasLeadingVisual: !isNullable(LeadingVisual),
|
|
20058
|
+
hasRemoveButton: !isNullable(onRemove),
|
|
20059
|
+
...props,
|
|
20060
|
+
children: [typeof LeadingVisual !== 'string' && reactIsExports.isValidElementType(LeadingVisual) ? /*#__PURE__*/jsxRuntimeExports.jsx(LeadingVisual, {}) : LeadingVisual, text, onRemove ? /*#__PURE__*/jsxRuntimeExports.jsx(UnstyledButton, {
|
|
20061
|
+
type: 'button',
|
|
20062
|
+
onClick: onRemove,
|
|
20063
|
+
"aria-label": 'Remove Pill',
|
|
20064
|
+
children: /*#__PURE__*/jsxRuntimeExports.jsx(SvgClose, {})
|
|
20065
|
+
}) : null]
|
|
20066
|
+
});
|
|
20067
|
+
const BasePill = styled__default.default.span`
|
|
20068
|
+
display: inline-flex;
|
|
20069
|
+
align-items: center;
|
|
20070
|
+
border-radius: ${({
|
|
20071
|
+
theme
|
|
20072
|
+
}) => forcePixelValue(theme.radii.xxs)};
|
|
20073
|
+
|
|
20074
|
+
& > button {
|
|
20075
|
+
display: flex;
|
|
20076
|
+
transition: background-color 100ms;
|
|
20077
|
+
border-radius: ${({
|
|
20078
|
+
theme
|
|
20079
|
+
}) => forcePixelValue(theme.radii.full)};
|
|
19712
20080
|
}
|
|
19713
|
-
|
|
19714
|
-
|
|
19715
|
-
|
|
19716
|
-
|
|
19717
|
-
|
|
19718
|
-
|
|
19719
|
-
|
|
19720
|
-
|
|
19721
|
-
|
|
20081
|
+
|
|
20082
|
+
${({
|
|
20083
|
+
theme,
|
|
20084
|
+
hasLeadingVisual,
|
|
20085
|
+
hasRemoveButton
|
|
20086
|
+
}) => variant({
|
|
20087
|
+
prop: 'size',
|
|
20088
|
+
variants: {
|
|
20089
|
+
l: {
|
|
20090
|
+
'pl': hasLeadingVisual || hasRemoveButton ? 2 : 3,
|
|
20091
|
+
'pr': hasRemoveButton ? 0.5 : hasLeadingVisual ? 2 : 3,
|
|
20092
|
+
'py': 1,
|
|
20093
|
+
'fontSize': theme.fontSizes.s,
|
|
20094
|
+
'fontWeight': theme.fontWeights.medium,
|
|
20095
|
+
'lineHeight': theme.lineHeights[2],
|
|
20096
|
+
'columnGap': 1,
|
|
20097
|
+
'& svg': {
|
|
20098
|
+
width: 16,
|
|
20099
|
+
height: 16,
|
|
20100
|
+
color: theme.colors['icon/primary']
|
|
20101
|
+
},
|
|
20102
|
+
'& button': {
|
|
20103
|
+
p: 1
|
|
19722
20104
|
}
|
|
19723
|
-
|
|
19724
|
-
|
|
19725
|
-
|
|
19726
|
-
|
|
20105
|
+
},
|
|
20106
|
+
m: {
|
|
20107
|
+
'pl': hasLeadingVisual || hasRemoveButton ? 2 : 3,
|
|
20108
|
+
'pr': hasRemoveButton ? 1 : hasLeadingVisual ? 2 : 3,
|
|
20109
|
+
'py': 1,
|
|
20110
|
+
'fontSize': theme.fontSizes.xs,
|
|
20111
|
+
'fontWeight': theme.fontWeights.medium,
|
|
20112
|
+
'lineHeight': theme.lineHeights[2],
|
|
20113
|
+
'columnGap': 0.5,
|
|
20114
|
+
'& svg': {
|
|
20115
|
+
width: 16,
|
|
20116
|
+
height: 16,
|
|
20117
|
+
color: theme.colors['icon/primary']
|
|
20118
|
+
},
|
|
20119
|
+
'& button': {
|
|
20120
|
+
p: 0.5
|
|
20121
|
+
}
|
|
20122
|
+
},
|
|
20123
|
+
s: {
|
|
20124
|
+
'pl': 2,
|
|
20125
|
+
'pr': hasRemoveButton ? 1 : 2,
|
|
20126
|
+
'py': 0.5,
|
|
20127
|
+
'fontSize': theme.fontSizes.xxs,
|
|
20128
|
+
'fontWeight': theme.fontWeights.medium,
|
|
20129
|
+
'lineHeight': theme.lineHeights[2],
|
|
20130
|
+
'columnGap': 0.5,
|
|
20131
|
+
'& svg': {
|
|
20132
|
+
width: 12,
|
|
20133
|
+
height: 12,
|
|
20134
|
+
color: theme.colors['icon/primary']
|
|
20135
|
+
},
|
|
20136
|
+
'& button': {
|
|
20137
|
+
p: 0.5
|
|
19727
20138
|
}
|
|
19728
20139
|
}
|
|
19729
|
-
if (timerId === undefined) {
|
|
19730
|
-
timerId = setTimeout(timerExpired, wait);
|
|
19731
|
-
}
|
|
19732
|
-
return result;
|
|
19733
20140
|
}
|
|
19734
|
-
|
|
19735
|
-
|
|
19736
|
-
|
|
19737
|
-
}
|
|
20141
|
+
})}
|
|
20142
|
+
${({
|
|
20143
|
+
theme
|
|
20144
|
+
}) => variant({
|
|
20145
|
+
prop: 'variant',
|
|
20146
|
+
variants: {
|
|
20147
|
+
secondary: {
|
|
20148
|
+
'color': theme.colors['text/primary'],
|
|
20149
|
+
'backgroundColor': theme.colors['bg/secondary'],
|
|
20150
|
+
'& button': {
|
|
20151
|
+
'&:hover': {
|
|
20152
|
+
backgroundColor: theme.colors['bg/secondary/hovered']
|
|
20153
|
+
}
|
|
20154
|
+
}
|
|
20155
|
+
}
|
|
20156
|
+
}
|
|
20157
|
+
})}
|
|
20158
|
+
${sx}
|
|
20159
|
+
`;
|
|
20160
|
+
var index$2 = /*#__PURE__*/React.forwardRef(Pill);
|
|
20161
|
+
|
|
20162
|
+
const Space = styled__default.default.div`
|
|
20163
|
+
width: inherit;
|
|
20164
|
+
${space$1};
|
|
20165
|
+
${sx}
|
|
20166
|
+
`;
|
|
20167
|
+
|
|
20168
|
+
const Stack = /*#__PURE__*/React.forwardRef(({
|
|
20169
|
+
gapX = 0,
|
|
20170
|
+
gapY = 0,
|
|
20171
|
+
children,
|
|
20172
|
+
alignItems = 'center',
|
|
20173
|
+
...props
|
|
20174
|
+
}, ref) => /*#__PURE__*/jsxRuntimeExports.jsx(BaseStack, {
|
|
20175
|
+
ref: ref,
|
|
20176
|
+
alignItems: alignItems,
|
|
20177
|
+
gapX: gapX,
|
|
20178
|
+
gapY: gapY,
|
|
20179
|
+
...props,
|
|
20180
|
+
children: children
|
|
20181
|
+
}));
|
|
20182
|
+
const BaseStack = styled__default.default(View)({
|
|
20183
|
+
display: 'flex',
|
|
20184
|
+
flexDirection: 'row',
|
|
20185
|
+
flexWrap: 'wrap'
|
|
20186
|
+
}, variant({
|
|
20187
|
+
prop: 'gapX',
|
|
20188
|
+
variants: Object.fromEntries(Object.entries(space).map(([key, value]) => {
|
|
20189
|
+
const styleValue = {
|
|
20190
|
+
'& > *': {
|
|
20191
|
+
px: forcePixelValue(value / 2)
|
|
20192
|
+
},
|
|
20193
|
+
'mx': forcePixelValue(-value / 2)
|
|
20194
|
+
};
|
|
20195
|
+
return [key, styleValue];
|
|
20196
|
+
}))
|
|
20197
|
+
}), variant({
|
|
20198
|
+
prop: 'gapY',
|
|
20199
|
+
variants: Object.fromEntries(Object.entries(space).map(([key, value]) => {
|
|
20200
|
+
const styleValue = {
|
|
20201
|
+
'& > *': {
|
|
20202
|
+
mt: forcePixelValue(value)
|
|
20203
|
+
},
|
|
20204
|
+
'mt': forcePixelValue(-value)
|
|
20205
|
+
};
|
|
20206
|
+
return [key, styleValue];
|
|
20207
|
+
}))
|
|
20208
|
+
}));
|
|
20209
|
+
const Item = ({
|
|
20210
|
+
children,
|
|
20211
|
+
...props
|
|
20212
|
+
}) => /*#__PURE__*/jsxRuntimeExports.jsx(View, {
|
|
20213
|
+
...props,
|
|
20214
|
+
children: children
|
|
20215
|
+
});
|
|
20216
|
+
var Stack$1 = Object.assign(Stack, {
|
|
20217
|
+
Item
|
|
20218
|
+
});
|
|
20219
|
+
|
|
20220
|
+
const StyledIcon = ({
|
|
20221
|
+
icon: Icon,
|
|
20222
|
+
sx,
|
|
20223
|
+
...props
|
|
20224
|
+
}) => /*#__PURE__*/jsxRuntimeExports.jsx(View, {
|
|
20225
|
+
...props,
|
|
20226
|
+
color: props.color,
|
|
20227
|
+
sx: {
|
|
20228
|
+
'& svg': {
|
|
20229
|
+
display: 'inline-flex',
|
|
20230
|
+
width: '100%',
|
|
20231
|
+
height: '100%'
|
|
20232
|
+
},
|
|
20233
|
+
...sx
|
|
20234
|
+
},
|
|
20235
|
+
children: /*#__PURE__*/jsxRuntimeExports.jsx(Icon, {})
|
|
20236
|
+
});
|
|
19738
20237
|
|
|
19739
20238
|
/**
|
|
19740
|
-
*
|
|
19741
|
-
*
|
|
19742
|
-
*
|
|
19743
|
-
*
|
|
19744
|
-
*
|
|
19745
|
-
*
|
|
19746
|
-
|
|
19747
|
-
|
|
20239
|
+
* lodash (Custom Build) <https://lodash.com/>
|
|
20240
|
+
* Build: `lodash modularize exports="npm" -o ./`
|
|
20241
|
+
* Copyright jQuery Foundation and other contributors <https://jquery.org/>
|
|
20242
|
+
* Released under MIT license <https://lodash.com/license>
|
|
20243
|
+
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
20244
|
+
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
20245
|
+
*/
|
|
20246
|
+
|
|
20247
|
+
/** Used as the `TypeError` message for "Functions" methods. */
|
|
20248
|
+
var FUNC_ERROR_TEXT$1 = 'Expected a function';
|
|
20249
|
+
|
|
20250
|
+
/** Used as references for various `Number` constants. */
|
|
20251
|
+
var NAN$1 = 0 / 0;
|
|
20252
|
+
|
|
20253
|
+
/** `Object#toString` result references. */
|
|
20254
|
+
var symbolTag$1 = '[object Symbol]';
|
|
20255
|
+
|
|
20256
|
+
/** Used to match leading and trailing whitespace. */
|
|
20257
|
+
var reTrim$1 = /^\s+|\s+$/g;
|
|
20258
|
+
|
|
20259
|
+
/** Used to detect bad signed hexadecimal string values. */
|
|
20260
|
+
var reIsBadHex$1 = /^[-+]0x[0-9a-f]+$/i;
|
|
20261
|
+
|
|
20262
|
+
/** Used to detect binary string values. */
|
|
20263
|
+
var reIsBinary$1 = /^0b[01]+$/i;
|
|
20264
|
+
|
|
20265
|
+
/** Used to detect octal string values. */
|
|
20266
|
+
var reIsOctal$1 = /^0o[0-7]+$/i;
|
|
20267
|
+
|
|
20268
|
+
/** Built-in method references without a dependency on `root`. */
|
|
20269
|
+
var freeParseInt$1 = parseInt;
|
|
20270
|
+
|
|
20271
|
+
/** Detect free variable `global` from Node.js. */
|
|
20272
|
+
var freeGlobal$1 = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
|
|
20273
|
+
|
|
20274
|
+
/** Detect free variable `self`. */
|
|
20275
|
+
var freeSelf$1 = typeof self == 'object' && self && self.Object === Object && self;
|
|
20276
|
+
|
|
20277
|
+
/** Used as a reference to the global object. */
|
|
20278
|
+
var root$1 = freeGlobal$1 || freeSelf$1 || Function('return this')();
|
|
20279
|
+
|
|
20280
|
+
/** Used for built-in method references. */
|
|
20281
|
+
var objectProto$1 = Object.prototype;
|
|
20282
|
+
|
|
20283
|
+
/**
|
|
20284
|
+
* Used to resolve the
|
|
20285
|
+
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
20286
|
+
* of values.
|
|
20287
|
+
*/
|
|
20288
|
+
var objectToString$1 = objectProto$1.toString;
|
|
20289
|
+
|
|
20290
|
+
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
20291
|
+
var nativeMax$1 = Math.max,
|
|
20292
|
+
nativeMin$1 = Math.min;
|
|
20293
|
+
|
|
20294
|
+
/**
|
|
20295
|
+
* Gets the timestamp of the number of milliseconds that have elapsed since
|
|
20296
|
+
* the Unix epoch (1 January 1970 00:00:00 UTC).
|
|
20297
|
+
*
|
|
20298
|
+
* @static
|
|
20299
|
+
* @memberOf _
|
|
20300
|
+
* @since 2.4.0
|
|
20301
|
+
* @category Date
|
|
20302
|
+
* @returns {number} Returns the timestamp.
|
|
20303
|
+
* @example
|
|
20304
|
+
*
|
|
20305
|
+
* _.defer(function(stamp) {
|
|
20306
|
+
* console.log(_.now() - stamp);
|
|
20307
|
+
* }, _.now());
|
|
20308
|
+
* // => Logs the number of milliseconds it took for the deferred invocation.
|
|
20309
|
+
*/
|
|
20310
|
+
var now$1 = function () {
|
|
20311
|
+
return root$1.Date.now();
|
|
20312
|
+
};
|
|
20313
|
+
|
|
20314
|
+
/**
|
|
20315
|
+
* Creates a debounced function that delays invoking `func` until after `wait`
|
|
20316
|
+
* milliseconds have elapsed since the last time the debounced function was
|
|
20317
|
+
* invoked. The debounced function comes with a `cancel` method to cancel
|
|
20318
|
+
* delayed `func` invocations and a `flush` method to immediately invoke them.
|
|
20319
|
+
* Provide `options` to indicate whether `func` should be invoked on the
|
|
20320
|
+
* leading and/or trailing edge of the `wait` timeout. The `func` is invoked
|
|
20321
|
+
* with the last arguments provided to the debounced function. Subsequent
|
|
20322
|
+
* calls to the debounced function return the result of the last `func`
|
|
20323
|
+
* invocation.
|
|
19748
20324
|
*
|
|
19749
20325
|
* **Note:** If `leading` and `trailing` options are `true`, `func` is
|
|
19750
|
-
* invoked on the trailing edge of the timeout only if the
|
|
20326
|
+
* invoked on the trailing edge of the timeout only if the debounced function
|
|
19751
20327
|
* is invoked more than once during the `wait` timeout.
|
|
19752
20328
|
*
|
|
19753
20329
|
* If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
|
|
19754
20330
|
* until to the next tick, similar to `setTimeout` with a timeout of `0`.
|
|
19755
20331
|
*
|
|
19756
20332
|
* See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
|
|
19757
|
-
* for details over the differences between `_.
|
|
20333
|
+
* for details over the differences between `_.debounce` and `_.throttle`.
|
|
19758
20334
|
*
|
|
19759
20335
|
* @static
|
|
19760
20336
|
* @memberOf _
|
|
19761
20337
|
* @since 0.1.0
|
|
19762
20338
|
* @category Function
|
|
19763
|
-
* @param {Function} func The function to
|
|
19764
|
-
* @param {number} [wait=0] The number of milliseconds to
|
|
20339
|
+
* @param {Function} func The function to debounce.
|
|
20340
|
+
* @param {number} [wait=0] The number of milliseconds to delay.
|
|
19765
20341
|
* @param {Object} [options={}] The options object.
|
|
19766
|
-
* @param {boolean} [options.leading=
|
|
20342
|
+
* @param {boolean} [options.leading=false]
|
|
19767
20343
|
* Specify invoking on the leading edge of the timeout.
|
|
20344
|
+
* @param {number} [options.maxWait]
|
|
20345
|
+
* The maximum time `func` is allowed to be delayed before it's invoked.
|
|
19768
20346
|
* @param {boolean} [options.trailing=true]
|
|
19769
20347
|
* Specify invoking on the trailing edge of the timeout.
|
|
19770
|
-
* @returns {Function} Returns the new
|
|
20348
|
+
* @returns {Function} Returns the new debounced function.
|
|
19771
20349
|
* @example
|
|
19772
20350
|
*
|
|
19773
|
-
* // Avoid
|
|
19774
|
-
* jQuery(window).on('
|
|
20351
|
+
* // Avoid costly calculations while the window size is in flux.
|
|
20352
|
+
* jQuery(window).on('resize', _.debounce(calculateLayout, 150));
|
|
19775
20353
|
*
|
|
19776
|
-
* // Invoke `
|
|
19777
|
-
*
|
|
19778
|
-
*
|
|
20354
|
+
* // Invoke `sendMail` when clicked, debouncing subsequent calls.
|
|
20355
|
+
* jQuery(element).on('click', _.debounce(sendMail, 300, {
|
|
20356
|
+
* 'leading': true,
|
|
20357
|
+
* 'trailing': false
|
|
20358
|
+
* }));
|
|
19779
20359
|
*
|
|
19780
|
-
* //
|
|
19781
|
-
*
|
|
20360
|
+
* // Ensure `batchLog` is invoked once after 1 second of debounced calls.
|
|
20361
|
+
* var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
|
|
20362
|
+
* var source = new EventSource('/stream');
|
|
20363
|
+
* jQuery(source).on('message', debounced);
|
|
20364
|
+
*
|
|
20365
|
+
* // Cancel the trailing debounced invocation.
|
|
20366
|
+
* jQuery(window).on('popstate', debounced.cancel);
|
|
19782
20367
|
*/
|
|
19783
|
-
function
|
|
19784
|
-
var
|
|
20368
|
+
function debounce$2(func, wait, options) {
|
|
20369
|
+
var lastArgs,
|
|
20370
|
+
lastThis,
|
|
20371
|
+
maxWait,
|
|
20372
|
+
result,
|
|
20373
|
+
timerId,
|
|
20374
|
+
lastCallTime,
|
|
20375
|
+
lastInvokeTime = 0,
|
|
20376
|
+
leading = false,
|
|
20377
|
+
maxing = false,
|
|
19785
20378
|
trailing = true;
|
|
19786
20379
|
if (typeof func != 'function') {
|
|
19787
20380
|
throw new TypeError(FUNC_ERROR_TEXT$1);
|
|
19788
20381
|
}
|
|
20382
|
+
wait = toNumber$1(wait) || 0;
|
|
19789
20383
|
if (isObject$1(options)) {
|
|
19790
|
-
leading =
|
|
20384
|
+
leading = !!options.leading;
|
|
20385
|
+
maxing = 'maxWait' in options;
|
|
20386
|
+
maxWait = maxing ? nativeMax$1(toNumber$1(options.maxWait) || 0, wait) : maxWait;
|
|
19791
20387
|
trailing = 'trailing' in options ? !!options.trailing : trailing;
|
|
19792
20388
|
}
|
|
19793
|
-
|
|
19794
|
-
|
|
19795
|
-
|
|
19796
|
-
|
|
19797
|
-
|
|
19798
|
-
|
|
19799
|
-
|
|
19800
|
-
|
|
19801
|
-
|
|
19802
|
-
|
|
19803
|
-
|
|
19804
|
-
|
|
19805
|
-
|
|
19806
|
-
|
|
19807
|
-
|
|
19808
|
-
|
|
19809
|
-
|
|
19810
|
-
|
|
19811
|
-
|
|
19812
|
-
|
|
20389
|
+
function invokeFunc(time) {
|
|
20390
|
+
var args = lastArgs,
|
|
20391
|
+
thisArg = lastThis;
|
|
20392
|
+
lastArgs = lastThis = undefined;
|
|
20393
|
+
lastInvokeTime = time;
|
|
20394
|
+
result = func.apply(thisArg, args);
|
|
20395
|
+
return result;
|
|
20396
|
+
}
|
|
20397
|
+
function leadingEdge(time) {
|
|
20398
|
+
// Reset any `maxWait` timer.
|
|
20399
|
+
lastInvokeTime = time;
|
|
20400
|
+
// Start the timer for the trailing edge.
|
|
20401
|
+
timerId = setTimeout(timerExpired, wait);
|
|
20402
|
+
// Invoke the leading edge.
|
|
20403
|
+
return leading ? invokeFunc(time) : result;
|
|
20404
|
+
}
|
|
20405
|
+
function remainingWait(time) {
|
|
20406
|
+
var timeSinceLastCall = time - lastCallTime,
|
|
20407
|
+
timeSinceLastInvoke = time - lastInvokeTime,
|
|
20408
|
+
result = wait - timeSinceLastCall;
|
|
20409
|
+
return maxing ? nativeMin$1(result, maxWait - timeSinceLastInvoke) : result;
|
|
20410
|
+
}
|
|
20411
|
+
function shouldInvoke(time) {
|
|
20412
|
+
var timeSinceLastCall = time - lastCallTime,
|
|
20413
|
+
timeSinceLastInvoke = time - lastInvokeTime;
|
|
20414
|
+
|
|
20415
|
+
// Either this is the first call, activity has stopped and we're at the
|
|
20416
|
+
// trailing edge, the system time has gone backwards and we're treating
|
|
20417
|
+
// it as the trailing edge, or we've hit the `maxWait` limit.
|
|
20418
|
+
return lastCallTime === undefined || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;
|
|
20419
|
+
}
|
|
20420
|
+
function timerExpired() {
|
|
20421
|
+
var time = now$1();
|
|
20422
|
+
if (shouldInvoke(time)) {
|
|
20423
|
+
return trailingEdge(time);
|
|
20424
|
+
}
|
|
20425
|
+
// Restart the timer.
|
|
20426
|
+
timerId = setTimeout(timerExpired, remainingWait(time));
|
|
20427
|
+
}
|
|
20428
|
+
function trailingEdge(time) {
|
|
20429
|
+
timerId = undefined;
|
|
20430
|
+
|
|
20431
|
+
// Only invoke if we have `lastArgs` which means `func` has been
|
|
20432
|
+
// debounced at least once.
|
|
20433
|
+
if (trailing && lastArgs) {
|
|
20434
|
+
return invokeFunc(time);
|
|
20435
|
+
}
|
|
20436
|
+
lastArgs = lastThis = undefined;
|
|
20437
|
+
return result;
|
|
20438
|
+
}
|
|
20439
|
+
function cancel() {
|
|
20440
|
+
if (timerId !== undefined) {
|
|
20441
|
+
clearTimeout(timerId);
|
|
20442
|
+
}
|
|
20443
|
+
lastInvokeTime = 0;
|
|
20444
|
+
lastArgs = lastCallTime = lastThis = timerId = undefined;
|
|
20445
|
+
}
|
|
20446
|
+
function flush() {
|
|
20447
|
+
return timerId === undefined ? result : trailingEdge(now$1());
|
|
20448
|
+
}
|
|
20449
|
+
function debounced() {
|
|
20450
|
+
var time = now$1(),
|
|
20451
|
+
isInvoking = shouldInvoke(time);
|
|
20452
|
+
lastArgs = arguments;
|
|
20453
|
+
lastThis = this;
|
|
20454
|
+
lastCallTime = time;
|
|
20455
|
+
if (isInvoking) {
|
|
20456
|
+
if (timerId === undefined) {
|
|
20457
|
+
return leadingEdge(lastCallTime);
|
|
20458
|
+
}
|
|
20459
|
+
if (maxing) {
|
|
20460
|
+
// Handle invocations in a tight loop.
|
|
20461
|
+
timerId = setTimeout(timerExpired, wait);
|
|
20462
|
+
return invokeFunc(lastCallTime);
|
|
20463
|
+
}
|
|
20464
|
+
}
|
|
20465
|
+
if (timerId === undefined) {
|
|
20466
|
+
timerId = setTimeout(timerExpired, wait);
|
|
20467
|
+
}
|
|
20468
|
+
return result;
|
|
20469
|
+
}
|
|
20470
|
+
debounced.cancel = cancel;
|
|
20471
|
+
debounced.flush = flush;
|
|
20472
|
+
return debounced;
|
|
20473
|
+
}
|
|
20474
|
+
|
|
20475
|
+
/**
|
|
20476
|
+
* Creates a throttled function that only invokes `func` at most once per
|
|
20477
|
+
* every `wait` milliseconds. The throttled function comes with a `cancel`
|
|
20478
|
+
* method to cancel delayed `func` invocations and a `flush` method to
|
|
20479
|
+
* immediately invoke them. Provide `options` to indicate whether `func`
|
|
20480
|
+
* should be invoked on the leading and/or trailing edge of the `wait`
|
|
20481
|
+
* timeout. The `func` is invoked with the last arguments provided to the
|
|
20482
|
+
* throttled function. Subsequent calls to the throttled function return the
|
|
20483
|
+
* result of the last `func` invocation.
|
|
20484
|
+
*
|
|
20485
|
+
* **Note:** If `leading` and `trailing` options are `true`, `func` is
|
|
20486
|
+
* invoked on the trailing edge of the timeout only if the throttled function
|
|
20487
|
+
* is invoked more than once during the `wait` timeout.
|
|
20488
|
+
*
|
|
20489
|
+
* If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
|
|
20490
|
+
* until to the next tick, similar to `setTimeout` with a timeout of `0`.
|
|
20491
|
+
*
|
|
20492
|
+
* See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
|
|
20493
|
+
* for details over the differences between `_.throttle` and `_.debounce`.
|
|
20494
|
+
*
|
|
20495
|
+
* @static
|
|
20496
|
+
* @memberOf _
|
|
20497
|
+
* @since 0.1.0
|
|
20498
|
+
* @category Function
|
|
20499
|
+
* @param {Function} func The function to throttle.
|
|
20500
|
+
* @param {number} [wait=0] The number of milliseconds to throttle invocations to.
|
|
20501
|
+
* @param {Object} [options={}] The options object.
|
|
20502
|
+
* @param {boolean} [options.leading=true]
|
|
20503
|
+
* Specify invoking on the leading edge of the timeout.
|
|
20504
|
+
* @param {boolean} [options.trailing=true]
|
|
20505
|
+
* Specify invoking on the trailing edge of the timeout.
|
|
20506
|
+
* @returns {Function} Returns the new throttled function.
|
|
20507
|
+
* @example
|
|
20508
|
+
*
|
|
20509
|
+
* // Avoid excessively updating the position while scrolling.
|
|
20510
|
+
* jQuery(window).on('scroll', _.throttle(updatePosition, 100));
|
|
20511
|
+
*
|
|
20512
|
+
* // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
|
|
20513
|
+
* var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
|
|
20514
|
+
* jQuery(element).on('click', throttled);
|
|
20515
|
+
*
|
|
20516
|
+
* // Cancel the trailing throttled invocation.
|
|
20517
|
+
* jQuery(window).on('popstate', throttled.cancel);
|
|
20518
|
+
*/
|
|
20519
|
+
function throttle(func, wait, options) {
|
|
20520
|
+
var leading = true,
|
|
20521
|
+
trailing = true;
|
|
20522
|
+
if (typeof func != 'function') {
|
|
20523
|
+
throw new TypeError(FUNC_ERROR_TEXT$1);
|
|
20524
|
+
}
|
|
20525
|
+
if (isObject$1(options)) {
|
|
20526
|
+
leading = 'leading' in options ? !!options.leading : leading;
|
|
20527
|
+
trailing = 'trailing' in options ? !!options.trailing : trailing;
|
|
20528
|
+
}
|
|
20529
|
+
return debounce$2(func, wait, {
|
|
20530
|
+
'leading': leading,
|
|
20531
|
+
'maxWait': wait,
|
|
20532
|
+
'trailing': trailing
|
|
20533
|
+
});
|
|
20534
|
+
}
|
|
20535
|
+
|
|
20536
|
+
/**
|
|
20537
|
+
* Checks if `value` is the
|
|
20538
|
+
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
|
20539
|
+
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
|
20540
|
+
*
|
|
20541
|
+
* @static
|
|
20542
|
+
* @memberOf _
|
|
20543
|
+
* @since 0.1.0
|
|
20544
|
+
* @category Lang
|
|
20545
|
+
* @param {*} value The value to check.
|
|
20546
|
+
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
|
20547
|
+
* @example
|
|
20548
|
+
*
|
|
19813
20549
|
* _.isObject({});
|
|
19814
20550
|
* // => true
|
|
19815
20551
|
*
|
|
@@ -20085,1085 +20821,744 @@ function debounce(func, wait, options) {
|
|
|
20085
20821
|
// Start the timer for the trailing edge.
|
|
20086
20822
|
timerId = setTimeout(timerExpired, wait);
|
|
20087
20823
|
// Invoke the leading edge.
|
|
20088
|
-
return leading ? invokeFunc(time) : result;
|
|
20089
|
-
}
|
|
20090
|
-
function remainingWait(time) {
|
|
20091
|
-
var timeSinceLastCall = time - lastCallTime,
|
|
20092
|
-
timeSinceLastInvoke = time - lastInvokeTime,
|
|
20093
|
-
result = wait - timeSinceLastCall;
|
|
20094
|
-
return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;
|
|
20095
|
-
}
|
|
20096
|
-
function shouldInvoke(time) {
|
|
20097
|
-
var timeSinceLastCall = time - lastCallTime,
|
|
20098
|
-
timeSinceLastInvoke = time - lastInvokeTime;
|
|
20099
|
-
|
|
20100
|
-
// Either this is the first call, activity has stopped and we're at the
|
|
20101
|
-
// trailing edge, the system time has gone backwards and we're treating
|
|
20102
|
-
// it as the trailing edge, or we've hit the `maxWait` limit.
|
|
20103
|
-
return lastCallTime === undefined || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;
|
|
20104
|
-
}
|
|
20105
|
-
function timerExpired() {
|
|
20106
|
-
var time = now();
|
|
20107
|
-
if (shouldInvoke(time)) {
|
|
20108
|
-
return trailingEdge(time);
|
|
20109
|
-
}
|
|
20110
|
-
// Restart the timer.
|
|
20111
|
-
timerId = setTimeout(timerExpired, remainingWait(time));
|
|
20112
|
-
}
|
|
20113
|
-
function trailingEdge(time) {
|
|
20114
|
-
timerId = undefined;
|
|
20115
|
-
|
|
20116
|
-
// Only invoke if we have `lastArgs` which means `func` has been
|
|
20117
|
-
// debounced at least once.
|
|
20118
|
-
if (trailing && lastArgs) {
|
|
20119
|
-
return invokeFunc(time);
|
|
20120
|
-
}
|
|
20121
|
-
lastArgs = lastThis = undefined;
|
|
20122
|
-
return result;
|
|
20123
|
-
}
|
|
20124
|
-
function cancel() {
|
|
20125
|
-
if (timerId !== undefined) {
|
|
20126
|
-
clearTimeout(timerId);
|
|
20127
|
-
}
|
|
20128
|
-
lastInvokeTime = 0;
|
|
20129
|
-
lastArgs = lastCallTime = lastThis = timerId = undefined;
|
|
20130
|
-
}
|
|
20131
|
-
function flush() {
|
|
20132
|
-
return timerId === undefined ? result : trailingEdge(now());
|
|
20133
|
-
}
|
|
20134
|
-
function debounced() {
|
|
20135
|
-
var time = now(),
|
|
20136
|
-
isInvoking = shouldInvoke(time);
|
|
20137
|
-
lastArgs = arguments;
|
|
20138
|
-
lastThis = this;
|
|
20139
|
-
lastCallTime = time;
|
|
20140
|
-
if (isInvoking) {
|
|
20141
|
-
if (timerId === undefined) {
|
|
20142
|
-
return leadingEdge(lastCallTime);
|
|
20143
|
-
}
|
|
20144
|
-
if (maxing) {
|
|
20145
|
-
// Handle invocations in a tight loop.
|
|
20146
|
-
timerId = setTimeout(timerExpired, wait);
|
|
20147
|
-
return invokeFunc(lastCallTime);
|
|
20148
|
-
}
|
|
20149
|
-
}
|
|
20150
|
-
if (timerId === undefined) {
|
|
20151
|
-
timerId = setTimeout(timerExpired, wait);
|
|
20152
|
-
}
|
|
20153
|
-
return result;
|
|
20154
|
-
}
|
|
20155
|
-
debounced.cancel = cancel;
|
|
20156
|
-
debounced.flush = flush;
|
|
20157
|
-
return debounced;
|
|
20158
|
-
}
|
|
20159
|
-
|
|
20160
|
-
/**
|
|
20161
|
-
* Checks if `value` is the
|
|
20162
|
-
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
|
20163
|
-
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
|
20164
|
-
*
|
|
20165
|
-
* @static
|
|
20166
|
-
* @memberOf _
|
|
20167
|
-
* @since 0.1.0
|
|
20168
|
-
* @category Lang
|
|
20169
|
-
* @param {*} value The value to check.
|
|
20170
|
-
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
|
20171
|
-
* @example
|
|
20172
|
-
*
|
|
20173
|
-
* _.isObject({});
|
|
20174
|
-
* // => true
|
|
20175
|
-
*
|
|
20176
|
-
* _.isObject([1, 2, 3]);
|
|
20177
|
-
* // => true
|
|
20178
|
-
*
|
|
20179
|
-
* _.isObject(_.noop);
|
|
20180
|
-
* // => true
|
|
20181
|
-
*
|
|
20182
|
-
* _.isObject(null);
|
|
20183
|
-
* // => false
|
|
20184
|
-
*/
|
|
20185
|
-
function isObject(value) {
|
|
20186
|
-
var type = typeof value;
|
|
20187
|
-
return !!value && (type == 'object' || type == 'function');
|
|
20188
|
-
}
|
|
20189
|
-
|
|
20190
|
-
/**
|
|
20191
|
-
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
20192
|
-
* and has a `typeof` result of "object".
|
|
20193
|
-
*
|
|
20194
|
-
* @static
|
|
20195
|
-
* @memberOf _
|
|
20196
|
-
* @since 4.0.0
|
|
20197
|
-
* @category Lang
|
|
20198
|
-
* @param {*} value The value to check.
|
|
20199
|
-
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
|
20200
|
-
* @example
|
|
20201
|
-
*
|
|
20202
|
-
* _.isObjectLike({});
|
|
20203
|
-
* // => true
|
|
20204
|
-
*
|
|
20205
|
-
* _.isObjectLike([1, 2, 3]);
|
|
20206
|
-
* // => true
|
|
20207
|
-
*
|
|
20208
|
-
* _.isObjectLike(_.noop);
|
|
20209
|
-
* // => false
|
|
20210
|
-
*
|
|
20211
|
-
* _.isObjectLike(null);
|
|
20212
|
-
* // => false
|
|
20213
|
-
*/
|
|
20214
|
-
function isObjectLike(value) {
|
|
20215
|
-
return !!value && typeof value == 'object';
|
|
20216
|
-
}
|
|
20217
|
-
|
|
20218
|
-
/**
|
|
20219
|
-
* Checks if `value` is classified as a `Symbol` primitive or object.
|
|
20220
|
-
*
|
|
20221
|
-
* @static
|
|
20222
|
-
* @memberOf _
|
|
20223
|
-
* @since 4.0.0
|
|
20224
|
-
* @category Lang
|
|
20225
|
-
* @param {*} value The value to check.
|
|
20226
|
-
* @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
|
|
20227
|
-
* @example
|
|
20228
|
-
*
|
|
20229
|
-
* _.isSymbol(Symbol.iterator);
|
|
20230
|
-
* // => true
|
|
20231
|
-
*
|
|
20232
|
-
* _.isSymbol('abc');
|
|
20233
|
-
* // => false
|
|
20234
|
-
*/
|
|
20235
|
-
function isSymbol(value) {
|
|
20236
|
-
return typeof value == 'symbol' || isObjectLike(value) && objectToString.call(value) == symbolTag;
|
|
20237
|
-
}
|
|
20238
|
-
|
|
20239
|
-
/**
|
|
20240
|
-
* Converts `value` to a number.
|
|
20241
|
-
*
|
|
20242
|
-
* @static
|
|
20243
|
-
* @memberOf _
|
|
20244
|
-
* @since 4.0.0
|
|
20245
|
-
* @category Lang
|
|
20246
|
-
* @param {*} value The value to process.
|
|
20247
|
-
* @returns {number} Returns the number.
|
|
20248
|
-
* @example
|
|
20249
|
-
*
|
|
20250
|
-
* _.toNumber(3.2);
|
|
20251
|
-
* // => 3.2
|
|
20252
|
-
*
|
|
20253
|
-
* _.toNumber(Number.MIN_VALUE);
|
|
20254
|
-
* // => 5e-324
|
|
20255
|
-
*
|
|
20256
|
-
* _.toNumber(Infinity);
|
|
20257
|
-
* // => Infinity
|
|
20258
|
-
*
|
|
20259
|
-
* _.toNumber('3.2');
|
|
20260
|
-
* // => 3.2
|
|
20261
|
-
*/
|
|
20262
|
-
function toNumber(value) {
|
|
20263
|
-
if (typeof value == 'number') {
|
|
20264
|
-
return value;
|
|
20265
|
-
}
|
|
20266
|
-
if (isSymbol(value)) {
|
|
20267
|
-
return NAN;
|
|
20268
|
-
}
|
|
20269
|
-
if (isObject(value)) {
|
|
20270
|
-
var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
|
|
20271
|
-
value = isObject(other) ? other + '' : other;
|
|
20272
|
-
}
|
|
20273
|
-
if (typeof value != 'string') {
|
|
20274
|
-
return value === 0 ? value : +value;
|
|
20275
|
-
}
|
|
20276
|
-
value = value.replace(reTrim, '');
|
|
20277
|
-
var isBinary = reIsBinary.test(value);
|
|
20278
|
-
return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
|
|
20279
|
-
}
|
|
20280
|
-
var lodash_debounce = debounce;
|
|
20281
|
-
var debounce$1 = /*@__PURE__*/getDefaultExportFromCjs(lodash_debounce);
|
|
20282
|
-
|
|
20283
|
-
const useResize = resizeCallback => {
|
|
20284
|
-
const handleResize = React.useCallback(() => resizeCallback?.(), []);
|
|
20285
|
-
React.useEffect(() => {
|
|
20286
|
-
handleResize();
|
|
20287
|
-
}, []);
|
|
20288
|
-
React.useEffect(() => {
|
|
20289
|
-
if (window) {
|
|
20290
|
-
const debouncedHandleResize = debounce$1(handleResize, 150);
|
|
20291
|
-
window.addEventListener('resize', debouncedHandleResize);
|
|
20292
|
-
return () => window.removeEventListener('resize', debouncedHandleResize);
|
|
20293
|
-
}
|
|
20294
|
-
}, []);
|
|
20295
|
-
};
|
|
20296
|
-
|
|
20297
|
-
const scrollIntoView = ({
|
|
20298
|
-
childrenRef,
|
|
20299
|
-
scrollContainerRef,
|
|
20300
|
-
options = {
|
|
20301
|
-
behavior: 'smooth',
|
|
20302
|
-
direction: 'vertical',
|
|
20303
|
-
offset: 0
|
|
20304
|
-
}
|
|
20305
|
-
}) => {
|
|
20306
|
-
if (!isNullable(scrollContainerRef)) {
|
|
20307
|
-
const startSide = options.direction === 'vertical' ? 'top' : 'left';
|
|
20308
|
-
const endSide = options.direction === 'vertical' ? 'bottom' : 'right';
|
|
20309
|
-
const scrollSide = options.direction === 'vertical' ? 'scrollTop' : 'scrollLeft';
|
|
20310
|
-
const {
|
|
20311
|
-
[startSide]: childrenStart,
|
|
20312
|
-
[endSide]: childrenEnd
|
|
20313
|
-
} = childrenRef.getBoundingClientRect();
|
|
20314
|
-
const {
|
|
20315
|
-
[startSide]: scrollContainerStart,
|
|
20316
|
-
[endSide]: scrollContainerEnd
|
|
20317
|
-
} = scrollContainerRef.getBoundingClientRect();
|
|
20318
|
-
const isChildrenStartAboveScrollContainer = childrenStart < scrollContainerStart;
|
|
20319
|
-
const isChildrenBottomBelowScrollContainer = childrenEnd > scrollContainerEnd;
|
|
20320
|
-
if (isChildrenStartAboveScrollContainer) {
|
|
20321
|
-
const scrollDistance = childrenStart - scrollContainerStart + scrollContainerRef[scrollSide] - (options.offset || 0);
|
|
20322
|
-
scrollContainerRef.scrollTo({
|
|
20323
|
-
behavior: options.behavior,
|
|
20324
|
-
[startSide]: scrollDistance
|
|
20325
|
-
});
|
|
20326
|
-
} else if (isChildrenBottomBelowScrollContainer) {
|
|
20327
|
-
const scrollDistance = childrenEnd - scrollContainerEnd + scrollContainerRef[scrollSide] + (options.offset || 0);
|
|
20328
|
-
scrollContainerRef.scrollTo({
|
|
20329
|
-
behavior: options.behavior,
|
|
20330
|
-
[startSide]: scrollDistance
|
|
20331
|
-
});
|
|
20332
|
-
}
|
|
20333
|
-
} else {
|
|
20334
|
-
childrenRef.scrollIntoView({
|
|
20335
|
-
behavior: options.behavior
|
|
20336
|
-
});
|
|
20337
|
-
}
|
|
20338
|
-
};
|
|
20339
|
-
|
|
20340
|
-
const TabItem = ({
|
|
20341
|
-
children,
|
|
20342
|
-
leadingIcon: LeadingIcon,
|
|
20343
|
-
selected = false,
|
|
20344
|
-
onClick,
|
|
20345
|
-
size: propSize,
|
|
20346
|
-
variant: propVariant
|
|
20347
|
-
}) => {
|
|
20348
|
-
const ref = React.useRef(null);
|
|
20349
|
-
const {
|
|
20350
|
-
size: contextSize,
|
|
20351
|
-
variant: contextVariant,
|
|
20352
|
-
containerRef
|
|
20353
|
-
} = React.useContext(TabContext);
|
|
20354
|
-
const size = propSize ?? contextSize;
|
|
20355
|
-
const variant = propVariant ?? contextVariant;
|
|
20356
|
-
const handleClick = e => {
|
|
20357
|
-
if (containerRef && containerRef.current && ref.current) {
|
|
20358
|
-
scrollIntoView({
|
|
20359
|
-
scrollContainerRef: containerRef.current,
|
|
20360
|
-
childrenRef: ref.current,
|
|
20361
|
-
options: {
|
|
20362
|
-
behavior: 'smooth',
|
|
20363
|
-
offset: 72
|
|
20364
|
-
}
|
|
20365
|
-
});
|
|
20366
|
-
}
|
|
20367
|
-
onClick?.(e);
|
|
20368
|
-
};
|
|
20369
|
-
return /*#__PURE__*/jsxRuntimeExports.jsx(BaseTabItem, {
|
|
20370
|
-
role: 'tab',
|
|
20371
|
-
ref: ref,
|
|
20372
|
-
variant: variant,
|
|
20373
|
-
size: size,
|
|
20374
|
-
leadingIcon: LeadingIcon,
|
|
20375
|
-
selected: selected,
|
|
20376
|
-
onClick: handleClick,
|
|
20377
|
-
children: /*#__PURE__*/jsxRuntimeExports.jsxs(View, {
|
|
20378
|
-
sx: {
|
|
20379
|
-
display: 'flex',
|
|
20380
|
-
flexDirection: 'row',
|
|
20381
|
-
alignItems: 'center',
|
|
20382
|
-
justifyContent: 'center',
|
|
20383
|
-
columnGap: 1
|
|
20384
|
-
},
|
|
20385
|
-
children: [LeadingIcon ? /*#__PURE__*/jsxRuntimeExports.jsx(LeadingIcon, {}) : null, /*#__PURE__*/jsxRuntimeExports.jsx(View, {
|
|
20386
|
-
children: children
|
|
20387
|
-
})]
|
|
20388
|
-
})
|
|
20389
|
-
});
|
|
20390
|
-
};
|
|
20391
|
-
const BaseTabItem = styled__default.default(UnstyledButton)(({
|
|
20392
|
-
theme
|
|
20393
|
-
}) => ({
|
|
20394
|
-
'width': 'initial',
|
|
20395
|
-
'position': 'relative',
|
|
20396
|
-
'transition': 'background-color 100ms, color 100ms',
|
|
20397
|
-
'whiteSpace': 'nowrap',
|
|
20398
|
-
'& svg': {
|
|
20399
|
-
transition: 'color 100ms'
|
|
20400
|
-
},
|
|
20401
|
-
'&:focus-visible': {
|
|
20402
|
-
outlineColor: theme.colors['border/focused'],
|
|
20403
|
-
outlineStyle: 'solid',
|
|
20404
|
-
outlineWidth: 2,
|
|
20405
|
-
outlineOffset: 2
|
|
20406
|
-
}
|
|
20407
|
-
}), () => variant({
|
|
20408
|
-
prop: 'size',
|
|
20409
|
-
variants: {
|
|
20410
|
-
l: {
|
|
20411
|
-
'px': 4,
|
|
20412
|
-
'py': 2,
|
|
20413
|
-
'fontSize': typography['s'].fontSize,
|
|
20414
|
-
'fontWeight': typography['s'].fontWeight,
|
|
20415
|
-
'lineHeight': typography['s'].lineHeight,
|
|
20416
|
-
'& svg': {
|
|
20417
|
-
width: 20,
|
|
20418
|
-
height: 20
|
|
20419
|
-
}
|
|
20420
|
-
},
|
|
20421
|
-
m: {
|
|
20422
|
-
'px': 4,
|
|
20423
|
-
'py': 2,
|
|
20424
|
-
'fontSize': typography['xs'].fontSize,
|
|
20425
|
-
'fontWeight': typography['xs'].fontWeight,
|
|
20426
|
-
'lineHeight': typography['xs'].lineHeight,
|
|
20427
|
-
'& svg': {
|
|
20428
|
-
width: 20,
|
|
20429
|
-
height: 20
|
|
20430
|
-
}
|
|
20431
|
-
},
|
|
20432
|
-
s: {
|
|
20433
|
-
'px': 3,
|
|
20434
|
-
'py': 2,
|
|
20435
|
-
'fontSize': typography['xxs'].fontSize,
|
|
20436
|
-
'fontWeight': typography['xxs'].fontWeight,
|
|
20437
|
-
'lineHeight': typography['xxs'].lineHeight,
|
|
20438
|
-
'& svg': {
|
|
20439
|
-
width: 16,
|
|
20440
|
-
height: 16
|
|
20441
|
-
}
|
|
20442
|
-
}
|
|
20443
|
-
}
|
|
20444
|
-
}), ({
|
|
20445
|
-
theme,
|
|
20446
|
-
selected
|
|
20447
|
-
}) => variant({
|
|
20448
|
-
prop: 'variant',
|
|
20449
|
-
variants: {
|
|
20450
|
-
plain: {
|
|
20451
|
-
borderRadius: theme.radii.full,
|
|
20452
|
-
...(selected ? {
|
|
20453
|
-
'color': theme.colors['text/neutral'],
|
|
20454
|
-
'backgroundColor': theme.colors['bg/selected/subtle'],
|
|
20455
|
-
'& svg': {
|
|
20456
|
-
color: theme.colors['icon/selected']
|
|
20457
|
-
}
|
|
20458
|
-
} : {
|
|
20459
|
-
'color': theme.colors['text/neutral/subtler'],
|
|
20460
|
-
'backgroundColor': theme.colors['bg/neutral/subtler'],
|
|
20461
|
-
'& svg': {
|
|
20462
|
-
color: theme.colors['icon/neutral']
|
|
20463
|
-
},
|
|
20464
|
-
'&:hover, &:active': {
|
|
20465
|
-
'color': theme.colors['text/neutral/subtle'],
|
|
20466
|
-
'& svg': {
|
|
20467
|
-
color: theme.colors['icon/neutral/bolder']
|
|
20468
|
-
}
|
|
20469
|
-
}
|
|
20470
|
-
})
|
|
20471
|
-
},
|
|
20472
|
-
outlined: {
|
|
20473
|
-
borderRadius: theme.radii.full,
|
|
20474
|
-
...(selected ? {
|
|
20475
|
-
'color': theme.colors['text/inverse'],
|
|
20476
|
-
'backgroundColor': theme.colors['bg/selected'],
|
|
20477
|
-
'& svg': {
|
|
20478
|
-
color: theme.colors['icon/inverse']
|
|
20479
|
-
}
|
|
20480
|
-
} : {
|
|
20481
|
-
'color': theme.colors['text/neutral/subtler'],
|
|
20482
|
-
'backgroundColor': theme.colors['bg/neutral/subtler'],
|
|
20483
|
-
'& svg': {
|
|
20484
|
-
color: theme.colors['icon/neutral']
|
|
20485
|
-
},
|
|
20486
|
-
'&:after': {
|
|
20487
|
-
content: '""',
|
|
20488
|
-
position: 'absolute',
|
|
20489
|
-
top: 0,
|
|
20490
|
-
right: 0,
|
|
20491
|
-
bottom: 0,
|
|
20492
|
-
left: 0,
|
|
20493
|
-
borderWidth: 1,
|
|
20494
|
-
borderStyle: 'solid',
|
|
20495
|
-
borderColor: theme.colors['border/neutral/bolder'],
|
|
20496
|
-
borderRadius: theme.radii.full,
|
|
20497
|
-
boxSizing: 'border-box'
|
|
20498
|
-
},
|
|
20499
|
-
'&:hover': {
|
|
20500
|
-
backgroundColor: theme.colors['bg/neutral/subtler/hovered']
|
|
20501
|
-
},
|
|
20502
|
-
'&:active': {
|
|
20503
|
-
backgroundColor: theme.colors['bg/neutral/subtler/pressed']
|
|
20504
|
-
}
|
|
20505
|
-
})
|
|
20506
|
-
},
|
|
20507
|
-
underline: {
|
|
20508
|
-
borderRadius: theme.radii.xxs,
|
|
20509
|
-
...(selected ? {
|
|
20510
|
-
'color': theme.colors['text/selected'],
|
|
20511
|
-
'backgroundColor': theme.colors['bg/neutral/subtler'],
|
|
20512
|
-
'& svg': {
|
|
20513
|
-
color: theme.colors['icon/selected']
|
|
20514
|
-
},
|
|
20515
|
-
':after': {
|
|
20516
|
-
content: '""',
|
|
20517
|
-
position: 'absolute',
|
|
20518
|
-
top: 0,
|
|
20519
|
-
right: 0,
|
|
20520
|
-
bottom: 0,
|
|
20521
|
-
left: 0,
|
|
20522
|
-
borderBottomWidth: 2,
|
|
20523
|
-
borderBottomStyle: 'solid',
|
|
20524
|
-
borderBottomColor: theme.colors['border/selected'],
|
|
20525
|
-
borderRadius: theme.radii.none,
|
|
20526
|
-
boxSizing: 'border-box'
|
|
20527
|
-
}
|
|
20528
|
-
} : {
|
|
20529
|
-
'color': theme.colors['text/neutral/subtler'],
|
|
20530
|
-
'backgroundColor': theme.colors['bg/neutral/subtler'],
|
|
20531
|
-
'& svg': {
|
|
20532
|
-
color: theme.colors['icon/neutral']
|
|
20533
|
-
},
|
|
20534
|
-
':hover, :active': {
|
|
20535
|
-
'color': theme.colors['text/neutral/subtle'],
|
|
20536
|
-
'& svg': {
|
|
20537
|
-
color: theme.colors['icon/neutral/bolder']
|
|
20538
|
-
}
|
|
20539
|
-
}
|
|
20540
|
-
})
|
|
20824
|
+
return leading ? invokeFunc(time) : result;
|
|
20825
|
+
}
|
|
20826
|
+
function remainingWait(time) {
|
|
20827
|
+
var timeSinceLastCall = time - lastCallTime,
|
|
20828
|
+
timeSinceLastInvoke = time - lastInvokeTime,
|
|
20829
|
+
result = wait - timeSinceLastCall;
|
|
20830
|
+
return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;
|
|
20831
|
+
}
|
|
20832
|
+
function shouldInvoke(time) {
|
|
20833
|
+
var timeSinceLastCall = time - lastCallTime,
|
|
20834
|
+
timeSinceLastInvoke = time - lastInvokeTime;
|
|
20835
|
+
|
|
20836
|
+
// Either this is the first call, activity has stopped and we're at the
|
|
20837
|
+
// trailing edge, the system time has gone backwards and we're treating
|
|
20838
|
+
// it as the trailing edge, or we've hit the `maxWait` limit.
|
|
20839
|
+
return lastCallTime === undefined || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;
|
|
20840
|
+
}
|
|
20841
|
+
function timerExpired() {
|
|
20842
|
+
var time = now();
|
|
20843
|
+
if (shouldInvoke(time)) {
|
|
20844
|
+
return trailingEdge(time);
|
|
20541
20845
|
}
|
|
20846
|
+
// Restart the timer.
|
|
20847
|
+
timerId = setTimeout(timerExpired, remainingWait(time));
|
|
20542
20848
|
}
|
|
20543
|
-
|
|
20849
|
+
function trailingEdge(time) {
|
|
20850
|
+
timerId = undefined;
|
|
20544
20851
|
|
|
20545
|
-
|
|
20546
|
-
|
|
20547
|
-
|
|
20548
|
-
|
|
20549
|
-
gap = 2,
|
|
20550
|
-
children
|
|
20551
|
-
}) => {
|
|
20552
|
-
const rootRef = React.useRef(null);
|
|
20553
|
-
const [isLeftButtonVisible, setIsLeftButtonVisible] = React.useState(rootRef.current ? rootRef.current.scrollLeft > 0 : false);
|
|
20554
|
-
const [isRightButtonVisible, setIsRightButtonVisible] = React.useState(rootRef.current ? rootRef.current.clientWidth + rootRef.current.scrollLeft < rootRef.current.scrollWidth : false);
|
|
20555
|
-
const handleScrollButtonVisibility = () => {
|
|
20556
|
-
if (rootRef.current) {
|
|
20557
|
-
setIsLeftButtonVisible(rootRef.current ? rootRef.current.scrollLeft > 0 : false);
|
|
20558
|
-
setIsRightButtonVisible(rootRef.current ? rootRef.current.clientWidth + Math.ceil(rootRef.current.scrollLeft) < rootRef.current.scrollWidth : false);
|
|
20852
|
+
// Only invoke if we have `lastArgs` which means `func` has been
|
|
20853
|
+
// debounced at least once.
|
|
20854
|
+
if (trailing && lastArgs) {
|
|
20855
|
+
return invokeFunc(time);
|
|
20559
20856
|
}
|
|
20560
|
-
|
|
20561
|
-
|
|
20562
|
-
|
|
20563
|
-
|
|
20564
|
-
if (
|
|
20565
|
-
|
|
20566
|
-
left: rootRef.current.scrollLeft - rootRef.current.clientWidth + buttonWidth + gradientWidth,
|
|
20567
|
-
behavior: 'smooth'
|
|
20568
|
-
});
|
|
20857
|
+
lastArgs = lastThis = undefined;
|
|
20858
|
+
return result;
|
|
20859
|
+
}
|
|
20860
|
+
function cancel() {
|
|
20861
|
+
if (timerId !== undefined) {
|
|
20862
|
+
clearTimeout(timerId);
|
|
20569
20863
|
}
|
|
20570
|
-
|
|
20571
|
-
|
|
20572
|
-
|
|
20573
|
-
|
|
20574
|
-
|
|
20575
|
-
|
|
20576
|
-
|
|
20864
|
+
lastInvokeTime = 0;
|
|
20865
|
+
lastArgs = lastCallTime = lastThis = timerId = undefined;
|
|
20866
|
+
}
|
|
20867
|
+
function flush() {
|
|
20868
|
+
return timerId === undefined ? result : trailingEdge(now());
|
|
20869
|
+
}
|
|
20870
|
+
function debounced() {
|
|
20871
|
+
var time = now(),
|
|
20872
|
+
isInvoking = shouldInvoke(time);
|
|
20873
|
+
lastArgs = arguments;
|
|
20874
|
+
lastThis = this;
|
|
20875
|
+
lastCallTime = time;
|
|
20876
|
+
if (isInvoking) {
|
|
20877
|
+
if (timerId === undefined) {
|
|
20878
|
+
return leadingEdge(lastCallTime);
|
|
20879
|
+
}
|
|
20880
|
+
if (maxing) {
|
|
20881
|
+
// Handle invocations in a tight loop.
|
|
20882
|
+
timerId = setTimeout(timerExpired, wait);
|
|
20883
|
+
return invokeFunc(lastCallTime);
|
|
20884
|
+
}
|
|
20577
20885
|
}
|
|
20578
|
-
|
|
20579
|
-
|
|
20580
|
-
|
|
20581
|
-
|
|
20582
|
-
useResize(handleScrollButtonVisibility);
|
|
20583
|
-
return /*#__PURE__*/jsxRuntimeExports.jsx(TabContext.Provider, {
|
|
20584
|
-
value: {
|
|
20585
|
-
variant,
|
|
20586
|
-
size,
|
|
20587
|
-
containerRef: rootRef
|
|
20588
|
-
},
|
|
20589
|
-
children: /*#__PURE__*/jsxRuntimeExports.jsxs(View, {
|
|
20590
|
-
position: 'relative',
|
|
20591
|
-
children: [/*#__PURE__*/jsxRuntimeExports.jsx(View, {
|
|
20592
|
-
ref: rootRef,
|
|
20593
|
-
role: 'tablist',
|
|
20594
|
-
sx: {
|
|
20595
|
-
'width': 'auto',
|
|
20596
|
-
'display': 'flex',
|
|
20597
|
-
'flexDirection': 'row',
|
|
20598
|
-
'alignItems': 'center',
|
|
20599
|
-
'columnGap': gap,
|
|
20600
|
-
'overflowX': 'auto',
|
|
20601
|
-
'msOverflowStyle': 'none',
|
|
20602
|
-
'::-webkit-scrollbar': {
|
|
20603
|
-
display: 'none'
|
|
20604
|
-
}
|
|
20605
|
-
},
|
|
20606
|
-
onScroll: throttle$1(handleScrollButtonVisibility, 150),
|
|
20607
|
-
children: children
|
|
20608
|
-
}), /*#__PURE__*/jsxRuntimeExports.jsxs(View, {
|
|
20609
|
-
display: ['none', 'initial', 'initial'],
|
|
20610
|
-
children: [isLeftButtonVisible ? /*#__PURE__*/jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, {
|
|
20611
|
-
children: [/*#__PURE__*/jsxRuntimeExports.jsx(View, {
|
|
20612
|
-
sx: {
|
|
20613
|
-
position: 'absolute',
|
|
20614
|
-
top: 0,
|
|
20615
|
-
left: forcePixelValue(buttonWidth),
|
|
20616
|
-
bottom: 0,
|
|
20617
|
-
width: forcePixelValue(gradientWidth),
|
|
20618
|
-
height: '100%',
|
|
20619
|
-
background: `linear-gradient(${gradient['overlay/floating/toright']})`,
|
|
20620
|
-
pointerEvents: 'none'
|
|
20621
|
-
}
|
|
20622
|
-
}), /*#__PURE__*/jsxRuntimeExports.jsx(View, {
|
|
20623
|
-
sx: {
|
|
20624
|
-
position: 'absolute',
|
|
20625
|
-
display: 'flex',
|
|
20626
|
-
alignItems: 'center',
|
|
20627
|
-
top: 0,
|
|
20628
|
-
left: 0,
|
|
20629
|
-
bottom: 0,
|
|
20630
|
-
backgroundColor: elevation.surface
|
|
20631
|
-
},
|
|
20632
|
-
children: /*#__PURE__*/jsxRuntimeExports.jsx(IconButton, {
|
|
20633
|
-
size: 's',
|
|
20634
|
-
variant: 'plain-bold',
|
|
20635
|
-
icon: SvgChevronLeft,
|
|
20636
|
-
onClick: handleLeftButtonClick
|
|
20637
|
-
})
|
|
20638
|
-
})]
|
|
20639
|
-
}) : null, isRightButtonVisible ? /*#__PURE__*/jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, {
|
|
20640
|
-
children: [/*#__PURE__*/jsxRuntimeExports.jsx(View, {
|
|
20641
|
-
sx: {
|
|
20642
|
-
position: 'absolute',
|
|
20643
|
-
top: 0,
|
|
20644
|
-
right: forcePixelValue(buttonWidth),
|
|
20645
|
-
bottom: 0,
|
|
20646
|
-
width: forcePixelValue(gradientWidth),
|
|
20647
|
-
height: '100%',
|
|
20648
|
-
background: `linear-gradient(${gradient['overlay/floating/toleft']})`,
|
|
20649
|
-
pointerEvents: 'none'
|
|
20650
|
-
}
|
|
20651
|
-
}), /*#__PURE__*/jsxRuntimeExports.jsx(View, {
|
|
20652
|
-
sx: {
|
|
20653
|
-
position: 'absolute',
|
|
20654
|
-
display: 'flex',
|
|
20655
|
-
alignItems: 'center',
|
|
20656
|
-
top: 0,
|
|
20657
|
-
right: 0,
|
|
20658
|
-
bottom: 0,
|
|
20659
|
-
backgroundColor: elevation.surface
|
|
20660
|
-
},
|
|
20661
|
-
children: /*#__PURE__*/jsxRuntimeExports.jsx(IconButton, {
|
|
20662
|
-
size: 's',
|
|
20663
|
-
variant: 'plain-bold',
|
|
20664
|
-
icon: SvgChevronRight,
|
|
20665
|
-
onClick: handleRightButtonClick
|
|
20666
|
-
})
|
|
20667
|
-
})]
|
|
20668
|
-
}) : null]
|
|
20669
|
-
})]
|
|
20670
|
-
})
|
|
20671
|
-
});
|
|
20672
|
-
};
|
|
20673
|
-
var index$1 = Object.assign(Tab, {
|
|
20674
|
-
Item: TabItem
|
|
20675
|
-
});
|
|
20676
|
-
|
|
20677
|
-
const Textarea = /*#__PURE__*/React.forwardRef(({
|
|
20678
|
-
disabled,
|
|
20679
|
-
...props
|
|
20680
|
-
}, ref) => {
|
|
20681
|
-
const inputRef = useProvidedOrCreatedRef(ref);
|
|
20682
|
-
const focusInput = () => {
|
|
20683
|
-
inputRef.current?.focus();
|
|
20684
|
-
};
|
|
20685
|
-
return /*#__PURE__*/jsxRuntimeExports.jsx(TextareaWrapper, {
|
|
20686
|
-
disabled: disabled,
|
|
20687
|
-
onClick: focusInput,
|
|
20688
|
-
children: /*#__PURE__*/jsxRuntimeExports.jsx(BaseTextarea, {
|
|
20689
|
-
ref: e => {
|
|
20690
|
-
isFunction(ref) ? ref(e) : null;
|
|
20691
|
-
inputRef.current = e;
|
|
20692
|
-
},
|
|
20693
|
-
disabled: disabled,
|
|
20694
|
-
...props
|
|
20695
|
-
})
|
|
20696
|
-
});
|
|
20697
|
-
});
|
|
20698
|
-
const TextareaWrapper = styled__default.default.div`
|
|
20699
|
-
position: relative;
|
|
20700
|
-
width: ${forcePixelValue('100%')};
|
|
20701
|
-
border-width: ${forcePixelValue(1)};
|
|
20702
|
-
border-style: solid;
|
|
20703
|
-
border-radius: ${({
|
|
20704
|
-
theme
|
|
20705
|
-
}) => forcePixelValue(theme.radii.s)};
|
|
20706
|
-
border-color: ${({
|
|
20707
|
-
theme
|
|
20708
|
-
}) => theme.colors['border/input']};
|
|
20709
|
-
background-color: ${({
|
|
20710
|
-
theme
|
|
20711
|
-
}) => theme.colors['bg/input']};
|
|
20712
|
-
cursor: text;
|
|
20713
|
-
display: inline-flex;
|
|
20714
|
-
align-items: center;
|
|
20715
|
-
|
|
20716
|
-
padding-top: ${({
|
|
20717
|
-
theme
|
|
20718
|
-
}) => forcePixelValue(theme.space['4'])};
|
|
20719
|
-
padding-right: ${({
|
|
20720
|
-
theme
|
|
20721
|
-
}) => forcePixelValue(theme.space['4'])};
|
|
20722
|
-
padding-bottom: ${({
|
|
20723
|
-
theme
|
|
20724
|
-
}) => forcePixelValue(theme.space['4'])};
|
|
20725
|
-
padding-left: ${({
|
|
20726
|
-
theme
|
|
20727
|
-
}) => forcePixelValue(theme.space['5'])};
|
|
20728
|
-
|
|
20729
|
-
font-size: ${({
|
|
20730
|
-
theme
|
|
20731
|
-
}) => forcePixelValue(theme.fontSizes.xs)};
|
|
20732
|
-
font-weight: ${({
|
|
20733
|
-
theme
|
|
20734
|
-
}) => theme.fontWeights.medium};
|
|
20735
|
-
line-height: ${({
|
|
20736
|
-
theme
|
|
20737
|
-
}) => theme.lineHeights[2]};
|
|
20738
|
-
color: ${({
|
|
20739
|
-
theme
|
|
20740
|
-
}) => theme.colors['text/neutral']};
|
|
20741
|
-
input::placeholder {
|
|
20742
|
-
color: ${({
|
|
20743
|
-
theme
|
|
20744
|
-
}) => theme.colors['text/neutral/subtlest']};
|
|
20886
|
+
if (timerId === undefined) {
|
|
20887
|
+
timerId = setTimeout(timerExpired, wait);
|
|
20888
|
+
}
|
|
20889
|
+
return result;
|
|
20745
20890
|
}
|
|
20891
|
+
debounced.cancel = cancel;
|
|
20892
|
+
debounced.flush = flush;
|
|
20893
|
+
return debounced;
|
|
20894
|
+
}
|
|
20746
20895
|
|
|
20747
|
-
|
|
20896
|
+
/**
|
|
20897
|
+
* Checks if `value` is the
|
|
20898
|
+
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
|
20899
|
+
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
|
20900
|
+
*
|
|
20901
|
+
* @static
|
|
20902
|
+
* @memberOf _
|
|
20903
|
+
* @since 0.1.0
|
|
20904
|
+
* @category Lang
|
|
20905
|
+
* @param {*} value The value to check.
|
|
20906
|
+
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
|
20907
|
+
* @example
|
|
20908
|
+
*
|
|
20909
|
+
* _.isObject({});
|
|
20910
|
+
* // => true
|
|
20911
|
+
*
|
|
20912
|
+
* _.isObject([1, 2, 3]);
|
|
20913
|
+
* // => true
|
|
20914
|
+
*
|
|
20915
|
+
* _.isObject(_.noop);
|
|
20916
|
+
* // => true
|
|
20917
|
+
*
|
|
20918
|
+
* _.isObject(null);
|
|
20919
|
+
* // => false
|
|
20920
|
+
*/
|
|
20921
|
+
function isObject(value) {
|
|
20922
|
+
var type = typeof value;
|
|
20923
|
+
return !!value && (type == 'object' || type == 'function');
|
|
20924
|
+
}
|
|
20748
20925
|
|
|
20749
|
-
|
|
20750
|
-
|
|
20751
|
-
|
|
20752
|
-
|
|
20753
|
-
|
|
20754
|
-
|
|
20755
|
-
|
|
20926
|
+
/**
|
|
20927
|
+
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
20928
|
+
* and has a `typeof` result of "object".
|
|
20929
|
+
*
|
|
20930
|
+
* @static
|
|
20931
|
+
* @memberOf _
|
|
20932
|
+
* @since 4.0.0
|
|
20933
|
+
* @category Lang
|
|
20934
|
+
* @param {*} value The value to check.
|
|
20935
|
+
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
|
20936
|
+
* @example
|
|
20937
|
+
*
|
|
20938
|
+
* _.isObjectLike({});
|
|
20939
|
+
* // => true
|
|
20940
|
+
*
|
|
20941
|
+
* _.isObjectLike([1, 2, 3]);
|
|
20942
|
+
* // => true
|
|
20943
|
+
*
|
|
20944
|
+
* _.isObjectLike(_.noop);
|
|
20945
|
+
* // => false
|
|
20946
|
+
*
|
|
20947
|
+
* _.isObjectLike(null);
|
|
20948
|
+
* // => false
|
|
20949
|
+
*/
|
|
20950
|
+
function isObjectLike(value) {
|
|
20951
|
+
return !!value && typeof value == 'object';
|
|
20952
|
+
}
|
|
20756
20953
|
|
|
20757
|
-
|
|
20758
|
-
|
|
20759
|
-
|
|
20760
|
-
|
|
20761
|
-
|
|
20954
|
+
/**
|
|
20955
|
+
* Checks if `value` is classified as a `Symbol` primitive or object.
|
|
20956
|
+
*
|
|
20957
|
+
* @static
|
|
20958
|
+
* @memberOf _
|
|
20959
|
+
* @since 4.0.0
|
|
20960
|
+
* @category Lang
|
|
20961
|
+
* @param {*} value The value to check.
|
|
20962
|
+
* @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
|
|
20963
|
+
* @example
|
|
20964
|
+
*
|
|
20965
|
+
* _.isSymbol(Symbol.iterator);
|
|
20966
|
+
* // => true
|
|
20967
|
+
*
|
|
20968
|
+
* _.isSymbol('abc');
|
|
20969
|
+
* // => false
|
|
20970
|
+
*/
|
|
20971
|
+
function isSymbol(value) {
|
|
20972
|
+
return typeof value == 'symbol' || isObjectLike(value) && objectToString.call(value) == symbolTag;
|
|
20973
|
+
}
|
|
20974
|
+
|
|
20975
|
+
/**
|
|
20976
|
+
* Converts `value` to a number.
|
|
20977
|
+
*
|
|
20978
|
+
* @static
|
|
20979
|
+
* @memberOf _
|
|
20980
|
+
* @since 4.0.0
|
|
20981
|
+
* @category Lang
|
|
20982
|
+
* @param {*} value The value to process.
|
|
20983
|
+
* @returns {number} Returns the number.
|
|
20984
|
+
* @example
|
|
20985
|
+
*
|
|
20986
|
+
* _.toNumber(3.2);
|
|
20987
|
+
* // => 3.2
|
|
20988
|
+
*
|
|
20989
|
+
* _.toNumber(Number.MIN_VALUE);
|
|
20990
|
+
* // => 5e-324
|
|
20991
|
+
*
|
|
20992
|
+
* _.toNumber(Infinity);
|
|
20993
|
+
* // => Infinity
|
|
20994
|
+
*
|
|
20995
|
+
* _.toNumber('3.2');
|
|
20996
|
+
* // => 3.2
|
|
20997
|
+
*/
|
|
20998
|
+
function toNumber(value) {
|
|
20999
|
+
if (typeof value == 'number') {
|
|
21000
|
+
return value;
|
|
21001
|
+
}
|
|
21002
|
+
if (isSymbol(value)) {
|
|
21003
|
+
return NAN;
|
|
21004
|
+
}
|
|
21005
|
+
if (isObject(value)) {
|
|
21006
|
+
var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
|
|
21007
|
+
value = isObject(other) ? other + '' : other;
|
|
21008
|
+
}
|
|
21009
|
+
if (typeof value != 'string') {
|
|
21010
|
+
return value === 0 ? value : +value;
|
|
20762
21011
|
}
|
|
21012
|
+
value = value.replace(reTrim, '');
|
|
21013
|
+
var isBinary = reIsBinary.test(value);
|
|
21014
|
+
return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
|
|
21015
|
+
}
|
|
21016
|
+
var lodash_debounce = debounce;
|
|
21017
|
+
var debounce$1 = /*@__PURE__*/getDefaultExportFromCjs(lodash_debounce);
|
|
20763
21018
|
|
|
20764
|
-
|
|
20765
|
-
|
|
20766
|
-
|
|
20767
|
-
|
|
20768
|
-
|
|
20769
|
-
|
|
20770
|
-
|
|
20771
|
-
|
|
20772
|
-
|
|
21019
|
+
const useResize = resizeCallback => {
|
|
21020
|
+
const handleResize = React.useCallback(() => resizeCallback?.(), []);
|
|
21021
|
+
React.useEffect(() => {
|
|
21022
|
+
handleResize();
|
|
21023
|
+
}, []);
|
|
21024
|
+
React.useEffect(() => {
|
|
21025
|
+
if (window) {
|
|
21026
|
+
const debouncedHandleResize = debounce$1(handleResize, 150);
|
|
21027
|
+
window.addEventListener('resize', debouncedHandleResize);
|
|
21028
|
+
return () => window.removeEventListener('resize', debouncedHandleResize);
|
|
21029
|
+
}
|
|
21030
|
+
}, []);
|
|
21031
|
+
};
|
|
20773
21032
|
|
|
20774
|
-
|
|
20775
|
-
|
|
20776
|
-
|
|
20777
|
-
|
|
20778
|
-
|
|
20779
|
-
|
|
20780
|
-
|
|
21033
|
+
const scrollIntoView = ({
|
|
21034
|
+
childrenRef,
|
|
21035
|
+
scrollContainerRef,
|
|
21036
|
+
options = {
|
|
21037
|
+
behavior: 'smooth',
|
|
21038
|
+
direction: 'vertical',
|
|
21039
|
+
offset: 0
|
|
21040
|
+
}
|
|
21041
|
+
}) => {
|
|
21042
|
+
if (!isNullable(scrollContainerRef)) {
|
|
21043
|
+
const startSide = options.direction === 'vertical' ? 'top' : 'left';
|
|
21044
|
+
const endSide = options.direction === 'vertical' ? 'bottom' : 'right';
|
|
21045
|
+
const scrollSide = options.direction === 'vertical' ? 'scrollTop' : 'scrollLeft';
|
|
21046
|
+
const {
|
|
21047
|
+
[startSide]: childrenStart,
|
|
21048
|
+
[endSide]: childrenEnd
|
|
21049
|
+
} = childrenRef.getBoundingClientRect();
|
|
21050
|
+
const {
|
|
21051
|
+
[startSide]: scrollContainerStart,
|
|
21052
|
+
[endSide]: scrollContainerEnd
|
|
21053
|
+
} = scrollContainerRef.getBoundingClientRect();
|
|
21054
|
+
const isChildrenStartAboveScrollContainer = childrenStart < scrollContainerStart;
|
|
21055
|
+
const isChildrenBottomBelowScrollContainer = childrenEnd > scrollContainerEnd;
|
|
21056
|
+
if (isChildrenStartAboveScrollContainer) {
|
|
21057
|
+
const scrollDistance = childrenStart - scrollContainerStart + scrollContainerRef[scrollSide] - (options.offset || 0);
|
|
21058
|
+
scrollContainerRef.scrollTo({
|
|
21059
|
+
behavior: options.behavior,
|
|
21060
|
+
[startSide]: scrollDistance
|
|
21061
|
+
});
|
|
21062
|
+
} else if (isChildrenBottomBelowScrollContainer) {
|
|
21063
|
+
const scrollDistance = childrenEnd - scrollContainerEnd + scrollContainerRef[scrollSide] + (options.offset || 0);
|
|
21064
|
+
scrollContainerRef.scrollTo({
|
|
21065
|
+
behavior: options.behavior,
|
|
21066
|
+
[startSide]: scrollDistance
|
|
21067
|
+
});
|
|
21068
|
+
}
|
|
21069
|
+
} else {
|
|
21070
|
+
childrenRef.scrollIntoView({
|
|
21071
|
+
behavior: options.behavior
|
|
21072
|
+
});
|
|
21073
|
+
}
|
|
21074
|
+
};
|
|
20781
21075
|
|
|
20782
|
-
|
|
20783
|
-
|
|
20784
|
-
|
|
20785
|
-
|
|
21076
|
+
const TabItem = ({
|
|
21077
|
+
children,
|
|
21078
|
+
leadingIcon: LeadingIcon,
|
|
21079
|
+
selected = false,
|
|
21080
|
+
onClick,
|
|
21081
|
+
size: propSize,
|
|
21082
|
+
variant: propVariant
|
|
21083
|
+
}) => {
|
|
21084
|
+
const ref = React.useRef(null);
|
|
21085
|
+
const {
|
|
21086
|
+
size: contextSize,
|
|
21087
|
+
variant: contextVariant,
|
|
21088
|
+
containerRef
|
|
21089
|
+
} = React.useContext(TabContext);
|
|
21090
|
+
const size = propSize ?? contextSize;
|
|
21091
|
+
const variant = propVariant ?? contextVariant;
|
|
21092
|
+
const handleClick = e => {
|
|
21093
|
+
if (containerRef && containerRef.current && ref.current) {
|
|
21094
|
+
scrollIntoView({
|
|
21095
|
+
scrollContainerRef: containerRef.current,
|
|
21096
|
+
childrenRef: ref.current,
|
|
21097
|
+
options: {
|
|
21098
|
+
behavior: 'smooth',
|
|
21099
|
+
offset: 72
|
|
21100
|
+
}
|
|
21101
|
+
});
|
|
21102
|
+
}
|
|
21103
|
+
onClick?.(e);
|
|
21104
|
+
};
|
|
21105
|
+
return /*#__PURE__*/jsxRuntimeExports.jsx(BaseTabItem, {
|
|
21106
|
+
role: 'tab',
|
|
21107
|
+
ref: ref,
|
|
21108
|
+
variant: variant,
|
|
21109
|
+
size: size,
|
|
21110
|
+
leadingIcon: LeadingIcon,
|
|
21111
|
+
selected: selected,
|
|
21112
|
+
onClick: handleClick,
|
|
21113
|
+
children: /*#__PURE__*/jsxRuntimeExports.jsxs(View, {
|
|
21114
|
+
sx: {
|
|
21115
|
+
display: 'flex',
|
|
21116
|
+
flexDirection: 'row',
|
|
21117
|
+
alignItems: 'center',
|
|
21118
|
+
justifyContent: 'center',
|
|
21119
|
+
columnGap: 1
|
|
21120
|
+
},
|
|
21121
|
+
children: [LeadingIcon ? /*#__PURE__*/jsxRuntimeExports.jsx(LeadingIcon, {}) : null, /*#__PURE__*/jsxRuntimeExports.jsx(View, {
|
|
21122
|
+
children: children
|
|
21123
|
+
})]
|
|
21124
|
+
})
|
|
21125
|
+
});
|
|
21126
|
+
};
|
|
21127
|
+
const BaseTabItem = styled__default.default(UnstyledButton)(({
|
|
20786
21128
|
theme
|
|
20787
|
-
}) =>
|
|
20788
|
-
|
|
21129
|
+
}) => ({
|
|
21130
|
+
'width': 'initial',
|
|
21131
|
+
'position': 'relative',
|
|
21132
|
+
'transition': 'background-color 100ms, color 100ms',
|
|
21133
|
+
'whiteSpace': 'nowrap',
|
|
21134
|
+
'& svg': {
|
|
21135
|
+
transition: 'color 100ms'
|
|
21136
|
+
},
|
|
21137
|
+
'&:focus-visible': {
|
|
21138
|
+
outlineColor: theme.colors['border/focused'],
|
|
21139
|
+
outlineStyle: 'solid',
|
|
21140
|
+
outlineWidth: 2,
|
|
21141
|
+
outlineOffset: 2
|
|
21142
|
+
}
|
|
21143
|
+
}), () => variant({
|
|
21144
|
+
prop: 'size',
|
|
21145
|
+
variants: {
|
|
21146
|
+
l: {
|
|
21147
|
+
'px': 4,
|
|
21148
|
+
'py': 2,
|
|
21149
|
+
'fontSize': typography['s'].fontSize,
|
|
21150
|
+
'fontWeight': typography['s'].fontWeight,
|
|
21151
|
+
'lineHeight': typography['s'].lineHeight,
|
|
21152
|
+
'& svg': {
|
|
21153
|
+
width: 20,
|
|
21154
|
+
height: 20
|
|
20789
21155
|
}
|
|
20790
|
-
|
|
20791
|
-
|
|
20792
|
-
|
|
20793
|
-
|
|
20794
|
-
|
|
20795
|
-
|
|
20796
|
-
|
|
20797
|
-
|
|
20798
|
-
|
|
21156
|
+
},
|
|
21157
|
+
m: {
|
|
21158
|
+
'px': 4,
|
|
21159
|
+
'py': 2,
|
|
21160
|
+
'fontSize': typography['xs'].fontSize,
|
|
21161
|
+
'fontWeight': typography['xs'].fontWeight,
|
|
21162
|
+
'lineHeight': typography['xs'].lineHeight,
|
|
21163
|
+
'& svg': {
|
|
21164
|
+
width: 20,
|
|
21165
|
+
height: 20
|
|
20799
21166
|
}
|
|
20800
|
-
|
|
20801
|
-
|
|
20802
|
-
|
|
20803
|
-
|
|
21167
|
+
},
|
|
21168
|
+
s: {
|
|
21169
|
+
'px': 3,
|
|
21170
|
+
'py': 2,
|
|
21171
|
+
'fontSize': typography['xxs'].fontSize,
|
|
21172
|
+
'fontWeight': typography['xxs'].fontWeight,
|
|
21173
|
+
'lineHeight': typography['xxs'].lineHeight,
|
|
21174
|
+
'& svg': {
|
|
21175
|
+
width: 16,
|
|
21176
|
+
height: 16
|
|
20804
21177
|
}
|
|
20805
|
-
|
|
20806
|
-
`;
|
|
20807
|
-
const UnstyledTextarea = styled__default.default.textarea`
|
|
20808
|
-
font-size: inherit;
|
|
20809
|
-
font-weight: inherit;
|
|
20810
|
-
line-height: inherit;
|
|
20811
|
-
font-family: inherit;
|
|
20812
|
-
border-radius: inherit;
|
|
20813
|
-
color: inherit;
|
|
20814
|
-
transition: inherit;
|
|
20815
|
-
|
|
20816
|
-
border: 0;
|
|
20817
|
-
background-color: transparent;
|
|
20818
|
-
width: 100%;
|
|
20819
|
-
&:focus {
|
|
20820
|
-
outline: 0;
|
|
21178
|
+
}
|
|
20821
21179
|
}
|
|
20822
|
-
|
|
20823
|
-
|
|
20824
|
-
|
|
20825
|
-
|
|
20826
|
-
|
|
20827
|
-
|
|
20828
|
-
|
|
20829
|
-
|
|
20830
|
-
|
|
20831
|
-
|
|
20832
|
-
|
|
20833
|
-
|
|
20834
|
-
|
|
20835
|
-
|
|
20836
|
-
|
|
20837
|
-
|
|
20838
|
-
|
|
20839
|
-
|
|
20840
|
-
|
|
20841
|
-
|
|
20842
|
-
|
|
20843
|
-
|
|
20844
|
-
|
|
20845
|
-
|
|
20846
|
-
d = Symbol.for("react.fragment"),
|
|
20847
|
-
e = Symbol.for("react.strict_mode"),
|
|
20848
|
-
f = Symbol.for("react.profiler"),
|
|
20849
|
-
g = Symbol.for("react.provider"),
|
|
20850
|
-
h = Symbol.for("react.context"),
|
|
20851
|
-
k = Symbol.for("react.server_context"),
|
|
20852
|
-
l = Symbol.for("react.forward_ref"),
|
|
20853
|
-
m = Symbol.for("react.suspense"),
|
|
20854
|
-
n = Symbol.for("react.suspense_list"),
|
|
20855
|
-
p = Symbol.for("react.memo"),
|
|
20856
|
-
q = Symbol.for("react.lazy"),
|
|
20857
|
-
t = Symbol.for("react.offscreen"),
|
|
20858
|
-
u;
|
|
20859
|
-
u = Symbol.for("react.module.reference");
|
|
20860
|
-
function v(a) {
|
|
20861
|
-
if ("object" === typeof a && null !== a) {
|
|
20862
|
-
var r = a.$$typeof;
|
|
20863
|
-
switch (r) {
|
|
20864
|
-
case b:
|
|
20865
|
-
switch (a = a.type, a) {
|
|
20866
|
-
case d:
|
|
20867
|
-
case f:
|
|
20868
|
-
case e:
|
|
20869
|
-
case m:
|
|
20870
|
-
case n:
|
|
20871
|
-
return a;
|
|
20872
|
-
default:
|
|
20873
|
-
switch (a = a && a.$$typeof, a) {
|
|
20874
|
-
case k:
|
|
20875
|
-
case h:
|
|
20876
|
-
case l:
|
|
20877
|
-
case q:
|
|
20878
|
-
case p:
|
|
20879
|
-
case g:
|
|
20880
|
-
return a;
|
|
20881
|
-
default:
|
|
20882
|
-
return r;
|
|
20883
|
-
}
|
|
21180
|
+
}), ({
|
|
21181
|
+
theme,
|
|
21182
|
+
selected
|
|
21183
|
+
}) => variant({
|
|
21184
|
+
prop: 'variant',
|
|
21185
|
+
variants: {
|
|
21186
|
+
plain: {
|
|
21187
|
+
borderRadius: theme.radii.full,
|
|
21188
|
+
...(selected ? {
|
|
21189
|
+
'color': theme.colors['text/neutral'],
|
|
21190
|
+
'backgroundColor': theme.colors['bg/selected/subtle'],
|
|
21191
|
+
'& svg': {
|
|
21192
|
+
color: theme.colors['icon/selected']
|
|
21193
|
+
}
|
|
21194
|
+
} : {
|
|
21195
|
+
'color': theme.colors['text/neutral/subtler'],
|
|
21196
|
+
'backgroundColor': theme.colors['bg/neutral/subtler'],
|
|
21197
|
+
'& svg': {
|
|
21198
|
+
color: theme.colors['icon/neutral']
|
|
21199
|
+
},
|
|
21200
|
+
'&:hover, &:active': {
|
|
21201
|
+
'color': theme.colors['text/neutral/subtle'],
|
|
21202
|
+
'& svg': {
|
|
21203
|
+
color: theme.colors['icon/neutral/bolder']
|
|
20884
21204
|
}
|
|
20885
|
-
|
|
20886
|
-
|
|
20887
|
-
|
|
21205
|
+
}
|
|
21206
|
+
})
|
|
21207
|
+
},
|
|
21208
|
+
outlined: {
|
|
21209
|
+
borderRadius: theme.radii.full,
|
|
21210
|
+
...(selected ? {
|
|
21211
|
+
'color': theme.colors['text/inverse'],
|
|
21212
|
+
'backgroundColor': theme.colors['bg/selected'],
|
|
21213
|
+
'& svg': {
|
|
21214
|
+
color: theme.colors['icon/inverse']
|
|
21215
|
+
}
|
|
21216
|
+
} : {
|
|
21217
|
+
'color': theme.colors['text/neutral/subtler'],
|
|
21218
|
+
'backgroundColor': theme.colors['bg/neutral/subtler'],
|
|
21219
|
+
'& svg': {
|
|
21220
|
+
color: theme.colors['icon/neutral']
|
|
21221
|
+
},
|
|
21222
|
+
'&:after': {
|
|
21223
|
+
content: '""',
|
|
21224
|
+
position: 'absolute',
|
|
21225
|
+
top: 0,
|
|
21226
|
+
right: 0,
|
|
21227
|
+
bottom: 0,
|
|
21228
|
+
left: 0,
|
|
21229
|
+
borderWidth: 1,
|
|
21230
|
+
borderStyle: 'solid',
|
|
21231
|
+
borderColor: theme.colors['border/neutral/bolder'],
|
|
21232
|
+
borderRadius: theme.radii.full,
|
|
21233
|
+
boxSizing: 'border-box'
|
|
21234
|
+
},
|
|
21235
|
+
'&:hover': {
|
|
21236
|
+
backgroundColor: theme.colors['bg/neutral/subtler/hovered']
|
|
21237
|
+
},
|
|
21238
|
+
'&:active': {
|
|
21239
|
+
backgroundColor: theme.colors['bg/neutral/subtler/pressed']
|
|
21240
|
+
}
|
|
21241
|
+
})
|
|
21242
|
+
},
|
|
21243
|
+
underline: {
|
|
21244
|
+
borderRadius: theme.radii.xxs,
|
|
21245
|
+
...(selected ? {
|
|
21246
|
+
'color': theme.colors['text/selected'],
|
|
21247
|
+
'backgroundColor': theme.colors['bg/neutral/subtler'],
|
|
21248
|
+
'& svg': {
|
|
21249
|
+
color: theme.colors['icon/selected']
|
|
21250
|
+
},
|
|
21251
|
+
':after': {
|
|
21252
|
+
content: '""',
|
|
21253
|
+
position: 'absolute',
|
|
21254
|
+
top: 0,
|
|
21255
|
+
right: 0,
|
|
21256
|
+
bottom: 0,
|
|
21257
|
+
left: 0,
|
|
21258
|
+
borderBottomWidth: 2,
|
|
21259
|
+
borderBottomStyle: 'solid',
|
|
21260
|
+
borderBottomColor: theme.colors['border/selected'],
|
|
21261
|
+
borderRadius: theme.radii.none,
|
|
21262
|
+
boxSizing: 'border-box'
|
|
21263
|
+
}
|
|
21264
|
+
} : {
|
|
21265
|
+
'color': theme.colors['text/neutral/subtler'],
|
|
21266
|
+
'backgroundColor': theme.colors['bg/neutral/subtler'],
|
|
21267
|
+
'& svg': {
|
|
21268
|
+
color: theme.colors['icon/neutral']
|
|
21269
|
+
},
|
|
21270
|
+
':hover, :active': {
|
|
21271
|
+
'color': theme.colors['text/neutral/subtle'],
|
|
21272
|
+
'& svg': {
|
|
21273
|
+
color: theme.colors['icon/neutral/bolder']
|
|
21274
|
+
}
|
|
21275
|
+
}
|
|
21276
|
+
})
|
|
21277
|
+
}
|
|
21278
|
+
}
|
|
21279
|
+
}));
|
|
21280
|
+
|
|
21281
|
+
const TabContext = /*#__PURE__*/React.createContext({});
|
|
21282
|
+
const Tab = ({
|
|
21283
|
+
variant = 'plain',
|
|
21284
|
+
size = 'm',
|
|
21285
|
+
gap = 2,
|
|
21286
|
+
children
|
|
21287
|
+
}) => {
|
|
21288
|
+
const rootRef = React.useRef(null);
|
|
21289
|
+
const [isLeftButtonVisible, setIsLeftButtonVisible] = React.useState(rootRef.current ? rootRef.current.scrollLeft > 0 : false);
|
|
21290
|
+
const [isRightButtonVisible, setIsRightButtonVisible] = React.useState(rootRef.current ? rootRef.current.clientWidth + rootRef.current.scrollLeft < rootRef.current.scrollWidth : false);
|
|
21291
|
+
const handleScrollButtonVisibility = () => {
|
|
21292
|
+
if (rootRef.current) {
|
|
21293
|
+
setIsLeftButtonVisible(rootRef.current ? rootRef.current.scrollLeft > 0 : false);
|
|
21294
|
+
setIsRightButtonVisible(rootRef.current ? rootRef.current.clientWidth + Math.ceil(rootRef.current.scrollLeft) < rootRef.current.scrollWidth : false);
|
|
20888
21295
|
}
|
|
20889
|
-
}
|
|
20890
|
-
reactIs_production_min.ContextConsumer = h;
|
|
20891
|
-
reactIs_production_min.ContextProvider = g;
|
|
20892
|
-
reactIs_production_min.Element = b;
|
|
20893
|
-
reactIs_production_min.ForwardRef = l;
|
|
20894
|
-
reactIs_production_min.Fragment = d;
|
|
20895
|
-
reactIs_production_min.Lazy = q;
|
|
20896
|
-
reactIs_production_min.Memo = p;
|
|
20897
|
-
reactIs_production_min.Portal = c;
|
|
20898
|
-
reactIs_production_min.Profiler = f;
|
|
20899
|
-
reactIs_production_min.StrictMode = e;
|
|
20900
|
-
reactIs_production_min.Suspense = m;
|
|
20901
|
-
reactIs_production_min.SuspenseList = n;
|
|
20902
|
-
reactIs_production_min.isAsyncMode = function () {
|
|
20903
|
-
return !1;
|
|
20904
|
-
};
|
|
20905
|
-
reactIs_production_min.isConcurrentMode = function () {
|
|
20906
|
-
return !1;
|
|
20907
|
-
};
|
|
20908
|
-
reactIs_production_min.isContextConsumer = function (a) {
|
|
20909
|
-
return v(a) === h;
|
|
20910
|
-
};
|
|
20911
|
-
reactIs_production_min.isContextProvider = function (a) {
|
|
20912
|
-
return v(a) === g;
|
|
20913
|
-
};
|
|
20914
|
-
reactIs_production_min.isElement = function (a) {
|
|
20915
|
-
return "object" === typeof a && null !== a && a.$$typeof === b;
|
|
20916
|
-
};
|
|
20917
|
-
reactIs_production_min.isForwardRef = function (a) {
|
|
20918
|
-
return v(a) === l;
|
|
20919
|
-
};
|
|
20920
|
-
reactIs_production_min.isFragment = function (a) {
|
|
20921
|
-
return v(a) === d;
|
|
20922
|
-
};
|
|
20923
|
-
reactIs_production_min.isLazy = function (a) {
|
|
20924
|
-
return v(a) === q;
|
|
20925
|
-
};
|
|
20926
|
-
reactIs_production_min.isMemo = function (a) {
|
|
20927
|
-
return v(a) === p;
|
|
20928
|
-
};
|
|
20929
|
-
reactIs_production_min.isPortal = function (a) {
|
|
20930
|
-
return v(a) === c;
|
|
20931
|
-
};
|
|
20932
|
-
reactIs_production_min.isProfiler = function (a) {
|
|
20933
|
-
return v(a) === f;
|
|
20934
|
-
};
|
|
20935
|
-
reactIs_production_min.isStrictMode = function (a) {
|
|
20936
|
-
return v(a) === e;
|
|
20937
|
-
};
|
|
20938
|
-
reactIs_production_min.isSuspense = function (a) {
|
|
20939
|
-
return v(a) === m;
|
|
20940
21296
|
};
|
|
20941
|
-
|
|
20942
|
-
|
|
21297
|
+
const buttonWidth = 32;
|
|
21298
|
+
const gradientWidth = 40;
|
|
21299
|
+
const handleLeftButtonClick = () => {
|
|
21300
|
+
if (rootRef.current) {
|
|
21301
|
+
rootRef.current.scrollTo({
|
|
21302
|
+
left: rootRef.current.scrollLeft - rootRef.current.clientWidth + buttonWidth + gradientWidth,
|
|
21303
|
+
behavior: 'smooth'
|
|
21304
|
+
});
|
|
21305
|
+
}
|
|
20943
21306
|
};
|
|
20944
|
-
|
|
20945
|
-
|
|
21307
|
+
const handleRightButtonClick = () => {
|
|
21308
|
+
if (rootRef.current) {
|
|
21309
|
+
rootRef.current.scrollTo({
|
|
21310
|
+
left: rootRef.current.scrollLeft + rootRef.current.clientWidth - (buttonWidth + gradientWidth),
|
|
21311
|
+
behavior: 'smooth'
|
|
21312
|
+
});
|
|
21313
|
+
}
|
|
20946
21314
|
};
|
|
20947
|
-
|
|
20948
|
-
|
|
20949
|
-
}
|
|
20950
|
-
|
|
20951
|
-
|
|
21315
|
+
React.useEffect(() => {
|
|
21316
|
+
handleScrollButtonVisibility();
|
|
21317
|
+
}, []);
|
|
21318
|
+
useResize(handleScrollButtonVisibility);
|
|
21319
|
+
return /*#__PURE__*/jsxRuntimeExports.jsx(TabContext.Provider, {
|
|
21320
|
+
value: {
|
|
21321
|
+
variant,
|
|
21322
|
+
size,
|
|
21323
|
+
containerRef: rootRef
|
|
21324
|
+
},
|
|
21325
|
+
children: /*#__PURE__*/jsxRuntimeExports.jsxs(View, {
|
|
21326
|
+
position: 'relative',
|
|
21327
|
+
children: [/*#__PURE__*/jsxRuntimeExports.jsx(View, {
|
|
21328
|
+
ref: rootRef,
|
|
21329
|
+
role: 'tablist',
|
|
21330
|
+
sx: {
|
|
21331
|
+
'width': 'auto',
|
|
21332
|
+
'display': 'flex',
|
|
21333
|
+
'flexDirection': 'row',
|
|
21334
|
+
'alignItems': 'center',
|
|
21335
|
+
'columnGap': gap,
|
|
21336
|
+
'overflowX': 'auto',
|
|
21337
|
+
'msOverflowStyle': 'none',
|
|
21338
|
+
'::-webkit-scrollbar': {
|
|
21339
|
+
display: 'none'
|
|
21340
|
+
}
|
|
21341
|
+
},
|
|
21342
|
+
onScroll: throttle$1(handleScrollButtonVisibility, 150),
|
|
21343
|
+
children: children
|
|
21344
|
+
}), /*#__PURE__*/jsxRuntimeExports.jsxs(View, {
|
|
21345
|
+
display: ['none', 'initial', 'initial'],
|
|
21346
|
+
children: [isLeftButtonVisible ? /*#__PURE__*/jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, {
|
|
21347
|
+
children: [/*#__PURE__*/jsxRuntimeExports.jsx(View, {
|
|
21348
|
+
sx: {
|
|
21349
|
+
position: 'absolute',
|
|
21350
|
+
top: 0,
|
|
21351
|
+
left: forcePixelValue(buttonWidth),
|
|
21352
|
+
bottom: 0,
|
|
21353
|
+
width: forcePixelValue(gradientWidth),
|
|
21354
|
+
height: '100%',
|
|
21355
|
+
background: `linear-gradient(${gradient['overlay/floating/toright']})`,
|
|
21356
|
+
pointerEvents: 'none'
|
|
21357
|
+
}
|
|
21358
|
+
}), /*#__PURE__*/jsxRuntimeExports.jsx(View, {
|
|
21359
|
+
sx: {
|
|
21360
|
+
position: 'absolute',
|
|
21361
|
+
display: 'flex',
|
|
21362
|
+
alignItems: 'center',
|
|
21363
|
+
top: 0,
|
|
21364
|
+
left: 0,
|
|
21365
|
+
bottom: 0,
|
|
21366
|
+
backgroundColor: elevation.surface
|
|
21367
|
+
},
|
|
21368
|
+
children: /*#__PURE__*/jsxRuntimeExports.jsx(IconButton, {
|
|
21369
|
+
size: 's',
|
|
21370
|
+
variant: 'plain-bold',
|
|
21371
|
+
icon: SvgChevronLeft,
|
|
21372
|
+
onClick: handleLeftButtonClick
|
|
21373
|
+
})
|
|
21374
|
+
})]
|
|
21375
|
+
}) : null, isRightButtonVisible ? /*#__PURE__*/jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, {
|
|
21376
|
+
children: [/*#__PURE__*/jsxRuntimeExports.jsx(View, {
|
|
21377
|
+
sx: {
|
|
21378
|
+
position: 'absolute',
|
|
21379
|
+
top: 0,
|
|
21380
|
+
right: forcePixelValue(buttonWidth),
|
|
21381
|
+
bottom: 0,
|
|
21382
|
+
width: forcePixelValue(gradientWidth),
|
|
21383
|
+
height: '100%',
|
|
21384
|
+
background: `linear-gradient(${gradient['overlay/floating/toleft']})`,
|
|
21385
|
+
pointerEvents: 'none'
|
|
21386
|
+
}
|
|
21387
|
+
}), /*#__PURE__*/jsxRuntimeExports.jsx(View, {
|
|
21388
|
+
sx: {
|
|
21389
|
+
position: 'absolute',
|
|
21390
|
+
display: 'flex',
|
|
21391
|
+
alignItems: 'center',
|
|
21392
|
+
top: 0,
|
|
21393
|
+
right: 0,
|
|
21394
|
+
bottom: 0,
|
|
21395
|
+
backgroundColor: elevation.surface
|
|
21396
|
+
},
|
|
21397
|
+
children: /*#__PURE__*/jsxRuntimeExports.jsx(IconButton, {
|
|
21398
|
+
size: 's',
|
|
21399
|
+
variant: 'plain-bold',
|
|
21400
|
+
icon: SvgChevronRight,
|
|
21401
|
+
onClick: handleRightButtonClick
|
|
21402
|
+
})
|
|
21403
|
+
})]
|
|
21404
|
+
}) : null]
|
|
21405
|
+
})]
|
|
21406
|
+
})
|
|
21407
|
+
});
|
|
21408
|
+
};
|
|
21409
|
+
var index$1 = Object.assign(Tab, {
|
|
21410
|
+
Item: TabItem
|
|
21411
|
+
});
|
|
20952
21412
|
|
|
20953
|
-
|
|
20954
|
-
|
|
20955
|
-
|
|
20956
|
-
|
|
20957
|
-
|
|
20958
|
-
|
|
20959
|
-
|
|
20960
|
-
|
|
20961
|
-
*/
|
|
20962
|
-
|
|
20963
|
-
|
|
20964
|
-
|
|
20965
|
-
|
|
20966
|
-
|
|
20967
|
-
|
|
21413
|
+
const Textarea = /*#__PURE__*/React.forwardRef(({
|
|
21414
|
+
disabled,
|
|
21415
|
+
...props
|
|
21416
|
+
}, ref) => {
|
|
21417
|
+
const inputRef = useProvidedOrCreatedRef(ref);
|
|
21418
|
+
const focusInput = () => {
|
|
21419
|
+
inputRef.current?.focus();
|
|
21420
|
+
};
|
|
21421
|
+
return /*#__PURE__*/jsxRuntimeExports.jsx(TextareaWrapper, {
|
|
21422
|
+
disabled: disabled,
|
|
21423
|
+
onClick: focusInput,
|
|
21424
|
+
children: /*#__PURE__*/jsxRuntimeExports.jsx(BaseTextarea, {
|
|
21425
|
+
ref: e => {
|
|
21426
|
+
isFunction(ref) ? ref(e) : null;
|
|
21427
|
+
inputRef.current = e;
|
|
21428
|
+
},
|
|
21429
|
+
disabled: disabled,
|
|
21430
|
+
...props
|
|
21431
|
+
})
|
|
21432
|
+
});
|
|
21433
|
+
});
|
|
21434
|
+
const TextareaWrapper = styled__default.default.div`
|
|
21435
|
+
position: relative;
|
|
21436
|
+
width: ${forcePixelValue('100%')};
|
|
21437
|
+
border-width: ${forcePixelValue(1)};
|
|
21438
|
+
border-style: solid;
|
|
21439
|
+
border-radius: ${({
|
|
21440
|
+
theme
|
|
21441
|
+
}) => forcePixelValue(theme.radii.s)};
|
|
21442
|
+
border-color: ${({
|
|
21443
|
+
theme
|
|
21444
|
+
}) => theme.colors['border/input']};
|
|
21445
|
+
background-color: ${({
|
|
21446
|
+
theme
|
|
21447
|
+
}) => theme.colors['bg/input']};
|
|
21448
|
+
cursor: text;
|
|
21449
|
+
display: inline-flex;
|
|
21450
|
+
align-items: center;
|
|
20968
21451
|
|
|
20969
|
-
|
|
20970
|
-
|
|
20971
|
-
|
|
20972
|
-
|
|
20973
|
-
|
|
20974
|
-
|
|
20975
|
-
|
|
20976
|
-
|
|
20977
|
-
|
|
20978
|
-
|
|
20979
|
-
|
|
20980
|
-
|
|
20981
|
-
var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');
|
|
20982
|
-
var REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');
|
|
20983
|
-
var REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');
|
|
20984
|
-
var REACT_MEMO_TYPE = Symbol.for('react.memo');
|
|
20985
|
-
var REACT_LAZY_TYPE = Symbol.for('react.lazy');
|
|
20986
|
-
var REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');
|
|
21452
|
+
padding-top: ${({
|
|
21453
|
+
theme
|
|
21454
|
+
}) => forcePixelValue(theme.space['4'])};
|
|
21455
|
+
padding-right: ${({
|
|
21456
|
+
theme
|
|
21457
|
+
}) => forcePixelValue(theme.space['4'])};
|
|
21458
|
+
padding-bottom: ${({
|
|
21459
|
+
theme
|
|
21460
|
+
}) => forcePixelValue(theme.space['4'])};
|
|
21461
|
+
padding-left: ${({
|
|
21462
|
+
theme
|
|
21463
|
+
}) => forcePixelValue(theme.space['5'])};
|
|
20987
21464
|
|
|
20988
|
-
|
|
21465
|
+
font-size: ${({
|
|
21466
|
+
theme
|
|
21467
|
+
}) => forcePixelValue(theme.fontSizes.xs)};
|
|
21468
|
+
font-weight: ${({
|
|
21469
|
+
theme
|
|
21470
|
+
}) => theme.fontWeights.medium};
|
|
21471
|
+
line-height: ${({
|
|
21472
|
+
theme
|
|
21473
|
+
}) => theme.lineHeights[2]};
|
|
21474
|
+
color: ${({
|
|
21475
|
+
theme
|
|
21476
|
+
}) => theme.colors['text/neutral']};
|
|
21477
|
+
input::placeholder {
|
|
21478
|
+
color: ${({
|
|
21479
|
+
theme
|
|
21480
|
+
}) => theme.colors['text/neutral/subtlest']};
|
|
21481
|
+
}
|
|
20989
21482
|
|
|
20990
|
-
|
|
20991
|
-
var enableCacheElement = false;
|
|
20992
|
-
var enableTransitionTracing = false; // No known bugs, but needs performance testing
|
|
21483
|
+
height: 74px;
|
|
20993
21484
|
|
|
20994
|
-
|
|
20995
|
-
|
|
20996
|
-
|
|
21485
|
+
&:after {
|
|
21486
|
+
content: '';
|
|
21487
|
+
position: absolute;
|
|
21488
|
+
top: ${forcePixelValue(-1)};
|
|
21489
|
+
right: ${forcePixelValue(-1)};
|
|
21490
|
+
bottom: ${forcePixelValue(-1)};
|
|
21491
|
+
left: ${forcePixelValue(-1)};
|
|
20997
21492
|
|
|
20998
|
-
|
|
21493
|
+
border: ${forcePixelValue(2)} solid transparent;
|
|
21494
|
+
border-radius: ${({
|
|
21495
|
+
theme
|
|
21496
|
+
}) => forcePixelValue(theme.radii.s)};
|
|
21497
|
+
pointer-events: none;
|
|
21498
|
+
}
|
|
20999
21499
|
|
|
21000
|
-
|
|
21001
|
-
{
|
|
21002
|
-
|
|
21500
|
+
${props => props.validationStatus !== 'error' && !props.disabled && styled.css`
|
|
21501
|
+
&:hover:not(:focus-within) {
|
|
21502
|
+
&:after {
|
|
21503
|
+
border-color: ${({
|
|
21504
|
+
theme
|
|
21505
|
+
}) => theme.colors['border/hovered']};
|
|
21506
|
+
}
|
|
21003
21507
|
}
|
|
21004
|
-
|
|
21005
|
-
if (typeof type === 'string' || typeof type === 'function') {
|
|
21006
|
-
return true;
|
|
21007
|
-
} // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
|
|
21508
|
+
`}
|
|
21008
21509
|
|
|
21009
|
-
|
|
21010
|
-
|
|
21011
|
-
|
|
21012
|
-
|
|
21013
|
-
|
|
21014
|
-
// This needs to include all possible module reference object
|
|
21015
|
-
// types supported by any Flight configuration anywhere since
|
|
21016
|
-
// we don't know which Flight build this will end up being used
|
|
21017
|
-
// with.
|
|
21018
|
-
type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {
|
|
21019
|
-
return true;
|
|
21020
|
-
}
|
|
21021
|
-
}
|
|
21022
|
-
return false;
|
|
21510
|
+
${props => props.validationStatus === 'error' && styled.css`
|
|
21511
|
+
&:after {
|
|
21512
|
+
border-color: ${({
|
|
21513
|
+
theme
|
|
21514
|
+
}) => theme.colors['border/danger']};
|
|
21023
21515
|
}
|
|
21024
|
-
|
|
21025
|
-
|
|
21026
|
-
|
|
21027
|
-
|
|
21028
|
-
|
|
21029
|
-
|
|
21030
|
-
|
|
21031
|
-
|
|
21032
|
-
case REACT_PROFILER_TYPE:
|
|
21033
|
-
case REACT_STRICT_MODE_TYPE:
|
|
21034
|
-
case REACT_SUSPENSE_TYPE:
|
|
21035
|
-
case REACT_SUSPENSE_LIST_TYPE:
|
|
21036
|
-
return type;
|
|
21037
|
-
default:
|
|
21038
|
-
var $$typeofType = type && type.$$typeof;
|
|
21039
|
-
switch ($$typeofType) {
|
|
21040
|
-
case REACT_SERVER_CONTEXT_TYPE:
|
|
21041
|
-
case REACT_CONTEXT_TYPE:
|
|
21042
|
-
case REACT_FORWARD_REF_TYPE:
|
|
21043
|
-
case REACT_LAZY_TYPE:
|
|
21044
|
-
case REACT_MEMO_TYPE:
|
|
21045
|
-
case REACT_PROVIDER_TYPE:
|
|
21046
|
-
return $$typeofType;
|
|
21047
|
-
default:
|
|
21048
|
-
return $$typeof;
|
|
21049
|
-
}
|
|
21050
|
-
}
|
|
21051
|
-
case REACT_PORTAL_TYPE:
|
|
21052
|
-
return $$typeof;
|
|
21053
|
-
}
|
|
21516
|
+
`}
|
|
21517
|
+
|
|
21518
|
+
${props => props.validationStatus !== 'error' && styled.css`
|
|
21519
|
+
&:focus-within {
|
|
21520
|
+
&:after {
|
|
21521
|
+
border-color: ${({
|
|
21522
|
+
theme
|
|
21523
|
+
}) => theme.colors['border/focused']};
|
|
21054
21524
|
}
|
|
21055
|
-
return undefined;
|
|
21056
21525
|
}
|
|
21057
|
-
|
|
21058
|
-
var ContextProvider = REACT_PROVIDER_TYPE;
|
|
21059
|
-
var Element = REACT_ELEMENT_TYPE;
|
|
21060
|
-
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
|
21061
|
-
var Fragment = REACT_FRAGMENT_TYPE;
|
|
21062
|
-
var Lazy = REACT_LAZY_TYPE;
|
|
21063
|
-
var Memo = REACT_MEMO_TYPE;
|
|
21064
|
-
var Portal = REACT_PORTAL_TYPE;
|
|
21065
|
-
var Profiler = REACT_PROFILER_TYPE;
|
|
21066
|
-
var StrictMode = REACT_STRICT_MODE_TYPE;
|
|
21067
|
-
var Suspense = REACT_SUSPENSE_TYPE;
|
|
21068
|
-
var SuspenseList = REACT_SUSPENSE_LIST_TYPE;
|
|
21069
|
-
var hasWarnedAboutDeprecatedIsAsyncMode = false;
|
|
21070
|
-
var hasWarnedAboutDeprecatedIsConcurrentMode = false; // AsyncMode should be deprecated
|
|
21526
|
+
`}
|
|
21071
21527
|
|
|
21072
|
-
|
|
21073
|
-
|
|
21074
|
-
|
|
21075
|
-
|
|
21528
|
+
${props => props.disabled && styled.css`
|
|
21529
|
+
border-color: ${props.theme.colors['border/input']};
|
|
21530
|
+
background-color: ${props.theme.colors['bg/disabled']};
|
|
21531
|
+
color: ${props.theme.colors['text/disabled']};
|
|
21076
21532
|
|
|
21077
|
-
|
|
21078
|
-
|
|
21079
|
-
}
|
|
21080
|
-
return false;
|
|
21533
|
+
textarea::placeholder {
|
|
21534
|
+
color: ${props.theme.colors['text/disabled']};
|
|
21081
21535
|
}
|
|
21082
|
-
function isConcurrentMode(object) {
|
|
21083
|
-
{
|
|
21084
|
-
if (!hasWarnedAboutDeprecatedIsConcurrentMode) {
|
|
21085
|
-
hasWarnedAboutDeprecatedIsConcurrentMode = true; // Using console['warn'] to evade Babel and ESLint
|
|
21086
21536
|
|
|
21087
|
-
|
|
21088
|
-
|
|
21089
|
-
|
|
21090
|
-
return false;
|
|
21091
|
-
}
|
|
21092
|
-
function isContextConsumer(object) {
|
|
21093
|
-
return typeOf(object) === REACT_CONTEXT_TYPE;
|
|
21094
|
-
}
|
|
21095
|
-
function isContextProvider(object) {
|
|
21096
|
-
return typeOf(object) === REACT_PROVIDER_TYPE;
|
|
21097
|
-
}
|
|
21098
|
-
function isElement(object) {
|
|
21099
|
-
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
21100
|
-
}
|
|
21101
|
-
function isForwardRef(object) {
|
|
21102
|
-
return typeOf(object) === REACT_FORWARD_REF_TYPE;
|
|
21103
|
-
}
|
|
21104
|
-
function isFragment(object) {
|
|
21105
|
-
return typeOf(object) === REACT_FRAGMENT_TYPE;
|
|
21106
|
-
}
|
|
21107
|
-
function isLazy(object) {
|
|
21108
|
-
return typeOf(object) === REACT_LAZY_TYPE;
|
|
21109
|
-
}
|
|
21110
|
-
function isMemo(object) {
|
|
21111
|
-
return typeOf(object) === REACT_MEMO_TYPE;
|
|
21112
|
-
}
|
|
21113
|
-
function isPortal(object) {
|
|
21114
|
-
return typeOf(object) === REACT_PORTAL_TYPE;
|
|
21115
|
-
}
|
|
21116
|
-
function isProfiler(object) {
|
|
21117
|
-
return typeOf(object) === REACT_PROFILER_TYPE;
|
|
21118
|
-
}
|
|
21119
|
-
function isStrictMode(object) {
|
|
21120
|
-
return typeOf(object) === REACT_STRICT_MODE_TYPE;
|
|
21121
|
-
}
|
|
21122
|
-
function isSuspense(object) {
|
|
21123
|
-
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
|
21124
|
-
}
|
|
21125
|
-
function isSuspenseList(object) {
|
|
21126
|
-
return typeOf(object) === REACT_SUSPENSE_LIST_TYPE;
|
|
21537
|
+
&,
|
|
21538
|
+
textarea {
|
|
21539
|
+
cursor: not-allowed;
|
|
21127
21540
|
}
|
|
21128
|
-
|
|
21129
|
-
|
|
21130
|
-
|
|
21131
|
-
|
|
21132
|
-
|
|
21133
|
-
|
|
21134
|
-
|
|
21135
|
-
|
|
21136
|
-
|
|
21137
|
-
|
|
21138
|
-
reactIs_development.Suspense = Suspense;
|
|
21139
|
-
reactIs_development.SuspenseList = SuspenseList;
|
|
21140
|
-
reactIs_development.isAsyncMode = isAsyncMode;
|
|
21141
|
-
reactIs_development.isConcurrentMode = isConcurrentMode;
|
|
21142
|
-
reactIs_development.isContextConsumer = isContextConsumer;
|
|
21143
|
-
reactIs_development.isContextProvider = isContextProvider;
|
|
21144
|
-
reactIs_development.isElement = isElement;
|
|
21145
|
-
reactIs_development.isForwardRef = isForwardRef;
|
|
21146
|
-
reactIs_development.isFragment = isFragment;
|
|
21147
|
-
reactIs_development.isLazy = isLazy;
|
|
21148
|
-
reactIs_development.isMemo = isMemo;
|
|
21149
|
-
reactIs_development.isPortal = isPortal;
|
|
21150
|
-
reactIs_development.isProfiler = isProfiler;
|
|
21151
|
-
reactIs_development.isStrictMode = isStrictMode;
|
|
21152
|
-
reactIs_development.isSuspense = isSuspense;
|
|
21153
|
-
reactIs_development.isSuspenseList = isSuspenseList;
|
|
21154
|
-
reactIs_development.isValidElementType = isValidElementType;
|
|
21155
|
-
reactIs_development.typeOf = typeOf;
|
|
21156
|
-
})();
|
|
21157
|
-
}
|
|
21158
|
-
return reactIs_development;
|
|
21159
|
-
}
|
|
21541
|
+
`};
|
|
21542
|
+
`;
|
|
21543
|
+
const UnstyledTextarea = styled__default.default.textarea`
|
|
21544
|
+
font-size: inherit;
|
|
21545
|
+
font-weight: inherit;
|
|
21546
|
+
line-height: inherit;
|
|
21547
|
+
font-family: inherit;
|
|
21548
|
+
border-radius: inherit;
|
|
21549
|
+
color: inherit;
|
|
21550
|
+
transition: inherit;
|
|
21160
21551
|
|
|
21161
|
-
|
|
21162
|
-
|
|
21163
|
-
|
|
21164
|
-
|
|
21165
|
-
|
|
21166
|
-
|
|
21552
|
+
border: 0;
|
|
21553
|
+
background-color: transparent;
|
|
21554
|
+
width: 100%;
|
|
21555
|
+
&:focus {
|
|
21556
|
+
outline: 0;
|
|
21557
|
+
}
|
|
21558
|
+
`;
|
|
21559
|
+
const BaseTextarea = styled__default.default(UnstyledTextarea)`
|
|
21560
|
+
resize: none;
|
|
21561
|
+
`;
|
|
21167
21562
|
|
|
21168
21563
|
const TextInput = /*#__PURE__*/React.forwardRef(({
|
|
21169
21564
|
type = 'text',
|
|
@@ -21802,10 +22197,10 @@ const useOutsideClick = ({
|
|
|
21802
22197
|
};
|
|
21803
22198
|
|
|
21804
22199
|
exports.AnimatePresence = AnimatePresence;
|
|
21805
|
-
exports.Breadcrumbs = index$
|
|
22200
|
+
exports.Breadcrumbs = index$6;
|
|
21806
22201
|
exports.Button = Button;
|
|
21807
22202
|
exports.Chip = Chip;
|
|
21808
|
-
exports.Dialog = index$
|
|
22203
|
+
exports.Dialog = index$5;
|
|
21809
22204
|
exports.DialogHandler = DialogHandler;
|
|
21810
22205
|
exports.EnigmaUI = index;
|
|
21811
22206
|
exports.GradientText = GradientText;
|
|
@@ -21818,6 +22213,8 @@ exports.ItemList = ItemList;
|
|
|
21818
22213
|
exports.MotionView = MotionView;
|
|
21819
22214
|
exports.Overlay = Overlay$1;
|
|
21820
22215
|
exports.OverlayPopper = OverlayPopper;
|
|
22216
|
+
exports.Pagination = index$3;
|
|
22217
|
+
exports.Pill = index$2;
|
|
21821
22218
|
exports.Space = Space;
|
|
21822
22219
|
exports.Spinner = Spinner;
|
|
21823
22220
|
exports.Stack = Stack$1;
|