@zendeskgarden/react-forms 8.66.0 → 8.68.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.cjs.js +152 -101
- package/dist/index.esm.js +154 -103
- package/dist/typings/elements/faux-input/components/EndIcon.d.ts +2 -1
- package/dist/typings/elements/faux-input/components/StartIcon.d.ts +2 -1
- package/dist/typings/styled/select/StyledSelectWrapper.d.ts +1 -2
- package/dist/typings/styled/text/StyledTextFauxInput.d.ts +6 -1
- package/package.json +4 -4
package/dist/index.cjs.js
CHANGED
|
@@ -68,7 +68,7 @@ const useFieldContext = () => {
|
|
|
68
68
|
const COMPONENT_ID$K = 'forms.field';
|
|
69
69
|
const StyledField = styled__default.default.div.attrs({
|
|
70
70
|
'data-garden-id': COMPONENT_ID$K,
|
|
71
|
-
'data-garden-version': '8.
|
|
71
|
+
'data-garden-version': '8.68.0'
|
|
72
72
|
}).withConfig({
|
|
73
73
|
displayName: "StyledField",
|
|
74
74
|
componentId: "sc-12gzfsu-0"
|
|
@@ -81,7 +81,7 @@ const COMPONENT_ID$J = 'forms.fieldset';
|
|
|
81
81
|
const StyledFieldset = styled__default.default(StyledField).attrs({
|
|
82
82
|
as: 'fieldset',
|
|
83
83
|
'data-garden-id': COMPONENT_ID$J,
|
|
84
|
-
'data-garden-version': '8.
|
|
84
|
+
'data-garden-version': '8.68.0'
|
|
85
85
|
}).withConfig({
|
|
86
86
|
displayName: "StyledFieldset",
|
|
87
87
|
componentId: "sc-1vr4mxv-0"
|
|
@@ -93,7 +93,7 @@ StyledFieldset.defaultProps = {
|
|
|
93
93
|
const COMPONENT_ID$I = 'forms.input_label';
|
|
94
94
|
const StyledLabel = styled__default.default.label.attrs({
|
|
95
95
|
'data-garden-id': COMPONENT_ID$I,
|
|
96
|
-
'data-garden-version': '8.
|
|
96
|
+
'data-garden-version': '8.68.0'
|
|
97
97
|
}).withConfig({
|
|
98
98
|
displayName: "StyledLabel",
|
|
99
99
|
componentId: "sc-2utmsz-0"
|
|
@@ -106,7 +106,7 @@ const COMPONENT_ID$H = 'forms.fieldset_legend';
|
|
|
106
106
|
const StyledLegend = styled__default.default(StyledLabel).attrs({
|
|
107
107
|
as: 'legend',
|
|
108
108
|
'data-garden-id': COMPONENT_ID$H,
|
|
109
|
-
'data-garden-version': '8.
|
|
109
|
+
'data-garden-version': '8.68.0'
|
|
110
110
|
}).withConfig({
|
|
111
111
|
displayName: "StyledLegend",
|
|
112
112
|
componentId: "sc-6s0zwq-0"
|
|
@@ -118,7 +118,7 @@ StyledLegend.defaultProps = {
|
|
|
118
118
|
const COMPONENT_ID$G = 'forms.input_hint';
|
|
119
119
|
const StyledHint = styled__default.default.div.attrs({
|
|
120
120
|
'data-garden-id': COMPONENT_ID$G,
|
|
121
|
-
'data-garden-version': '8.
|
|
121
|
+
'data-garden-version': '8.68.0'
|
|
122
122
|
}).withConfig({
|
|
123
123
|
displayName: "StyledHint",
|
|
124
124
|
componentId: "sc-17c2wu8-0"
|
|
@@ -223,7 +223,7 @@ const MessageIcon = _ref => {
|
|
|
223
223
|
const COMPONENT_ID$F = 'forms.input_message_icon';
|
|
224
224
|
const StyledMessageIcon = styled__default.default(MessageIcon).attrs({
|
|
225
225
|
'data-garden-id': COMPONENT_ID$F,
|
|
226
|
-
'data-garden-version': '8.
|
|
226
|
+
'data-garden-version': '8.68.0',
|
|
227
227
|
'aria-hidden': null
|
|
228
228
|
}).withConfig({
|
|
229
229
|
displayName: "StyledMessageIcon",
|
|
@@ -251,7 +251,7 @@ const validationStyles = props => {
|
|
|
251
251
|
const COMPONENT_ID$E = 'forms.input_message';
|
|
252
252
|
const StyledMessage = styled__default.default.div.attrs({
|
|
253
253
|
'data-garden-id': COMPONENT_ID$E,
|
|
254
|
-
'data-garden-version': '8.
|
|
254
|
+
'data-garden-version': '8.68.0'
|
|
255
255
|
}).withConfig({
|
|
256
256
|
displayName: "StyledMessage",
|
|
257
257
|
componentId: "sc-30hgg7-0"
|
|
@@ -264,32 +264,34 @@ const COMPONENT_ID$D = 'forms.input';
|
|
|
264
264
|
const isInvalid = validation => {
|
|
265
265
|
return validation === 'warning' || validation === 'error';
|
|
266
266
|
};
|
|
267
|
-
const colorStyles$
|
|
267
|
+
const colorStyles$c = props => {
|
|
268
|
+
const HUE = 'primaryHue';
|
|
268
269
|
const SHADE = 600;
|
|
269
270
|
const placeholderColor = reactTheming.getColor('neutralHue', SHADE - 200, props.theme);
|
|
270
271
|
let borderColor;
|
|
271
272
|
let hoverBorderColor;
|
|
272
273
|
let focusBorderColor;
|
|
274
|
+
let focusRingHue = HUE;
|
|
275
|
+
let focusRingShade = SHADE;
|
|
273
276
|
if (props.validation) {
|
|
274
|
-
let hue;
|
|
277
|
+
let hue = HUE;
|
|
275
278
|
if (props.validation === 'success') {
|
|
276
279
|
hue = 'successHue';
|
|
277
280
|
} else if (props.validation === 'warning') {
|
|
278
281
|
hue = 'warningHue';
|
|
282
|
+
focusRingShade = 700;
|
|
279
283
|
} else if (props.validation === 'error') {
|
|
280
284
|
hue = 'dangerHue';
|
|
281
285
|
}
|
|
282
286
|
borderColor = reactTheming.getColor(hue, SHADE, props.theme);
|
|
283
287
|
hoverBorderColor = borderColor;
|
|
284
288
|
focusBorderColor = borderColor;
|
|
289
|
+
focusRingHue = hue;
|
|
285
290
|
} else {
|
|
286
291
|
borderColor = reactTheming.getColor('neutralHue', SHADE - 300, props.theme);
|
|
287
292
|
hoverBorderColor = reactTheming.getColor('primaryHue', SHADE, props.theme);
|
|
288
293
|
focusBorderColor = hoverBorderColor;
|
|
289
294
|
}
|
|
290
|
-
const boxShadow = `
|
|
291
|
-
${props.focusInset ? 'inset' : ''}
|
|
292
|
-
${props.theme.shadows.md(polished.rgba(focusBorderColor, 0.35))}`;
|
|
293
295
|
const readOnlyBackgroundColor = reactTheming.getColor('neutralHue', SHADE - 500, props.theme);
|
|
294
296
|
const readOnlyBorderColor = reactTheming.getColor('neutralHue', SHADE - 300, props.theme);
|
|
295
297
|
const disabledBackgroundColor = readOnlyBackgroundColor;
|
|
@@ -302,7 +304,16 @@ const colorStyles$b = props => {
|
|
|
302
304
|
if (props.isHovered) {
|
|
303
305
|
controlledBorderColor = hoverBorderColor;
|
|
304
306
|
}
|
|
305
|
-
return styled.css(["border-color:", ";
|
|
307
|
+
return styled.css(["border-color:", ";background-color:", ";color:", ";&::placeholder{color:", ";}&[readonly],&[aria-readonly='true']{border-color:", ";background-color:", ";}&:hover{border-color:", ";}", " &:disabled,&[aria-disabled='true']{border-color:", ";background-color:", ";color:", ";}"], controlledBorderColor, props.isBare ? 'transparent' : props.theme.colors.background, props.theme.colors.foreground, placeholderColor, readOnlyBorderColor, !props.isBare && readOnlyBackgroundColor, hoverBorderColor, reactTheming.focusStyles({
|
|
308
|
+
theme: props.theme,
|
|
309
|
+
inset: props.focusInset,
|
|
310
|
+
condition: !props.isBare,
|
|
311
|
+
hue: focusRingHue,
|
|
312
|
+
shade: focusRingShade,
|
|
313
|
+
styles: {
|
|
314
|
+
borderColor: focusBorderColor
|
|
315
|
+
}
|
|
316
|
+
}), disabledBorderColor, !props.isBare && disabledBackgroundColor, disabledForegroundColor);
|
|
306
317
|
};
|
|
307
318
|
const sizeStyles$f = props => {
|
|
308
319
|
const fontSize = props.theme.fontSizes.md;
|
|
@@ -330,12 +341,12 @@ const sizeStyles$f = props => {
|
|
|
330
341
|
};
|
|
331
342
|
const StyledTextInput = styled__default.default.input.attrs(props => ({
|
|
332
343
|
'data-garden-id': COMPONENT_ID$D,
|
|
333
|
-
'data-garden-version': '8.
|
|
344
|
+
'data-garden-version': '8.68.0',
|
|
334
345
|
'aria-invalid': isInvalid(props.validation)
|
|
335
346
|
})).withConfig({
|
|
336
347
|
displayName: "StyledTextInput",
|
|
337
348
|
componentId: "sc-k12n8x-0"
|
|
338
|
-
})(["appearance:none;transition:border-color 0.25s ease-in-out,box-shadow 0.1s ease-in-out,background-color 0.25s ease-in-out,color 0.25s ease-in-out,z-index 0.25s ease-in-out;direction:", ";border:", ";border-radius:", ";width:100%;box-sizing:border-box;vertical-align:middle;font-family:inherit;&::-ms-browse{border-radius:", ";}&::-ms-clear,&::-ms-reveal{display:none;}&::-moz-color-swatch{border:none;border-radius:", ";}&::-webkit-color-swatch{border:none;border-radius:", ";}&::-webkit-color-swatch-wrapper{padding:0;}&::-webkit-clear-button,&::-webkit-inner-spin-button,&::-webkit-search-cancel-button,&::-webkit-search-results-button{display:none;}&::-webkit-datetime-edit{direction:", ";line-height:1;}&::placeholder{opacity:1;}&:invalid{box-shadow:none;}&[type='file']::-ms-value{display:none;}@media screen and (min--moz-device-pixel-ratio:0){&[type='number']{appearance:textfield;}}", "
|
|
349
|
+
})(["appearance:none;transition:border-color 0.25s ease-in-out,box-shadow 0.1s ease-in-out,background-color 0.25s ease-in-out,color 0.25s ease-in-out,z-index 0.25s ease-in-out;direction:", ";border:", ";border-radius:", ";width:100%;box-sizing:border-box;vertical-align:middle;font-family:inherit;&::-ms-browse{border-radius:", ";}&::-ms-clear,&::-ms-reveal{display:none;}&::-moz-color-swatch{border:none;border-radius:", ";}&::-webkit-color-swatch{border:none;border-radius:", ";}&::-webkit-color-swatch-wrapper{padding:0;}&::-webkit-clear-button,&::-webkit-inner-spin-button,&::-webkit-search-cancel-button,&::-webkit-search-results-button{display:none;}&::-webkit-datetime-edit{direction:", ";line-height:1;}&::placeholder{opacity:1;}&:invalid{box-shadow:none;}&[type='file']::-ms-value{display:none;}@media screen and (min--moz-device-pixel-ratio:0){&[type='number']{appearance:textfield;}}", ";", ";&:disabled{cursor:default;}", ";"], props => props.theme.rtl && 'rtl', props => props.isBare ? 'none' : props.theme.borders.sm, props => props.isBare ? '0' : props.theme.borderRadii.md, props => props.theme.borderRadii.sm, props => props.theme.borderRadii.sm, props => props.theme.borderRadii.sm, props => props.theme.rtl && 'rtl', props => sizeStyles$f(props), props => colorStyles$c(props), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$D, props));
|
|
339
350
|
StyledTextInput.defaultProps = {
|
|
340
351
|
theme: reactTheming.DEFAULT_THEME
|
|
341
352
|
};
|
|
@@ -353,7 +364,7 @@ const hiddenStyles = `
|
|
|
353
364
|
const StyledTextarea = styled__default.default(StyledTextInput).attrs({
|
|
354
365
|
as: 'textarea',
|
|
355
366
|
'data-garden-id': COMPONENT_ID$C,
|
|
356
|
-
'data-garden-version': '8.
|
|
367
|
+
'data-garden-version': '8.68.0'
|
|
357
368
|
}).withConfig({
|
|
358
369
|
displayName: "StyledTextarea",
|
|
359
370
|
componentId: "sc-wxschl-0"
|
|
@@ -363,7 +374,7 @@ StyledTextarea.defaultProps = {
|
|
|
363
374
|
};
|
|
364
375
|
|
|
365
376
|
const COMPONENT_ID$B = 'forms.media_figure';
|
|
366
|
-
const colorStyles$
|
|
377
|
+
const colorStyles$b = props => {
|
|
367
378
|
let shade = 600;
|
|
368
379
|
if (props.isDisabled) {
|
|
369
380
|
shade = 400;
|
|
@@ -399,26 +410,58 @@ _ref => {
|
|
|
399
410
|
return React__namespace.default.cloneElement(React.Children.only(children), props);
|
|
400
411
|
}).attrs({
|
|
401
412
|
'data-garden-id': COMPONENT_ID$B,
|
|
402
|
-
'data-garden-version': '8.
|
|
413
|
+
'data-garden-version': '8.68.0'
|
|
403
414
|
}).withConfig({
|
|
404
415
|
displayName: "StyledTextMediaFigure",
|
|
405
416
|
componentId: "sc-1qepknj-0"
|
|
406
|
-
})(["transform:", ";transition:transform 0.25s ease-in-out,color 0.25s ease-in-out;", ";", " ", ";"], props => props.isRotated && `rotate(${props.theme.rtl ? '-' : '+'}180deg)`, props => colorStyles$
|
|
417
|
+
})(["transform:", ";transition:transform 0.25s ease-in-out,color 0.25s ease-in-out;", ";", " ", ";"], props => props.isRotated && `rotate(${props.theme.rtl ? '-' : '+'}180deg)`, props => colorStyles$b(props), props => sizeStyles$e(props), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$B, props));
|
|
407
418
|
StyledTextMediaFigure.defaultProps = {
|
|
408
419
|
theme: reactTheming.DEFAULT_THEME
|
|
409
420
|
};
|
|
410
421
|
|
|
411
422
|
const COMPONENT_ID$A = 'forms.faux_input';
|
|
423
|
+
const VALIDATION_HUES = {
|
|
424
|
+
success: 'successHue',
|
|
425
|
+
warning: 'warningHue',
|
|
426
|
+
error: 'dangerHue'
|
|
427
|
+
};
|
|
428
|
+
function getValidationHue(validation) {
|
|
429
|
+
let defaultHue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'primaryHue';
|
|
430
|
+
if (validation) {
|
|
431
|
+
return VALIDATION_HUES[validation];
|
|
432
|
+
}
|
|
433
|
+
return defaultHue;
|
|
434
|
+
}
|
|
435
|
+
const colorStyles$a = props => {
|
|
436
|
+
const {
|
|
437
|
+
theme,
|
|
438
|
+
validation,
|
|
439
|
+
focusInset,
|
|
440
|
+
isBare,
|
|
441
|
+
isFocused
|
|
442
|
+
} = props;
|
|
443
|
+
return styled.css(["", ""], reactTheming.focusStyles({
|
|
444
|
+
theme,
|
|
445
|
+
inset: focusInset,
|
|
446
|
+
condition: !isBare,
|
|
447
|
+
hue: getValidationHue(validation),
|
|
448
|
+
shade: validation === 'warning' ? 700 : 600,
|
|
449
|
+
selector: isFocused ? '&' : '&:focus-within',
|
|
450
|
+
styles: {
|
|
451
|
+
borderColor: reactTheming.getColor(getValidationHue(validation), 600, theme)
|
|
452
|
+
}
|
|
453
|
+
}));
|
|
454
|
+
};
|
|
412
455
|
const StyledTextFauxInput = styled__default.default(StyledTextInput).attrs(props => ({
|
|
413
456
|
as: 'div',
|
|
414
457
|
'aria-readonly': props.isReadOnly,
|
|
415
458
|
'aria-disabled': props.isDisabled,
|
|
416
459
|
'data-garden-id': COMPONENT_ID$A,
|
|
417
|
-
'data-garden-version': '8.
|
|
460
|
+
'data-garden-version': '8.68.0'
|
|
418
461
|
})).withConfig({
|
|
419
462
|
displayName: "StyledTextFauxInput",
|
|
420
463
|
componentId: "sc-yqw7j9-0"
|
|
421
|
-
})(["display:", ";align-items:", ";cursor:", ";overflow:hidden
|
|
464
|
+
})(["display:", ";align-items:", ";cursor:", ";overflow:hidden;", " & > ", "{vertical-align:", ";", "{box-shadow:unset;}}& > ", "{flex-shrink:", ";}", ";"], props => props.mediaLayout ? 'inline-flex' : 'inline-block', props => props.mediaLayout && 'baseline', props => props.mediaLayout && !props.isDisabled ? 'text' : 'default', colorStyles$a, StyledTextInput, props => !props.mediaLayout && 'baseline', reactTheming.SELECTOR_FOCUS_VISIBLE, StyledTextMediaFigure, props => props.mediaLayout && '0', props => reactTheming.retrieveComponentStyles(COMPONENT_ID$A, props));
|
|
422
465
|
StyledTextFauxInput.defaultProps = {
|
|
423
466
|
theme: reactTheming.DEFAULT_THEME
|
|
424
467
|
};
|
|
@@ -426,7 +469,7 @@ StyledTextFauxInput.defaultProps = {
|
|
|
426
469
|
const COMPONENT_ID$z = 'forms.media_input';
|
|
427
470
|
const StyledTextMediaInput = styled__default.default(StyledTextInput).attrs({
|
|
428
471
|
'data-garden-id': COMPONENT_ID$z,
|
|
429
|
-
'data-garden-version': '8.
|
|
472
|
+
'data-garden-version': '8.68.0',
|
|
430
473
|
isBare: true
|
|
431
474
|
}).withConfig({
|
|
432
475
|
displayName: "StyledTextMediaInput",
|
|
@@ -444,11 +487,11 @@ const positionStyles = props => {
|
|
|
444
487
|
const itemStyles = props => {
|
|
445
488
|
const startDirection = props.theme.rtl ? 'right' : 'left';
|
|
446
489
|
const endDirection = props.theme.rtl ? 'left' : 'right';
|
|
447
|
-
return styled.css(["& > *{z-index:-1;}& > ", ":disabled{z-index:-2;}& > ", ":hover,& > button:hover,& > ", "[data-garden-focus-visible],& > button[data-garden-focus-visible],& > ", ":active,& > button:active{z-index:1;}& > button:disabled{border-top-width:0;border-bottom-width:0;}& > *:not(:first-child){margin-", ":-", ";}& > *:first-child:not(:last-child){border-top-", "-radius:0;border-bottom-", "-radius:0;}& > *:last-child:not(:first-child){border-top-", "-radius:0;border-bottom-", "-radius:0;}& > *:not(:first-child):not(:last-child){border-radius:0;}"], StyledTextInput, StyledTextInput, StyledTextInput, StyledTextInput, startDirection, props.theme.borderWidths.sm, endDirection, endDirection, startDirection, startDirection);
|
|
490
|
+
return styled.css(["& > *{z-index:-1;}& > ", "{z-index:0;}& > ", ":disabled{z-index:-2;}& > ", ":hover,& > button:hover,& > ", ":focus-visible,& > button:focus-visible,& > ", "[data-garden-focus-visible],& > button[data-garden-focus-visible],& > ", ":active,& > button:active{z-index:1;}& > button:disabled{border-top-width:0;border-bottom-width:0;}& > *:not(:first-child){margin-", ":-", ";}& > *:first-child:not(:last-child){border-top-", "-radius:0;border-bottom-", "-radius:0;}& > *:last-child:not(:first-child){border-top-", "-radius:0;border-bottom-", "-radius:0;}& > *:not(:first-child):not(:last-child){border-radius:0;}"], StyledTextInput, StyledTextInput, StyledTextInput, StyledTextInput, StyledTextInput, StyledTextInput, startDirection, props.theme.borderWidths.sm, endDirection, endDirection, startDirection, startDirection);
|
|
448
491
|
};
|
|
449
492
|
const StyledInputGroup = styled__default.default.div.attrs({
|
|
450
493
|
'data-garden-id': COMPONENT_ID$y,
|
|
451
|
-
'data-garden-version': '8.
|
|
494
|
+
'data-garden-version': '8.68.0'
|
|
452
495
|
}).withConfig({
|
|
453
496
|
displayName: "StyledInputGroup",
|
|
454
497
|
componentId: "sc-kjh1f0-0"
|
|
@@ -466,7 +509,7 @@ const sizeStyles$d = props => {
|
|
|
466
509
|
};
|
|
467
510
|
const StyledRadioLabel = styled__default.default(StyledLabel).attrs({
|
|
468
511
|
'data-garden-id': COMPONENT_ID$x,
|
|
469
|
-
'data-garden-version': '8.
|
|
512
|
+
'data-garden-version': '8.68.0',
|
|
470
513
|
isRadio: true
|
|
471
514
|
}).withConfig({
|
|
472
515
|
displayName: "StyledRadioLabel",
|
|
@@ -479,7 +522,7 @@ StyledRadioLabel.defaultProps = {
|
|
|
479
522
|
const COMPONENT_ID$w = 'forms.checkbox_label';
|
|
480
523
|
const StyledCheckLabel = styled__default.default(StyledRadioLabel).attrs({
|
|
481
524
|
'data-garden-id': COMPONENT_ID$w,
|
|
482
|
-
'data-garden-version': '8.
|
|
525
|
+
'data-garden-version': '8.68.0'
|
|
483
526
|
}).withConfig({
|
|
484
527
|
displayName: "StyledCheckLabel",
|
|
485
528
|
componentId: "sc-x7nr1-0"
|
|
@@ -491,7 +534,7 @@ StyledCheckLabel.defaultProps = {
|
|
|
491
534
|
const COMPONENT_ID$v = 'forms.radio_hint';
|
|
492
535
|
const StyledRadioHint = styled__default.default(StyledHint).attrs({
|
|
493
536
|
'data-garden-id': COMPONENT_ID$v,
|
|
494
|
-
'data-garden-version': '8.
|
|
537
|
+
'data-garden-version': '8.68.0'
|
|
495
538
|
}).withConfig({
|
|
496
539
|
displayName: "StyledRadioHint",
|
|
497
540
|
componentId: "sc-eo8twg-0"
|
|
@@ -503,7 +546,7 @@ StyledRadioHint.defaultProps = {
|
|
|
503
546
|
const COMPONENT_ID$u = 'forms.checkbox_hint';
|
|
504
547
|
const StyledCheckHint = styled__default.default(StyledRadioHint).attrs({
|
|
505
548
|
'data-garden-id': COMPONENT_ID$u,
|
|
506
|
-
'data-garden-version': '8.
|
|
549
|
+
'data-garden-version': '8.68.0'
|
|
507
550
|
}).withConfig({
|
|
508
551
|
displayName: "StyledCheckHint",
|
|
509
552
|
componentId: "sc-1kl8e8c-0"
|
|
@@ -523,7 +566,6 @@ const colorStyles$9 = props => {
|
|
|
523
566
|
const focusBorderColor = hoverBorderColor;
|
|
524
567
|
const activeBackgroundColor = reactTheming.getColor('primaryHue', SHADE, props.theme, 0.2);
|
|
525
568
|
const activeBorderColor = focusBorderColor;
|
|
526
|
-
const boxShadow = props.theme.shadows.md(polished.rgba(focusBorderColor, 0.35));
|
|
527
569
|
const checkedBorderColor = focusBorderColor;
|
|
528
570
|
const checkedBackgroundColor = checkedBorderColor;
|
|
529
571
|
const checkedHoverBorderColor = reactTheming.getColor('primaryHue', SHADE + 100, props.theme);
|
|
@@ -531,7 +573,13 @@ const colorStyles$9 = props => {
|
|
|
531
573
|
const checkedActiveBorderColor = reactTheming.getColor('primaryHue', SHADE + 200, props.theme);
|
|
532
574
|
const checkedActiveBackgroundColor = checkedActiveBorderColor;
|
|
533
575
|
const disabledBackgroundColor = reactTheming.getColor('neutralHue', SHADE - 400, props.theme);
|
|
534
|
-
return styled.css(["& ~ ", "::before{border-color:", ";background-color:", ";}& ~ ", " > svg{color:", ";}& ~ ", ":hover::before{border-color:", ";background-color:", ";}
|
|
576
|
+
return styled.css(["& ~ ", "::before{border-color:", ";background-color:", ";}& ~ ", " > svg{color:", ";}& ~ ", ":hover::before{border-color:", ";background-color:", ";}", " & ~ ", ":active::before{border-color:", ";background-color:", ";}&:checked ~ ", "::before{border-color:", ";background-color:", ";}&:enabled:checked ~ ", ":hover::before{border-color:", ";background-color:", ";}&:enabled:checked ~ ", ":active::before{border-color:", ";background-color:", ";}&:disabled ~ ", "::before{border-color:transparent;background-color:", ";}"], StyledRadioLabel, borderColor, backgroundColor, StyledRadioLabel, iconColor, StyledRadioLabel, hoverBorderColor, hoverBackgroundColor, reactTheming.focusStyles({
|
|
577
|
+
theme: props.theme,
|
|
578
|
+
styles: {
|
|
579
|
+
borderColor: focusBorderColor
|
|
580
|
+
},
|
|
581
|
+
selector: `&:focus-visible ~ ${StyledRadioLabel}::before, &[data-garden-focus-visible='true'] ~ ${StyledRadioLabel}::before`
|
|
582
|
+
}), StyledRadioLabel, activeBorderColor, activeBackgroundColor, StyledRadioLabel, checkedBorderColor, checkedBackgroundColor, StyledRadioLabel, checkedHoverBorderColor, checkedHoverBackgroundColor, StyledRadioLabel, checkedActiveBorderColor, checkedActiveBackgroundColor, StyledRadioLabel, disabledBackgroundColor);
|
|
535
583
|
};
|
|
536
584
|
const sizeStyles$c = props => {
|
|
537
585
|
const lineHeight = `${props.theme.space.base * 5}px`;
|
|
@@ -545,7 +593,7 @@ const sizeStyles$c = props => {
|
|
|
545
593
|
};
|
|
546
594
|
const StyledRadioInput = styled__default.default.input.attrs({
|
|
547
595
|
'data-garden-id': COMPONENT_ID$t,
|
|
548
|
-
'data-garden-version': '8.
|
|
596
|
+
'data-garden-version': '8.68.0',
|
|
549
597
|
type: 'radio'
|
|
550
598
|
}).withConfig({
|
|
551
599
|
displayName: "StyledRadioInput",
|
|
@@ -567,7 +615,7 @@ const colorStyles$8 = props => {
|
|
|
567
615
|
};
|
|
568
616
|
const StyledCheckInput = styled__default.default(StyledRadioInput).attrs({
|
|
569
617
|
'data-garden-id': COMPONENT_ID$s,
|
|
570
|
-
'data-garden-version': '8.
|
|
618
|
+
'data-garden-version': '8.68.0',
|
|
571
619
|
type: 'checkbox'
|
|
572
620
|
}).withConfig({
|
|
573
621
|
displayName: "StyledCheckInput",
|
|
@@ -580,7 +628,7 @@ StyledCheckInput.defaultProps = {
|
|
|
580
628
|
const COMPONENT_ID$r = 'forms.radio_message';
|
|
581
629
|
const StyledRadioMessage = styled__default.default(StyledMessage).attrs({
|
|
582
630
|
'data-garden-id': COMPONENT_ID$r,
|
|
583
|
-
'data-garden-version': '8.
|
|
631
|
+
'data-garden-version': '8.68.0'
|
|
584
632
|
}).withConfig({
|
|
585
633
|
displayName: "StyledRadioMessage",
|
|
586
634
|
componentId: "sc-1pmi0q8-0"
|
|
@@ -592,7 +640,7 @@ StyledRadioMessage.defaultProps = {
|
|
|
592
640
|
const COMPONENT_ID$q = 'forms.checkbox_message';
|
|
593
641
|
const StyledCheckMessage = styled__default.default(StyledRadioMessage).attrs({
|
|
594
642
|
'data-garden-id': COMPONENT_ID$q,
|
|
595
|
-
'data-garden-version': '8.
|
|
643
|
+
'data-garden-version': '8.68.0'
|
|
596
644
|
}).withConfig({
|
|
597
645
|
displayName: "StyledCheckMessage",
|
|
598
646
|
componentId: "sc-s4p6kd-0"
|
|
@@ -624,7 +672,7 @@ var SvgCheckSmFill = function SvgCheckSmFill(props) {
|
|
|
624
672
|
const COMPONENT_ID$p = 'forms.check_svg';
|
|
625
673
|
const StyledCheckSvg = styled__default.default(SvgCheckSmFill).attrs({
|
|
626
674
|
'data-garden-id': COMPONENT_ID$p,
|
|
627
|
-
'data-garden-version': '8.
|
|
675
|
+
'data-garden-version': '8.68.0'
|
|
628
676
|
}).withConfig({
|
|
629
677
|
displayName: "StyledCheckSvg",
|
|
630
678
|
componentId: "sc-fvxetk-0"
|
|
@@ -654,7 +702,7 @@ var SvgDashFill = function SvgDashFill(props) {
|
|
|
654
702
|
const COMPONENT_ID$o = 'forms.dash_svg';
|
|
655
703
|
const StyledDashSvg = styled__default.default(SvgDashFill).attrs({
|
|
656
704
|
'data-garden-id': COMPONENT_ID$o,
|
|
657
|
-
'data-garden-version': '8.
|
|
705
|
+
'data-garden-version': '8.68.0'
|
|
658
706
|
}).withConfig({
|
|
659
707
|
displayName: "StyledDashSvg",
|
|
660
708
|
componentId: "sc-z3vq71-0"
|
|
@@ -670,8 +718,10 @@ const colorStyles$7 = props => {
|
|
|
670
718
|
const activeColor = reactTheming.getColor('primaryHue', 800, props.theme);
|
|
671
719
|
const disabledBackgroundColor = reactTheming.getColor('neutralHue', 200, props.theme);
|
|
672
720
|
const disabledForegroundColor = reactTheming.getColor('neutralHue', 400, props.theme);
|
|
673
|
-
|
|
674
|
-
|
|
721
|
+
return styled.css(["border-color:", ";background-color:", ";color:", ";&:hover{border-color:", ";background-color:", ";color:", ";}", " &:active{border-color:", ";background-color:", ";color:", ";}&[aria-disabled='true']{border-color:", ";background-color:", ";color:", ";}"], props.isDragging ? activeColor : reactTheming.getColor('neutralHue', 600, props.theme), props.isDragging && polished.rgba(baseColor, 0.2), props.isDragging ? activeColor : baseColor, hoverColor, polished.rgba(baseColor, 0.08), hoverColor, reactTheming.focusStyles({
|
|
722
|
+
theme: props.theme,
|
|
723
|
+
hue: baseColor
|
|
724
|
+
}), activeColor, polished.rgba(baseColor, 0.2), activeColor, disabledForegroundColor, disabledBackgroundColor, disabledForegroundColor);
|
|
675
725
|
};
|
|
676
726
|
const sizeStyles$b = props => {
|
|
677
727
|
const marginTop = `${props.theme.space.base * (props.isCompact ? 1 : 2)}px`;
|
|
@@ -683,11 +733,11 @@ const sizeStyles$b = props => {
|
|
|
683
733
|
};
|
|
684
734
|
const StyledFileUpload = styled__default.default.div.attrs({
|
|
685
735
|
'data-garden-id': COMPONENT_ID$n,
|
|
686
|
-
'data-garden-version': '8.
|
|
736
|
+
'data-garden-version': '8.68.0'
|
|
687
737
|
}).withConfig({
|
|
688
738
|
displayName: "StyledFileUpload",
|
|
689
739
|
componentId: "sc-1rodjgn-0"
|
|
690
|
-
})(["display:flex;align-items:center;justify-content:center;box-sizing:border-box;direction:", ";transition:border-color 0.25s ease-in-out,box-shadow 0.1s ease-in-out,background-color 0.25s ease-in-out,color 0.25s ease-in-out;border:dashed ", ";border-radius:", ";cursor:pointer;text-align:center;user-select:none;", "
|
|
740
|
+
})(["display:flex;align-items:center;justify-content:center;box-sizing:border-box;direction:", ";transition:border-color 0.25s ease-in-out,box-shadow 0.1s ease-in-out,background-color 0.25s ease-in-out,color 0.25s ease-in-out;border:dashed ", ";border-radius:", ";cursor:pointer;text-align:center;user-select:none;", ";&[aria-disabled='true']{cursor:default;}", ";", ";"], props => props.theme.rtl ? 'rtl' : 'ltr', props => props.theme.borderWidths.sm, props => props.theme.borderRadii.md, sizeStyles$b, colorStyles$7, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$n, props));
|
|
691
741
|
StyledFileUpload.defaultProps = {
|
|
692
742
|
theme: reactTheming.DEFAULT_THEME
|
|
693
743
|
};
|
|
@@ -695,7 +745,7 @@ StyledFileUpload.defaultProps = {
|
|
|
695
745
|
const COMPONENT_ID$m = 'forms.file.close';
|
|
696
746
|
const StyledFileClose = styled__default.default.button.attrs({
|
|
697
747
|
'data-garden-id': COMPONENT_ID$m,
|
|
698
|
-
'data-garden-version': '8.
|
|
748
|
+
'data-garden-version': '8.68.0'
|
|
699
749
|
}).withConfig({
|
|
700
750
|
displayName: "StyledFileClose",
|
|
701
751
|
componentId: "sc-1m31jbf-0"
|
|
@@ -722,18 +772,14 @@ const colorStyles$6 = props => {
|
|
|
722
772
|
focusBorderColor = reactTheming.getColor('primaryHue', 600, props.theme);
|
|
723
773
|
foregroundColor = props.theme.colors.foreground;
|
|
724
774
|
}
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
&:focus {
|
|
733
|
-
box-shadow: ${boxShadow};
|
|
734
|
-
border-color: ${focusBorderColor};
|
|
775
|
+
return styled.css(["border-color:", ";color:", ";", ""], borderColor, foregroundColor, reactTheming.focusStyles({
|
|
776
|
+
theme: props.theme,
|
|
777
|
+
inset: props.focusInset,
|
|
778
|
+
hue: focusBorderColor,
|
|
779
|
+
styles: {
|
|
780
|
+
borderColor: focusBorderColor
|
|
735
781
|
}
|
|
736
|
-
|
|
782
|
+
}));
|
|
737
783
|
};
|
|
738
784
|
const sizeStyles$a = props => {
|
|
739
785
|
const size = `${props.theme.space.base * (props.isCompact ? 7 : 10)}px`;
|
|
@@ -762,11 +808,11 @@ const sizeStyles$a = props => {
|
|
|
762
808
|
};
|
|
763
809
|
const StyledFile = styled__default.default.div.attrs({
|
|
764
810
|
'data-garden-id': COMPONENT_ID$l,
|
|
765
|
-
'data-garden-version': '8.
|
|
811
|
+
'data-garden-version': '8.68.0'
|
|
766
812
|
}).withConfig({
|
|
767
813
|
displayName: "StyledFile",
|
|
768
814
|
componentId: "sc-195lzp1-0"
|
|
769
|
-
})(["display:flex;position:relative;flex-wrap:nowrap;align-items:center;", "
|
|
815
|
+
})(["display:flex;position:relative;flex-wrap:nowrap;align-items:center;transition:box-shadow 0.1s ease-in-out;", ";", ";& > span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}& > [role='progressbar']{position:absolute;bottom:0;left:0;transition:opacity 0.2s ease-in-out;margin:0;border-top-left-radius:0;border-top-right-radius:0;width:100%;& > div{border-top-", "-radius:0;}}& > [role='progressbar'][aria-valuenow='0'],& > [role='progressbar'][aria-valuenow='100']{opacity:0;}", ";"], sizeStyles$a, colorStyles$6, props => props.theme.rtl ? 'right' : 'left', props => reactTheming.retrieveComponentStyles(COMPONENT_ID$l, props));
|
|
770
816
|
StyledFile.defaultProps = {
|
|
771
817
|
theme: reactTheming.DEFAULT_THEME
|
|
772
818
|
};
|
|
@@ -774,7 +820,7 @@ StyledFile.defaultProps = {
|
|
|
774
820
|
const COMPONENT_ID$k = 'forms.file.delete';
|
|
775
821
|
const StyledFileDelete = styled__default.default(StyledFileClose).attrs({
|
|
776
822
|
'data-garden-id': COMPONENT_ID$k,
|
|
777
|
-
'data-garden-version': '8.
|
|
823
|
+
'data-garden-version': '8.68.0'
|
|
778
824
|
}).withConfig({
|
|
779
825
|
displayName: "StyledFileDelete",
|
|
780
826
|
componentId: "sc-a8nnhx-0"
|
|
@@ -794,7 +840,7 @@ const StyledFileIcon = styled__default.default(_ref => {
|
|
|
794
840
|
return React__namespace.default.cloneElement(React.Children.only(children), props);
|
|
795
841
|
}).attrs({
|
|
796
842
|
'data-garden-id': COMPONENT_ID$j,
|
|
797
|
-
'data-garden-version': '8.
|
|
843
|
+
'data-garden-version': '8.68.0'
|
|
798
844
|
}).withConfig({
|
|
799
845
|
displayName: "StyledFileIcon",
|
|
800
846
|
componentId: "sc-7b3q0c-0"
|
|
@@ -806,7 +852,7 @@ StyledFileIcon.defaultProps = {
|
|
|
806
852
|
const COMPONENT_ID$i = 'forms.file_list';
|
|
807
853
|
const StyledFileList = styled__default.default.ul.attrs({
|
|
808
854
|
'data-garden-id': COMPONENT_ID$i,
|
|
809
|
-
'data-garden-version': '8.
|
|
855
|
+
'data-garden-version': '8.68.0'
|
|
810
856
|
}).withConfig({
|
|
811
857
|
displayName: "StyledFileList",
|
|
812
858
|
componentId: "sc-gbahjg-0"
|
|
@@ -818,7 +864,7 @@ StyledFileList.defaultProps = {
|
|
|
818
864
|
const COMPONENT_ID$h = 'forms.file_list.item';
|
|
819
865
|
const StyledFileListItem = styled__default.default.li.attrs({
|
|
820
866
|
'data-garden-id': COMPONENT_ID$h,
|
|
821
|
-
'data-garden-version': '8.
|
|
867
|
+
'data-garden-version': '8.68.0'
|
|
822
868
|
}).withConfig({
|
|
823
869
|
displayName: "StyledFileListItem",
|
|
824
870
|
componentId: "sc-1ova3lo-0"
|
|
@@ -848,7 +894,7 @@ var SvgCircleSmFill$1 = function SvgCircleSmFill(props) {
|
|
|
848
894
|
const COMPONENT_ID$g = 'forms.radio_svg';
|
|
849
895
|
const StyledRadioSvg = styled__default.default(SvgCircleSmFill$1).attrs({
|
|
850
896
|
'data-garden-id': COMPONENT_ID$g,
|
|
851
|
-
'data-garden-version': '8.
|
|
897
|
+
'data-garden-version': '8.68.0'
|
|
852
898
|
}).withConfig({
|
|
853
899
|
displayName: "StyledRadioSvg",
|
|
854
900
|
componentId: "sc-1r1qtr1-0"
|
|
@@ -865,7 +911,7 @@ const sizeStyles$9 = props => {
|
|
|
865
911
|
};
|
|
866
912
|
const StyledToggleLabel = styled__default.default(StyledCheckLabel).attrs({
|
|
867
913
|
'data-garden-id': COMPONENT_ID$f,
|
|
868
|
-
'data-garden-version': '8.
|
|
914
|
+
'data-garden-version': '8.68.0'
|
|
869
915
|
}).withConfig({
|
|
870
916
|
displayName: "StyledToggleLabel",
|
|
871
917
|
componentId: "sc-e0asdk-0"
|
|
@@ -877,7 +923,7 @@ StyledToggleLabel.defaultProps = {
|
|
|
877
923
|
const COMPONENT_ID$e = 'forms.toggle_hint';
|
|
878
924
|
const StyledToggleHint = styled__default.default(StyledHint).attrs({
|
|
879
925
|
'data-garden-id': COMPONENT_ID$e,
|
|
880
|
-
'data-garden-version': '8.
|
|
926
|
+
'data-garden-version': '8.68.0'
|
|
881
927
|
}).withConfig({
|
|
882
928
|
displayName: "StyledToggleHint",
|
|
883
929
|
componentId: "sc-nziggu-0"
|
|
@@ -904,7 +950,7 @@ const sizeStyles$8 = props => {
|
|
|
904
950
|
};
|
|
905
951
|
const StyledToggleInput = styled__default.default(StyledCheckInput).attrs({
|
|
906
952
|
'data-garden-id': COMPONENT_ID$d,
|
|
907
|
-
'data-garden-version': '8.
|
|
953
|
+
'data-garden-version': '8.68.0'
|
|
908
954
|
}).withConfig({
|
|
909
955
|
displayName: "StyledToggleInput",
|
|
910
956
|
componentId: "sc-sgp47s-0"
|
|
@@ -916,7 +962,7 @@ StyledToggleInput.defaultProps = {
|
|
|
916
962
|
const COMPONENT_ID$c = 'forms.toggle_message';
|
|
917
963
|
const StyledToggleMessage = styled__default.default(StyledMessage).attrs({
|
|
918
964
|
'data-garden-id': COMPONENT_ID$c,
|
|
919
|
-
'data-garden-version': '8.
|
|
965
|
+
'data-garden-version': '8.68.0'
|
|
920
966
|
}).withConfig({
|
|
921
967
|
displayName: "StyledToggleMessage",
|
|
922
968
|
componentId: "sc-13vuvl1-0"
|
|
@@ -946,7 +992,7 @@ var SvgCircleSmFill = function SvgCircleSmFill(props) {
|
|
|
946
992
|
const COMPONENT_ID$b = 'forms.toggle_svg';
|
|
947
993
|
const StyledToggleSvg = styled__default.default(SvgCircleSmFill).attrs({
|
|
948
994
|
'data-garden-id': COMPONENT_ID$b,
|
|
949
|
-
'data-garden-version': '8.
|
|
995
|
+
'data-garden-version': '8.68.0'
|
|
950
996
|
}).withConfig({
|
|
951
997
|
displayName: "StyledToggleSvg",
|
|
952
998
|
componentId: "sc-162xbyx-0"
|
|
@@ -958,7 +1004,7 @@ StyledToggleSvg.defaultProps = {
|
|
|
958
1004
|
const COMPONENT_ID$a = 'forms.select';
|
|
959
1005
|
const colorStyles$4 = props => {
|
|
960
1006
|
const color = reactTheming.getColor('neutralHue', 700, props.theme);
|
|
961
|
-
return styled.css(["&:hover + ", ",&:focus + ", ",&[data-garden-focus-visible='true'] + ", "{color:", ";}"], StyledTextMediaFigure, StyledTextMediaFigure, StyledTextMediaFigure, color);
|
|
1007
|
+
return styled.css(["&:hover + ", ",&:focus + ", ",&:focus-visible + ", ",&[data-garden-focus-visible='true'] + ", "{color:", ";}"], StyledTextMediaFigure, StyledTextMediaFigure, StyledTextMediaFigure, StyledTextMediaFigure, color);
|
|
962
1008
|
};
|
|
963
1009
|
const sizeStyles$7 = props => {
|
|
964
1010
|
const padding = polished.math(`${props.theme.iconSizes.md} + ${props.theme.space.base * 5}`);
|
|
@@ -968,7 +1014,7 @@ const sizeStyles$7 = props => {
|
|
|
968
1014
|
};
|
|
969
1015
|
const StyledSelect = styled__default.default(StyledTextInput).attrs({
|
|
970
1016
|
'data-garden-id': COMPONENT_ID$a,
|
|
971
|
-
'data-garden-version': '8.
|
|
1017
|
+
'data-garden-version': '8.68.0',
|
|
972
1018
|
as: 'select'
|
|
973
1019
|
}).withConfig({
|
|
974
1020
|
displayName: "StyledSelect",
|
|
@@ -981,12 +1027,11 @@ StyledSelect.defaultProps = {
|
|
|
981
1027
|
const COMPONENT_ID$9 = 'forms.select_wrapper';
|
|
982
1028
|
const StyledSelectWrapper = styled__default.default(StyledTextFauxInput).attrs({
|
|
983
1029
|
'data-garden-id': COMPONENT_ID$9,
|
|
984
|
-
'data-garden-version': '8.
|
|
985
|
-
isBare: true
|
|
1030
|
+
'data-garden-version': '8.68.0'
|
|
986
1031
|
}).withConfig({
|
|
987
1032
|
displayName: "StyledSelectWrapper",
|
|
988
1033
|
componentId: "sc-i7b6hw-0"
|
|
989
|
-
})(["position:relative;overflow:visible;"]);
|
|
1034
|
+
})(["position:relative;padding:0;overflow:visible;& > ", "{border-color:transparent;background-color:transparent;", "{box-shadow:unset;}}"], StyledSelect, reactTheming.SELECTOR_FOCUS_VISIBLE);
|
|
990
1035
|
StyledSelectWrapper.defaultProps = {
|
|
991
1036
|
theme: reactTheming.DEFAULT_THEME
|
|
992
1037
|
};
|
|
@@ -1041,11 +1086,13 @@ const colorStyles$3 = props => {
|
|
|
1041
1086
|
const thumbBackgroundColor = reactTheming.getColor('primaryHue', SHADE, props.theme);
|
|
1042
1087
|
const thumbBorderColor = thumbBackgroundColor;
|
|
1043
1088
|
const thumbBoxShadow = props.theme.shadows.lg(polished.math(`${props.theme.space.base} * 1px`), polished.math(`${props.theme.space.base} * 2px`), reactTheming.getColor('neutralHue', SHADE + 200, props.theme, 0.24));
|
|
1089
|
+
const thumbFocusBoxShadow = reactTheming.getFocusBoxShadow({
|
|
1090
|
+
theme: props.theme
|
|
1091
|
+
});
|
|
1044
1092
|
const thumbActiveBackgroundColor = reactTheming.getColor('primaryHue', SHADE + 100, props.theme);
|
|
1045
1093
|
const thumbActiveBorderColor = thumbBorderColor;
|
|
1046
1094
|
const thumbDisabledBackgroundColor = reactTheming.getColor('neutralHue', SHADE - 300, props.theme);
|
|
1047
1095
|
const thumbDisabledBorderColor = thumbDisabledBackgroundColor;
|
|
1048
|
-
const thumbFocusBoxShadow = props.theme.shadows.md(reactTheming.getColor('primaryHue', SHADE, props.theme, 0.35));
|
|
1049
1096
|
const thumbHoverBackgroundColor = thumbActiveBackgroundColor;
|
|
1050
1097
|
const thumbHoverBorderColor = thumbHoverBackgroundColor;
|
|
1051
1098
|
const trackBackgroundColor = reactTheming.getColor('neutralHue', SHADE - 400, props.theme);
|
|
@@ -1072,7 +1119,7 @@ const colorStyles$3 = props => {
|
|
|
1072
1119
|
box-shadow: ${thumbFocusBoxShadow};
|
|
1073
1120
|
`, '[data-garden-focus-visible="true"]'), thumbStyles(`
|
|
1074
1121
|
border-color: ${thumbActiveBorderColor};
|
|
1075
|
-
background-color: ${thumbActiveBackgroundColor}
|
|
1122
|
+
background-color: ${thumbActiveBackgroundColor};
|
|
1076
1123
|
`, ':active'), trackStyles(`
|
|
1077
1124
|
background-image: ${trackDisabledBackgroundImage};
|
|
1078
1125
|
`, ':disabled'), thumbStyles(`
|
|
@@ -1080,7 +1127,7 @@ const colorStyles$3 = props => {
|
|
|
1080
1127
|
box-shadow: none;
|
|
1081
1128
|
background-color: ${thumbDisabledBackgroundColor};
|
|
1082
1129
|
`, ':disabled'), trackLowerStyles(`
|
|
1083
|
-
background-color: ${trackDisabledLowerBackgroundColor}
|
|
1130
|
+
background-color: ${trackDisabledLowerBackgroundColor};
|
|
1084
1131
|
`, ':disabled'));
|
|
1085
1132
|
};
|
|
1086
1133
|
const sizeStyles$6 = props => {
|
|
@@ -1105,7 +1152,7 @@ const sizeStyles$6 = props => {
|
|
|
1105
1152
|
};
|
|
1106
1153
|
const StyledRangeInput = styled__default.default.input.attrs(props => ({
|
|
1107
1154
|
'data-garden-id': COMPONENT_ID$8,
|
|
1108
|
-
'data-garden-version': '8.
|
|
1155
|
+
'data-garden-version': '8.68.0',
|
|
1109
1156
|
type: 'range',
|
|
1110
1157
|
style: {
|
|
1111
1158
|
backgroundSize: props.hasLowerTrack && props.backgroundSize
|
|
@@ -1138,7 +1185,7 @@ StyledRangeInput.defaultProps = {
|
|
|
1138
1185
|
const COMPONENT_ID$7 = 'forms.slider';
|
|
1139
1186
|
const StyledSlider = styled__default.default.div.attrs({
|
|
1140
1187
|
'data-garden-id': COMPONENT_ID$7,
|
|
1141
|
-
'data-garden-version': '8.
|
|
1188
|
+
'data-garden-version': '8.68.0'
|
|
1142
1189
|
}).withConfig({
|
|
1143
1190
|
displayName: "StyledSlider",
|
|
1144
1191
|
componentId: "sc-1di437a-0"
|
|
@@ -1157,10 +1204,11 @@ const colorStyles$2 = props => {
|
|
|
1157
1204
|
const activeBorderColor = borderColor;
|
|
1158
1205
|
const hoverBackgroundColor = activeBackgroundColor;
|
|
1159
1206
|
const hoverBorderColor = hoverBackgroundColor;
|
|
1160
|
-
const focusBoxShadow = props.theme.shadows.md(reactTheming.getColor('primaryHue', SHADE, props.theme, 0.35));
|
|
1161
1207
|
const disabledBackgroundColor = reactTheming.getColor('neutralHue', SHADE - 300, props.theme);
|
|
1162
1208
|
const disabledBorderColor = disabledBackgroundColor;
|
|
1163
|
-
return styled.css(["border-color:", ";box-shadow:", ";background-color:", "
|
|
1209
|
+
return styled.css(["border-color:", ";box-shadow:", ";background-color:", ";&:hover,&[data-garden-hover='true']{border-color:", ";background-color:", ";}", " &:active,&[data-garden-active='true']{border-color:", ";background-color:", ";}&[aria-disabled='true']{border-color:", ";box-shadow:none;background-color:", ";}"], borderColor, boxShadow, backgroundColor, hoverBorderColor, hoverBackgroundColor, reactTheming.focusStyles({
|
|
1210
|
+
theme: props.theme
|
|
1211
|
+
}), activeBorderColor, activeBackgroundColor, disabledBorderColor, disabledBackgroundColor);
|
|
1164
1212
|
};
|
|
1165
1213
|
const sizeStyles$5 = props => {
|
|
1166
1214
|
const size = polished.math(`${props.theme.space.base} * 5px`);
|
|
@@ -1169,12 +1217,12 @@ const sizeStyles$5 = props => {
|
|
|
1169
1217
|
};
|
|
1170
1218
|
const StyledSliderThumb = styled__default.default.div.attrs(props => ({
|
|
1171
1219
|
'data-garden-id': COMPONENT_ID$6,
|
|
1172
|
-
'data-garden-version': '8.
|
|
1220
|
+
'data-garden-version': '8.68.0',
|
|
1173
1221
|
'aria-disabled': props.isDisabled
|
|
1174
1222
|
})).withConfig({
|
|
1175
1223
|
displayName: "StyledSliderThumb",
|
|
1176
1224
|
componentId: "sc-yspbwa-0"
|
|
1177
|
-
})(["appearance:none;position:absolute;top:50%;", ":", ";transition:border-color 0.25s ease-in-out,box-shadow 0.1s ease-in-out,background-color 0.25s ease-in-out;z-index:1;border:", ";border-radius:100%;cursor:inherit;box-sizing:border-box;font-size:0;", "
|
|
1225
|
+
})(["appearance:none;position:absolute;top:50%;", ":", ";transition:border-color 0.25s ease-in-out,box-shadow 0.1s ease-in-out,background-color 0.25s ease-in-out;z-index:1;border:", ";border-radius:100%;cursor:inherit;box-sizing:border-box;font-size:0;", ";", ";", ";"], props => props.theme.rtl ? 'right' : 'left', props => polished.math(`${props.position} * 1px`), props => props.theme.borders.md, props => sizeStyles$5(props), props => colorStyles$2(props), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$6, props));
|
|
1178
1226
|
StyledSliderThumb.defaultProps = {
|
|
1179
1227
|
position: 0,
|
|
1180
1228
|
theme: reactTheming.DEFAULT_THEME
|
|
@@ -1199,7 +1247,7 @@ const sizeStyles$4 = props => {
|
|
|
1199
1247
|
};
|
|
1200
1248
|
const StyledSliderTrack = styled__default.default.div.attrs(props => ({
|
|
1201
1249
|
'data-garden-id': COMPONENT_ID$5,
|
|
1202
|
-
'data-garden-version': '8.
|
|
1250
|
+
'data-garden-version': '8.68.0',
|
|
1203
1251
|
'aria-disabled': props.isDisabled
|
|
1204
1252
|
})).withConfig({
|
|
1205
1253
|
displayName: "StyledSliderTrack",
|
|
@@ -1219,7 +1267,7 @@ const sizeStyles$3 = props => {
|
|
|
1219
1267
|
};
|
|
1220
1268
|
const StyledSliderTrackRail = styled__default.default.div.attrs({
|
|
1221
1269
|
'data-garden-id': COMPONENT_ID$4,
|
|
1222
|
-
'data-garden-version': '8.
|
|
1270
|
+
'data-garden-version': '8.68.0'
|
|
1223
1271
|
}).withConfig({
|
|
1224
1272
|
displayName: "StyledSliderTrackRail",
|
|
1225
1273
|
componentId: "sc-1o5owbd-0"
|
|
@@ -1246,7 +1294,7 @@ const sizeStyles$2 = props => {
|
|
|
1246
1294
|
};
|
|
1247
1295
|
const StyledTileIcon = styled__default.default.span.attrs({
|
|
1248
1296
|
'data-garden-id': COMPONENT_ID$3,
|
|
1249
|
-
'data-garden-version': '8.
|
|
1297
|
+
'data-garden-version': '8.68.0'
|
|
1250
1298
|
}).withConfig({
|
|
1251
1299
|
displayName: "StyledTileIcon",
|
|
1252
1300
|
componentId: "sc-1wazhg4-0"
|
|
@@ -1264,7 +1312,6 @@ const colorStyles = props => {
|
|
|
1264
1312
|
const hoverBackgroundColor = reactTheming.getColor('primaryHue', SHADE, props.theme, 0.08);
|
|
1265
1313
|
const hoverBorderColor = reactTheming.getColor('primaryHue', SHADE, props.theme);
|
|
1266
1314
|
const focusBorderColor = hoverBorderColor;
|
|
1267
|
-
const focusBoxShadow = props.theme.shadows.md(polished.rgba(focusBorderColor, 0.35));
|
|
1268
1315
|
const activeBackgroundColor = reactTheming.getColor('primaryHue', SHADE, props.theme, 0.2);
|
|
1269
1316
|
const activeBorderColor = focusBorderColor;
|
|
1270
1317
|
const disabledBackgroundColor = reactTheming.getColor('neutralHue', SHADE - 500, props.theme);
|
|
@@ -1277,12 +1324,18 @@ const colorStyles = props => {
|
|
|
1277
1324
|
const selectedActiveBorderColor = reactTheming.getColor('primaryHue', SHADE + 200, props.theme);
|
|
1278
1325
|
const selectedActiveBackgroundColor = selectedActiveBorderColor;
|
|
1279
1326
|
const selectedDisabledBackgroundColor = disabledBorderColor;
|
|
1280
|
-
return styled.css(["border:", " ", ";border-color:", ";background-color:", ";color:", ";", "{color:", ";}&:
|
|
1327
|
+
return styled.css(["border:", " ", ";border-color:", ";background-color:", ";color:", ";", "{color:", ";}&:hover:not([aria-disabled='true']){border-color:", ";background-color:", ";", "{color:", ";}}", " &:active:not([aria-disabled='true']){border-color:", ";background-color:", ";", "{color:", ";}}&[data-garden-selected='true']{border-color:", ";background-color:", ";color:", ";", "{color:", ";}}&[data-garden-selected='true']:not([aria-disabled='true']):hover{border-color:", ";background-color:", ";color:", ";", "{color:", ";}}&[data-garden-selected='true']:not([aria-disabled='true']):active{border-color:", ";background-color:", ";color:", ";", "{color:", ";}}&[aria-disabled='true']{border-color:", ";background-color:", ";color:", ";", "{color:", ";}}&[data-garden-selected='true'][aria-disabled='true']{background-color:", ";color:", ";", "{color:", ";}}"], props.theme.borders.sm, reactTheming.getColor('neutralHue', SHADE - 300, props.theme), borderColor, props.theme.colors.background, color, StyledTileIcon, iconColor, hoverBorderColor, hoverBackgroundColor, StyledTileIcon, color, reactTheming.focusStyles({
|
|
1328
|
+
theme: props.theme,
|
|
1329
|
+
hue: focusBorderColor,
|
|
1330
|
+
styles: {
|
|
1331
|
+
borderColor: focusBorderColor
|
|
1332
|
+
},
|
|
1333
|
+
selector: `&:focus-within`
|
|
1334
|
+
}), activeBorderColor, activeBackgroundColor, StyledTileIcon, color, selectedBorderColor, selectedBackgroundColor, props.theme.colors.background, StyledTileIcon, props.theme.colors.background, selectedHoverBorderColor, selectedHoverBackgroundColor, props.theme.colors.background, StyledTileIcon, props.theme.colors.background, selectedActiveBorderColor, selectedActiveBackgroundColor, props.theme.colors.background, StyledTileIcon, props.theme.colors.background, disabledBorderColor, disabledBackgroundColor, disabledColor, StyledTileIcon, disabledColor, selectedDisabledBackgroundColor, disabledColor, StyledTileIcon, disabledColor);
|
|
1281
1335
|
};
|
|
1282
1336
|
const StyledTile = styled__default.default.label.attrs(props => ({
|
|
1283
1337
|
'data-garden-id': COMPONENT_ID$2,
|
|
1284
|
-
'data-garden-version': '8.
|
|
1285
|
-
'data-garden-focus-visible': props.isFocused,
|
|
1338
|
+
'data-garden-version': '8.68.0',
|
|
1286
1339
|
'data-garden-selected': props.isSelected
|
|
1287
1340
|
})).withConfig({
|
|
1288
1341
|
displayName: "StyledTile",
|
|
@@ -1306,7 +1359,7 @@ const sizeStyles$1 = props => {
|
|
|
1306
1359
|
};
|
|
1307
1360
|
const StyledTileDescription = styled__default.default.span.attrs({
|
|
1308
1361
|
'data-garden-id': COMPONENT_ID$1,
|
|
1309
|
-
'data-garden-version': '8.
|
|
1362
|
+
'data-garden-version': '8.68.0'
|
|
1310
1363
|
}).withConfig({
|
|
1311
1364
|
displayName: "StyledTileDescription",
|
|
1312
1365
|
componentId: "sc-xfuu7u-0"
|
|
@@ -1339,7 +1392,7 @@ const sizeStyles = props => {
|
|
|
1339
1392
|
};
|
|
1340
1393
|
const StyledTileLabel = styled__default.default.span.attrs({
|
|
1341
1394
|
'data-garden-id': COMPONENT_ID,
|
|
1342
|
-
'data-garden-version': '8.
|
|
1395
|
+
'data-garden-version': '8.68.0'
|
|
1343
1396
|
}).withConfig({
|
|
1344
1397
|
displayName: "StyledTileLabel",
|
|
1345
1398
|
componentId: "sc-1mypv27-0"
|
|
@@ -1590,7 +1643,7 @@ const Message = React__namespace.default.forwardRef((_ref, ref) => {
|
|
|
1590
1643
|
if (getMessageProps) {
|
|
1591
1644
|
combinedProps = getMessageProps(combinedProps);
|
|
1592
1645
|
}
|
|
1593
|
-
const ariaLabel = reactTheming.useText(Message, combinedProps, 'validationLabel', validation);
|
|
1646
|
+
const ariaLabel = reactTheming.useText(Message, combinedProps, 'validationLabel', validation, validation !== undefined);
|
|
1594
1647
|
return React__namespace.default.createElement(MessageComponent, _extends$t({
|
|
1595
1648
|
ref: ref
|
|
1596
1649
|
}, combinedProps), validation && React__namespace.default.createElement(StyledMessageIcon, {
|
|
@@ -1991,12 +2044,18 @@ const Select = React__namespace.default.forwardRef((_ref, ref) => {
|
|
|
1991
2044
|
let {
|
|
1992
2045
|
disabled,
|
|
1993
2046
|
isCompact,
|
|
2047
|
+
validation,
|
|
2048
|
+
focusInset,
|
|
2049
|
+
isBare,
|
|
1994
2050
|
...props
|
|
1995
2051
|
} = _ref;
|
|
1996
2052
|
const fieldContext = useFieldContext();
|
|
1997
2053
|
let combinedProps = {
|
|
1998
2054
|
disabled,
|
|
2055
|
+
isBare,
|
|
1999
2056
|
isCompact,
|
|
2057
|
+
validation,
|
|
2058
|
+
focusInset,
|
|
2000
2059
|
ref,
|
|
2001
2060
|
...props
|
|
2002
2061
|
};
|
|
@@ -2006,8 +2065,11 @@ const Select = React__namespace.default.forwardRef((_ref, ref) => {
|
|
|
2006
2065
|
});
|
|
2007
2066
|
}
|
|
2008
2067
|
return React__namespace.default.createElement(StyledSelectWrapper, {
|
|
2009
|
-
isCompact: isCompact
|
|
2010
|
-
|
|
2068
|
+
isCompact: isCompact,
|
|
2069
|
+
isBare: isBare,
|
|
2070
|
+
validation: validation,
|
|
2071
|
+
focusInset: focusInset
|
|
2072
|
+
}, React__namespace.default.createElement(StyledSelect, combinedProps), !isBare && React__namespace.default.createElement(FauxInput.EndIcon, {
|
|
2011
2073
|
isDisabled: disabled
|
|
2012
2074
|
}, React__namespace.default.createElement(SvgChevronDownStroke, null)));
|
|
2013
2075
|
});
|
|
@@ -2135,7 +2197,6 @@ const TileComponent = React__namespace.default.forwardRef((_ref, ref) => {
|
|
|
2135
2197
|
disabled,
|
|
2136
2198
|
...props
|
|
2137
2199
|
} = _ref;
|
|
2138
|
-
const [isFocused, setIsFocused] = React.useState(false);
|
|
2139
2200
|
const tilesContext = useTilesContext();
|
|
2140
2201
|
const inputRef = React.useRef(null);
|
|
2141
2202
|
let inputProps;
|
|
@@ -2150,20 +2211,10 @@ const TileComponent = React__namespace.default.forwardRef((_ref, ref) => {
|
|
|
2150
2211
|
ref: ref,
|
|
2151
2212
|
"aria-disabled": disabled,
|
|
2152
2213
|
isDisabled: disabled,
|
|
2153
|
-
isFocused: isFocused,
|
|
2154
2214
|
isSelected: tilesContext && tilesContext.value === value
|
|
2155
2215
|
}, props), children, React__namespace.default.createElement(StyledTileInput, _extends$t({}, inputProps, {
|
|
2156
2216
|
disabled: disabled,
|
|
2157
2217
|
value: value,
|
|
2158
|
-
onBlur: () => setIsFocused(false),
|
|
2159
|
-
onFocus: e => {
|
|
2160
|
-
e.persist();
|
|
2161
|
-
setTimeout(() => {
|
|
2162
|
-
if (e.target.getAttribute('data-garden-focus-visible')) {
|
|
2163
|
-
setIsFocused(true);
|
|
2164
|
-
}
|
|
2165
|
-
}, 1);
|
|
2166
|
-
},
|
|
2167
2218
|
type: "radio",
|
|
2168
2219
|
ref: inputRef
|
|
2169
2220
|
})));
|