@7shifts/sous-chef 3.76.0-beta.5 → 3.76.0-beta.7
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 +217 -217
- package/dist/index.css.map +1 -1
- package/dist/index.js +447 -451
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +515 -519
- package/dist/index.modern.js.map +1 -1
- package/package.json +3 -2
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';
|
|
@@ -8293,266 +8293,11 @@ var styles$U = {"page-layout":"_Scw7-","page-layout__nav-container":"_v--DF","pa
|
|
|
8293
8293
|
|
|
8294
8294
|
var styles$T = {"menu-item":"_SebbU","menu-item--active":"_CDEVl"};
|
|
8295
8295
|
|
|
8296
|
-
|
|
8297
|
-
menu
|
|
8298
|
-
}) => {
|
|
8299
|
-
if (menu.reloadDocument) {
|
|
8300
|
-
return React__default.createElement("li", {
|
|
8301
|
-
className: classnames(styles$T['menu-item'])
|
|
8302
|
-
}, React__default.createElement("a", {
|
|
8303
|
-
href: menu.to,
|
|
8304
|
-
className: classnames({
|
|
8305
|
-
[styles$T['menu-item--active']]: menu.isActive
|
|
8306
|
-
})
|
|
8307
|
-
}, menu.label));
|
|
8308
|
-
}
|
|
8309
|
-
return React__default.createElement("li", {
|
|
8310
|
-
className: classnames(styles$T['menu-item'])
|
|
8311
|
-
}, React__default.createElement(Link$1, {
|
|
8312
|
-
to: menu.to,
|
|
8313
|
-
activeClassName: styles$T['menu-item--active']
|
|
8314
|
-
}, menu.label));
|
|
8315
|
-
};
|
|
8316
|
-
|
|
8317
|
-
const PageLayout = ({
|
|
8318
|
-
title,
|
|
8319
|
-
children,
|
|
8320
|
-
menu,
|
|
8321
|
-
sideNavContent
|
|
8322
|
-
}) => {
|
|
8323
|
-
return React__default.createElement("div", {
|
|
8324
|
-
className: styles$U['page-layout']
|
|
8325
|
-
}, React__default.createElement("div", {
|
|
8326
|
-
className: styles$U['page-layout__nav-container']
|
|
8327
|
-
}, React__default.createElement(Stack, {
|
|
8328
|
-
space: 12
|
|
8329
|
-
}, React__default.createElement(Text, {
|
|
8330
|
-
as: "h5",
|
|
8331
|
-
textWrap: "wrap"
|
|
8332
|
-
}, title), React__default.createElement("ul", {
|
|
8333
|
-
className: styles$U['page-layout__nav-list']
|
|
8334
|
-
}, menu.filter(menu => !('isVisible' in menu) || (menu == null ? void 0 : menu.isVisible) === true).map((menuItem, index) => React__default.createElement(MenuItem, {
|
|
8335
|
-
key: index,
|
|
8336
|
-
menu: menuItem
|
|
8337
|
-
}))), sideNavContent && React__default.createElement("div", {
|
|
8338
|
-
className: styles$U['page-layout__side-nav-content']
|
|
8339
|
-
}, sideNavContent))), React__default.createElement("div", {
|
|
8340
|
-
className: styles$U['page-layout__content']
|
|
8341
|
-
}, children));
|
|
8342
|
-
};
|
|
8343
|
-
|
|
8344
|
-
const PERSISTENT_BANNER_THEME = {
|
|
8345
|
-
UPSELL: 'upsell',
|
|
8346
|
-
INFO: 'info',
|
|
8347
|
-
DANGER: 'danger'
|
|
8348
|
-
};
|
|
8349
|
-
|
|
8350
|
-
var styles$S = {"persistent-banner":"_FsCJQ","persistent-banner--info":"_zt-xK","persistent-banner--danger":"_rmUys","persistent-banner--upsell":"_UGrRR"};
|
|
8351
|
-
|
|
8352
|
-
const PersistentBanner = ({
|
|
8353
|
-
theme: _theme = PERSISTENT_BANNER_THEME.INFO,
|
|
8354
|
-
children,
|
|
8355
|
-
primaryButton,
|
|
8356
|
-
secondaryButton,
|
|
8357
|
-
onDismiss,
|
|
8358
|
-
onLoad,
|
|
8359
|
-
testId
|
|
8360
|
-
}) => {
|
|
8361
|
-
useEffect(() => {
|
|
8362
|
-
onLoad == null || onLoad();
|
|
8363
|
-
}, []);
|
|
8364
|
-
const BannerContent = () => React__default.createElement(Inline, {
|
|
8365
|
-
justifyContent: "center",
|
|
8366
|
-
alignItems: "center"
|
|
8367
|
-
}, children, primaryButton && React__default.cloneElement(primaryButton, _extends({
|
|
8368
|
-
theme: BUTTON_THEMES.HOLLOW_CONTRAST
|
|
8369
|
-
}, primaryButton.props)), secondaryButton && React__default.cloneElement(secondaryButton, _extends({
|
|
8370
|
-
theme: BUTTON_THEMES.LINK_CONTRAST
|
|
8371
|
-
}, secondaryButton.props)));
|
|
8372
|
-
return React__default.createElement("div", {
|
|
8373
|
-
className: classnames(styles$S['persistent-banner'], {
|
|
8374
|
-
[styles$S['persistent-banner--info']]: _theme === PERSISTENT_BANNER_THEME.INFO,
|
|
8375
|
-
[styles$S['persistent-banner--danger']]: _theme === PERSISTENT_BANNER_THEME.DANGER,
|
|
8376
|
-
[styles$S['persistent-banner--upsell']]: _theme === PERSISTENT_BANNER_THEME.UPSELL
|
|
8377
|
-
}),
|
|
8378
|
-
"data-testid": testId
|
|
8379
|
-
}, onDismiss ? React__default.createElement(Inline, {
|
|
8380
|
-
flex: [1],
|
|
8381
|
-
alignItems: "center"
|
|
8382
|
-
}, React__default.createElement(BannerContent, null), React__default.createElement(Button, {
|
|
8383
|
-
theme: "link-contrast",
|
|
8384
|
-
onClick: onDismiss
|
|
8385
|
-
}, React__default.createElement(IconTimes, null))) : React__default.createElement(BannerContent, null));
|
|
8386
|
-
};
|
|
8387
|
-
|
|
8388
|
-
const getProgressMetric = (progress, maxValue) => {
|
|
8389
|
-
const updatedMaxValue = maxValue > 0 ? maxValue : 100;
|
|
8390
|
-
let updatedProgress = progress;
|
|
8391
|
-
if (updatedProgress > updatedMaxValue) {
|
|
8392
|
-
updatedProgress = updatedMaxValue;
|
|
8393
|
-
}
|
|
8394
|
-
if (updatedProgress < 0) {
|
|
8395
|
-
updatedProgress = 0;
|
|
8396
|
-
}
|
|
8397
|
-
return {
|
|
8398
|
-
progress: updatedProgress,
|
|
8399
|
-
maxValue: updatedMaxValue
|
|
8400
|
-
};
|
|
8401
|
-
};
|
|
8402
|
-
/**
|
|
8403
|
-
* This function calculates the progress bar so it can align in the center of each step
|
|
8404
|
-
*/
|
|
8405
|
-
const getProgressMetricWithSteps = (progress, amountOfSteps) => {
|
|
8406
|
-
const maxValue = amountOfSteps * 2;
|
|
8407
|
-
let actualProgress = progress;
|
|
8408
|
-
if (progress < 0) {
|
|
8409
|
-
actualProgress = 0;
|
|
8410
|
-
}
|
|
8411
|
-
if (progress > 0) {
|
|
8412
|
-
const previousProgress = (progress - 1) * 2;
|
|
8413
|
-
actualProgress = previousProgress + 1;
|
|
8414
|
-
}
|
|
8415
|
-
if (actualProgress > maxValue) {
|
|
8416
|
-
actualProgress = maxValue;
|
|
8417
|
-
}
|
|
8418
|
-
return {
|
|
8419
|
-
progress: actualProgress,
|
|
8420
|
-
maxValue
|
|
8421
|
-
};
|
|
8422
|
-
};
|
|
8423
|
-
|
|
8424
|
-
const useProgress = (progress, maxValue, getMetric = getProgressMetric) => {
|
|
8425
|
-
const metric = getMetric(progress, maxValue);
|
|
8426
|
-
const percentage = metric.progress / metric.maxValue * 100;
|
|
8427
|
-
const elementProps = {
|
|
8428
|
-
'aria-valuemax': metric.maxValue,
|
|
8429
|
-
'aria-valuemin': 0,
|
|
8430
|
-
'aria-valuenow': metric.progress,
|
|
8431
|
-
role: 'progressbar'
|
|
8432
|
-
};
|
|
8433
|
-
return {
|
|
8434
|
-
elementProps,
|
|
8435
|
-
metric: _extends({}, metric, {
|
|
8436
|
-
percentage
|
|
8437
|
-
})
|
|
8438
|
-
};
|
|
8439
|
-
};
|
|
8440
|
-
|
|
8441
|
-
var styles$R = {"circular-progress":"_UI0Fo","circular-progress__label":"_6PNwZ","circular-progress__track":"_alBLB","circular-progress__indicator":"_VADa6"};
|
|
8442
|
-
|
|
8443
|
-
const CircularProgress = ({
|
|
8444
|
-
progress,
|
|
8445
|
-
maxValue: _maxValue = 100,
|
|
8446
|
-
children,
|
|
8447
|
-
testId
|
|
8448
|
-
}) => {
|
|
8449
|
-
const {
|
|
8450
|
-
elementProps,
|
|
8451
|
-
metric
|
|
8452
|
-
} = useProgress(progress, _maxValue);
|
|
8453
|
-
const determinant = metric.percentage * 2.79;
|
|
8454
|
-
return React__default.createElement("div", _extends({}, elementProps, {
|
|
8455
|
-
className: styles$R['circular-progress'],
|
|
8456
|
-
"data-testid": testId
|
|
8457
|
-
}), React__default.createElement("svg", {
|
|
8458
|
-
viewBox: "0 0 100 100"
|
|
8459
|
-
}, React__default.createElement("circle", {
|
|
8460
|
-
cx: 50,
|
|
8461
|
-
cy: 50,
|
|
8462
|
-
r: 45,
|
|
8463
|
-
strokeWidth: "10px",
|
|
8464
|
-
className: styles$R['circular-progress__track']
|
|
8465
|
-
}), React__default.createElement("circle", {
|
|
8466
|
-
cx: 50,
|
|
8467
|
-
cy: 50,
|
|
8468
|
-
r: 45,
|
|
8469
|
-
strokeWidth: "10px",
|
|
8470
|
-
className: styles$R['circular-progress__indicator'],
|
|
8471
|
-
strokeDashoffset: "66",
|
|
8472
|
-
strokeDasharray: `${determinant} ${279 - determinant}`
|
|
8473
|
-
})), React__default.createElement("div", {
|
|
8474
|
-
className: styles$R['circular-progress__label']
|
|
8475
|
-
}, children || `${metric.progress}/${metric.maxValue}`));
|
|
8476
|
-
};
|
|
8477
|
-
|
|
8478
|
-
var styles$Q = {"progress-bar":"_fWvQF","progress-bar__indicator":"_vd0xc","progress-bar__steps":"_8kdeO"};
|
|
8296
|
+
var styles$S = {"badge":"_RXV4h","badge--warning":"_2An1I","badge--danger":"_-Bw8L","badge--success":"_RxlMz","badge--info":"_dzCH-","badge--numeric":"_Ix9tP"};
|
|
8479
8297
|
|
|
8480
|
-
|
|
8481
|
-
progress,
|
|
8482
|
-
maxValue,
|
|
8483
|
-
testId,
|
|
8484
|
-
steps
|
|
8485
|
-
}) => {
|
|
8486
|
-
const isUsingStepsAsMaxValue = !maxValue && steps && steps.length > 0;
|
|
8487
|
-
const inferedMaxValue = !maxValue && steps && steps.length > 0 ? steps.length : maxValue;
|
|
8488
|
-
const {
|
|
8489
|
-
elementProps,
|
|
8490
|
-
metric
|
|
8491
|
-
} = useProgress(progress, inferedMaxValue || 100, isUsingStepsAsMaxValue ? getProgressMetricWithSteps : getProgressMetric);
|
|
8492
|
-
return React__default.createElement(Stack, null, React__default.createElement("div", _extends({}, elementProps, {
|
|
8493
|
-
className: styles$Q['progress-bar'],
|
|
8494
|
-
"data-testid": testId
|
|
8495
|
-
}), React__default.createElement("div", {
|
|
8496
|
-
className: styles$Q['progress-bar__indicator'],
|
|
8497
|
-
style: {
|
|
8498
|
-
width: `${metric.percentage}%`
|
|
8499
|
-
}
|
|
8500
|
-
})), steps && steps.length > 0 && React__default.createElement("div", {
|
|
8501
|
-
className: styles$Q['progress-bar__steps']
|
|
8502
|
-
}, steps.map(step => React__default.createElement(Text, {
|
|
8503
|
-
key: step
|
|
8504
|
-
}, step))));
|
|
8505
|
-
};
|
|
8298
|
+
var styles$R = {"overlay":"_0yTe8","overlay--after-open":"_yJBtA","overlay--before-close":"_iWogn","content":"_ntozd","content--after-open":"_EQjDq","content--before-close":"_ZTY3B"};
|
|
8506
8299
|
|
|
8507
|
-
var styles$
|
|
8508
|
-
|
|
8509
|
-
const SKELETON_COMPONENT = {
|
|
8510
|
-
AVATAR: 'avatar',
|
|
8511
|
-
AVATAR_SMALL: 'avatar--small',
|
|
8512
|
-
AVATAR_MEDIUM: 'avatar--medium',
|
|
8513
|
-
AVATAR_LARGE: 'avatar--large',
|
|
8514
|
-
AVATAR_XLARGE: 'avatar--xlarge',
|
|
8515
|
-
BUTTON: 'button',
|
|
8516
|
-
PILL: 'pill'
|
|
8517
|
-
};
|
|
8518
|
-
|
|
8519
|
-
const _excluded$j = ["as", "testId", "width", "height"];
|
|
8520
|
-
const Skeleton = _ref => {
|
|
8521
|
-
let {
|
|
8522
|
-
as,
|
|
8523
|
-
testId,
|
|
8524
|
-
width,
|
|
8525
|
-
height
|
|
8526
|
-
} = _ref,
|
|
8527
|
-
positionStyles = _objectWithoutPropertiesLoose(_ref, _excluded$j);
|
|
8528
|
-
const positioning = usePositionStyles(positionStyles);
|
|
8529
|
-
return React__default.createElement("div", {
|
|
8530
|
-
"data-testid": testId,
|
|
8531
|
-
className: classnames(styles$P['skeleton'], {
|
|
8532
|
-
[styles$P['skeleton__avatar']]: as === SKELETON_COMPONENT.AVATAR,
|
|
8533
|
-
[styles$P['skeleton__avatar--small']]: as === SKELETON_COMPONENT.AVATAR_SMALL,
|
|
8534
|
-
[styles$P['skeleton__avatar--medium']]: as === SKELETON_COMPONENT.AVATAR_MEDIUM,
|
|
8535
|
-
[styles$P['skeleton__avatar--large']]: as === SKELETON_COMPONENT.AVATAR_LARGE,
|
|
8536
|
-
[styles$P['skeleton__avatar--xlarge']]: as === SKELETON_COMPONENT.AVATAR_XLARGE,
|
|
8537
|
-
[styles$P['skeleton__button']]: as === SKELETON_COMPONENT.BUTTON,
|
|
8538
|
-
[styles$P['skeleton__pill']]: as === SKELETON_COMPONENT.PILL
|
|
8539
|
-
}),
|
|
8540
|
-
style: _extends({}, positioning, {
|
|
8541
|
-
width: width,
|
|
8542
|
-
height: height
|
|
8543
|
-
})
|
|
8544
|
-
});
|
|
8545
|
-
};
|
|
8546
|
-
|
|
8547
|
-
var styles$O = {"data-table-row":"_hhDnr","data-table-row--clickable":"_ej5Ke","data-table-row--selected":"_qDTAh"};
|
|
8548
|
-
|
|
8549
|
-
var styles$N = {"actions":"_ffXgN"};
|
|
8550
|
-
|
|
8551
|
-
var styles$M = {"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-"};
|
|
8552
|
-
|
|
8553
|
-
var styles$L = {"overlay":"_0yTe8","overlay--after-open":"_yJBtA","overlay--before-close":"_iWogn","content":"_ntozd","content--after-open":"_EQjDq","content--before-close":"_ZTY3B"};
|
|
8554
|
-
|
|
8555
|
-
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"};
|
|
8556
8301
|
|
|
8557
8302
|
const ModalHeader = ({
|
|
8558
8303
|
header,
|
|
@@ -8562,7 +8307,7 @@ const ModalHeader = ({
|
|
|
8562
8307
|
}) => {
|
|
8563
8308
|
if (!header && !subHeader) {
|
|
8564
8309
|
return onClose ? React__default.createElement("div", {
|
|
8565
|
-
className: styles$
|
|
8310
|
+
className: styles$Q['header__close-button']
|
|
8566
8311
|
}, React__default.createElement(Button, {
|
|
8567
8312
|
theme: "link-icon",
|
|
8568
8313
|
onClick: onClose,
|
|
@@ -8578,17 +8323,17 @@ const ModalHeader = ({
|
|
|
8578
8323
|
flex: [1],
|
|
8579
8324
|
alignItems: "center"
|
|
8580
8325
|
}, React__default.createElement("span", {
|
|
8581
|
-
className: styles$
|
|
8326
|
+
className: styles$Q['header']
|
|
8582
8327
|
}, header), onClose && React__default.createElement(Button, {
|
|
8583
8328
|
theme: "link-icon",
|
|
8584
8329
|
onClick: onClose,
|
|
8585
8330
|
disabled: loading
|
|
8586
8331
|
}, React__default.createElement(IconTimes, null))), subHeader && React__default.createElement("div", {
|
|
8587
|
-
className: styles$
|
|
8332
|
+
className: styles$Q['sub-header']
|
|
8588
8333
|
}, subHeader));
|
|
8589
8334
|
};
|
|
8590
8335
|
|
|
8591
|
-
const _excluded$
|
|
8336
|
+
const _excluded$j = ["children", "header", "subHeader", "onClose", "loading", "zIndex", "rootElementId", "width", "height", "maxWidth", "shouldReturnFocusAfterClose", "testId"];
|
|
8592
8337
|
const Modal = _ref => {
|
|
8593
8338
|
let {
|
|
8594
8339
|
children,
|
|
@@ -8605,7 +8350,7 @@ const Modal = _ref => {
|
|
|
8605
8350
|
shouldReturnFocusAfterClose = true,
|
|
8606
8351
|
testId
|
|
8607
8352
|
} = _ref,
|
|
8608
|
-
otherProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
8353
|
+
otherProps = _objectWithoutPropertiesLoose(_ref, _excluded$j);
|
|
8609
8354
|
const style = {
|
|
8610
8355
|
content: {
|
|
8611
8356
|
width,
|
|
@@ -8634,14 +8379,14 @@ const Modal = _ref => {
|
|
|
8634
8379
|
contentLabel: "Modal",
|
|
8635
8380
|
appElement: rootElementId && document.getElementById(rootElementId) || undefined,
|
|
8636
8381
|
overlayClassName: {
|
|
8637
|
-
base: styles$
|
|
8638
|
-
afterOpen: styles$
|
|
8639
|
-
beforeClose: styles$
|
|
8382
|
+
base: styles$R['overlay'],
|
|
8383
|
+
afterOpen: styles$R['overlay--after-open'],
|
|
8384
|
+
beforeClose: styles$R['overlay--before-close']
|
|
8640
8385
|
},
|
|
8641
8386
|
className: {
|
|
8642
|
-
base: styles$
|
|
8643
|
-
afterOpen: styles$
|
|
8644
|
-
beforeClose: styles$
|
|
8387
|
+
base: styles$R['content'],
|
|
8388
|
+
afterOpen: styles$R['content--after-open'],
|
|
8389
|
+
beforeClose: styles$R['content--before-close']
|
|
8645
8390
|
},
|
|
8646
8391
|
data: dataProps
|
|
8647
8392
|
}, React__default.createElement(ModalHeader, {
|
|
@@ -8683,7 +8428,7 @@ const useScrollShadow = () => {
|
|
|
8683
8428
|
};
|
|
8684
8429
|
};
|
|
8685
8430
|
|
|
8686
|
-
var styles$
|
|
8431
|
+
var styles$P = {"modal-body":"_4YK4k","modal-body--with-scroll-shadow":"_wo1vv","modal-body__inner-div":"_9u6xC"};
|
|
8687
8432
|
|
|
8688
8433
|
const ModalBody = ({
|
|
8689
8434
|
children,
|
|
@@ -8694,17 +8439,17 @@ const ModalBody = ({
|
|
|
8694
8439
|
showScrollShadow
|
|
8695
8440
|
} = useScrollShadow();
|
|
8696
8441
|
return React__default.createElement("div", {
|
|
8697
|
-
className: classnames(styles$
|
|
8698
|
-
[styles$
|
|
8442
|
+
className: classnames(styles$P['modal-body'], {
|
|
8443
|
+
[styles$P['modal-body--with-scroll-shadow']]: showScrollShadow
|
|
8699
8444
|
}),
|
|
8700
8445
|
ref: ref,
|
|
8701
8446
|
"data-testid": testId
|
|
8702
8447
|
}, React__default.createElement("div", {
|
|
8703
|
-
className: styles$
|
|
8448
|
+
className: styles$P['modal-body__inner-div']
|
|
8704
8449
|
}, children));
|
|
8705
8450
|
};
|
|
8706
8451
|
|
|
8707
|
-
var styles$
|
|
8452
|
+
var styles$O = {"modal-footer":"_bezlP","tertiary-container":"_EdqHx"};
|
|
8708
8453
|
|
|
8709
8454
|
const updateButtonProps$1 = (button, newProps) => {
|
|
8710
8455
|
if (!button) {
|
|
@@ -8741,7 +8486,7 @@ const ModalFooter = ({
|
|
|
8741
8486
|
justifyContent: "space-between"
|
|
8742
8487
|
}, React__default.createElement("div", {
|
|
8743
8488
|
className: classnames({
|
|
8744
|
-
[styles$
|
|
8489
|
+
[styles$O['tertiary-container']]: tertiaryButton && tertiaryButton.props.theme.startsWith('link')
|
|
8745
8490
|
})
|
|
8746
8491
|
}, tertiaryButton || React__default.createElement("div", null)), React__default.createElement(Inline, {
|
|
8747
8492
|
space: 12
|
|
@@ -8759,7 +8504,7 @@ const FooterContainer = ({
|
|
|
8759
8504
|
displayName: 'Inline'
|
|
8760
8505
|
});
|
|
8761
8506
|
return React__default.createElement("div", {
|
|
8762
|
-
className: styles$
|
|
8507
|
+
className: styles$O['modal-footer'],
|
|
8763
8508
|
"data-testid": testId
|
|
8764
8509
|
}, React__default.createElement(Inline, {
|
|
8765
8510
|
justifyContent: "end",
|
|
@@ -8772,7 +8517,7 @@ var dayOverridesStyles = {"root":"_et9Fs","table":"_l7Mis","caption":"_XGu8K","h
|
|
|
8772
8517
|
|
|
8773
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"};
|
|
8774
8519
|
|
|
8775
|
-
var styles$
|
|
8520
|
+
var styles$N = {"calendar":"_YPyZ6","calendar__overlay":"_-cw0A"};
|
|
8776
8521
|
|
|
8777
8522
|
function parseDate(str, format, locale) {
|
|
8778
8523
|
const parsed = dateFnsParse(str, format, new Date(), {
|
|
@@ -9007,9 +8752,9 @@ const Calendar = ({
|
|
|
9007
8752
|
}
|
|
9008
8753
|
};
|
|
9009
8754
|
return React__default.createElement(Portal, null, React__default.createElement("div", {
|
|
9010
|
-
className: styles$
|
|
8755
|
+
className: styles$N['calendar']
|
|
9011
8756
|
}, React__default.createElement("div", {
|
|
9012
|
-
className: styles$
|
|
8757
|
+
className: styles$N['calendar__overlay'],
|
|
9013
8758
|
ref: ref => setCalendarRef(ref),
|
|
9014
8759
|
style: _extends({}, calendarPosition, {
|
|
9015
8760
|
zIndex: isInsideDropdown ? getZIndex('dropdown-level-2') : getZIndex('dropdown')
|
|
@@ -9067,9 +8812,9 @@ const useCheckBoxFieldControllers = ({
|
|
|
9067
8812
|
return controllers;
|
|
9068
8813
|
};
|
|
9069
8814
|
|
|
9070
|
-
var styles$
|
|
8815
|
+
var styles$M = {"check-box-field":"_Id4qm","check-box-field__caption":"_s9d-m","check-box-field__custom-input":"_kmvBP"};
|
|
9071
8816
|
|
|
9072
|
-
const _excluded$
|
|
8817
|
+
const _excluded$i = ["name", "id", "checked", "onChange", "onBlur", "label", "caption", "error", "disabled", "testId"];
|
|
9073
8818
|
/** CheckboxField form element. */
|
|
9074
8819
|
const CheckboxField = _ref => {
|
|
9075
8820
|
let {
|
|
@@ -9084,7 +8829,7 @@ const CheckboxField = _ref => {
|
|
|
9084
8829
|
disabled,
|
|
9085
8830
|
testId
|
|
9086
8831
|
} = _ref,
|
|
9087
|
-
otherProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
8832
|
+
otherProps = _objectWithoutPropertiesLoose(_ref, _excluded$i);
|
|
9088
8833
|
const controllers = useCheckBoxFieldControllers({
|
|
9089
8834
|
name,
|
|
9090
8835
|
id: inputId,
|
|
@@ -9102,7 +8847,7 @@ const CheckboxField = _ref => {
|
|
|
9102
8847
|
flexItems: true,
|
|
9103
8848
|
flex: ['0 0 auto']
|
|
9104
8849
|
}, otherProps), React__default.createElement("div", {
|
|
9105
|
-
className: styles$
|
|
8850
|
+
className: styles$M['check-box-field']
|
|
9106
8851
|
}, React__default.createElement("input", {
|
|
9107
8852
|
name: name,
|
|
9108
8853
|
id: controllers.id,
|
|
@@ -9115,12 +8860,12 @@ const CheckboxField = _ref => {
|
|
|
9115
8860
|
onChange: controllers.onChange,
|
|
9116
8861
|
onBlur: controllers.onBlur
|
|
9117
8862
|
}), React__default.createElement("span", {
|
|
9118
|
-
className: styles$
|
|
8863
|
+
className: styles$M['check-box-field__custom-input']
|
|
9119
8864
|
})), label && React__default.createElement(Label, {
|
|
9120
8865
|
htmlFor: controllers.id,
|
|
9121
8866
|
truncate: false
|
|
9122
8867
|
}, label)), caption && React__default.createElement("div", {
|
|
9123
|
-
className: styles$
|
|
8868
|
+
className: styles$M['check-box-field__caption']
|
|
9124
8869
|
}, React__default.createElement(Caption, {
|
|
9125
8870
|
fieldId: controllers.id
|
|
9126
8871
|
}, caption)), controllers.error && React__default.createElement(ErrorMessage, {
|
|
@@ -9158,9 +8903,9 @@ const useLocalStorage = (key, initialValue) => {
|
|
|
9158
8903
|
return [storedValue, setValue];
|
|
9159
8904
|
};
|
|
9160
8905
|
|
|
9161
|
-
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"};
|
|
9162
8907
|
|
|
9163
|
-
const _excluded$
|
|
8908
|
+
const _excluded$h = ["header", "children", "mediaUrl", "onClose", "modalId", "primaryButton", "secondaryButton", "testId"];
|
|
9164
8909
|
const HintModal = _ref => {
|
|
9165
8910
|
let {
|
|
9166
8911
|
header,
|
|
@@ -9172,7 +8917,7 @@ const HintModal = _ref => {
|
|
|
9172
8917
|
secondaryButton,
|
|
9173
8918
|
testId
|
|
9174
8919
|
} = _ref,
|
|
9175
|
-
positionProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
8920
|
+
positionProps = _objectWithoutPropertiesLoose(_ref, _excluded$h);
|
|
9176
8921
|
const __ = useTranslation('HintModal');
|
|
9177
8922
|
const [doNotShowAgain, setDoNotShowAgain] = useState(false);
|
|
9178
8923
|
const [persistedDoNotShow, setPersistedDoNotShow] = useLocalStorage(modalId, false);
|
|
@@ -9214,22 +8959,22 @@ const HintModal = _ref => {
|
|
|
9214
8959
|
closeTimeoutMS: 200,
|
|
9215
8960
|
contentLabel: "Modal",
|
|
9216
8961
|
className: {
|
|
9217
|
-
base: styles$
|
|
9218
|
-
afterOpen: styles$
|
|
9219
|
-
beforeClose: styles$
|
|
8962
|
+
base: styles$L['hint-modal'],
|
|
8963
|
+
afterOpen: styles$L['hint-modal--after-open'],
|
|
8964
|
+
beforeClose: styles$L['hint-modal--before-close']
|
|
9220
8965
|
},
|
|
9221
|
-
overlayClassName: styles$
|
|
8966
|
+
overlayClassName: styles$L['hint-modal__overlay']
|
|
9222
8967
|
}, React__default.createElement("div", {
|
|
9223
|
-
className: styles$
|
|
8968
|
+
className: styles$L['hint-modal__close-button']
|
|
9224
8969
|
}, React__default.createElement(Button, {
|
|
9225
8970
|
theme: "link-icon",
|
|
9226
8971
|
onClick: handleOnClose
|
|
9227
8972
|
}, React__default.createElement(IconTimes, null))), mediaUrl && React__default.createElement("img", {
|
|
9228
|
-
className: styles$
|
|
8973
|
+
className: styles$L['hint-modal__image'],
|
|
9229
8974
|
src: mediaUrl,
|
|
9230
8975
|
alt: String(header)
|
|
9231
8976
|
}), React__default.createElement("div", {
|
|
9232
|
-
className: styles$
|
|
8977
|
+
className: styles$L['hint-modal__body']
|
|
9233
8978
|
}, React__default.createElement(Stack, {
|
|
9234
8979
|
justifyContent: "space-between"
|
|
9235
8980
|
}, React__default.createElement(Stack, {
|
|
@@ -9250,6 +8995,292 @@ const HintModal = _ref => {
|
|
|
9250
8995
|
}, secondaryButtonUpdated, primaryButtonUpdated)))));
|
|
9251
8996
|
};
|
|
9252
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
|
+
activeClassName: styles$T['menu-item--active'],
|
|
9044
|
+
exact: true
|
|
9045
|
+
}, menu.label, !!menu.badge && React__default.createElement(Badge, null, menu.badge)));
|
|
9046
|
+
};
|
|
9047
|
+
|
|
9048
|
+
const PageLayout = ({
|
|
9049
|
+
title,
|
|
9050
|
+
children,
|
|
9051
|
+
menu,
|
|
9052
|
+
sideNavContent
|
|
9053
|
+
}) => {
|
|
9054
|
+
return React__default.createElement("div", {
|
|
9055
|
+
className: styles$U['page-layout']
|
|
9056
|
+
}, React__default.createElement("div", {
|
|
9057
|
+
className: styles$U['page-layout__nav-container']
|
|
9058
|
+
}, React__default.createElement(Stack, {
|
|
9059
|
+
space: 12
|
|
9060
|
+
}, React__default.createElement(Text, {
|
|
9061
|
+
as: "h5",
|
|
9062
|
+
textWrap: "wrap"
|
|
9063
|
+
}, title), React__default.createElement("ul", {
|
|
9064
|
+
className: styles$U['page-layout__nav-list']
|
|
9065
|
+
}, menu.filter(menu => !('isVisible' in menu) || (menu == null ? void 0 : menu.isVisible) === true).map((menuItem, index) => React__default.createElement(MenuItem, {
|
|
9066
|
+
key: index,
|
|
9067
|
+
menu: menuItem
|
|
9068
|
+
}))), sideNavContent && React__default.createElement("div", {
|
|
9069
|
+
className: styles$U['page-layout__side-nav-content']
|
|
9070
|
+
}, sideNavContent))), React__default.createElement("div", {
|
|
9071
|
+
className: styles$U['page-layout__content']
|
|
9072
|
+
}, children));
|
|
9073
|
+
};
|
|
9074
|
+
|
|
9075
|
+
const PERSISTENT_BANNER_THEME = {
|
|
9076
|
+
UPSELL: 'upsell',
|
|
9077
|
+
INFO: 'info',
|
|
9078
|
+
DANGER: 'danger'
|
|
9079
|
+
};
|
|
9080
|
+
|
|
9081
|
+
var styles$K = {"persistent-banner":"_FsCJQ","persistent-banner--info":"_zt-xK","persistent-banner--danger":"_rmUys","persistent-banner--upsell":"_UGrRR"};
|
|
9082
|
+
|
|
9083
|
+
const PersistentBanner = ({
|
|
9084
|
+
theme: _theme = PERSISTENT_BANNER_THEME.INFO,
|
|
9085
|
+
children,
|
|
9086
|
+
primaryButton,
|
|
9087
|
+
secondaryButton,
|
|
9088
|
+
onDismiss,
|
|
9089
|
+
onLoad,
|
|
9090
|
+
testId
|
|
9091
|
+
}) => {
|
|
9092
|
+
useEffect(() => {
|
|
9093
|
+
onLoad == null || onLoad();
|
|
9094
|
+
}, []);
|
|
9095
|
+
const BannerContent = () => React__default.createElement(Inline, {
|
|
9096
|
+
justifyContent: "center",
|
|
9097
|
+
alignItems: "center"
|
|
9098
|
+
}, children, primaryButton && React__default.cloneElement(primaryButton, _extends({
|
|
9099
|
+
theme: BUTTON_THEMES.HOLLOW_CONTRAST
|
|
9100
|
+
}, primaryButton.props)), secondaryButton && React__default.cloneElement(secondaryButton, _extends({
|
|
9101
|
+
theme: BUTTON_THEMES.LINK_CONTRAST
|
|
9102
|
+
}, secondaryButton.props)));
|
|
9103
|
+
return React__default.createElement("div", {
|
|
9104
|
+
className: classnames(styles$K['persistent-banner'], {
|
|
9105
|
+
[styles$K['persistent-banner--info']]: _theme === PERSISTENT_BANNER_THEME.INFO,
|
|
9106
|
+
[styles$K['persistent-banner--danger']]: _theme === PERSISTENT_BANNER_THEME.DANGER,
|
|
9107
|
+
[styles$K['persistent-banner--upsell']]: _theme === PERSISTENT_BANNER_THEME.UPSELL
|
|
9108
|
+
}),
|
|
9109
|
+
"data-testid": testId
|
|
9110
|
+
}, onDismiss ? React__default.createElement(Inline, {
|
|
9111
|
+
flex: [1],
|
|
9112
|
+
alignItems: "center"
|
|
9113
|
+
}, React__default.createElement(BannerContent, null), React__default.createElement(Button, {
|
|
9114
|
+
theme: "link-contrast",
|
|
9115
|
+
onClick: onDismiss
|
|
9116
|
+
}, React__default.createElement(IconTimes, null))) : React__default.createElement(BannerContent, null));
|
|
9117
|
+
};
|
|
9118
|
+
|
|
9119
|
+
const getProgressMetric = (progress, maxValue) => {
|
|
9120
|
+
const updatedMaxValue = maxValue > 0 ? maxValue : 100;
|
|
9121
|
+
let updatedProgress = progress;
|
|
9122
|
+
if (updatedProgress > updatedMaxValue) {
|
|
9123
|
+
updatedProgress = updatedMaxValue;
|
|
9124
|
+
}
|
|
9125
|
+
if (updatedProgress < 0) {
|
|
9126
|
+
updatedProgress = 0;
|
|
9127
|
+
}
|
|
9128
|
+
return {
|
|
9129
|
+
progress: updatedProgress,
|
|
9130
|
+
maxValue: updatedMaxValue
|
|
9131
|
+
};
|
|
9132
|
+
};
|
|
9133
|
+
/**
|
|
9134
|
+
* This function calculates the progress bar so it can align in the center of each step
|
|
9135
|
+
*/
|
|
9136
|
+
const getProgressMetricWithSteps = (progress, amountOfSteps) => {
|
|
9137
|
+
const maxValue = amountOfSteps * 2;
|
|
9138
|
+
let actualProgress = progress;
|
|
9139
|
+
if (progress < 0) {
|
|
9140
|
+
actualProgress = 0;
|
|
9141
|
+
}
|
|
9142
|
+
if (progress > 0) {
|
|
9143
|
+
const previousProgress = (progress - 1) * 2;
|
|
9144
|
+
actualProgress = previousProgress + 1;
|
|
9145
|
+
}
|
|
9146
|
+
if (actualProgress > maxValue) {
|
|
9147
|
+
actualProgress = maxValue;
|
|
9148
|
+
}
|
|
9149
|
+
return {
|
|
9150
|
+
progress: actualProgress,
|
|
9151
|
+
maxValue
|
|
9152
|
+
};
|
|
9153
|
+
};
|
|
9154
|
+
|
|
9155
|
+
const useProgress = (progress, maxValue, getMetric = getProgressMetric) => {
|
|
9156
|
+
const metric = getMetric(progress, maxValue);
|
|
9157
|
+
const percentage = metric.progress / metric.maxValue * 100;
|
|
9158
|
+
const elementProps = {
|
|
9159
|
+
'aria-valuemax': metric.maxValue,
|
|
9160
|
+
'aria-valuemin': 0,
|
|
9161
|
+
'aria-valuenow': metric.progress,
|
|
9162
|
+
role: 'progressbar'
|
|
9163
|
+
};
|
|
9164
|
+
return {
|
|
9165
|
+
elementProps,
|
|
9166
|
+
metric: _extends({}, metric, {
|
|
9167
|
+
percentage
|
|
9168
|
+
})
|
|
9169
|
+
};
|
|
9170
|
+
};
|
|
9171
|
+
|
|
9172
|
+
var styles$J = {"circular-progress":"_UI0Fo","circular-progress__label":"_6PNwZ","circular-progress__track":"_alBLB","circular-progress__indicator":"_VADa6"};
|
|
9173
|
+
|
|
9174
|
+
const CircularProgress = ({
|
|
9175
|
+
progress,
|
|
9176
|
+
maxValue: _maxValue = 100,
|
|
9177
|
+
children,
|
|
9178
|
+
testId
|
|
9179
|
+
}) => {
|
|
9180
|
+
const {
|
|
9181
|
+
elementProps,
|
|
9182
|
+
metric
|
|
9183
|
+
} = useProgress(progress, _maxValue);
|
|
9184
|
+
const determinant = metric.percentage * 2.79;
|
|
9185
|
+
return React__default.createElement("div", _extends({}, elementProps, {
|
|
9186
|
+
className: styles$J['circular-progress'],
|
|
9187
|
+
"data-testid": testId
|
|
9188
|
+
}), React__default.createElement("svg", {
|
|
9189
|
+
viewBox: "0 0 100 100"
|
|
9190
|
+
}, React__default.createElement("circle", {
|
|
9191
|
+
cx: 50,
|
|
9192
|
+
cy: 50,
|
|
9193
|
+
r: 45,
|
|
9194
|
+
strokeWidth: "10px",
|
|
9195
|
+
className: styles$J['circular-progress__track']
|
|
9196
|
+
}), React__default.createElement("circle", {
|
|
9197
|
+
cx: 50,
|
|
9198
|
+
cy: 50,
|
|
9199
|
+
r: 45,
|
|
9200
|
+
strokeWidth: "10px",
|
|
9201
|
+
className: styles$J['circular-progress__indicator'],
|
|
9202
|
+
strokeDashoffset: "66",
|
|
9203
|
+
strokeDasharray: `${determinant} ${279 - determinant}`
|
|
9204
|
+
})), React__default.createElement("div", {
|
|
9205
|
+
className: styles$J['circular-progress__label']
|
|
9206
|
+
}, children || `${metric.progress}/${metric.maxValue}`));
|
|
9207
|
+
};
|
|
9208
|
+
|
|
9209
|
+
var styles$I = {"progress-bar":"_fWvQF","progress-bar__indicator":"_vd0xc","progress-bar__steps":"_8kdeO"};
|
|
9210
|
+
|
|
9211
|
+
const ProgressBar = ({
|
|
9212
|
+
progress,
|
|
9213
|
+
maxValue,
|
|
9214
|
+
testId,
|
|
9215
|
+
steps
|
|
9216
|
+
}) => {
|
|
9217
|
+
const isUsingStepsAsMaxValue = !maxValue && steps && steps.length > 0;
|
|
9218
|
+
const inferedMaxValue = !maxValue && steps && steps.length > 0 ? steps.length : maxValue;
|
|
9219
|
+
const {
|
|
9220
|
+
elementProps,
|
|
9221
|
+
metric
|
|
9222
|
+
} = useProgress(progress, inferedMaxValue || 100, isUsingStepsAsMaxValue ? getProgressMetricWithSteps : getProgressMetric);
|
|
9223
|
+
return React__default.createElement(Stack, null, React__default.createElement("div", _extends({}, elementProps, {
|
|
9224
|
+
className: styles$I['progress-bar'],
|
|
9225
|
+
"data-testid": testId
|
|
9226
|
+
}), React__default.createElement("div", {
|
|
9227
|
+
className: styles$I['progress-bar__indicator'],
|
|
9228
|
+
style: {
|
|
9229
|
+
width: `${metric.percentage}%`
|
|
9230
|
+
}
|
|
9231
|
+
})), steps && steps.length > 0 && React__default.createElement("div", {
|
|
9232
|
+
className: styles$I['progress-bar__steps']
|
|
9233
|
+
}, steps.map(step => React__default.createElement(Text, {
|
|
9234
|
+
key: step
|
|
9235
|
+
}, step))));
|
|
9236
|
+
};
|
|
9237
|
+
|
|
9238
|
+
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"};
|
|
9239
|
+
|
|
9240
|
+
const SKELETON_COMPONENT = {
|
|
9241
|
+
AVATAR: 'avatar',
|
|
9242
|
+
AVATAR_SMALL: 'avatar--small',
|
|
9243
|
+
AVATAR_MEDIUM: 'avatar--medium',
|
|
9244
|
+
AVATAR_LARGE: 'avatar--large',
|
|
9245
|
+
AVATAR_XLARGE: 'avatar--xlarge',
|
|
9246
|
+
BUTTON: 'button',
|
|
9247
|
+
PILL: 'pill'
|
|
9248
|
+
};
|
|
9249
|
+
|
|
9250
|
+
const _excluded$f = ["as", "testId", "width", "height"];
|
|
9251
|
+
const Skeleton = _ref => {
|
|
9252
|
+
let {
|
|
9253
|
+
as,
|
|
9254
|
+
testId,
|
|
9255
|
+
width,
|
|
9256
|
+
height
|
|
9257
|
+
} = _ref,
|
|
9258
|
+
positionStyles = _objectWithoutPropertiesLoose(_ref, _excluded$f);
|
|
9259
|
+
const positioning = usePositionStyles(positionStyles);
|
|
9260
|
+
return React__default.createElement("div", {
|
|
9261
|
+
"data-testid": testId,
|
|
9262
|
+
className: classnames(styles$H['skeleton'], {
|
|
9263
|
+
[styles$H['skeleton__avatar']]: as === SKELETON_COMPONENT.AVATAR,
|
|
9264
|
+
[styles$H['skeleton__avatar--small']]: as === SKELETON_COMPONENT.AVATAR_SMALL,
|
|
9265
|
+
[styles$H['skeleton__avatar--medium']]: as === SKELETON_COMPONENT.AVATAR_MEDIUM,
|
|
9266
|
+
[styles$H['skeleton__avatar--large']]: as === SKELETON_COMPONENT.AVATAR_LARGE,
|
|
9267
|
+
[styles$H['skeleton__avatar--xlarge']]: as === SKELETON_COMPONENT.AVATAR_XLARGE,
|
|
9268
|
+
[styles$H['skeleton__button']]: as === SKELETON_COMPONENT.BUTTON,
|
|
9269
|
+
[styles$H['skeleton__pill']]: as === SKELETON_COMPONENT.PILL
|
|
9270
|
+
}),
|
|
9271
|
+
style: _extends({}, positioning, {
|
|
9272
|
+
width: width,
|
|
9273
|
+
height: height
|
|
9274
|
+
})
|
|
9275
|
+
});
|
|
9276
|
+
};
|
|
9277
|
+
|
|
9278
|
+
var styles$G = {"data-table-row":"_hhDnr","data-table-row--clickable":"_ej5Ke","data-table-row--selected":"_qDTAh"};
|
|
9279
|
+
|
|
9280
|
+
var styles$F = {"actions":"_ffXgN"};
|
|
9281
|
+
|
|
9282
|
+
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-"};
|
|
9283
|
+
|
|
9253
9284
|
const DataTableCellElement = ({
|
|
9254
9285
|
children,
|
|
9255
9286
|
columnIndex,
|
|
@@ -9272,9 +9303,9 @@ const DataTableCellElement = ({
|
|
|
9272
9303
|
const hasError = !!error;
|
|
9273
9304
|
const errorMessage = error;
|
|
9274
9305
|
const icon = hasError && React__default.createElement("div", {
|
|
9275
|
-
className: classnames(styles$
|
|
9276
|
-
[styles$
|
|
9277
|
-
[styles$
|
|
9306
|
+
className: classnames(styles$E['data-table-cell__error-icon'], {
|
|
9307
|
+
[styles$E['data-table-cell__error-icon--right-align']]: isRightAligned,
|
|
9308
|
+
[styles$E['data-table-cell__error-icon--left-align']]: !isRightAligned
|
|
9278
9309
|
})
|
|
9279
9310
|
}, React__default.createElement(IconTimesOctagon, {
|
|
9280
9311
|
size: "medium",
|
|
@@ -9282,17 +9313,17 @@ const DataTableCellElement = ({
|
|
|
9282
9313
|
}));
|
|
9283
9314
|
const TableCell = React__default.createElement("td", {
|
|
9284
9315
|
className: classnames({
|
|
9285
|
-
[styles$
|
|
9286
|
-
[styles$
|
|
9287
|
-
[styles$
|
|
9288
|
-
}, styles$
|
|
9316
|
+
[styles$E['data-table-cell--invalid']]: hasError,
|
|
9317
|
+
[styles$E['data-table-cell--no-padding']]: _noPadding,
|
|
9318
|
+
[styles$E['data-table-cell--vertical-border']]: hasVerticalBorders
|
|
9319
|
+
}, styles$E['data-table-cell']),
|
|
9289
9320
|
colSpan: colSpan,
|
|
9290
9321
|
ref: ref
|
|
9291
9322
|
}, React__default.createElement("div", {
|
|
9292
|
-
className: classnames(styles$
|
|
9293
|
-
[styles$
|
|
9294
|
-
[styles$
|
|
9295
|
-
[styles$
|
|
9323
|
+
className: classnames(styles$E['data-table-cell__content'], {
|
|
9324
|
+
[styles$E['data-table-cell__content--with-error']]: hasError,
|
|
9325
|
+
[styles$E['data-table-cell__content--right-align']]: isRightAligned,
|
|
9326
|
+
[styles$E['data-table-cell__content--loading']]: state === DATA_TABLE_STATES.BACKGROUND_LOADING
|
|
9296
9327
|
})
|
|
9297
9328
|
}, isRightAligned && icon, children, !isRightAligned && icon));
|
|
9298
9329
|
return React__default.createElement(Tooltip, {
|
|
@@ -9316,7 +9347,7 @@ const DataTableRowActions = ({
|
|
|
9316
9347
|
return React__default.createElement(DataTableCell, {
|
|
9317
9348
|
columnIndex: columnIndex
|
|
9318
9349
|
}, React__default.createElement("div", {
|
|
9319
|
-
className: styles$
|
|
9350
|
+
className: styles$F['actions'],
|
|
9320
9351
|
"data-testid": "data-table-dropdown-menu"
|
|
9321
9352
|
}, state === 'SKELETON_LOADING' && React__default.createElement(Skeleton, {
|
|
9322
9353
|
width: 45
|
|
@@ -9329,7 +9360,7 @@ const DataTableRowActions = ({
|
|
|
9329
9360
|
})));
|
|
9330
9361
|
};
|
|
9331
9362
|
|
|
9332
|
-
var styles$
|
|
9363
|
+
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"};
|
|
9333
9364
|
|
|
9334
9365
|
const DataTableEditableCellElement = ({
|
|
9335
9366
|
name,
|
|
@@ -9377,8 +9408,8 @@ const DataTableEditableCellElement = ({
|
|
|
9377
9408
|
};
|
|
9378
9409
|
const EditableCell = React__default.createElement("div", {
|
|
9379
9410
|
className: classnames({
|
|
9380
|
-
[styles$
|
|
9381
|
-
}, styles$
|
|
9411
|
+
[styles$D['data-table-editable-cell--currency']]: _type === 'currency'
|
|
9412
|
+
}, styles$D['data-table-editable-cell']),
|
|
9382
9413
|
"data-testid": testId,
|
|
9383
9414
|
role: "cell"
|
|
9384
9415
|
}, React__default.createElement(Field, _extends({}, fieldProps), React__default.createElement(AffixContainer, {
|
|
@@ -9388,12 +9419,12 @@ const DataTableEditableCellElement = ({
|
|
|
9388
9419
|
name: name,
|
|
9389
9420
|
id: controllers.id,
|
|
9390
9421
|
className: classnames({
|
|
9391
|
-
[styles$
|
|
9392
|
-
[styles$
|
|
9393
|
-
[styles$
|
|
9394
|
-
[styles$
|
|
9395
|
-
[styles$
|
|
9396
|
-
[styles$
|
|
9422
|
+
[styles$D['data-table-editable-cell--right-aligned']]: isRightAligned,
|
|
9423
|
+
[styles$D['data-table-editable-cell--top-left']]: isTopLeftCell,
|
|
9424
|
+
[styles$D['data-table-editable-cell--top-right']]: isTopRightCell,
|
|
9425
|
+
[styles$D['data-table-editable-cell--bottom-left']]: isBottomLeftCell,
|
|
9426
|
+
[styles$D['data-table-editable-cell--bottom-right']]: isBottomRightCell,
|
|
9427
|
+
[styles$D['data-table-editable-cell--invalid']]: hasError
|
|
9397
9428
|
}),
|
|
9398
9429
|
type: _type === 'currency' ? 'number' : 'text',
|
|
9399
9430
|
step: _type === 'currency' ? 'any' : '',
|
|
@@ -9419,7 +9450,7 @@ const DataTableEditableCellElement = ({
|
|
|
9419
9450
|
};
|
|
9420
9451
|
const DataTableEditableCell = forwardRef(DataTableEditableCellElement);
|
|
9421
9452
|
|
|
9422
|
-
const _excluded$
|
|
9453
|
+
const _excluded$e = ["children", "onClick", "isSelected", "actions", "hasDefaultPadding", "hasDefaultCell", "testId"];
|
|
9423
9454
|
const DataTableRowComponent = (_ref, ref) => {
|
|
9424
9455
|
let {
|
|
9425
9456
|
children,
|
|
@@ -9430,13 +9461,13 @@ const DataTableRowComponent = (_ref, ref) => {
|
|
|
9430
9461
|
hasDefaultCell = true,
|
|
9431
9462
|
testId
|
|
9432
9463
|
} = _ref,
|
|
9433
|
-
nativeDivProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
9464
|
+
nativeDivProps = _objectWithoutPropertiesLoose(_ref, _excluded$e);
|
|
9434
9465
|
const {
|
|
9435
9466
|
showActionMenu
|
|
9436
9467
|
} = useDataTableContext();
|
|
9437
|
-
const styleNames = classnames(styles$
|
|
9438
|
-
[styles$
|
|
9439
|
-
[styles$
|
|
9468
|
+
const styleNames = classnames(styles$G['data-table-row'], {
|
|
9469
|
+
[styles$G['data-table-row--clickable']]: onClick,
|
|
9470
|
+
[styles$G['data-table-row--selected']]: isSelected
|
|
9440
9471
|
});
|
|
9441
9472
|
const renderColumn = (columnElement, index) => {
|
|
9442
9473
|
const isUsingDataTableCell = columnElement && typeof columnElement === 'object' && 'type' in columnElement && (columnElement == null ? void 0 : columnElement.type) === DataTableCell;
|
|
@@ -9527,7 +9558,7 @@ const calculateScrollState = scrollContainer => {
|
|
|
9527
9558
|
return DATA_TABLE_SCROLL_STATES.NO_SCROLL;
|
|
9528
9559
|
};
|
|
9529
9560
|
|
|
9530
|
-
var styles$
|
|
9561
|
+
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"};
|
|
9531
9562
|
|
|
9532
9563
|
const useDataTableScrollState = stickyColumns => {
|
|
9533
9564
|
const scrollContainerRef = useRef(null);
|
|
@@ -9569,7 +9600,7 @@ const useDataTableScrollState = stickyColumns => {
|
|
|
9569
9600
|
};
|
|
9570
9601
|
};
|
|
9571
9602
|
|
|
9572
|
-
var styles$
|
|
9603
|
+
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"};
|
|
9573
9604
|
|
|
9574
9605
|
const DataTableCoverShadow = ({
|
|
9575
9606
|
isShowingColumns,
|
|
@@ -9587,11 +9618,11 @@ const DataTableCoverShadow = ({
|
|
|
9587
9618
|
return `calc(100% - ${headerHeight})`;
|
|
9588
9619
|
};
|
|
9589
9620
|
return React__default.createElement("div", {
|
|
9590
|
-
className: classnames(styles$
|
|
9591
|
-
[styles$
|
|
9592
|
-
[styles$
|
|
9593
|
-
[styles$
|
|
9594
|
-
[styles$
|
|
9621
|
+
className: classnames(styles$B['data-table-cover-shadow'], {
|
|
9622
|
+
[styles$B['data-table-cover-shadow--left']]: direction === 'left',
|
|
9623
|
+
[styles$B['data-table-cover-shadow--left-shadow']]: direction === 'left' && showShadow,
|
|
9624
|
+
[styles$B['data-table-cover-shadow--right']]: direction === 'right',
|
|
9625
|
+
[styles$B['data-table-cover-shadow--right-shadow']]: direction === 'right' && showShadow
|
|
9595
9626
|
}),
|
|
9596
9627
|
style: {
|
|
9597
9628
|
// @ts-expect-error This difines a custom CSS variable
|
|
@@ -9653,13 +9684,13 @@ const DataTableStickyColumnsContainer = ({
|
|
|
9653
9684
|
isShowingColumns: !!isShowingColumns,
|
|
9654
9685
|
showShadow: state === 'EMPTY' ? false : stickyColumns === 'left'
|
|
9655
9686
|
})), React__default.createElement("div", {
|
|
9656
|
-
className: classnames(styles$
|
|
9657
|
-
[styles$
|
|
9658
|
-
[styles$
|
|
9659
|
-
[styles$
|
|
9660
|
-
[styles$
|
|
9661
|
-
[styles$
|
|
9662
|
-
[styles$
|
|
9687
|
+
className: classnames(styles$C[containerClassName], {
|
|
9688
|
+
[styles$C[`${containerClassName}--with-footer`]]: isShowingFooter,
|
|
9689
|
+
[styles$C[`${containerClassName}--with-left-sticky-columns`]]: hasLeftColumnSticky,
|
|
9690
|
+
[styles$C[`${containerClassName}--with-left-sticky-columns-and-shadow`]]: state !== 'EMPTY' ? hasLeftColumnSticky && hasScrollOnLeft : false,
|
|
9691
|
+
[styles$C[`${containerClassName}--with-right-sticky-columns`]]: hasRightColumnSticky,
|
|
9692
|
+
[styles$C[`${containerClassName}--with-right-sticky-columns-and-shadow`]]: state !== 'EMPTY' ? hasRightColumnSticky && hasScrollOnRight : false,
|
|
9693
|
+
[styles$C[`${containerClassName}--no-shadow`]]: noShadow
|
|
9663
9694
|
}),
|
|
9664
9695
|
onScroll: onScroll,
|
|
9665
9696
|
ref: scrollContainerRef,
|
|
@@ -9667,11 +9698,11 @@ const DataTableStickyColumnsContainer = ({
|
|
|
9667
9698
|
}, children));
|
|
9668
9699
|
};
|
|
9669
9700
|
|
|
9670
|
-
var styles$
|
|
9701
|
+
var styles$A = {"data-table-empty-state":"_fCHjG"};
|
|
9671
9702
|
|
|
9672
|
-
var styles$
|
|
9703
|
+
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"};
|
|
9673
9704
|
|
|
9674
|
-
var styles$
|
|
9705
|
+
var styles$y = {"empty-state-container-cta":"_X-dEs","empty-state-container-cta--inside-modal":"_63-SX"};
|
|
9675
9706
|
|
|
9676
9707
|
const EmptyStateContainerCTA = ({
|
|
9677
9708
|
isPaywall,
|
|
@@ -9688,8 +9719,8 @@ const EmptyStateContainerCTA = ({
|
|
|
9688
9719
|
size: BUTTON_SIZES.MIN_WIDTH_100
|
|
9689
9720
|
});
|
|
9690
9721
|
return React__default.createElement("div", {
|
|
9691
|
-
className: classnames(styles$
|
|
9692
|
-
[styles$
|
|
9722
|
+
className: classnames(styles$y['empty-state-container-cta'], {
|
|
9723
|
+
[styles$y['empty-state-container-cta--inside-modal']]: _isInsideModal
|
|
9693
9724
|
})
|
|
9694
9725
|
}, primaryButton, secondaryButton);
|
|
9695
9726
|
};
|
|
@@ -9706,7 +9737,7 @@ const EmptyStateContainerStack = ({
|
|
|
9706
9737
|
mediaComponent
|
|
9707
9738
|
}) => {
|
|
9708
9739
|
return React__default.createElement("div", {
|
|
9709
|
-
className: styles$
|
|
9740
|
+
className: styles$z['empty-state-container-stack'],
|
|
9710
9741
|
"data-testid": testId
|
|
9711
9742
|
}, mediaComponent ? mediaComponent : mediaUrl && React__default.createElement("img", {
|
|
9712
9743
|
src: mediaUrl,
|
|
@@ -9723,7 +9754,7 @@ const EmptyStateContainerStack = ({
|
|
|
9723
9754
|
as: "body",
|
|
9724
9755
|
alignment: "center"
|
|
9725
9756
|
}, title), React__default.createElement("div", {
|
|
9726
|
-
className: styles$
|
|
9757
|
+
className: styles$z['empty-state-container-stack__body']
|
|
9727
9758
|
}, children)), React__default.createElement(Stack, {
|
|
9728
9759
|
space: 8,
|
|
9729
9760
|
alignItems: "center"
|
|
@@ -9834,7 +9865,7 @@ const DataTableEmptyState = ({
|
|
|
9834
9865
|
columnIndex: shouldRenderStickyLeftCell ? 1 : 0,
|
|
9835
9866
|
colSpan: colSpan
|
|
9836
9867
|
}, React__default.createElement("div", {
|
|
9837
|
-
className: styles$
|
|
9868
|
+
className: styles$A['data-table-empty-state']
|
|
9838
9869
|
}, React__default.createElement(EmptyStateContainerStack, {
|
|
9839
9870
|
mediaUrl: customImage,
|
|
9840
9871
|
mediaComponent: customImage === '' ? React__default.createElement(MagnifyingGlassIllustration, null) : undefined,
|
|
@@ -9846,7 +9877,7 @@ const DataTableEmptyState = ({
|
|
|
9846
9877
|
}, ''));
|
|
9847
9878
|
};
|
|
9848
9879
|
|
|
9849
|
-
const _excluded$
|
|
9880
|
+
const _excluded$d = ["items", "columns", "itemComponent", "maxHeight", "hasPrevious", "hasNext", "onPreviousClick", "onNextClick", "onSort", "isLoading", "showActionMenu", "footerComponent", "hasVerticalBorders", "testId", "skeletonRowLayout", "stickyColumns", "emptyState"];
|
|
9850
9881
|
const DataTable = _ref => {
|
|
9851
9882
|
let {
|
|
9852
9883
|
items,
|
|
@@ -9867,7 +9898,7 @@ const DataTable = _ref => {
|
|
|
9867
9898
|
stickyColumns,
|
|
9868
9899
|
emptyState
|
|
9869
9900
|
} = _ref,
|
|
9870
|
-
otherProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
9901
|
+
otherProps = _objectWithoutPropertiesLoose(_ref, _excluded$d);
|
|
9871
9902
|
const {
|
|
9872
9903
|
dataProps
|
|
9873
9904
|
} = getDataProps(otherProps);
|
|
@@ -9990,7 +10021,7 @@ const DataTable = _ref => {
|
|
|
9990
10021
|
})), React__default.createElement(Pagination, null));
|
|
9991
10022
|
};
|
|
9992
10023
|
|
|
9993
|
-
var styles$
|
|
10024
|
+
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"};
|
|
9994
10025
|
|
|
9995
10026
|
const AccordionItem = props => {
|
|
9996
10027
|
const {
|
|
@@ -10005,9 +10036,9 @@ const AccordionItem = props => {
|
|
|
10005
10036
|
} = item;
|
|
10006
10037
|
const isFocusedByClickRef = React__default.useRef(false);
|
|
10007
10038
|
return React__default.createElement("div", {
|
|
10008
|
-
className: styles$
|
|
10039
|
+
className: styles$x['accordion-item']
|
|
10009
10040
|
}, React__default.createElement("button", {
|
|
10010
|
-
className: styles$
|
|
10041
|
+
className: styles$x['accordion-item__header'],
|
|
10011
10042
|
onClick: () => {
|
|
10012
10043
|
if (isOpen) {
|
|
10013
10044
|
handleAccordionItemOpen(null);
|
|
@@ -10035,17 +10066,17 @@ const AccordionItem = props => {
|
|
|
10035
10066
|
color: "grey-500",
|
|
10036
10067
|
emphasis: "bold"
|
|
10037
10068
|
}, title), React__default.createElement(IconChevronDown, {
|
|
10038
|
-
className: styles$
|
|
10069
|
+
className: styles$x[`accordion-item__icon${isOpen ? '--active' : ''}`],
|
|
10039
10070
|
color: 'grey-400'
|
|
10040
10071
|
}))), React__default.createElement("div", {
|
|
10041
10072
|
"data-testid": `${isOpen ? 'accordion-item-' + id + '-open' : 'accordion-item-' + id + '-closed'}`,
|
|
10042
|
-
className: styles$
|
|
10073
|
+
className: styles$x[`accordion-item__content${isOpen ? '--active' : ''}`]
|
|
10043
10074
|
}, isOpen && React__default.createElement(Text, {
|
|
10044
10075
|
color: "grey-500"
|
|
10045
10076
|
}, content)));
|
|
10046
10077
|
};
|
|
10047
10078
|
|
|
10048
|
-
var styles$
|
|
10079
|
+
var styles$w = {"accordion":"_058SP"};
|
|
10049
10080
|
|
|
10050
10081
|
const Accordion = props => {
|
|
10051
10082
|
const {
|
|
@@ -10065,7 +10096,7 @@ const Accordion = props => {
|
|
|
10065
10096
|
isAccordionMounted: true
|
|
10066
10097
|
}
|
|
10067
10098
|
}, React__default.createElement("div", {
|
|
10068
|
-
className: styles$
|
|
10099
|
+
className: styles$w['accordion']
|
|
10069
10100
|
}, items.map((item, index) => {
|
|
10070
10101
|
const id = item.id || index.toString();
|
|
10071
10102
|
return React__default.createElement(AccordionItem, {
|
|
@@ -10079,7 +10110,7 @@ const Accordion = props => {
|
|
|
10079
10110
|
})));
|
|
10080
10111
|
};
|
|
10081
10112
|
|
|
10082
|
-
var styles$
|
|
10113
|
+
var styles$v = {"action-list":"_pWke5","action-list__title":"_p8I7K","action-list__empty-state":"_l-tFB"};
|
|
10083
10114
|
|
|
10084
10115
|
const ActionList = ({
|
|
10085
10116
|
children,
|
|
@@ -10090,15 +10121,15 @@ const ActionList = ({
|
|
|
10090
10121
|
}) => {
|
|
10091
10122
|
const translate = useTranslation('ActionList');
|
|
10092
10123
|
return React__default.createElement("div", {
|
|
10093
|
-
className: styles$
|
|
10124
|
+
className: styles$v['action-list'],
|
|
10094
10125
|
"data-testid": testId,
|
|
10095
10126
|
style: {
|
|
10096
10127
|
maxHeight: maxHeight
|
|
10097
10128
|
}
|
|
10098
10129
|
}, title && React__default.createElement("div", {
|
|
10099
|
-
className: styles$
|
|
10130
|
+
className: styles$v['action-list__title']
|
|
10100
10131
|
}, title), children ? children : React__default.createElement("div", {
|
|
10101
|
-
className: styles$
|
|
10132
|
+
className: styles$v['action-list__empty-state']
|
|
10102
10133
|
}, React__default.createElement(EmptyStateContainerStack, {
|
|
10103
10134
|
title: (emptyState == null ? void 0 : emptyState.title) || translate('emptyStateTitle'),
|
|
10104
10135
|
mediaUrl: emptyState == null ? void 0 : emptyState.image,
|
|
@@ -10259,21 +10290,21 @@ const useSelectFieldControllers = ({
|
|
|
10259
10290
|
return controllers;
|
|
10260
10291
|
};
|
|
10261
10292
|
|
|
10262
|
-
var styles$
|
|
10293
|
+
var styles$u = {"custom-control":"_pXQqq"};
|
|
10263
10294
|
|
|
10264
|
-
const _excluded$
|
|
10295
|
+
const _excluded$c = ["children"];
|
|
10265
10296
|
function CustomControl(_ref) {
|
|
10266
10297
|
var _props$getValue;
|
|
10267
10298
|
let {
|
|
10268
10299
|
children
|
|
10269
10300
|
} = _ref,
|
|
10270
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
10301
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$c);
|
|
10271
10302
|
const {
|
|
10272
10303
|
SelectedOptionPrefix
|
|
10273
10304
|
} = props.selectProps.componentsProps;
|
|
10274
10305
|
const selectedOption = (_props$getValue = props.getValue()) == null ? void 0 : _props$getValue[0];
|
|
10275
10306
|
return React__default.createElement(components.Control, _extends({}, props), SelectedOptionPrefix && selectedOption ? React__default.createElement("div", {
|
|
10276
|
-
className: styles$
|
|
10307
|
+
className: styles$u['custom-control'],
|
|
10277
10308
|
style: {
|
|
10278
10309
|
paddingLeft: selectedOption ? 8 : 0
|
|
10279
10310
|
}
|
|
@@ -10286,12 +10317,12 @@ function CustomControl(_ref) {
|
|
|
10286
10317
|
}, props)), children)) : children);
|
|
10287
10318
|
}
|
|
10288
10319
|
|
|
10289
|
-
const _excluded$
|
|
10320
|
+
const _excluded$b = ["children"];
|
|
10290
10321
|
function CustomOption(_ref) {
|
|
10291
10322
|
let {
|
|
10292
10323
|
children
|
|
10293
10324
|
} = _ref,
|
|
10294
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
10325
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$b);
|
|
10295
10326
|
const {
|
|
10296
10327
|
UserCustomOption
|
|
10297
10328
|
} = props.selectProps.componentsProps;
|
|
@@ -10435,14 +10466,14 @@ const CustomContainer = props => {
|
|
|
10435
10466
|
}));
|
|
10436
10467
|
};
|
|
10437
10468
|
|
|
10438
|
-
var styles$
|
|
10469
|
+
var styles$t = {"custom-menu-text-field":"_AAUjm","custom-menu-hr":"_mFLK9","custom-menu-div":"_1XpI4"};
|
|
10439
10470
|
|
|
10440
|
-
const _excluded$
|
|
10471
|
+
const _excluded$a = ["children"];
|
|
10441
10472
|
function CustomMenu(_ref) {
|
|
10442
10473
|
let {
|
|
10443
10474
|
children
|
|
10444
10475
|
} = _ref,
|
|
10445
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
10476
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$a);
|
|
10446
10477
|
const {
|
|
10447
10478
|
creatableButton,
|
|
10448
10479
|
onMenuInputFocus,
|
|
@@ -10502,15 +10533,15 @@ function CustomMenu(_ref) {
|
|
|
10502
10533
|
return React__default.createElement(components.Menu, _extends({}, props), React__default.createElement("div", {
|
|
10503
10534
|
ref: containerRef
|
|
10504
10535
|
}, children, React__default.createElement("hr", {
|
|
10505
|
-
className: styles$
|
|
10536
|
+
className: styles$t['custom-menu-hr']
|
|
10506
10537
|
}), !showFooter ? React__default.createElement(CreatableButton, null) : React__default.createElement("div", {
|
|
10507
|
-
className: styles$
|
|
10538
|
+
className: styles$t['custom-menu-div']
|
|
10508
10539
|
}, React__default.createElement(Flex, {
|
|
10509
10540
|
space: 4,
|
|
10510
10541
|
flex: [1],
|
|
10511
10542
|
flexItems: true
|
|
10512
10543
|
}, React__default.createElement("input", {
|
|
10513
|
-
className: classnames(styles$12['text-field'], styles$
|
|
10544
|
+
className: classnames(styles$12['text-field'], styles$t['custom-menu-text-field']),
|
|
10514
10545
|
autoCorrect: "off",
|
|
10515
10546
|
autoComplete: "off",
|
|
10516
10547
|
spellCheck: "false",
|
|
@@ -10546,7 +10577,7 @@ function CustomMenu(_ref) {
|
|
|
10546
10577
|
}, __('createButton'))))));
|
|
10547
10578
|
}
|
|
10548
10579
|
|
|
10549
|
-
const _excluded$
|
|
10580
|
+
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"];
|
|
10550
10581
|
const useSelectField = _ref => {
|
|
10551
10582
|
let {
|
|
10552
10583
|
asToolbarFilter = false,
|
|
@@ -10573,7 +10604,7 @@ const useSelectField = _ref => {
|
|
|
10573
10604
|
isSearchable = true,
|
|
10574
10605
|
autoFocus
|
|
10575
10606
|
} = _ref,
|
|
10576
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
10607
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$9);
|
|
10577
10608
|
const [isMenuInputFocus, setIsMenuInputFocus] = useState(false);
|
|
10578
10609
|
const onMenuInputFocus = isFocused => setIsMenuInputFocus(isFocused);
|
|
10579
10610
|
const controllers = useSelectFieldControllers({
|
|
@@ -10645,7 +10676,7 @@ const useSelectField = _ref => {
|
|
|
10645
10676
|
};
|
|
10646
10677
|
};
|
|
10647
10678
|
|
|
10648
|
-
var styles$
|
|
10679
|
+
var styles$s = {"select-field__suffix":"_vqC1M"};
|
|
10649
10680
|
|
|
10650
10681
|
/** Component to make possible choose from a predefined options. */
|
|
10651
10682
|
const SelectField = props => {
|
|
@@ -10655,7 +10686,7 @@ const SelectField = props => {
|
|
|
10655
10686
|
} = useSelectField(props);
|
|
10656
10687
|
//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
|
|
10657
10688
|
const suffixWithMargin = props.suffix ? React__default.createElement("div", {
|
|
10658
|
-
className: styles$
|
|
10689
|
+
className: styles$s['select-field__suffix']
|
|
10659
10690
|
}, props.suffix) : undefined;
|
|
10660
10691
|
return React__default.createElement(Field, _extends({}, fieldProps), React__default.createElement(AffixContainer, {
|
|
10661
10692
|
prefix: props.prefix,
|
|
@@ -10697,9 +10728,9 @@ const ToolbarSelect = ({
|
|
|
10697
10728
|
});
|
|
10698
10729
|
};
|
|
10699
10730
|
|
|
10700
|
-
var styles$
|
|
10731
|
+
var styles$r = {"date-filter":"_PyXfe","date-filter--wide":"_P6ttU"};
|
|
10701
10732
|
|
|
10702
|
-
var styles$
|
|
10733
|
+
var styles$q = {"date-filter-display":"_N37zE","date-filter-display--non-interactive":"_42Bvz","date-filter-display--wide":"_h8n2w","date-filter-display__display-icon":"_i08yV"};
|
|
10703
10734
|
|
|
10704
10735
|
const DATE_FILTER_MODE = {
|
|
10705
10736
|
DAY: 'day',
|
|
@@ -10753,9 +10784,9 @@ const DateFilterDisplay = forwardRef(({
|
|
|
10753
10784
|
onClick
|
|
10754
10785
|
}, ref) => {
|
|
10755
10786
|
return React__default.createElement("button", {
|
|
10756
|
-
className: classnames(styles$
|
|
10757
|
-
[styles$
|
|
10758
|
-
[styles$
|
|
10787
|
+
className: classnames(styles$q['date-filter-display'], {
|
|
10788
|
+
[styles$q['date-filter-display--wide']]: mode === DATE_FILTER_MODE.WEEK,
|
|
10789
|
+
[styles$q['date-filter-display--non-interactive']]: mode === DATE_FILTER_MODE.MONTH
|
|
10759
10790
|
}),
|
|
10760
10791
|
onClick: onClick,
|
|
10761
10792
|
tabIndex: mode === DATE_FILTER_MODE.MONTH ? -1 : undefined,
|
|
@@ -10764,7 +10795,7 @@ const DateFilterDisplay = forwardRef(({
|
|
|
10764
10795
|
space: 12,
|
|
10765
10796
|
alignItems: "center"
|
|
10766
10797
|
}, React__default.createElement("div", {
|
|
10767
|
-
className: classnames(styles$
|
|
10798
|
+
className: classnames(styles$q['date-filter-display__display-icon'])
|
|
10768
10799
|
}, React__default.createElement(IconCalendarAlt, {
|
|
10769
10800
|
size: "flexible",
|
|
10770
10801
|
color: "grey-400"
|
|
@@ -10775,7 +10806,7 @@ const DateFilterDisplay = forwardRef(({
|
|
|
10775
10806
|
})));
|
|
10776
10807
|
});
|
|
10777
10808
|
|
|
10778
|
-
var styles$
|
|
10809
|
+
var styles$p = {"date-stepper":"_9wFtw","date-stepper--backward":"_OrtcR","date-stepper--forward":"_oYoUt"};
|
|
10779
10810
|
|
|
10780
10811
|
const handleDateStepper = (date, mode, stepDirection, onChange) => {
|
|
10781
10812
|
const step = stepDirection === STEP_DIRECTION.FORWARD ? 1 : -1;
|
|
@@ -10804,9 +10835,9 @@ const DateFilterStepper = ({
|
|
|
10804
10835
|
date
|
|
10805
10836
|
}) => {
|
|
10806
10837
|
return React__default.createElement("button", {
|
|
10807
|
-
className: classnames(styles$
|
|
10808
|
-
[styles$
|
|
10809
|
-
[styles$
|
|
10838
|
+
className: classnames(styles$p['date-stepper'], {
|
|
10839
|
+
[styles$p['date-stepper--backward']]: stepDirection === STEP_DIRECTION.BACKWARD,
|
|
10840
|
+
[styles$p['date-stepper--forward']]: stepDirection === STEP_DIRECTION.FORWARD
|
|
10810
10841
|
}),
|
|
10811
10842
|
onClick: () => handleDateStepper(date, mode, stepDirection, onChange)
|
|
10812
10843
|
}, children);
|
|
@@ -10828,8 +10859,8 @@ const DateFilter = ({
|
|
|
10828
10859
|
const onClickOutside = useCallback(() => setCalendarOpen(false), [setCalendarOpen]);
|
|
10829
10860
|
return React__default.createElement("div", {
|
|
10830
10861
|
"data-testid": testId,
|
|
10831
|
-
className: classnames(styles$
|
|
10832
|
-
[styles$
|
|
10862
|
+
className: classnames(styles$r['date-filter'], {
|
|
10863
|
+
[styles$r['date-filter--wide']]: _mode === DATE_FILTER_MODE.WEEK
|
|
10833
10864
|
})
|
|
10834
10865
|
}, React__default.createElement(Inline, {
|
|
10835
10866
|
space: 0
|
|
@@ -10866,7 +10897,7 @@ const DateFilter = ({
|
|
|
10866
10897
|
}));
|
|
10867
10898
|
};
|
|
10868
10899
|
|
|
10869
|
-
var styles$
|
|
10900
|
+
var styles$o = {"segmented-control":"_RezMY","segmented-control__button":"_lehFG","segmented-control__button--selected":"_Fr5kb","segmented-control__divider":"_GEqG9"};
|
|
10870
10901
|
|
|
10871
10902
|
const SegmentedControl = ({
|
|
10872
10903
|
options,
|
|
@@ -10881,23 +10912,23 @@ const SegmentedControl = ({
|
|
|
10881
10912
|
return index === options.length - 1;
|
|
10882
10913
|
};
|
|
10883
10914
|
return React__default.createElement("div", {
|
|
10884
|
-
className: styles$
|
|
10915
|
+
className: styles$o['segmented-control'],
|
|
10885
10916
|
"data-testid": testId
|
|
10886
10917
|
}, options.map((option, i) => React__default.createElement(React__default.Fragment, {
|
|
10887
10918
|
key: option
|
|
10888
10919
|
}, React__default.createElement("button", {
|
|
10889
10920
|
onClick: () => onChange(option),
|
|
10890
|
-
className: classnames(styles$
|
|
10891
|
-
[styles$
|
|
10921
|
+
className: classnames(styles$o['segmented-control__button'], {
|
|
10922
|
+
[styles$o['segmented-control__button--selected']]: isSelected(option)
|
|
10892
10923
|
})
|
|
10893
10924
|
}, option), !isLastElement(i) && React__default.createElement("div", {
|
|
10894
|
-
className: classnames(styles$
|
|
10925
|
+
className: classnames(styles$o['segmented-control__divider'])
|
|
10895
10926
|
}))));
|
|
10896
10927
|
};
|
|
10897
10928
|
|
|
10898
|
-
var styles$
|
|
10929
|
+
var styles$n = {"form--standard-size":"_8-Ykj"};
|
|
10899
10930
|
|
|
10900
|
-
var styles$
|
|
10931
|
+
var styles$m = {"form-section":"_3uYIj","form-section__title":"_2WdOf","form-section__subtitle":"_zybxx","form-section--no-margin":"_xT-U1"};
|
|
10901
10932
|
|
|
10902
10933
|
const FormSection = ({
|
|
10903
10934
|
children,
|
|
@@ -10910,13 +10941,13 @@ const FormSection = ({
|
|
|
10910
10941
|
const content = React__default.createElement(Stack, null, (title || subtitle) && React__default.createElement(Stack, {
|
|
10911
10942
|
space: 8
|
|
10912
10943
|
}, title && React__default.createElement("h2", {
|
|
10913
|
-
className: classnames(styles$
|
|
10944
|
+
className: classnames(styles$m['form-section__title'])
|
|
10914
10945
|
}, title), subtitle && React__default.createElement("h3", {
|
|
10915
|
-
className: classnames(styles$
|
|
10946
|
+
className: classnames(styles$m['form-section__subtitle'])
|
|
10916
10947
|
}, subtitle)), children);
|
|
10917
10948
|
return React__default.createElement("div", {
|
|
10918
|
-
className: classnames(styles$
|
|
10919
|
-
[styles$
|
|
10949
|
+
className: classnames(styles$m['form-section'], {
|
|
10950
|
+
[styles$m['form-section--no-margin']]: _noMargin || as === 'card'
|
|
10920
10951
|
}),
|
|
10921
10952
|
"data-testid": testId
|
|
10922
10953
|
}, as === 'card' ? React__default.createElement(Card, {
|
|
@@ -10936,7 +10967,7 @@ const updateButtonProps = (child, newProps) => {
|
|
|
10936
10967
|
}, newProps, child.props));
|
|
10937
10968
|
};
|
|
10938
10969
|
|
|
10939
|
-
var styles$
|
|
10970
|
+
var styles$l = {"form-footer":"_4ksfB"};
|
|
10940
10971
|
|
|
10941
10972
|
const FormFooterActions = ({
|
|
10942
10973
|
actions
|
|
@@ -10972,7 +11003,7 @@ const FormFooter = ({
|
|
|
10972
11003
|
});
|
|
10973
11004
|
const isInlineChildren = React__default.Children.count(children) === 1 && React__default.isValidElement(children) && children.type === Inline;
|
|
10974
11005
|
return React__default.createElement("div", {
|
|
10975
|
-
className: classnames(styles$
|
|
11006
|
+
className: classnames(styles$l['form-footer']),
|
|
10976
11007
|
"data-testid": testId
|
|
10977
11008
|
}, actions && React__default.createElement(FormFooterActions, {
|
|
10978
11009
|
actions: actions
|
|
@@ -11010,13 +11041,13 @@ const Form = ({
|
|
|
11010
11041
|
}, React__default.createElement("form", {
|
|
11011
11042
|
onSubmit: onSubmit ? handleSubmit : formik == null ? void 0 : formik.handleSubmit,
|
|
11012
11043
|
className: classnames({
|
|
11013
|
-
[styles$
|
|
11044
|
+
[styles$n['form--standard-size']]: !_wide
|
|
11014
11045
|
}),
|
|
11015
11046
|
"data-testid": testId
|
|
11016
11047
|
}, _stackContent ? React__default.createElement(Stack, null, formattedChildren) : formattedChildren));
|
|
11017
11048
|
};
|
|
11018
11049
|
|
|
11019
|
-
var styles$
|
|
11050
|
+
var styles$k = {"form-row":"_xX-RS"};
|
|
11020
11051
|
|
|
11021
11052
|
const SIZE_25_PERCENT = '25%';
|
|
11022
11053
|
const SIZE_33_PERCENT = '33.333%';
|
|
@@ -11043,14 +11074,14 @@ const FormRow = ({
|
|
|
11043
11074
|
space: _space,
|
|
11044
11075
|
testId: testId,
|
|
11045
11076
|
alignItems: "stretch",
|
|
11046
|
-
extraClass: styles$
|
|
11077
|
+
extraClass: styles$k['form-row']
|
|
11047
11078
|
}, children, additionalColumns.map((_, index) => React__default.createElement("span", {
|
|
11048
11079
|
key: index,
|
|
11049
11080
|
"data-testid": "empty-cell"
|
|
11050
11081
|
})));
|
|
11051
11082
|
};
|
|
11052
11083
|
|
|
11053
|
-
var styles$
|
|
11084
|
+
var styles$j = {"text-field":"_JaB08","text-field--focus":"_62RIR","text-field--disabled":"_CDt23","text-field--invalid":"_wf4XP","text-field__toolbar":"_7xVsj"};
|
|
11054
11085
|
|
|
11055
11086
|
const useGrowTextAreaRef = (minHeight, maxHeight, autoGrow, forwardedRef) => {
|
|
11056
11087
|
const textareaRef = useRef(null);
|
|
@@ -11119,10 +11150,10 @@ const TextAreaField = ({
|
|
|
11119
11150
|
return React__default.createElement(Field, _extends({}, fieldProps, {
|
|
11120
11151
|
characterCount: controllers.value !== undefined && maxLength ? maxLength - controllers.value.length : undefined
|
|
11121
11152
|
}), React__default.createElement("div", {
|
|
11122
|
-
className: classnames(styles$
|
|
11123
|
-
[styles$
|
|
11124
|
-
[styles$
|
|
11125
|
-
[styles$
|
|
11153
|
+
className: classnames(styles$j['text-field'], {
|
|
11154
|
+
[styles$j['text-field--invalid']]: hasError,
|
|
11155
|
+
[styles$j['text-field--disabled']]: disabled,
|
|
11156
|
+
[styles$j['text-field--focus']]: hasFocus
|
|
11126
11157
|
}),
|
|
11127
11158
|
ref: containerRef,
|
|
11128
11159
|
onClick: event => {
|
|
@@ -11154,7 +11185,7 @@ const TextAreaField = ({
|
|
|
11154
11185
|
ref: textAreaRef,
|
|
11155
11186
|
maxLength: maxLength
|
|
11156
11187
|
}), toolbar && React__default.createElement("div", {
|
|
11157
|
-
className: styles$
|
|
11188
|
+
className: styles$j['text-field__toolbar'],
|
|
11158
11189
|
id: `${controllers.id}-toolbar`,
|
|
11159
11190
|
ref: toolbarRef,
|
|
11160
11191
|
onClick: event => {
|
|
@@ -11166,13 +11197,13 @@ const TextAreaField = ({
|
|
|
11166
11197
|
}, toolbar)));
|
|
11167
11198
|
};
|
|
11168
11199
|
|
|
11169
|
-
const _excluded$
|
|
11200
|
+
const _excluded$8 = ["prefix", "suffix"];
|
|
11170
11201
|
const TextFieldElement = (_ref, ref) => {
|
|
11171
11202
|
let {
|
|
11172
11203
|
prefix,
|
|
11173
11204
|
suffix
|
|
11174
11205
|
} = _ref,
|
|
11175
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
11206
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$8);
|
|
11176
11207
|
const {
|
|
11177
11208
|
inputProps,
|
|
11178
11209
|
fieldProps
|
|
@@ -11188,7 +11219,7 @@ const TextFieldElement = (_ref, ref) => {
|
|
|
11188
11219
|
};
|
|
11189
11220
|
const TextField = forwardRef(TextFieldElement);
|
|
11190
11221
|
|
|
11191
|
-
var styles$
|
|
11222
|
+
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"};
|
|
11192
11223
|
|
|
11193
11224
|
const useMultiSelectFieldControllers = ({
|
|
11194
11225
|
name,
|
|
@@ -11253,10 +11284,10 @@ const CreatableOption = ({
|
|
|
11253
11284
|
};
|
|
11254
11285
|
return React__default.createElement(React__default.Fragment, null, !isCreatingOption && React__default.createElement("div", {
|
|
11255
11286
|
key: 'pill-select-field-create-option',
|
|
11256
|
-
className: styles$
|
|
11287
|
+
className: styles$i['pill-select-field']
|
|
11257
11288
|
}, React__default.createElement("button", {
|
|
11258
11289
|
"data-testid": testId ? `${testId}-create-option` : undefined,
|
|
11259
|
-
className: styles$
|
|
11290
|
+
className: styles$i['pill-select-field__add-new-input'],
|
|
11260
11291
|
onClick: () => {
|
|
11261
11292
|
setIsCreatingOption(true);
|
|
11262
11293
|
setNewOptionLabel('');
|
|
@@ -11265,9 +11296,9 @@ const CreatableOption = ({
|
|
|
11265
11296
|
size: "small"
|
|
11266
11297
|
}), createOptionLabel)), isCreatingOption && React__default.createElement("div", {
|
|
11267
11298
|
key: 'pill-select-field-creating-option',
|
|
11268
|
-
className: styles$
|
|
11299
|
+
className: styles$i['pill-select-field']
|
|
11269
11300
|
}, React__default.createElement("input", {
|
|
11270
|
-
className: styles$
|
|
11301
|
+
className: styles$i['pill-select-field__creating-input'],
|
|
11271
11302
|
name: `${name}-pill-select-field-creating-option`,
|
|
11272
11303
|
id: 'pill-select-field-creating-option',
|
|
11273
11304
|
type: "text",
|
|
@@ -11288,7 +11319,7 @@ const CreatableOption = ({
|
|
|
11288
11319
|
}
|
|
11289
11320
|
}
|
|
11290
11321
|
}), React__default.createElement("span", {
|
|
11291
|
-
className: styles$
|
|
11322
|
+
className: styles$i['pill-select-field__creating-custom-input']
|
|
11292
11323
|
}, !newOptionLabel && React__default.createElement(Text, {
|
|
11293
11324
|
as: "body",
|
|
11294
11325
|
color: "grey-300"
|
|
@@ -11339,7 +11370,7 @@ const PillSelectField = ({
|
|
|
11339
11370
|
}
|
|
11340
11371
|
};
|
|
11341
11372
|
return React__default.createElement("button", {
|
|
11342
|
-
className: styles$
|
|
11373
|
+
className: styles$i['pill-select-field__removable-icon'],
|
|
11343
11374
|
onClick: handleClick
|
|
11344
11375
|
}, React__default.createElement(IconTimes, {
|
|
11345
11376
|
size: "small"
|
|
@@ -11355,7 +11386,7 @@ const PillSelectField = ({
|
|
|
11355
11386
|
const itemId = `${controllers.id}-${itemIdentifier}`;
|
|
11356
11387
|
return React__default.createElement("div", {
|
|
11357
11388
|
key: itemIdentifier,
|
|
11358
|
-
className: styles$
|
|
11389
|
+
className: styles$i['pill-select-field']
|
|
11359
11390
|
}, React__default.createElement("input", {
|
|
11360
11391
|
name: `${name}-${itemIdentifier}`,
|
|
11361
11392
|
id: itemId,
|
|
@@ -11375,7 +11406,7 @@ const PillSelectField = ({
|
|
|
11375
11406
|
controllers.onChange(newValue);
|
|
11376
11407
|
}
|
|
11377
11408
|
}), React__default.createElement("span", {
|
|
11378
|
-
className: styles$
|
|
11409
|
+
className: styles$i['pill-select-field__custom-input']
|
|
11379
11410
|
}, option.label, option.isRemovable && React__default.createElement(RemoveButton, {
|
|
11380
11411
|
option: option
|
|
11381
11412
|
})));
|
|
@@ -11424,9 +11455,9 @@ const useRadioGroupFieldContext = () => {
|
|
|
11424
11455
|
return context;
|
|
11425
11456
|
};
|
|
11426
11457
|
|
|
11427
|
-
var styles$
|
|
11458
|
+
var styles$h = {"label":"_xzukU","label--truncate":"_iVWRB","caption":"_JNfQO","radio-group-field__label":"_2KvuU","radio-group-field__caption":"_ZeIOd"};
|
|
11428
11459
|
|
|
11429
|
-
var styles$
|
|
11460
|
+
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"};
|
|
11430
11461
|
|
|
11431
11462
|
const RadioGroupBoxOption = ({
|
|
11432
11463
|
value,
|
|
@@ -11443,7 +11474,7 @@ const RadioGroupBoxOption = ({
|
|
|
11443
11474
|
id: inputId
|
|
11444
11475
|
});
|
|
11445
11476
|
return React__default.createElement("label", {
|
|
11446
|
-
className: styles$
|
|
11477
|
+
className: styles$g['radio-group-box-option']
|
|
11447
11478
|
}, React__default.createElement("input", {
|
|
11448
11479
|
type: "radio",
|
|
11449
11480
|
"data-testid": testId,
|
|
@@ -11454,8 +11485,8 @@ const RadioGroupBoxOption = ({
|
|
|
11454
11485
|
checked: radioGroupContext.value !== undefined ? radioGroupContext.value === value : undefined,
|
|
11455
11486
|
disabled: radioGroupContext.disabled || disabled
|
|
11456
11487
|
}), React__default.createElement("div", {
|
|
11457
|
-
className: classnames(styles$
|
|
11458
|
-
[styles$
|
|
11488
|
+
className: classnames(styles$g['radio-group-box-option__box'], {
|
|
11489
|
+
[styles$g['radio-group-box-option__box--disabled']]: radioGroupContext.disabled || disabled
|
|
11459
11490
|
})
|
|
11460
11491
|
}, React__default.createElement(Stack, {
|
|
11461
11492
|
space: 16,
|
|
@@ -11465,17 +11496,17 @@ const RadioGroupBoxOption = ({
|
|
|
11465
11496
|
space: 8,
|
|
11466
11497
|
alignItems: "center"
|
|
11467
11498
|
}, label && React__default.createElement("div", {
|
|
11468
|
-
className: classnames(styles$
|
|
11469
|
-
[styles$
|
|
11499
|
+
className: classnames(styles$g['radio-group-box-option__label'], {
|
|
11500
|
+
[styles$g['radio-group-box-option__label--disabled']]: radioGroupContext.disabled || disabled
|
|
11470
11501
|
})
|
|
11471
11502
|
}, label), caption && React__default.createElement("div", {
|
|
11472
|
-
className: classnames(styles$
|
|
11473
|
-
[styles$
|
|
11503
|
+
className: classnames(styles$g['radio-group-box-option__caption'], {
|
|
11504
|
+
[styles$g['radio-group-box-option__caption--disabled']]: radioGroupContext.disabled || disabled
|
|
11474
11505
|
})
|
|
11475
11506
|
}, caption)))));
|
|
11476
11507
|
};
|
|
11477
11508
|
|
|
11478
|
-
var styles$
|
|
11509
|
+
var styles$f = {"radio-group-option":"_7fVpn","radio-group-option__caption":"_VD7SO","radio-group-option__custom-input":"_Yfxkl"};
|
|
11479
11510
|
|
|
11480
11511
|
/** RadioGroupField form element. */
|
|
11481
11512
|
const RadioGroupOption = ({
|
|
@@ -11497,7 +11528,7 @@ const RadioGroupOption = ({
|
|
|
11497
11528
|
space: 8,
|
|
11498
11529
|
alignItems: "center"
|
|
11499
11530
|
}, React__default.createElement("div", {
|
|
11500
|
-
className: styles$
|
|
11531
|
+
className: styles$f['radio-group-option']
|
|
11501
11532
|
}, React__default.createElement("input", {
|
|
11502
11533
|
type: "radio",
|
|
11503
11534
|
"data-testid": testId,
|
|
@@ -11508,11 +11539,11 @@ const RadioGroupOption = ({
|
|
|
11508
11539
|
checked: radioGroupContext.value !== undefined ? radioGroupContext.value === value : undefined,
|
|
11509
11540
|
disabled: radioGroupContext.disabled || disabled
|
|
11510
11541
|
}), React__default.createElement("span", {
|
|
11511
|
-
className: styles$
|
|
11542
|
+
className: styles$f['radio-group-option__custom-input']
|
|
11512
11543
|
})), label && React__default.createElement(Label, {
|
|
11513
11544
|
htmlFor: id
|
|
11514
11545
|
}, label)), caption && React__default.createElement("div", {
|
|
11515
|
-
className: styles$
|
|
11546
|
+
className: styles$f['radio-group-option__caption']
|
|
11516
11547
|
}, React__default.createElement(Caption, {
|
|
11517
11548
|
fieldId: id
|
|
11518
11549
|
}, caption)));
|
|
@@ -11643,7 +11674,7 @@ const RadioGroupField = ({
|
|
|
11643
11674
|
}, React__default.createElement(Stack, {
|
|
11644
11675
|
space: _space
|
|
11645
11676
|
}, label && React__default.createElement("div", {
|
|
11646
|
-
className: styles$
|
|
11677
|
+
className: styles$h['radio-group-field__label']
|
|
11647
11678
|
}, label), React__default.createElement(Stack, {
|
|
11648
11679
|
space: 8
|
|
11649
11680
|
}, optionsType === OPTION_TYPES.RADIO ? React__default.createElement(RadioOptions, {
|
|
@@ -11655,21 +11686,21 @@ const RadioGroupField = ({
|
|
|
11655
11686
|
testId: testId,
|
|
11656
11687
|
space: _space
|
|
11657
11688
|
}, children), caption && React__default.createElement("div", {
|
|
11658
|
-
className: styles$
|
|
11689
|
+
className: styles$h['radio-group-caption']
|
|
11659
11690
|
}, caption), controllers.error && React__default.createElement(ErrorMessage, null, controllers.error))));
|
|
11660
11691
|
};
|
|
11661
11692
|
|
|
11662
|
-
var styles$
|
|
11693
|
+
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"};
|
|
11663
11694
|
|
|
11664
|
-
var styles$
|
|
11695
|
+
var styles$d = {"password-criteria":"_1ruWK","password-criteria--invalid":"_xR7tb"};
|
|
11665
11696
|
|
|
11666
11697
|
const PasswordCriteria = ({
|
|
11667
11698
|
met,
|
|
11668
11699
|
children
|
|
11669
11700
|
}) => {
|
|
11670
11701
|
return React__default.createElement("span", {
|
|
11671
|
-
className: classnames(styles$
|
|
11672
|
-
[styles$
|
|
11702
|
+
className: classnames(styles$d['password-criteria'], {
|
|
11703
|
+
[styles$d['password-criteria--invalid']]: !met
|
|
11673
11704
|
})
|
|
11674
11705
|
}, React__default.createElement(Inline, {
|
|
11675
11706
|
space: met ? 4 : 8
|
|
@@ -11744,12 +11775,12 @@ const PasswordField = ({
|
|
|
11744
11775
|
error: controllers.error
|
|
11745
11776
|
};
|
|
11746
11777
|
return React__default.createElement(Field, _extends({}, fieldProps), React__default.createElement("div", {
|
|
11747
|
-
className: styles$
|
|
11778
|
+
className: styles$e['password-container']
|
|
11748
11779
|
}, React__default.createElement("input", {
|
|
11749
11780
|
name: name,
|
|
11750
11781
|
id: controllers.id,
|
|
11751
|
-
className: classnames(styles$
|
|
11752
|
-
[styles$
|
|
11782
|
+
className: classnames(styles$e['text-field'], {
|
|
11783
|
+
[styles$e['text-field--invalid']]: hasError
|
|
11753
11784
|
}),
|
|
11754
11785
|
type: type,
|
|
11755
11786
|
"data-testid": testId,
|
|
@@ -11762,8 +11793,8 @@ const PasswordField = ({
|
|
|
11762
11793
|
onChange: controllers.onChange,
|
|
11763
11794
|
onBlur: controllers.onBlur
|
|
11764
11795
|
}), React__default.createElement("div", {
|
|
11765
|
-
className: classnames(styles$
|
|
11766
|
-
[styles$
|
|
11796
|
+
className: classnames(styles$e['password-toggle'], {
|
|
11797
|
+
[styles$e['password-toggle--disabled']]: disabled
|
|
11767
11798
|
}),
|
|
11768
11799
|
onClick: toggleType,
|
|
11769
11800
|
onKeyPress: toggleType,
|
|
@@ -11860,16 +11891,16 @@ const MultiSelectField = ({
|
|
|
11860
11891
|
})));
|
|
11861
11892
|
};
|
|
11862
11893
|
|
|
11863
|
-
var styles$
|
|
11894
|
+
var styles$c = {"custom-list":"_cSkvD"};
|
|
11864
11895
|
|
|
11865
|
-
const _excluded$
|
|
11896
|
+
const _excluded$7 = ["children", "hasMoreOptions", "hasMoreOptionsFirstLoad"];
|
|
11866
11897
|
const CustomList = _ref => {
|
|
11867
11898
|
let {
|
|
11868
11899
|
children,
|
|
11869
11900
|
hasMoreOptions,
|
|
11870
11901
|
hasMoreOptionsFirstLoad
|
|
11871
11902
|
} = _ref,
|
|
11872
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
11903
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$7);
|
|
11873
11904
|
const __ = useTranslation('AsyncSelectField');
|
|
11874
11905
|
let showFooter = hasMoreOptions;
|
|
11875
11906
|
if (props.selectProps.inputValue === '' && typeof hasMoreOptionsFirstLoad === 'boolean') {
|
|
@@ -11878,11 +11909,11 @@ const CustomList = _ref => {
|
|
|
11878
11909
|
return React__default.createElement(components.MenuList, _extends({}, props), React__default.createElement(Fragment, null, children, showFooter && props.options.length > 0 && React__default.createElement(Inline, {
|
|
11879
11910
|
justifyContent: "center"
|
|
11880
11911
|
}, React__default.createElement("div", {
|
|
11881
|
-
className: styles$
|
|
11912
|
+
className: styles$c['custom-list']
|
|
11882
11913
|
}, __('moreOptionsPlaceholder')))));
|
|
11883
11914
|
};
|
|
11884
11915
|
|
|
11885
|
-
const _excluded$
|
|
11916
|
+
const _excluded$6 = ["loadOptions"];
|
|
11886
11917
|
/**
|
|
11887
11918
|
* 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.
|
|
11888
11919
|
* Instead of passing a `options` props, this component requires a `loadOptions` prop.
|
|
@@ -11891,7 +11922,7 @@ const AsyncSelectField = _ref => {
|
|
|
11891
11922
|
let {
|
|
11892
11923
|
loadOptions
|
|
11893
11924
|
} = _ref,
|
|
11894
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
11925
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$6);
|
|
11895
11926
|
const [hasMoreOptions, setHasMoreOptions] = useState(false);
|
|
11896
11927
|
const [hasMoreOptionsFirstLoad, setHasMoreOptionsFirstLoad] = useState();
|
|
11897
11928
|
const [hasFirstLoadPerformed, setHasFirstLoadPerformed] = useState(false);
|
|
@@ -12171,7 +12202,7 @@ const getFormikError = error => {
|
|
|
12171
12202
|
return undefined;
|
|
12172
12203
|
};
|
|
12173
12204
|
|
|
12174
|
-
var styles$
|
|
12205
|
+
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"};
|
|
12175
12206
|
|
|
12176
12207
|
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"};
|
|
12177
12208
|
|
|
@@ -12235,9 +12266,9 @@ const DateRangeCalendar = ({
|
|
|
12235
12266
|
const DAYS = getDays(translate);
|
|
12236
12267
|
const MONTH_NAMES = getMonths(translate);
|
|
12237
12268
|
return React__default.createElement(Portal, null, React__default.createElement("div", {
|
|
12238
|
-
className: styles$
|
|
12269
|
+
className: styles$N['calendar']
|
|
12239
12270
|
}, React__default.createElement("div", {
|
|
12240
|
-
className: styles$
|
|
12271
|
+
className: styles$N['calendar__overlay'],
|
|
12241
12272
|
ref: ref => setCalendarRef(ref),
|
|
12242
12273
|
style: _extends({}, calendarPosition, {
|
|
12243
12274
|
zIndex: getZIndex('dropdown')
|
|
@@ -12428,9 +12459,9 @@ const DateRangeField = ({
|
|
|
12428
12459
|
end
|
|
12429
12460
|
} = controllers.value;
|
|
12430
12461
|
return React__default.createElement(Field, _extends({}, fieldProps), React__default.createElement("div", {
|
|
12431
|
-
className: classnames(styles$
|
|
12432
|
-
[styles$
|
|
12433
|
-
[styles$
|
|
12462
|
+
className: classnames(styles$b['date-range-field'], {
|
|
12463
|
+
[styles$b['date-range-field--invalid']]: hasError,
|
|
12464
|
+
[styles$b['date-range-field--disabled']]: disabled
|
|
12434
12465
|
}),
|
|
12435
12466
|
"data-testid": testId
|
|
12436
12467
|
}, React__default.createElement(IconCalendarAlt, {
|
|
@@ -12685,7 +12716,7 @@ const TimeFieldDropdown = ({
|
|
|
12685
12716
|
})));
|
|
12686
12717
|
};
|
|
12687
12718
|
|
|
12688
|
-
const _excluded$
|
|
12719
|
+
const _excluded$5 = ["interval", "startTime", "prefix", "endField", "duration", "subtractDuration", "calculateDuration", "timeFormat"];
|
|
12689
12720
|
const TimeFieldElement = (_ref, forwardedRef) => {
|
|
12690
12721
|
let {
|
|
12691
12722
|
interval = 15,
|
|
@@ -12697,7 +12728,7 @@ const TimeFieldElement = (_ref, forwardedRef) => {
|
|
|
12697
12728
|
calculateDuration,
|
|
12698
12729
|
timeFormat
|
|
12699
12730
|
} = _ref,
|
|
12700
|
-
allOtherProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
12731
|
+
allOtherProps = _objectWithoutPropertiesLoose(_ref, _excluded$5);
|
|
12701
12732
|
const {
|
|
12702
12733
|
timeFormat: globalTimeFormat
|
|
12703
12734
|
} = useProviderConfig();
|
|
@@ -12752,7 +12783,7 @@ const TimeRangeSelector = forwardRef(TimeFieldElement);
|
|
|
12752
12783
|
*/
|
|
12753
12784
|
const TimeField = forwardRef(TimeFieldElement);
|
|
12754
12785
|
|
|
12755
|
-
var styles$
|
|
12786
|
+
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"};
|
|
12756
12787
|
|
|
12757
12788
|
const TimeRangeEnd = ({
|
|
12758
12789
|
startTime,
|
|
@@ -12873,9 +12904,9 @@ const TimeRangeField = ({
|
|
|
12873
12904
|
end
|
|
12874
12905
|
}) : getDuration(end, start, subtractDuration);
|
|
12875
12906
|
return React__default.createElement(Field, _extends({}, fieldProps), React__default.createElement("div", {
|
|
12876
|
-
className: classnames(styles$
|
|
12877
|
-
[styles$
|
|
12878
|
-
[styles$
|
|
12907
|
+
className: classnames(styles$a['time-range-field'], {
|
|
12908
|
+
[styles$a['time-range-field--invalid']]: hasError,
|
|
12909
|
+
[styles$a['time-range-field--disabled']]: disabled
|
|
12879
12910
|
}),
|
|
12880
12911
|
"data-testid": testId
|
|
12881
12912
|
}, React__default.createElement(TimeRangeStart, {
|
|
@@ -12903,18 +12934,18 @@ const TimeRangeField = ({
|
|
|
12903
12934
|
})));
|
|
12904
12935
|
};
|
|
12905
12936
|
|
|
12906
|
-
var styles$
|
|
12937
|
+
var styles$9 = {"currency-field__mask-display":"_ddacu"};
|
|
12907
12938
|
|
|
12908
12939
|
const CURRENCY_DISPLAY_DEFAULT_MARGIN = 8;
|
|
12909
12940
|
const CURRENCY_DISPLAY_MARGIN_BUFFER = 1;
|
|
12910
12941
|
|
|
12911
|
-
const _excluded$
|
|
12942
|
+
const _excluded$4 = ["currencySymbol", "step"];
|
|
12912
12943
|
const CurrencyFieldElement = (_ref, forwardedRef) => {
|
|
12913
12944
|
let {
|
|
12914
12945
|
currencySymbol = '$',
|
|
12915
12946
|
step = 0.01
|
|
12916
12947
|
} = _ref,
|
|
12917
|
-
allOtherProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
12948
|
+
allOtherProps = _objectWithoutPropertiesLoose(_ref, _excluded$4);
|
|
12918
12949
|
const [displayPadding, setDisplayPadding] = useState(CURRENCY_DISPLAY_DEFAULT_MARGIN);
|
|
12919
12950
|
const internalRef = useRef(null);
|
|
12920
12951
|
const ref = forwardedRef || internalRef;
|
|
@@ -12968,7 +12999,7 @@ const CurrencyFieldElement = (_ref, forwardedRef) => {
|
|
|
12968
12999
|
inputProps.onFocus(e);
|
|
12969
13000
|
}
|
|
12970
13001
|
}))), showMask && !!inputProps.value && React__default.createElement("div", {
|
|
12971
|
-
className: styles$
|
|
13002
|
+
className: styles$9['currency-field__mask-display'],
|
|
12972
13003
|
style: {
|
|
12973
13004
|
marginLeft: displayPadding
|
|
12974
13005
|
}
|
|
@@ -12981,7 +13012,7 @@ const CurrencyFieldElement = (_ref, forwardedRef) => {
|
|
|
12981
13012
|
*/
|
|
12982
13013
|
const CurrencyField = forwardRef(CurrencyFieldElement);
|
|
12983
13014
|
|
|
12984
|
-
const _excluded$
|
|
13015
|
+
const _excluded$3 = ["max", "min", "precision", "stepSize", "prefix", "suffix"];
|
|
12985
13016
|
const NumberFieldElement = (_ref, ref) => {
|
|
12986
13017
|
let {
|
|
12987
13018
|
max,
|
|
@@ -12991,7 +13022,7 @@ const NumberFieldElement = (_ref, ref) => {
|
|
|
12991
13022
|
prefix,
|
|
12992
13023
|
suffix
|
|
12993
13024
|
} = _ref,
|
|
12994
|
-
allOtherProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
13025
|
+
allOtherProps = _objectWithoutPropertiesLoose(_ref, _excluded$3);
|
|
12995
13026
|
const {
|
|
12996
13027
|
inputProps,
|
|
12997
13028
|
fieldProps
|
|
@@ -13066,12 +13097,12 @@ const NumberFieldElement = (_ref, ref) => {
|
|
|
13066
13097
|
*/
|
|
13067
13098
|
const NumberField = forwardRef(NumberFieldElement);
|
|
13068
13099
|
|
|
13069
|
-
const _excluded$
|
|
13100
|
+
const _excluded$2 = ["max"];
|
|
13070
13101
|
const PercentageElement = (_ref, ref) => {
|
|
13071
13102
|
let {
|
|
13072
13103
|
max = 100
|
|
13073
13104
|
} = _ref,
|
|
13074
|
-
allOtherProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
13105
|
+
allOtherProps = _objectWithoutPropertiesLoose(_ref, _excluded$2);
|
|
13075
13106
|
return React__default.createElement(NumberField, _extends({}, allOtherProps, {
|
|
13076
13107
|
suffix: "%",
|
|
13077
13108
|
ref: ref,
|
|
@@ -13095,7 +13126,7 @@ const FormFeedback = ({
|
|
|
13095
13126
|
}, children);
|
|
13096
13127
|
};
|
|
13097
13128
|
|
|
13098
|
-
var styles$
|
|
13129
|
+
var styles$8 = {"phone-field":"_Q0GfJ","phone-field__flag":"_-uOqW","phone-field__input":"_Hes9b","phone-field__input--with-square-borders":"_TEU6N"};
|
|
13099
13130
|
|
|
13100
13131
|
const usePhoneFieldControllers = ({
|
|
13101
13132
|
name,
|
|
@@ -14009,7 +14040,7 @@ const COUNTRIES = {
|
|
|
14009
14040
|
};
|
|
14010
14041
|
const COUNTRY_CODES = Object.keys(COUNTRIES);
|
|
14011
14042
|
|
|
14012
|
-
var styles$
|
|
14043
|
+
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"};
|
|
14013
14044
|
|
|
14014
14045
|
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"};
|
|
14015
14046
|
|
|
@@ -14020,21 +14051,21 @@ const CountrySelector = ({
|
|
|
14020
14051
|
disabled
|
|
14021
14052
|
}) => {
|
|
14022
14053
|
return React__default.createElement("div", {
|
|
14023
|
-
className: classnames(styles$
|
|
14024
|
-
[styles$
|
|
14025
|
-
[styles$
|
|
14054
|
+
className: classnames(styles$7['country-selector'], {
|
|
14055
|
+
[styles$7['country-selector--with-error']]: hasError,
|
|
14056
|
+
[styles$7['country-selector--disabled']]: disabled
|
|
14026
14057
|
})
|
|
14027
14058
|
}, React__default.createElement(Dropdown, {
|
|
14028
14059
|
trigger: React__default.createElement("div", {
|
|
14029
|
-
className: classnames(styles$
|
|
14030
|
-
[styles$
|
|
14031
|
-
[styles$
|
|
14060
|
+
className: classnames(styles$7['country-selector__trigger'], {
|
|
14061
|
+
[styles$7['country-selector__trigger--with-error']]: hasError,
|
|
14062
|
+
[styles$7['country-selector__trigger--disabled']]: disabled
|
|
14032
14063
|
})
|
|
14033
14064
|
}, React__default.createElement(Inline, {
|
|
14034
14065
|
space: 8,
|
|
14035
14066
|
alignItems: "center"
|
|
14036
14067
|
}, React__default.createElement("span", {
|
|
14037
|
-
className: classnames(flagIcons['fi'], flagIcons[`fi-${country.toLocaleLowerCase()}`], styles$
|
|
14068
|
+
className: classnames(flagIcons['fi'], flagIcons[`fi-${country.toLocaleLowerCase()}`], styles$7['country-selector__trigger-flag'])
|
|
14038
14069
|
}), React__default.createElement(IconChevronDown, {
|
|
14039
14070
|
color: "grey-400",
|
|
14040
14071
|
size: "medium"
|
|
@@ -14048,16 +14079,16 @@ const CountrySelector = ({
|
|
|
14048
14079
|
alignItems: "center",
|
|
14049
14080
|
space: 12
|
|
14050
14081
|
}, React__default.createElement("span", {
|
|
14051
|
-
className: classnames(flagIcons['fi'], flagIcons[`fi-${countryCode.toLocaleLowerCase()}`], styles$
|
|
14082
|
+
className: classnames(flagIcons['fi'], flagIcons[`fi-${countryCode.toLocaleLowerCase()}`], styles$7['country-selector__flag'])
|
|
14052
14083
|
}), React__default.createElement(Text, null, COUNTRIES[countryCode].countryName)))))));
|
|
14053
14084
|
};
|
|
14054
14085
|
|
|
14055
|
-
const _excluded$
|
|
14086
|
+
const _excluded$1 = ["disabledCountry"];
|
|
14056
14087
|
const PhoneField = _ref => {
|
|
14057
14088
|
let {
|
|
14058
14089
|
disabledCountry = false
|
|
14059
14090
|
} = _ref,
|
|
14060
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
14091
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$1);
|
|
14061
14092
|
const __ = useTranslation('PhoneField');
|
|
14062
14093
|
const inputRef = useRef(null);
|
|
14063
14094
|
const {
|
|
@@ -14121,7 +14152,7 @@ const PhoneField = _ref => {
|
|
|
14121
14152
|
}
|
|
14122
14153
|
};
|
|
14123
14154
|
return React__default.createElement(Field, _extends({}, fieldProps), React__default.createElement("div", {
|
|
14124
|
-
className: styles$
|
|
14155
|
+
className: styles$8['phone-field']
|
|
14125
14156
|
}, !disabledCountry && React__default.createElement(CountrySelector, {
|
|
14126
14157
|
country: selectedCountry,
|
|
14127
14158
|
onChange: handleCountryChange,
|
|
@@ -14132,53 +14163,18 @@ const PhoneField = _ref => {
|
|
|
14132
14163
|
space: 4,
|
|
14133
14164
|
alignItems: "center"
|
|
14134
14165
|
}, React__default.createElement("span", {
|
|
14135
|
-
className: classnames(flagIcons['fi'], flagIcons[`fi-${selectedCountry.toLocaleLowerCase()}`], styles$
|
|
14166
|
+
className: classnames(flagIcons['fi'], flagIcons[`fi-${selectedCountry.toLocaleLowerCase()}`], styles$8['country-selector__flag'])
|
|
14136
14167
|
}), React__default.createElement("span", null, "+", getCountryCallingCode(selectedCountry))) : `+${getCountryCallingCode(selectedCountry)}`
|
|
14137
14168
|
}, React__default.createElement("input", _extends({}, inputProps, {
|
|
14138
14169
|
type: "tel",
|
|
14139
|
-
className: classnames(inputProps.className, styles$
|
|
14140
|
-
[styles$
|
|
14170
|
+
className: classnames(inputProps.className, styles$8['phone-field__input'], {
|
|
14171
|
+
[styles$8['phone-field__input--with-square-borders']]: !disabledCountry
|
|
14141
14172
|
}),
|
|
14142
14173
|
onChange: handlePhoneChange,
|
|
14143
14174
|
onBlur: handlePhoneBlur
|
|
14144
14175
|
})))));
|
|
14145
14176
|
};
|
|
14146
14177
|
|
|
14147
|
-
var styles$7 = {"badge":"_RXV4h","badge--warning":"_2An1I","badge--danger":"_-Bw8L","badge--success":"_RxlMz","badge--info":"_dzCH-","badge--numeric":"_Ix9tP"};
|
|
14148
|
-
|
|
14149
|
-
const _excluded$1 = ["children", "theme", "title", "testId"];
|
|
14150
|
-
const BadgeElement = (_ref, forwardedRef) => {
|
|
14151
|
-
let {
|
|
14152
|
-
children,
|
|
14153
|
-
theme,
|
|
14154
|
-
title,
|
|
14155
|
-
testId
|
|
14156
|
-
} = _ref,
|
|
14157
|
-
otherProps = _objectWithoutPropertiesLoose(_ref, _excluded$1);
|
|
14158
|
-
const internalRef = useRef(null);
|
|
14159
|
-
const ref = forwardedRef || internalRef;
|
|
14160
|
-
useLayoutEffect(() => {
|
|
14161
|
-
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') {
|
|
14162
|
-
ref.current.style.height = ref.current.offsetWidth + 'px';
|
|
14163
|
-
}
|
|
14164
|
-
});
|
|
14165
|
-
return React__default.createElement(Tooltip, {
|
|
14166
|
-
overlay: title,
|
|
14167
|
-
ref: ref
|
|
14168
|
-
}, React__default.createElement("div", _extends({
|
|
14169
|
-
className: classnames(styles$7['badge'], {
|
|
14170
|
-
[styles$7['badge--success']]: theme === 'success',
|
|
14171
|
-
[styles$7['badge--danger']]: theme === 'danger',
|
|
14172
|
-
[styles$7['badge--info']]: theme === 'info',
|
|
14173
|
-
[styles$7['badge--warning']]: theme === 'warning',
|
|
14174
|
-
[styles$7['badge--numeric']]: Number.isFinite(children)
|
|
14175
|
-
}),
|
|
14176
|
-
ref: ref,
|
|
14177
|
-
"data-testid": testId
|
|
14178
|
-
}, otherProps), children));
|
|
14179
|
-
};
|
|
14180
|
-
const Badge = forwardRef(BadgeElement);
|
|
14181
|
-
|
|
14182
14178
|
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"};
|
|
14183
14179
|
|
|
14184
14180
|
var styles$5 = {"avatar-image":"_iDN1j"};
|