@7shifts/sous-chef 2.16.2 → 2.17.1
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/actions/Button/Button.d.ts +12 -3
- package/dist/actions/Button/constants.d.ts +27 -0
- package/dist/actions/Button/types.d.ts +4 -0
- package/dist/core/DataTable/types.d.ts +3 -7
- package/dist/core/DataTableRow/DataTableRow.d.ts +1 -1
- package/dist/core/Flex/Flex.d.ts +1 -0
- package/dist/feedback/Spinner/constants.d.ts +6 -0
- package/dist/forms/Label/Label.d.ts +1 -0
- package/dist/forms/Label/useLabelTooltip.d.ts +1 -1
- package/dist/forms/RadioGroupBoxOption/RadioGroupBoxOption.d.ts +11 -0
- package/dist/forms/RadioGroupBoxOption/index.d.ts +1 -0
- package/dist/forms/RadioGroupField/BoxOptions/BoxOptions.d.ts +8 -0
- package/dist/forms/RadioGroupField/BoxOptions/index.d.ts +1 -0
- package/dist/forms/RadioGroupField/RadioGroupField.d.ts +11 -3
- package/dist/forms/RadioGroupField/RadioOptions/RadioOptions.d.ts +9 -0
- package/dist/forms/RadioGroupField/RadioOptions/index.d.ts +1 -0
- package/dist/forms/RadioGroupField/domain.d.ts +6 -0
- package/dist/forms/SelectField/CustomContainer/CustomContainer.d.ts +2 -0
- package/dist/forms/SelectField/CustomContainer/index.d.ts +1 -0
- package/dist/forms/SelectField/CustomControl/CustomControl.d.ts +3 -5
- package/dist/forms/SelectField/CustomOption/CustomOption.d.ts +2 -7
- package/dist/forms/SelectField/useSelectField.d.ts +5 -5
- package/dist/index.css +162 -7
- package/dist/index.d.ts +1 -0
- package/dist/index.js +386 -207
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +386 -208
- package/dist/index.modern.js.map +1 -1
- package/dist/layout/Card/Card.d.ts +11 -0
- package/dist/layout/Card/index.d.ts +1 -0
- package/dist/layout/index.d.ts +2 -0
- package/dist/overlay/KebabMenu/KebabMenu.d.ts +6 -0
- package/dist/overlay/KebabMenu/index.d.ts +1 -0
- package/dist/overlay/Menu/types.d.ts +6 -0
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -112,7 +112,7 @@ var MenuItem = function MenuItem(_ref) {
|
|
|
112
112
|
}, children);
|
|
113
113
|
};
|
|
114
114
|
|
|
115
|
-
var styles$1 = {"flex":"_3-eyQ","
|
|
115
|
+
var styles$1 = {"flex":"_3-eyQ","align-center":"_kf0KG","align-end":"_3xCGO","align-start":"_3R2c9","justify-center":"_Zvv8e","justify-end":"_2hBMj","justify-space-between":"_3hKWn","justify-start":"_3ACwY","inline-flex":"_2pujZ"};
|
|
116
116
|
|
|
117
117
|
var Flex = function Flex(_ref) {
|
|
118
118
|
var _classNames;
|
|
@@ -133,8 +133,9 @@ var Flex = function Flex(_ref) {
|
|
|
133
133
|
flexItems = _ref$flexItems === void 0 ? false : _ref$flexItems,
|
|
134
134
|
_ref$flexWrap = _ref.flexWrap,
|
|
135
135
|
flexWrap = _ref$flexWrap === void 0 ? 'nowrap' : _ref$flexWrap,
|
|
136
|
-
testId = _ref.testId
|
|
137
|
-
|
|
136
|
+
testId = _ref.testId,
|
|
137
|
+
extraClass = _ref.extraClass;
|
|
138
|
+
var className = classnames(styles$1['flex'], extraClass, (_classNames = {}, _classNames[styles$1['align-start']] = alignItems === 'flex-start', _classNames[styles$1['align-end']] = alignItems === 'flex-end', _classNames[styles$1['align-center']] = alignItems === 'center', _classNames[styles$1['justify-start']] = justifyContent === 'start', _classNames[styles$1['justify-end']] = justifyContent === 'end', _classNames[styles$1['justify-center']] = justifyContent === 'center', _classNames[styles$1['justify-space-between']] = justifyContent === 'space-between', _classNames[styles$1['inline-flex']] = inlineFlex, _classNames));
|
|
138
139
|
var items = React__default.Children.toArray(children).filter(Boolean);
|
|
139
140
|
var lastItemIndex = items.length - 1;
|
|
140
141
|
return React__default.createElement("div", {
|
|
@@ -152,8 +153,7 @@ var Flex = function Flex(_ref) {
|
|
|
152
153
|
flex: flex ? flex[i] || '0 1 auto' : '0 1 auto',
|
|
153
154
|
marginRight: direction === 'row' && i < lastItemIndex ? space : 0,
|
|
154
155
|
marginBottom: direction === 'column' && i < lastItemIndex ? space : 0
|
|
155
|
-
}
|
|
156
|
-
className: styles$1['flex__item']
|
|
156
|
+
}
|
|
157
157
|
}, child);
|
|
158
158
|
}));
|
|
159
159
|
};
|
|
@@ -164,6 +164,13 @@ var Inline = function Inline(props) {
|
|
|
164
164
|
}));
|
|
165
165
|
};
|
|
166
166
|
|
|
167
|
+
var SPINNER_THEMES = {
|
|
168
|
+
MINT: 'mint',
|
|
169
|
+
DISABLED: 'disabled',
|
|
170
|
+
CONTRAST: 'contrast',
|
|
171
|
+
PRIDE: 'pride'
|
|
172
|
+
};
|
|
173
|
+
|
|
167
174
|
var styles$2 = {"spinner":"_2wtfD","rotator":"_2Jprn","spinner--block":"_Jmh8M","path":"_3zucL","dash":"_3ZqYM","path--mint":"_3XYKx","path--disabled":"_1pYbs","path--contrast":"_3ofDF","path--pride":"_e0OH1"};
|
|
168
175
|
|
|
169
176
|
var Spinner = function Spinner(_ref) {
|
|
@@ -172,7 +179,7 @@ var Spinner = function Spinner(_ref) {
|
|
|
172
179
|
var _ref$size = _ref.size,
|
|
173
180
|
size = _ref$size === void 0 ? 28 : _ref$size,
|
|
174
181
|
_ref$theme = _ref.theme,
|
|
175
|
-
theme = _ref$theme === void 0 ?
|
|
182
|
+
theme = _ref$theme === void 0 ? SPINNER_THEMES.MINT : _ref$theme,
|
|
176
183
|
_ref$block = _ref.block,
|
|
177
184
|
block = _ref$block === void 0 ? false : _ref$block,
|
|
178
185
|
_ref$testId = _ref.testId,
|
|
@@ -622,7 +629,35 @@ var Tooltip = function Tooltip(_ref, forwardedRef) {
|
|
|
622
629
|
|
|
623
630
|
var Tooltip$1 = forwardRef(Tooltip);
|
|
624
631
|
|
|
625
|
-
var styles$5 = {"button":"_1SQ_p","button--loading":"_1g1Zw","button__spinner":"_3TAU6","button--
|
|
632
|
+
var styles$5 = {"button":"_1SQ_p","button--loading":"_1g1Zw","button__spinner":"_3TAU6","button--size-min-width-100":"_3mZ7B","button--size-full-width":"_13ze_","button--icon-only":"_3ig9y","button--default":"_3OB2g","button--primary":"_2RivT","button--danger":"_3T8M_","button--upsell":"_1AYVC","button--marketing":"_34HiE","button--hollow":"_3BrS0","button--link-contrast":"_1LCBO","button--link-primary":"_23S36","button--link-danger":"_2CzxI","button--link-upsell":"_21e4m","button--link-toolbar":"_2-ESu","button--link-icon":"_1u3kp"};
|
|
633
|
+
|
|
634
|
+
var BUTTON_SIZES = {
|
|
635
|
+
FULL_WIDTH: 'full-width',
|
|
636
|
+
MIN_WIDTH_100: 'min-width-100'
|
|
637
|
+
};
|
|
638
|
+
var BUTTON_THEMES = {
|
|
639
|
+
DEFAULT: 'default',
|
|
640
|
+
PRIMARY: 'primary',
|
|
641
|
+
DANGER: 'danger',
|
|
642
|
+
UPSELL: 'upsell',
|
|
643
|
+
MARKETING: 'marketing',
|
|
644
|
+
HOLLOW: 'hollow',
|
|
645
|
+
LINK_PRIMARY: 'link-primary',
|
|
646
|
+
LINK_DANGER: 'link-danger',
|
|
647
|
+
LINK_UPSELL: 'link-upsell',
|
|
648
|
+
LINK_TOOLBAR: 'link-toolbar',
|
|
649
|
+
LINK_CONTRAST: 'link-contrast',
|
|
650
|
+
LINK_ICON: 'link-icon'
|
|
651
|
+
};
|
|
652
|
+
var BUTTON_TYPES = {
|
|
653
|
+
BUTTON: 'button',
|
|
654
|
+
SUBMIT: 'submit',
|
|
655
|
+
RESET: 'reset'
|
|
656
|
+
};
|
|
657
|
+
var BUTTON_TARGETS = {
|
|
658
|
+
BLANK: '_blank',
|
|
659
|
+
SELF: '_self'
|
|
660
|
+
};
|
|
626
661
|
|
|
627
662
|
var _excluded$1 = ["id", "onClick", "className", "type", "disabled", "href", "target", "children"];
|
|
628
663
|
|
|
@@ -631,9 +666,9 @@ var Button = function Button(_ref, ref) {
|
|
|
631
666
|
|
|
632
667
|
var children = _ref.children,
|
|
633
668
|
_ref$type = _ref.type,
|
|
634
|
-
type = _ref$type === void 0 ?
|
|
669
|
+
type = _ref$type === void 0 ? BUTTON_TYPES.BUTTON : _ref$type,
|
|
635
670
|
_ref$theme = _ref.theme,
|
|
636
|
-
theme = _ref$theme === void 0 ?
|
|
671
|
+
theme = _ref$theme === void 0 ? BUTTON_THEMES.DEFAULT : _ref$theme,
|
|
637
672
|
_ref$disabled = _ref.disabled,
|
|
638
673
|
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
639
674
|
onClick = _ref.onClick,
|
|
@@ -643,9 +678,10 @@ var Button = function Button(_ref, ref) {
|
|
|
643
678
|
title = _ref.title,
|
|
644
679
|
href = _ref.href,
|
|
645
680
|
_ref$target = _ref.target,
|
|
646
|
-
target = _ref$target === void 0 ?
|
|
647
|
-
testId = _ref.testId
|
|
648
|
-
|
|
681
|
+
target = _ref$target === void 0 ? BUTTON_TARGETS.SELF : _ref$target,
|
|
682
|
+
testId = _ref.testId,
|
|
683
|
+
size = _ref.size;
|
|
684
|
+
var contrastSpinner = [BUTTON_THEMES.PRIMARY, BUTTON_THEMES.DANGER, BUTTON_THEMES.UPSELL, BUTTON_THEMES.MARKETING, BUTTON_THEMES.LINK_CONTRAST];
|
|
649
685
|
var childrenArr = Children.toArray(children);
|
|
650
686
|
var isIconOnly = childrenArr.length === 1 && typeof childrenArr[0] != 'string';
|
|
651
687
|
return React__default.createElement(Tooltip$1, {
|
|
@@ -653,7 +689,7 @@ var Button = function Button(_ref, ref) {
|
|
|
653
689
|
}, React__default.createElement(ButtonElement, {
|
|
654
690
|
id: id,
|
|
655
691
|
onClick: onClick,
|
|
656
|
-
className: classnames(styles$5['button'], (_classnames = {}, _classnames[styles$5['button--default']] = theme ===
|
|
692
|
+
className: classnames(styles$5['button'], (_classnames = {}, _classnames[styles$5['button--default']] = theme === BUTTON_THEMES.DEFAULT, _classnames[styles$5['button--primary']] = theme === BUTTON_THEMES.PRIMARY, _classnames[styles$5['button--danger']] = theme === BUTTON_THEMES.DANGER, _classnames[styles$5['button--upsell']] = theme === BUTTON_THEMES.UPSELL, _classnames[styles$5['button--marketing']] = theme === BUTTON_THEMES.MARKETING, _classnames[styles$5['button--hollow']] = theme === BUTTON_THEMES.HOLLOW, _classnames[styles$5['button--link-primary']] = theme === BUTTON_THEMES.LINK_PRIMARY, _classnames[styles$5['button--link-danger']] = theme === BUTTON_THEMES.LINK_DANGER, _classnames[styles$5['button--link-upsell']] = theme === BUTTON_THEMES.LINK_UPSELL, _classnames[styles$5['button--link-toolbar']] = theme === BUTTON_THEMES.LINK_TOOLBAR, _classnames[styles$5['button--link-contrast']] = theme === BUTTON_THEMES.LINK_CONTRAST, _classnames[styles$5['button--link-icon']] = theme === BUTTON_THEMES.LINK_ICON, _classnames[styles$5['button--loading']] = loading, _classnames[styles$5['button--icon-only']] = isIconOnly, _classnames[styles$5['button--size-min-width-100']] = wide || size === BUTTON_SIZES.MIN_WIDTH_100, _classnames[styles$5['button--size-full-width']] = size === BUTTON_SIZES.FULL_WIDTH, _classnames)),
|
|
657
693
|
type: type,
|
|
658
694
|
disabled: disabled || loading,
|
|
659
695
|
href: href,
|
|
@@ -666,7 +702,7 @@ var Button = function Button(_ref, ref) {
|
|
|
666
702
|
}, children), loading && React__default.createElement("div", {
|
|
667
703
|
className: styles$5['button__spinner']
|
|
668
704
|
}, React__default.createElement(Spinner, {
|
|
669
|
-
theme: contrastSpinner.includes(theme) ?
|
|
705
|
+
theme: contrastSpinner.includes(theme) ? SPINNER_THEMES.CONTRAST : SPINNER_THEMES.DISABLED
|
|
670
706
|
}))));
|
|
671
707
|
};
|
|
672
708
|
|
|
@@ -4175,6 +4211,16 @@ var Toggle = function Toggle(_ref) {
|
|
|
4175
4211
|
}, caption));
|
|
4176
4212
|
};
|
|
4177
4213
|
|
|
4214
|
+
var KebabMenu = function KebabMenu(_ref) {
|
|
4215
|
+
var actions = _ref.actions;
|
|
4216
|
+
return React__default.createElement(Menu, null, React__default.createElement(MenuButton, null, React__default.createElement(IconEllipsisV, null)), React__default.createElement(MenuList, null, actions.map(function (action, index) {
|
|
4217
|
+
return React__default.createElement(MenuItem, {
|
|
4218
|
+
onClick: action.onAction,
|
|
4219
|
+
key: action.action || index
|
|
4220
|
+
}, action.label);
|
|
4221
|
+
})));
|
|
4222
|
+
};
|
|
4223
|
+
|
|
4178
4224
|
var ActionsCell = function ActionsCell(_ref) {
|
|
4179
4225
|
var actions = _ref.actions;
|
|
4180
4226
|
var kebabMenuItems = actions.filter(function (action) {
|
|
@@ -4192,12 +4238,9 @@ var ActionsCell = function ActionsCell(_ref) {
|
|
|
4192
4238
|
onClick: action.onAction,
|
|
4193
4239
|
theme: "link-icon"
|
|
4194
4240
|
}, action.showInKebab === false ? action.buttonProps : {}), action.label);
|
|
4195
|
-
}), kebabMenuItems.length > 0 && React__default.createElement(
|
|
4196
|
-
|
|
4197
|
-
|
|
4198
|
-
key: index
|
|
4199
|
-
}, action.label);
|
|
4200
|
-
}))));
|
|
4241
|
+
}), kebabMenuItems.length > 0 && React__default.createElement(KebabMenu, {
|
|
4242
|
+
actions: kebabMenuItems
|
|
4243
|
+
}));
|
|
4201
4244
|
};
|
|
4202
4245
|
|
|
4203
4246
|
var _excluded$20 = ["children", "onClick", "isSelected", "actions", "hasDefaultPadding"];
|
|
@@ -4958,12 +5001,12 @@ var isEllipsisActive = function isEllipsisActive(e) {
|
|
|
4958
5001
|
return e.offsetWidth < e.scrollWidth;
|
|
4959
5002
|
};
|
|
4960
5003
|
|
|
4961
|
-
var useLabelTooltip = function useLabelTooltip(labelId, tooltipContent) {
|
|
5004
|
+
var useLabelTooltip = function useLabelTooltip(labelId, tooltipContent, truncate) {
|
|
4962
5005
|
var _useState = useState(false),
|
|
4963
5006
|
showTooltip = _useState[0],
|
|
4964
5007
|
setShowTooltip = _useState[1];
|
|
4965
5008
|
|
|
4966
|
-
var shouldTruncate = typeof tooltipContent === 'string';
|
|
5009
|
+
var shouldTruncate = typeof tooltipContent === 'string' && truncate;
|
|
4967
5010
|
var labelElement = document.getElementById(labelId);
|
|
4968
5011
|
var isHidden = labelElement && labelElement.offsetParent === null;
|
|
4969
5012
|
var handleApplyTooltip = useCallback(function () {
|
|
@@ -5001,10 +5044,12 @@ var Label = function Label(_ref) {
|
|
|
5001
5044
|
var _classNames;
|
|
5002
5045
|
|
|
5003
5046
|
var htmlFor = _ref.htmlFor,
|
|
5004
|
-
children = _ref.children
|
|
5047
|
+
children = _ref.children,
|
|
5048
|
+
_ref$truncate = _ref.truncate,
|
|
5049
|
+
truncate = _ref$truncate === void 0 ? true : _ref$truncate;
|
|
5005
5050
|
var labelId = "label-" + htmlFor;
|
|
5006
5051
|
|
|
5007
|
-
var _useLabelTooltip = useLabelTooltip(labelId, children),
|
|
5052
|
+
var _useLabelTooltip = useLabelTooltip(labelId, children, truncate),
|
|
5008
5053
|
showTooltip = _useLabelTooltip.showTooltip,
|
|
5009
5054
|
shouldTruncate = _useLabelTooltip.shouldTruncate;
|
|
5010
5055
|
|
|
@@ -5408,6 +5453,8 @@ var Form = function Form(_ref) {
|
|
|
5408
5453
|
}, stackContent ? React__default.createElement(Stack, null, children) : children));
|
|
5409
5454
|
};
|
|
5410
5455
|
|
|
5456
|
+
var styles$p = {"form-row":"_2i-Ll"};
|
|
5457
|
+
|
|
5411
5458
|
var SIZE_25_PERCENT = '25%';
|
|
5412
5459
|
var SIZE_33_PERCENT = '33.333%';
|
|
5413
5460
|
var SIZE_50_PERCENT = '50%';
|
|
@@ -5430,12 +5477,14 @@ var FormRow = function FormRow(_ref) {
|
|
|
5430
5477
|
}
|
|
5431
5478
|
}
|
|
5432
5479
|
|
|
5433
|
-
return React__default.createElement(
|
|
5480
|
+
return React__default.createElement(Flex, {
|
|
5434
5481
|
flex: [].concat(items, additionalColumns).map(function (_, index) {
|
|
5435
5482
|
return (sizes === null || sizes === void 0 ? void 0 : sizes[index]) || 1;
|
|
5436
5483
|
}),
|
|
5437
5484
|
space: 20,
|
|
5438
|
-
testId: testId
|
|
5485
|
+
testId: testId,
|
|
5486
|
+
alignItems: "stretch",
|
|
5487
|
+
extraClass: styles$p['form-row']
|
|
5439
5488
|
}, children, additionalColumns.map(function (_, index) {
|
|
5440
5489
|
return React__default.createElement("span", {
|
|
5441
5490
|
key: index,
|
|
@@ -5444,7 +5493,7 @@ var FormRow = function FormRow(_ref) {
|
|
|
5444
5493
|
}));
|
|
5445
5494
|
};
|
|
5446
5495
|
|
|
5447
|
-
var styles$
|
|
5496
|
+
var styles$q = {"text-field":"_BkzdC","text-field--focus":"_Rop31","text-field--disabled":"_2x3Cm","text-field--invalid":"_3zOwV","text-field__toolbar":"_rQqnL"};
|
|
5448
5497
|
|
|
5449
5498
|
var useGrowTextAreaRef = function useGrowTextAreaRef(minHeight, maxHeight, autoGrow, forwardedRef) {
|
|
5450
5499
|
var textareaRef = useRef(null);
|
|
@@ -5520,7 +5569,7 @@ var TextAreaField = function TextAreaField(_ref) {
|
|
|
5520
5569
|
updateHeight = _useGrowTextAreaRef.updateHeight;
|
|
5521
5570
|
|
|
5522
5571
|
return React__default.createElement(Field, Object.assign({}, fieldProps), React__default.createElement("div", {
|
|
5523
|
-
className: classnames(styles$
|
|
5572
|
+
className: classnames(styles$q['text-field'], (_classnames = {}, _classnames[styles$q['text-field--invalid']] = hasError, _classnames[styles$q['text-field--disabled']] = disabled, _classnames[styles$q['text-field--focus']] = hasFocus, _classnames)),
|
|
5524
5573
|
ref: containerRef,
|
|
5525
5574
|
onClick: function onClick(event) {
|
|
5526
5575
|
if (event.target === (containerRef === null || containerRef === void 0 ? void 0 : containerRef.current)) {
|
|
@@ -5552,7 +5601,7 @@ var TextAreaField = function TextAreaField(_ref) {
|
|
|
5552
5601
|
},
|
|
5553
5602
|
ref: textAreaRef
|
|
5554
5603
|
}), toolbar && React__default.createElement("div", {
|
|
5555
|
-
className: styles$
|
|
5604
|
+
className: styles$q['text-field__toolbar'],
|
|
5556
5605
|
id: controllers.id + "-toolbar",
|
|
5557
5606
|
ref: toolbarRef,
|
|
5558
5607
|
onClick: function onClick(event) {
|
|
@@ -5565,7 +5614,7 @@ var TextAreaField = function TextAreaField(_ref) {
|
|
|
5565
5614
|
}, toolbar)));
|
|
5566
5615
|
};
|
|
5567
5616
|
|
|
5568
|
-
var styles$
|
|
5617
|
+
var styles$r = {"text-field":"_20YOA","text-field--invalid":"_3kUSh","text-field--prefixed":"_3IU3Q","text-field--suffixed":"_QXJOD"};
|
|
5569
5618
|
|
|
5570
5619
|
var useTextField = function useTextField(_ref) {
|
|
5571
5620
|
var _classnames;
|
|
@@ -5604,7 +5653,7 @@ var useTextField = function useTextField(_ref) {
|
|
|
5604
5653
|
'aria-invalid': hasError,
|
|
5605
5654
|
autoComplete: autoComplete,
|
|
5606
5655
|
autoFocus: autoFocus,
|
|
5607
|
-
className: classnames(styles$
|
|
5656
|
+
className: classnames(styles$r['text-field'], (_classnames = {}, _classnames[styles$r['text-field--invalid']] = hasError, _classnames)),
|
|
5608
5657
|
'data-testid': testId || "text-field-" + name,
|
|
5609
5658
|
disabled: disabled,
|
|
5610
5659
|
defaultValue: defaultValue,
|
|
@@ -5701,7 +5750,7 @@ var useCheckBoxFieldControllers = function useCheckBoxFieldControllers(_ref) {
|
|
|
5701
5750
|
return controllers;
|
|
5702
5751
|
};
|
|
5703
5752
|
|
|
5704
|
-
var styles$
|
|
5753
|
+
var styles$s = {"check-box-field":"_2sg0c","check-box-field__caption":"_2LdrP","check-box-field__custom-input":"_2mA8e"};
|
|
5705
5754
|
|
|
5706
5755
|
var CheckboxField = function CheckboxField(_ref) {
|
|
5707
5756
|
var name = _ref.name,
|
|
@@ -5725,11 +5774,13 @@ var CheckboxField = function CheckboxField(_ref) {
|
|
|
5725
5774
|
var hasError = !!controllers.error;
|
|
5726
5775
|
return React__default.createElement(Stack, {
|
|
5727
5776
|
space: 8
|
|
5728
|
-
}, React__default.createElement(
|
|
5777
|
+
}, React__default.createElement(Flex, {
|
|
5729
5778
|
space: 8,
|
|
5730
|
-
alignItems: "center"
|
|
5779
|
+
alignItems: "center",
|
|
5780
|
+
flexItems: true,
|
|
5781
|
+
flex: ['0 0 auto']
|
|
5731
5782
|
}, React__default.createElement("div", {
|
|
5732
|
-
className: styles$
|
|
5783
|
+
className: styles$s['check-box-field']
|
|
5733
5784
|
}, React__default.createElement("input", {
|
|
5734
5785
|
name: name,
|
|
5735
5786
|
id: controllers.id,
|
|
@@ -5742,11 +5793,12 @@ var CheckboxField = function CheckboxField(_ref) {
|
|
|
5742
5793
|
onChange: controllers.onChange,
|
|
5743
5794
|
onBlur: controllers.onBlur
|
|
5744
5795
|
}), React__default.createElement("span", {
|
|
5745
|
-
className: styles$
|
|
5796
|
+
className: styles$s['check-box-field__custom-input']
|
|
5746
5797
|
})), label && React__default.createElement(Label, {
|
|
5747
|
-
htmlFor: controllers.id
|
|
5798
|
+
htmlFor: controllers.id,
|
|
5799
|
+
truncate: false
|
|
5748
5800
|
}, label)), caption && React__default.createElement("div", {
|
|
5749
|
-
className: styles$
|
|
5801
|
+
className: styles$s['check-box-field__caption']
|
|
5750
5802
|
}, React__default.createElement(Caption, {
|
|
5751
5803
|
fieldId: controllers.id
|
|
5752
5804
|
}, caption)), controllers.error && React__default.createElement(ErrorMessage, {
|
|
@@ -5754,7 +5806,7 @@ var CheckboxField = function CheckboxField(_ref) {
|
|
|
5754
5806
|
}, controllers.error));
|
|
5755
5807
|
};
|
|
5756
5808
|
|
|
5757
|
-
var styles$
|
|
5809
|
+
var styles$t = {"pill-select-field":"_g6T-p","pill-select-field__custom-input":"_1i2AX"};
|
|
5758
5810
|
|
|
5759
5811
|
var useMultiSelectFieldControllers = function useMultiSelectFieldControllers(_ref) {
|
|
5760
5812
|
var name = _ref.name,
|
|
@@ -5846,7 +5898,7 @@ var PillSelectField = function PillSelectField(_ref) {
|
|
|
5846
5898
|
var itemId = controllers.id + "-" + itemIdentifier;
|
|
5847
5899
|
return React__default.createElement("div", {
|
|
5848
5900
|
key: itemIdentifier,
|
|
5849
|
-
className: styles$
|
|
5901
|
+
className: styles$t['pill-select-field']
|
|
5850
5902
|
}, React__default.createElement("input", {
|
|
5851
5903
|
name: name + "-" + itemIdentifier,
|
|
5852
5904
|
id: itemId,
|
|
@@ -5868,7 +5920,7 @@ var PillSelectField = function PillSelectField(_ref) {
|
|
|
5868
5920
|
controllers.onChange(newValue);
|
|
5869
5921
|
}
|
|
5870
5922
|
}), React__default.createElement("span", {
|
|
5871
|
-
className: styles$
|
|
5923
|
+
className: styles$t['pill-select-field__custom-input']
|
|
5872
5924
|
}, option.label));
|
|
5873
5925
|
})));
|
|
5874
5926
|
};
|
|
@@ -5916,82 +5968,50 @@ var useRadioGroupFieldContext = function useRadioGroupFieldContext() {
|
|
|
5916
5968
|
return context;
|
|
5917
5969
|
};
|
|
5918
5970
|
|
|
5919
|
-
var styles$
|
|
5971
|
+
var styles$u = {"label":"_1WGz2","label--truncate":"_mQ9Rd","radio-group-field__label":"_RXyG_"};
|
|
5920
5972
|
|
|
5921
|
-
var
|
|
5922
|
-
|
|
5923
|
-
|
|
5924
|
-
|
|
5973
|
+
var styles$v = {"label":"_1Tw96","label--truncate":"_1o8rK","radio-group-box-option":"_2OGKE","radio-group-box-option__box":"_23M9k","radio-group-box-option__label":"_1r-Wg"};
|
|
5974
|
+
|
|
5975
|
+
var RadioGroupBoxOption = function RadioGroupBoxOption(_ref) {
|
|
5976
|
+
var value = _ref.value,
|
|
5977
|
+
inputId = _ref.id,
|
|
5925
5978
|
label = _ref.label,
|
|
5926
|
-
|
|
5927
|
-
|
|
5928
|
-
|
|
5929
|
-
|
|
5930
|
-
|
|
5931
|
-
|
|
5932
|
-
|
|
5933
|
-
var controllers = useRadioGroupFieldControllers({
|
|
5934
|
-
name: name,
|
|
5935
|
-
value: value,
|
|
5936
|
-
onChange: onChange,
|
|
5937
|
-
error: error
|
|
5979
|
+
caption = _ref.caption,
|
|
5980
|
+
testId = _ref.testId,
|
|
5981
|
+
children = _ref.children;
|
|
5982
|
+
var radioGroupContext = useRadioGroupFieldContext();
|
|
5983
|
+
var id = useFieldId({
|
|
5984
|
+
name: radioGroupContext.name,
|
|
5985
|
+
id: inputId
|
|
5938
5986
|
});
|
|
5939
|
-
|
|
5940
|
-
|
|
5941
|
-
},
|
|
5942
|
-
|
|
5943
|
-
|
|
5944
|
-
|
|
5945
|
-
|
|
5946
|
-
|
|
5947
|
-
|
|
5948
|
-
|
|
5949
|
-
|
|
5987
|
+
return React__default.createElement("label", {
|
|
5988
|
+
className: styles$v['radio-group-box-option']
|
|
5989
|
+
}, React__default.createElement("input", {
|
|
5990
|
+
type: "radio",
|
|
5991
|
+
"data-testid": testId,
|
|
5992
|
+
id: id,
|
|
5993
|
+
name: radioGroupContext.name,
|
|
5994
|
+
value: value,
|
|
5995
|
+
onChange: radioGroupContext.onChange,
|
|
5996
|
+
checked: radioGroupContext.value !== undefined ? radioGroupContext.value === value : undefined,
|
|
5997
|
+
disabled: radioGroupContext.disabled
|
|
5998
|
+
}), React__default.createElement("div", {
|
|
5999
|
+
className: styles$v['radio-group-box-option__box']
|
|
5950
6000
|
}, React__default.createElement(Stack, {
|
|
5951
|
-
space:
|
|
6001
|
+
space: 16,
|
|
6002
|
+
alignItems: "center",
|
|
6003
|
+
justifyContent: "center"
|
|
6004
|
+
}, children, React__default.createElement(Stack, {
|
|
6005
|
+
space: 8,
|
|
6006
|
+
alignItems: "center"
|
|
5952
6007
|
}, label && React__default.createElement("div", {
|
|
5953
|
-
className: styles$
|
|
5954
|
-
}, label), React__default.createElement(
|
|
5955
|
-
|
|
5956
|
-
},
|
|
5957
|
-
testId: testId
|
|
5958
|
-
}, children) : React__default.createElement(Stack, {
|
|
5959
|
-
space: 12,
|
|
5960
|
-
testId: testId
|
|
5961
|
-
}, children), controllers.error && React__default.createElement(ErrorMessage, null, controllers.error))));
|
|
5962
|
-
};
|
|
5963
|
-
|
|
5964
|
-
var InlineOptions = function InlineOptions(_ref2) {
|
|
5965
|
-
var children = _ref2.children,
|
|
5966
|
-
testId = _ref2.testId;
|
|
5967
|
-
var MAX_OPTIONS_PER_ROW = 4;
|
|
5968
|
-
var numberOfElements = React__default.Children.count(children);
|
|
5969
|
-
|
|
5970
|
-
if (numberOfElements > MAX_OPTIONS_PER_ROW) {
|
|
5971
|
-
var childrenArray = React__default.Children.toArray(children);
|
|
5972
|
-
var rows = [];
|
|
5973
|
-
|
|
5974
|
-
for (var i = 0; i < childrenArray.length; i += MAX_OPTIONS_PER_ROW) {
|
|
5975
|
-
rows.push(childrenArray.slice(i, i + MAX_OPTIONS_PER_ROW));
|
|
5976
|
-
}
|
|
5977
|
-
|
|
5978
|
-
return React__default.createElement(Stack, {
|
|
5979
|
-
space: 12,
|
|
5980
|
-
testId: testId
|
|
5981
|
-
}, rows.map(function (row, rowIndex) {
|
|
5982
|
-
return React__default.createElement(FormRow, {
|
|
5983
|
-
key: rowIndex,
|
|
5984
|
-
columns: MAX_OPTIONS_PER_ROW
|
|
5985
|
-
}, row);
|
|
5986
|
-
}));
|
|
5987
|
-
}
|
|
5988
|
-
|
|
5989
|
-
return React__default.createElement(FormRow, {
|
|
5990
|
-
testId: testId
|
|
5991
|
-
}, children);
|
|
6008
|
+
className: styles$v['radio-group-box-option__label']
|
|
6009
|
+
}, label), caption && React__default.createElement(Caption, {
|
|
6010
|
+
fieldId: id
|
|
6011
|
+
}, caption)))));
|
|
5992
6012
|
};
|
|
5993
6013
|
|
|
5994
|
-
var styles$
|
|
6014
|
+
var styles$w = {"radio-group-option":"_1Clmp","radio-group-option__caption":"_3UmWA","radio-group-option__custom-input":"_1tMq-"};
|
|
5995
6015
|
|
|
5996
6016
|
var RadioGroupOption = function RadioGroupOption(_ref) {
|
|
5997
6017
|
var value = _ref.value,
|
|
@@ -6010,7 +6030,7 @@ var RadioGroupOption = function RadioGroupOption(_ref) {
|
|
|
6010
6030
|
space: 8,
|
|
6011
6031
|
alignItems: "center"
|
|
6012
6032
|
}, React__default.createElement("div", {
|
|
6013
|
-
className: styles$
|
|
6033
|
+
className: styles$w['radio-group-option']
|
|
6014
6034
|
}, React__default.createElement("input", {
|
|
6015
6035
|
type: "radio",
|
|
6016
6036
|
"data-testid": testId,
|
|
@@ -6021,19 +6041,161 @@ var RadioGroupOption = function RadioGroupOption(_ref) {
|
|
|
6021
6041
|
checked: radioGroupContext.value !== undefined ? radioGroupContext.value === value : undefined,
|
|
6022
6042
|
disabled: radioGroupContext.disabled
|
|
6023
6043
|
}), React__default.createElement("span", {
|
|
6024
|
-
className: styles$
|
|
6044
|
+
className: styles$w['radio-group-option__custom-input']
|
|
6025
6045
|
})), label && React__default.createElement(Label, {
|
|
6026
6046
|
htmlFor: id
|
|
6027
6047
|
}, label)), caption && React__default.createElement("div", {
|
|
6028
|
-
className: styles$
|
|
6048
|
+
className: styles$w['radio-group-option__caption']
|
|
6029
6049
|
}, React__default.createElement(Caption, {
|
|
6030
6050
|
fieldId: id
|
|
6031
6051
|
}, caption)));
|
|
6032
6052
|
};
|
|
6033
6053
|
|
|
6034
|
-
var
|
|
6054
|
+
var OPTION_TYPES = {
|
|
6055
|
+
BOX: 'BOX',
|
|
6056
|
+
RADIO: 'RADIO'
|
|
6057
|
+
};
|
|
6058
|
+
var INVALID_OPTIONS_MESSAGE = 'RadioGroupField accept only RadioGroupOption or RadioGroupBoxOption as children. Check the children passed on the RadioGroupField.';
|
|
6059
|
+
var getOptionsType = function getOptionsType(children) {
|
|
6060
|
+
var options = [];
|
|
6061
|
+
React__default.Children.forEach(children, function (child) {
|
|
6062
|
+
if (!child || typeof child !== 'object' || !('type' in child)) {
|
|
6063
|
+
throw new TypeError(INVALID_OPTIONS_MESSAGE);
|
|
6064
|
+
}
|
|
6065
|
+
|
|
6066
|
+
var isBoxOption = child.type === RadioGroupBoxOption;
|
|
6067
|
+
var isRadioOption = child.type === RadioGroupOption;
|
|
6035
6068
|
|
|
6036
|
-
|
|
6069
|
+
if (!isBoxOption && !isRadioOption) {
|
|
6070
|
+
throw new TypeError(INVALID_OPTIONS_MESSAGE);
|
|
6071
|
+
}
|
|
6072
|
+
|
|
6073
|
+
if (isBoxOption && options.includes(OPTION_TYPES.RADIO) || isRadioOption && options.includes(OPTION_TYPES.BOX)) {
|
|
6074
|
+
throw new TypeError(INVALID_OPTIONS_MESSAGE + " It is not possible to mix options");
|
|
6075
|
+
}
|
|
6076
|
+
|
|
6077
|
+
options.push(isBoxOption ? OPTION_TYPES.BOX : OPTION_TYPES.RADIO);
|
|
6078
|
+
});
|
|
6079
|
+
return options[0];
|
|
6080
|
+
};
|
|
6081
|
+
|
|
6082
|
+
var RadioOptions = function RadioOptions(_ref) {
|
|
6083
|
+
var children = _ref.children,
|
|
6084
|
+
inline = _ref.inline,
|
|
6085
|
+
_ref$columns = _ref.columns,
|
|
6086
|
+
columns = _ref$columns === void 0 ? 4 : _ref$columns,
|
|
6087
|
+
testId = _ref.testId;
|
|
6088
|
+
|
|
6089
|
+
if (inline) {
|
|
6090
|
+
return React__default.createElement(InlineOptions, {
|
|
6091
|
+
testId: testId,
|
|
6092
|
+
columns: columns
|
|
6093
|
+
}, children);
|
|
6094
|
+
}
|
|
6095
|
+
|
|
6096
|
+
return React__default.createElement(Stack, {
|
|
6097
|
+
space: 12,
|
|
6098
|
+
testId: testId
|
|
6099
|
+
}, children);
|
|
6100
|
+
};
|
|
6101
|
+
|
|
6102
|
+
var InlineOptions = function InlineOptions(_ref2) {
|
|
6103
|
+
var children = _ref2.children,
|
|
6104
|
+
columns = _ref2.columns,
|
|
6105
|
+
testId = _ref2.testId;
|
|
6106
|
+
var MAX_OPTIONS_PER_ROW = columns;
|
|
6107
|
+
var childrenArray = React__default.Children.toArray(children);
|
|
6108
|
+
var rows = [];
|
|
6109
|
+
|
|
6110
|
+
for (var i = 0; i < childrenArray.length; i += MAX_OPTIONS_PER_ROW) {
|
|
6111
|
+
rows.push(childrenArray.slice(i, i + MAX_OPTIONS_PER_ROW));
|
|
6112
|
+
}
|
|
6113
|
+
|
|
6114
|
+
return React__default.createElement(Stack, {
|
|
6115
|
+
space: 12,
|
|
6116
|
+
testId: testId
|
|
6117
|
+
}, rows.map(function (row, rowIndex) {
|
|
6118
|
+
return React__default.createElement(FormRow, {
|
|
6119
|
+
key: rowIndex,
|
|
6120
|
+
columns: MAX_OPTIONS_PER_ROW
|
|
6121
|
+
}, row);
|
|
6122
|
+
}));
|
|
6123
|
+
};
|
|
6124
|
+
|
|
6125
|
+
var BoxOptions = function BoxOptions(_ref) {
|
|
6126
|
+
var children = _ref.children,
|
|
6127
|
+
_ref$columns = _ref.columns,
|
|
6128
|
+
columns = _ref$columns === void 0 ? 4 : _ref$columns,
|
|
6129
|
+
testId = _ref.testId;
|
|
6130
|
+
var MAX_OPTIONS_PER_ROW = +columns;
|
|
6131
|
+
var childrenArray = React__default.Children.toArray(children);
|
|
6132
|
+
var rows = [];
|
|
6133
|
+
|
|
6134
|
+
for (var i = 0; i < childrenArray.length; i += MAX_OPTIONS_PER_ROW) {
|
|
6135
|
+
rows.push(childrenArray.slice(i, i + MAX_OPTIONS_PER_ROW));
|
|
6136
|
+
}
|
|
6137
|
+
|
|
6138
|
+
return React__default.createElement(Stack, {
|
|
6139
|
+
space: 12,
|
|
6140
|
+
testId: testId
|
|
6141
|
+
}, rows.map(function (row, rowIndex) {
|
|
6142
|
+
return React__default.createElement(FormRow, {
|
|
6143
|
+
key: rowIndex,
|
|
6144
|
+
columns: row.length
|
|
6145
|
+
}, row);
|
|
6146
|
+
}));
|
|
6147
|
+
};
|
|
6148
|
+
|
|
6149
|
+
var RadioGroupField = function RadioGroupField(_ref) {
|
|
6150
|
+
var name = _ref.name,
|
|
6151
|
+
value = _ref.value,
|
|
6152
|
+
onChange = _ref.onChange,
|
|
6153
|
+
label = _ref.label,
|
|
6154
|
+
error = _ref.error,
|
|
6155
|
+
_ref$inline = _ref.inline,
|
|
6156
|
+
inline = _ref$inline === void 0 ? false : _ref$inline,
|
|
6157
|
+
_ref$disabled = _ref.disabled,
|
|
6158
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
6159
|
+
children = _ref.children,
|
|
6160
|
+
testId = _ref.testId,
|
|
6161
|
+
columns = _ref.columns;
|
|
6162
|
+
var controllers = useRadioGroupFieldControllers({
|
|
6163
|
+
name: name,
|
|
6164
|
+
value: value,
|
|
6165
|
+
onChange: onChange,
|
|
6166
|
+
error: error
|
|
6167
|
+
});
|
|
6168
|
+
var onChangeHandler = useCallback(function (e) {
|
|
6169
|
+
controllers.onChange && controllers.onChange(e);
|
|
6170
|
+
}, [name]);
|
|
6171
|
+
var contextValue = {
|
|
6172
|
+
name: name,
|
|
6173
|
+
disabled: disabled,
|
|
6174
|
+
value: controllers.value,
|
|
6175
|
+
onChange: onChangeHandler
|
|
6176
|
+
};
|
|
6177
|
+
var optionsType = getOptionsType(children);
|
|
6178
|
+
return React__default.createElement(RadioGroupFieldContext.Provider, {
|
|
6179
|
+
value: contextValue
|
|
6180
|
+
}, React__default.createElement(Stack, {
|
|
6181
|
+
space: 12
|
|
6182
|
+
}, label && React__default.createElement("div", {
|
|
6183
|
+
className: styles$u['radio-group-field__label']
|
|
6184
|
+
}, label), React__default.createElement(Stack, {
|
|
6185
|
+
space: 8
|
|
6186
|
+
}, optionsType === OPTION_TYPES.RADIO ? React__default.createElement(RadioOptions, {
|
|
6187
|
+
inline: inline || Boolean(columns),
|
|
6188
|
+
columns: columns,
|
|
6189
|
+
testId: testId
|
|
6190
|
+
}, children) : React__default.createElement(BoxOptions, {
|
|
6191
|
+
columns: columns,
|
|
6192
|
+
testId: testId
|
|
6193
|
+
}, children), controllers.error && React__default.createElement(ErrorMessage, null, controllers.error))));
|
|
6194
|
+
};
|
|
6195
|
+
|
|
6196
|
+
var styles$x = {"text-field":"_18Rzv","text-field--invalid":"_3eD7t","text-field--prefixed":"_2evrG","text-field--suffixed":"_-MgeO","password-container":"_-Rf3c","password-toggle":"_yinPY"};
|
|
6197
|
+
|
|
6198
|
+
var styles$y = {"password-criteria":"_U0krC","password-criteria--invalid":"_2XIl4"};
|
|
6037
6199
|
|
|
6038
6200
|
var PasswordCriteria = function PasswordCriteria(_ref) {
|
|
6039
6201
|
var _classnames;
|
|
@@ -6041,7 +6203,7 @@ var PasswordCriteria = function PasswordCriteria(_ref) {
|
|
|
6041
6203
|
var met = _ref.met,
|
|
6042
6204
|
children = _ref.children;
|
|
6043
6205
|
return React__default.createElement("span", {
|
|
6044
|
-
className: classnames(styles$
|
|
6206
|
+
className: classnames(styles$y['password-criteria'], (_classnames = {}, _classnames[styles$y['password-criteria--invalid']] = !met, _classnames))
|
|
6045
6207
|
}, React__default.createElement(Inline, {
|
|
6046
6208
|
space: met ? 4 : 8
|
|
6047
6209
|
}, met ? React__default.createElement(IconCheck, {
|
|
@@ -6126,11 +6288,11 @@ var PasswordField = function PasswordField(_ref) {
|
|
|
6126
6288
|
error: controllers.error
|
|
6127
6289
|
};
|
|
6128
6290
|
return React__default.createElement(Field, Object.assign({}, fieldProps), React__default.createElement("div", {
|
|
6129
|
-
className: styles$
|
|
6291
|
+
className: styles$x['password-container']
|
|
6130
6292
|
}, React__default.createElement("input", {
|
|
6131
6293
|
name: name,
|
|
6132
6294
|
id: controllers.id,
|
|
6133
|
-
className: classnames(styles$
|
|
6295
|
+
className: classnames(styles$x['text-field'], (_classnames = {}, _classnames[styles$x['text-field--invalid']] = hasError, _classnames)),
|
|
6134
6296
|
type: type,
|
|
6135
6297
|
"data-testid": testId || "text-field-" + name,
|
|
6136
6298
|
"aria-describedby": hasError ? controllers.id + "-error-message" : controllers.id + "-describer",
|
|
@@ -6142,7 +6304,7 @@ var PasswordField = function PasswordField(_ref) {
|
|
|
6142
6304
|
onChange: controllers.onChange,
|
|
6143
6305
|
onBlur: controllers.onBlur
|
|
6144
6306
|
}), React__default.createElement("div", {
|
|
6145
|
-
className: styles$
|
|
6307
|
+
className: styles$x['password-toggle'],
|
|
6146
6308
|
onClick: toggleType,
|
|
6147
6309
|
onKeyPress: toggleType,
|
|
6148
6310
|
"data-testid": "password-toggle",
|
|
@@ -6285,14 +6447,14 @@ var getSelectStyles$1 = function getSelectStyles(_ref) {
|
|
|
6285
6447
|
};
|
|
6286
6448
|
};
|
|
6287
6449
|
|
|
6288
|
-
var _excluded$22 = ["children"
|
|
6450
|
+
var _excluded$22 = ["children"];
|
|
6289
6451
|
|
|
6290
6452
|
function CustomOption(_ref) {
|
|
6291
6453
|
var children = _ref.children,
|
|
6292
|
-
CustomComponent = _ref.CustomComponent,
|
|
6293
6454
|
props = _objectWithoutPropertiesLoose(_ref, _excluded$22);
|
|
6294
6455
|
|
|
6295
|
-
|
|
6456
|
+
var UserCustomOption = props.selectProps.componentsProps.UserCustomOption;
|
|
6457
|
+
return React__default.createElement(components.Option, Object.assign({}, props), React__default.createElement(UserCustomOption, Object.assign({}, props), children));
|
|
6296
6458
|
}
|
|
6297
6459
|
|
|
6298
6460
|
var isScrollingTheSelectMenu = function isScrollingTheSelectMenu(element) {
|
|
@@ -6317,6 +6479,15 @@ var isReactSelectElement = function isReactSelectElement(element) {
|
|
|
6317
6479
|
return typeof firstOption.id === 'string' && firstOption.id.includes('react-select');
|
|
6318
6480
|
};
|
|
6319
6481
|
|
|
6482
|
+
var CustomContainer = function CustomContainer(props) {
|
|
6483
|
+
var componentsProps = props.selectProps.componentsProps;
|
|
6484
|
+
return React__default.createElement(components.SelectContainer, Object.assign({}, props, {
|
|
6485
|
+
innerProps: Object.assign({}, props.innerProps, {
|
|
6486
|
+
'data-testid': componentsProps.testId
|
|
6487
|
+
})
|
|
6488
|
+
}));
|
|
6489
|
+
};
|
|
6490
|
+
|
|
6320
6491
|
var MultiSelectField = function MultiSelectField(_ref) {
|
|
6321
6492
|
var name = _ref.name,
|
|
6322
6493
|
inputId = _ref.id,
|
|
@@ -6371,19 +6542,13 @@ var MultiSelectField = function MultiSelectField(_ref) {
|
|
|
6371
6542
|
onBlur: controllers.onBlur,
|
|
6372
6543
|
isMulti: true,
|
|
6373
6544
|
closeMenuOnSelect: closeOnSelect,
|
|
6545
|
+
componentsProps: {
|
|
6546
|
+
testId: testId,
|
|
6547
|
+
UserCustomOption: UserCustomOption
|
|
6548
|
+
},
|
|
6374
6549
|
components: {
|
|
6375
|
-
SelectContainer:
|
|
6376
|
-
|
|
6377
|
-
innerProps: Object.assign({}, props.innerProps, {
|
|
6378
|
-
'data-testid': testId
|
|
6379
|
-
})
|
|
6380
|
-
}));
|
|
6381
|
-
},
|
|
6382
|
-
Option: UserCustomOption ? function (props) {
|
|
6383
|
-
return React__default.createElement(CustomOption, Object.assign({
|
|
6384
|
-
CustomComponent: UserCustomOption
|
|
6385
|
-
}, props));
|
|
6386
|
-
} : components.Option
|
|
6550
|
+
SelectContainer: CustomContainer,
|
|
6551
|
+
Option: UserCustomOption ? CustomOption : components.Option
|
|
6387
6552
|
},
|
|
6388
6553
|
menuShouldScrollIntoView: menuShouldScrollIntoView,
|
|
6389
6554
|
menuPlacement: menuShouldScrollIntoView ? 'bottom' : 'auto',
|
|
@@ -6398,20 +6563,20 @@ var MultiSelectField = function MultiSelectField(_ref) {
|
|
|
6398
6563
|
}));
|
|
6399
6564
|
};
|
|
6400
6565
|
|
|
6401
|
-
var styles$
|
|
6566
|
+
var styles$z = {"custom-control":"_1cDCR"};
|
|
6402
6567
|
|
|
6403
|
-
var _excluded$23 = ["children"
|
|
6568
|
+
var _excluded$23 = ["children"];
|
|
6404
6569
|
|
|
6405
6570
|
function CustomControl(_ref) {
|
|
6406
6571
|
var _props$getValue;
|
|
6407
6572
|
|
|
6408
6573
|
var children = _ref.children,
|
|
6409
|
-
CustomPrefixComponent = _ref.CustomPrefixComponent,
|
|
6410
6574
|
props = _objectWithoutPropertiesLoose(_ref, _excluded$23);
|
|
6411
6575
|
|
|
6576
|
+
var SelectedOptionPrefix = props.selectProps.componentsProps.SelectedOptionPrefix;
|
|
6412
6577
|
var selectedOption = (_props$getValue = props.getValue()) === null || _props$getValue === void 0 ? void 0 : _props$getValue[0];
|
|
6413
|
-
return React__default.createElement(components.Control, Object.assign({}, props),
|
|
6414
|
-
className: styles$
|
|
6578
|
+
return React__default.createElement(components.Control, Object.assign({}, props), SelectedOptionPrefix && selectedOption ? React__default.createElement("div", {
|
|
6579
|
+
className: styles$z['custom-control'],
|
|
6415
6580
|
style: {
|
|
6416
6581
|
paddingLeft: selectedOption ? 8 : 0
|
|
6417
6582
|
}
|
|
@@ -6419,21 +6584,11 @@ function CustomControl(_ref) {
|
|
|
6419
6584
|
alignItems: "center",
|
|
6420
6585
|
space: 0,
|
|
6421
6586
|
flex: ['0 1 auto', 1]
|
|
6422
|
-
}, React__default.createElement(
|
|
6587
|
+
}, React__default.createElement(SelectedOptionPrefix, Object.assign({
|
|
6423
6588
|
selectedOption: selectedOption
|
|
6424
6589
|
}, props)), children)) : children);
|
|
6425
6590
|
}
|
|
6426
6591
|
|
|
6427
|
-
var _excluded$24 = ["children", "CustomComponent"];
|
|
6428
|
-
|
|
6429
|
-
function CustomOption$1(_ref) {
|
|
6430
|
-
var children = _ref.children,
|
|
6431
|
-
CustomComponent = _ref.CustomComponent,
|
|
6432
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$24);
|
|
6433
|
-
|
|
6434
|
-
return React__default.createElement(components.Option, Object.assign({}, props), React__default.createElement(CustomComponent, Object.assign({}, props), children));
|
|
6435
|
-
}
|
|
6436
|
-
|
|
6437
6592
|
var useSelectField = function useSelectField(_ref) {
|
|
6438
6593
|
var _ref$asToolbarFilter = _ref.asToolbarFilter,
|
|
6439
6594
|
asToolbarFilter = _ref$asToolbarFilter === void 0 ? false : _ref$asToolbarFilter,
|
|
@@ -6477,24 +6632,15 @@ var useSelectField = function useSelectField(_ref) {
|
|
|
6477
6632
|
|
|
6478
6633
|
return !isScrollingTheSelectMenu(e.target);
|
|
6479
6634
|
},
|
|
6635
|
+
componentsProps: {
|
|
6636
|
+
testId: testId,
|
|
6637
|
+
UserCustomOption: UserCustomOption,
|
|
6638
|
+
SelectedOptionPrefix: SelectedOptionPrefix
|
|
6639
|
+
},
|
|
6480
6640
|
components: {
|
|
6481
|
-
SelectContainer:
|
|
6482
|
-
|
|
6483
|
-
|
|
6484
|
-
'data-testid': testId
|
|
6485
|
-
})
|
|
6486
|
-
}));
|
|
6487
|
-
},
|
|
6488
|
-
Option: UserCustomOption ? function (props) {
|
|
6489
|
-
return React__default.createElement(CustomOption$1, Object.assign({
|
|
6490
|
-
CustomComponent: UserCustomOption
|
|
6491
|
-
}, props));
|
|
6492
|
-
} : components.Option,
|
|
6493
|
-
Control: SelectedOptionPrefix ? function (props) {
|
|
6494
|
-
return React__default.createElement(CustomControl, Object.assign({
|
|
6495
|
-
CustomPrefixComponent: SelectedOptionPrefix
|
|
6496
|
-
}, props));
|
|
6497
|
-
} : components.Control
|
|
6641
|
+
SelectContainer: CustomContainer,
|
|
6642
|
+
Option: UserCustomOption ? CustomOption : components.Option,
|
|
6643
|
+
Control: SelectedOptionPrefix ? CustomControl : components.Control
|
|
6498
6644
|
},
|
|
6499
6645
|
inputId: controllers.id,
|
|
6500
6646
|
isClearable: isClearable,
|
|
@@ -6538,15 +6684,15 @@ var SelectField = function SelectField(props) {
|
|
|
6538
6684
|
}, React__default.createElement(Select, Object.assign({}, selectProps))));
|
|
6539
6685
|
};
|
|
6540
6686
|
|
|
6541
|
-
var styles$
|
|
6687
|
+
var styles$A = {"custom-list":"_uC4zU"};
|
|
6542
6688
|
|
|
6543
|
-
var _excluded$
|
|
6689
|
+
var _excluded$24 = ["children", "hasMoreOptions", "hasMoreOptionsFirstLoad"];
|
|
6544
6690
|
|
|
6545
6691
|
var CustomList = function CustomList(_ref) {
|
|
6546
6692
|
var children = _ref.children,
|
|
6547
6693
|
hasMoreOptions = _ref.hasMoreOptions,
|
|
6548
6694
|
hasMoreOptionsFirstLoad = _ref.hasMoreOptionsFirstLoad,
|
|
6549
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
6695
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$24);
|
|
6550
6696
|
|
|
6551
6697
|
var showFooter = hasMoreOptions;
|
|
6552
6698
|
|
|
@@ -6557,15 +6703,15 @@ var CustomList = function CustomList(_ref) {
|
|
|
6557
6703
|
return React__default.createElement(components.MenuList, Object.assign({}, props), React__default.createElement(Fragment, null, children, showFooter && React__default.createElement(Inline, {
|
|
6558
6704
|
justifyContent: "center"
|
|
6559
6705
|
}, React__default.createElement("div", {
|
|
6560
|
-
className: styles$
|
|
6706
|
+
className: styles$A['custom-list']
|
|
6561
6707
|
}, getLocalizedString('main.START_TYPING_TO_SEE_MORE_OPTIONS')))));
|
|
6562
6708
|
};
|
|
6563
6709
|
|
|
6564
|
-
var _excluded$
|
|
6710
|
+
var _excluded$25 = ["loadOptions"];
|
|
6565
6711
|
|
|
6566
6712
|
var AsyncSelectField = function AsyncSelectField(_ref) {
|
|
6567
6713
|
var loadOptions = _ref.loadOptions,
|
|
6568
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
6714
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$25);
|
|
6569
6715
|
|
|
6570
6716
|
var _useState = useState(false),
|
|
6571
6717
|
hasMoreOptions = _useState[0],
|
|
@@ -6913,7 +7059,7 @@ var getFormikError = function getFormikError(error) {
|
|
|
6913
7059
|
return undefined;
|
|
6914
7060
|
};
|
|
6915
7061
|
|
|
6916
|
-
var styles$
|
|
7062
|
+
var styles$B = {"container":"_1Ini2","wrapper":"_21VnL","interactionDisabled":"_wJ6Cb","DayPicker-Day":"_1c48y","navBar":"_3KwsN","todayButton":"_10CBO","navButtonInteractionDisabled":"_dHL-D","navButtonPrev":"_6kNi3","navButtonNext":"_13W_e","months":"_1FeSY","month":"_wU6A4","caption":"_AMbAo","weekdays":"_1LEst","weekdaysRow":"_2XECo","weekday":"_1C5ry","body":"_11F-Y","week":"_3MAFk","day":"_mG73F","disabled":"_2pgnH","selected":"_MtLaz","outside":"_CRqyX","footer":"_2KG9-","today":"_2JA2y","overlayWrapper":"_1JWbc","overlay":"_2tL6g","weekNumber":"_3u72O","text-field":"_25rf7","date-range-field":"_3qVhi","text-field--invalid":"_2M9Ud","text-field--prefixed":"_3TUb2","text-field--suffixed":"_foqL0","date-range-field--invalid":"_3df9R","date-range-field--disabled":"_2Nkht"};
|
|
6917
7063
|
|
|
6918
7064
|
var FromDate = function FromDate(_ref) {
|
|
6919
7065
|
var name = _ref.name,
|
|
@@ -6951,7 +7097,7 @@ var FromDate = function FromDate(_ref) {
|
|
|
6951
7097
|
}
|
|
6952
7098
|
|
|
6953
7099
|
var dayPickerProps = {
|
|
6954
|
-
classNames: styles$
|
|
7100
|
+
classNames: styles$B,
|
|
6955
7101
|
months: MONTH_NAMES,
|
|
6956
7102
|
weekdaysLong: DAYS,
|
|
6957
7103
|
weekdaysShort: DAYS.map(function (day) {
|
|
@@ -6978,7 +7124,7 @@ var FromDate = function FromDate(_ref) {
|
|
|
6978
7124
|
};
|
|
6979
7125
|
return React__default.createElement(DayPickerInput, {
|
|
6980
7126
|
format: format,
|
|
6981
|
-
classNames: styles$
|
|
7127
|
+
classNames: styles$B,
|
|
6982
7128
|
selectedDay: start,
|
|
6983
7129
|
value: start,
|
|
6984
7130
|
formatDate: formatDate,
|
|
@@ -7051,7 +7197,7 @@ var ToDate = function ToDate(_ref, ref) {
|
|
|
7051
7197
|
}
|
|
7052
7198
|
|
|
7053
7199
|
var dayPickerProps = {
|
|
7054
|
-
classNames: styles$
|
|
7200
|
+
classNames: styles$B,
|
|
7055
7201
|
months: MONTH_NAMES,
|
|
7056
7202
|
weekdaysLong: DAYS,
|
|
7057
7203
|
weekdaysShort: DAYS.map(function (day) {
|
|
@@ -7070,7 +7216,7 @@ var ToDate = function ToDate(_ref, ref) {
|
|
|
7070
7216
|
};
|
|
7071
7217
|
return React__default.createElement(DayPickerInput, {
|
|
7072
7218
|
format: format,
|
|
7073
|
-
classNames: styles$
|
|
7219
|
+
classNames: styles$B,
|
|
7074
7220
|
selectedDay: end,
|
|
7075
7221
|
value: end,
|
|
7076
7222
|
formatDate: formatDate,
|
|
@@ -7155,7 +7301,7 @@ var DateRangeField = function DateRangeField(_ref) {
|
|
|
7155
7301
|
start = _controllers$value.start,
|
|
7156
7302
|
end = _controllers$value.end;
|
|
7157
7303
|
return React__default.createElement(Field, Object.assign({}, fieldProps), React__default.createElement("div", {
|
|
7158
|
-
className: classnames(styles$
|
|
7304
|
+
className: classnames(styles$B['date-range-field'], (_classnames = {}, _classnames[styles$B['date-range-field--invalid']] = hasError, _classnames[styles$B['date-range-field--disabled']] = disabled, _classnames)),
|
|
7159
7305
|
"data-testid": testId
|
|
7160
7306
|
}, React__default.createElement(IconCalendarAlt, {
|
|
7161
7307
|
size: "medium",
|
|
@@ -7349,14 +7495,14 @@ var WeekField = function WeekField(_ref) {
|
|
|
7349
7495
|
})));
|
|
7350
7496
|
};
|
|
7351
7497
|
|
|
7352
|
-
var _excluded$
|
|
7498
|
+
var _excluded$26 = ["placeholder", "autoComplete"];
|
|
7353
7499
|
|
|
7354
7500
|
var TimeFieldElement = function TimeFieldElement(_ref, ref) {
|
|
7355
7501
|
var _ref$placeholder = _ref.placeholder,
|
|
7356
7502
|
placeholder = _ref$placeholder === void 0 ? '9am' : _ref$placeholder,
|
|
7357
7503
|
_ref$autoComplete = _ref.autoComplete,
|
|
7358
7504
|
autoComplete = _ref$autoComplete === void 0 ? 'off' : _ref$autoComplete,
|
|
7359
|
-
allOtherProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
7505
|
+
allOtherProps = _objectWithoutPropertiesLoose(_ref, _excluded$26);
|
|
7360
7506
|
|
|
7361
7507
|
var _useTextField = useTextField(_extends({}, allOtherProps, {
|
|
7362
7508
|
placeholder: placeholder,
|
|
@@ -7377,12 +7523,12 @@ var TimeFieldElement = function TimeFieldElement(_ref, ref) {
|
|
|
7377
7523
|
|
|
7378
7524
|
var TimeField = forwardRef(TimeFieldElement);
|
|
7379
7525
|
|
|
7380
|
-
var _excluded$
|
|
7526
|
+
var _excluded$27 = ["currencySymbol"];
|
|
7381
7527
|
|
|
7382
7528
|
var CurrencyFieldElement = function CurrencyFieldElement(_ref, ref) {
|
|
7383
7529
|
var _ref$currencySymbol = _ref.currencySymbol,
|
|
7384
7530
|
currencySymbol = _ref$currencySymbol === void 0 ? "$" : _ref$currencySymbol,
|
|
7385
|
-
allOtherProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
7531
|
+
allOtherProps = _objectWithoutPropertiesLoose(_ref, _excluded$27);
|
|
7386
7532
|
|
|
7387
7533
|
var _useTextField = useTextField(_extends({}, allOtherProps, {
|
|
7388
7534
|
ref: ref
|
|
@@ -7415,7 +7561,7 @@ var CurrencyFieldElement = function CurrencyFieldElement(_ref, ref) {
|
|
|
7415
7561
|
|
|
7416
7562
|
var CurrencyField = forwardRef(CurrencyFieldElement);
|
|
7417
7563
|
|
|
7418
|
-
var _excluded$
|
|
7564
|
+
var _excluded$28 = ["max", "min", "precision", "stepSize"];
|
|
7419
7565
|
|
|
7420
7566
|
var PercentageElement = function PercentageElement(_ref, ref) {
|
|
7421
7567
|
var _ref$max = _ref.max,
|
|
@@ -7426,7 +7572,7 @@ var PercentageElement = function PercentageElement(_ref, ref) {
|
|
|
7426
7572
|
precision = _ref$precision === void 0 ? 0 : _ref$precision,
|
|
7427
7573
|
_ref$stepSize = _ref.stepSize,
|
|
7428
7574
|
stepSize = _ref$stepSize === void 0 ? 1 : _ref$stepSize,
|
|
7429
|
-
allOtherProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
7575
|
+
allOtherProps = _objectWithoutPropertiesLoose(_ref, _excluded$28);
|
|
7430
7576
|
|
|
7431
7577
|
var _useTextField = useTextField(_extends({}, allOtherProps, {
|
|
7432
7578
|
ref: ref
|
|
@@ -7518,7 +7664,7 @@ var BUTTON_THEME = {
|
|
|
7518
7664
|
UPSELL: 'upsell'
|
|
7519
7665
|
};
|
|
7520
7666
|
|
|
7521
|
-
var styles$
|
|
7667
|
+
var styles$C = {"banner":"_vgLin","banner__title":"_63TwY","banner__body":"_3n6S7","banner__body--multilineCTA":"_2pMYs","banner--info":"_ON6Eg","banner__icon":"_1-D-E","banner--success":"_1FFZh","banner--danger":"_2R34O","banner--warning":"_3Cfhe","banner--upsell":"_1SIOw","banner__close":"_3SNQ1","banner--single-line":"_3nLTI"};
|
|
7522
7668
|
|
|
7523
7669
|
var ButtonCTA = function ButtonCTA(_ref) {
|
|
7524
7670
|
var button = _ref.button,
|
|
@@ -7541,7 +7687,7 @@ var ButtonCTA = function ButtonCTA(_ref) {
|
|
|
7541
7687
|
}, button.props));
|
|
7542
7688
|
};
|
|
7543
7689
|
|
|
7544
|
-
var styles$
|
|
7690
|
+
var styles$D = {"banner__caption":"_1jqm8"};
|
|
7545
7691
|
|
|
7546
7692
|
var InlineBannerCTA = function InlineBannerCTA(_ref) {
|
|
7547
7693
|
var primaryButton = _ref.primaryButton,
|
|
@@ -7553,6 +7699,7 @@ var InlineBannerCTA = function InlineBannerCTA(_ref) {
|
|
|
7553
7699
|
space: 12,
|
|
7554
7700
|
"data-testid": "banner_ctas"
|
|
7555
7701
|
}, multiLine ? React__default.createElement(Inline, {
|
|
7702
|
+
flexWrap: 'wrap',
|
|
7556
7703
|
space: 12
|
|
7557
7704
|
}, React__default.createElement(ButtonCTA, {
|
|
7558
7705
|
button: primaryButton,
|
|
@@ -7562,6 +7709,7 @@ var InlineBannerCTA = function InlineBannerCTA(_ref) {
|
|
|
7562
7709
|
button: secondaryButton,
|
|
7563
7710
|
bannerTheme: bannerTheme
|
|
7564
7711
|
})) : React__default.createElement(Inline, {
|
|
7712
|
+
flexWrap: 'wrap',
|
|
7565
7713
|
space: 12
|
|
7566
7714
|
}, secondaryButton && React__default.createElement(ButtonCTA, {
|
|
7567
7715
|
button: secondaryButton,
|
|
@@ -7571,7 +7719,7 @@ var InlineBannerCTA = function InlineBannerCTA(_ref) {
|
|
|
7571
7719
|
bannerTheme: bannerTheme,
|
|
7572
7720
|
primaryCTA: true
|
|
7573
7721
|
})), caption && multiLine && React__default.createElement("div", {
|
|
7574
|
-
className: styles$
|
|
7722
|
+
className: styles$D['banner__caption']
|
|
7575
7723
|
}, caption));
|
|
7576
7724
|
};
|
|
7577
7725
|
|
|
@@ -7614,24 +7762,26 @@ var InlineBanner = function InlineBanner(_ref) {
|
|
|
7614
7762
|
var Layout = multiLine ? Stack : Inline;
|
|
7615
7763
|
return React__default.createElement("div", {
|
|
7616
7764
|
"data-testid": testId,
|
|
7617
|
-
className: classnames(styles$
|
|
7765
|
+
className: classnames(styles$C['banner'], (_classnames = {}, _classnames[styles$C['banner--info']] = theme === BANNER_THEME.INFO, _classnames[styles$C['banner--warning']] = theme === BANNER_THEME.WARNING, _classnames[styles$C['banner--success']] = theme === BANNER_THEME.SUCCESS, _classnames[styles$C['banner--danger']] = theme === BANNER_THEME.DANGER, _classnames[styles$C['banner--upsell']] = theme === BANNER_THEME.UPSELL, _classnames[styles$C['banner--single-line']] = !multiLine, _classnames))
|
|
7618
7766
|
}, React__default.createElement(Inline, {
|
|
7619
7767
|
alignItems: multiLine ? undefined : 'center',
|
|
7620
7768
|
flex: ['0 1 auto', 1],
|
|
7621
7769
|
space: 12
|
|
7622
7770
|
}, React__default.createElement("div", {
|
|
7623
|
-
className: styles$
|
|
7771
|
+
className: styles$C['banner__icon']
|
|
7624
7772
|
}, React__default.createElement(InlineBannerIcon, {
|
|
7625
7773
|
theme: theme
|
|
7626
7774
|
})), React__default.createElement(Layout, {
|
|
7627
7775
|
justifyContent: multiLine ? undefined : 'space-between',
|
|
7628
7776
|
alignItems: multiLine ? undefined : 'center',
|
|
7629
7777
|
space: multiLine ? 8 : 12,
|
|
7630
|
-
"data-testid": "banner-body-container"
|
|
7778
|
+
"data-testid": "banner-body-container",
|
|
7779
|
+
flex: ["min-content"],
|
|
7780
|
+
flexWrap: multiLine ? undefined : 'wrap'
|
|
7631
7781
|
}, title && React__default.createElement("div", {
|
|
7632
|
-
className: styles$
|
|
7782
|
+
className: styles$C['banner__title']
|
|
7633
7783
|
}, title), React__default.createElement("div", {
|
|
7634
|
-
className: classnames(styles$
|
|
7784
|
+
className: classnames(styles$C['banner__body'], (_classnames2 = {}, _classnames2[styles$C['banner__body--multilineCTA']] = primaryButton && multiLine, _classnames2))
|
|
7635
7785
|
}, children), primaryButton && React__default.createElement(InlineBannerCTA, {
|
|
7636
7786
|
primaryButton: primaryButton,
|
|
7637
7787
|
secondaryButton: secondaryButton,
|
|
@@ -7639,7 +7789,7 @@ var InlineBanner = function InlineBanner(_ref) {
|
|
|
7639
7789
|
multiLine: multiLine,
|
|
7640
7790
|
bannerTheme: theme
|
|
7641
7791
|
})), dismissable && React__default.createElement("div", {
|
|
7642
|
-
className: styles$
|
|
7792
|
+
className: styles$C['banner__close']
|
|
7643
7793
|
}, React__default.createElement(Button$1, {
|
|
7644
7794
|
theme: "link-icon",
|
|
7645
7795
|
type: "button",
|
|
@@ -7647,9 +7797,9 @@ var InlineBanner = function InlineBanner(_ref) {
|
|
|
7647
7797
|
}, React__default.createElement(IconTimes, null)))));
|
|
7648
7798
|
};
|
|
7649
7799
|
|
|
7650
|
-
var styles$
|
|
7800
|
+
var styles$E = {"badge":"_2f81N","badge--warning":"_2g1GI","badge--danger":"_2zLnM","badge--success":"_27QOo","badge--info":"_2gmsM"};
|
|
7651
7801
|
|
|
7652
|
-
var _excluded$
|
|
7802
|
+
var _excluded$29 = ["children", "theme", "title", "testId"];
|
|
7653
7803
|
|
|
7654
7804
|
var Badge = function Badge(_ref, forwardedRef) {
|
|
7655
7805
|
var _classnames;
|
|
@@ -7658,7 +7808,7 @@ var Badge = function Badge(_ref, forwardedRef) {
|
|
|
7658
7808
|
theme = _ref.theme,
|
|
7659
7809
|
title = _ref.title,
|
|
7660
7810
|
testId = _ref.testId,
|
|
7661
|
-
otherProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
7811
|
+
otherProps = _objectWithoutPropertiesLoose(_ref, _excluded$29);
|
|
7662
7812
|
|
|
7663
7813
|
var internalRef = useRef(null);
|
|
7664
7814
|
var ref = forwardedRef || internalRef;
|
|
@@ -7671,7 +7821,7 @@ var Badge = function Badge(_ref, forwardedRef) {
|
|
|
7671
7821
|
overlay: title,
|
|
7672
7822
|
ref: ref
|
|
7673
7823
|
}, React__default.createElement("div", Object.assign({
|
|
7674
|
-
className: classnames(styles$
|
|
7824
|
+
className: classnames(styles$E['badge'], (_classnames = {}, _classnames[styles$E['badge--success']] = theme === 'success', _classnames[styles$E['badge--danger']] = theme === 'danger', _classnames[styles$E['badge--info']] = theme === 'info', _classnames[styles$E['badge--warning']] = theme === 'warning', _classnames)),
|
|
7675
7825
|
ref: ref,
|
|
7676
7826
|
"data-testid": testId
|
|
7677
7827
|
}, otherProps), children));
|
|
@@ -7679,9 +7829,9 @@ var Badge = function Badge(_ref, forwardedRef) {
|
|
|
7679
7829
|
|
|
7680
7830
|
var Badge$1 = forwardRef(Badge);
|
|
7681
7831
|
|
|
7682
|
-
var styles$
|
|
7832
|
+
var styles$F = {"avatar":"_2wJGB","avatar--small":"_3QTSo","avatar__badge":"_2Rl8S","avatar--medium":"_1zwj0","avatar--large":"_3-U6x","avatar--extra-large":"_3qn2q"};
|
|
7683
7833
|
|
|
7684
|
-
var styles$
|
|
7834
|
+
var styles$G = {"avatar-image":"_GKL9P"};
|
|
7685
7835
|
|
|
7686
7836
|
var AvatarImage = function AvatarImage(_ref) {
|
|
7687
7837
|
var url = _ref.url,
|
|
@@ -7706,7 +7856,7 @@ var AvatarImage = function AvatarImage(_ref) {
|
|
|
7706
7856
|
}
|
|
7707
7857
|
|
|
7708
7858
|
return React__default.createElement("div", {
|
|
7709
|
-
className: styles$
|
|
7859
|
+
className: styles$G['avatar-image']
|
|
7710
7860
|
}, React__default.createElement(IconUserSolid, {
|
|
7711
7861
|
size: "flexible",
|
|
7712
7862
|
color: color
|
|
@@ -7775,7 +7925,7 @@ var Avatar = function Avatar(_ref) {
|
|
|
7775
7925
|
|
|
7776
7926
|
var backgroundColor = url ? GREY200 : color;
|
|
7777
7927
|
return React__default.createElement("div", {
|
|
7778
|
-
className: classnames(styles$
|
|
7928
|
+
className: classnames(styles$F['avatar'], (_classnames = {}, _classnames[styles$F['avatar--small']] = size === 'small', _classnames[styles$F['avatar--medium']] = size === 'medium', _classnames[styles$F['avatar--large']] = size === 'large', _classnames[styles$F['avatar--extra-large']] = size === 'extra-large', _classnames)),
|
|
7779
7929
|
style: {
|
|
7780
7930
|
backgroundColor: children || url && !showIconInsteadOfImage ? backgroundColor : defaultProfilePictureColors.backgroundColor
|
|
7781
7931
|
},
|
|
@@ -7788,7 +7938,7 @@ var Avatar = function Avatar(_ref) {
|
|
|
7788
7938
|
return setShowIconInsteadOfImage(true);
|
|
7789
7939
|
}
|
|
7790
7940
|
}), badge && size !== 'small' && React__default.createElement("div", {
|
|
7791
|
-
className: styles$
|
|
7941
|
+
className: styles$F['avatar__badge']
|
|
7792
7942
|
}, badge));
|
|
7793
7943
|
};
|
|
7794
7944
|
|
|
@@ -7801,7 +7951,7 @@ var CHIP_THEME = {
|
|
|
7801
7951
|
DANGER: 'danger'
|
|
7802
7952
|
};
|
|
7803
7953
|
|
|
7804
|
-
var styles$
|
|
7954
|
+
var styles$H = {"chip":"_1fIeV","chip--marketing":"_V4byU","chip--success":"_37gN9","chip--upsell":"_Tw7tp","chip--warning":"_t94VZ","chip--info":"_3SmeO","chip--danger":"_2eoX0"};
|
|
7805
7955
|
|
|
7806
7956
|
var Chip = function Chip(_ref) {
|
|
7807
7957
|
var _classnames;
|
|
@@ -7812,11 +7962,11 @@ var Chip = function Chip(_ref) {
|
|
|
7812
7962
|
testId = _ref.testId;
|
|
7813
7963
|
return React__default.createElement("div", {
|
|
7814
7964
|
"data-testid": testId,
|
|
7815
|
-
className: classnames(styles$
|
|
7965
|
+
className: classnames(styles$H['chip'], (_classnames = {}, _classnames[styles$H['chip--marketing']] = theme === CHIP_THEME.MARKETING, _classnames[styles$H['chip--success']] = theme === CHIP_THEME.SUCCESS, _classnames[styles$H['chip--upsell']] = theme === CHIP_THEME.UPSELL, _classnames[styles$H['chip--warning']] = theme === CHIP_THEME.WARNING, _classnames[styles$H['chip--info']] = theme === CHIP_THEME.INFO, _classnames[styles$H['chip--danger']] = theme === CHIP_THEME.DANGER, _classnames))
|
|
7816
7966
|
}, children);
|
|
7817
7967
|
};
|
|
7818
7968
|
|
|
7819
|
-
var styles$
|
|
7969
|
+
var styles$I = {"pill":"_23q4Y","pill--default":"_niDEM","pill--success":"_IwDRB","pill--danger":"_MPji-","pill--warning":"_3S2m8","pill--info":"_2G3ML"};
|
|
7820
7970
|
|
|
7821
7971
|
var PILL_THEME = {
|
|
7822
7972
|
INFO: 'info',
|
|
@@ -7835,9 +7985,37 @@ var Pill = function Pill(_ref) {
|
|
|
7835
7985
|
testId = _ref.testId;
|
|
7836
7986
|
return React__default.createElement("div", {
|
|
7837
7987
|
"data-testid": testId,
|
|
7838
|
-
className: classnames(styles$
|
|
7988
|
+
className: classnames(styles$I['pill'], (_classnames = {}, _classnames[styles$I['pill--default']] = theme === PILL_THEME.DEFAULT, _classnames[styles$I['pill--warning']] = theme === PILL_THEME.WARNING, _classnames[styles$I['pill--success']] = theme === PILL_THEME.SUCCESS, _classnames[styles$I['pill--danger']] = theme === PILL_THEME.DANGER, _classnames[styles$I['pill--info']] = theme === PILL_THEME.INFO, _classnames))
|
|
7839
7989
|
}, children);
|
|
7840
7990
|
};
|
|
7841
7991
|
|
|
7842
|
-
|
|
7992
|
+
var styles$J = {"card":"_29ZIp","card__body":"_3Q8NT","card__body--interactive":"_2Fah6","card--focus":"_SGno0","card__body--focus":"_1zqRN","card__body--with-kebab":"_3Hwms","card__kebab":"_TmEUS"};
|
|
7993
|
+
|
|
7994
|
+
var Card = function Card(_ref) {
|
|
7995
|
+
var _classnames, _classnames2;
|
|
7996
|
+
|
|
7997
|
+
var children = _ref.children,
|
|
7998
|
+
onClick = _ref.onClick,
|
|
7999
|
+
_ref$isSelected = _ref.isSelected,
|
|
8000
|
+
isSelected = _ref$isSelected === void 0 ? false : _ref$isSelected,
|
|
8001
|
+
actions = _ref.actions,
|
|
8002
|
+
testId = _ref.testId;
|
|
8003
|
+
return React__default.createElement("div", {
|
|
8004
|
+
className: classnames(styles$J['card'])
|
|
8005
|
+
}, onClick ? React__default.createElement("button", {
|
|
8006
|
+
className: classnames(styles$J['card__body'], styles$J['card__body--interactive'], (_classnames = {}, _classnames[styles$J['card__body--focus']] = isSelected, _classnames[styles$J['card__body--with-kebab']] = actions, _classnames)),
|
|
8007
|
+
"data-testid": testId,
|
|
8008
|
+
tabIndex: 0,
|
|
8009
|
+
onClick: onClick
|
|
8010
|
+
}, children) : React__default.createElement("div", {
|
|
8011
|
+
className: classnames(styles$J['card__body'], (_classnames2 = {}, _classnames2[styles$J['card__body--focus']] = isSelected, _classnames2[styles$J['card__body--with-kebab']] = actions, _classnames2)),
|
|
8012
|
+
"data-testid": testId
|
|
8013
|
+
}, children), actions && React__default.createElement("div", {
|
|
8014
|
+
className: classnames(styles$J['card__kebab'])
|
|
8015
|
+
}, React__default.createElement(KebabMenu, {
|
|
8016
|
+
actions: actions
|
|
8017
|
+
})));
|
|
8018
|
+
};
|
|
8019
|
+
|
|
8020
|
+
export { AsyncSelectField, Avatar, Badge$1 as Badge, Button$1 as Button, Calendar, Card, CheckboxField, Chip, CurrencyField, DataTable, DataTableCell, DataTableEditableCell, DataTableRow, DateField, DateRangeField, Form, FormRow, IconAnalytics, IconArrowDown, IconArrowLeft, IconArrowRight, IconArrowToTop, IconArrowUp, IconAward, IconBalanceScale, IconBalanceScaleLeft, IconBan, IconBarsH, IconBarsV, IconBell, IconBirthdayCake, IconBold, IconBolt, IconBook, IconBriefcase, IconBullseyeArrow, IconCalculator, IconCalendar, IconCalendarAlt, IconCalendarCheck, IconCalendarDay, IconCalendarExclamation, IconCalendarStar, IconCalendarTomorrow, IconCamera, IconCameraSlash, IconCashRegister, IconChartBar, IconCheck, IconChevronDown, IconChevronLeft, IconChevronRight, IconChevronUp, IconClipboardList, IconClock, IconCog, IconComment, IconCommentLines, IconCopy, IconCreditCard, IconCreditCardPlus, IconDownload, IconEdit, IconEllipsisV, IconEnvelope, IconExclaimation, IconExclaimationTriangle, IconExpand, IconExternalLink, IconEye, IconEyeSlash, IconFile, IconFilePdf, IconFlag, IconFourDotsCircle, IconFourSquares, IconGavel, IconGif, IconGift, IconGrinBeam, IconGripVertical, IconHandshake, IconImage, IconInfoCircle, IconIslandTropical, IconItalic, IconLaptopSearch, IconLink, IconList, IconListOI as IconListOi, IconLock, IconMagicSolid, IconMapMarker, IconMegaphone, IconMinus, IconMinusCircle, IconMoneyBill, IconNotesMedical, IconOvertime, IconPaperPlane, IconPaperPlaneClock, IconPaperclip, IconPencil, IconPercentage, IconPhone, IconPlug, IconPlus, IconPrint, IconQuestionCircle, IconRepeat, IconReply, IconSearch, IconSignOut, IconSitemap, IconSlidersH, IconSort, IconStar, IconStarSolid, IconStickyNoteLines, IconStopwatch, IconStrikethrough, IconSync, IconSyncExclaimation, IconTachometer, IconTimes, IconTimesOctagon, IconTrash, IconUnderline, IconUndo, IconUniversity, IconUserComputer, IconUserFriends, IconUserLight, IconUserPlus, IconUserSlash, IconUserSolid, IconUserTag, IconUserTie, IconUsers, IconVideo, IconVolume, IconVolumeMute, IconWrench, Inline, InlineBanner, Modal, ModalBody, ModalFooter, MultiSelectField, PaginationControls, PasswordField, PercentageField, Pill, PillSelectField, RadioGroupField, RadioGroupOption, ResourceTable, ResourceTableRow, SIZE_25_PERCENT, SIZE_33_PERCENT, SIZE_50_PERCENT, SIZE_66_PERCENT, SIZE_75_PERCENT, SelectField, Spinner, Stack, TextAreaField, TextField, TimeField, Toggle, ToolbarSelect, Tooltip$1 as Tooltip, WeekField };
|
|
7843
8021
|
//# sourceMappingURL=index.modern.js.map
|