@zendeskgarden/react-forms 9.0.0-next.4 → 9.0.0-next.5
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/README.md +4 -4
- package/dist/index.cjs.js +224 -220
- package/dist/index.esm.js +226 -222
- package/dist/typings/elements/common/Field.d.ts +9 -1
- package/dist/typings/elements/common/Hint.d.ts +2 -0
- package/dist/typings/elements/common/Label.d.ts +2 -0
- package/dist/typings/elements/common/Message.d.ts +2 -0
- package/package.json +4 -4
package/dist/index.cjs.js
CHANGED
|
@@ -64,7 +64,7 @@ const useFieldContext = () => {
|
|
|
64
64
|
const COMPONENT_ID$G = 'forms.field';
|
|
65
65
|
const StyledField = styled__default.default.div.attrs({
|
|
66
66
|
'data-garden-id': COMPONENT_ID$G,
|
|
67
|
-
'data-garden-version': '9.0.0-next.
|
|
67
|
+
'data-garden-version': '9.0.0-next.5'
|
|
68
68
|
}).withConfig({
|
|
69
69
|
displayName: "StyledField",
|
|
70
70
|
componentId: "sc-12gzfsu-0"
|
|
@@ -77,7 +77,7 @@ const COMPONENT_ID$F = 'forms.fieldset';
|
|
|
77
77
|
const StyledFieldset = styled__default.default(StyledField).attrs({
|
|
78
78
|
as: 'fieldset',
|
|
79
79
|
'data-garden-id': COMPONENT_ID$F,
|
|
80
|
-
'data-garden-version': '9.0.0-next.
|
|
80
|
+
'data-garden-version': '9.0.0-next.5'
|
|
81
81
|
}).withConfig({
|
|
82
82
|
displayName: "StyledFieldset",
|
|
83
83
|
componentId: "sc-1vr4mxv-0"
|
|
@@ -89,7 +89,7 @@ StyledFieldset.defaultProps = {
|
|
|
89
89
|
const COMPONENT_ID$E = 'forms.input_label';
|
|
90
90
|
const StyledLabel = styled__default.default.label.attrs(props => ({
|
|
91
91
|
'data-garden-id': props['data-garden-id'] || COMPONENT_ID$E,
|
|
92
|
-
'data-garden-version': props['data-garden-version'] || '9.0.0-next.
|
|
92
|
+
'data-garden-version': props['data-garden-version'] || '9.0.0-next.5'
|
|
93
93
|
})).withConfig({
|
|
94
94
|
displayName: "StyledLabel",
|
|
95
95
|
componentId: "sc-2utmsz-0"
|
|
@@ -102,7 +102,7 @@ const COMPONENT_ID$D = 'forms.fieldset_legend';
|
|
|
102
102
|
const StyledLegend = styled__default.default(StyledLabel).attrs({
|
|
103
103
|
as: 'legend',
|
|
104
104
|
'data-garden-id': COMPONENT_ID$D,
|
|
105
|
-
'data-garden-version': '9.0.0-next.
|
|
105
|
+
'data-garden-version': '9.0.0-next.5'
|
|
106
106
|
}).withConfig({
|
|
107
107
|
displayName: "StyledLegend",
|
|
108
108
|
componentId: "sc-6s0zwq-0"
|
|
@@ -114,11 +114,11 @@ StyledLegend.defaultProps = {
|
|
|
114
114
|
const COMPONENT_ID$C = 'forms.input_hint';
|
|
115
115
|
const StyledHint = styled__default.default.div.attrs(props => ({
|
|
116
116
|
'data-garden-id': props['data-garden-id'] || COMPONENT_ID$C,
|
|
117
|
-
'data-garden-version': props['data-garden-version'] || '9.0.0-next.
|
|
117
|
+
'data-garden-version': props['data-garden-version'] || '9.0.0-next.5'
|
|
118
118
|
})).withConfig({
|
|
119
119
|
displayName: "StyledHint",
|
|
120
120
|
componentId: "sc-17c2wu8-0"
|
|
121
|
-
})(["direction:", ";display:block;vertical-align:middle;line-height:", ";color:", ";font-size:", ";", ";"], props => props.theme.rtl && 'rtl', props => reactTheming.getLineHeight(props.theme.space.base * 5, props.theme.fontSizes.md), props => reactTheming.
|
|
121
|
+
})(["direction:", ";display:block;vertical-align:middle;line-height:", ";color:", ";font-size:", ";", ";"], props => props.theme.rtl && 'rtl', props => reactTheming.getLineHeight(props.theme.space.base * 5, props.theme.fontSizes.md), props => reactTheming.getColorV8('neutralHue', 600, props.theme), props => props.theme.fontSizes.md, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$C, props));
|
|
122
122
|
StyledHint.defaultProps = {
|
|
123
123
|
theme: reactTheming.DEFAULT_THEME
|
|
124
124
|
};
|
|
@@ -219,7 +219,7 @@ const MessageIcon = _ref => {
|
|
|
219
219
|
const COMPONENT_ID$B = 'forms.input_message_icon';
|
|
220
220
|
const StyledMessageIcon = styled__default.default(MessageIcon).attrs({
|
|
221
221
|
'data-garden-id': COMPONENT_ID$B,
|
|
222
|
-
'data-garden-version': '9.0.0-next.
|
|
222
|
+
'data-garden-version': '9.0.0-next.5',
|
|
223
223
|
'aria-hidden': null
|
|
224
224
|
}).withConfig({
|
|
225
225
|
displayName: "StyledMessageIcon",
|
|
@@ -234,20 +234,20 @@ const validationStyles = props => {
|
|
|
234
234
|
const padding = polished.math(`${props.theme.space.base} * 2px + ${props.theme.iconSizes.md}`);
|
|
235
235
|
let color;
|
|
236
236
|
if (props.validation === 'error') {
|
|
237
|
-
color = reactTheming.
|
|
237
|
+
color = reactTheming.getColorV8('dangerHue', 600, props.theme);
|
|
238
238
|
} else if (props.validation === 'success') {
|
|
239
|
-
color = reactTheming.
|
|
239
|
+
color = reactTheming.getColorV8('successHue', 600, props.theme);
|
|
240
240
|
} else if (props.validation === 'warning') {
|
|
241
|
-
color = reactTheming.
|
|
241
|
+
color = reactTheming.getColorV8('warningHue', 700, props.theme);
|
|
242
242
|
} else {
|
|
243
|
-
color = reactTheming.
|
|
243
|
+
color = reactTheming.getColorV8('neutralHue', 700, props.theme);
|
|
244
244
|
}
|
|
245
245
|
return styled.css(["padding-", ":", ";color:", ";"], rtl ? 'right' : 'left', props.validation && padding, color);
|
|
246
246
|
};
|
|
247
247
|
const COMPONENT_ID$A = 'forms.input_message';
|
|
248
248
|
const StyledMessage = styled__default.default.div.attrs(props => ({
|
|
249
249
|
'data-garden-id': props['data-garden-id'] || COMPONENT_ID$A,
|
|
250
|
-
'data-garden-version': props['data-garden-version'] || '9.0.0-next.
|
|
250
|
+
'data-garden-version': props['data-garden-version'] || '9.0.0-next.5'
|
|
251
251
|
})).withConfig({
|
|
252
252
|
displayName: "StyledMessage",
|
|
253
253
|
componentId: "sc-30hgg7-0"
|
|
@@ -263,7 +263,7 @@ const isInvalid = validation => {
|
|
|
263
263
|
const colorStyles$a = props => {
|
|
264
264
|
const HUE = 'primaryHue';
|
|
265
265
|
const SHADE = 600;
|
|
266
|
-
const placeholderColor = reactTheming.
|
|
266
|
+
const placeholderColor = reactTheming.getColorV8('neutralHue', SHADE - 200, props.theme);
|
|
267
267
|
let borderColor;
|
|
268
268
|
let hoverBorderColor;
|
|
269
269
|
let focusBorderColor;
|
|
@@ -279,20 +279,20 @@ const colorStyles$a = props => {
|
|
|
279
279
|
} else if (props.validation === 'error') {
|
|
280
280
|
hue = 'dangerHue';
|
|
281
281
|
}
|
|
282
|
-
borderColor = reactTheming.
|
|
282
|
+
borderColor = reactTheming.getColorV8(hue, SHADE, props.theme);
|
|
283
283
|
hoverBorderColor = borderColor;
|
|
284
284
|
focusBorderColor = borderColor;
|
|
285
285
|
focusRingHue = hue;
|
|
286
286
|
} else {
|
|
287
|
-
borderColor = reactTheming.
|
|
288
|
-
hoverBorderColor = reactTheming.
|
|
287
|
+
borderColor = reactTheming.getColorV8('neutralHue', SHADE - 300, props.theme);
|
|
288
|
+
hoverBorderColor = reactTheming.getColorV8('primaryHue', SHADE, props.theme);
|
|
289
289
|
focusBorderColor = hoverBorderColor;
|
|
290
290
|
}
|
|
291
|
-
const readOnlyBackgroundColor = reactTheming.
|
|
292
|
-
const readOnlyBorderColor = reactTheming.
|
|
291
|
+
const readOnlyBackgroundColor = reactTheming.getColorV8('neutralHue', SHADE - 500, props.theme);
|
|
292
|
+
const readOnlyBorderColor = reactTheming.getColorV8('neutralHue', SHADE - 300, props.theme);
|
|
293
293
|
const disabledBackgroundColor = readOnlyBackgroundColor;
|
|
294
|
-
const disabledBorderColor = reactTheming.
|
|
295
|
-
const disabledForegroundColor = reactTheming.
|
|
294
|
+
const disabledBorderColor = reactTheming.getColorV8('neutralHue', SHADE - 400, props.theme);
|
|
295
|
+
const disabledForegroundColor = reactTheming.getColorV8('neutralHue', SHADE - 200, props.theme);
|
|
296
296
|
let controlledBorderColor = borderColor;
|
|
297
297
|
if (props.isFocused) {
|
|
298
298
|
controlledBorderColor = focusBorderColor;
|
|
@@ -337,7 +337,7 @@ const sizeStyles$c = props => {
|
|
|
337
337
|
};
|
|
338
338
|
const StyledTextInput = styled__default.default.input.attrs(props => ({
|
|
339
339
|
'data-garden-id': COMPONENT_ID$z,
|
|
340
|
-
'data-garden-version': '9.0.0-next.
|
|
340
|
+
'data-garden-version': '9.0.0-next.5',
|
|
341
341
|
'aria-invalid': isInvalid(props.validation)
|
|
342
342
|
})).withConfig({
|
|
343
343
|
displayName: "StyledTextInput",
|
|
@@ -360,7 +360,7 @@ const hiddenStyles = `
|
|
|
360
360
|
const StyledTextarea = styled__default.default(StyledTextInput).attrs({
|
|
361
361
|
as: 'textarea',
|
|
362
362
|
'data-garden-id': COMPONENT_ID$y,
|
|
363
|
-
'data-garden-version': '9.0.0-next.
|
|
363
|
+
'data-garden-version': '9.0.0-next.5'
|
|
364
364
|
}).withConfig({
|
|
365
365
|
displayName: "StyledTextarea",
|
|
366
366
|
componentId: "sc-wxschl-0"
|
|
@@ -377,7 +377,7 @@ const colorStyles$9 = props => {
|
|
|
377
377
|
} else if (props.isHovered || props.isFocused) {
|
|
378
378
|
shade = 700;
|
|
379
379
|
}
|
|
380
|
-
return styled.css(["color:", ";"], reactTheming.
|
|
380
|
+
return styled.css(["color:", ";"], reactTheming.getColorV8('neutralHue', shade, props.theme));
|
|
381
381
|
};
|
|
382
382
|
const sizeStyles$b = props => {
|
|
383
383
|
const size = props.theme.iconSizes.md;
|
|
@@ -406,7 +406,7 @@ _ref => {
|
|
|
406
406
|
return React__namespace.default.cloneElement(React.Children.only(children), props);
|
|
407
407
|
}).attrs({
|
|
408
408
|
'data-garden-id': COMPONENT_ID$x,
|
|
409
|
-
'data-garden-version': '9.0.0-next.
|
|
409
|
+
'data-garden-version': '9.0.0-next.5'
|
|
410
410
|
}).withConfig({
|
|
411
411
|
displayName: "StyledTextMediaFigure",
|
|
412
412
|
componentId: "sc-1qepknj-0"
|
|
@@ -444,7 +444,7 @@ const colorStyles$8 = props => {
|
|
|
444
444
|
shade: validation === 'warning' ? 700 : 600,
|
|
445
445
|
selector: isFocused ? '&' : '&:focus-within',
|
|
446
446
|
styles: {
|
|
447
|
-
borderColor: reactTheming.
|
|
447
|
+
borderColor: reactTheming.getColorV8(getValidationHue(validation), 600, theme)
|
|
448
448
|
}
|
|
449
449
|
}));
|
|
450
450
|
};
|
|
@@ -453,7 +453,7 @@ const StyledTextFauxInput = styled__default.default(StyledTextInput).attrs(props
|
|
|
453
453
|
'aria-readonly': props.isReadOnly,
|
|
454
454
|
'aria-disabled': props.isDisabled,
|
|
455
455
|
'data-garden-id': COMPONENT_ID$w,
|
|
456
|
-
'data-garden-version': '9.0.0-next.
|
|
456
|
+
'data-garden-version': '9.0.0-next.5'
|
|
457
457
|
})).withConfig({
|
|
458
458
|
displayName: "StyledTextFauxInput",
|
|
459
459
|
componentId: "sc-yqw7j9-0"
|
|
@@ -465,7 +465,7 @@ StyledTextFauxInput.defaultProps = {
|
|
|
465
465
|
const COMPONENT_ID$v = 'forms.media_input';
|
|
466
466
|
const StyledTextMediaInput = styled__default.default(StyledTextInput).attrs({
|
|
467
467
|
'data-garden-id': COMPONENT_ID$v,
|
|
468
|
-
'data-garden-version': '9.0.0-next.
|
|
468
|
+
'data-garden-version': '9.0.0-next.5',
|
|
469
469
|
isBare: true
|
|
470
470
|
}).withConfig({
|
|
471
471
|
displayName: "StyledTextMediaInput",
|
|
@@ -487,7 +487,7 @@ const itemStyles = props => {
|
|
|
487
487
|
};
|
|
488
488
|
const StyledInputGroup = styled__default.default.div.attrs({
|
|
489
489
|
'data-garden-id': COMPONENT_ID$u,
|
|
490
|
-
'data-garden-version': '9.0.0-next.
|
|
490
|
+
'data-garden-version': '9.0.0-next.5'
|
|
491
491
|
}).withConfig({
|
|
492
492
|
displayName: "StyledInputGroup",
|
|
493
493
|
componentId: "sc-kjh1f0-0"
|
|
@@ -505,7 +505,7 @@ const sizeStyles$a = props => {
|
|
|
505
505
|
};
|
|
506
506
|
const StyledRadioLabel = styled__default.default(StyledLabel).attrs({
|
|
507
507
|
'data-garden-id': COMPONENT_ID$t,
|
|
508
|
-
'data-garden-version': '9.0.0-next.
|
|
508
|
+
'data-garden-version': '9.0.0-next.5',
|
|
509
509
|
isRadio: true
|
|
510
510
|
}).withConfig({
|
|
511
511
|
displayName: "StyledRadioLabel",
|
|
@@ -518,7 +518,7 @@ StyledRadioLabel.defaultProps = {
|
|
|
518
518
|
const COMPONENT_ID$s = 'forms.checkbox_label';
|
|
519
519
|
const StyledCheckLabel = styled__default.default(StyledRadioLabel).attrs({
|
|
520
520
|
'data-garden-id': COMPONENT_ID$s,
|
|
521
|
-
'data-garden-version': '9.0.0-next.
|
|
521
|
+
'data-garden-version': '9.0.0-next.5'
|
|
522
522
|
}).withConfig({
|
|
523
523
|
displayName: "StyledCheckLabel",
|
|
524
524
|
componentId: "sc-x7nr1-0"
|
|
@@ -530,7 +530,7 @@ StyledCheckLabel.defaultProps = {
|
|
|
530
530
|
const COMPONENT_ID$r = 'forms.radio_hint';
|
|
531
531
|
const StyledRadioHint = styled__default.default(StyledHint).attrs({
|
|
532
532
|
'data-garden-id': COMPONENT_ID$r,
|
|
533
|
-
'data-garden-version': '9.0.0-next.
|
|
533
|
+
'data-garden-version': '9.0.0-next.5'
|
|
534
534
|
}).withConfig({
|
|
535
535
|
displayName: "StyledRadioHint",
|
|
536
536
|
componentId: "sc-eo8twg-0"
|
|
@@ -542,7 +542,7 @@ StyledRadioHint.defaultProps = {
|
|
|
542
542
|
const COMPONENT_ID$q = 'forms.checkbox_hint';
|
|
543
543
|
const StyledCheckHint = styled__default.default(StyledRadioHint).attrs({
|
|
544
544
|
'data-garden-id': COMPONENT_ID$q,
|
|
545
|
-
'data-garden-version': '9.0.0-next.
|
|
545
|
+
'data-garden-version': '9.0.0-next.5'
|
|
546
546
|
}).withConfig({
|
|
547
547
|
displayName: "StyledCheckHint",
|
|
548
548
|
componentId: "sc-1kl8e8c-0"
|
|
@@ -554,21 +554,21 @@ StyledCheckHint.defaultProps = {
|
|
|
554
554
|
const COMPONENT_ID$p = 'forms.radio';
|
|
555
555
|
const colorStyles$7 = props => {
|
|
556
556
|
const SHADE = 600;
|
|
557
|
-
const borderColor = reactTheming.
|
|
557
|
+
const borderColor = reactTheming.getColorV8('neutralHue', SHADE - 300, props.theme);
|
|
558
558
|
const backgroundColor = props.theme.colors.background;
|
|
559
559
|
const iconColor = backgroundColor;
|
|
560
|
-
const hoverBackgroundColor = reactTheming.
|
|
561
|
-
const hoverBorderColor = reactTheming.
|
|
560
|
+
const hoverBackgroundColor = reactTheming.getColorV8('primaryHue', SHADE, props.theme, 0.08);
|
|
561
|
+
const hoverBorderColor = reactTheming.getColorV8('primaryHue', SHADE, props.theme);
|
|
562
562
|
const focusBorderColor = hoverBorderColor;
|
|
563
|
-
const activeBackgroundColor = reactTheming.
|
|
563
|
+
const activeBackgroundColor = reactTheming.getColorV8('primaryHue', SHADE, props.theme, 0.2);
|
|
564
564
|
const activeBorderColor = focusBorderColor;
|
|
565
565
|
const checkedBorderColor = focusBorderColor;
|
|
566
566
|
const checkedBackgroundColor = checkedBorderColor;
|
|
567
|
-
const checkedHoverBorderColor = reactTheming.
|
|
567
|
+
const checkedHoverBorderColor = reactTheming.getColorV8('primaryHue', SHADE + 100, props.theme);
|
|
568
568
|
const checkedHoverBackgroundColor = checkedHoverBorderColor;
|
|
569
|
-
const checkedActiveBorderColor = reactTheming.
|
|
569
|
+
const checkedActiveBorderColor = reactTheming.getColorV8('primaryHue', SHADE + 200, props.theme);
|
|
570
570
|
const checkedActiveBackgroundColor = checkedActiveBorderColor;
|
|
571
|
-
const disabledBackgroundColor = reactTheming.
|
|
571
|
+
const disabledBackgroundColor = reactTheming.getColorV8('neutralHue', SHADE - 400, props.theme);
|
|
572
572
|
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({
|
|
573
573
|
theme: props.theme,
|
|
574
574
|
styles: {
|
|
@@ -589,7 +589,7 @@ const sizeStyles$9 = props => {
|
|
|
589
589
|
};
|
|
590
590
|
const StyledRadioInput = styled__default.default.input.attrs({
|
|
591
591
|
'data-garden-id': COMPONENT_ID$p,
|
|
592
|
-
'data-garden-version': '9.0.0-next.
|
|
592
|
+
'data-garden-version': '9.0.0-next.5',
|
|
593
593
|
type: 'radio'
|
|
594
594
|
}).withConfig({
|
|
595
595
|
displayName: "StyledRadioInput",
|
|
@@ -602,16 +602,16 @@ StyledRadioInput.defaultProps = {
|
|
|
602
602
|
const COMPONENT_ID$o = 'forms.checkbox';
|
|
603
603
|
const colorStyles$6 = props => {
|
|
604
604
|
const SHADE = 600;
|
|
605
|
-
const indeterminateBorderColor = reactTheming.
|
|
605
|
+
const indeterminateBorderColor = reactTheming.getColorV8('primaryHue', SHADE, props.theme);
|
|
606
606
|
const indeterminateBackgroundColor = indeterminateBorderColor;
|
|
607
|
-
const indeterminateActiveBorderColor = reactTheming.
|
|
607
|
+
const indeterminateActiveBorderColor = reactTheming.getColorV8('primaryHue', SHADE + 100, props.theme);
|
|
608
608
|
const indeterminateActiveBackgroundColor = indeterminateActiveBorderColor;
|
|
609
|
-
const indeterminateDisabledBackgroundColor = reactTheming.
|
|
609
|
+
const indeterminateDisabledBackgroundColor = reactTheming.getColorV8('neutralHue', SHADE - 400, props.theme);
|
|
610
610
|
return styled.css(["&:indeterminate ~ ", "::before{border-color:", ";background-color:", ";}&:enabled:indeterminate ~ ", ":active::before{border-color:", ";background-color:", ";}&:disabled:indeterminate ~ ", "::before{border-color:transparent;background-color:", ";}"], StyledCheckLabel, indeterminateBorderColor, indeterminateBackgroundColor, StyledCheckLabel, indeterminateActiveBorderColor, indeterminateActiveBackgroundColor, StyledCheckLabel, indeterminateDisabledBackgroundColor);
|
|
611
611
|
};
|
|
612
612
|
const StyledCheckInput = styled__default.default(StyledRadioInput).attrs({
|
|
613
613
|
'data-garden-id': COMPONENT_ID$o,
|
|
614
|
-
'data-garden-version': '9.0.0-next.
|
|
614
|
+
'data-garden-version': '9.0.0-next.5',
|
|
615
615
|
type: 'checkbox'
|
|
616
616
|
}).withConfig({
|
|
617
617
|
displayName: "StyledCheckInput",
|
|
@@ -624,7 +624,7 @@ StyledCheckInput.defaultProps = {
|
|
|
624
624
|
const COMPONENT_ID$n = 'forms.radio_message';
|
|
625
625
|
const StyledRadioMessage = styled__default.default(StyledMessage).attrs({
|
|
626
626
|
'data-garden-id': COMPONENT_ID$n,
|
|
627
|
-
'data-garden-version': '9.0.0-next.
|
|
627
|
+
'data-garden-version': '9.0.0-next.5'
|
|
628
628
|
}).withConfig({
|
|
629
629
|
displayName: "StyledRadioMessage",
|
|
630
630
|
componentId: "sc-1pmi0q8-0"
|
|
@@ -636,7 +636,7 @@ StyledRadioMessage.defaultProps = {
|
|
|
636
636
|
const COMPONENT_ID$m = 'forms.checkbox_message';
|
|
637
637
|
const StyledCheckMessage = styled__default.default(StyledRadioMessage).attrs({
|
|
638
638
|
'data-garden-id': COMPONENT_ID$m,
|
|
639
|
-
'data-garden-version': '9.0.0-next.
|
|
639
|
+
'data-garden-version': '9.0.0-next.5'
|
|
640
640
|
}).withConfig({
|
|
641
641
|
displayName: "StyledCheckMessage",
|
|
642
642
|
componentId: "sc-s4p6kd-0"
|
|
@@ -668,7 +668,7 @@ var SvgCheckSmFill = function SvgCheckSmFill(props) {
|
|
|
668
668
|
const COMPONENT_ID$l = 'forms.check_svg';
|
|
669
669
|
const StyledCheckSvg = styled__default.default(SvgCheckSmFill).attrs({
|
|
670
670
|
'data-garden-id': COMPONENT_ID$l,
|
|
671
|
-
'data-garden-version': '9.0.0-next.
|
|
671
|
+
'data-garden-version': '9.0.0-next.5'
|
|
672
672
|
}).withConfig({
|
|
673
673
|
displayName: "StyledCheckSvg",
|
|
674
674
|
componentId: "sc-fvxetk-0"
|
|
@@ -698,7 +698,7 @@ var SvgDashFill = function SvgDashFill(props) {
|
|
|
698
698
|
const COMPONENT_ID$k = 'forms.dash_svg';
|
|
699
699
|
const StyledDashSvg = styled__default.default(SvgDashFill).attrs({
|
|
700
700
|
'data-garden-id': COMPONENT_ID$k,
|
|
701
|
-
'data-garden-version': '9.0.0-next.
|
|
701
|
+
'data-garden-version': '9.0.0-next.5'
|
|
702
702
|
}).withConfig({
|
|
703
703
|
displayName: "StyledDashSvg",
|
|
704
704
|
componentId: "sc-z3vq71-0"
|
|
@@ -709,12 +709,12 @@ StyledDashSvg.defaultProps = {
|
|
|
709
709
|
|
|
710
710
|
const COMPONENT_ID$j = 'forms.file_upload';
|
|
711
711
|
const colorStyles$5 = props => {
|
|
712
|
-
const baseColor = reactTheming.
|
|
713
|
-
const hoverColor = reactTheming.
|
|
714
|
-
const activeColor = reactTheming.
|
|
715
|
-
const disabledBackgroundColor = reactTheming.
|
|
716
|
-
const disabledForegroundColor = reactTheming.
|
|
717
|
-
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.
|
|
712
|
+
const baseColor = reactTheming.getColorV8('primaryHue', 600, props.theme);
|
|
713
|
+
const hoverColor = reactTheming.getColorV8('primaryHue', 700, props.theme);
|
|
714
|
+
const activeColor = reactTheming.getColorV8('primaryHue', 800, props.theme);
|
|
715
|
+
const disabledBackgroundColor = reactTheming.getColorV8('neutralHue', 200, props.theme);
|
|
716
|
+
const disabledForegroundColor = reactTheming.getColorV8('neutralHue', 400, props.theme);
|
|
717
|
+
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.getColorV8('neutralHue', 600, props.theme), props.isDragging && polished.rgba(baseColor, 0.2), props.isDragging ? activeColor : baseColor, hoverColor, polished.rgba(baseColor, 0.08), hoverColor, reactTheming.focusStyles({
|
|
718
718
|
theme: props.theme,
|
|
719
719
|
hue: baseColor
|
|
720
720
|
}), activeColor, polished.rgba(baseColor, 0.2), activeColor, disabledForegroundColor, disabledBackgroundColor, disabledForegroundColor);
|
|
@@ -729,7 +729,7 @@ const sizeStyles$8 = props => {
|
|
|
729
729
|
};
|
|
730
730
|
const StyledFileUpload = styled__default.default.div.attrs({
|
|
731
731
|
'data-garden-id': COMPONENT_ID$j,
|
|
732
|
-
'data-garden-version': '9.0.0-next.
|
|
732
|
+
'data-garden-version': '9.0.0-next.5'
|
|
733
733
|
}).withConfig({
|
|
734
734
|
displayName: "StyledFileUpload",
|
|
735
735
|
componentId: "sc-1rodjgn-0"
|
|
@@ -741,7 +741,7 @@ StyledFileUpload.defaultProps = {
|
|
|
741
741
|
const COMPONENT_ID$i = 'forms.file.close';
|
|
742
742
|
const StyledFileClose = styled__default.default.button.attrs({
|
|
743
743
|
'data-garden-id': COMPONENT_ID$i,
|
|
744
|
-
'data-garden-version': '9.0.0-next.
|
|
744
|
+
'data-garden-version': '9.0.0-next.5'
|
|
745
745
|
}).withConfig({
|
|
746
746
|
displayName: "StyledFileClose",
|
|
747
747
|
componentId: "sc-1m31jbf-0"
|
|
@@ -756,16 +756,16 @@ const colorStyles$4 = props => {
|
|
|
756
756
|
let focusBorderColor;
|
|
757
757
|
let foregroundColor;
|
|
758
758
|
if (props.validation === 'success') {
|
|
759
|
-
borderColor = reactTheming.
|
|
759
|
+
borderColor = reactTheming.getColorV8('successHue', 600, props.theme);
|
|
760
760
|
focusBorderColor = borderColor;
|
|
761
761
|
foregroundColor = borderColor;
|
|
762
762
|
} else if (props.validation === 'error') {
|
|
763
|
-
borderColor = reactTheming.
|
|
763
|
+
borderColor = reactTheming.getColorV8('dangerHue', 600, props.theme);
|
|
764
764
|
focusBorderColor = borderColor;
|
|
765
765
|
foregroundColor = borderColor;
|
|
766
766
|
} else {
|
|
767
|
-
borderColor = reactTheming.
|
|
768
|
-
focusBorderColor = reactTheming.
|
|
767
|
+
borderColor = reactTheming.getColorV8('neutralHue', 300, props.theme);
|
|
768
|
+
focusBorderColor = reactTheming.getColorV8('primaryHue', 600, props.theme);
|
|
769
769
|
foregroundColor = props.theme.colors.foreground;
|
|
770
770
|
}
|
|
771
771
|
return styled.css(["border-color:", ";color:", ";", ""], borderColor, foregroundColor, reactTheming.focusStyles({
|
|
@@ -804,7 +804,7 @@ const sizeStyles$7 = props => {
|
|
|
804
804
|
};
|
|
805
805
|
const StyledFile = styled__default.default.div.attrs({
|
|
806
806
|
'data-garden-id': COMPONENT_ID$h,
|
|
807
|
-
'data-garden-version': '9.0.0-next.
|
|
807
|
+
'data-garden-version': '9.0.0-next.5'
|
|
808
808
|
}).withConfig({
|
|
809
809
|
displayName: "StyledFile",
|
|
810
810
|
componentId: "sc-195lzp1-0"
|
|
@@ -816,11 +816,11 @@ StyledFile.defaultProps = {
|
|
|
816
816
|
const COMPONENT_ID$g = 'forms.file.delete';
|
|
817
817
|
const StyledFileDelete = styled__default.default(StyledFileClose).attrs({
|
|
818
818
|
'data-garden-id': COMPONENT_ID$g,
|
|
819
|
-
'data-garden-version': '9.0.0-next.
|
|
819
|
+
'data-garden-version': '9.0.0-next.5'
|
|
820
820
|
}).withConfig({
|
|
821
821
|
displayName: "StyledFileDelete",
|
|
822
822
|
componentId: "sc-a8nnhx-0"
|
|
823
|
-
})(["color:", ";", ";"], props => reactTheming.
|
|
823
|
+
})(["color:", ";", ";"], props => reactTheming.getColorV8('dangerHue', 600, props.theme), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$g, props));
|
|
824
824
|
StyledFileDelete.defaultProps = {
|
|
825
825
|
theme: reactTheming.DEFAULT_THEME
|
|
826
826
|
};
|
|
@@ -836,7 +836,7 @@ const StyledFileIcon = styled__default.default(_ref => {
|
|
|
836
836
|
return React__namespace.default.cloneElement(React.Children.only(children), props);
|
|
837
837
|
}).attrs({
|
|
838
838
|
'data-garden-id': COMPONENT_ID$f,
|
|
839
|
-
'data-garden-version': '9.0.0-next.
|
|
839
|
+
'data-garden-version': '9.0.0-next.5'
|
|
840
840
|
}).withConfig({
|
|
841
841
|
displayName: "StyledFileIcon",
|
|
842
842
|
componentId: "sc-7b3q0c-0"
|
|
@@ -848,7 +848,7 @@ StyledFileIcon.defaultProps = {
|
|
|
848
848
|
const COMPONENT_ID$e = 'forms.file_list';
|
|
849
849
|
const StyledFileList = styled__default.default.ul.attrs({
|
|
850
850
|
'data-garden-id': COMPONENT_ID$e,
|
|
851
|
-
'data-garden-version': '9.0.0-next.
|
|
851
|
+
'data-garden-version': '9.0.0-next.5'
|
|
852
852
|
}).withConfig({
|
|
853
853
|
displayName: "StyledFileList",
|
|
854
854
|
componentId: "sc-gbahjg-0"
|
|
@@ -860,7 +860,7 @@ StyledFileList.defaultProps = {
|
|
|
860
860
|
const COMPONENT_ID$d = 'forms.file_list.item';
|
|
861
861
|
const StyledFileListItem = styled__default.default.li.attrs({
|
|
862
862
|
'data-garden-id': COMPONENT_ID$d,
|
|
863
|
-
'data-garden-version': '9.0.0-next.
|
|
863
|
+
'data-garden-version': '9.0.0-next.5'
|
|
864
864
|
}).withConfig({
|
|
865
865
|
displayName: "StyledFileListItem",
|
|
866
866
|
componentId: "sc-1ova3lo-0"
|
|
@@ -890,7 +890,7 @@ var SvgCircleSmFill$1 = function SvgCircleSmFill(props) {
|
|
|
890
890
|
const COMPONENT_ID$c = 'forms.radio_svg';
|
|
891
891
|
const StyledRadioSvg = styled__default.default(SvgCircleSmFill$1).attrs({
|
|
892
892
|
'data-garden-id': COMPONENT_ID$c,
|
|
893
|
-
'data-garden-version': '9.0.0-next.
|
|
893
|
+
'data-garden-version': '9.0.0-next.5'
|
|
894
894
|
}).withConfig({
|
|
895
895
|
displayName: "StyledRadioSvg",
|
|
896
896
|
componentId: "sc-1r1qtr1-0"
|
|
@@ -907,7 +907,7 @@ const sizeStyles$6 = props => {
|
|
|
907
907
|
};
|
|
908
908
|
const StyledToggleLabel = styled__default.default(StyledCheckLabel).attrs({
|
|
909
909
|
'data-garden-id': COMPONENT_ID$b,
|
|
910
|
-
'data-garden-version': '9.0.0-next.
|
|
910
|
+
'data-garden-version': '9.0.0-next.5'
|
|
911
911
|
}).withConfig({
|
|
912
912
|
displayName: "StyledToggleLabel",
|
|
913
913
|
componentId: "sc-e0asdk-0"
|
|
@@ -919,7 +919,7 @@ StyledToggleLabel.defaultProps = {
|
|
|
919
919
|
const COMPONENT_ID$a = 'forms.toggle_hint';
|
|
920
920
|
const StyledToggleHint = styled__default.default(StyledHint).attrs({
|
|
921
921
|
'data-garden-id': COMPONENT_ID$a,
|
|
922
|
-
'data-garden-version': '9.0.0-next.
|
|
922
|
+
'data-garden-version': '9.0.0-next.5'
|
|
923
923
|
}).withConfig({
|
|
924
924
|
displayName: "StyledToggleHint",
|
|
925
925
|
componentId: "sc-nziggu-0"
|
|
@@ -931,9 +931,9 @@ StyledToggleHint.defaultProps = {
|
|
|
931
931
|
const COMPONENT_ID$9 = 'forms.toggle';
|
|
932
932
|
const colorStyles$3 = props => {
|
|
933
933
|
const SHADE = 600;
|
|
934
|
-
const backgroundColor = reactTheming.
|
|
935
|
-
const hoverBackgroundColor = reactTheming.
|
|
936
|
-
const activeBackgroundColor = reactTheming.
|
|
934
|
+
const backgroundColor = reactTheming.getColorV8('neutralHue', SHADE - 100, props.theme);
|
|
935
|
+
const hoverBackgroundColor = reactTheming.getColorV8('neutralHue', SHADE, props.theme);
|
|
936
|
+
const activeBackgroundColor = reactTheming.getColorV8('neutralHue', SHADE + 100, props.theme);
|
|
937
937
|
return styled.css(["& ~ ", "::before{background-color:", ";}&:enabled ~ ", ":hover::before{background-color:", ";}&:enabled ~ ", ":active::before{background-color:", ";}"], StyledToggleLabel, backgroundColor, StyledToggleLabel, hoverBackgroundColor, StyledToggleLabel, activeBackgroundColor);
|
|
938
938
|
};
|
|
939
939
|
const sizeStyles$5 = props => {
|
|
@@ -946,7 +946,7 @@ const sizeStyles$5 = props => {
|
|
|
946
946
|
};
|
|
947
947
|
const StyledToggleInput = styled__default.default(StyledCheckInput).attrs({
|
|
948
948
|
'data-garden-id': COMPONENT_ID$9,
|
|
949
|
-
'data-garden-version': '9.0.0-next.
|
|
949
|
+
'data-garden-version': '9.0.0-next.5'
|
|
950
950
|
}).withConfig({
|
|
951
951
|
displayName: "StyledToggleInput",
|
|
952
952
|
componentId: "sc-sgp47s-0"
|
|
@@ -958,7 +958,7 @@ StyledToggleInput.defaultProps = {
|
|
|
958
958
|
const COMPONENT_ID$8 = 'forms.toggle_message';
|
|
959
959
|
const StyledToggleMessage = styled__default.default(StyledMessage).attrs({
|
|
960
960
|
'data-garden-id': COMPONENT_ID$8,
|
|
961
|
-
'data-garden-version': '9.0.0-next.
|
|
961
|
+
'data-garden-version': '9.0.0-next.5'
|
|
962
962
|
}).withConfig({
|
|
963
963
|
displayName: "StyledToggleMessage",
|
|
964
964
|
componentId: "sc-13vuvl1-0"
|
|
@@ -988,7 +988,7 @@ var SvgCircleSmFill = function SvgCircleSmFill(props) {
|
|
|
988
988
|
const COMPONENT_ID$7 = 'forms.toggle_svg';
|
|
989
989
|
const StyledToggleSvg = styled__default.default(SvgCircleSmFill).attrs({
|
|
990
990
|
'data-garden-id': COMPONENT_ID$7,
|
|
991
|
-
'data-garden-version': '9.0.0-next.
|
|
991
|
+
'data-garden-version': '9.0.0-next.5'
|
|
992
992
|
}).withConfig({
|
|
993
993
|
displayName: "StyledToggleSvg",
|
|
994
994
|
componentId: "sc-162xbyx-0"
|
|
@@ -999,7 +999,7 @@ StyledToggleSvg.defaultProps = {
|
|
|
999
999
|
|
|
1000
1000
|
const COMPONENT_ID$6 = 'forms.select';
|
|
1001
1001
|
const colorStyles$2 = props => {
|
|
1002
|
-
const color = reactTheming.
|
|
1002
|
+
const color = reactTheming.getColorV8('neutralHue', 700, props.theme);
|
|
1003
1003
|
return styled.css(["&:hover + ", ",&:focus + ", ",&:focus-visible + ", ",&[data-garden-focus-visible='true'] + ", "{color:", ";}"], StyledTextMediaFigure, StyledTextMediaFigure, StyledTextMediaFigure, StyledTextMediaFigure, color);
|
|
1004
1004
|
};
|
|
1005
1005
|
const sizeStyles$4 = props => {
|
|
@@ -1010,7 +1010,7 @@ const sizeStyles$4 = props => {
|
|
|
1010
1010
|
};
|
|
1011
1011
|
const StyledSelect = styled__default.default(StyledTextInput).attrs({
|
|
1012
1012
|
'data-garden-id': COMPONENT_ID$6,
|
|
1013
|
-
'data-garden-version': '9.0.0-next.
|
|
1013
|
+
'data-garden-version': '9.0.0-next.5',
|
|
1014
1014
|
as: 'select'
|
|
1015
1015
|
}).withConfig({
|
|
1016
1016
|
displayName: "StyledSelect",
|
|
@@ -1023,7 +1023,7 @@ StyledSelect.defaultProps = {
|
|
|
1023
1023
|
const COMPONENT_ID$5 = 'forms.select_wrapper';
|
|
1024
1024
|
const StyledSelectWrapper = styled__default.default(StyledTextFauxInput).attrs({
|
|
1025
1025
|
'data-garden-id': COMPONENT_ID$5,
|
|
1026
|
-
'data-garden-version': '9.0.0-next.
|
|
1026
|
+
'data-garden-version': '9.0.0-next.5'
|
|
1027
1027
|
}).withConfig({
|
|
1028
1028
|
displayName: "StyledSelectWrapper",
|
|
1029
1029
|
componentId: "sc-i7b6hw-0"
|
|
@@ -1079,19 +1079,19 @@ const trackLowerStyles = function (styles) {
|
|
|
1079
1079
|
};
|
|
1080
1080
|
const colorStyles$1 = props => {
|
|
1081
1081
|
const SHADE = 600;
|
|
1082
|
-
const thumbBackgroundColor = reactTheming.
|
|
1082
|
+
const thumbBackgroundColor = reactTheming.getColorV8('primaryHue', SHADE, props.theme);
|
|
1083
1083
|
const thumbBorderColor = thumbBackgroundColor;
|
|
1084
|
-
const thumbBoxShadow = props.theme.shadows.lg(polished.math(`${props.theme.space.base} * 1px`), polished.math(`${props.theme.space.base} * 2px`), reactTheming.
|
|
1084
|
+
const thumbBoxShadow = props.theme.shadows.lg(polished.math(`${props.theme.space.base} * 1px`), polished.math(`${props.theme.space.base} * 2px`), reactTheming.getColorV8('neutralHue', SHADE + 200, props.theme, 0.24));
|
|
1085
1085
|
const thumbFocusBoxShadow = reactTheming.getFocusBoxShadow({
|
|
1086
1086
|
theme: props.theme
|
|
1087
1087
|
});
|
|
1088
|
-
const thumbActiveBackgroundColor = reactTheming.
|
|
1088
|
+
const thumbActiveBackgroundColor = reactTheming.getColorV8('primaryHue', SHADE + 100, props.theme);
|
|
1089
1089
|
const thumbActiveBorderColor = thumbBorderColor;
|
|
1090
|
-
const thumbDisabledBackgroundColor = reactTheming.
|
|
1090
|
+
const thumbDisabledBackgroundColor = reactTheming.getColorV8('neutralHue', SHADE - 300, props.theme);
|
|
1091
1091
|
const thumbDisabledBorderColor = thumbDisabledBackgroundColor;
|
|
1092
1092
|
const thumbHoverBackgroundColor = thumbActiveBackgroundColor;
|
|
1093
1093
|
const thumbHoverBorderColor = thumbHoverBackgroundColor;
|
|
1094
|
-
const trackBackgroundColor = reactTheming.
|
|
1094
|
+
const trackBackgroundColor = reactTheming.getColorV8('neutralHue', SHADE - 400, props.theme);
|
|
1095
1095
|
const trackLowerBackgroundColor = props.hasLowerTrack ? thumbBackgroundColor : '';
|
|
1096
1096
|
const trackBackgroundImage = props.hasLowerTrack ? `linear-gradient(${trackLowerBackgroundColor}, ${trackLowerBackgroundColor})` : '';
|
|
1097
1097
|
const trackDisabledLowerBackgroundColor = props.hasLowerTrack ? thumbDisabledBackgroundColor : '';
|
|
@@ -1148,7 +1148,7 @@ const sizeStyles$3 = props => {
|
|
|
1148
1148
|
};
|
|
1149
1149
|
const StyledRangeInput = styled__default.default.input.attrs(props => ({
|
|
1150
1150
|
'data-garden-id': COMPONENT_ID$4,
|
|
1151
|
-
'data-garden-version': '9.0.0-next.
|
|
1151
|
+
'data-garden-version': '9.0.0-next.5',
|
|
1152
1152
|
type: 'range',
|
|
1153
1153
|
style: {
|
|
1154
1154
|
backgroundSize: props.hasLowerTrack && props.backgroundSize
|
|
@@ -1196,7 +1196,7 @@ const sizeStyles$2 = props => {
|
|
|
1196
1196
|
};
|
|
1197
1197
|
const StyledTileIcon = styled__default.default.span.attrs({
|
|
1198
1198
|
'data-garden-id': COMPONENT_ID$3,
|
|
1199
|
-
'data-garden-version': '9.0.0-next.
|
|
1199
|
+
'data-garden-version': '9.0.0-next.5'
|
|
1200
1200
|
}).withConfig({
|
|
1201
1201
|
displayName: "StyledTileIcon",
|
|
1202
1202
|
componentId: "sc-1wazhg4-0"
|
|
@@ -1208,25 +1208,25 @@ StyledTileIcon.defaultProps = {
|
|
|
1208
1208
|
const COMPONENT_ID$2 = 'forms.tile';
|
|
1209
1209
|
const colorStyles = props => {
|
|
1210
1210
|
const SHADE = 600;
|
|
1211
|
-
const iconColor = reactTheming.
|
|
1212
|
-
const color = reactTheming.
|
|
1213
|
-
const borderColor = reactTheming.
|
|
1214
|
-
const hoverBackgroundColor = reactTheming.
|
|
1215
|
-
const hoverBorderColor = reactTheming.
|
|
1211
|
+
const iconColor = reactTheming.getColorV8('neutralHue', SHADE, props.theme);
|
|
1212
|
+
const color = reactTheming.getColorV8('neutralHue', SHADE + 200, props.theme);
|
|
1213
|
+
const borderColor = reactTheming.getColorV8('neutralHue', SHADE - 300, props.theme);
|
|
1214
|
+
const hoverBackgroundColor = reactTheming.getColorV8('primaryHue', SHADE, props.theme, 0.08);
|
|
1215
|
+
const hoverBorderColor = reactTheming.getColorV8('primaryHue', SHADE, props.theme);
|
|
1216
1216
|
const focusBorderColor = hoverBorderColor;
|
|
1217
|
-
const activeBackgroundColor = reactTheming.
|
|
1217
|
+
const activeBackgroundColor = reactTheming.getColorV8('primaryHue', SHADE, props.theme, 0.2);
|
|
1218
1218
|
const activeBorderColor = focusBorderColor;
|
|
1219
|
-
const disabledBackgroundColor = reactTheming.
|
|
1220
|
-
const disabledBorderColor = reactTheming.
|
|
1221
|
-
const disabledColor = reactTheming.
|
|
1219
|
+
const disabledBackgroundColor = reactTheming.getColorV8('neutralHue', SHADE - 500, props.theme);
|
|
1220
|
+
const disabledBorderColor = reactTheming.getColorV8('neutralHue', SHADE - 400, props.theme);
|
|
1221
|
+
const disabledColor = reactTheming.getColorV8('neutralHue', SHADE - 200, props.theme);
|
|
1222
1222
|
const selectedBorderColor = focusBorderColor;
|
|
1223
1223
|
const selectedBackgroundColor = selectedBorderColor;
|
|
1224
|
-
const selectedHoverBorderColor = reactTheming.
|
|
1224
|
+
const selectedHoverBorderColor = reactTheming.getColorV8('primaryHue', SHADE + 100, props.theme);
|
|
1225
1225
|
const selectedHoverBackgroundColor = selectedHoverBorderColor;
|
|
1226
|
-
const selectedActiveBorderColor = reactTheming.
|
|
1226
|
+
const selectedActiveBorderColor = reactTheming.getColorV8('primaryHue', SHADE + 200, props.theme);
|
|
1227
1227
|
const selectedActiveBackgroundColor = selectedActiveBorderColor;
|
|
1228
1228
|
const selectedDisabledBackgroundColor = disabledBorderColor;
|
|
1229
|
-
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.
|
|
1229
|
+
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.getColorV8('neutralHue', SHADE - 300, props.theme), borderColor, props.theme.colors.background, color, StyledTileIcon, iconColor, hoverBorderColor, hoverBackgroundColor, StyledTileIcon, color, reactTheming.focusStyles({
|
|
1230
1230
|
theme: props.theme,
|
|
1231
1231
|
hue: focusBorderColor,
|
|
1232
1232
|
styles: {
|
|
@@ -1237,7 +1237,7 @@ const colorStyles = props => {
|
|
|
1237
1237
|
};
|
|
1238
1238
|
const StyledTile = styled__default.default.label.attrs(props => ({
|
|
1239
1239
|
'data-garden-id': COMPONENT_ID$2,
|
|
1240
|
-
'data-garden-version': '9.0.0-next.
|
|
1240
|
+
'data-garden-version': '9.0.0-next.5',
|
|
1241
1241
|
'data-garden-selected': props.isSelected
|
|
1242
1242
|
})).withConfig({
|
|
1243
1243
|
displayName: "StyledTile",
|
|
@@ -1261,7 +1261,7 @@ const sizeStyles$1 = props => {
|
|
|
1261
1261
|
};
|
|
1262
1262
|
const StyledTileDescription = styled__default.default.span.attrs({
|
|
1263
1263
|
'data-garden-id': COMPONENT_ID$1,
|
|
1264
|
-
'data-garden-version': '9.0.0-next.
|
|
1264
|
+
'data-garden-version': '9.0.0-next.5'
|
|
1265
1265
|
}).withConfig({
|
|
1266
1266
|
displayName: "StyledTileDescription",
|
|
1267
1267
|
componentId: "sc-xfuu7u-0"
|
|
@@ -1294,7 +1294,7 @@ const sizeStyles = props => {
|
|
|
1294
1294
|
};
|
|
1295
1295
|
const StyledTileLabel = styled__default.default.span.attrs({
|
|
1296
1296
|
'data-garden-id': COMPONENT_ID,
|
|
1297
|
-
'data-garden-version': '9.0.0-next.
|
|
1297
|
+
'data-garden-version': '9.0.0-next.5'
|
|
1298
1298
|
}).withConfig({
|
|
1299
1299
|
displayName: "StyledTileLabel",
|
|
1300
1300
|
componentId: "sc-1mypv27-0"
|
|
@@ -1303,73 +1303,6 @@ StyledTileLabel.defaultProps = {
|
|
|
1303
1303
|
theme: reactTheming.DEFAULT_THEME
|
|
1304
1304
|
};
|
|
1305
1305
|
|
|
1306
|
-
const Field = React__namespace.default.forwardRef((props, ref) => {
|
|
1307
|
-
const [hasHint, setHasHint] = React.useState(false);
|
|
1308
|
-
const [hasMessage, setHasMessage] = React.useState(false);
|
|
1309
|
-
const [isLabelActive, setIsLabelActive] = React.useState(false);
|
|
1310
|
-
const [isLabelHovered, setIsLabelHovered] = React.useState(false);
|
|
1311
|
-
const {
|
|
1312
|
-
getInputProps,
|
|
1313
|
-
getMessageProps,
|
|
1314
|
-
...propGetters
|
|
1315
|
-
} = containerField.useField({
|
|
1316
|
-
idPrefix: props.id,
|
|
1317
|
-
hasHint,
|
|
1318
|
-
hasMessage
|
|
1319
|
-
});
|
|
1320
|
-
const fieldProps = React.useMemo(() => ({
|
|
1321
|
-
...propGetters,
|
|
1322
|
-
getInputProps,
|
|
1323
|
-
getMessageProps,
|
|
1324
|
-
isLabelActive,
|
|
1325
|
-
setIsLabelActive,
|
|
1326
|
-
isLabelHovered,
|
|
1327
|
-
setIsLabelHovered,
|
|
1328
|
-
hasHint,
|
|
1329
|
-
setHasHint,
|
|
1330
|
-
hasMessage,
|
|
1331
|
-
setHasMessage
|
|
1332
|
-
}), [propGetters, getInputProps, getMessageProps, isLabelActive, isLabelHovered, hasHint, hasMessage]);
|
|
1333
|
-
return React__namespace.default.createElement(FieldContext.Provider, {
|
|
1334
|
-
value: fieldProps
|
|
1335
|
-
}, React__namespace.default.createElement(StyledField, _extends$t({}, props, {
|
|
1336
|
-
ref: ref
|
|
1337
|
-
})));
|
|
1338
|
-
});
|
|
1339
|
-
Field.displayName = 'Field';
|
|
1340
|
-
|
|
1341
|
-
const FieldsetContext = React.createContext(undefined);
|
|
1342
|
-
const useFieldsetContext = () => {
|
|
1343
|
-
const fieldsetContext = React.useContext(FieldsetContext);
|
|
1344
|
-
return fieldsetContext;
|
|
1345
|
-
};
|
|
1346
|
-
|
|
1347
|
-
const LegendComponent = React.forwardRef((props, ref) => {
|
|
1348
|
-
const fieldsetContext = useFieldsetContext();
|
|
1349
|
-
return React__namespace.default.createElement(StyledLegend, _extends$t({}, props, fieldsetContext, {
|
|
1350
|
-
ref: ref
|
|
1351
|
-
}));
|
|
1352
|
-
});
|
|
1353
|
-
LegendComponent.displayName = 'Fieldset.Legend';
|
|
1354
|
-
const Legend = LegendComponent;
|
|
1355
|
-
|
|
1356
|
-
const FieldsetComponent = React.forwardRef((props, ref) => {
|
|
1357
|
-
const fieldsetContext = React.useMemo(() => ({
|
|
1358
|
-
isCompact: props.isCompact
|
|
1359
|
-
}), [props.isCompact]);
|
|
1360
|
-
return React__namespace.default.createElement(FieldsetContext.Provider, {
|
|
1361
|
-
value: fieldsetContext
|
|
1362
|
-
}, React__namespace.default.createElement(StyledFieldset, _extends$t({}, props, {
|
|
1363
|
-
ref: ref
|
|
1364
|
-
})));
|
|
1365
|
-
});
|
|
1366
|
-
FieldsetComponent.displayName = 'Fieldset';
|
|
1367
|
-
FieldsetComponent.propTypes = {
|
|
1368
|
-
isCompact: PropTypes__default.default.bool
|
|
1369
|
-
};
|
|
1370
|
-
const Fieldset = FieldsetComponent;
|
|
1371
|
-
Fieldset.Legend = Legend;
|
|
1372
|
-
|
|
1373
1306
|
const InputContext = React.createContext(undefined);
|
|
1374
1307
|
const useInputContext = () => {
|
|
1375
1308
|
return React.useContext(InputContext);
|
|
@@ -1412,6 +1345,71 @@ const Hint = React__namespace.default.forwardRef((props, ref) => {
|
|
|
1412
1345
|
});
|
|
1413
1346
|
Hint.displayName = 'Hint';
|
|
1414
1347
|
|
|
1348
|
+
const VALIDATION = ['success', 'warning', 'error'];
|
|
1349
|
+
const FILE_VALIDATION = ['success', 'error'];
|
|
1350
|
+
const FILE_TYPE = ['pdf', 'zip', 'image', 'document', 'spreadsheet', 'presentation', 'generic'];
|
|
1351
|
+
|
|
1352
|
+
const Message = React__namespace.default.forwardRef((_ref, ref) => {
|
|
1353
|
+
let {
|
|
1354
|
+
validation,
|
|
1355
|
+
validationLabel,
|
|
1356
|
+
children,
|
|
1357
|
+
...props
|
|
1358
|
+
} = _ref;
|
|
1359
|
+
const {
|
|
1360
|
+
hasMessage,
|
|
1361
|
+
setHasMessage,
|
|
1362
|
+
getMessageProps
|
|
1363
|
+
} = useFieldContext() || {};
|
|
1364
|
+
const type = useInputContext();
|
|
1365
|
+
React.useEffect(() => {
|
|
1366
|
+
if (!hasMessage && setHasMessage) {
|
|
1367
|
+
setHasMessage(true);
|
|
1368
|
+
}
|
|
1369
|
+
return () => {
|
|
1370
|
+
if (hasMessage && setHasMessage) {
|
|
1371
|
+
setHasMessage(false);
|
|
1372
|
+
}
|
|
1373
|
+
};
|
|
1374
|
+
}, [hasMessage, setHasMessage]);
|
|
1375
|
+
let MessageComponent;
|
|
1376
|
+
if (type === 'checkbox') {
|
|
1377
|
+
MessageComponent = StyledCheckMessage;
|
|
1378
|
+
} else if (type === 'radio') {
|
|
1379
|
+
MessageComponent = StyledRadioMessage;
|
|
1380
|
+
} else if (type === 'toggle') {
|
|
1381
|
+
MessageComponent = StyledToggleMessage;
|
|
1382
|
+
} else {
|
|
1383
|
+
MessageComponent = StyledMessage;
|
|
1384
|
+
}
|
|
1385
|
+
let combinedProps = {
|
|
1386
|
+
validation,
|
|
1387
|
+
validationLabel,
|
|
1388
|
+
...props
|
|
1389
|
+
};
|
|
1390
|
+
if (getMessageProps) {
|
|
1391
|
+
combinedProps = getMessageProps(combinedProps);
|
|
1392
|
+
}
|
|
1393
|
+
const ariaLabel = reactTheming.useText(Message, combinedProps, 'validationLabel', validation, validation !== undefined);
|
|
1394
|
+
return React__namespace.default.createElement(MessageComponent, _extends$t({
|
|
1395
|
+
ref: ref
|
|
1396
|
+
}, combinedProps), validation && React__namespace.default.createElement(StyledMessageIcon, {
|
|
1397
|
+
validation: validation,
|
|
1398
|
+
"aria-label": ariaLabel
|
|
1399
|
+
}), children);
|
|
1400
|
+
});
|
|
1401
|
+
Message.displayName = 'Message';
|
|
1402
|
+
Message.propTypes = {
|
|
1403
|
+
validation: PropTypes__default.default.oneOf(VALIDATION),
|
|
1404
|
+
validationLabel: PropTypes__default.default.string
|
|
1405
|
+
};
|
|
1406
|
+
|
|
1407
|
+
const FieldsetContext = React.createContext(undefined);
|
|
1408
|
+
const useFieldsetContext = () => {
|
|
1409
|
+
const fieldsetContext = React.useContext(FieldsetContext);
|
|
1410
|
+
return fieldsetContext;
|
|
1411
|
+
};
|
|
1412
|
+
|
|
1415
1413
|
const Label$1 = React__namespace.default.forwardRef((props, ref) => {
|
|
1416
1414
|
const fieldContext = useFieldContext();
|
|
1417
1415
|
const fieldsetContext = useFieldsetContext();
|
|
@@ -1488,64 +1486,70 @@ Label$1.propTypes = {
|
|
|
1488
1486
|
isRegular: PropTypes__default.default.bool
|
|
1489
1487
|
};
|
|
1490
1488
|
|
|
1491
|
-
const
|
|
1492
|
-
const
|
|
1493
|
-
const
|
|
1494
|
-
|
|
1495
|
-
const
|
|
1496
|
-
let {
|
|
1497
|
-
validation,
|
|
1498
|
-
validationLabel,
|
|
1499
|
-
children,
|
|
1500
|
-
...props
|
|
1501
|
-
} = _ref;
|
|
1489
|
+
const FieldComponent = React__namespace.default.forwardRef((props, ref) => {
|
|
1490
|
+
const [hasHint, setHasHint] = React.useState(false);
|
|
1491
|
+
const [hasMessage, setHasMessage] = React.useState(false);
|
|
1492
|
+
const [isLabelActive, setIsLabelActive] = React.useState(false);
|
|
1493
|
+
const [isLabelHovered, setIsLabelHovered] = React.useState(false);
|
|
1502
1494
|
const {
|
|
1495
|
+
getInputProps,
|
|
1496
|
+
getMessageProps,
|
|
1497
|
+
...propGetters
|
|
1498
|
+
} = containerField.useField({
|
|
1499
|
+
idPrefix: props.id,
|
|
1500
|
+
hasHint,
|
|
1501
|
+
hasMessage
|
|
1502
|
+
});
|
|
1503
|
+
const fieldProps = React.useMemo(() => ({
|
|
1504
|
+
...propGetters,
|
|
1505
|
+
getInputProps,
|
|
1506
|
+
getMessageProps,
|
|
1507
|
+
isLabelActive,
|
|
1508
|
+
setIsLabelActive,
|
|
1509
|
+
isLabelHovered,
|
|
1510
|
+
setIsLabelHovered,
|
|
1511
|
+
hasHint,
|
|
1512
|
+
setHasHint,
|
|
1503
1513
|
hasMessage,
|
|
1504
|
-
setHasMessage
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
if (!hasMessage && setHasMessage) {
|
|
1510
|
-
setHasMessage(true);
|
|
1511
|
-
}
|
|
1512
|
-
return () => {
|
|
1513
|
-
if (hasMessage && setHasMessage) {
|
|
1514
|
-
setHasMessage(false);
|
|
1515
|
-
}
|
|
1516
|
-
};
|
|
1517
|
-
}, [hasMessage, setHasMessage]);
|
|
1518
|
-
let MessageComponent;
|
|
1519
|
-
if (type === 'checkbox') {
|
|
1520
|
-
MessageComponent = StyledCheckMessage;
|
|
1521
|
-
} else if (type === 'radio') {
|
|
1522
|
-
MessageComponent = StyledRadioMessage;
|
|
1523
|
-
} else if (type === 'toggle') {
|
|
1524
|
-
MessageComponent = StyledToggleMessage;
|
|
1525
|
-
} else {
|
|
1526
|
-
MessageComponent = StyledMessage;
|
|
1527
|
-
}
|
|
1528
|
-
let combinedProps = {
|
|
1529
|
-
validation,
|
|
1530
|
-
validationLabel,
|
|
1531
|
-
...props
|
|
1532
|
-
};
|
|
1533
|
-
if (getMessageProps) {
|
|
1534
|
-
combinedProps = getMessageProps(combinedProps);
|
|
1535
|
-
}
|
|
1536
|
-
const ariaLabel = reactTheming.useText(Message, combinedProps, 'validationLabel', validation, validation !== undefined);
|
|
1537
|
-
return React__namespace.default.createElement(MessageComponent, _extends$t({
|
|
1514
|
+
setHasMessage
|
|
1515
|
+
}), [propGetters, getInputProps, getMessageProps, isLabelActive, isLabelHovered, hasHint, hasMessage]);
|
|
1516
|
+
return React__namespace.default.createElement(FieldContext.Provider, {
|
|
1517
|
+
value: fieldProps
|
|
1518
|
+
}, React__namespace.default.createElement(StyledField, _extends$t({}, props, {
|
|
1538
1519
|
ref: ref
|
|
1539
|
-
}
|
|
1540
|
-
validation: validation,
|
|
1541
|
-
"aria-label": ariaLabel
|
|
1542
|
-
}), children);
|
|
1520
|
+
})));
|
|
1543
1521
|
});
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1522
|
+
FieldComponent.displayName = 'Field';
|
|
1523
|
+
const Field = FieldComponent;
|
|
1524
|
+
Field.Hint = Hint;
|
|
1525
|
+
Field.Label = Label$1;
|
|
1526
|
+
Field.Message = Message;
|
|
1527
|
+
|
|
1528
|
+
const LegendComponent = React.forwardRef((props, ref) => {
|
|
1529
|
+
const fieldsetContext = useFieldsetContext();
|
|
1530
|
+
return React__namespace.default.createElement(StyledLegend, _extends$t({}, props, fieldsetContext, {
|
|
1531
|
+
ref: ref
|
|
1532
|
+
}));
|
|
1533
|
+
});
|
|
1534
|
+
LegendComponent.displayName = 'Fieldset.Legend';
|
|
1535
|
+
const Legend = LegendComponent;
|
|
1536
|
+
|
|
1537
|
+
const FieldsetComponent = React.forwardRef((props, ref) => {
|
|
1538
|
+
const fieldsetContext = React.useMemo(() => ({
|
|
1539
|
+
isCompact: props.isCompact
|
|
1540
|
+
}), [props.isCompact]);
|
|
1541
|
+
return React__namespace.default.createElement(FieldsetContext.Provider, {
|
|
1542
|
+
value: fieldsetContext
|
|
1543
|
+
}, React__namespace.default.createElement(StyledFieldset, _extends$t({}, props, {
|
|
1544
|
+
ref: ref
|
|
1545
|
+
})));
|
|
1546
|
+
});
|
|
1547
|
+
FieldsetComponent.displayName = 'Fieldset';
|
|
1548
|
+
FieldsetComponent.propTypes = {
|
|
1549
|
+
isCompact: PropTypes__default.default.bool
|
|
1548
1550
|
};
|
|
1551
|
+
const Fieldset = FieldsetComponent;
|
|
1552
|
+
Fieldset.Legend = Legend;
|
|
1549
1553
|
|
|
1550
1554
|
const Checkbox = React__namespace.default.forwardRef((_ref, ref) => {
|
|
1551
1555
|
let {
|