@7shifts/sous-chef 3.76.0-beta.1 → 3.76.0-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +234 -223
- package/dist/index.css.map +1 -1
- package/dist/index.js +451 -445
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +519 -516
- package/dist/index.modern.js.map +1 -1
- package/dist/layout/PageLayout/PageLayout.d.ts +2 -1
- package/dist/layout/PageLayout/types.d.ts +3 -3
- package/dist/layout/index.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -6,7 +6,7 @@ import ReactDOM from 'react-dom';
|
|
|
6
6
|
import 'react-toastify/dist/ReactToastify.css';
|
|
7
7
|
import { debounce } from 'lodash-es';
|
|
8
8
|
import parseTime from 'time-autocomplete/src/core/AMPMParser';
|
|
9
|
-
import { Link as Link$1 } from 'react-router-dom';
|
|
9
|
+
import { Link as Link$1, NavLink } from 'react-router-dom';
|
|
10
10
|
import ReactModal from 'react-modal';
|
|
11
11
|
import { DayPicker } from 'react-day-picker';
|
|
12
12
|
import dateFnsFormat from 'date-fns/format';
|
|
@@ -8289,266 +8289,15 @@ const Page = ({
|
|
|
8289
8289
|
}, title), actions), subtitle && React__default.createElement(Text, null, subtitle)), banner, filterBar)), children));
|
|
8290
8290
|
};
|
|
8291
8291
|
|
|
8292
|
-
var styles$U = {"page-layout":"_Scw7-","page-layout__nav-container":"_v--DF","page-layout__nav-list":"_dJeZe","page-layout__content":"_hHi70"};
|
|
8292
|
+
var styles$U = {"page-layout":"_Scw7-","page-layout__nav-container":"_v--DF","page-layout__nav-list":"_dJeZe","page-layout__content":"_hHi70","page-layout__side-nav-content":"_vTMjp"};
|
|
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
|
-
[styles$T['menu-item--active']]: menu.isActive
|
|
8303
|
-
})
|
|
8304
|
-
}, React__default.createElement("a", {
|
|
8305
|
-
href: menu.to
|
|
8306
|
-
}, menu.label));
|
|
8307
|
-
}
|
|
8308
|
-
return React__default.createElement("li", {
|
|
8309
|
-
className: classnames(styles$T['menu-item'], {
|
|
8310
|
-
[styles$T['menu-item--active']]: menu.isActive
|
|
8311
|
-
})
|
|
8312
|
-
}, React__default.createElement(Link$1, {
|
|
8313
|
-
to: menu.to
|
|
8314
|
-
}, menu.label));
|
|
8315
|
-
};
|
|
8316
|
-
|
|
8317
|
-
const PageLayout = ({
|
|
8318
|
-
title,
|
|
8319
|
-
children,
|
|
8320
|
-
menu
|
|
8321
|
-
}) => {
|
|
8322
|
-
return React__default.createElement("div", {
|
|
8323
|
-
className: styles$U['page-layout']
|
|
8324
|
-
}, React__default.createElement("div", {
|
|
8325
|
-
className: styles$U['page-layout__nav-container']
|
|
8326
|
-
}, React__default.createElement(Stack, {
|
|
8327
|
-
space: 12
|
|
8328
|
-
}, React__default.createElement(Text, {
|
|
8329
|
-
as: "h3"
|
|
8330
|
-
}, title), React__default.createElement("ul", {
|
|
8331
|
-
className: styles$U['page-layout__nav-list']
|
|
8332
|
-
}, menu.map((menuItem, index) => React__default.createElement(MenuItem, {
|
|
8333
|
-
key: index,
|
|
8334
|
-
menu: menuItem
|
|
8335
|
-
}))))), React__default.createElement("div", {
|
|
8336
|
-
className: styles$U['page-layout__content']
|
|
8337
|
-
}, children));
|
|
8338
|
-
};
|
|
8339
|
-
|
|
8340
|
-
const PERSISTENT_BANNER_THEME = {
|
|
8341
|
-
UPSELL: 'upsell',
|
|
8342
|
-
INFO: 'info',
|
|
8343
|
-
DANGER: 'danger'
|
|
8344
|
-
};
|
|
8345
|
-
|
|
8346
|
-
var styles$S = {"persistent-banner":"_FsCJQ","persistent-banner--info":"_zt-xK","persistent-banner--danger":"_rmUys","persistent-banner--upsell":"_UGrRR"};
|
|
8347
|
-
|
|
8348
|
-
const PersistentBanner = ({
|
|
8349
|
-
theme: _theme = PERSISTENT_BANNER_THEME.INFO,
|
|
8350
|
-
children,
|
|
8351
|
-
primaryButton,
|
|
8352
|
-
secondaryButton,
|
|
8353
|
-
onDismiss,
|
|
8354
|
-
onLoad,
|
|
8355
|
-
testId
|
|
8356
|
-
}) => {
|
|
8357
|
-
useEffect(() => {
|
|
8358
|
-
onLoad == null || onLoad();
|
|
8359
|
-
}, []);
|
|
8360
|
-
const BannerContent = () => React__default.createElement(Inline, {
|
|
8361
|
-
justifyContent: "center",
|
|
8362
|
-
alignItems: "center"
|
|
8363
|
-
}, children, primaryButton && React__default.cloneElement(primaryButton, _extends({
|
|
8364
|
-
theme: BUTTON_THEMES.HOLLOW_CONTRAST
|
|
8365
|
-
}, primaryButton.props)), secondaryButton && React__default.cloneElement(secondaryButton, _extends({
|
|
8366
|
-
theme: BUTTON_THEMES.LINK_CONTRAST
|
|
8367
|
-
}, secondaryButton.props)));
|
|
8368
|
-
return React__default.createElement("div", {
|
|
8369
|
-
className: classnames(styles$S['persistent-banner'], {
|
|
8370
|
-
[styles$S['persistent-banner--info']]: _theme === PERSISTENT_BANNER_THEME.INFO,
|
|
8371
|
-
[styles$S['persistent-banner--danger']]: _theme === PERSISTENT_BANNER_THEME.DANGER,
|
|
8372
|
-
[styles$S['persistent-banner--upsell']]: _theme === PERSISTENT_BANNER_THEME.UPSELL
|
|
8373
|
-
}),
|
|
8374
|
-
"data-testid": testId
|
|
8375
|
-
}, onDismiss ? React__default.createElement(Inline, {
|
|
8376
|
-
flex: [1],
|
|
8377
|
-
alignItems: "center"
|
|
8378
|
-
}, React__default.createElement(BannerContent, null), React__default.createElement(Button, {
|
|
8379
|
-
theme: "link-contrast",
|
|
8380
|
-
onClick: onDismiss
|
|
8381
|
-
}, React__default.createElement(IconTimes, null))) : React__default.createElement(BannerContent, null));
|
|
8382
|
-
};
|
|
8383
|
-
|
|
8384
|
-
const getProgressMetric = (progress, maxValue) => {
|
|
8385
|
-
const updatedMaxValue = maxValue > 0 ? maxValue : 100;
|
|
8386
|
-
let updatedProgress = progress;
|
|
8387
|
-
if (updatedProgress > updatedMaxValue) {
|
|
8388
|
-
updatedProgress = updatedMaxValue;
|
|
8389
|
-
}
|
|
8390
|
-
if (updatedProgress < 0) {
|
|
8391
|
-
updatedProgress = 0;
|
|
8392
|
-
}
|
|
8393
|
-
return {
|
|
8394
|
-
progress: updatedProgress,
|
|
8395
|
-
maxValue: updatedMaxValue
|
|
8396
|
-
};
|
|
8397
|
-
};
|
|
8398
|
-
/**
|
|
8399
|
-
* This function calculates the progress bar so it can align in the center of each step
|
|
8400
|
-
*/
|
|
8401
|
-
const getProgressMetricWithSteps = (progress, amountOfSteps) => {
|
|
8402
|
-
const maxValue = amountOfSteps * 2;
|
|
8403
|
-
let actualProgress = progress;
|
|
8404
|
-
if (progress < 0) {
|
|
8405
|
-
actualProgress = 0;
|
|
8406
|
-
}
|
|
8407
|
-
if (progress > 0) {
|
|
8408
|
-
const previousProgress = (progress - 1) * 2;
|
|
8409
|
-
actualProgress = previousProgress + 1;
|
|
8410
|
-
}
|
|
8411
|
-
if (actualProgress > maxValue) {
|
|
8412
|
-
actualProgress = maxValue;
|
|
8413
|
-
}
|
|
8414
|
-
return {
|
|
8415
|
-
progress: actualProgress,
|
|
8416
|
-
maxValue
|
|
8417
|
-
};
|
|
8418
|
-
};
|
|
8419
|
-
|
|
8420
|
-
const useProgress = (progress, maxValue, getMetric = getProgressMetric) => {
|
|
8421
|
-
const metric = getMetric(progress, maxValue);
|
|
8422
|
-
const percentage = metric.progress / metric.maxValue * 100;
|
|
8423
|
-
const elementProps = {
|
|
8424
|
-
'aria-valuemax': metric.maxValue,
|
|
8425
|
-
'aria-valuemin': 0,
|
|
8426
|
-
'aria-valuenow': metric.progress,
|
|
8427
|
-
role: 'progressbar'
|
|
8428
|
-
};
|
|
8429
|
-
return {
|
|
8430
|
-
elementProps,
|
|
8431
|
-
metric: _extends({}, metric, {
|
|
8432
|
-
percentage
|
|
8433
|
-
})
|
|
8434
|
-
};
|
|
8435
|
-
};
|
|
8296
|
+
var styles$S = {"badge":"_RXV4h","badge--warning":"_2An1I","badge--danger":"_-Bw8L","badge--success":"_RxlMz","badge--info":"_dzCH-","badge--numeric":"_Ix9tP"};
|
|
8436
8297
|
|
|
8437
|
-
var styles$R = {"
|
|
8298
|
+
var styles$R = {"overlay":"_0yTe8","overlay--after-open":"_yJBtA","overlay--before-close":"_iWogn","content":"_ntozd","content--after-open":"_EQjDq","content--before-close":"_ZTY3B"};
|
|
8438
8299
|
|
|
8439
|
-
|
|
8440
|
-
progress,
|
|
8441
|
-
maxValue: _maxValue = 100,
|
|
8442
|
-
children,
|
|
8443
|
-
testId
|
|
8444
|
-
}) => {
|
|
8445
|
-
const {
|
|
8446
|
-
elementProps,
|
|
8447
|
-
metric
|
|
8448
|
-
} = useProgress(progress, _maxValue);
|
|
8449
|
-
const determinant = metric.percentage * 2.79;
|
|
8450
|
-
return React__default.createElement("div", _extends({}, elementProps, {
|
|
8451
|
-
className: styles$R['circular-progress'],
|
|
8452
|
-
"data-testid": testId
|
|
8453
|
-
}), React__default.createElement("svg", {
|
|
8454
|
-
viewBox: "0 0 100 100"
|
|
8455
|
-
}, React__default.createElement("circle", {
|
|
8456
|
-
cx: 50,
|
|
8457
|
-
cy: 50,
|
|
8458
|
-
r: 45,
|
|
8459
|
-
strokeWidth: "10px",
|
|
8460
|
-
className: styles$R['circular-progress__track']
|
|
8461
|
-
}), React__default.createElement("circle", {
|
|
8462
|
-
cx: 50,
|
|
8463
|
-
cy: 50,
|
|
8464
|
-
r: 45,
|
|
8465
|
-
strokeWidth: "10px",
|
|
8466
|
-
className: styles$R['circular-progress__indicator'],
|
|
8467
|
-
strokeDashoffset: "66",
|
|
8468
|
-
strokeDasharray: `${determinant} ${279 - determinant}`
|
|
8469
|
-
})), React__default.createElement("div", {
|
|
8470
|
-
className: styles$R['circular-progress__label']
|
|
8471
|
-
}, children || `${metric.progress}/${metric.maxValue}`));
|
|
8472
|
-
};
|
|
8473
|
-
|
|
8474
|
-
var styles$Q = {"progress-bar":"_fWvQF","progress-bar__indicator":"_vd0xc","progress-bar__steps":"_8kdeO"};
|
|
8475
|
-
|
|
8476
|
-
const ProgressBar = ({
|
|
8477
|
-
progress,
|
|
8478
|
-
maxValue,
|
|
8479
|
-
testId,
|
|
8480
|
-
steps
|
|
8481
|
-
}) => {
|
|
8482
|
-
const isUsingStepsAsMaxValue = !maxValue && steps && steps.length > 0;
|
|
8483
|
-
const inferedMaxValue = !maxValue && steps && steps.length > 0 ? steps.length : maxValue;
|
|
8484
|
-
const {
|
|
8485
|
-
elementProps,
|
|
8486
|
-
metric
|
|
8487
|
-
} = useProgress(progress, inferedMaxValue || 100, isUsingStepsAsMaxValue ? getProgressMetricWithSteps : getProgressMetric);
|
|
8488
|
-
return React__default.createElement(Stack, null, React__default.createElement("div", _extends({}, elementProps, {
|
|
8489
|
-
className: styles$Q['progress-bar'],
|
|
8490
|
-
"data-testid": testId
|
|
8491
|
-
}), React__default.createElement("div", {
|
|
8492
|
-
className: styles$Q['progress-bar__indicator'],
|
|
8493
|
-
style: {
|
|
8494
|
-
width: `${metric.percentage}%`
|
|
8495
|
-
}
|
|
8496
|
-
})), steps && steps.length > 0 && React__default.createElement("div", {
|
|
8497
|
-
className: styles$Q['progress-bar__steps']
|
|
8498
|
-
}, steps.map(step => React__default.createElement(Text, {
|
|
8499
|
-
key: step
|
|
8500
|
-
}, step))));
|
|
8501
|
-
};
|
|
8502
|
-
|
|
8503
|
-
var styles$P = {"skeleton":"_oDnLM","pulse":"_McmEv","skeleton__button":"_jPXx6","skeleton__pill":"_sPHSZ","skeleton__avatar":"_3vEYT","skeleton__avatar--small":"_zneq9","skeleton__avatar--medium":"_TtfoO","skeleton__avatar--large":"_jhOqR","skeleton__avatar--xlarge":"_VgGfx"};
|
|
8504
|
-
|
|
8505
|
-
const SKELETON_COMPONENT = {
|
|
8506
|
-
AVATAR: 'avatar',
|
|
8507
|
-
AVATAR_SMALL: 'avatar--small',
|
|
8508
|
-
AVATAR_MEDIUM: 'avatar--medium',
|
|
8509
|
-
AVATAR_LARGE: 'avatar--large',
|
|
8510
|
-
AVATAR_XLARGE: 'avatar--xlarge',
|
|
8511
|
-
BUTTON: 'button',
|
|
8512
|
-
PILL: 'pill'
|
|
8513
|
-
};
|
|
8514
|
-
|
|
8515
|
-
const _excluded$j = ["as", "testId", "width", "height"];
|
|
8516
|
-
const Skeleton = _ref => {
|
|
8517
|
-
let {
|
|
8518
|
-
as,
|
|
8519
|
-
testId,
|
|
8520
|
-
width,
|
|
8521
|
-
height
|
|
8522
|
-
} = _ref,
|
|
8523
|
-
positionStyles = _objectWithoutPropertiesLoose(_ref, _excluded$j);
|
|
8524
|
-
const positioning = usePositionStyles(positionStyles);
|
|
8525
|
-
return React__default.createElement("div", {
|
|
8526
|
-
"data-testid": testId,
|
|
8527
|
-
className: classnames(styles$P['skeleton'], {
|
|
8528
|
-
[styles$P['skeleton__avatar']]: as === SKELETON_COMPONENT.AVATAR,
|
|
8529
|
-
[styles$P['skeleton__avatar--small']]: as === SKELETON_COMPONENT.AVATAR_SMALL,
|
|
8530
|
-
[styles$P['skeleton__avatar--medium']]: as === SKELETON_COMPONENT.AVATAR_MEDIUM,
|
|
8531
|
-
[styles$P['skeleton__avatar--large']]: as === SKELETON_COMPONENT.AVATAR_LARGE,
|
|
8532
|
-
[styles$P['skeleton__avatar--xlarge']]: as === SKELETON_COMPONENT.AVATAR_XLARGE,
|
|
8533
|
-
[styles$P['skeleton__button']]: as === SKELETON_COMPONENT.BUTTON,
|
|
8534
|
-
[styles$P['skeleton__pill']]: as === SKELETON_COMPONENT.PILL
|
|
8535
|
-
}),
|
|
8536
|
-
style: _extends({}, positioning, {
|
|
8537
|
-
width: width,
|
|
8538
|
-
height: height
|
|
8539
|
-
})
|
|
8540
|
-
});
|
|
8541
|
-
};
|
|
8542
|
-
|
|
8543
|
-
var styles$O = {"data-table-row":"_hhDnr","data-table-row--clickable":"_ej5Ke","data-table-row--selected":"_qDTAh"};
|
|
8544
|
-
|
|
8545
|
-
var styles$N = {"actions":"_ffXgN"};
|
|
8546
|
-
|
|
8547
|
-
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-"};
|
|
8548
|
-
|
|
8549
|
-
var styles$L = {"overlay":"_0yTe8","overlay--after-open":"_yJBtA","overlay--before-close":"_iWogn","content":"_ntozd","content--after-open":"_EQjDq","content--before-close":"_ZTY3B"};
|
|
8550
|
-
|
|
8551
|
-
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"};
|
|
8552
8301
|
|
|
8553
8302
|
const ModalHeader = ({
|
|
8554
8303
|
header,
|
|
@@ -8558,7 +8307,7 @@ const ModalHeader = ({
|
|
|
8558
8307
|
}) => {
|
|
8559
8308
|
if (!header && !subHeader) {
|
|
8560
8309
|
return onClose ? React__default.createElement("div", {
|
|
8561
|
-
className: styles$
|
|
8310
|
+
className: styles$Q['header__close-button']
|
|
8562
8311
|
}, React__default.createElement(Button, {
|
|
8563
8312
|
theme: "link-icon",
|
|
8564
8313
|
onClick: onClose,
|
|
@@ -8574,17 +8323,17 @@ const ModalHeader = ({
|
|
|
8574
8323
|
flex: [1],
|
|
8575
8324
|
alignItems: "center"
|
|
8576
8325
|
}, React__default.createElement("span", {
|
|
8577
|
-
className: styles$
|
|
8326
|
+
className: styles$Q['header']
|
|
8578
8327
|
}, header), onClose && React__default.createElement(Button, {
|
|
8579
8328
|
theme: "link-icon",
|
|
8580
8329
|
onClick: onClose,
|
|
8581
8330
|
disabled: loading
|
|
8582
8331
|
}, React__default.createElement(IconTimes, null))), subHeader && React__default.createElement("div", {
|
|
8583
|
-
className: styles$
|
|
8332
|
+
className: styles$Q['sub-header']
|
|
8584
8333
|
}, subHeader));
|
|
8585
8334
|
};
|
|
8586
8335
|
|
|
8587
|
-
const _excluded$
|
|
8336
|
+
const _excluded$j = ["children", "header", "subHeader", "onClose", "loading", "zIndex", "rootElementId", "width", "height", "maxWidth", "shouldReturnFocusAfterClose", "testId"];
|
|
8588
8337
|
const Modal = _ref => {
|
|
8589
8338
|
let {
|
|
8590
8339
|
children,
|
|
@@ -8601,7 +8350,7 @@ const Modal = _ref => {
|
|
|
8601
8350
|
shouldReturnFocusAfterClose = true,
|
|
8602
8351
|
testId
|
|
8603
8352
|
} = _ref,
|
|
8604
|
-
otherProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
8353
|
+
otherProps = _objectWithoutPropertiesLoose(_ref, _excluded$j);
|
|
8605
8354
|
const style = {
|
|
8606
8355
|
content: {
|
|
8607
8356
|
width,
|
|
@@ -8630,14 +8379,14 @@ const Modal = _ref => {
|
|
|
8630
8379
|
contentLabel: "Modal",
|
|
8631
8380
|
appElement: rootElementId && document.getElementById(rootElementId) || undefined,
|
|
8632
8381
|
overlayClassName: {
|
|
8633
|
-
base: styles$
|
|
8634
|
-
afterOpen: styles$
|
|
8635
|
-
beforeClose: styles$
|
|
8382
|
+
base: styles$R['overlay'],
|
|
8383
|
+
afterOpen: styles$R['overlay--after-open'],
|
|
8384
|
+
beforeClose: styles$R['overlay--before-close']
|
|
8636
8385
|
},
|
|
8637
8386
|
className: {
|
|
8638
|
-
base: styles$
|
|
8639
|
-
afterOpen: styles$
|
|
8640
|
-
beforeClose: styles$
|
|
8387
|
+
base: styles$R['content'],
|
|
8388
|
+
afterOpen: styles$R['content--after-open'],
|
|
8389
|
+
beforeClose: styles$R['content--before-close']
|
|
8641
8390
|
},
|
|
8642
8391
|
data: dataProps
|
|
8643
8392
|
}, React__default.createElement(ModalHeader, {
|
|
@@ -8679,7 +8428,7 @@ const useScrollShadow = () => {
|
|
|
8679
8428
|
};
|
|
8680
8429
|
};
|
|
8681
8430
|
|
|
8682
|
-
var styles$
|
|
8431
|
+
var styles$P = {"modal-body":"_4YK4k","modal-body--with-scroll-shadow":"_wo1vv","modal-body__inner-div":"_9u6xC"};
|
|
8683
8432
|
|
|
8684
8433
|
const ModalBody = ({
|
|
8685
8434
|
children,
|
|
@@ -8690,17 +8439,17 @@ const ModalBody = ({
|
|
|
8690
8439
|
showScrollShadow
|
|
8691
8440
|
} = useScrollShadow();
|
|
8692
8441
|
return React__default.createElement("div", {
|
|
8693
|
-
className: classnames(styles$
|
|
8694
|
-
[styles$
|
|
8442
|
+
className: classnames(styles$P['modal-body'], {
|
|
8443
|
+
[styles$P['modal-body--with-scroll-shadow']]: showScrollShadow
|
|
8695
8444
|
}),
|
|
8696
8445
|
ref: ref,
|
|
8697
8446
|
"data-testid": testId
|
|
8698
8447
|
}, React__default.createElement("div", {
|
|
8699
|
-
className: styles$
|
|
8448
|
+
className: styles$P['modal-body__inner-div']
|
|
8700
8449
|
}, children));
|
|
8701
8450
|
};
|
|
8702
8451
|
|
|
8703
|
-
var styles$
|
|
8452
|
+
var styles$O = {"modal-footer":"_bezlP","tertiary-container":"_EdqHx"};
|
|
8704
8453
|
|
|
8705
8454
|
const updateButtonProps$1 = (button, newProps) => {
|
|
8706
8455
|
if (!button) {
|
|
@@ -8737,7 +8486,7 @@ const ModalFooter = ({
|
|
|
8737
8486
|
justifyContent: "space-between"
|
|
8738
8487
|
}, React__default.createElement("div", {
|
|
8739
8488
|
className: classnames({
|
|
8740
|
-
[styles$
|
|
8489
|
+
[styles$O['tertiary-container']]: tertiaryButton && tertiaryButton.props.theme.startsWith('link')
|
|
8741
8490
|
})
|
|
8742
8491
|
}, tertiaryButton || React__default.createElement("div", null)), React__default.createElement(Inline, {
|
|
8743
8492
|
space: 12
|
|
@@ -8755,7 +8504,7 @@ const FooterContainer = ({
|
|
|
8755
8504
|
displayName: 'Inline'
|
|
8756
8505
|
});
|
|
8757
8506
|
return React__default.createElement("div", {
|
|
8758
|
-
className: styles$
|
|
8507
|
+
className: styles$O['modal-footer'],
|
|
8759
8508
|
"data-testid": testId
|
|
8760
8509
|
}, React__default.createElement(Inline, {
|
|
8761
8510
|
justifyContent: "end",
|
|
@@ -8768,7 +8517,7 @@ var dayOverridesStyles = {"root":"_et9Fs","table":"_l7Mis","caption":"_XGu8K","h
|
|
|
8768
8517
|
|
|
8769
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"};
|
|
8770
8519
|
|
|
8771
|
-
var styles$
|
|
8520
|
+
var styles$N = {"calendar":"_YPyZ6","calendar__overlay":"_-cw0A"};
|
|
8772
8521
|
|
|
8773
8522
|
function parseDate(str, format, locale) {
|
|
8774
8523
|
const parsed = dateFnsParse(str, format, new Date(), {
|
|
@@ -9003,9 +8752,9 @@ const Calendar = ({
|
|
|
9003
8752
|
}
|
|
9004
8753
|
};
|
|
9005
8754
|
return React__default.createElement(Portal, null, React__default.createElement("div", {
|
|
9006
|
-
className: styles$
|
|
8755
|
+
className: styles$N['calendar']
|
|
9007
8756
|
}, React__default.createElement("div", {
|
|
9008
|
-
className: styles$
|
|
8757
|
+
className: styles$N['calendar__overlay'],
|
|
9009
8758
|
ref: ref => setCalendarRef(ref),
|
|
9010
8759
|
style: _extends({}, calendarPosition, {
|
|
9011
8760
|
zIndex: isInsideDropdown ? getZIndex('dropdown-level-2') : getZIndex('dropdown')
|
|
@@ -9063,9 +8812,9 @@ const useCheckBoxFieldControllers = ({
|
|
|
9063
8812
|
return controllers;
|
|
9064
8813
|
};
|
|
9065
8814
|
|
|
9066
|
-
var styles$
|
|
8815
|
+
var styles$M = {"check-box-field":"_Id4qm","check-box-field__caption":"_s9d-m","check-box-field__custom-input":"_kmvBP"};
|
|
9067
8816
|
|
|
9068
|
-
const _excluded$
|
|
8817
|
+
const _excluded$i = ["name", "id", "checked", "onChange", "onBlur", "label", "caption", "error", "disabled", "testId"];
|
|
9069
8818
|
/** CheckboxField form element. */
|
|
9070
8819
|
const CheckboxField = _ref => {
|
|
9071
8820
|
let {
|
|
@@ -9080,7 +8829,7 @@ const CheckboxField = _ref => {
|
|
|
9080
8829
|
disabled,
|
|
9081
8830
|
testId
|
|
9082
8831
|
} = _ref,
|
|
9083
|
-
otherProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
8832
|
+
otherProps = _objectWithoutPropertiesLoose(_ref, _excluded$i);
|
|
9084
8833
|
const controllers = useCheckBoxFieldControllers({
|
|
9085
8834
|
name,
|
|
9086
8835
|
id: inputId,
|
|
@@ -9098,7 +8847,7 @@ const CheckboxField = _ref => {
|
|
|
9098
8847
|
flexItems: true,
|
|
9099
8848
|
flex: ['0 0 auto']
|
|
9100
8849
|
}, otherProps), React__default.createElement("div", {
|
|
9101
|
-
className: styles$
|
|
8850
|
+
className: styles$M['check-box-field']
|
|
9102
8851
|
}, React__default.createElement("input", {
|
|
9103
8852
|
name: name,
|
|
9104
8853
|
id: controllers.id,
|
|
@@ -9111,12 +8860,12 @@ const CheckboxField = _ref => {
|
|
|
9111
8860
|
onChange: controllers.onChange,
|
|
9112
8861
|
onBlur: controllers.onBlur
|
|
9113
8862
|
}), React__default.createElement("span", {
|
|
9114
|
-
className: styles$
|
|
8863
|
+
className: styles$M['check-box-field__custom-input']
|
|
9115
8864
|
})), label && React__default.createElement(Label, {
|
|
9116
8865
|
htmlFor: controllers.id,
|
|
9117
8866
|
truncate: false
|
|
9118
8867
|
}, label)), caption && React__default.createElement("div", {
|
|
9119
|
-
className: styles$
|
|
8868
|
+
className: styles$M['check-box-field__caption']
|
|
9120
8869
|
}, React__default.createElement(Caption, {
|
|
9121
8870
|
fieldId: controllers.id
|
|
9122
8871
|
}, caption)), controllers.error && React__default.createElement(ErrorMessage, {
|
|
@@ -9154,9 +8903,9 @@ const useLocalStorage = (key, initialValue) => {
|
|
|
9154
8903
|
return [storedValue, setValue];
|
|
9155
8904
|
};
|
|
9156
8905
|
|
|
9157
|
-
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"};
|
|
9158
8907
|
|
|
9159
|
-
const _excluded$
|
|
8908
|
+
const _excluded$h = ["header", "children", "mediaUrl", "onClose", "modalId", "primaryButton", "secondaryButton", "testId"];
|
|
9160
8909
|
const HintModal = _ref => {
|
|
9161
8910
|
let {
|
|
9162
8911
|
header,
|
|
@@ -9168,7 +8917,7 @@ const HintModal = _ref => {
|
|
|
9168
8917
|
secondaryButton,
|
|
9169
8918
|
testId
|
|
9170
8919
|
} = _ref,
|
|
9171
|
-
positionProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
8920
|
+
positionProps = _objectWithoutPropertiesLoose(_ref, _excluded$h);
|
|
9172
8921
|
const __ = useTranslation('HintModal');
|
|
9173
8922
|
const [doNotShowAgain, setDoNotShowAgain] = useState(false);
|
|
9174
8923
|
const [persistedDoNotShow, setPersistedDoNotShow] = useLocalStorage(modalId, false);
|
|
@@ -9210,22 +8959,22 @@ const HintModal = _ref => {
|
|
|
9210
8959
|
closeTimeoutMS: 200,
|
|
9211
8960
|
contentLabel: "Modal",
|
|
9212
8961
|
className: {
|
|
9213
|
-
base: styles$
|
|
9214
|
-
afterOpen: styles$
|
|
9215
|
-
beforeClose: styles$
|
|
8962
|
+
base: styles$L['hint-modal'],
|
|
8963
|
+
afterOpen: styles$L['hint-modal--after-open'],
|
|
8964
|
+
beforeClose: styles$L['hint-modal--before-close']
|
|
9216
8965
|
},
|
|
9217
|
-
overlayClassName: styles$
|
|
8966
|
+
overlayClassName: styles$L['hint-modal__overlay']
|
|
9218
8967
|
}, React__default.createElement("div", {
|
|
9219
|
-
className: styles$
|
|
8968
|
+
className: styles$L['hint-modal__close-button']
|
|
9220
8969
|
}, React__default.createElement(Button, {
|
|
9221
8970
|
theme: "link-icon",
|
|
9222
8971
|
onClick: handleOnClose
|
|
9223
8972
|
}, React__default.createElement(IconTimes, null))), mediaUrl && React__default.createElement("img", {
|
|
9224
|
-
className: styles$
|
|
8973
|
+
className: styles$L['hint-modal__image'],
|
|
9225
8974
|
src: mediaUrl,
|
|
9226
8975
|
alt: String(header)
|
|
9227
8976
|
}), React__default.createElement("div", {
|
|
9228
|
-
className: styles$
|
|
8977
|
+
className: styles$L['hint-modal__body']
|
|
9229
8978
|
}, React__default.createElement(Stack, {
|
|
9230
8979
|
justifyContent: "space-between"
|
|
9231
8980
|
}, React__default.createElement(Stack, {
|
|
@@ -9246,6 +8995,295 @@ const HintModal = _ref => {
|
|
|
9246
8995
|
}, secondaryButtonUpdated, primaryButtonUpdated)))));
|
|
9247
8996
|
};
|
|
9248
8997
|
|
|
8998
|
+
const _excluded$g = ["children", "theme", "title", "testId"];
|
|
8999
|
+
const BadgeElement = (_ref, forwardedRef) => {
|
|
9000
|
+
let {
|
|
9001
|
+
children,
|
|
9002
|
+
theme,
|
|
9003
|
+
title,
|
|
9004
|
+
testId
|
|
9005
|
+
} = _ref,
|
|
9006
|
+
otherProps = _objectWithoutPropertiesLoose(_ref, _excluded$g);
|
|
9007
|
+
const internalRef = useRef(null);
|
|
9008
|
+
const ref = forwardedRef || internalRef;
|
|
9009
|
+
useLayoutEffect(() => {
|
|
9010
|
+
if (typeof ref !== 'function' && ref.current && React__default.isValidElement(children) && typeof (children == null ? void 0 : children.type) !== 'string' && typeof (children == null ? void 0 : children.type) !== 'number') {
|
|
9011
|
+
ref.current.style.height = ref.current.offsetWidth + 'px';
|
|
9012
|
+
}
|
|
9013
|
+
});
|
|
9014
|
+
return React__default.createElement(Tooltip, {
|
|
9015
|
+
overlay: title,
|
|
9016
|
+
ref: ref
|
|
9017
|
+
}, React__default.createElement("div", _extends({
|
|
9018
|
+
className: classnames(styles$S['badge'], {
|
|
9019
|
+
[styles$S['badge--success']]: theme === 'success',
|
|
9020
|
+
[styles$S['badge--danger']]: theme === 'danger',
|
|
9021
|
+
[styles$S['badge--info']]: theme === 'info',
|
|
9022
|
+
[styles$S['badge--warning']]: theme === 'warning',
|
|
9023
|
+
[styles$S['badge--numeric']]: Number.isFinite(children)
|
|
9024
|
+
}),
|
|
9025
|
+
ref: ref,
|
|
9026
|
+
"data-testid": testId
|
|
9027
|
+
}, otherProps), children));
|
|
9028
|
+
};
|
|
9029
|
+
const Badge = forwardRef(BadgeElement);
|
|
9030
|
+
|
|
9031
|
+
const MenuItem = ({
|
|
9032
|
+
menu
|
|
9033
|
+
}) => {
|
|
9034
|
+
return React__default.createElement("li", {
|
|
9035
|
+
className: classnames(styles$T['menu-item'])
|
|
9036
|
+
}, menu.reloadDocument ? React__default.createElement("a", {
|
|
9037
|
+
href: menu.to,
|
|
9038
|
+
className: classnames({
|
|
9039
|
+
[styles$T['menu-item--active']]: menu.isActive
|
|
9040
|
+
})
|
|
9041
|
+
}, menu.label, !!menu.badge && React__default.createElement(Badge, null, menu.badge)) : React__default.createElement(NavLink, {
|
|
9042
|
+
to: menu.to,
|
|
9043
|
+
// @ts-expect-error This is only available on v5
|
|
9044
|
+
activeClassName: styles$T['menu-item--active'],
|
|
9045
|
+
exact: true
|
|
9046
|
+
}, menu.label, !!menu.badge && React__default.createElement(Badge, null, menu.badge)));
|
|
9047
|
+
};
|
|
9048
|
+
|
|
9049
|
+
const PageLayout = ({
|
|
9050
|
+
title,
|
|
9051
|
+
children,
|
|
9052
|
+
menu,
|
|
9053
|
+
sideNavContent
|
|
9054
|
+
}) => {
|
|
9055
|
+
return React__default.createElement("div", {
|
|
9056
|
+
className: styles$U['page-layout']
|
|
9057
|
+
}, React__default.createElement("div", {
|
|
9058
|
+
className: styles$U['page-layout__nav-container']
|
|
9059
|
+
}, React__default.createElement(Stack, {
|
|
9060
|
+
space: 12
|
|
9061
|
+
}, React__default.createElement(Text, {
|
|
9062
|
+
as: "h5",
|
|
9063
|
+
textWrap: "wrap",
|
|
9064
|
+
ml: 20,
|
|
9065
|
+
mr: 35
|
|
9066
|
+
}, title), React__default.createElement("ul", {
|
|
9067
|
+
className: styles$U['page-layout__nav-list']
|
|
9068
|
+
}, menu.filter(menu => !('isVisible' in menu) || (menu == null ? void 0 : menu.isVisible) === true).map((menuItem, index) => React__default.createElement(MenuItem, {
|
|
9069
|
+
key: index,
|
|
9070
|
+
menu: menuItem
|
|
9071
|
+
}))), sideNavContent && React__default.createElement("div", {
|
|
9072
|
+
className: styles$U['page-layout__side-nav-content']
|
|
9073
|
+
}, sideNavContent))), React__default.createElement("div", {
|
|
9074
|
+
className: styles$U['page-layout__content']
|
|
9075
|
+
}, children));
|
|
9076
|
+
};
|
|
9077
|
+
|
|
9078
|
+
const PERSISTENT_BANNER_THEME = {
|
|
9079
|
+
UPSELL: 'upsell',
|
|
9080
|
+
INFO: 'info',
|
|
9081
|
+
DANGER: 'danger'
|
|
9082
|
+
};
|
|
9083
|
+
|
|
9084
|
+
var styles$K = {"persistent-banner":"_FsCJQ","persistent-banner--info":"_zt-xK","persistent-banner--danger":"_rmUys","persistent-banner--upsell":"_UGrRR"};
|
|
9085
|
+
|
|
9086
|
+
const PersistentBanner = ({
|
|
9087
|
+
theme: _theme = PERSISTENT_BANNER_THEME.INFO,
|
|
9088
|
+
children,
|
|
9089
|
+
primaryButton,
|
|
9090
|
+
secondaryButton,
|
|
9091
|
+
onDismiss,
|
|
9092
|
+
onLoad,
|
|
9093
|
+
testId
|
|
9094
|
+
}) => {
|
|
9095
|
+
useEffect(() => {
|
|
9096
|
+
onLoad == null || onLoad();
|
|
9097
|
+
}, []);
|
|
9098
|
+
const BannerContent = () => React__default.createElement(Inline, {
|
|
9099
|
+
justifyContent: "center",
|
|
9100
|
+
alignItems: "center"
|
|
9101
|
+
}, children, primaryButton && React__default.cloneElement(primaryButton, _extends({
|
|
9102
|
+
theme: BUTTON_THEMES.HOLLOW_CONTRAST
|
|
9103
|
+
}, primaryButton.props)), secondaryButton && React__default.cloneElement(secondaryButton, _extends({
|
|
9104
|
+
theme: BUTTON_THEMES.LINK_CONTRAST
|
|
9105
|
+
}, secondaryButton.props)));
|
|
9106
|
+
return React__default.createElement("div", {
|
|
9107
|
+
className: classnames(styles$K['persistent-banner'], {
|
|
9108
|
+
[styles$K['persistent-banner--info']]: _theme === PERSISTENT_BANNER_THEME.INFO,
|
|
9109
|
+
[styles$K['persistent-banner--danger']]: _theme === PERSISTENT_BANNER_THEME.DANGER,
|
|
9110
|
+
[styles$K['persistent-banner--upsell']]: _theme === PERSISTENT_BANNER_THEME.UPSELL
|
|
9111
|
+
}),
|
|
9112
|
+
"data-testid": testId
|
|
9113
|
+
}, onDismiss ? React__default.createElement(Inline, {
|
|
9114
|
+
flex: [1],
|
|
9115
|
+
alignItems: "center"
|
|
9116
|
+
}, React__default.createElement(BannerContent, null), React__default.createElement(Button, {
|
|
9117
|
+
theme: "link-contrast",
|
|
9118
|
+
onClick: onDismiss
|
|
9119
|
+
}, React__default.createElement(IconTimes, null))) : React__default.createElement(BannerContent, null));
|
|
9120
|
+
};
|
|
9121
|
+
|
|
9122
|
+
const getProgressMetric = (progress, maxValue) => {
|
|
9123
|
+
const updatedMaxValue = maxValue > 0 ? maxValue : 100;
|
|
9124
|
+
let updatedProgress = progress;
|
|
9125
|
+
if (updatedProgress > updatedMaxValue) {
|
|
9126
|
+
updatedProgress = updatedMaxValue;
|
|
9127
|
+
}
|
|
9128
|
+
if (updatedProgress < 0) {
|
|
9129
|
+
updatedProgress = 0;
|
|
9130
|
+
}
|
|
9131
|
+
return {
|
|
9132
|
+
progress: updatedProgress,
|
|
9133
|
+
maxValue: updatedMaxValue
|
|
9134
|
+
};
|
|
9135
|
+
};
|
|
9136
|
+
/**
|
|
9137
|
+
* This function calculates the progress bar so it can align in the center of each step
|
|
9138
|
+
*/
|
|
9139
|
+
const getProgressMetricWithSteps = (progress, amountOfSteps) => {
|
|
9140
|
+
const maxValue = amountOfSteps * 2;
|
|
9141
|
+
let actualProgress = progress;
|
|
9142
|
+
if (progress < 0) {
|
|
9143
|
+
actualProgress = 0;
|
|
9144
|
+
}
|
|
9145
|
+
if (progress > 0) {
|
|
9146
|
+
const previousProgress = (progress - 1) * 2;
|
|
9147
|
+
actualProgress = previousProgress + 1;
|
|
9148
|
+
}
|
|
9149
|
+
if (actualProgress > maxValue) {
|
|
9150
|
+
actualProgress = maxValue;
|
|
9151
|
+
}
|
|
9152
|
+
return {
|
|
9153
|
+
progress: actualProgress,
|
|
9154
|
+
maxValue
|
|
9155
|
+
};
|
|
9156
|
+
};
|
|
9157
|
+
|
|
9158
|
+
const useProgress = (progress, maxValue, getMetric = getProgressMetric) => {
|
|
9159
|
+
const metric = getMetric(progress, maxValue);
|
|
9160
|
+
const percentage = metric.progress / metric.maxValue * 100;
|
|
9161
|
+
const elementProps = {
|
|
9162
|
+
'aria-valuemax': metric.maxValue,
|
|
9163
|
+
'aria-valuemin': 0,
|
|
9164
|
+
'aria-valuenow': metric.progress,
|
|
9165
|
+
role: 'progressbar'
|
|
9166
|
+
};
|
|
9167
|
+
return {
|
|
9168
|
+
elementProps,
|
|
9169
|
+
metric: _extends({}, metric, {
|
|
9170
|
+
percentage
|
|
9171
|
+
})
|
|
9172
|
+
};
|
|
9173
|
+
};
|
|
9174
|
+
|
|
9175
|
+
var styles$J = {"circular-progress":"_UI0Fo","circular-progress__label":"_6PNwZ","circular-progress__track":"_alBLB","circular-progress__indicator":"_VADa6"};
|
|
9176
|
+
|
|
9177
|
+
const CircularProgress = ({
|
|
9178
|
+
progress,
|
|
9179
|
+
maxValue: _maxValue = 100,
|
|
9180
|
+
children,
|
|
9181
|
+
testId
|
|
9182
|
+
}) => {
|
|
9183
|
+
const {
|
|
9184
|
+
elementProps,
|
|
9185
|
+
metric
|
|
9186
|
+
} = useProgress(progress, _maxValue);
|
|
9187
|
+
const determinant = metric.percentage * 2.79;
|
|
9188
|
+
return React__default.createElement("div", _extends({}, elementProps, {
|
|
9189
|
+
className: styles$J['circular-progress'],
|
|
9190
|
+
"data-testid": testId
|
|
9191
|
+
}), React__default.createElement("svg", {
|
|
9192
|
+
viewBox: "0 0 100 100"
|
|
9193
|
+
}, React__default.createElement("circle", {
|
|
9194
|
+
cx: 50,
|
|
9195
|
+
cy: 50,
|
|
9196
|
+
r: 45,
|
|
9197
|
+
strokeWidth: "10px",
|
|
9198
|
+
className: styles$J['circular-progress__track']
|
|
9199
|
+
}), React__default.createElement("circle", {
|
|
9200
|
+
cx: 50,
|
|
9201
|
+
cy: 50,
|
|
9202
|
+
r: 45,
|
|
9203
|
+
strokeWidth: "10px",
|
|
9204
|
+
className: styles$J['circular-progress__indicator'],
|
|
9205
|
+
strokeDashoffset: "66",
|
|
9206
|
+
strokeDasharray: `${determinant} ${279 - determinant}`
|
|
9207
|
+
})), React__default.createElement("div", {
|
|
9208
|
+
className: styles$J['circular-progress__label']
|
|
9209
|
+
}, children || `${metric.progress}/${metric.maxValue}`));
|
|
9210
|
+
};
|
|
9211
|
+
|
|
9212
|
+
var styles$I = {"progress-bar":"_fWvQF","progress-bar__indicator":"_vd0xc","progress-bar__steps":"_8kdeO"};
|
|
9213
|
+
|
|
9214
|
+
const ProgressBar = ({
|
|
9215
|
+
progress,
|
|
9216
|
+
maxValue,
|
|
9217
|
+
testId,
|
|
9218
|
+
steps
|
|
9219
|
+
}) => {
|
|
9220
|
+
const isUsingStepsAsMaxValue = !maxValue && steps && steps.length > 0;
|
|
9221
|
+
const inferedMaxValue = !maxValue && steps && steps.length > 0 ? steps.length : maxValue;
|
|
9222
|
+
const {
|
|
9223
|
+
elementProps,
|
|
9224
|
+
metric
|
|
9225
|
+
} = useProgress(progress, inferedMaxValue || 100, isUsingStepsAsMaxValue ? getProgressMetricWithSteps : getProgressMetric);
|
|
9226
|
+
return React__default.createElement(Stack, null, React__default.createElement("div", _extends({}, elementProps, {
|
|
9227
|
+
className: styles$I['progress-bar'],
|
|
9228
|
+
"data-testid": testId
|
|
9229
|
+
}), React__default.createElement("div", {
|
|
9230
|
+
className: styles$I['progress-bar__indicator'],
|
|
9231
|
+
style: {
|
|
9232
|
+
width: `${metric.percentage}%`
|
|
9233
|
+
}
|
|
9234
|
+
})), steps && steps.length > 0 && React__default.createElement("div", {
|
|
9235
|
+
className: styles$I['progress-bar__steps']
|
|
9236
|
+
}, steps.map(step => React__default.createElement(Text, {
|
|
9237
|
+
key: step
|
|
9238
|
+
}, step))));
|
|
9239
|
+
};
|
|
9240
|
+
|
|
9241
|
+
var styles$H = {"skeleton":"_oDnLM","pulse":"_McmEv","skeleton__button":"_jPXx6","skeleton__pill":"_sPHSZ","skeleton__avatar":"_3vEYT","skeleton__avatar--small":"_zneq9","skeleton__avatar--medium":"_TtfoO","skeleton__avatar--large":"_jhOqR","skeleton__avatar--xlarge":"_VgGfx"};
|
|
9242
|
+
|
|
9243
|
+
const SKELETON_COMPONENT = {
|
|
9244
|
+
AVATAR: 'avatar',
|
|
9245
|
+
AVATAR_SMALL: 'avatar--small',
|
|
9246
|
+
AVATAR_MEDIUM: 'avatar--medium',
|
|
9247
|
+
AVATAR_LARGE: 'avatar--large',
|
|
9248
|
+
AVATAR_XLARGE: 'avatar--xlarge',
|
|
9249
|
+
BUTTON: 'button',
|
|
9250
|
+
PILL: 'pill'
|
|
9251
|
+
};
|
|
9252
|
+
|
|
9253
|
+
const _excluded$f = ["as", "testId", "width", "height"];
|
|
9254
|
+
const Skeleton = _ref => {
|
|
9255
|
+
let {
|
|
9256
|
+
as,
|
|
9257
|
+
testId,
|
|
9258
|
+
width,
|
|
9259
|
+
height
|
|
9260
|
+
} = _ref,
|
|
9261
|
+
positionStyles = _objectWithoutPropertiesLoose(_ref, _excluded$f);
|
|
9262
|
+
const positioning = usePositionStyles(positionStyles);
|
|
9263
|
+
return React__default.createElement("div", {
|
|
9264
|
+
"data-testid": testId,
|
|
9265
|
+
className: classnames(styles$H['skeleton'], {
|
|
9266
|
+
[styles$H['skeleton__avatar']]: as === SKELETON_COMPONENT.AVATAR,
|
|
9267
|
+
[styles$H['skeleton__avatar--small']]: as === SKELETON_COMPONENT.AVATAR_SMALL,
|
|
9268
|
+
[styles$H['skeleton__avatar--medium']]: as === SKELETON_COMPONENT.AVATAR_MEDIUM,
|
|
9269
|
+
[styles$H['skeleton__avatar--large']]: as === SKELETON_COMPONENT.AVATAR_LARGE,
|
|
9270
|
+
[styles$H['skeleton__avatar--xlarge']]: as === SKELETON_COMPONENT.AVATAR_XLARGE,
|
|
9271
|
+
[styles$H['skeleton__button']]: as === SKELETON_COMPONENT.BUTTON,
|
|
9272
|
+
[styles$H['skeleton__pill']]: as === SKELETON_COMPONENT.PILL
|
|
9273
|
+
}),
|
|
9274
|
+
style: _extends({}, positioning, {
|
|
9275
|
+
width: width,
|
|
9276
|
+
height: height
|
|
9277
|
+
})
|
|
9278
|
+
});
|
|
9279
|
+
};
|
|
9280
|
+
|
|
9281
|
+
var styles$G = {"data-table-row":"_hhDnr","data-table-row--clickable":"_ej5Ke","data-table-row--selected":"_qDTAh"};
|
|
9282
|
+
|
|
9283
|
+
var styles$F = {"actions":"_ffXgN"};
|
|
9284
|
+
|
|
9285
|
+
var styles$E = {"data-table-cell":"_cp8xi","data-table-cell--no-padding":"_gqbNb","data-table-cell--vertical-border":"_uHjkg","data-table-cell--invalid":"_ASOQd","data-table-cell__content":"_HjPNI","data-table-cell__content--right-align":"_BCVO6","data-table-cell__content--with-error":"_NqtPS","data-table-cell__content--loading":"_-rWoZ","data-table-cell__error-icon":"_txhua","data-table-cell__error-icon--right-align":"_fPzqj","data-table-cell__error-icon--left-align":"_L2-l-"};
|
|
9286
|
+
|
|
9249
9287
|
const DataTableCellElement = ({
|
|
9250
9288
|
children,
|
|
9251
9289
|
columnIndex,
|
|
@@ -9268,9 +9306,9 @@ const DataTableCellElement = ({
|
|
|
9268
9306
|
const hasError = !!error;
|
|
9269
9307
|
const errorMessage = error;
|
|
9270
9308
|
const icon = hasError && React__default.createElement("div", {
|
|
9271
|
-
className: classnames(styles$
|
|
9272
|
-
[styles$
|
|
9273
|
-
[styles$
|
|
9309
|
+
className: classnames(styles$E['data-table-cell__error-icon'], {
|
|
9310
|
+
[styles$E['data-table-cell__error-icon--right-align']]: isRightAligned,
|
|
9311
|
+
[styles$E['data-table-cell__error-icon--left-align']]: !isRightAligned
|
|
9274
9312
|
})
|
|
9275
9313
|
}, React__default.createElement(IconTimesOctagon, {
|
|
9276
9314
|
size: "medium",
|
|
@@ -9278,17 +9316,17 @@ const DataTableCellElement = ({
|
|
|
9278
9316
|
}));
|
|
9279
9317
|
const TableCell = React__default.createElement("td", {
|
|
9280
9318
|
className: classnames({
|
|
9281
|
-
[styles$
|
|
9282
|
-
[styles$
|
|
9283
|
-
[styles$
|
|
9284
|
-
}, styles$
|
|
9319
|
+
[styles$E['data-table-cell--invalid']]: hasError,
|
|
9320
|
+
[styles$E['data-table-cell--no-padding']]: _noPadding,
|
|
9321
|
+
[styles$E['data-table-cell--vertical-border']]: hasVerticalBorders
|
|
9322
|
+
}, styles$E['data-table-cell']),
|
|
9285
9323
|
colSpan: colSpan,
|
|
9286
9324
|
ref: ref
|
|
9287
9325
|
}, React__default.createElement("div", {
|
|
9288
|
-
className: classnames(styles$
|
|
9289
|
-
[styles$
|
|
9290
|
-
[styles$
|
|
9291
|
-
[styles$
|
|
9326
|
+
className: classnames(styles$E['data-table-cell__content'], {
|
|
9327
|
+
[styles$E['data-table-cell__content--with-error']]: hasError,
|
|
9328
|
+
[styles$E['data-table-cell__content--right-align']]: isRightAligned,
|
|
9329
|
+
[styles$E['data-table-cell__content--loading']]: state === DATA_TABLE_STATES.BACKGROUND_LOADING
|
|
9292
9330
|
})
|
|
9293
9331
|
}, isRightAligned && icon, children, !isRightAligned && icon));
|
|
9294
9332
|
return React__default.createElement(Tooltip, {
|
|
@@ -9312,7 +9350,7 @@ const DataTableRowActions = ({
|
|
|
9312
9350
|
return React__default.createElement(DataTableCell, {
|
|
9313
9351
|
columnIndex: columnIndex
|
|
9314
9352
|
}, React__default.createElement("div", {
|
|
9315
|
-
className: styles$
|
|
9353
|
+
className: styles$F['actions'],
|
|
9316
9354
|
"data-testid": "data-table-dropdown-menu"
|
|
9317
9355
|
}, state === 'SKELETON_LOADING' && React__default.createElement(Skeleton, {
|
|
9318
9356
|
width: 45
|
|
@@ -9325,7 +9363,7 @@ const DataTableRowActions = ({
|
|
|
9325
9363
|
})));
|
|
9326
9364
|
};
|
|
9327
9365
|
|
|
9328
|
-
var styles$
|
|
9366
|
+
var styles$D = {"data-table-editable-cell":"_jp9-G","data-table-editable-cell--right-aligned":"_BzPeH","data-table-editable-cell--currency":"_NhNG9","data-table-editable-cell--invalid":"_5HRwe","data-table-editable-cell--top-left":"_P--u2","data-table-editable-cell--top-right":"_EloAX","data-table-editable-cell--bottom-left":"_ZDCR9","data-table-editable-cell--bottom-right":"_Mc9YJ"};
|
|
9329
9367
|
|
|
9330
9368
|
const DataTableEditableCellElement = ({
|
|
9331
9369
|
name,
|
|
@@ -9373,8 +9411,8 @@ const DataTableEditableCellElement = ({
|
|
|
9373
9411
|
};
|
|
9374
9412
|
const EditableCell = React__default.createElement("div", {
|
|
9375
9413
|
className: classnames({
|
|
9376
|
-
[styles$
|
|
9377
|
-
}, styles$
|
|
9414
|
+
[styles$D['data-table-editable-cell--currency']]: _type === 'currency'
|
|
9415
|
+
}, styles$D['data-table-editable-cell']),
|
|
9378
9416
|
"data-testid": testId,
|
|
9379
9417
|
role: "cell"
|
|
9380
9418
|
}, React__default.createElement(Field, _extends({}, fieldProps), React__default.createElement(AffixContainer, {
|
|
@@ -9384,12 +9422,12 @@ const DataTableEditableCellElement = ({
|
|
|
9384
9422
|
name: name,
|
|
9385
9423
|
id: controllers.id,
|
|
9386
9424
|
className: classnames({
|
|
9387
|
-
[styles$
|
|
9388
|
-
[styles$
|
|
9389
|
-
[styles$
|
|
9390
|
-
[styles$
|
|
9391
|
-
[styles$
|
|
9392
|
-
[styles$
|
|
9425
|
+
[styles$D['data-table-editable-cell--right-aligned']]: isRightAligned,
|
|
9426
|
+
[styles$D['data-table-editable-cell--top-left']]: isTopLeftCell,
|
|
9427
|
+
[styles$D['data-table-editable-cell--top-right']]: isTopRightCell,
|
|
9428
|
+
[styles$D['data-table-editable-cell--bottom-left']]: isBottomLeftCell,
|
|
9429
|
+
[styles$D['data-table-editable-cell--bottom-right']]: isBottomRightCell,
|
|
9430
|
+
[styles$D['data-table-editable-cell--invalid']]: hasError
|
|
9393
9431
|
}),
|
|
9394
9432
|
type: _type === 'currency' ? 'number' : 'text',
|
|
9395
9433
|
step: _type === 'currency' ? 'any' : '',
|
|
@@ -9415,7 +9453,7 @@ const DataTableEditableCellElement = ({
|
|
|
9415
9453
|
};
|
|
9416
9454
|
const DataTableEditableCell = forwardRef(DataTableEditableCellElement);
|
|
9417
9455
|
|
|
9418
|
-
const _excluded$
|
|
9456
|
+
const _excluded$e = ["children", "onClick", "isSelected", "actions", "hasDefaultPadding", "hasDefaultCell", "testId"];
|
|
9419
9457
|
const DataTableRowComponent = (_ref, ref) => {
|
|
9420
9458
|
let {
|
|
9421
9459
|
children,
|
|
@@ -9426,13 +9464,13 @@ const DataTableRowComponent = (_ref, ref) => {
|
|
|
9426
9464
|
hasDefaultCell = true,
|
|
9427
9465
|
testId
|
|
9428
9466
|
} = _ref,
|
|
9429
|
-
nativeDivProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
9467
|
+
nativeDivProps = _objectWithoutPropertiesLoose(_ref, _excluded$e);
|
|
9430
9468
|
const {
|
|
9431
9469
|
showActionMenu
|
|
9432
9470
|
} = useDataTableContext();
|
|
9433
|
-
const styleNames = classnames(styles$
|
|
9434
|
-
[styles$
|
|
9435
|
-
[styles$
|
|
9471
|
+
const styleNames = classnames(styles$G['data-table-row'], {
|
|
9472
|
+
[styles$G['data-table-row--clickable']]: onClick,
|
|
9473
|
+
[styles$G['data-table-row--selected']]: isSelected
|
|
9436
9474
|
});
|
|
9437
9475
|
const renderColumn = (columnElement, index) => {
|
|
9438
9476
|
const isUsingDataTableCell = columnElement && typeof columnElement === 'object' && 'type' in columnElement && (columnElement == null ? void 0 : columnElement.type) === DataTableCell;
|
|
@@ -9523,7 +9561,7 @@ const calculateScrollState = scrollContainer => {
|
|
|
9523
9561
|
return DATA_TABLE_SCROLL_STATES.NO_SCROLL;
|
|
9524
9562
|
};
|
|
9525
9563
|
|
|
9526
|
-
var styles$
|
|
9564
|
+
var styles$C = {"data-table-sticky-columns-container":"_j5iVD","data-table-sticky-columns-container--with-left-sticky-columns-and-shadow":"_7dAEd","data-table-sticky-columns-container--no-shadow":"_rR4W3","fadein":"_b1-OB","data-table-sticky-columns-container--with-left-sticky-columns":"_qLE4I","data-table-sticky-columns-container--with-right-sticky-columns-and-shadow":"_B92Ir","data-table-sticky-columns-container--with-right-sticky-columns":"_ONjpl","data-table-sticky-columns-container--with-footer":"_DE3fh"};
|
|
9527
9565
|
|
|
9528
9566
|
const useDataTableScrollState = stickyColumns => {
|
|
9529
9567
|
const scrollContainerRef = useRef(null);
|
|
@@ -9565,7 +9603,7 @@ const useDataTableScrollState = stickyColumns => {
|
|
|
9565
9603
|
};
|
|
9566
9604
|
};
|
|
9567
9605
|
|
|
9568
|
-
var styles$
|
|
9606
|
+
var styles$B = {"data-table-cover-shadow":"_4XrxW","data-table-cover-shadow--left":"_k704p","data-table-cover-shadow--left-shadow":"_VXlf0","fadeinshadowleft":"_Fr-av","data-table-cover-shadow--right":"_wOust","data-table-cover-shadow--right-shadow":"_b3Rzx","fadeinshadowright":"_KgJaq"};
|
|
9569
9607
|
|
|
9570
9608
|
const DataTableCoverShadow = ({
|
|
9571
9609
|
isShowingColumns,
|
|
@@ -9583,11 +9621,11 @@ const DataTableCoverShadow = ({
|
|
|
9583
9621
|
return `calc(100% - ${headerHeight})`;
|
|
9584
9622
|
};
|
|
9585
9623
|
return React__default.createElement("div", {
|
|
9586
|
-
className: classnames(styles$
|
|
9587
|
-
[styles$
|
|
9588
|
-
[styles$
|
|
9589
|
-
[styles$
|
|
9590
|
-
[styles$
|
|
9624
|
+
className: classnames(styles$B['data-table-cover-shadow'], {
|
|
9625
|
+
[styles$B['data-table-cover-shadow--left']]: direction === 'left',
|
|
9626
|
+
[styles$B['data-table-cover-shadow--left-shadow']]: direction === 'left' && showShadow,
|
|
9627
|
+
[styles$B['data-table-cover-shadow--right']]: direction === 'right',
|
|
9628
|
+
[styles$B['data-table-cover-shadow--right-shadow']]: direction === 'right' && showShadow
|
|
9591
9629
|
}),
|
|
9592
9630
|
style: {
|
|
9593
9631
|
// @ts-expect-error This difines a custom CSS variable
|
|
@@ -9649,13 +9687,13 @@ const DataTableStickyColumnsContainer = ({
|
|
|
9649
9687
|
isShowingColumns: !!isShowingColumns,
|
|
9650
9688
|
showShadow: state === 'EMPTY' ? false : stickyColumns === 'left'
|
|
9651
9689
|
})), React__default.createElement("div", {
|
|
9652
|
-
className: classnames(styles$
|
|
9653
|
-
[styles$
|
|
9654
|
-
[styles$
|
|
9655
|
-
[styles$
|
|
9656
|
-
[styles$
|
|
9657
|
-
[styles$
|
|
9658
|
-
[styles$
|
|
9690
|
+
className: classnames(styles$C[containerClassName], {
|
|
9691
|
+
[styles$C[`${containerClassName}--with-footer`]]: isShowingFooter,
|
|
9692
|
+
[styles$C[`${containerClassName}--with-left-sticky-columns`]]: hasLeftColumnSticky,
|
|
9693
|
+
[styles$C[`${containerClassName}--with-left-sticky-columns-and-shadow`]]: state !== 'EMPTY' ? hasLeftColumnSticky && hasScrollOnLeft : false,
|
|
9694
|
+
[styles$C[`${containerClassName}--with-right-sticky-columns`]]: hasRightColumnSticky,
|
|
9695
|
+
[styles$C[`${containerClassName}--with-right-sticky-columns-and-shadow`]]: state !== 'EMPTY' ? hasRightColumnSticky && hasScrollOnRight : false,
|
|
9696
|
+
[styles$C[`${containerClassName}--no-shadow`]]: noShadow
|
|
9659
9697
|
}),
|
|
9660
9698
|
onScroll: onScroll,
|
|
9661
9699
|
ref: scrollContainerRef,
|
|
@@ -9663,11 +9701,11 @@ const DataTableStickyColumnsContainer = ({
|
|
|
9663
9701
|
}, children));
|
|
9664
9702
|
};
|
|
9665
9703
|
|
|
9666
|
-
var styles$
|
|
9704
|
+
var styles$A = {"data-table-empty-state":"_fCHjG"};
|
|
9667
9705
|
|
|
9668
|
-
var styles$
|
|
9706
|
+
var styles$z = {"empty-state-container-stack":"_4nO7T","empty-state-container-stack__content":"_KiEVo","empty-state-container-stack__content--full-page":"_ib04g","empty-state-container-stack__content--inline-horizontal":"_bSiJj","empty-state-container-stack__body":"_mi-dC"};
|
|
9669
9707
|
|
|
9670
|
-
var styles$
|
|
9708
|
+
var styles$y = {"empty-state-container-cta":"_X-dEs","empty-state-container-cta--inside-modal":"_63-SX"};
|
|
9671
9709
|
|
|
9672
9710
|
const EmptyStateContainerCTA = ({
|
|
9673
9711
|
isPaywall,
|
|
@@ -9684,8 +9722,8 @@ const EmptyStateContainerCTA = ({
|
|
|
9684
9722
|
size: BUTTON_SIZES.MIN_WIDTH_100
|
|
9685
9723
|
});
|
|
9686
9724
|
return React__default.createElement("div", {
|
|
9687
|
-
className: classnames(styles$
|
|
9688
|
-
[styles$
|
|
9725
|
+
className: classnames(styles$y['empty-state-container-cta'], {
|
|
9726
|
+
[styles$y['empty-state-container-cta--inside-modal']]: _isInsideModal
|
|
9689
9727
|
})
|
|
9690
9728
|
}, primaryButton, secondaryButton);
|
|
9691
9729
|
};
|
|
@@ -9702,7 +9740,7 @@ const EmptyStateContainerStack = ({
|
|
|
9702
9740
|
mediaComponent
|
|
9703
9741
|
}) => {
|
|
9704
9742
|
return React__default.createElement("div", {
|
|
9705
|
-
className: styles$
|
|
9743
|
+
className: styles$z['empty-state-container-stack'],
|
|
9706
9744
|
"data-testid": testId
|
|
9707
9745
|
}, mediaComponent ? mediaComponent : mediaUrl && React__default.createElement("img", {
|
|
9708
9746
|
src: mediaUrl,
|
|
@@ -9719,7 +9757,7 @@ const EmptyStateContainerStack = ({
|
|
|
9719
9757
|
as: "body",
|
|
9720
9758
|
alignment: "center"
|
|
9721
9759
|
}, title), React__default.createElement("div", {
|
|
9722
|
-
className: styles$
|
|
9760
|
+
className: styles$z['empty-state-container-stack__body']
|
|
9723
9761
|
}, children)), React__default.createElement(Stack, {
|
|
9724
9762
|
space: 8,
|
|
9725
9763
|
alignItems: "center"
|
|
@@ -9830,7 +9868,7 @@ const DataTableEmptyState = ({
|
|
|
9830
9868
|
columnIndex: shouldRenderStickyLeftCell ? 1 : 0,
|
|
9831
9869
|
colSpan: colSpan
|
|
9832
9870
|
}, React__default.createElement("div", {
|
|
9833
|
-
className: styles$
|
|
9871
|
+
className: styles$A['data-table-empty-state']
|
|
9834
9872
|
}, React__default.createElement(EmptyStateContainerStack, {
|
|
9835
9873
|
mediaUrl: customImage,
|
|
9836
9874
|
mediaComponent: customImage === '' ? React__default.createElement(MagnifyingGlassIllustration, null) : undefined,
|
|
@@ -9842,7 +9880,7 @@ const DataTableEmptyState = ({
|
|
|
9842
9880
|
}, ''));
|
|
9843
9881
|
};
|
|
9844
9882
|
|
|
9845
|
-
const _excluded$
|
|
9883
|
+
const _excluded$d = ["items", "columns", "itemComponent", "maxHeight", "hasPrevious", "hasNext", "onPreviousClick", "onNextClick", "onSort", "isLoading", "showActionMenu", "footerComponent", "hasVerticalBorders", "testId", "skeletonRowLayout", "stickyColumns", "emptyState"];
|
|
9846
9884
|
const DataTable = _ref => {
|
|
9847
9885
|
let {
|
|
9848
9886
|
items,
|
|
@@ -9863,7 +9901,7 @@ const DataTable = _ref => {
|
|
|
9863
9901
|
stickyColumns,
|
|
9864
9902
|
emptyState
|
|
9865
9903
|
} = _ref,
|
|
9866
|
-
otherProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
9904
|
+
otherProps = _objectWithoutPropertiesLoose(_ref, _excluded$d);
|
|
9867
9905
|
const {
|
|
9868
9906
|
dataProps
|
|
9869
9907
|
} = getDataProps(otherProps);
|
|
@@ -9986,7 +10024,7 @@ const DataTable = _ref => {
|
|
|
9986
10024
|
})), React__default.createElement(Pagination, null));
|
|
9987
10025
|
};
|
|
9988
10026
|
|
|
9989
|
-
var styles$
|
|
10027
|
+
var styles$x = {"accordion-item":"_8980Z","accordion-item__link":"_C-YV6","accordion-item__header":"_vk-N-","accordion-item__icon":"_LSVms","accordion-item__icon--active":"_hLMLR","accordion-item__content":"_KFyFh","accordion-item__content--active":"_kykXP"};
|
|
9990
10028
|
|
|
9991
10029
|
const AccordionItem = props => {
|
|
9992
10030
|
const {
|
|
@@ -10001,9 +10039,9 @@ const AccordionItem = props => {
|
|
|
10001
10039
|
} = item;
|
|
10002
10040
|
const isFocusedByClickRef = React__default.useRef(false);
|
|
10003
10041
|
return React__default.createElement("div", {
|
|
10004
|
-
className: styles$
|
|
10042
|
+
className: styles$x['accordion-item']
|
|
10005
10043
|
}, React__default.createElement("button", {
|
|
10006
|
-
className: styles$
|
|
10044
|
+
className: styles$x['accordion-item__header'],
|
|
10007
10045
|
onClick: () => {
|
|
10008
10046
|
if (isOpen) {
|
|
10009
10047
|
handleAccordionItemOpen(null);
|
|
@@ -10031,17 +10069,17 @@ const AccordionItem = props => {
|
|
|
10031
10069
|
color: "grey-500",
|
|
10032
10070
|
emphasis: "bold"
|
|
10033
10071
|
}, title), React__default.createElement(IconChevronDown, {
|
|
10034
|
-
className: styles$
|
|
10072
|
+
className: styles$x[`accordion-item__icon${isOpen ? '--active' : ''}`],
|
|
10035
10073
|
color: 'grey-400'
|
|
10036
10074
|
}))), React__default.createElement("div", {
|
|
10037
10075
|
"data-testid": `${isOpen ? 'accordion-item-' + id + '-open' : 'accordion-item-' + id + '-closed'}`,
|
|
10038
|
-
className: styles$
|
|
10076
|
+
className: styles$x[`accordion-item__content${isOpen ? '--active' : ''}`]
|
|
10039
10077
|
}, isOpen && React__default.createElement(Text, {
|
|
10040
10078
|
color: "grey-500"
|
|
10041
10079
|
}, content)));
|
|
10042
10080
|
};
|
|
10043
10081
|
|
|
10044
|
-
var styles$
|
|
10082
|
+
var styles$w = {"accordion":"_058SP"};
|
|
10045
10083
|
|
|
10046
10084
|
const Accordion = props => {
|
|
10047
10085
|
const {
|
|
@@ -10061,7 +10099,7 @@ const Accordion = props => {
|
|
|
10061
10099
|
isAccordionMounted: true
|
|
10062
10100
|
}
|
|
10063
10101
|
}, React__default.createElement("div", {
|
|
10064
|
-
className: styles$
|
|
10102
|
+
className: styles$w['accordion']
|
|
10065
10103
|
}, items.map((item, index) => {
|
|
10066
10104
|
const id = item.id || index.toString();
|
|
10067
10105
|
return React__default.createElement(AccordionItem, {
|
|
@@ -10075,7 +10113,7 @@ const Accordion = props => {
|
|
|
10075
10113
|
})));
|
|
10076
10114
|
};
|
|
10077
10115
|
|
|
10078
|
-
var styles$
|
|
10116
|
+
var styles$v = {"action-list":"_pWke5","action-list__title":"_p8I7K","action-list__empty-state":"_l-tFB"};
|
|
10079
10117
|
|
|
10080
10118
|
const ActionList = ({
|
|
10081
10119
|
children,
|
|
@@ -10086,15 +10124,15 @@ const ActionList = ({
|
|
|
10086
10124
|
}) => {
|
|
10087
10125
|
const translate = useTranslation('ActionList');
|
|
10088
10126
|
return React__default.createElement("div", {
|
|
10089
|
-
className: styles$
|
|
10127
|
+
className: styles$v['action-list'],
|
|
10090
10128
|
"data-testid": testId,
|
|
10091
10129
|
style: {
|
|
10092
10130
|
maxHeight: maxHeight
|
|
10093
10131
|
}
|
|
10094
10132
|
}, title && React__default.createElement("div", {
|
|
10095
|
-
className: styles$
|
|
10133
|
+
className: styles$v['action-list__title']
|
|
10096
10134
|
}, title), children ? children : React__default.createElement("div", {
|
|
10097
|
-
className: styles$
|
|
10135
|
+
className: styles$v['action-list__empty-state']
|
|
10098
10136
|
}, React__default.createElement(EmptyStateContainerStack, {
|
|
10099
10137
|
title: (emptyState == null ? void 0 : emptyState.title) || translate('emptyStateTitle'),
|
|
10100
10138
|
mediaUrl: emptyState == null ? void 0 : emptyState.image,
|
|
@@ -10255,21 +10293,21 @@ const useSelectFieldControllers = ({
|
|
|
10255
10293
|
return controllers;
|
|
10256
10294
|
};
|
|
10257
10295
|
|
|
10258
|
-
var styles$
|
|
10296
|
+
var styles$u = {"custom-control":"_pXQqq"};
|
|
10259
10297
|
|
|
10260
|
-
const _excluded$
|
|
10298
|
+
const _excluded$c = ["children"];
|
|
10261
10299
|
function CustomControl(_ref) {
|
|
10262
10300
|
var _props$getValue;
|
|
10263
10301
|
let {
|
|
10264
10302
|
children
|
|
10265
10303
|
} = _ref,
|
|
10266
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
10304
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$c);
|
|
10267
10305
|
const {
|
|
10268
10306
|
SelectedOptionPrefix
|
|
10269
10307
|
} = props.selectProps.componentsProps;
|
|
10270
10308
|
const selectedOption = (_props$getValue = props.getValue()) == null ? void 0 : _props$getValue[0];
|
|
10271
10309
|
return React__default.createElement(components.Control, _extends({}, props), SelectedOptionPrefix && selectedOption ? React__default.createElement("div", {
|
|
10272
|
-
className: styles$
|
|
10310
|
+
className: styles$u['custom-control'],
|
|
10273
10311
|
style: {
|
|
10274
10312
|
paddingLeft: selectedOption ? 8 : 0
|
|
10275
10313
|
}
|
|
@@ -10282,12 +10320,12 @@ function CustomControl(_ref) {
|
|
|
10282
10320
|
}, props)), children)) : children);
|
|
10283
10321
|
}
|
|
10284
10322
|
|
|
10285
|
-
const _excluded$
|
|
10323
|
+
const _excluded$b = ["children"];
|
|
10286
10324
|
function CustomOption(_ref) {
|
|
10287
10325
|
let {
|
|
10288
10326
|
children
|
|
10289
10327
|
} = _ref,
|
|
10290
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
10328
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$b);
|
|
10291
10329
|
const {
|
|
10292
10330
|
UserCustomOption
|
|
10293
10331
|
} = props.selectProps.componentsProps;
|
|
@@ -10431,14 +10469,14 @@ const CustomContainer = props => {
|
|
|
10431
10469
|
}));
|
|
10432
10470
|
};
|
|
10433
10471
|
|
|
10434
|
-
var styles$
|
|
10472
|
+
var styles$t = {"custom-menu-text-field":"_AAUjm","custom-menu-hr":"_mFLK9","custom-menu-div":"_1XpI4"};
|
|
10435
10473
|
|
|
10436
|
-
const _excluded$
|
|
10474
|
+
const _excluded$a = ["children"];
|
|
10437
10475
|
function CustomMenu(_ref) {
|
|
10438
10476
|
let {
|
|
10439
10477
|
children
|
|
10440
10478
|
} = _ref,
|
|
10441
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
10479
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$a);
|
|
10442
10480
|
const {
|
|
10443
10481
|
creatableButton,
|
|
10444
10482
|
onMenuInputFocus,
|
|
@@ -10498,15 +10536,15 @@ function CustomMenu(_ref) {
|
|
|
10498
10536
|
return React__default.createElement(components.Menu, _extends({}, props), React__default.createElement("div", {
|
|
10499
10537
|
ref: containerRef
|
|
10500
10538
|
}, children, React__default.createElement("hr", {
|
|
10501
|
-
className: styles$
|
|
10539
|
+
className: styles$t['custom-menu-hr']
|
|
10502
10540
|
}), !showFooter ? React__default.createElement(CreatableButton, null) : React__default.createElement("div", {
|
|
10503
|
-
className: styles$
|
|
10541
|
+
className: styles$t['custom-menu-div']
|
|
10504
10542
|
}, React__default.createElement(Flex, {
|
|
10505
10543
|
space: 4,
|
|
10506
10544
|
flex: [1],
|
|
10507
10545
|
flexItems: true
|
|
10508
10546
|
}, React__default.createElement("input", {
|
|
10509
|
-
className: classnames(styles$12['text-field'], styles$
|
|
10547
|
+
className: classnames(styles$12['text-field'], styles$t['custom-menu-text-field']),
|
|
10510
10548
|
autoCorrect: "off",
|
|
10511
10549
|
autoComplete: "off",
|
|
10512
10550
|
spellCheck: "false",
|
|
@@ -10542,7 +10580,7 @@ function CustomMenu(_ref) {
|
|
|
10542
10580
|
}, __('createButton'))))));
|
|
10543
10581
|
}
|
|
10544
10582
|
|
|
10545
|
-
const _excluded$
|
|
10583
|
+
const _excluded$9 = ["asToolbarFilter", "caption", "disabled", "error", "id", "isClearable", "label", "menuShouldScrollIntoView", "name", "noOptionsMessage", "options", "onBlur", "onChange", "placeholder", "value", "defaultValue", "CustomOption", "SelectedOptionPrefix", "testId", "creatableButton", "onCreate", "isSearchable", "autoFocus"];
|
|
10546
10584
|
const useSelectField = _ref => {
|
|
10547
10585
|
let {
|
|
10548
10586
|
asToolbarFilter = false,
|
|
@@ -10569,7 +10607,7 @@ const useSelectField = _ref => {
|
|
|
10569
10607
|
isSearchable = true,
|
|
10570
10608
|
autoFocus
|
|
10571
10609
|
} = _ref,
|
|
10572
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
10610
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$9);
|
|
10573
10611
|
const [isMenuInputFocus, setIsMenuInputFocus] = useState(false);
|
|
10574
10612
|
const onMenuInputFocus = isFocused => setIsMenuInputFocus(isFocused);
|
|
10575
10613
|
const controllers = useSelectFieldControllers({
|
|
@@ -10641,7 +10679,7 @@ const useSelectField = _ref => {
|
|
|
10641
10679
|
};
|
|
10642
10680
|
};
|
|
10643
10681
|
|
|
10644
|
-
var styles$
|
|
10682
|
+
var styles$s = {"select-field__suffix":"_vqC1M"};
|
|
10645
10683
|
|
|
10646
10684
|
/** Component to make possible choose from a predefined options. */
|
|
10647
10685
|
const SelectField = props => {
|
|
@@ -10651,7 +10689,7 @@ const SelectField = props => {
|
|
|
10651
10689
|
} = useSelectField(props);
|
|
10652
10690
|
//Select field has the chevron icon as suffix, so we need to add a margin to the suffix to avoid overlapping with the chevron icon
|
|
10653
10691
|
const suffixWithMargin = props.suffix ? React__default.createElement("div", {
|
|
10654
|
-
className: styles$
|
|
10692
|
+
className: styles$s['select-field__suffix']
|
|
10655
10693
|
}, props.suffix) : undefined;
|
|
10656
10694
|
return React__default.createElement(Field, _extends({}, fieldProps), React__default.createElement(AffixContainer, {
|
|
10657
10695
|
prefix: props.prefix,
|
|
@@ -10693,9 +10731,9 @@ const ToolbarSelect = ({
|
|
|
10693
10731
|
});
|
|
10694
10732
|
};
|
|
10695
10733
|
|
|
10696
|
-
var styles$
|
|
10734
|
+
var styles$r = {"date-filter":"_PyXfe","date-filter--wide":"_P6ttU"};
|
|
10697
10735
|
|
|
10698
|
-
var styles$
|
|
10736
|
+
var styles$q = {"date-filter-display":"_N37zE","date-filter-display--non-interactive":"_42Bvz","date-filter-display--wide":"_h8n2w","date-filter-display__display-icon":"_i08yV"};
|
|
10699
10737
|
|
|
10700
10738
|
const DATE_FILTER_MODE = {
|
|
10701
10739
|
DAY: 'day',
|
|
@@ -10749,9 +10787,9 @@ const DateFilterDisplay = forwardRef(({
|
|
|
10749
10787
|
onClick
|
|
10750
10788
|
}, ref) => {
|
|
10751
10789
|
return React__default.createElement("button", {
|
|
10752
|
-
className: classnames(styles$
|
|
10753
|
-
[styles$
|
|
10754
|
-
[styles$
|
|
10790
|
+
className: classnames(styles$q['date-filter-display'], {
|
|
10791
|
+
[styles$q['date-filter-display--wide']]: mode === DATE_FILTER_MODE.WEEK,
|
|
10792
|
+
[styles$q['date-filter-display--non-interactive']]: mode === DATE_FILTER_MODE.MONTH
|
|
10755
10793
|
}),
|
|
10756
10794
|
onClick: onClick,
|
|
10757
10795
|
tabIndex: mode === DATE_FILTER_MODE.MONTH ? -1 : undefined,
|
|
@@ -10760,7 +10798,7 @@ const DateFilterDisplay = forwardRef(({
|
|
|
10760
10798
|
space: 12,
|
|
10761
10799
|
alignItems: "center"
|
|
10762
10800
|
}, React__default.createElement("div", {
|
|
10763
|
-
className: classnames(styles$
|
|
10801
|
+
className: classnames(styles$q['date-filter-display__display-icon'])
|
|
10764
10802
|
}, React__default.createElement(IconCalendarAlt, {
|
|
10765
10803
|
size: "flexible",
|
|
10766
10804
|
color: "grey-400"
|
|
@@ -10771,7 +10809,7 @@ const DateFilterDisplay = forwardRef(({
|
|
|
10771
10809
|
})));
|
|
10772
10810
|
});
|
|
10773
10811
|
|
|
10774
|
-
var styles$
|
|
10812
|
+
var styles$p = {"date-stepper":"_9wFtw","date-stepper--backward":"_OrtcR","date-stepper--forward":"_oYoUt"};
|
|
10775
10813
|
|
|
10776
10814
|
const handleDateStepper = (date, mode, stepDirection, onChange) => {
|
|
10777
10815
|
const step = stepDirection === STEP_DIRECTION.FORWARD ? 1 : -1;
|
|
@@ -10800,9 +10838,9 @@ const DateFilterStepper = ({
|
|
|
10800
10838
|
date
|
|
10801
10839
|
}) => {
|
|
10802
10840
|
return React__default.createElement("button", {
|
|
10803
|
-
className: classnames(styles$
|
|
10804
|
-
[styles$
|
|
10805
|
-
[styles$
|
|
10841
|
+
className: classnames(styles$p['date-stepper'], {
|
|
10842
|
+
[styles$p['date-stepper--backward']]: stepDirection === STEP_DIRECTION.BACKWARD,
|
|
10843
|
+
[styles$p['date-stepper--forward']]: stepDirection === STEP_DIRECTION.FORWARD
|
|
10806
10844
|
}),
|
|
10807
10845
|
onClick: () => handleDateStepper(date, mode, stepDirection, onChange)
|
|
10808
10846
|
}, children);
|
|
@@ -10824,8 +10862,8 @@ const DateFilter = ({
|
|
|
10824
10862
|
const onClickOutside = useCallback(() => setCalendarOpen(false), [setCalendarOpen]);
|
|
10825
10863
|
return React__default.createElement("div", {
|
|
10826
10864
|
"data-testid": testId,
|
|
10827
|
-
className: classnames(styles$
|
|
10828
|
-
[styles$
|
|
10865
|
+
className: classnames(styles$r['date-filter'], {
|
|
10866
|
+
[styles$r['date-filter--wide']]: _mode === DATE_FILTER_MODE.WEEK
|
|
10829
10867
|
})
|
|
10830
10868
|
}, React__default.createElement(Inline, {
|
|
10831
10869
|
space: 0
|
|
@@ -10862,7 +10900,7 @@ const DateFilter = ({
|
|
|
10862
10900
|
}));
|
|
10863
10901
|
};
|
|
10864
10902
|
|
|
10865
|
-
var styles$
|
|
10903
|
+
var styles$o = {"segmented-control":"_RezMY","segmented-control__button":"_lehFG","segmented-control__button--selected":"_Fr5kb","segmented-control__divider":"_GEqG9"};
|
|
10866
10904
|
|
|
10867
10905
|
const SegmentedControl = ({
|
|
10868
10906
|
options,
|
|
@@ -10877,23 +10915,23 @@ const SegmentedControl = ({
|
|
|
10877
10915
|
return index === options.length - 1;
|
|
10878
10916
|
};
|
|
10879
10917
|
return React__default.createElement("div", {
|
|
10880
|
-
className: styles$
|
|
10918
|
+
className: styles$o['segmented-control'],
|
|
10881
10919
|
"data-testid": testId
|
|
10882
10920
|
}, options.map((option, i) => React__default.createElement(React__default.Fragment, {
|
|
10883
10921
|
key: option
|
|
10884
10922
|
}, React__default.createElement("button", {
|
|
10885
10923
|
onClick: () => onChange(option),
|
|
10886
|
-
className: classnames(styles$
|
|
10887
|
-
[styles$
|
|
10924
|
+
className: classnames(styles$o['segmented-control__button'], {
|
|
10925
|
+
[styles$o['segmented-control__button--selected']]: isSelected(option)
|
|
10888
10926
|
})
|
|
10889
10927
|
}, option), !isLastElement(i) && React__default.createElement("div", {
|
|
10890
|
-
className: classnames(styles$
|
|
10928
|
+
className: classnames(styles$o['segmented-control__divider'])
|
|
10891
10929
|
}))));
|
|
10892
10930
|
};
|
|
10893
10931
|
|
|
10894
|
-
var styles$
|
|
10932
|
+
var styles$n = {"form--standard-size":"_8-Ykj"};
|
|
10895
10933
|
|
|
10896
|
-
var styles$
|
|
10934
|
+
var styles$m = {"form-section":"_3uYIj","form-section__title":"_2WdOf","form-section__subtitle":"_zybxx","form-section--no-margin":"_xT-U1"};
|
|
10897
10935
|
|
|
10898
10936
|
const FormSection = ({
|
|
10899
10937
|
children,
|
|
@@ -10906,13 +10944,13 @@ const FormSection = ({
|
|
|
10906
10944
|
const content = React__default.createElement(Stack, null, (title || subtitle) && React__default.createElement(Stack, {
|
|
10907
10945
|
space: 8
|
|
10908
10946
|
}, title && React__default.createElement("h2", {
|
|
10909
|
-
className: classnames(styles$
|
|
10947
|
+
className: classnames(styles$m['form-section__title'])
|
|
10910
10948
|
}, title), subtitle && React__default.createElement("h3", {
|
|
10911
|
-
className: classnames(styles$
|
|
10949
|
+
className: classnames(styles$m['form-section__subtitle'])
|
|
10912
10950
|
}, subtitle)), children);
|
|
10913
10951
|
return React__default.createElement("div", {
|
|
10914
|
-
className: classnames(styles$
|
|
10915
|
-
[styles$
|
|
10952
|
+
className: classnames(styles$m['form-section'], {
|
|
10953
|
+
[styles$m['form-section--no-margin']]: _noMargin || as === 'card'
|
|
10916
10954
|
}),
|
|
10917
10955
|
"data-testid": testId
|
|
10918
10956
|
}, as === 'card' ? React__default.createElement(Card, {
|
|
@@ -10932,7 +10970,7 @@ const updateButtonProps = (child, newProps) => {
|
|
|
10932
10970
|
}, newProps, child.props));
|
|
10933
10971
|
};
|
|
10934
10972
|
|
|
10935
|
-
var styles$
|
|
10973
|
+
var styles$l = {"form-footer":"_4ksfB"};
|
|
10936
10974
|
|
|
10937
10975
|
const FormFooterActions = ({
|
|
10938
10976
|
actions
|
|
@@ -10968,7 +11006,7 @@ const FormFooter = ({
|
|
|
10968
11006
|
});
|
|
10969
11007
|
const isInlineChildren = React__default.Children.count(children) === 1 && React__default.isValidElement(children) && children.type === Inline;
|
|
10970
11008
|
return React__default.createElement("div", {
|
|
10971
|
-
className: classnames(styles$
|
|
11009
|
+
className: classnames(styles$l['form-footer']),
|
|
10972
11010
|
"data-testid": testId
|
|
10973
11011
|
}, actions && React__default.createElement(FormFooterActions, {
|
|
10974
11012
|
actions: actions
|
|
@@ -11006,13 +11044,13 @@ const Form = ({
|
|
|
11006
11044
|
}, React__default.createElement("form", {
|
|
11007
11045
|
onSubmit: onSubmit ? handleSubmit : formik == null ? void 0 : formik.handleSubmit,
|
|
11008
11046
|
className: classnames({
|
|
11009
|
-
[styles$
|
|
11047
|
+
[styles$n['form--standard-size']]: !_wide
|
|
11010
11048
|
}),
|
|
11011
11049
|
"data-testid": testId
|
|
11012
11050
|
}, _stackContent ? React__default.createElement(Stack, null, formattedChildren) : formattedChildren));
|
|
11013
11051
|
};
|
|
11014
11052
|
|
|
11015
|
-
var styles$
|
|
11053
|
+
var styles$k = {"form-row":"_xX-RS"};
|
|
11016
11054
|
|
|
11017
11055
|
const SIZE_25_PERCENT = '25%';
|
|
11018
11056
|
const SIZE_33_PERCENT = '33.333%';
|
|
@@ -11039,14 +11077,14 @@ const FormRow = ({
|
|
|
11039
11077
|
space: _space,
|
|
11040
11078
|
testId: testId,
|
|
11041
11079
|
alignItems: "stretch",
|
|
11042
|
-
extraClass: styles$
|
|
11080
|
+
extraClass: styles$k['form-row']
|
|
11043
11081
|
}, children, additionalColumns.map((_, index) => React__default.createElement("span", {
|
|
11044
11082
|
key: index,
|
|
11045
11083
|
"data-testid": "empty-cell"
|
|
11046
11084
|
})));
|
|
11047
11085
|
};
|
|
11048
11086
|
|
|
11049
|
-
var styles$
|
|
11087
|
+
var styles$j = {"text-field":"_JaB08","text-field--focus":"_62RIR","text-field--disabled":"_CDt23","text-field--invalid":"_wf4XP","text-field__toolbar":"_7xVsj"};
|
|
11050
11088
|
|
|
11051
11089
|
const useGrowTextAreaRef = (minHeight, maxHeight, autoGrow, forwardedRef) => {
|
|
11052
11090
|
const textareaRef = useRef(null);
|
|
@@ -11115,10 +11153,10 @@ const TextAreaField = ({
|
|
|
11115
11153
|
return React__default.createElement(Field, _extends({}, fieldProps, {
|
|
11116
11154
|
characterCount: controllers.value !== undefined && maxLength ? maxLength - controllers.value.length : undefined
|
|
11117
11155
|
}), React__default.createElement("div", {
|
|
11118
|
-
className: classnames(styles$
|
|
11119
|
-
[styles$
|
|
11120
|
-
[styles$
|
|
11121
|
-
[styles$
|
|
11156
|
+
className: classnames(styles$j['text-field'], {
|
|
11157
|
+
[styles$j['text-field--invalid']]: hasError,
|
|
11158
|
+
[styles$j['text-field--disabled']]: disabled,
|
|
11159
|
+
[styles$j['text-field--focus']]: hasFocus
|
|
11122
11160
|
}),
|
|
11123
11161
|
ref: containerRef,
|
|
11124
11162
|
onClick: event => {
|
|
@@ -11150,7 +11188,7 @@ const TextAreaField = ({
|
|
|
11150
11188
|
ref: textAreaRef,
|
|
11151
11189
|
maxLength: maxLength
|
|
11152
11190
|
}), toolbar && React__default.createElement("div", {
|
|
11153
|
-
className: styles$
|
|
11191
|
+
className: styles$j['text-field__toolbar'],
|
|
11154
11192
|
id: `${controllers.id}-toolbar`,
|
|
11155
11193
|
ref: toolbarRef,
|
|
11156
11194
|
onClick: event => {
|
|
@@ -11162,13 +11200,13 @@ const TextAreaField = ({
|
|
|
11162
11200
|
}, toolbar)));
|
|
11163
11201
|
};
|
|
11164
11202
|
|
|
11165
|
-
const _excluded$
|
|
11203
|
+
const _excluded$8 = ["prefix", "suffix"];
|
|
11166
11204
|
const TextFieldElement = (_ref, ref) => {
|
|
11167
11205
|
let {
|
|
11168
11206
|
prefix,
|
|
11169
11207
|
suffix
|
|
11170
11208
|
} = _ref,
|
|
11171
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
11209
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$8);
|
|
11172
11210
|
const {
|
|
11173
11211
|
inputProps,
|
|
11174
11212
|
fieldProps
|
|
@@ -11184,7 +11222,7 @@ const TextFieldElement = (_ref, ref) => {
|
|
|
11184
11222
|
};
|
|
11185
11223
|
const TextField = forwardRef(TextFieldElement);
|
|
11186
11224
|
|
|
11187
|
-
var styles$
|
|
11225
|
+
var styles$i = {"pill-select-field":"_Yti6k","pill-select-field__creating-input":"_dw-VP","pill-select-field__custom-input":"_JXakU","pill-select-field__add-new-input":"_MsKVV","pill-select-field__creating-custom-input":"_ZxEwG","pill-select-field__removable-icon":"_Odw1V"};
|
|
11188
11226
|
|
|
11189
11227
|
const useMultiSelectFieldControllers = ({
|
|
11190
11228
|
name,
|
|
@@ -11249,10 +11287,10 @@ const CreatableOption = ({
|
|
|
11249
11287
|
};
|
|
11250
11288
|
return React__default.createElement(React__default.Fragment, null, !isCreatingOption && React__default.createElement("div", {
|
|
11251
11289
|
key: 'pill-select-field-create-option',
|
|
11252
|
-
className: styles$
|
|
11290
|
+
className: styles$i['pill-select-field']
|
|
11253
11291
|
}, React__default.createElement("button", {
|
|
11254
11292
|
"data-testid": testId ? `${testId}-create-option` : undefined,
|
|
11255
|
-
className: styles$
|
|
11293
|
+
className: styles$i['pill-select-field__add-new-input'],
|
|
11256
11294
|
onClick: () => {
|
|
11257
11295
|
setIsCreatingOption(true);
|
|
11258
11296
|
setNewOptionLabel('');
|
|
@@ -11261,9 +11299,9 @@ const CreatableOption = ({
|
|
|
11261
11299
|
size: "small"
|
|
11262
11300
|
}), createOptionLabel)), isCreatingOption && React__default.createElement("div", {
|
|
11263
11301
|
key: 'pill-select-field-creating-option',
|
|
11264
|
-
className: styles$
|
|
11302
|
+
className: styles$i['pill-select-field']
|
|
11265
11303
|
}, React__default.createElement("input", {
|
|
11266
|
-
className: styles$
|
|
11304
|
+
className: styles$i['pill-select-field__creating-input'],
|
|
11267
11305
|
name: `${name}-pill-select-field-creating-option`,
|
|
11268
11306
|
id: 'pill-select-field-creating-option',
|
|
11269
11307
|
type: "text",
|
|
@@ -11284,7 +11322,7 @@ const CreatableOption = ({
|
|
|
11284
11322
|
}
|
|
11285
11323
|
}
|
|
11286
11324
|
}), React__default.createElement("span", {
|
|
11287
|
-
className: styles$
|
|
11325
|
+
className: styles$i['pill-select-field__creating-custom-input']
|
|
11288
11326
|
}, !newOptionLabel && React__default.createElement(Text, {
|
|
11289
11327
|
as: "body",
|
|
11290
11328
|
color: "grey-300"
|
|
@@ -11335,7 +11373,7 @@ const PillSelectField = ({
|
|
|
11335
11373
|
}
|
|
11336
11374
|
};
|
|
11337
11375
|
return React__default.createElement("button", {
|
|
11338
|
-
className: styles$
|
|
11376
|
+
className: styles$i['pill-select-field__removable-icon'],
|
|
11339
11377
|
onClick: handleClick
|
|
11340
11378
|
}, React__default.createElement(IconTimes, {
|
|
11341
11379
|
size: "small"
|
|
@@ -11351,7 +11389,7 @@ const PillSelectField = ({
|
|
|
11351
11389
|
const itemId = `${controllers.id}-${itemIdentifier}`;
|
|
11352
11390
|
return React__default.createElement("div", {
|
|
11353
11391
|
key: itemIdentifier,
|
|
11354
|
-
className: styles$
|
|
11392
|
+
className: styles$i['pill-select-field']
|
|
11355
11393
|
}, React__default.createElement("input", {
|
|
11356
11394
|
name: `${name}-${itemIdentifier}`,
|
|
11357
11395
|
id: itemId,
|
|
@@ -11371,7 +11409,7 @@ const PillSelectField = ({
|
|
|
11371
11409
|
controllers.onChange(newValue);
|
|
11372
11410
|
}
|
|
11373
11411
|
}), React__default.createElement("span", {
|
|
11374
|
-
className: styles$
|
|
11412
|
+
className: styles$i['pill-select-field__custom-input']
|
|
11375
11413
|
}, option.label, option.isRemovable && React__default.createElement(RemoveButton, {
|
|
11376
11414
|
option: option
|
|
11377
11415
|
})));
|
|
@@ -11420,9 +11458,9 @@ const useRadioGroupFieldContext = () => {
|
|
|
11420
11458
|
return context;
|
|
11421
11459
|
};
|
|
11422
11460
|
|
|
11423
|
-
var styles$
|
|
11461
|
+
var styles$h = {"label":"_xzukU","label--truncate":"_iVWRB","caption":"_JNfQO","radio-group-field__label":"_2KvuU","radio-group-field__caption":"_ZeIOd"};
|
|
11424
11462
|
|
|
11425
|
-
var styles$
|
|
11463
|
+
var styles$g = {"label":"_s7mjc","label--truncate":"_dZjDs","caption":"_JIw-5","radio-group-box-option":"_IIX-P","radio-group-box-option__box":"_P588B","radio-group-box-option__box--disabled":"_Ir3Og","radio-group-box-option__label":"_U--9r","radio-group-box-option__label--disabled":"_Lvxmy","radio-group-box-option__caption":"_NC-bO","radio-group-box-option__caption--disabled":"_04Cjp"};
|
|
11426
11464
|
|
|
11427
11465
|
const RadioGroupBoxOption = ({
|
|
11428
11466
|
value,
|
|
@@ -11439,7 +11477,7 @@ const RadioGroupBoxOption = ({
|
|
|
11439
11477
|
id: inputId
|
|
11440
11478
|
});
|
|
11441
11479
|
return React__default.createElement("label", {
|
|
11442
|
-
className: styles$
|
|
11480
|
+
className: styles$g['radio-group-box-option']
|
|
11443
11481
|
}, React__default.createElement("input", {
|
|
11444
11482
|
type: "radio",
|
|
11445
11483
|
"data-testid": testId,
|
|
@@ -11450,8 +11488,8 @@ const RadioGroupBoxOption = ({
|
|
|
11450
11488
|
checked: radioGroupContext.value !== undefined ? radioGroupContext.value === value : undefined,
|
|
11451
11489
|
disabled: radioGroupContext.disabled || disabled
|
|
11452
11490
|
}), React__default.createElement("div", {
|
|
11453
|
-
className: classnames(styles$
|
|
11454
|
-
[styles$
|
|
11491
|
+
className: classnames(styles$g['radio-group-box-option__box'], {
|
|
11492
|
+
[styles$g['radio-group-box-option__box--disabled']]: radioGroupContext.disabled || disabled
|
|
11455
11493
|
})
|
|
11456
11494
|
}, React__default.createElement(Stack, {
|
|
11457
11495
|
space: 16,
|
|
@@ -11461,17 +11499,17 @@ const RadioGroupBoxOption = ({
|
|
|
11461
11499
|
space: 8,
|
|
11462
11500
|
alignItems: "center"
|
|
11463
11501
|
}, label && React__default.createElement("div", {
|
|
11464
|
-
className: classnames(styles$
|
|
11465
|
-
[styles$
|
|
11502
|
+
className: classnames(styles$g['radio-group-box-option__label'], {
|
|
11503
|
+
[styles$g['radio-group-box-option__label--disabled']]: radioGroupContext.disabled || disabled
|
|
11466
11504
|
})
|
|
11467
11505
|
}, label), caption && React__default.createElement("div", {
|
|
11468
|
-
className: classnames(styles$
|
|
11469
|
-
[styles$
|
|
11506
|
+
className: classnames(styles$g['radio-group-box-option__caption'], {
|
|
11507
|
+
[styles$g['radio-group-box-option__caption--disabled']]: radioGroupContext.disabled || disabled
|
|
11470
11508
|
})
|
|
11471
11509
|
}, caption)))));
|
|
11472
11510
|
};
|
|
11473
11511
|
|
|
11474
|
-
var styles$
|
|
11512
|
+
var styles$f = {"radio-group-option":"_7fVpn","radio-group-option__caption":"_VD7SO","radio-group-option__custom-input":"_Yfxkl"};
|
|
11475
11513
|
|
|
11476
11514
|
/** RadioGroupField form element. */
|
|
11477
11515
|
const RadioGroupOption = ({
|
|
@@ -11493,7 +11531,7 @@ const RadioGroupOption = ({
|
|
|
11493
11531
|
space: 8,
|
|
11494
11532
|
alignItems: "center"
|
|
11495
11533
|
}, React__default.createElement("div", {
|
|
11496
|
-
className: styles$
|
|
11534
|
+
className: styles$f['radio-group-option']
|
|
11497
11535
|
}, React__default.createElement("input", {
|
|
11498
11536
|
type: "radio",
|
|
11499
11537
|
"data-testid": testId,
|
|
@@ -11504,11 +11542,11 @@ const RadioGroupOption = ({
|
|
|
11504
11542
|
checked: radioGroupContext.value !== undefined ? radioGroupContext.value === value : undefined,
|
|
11505
11543
|
disabled: radioGroupContext.disabled || disabled
|
|
11506
11544
|
}), React__default.createElement("span", {
|
|
11507
|
-
className: styles$
|
|
11545
|
+
className: styles$f['radio-group-option__custom-input']
|
|
11508
11546
|
})), label && React__default.createElement(Label, {
|
|
11509
11547
|
htmlFor: id
|
|
11510
11548
|
}, label)), caption && React__default.createElement("div", {
|
|
11511
|
-
className: styles$
|
|
11549
|
+
className: styles$f['radio-group-option__caption']
|
|
11512
11550
|
}, React__default.createElement(Caption, {
|
|
11513
11551
|
fieldId: id
|
|
11514
11552
|
}, caption)));
|
|
@@ -11639,7 +11677,7 @@ const RadioGroupField = ({
|
|
|
11639
11677
|
}, React__default.createElement(Stack, {
|
|
11640
11678
|
space: _space
|
|
11641
11679
|
}, label && React__default.createElement("div", {
|
|
11642
|
-
className: styles$
|
|
11680
|
+
className: styles$h['radio-group-field__label']
|
|
11643
11681
|
}, label), React__default.createElement(Stack, {
|
|
11644
11682
|
space: 8
|
|
11645
11683
|
}, optionsType === OPTION_TYPES.RADIO ? React__default.createElement(RadioOptions, {
|
|
@@ -11651,21 +11689,21 @@ const RadioGroupField = ({
|
|
|
11651
11689
|
testId: testId,
|
|
11652
11690
|
space: _space
|
|
11653
11691
|
}, children), caption && React__default.createElement("div", {
|
|
11654
|
-
className: styles$
|
|
11692
|
+
className: styles$h['radio-group-caption']
|
|
11655
11693
|
}, caption), controllers.error && React__default.createElement(ErrorMessage, null, controllers.error))));
|
|
11656
11694
|
};
|
|
11657
11695
|
|
|
11658
|
-
var styles$
|
|
11696
|
+
var styles$e = {"text-field":"_6Of1F","text-field--invalid":"_NQPNK","text-field--prefixed":"_BpQWQ","text-field--suffixed":"_cpYWb","password-container":"_pAoib","password-toggle":"_WVvS6","password-toggle--disabled":"_G29N3"};
|
|
11659
11697
|
|
|
11660
|
-
var styles$
|
|
11698
|
+
var styles$d = {"password-criteria":"_1ruWK","password-criteria--invalid":"_xR7tb"};
|
|
11661
11699
|
|
|
11662
11700
|
const PasswordCriteria = ({
|
|
11663
11701
|
met,
|
|
11664
11702
|
children
|
|
11665
11703
|
}) => {
|
|
11666
11704
|
return React__default.createElement("span", {
|
|
11667
|
-
className: classnames(styles$
|
|
11668
|
-
[styles$
|
|
11705
|
+
className: classnames(styles$d['password-criteria'], {
|
|
11706
|
+
[styles$d['password-criteria--invalid']]: !met
|
|
11669
11707
|
})
|
|
11670
11708
|
}, React__default.createElement(Inline, {
|
|
11671
11709
|
space: met ? 4 : 8
|
|
@@ -11740,12 +11778,12 @@ const PasswordField = ({
|
|
|
11740
11778
|
error: controllers.error
|
|
11741
11779
|
};
|
|
11742
11780
|
return React__default.createElement(Field, _extends({}, fieldProps), React__default.createElement("div", {
|
|
11743
|
-
className: styles$
|
|
11781
|
+
className: styles$e['password-container']
|
|
11744
11782
|
}, React__default.createElement("input", {
|
|
11745
11783
|
name: name,
|
|
11746
11784
|
id: controllers.id,
|
|
11747
|
-
className: classnames(styles$
|
|
11748
|
-
[styles$
|
|
11785
|
+
className: classnames(styles$e['text-field'], {
|
|
11786
|
+
[styles$e['text-field--invalid']]: hasError
|
|
11749
11787
|
}),
|
|
11750
11788
|
type: type,
|
|
11751
11789
|
"data-testid": testId,
|
|
@@ -11758,8 +11796,8 @@ const PasswordField = ({
|
|
|
11758
11796
|
onChange: controllers.onChange,
|
|
11759
11797
|
onBlur: controllers.onBlur
|
|
11760
11798
|
}), React__default.createElement("div", {
|
|
11761
|
-
className: classnames(styles$
|
|
11762
|
-
[styles$
|
|
11799
|
+
className: classnames(styles$e['password-toggle'], {
|
|
11800
|
+
[styles$e['password-toggle--disabled']]: disabled
|
|
11763
11801
|
}),
|
|
11764
11802
|
onClick: toggleType,
|
|
11765
11803
|
onKeyPress: toggleType,
|
|
@@ -11856,16 +11894,16 @@ const MultiSelectField = ({
|
|
|
11856
11894
|
})));
|
|
11857
11895
|
};
|
|
11858
11896
|
|
|
11859
|
-
var styles$
|
|
11897
|
+
var styles$c = {"custom-list":"_cSkvD"};
|
|
11860
11898
|
|
|
11861
|
-
const _excluded$
|
|
11899
|
+
const _excluded$7 = ["children", "hasMoreOptions", "hasMoreOptionsFirstLoad"];
|
|
11862
11900
|
const CustomList = _ref => {
|
|
11863
11901
|
let {
|
|
11864
11902
|
children,
|
|
11865
11903
|
hasMoreOptions,
|
|
11866
11904
|
hasMoreOptionsFirstLoad
|
|
11867
11905
|
} = _ref,
|
|
11868
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
11906
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$7);
|
|
11869
11907
|
const __ = useTranslation('AsyncSelectField');
|
|
11870
11908
|
let showFooter = hasMoreOptions;
|
|
11871
11909
|
if (props.selectProps.inputValue === '' && typeof hasMoreOptionsFirstLoad === 'boolean') {
|
|
@@ -11874,11 +11912,11 @@ const CustomList = _ref => {
|
|
|
11874
11912
|
return React__default.createElement(components.MenuList, _extends({}, props), React__default.createElement(Fragment, null, children, showFooter && props.options.length > 0 && React__default.createElement(Inline, {
|
|
11875
11913
|
justifyContent: "center"
|
|
11876
11914
|
}, React__default.createElement("div", {
|
|
11877
|
-
className: styles$
|
|
11915
|
+
className: styles$c['custom-list']
|
|
11878
11916
|
}, __('moreOptionsPlaceholder')))));
|
|
11879
11917
|
};
|
|
11880
11918
|
|
|
11881
|
-
const _excluded$
|
|
11919
|
+
const _excluded$6 = ["loadOptions"];
|
|
11882
11920
|
/**
|
|
11883
11921
|
* Component to make possible choose from async options. It looks exactly as the [SelectField](./?path=/docs/forms-selectfield--default) but, this one handles asynchronous options.
|
|
11884
11922
|
* Instead of passing a `options` props, this component requires a `loadOptions` prop.
|
|
@@ -11887,7 +11925,7 @@ const AsyncSelectField = _ref => {
|
|
|
11887
11925
|
let {
|
|
11888
11926
|
loadOptions
|
|
11889
11927
|
} = _ref,
|
|
11890
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
11928
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$6);
|
|
11891
11929
|
const [hasMoreOptions, setHasMoreOptions] = useState(false);
|
|
11892
11930
|
const [hasMoreOptionsFirstLoad, setHasMoreOptionsFirstLoad] = useState();
|
|
11893
11931
|
const [hasFirstLoadPerformed, setHasFirstLoadPerformed] = useState(false);
|
|
@@ -12167,7 +12205,7 @@ const getFormikError = error => {
|
|
|
12167
12205
|
return undefined;
|
|
12168
12206
|
};
|
|
12169
12207
|
|
|
12170
|
-
var styles$
|
|
12208
|
+
var styles$b = {"text-field":"_6cH4X","date-range-field":"_DMb6M","text-field--invalid":"_eXIiZ","text-field--prefixed":"_Lc6QO","text-field--suffixed":"_VWrJD","date-range-field--invalid":"_ZJ2A5","date-range-field--disabled":"_WkaJQ"};
|
|
12171
12209
|
|
|
12172
12210
|
var calendarStyles = {"root":"_SsQ7L","table":"_Ar-fF","caption":"_Tp79k","head_cell":"_Ya6Zr","day_today":"_lFzs7","day_outside":"_TjttB","nav_button":"_cwiRM","day_range_middle":"_rJolM","day_range_start":"_nVIPx","day_range_end":"_Y50yT"};
|
|
12173
12211
|
|
|
@@ -12231,9 +12269,9 @@ const DateRangeCalendar = ({
|
|
|
12231
12269
|
const DAYS = getDays(translate);
|
|
12232
12270
|
const MONTH_NAMES = getMonths(translate);
|
|
12233
12271
|
return React__default.createElement(Portal, null, React__default.createElement("div", {
|
|
12234
|
-
className: styles$
|
|
12272
|
+
className: styles$N['calendar']
|
|
12235
12273
|
}, React__default.createElement("div", {
|
|
12236
|
-
className: styles$
|
|
12274
|
+
className: styles$N['calendar__overlay'],
|
|
12237
12275
|
ref: ref => setCalendarRef(ref),
|
|
12238
12276
|
style: _extends({}, calendarPosition, {
|
|
12239
12277
|
zIndex: getZIndex('dropdown')
|
|
@@ -12424,9 +12462,9 @@ const DateRangeField = ({
|
|
|
12424
12462
|
end
|
|
12425
12463
|
} = controllers.value;
|
|
12426
12464
|
return React__default.createElement(Field, _extends({}, fieldProps), React__default.createElement("div", {
|
|
12427
|
-
className: classnames(styles$
|
|
12428
|
-
[styles$
|
|
12429
|
-
[styles$
|
|
12465
|
+
className: classnames(styles$b['date-range-field'], {
|
|
12466
|
+
[styles$b['date-range-field--invalid']]: hasError,
|
|
12467
|
+
[styles$b['date-range-field--disabled']]: disabled
|
|
12430
12468
|
}),
|
|
12431
12469
|
"data-testid": testId
|
|
12432
12470
|
}, React__default.createElement(IconCalendarAlt, {
|
|
@@ -12681,7 +12719,7 @@ const TimeFieldDropdown = ({
|
|
|
12681
12719
|
})));
|
|
12682
12720
|
};
|
|
12683
12721
|
|
|
12684
|
-
const _excluded$
|
|
12722
|
+
const _excluded$5 = ["interval", "startTime", "prefix", "endField", "duration", "subtractDuration", "calculateDuration", "timeFormat"];
|
|
12685
12723
|
const TimeFieldElement = (_ref, forwardedRef) => {
|
|
12686
12724
|
let {
|
|
12687
12725
|
interval = 15,
|
|
@@ -12693,7 +12731,7 @@ const TimeFieldElement = (_ref, forwardedRef) => {
|
|
|
12693
12731
|
calculateDuration,
|
|
12694
12732
|
timeFormat
|
|
12695
12733
|
} = _ref,
|
|
12696
|
-
allOtherProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
12734
|
+
allOtherProps = _objectWithoutPropertiesLoose(_ref, _excluded$5);
|
|
12697
12735
|
const {
|
|
12698
12736
|
timeFormat: globalTimeFormat
|
|
12699
12737
|
} = useProviderConfig();
|
|
@@ -12748,7 +12786,7 @@ const TimeRangeSelector = forwardRef(TimeFieldElement);
|
|
|
12748
12786
|
*/
|
|
12749
12787
|
const TimeField = forwardRef(TimeFieldElement);
|
|
12750
12788
|
|
|
12751
|
-
var styles$
|
|
12789
|
+
var styles$a = {"text-field":"_yV-BZ","time-range-field":"_9i8Lj","text-field--invalid":"_FJVdv","text-field--prefixed":"_B7q-i","text-field--suffixed":"_DvCJW","time-range-field--invalid":"_g2UhP","time-range-field--disabled":"_Yn4T4"};
|
|
12752
12790
|
|
|
12753
12791
|
const TimeRangeEnd = ({
|
|
12754
12792
|
startTime,
|
|
@@ -12869,9 +12907,9 @@ const TimeRangeField = ({
|
|
|
12869
12907
|
end
|
|
12870
12908
|
}) : getDuration(end, start, subtractDuration);
|
|
12871
12909
|
return React__default.createElement(Field, _extends({}, fieldProps), React__default.createElement("div", {
|
|
12872
|
-
className: classnames(styles$
|
|
12873
|
-
[styles$
|
|
12874
|
-
[styles$
|
|
12910
|
+
className: classnames(styles$a['time-range-field'], {
|
|
12911
|
+
[styles$a['time-range-field--invalid']]: hasError,
|
|
12912
|
+
[styles$a['time-range-field--disabled']]: disabled
|
|
12875
12913
|
}),
|
|
12876
12914
|
"data-testid": testId
|
|
12877
12915
|
}, React__default.createElement(TimeRangeStart, {
|
|
@@ -12899,18 +12937,18 @@ const TimeRangeField = ({
|
|
|
12899
12937
|
})));
|
|
12900
12938
|
};
|
|
12901
12939
|
|
|
12902
|
-
var styles$
|
|
12940
|
+
var styles$9 = {"currency-field__mask-display":"_ddacu"};
|
|
12903
12941
|
|
|
12904
12942
|
const CURRENCY_DISPLAY_DEFAULT_MARGIN = 8;
|
|
12905
12943
|
const CURRENCY_DISPLAY_MARGIN_BUFFER = 1;
|
|
12906
12944
|
|
|
12907
|
-
const _excluded$
|
|
12945
|
+
const _excluded$4 = ["currencySymbol", "step"];
|
|
12908
12946
|
const CurrencyFieldElement = (_ref, forwardedRef) => {
|
|
12909
12947
|
let {
|
|
12910
12948
|
currencySymbol = '$',
|
|
12911
12949
|
step = 0.01
|
|
12912
12950
|
} = _ref,
|
|
12913
|
-
allOtherProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
12951
|
+
allOtherProps = _objectWithoutPropertiesLoose(_ref, _excluded$4);
|
|
12914
12952
|
const [displayPadding, setDisplayPadding] = useState(CURRENCY_DISPLAY_DEFAULT_MARGIN);
|
|
12915
12953
|
const internalRef = useRef(null);
|
|
12916
12954
|
const ref = forwardedRef || internalRef;
|
|
@@ -12964,7 +13002,7 @@ const CurrencyFieldElement = (_ref, forwardedRef) => {
|
|
|
12964
13002
|
inputProps.onFocus(e);
|
|
12965
13003
|
}
|
|
12966
13004
|
}))), showMask && !!inputProps.value && React__default.createElement("div", {
|
|
12967
|
-
className: styles$
|
|
13005
|
+
className: styles$9['currency-field__mask-display'],
|
|
12968
13006
|
style: {
|
|
12969
13007
|
marginLeft: displayPadding
|
|
12970
13008
|
}
|
|
@@ -12977,7 +13015,7 @@ const CurrencyFieldElement = (_ref, forwardedRef) => {
|
|
|
12977
13015
|
*/
|
|
12978
13016
|
const CurrencyField = forwardRef(CurrencyFieldElement);
|
|
12979
13017
|
|
|
12980
|
-
const _excluded$
|
|
13018
|
+
const _excluded$3 = ["max", "min", "precision", "stepSize", "prefix", "suffix"];
|
|
12981
13019
|
const NumberFieldElement = (_ref, ref) => {
|
|
12982
13020
|
let {
|
|
12983
13021
|
max,
|
|
@@ -12987,7 +13025,7 @@ const NumberFieldElement = (_ref, ref) => {
|
|
|
12987
13025
|
prefix,
|
|
12988
13026
|
suffix
|
|
12989
13027
|
} = _ref,
|
|
12990
|
-
allOtherProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
13028
|
+
allOtherProps = _objectWithoutPropertiesLoose(_ref, _excluded$3);
|
|
12991
13029
|
const {
|
|
12992
13030
|
inputProps,
|
|
12993
13031
|
fieldProps
|
|
@@ -13062,12 +13100,12 @@ const NumberFieldElement = (_ref, ref) => {
|
|
|
13062
13100
|
*/
|
|
13063
13101
|
const NumberField = forwardRef(NumberFieldElement);
|
|
13064
13102
|
|
|
13065
|
-
const _excluded$
|
|
13103
|
+
const _excluded$2 = ["max"];
|
|
13066
13104
|
const PercentageElement = (_ref, ref) => {
|
|
13067
13105
|
let {
|
|
13068
13106
|
max = 100
|
|
13069
13107
|
} = _ref,
|
|
13070
|
-
allOtherProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
13108
|
+
allOtherProps = _objectWithoutPropertiesLoose(_ref, _excluded$2);
|
|
13071
13109
|
return React__default.createElement(NumberField, _extends({}, allOtherProps, {
|
|
13072
13110
|
suffix: "%",
|
|
13073
13111
|
ref: ref,
|
|
@@ -13091,7 +13129,7 @@ const FormFeedback = ({
|
|
|
13091
13129
|
}, children);
|
|
13092
13130
|
};
|
|
13093
13131
|
|
|
13094
|
-
var styles$
|
|
13132
|
+
var styles$8 = {"phone-field":"_Q0GfJ","phone-field__flag":"_-uOqW","phone-field__input":"_Hes9b","phone-field__input--with-square-borders":"_TEU6N"};
|
|
13095
13133
|
|
|
13096
13134
|
const usePhoneFieldControllers = ({
|
|
13097
13135
|
name,
|
|
@@ -14005,7 +14043,7 @@ const COUNTRIES = {
|
|
|
14005
14043
|
};
|
|
14006
14044
|
const COUNTRY_CODES = Object.keys(COUNTRIES);
|
|
14007
14045
|
|
|
14008
|
-
var styles$
|
|
14046
|
+
var styles$7 = {"country-selector":"_VYs4A","country-selector--with-error":"_oSxxZ","country-selector__trigger":"_jlyd4","country-selector--disabled":"_tNInT","country-selector__trigger--with-error":"_424HM","country-selector__trigger--disabled":"_0XOFf","country-selector__trigger-flag":"_RfPa1","country-selector__flag":"_uADOl"};
|
|
14009
14047
|
|
|
14010
14048
|
var flagIcons = {"fi":"_wEQeh","fis":"_Z-kfc","fi-ac":"_amiP8","fi-ad":"_-Nycw","fi-ae":"_5zcAZ","fi-af":"_x-kp7","fi-ag":"_cfoi1","fi-ai":"_xoMS-","fi-al":"_am975","fi-am":"_0p-gD","fi-ao":"_l245N","fi-ar":"_xigkX","fi-as":"_fSczv","fi-at":"_tTeMy","fi-au":"_nSXvc","fi-aw":"_J3Dgu","fi-ax":"_PnU0s","fi-az":"_Hevuf","fi-ba":"_V-NYg","fi-bb":"_rdxaV","fi-bd":"_W3w35","fi-be":"_HXWpo","fi-bf":"_-xCW2","fi-bg":"_UuyPh","fi-bh":"_qYHkT","fi-bi":"_sfFeO","fi-bj":"_HcoBc","fi-bl":"_VvU29","fi-bm":"_DCtD1","fi-bn":"_QdHY3","fi-bo":"_Ayx7f","fi-bq":"_VfZGH","fi-br":"_HigIg","fi-bs":"_PWr-E","fi-bt":"_uFlIS","fi-bw":"_Mmoqr","fi-by":"_MKO28","fi-bz":"_HBn3o","fi-ca":"_wB3xX","fi-cc":"_oJEC5","fi-cd":"_C3RR8","fi-cf":"_ZVOZZ","fi-cg":"_Nk7Zr","fi-ch":"_9qTmx","fi-ci":"_4-gxn","fi-ck":"_YEK3x","fi-cl":"_-iNl4","fi-cm":"_UozRb","fi-cn":"_KsOEH","fi-co":"_ptSEc","fi-cr":"_92iwJ","fi-cu":"_D0k3p","fi-cv":"_O5oBT","fi-cw":"_82pI2","fi-cx":"_Eqg1T","fi-cy":"_740E8","fi-cz":"_483Iy","fi-de":"_Wla8X","fi-dj":"_Jm9gH","fi-dk":"_5QJuz","fi-dm":"_4lh-K","fi-do":"_Zvttl","fi-dz":"_-5iKJ","fi-ec":"_XMC0f","fi-ee":"_tZDe6","fi-eg":"_5USxE","fi-eh":"_rpC1Z","fi-er":"_Rhm4A","fi-es":"_QN2si","fi-et":"_2ihBN","fi-fi":"_2Lctq","fi-fj":"_ljZXm","fi-fk":"_Um9-A","fi-fm":"_mXG-Y","fi-fo":"_SemMo","fi-fr":"_MGcxf","fi-ga":"_aPt7H","fi-gb":"_2tU39","fi-gd":"_CPs5V","fi-ge":"_09VJF","fi-gf":"_7STtr","fi-gg":"_CUbGJ","fi-gh":"_mgJbd","fi-gi":"_mxhe5","fi-gl":"_gXogr","fi-gm":"_JHzzB","fi-gn":"_XJqm4","fi-gp":"_YnrVE","fi-gq":"_J47-w","fi-gr":"_5YAwo","fi-gt":"_PWFl-","fi-gu":"_ItzVX","fi-gw":"_hiRJc","fi-gy":"_oitDt","fi-hk":"_18FzB","fi-hn":"_5ySTg","fi-hr":"_rzYuT","fi-ht":"_Pq7or","fi-hu":"_-u5Ze","fi-id":"_m8GwW","fi-ie":"_pPEAu","fi-il":"_Butse","fi-im":"_wLEYj","fi-in":"_XY7D8","fi-io":"_iKM6K","fi-iq":"_iwLoJ","fi-ir":"_L1Gd1","fi-is":"_6XPDX","fi-it":"_JXv9-","fi-je":"_Qwjxj","fi-jm":"_qzNME","fi-jo":"_JqYXz","fi-jp":"_CakOC","fi-ke":"_Czyy6","fi-kg":"_6Yydv","fi-kh":"_zhLEc","fi-ki":"_qJxPJ","fi-km":"_KDmv4","fi-kn":"_n3xy0","fi-kp":"_voM9e","fi-kr":"_sErX2","fi-kw":"_kJUFk","fi-ky":"_Ensoj","fi-kz":"_JVpyw","fi-la":"_eVzpD","fi-lb":"_f400B","fi-lc":"_vhHp5","fi-li":"_cP76d","fi-lk":"_NGSeL","fi-lr":"_yIHm7","fi-ls":"_Kj-GJ","fi-lt":"_VTK9E","fi-lu":"_N4PHA","fi-lv":"_d-ZWR","fi-ly":"_49dYi","fi-ma":"_Iqggh","fi-mc":"_QQY-Q","fi-md":"_e7v9L","fi-me":"_WqN7P","fi-mf":"_4Exh-","fi-mg":"_W-d9O","fi-mh":"_3xTQ7","fi-mk":"_O26qm","fi-ml":"_hiLpW","fi-mm":"_QGh12","fi-mn":"_KNLNH","fi-mo":"_Kdw-k","fi-mp":"_CTkAK","fi-mq":"_MzLKJ","fi-mr":"_sjQHJ","fi-ms":"_ENTOn","fi-mt":"_GoKtf","fi-mu":"_WLc98","fi-mv":"_08Tf4","fi-mw":"_MvAGM","fi-mx":"_FPDND","fi-my":"_1xoF6","fi-mz":"_ylwZy","fi-na":"_-pxPH","fi-nc":"_W-Ot-","fi-ne":"_EOA-X","fi-nf":"_W5Kl5","fi-ng":"_q76Cs","fi-ni":"_AuKsI","fi-nl":"_qLIaU","fi-no":"_xbcrX","fi-np":"_FQt4h","fi-nr":"_jJbHx","fi-nu":"_TSamx","fi-nz":"_AzsKY","fi-om":"_TUoW9","fi-pa":"_jCT-C","fi-pe":"_VMnoV","fi-pf":"_Gblvx","fi-pg":"_FLRnq","fi-ph":"_0RSGR","fi-pk":"_DfZCd","fi-pl":"_hv9I4","fi-pm":"_IDp3q","fi-pr":"_2MHj1","fi-ps":"_0FLpC","fi-pt":"_p--cH","fi-pw":"_VP-zx","fi-py":"_-Tnic","fi-qa":"_Dy7Il","fi-re":"_7N5ED","fi-ro":"_4AYwa","fi-rs":"_Y-a4O","fi-ru":"_OKa79","fi-rw":"_bBqN1","fi-sa":"_vFwuG","fi-sb":"_MMmc2","fi-sc":"_ZUM8E","fi-sd":"_9k8eB","fi-se":"_cX0c9","fi-sg":"_4-yWs","fi-sh":"_-vaPR","fi-si":"_9oJgu","fi-sj":"_J0R6u","fi-sk":"_1VxbX","fi-sl":"_RiBAA","fi-sm":"_rEaFc","fi-sn":"_PRwVO","fi-so":"_XKFdC","fi-sr":"_LtiS3","fi-ss":"_45mng","fi-st":"_OtIks","fi-sv":"_OonsM","fi-sx":"_NtzDE","fi-sy":"_Ail2H","fi-sz":"_8XRyD","fi-ta":"_GQvZn","fi-tc":"_SbD-E","fi-td":"_AnXAO","fi-tg":"_smamZ","fi-th":"_AVcL5","fi-tj":"_EqMlf","fi-tk":"_20VO7","fi-tl":"_jz9hm","fi-tm":"_kmmny","fi-tn":"_9aBQ-","fi-to":"_G63l0","fi-tr":"_6shnc","fi-tt":"_P5fq4","fi-tv":"_b7SpV","fi-tw":"_jwNjI","fi-tz":"_qtU8x","fi-ua":"_bNAHa","fi-ug":"_-G-iW","fi-us":"_xwz53","fi-uy":"_DpeX8","fi-uz":"_kSABK","fi-va":"_VOSWl","fi-vc":"_X-aU3","fi-ve":"_FiFnt","fi-vg":"_d66Ny","fi-vi":"_6kM5U","fi-vn":"_ikRJo","fi-vu":"_5XaHH","fi-wf":"_ZEJXX","fi-ws":"_IzR7c","fi-xk":"_88V52","fi-ye":"_2Dwap","fi-yt":"_kQ0fh","fi-za":"_XzYDs","fi-zm":"_mA8wn","fi-zw":"_iIsuB"};
|
|
14011
14049
|
|
|
@@ -14016,21 +14054,21 @@ const CountrySelector = ({
|
|
|
14016
14054
|
disabled
|
|
14017
14055
|
}) => {
|
|
14018
14056
|
return React__default.createElement("div", {
|
|
14019
|
-
className: classnames(styles$
|
|
14020
|
-
[styles$
|
|
14021
|
-
[styles$
|
|
14057
|
+
className: classnames(styles$7['country-selector'], {
|
|
14058
|
+
[styles$7['country-selector--with-error']]: hasError,
|
|
14059
|
+
[styles$7['country-selector--disabled']]: disabled
|
|
14022
14060
|
})
|
|
14023
14061
|
}, React__default.createElement(Dropdown, {
|
|
14024
14062
|
trigger: React__default.createElement("div", {
|
|
14025
|
-
className: classnames(styles$
|
|
14026
|
-
[styles$
|
|
14027
|
-
[styles$
|
|
14063
|
+
className: classnames(styles$7['country-selector__trigger'], {
|
|
14064
|
+
[styles$7['country-selector__trigger--with-error']]: hasError,
|
|
14065
|
+
[styles$7['country-selector__trigger--disabled']]: disabled
|
|
14028
14066
|
})
|
|
14029
14067
|
}, React__default.createElement(Inline, {
|
|
14030
14068
|
space: 8,
|
|
14031
14069
|
alignItems: "center"
|
|
14032
14070
|
}, React__default.createElement("span", {
|
|
14033
|
-
className: classnames(flagIcons['fi'], flagIcons[`fi-${country.toLocaleLowerCase()}`], styles$
|
|
14071
|
+
className: classnames(flagIcons['fi'], flagIcons[`fi-${country.toLocaleLowerCase()}`], styles$7['country-selector__trigger-flag'])
|
|
14034
14072
|
}), React__default.createElement(IconChevronDown, {
|
|
14035
14073
|
color: "grey-400",
|
|
14036
14074
|
size: "medium"
|
|
@@ -14044,16 +14082,16 @@ const CountrySelector = ({
|
|
|
14044
14082
|
alignItems: "center",
|
|
14045
14083
|
space: 12
|
|
14046
14084
|
}, React__default.createElement("span", {
|
|
14047
|
-
className: classnames(flagIcons['fi'], flagIcons[`fi-${countryCode.toLocaleLowerCase()}`], styles$
|
|
14085
|
+
className: classnames(flagIcons['fi'], flagIcons[`fi-${countryCode.toLocaleLowerCase()}`], styles$7['country-selector__flag'])
|
|
14048
14086
|
}), React__default.createElement(Text, null, COUNTRIES[countryCode].countryName)))))));
|
|
14049
14087
|
};
|
|
14050
14088
|
|
|
14051
|
-
const _excluded$
|
|
14089
|
+
const _excluded$1 = ["disabledCountry"];
|
|
14052
14090
|
const PhoneField = _ref => {
|
|
14053
14091
|
let {
|
|
14054
14092
|
disabledCountry = false
|
|
14055
14093
|
} = _ref,
|
|
14056
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
14094
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$1);
|
|
14057
14095
|
const __ = useTranslation('PhoneField');
|
|
14058
14096
|
const inputRef = useRef(null);
|
|
14059
14097
|
const {
|
|
@@ -14117,7 +14155,7 @@ const PhoneField = _ref => {
|
|
|
14117
14155
|
}
|
|
14118
14156
|
};
|
|
14119
14157
|
return React__default.createElement(Field, _extends({}, fieldProps), React__default.createElement("div", {
|
|
14120
|
-
className: styles$
|
|
14158
|
+
className: styles$8['phone-field']
|
|
14121
14159
|
}, !disabledCountry && React__default.createElement(CountrySelector, {
|
|
14122
14160
|
country: selectedCountry,
|
|
14123
14161
|
onChange: handleCountryChange,
|
|
@@ -14128,53 +14166,18 @@ const PhoneField = _ref => {
|
|
|
14128
14166
|
space: 4,
|
|
14129
14167
|
alignItems: "center"
|
|
14130
14168
|
}, React__default.createElement("span", {
|
|
14131
|
-
className: classnames(flagIcons['fi'], flagIcons[`fi-${selectedCountry.toLocaleLowerCase()}`], styles$
|
|
14169
|
+
className: classnames(flagIcons['fi'], flagIcons[`fi-${selectedCountry.toLocaleLowerCase()}`], styles$8['country-selector__flag'])
|
|
14132
14170
|
}), React__default.createElement("span", null, "+", getCountryCallingCode(selectedCountry))) : `+${getCountryCallingCode(selectedCountry)}`
|
|
14133
14171
|
}, React__default.createElement("input", _extends({}, inputProps, {
|
|
14134
14172
|
type: "tel",
|
|
14135
|
-
className: classnames(inputProps.className, styles$
|
|
14136
|
-
[styles$
|
|
14173
|
+
className: classnames(inputProps.className, styles$8['phone-field__input'], {
|
|
14174
|
+
[styles$8['phone-field__input--with-square-borders']]: !disabledCountry
|
|
14137
14175
|
}),
|
|
14138
14176
|
onChange: handlePhoneChange,
|
|
14139
14177
|
onBlur: handlePhoneBlur
|
|
14140
14178
|
})))));
|
|
14141
14179
|
};
|
|
14142
14180
|
|
|
14143
|
-
var styles$7 = {"badge":"_RXV4h","badge--warning":"_2An1I","badge--danger":"_-Bw8L","badge--success":"_RxlMz","badge--info":"_dzCH-","badge--numeric":"_Ix9tP"};
|
|
14144
|
-
|
|
14145
|
-
const _excluded$1 = ["children", "theme", "title", "testId"];
|
|
14146
|
-
const BadgeElement = (_ref, forwardedRef) => {
|
|
14147
|
-
let {
|
|
14148
|
-
children,
|
|
14149
|
-
theme,
|
|
14150
|
-
title,
|
|
14151
|
-
testId
|
|
14152
|
-
} = _ref,
|
|
14153
|
-
otherProps = _objectWithoutPropertiesLoose(_ref, _excluded$1);
|
|
14154
|
-
const internalRef = useRef(null);
|
|
14155
|
-
const ref = forwardedRef || internalRef;
|
|
14156
|
-
useLayoutEffect(() => {
|
|
14157
|
-
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') {
|
|
14158
|
-
ref.current.style.height = ref.current.offsetWidth + 'px';
|
|
14159
|
-
}
|
|
14160
|
-
});
|
|
14161
|
-
return React__default.createElement(Tooltip, {
|
|
14162
|
-
overlay: title,
|
|
14163
|
-
ref: ref
|
|
14164
|
-
}, React__default.createElement("div", _extends({
|
|
14165
|
-
className: classnames(styles$7['badge'], {
|
|
14166
|
-
[styles$7['badge--success']]: theme === 'success',
|
|
14167
|
-
[styles$7['badge--danger']]: theme === 'danger',
|
|
14168
|
-
[styles$7['badge--info']]: theme === 'info',
|
|
14169
|
-
[styles$7['badge--warning']]: theme === 'warning',
|
|
14170
|
-
[styles$7['badge--numeric']]: Number.isFinite(children)
|
|
14171
|
-
}),
|
|
14172
|
-
ref: ref,
|
|
14173
|
-
"data-testid": testId
|
|
14174
|
-
}, otherProps), children));
|
|
14175
|
-
};
|
|
14176
|
-
const Badge = forwardRef(BadgeElement);
|
|
14177
|
-
|
|
14178
14181
|
var styles$6 = {"avatar":"_V1U8v","avatar__container":"_peAaI","avatar--small":"_9g-tn","avatar__badge":"_uViot","avatar--medium":"_vNXJW","avatar--large":"_9ZKAB","avatar--extra-large":"_uv14Y"};
|
|
14179
14182
|
|
|
14180
14183
|
var styles$5 = {"avatar-image":"_iDN1j"};
|