@7shifts/sous-chef 4.12.0 → 4.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +99 -24
- package/dist/index.css.map +1 -1
- package/dist/index.js +372 -333
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +468 -425
- package/dist/index.modern.js.map +1 -1
- package/dist/media/Avatar/AvatarContext.d.ts +6 -0
- package/dist/media/Avatar/AvatarImage/AvatarImage.d.ts +2 -2
- package/dist/media/Badge/Badge.d.ts +5 -0
- package/dist/overlay/Modal/Modal.d.ts +5 -1
- package/dist/overlay/Modal/ModalContext.d.ts +1 -0
- package/dist/overlay/Modal/ModalHeader/ModalHeader.d.ts +2 -1
- package/dist/overlay/Modal/ModalTabZone/ModalTabZone.d.ts +6 -0
- package/dist/overlay/Modal/ModalTabZone/index.d.ts +1 -0
- package/llms-instructions/guidelines/Modal.guidelines.md +17 -3
- package/package.json +3 -2
package/dist/index.modern.js
CHANGED
|
@@ -12386,9 +12386,9 @@ var styles$1j = {"page-layout":"_Scw7-","page-layout__nav-container":"_v--DF","p
|
|
|
12386
12386
|
|
|
12387
12387
|
var styles$1i = {"menu-item":"_SebbU","menu-item--active":"_CDEVl","menu-item--with-badge":"_VudDE","menu-item__badge":"_vErBS"};
|
|
12388
12388
|
|
|
12389
|
-
var styles$1h = {"badge":"_RXV4h","badge--warning":"_2An1I","badge--danger":"_-Bw8L","badge--success":"_RxlMz","badge--info":"_dzCH-","badge--numeric":"_Ix9tP"};
|
|
12389
|
+
var styles$1h = {"badge":"_RXV4h","badge--warning":"_2An1I","badge--danger":"_-Bw8L","badge--success":"_RxlMz","badge--info":"_dzCH-","badge--numeric":"_Ix9tP","badge--dot":"_OcpK5","badge--with-border":"_-5FpP"};
|
|
12390
12390
|
|
|
12391
|
-
var styles$1g = {"overlay":"_0yTe8","overlay--after-open":"_yJBtA","overlay--before-close":"_iWogn","content":"_ntozd","content--after-open":"_EQjDq","content--before-close":"_ZTY3B","overlay--draggable":"_6SSP8","content--draggable":"_5rHXj","draggable-inner":"_cq2CU"};
|
|
12391
|
+
var styles$1g = {"overlay":"_0yTe8","overlay--after-open":"_yJBtA","overlay--before-close":"_iWogn","content":"_ntozd","content--after-open":"_EQjDq","content--before-close":"_ZTY3B","content--with-tab-list":"_DMdi7","overlay--draggable":"_6SSP8","content--draggable":"_5rHXj","draggable-inner":"_cq2CU","draggable-inner--with-tab-list":"_V4Rz2"};
|
|
12392
12392
|
|
|
12393
12393
|
var styles$1f = {"modal-header":"_VRlTj","modal-header__header":"_GH74U","modal-header__sub-header":"_OlX-6","modal-header--with-shadow":"_brFTl","modal-header__close-button":"_LTnd3","modal-header__top-bar":"_7V-hB","modal-header__top-bar--with-image":"_docda"};
|
|
12394
12394
|
|
|
@@ -12397,7 +12397,8 @@ const ModalContext = createContext({
|
|
|
12397
12397
|
modalBodyRef: {
|
|
12398
12398
|
current: null
|
|
12399
12399
|
},
|
|
12400
|
-
draggable: false
|
|
12400
|
+
draggable: false,
|
|
12401
|
+
hasTabList: false
|
|
12401
12402
|
});
|
|
12402
12403
|
const useModalContext = () => {
|
|
12403
12404
|
const context = useContext(ModalContext);
|
|
@@ -12440,17 +12441,21 @@ const ModalHeader = ({
|
|
|
12440
12441
|
subHeader,
|
|
12441
12442
|
onClose,
|
|
12442
12443
|
loading,
|
|
12443
|
-
imageSrc
|
|
12444
|
+
imageSrc,
|
|
12445
|
+
iconBar
|
|
12444
12446
|
}) => {
|
|
12445
12447
|
const {
|
|
12446
|
-
modalBodyRef
|
|
12448
|
+
modalBodyRef,
|
|
12449
|
+
hasTabList
|
|
12447
12450
|
} = useModalContext();
|
|
12448
12451
|
const {
|
|
12449
12452
|
hasScrollTop
|
|
12450
12453
|
} = useScrollDetector(modalBodyRef);
|
|
12454
|
+
const iconBarTheme = imageSrc ? 'link-contrast' : 'link-icon';
|
|
12455
|
+
const themedIconBar = iconBar ? injectButtonTheme(iconBar, iconBarTheme) : null;
|
|
12451
12456
|
return React__default.createElement("div", {
|
|
12452
12457
|
className: classnames(styles$1f['modal-header'], {
|
|
12453
|
-
[styles$1f['modal-header--with-shadow']]: hasScrollTop
|
|
12458
|
+
[styles$1f['modal-header--with-shadow']]: hasScrollTop && !hasTabList
|
|
12454
12459
|
})
|
|
12455
12460
|
}, React__default.createElement(Stack, {
|
|
12456
12461
|
space: 0
|
|
@@ -12461,7 +12466,7 @@ const ModalHeader = ({
|
|
|
12461
12466
|
style: imageSrc ? {
|
|
12462
12467
|
backgroundImage: `url(${imageSrc})`
|
|
12463
12468
|
} : undefined
|
|
12464
|
-
}, onClose && React__default.createElement(Button, {
|
|
12469
|
+
}, themedIconBar, onClose && React__default.createElement(Button, {
|
|
12465
12470
|
theme: imageSrc ? 'link-contrast' : 'link-icon',
|
|
12466
12471
|
onClick: onClose,
|
|
12467
12472
|
disabled: loading
|
|
@@ -12471,6 +12476,40 @@ const ModalHeader = ({
|
|
|
12471
12476
|
className: styles$1f['modal-header__sub-header']
|
|
12472
12477
|
}, subHeader)));
|
|
12473
12478
|
};
|
|
12479
|
+
const injectButtonTheme = (node, theme) => {
|
|
12480
|
+
if (Array.isArray(node)) {
|
|
12481
|
+
return node.map(child => injectButtonTheme(child, theme));
|
|
12482
|
+
}
|
|
12483
|
+
if (!React__default.isValidElement(node)) return node;
|
|
12484
|
+
if (node.type === Button) {
|
|
12485
|
+
return React__default.cloneElement(node, {
|
|
12486
|
+
theme
|
|
12487
|
+
});
|
|
12488
|
+
}
|
|
12489
|
+
if (node.type === React__default.Fragment) {
|
|
12490
|
+
const children = React__default.Children.map(node.props.children, child => injectButtonTheme(child, theme));
|
|
12491
|
+
return React__default.cloneElement(node, {}, children);
|
|
12492
|
+
}
|
|
12493
|
+
return node;
|
|
12494
|
+
};
|
|
12495
|
+
|
|
12496
|
+
var styles$1e = {"tab-zone":"_4hqPT","tab-zone--with-shadow":"_dorMR"};
|
|
12497
|
+
|
|
12498
|
+
const ModalTabZone = ({
|
|
12499
|
+
children
|
|
12500
|
+
}) => {
|
|
12501
|
+
const {
|
|
12502
|
+
modalBodyRef
|
|
12503
|
+
} = useModalContext();
|
|
12504
|
+
const {
|
|
12505
|
+
hasScrollTop
|
|
12506
|
+
} = useScrollDetector(modalBodyRef);
|
|
12507
|
+
return React__default.createElement("div", {
|
|
12508
|
+
className: classnames(styles$1e['tab-zone'], {
|
|
12509
|
+
[styles$1e['tab-zone--with-shadow']]: hasScrollTop
|
|
12510
|
+
})
|
|
12511
|
+
}, children);
|
|
12512
|
+
};
|
|
12474
12513
|
|
|
12475
12514
|
const DEFAULT_WIDTH = 566;
|
|
12476
12515
|
const DEFAULT_HEIGHT = 266;
|
|
@@ -12553,7 +12592,7 @@ function useDraggableModal({
|
|
|
12553
12592
|
};
|
|
12554
12593
|
}
|
|
12555
12594
|
|
|
12556
|
-
const _excluded$bk = ["children", "header", "subHeader", "onClose", "loading", "zIndex", "rootElementId", "width", "height", "maxWidth", "shouldReturnFocusAfterClose", "testId", "imageSrc", "draggable", "initialPosition"];
|
|
12595
|
+
const _excluded$bk = ["children", "header", "subHeader", "onClose", "loading", "zIndex", "rootElementId", "width", "height", "maxWidth", "shouldReturnFocusAfterClose", "testId", "imageSrc", "draggable", "initialPosition", "tabList", "iconBar"];
|
|
12557
12596
|
// react-draggable declares `props: DraggableProps` on the class instance, overriding
|
|
12558
12597
|
// the `React.Component<Partial<DraggableProps>>` generic. This cast restores the
|
|
12559
12598
|
// intended partial-props behaviour for JSX usage.
|
|
@@ -12579,7 +12618,9 @@ const Modal = _ref => {
|
|
|
12579
12618
|
testId,
|
|
12580
12619
|
imageSrc,
|
|
12581
12620
|
draggable = false,
|
|
12582
|
-
initialPosition
|
|
12621
|
+
initialPosition,
|
|
12622
|
+
tabList,
|
|
12623
|
+
iconBar
|
|
12583
12624
|
} = _ref,
|
|
12584
12625
|
otherProps = _objectWithoutPropertiesLoose(_ref, _excluded$bk);
|
|
12585
12626
|
const {
|
|
@@ -12617,27 +12658,24 @@ const Modal = _ref => {
|
|
|
12617
12658
|
} = getDataProps(otherProps, {
|
|
12618
12659
|
removeDataPrefix: true
|
|
12619
12660
|
});
|
|
12620
|
-
const
|
|
12621
|
-
className: DRAG_HANDLE_CLASS
|
|
12622
|
-
}, React__default.createElement(ModalHeader, {
|
|
12623
|
-
header: header,
|
|
12624
|
-
subHeader: subHeader,
|
|
12625
|
-
onClose: onClose,
|
|
12626
|
-
loading: loading,
|
|
12627
|
-
imageSrc: imageSrc
|
|
12628
|
-
})) : React__default.createElement(ModalHeader, {
|
|
12661
|
+
const modalHeader = React__default.createElement(ModalHeader, {
|
|
12629
12662
|
header: header,
|
|
12630
12663
|
subHeader: subHeader,
|
|
12631
12664
|
onClose: onClose,
|
|
12632
12665
|
loading: loading,
|
|
12633
|
-
imageSrc: imageSrc
|
|
12634
|
-
|
|
12666
|
+
imageSrc: imageSrc,
|
|
12667
|
+
iconBar: iconBar
|
|
12668
|
+
});
|
|
12669
|
+
const modalContent = React__default.createElement(ModalContext.Provider, {
|
|
12635
12670
|
value: {
|
|
12636
12671
|
isModalMounted: true,
|
|
12637
12672
|
modalBodyRef,
|
|
12638
|
-
draggable
|
|
12673
|
+
draggable,
|
|
12674
|
+
hasTabList: !!tabList
|
|
12639
12675
|
}
|
|
12640
|
-
},
|
|
12676
|
+
}, draggable ? React__default.createElement("div", {
|
|
12677
|
+
className: DRAG_HANDLE_CLASS
|
|
12678
|
+
}, modalHeader) : modalHeader, tabList && React__default.createElement(ModalTabZone, null, tabList), children);
|
|
12641
12679
|
return React__default.createElement(ReactModal, {
|
|
12642
12680
|
isOpen: true,
|
|
12643
12681
|
testId: testId,
|
|
@@ -12655,7 +12693,7 @@ const Modal = _ref => {
|
|
|
12655
12693
|
beforeClose: styles$1g['overlay--before-close']
|
|
12656
12694
|
},
|
|
12657
12695
|
className: {
|
|
12658
|
-
base: classnames(styles$1g['content'], draggable && styles$1g['content--draggable']),
|
|
12696
|
+
base: classnames(styles$1g['content'], draggable && styles$1g['content--draggable'], tabList && styles$1g['content--with-tab-list']),
|
|
12659
12697
|
afterOpen: styles$1g['content--after-open'],
|
|
12660
12698
|
beforeClose: styles$1g['content--before-close']
|
|
12661
12699
|
},
|
|
@@ -12666,7 +12704,9 @@ const Modal = _ref => {
|
|
|
12666
12704
|
bounds: draggableBounds
|
|
12667
12705
|
}, React__default.createElement("div", {
|
|
12668
12706
|
ref: draggableCallbackRef,
|
|
12669
|
-
className: styles$1g['draggable-inner'],
|
|
12707
|
+
className: classnames(styles$1g['draggable-inner'], {
|
|
12708
|
+
[styles$1g['draggable-inner--with-tab-list']]: !!tabList
|
|
12709
|
+
}),
|
|
12670
12710
|
style: {
|
|
12671
12711
|
width,
|
|
12672
12712
|
height,
|
|
@@ -12679,25 +12719,28 @@ Modal.setAppElement = rootElement => {
|
|
|
12679
12719
|
ReactModal.setAppElement(rootElement);
|
|
12680
12720
|
};
|
|
12681
12721
|
|
|
12682
|
-
var styles$
|
|
12722
|
+
var styles$1d = {"modal-body":"_4YK4k","modal-body--tab-mode":"_2-PSE"};
|
|
12683
12723
|
|
|
12684
12724
|
const ModalBody = ({
|
|
12685
12725
|
children,
|
|
12686
12726
|
testId
|
|
12687
12727
|
}) => {
|
|
12688
12728
|
const {
|
|
12689
|
-
modalBodyRef
|
|
12729
|
+
modalBodyRef,
|
|
12730
|
+
hasTabList
|
|
12690
12731
|
} = useModalContext();
|
|
12691
12732
|
return React__default.createElement("div", {
|
|
12692
|
-
className: classnames(styles$
|
|
12733
|
+
className: classnames(styles$1d['modal-body'], {
|
|
12734
|
+
[styles$1d['modal-body--tab-mode']]: hasTabList
|
|
12735
|
+
}),
|
|
12693
12736
|
"data-testid": testId,
|
|
12694
12737
|
ref: modalBodyRef
|
|
12695
12738
|
}, React__default.createElement("div", {
|
|
12696
|
-
className: styles$
|
|
12739
|
+
className: styles$1d['modal-body__inner-div']
|
|
12697
12740
|
}, children));
|
|
12698
12741
|
};
|
|
12699
12742
|
|
|
12700
|
-
var styles$
|
|
12743
|
+
var styles$1c = {"modal-footer":"_bezlP","modal-footer--with-shadow":"_hC4vb","modal-footer--tab-mode":"_o1kk7"};
|
|
12701
12744
|
|
|
12702
12745
|
const updateButtonProps$1 = (button, newProps) => {
|
|
12703
12746
|
if (!button) {
|
|
@@ -12750,7 +12793,8 @@ const FooterContainer = ({
|
|
|
12750
12793
|
testId
|
|
12751
12794
|
}) => {
|
|
12752
12795
|
const {
|
|
12753
|
-
modalBodyRef
|
|
12796
|
+
modalBodyRef,
|
|
12797
|
+
hasTabList
|
|
12754
12798
|
} = useModalContext();
|
|
12755
12799
|
const {
|
|
12756
12800
|
hasScrollBottom
|
|
@@ -12761,8 +12805,9 @@ const FooterContainer = ({
|
|
|
12761
12805
|
displayName: 'Inline'
|
|
12762
12806
|
});
|
|
12763
12807
|
return React__default.createElement("div", {
|
|
12764
|
-
className: classnames(styles$
|
|
12765
|
-
[styles$
|
|
12808
|
+
className: classnames(styles$1c['modal-footer'], {
|
|
12809
|
+
[styles$1c['modal-footer--with-shadow']]: hasScrollBottom,
|
|
12810
|
+
[styles$1c['modal-footer--tab-mode']]: hasTabList
|
|
12766
12811
|
}),
|
|
12767
12812
|
"data-testid": testId
|
|
12768
12813
|
}, React__default.createElement(Inline, {
|
|
@@ -12776,7 +12821,7 @@ var dayOverridesStyles = {"root":"_et9Fs","table":"_l7Mis","caption":"_XGu8K","h
|
|
|
12776
12821
|
|
|
12777
12822
|
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"};
|
|
12778
12823
|
|
|
12779
|
-
var styles$
|
|
12824
|
+
var styles$1b = {"calendar":"_YPyZ6","calendar__overlay":"_-cw0A"};
|
|
12780
12825
|
|
|
12781
12826
|
function parseDate(str, format, locale) {
|
|
12782
12827
|
const parsed = dateFnsParse(str, format, new Date(), {
|
|
@@ -12908,7 +12953,7 @@ const getHighlightModifiers = groups => {
|
|
|
12908
12953
|
});
|
|
12909
12954
|
};
|
|
12910
12955
|
|
|
12911
|
-
var styles$
|
|
12956
|
+
var styles$1a = {"day_highlight":"_ucr9m","theme-success":"_mLAwT","theme-danger":"_Uji-g","theme-warning":"_pe9ss","theme-info":"_OfzGg","theme-upsell":"_Pywaj","theme-neutral":"_5WRkx","shape-circle":"_0LzN8","legendShape":"_N-Dl4","shape-circle-dashed":"_eCqCU","shape-square":"_-pO-1","shape-square-dashed":"_7PoYh","shape-octagon":"_ywc-V","shape-star":"_vF4Ka","legend":"_iB2Db","legendItem":"_YauE7","legendLabel":"_lMmc7"};
|
|
12912
12957
|
|
|
12913
12958
|
const calculateCalendarPosition = (placement, anchorPosition, calendarDimensions) => {
|
|
12914
12959
|
if (!calendarDimensions) {
|
|
@@ -12982,7 +13027,7 @@ const buildHighlightDayPickerProps = highlightedDays => {
|
|
|
12982
13027
|
theme
|
|
12983
13028
|
}) => {
|
|
12984
13029
|
modifiers[key] = matcher;
|
|
12985
|
-
modifiersClassNames[key] = classnames(styles$
|
|
13030
|
+
modifiersClassNames[key] = classnames(styles$1a.day_highlight, styles$1a[`shape-${shape}`], styles$1a[`theme-${theme}`]);
|
|
12986
13031
|
});
|
|
12987
13032
|
return {
|
|
12988
13033
|
modifiers,
|
|
@@ -12991,7 +13036,7 @@ const buildHighlightDayPickerProps = highlightedDays => {
|
|
|
12991
13036
|
};
|
|
12992
13037
|
};
|
|
12993
13038
|
|
|
12994
|
-
var styles$
|
|
13039
|
+
var styles$19 = {"calendar-highlights":"_TjAon","calendar-highlights__item":"_BbYmq","calendar-highlights__shape":"_utSi-","calendar-highlights__shape--square":"_mP9vd","calendar-highlights__shape--circle":"_6zlZT"};
|
|
12995
13040
|
|
|
12996
13041
|
/** Legend rendered beneath a calendar, one row item per highlight group. */
|
|
12997
13042
|
const CalendarHighlights = ({
|
|
@@ -13001,7 +13046,7 @@ const CalendarHighlights = ({
|
|
|
13001
13046
|
return null;
|
|
13002
13047
|
}
|
|
13003
13048
|
return React__default.createElement("div", {
|
|
13004
|
-
className: styles$
|
|
13049
|
+
className: styles$19['calendar-highlights']
|
|
13005
13050
|
}, React__default.createElement(Inline, {
|
|
13006
13051
|
flexWrap: "wrap",
|
|
13007
13052
|
space: {
|
|
@@ -13016,7 +13061,7 @@ const CalendarHighlights = ({
|
|
|
13016
13061
|
theme
|
|
13017
13062
|
}) => React__default.createElement("div", {
|
|
13018
13063
|
key: label,
|
|
13019
|
-
className: styles$
|
|
13064
|
+
className: styles$19['calendar-highlights__item']
|
|
13020
13065
|
}, React__default.createElement(Shape, {
|
|
13021
13066
|
shape: shape,
|
|
13022
13067
|
theme: theme
|
|
@@ -13029,45 +13074,45 @@ const Shape = ({
|
|
|
13029
13074
|
switch (shape) {
|
|
13030
13075
|
case 'square':
|
|
13031
13076
|
return React__default.createElement("div", {
|
|
13032
|
-
className: classnames(styles$
|
|
13077
|
+
className: classnames(styles$19['calendar-highlights__shape'], styles$19['calendar-highlights__shape--square']),
|
|
13033
13078
|
style: {
|
|
13034
13079
|
borderColor: COLORS[`${theme}-color`]
|
|
13035
13080
|
}
|
|
13036
13081
|
});
|
|
13037
13082
|
case 'square-dashed':
|
|
13038
13083
|
return React__default.createElement("div", {
|
|
13039
|
-
className: styles$
|
|
13084
|
+
className: styles$19['calendar-highlights__shape']
|
|
13040
13085
|
}, React__default.createElement(SquareDashedShape, {
|
|
13041
13086
|
theme: theme
|
|
13042
13087
|
}));
|
|
13043
13088
|
case 'circle':
|
|
13044
13089
|
return React__default.createElement("div", {
|
|
13045
|
-
className: classnames(styles$
|
|
13090
|
+
className: classnames(styles$19['calendar-highlights__shape'], styles$19['calendar-highlights__shape--circle']),
|
|
13046
13091
|
style: {
|
|
13047
13092
|
borderColor: COLORS[`${theme}-color`]
|
|
13048
13093
|
}
|
|
13049
13094
|
});
|
|
13050
13095
|
case 'circle-dashed':
|
|
13051
13096
|
return React__default.createElement("div", {
|
|
13052
|
-
className: `${styles$
|
|
13097
|
+
className: `${styles$19['calendar-highlights__shape']}`
|
|
13053
13098
|
}, React__default.createElement(CircleDashedShape, {
|
|
13054
13099
|
theme: theme
|
|
13055
13100
|
}));
|
|
13056
13101
|
case 'octagon':
|
|
13057
13102
|
return React__default.createElement("div", {
|
|
13058
|
-
className: `${styles$
|
|
13103
|
+
className: `${styles$19['calendar-highlights__shape']}`
|
|
13059
13104
|
}, React__default.createElement(OctagonShape, {
|
|
13060
13105
|
theme: theme
|
|
13061
13106
|
}));
|
|
13062
13107
|
case 'star':
|
|
13063
13108
|
return React__default.createElement("div", {
|
|
13064
|
-
className: `${styles$
|
|
13109
|
+
className: `${styles$19['calendar-highlights__shape']}`
|
|
13065
13110
|
}, React__default.createElement(StarShape, {
|
|
13066
13111
|
theme: theme
|
|
13067
13112
|
}));
|
|
13068
13113
|
default:
|
|
13069
13114
|
return React__default.createElement("div", {
|
|
13070
|
-
className: styles$
|
|
13115
|
+
className: styles$19['calendar-highlight__shape']
|
|
13071
13116
|
}, shape);
|
|
13072
13117
|
}
|
|
13073
13118
|
};
|
|
@@ -13289,9 +13334,9 @@ const Calendar = ({
|
|
|
13289
13334
|
}
|
|
13290
13335
|
};
|
|
13291
13336
|
return React__default.createElement(Portal, null, React__default.createElement("div", {
|
|
13292
|
-
className: styles$
|
|
13337
|
+
className: styles$1b['calendar']
|
|
13293
13338
|
}, React__default.createElement("div", {
|
|
13294
|
-
className: styles$
|
|
13339
|
+
className: styles$1b['calendar__overlay'],
|
|
13295
13340
|
ref: ref => setCalendarRef(ref),
|
|
13296
13341
|
style: _extends({}, calendarPosition, {
|
|
13297
13342
|
zIndex: isInsideDropdown ? getZIndex('dropdown-level-2') : getZIndex('dropdown')
|
|
@@ -13351,7 +13396,7 @@ const useCheckBoxFieldControllers = ({
|
|
|
13351
13396
|
return controllers;
|
|
13352
13397
|
};
|
|
13353
13398
|
|
|
13354
|
-
var styles$
|
|
13399
|
+
var styles$18 = {"check-box-field":"_Id4qm","check-box-field__caption":"_s9d-m","check-box-field__custom-input":"_kmvBP"};
|
|
13355
13400
|
|
|
13356
13401
|
const _excluded$bj = ["name", "id", "checked", "indeterminate", "onChange", "onBlur", "label", "caption", "error", "disabled", "testId"];
|
|
13357
13402
|
/** A simple check box with an option beside it. Allows the user to confirm a statement or enable an option with a simple boolean action. Use for things like agreeing to terms, or enabling one or more options in a list (where multiple selections are allowed). */
|
|
@@ -13387,7 +13432,7 @@ const CheckboxField = _ref => {
|
|
|
13387
13432
|
flexItems: true,
|
|
13388
13433
|
flex: ['0 0 auto']
|
|
13389
13434
|
}, otherProps), React__default.createElement("div", {
|
|
13390
|
-
className: styles$
|
|
13435
|
+
className: styles$18['check-box-field']
|
|
13391
13436
|
}, React__default.createElement("input", {
|
|
13392
13437
|
name: name,
|
|
13393
13438
|
id: controllers.id,
|
|
@@ -13401,12 +13446,12 @@ const CheckboxField = _ref => {
|
|
|
13401
13446
|
onChange: controllers.onChange,
|
|
13402
13447
|
onBlur: controllers.onBlur
|
|
13403
13448
|
}), React__default.createElement("span", {
|
|
13404
|
-
className: styles$
|
|
13449
|
+
className: styles$18['check-box-field__custom-input']
|
|
13405
13450
|
})), label && React__default.createElement(Label, {
|
|
13406
13451
|
htmlFor: controllers.id,
|
|
13407
13452
|
truncate: false
|
|
13408
13453
|
}, label)), caption && React__default.createElement("div", {
|
|
13409
|
-
className: styles$
|
|
13454
|
+
className: styles$18['check-box-field__caption']
|
|
13410
13455
|
}, React__default.createElement(Caption, {
|
|
13411
13456
|
fieldId: controllers.id
|
|
13412
13457
|
}, caption)), controllers.error && React__default.createElement(ErrorMessage, {
|
|
@@ -13444,7 +13489,7 @@ const useLocalStorage = (key, initialValue) => {
|
|
|
13444
13489
|
return [storedValue, setValue];
|
|
13445
13490
|
};
|
|
13446
13491
|
|
|
13447
|
-
var styles$
|
|
13492
|
+
var styles$17 = {"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"};
|
|
13448
13493
|
|
|
13449
13494
|
const _excluded$bi = ["header", "children", "mediaUrl", "onClose", "modalId", "primaryButton", "secondaryButton", "testId", "onSetDoNotShowAgainStatus", "hideDoNotShowAgainCheckbox"];
|
|
13450
13495
|
/**
|
|
@@ -13516,22 +13561,22 @@ const HintModal = _ref => {
|
|
|
13516
13561
|
closeTimeoutMS: 200,
|
|
13517
13562
|
contentLabel: "Modal",
|
|
13518
13563
|
className: {
|
|
13519
|
-
base: styles$
|
|
13520
|
-
afterOpen: styles$
|
|
13521
|
-
beforeClose: styles$
|
|
13564
|
+
base: styles$17['hint-modal'],
|
|
13565
|
+
afterOpen: styles$17['hint-modal--after-open'],
|
|
13566
|
+
beforeClose: styles$17['hint-modal--before-close']
|
|
13522
13567
|
},
|
|
13523
|
-
overlayClassName: styles$
|
|
13568
|
+
overlayClassName: styles$17['hint-modal__overlay']
|
|
13524
13569
|
}, React__default.createElement("div", {
|
|
13525
|
-
className: styles$
|
|
13570
|
+
className: styles$17['hint-modal__close-button']
|
|
13526
13571
|
}, React__default.createElement(Button, {
|
|
13527
13572
|
theme: "link-icon",
|
|
13528
13573
|
onClick: handleOnClose
|
|
13529
13574
|
}, React__default.createElement(IconTimes, null))), mediaUrl && React__default.createElement("img", {
|
|
13530
|
-
className: styles$
|
|
13575
|
+
className: styles$17['hint-modal__image'],
|
|
13531
13576
|
src: mediaUrl,
|
|
13532
13577
|
alt: String(header)
|
|
13533
13578
|
}), React__default.createElement("div", {
|
|
13534
|
-
className: styles$
|
|
13579
|
+
className: styles$17['hint-modal__body']
|
|
13535
13580
|
}, React__default.createElement(Stack, {
|
|
13536
13581
|
justifyContent: "space-between"
|
|
13537
13582
|
}, React__default.createElement(Stack, {
|
|
@@ -13586,20 +13631,40 @@ const useModalPosition = (modalWidth = 566, modalHeight = 360) => {
|
|
|
13586
13631
|
return [position, updatePosition];
|
|
13587
13632
|
};
|
|
13588
13633
|
|
|
13589
|
-
const
|
|
13634
|
+
const AvatarContext = createContext({
|
|
13635
|
+
size: null
|
|
13636
|
+
});
|
|
13637
|
+
const useAvatarContext = () => {
|
|
13638
|
+
return useContext(AvatarContext);
|
|
13639
|
+
};
|
|
13640
|
+
|
|
13641
|
+
const _excluded$bh = ["children", "theme", "title", "size", "testId"];
|
|
13590
13642
|
const BadgeElement = (_ref, forwardedRef) => {
|
|
13591
13643
|
let {
|
|
13592
13644
|
children,
|
|
13593
13645
|
theme,
|
|
13594
13646
|
title,
|
|
13647
|
+
size: sizeProp = 'default',
|
|
13595
13648
|
testId
|
|
13596
13649
|
} = _ref,
|
|
13597
13650
|
otherProps = _objectWithoutPropertiesLoose(_ref, _excluded$bh);
|
|
13598
13651
|
const internalRef = useRef(null);
|
|
13599
13652
|
const ref = forwardedRef || internalRef;
|
|
13653
|
+
const {
|
|
13654
|
+
size: avatarSize
|
|
13655
|
+
} = useAvatarContext();
|
|
13656
|
+
const isInsideSmallAvatar = avatarSize === 'small' || avatarSize === 'medium';
|
|
13657
|
+
const size = isInsideSmallAvatar ? 'dot' : sizeProp;
|
|
13658
|
+
const withBorder = avatarSize !== null;
|
|
13659
|
+
const isDot = size === 'dot';
|
|
13600
13660
|
useLayoutEffect(() => {
|
|
13601
|
-
if (typeof ref
|
|
13602
|
-
|
|
13661
|
+
if (typeof ref === 'function' || !ref.current) return;
|
|
13662
|
+
if (!isDot && React__default.isValidElement(children) && typeof (children == null ? void 0 : children.type) !== 'string' && typeof (children == null ? void 0 : children.type) !== 'number') {
|
|
13663
|
+
ref.current.style.padding = '0';
|
|
13664
|
+
ref.current.style.width = ref.current.offsetHeight + 'px';
|
|
13665
|
+
} else if (isDot) {
|
|
13666
|
+
ref.current.style.padding = '';
|
|
13667
|
+
ref.current.style.width = '';
|
|
13603
13668
|
}
|
|
13604
13669
|
});
|
|
13605
13670
|
return React__default.createElement(Tooltip, {
|
|
@@ -13611,11 +13676,15 @@ const BadgeElement = (_ref, forwardedRef) => {
|
|
|
13611
13676
|
[styles$1h['badge--danger']]: theme === 'danger',
|
|
13612
13677
|
[styles$1h['badge--info']]: theme === 'info',
|
|
13613
13678
|
[styles$1h['badge--warning']]: theme === 'warning',
|
|
13614
|
-
[styles$1h['badge--numeric']]: Number.isFinite(children)
|
|
13679
|
+
[styles$1h['badge--numeric']]: !isDot && Number.isFinite(children),
|
|
13680
|
+
[styles$1h['badge--dot']]: isDot,
|
|
13681
|
+
[styles$1h['badge--with-border']]: withBorder
|
|
13615
13682
|
}),
|
|
13616
13683
|
ref: ref,
|
|
13617
13684
|
"data-testid": testId
|
|
13618
|
-
}, otherProps), children)
|
|
13685
|
+
}, otherProps), isDot ? null : React__default.isValidElement(children) && typeof children.type !== 'string' && typeof children.type !== 'number' ? React__default.cloneElement(children, {
|
|
13686
|
+
size: 'small'
|
|
13687
|
+
}) : children));
|
|
13619
13688
|
};
|
|
13620
13689
|
/**
|
|
13621
13690
|
* Badge is a small circular indicator used to draw attention to something associated with another element — a count, a status, or a quick action.
|
|
@@ -13686,7 +13755,7 @@ const TOAST_THEME = {
|
|
|
13686
13755
|
};
|
|
13687
13756
|
const TOAST_CONTAINER_ID = 'sous-chef-toast';
|
|
13688
13757
|
|
|
13689
|
-
var styles$
|
|
13758
|
+
var styles$16 = {"toast":"_iSC5P","toast--danger":"_OWpOG","toast__text":"_4JJwF"};
|
|
13690
13759
|
|
|
13691
13760
|
const toast = (text, theme = TOAST_THEME.DEFAULT, options = {}) => {
|
|
13692
13761
|
if (typeof text !== 'string') {
|
|
@@ -13703,8 +13772,8 @@ const toast = (text, theme = TOAST_THEME.DEFAULT, options = {}) => {
|
|
|
13703
13772
|
onActionClick: onActionClick
|
|
13704
13773
|
}) : text;
|
|
13705
13774
|
toast$1(content, _extends({
|
|
13706
|
-
className: classnames(styles$
|
|
13707
|
-
[styles$
|
|
13775
|
+
className: classnames(styles$16['toast'], {
|
|
13776
|
+
[styles$16['toast--danger']]: theme === TOAST_THEME.DANGER
|
|
13708
13777
|
}),
|
|
13709
13778
|
containerId: TOAST_CONTAINER_ID
|
|
13710
13779
|
}, options));
|
|
@@ -13730,7 +13799,7 @@ const ToastBodyWithAction = ({
|
|
|
13730
13799
|
const ToastContainer = ({
|
|
13731
13800
|
containerId: _containerId = TOAST_CONTAINER_ID
|
|
13732
13801
|
}) => React__default.createElement(ToastContainer$1, {
|
|
13733
|
-
bodyClassName: styles$
|
|
13802
|
+
bodyClassName: styles$16['toast__text'],
|
|
13734
13803
|
hideProgressBar: true,
|
|
13735
13804
|
draggable: false,
|
|
13736
13805
|
transition: Slide,
|
|
@@ -13805,7 +13874,7 @@ const SousChefProvider = ({
|
|
|
13805
13874
|
}, React__default.createElement(ToastContainer, null), children));
|
|
13806
13875
|
};
|
|
13807
13876
|
|
|
13808
|
-
var styles$
|
|
13877
|
+
var styles$15 = {"data-table-header":"_F4U3o","data-table-header__item":"_KKljd","data-table-header__item--sortable":"_oKH7a","data-table-header__itemfocus":"_xrDya","data-table-header__item--action":"_RLGaD","data-table-header__item-content":"_3p3fm","data-table-header__item-content--right-align":"_rXid3","data-table-header__item-content--has-description":"_vgjHE","data-table-header__sort-icon":"_-xiIl"};
|
|
13809
13878
|
|
|
13810
13879
|
const SORT_ORDER = {
|
|
13811
13880
|
ASC: 'asc',
|
|
@@ -13991,7 +14060,7 @@ const DataTableHeader = ({
|
|
|
13991
14060
|
},
|
|
13992
14061
|
id: `${tableId}-header`
|
|
13993
14062
|
}, React__default.createElement("tr", {
|
|
13994
|
-
className: styles$
|
|
14063
|
+
className: styles$15['data-table-header']
|
|
13995
14064
|
}, columns.filter(column => !column.hidden).map(column => {
|
|
13996
14065
|
const isSortable = column.isSortable;
|
|
13997
14066
|
const sortDir = column.currentSort;
|
|
@@ -13999,8 +14068,8 @@ const DataTableHeader = ({
|
|
|
13999
14068
|
const hasDescription = !!column.description;
|
|
14000
14069
|
return React__default.createElement("th", {
|
|
14001
14070
|
className: classnames({
|
|
14002
|
-
[styles$
|
|
14003
|
-
[styles$
|
|
14071
|
+
[styles$15['data-table-header__item']]: true,
|
|
14072
|
+
[styles$15['data-table-header__item--sortable']]: isSortable
|
|
14004
14073
|
}),
|
|
14005
14074
|
style: {
|
|
14006
14075
|
flex: column.size || 1,
|
|
@@ -14012,18 +14081,18 @@ const DataTableHeader = ({
|
|
|
14012
14081
|
role: "columnheader",
|
|
14013
14082
|
tabIndex: 0
|
|
14014
14083
|
}, React__default.createElement("div", {
|
|
14015
|
-
className: classnames(styles$
|
|
14016
|
-
[styles$
|
|
14084
|
+
className: classnames(styles$15['data-table-header__item-content'], {
|
|
14085
|
+
[styles$15['data-table-header__item-content--right-align']]: isRightAligned
|
|
14017
14086
|
}, {
|
|
14018
|
-
[styles$
|
|
14087
|
+
[styles$15['data-table-header__item-content--has-description']]: hasDescription
|
|
14019
14088
|
})
|
|
14020
14089
|
}, wrapWithTooltip(column), isSortable && React__default.createElement("span", {
|
|
14021
|
-
className: styles$
|
|
14090
|
+
className: styles$15['data-table-header__sort-icon']
|
|
14022
14091
|
}, React__default.createElement(HeaderSortIcon, {
|
|
14023
14092
|
sortDirection: sortDir
|
|
14024
14093
|
}))));
|
|
14025
14094
|
}), showActionMenu && React__default.createElement("th", {
|
|
14026
|
-
className: classnames(styles$
|
|
14095
|
+
className: classnames(styles$15['data-table-header__item'], styles$15['data-table-header__item--action'])
|
|
14027
14096
|
}))));
|
|
14028
14097
|
};
|
|
14029
14098
|
const wrapWithTooltip = column => {
|
|
@@ -14037,9 +14106,9 @@ const wrapWithTooltip = column => {
|
|
|
14037
14106
|
return column.label;
|
|
14038
14107
|
};
|
|
14039
14108
|
|
|
14040
|
-
var styles$
|
|
14109
|
+
var styles$14 = {"data-table":"_zEfoA","data-table__content":"_v-WNu","data-table__content--with-scroll":"_xI2-r","data-table__background-loading":"_ED7Nm","data-table__table":"_fnq34","data-table__table--no-columns":"_qSrJq","data-table__body":"_1SNLz","data-table__body--no-bottom-radius":"_zCIMD","data-table__footer":"_mp1Ok","data-table__pagination-controls":"_vdEZz"};
|
|
14041
14110
|
|
|
14042
|
-
var styles$
|
|
14111
|
+
var styles$13 = {"data-table-scroll-fake-border":"_wZ8Xg","data-table-scroll-fake-border--fixed-scroll":"_C5CU0","data-table-scroll-fake-border--top":"_L5fRB","data-table-scroll-fake-border--bottom":"_omhE4","data-table-scroll-fake-border__left":"_mpDFy","data-table-scroll-fake-border__left--top":"_G3b-p","data-table-scroll-fake-border__left--bottom":"_YUMxZ","data-table-scroll-fake-border__right":"_xUVcY","data-table-scroll-fake-border__right--top":"_BE0hn","data-table-scroll-fake-border__right--bottom":"_UtFdB"};
|
|
14043
14112
|
|
|
14044
14113
|
const useTableHeaderHeight = isShowingColumns => {
|
|
14045
14114
|
const {
|
|
@@ -14091,10 +14160,10 @@ const DataTableScrollFakeBorder = ({
|
|
|
14091
14160
|
const hasFixedScroll = useDetectFixedScroll();
|
|
14092
14161
|
const backgroundColor = useBackgroundColor();
|
|
14093
14162
|
return React__default.createElement("div", {
|
|
14094
|
-
className: classnames(styles$
|
|
14095
|
-
[styles$
|
|
14096
|
-
[styles$
|
|
14097
|
-
[styles$
|
|
14163
|
+
className: classnames(styles$13['data-table-scroll-fake-border'], {
|
|
14164
|
+
[styles$13['data-table-scroll-fake-border--top']]: placement === 'top',
|
|
14165
|
+
[styles$13['data-table-scroll-fake-border--bottom']]: placement === 'bottom',
|
|
14166
|
+
[styles$13['data-table-scroll-fake-border--fixed-scroll']]: hasFixedScroll
|
|
14098
14167
|
}),
|
|
14099
14168
|
style: {
|
|
14100
14169
|
// @ts-expect-error This difines a custom CSS variable
|
|
@@ -14102,14 +14171,14 @@ const DataTableScrollFakeBorder = ({
|
|
|
14102
14171
|
top: placement === 'top' ? headerHeight : undefined
|
|
14103
14172
|
}
|
|
14104
14173
|
}, React__default.createElement("div", {
|
|
14105
|
-
className: classnames(styles$
|
|
14106
|
-
[styles$
|
|
14107
|
-
[styles$
|
|
14174
|
+
className: classnames(styles$13['data-table-scroll-fake-border__left'], {
|
|
14175
|
+
[styles$13['data-table-scroll-fake-border__left--top']]: placement === 'top',
|
|
14176
|
+
[styles$13['data-table-scroll-fake-border__left--bottom']]: placement === 'bottom'
|
|
14108
14177
|
})
|
|
14109
14178
|
}), React__default.createElement("div", {
|
|
14110
|
-
className: classnames(styles$
|
|
14111
|
-
[styles$
|
|
14112
|
-
[styles$
|
|
14179
|
+
className: classnames(styles$13['data-table-scroll-fake-border__right'], {
|
|
14180
|
+
[styles$13['data-table-scroll-fake-border__right--top']]: placement === 'top',
|
|
14181
|
+
[styles$13['data-table-scroll-fake-border__right--bottom']]: placement === 'bottom'
|
|
14113
14182
|
}),
|
|
14114
14183
|
"data-background-color": "red"
|
|
14115
14184
|
}));
|
|
@@ -14127,7 +14196,7 @@ const BUTTON_THEME = {
|
|
|
14127
14196
|
UPSELL: 'upsell'
|
|
14128
14197
|
};
|
|
14129
14198
|
|
|
14130
|
-
var styles$
|
|
14199
|
+
var styles$12 = {"banner":"_omAUf","banner__title":"_8xIYW","banner__body":"_oA2J6","banner__body--multilineCTA":"_PLG8Z","banner--info":"_CRmFE","banner__icon":"_T80if","banner__icon--multiline":"_uJl2Y","banner--success":"_PgpTw","banner--danger":"_O-lNW","banner--warning":"_fICdJ","banner--upsell":"_kUB2k","banner__close":"_P6nbA","banner--single-line":"_w-zAz"};
|
|
14131
14200
|
|
|
14132
14201
|
/** Infers theme prop for Sous Chef Button CTAs if not explicitly passed, default is hollow, primaryCTA is Upsell if banner theme is Upsell*/
|
|
14133
14202
|
const ButtonCTA$1 = ({
|
|
@@ -14148,7 +14217,7 @@ const ButtonCTA$1 = ({
|
|
|
14148
14217
|
}, button.props));
|
|
14149
14218
|
};
|
|
14150
14219
|
|
|
14151
|
-
var styles$
|
|
14220
|
+
var styles$11 = {"banner__caption":"_S--Ce"};
|
|
14152
14221
|
|
|
14153
14222
|
const InlineBannerCTA = ({
|
|
14154
14223
|
primaryButton,
|
|
@@ -14180,7 +14249,7 @@ const InlineBannerCTA = ({
|
|
|
14180
14249
|
bannerTheme: bannerTheme,
|
|
14181
14250
|
primaryCTA: true
|
|
14182
14251
|
})), caption && multiLine && React__default.createElement("div", {
|
|
14183
|
-
className: styles$
|
|
14252
|
+
className: styles$11['banner__caption']
|
|
14184
14253
|
}, caption));
|
|
14185
14254
|
};
|
|
14186
14255
|
|
|
@@ -14234,21 +14303,21 @@ const InlineBanner = _ref => {
|
|
|
14234
14303
|
const Layout = multiLine ? Stack : Inline;
|
|
14235
14304
|
return React__default.createElement("div", {
|
|
14236
14305
|
"data-testid": testId,
|
|
14237
|
-
className: classnames(styles$
|
|
14238
|
-
[styles$
|
|
14239
|
-
[styles$
|
|
14240
|
-
[styles$
|
|
14241
|
-
[styles$
|
|
14242
|
-
[styles$
|
|
14243
|
-
[styles$
|
|
14306
|
+
className: classnames(styles$12['banner'], {
|
|
14307
|
+
[styles$12['banner--info']]: theme === BANNER_THEME.INFO,
|
|
14308
|
+
[styles$12['banner--warning']]: theme === BANNER_THEME.WARNING,
|
|
14309
|
+
[styles$12['banner--success']]: theme === BANNER_THEME.SUCCESS,
|
|
14310
|
+
[styles$12['banner--danger']]: theme === BANNER_THEME.DANGER,
|
|
14311
|
+
[styles$12['banner--upsell']]: theme === BANNER_THEME.UPSELL,
|
|
14312
|
+
[styles$12['banner--single-line']]: !multiLine
|
|
14244
14313
|
}),
|
|
14245
14314
|
style: positionStyles
|
|
14246
14315
|
}, React__default.createElement(Inline, {
|
|
14247
14316
|
flex: ['0 1 auto', 1],
|
|
14248
14317
|
space: 12
|
|
14249
14318
|
}, React__default.createElement("div", {
|
|
14250
|
-
className: classnames(styles$
|
|
14251
|
-
[styles$
|
|
14319
|
+
className: classnames(styles$12['banner__icon'], {
|
|
14320
|
+
[styles$12['banner__icon--multiline']]: multiLine
|
|
14252
14321
|
})
|
|
14253
14322
|
}, icon != null ? icon : React__default.createElement(InlineBannerIcon, {
|
|
14254
14323
|
theme: theme
|
|
@@ -14259,10 +14328,10 @@ const InlineBanner = _ref => {
|
|
|
14259
14328
|
flex: ['min-content'],
|
|
14260
14329
|
flexWrap: multiLine ? undefined : 'wrap'
|
|
14261
14330
|
}, title && React__default.createElement("div", {
|
|
14262
|
-
className: styles$
|
|
14331
|
+
className: styles$12['banner__title']
|
|
14263
14332
|
}, title), React__default.createElement("div", {
|
|
14264
|
-
className: classnames(styles$
|
|
14265
|
-
[styles$
|
|
14333
|
+
className: classnames(styles$12['banner__body'], {
|
|
14334
|
+
[styles$12['banner__body--multilineCTA']]: primaryButton && multiLine
|
|
14266
14335
|
})
|
|
14267
14336
|
}, children), primaryButton && React__default.createElement(InlineBannerCTA, {
|
|
14268
14337
|
primaryButton: primaryButton,
|
|
@@ -14271,7 +14340,7 @@ const InlineBanner = _ref => {
|
|
|
14271
14340
|
multiLine: multiLine,
|
|
14272
14341
|
bannerTheme: theme
|
|
14273
14342
|
})), dismissable && React__default.createElement("div", {
|
|
14274
|
-
className: styles$
|
|
14343
|
+
className: styles$12['banner__close']
|
|
14275
14344
|
}, React__default.createElement(Button, {
|
|
14276
14345
|
theme: "link-icon",
|
|
14277
14346
|
type: "button",
|
|
@@ -14287,7 +14356,7 @@ const MICRO_BANNER_THEME = {
|
|
|
14287
14356
|
UPSELL: 'upsell'
|
|
14288
14357
|
};
|
|
14289
14358
|
|
|
14290
|
-
var styles$
|
|
14359
|
+
var styles$10 = {"micro-banner":"_fRjhT","micro-banner__icon":"_UZMd0","micro-banner__content":"_mJAeX","micro-banner__content--no-icon":"_ZFsBE","micro-banner__content--no-button":"_UN43A","micro-banner__button":"_bTamw","micro-banner--info":"_ULD-f","micro-banner--success":"_5MitA","micro-banner--danger":"_8wmuB","micro-banner--warning":"_515OI","micro-banner--upsell":"_EfwcL"};
|
|
14291
14360
|
|
|
14292
14361
|
const MicroBannerIcon = ({
|
|
14293
14362
|
theme
|
|
@@ -14356,14 +14425,14 @@ const MicroBanner = _ref => {
|
|
|
14356
14425
|
const {
|
|
14357
14426
|
dataProps
|
|
14358
14427
|
} = getDataProps(otherProps);
|
|
14359
|
-
const themeClass = styles$
|
|
14360
|
-
const contentClass = classnames(styles$
|
|
14428
|
+
const themeClass = styles$10[`micro-banner--${theme}`];
|
|
14429
|
+
const contentClass = classnames(styles$10['micro-banner__content'], hideIcon && styles$10['micro-banner__content--no-icon'], !primaryButton && styles$10['micro-banner__content--no-button']);
|
|
14361
14430
|
return React__default.createElement("div", _extends({
|
|
14362
14431
|
"data-testid": testId,
|
|
14363
|
-
className: classnames(styles$
|
|
14432
|
+
className: classnames(styles$10['micro-banner'], themeClass),
|
|
14364
14433
|
style: positionProps
|
|
14365
14434
|
}, dataProps), !hideIcon && React__default.createElement("div", {
|
|
14366
|
-
className: styles$
|
|
14435
|
+
className: styles$10['micro-banner__icon'],
|
|
14367
14436
|
"data-testid": `${testId || 'micro-banner'}-icon`
|
|
14368
14437
|
}, icon != null ? icon : React__default.createElement(MicroBannerIcon, {
|
|
14369
14438
|
theme: theme
|
|
@@ -14374,7 +14443,7 @@ const MicroBanner = _ref => {
|
|
|
14374
14443
|
}, title), React__default.createElement(Text, {
|
|
14375
14444
|
as: 'caption'
|
|
14376
14445
|
}, children)), primaryButton && React__default.createElement("div", {
|
|
14377
|
-
className: styles$
|
|
14446
|
+
className: styles$10['micro-banner__button']
|
|
14378
14447
|
}, React__default.createElement(ButtonCTA, {
|
|
14379
14448
|
button: primaryButton,
|
|
14380
14449
|
bannerTheme: theme
|
|
@@ -14389,7 +14458,7 @@ const PERSISTENT_BANNER_THEME = {
|
|
|
14389
14458
|
SUCCESS: 'success'
|
|
14390
14459
|
};
|
|
14391
14460
|
|
|
14392
|
-
var styles
|
|
14461
|
+
var styles$$ = {"persistent-banner":"_FsCJQ","persistent-banner--info":"_zt-xK","persistent-banner--danger":"_rmUys","persistent-banner--upsell":"_UGrRR","persistent-banner--warning":"_9eFhn","persistent-banner--success":"_hU34n"};
|
|
14393
14462
|
|
|
14394
14463
|
/**
|
|
14395
14464
|
* PersistentBanner displays a full-width message above the main navigation.
|
|
@@ -14421,12 +14490,12 @@ const PersistentBanner = ({
|
|
|
14421
14490
|
theme: BUTTON_THEMES.LINK_CONTRAST
|
|
14422
14491
|
}, secondaryButton.props))));
|
|
14423
14492
|
return React__default.createElement("div", {
|
|
14424
|
-
className: classnames(styles
|
|
14425
|
-
[styles
|
|
14426
|
-
[styles
|
|
14427
|
-
[styles
|
|
14428
|
-
[styles
|
|
14429
|
-
[styles
|
|
14493
|
+
className: classnames(styles$$['persistent-banner'], {
|
|
14494
|
+
[styles$$['persistent-banner--info']]: _theme === PERSISTENT_BANNER_THEME.INFO,
|
|
14495
|
+
[styles$$['persistent-banner--danger']]: _theme === PERSISTENT_BANNER_THEME.DANGER,
|
|
14496
|
+
[styles$$['persistent-banner--upsell']]: _theme === PERSISTENT_BANNER_THEME.UPSELL,
|
|
14497
|
+
[styles$$['persistent-banner--warning']]: _theme === PERSISTENT_BANNER_THEME.WARNING,
|
|
14498
|
+
[styles$$['persistent-banner--success']]: _theme === PERSISTENT_BANNER_THEME.SUCCESS
|
|
14430
14499
|
}),
|
|
14431
14500
|
"data-testid": testId
|
|
14432
14501
|
}, onDismiss ? React__default.createElement(Inline, {
|
|
@@ -14491,7 +14560,7 @@ const useProgress = (progress, maxValue, getMetric = getProgressMetric) => {
|
|
|
14491
14560
|
};
|
|
14492
14561
|
};
|
|
14493
14562
|
|
|
14494
|
-
var styles
|
|
14563
|
+
var styles$_ = {"circular-progress":"_UI0Fo","circular-progress__label":"_6PNwZ","circular-progress__track":"_alBLB","circular-progress__indicator":"_VADa6"};
|
|
14495
14564
|
|
|
14496
14565
|
/**
|
|
14497
14566
|
* CircularProgress displays a circular track that fills as a count advances toward a total.
|
|
@@ -14508,7 +14577,7 @@ const CircularProgress = ({
|
|
|
14508
14577
|
} = useProgress(progress, _maxValue);
|
|
14509
14578
|
const determinant = metric.percentage * 2.79;
|
|
14510
14579
|
return React__default.createElement("div", _extends({}, elementProps, {
|
|
14511
|
-
className: styles
|
|
14580
|
+
className: styles$_['circular-progress'],
|
|
14512
14581
|
"data-testid": testId
|
|
14513
14582
|
}), React__default.createElement("svg", {
|
|
14514
14583
|
viewBox: "0 0 100 100"
|
|
@@ -14517,21 +14586,21 @@ const CircularProgress = ({
|
|
|
14517
14586
|
cy: 50,
|
|
14518
14587
|
r: 45,
|
|
14519
14588
|
strokeWidth: "10px",
|
|
14520
|
-
className: styles
|
|
14589
|
+
className: styles$_['circular-progress__track']
|
|
14521
14590
|
}), React__default.createElement("circle", {
|
|
14522
14591
|
cx: 50,
|
|
14523
14592
|
cy: 50,
|
|
14524
14593
|
r: 45,
|
|
14525
14594
|
strokeWidth: "10px",
|
|
14526
|
-
className: styles
|
|
14595
|
+
className: styles$_['circular-progress__indicator'],
|
|
14527
14596
|
strokeDashoffset: "66",
|
|
14528
14597
|
strokeDasharray: `${determinant} ${279 - determinant}`
|
|
14529
14598
|
})), React__default.createElement("div", {
|
|
14530
|
-
className: styles
|
|
14599
|
+
className: styles$_['circular-progress__label']
|
|
14531
14600
|
}, children || `${metric.progress}/${metric.maxValue}`));
|
|
14532
14601
|
};
|
|
14533
14602
|
|
|
14534
|
-
var styles$
|
|
14603
|
+
var styles$Z = {"progress-bar":"_fWvQF","progress-bar__indicator":"_vd0xc","progress-bar__indicator--complete":"_D9yNp","progress-bar__steps":"_8kdeO"};
|
|
14535
14604
|
|
|
14536
14605
|
/**
|
|
14537
14606
|
* ProgressBar shows a horizontal bar that fills as a task advances.
|
|
@@ -14549,23 +14618,23 @@ const ProgressBar = ({
|
|
|
14549
14618
|
metric
|
|
14550
14619
|
} = useProgress(progress, inferedMaxValue || 100, isUsingStepsAsMaxValue ? getProgressMetricWithSteps : getProgressMetric);
|
|
14551
14620
|
return React__default.createElement(Stack, null, React__default.createElement("div", _extends({}, elementProps, {
|
|
14552
|
-
className: styles$
|
|
14621
|
+
className: styles$Z['progress-bar'],
|
|
14553
14622
|
"data-testid": testId
|
|
14554
14623
|
}), React__default.createElement("div", {
|
|
14555
|
-
className: classnames(styles$
|
|
14556
|
-
[styles$
|
|
14624
|
+
className: classnames(styles$Z['progress-bar__indicator'], {
|
|
14625
|
+
[styles$Z['progress-bar__indicator--complete']]: metric.percentage === 100
|
|
14557
14626
|
}),
|
|
14558
14627
|
style: {
|
|
14559
14628
|
width: `${metric.percentage}%`
|
|
14560
14629
|
}
|
|
14561
14630
|
})), steps && steps.length > 0 && React__default.createElement("div", {
|
|
14562
|
-
className: styles$
|
|
14631
|
+
className: styles$Z['progress-bar__steps']
|
|
14563
14632
|
}, steps.map(step => React__default.createElement(Text, {
|
|
14564
14633
|
key: step
|
|
14565
14634
|
}, step))));
|
|
14566
14635
|
};
|
|
14567
14636
|
|
|
14568
|
-
var styles$
|
|
14637
|
+
var styles$Y = {"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"};
|
|
14569
14638
|
|
|
14570
14639
|
const SKELETON_COMPONENT = {
|
|
14571
14640
|
AVATAR: 'avatar',
|
|
@@ -14592,14 +14661,14 @@ const Skeleton = _ref => {
|
|
|
14592
14661
|
const positioning = usePositionStyles(positionStyles);
|
|
14593
14662
|
return React__default.createElement("div", {
|
|
14594
14663
|
"data-testid": testId,
|
|
14595
|
-
className: classnames(styles$
|
|
14596
|
-
[styles$
|
|
14597
|
-
[styles$
|
|
14598
|
-
[styles$
|
|
14599
|
-
[styles$
|
|
14600
|
-
[styles$
|
|
14601
|
-
[styles$
|
|
14602
|
-
[styles$
|
|
14664
|
+
className: classnames(styles$Y['skeleton'], {
|
|
14665
|
+
[styles$Y['skeleton__avatar']]: as === SKELETON_COMPONENT.AVATAR,
|
|
14666
|
+
[styles$Y['skeleton__avatar--small']]: as === SKELETON_COMPONENT.AVATAR_SMALL,
|
|
14667
|
+
[styles$Y['skeleton__avatar--medium']]: as === SKELETON_COMPONENT.AVATAR_MEDIUM,
|
|
14668
|
+
[styles$Y['skeleton__avatar--large']]: as === SKELETON_COMPONENT.AVATAR_LARGE,
|
|
14669
|
+
[styles$Y['skeleton__avatar--xlarge']]: as === SKELETON_COMPONENT.AVATAR_XLARGE,
|
|
14670
|
+
[styles$Y['skeleton__button']]: as === SKELETON_COMPONENT.BUTTON,
|
|
14671
|
+
[styles$Y['skeleton__pill']]: as === SKELETON_COMPONENT.PILL
|
|
14603
14672
|
}),
|
|
14604
14673
|
style: _extends({}, positioning, {
|
|
14605
14674
|
width: width,
|
|
@@ -14608,11 +14677,11 @@ const Skeleton = _ref => {
|
|
|
14608
14677
|
});
|
|
14609
14678
|
};
|
|
14610
14679
|
|
|
14611
|
-
var styles$
|
|
14680
|
+
var styles$X = {"data-table-row":"_hhDnr","data-table-row--clickable":"_ej5Ke","data-table-row--selected":"_qDTAh"};
|
|
14612
14681
|
|
|
14613
|
-
var styles$
|
|
14682
|
+
var styles$W = {"actions":"_ffXgN"};
|
|
14614
14683
|
|
|
14615
|
-
var styles$
|
|
14684
|
+
var styles$V = {"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-"};
|
|
14616
14685
|
|
|
14617
14686
|
const DataTableCellElement = ({
|
|
14618
14687
|
children,
|
|
@@ -14636,9 +14705,9 @@ const DataTableCellElement = ({
|
|
|
14636
14705
|
const hasError = !!error;
|
|
14637
14706
|
const errorMessage = error;
|
|
14638
14707
|
const icon = hasError && React__default.createElement("div", {
|
|
14639
|
-
className: classnames(styles$
|
|
14640
|
-
[styles$
|
|
14641
|
-
[styles$
|
|
14708
|
+
className: classnames(styles$V['data-table-cell__error-icon'], {
|
|
14709
|
+
[styles$V['data-table-cell__error-icon--right-align']]: isRightAligned,
|
|
14710
|
+
[styles$V['data-table-cell__error-icon--left-align']]: !isRightAligned
|
|
14642
14711
|
})
|
|
14643
14712
|
}, React__default.createElement(IconTimesOctagon, {
|
|
14644
14713
|
size: "medium",
|
|
@@ -14646,17 +14715,17 @@ const DataTableCellElement = ({
|
|
|
14646
14715
|
}));
|
|
14647
14716
|
const TableCell = React__default.createElement("td", {
|
|
14648
14717
|
className: classnames({
|
|
14649
|
-
[styles$
|
|
14650
|
-
[styles$
|
|
14651
|
-
[styles$
|
|
14652
|
-
}, styles$
|
|
14718
|
+
[styles$V['data-table-cell--invalid']]: hasError,
|
|
14719
|
+
[styles$V['data-table-cell--no-padding']]: _noPadding,
|
|
14720
|
+
[styles$V['data-table-cell--vertical-border']]: hasVerticalBorders
|
|
14721
|
+
}, styles$V['data-table-cell']),
|
|
14653
14722
|
colSpan: colSpan,
|
|
14654
14723
|
ref: ref
|
|
14655
14724
|
}, React__default.createElement("div", {
|
|
14656
|
-
className: classnames(styles$
|
|
14657
|
-
[styles$
|
|
14658
|
-
[styles$
|
|
14659
|
-
[styles$
|
|
14725
|
+
className: classnames(styles$V['data-table-cell__content'], {
|
|
14726
|
+
[styles$V['data-table-cell__content--with-error']]: hasError,
|
|
14727
|
+
[styles$V['data-table-cell__content--right-align']]: isRightAligned,
|
|
14728
|
+
[styles$V['data-table-cell__content--loading']]: state === DATA_TABLE_STATES.BACKGROUND_LOADING
|
|
14660
14729
|
})
|
|
14661
14730
|
}, isRightAligned && icon, children, !isRightAligned && icon));
|
|
14662
14731
|
return React__default.createElement(Tooltip, {
|
|
@@ -14680,7 +14749,7 @@ const DataTableRowActions = ({
|
|
|
14680
14749
|
return React__default.createElement(DataTableCell, {
|
|
14681
14750
|
columnIndex: columnIndex
|
|
14682
14751
|
}, React__default.createElement("div", {
|
|
14683
|
-
className: styles$
|
|
14752
|
+
className: styles$W['actions'],
|
|
14684
14753
|
"data-testid": "data-table-dropdown-menu"
|
|
14685
14754
|
}, state === 'SKELETON_LOADING' && React__default.createElement(Skeleton, {
|
|
14686
14755
|
width: 45
|
|
@@ -14693,7 +14762,7 @@ const DataTableRowActions = ({
|
|
|
14693
14762
|
})));
|
|
14694
14763
|
};
|
|
14695
14764
|
|
|
14696
|
-
var styles$
|
|
14765
|
+
var styles$U = {"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"};
|
|
14697
14766
|
|
|
14698
14767
|
const DataTableEditableCellElement = ({
|
|
14699
14768
|
name,
|
|
@@ -14742,8 +14811,8 @@ const DataTableEditableCellElement = ({
|
|
|
14742
14811
|
};
|
|
14743
14812
|
const EditableCell = React__default.createElement("div", {
|
|
14744
14813
|
className: classnames({
|
|
14745
|
-
[styles$
|
|
14746
|
-
}, styles$
|
|
14814
|
+
[styles$U['data-table-editable-cell--currency']]: _type === 'currency'
|
|
14815
|
+
}, styles$U['data-table-editable-cell']),
|
|
14747
14816
|
"data-testid": testId,
|
|
14748
14817
|
role: "cell"
|
|
14749
14818
|
}, React__default.createElement(Field, _extends({}, fieldProps), React__default.createElement(AffixContainer, {
|
|
@@ -14753,12 +14822,12 @@ const DataTableEditableCellElement = ({
|
|
|
14753
14822
|
name: name,
|
|
14754
14823
|
id: controllers.id,
|
|
14755
14824
|
className: classnames({
|
|
14756
|
-
[styles$
|
|
14757
|
-
[styles$
|
|
14758
|
-
[styles$
|
|
14759
|
-
[styles$
|
|
14760
|
-
[styles$
|
|
14761
|
-
[styles$
|
|
14825
|
+
[styles$U['data-table-editable-cell--right-aligned']]: isRightAligned,
|
|
14826
|
+
[styles$U['data-table-editable-cell--top-left']]: isTopLeftCell,
|
|
14827
|
+
[styles$U['data-table-editable-cell--top-right']]: isTopRightCell,
|
|
14828
|
+
[styles$U['data-table-editable-cell--bottom-left']]: isBottomLeftCell,
|
|
14829
|
+
[styles$U['data-table-editable-cell--bottom-right']]: isBottomRightCell,
|
|
14830
|
+
[styles$U['data-table-editable-cell--invalid']]: hasError
|
|
14762
14831
|
}),
|
|
14763
14832
|
type: _type === 'currency' ? 'number' : 'text',
|
|
14764
14833
|
step: _type === 'currency' ? 'any' : '',
|
|
@@ -14803,9 +14872,9 @@ const DataTableRowComponent = (_ref, ref) => {
|
|
|
14803
14872
|
const {
|
|
14804
14873
|
showActionMenu
|
|
14805
14874
|
} = useDataTableContext();
|
|
14806
|
-
const styleNames = classnames(styles$
|
|
14807
|
-
[styles$
|
|
14808
|
-
[styles$
|
|
14875
|
+
const styleNames = classnames(styles$X['data-table-row'], {
|
|
14876
|
+
[styles$X['data-table-row--clickable']]: onClick,
|
|
14877
|
+
[styles$X['data-table-row--selected']]: isSelected
|
|
14809
14878
|
});
|
|
14810
14879
|
const renderColumn = (columnElement, index) => {
|
|
14811
14880
|
const isUsingDataTableCell = columnElement && typeof columnElement === 'object' && 'type' in columnElement && (columnElement == null ? void 0 : columnElement.type) === DataTableCell;
|
|
@@ -14896,7 +14965,7 @@ const calculateScrollState = scrollContainer => {
|
|
|
14896
14965
|
return DATA_TABLE_SCROLL_STATES.NO_SCROLL;
|
|
14897
14966
|
};
|
|
14898
14967
|
|
|
14899
|
-
var styles$
|
|
14968
|
+
var styles$T = {"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"};
|
|
14900
14969
|
|
|
14901
14970
|
const useDataTableScrollState = stickyColumns => {
|
|
14902
14971
|
const scrollContainerRef = useRef(null);
|
|
@@ -14938,7 +15007,7 @@ const useDataTableScrollState = stickyColumns => {
|
|
|
14938
15007
|
};
|
|
14939
15008
|
};
|
|
14940
15009
|
|
|
14941
|
-
var styles$
|
|
15010
|
+
var styles$S = {"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"};
|
|
14942
15011
|
|
|
14943
15012
|
const DataTableCoverShadow = ({
|
|
14944
15013
|
isShowingColumns,
|
|
@@ -14956,11 +15025,11 @@ const DataTableCoverShadow = ({
|
|
|
14956
15025
|
return `calc(100% - ${headerHeight})`;
|
|
14957
15026
|
};
|
|
14958
15027
|
return React__default.createElement("div", {
|
|
14959
|
-
className: classnames(styles$
|
|
14960
|
-
[styles$
|
|
14961
|
-
[styles$
|
|
14962
|
-
[styles$
|
|
14963
|
-
[styles$
|
|
15028
|
+
className: classnames(styles$S['data-table-cover-shadow'], {
|
|
15029
|
+
[styles$S['data-table-cover-shadow--left']]: direction === 'left',
|
|
15030
|
+
[styles$S['data-table-cover-shadow--left-shadow']]: direction === 'left' && showShadow,
|
|
15031
|
+
[styles$S['data-table-cover-shadow--right']]: direction === 'right',
|
|
15032
|
+
[styles$S['data-table-cover-shadow--right-shadow']]: direction === 'right' && showShadow
|
|
14964
15033
|
}),
|
|
14965
15034
|
style: {
|
|
14966
15035
|
// @ts-expect-error This difines a custom CSS variable
|
|
@@ -15022,13 +15091,13 @@ const DataTableStickyColumnsContainer = ({
|
|
|
15022
15091
|
isShowingColumns: !!isShowingColumns,
|
|
15023
15092
|
showShadow: state === 'EMPTY' ? false : stickyColumns === 'left'
|
|
15024
15093
|
})), React__default.createElement("div", {
|
|
15025
|
-
className: classnames(styles$
|
|
15026
|
-
[styles$
|
|
15027
|
-
[styles$
|
|
15028
|
-
[styles$
|
|
15029
|
-
[styles$
|
|
15030
|
-
[styles$
|
|
15031
|
-
[styles$
|
|
15094
|
+
className: classnames(styles$T[containerClassName], {
|
|
15095
|
+
[styles$T[`${containerClassName}--with-footer`]]: isShowingFooter,
|
|
15096
|
+
[styles$T[`${containerClassName}--with-left-sticky-columns`]]: hasLeftColumnSticky,
|
|
15097
|
+
[styles$T[`${containerClassName}--with-left-sticky-columns-and-shadow`]]: state !== 'EMPTY' ? hasLeftColumnSticky && hasScrollOnLeft : false,
|
|
15098
|
+
[styles$T[`${containerClassName}--with-right-sticky-columns`]]: hasRightColumnSticky,
|
|
15099
|
+
[styles$T[`${containerClassName}--with-right-sticky-columns-and-shadow`]]: state !== 'EMPTY' ? hasRightColumnSticky && hasScrollOnRight : false,
|
|
15100
|
+
[styles$T[`${containerClassName}--no-shadow`]]: noShadow
|
|
15032
15101
|
}),
|
|
15033
15102
|
onScroll: onScroll,
|
|
15034
15103
|
ref: scrollContainerRef,
|
|
@@ -15036,11 +15105,11 @@ const DataTableStickyColumnsContainer = ({
|
|
|
15036
15105
|
}, children));
|
|
15037
15106
|
};
|
|
15038
15107
|
|
|
15039
|
-
var styles$
|
|
15108
|
+
var styles$R = {"data-table-empty-state":"_fCHjG"};
|
|
15040
15109
|
|
|
15041
|
-
var styles$
|
|
15110
|
+
var styles$Q = {"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"};
|
|
15042
15111
|
|
|
15043
|
-
var styles$
|
|
15112
|
+
var styles$P = {"empty-state-container-cta":"_X-dEs","empty-state-container-cta--inside-modal":"_63-SX"};
|
|
15044
15113
|
|
|
15045
15114
|
const EmptyStateContainerCTA = ({
|
|
15046
15115
|
isPaywall,
|
|
@@ -15057,8 +15126,8 @@ const EmptyStateContainerCTA = ({
|
|
|
15057
15126
|
size: BUTTON_SIZES.MIN_WIDTH_100
|
|
15058
15127
|
});
|
|
15059
15128
|
return React__default.createElement("div", {
|
|
15060
|
-
className: classnames(styles$
|
|
15061
|
-
[styles$
|
|
15129
|
+
className: classnames(styles$P['empty-state-container-cta'], {
|
|
15130
|
+
[styles$P['empty-state-container-cta--inside-modal']]: _isInsideModal
|
|
15062
15131
|
})
|
|
15063
15132
|
}, primaryButton, secondaryButton);
|
|
15064
15133
|
};
|
|
@@ -15082,7 +15151,7 @@ const EmptyStateContainerStack = ({
|
|
|
15082
15151
|
mediaComponent
|
|
15083
15152
|
}) => {
|
|
15084
15153
|
return React__default.createElement("div", {
|
|
15085
|
-
className: styles$
|
|
15154
|
+
className: styles$Q['empty-state-container-stack'],
|
|
15086
15155
|
"data-testid": testId
|
|
15087
15156
|
}, mediaComponent ? mediaComponent : mediaUrl && React__default.createElement("img", {
|
|
15088
15157
|
src: mediaUrl,
|
|
@@ -15099,7 +15168,7 @@ const EmptyStateContainerStack = ({
|
|
|
15099
15168
|
as: "body",
|
|
15100
15169
|
alignment: "center"
|
|
15101
15170
|
}, title), React__default.createElement("div", {
|
|
15102
|
-
className: styles$
|
|
15171
|
+
className: styles$Q['empty-state-container-stack__body']
|
|
15103
15172
|
}, children)), React__default.createElement(Stack, {
|
|
15104
15173
|
space: 8,
|
|
15105
15174
|
alignItems: "center"
|
|
@@ -15211,7 +15280,7 @@ const DataTableEmptyState = ({
|
|
|
15211
15280
|
columnIndex: shouldRenderStickyLeftCell ? 1 : 0,
|
|
15212
15281
|
colSpan: colSpan
|
|
15213
15282
|
}, React__default.createElement("div", {
|
|
15214
|
-
className: styles$
|
|
15283
|
+
className: styles$R['data-table-empty-state']
|
|
15215
15284
|
}, React__default.createElement(EmptyStateContainerStack, {
|
|
15216
15285
|
mediaUrl: customImage,
|
|
15217
15286
|
mediaComponent: customImage === '' ? React__default.createElement(MagnifyingGlassIllustration, null) : undefined,
|
|
@@ -15298,7 +15367,7 @@ const DataTable = _ref => {
|
|
|
15298
15367
|
return null;
|
|
15299
15368
|
}
|
|
15300
15369
|
return React__default.createElement("div", {
|
|
15301
|
-
className: styles$
|
|
15370
|
+
className: styles$14['data-table__pagination-controls'],
|
|
15302
15371
|
"data-testid": testId && `${testId}-pagination-controls`
|
|
15303
15372
|
}, React__default.createElement(PaginationControls, {
|
|
15304
15373
|
hasPrevious: isLoading ? false : hasPrevious,
|
|
@@ -15321,7 +15390,7 @@ const DataTable = _ref => {
|
|
|
15321
15390
|
tableId
|
|
15322
15391
|
}
|
|
15323
15392
|
}, React__default.createElement("div", {
|
|
15324
|
-
className: classnames(styles$
|
|
15393
|
+
className: classnames(styles$14['data-table']),
|
|
15325
15394
|
ref: tableRef,
|
|
15326
15395
|
style: positionStyles
|
|
15327
15396
|
}, React__default.createElement(DataTableStickyColumnsContainer, {
|
|
@@ -15332,24 +15401,24 @@ const DataTable = _ref => {
|
|
|
15332
15401
|
placement: "top",
|
|
15333
15402
|
isShowingColumns: !!isShowingColumns
|
|
15334
15403
|
}), React__default.createElement("div", {
|
|
15335
|
-
className: classnames(styles$
|
|
15336
|
-
[styles$
|
|
15404
|
+
className: classnames(styles$14['data-table__content'], {
|
|
15405
|
+
[styles$14['data-table__content--with-scroll']]: isScrollableTable
|
|
15337
15406
|
}),
|
|
15338
15407
|
style: conditionalStyles,
|
|
15339
15408
|
id: `${tableId}-content`
|
|
15340
15409
|
}, state === DATA_TABLE_STATES.BACKGROUND_LOADING && React__default.createElement("div", {
|
|
15341
|
-
className: styles$
|
|
15410
|
+
className: styles$14['data-table__background-loading']
|
|
15342
15411
|
}, React__default.createElement(Spinner, null)), React__default.createElement("table", _extends({
|
|
15343
|
-
className: classnames(styles$
|
|
15344
|
-
[styles$
|
|
15412
|
+
className: classnames(styles$14['data-table__table'], {
|
|
15413
|
+
[styles$14['data-table__table--no-columns']]: !isShowingColumns
|
|
15345
15414
|
})
|
|
15346
15415
|
}, dataProps), columns && isShowingColumns && React__default.createElement(DataTableHeader, {
|
|
15347
15416
|
columns: columns,
|
|
15348
15417
|
onSort: onSort,
|
|
15349
15418
|
showActionMenu: isShowingContent && showActionMenu
|
|
15350
15419
|
}), React__default.createElement("tbody", {
|
|
15351
|
-
className: classnames(styles$
|
|
15352
|
-
[styles$
|
|
15420
|
+
className: classnames(styles$14['data-table__body'], {
|
|
15421
|
+
[styles$14['data-table__body--no-bottom-radius']]: isShowingFooter && isShowingContent
|
|
15353
15422
|
}),
|
|
15354
15423
|
"data-testid": testId
|
|
15355
15424
|
}, isShowingContent && content.map((item, index) => {
|
|
@@ -15368,7 +15437,7 @@ const DataTable = _ref => {
|
|
|
15368
15437
|
}), state === DATA_TABLE_STATES.SKELETON_LOADING && React__default.createElement(React__default.Fragment, null, skeletonRows.map((_, index) => React__default.createElement(SkeletonRow, {
|
|
15369
15438
|
key: index
|
|
15370
15439
|
})))), isShowingFooter && isShowingContent && React__default.createElement("tfoot", {
|
|
15371
|
-
className: styles$
|
|
15440
|
+
className: styles$14['data-table__footer'],
|
|
15372
15441
|
"data-testid": testId && `${testId}-footer`
|
|
15373
15442
|
}, footerComponent)))), !isShowingFooter && isScrollableTable && React__default.createElement(DataTableScrollFakeBorder, {
|
|
15374
15443
|
placement: "bottom",
|
|
@@ -15376,7 +15445,7 @@ const DataTable = _ref => {
|
|
|
15376
15445
|
})), React__default.createElement(Pagination, null));
|
|
15377
15446
|
};
|
|
15378
15447
|
|
|
15379
|
-
var styles$
|
|
15448
|
+
var styles$O = {"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"};
|
|
15380
15449
|
|
|
15381
15450
|
const AccordionItem = props => {
|
|
15382
15451
|
const {
|
|
@@ -15391,9 +15460,10 @@ const AccordionItem = props => {
|
|
|
15391
15460
|
} = item;
|
|
15392
15461
|
const isFocusedByClickRef = React__default.useRef(false);
|
|
15393
15462
|
return React__default.createElement("div", {
|
|
15394
|
-
className: styles$
|
|
15463
|
+
className: styles$O['accordion-item']
|
|
15395
15464
|
}, React__default.createElement("button", {
|
|
15396
|
-
|
|
15465
|
+
type: "button",
|
|
15466
|
+
className: styles$O['accordion-item__header'],
|
|
15397
15467
|
onClick: () => {
|
|
15398
15468
|
if (isOpen) {
|
|
15399
15469
|
handleAccordionItemOpen(null);
|
|
@@ -15420,15 +15490,15 @@ const AccordionItem = props => {
|
|
|
15420
15490
|
}, typeof title === 'string' ? React__default.createElement(Text, {
|
|
15421
15491
|
emphasis: "bold"
|
|
15422
15492
|
}, title) : title, React__default.createElement(IconChevronDown, {
|
|
15423
|
-
className: styles$
|
|
15493
|
+
className: styles$O[`accordion-item__icon${isOpen ? '--active' : ''}`],
|
|
15424
15494
|
color: 'surface-on-color-subtle'
|
|
15425
15495
|
}))), React__default.createElement("div", {
|
|
15426
15496
|
"data-testid": `${isOpen ? 'accordion-item-' + id + '-open' : 'accordion-item-' + id + '-closed'}`,
|
|
15427
|
-
className: styles$
|
|
15497
|
+
className: styles$O[`accordion-item__content${isOpen ? '--active' : ''}`]
|
|
15428
15498
|
}, isOpen && React__default.createElement(Text, null, content)));
|
|
15429
15499
|
};
|
|
15430
15500
|
|
|
15431
|
-
var styles$
|
|
15501
|
+
var styles$N = {"accordion":"_058SP"};
|
|
15432
15502
|
|
|
15433
15503
|
const _excluded$bb = ["items", "onExpand", "defaultOpenId"];
|
|
15434
15504
|
/**
|
|
@@ -15459,7 +15529,7 @@ const Accordion = _ref => {
|
|
|
15459
15529
|
isAccordionMounted: true
|
|
15460
15530
|
}
|
|
15461
15531
|
}, React__default.createElement("div", _extends({
|
|
15462
|
-
className: styles$
|
|
15532
|
+
className: styles$N['accordion']
|
|
15463
15533
|
}, dataProps), items.map((item, index) => {
|
|
15464
15534
|
const id = item.id || index.toString();
|
|
15465
15535
|
return React__default.createElement(AccordionItem, {
|
|
@@ -15473,7 +15543,7 @@ const Accordion = _ref => {
|
|
|
15473
15543
|
})));
|
|
15474
15544
|
};
|
|
15475
15545
|
|
|
15476
|
-
var styles$
|
|
15546
|
+
var styles$M = {"action-list":"_pWke5","action-list__title":"_p8I7K","action-list__empty-state":"_l-tFB"};
|
|
15477
15547
|
|
|
15478
15548
|
/**
|
|
15479
15549
|
* A list of tasks or items that require user attention and can be completed with an action. Each item should have at least one clear action for the user to take.
|
|
@@ -15488,15 +15558,15 @@ const ActionList = ({
|
|
|
15488
15558
|
const translate = useTranslation('ActionList');
|
|
15489
15559
|
const hasChildren = React__default.Children.count(children) > 0;
|
|
15490
15560
|
return React__default.createElement("div", {
|
|
15491
|
-
className: styles$
|
|
15561
|
+
className: styles$M['action-list'],
|
|
15492
15562
|
"data-testid": testId,
|
|
15493
15563
|
style: {
|
|
15494
15564
|
maxHeight: maxHeight
|
|
15495
15565
|
}
|
|
15496
15566
|
}, title && React__default.createElement("div", {
|
|
15497
|
-
className: styles$
|
|
15567
|
+
className: styles$M['action-list__title']
|
|
15498
15568
|
}, title), hasChildren ? children : React__default.createElement("div", {
|
|
15499
|
-
className: styles$
|
|
15569
|
+
className: styles$M['action-list__empty-state']
|
|
15500
15570
|
}, React__default.createElement(EmptyStateContainerStack, {
|
|
15501
15571
|
title: (emptyState == null ? void 0 : emptyState.title) || translate('emptyStateTitle'),
|
|
15502
15572
|
mediaUrl: emptyState == null ? void 0 : emptyState.image,
|
|
@@ -15674,7 +15744,7 @@ const useSelectFieldControllers = ({
|
|
|
15674
15744
|
return controllers;
|
|
15675
15745
|
};
|
|
15676
15746
|
|
|
15677
|
-
var styles$
|
|
15747
|
+
var styles$L = {"custom-control":"_pXQqq"};
|
|
15678
15748
|
|
|
15679
15749
|
const _excluded$ba = ["children"];
|
|
15680
15750
|
function CustomControl(_ref) {
|
|
@@ -15688,7 +15758,7 @@ function CustomControl(_ref) {
|
|
|
15688
15758
|
} = props.selectProps.componentsProps;
|
|
15689
15759
|
const selectedOption = (_props$getValue = props.getValue()) == null ? void 0 : _props$getValue[0];
|
|
15690
15760
|
return React__default.createElement(components.Control, _extends({}, props), SelectedOptionPrefix && selectedOption ? React__default.createElement("div", {
|
|
15691
|
-
className: styles$
|
|
15761
|
+
className: styles$L['custom-control'],
|
|
15692
15762
|
style: {
|
|
15693
15763
|
paddingLeft: selectedOption ? 8 : 0
|
|
15694
15764
|
}
|
|
@@ -15867,9 +15937,9 @@ const CustomContainer = props => {
|
|
|
15867
15937
|
}));
|
|
15868
15938
|
};
|
|
15869
15939
|
|
|
15870
|
-
var styles$
|
|
15940
|
+
var styles$K = {"custom-menu-text-field":"_AAUjm","custom-menu-hr":"_mFLK9","custom-menu-div":"_1XpI4"};
|
|
15871
15941
|
|
|
15872
|
-
var styles$
|
|
15942
|
+
var styles$J = {"creatable-button--align-left":"_Qw267","creatable-button":"_f9V5D"};
|
|
15873
15943
|
|
|
15874
15944
|
/**
|
|
15875
15945
|
* Shared creatable button component used in CustomMenu and CustomGroupWithCreate.
|
|
@@ -15893,8 +15963,8 @@ const CreatableButton = ({
|
|
|
15893
15963
|
};
|
|
15894
15964
|
if (!button || typeof button === 'string') {
|
|
15895
15965
|
return React__default.createElement("div", {
|
|
15896
|
-
className: classnames(styles$
|
|
15897
|
-
[styles$
|
|
15966
|
+
className: classnames(styles$J['creatable-button'], {
|
|
15967
|
+
[styles$J['creatable-button--align-left']]: _alignLeft
|
|
15898
15968
|
})
|
|
15899
15969
|
}, React__default.createElement(Button, {
|
|
15900
15970
|
theme: "link-primary",
|
|
@@ -15919,8 +15989,8 @@ const CreatableButton = ({
|
|
|
15919
15989
|
overrideProps.theme = 'link-primary';
|
|
15920
15990
|
}
|
|
15921
15991
|
return React__default.createElement("div", {
|
|
15922
|
-
className: classnames(styles$
|
|
15923
|
-
[styles$
|
|
15992
|
+
className: classnames(styles$J['creatable-button'], {
|
|
15993
|
+
[styles$J['creatable-button--align-left']]: _alignLeft
|
|
15924
15994
|
})
|
|
15925
15995
|
}, React__default.cloneElement(button, overrideProps));
|
|
15926
15996
|
};
|
|
@@ -16012,7 +16082,7 @@ function CustomMenu(_ref) {
|
|
|
16012
16082
|
return React__default.createElement(components.Menu, _extends({}, props), React__default.createElement("div", {
|
|
16013
16083
|
ref: containerRef
|
|
16014
16084
|
}, children, React__default.createElement("hr", {
|
|
16015
|
-
className: styles$
|
|
16085
|
+
className: styles$K['custom-menu-hr']
|
|
16016
16086
|
}), !showFooter ? React__default.createElement(CreatableButton, {
|
|
16017
16087
|
creatableButton: creatableButton,
|
|
16018
16088
|
onClick: () => setShowFooter(true),
|
|
@@ -16023,13 +16093,13 @@ function CustomMenu(_ref) {
|
|
|
16023
16093
|
onMenuInputFocus: onMenuInputFocus,
|
|
16024
16094
|
onSubmit: onCreateButton,
|
|
16025
16095
|
defaultValue: inputDefaultValue,
|
|
16026
|
-
wrapperClassName: styles$
|
|
16027
|
-
inputClassName: styles$
|
|
16096
|
+
wrapperClassName: styles$K['custom-menu-div'],
|
|
16097
|
+
inputClassName: styles$K['custom-menu-text-field'],
|
|
16028
16098
|
testId: "select-create-option-input"
|
|
16029
16099
|
})));
|
|
16030
16100
|
}
|
|
16031
16101
|
|
|
16032
|
-
var styles$
|
|
16102
|
+
var styles$I = {"custom-group-with-create-text-field":"_JZG4r","custom-group-with-create-hr":"_04fIM","custom-group-with-create-input-wrapper":"_oJzDV","custom-group-with-create-button-wrapper":"_hLu2D"};
|
|
16033
16103
|
|
|
16034
16104
|
function CustomGroupWithCreate(props) {
|
|
16035
16105
|
const {
|
|
@@ -16063,7 +16133,7 @@ function CustomGroupWithCreate(props) {
|
|
|
16063
16133
|
return React__default.createElement("div", {
|
|
16064
16134
|
ref: containerRef
|
|
16065
16135
|
}, React__default.createElement(components.Group, _extends({}, props)), !isInputActive ? React__default.createElement("div", {
|
|
16066
|
-
className: styles$
|
|
16136
|
+
className: styles$I['custom-group-with-create-button-wrapper']
|
|
16067
16137
|
}, React__default.createElement(CreatableButton, {
|
|
16068
16138
|
creatableButton: creatableButton,
|
|
16069
16139
|
onClick: () => setActiveGroupLabel(groupLabel),
|
|
@@ -16075,8 +16145,8 @@ function CustomGroupWithCreate(props) {
|
|
|
16075
16145
|
onMenuInputFocus: onMenuInputFocus,
|
|
16076
16146
|
onSubmit: onCreateButton,
|
|
16077
16147
|
defaultValue: inputDefaultValue,
|
|
16078
|
-
wrapperClassName: styles$
|
|
16079
|
-
inputClassName: styles$
|
|
16148
|
+
wrapperClassName: styles$I['custom-group-with-create-input-wrapper'],
|
|
16149
|
+
inputClassName: styles$I['custom-group-with-create-text-field'],
|
|
16080
16150
|
testId: `select-create-option-input-${groupLabel}`
|
|
16081
16151
|
}));
|
|
16082
16152
|
}
|
|
@@ -16185,7 +16255,7 @@ const useSelectField = _ref => {
|
|
|
16185
16255
|
};
|
|
16186
16256
|
};
|
|
16187
16257
|
|
|
16188
|
-
var styles$
|
|
16258
|
+
var styles$H = {"select-field__suffix":"_vqC1M"};
|
|
16189
16259
|
|
|
16190
16260
|
/** Simple dropdown field where the user chooses one option from a predefined list. */
|
|
16191
16261
|
const SelectField = props => {
|
|
@@ -16195,7 +16265,7 @@ const SelectField = props => {
|
|
|
16195
16265
|
} = useSelectField(props);
|
|
16196
16266
|
//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
|
|
16197
16267
|
const suffixWithMargin = props.suffix ? React__default.createElement("div", {
|
|
16198
|
-
className: styles$
|
|
16268
|
+
className: styles$H['select-field__suffix']
|
|
16199
16269
|
}, props.suffix) : undefined;
|
|
16200
16270
|
return React__default.createElement(Field, _extends({}, fieldProps), React__default.createElement(AffixContainer, {
|
|
16201
16271
|
prefix: props.prefix,
|
|
@@ -16240,9 +16310,9 @@ const ToolbarSelect = _ref => {
|
|
|
16240
16310
|
}, rest));
|
|
16241
16311
|
};
|
|
16242
16312
|
|
|
16243
|
-
var styles$
|
|
16313
|
+
var styles$G = {"date-filter":"_PyXfe","date-filter--wide":"_P6ttU"};
|
|
16244
16314
|
|
|
16245
|
-
var styles$
|
|
16315
|
+
var styles$F = {"date-filter-display":"_N37zE","date-filter-display--non-interactive":"_42Bvz","date-filter-display--wide":"_h8n2w","date-filter-display__display-icon":"_i08yV"};
|
|
16246
16316
|
|
|
16247
16317
|
const DATE_FILTER_MODE = {
|
|
16248
16318
|
DAY: 'day',
|
|
@@ -16296,8 +16366,8 @@ const DateFilterDisplay = forwardRef(({
|
|
|
16296
16366
|
onClick
|
|
16297
16367
|
}, ref) => {
|
|
16298
16368
|
return React__default.createElement("button", {
|
|
16299
|
-
className: classnames(styles$
|
|
16300
|
-
[styles$
|
|
16369
|
+
className: classnames(styles$F['date-filter-display'], {
|
|
16370
|
+
[styles$F['date-filter-display--wide']]: mode === DATE_FILTER_MODE.WEEK
|
|
16301
16371
|
}),
|
|
16302
16372
|
onClick: onClick,
|
|
16303
16373
|
tabIndex: mode === DATE_FILTER_MODE.MONTH ? -1 : undefined,
|
|
@@ -16306,7 +16376,7 @@ const DateFilterDisplay = forwardRef(({
|
|
|
16306
16376
|
space: 12,
|
|
16307
16377
|
alignItems: "center"
|
|
16308
16378
|
}, React__default.createElement("div", {
|
|
16309
|
-
className: classnames(styles$
|
|
16379
|
+
className: classnames(styles$F['date-filter-display__display-icon'])
|
|
16310
16380
|
}, React__default.createElement(IconCalendarAlt, {
|
|
16311
16381
|
size: "flexible",
|
|
16312
16382
|
color: "surface-on-color-subtle"
|
|
@@ -16317,7 +16387,7 @@ const DateFilterDisplay = forwardRef(({
|
|
|
16317
16387
|
})));
|
|
16318
16388
|
});
|
|
16319
16389
|
|
|
16320
|
-
var styles$
|
|
16390
|
+
var styles$E = {"date-stepper":"_9wFtw","date-stepper--backward":"_OrtcR","date-stepper--forward":"_oYoUt"};
|
|
16321
16391
|
|
|
16322
16392
|
const handleDateStepper = (date, mode, stepDirection, onChange) => {
|
|
16323
16393
|
const step = stepDirection === STEP_DIRECTION.FORWARD ? 1 : -1;
|
|
@@ -16346,9 +16416,9 @@ const DateFilterStepper = ({
|
|
|
16346
16416
|
date
|
|
16347
16417
|
}) => {
|
|
16348
16418
|
return React__default.createElement("button", {
|
|
16349
|
-
className: classnames(styles$
|
|
16350
|
-
[styles$
|
|
16351
|
-
[styles$
|
|
16419
|
+
className: classnames(styles$E['date-stepper'], {
|
|
16420
|
+
[styles$E['date-stepper--backward']]: stepDirection === STEP_DIRECTION.BACKWARD,
|
|
16421
|
+
[styles$E['date-stepper--forward']]: stepDirection === STEP_DIRECTION.FORWARD
|
|
16352
16422
|
}),
|
|
16353
16423
|
onClick: () => handleDateStepper(date, mode, stepDirection, onChange)
|
|
16354
16424
|
}, children);
|
|
@@ -16413,9 +16483,9 @@ const CalendarMonth = ({
|
|
|
16413
16483
|
}
|
|
16414
16484
|
const MONTHS = [...Array(12).keys()];
|
|
16415
16485
|
return React__default.createElement(Portal, null, React__default.createElement("div", {
|
|
16416
|
-
className: styles$
|
|
16486
|
+
className: styles$1b['calendar']
|
|
16417
16487
|
}, React__default.createElement("div", {
|
|
16418
|
-
className: styles$
|
|
16488
|
+
className: styles$1b['calendar__overlay'],
|
|
16419
16489
|
ref: ref => setCalendarRef(ref),
|
|
16420
16490
|
style: _extends({}, calendarPosition, {
|
|
16421
16491
|
zIndex: isInsideDropdown ? getZIndex('dropdown-level-2') : getZIndex('dropdown')
|
|
@@ -16493,8 +16563,8 @@ const DateFilter = ({
|
|
|
16493
16563
|
const onClickOutside = useCallback(() => setCalendarOpen(false), [setCalendarOpen]);
|
|
16494
16564
|
return React__default.createElement("div", {
|
|
16495
16565
|
"data-testid": testId,
|
|
16496
|
-
className: classnames(styles$
|
|
16497
|
-
[styles$
|
|
16566
|
+
className: classnames(styles$G['date-filter'], {
|
|
16567
|
+
[styles$G['date-filter--wide']]: _mode === DATE_FILTER_MODE.WEEK
|
|
16498
16568
|
})
|
|
16499
16569
|
}, React__default.createElement(Inline, {
|
|
16500
16570
|
space: 0
|
|
@@ -16538,7 +16608,7 @@ const DateFilter = ({
|
|
|
16538
16608
|
}));
|
|
16539
16609
|
};
|
|
16540
16610
|
|
|
16541
|
-
var styles$
|
|
16611
|
+
var styles$D = {"segmented-control":"_RezMY","segmented-control__button":"_lehFG","segmented-control__button--selected":"_Fr5kb"};
|
|
16542
16612
|
|
|
16543
16613
|
const SegmentedControl = ({
|
|
16544
16614
|
options,
|
|
@@ -16550,21 +16620,21 @@ const SegmentedControl = ({
|
|
|
16550
16620
|
return option === value;
|
|
16551
16621
|
};
|
|
16552
16622
|
return React__default.createElement("div", {
|
|
16553
|
-
className: styles$
|
|
16623
|
+
className: styles$D['segmented-control'],
|
|
16554
16624
|
"data-testid": testId
|
|
16555
16625
|
}, options.map(option => React__default.createElement(React__default.Fragment, {
|
|
16556
16626
|
key: option
|
|
16557
16627
|
}, React__default.createElement("button", {
|
|
16558
16628
|
onClick: () => onChange(option),
|
|
16559
|
-
className: classnames(styles$
|
|
16560
|
-
[styles$
|
|
16629
|
+
className: classnames(styles$D['segmented-control__button'], {
|
|
16630
|
+
[styles$D['segmented-control__button--selected']]: isSelected(option)
|
|
16561
16631
|
})
|
|
16562
16632
|
}, option))));
|
|
16563
16633
|
};
|
|
16564
16634
|
|
|
16565
|
-
var styles$
|
|
16635
|
+
var styles$C = {"form--standard-size":"_8-Ykj"};
|
|
16566
16636
|
|
|
16567
|
-
var styles$
|
|
16637
|
+
var styles$B = {"form-section":"_3uYIj","form-section__title":"_2WdOf","form-section__subtitle":"_zybxx","form-section--no-margin":"_xT-U1"};
|
|
16568
16638
|
|
|
16569
16639
|
/**
|
|
16570
16640
|
* FormSection is a component that groups related form fields together, optionally with a title and subtitle. It can also be rendered as a card for visual separation.
|
|
@@ -16580,13 +16650,13 @@ const FormSection = ({
|
|
|
16580
16650
|
const content = React__default.createElement(Stack, null, (title || subtitle) && React__default.createElement(Stack, {
|
|
16581
16651
|
space: 8
|
|
16582
16652
|
}, title && React__default.createElement("h2", {
|
|
16583
|
-
className: classnames(styles$
|
|
16653
|
+
className: classnames(styles$B['form-section__title'])
|
|
16584
16654
|
}, title), subtitle && React__default.createElement("h3", {
|
|
16585
|
-
className: classnames(styles$
|
|
16655
|
+
className: classnames(styles$B['form-section__subtitle'])
|
|
16586
16656
|
}, subtitle)), children);
|
|
16587
16657
|
return React__default.createElement("div", {
|
|
16588
|
-
className: classnames(styles$
|
|
16589
|
-
[styles$
|
|
16658
|
+
className: classnames(styles$B['form-section'], {
|
|
16659
|
+
[styles$B['form-section--no-margin']]: _noMargin || as === 'card'
|
|
16590
16660
|
}),
|
|
16591
16661
|
"data-testid": testId
|
|
16592
16662
|
}, as === 'card' ? React__default.createElement(Card, {
|
|
@@ -16606,7 +16676,7 @@ const updateButtonProps = (child, newProps) => {
|
|
|
16606
16676
|
}, newProps, child.props));
|
|
16607
16677
|
};
|
|
16608
16678
|
|
|
16609
|
-
var styles$
|
|
16679
|
+
var styles$A = {"form-footer":"_4ksfB"};
|
|
16610
16680
|
|
|
16611
16681
|
const FormFooterActions = ({
|
|
16612
16682
|
actions
|
|
@@ -16645,7 +16715,7 @@ const FormFooter = ({
|
|
|
16645
16715
|
});
|
|
16646
16716
|
const isInlineChildren = React__default.Children.count(children) === 1 && React__default.isValidElement(children) && children.type === Inline;
|
|
16647
16717
|
return React__default.createElement("div", {
|
|
16648
|
-
className: classnames(styles$
|
|
16718
|
+
className: classnames(styles$A['form-footer']),
|
|
16649
16719
|
"data-testid": testId
|
|
16650
16720
|
}, actions && React__default.createElement(FormFooterActions, {
|
|
16651
16721
|
actions: actions
|
|
@@ -16683,13 +16753,13 @@ const Form = ({
|
|
|
16683
16753
|
}, React__default.createElement("form", {
|
|
16684
16754
|
onSubmit: onSubmit ? handleSubmit : formik == null ? void 0 : formik.handleSubmit,
|
|
16685
16755
|
className: classnames({
|
|
16686
|
-
[styles$
|
|
16756
|
+
[styles$C['form--standard-size']]: !_wide
|
|
16687
16757
|
}),
|
|
16688
16758
|
"data-testid": testId
|
|
16689
16759
|
}, _stackContent ? React__default.createElement(Stack, null, formattedChildren) : formattedChildren));
|
|
16690
16760
|
};
|
|
16691
16761
|
|
|
16692
|
-
var styles$
|
|
16762
|
+
var styles$z = {"form-row":"_xX-RS"};
|
|
16693
16763
|
|
|
16694
16764
|
const SIZE_25_PERCENT = '25%';
|
|
16695
16765
|
const SIZE_33_PERCENT = '33.333%';
|
|
@@ -16716,14 +16786,14 @@ const FormRow = ({
|
|
|
16716
16786
|
space: _space,
|
|
16717
16787
|
testId: testId,
|
|
16718
16788
|
alignItems: "stretch",
|
|
16719
|
-
extraClass: styles$
|
|
16789
|
+
extraClass: styles$z['form-row']
|
|
16720
16790
|
}, children, additionalColumns.map((_, index) => React__default.createElement("span", {
|
|
16721
16791
|
key: index,
|
|
16722
16792
|
"data-testid": "empty-cell"
|
|
16723
16793
|
})));
|
|
16724
16794
|
};
|
|
16725
16795
|
|
|
16726
|
-
var styles$
|
|
16796
|
+
var styles$y = {"text-field":"_JaB08","text-field--focus":"_62RIR","text-field--disabled":"_CDt23","text-field--invalid":"_wf4XP","text-field__toolbar":"_7xVsj"};
|
|
16727
16797
|
|
|
16728
16798
|
const useGrowTextAreaRef = (minHeight, maxHeight, autoGrow, forwardedRef) => {
|
|
16729
16799
|
const textareaRef = useRef(null);
|
|
@@ -16793,10 +16863,10 @@ const TextAreaField = ({
|
|
|
16793
16863
|
return React__default.createElement(Field, _extends({}, fieldProps, {
|
|
16794
16864
|
characterCount: controllers.value !== undefined && maxLength ? maxLength - controllers.value.length : undefined
|
|
16795
16865
|
}), React__default.createElement("div", {
|
|
16796
|
-
className: classnames(styles$
|
|
16797
|
-
[styles$
|
|
16798
|
-
[styles$
|
|
16799
|
-
[styles$
|
|
16866
|
+
className: classnames(styles$y['text-field'], {
|
|
16867
|
+
[styles$y['text-field--invalid']]: hasError,
|
|
16868
|
+
[styles$y['text-field--disabled']]: disabled,
|
|
16869
|
+
[styles$y['text-field--focus']]: hasFocus
|
|
16800
16870
|
}),
|
|
16801
16871
|
ref: containerRef,
|
|
16802
16872
|
onClick: event => {
|
|
@@ -16828,7 +16898,7 @@ const TextAreaField = ({
|
|
|
16828
16898
|
ref: textAreaRef,
|
|
16829
16899
|
maxLength: maxLength
|
|
16830
16900
|
}), toolbar && React__default.createElement("div", {
|
|
16831
|
-
className: styles$
|
|
16901
|
+
className: styles$y['text-field__toolbar'],
|
|
16832
16902
|
id: `${controllers.id}-toolbar`,
|
|
16833
16903
|
ref: toolbarRef,
|
|
16834
16904
|
onClick: event => {
|
|
@@ -16865,7 +16935,7 @@ const TextFieldElement = (_ref, ref) => {
|
|
|
16865
16935
|
*/
|
|
16866
16936
|
const TextField = forwardRef(TextFieldElement);
|
|
16867
16937
|
|
|
16868
|
-
var styles$
|
|
16938
|
+
var styles$x = {"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"};
|
|
16869
16939
|
|
|
16870
16940
|
const useMultiSelectFieldControllers = ({
|
|
16871
16941
|
name,
|
|
@@ -16930,10 +17000,10 @@ const CreatableOption = ({
|
|
|
16930
17000
|
};
|
|
16931
17001
|
return React__default.createElement(React__default.Fragment, null, !isCreatingOption && React__default.createElement("div", {
|
|
16932
17002
|
key: 'pill-select-field-create-option',
|
|
16933
|
-
className: styles$
|
|
17003
|
+
className: styles$x['pill-select-field']
|
|
16934
17004
|
}, React__default.createElement("button", {
|
|
16935
17005
|
"data-testid": testId ? `${testId}-create-option` : undefined,
|
|
16936
|
-
className: styles$
|
|
17006
|
+
className: styles$x['pill-select-field__add-new-input'],
|
|
16937
17007
|
onClick: () => {
|
|
16938
17008
|
setIsCreatingOption(true);
|
|
16939
17009
|
setNewOptionLabel('');
|
|
@@ -16942,9 +17012,9 @@ const CreatableOption = ({
|
|
|
16942
17012
|
size: "small"
|
|
16943
17013
|
}), createOptionLabel)), isCreatingOption && React__default.createElement("div", {
|
|
16944
17014
|
key: 'pill-select-field-creating-option',
|
|
16945
|
-
className: styles$
|
|
17015
|
+
className: styles$x['pill-select-field']
|
|
16946
17016
|
}, React__default.createElement("input", {
|
|
16947
|
-
className: styles$
|
|
17017
|
+
className: styles$x['pill-select-field__creating-input'],
|
|
16948
17018
|
name: `${name}-pill-select-field-creating-option`,
|
|
16949
17019
|
id: 'pill-select-field-creating-option',
|
|
16950
17020
|
type: "text",
|
|
@@ -16965,7 +17035,7 @@ const CreatableOption = ({
|
|
|
16965
17035
|
}
|
|
16966
17036
|
}
|
|
16967
17037
|
}), React__default.createElement("span", {
|
|
16968
|
-
className: styles$
|
|
17038
|
+
className: styles$x['pill-select-field__creating-custom-input']
|
|
16969
17039
|
}, !newOptionLabel && React__default.createElement(Text, {
|
|
16970
17040
|
as: "body",
|
|
16971
17041
|
color: "surface-on-color-disabled"
|
|
@@ -17016,7 +17086,7 @@ const PillSelectField = ({
|
|
|
17016
17086
|
}
|
|
17017
17087
|
};
|
|
17018
17088
|
return React__default.createElement("button", {
|
|
17019
|
-
className: styles$
|
|
17089
|
+
className: styles$x['pill-select-field__removable-icon'],
|
|
17020
17090
|
onClick: handleClick,
|
|
17021
17091
|
disabled: disabled
|
|
17022
17092
|
}, React__default.createElement(IconTimes, {
|
|
@@ -17033,7 +17103,7 @@ const PillSelectField = ({
|
|
|
17033
17103
|
const itemId = `${controllers.id}-${itemIdentifier}`;
|
|
17034
17104
|
return React__default.createElement("div", {
|
|
17035
17105
|
key: itemIdentifier,
|
|
17036
|
-
className: styles$
|
|
17106
|
+
className: styles$x['pill-select-field']
|
|
17037
17107
|
}, React__default.createElement("input", {
|
|
17038
17108
|
name: `${name}-${itemIdentifier}`,
|
|
17039
17109
|
id: itemId,
|
|
@@ -17053,7 +17123,7 @@ const PillSelectField = ({
|
|
|
17053
17123
|
controllers.onChange(newValue);
|
|
17054
17124
|
}
|
|
17055
17125
|
}), React__default.createElement("span", {
|
|
17056
|
-
className: styles$
|
|
17126
|
+
className: styles$x['pill-select-field__custom-input']
|
|
17057
17127
|
}, option.label, option.isRemovable && React__default.createElement(RemoveButton, {
|
|
17058
17128
|
option: option
|
|
17059
17129
|
})));
|
|
@@ -17065,7 +17135,7 @@ const PillSelectField = ({
|
|
|
17065
17135
|
})));
|
|
17066
17136
|
};
|
|
17067
17137
|
|
|
17068
|
-
var styles$
|
|
17138
|
+
var styles$w = {"week-select-field":"_IYHYX","week-select-field__day":"_JnbPv","week-select-field__day-pill":"_9GwLj","week-select-field__day-abbr":"_WcKdi","week-select-field__day-num":"_MQ3xL"};
|
|
17069
17139
|
|
|
17070
17140
|
const toKey = d => `${d.getFullYear()}-${d.getMonth()}-${d.getDate()}`;
|
|
17071
17141
|
/**
|
|
@@ -17110,14 +17180,14 @@ const WeekSelectField = ({
|
|
|
17110
17180
|
caption: caption,
|
|
17111
17181
|
error: error
|
|
17112
17182
|
}, React__default.createElement("div", {
|
|
17113
|
-
className: styles$
|
|
17183
|
+
className: styles$w['week-select-field']
|
|
17114
17184
|
}, days.map((day, index) => {
|
|
17115
17185
|
const key = toKey(day);
|
|
17116
17186
|
const isChecked = selectedKeys.has(key);
|
|
17117
17187
|
const itemId = `${id}-${key}`;
|
|
17118
17188
|
return React__default.createElement("div", {
|
|
17119
17189
|
key: key,
|
|
17120
|
-
className: styles$
|
|
17190
|
+
className: styles$w['week-select-field__day']
|
|
17121
17191
|
}, React__default.createElement("input", {
|
|
17122
17192
|
type: "checkbox",
|
|
17123
17193
|
id: itemId,
|
|
@@ -17132,11 +17202,11 @@ const WeekSelectField = ({
|
|
|
17132
17202
|
handleChange(newValue);
|
|
17133
17203
|
}
|
|
17134
17204
|
}), React__default.createElement("span", {
|
|
17135
|
-
className: styles$
|
|
17205
|
+
className: styles$w['week-select-field__day-pill']
|
|
17136
17206
|
}, React__default.createElement("span", {
|
|
17137
|
-
className: styles$
|
|
17207
|
+
className: styles$w['week-select-field__day-abbr']
|
|
17138
17208
|
}, _displayFormat === 'month' ? monthAbbr[day.getMonth()] : dayAbbr[day.getDay()]), React__default.createElement("span", {
|
|
17139
|
-
className: styles$
|
|
17209
|
+
className: styles$w['week-select-field__day-num']
|
|
17140
17210
|
}, day.getDate())));
|
|
17141
17211
|
})));
|
|
17142
17212
|
};
|
|
@@ -17178,9 +17248,9 @@ const useRadioGroupFieldContext = () => {
|
|
|
17178
17248
|
return context;
|
|
17179
17249
|
};
|
|
17180
17250
|
|
|
17181
|
-
var styles$
|
|
17251
|
+
var styles$v = {"label":"_xzukU","label--truncate":"_iVWRB","caption":"_JNfQO","radio-group-field__label":"_2KvuU","radio-group-field__caption":"_ZeIOd"};
|
|
17182
17252
|
|
|
17183
|
-
var styles$
|
|
17253
|
+
var styles$u = {"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"};
|
|
17184
17254
|
|
|
17185
17255
|
const RadioGroupBoxOption = ({
|
|
17186
17256
|
value,
|
|
@@ -17197,7 +17267,7 @@ const RadioGroupBoxOption = ({
|
|
|
17197
17267
|
id: inputId
|
|
17198
17268
|
});
|
|
17199
17269
|
return React__default.createElement("label", {
|
|
17200
|
-
className: styles$
|
|
17270
|
+
className: styles$u['radio-group-box-option'],
|
|
17201
17271
|
"data-testid": testId
|
|
17202
17272
|
}, React__default.createElement("input", {
|
|
17203
17273
|
type: "radio",
|
|
@@ -17208,8 +17278,8 @@ const RadioGroupBoxOption = ({
|
|
|
17208
17278
|
checked: radioGroupContext.value !== undefined ? radioGroupContext.value === value : undefined,
|
|
17209
17279
|
disabled: radioGroupContext.disabled || disabled
|
|
17210
17280
|
}), React__default.createElement("div", {
|
|
17211
|
-
className: classnames(styles$
|
|
17212
|
-
[styles$
|
|
17281
|
+
className: classnames(styles$u['radio-group-box-option__box'], {
|
|
17282
|
+
[styles$u['radio-group-box-option__box--disabled']]: radioGroupContext.disabled || disabled
|
|
17213
17283
|
})
|
|
17214
17284
|
}, React__default.createElement(Stack, {
|
|
17215
17285
|
space: 16,
|
|
@@ -17219,17 +17289,17 @@ const RadioGroupBoxOption = ({
|
|
|
17219
17289
|
space: 8,
|
|
17220
17290
|
alignItems: "center"
|
|
17221
17291
|
}, label && React__default.createElement("div", {
|
|
17222
|
-
className: classnames(styles$
|
|
17223
|
-
[styles$
|
|
17292
|
+
className: classnames(styles$u['radio-group-box-option__label'], {
|
|
17293
|
+
[styles$u['radio-group-box-option__label--disabled']]: radioGroupContext.disabled || disabled
|
|
17224
17294
|
})
|
|
17225
17295
|
}, label), caption && React__default.createElement("div", {
|
|
17226
|
-
className: classnames(styles$
|
|
17227
|
-
[styles$
|
|
17296
|
+
className: classnames(styles$u['radio-group-box-option__caption'], {
|
|
17297
|
+
[styles$u['radio-group-box-option__caption--disabled']]: radioGroupContext.disabled || disabled
|
|
17228
17298
|
})
|
|
17229
17299
|
}, caption)))));
|
|
17230
17300
|
};
|
|
17231
17301
|
|
|
17232
|
-
var styles$
|
|
17302
|
+
var styles$t = {"radio-group-option":"_7fVpn","radio-group-option__caption":"_VD7SO","radio-group-option__custom-input":"_Yfxkl"};
|
|
17233
17303
|
|
|
17234
17304
|
/** RadioGroupField form element. */
|
|
17235
17305
|
const RadioGroupOption = ({
|
|
@@ -17251,7 +17321,7 @@ const RadioGroupOption = ({
|
|
|
17251
17321
|
space: 8,
|
|
17252
17322
|
alignItems: "center"
|
|
17253
17323
|
}, React__default.createElement("div", {
|
|
17254
|
-
className: styles$
|
|
17324
|
+
className: styles$t['radio-group-option']
|
|
17255
17325
|
}, React__default.createElement("input", {
|
|
17256
17326
|
type: "radio",
|
|
17257
17327
|
"data-testid": testId,
|
|
@@ -17262,11 +17332,11 @@ const RadioGroupOption = ({
|
|
|
17262
17332
|
checked: radioGroupContext.value !== undefined ? radioGroupContext.value === value : undefined,
|
|
17263
17333
|
disabled: radioGroupContext.disabled || disabled
|
|
17264
17334
|
}), React__default.createElement("span", {
|
|
17265
|
-
className: styles$
|
|
17335
|
+
className: styles$t['radio-group-option__custom-input']
|
|
17266
17336
|
})), label && React__default.createElement(Label, {
|
|
17267
17337
|
htmlFor: id
|
|
17268
17338
|
}, label)), caption && React__default.createElement("div", {
|
|
17269
|
-
className: styles$
|
|
17339
|
+
className: styles$t['radio-group-option__caption']
|
|
17270
17340
|
}, React__default.createElement(Caption, {
|
|
17271
17341
|
fieldId: id
|
|
17272
17342
|
}, caption)));
|
|
@@ -17397,7 +17467,7 @@ const RadioGroupField = ({
|
|
|
17397
17467
|
}, React__default.createElement(Stack, {
|
|
17398
17468
|
space: _space
|
|
17399
17469
|
}, label && React__default.createElement("div", {
|
|
17400
|
-
className: styles$
|
|
17470
|
+
className: styles$v['radio-group-field__label']
|
|
17401
17471
|
}, label), React__default.createElement(Stack, {
|
|
17402
17472
|
space: 8
|
|
17403
17473
|
}, optionsType === OPTION_TYPES.RADIO ? React__default.createElement(RadioOptions, {
|
|
@@ -17409,21 +17479,21 @@ const RadioGroupField = ({
|
|
|
17409
17479
|
testId: testId,
|
|
17410
17480
|
space: _space
|
|
17411
17481
|
}, children), caption && React__default.createElement("div", {
|
|
17412
|
-
className: styles$
|
|
17482
|
+
className: styles$v['radio-group-caption']
|
|
17413
17483
|
}, caption), controllers.error && React__default.createElement(ErrorMessage, null, controllers.error))));
|
|
17414
17484
|
};
|
|
17415
17485
|
|
|
17416
|
-
var styles$
|
|
17486
|
+
var styles$s = {"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"};
|
|
17417
17487
|
|
|
17418
|
-
var styles$
|
|
17488
|
+
var styles$r = {"password-criteria":"_1ruWK","password-criteria--invalid":"_xR7tb"};
|
|
17419
17489
|
|
|
17420
17490
|
const PasswordCriteria = ({
|
|
17421
17491
|
met,
|
|
17422
17492
|
children
|
|
17423
17493
|
}) => {
|
|
17424
17494
|
return React__default.createElement("span", {
|
|
17425
|
-
className: classnames(styles$
|
|
17426
|
-
[styles$
|
|
17495
|
+
className: classnames(styles$r['password-criteria'], {
|
|
17496
|
+
[styles$r['password-criteria--invalid']]: !met
|
|
17427
17497
|
})
|
|
17428
17498
|
}, React__default.createElement(Inline, {
|
|
17429
17499
|
space: met ? 4 : 8
|
|
@@ -17497,12 +17567,12 @@ const PasswordField = ({
|
|
|
17497
17567
|
error: controllers.error
|
|
17498
17568
|
};
|
|
17499
17569
|
return React__default.createElement(Field, _extends({}, fieldProps), React__default.createElement("div", {
|
|
17500
|
-
className: styles$
|
|
17570
|
+
className: styles$s['password-container']
|
|
17501
17571
|
}, React__default.createElement("input", {
|
|
17502
17572
|
name: name,
|
|
17503
17573
|
id: controllers.id,
|
|
17504
|
-
className: classnames(styles$
|
|
17505
|
-
[styles$
|
|
17574
|
+
className: classnames(styles$s['text-field'], {
|
|
17575
|
+
[styles$s['text-field--invalid']]: hasError
|
|
17506
17576
|
}),
|
|
17507
17577
|
type: type,
|
|
17508
17578
|
"data-testid": testId,
|
|
@@ -17516,8 +17586,8 @@ const PasswordField = ({
|
|
|
17516
17586
|
onChange: controllers.onChange,
|
|
17517
17587
|
onBlur: controllers.onBlur
|
|
17518
17588
|
}), React__default.createElement("div", {
|
|
17519
|
-
className: classnames(styles$
|
|
17520
|
-
[styles$
|
|
17589
|
+
className: classnames(styles$s['password-toggle'], {
|
|
17590
|
+
[styles$s['password-toggle--disabled']]: disabled
|
|
17521
17591
|
}),
|
|
17522
17592
|
onClick: toggleType,
|
|
17523
17593
|
onKeyPress: toggleType,
|
|
@@ -17619,7 +17689,7 @@ const MultiSelectField = ({
|
|
|
17619
17689
|
})));
|
|
17620
17690
|
};
|
|
17621
17691
|
|
|
17622
|
-
var styles$
|
|
17692
|
+
var styles$q = {"custom-list":"_cSkvD"};
|
|
17623
17693
|
|
|
17624
17694
|
const _excluded$b4 = ["children", "hasMoreOptions", "hasMoreOptionsFirstLoad", "isLoadingMore"];
|
|
17625
17695
|
const CustomList = _ref => {
|
|
@@ -17642,7 +17712,7 @@ const CustomList = _ref => {
|
|
|
17642
17712
|
})) : showFooter && props.options.length > 0 && React__default.createElement(Inline, {
|
|
17643
17713
|
justifyContent: "center"
|
|
17644
17714
|
}, React__default.createElement("div", {
|
|
17645
|
-
className: styles$
|
|
17715
|
+
className: styles$q['custom-list']
|
|
17646
17716
|
}, __('moreOptionsPlaceholder')))));
|
|
17647
17717
|
};
|
|
17648
17718
|
|
|
@@ -18003,7 +18073,7 @@ const getFormikError = error => {
|
|
|
18003
18073
|
return undefined;
|
|
18004
18074
|
};
|
|
18005
18075
|
|
|
18006
|
-
var styles$
|
|
18076
|
+
var styles$p = {"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"};
|
|
18007
18077
|
|
|
18008
18078
|
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"};
|
|
18009
18079
|
|
|
@@ -18069,9 +18139,9 @@ const DateRangeCalendar = ({
|
|
|
18069
18139
|
const MONTH_NAMES = getMonths(translate);
|
|
18070
18140
|
const highlight = buildHighlightDayPickerProps(highlightedDays);
|
|
18071
18141
|
return React__default.createElement(Portal, null, React__default.createElement("div", {
|
|
18072
|
-
className: styles$
|
|
18142
|
+
className: styles$1b['calendar']
|
|
18073
18143
|
}, React__default.createElement("div", {
|
|
18074
|
-
className: styles$
|
|
18144
|
+
className: styles$1b['calendar__overlay'],
|
|
18075
18145
|
ref: ref => setCalendarRef(ref),
|
|
18076
18146
|
style: _extends({}, calendarPosition, {
|
|
18077
18147
|
zIndex: getZIndex('dropdown')
|
|
@@ -18271,9 +18341,9 @@ const DateRangeField = ({
|
|
|
18271
18341
|
end
|
|
18272
18342
|
} = controllers.value;
|
|
18273
18343
|
return React__default.createElement(Field, _extends({}, fieldProps), React__default.createElement("div", {
|
|
18274
|
-
className: classnames(styles$
|
|
18275
|
-
[styles$
|
|
18276
|
-
[styles$
|
|
18344
|
+
className: classnames(styles$p['date-range-field'], {
|
|
18345
|
+
[styles$p['date-range-field--invalid']]: hasError,
|
|
18346
|
+
[styles$p['date-range-field--disabled']]: disabled
|
|
18277
18347
|
}),
|
|
18278
18348
|
"data-testid": testId
|
|
18279
18349
|
}, React__default.createElement(IconCalendarAlt, {
|
|
@@ -18599,7 +18669,7 @@ const TimeRangeSelector = forwardRef(TimeFieldElement);
|
|
|
18599
18669
|
*/
|
|
18600
18670
|
const TimeField = forwardRef(TimeFieldElement);
|
|
18601
18671
|
|
|
18602
|
-
var styles$
|
|
18672
|
+
var styles$o = {"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"};
|
|
18603
18673
|
|
|
18604
18674
|
const TimeRangeEnd = ({
|
|
18605
18675
|
startTime,
|
|
@@ -18721,9 +18791,9 @@ const TimeRangeField = ({
|
|
|
18721
18791
|
end
|
|
18722
18792
|
}) : getDuration(end, start, subtractDuration);
|
|
18723
18793
|
return React__default.createElement(Field, _extends({}, fieldProps), React__default.createElement("div", {
|
|
18724
|
-
className: classnames(styles$
|
|
18725
|
-
[styles$
|
|
18726
|
-
[styles$
|
|
18794
|
+
className: classnames(styles$o['time-range-field'], {
|
|
18795
|
+
[styles$o['time-range-field--invalid']]: hasError,
|
|
18796
|
+
[styles$o['time-range-field--disabled']]: disabled
|
|
18727
18797
|
}),
|
|
18728
18798
|
"data-testid": testId
|
|
18729
18799
|
}, React__default.createElement(TimeRangeStart, {
|
|
@@ -18751,7 +18821,7 @@ const TimeRangeField = ({
|
|
|
18751
18821
|
})));
|
|
18752
18822
|
};
|
|
18753
18823
|
|
|
18754
|
-
var styles$
|
|
18824
|
+
var styles$n = {"currency-field":"_GyYnE","currency-field--with-mask":"_NfdKk","currency-field__mask-display":"_ddacu","currency-field__mask-display--disabled":"_o1-zA"};
|
|
18755
18825
|
|
|
18756
18826
|
const CURRENCY_DISPLAY_DEFAULT_MARGIN = 8;
|
|
18757
18827
|
const CURRENCY_DISPLAY_MARGIN_BUFFER = 1;
|
|
@@ -18817,12 +18887,12 @@ const CurrencyFieldElement = (_ref, forwardedRef) => {
|
|
|
18817
18887
|
setShowMask(false);
|
|
18818
18888
|
inputProps.onFocus(e);
|
|
18819
18889
|
},
|
|
18820
|
-
className: classnames(inputProps.className, styles$
|
|
18821
|
-
[styles$
|
|
18890
|
+
className: classnames(inputProps.className, styles$n['currency-field'], {
|
|
18891
|
+
[styles$n['currency-field--with-mask']]: showMask && !!inputProps.value
|
|
18822
18892
|
})
|
|
18823
18893
|
}))), showMask && !!inputProps.value && React__default.createElement("div", {
|
|
18824
|
-
className: classnames(styles$
|
|
18825
|
-
[styles$
|
|
18894
|
+
className: classnames(styles$n['currency-field__mask-display'], {
|
|
18895
|
+
[styles$n['currency-field__mask-display--disabled']]: inputProps.disabled
|
|
18826
18896
|
}),
|
|
18827
18897
|
style: {
|
|
18828
18898
|
marginLeft: displayPadding
|
|
@@ -18951,7 +19021,7 @@ const FormFeedback = ({
|
|
|
18951
19021
|
}, children);
|
|
18952
19022
|
};
|
|
18953
19023
|
|
|
18954
|
-
var styles$
|
|
19024
|
+
var styles$m = {"phone-field":"_Q0GfJ","phone-field__flag":"_-uOqW","phone-field__input":"_Hes9b","phone-field__input--with-square-borders":"_TEU6N"};
|
|
18955
19025
|
|
|
18956
19026
|
const usePhoneFieldControllers = ({
|
|
18957
19027
|
name,
|
|
@@ -19865,7 +19935,7 @@ const COUNTRIES = {
|
|
|
19865
19935
|
};
|
|
19866
19936
|
const COUNTRY_CODES = Object.keys(COUNTRIES);
|
|
19867
19937
|
|
|
19868
|
-
var styles$
|
|
19938
|
+
var styles$l = {"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"};
|
|
19869
19939
|
|
|
19870
19940
|
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"};
|
|
19871
19941
|
|
|
@@ -19879,21 +19949,21 @@ const CountrySelector = ({
|
|
|
19879
19949
|
}) => {
|
|
19880
19950
|
const resolvedPriorityCountries = [country, ..._priorityCountries].filter((code, index, arr) => arr.indexOf(code) === index && code in COUNTRIES);
|
|
19881
19951
|
return React__default.createElement("div", {
|
|
19882
|
-
className: classnames(styles$
|
|
19883
|
-
[styles$
|
|
19884
|
-
[styles$
|
|
19952
|
+
className: classnames(styles$l['country-selector'], {
|
|
19953
|
+
[styles$l['country-selector--with-error']]: hasError,
|
|
19954
|
+
[styles$l['country-selector--disabled']]: disabled
|
|
19885
19955
|
})
|
|
19886
19956
|
}, React__default.createElement(Dropdown, {
|
|
19887
19957
|
trigger: React__default.createElement("div", {
|
|
19888
|
-
className: classnames(styles$
|
|
19889
|
-
[styles$
|
|
19890
|
-
[styles$
|
|
19958
|
+
className: classnames(styles$l['country-selector__trigger'], {
|
|
19959
|
+
[styles$l['country-selector__trigger--with-error']]: hasError,
|
|
19960
|
+
[styles$l['country-selector__trigger--disabled']]: disabled
|
|
19891
19961
|
})
|
|
19892
19962
|
}, React__default.createElement(Inline, {
|
|
19893
19963
|
space: 8,
|
|
19894
19964
|
alignItems: "center"
|
|
19895
19965
|
}, React__default.createElement("span", {
|
|
19896
|
-
className: classnames(flagIcons['fi'], flagIcons[`fi-${country.toLowerCase()}`], styles$
|
|
19966
|
+
className: classnames(flagIcons['fi'], flagIcons[`fi-${country.toLowerCase()}`], styles$l['country-selector__trigger-flag'])
|
|
19897
19967
|
}), React__default.createElement(IconChevronDown, {
|
|
19898
19968
|
color: "currentColor",
|
|
19899
19969
|
size: "medium"
|
|
@@ -19907,7 +19977,7 @@ const CountrySelector = ({
|
|
|
19907
19977
|
alignItems: "center",
|
|
19908
19978
|
space: 12
|
|
19909
19979
|
}, React__default.createElement("span", {
|
|
19910
|
-
className: classnames(flagIcons['fi'], flagIcons[`fi-${countryCode.toLowerCase()}`], styles$
|
|
19980
|
+
className: classnames(flagIcons['fi'], flagIcons[`fi-${countryCode.toLowerCase()}`], styles$l['country-selector__flag'])
|
|
19911
19981
|
}), React__default.createElement(Text, null, COUNTRIES[countryCode].countryName)))), React__default.createElement(DropdownListDivider, null), COUNTRY_CODES.map(countryCode => React__default.createElement(DropdownListItem, {
|
|
19912
19982
|
onClick: () => onChange(countryCode),
|
|
19913
19983
|
key: countryCode
|
|
@@ -19915,7 +19985,7 @@ const CountrySelector = ({
|
|
|
19915
19985
|
alignItems: "center",
|
|
19916
19986
|
space: 12
|
|
19917
19987
|
}, React__default.createElement("span", {
|
|
19918
|
-
className: classnames(flagIcons['fi'], flagIcons[`fi-${countryCode.toLowerCase()}`], styles$
|
|
19988
|
+
className: classnames(flagIcons['fi'], flagIcons[`fi-${countryCode.toLowerCase()}`], styles$l['country-selector__flag'])
|
|
19919
19989
|
}), React__default.createElement(Text, null, COUNTRIES[countryCode].countryName)))))));
|
|
19920
19990
|
};
|
|
19921
19991
|
|
|
@@ -19992,7 +20062,7 @@ const PhoneField = _ref => {
|
|
|
19992
20062
|
}
|
|
19993
20063
|
};
|
|
19994
20064
|
return React__default.createElement(Field, _extends({}, fieldProps), React__default.createElement("div", {
|
|
19995
|
-
className: styles$
|
|
20065
|
+
className: styles$m['phone-field']
|
|
19996
20066
|
}, !disabledCountry && React__default.createElement(CountrySelector, {
|
|
19997
20067
|
country: selectedCountry,
|
|
19998
20068
|
onChange: handleCountryChange,
|
|
@@ -20004,19 +20074,19 @@ const PhoneField = _ref => {
|
|
|
20004
20074
|
space: 4,
|
|
20005
20075
|
alignItems: "center"
|
|
20006
20076
|
}, React__default.createElement("span", {
|
|
20007
|
-
className: classnames(flagIcons['fi'], flagIcons[`fi-${selectedCountry.toLocaleLowerCase()}`], styles$
|
|
20077
|
+
className: classnames(flagIcons['fi'], flagIcons[`fi-${selectedCountry.toLocaleLowerCase()}`], styles$m['country-selector__flag'])
|
|
20008
20078
|
}), React__default.createElement("span", null, "+", getCountryCallingCode(selectedCountry))) : `+${getCountryCallingCode(selectedCountry)}`
|
|
20009
20079
|
}, React__default.createElement("input", _extends({}, inputProps, {
|
|
20010
20080
|
type: "tel",
|
|
20011
|
-
className: classnames(inputProps.className, styles$
|
|
20012
|
-
[styles$
|
|
20081
|
+
className: classnames(inputProps.className, styles$m['phone-field__input'], {
|
|
20082
|
+
[styles$m['phone-field__input--with-square-borders']]: !disabledCountry
|
|
20013
20083
|
}),
|
|
20014
20084
|
onChange: handlePhoneChange,
|
|
20015
20085
|
onBlur: handlePhoneBlur
|
|
20016
20086
|
})))));
|
|
20017
20087
|
};
|
|
20018
20088
|
|
|
20019
|
-
var styles$
|
|
20089
|
+
var styles$k = {"color-overlay":"_LTVgG","color-overlay__color-display-container":"_R1mls","color-overlay__color-display-circle":"_M-8rP","color-overlay__color-display-circle--selected":"_o92fv","color-overlay__color-display-circle--focused":"_QBSCQ","color-overlay__custom-color":"_iQoTb"};
|
|
20020
20090
|
|
|
20021
20091
|
const SEQUENTIAL_COLORS = ['seq-18', 'seq-4', 'seq-7', 'seq-16', 'seq-12', 'seq-6', 'seq-9', 'seq-3', 'seq-11', 'seq-1', 'seq-13', 'seq-10', 'seq-14', 'seq-8', 'seq-19', 'seq-20', 'seq-2', 'seq-17', 'seq-15', 'seq-5'];
|
|
20022
20092
|
|
|
@@ -20230,7 +20300,7 @@ const OverlayContent = ({
|
|
|
20230
20300
|
return React__default.createElement("div", {
|
|
20231
20301
|
style: overlayStyle,
|
|
20232
20302
|
ref: overlayRef,
|
|
20233
|
-
className: styles$
|
|
20303
|
+
className: styles$k['color-overlay'],
|
|
20234
20304
|
role: "dialog"
|
|
20235
20305
|
}, SEQUENTIAL_COLORS.map((color, index) => React__default.createElement(ColorDisplay, {
|
|
20236
20306
|
key: color,
|
|
@@ -20240,7 +20310,7 @@ const OverlayContent = ({
|
|
|
20240
20310
|
onClick: () => onSelect(color),
|
|
20241
20311
|
onHover: () => setSelectedColorIndex(null)
|
|
20242
20312
|
})), allowCustomColor && React__default.createElement("div", {
|
|
20243
|
-
className: styles$
|
|
20313
|
+
className: styles$k['color-overlay__custom-color']
|
|
20244
20314
|
}, React__default.createElement(Button, {
|
|
20245
20315
|
ref: customButtonRef,
|
|
20246
20316
|
size: "full-width",
|
|
@@ -20254,12 +20324,12 @@ const ColorDisplay = ({
|
|
|
20254
20324
|
onClick,
|
|
20255
20325
|
onHover
|
|
20256
20326
|
}) => React__default.createElement("button", {
|
|
20257
|
-
className: styles$
|
|
20327
|
+
className: styles$k['color-overlay__color-display-container'],
|
|
20258
20328
|
onClick: () => onClick(color)
|
|
20259
20329
|
}, React__default.createElement("div", {
|
|
20260
|
-
className: classnames(styles$
|
|
20261
|
-
[styles$
|
|
20262
|
-
[styles$
|
|
20330
|
+
className: classnames(styles$k['color-overlay__color-display-circle'], {
|
|
20331
|
+
[styles$k['color-overlay__color-display-circle--selected']]: isSelected,
|
|
20332
|
+
[styles$k['color-overlay__color-display-circle--focused']]: isFocused
|
|
20263
20333
|
}),
|
|
20264
20334
|
onMouseEnter: onHover,
|
|
20265
20335
|
style: {
|
|
@@ -20267,13 +20337,13 @@ const ColorDisplay = ({
|
|
|
20267
20337
|
}
|
|
20268
20338
|
}));
|
|
20269
20339
|
|
|
20270
|
-
var styles$
|
|
20340
|
+
var styles$j = {"color-swatch":"_UUuiJ"};
|
|
20271
20341
|
|
|
20272
20342
|
const ColorSwatch = ({
|
|
20273
20343
|
color
|
|
20274
20344
|
}) => {
|
|
20275
20345
|
return React__default.createElement("div", {
|
|
20276
|
-
className: styles$
|
|
20346
|
+
className: styles$j['color-swatch'],
|
|
20277
20347
|
style: {
|
|
20278
20348
|
backgroundColor: color
|
|
20279
20349
|
}
|
|
@@ -20353,7 +20423,7 @@ const findSeqTokenByHex = value => {
|
|
|
20353
20423
|
return SEQUENTIAL_COLORS.find(token => normalizeHex(SEQUENTIAL_COLOR_CODES.light[token]) === target || normalizeHex(SEQUENTIAL_COLOR_CODES.dark[token]) === target);
|
|
20354
20424
|
};
|
|
20355
20425
|
|
|
20356
|
-
var styles$
|
|
20426
|
+
var styles$i = {"custom-color-picker":"_OHgPk"};
|
|
20357
20427
|
|
|
20358
20428
|
/**
|
|
20359
20429
|
* A visually hidden native color input. It is kept mounted on the field (not
|
|
@@ -20404,12 +20474,12 @@ const CustomColorPicker = forwardRef(({
|
|
|
20404
20474
|
type: "color",
|
|
20405
20475
|
"aria-hidden": "true",
|
|
20406
20476
|
tabIndex: -1,
|
|
20407
|
-
className: styles$
|
|
20477
|
+
className: styles$i['custom-color-picker'],
|
|
20408
20478
|
defaultValue: safeColor
|
|
20409
20479
|
});
|
|
20410
20480
|
});
|
|
20411
20481
|
|
|
20412
|
-
var styles$
|
|
20482
|
+
var styles$h = {"color-field":"_KJawn"};
|
|
20413
20483
|
|
|
20414
20484
|
const ColorFieldElement = (props, ref) => {
|
|
20415
20485
|
const {
|
|
@@ -20447,7 +20517,7 @@ const ColorFieldElement = (props, ref) => {
|
|
|
20447
20517
|
(_customPickerRef$curr = customPickerRef.current) == null || _customPickerRef$curr.open();
|
|
20448
20518
|
};
|
|
20449
20519
|
return React__default.createElement(Fragment, null, React__default.createElement("div", {
|
|
20450
|
-
className: styles$
|
|
20520
|
+
className: styles$h['color-field']
|
|
20451
20521
|
}, React__default.createElement(Field, _extends({}, fieldProps), React__default.createElement(AffixContainer, {
|
|
20452
20522
|
prefix: React__default.createElement(ColorSwatch, {
|
|
20453
20523
|
color: getCurrentColor()
|
|
@@ -20546,73 +20616,19 @@ const lastOfMonth = () => {
|
|
|
20546
20616
|
|
|
20547
20617
|
const isValidPhoneNumber = value => !value || isValidPhoneNumber$1(value);
|
|
20548
20618
|
|
|
20549
|
-
var styles$
|
|
20550
|
-
|
|
20551
|
-
var styles$g = {"avatar-image":"_iDN1j"};
|
|
20619
|
+
var styles$g = {"avatar":"_V1U8v","avatar__container":"_peAaI","avatar--loading":"_vQa4v","avatar-shimmer":"_rw4zM","avatar--small":"_9g-tn","avatar__badge":"_uViot","avatar--medium":"_vNXJW","avatar--large":"_9ZKAB","avatar--extra-large":"_uv14Y"};
|
|
20552
20620
|
|
|
20553
20621
|
const AvatarImage = ({
|
|
20554
20622
|
url,
|
|
20555
|
-
color,
|
|
20556
20623
|
alt: _alt = 'Profile',
|
|
20557
|
-
onImageFallbackError
|
|
20558
|
-
|
|
20559
|
-
|
|
20560
|
-
|
|
20561
|
-
|
|
20562
|
-
|
|
20563
|
-
|
|
20564
|
-
|
|
20565
|
-
setHasImageError(true);
|
|
20566
|
-
onImageFallbackError();
|
|
20567
|
-
}
|
|
20568
|
-
});
|
|
20569
|
-
}
|
|
20570
|
-
return React__default.createElement("div", {
|
|
20571
|
-
className: styles$g['avatar-image']
|
|
20572
|
-
}, React__default.createElement(IconUser, {
|
|
20573
|
-
size: "flexible",
|
|
20574
|
-
color: color,
|
|
20575
|
-
variant: "solid"
|
|
20576
|
-
}));
|
|
20577
|
-
};
|
|
20578
|
-
|
|
20579
|
-
const PROFILE_IMAGES = [{
|
|
20580
|
-
backgroundColor: '#EAD3E3',
|
|
20581
|
-
avatarColor: '#AA6589'
|
|
20582
|
-
}, {
|
|
20583
|
-
backgroundColor: '#F4F6FC',
|
|
20584
|
-
avatarColor: '#9EA9D3'
|
|
20585
|
-
}, {
|
|
20586
|
-
backgroundColor: '#FBEBE6',
|
|
20587
|
-
avatarColor: '#F3A097'
|
|
20588
|
-
}, {
|
|
20589
|
-
backgroundColor: '#F7FAF2',
|
|
20590
|
-
avatarColor: '#BBCA94'
|
|
20591
|
-
}, {
|
|
20592
|
-
backgroundColor: '#E1F3EF',
|
|
20593
|
-
avatarColor: '#8DC3B9'
|
|
20594
|
-
}, {
|
|
20595
|
-
backgroundColor: '#F2DCBD',
|
|
20596
|
-
avatarColor: '#A98146'
|
|
20597
|
-
}, {
|
|
20598
|
-
backgroundColor: '#AA6589',
|
|
20599
|
-
avatarColor: '#EAD3E3'
|
|
20600
|
-
}, {
|
|
20601
|
-
backgroundColor: '#9EA9D3',
|
|
20602
|
-
avatarColor: '#F4F6FC'
|
|
20603
|
-
}, {
|
|
20604
|
-
backgroundColor: '#F3A097',
|
|
20605
|
-
avatarColor: '#FBEBE6'
|
|
20606
|
-
}, {
|
|
20607
|
-
backgroundColor: '#BBCA94',
|
|
20608
|
-
avatarColor: '#F7FAF2'
|
|
20609
|
-
}, {
|
|
20610
|
-
backgroundColor: '#8DC3B9',
|
|
20611
|
-
avatarColor: '#E1F3EF'
|
|
20612
|
-
}, {
|
|
20613
|
-
backgroundColor: '#A98146',
|
|
20614
|
-
avatarColor: '#F2DCBD'
|
|
20615
|
-
}];
|
|
20624
|
+
onImageFallbackError,
|
|
20625
|
+
onImageLoad
|
|
20626
|
+
}) => React__default.createElement("img", {
|
|
20627
|
+
src: url,
|
|
20628
|
+
alt: _alt,
|
|
20629
|
+
onError: onImageFallbackError,
|
|
20630
|
+
onLoad: onImageLoad
|
|
20631
|
+
});
|
|
20616
20632
|
|
|
20617
20633
|
let elementCallbackMap = null;
|
|
20618
20634
|
function getElementCallbackMap() {
|
|
@@ -20693,18 +20709,30 @@ function useIsVisibleInViewPort() {
|
|
|
20693
20709
|
};
|
|
20694
20710
|
}
|
|
20695
20711
|
|
|
20712
|
+
function getInitials(name) {
|
|
20713
|
+
const trimmed = name.trim();
|
|
20714
|
+
const parts = trimmed.split(/\s+/);
|
|
20715
|
+
if (parts.length >= 2) {
|
|
20716
|
+
return parts[0][0] + parts[parts.length - 1][0];
|
|
20717
|
+
}
|
|
20718
|
+
return trimmed.slice(0, 2);
|
|
20719
|
+
}
|
|
20696
20720
|
/**
|
|
20697
20721
|
* Avatar represents a person or entity — such as a company, location, department, or role — with a visual identifier. It appears wherever a person or entity's identity needs to be communicated at a glance.
|
|
20698
20722
|
*/
|
|
20699
20723
|
const Avatar = ({
|
|
20700
20724
|
children,
|
|
20701
|
-
color
|
|
20725
|
+
color,
|
|
20702
20726
|
size: _size = 'medium',
|
|
20703
20727
|
url: urlProp,
|
|
20704
20728
|
badge,
|
|
20705
20729
|
alt,
|
|
20706
20730
|
testId
|
|
20707
20731
|
}) => {
|
|
20732
|
+
// When a `color` is explicitly passed use it, otherwise fall back to the
|
|
20733
|
+
// neutral color. Keeping `color` undefined by default lets us distinguish
|
|
20734
|
+
// "caller passed a color" from "no color given".
|
|
20735
|
+
const resolvedColor = color ? getColor(color) : COLORS['surface-on-color-subtle'];
|
|
20708
20736
|
const {
|
|
20709
20737
|
isVisible,
|
|
20710
20738
|
elementRef
|
|
@@ -20719,32 +20747,47 @@ const Avatar = ({
|
|
|
20719
20747
|
}
|
|
20720
20748
|
}, [isVisible, hasBeenVisible]);
|
|
20721
20749
|
const url = hasBeenVisible ? urlProp : undefined;
|
|
20722
|
-
const [
|
|
20723
|
-
const [
|
|
20724
|
-
|
|
20725
|
-
|
|
20726
|
-
|
|
20727
|
-
|
|
20728
|
-
|
|
20750
|
+
const [prevUrl, setPrevUrl] = useState(url);
|
|
20751
|
+
const [imageLoadFailed, setImageLoadFailed] = useState(false);
|
|
20752
|
+
const [imageLoaded, setImageLoaded] = useState(false);
|
|
20753
|
+
if (url !== prevUrl) {
|
|
20754
|
+
setPrevUrl(url);
|
|
20755
|
+
setImageLoaded(false);
|
|
20756
|
+
setImageLoadFailed(false);
|
|
20757
|
+
}
|
|
20758
|
+
const isImageLoading = !!url && !imageLoadFailed && !imageLoaded;
|
|
20759
|
+
// Show a lighter grey while the image loads; fall back to the role/neutral color otherwise.
|
|
20760
|
+
const backgroundColor = url && !imageLoadFailed ? COLORS['surface-container-highest'] : resolvedColor;
|
|
20761
|
+
return React__default.createElement(AvatarContext.Provider, {
|
|
20762
|
+
value: {
|
|
20763
|
+
size: _size
|
|
20764
|
+
}
|
|
20765
|
+
}, React__default.createElement("div", {
|
|
20766
|
+
className: classnames(styles$g['avatar__container']),
|
|
20767
|
+
ref: elementRef,
|
|
20768
|
+
style: url && color ? {
|
|
20769
|
+
'--avatar-ring-color': resolvedColor
|
|
20770
|
+
} : undefined
|
|
20729
20771
|
}, React__default.createElement("div", {
|
|
20730
|
-
className: classnames(styles$
|
|
20731
|
-
[styles$
|
|
20732
|
-
[styles$
|
|
20733
|
-
[styles$
|
|
20734
|
-
[styles$
|
|
20772
|
+
className: classnames(styles$g['avatar'], {
|
|
20773
|
+
[styles$g['avatar--small']]: _size === 'small',
|
|
20774
|
+
[styles$g['avatar--medium']]: _size === 'medium',
|
|
20775
|
+
[styles$g['avatar--large']]: _size === 'large',
|
|
20776
|
+
[styles$g['avatar--extra-large']]: _size === 'extra-large',
|
|
20777
|
+
[styles$g['avatar--loading']]: isImageLoading
|
|
20735
20778
|
}),
|
|
20736
20779
|
style: {
|
|
20737
|
-
backgroundColor
|
|
20780
|
+
backgroundColor
|
|
20738
20781
|
},
|
|
20739
20782
|
"data-testid": testId
|
|
20740
|
-
},
|
|
20783
|
+
}, url && !imageLoadFailed ? React__default.createElement(AvatarImage, {
|
|
20741
20784
|
url: url,
|
|
20742
|
-
color: defaultProfilePictureColors.avatarColor,
|
|
20743
20785
|
alt: alt,
|
|
20744
|
-
onImageFallbackError: () =>
|
|
20745
|
-
|
|
20746
|
-
|
|
20747
|
-
|
|
20786
|
+
onImageFallbackError: () => setImageLoadFailed(true),
|
|
20787
|
+
onImageLoad: () => setImageLoaded(true)
|
|
20788
|
+
}) : typeof children === 'string' ? getInitials(children) : children, badge && React__default.createElement("div", {
|
|
20789
|
+
className: styles$g['avatar__badge']
|
|
20790
|
+
}, badge))));
|
|
20748
20791
|
};
|
|
20749
20792
|
|
|
20750
20793
|
const CHIP_THEME = {
|