@zendeskgarden/react-forms 9.0.0 → 9.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +176 -0
- package/dist/esm/elements/Checkbox.js +4 -3
- package/dist/esm/elements/FileUpload.js +7 -3
- package/dist/esm/elements/Input.js +18 -17
- package/dist/esm/elements/Radio.js +4 -3
- package/dist/esm/elements/Range.js +9 -9
- package/dist/esm/elements/Select.js +9 -9
- package/dist/esm/elements/Textarea.js +23 -13
- package/dist/esm/elements/Toggle.js +4 -3
- package/dist/esm/elements/common/Fieldset.js +10 -5
- package/dist/esm/elements/common/Label.js +33 -31
- package/dist/esm/elements/common/Legend.js +1 -3
- package/dist/esm/elements/common/Message.js +6 -5
- package/dist/esm/elements/common/MessageIcon.js +78 -0
- package/dist/esm/elements/faux-input/FauxInput.js +20 -8
- package/dist/esm/elements/file-list/components/File.js +3 -3
- package/dist/esm/elements/input-group/InputGroup.js +3 -3
- package/dist/esm/elements/tiles/components/Description.js +1 -1
- package/dist/esm/elements/tiles/components/Icon.js +1 -1
- package/dist/esm/elements/tiles/components/Label.js +1 -1
- package/dist/esm/styled/checkbox/StyledCheckHint.js +1 -1
- package/dist/esm/styled/checkbox/StyledCheckInput.js +1 -1
- package/dist/esm/styled/checkbox/StyledCheckLabel.js +1 -1
- package/dist/esm/styled/checkbox/StyledCheckMessage.js +1 -1
- package/dist/esm/styled/checkbox/StyledCheckSvg.js +1 -1
- package/dist/esm/styled/checkbox/StyledDashSvg.js +1 -1
- package/dist/esm/styled/common/StyledField.js +1 -1
- package/dist/esm/styled/common/StyledFieldset.js +2 -2
- package/dist/esm/styled/common/StyledHint.js +1 -1
- package/dist/esm/styled/common/StyledLabel.js +2 -2
- package/dist/esm/styled/common/StyledLegend.js +1 -1
- package/dist/esm/styled/common/StyledMessage.js +7 -7
- package/dist/esm/styled/common/StyledMessageIcon.js +3 -27
- package/dist/esm/styled/file-list/StyledFile.js +9 -9
- package/dist/esm/styled/file-list/StyledFileClose.js +1 -1
- package/dist/esm/styled/file-list/StyledFileDelete.js +1 -1
- package/dist/esm/styled/file-list/StyledFileIcon.js +1 -1
- package/dist/esm/styled/file-list/StyledFileList.js +1 -1
- package/dist/esm/styled/file-list/StyledFileListItem.js +1 -1
- package/dist/esm/styled/file-upload/StyledFileUpload.js +7 -7
- package/dist/esm/styled/input-group/StyledInputGroup.js +2 -2
- package/dist/esm/styled/radio/StyledRadioHint.js +1 -1
- package/dist/esm/styled/radio/StyledRadioInput.js +3 -3
- package/dist/esm/styled/radio/StyledRadioLabel.js +2 -2
- package/dist/esm/styled/radio/StyledRadioMessage.js +1 -1
- package/dist/esm/styled/radio/StyledRadioSvg.js +1 -1
- package/dist/esm/styled/range/StyledRangeInput.js +9 -9
- package/dist/esm/styled/select/StyledSelect.js +6 -6
- package/dist/esm/styled/select/StyledSelectWrapper.js +3 -3
- package/dist/esm/styled/text/StyledTextFauxInput.js +15 -15
- package/dist/esm/styled/text/StyledTextInput.js +22 -22
- package/dist/esm/styled/text/StyledTextMediaFigure.js +1 -1
- package/dist/esm/styled/text/StyledTextMediaInput.js +2 -2
- package/dist/esm/styled/text/StyledTextarea.js +2 -2
- package/dist/esm/styled/tiles/StyledTile.js +1 -1
- package/dist/esm/styled/tiles/StyledTileDescription.js +4 -4
- package/dist/esm/styled/tiles/StyledTileIcon.js +3 -3
- package/dist/esm/styled/tiles/StyledTileLabel.js +5 -5
- package/dist/esm/styled/toggle/StyledToggleHint.js +1 -1
- package/dist/esm/styled/toggle/StyledToggleInput.js +1 -1
- package/dist/esm/styled/toggle/StyledToggleLabel.js +1 -1
- package/dist/esm/styled/toggle/StyledToggleMessage.js +1 -1
- package/dist/esm/styled/toggle/StyledToggleSvg.js +1 -1
- package/dist/index.cjs.js +401 -365
- package/dist/typings/elements/common/MessageIcon.d.ts +9 -0
- package/dist/typings/styled/checkbox/StyledCheckLabel.d.ts +2 -2
- package/dist/typings/styled/common/StyledFieldset.d.ts +1 -1
- package/dist/typings/styled/common/StyledLabel.d.ts +2 -2
- package/dist/typings/styled/common/StyledLegend.d.ts +1 -5
- package/dist/typings/styled/common/StyledMessage.d.ts +1 -1
- package/dist/typings/styled/common/StyledMessageIcon.d.ts +2 -10
- package/dist/typings/styled/file-list/StyledFile.d.ts +3 -3
- package/dist/typings/styled/file-list/StyledFileIcon.d.ts +1 -1
- package/dist/typings/styled/file-upload/StyledFileUpload.d.ts +2 -2
- package/dist/typings/styled/input-group/StyledInputGroup.d.ts +1 -1
- package/dist/typings/styled/radio/StyledRadioInput.d.ts +1 -1
- package/dist/typings/styled/radio/StyledRadioLabel.d.ts +2 -2
- package/dist/typings/styled/range/StyledRangeInput.d.ts +2 -2
- package/dist/typings/styled/text/StyledTextFauxInput.d.ts +3 -3
- package/dist/typings/styled/text/StyledTextInput.d.ts +6 -6
- package/dist/typings/styled/text/StyledTextMediaFigure.d.ts +1 -1
- package/dist/typings/styled/text/StyledTextMediaInput.d.ts +2 -2
- package/dist/typings/styled/text/StyledTextarea.d.ts +2 -2
- package/dist/typings/styled/tiles/StyledTileDescription.d.ts +1 -1
- package/dist/typings/styled/tiles/StyledTileIcon.d.ts +1 -1
- package/dist/typings/styled/tiles/StyledTileLabel.d.ts +1 -1
- package/dist/typings/styled/toggle/StyledToggleLabel.d.ts +2 -2
- package/dist/typings/types/index.d.ts +6 -0
- package/package.json +6 -5
package/dist/index.cjs.js
CHANGED
|
@@ -49,7 +49,7 @@ const useFieldContext = () => {
|
|
|
49
49
|
const COMPONENT_ID$G = 'forms.field';
|
|
50
50
|
const StyledField = styled__default.default.div.attrs({
|
|
51
51
|
'data-garden-id': COMPONENT_ID$G,
|
|
52
|
-
'data-garden-version': '9.
|
|
52
|
+
'data-garden-version': '9.1.0'
|
|
53
53
|
}).withConfig({
|
|
54
54
|
displayName: "StyledField",
|
|
55
55
|
componentId: "sc-12gzfsu-0"
|
|
@@ -59,29 +59,29 @@ const COMPONENT_ID$F = 'forms.fieldset';
|
|
|
59
59
|
const StyledFieldset = styled__default.default(StyledField).attrs({
|
|
60
60
|
as: 'fieldset',
|
|
61
61
|
'data-garden-id': COMPONENT_ID$F,
|
|
62
|
-
'data-garden-version': '9.
|
|
62
|
+
'data-garden-version': '9.1.0'
|
|
63
63
|
}).withConfig({
|
|
64
64
|
displayName: "StyledFieldset",
|
|
65
65
|
componentId: "sc-1vr4mxv-0"
|
|
66
|
-
})(["", "{margin-top:", "px;}", ";"], StyledField, props => props.theme.space.base * (props
|
|
66
|
+
})(["", "{margin-top:", "px;}", ";"], StyledField, props => props.theme.space.base * (props.$isCompact ? 1 : 2), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$F, props));
|
|
67
67
|
|
|
68
68
|
const COMPONENT_ID$E = 'forms.input_label';
|
|
69
69
|
const StyledLabel = styled__default.default.label.attrs(props => ({
|
|
70
70
|
'data-garden-id': props['data-garden-id'] || COMPONENT_ID$E,
|
|
71
|
-
'data-garden-version': props['data-garden-version'] || '9.
|
|
71
|
+
'data-garden-version': props['data-garden-version'] || '9.1.0'
|
|
72
72
|
})).withConfig({
|
|
73
73
|
displayName: "StyledLabel",
|
|
74
74
|
componentId: "sc-2utmsz-0"
|
|
75
75
|
})(["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.getColor({
|
|
76
76
|
theme: props.theme,
|
|
77
77
|
variable: 'foreground.default'
|
|
78
|
-
}), props => props.theme.fontSizes.md, props => props
|
|
78
|
+
}), 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));
|
|
79
79
|
|
|
80
80
|
const COMPONENT_ID$D = 'forms.fieldset_legend';
|
|
81
81
|
const StyledLegend = styled__default.default(StyledLabel).attrs({
|
|
82
82
|
as: 'legend',
|
|
83
83
|
'data-garden-id': COMPONENT_ID$D,
|
|
84
|
-
'data-garden-version': '9.
|
|
84
|
+
'data-garden-version': '9.1.0'
|
|
85
85
|
}).withConfig({
|
|
86
86
|
displayName: "StyledLegend",
|
|
87
87
|
componentId: "sc-6s0zwq-0"
|
|
@@ -90,7 +90,7 @@ const StyledLegend = styled__default.default(StyledLabel).attrs({
|
|
|
90
90
|
const COMPONENT_ID$C = 'forms.input_hint';
|
|
91
91
|
const StyledHint = styled__default.default.div.attrs(props => ({
|
|
92
92
|
'data-garden-id': props['data-garden-id'] || COMPONENT_ID$C,
|
|
93
|
-
'data-garden-version': props['data-garden-version'] || '9.
|
|
93
|
+
'data-garden-version': props['data-garden-version'] || '9.1.0'
|
|
94
94
|
})).withConfig({
|
|
95
95
|
displayName: "StyledHint",
|
|
96
96
|
componentId: "sc-17c2wu8-0"
|
|
@@ -99,105 +99,10 @@ const StyledHint = styled__default.default.div.attrs(props => ({
|
|
|
99
99
|
variable: 'foreground.subtle'
|
|
100
100
|
}), props => props.theme.fontSizes.md, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$C, props));
|
|
101
101
|
|
|
102
|
-
var _g$2, _circle$5;
|
|
103
|
-
function _extends$s() { return _extends$s = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$s.apply(null, arguments); }
|
|
104
|
-
var SvgAlertErrorStroke = function SvgAlertErrorStroke(props) {
|
|
105
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$s({
|
|
106
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
107
|
-
width: 16,
|
|
108
|
-
height: 16,
|
|
109
|
-
focusable: "false",
|
|
110
|
-
viewBox: "0 0 16 16",
|
|
111
|
-
"aria-hidden": "true"
|
|
112
|
-
}, props), _g$2 || (_g$2 = /*#__PURE__*/React__namespace.createElement("g", {
|
|
113
|
-
fill: "none",
|
|
114
|
-
stroke: "currentColor"
|
|
115
|
-
}, /*#__PURE__*/React__namespace.createElement("circle", {
|
|
116
|
-
cx: 7.5,
|
|
117
|
-
cy: 8.5,
|
|
118
|
-
r: 7
|
|
119
|
-
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
120
|
-
strokeLinecap: "round",
|
|
121
|
-
d: "M7.5 4.5V9"
|
|
122
|
-
}))), _circle$5 || (_circle$5 = /*#__PURE__*/React__namespace.createElement("circle", {
|
|
123
|
-
cx: 7.5,
|
|
124
|
-
cy: 12,
|
|
125
|
-
r: 1,
|
|
126
|
-
fill: "currentColor"
|
|
127
|
-
})));
|
|
128
|
-
};
|
|
129
|
-
|
|
130
|
-
var _path$n, _circle$4;
|
|
131
|
-
function _extends$r() { return _extends$r = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$r.apply(null, arguments); }
|
|
132
|
-
var SvgAlertWarningStroke = function SvgAlertWarningStroke(props) {
|
|
133
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$r({
|
|
134
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
135
|
-
width: 16,
|
|
136
|
-
height: 16,
|
|
137
|
-
focusable: "false",
|
|
138
|
-
viewBox: "0 0 16 16",
|
|
139
|
-
"aria-hidden": "true"
|
|
140
|
-
}, props), _path$n || (_path$n = /*#__PURE__*/React__namespace.createElement("path", {
|
|
141
|
-
fill: "none",
|
|
142
|
-
stroke: "currentColor",
|
|
143
|
-
strokeLinecap: "round",
|
|
144
|
-
d: "M.88 13.77L7.06 1.86c.19-.36.7-.36.89 0l6.18 11.91c.17.33-.07.73-.44.73H1.32c-.37 0-.61-.4-.44-.73zM7.5 6v3.5"
|
|
145
|
-
})), _circle$4 || (_circle$4 = /*#__PURE__*/React__namespace.createElement("circle", {
|
|
146
|
-
cx: 7.5,
|
|
147
|
-
cy: 12,
|
|
148
|
-
r: 1,
|
|
149
|
-
fill: "currentColor"
|
|
150
|
-
})));
|
|
151
|
-
};
|
|
152
|
-
|
|
153
|
-
var _g$1;
|
|
154
|
-
function _extends$q() { return _extends$q = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$q.apply(null, arguments); }
|
|
155
|
-
var SvgCheckCircleStroke$1 = function SvgCheckCircleStroke(props) {
|
|
156
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$q({
|
|
157
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
158
|
-
width: 16,
|
|
159
|
-
height: 16,
|
|
160
|
-
focusable: "false",
|
|
161
|
-
viewBox: "0 0 16 16",
|
|
162
|
-
"aria-hidden": "true"
|
|
163
|
-
}, props), _g$1 || (_g$1 = /*#__PURE__*/React__namespace.createElement("g", {
|
|
164
|
-
fill: "none",
|
|
165
|
-
stroke: "currentColor"
|
|
166
|
-
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
167
|
-
strokeLinecap: "round",
|
|
168
|
-
strokeLinejoin: "round",
|
|
169
|
-
d: "M4 9l2.5 2.5 5-5"
|
|
170
|
-
}), /*#__PURE__*/React__namespace.createElement("circle", {
|
|
171
|
-
cx: 7.5,
|
|
172
|
-
cy: 8.5,
|
|
173
|
-
r: 7
|
|
174
|
-
}))));
|
|
175
|
-
};
|
|
176
|
-
|
|
177
|
-
const MessageIcon = _ref => {
|
|
178
|
-
let {
|
|
179
|
-
children,
|
|
180
|
-
validation,
|
|
181
|
-
...props
|
|
182
|
-
} = _ref;
|
|
183
|
-
let retVal;
|
|
184
|
-
if (validation === 'error') {
|
|
185
|
-
retVal = React__namespace.default.createElement(SvgAlertErrorStroke, props);
|
|
186
|
-
} else if (validation === 'success') {
|
|
187
|
-
retVal = React__namespace.default.createElement(SvgCheckCircleStroke$1, props);
|
|
188
|
-
} else if (validation === 'warning') {
|
|
189
|
-
retVal = React__namespace.default.createElement(SvgAlertWarningStroke, props);
|
|
190
|
-
} else {
|
|
191
|
-
retVal = React__namespace.default.cloneElement(React.Children.only(children));
|
|
192
|
-
}
|
|
193
|
-
return retVal;
|
|
194
|
-
};
|
|
195
102
|
const COMPONENT_ID$B = 'forms.input_message_icon';
|
|
196
|
-
const StyledMessageIcon = styled__default.default(
|
|
103
|
+
const StyledMessageIcon = styled__default.default(reactTheming.StyledBaseIcon).attrs({
|
|
197
104
|
'data-garden-id': COMPONENT_ID$B,
|
|
198
|
-
'data-garden-version': '9.
|
|
199
|
-
'aria-hidden': null,
|
|
200
|
-
role: 'img'
|
|
105
|
+
'data-garden-version': '9.1.0'
|
|
201
106
|
}).withConfig({
|
|
202
107
|
displayName: "StyledMessageIcon",
|
|
203
108
|
componentId: "sc-1ph2gba-0"
|
|
@@ -207,14 +112,14 @@ const COMPONENT_ID$A = 'forms.input_message';
|
|
|
207
112
|
const colorStyles$d = _ref => {
|
|
208
113
|
let {
|
|
209
114
|
theme,
|
|
210
|
-
validation
|
|
115
|
+
$validation
|
|
211
116
|
} = _ref;
|
|
212
117
|
let variable;
|
|
213
|
-
if (validation === 'error') {
|
|
118
|
+
if ($validation === 'error') {
|
|
214
119
|
variable = 'foreground.danger';
|
|
215
|
-
} else if (validation === 'success') {
|
|
120
|
+
} else if ($validation === 'success') {
|
|
216
121
|
variable = 'foreground.success';
|
|
217
|
-
} else if (validation === 'warning') {
|
|
122
|
+
} else if ($validation === 'warning') {
|
|
218
123
|
variable = 'foreground.warning';
|
|
219
124
|
} else {
|
|
220
125
|
variable = 'foreground.subtle';
|
|
@@ -228,33 +133,33 @@ const colorStyles$d = _ref => {
|
|
|
228
133
|
const sizeStyles$g = _ref2 => {
|
|
229
134
|
let {
|
|
230
135
|
theme,
|
|
231
|
-
validation
|
|
136
|
+
$validation
|
|
232
137
|
} = _ref2;
|
|
233
138
|
const fontSize = theme.fontSizes.sm;
|
|
234
139
|
const lineHeight = reactTheming.getLineHeight(theme.iconSizes.md, theme.fontSizes.sm);
|
|
235
140
|
const marginTop = `${theme.space.base}px`;
|
|
236
|
-
const paddingHorizontal = validation ? polished.math(`${theme.space.base * 2} + ${theme.iconSizes.md}`) : undefined;
|
|
141
|
+
const paddingHorizontal = $validation ? polished.math(`${theme.space.base * 2} + ${theme.iconSizes.md}`) : undefined;
|
|
237
142
|
return styled.css(["padding-", ":", ";line-height:", ";font-size:", ";", ":not([hidden]) + &{margin-top:", ";}"], theme.rtl ? 'right' : 'left', paddingHorizontal, lineHeight, fontSize, StyledLabel, marginTop);
|
|
238
143
|
};
|
|
239
144
|
const StyledMessage = styled__default.default.div.attrs(props => ({
|
|
240
145
|
'data-garden-id': props['data-garden-id'] || COMPONENT_ID$A,
|
|
241
|
-
'data-garden-version': props['data-garden-version'] || '9.
|
|
146
|
+
'data-garden-version': props['data-garden-version'] || '9.1.0'
|
|
242
147
|
})).withConfig({
|
|
243
148
|
displayName: "StyledMessage",
|
|
244
149
|
componentId: "sc-30hgg7-0"
|
|
245
150
|
})(["direction:", ";display:inline-block;position:relative;vertical-align:middle;", ";", ";& ", "{position:absolute;top:-1px;", ":0;}", ":not([hidden]) + &{display:block;}", ";"], props => props.theme.rtl && 'rtl', sizeStyles$g, colorStyles$d, StyledMessageIcon, props => props.theme.rtl ? 'right' : 'left', StyledLabel, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$A, props));
|
|
246
151
|
|
|
247
|
-
var _path$
|
|
248
|
-
function _extends$
|
|
152
|
+
var _path$n;
|
|
153
|
+
function _extends$s() { return _extends$s = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$s.apply(null, arguments); }
|
|
249
154
|
var SvgChevronDownStroke = function SvgChevronDownStroke(props) {
|
|
250
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
155
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$s({
|
|
251
156
|
xmlns: "http://www.w3.org/2000/svg",
|
|
252
157
|
width: 16,
|
|
253
158
|
height: 16,
|
|
254
159
|
focusable: "false",
|
|
255
160
|
viewBox: "0 0 16 16",
|
|
256
161
|
"aria-hidden": "true"
|
|
257
|
-
}, props), _path$
|
|
162
|
+
}, props), _path$n || (_path$n = /*#__PURE__*/React__namespace.createElement("path", {
|
|
258
163
|
fill: "currentColor",
|
|
259
164
|
d: "M12.688 5.61a.5.5 0 01.69.718l-.066.062-5 4a.5.5 0 01-.542.054l-.082-.054-5-4a.5.5 0 01.55-.83l.074.05L8 9.359l4.688-3.75z"
|
|
260
165
|
})));
|
|
@@ -267,16 +172,16 @@ const isInvalid = validation => {
|
|
|
267
172
|
const colorStyles$c = _ref => {
|
|
268
173
|
let {
|
|
269
174
|
theme,
|
|
270
|
-
isBare,
|
|
271
|
-
isHovered,
|
|
272
|
-
focusInset,
|
|
273
|
-
validation
|
|
175
|
+
$isBare,
|
|
176
|
+
$isHovered,
|
|
177
|
+
$focusInset,
|
|
178
|
+
$validation
|
|
274
179
|
} = _ref;
|
|
275
180
|
const foregroundColor = reactTheming.getColor({
|
|
276
181
|
theme,
|
|
277
182
|
variable: 'foreground.default'
|
|
278
183
|
});
|
|
279
|
-
const backgroundColor = isBare ? 'transparent' : reactTheming.getColor({
|
|
184
|
+
const backgroundColor = $isBare ? 'transparent' : reactTheming.getColor({
|
|
280
185
|
theme,
|
|
281
186
|
variable: 'background.default'
|
|
282
187
|
});
|
|
@@ -284,12 +189,12 @@ const colorStyles$c = _ref => {
|
|
|
284
189
|
let hoverBorderColor;
|
|
285
190
|
let borderVariable;
|
|
286
191
|
let focusBorderColor;
|
|
287
|
-
if (validation) {
|
|
288
|
-
if (validation === 'success') {
|
|
192
|
+
if ($validation) {
|
|
193
|
+
if ($validation === 'success') {
|
|
289
194
|
borderVariable = 'border.successEmphasis';
|
|
290
|
-
} else if (validation === 'warning') {
|
|
195
|
+
} else if ($validation === 'warning') {
|
|
291
196
|
borderVariable = 'border.warningEmphasis';
|
|
292
|
-
} else if (validation === 'error') {
|
|
197
|
+
} else if ($validation === 'error') {
|
|
293
198
|
borderVariable = 'border.dangerEmphasis';
|
|
294
199
|
}
|
|
295
200
|
borderColor = reactTheming.getColor({
|
|
@@ -316,7 +221,7 @@ const colorStyles$c = _ref => {
|
|
|
316
221
|
});
|
|
317
222
|
focusBorderColor = hoverBorderColor;
|
|
318
223
|
}
|
|
319
|
-
const disabledBackgroundColor = isBare ? undefined : reactTheming.getColor({
|
|
224
|
+
const disabledBackgroundColor = $isBare ? undefined : reactTheming.getColor({
|
|
320
225
|
theme,
|
|
321
226
|
variable: 'background.disabled'
|
|
322
227
|
});
|
|
@@ -334,20 +239,20 @@ const colorStyles$c = _ref => {
|
|
|
334
239
|
theme,
|
|
335
240
|
variable: 'foreground.subtle'
|
|
336
241
|
});
|
|
337
|
-
const calendarPickerIcon = server.renderToString(
|
|
242
|
+
const calendarPickerIcon = server.renderToString(React__namespace.default.createElement(SvgChevronDownStroke, {
|
|
338
243
|
color: calendarPickerColor
|
|
339
244
|
}));
|
|
340
245
|
const calendarPickerBackgroundImage = `url("data:image/svg+xml,${encodeURIComponent(calendarPickerIcon)}")`;
|
|
341
|
-
return styled.css(["border-color:", ";background-color:", ";color:", ";&::placeholder{opacity:1;color:", ";}&::-webkit-datetime-edit{color:", ";}&::-webkit-calendar-picker-indicator{background-image:", ";}&[readonly],&[aria-readonly='true']{background-color:", ";}&:hover{border-color:", ";}", " &::-webkit-calendar-picker-indicator:focus-visible{", "}&:disabled,&[aria-disabled='true']{border-color:", ";background-color:", ";color:", ";}"], isHovered ? hoverBorderColor : borderColor, backgroundColor, foregroundColor, placeholderColor, placeholderColor, calendarPickerBackgroundImage, readOnlyBackgroundColor, hoverBorderColor, reactTheming.focusStyles({
|
|
246
|
+
return styled.css(["border-color:", ";background-color:", ";color:", ";&::placeholder{opacity:1;color:", ";}&::-webkit-datetime-edit{color:", ";}&::-webkit-calendar-picker-indicator{background-image:", ";}&[readonly],&[aria-readonly='true']{background-color:", ";}&:hover{border-color:", ";}", " &::-webkit-calendar-picker-indicator:focus-visible{", "}&:disabled,&[aria-disabled='true']{border-color:", ";background-color:", ";color:", ";}"], $isHovered ? hoverBorderColor : borderColor, backgroundColor, foregroundColor, placeholderColor, placeholderColor, calendarPickerBackgroundImage, readOnlyBackgroundColor, hoverBorderColor, reactTheming.focusStyles({
|
|
342
247
|
theme,
|
|
343
|
-
inset: focusInset,
|
|
248
|
+
inset: $focusInset,
|
|
344
249
|
color: {
|
|
345
250
|
variable: borderVariable
|
|
346
251
|
},
|
|
347
252
|
styles: {
|
|
348
253
|
borderColor: focusBorderColor
|
|
349
254
|
},
|
|
350
|
-
condition:
|
|
255
|
+
condition: !$isBare
|
|
351
256
|
}), reactTheming.focusStyles({
|
|
352
257
|
theme
|
|
353
258
|
}), disabledBorderColor, disabledBackgroundColor, disabledForegroundColor);
|
|
@@ -355,8 +260,8 @@ const colorStyles$c = _ref => {
|
|
|
355
260
|
const sizeStyles$f = _ref2 => {
|
|
356
261
|
let {
|
|
357
262
|
theme,
|
|
358
|
-
isBare,
|
|
359
|
-
isCompact
|
|
263
|
+
$isBare,
|
|
264
|
+
$isCompact
|
|
360
265
|
} = _ref2;
|
|
361
266
|
const fontSize = theme.fontSizes.md;
|
|
362
267
|
const paddingHorizontal = `${theme.space.base * 3}px`;
|
|
@@ -364,7 +269,7 @@ const sizeStyles$f = _ref2 => {
|
|
|
364
269
|
let paddingVertical;
|
|
365
270
|
let browseFontSize;
|
|
366
271
|
let swatchHeight;
|
|
367
|
-
if (isCompact) {
|
|
272
|
+
if ($isCompact) {
|
|
368
273
|
height = `${theme.space.base * 8}px`;
|
|
369
274
|
paddingVertical = `${theme.space.base * 1.5}px`;
|
|
370
275
|
browseFontSize = polished.math(`${theme.fontSizes.sm} - 1`);
|
|
@@ -376,21 +281,21 @@ const sizeStyles$f = _ref2 => {
|
|
|
376
281
|
swatchHeight = `${theme.space.base * 7}px`;
|
|
377
282
|
}
|
|
378
283
|
const lineHeight = polished.math(`${height} - (${paddingVertical} * 2) - (${theme.borderWidths.sm} * 2)`);
|
|
379
|
-
const padding = isBare ? '0' : `${polished.em(paddingVertical, fontSize)} ${polished.em(paddingHorizontal, fontSize)}`;
|
|
284
|
+
const padding = $isBare ? '0' : `${polished.em(paddingVertical, fontSize)} ${polished.em(paddingHorizontal, fontSize)}`;
|
|
380
285
|
const swatchMarginVertical = polished.math(`(${lineHeight} - ${swatchHeight}) / 2`);
|
|
381
286
|
const swatchMarginHorizontal = polished.math(`${paddingVertical} + ${swatchMarginVertical} - ${paddingHorizontal}`);
|
|
382
287
|
const calendarPickerSize = `${theme.space.base * 5}px`;
|
|
383
288
|
const calendarPickerBackgroundSize = theme.iconSizes.md;
|
|
384
|
-
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-calendar-picker-indicator{background-position:center;background-size:", ";padding:0;width:", ";height:", ";}&::-webkit-color-swatch{margin:", " ", ";}", ":not([hidden]) + &&,", " + &&,", " + &&,&& + ", ",&& ~ ", "{margin-top:", "px;}"], padding, isBare ? '1em' : height, reactTheming.getLineHeight(lineHeight, fontSize), fontSize, browseFontSize, height, isCompact ? '0 2px' : '1px 3px', swatchMarginVertical, swatchMarginHorizontal, polished.math(`${swatchMarginHorizontal} * -2`), swatchHeight, calendarPickerBackgroundSize, calendarPickerSize, calendarPickerSize, swatchMarginVertical, swatchMarginHorizontal, StyledLabel, StyledHint, StyledMessage, StyledHint, StyledMessage, theme.space.base * (isCompact ? 1 : 2));
|
|
289
|
+
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-calendar-picker-indicator{background-position:center;background-size:", ";padding:0;width:", ";height:", ";}&::-webkit-color-swatch{margin:", " ", ";}", ":not([hidden]) + &&,", " + &&,", " + &&,&& + ", ",&& ~ ", "{margin-top:", "px;}"], padding, $isBare ? '1em' : height, reactTheming.getLineHeight(lineHeight, fontSize), fontSize, browseFontSize, height, $isCompact ? '0 2px' : '1px 3px', swatchMarginVertical, swatchMarginHorizontal, polished.math(`${swatchMarginHorizontal} * -2`), swatchHeight, calendarPickerBackgroundSize, calendarPickerSize, calendarPickerSize, swatchMarginVertical, swatchMarginHorizontal, StyledLabel, StyledHint, StyledMessage, StyledHint, StyledMessage, theme.space.base * ($isCompact ? 1 : 2));
|
|
385
290
|
};
|
|
386
291
|
const StyledTextInput = styled__default.default.input.attrs(props => ({
|
|
387
292
|
'data-garden-id': COMPONENT_ID$z,
|
|
388
|
-
'data-garden-version': '9.
|
|
389
|
-
'aria-invalid': isInvalid(props
|
|
293
|
+
'data-garden-version': '9.1.0',
|
|
294
|
+
'aria-invalid': isInvalid(props.$validation)
|
|
390
295
|
})).withConfig({
|
|
391
296
|
displayName: "StyledTextInput",
|
|
392
297
|
componentId: "sc-1r6733h-0"
|
|
393
|
-
})(["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;}&::-webkit-calendar-picker-indicator{border-radius:100%;}&: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
|
|
298
|
+
})(["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;}&::-webkit-calendar-picker-indicator{border-radius:100%;}&: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', sizeStyles$f, colorStyles$c, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$z, props));
|
|
394
299
|
|
|
395
300
|
const COMPONENT_ID$y = 'forms.textarea';
|
|
396
301
|
const hiddenStyles = `
|
|
@@ -405,11 +310,11 @@ const hiddenStyles = `
|
|
|
405
310
|
const StyledTextarea = styled__default.default(StyledTextInput).attrs({
|
|
406
311
|
as: 'textarea',
|
|
407
312
|
'data-garden-id': COMPONENT_ID$y,
|
|
408
|
-
'data-garden-version': '9.
|
|
313
|
+
'data-garden-version': '9.1.0'
|
|
409
314
|
}).withConfig({
|
|
410
315
|
displayName: "StyledTextarea",
|
|
411
316
|
componentId: "sc-wxschl-0"
|
|
412
|
-
})(["resize:", ";overflow:auto;", ";", ";"], props => props
|
|
317
|
+
})(["resize:", ";overflow:auto;", ";", ";"], props => props.$isResizable ? 'vertical' : 'none', props => props.$isHidden && hiddenStyles, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$y, props));
|
|
413
318
|
|
|
414
319
|
const COMPONENT_ID$x = 'forms.media_figure';
|
|
415
320
|
const colorStyles$b = _ref => {
|
|
@@ -460,7 +365,7 @@ const sizeStyles$e = props => {
|
|
|
460
365
|
};
|
|
461
366
|
const StyledTextMediaFigure = styled__default.default(reactTheming.StyledBaseIcon).attrs({
|
|
462
367
|
'data-garden-id': COMPONENT_ID$x,
|
|
463
|
-
'data-garden-version': '9.
|
|
368
|
+
'data-garden-version': '9.1.0'
|
|
464
369
|
}).withConfig({
|
|
465
370
|
displayName: "StyledTextMediaFigure",
|
|
466
371
|
componentId: "sc-1qepknj-0"
|
|
@@ -470,19 +375,19 @@ const COMPONENT_ID$w = 'forms.faux_input';
|
|
|
470
375
|
const colorStyles$a = _ref => {
|
|
471
376
|
let {
|
|
472
377
|
theme,
|
|
473
|
-
validation,
|
|
474
|
-
focusInset,
|
|
475
|
-
isBare,
|
|
476
|
-
isFocused
|
|
378
|
+
$validation,
|
|
379
|
+
$focusInset,
|
|
380
|
+
$isBare,
|
|
381
|
+
$isFocused
|
|
477
382
|
} = _ref;
|
|
478
383
|
let borderVariable;
|
|
479
384
|
let focusBorderColor;
|
|
480
|
-
if (validation) {
|
|
481
|
-
if (validation === 'success') {
|
|
385
|
+
if ($validation) {
|
|
386
|
+
if ($validation === 'success') {
|
|
482
387
|
borderVariable = 'border.successEmphasis';
|
|
483
|
-
} else if (validation === 'warning') {
|
|
388
|
+
} else if ($validation === 'warning') {
|
|
484
389
|
borderVariable = 'border.warningEmphasis';
|
|
485
|
-
} else if (validation === 'error') {
|
|
390
|
+
} else if ($validation === 'error') {
|
|
486
391
|
borderVariable = 'border.dangerEmphasis';
|
|
487
392
|
}
|
|
488
393
|
focusBorderColor = reactTheming.getColor({
|
|
@@ -498,33 +403,33 @@ const colorStyles$a = _ref => {
|
|
|
498
403
|
}
|
|
499
404
|
return styled.css(["", ""], reactTheming.focusStyles({
|
|
500
405
|
theme,
|
|
501
|
-
inset: focusInset,
|
|
406
|
+
inset: $focusInset,
|
|
502
407
|
color: {
|
|
503
408
|
variable: borderVariable
|
|
504
409
|
},
|
|
505
|
-
selector: isFocused ? '&' : '&:focus-within',
|
|
410
|
+
selector: $isFocused ? '&' : '&:focus-within',
|
|
506
411
|
styles: {
|
|
507
412
|
borderColor: focusBorderColor
|
|
508
413
|
},
|
|
509
|
-
condition:
|
|
414
|
+
condition: !$isBare
|
|
510
415
|
}));
|
|
511
416
|
};
|
|
512
417
|
const StyledTextFauxInput = styled__default.default(StyledTextInput).attrs(props => ({
|
|
513
418
|
as: 'div',
|
|
514
|
-
'aria-readonly': props
|
|
515
|
-
'aria-disabled': props
|
|
419
|
+
'aria-readonly': props.$isReadOnly,
|
|
420
|
+
'aria-disabled': props.$isDisabled,
|
|
516
421
|
'data-garden-id': COMPONENT_ID$w,
|
|
517
|
-
'data-garden-version': '9.
|
|
422
|
+
'data-garden-version': '9.1.0'
|
|
518
423
|
})).withConfig({
|
|
519
424
|
displayName: "StyledTextFauxInput",
|
|
520
425
|
componentId: "sc-yqw7j9-0"
|
|
521
|
-
})(["display:", ";align-items:", ";cursor:", ";overflow:hidden;", " & > ", "{vertical-align:", ";", "{box-shadow:unset;}}& > ", "{flex-shrink:", ";}", ";"], props => props
|
|
426
|
+
})(["display:", ";align-items:", ";cursor:", ";overflow:hidden;", " & > ", "{vertical-align:", ";", "{box-shadow:unset;}}& > ", "{flex-shrink:", ";}", ";"], props => props.$mediaLayout ? 'inline-flex' : 'inline-block', props => props.$mediaLayout && 'baseline', props => props.$mediaLayout && !props.$isDisabled ? 'text' : 'default', colorStyles$a, StyledTextInput, props => !props.$mediaLayout && 'baseline', reactTheming.SELECTOR_FOCUS_VISIBLE, StyledTextMediaFigure, props => props.$mediaLayout && '0', props => reactTheming.retrieveComponentStyles(COMPONENT_ID$w, props));
|
|
522
427
|
|
|
523
428
|
const COMPONENT_ID$v = 'forms.media_input';
|
|
524
429
|
const StyledTextMediaInput = styled__default.default(StyledTextInput).attrs({
|
|
525
430
|
'data-garden-id': COMPONENT_ID$v,
|
|
526
|
-
'data-garden-version': '9.
|
|
527
|
-
isBare: true
|
|
431
|
+
'data-garden-version': '9.1.0',
|
|
432
|
+
$isBare: true
|
|
528
433
|
}).withConfig({
|
|
529
434
|
displayName: "StyledTextMediaInput",
|
|
530
435
|
componentId: "sc-12i9xfi-0"
|
|
@@ -532,7 +437,7 @@ const StyledTextMediaInput = styled__default.default(StyledTextInput).attrs({
|
|
|
532
437
|
|
|
533
438
|
const COMPONENT_ID$u = 'forms.input_group';
|
|
534
439
|
const positionStyles = props => {
|
|
535
|
-
const topMargin = `${props.theme.space.base * (props
|
|
440
|
+
const topMargin = `${props.theme.space.base * (props.$isCompact ? 1 : 2)}px`;
|
|
536
441
|
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);
|
|
537
442
|
};
|
|
538
443
|
const itemStyles = props => {
|
|
@@ -542,7 +447,7 @@ const itemStyles = props => {
|
|
|
542
447
|
};
|
|
543
448
|
const StyledInputGroup = styled__default.default.div.attrs({
|
|
544
449
|
'data-garden-id': COMPONENT_ID$u,
|
|
545
|
-
'data-garden-version': '9.
|
|
450
|
+
'data-garden-version': '9.1.0'
|
|
546
451
|
}).withConfig({
|
|
547
452
|
displayName: "StyledInputGroup",
|
|
548
453
|
componentId: "sc-kjh1f0-0"
|
|
@@ -557,8 +462,8 @@ const sizeStyles$d = props => {
|
|
|
557
462
|
};
|
|
558
463
|
const StyledRadioLabel = styled__default.default(StyledLabel).attrs({
|
|
559
464
|
'data-garden-id': COMPONENT_ID$t,
|
|
560
|
-
'data-garden-version': '9.
|
|
561
|
-
isRadio: true
|
|
465
|
+
'data-garden-version': '9.1.0',
|
|
466
|
+
$isRadio: true
|
|
562
467
|
}).withConfig({
|
|
563
468
|
displayName: "StyledRadioLabel",
|
|
564
469
|
componentId: "sc-1aq2e5t-0"
|
|
@@ -567,7 +472,7 @@ const StyledRadioLabel = styled__default.default(StyledLabel).attrs({
|
|
|
567
472
|
const COMPONENT_ID$s = 'forms.checkbox_label';
|
|
568
473
|
const StyledCheckLabel = styled__default.default(StyledRadioLabel).attrs({
|
|
569
474
|
'data-garden-id': COMPONENT_ID$s,
|
|
570
|
-
'data-garden-version': '9.
|
|
475
|
+
'data-garden-version': '9.1.0'
|
|
571
476
|
}).withConfig({
|
|
572
477
|
displayName: "StyledCheckLabel",
|
|
573
478
|
componentId: "sc-x7nr1-0"
|
|
@@ -576,7 +481,7 @@ const StyledCheckLabel = styled__default.default(StyledRadioLabel).attrs({
|
|
|
576
481
|
const COMPONENT_ID$r = 'forms.radio_hint';
|
|
577
482
|
const StyledRadioHint = styled__default.default(StyledHint).attrs({
|
|
578
483
|
'data-garden-id': COMPONENT_ID$r,
|
|
579
|
-
'data-garden-version': '9.
|
|
484
|
+
'data-garden-version': '9.1.0'
|
|
580
485
|
}).withConfig({
|
|
581
486
|
displayName: "StyledRadioHint",
|
|
582
487
|
componentId: "sc-eo8twg-0"
|
|
@@ -585,7 +490,7 @@ const StyledRadioHint = styled__default.default(StyledHint).attrs({
|
|
|
585
490
|
const COMPONENT_ID$q = 'forms.checkbox_hint';
|
|
586
491
|
const StyledCheckHint = styled__default.default(StyledRadioHint).attrs({
|
|
587
492
|
'data-garden-id': COMPONENT_ID$q,
|
|
588
|
-
'data-garden-version': '9.
|
|
493
|
+
'data-garden-version': '9.1.0'
|
|
589
494
|
}).withConfig({
|
|
590
495
|
displayName: "StyledCheckHint",
|
|
591
496
|
componentId: "sc-1kl8e8c-0"
|
|
@@ -677,7 +582,7 @@ const colorStyles$9 = _ref => {
|
|
|
677
582
|
const sizeStyles$c = _ref2 => {
|
|
678
583
|
let {
|
|
679
584
|
theme,
|
|
680
|
-
isCompact
|
|
585
|
+
$isCompact
|
|
681
586
|
} = _ref2;
|
|
682
587
|
const lineHeight = `${theme.space.base * 5}px`;
|
|
683
588
|
const size = `${theme.space.base * 4}px`;
|
|
@@ -685,12 +590,12 @@ const sizeStyles$c = _ref2 => {
|
|
|
685
590
|
const iconSize = theme.iconSizes.sm;
|
|
686
591
|
const iconPosition = polished.math(`(${size} - ${iconSize}) / 2`);
|
|
687
592
|
const iconTop = polished.math(`${iconPosition} + ${top}`);
|
|
688
|
-
const marginTop = `${theme.space.base * (isCompact ? 1 : 2)}px`;
|
|
593
|
+
const marginTop = `${theme.space.base * ($isCompact ? 1 : 2)}px`;
|
|
689
594
|
return styled.css(["top:", ";width:", ";height:", ";& ~ ", "::before{top:", ";border:", ";background-size:", ";width:", ";height:", ";box-sizing:border-box;}& ~ ", " > svg{top:", ";", ":", ";width:", ";height:", ";}&& ~ ", " ~ ", "{margin-top:", ";}"], top, size, size, StyledRadioLabel, top, theme.borders.sm, theme.iconSizes.sm, size, size, StyledRadioLabel, iconTop, theme.rtl ? 'right' : 'left', iconPosition, iconSize, iconSize, StyledRadioLabel, StyledMessage, marginTop);
|
|
690
595
|
};
|
|
691
596
|
const StyledRadioInput = styled__default.default.input.attrs({
|
|
692
597
|
'data-garden-id': COMPONENT_ID$p,
|
|
693
|
-
'data-garden-version': '9.
|
|
598
|
+
'data-garden-version': '9.1.0',
|
|
694
599
|
type: 'radio'
|
|
695
600
|
}).withConfig({
|
|
696
601
|
displayName: "StyledRadioInput",
|
|
@@ -753,7 +658,7 @@ const colorStyles$8 = _ref => {
|
|
|
753
658
|
};
|
|
754
659
|
const StyledCheckInput = styled__default.default(StyledRadioInput).attrs({
|
|
755
660
|
'data-garden-id': COMPONENT_ID$o,
|
|
756
|
-
'data-garden-version': '9.
|
|
661
|
+
'data-garden-version': '9.1.0',
|
|
757
662
|
type: 'checkbox'
|
|
758
663
|
}).withConfig({
|
|
759
664
|
displayName: "StyledCheckInput",
|
|
@@ -763,7 +668,7 @@ const StyledCheckInput = styled__default.default(StyledRadioInput).attrs({
|
|
|
763
668
|
const COMPONENT_ID$n = 'forms.radio_message';
|
|
764
669
|
const StyledRadioMessage = styled__default.default(StyledMessage).attrs({
|
|
765
670
|
'data-garden-id': COMPONENT_ID$n,
|
|
766
|
-
'data-garden-version': '9.
|
|
671
|
+
'data-garden-version': '9.1.0'
|
|
767
672
|
}).withConfig({
|
|
768
673
|
displayName: "StyledRadioMessage",
|
|
769
674
|
componentId: "sc-1pmi0q8-0"
|
|
@@ -772,23 +677,23 @@ const StyledRadioMessage = styled__default.default(StyledMessage).attrs({
|
|
|
772
677
|
const COMPONENT_ID$m = 'forms.checkbox_message';
|
|
773
678
|
const StyledCheckMessage = styled__default.default(StyledRadioMessage).attrs({
|
|
774
679
|
'data-garden-id': COMPONENT_ID$m,
|
|
775
|
-
'data-garden-version': '9.
|
|
680
|
+
'data-garden-version': '9.1.0'
|
|
776
681
|
}).withConfig({
|
|
777
682
|
displayName: "StyledCheckMessage",
|
|
778
683
|
componentId: "sc-s4p6kd-0"
|
|
779
684
|
})(["", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$m, props));
|
|
780
685
|
|
|
781
|
-
var _path$
|
|
782
|
-
function _extends$
|
|
686
|
+
var _path$m;
|
|
687
|
+
function _extends$r() { return _extends$r = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$r.apply(null, arguments); }
|
|
783
688
|
var SvgCheckSmFill = function SvgCheckSmFill(props) {
|
|
784
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
689
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$r({
|
|
785
690
|
xmlns: "http://www.w3.org/2000/svg",
|
|
786
691
|
width: 12,
|
|
787
692
|
height: 12,
|
|
788
693
|
focusable: "false",
|
|
789
694
|
viewBox: "0 0 12 12",
|
|
790
695
|
"aria-hidden": "true"
|
|
791
|
-
}, props), _path$
|
|
696
|
+
}, props), _path$m || (_path$m = /*#__PURE__*/React__namespace.createElement("path", {
|
|
792
697
|
fill: "none",
|
|
793
698
|
stroke: "currentColor",
|
|
794
699
|
strokeLinecap: "round",
|
|
@@ -801,23 +706,23 @@ var SvgCheckSmFill = function SvgCheckSmFill(props) {
|
|
|
801
706
|
const COMPONENT_ID$l = 'forms.check_svg';
|
|
802
707
|
const StyledCheckSvg = styled__default.default(SvgCheckSmFill).attrs({
|
|
803
708
|
'data-garden-id': COMPONENT_ID$l,
|
|
804
|
-
'data-garden-version': '9.
|
|
709
|
+
'data-garden-version': '9.1.0'
|
|
805
710
|
}).withConfig({
|
|
806
711
|
displayName: "StyledCheckSvg",
|
|
807
712
|
componentId: "sc-fvxetk-0"
|
|
808
713
|
})(["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));
|
|
809
714
|
|
|
810
|
-
var _path$
|
|
811
|
-
function _extends$
|
|
715
|
+
var _path$l;
|
|
716
|
+
function _extends$q() { return _extends$q = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$q.apply(null, arguments); }
|
|
812
717
|
var SvgDashFill = function SvgDashFill(props) {
|
|
813
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
718
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$q({
|
|
814
719
|
xmlns: "http://www.w3.org/2000/svg",
|
|
815
720
|
width: 12,
|
|
816
721
|
height: 12,
|
|
817
722
|
focusable: "false",
|
|
818
723
|
viewBox: "0 0 12 12",
|
|
819
724
|
"aria-hidden": "true"
|
|
820
|
-
}, props), _path$
|
|
725
|
+
}, props), _path$l || (_path$l = /*#__PURE__*/React__namespace.createElement("path", {
|
|
821
726
|
stroke: "currentColor",
|
|
822
727
|
strokeLinecap: "round",
|
|
823
728
|
strokeWidth: 2,
|
|
@@ -828,7 +733,7 @@ var SvgDashFill = function SvgDashFill(props) {
|
|
|
828
733
|
const COMPONENT_ID$k = 'forms.dash_svg';
|
|
829
734
|
const StyledDashSvg = styled__default.default(SvgDashFill).attrs({
|
|
830
735
|
'data-garden-id': COMPONENT_ID$k,
|
|
831
|
-
'data-garden-version': '9.
|
|
736
|
+
'data-garden-version': '9.1.0'
|
|
832
737
|
}).withConfig({
|
|
833
738
|
displayName: "StyledDashSvg",
|
|
834
739
|
componentId: "sc-z3vq71-0"
|
|
@@ -838,7 +743,7 @@ const COMPONENT_ID$j = 'forms.file_upload';
|
|
|
838
743
|
const colorStyles$7 = _ref => {
|
|
839
744
|
let {
|
|
840
745
|
theme,
|
|
841
|
-
isDragging
|
|
746
|
+
$isDragging
|
|
842
747
|
} = _ref;
|
|
843
748
|
const borderOptions = {
|
|
844
749
|
theme,
|
|
@@ -909,25 +814,25 @@ const colorStyles$7 = _ref => {
|
|
|
909
814
|
theme,
|
|
910
815
|
variable: 'foreground.disabled'
|
|
911
816
|
});
|
|
912
|
-
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:", ";}"], isDragging ? activeBorderColor : borderColor, isDragging ? activeBackgroundColor : undefined, isDragging ? activeForegroundColor : foregroundColor, hoverBorderColor, hoverBackgroundColor, hoverForegroundColor, reactTheming.focusStyles({
|
|
817
|
+
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:", ";}"], $isDragging ? activeBorderColor : borderColor, $isDragging ? activeBackgroundColor : undefined, $isDragging ? activeForegroundColor : foregroundColor, hoverBorderColor, hoverBackgroundColor, hoverForegroundColor, reactTheming.focusStyles({
|
|
913
818
|
theme
|
|
914
819
|
}), activeBorderColor, activeBackgroundColor, activeForegroundColor, disabledBorderColor, disabledBackgroundColor, disabledForegroundColor);
|
|
915
820
|
};
|
|
916
821
|
const sizeStyles$b = _ref2 => {
|
|
917
822
|
let {
|
|
918
823
|
theme,
|
|
919
|
-
isCompact
|
|
824
|
+
$isCompact
|
|
920
825
|
} = _ref2;
|
|
921
|
-
const marginTop = `${theme.space.base * (isCompact ? 1 : 2)}px`;
|
|
922
|
-
const paddingHorizontal = `${isCompact ? 2 : 4}em`;
|
|
923
|
-
const paddingVertical = polished.math(`${theme.space.base * (isCompact ? 2.5 : 5)} - ${theme.borderWidths.sm}`);
|
|
826
|
+
const marginTop = `${theme.space.base * ($isCompact ? 1 : 2)}px`;
|
|
827
|
+
const paddingHorizontal = `${$isCompact ? 2 : 4}em`;
|
|
828
|
+
const paddingVertical = polished.math(`${theme.space.base * ($isCompact ? 2.5 : 5)} - ${theme.borderWidths.sm}`);
|
|
924
829
|
const fontSize = theme.fontSizes.md;
|
|
925
830
|
const lineHeight = reactTheming.getLineHeight(theme.space.base * 5, fontSize);
|
|
926
831
|
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);
|
|
927
832
|
};
|
|
928
833
|
const StyledFileUpload = styled__default.default.div.attrs({
|
|
929
834
|
'data-garden-id': COMPONENT_ID$j,
|
|
930
|
-
'data-garden-version': '9.
|
|
835
|
+
'data-garden-version': '9.1.0'
|
|
931
836
|
}).withConfig({
|
|
932
837
|
displayName: "StyledFileUpload",
|
|
933
838
|
componentId: "sc-1rodjgn-0"
|
|
@@ -936,7 +841,7 @@ const StyledFileUpload = styled__default.default.div.attrs({
|
|
|
936
841
|
const COMPONENT_ID$i = 'forms.file.close';
|
|
937
842
|
const StyledFileClose = styled__default.default.button.attrs({
|
|
938
843
|
'data-garden-id': COMPONENT_ID$i,
|
|
939
|
-
'data-garden-version': '9.
|
|
844
|
+
'data-garden-version': '9.1.0'
|
|
940
845
|
}).withConfig({
|
|
941
846
|
displayName: "StyledFileClose",
|
|
942
847
|
componentId: "sc-1m31jbf-0"
|
|
@@ -949,17 +854,17 @@ const COMPONENT_ID$h = 'forms.file';
|
|
|
949
854
|
const colorStyles$6 = _ref => {
|
|
950
855
|
let {
|
|
951
856
|
theme,
|
|
952
|
-
focusInset,
|
|
953
|
-
validation
|
|
857
|
+
$focusInset,
|
|
858
|
+
$validation
|
|
954
859
|
} = _ref;
|
|
955
860
|
let borderVariable;
|
|
956
861
|
let focusBorderVariable;
|
|
957
862
|
let foregroundVariable;
|
|
958
|
-
if (validation === 'success') {
|
|
863
|
+
if ($validation === 'success') {
|
|
959
864
|
borderVariable = 'border.successEmphasis';
|
|
960
865
|
focusBorderVariable = borderVariable;
|
|
961
866
|
foregroundVariable = 'foreground.success';
|
|
962
|
-
} else if (validation === 'error') {
|
|
867
|
+
} else if ($validation === 'error') {
|
|
963
868
|
borderVariable = 'border.dangerEmphasis';
|
|
964
869
|
focusBorderVariable = borderVariable;
|
|
965
870
|
foregroundVariable = 'foreground.danger';
|
|
@@ -982,7 +887,7 @@ const colorStyles$6 = _ref => {
|
|
|
982
887
|
});
|
|
983
888
|
return styled.css(["border-color:", ";color:", ";", ""], borderColor, foregroundColor, reactTheming.focusStyles({
|
|
984
889
|
theme,
|
|
985
|
-
inset: focusInset,
|
|
890
|
+
inset: $focusInset,
|
|
986
891
|
color: {
|
|
987
892
|
variable: focusBorderVariable
|
|
988
893
|
},
|
|
@@ -994,10 +899,10 @@ const colorStyles$6 = _ref => {
|
|
|
994
899
|
const sizeStyles$a = _ref2 => {
|
|
995
900
|
let {
|
|
996
901
|
theme,
|
|
997
|
-
isCompact
|
|
902
|
+
$isCompact
|
|
998
903
|
} = _ref2;
|
|
999
|
-
const size = `${theme.space.base * (isCompact ? 7 : 10)}px`;
|
|
1000
|
-
const spacing = `${theme.space.base * (isCompact ? 2 : 3)}px`;
|
|
904
|
+
const size = `${theme.space.base * ($isCompact ? 7 : 10)}px`;
|
|
905
|
+
const spacing = `${theme.space.base * ($isCompact ? 2 : 3)}px`;
|
|
1001
906
|
const fontSize = theme.fontSizes.md;
|
|
1002
907
|
const lineHeight = reactTheming.getLineHeight(theme.space.base * 5, fontSize);
|
|
1003
908
|
return `
|
|
@@ -1022,7 +927,7 @@ const sizeStyles$a = _ref2 => {
|
|
|
1022
927
|
};
|
|
1023
928
|
const StyledFile = styled__default.default.div.attrs({
|
|
1024
929
|
'data-garden-id': COMPONENT_ID$h,
|
|
1025
|
-
'data-garden-version': '9.
|
|
930
|
+
'data-garden-version': '9.1.0'
|
|
1026
931
|
}).withConfig({
|
|
1027
932
|
displayName: "StyledFile",
|
|
1028
933
|
componentId: "sc-195lzp1-0"
|
|
@@ -1031,7 +936,7 @@ const StyledFile = styled__default.default.div.attrs({
|
|
|
1031
936
|
const COMPONENT_ID$g = 'forms.file.delete';
|
|
1032
937
|
const StyledFileDelete = styled__default.default(StyledFileClose).attrs({
|
|
1033
938
|
'data-garden-id': COMPONENT_ID$g,
|
|
1034
|
-
'data-garden-version': '9.
|
|
939
|
+
'data-garden-version': '9.1.0'
|
|
1035
940
|
}).withConfig({
|
|
1036
941
|
displayName: "StyledFileDelete",
|
|
1037
942
|
componentId: "sc-a8nnhx-0"
|
|
@@ -1063,7 +968,7 @@ const sizeStyles$9 = _ref2 => {
|
|
|
1063
968
|
};
|
|
1064
969
|
const StyledFileIcon = styled__default.default(reactTheming.StyledBaseIcon).attrs({
|
|
1065
970
|
'data-garden-id': COMPONENT_ID$f,
|
|
1066
|
-
'data-garden-version': '9.
|
|
971
|
+
'data-garden-version': '9.1.0'
|
|
1067
972
|
}).withConfig({
|
|
1068
973
|
displayName: "StyledFileIcon",
|
|
1069
974
|
componentId: "sc-7b3q0c-0"
|
|
@@ -1072,7 +977,7 @@ const StyledFileIcon = styled__default.default(reactTheming.StyledBaseIcon).attr
|
|
|
1072
977
|
const COMPONENT_ID$e = 'forms.file_list';
|
|
1073
978
|
const StyledFileList = styled__default.default.ul.attrs({
|
|
1074
979
|
'data-garden-id': COMPONENT_ID$e,
|
|
1075
|
-
'data-garden-version': '9.
|
|
980
|
+
'data-garden-version': '9.1.0'
|
|
1076
981
|
}).withConfig({
|
|
1077
982
|
displayName: "StyledFileList",
|
|
1078
983
|
componentId: "sc-gbahjg-0"
|
|
@@ -1081,23 +986,23 @@ const StyledFileList = styled__default.default.ul.attrs({
|
|
|
1081
986
|
const COMPONENT_ID$d = 'forms.file_list.item';
|
|
1082
987
|
const StyledFileListItem = styled__default.default.li.attrs({
|
|
1083
988
|
'data-garden-id': COMPONENT_ID$d,
|
|
1084
|
-
'data-garden-version': '9.
|
|
989
|
+
'data-garden-version': '9.1.0'
|
|
1085
990
|
}).withConfig({
|
|
1086
991
|
displayName: "StyledFileListItem",
|
|
1087
992
|
componentId: "sc-1ova3lo-0"
|
|
1088
993
|
})(["&:not(:first-child),", " ~ ", " > &:first-child{margin-top:", "px;}", ";"], StyledFileUpload, StyledFileList, props => props.theme.space.base * 2, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$d, props));
|
|
1089
994
|
|
|
1090
|
-
var _circle$
|
|
1091
|
-
function _extends$
|
|
995
|
+
var _circle$5;
|
|
996
|
+
function _extends$p() { return _extends$p = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$p.apply(null, arguments); }
|
|
1092
997
|
var SvgCircleSmFill$1 = function SvgCircleSmFill(props) {
|
|
1093
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
998
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$p({
|
|
1094
999
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1095
1000
|
width: 12,
|
|
1096
1001
|
height: 12,
|
|
1097
1002
|
focusable: "false",
|
|
1098
1003
|
viewBox: "0 0 12 12",
|
|
1099
1004
|
"aria-hidden": "true"
|
|
1100
|
-
}, props), _circle$
|
|
1005
|
+
}, props), _circle$5 || (_circle$5 = /*#__PURE__*/React__namespace.createElement("circle", {
|
|
1101
1006
|
cx: 6,
|
|
1102
1007
|
cy: 6,
|
|
1103
1008
|
r: 2,
|
|
@@ -1108,7 +1013,7 @@ var SvgCircleSmFill$1 = function SvgCircleSmFill(props) {
|
|
|
1108
1013
|
const COMPONENT_ID$c = 'forms.radio_svg';
|
|
1109
1014
|
const StyledRadioSvg = styled__default.default(SvgCircleSmFill$1).attrs({
|
|
1110
1015
|
'data-garden-id': COMPONENT_ID$c,
|
|
1111
|
-
'data-garden-version': '9.
|
|
1016
|
+
'data-garden-version': '9.1.0'
|
|
1112
1017
|
}).withConfig({
|
|
1113
1018
|
displayName: "StyledRadioSvg",
|
|
1114
1019
|
componentId: "sc-1r1qtr1-0"
|
|
@@ -1122,7 +1027,7 @@ const sizeStyles$8 = props => {
|
|
|
1122
1027
|
};
|
|
1123
1028
|
const StyledToggleLabel = styled__default.default(StyledCheckLabel).attrs({
|
|
1124
1029
|
'data-garden-id': COMPONENT_ID$b,
|
|
1125
|
-
'data-garden-version': '9.
|
|
1030
|
+
'data-garden-version': '9.1.0'
|
|
1126
1031
|
}).withConfig({
|
|
1127
1032
|
displayName: "StyledToggleLabel",
|
|
1128
1033
|
componentId: "sc-e0asdk-0"
|
|
@@ -1131,7 +1036,7 @@ const StyledToggleLabel = styled__default.default(StyledCheckLabel).attrs({
|
|
|
1131
1036
|
const COMPONENT_ID$a = 'forms.toggle_hint';
|
|
1132
1037
|
const StyledToggleHint = styled__default.default(StyledHint).attrs({
|
|
1133
1038
|
'data-garden-id': COMPONENT_ID$a,
|
|
1134
|
-
'data-garden-version': '9.
|
|
1039
|
+
'data-garden-version': '9.1.0'
|
|
1135
1040
|
}).withConfig({
|
|
1136
1041
|
displayName: "StyledToggleHint",
|
|
1137
1042
|
componentId: "sc-nziggu-0"
|
|
@@ -1180,7 +1085,7 @@ const sizeStyles$7 = _ref2 => {
|
|
|
1180
1085
|
};
|
|
1181
1086
|
const StyledToggleInput = styled__default.default(StyledCheckInput).attrs({
|
|
1182
1087
|
'data-garden-id': COMPONENT_ID$9,
|
|
1183
|
-
'data-garden-version': '9.
|
|
1088
|
+
'data-garden-version': '9.1.0'
|
|
1184
1089
|
}).withConfig({
|
|
1185
1090
|
displayName: "StyledToggleInput",
|
|
1186
1091
|
componentId: "sc-sgp47s-0"
|
|
@@ -1189,23 +1094,23 @@ const StyledToggleInput = styled__default.default(StyledCheckInput).attrs({
|
|
|
1189
1094
|
const COMPONENT_ID$8 = 'forms.toggle_message';
|
|
1190
1095
|
const StyledToggleMessage = styled__default.default(StyledMessage).attrs({
|
|
1191
1096
|
'data-garden-id': COMPONENT_ID$8,
|
|
1192
|
-
'data-garden-version': '9.
|
|
1097
|
+
'data-garden-version': '9.1.0'
|
|
1193
1098
|
}).withConfig({
|
|
1194
1099
|
displayName: "StyledToggleMessage",
|
|
1195
1100
|
componentId: "sc-13vuvl1-0"
|
|
1196
1101
|
})(["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));
|
|
1197
1102
|
|
|
1198
|
-
var _circle$
|
|
1199
|
-
function _extends$
|
|
1103
|
+
var _circle$4;
|
|
1104
|
+
function _extends$o() { return _extends$o = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$o.apply(null, arguments); }
|
|
1200
1105
|
var SvgCircleSmFill = function SvgCircleSmFill(props) {
|
|
1201
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
1106
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$o({
|
|
1202
1107
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1203
1108
|
width: 16,
|
|
1204
1109
|
height: 16,
|
|
1205
1110
|
focusable: "false",
|
|
1206
1111
|
viewBox: "0 0 16 16",
|
|
1207
1112
|
"aria-hidden": "true"
|
|
1208
|
-
}, props), _circle$
|
|
1113
|
+
}, props), _circle$4 || (_circle$4 = /*#__PURE__*/React__namespace.createElement("circle", {
|
|
1209
1114
|
cx: 8,
|
|
1210
1115
|
cy: 8,
|
|
1211
1116
|
r: 6,
|
|
@@ -1216,7 +1121,7 @@ var SvgCircleSmFill = function SvgCircleSmFill(props) {
|
|
|
1216
1121
|
const COMPONENT_ID$7 = 'forms.toggle_svg';
|
|
1217
1122
|
const StyledToggleSvg = styled__default.default(SvgCircleSmFill).attrs({
|
|
1218
1123
|
'data-garden-id': COMPONENT_ID$7,
|
|
1219
|
-
'data-garden-version': '9.
|
|
1124
|
+
'data-garden-version': '9.1.0'
|
|
1220
1125
|
}).withConfig({
|
|
1221
1126
|
displayName: "StyledToggleSvg",
|
|
1222
1127
|
componentId: "sc-162xbyx-0"
|
|
@@ -1246,22 +1151,22 @@ const colorStyles$3 = _ref => {
|
|
|
1246
1151
|
const sizeStyles$6 = _ref2 => {
|
|
1247
1152
|
let {
|
|
1248
1153
|
theme,
|
|
1249
|
-
isBare,
|
|
1250
|
-
isCompact
|
|
1154
|
+
$isBare,
|
|
1155
|
+
$isCompact
|
|
1251
1156
|
} = _ref2;
|
|
1252
|
-
const padding = isBare ? undefined : polished.math(`${theme.iconSizes.md} + ${theme.space.base * 5}`);
|
|
1253
|
-
const iconVerticalPosition = `${theme.space.base * (isCompact ? 1.5 : 2.5) + 1}px`;
|
|
1157
|
+
const padding = $isBare ? undefined : polished.math(`${theme.iconSizes.md} + ${theme.space.base * 5}`);
|
|
1158
|
+
const iconVerticalPosition = `${theme.space.base * ($isCompact ? 1.5 : 2.5) + 1}px`;
|
|
1254
1159
|
const iconHorizontalPosition = `${theme.space.base * 3}px`;
|
|
1255
1160
|
return styled.css(["padding-", ":", ";& + ", "{top:", ";", ":", ";}"], theme.rtl ? 'left' : 'right', padding, StyledTextMediaFigure, iconVerticalPosition, theme.rtl ? 'left' : 'right', iconHorizontalPosition);
|
|
1256
1161
|
};
|
|
1257
1162
|
const StyledSelect = styled__default.default(StyledTextInput).attrs({
|
|
1258
1163
|
'data-garden-id': COMPONENT_ID$6,
|
|
1259
|
-
'data-garden-version': '9.
|
|
1164
|
+
'data-garden-version': '9.1.0',
|
|
1260
1165
|
as: 'select'
|
|
1261
1166
|
}).withConfig({
|
|
1262
1167
|
displayName: "StyledSelect",
|
|
1263
1168
|
componentId: "sc-8xdxpt-0"
|
|
1264
|
-
})(["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;}"], sizeStyles$6, colorStyles$3, props => reactTheming.getColor({
|
|
1169
|
+
})(["opacity:1;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;}"], sizeStyles$6, colorStyles$3, props => reactTheming.getColor({
|
|
1265
1170
|
theme: props.theme,
|
|
1266
1171
|
variable: 'foreground.default'
|
|
1267
1172
|
}), StyledTextMediaFigure);
|
|
@@ -1270,14 +1175,14 @@ const COMPONENT_ID$5 = 'forms.select_wrapper';
|
|
|
1270
1175
|
const sizeStyles$5 = _ref => {
|
|
1271
1176
|
let {
|
|
1272
1177
|
theme,
|
|
1273
|
-
isCompact
|
|
1178
|
+
$isCompact
|
|
1274
1179
|
} = _ref;
|
|
1275
|
-
const height = `${theme.space.base * (isCompact ? 8 : 10)}px`;
|
|
1180
|
+
const height = `${theme.space.base * ($isCompact ? 8 : 10)}px`;
|
|
1276
1181
|
return styled.css(["max-height:", ";"], height);
|
|
1277
1182
|
};
|
|
1278
1183
|
const StyledSelectWrapper = styled__default.default(StyledTextFauxInput).attrs({
|
|
1279
1184
|
'data-garden-id': COMPONENT_ID$5,
|
|
1280
|
-
'data-garden-version': '9.
|
|
1185
|
+
'data-garden-version': '9.1.0'
|
|
1281
1186
|
}).withConfig({
|
|
1282
1187
|
displayName: "StyledSelectWrapper",
|
|
1283
1188
|
componentId: "sc-i7b6hw-0"
|
|
@@ -1331,7 +1236,7 @@ const trackLowerStyles = function (styles) {
|
|
|
1331
1236
|
const colorStyles$2 = _ref => {
|
|
1332
1237
|
let {
|
|
1333
1238
|
theme,
|
|
1334
|
-
hasLowerTrack
|
|
1239
|
+
$hasLowerTrack
|
|
1335
1240
|
} = _ref;
|
|
1336
1241
|
const options = {
|
|
1337
1242
|
theme,
|
|
@@ -1381,18 +1286,18 @@ const colorStyles$2 = _ref => {
|
|
|
1381
1286
|
offset: -200
|
|
1382
1287
|
}
|
|
1383
1288
|
});
|
|
1384
|
-
const trackLowerBackgroundColor = hasLowerTrack ? thumbBackgroundColor : '';
|
|
1385
|
-
const trackBackgroundImage = hasLowerTrack ? `linear-gradient(${trackLowerBackgroundColor}, ${trackLowerBackgroundColor})` : '';
|
|
1289
|
+
const trackLowerBackgroundColor = $hasLowerTrack ? thumbBackgroundColor : '';
|
|
1290
|
+
const trackBackgroundImage = $hasLowerTrack ? `linear-gradient(${trackLowerBackgroundColor}, ${trackLowerBackgroundColor})` : '';
|
|
1386
1291
|
const trackDisabledBackgroundColor = reactTheming.getColor({
|
|
1387
1292
|
theme,
|
|
1388
1293
|
variable: 'background.disabled',
|
|
1389
1294
|
transparency: theme.opacity[200]
|
|
1390
1295
|
});
|
|
1391
|
-
const trackDisabledLowerBackgroundColor = hasLowerTrack ? reactTheming.getColor({
|
|
1296
|
+
const trackDisabledLowerBackgroundColor = $hasLowerTrack ? reactTheming.getColor({
|
|
1392
1297
|
theme,
|
|
1393
1298
|
variable: 'border.emphasis'
|
|
1394
1299
|
}) : '';
|
|
1395
|
-
const trackDisabledBackgroundImage = hasLowerTrack ? `linear-gradient(${trackDisabledLowerBackgroundColor}, ${trackDisabledLowerBackgroundColor})` : '';
|
|
1300
|
+
const trackDisabledBackgroundImage = $hasLowerTrack ? `linear-gradient(${trackDisabledLowerBackgroundColor}, ${trackDisabledLowerBackgroundColor})` : '';
|
|
1396
1301
|
return styled.css(["", " ", " ", " ", " ", " ", " ", " ", " ", ""], trackStyles(`
|
|
1397
1302
|
background-color: ${trackBackgroundColor};
|
|
1398
1303
|
background-image: ${trackBackgroundImage}; /* [1] */
|
|
@@ -1449,10 +1354,10 @@ const sizeStyles$4 = _ref2 => {
|
|
|
1449
1354
|
};
|
|
1450
1355
|
const StyledRangeInput = styled__default.default.input.attrs(props => ({
|
|
1451
1356
|
'data-garden-id': COMPONENT_ID$4,
|
|
1452
|
-
'data-garden-version': '9.
|
|
1357
|
+
'data-garden-version': '9.1.0',
|
|
1453
1358
|
type: 'range',
|
|
1454
1359
|
style: {
|
|
1455
|
-
backgroundSize: props
|
|
1360
|
+
backgroundSize: props.$hasLowerTrack && props.$backgroundSize
|
|
1456
1361
|
}
|
|
1457
1362
|
})).withConfig({
|
|
1458
1363
|
displayName: "StyledRangeInput",
|
|
@@ -1474,8 +1379,8 @@ const StyledRangeInput = styled__default.default.input.attrs(props => ({
|
|
|
1474
1379
|
box-sizing: border-box;
|
|
1475
1380
|
`), colorStyles$2, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$4, props));
|
|
1476
1381
|
StyledRangeInput.defaultProps = {
|
|
1477
|
-
backgroundSize: '0%',
|
|
1478
|
-
hasLowerTrack: true,
|
|
1382
|
+
$backgroundSize: '0%',
|
|
1383
|
+
$hasLowerTrack: true,
|
|
1479
1384
|
theme: reactTheming.DEFAULT_THEME
|
|
1480
1385
|
};
|
|
1481
1386
|
|
|
@@ -1574,7 +1479,7 @@ const sizeStyles$3 = _ref2 => {
|
|
|
1574
1479
|
};
|
|
1575
1480
|
const StyledTile = styled__default.default.label.attrs({
|
|
1576
1481
|
'data-garden-id': COMPONENT_ID$3,
|
|
1577
|
-
'data-garden-version': '9.
|
|
1482
|
+
'data-garden-version': '9.1.0'
|
|
1578
1483
|
}).withConfig({
|
|
1579
1484
|
displayName: "StyledTile",
|
|
1580
1485
|
componentId: "sc-1jjvmxs-0"
|
|
@@ -1584,21 +1489,21 @@ const COMPONENT_ID$2 = 'forms.tile_description';
|
|
|
1584
1489
|
const sizeStyles$2 = _ref => {
|
|
1585
1490
|
let {
|
|
1586
1491
|
theme,
|
|
1587
|
-
isCentered
|
|
1492
|
+
$isCentered
|
|
1588
1493
|
} = _ref;
|
|
1589
1494
|
const marginTop = `${theme.space.base}px`;
|
|
1590
|
-
const marginHorizontal = isCentered ? undefined : polished.math(`(${theme.iconSizes.md} * 2) + ${theme.space.base * 5}px`);
|
|
1495
|
+
const marginHorizontal = $isCentered ? undefined : polished.math(`(${theme.iconSizes.md} * 2) + ${theme.space.base * 5}px`);
|
|
1591
1496
|
const fontSize = theme.fontSizes.sm;
|
|
1592
1497
|
const lineHeight = reactTheming.getLineHeight(theme.space.base * 4, fontSize);
|
|
1593
1498
|
return styled.css(["margin-top:", ";margin-", ":", ";line-height:", ";font-size:", ";"], marginTop, theme.rtl ? 'right' : 'left', marginHorizontal, lineHeight, fontSize);
|
|
1594
1499
|
};
|
|
1595
1500
|
const StyledTileDescription = styled__default.default.span.attrs({
|
|
1596
1501
|
'data-garden-id': COMPONENT_ID$2,
|
|
1597
|
-
'data-garden-version': '9.
|
|
1502
|
+
'data-garden-version': '9.1.0'
|
|
1598
1503
|
}).withConfig({
|
|
1599
1504
|
displayName: "StyledTileDescription",
|
|
1600
1505
|
componentId: "sc-xfuu7u-0"
|
|
1601
|
-
})(["display:block;text-align:", ";", ";", ";"], props => props
|
|
1506
|
+
})(["display:block;text-align:", ";", ";", ";"], props => props.$isCentered && 'center', sizeStyles$2, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$2, props));
|
|
1602
1507
|
|
|
1603
1508
|
const COMPONENT_ID$1 = 'forms.tile_icon';
|
|
1604
1509
|
const colorStyles = _ref => {
|
|
@@ -1641,13 +1546,13 @@ const colorStyles = _ref => {
|
|
|
1641
1546
|
const sizeStyles$1 = _ref2 => {
|
|
1642
1547
|
let {
|
|
1643
1548
|
theme,
|
|
1644
|
-
isCentered
|
|
1549
|
+
$isCentered
|
|
1645
1550
|
} = _ref2;
|
|
1646
1551
|
const iconSize = polished.math(`${theme.iconSizes.md} * 2`);
|
|
1647
1552
|
let position;
|
|
1648
1553
|
let top;
|
|
1649
1554
|
let horizontal;
|
|
1650
|
-
if (
|
|
1555
|
+
if (!$isCentered) {
|
|
1651
1556
|
position = 'absolute';
|
|
1652
1557
|
top = `${theme.space.base * 6}px`;
|
|
1653
1558
|
horizontal = `${theme.space.base * 5}px`;
|
|
@@ -1656,7 +1561,7 @@ const sizeStyles$1 = _ref2 => {
|
|
|
1656
1561
|
};
|
|
1657
1562
|
const StyledTileIcon = styled__default.default.span.attrs({
|
|
1658
1563
|
'data-garden-id': COMPONENT_ID$1,
|
|
1659
|
-
'data-garden-version': '9.
|
|
1564
|
+
'data-garden-version': '9.1.0'
|
|
1660
1565
|
}).withConfig({
|
|
1661
1566
|
displayName: "StyledTileIcon",
|
|
1662
1567
|
componentId: "sc-1wazhg4-0"
|
|
@@ -1671,21 +1576,21 @@ const COMPONENT_ID = 'forms.tile_label';
|
|
|
1671
1576
|
const sizeStyles = _ref => {
|
|
1672
1577
|
let {
|
|
1673
1578
|
theme,
|
|
1674
|
-
isCentered
|
|
1579
|
+
$isCentered
|
|
1675
1580
|
} = _ref;
|
|
1676
|
-
const marginTop = isCentered ? `${theme.space.base * 2}px` : 0;
|
|
1677
|
-
const marginHorizontal = isCentered ? undefined : polished.math(`(${theme.iconSizes.md} * 2) + ${theme.space.base * 5}px`);
|
|
1581
|
+
const marginTop = $isCentered ? `${theme.space.base * 2}px` : 0;
|
|
1582
|
+
const marginHorizontal = $isCentered ? undefined : polished.math(`(${theme.iconSizes.md} * 2) + ${theme.space.base * 5}px`);
|
|
1678
1583
|
const fontSize = theme.fontSizes.md;
|
|
1679
1584
|
const lineHeight = reactTheming.getLineHeight(theme.space.base * 5, fontSize);
|
|
1680
1585
|
return styled.css(["margin-top:", ";margin-", ":", ";line-height:", ";font-size:", ";"], marginTop, theme.rtl ? 'right' : 'left', marginHorizontal, lineHeight, fontSize);
|
|
1681
1586
|
};
|
|
1682
1587
|
const StyledTileLabel = styled__default.default.span.attrs({
|
|
1683
1588
|
'data-garden-id': COMPONENT_ID,
|
|
1684
|
-
'data-garden-version': '9.
|
|
1589
|
+
'data-garden-version': '9.1.0'
|
|
1685
1590
|
}).withConfig({
|
|
1686
1591
|
displayName: "StyledTileLabel",
|
|
1687
1592
|
componentId: "sc-1mypv27-0"
|
|
1688
|
-
})(["display:block;text-align:", ";font-weight:", ";", ";", ";"], props => props
|
|
1593
|
+
})(["display:block;text-align:", ";font-weight:", ";", ";", ";"], props => props.$isCentered && 'center', props => props.theme.fontWeights.semibold, sizeStyles, props => reactTheming.retrieveComponentStyles(COMPONENT_ID, props));
|
|
1689
1594
|
|
|
1690
1595
|
const InputContext = React.createContext(undefined);
|
|
1691
1596
|
const useInputContext = () => {
|
|
@@ -1733,12 +1638,107 @@ const VALIDATION = ['success', 'warning', 'error'];
|
|
|
1733
1638
|
const FILE_VALIDATION = ['success', 'error'];
|
|
1734
1639
|
const FILE_TYPE = ['pdf', 'zip', 'image', 'document', 'spreadsheet', 'presentation', 'generic'];
|
|
1735
1640
|
|
|
1641
|
+
var _g$2, _circle$3;
|
|
1642
|
+
function _extends$n() { return _extends$n = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$n.apply(null, arguments); }
|
|
1643
|
+
var SvgAlertErrorStroke = function SvgAlertErrorStroke(props) {
|
|
1644
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$n({
|
|
1645
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1646
|
+
width: 16,
|
|
1647
|
+
height: 16,
|
|
1648
|
+
focusable: "false",
|
|
1649
|
+
viewBox: "0 0 16 16",
|
|
1650
|
+
"aria-hidden": "true"
|
|
1651
|
+
}, props), _g$2 || (_g$2 = /*#__PURE__*/React__namespace.createElement("g", {
|
|
1652
|
+
fill: "none",
|
|
1653
|
+
stroke: "currentColor"
|
|
1654
|
+
}, /*#__PURE__*/React__namespace.createElement("circle", {
|
|
1655
|
+
cx: 7.5,
|
|
1656
|
+
cy: 8.5,
|
|
1657
|
+
r: 7
|
|
1658
|
+
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
1659
|
+
strokeLinecap: "round",
|
|
1660
|
+
d: "M7.5 4.5V9"
|
|
1661
|
+
}))), _circle$3 || (_circle$3 = /*#__PURE__*/React__namespace.createElement("circle", {
|
|
1662
|
+
cx: 7.5,
|
|
1663
|
+
cy: 12,
|
|
1664
|
+
r: 1,
|
|
1665
|
+
fill: "currentColor"
|
|
1666
|
+
})));
|
|
1667
|
+
};
|
|
1668
|
+
|
|
1669
|
+
var _path$k, _circle$2;
|
|
1670
|
+
function _extends$m() { return _extends$m = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$m.apply(null, arguments); }
|
|
1671
|
+
var SvgAlertWarningStroke = function SvgAlertWarningStroke(props) {
|
|
1672
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$m({
|
|
1673
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1674
|
+
width: 16,
|
|
1675
|
+
height: 16,
|
|
1676
|
+
focusable: "false",
|
|
1677
|
+
viewBox: "0 0 16 16",
|
|
1678
|
+
"aria-hidden": "true"
|
|
1679
|
+
}, props), _path$k || (_path$k = /*#__PURE__*/React__namespace.createElement("path", {
|
|
1680
|
+
fill: "none",
|
|
1681
|
+
stroke: "currentColor",
|
|
1682
|
+
strokeLinecap: "round",
|
|
1683
|
+
d: "M.88 13.77L7.06 1.86c.19-.36.7-.36.89 0l6.18 11.91c.17.33-.07.73-.44.73H1.32c-.37 0-.61-.4-.44-.73zM7.5 6v3.5"
|
|
1684
|
+
})), _circle$2 || (_circle$2 = /*#__PURE__*/React__namespace.createElement("circle", {
|
|
1685
|
+
cx: 7.5,
|
|
1686
|
+
cy: 12,
|
|
1687
|
+
r: 1,
|
|
1688
|
+
fill: "currentColor"
|
|
1689
|
+
})));
|
|
1690
|
+
};
|
|
1691
|
+
|
|
1692
|
+
var _g$1;
|
|
1693
|
+
function _extends$l() { return _extends$l = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$l.apply(null, arguments); }
|
|
1694
|
+
var SvgCheckCircleStroke$1 = function SvgCheckCircleStroke(props) {
|
|
1695
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$l({
|
|
1696
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1697
|
+
width: 16,
|
|
1698
|
+
height: 16,
|
|
1699
|
+
focusable: "false",
|
|
1700
|
+
viewBox: "0 0 16 16",
|
|
1701
|
+
"aria-hidden": "true"
|
|
1702
|
+
}, props), _g$1 || (_g$1 = /*#__PURE__*/React__namespace.createElement("g", {
|
|
1703
|
+
fill: "none",
|
|
1704
|
+
stroke: "currentColor"
|
|
1705
|
+
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
1706
|
+
strokeLinecap: "round",
|
|
1707
|
+
strokeLinejoin: "round",
|
|
1708
|
+
d: "M4 9l2.5 2.5 5-5"
|
|
1709
|
+
}), /*#__PURE__*/React__namespace.createElement("circle", {
|
|
1710
|
+
cx: 7.5,
|
|
1711
|
+
cy: 8.5,
|
|
1712
|
+
r: 7
|
|
1713
|
+
}))));
|
|
1714
|
+
};
|
|
1715
|
+
|
|
1716
|
+
const MessageIcon = _ref => {
|
|
1717
|
+
let {
|
|
1718
|
+
validation,
|
|
1719
|
+
children,
|
|
1720
|
+
...props
|
|
1721
|
+
} = _ref;
|
|
1722
|
+
return React__namespace.default.createElement(StyledMessageIcon, Object.assign({
|
|
1723
|
+
"aria-hidden": null,
|
|
1724
|
+
role: "img"
|
|
1725
|
+
}, props), validation ? {
|
|
1726
|
+
error: React__namespace.default.createElement(SvgAlertErrorStroke, null),
|
|
1727
|
+
success: React__namespace.default.createElement(SvgCheckCircleStroke$1, null),
|
|
1728
|
+
warning: React__namespace.default.createElement(SvgAlertWarningStroke, null)
|
|
1729
|
+
}[validation] : children);
|
|
1730
|
+
};
|
|
1731
|
+
MessageIcon.displayName = 'Field.MessageIcon';
|
|
1732
|
+
MessageIcon.propTypes = {
|
|
1733
|
+
validation: PropTypes__default.default.oneOf(VALIDATION)
|
|
1734
|
+
};
|
|
1735
|
+
|
|
1736
1736
|
const Message = React__namespace.default.forwardRef((_ref, ref) => {
|
|
1737
1737
|
let {
|
|
1738
1738
|
validation,
|
|
1739
1739
|
validationLabel,
|
|
1740
1740
|
children,
|
|
1741
|
-
...
|
|
1741
|
+
...other
|
|
1742
1742
|
} = _ref;
|
|
1743
1743
|
const {
|
|
1744
1744
|
hasMessage,
|
|
@@ -1767,9 +1767,9 @@ const Message = React__namespace.default.forwardRef((_ref, ref) => {
|
|
|
1767
1767
|
MessageComponent = StyledMessage;
|
|
1768
1768
|
}
|
|
1769
1769
|
let combinedProps = {
|
|
1770
|
-
validation,
|
|
1770
|
+
$validation: validation,
|
|
1771
1771
|
validationLabel,
|
|
1772
|
-
...
|
|
1772
|
+
...other
|
|
1773
1773
|
};
|
|
1774
1774
|
if (getMessageProps) {
|
|
1775
1775
|
combinedProps = getMessageProps(combinedProps);
|
|
@@ -1777,7 +1777,7 @@ const Message = React__namespace.default.forwardRef((_ref, ref) => {
|
|
|
1777
1777
|
const ariaLabel = reactTheming.useText(Message, combinedProps, 'validationLabel', validation, validation !== undefined);
|
|
1778
1778
|
return React__namespace.default.createElement(MessageComponent, Object.assign({
|
|
1779
1779
|
ref: ref
|
|
1780
|
-
}, combinedProps), !!validation && React__namespace.default.createElement(
|
|
1780
|
+
}, combinedProps), !!validation && React__namespace.default.createElement(MessageIcon, {
|
|
1781
1781
|
validation: validation,
|
|
1782
1782
|
"aria-label": ariaLabel
|
|
1783
1783
|
}), children);
|
|
@@ -1794,11 +1794,17 @@ const useFieldsetContext = () => {
|
|
|
1794
1794
|
return fieldsetContext;
|
|
1795
1795
|
};
|
|
1796
1796
|
|
|
1797
|
-
const Label$1 = React__namespace.default.forwardRef((
|
|
1797
|
+
const Label$1 = React__namespace.default.forwardRef((_ref, ref) => {
|
|
1798
|
+
let {
|
|
1799
|
+
children,
|
|
1800
|
+
isRegular,
|
|
1801
|
+
...other
|
|
1802
|
+
} = _ref;
|
|
1798
1803
|
const fieldContext = useFieldContext();
|
|
1799
1804
|
const fieldsetContext = useFieldsetContext();
|
|
1800
1805
|
const type = useInputContext();
|
|
1801
|
-
|
|
1806
|
+
const $isRegular = fieldsetContext && isRegular === undefined ? true : isRegular;
|
|
1807
|
+
let combinedProps = other;
|
|
1802
1808
|
if (fieldContext) {
|
|
1803
1809
|
combinedProps = fieldContext.getLabelProps(combinedProps);
|
|
1804
1810
|
if (type === undefined) {
|
|
@@ -1806,33 +1812,26 @@ const Label$1 = React__namespace.default.forwardRef((props, ref) => {
|
|
|
1806
1812
|
setIsLabelActive,
|
|
1807
1813
|
setIsLabelHovered
|
|
1808
1814
|
} = fieldContext;
|
|
1809
|
-
combinedProps = {
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
setIsLabelHovered(false);
|
|
1822
|
-
})
|
|
1823
|
-
};
|
|
1815
|
+
combinedProps.onMouseUp = containerUtilities.composeEventHandlers(other.onMouseUp, () => {
|
|
1816
|
+
setIsLabelActive(false);
|
|
1817
|
+
});
|
|
1818
|
+
combinedProps.onMouseDown = containerUtilities.composeEventHandlers(other.onMouseDown, () => {
|
|
1819
|
+
setIsLabelActive(true);
|
|
1820
|
+
});
|
|
1821
|
+
combinedProps.onMouseEnter = containerUtilities.composeEventHandlers(other.onMouseEnter, () => {
|
|
1822
|
+
setIsLabelHovered(true);
|
|
1823
|
+
});
|
|
1824
|
+
combinedProps.onMouseLeave = containerUtilities.composeEventHandlers(other.onMouseLeave, () => {
|
|
1825
|
+
setIsLabelHovered(false);
|
|
1826
|
+
});
|
|
1824
1827
|
}
|
|
1825
1828
|
}
|
|
1826
|
-
if (fieldsetContext) {
|
|
1827
|
-
combinedProps = {
|
|
1828
|
-
...combinedProps,
|
|
1829
|
-
isRegular: combinedProps.isRegular === undefined ? true : combinedProps.isRegular
|
|
1830
|
-
};
|
|
1831
|
-
}
|
|
1832
1829
|
if (type === 'radio') {
|
|
1833
1830
|
return React__namespace.default.createElement(StyledRadioLabel, Object.assign({
|
|
1834
1831
|
ref: ref
|
|
1835
|
-
}, combinedProps
|
|
1832
|
+
}, combinedProps, {
|
|
1833
|
+
$isRegular: $isRegular
|
|
1834
|
+
}), React__namespace.default.createElement(StyledRadioSvg, null), children);
|
|
1836
1835
|
} else if (type === 'checkbox') {
|
|
1837
1836
|
const onLabelSelect = e => {
|
|
1838
1837
|
const isFirefox = navigator?.userAgent.toLowerCase().indexOf('firefox') > -1;
|
|
@@ -1849,21 +1848,24 @@ const Label$1 = React__namespace.default.forwardRef((props, ref) => {
|
|
|
1849
1848
|
}
|
|
1850
1849
|
}
|
|
1851
1850
|
};
|
|
1852
|
-
combinedProps =
|
|
1853
|
-
...combinedProps,
|
|
1854
|
-
onClick: containerUtilities.composeEventHandlers(combinedProps.onClick, onLabelSelect)
|
|
1855
|
-
};
|
|
1851
|
+
combinedProps.onClick = containerUtilities.composeEventHandlers(combinedProps.onClick, onLabelSelect);
|
|
1856
1852
|
return React__namespace.default.createElement(StyledCheckLabel, Object.assign({
|
|
1857
1853
|
ref: ref
|
|
1858
|
-
}, combinedProps
|
|
1854
|
+
}, combinedProps, {
|
|
1855
|
+
$isRegular: $isRegular
|
|
1856
|
+
}), React__namespace.default.createElement(StyledCheckSvg, null), React__namespace.default.createElement(StyledDashSvg, null), children);
|
|
1859
1857
|
} else if (type === 'toggle') {
|
|
1860
1858
|
return React__namespace.default.createElement(StyledToggleLabel, Object.assign({
|
|
1861
1859
|
ref: ref
|
|
1862
|
-
}, combinedProps
|
|
1860
|
+
}, combinedProps, {
|
|
1861
|
+
$isRegular: $isRegular
|
|
1862
|
+
}), React__namespace.default.createElement(StyledToggleSvg, null), children);
|
|
1863
1863
|
}
|
|
1864
1864
|
return React__namespace.default.createElement(StyledLabel, Object.assign({
|
|
1865
1865
|
ref: ref
|
|
1866
|
-
}, combinedProps
|
|
1866
|
+
}, combinedProps, {
|
|
1867
|
+
$isRegular: $isRegular
|
|
1868
|
+
}), children);
|
|
1867
1869
|
});
|
|
1868
1870
|
Label$1.displayName = 'Field.Label';
|
|
1869
1871
|
Label$1.propTypes = {
|
|
@@ -1910,22 +1912,26 @@ Field.Label = Label$1;
|
|
|
1910
1912
|
Field.Message = Message;
|
|
1911
1913
|
|
|
1912
1914
|
const LegendComponent = React.forwardRef((props, ref) => {
|
|
1913
|
-
|
|
1914
|
-
return React__namespace.default.createElement(StyledLegend, Object.assign({}, props, fieldsetContext, {
|
|
1915
|
+
return React__namespace.default.createElement(StyledLegend, Object.assign({}, props, {
|
|
1915
1916
|
ref: ref
|
|
1916
1917
|
}));
|
|
1917
1918
|
});
|
|
1918
1919
|
LegendComponent.displayName = 'Fieldset.Legend';
|
|
1919
1920
|
const Legend = LegendComponent;
|
|
1920
1921
|
|
|
1921
|
-
const FieldsetComponent = React.forwardRef((
|
|
1922
|
+
const FieldsetComponent = React.forwardRef((_ref, ref) => {
|
|
1923
|
+
let {
|
|
1924
|
+
isCompact,
|
|
1925
|
+
...other
|
|
1926
|
+
} = _ref;
|
|
1922
1927
|
const fieldsetContext = React.useMemo(() => ({
|
|
1923
|
-
isCompact
|
|
1924
|
-
}), [
|
|
1928
|
+
isCompact
|
|
1929
|
+
}), [isCompact]);
|
|
1925
1930
|
return React__namespace.default.createElement(FieldsetContext.Provider, {
|
|
1926
1931
|
value: fieldsetContext
|
|
1927
|
-
}, React__namespace.default.createElement(StyledFieldset, Object.assign({},
|
|
1928
|
-
ref: ref
|
|
1932
|
+
}, React__namespace.default.createElement(StyledFieldset, Object.assign({}, other, {
|
|
1933
|
+
ref: ref,
|
|
1934
|
+
$isCompact: isCompact
|
|
1929
1935
|
})));
|
|
1930
1936
|
});
|
|
1931
1937
|
FieldsetComponent.displayName = 'Fieldset';
|
|
@@ -1939,7 +1945,8 @@ const Checkbox = React__namespace.default.forwardRef((_ref, ref) => {
|
|
|
1939
1945
|
let {
|
|
1940
1946
|
indeterminate,
|
|
1941
1947
|
children,
|
|
1942
|
-
|
|
1948
|
+
isCompact,
|
|
1949
|
+
...other
|
|
1943
1950
|
} = _ref;
|
|
1944
1951
|
const fieldsetContext = useFieldsetContext();
|
|
1945
1952
|
const fieldContext = useFieldContext();
|
|
@@ -1958,9 +1965,9 @@ const Checkbox = React__namespace.default.forwardRef((_ref, ref) => {
|
|
|
1958
1965
|
});
|
|
1959
1966
|
};
|
|
1960
1967
|
let combinedProps = {
|
|
1968
|
+
$isCompact: fieldsetContext ? fieldsetContext.isCompact : isCompact,
|
|
1961
1969
|
ref: combinedRef,
|
|
1962
|
-
...
|
|
1963
|
-
...fieldsetContext
|
|
1970
|
+
...other
|
|
1964
1971
|
};
|
|
1965
1972
|
if (fieldContext) {
|
|
1966
1973
|
combinedProps = fieldContext.getInputProps(combinedProps);
|
|
@@ -1983,29 +1990,30 @@ const useInputGroupContext = () => {
|
|
|
1983
1990
|
const Input = React__namespace.default.forwardRef((_ref, ref) => {
|
|
1984
1991
|
let {
|
|
1985
1992
|
onSelect,
|
|
1986
|
-
|
|
1993
|
+
isBare,
|
|
1994
|
+
isCompact,
|
|
1995
|
+
focusInset,
|
|
1996
|
+
validation,
|
|
1997
|
+
...other
|
|
1987
1998
|
} = _ref;
|
|
1988
1999
|
const fieldContext = useFieldContext();
|
|
1989
2000
|
const inputGroupContext = useInputGroupContext();
|
|
1990
|
-
|
|
1991
|
-
event.currentTarget.select();
|
|
1992
|
-
}) : onSelect;
|
|
1993
|
-
let combinedProps = {
|
|
1994
|
-
ref,
|
|
1995
|
-
onSelect: onSelectHandler,
|
|
1996
|
-
...props
|
|
1997
|
-
};
|
|
1998
|
-
if (inputGroupContext) {
|
|
1999
|
-
combinedProps = {
|
|
2000
|
-
...combinedProps,
|
|
2001
|
-
isCompact: inputGroupContext.isCompact || combinedProps.isCompact,
|
|
2002
|
-
focusInset: props.focusInset === undefined ? true : props.focusInset
|
|
2003
|
-
};
|
|
2004
|
-
}
|
|
2001
|
+
let combinedProps = other;
|
|
2005
2002
|
if (fieldContext) {
|
|
2006
2003
|
combinedProps = fieldContext.getInputProps(combinedProps);
|
|
2007
2004
|
}
|
|
2008
|
-
|
|
2005
|
+
const onSelectHandler = other.readOnly ? containerUtilities.composeEventHandlers(onSelect, event => {
|
|
2006
|
+
event.currentTarget.select();
|
|
2007
|
+
}) : onSelect;
|
|
2008
|
+
return React__namespace.default.createElement(StyledTextInput, Object.assign({
|
|
2009
|
+
ref: ref,
|
|
2010
|
+
onSelect: onSelectHandler
|
|
2011
|
+
}, combinedProps, {
|
|
2012
|
+
$isBare: isBare,
|
|
2013
|
+
$isCompact: inputGroupContext ? inputGroupContext.isCompact : isCompact,
|
|
2014
|
+
$focusInset: inputGroupContext && focusInset === undefined ? true : focusInset,
|
|
2015
|
+
$validation: validation
|
|
2016
|
+
}));
|
|
2009
2017
|
});
|
|
2010
2018
|
Input.propTypes = {
|
|
2011
2019
|
isCompact: PropTypes__default.default.bool,
|
|
@@ -2018,14 +2026,15 @@ Input.displayName = 'Input';
|
|
|
2018
2026
|
const Radio = React__namespace.default.forwardRef((_ref, ref) => {
|
|
2019
2027
|
let {
|
|
2020
2028
|
children,
|
|
2021
|
-
|
|
2029
|
+
isCompact,
|
|
2030
|
+
...other
|
|
2022
2031
|
} = _ref;
|
|
2023
2032
|
const fieldsetContext = useFieldsetContext();
|
|
2024
2033
|
const fieldContext = useFieldContext();
|
|
2025
2034
|
let combinedProps = {
|
|
2035
|
+
$isCompact: fieldsetContext ? fieldsetContext.isCompact : isCompact,
|
|
2026
2036
|
ref,
|
|
2027
|
-
...
|
|
2028
|
-
...fieldsetContext
|
|
2037
|
+
...other
|
|
2029
2038
|
};
|
|
2030
2039
|
if (fieldContext) {
|
|
2031
2040
|
combinedProps = fieldContext.getInputProps(combinedProps);
|
|
@@ -2045,7 +2054,7 @@ const Range = React__namespace.default.forwardRef((_ref, ref) => {
|
|
|
2045
2054
|
min,
|
|
2046
2055
|
max,
|
|
2047
2056
|
step,
|
|
2048
|
-
...
|
|
2057
|
+
...other
|
|
2049
2058
|
} = _ref;
|
|
2050
2059
|
const [backgroundSize, setBackgroundSize] = React.useState('0');
|
|
2051
2060
|
const rangeRef = React.useRef();
|
|
@@ -2064,18 +2073,18 @@ const Range = React__namespace.default.forwardRef((_ref, ref) => {
|
|
|
2064
2073
|
[max, min, step]);
|
|
2065
2074
|
React.useEffect(() => {
|
|
2066
2075
|
updateBackgroundWidthFromInput(rangeRef.current);
|
|
2067
|
-
}, [rangeRef, updateBackgroundWidthFromInput,
|
|
2068
|
-
const onChange = hasLowerTrack ? containerUtilities.composeEventHandlers(
|
|
2076
|
+
}, [rangeRef, updateBackgroundWidthFromInput, other.value]);
|
|
2077
|
+
const onChange = hasLowerTrack ? containerUtilities.composeEventHandlers(other.onChange, event => {
|
|
2069
2078
|
updateBackgroundWidthFromInput(event.target);
|
|
2070
|
-
}) :
|
|
2079
|
+
}) : other.onChange;
|
|
2071
2080
|
let combinedProps = {
|
|
2072
|
-
|
|
2073
|
-
hasLowerTrack,
|
|
2074
|
-
min,
|
|
2081
|
+
$backgroundSize: backgroundSize,
|
|
2082
|
+
$hasLowerTrack: hasLowerTrack,
|
|
2075
2083
|
max,
|
|
2084
|
+
min,
|
|
2085
|
+
ref: reactMergeRefs.mergeRefs([rangeRef, ref]),
|
|
2076
2086
|
step,
|
|
2077
|
-
|
|
2078
|
-
...props,
|
|
2087
|
+
...other,
|
|
2079
2088
|
onChange
|
|
2080
2089
|
};
|
|
2081
2090
|
if (fieldContext) {
|
|
@@ -2096,12 +2105,17 @@ const parseStyleValue = value => {
|
|
|
2096
2105
|
};
|
|
2097
2106
|
const Textarea = React__namespace.default.forwardRef((_ref, ref) => {
|
|
2098
2107
|
let {
|
|
2108
|
+
isCompact,
|
|
2109
|
+
isBare,
|
|
2110
|
+
focusInset,
|
|
2111
|
+
isResizable,
|
|
2099
2112
|
minRows,
|
|
2100
2113
|
maxRows,
|
|
2101
2114
|
style,
|
|
2115
|
+
validation,
|
|
2102
2116
|
onChange,
|
|
2103
2117
|
onSelect,
|
|
2104
|
-
...
|
|
2118
|
+
...other
|
|
2105
2119
|
} = _ref;
|
|
2106
2120
|
const fieldContext = useFieldContext();
|
|
2107
2121
|
const textAreaRef = React.useRef();
|
|
@@ -2110,8 +2124,8 @@ const Textarea = React__namespace.default.forwardRef((_ref, ref) => {
|
|
|
2110
2124
|
overflow: false,
|
|
2111
2125
|
height: 0
|
|
2112
2126
|
});
|
|
2113
|
-
const isControlled =
|
|
2114
|
-
const isAutoResizable = (minRows !== undefined || maxRows !== undefined) && !
|
|
2127
|
+
const isControlled = other.value !== null && other.value !== undefined;
|
|
2128
|
+
const isAutoResizable = (minRows !== undefined || maxRows !== undefined) && !isResizable;
|
|
2115
2129
|
const calculateHeight = React.useCallback(() => {
|
|
2116
2130
|
if (!isAutoResizable) {
|
|
2117
2131
|
return;
|
|
@@ -2163,33 +2177,38 @@ const Textarea = React__namespace.default.forwardRef((_ref, ref) => {
|
|
|
2163
2177
|
computedStyle.height = state.height;
|
|
2164
2178
|
computedStyle.overflow = state.overflow ? 'hidden' : undefined;
|
|
2165
2179
|
}
|
|
2166
|
-
const onSelectHandler =
|
|
2180
|
+
const onSelectHandler = other.readOnly ? containerUtilities.composeEventHandlers(onSelect, event => {
|
|
2167
2181
|
event.currentTarget.select();
|
|
2168
2182
|
}) : onSelect;
|
|
2169
2183
|
let combinedProps = {
|
|
2170
|
-
|
|
2171
|
-
|
|
2184
|
+
$focusInset: focusInset,
|
|
2185
|
+
$isBare: isBare,
|
|
2186
|
+
$isCompact: isCompact,
|
|
2187
|
+
$isResizable: isResizable,
|
|
2188
|
+
$validation: validation,
|
|
2172
2189
|
onChange: onChangeHandler,
|
|
2173
2190
|
onSelect: onSelectHandler,
|
|
2191
|
+
ref: reactMergeRefs.mergeRefs([textAreaRef, ref]),
|
|
2192
|
+
rows: minRows,
|
|
2174
2193
|
style: {
|
|
2175
2194
|
...computedStyle,
|
|
2176
2195
|
...style
|
|
2177
2196
|
},
|
|
2178
|
-
...
|
|
2197
|
+
...other
|
|
2179
2198
|
};
|
|
2180
2199
|
if (fieldContext) {
|
|
2181
2200
|
combinedProps = fieldContext.getInputProps(combinedProps);
|
|
2182
2201
|
}
|
|
2183
2202
|
return React__namespace.default.createElement(React__namespace.default.Fragment, null, React__namespace.default.createElement(StyledTextarea, combinedProps), !!isAutoResizable && React__namespace.default.createElement(StyledTextarea, {
|
|
2203
|
+
$isBare: isBare,
|
|
2204
|
+
$isCompact: isCompact,
|
|
2205
|
+
$isHidden: true,
|
|
2184
2206
|
"aria-hidden": true,
|
|
2207
|
+
className: other.className,
|
|
2185
2208
|
readOnly: true,
|
|
2186
|
-
isHidden: true,
|
|
2187
|
-
className: props.className,
|
|
2188
2209
|
ref: shadowTextAreaRef,
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
isCompact: props.isCompact,
|
|
2192
|
-
style: style
|
|
2210
|
+
style: style,
|
|
2211
|
+
tabIndex: -1
|
|
2193
2212
|
}));
|
|
2194
2213
|
});
|
|
2195
2214
|
Textarea.propTypes = {
|
|
@@ -2206,14 +2225,15 @@ Textarea.displayName = 'Textarea';
|
|
|
2206
2225
|
const Toggle = React__namespace.default.forwardRef((_ref, ref) => {
|
|
2207
2226
|
let {
|
|
2208
2227
|
children,
|
|
2209
|
-
|
|
2228
|
+
isCompact,
|
|
2229
|
+
...other
|
|
2210
2230
|
} = _ref;
|
|
2211
2231
|
const fieldsetContext = useFieldsetContext();
|
|
2212
2232
|
const fieldContext = useFieldContext();
|
|
2213
2233
|
let combinedProps = {
|
|
2234
|
+
$isCompact: fieldsetContext ? fieldsetContext.isCompact : isCompact,
|
|
2214
2235
|
ref,
|
|
2215
|
-
...
|
|
2216
|
-
...fieldsetContext
|
|
2236
|
+
...other
|
|
2217
2237
|
};
|
|
2218
2238
|
if (fieldContext) {
|
|
2219
2239
|
combinedProps = fieldContext.getInputProps(combinedProps);
|
|
@@ -2267,12 +2287,18 @@ const EndIcon = EndIconComponent;
|
|
|
2267
2287
|
|
|
2268
2288
|
const FauxInputComponent = React.forwardRef((_ref, ref) => {
|
|
2269
2289
|
let {
|
|
2270
|
-
onFocus,
|
|
2271
|
-
onBlur,
|
|
2272
2290
|
disabled,
|
|
2273
|
-
|
|
2291
|
+
focusInset,
|
|
2292
|
+
isBare,
|
|
2293
|
+
isCompact,
|
|
2274
2294
|
isFocused: controlledIsFocused,
|
|
2275
|
-
|
|
2295
|
+
isHovered,
|
|
2296
|
+
onBlur,
|
|
2297
|
+
onFocus,
|
|
2298
|
+
readOnly,
|
|
2299
|
+
validation,
|
|
2300
|
+
mediaLayout,
|
|
2301
|
+
...other
|
|
2276
2302
|
} = _ref;
|
|
2277
2303
|
const [isFocused, setIsFocused] = React.useState(false);
|
|
2278
2304
|
const onFocusHandler = containerUtilities.composeEventHandlers(onFocus, () => {
|
|
@@ -2284,11 +2310,17 @@ const FauxInputComponent = React.forwardRef((_ref, ref) => {
|
|
|
2284
2310
|
return React__namespace.default.createElement(StyledTextFauxInput, Object.assign({
|
|
2285
2311
|
onFocus: onFocusHandler,
|
|
2286
2312
|
onBlur: onBlurHandler,
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2313
|
+
$focusInset: focusInset,
|
|
2314
|
+
$isBare: isBare,
|
|
2315
|
+
$isCompact: isCompact,
|
|
2316
|
+
$isDisabled: disabled,
|
|
2317
|
+
$isFocused: controlledIsFocused === undefined ? isFocused : controlledIsFocused,
|
|
2318
|
+
$isHovered: isHovered,
|
|
2319
|
+
$isReadOnly: readOnly,
|
|
2320
|
+
$mediaLayout: mediaLayout,
|
|
2321
|
+
$validation: validation,
|
|
2290
2322
|
tabIndex: disabled ? undefined : 0
|
|
2291
|
-
},
|
|
2323
|
+
}, other, {
|
|
2292
2324
|
ref: ref
|
|
2293
2325
|
}));
|
|
2294
2326
|
});
|
|
@@ -2318,11 +2350,11 @@ const Select = React__namespace.default.forwardRef((_ref, ref) => {
|
|
|
2318
2350
|
} = _ref;
|
|
2319
2351
|
const fieldContext = useFieldContext();
|
|
2320
2352
|
let combinedProps = {
|
|
2353
|
+
$focusInset: focusInset,
|
|
2354
|
+
$isBare: isBare,
|
|
2355
|
+
$isCompact: isCompact,
|
|
2356
|
+
$validation: validation,
|
|
2321
2357
|
disabled,
|
|
2322
|
-
isBare,
|
|
2323
|
-
isCompact,
|
|
2324
|
-
validation,
|
|
2325
|
-
focusInset,
|
|
2326
2358
|
ref,
|
|
2327
2359
|
...props
|
|
2328
2360
|
};
|
|
@@ -2330,11 +2362,11 @@ const Select = React__namespace.default.forwardRef((_ref, ref) => {
|
|
|
2330
2362
|
combinedProps = fieldContext.getInputProps(combinedProps);
|
|
2331
2363
|
}
|
|
2332
2364
|
return React__namespace.default.createElement(StyledSelectWrapper, {
|
|
2333
|
-
isCompact: isCompact,
|
|
2334
|
-
isBare: isBare,
|
|
2335
|
-
isDisabled: disabled,
|
|
2336
|
-
validation: validation,
|
|
2337
|
-
focusInset: focusInset
|
|
2365
|
+
$isCompact: isCompact,
|
|
2366
|
+
$isBare: isBare,
|
|
2367
|
+
$isDisabled: disabled,
|
|
2368
|
+
$validation: validation,
|
|
2369
|
+
$focusInset: focusInset
|
|
2338
2370
|
}, React__namespace.default.createElement(StyledSelect, combinedProps), !isBare && React__namespace.default.createElement(FauxInput.EndIcon, {
|
|
2339
2371
|
isDisabled: disabled
|
|
2340
2372
|
}, React__namespace.default.createElement(SvgChevronDownStroke, null)));
|
|
@@ -2390,7 +2422,7 @@ const DescriptionComponent = React.forwardRef((props, ref) => {
|
|
|
2390
2422
|
const tilesContext = useTilesContext();
|
|
2391
2423
|
return React__namespace.default.createElement(StyledTileDescription, Object.assign({
|
|
2392
2424
|
ref: ref,
|
|
2393
|
-
isCentered: tilesContext?.isCentered
|
|
2425
|
+
$isCentered: tilesContext?.isCentered
|
|
2394
2426
|
}, props));
|
|
2395
2427
|
});
|
|
2396
2428
|
DescriptionComponent.displayName = 'Tiles.Description';
|
|
@@ -2400,7 +2432,7 @@ const IconComponent = React.forwardRef((props, ref) => {
|
|
|
2400
2432
|
const tileContext = useTilesContext();
|
|
2401
2433
|
return React__namespace.default.createElement(StyledTileIcon, Object.assign({
|
|
2402
2434
|
ref: ref,
|
|
2403
|
-
isCentered: tileContext?.isCentered
|
|
2435
|
+
$isCentered: tileContext?.isCentered
|
|
2404
2436
|
}, props));
|
|
2405
2437
|
});
|
|
2406
2438
|
IconComponent.displayName = 'Tiles.Icon';
|
|
@@ -2418,7 +2450,7 @@ const LabelComponent = React.forwardRef((props, forwardedRef) => {
|
|
|
2418
2450
|
return React__namespace.default.createElement(StyledTileLabel, Object.assign({
|
|
2419
2451
|
ref: reactMergeRefs.mergeRefs([ref, forwardedRef]),
|
|
2420
2452
|
title: title,
|
|
2421
|
-
isCentered: tilesContext?.isCentered
|
|
2453
|
+
$isCentered: tilesContext?.isCentered
|
|
2422
2454
|
}, props));
|
|
2423
2455
|
});
|
|
2424
2456
|
LabelComponent.displayName = 'Tiles.Label';
|
|
@@ -2475,7 +2507,7 @@ Tiles.Tile = Tile;
|
|
|
2475
2507
|
const InputGroup = React__namespace.default.forwardRef((_ref, ref) => {
|
|
2476
2508
|
let {
|
|
2477
2509
|
isCompact,
|
|
2478
|
-
...
|
|
2510
|
+
...other
|
|
2479
2511
|
} = _ref;
|
|
2480
2512
|
const contextValue = React.useMemo(() => ({
|
|
2481
2513
|
isCompact
|
|
@@ -2484,8 +2516,8 @@ const InputGroup = React__namespace.default.forwardRef((_ref, ref) => {
|
|
|
2484
2516
|
value: contextValue
|
|
2485
2517
|
}, React__namespace.default.createElement(StyledInputGroup, Object.assign({
|
|
2486
2518
|
ref: ref,
|
|
2487
|
-
isCompact: isCompact
|
|
2488
|
-
},
|
|
2519
|
+
$isCompact: isCompact
|
|
2520
|
+
}, other)));
|
|
2489
2521
|
});
|
|
2490
2522
|
InputGroup.displayName = 'InputGroup';
|
|
2491
2523
|
InputGroup.propTypes = {
|
|
@@ -2495,13 +2527,17 @@ InputGroup.propTypes = {
|
|
|
2495
2527
|
const FileUpload = React__namespace.default.forwardRef((_ref, ref) => {
|
|
2496
2528
|
let {
|
|
2497
2529
|
disabled,
|
|
2498
|
-
|
|
2530
|
+
isCompact,
|
|
2531
|
+
isDragging,
|
|
2532
|
+
...other
|
|
2499
2533
|
} = _ref;
|
|
2500
2534
|
return (
|
|
2501
2535
|
React__namespace.default.createElement(StyledFileUpload, Object.assign({
|
|
2502
2536
|
ref: ref,
|
|
2503
|
-
"aria-disabled": disabled
|
|
2504
|
-
|
|
2537
|
+
"aria-disabled": disabled,
|
|
2538
|
+
$isCompact: isCompact,
|
|
2539
|
+
$isDragging: isDragging
|
|
2540
|
+
}, other, {
|
|
2505
2541
|
role: "button"
|
|
2506
2542
|
}))
|
|
2507
2543
|
);
|
|
@@ -3019,9 +3055,9 @@ const FileComponent = React.forwardRef((_ref, ref) => {
|
|
|
3019
3055
|
return React__namespace.default.createElement(FileContext.Provider, {
|
|
3020
3056
|
value: fileContextValue
|
|
3021
3057
|
}, React__namespace.default.createElement(StyledFile, Object.assign({}, props, {
|
|
3022
|
-
isCompact: isCompact,
|
|
3023
|
-
focusInset: focusInset,
|
|
3024
|
-
validation: validation,
|
|
3058
|
+
$isCompact: isCompact,
|
|
3059
|
+
$focusInset: focusInset,
|
|
3060
|
+
$validation: validation,
|
|
3025
3061
|
ref: ref
|
|
3026
3062
|
}), !!validationType && React__namespace.default.createElement(StyledFileIcon, {
|
|
3027
3063
|
$isCompact: isCompact,
|