@zendeskgarden/react-forms 9.0.0-next.1 → 9.0.0-next.10
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/esm/elements/Checkbox.js +97 -0
- package/dist/esm/elements/FileUpload.js +75 -0
- package/dist/esm/elements/Input.js +93 -0
- package/dist/esm/elements/MediaInput.js +156 -0
- package/dist/esm/elements/Radio.js +81 -0
- package/dist/esm/elements/Range.js +108 -0
- package/dist/esm/elements/Select.js +97 -0
- package/dist/esm/elements/Textarea.js +170 -0
- package/dist/esm/elements/Toggle.js +81 -0
- package/dist/esm/elements/common/Field.js +97 -0
- package/dist/esm/elements/common/Fieldset.js +73 -0
- package/dist/esm/elements/common/Hint.js +92 -0
- package/dist/esm/elements/common/Label.js +134 -0
- package/dist/esm/elements/common/Legend.js +63 -0
- package/dist/esm/elements/common/Message.js +113 -0
- package/dist/esm/elements/faux-input/FauxInput.js +100 -0
- package/dist/esm/elements/faux-input/components/EndIcon.js +68 -0
- package/dist/esm/elements/faux-input/components/StartIcon.js +68 -0
- package/dist/esm/elements/file-list/FileList.js +66 -0
- package/dist/esm/elements/file-list/components/Close.js +75 -0
- package/dist/esm/elements/file-list/components/Delete.js +75 -0
- package/dist/esm/elements/file-list/components/File.js +94 -0
- package/dist/esm/elements/file-list/components/Item.js +64 -0
- package/dist/esm/elements/file-list/utils.js +50 -0
- package/dist/esm/elements/input-group/InputGroup.js +75 -0
- package/dist/esm/elements/tiles/Tiles.js +64 -0
- package/dist/esm/elements/tiles/components/Description.js +64 -0
- package/dist/esm/elements/tiles/components/Icon.js +64 -0
- package/dist/esm/elements/tiles/components/Label.js +73 -0
- package/dist/esm/elements/tiles/components/Tile.js +91 -0
- package/dist/esm/index.js +26 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/12/check-circle-stroke.svg.js +33 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/12/check-sm-fill.svg.js +29 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/12/circle-sm-fill.svg.js +27 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/12/dash-fill.svg.js +27 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/12/file-document-stroke.svg.js +27 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/12/file-error-stroke.svg.js +27 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/12/file-generic-stroke.svg.js +26 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/12/file-image-stroke.svg.js +33 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/12/file-pdf-stroke.svg.js +35 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/12/file-presentation-stroke.svg.js +26 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/12/file-spreadsheet-stroke.svg.js +27 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/12/file-zip-stroke.svg.js +27 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/12/trash-stroke.svg.js +27 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/12/x-stroke.svg.js +26 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/alert-error-stroke.svg.js +37 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/alert-warning-stroke.svg.js +32 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/check-circle-stroke.svg.js +33 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/chevron-down-stroke.svg.js +25 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/circle-sm-fill.svg.js +27 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/file-document-stroke.svg.js +27 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/file-error-stroke.svg.js +27 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/file-generic-stroke.svg.js +26 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/file-image-stroke.svg.js +32 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/file-pdf-stroke.svg.js +35 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/file-presentation-stroke.svg.js +26 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/file-spreadsheet-stroke.svg.js +27 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/file-zip-stroke.svg.js +27 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/trash-stroke.svg.js +27 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/x-stroke.svg.js +26 -0
- package/dist/esm/styled/checkbox/StyledCheckHint.js +23 -0
- package/dist/esm/styled/checkbox/StyledCheckInput.js +34 -0
- package/dist/esm/styled/checkbox/StyledCheckLabel.js +23 -0
- package/dist/esm/styled/checkbox/StyledCheckMessage.js +23 -0
- package/dist/esm/styled/checkbox/StyledCheckSvg.js +25 -0
- package/dist/esm/styled/checkbox/StyledDashSvg.js +25 -0
- package/dist/esm/styled/common/StyledField.js +22 -0
- package/dist/esm/styled/common/StyledFieldset.js +24 -0
- package/dist/esm/styled/common/StyledHint.js +22 -0
- package/dist/esm/styled/common/StyledLabel.js +23 -0
- package/dist/esm/styled/common/StyledLegend.js +24 -0
- package/dist/esm/styled/common/StyledMessage.js +40 -0
- package/dist/esm/styled/common/StyledMessageIcon.js +45 -0
- package/dist/esm/styled/file-list/StyledFile.js +76 -0
- package/dist/esm/styled/file-list/StyledFileClose.js +22 -0
- package/dist/esm/styled/file-list/StyledFileDelete.js +23 -0
- package/dist/esm/styled/file-list/StyledFileIcon.js +22 -0
- package/dist/esm/styled/file-list/StyledFileList.js +22 -0
- package/dist/esm/styled/file-list/StyledFileListItem.js +24 -0
- package/dist/esm/styled/file-upload/StyledFileUpload.js +47 -0
- package/dist/esm/styled/input-group/StyledInputGroup.js +35 -0
- package/dist/esm/styled/radio/StyledRadioHint.js +24 -0
- package/dist/esm/styled/radio/StyledRadioInput.js +61 -0
- package/dist/esm/styled/radio/StyledRadioLabel.js +30 -0
- package/dist/esm/styled/radio/StyledRadioMessage.js +24 -0
- package/dist/esm/styled/radio/StyledRadioSvg.js +25 -0
- package/dist/esm/styled/range/StyledRangeInput.js +160 -0
- package/dist/esm/styled/select/StyledSelect.js +36 -0
- package/dist/esm/styled/select/StyledSelectWrapper.js +24 -0
- package/dist/esm/styled/text/StyledTextFauxInput.js +61 -0
- package/dist/esm/styled/text/StyledTextInput.js +107 -0
- package/dist/esm/styled/text/StyledTextMediaFigure.js +43 -0
- package/dist/esm/styled/text/StyledTextMediaInput.js +24 -0
- package/dist/esm/styled/text/StyledTextarea.js +33 -0
- package/dist/esm/styled/tiles/StyledTile.js +55 -0
- package/dist/esm/styled/tiles/StyledTileDescription.js +34 -0
- package/dist/esm/styled/tiles/StyledTileIcon.js +38 -0
- package/dist/esm/styled/tiles/StyledTileInput.js +18 -0
- package/dist/esm/styled/tiles/StyledTileLabel.js +36 -0
- package/dist/esm/styled/toggle/StyledToggleHint.js +24 -0
- package/dist/esm/styled/toggle/StyledToggleInput.js +40 -0
- package/dist/esm/styled/toggle/StyledToggleLabel.js +28 -0
- package/dist/esm/styled/toggle/StyledToggleMessage.js +25 -0
- package/dist/esm/styled/toggle/StyledToggleSvg.js +23 -0
- package/dist/esm/types/index.js +11 -0
- package/dist/esm/utils/useFieldContext.js +15 -0
- package/dist/esm/utils/useFieldsetContext.js +15 -0
- package/dist/esm/utils/useFileContext.js +14 -0
- package/dist/esm/utils/useInputContext.js +14 -0
- package/dist/esm/utils/useInputGroupContext.js +14 -0
- package/dist/esm/utils/useTilesContext.js +14 -0
- package/dist/index.cjs.js +443 -654
- package/dist/typings/elements/common/Field.d.ts +10 -9
- 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/dist/typings/elements/faux-input/FauxInput.d.ts +1 -11
- package/dist/typings/elements/faux-input/components/EndIcon.d.ts +1 -1
- package/dist/typings/elements/faux-input/components/StartIcon.d.ts +1 -1
- package/dist/typings/index.d.ts +3 -4
- package/dist/typings/styled/file-list/StyledFileIcon.d.ts +2 -2
- package/dist/typings/styled/index.d.ts +0 -4
- package/dist/typings/styled/select/StyledSelect.d.ts +1 -1
- package/dist/typings/styled/text/StyledTextMediaFigure.d.ts +7 -7
- package/dist/typings/styled/text/StyledTextarea.d.ts +1 -1
- package/dist/typings/types/index.d.ts +3 -30
- package/dist/typings/utils/useFieldContext.d.ts +1 -2
- package/package.json +6 -7
- package/dist/index.esm.js +0 -2921
- package/dist/typings/elements/MultiThumbRange.d.ts +0 -14
- package/dist/typings/styled/range/StyledSlider.d.ts +0 -10
- package/dist/typings/styled/range/StyledSliderThumb.d.ts +0 -13
- package/dist/typings/styled/range/StyledSliderTrack.d.ts +0 -14
- package/dist/typings/styled/range/StyledSliderTrackRail.d.ts +0 -11
package/dist/index.cjs.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
* Copyright Zendesk, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
+
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
*/
|
|
8
7
|
'use strict';
|
|
9
8
|
|
|
10
9
|
var React = require('react');
|
|
@@ -15,7 +14,6 @@ var polished = require('polished');
|
|
|
15
14
|
var PropTypes = require('prop-types');
|
|
16
15
|
var containerUtilities = require('@zendeskgarden/container-utilities');
|
|
17
16
|
var reactMergeRefs = require('react-merge-refs');
|
|
18
|
-
var containerSlider = require('@zendeskgarden/container-slider');
|
|
19
17
|
|
|
20
18
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
21
19
|
|
|
@@ -41,85 +39,70 @@ var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
|
41
39
|
var styled__default = /*#__PURE__*/_interopDefault(styled);
|
|
42
40
|
var PropTypes__default = /*#__PURE__*/_interopDefault(PropTypes);
|
|
43
41
|
|
|
44
|
-
function _extends$t() {
|
|
45
|
-
_extends$t = Object.assign ? Object.assign.bind() : function (target) {
|
|
46
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
47
|
-
var source = arguments[i];
|
|
48
|
-
for (var key in source) {
|
|
49
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
50
|
-
target[key] = source[key];
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
return target;
|
|
55
|
-
};
|
|
56
|
-
return _extends$t.apply(this, arguments);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
42
|
const FieldContext = React.createContext(undefined);
|
|
60
43
|
const useFieldContext = () => {
|
|
61
44
|
const fieldContext = React.useContext(FieldContext);
|
|
62
45
|
return fieldContext;
|
|
63
46
|
};
|
|
64
47
|
|
|
65
|
-
const COMPONENT_ID$
|
|
48
|
+
const COMPONENT_ID$G = 'forms.field';
|
|
66
49
|
const StyledField = styled__default.default.div.attrs({
|
|
67
|
-
'data-garden-id': COMPONENT_ID$
|
|
68
|
-
'data-garden-version': '9.0.0-next.
|
|
50
|
+
'data-garden-id': COMPONENT_ID$G,
|
|
51
|
+
'data-garden-version': '9.0.0-next.10'
|
|
69
52
|
}).withConfig({
|
|
70
53
|
displayName: "StyledField",
|
|
71
54
|
componentId: "sc-12gzfsu-0"
|
|
72
|
-
})(["position:relative;direction:", ";margin:0;border:0;padding:0;font-size:0;", ";"], props => props.theme.rtl ? 'rtl' : 'ltr', props => reactTheming.retrieveComponentStyles(COMPONENT_ID$
|
|
55
|
+
})(["position:relative;direction:", ";margin:0;border:0;padding:0;font-size:0;", ";"], props => props.theme.rtl ? 'rtl' : 'ltr', props => reactTheming.retrieveComponentStyles(COMPONENT_ID$G, props));
|
|
73
56
|
StyledField.defaultProps = {
|
|
74
57
|
theme: reactTheming.DEFAULT_THEME
|
|
75
58
|
};
|
|
76
59
|
|
|
77
|
-
const COMPONENT_ID$
|
|
60
|
+
const COMPONENT_ID$F = 'forms.fieldset';
|
|
78
61
|
const StyledFieldset = styled__default.default(StyledField).attrs({
|
|
79
62
|
as: 'fieldset',
|
|
80
|
-
'data-garden-id': COMPONENT_ID$
|
|
81
|
-
'data-garden-version': '9.0.0-next.
|
|
63
|
+
'data-garden-id': COMPONENT_ID$F,
|
|
64
|
+
'data-garden-version': '9.0.0-next.10'
|
|
82
65
|
}).withConfig({
|
|
83
66
|
displayName: "StyledFieldset",
|
|
84
67
|
componentId: "sc-1vr4mxv-0"
|
|
85
|
-
})(["", "{margin-top:", "px;}", ";"], StyledField, props => props.theme.space.base * (props.isCompact ? 1 : 2), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$
|
|
68
|
+
})(["", "{margin-top:", "px;}", ";"], StyledField, props => props.theme.space.base * (props.isCompact ? 1 : 2), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$F, props));
|
|
86
69
|
StyledFieldset.defaultProps = {
|
|
87
70
|
theme: reactTheming.DEFAULT_THEME
|
|
88
71
|
};
|
|
89
72
|
|
|
90
|
-
const COMPONENT_ID$
|
|
73
|
+
const COMPONENT_ID$E = 'forms.input_label';
|
|
91
74
|
const StyledLabel = styled__default.default.label.attrs(props => ({
|
|
92
|
-
'data-garden-id': props['data-garden-id'] || COMPONENT_ID$
|
|
93
|
-
'data-garden-version': props['data-garden-version'] || '9.0.0-next.
|
|
75
|
+
'data-garden-id': props['data-garden-id'] || COMPONENT_ID$E,
|
|
76
|
+
'data-garden-version': props['data-garden-version'] || '9.0.0-next.10'
|
|
94
77
|
})).withConfig({
|
|
95
78
|
displayName: "StyledLabel",
|
|
96
79
|
componentId: "sc-2utmsz-0"
|
|
97
|
-
})(["direction:", ";vertical-align:middle;line-height:", ";color:", ";font-size:", ";font-weight:", ";&[hidden]{display:", ";vertical-align:", ";text-indent:", ";font-size:", ";", ";}", ";"], props => props.theme.rtl && 'rtl', props => reactTheming.getLineHeight(props.theme.space.base * 5, props.theme.fontSizes.md), props => props.theme
|
|
80
|
+
})(["direction:", ";vertical-align:middle;line-height:", ";color:", ";font-size:", ";font-weight:", ";&[hidden]{display:", ";vertical-align:", ";text-indent:", ";font-size:", ";", ";}", ";"], props => props.theme.rtl && 'rtl', props => reactTheming.getLineHeight(props.theme.space.base * 5, props.theme.fontSizes.md), props => reactTheming.getColorV8('foreground', 600 , props.theme), props => props.theme.fontSizes.md, props => props.isRegular ? props.theme.fontWeights.regular : props.theme.fontWeights.semibold, props => props.isRadio ? 'inline-block' : 'inline', props => props.isRadio && 'top', props => props.isRadio && '-100%', props => props.isRadio && '0', props => !props.isRadio && polished.hideVisually(), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$E, props));
|
|
98
81
|
StyledLabel.defaultProps = {
|
|
99
82
|
theme: reactTheming.DEFAULT_THEME
|
|
100
83
|
};
|
|
101
84
|
|
|
102
|
-
const COMPONENT_ID$
|
|
85
|
+
const COMPONENT_ID$D = 'forms.fieldset_legend';
|
|
103
86
|
const StyledLegend = styled__default.default(StyledLabel).attrs({
|
|
104
87
|
as: 'legend',
|
|
105
|
-
'data-garden-id': COMPONENT_ID$
|
|
106
|
-
'data-garden-version': '9.0.0-next.
|
|
88
|
+
'data-garden-id': COMPONENT_ID$D,
|
|
89
|
+
'data-garden-version': '9.0.0-next.10'
|
|
107
90
|
}).withConfig({
|
|
108
91
|
displayName: "StyledLegend",
|
|
109
92
|
componentId: "sc-6s0zwq-0"
|
|
110
|
-
})(["padding:0;", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$
|
|
93
|
+
})(["padding:0;", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$D, props));
|
|
111
94
|
StyledLegend.defaultProps = {
|
|
112
95
|
theme: reactTheming.DEFAULT_THEME
|
|
113
96
|
};
|
|
114
97
|
|
|
115
|
-
const COMPONENT_ID$
|
|
98
|
+
const COMPONENT_ID$C = 'forms.input_hint';
|
|
116
99
|
const StyledHint = styled__default.default.div.attrs(props => ({
|
|
117
|
-
'data-garden-id': props['data-garden-id'] || COMPONENT_ID$
|
|
118
|
-
'data-garden-version': props['data-garden-version'] || '9.0.0-next.
|
|
100
|
+
'data-garden-id': props['data-garden-id'] || COMPONENT_ID$C,
|
|
101
|
+
'data-garden-version': props['data-garden-version'] || '9.0.0-next.10'
|
|
119
102
|
})).withConfig({
|
|
120
103
|
displayName: "StyledHint",
|
|
121
104
|
componentId: "sc-17c2wu8-0"
|
|
122
|
-
})(["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.
|
|
105
|
+
})(["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));
|
|
123
106
|
StyledHint.defaultProps = {
|
|
124
107
|
theme: reactTheming.DEFAULT_THEME
|
|
125
108
|
};
|
|
@@ -217,15 +200,15 @@ const MessageIcon = _ref => {
|
|
|
217
200
|
}
|
|
218
201
|
return retVal;
|
|
219
202
|
};
|
|
220
|
-
const COMPONENT_ID$
|
|
203
|
+
const COMPONENT_ID$B = 'forms.input_message_icon';
|
|
221
204
|
const StyledMessageIcon = styled__default.default(MessageIcon).attrs({
|
|
222
|
-
'data-garden-id': COMPONENT_ID$
|
|
223
|
-
'data-garden-version': '9.0.0-next.
|
|
205
|
+
'data-garden-id': COMPONENT_ID$B,
|
|
206
|
+
'data-garden-version': '9.0.0-next.10',
|
|
224
207
|
'aria-hidden': null
|
|
225
208
|
}).withConfig({
|
|
226
209
|
displayName: "StyledMessageIcon",
|
|
227
210
|
componentId: "sc-1ph2gba-0"
|
|
228
|
-
})(["width:", ";height:", ";", ";"], props => props.theme.iconSizes.md, props => props.theme.iconSizes.md, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$
|
|
211
|
+
})(["width:", ";height:", ";", ";"], props => props.theme.iconSizes.md, props => props.theme.iconSizes.md, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$B, props));
|
|
229
212
|
StyledMessageIcon.defaultProps = {
|
|
230
213
|
theme: reactTheming.DEFAULT_THEME
|
|
231
214
|
};
|
|
@@ -235,36 +218,36 @@ const validationStyles = props => {
|
|
|
235
218
|
const padding = polished.math(`${props.theme.space.base} * 2px + ${props.theme.iconSizes.md}`);
|
|
236
219
|
let color;
|
|
237
220
|
if (props.validation === 'error') {
|
|
238
|
-
color = reactTheming.
|
|
221
|
+
color = reactTheming.getColorV8('dangerHue', 600, props.theme);
|
|
239
222
|
} else if (props.validation === 'success') {
|
|
240
|
-
color = reactTheming.
|
|
223
|
+
color = reactTheming.getColorV8('successHue', 600, props.theme);
|
|
241
224
|
} else if (props.validation === 'warning') {
|
|
242
|
-
color = reactTheming.
|
|
225
|
+
color = reactTheming.getColorV8('warningHue', 700, props.theme);
|
|
243
226
|
} else {
|
|
244
|
-
color = reactTheming.
|
|
227
|
+
color = reactTheming.getColorV8('neutralHue', 700, props.theme);
|
|
245
228
|
}
|
|
246
229
|
return styled.css(["padding-", ":", ";color:", ";"], rtl ? 'right' : 'left', props.validation && padding, color);
|
|
247
230
|
};
|
|
248
|
-
const COMPONENT_ID$
|
|
231
|
+
const COMPONENT_ID$A = 'forms.input_message';
|
|
249
232
|
const StyledMessage = styled__default.default.div.attrs(props => ({
|
|
250
|
-
'data-garden-id': props['data-garden-id'] || COMPONENT_ID$
|
|
251
|
-
'data-garden-version': props['data-garden-version'] || '9.0.0-next.
|
|
233
|
+
'data-garden-id': props['data-garden-id'] || COMPONENT_ID$A,
|
|
234
|
+
'data-garden-version': props['data-garden-version'] || '9.0.0-next.10'
|
|
252
235
|
})).withConfig({
|
|
253
236
|
displayName: "StyledMessage",
|
|
254
237
|
componentId: "sc-30hgg7-0"
|
|
255
|
-
})(["direction:", ";display:inline-block;position:relative;vertical-align:middle;line-height:", ";font-size:", ";", ";& ", "{position:absolute;top:-1px;", ":0;}", ":not([hidden]) + &{display:block;margin-top:", ";}", ";"], props => props.theme.rtl && 'rtl', props => reactTheming.getLineHeight(props.theme.iconSizes.md, props.theme.fontSizes.sm), props => props.theme.fontSizes.sm, props => validationStyles(props), StyledMessageIcon, props => props.theme.rtl ? 'right' : 'left', StyledLabel, props => polished.math(`${props.theme.space.base} * 1px`), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$
|
|
238
|
+
})(["direction:", ";display:inline-block;position:relative;vertical-align:middle;line-height:", ";font-size:", ";", ";& ", "{position:absolute;top:-1px;", ":0;}", ":not([hidden]) + &{display:block;margin-top:", ";}", ";"], props => props.theme.rtl && 'rtl', props => reactTheming.getLineHeight(props.theme.iconSizes.md, props.theme.fontSizes.sm), props => props.theme.fontSizes.sm, props => validationStyles(props), StyledMessageIcon, props => props.theme.rtl ? 'right' : 'left', StyledLabel, props => polished.math(`${props.theme.space.base} * 1px`), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$A, props));
|
|
256
239
|
StyledMessage.defaultProps = {
|
|
257
240
|
theme: reactTheming.DEFAULT_THEME
|
|
258
241
|
};
|
|
259
242
|
|
|
260
|
-
const COMPONENT_ID$
|
|
243
|
+
const COMPONENT_ID$z = 'forms.input';
|
|
261
244
|
const isInvalid = validation => {
|
|
262
245
|
return validation === 'warning' || validation === 'error';
|
|
263
246
|
};
|
|
264
|
-
const colorStyles$
|
|
247
|
+
const colorStyles$a = props => {
|
|
265
248
|
const HUE = 'primaryHue';
|
|
266
249
|
const SHADE = 600;
|
|
267
|
-
const placeholderColor = reactTheming.
|
|
250
|
+
const placeholderColor = reactTheming.getColorV8('neutralHue', SHADE - 200, props.theme);
|
|
268
251
|
let borderColor;
|
|
269
252
|
let hoverBorderColor;
|
|
270
253
|
let focusBorderColor;
|
|
@@ -280,20 +263,20 @@ const colorStyles$c = props => {
|
|
|
280
263
|
} else if (props.validation === 'error') {
|
|
281
264
|
hue = 'dangerHue';
|
|
282
265
|
}
|
|
283
|
-
borderColor = reactTheming.
|
|
266
|
+
borderColor = reactTheming.getColorV8(hue, SHADE, props.theme);
|
|
284
267
|
hoverBorderColor = borderColor;
|
|
285
268
|
focusBorderColor = borderColor;
|
|
286
269
|
focusRingHue = hue;
|
|
287
270
|
} else {
|
|
288
|
-
borderColor = reactTheming.
|
|
289
|
-
hoverBorderColor = reactTheming.
|
|
271
|
+
borderColor = reactTheming.getColorV8('neutralHue', SHADE - 300, props.theme);
|
|
272
|
+
hoverBorderColor = reactTheming.getColorV8('primaryHue', SHADE, props.theme);
|
|
290
273
|
focusBorderColor = hoverBorderColor;
|
|
291
274
|
}
|
|
292
|
-
const readOnlyBackgroundColor = reactTheming.
|
|
293
|
-
const readOnlyBorderColor = reactTheming.
|
|
275
|
+
const readOnlyBackgroundColor = reactTheming.getColorV8('neutralHue', SHADE - 500, props.theme);
|
|
276
|
+
const readOnlyBorderColor = reactTheming.getColorV8('neutralHue', SHADE - 300, props.theme);
|
|
294
277
|
const disabledBackgroundColor = readOnlyBackgroundColor;
|
|
295
|
-
const disabledBorderColor = reactTheming.
|
|
296
|
-
const disabledForegroundColor = reactTheming.
|
|
278
|
+
const disabledBorderColor = reactTheming.getColorV8('neutralHue', SHADE - 400, props.theme);
|
|
279
|
+
const disabledForegroundColor = reactTheming.getColorV8('neutralHue', SHADE - 200, props.theme);
|
|
297
280
|
let controlledBorderColor = borderColor;
|
|
298
281
|
if (props.isFocused) {
|
|
299
282
|
controlledBorderColor = focusBorderColor;
|
|
@@ -301,18 +284,20 @@ const colorStyles$c = props => {
|
|
|
301
284
|
if (props.isHovered) {
|
|
302
285
|
controlledBorderColor = hoverBorderColor;
|
|
303
286
|
}
|
|
304
|
-
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' :
|
|
287
|
+
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' : reactTheming.getColorV8('background', 600 , props.theme), reactTheming.getColorV8('foreground', 600 , props.theme), placeholderColor, readOnlyBorderColor, !props.isBare && readOnlyBackgroundColor, hoverBorderColor, reactTheming.focusStyles({
|
|
305
288
|
theme: props.theme,
|
|
306
289
|
inset: props.focusInset,
|
|
307
290
|
condition: !props.isBare,
|
|
308
|
-
|
|
309
|
-
|
|
291
|
+
color: {
|
|
292
|
+
hue: focusRingHue,
|
|
293
|
+
shade: focusRingShade
|
|
294
|
+
},
|
|
310
295
|
styles: {
|
|
311
296
|
borderColor: focusBorderColor
|
|
312
297
|
}
|
|
313
298
|
}), disabledBorderColor, !props.isBare && disabledBackgroundColor, disabledForegroundColor);
|
|
314
299
|
};
|
|
315
|
-
const sizeStyles$
|
|
300
|
+
const sizeStyles$c = props => {
|
|
316
301
|
const fontSize = props.theme.fontSizes.md;
|
|
317
302
|
const paddingHorizontal = `${props.theme.space.base * 3}px`;
|
|
318
303
|
let height;
|
|
@@ -334,21 +319,21 @@ const sizeStyles$f = props => {
|
|
|
334
319
|
const padding = props.isBare ? '0' : `${polished.em(paddingVertical, fontSize)} ${polished.em(paddingHorizontal, fontSize)}`;
|
|
335
320
|
const swatchMarginVertical = polished.math(`(${lineHeight} - ${swatchHeight}) / 2`);
|
|
336
321
|
const swatchMarginHorizontal = polished.math(`${paddingVertical} + ${swatchMarginVertical} - ${paddingHorizontal}`);
|
|
337
|
-
return styled.css(["padding:", ";min-height:", ";line-height:", ";font-size:", ";&::-ms-browse{font-size:", ";}&[type='date'],&[type='datetime-local'],&[type='file'],&[type='month'],&[type='time'],&[type='week']{max-height:", ";}&[type='file']{line-height:1;}@supports (-ms-ime-align:auto){&[type='color']{padding:", ";}}&::-moz-color-swatch{margin-top:", ";margin-left:", ";width:calc(100% + ", ");height:", ";}&::-webkit-color-swatch{margin:", " ", ";}", ":not([hidden]) + &&,", " + &&,", " + &&,&& + ", ",&&
|
|
322
|
+
return styled.css(["padding:", ";min-height:", ";line-height:", ";font-size:", ";&::-ms-browse{font-size:", ";}&[type='date'],&[type='datetime-local'],&[type='file'],&[type='month'],&[type='time'],&[type='week']{max-height:", ";}&[type='file']{line-height:1;}@supports (-ms-ime-align:auto){&[type='color']{padding:", ";}}&::-moz-color-swatch{margin-top:", ";margin-left:", ";width:calc(100% + ", ");height:", ";}&::-webkit-color-swatch{margin:", " ", ";}", ":not([hidden]) + &&,", " + &&,", " + &&,&& + ", ",&& ~ ", "{margin-top:", "px;}"], padding, props.isBare ? '1em' : height, reactTheming.getLineHeight(lineHeight, fontSize), fontSize, browseFontSize, height, props.isCompact ? '0 2px' : '1px 3px', swatchMarginVertical, swatchMarginHorizontal, polished.math(`${swatchMarginHorizontal} * -2`), swatchHeight, swatchMarginVertical, swatchMarginHorizontal, StyledLabel, StyledHint, StyledMessage, StyledHint, StyledMessage, props.theme.space.base * (props.isCompact ? 1 : 2));
|
|
338
323
|
};
|
|
339
324
|
const StyledTextInput = styled__default.default.input.attrs(props => ({
|
|
340
|
-
'data-garden-id': COMPONENT_ID$
|
|
341
|
-
'data-garden-version': '9.0.0-next.
|
|
325
|
+
'data-garden-id': COMPONENT_ID$z,
|
|
326
|
+
'data-garden-version': '9.0.0-next.10',
|
|
342
327
|
'aria-invalid': isInvalid(props.validation)
|
|
343
328
|
})).withConfig({
|
|
344
329
|
displayName: "StyledTextInput",
|
|
345
330
|
componentId: "sc-k12n8x-0"
|
|
346
|
-
})(["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$
|
|
331
|
+
})(["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$c(props), props => colorStyles$a(props), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$z, props));
|
|
347
332
|
StyledTextInput.defaultProps = {
|
|
348
333
|
theme: reactTheming.DEFAULT_THEME
|
|
349
334
|
};
|
|
350
335
|
|
|
351
|
-
const COMPONENT_ID$
|
|
336
|
+
const COMPONENT_ID$y = 'forms.textarea';
|
|
352
337
|
const hiddenStyles = `
|
|
353
338
|
visibility: hidden;
|
|
354
339
|
position: absolute;
|
|
@@ -360,63 +345,50 @@ const hiddenStyles = `
|
|
|
360
345
|
`;
|
|
361
346
|
const StyledTextarea = styled__default.default(StyledTextInput).attrs({
|
|
362
347
|
as: 'textarea',
|
|
363
|
-
'data-garden-id': COMPONENT_ID$
|
|
364
|
-
'data-garden-version': '9.0.0-next.
|
|
348
|
+
'data-garden-id': COMPONENT_ID$y,
|
|
349
|
+
'data-garden-version': '9.0.0-next.10'
|
|
365
350
|
}).withConfig({
|
|
366
351
|
displayName: "StyledTextarea",
|
|
367
352
|
componentId: "sc-wxschl-0"
|
|
368
|
-
})(["resize:", ";overflow:auto;", ";", ";"], props => props.isResizable ? 'vertical' : 'none', props => props.isHidden && hiddenStyles, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$
|
|
353
|
+
})(["resize:", ";overflow:auto;", ";", ";"], props => props.isResizable ? 'vertical' : 'none', props => props.isHidden && hiddenStyles, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$y, props));
|
|
369
354
|
StyledTextarea.defaultProps = {
|
|
370
355
|
theme: reactTheming.DEFAULT_THEME
|
|
371
356
|
};
|
|
372
357
|
|
|
373
|
-
const COMPONENT_ID$
|
|
374
|
-
const colorStyles$
|
|
358
|
+
const COMPONENT_ID$x = 'forms.media_figure';
|
|
359
|
+
const colorStyles$9 = props => {
|
|
375
360
|
let shade = 600;
|
|
376
|
-
if (props
|
|
361
|
+
if (props.$isDisabled) {
|
|
377
362
|
shade = 400;
|
|
378
|
-
} else if (props
|
|
363
|
+
} else if (props.$isHovered || props.$isFocused) {
|
|
379
364
|
shade = 700;
|
|
380
365
|
}
|
|
381
|
-
return styled.css(["color:", ";"], reactTheming.
|
|
366
|
+
return styled.css(["color:", ";"], reactTheming.getColorV8('neutralHue', shade, props.theme));
|
|
382
367
|
};
|
|
383
|
-
const sizeStyles$
|
|
368
|
+
const sizeStyles$b = props => {
|
|
384
369
|
const size = props.theme.iconSizes.md;
|
|
385
370
|
const marginFirst = `1px ${props.theme.space.base * 2}px auto 0`;
|
|
386
371
|
const marginLast = `1px 0 auto ${props.theme.space.base * 2}px`;
|
|
387
372
|
let margin;
|
|
388
|
-
if (props
|
|
373
|
+
if (props.$position === 'start') {
|
|
389
374
|
margin = props.theme.rtl ? marginLast : marginFirst;
|
|
390
375
|
} else {
|
|
391
376
|
margin = props.theme.rtl ? marginFirst : marginLast;
|
|
392
377
|
}
|
|
393
378
|
return styled.css(["margin:", ";width:", ";height:", ";"], margin, size, size);
|
|
394
379
|
};
|
|
395
|
-
const StyledTextMediaFigure = styled__default.default(
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
children,
|
|
399
|
-
position,
|
|
400
|
-
isHovered,
|
|
401
|
-
isFocused,
|
|
402
|
-
isDisabled,
|
|
403
|
-
isRotated,
|
|
404
|
-
theme,
|
|
405
|
-
...props
|
|
406
|
-
} = _ref;
|
|
407
|
-
return React__namespace.default.cloneElement(React.Children.only(children), props);
|
|
408
|
-
}).attrs({
|
|
409
|
-
'data-garden-id': COMPONENT_ID$B,
|
|
410
|
-
'data-garden-version': '9.0.0-next.1'
|
|
380
|
+
const StyledTextMediaFigure = styled__default.default(reactTheming.StyledBaseIcon).attrs({
|
|
381
|
+
'data-garden-id': COMPONENT_ID$x,
|
|
382
|
+
'data-garden-version': '9.0.0-next.10'
|
|
411
383
|
}).withConfig({
|
|
412
384
|
displayName: "StyledTextMediaFigure",
|
|
413
385
|
componentId: "sc-1qepknj-0"
|
|
414
|
-
})(["transform:", ";transition:transform 0.25s ease-in-out,color 0.25s ease-in-out;", ";", " ", ";"], props => props
|
|
386
|
+
})(["transform:", ";transition:transform 0.25s ease-in-out,color 0.25s ease-in-out;", ";", " ", ";"], props => props.$isRotated && `rotate(${props.theme.rtl ? '-' : '+'}180deg)`, props => colorStyles$9(props), props => sizeStyles$b(props), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$x, props));
|
|
415
387
|
StyledTextMediaFigure.defaultProps = {
|
|
416
388
|
theme: reactTheming.DEFAULT_THEME
|
|
417
389
|
};
|
|
418
390
|
|
|
419
|
-
const COMPONENT_ID$
|
|
391
|
+
const COMPONENT_ID$w = 'forms.faux_input';
|
|
420
392
|
const VALIDATION_HUES = {
|
|
421
393
|
success: 'successHue',
|
|
422
394
|
warning: 'warningHue',
|
|
@@ -429,7 +401,7 @@ function getValidationHue(validation) {
|
|
|
429
401
|
}
|
|
430
402
|
return defaultHue;
|
|
431
403
|
}
|
|
432
|
-
const colorStyles$
|
|
404
|
+
const colorStyles$8 = props => {
|
|
433
405
|
const {
|
|
434
406
|
theme,
|
|
435
407
|
validation,
|
|
@@ -441,11 +413,13 @@ const colorStyles$a = props => {
|
|
|
441
413
|
theme,
|
|
442
414
|
inset: focusInset,
|
|
443
415
|
condition: !isBare,
|
|
444
|
-
|
|
445
|
-
|
|
416
|
+
color: {
|
|
417
|
+
hue: getValidationHue(validation),
|
|
418
|
+
shade: validation === 'warning' ? 700 : 600
|
|
419
|
+
},
|
|
446
420
|
selector: isFocused ? '&' : '&:focus-within',
|
|
447
421
|
styles: {
|
|
448
|
-
borderColor: reactTheming.
|
|
422
|
+
borderColor: reactTheming.getColorV8(getValidationHue(validation), 600, theme)
|
|
449
423
|
}
|
|
450
424
|
}));
|
|
451
425
|
};
|
|
@@ -453,30 +427,30 @@ const StyledTextFauxInput = styled__default.default(StyledTextInput).attrs(props
|
|
|
453
427
|
as: 'div',
|
|
454
428
|
'aria-readonly': props.isReadOnly,
|
|
455
429
|
'aria-disabled': props.isDisabled,
|
|
456
|
-
'data-garden-id': COMPONENT_ID$
|
|
457
|
-
'data-garden-version': '9.0.0-next.
|
|
430
|
+
'data-garden-id': COMPONENT_ID$w,
|
|
431
|
+
'data-garden-version': '9.0.0-next.10'
|
|
458
432
|
})).withConfig({
|
|
459
433
|
displayName: "StyledTextFauxInput",
|
|
460
434
|
componentId: "sc-yqw7j9-0"
|
|
461
|
-
})(["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$
|
|
435
|
+
})(["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$8, StyledTextInput, props => !props.mediaLayout && 'baseline', reactTheming.SELECTOR_FOCUS_VISIBLE, StyledTextMediaFigure, props => props.mediaLayout && '0', props => reactTheming.retrieveComponentStyles(COMPONENT_ID$w, props));
|
|
462
436
|
StyledTextFauxInput.defaultProps = {
|
|
463
437
|
theme: reactTheming.DEFAULT_THEME
|
|
464
438
|
};
|
|
465
439
|
|
|
466
|
-
const COMPONENT_ID$
|
|
440
|
+
const COMPONENT_ID$v = 'forms.media_input';
|
|
467
441
|
const StyledTextMediaInput = styled__default.default(StyledTextInput).attrs({
|
|
468
|
-
'data-garden-id': COMPONENT_ID$
|
|
469
|
-
'data-garden-version': '9.0.0-next.
|
|
442
|
+
'data-garden-id': COMPONENT_ID$v,
|
|
443
|
+
'data-garden-version': '9.0.0-next.10',
|
|
470
444
|
isBare: true
|
|
471
445
|
}).withConfig({
|
|
472
446
|
displayName: "StyledTextMediaInput",
|
|
473
447
|
componentId: "sc-12i9xfi-0"
|
|
474
|
-
})(["flex-grow:1;", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$
|
|
448
|
+
})(["flex-grow:1;", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$v, props));
|
|
475
449
|
StyledTextMediaInput.defaultProps = {
|
|
476
450
|
theme: reactTheming.DEFAULT_THEME
|
|
477
451
|
};
|
|
478
452
|
|
|
479
|
-
const COMPONENT_ID$
|
|
453
|
+
const COMPONENT_ID$u = 'forms.input_group';
|
|
480
454
|
const positionStyles = props => {
|
|
481
455
|
const topMargin = `${props.theme.space.base * (props.isCompact ? 1 : 2)}px`;
|
|
482
456
|
return styled.css(["", ":not([hidden]) + &&,", " + &&,", " + &&,&& + ", ",&& + ", "{margin-top:", ";}& > ", "{position:relative;flex:1 1 auto;margin-top:0;margin-bottom:0;width:auto;min-width:0;}"], StyledLabel, StyledHint, StyledMessage, StyledHint, StyledMessage, topMargin, StyledTextInput);
|
|
@@ -484,101 +458,101 @@ const positionStyles = props => {
|
|
|
484
458
|
const itemStyles = props => {
|
|
485
459
|
const startDirection = props.theme.rtl ? 'right' : 'left';
|
|
486
460
|
const endDirection = props.theme.rtl ? 'left' : 'right';
|
|
487
|
-
return styled.css(["& > *{z-index:-1;}& > ", "{z-index:0;}& > ", ":disabled{z-index:-2;}& > ", ":hover,& > button:hover,& > ", ":focus-visible,& > button:focus-visible,& > ", "
|
|
461
|
+
return styled.css(["& > *{z-index:-1;}& > ", "{z-index:0;}& > ", ":disabled{z-index:-2;}& > ", ":hover,& > button:hover,& > ", ":focus-visible,& > button:focus-visible,& > ", ":active,& > button:active,& > button[aria-pressed='true'],& > button[aria-pressed='mixed']{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, startDirection, props.theme.borderWidths.sm, endDirection, endDirection, startDirection, startDirection);
|
|
488
462
|
};
|
|
489
463
|
const StyledInputGroup = styled__default.default.div.attrs({
|
|
490
|
-
'data-garden-id': COMPONENT_ID$
|
|
491
|
-
'data-garden-version': '9.0.0-next.
|
|
464
|
+
'data-garden-id': COMPONENT_ID$u,
|
|
465
|
+
'data-garden-version': '9.0.0-next.10'
|
|
492
466
|
}).withConfig({
|
|
493
467
|
displayName: "StyledInputGroup",
|
|
494
468
|
componentId: "sc-kjh1f0-0"
|
|
495
|
-
})(["display:inline-flex;position:relative;flex-wrap:nowrap;align-items:stretch;z-index:0;width:100%;", ";", ";", ";"], props => positionStyles(props), props => itemStyles(props), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$
|
|
469
|
+
})(["display:inline-flex;position:relative;flex-wrap:nowrap;align-items:stretch;z-index:0;width:100%;", ";", ";", ";"], props => positionStyles(props), props => itemStyles(props), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$u, props));
|
|
496
470
|
StyledInputGroup.defaultProps = {
|
|
497
471
|
theme: reactTheming.DEFAULT_THEME
|
|
498
472
|
};
|
|
499
473
|
|
|
500
|
-
const COMPONENT_ID$
|
|
501
|
-
const sizeStyles$
|
|
474
|
+
const COMPONENT_ID$t = 'forms.radio_label';
|
|
475
|
+
const sizeStyles$a = props => {
|
|
502
476
|
const size = props.theme.space.base * 4;
|
|
503
477
|
const padding = size + props.theme.space.base * 2;
|
|
504
478
|
const lineHeight = props.theme.space.base * 5;
|
|
505
479
|
return styled.css(["padding-", ":", "px;&[hidden]{padding-", ":", "px;line-height:", "px;}"], props.theme.rtl ? 'right' : 'left', padding, props.theme.rtl ? 'right' : 'left', size, lineHeight);
|
|
506
480
|
};
|
|
507
481
|
const StyledRadioLabel = styled__default.default(StyledLabel).attrs({
|
|
508
|
-
'data-garden-id': COMPONENT_ID$
|
|
509
|
-
'data-garden-version': '9.0.0-next.
|
|
482
|
+
'data-garden-id': COMPONENT_ID$t,
|
|
483
|
+
'data-garden-version': '9.0.0-next.10',
|
|
510
484
|
isRadio: true
|
|
511
485
|
}).withConfig({
|
|
512
486
|
displayName: "StyledRadioLabel",
|
|
513
487
|
componentId: "sc-1aq2e5t-0"
|
|
514
|
-
})(["display:inline-block;position:relative;cursor:pointer;", ";", ";"], props => sizeStyles$
|
|
488
|
+
})(["display:inline-block;position:relative;cursor:pointer;", ";", ";"], props => sizeStyles$a(props), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$t, props));
|
|
515
489
|
StyledRadioLabel.defaultProps = {
|
|
516
490
|
theme: reactTheming.DEFAULT_THEME
|
|
517
491
|
};
|
|
518
492
|
|
|
519
|
-
const COMPONENT_ID$
|
|
493
|
+
const COMPONENT_ID$s = 'forms.checkbox_label';
|
|
520
494
|
const StyledCheckLabel = styled__default.default(StyledRadioLabel).attrs({
|
|
521
|
-
'data-garden-id': COMPONENT_ID$
|
|
522
|
-
'data-garden-version': '9.0.0-next.
|
|
495
|
+
'data-garden-id': COMPONENT_ID$s,
|
|
496
|
+
'data-garden-version': '9.0.0-next.10'
|
|
523
497
|
}).withConfig({
|
|
524
498
|
displayName: "StyledCheckLabel",
|
|
525
499
|
componentId: "sc-x7nr1-0"
|
|
526
|
-
})(["", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$
|
|
500
|
+
})(["", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$s, props));
|
|
527
501
|
StyledCheckLabel.defaultProps = {
|
|
528
502
|
theme: reactTheming.DEFAULT_THEME
|
|
529
503
|
};
|
|
530
504
|
|
|
531
|
-
const COMPONENT_ID$
|
|
505
|
+
const COMPONENT_ID$r = 'forms.radio_hint';
|
|
532
506
|
const StyledRadioHint = styled__default.default(StyledHint).attrs({
|
|
533
|
-
'data-garden-id': COMPONENT_ID$
|
|
534
|
-
'data-garden-version': '9.0.0-next.
|
|
507
|
+
'data-garden-id': COMPONENT_ID$r,
|
|
508
|
+
'data-garden-version': '9.0.0-next.10'
|
|
535
509
|
}).withConfig({
|
|
536
510
|
displayName: "StyledRadioHint",
|
|
537
511
|
componentId: "sc-eo8twg-0"
|
|
538
|
-
})(["padding-", ":", ";", ";"], props => props.theme.rtl ? 'right' : 'left', props => polished.math(`${props.theme.space.base} * 6px`), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$
|
|
512
|
+
})(["padding-", ":", ";", ";"], props => props.theme.rtl ? 'right' : 'left', props => polished.math(`${props.theme.space.base} * 6px`), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$r, props));
|
|
539
513
|
StyledRadioHint.defaultProps = {
|
|
540
514
|
theme: reactTheming.DEFAULT_THEME
|
|
541
515
|
};
|
|
542
516
|
|
|
543
|
-
const COMPONENT_ID$
|
|
517
|
+
const COMPONENT_ID$q = 'forms.checkbox_hint';
|
|
544
518
|
const StyledCheckHint = styled__default.default(StyledRadioHint).attrs({
|
|
545
|
-
'data-garden-id': COMPONENT_ID$
|
|
546
|
-
'data-garden-version': '9.0.0-next.
|
|
519
|
+
'data-garden-id': COMPONENT_ID$q,
|
|
520
|
+
'data-garden-version': '9.0.0-next.10'
|
|
547
521
|
}).withConfig({
|
|
548
522
|
displayName: "StyledCheckHint",
|
|
549
523
|
componentId: "sc-1kl8e8c-0"
|
|
550
|
-
})(["", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$
|
|
524
|
+
})(["", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$q, props));
|
|
551
525
|
StyledCheckHint.defaultProps = {
|
|
552
526
|
theme: reactTheming.DEFAULT_THEME
|
|
553
527
|
};
|
|
554
528
|
|
|
555
|
-
const COMPONENT_ID$
|
|
556
|
-
const colorStyles$
|
|
529
|
+
const COMPONENT_ID$p = 'forms.radio';
|
|
530
|
+
const colorStyles$7 = props => {
|
|
557
531
|
const SHADE = 600;
|
|
558
|
-
const borderColor = reactTheming.
|
|
559
|
-
const backgroundColor = props.theme
|
|
532
|
+
const borderColor = reactTheming.getColorV8('neutralHue', SHADE - 300, props.theme);
|
|
533
|
+
const backgroundColor = reactTheming.getColorV8('background', 600 , props.theme);
|
|
560
534
|
const iconColor = backgroundColor;
|
|
561
|
-
const hoverBackgroundColor = reactTheming.
|
|
562
|
-
const hoverBorderColor = reactTheming.
|
|
535
|
+
const hoverBackgroundColor = reactTheming.getColorV8('primaryHue', SHADE, props.theme, 0.08);
|
|
536
|
+
const hoverBorderColor = reactTheming.getColorV8('primaryHue', SHADE, props.theme);
|
|
563
537
|
const focusBorderColor = hoverBorderColor;
|
|
564
|
-
const activeBackgroundColor = reactTheming.
|
|
538
|
+
const activeBackgroundColor = reactTheming.getColorV8('primaryHue', SHADE, props.theme, 0.2);
|
|
565
539
|
const activeBorderColor = focusBorderColor;
|
|
566
540
|
const checkedBorderColor = focusBorderColor;
|
|
567
541
|
const checkedBackgroundColor = checkedBorderColor;
|
|
568
|
-
const checkedHoverBorderColor = reactTheming.
|
|
542
|
+
const checkedHoverBorderColor = reactTheming.getColorV8('primaryHue', SHADE + 100, props.theme);
|
|
569
543
|
const checkedHoverBackgroundColor = checkedHoverBorderColor;
|
|
570
|
-
const checkedActiveBorderColor = reactTheming.
|
|
544
|
+
const checkedActiveBorderColor = reactTheming.getColorV8('primaryHue', SHADE + 200, props.theme);
|
|
571
545
|
const checkedActiveBackgroundColor = checkedActiveBorderColor;
|
|
572
|
-
const disabledBackgroundColor = reactTheming.
|
|
546
|
+
const disabledBackgroundColor = reactTheming.getColorV8('neutralHue', SHADE - 400, props.theme);
|
|
573
547
|
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({
|
|
574
548
|
theme: props.theme,
|
|
575
549
|
styles: {
|
|
576
550
|
borderColor: focusBorderColor
|
|
577
551
|
},
|
|
578
|
-
selector: `&:focus-visible ~ ${StyledRadioLabel}::before
|
|
552
|
+
selector: `&:focus-visible ~ ${StyledRadioLabel}::before`
|
|
579
553
|
}), StyledRadioLabel, activeBorderColor, activeBackgroundColor, StyledRadioLabel, checkedBorderColor, checkedBackgroundColor, StyledRadioLabel, checkedHoverBorderColor, checkedHoverBackgroundColor, StyledRadioLabel, checkedActiveBorderColor, checkedActiveBackgroundColor, StyledRadioLabel, disabledBackgroundColor);
|
|
580
554
|
};
|
|
581
|
-
const sizeStyles$
|
|
555
|
+
const sizeStyles$9 = props => {
|
|
582
556
|
const lineHeight = `${props.theme.space.base * 5}px`;
|
|
583
557
|
const size = `${props.theme.space.base * 4}px`;
|
|
584
558
|
const top = polished.math(`(${lineHeight} - ${size}) / 2`);
|
|
@@ -589,59 +563,59 @@ const sizeStyles$c = props => {
|
|
|
589
563
|
return styled.css(["top:", ";width:", ";height:", ";& ~ ", "::before{top:", ";background-size:", ";width:", ";height:", ";box-sizing:border-box;}& ~ ", " > svg{top:", ";", ":", ";width:", ";height:", ";}&& ~ ", " ~ ", "{margin-top:", ";}"], top, size, size, StyledRadioLabel, top, props.theme.iconSizes.sm, size, size, StyledRadioLabel, iconTop, props.theme.rtl ? 'right' : 'left', iconPosition, iconSize, iconSize, StyledRadioLabel, StyledMessage, marginTop);
|
|
590
564
|
};
|
|
591
565
|
const StyledRadioInput = styled__default.default.input.attrs({
|
|
592
|
-
'data-garden-id': COMPONENT_ID$
|
|
593
|
-
'data-garden-version': '9.0.0-next.
|
|
566
|
+
'data-garden-id': COMPONENT_ID$p,
|
|
567
|
+
'data-garden-version': '9.0.0-next.10',
|
|
594
568
|
type: 'radio'
|
|
595
569
|
}).withConfig({
|
|
596
570
|
displayName: "StyledRadioInput",
|
|
597
571
|
componentId: "sc-qsavpv-0"
|
|
598
|
-
})(["position:absolute;opacity:0;margin:0;& ~ ", "::before{position:absolute;", ":0;transition:border-color .25s ease-in-out,box-shadow .1s ease-in-out,background-color .25s ease-in-out,color .25s ease-in-out;border:", ";border-radius:50%;background-repeat:no-repeat;background-position:center;content:'';}& ~ ", " > svg{position:absolute;}", ";&:focus ~ ", "::before{outline:none;}& ~ ", ":active::before{transition:border-color 0.1s ease-in-out,background-color 0.1s ease-in-out,color 0.1s ease-in-out;}", ";&:disabled ~ ", "{cursor:default;}", ";"], StyledRadioLabel, props => props.theme.rtl ? 'right' : 'left', props => props.theme.borders.sm, StyledRadioLabel, props => sizeStyles$
|
|
572
|
+
})(["position:absolute;opacity:0;margin:0;& ~ ", "::before{position:absolute;", ":0;transition:border-color .25s ease-in-out,box-shadow .1s ease-in-out,background-color .25s ease-in-out,color .25s ease-in-out;border:", ";border-radius:50%;background-repeat:no-repeat;background-position:center;content:'';}& ~ ", " > svg{position:absolute;}", ";&:focus ~ ", "::before{outline:none;}& ~ ", ":active::before{transition:border-color 0.1s ease-in-out,background-color 0.1s ease-in-out,color 0.1s ease-in-out;}", ";&:disabled ~ ", "{cursor:default;}", ";"], StyledRadioLabel, props => props.theme.rtl ? 'right' : 'left', props => props.theme.borders.sm, StyledRadioLabel, props => sizeStyles$9(props), StyledRadioLabel, StyledRadioLabel, props => colorStyles$7(props), StyledRadioLabel, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$p, props));
|
|
599
573
|
StyledRadioInput.defaultProps = {
|
|
600
574
|
theme: reactTheming.DEFAULT_THEME
|
|
601
575
|
};
|
|
602
576
|
|
|
603
|
-
const COMPONENT_ID$
|
|
604
|
-
const colorStyles$
|
|
577
|
+
const COMPONENT_ID$o = 'forms.checkbox';
|
|
578
|
+
const colorStyles$6 = props => {
|
|
605
579
|
const SHADE = 600;
|
|
606
|
-
const indeterminateBorderColor = reactTheming.
|
|
580
|
+
const indeterminateBorderColor = reactTheming.getColorV8('primaryHue', SHADE, props.theme);
|
|
607
581
|
const indeterminateBackgroundColor = indeterminateBorderColor;
|
|
608
|
-
const indeterminateActiveBorderColor = reactTheming.
|
|
582
|
+
const indeterminateActiveBorderColor = reactTheming.getColorV8('primaryHue', SHADE + 100, props.theme);
|
|
609
583
|
const indeterminateActiveBackgroundColor = indeterminateActiveBorderColor;
|
|
610
|
-
const indeterminateDisabledBackgroundColor = reactTheming.
|
|
584
|
+
const indeterminateDisabledBackgroundColor = reactTheming.getColorV8('neutralHue', SHADE - 400, props.theme);
|
|
611
585
|
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);
|
|
612
586
|
};
|
|
613
587
|
const StyledCheckInput = styled__default.default(StyledRadioInput).attrs({
|
|
614
|
-
'data-garden-id': COMPONENT_ID$
|
|
615
|
-
'data-garden-version': '9.0.0-next.
|
|
588
|
+
'data-garden-id': COMPONENT_ID$o,
|
|
589
|
+
'data-garden-version': '9.0.0-next.10',
|
|
616
590
|
type: 'checkbox'
|
|
617
591
|
}).withConfig({
|
|
618
592
|
displayName: "StyledCheckInput",
|
|
619
593
|
componentId: "sc-176jxxe-0"
|
|
620
|
-
})(["& ~ ", "::before{border-radius:", ";}", ";", ";"], StyledCheckLabel, props => props.theme.borderRadii.md, props => colorStyles$
|
|
594
|
+
})(["& ~ ", "::before{border-radius:", ";}", ";", ";"], StyledCheckLabel, props => props.theme.borderRadii.md, props => colorStyles$6(props), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$o, props));
|
|
621
595
|
StyledCheckInput.defaultProps = {
|
|
622
596
|
theme: reactTheming.DEFAULT_THEME
|
|
623
597
|
};
|
|
624
598
|
|
|
625
|
-
const COMPONENT_ID$
|
|
599
|
+
const COMPONENT_ID$n = 'forms.radio_message';
|
|
626
600
|
const StyledRadioMessage = styled__default.default(StyledMessage).attrs({
|
|
627
|
-
'data-garden-id': COMPONENT_ID$
|
|
628
|
-
'data-garden-version': '9.0.0-next.
|
|
601
|
+
'data-garden-id': COMPONENT_ID$n,
|
|
602
|
+
'data-garden-version': '9.0.0-next.10'
|
|
629
603
|
}).withConfig({
|
|
630
604
|
displayName: "StyledRadioMessage",
|
|
631
605
|
componentId: "sc-1pmi0q8-0"
|
|
632
|
-
})(["padding-", ":", ";", ";"], props => props.theme.rtl ? 'right' : 'left', props => polished.math(`${props.theme.space.base} * 6px`), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$
|
|
606
|
+
})(["padding-", ":", ";", ";"], props => props.theme.rtl ? 'right' : 'left', props => polished.math(`${props.theme.space.base} * 6px`), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$n, props));
|
|
633
607
|
StyledRadioMessage.defaultProps = {
|
|
634
608
|
theme: reactTheming.DEFAULT_THEME
|
|
635
609
|
};
|
|
636
610
|
|
|
637
|
-
const COMPONENT_ID$
|
|
611
|
+
const COMPONENT_ID$m = 'forms.checkbox_message';
|
|
638
612
|
const StyledCheckMessage = styled__default.default(StyledRadioMessage).attrs({
|
|
639
|
-
'data-garden-id': COMPONENT_ID$
|
|
640
|
-
'data-garden-version': '9.0.0-next.
|
|
613
|
+
'data-garden-id': COMPONENT_ID$m,
|
|
614
|
+
'data-garden-version': '9.0.0-next.10'
|
|
641
615
|
}).withConfig({
|
|
642
616
|
displayName: "StyledCheckMessage",
|
|
643
617
|
componentId: "sc-s4p6kd-0"
|
|
644
|
-
})(["", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$
|
|
618
|
+
})(["", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$m, props));
|
|
645
619
|
StyledCheckMessage.defaultProps = {
|
|
646
620
|
theme: reactTheming.DEFAULT_THEME
|
|
647
621
|
};
|
|
@@ -666,14 +640,14 @@ var SvgCheckSmFill = function SvgCheckSmFill(props) {
|
|
|
666
640
|
})));
|
|
667
641
|
};
|
|
668
642
|
|
|
669
|
-
const COMPONENT_ID$
|
|
643
|
+
const COMPONENT_ID$l = 'forms.check_svg';
|
|
670
644
|
const StyledCheckSvg = styled__default.default(SvgCheckSmFill).attrs({
|
|
671
|
-
'data-garden-id': COMPONENT_ID$
|
|
672
|
-
'data-garden-version': '9.0.0-next.
|
|
645
|
+
'data-garden-id': COMPONENT_ID$l,
|
|
646
|
+
'data-garden-version': '9.0.0-next.10'
|
|
673
647
|
}).withConfig({
|
|
674
648
|
displayName: "StyledCheckSvg",
|
|
675
649
|
componentId: "sc-fvxetk-0"
|
|
676
|
-
})(["transition:opacity 0.25s ease-in-out;opacity:0;pointer-events:none;", ":checked ~ ", " > &{opacity:1;}", ":indeterminate ~ ", " > &{opacity:0;}", ";"], StyledCheckInput, StyledCheckLabel, StyledCheckInput, StyledCheckLabel, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$
|
|
650
|
+
})(["transition:opacity 0.25s ease-in-out;opacity:0;pointer-events:none;", ":checked ~ ", " > &{opacity:1;}", ":indeterminate ~ ", " > &{opacity:0;}", ";"], StyledCheckInput, StyledCheckLabel, StyledCheckInput, StyledCheckLabel, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$l, props));
|
|
677
651
|
StyledCheckSvg.defaultProps = {
|
|
678
652
|
theme: reactTheming.DEFAULT_THEME
|
|
679
653
|
};
|
|
@@ -696,31 +670,33 @@ var SvgDashFill = function SvgDashFill(props) {
|
|
|
696
670
|
})));
|
|
697
671
|
};
|
|
698
672
|
|
|
699
|
-
const COMPONENT_ID$
|
|
673
|
+
const COMPONENT_ID$k = 'forms.dash_svg';
|
|
700
674
|
const StyledDashSvg = styled__default.default(SvgDashFill).attrs({
|
|
701
|
-
'data-garden-id': COMPONENT_ID$
|
|
702
|
-
'data-garden-version': '9.0.0-next.
|
|
675
|
+
'data-garden-id': COMPONENT_ID$k,
|
|
676
|
+
'data-garden-version': '9.0.0-next.10'
|
|
703
677
|
}).withConfig({
|
|
704
678
|
displayName: "StyledDashSvg",
|
|
705
679
|
componentId: "sc-z3vq71-0"
|
|
706
|
-
})(["transition:opacity 0.25s ease-in-out;opacity:0;pointer-events:none;", ":indeterminate ~ ", " > &{opacity:1;}", ";"], StyledCheckInput, StyledCheckLabel, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$
|
|
680
|
+
})(["transition:opacity 0.25s ease-in-out;opacity:0;pointer-events:none;", ":indeterminate ~ ", " > &{opacity:1;}", ";"], StyledCheckInput, StyledCheckLabel, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$k, props));
|
|
707
681
|
StyledDashSvg.defaultProps = {
|
|
708
682
|
theme: reactTheming.DEFAULT_THEME
|
|
709
683
|
};
|
|
710
684
|
|
|
711
|
-
const COMPONENT_ID$
|
|
712
|
-
const colorStyles$
|
|
713
|
-
const baseColor = reactTheming.
|
|
714
|
-
const hoverColor = reactTheming.
|
|
715
|
-
const activeColor = reactTheming.
|
|
716
|
-
const disabledBackgroundColor = reactTheming.
|
|
717
|
-
const disabledForegroundColor = reactTheming.
|
|
718
|
-
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.
|
|
685
|
+
const COMPONENT_ID$j = 'forms.file_upload';
|
|
686
|
+
const colorStyles$5 = props => {
|
|
687
|
+
const baseColor = reactTheming.getColorV8('primaryHue', 600, props.theme);
|
|
688
|
+
const hoverColor = reactTheming.getColorV8('primaryHue', 700, props.theme);
|
|
689
|
+
const activeColor = reactTheming.getColorV8('primaryHue', 800, props.theme);
|
|
690
|
+
const disabledBackgroundColor = reactTheming.getColorV8('neutralHue', 200, props.theme);
|
|
691
|
+
const disabledForegroundColor = reactTheming.getColorV8('neutralHue', 400, props.theme);
|
|
692
|
+
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({
|
|
719
693
|
theme: props.theme,
|
|
720
|
-
|
|
694
|
+
color: {
|
|
695
|
+
hue: baseColor
|
|
696
|
+
}
|
|
721
697
|
}), activeColor, polished.rgba(baseColor, 0.2), activeColor, disabledForegroundColor, disabledBackgroundColor, disabledForegroundColor);
|
|
722
698
|
};
|
|
723
|
-
const sizeStyles$
|
|
699
|
+
const sizeStyles$8 = props => {
|
|
724
700
|
const marginTop = `${props.theme.space.base * (props.isCompact ? 1 : 2)}px`;
|
|
725
701
|
const paddingHorizontal = `${props.isCompact ? 2 : 4}em`;
|
|
726
702
|
const paddingVertical = polished.math(`${props.theme.space.base * (props.isCompact ? 2.5 : 5)} - ${props.theme.borderWidths.sm}`);
|
|
@@ -729,56 +705,58 @@ const sizeStyles$b = props => {
|
|
|
729
705
|
return styled.css(["padding:", " ", ";min-width:4em;line-height:", ";font-size:", ";", ":not([hidden]) + &&,", " + &&,", " + &&,&& + ", ",&& + ", "{margin-top:", ";}"], paddingVertical, paddingHorizontal, lineHeight, fontSize, StyledLabel, StyledHint, StyledMessage, StyledHint, StyledMessage, marginTop);
|
|
730
706
|
};
|
|
731
707
|
const StyledFileUpload = styled__default.default.div.attrs({
|
|
732
|
-
'data-garden-id': COMPONENT_ID$
|
|
733
|
-
'data-garden-version': '9.0.0-next.
|
|
708
|
+
'data-garden-id': COMPONENT_ID$j,
|
|
709
|
+
'data-garden-version': '9.0.0-next.10'
|
|
734
710
|
}).withConfig({
|
|
735
711
|
displayName: "StyledFileUpload",
|
|
736
712
|
componentId: "sc-1rodjgn-0"
|
|
737
|
-
})(["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$
|
|
713
|
+
})(["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$8, colorStyles$5, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$j, props));
|
|
738
714
|
StyledFileUpload.defaultProps = {
|
|
739
715
|
theme: reactTheming.DEFAULT_THEME
|
|
740
716
|
};
|
|
741
717
|
|
|
742
|
-
const COMPONENT_ID$
|
|
718
|
+
const COMPONENT_ID$i = 'forms.file.close';
|
|
743
719
|
const StyledFileClose = styled__default.default.button.attrs({
|
|
744
|
-
'data-garden-id': COMPONENT_ID$
|
|
745
|
-
'data-garden-version': '9.0.0-next.
|
|
720
|
+
'data-garden-id': COMPONENT_ID$i,
|
|
721
|
+
'data-garden-version': '9.0.0-next.10'
|
|
746
722
|
}).withConfig({
|
|
747
723
|
displayName: "StyledFileClose",
|
|
748
724
|
componentId: "sc-1m31jbf-0"
|
|
749
|
-
})(["display:flex;flex-shrink:0;align-items:center;justify-content:center;transition:opacity 0.25s ease-in-out;opacity:0.8;border:none;background:transparent;cursor:pointer;color:", ";appearance:none;&:hover{opacity:0.9;}&:focus{outline:none;}", ";"], props => props.theme
|
|
725
|
+
})(["display:flex;flex-shrink:0;align-items:center;justify-content:center;transition:opacity 0.25s ease-in-out;opacity:0.8;border:none;background:transparent;cursor:pointer;color:", ";appearance:none;&:hover{opacity:0.9;}&:focus{outline:none;}", ";"], props => reactTheming.getColorV8('foreground', 600 , props.theme), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$i, props));
|
|
750
726
|
StyledFileClose.defaultProps = {
|
|
751
727
|
theme: reactTheming.DEFAULT_THEME
|
|
752
728
|
};
|
|
753
729
|
|
|
754
|
-
const COMPONENT_ID$
|
|
755
|
-
const colorStyles$
|
|
730
|
+
const COMPONENT_ID$h = 'forms.file';
|
|
731
|
+
const colorStyles$4 = props => {
|
|
756
732
|
let borderColor;
|
|
757
733
|
let focusBorderColor;
|
|
758
734
|
let foregroundColor;
|
|
759
735
|
if (props.validation === 'success') {
|
|
760
|
-
borderColor = reactTheming.
|
|
736
|
+
borderColor = reactTheming.getColorV8('successHue', 600, props.theme);
|
|
761
737
|
focusBorderColor = borderColor;
|
|
762
738
|
foregroundColor = borderColor;
|
|
763
739
|
} else if (props.validation === 'error') {
|
|
764
|
-
borderColor = reactTheming.
|
|
740
|
+
borderColor = reactTheming.getColorV8('dangerHue', 600, props.theme);
|
|
765
741
|
focusBorderColor = borderColor;
|
|
766
742
|
foregroundColor = borderColor;
|
|
767
743
|
} else {
|
|
768
|
-
borderColor = reactTheming.
|
|
769
|
-
focusBorderColor = reactTheming.
|
|
770
|
-
foregroundColor = props.theme
|
|
744
|
+
borderColor = reactTheming.getColorV8('neutralHue', 300, props.theme);
|
|
745
|
+
focusBorderColor = reactTheming.getColorV8('primaryHue', 600, props.theme);
|
|
746
|
+
foregroundColor = reactTheming.getColorV8('foreground', 600 , props.theme);
|
|
771
747
|
}
|
|
772
748
|
return styled.css(["border-color:", ";color:", ";", ""], borderColor, foregroundColor, reactTheming.focusStyles({
|
|
773
749
|
theme: props.theme,
|
|
774
750
|
inset: props.focusInset,
|
|
775
|
-
|
|
751
|
+
color: {
|
|
752
|
+
hue: focusBorderColor
|
|
753
|
+
},
|
|
776
754
|
styles: {
|
|
777
755
|
borderColor: focusBorderColor
|
|
778
756
|
}
|
|
779
757
|
}));
|
|
780
758
|
};
|
|
781
|
-
const sizeStyles$
|
|
759
|
+
const sizeStyles$7 = props => {
|
|
782
760
|
const size = `${props.theme.space.base * (props.isCompact ? 7 : 10)}px`;
|
|
783
761
|
const spacing = `${props.theme.space.base * (props.isCompact ? 2 : 3)}px`;
|
|
784
762
|
const fontSize = props.theme.fontSizes.md;
|
|
@@ -804,68 +782,60 @@ const sizeStyles$a = props => {
|
|
|
804
782
|
`;
|
|
805
783
|
};
|
|
806
784
|
const StyledFile = styled__default.default.div.attrs({
|
|
807
|
-
'data-garden-id': COMPONENT_ID$
|
|
808
|
-
'data-garden-version': '9.0.0-next.
|
|
785
|
+
'data-garden-id': COMPONENT_ID$h,
|
|
786
|
+
'data-garden-version': '9.0.0-next.10'
|
|
809
787
|
}).withConfig({
|
|
810
788
|
displayName: "StyledFile",
|
|
811
789
|
componentId: "sc-195lzp1-0"
|
|
812
|
-
})(["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$
|
|
790
|
+
})(["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$7, colorStyles$4, props => props.theme.rtl ? 'right' : 'left', props => reactTheming.retrieveComponentStyles(COMPONENT_ID$h, props));
|
|
813
791
|
StyledFile.defaultProps = {
|
|
814
792
|
theme: reactTheming.DEFAULT_THEME
|
|
815
793
|
};
|
|
816
794
|
|
|
817
|
-
const COMPONENT_ID$
|
|
795
|
+
const COMPONENT_ID$g = 'forms.file.delete';
|
|
818
796
|
const StyledFileDelete = styled__default.default(StyledFileClose).attrs({
|
|
819
|
-
'data-garden-id': COMPONENT_ID$
|
|
820
|
-
'data-garden-version': '9.0.0-next.
|
|
797
|
+
'data-garden-id': COMPONENT_ID$g,
|
|
798
|
+
'data-garden-version': '9.0.0-next.10'
|
|
821
799
|
}).withConfig({
|
|
822
800
|
displayName: "StyledFileDelete",
|
|
823
801
|
componentId: "sc-a8nnhx-0"
|
|
824
|
-
})(["color:", ";", ";"], props => reactTheming.
|
|
802
|
+
})(["color:", ";", ";"], props => reactTheming.getColorV8('dangerHue', 600, props.theme), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$g, props));
|
|
825
803
|
StyledFileDelete.defaultProps = {
|
|
826
804
|
theme: reactTheming.DEFAULT_THEME
|
|
827
805
|
};
|
|
828
806
|
|
|
829
|
-
const COMPONENT_ID$
|
|
830
|
-
const StyledFileIcon = styled__default.default(
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
isCompact,
|
|
834
|
-
theme,
|
|
835
|
-
...props
|
|
836
|
-
} = _ref;
|
|
837
|
-
return React__namespace.default.cloneElement(React.Children.only(children), props);
|
|
838
|
-
}).attrs({
|
|
839
|
-
'data-garden-id': COMPONENT_ID$j,
|
|
840
|
-
'data-garden-version': '9.0.0-next.1'
|
|
807
|
+
const COMPONENT_ID$f = 'forms.file.icon';
|
|
808
|
+
const StyledFileIcon = styled__default.default(reactTheming.StyledBaseIcon).attrs({
|
|
809
|
+
'data-garden-id': COMPONENT_ID$f,
|
|
810
|
+
'data-garden-version': '9.0.0-next.10'
|
|
841
811
|
}).withConfig({
|
|
842
812
|
displayName: "StyledFileIcon",
|
|
843
813
|
componentId: "sc-7b3q0c-0"
|
|
844
|
-
})(["flex-shrink:0;width:", ";margin-", ":", "px;", ";"], props => props
|
|
814
|
+
})(["flex-shrink:0;width:", ";margin-", ":", "px;", ";"], props => props.$isCompact ? props.theme.iconSizes.sm : props.theme.iconSizes.md, props => props.theme.rtl ? 'left' : 'right', props => props.theme.space.base * 2, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$f, props));
|
|
845
815
|
StyledFileIcon.defaultProps = {
|
|
846
816
|
theme: reactTheming.DEFAULT_THEME
|
|
847
817
|
};
|
|
848
818
|
|
|
849
|
-
const COMPONENT_ID$
|
|
819
|
+
const COMPONENT_ID$e = 'forms.file_list';
|
|
850
820
|
const StyledFileList = styled__default.default.ul.attrs({
|
|
851
|
-
'data-garden-id': COMPONENT_ID$
|
|
852
|
-
'data-garden-version': '9.0.0-next.
|
|
821
|
+
'data-garden-id': COMPONENT_ID$e,
|
|
822
|
+
'data-garden-version': '9.0.0-next.10'
|
|
853
823
|
}).withConfig({
|
|
854
824
|
displayName: "StyledFileList",
|
|
855
825
|
componentId: "sc-gbahjg-0"
|
|
856
|
-
})(["margin:0;padding:0;list-style:none;", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$
|
|
826
|
+
})(["margin:0;padding:0;list-style:none;", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$e, props));
|
|
857
827
|
StyledFileList.defaultProps = {
|
|
858
828
|
theme: reactTheming.DEFAULT_THEME
|
|
859
829
|
};
|
|
860
830
|
|
|
861
|
-
const COMPONENT_ID$
|
|
831
|
+
const COMPONENT_ID$d = 'forms.file_list.item';
|
|
862
832
|
const StyledFileListItem = styled__default.default.li.attrs({
|
|
863
|
-
'data-garden-id': COMPONENT_ID$
|
|
864
|
-
'data-garden-version': '9.0.0-next.
|
|
833
|
+
'data-garden-id': COMPONENT_ID$d,
|
|
834
|
+
'data-garden-version': '9.0.0-next.10'
|
|
865
835
|
}).withConfig({
|
|
866
836
|
displayName: "StyledFileListItem",
|
|
867
837
|
componentId: "sc-1ova3lo-0"
|
|
868
|
-
})(["&:not(:first-child),", " ~ ", " > &:first-child{margin-top:", "px;}", ";"], StyledFileUpload, StyledFileList, props => props.theme.space.base * 2, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$
|
|
838
|
+
})(["&:not(:first-child),", " ~ ", " > &:first-child{margin-top:", "px;}", ";"], StyledFileUpload, StyledFileList, props => props.theme.space.base * 2, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$d, props));
|
|
869
839
|
StyledFileListItem.defaultProps = {
|
|
870
840
|
theme: reactTheming.DEFAULT_THEME
|
|
871
841
|
};
|
|
@@ -888,56 +858,56 @@ var SvgCircleSmFill$1 = function SvgCircleSmFill(props) {
|
|
|
888
858
|
})));
|
|
889
859
|
};
|
|
890
860
|
|
|
891
|
-
const COMPONENT_ID$
|
|
861
|
+
const COMPONENT_ID$c = 'forms.radio_svg';
|
|
892
862
|
const StyledRadioSvg = styled__default.default(SvgCircleSmFill$1).attrs({
|
|
893
|
-
'data-garden-id': COMPONENT_ID$
|
|
894
|
-
'data-garden-version': '9.0.0-next.
|
|
863
|
+
'data-garden-id': COMPONENT_ID$c,
|
|
864
|
+
'data-garden-version': '9.0.0-next.10'
|
|
895
865
|
}).withConfig({
|
|
896
866
|
displayName: "StyledRadioSvg",
|
|
897
867
|
componentId: "sc-1r1qtr1-0"
|
|
898
|
-
})(["transition:opacity 0.25s ease-in-out;opacity:0;", ":checked ~ ", " > &{opacity:1;}", ";"], StyledRadioInput, StyledRadioLabel, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$
|
|
868
|
+
})(["transition:opacity 0.25s ease-in-out;opacity:0;", ":checked ~ ", " > &{opacity:1;}", ";"], StyledRadioInput, StyledRadioLabel, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$c, props));
|
|
899
869
|
StyledRadioSvg.defaultProps = {
|
|
900
870
|
theme: reactTheming.DEFAULT_THEME
|
|
901
871
|
};
|
|
902
872
|
|
|
903
|
-
const COMPONENT_ID$
|
|
904
|
-
const sizeStyles$
|
|
873
|
+
const COMPONENT_ID$b = 'forms.toggle_label';
|
|
874
|
+
const sizeStyles$6 = props => {
|
|
905
875
|
const size = props.theme.space.base * 10;
|
|
906
876
|
const padding = size + props.theme.space.base * 2;
|
|
907
877
|
return styled.css(["padding-", ":", "px;&[hidden]{padding-", ":", "px;}"], props.theme.rtl ? 'right' : 'left', padding, props.theme.rtl ? 'right' : 'left', size);
|
|
908
878
|
};
|
|
909
879
|
const StyledToggleLabel = styled__default.default(StyledCheckLabel).attrs({
|
|
910
|
-
'data-garden-id': COMPONENT_ID$
|
|
911
|
-
'data-garden-version': '9.0.0-next.
|
|
880
|
+
'data-garden-id': COMPONENT_ID$b,
|
|
881
|
+
'data-garden-version': '9.0.0-next.10'
|
|
912
882
|
}).withConfig({
|
|
913
883
|
displayName: "StyledToggleLabel",
|
|
914
884
|
componentId: "sc-e0asdk-0"
|
|
915
|
-
})(["", ";", ";"], props => sizeStyles$
|
|
885
|
+
})(["", ";", ";"], props => sizeStyles$6(props), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$b, props));
|
|
916
886
|
StyledToggleLabel.defaultProps = {
|
|
917
887
|
theme: reactTheming.DEFAULT_THEME
|
|
918
888
|
};
|
|
919
889
|
|
|
920
|
-
const COMPONENT_ID$
|
|
890
|
+
const COMPONENT_ID$a = 'forms.toggle_hint';
|
|
921
891
|
const StyledToggleHint = styled__default.default(StyledHint).attrs({
|
|
922
|
-
'data-garden-id': COMPONENT_ID$
|
|
923
|
-
'data-garden-version': '9.0.0-next.
|
|
892
|
+
'data-garden-id': COMPONENT_ID$a,
|
|
893
|
+
'data-garden-version': '9.0.0-next.10'
|
|
924
894
|
}).withConfig({
|
|
925
895
|
displayName: "StyledToggleHint",
|
|
926
896
|
componentId: "sc-nziggu-0"
|
|
927
|
-
})(["padding-", ":", ";", ";"], props => props.theme.rtl ? 'right' : 'left', props => polished.math(`${props.theme.space.base} * 12px`), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$
|
|
897
|
+
})(["padding-", ":", ";", ";"], props => props.theme.rtl ? 'right' : 'left', props => polished.math(`${props.theme.space.base} * 12px`), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$a, props));
|
|
928
898
|
StyledToggleHint.defaultProps = {
|
|
929
899
|
theme: reactTheming.DEFAULT_THEME
|
|
930
900
|
};
|
|
931
901
|
|
|
932
|
-
const COMPONENT_ID$
|
|
933
|
-
const colorStyles$
|
|
902
|
+
const COMPONENT_ID$9 = 'forms.toggle';
|
|
903
|
+
const colorStyles$3 = props => {
|
|
934
904
|
const SHADE = 600;
|
|
935
|
-
const backgroundColor = reactTheming.
|
|
936
|
-
const hoverBackgroundColor = reactTheming.
|
|
937
|
-
const activeBackgroundColor = reactTheming.
|
|
905
|
+
const backgroundColor = reactTheming.getColorV8('neutralHue', SHADE - 100, props.theme);
|
|
906
|
+
const hoverBackgroundColor = reactTheming.getColorV8('neutralHue', SHADE, props.theme);
|
|
907
|
+
const activeBackgroundColor = reactTheming.getColorV8('neutralHue', SHADE + 100, props.theme);
|
|
938
908
|
return styled.css(["& ~ ", "::before{background-color:", ";}&:enabled ~ ", ":hover::before{background-color:", ";}&:enabled ~ ", ":active::before{background-color:", ";}"], StyledToggleLabel, backgroundColor, StyledToggleLabel, hoverBackgroundColor, StyledToggleLabel, activeBackgroundColor);
|
|
939
909
|
};
|
|
940
|
-
const sizeStyles$
|
|
910
|
+
const sizeStyles$5 = props => {
|
|
941
911
|
const height = `${props.theme.space.base * 5}px`;
|
|
942
912
|
const width = `${props.theme.space.base * 10}px`;
|
|
943
913
|
const iconSize = props.theme.iconSizes.md;
|
|
@@ -946,24 +916,24 @@ const sizeStyles$8 = props => {
|
|
|
946
916
|
return styled.css(["top:0;width:", ";height:", ";& ~ ", "::before{width:", ";height:", ";}& ~ ", " > svg{top:", ";", ":", ";width:", ";height:", ";}&:checked ~ ", " > svg{", ":", ";}"], width, height, StyledToggleLabel, width, height, StyledToggleLabel, iconPosition, props.theme.rtl ? 'right' : 'left', iconPosition, iconSize, iconSize, StyledToggleLabel, props.theme.rtl ? 'right' : 'left', checkedIconPosition);
|
|
947
917
|
};
|
|
948
918
|
const StyledToggleInput = styled__default.default(StyledCheckInput).attrs({
|
|
949
|
-
'data-garden-id': COMPONENT_ID$
|
|
950
|
-
'data-garden-version': '9.0.0-next.
|
|
919
|
+
'data-garden-id': COMPONENT_ID$9,
|
|
920
|
+
'data-garden-version': '9.0.0-next.10'
|
|
951
921
|
}).withConfig({
|
|
952
922
|
displayName: "StyledToggleInput",
|
|
953
923
|
componentId: "sc-sgp47s-0"
|
|
954
|
-
})(["& ~ ", "::before{top:0;transition:box-shadow .1s ease-in-out,background-color .15s ease-in-out,color .25s ease-in-out;border:none;border-radius:100px;}", ";", ";", ";"], StyledToggleLabel, props => sizeStyles$
|
|
924
|
+
})(["& ~ ", "::before{top:0;transition:box-shadow .1s ease-in-out,background-color .15s ease-in-out,color .25s ease-in-out;border:none;border-radius:100px;}", ";", ";", ";"], StyledToggleLabel, props => sizeStyles$5(props), props => colorStyles$3(props), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$9, props));
|
|
955
925
|
StyledToggleInput.defaultProps = {
|
|
956
926
|
theme: reactTheming.DEFAULT_THEME
|
|
957
927
|
};
|
|
958
928
|
|
|
959
|
-
const COMPONENT_ID$
|
|
929
|
+
const COMPONENT_ID$8 = 'forms.toggle_message';
|
|
960
930
|
const StyledToggleMessage = styled__default.default(StyledMessage).attrs({
|
|
961
|
-
'data-garden-id': COMPONENT_ID$
|
|
962
|
-
'data-garden-version': '9.0.0-next.
|
|
931
|
+
'data-garden-id': COMPONENT_ID$8,
|
|
932
|
+
'data-garden-version': '9.0.0-next.10'
|
|
963
933
|
}).withConfig({
|
|
964
934
|
displayName: "StyledToggleMessage",
|
|
965
935
|
componentId: "sc-13vuvl1-0"
|
|
966
|
-
})(["padding-", ":", ";& ", "{", ":", ";}", ";"], props => props.theme.rtl ? 'right' : 'left', props => polished.math(`${props.theme.space.base} * 12px`), StyledMessageIcon, props => props.theme.rtl ? 'right' : 'left', props => polished.math(`${props.theme.space.base} * 10px - ${props.theme.iconSizes.md}`), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$
|
|
936
|
+
})(["padding-", ":", ";& ", "{", ":", ";}", ";"], props => props.theme.rtl ? 'right' : 'left', props => polished.math(`${props.theme.space.base} * 12px`), StyledMessageIcon, props => props.theme.rtl ? 'right' : 'left', props => polished.math(`${props.theme.space.base} * 10px - ${props.theme.iconSizes.md}`), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$8, props));
|
|
967
937
|
StyledToggleMessage.defaultProps = {
|
|
968
938
|
theme: reactTheming.DEFAULT_THEME
|
|
969
939
|
};
|
|
@@ -986,45 +956,45 @@ var SvgCircleSmFill = function SvgCircleSmFill(props) {
|
|
|
986
956
|
})));
|
|
987
957
|
};
|
|
988
958
|
|
|
989
|
-
const COMPONENT_ID$
|
|
959
|
+
const COMPONENT_ID$7 = 'forms.toggle_svg';
|
|
990
960
|
const StyledToggleSvg = styled__default.default(SvgCircleSmFill).attrs({
|
|
991
|
-
'data-garden-id': COMPONENT_ID$
|
|
992
|
-
'data-garden-version': '9.0.0-next.
|
|
961
|
+
'data-garden-id': COMPONENT_ID$7,
|
|
962
|
+
'data-garden-version': '9.0.0-next.10'
|
|
993
963
|
}).withConfig({
|
|
994
964
|
displayName: "StyledToggleSvg",
|
|
995
965
|
componentId: "sc-162xbyx-0"
|
|
996
|
-
})(["transition:all 0.15s ease-in-out;", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$
|
|
966
|
+
})(["transition:all 0.15s ease-in-out;", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$7, props));
|
|
997
967
|
StyledToggleSvg.defaultProps = {
|
|
998
968
|
theme: reactTheming.DEFAULT_THEME
|
|
999
969
|
};
|
|
1000
970
|
|
|
1001
|
-
const COMPONENT_ID$
|
|
1002
|
-
const colorStyles$
|
|
1003
|
-
const color = reactTheming.
|
|
1004
|
-
return styled.css(["&:hover + ", ",&:focus + ", ",&:focus-visible + ", "
|
|
971
|
+
const COMPONENT_ID$6 = 'forms.select';
|
|
972
|
+
const colorStyles$2 = props => {
|
|
973
|
+
const color = reactTheming.getColorV8('neutralHue', 700, props.theme);
|
|
974
|
+
return styled.css(["&:hover + ", ",&:focus + ", ",&:focus-visible + ", "{color:", ";}"], StyledTextMediaFigure, StyledTextMediaFigure, StyledTextMediaFigure, color);
|
|
1005
975
|
};
|
|
1006
|
-
const sizeStyles$
|
|
976
|
+
const sizeStyles$4 = props => {
|
|
1007
977
|
const padding = polished.math(`${props.theme.iconSizes.md} + ${props.theme.space.base * 5}`);
|
|
1008
978
|
const iconVerticalPosition = `${props.theme.space.base * (props.isCompact ? 1.5 : 2.5) + 1}px`;
|
|
1009
979
|
const iconHorizontalPosition = `${props.theme.space.base * 3}px`;
|
|
1010
980
|
return styled.css(["padding-", ":", ";& + ", "{top:", ";", ":", ";}"], props.theme.rtl ? 'left' : 'right', !props.isBare && padding, StyledTextMediaFigure, iconVerticalPosition, props.theme.rtl ? 'left' : 'right', iconHorizontalPosition);
|
|
1011
981
|
};
|
|
1012
982
|
const StyledSelect = styled__default.default(StyledTextInput).attrs({
|
|
1013
|
-
'data-garden-id': COMPONENT_ID$
|
|
1014
|
-
'data-garden-version': '9.0.0-next.
|
|
983
|
+
'data-garden-id': COMPONENT_ID$6,
|
|
984
|
+
'data-garden-version': '9.0.0-next.10',
|
|
1015
985
|
as: 'select'
|
|
1016
986
|
}).withConfig({
|
|
1017
987
|
displayName: "StyledSelect",
|
|
1018
988
|
componentId: "sc-8xdxpt-0"
|
|
1019
|
-
})(["cursor:pointer;text-overflow:ellipsis;", ";", ";&::-ms-expand{display:none;}&::-ms-value{background-color:transparent;color:inherit;}&:-moz-focusring{transition:none;text-shadow:0 0 0 ", ";color:transparent;}& + ", "{position:absolute;pointer-events:none;}"], props => sizeStyles$
|
|
989
|
+
})(["cursor:pointer;text-overflow:ellipsis;", ";", ";&::-ms-expand{display:none;}&::-ms-value{background-color:transparent;color:inherit;}&:-moz-focusring{transition:none;text-shadow:0 0 0 ", ";color:transparent;}& + ", "{position:absolute;pointer-events:none;}"], props => sizeStyles$4(props), props => colorStyles$2(props), props => reactTheming.getColorV8('foreground', 600 , props.theme), StyledTextMediaFigure);
|
|
1020
990
|
StyledSelect.defaultProps = {
|
|
1021
991
|
theme: reactTheming.DEFAULT_THEME
|
|
1022
992
|
};
|
|
1023
993
|
|
|
1024
|
-
const COMPONENT_ID$
|
|
994
|
+
const COMPONENT_ID$5 = 'forms.select_wrapper';
|
|
1025
995
|
const StyledSelectWrapper = styled__default.default(StyledTextFauxInput).attrs({
|
|
1026
|
-
'data-garden-id': COMPONENT_ID$
|
|
1027
|
-
'data-garden-version': '9.0.0-next.
|
|
996
|
+
'data-garden-id': COMPONENT_ID$5,
|
|
997
|
+
'data-garden-version': '9.0.0-next.10'
|
|
1028
998
|
}).withConfig({
|
|
1029
999
|
displayName: "StyledSelectWrapper",
|
|
1030
1000
|
componentId: "sc-i7b6hw-0"
|
|
@@ -1033,7 +1003,7 @@ StyledSelectWrapper.defaultProps = {
|
|
|
1033
1003
|
theme: reactTheming.DEFAULT_THEME
|
|
1034
1004
|
};
|
|
1035
1005
|
|
|
1036
|
-
const COMPONENT_ID$
|
|
1006
|
+
const COMPONENT_ID$4 = 'forms.range';
|
|
1037
1007
|
const thumbStyles = function (styles) {
|
|
1038
1008
|
let modifier = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
1039
1009
|
return `
|
|
@@ -1078,21 +1048,21 @@ const trackLowerStyles = function (styles) {
|
|
|
1078
1048
|
}
|
|
1079
1049
|
`;
|
|
1080
1050
|
};
|
|
1081
|
-
const colorStyles$
|
|
1051
|
+
const colorStyles$1 = props => {
|
|
1082
1052
|
const SHADE = 600;
|
|
1083
|
-
const thumbBackgroundColor = reactTheming.
|
|
1053
|
+
const thumbBackgroundColor = reactTheming.getColorV8('primaryHue', SHADE, props.theme);
|
|
1084
1054
|
const thumbBorderColor = thumbBackgroundColor;
|
|
1085
|
-
const thumbBoxShadow = props.theme.shadows.lg(polished.math(`${props.theme.space.base} * 1px`), polished.math(`${props.theme.space.base} * 2px`), reactTheming.
|
|
1055
|
+
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));
|
|
1086
1056
|
const thumbFocusBoxShadow = reactTheming.getFocusBoxShadow({
|
|
1087
1057
|
theme: props.theme
|
|
1088
1058
|
});
|
|
1089
|
-
const thumbActiveBackgroundColor = reactTheming.
|
|
1059
|
+
const thumbActiveBackgroundColor = reactTheming.getColorV8('primaryHue', SHADE + 100, props.theme);
|
|
1090
1060
|
const thumbActiveBorderColor = thumbBorderColor;
|
|
1091
|
-
const thumbDisabledBackgroundColor = reactTheming.
|
|
1061
|
+
const thumbDisabledBackgroundColor = reactTheming.getColorV8('neutralHue', SHADE - 300, props.theme);
|
|
1092
1062
|
const thumbDisabledBorderColor = thumbDisabledBackgroundColor;
|
|
1093
1063
|
const thumbHoverBackgroundColor = thumbActiveBackgroundColor;
|
|
1094
1064
|
const thumbHoverBorderColor = thumbHoverBackgroundColor;
|
|
1095
|
-
const trackBackgroundColor = reactTheming.
|
|
1065
|
+
const trackBackgroundColor = reactTheming.getColorV8('neutralHue', SHADE - 400, props.theme);
|
|
1096
1066
|
const trackLowerBackgroundColor = props.hasLowerTrack ? thumbBackgroundColor : '';
|
|
1097
1067
|
const trackBackgroundImage = props.hasLowerTrack ? `linear-gradient(${trackLowerBackgroundColor}, ${trackLowerBackgroundColor})` : '';
|
|
1098
1068
|
const trackDisabledLowerBackgroundColor = props.hasLowerTrack ? thumbDisabledBackgroundColor : '';
|
|
@@ -1114,7 +1084,7 @@ const colorStyles$3 = props => {
|
|
|
1114
1084
|
background-color: ${thumbHoverBackgroundColor};
|
|
1115
1085
|
`, ':hover'), thumbStyles(`
|
|
1116
1086
|
box-shadow: ${thumbFocusBoxShadow};
|
|
1117
|
-
`, '
|
|
1087
|
+
`, ':focus-visible'), thumbStyles(`
|
|
1118
1088
|
border-color: ${thumbActiveBorderColor};
|
|
1119
1089
|
background-color: ${thumbActiveBackgroundColor};
|
|
1120
1090
|
`, ':active'), trackStyles(`
|
|
@@ -1127,7 +1097,7 @@ const colorStyles$3 = props => {
|
|
|
1127
1097
|
background-color: ${trackDisabledLowerBackgroundColor};
|
|
1128
1098
|
`, ':disabled'));
|
|
1129
1099
|
};
|
|
1130
|
-
const sizeStyles$
|
|
1100
|
+
const sizeStyles$3 = props => {
|
|
1131
1101
|
const thumbSize = polished.math(`${props.theme.space.base} * 5px`);
|
|
1132
1102
|
const trackHeight = polished.math(`${props.theme.space.base} * 1.5px`);
|
|
1133
1103
|
const trackBorderRadius = trackHeight;
|
|
@@ -1148,8 +1118,8 @@ const sizeStyles$6 = props => {
|
|
|
1148
1118
|
`));
|
|
1149
1119
|
};
|
|
1150
1120
|
const StyledRangeInput = styled__default.default.input.attrs(props => ({
|
|
1151
|
-
'data-garden-id': COMPONENT_ID$
|
|
1152
|
-
'data-garden-version': '9.0.0-next.
|
|
1121
|
+
'data-garden-id': COMPONENT_ID$4,
|
|
1122
|
+
'data-garden-version': '9.0.0-next.10',
|
|
1153
1123
|
type: 'range',
|
|
1154
1124
|
style: {
|
|
1155
1125
|
backgroundSize: props.hasLowerTrack && props.backgroundSize
|
|
@@ -1166,113 +1136,19 @@ const StyledRangeInput = styled__default.default.input.attrs(props => ({
|
|
|
1166
1136
|
width: 99.8%; /* fix for IE which cuts off the upper track's border radius */
|
|
1167
1137
|
color: transparent; /* reset for IE */
|
|
1168
1138
|
box-sizing: border-box; /* reset for IE */
|
|
1169
|
-
`), props => sizeStyles$
|
|
1139
|
+
`), props => sizeStyles$3(props), props => thumbStyles(`
|
|
1170
1140
|
appearance: none;
|
|
1171
1141
|
transition: box-shadow .1s ease-in-out;
|
|
1172
1142
|
border: ${props.theme.borders.md};
|
|
1173
1143
|
border-radius: 100%;
|
|
1174
1144
|
box-sizing: border-box;
|
|
1175
|
-
`), props => colorStyles$
|
|
1145
|
+
`), props => colorStyles$1(props), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$4, props));
|
|
1176
1146
|
StyledRangeInput.defaultProps = {
|
|
1177
1147
|
backgroundSize: '0%',
|
|
1178
1148
|
hasLowerTrack: true,
|
|
1179
1149
|
theme: reactTheming.DEFAULT_THEME
|
|
1180
1150
|
};
|
|
1181
1151
|
|
|
1182
|
-
const COMPONENT_ID$7 = 'forms.slider';
|
|
1183
|
-
const StyledSlider = styled__default.default.div.attrs({
|
|
1184
|
-
'data-garden-id': COMPONENT_ID$7,
|
|
1185
|
-
'data-garden-version': '9.0.0-next.1'
|
|
1186
|
-
}).withConfig({
|
|
1187
|
-
displayName: "StyledSlider",
|
|
1188
|
-
componentId: "sc-1di437a-0"
|
|
1189
|
-
})(["display:block;position:relative;z-index:0;cursor:pointer;height:", ";&[aria-disabled='true']{cursor:default;}", ":not([hidden]) + &,", " + &,", " + &,& + ", ",& + ", "{margin-top:", ";}", ";"], props => polished.math(`(${props.theme.space.base} * 5px) + (${props.theme.shadowWidths.md} * 2)`), StyledLabel, StyledHint, StyledMessage, StyledHint, StyledMessage, props => polished.math(`${props.theme.space.base} * 2px`), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$7, props));
|
|
1190
|
-
StyledSlider.defaultProps = {
|
|
1191
|
-
theme: reactTheming.DEFAULT_THEME
|
|
1192
|
-
};
|
|
1193
|
-
|
|
1194
|
-
const COMPONENT_ID$6 = 'forms.slider_thumb';
|
|
1195
|
-
const colorStyles$2 = props => {
|
|
1196
|
-
const SHADE = 600;
|
|
1197
|
-
const backgroundColor = reactTheming.getColor('primaryHue', SHADE, props.theme);
|
|
1198
|
-
const borderColor = backgroundColor;
|
|
1199
|
-
const boxShadow = 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));
|
|
1200
|
-
const activeBackgroundColor = reactTheming.getColor('primaryHue', SHADE + 100, props.theme);
|
|
1201
|
-
const activeBorderColor = borderColor;
|
|
1202
|
-
const hoverBackgroundColor = activeBackgroundColor;
|
|
1203
|
-
const hoverBorderColor = hoverBackgroundColor;
|
|
1204
|
-
const disabledBackgroundColor = reactTheming.getColor('neutralHue', SHADE - 300, props.theme);
|
|
1205
|
-
const disabledBorderColor = disabledBackgroundColor;
|
|
1206
|
-
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({
|
|
1207
|
-
theme: props.theme
|
|
1208
|
-
}), activeBorderColor, activeBackgroundColor, disabledBorderColor, disabledBackgroundColor);
|
|
1209
|
-
};
|
|
1210
|
-
const sizeStyles$5 = props => {
|
|
1211
|
-
const size = polished.math(`${props.theme.space.base} * 5px`);
|
|
1212
|
-
const marginTop = polished.math(`${size} / -2`);
|
|
1213
|
-
return styled.css(["margin-top:", ";width:", ";height:", ";"], marginTop, size, size);
|
|
1214
|
-
};
|
|
1215
|
-
const StyledSliderThumb = styled__default.default.div.attrs(props => ({
|
|
1216
|
-
'data-garden-id': COMPONENT_ID$6,
|
|
1217
|
-
'data-garden-version': '9.0.0-next.1',
|
|
1218
|
-
'aria-disabled': props.isDisabled
|
|
1219
|
-
})).withConfig({
|
|
1220
|
-
displayName: "StyledSliderThumb",
|
|
1221
|
-
componentId: "sc-yspbwa-0"
|
|
1222
|
-
})(["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));
|
|
1223
|
-
StyledSliderThumb.defaultProps = {
|
|
1224
|
-
position: 0,
|
|
1225
|
-
theme: reactTheming.DEFAULT_THEME
|
|
1226
|
-
};
|
|
1227
|
-
|
|
1228
|
-
const COMPONENT_ID$5 = 'forms.slider_track';
|
|
1229
|
-
const colorStyles$1 = props => {
|
|
1230
|
-
const SHADE = 600;
|
|
1231
|
-
const backgroundColor = reactTheming.getColor('neutralHue', SHADE - 400, props.theme);
|
|
1232
|
-
const backgroundImageColor = reactTheming.getColor('primaryHue', SHADE, props.theme);
|
|
1233
|
-
const disabledBackgroundColor = reactTheming.getColor('neutralHue', SHADE - 300, props.theme);
|
|
1234
|
-
return styled.css(["background-color:", ";background-image:linear-gradient(", ",", ");&[aria-disabled='true']{background-image:linear-gradient(", ",", ");}"], backgroundColor, backgroundImageColor, backgroundImageColor, disabledBackgroundColor, disabledBackgroundColor);
|
|
1235
|
-
};
|
|
1236
|
-
const sizeStyles$4 = props => {
|
|
1237
|
-
const height = polished.math(`${props.theme.space.base} * 1.5px`);
|
|
1238
|
-
const backgroundPosition = polished.math(`${props.backgroundPosition} * 1px`);
|
|
1239
|
-
const backgroundSize = polished.math(`${props.backgroundSize} * 1px`);
|
|
1240
|
-
const borderRadius = height;
|
|
1241
|
-
const marginTop = polished.math(`${height} / -2`);
|
|
1242
|
-
const padding = polished.math(`${props.theme.space.base} * 2.5px`);
|
|
1243
|
-
return styled.css(["margin-top:", ";border-radius:", ";background-position:", ";background-size:", ";padding:0 ", ";"], marginTop, borderRadius, backgroundPosition, backgroundSize, padding);
|
|
1244
|
-
};
|
|
1245
|
-
const StyledSliderTrack = styled__default.default.div.attrs(props => ({
|
|
1246
|
-
'data-garden-id': COMPONENT_ID$5,
|
|
1247
|
-
'data-garden-version': '9.0.0-next.1',
|
|
1248
|
-
'aria-disabled': props.isDisabled
|
|
1249
|
-
})).withConfig({
|
|
1250
|
-
displayName: "StyledSliderTrack",
|
|
1251
|
-
componentId: "sc-aw5m6g-0"
|
|
1252
|
-
})(["position:absolute;top:50%;box-sizing:border-box;background-origin:content-box;background-repeat:repeat-y;width:100%;", ";", ";", ";"], props => sizeStyles$4(props), props => colorStyles$1(props), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$5, props));
|
|
1253
|
-
StyledSliderTrack.defaultProps = {
|
|
1254
|
-
backgroundSize: 0,
|
|
1255
|
-
backgroundPosition: 0,
|
|
1256
|
-
theme: reactTheming.DEFAULT_THEME
|
|
1257
|
-
};
|
|
1258
|
-
|
|
1259
|
-
const COMPONENT_ID$4 = 'forms.slider_track_rail';
|
|
1260
|
-
const sizeStyles$3 = props => {
|
|
1261
|
-
const height = polished.math(`${props.theme.space.base} * 1.5px`);
|
|
1262
|
-
const margin = polished.math(`${props.theme.space.base} * 2.5px`);
|
|
1263
|
-
return styled.css(["margin:0 ", " 0 ", ";height:", ";"], props.theme.rtl ? `-${margin}` : margin, props.theme.rtl ? margin : `-${margin}`, height);
|
|
1264
|
-
};
|
|
1265
|
-
const StyledSliderTrackRail = styled__default.default.div.attrs({
|
|
1266
|
-
'data-garden-id': COMPONENT_ID$4,
|
|
1267
|
-
'data-garden-version': '9.0.0-next.1'
|
|
1268
|
-
}).withConfig({
|
|
1269
|
-
displayName: "StyledSliderTrackRail",
|
|
1270
|
-
componentId: "sc-1o5owbd-0"
|
|
1271
|
-
})(["position:relative;", ";", ";"], props => sizeStyles$3(props), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$4, props));
|
|
1272
|
-
StyledSliderTrackRail.defaultProps = {
|
|
1273
|
-
theme: reactTheming.DEFAULT_THEME
|
|
1274
|
-
};
|
|
1275
|
-
|
|
1276
1152
|
const COMPONENT_ID$3 = 'forms.tile_icon';
|
|
1277
1153
|
const sizeStyles$2 = props => {
|
|
1278
1154
|
const iconSize = polished.math(`${props.theme.iconSizes.md} * 2`);
|
|
@@ -1291,7 +1167,7 @@ const sizeStyles$2 = props => {
|
|
|
1291
1167
|
};
|
|
1292
1168
|
const StyledTileIcon = styled__default.default.span.attrs({
|
|
1293
1169
|
'data-garden-id': COMPONENT_ID$3,
|
|
1294
|
-
'data-garden-version': '9.0.0-next.
|
|
1170
|
+
'data-garden-version': '9.0.0-next.10'
|
|
1295
1171
|
}).withConfig({
|
|
1296
1172
|
displayName: "StyledTileIcon",
|
|
1297
1173
|
componentId: "sc-1wazhg4-0"
|
|
@@ -1303,36 +1179,38 @@ StyledTileIcon.defaultProps = {
|
|
|
1303
1179
|
const COMPONENT_ID$2 = 'forms.tile';
|
|
1304
1180
|
const colorStyles = props => {
|
|
1305
1181
|
const SHADE = 600;
|
|
1306
|
-
const iconColor = reactTheming.
|
|
1307
|
-
const color = reactTheming.
|
|
1308
|
-
const borderColor = reactTheming.
|
|
1309
|
-
const hoverBackgroundColor = reactTheming.
|
|
1310
|
-
const hoverBorderColor = reactTheming.
|
|
1182
|
+
const iconColor = reactTheming.getColorV8('neutralHue', SHADE, props.theme);
|
|
1183
|
+
const color = reactTheming.getColorV8('neutralHue', SHADE + 200, props.theme);
|
|
1184
|
+
const borderColor = reactTheming.getColorV8('neutralHue', SHADE - 300, props.theme);
|
|
1185
|
+
const hoverBackgroundColor = reactTheming.getColorV8('primaryHue', SHADE, props.theme, 0.08);
|
|
1186
|
+
const hoverBorderColor = reactTheming.getColorV8('primaryHue', SHADE, props.theme);
|
|
1311
1187
|
const focusBorderColor = hoverBorderColor;
|
|
1312
|
-
const activeBackgroundColor = reactTheming.
|
|
1188
|
+
const activeBackgroundColor = reactTheming.getColorV8('primaryHue', SHADE, props.theme, 0.2);
|
|
1313
1189
|
const activeBorderColor = focusBorderColor;
|
|
1314
|
-
const disabledBackgroundColor = reactTheming.
|
|
1315
|
-
const disabledBorderColor = reactTheming.
|
|
1316
|
-
const disabledColor = reactTheming.
|
|
1190
|
+
const disabledBackgroundColor = reactTheming.getColorV8('neutralHue', SHADE - 500, props.theme);
|
|
1191
|
+
const disabledBorderColor = reactTheming.getColorV8('neutralHue', SHADE - 400, props.theme);
|
|
1192
|
+
const disabledColor = reactTheming.getColorV8('neutralHue', SHADE - 200, props.theme);
|
|
1317
1193
|
const selectedBorderColor = focusBorderColor;
|
|
1318
1194
|
const selectedBackgroundColor = selectedBorderColor;
|
|
1319
|
-
const selectedHoverBorderColor = reactTheming.
|
|
1195
|
+
const selectedHoverBorderColor = reactTheming.getColorV8('primaryHue', SHADE + 100, props.theme);
|
|
1320
1196
|
const selectedHoverBackgroundColor = selectedHoverBorderColor;
|
|
1321
|
-
const selectedActiveBorderColor = reactTheming.
|
|
1197
|
+
const selectedActiveBorderColor = reactTheming.getColorV8('primaryHue', SHADE + 200, props.theme);
|
|
1322
1198
|
const selectedActiveBackgroundColor = selectedActiveBorderColor;
|
|
1323
1199
|
const selectedDisabledBackgroundColor = disabledBorderColor;
|
|
1324
|
-
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.
|
|
1200
|
+
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, reactTheming.getColorV8('background', 600 , props.theme), color, StyledTileIcon, iconColor, hoverBorderColor, hoverBackgroundColor, StyledTileIcon, color, reactTheming.focusStyles({
|
|
1325
1201
|
theme: props.theme,
|
|
1326
|
-
|
|
1202
|
+
color: {
|
|
1203
|
+
hue: focusBorderColor
|
|
1204
|
+
},
|
|
1327
1205
|
styles: {
|
|
1328
1206
|
borderColor: focusBorderColor
|
|
1329
1207
|
},
|
|
1330
1208
|
selector: `&:focus-within`
|
|
1331
|
-
}), activeBorderColor, activeBackgroundColor, StyledTileIcon, color, selectedBorderColor, selectedBackgroundColor, props.theme.
|
|
1209
|
+
}), activeBorderColor, activeBackgroundColor, StyledTileIcon, color, selectedBorderColor, selectedBackgroundColor, reactTheming.getColorV8('background', 600 , props.theme), StyledTileIcon, reactTheming.getColorV8('background', 600 , props.theme), selectedHoverBorderColor, selectedHoverBackgroundColor, reactTheming.getColorV8('background', 600 , props.theme), StyledTileIcon, reactTheming.getColorV8('background', 600 , props.theme), selectedActiveBorderColor, selectedActiveBackgroundColor, reactTheming.getColorV8('background', 600 , props.theme), StyledTileIcon, reactTheming.getColorV8('background', 600 , props.theme), disabledBorderColor, disabledBackgroundColor, disabledColor, StyledTileIcon, disabledColor, selectedDisabledBackgroundColor, disabledColor, StyledTileIcon, disabledColor);
|
|
1332
1210
|
};
|
|
1333
1211
|
const StyledTile = styled__default.default.label.attrs(props => ({
|
|
1334
1212
|
'data-garden-id': COMPONENT_ID$2,
|
|
1335
|
-
'data-garden-version': '9.0.0-next.
|
|
1213
|
+
'data-garden-version': '9.0.0-next.10',
|
|
1336
1214
|
'data-garden-selected': props.isSelected
|
|
1337
1215
|
})).withConfig({
|
|
1338
1216
|
displayName: "StyledTile",
|
|
@@ -1356,7 +1234,7 @@ const sizeStyles$1 = props => {
|
|
|
1356
1234
|
};
|
|
1357
1235
|
const StyledTileDescription = styled__default.default.span.attrs({
|
|
1358
1236
|
'data-garden-id': COMPONENT_ID$1,
|
|
1359
|
-
'data-garden-version': '9.0.0-next.
|
|
1237
|
+
'data-garden-version': '9.0.0-next.10'
|
|
1360
1238
|
}).withConfig({
|
|
1361
1239
|
displayName: "StyledTileDescription",
|
|
1362
1240
|
componentId: "sc-xfuu7u-0"
|
|
@@ -1389,7 +1267,7 @@ const sizeStyles = props => {
|
|
|
1389
1267
|
};
|
|
1390
1268
|
const StyledTileLabel = styled__default.default.span.attrs({
|
|
1391
1269
|
'data-garden-id': COMPONENT_ID,
|
|
1392
|
-
'data-garden-version': '9.0.0-next.
|
|
1270
|
+
'data-garden-version': '9.0.0-next.10'
|
|
1393
1271
|
}).withConfig({
|
|
1394
1272
|
displayName: "StyledTileLabel",
|
|
1395
1273
|
componentId: "sc-1mypv27-0"
|
|
@@ -1398,75 +1276,6 @@ StyledTileLabel.defaultProps = {
|
|
|
1398
1276
|
theme: reactTheming.DEFAULT_THEME
|
|
1399
1277
|
};
|
|
1400
1278
|
|
|
1401
|
-
const Field = React__namespace.default.forwardRef((props, ref) => {
|
|
1402
|
-
const [hasHint, setHasHint] = React.useState(false);
|
|
1403
|
-
const [hasMessage, setHasMessage] = React.useState(false);
|
|
1404
|
-
const [isLabelActive, setIsLabelActive] = React.useState(false);
|
|
1405
|
-
const [isLabelHovered, setIsLabelHovered] = React.useState(false);
|
|
1406
|
-
const multiThumbRangeRef = React.useRef(null);
|
|
1407
|
-
const {
|
|
1408
|
-
getInputProps,
|
|
1409
|
-
getMessageProps,
|
|
1410
|
-
...propGetters
|
|
1411
|
-
} = containerField.useField({
|
|
1412
|
-
idPrefix: props.id,
|
|
1413
|
-
hasHint,
|
|
1414
|
-
hasMessage
|
|
1415
|
-
});
|
|
1416
|
-
const fieldProps = React.useMemo(() => ({
|
|
1417
|
-
...propGetters,
|
|
1418
|
-
getInputProps,
|
|
1419
|
-
getMessageProps,
|
|
1420
|
-
isLabelActive,
|
|
1421
|
-
setIsLabelActive,
|
|
1422
|
-
isLabelHovered,
|
|
1423
|
-
setIsLabelHovered,
|
|
1424
|
-
hasHint,
|
|
1425
|
-
setHasHint,
|
|
1426
|
-
hasMessage,
|
|
1427
|
-
setHasMessage,
|
|
1428
|
-
multiThumbRangeRef
|
|
1429
|
-
}), [propGetters, getInputProps, getMessageProps, isLabelActive, isLabelHovered, hasHint, hasMessage]);
|
|
1430
|
-
return React__namespace.default.createElement(FieldContext.Provider, {
|
|
1431
|
-
value: fieldProps
|
|
1432
|
-
}, React__namespace.default.createElement(StyledField, _extends$t({}, props, {
|
|
1433
|
-
ref: ref
|
|
1434
|
-
})));
|
|
1435
|
-
});
|
|
1436
|
-
Field.displayName = 'Field';
|
|
1437
|
-
|
|
1438
|
-
const FieldsetContext = React.createContext(undefined);
|
|
1439
|
-
const useFieldsetContext = () => {
|
|
1440
|
-
const fieldsetContext = React.useContext(FieldsetContext);
|
|
1441
|
-
return fieldsetContext;
|
|
1442
|
-
};
|
|
1443
|
-
|
|
1444
|
-
const LegendComponent = React.forwardRef((props, ref) => {
|
|
1445
|
-
const fieldsetContext = useFieldsetContext();
|
|
1446
|
-
return React__namespace.default.createElement(StyledLegend, _extends$t({}, props, fieldsetContext, {
|
|
1447
|
-
ref: ref
|
|
1448
|
-
}));
|
|
1449
|
-
});
|
|
1450
|
-
LegendComponent.displayName = 'Fieldset.Legend';
|
|
1451
|
-
const Legend = LegendComponent;
|
|
1452
|
-
|
|
1453
|
-
const FieldsetComponent = React.forwardRef((props, ref) => {
|
|
1454
|
-
const fieldsetContext = React.useMemo(() => ({
|
|
1455
|
-
isCompact: props.isCompact
|
|
1456
|
-
}), [props.isCompact]);
|
|
1457
|
-
return React__namespace.default.createElement(FieldsetContext.Provider, {
|
|
1458
|
-
value: fieldsetContext
|
|
1459
|
-
}, React__namespace.default.createElement(StyledFieldset, _extends$t({}, props, {
|
|
1460
|
-
ref: ref
|
|
1461
|
-
})));
|
|
1462
|
-
});
|
|
1463
|
-
FieldsetComponent.displayName = 'Fieldset';
|
|
1464
|
-
FieldsetComponent.propTypes = {
|
|
1465
|
-
isCompact: PropTypes__default.default.bool
|
|
1466
|
-
};
|
|
1467
|
-
const Fieldset = FieldsetComponent;
|
|
1468
|
-
Fieldset.Legend = Legend;
|
|
1469
|
-
|
|
1470
1279
|
const InputContext = React.createContext(undefined);
|
|
1471
1280
|
const useInputContext = () => {
|
|
1472
1281
|
return React.useContext(InputContext);
|
|
@@ -1503,12 +1312,77 @@ const Hint = React__namespace.default.forwardRef((props, ref) => {
|
|
|
1503
1312
|
if (getHintProps) {
|
|
1504
1313
|
combinedProps = getHintProps(combinedProps);
|
|
1505
1314
|
}
|
|
1506
|
-
return React__namespace.default.createElement(HintComponent,
|
|
1315
|
+
return React__namespace.default.createElement(HintComponent, Object.assign({
|
|
1507
1316
|
ref: ref
|
|
1508
1317
|
}, combinedProps));
|
|
1509
1318
|
});
|
|
1510
1319
|
Hint.displayName = 'Hint';
|
|
1511
1320
|
|
|
1321
|
+
const VALIDATION = ['success', 'warning', 'error'];
|
|
1322
|
+
const FILE_VALIDATION = ['success', 'error'];
|
|
1323
|
+
const FILE_TYPE = ['pdf', 'zip', 'image', 'document', 'spreadsheet', 'presentation', 'generic'];
|
|
1324
|
+
|
|
1325
|
+
const Message = React__namespace.default.forwardRef((_ref, ref) => {
|
|
1326
|
+
let {
|
|
1327
|
+
validation,
|
|
1328
|
+
validationLabel,
|
|
1329
|
+
children,
|
|
1330
|
+
...props
|
|
1331
|
+
} = _ref;
|
|
1332
|
+
const {
|
|
1333
|
+
hasMessage,
|
|
1334
|
+
setHasMessage,
|
|
1335
|
+
getMessageProps
|
|
1336
|
+
} = useFieldContext() || {};
|
|
1337
|
+
const type = useInputContext();
|
|
1338
|
+
React.useEffect(() => {
|
|
1339
|
+
if (!hasMessage && setHasMessage) {
|
|
1340
|
+
setHasMessage(true);
|
|
1341
|
+
}
|
|
1342
|
+
return () => {
|
|
1343
|
+
if (hasMessage && setHasMessage) {
|
|
1344
|
+
setHasMessage(false);
|
|
1345
|
+
}
|
|
1346
|
+
};
|
|
1347
|
+
}, [hasMessage, setHasMessage]);
|
|
1348
|
+
let MessageComponent;
|
|
1349
|
+
if (type === 'checkbox') {
|
|
1350
|
+
MessageComponent = StyledCheckMessage;
|
|
1351
|
+
} else if (type === 'radio') {
|
|
1352
|
+
MessageComponent = StyledRadioMessage;
|
|
1353
|
+
} else if (type === 'toggle') {
|
|
1354
|
+
MessageComponent = StyledToggleMessage;
|
|
1355
|
+
} else {
|
|
1356
|
+
MessageComponent = StyledMessage;
|
|
1357
|
+
}
|
|
1358
|
+
let combinedProps = {
|
|
1359
|
+
validation,
|
|
1360
|
+
validationLabel,
|
|
1361
|
+
...props
|
|
1362
|
+
};
|
|
1363
|
+
if (getMessageProps) {
|
|
1364
|
+
combinedProps = getMessageProps(combinedProps);
|
|
1365
|
+
}
|
|
1366
|
+
const ariaLabel = reactTheming.useText(Message, combinedProps, 'validationLabel', validation, validation !== undefined);
|
|
1367
|
+
return React__namespace.default.createElement(MessageComponent, Object.assign({
|
|
1368
|
+
ref: ref
|
|
1369
|
+
}, combinedProps), validation && React__namespace.default.createElement(StyledMessageIcon, {
|
|
1370
|
+
validation: validation,
|
|
1371
|
+
"aria-label": ariaLabel
|
|
1372
|
+
}), children);
|
|
1373
|
+
});
|
|
1374
|
+
Message.displayName = 'Message';
|
|
1375
|
+
Message.propTypes = {
|
|
1376
|
+
validation: PropTypes__default.default.oneOf(VALIDATION),
|
|
1377
|
+
validationLabel: PropTypes__default.default.string
|
|
1378
|
+
};
|
|
1379
|
+
|
|
1380
|
+
const FieldsetContext = React.createContext(undefined);
|
|
1381
|
+
const useFieldsetContext = () => {
|
|
1382
|
+
const fieldsetContext = React.useContext(FieldsetContext);
|
|
1383
|
+
return fieldsetContext;
|
|
1384
|
+
};
|
|
1385
|
+
|
|
1512
1386
|
const Label$1 = React__namespace.default.forwardRef((props, ref) => {
|
|
1513
1387
|
const fieldContext = useFieldContext();
|
|
1514
1388
|
const fieldsetContext = useFieldsetContext();
|
|
@@ -1519,8 +1393,7 @@ const Label$1 = React__namespace.default.forwardRef((props, ref) => {
|
|
|
1519
1393
|
if (type === undefined) {
|
|
1520
1394
|
const {
|
|
1521
1395
|
setIsLabelActive,
|
|
1522
|
-
setIsLabelHovered
|
|
1523
|
-
multiThumbRangeRef
|
|
1396
|
+
setIsLabelHovered
|
|
1524
1397
|
} = fieldContext;
|
|
1525
1398
|
combinedProps = {
|
|
1526
1399
|
...combinedProps,
|
|
@@ -1535,9 +1408,6 @@ const Label$1 = React__namespace.default.forwardRef((props, ref) => {
|
|
|
1535
1408
|
}),
|
|
1536
1409
|
onMouseLeave: containerUtilities.composeEventHandlers(props.onMouseLeave, () => {
|
|
1537
1410
|
setIsLabelHovered(false);
|
|
1538
|
-
}),
|
|
1539
|
-
onClick: containerUtilities.composeEventHandlers(props.onClick, () => {
|
|
1540
|
-
multiThumbRangeRef.current && multiThumbRangeRef.current.focus();
|
|
1541
1411
|
})
|
|
1542
1412
|
};
|
|
1543
1413
|
}
|
|
@@ -1549,7 +1419,7 @@ const Label$1 = React__namespace.default.forwardRef((props, ref) => {
|
|
|
1549
1419
|
};
|
|
1550
1420
|
}
|
|
1551
1421
|
if (type === 'radio') {
|
|
1552
|
-
return React__namespace.default.createElement(StyledRadioLabel,
|
|
1422
|
+
return React__namespace.default.createElement(StyledRadioLabel, Object.assign({
|
|
1553
1423
|
ref: ref
|
|
1554
1424
|
}, combinedProps), React__namespace.default.createElement(StyledRadioSvg, null), props.children);
|
|
1555
1425
|
} else if (type === 'checkbox') {
|
|
@@ -1572,15 +1442,15 @@ const Label$1 = React__namespace.default.forwardRef((props, ref) => {
|
|
|
1572
1442
|
...combinedProps,
|
|
1573
1443
|
onClick: containerUtilities.composeEventHandlers(combinedProps.onClick, onLabelSelect)
|
|
1574
1444
|
};
|
|
1575
|
-
return React__namespace.default.createElement(StyledCheckLabel,
|
|
1445
|
+
return React__namespace.default.createElement(StyledCheckLabel, Object.assign({
|
|
1576
1446
|
ref: ref
|
|
1577
1447
|
}, combinedProps), React__namespace.default.createElement(StyledCheckSvg, null), React__namespace.default.createElement(StyledDashSvg, null), props.children);
|
|
1578
1448
|
} else if (type === 'toggle') {
|
|
1579
|
-
return React__namespace.default.createElement(StyledToggleLabel,
|
|
1449
|
+
return React__namespace.default.createElement(StyledToggleLabel, Object.assign({
|
|
1580
1450
|
ref: ref
|
|
1581
1451
|
}, combinedProps), React__namespace.default.createElement(StyledToggleSvg, null), props.children);
|
|
1582
1452
|
}
|
|
1583
|
-
return React__namespace.default.createElement(StyledLabel,
|
|
1453
|
+
return React__namespace.default.createElement(StyledLabel, Object.assign({
|
|
1584
1454
|
ref: ref
|
|
1585
1455
|
}, combinedProps));
|
|
1586
1456
|
});
|
|
@@ -1589,64 +1459,70 @@ Label$1.propTypes = {
|
|
|
1589
1459
|
isRegular: PropTypes__default.default.bool
|
|
1590
1460
|
};
|
|
1591
1461
|
|
|
1592
|
-
const
|
|
1593
|
-
const
|
|
1594
|
-
const
|
|
1595
|
-
|
|
1596
|
-
const
|
|
1597
|
-
let {
|
|
1598
|
-
validation,
|
|
1599
|
-
validationLabel,
|
|
1600
|
-
children,
|
|
1601
|
-
...props
|
|
1602
|
-
} = _ref;
|
|
1462
|
+
const FieldComponent = React__namespace.default.forwardRef((props, ref) => {
|
|
1463
|
+
const [hasHint, setHasHint] = React.useState(false);
|
|
1464
|
+
const [hasMessage, setHasMessage] = React.useState(false);
|
|
1465
|
+
const [isLabelActive, setIsLabelActive] = React.useState(false);
|
|
1466
|
+
const [isLabelHovered, setIsLabelHovered] = React.useState(false);
|
|
1603
1467
|
const {
|
|
1468
|
+
getInputProps,
|
|
1469
|
+
getMessageProps,
|
|
1470
|
+
...propGetters
|
|
1471
|
+
} = containerField.useField({
|
|
1472
|
+
idPrefix: props.id,
|
|
1473
|
+
hasHint,
|
|
1474
|
+
hasMessage
|
|
1475
|
+
});
|
|
1476
|
+
const fieldProps = React.useMemo(() => ({
|
|
1477
|
+
...propGetters,
|
|
1478
|
+
getInputProps,
|
|
1479
|
+
getMessageProps,
|
|
1480
|
+
isLabelActive,
|
|
1481
|
+
setIsLabelActive,
|
|
1482
|
+
isLabelHovered,
|
|
1483
|
+
setIsLabelHovered,
|
|
1484
|
+
hasHint,
|
|
1485
|
+
setHasHint,
|
|
1604
1486
|
hasMessage,
|
|
1605
|
-
setHasMessage
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
if (!hasMessage && setHasMessage) {
|
|
1611
|
-
setHasMessage(true);
|
|
1612
|
-
}
|
|
1613
|
-
return () => {
|
|
1614
|
-
if (hasMessage && setHasMessage) {
|
|
1615
|
-
setHasMessage(false);
|
|
1616
|
-
}
|
|
1617
|
-
};
|
|
1618
|
-
}, [hasMessage, setHasMessage]);
|
|
1619
|
-
let MessageComponent;
|
|
1620
|
-
if (type === 'checkbox') {
|
|
1621
|
-
MessageComponent = StyledCheckMessage;
|
|
1622
|
-
} else if (type === 'radio') {
|
|
1623
|
-
MessageComponent = StyledRadioMessage;
|
|
1624
|
-
} else if (type === 'toggle') {
|
|
1625
|
-
MessageComponent = StyledToggleMessage;
|
|
1626
|
-
} else {
|
|
1627
|
-
MessageComponent = StyledMessage;
|
|
1628
|
-
}
|
|
1629
|
-
let combinedProps = {
|
|
1630
|
-
validation,
|
|
1631
|
-
validationLabel,
|
|
1632
|
-
...props
|
|
1633
|
-
};
|
|
1634
|
-
if (getMessageProps) {
|
|
1635
|
-
combinedProps = getMessageProps(combinedProps);
|
|
1636
|
-
}
|
|
1637
|
-
const ariaLabel = reactTheming.useText(Message, combinedProps, 'validationLabel', validation, validation !== undefined);
|
|
1638
|
-
return React__namespace.default.createElement(MessageComponent, _extends$t({
|
|
1487
|
+
setHasMessage
|
|
1488
|
+
}), [propGetters, getInputProps, getMessageProps, isLabelActive, isLabelHovered, hasHint, hasMessage]);
|
|
1489
|
+
return React__namespace.default.createElement(FieldContext.Provider, {
|
|
1490
|
+
value: fieldProps
|
|
1491
|
+
}, React__namespace.default.createElement(StyledField, Object.assign({}, props, {
|
|
1639
1492
|
ref: ref
|
|
1640
|
-
}
|
|
1641
|
-
validation: validation,
|
|
1642
|
-
"aria-label": ariaLabel
|
|
1643
|
-
}), children);
|
|
1493
|
+
})));
|
|
1644
1494
|
});
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1495
|
+
FieldComponent.displayName = 'Field';
|
|
1496
|
+
const Field = FieldComponent;
|
|
1497
|
+
Field.Hint = Hint;
|
|
1498
|
+
Field.Label = Label$1;
|
|
1499
|
+
Field.Message = Message;
|
|
1500
|
+
|
|
1501
|
+
const LegendComponent = React.forwardRef((props, ref) => {
|
|
1502
|
+
const fieldsetContext = useFieldsetContext();
|
|
1503
|
+
return React__namespace.default.createElement(StyledLegend, Object.assign({}, props, fieldsetContext, {
|
|
1504
|
+
ref: ref
|
|
1505
|
+
}));
|
|
1506
|
+
});
|
|
1507
|
+
LegendComponent.displayName = 'Fieldset.Legend';
|
|
1508
|
+
const Legend = LegendComponent;
|
|
1509
|
+
|
|
1510
|
+
const FieldsetComponent = React.forwardRef((props, ref) => {
|
|
1511
|
+
const fieldsetContext = React.useMemo(() => ({
|
|
1512
|
+
isCompact: props.isCompact
|
|
1513
|
+
}), [props.isCompact]);
|
|
1514
|
+
return React__namespace.default.createElement(FieldsetContext.Provider, {
|
|
1515
|
+
value: fieldsetContext
|
|
1516
|
+
}, React__namespace.default.createElement(StyledFieldset, Object.assign({}, props, {
|
|
1517
|
+
ref: ref
|
|
1518
|
+
})));
|
|
1519
|
+
});
|
|
1520
|
+
FieldsetComponent.displayName = 'Fieldset';
|
|
1521
|
+
FieldsetComponent.propTypes = {
|
|
1522
|
+
isCompact: PropTypes__default.default.bool
|
|
1649
1523
|
};
|
|
1524
|
+
const Fieldset = FieldsetComponent;
|
|
1525
|
+
Fieldset.Legend = Legend;
|
|
1650
1526
|
|
|
1651
1527
|
const Checkbox = React__namespace.default.forwardRef((_ref, ref) => {
|
|
1652
1528
|
let {
|
|
@@ -1956,15 +1832,33 @@ var SvgChevronDownStroke = function SvgChevronDownStroke(props) {
|
|
|
1956
1832
|
})));
|
|
1957
1833
|
};
|
|
1958
1834
|
|
|
1959
|
-
const StartIconComponent =
|
|
1960
|
-
|
|
1961
|
-
|
|
1835
|
+
const StartIconComponent = _ref => {
|
|
1836
|
+
let {
|
|
1837
|
+
isDisabled,
|
|
1838
|
+
isRotated,
|
|
1839
|
+
...props
|
|
1840
|
+
} = _ref;
|
|
1841
|
+
return React__namespace.default.createElement(StyledTextMediaFigure, Object.assign({
|
|
1842
|
+
$position: "start",
|
|
1843
|
+
$isDisabled: isDisabled,
|
|
1844
|
+
$isRotated: isRotated
|
|
1845
|
+
}, props));
|
|
1846
|
+
};
|
|
1962
1847
|
StartIconComponent.displayName = 'FauxInput.StartIcon';
|
|
1963
1848
|
const StartIcon = StartIconComponent;
|
|
1964
1849
|
|
|
1965
|
-
const EndIconComponent =
|
|
1966
|
-
|
|
1967
|
-
|
|
1850
|
+
const EndIconComponent = _ref => {
|
|
1851
|
+
let {
|
|
1852
|
+
isDisabled,
|
|
1853
|
+
isRotated,
|
|
1854
|
+
...props
|
|
1855
|
+
} = _ref;
|
|
1856
|
+
return React__namespace.default.createElement(StyledTextMediaFigure, Object.assign({
|
|
1857
|
+
$position: "end",
|
|
1858
|
+
$isDisabled: isDisabled,
|
|
1859
|
+
$isRotated: isRotated
|
|
1860
|
+
}, props));
|
|
1861
|
+
};
|
|
1968
1862
|
EndIconComponent.displayName = 'FauxInput.EndIcon';
|
|
1969
1863
|
const EndIcon = EndIconComponent;
|
|
1970
1864
|
|
|
@@ -1984,7 +1878,7 @@ const FauxInputComponent = React.forwardRef((_ref, ref) => {
|
|
|
1984
1878
|
const onBlurHandler = containerUtilities.composeEventHandlers(onBlur, () => {
|
|
1985
1879
|
setIsFocused(false);
|
|
1986
1880
|
});
|
|
1987
|
-
return React__namespace.default.createElement(StyledTextFauxInput,
|
|
1881
|
+
return React__namespace.default.createElement(StyledTextFauxInput, Object.assign({
|
|
1988
1882
|
onFocus: onFocusHandler,
|
|
1989
1883
|
onBlur: onBlurHandler,
|
|
1990
1884
|
isFocused: controlledIsFocused === undefined ? isFocused : controlledIsFocused,
|
|
@@ -2049,110 +1943,6 @@ Select.propTypes = {
|
|
|
2049
1943
|
};
|
|
2050
1944
|
Select.displayName = 'Select';
|
|
2051
1945
|
|
|
2052
|
-
const MIN = 0;
|
|
2053
|
-
const MAX = 100;
|
|
2054
|
-
const MultiThumbRange = React.forwardRef((_ref, ref) => {
|
|
2055
|
-
let {
|
|
2056
|
-
min = MIN,
|
|
2057
|
-
max = MAX,
|
|
2058
|
-
minValue,
|
|
2059
|
-
maxValue,
|
|
2060
|
-
disabled,
|
|
2061
|
-
step,
|
|
2062
|
-
jump,
|
|
2063
|
-
onChange,
|
|
2064
|
-
onMouseDown,
|
|
2065
|
-
...props
|
|
2066
|
-
} = _ref;
|
|
2067
|
-
const theme = React.useContext(styled.ThemeContext);
|
|
2068
|
-
const environment = reactTheming.useDocument(theme);
|
|
2069
|
-
const trackRailRef = React.useRef(null);
|
|
2070
|
-
const minThumbRef = React.useRef(null);
|
|
2071
|
-
const maxThumbRef = React.useRef(null);
|
|
2072
|
-
const {
|
|
2073
|
-
getTrackProps,
|
|
2074
|
-
getMinThumbProps,
|
|
2075
|
-
getMaxThumbProps,
|
|
2076
|
-
trackRect,
|
|
2077
|
-
minValue: updatedMinValue,
|
|
2078
|
-
maxValue: updatedMaxValue
|
|
2079
|
-
} = containerSlider.useSlider({
|
|
2080
|
-
trackRef: trackRailRef,
|
|
2081
|
-
minThumbRef,
|
|
2082
|
-
maxThumbRef,
|
|
2083
|
-
min,
|
|
2084
|
-
max,
|
|
2085
|
-
minValue,
|
|
2086
|
-
maxValue,
|
|
2087
|
-
onChange,
|
|
2088
|
-
step,
|
|
2089
|
-
jump,
|
|
2090
|
-
disabled,
|
|
2091
|
-
rtl: theme.rtl,
|
|
2092
|
-
environment
|
|
2093
|
-
});
|
|
2094
|
-
const {
|
|
2095
|
-
onMouseDown: onSliderMouseDown,
|
|
2096
|
-
...trackProps
|
|
2097
|
-
} = getTrackProps({
|
|
2098
|
-
onMouseDown
|
|
2099
|
-
});
|
|
2100
|
-
const fieldContext = useFieldContext();
|
|
2101
|
-
const {
|
|
2102
|
-
isLabelHovered,
|
|
2103
|
-
isLabelActive,
|
|
2104
|
-
multiThumbRangeRef
|
|
2105
|
-
} = fieldContext || {};
|
|
2106
|
-
React.useEffect(() => {
|
|
2107
|
-
if (multiThumbRangeRef) {
|
|
2108
|
-
multiThumbRangeRef.current = minThumbRef.current;
|
|
2109
|
-
}
|
|
2110
|
-
}, [multiThumbRangeRef]);
|
|
2111
|
-
const minPosition = (updatedMinValue - min) / (max - min) * trackRect.width;
|
|
2112
|
-
const maxPosition = (updatedMaxValue - min) / (max - min) * trackRect.width;
|
|
2113
|
-
const sliderBackgroundSize = Math.abs(maxPosition) - Math.abs(minPosition);
|
|
2114
|
-
return React__namespace.default.createElement(StyledSlider, _extends$t({
|
|
2115
|
-
ref: ref,
|
|
2116
|
-
onMouseDown: onSliderMouseDown
|
|
2117
|
-
}, props), React__namespace.default.createElement(StyledSliderTrack, {
|
|
2118
|
-
backgroundSize: sliderBackgroundSize,
|
|
2119
|
-
backgroundPosition: theme.rtl ? trackRect.width - maxPosition : minPosition,
|
|
2120
|
-
isDisabled: disabled
|
|
2121
|
-
}, React__namespace.default.createElement(StyledSliderTrackRail, _extends$t({}, trackProps, {
|
|
2122
|
-
ref: trackRailRef
|
|
2123
|
-
}), React__namespace.default.createElement(StyledSliderThumb, _extends$t({}, getMinThumbProps({
|
|
2124
|
-
'aria-label': updatedMinValue
|
|
2125
|
-
}), {
|
|
2126
|
-
isDisabled: disabled,
|
|
2127
|
-
position: minPosition,
|
|
2128
|
-
ref: minThumbRef,
|
|
2129
|
-
"data-garden-active": isLabelActive,
|
|
2130
|
-
"data-garden-hover": isLabelHovered
|
|
2131
|
-
})), React__namespace.default.createElement(StyledSliderThumb, _extends$t({}, getMaxThumbProps({
|
|
2132
|
-
'aria-label': updatedMaxValue
|
|
2133
|
-
}), {
|
|
2134
|
-
isDisabled: disabled,
|
|
2135
|
-
position: maxPosition,
|
|
2136
|
-
ref: maxThumbRef
|
|
2137
|
-
})))));
|
|
2138
|
-
});
|
|
2139
|
-
MultiThumbRange.displayName = 'MultiThumbRange';
|
|
2140
|
-
MultiThumbRange.propTypes = {
|
|
2141
|
-
min: PropTypes__default.default.number,
|
|
2142
|
-
max: PropTypes__default.default.number,
|
|
2143
|
-
minValue: PropTypes__default.default.number,
|
|
2144
|
-
maxValue: PropTypes__default.default.number,
|
|
2145
|
-
step: PropTypes__default.default.number,
|
|
2146
|
-
jump: PropTypes__default.default.number,
|
|
2147
|
-
disabled: PropTypes__default.default.bool,
|
|
2148
|
-
onChange: PropTypes__default.default.func
|
|
2149
|
-
};
|
|
2150
|
-
MultiThumbRange.defaultProps = {
|
|
2151
|
-
min: MIN,
|
|
2152
|
-
max: MAX,
|
|
2153
|
-
step: 1
|
|
2154
|
-
};
|
|
2155
|
-
|
|
2156
1946
|
const TilesContext = React.createContext(undefined);
|
|
2157
1947
|
const useTilesContext = () => {
|
|
2158
1948
|
return React.useContext(TilesContext);
|
|
@@ -2175,12 +1965,12 @@ const TileComponent = React__namespace.default.forwardRef((_ref, ref) => {
|
|
|
2175
1965
|
onChange: tilesContext.onChange
|
|
2176
1966
|
};
|
|
2177
1967
|
}
|
|
2178
|
-
return React__namespace.default.createElement(StyledTile,
|
|
1968
|
+
return React__namespace.default.createElement(StyledTile, Object.assign({
|
|
2179
1969
|
ref: ref,
|
|
2180
1970
|
"aria-disabled": disabled,
|
|
2181
1971
|
isDisabled: disabled,
|
|
2182
1972
|
isSelected: tilesContext && tilesContext.value === value
|
|
2183
|
-
}, props), children, React__namespace.default.createElement(StyledTileInput,
|
|
1973
|
+
}, props), children, React__namespace.default.createElement(StyledTileInput, Object.assign({}, inputProps, {
|
|
2184
1974
|
disabled: disabled,
|
|
2185
1975
|
value: value,
|
|
2186
1976
|
type: "radio",
|
|
@@ -2196,7 +1986,7 @@ const Tile = TileComponent;
|
|
|
2196
1986
|
|
|
2197
1987
|
const DescriptionComponent = React.forwardRef((props, ref) => {
|
|
2198
1988
|
const tilesContext = useTilesContext();
|
|
2199
|
-
return React__namespace.default.createElement(StyledTileDescription,
|
|
1989
|
+
return React__namespace.default.createElement(StyledTileDescription, Object.assign({
|
|
2200
1990
|
ref: ref,
|
|
2201
1991
|
isCentered: tilesContext && tilesContext.isCentered
|
|
2202
1992
|
}, props));
|
|
@@ -2206,7 +1996,7 @@ const Description = DescriptionComponent;
|
|
|
2206
1996
|
|
|
2207
1997
|
const IconComponent = React.forwardRef((props, ref) => {
|
|
2208
1998
|
const tileContext = useTilesContext();
|
|
2209
|
-
return React__namespace.default.createElement(StyledTileIcon,
|
|
1999
|
+
return React__namespace.default.createElement(StyledTileIcon, Object.assign({
|
|
2210
2000
|
ref: ref,
|
|
2211
2001
|
isCentered: tileContext && tileContext.isCentered
|
|
2212
2002
|
}, props));
|
|
@@ -2223,7 +2013,7 @@ const LabelComponent = React.forwardRef((props, forwardedRef) => {
|
|
|
2223
2013
|
setTitle(ref.current.textContent || undefined);
|
|
2224
2014
|
}
|
|
2225
2015
|
}, [ref]);
|
|
2226
|
-
return React__namespace.default.createElement(StyledTileLabel,
|
|
2016
|
+
return React__namespace.default.createElement(StyledTileLabel, Object.assign({
|
|
2227
2017
|
ref: reactMergeRefs.mergeRefs([ref, forwardedRef]),
|
|
2228
2018
|
title: title,
|
|
2229
2019
|
isCentered: tilesContext && tilesContext.isCentered
|
|
@@ -2259,7 +2049,7 @@ const TilesComponent = React.forwardRef((_ref, ref) => {
|
|
|
2259
2049
|
}), [handleOnChange, selectedValue, name, isCentered]);
|
|
2260
2050
|
return React__namespace.default.createElement(TilesContext.Provider, {
|
|
2261
2051
|
value: tileContext
|
|
2262
|
-
}, React__namespace.default.createElement("div",
|
|
2052
|
+
}, React__namespace.default.createElement("div", Object.assign({
|
|
2263
2053
|
ref: ref,
|
|
2264
2054
|
role: "radiogroup"
|
|
2265
2055
|
}, props)));
|
|
@@ -2290,7 +2080,7 @@ const InputGroup = React__namespace.default.forwardRef((_ref, ref) => {
|
|
|
2290
2080
|
}), [isCompact]);
|
|
2291
2081
|
return React__namespace.default.createElement(InputGroupContext.Provider, {
|
|
2292
2082
|
value: contextValue
|
|
2293
|
-
}, React__namespace.default.createElement(StyledInputGroup,
|
|
2083
|
+
}, React__namespace.default.createElement(StyledInputGroup, Object.assign({
|
|
2294
2084
|
ref: ref,
|
|
2295
2085
|
isCompact: isCompact
|
|
2296
2086
|
}, props)));
|
|
@@ -2306,7 +2096,7 @@ const FileUpload = React__namespace.default.forwardRef((_ref, ref) => {
|
|
|
2306
2096
|
...props
|
|
2307
2097
|
} = _ref;
|
|
2308
2098
|
return (
|
|
2309
|
-
React__namespace.default.createElement(StyledFileUpload,
|
|
2099
|
+
React__namespace.default.createElement(StyledFileUpload, Object.assign({
|
|
2310
2100
|
ref: ref,
|
|
2311
2101
|
"aria-disabled": disabled
|
|
2312
2102
|
}, props, {
|
|
@@ -2325,7 +2115,7 @@ const ItemComponent = React.forwardRef((_ref, ref) => {
|
|
|
2325
2115
|
let {
|
|
2326
2116
|
...props
|
|
2327
2117
|
} = _ref;
|
|
2328
|
-
return React__namespace.default.createElement(StyledFileListItem,
|
|
2118
|
+
return React__namespace.default.createElement(StyledFileListItem, Object.assign({}, props, {
|
|
2329
2119
|
ref: ref
|
|
2330
2120
|
}));
|
|
2331
2121
|
});
|
|
@@ -2336,7 +2126,7 @@ const FileListComponent = React.forwardRef((_ref, ref) => {
|
|
|
2336
2126
|
let {
|
|
2337
2127
|
...props
|
|
2338
2128
|
} = _ref;
|
|
2339
|
-
return React__namespace.default.createElement(StyledFileList,
|
|
2129
|
+
return React__namespace.default.createElement(StyledFileList, Object.assign({}, props, {
|
|
2340
2130
|
ref: ref
|
|
2341
2131
|
}));
|
|
2342
2132
|
});
|
|
@@ -2388,7 +2178,7 @@ const CloseComponent = React__namespace.default.forwardRef((props, ref) => {
|
|
|
2388
2178
|
const onMouseDown = containerUtilities.composeEventHandlers(props.onMouseDown, event => event.preventDefault()
|
|
2389
2179
|
);
|
|
2390
2180
|
const ariaLabel = reactTheming.useText(CloseComponent, props, 'aria-label', 'Close');
|
|
2391
|
-
return React__namespace.default.createElement(StyledFileClose,
|
|
2181
|
+
return React__namespace.default.createElement(StyledFileClose, Object.assign({
|
|
2392
2182
|
ref: ref,
|
|
2393
2183
|
"aria-label": ariaLabel
|
|
2394
2184
|
}, props, {
|
|
@@ -2441,7 +2231,7 @@ const DeleteComponent = React__namespace.default.forwardRef((props, ref) => {
|
|
|
2441
2231
|
const onMouseDown = containerUtilities.composeEventHandlers(props.onMouseDown, event => event.preventDefault()
|
|
2442
2232
|
);
|
|
2443
2233
|
const ariaLabel = reactTheming.useText(DeleteComponent, props, 'aria-label', 'Delete');
|
|
2444
|
-
return React__namespace.default.createElement(StyledFileDelete,
|
|
2234
|
+
return React__namespace.default.createElement(StyledFileDelete, Object.assign({
|
|
2445
2235
|
ref: ref,
|
|
2446
2236
|
"aria-label": ariaLabel
|
|
2447
2237
|
}, props, {
|
|
@@ -2826,13 +2616,13 @@ const FileComponent = React.forwardRef((_ref, ref) => {
|
|
|
2826
2616
|
const validationType = validation || type;
|
|
2827
2617
|
return React__namespace.default.createElement(FileContext.Provider, {
|
|
2828
2618
|
value: fileContextValue
|
|
2829
|
-
}, React__namespace.default.createElement(StyledFile,
|
|
2619
|
+
}, React__namespace.default.createElement(StyledFile, Object.assign({}, props, {
|
|
2830
2620
|
isCompact: isCompact,
|
|
2831
2621
|
focusInset: focusInset,
|
|
2832
2622
|
validation: validation,
|
|
2833
2623
|
ref: ref
|
|
2834
2624
|
}), validationType && React__namespace.default.createElement(StyledFileIcon, {
|
|
2835
|
-
isCompact: isCompact
|
|
2625
|
+
$isCompact: isCompact
|
|
2836
2626
|
}, isCompact ? fileIconsCompact[validationType] : fileIconsDefault[validationType]), React.Children.map(children, child => typeof child === 'string' ? React__namespace.default.createElement("span", null, child) : child)));
|
|
2837
2627
|
});
|
|
2838
2628
|
FileComponent.displayName = 'File';
|
|
@@ -2903,7 +2693,7 @@ const MediaInput = React__namespace.default.forwardRef((_ref, ref) => {
|
|
|
2903
2693
|
combinedProps = fieldContext.getInputProps(combinedProps);
|
|
2904
2694
|
isLabelHovered = fieldContext.isLabelHovered;
|
|
2905
2695
|
}
|
|
2906
|
-
return React__namespace.default.createElement(FauxInput,
|
|
2696
|
+
return React__namespace.default.createElement(FauxInput, Object.assign({
|
|
2907
2697
|
tabIndex: null,
|
|
2908
2698
|
onClick: onFauxInputClickHandler,
|
|
2909
2699
|
onFocus: onFauxInputFocusHandler,
|
|
@@ -2936,8 +2726,8 @@ MediaInput.propTypes = {
|
|
|
2936
2726
|
isBare: PropTypes__default.default.bool,
|
|
2937
2727
|
focusInset: PropTypes__default.default.bool,
|
|
2938
2728
|
validation: PropTypes__default.default.oneOf(VALIDATION),
|
|
2939
|
-
start: PropTypes__default.default.
|
|
2940
|
-
end: PropTypes__default.default.
|
|
2729
|
+
start: PropTypes__default.default.any,
|
|
2730
|
+
end: PropTypes__default.default.any,
|
|
2941
2731
|
wrapperProps: PropTypes__default.default.object,
|
|
2942
2732
|
wrapperRef: PropTypes__default.default.any
|
|
2943
2733
|
};
|
|
@@ -2956,7 +2746,6 @@ exports.InputGroup = InputGroup;
|
|
|
2956
2746
|
exports.Label = Label$1;
|
|
2957
2747
|
exports.MediaInput = MediaInput;
|
|
2958
2748
|
exports.Message = Message;
|
|
2959
|
-
exports.MultiThumbRange = MultiThumbRange;
|
|
2960
2749
|
exports.Radio = Radio;
|
|
2961
2750
|
exports.Range = Range;
|
|
2962
2751
|
exports.Select = Select;
|