@zohodesk/components 1.4.2 → 1.4.4
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/.cli/propValidation_report.html +1 -1
- package/README.md +11 -1
- package/assets/Appearance/dark/mode/Component_DarkMode.module.css +15 -11
- package/assets/Appearance/dark/themes/blue/blue_ComponentTheme_DarkTheme.module.css +5 -0
- package/assets/Appearance/dark/themes/green/green_ComponentTheme_DarkTheme.module.css +5 -0
- package/assets/Appearance/dark/themes/orange/orange_ComponentTheme_DarkTheme.module.css +5 -0
- package/assets/Appearance/dark/themes/red/red_ComponentTheme_DarkTheme.module.css +5 -0
- package/assets/Appearance/dark/themes/yellow/yellow_ComponentTheme_DarkTheme.module.css +5 -0
- package/assets/Appearance/light/mode/Component_LightMode.module.css +13 -9
- package/assets/Appearance/light/themes/blue/blue_ComponentTheme_LightTheme.module.css +5 -0
- package/assets/Appearance/light/themes/green/green_ComponentTheme_LightTheme.module.css +5 -0
- package/assets/Appearance/light/themes/orange/orange_ComponentTheme_LightTheme.module.css +5 -0
- package/assets/Appearance/light/themes/red/red_ComponentTheme_LightTheme.module.css +5 -0
- package/assets/Appearance/light/themes/yellow/yellow_ComponentTheme_LightTheme.module.css +5 -0
- package/assets/Appearance/pureDark/mode/Component_PureDarkMode.module.css +15 -11
- package/assets/Appearance/pureDark/themes/blue/blue_ComponentTheme_PureDarkTheme.module.css +5 -0
- package/assets/Appearance/pureDark/themes/green/green_ComponentTheme_PureDarkTheme.module.css +5 -0
- package/assets/Appearance/pureDark/themes/orange/orange_ComponentTheme_PureDarkTheme.module.css +5 -0
- package/assets/Appearance/pureDark/themes/red/red_ComponentTheme_PureDarkTheme.module.css +5 -0
- package/assets/Appearance/pureDark/themes/yellow/yellow_ComponentTheme_PureDarkTheme.module.css +5 -0
- package/es/Button/Button.js +14 -7
- package/es/Button/css/Button.module.css +54 -16
- package/es/Button/css/cssJSLogic.js +6 -1
- package/es/Button/props/propTypes.js +1 -0
- package/es/ListItem/ListItem.js +11 -2
- package/es/ListItem/ListItem.module.css +9 -0
- package/es/ListItem/__tests__/__snapshots__/ListItem.spec.js.snap +15 -1
- package/es/ListItem/props/propTypes.js +2 -1
- package/es/MultiSelect/__tests__/__snapshots__/AdvancedMultiSelect.spec.js.snap +80 -10
- package/es/Provider/LibraryContext.js +7 -3
- package/es/Select/__tests__/__snapshots__/Select.spec.js.snap +512 -64
- package/es/v1/Button/props/propTypes.js +2 -1
- package/lib/Button/Button.js +12 -5
- package/lib/Button/css/Button.module.css +54 -16
- package/lib/Button/css/cssJSLogic.js +6 -2
- package/lib/Button/props/propTypes.js +1 -0
- package/lib/ListItem/ListItem.js +12 -3
- package/lib/ListItem/ListItem.module.css +9 -0
- package/lib/ListItem/__tests__/__snapshots__/ListItem.spec.js.snap +15 -1
- package/lib/ListItem/props/propTypes.js +2 -1
- package/lib/MultiSelect/__tests__/__snapshots__/AdvancedMultiSelect.spec.js.snap +80 -10
- package/lib/Provider/LibraryContext.js +7 -3
- package/lib/Select/__tests__/__snapshots__/Select.spec.js.snap +512 -64
- package/lib/v1/Button/props/propTypes.js +2 -1
- package/package.json +5 -5
- package/result.json +1 -1
package/lib/Button/Button.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports["default"] =
|
|
6
|
+
exports["default"] = void 0;
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
@@ -15,6 +15,8 @@ var _cssJSLogic2 = _interopRequireDefault(require("./css/cssJSLogic"));
|
|
|
15
15
|
|
|
16
16
|
var _utils = require("@zohodesk/utils");
|
|
17
17
|
|
|
18
|
+
var _ComponentRegistry = require("@zohodesk/dotkit/es/react/ComponentRegistry");
|
|
19
|
+
|
|
18
20
|
var _ButtonModule = _interopRequireDefault(require("./css/Button.module.css"));
|
|
19
21
|
|
|
20
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -26,8 +28,6 @@ Button text and children props?
|
|
|
26
28
|
use children for both cases
|
|
27
29
|
toLowerCase check needed?
|
|
28
30
|
*/
|
|
29
|
-
|
|
30
|
-
/* eslint css-modules/no-unused-class: [2, { markAsUsed: ['small','medium','large','xlarge','button_medium','button_small','primary','primaryfilled','danger','dangerfilled','plainprimary', 'plainsecondary', 'secondary', 'secondaryfilled', 'successFilled','tertiaryFilled'] }] */
|
|
31
31
|
function Button(props) {
|
|
32
32
|
var text = props.text,
|
|
33
33
|
disabled = props.disabled,
|
|
@@ -76,9 +76,16 @@ function Button(props) {
|
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
Button.defaultProps = _defaultProps.defaultProps;
|
|
79
|
-
Button.propTypes = _propTypes.propTypes;
|
|
79
|
+
Button.propTypes = _propTypes.propTypes;
|
|
80
|
+
|
|
81
|
+
var _default = (0, _ComponentRegistry.withComponentRegistrar)(Button, {
|
|
82
|
+
name: 'ZDC_Button'
|
|
83
|
+
}); // if (__DOCS__) {
|
|
80
84
|
// Button.docs = {
|
|
81
85
|
// componentGroup: 'Form Elements',
|
|
82
86
|
// folderName: 'Style Guide'
|
|
83
87
|
// };
|
|
84
|
-
// }
|
|
88
|
+
// }
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
exports["default"] = _default;
|
|
@@ -39,7 +39,6 @@
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
.native:disabled {
|
|
42
|
-
pointer-events: none;
|
|
43
42
|
--button_cursor: not-allowed;
|
|
44
43
|
--button_opacity: 0.4;
|
|
45
44
|
}
|
|
@@ -144,7 +143,7 @@
|
|
|
144
143
|
--button_text_color: var(--zdt_button_default_text);
|
|
145
144
|
}
|
|
146
145
|
|
|
147
|
-
.plainprimary:hover {
|
|
146
|
+
.plainprimary:not(:disabled):hover {
|
|
148
147
|
--button_text_color: var(--zdt_button_plainprimary_hover_text);
|
|
149
148
|
}
|
|
150
149
|
|
|
@@ -152,7 +151,7 @@
|
|
|
152
151
|
--button_text_color: var(--zdt_button_danger_text);
|
|
153
152
|
}
|
|
154
153
|
|
|
155
|
-
.plaindanger:hover {
|
|
154
|
+
.plaindanger:not(:disabled):hover {
|
|
156
155
|
--button_text_color: var(--zdt_button_danger_hover_text);
|
|
157
156
|
}
|
|
158
157
|
|
|
@@ -160,7 +159,7 @@
|
|
|
160
159
|
--button_text_color: var(--zdt_button_success_text);
|
|
161
160
|
}
|
|
162
161
|
|
|
163
|
-
.plainsuccess:hover {
|
|
162
|
+
.plainsuccess:not(:disabled):hover {
|
|
164
163
|
--button_text_color: var(--zdt_button_success_hover_text);
|
|
165
164
|
}
|
|
166
165
|
|
|
@@ -168,7 +167,7 @@
|
|
|
168
167
|
--button_text_color: var(--zdt_button_secondary_text);
|
|
169
168
|
}
|
|
170
169
|
|
|
171
|
-
.plainsecondary:hover {
|
|
170
|
+
.plainsecondary:not(:disabled):hover {
|
|
172
171
|
--button_text_color: var(--zdt_button_secondary_hover_text);
|
|
173
172
|
}
|
|
174
173
|
|
|
@@ -184,7 +183,7 @@
|
|
|
184
183
|
--button_border_width: 1px;
|
|
185
184
|
}
|
|
186
185
|
|
|
187
|
-
.primary:hover {
|
|
186
|
+
.primary:not(:disabled):hover {
|
|
188
187
|
--button_border_color: var(--zdt_button_primary_hover_border);
|
|
189
188
|
--button_text_color: var(--zdt_button_primary_hover_text);
|
|
190
189
|
}
|
|
@@ -195,7 +194,7 @@
|
|
|
195
194
|
--button_text_color: var(--zdt_button_primaryfill_text);
|
|
196
195
|
}
|
|
197
196
|
|
|
198
|
-
.primaryfilled:hover {
|
|
197
|
+
.primaryfilled:not(:disabled):hover {
|
|
199
198
|
--button_bg_color: var(--zdt_button_primaryfill_hover_bg);
|
|
200
199
|
}
|
|
201
200
|
|
|
@@ -205,7 +204,7 @@
|
|
|
205
204
|
--button_text_color: var(--zdt_button_danger_text);
|
|
206
205
|
}
|
|
207
206
|
|
|
208
|
-
.danger:hover {
|
|
207
|
+
.danger:not(:disabled):hover {
|
|
209
208
|
--button_border_color: var(--zdt_button_danger_hover_border);
|
|
210
209
|
--button_text_color: var(--zdt_button_danger_hover_text);
|
|
211
210
|
}
|
|
@@ -216,7 +215,7 @@
|
|
|
216
215
|
--button_text_color: var(--zdt_button_success_text);
|
|
217
216
|
}
|
|
218
217
|
|
|
219
|
-
.success:hover {
|
|
218
|
+
.success:not(:disabled):hover {
|
|
220
219
|
--button_border_color: var(--zdt_button_success_hover_border);
|
|
221
220
|
--button_text_color: var(--zdt_button_success_hover_text);
|
|
222
221
|
}
|
|
@@ -227,7 +226,7 @@
|
|
|
227
226
|
--button_text_color: var(--zdt_button_dangerfill_text);
|
|
228
227
|
}
|
|
229
228
|
|
|
230
|
-
.dangerfilled:hover {
|
|
229
|
+
.dangerfilled:not(:disabled):hover {
|
|
231
230
|
--button_bg_color: var(--zdt_button_dangerfill_hover_bg);
|
|
232
231
|
}
|
|
233
232
|
|
|
@@ -237,7 +236,7 @@
|
|
|
237
236
|
--button_text_color: var(--zdt_button_secondary_text);
|
|
238
237
|
}
|
|
239
238
|
|
|
240
|
-
.secondary:hover {
|
|
239
|
+
.secondary:not(:disabled):hover {
|
|
241
240
|
--button_border_color: var(--zdt_button_secondary_hover_border);
|
|
242
241
|
--button_text_color: var(--zdt_button_secondary_hover_text);
|
|
243
242
|
}
|
|
@@ -248,18 +247,17 @@
|
|
|
248
247
|
--button_text_color: var(--zdt_button_secondary_text);
|
|
249
248
|
}
|
|
250
249
|
|
|
251
|
-
.secondaryfilled:hover {
|
|
250
|
+
.secondaryfilled:not(:disabled):hover {
|
|
252
251
|
--button_text_color: var(--zdt_button_secondary_hover_text);
|
|
253
252
|
}
|
|
254
253
|
|
|
255
254
|
.successfilled {
|
|
256
|
-
--button_border_color: var(--
|
|
255
|
+
--button_border_color: var(--zdt_button_primaryfill_border);
|
|
257
256
|
--button_bg_color: var(--zdt_button_successfill_bg);
|
|
258
257
|
--button_text_color: var(--zdt_button_dangerfill_text);
|
|
259
258
|
}
|
|
260
259
|
|
|
261
|
-
.successfilled:hover {
|
|
262
|
-
--button_border_color: var(--zdt_button_successfill_hover_border);
|
|
260
|
+
.successfilled:not(:disabled):hover {
|
|
263
261
|
--button_bg_color: var(--zdt_button_successfill_hover_bg);
|
|
264
262
|
}
|
|
265
263
|
|
|
@@ -269,7 +267,7 @@
|
|
|
269
267
|
--button_text_color: var(--zdt_button_dangerfill_text);
|
|
270
268
|
}
|
|
271
269
|
|
|
272
|
-
.tertiaryfilled:hover {
|
|
270
|
+
.tertiaryfilled:not(:disabled):hover {
|
|
273
271
|
--button_bg_color: var(--zdt_button_tertiaryfill_hover_bg);
|
|
274
272
|
}
|
|
275
273
|
|
|
@@ -572,4 +570,44 @@
|
|
|
572
570
|
|
|
573
571
|
.loader {
|
|
574
572
|
color: var(--dot_mirror)
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
[dir=ltr] .strike {
|
|
576
|
+
background-image: repeating-linear-gradient(120deg, var(--button_strike_color) 0 1px, transparent 1px 8px);
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
[dir=rtl] .strike {
|
|
580
|
+
background-image: repeating-linear-gradient(-120deg, var(--button_strike_color) 0 1px, transparent 1px 8px);
|
|
581
|
+
}
|
|
582
|
+
.primaryStrike {
|
|
583
|
+
--button_strike_color: var(--zdt_button_primary_strike);
|
|
584
|
+
}
|
|
585
|
+
.primaryfilledStrike {
|
|
586
|
+
--button_strike_color: var(--zdt_button_primaryFilled_strike);
|
|
587
|
+
--button_border_color: var(--zdt_button_primaryfill_bg);
|
|
588
|
+
}
|
|
589
|
+
.dangerStrike {
|
|
590
|
+
--button_strike_color: var(--zdt_button_danger_strike);
|
|
591
|
+
}
|
|
592
|
+
.dangerfilledStrike {
|
|
593
|
+
--button_strike_color: var(--zdt_button_dangerFilled_strike);
|
|
594
|
+
--button_border_color: var(--zdt_button_dangerfill_bg);
|
|
595
|
+
}
|
|
596
|
+
.secondaryStrike {
|
|
597
|
+
--button_strike_color: var(--zdt_button_secondary_border);
|
|
598
|
+
}
|
|
599
|
+
.secondaryfilledStrike {
|
|
600
|
+
--button_strike_color: var(--zdt_button_secondaryFilled_strike);
|
|
601
|
+
--button_border_color: var(--zdt_button_secondaryfill_bg);
|
|
602
|
+
}
|
|
603
|
+
.tertiaryfilledStrike {
|
|
604
|
+
--button_strike_color: var(--zdt_button_tertiaryFilled_strike);
|
|
605
|
+
--button_border_color: var(--zdt_button_tertiaryfill_bg);
|
|
606
|
+
}
|
|
607
|
+
.successStrike {
|
|
608
|
+
--button_strike_color: var(--zdt_button_success_strike);
|
|
609
|
+
}
|
|
610
|
+
.successfilledStrike {
|
|
611
|
+
--button_strike_color: var(--zdt_button_successFilled_strike);
|
|
612
|
+
--button_border_color: var(--zdt_button_successfill_bg);
|
|
575
613
|
}
|
|
@@ -21,16 +21,20 @@ function cssJSLogic(_ref) {
|
|
|
21
21
|
size = props.size,
|
|
22
22
|
children = props.children,
|
|
23
23
|
palette = props.palette,
|
|
24
|
-
status = props.status
|
|
24
|
+
status = props.status,
|
|
25
|
+
disabled = props.disabled,
|
|
26
|
+
shouldStrikeThroughDisabled = props.shouldStrikeThroughDisabled;
|
|
25
27
|
var _customClass$customBu = customClass.customButton,
|
|
26
28
|
customButton = _customClass$customBu === void 0 ? '' : _customClass$customBu,
|
|
27
29
|
_customClass$customSt = customClass.customStatus,
|
|
28
30
|
customStatus = _customClass$customSt === void 0 ? '' : _customClass$customSt,
|
|
29
31
|
_customClass$customSt2 = customClass.customStatusSize,
|
|
30
32
|
customStatusSize = _customClass$customSt2 === void 0 ? '' : _customClass$customSt2;
|
|
33
|
+
var strikeExcludedPalettes = ['plainprimary', 'plainsecondary', 'plainDanger', 'plainSuccess'];
|
|
31
34
|
var paletteLower = palette.toLowerCase();
|
|
32
35
|
var statusLower = status.toLowerCase();
|
|
33
|
-
var
|
|
36
|
+
var canStrikeThrough = !strikeExcludedPalettes.includes(paletteLower);
|
|
37
|
+
var buttonClass = (0, _utils.compileClassNames)((_compileClassNames = {}, _defineProperty(_compileClassNames, customButton, !!customButton), _defineProperty(_compileClassNames, style.bold, isBold), _defineProperty(_compileClassNames, style["default"], !needAppearance), _defineProperty(_compileClassNames, style[paletteLower], needAppearance), _defineProperty(_compileClassNames, style.rounded, needAppearance && rounded), _defineProperty(_compileClassNames, style[size.toLowerCase()], needAppearance && !children), _defineProperty(_compileClassNames, style["".concat(size, "Btn")], needAppearance && children), _defineProperty(_compileClassNames, style["".concat(size, "Btn").concat(paletteLower)], needAppearance && children && rounded), _defineProperty(_compileClassNames, "".concat(style["".concat(paletteLower, "Strike")], " ").concat(style.strike), disabled && canStrikeThrough && shouldStrikeThroughDisabled), _defineProperty(_compileClassNames, style.loader, !!needAppearance && statusLower !== 'none'), _compileClassNames));
|
|
34
38
|
var loaderParentClass = (0, _utils.compileClassNames)((_compileClassNames2 = {}, _defineProperty(_compileClassNames2, customStatusSize, !!customStatusSize), _defineProperty(_compileClassNames2, style.loading, statusLower === 'loading'), _defineProperty(_compileClassNames2, style["".concat(size, "loading")], statusLower === 'loading'), _defineProperty(_compileClassNames2, style.successstate, statusLower != 'loading'), _compileClassNames2));
|
|
35
39
|
var loaderChildClass = (0, _utils.compileClassNames)((_compileClassNames3 = {}, _defineProperty(_compileClassNames3, customStatus, !!customStatus), _defineProperty(_compileClassNames3, style.loadingelement, statusLower === 'loading'), _defineProperty(_compileClassNames3, style["".concat(paletteLower, "element")], statusLower === 'loading'), _defineProperty(_compileClassNames3, style.successelement, statusLower != 'loading'), _defineProperty(_compileClassNames3, style["".concat(paletteLower, "success")], statusLower != 'loading'), _compileClassNames3));
|
|
36
40
|
return {
|
|
@@ -24,6 +24,7 @@ var propTypes = {
|
|
|
24
24
|
status: _propTypes["default"].oneOf(['loading', 'success', 'none']),
|
|
25
25
|
text: _propTypes["default"].string,
|
|
26
26
|
title: _propTypes["default"].string,
|
|
27
|
+
shouldStrikeThroughDisabled: _propTypes["default"].bool,
|
|
27
28
|
customClass: _propTypes["default"].shape({
|
|
28
29
|
customButton: _propTypes["default"].string,
|
|
29
30
|
customStatus: _propTypes["default"].string,
|
package/lib/ListItem/ListItem.js
CHANGED
|
@@ -122,7 +122,8 @@ var ListItem = /*#__PURE__*/function (_React$Component) {
|
|
|
122
122
|
a11y = _this$props4.a11y,
|
|
123
123
|
customClass = _this$props4.customClass,
|
|
124
124
|
customProps = _this$props4.customProps,
|
|
125
|
-
needMultiLineText = _this$props4.needMultiLineText
|
|
125
|
+
needMultiLineText = _this$props4.needMultiLineText,
|
|
126
|
+
secondaryValue = _this$props4.secondaryValue;
|
|
126
127
|
var _customProps$ListItem = customProps.ListItemProps,
|
|
127
128
|
ListItemProps = _customProps$ListItem === void 0 ? {} : _customProps$ListItem,
|
|
128
129
|
_customProps$Containe = customProps.ContainerProps,
|
|
@@ -162,7 +163,12 @@ var ListItem = /*#__PURE__*/function (_React$Component) {
|
|
|
162
163
|
onMouseEnter: this.handleMouseEnter,
|
|
163
164
|
eleRef: this.getRef,
|
|
164
165
|
customProps: ListItemProps
|
|
165
|
-
}, ContainerProps),
|
|
166
|
+
}, ContainerProps), /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
167
|
+
flexible: true,
|
|
168
|
+
className: _ListItemModule["default"].leftBox
|
|
169
|
+
}, /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
170
|
+
className: _ListItemModule["default"].titleBox
|
|
171
|
+
}, value ? /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
166
172
|
shrink: true,
|
|
167
173
|
adjust: true,
|
|
168
174
|
className: needMultiLineText ? _ListItemModule["default"].multiLineValue : _ListItemModule["default"].value
|
|
@@ -170,7 +176,10 @@ var ListItem = /*#__PURE__*/function (_React$Component) {
|
|
|
170
176
|
shrink: true,
|
|
171
177
|
adjust: true,
|
|
172
178
|
className: _ListItemModule["default"].children
|
|
173
|
-
}, children) : null,
|
|
179
|
+
}, children) : null), secondaryValue ? /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
180
|
+
"data-title": isDisabled ? null : secondaryValue,
|
|
181
|
+
className: "".concat(_ListItemModule["default"].secondaryField, " ").concat(needMultiLineText ? _ListItemModule["default"].multiLine : _ListItemModule["default"].secondaryValue)
|
|
182
|
+
}, secondaryValue) : null), needTick && active ? /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
174
183
|
className: "".concat(_ListItemModule["default"].tickIcon, " ").concat(tickIconPalette, " ").concat(customTickIcon),
|
|
175
184
|
"aria-hidden": ariaHidden,
|
|
176
185
|
dataId: "".concat(dataIdString, "_tickIcon"),
|
|
@@ -250,3 +250,12 @@
|
|
|
250
250
|
padding-top: var(--zd_size10) ;
|
|
251
251
|
padding-bottom: var(--zd_size10) ;
|
|
252
252
|
}
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
.leftBox {
|
|
256
|
+
composes: dflex flexcolumn from '../common/common.module.css';
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
.titleBox {
|
|
260
|
+
composes: dflex alignVertical from '../common/common.module.css';
|
|
261
|
+
}
|
|
@@ -10,6 +10,20 @@ exports[`ListItem rendering the defult props 1`] = `
|
|
|
10
10
|
data-test-id="listItem"
|
|
11
11
|
role="option"
|
|
12
12
|
tabindex="0"
|
|
13
|
-
|
|
13
|
+
>
|
|
14
|
+
<div
|
|
15
|
+
class="leftBox grow basis shrinkOff"
|
|
16
|
+
data-id="boxComponent"
|
|
17
|
+
data-selector-id="box"
|
|
18
|
+
data-test-id="boxComponent"
|
|
19
|
+
>
|
|
20
|
+
<div
|
|
21
|
+
class="titleBox shrinkOff"
|
|
22
|
+
data-id="boxComponent"
|
|
23
|
+
data-selector-id="box"
|
|
24
|
+
data-test-id="boxComponent"
|
|
25
|
+
/>
|
|
26
|
+
</div>
|
|
27
|
+
</li>
|
|
14
28
|
</DocumentFragment>
|
|
15
29
|
`;
|
|
@@ -81,7 +81,8 @@ var ListItem_Props = {
|
|
|
81
81
|
}),
|
|
82
82
|
customProps: _propTypes["default"].shape({
|
|
83
83
|
ListItemProps: _propTypes["default"].object
|
|
84
|
-
})
|
|
84
|
+
}),
|
|
85
|
+
secondaryValue: _propTypes["default"].string
|
|
85
86
|
};
|
|
86
87
|
exports.ListItem_Props = ListItem_Props;
|
|
87
88
|
var ListItemWithAvatar_Props = (_ListItemWithAvatar_P = {
|
|
@@ -215,12 +215,26 @@ exports[`AdvancedMultiSelect rendering the options array with objects and string
|
|
|
215
215
|
tabindex="0"
|
|
216
216
|
>
|
|
217
217
|
<div
|
|
218
|
-
class="
|
|
218
|
+
class="leftBox grow basis shrinkOff"
|
|
219
219
|
data-id="boxComponent"
|
|
220
220
|
data-selector-id="box"
|
|
221
221
|
data-test-id="boxComponent"
|
|
222
222
|
>
|
|
223
|
-
|
|
223
|
+
<div
|
|
224
|
+
class="titleBox shrinkOff"
|
|
225
|
+
data-id="boxComponent"
|
|
226
|
+
data-selector-id="box"
|
|
227
|
+
data-test-id="boxComponent"
|
|
228
|
+
>
|
|
229
|
+
<div
|
|
230
|
+
class="value basisAuto shrinkOn"
|
|
231
|
+
data-id="boxComponent"
|
|
232
|
+
data-selector-id="box"
|
|
233
|
+
data-test-id="boxComponent"
|
|
234
|
+
>
|
|
235
|
+
Apple
|
|
236
|
+
</div>
|
|
237
|
+
</div>
|
|
224
238
|
</div>
|
|
225
239
|
</li>
|
|
226
240
|
<li
|
|
@@ -237,12 +251,26 @@ exports[`AdvancedMultiSelect rendering the options array with objects and string
|
|
|
237
251
|
tabindex="0"
|
|
238
252
|
>
|
|
239
253
|
<div
|
|
240
|
-
class="
|
|
254
|
+
class="leftBox grow basis shrinkOff"
|
|
241
255
|
data-id="boxComponent"
|
|
242
256
|
data-selector-id="box"
|
|
243
257
|
data-test-id="boxComponent"
|
|
244
258
|
>
|
|
245
|
-
|
|
259
|
+
<div
|
|
260
|
+
class="titleBox shrinkOff"
|
|
261
|
+
data-id="boxComponent"
|
|
262
|
+
data-selector-id="box"
|
|
263
|
+
data-test-id="boxComponent"
|
|
264
|
+
>
|
|
265
|
+
<div
|
|
266
|
+
class="value basisAuto shrinkOn"
|
|
267
|
+
data-id="boxComponent"
|
|
268
|
+
data-selector-id="box"
|
|
269
|
+
data-test-id="boxComponent"
|
|
270
|
+
>
|
|
271
|
+
Orange
|
|
272
|
+
</div>
|
|
273
|
+
</div>
|
|
246
274
|
</div>
|
|
247
275
|
</li>
|
|
248
276
|
<li
|
|
@@ -259,12 +287,26 @@ exports[`AdvancedMultiSelect rendering the options array with objects and string
|
|
|
259
287
|
tabindex="0"
|
|
260
288
|
>
|
|
261
289
|
<div
|
|
262
|
-
class="
|
|
290
|
+
class="leftBox grow basis shrinkOff"
|
|
263
291
|
data-id="boxComponent"
|
|
264
292
|
data-selector-id="box"
|
|
265
293
|
data-test-id="boxComponent"
|
|
266
294
|
>
|
|
267
|
-
|
|
295
|
+
<div
|
|
296
|
+
class="titleBox shrinkOff"
|
|
297
|
+
data-id="boxComponent"
|
|
298
|
+
data-selector-id="box"
|
|
299
|
+
data-test-id="boxComponent"
|
|
300
|
+
>
|
|
301
|
+
<div
|
|
302
|
+
class="value basisAuto shrinkOn"
|
|
303
|
+
data-id="boxComponent"
|
|
304
|
+
data-selector-id="box"
|
|
305
|
+
data-test-id="boxComponent"
|
|
306
|
+
>
|
|
307
|
+
string test
|
|
308
|
+
</div>
|
|
309
|
+
</div>
|
|
268
310
|
</div>
|
|
269
311
|
</li>
|
|
270
312
|
</div>
|
|
@@ -421,12 +463,26 @@ exports[`AdvancedMultiSelect rendering the options array with only objects using
|
|
|
421
463
|
tabindex="0"
|
|
422
464
|
>
|
|
423
465
|
<div
|
|
424
|
-
class="
|
|
466
|
+
class="leftBox grow basis shrinkOff"
|
|
425
467
|
data-id="boxComponent"
|
|
426
468
|
data-selector-id="box"
|
|
427
469
|
data-test-id="boxComponent"
|
|
428
470
|
>
|
|
429
|
-
|
|
471
|
+
<div
|
|
472
|
+
class="titleBox shrinkOff"
|
|
473
|
+
data-id="boxComponent"
|
|
474
|
+
data-selector-id="box"
|
|
475
|
+
data-test-id="boxComponent"
|
|
476
|
+
>
|
|
477
|
+
<div
|
|
478
|
+
class="value basisAuto shrinkOn"
|
|
479
|
+
data-id="boxComponent"
|
|
480
|
+
data-selector-id="box"
|
|
481
|
+
data-test-id="boxComponent"
|
|
482
|
+
>
|
|
483
|
+
Apple
|
|
484
|
+
</div>
|
|
485
|
+
</div>
|
|
430
486
|
</div>
|
|
431
487
|
</li>
|
|
432
488
|
<li
|
|
@@ -443,12 +499,26 @@ exports[`AdvancedMultiSelect rendering the options array with only objects using
|
|
|
443
499
|
tabindex="0"
|
|
444
500
|
>
|
|
445
501
|
<div
|
|
446
|
-
class="
|
|
502
|
+
class="leftBox grow basis shrinkOff"
|
|
447
503
|
data-id="boxComponent"
|
|
448
504
|
data-selector-id="box"
|
|
449
505
|
data-test-id="boxComponent"
|
|
450
506
|
>
|
|
451
|
-
|
|
507
|
+
<div
|
|
508
|
+
class="titleBox shrinkOff"
|
|
509
|
+
data-id="boxComponent"
|
|
510
|
+
data-selector-id="box"
|
|
511
|
+
data-test-id="boxComponent"
|
|
512
|
+
>
|
|
513
|
+
<div
|
|
514
|
+
class="value basisAuto shrinkOn"
|
|
515
|
+
data-id="boxComponent"
|
|
516
|
+
data-selector-id="box"
|
|
517
|
+
data-test-id="boxComponent"
|
|
518
|
+
>
|
|
519
|
+
Orange
|
|
520
|
+
</div>
|
|
521
|
+
</div>
|
|
452
522
|
</div>
|
|
453
523
|
</li>
|
|
454
524
|
</div>
|
|
@@ -45,6 +45,7 @@ var LibraryContextProvider = function LibraryContextProvider(_ref) {
|
|
|
45
45
|
coloredTagVariant = _ref.coloredTagVariant,
|
|
46
46
|
hasTagColorInheritedToText = _ref.hasTagColorInheritedToText,
|
|
47
47
|
shouldIndicateSwitchState = _ref.shouldIndicateSwitchState,
|
|
48
|
+
shouldStrikeThroughDisabledButton = _ref.shouldStrikeThroughDisabledButton,
|
|
48
49
|
children = _ref.children;
|
|
49
50
|
|
|
50
51
|
var _useState = (0, _react.useState)({
|
|
@@ -52,7 +53,8 @@ var LibraryContextProvider = function LibraryContextProvider(_ref) {
|
|
|
52
53
|
direction: direction,
|
|
53
54
|
coloredTagVariant: coloredTagVariant,
|
|
54
55
|
hasTagColorInheritedToText: hasTagColorInheritedToText,
|
|
55
|
-
shouldIndicateSwitchState: shouldIndicateSwitchState
|
|
56
|
+
shouldIndicateSwitchState: shouldIndicateSwitchState,
|
|
57
|
+
shouldStrikeThroughDisabledButton: shouldStrikeThroughDisabledButton
|
|
56
58
|
}),
|
|
57
59
|
_useState2 = _slicedToArray(_useState, 2),
|
|
58
60
|
value = _useState2[0],
|
|
@@ -77,14 +79,16 @@ LibraryContextProvider.propTypes = {
|
|
|
77
79
|
coloredTagVariant: _propTypes["default"].oneOf(['bold', 'subtle', 'minimal']),
|
|
78
80
|
hasTagColorInheritedToText: _propTypes["default"].bool,
|
|
79
81
|
direction: _propTypes["default"].string,
|
|
80
|
-
shouldIndicateSwitchState: _propTypes["default"].bool
|
|
82
|
+
shouldIndicateSwitchState: _propTypes["default"].bool,
|
|
83
|
+
shouldStrikeThroughDisabledButton: _propTypes["default"].bool
|
|
81
84
|
};
|
|
82
85
|
LibraryContextProvider.defaultProps = {
|
|
83
86
|
isReducedMotion: (0, _Config.getLibraryConfig)('isReducedMotion'),
|
|
84
87
|
direction: (0, _Config.getLibraryConfig)('direction'),
|
|
85
88
|
coloredTagVariant: 'bold',
|
|
86
89
|
hasTagColorInheritedToText: true,
|
|
87
|
-
shouldIndicateSwitchState: false
|
|
90
|
+
shouldIndicateSwitchState: false,
|
|
91
|
+
shouldStrikeThroughDisabledButton: false
|
|
88
92
|
};
|
|
89
93
|
var _default = LibraryContextProvider;
|
|
90
94
|
exports["default"] = _default;
|