@teamturing/react-kit 2.13.0 → 2.14.0

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