@7shifts/sous-chef 3.76.0-beta.0 → 3.76.0-beta.10
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.css +279 -208
- package/dist/index.css.map +1 -1
- package/dist/index.js +562 -509
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +720 -669
- package/dist/index.modern.js.map +1 -1
- package/dist/layout/PageLayout/PageLayout.d.ts +2 -1
- package/dist/layout/PageLayout/types.d.ts +3 -3
- package/dist/layout/index.d.ts +3 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -6,7 +6,7 @@ import ReactDOM from 'react-dom';
|
|
|
6
6
|
import 'react-toastify/dist/ReactToastify.css';
|
|
7
7
|
import { debounce } from 'lodash-es';
|
|
8
8
|
import parseTime from 'time-autocomplete/src/core/AMPMParser';
|
|
9
|
-
import { Link as Link$1 } from 'react-router-dom';
|
|
9
|
+
import { Link as Link$1, NavLink } from 'react-router-dom';
|
|
10
10
|
import ReactModal from 'react-modal';
|
|
11
11
|
import { DayPicker } from 'react-day-picker';
|
|
12
12
|
import dateFnsFormat from 'date-fns/format';
|
|
@@ -116,7 +116,7 @@ function _objectWithoutPropertiesLoose(r, e) {
|
|
|
116
116
|
return t;
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
-
var styles$
|
|
119
|
+
var styles$1n = {"flex":"_GFHBy","flex__item":"_TOxU5","flex__item--flexible":"_oppLW","align-center":"_bC2qU","align-end":"_9qCMz","align-start":"_06gN4","justify-center":"_9gxO4","justify-end":"_33FAJ","justify-space-between":"_lg-h2","justify-start":"_xjZcn","inline-flex":"_3yyLA"};
|
|
120
120
|
|
|
121
121
|
const usePositionStyles = ({
|
|
122
122
|
m,
|
|
@@ -232,15 +232,15 @@ const Flex = _ref => {
|
|
|
232
232
|
dataProps
|
|
233
233
|
} = getDataProps(otherProps);
|
|
234
234
|
const positionStyles = usePositionStyles(positionProps);
|
|
235
|
-
const className = classnames(styles$
|
|
236
|
-
[styles$
|
|
237
|
-
[styles$
|
|
238
|
-
[styles$
|
|
239
|
-
[styles$
|
|
240
|
-
[styles$
|
|
241
|
-
[styles$
|
|
242
|
-
[styles$
|
|
243
|
-
[styles$
|
|
235
|
+
const className = classnames(styles$1n['flex'], extraClass, {
|
|
236
|
+
[styles$1n['align-start']]: alignItems === 'flex-start',
|
|
237
|
+
[styles$1n['align-end']]: alignItems === 'flex-end',
|
|
238
|
+
[styles$1n['align-center']]: alignItems === 'center',
|
|
239
|
+
[styles$1n['justify-start']]: justifyContent === 'start',
|
|
240
|
+
[styles$1n['justify-end']]: justifyContent === 'end',
|
|
241
|
+
[styles$1n['justify-center']]: justifyContent === 'center',
|
|
242
|
+
[styles$1n['justify-space-between']]: justifyContent === 'space-between',
|
|
243
|
+
[styles$1n['inline-flex']]: inlineFlex
|
|
244
244
|
});
|
|
245
245
|
const items = React__default.Children.toArray(children).filter(Boolean);
|
|
246
246
|
const gap = typeof space === 'object' ? `${space.row}px ${space.column}px` : space;
|
|
@@ -255,8 +255,8 @@ const Flex = _ref => {
|
|
|
255
255
|
"data-testid": testId
|
|
256
256
|
}, dataProps), items.map((child, i) => React__default.createElement("div", {
|
|
257
257
|
key: i,
|
|
258
|
-
className: classnames(styles$
|
|
259
|
-
[styles$
|
|
258
|
+
className: classnames(styles$1n['flex__item'], {
|
|
259
|
+
[styles$1n['flex__item--flexible']]: flexItems
|
|
260
260
|
}),
|
|
261
261
|
style: {
|
|
262
262
|
flex: flex ? flex[i] || '0 1 auto' : '0 1 auto'
|
|
@@ -279,7 +279,7 @@ const Stack = _ref => {
|
|
|
279
279
|
}));
|
|
280
280
|
};
|
|
281
281
|
|
|
282
|
-
var styles$
|
|
282
|
+
var styles$1m = {"caption":"_tMhXr","label":"_NfOw5","label--truncate":"_M3aFK","toggle":"_QDQZ1","toggle__label":"_52dky","toggle__caption":"_A-tgL","toggle__switch":"_kBjjH"};
|
|
283
283
|
|
|
284
284
|
const _excluded$2W = ["checked", "label", "caption", "onChange", "disabled", "id", "testId"];
|
|
285
285
|
/**
|
|
@@ -304,7 +304,7 @@ const Toggle = _ref => {
|
|
|
304
304
|
return React__default.createElement(Stack, {
|
|
305
305
|
space: 8
|
|
306
306
|
}, React__default.createElement("label", _extends({}, dataProps, {
|
|
307
|
-
className: styles$
|
|
307
|
+
className: styles$1m['toggle']
|
|
308
308
|
}), React__default.createElement("input", {
|
|
309
309
|
type: "checkbox",
|
|
310
310
|
checked: checked,
|
|
@@ -313,11 +313,11 @@ const Toggle = _ref => {
|
|
|
313
313
|
id: id,
|
|
314
314
|
"data-testid": testId
|
|
315
315
|
}), React__default.createElement("span", {
|
|
316
|
-
className: styles$
|
|
316
|
+
className: styles$1m['toggle__switch']
|
|
317
317
|
}), label && React__default.createElement("span", {
|
|
318
|
-
className: styles$
|
|
318
|
+
className: styles$1m['toggle__label']
|
|
319
319
|
}, label)), caption && React__default.createElement("span", {
|
|
320
|
-
className: styles$
|
|
320
|
+
className: styles$1m['toggle__caption']
|
|
321
321
|
}, caption));
|
|
322
322
|
};
|
|
323
323
|
|
|
@@ -335,7 +335,7 @@ const SPINNER_THEMES = {
|
|
|
335
335
|
PRIDE: 'pride'
|
|
336
336
|
};
|
|
337
337
|
|
|
338
|
-
var styles$
|
|
338
|
+
var styles$1l = {"spinner":"_memxT","rotator":"_QieGp","spinner--block":"_VoFzz","path":"_KSRP9","dash":"_RyBY2","path--mint":"_-sIZJ","path--disabled":"_3fox0","path--contrast":"_VteKz","path--pride":"_7rzsv"};
|
|
339
339
|
|
|
340
340
|
const Spinner = ({
|
|
341
341
|
size: _size = 28,
|
|
@@ -345,10 +345,10 @@ const Spinner = ({
|
|
|
345
345
|
}) => {
|
|
346
346
|
return React__default.createElement("div", {
|
|
347
347
|
className: classnames({
|
|
348
|
-
[styles$
|
|
348
|
+
[styles$1l['spinner--block']]: _block
|
|
349
349
|
})
|
|
350
350
|
}, React__default.createElement("svg", {
|
|
351
|
-
className: styles$
|
|
351
|
+
className: styles$1l['spinner'],
|
|
352
352
|
xmlns: "http://www.w3.org/2000/svg",
|
|
353
353
|
width: _size,
|
|
354
354
|
height: _size,
|
|
@@ -423,7 +423,7 @@ const Spinner = ({
|
|
|
423
423
|
offset: "1",
|
|
424
424
|
stopColor: "#760088"
|
|
425
425
|
}))), React__default.createElement("circle", {
|
|
426
|
-
className: classnames(styles$
|
|
426
|
+
className: classnames(styles$1l['path'], styles$1l[`path--${_theme}`]),
|
|
427
427
|
fill: "none",
|
|
428
428
|
strokeWidth: "6",
|
|
429
429
|
strokeLinecap: "round",
|
|
@@ -433,9 +433,9 @@ const Spinner = ({
|
|
|
433
433
|
})));
|
|
434
434
|
};
|
|
435
435
|
|
|
436
|
-
var styles$
|
|
436
|
+
var styles$1k = {"tooltip":"_Ydu2O"};
|
|
437
437
|
|
|
438
|
-
var styles$
|
|
438
|
+
var styles$1j = {"tooltip-overlay":"_7fQon","tooltip-overlay--visible":"_a-BND","tooltip-overlay--black-theme":"_UUdng","tooltip-overlay--white-theme":"_brSNX","tooltip-overlay__header":"_uP8x7","tooltip-overlay-arrow":"_MjV6R","tooltip-overlay-arrow--top":"_TQqwB","tooltip-overlay-arrow--bottom":"_pgdKl","tooltip-overlay-arrow--visible":"_Zob-W","tooltip-overlay-arrow--black-theme":"_FXaBf","tooltip-overlay-arrow--white-theme":"_FyPu8"};
|
|
439
439
|
|
|
440
440
|
const TOOLTIP_THEME = {
|
|
441
441
|
BLACK: 'black',
|
|
@@ -629,24 +629,24 @@ const TooltipOverlay = ({
|
|
|
629
629
|
maxHeight,
|
|
630
630
|
zIndex: getZIndex('tooltip')
|
|
631
631
|
}),
|
|
632
|
-
className: classnames(styles$
|
|
633
|
-
[styles$
|
|
634
|
-
[styles$
|
|
635
|
-
[styles$
|
|
632
|
+
className: classnames(styles$1j['tooltip-overlay'], extraClass, {
|
|
633
|
+
[styles$1j['tooltip-overlay--visible']]: isVisible,
|
|
634
|
+
[styles$1j['tooltip-overlay--black-theme']]: theme === TOOLTIP_THEME.BLACK,
|
|
635
|
+
[styles$1j['tooltip-overlay--white-theme']]: theme === TOOLTIP_THEME.WHITE
|
|
636
636
|
}),
|
|
637
637
|
onMouseEnter: onFocusIn,
|
|
638
638
|
onMouseLeave: onFocusOut
|
|
639
639
|
}, React__default.createElement(Stack, {
|
|
640
640
|
space: 8
|
|
641
641
|
}, header && React__default.createElement("div", {
|
|
642
|
-
className: styles$
|
|
642
|
+
className: styles$1j['tooltip-overlay__header']
|
|
643
643
|
}, header), children)), React__default.createElement("div", {
|
|
644
|
-
className: classnames(styles$
|
|
645
|
-
[styles$
|
|
646
|
-
[styles$
|
|
647
|
-
[styles$
|
|
648
|
-
[styles$
|
|
649
|
-
[styles$
|
|
644
|
+
className: classnames(styles$1j['tooltip-overlay-arrow'], extraClass, {
|
|
645
|
+
[styles$1j['tooltip-overlay-arrow--visible']]: isVisible,
|
|
646
|
+
[styles$1j['tooltip-overlay-arrow--top']]: position.actualPlacement.placement === TOOLTIP_PLACEMENT.TOP,
|
|
647
|
+
[styles$1j['tooltip-overlay-arrow--bottom']]: position.actualPlacement.placement === TOOLTIP_PLACEMENT.BOTTOM,
|
|
648
|
+
[styles$1j['tooltip-overlay-arrow--black-theme']]: theme === TOOLTIP_THEME.BLACK,
|
|
649
|
+
[styles$1j['tooltip-overlay-arrow--white-theme']]: theme === TOOLTIP_THEME.WHITE
|
|
650
650
|
}),
|
|
651
651
|
style: _extends({}, position.arrow, {
|
|
652
652
|
zIndex: getZIndex('tooltip')
|
|
@@ -757,7 +757,7 @@ const TooltipElement = ({
|
|
|
757
757
|
}), overlayElement);
|
|
758
758
|
}
|
|
759
759
|
return React__default.createElement("div", {
|
|
760
|
-
className: classnames(styles$
|
|
760
|
+
className: classnames(styles$1k['tooltip']),
|
|
761
761
|
onMouseEnter: openTooltip,
|
|
762
762
|
onMouseLeave: closeTooltipWithDelay,
|
|
763
763
|
onFocus: openTooltip,
|
|
@@ -767,7 +767,7 @@ const TooltipElement = ({
|
|
|
767
767
|
};
|
|
768
768
|
const Tooltip = forwardRef(TooltipElement);
|
|
769
769
|
|
|
770
|
-
var styles$
|
|
770
|
+
var styles$1i = {"button":"_pgOR3","button--loading":"_2yB9-","button__spinner":"_ppC-S","button--size-min-width-100":"_GtXOQ","button--size-full-width":"_Y-OxO","button--icon-only":"_3EfuT","button--default":"_ICNz7","button--primary":"_XwJWT","button--danger":"_gr3Dh","button--upsell":"_ME8te","button--marketing":"_mI-Dx","button--hollow":"_orywo","button--hollow-contrast":"_obtsl","button--link-contrast":"_00jK4","button--link-primary":"_JPwJ7","button--link-danger":"_9TprN","button--link-upsell":"_tktX-","button--link-toolbar":"_r3SQl","button--link-icon":"_oFBLN","disabled-button-wrapper":"_yTBTz"};
|
|
771
771
|
|
|
772
772
|
const BUTTON_SIZES = {
|
|
773
773
|
FULL_WIDTH: 'full-width',
|
|
@@ -862,24 +862,24 @@ const ButtonComponent = (_ref, ref) => {
|
|
|
862
862
|
onBlur: onBlur,
|
|
863
863
|
onFocus: onFocus,
|
|
864
864
|
onKeyDown: onKeyDown,
|
|
865
|
-
className: classnames(styles$
|
|
866
|
-
[styles$
|
|
867
|
-
[styles$
|
|
868
|
-
[styles$
|
|
869
|
-
[styles$
|
|
870
|
-
[styles$
|
|
871
|
-
[styles$
|
|
872
|
-
[styles$
|
|
873
|
-
[styles$
|
|
874
|
-
[styles$
|
|
875
|
-
[styles$
|
|
876
|
-
[styles$
|
|
877
|
-
[styles$
|
|
878
|
-
[styles$
|
|
879
|
-
[styles$
|
|
880
|
-
[styles$
|
|
881
|
-
[styles$
|
|
882
|
-
[styles$
|
|
865
|
+
className: classnames(styles$1i['button'], {
|
|
866
|
+
[styles$1i['button--default']]: theme === BUTTON_THEMES.DEFAULT,
|
|
867
|
+
[styles$1i['button--primary']]: theme === BUTTON_THEMES.PRIMARY,
|
|
868
|
+
[styles$1i['button--danger']]: theme === BUTTON_THEMES.DANGER,
|
|
869
|
+
[styles$1i['button--upsell']]: theme === BUTTON_THEMES.UPSELL,
|
|
870
|
+
[styles$1i['button--marketing']]: theme === BUTTON_THEMES.MARKETING,
|
|
871
|
+
[styles$1i['button--hollow']]: theme === BUTTON_THEMES.HOLLOW,
|
|
872
|
+
[styles$1i['button--hollow-contrast']]: theme === BUTTON_THEMES.HOLLOW_CONTRAST,
|
|
873
|
+
[styles$1i['button--link-primary']]: theme === BUTTON_THEMES.LINK_PRIMARY,
|
|
874
|
+
[styles$1i['button--link-danger']]: theme === BUTTON_THEMES.LINK_DANGER,
|
|
875
|
+
[styles$1i['button--link-upsell']]: theme === BUTTON_THEMES.LINK_UPSELL,
|
|
876
|
+
[styles$1i['button--link-toolbar']]: theme === BUTTON_THEMES.LINK_TOOLBAR,
|
|
877
|
+
[styles$1i['button--link-contrast']]: theme === BUTTON_THEMES.LINK_CONTRAST,
|
|
878
|
+
[styles$1i['button--link-icon']]: theme === BUTTON_THEMES.LINK_ICON,
|
|
879
|
+
[styles$1i['button--loading']]: loading,
|
|
880
|
+
[styles$1i['button--icon-only']]: isIconOnly,
|
|
881
|
+
[styles$1i['button--size-min-width-100']]: size === BUTTON_SIZES.MIN_WIDTH_100,
|
|
882
|
+
[styles$1i['button--size-full-width']]: size === BUTTON_SIZES.FULL_WIDTH
|
|
883
883
|
}),
|
|
884
884
|
type: type,
|
|
885
885
|
disabled: disabled || loading,
|
|
@@ -893,7 +893,7 @@ const ButtonComponent = (_ref, ref) => {
|
|
|
893
893
|
space: 8,
|
|
894
894
|
alignItems: "center"
|
|
895
895
|
}, children), loading && React__default.createElement("div", {
|
|
896
|
-
className: styles$
|
|
896
|
+
className: styles$1i['button__spinner']
|
|
897
897
|
}, React__default.createElement(Spinner, {
|
|
898
898
|
theme: contrastSpinner.includes(theme) ? SPINNER_THEMES.CONTRAST : SPINNER_THEMES.DISABLED
|
|
899
899
|
})));
|
|
@@ -903,7 +903,7 @@ const ButtonComponent = (_ref, ref) => {
|
|
|
903
903
|
overlay: title,
|
|
904
904
|
ref: ref
|
|
905
905
|
}, title && disabled ? React__default.createElement("div", {
|
|
906
|
-
className: styles$
|
|
906
|
+
className: styles$1i['disabled-button-wrapper']
|
|
907
907
|
}, ButtonElementResult) : ButtonElementResult)
|
|
908
908
|
);
|
|
909
909
|
};
|
|
@@ -6138,20 +6138,20 @@ const IconWrench = forwardRef((_ref, ref) => {
|
|
|
6138
6138
|
});
|
|
6139
6139
|
IconWrench.displayName = 'IconWrench';
|
|
6140
6140
|
|
|
6141
|
-
var styles$
|
|
6141
|
+
var styles$1h = {"pagination-controls":"_S1co-"};
|
|
6142
6142
|
|
|
6143
|
-
var styles$
|
|
6143
|
+
var styles$1g = {"keyboard-key":"_sgd9a","keyboard-key--light":"_8zg4j","keyboard-key__character":"_GAIig"};
|
|
6144
6144
|
|
|
6145
6145
|
const KeyboardKey = ({
|
|
6146
6146
|
children,
|
|
6147
6147
|
theme: _theme = 'dark'
|
|
6148
6148
|
}) => {
|
|
6149
6149
|
return React__default.createElement("span", {
|
|
6150
|
-
className: classnames(styles$
|
|
6151
|
-
[styles$
|
|
6150
|
+
className: classnames(styles$1g['keyboard-key'], {
|
|
6151
|
+
[styles$1g['keyboard-key--light']]: _theme === 'light'
|
|
6152
6152
|
})
|
|
6153
6153
|
}, React__default.createElement("span", {
|
|
6154
|
-
className: styles$
|
|
6154
|
+
className: styles$1g['keyboard-key__character']
|
|
6155
6155
|
}, children));
|
|
6156
6156
|
};
|
|
6157
6157
|
|
|
@@ -6346,7 +6346,7 @@ const PaginationControls = _ref => {
|
|
|
6346
6346
|
}
|
|
6347
6347
|
});
|
|
6348
6348
|
return React__default.createElement("div", _extends({}, dataProps, {
|
|
6349
|
-
className: styles$
|
|
6349
|
+
className: styles$1h['pagination-controls'],
|
|
6350
6350
|
"data-testid": testId
|
|
6351
6351
|
}), React__default.createElement(Button, {
|
|
6352
6352
|
disabled: !hasPrevious,
|
|
@@ -6376,7 +6376,7 @@ const LINK_TARGET = {
|
|
|
6376
6376
|
BLANK: '_blank'
|
|
6377
6377
|
};
|
|
6378
6378
|
|
|
6379
|
-
var styles$
|
|
6379
|
+
var styles$1f = {"link":"_EiQ4c"};
|
|
6380
6380
|
|
|
6381
6381
|
const _excluded$q = ["href", "target", "theme", "onClick", "children"];
|
|
6382
6382
|
const Link = _ref => {
|
|
@@ -6392,9 +6392,9 @@ const Link = _ref => {
|
|
|
6392
6392
|
dataProps
|
|
6393
6393
|
} = getDataProps(otherProps);
|
|
6394
6394
|
return React__default.createElement("a", _extends({}, dataProps, {
|
|
6395
|
-
className: classnames(styles$
|
|
6396
|
-
[styles$
|
|
6397
|
-
[styles$
|
|
6395
|
+
className: classnames(styles$1f['link'], {
|
|
6396
|
+
[styles$1f['link--primary']]: theme === LINK_THEME.PRIMARY,
|
|
6397
|
+
[styles$1f['link--contrast']]: theme === LINK_THEME.CONTRAST
|
|
6398
6398
|
}),
|
|
6399
6399
|
href: href,
|
|
6400
6400
|
target: target,
|
|
@@ -6409,15 +6409,15 @@ const TOAST_THEME = {
|
|
|
6409
6409
|
};
|
|
6410
6410
|
const TOAST_CONTAINER_ID = 'sous-chef-toast';
|
|
6411
6411
|
|
|
6412
|
-
var styles$
|
|
6412
|
+
var styles$1e = {"toast":"_iSC5P","toast--danger":"_OWpOG","toast__text":"_4JJwF"};
|
|
6413
6413
|
|
|
6414
6414
|
const toast = (text, theme = TOAST_THEME.DEFAULT, options = {}) => {
|
|
6415
6415
|
if (typeof text !== 'string') {
|
|
6416
6416
|
return;
|
|
6417
6417
|
}
|
|
6418
6418
|
toast$1(text, _extends({
|
|
6419
|
-
className: classnames(styles$
|
|
6420
|
-
[styles$
|
|
6419
|
+
className: classnames(styles$1e['toast'], {
|
|
6420
|
+
[styles$1e['toast--danger']]: theme === TOAST_THEME.DANGER
|
|
6421
6421
|
}),
|
|
6422
6422
|
containerId: TOAST_CONTAINER_ID
|
|
6423
6423
|
}, options));
|
|
@@ -6431,7 +6431,7 @@ const CloseButton = ({
|
|
|
6431
6431
|
const ToastContainer = ({
|
|
6432
6432
|
containerId: _containerId = TOAST_CONTAINER_ID
|
|
6433
6433
|
}) => React__default.createElement(ToastContainer$1, {
|
|
6434
|
-
bodyClassName: styles$
|
|
6434
|
+
bodyClassName: styles$1e['toast__text'],
|
|
6435
6435
|
hideProgressBar: true,
|
|
6436
6436
|
draggable: false,
|
|
6437
6437
|
transition: Slide,
|
|
@@ -6479,7 +6479,7 @@ const SousChefProvider = ({
|
|
|
6479
6479
|
}, React__default.createElement(ToastContainer, null), children));
|
|
6480
6480
|
};
|
|
6481
6481
|
|
|
6482
|
-
var styles$
|
|
6482
|
+
var styles$1d = {"data-table-header":"_F4U3o","data-table-header__item":"_KKljd","data-table-header__item--sortable":"_oKH7a","data-table-header__itemfocus":"_xrDya","data-table-header__item--action":"_RLGaD","data-table-header__item-content":"_3p3fm","data-table-header__item-content--right-align":"_rXid3","data-table-header__sort-icon":"_-xiIl"};
|
|
6483
6483
|
|
|
6484
6484
|
const SORT_ORDER = {
|
|
6485
6485
|
ASC: 'asc',
|
|
@@ -6668,15 +6668,15 @@ const DataTableHeader = ({
|
|
|
6668
6668
|
},
|
|
6669
6669
|
id: `${tableId}-header`
|
|
6670
6670
|
}, React__default.createElement("tr", {
|
|
6671
|
-
className: styles$
|
|
6671
|
+
className: styles$1d['data-table-header']
|
|
6672
6672
|
}, columns.filter(column => !column.hidden).map(column => {
|
|
6673
6673
|
const isSortable = column.isSortable;
|
|
6674
6674
|
const sortDir = column.currentSort;
|
|
6675
6675
|
const isRightAligned = column.isRightAligned;
|
|
6676
6676
|
return React__default.createElement("th", {
|
|
6677
6677
|
className: classnames({
|
|
6678
|
-
[styles$
|
|
6679
|
-
[styles$
|
|
6678
|
+
[styles$1d['data-table-header__item']]: true,
|
|
6679
|
+
[styles$1d['data-table-header__item--sortable']]: isSortable
|
|
6680
6680
|
}),
|
|
6681
6681
|
style: {
|
|
6682
6682
|
flex: column.size || 1,
|
|
@@ -6688,22 +6688,22 @@ const DataTableHeader = ({
|
|
|
6688
6688
|
role: "columnheader",
|
|
6689
6689
|
tabIndex: 0
|
|
6690
6690
|
}, React__default.createElement("div", {
|
|
6691
|
-
className: classnames(styles$
|
|
6692
|
-
[styles$
|
|
6691
|
+
className: classnames(styles$1d['data-table-header__item-content'], {
|
|
6692
|
+
[styles$1d['data-table-header__item-content--right-align']]: isRightAligned
|
|
6693
6693
|
})
|
|
6694
6694
|
}, column.label, ' ', isSortable && React__default.createElement("span", {
|
|
6695
|
-
className: styles$
|
|
6695
|
+
className: styles$1d['data-table-header__sort-icon']
|
|
6696
6696
|
}, React__default.createElement(HeaderSortIcon, {
|
|
6697
6697
|
sortDirection: sortDir
|
|
6698
6698
|
}))));
|
|
6699
6699
|
}), showActionMenu && React__default.createElement("th", {
|
|
6700
|
-
className: classnames(styles$
|
|
6700
|
+
className: classnames(styles$1d['data-table-header__item'], styles$1d['data-table-header__item--action'])
|
|
6701
6701
|
}))));
|
|
6702
6702
|
};
|
|
6703
6703
|
|
|
6704
|
-
var styles$
|
|
6704
|
+
var styles$1c = {"data-table":"_zEfoA","data-table__content":"_v-WNu","data-table__content--with-scroll":"_xI2-r","data-table__background-loading":"_ED7Nm","data-table__table":"_fnq34","data-table__table--no-columns":"_qSrJq","data-table__body":"_1SNLz","data-table__body--no-bottom-radius":"_zCIMD","data-table__footer":"_mp1Ok","data-table__pagination-controls":"_vdEZz"};
|
|
6705
6705
|
|
|
6706
|
-
var styles$
|
|
6706
|
+
var styles$1b = {"data-table-scroll-fake-border":"_wZ8Xg","data-table-scroll-fake-border--fixed-scroll":"_C5CU0","data-table-scroll-fake-border--top":"_L5fRB","data-table-scroll-fake-border--bottom":"_omhE4","data-table-scroll-fake-border__left":"_mpDFy","data-table-scroll-fake-border__left--top":"_G3b-p","data-table-scroll-fake-border__left--bottom":"_YUMxZ","data-table-scroll-fake-border__right":"_xUVcY","data-table-scroll-fake-border__right--top":"_BE0hn","data-table-scroll-fake-border__right--bottom":"_UtFdB"};
|
|
6707
6707
|
|
|
6708
6708
|
const useTableHeaderHeight = isShowingColumns => {
|
|
6709
6709
|
const {
|
|
@@ -6755,10 +6755,10 @@ const DataTableScrollFakeBorder = ({
|
|
|
6755
6755
|
const hasFixedScroll = useDetectFixedScroll();
|
|
6756
6756
|
const backgroundColor = useBackgroundColor();
|
|
6757
6757
|
return React__default.createElement("div", {
|
|
6758
|
-
className: classnames(styles$
|
|
6759
|
-
[styles$
|
|
6760
|
-
[styles$
|
|
6761
|
-
[styles$
|
|
6758
|
+
className: classnames(styles$1b['data-table-scroll-fake-border'], {
|
|
6759
|
+
[styles$1b['data-table-scroll-fake-border--top']]: placement === 'top',
|
|
6760
|
+
[styles$1b['data-table-scroll-fake-border--bottom']]: placement === 'bottom',
|
|
6761
|
+
[styles$1b['data-table-scroll-fake-border--fixed-scroll']]: hasFixedScroll
|
|
6762
6762
|
}),
|
|
6763
6763
|
style: {
|
|
6764
6764
|
// @ts-expect-error This difines a custom CSS variable
|
|
@@ -6766,14 +6766,14 @@ const DataTableScrollFakeBorder = ({
|
|
|
6766
6766
|
top: placement === 'top' ? headerHeight : undefined
|
|
6767
6767
|
}
|
|
6768
6768
|
}, React__default.createElement("div", {
|
|
6769
|
-
className: classnames(styles$
|
|
6770
|
-
[styles$
|
|
6771
|
-
[styles$
|
|
6769
|
+
className: classnames(styles$1b['data-table-scroll-fake-border__left'], {
|
|
6770
|
+
[styles$1b['data-table-scroll-fake-border__left--top']]: placement === 'top',
|
|
6771
|
+
[styles$1b['data-table-scroll-fake-border__left--bottom']]: placement === 'bottom'
|
|
6772
6772
|
})
|
|
6773
6773
|
}), React__default.createElement("div", {
|
|
6774
|
-
className: classnames(styles$
|
|
6775
|
-
[styles$
|
|
6776
|
-
[styles$
|
|
6774
|
+
className: classnames(styles$1b['data-table-scroll-fake-border__right'], {
|
|
6775
|
+
[styles$1b['data-table-scroll-fake-border__right--top']]: placement === 'top',
|
|
6776
|
+
[styles$1b['data-table-scroll-fake-border__right--bottom']]: placement === 'bottom'
|
|
6777
6777
|
}),
|
|
6778
6778
|
"data-background-color": "red"
|
|
6779
6779
|
}));
|
|
@@ -6791,7 +6791,7 @@ const BUTTON_THEME = {
|
|
|
6791
6791
|
UPSELL: 'upsell'
|
|
6792
6792
|
};
|
|
6793
6793
|
|
|
6794
|
-
var styles$
|
|
6794
|
+
var styles$1a = {"banner":"_omAUf","banner__title":"_8xIYW","banner__body":"_oA2J6","banner__body--multilineCTA":"_PLG8Z","banner--info":"_CRmFE","banner__icon":"_T80if","banner--success":"_PgpTw","banner--danger":"_O-lNW","banner--warning":"_fICdJ","banner--upsell":"_kUB2k","banner__close":"_P6nbA","banner--single-line":"_w-zAz"};
|
|
6795
6795
|
|
|
6796
6796
|
/** Infers theme prop for Sous Chef Button CTAs if not explicitly passed, default is hollow, primaryCTA is Upsell if banner theme is Upsell*/
|
|
6797
6797
|
const ButtonCTA = ({
|
|
@@ -6812,7 +6812,7 @@ const ButtonCTA = ({
|
|
|
6812
6812
|
}, button.props));
|
|
6813
6813
|
};
|
|
6814
6814
|
|
|
6815
|
-
var styles$
|
|
6815
|
+
var styles$19 = {"banner__caption":"_S--Ce"};
|
|
6816
6816
|
|
|
6817
6817
|
const InlineBannerCTA = ({
|
|
6818
6818
|
primaryButton,
|
|
@@ -6844,7 +6844,7 @@ const InlineBannerCTA = ({
|
|
|
6844
6844
|
bannerTheme: bannerTheme,
|
|
6845
6845
|
primaryCTA: true
|
|
6846
6846
|
})), caption && multiLine && React__default.createElement("div", {
|
|
6847
|
-
className: styles$
|
|
6847
|
+
className: styles$19['banner__caption']
|
|
6848
6848
|
}, caption));
|
|
6849
6849
|
};
|
|
6850
6850
|
|
|
@@ -6884,13 +6884,13 @@ const InlineBanner = _ref => {
|
|
|
6884
6884
|
const Layout = multiLine ? Stack : Inline;
|
|
6885
6885
|
return React__default.createElement("div", {
|
|
6886
6886
|
"data-testid": testId,
|
|
6887
|
-
className: classnames(styles$
|
|
6888
|
-
[styles$
|
|
6889
|
-
[styles$
|
|
6890
|
-
[styles$
|
|
6891
|
-
[styles$
|
|
6892
|
-
[styles$
|
|
6893
|
-
[styles$
|
|
6887
|
+
className: classnames(styles$1a['banner'], {
|
|
6888
|
+
[styles$1a['banner--info']]: theme === BANNER_THEME.INFO,
|
|
6889
|
+
[styles$1a['banner--warning']]: theme === BANNER_THEME.WARNING,
|
|
6890
|
+
[styles$1a['banner--success']]: theme === BANNER_THEME.SUCCESS,
|
|
6891
|
+
[styles$1a['banner--danger']]: theme === BANNER_THEME.DANGER,
|
|
6892
|
+
[styles$1a['banner--upsell']]: theme === BANNER_THEME.UPSELL,
|
|
6893
|
+
[styles$1a['banner--single-line']]: !multiLine
|
|
6894
6894
|
}),
|
|
6895
6895
|
style: positionStyles
|
|
6896
6896
|
}, React__default.createElement(Inline, {
|
|
@@ -6898,7 +6898,7 @@ const InlineBanner = _ref => {
|
|
|
6898
6898
|
flex: ['0 1 auto', 1],
|
|
6899
6899
|
space: 12
|
|
6900
6900
|
}, React__default.createElement("div", {
|
|
6901
|
-
className: styles$
|
|
6901
|
+
className: styles$1a['banner__icon']
|
|
6902
6902
|
}, React__default.createElement(InlineBannerIcon, {
|
|
6903
6903
|
theme: theme
|
|
6904
6904
|
})), React__default.createElement(Layout, {
|
|
@@ -6908,10 +6908,10 @@ const InlineBanner = _ref => {
|
|
|
6908
6908
|
flex: ['min-content'],
|
|
6909
6909
|
flexWrap: multiLine ? undefined : 'wrap'
|
|
6910
6910
|
}, title && React__default.createElement("div", {
|
|
6911
|
-
className: styles$
|
|
6911
|
+
className: styles$1a['banner__title']
|
|
6912
6912
|
}, title), React__default.createElement("div", {
|
|
6913
|
-
className: classnames(styles$
|
|
6914
|
-
[styles$
|
|
6913
|
+
className: classnames(styles$1a['banner__body'], {
|
|
6914
|
+
[styles$1a['banner__body--multilineCTA']]: primaryButton && multiLine
|
|
6915
6915
|
})
|
|
6916
6916
|
}, children), primaryButton && React__default.createElement(InlineBannerCTA, {
|
|
6917
6917
|
primaryButton: primaryButton,
|
|
@@ -6920,7 +6920,7 @@ const InlineBanner = _ref => {
|
|
|
6920
6920
|
multiLine: multiLine,
|
|
6921
6921
|
bannerTheme: theme
|
|
6922
6922
|
})), dismissable && React__default.createElement("div", {
|
|
6923
|
-
className: styles$
|
|
6923
|
+
className: styles$1a['banner__close']
|
|
6924
6924
|
}, React__default.createElement(Button, {
|
|
6925
6925
|
theme: "link-icon",
|
|
6926
6926
|
type: "button",
|
|
@@ -6940,7 +6940,7 @@ const DropdownContext = React__default.createContext({
|
|
|
6940
6940
|
});
|
|
6941
6941
|
const useDropdownContext = () => React__default.useContext(DropdownContext);
|
|
6942
6942
|
|
|
6943
|
-
var styles$
|
|
6943
|
+
var styles$18 = {"dropdown-pane":"_sp-pT"};
|
|
6944
6944
|
|
|
6945
6945
|
const DROPDOWN_PANE_PADDING = 14;
|
|
6946
6946
|
const calculateOverlayPosition = (triggerPosition, triggerOffsetHeight, panePosition, alignment) => {
|
|
@@ -7076,8 +7076,8 @@ const PaneOverlay = ({
|
|
|
7076
7076
|
useKeyPress(['Escape'], onToggleDropdown);
|
|
7077
7077
|
const overflow = maxHeight ? 'auto' : undefined;
|
|
7078
7078
|
return React__default.createElement("div", {
|
|
7079
|
-
className: classnames(styles$
|
|
7080
|
-
[styles$
|
|
7079
|
+
className: classnames(styles$18['dropdown-pane'], {
|
|
7080
|
+
[styles$18['dropdown-pane--with-padding']]: true
|
|
7081
7081
|
}),
|
|
7082
7082
|
style: _extends({}, position, {
|
|
7083
7083
|
width,
|
|
@@ -7107,7 +7107,7 @@ const getKeyboardFocusableElements = element => {
|
|
|
7107
7107
|
});
|
|
7108
7108
|
};
|
|
7109
7109
|
|
|
7110
|
-
var styles$
|
|
7110
|
+
var styles$17 = {"dropdown__trigger":"_AktVc"};
|
|
7111
7111
|
|
|
7112
7112
|
const DROPDOWN_ALIGNEMNT = {
|
|
7113
7113
|
LEFT: 'left',
|
|
@@ -7118,7 +7118,7 @@ const DROPDOWN_TRIGGER = {
|
|
|
7118
7118
|
CLICK: 'click'
|
|
7119
7119
|
};
|
|
7120
7120
|
|
|
7121
|
-
var styles$
|
|
7121
|
+
var styles$16 = {"label":"_zv4ua","label--truncate":"_FPyID"};
|
|
7122
7122
|
|
|
7123
7123
|
const isEllipsisActive = e => {
|
|
7124
7124
|
return e.offsetWidth < e.scrollWidth;
|
|
@@ -7167,8 +7167,8 @@ const Label = ({
|
|
|
7167
7167
|
const LabelElement = React__default.createElement("label", {
|
|
7168
7168
|
htmlFor: htmlFor,
|
|
7169
7169
|
id: labelId,
|
|
7170
|
-
className: classnames(styles$
|
|
7171
|
-
[styles$
|
|
7170
|
+
className: classnames(styles$16['label'], {
|
|
7171
|
+
[styles$16['label--truncate']]: shouldTruncate
|
|
7172
7172
|
})
|
|
7173
7173
|
}, children);
|
|
7174
7174
|
if (showTooltip) {
|
|
@@ -7180,7 +7180,7 @@ const Label = ({
|
|
|
7180
7180
|
return LabelElement;
|
|
7181
7181
|
};
|
|
7182
7182
|
|
|
7183
|
-
var styles$
|
|
7183
|
+
var styles$15 = {"caption":"_Qrxg5"};
|
|
7184
7184
|
|
|
7185
7185
|
const Caption = ({
|
|
7186
7186
|
fieldId,
|
|
@@ -7188,11 +7188,11 @@ const Caption = ({
|
|
|
7188
7188
|
}) => {
|
|
7189
7189
|
return React__default.createElement("div", {
|
|
7190
7190
|
id: fieldId && `${fieldId}-describer`,
|
|
7191
|
-
className: styles$
|
|
7191
|
+
className: styles$15['caption']
|
|
7192
7192
|
}, children);
|
|
7193
7193
|
};
|
|
7194
7194
|
|
|
7195
|
-
var styles$
|
|
7195
|
+
var styles$14 = {"error-message":"_eS4YO"};
|
|
7196
7196
|
|
|
7197
7197
|
const ErrorMessage = ({
|
|
7198
7198
|
fieldId,
|
|
@@ -7201,7 +7201,7 @@ const ErrorMessage = ({
|
|
|
7201
7201
|
}) => {
|
|
7202
7202
|
return React__default.createElement("div", {
|
|
7203
7203
|
id: fieldId && `${fieldId}-error-message`,
|
|
7204
|
-
className: styles$
|
|
7204
|
+
className: styles$14['error-message'],
|
|
7205
7205
|
"data-testid": testId
|
|
7206
7206
|
}, React__default.createElement(Inline, {
|
|
7207
7207
|
space: 8,
|
|
@@ -7238,7 +7238,7 @@ const ALIGNMENTS = {
|
|
|
7238
7238
|
JUSTIFY: 'justify'
|
|
7239
7239
|
};
|
|
7240
7240
|
|
|
7241
|
-
var styles$
|
|
7241
|
+
var styles$13 = {"text":"_6SgoN","text__body":"_SF95f","text__caption":"_HHohB","text__insight":"_xdhK0","text__span":"_yZbuO","text--bold":"_i2LHD","text--italic":"_NgSTT","text--underline":"_ouqVK","text--dotted-underline":"_zZ55-","text--monospace":"_Vi-V1","text--line-through":"_psV6T","text--align-left":"_tfSIf","text--align-right":"_AK1Nr","text--align-center":"_N-tR4","text--align-justify":"_LkMr0"};
|
|
7242
7242
|
|
|
7243
7243
|
const _excluded$o = ["children", "as", "emphasis", "alignment", "color", "testId", "textWrap"];
|
|
7244
7244
|
const TextComponent = (_ref, ref) => {
|
|
@@ -7265,21 +7265,21 @@ const TextComponent = (_ref, ref) => {
|
|
|
7265
7265
|
color: getColor(color),
|
|
7266
7266
|
textWrap
|
|
7267
7267
|
}, positionStyles),
|
|
7268
|
-
className: classnames(styles$
|
|
7269
|
-
[styles$
|
|
7270
|
-
[styles$
|
|
7271
|
-
[styles$
|
|
7272
|
-
[styles$
|
|
7273
|
-
[styles$
|
|
7274
|
-
[styles$
|
|
7275
|
-
[styles$
|
|
7276
|
-
[styles$
|
|
7277
|
-
[styles$
|
|
7278
|
-
[styles$
|
|
7279
|
-
[styles$
|
|
7280
|
-
[styles$
|
|
7281
|
-
[styles$
|
|
7282
|
-
[styles$
|
|
7268
|
+
className: classnames(styles$13['text'], {
|
|
7269
|
+
[styles$13['text--bold']]: emphasis == null ? void 0 : emphasis.includes(FONT_EMPHASIS.BOLD),
|
|
7270
|
+
[styles$13['text--italic']]: emphasis == null ? void 0 : emphasis.includes(FONT_EMPHASIS.ITALIC),
|
|
7271
|
+
[styles$13['text--underline']]: emphasis == null ? void 0 : emphasis.includes(FONT_EMPHASIS.UNDERLINE),
|
|
7272
|
+
[styles$13['text--dotted-underline']]: emphasis == null ? void 0 : emphasis.includes(FONT_EMPHASIS.DOTTED_UNDERLINE),
|
|
7273
|
+
[styles$13['text--monospace']]: emphasis == null ? void 0 : emphasis.includes(FONT_EMPHASIS.MONOSPACE),
|
|
7274
|
+
[styles$13['text--line-through']]: emphasis == null ? void 0 : emphasis.includes(FONT_EMPHASIS.STRIKETHROUGH),
|
|
7275
|
+
[styles$13['text--align-left']]: alignment === ALIGNMENTS.LEFT,
|
|
7276
|
+
[styles$13['text--align-right']]: alignment === ALIGNMENTS.RIGHT,
|
|
7277
|
+
[styles$13['text--align-center']]: alignment === ALIGNMENTS.CENTER,
|
|
7278
|
+
[styles$13['text--align-justify']]: alignment === ALIGNMENTS.JUSTIFY,
|
|
7279
|
+
[styles$13['text__body']]: as === TEXT_TYPES.BODY,
|
|
7280
|
+
[styles$13['text__insight']]: as === TEXT_TYPES.INSIGHT,
|
|
7281
|
+
[styles$13['text__caption']]: as === TEXT_TYPES.CAPTION,
|
|
7282
|
+
[styles$13['text__span']]: as === TEXT_TYPES.SPAN
|
|
7283
7283
|
}),
|
|
7284
7284
|
'data-testid': testId
|
|
7285
7285
|
}, dataProps, {
|
|
@@ -7296,7 +7296,7 @@ const Bold = ({
|
|
|
7296
7296
|
children
|
|
7297
7297
|
}) => {
|
|
7298
7298
|
return React__default.createElement("span", {
|
|
7299
|
-
className: classnames(styles$
|
|
7299
|
+
className: classnames(styles$13['text--bold'], styles$13['text'])
|
|
7300
7300
|
}, children);
|
|
7301
7301
|
};
|
|
7302
7302
|
|
|
@@ -7304,7 +7304,7 @@ const Underline = ({
|
|
|
7304
7304
|
children
|
|
7305
7305
|
}) => {
|
|
7306
7306
|
return React__default.createElement("span", {
|
|
7307
|
-
className: classnames(styles$
|
|
7307
|
+
className: classnames(styles$13['text--underline'], styles$13['text'])
|
|
7308
7308
|
}, children);
|
|
7309
7309
|
};
|
|
7310
7310
|
|
|
@@ -7312,7 +7312,7 @@ const Italic = ({
|
|
|
7312
7312
|
children
|
|
7313
7313
|
}) => {
|
|
7314
7314
|
return React__default.createElement("span", {
|
|
7315
|
-
className: classnames(styles$
|
|
7315
|
+
className: classnames(styles$13['text--italic'], styles$13['text'])
|
|
7316
7316
|
}, children);
|
|
7317
7317
|
};
|
|
7318
7318
|
|
|
@@ -7449,7 +7449,7 @@ const useFieldControllers = ({
|
|
|
7449
7449
|
return controllers;
|
|
7450
7450
|
};
|
|
7451
7451
|
|
|
7452
|
-
var styles$
|
|
7452
|
+
var styles$12 = {"text-field":"_G6LsE","text-field--invalid":"_2ZYtt","text-field--prefixed":"_rWp7H","text-field--suffixed":"_Xq8xX"};
|
|
7453
7453
|
|
|
7454
7454
|
const _excluded$m = ["autoComplete", "autoFocus", "defaultValue", "disabled", "error", "id", "maxLength", "name", "caption", "label", "onBlur", "onChange", "onFocus", "onKeyDown", "placeholder", "value", "ref", "testId"];
|
|
7455
7455
|
const useTextField = _ref => {
|
|
@@ -7490,8 +7490,8 @@ const useTextField = _ref => {
|
|
|
7490
7490
|
'aria-invalid': hasError,
|
|
7491
7491
|
autoComplete,
|
|
7492
7492
|
autoFocus,
|
|
7493
|
-
className: classnames(styles$
|
|
7494
|
-
[styles$
|
|
7493
|
+
className: classnames(styles$12['text-field'], {
|
|
7494
|
+
[styles$12['text-field--invalid']]: hasError
|
|
7495
7495
|
}),
|
|
7496
7496
|
'data-testid': testId,
|
|
7497
7497
|
disabled,
|
|
@@ -7522,7 +7522,7 @@ const useTextField = _ref => {
|
|
|
7522
7522
|
};
|
|
7523
7523
|
};
|
|
7524
7524
|
|
|
7525
|
-
var styles
|
|
7525
|
+
var styles$11 = {"affix-container":"_F8QOB","affix-container--prefixed":"_vU4SU","affix-container--suffixed":"_4rDXi","prefix":"_yPPIy","suffix":"_Y3yFd"};
|
|
7526
7526
|
|
|
7527
7527
|
const AffixContainer = ({
|
|
7528
7528
|
prefix,
|
|
@@ -7557,19 +7557,19 @@ const AffixContainer = ({
|
|
|
7557
7557
|
if (!hasPrefix && !hasSuffix) {
|
|
7558
7558
|
return children;
|
|
7559
7559
|
}
|
|
7560
|
-
const classes = classnames(styles
|
|
7561
|
-
[styles
|
|
7562
|
-
[styles
|
|
7560
|
+
const classes = classnames(styles$11['affix-container'], {
|
|
7561
|
+
[styles$11['affix-container--prefixed']]: hasPrefix,
|
|
7562
|
+
[styles$11['affix-container--suffixed']]: hasSuffix
|
|
7563
7563
|
});
|
|
7564
7564
|
return React__default.createElement("div", {
|
|
7565
7565
|
className: classes,
|
|
7566
7566
|
ref: container,
|
|
7567
7567
|
"data-testid": testId
|
|
7568
7568
|
}, hasPrefix && React__default.createElement("div", {
|
|
7569
|
-
className: styles
|
|
7569
|
+
className: styles$11['prefix'],
|
|
7570
7570
|
ref: prefixElement
|
|
7571
7571
|
}, prefix), children, hasSuffix && React__default.createElement("div", {
|
|
7572
|
-
className: styles
|
|
7572
|
+
className: styles$11['suffix'],
|
|
7573
7573
|
ref: suffixElement
|
|
7574
7574
|
}, suffix));
|
|
7575
7575
|
};
|
|
@@ -7771,7 +7771,7 @@ const Dropdown = ({
|
|
|
7771
7771
|
paneRef
|
|
7772
7772
|
}
|
|
7773
7773
|
}, triggerIsKnownButton ? React__default.cloneElement(trigger, _extends({}, trigger.props, triggerProps)) : React__default.createElement("button", _extends({}, triggerProps, {
|
|
7774
|
-
className: styles$
|
|
7774
|
+
className: styles$17['dropdown__trigger'],
|
|
7775
7775
|
ref: updatedRef,
|
|
7776
7776
|
onFocus: handleFocus
|
|
7777
7777
|
}), trigger), React__default.createElement(DropdownPane, {
|
|
@@ -7785,7 +7785,7 @@ const Dropdown = ({
|
|
|
7785
7785
|
}, children));
|
|
7786
7786
|
};
|
|
7787
7787
|
|
|
7788
|
-
var styles$
|
|
7788
|
+
var styles$10 = {"dropdown-list":"_91hvH","dropdown-list__item--hover":"_aMs9c"};
|
|
7789
7789
|
|
|
7790
7790
|
const findNextActiveIndex = (items, startAt) => {
|
|
7791
7791
|
let startIndex = 0;
|
|
@@ -7885,18 +7885,18 @@ const checkIsComponent = (element, config) => {
|
|
|
7885
7885
|
return isComponent;
|
|
7886
7886
|
};
|
|
7887
7887
|
|
|
7888
|
-
var styles
|
|
7888
|
+
var styles$$ = {"dropdown-list-divider":"_ISJ4M"};
|
|
7889
7889
|
|
|
7890
7890
|
const DropdownListDivider = ({
|
|
7891
7891
|
testId
|
|
7892
7892
|
}) => {
|
|
7893
7893
|
return React__default.createElement("div", {
|
|
7894
|
-
className: styles
|
|
7894
|
+
className: styles$$['dropdown-list-divider'],
|
|
7895
7895
|
"data-testid": testId
|
|
7896
7896
|
});
|
|
7897
7897
|
};
|
|
7898
7898
|
|
|
7899
|
-
var styles$
|
|
7899
|
+
var styles$_ = {"dropdown-list-item":"_W12mF","dropdown-list-item--selected":"_Zu9cD","dropdown-list-item__content":"_xS6fS","dropdown-list-item--disabled":"_0OB5b","dropdown-list-item__container":"_IBrNj","dropdown-list-item__link":"_vC0uY"};
|
|
7900
7900
|
|
|
7901
7901
|
const DropdownListItem = ({
|
|
7902
7902
|
onClick,
|
|
@@ -7932,11 +7932,11 @@ const DropdownListItem = ({
|
|
|
7932
7932
|
return undefined;
|
|
7933
7933
|
};
|
|
7934
7934
|
const childrenContainer = React__default.createElement("div", {
|
|
7935
|
-
className: styles$
|
|
7935
|
+
className: styles$_['dropdown-list-item__container']
|
|
7936
7936
|
}, prefix && React__default.createElement("div", {
|
|
7937
|
-
className: styles$
|
|
7937
|
+
className: styles$_['dropdown-list-item__prefix']
|
|
7938
7938
|
}, prefix), React__default.createElement("div", {
|
|
7939
|
-
className: styles$
|
|
7939
|
+
className: styles$_['dropdown-list-item__content']
|
|
7940
7940
|
}, React__default.createElement(Stack, {
|
|
7941
7941
|
space: 4,
|
|
7942
7942
|
flex: [1]
|
|
@@ -7945,17 +7945,17 @@ const DropdownListItem = ({
|
|
|
7945
7945
|
color: getCaptionColor(),
|
|
7946
7946
|
textWrap: "wrap"
|
|
7947
7947
|
}, caption))), suffix && React__default.createElement("div", {
|
|
7948
|
-
className: styles$
|
|
7948
|
+
className: styles$_['dropdown-list-item__suffix']
|
|
7949
7949
|
}, suffix));
|
|
7950
7950
|
const linkItem = href && (_reloadDocument ? React__default.createElement("a", {
|
|
7951
7951
|
href: href,
|
|
7952
|
-
className: styles$
|
|
7952
|
+
className: styles$_['dropdown-list-item__link'],
|
|
7953
7953
|
target: _target,
|
|
7954
7954
|
tabIndex: -1
|
|
7955
7955
|
}, childrenContainer) : React__default.createElement(Link$1, {
|
|
7956
7956
|
to: href,
|
|
7957
7957
|
target: _target,
|
|
7958
|
-
className: styles$
|
|
7958
|
+
className: styles$_['dropdown-list-item__link'],
|
|
7959
7959
|
reloadDocument: false,
|
|
7960
7960
|
tabIndex: -1,
|
|
7961
7961
|
"data-testid": testId
|
|
@@ -7963,9 +7963,9 @@ const DropdownListItem = ({
|
|
|
7963
7963
|
return (
|
|
7964
7964
|
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
7965
7965
|
React__default.createElement("div", {
|
|
7966
|
-
className: classnames(styles$
|
|
7967
|
-
[styles$
|
|
7968
|
-
[styles$
|
|
7966
|
+
className: classnames(styles$_['dropdown-list-item'], {
|
|
7967
|
+
[styles$_['dropdown-list-item--selected']]: selected,
|
|
7968
|
+
[styles$_['dropdown-list-item--disabled']]: disabled
|
|
7969
7969
|
}),
|
|
7970
7970
|
onMouseDown: e => e.preventDefault(),
|
|
7971
7971
|
onClick: handleClick,
|
|
@@ -8043,14 +8043,14 @@ const DropdownList = ({
|
|
|
8043
8043
|
}
|
|
8044
8044
|
}, [highlightItemIndex]);
|
|
8045
8045
|
return React__default.createElement("ul", {
|
|
8046
|
-
className: styles$
|
|
8046
|
+
className: styles$10['dropdown-list'],
|
|
8047
8047
|
"data-testid": testId,
|
|
8048
8048
|
ref: listRef
|
|
8049
8049
|
}, React__default.Children.toArray(children).filter(Boolean).map((child, index) => {
|
|
8050
8050
|
return React__default.createElement("li", {
|
|
8051
8051
|
key: index,
|
|
8052
|
-
className: classnames(styles$
|
|
8053
|
-
[styles$
|
|
8052
|
+
className: classnames(styles$10['dropdown-list__item'], {
|
|
8053
|
+
[styles$10['dropdown-list__item--hover']]: focusedItem === index
|
|
8054
8054
|
}),
|
|
8055
8055
|
onMouseEnter: () => setFocusOnItem(index),
|
|
8056
8056
|
role: "menuitem"
|
|
@@ -8074,7 +8074,7 @@ const KebabMenu = ({
|
|
|
8074
8074
|
}, action.label))));
|
|
8075
8075
|
};
|
|
8076
8076
|
|
|
8077
|
-
var styles$
|
|
8077
|
+
var styles$Z = {"card":"_TXXpM","card__body":"_C3waP","card__body--interactive":"_uc-GV","card--focus":"_ft0I1","card__body--focus":"_wx2MU","card__body--disabled":"_TQDZH","card__body--with-kebab":"_kkYit","card__kebab":"_xrEdS","card__kebab--disabled":"_0WiOn","card__close":"_yODES","card__close--disabled":"_Vqf6o"};
|
|
8078
8078
|
|
|
8079
8079
|
const _excluded$k = ["children", "onClick", "onClose", "isSelected", "disabled", "actions", "testId"];
|
|
8080
8080
|
const Card = _ref => {
|
|
@@ -8102,28 +8102,28 @@ const Card = _ref => {
|
|
|
8102
8102
|
isCardMounted: true
|
|
8103
8103
|
}
|
|
8104
8104
|
}, React__default.createElement("div", _extends({
|
|
8105
|
-
className: classnames(styles$
|
|
8105
|
+
className: classnames(styles$Z['card']),
|
|
8106
8106
|
style: positionStyles
|
|
8107
8107
|
}, dataProps), onClick ? React__default.createElement("button", {
|
|
8108
|
-
className: classnames(styles$
|
|
8109
|
-
[styles$
|
|
8110
|
-
[styles$
|
|
8111
|
-
[styles$
|
|
8108
|
+
className: classnames(styles$Z['card__body'], styles$Z['card__body--interactive'], {
|
|
8109
|
+
[styles$Z['card__body--disabled']]: disabled,
|
|
8110
|
+
[styles$Z['card__body--focus']]: isSelected,
|
|
8111
|
+
[styles$Z['card__body--with-kebab']]: actions
|
|
8112
8112
|
}),
|
|
8113
8113
|
"data-testid": testId,
|
|
8114
8114
|
tabIndex: 0,
|
|
8115
8115
|
onClick: onClick,
|
|
8116
8116
|
disabled: disabled
|
|
8117
8117
|
}, children) : React__default.createElement("div", {
|
|
8118
|
-
className: classnames(styles$
|
|
8119
|
-
[styles$
|
|
8120
|
-
[styles$
|
|
8121
|
-
[styles$
|
|
8118
|
+
className: classnames(styles$Z['card__body'], {
|
|
8119
|
+
[styles$Z['card__body--disabled']]: disabled,
|
|
8120
|
+
[styles$Z['card__body--focus']]: isSelected,
|
|
8121
|
+
[styles$Z['card__body--with-kebab']]: actions
|
|
8122
8122
|
}),
|
|
8123
8123
|
"data-testid": testId
|
|
8124
8124
|
}, children), actions && React__default.createElement("div", {
|
|
8125
|
-
className: classnames(styles$
|
|
8126
|
-
[styles$
|
|
8125
|
+
className: classnames(styles$Z['card__kebab'], {
|
|
8126
|
+
[styles$Z['card__kebab--disabled']]: disabled
|
|
8127
8127
|
})
|
|
8128
8128
|
}, React__default.createElement(KebabMenu, {
|
|
8129
8129
|
actions: onClose ? actions.concat({
|
|
@@ -8132,8 +8132,8 @@ const Card = _ref => {
|
|
|
8132
8132
|
onAction: onClose
|
|
8133
8133
|
}) : actions
|
|
8134
8134
|
})), !actions && onClose && React__default.createElement("div", {
|
|
8135
|
-
className: classnames(styles$
|
|
8136
|
-
[styles$
|
|
8135
|
+
className: classnames(styles$Z['card__close'], {
|
|
8136
|
+
[styles$Z['card__close--disabled']]: disabled
|
|
8137
8137
|
})
|
|
8138
8138
|
}, React__default.createElement(Button, {
|
|
8139
8139
|
theme: "link-icon",
|
|
@@ -8141,7 +8141,7 @@ const Card = _ref => {
|
|
|
8141
8141
|
}, React__default.createElement(IconTimes, null)))));
|
|
8142
8142
|
};
|
|
8143
8143
|
|
|
8144
|
-
var styles$
|
|
8144
|
+
var styles$Y = {"callout-card__close":"_VxmQm","callout-card__header":"_3RrQI"};
|
|
8145
8145
|
|
|
8146
8146
|
/**
|
|
8147
8147
|
* @deprecated Use `<EmptyState as='card' />` instead
|
|
@@ -8162,7 +8162,7 @@ const CalloutCard = ({
|
|
|
8162
8162
|
}, React__default.createElement(Stack, {
|
|
8163
8163
|
space: 12
|
|
8164
8164
|
}, React__default.createElement("div", {
|
|
8165
|
-
className: styles$
|
|
8165
|
+
className: styles$Y['callout-card__header']
|
|
8166
8166
|
}, React__default.createElement(Text, {
|
|
8167
8167
|
as: "body",
|
|
8168
8168
|
color: "blackberry-400"
|
|
@@ -8177,7 +8177,7 @@ const CalloutCard = ({
|
|
|
8177
8177
|
alt: String(title) + String(header),
|
|
8178
8178
|
width: "354px"
|
|
8179
8179
|
})), onClose && React__default.createElement("div", {
|
|
8180
|
-
className: styles$
|
|
8180
|
+
className: styles$Y['callout-card__close']
|
|
8181
8181
|
}, React__default.createElement(Button, {
|
|
8182
8182
|
theme: "link-icon",
|
|
8183
8183
|
onClick: onClose
|
|
@@ -8193,7 +8193,7 @@ const Breadcrumbs = ({
|
|
|
8193
8193
|
}, children);
|
|
8194
8194
|
};
|
|
8195
8195
|
|
|
8196
|
-
var styles$
|
|
8196
|
+
var styles$X = {"breadcrumb-item":"_fo7-A"};
|
|
8197
8197
|
|
|
8198
8198
|
const BreadcrumbItem = ({
|
|
8199
8199
|
href,
|
|
@@ -8207,25 +8207,25 @@ const BreadcrumbItem = ({
|
|
|
8207
8207
|
// This is neessary to support older versions of react-router-dom
|
|
8208
8208
|
return _reloadDocument ? React__default.createElement("a", {
|
|
8209
8209
|
href: href,
|
|
8210
|
-
className: styles$
|
|
8210
|
+
className: styles$X['breadcrumb-item'],
|
|
8211
8211
|
"data-testid": testId
|
|
8212
8212
|
}, content) : React__default.createElement(Link$1, {
|
|
8213
8213
|
to: href,
|
|
8214
|
-
className: styles$
|
|
8214
|
+
className: styles$X['breadcrumb-item'],
|
|
8215
8215
|
relative: "path",
|
|
8216
8216
|
reloadDocument: _reloadDocument,
|
|
8217
8217
|
"data-testid": testId
|
|
8218
8218
|
}, content);
|
|
8219
8219
|
};
|
|
8220
8220
|
|
|
8221
|
-
var styles$
|
|
8221
|
+
var styles$W = {"page-breadcrumbs":"_QjIgc"};
|
|
8222
8222
|
|
|
8223
8223
|
const PageBreadcrumbs = ({
|
|
8224
8224
|
breadcrumbs
|
|
8225
8225
|
}) => {
|
|
8226
8226
|
const items = getBreadbrumbItems(breadcrumbs);
|
|
8227
8227
|
return React__default.createElement("div", {
|
|
8228
|
-
className: styles$
|
|
8228
|
+
className: styles$W['page-breadcrumbs']
|
|
8229
8229
|
}, React__default.createElement(Breadcrumbs, null, items));
|
|
8230
8230
|
};
|
|
8231
8231
|
const getBreadbrumbItems = breadcrumbs => {
|
|
@@ -8245,7 +8245,7 @@ const getBreadbrumbItems = breadcrumbs => {
|
|
|
8245
8245
|
}, breadcrumbs.label);
|
|
8246
8246
|
};
|
|
8247
8247
|
|
|
8248
|
-
var styles$
|
|
8248
|
+
var styles$V = {"page":"_QB6yF","page--fullwidth":"_g7MTf","page--restricted":"_LRq4j"};
|
|
8249
8249
|
|
|
8250
8250
|
const PAGE_SIZES = {
|
|
8251
8251
|
FULL_WIDTH: 'fullwidth',
|
|
@@ -8266,9 +8266,9 @@ const Page = ({
|
|
|
8266
8266
|
const hasHeader = title || actions;
|
|
8267
8267
|
const hasPageBlocks = hasHeader || banner || filterBar;
|
|
8268
8268
|
return React__default.createElement("div", {
|
|
8269
|
-
className: classnames(styles$
|
|
8270
|
-
[styles$
|
|
8271
|
-
[styles$
|
|
8269
|
+
className: classnames(styles$V['page'], {
|
|
8270
|
+
[styles$V['page--restricted']]: _size === PAGE_SIZES.RESTRICTED,
|
|
8271
|
+
[styles$V['page--fullwidth']]: _size === PAGE_SIZES.FULL_WIDTH
|
|
8272
8272
|
}),
|
|
8273
8273
|
"data-testid": testId
|
|
8274
8274
|
}, React__default.createElement(Stack, {
|
|
@@ -8289,218 +8289,15 @@ const Page = ({
|
|
|
8289
8289
|
}, title), actions), subtitle && React__default.createElement(Text, null, subtitle)), banner, filterBar)), children));
|
|
8290
8290
|
};
|
|
8291
8291
|
|
|
8292
|
-
|
|
8293
|
-
UPSELL: 'upsell',
|
|
8294
|
-
INFO: 'info',
|
|
8295
|
-
DANGER: 'danger'
|
|
8296
|
-
};
|
|
8297
|
-
|
|
8298
|
-
var styles$S = {"persistent-banner":"_FsCJQ","persistent-banner--info":"_zt-xK","persistent-banner--danger":"_rmUys","persistent-banner--upsell":"_UGrRR"};
|
|
8299
|
-
|
|
8300
|
-
const PersistentBanner = ({
|
|
8301
|
-
theme: _theme = PERSISTENT_BANNER_THEME.INFO,
|
|
8302
|
-
children,
|
|
8303
|
-
primaryButton,
|
|
8304
|
-
secondaryButton,
|
|
8305
|
-
onDismiss,
|
|
8306
|
-
onLoad,
|
|
8307
|
-
testId
|
|
8308
|
-
}) => {
|
|
8309
|
-
useEffect(() => {
|
|
8310
|
-
onLoad == null || onLoad();
|
|
8311
|
-
}, []);
|
|
8312
|
-
const BannerContent = () => React__default.createElement(Inline, {
|
|
8313
|
-
justifyContent: "center",
|
|
8314
|
-
alignItems: "center"
|
|
8315
|
-
}, children, primaryButton && React__default.cloneElement(primaryButton, _extends({
|
|
8316
|
-
theme: BUTTON_THEMES.HOLLOW_CONTRAST
|
|
8317
|
-
}, primaryButton.props)), secondaryButton && React__default.cloneElement(secondaryButton, _extends({
|
|
8318
|
-
theme: BUTTON_THEMES.LINK_CONTRAST
|
|
8319
|
-
}, secondaryButton.props)));
|
|
8320
|
-
return React__default.createElement("div", {
|
|
8321
|
-
className: classnames(styles$S['persistent-banner'], {
|
|
8322
|
-
[styles$S['persistent-banner--info']]: _theme === PERSISTENT_BANNER_THEME.INFO,
|
|
8323
|
-
[styles$S['persistent-banner--danger']]: _theme === PERSISTENT_BANNER_THEME.DANGER,
|
|
8324
|
-
[styles$S['persistent-banner--upsell']]: _theme === PERSISTENT_BANNER_THEME.UPSELL
|
|
8325
|
-
}),
|
|
8326
|
-
"data-testid": testId
|
|
8327
|
-
}, onDismiss ? React__default.createElement(Inline, {
|
|
8328
|
-
flex: [1],
|
|
8329
|
-
alignItems: "center"
|
|
8330
|
-
}, React__default.createElement(BannerContent, null), React__default.createElement(Button, {
|
|
8331
|
-
theme: "link-contrast",
|
|
8332
|
-
onClick: onDismiss
|
|
8333
|
-
}, React__default.createElement(IconTimes, null))) : React__default.createElement(BannerContent, null));
|
|
8334
|
-
};
|
|
8335
|
-
|
|
8336
|
-
const getProgressMetric = (progress, maxValue) => {
|
|
8337
|
-
const updatedMaxValue = maxValue > 0 ? maxValue : 100;
|
|
8338
|
-
let updatedProgress = progress;
|
|
8339
|
-
if (updatedProgress > updatedMaxValue) {
|
|
8340
|
-
updatedProgress = updatedMaxValue;
|
|
8341
|
-
}
|
|
8342
|
-
if (updatedProgress < 0) {
|
|
8343
|
-
updatedProgress = 0;
|
|
8344
|
-
}
|
|
8345
|
-
return {
|
|
8346
|
-
progress: updatedProgress,
|
|
8347
|
-
maxValue: updatedMaxValue
|
|
8348
|
-
};
|
|
8349
|
-
};
|
|
8350
|
-
/**
|
|
8351
|
-
* This function calculates the progress bar so it can align in the center of each step
|
|
8352
|
-
*/
|
|
8353
|
-
const getProgressMetricWithSteps = (progress, amountOfSteps) => {
|
|
8354
|
-
const maxValue = amountOfSteps * 2;
|
|
8355
|
-
let actualProgress = progress;
|
|
8356
|
-
if (progress < 0) {
|
|
8357
|
-
actualProgress = 0;
|
|
8358
|
-
}
|
|
8359
|
-
if (progress > 0) {
|
|
8360
|
-
const previousProgress = (progress - 1) * 2;
|
|
8361
|
-
actualProgress = previousProgress + 1;
|
|
8362
|
-
}
|
|
8363
|
-
if (actualProgress > maxValue) {
|
|
8364
|
-
actualProgress = maxValue;
|
|
8365
|
-
}
|
|
8366
|
-
return {
|
|
8367
|
-
progress: actualProgress,
|
|
8368
|
-
maxValue
|
|
8369
|
-
};
|
|
8370
|
-
};
|
|
8371
|
-
|
|
8372
|
-
const useProgress = (progress, maxValue, getMetric = getProgressMetric) => {
|
|
8373
|
-
const metric = getMetric(progress, maxValue);
|
|
8374
|
-
const percentage = metric.progress / metric.maxValue * 100;
|
|
8375
|
-
const elementProps = {
|
|
8376
|
-
'aria-valuemax': metric.maxValue,
|
|
8377
|
-
'aria-valuemin': 0,
|
|
8378
|
-
'aria-valuenow': metric.progress,
|
|
8379
|
-
role: 'progressbar'
|
|
8380
|
-
};
|
|
8381
|
-
return {
|
|
8382
|
-
elementProps,
|
|
8383
|
-
metric: _extends({}, metric, {
|
|
8384
|
-
percentage
|
|
8385
|
-
})
|
|
8386
|
-
};
|
|
8387
|
-
};
|
|
8388
|
-
|
|
8389
|
-
var styles$R = {"circular-progress":"_UI0Fo","circular-progress__label":"_6PNwZ","circular-progress__track":"_alBLB","circular-progress__indicator":"_VADa6"};
|
|
8390
|
-
|
|
8391
|
-
const CircularProgress = ({
|
|
8392
|
-
progress,
|
|
8393
|
-
maxValue: _maxValue = 100,
|
|
8394
|
-
children,
|
|
8395
|
-
testId
|
|
8396
|
-
}) => {
|
|
8397
|
-
const {
|
|
8398
|
-
elementProps,
|
|
8399
|
-
metric
|
|
8400
|
-
} = useProgress(progress, _maxValue);
|
|
8401
|
-
const determinant = metric.percentage * 2.79;
|
|
8402
|
-
return React__default.createElement("div", _extends({}, elementProps, {
|
|
8403
|
-
className: styles$R['circular-progress'],
|
|
8404
|
-
"data-testid": testId
|
|
8405
|
-
}), React__default.createElement("svg", {
|
|
8406
|
-
viewBox: "0 0 100 100"
|
|
8407
|
-
}, React__default.createElement("circle", {
|
|
8408
|
-
cx: 50,
|
|
8409
|
-
cy: 50,
|
|
8410
|
-
r: 45,
|
|
8411
|
-
strokeWidth: "10px",
|
|
8412
|
-
className: styles$R['circular-progress__track']
|
|
8413
|
-
}), React__default.createElement("circle", {
|
|
8414
|
-
cx: 50,
|
|
8415
|
-
cy: 50,
|
|
8416
|
-
r: 45,
|
|
8417
|
-
strokeWidth: "10px",
|
|
8418
|
-
className: styles$R['circular-progress__indicator'],
|
|
8419
|
-
strokeDashoffset: "66",
|
|
8420
|
-
strokeDasharray: `${determinant} ${279 - determinant}`
|
|
8421
|
-
})), React__default.createElement("div", {
|
|
8422
|
-
className: styles$R['circular-progress__label']
|
|
8423
|
-
}, children || `${metric.progress}/${metric.maxValue}`));
|
|
8424
|
-
};
|
|
8425
|
-
|
|
8426
|
-
var styles$Q = {"progress-bar":"_fWvQF","progress-bar__indicator":"_vd0xc","progress-bar__steps":"_8kdeO"};
|
|
8427
|
-
|
|
8428
|
-
const ProgressBar = ({
|
|
8429
|
-
progress,
|
|
8430
|
-
maxValue,
|
|
8431
|
-
testId,
|
|
8432
|
-
steps
|
|
8433
|
-
}) => {
|
|
8434
|
-
const isUsingStepsAsMaxValue = !maxValue && steps && steps.length > 0;
|
|
8435
|
-
const inferedMaxValue = !maxValue && steps && steps.length > 0 ? steps.length : maxValue;
|
|
8436
|
-
const {
|
|
8437
|
-
elementProps,
|
|
8438
|
-
metric
|
|
8439
|
-
} = useProgress(progress, inferedMaxValue || 100, isUsingStepsAsMaxValue ? getProgressMetricWithSteps : getProgressMetric);
|
|
8440
|
-
return React__default.createElement(Stack, null, React__default.createElement("div", _extends({}, elementProps, {
|
|
8441
|
-
className: styles$Q['progress-bar'],
|
|
8442
|
-
"data-testid": testId
|
|
8443
|
-
}), React__default.createElement("div", {
|
|
8444
|
-
className: styles$Q['progress-bar__indicator'],
|
|
8445
|
-
style: {
|
|
8446
|
-
width: `${metric.percentage}%`
|
|
8447
|
-
}
|
|
8448
|
-
})), steps && steps.length > 0 && React__default.createElement("div", {
|
|
8449
|
-
className: styles$Q['progress-bar__steps']
|
|
8450
|
-
}, steps.map(step => React__default.createElement(Text, {
|
|
8451
|
-
key: step
|
|
8452
|
-
}, step))));
|
|
8453
|
-
};
|
|
8454
|
-
|
|
8455
|
-
var styles$P = {"skeleton":"_oDnLM","pulse":"_McmEv","skeleton__button":"_jPXx6","skeleton__pill":"_sPHSZ","skeleton__avatar":"_3vEYT","skeleton__avatar--small":"_zneq9","skeleton__avatar--medium":"_TtfoO","skeleton__avatar--large":"_jhOqR","skeleton__avatar--xlarge":"_VgGfx"};
|
|
8456
|
-
|
|
8457
|
-
const SKELETON_COMPONENT = {
|
|
8458
|
-
AVATAR: 'avatar',
|
|
8459
|
-
AVATAR_SMALL: 'avatar--small',
|
|
8460
|
-
AVATAR_MEDIUM: 'avatar--medium',
|
|
8461
|
-
AVATAR_LARGE: 'avatar--large',
|
|
8462
|
-
AVATAR_XLARGE: 'avatar--xlarge',
|
|
8463
|
-
BUTTON: 'button',
|
|
8464
|
-
PILL: 'pill'
|
|
8465
|
-
};
|
|
8466
|
-
|
|
8467
|
-
const _excluded$j = ["as", "testId", "width", "height"];
|
|
8468
|
-
const Skeleton = _ref => {
|
|
8469
|
-
let {
|
|
8470
|
-
as,
|
|
8471
|
-
testId,
|
|
8472
|
-
width,
|
|
8473
|
-
height
|
|
8474
|
-
} = _ref,
|
|
8475
|
-
positionStyles = _objectWithoutPropertiesLoose(_ref, _excluded$j);
|
|
8476
|
-
const positioning = usePositionStyles(positionStyles);
|
|
8477
|
-
return React__default.createElement("div", {
|
|
8478
|
-
"data-testid": testId,
|
|
8479
|
-
className: classnames(styles$P['skeleton'], {
|
|
8480
|
-
[styles$P['skeleton__avatar']]: as === SKELETON_COMPONENT.AVATAR,
|
|
8481
|
-
[styles$P['skeleton__avatar--small']]: as === SKELETON_COMPONENT.AVATAR_SMALL,
|
|
8482
|
-
[styles$P['skeleton__avatar--medium']]: as === SKELETON_COMPONENT.AVATAR_MEDIUM,
|
|
8483
|
-
[styles$P['skeleton__avatar--large']]: as === SKELETON_COMPONENT.AVATAR_LARGE,
|
|
8484
|
-
[styles$P['skeleton__avatar--xlarge']]: as === SKELETON_COMPONENT.AVATAR_XLARGE,
|
|
8485
|
-
[styles$P['skeleton__button']]: as === SKELETON_COMPONENT.BUTTON,
|
|
8486
|
-
[styles$P['skeleton__pill']]: as === SKELETON_COMPONENT.PILL
|
|
8487
|
-
}),
|
|
8488
|
-
style: _extends({}, positioning, {
|
|
8489
|
-
width: width,
|
|
8490
|
-
height: height
|
|
8491
|
-
})
|
|
8492
|
-
});
|
|
8493
|
-
};
|
|
8292
|
+
var styles$U = {"page-layout":"_Scw7-","page-layout__nav-container":"_v--DF","page-layout__nav-list":"_dJeZe","page-layout__content":"_hHi70","page-layout__side-nav-content":"_vTMjp"};
|
|
8494
8293
|
|
|
8495
|
-
var styles$
|
|
8294
|
+
var styles$T = {"menu-item":"_SebbU","menu-item--active":"_CDEVl"};
|
|
8496
8295
|
|
|
8497
|
-
var styles$
|
|
8296
|
+
var styles$S = {"badge":"_RXV4h","badge--warning":"_2An1I","badge--danger":"_-Bw8L","badge--success":"_RxlMz","badge--info":"_dzCH-","badge--numeric":"_Ix9tP"};
|
|
8498
8297
|
|
|
8499
|
-
var styles$
|
|
8298
|
+
var styles$R = {"overlay":"_0yTe8","overlay--after-open":"_yJBtA","overlay--before-close":"_iWogn","content":"_ntozd","content--after-open":"_EQjDq","content--before-close":"_ZTY3B"};
|
|
8500
8299
|
|
|
8501
|
-
var styles$
|
|
8502
|
-
|
|
8503
|
-
var styles$K = {"header":"_tgpG9","header__close-button":"_b1dgU","sub-header":"_c2nm4"};
|
|
8300
|
+
var styles$Q = {"header":"_tgpG9","header__close-button":"_b1dgU","sub-header":"_c2nm4"};
|
|
8504
8301
|
|
|
8505
8302
|
const ModalHeader = ({
|
|
8506
8303
|
header,
|
|
@@ -8510,7 +8307,7 @@ const ModalHeader = ({
|
|
|
8510
8307
|
}) => {
|
|
8511
8308
|
if (!header && !subHeader) {
|
|
8512
8309
|
return onClose ? React__default.createElement("div", {
|
|
8513
|
-
className: styles$
|
|
8310
|
+
className: styles$Q['header__close-button']
|
|
8514
8311
|
}, React__default.createElement(Button, {
|
|
8515
8312
|
theme: "link-icon",
|
|
8516
8313
|
onClick: onClose,
|
|
@@ -8526,17 +8323,17 @@ const ModalHeader = ({
|
|
|
8526
8323
|
flex: [1],
|
|
8527
8324
|
alignItems: "center"
|
|
8528
8325
|
}, React__default.createElement("span", {
|
|
8529
|
-
className: styles$
|
|
8326
|
+
className: styles$Q['header']
|
|
8530
8327
|
}, header), onClose && React__default.createElement(Button, {
|
|
8531
8328
|
theme: "link-icon",
|
|
8532
8329
|
onClick: onClose,
|
|
8533
8330
|
disabled: loading
|
|
8534
8331
|
}, React__default.createElement(IconTimes, null))), subHeader && React__default.createElement("div", {
|
|
8535
|
-
className: styles$
|
|
8332
|
+
className: styles$Q['sub-header']
|
|
8536
8333
|
}, subHeader));
|
|
8537
8334
|
};
|
|
8538
8335
|
|
|
8539
|
-
const _excluded$
|
|
8336
|
+
const _excluded$j = ["children", "header", "subHeader", "onClose", "loading", "zIndex", "rootElementId", "width", "height", "maxWidth", "shouldReturnFocusAfterClose", "testId"];
|
|
8540
8337
|
const Modal = _ref => {
|
|
8541
8338
|
let {
|
|
8542
8339
|
children,
|
|
@@ -8553,7 +8350,7 @@ const Modal = _ref => {
|
|
|
8553
8350
|
shouldReturnFocusAfterClose = true,
|
|
8554
8351
|
testId
|
|
8555
8352
|
} = _ref,
|
|
8556
|
-
otherProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
8353
|
+
otherProps = _objectWithoutPropertiesLoose(_ref, _excluded$j);
|
|
8557
8354
|
const style = {
|
|
8558
8355
|
content: {
|
|
8559
8356
|
width,
|
|
@@ -8582,14 +8379,14 @@ const Modal = _ref => {
|
|
|
8582
8379
|
contentLabel: "Modal",
|
|
8583
8380
|
appElement: rootElementId && document.getElementById(rootElementId) || undefined,
|
|
8584
8381
|
overlayClassName: {
|
|
8585
|
-
base: styles$
|
|
8586
|
-
afterOpen: styles$
|
|
8587
|
-
beforeClose: styles$
|
|
8382
|
+
base: styles$R['overlay'],
|
|
8383
|
+
afterOpen: styles$R['overlay--after-open'],
|
|
8384
|
+
beforeClose: styles$R['overlay--before-close']
|
|
8588
8385
|
},
|
|
8589
8386
|
className: {
|
|
8590
|
-
base: styles$
|
|
8591
|
-
afterOpen: styles$
|
|
8592
|
-
beforeClose: styles$
|
|
8387
|
+
base: styles$R['content'],
|
|
8388
|
+
afterOpen: styles$R['content--after-open'],
|
|
8389
|
+
beforeClose: styles$R['content--before-close']
|
|
8593
8390
|
},
|
|
8594
8391
|
data: dataProps
|
|
8595
8392
|
}, React__default.createElement(ModalHeader, {
|
|
@@ -8631,7 +8428,7 @@ const useScrollShadow = () => {
|
|
|
8631
8428
|
};
|
|
8632
8429
|
};
|
|
8633
8430
|
|
|
8634
|
-
var styles$
|
|
8431
|
+
var styles$P = {"modal-body":"_4YK4k","modal-body--with-scroll-shadow":"_wo1vv","modal-body__inner-div":"_9u6xC"};
|
|
8635
8432
|
|
|
8636
8433
|
const ModalBody = ({
|
|
8637
8434
|
children,
|
|
@@ -8642,17 +8439,17 @@ const ModalBody = ({
|
|
|
8642
8439
|
showScrollShadow
|
|
8643
8440
|
} = useScrollShadow();
|
|
8644
8441
|
return React__default.createElement("div", {
|
|
8645
|
-
className: classnames(styles$
|
|
8646
|
-
[styles$
|
|
8442
|
+
className: classnames(styles$P['modal-body'], {
|
|
8443
|
+
[styles$P['modal-body--with-scroll-shadow']]: showScrollShadow
|
|
8647
8444
|
}),
|
|
8648
8445
|
ref: ref,
|
|
8649
8446
|
"data-testid": testId
|
|
8650
8447
|
}, React__default.createElement("div", {
|
|
8651
|
-
className: styles$
|
|
8448
|
+
className: styles$P['modal-body__inner-div']
|
|
8652
8449
|
}, children));
|
|
8653
8450
|
};
|
|
8654
8451
|
|
|
8655
|
-
var styles$
|
|
8452
|
+
var styles$O = {"modal-footer":"_bezlP","tertiary-container":"_EdqHx"};
|
|
8656
8453
|
|
|
8657
8454
|
const updateButtonProps$1 = (button, newProps) => {
|
|
8658
8455
|
if (!button) {
|
|
@@ -8689,7 +8486,7 @@ const ModalFooter = ({
|
|
|
8689
8486
|
justifyContent: "space-between"
|
|
8690
8487
|
}, React__default.createElement("div", {
|
|
8691
8488
|
className: classnames({
|
|
8692
|
-
[styles$
|
|
8489
|
+
[styles$O['tertiary-container']]: tertiaryButton && tertiaryButton.props.theme.startsWith('link')
|
|
8693
8490
|
})
|
|
8694
8491
|
}, tertiaryButton || React__default.createElement("div", null)), React__default.createElement(Inline, {
|
|
8695
8492
|
space: 12
|
|
@@ -8707,7 +8504,7 @@ const FooterContainer = ({
|
|
|
8707
8504
|
displayName: 'Inline'
|
|
8708
8505
|
});
|
|
8709
8506
|
return React__default.createElement("div", {
|
|
8710
|
-
className: styles$
|
|
8507
|
+
className: styles$O['modal-footer'],
|
|
8711
8508
|
"data-testid": testId
|
|
8712
8509
|
}, React__default.createElement(Inline, {
|
|
8713
8510
|
justifyContent: "end",
|
|
@@ -8720,7 +8517,7 @@ var dayOverridesStyles = {"root":"_et9Fs","table":"_l7Mis","caption":"_XGu8K","h
|
|
|
8720
8517
|
|
|
8721
8518
|
var weekOverridesStyles = {"root":"_QLSA6","table":"_96jgF","caption":"_4ySMr","head_cell":"_2AoB4","day_today":"_Snv-V","day_outside":"_Zf-6C","nav_button":"_iOY4h","day_range_middle":"_e0lOH","day_range_start":"_4N7l-","day_range_end":"_fMjHG","row":"_GqE-5"};
|
|
8722
8519
|
|
|
8723
|
-
var styles$
|
|
8520
|
+
var styles$N = {"calendar":"_YPyZ6","calendar__overlay":"_-cw0A"};
|
|
8724
8521
|
|
|
8725
8522
|
function parseDate(str, format, locale) {
|
|
8726
8523
|
const parsed = dateFnsParse(str, format, new Date(), {
|
|
@@ -8955,9 +8752,9 @@ const Calendar = ({
|
|
|
8955
8752
|
}
|
|
8956
8753
|
};
|
|
8957
8754
|
return React__default.createElement(Portal, null, React__default.createElement("div", {
|
|
8958
|
-
className: styles$
|
|
8755
|
+
className: styles$N['calendar']
|
|
8959
8756
|
}, React__default.createElement("div", {
|
|
8960
|
-
className: styles$
|
|
8757
|
+
className: styles$N['calendar__overlay'],
|
|
8961
8758
|
ref: ref => setCalendarRef(ref),
|
|
8962
8759
|
style: _extends({}, calendarPosition, {
|
|
8963
8760
|
zIndex: isInsideDropdown ? getZIndex('dropdown-level-2') : getZIndex('dropdown')
|
|
@@ -9015,9 +8812,9 @@ const useCheckBoxFieldControllers = ({
|
|
|
9015
8812
|
return controllers;
|
|
9016
8813
|
};
|
|
9017
8814
|
|
|
9018
|
-
var styles$
|
|
8815
|
+
var styles$M = {"check-box-field":"_Id4qm","check-box-field__caption":"_s9d-m","check-box-field__custom-input":"_kmvBP"};
|
|
9019
8816
|
|
|
9020
|
-
const _excluded$
|
|
8817
|
+
const _excluded$i = ["name", "id", "checked", "onChange", "onBlur", "label", "caption", "error", "disabled", "testId"];
|
|
9021
8818
|
/** CheckboxField form element. */
|
|
9022
8819
|
const CheckboxField = _ref => {
|
|
9023
8820
|
let {
|
|
@@ -9032,7 +8829,7 @@ const CheckboxField = _ref => {
|
|
|
9032
8829
|
disabled,
|
|
9033
8830
|
testId
|
|
9034
8831
|
} = _ref,
|
|
9035
|
-
otherProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
8832
|
+
otherProps = _objectWithoutPropertiesLoose(_ref, _excluded$i);
|
|
9036
8833
|
const controllers = useCheckBoxFieldControllers({
|
|
9037
8834
|
name,
|
|
9038
8835
|
id: inputId,
|
|
@@ -9050,7 +8847,7 @@ const CheckboxField = _ref => {
|
|
|
9050
8847
|
flexItems: true,
|
|
9051
8848
|
flex: ['0 0 auto']
|
|
9052
8849
|
}, otherProps), React__default.createElement("div", {
|
|
9053
|
-
className: styles$
|
|
8850
|
+
className: styles$M['check-box-field']
|
|
9054
8851
|
}, React__default.createElement("input", {
|
|
9055
8852
|
name: name,
|
|
9056
8853
|
id: controllers.id,
|
|
@@ -9063,12 +8860,12 @@ const CheckboxField = _ref => {
|
|
|
9063
8860
|
onChange: controllers.onChange,
|
|
9064
8861
|
onBlur: controllers.onBlur
|
|
9065
8862
|
}), React__default.createElement("span", {
|
|
9066
|
-
className: styles$
|
|
8863
|
+
className: styles$M['check-box-field__custom-input']
|
|
9067
8864
|
})), label && React__default.createElement(Label, {
|
|
9068
8865
|
htmlFor: controllers.id,
|
|
9069
8866
|
truncate: false
|
|
9070
8867
|
}, label)), caption && React__default.createElement("div", {
|
|
9071
|
-
className: styles$
|
|
8868
|
+
className: styles$M['check-box-field__caption']
|
|
9072
8869
|
}, React__default.createElement(Caption, {
|
|
9073
8870
|
fieldId: controllers.id
|
|
9074
8871
|
}, caption)), controllers.error && React__default.createElement(ErrorMessage, {
|
|
@@ -9106,9 +8903,9 @@ const useLocalStorage = (key, initialValue) => {
|
|
|
9106
8903
|
return [storedValue, setValue];
|
|
9107
8904
|
};
|
|
9108
8905
|
|
|
9109
|
-
var styles$
|
|
8906
|
+
var styles$L = {"hint-modal":"_NwD6V","hint-modal--after-open":"_4ofZb","hint-modal--before-close":"_hGoMD","hint-modal__overlay":"_iK5zl","hint-modal__image":"_V9hLa","hint-modal__body":"_oOqUg","hint-modal__close-button":"_5zcBK"};
|
|
9110
8907
|
|
|
9111
|
-
const _excluded$
|
|
8908
|
+
const _excluded$h = ["header", "children", "mediaUrl", "onClose", "modalId", "primaryButton", "secondaryButton", "testId"];
|
|
9112
8909
|
const HintModal = _ref => {
|
|
9113
8910
|
let {
|
|
9114
8911
|
header,
|
|
@@ -9120,7 +8917,7 @@ const HintModal = _ref => {
|
|
|
9120
8917
|
secondaryButton,
|
|
9121
8918
|
testId
|
|
9122
8919
|
} = _ref,
|
|
9123
|
-
positionProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
8920
|
+
positionProps = _objectWithoutPropertiesLoose(_ref, _excluded$h);
|
|
9124
8921
|
const __ = useTranslation('HintModal');
|
|
9125
8922
|
const [doNotShowAgain, setDoNotShowAgain] = useState(false);
|
|
9126
8923
|
const [persistedDoNotShow, setPersistedDoNotShow] = useLocalStorage(modalId, false);
|
|
@@ -9162,22 +8959,22 @@ const HintModal = _ref => {
|
|
|
9162
8959
|
closeTimeoutMS: 200,
|
|
9163
8960
|
contentLabel: "Modal",
|
|
9164
8961
|
className: {
|
|
9165
|
-
base: styles$
|
|
9166
|
-
afterOpen: styles$
|
|
9167
|
-
beforeClose: styles$
|
|
8962
|
+
base: styles$L['hint-modal'],
|
|
8963
|
+
afterOpen: styles$L['hint-modal--after-open'],
|
|
8964
|
+
beforeClose: styles$L['hint-modal--before-close']
|
|
9168
8965
|
},
|
|
9169
|
-
overlayClassName: styles$
|
|
8966
|
+
overlayClassName: styles$L['hint-modal__overlay']
|
|
9170
8967
|
}, React__default.createElement("div", {
|
|
9171
|
-
className: styles$
|
|
8968
|
+
className: styles$L['hint-modal__close-button']
|
|
9172
8969
|
}, React__default.createElement(Button, {
|
|
9173
8970
|
theme: "link-icon",
|
|
9174
8971
|
onClick: handleOnClose
|
|
9175
8972
|
}, React__default.createElement(IconTimes, null))), mediaUrl && React__default.createElement("img", {
|
|
9176
|
-
className: styles$
|
|
8973
|
+
className: styles$L['hint-modal__image'],
|
|
9177
8974
|
src: mediaUrl,
|
|
9178
8975
|
alt: String(header)
|
|
9179
8976
|
}), React__default.createElement("div", {
|
|
9180
|
-
className: styles$
|
|
8977
|
+
className: styles$L['hint-modal__body']
|
|
9181
8978
|
}, React__default.createElement(Stack, {
|
|
9182
8979
|
justifyContent: "space-between"
|
|
9183
8980
|
}, React__default.createElement(Stack, {
|
|
@@ -9198,6 +8995,295 @@ const HintModal = _ref => {
|
|
|
9198
8995
|
}, secondaryButtonUpdated, primaryButtonUpdated)))));
|
|
9199
8996
|
};
|
|
9200
8997
|
|
|
8998
|
+
const _excluded$g = ["children", "theme", "title", "testId"];
|
|
8999
|
+
const BadgeElement = (_ref, forwardedRef) => {
|
|
9000
|
+
let {
|
|
9001
|
+
children,
|
|
9002
|
+
theme,
|
|
9003
|
+
title,
|
|
9004
|
+
testId
|
|
9005
|
+
} = _ref,
|
|
9006
|
+
otherProps = _objectWithoutPropertiesLoose(_ref, _excluded$g);
|
|
9007
|
+
const internalRef = useRef(null);
|
|
9008
|
+
const ref = forwardedRef || internalRef;
|
|
9009
|
+
useLayoutEffect(() => {
|
|
9010
|
+
if (typeof ref !== 'function' && ref.current && React__default.isValidElement(children) && typeof (children == null ? void 0 : children.type) !== 'string' && typeof (children == null ? void 0 : children.type) !== 'number') {
|
|
9011
|
+
ref.current.style.height = ref.current.offsetWidth + 'px';
|
|
9012
|
+
}
|
|
9013
|
+
});
|
|
9014
|
+
return React__default.createElement(Tooltip, {
|
|
9015
|
+
overlay: title,
|
|
9016
|
+
ref: ref
|
|
9017
|
+
}, React__default.createElement("div", _extends({
|
|
9018
|
+
className: classnames(styles$S['badge'], {
|
|
9019
|
+
[styles$S['badge--success']]: theme === 'success',
|
|
9020
|
+
[styles$S['badge--danger']]: theme === 'danger',
|
|
9021
|
+
[styles$S['badge--info']]: theme === 'info',
|
|
9022
|
+
[styles$S['badge--warning']]: theme === 'warning',
|
|
9023
|
+
[styles$S['badge--numeric']]: Number.isFinite(children)
|
|
9024
|
+
}),
|
|
9025
|
+
ref: ref,
|
|
9026
|
+
"data-testid": testId
|
|
9027
|
+
}, otherProps), children));
|
|
9028
|
+
};
|
|
9029
|
+
const Badge = forwardRef(BadgeElement);
|
|
9030
|
+
|
|
9031
|
+
const MenuItem = ({
|
|
9032
|
+
menu
|
|
9033
|
+
}) => {
|
|
9034
|
+
return React__default.createElement("li", {
|
|
9035
|
+
className: classnames(styles$T['menu-item'])
|
|
9036
|
+
}, menu.reloadDocument ? React__default.createElement("a", {
|
|
9037
|
+
href: menu.to,
|
|
9038
|
+
className: classnames({
|
|
9039
|
+
[styles$T['menu-item--active']]: menu.isActive
|
|
9040
|
+
})
|
|
9041
|
+
}, menu.label, !!menu.badge && React__default.createElement(Badge, null, menu.badge)) : React__default.createElement(NavLink, {
|
|
9042
|
+
to: menu.to,
|
|
9043
|
+
// @ts-expect-error This is only available on v5
|
|
9044
|
+
activeClassName: styles$T['menu-item--active'],
|
|
9045
|
+
exact: true
|
|
9046
|
+
}, menu.label, !!menu.badge && React__default.createElement(Badge, null, menu.badge)));
|
|
9047
|
+
};
|
|
9048
|
+
|
|
9049
|
+
const PageLayout = ({
|
|
9050
|
+
title,
|
|
9051
|
+
children,
|
|
9052
|
+
menu,
|
|
9053
|
+
sideNavContent
|
|
9054
|
+
}) => {
|
|
9055
|
+
return React__default.createElement("div", {
|
|
9056
|
+
className: styles$U['page-layout']
|
|
9057
|
+
}, React__default.createElement("div", {
|
|
9058
|
+
className: styles$U['page-layout__nav-container']
|
|
9059
|
+
}, React__default.createElement(Stack, {
|
|
9060
|
+
space: 12
|
|
9061
|
+
}, React__default.createElement(Text, {
|
|
9062
|
+
as: "h5",
|
|
9063
|
+
textWrap: "wrap",
|
|
9064
|
+
ml: 20,
|
|
9065
|
+
mr: 35
|
|
9066
|
+
}, title), React__default.createElement("ul", {
|
|
9067
|
+
className: styles$U['page-layout__nav-list']
|
|
9068
|
+
}, menu.filter(menu => !('isVisible' in menu) || (menu == null ? void 0 : menu.isVisible) === true).map((menuItem, index) => React__default.createElement(MenuItem, {
|
|
9069
|
+
key: index,
|
|
9070
|
+
menu: menuItem
|
|
9071
|
+
}))), sideNavContent && React__default.createElement("div", {
|
|
9072
|
+
className: styles$U['page-layout__side-nav-content']
|
|
9073
|
+
}, sideNavContent))), React__default.createElement("div", {
|
|
9074
|
+
className: styles$U['page-layout__content']
|
|
9075
|
+
}, children));
|
|
9076
|
+
};
|
|
9077
|
+
|
|
9078
|
+
const PERSISTENT_BANNER_THEME = {
|
|
9079
|
+
UPSELL: 'upsell',
|
|
9080
|
+
INFO: 'info',
|
|
9081
|
+
DANGER: 'danger'
|
|
9082
|
+
};
|
|
9083
|
+
|
|
9084
|
+
var styles$K = {"persistent-banner":"_FsCJQ","persistent-banner--info":"_zt-xK","persistent-banner--danger":"_rmUys","persistent-banner--upsell":"_UGrRR"};
|
|
9085
|
+
|
|
9086
|
+
const PersistentBanner = ({
|
|
9087
|
+
theme: _theme = PERSISTENT_BANNER_THEME.INFO,
|
|
9088
|
+
children,
|
|
9089
|
+
primaryButton,
|
|
9090
|
+
secondaryButton,
|
|
9091
|
+
onDismiss,
|
|
9092
|
+
onLoad,
|
|
9093
|
+
testId
|
|
9094
|
+
}) => {
|
|
9095
|
+
useEffect(() => {
|
|
9096
|
+
onLoad == null || onLoad();
|
|
9097
|
+
}, []);
|
|
9098
|
+
const BannerContent = () => React__default.createElement(Inline, {
|
|
9099
|
+
justifyContent: "center",
|
|
9100
|
+
alignItems: "center"
|
|
9101
|
+
}, children, primaryButton && React__default.cloneElement(primaryButton, _extends({
|
|
9102
|
+
theme: BUTTON_THEMES.HOLLOW_CONTRAST
|
|
9103
|
+
}, primaryButton.props)), secondaryButton && React__default.cloneElement(secondaryButton, _extends({
|
|
9104
|
+
theme: BUTTON_THEMES.LINK_CONTRAST
|
|
9105
|
+
}, secondaryButton.props)));
|
|
9106
|
+
return React__default.createElement("div", {
|
|
9107
|
+
className: classnames(styles$K['persistent-banner'], {
|
|
9108
|
+
[styles$K['persistent-banner--info']]: _theme === PERSISTENT_BANNER_THEME.INFO,
|
|
9109
|
+
[styles$K['persistent-banner--danger']]: _theme === PERSISTENT_BANNER_THEME.DANGER,
|
|
9110
|
+
[styles$K['persistent-banner--upsell']]: _theme === PERSISTENT_BANNER_THEME.UPSELL
|
|
9111
|
+
}),
|
|
9112
|
+
"data-testid": testId
|
|
9113
|
+
}, onDismiss ? React__default.createElement(Inline, {
|
|
9114
|
+
flex: [1],
|
|
9115
|
+
alignItems: "center"
|
|
9116
|
+
}, React__default.createElement(BannerContent, null), React__default.createElement(Button, {
|
|
9117
|
+
theme: "link-contrast",
|
|
9118
|
+
onClick: onDismiss
|
|
9119
|
+
}, React__default.createElement(IconTimes, null))) : React__default.createElement(BannerContent, null));
|
|
9120
|
+
};
|
|
9121
|
+
|
|
9122
|
+
const getProgressMetric = (progress, maxValue) => {
|
|
9123
|
+
const updatedMaxValue = maxValue > 0 ? maxValue : 100;
|
|
9124
|
+
let updatedProgress = progress;
|
|
9125
|
+
if (updatedProgress > updatedMaxValue) {
|
|
9126
|
+
updatedProgress = updatedMaxValue;
|
|
9127
|
+
}
|
|
9128
|
+
if (updatedProgress < 0) {
|
|
9129
|
+
updatedProgress = 0;
|
|
9130
|
+
}
|
|
9131
|
+
return {
|
|
9132
|
+
progress: updatedProgress,
|
|
9133
|
+
maxValue: updatedMaxValue
|
|
9134
|
+
};
|
|
9135
|
+
};
|
|
9136
|
+
/**
|
|
9137
|
+
* This function calculates the progress bar so it can align in the center of each step
|
|
9138
|
+
*/
|
|
9139
|
+
const getProgressMetricWithSteps = (progress, amountOfSteps) => {
|
|
9140
|
+
const maxValue = amountOfSteps * 2;
|
|
9141
|
+
let actualProgress = progress;
|
|
9142
|
+
if (progress < 0) {
|
|
9143
|
+
actualProgress = 0;
|
|
9144
|
+
}
|
|
9145
|
+
if (progress > 0) {
|
|
9146
|
+
const previousProgress = (progress - 1) * 2;
|
|
9147
|
+
actualProgress = previousProgress + 1;
|
|
9148
|
+
}
|
|
9149
|
+
if (actualProgress > maxValue) {
|
|
9150
|
+
actualProgress = maxValue;
|
|
9151
|
+
}
|
|
9152
|
+
return {
|
|
9153
|
+
progress: actualProgress,
|
|
9154
|
+
maxValue
|
|
9155
|
+
};
|
|
9156
|
+
};
|
|
9157
|
+
|
|
9158
|
+
const useProgress = (progress, maxValue, getMetric = getProgressMetric) => {
|
|
9159
|
+
const metric = getMetric(progress, maxValue);
|
|
9160
|
+
const percentage = metric.progress / metric.maxValue * 100;
|
|
9161
|
+
const elementProps = {
|
|
9162
|
+
'aria-valuemax': metric.maxValue,
|
|
9163
|
+
'aria-valuemin': 0,
|
|
9164
|
+
'aria-valuenow': metric.progress,
|
|
9165
|
+
role: 'progressbar'
|
|
9166
|
+
};
|
|
9167
|
+
return {
|
|
9168
|
+
elementProps,
|
|
9169
|
+
metric: _extends({}, metric, {
|
|
9170
|
+
percentage
|
|
9171
|
+
})
|
|
9172
|
+
};
|
|
9173
|
+
};
|
|
9174
|
+
|
|
9175
|
+
var styles$J = {"circular-progress":"_UI0Fo","circular-progress__label":"_6PNwZ","circular-progress__track":"_alBLB","circular-progress__indicator":"_VADa6"};
|
|
9176
|
+
|
|
9177
|
+
const CircularProgress = ({
|
|
9178
|
+
progress,
|
|
9179
|
+
maxValue: _maxValue = 100,
|
|
9180
|
+
children,
|
|
9181
|
+
testId
|
|
9182
|
+
}) => {
|
|
9183
|
+
const {
|
|
9184
|
+
elementProps,
|
|
9185
|
+
metric
|
|
9186
|
+
} = useProgress(progress, _maxValue);
|
|
9187
|
+
const determinant = metric.percentage * 2.79;
|
|
9188
|
+
return React__default.createElement("div", _extends({}, elementProps, {
|
|
9189
|
+
className: styles$J['circular-progress'],
|
|
9190
|
+
"data-testid": testId
|
|
9191
|
+
}), React__default.createElement("svg", {
|
|
9192
|
+
viewBox: "0 0 100 100"
|
|
9193
|
+
}, React__default.createElement("circle", {
|
|
9194
|
+
cx: 50,
|
|
9195
|
+
cy: 50,
|
|
9196
|
+
r: 45,
|
|
9197
|
+
strokeWidth: "10px",
|
|
9198
|
+
className: styles$J['circular-progress__track']
|
|
9199
|
+
}), React__default.createElement("circle", {
|
|
9200
|
+
cx: 50,
|
|
9201
|
+
cy: 50,
|
|
9202
|
+
r: 45,
|
|
9203
|
+
strokeWidth: "10px",
|
|
9204
|
+
className: styles$J['circular-progress__indicator'],
|
|
9205
|
+
strokeDashoffset: "66",
|
|
9206
|
+
strokeDasharray: `${determinant} ${279 - determinant}`
|
|
9207
|
+
})), React__default.createElement("div", {
|
|
9208
|
+
className: styles$J['circular-progress__label']
|
|
9209
|
+
}, children || `${metric.progress}/${metric.maxValue}`));
|
|
9210
|
+
};
|
|
9211
|
+
|
|
9212
|
+
var styles$I = {"progress-bar":"_fWvQF","progress-bar__indicator":"_vd0xc","progress-bar__steps":"_8kdeO"};
|
|
9213
|
+
|
|
9214
|
+
const ProgressBar = ({
|
|
9215
|
+
progress,
|
|
9216
|
+
maxValue,
|
|
9217
|
+
testId,
|
|
9218
|
+
steps
|
|
9219
|
+
}) => {
|
|
9220
|
+
const isUsingStepsAsMaxValue = !maxValue && steps && steps.length > 0;
|
|
9221
|
+
const inferedMaxValue = !maxValue && steps && steps.length > 0 ? steps.length : maxValue;
|
|
9222
|
+
const {
|
|
9223
|
+
elementProps,
|
|
9224
|
+
metric
|
|
9225
|
+
} = useProgress(progress, inferedMaxValue || 100, isUsingStepsAsMaxValue ? getProgressMetricWithSteps : getProgressMetric);
|
|
9226
|
+
return React__default.createElement(Stack, null, React__default.createElement("div", _extends({}, elementProps, {
|
|
9227
|
+
className: styles$I['progress-bar'],
|
|
9228
|
+
"data-testid": testId
|
|
9229
|
+
}), React__default.createElement("div", {
|
|
9230
|
+
className: styles$I['progress-bar__indicator'],
|
|
9231
|
+
style: {
|
|
9232
|
+
width: `${metric.percentage}%`
|
|
9233
|
+
}
|
|
9234
|
+
})), steps && steps.length > 0 && React__default.createElement("div", {
|
|
9235
|
+
className: styles$I['progress-bar__steps']
|
|
9236
|
+
}, steps.map(step => React__default.createElement(Text, {
|
|
9237
|
+
key: step
|
|
9238
|
+
}, step))));
|
|
9239
|
+
};
|
|
9240
|
+
|
|
9241
|
+
var styles$H = {"skeleton":"_oDnLM","pulse":"_McmEv","skeleton__button":"_jPXx6","skeleton__pill":"_sPHSZ","skeleton__avatar":"_3vEYT","skeleton__avatar--small":"_zneq9","skeleton__avatar--medium":"_TtfoO","skeleton__avatar--large":"_jhOqR","skeleton__avatar--xlarge":"_VgGfx"};
|
|
9242
|
+
|
|
9243
|
+
const SKELETON_COMPONENT = {
|
|
9244
|
+
AVATAR: 'avatar',
|
|
9245
|
+
AVATAR_SMALL: 'avatar--small',
|
|
9246
|
+
AVATAR_MEDIUM: 'avatar--medium',
|
|
9247
|
+
AVATAR_LARGE: 'avatar--large',
|
|
9248
|
+
AVATAR_XLARGE: 'avatar--xlarge',
|
|
9249
|
+
BUTTON: 'button',
|
|
9250
|
+
PILL: 'pill'
|
|
9251
|
+
};
|
|
9252
|
+
|
|
9253
|
+
const _excluded$f = ["as", "testId", "width", "height"];
|
|
9254
|
+
const Skeleton = _ref => {
|
|
9255
|
+
let {
|
|
9256
|
+
as,
|
|
9257
|
+
testId,
|
|
9258
|
+
width,
|
|
9259
|
+
height
|
|
9260
|
+
} = _ref,
|
|
9261
|
+
positionStyles = _objectWithoutPropertiesLoose(_ref, _excluded$f);
|
|
9262
|
+
const positioning = usePositionStyles(positionStyles);
|
|
9263
|
+
return React__default.createElement("div", {
|
|
9264
|
+
"data-testid": testId,
|
|
9265
|
+
className: classnames(styles$H['skeleton'], {
|
|
9266
|
+
[styles$H['skeleton__avatar']]: as === SKELETON_COMPONENT.AVATAR,
|
|
9267
|
+
[styles$H['skeleton__avatar--small']]: as === SKELETON_COMPONENT.AVATAR_SMALL,
|
|
9268
|
+
[styles$H['skeleton__avatar--medium']]: as === SKELETON_COMPONENT.AVATAR_MEDIUM,
|
|
9269
|
+
[styles$H['skeleton__avatar--large']]: as === SKELETON_COMPONENT.AVATAR_LARGE,
|
|
9270
|
+
[styles$H['skeleton__avatar--xlarge']]: as === SKELETON_COMPONENT.AVATAR_XLARGE,
|
|
9271
|
+
[styles$H['skeleton__button']]: as === SKELETON_COMPONENT.BUTTON,
|
|
9272
|
+
[styles$H['skeleton__pill']]: as === SKELETON_COMPONENT.PILL
|
|
9273
|
+
}),
|
|
9274
|
+
style: _extends({}, positioning, {
|
|
9275
|
+
width: width,
|
|
9276
|
+
height: height
|
|
9277
|
+
})
|
|
9278
|
+
});
|
|
9279
|
+
};
|
|
9280
|
+
|
|
9281
|
+
var styles$G = {"data-table-row":"_hhDnr","data-table-row--clickable":"_ej5Ke","data-table-row--selected":"_qDTAh"};
|
|
9282
|
+
|
|
9283
|
+
var styles$F = {"actions":"_ffXgN"};
|
|
9284
|
+
|
|
9285
|
+
var styles$E = {"data-table-cell":"_cp8xi","data-table-cell--no-padding":"_gqbNb","data-table-cell--vertical-border":"_uHjkg","data-table-cell--invalid":"_ASOQd","data-table-cell__content":"_HjPNI","data-table-cell__content--right-align":"_BCVO6","data-table-cell__content--with-error":"_NqtPS","data-table-cell__content--loading":"_-rWoZ","data-table-cell__error-icon":"_txhua","data-table-cell__error-icon--right-align":"_fPzqj","data-table-cell__error-icon--left-align":"_L2-l-"};
|
|
9286
|
+
|
|
9201
9287
|
const DataTableCellElement = ({
|
|
9202
9288
|
children,
|
|
9203
9289
|
columnIndex,
|
|
@@ -9220,9 +9306,9 @@ const DataTableCellElement = ({
|
|
|
9220
9306
|
const hasError = !!error;
|
|
9221
9307
|
const errorMessage = error;
|
|
9222
9308
|
const icon = hasError && React__default.createElement("div", {
|
|
9223
|
-
className: classnames(styles$
|
|
9224
|
-
[styles$
|
|
9225
|
-
[styles$
|
|
9309
|
+
className: classnames(styles$E['data-table-cell__error-icon'], {
|
|
9310
|
+
[styles$E['data-table-cell__error-icon--right-align']]: isRightAligned,
|
|
9311
|
+
[styles$E['data-table-cell__error-icon--left-align']]: !isRightAligned
|
|
9226
9312
|
})
|
|
9227
9313
|
}, React__default.createElement(IconTimesOctagon, {
|
|
9228
9314
|
size: "medium",
|
|
@@ -9230,17 +9316,17 @@ const DataTableCellElement = ({
|
|
|
9230
9316
|
}));
|
|
9231
9317
|
const TableCell = React__default.createElement("td", {
|
|
9232
9318
|
className: classnames({
|
|
9233
|
-
[styles$
|
|
9234
|
-
[styles$
|
|
9235
|
-
[styles$
|
|
9236
|
-
}, styles$
|
|
9319
|
+
[styles$E['data-table-cell--invalid']]: hasError,
|
|
9320
|
+
[styles$E['data-table-cell--no-padding']]: _noPadding,
|
|
9321
|
+
[styles$E['data-table-cell--vertical-border']]: hasVerticalBorders
|
|
9322
|
+
}, styles$E['data-table-cell']),
|
|
9237
9323
|
colSpan: colSpan,
|
|
9238
9324
|
ref: ref
|
|
9239
9325
|
}, React__default.createElement("div", {
|
|
9240
|
-
className: classnames(styles$
|
|
9241
|
-
[styles$
|
|
9242
|
-
[styles$
|
|
9243
|
-
[styles$
|
|
9326
|
+
className: classnames(styles$E['data-table-cell__content'], {
|
|
9327
|
+
[styles$E['data-table-cell__content--with-error']]: hasError,
|
|
9328
|
+
[styles$E['data-table-cell__content--right-align']]: isRightAligned,
|
|
9329
|
+
[styles$E['data-table-cell__content--loading']]: state === DATA_TABLE_STATES.BACKGROUND_LOADING
|
|
9244
9330
|
})
|
|
9245
9331
|
}, isRightAligned && icon, children, !isRightAligned && icon));
|
|
9246
9332
|
return React__default.createElement(Tooltip, {
|
|
@@ -9264,7 +9350,7 @@ const DataTableRowActions = ({
|
|
|
9264
9350
|
return React__default.createElement(DataTableCell, {
|
|
9265
9351
|
columnIndex: columnIndex
|
|
9266
9352
|
}, React__default.createElement("div", {
|
|
9267
|
-
className: styles$
|
|
9353
|
+
className: styles$F['actions'],
|
|
9268
9354
|
"data-testid": "data-table-dropdown-menu"
|
|
9269
9355
|
}, state === 'SKELETON_LOADING' && React__default.createElement(Skeleton, {
|
|
9270
9356
|
width: 45
|
|
@@ -9277,7 +9363,7 @@ const DataTableRowActions = ({
|
|
|
9277
9363
|
})));
|
|
9278
9364
|
};
|
|
9279
9365
|
|
|
9280
|
-
var styles$
|
|
9366
|
+
var styles$D = {"data-table-editable-cell":"_jp9-G","data-table-editable-cell--right-aligned":"_BzPeH","data-table-editable-cell--currency":"_NhNG9","data-table-editable-cell--invalid":"_5HRwe","data-table-editable-cell--top-left":"_P--u2","data-table-editable-cell--top-right":"_EloAX","data-table-editable-cell--bottom-left":"_ZDCR9","data-table-editable-cell--bottom-right":"_Mc9YJ"};
|
|
9281
9367
|
|
|
9282
9368
|
const DataTableEditableCellElement = ({
|
|
9283
9369
|
name,
|
|
@@ -9325,8 +9411,8 @@ const DataTableEditableCellElement = ({
|
|
|
9325
9411
|
};
|
|
9326
9412
|
const EditableCell = React__default.createElement("div", {
|
|
9327
9413
|
className: classnames({
|
|
9328
|
-
[styles$
|
|
9329
|
-
}, styles$
|
|
9414
|
+
[styles$D['data-table-editable-cell--currency']]: _type === 'currency'
|
|
9415
|
+
}, styles$D['data-table-editable-cell']),
|
|
9330
9416
|
"data-testid": testId,
|
|
9331
9417
|
role: "cell"
|
|
9332
9418
|
}, React__default.createElement(Field, _extends({}, fieldProps), React__default.createElement(AffixContainer, {
|
|
@@ -9336,12 +9422,12 @@ const DataTableEditableCellElement = ({
|
|
|
9336
9422
|
name: name,
|
|
9337
9423
|
id: controllers.id,
|
|
9338
9424
|
className: classnames({
|
|
9339
|
-
[styles$
|
|
9340
|
-
[styles$
|
|
9341
|
-
[styles$
|
|
9342
|
-
[styles$
|
|
9343
|
-
[styles$
|
|
9344
|
-
[styles$
|
|
9425
|
+
[styles$D['data-table-editable-cell--right-aligned']]: isRightAligned,
|
|
9426
|
+
[styles$D['data-table-editable-cell--top-left']]: isTopLeftCell,
|
|
9427
|
+
[styles$D['data-table-editable-cell--top-right']]: isTopRightCell,
|
|
9428
|
+
[styles$D['data-table-editable-cell--bottom-left']]: isBottomLeftCell,
|
|
9429
|
+
[styles$D['data-table-editable-cell--bottom-right']]: isBottomRightCell,
|
|
9430
|
+
[styles$D['data-table-editable-cell--invalid']]: hasError
|
|
9345
9431
|
}),
|
|
9346
9432
|
type: _type === 'currency' ? 'number' : 'text',
|
|
9347
9433
|
step: _type === 'currency' ? 'any' : '',
|
|
@@ -9367,7 +9453,7 @@ const DataTableEditableCellElement = ({
|
|
|
9367
9453
|
};
|
|
9368
9454
|
const DataTableEditableCell = forwardRef(DataTableEditableCellElement);
|
|
9369
9455
|
|
|
9370
|
-
const _excluded$
|
|
9456
|
+
const _excluded$e = ["children", "onClick", "isSelected", "actions", "hasDefaultPadding", "hasDefaultCell", "testId"];
|
|
9371
9457
|
const DataTableRowComponent = (_ref, ref) => {
|
|
9372
9458
|
let {
|
|
9373
9459
|
children,
|
|
@@ -9378,13 +9464,13 @@ const DataTableRowComponent = (_ref, ref) => {
|
|
|
9378
9464
|
hasDefaultCell = true,
|
|
9379
9465
|
testId
|
|
9380
9466
|
} = _ref,
|
|
9381
|
-
nativeDivProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
9467
|
+
nativeDivProps = _objectWithoutPropertiesLoose(_ref, _excluded$e);
|
|
9382
9468
|
const {
|
|
9383
9469
|
showActionMenu
|
|
9384
9470
|
} = useDataTableContext();
|
|
9385
|
-
const styleNames = classnames(styles$
|
|
9386
|
-
[styles$
|
|
9387
|
-
[styles$
|
|
9471
|
+
const styleNames = classnames(styles$G['data-table-row'], {
|
|
9472
|
+
[styles$G['data-table-row--clickable']]: onClick,
|
|
9473
|
+
[styles$G['data-table-row--selected']]: isSelected
|
|
9388
9474
|
});
|
|
9389
9475
|
const renderColumn = (columnElement, index) => {
|
|
9390
9476
|
const isUsingDataTableCell = columnElement && typeof columnElement === 'object' && 'type' in columnElement && (columnElement == null ? void 0 : columnElement.type) === DataTableCell;
|
|
@@ -9475,7 +9561,7 @@ const calculateScrollState = scrollContainer => {
|
|
|
9475
9561
|
return DATA_TABLE_SCROLL_STATES.NO_SCROLL;
|
|
9476
9562
|
};
|
|
9477
9563
|
|
|
9478
|
-
var styles$
|
|
9564
|
+
var styles$C = {"data-table-sticky-columns-container":"_j5iVD","data-table-sticky-columns-container--with-left-sticky-columns-and-shadow":"_7dAEd","data-table-sticky-columns-container--no-shadow":"_rR4W3","fadein":"_b1-OB","data-table-sticky-columns-container--with-left-sticky-columns":"_qLE4I","data-table-sticky-columns-container--with-right-sticky-columns-and-shadow":"_B92Ir","data-table-sticky-columns-container--with-right-sticky-columns":"_ONjpl","data-table-sticky-columns-container--with-footer":"_DE3fh"};
|
|
9479
9565
|
|
|
9480
9566
|
const useDataTableScrollState = stickyColumns => {
|
|
9481
9567
|
const scrollContainerRef = useRef(null);
|
|
@@ -9517,7 +9603,7 @@ const useDataTableScrollState = stickyColumns => {
|
|
|
9517
9603
|
};
|
|
9518
9604
|
};
|
|
9519
9605
|
|
|
9520
|
-
var styles$
|
|
9606
|
+
var styles$B = {"data-table-cover-shadow":"_4XrxW","data-table-cover-shadow--left":"_k704p","data-table-cover-shadow--left-shadow":"_VXlf0","fadeinshadowleft":"_Fr-av","data-table-cover-shadow--right":"_wOust","data-table-cover-shadow--right-shadow":"_b3Rzx","fadeinshadowright":"_KgJaq"};
|
|
9521
9607
|
|
|
9522
9608
|
const DataTableCoverShadow = ({
|
|
9523
9609
|
isShowingColumns,
|
|
@@ -9535,11 +9621,11 @@ const DataTableCoverShadow = ({
|
|
|
9535
9621
|
return `calc(100% - ${headerHeight})`;
|
|
9536
9622
|
};
|
|
9537
9623
|
return React__default.createElement("div", {
|
|
9538
|
-
className: classnames(styles$
|
|
9539
|
-
[styles$
|
|
9540
|
-
[styles$
|
|
9541
|
-
[styles$
|
|
9542
|
-
[styles$
|
|
9624
|
+
className: classnames(styles$B['data-table-cover-shadow'], {
|
|
9625
|
+
[styles$B['data-table-cover-shadow--left']]: direction === 'left',
|
|
9626
|
+
[styles$B['data-table-cover-shadow--left-shadow']]: direction === 'left' && showShadow,
|
|
9627
|
+
[styles$B['data-table-cover-shadow--right']]: direction === 'right',
|
|
9628
|
+
[styles$B['data-table-cover-shadow--right-shadow']]: direction === 'right' && showShadow
|
|
9543
9629
|
}),
|
|
9544
9630
|
style: {
|
|
9545
9631
|
// @ts-expect-error This difines a custom CSS variable
|
|
@@ -9601,13 +9687,13 @@ const DataTableStickyColumnsContainer = ({
|
|
|
9601
9687
|
isShowingColumns: !!isShowingColumns,
|
|
9602
9688
|
showShadow: state === 'EMPTY' ? false : stickyColumns === 'left'
|
|
9603
9689
|
})), React__default.createElement("div", {
|
|
9604
|
-
className: classnames(styles$
|
|
9605
|
-
[styles$
|
|
9606
|
-
[styles$
|
|
9607
|
-
[styles$
|
|
9608
|
-
[styles$
|
|
9609
|
-
[styles$
|
|
9610
|
-
[styles$
|
|
9690
|
+
className: classnames(styles$C[containerClassName], {
|
|
9691
|
+
[styles$C[`${containerClassName}--with-footer`]]: isShowingFooter,
|
|
9692
|
+
[styles$C[`${containerClassName}--with-left-sticky-columns`]]: hasLeftColumnSticky,
|
|
9693
|
+
[styles$C[`${containerClassName}--with-left-sticky-columns-and-shadow`]]: state !== 'EMPTY' ? hasLeftColumnSticky && hasScrollOnLeft : false,
|
|
9694
|
+
[styles$C[`${containerClassName}--with-right-sticky-columns`]]: hasRightColumnSticky,
|
|
9695
|
+
[styles$C[`${containerClassName}--with-right-sticky-columns-and-shadow`]]: state !== 'EMPTY' ? hasRightColumnSticky && hasScrollOnRight : false,
|
|
9696
|
+
[styles$C[`${containerClassName}--no-shadow`]]: noShadow
|
|
9611
9697
|
}),
|
|
9612
9698
|
onScroll: onScroll,
|
|
9613
9699
|
ref: scrollContainerRef,
|
|
@@ -9615,11 +9701,11 @@ const DataTableStickyColumnsContainer = ({
|
|
|
9615
9701
|
}, children));
|
|
9616
9702
|
};
|
|
9617
9703
|
|
|
9618
|
-
var styles$
|
|
9704
|
+
var styles$A = {"data-table-empty-state":"_fCHjG"};
|
|
9619
9705
|
|
|
9620
|
-
var styles$
|
|
9706
|
+
var styles$z = {"empty-state-container-stack":"_4nO7T","empty-state-container-stack__content":"_KiEVo","empty-state-container-stack__content--full-page":"_ib04g","empty-state-container-stack__content--inline-horizontal":"_bSiJj","empty-state-container-stack__body":"_mi-dC"};
|
|
9621
9707
|
|
|
9622
|
-
var styles$
|
|
9708
|
+
var styles$y = {"empty-state-container-cta":"_X-dEs","empty-state-container-cta--inside-modal":"_63-SX"};
|
|
9623
9709
|
|
|
9624
9710
|
const EmptyStateContainerCTA = ({
|
|
9625
9711
|
isPaywall,
|
|
@@ -9636,8 +9722,8 @@ const EmptyStateContainerCTA = ({
|
|
|
9636
9722
|
size: BUTTON_SIZES.MIN_WIDTH_100
|
|
9637
9723
|
});
|
|
9638
9724
|
return React__default.createElement("div", {
|
|
9639
|
-
className: classnames(styles$
|
|
9640
|
-
[styles$
|
|
9725
|
+
className: classnames(styles$y['empty-state-container-cta'], {
|
|
9726
|
+
[styles$y['empty-state-container-cta--inside-modal']]: _isInsideModal
|
|
9641
9727
|
})
|
|
9642
9728
|
}, primaryButton, secondaryButton);
|
|
9643
9729
|
};
|
|
@@ -9654,7 +9740,7 @@ const EmptyStateContainerStack = ({
|
|
|
9654
9740
|
mediaComponent
|
|
9655
9741
|
}) => {
|
|
9656
9742
|
return React__default.createElement("div", {
|
|
9657
|
-
className: styles$
|
|
9743
|
+
className: styles$z['empty-state-container-stack'],
|
|
9658
9744
|
"data-testid": testId
|
|
9659
9745
|
}, mediaComponent ? mediaComponent : mediaUrl && React__default.createElement("img", {
|
|
9660
9746
|
src: mediaUrl,
|
|
@@ -9671,7 +9757,7 @@ const EmptyStateContainerStack = ({
|
|
|
9671
9757
|
as: "body",
|
|
9672
9758
|
alignment: "center"
|
|
9673
9759
|
}, title), React__default.createElement("div", {
|
|
9674
|
-
className: styles$
|
|
9760
|
+
className: styles$z['empty-state-container-stack__body']
|
|
9675
9761
|
}, children)), React__default.createElement(Stack, {
|
|
9676
9762
|
space: 8,
|
|
9677
9763
|
alignItems: "center"
|
|
@@ -9782,7 +9868,7 @@ const DataTableEmptyState = ({
|
|
|
9782
9868
|
columnIndex: shouldRenderStickyLeftCell ? 1 : 0,
|
|
9783
9869
|
colSpan: colSpan
|
|
9784
9870
|
}, React__default.createElement("div", {
|
|
9785
|
-
className: styles$
|
|
9871
|
+
className: styles$A['data-table-empty-state']
|
|
9786
9872
|
}, React__default.createElement(EmptyStateContainerStack, {
|
|
9787
9873
|
mediaUrl: customImage,
|
|
9788
9874
|
mediaComponent: customImage === '' ? React__default.createElement(MagnifyingGlassIllustration, null) : undefined,
|
|
@@ -9794,7 +9880,7 @@ const DataTableEmptyState = ({
|
|
|
9794
9880
|
}, ''));
|
|
9795
9881
|
};
|
|
9796
9882
|
|
|
9797
|
-
const _excluded$
|
|
9883
|
+
const _excluded$d = ["items", "columns", "itemComponent", "maxHeight", "hasPrevious", "hasNext", "onPreviousClick", "onNextClick", "onSort", "isLoading", "showActionMenu", "footerComponent", "hasVerticalBorders", "testId", "skeletonRowLayout", "stickyColumns", "emptyState"];
|
|
9798
9884
|
const DataTable = _ref => {
|
|
9799
9885
|
let {
|
|
9800
9886
|
items,
|
|
@@ -9815,7 +9901,7 @@ const DataTable = _ref => {
|
|
|
9815
9901
|
stickyColumns,
|
|
9816
9902
|
emptyState
|
|
9817
9903
|
} = _ref,
|
|
9818
|
-
otherProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
9904
|
+
otherProps = _objectWithoutPropertiesLoose(_ref, _excluded$d);
|
|
9819
9905
|
const {
|
|
9820
9906
|
dataProps
|
|
9821
9907
|
} = getDataProps(otherProps);
|
|
@@ -9861,7 +9947,7 @@ const DataTable = _ref => {
|
|
|
9861
9947
|
return null;
|
|
9862
9948
|
}
|
|
9863
9949
|
return React__default.createElement("div", {
|
|
9864
|
-
className: styles$
|
|
9950
|
+
className: styles$1c['data-table__pagination-controls'],
|
|
9865
9951
|
"data-testid": testId && `${testId}-pagination-controls`
|
|
9866
9952
|
}, React__default.createElement(PaginationControls, {
|
|
9867
9953
|
hasPrevious: isLoading ? false : hasPrevious,
|
|
@@ -9884,7 +9970,7 @@ const DataTable = _ref => {
|
|
|
9884
9970
|
tableId
|
|
9885
9971
|
}
|
|
9886
9972
|
}, React__default.createElement("div", {
|
|
9887
|
-
className: classnames(styles$
|
|
9973
|
+
className: classnames(styles$1c['data-table']),
|
|
9888
9974
|
ref: tableRef
|
|
9889
9975
|
}, React__default.createElement(DataTableStickyColumnsContainer, {
|
|
9890
9976
|
stickyColumns: stickyColumns,
|
|
@@ -9894,24 +9980,24 @@ const DataTable = _ref => {
|
|
|
9894
9980
|
placement: "top",
|
|
9895
9981
|
isShowingColumns: !!isShowingColumns
|
|
9896
9982
|
}), React__default.createElement("div", {
|
|
9897
|
-
className: classnames(styles$
|
|
9898
|
-
[styles$
|
|
9983
|
+
className: classnames(styles$1c['data-table__content'], {
|
|
9984
|
+
[styles$1c['data-table__content--with-scroll']]: isScrollableTable
|
|
9899
9985
|
}),
|
|
9900
9986
|
style: conditionalStyles,
|
|
9901
9987
|
id: `${tableId}-content`
|
|
9902
9988
|
}, state === DATA_TABLE_STATES.BACKGROUND_LOADING && React__default.createElement("div", {
|
|
9903
|
-
className: styles$
|
|
9989
|
+
className: styles$1c['data-table__background-loading']
|
|
9904
9990
|
}, React__default.createElement(Spinner, null)), React__default.createElement("table", _extends({
|
|
9905
|
-
className: classnames(styles$
|
|
9906
|
-
[styles$
|
|
9991
|
+
className: classnames(styles$1c['data-table__table'], {
|
|
9992
|
+
[styles$1c['data-table__table--no-columns']]: !isShowingColumns
|
|
9907
9993
|
})
|
|
9908
9994
|
}, dataProps), columns && isShowingColumns && React__default.createElement(DataTableHeader, {
|
|
9909
9995
|
columns: columns,
|
|
9910
9996
|
onSort: onSort,
|
|
9911
9997
|
showActionMenu: isShowingContent && showActionMenu
|
|
9912
9998
|
}), React__default.createElement("tbody", {
|
|
9913
|
-
className: classnames(styles$
|
|
9914
|
-
[styles$
|
|
9999
|
+
className: classnames(styles$1c['data-table__body'], {
|
|
10000
|
+
[styles$1c['data-table__body--no-bottom-radius']]: isShowingFooter && isShowingContent
|
|
9915
10001
|
}),
|
|
9916
10002
|
"data-testid": testId
|
|
9917
10003
|
}, isShowingContent && content.map((item, index) => {
|
|
@@ -9930,7 +10016,7 @@ const DataTable = _ref => {
|
|
|
9930
10016
|
}), state === DATA_TABLE_STATES.SKELETON_LOADING && React__default.createElement(React__default.Fragment, null, skeletonRows.map((_, index) => React__default.createElement(SkeletonRow, {
|
|
9931
10017
|
key: index
|
|
9932
10018
|
})))), isShowingFooter && isShowingContent && React__default.createElement("tfoot", {
|
|
9933
|
-
className: styles$
|
|
10019
|
+
className: styles$1c['data-table__footer'],
|
|
9934
10020
|
"data-testid": testId && `${testId}-footer`
|
|
9935
10021
|
}, footerComponent)))), !isShowingFooter && isScrollableTable && React__default.createElement(DataTableScrollFakeBorder, {
|
|
9936
10022
|
placement: "bottom",
|
|
@@ -9938,7 +10024,7 @@ const DataTable = _ref => {
|
|
|
9938
10024
|
})), React__default.createElement(Pagination, null));
|
|
9939
10025
|
};
|
|
9940
10026
|
|
|
9941
|
-
var styles$
|
|
10027
|
+
var styles$x = {"accordion-item":"_8980Z","accordion-item__link":"_C-YV6","accordion-item__header":"_vk-N-","accordion-item__icon":"_LSVms","accordion-item__icon--active":"_hLMLR","accordion-item__content":"_KFyFh","accordion-item__content--active":"_kykXP"};
|
|
9942
10028
|
|
|
9943
10029
|
const AccordionItem = props => {
|
|
9944
10030
|
const {
|
|
@@ -9953,9 +10039,9 @@ const AccordionItem = props => {
|
|
|
9953
10039
|
} = item;
|
|
9954
10040
|
const isFocusedByClickRef = React__default.useRef(false);
|
|
9955
10041
|
return React__default.createElement("div", {
|
|
9956
|
-
className: styles$
|
|
10042
|
+
className: styles$x['accordion-item']
|
|
9957
10043
|
}, React__default.createElement("button", {
|
|
9958
|
-
className: styles$
|
|
10044
|
+
className: styles$x['accordion-item__header'],
|
|
9959
10045
|
onClick: () => {
|
|
9960
10046
|
if (isOpen) {
|
|
9961
10047
|
handleAccordionItemOpen(null);
|
|
@@ -9983,17 +10069,17 @@ const AccordionItem = props => {
|
|
|
9983
10069
|
color: "grey-500",
|
|
9984
10070
|
emphasis: "bold"
|
|
9985
10071
|
}, title), React__default.createElement(IconChevronDown, {
|
|
9986
|
-
className: styles$
|
|
10072
|
+
className: styles$x[`accordion-item__icon${isOpen ? '--active' : ''}`],
|
|
9987
10073
|
color: 'grey-400'
|
|
9988
10074
|
}))), React__default.createElement("div", {
|
|
9989
10075
|
"data-testid": `${isOpen ? 'accordion-item-' + id + '-open' : 'accordion-item-' + id + '-closed'}`,
|
|
9990
|
-
className: styles$
|
|
10076
|
+
className: styles$x[`accordion-item__content${isOpen ? '--active' : ''}`]
|
|
9991
10077
|
}, isOpen && React__default.createElement(Text, {
|
|
9992
10078
|
color: "grey-500"
|
|
9993
10079
|
}, content)));
|
|
9994
10080
|
};
|
|
9995
10081
|
|
|
9996
|
-
var styles$
|
|
10082
|
+
var styles$w = {"accordion":"_058SP"};
|
|
9997
10083
|
|
|
9998
10084
|
const Accordion = props => {
|
|
9999
10085
|
const {
|
|
@@ -10013,7 +10099,7 @@ const Accordion = props => {
|
|
|
10013
10099
|
isAccordionMounted: true
|
|
10014
10100
|
}
|
|
10015
10101
|
}, React__default.createElement("div", {
|
|
10016
|
-
className: styles$
|
|
10102
|
+
className: styles$w['accordion']
|
|
10017
10103
|
}, items.map((item, index) => {
|
|
10018
10104
|
const id = item.id || index.toString();
|
|
10019
10105
|
return React__default.createElement(AccordionItem, {
|
|
@@ -10027,7 +10113,7 @@ const Accordion = props => {
|
|
|
10027
10113
|
})));
|
|
10028
10114
|
};
|
|
10029
10115
|
|
|
10030
|
-
var styles$
|
|
10116
|
+
var styles$v = {"action-list":"_pWke5","action-list__title":"_p8I7K","action-list__empty-state":"_l-tFB"};
|
|
10031
10117
|
|
|
10032
10118
|
const ActionList = ({
|
|
10033
10119
|
children,
|
|
@@ -10038,15 +10124,15 @@ const ActionList = ({
|
|
|
10038
10124
|
}) => {
|
|
10039
10125
|
const translate = useTranslation('ActionList');
|
|
10040
10126
|
return React__default.createElement("div", {
|
|
10041
|
-
className: styles$
|
|
10127
|
+
className: styles$v['action-list'],
|
|
10042
10128
|
"data-testid": testId,
|
|
10043
10129
|
style: {
|
|
10044
10130
|
maxHeight: maxHeight
|
|
10045
10131
|
}
|
|
10046
10132
|
}, title && React__default.createElement("div", {
|
|
10047
|
-
className: styles$
|
|
10133
|
+
className: styles$v['action-list__title']
|
|
10048
10134
|
}, title), children ? children : React__default.createElement("div", {
|
|
10049
|
-
className: styles$
|
|
10135
|
+
className: styles$v['action-list__empty-state']
|
|
10050
10136
|
}, React__default.createElement(EmptyStateContainerStack, {
|
|
10051
10137
|
title: (emptyState == null ? void 0 : emptyState.title) || translate('emptyStateTitle'),
|
|
10052
10138
|
mediaUrl: emptyState == null ? void 0 : emptyState.image,
|
|
@@ -10207,21 +10293,21 @@ const useSelectFieldControllers = ({
|
|
|
10207
10293
|
return controllers;
|
|
10208
10294
|
};
|
|
10209
10295
|
|
|
10210
|
-
var styles$
|
|
10296
|
+
var styles$u = {"custom-control":"_pXQqq"};
|
|
10211
10297
|
|
|
10212
|
-
const _excluded$
|
|
10298
|
+
const _excluded$c = ["children"];
|
|
10213
10299
|
function CustomControl(_ref) {
|
|
10214
10300
|
var _props$getValue;
|
|
10215
10301
|
let {
|
|
10216
10302
|
children
|
|
10217
10303
|
} = _ref,
|
|
10218
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
10304
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$c);
|
|
10219
10305
|
const {
|
|
10220
10306
|
SelectedOptionPrefix
|
|
10221
10307
|
} = props.selectProps.componentsProps;
|
|
10222
10308
|
const selectedOption = (_props$getValue = props.getValue()) == null ? void 0 : _props$getValue[0];
|
|
10223
10309
|
return React__default.createElement(components.Control, _extends({}, props), SelectedOptionPrefix && selectedOption ? React__default.createElement("div", {
|
|
10224
|
-
className: styles$
|
|
10310
|
+
className: styles$u['custom-control'],
|
|
10225
10311
|
style: {
|
|
10226
10312
|
paddingLeft: selectedOption ? 8 : 0
|
|
10227
10313
|
}
|
|
@@ -10234,12 +10320,12 @@ function CustomControl(_ref) {
|
|
|
10234
10320
|
}, props)), children)) : children);
|
|
10235
10321
|
}
|
|
10236
10322
|
|
|
10237
|
-
const _excluded$
|
|
10323
|
+
const _excluded$b = ["children"];
|
|
10238
10324
|
function CustomOption(_ref) {
|
|
10239
10325
|
let {
|
|
10240
10326
|
children
|
|
10241
10327
|
} = _ref,
|
|
10242
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
10328
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$b);
|
|
10243
10329
|
const {
|
|
10244
10330
|
UserCustomOption
|
|
10245
10331
|
} = props.selectProps.componentsProps;
|
|
@@ -10383,14 +10469,14 @@ const CustomContainer = props => {
|
|
|
10383
10469
|
}));
|
|
10384
10470
|
};
|
|
10385
10471
|
|
|
10386
|
-
var styles$
|
|
10472
|
+
var styles$t = {"custom-menu-text-field":"_AAUjm","custom-menu-hr":"_mFLK9","custom-menu-div":"_1XpI4"};
|
|
10387
10473
|
|
|
10388
|
-
const _excluded$
|
|
10474
|
+
const _excluded$a = ["children"];
|
|
10389
10475
|
function CustomMenu(_ref) {
|
|
10390
10476
|
let {
|
|
10391
10477
|
children
|
|
10392
10478
|
} = _ref,
|
|
10393
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
10479
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$a);
|
|
10394
10480
|
const {
|
|
10395
10481
|
creatableButton,
|
|
10396
10482
|
onMenuInputFocus,
|
|
@@ -10450,15 +10536,15 @@ function CustomMenu(_ref) {
|
|
|
10450
10536
|
return React__default.createElement(components.Menu, _extends({}, props), React__default.createElement("div", {
|
|
10451
10537
|
ref: containerRef
|
|
10452
10538
|
}, children, React__default.createElement("hr", {
|
|
10453
|
-
className: styles$
|
|
10539
|
+
className: styles$t['custom-menu-hr']
|
|
10454
10540
|
}), !showFooter ? React__default.createElement(CreatableButton, null) : React__default.createElement("div", {
|
|
10455
|
-
className: styles$
|
|
10541
|
+
className: styles$t['custom-menu-div']
|
|
10456
10542
|
}, React__default.createElement(Flex, {
|
|
10457
10543
|
space: 4,
|
|
10458
10544
|
flex: [1],
|
|
10459
10545
|
flexItems: true
|
|
10460
10546
|
}, React__default.createElement("input", {
|
|
10461
|
-
className: classnames(styles$
|
|
10547
|
+
className: classnames(styles$12['text-field'], styles$t['custom-menu-text-field']),
|
|
10462
10548
|
autoCorrect: "off",
|
|
10463
10549
|
autoComplete: "off",
|
|
10464
10550
|
spellCheck: "false",
|
|
@@ -10494,7 +10580,7 @@ function CustomMenu(_ref) {
|
|
|
10494
10580
|
}, __('createButton'))))));
|
|
10495
10581
|
}
|
|
10496
10582
|
|
|
10497
|
-
const _excluded$
|
|
10583
|
+
const _excluded$9 = ["asToolbarFilter", "caption", "disabled", "error", "id", "isClearable", "label", "menuShouldScrollIntoView", "name", "noOptionsMessage", "options", "onBlur", "onChange", "placeholder", "value", "defaultValue", "CustomOption", "SelectedOptionPrefix", "testId", "creatableButton", "onCreate", "isSearchable", "autoFocus"];
|
|
10498
10584
|
const useSelectField = _ref => {
|
|
10499
10585
|
let {
|
|
10500
10586
|
asToolbarFilter = false,
|
|
@@ -10521,7 +10607,7 @@ const useSelectField = _ref => {
|
|
|
10521
10607
|
isSearchable = true,
|
|
10522
10608
|
autoFocus
|
|
10523
10609
|
} = _ref,
|
|
10524
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
10610
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$9);
|
|
10525
10611
|
const [isMenuInputFocus, setIsMenuInputFocus] = useState(false);
|
|
10526
10612
|
const onMenuInputFocus = isFocused => setIsMenuInputFocus(isFocused);
|
|
10527
10613
|
const controllers = useSelectFieldControllers({
|
|
@@ -10593,7 +10679,7 @@ const useSelectField = _ref => {
|
|
|
10593
10679
|
};
|
|
10594
10680
|
};
|
|
10595
10681
|
|
|
10596
|
-
var styles$
|
|
10682
|
+
var styles$s = {"select-field__suffix":"_vqC1M"};
|
|
10597
10683
|
|
|
10598
10684
|
/** Component to make possible choose from a predefined options. */
|
|
10599
10685
|
const SelectField = props => {
|
|
@@ -10603,7 +10689,7 @@ const SelectField = props => {
|
|
|
10603
10689
|
} = useSelectField(props);
|
|
10604
10690
|
//Select field has the chevron icon as suffix, so we need to add a margin to the suffix to avoid overlapping with the chevron icon
|
|
10605
10691
|
const suffixWithMargin = props.suffix ? React__default.createElement("div", {
|
|
10606
|
-
className: styles$
|
|
10692
|
+
className: styles$s['select-field__suffix']
|
|
10607
10693
|
}, props.suffix) : undefined;
|
|
10608
10694
|
return React__default.createElement(Field, _extends({}, fieldProps), React__default.createElement(AffixContainer, {
|
|
10609
10695
|
prefix: props.prefix,
|
|
@@ -10645,9 +10731,9 @@ const ToolbarSelect = ({
|
|
|
10645
10731
|
});
|
|
10646
10732
|
};
|
|
10647
10733
|
|
|
10648
|
-
var styles$
|
|
10734
|
+
var styles$r = {"date-filter":"_PyXfe","date-filter--wide":"_P6ttU"};
|
|
10649
10735
|
|
|
10650
|
-
var styles$
|
|
10736
|
+
var styles$q = {"date-filter-display":"_N37zE","date-filter-display--non-interactive":"_42Bvz","date-filter-display--wide":"_h8n2w","date-filter-display__display-icon":"_i08yV"};
|
|
10651
10737
|
|
|
10652
10738
|
const DATE_FILTER_MODE = {
|
|
10653
10739
|
DAY: 'day',
|
|
@@ -10701,9 +10787,9 @@ const DateFilterDisplay = forwardRef(({
|
|
|
10701
10787
|
onClick
|
|
10702
10788
|
}, ref) => {
|
|
10703
10789
|
return React__default.createElement("button", {
|
|
10704
|
-
className: classnames(styles$
|
|
10705
|
-
[styles$
|
|
10706
|
-
[styles$
|
|
10790
|
+
className: classnames(styles$q['date-filter-display'], {
|
|
10791
|
+
[styles$q['date-filter-display--wide']]: mode === DATE_FILTER_MODE.WEEK,
|
|
10792
|
+
[styles$q['date-filter-display--non-interactive']]: mode === DATE_FILTER_MODE.MONTH
|
|
10707
10793
|
}),
|
|
10708
10794
|
onClick: onClick,
|
|
10709
10795
|
tabIndex: mode === DATE_FILTER_MODE.MONTH ? -1 : undefined,
|
|
@@ -10712,7 +10798,7 @@ const DateFilterDisplay = forwardRef(({
|
|
|
10712
10798
|
space: 12,
|
|
10713
10799
|
alignItems: "center"
|
|
10714
10800
|
}, React__default.createElement("div", {
|
|
10715
|
-
className: classnames(styles$
|
|
10801
|
+
className: classnames(styles$q['date-filter-display__display-icon'])
|
|
10716
10802
|
}, React__default.createElement(IconCalendarAlt, {
|
|
10717
10803
|
size: "flexible",
|
|
10718
10804
|
color: "grey-400"
|
|
@@ -10723,7 +10809,7 @@ const DateFilterDisplay = forwardRef(({
|
|
|
10723
10809
|
})));
|
|
10724
10810
|
});
|
|
10725
10811
|
|
|
10726
|
-
var styles$
|
|
10812
|
+
var styles$p = {"date-stepper":"_9wFtw","date-stepper--backward":"_OrtcR","date-stepper--forward":"_oYoUt"};
|
|
10727
10813
|
|
|
10728
10814
|
const handleDateStepper = (date, mode, stepDirection, onChange) => {
|
|
10729
10815
|
const step = stepDirection === STEP_DIRECTION.FORWARD ? 1 : -1;
|
|
@@ -10752,9 +10838,9 @@ const DateFilterStepper = ({
|
|
|
10752
10838
|
date
|
|
10753
10839
|
}) => {
|
|
10754
10840
|
return React__default.createElement("button", {
|
|
10755
|
-
className: classnames(styles$
|
|
10756
|
-
[styles$
|
|
10757
|
-
[styles$
|
|
10841
|
+
className: classnames(styles$p['date-stepper'], {
|
|
10842
|
+
[styles$p['date-stepper--backward']]: stepDirection === STEP_DIRECTION.BACKWARD,
|
|
10843
|
+
[styles$p['date-stepper--forward']]: stepDirection === STEP_DIRECTION.FORWARD
|
|
10758
10844
|
}),
|
|
10759
10845
|
onClick: () => handleDateStepper(date, mode, stepDirection, onChange)
|
|
10760
10846
|
}, children);
|
|
@@ -10776,8 +10862,8 @@ const DateFilter = ({
|
|
|
10776
10862
|
const onClickOutside = useCallback(() => setCalendarOpen(false), [setCalendarOpen]);
|
|
10777
10863
|
return React__default.createElement("div", {
|
|
10778
10864
|
"data-testid": testId,
|
|
10779
|
-
className: classnames(styles$
|
|
10780
|
-
[styles$
|
|
10865
|
+
className: classnames(styles$r['date-filter'], {
|
|
10866
|
+
[styles$r['date-filter--wide']]: _mode === DATE_FILTER_MODE.WEEK
|
|
10781
10867
|
})
|
|
10782
10868
|
}, React__default.createElement(Inline, {
|
|
10783
10869
|
space: 0
|
|
@@ -10814,7 +10900,7 @@ const DateFilter = ({
|
|
|
10814
10900
|
}));
|
|
10815
10901
|
};
|
|
10816
10902
|
|
|
10817
|
-
var styles$
|
|
10903
|
+
var styles$o = {"segmented-control":"_RezMY","segmented-control__button":"_lehFG","segmented-control__button--selected":"_Fr5kb","segmented-control__divider":"_GEqG9"};
|
|
10818
10904
|
|
|
10819
10905
|
const SegmentedControl = ({
|
|
10820
10906
|
options,
|
|
@@ -10829,23 +10915,23 @@ const SegmentedControl = ({
|
|
|
10829
10915
|
return index === options.length - 1;
|
|
10830
10916
|
};
|
|
10831
10917
|
return React__default.createElement("div", {
|
|
10832
|
-
className: styles$
|
|
10918
|
+
className: styles$o['segmented-control'],
|
|
10833
10919
|
"data-testid": testId
|
|
10834
10920
|
}, options.map((option, i) => React__default.createElement(React__default.Fragment, {
|
|
10835
10921
|
key: option
|
|
10836
10922
|
}, React__default.createElement("button", {
|
|
10837
10923
|
onClick: () => onChange(option),
|
|
10838
|
-
className: classnames(styles$
|
|
10839
|
-
[styles$
|
|
10924
|
+
className: classnames(styles$o['segmented-control__button'], {
|
|
10925
|
+
[styles$o['segmented-control__button--selected']]: isSelected(option)
|
|
10840
10926
|
})
|
|
10841
10927
|
}, option), !isLastElement(i) && React__default.createElement("div", {
|
|
10842
|
-
className: classnames(styles$
|
|
10928
|
+
className: classnames(styles$o['segmented-control__divider'])
|
|
10843
10929
|
}))));
|
|
10844
10930
|
};
|
|
10845
10931
|
|
|
10846
|
-
var styles$
|
|
10932
|
+
var styles$n = {"form--standard-size":"_8-Ykj"};
|
|
10847
10933
|
|
|
10848
|
-
var styles$
|
|
10934
|
+
var styles$m = {"form-section":"_3uYIj","form-section__title":"_2WdOf","form-section__subtitle":"_zybxx","form-section--no-margin":"_xT-U1"};
|
|
10849
10935
|
|
|
10850
10936
|
const FormSection = ({
|
|
10851
10937
|
children,
|
|
@@ -10858,13 +10944,13 @@ const FormSection = ({
|
|
|
10858
10944
|
const content = React__default.createElement(Stack, null, (title || subtitle) && React__default.createElement(Stack, {
|
|
10859
10945
|
space: 8
|
|
10860
10946
|
}, title && React__default.createElement("h2", {
|
|
10861
|
-
className: classnames(styles$
|
|
10947
|
+
className: classnames(styles$m['form-section__title'])
|
|
10862
10948
|
}, title), subtitle && React__default.createElement("h3", {
|
|
10863
|
-
className: classnames(styles$
|
|
10949
|
+
className: classnames(styles$m['form-section__subtitle'])
|
|
10864
10950
|
}, subtitle)), children);
|
|
10865
10951
|
return React__default.createElement("div", {
|
|
10866
|
-
className: classnames(styles$
|
|
10867
|
-
[styles$
|
|
10952
|
+
className: classnames(styles$m['form-section'], {
|
|
10953
|
+
[styles$m['form-section--no-margin']]: _noMargin || as === 'card'
|
|
10868
10954
|
}),
|
|
10869
10955
|
"data-testid": testId
|
|
10870
10956
|
}, as === 'card' ? React__default.createElement(Card, {
|
|
@@ -10884,7 +10970,7 @@ const updateButtonProps = (child, newProps) => {
|
|
|
10884
10970
|
}, newProps, child.props));
|
|
10885
10971
|
};
|
|
10886
10972
|
|
|
10887
|
-
var styles$
|
|
10973
|
+
var styles$l = {"form-footer":"_4ksfB"};
|
|
10888
10974
|
|
|
10889
10975
|
const FormFooterActions = ({
|
|
10890
10976
|
actions
|
|
@@ -10920,7 +11006,7 @@ const FormFooter = ({
|
|
|
10920
11006
|
});
|
|
10921
11007
|
const isInlineChildren = React__default.Children.count(children) === 1 && React__default.isValidElement(children) && children.type === Inline;
|
|
10922
11008
|
return React__default.createElement("div", {
|
|
10923
|
-
className: classnames(styles$
|
|
11009
|
+
className: classnames(styles$l['form-footer']),
|
|
10924
11010
|
"data-testid": testId
|
|
10925
11011
|
}, actions && React__default.createElement(FormFooterActions, {
|
|
10926
11012
|
actions: actions
|
|
@@ -10958,13 +11044,13 @@ const Form = ({
|
|
|
10958
11044
|
}, React__default.createElement("form", {
|
|
10959
11045
|
onSubmit: onSubmit ? handleSubmit : formik == null ? void 0 : formik.handleSubmit,
|
|
10960
11046
|
className: classnames({
|
|
10961
|
-
[styles$
|
|
11047
|
+
[styles$n['form--standard-size']]: !_wide
|
|
10962
11048
|
}),
|
|
10963
11049
|
"data-testid": testId
|
|
10964
11050
|
}, _stackContent ? React__default.createElement(Stack, null, formattedChildren) : formattedChildren));
|
|
10965
11051
|
};
|
|
10966
11052
|
|
|
10967
|
-
var styles$
|
|
11053
|
+
var styles$k = {"form-row":"_xX-RS"};
|
|
10968
11054
|
|
|
10969
11055
|
const SIZE_25_PERCENT = '25%';
|
|
10970
11056
|
const SIZE_33_PERCENT = '33.333%';
|
|
@@ -10991,14 +11077,14 @@ const FormRow = ({
|
|
|
10991
11077
|
space: _space,
|
|
10992
11078
|
testId: testId,
|
|
10993
11079
|
alignItems: "stretch",
|
|
10994
|
-
extraClass: styles$
|
|
11080
|
+
extraClass: styles$k['form-row']
|
|
10995
11081
|
}, children, additionalColumns.map((_, index) => React__default.createElement("span", {
|
|
10996
11082
|
key: index,
|
|
10997
11083
|
"data-testid": "empty-cell"
|
|
10998
11084
|
})));
|
|
10999
11085
|
};
|
|
11000
11086
|
|
|
11001
|
-
var styles$
|
|
11087
|
+
var styles$j = {"text-field":"_JaB08","text-field--focus":"_62RIR","text-field--disabled":"_CDt23","text-field--invalid":"_wf4XP","text-field__toolbar":"_7xVsj"};
|
|
11002
11088
|
|
|
11003
11089
|
const useGrowTextAreaRef = (minHeight, maxHeight, autoGrow, forwardedRef) => {
|
|
11004
11090
|
const textareaRef = useRef(null);
|
|
@@ -11067,10 +11153,10 @@ const TextAreaField = ({
|
|
|
11067
11153
|
return React__default.createElement(Field, _extends({}, fieldProps, {
|
|
11068
11154
|
characterCount: controllers.value !== undefined && maxLength ? maxLength - controllers.value.length : undefined
|
|
11069
11155
|
}), React__default.createElement("div", {
|
|
11070
|
-
className: classnames(styles$
|
|
11071
|
-
[styles$
|
|
11072
|
-
[styles$
|
|
11073
|
-
[styles$
|
|
11156
|
+
className: classnames(styles$j['text-field'], {
|
|
11157
|
+
[styles$j['text-field--invalid']]: hasError,
|
|
11158
|
+
[styles$j['text-field--disabled']]: disabled,
|
|
11159
|
+
[styles$j['text-field--focus']]: hasFocus
|
|
11074
11160
|
}),
|
|
11075
11161
|
ref: containerRef,
|
|
11076
11162
|
onClick: event => {
|
|
@@ -11102,7 +11188,7 @@ const TextAreaField = ({
|
|
|
11102
11188
|
ref: textAreaRef,
|
|
11103
11189
|
maxLength: maxLength
|
|
11104
11190
|
}), toolbar && React__default.createElement("div", {
|
|
11105
|
-
className: styles$
|
|
11191
|
+
className: styles$j['text-field__toolbar'],
|
|
11106
11192
|
id: `${controllers.id}-toolbar`,
|
|
11107
11193
|
ref: toolbarRef,
|
|
11108
11194
|
onClick: event => {
|
|
@@ -11114,13 +11200,13 @@ const TextAreaField = ({
|
|
|
11114
11200
|
}, toolbar)));
|
|
11115
11201
|
};
|
|
11116
11202
|
|
|
11117
|
-
const _excluded$
|
|
11203
|
+
const _excluded$8 = ["prefix", "suffix"];
|
|
11118
11204
|
const TextFieldElement = (_ref, ref) => {
|
|
11119
11205
|
let {
|
|
11120
11206
|
prefix,
|
|
11121
11207
|
suffix
|
|
11122
11208
|
} = _ref,
|
|
11123
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
11209
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$8);
|
|
11124
11210
|
const {
|
|
11125
11211
|
inputProps,
|
|
11126
11212
|
fieldProps
|
|
@@ -11136,7 +11222,7 @@ const TextFieldElement = (_ref, ref) => {
|
|
|
11136
11222
|
};
|
|
11137
11223
|
const TextField = forwardRef(TextFieldElement);
|
|
11138
11224
|
|
|
11139
|
-
var styles$
|
|
11225
|
+
var styles$i = {"pill-select-field":"_Yti6k","pill-select-field__creating-input":"_dw-VP","pill-select-field__custom-input":"_JXakU","pill-select-field__add-new-input":"_MsKVV","pill-select-field__creating-custom-input":"_ZxEwG","pill-select-field__removable-icon":"_Odw1V"};
|
|
11140
11226
|
|
|
11141
11227
|
const useMultiSelectFieldControllers = ({
|
|
11142
11228
|
name,
|
|
@@ -11201,10 +11287,10 @@ const CreatableOption = ({
|
|
|
11201
11287
|
};
|
|
11202
11288
|
return React__default.createElement(React__default.Fragment, null, !isCreatingOption && React__default.createElement("div", {
|
|
11203
11289
|
key: 'pill-select-field-create-option',
|
|
11204
|
-
className: styles$
|
|
11290
|
+
className: styles$i['pill-select-field']
|
|
11205
11291
|
}, React__default.createElement("button", {
|
|
11206
11292
|
"data-testid": testId ? `${testId}-create-option` : undefined,
|
|
11207
|
-
className: styles$
|
|
11293
|
+
className: styles$i['pill-select-field__add-new-input'],
|
|
11208
11294
|
onClick: () => {
|
|
11209
11295
|
setIsCreatingOption(true);
|
|
11210
11296
|
setNewOptionLabel('');
|
|
@@ -11213,9 +11299,9 @@ const CreatableOption = ({
|
|
|
11213
11299
|
size: "small"
|
|
11214
11300
|
}), createOptionLabel)), isCreatingOption && React__default.createElement("div", {
|
|
11215
11301
|
key: 'pill-select-field-creating-option',
|
|
11216
|
-
className: styles$
|
|
11302
|
+
className: styles$i['pill-select-field']
|
|
11217
11303
|
}, React__default.createElement("input", {
|
|
11218
|
-
className: styles$
|
|
11304
|
+
className: styles$i['pill-select-field__creating-input'],
|
|
11219
11305
|
name: `${name}-pill-select-field-creating-option`,
|
|
11220
11306
|
id: 'pill-select-field-creating-option',
|
|
11221
11307
|
type: "text",
|
|
@@ -11236,7 +11322,7 @@ const CreatableOption = ({
|
|
|
11236
11322
|
}
|
|
11237
11323
|
}
|
|
11238
11324
|
}), React__default.createElement("span", {
|
|
11239
|
-
className: styles$
|
|
11325
|
+
className: styles$i['pill-select-field__creating-custom-input']
|
|
11240
11326
|
}, !newOptionLabel && React__default.createElement(Text, {
|
|
11241
11327
|
as: "body",
|
|
11242
11328
|
color: "grey-300"
|
|
@@ -11287,7 +11373,7 @@ const PillSelectField = ({
|
|
|
11287
11373
|
}
|
|
11288
11374
|
};
|
|
11289
11375
|
return React__default.createElement("button", {
|
|
11290
|
-
className: styles$
|
|
11376
|
+
className: styles$i['pill-select-field__removable-icon'],
|
|
11291
11377
|
onClick: handleClick
|
|
11292
11378
|
}, React__default.createElement(IconTimes, {
|
|
11293
11379
|
size: "small"
|
|
@@ -11303,7 +11389,7 @@ const PillSelectField = ({
|
|
|
11303
11389
|
const itemId = `${controllers.id}-${itemIdentifier}`;
|
|
11304
11390
|
return React__default.createElement("div", {
|
|
11305
11391
|
key: itemIdentifier,
|
|
11306
|
-
className: styles$
|
|
11392
|
+
className: styles$i['pill-select-field']
|
|
11307
11393
|
}, React__default.createElement("input", {
|
|
11308
11394
|
name: `${name}-${itemIdentifier}`,
|
|
11309
11395
|
id: itemId,
|
|
@@ -11323,7 +11409,7 @@ const PillSelectField = ({
|
|
|
11323
11409
|
controllers.onChange(newValue);
|
|
11324
11410
|
}
|
|
11325
11411
|
}), React__default.createElement("span", {
|
|
11326
|
-
className: styles$
|
|
11412
|
+
className: styles$i['pill-select-field__custom-input']
|
|
11327
11413
|
}, option.label, option.isRemovable && React__default.createElement(RemoveButton, {
|
|
11328
11414
|
option: option
|
|
11329
11415
|
})));
|
|
@@ -11372,9 +11458,9 @@ const useRadioGroupFieldContext = () => {
|
|
|
11372
11458
|
return context;
|
|
11373
11459
|
};
|
|
11374
11460
|
|
|
11375
|
-
var styles$
|
|
11461
|
+
var styles$h = {"label":"_xzukU","label--truncate":"_iVWRB","caption":"_JNfQO","radio-group-field__label":"_2KvuU","radio-group-field__caption":"_ZeIOd"};
|
|
11376
11462
|
|
|
11377
|
-
var styles$
|
|
11463
|
+
var styles$g = {"label":"_s7mjc","label--truncate":"_dZjDs","caption":"_JIw-5","radio-group-box-option":"_IIX-P","radio-group-box-option__box":"_P588B","radio-group-box-option__box--disabled":"_Ir3Og","radio-group-box-option__label":"_U--9r","radio-group-box-option__label--disabled":"_Lvxmy","radio-group-box-option__caption":"_NC-bO","radio-group-box-option__caption--disabled":"_04Cjp"};
|
|
11378
11464
|
|
|
11379
11465
|
const RadioGroupBoxOption = ({
|
|
11380
11466
|
value,
|
|
@@ -11391,7 +11477,7 @@ const RadioGroupBoxOption = ({
|
|
|
11391
11477
|
id: inputId
|
|
11392
11478
|
});
|
|
11393
11479
|
return React__default.createElement("label", {
|
|
11394
|
-
className: styles$
|
|
11480
|
+
className: styles$g['radio-group-box-option']
|
|
11395
11481
|
}, React__default.createElement("input", {
|
|
11396
11482
|
type: "radio",
|
|
11397
11483
|
"data-testid": testId,
|
|
@@ -11402,8 +11488,8 @@ const RadioGroupBoxOption = ({
|
|
|
11402
11488
|
checked: radioGroupContext.value !== undefined ? radioGroupContext.value === value : undefined,
|
|
11403
11489
|
disabled: radioGroupContext.disabled || disabled
|
|
11404
11490
|
}), React__default.createElement("div", {
|
|
11405
|
-
className: classnames(styles$
|
|
11406
|
-
[styles$
|
|
11491
|
+
className: classnames(styles$g['radio-group-box-option__box'], {
|
|
11492
|
+
[styles$g['radio-group-box-option__box--disabled']]: radioGroupContext.disabled || disabled
|
|
11407
11493
|
})
|
|
11408
11494
|
}, React__default.createElement(Stack, {
|
|
11409
11495
|
space: 16,
|
|
@@ -11413,17 +11499,17 @@ const RadioGroupBoxOption = ({
|
|
|
11413
11499
|
space: 8,
|
|
11414
11500
|
alignItems: "center"
|
|
11415
11501
|
}, label && React__default.createElement("div", {
|
|
11416
|
-
className: classnames(styles$
|
|
11417
|
-
[styles$
|
|
11502
|
+
className: classnames(styles$g['radio-group-box-option__label'], {
|
|
11503
|
+
[styles$g['radio-group-box-option__label--disabled']]: radioGroupContext.disabled || disabled
|
|
11418
11504
|
})
|
|
11419
11505
|
}, label), caption && React__default.createElement("div", {
|
|
11420
|
-
className: classnames(styles$
|
|
11421
|
-
[styles$
|
|
11506
|
+
className: classnames(styles$g['radio-group-box-option__caption'], {
|
|
11507
|
+
[styles$g['radio-group-box-option__caption--disabled']]: radioGroupContext.disabled || disabled
|
|
11422
11508
|
})
|
|
11423
11509
|
}, caption)))));
|
|
11424
11510
|
};
|
|
11425
11511
|
|
|
11426
|
-
var styles$
|
|
11512
|
+
var styles$f = {"radio-group-option":"_7fVpn","radio-group-option__caption":"_VD7SO","radio-group-option__custom-input":"_Yfxkl"};
|
|
11427
11513
|
|
|
11428
11514
|
/** RadioGroupField form element. */
|
|
11429
11515
|
const RadioGroupOption = ({
|
|
@@ -11445,7 +11531,7 @@ const RadioGroupOption = ({
|
|
|
11445
11531
|
space: 8,
|
|
11446
11532
|
alignItems: "center"
|
|
11447
11533
|
}, React__default.createElement("div", {
|
|
11448
|
-
className: styles$
|
|
11534
|
+
className: styles$f['radio-group-option']
|
|
11449
11535
|
}, React__default.createElement("input", {
|
|
11450
11536
|
type: "radio",
|
|
11451
11537
|
"data-testid": testId,
|
|
@@ -11456,11 +11542,11 @@ const RadioGroupOption = ({
|
|
|
11456
11542
|
checked: radioGroupContext.value !== undefined ? radioGroupContext.value === value : undefined,
|
|
11457
11543
|
disabled: radioGroupContext.disabled || disabled
|
|
11458
11544
|
}), React__default.createElement("span", {
|
|
11459
|
-
className: styles$
|
|
11545
|
+
className: styles$f['radio-group-option__custom-input']
|
|
11460
11546
|
})), label && React__default.createElement(Label, {
|
|
11461
11547
|
htmlFor: id
|
|
11462
11548
|
}, label)), caption && React__default.createElement("div", {
|
|
11463
|
-
className: styles$
|
|
11549
|
+
className: styles$f['radio-group-option__caption']
|
|
11464
11550
|
}, React__default.createElement(Caption, {
|
|
11465
11551
|
fieldId: id
|
|
11466
11552
|
}, caption)));
|
|
@@ -11591,7 +11677,7 @@ const RadioGroupField = ({
|
|
|
11591
11677
|
}, React__default.createElement(Stack, {
|
|
11592
11678
|
space: _space
|
|
11593
11679
|
}, label && React__default.createElement("div", {
|
|
11594
|
-
className: styles$
|
|
11680
|
+
className: styles$h['radio-group-field__label']
|
|
11595
11681
|
}, label), React__default.createElement(Stack, {
|
|
11596
11682
|
space: 8
|
|
11597
11683
|
}, optionsType === OPTION_TYPES.RADIO ? React__default.createElement(RadioOptions, {
|
|
@@ -11603,21 +11689,21 @@ const RadioGroupField = ({
|
|
|
11603
11689
|
testId: testId,
|
|
11604
11690
|
space: _space
|
|
11605
11691
|
}, children), caption && React__default.createElement("div", {
|
|
11606
|
-
className: styles$
|
|
11692
|
+
className: styles$h['radio-group-caption']
|
|
11607
11693
|
}, caption), controllers.error && React__default.createElement(ErrorMessage, null, controllers.error))));
|
|
11608
11694
|
};
|
|
11609
11695
|
|
|
11610
|
-
var styles$
|
|
11696
|
+
var styles$e = {"text-field":"_6Of1F","text-field--invalid":"_NQPNK","text-field--prefixed":"_BpQWQ","text-field--suffixed":"_cpYWb","password-container":"_pAoib","password-toggle":"_WVvS6","password-toggle--disabled":"_G29N3"};
|
|
11611
11697
|
|
|
11612
|
-
var styles$
|
|
11698
|
+
var styles$d = {"password-criteria":"_1ruWK","password-criteria--invalid":"_xR7tb"};
|
|
11613
11699
|
|
|
11614
11700
|
const PasswordCriteria = ({
|
|
11615
11701
|
met,
|
|
11616
11702
|
children
|
|
11617
11703
|
}) => {
|
|
11618
11704
|
return React__default.createElement("span", {
|
|
11619
|
-
className: classnames(styles$
|
|
11620
|
-
[styles$
|
|
11705
|
+
className: classnames(styles$d['password-criteria'], {
|
|
11706
|
+
[styles$d['password-criteria--invalid']]: !met
|
|
11621
11707
|
})
|
|
11622
11708
|
}, React__default.createElement(Inline, {
|
|
11623
11709
|
space: met ? 4 : 8
|
|
@@ -11692,12 +11778,12 @@ const PasswordField = ({
|
|
|
11692
11778
|
error: controllers.error
|
|
11693
11779
|
};
|
|
11694
11780
|
return React__default.createElement(Field, _extends({}, fieldProps), React__default.createElement("div", {
|
|
11695
|
-
className: styles$
|
|
11781
|
+
className: styles$e['password-container']
|
|
11696
11782
|
}, React__default.createElement("input", {
|
|
11697
11783
|
name: name,
|
|
11698
11784
|
id: controllers.id,
|
|
11699
|
-
className: classnames(styles$
|
|
11700
|
-
[styles$
|
|
11785
|
+
className: classnames(styles$e['text-field'], {
|
|
11786
|
+
[styles$e['text-field--invalid']]: hasError
|
|
11701
11787
|
}),
|
|
11702
11788
|
type: type,
|
|
11703
11789
|
"data-testid": testId,
|
|
@@ -11710,8 +11796,8 @@ const PasswordField = ({
|
|
|
11710
11796
|
onChange: controllers.onChange,
|
|
11711
11797
|
onBlur: controllers.onBlur
|
|
11712
11798
|
}), React__default.createElement("div", {
|
|
11713
|
-
className: classnames(styles$
|
|
11714
|
-
[styles$
|
|
11799
|
+
className: classnames(styles$e['password-toggle'], {
|
|
11800
|
+
[styles$e['password-toggle--disabled']]: disabled
|
|
11715
11801
|
}),
|
|
11716
11802
|
onClick: toggleType,
|
|
11717
11803
|
onKeyPress: toggleType,
|
|
@@ -11808,16 +11894,16 @@ const MultiSelectField = ({
|
|
|
11808
11894
|
})));
|
|
11809
11895
|
};
|
|
11810
11896
|
|
|
11811
|
-
var styles$
|
|
11897
|
+
var styles$c = {"custom-list":"_cSkvD"};
|
|
11812
11898
|
|
|
11813
|
-
const _excluded$
|
|
11899
|
+
const _excluded$7 = ["children", "hasMoreOptions", "hasMoreOptionsFirstLoad"];
|
|
11814
11900
|
const CustomList = _ref => {
|
|
11815
11901
|
let {
|
|
11816
11902
|
children,
|
|
11817
11903
|
hasMoreOptions,
|
|
11818
11904
|
hasMoreOptionsFirstLoad
|
|
11819
11905
|
} = _ref,
|
|
11820
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
11906
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$7);
|
|
11821
11907
|
const __ = useTranslation('AsyncSelectField');
|
|
11822
11908
|
let showFooter = hasMoreOptions;
|
|
11823
11909
|
if (props.selectProps.inputValue === '' && typeof hasMoreOptionsFirstLoad === 'boolean') {
|
|
@@ -11826,11 +11912,11 @@ const CustomList = _ref => {
|
|
|
11826
11912
|
return React__default.createElement(components.MenuList, _extends({}, props), React__default.createElement(Fragment, null, children, showFooter && props.options.length > 0 && React__default.createElement(Inline, {
|
|
11827
11913
|
justifyContent: "center"
|
|
11828
11914
|
}, React__default.createElement("div", {
|
|
11829
|
-
className: styles$
|
|
11915
|
+
className: styles$c['custom-list']
|
|
11830
11916
|
}, __('moreOptionsPlaceholder')))));
|
|
11831
11917
|
};
|
|
11832
11918
|
|
|
11833
|
-
const _excluded$
|
|
11919
|
+
const _excluded$6 = ["loadOptions"];
|
|
11834
11920
|
/**
|
|
11835
11921
|
* Component to make possible choose from async options. It looks exactly as the [SelectField](./?path=/docs/forms-selectfield--default) but, this one handles asynchronous options.
|
|
11836
11922
|
* Instead of passing a `options` props, this component requires a `loadOptions` prop.
|
|
@@ -11839,7 +11925,7 @@ const AsyncSelectField = _ref => {
|
|
|
11839
11925
|
let {
|
|
11840
11926
|
loadOptions
|
|
11841
11927
|
} = _ref,
|
|
11842
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
11928
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$6);
|
|
11843
11929
|
const [hasMoreOptions, setHasMoreOptions] = useState(false);
|
|
11844
11930
|
const [hasMoreOptionsFirstLoad, setHasMoreOptionsFirstLoad] = useState();
|
|
11845
11931
|
const [hasFirstLoadPerformed, setHasFirstLoadPerformed] = useState(false);
|
|
@@ -12119,7 +12205,7 @@ const getFormikError = error => {
|
|
|
12119
12205
|
return undefined;
|
|
12120
12206
|
};
|
|
12121
12207
|
|
|
12122
|
-
var styles$
|
|
12208
|
+
var styles$b = {"text-field":"_6cH4X","date-range-field":"_DMb6M","text-field--invalid":"_eXIiZ","text-field--prefixed":"_Lc6QO","text-field--suffixed":"_VWrJD","date-range-field--invalid":"_ZJ2A5","date-range-field--disabled":"_WkaJQ"};
|
|
12123
12209
|
|
|
12124
12210
|
var calendarStyles = {"root":"_SsQ7L","table":"_Ar-fF","caption":"_Tp79k","head_cell":"_Ya6Zr","day_today":"_lFzs7","day_outside":"_TjttB","nav_button":"_cwiRM","day_range_middle":"_rJolM","day_range_start":"_nVIPx","day_range_end":"_Y50yT"};
|
|
12125
12211
|
|
|
@@ -12183,9 +12269,9 @@ const DateRangeCalendar = ({
|
|
|
12183
12269
|
const DAYS = getDays(translate);
|
|
12184
12270
|
const MONTH_NAMES = getMonths(translate);
|
|
12185
12271
|
return React__default.createElement(Portal, null, React__default.createElement("div", {
|
|
12186
|
-
className: styles$
|
|
12272
|
+
className: styles$N['calendar']
|
|
12187
12273
|
}, React__default.createElement("div", {
|
|
12188
|
-
className: styles$
|
|
12274
|
+
className: styles$N['calendar__overlay'],
|
|
12189
12275
|
ref: ref => setCalendarRef(ref),
|
|
12190
12276
|
style: _extends({}, calendarPosition, {
|
|
12191
12277
|
zIndex: getZIndex('dropdown')
|
|
@@ -12376,9 +12462,9 @@ const DateRangeField = ({
|
|
|
12376
12462
|
end
|
|
12377
12463
|
} = controllers.value;
|
|
12378
12464
|
return React__default.createElement(Field, _extends({}, fieldProps), React__default.createElement("div", {
|
|
12379
|
-
className: classnames(styles$
|
|
12380
|
-
[styles$
|
|
12381
|
-
[styles$
|
|
12465
|
+
className: classnames(styles$b['date-range-field'], {
|
|
12466
|
+
[styles$b['date-range-field--invalid']]: hasError,
|
|
12467
|
+
[styles$b['date-range-field--disabled']]: disabled
|
|
12382
12468
|
}),
|
|
12383
12469
|
"data-testid": testId
|
|
12384
12470
|
}, React__default.createElement(IconCalendarAlt, {
|
|
@@ -12633,7 +12719,7 @@ const TimeFieldDropdown = ({
|
|
|
12633
12719
|
})));
|
|
12634
12720
|
};
|
|
12635
12721
|
|
|
12636
|
-
const _excluded$
|
|
12722
|
+
const _excluded$5 = ["interval", "startTime", "prefix", "endField", "duration", "subtractDuration", "calculateDuration", "timeFormat"];
|
|
12637
12723
|
const TimeFieldElement = (_ref, forwardedRef) => {
|
|
12638
12724
|
let {
|
|
12639
12725
|
interval = 15,
|
|
@@ -12645,7 +12731,7 @@ const TimeFieldElement = (_ref, forwardedRef) => {
|
|
|
12645
12731
|
calculateDuration,
|
|
12646
12732
|
timeFormat
|
|
12647
12733
|
} = _ref,
|
|
12648
|
-
allOtherProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
12734
|
+
allOtherProps = _objectWithoutPropertiesLoose(_ref, _excluded$5);
|
|
12649
12735
|
const {
|
|
12650
12736
|
timeFormat: globalTimeFormat
|
|
12651
12737
|
} = useProviderConfig();
|
|
@@ -12700,7 +12786,7 @@ const TimeRangeSelector = forwardRef(TimeFieldElement);
|
|
|
12700
12786
|
*/
|
|
12701
12787
|
const TimeField = forwardRef(TimeFieldElement);
|
|
12702
12788
|
|
|
12703
|
-
var styles$
|
|
12789
|
+
var styles$a = {"text-field":"_yV-BZ","time-range-field":"_9i8Lj","text-field--invalid":"_FJVdv","text-field--prefixed":"_B7q-i","text-field--suffixed":"_DvCJW","time-range-field--invalid":"_g2UhP","time-range-field--disabled":"_Yn4T4"};
|
|
12704
12790
|
|
|
12705
12791
|
const TimeRangeEnd = ({
|
|
12706
12792
|
startTime,
|
|
@@ -12821,9 +12907,9 @@ const TimeRangeField = ({
|
|
|
12821
12907
|
end
|
|
12822
12908
|
}) : getDuration(end, start, subtractDuration);
|
|
12823
12909
|
return React__default.createElement(Field, _extends({}, fieldProps), React__default.createElement("div", {
|
|
12824
|
-
className: classnames(styles$
|
|
12825
|
-
[styles$
|
|
12826
|
-
[styles$
|
|
12910
|
+
className: classnames(styles$a['time-range-field'], {
|
|
12911
|
+
[styles$a['time-range-field--invalid']]: hasError,
|
|
12912
|
+
[styles$a['time-range-field--disabled']]: disabled
|
|
12827
12913
|
}),
|
|
12828
12914
|
"data-testid": testId
|
|
12829
12915
|
}, React__default.createElement(TimeRangeStart, {
|
|
@@ -12851,18 +12937,18 @@ const TimeRangeField = ({
|
|
|
12851
12937
|
})));
|
|
12852
12938
|
};
|
|
12853
12939
|
|
|
12854
|
-
var styles$
|
|
12940
|
+
var styles$9 = {"currency-field__mask-display":"_ddacu"};
|
|
12855
12941
|
|
|
12856
12942
|
const CURRENCY_DISPLAY_DEFAULT_MARGIN = 8;
|
|
12857
12943
|
const CURRENCY_DISPLAY_MARGIN_BUFFER = 1;
|
|
12858
12944
|
|
|
12859
|
-
const _excluded$
|
|
12945
|
+
const _excluded$4 = ["currencySymbol", "step"];
|
|
12860
12946
|
const CurrencyFieldElement = (_ref, forwardedRef) => {
|
|
12861
12947
|
let {
|
|
12862
12948
|
currencySymbol = '$',
|
|
12863
12949
|
step = 0.01
|
|
12864
12950
|
} = _ref,
|
|
12865
|
-
allOtherProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
12951
|
+
allOtherProps = _objectWithoutPropertiesLoose(_ref, _excluded$4);
|
|
12866
12952
|
const [displayPadding, setDisplayPadding] = useState(CURRENCY_DISPLAY_DEFAULT_MARGIN);
|
|
12867
12953
|
const internalRef = useRef(null);
|
|
12868
12954
|
const ref = forwardedRef || internalRef;
|
|
@@ -12916,7 +13002,7 @@ const CurrencyFieldElement = (_ref, forwardedRef) => {
|
|
|
12916
13002
|
inputProps.onFocus(e);
|
|
12917
13003
|
}
|
|
12918
13004
|
}))), showMask && !!inputProps.value && React__default.createElement("div", {
|
|
12919
|
-
className: styles$
|
|
13005
|
+
className: styles$9['currency-field__mask-display'],
|
|
12920
13006
|
style: {
|
|
12921
13007
|
marginLeft: displayPadding
|
|
12922
13008
|
}
|
|
@@ -12929,7 +13015,7 @@ const CurrencyFieldElement = (_ref, forwardedRef) => {
|
|
|
12929
13015
|
*/
|
|
12930
13016
|
const CurrencyField = forwardRef(CurrencyFieldElement);
|
|
12931
13017
|
|
|
12932
|
-
const _excluded$
|
|
13018
|
+
const _excluded$3 = ["max", "min", "precision", "stepSize", "prefix", "suffix"];
|
|
12933
13019
|
const NumberFieldElement = (_ref, ref) => {
|
|
12934
13020
|
let {
|
|
12935
13021
|
max,
|
|
@@ -12939,7 +13025,7 @@ const NumberFieldElement = (_ref, ref) => {
|
|
|
12939
13025
|
prefix,
|
|
12940
13026
|
suffix
|
|
12941
13027
|
} = _ref,
|
|
12942
|
-
allOtherProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
13028
|
+
allOtherProps = _objectWithoutPropertiesLoose(_ref, _excluded$3);
|
|
12943
13029
|
const {
|
|
12944
13030
|
inputProps,
|
|
12945
13031
|
fieldProps
|
|
@@ -13014,12 +13100,12 @@ const NumberFieldElement = (_ref, ref) => {
|
|
|
13014
13100
|
*/
|
|
13015
13101
|
const NumberField = forwardRef(NumberFieldElement);
|
|
13016
13102
|
|
|
13017
|
-
const _excluded$
|
|
13103
|
+
const _excluded$2 = ["max"];
|
|
13018
13104
|
const PercentageElement = (_ref, ref) => {
|
|
13019
13105
|
let {
|
|
13020
13106
|
max = 100
|
|
13021
13107
|
} = _ref,
|
|
13022
|
-
allOtherProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
13108
|
+
allOtherProps = _objectWithoutPropertiesLoose(_ref, _excluded$2);
|
|
13023
13109
|
return React__default.createElement(NumberField, _extends({}, allOtherProps, {
|
|
13024
13110
|
suffix: "%",
|
|
13025
13111
|
ref: ref,
|
|
@@ -13043,7 +13129,7 @@ const FormFeedback = ({
|
|
|
13043
13129
|
}, children);
|
|
13044
13130
|
};
|
|
13045
13131
|
|
|
13046
|
-
var styles$
|
|
13132
|
+
var styles$8 = {"phone-field":"_Q0GfJ","phone-field__flag":"_-uOqW","phone-field__input":"_Hes9b","phone-field__input--with-square-borders":"_TEU6N"};
|
|
13047
13133
|
|
|
13048
13134
|
const usePhoneFieldControllers = ({
|
|
13049
13135
|
name,
|
|
@@ -13186,8 +13272,8 @@ const usePhoneField = ({
|
|
|
13186
13272
|
'aria-describedby': hasError ? `${controllers.id}-error-message` : `${controllers.id}-describer`,
|
|
13187
13273
|
'aria-invalid': hasError,
|
|
13188
13274
|
autoFocus,
|
|
13189
|
-
className: classnames(styles$
|
|
13190
|
-
[styles$
|
|
13275
|
+
className: classnames(styles$12['text-field'], {
|
|
13276
|
+
[styles$12['text-field--invalid']]: hasError
|
|
13191
13277
|
}),
|
|
13192
13278
|
'data-testid': testId,
|
|
13193
13279
|
disabled,
|
|
@@ -13957,7 +14043,7 @@ const COUNTRIES = {
|
|
|
13957
14043
|
};
|
|
13958
14044
|
const COUNTRY_CODES = Object.keys(COUNTRIES);
|
|
13959
14045
|
|
|
13960
|
-
var styles$
|
|
14046
|
+
var styles$7 = {"country-selector":"_VYs4A","country-selector--with-error":"_oSxxZ","country-selector__trigger":"_jlyd4","country-selector--disabled":"_tNInT","country-selector__trigger--with-error":"_424HM","country-selector__trigger--disabled":"_0XOFf","country-selector__trigger-flag":"_RfPa1","country-selector__flag":"_uADOl"};
|
|
13961
14047
|
|
|
13962
14048
|
var flagIcons = {"fi":"_wEQeh","fis":"_Z-kfc","fi-ac":"_amiP8","fi-ad":"_-Nycw","fi-ae":"_5zcAZ","fi-af":"_x-kp7","fi-ag":"_cfoi1","fi-ai":"_xoMS-","fi-al":"_am975","fi-am":"_0p-gD","fi-ao":"_l245N","fi-ar":"_xigkX","fi-as":"_fSczv","fi-at":"_tTeMy","fi-au":"_nSXvc","fi-aw":"_J3Dgu","fi-ax":"_PnU0s","fi-az":"_Hevuf","fi-ba":"_V-NYg","fi-bb":"_rdxaV","fi-bd":"_W3w35","fi-be":"_HXWpo","fi-bf":"_-xCW2","fi-bg":"_UuyPh","fi-bh":"_qYHkT","fi-bi":"_sfFeO","fi-bj":"_HcoBc","fi-bl":"_VvU29","fi-bm":"_DCtD1","fi-bn":"_QdHY3","fi-bo":"_Ayx7f","fi-bq":"_VfZGH","fi-br":"_HigIg","fi-bs":"_PWr-E","fi-bt":"_uFlIS","fi-bw":"_Mmoqr","fi-by":"_MKO28","fi-bz":"_HBn3o","fi-ca":"_wB3xX","fi-cc":"_oJEC5","fi-cd":"_C3RR8","fi-cf":"_ZVOZZ","fi-cg":"_Nk7Zr","fi-ch":"_9qTmx","fi-ci":"_4-gxn","fi-ck":"_YEK3x","fi-cl":"_-iNl4","fi-cm":"_UozRb","fi-cn":"_KsOEH","fi-co":"_ptSEc","fi-cr":"_92iwJ","fi-cu":"_D0k3p","fi-cv":"_O5oBT","fi-cw":"_82pI2","fi-cx":"_Eqg1T","fi-cy":"_740E8","fi-cz":"_483Iy","fi-de":"_Wla8X","fi-dj":"_Jm9gH","fi-dk":"_5QJuz","fi-dm":"_4lh-K","fi-do":"_Zvttl","fi-dz":"_-5iKJ","fi-ec":"_XMC0f","fi-ee":"_tZDe6","fi-eg":"_5USxE","fi-eh":"_rpC1Z","fi-er":"_Rhm4A","fi-es":"_QN2si","fi-et":"_2ihBN","fi-fi":"_2Lctq","fi-fj":"_ljZXm","fi-fk":"_Um9-A","fi-fm":"_mXG-Y","fi-fo":"_SemMo","fi-fr":"_MGcxf","fi-ga":"_aPt7H","fi-gb":"_2tU39","fi-gd":"_CPs5V","fi-ge":"_09VJF","fi-gf":"_7STtr","fi-gg":"_CUbGJ","fi-gh":"_mgJbd","fi-gi":"_mxhe5","fi-gl":"_gXogr","fi-gm":"_JHzzB","fi-gn":"_XJqm4","fi-gp":"_YnrVE","fi-gq":"_J47-w","fi-gr":"_5YAwo","fi-gt":"_PWFl-","fi-gu":"_ItzVX","fi-gw":"_hiRJc","fi-gy":"_oitDt","fi-hk":"_18FzB","fi-hn":"_5ySTg","fi-hr":"_rzYuT","fi-ht":"_Pq7or","fi-hu":"_-u5Ze","fi-id":"_m8GwW","fi-ie":"_pPEAu","fi-il":"_Butse","fi-im":"_wLEYj","fi-in":"_XY7D8","fi-io":"_iKM6K","fi-iq":"_iwLoJ","fi-ir":"_L1Gd1","fi-is":"_6XPDX","fi-it":"_JXv9-","fi-je":"_Qwjxj","fi-jm":"_qzNME","fi-jo":"_JqYXz","fi-jp":"_CakOC","fi-ke":"_Czyy6","fi-kg":"_6Yydv","fi-kh":"_zhLEc","fi-ki":"_qJxPJ","fi-km":"_KDmv4","fi-kn":"_n3xy0","fi-kp":"_voM9e","fi-kr":"_sErX2","fi-kw":"_kJUFk","fi-ky":"_Ensoj","fi-kz":"_JVpyw","fi-la":"_eVzpD","fi-lb":"_f400B","fi-lc":"_vhHp5","fi-li":"_cP76d","fi-lk":"_NGSeL","fi-lr":"_yIHm7","fi-ls":"_Kj-GJ","fi-lt":"_VTK9E","fi-lu":"_N4PHA","fi-lv":"_d-ZWR","fi-ly":"_49dYi","fi-ma":"_Iqggh","fi-mc":"_QQY-Q","fi-md":"_e7v9L","fi-me":"_WqN7P","fi-mf":"_4Exh-","fi-mg":"_W-d9O","fi-mh":"_3xTQ7","fi-mk":"_O26qm","fi-ml":"_hiLpW","fi-mm":"_QGh12","fi-mn":"_KNLNH","fi-mo":"_Kdw-k","fi-mp":"_CTkAK","fi-mq":"_MzLKJ","fi-mr":"_sjQHJ","fi-ms":"_ENTOn","fi-mt":"_GoKtf","fi-mu":"_WLc98","fi-mv":"_08Tf4","fi-mw":"_MvAGM","fi-mx":"_FPDND","fi-my":"_1xoF6","fi-mz":"_ylwZy","fi-na":"_-pxPH","fi-nc":"_W-Ot-","fi-ne":"_EOA-X","fi-nf":"_W5Kl5","fi-ng":"_q76Cs","fi-ni":"_AuKsI","fi-nl":"_qLIaU","fi-no":"_xbcrX","fi-np":"_FQt4h","fi-nr":"_jJbHx","fi-nu":"_TSamx","fi-nz":"_AzsKY","fi-om":"_TUoW9","fi-pa":"_jCT-C","fi-pe":"_VMnoV","fi-pf":"_Gblvx","fi-pg":"_FLRnq","fi-ph":"_0RSGR","fi-pk":"_DfZCd","fi-pl":"_hv9I4","fi-pm":"_IDp3q","fi-pr":"_2MHj1","fi-ps":"_0FLpC","fi-pt":"_p--cH","fi-pw":"_VP-zx","fi-py":"_-Tnic","fi-qa":"_Dy7Il","fi-re":"_7N5ED","fi-ro":"_4AYwa","fi-rs":"_Y-a4O","fi-ru":"_OKa79","fi-rw":"_bBqN1","fi-sa":"_vFwuG","fi-sb":"_MMmc2","fi-sc":"_ZUM8E","fi-sd":"_9k8eB","fi-se":"_cX0c9","fi-sg":"_4-yWs","fi-sh":"_-vaPR","fi-si":"_9oJgu","fi-sj":"_J0R6u","fi-sk":"_1VxbX","fi-sl":"_RiBAA","fi-sm":"_rEaFc","fi-sn":"_PRwVO","fi-so":"_XKFdC","fi-sr":"_LtiS3","fi-ss":"_45mng","fi-st":"_OtIks","fi-sv":"_OonsM","fi-sx":"_NtzDE","fi-sy":"_Ail2H","fi-sz":"_8XRyD","fi-ta":"_GQvZn","fi-tc":"_SbD-E","fi-td":"_AnXAO","fi-tg":"_smamZ","fi-th":"_AVcL5","fi-tj":"_EqMlf","fi-tk":"_20VO7","fi-tl":"_jz9hm","fi-tm":"_kmmny","fi-tn":"_9aBQ-","fi-to":"_G63l0","fi-tr":"_6shnc","fi-tt":"_P5fq4","fi-tv":"_b7SpV","fi-tw":"_jwNjI","fi-tz":"_qtU8x","fi-ua":"_bNAHa","fi-ug":"_-G-iW","fi-us":"_xwz53","fi-uy":"_DpeX8","fi-uz":"_kSABK","fi-va":"_VOSWl","fi-vc":"_X-aU3","fi-ve":"_FiFnt","fi-vg":"_d66Ny","fi-vi":"_6kM5U","fi-vn":"_ikRJo","fi-vu":"_5XaHH","fi-wf":"_ZEJXX","fi-ws":"_IzR7c","fi-xk":"_88V52","fi-ye":"_2Dwap","fi-yt":"_kQ0fh","fi-za":"_XzYDs","fi-zm":"_mA8wn","fi-zw":"_iIsuB"};
|
|
13963
14049
|
|
|
@@ -13968,21 +14054,21 @@ const CountrySelector = ({
|
|
|
13968
14054
|
disabled
|
|
13969
14055
|
}) => {
|
|
13970
14056
|
return React__default.createElement("div", {
|
|
13971
|
-
className: classnames(styles$
|
|
13972
|
-
[styles$
|
|
13973
|
-
[styles$
|
|
14057
|
+
className: classnames(styles$7['country-selector'], {
|
|
14058
|
+
[styles$7['country-selector--with-error']]: hasError,
|
|
14059
|
+
[styles$7['country-selector--disabled']]: disabled
|
|
13974
14060
|
})
|
|
13975
14061
|
}, React__default.createElement(Dropdown, {
|
|
13976
14062
|
trigger: React__default.createElement("div", {
|
|
13977
|
-
className: classnames(styles$
|
|
13978
|
-
[styles$
|
|
13979
|
-
[styles$
|
|
14063
|
+
className: classnames(styles$7['country-selector__trigger'], {
|
|
14064
|
+
[styles$7['country-selector__trigger--with-error']]: hasError,
|
|
14065
|
+
[styles$7['country-selector__trigger--disabled']]: disabled
|
|
13980
14066
|
})
|
|
13981
14067
|
}, React__default.createElement(Inline, {
|
|
13982
14068
|
space: 8,
|
|
13983
14069
|
alignItems: "center"
|
|
13984
14070
|
}, React__default.createElement("span", {
|
|
13985
|
-
className: classnames(flagIcons['fi'], flagIcons[`fi-${country.toLocaleLowerCase()}`], styles$
|
|
14071
|
+
className: classnames(flagIcons['fi'], flagIcons[`fi-${country.toLocaleLowerCase()}`], styles$7['country-selector__trigger-flag'])
|
|
13986
14072
|
}), React__default.createElement(IconChevronDown, {
|
|
13987
14073
|
color: "grey-400",
|
|
13988
14074
|
size: "medium"
|
|
@@ -13996,16 +14082,16 @@ const CountrySelector = ({
|
|
|
13996
14082
|
alignItems: "center",
|
|
13997
14083
|
space: 12
|
|
13998
14084
|
}, React__default.createElement("span", {
|
|
13999
|
-
className: classnames(flagIcons['fi'], flagIcons[`fi-${countryCode.toLocaleLowerCase()}`], styles$
|
|
14085
|
+
className: classnames(flagIcons['fi'], flagIcons[`fi-${countryCode.toLocaleLowerCase()}`], styles$7['country-selector__flag'])
|
|
14000
14086
|
}), React__default.createElement(Text, null, COUNTRIES[countryCode].countryName)))))));
|
|
14001
14087
|
};
|
|
14002
14088
|
|
|
14003
|
-
const _excluded$
|
|
14089
|
+
const _excluded$1 = ["disabledCountry"];
|
|
14004
14090
|
const PhoneField = _ref => {
|
|
14005
14091
|
let {
|
|
14006
14092
|
disabledCountry = false
|
|
14007
14093
|
} = _ref,
|
|
14008
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
14094
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$1);
|
|
14009
14095
|
const __ = useTranslation('PhoneField');
|
|
14010
14096
|
const inputRef = useRef(null);
|
|
14011
14097
|
const {
|
|
@@ -14069,7 +14155,7 @@ const PhoneField = _ref => {
|
|
|
14069
14155
|
}
|
|
14070
14156
|
};
|
|
14071
14157
|
return React__default.createElement(Field, _extends({}, fieldProps), React__default.createElement("div", {
|
|
14072
|
-
className: styles$
|
|
14158
|
+
className: styles$8['phone-field']
|
|
14073
14159
|
}, !disabledCountry && React__default.createElement(CountrySelector, {
|
|
14074
14160
|
country: selectedCountry,
|
|
14075
14161
|
onChange: handleCountryChange,
|
|
@@ -14080,53 +14166,18 @@ const PhoneField = _ref => {
|
|
|
14080
14166
|
space: 4,
|
|
14081
14167
|
alignItems: "center"
|
|
14082
14168
|
}, React__default.createElement("span", {
|
|
14083
|
-
className: classnames(flagIcons['fi'], flagIcons[`fi-${selectedCountry.toLocaleLowerCase()}`], styles$
|
|
14169
|
+
className: classnames(flagIcons['fi'], flagIcons[`fi-${selectedCountry.toLocaleLowerCase()}`], styles$8['country-selector__flag'])
|
|
14084
14170
|
}), React__default.createElement("span", null, "+", getCountryCallingCode(selectedCountry))) : `+${getCountryCallingCode(selectedCountry)}`
|
|
14085
14171
|
}, React__default.createElement("input", _extends({}, inputProps, {
|
|
14086
14172
|
type: "tel",
|
|
14087
|
-
className: classnames(inputProps.className, styles$
|
|
14088
|
-
[styles$
|
|
14173
|
+
className: classnames(inputProps.className, styles$8['phone-field__input'], {
|
|
14174
|
+
[styles$8['phone-field__input--with-square-borders']]: !disabledCountry
|
|
14089
14175
|
}),
|
|
14090
14176
|
onChange: handlePhoneChange,
|
|
14091
14177
|
onBlur: handlePhoneBlur
|
|
14092
14178
|
})))));
|
|
14093
14179
|
};
|
|
14094
14180
|
|
|
14095
|
-
var styles$7 = {"badge":"_RXV4h","badge--warning":"_2An1I","badge--danger":"_-Bw8L","badge--success":"_RxlMz","badge--info":"_dzCH-","badge--numeric":"_Ix9tP"};
|
|
14096
|
-
|
|
14097
|
-
const _excluded$1 = ["children", "theme", "title", "testId"];
|
|
14098
|
-
const BadgeElement = (_ref, forwardedRef) => {
|
|
14099
|
-
let {
|
|
14100
|
-
children,
|
|
14101
|
-
theme,
|
|
14102
|
-
title,
|
|
14103
|
-
testId
|
|
14104
|
-
} = _ref,
|
|
14105
|
-
otherProps = _objectWithoutPropertiesLoose(_ref, _excluded$1);
|
|
14106
|
-
const internalRef = useRef(null);
|
|
14107
|
-
const ref = forwardedRef || internalRef;
|
|
14108
|
-
useLayoutEffect(() => {
|
|
14109
|
-
if (typeof ref !== 'function' && ref.current && React__default.isValidElement(children) && typeof (children == null ? void 0 : children.type) !== 'string' && typeof (children == null ? void 0 : children.type) !== 'number') {
|
|
14110
|
-
ref.current.style.height = ref.current.offsetWidth + 'px';
|
|
14111
|
-
}
|
|
14112
|
-
});
|
|
14113
|
-
return React__default.createElement(Tooltip, {
|
|
14114
|
-
overlay: title,
|
|
14115
|
-
ref: ref
|
|
14116
|
-
}, React__default.createElement("div", _extends({
|
|
14117
|
-
className: classnames(styles$7['badge'], {
|
|
14118
|
-
[styles$7['badge--success']]: theme === 'success',
|
|
14119
|
-
[styles$7['badge--danger']]: theme === 'danger',
|
|
14120
|
-
[styles$7['badge--info']]: theme === 'info',
|
|
14121
|
-
[styles$7['badge--warning']]: theme === 'warning',
|
|
14122
|
-
[styles$7['badge--numeric']]: Number.isFinite(children)
|
|
14123
|
-
}),
|
|
14124
|
-
ref: ref,
|
|
14125
|
-
"data-testid": testId
|
|
14126
|
-
}, otherProps), children));
|
|
14127
|
-
};
|
|
14128
|
-
const Badge = forwardRef(BadgeElement);
|
|
14129
|
-
|
|
14130
14181
|
var styles$6 = {"avatar":"_V1U8v","avatar__container":"_peAaI","avatar--small":"_9g-tn","avatar__badge":"_uViot","avatar--medium":"_vNXJW","avatar--large":"_9ZKAB","avatar--extra-large":"_uv14Y"};
|
|
14131
14182
|
|
|
14132
14183
|
var styles$5 = {"avatar-image":"_iDN1j"};
|
|
@@ -14559,5 +14610,5 @@ const EmptyState = props => {
|
|
|
14559
14610
|
return emptyStateContainer;
|
|
14560
14611
|
};
|
|
14561
14612
|
|
|
14562
|
-
export { Accordion, ActionList, ActionListItem, AsyncSelectField, Avatar, Badge, Bold, BreadcrumbItem, Breadcrumbs, Button, COLORS, Calendar, CalloutCard, Card, CheckboxField, Chip, CircularProgress, CurrencyField, DataTable, DataTableCell, DataTableEditableCell, DataTableRow, DateField, DateFilter, DateRangeField, Dropdown, DropdownList, DropdownListDivider, DropdownListItem, EmptyState, Form, FormFeedback, FormFooter, FormRow, FormSection, HintModal, IconAnalytics, IconArrowDown, IconArrowDownWideShort, IconArrowLeft, IconArrowRight, IconArrowToTop, IconArrowTurnDownRight, IconArrowUp, IconAward, IconAwful, IconAwfulMonochromatic, IconBad, IconBadMonochromatic, IconBalanceScale, IconBalanceScaleLeft, IconBan, IconBarsH, IconBarsV, IconBell, IconBirthdayCake, IconBold, IconBolt, IconBook, IconBriefcase, IconBullseyeArrow, IconCalculator, IconCalendar, IconCalendarAlt, IconCalendarCheck, IconCalendarDay, IconCalendarExclamation, IconCalendarStar, IconCalendarTomorrow, IconCamera, IconCameraSlash, IconCashRegister, IconChartBar, IconCheck, IconCheckCircleIncomplete, IconChevronDown, IconChevronLeft, IconChevronRight, IconChevronUp, IconClipboardList, IconClock, IconClockExclamation, IconClockRewind, IconCog, IconComment, IconCommentLines, IconCopy, IconCreditCard, IconCreditCardPlus, IconDecent, IconDecentMonochromatic, IconDollarSign, IconDownload, IconEdit, IconEllipsisV, IconEnvelope, IconEnvelopeOpenDollar, IconExclaimation, IconExclaimationTriangle, IconExpand, IconExternalLink, IconEye, IconEyeSlash, IconFaceSmileRelaxed, IconFile, IconFilePdf, IconFlag, IconFourDotsCircle, IconFourSquares, IconGavel, IconGif, IconGift, IconGood, IconGoodMonochromatic, IconGreat, IconGreatMonochromatic, IconGrinBeam, IconGripVertical, IconHandHoldingDollar, IconHandPointRight, IconHandshake, IconHatChef, IconImage, IconInfoCircle, IconIslandTropical, IconItalic, IconLaptopSearch, IconLink, IconList, IconListOI as IconListOi, IconLock, IconMagicSolid, IconMapMarker, IconMedal, IconMegaphone, IconMessages, IconMinus, IconMinusCircle, IconMoneyBill, IconMugSaucerSolid, IconNotesMedical, IconOvertime, IconPaperPlane, IconPaperPlaneClock, IconPaperclip, IconPencil, IconPercentage, IconPhone, IconPlateUtensils, IconPlug, IconPlus, IconPrint, IconQuestionCircle, IconRepeat, IconReply, IconRocket, IconSearch, IconSignOut, IconSitemap, IconSlidersH, IconSort, IconStar, IconStarSolid, IconStickyNoteLines, IconStopwatch, IconStrikethrough, IconSync, IconSyncExclaimation, IconTable, IconTachometer, IconThumbsDown, IconThumbsUp, IconTimes, IconTimesOctagon, IconTrash, IconUnderline, IconUndo, IconUniversity, IconUnlock, IconUserComputer, IconUserFriends, IconUserLight, IconUserPlus, IconUserSearch, IconUserSlash, IconUserSolid, IconUserTag, IconUserTie, IconUsers, IconVideo, IconVolume, IconVolumeMute, IconWrench, Inline, InlineBanner, Italic, Link, Modal, ModalBody, ModalFooter, MultiSelectField, NumberField, Page, PaginationControls, PasswordField, Paywall, PercentageField, PersistentBanner, PhoneField, Pill, PillSelectField, ProgressBar, RadioGroupBoxOption, RadioGroupField, RadioGroupOption, SIZE_25_PERCENT, SIZE_33_PERCENT, SIZE_50_PERCENT, SIZE_66_PERCENT, SIZE_75_PERCENT, SegmentedControl, SelectField, Skeleton, SousChefProvider, Spinner, Stack, Text, TextAreaField, TextField, TimeField, TimeRangeField, Toggle, ToolbarSelect, Tooltip, Underline, WeekField, ZINDEX, toast, useDataTableContext };
|
|
14613
|
+
export { Accordion, ActionList, ActionListItem, AsyncSelectField, Avatar, Badge, Bold, BreadcrumbItem, Breadcrumbs, Button, COLORS, Calendar, CalloutCard, Card, CheckboxField, Chip, CircularProgress, CurrencyField, DataTable, DataTableCell, DataTableEditableCell, DataTableRow, DateField, DateFilter, DateRangeField, Dropdown, DropdownList, DropdownListDivider, DropdownListItem, EmptyState, Form, FormFeedback, FormFooter, FormRow, FormSection, HintModal, IconAnalytics, IconArrowDown, IconArrowDownWideShort, IconArrowLeft, IconArrowRight, IconArrowToTop, IconArrowTurnDownRight, IconArrowUp, IconAward, IconAwful, IconAwfulMonochromatic, IconBad, IconBadMonochromatic, IconBalanceScale, IconBalanceScaleLeft, IconBan, IconBarsH, IconBarsV, IconBell, IconBirthdayCake, IconBold, IconBolt, IconBook, IconBriefcase, IconBullseyeArrow, IconCalculator, IconCalendar, IconCalendarAlt, IconCalendarCheck, IconCalendarDay, IconCalendarExclamation, IconCalendarStar, IconCalendarTomorrow, IconCamera, IconCameraSlash, IconCashRegister, IconChartBar, IconCheck, IconCheckCircleIncomplete, IconChevronDown, IconChevronLeft, IconChevronRight, IconChevronUp, IconClipboardList, IconClock, IconClockExclamation, IconClockRewind, IconCog, IconComment, IconCommentLines, IconCopy, IconCreditCard, IconCreditCardPlus, IconDecent, IconDecentMonochromatic, IconDollarSign, IconDownload, IconEdit, IconEllipsisV, IconEnvelope, IconEnvelopeOpenDollar, IconExclaimation, IconExclaimationTriangle, IconExpand, IconExternalLink, IconEye, IconEyeSlash, IconFaceSmileRelaxed, IconFile, IconFilePdf, IconFlag, IconFourDotsCircle, IconFourSquares, IconGavel, IconGif, IconGift, IconGood, IconGoodMonochromatic, IconGreat, IconGreatMonochromatic, IconGrinBeam, IconGripVertical, IconHandHoldingDollar, IconHandPointRight, IconHandshake, IconHatChef, IconImage, IconInfoCircle, IconIslandTropical, IconItalic, IconLaptopSearch, IconLink, IconList, IconListOI as IconListOi, IconLock, IconMagicSolid, IconMapMarker, IconMedal, IconMegaphone, IconMessages, IconMinus, IconMinusCircle, IconMoneyBill, IconMugSaucerSolid, IconNotesMedical, IconOvertime, IconPaperPlane, IconPaperPlaneClock, IconPaperclip, IconPencil, IconPercentage, IconPhone, IconPlateUtensils, IconPlug, IconPlus, IconPrint, IconQuestionCircle, IconRepeat, IconReply, IconRocket, IconSearch, IconSignOut, IconSitemap, IconSlidersH, IconSort, IconStar, IconStarSolid, IconStickyNoteLines, IconStopwatch, IconStrikethrough, IconSync, IconSyncExclaimation, IconTable, IconTachometer, IconThumbsDown, IconThumbsUp, IconTimes, IconTimesOctagon, IconTrash, IconUnderline, IconUndo, IconUniversity, IconUnlock, IconUserComputer, IconUserFriends, IconUserLight, IconUserPlus, IconUserSearch, IconUserSlash, IconUserSolid, IconUserTag, IconUserTie, IconUsers, IconVideo, IconVolume, IconVolumeMute, IconWrench, Inline, InlineBanner, Italic, Link, Modal, ModalBody, ModalFooter, MultiSelectField, NumberField, Page, PageLayout, PaginationControls, PasswordField, Paywall, PercentageField, PersistentBanner, PhoneField, Pill, PillSelectField, ProgressBar, RadioGroupBoxOption, RadioGroupField, RadioGroupOption, SIZE_25_PERCENT, SIZE_33_PERCENT, SIZE_50_PERCENT, SIZE_66_PERCENT, SIZE_75_PERCENT, SegmentedControl, SelectField, Skeleton, SousChefProvider, Spinner, Stack, Text, TextAreaField, TextField, TimeField, TimeRangeField, Toggle, ToolbarSelect, Tooltip, Underline, WeekField, ZINDEX, toast, useDataTableContext };
|
|
14563
14614
|
//# sourceMappingURL=index.modern.mjs.map
|