@zendeskgarden/react-forms 9.0.0-next.13 → 9.0.0-next.14
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/Select.js +1 -0
- package/dist/esm/elements/faux-input/components/EndIcon.js +4 -0
- package/dist/esm/elements/faux-input/components/StartIcon.js +4 -0
- package/dist/esm/elements/file-list/components/File.js +2 -1
- package/dist/esm/elements/tiles/components/Tile.js +1 -3
- package/dist/esm/styled/checkbox/StyledCheckHint.js +1 -1
- package/dist/esm/styled/checkbox/StyledCheckInput.js +55 -11
- 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 +1 -1
- package/dist/esm/styled/common/StyledHint.js +1 -1
- package/dist/esm/styled/common/StyledLabel.js +1 -1
- package/dist/esm/styled/common/StyledLegend.js +1 -1
- package/dist/esm/styled/common/StyledMessage.js +1 -1
- package/dist/esm/styled/common/StyledMessageIcon.js +1 -1
- package/dist/esm/styled/file-list/StyledFile.js +49 -28
- package/dist/esm/styled/file-list/StyledFileClose.js +6 -3
- package/dist/esm/styled/file-list/StyledFileDelete.js +6 -3
- package/dist/esm/styled/file-list/StyledFileIcon.js +24 -4
- 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 +89 -20
- package/dist/esm/styled/input-group/StyledInputGroup.js +1 -1
- package/dist/esm/styled/radio/StyledRadioHint.js +1 -1
- package/dist/esm/styled/radio/StyledRadioInput.js +85 -24
- package/dist/esm/styled/radio/StyledRadioLabel.js +1 -1
- 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 +83 -26
- package/dist/esm/styled/select/StyledSelect.js +35 -11
- package/dist/esm/styled/select/StyledSelectWrapper.js +11 -3
- package/dist/esm/styled/text/StyledTextFauxInput.js +31 -23
- package/dist/esm/styled/text/StyledTextInput.js +103 -58
- package/dist/esm/styled/text/StyledTextMediaFigure.js +35 -10
- package/dist/esm/styled/text/StyledTextMediaInput.js +1 -1
- package/dist/esm/styled/text/StyledTextarea.js +1 -1
- package/dist/esm/styled/tiles/StyledTile.js +93 -34
- package/dist/esm/styled/tiles/StyledTileDescription.js +13 -13
- package/dist/esm/styled/tiles/StyledTileIcon.js +52 -13
- package/dist/esm/styled/tiles/StyledTileInput.js +1 -1
- package/dist/esm/styled/tiles/StyledTileLabel.js +13 -15
- package/dist/esm/styled/toggle/StyledToggleHint.js +1 -1
- package/dist/esm/styled/toggle/StyledToggleInput.js +38 -13
- 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 +892 -377
- package/dist/typings/elements/faux-input/components/EndIcon.d.ts +1 -1
- package/dist/typings/elements/faux-input/components/StartIcon.d.ts +1 -1
- package/dist/typings/styled/file-list/StyledFileIcon.d.ts +7 -1
- package/dist/typings/styled/select/StyledSelect.d.ts +0 -3
- package/dist/typings/styled/select/StyledSelectWrapper.d.ts +3 -1
- package/dist/typings/styled/text/StyledTextFauxInput.d.ts +0 -4
- package/dist/typings/styled/tiles/StyledTile.d.ts +4 -7
- package/dist/typings/types/index.d.ts +3 -3
- package/package.json +4 -3
package/dist/index.cjs.js
CHANGED
|
@@ -11,6 +11,7 @@ var containerField = require('@zendeskgarden/container-field');
|
|
|
11
11
|
var styled = require('styled-components');
|
|
12
12
|
var reactTheming = require('@zendeskgarden/react-theming');
|
|
13
13
|
var polished = require('polished');
|
|
14
|
+
var server = require('react-dom/server');
|
|
14
15
|
var PropTypes = require('prop-types');
|
|
15
16
|
var containerUtilities = require('@zendeskgarden/container-utilities');
|
|
16
17
|
var reactMergeRefs = require('react-merge-refs');
|
|
@@ -48,7 +49,7 @@ const useFieldContext = () => {
|
|
|
48
49
|
const COMPONENT_ID$G = 'forms.field';
|
|
49
50
|
const StyledField = styled__default.default.div.attrs({
|
|
50
51
|
'data-garden-id': COMPONENT_ID$G,
|
|
51
|
-
'data-garden-version': '9.0.0-next.
|
|
52
|
+
'data-garden-version': '9.0.0-next.14'
|
|
52
53
|
}).withConfig({
|
|
53
54
|
displayName: "StyledField",
|
|
54
55
|
componentId: "sc-12gzfsu-0"
|
|
@@ -61,7 +62,7 @@ const COMPONENT_ID$F = 'forms.fieldset';
|
|
|
61
62
|
const StyledFieldset = styled__default.default(StyledField).attrs({
|
|
62
63
|
as: 'fieldset',
|
|
63
64
|
'data-garden-id': COMPONENT_ID$F,
|
|
64
|
-
'data-garden-version': '9.0.0-next.
|
|
65
|
+
'data-garden-version': '9.0.0-next.14'
|
|
65
66
|
}).withConfig({
|
|
66
67
|
displayName: "StyledFieldset",
|
|
67
68
|
componentId: "sc-1vr4mxv-0"
|
|
@@ -73,7 +74,7 @@ StyledFieldset.defaultProps = {
|
|
|
73
74
|
const COMPONENT_ID$E = 'forms.input_label';
|
|
74
75
|
const StyledLabel = styled__default.default.label.attrs(props => ({
|
|
75
76
|
'data-garden-id': props['data-garden-id'] || COMPONENT_ID$E,
|
|
76
|
-
'data-garden-version': props['data-garden-version'] || '9.0.0-next.
|
|
77
|
+
'data-garden-version': props['data-garden-version'] || '9.0.0-next.14'
|
|
77
78
|
})).withConfig({
|
|
78
79
|
displayName: "StyledLabel",
|
|
79
80
|
componentId: "sc-2utmsz-0"
|
|
@@ -89,7 +90,7 @@ const COMPONENT_ID$D = 'forms.fieldset_legend';
|
|
|
89
90
|
const StyledLegend = styled__default.default(StyledLabel).attrs({
|
|
90
91
|
as: 'legend',
|
|
91
92
|
'data-garden-id': COMPONENT_ID$D,
|
|
92
|
-
'data-garden-version': '9.0.0-next.
|
|
93
|
+
'data-garden-version': '9.0.0-next.14'
|
|
93
94
|
}).withConfig({
|
|
94
95
|
displayName: "StyledLegend",
|
|
95
96
|
componentId: "sc-6s0zwq-0"
|
|
@@ -101,7 +102,7 @@ StyledLegend.defaultProps = {
|
|
|
101
102
|
const COMPONENT_ID$C = 'forms.input_hint';
|
|
102
103
|
const StyledHint = styled__default.default.div.attrs(props => ({
|
|
103
104
|
'data-garden-id': props['data-garden-id'] || COMPONENT_ID$C,
|
|
104
|
-
'data-garden-version': props['data-garden-version'] || '9.0.0-next.
|
|
105
|
+
'data-garden-version': props['data-garden-version'] || '9.0.0-next.14'
|
|
105
106
|
})).withConfig({
|
|
106
107
|
displayName: "StyledHint",
|
|
107
108
|
componentId: "sc-17c2wu8-0"
|
|
@@ -209,7 +210,7 @@ const MessageIcon = _ref => {
|
|
|
209
210
|
const COMPONENT_ID$B = 'forms.input_message_icon';
|
|
210
211
|
const StyledMessageIcon = styled__default.default(MessageIcon).attrs({
|
|
211
212
|
'data-garden-id': COMPONENT_ID$B,
|
|
212
|
-
'data-garden-version': '9.0.0-next.
|
|
213
|
+
'data-garden-version': '9.0.0-next.14',
|
|
213
214
|
'aria-hidden': null
|
|
214
215
|
}).withConfig({
|
|
215
216
|
displayName: "StyledMessageIcon",
|
|
@@ -220,7 +221,7 @@ StyledMessageIcon.defaultProps = {
|
|
|
220
221
|
};
|
|
221
222
|
|
|
222
223
|
const COMPONENT_ID$A = 'forms.input_message';
|
|
223
|
-
const colorStyles$
|
|
224
|
+
const colorStyles$d = _ref => {
|
|
224
225
|
let {
|
|
225
226
|
theme,
|
|
226
227
|
validation
|
|
@@ -241,7 +242,7 @@ const colorStyles$b = _ref => {
|
|
|
241
242
|
});
|
|
242
243
|
return styled.css(["color:", ";"], foregroundColor);
|
|
243
244
|
};
|
|
244
|
-
const sizeStyles$
|
|
245
|
+
const sizeStyles$g = _ref2 => {
|
|
245
246
|
let {
|
|
246
247
|
theme,
|
|
247
248
|
validation
|
|
@@ -254,104 +255,162 @@ const sizeStyles$d = _ref2 => {
|
|
|
254
255
|
};
|
|
255
256
|
const StyledMessage = styled__default.default.div.attrs(props => ({
|
|
256
257
|
'data-garden-id': props['data-garden-id'] || COMPONENT_ID$A,
|
|
257
|
-
'data-garden-version': props['data-garden-version'] || '9.0.0-next.
|
|
258
|
+
'data-garden-version': props['data-garden-version'] || '9.0.0-next.14'
|
|
258
259
|
})).withConfig({
|
|
259
260
|
displayName: "StyledMessage",
|
|
260
261
|
componentId: "sc-30hgg7-0"
|
|
261
|
-
})(["direction:", ";display:inline-block;position:relative;vertical-align:middle;", ";", ";& ", "{position:absolute;top:-1px;", ":0;}", ":not([hidden]) + &{display:block;}", ";"], props => props.theme.rtl && 'rtl', sizeStyles$
|
|
262
|
+
})(["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));
|
|
262
263
|
StyledMessage.defaultProps = {
|
|
263
264
|
theme: reactTheming.DEFAULT_THEME
|
|
264
265
|
};
|
|
265
266
|
|
|
267
|
+
var _path$m;
|
|
268
|
+
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); }
|
|
269
|
+
var SvgChevronDownStroke = function SvgChevronDownStroke(props) {
|
|
270
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$p({
|
|
271
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
272
|
+
width: 16,
|
|
273
|
+
height: 16,
|
|
274
|
+
focusable: "false",
|
|
275
|
+
viewBox: "0 0 16 16",
|
|
276
|
+
"aria-hidden": "true"
|
|
277
|
+
}, props), _path$m || (_path$m = /*#__PURE__*/React__namespace.createElement("path", {
|
|
278
|
+
fill: "currentColor",
|
|
279
|
+
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"
|
|
280
|
+
})));
|
|
281
|
+
};
|
|
282
|
+
|
|
266
283
|
const COMPONENT_ID$z = 'forms.input';
|
|
267
284
|
const isInvalid = validation => {
|
|
268
285
|
return validation === 'warning' || validation === 'error';
|
|
269
286
|
};
|
|
270
|
-
const colorStyles$
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
287
|
+
const colorStyles$c = _ref => {
|
|
288
|
+
let {
|
|
289
|
+
theme,
|
|
290
|
+
isBare,
|
|
291
|
+
isHovered,
|
|
292
|
+
focusInset,
|
|
293
|
+
validation
|
|
294
|
+
} = _ref;
|
|
295
|
+
const foregroundColor = reactTheming.getColor({
|
|
296
|
+
theme,
|
|
297
|
+
variable: 'foreground.default'
|
|
298
|
+
});
|
|
299
|
+
const backgroundColor = isBare ? 'transparent' : reactTheming.getColor({
|
|
300
|
+
theme,
|
|
301
|
+
variable: 'background.default'
|
|
302
|
+
});
|
|
274
303
|
let borderColor;
|
|
275
304
|
let hoverBorderColor;
|
|
305
|
+
let borderVariable;
|
|
276
306
|
let focusBorderColor;
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
hue = 'warningHue';
|
|
285
|
-
focusRingShade = 700;
|
|
286
|
-
} else if (props.validation === 'error') {
|
|
287
|
-
hue = 'dangerHue';
|
|
307
|
+
if (validation) {
|
|
308
|
+
if (validation === 'success') {
|
|
309
|
+
borderVariable = 'border.successEmphasis';
|
|
310
|
+
} else if (validation === 'warning') {
|
|
311
|
+
borderVariable = 'border.warningEmphasis';
|
|
312
|
+
} else if (validation === 'error') {
|
|
313
|
+
borderVariable = 'border.dangerEmphasis';
|
|
288
314
|
}
|
|
289
|
-
borderColor = reactTheming.
|
|
315
|
+
borderColor = reactTheming.getColor({
|
|
316
|
+
theme,
|
|
317
|
+
variable: borderVariable
|
|
318
|
+
});
|
|
290
319
|
hoverBorderColor = borderColor;
|
|
291
320
|
focusBorderColor = borderColor;
|
|
292
|
-
focusRingHue = hue;
|
|
293
321
|
} else {
|
|
294
|
-
borderColor = reactTheming.
|
|
295
|
-
|
|
322
|
+
borderColor = reactTheming.getColor({
|
|
323
|
+
theme,
|
|
324
|
+
variable: 'border.default',
|
|
325
|
+
dark: {
|
|
326
|
+
offset: -100
|
|
327
|
+
},
|
|
328
|
+
light: {
|
|
329
|
+
offset: 100
|
|
330
|
+
}
|
|
331
|
+
});
|
|
332
|
+
borderVariable = 'border.primaryEmphasis';
|
|
333
|
+
hoverBorderColor = reactTheming.getColor({
|
|
334
|
+
theme,
|
|
335
|
+
variable: borderVariable
|
|
336
|
+
});
|
|
296
337
|
focusBorderColor = hoverBorderColor;
|
|
297
338
|
}
|
|
298
|
-
const
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
const
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
339
|
+
const disabledBackgroundColor = isBare ? undefined : reactTheming.getColor({
|
|
340
|
+
theme,
|
|
341
|
+
variable: 'background.disabled'
|
|
342
|
+
});
|
|
343
|
+
const disabledBorderColor = reactTheming.getColor({
|
|
344
|
+
theme,
|
|
345
|
+
variable: 'border.disabled'
|
|
346
|
+
});
|
|
347
|
+
const disabledForegroundColor = reactTheming.getColor({
|
|
348
|
+
theme,
|
|
349
|
+
variable: 'foreground.disabled'
|
|
350
|
+
});
|
|
351
|
+
const placeholderColor = disabledForegroundColor;
|
|
352
|
+
const readOnlyBackgroundColor = disabledBackgroundColor;
|
|
353
|
+
const calendarPickerColor = reactTheming.getColor({
|
|
354
|
+
theme,
|
|
355
|
+
variable: 'foreground.subtle'
|
|
356
|
+
});
|
|
357
|
+
const calendarPickerIcon = server.renderToString( React__namespace.default.createElement(SvgChevronDownStroke, {
|
|
358
|
+
color: calendarPickerColor
|
|
359
|
+
}));
|
|
360
|
+
const calendarPickerBackgroundImage = `url("data:image/svg+xml,${encodeURIComponent(calendarPickerIcon)}")`;
|
|
361
|
+
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({
|
|
362
|
+
theme,
|
|
363
|
+
inset: focusInset,
|
|
314
364
|
color: {
|
|
315
|
-
|
|
316
|
-
shade: focusRingShade
|
|
365
|
+
variable: borderVariable
|
|
317
366
|
},
|
|
318
367
|
styles: {
|
|
319
368
|
borderColor: focusBorderColor
|
|
320
|
-
}
|
|
321
|
-
|
|
369
|
+
},
|
|
370
|
+
condition: !isBare
|
|
371
|
+
}), reactTheming.focusStyles({
|
|
372
|
+
theme
|
|
373
|
+
}), disabledBorderColor, disabledBackgroundColor, disabledForegroundColor);
|
|
322
374
|
};
|
|
323
|
-
const sizeStyles$
|
|
324
|
-
|
|
325
|
-
|
|
375
|
+
const sizeStyles$f = _ref2 => {
|
|
376
|
+
let {
|
|
377
|
+
theme,
|
|
378
|
+
isBare,
|
|
379
|
+
isCompact
|
|
380
|
+
} = _ref2;
|
|
381
|
+
const fontSize = theme.fontSizes.md;
|
|
382
|
+
const paddingHorizontal = `${theme.space.base * 3}px`;
|
|
326
383
|
let height;
|
|
327
384
|
let paddingVertical;
|
|
328
385
|
let browseFontSize;
|
|
329
386
|
let swatchHeight;
|
|
330
|
-
if (
|
|
331
|
-
height = `${
|
|
332
|
-
paddingVertical = `${
|
|
333
|
-
browseFontSize = polished.math(`${
|
|
334
|
-
swatchHeight = `${
|
|
387
|
+
if (isCompact) {
|
|
388
|
+
height = `${theme.space.base * 8}px`;
|
|
389
|
+
paddingVertical = `${theme.space.base * 1.5}px`;
|
|
390
|
+
browseFontSize = polished.math(`${theme.fontSizes.sm} - 1`);
|
|
391
|
+
swatchHeight = `${theme.space.base * 6}px`;
|
|
335
392
|
} else {
|
|
336
|
-
height = `${
|
|
337
|
-
paddingVertical = `${
|
|
338
|
-
browseFontSize =
|
|
339
|
-
swatchHeight = `${
|
|
393
|
+
height = `${theme.space.base * 10}px`;
|
|
394
|
+
paddingVertical = `${theme.space.base * 2.5}px`;
|
|
395
|
+
browseFontSize = theme.fontSizes.sm;
|
|
396
|
+
swatchHeight = `${theme.space.base * 7}px`;
|
|
340
397
|
}
|
|
341
|
-
const lineHeight = polished.math(`${height} - (${paddingVertical} * 2) - (${
|
|
342
|
-
const padding =
|
|
398
|
+
const lineHeight = polished.math(`${height} - (${paddingVertical} * 2) - (${theme.borderWidths.sm} * 2)`);
|
|
399
|
+
const padding = isBare ? '0' : `${polished.em(paddingVertical, fontSize)} ${polished.em(paddingHorizontal, fontSize)}`;
|
|
343
400
|
const swatchMarginVertical = polished.math(`(${lineHeight} - ${swatchHeight}) / 2`);
|
|
344
401
|
const swatchMarginHorizontal = polished.math(`${paddingVertical} + ${swatchMarginVertical} - ${paddingHorizontal}`);
|
|
345
|
-
|
|
402
|
+
const calendarPickerSize = `${theme.space.base * 5}px`;
|
|
403
|
+
const calendarPickerBackgroundSize = theme.iconSizes.md;
|
|
404
|
+
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));
|
|
346
405
|
};
|
|
347
406
|
const StyledTextInput = styled__default.default.input.attrs(props => ({
|
|
348
407
|
'data-garden-id': COMPONENT_ID$z,
|
|
349
|
-
'data-garden-version': '9.0.0-next.
|
|
408
|
+
'data-garden-version': '9.0.0-next.14',
|
|
350
409
|
'aria-invalid': isInvalid(props.validation)
|
|
351
410
|
})).withConfig({
|
|
352
411
|
displayName: "StyledTextInput",
|
|
353
|
-
componentId: "sc-
|
|
354
|
-
})(["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;}
|
|
412
|
+
componentId: "sc-1r6733h-0"
|
|
413
|
+
})(["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));
|
|
355
414
|
StyledTextInput.defaultProps = {
|
|
356
415
|
theme: reactTheming.DEFAULT_THEME
|
|
357
416
|
};
|
|
@@ -369,7 +428,7 @@ const hiddenStyles = `
|
|
|
369
428
|
const StyledTextarea = styled__default.default(StyledTextInput).attrs({
|
|
370
429
|
as: 'textarea',
|
|
371
430
|
'data-garden-id': COMPONENT_ID$y,
|
|
372
|
-
'data-garden-version': '9.0.0-next.
|
|
431
|
+
'data-garden-version': '9.0.0-next.14'
|
|
373
432
|
}).withConfig({
|
|
374
433
|
displayName: "StyledTextarea",
|
|
375
434
|
componentId: "sc-wxschl-0"
|
|
@@ -379,16 +438,41 @@ StyledTextarea.defaultProps = {
|
|
|
379
438
|
};
|
|
380
439
|
|
|
381
440
|
const COMPONENT_ID$x = 'forms.media_figure';
|
|
382
|
-
const colorStyles$
|
|
383
|
-
let
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
441
|
+
const colorStyles$b = _ref => {
|
|
442
|
+
let {
|
|
443
|
+
theme,
|
|
444
|
+
$isDisabled,
|
|
445
|
+
$isHovered,
|
|
446
|
+
$isFocused
|
|
447
|
+
} = _ref;
|
|
448
|
+
let color;
|
|
449
|
+
if ($isDisabled) {
|
|
450
|
+
color = reactTheming.getColor({
|
|
451
|
+
theme,
|
|
452
|
+
variable: 'foreground.disabled'
|
|
453
|
+
});
|
|
454
|
+
} else {
|
|
455
|
+
const options = {
|
|
456
|
+
theme,
|
|
457
|
+
variable: 'foreground.subtle'
|
|
458
|
+
};
|
|
459
|
+
if ($isHovered || $isFocused) {
|
|
460
|
+
color = reactTheming.getColor({
|
|
461
|
+
...options,
|
|
462
|
+
dark: {
|
|
463
|
+
offset: -100
|
|
464
|
+
},
|
|
465
|
+
light: {
|
|
466
|
+
offset: 100
|
|
467
|
+
}
|
|
468
|
+
});
|
|
469
|
+
} else {
|
|
470
|
+
color = reactTheming.getColor(options);
|
|
471
|
+
}
|
|
388
472
|
}
|
|
389
|
-
return styled.css(["color:", ";"],
|
|
473
|
+
return styled.css(["color:", ";"], color);
|
|
390
474
|
};
|
|
391
|
-
const sizeStyles$
|
|
475
|
+
const sizeStyles$e = props => {
|
|
392
476
|
const size = props.theme.iconSizes.md;
|
|
393
477
|
const marginFirst = `1px ${props.theme.space.base * 2}px auto 0`;
|
|
394
478
|
const marginLast = `1px 0 auto ${props.theme.space.base * 2}px`;
|
|
@@ -402,48 +486,56 @@ const sizeStyles$b = props => {
|
|
|
402
486
|
};
|
|
403
487
|
const StyledTextMediaFigure = styled__default.default(reactTheming.StyledBaseIcon).attrs({
|
|
404
488
|
'data-garden-id': COMPONENT_ID$x,
|
|
405
|
-
'data-garden-version': '9.0.0-next.
|
|
489
|
+
'data-garden-version': '9.0.0-next.14'
|
|
406
490
|
}).withConfig({
|
|
407
491
|
displayName: "StyledTextMediaFigure",
|
|
408
492
|
componentId: "sc-1qepknj-0"
|
|
409
|
-
})(["transform:", ";transition:transform 0.25s ease-in-out,color 0.25s ease-in-out;", ";", " ", ";"], props => props.$isRotated && `rotate(${props.theme.rtl ? '-' : '+'}180deg)`,
|
|
493
|
+
})(["transform:", ";transition:transform 0.25s ease-in-out,color 0.25s ease-in-out;", ";", " ", ";"], props => props.$isRotated && `rotate(${props.theme.rtl ? '-' : '+'}180deg)`, sizeStyles$e, colorStyles$b, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$x, props));
|
|
410
494
|
StyledTextMediaFigure.defaultProps = {
|
|
411
495
|
theme: reactTheming.DEFAULT_THEME
|
|
412
496
|
};
|
|
413
497
|
|
|
414
498
|
const COMPONENT_ID$w = 'forms.faux_input';
|
|
415
|
-
const
|
|
416
|
-
|
|
417
|
-
warning: 'warningHue',
|
|
418
|
-
error: 'dangerHue'
|
|
419
|
-
};
|
|
420
|
-
function getValidationHue(validation) {
|
|
421
|
-
let defaultHue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'primaryHue';
|
|
422
|
-
if (validation) {
|
|
423
|
-
return VALIDATION_HUES[validation];
|
|
424
|
-
}
|
|
425
|
-
return defaultHue;
|
|
426
|
-
}
|
|
427
|
-
const colorStyles$8 = props => {
|
|
428
|
-
const {
|
|
499
|
+
const colorStyles$a = _ref => {
|
|
500
|
+
let {
|
|
429
501
|
theme,
|
|
430
502
|
validation,
|
|
431
503
|
focusInset,
|
|
432
504
|
isBare,
|
|
433
505
|
isFocused
|
|
434
|
-
} =
|
|
506
|
+
} = _ref;
|
|
507
|
+
let borderVariable;
|
|
508
|
+
let focusBorderColor;
|
|
509
|
+
if (validation) {
|
|
510
|
+
if (validation === 'success') {
|
|
511
|
+
borderVariable = 'border.successEmphasis';
|
|
512
|
+
} else if (validation === 'warning') {
|
|
513
|
+
borderVariable = 'border.warningEmphasis';
|
|
514
|
+
} else if (validation === 'error') {
|
|
515
|
+
borderVariable = 'border.dangerEmphasis';
|
|
516
|
+
}
|
|
517
|
+
focusBorderColor = reactTheming.getColor({
|
|
518
|
+
theme,
|
|
519
|
+
variable: borderVariable
|
|
520
|
+
});
|
|
521
|
+
} else {
|
|
522
|
+
borderVariable = 'border.primaryEmphasis';
|
|
523
|
+
focusBorderColor = reactTheming.getColor({
|
|
524
|
+
theme,
|
|
525
|
+
variable: borderVariable
|
|
526
|
+
});
|
|
527
|
+
}
|
|
435
528
|
return styled.css(["", ""], reactTheming.focusStyles({
|
|
436
529
|
theme,
|
|
437
530
|
inset: focusInset,
|
|
438
|
-
condition: !isBare,
|
|
439
531
|
color: {
|
|
440
|
-
|
|
441
|
-
shade: validation === 'warning' ? 700 : 600
|
|
532
|
+
variable: borderVariable
|
|
442
533
|
},
|
|
443
534
|
selector: isFocused ? '&' : '&:focus-within',
|
|
444
535
|
styles: {
|
|
445
|
-
borderColor:
|
|
446
|
-
}
|
|
536
|
+
borderColor: focusBorderColor
|
|
537
|
+
},
|
|
538
|
+
condition: !isBare
|
|
447
539
|
}));
|
|
448
540
|
};
|
|
449
541
|
const StyledTextFauxInput = styled__default.default(StyledTextInput).attrs(props => ({
|
|
@@ -451,11 +543,11 @@ const StyledTextFauxInput = styled__default.default(StyledTextInput).attrs(props
|
|
|
451
543
|
'aria-readonly': props.isReadOnly,
|
|
452
544
|
'aria-disabled': props.isDisabled,
|
|
453
545
|
'data-garden-id': COMPONENT_ID$w,
|
|
454
|
-
'data-garden-version': '9.0.0-next.
|
|
546
|
+
'data-garden-version': '9.0.0-next.14'
|
|
455
547
|
})).withConfig({
|
|
456
548
|
displayName: "StyledTextFauxInput",
|
|
457
549
|
componentId: "sc-yqw7j9-0"
|
|
458
|
-
})(["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$
|
|
550
|
+
})(["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));
|
|
459
551
|
StyledTextFauxInput.defaultProps = {
|
|
460
552
|
theme: reactTheming.DEFAULT_THEME
|
|
461
553
|
};
|
|
@@ -463,7 +555,7 @@ StyledTextFauxInput.defaultProps = {
|
|
|
463
555
|
const COMPONENT_ID$v = 'forms.media_input';
|
|
464
556
|
const StyledTextMediaInput = styled__default.default(StyledTextInput).attrs({
|
|
465
557
|
'data-garden-id': COMPONENT_ID$v,
|
|
466
|
-
'data-garden-version': '9.0.0-next.
|
|
558
|
+
'data-garden-version': '9.0.0-next.14',
|
|
467
559
|
isBare: true
|
|
468
560
|
}).withConfig({
|
|
469
561
|
displayName: "StyledTextMediaInput",
|
|
@@ -485,7 +577,7 @@ const itemStyles = props => {
|
|
|
485
577
|
};
|
|
486
578
|
const StyledInputGroup = styled__default.default.div.attrs({
|
|
487
579
|
'data-garden-id': COMPONENT_ID$u,
|
|
488
|
-
'data-garden-version': '9.0.0-next.
|
|
580
|
+
'data-garden-version': '9.0.0-next.14'
|
|
489
581
|
}).withConfig({
|
|
490
582
|
displayName: "StyledInputGroup",
|
|
491
583
|
componentId: "sc-kjh1f0-0"
|
|
@@ -495,7 +587,7 @@ StyledInputGroup.defaultProps = {
|
|
|
495
587
|
};
|
|
496
588
|
|
|
497
589
|
const COMPONENT_ID$t = 'forms.radio_label';
|
|
498
|
-
const sizeStyles$
|
|
590
|
+
const sizeStyles$d = props => {
|
|
499
591
|
const size = props.theme.space.base * 4;
|
|
500
592
|
const padding = size + props.theme.space.base * 2;
|
|
501
593
|
const lineHeight = props.theme.space.base * 5;
|
|
@@ -503,12 +595,12 @@ const sizeStyles$a = props => {
|
|
|
503
595
|
};
|
|
504
596
|
const StyledRadioLabel = styled__default.default(StyledLabel).attrs({
|
|
505
597
|
'data-garden-id': COMPONENT_ID$t,
|
|
506
|
-
'data-garden-version': '9.0.0-next.
|
|
598
|
+
'data-garden-version': '9.0.0-next.14',
|
|
507
599
|
isRadio: true
|
|
508
600
|
}).withConfig({
|
|
509
601
|
displayName: "StyledRadioLabel",
|
|
510
602
|
componentId: "sc-1aq2e5t-0"
|
|
511
|
-
})(["display:inline-block;position:relative;cursor:pointer;", ";", ";"], props => sizeStyles$
|
|
603
|
+
})(["display:inline-block;position:relative;cursor:pointer;", ";", ";"], props => sizeStyles$d(props), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$t, props));
|
|
512
604
|
StyledRadioLabel.defaultProps = {
|
|
513
605
|
theme: reactTheming.DEFAULT_THEME
|
|
514
606
|
};
|
|
@@ -516,7 +608,7 @@ StyledRadioLabel.defaultProps = {
|
|
|
516
608
|
const COMPONENT_ID$s = 'forms.checkbox_label';
|
|
517
609
|
const StyledCheckLabel = styled__default.default(StyledRadioLabel).attrs({
|
|
518
610
|
'data-garden-id': COMPONENT_ID$s,
|
|
519
|
-
'data-garden-version': '9.0.0-next.
|
|
611
|
+
'data-garden-version': '9.0.0-next.14'
|
|
520
612
|
}).withConfig({
|
|
521
613
|
displayName: "StyledCheckLabel",
|
|
522
614
|
componentId: "sc-x7nr1-0"
|
|
@@ -528,7 +620,7 @@ StyledCheckLabel.defaultProps = {
|
|
|
528
620
|
const COMPONENT_ID$r = 'forms.radio_hint';
|
|
529
621
|
const StyledRadioHint = styled__default.default(StyledHint).attrs({
|
|
530
622
|
'data-garden-id': COMPONENT_ID$r,
|
|
531
|
-
'data-garden-version': '9.0.0-next.
|
|
623
|
+
'data-garden-version': '9.0.0-next.14'
|
|
532
624
|
}).withConfig({
|
|
533
625
|
displayName: "StyledRadioHint",
|
|
534
626
|
componentId: "sc-eo8twg-0"
|
|
@@ -540,7 +632,7 @@ StyledRadioHint.defaultProps = {
|
|
|
540
632
|
const COMPONENT_ID$q = 'forms.checkbox_hint';
|
|
541
633
|
const StyledCheckHint = styled__default.default(StyledRadioHint).attrs({
|
|
542
634
|
'data-garden-id': COMPONENT_ID$q,
|
|
543
|
-
'data-garden-version': '9.0.0-next.
|
|
635
|
+
'data-garden-version': '9.0.0-next.14'
|
|
544
636
|
}).withConfig({
|
|
545
637
|
displayName: "StyledCheckHint",
|
|
546
638
|
componentId: "sc-1kl8e8c-0"
|
|
@@ -550,71 +642,176 @@ StyledCheckHint.defaultProps = {
|
|
|
550
642
|
};
|
|
551
643
|
|
|
552
644
|
const COMPONENT_ID$p = 'forms.radio';
|
|
553
|
-
const colorStyles$
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
const
|
|
558
|
-
|
|
559
|
-
|
|
645
|
+
const colorStyles$9 = _ref => {
|
|
646
|
+
let {
|
|
647
|
+
theme
|
|
648
|
+
} = _ref;
|
|
649
|
+
const borderColor = reactTheming.getColor({
|
|
650
|
+
theme,
|
|
651
|
+
variable: 'border.emphasis'
|
|
652
|
+
});
|
|
653
|
+
const backgroundColor = reactTheming.getColor({
|
|
654
|
+
theme,
|
|
655
|
+
variable: 'background.default'
|
|
656
|
+
});
|
|
657
|
+
const iconColor = reactTheming.getColor({
|
|
658
|
+
theme,
|
|
659
|
+
variable: 'foreground.onEmphasis'
|
|
660
|
+
});
|
|
661
|
+
const backgroundOptions = {
|
|
662
|
+
theme,
|
|
663
|
+
variable: 'background.primaryEmphasis'
|
|
664
|
+
};
|
|
665
|
+
const borderOptions = {
|
|
666
|
+
theme,
|
|
667
|
+
variable: 'border.primaryEmphasis'
|
|
668
|
+
};
|
|
669
|
+
const hoverBackgroundColor = reactTheming.getColor({
|
|
670
|
+
...backgroundOptions,
|
|
671
|
+
transparency: theme.opacity[100]
|
|
672
|
+
});
|
|
673
|
+
const hoverBorderColor = reactTheming.getColor(borderOptions);
|
|
560
674
|
const focusBorderColor = hoverBorderColor;
|
|
561
|
-
const activeBackgroundColor = reactTheming.
|
|
675
|
+
const activeBackgroundColor = reactTheming.getColor({
|
|
676
|
+
...backgroundOptions,
|
|
677
|
+
transparency: theme.opacity[200]
|
|
678
|
+
});
|
|
562
679
|
const activeBorderColor = focusBorderColor;
|
|
680
|
+
const checkedBackgroundColor = reactTheming.getColor(backgroundOptions);
|
|
563
681
|
const checkedBorderColor = focusBorderColor;
|
|
564
|
-
const
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
682
|
+
const offset100 = {
|
|
683
|
+
dark: {
|
|
684
|
+
offset: -100
|
|
685
|
+
},
|
|
686
|
+
light: {
|
|
687
|
+
offset: 100
|
|
688
|
+
}
|
|
689
|
+
};
|
|
690
|
+
const offset200 = {
|
|
691
|
+
dark: {
|
|
692
|
+
offset: -200
|
|
693
|
+
},
|
|
694
|
+
light: {
|
|
695
|
+
offset: 200
|
|
696
|
+
}
|
|
697
|
+
};
|
|
698
|
+
const checkedHoverBackgroundColor = reactTheming.getColor({
|
|
699
|
+
...backgroundOptions,
|
|
700
|
+
...offset100
|
|
701
|
+
});
|
|
702
|
+
const checkedHoverBorderColor = reactTheming.getColor({
|
|
703
|
+
...borderOptions,
|
|
704
|
+
...offset100
|
|
705
|
+
});
|
|
706
|
+
const checkedActiveBackgroundColor = reactTheming.getColor({
|
|
707
|
+
...backgroundOptions,
|
|
708
|
+
...offset200
|
|
709
|
+
});
|
|
710
|
+
const checkedActiveBorderColor = reactTheming.getColor({
|
|
711
|
+
...borderOptions,
|
|
712
|
+
...offset200
|
|
713
|
+
});
|
|
714
|
+
const disabledBackgroundColor = reactTheming.getColor({
|
|
715
|
+
theme,
|
|
716
|
+
variable: 'background.disabled',
|
|
717
|
+
transparency: theme.opacity[300]
|
|
718
|
+
});
|
|
570
719
|
return styled.css(["& ~ ", "::before{border-color:", ";background-color:", ";}& ~ ", " > svg{color:", ";}& ~ ", ":hover::before{border-color:", ";background-color:", ";}", " & ~ ", ":active::before{border-color:", ";background-color:", ";}&:checked ~ ", "::before{border-color:", ";background-color:", ";}&:enabled:checked ~ ", ":hover::before{border-color:", ";background-color:", ";}&:enabled:checked ~ ", ":active::before{border-color:", ";background-color:", ";}&:disabled ~ ", "::before{border-color:transparent;background-color:", ";}"], StyledRadioLabel, borderColor, backgroundColor, StyledRadioLabel, iconColor, StyledRadioLabel, hoverBorderColor, hoverBackgroundColor, reactTheming.focusStyles({
|
|
571
|
-
theme
|
|
720
|
+
theme,
|
|
572
721
|
styles: {
|
|
573
722
|
borderColor: focusBorderColor
|
|
574
723
|
},
|
|
575
724
|
selector: `&:focus-visible ~ ${StyledRadioLabel}::before`
|
|
576
725
|
}), StyledRadioLabel, activeBorderColor, activeBackgroundColor, StyledRadioLabel, checkedBorderColor, checkedBackgroundColor, StyledRadioLabel, checkedHoverBorderColor, checkedHoverBackgroundColor, StyledRadioLabel, checkedActiveBorderColor, checkedActiveBackgroundColor, StyledRadioLabel, disabledBackgroundColor);
|
|
577
726
|
};
|
|
578
|
-
const sizeStyles$
|
|
579
|
-
|
|
580
|
-
|
|
727
|
+
const sizeStyles$c = _ref2 => {
|
|
728
|
+
let {
|
|
729
|
+
theme,
|
|
730
|
+
isCompact
|
|
731
|
+
} = _ref2;
|
|
732
|
+
const lineHeight = `${theme.space.base * 5}px`;
|
|
733
|
+
const size = `${theme.space.base * 4}px`;
|
|
581
734
|
const top = polished.math(`(${lineHeight} - ${size}) / 2`);
|
|
582
|
-
const iconSize =
|
|
735
|
+
const iconSize = theme.iconSizes.sm;
|
|
583
736
|
const iconPosition = polished.math(`(${size} - ${iconSize}) / 2`);
|
|
584
737
|
const iconTop = polished.math(`${iconPosition} + ${top}`);
|
|
585
|
-
const marginTop = `${
|
|
586
|
-
return styled.css(["top:", ";width:", ";height:", ";& ~ ", "::before{top:", ";background-size:", ";width:", ";height:", ";box-sizing:border-box;}& ~ ", " > svg{top:", ";", ":", ";width:", ";height:", ";}&& ~ ", " ~ ", "{margin-top:", ";}"], top, size, size, StyledRadioLabel, top,
|
|
738
|
+
const marginTop = `${theme.space.base * (isCompact ? 1 : 2)}px`;
|
|
739
|
+
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);
|
|
587
740
|
};
|
|
588
741
|
const StyledRadioInput = styled__default.default.input.attrs({
|
|
589
742
|
'data-garden-id': COMPONENT_ID$p,
|
|
590
|
-
'data-garden-version': '9.0.0-next.
|
|
743
|
+
'data-garden-version': '9.0.0-next.14',
|
|
591
744
|
type: 'radio'
|
|
592
745
|
}).withConfig({
|
|
593
746
|
displayName: "StyledRadioInput",
|
|
594
747
|
componentId: "sc-qsavpv-0"
|
|
595
|
-
})(["position:absolute;opacity:0;margin:0;& ~ ", "::before{position:absolute;", ":0;transition:border-color .25s ease-in-out,box-shadow .1s ease-in-out,background-color .25s ease-in-out,color .25s ease-in-out;border
|
|
748
|
+
})(["position:absolute;opacity:0;margin:0;& ~ ", "::before{position:absolute;", ":0;transition:border-color .25s ease-in-out,box-shadow .1s ease-in-out,background-color .25s ease-in-out,color .25s ease-in-out;border-radius:50%;background-repeat:no-repeat;background-position:center;content:'';}& ~ ", " > svg{position:absolute;}", ";&:focus ~ ", "::before{outline:none;}& ~ ", ":active::before{transition:border-color 0.1s ease-in-out,background-color 0.1s ease-in-out,color 0.1s ease-in-out;}", ";&:disabled ~ ", "{cursor:default;}", ";"], StyledRadioLabel, props => props.theme.rtl ? 'right' : 'left', StyledRadioLabel, sizeStyles$c, StyledRadioLabel, StyledRadioLabel, colorStyles$9, StyledRadioLabel, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$p, props));
|
|
596
749
|
StyledRadioInput.defaultProps = {
|
|
597
750
|
theme: reactTheming.DEFAULT_THEME
|
|
598
751
|
};
|
|
599
752
|
|
|
600
753
|
const COMPONENT_ID$o = 'forms.checkbox';
|
|
601
|
-
const colorStyles$
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
const
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
754
|
+
const colorStyles$8 = _ref => {
|
|
755
|
+
let {
|
|
756
|
+
theme
|
|
757
|
+
} = _ref;
|
|
758
|
+
const backgroundOptions = {
|
|
759
|
+
theme,
|
|
760
|
+
variable: 'background.primaryEmphasis'
|
|
761
|
+
};
|
|
762
|
+
const borderOptions = {
|
|
763
|
+
theme,
|
|
764
|
+
variable: 'border.primaryEmphasis'
|
|
765
|
+
};
|
|
766
|
+
const indeterminateBackgroundColor = reactTheming.getColor(backgroundOptions);
|
|
767
|
+
const indeterminateBorderColor = reactTheming.getColor(borderOptions);
|
|
768
|
+
const offset100 = {
|
|
769
|
+
dark: {
|
|
770
|
+
offset: -100
|
|
771
|
+
},
|
|
772
|
+
light: {
|
|
773
|
+
offset: 100
|
|
774
|
+
}
|
|
775
|
+
};
|
|
776
|
+
const offset200 = {
|
|
777
|
+
dark: {
|
|
778
|
+
offset: -200
|
|
779
|
+
},
|
|
780
|
+
light: {
|
|
781
|
+
offset: 200
|
|
782
|
+
}
|
|
783
|
+
};
|
|
784
|
+
const indeterminateHoverBackgroundColor = reactTheming.getColor({
|
|
785
|
+
...backgroundOptions,
|
|
786
|
+
...offset100
|
|
787
|
+
});
|
|
788
|
+
const indeterminateHoverBorderColor = reactTheming.getColor({
|
|
789
|
+
...borderOptions,
|
|
790
|
+
...offset100
|
|
791
|
+
});
|
|
792
|
+
const indeterminateActiveBackgroundColor = reactTheming.getColor({
|
|
793
|
+
...backgroundOptions,
|
|
794
|
+
...offset200
|
|
795
|
+
});
|
|
796
|
+
const indeterminateActiveBorderColor = reactTheming.getColor({
|
|
797
|
+
...borderOptions,
|
|
798
|
+
...offset200
|
|
799
|
+
});
|
|
800
|
+
const indeterminateDisabledBackgroundColor = reactTheming.getColor({
|
|
801
|
+
theme,
|
|
802
|
+
variable: 'background.disabled',
|
|
803
|
+
transparency: theme.opacity[300]
|
|
804
|
+
});
|
|
805
|
+
return styled.css(["&:indeterminate ~ ", "::before{border-color:", ";background-color:", ";}&:enabled:indeterminate ~ ", ":hover::before{border-color:", ";background-color:", ";}&:enabled:indeterminate ~ ", ":active::before{border-color:", ";background-color:", ";}&:disabled:indeterminate ~ ", "::before{border-color:transparent;background-color:", ";}"], StyledCheckLabel, indeterminateBorderColor, indeterminateBackgroundColor, StyledCheckLabel, indeterminateHoverBorderColor, indeterminateHoverBackgroundColor, StyledCheckLabel, indeterminateActiveBorderColor, indeterminateActiveBackgroundColor, StyledCheckLabel, indeterminateDisabledBackgroundColor);
|
|
609
806
|
};
|
|
610
807
|
const StyledCheckInput = styled__default.default(StyledRadioInput).attrs({
|
|
611
808
|
'data-garden-id': COMPONENT_ID$o,
|
|
612
|
-
'data-garden-version': '9.0.0-next.
|
|
809
|
+
'data-garden-version': '9.0.0-next.14',
|
|
613
810
|
type: 'checkbox'
|
|
614
811
|
}).withConfig({
|
|
615
812
|
displayName: "StyledCheckInput",
|
|
616
813
|
componentId: "sc-176jxxe-0"
|
|
617
|
-
})(["& ~ ", "::before{border-radius:", ";}", ";", ";"], StyledCheckLabel, props => props.theme.borderRadii.md,
|
|
814
|
+
})(["& ~ ", "::before{border-radius:", ";}", ";", ";"], StyledCheckLabel, props => props.theme.borderRadii.md, colorStyles$8, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$o, props));
|
|
618
815
|
StyledCheckInput.defaultProps = {
|
|
619
816
|
theme: reactTheming.DEFAULT_THEME
|
|
620
817
|
};
|
|
@@ -622,7 +819,7 @@ StyledCheckInput.defaultProps = {
|
|
|
622
819
|
const COMPONENT_ID$n = 'forms.radio_message';
|
|
623
820
|
const StyledRadioMessage = styled__default.default(StyledMessage).attrs({
|
|
624
821
|
'data-garden-id': COMPONENT_ID$n,
|
|
625
|
-
'data-garden-version': '9.0.0-next.
|
|
822
|
+
'data-garden-version': '9.0.0-next.14'
|
|
626
823
|
}).withConfig({
|
|
627
824
|
displayName: "StyledRadioMessage",
|
|
628
825
|
componentId: "sc-1pmi0q8-0"
|
|
@@ -634,7 +831,7 @@ StyledRadioMessage.defaultProps = {
|
|
|
634
831
|
const COMPONENT_ID$m = 'forms.checkbox_message';
|
|
635
832
|
const StyledCheckMessage = styled__default.default(StyledRadioMessage).attrs({
|
|
636
833
|
'data-garden-id': COMPONENT_ID$m,
|
|
637
|
-
'data-garden-version': '9.0.0-next.
|
|
834
|
+
'data-garden-version': '9.0.0-next.14'
|
|
638
835
|
}).withConfig({
|
|
639
836
|
displayName: "StyledCheckMessage",
|
|
640
837
|
componentId: "sc-s4p6kd-0"
|
|
@@ -643,17 +840,17 @@ StyledCheckMessage.defaultProps = {
|
|
|
643
840
|
theme: reactTheming.DEFAULT_THEME
|
|
644
841
|
};
|
|
645
842
|
|
|
646
|
-
var _path$
|
|
647
|
-
function _extends$
|
|
843
|
+
var _path$l;
|
|
844
|
+
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); }
|
|
648
845
|
var SvgCheckSmFill = function SvgCheckSmFill(props) {
|
|
649
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
846
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$o({
|
|
650
847
|
xmlns: "http://www.w3.org/2000/svg",
|
|
651
848
|
width: 12,
|
|
652
849
|
height: 12,
|
|
653
850
|
focusable: "false",
|
|
654
851
|
viewBox: "0 0 12 12",
|
|
655
852
|
"aria-hidden": "true"
|
|
656
|
-
}, props), _path$
|
|
853
|
+
}, props), _path$l || (_path$l = /*#__PURE__*/React__namespace.createElement("path", {
|
|
657
854
|
fill: "none",
|
|
658
855
|
stroke: "currentColor",
|
|
659
856
|
strokeLinecap: "round",
|
|
@@ -666,7 +863,7 @@ var SvgCheckSmFill = function SvgCheckSmFill(props) {
|
|
|
666
863
|
const COMPONENT_ID$l = 'forms.check_svg';
|
|
667
864
|
const StyledCheckSvg = styled__default.default(SvgCheckSmFill).attrs({
|
|
668
865
|
'data-garden-id': COMPONENT_ID$l,
|
|
669
|
-
'data-garden-version': '9.0.0-next.
|
|
866
|
+
'data-garden-version': '9.0.0-next.14'
|
|
670
867
|
}).withConfig({
|
|
671
868
|
displayName: "StyledCheckSvg",
|
|
672
869
|
componentId: "sc-fvxetk-0"
|
|
@@ -675,17 +872,17 @@ StyledCheckSvg.defaultProps = {
|
|
|
675
872
|
theme: reactTheming.DEFAULT_THEME
|
|
676
873
|
};
|
|
677
874
|
|
|
678
|
-
var _path$
|
|
679
|
-
function _extends$
|
|
875
|
+
var _path$k;
|
|
876
|
+
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); }
|
|
680
877
|
var SvgDashFill = function SvgDashFill(props) {
|
|
681
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
878
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$n({
|
|
682
879
|
xmlns: "http://www.w3.org/2000/svg",
|
|
683
880
|
width: 12,
|
|
684
881
|
height: 12,
|
|
685
882
|
focusable: "false",
|
|
686
883
|
viewBox: "0 0 12 12",
|
|
687
884
|
"aria-hidden": "true"
|
|
688
|
-
}, props), _path$
|
|
885
|
+
}, props), _path$k || (_path$k = /*#__PURE__*/React__namespace.createElement("path", {
|
|
689
886
|
stroke: "currentColor",
|
|
690
887
|
strokeLinecap: "round",
|
|
691
888
|
strokeWidth: 2,
|
|
@@ -696,7 +893,7 @@ var SvgDashFill = function SvgDashFill(props) {
|
|
|
696
893
|
const COMPONENT_ID$k = 'forms.dash_svg';
|
|
697
894
|
const StyledDashSvg = styled__default.default(SvgDashFill).attrs({
|
|
698
895
|
'data-garden-id': COMPONENT_ID$k,
|
|
699
|
-
'data-garden-version': '9.0.0-next.
|
|
896
|
+
'data-garden-version': '9.0.0-next.14'
|
|
700
897
|
}).withConfig({
|
|
701
898
|
displayName: "StyledDashSvg",
|
|
702
899
|
componentId: "sc-z3vq71-0"
|
|
@@ -706,34 +903,103 @@ StyledDashSvg.defaultProps = {
|
|
|
706
903
|
};
|
|
707
904
|
|
|
708
905
|
const COMPONENT_ID$j = 'forms.file_upload';
|
|
709
|
-
const colorStyles$
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
const
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
906
|
+
const colorStyles$7 = _ref => {
|
|
907
|
+
let {
|
|
908
|
+
theme,
|
|
909
|
+
isDragging
|
|
910
|
+
} = _ref;
|
|
911
|
+
const borderOptions = {
|
|
912
|
+
theme,
|
|
913
|
+
variable: 'border.primaryEmphasis'
|
|
914
|
+
};
|
|
915
|
+
const backgroundOptions = {
|
|
916
|
+
theme,
|
|
917
|
+
variable: 'background.primaryEmphasis'
|
|
918
|
+
};
|
|
919
|
+
const foregroundOptions = {
|
|
920
|
+
theme,
|
|
921
|
+
variable: 'foreground.primary'
|
|
922
|
+
};
|
|
923
|
+
const offset100 = {
|
|
924
|
+
dark: {
|
|
925
|
+
offset: -100
|
|
926
|
+
},
|
|
927
|
+
light: {
|
|
928
|
+
offset: 100
|
|
719
929
|
}
|
|
720
|
-
}
|
|
930
|
+
};
|
|
931
|
+
const offset200 = {
|
|
932
|
+
dark: {
|
|
933
|
+
offset: -200
|
|
934
|
+
},
|
|
935
|
+
light: {
|
|
936
|
+
offset: 200
|
|
937
|
+
}
|
|
938
|
+
};
|
|
939
|
+
const borderColor = reactTheming.getColor({
|
|
940
|
+
theme,
|
|
941
|
+
variable: 'border.emphasis'
|
|
942
|
+
});
|
|
943
|
+
const foregroundColor = reactTheming.getColor(foregroundOptions);
|
|
944
|
+
const hoverBorderColor = reactTheming.getColor({
|
|
945
|
+
...borderOptions,
|
|
946
|
+
...offset100
|
|
947
|
+
});
|
|
948
|
+
const hoverBackgroundColor = reactTheming.getColor({
|
|
949
|
+
...backgroundOptions,
|
|
950
|
+
transparency: theme.opacity[100]
|
|
951
|
+
});
|
|
952
|
+
const hoverForegroundColor = reactTheming.getColor({
|
|
953
|
+
...foregroundOptions,
|
|
954
|
+
...offset100
|
|
955
|
+
});
|
|
956
|
+
const activeBorderColor = reactTheming.getColor({
|
|
957
|
+
...borderOptions,
|
|
958
|
+
...offset200
|
|
959
|
+
});
|
|
960
|
+
const activeBackgroundColor = reactTheming.getColor({
|
|
961
|
+
...backgroundOptions,
|
|
962
|
+
transparency: theme.opacity[200]
|
|
963
|
+
});
|
|
964
|
+
const activeForegroundColor = reactTheming.getColor({
|
|
965
|
+
...foregroundOptions,
|
|
966
|
+
...offset200
|
|
967
|
+
});
|
|
968
|
+
const disabledBorderColor = reactTheming.getColor({
|
|
969
|
+
theme,
|
|
970
|
+
variable: 'border.disabled'
|
|
971
|
+
});
|
|
972
|
+
const disabledBackgroundColor = reactTheming.getColor({
|
|
973
|
+
theme,
|
|
974
|
+
variable: 'background.disabled'
|
|
975
|
+
});
|
|
976
|
+
const disabledForegroundColor = reactTheming.getColor({
|
|
977
|
+
theme,
|
|
978
|
+
variable: 'foreground.disabled'
|
|
979
|
+
});
|
|
980
|
+
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({
|
|
981
|
+
theme
|
|
982
|
+
}), activeBorderColor, activeBackgroundColor, activeForegroundColor, disabledBorderColor, disabledBackgroundColor, disabledForegroundColor);
|
|
721
983
|
};
|
|
722
|
-
const sizeStyles$
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
const
|
|
984
|
+
const sizeStyles$b = _ref2 => {
|
|
985
|
+
let {
|
|
986
|
+
theme,
|
|
987
|
+
isCompact
|
|
988
|
+
} = _ref2;
|
|
989
|
+
const marginTop = `${theme.space.base * (isCompact ? 1 : 2)}px`;
|
|
990
|
+
const paddingHorizontal = `${isCompact ? 2 : 4}em`;
|
|
991
|
+
const paddingVertical = polished.math(`${theme.space.base * (isCompact ? 2.5 : 5)} - ${theme.borderWidths.sm}`);
|
|
992
|
+
const fontSize = theme.fontSizes.md;
|
|
993
|
+
const lineHeight = reactTheming.getLineHeight(theme.space.base * 5, fontSize);
|
|
728
994
|
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);
|
|
729
995
|
};
|
|
730
996
|
const StyledFileUpload = styled__default.default.div.attrs({
|
|
731
997
|
'data-garden-id': COMPONENT_ID$j,
|
|
732
|
-
'data-garden-version': '9.0.0-next.
|
|
998
|
+
'data-garden-version': '9.0.0-next.14'
|
|
733
999
|
}).withConfig({
|
|
734
1000
|
displayName: "StyledFileUpload",
|
|
735
1001
|
componentId: "sc-1rodjgn-0"
|
|
736
|
-
})(["display:flex;align-items:center;justify-content:center;box-sizing:border-box;direction:", ";transition:border-color 0.25s ease-in-out,box-shadow 0.1s ease-in-out,background-color 0.25s ease-in-out,color 0.25s ease-in-out;border:dashed ", ";border-radius:", ";cursor:pointer;text-align:center;user-select:none;", ";&[aria-disabled='true']{cursor:default;}", ";", ";"], props => props.theme.rtl ? 'rtl' : 'ltr', props => props.theme.borderWidths.sm, props => props.theme.borderRadii.md, sizeStyles$
|
|
1002
|
+
})(["display:flex;align-items:center;justify-content:center;box-sizing:border-box;direction:", ";transition:border-color 0.25s ease-in-out,box-shadow 0.1s ease-in-out,background-color 0.25s ease-in-out,color 0.25s ease-in-out;border:dashed ", ";border-radius:", ";cursor:pointer;text-align:center;user-select:none;", ";&[aria-disabled='true']{cursor:default;}", ";", ";"], props => props.theme.rtl ? 'rtl' : 'ltr', props => props.theme.borderWidths.sm, props => props.theme.borderRadii.md, sizeStyles$b, colorStyles$7, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$j, props));
|
|
737
1003
|
StyledFileUpload.defaultProps = {
|
|
738
1004
|
theme: reactTheming.DEFAULT_THEME
|
|
739
1005
|
};
|
|
@@ -741,53 +1007,77 @@ StyledFileUpload.defaultProps = {
|
|
|
741
1007
|
const COMPONENT_ID$i = 'forms.file.close';
|
|
742
1008
|
const StyledFileClose = styled__default.default.button.attrs({
|
|
743
1009
|
'data-garden-id': COMPONENT_ID$i,
|
|
744
|
-
'data-garden-version': '9.0.0-next.
|
|
1010
|
+
'data-garden-version': '9.0.0-next.14'
|
|
745
1011
|
}).withConfig({
|
|
746
1012
|
displayName: "StyledFileClose",
|
|
747
1013
|
componentId: "sc-1m31jbf-0"
|
|
748
|
-
})(["display:flex;flex-shrink:0;align-items:center;justify-content:center;transition:opacity 0.25s ease-in-out;opacity:0.8;border:none;background:transparent;cursor:pointer;color:", ";appearance:none;&:hover{opacity:0.9;}&:focus{outline:none;}", ";"], props => reactTheming.
|
|
1014
|
+
})(["display:flex;flex-shrink:0;align-items:center;justify-content:center;transition:opacity 0.25s ease-in-out;opacity:0.8;border:none;background:transparent;cursor:pointer;color:", ";appearance:none;&:hover{opacity:0.9;}&:focus{outline:none;}", ";"], props => reactTheming.getColor({
|
|
1015
|
+
theme: props.theme,
|
|
1016
|
+
variable: 'foreground.subtle'
|
|
1017
|
+
}), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$i, props));
|
|
749
1018
|
StyledFileClose.defaultProps = {
|
|
750
1019
|
theme: reactTheming.DEFAULT_THEME
|
|
751
1020
|
};
|
|
752
1021
|
|
|
753
1022
|
const COMPONENT_ID$h = 'forms.file';
|
|
754
|
-
const colorStyles$
|
|
755
|
-
let
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
1023
|
+
const colorStyles$6 = _ref => {
|
|
1024
|
+
let {
|
|
1025
|
+
theme,
|
|
1026
|
+
focusInset,
|
|
1027
|
+
validation
|
|
1028
|
+
} = _ref;
|
|
1029
|
+
let borderVariable;
|
|
1030
|
+
let focusBorderVariable;
|
|
1031
|
+
let foregroundVariable;
|
|
1032
|
+
if (validation === 'success') {
|
|
1033
|
+
borderVariable = 'border.successEmphasis';
|
|
1034
|
+
focusBorderVariable = borderVariable;
|
|
1035
|
+
foregroundVariable = 'foreground.success';
|
|
1036
|
+
} else if (validation === 'error') {
|
|
1037
|
+
borderVariable = 'border.dangerEmphasis';
|
|
1038
|
+
focusBorderVariable = borderVariable;
|
|
1039
|
+
foregroundVariable = 'foreground.danger';
|
|
766
1040
|
} else {
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
1041
|
+
borderVariable = 'border.default';
|
|
1042
|
+
focusBorderVariable = 'border.primaryEmphasis';
|
|
1043
|
+
foregroundVariable = 'foreground.default';
|
|
770
1044
|
}
|
|
1045
|
+
const borderColor = reactTheming.getColor({
|
|
1046
|
+
theme,
|
|
1047
|
+
variable: borderVariable
|
|
1048
|
+
});
|
|
1049
|
+
const focusBorderColor = reactTheming.getColor({
|
|
1050
|
+
theme,
|
|
1051
|
+
variable: focusBorderVariable
|
|
1052
|
+
});
|
|
1053
|
+
const foregroundColor = reactTheming.getColor({
|
|
1054
|
+
theme,
|
|
1055
|
+
variable: foregroundVariable
|
|
1056
|
+
});
|
|
771
1057
|
return styled.css(["border-color:", ";color:", ";", ""], borderColor, foregroundColor, reactTheming.focusStyles({
|
|
772
|
-
theme
|
|
773
|
-
inset:
|
|
1058
|
+
theme,
|
|
1059
|
+
inset: focusInset,
|
|
774
1060
|
color: {
|
|
775
|
-
|
|
1061
|
+
variable: focusBorderVariable
|
|
776
1062
|
},
|
|
777
1063
|
styles: {
|
|
778
1064
|
borderColor: focusBorderColor
|
|
779
1065
|
}
|
|
780
1066
|
}));
|
|
781
1067
|
};
|
|
782
|
-
const sizeStyles$
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
1068
|
+
const sizeStyles$a = _ref2 => {
|
|
1069
|
+
let {
|
|
1070
|
+
theme,
|
|
1071
|
+
isCompact
|
|
1072
|
+
} = _ref2;
|
|
1073
|
+
const size = `${theme.space.base * (isCompact ? 7 : 10)}px`;
|
|
1074
|
+
const spacing = `${theme.space.base * (isCompact ? 2 : 3)}px`;
|
|
1075
|
+
const fontSize = theme.fontSizes.md;
|
|
1076
|
+
const lineHeight = reactTheming.getLineHeight(theme.space.base * 5, fontSize);
|
|
787
1077
|
return `
|
|
788
1078
|
box-sizing: border-box;
|
|
789
|
-
border: ${
|
|
790
|
-
border-radius: ${
|
|
1079
|
+
border: ${theme.borders.sm};
|
|
1080
|
+
border-radius: ${theme.borderRadii.md};
|
|
791
1081
|
padding: 0 ${spacing};
|
|
792
1082
|
height: ${size};
|
|
793
1083
|
line-height: ${lineHeight};
|
|
@@ -800,17 +1090,17 @@ const sizeStyles$7 = props => {
|
|
|
800
1090
|
& > ${StyledFileClose} {
|
|
801
1091
|
width: ${size};
|
|
802
1092
|
height: ${size};
|
|
803
|
-
margin-${
|
|
1093
|
+
margin-${theme.rtl ? 'left' : 'right'}: -${spacing};
|
|
804
1094
|
}
|
|
805
1095
|
`;
|
|
806
1096
|
};
|
|
807
1097
|
const StyledFile = styled__default.default.div.attrs({
|
|
808
1098
|
'data-garden-id': COMPONENT_ID$h,
|
|
809
|
-
'data-garden-version': '9.0.0-next.
|
|
1099
|
+
'data-garden-version': '9.0.0-next.14'
|
|
810
1100
|
}).withConfig({
|
|
811
1101
|
displayName: "StyledFile",
|
|
812
1102
|
componentId: "sc-195lzp1-0"
|
|
813
|
-
})(["display:flex;position:relative;flex-wrap:nowrap;align-items:center;transition:box-shadow 0.1s ease-in-out;", ";", ";& > span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}& > [role='progressbar']{position:absolute;bottom:0;left:0;transition:opacity 0.2s ease-in-out;margin:0;border-top-left-radius:0;border-top-right-radius:0;width:100%;& > div{border-top-", "-radius:0;}}& > [role='progressbar'][aria-valuenow='0'],& > [role='progressbar'][aria-valuenow='100']{opacity:0;}", ";"], sizeStyles$
|
|
1103
|
+
})(["display:flex;position:relative;flex-wrap:nowrap;align-items:center;transition:box-shadow 0.1s ease-in-out;", ";", ";& > span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}& > [role='progressbar']{position:absolute;bottom:0;left:0;transition:opacity 0.2s ease-in-out;margin:0;border-top-left-radius:0;border-top-right-radius:0;width:100%;& > div{border-top-", "-radius:0;}}& > [role='progressbar'][aria-valuenow='0'],& > [role='progressbar'][aria-valuenow='100']{opacity:0;}", ";"], sizeStyles$a, colorStyles$6, props => props.theme.rtl ? 'right' : 'left', props => reactTheming.retrieveComponentStyles(COMPONENT_ID$h, props));
|
|
814
1104
|
StyledFile.defaultProps = {
|
|
815
1105
|
theme: reactTheming.DEFAULT_THEME
|
|
816
1106
|
};
|
|
@@ -818,23 +1108,46 @@ StyledFile.defaultProps = {
|
|
|
818
1108
|
const COMPONENT_ID$g = 'forms.file.delete';
|
|
819
1109
|
const StyledFileDelete = styled__default.default(StyledFileClose).attrs({
|
|
820
1110
|
'data-garden-id': COMPONENT_ID$g,
|
|
821
|
-
'data-garden-version': '9.0.0-next.
|
|
1111
|
+
'data-garden-version': '9.0.0-next.14'
|
|
822
1112
|
}).withConfig({
|
|
823
1113
|
displayName: "StyledFileDelete",
|
|
824
1114
|
componentId: "sc-a8nnhx-0"
|
|
825
|
-
})(["color:", ";", ";"], props => reactTheming.
|
|
1115
|
+
})(["color:", ";", ";"], props => reactTheming.getColor({
|
|
1116
|
+
theme: props.theme,
|
|
1117
|
+
variable: 'foreground.danger'
|
|
1118
|
+
}), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$g, props));
|
|
826
1119
|
StyledFileDelete.defaultProps = {
|
|
827
1120
|
theme: reactTheming.DEFAULT_THEME
|
|
828
1121
|
};
|
|
829
1122
|
|
|
830
1123
|
const COMPONENT_ID$f = 'forms.file.icon';
|
|
1124
|
+
const colorStyles$5 = _ref => {
|
|
1125
|
+
let {
|
|
1126
|
+
theme,
|
|
1127
|
+
$validation
|
|
1128
|
+
} = _ref;
|
|
1129
|
+
const color = $validation ? undefined : reactTheming.getColor({
|
|
1130
|
+
theme,
|
|
1131
|
+
variable: 'foreground.subtle'
|
|
1132
|
+
});
|
|
1133
|
+
return styled.css(["color:", ";"], color);
|
|
1134
|
+
};
|
|
1135
|
+
const sizeStyles$9 = _ref2 => {
|
|
1136
|
+
let {
|
|
1137
|
+
$isCompact,
|
|
1138
|
+
theme
|
|
1139
|
+
} = _ref2;
|
|
1140
|
+
const width = $isCompact ? theme.iconSizes.sm : theme.iconSizes.md;
|
|
1141
|
+
const margin = `${theme.space.base * 2}px`;
|
|
1142
|
+
return styled.css(["width:", ";margin-", ":", ";"], width, theme.rtl ? 'left' : 'right', margin);
|
|
1143
|
+
};
|
|
831
1144
|
const StyledFileIcon = styled__default.default(reactTheming.StyledBaseIcon).attrs({
|
|
832
1145
|
'data-garden-id': COMPONENT_ID$f,
|
|
833
|
-
'data-garden-version': '9.0.0-next.
|
|
1146
|
+
'data-garden-version': '9.0.0-next.14'
|
|
834
1147
|
}).withConfig({
|
|
835
1148
|
displayName: "StyledFileIcon",
|
|
836
1149
|
componentId: "sc-7b3q0c-0"
|
|
837
|
-
})(["flex-shrink:0;
|
|
1150
|
+
})(["flex-shrink:0;", ";", ";", ";"], sizeStyles$9, colorStyles$5, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$f, props));
|
|
838
1151
|
StyledFileIcon.defaultProps = {
|
|
839
1152
|
theme: reactTheming.DEFAULT_THEME
|
|
840
1153
|
};
|
|
@@ -842,7 +1155,7 @@ StyledFileIcon.defaultProps = {
|
|
|
842
1155
|
const COMPONENT_ID$e = 'forms.file_list';
|
|
843
1156
|
const StyledFileList = styled__default.default.ul.attrs({
|
|
844
1157
|
'data-garden-id': COMPONENT_ID$e,
|
|
845
|
-
'data-garden-version': '9.0.0-next.
|
|
1158
|
+
'data-garden-version': '9.0.0-next.14'
|
|
846
1159
|
}).withConfig({
|
|
847
1160
|
displayName: "StyledFileList",
|
|
848
1161
|
componentId: "sc-gbahjg-0"
|
|
@@ -854,7 +1167,7 @@ StyledFileList.defaultProps = {
|
|
|
854
1167
|
const COMPONENT_ID$d = 'forms.file_list.item';
|
|
855
1168
|
const StyledFileListItem = styled__default.default.li.attrs({
|
|
856
1169
|
'data-garden-id': COMPONENT_ID$d,
|
|
857
|
-
'data-garden-version': '9.0.0-next.
|
|
1170
|
+
'data-garden-version': '9.0.0-next.14'
|
|
858
1171
|
}).withConfig({
|
|
859
1172
|
displayName: "StyledFileListItem",
|
|
860
1173
|
componentId: "sc-1ova3lo-0"
|
|
@@ -864,9 +1177,9 @@ StyledFileListItem.defaultProps = {
|
|
|
864
1177
|
};
|
|
865
1178
|
|
|
866
1179
|
var _circle$3;
|
|
867
|
-
function _extends$
|
|
1180
|
+
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); }
|
|
868
1181
|
var SvgCircleSmFill$1 = function SvgCircleSmFill(props) {
|
|
869
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
1182
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$m({
|
|
870
1183
|
xmlns: "http://www.w3.org/2000/svg",
|
|
871
1184
|
width: 12,
|
|
872
1185
|
height: 12,
|
|
@@ -884,7 +1197,7 @@ var SvgCircleSmFill$1 = function SvgCircleSmFill(props) {
|
|
|
884
1197
|
const COMPONENT_ID$c = 'forms.radio_svg';
|
|
885
1198
|
const StyledRadioSvg = styled__default.default(SvgCircleSmFill$1).attrs({
|
|
886
1199
|
'data-garden-id': COMPONENT_ID$c,
|
|
887
|
-
'data-garden-version': '9.0.0-next.
|
|
1200
|
+
'data-garden-version': '9.0.0-next.14'
|
|
888
1201
|
}).withConfig({
|
|
889
1202
|
displayName: "StyledRadioSvg",
|
|
890
1203
|
componentId: "sc-1r1qtr1-0"
|
|
@@ -894,18 +1207,18 @@ StyledRadioSvg.defaultProps = {
|
|
|
894
1207
|
};
|
|
895
1208
|
|
|
896
1209
|
const COMPONENT_ID$b = 'forms.toggle_label';
|
|
897
|
-
const sizeStyles$
|
|
1210
|
+
const sizeStyles$8 = props => {
|
|
898
1211
|
const size = props.theme.space.base * 10;
|
|
899
1212
|
const padding = size + props.theme.space.base * 2;
|
|
900
1213
|
return styled.css(["padding-", ":", "px;&[hidden]{padding-", ":", "px;}"], props.theme.rtl ? 'right' : 'left', padding, props.theme.rtl ? 'right' : 'left', size);
|
|
901
1214
|
};
|
|
902
1215
|
const StyledToggleLabel = styled__default.default(StyledCheckLabel).attrs({
|
|
903
1216
|
'data-garden-id': COMPONENT_ID$b,
|
|
904
|
-
'data-garden-version': '9.0.0-next.
|
|
1217
|
+
'data-garden-version': '9.0.0-next.14'
|
|
905
1218
|
}).withConfig({
|
|
906
1219
|
displayName: "StyledToggleLabel",
|
|
907
1220
|
componentId: "sc-e0asdk-0"
|
|
908
|
-
})(["", ";", ";"], props => sizeStyles$
|
|
1221
|
+
})(["", ";", ";"], props => sizeStyles$8(props), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$b, props));
|
|
909
1222
|
StyledToggleLabel.defaultProps = {
|
|
910
1223
|
theme: reactTheming.DEFAULT_THEME
|
|
911
1224
|
};
|
|
@@ -913,7 +1226,7 @@ StyledToggleLabel.defaultProps = {
|
|
|
913
1226
|
const COMPONENT_ID$a = 'forms.toggle_hint';
|
|
914
1227
|
const StyledToggleHint = styled__default.default(StyledHint).attrs({
|
|
915
1228
|
'data-garden-id': COMPONENT_ID$a,
|
|
916
|
-
'data-garden-version': '9.0.0-next.
|
|
1229
|
+
'data-garden-version': '9.0.0-next.14'
|
|
917
1230
|
}).withConfig({
|
|
918
1231
|
displayName: "StyledToggleHint",
|
|
919
1232
|
componentId: "sc-nziggu-0"
|
|
@@ -923,28 +1236,53 @@ StyledToggleHint.defaultProps = {
|
|
|
923
1236
|
};
|
|
924
1237
|
|
|
925
1238
|
const COMPONENT_ID$9 = 'forms.toggle';
|
|
926
|
-
const colorStyles$
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
const
|
|
1239
|
+
const colorStyles$4 = _ref => {
|
|
1240
|
+
let {
|
|
1241
|
+
theme
|
|
1242
|
+
} = _ref;
|
|
1243
|
+
const backgroundOptions = {
|
|
1244
|
+
theme,
|
|
1245
|
+
variable: 'background.emphasis'
|
|
1246
|
+
};
|
|
1247
|
+
const backgroundColor = reactTheming.getColor(backgroundOptions);
|
|
1248
|
+
const hoverBackgroundColor = reactTheming.getColor({
|
|
1249
|
+
...backgroundOptions,
|
|
1250
|
+
dark: {
|
|
1251
|
+
offset: -100
|
|
1252
|
+
},
|
|
1253
|
+
light: {
|
|
1254
|
+
offset: 100
|
|
1255
|
+
}
|
|
1256
|
+
});
|
|
1257
|
+
const activeBackgroundColor = reactTheming.getColor({
|
|
1258
|
+
...backgroundOptions,
|
|
1259
|
+
dark: {
|
|
1260
|
+
offset: -200
|
|
1261
|
+
},
|
|
1262
|
+
light: {
|
|
1263
|
+
offset: 200
|
|
1264
|
+
}
|
|
1265
|
+
});
|
|
931
1266
|
return styled.css(["& ~ ", "::before{background-color:", ";}&:enabled ~ ", ":hover::before{background-color:", ";}&:enabled ~ ", ":active::before{background-color:", ";}"], StyledToggleLabel, backgroundColor, StyledToggleLabel, hoverBackgroundColor, StyledToggleLabel, activeBackgroundColor);
|
|
932
1267
|
};
|
|
933
|
-
const sizeStyles$
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
1268
|
+
const sizeStyles$7 = _ref2 => {
|
|
1269
|
+
let {
|
|
1270
|
+
theme
|
|
1271
|
+
} = _ref2;
|
|
1272
|
+
const height = `${theme.space.base * 5}px`;
|
|
1273
|
+
const width = `${theme.space.base * 10}px`;
|
|
1274
|
+
const iconSize = theme.iconSizes.md;
|
|
937
1275
|
const iconPosition = polished.math(`(${height} - ${iconSize}) / 2`);
|
|
938
1276
|
const checkedIconPosition = polished.math(`${width} - ${iconSize} - ${iconPosition}`);
|
|
939
|
-
return styled.css(["top:0;width:", ";height:", ";& ~ ", "::before{width:", ";height:", ";}& ~ ", " > svg{top:", ";", ":", ";width:", ";height:", ";}&:checked ~ ", " > svg{", ":", ";}"], width, height, StyledToggleLabel, width, height, StyledToggleLabel, iconPosition,
|
|
1277
|
+
return styled.css(["top:0;width:", ";height:", ";& ~ ", "::before{width:", ";height:", ";}& ~ ", " > svg{top:", ";", ":", ";width:", ";height:", ";}&:checked ~ ", " > svg{", ":", ";}"], width, height, StyledToggleLabel, width, height, StyledToggleLabel, iconPosition, theme.rtl ? 'right' : 'left', iconPosition, iconSize, iconSize, StyledToggleLabel, theme.rtl ? 'right' : 'left', checkedIconPosition);
|
|
940
1278
|
};
|
|
941
1279
|
const StyledToggleInput = styled__default.default(StyledCheckInput).attrs({
|
|
942
1280
|
'data-garden-id': COMPONENT_ID$9,
|
|
943
|
-
'data-garden-version': '9.0.0-next.
|
|
1281
|
+
'data-garden-version': '9.0.0-next.14'
|
|
944
1282
|
}).withConfig({
|
|
945
1283
|
displayName: "StyledToggleInput",
|
|
946
1284
|
componentId: "sc-sgp47s-0"
|
|
947
|
-
})(["& ~ ", "::before{top:0;transition:box-shadow .1s ease-in-out,background-color .15s ease-in-out,color .25s ease-in-out;border:none;border-radius:100px;}", ";", ";", ";"], StyledToggleLabel,
|
|
1285
|
+
})(["& ~ ", "::before{top:0;transition:box-shadow .1s ease-in-out,background-color .15s ease-in-out,color .25s ease-in-out;border:none;border-radius:100px;}", ";", ";", ";"], StyledToggleLabel, sizeStyles$7, colorStyles$4, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$9, props));
|
|
948
1286
|
StyledToggleInput.defaultProps = {
|
|
949
1287
|
theme: reactTheming.DEFAULT_THEME
|
|
950
1288
|
};
|
|
@@ -952,7 +1290,7 @@ StyledToggleInput.defaultProps = {
|
|
|
952
1290
|
const COMPONENT_ID$8 = 'forms.toggle_message';
|
|
953
1291
|
const StyledToggleMessage = styled__default.default(StyledMessage).attrs({
|
|
954
1292
|
'data-garden-id': COMPONENT_ID$8,
|
|
955
|
-
'data-garden-version': '9.0.0-next.
|
|
1293
|
+
'data-garden-version': '9.0.0-next.14'
|
|
956
1294
|
}).withConfig({
|
|
957
1295
|
displayName: "StyledToggleMessage",
|
|
958
1296
|
componentId: "sc-13vuvl1-0"
|
|
@@ -962,9 +1300,9 @@ StyledToggleMessage.defaultProps = {
|
|
|
962
1300
|
};
|
|
963
1301
|
|
|
964
1302
|
var _circle$2;
|
|
965
|
-
function _extends$
|
|
1303
|
+
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); }
|
|
966
1304
|
var SvgCircleSmFill = function SvgCircleSmFill(props) {
|
|
967
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
1305
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$l({
|
|
968
1306
|
xmlns: "http://www.w3.org/2000/svg",
|
|
969
1307
|
width: 16,
|
|
970
1308
|
height: 16,
|
|
@@ -982,7 +1320,7 @@ var SvgCircleSmFill = function SvgCircleSmFill(props) {
|
|
|
982
1320
|
const COMPONENT_ID$7 = 'forms.toggle_svg';
|
|
983
1321
|
const StyledToggleSvg = styled__default.default(SvgCircleSmFill).attrs({
|
|
984
1322
|
'data-garden-id': COMPONENT_ID$7,
|
|
985
|
-
'data-garden-version': '9.0.0-next.
|
|
1323
|
+
'data-garden-version': '9.0.0-next.14'
|
|
986
1324
|
}).withConfig({
|
|
987
1325
|
displayName: "StyledToggleSvg",
|
|
988
1326
|
componentId: "sc-162xbyx-0"
|
|
@@ -992,36 +1330,68 @@ StyledToggleSvg.defaultProps = {
|
|
|
992
1330
|
};
|
|
993
1331
|
|
|
994
1332
|
const COMPONENT_ID$6 = 'forms.select';
|
|
995
|
-
const colorStyles$
|
|
996
|
-
|
|
997
|
-
|
|
1333
|
+
const colorStyles$3 = _ref => {
|
|
1334
|
+
let {
|
|
1335
|
+
theme
|
|
1336
|
+
} = _ref;
|
|
1337
|
+
const color = reactTheming.getColor({
|
|
1338
|
+
theme,
|
|
1339
|
+
variable: 'foreground.subtle',
|
|
1340
|
+
dark: {
|
|
1341
|
+
offset: -100
|
|
1342
|
+
},
|
|
1343
|
+
light: {
|
|
1344
|
+
offset: 100
|
|
1345
|
+
}
|
|
1346
|
+
});
|
|
1347
|
+
const disabledColor = reactTheming.getColor({
|
|
1348
|
+
theme,
|
|
1349
|
+
variable: 'foreground.disabled'
|
|
1350
|
+
});
|
|
1351
|
+
return styled.css(["&:hover + ", ",&:focus + ", ",&:focus-visible + ", "{color:", ";}&:disabled + ", "{color:", ";}"], StyledTextMediaFigure, StyledTextMediaFigure, StyledTextMediaFigure, color, StyledTextMediaFigure, disabledColor);
|
|
998
1352
|
};
|
|
999
|
-
const sizeStyles$
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1353
|
+
const sizeStyles$6 = _ref2 => {
|
|
1354
|
+
let {
|
|
1355
|
+
theme,
|
|
1356
|
+
isBare,
|
|
1357
|
+
isCompact
|
|
1358
|
+
} = _ref2;
|
|
1359
|
+
const padding = isBare ? undefined : polished.math(`${theme.iconSizes.md} + ${theme.space.base * 5}`);
|
|
1360
|
+
const iconVerticalPosition = `${theme.space.base * (isCompact ? 1.5 : 2.5) + 1}px`;
|
|
1361
|
+
const iconHorizontalPosition = `${theme.space.base * 3}px`;
|
|
1362
|
+
return styled.css(["padding-", ":", ";& + ", "{top:", ";", ":", ";}"], theme.rtl ? 'left' : 'right', padding, StyledTextMediaFigure, iconVerticalPosition, theme.rtl ? 'left' : 'right', iconHorizontalPosition);
|
|
1004
1363
|
};
|
|
1005
1364
|
const StyledSelect = styled__default.default(StyledTextInput).attrs({
|
|
1006
1365
|
'data-garden-id': COMPONENT_ID$6,
|
|
1007
|
-
'data-garden-version': '9.0.0-next.
|
|
1366
|
+
'data-garden-version': '9.0.0-next.14',
|
|
1008
1367
|
as: 'select'
|
|
1009
1368
|
}).withConfig({
|
|
1010
1369
|
displayName: "StyledSelect",
|
|
1011
1370
|
componentId: "sc-8xdxpt-0"
|
|
1012
|
-
})(["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;}"],
|
|
1371
|
+
})(["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({
|
|
1372
|
+
theme: props.theme,
|
|
1373
|
+
variable: 'foreground.default'
|
|
1374
|
+
}), StyledTextMediaFigure);
|
|
1013
1375
|
StyledSelect.defaultProps = {
|
|
1014
1376
|
theme: reactTheming.DEFAULT_THEME
|
|
1015
1377
|
};
|
|
1016
1378
|
|
|
1017
1379
|
const COMPONENT_ID$5 = 'forms.select_wrapper';
|
|
1380
|
+
const sizeStyles$5 = _ref => {
|
|
1381
|
+
let {
|
|
1382
|
+
theme,
|
|
1383
|
+
isCompact
|
|
1384
|
+
} = _ref;
|
|
1385
|
+
const height = `${theme.space.base * (isCompact ? 8 : 10)}px`;
|
|
1386
|
+
return styled.css(["max-height:", ";"], height);
|
|
1387
|
+
};
|
|
1018
1388
|
const StyledSelectWrapper = styled__default.default(StyledTextFauxInput).attrs({
|
|
1019
1389
|
'data-garden-id': COMPONENT_ID$5,
|
|
1020
|
-
'data-garden-version': '9.0.0-next.
|
|
1390
|
+
'data-garden-version': '9.0.0-next.14'
|
|
1021
1391
|
}).withConfig({
|
|
1022
1392
|
displayName: "StyledSelectWrapper",
|
|
1023
1393
|
componentId: "sc-i7b6hw-0"
|
|
1024
|
-
})(["position:relative;padding:0;overflow:visible;& > ", "{border-color:transparent;background-color:transparent;", "{box-shadow:unset;}}"], StyledSelect, reactTheming.SELECTOR_FOCUS_VISIBLE);
|
|
1394
|
+
})(["position:relative;padding:0;overflow:visible;", ";& > ", "{border-color:transparent;background-color:transparent;", "{box-shadow:unset;}}"], sizeStyles$5, StyledSelect, reactTheming.SELECTOR_FOCUS_VISIBLE);
|
|
1025
1395
|
StyledSelectWrapper.defaultProps = {
|
|
1026
1396
|
theme: reactTheming.DEFAULT_THEME
|
|
1027
1397
|
};
|
|
@@ -1071,28 +1441,81 @@ const trackLowerStyles = function (styles) {
|
|
|
1071
1441
|
}
|
|
1072
1442
|
`;
|
|
1073
1443
|
};
|
|
1074
|
-
const colorStyles$
|
|
1075
|
-
|
|
1076
|
-
|
|
1444
|
+
const colorStyles$2 = _ref => {
|
|
1445
|
+
let {
|
|
1446
|
+
theme,
|
|
1447
|
+
hasLowerTrack
|
|
1448
|
+
} = _ref;
|
|
1449
|
+
const options = {
|
|
1450
|
+
theme,
|
|
1451
|
+
variable: 'background.primaryEmphasis'
|
|
1452
|
+
};
|
|
1453
|
+
const thumbBackgroundColor = reactTheming.getColor(options);
|
|
1077
1454
|
const thumbBorderColor = thumbBackgroundColor;
|
|
1078
|
-
const thumbBoxShadow =
|
|
1455
|
+
const thumbBoxShadow = theme.shadows.lg(`${theme.space.base}px`, `${theme.space.base * 2}px`, reactTheming.getColor({
|
|
1456
|
+
theme,
|
|
1457
|
+
hue: 'neutralHue',
|
|
1458
|
+
shade: 1200,
|
|
1459
|
+
dark: {
|
|
1460
|
+
transparency: theme.opacity[1100]
|
|
1461
|
+
},
|
|
1462
|
+
light: {
|
|
1463
|
+
transparency: theme.opacity[200]
|
|
1464
|
+
}
|
|
1465
|
+
}));
|
|
1079
1466
|
const thumbFocusBoxShadow = reactTheming.getFocusBoxShadow({
|
|
1080
|
-
theme
|
|
1467
|
+
theme
|
|
1468
|
+
});
|
|
1469
|
+
const thumbActiveBackgroundColor = reactTheming.getColor({
|
|
1470
|
+
...options,
|
|
1471
|
+
dark: {
|
|
1472
|
+
offset: -200
|
|
1473
|
+
},
|
|
1474
|
+
light: {
|
|
1475
|
+
offset: 200
|
|
1476
|
+
}
|
|
1081
1477
|
});
|
|
1082
|
-
const thumbActiveBackgroundColor = reactTheming.getColorV8('primaryHue', SHADE + 100, props.theme);
|
|
1083
1478
|
const thumbActiveBorderColor = thumbBorderColor;
|
|
1084
|
-
const thumbDisabledBackgroundColor = reactTheming.
|
|
1479
|
+
const thumbDisabledBackgroundColor = reactTheming.getColor({
|
|
1480
|
+
theme,
|
|
1481
|
+
variable: 'border.emphasis'
|
|
1482
|
+
});
|
|
1085
1483
|
const thumbDisabledBorderColor = thumbDisabledBackgroundColor;
|
|
1086
|
-
const thumbHoverBackgroundColor =
|
|
1484
|
+
const thumbHoverBackgroundColor = reactTheming.getColor({
|
|
1485
|
+
...options,
|
|
1486
|
+
dark: {
|
|
1487
|
+
offset: -100
|
|
1488
|
+
},
|
|
1489
|
+
light: {
|
|
1490
|
+
offset: 100
|
|
1491
|
+
}
|
|
1492
|
+
});
|
|
1087
1493
|
const thumbHoverBorderColor = thumbHoverBackgroundColor;
|
|
1088
|
-
const trackBackgroundColor = reactTheming.
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1494
|
+
const trackBackgroundColor = reactTheming.getColor({
|
|
1495
|
+
theme,
|
|
1496
|
+
variable: 'border.emphasis',
|
|
1497
|
+
dark: {
|
|
1498
|
+
offset: 100
|
|
1499
|
+
},
|
|
1500
|
+
light: {
|
|
1501
|
+
offset: -200
|
|
1502
|
+
}
|
|
1503
|
+
});
|
|
1504
|
+
const trackLowerBackgroundColor = hasLowerTrack ? thumbBackgroundColor : '';
|
|
1505
|
+
const trackBackgroundImage = hasLowerTrack ? `linear-gradient(${trackLowerBackgroundColor}, ${trackLowerBackgroundColor})` : '';
|
|
1506
|
+
const trackDisabledBackgroundColor = reactTheming.getColor({
|
|
1507
|
+
theme,
|
|
1508
|
+
variable: 'background.disabled',
|
|
1509
|
+
transparency: theme.opacity[200]
|
|
1510
|
+
});
|
|
1511
|
+
const trackDisabledLowerBackgroundColor = hasLowerTrack ? reactTheming.getColor({
|
|
1512
|
+
theme,
|
|
1513
|
+
variable: 'border.emphasis'
|
|
1514
|
+
}) : '';
|
|
1515
|
+
const trackDisabledBackgroundImage = hasLowerTrack ? `linear-gradient(${trackDisabledLowerBackgroundColor}, ${trackDisabledLowerBackgroundColor})` : '';
|
|
1093
1516
|
return styled.css(["", " ", " ", " ", " ", " ", " ", " ", " ", ""], trackStyles(`
|
|
1094
1517
|
background-color: ${trackBackgroundColor};
|
|
1095
|
-
background-image: ${trackBackgroundImage}; /*
|
|
1518
|
+
background-image: ${trackBackgroundImage}; /* [1] */
|
|
1096
1519
|
`), thumbStyles(`
|
|
1097
1520
|
border-color: ${thumbBorderColor};
|
|
1098
1521
|
box-shadow: ${thumbBoxShadow};
|
|
@@ -1111,6 +1534,7 @@ const colorStyles$1 = props => {
|
|
|
1111
1534
|
border-color: ${thumbActiveBorderColor};
|
|
1112
1535
|
background-color: ${thumbActiveBackgroundColor};
|
|
1113
1536
|
`, ':active'), trackStyles(`
|
|
1537
|
+
background-color: ${trackDisabledBackgroundColor};
|
|
1114
1538
|
background-image: ${trackDisabledBackgroundImage};
|
|
1115
1539
|
`, ':disabled'), thumbStyles(`
|
|
1116
1540
|
border-color: ${thumbDisabledBorderColor};
|
|
@@ -1120,29 +1544,32 @@ const colorStyles$1 = props => {
|
|
|
1120
1544
|
background-color: ${trackDisabledLowerBackgroundColor};
|
|
1121
1545
|
`, ':disabled'));
|
|
1122
1546
|
};
|
|
1123
|
-
const sizeStyles$
|
|
1124
|
-
|
|
1125
|
-
|
|
1547
|
+
const sizeStyles$4 = _ref2 => {
|
|
1548
|
+
let {
|
|
1549
|
+
theme
|
|
1550
|
+
} = _ref2;
|
|
1551
|
+
const thumbSize = `${theme.space.base * 5}px`;
|
|
1552
|
+
const trackHeight = `${theme.space.base * 1.5}px`;
|
|
1126
1553
|
const trackBorderRadius = trackHeight;
|
|
1127
|
-
const trackMargin = polished.math(`(${thumbSize} - ${trackHeight}) / 2 + ${
|
|
1554
|
+
const trackMargin = polished.math(`(${thumbSize} - ${trackHeight}) / 2 + ${theme.shadowWidths.md}`);
|
|
1128
1555
|
const thumbMargin = polished.math(`(${trackHeight} - ${thumbSize}) / 2`);
|
|
1129
|
-
return styled.css(["", ":not([hidden]) + &,", " + &,", " + &,& + ", ",& + ", "{margin-top:", ";}", ";", " ", ""], StyledLabel, StyledHint, StyledMessage, StyledHint, StyledMessage,
|
|
1556
|
+
return styled.css(["", ":not([hidden]) + &,", " + &,", " + &,& + ", ",& + ", "{margin-top:", ";}", ";", " ", ""], StyledLabel, StyledHint, StyledMessage, StyledHint, StyledMessage, `${theme.space.base * 2}px`, trackStyles(`
|
|
1130
1557
|
margin: ${trackMargin} 0;
|
|
1131
1558
|
border-radius: ${trackBorderRadius};
|
|
1132
1559
|
height: ${trackHeight};
|
|
1133
1560
|
`), thumbStyles(`
|
|
1134
|
-
margin: ${thumbMargin} 0; /*
|
|
1561
|
+
margin: ${thumbMargin} 0; /* [1] */
|
|
1135
1562
|
width: ${thumbSize};
|
|
1136
1563
|
height: ${thumbSize};
|
|
1137
1564
|
`), trackLowerStyles(`
|
|
1138
|
-
border-top-${
|
|
1139
|
-
border-bottom-${
|
|
1565
|
+
border-top-${theme.rtl ? 'right' : 'left'}-radius: ${trackBorderRadius};
|
|
1566
|
+
border-bottom-${theme.rtl ? 'right' : 'left'}-radius: ${trackBorderRadius};
|
|
1140
1567
|
height: ${trackHeight};
|
|
1141
1568
|
`));
|
|
1142
1569
|
};
|
|
1143
1570
|
const StyledRangeInput = styled__default.default.input.attrs(props => ({
|
|
1144
1571
|
'data-garden-id': COMPONENT_ID$4,
|
|
1145
|
-
'data-garden-version': '9.0.0-next.
|
|
1572
|
+
'data-garden-version': '9.0.0-next.14',
|
|
1146
1573
|
type: 'range',
|
|
1147
1574
|
style: {
|
|
1148
1575
|
backgroundSize: props.hasLowerTrack && props.backgroundSize
|
|
@@ -1159,142 +1586,238 @@ const StyledRangeInput = styled__default.default.input.attrs(props => ({
|
|
|
1159
1586
|
width: 99.8%; /* fix for IE which cuts off the upper track's border radius */
|
|
1160
1587
|
color: transparent; /* reset for IE */
|
|
1161
1588
|
box-sizing: border-box; /* reset for IE */
|
|
1162
|
-
`),
|
|
1589
|
+
`), sizeStyles$4, props => thumbStyles(`
|
|
1163
1590
|
appearance: none;
|
|
1164
1591
|
transition: box-shadow .1s ease-in-out;
|
|
1165
1592
|
border: ${props.theme.borders.md};
|
|
1166
1593
|
border-radius: 100%;
|
|
1167
1594
|
box-sizing: border-box;
|
|
1168
|
-
`),
|
|
1595
|
+
`), colorStyles$2, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$4, props));
|
|
1169
1596
|
StyledRangeInput.defaultProps = {
|
|
1170
1597
|
backgroundSize: '0%',
|
|
1171
1598
|
hasLowerTrack: true,
|
|
1172
1599
|
theme: reactTheming.DEFAULT_THEME
|
|
1173
1600
|
};
|
|
1174
1601
|
|
|
1175
|
-
const COMPONENT_ID$3 = 'forms.
|
|
1176
|
-
const
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
horizontalValue = `right: ${props.theme.space.base * 5}px`;
|
|
1602
|
+
const COMPONENT_ID$3 = 'forms.tile';
|
|
1603
|
+
const colorStyles$1 = _ref => {
|
|
1604
|
+
let {
|
|
1605
|
+
theme
|
|
1606
|
+
} = _ref;
|
|
1607
|
+
const offset100 = {
|
|
1608
|
+
dark: {
|
|
1609
|
+
offset: -100
|
|
1610
|
+
},
|
|
1611
|
+
light: {
|
|
1612
|
+
offset: 100
|
|
1187
1613
|
}
|
|
1188
|
-
}
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
'data-garden-id': COMPONENT_ID$3,
|
|
1193
|
-
'data-garden-version': '9.0.0-next.13'
|
|
1194
|
-
}).withConfig({
|
|
1195
|
-
displayName: "StyledTileIcon",
|
|
1196
|
-
componentId: "sc-1wazhg4-0"
|
|
1197
|
-
})(["display:block;transition:color 0.25s ease-in-out;text-align:center;line-height:0;", ";", ";"], props => sizeStyles$2(props), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$3, props));
|
|
1198
|
-
StyledTileIcon.defaultProps = {
|
|
1199
|
-
theme: reactTheming.DEFAULT_THEME
|
|
1200
|
-
};
|
|
1201
|
-
|
|
1202
|
-
const COMPONENT_ID$2 = 'forms.tile';
|
|
1203
|
-
const colorStyles = props => {
|
|
1204
|
-
const SHADE = 600;
|
|
1205
|
-
const iconColor = reactTheming.getColorV8('neutralHue', SHADE, props.theme);
|
|
1206
|
-
const color = reactTheming.getColorV8('neutralHue', SHADE + 200, props.theme);
|
|
1207
|
-
const borderColor = reactTheming.getColorV8('neutralHue', SHADE - 300, props.theme);
|
|
1208
|
-
const hoverBackgroundColor = reactTheming.getColorV8('primaryHue', SHADE, props.theme, 0.08);
|
|
1209
|
-
const hoverBorderColor = reactTheming.getColorV8('primaryHue', SHADE, props.theme);
|
|
1210
|
-
const focusBorderColor = hoverBorderColor;
|
|
1211
|
-
const activeBackgroundColor = reactTheming.getColorV8('primaryHue', SHADE, props.theme, 0.2);
|
|
1212
|
-
const activeBorderColor = focusBorderColor;
|
|
1213
|
-
const disabledBackgroundColor = reactTheming.getColorV8('neutralHue', SHADE - 500, props.theme);
|
|
1214
|
-
const disabledBorderColor = reactTheming.getColorV8('neutralHue', SHADE - 400, props.theme);
|
|
1215
|
-
const disabledColor = reactTheming.getColorV8('neutralHue', SHADE - 200, props.theme);
|
|
1216
|
-
const selectedBorderColor = focusBorderColor;
|
|
1217
|
-
const selectedBackgroundColor = selectedBorderColor;
|
|
1218
|
-
const selectedHoverBorderColor = reactTheming.getColorV8('primaryHue', SHADE + 100, props.theme);
|
|
1219
|
-
const selectedHoverBackgroundColor = selectedHoverBorderColor;
|
|
1220
|
-
const selectedActiveBorderColor = reactTheming.getColorV8('primaryHue', SHADE + 200, props.theme);
|
|
1221
|
-
const selectedActiveBackgroundColor = selectedActiveBorderColor;
|
|
1222
|
-
const selectedDisabledBackgroundColor = disabledBorderColor;
|
|
1223
|
-
return styled.css(["border:", " ", ";border-color:", ";background-color:", ";color:", ";", "{color:", ";}&:hover:not([aria-disabled='true']){border-color:", ";background-color:", ";", "{color:", ";}}", " &:active:not([aria-disabled='true']){border-color:", ";background-color:", ";", "{color:", ";}}&[data-garden-selected='true']{border-color:", ";background-color:", ";color:", ";", "{color:", ";}}&[data-garden-selected='true']:not([aria-disabled='true']):hover{border-color:", ";background-color:", ";color:", ";", "{color:", ";}}&[data-garden-selected='true']:not([aria-disabled='true']):active{border-color:", ";background-color:", ";color:", ";", "{color:", ";}}&[aria-disabled='true']{border-color:", ";background-color:", ";color:", ";", "{color:", ";}}&[data-garden-selected='true'][aria-disabled='true']{background-color:", ";color:", ";", "{color:", ";}}"], props.theme.borders.sm, reactTheming.getColorV8('neutralHue', SHADE - 300, props.theme), borderColor, reactTheming.getColorV8('background', 600 , props.theme), color, StyledTileIcon, iconColor, hoverBorderColor, hoverBackgroundColor, StyledTileIcon, color, reactTheming.focusStyles({
|
|
1224
|
-
theme: props.theme,
|
|
1225
|
-
color: {
|
|
1226
|
-
hue: focusBorderColor
|
|
1614
|
+
};
|
|
1615
|
+
const offset200 = {
|
|
1616
|
+
dark: {
|
|
1617
|
+
offset: -200
|
|
1227
1618
|
},
|
|
1619
|
+
light: {
|
|
1620
|
+
offset: 200
|
|
1621
|
+
}
|
|
1622
|
+
};
|
|
1623
|
+
const backgroundColor = reactTheming.getColor({
|
|
1624
|
+
theme,
|
|
1625
|
+
variable: 'background.default'
|
|
1626
|
+
});
|
|
1627
|
+
const borderColor = reactTheming.getColor({
|
|
1628
|
+
theme,
|
|
1629
|
+
variable: 'border.default',
|
|
1630
|
+
...offset100
|
|
1631
|
+
});
|
|
1632
|
+
const foregroundColor = reactTheming.getColor({
|
|
1633
|
+
theme,
|
|
1634
|
+
variable: 'foreground.default'
|
|
1635
|
+
});
|
|
1636
|
+
const backgroundOptions = {
|
|
1637
|
+
theme,
|
|
1638
|
+
variable: 'background.primaryEmphasis'
|
|
1639
|
+
};
|
|
1640
|
+
const hoverBackgroundColor = reactTheming.getColor({
|
|
1641
|
+
...backgroundOptions,
|
|
1642
|
+
transparency: theme.opacity[100]
|
|
1643
|
+
});
|
|
1644
|
+
const hoverBorderColor = reactTheming.getColor({
|
|
1645
|
+
theme,
|
|
1646
|
+
variable: 'border.primaryEmphasis'
|
|
1647
|
+
});
|
|
1648
|
+
const activeBackgroundColor = reactTheming.getColor({
|
|
1649
|
+
...backgroundOptions,
|
|
1650
|
+
transparency: theme.opacity[200]
|
|
1651
|
+
});
|
|
1652
|
+
const focusBorderColor = hoverBorderColor;
|
|
1653
|
+
const activeBorderColor = hoverBorderColor;
|
|
1654
|
+
const checkedBackgroundColor = reactTheming.getColor(backgroundOptions);
|
|
1655
|
+
const checkedForegroundColor = reactTheming.getColor({
|
|
1656
|
+
theme,
|
|
1657
|
+
variable: 'foreground.onEmphasis'
|
|
1658
|
+
});
|
|
1659
|
+
const checkedHoverBackgroundColor = reactTheming.getColor({
|
|
1660
|
+
...backgroundOptions,
|
|
1661
|
+
...offset100
|
|
1662
|
+
});
|
|
1663
|
+
const checkedActiveBackgroundColor = reactTheming.getColor({
|
|
1664
|
+
...backgroundOptions,
|
|
1665
|
+
...offset200
|
|
1666
|
+
});
|
|
1667
|
+
const disabledBackgroundColor = reactTheming.getColor({
|
|
1668
|
+
theme,
|
|
1669
|
+
variable: 'background.disabled'
|
|
1670
|
+
});
|
|
1671
|
+
const disabledBorderColor = reactTheming.getColor({
|
|
1672
|
+
theme,
|
|
1673
|
+
variable: 'border.disabled'
|
|
1674
|
+
});
|
|
1675
|
+
const disabledForegroundColor = reactTheming.getColor({
|
|
1676
|
+
theme,
|
|
1677
|
+
variable: 'foreground.disabled'
|
|
1678
|
+
});
|
|
1679
|
+
return styled.css(["border-color:", ";background-color:", ";color:", ";&:hover{border-color:", ";background-color:", ";}", ";&:active{border-color:", ";background-color:", ";}&:has(:checked){border-color:transparent;background-color:", ";color:", ";}&:hover:has(:checked){background-color:", ";}&:active:has(:checked){background-color:", ";}&[aria-disabled='true']{border-color:", ";background-color:", ";color:", ";}"], borderColor, backgroundColor, foregroundColor, hoverBorderColor, hoverBackgroundColor, reactTheming.focusStyles({
|
|
1680
|
+
theme,
|
|
1681
|
+
selector: '&:has(:focus-visible)',
|
|
1228
1682
|
styles: {
|
|
1229
1683
|
borderColor: focusBorderColor
|
|
1230
|
-
}
|
|
1231
|
-
|
|
1232
|
-
}), activeBorderColor, activeBackgroundColor, StyledTileIcon, color, selectedBorderColor, selectedBackgroundColor, reactTheming.getColorV8('background', 600 , props.theme), StyledTileIcon, reactTheming.getColorV8('background', 600 , props.theme), selectedHoverBorderColor, selectedHoverBackgroundColor, reactTheming.getColorV8('background', 600 , props.theme), StyledTileIcon, reactTheming.getColorV8('background', 600 , props.theme), selectedActiveBorderColor, selectedActiveBackgroundColor, reactTheming.getColorV8('background', 600 , props.theme), StyledTileIcon, reactTheming.getColorV8('background', 600 , props.theme), disabledBorderColor, disabledBackgroundColor, disabledColor, StyledTileIcon, disabledColor, selectedDisabledBackgroundColor, disabledColor, StyledTileIcon, disabledColor);
|
|
1684
|
+
}
|
|
1685
|
+
}), activeBorderColor, activeBackgroundColor, checkedBackgroundColor, checkedForegroundColor, checkedHoverBackgroundColor, checkedActiveBackgroundColor, disabledBorderColor, disabledBackgroundColor, disabledForegroundColor);
|
|
1233
1686
|
};
|
|
1234
|
-
const
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1687
|
+
const sizeStyles$3 = _ref2 => {
|
|
1688
|
+
let {
|
|
1689
|
+
theme
|
|
1690
|
+
} = _ref2;
|
|
1691
|
+
const border = theme.borders.sm;
|
|
1692
|
+
const padding = `${theme.space.base * 5}px`;
|
|
1693
|
+
return styled.css(["border:", ";padding:", ";min-width:132px;"], border, padding);
|
|
1694
|
+
};
|
|
1695
|
+
const StyledTile = styled__default.default.label.attrs({
|
|
1696
|
+
'data-garden-id': COMPONENT_ID$3,
|
|
1697
|
+
'data-garden-version': '9.0.0-next.14'
|
|
1698
|
+
}).withConfig({
|
|
1239
1699
|
displayName: "StyledTile",
|
|
1240
1700
|
componentId: "sc-1jjvmxs-0"
|
|
1241
|
-
})(["display:block;position:relative;transition:border-color .25s ease-in-out,box-shadow .1s ease-in-out,background-color .25s ease-in-out,color .25s ease-in-out;border-radius:", ";
|
|
1701
|
+
})(["display:block;position:relative;transition:border-color .25s ease-in-out,box-shadow .1s ease-in-out,background-color .25s ease-in-out,color .25s ease-in-out;border-radius:", ";direction:", ";word-break:break-word;", ";", ";", ";"], props => props.theme.borderRadii.md, props => props.theme.rtl && 'rtl', sizeStyles$3, colorStyles$1, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$3, props));
|
|
1242
1702
|
StyledTile.defaultProps = {
|
|
1243
1703
|
theme: reactTheming.DEFAULT_THEME
|
|
1244
1704
|
};
|
|
1245
1705
|
|
|
1246
|
-
const COMPONENT_ID$
|
|
1247
|
-
const sizeStyles$
|
|
1248
|
-
let
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
}
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
return styled.css(["margin-top:", "
|
|
1706
|
+
const COMPONENT_ID$2 = 'forms.tile_description';
|
|
1707
|
+
const sizeStyles$2 = _ref => {
|
|
1708
|
+
let {
|
|
1709
|
+
theme,
|
|
1710
|
+
isCentered
|
|
1711
|
+
} = _ref;
|
|
1712
|
+
const marginTop = `${theme.space.base}px`;
|
|
1713
|
+
const marginHorizontal = isCentered ? undefined : polished.math(`(${theme.iconSizes.md} * 2) + ${theme.space.base * 5}px`);
|
|
1714
|
+
const fontSize = theme.fontSizes.sm;
|
|
1715
|
+
const lineHeight = reactTheming.getLineHeight(theme.space.base * 4, fontSize);
|
|
1716
|
+
return styled.css(["margin-top:", ";margin-", ":", ";line-height:", ";font-size:", ";"], marginTop, theme.rtl ? 'right' : 'left', marginHorizontal, lineHeight, fontSize);
|
|
1257
1717
|
};
|
|
1258
1718
|
const StyledTileDescription = styled__default.default.span.attrs({
|
|
1259
|
-
'data-garden-id': COMPONENT_ID$
|
|
1260
|
-
'data-garden-version': '9.0.0-next.
|
|
1719
|
+
'data-garden-id': COMPONENT_ID$2,
|
|
1720
|
+
'data-garden-version': '9.0.0-next.14'
|
|
1261
1721
|
}).withConfig({
|
|
1262
1722
|
displayName: "StyledTileDescription",
|
|
1263
1723
|
componentId: "sc-xfuu7u-0"
|
|
1264
|
-
})(["display:block;text-align:", ";
|
|
1724
|
+
})(["display:block;text-align:", ";", ";", ";"], props => props.isCentered && 'center', sizeStyles$2, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$2, props));
|
|
1265
1725
|
StyledTileDescription.defaultProps = {
|
|
1266
1726
|
theme: reactTheming.DEFAULT_THEME
|
|
1267
1727
|
};
|
|
1268
1728
|
|
|
1729
|
+
const COMPONENT_ID$1 = 'forms.tile_icon';
|
|
1730
|
+
const colorStyles = _ref => {
|
|
1731
|
+
let {
|
|
1732
|
+
theme
|
|
1733
|
+
} = _ref;
|
|
1734
|
+
const options = {
|
|
1735
|
+
theme,
|
|
1736
|
+
variable: 'foreground.subtle'
|
|
1737
|
+
};
|
|
1738
|
+
const color = reactTheming.getColor(options);
|
|
1739
|
+
const hoverColor = reactTheming.getColor({
|
|
1740
|
+
...options,
|
|
1741
|
+
dark: {
|
|
1742
|
+
offset: -100
|
|
1743
|
+
},
|
|
1744
|
+
light: {
|
|
1745
|
+
offset: 100
|
|
1746
|
+
}
|
|
1747
|
+
});
|
|
1748
|
+
const activeColor = reactTheming.getColor({
|
|
1749
|
+
...options,
|
|
1750
|
+
dark: {
|
|
1751
|
+
offset: -200
|
|
1752
|
+
},
|
|
1753
|
+
light: {
|
|
1754
|
+
offset: 200
|
|
1755
|
+
}
|
|
1756
|
+
});
|
|
1757
|
+
const checkedColor = reactTheming.getColor({
|
|
1758
|
+
theme,
|
|
1759
|
+
variable: 'foreground.onEmphasis'
|
|
1760
|
+
});
|
|
1761
|
+
const disabledColor = reactTheming.getColor({
|
|
1762
|
+
theme,
|
|
1763
|
+
variable: 'foreground.disabled'
|
|
1764
|
+
});
|
|
1765
|
+
return styled.css(["color:", ";", ":hover &&{color:", ";}", ":active &&{color:", ";}", ":has(:checked) &&{color:", ";}", "[aria-disabled='true'] &&{color:", ";}"], color, StyledTile, hoverColor, StyledTile, activeColor, StyledTile, checkedColor, StyledTile, disabledColor);
|
|
1766
|
+
};
|
|
1767
|
+
const sizeStyles$1 = _ref2 => {
|
|
1768
|
+
let {
|
|
1769
|
+
theme,
|
|
1770
|
+
isCentered
|
|
1771
|
+
} = _ref2;
|
|
1772
|
+
const iconSize = polished.math(`${theme.iconSizes.md} * 2`);
|
|
1773
|
+
let position;
|
|
1774
|
+
let top;
|
|
1775
|
+
let horizontal;
|
|
1776
|
+
if (!isCentered) {
|
|
1777
|
+
position = 'absolute';
|
|
1778
|
+
top = `${theme.space.base * 6}px`;
|
|
1779
|
+
horizontal = `${theme.space.base * 5}px`;
|
|
1780
|
+
}
|
|
1781
|
+
return styled.css(["position:", ";top:", ";", ":", ";line-height:0;& > *{width:", ";height:", ";}"], position, top, theme.rtl ? 'right' : 'left', horizontal, iconSize, iconSize);
|
|
1782
|
+
};
|
|
1783
|
+
const StyledTileIcon = styled__default.default.span.attrs({
|
|
1784
|
+
'data-garden-id': COMPONENT_ID$1,
|
|
1785
|
+
'data-garden-version': '9.0.0-next.14'
|
|
1786
|
+
}).withConfig({
|
|
1787
|
+
displayName: "StyledTileIcon",
|
|
1788
|
+
componentId: "sc-1wazhg4-0"
|
|
1789
|
+
})(["display:block;transition:color 0.25s ease-in-out;text-align:center;", ";", ";", ";"], sizeStyles$1, colorStyles, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$1, props));
|
|
1790
|
+
StyledTileIcon.defaultProps = {
|
|
1791
|
+
theme: reactTheming.DEFAULT_THEME
|
|
1792
|
+
};
|
|
1793
|
+
|
|
1269
1794
|
const StyledTileInput = styled__default.default.input.withConfig({
|
|
1270
1795
|
displayName: "StyledTileInput",
|
|
1271
1796
|
componentId: "sc-1nq2m6q-0"
|
|
1272
|
-
})(["position:absolute;
|
|
1797
|
+
})(["position:absolute;top:0;left:0;opacity:0;z-index:1;margin:0;cursor:", ";width:100%;height:100%;"], props => props.disabled ? 'default' : 'pointer');
|
|
1273
1798
|
StyledTileInput.defaultProps = {
|
|
1274
1799
|
theme: reactTheming.DEFAULT_THEME
|
|
1275
1800
|
};
|
|
1276
1801
|
|
|
1277
1802
|
const COMPONENT_ID = 'forms.tile_label';
|
|
1278
|
-
const sizeStyles =
|
|
1279
|
-
let
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
}
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
}
|
|
1289
|
-
return styled.css(["margin-top:", ";margin-", ":", ";"], marginTop, marginDirection, marginValue);
|
|
1803
|
+
const sizeStyles = _ref => {
|
|
1804
|
+
let {
|
|
1805
|
+
theme,
|
|
1806
|
+
isCentered
|
|
1807
|
+
} = _ref;
|
|
1808
|
+
const marginTop = isCentered ? `${theme.space.base * 2}px` : 0;
|
|
1809
|
+
const marginHorizontal = isCentered ? undefined : polished.math(`(${theme.iconSizes.md} * 2) + ${theme.space.base * 5}px`);
|
|
1810
|
+
const fontSize = theme.fontSizes.md;
|
|
1811
|
+
const lineHeight = reactTheming.getLineHeight(theme.space.base * 5, fontSize);
|
|
1812
|
+
return styled.css(["margin-top:", ";margin-", ":", ";line-height:", ";font-size:", ";"], marginTop, theme.rtl ? 'right' : 'left', marginHorizontal, lineHeight, fontSize);
|
|
1290
1813
|
};
|
|
1291
1814
|
const StyledTileLabel = styled__default.default.span.attrs({
|
|
1292
1815
|
'data-garden-id': COMPONENT_ID,
|
|
1293
|
-
'data-garden-version': '9.0.0-next.
|
|
1816
|
+
'data-garden-version': '9.0.0-next.14'
|
|
1294
1817
|
}).withConfig({
|
|
1295
1818
|
displayName: "StyledTileLabel",
|
|
1296
1819
|
componentId: "sc-1mypv27-0"
|
|
1297
|
-
})(["display:block;text-align:", ";
|
|
1820
|
+
})(["display:block;text-align:", ";font-weight:", ";", ";", ";"], props => props.isCentered && 'center', props => props.theme.fontWeights.semibold, sizeStyles, props => reactTheming.retrieveComponentStyles(COMPONENT_ID, props));
|
|
1298
1821
|
StyledTileLabel.defaultProps = {
|
|
1299
1822
|
theme: reactTheming.DEFAULT_THEME
|
|
1300
1823
|
};
|
|
@@ -1839,31 +2362,19 @@ Toggle.propTypes = {
|
|
|
1839
2362
|
isCompact: PropTypes__default.default.bool
|
|
1840
2363
|
};
|
|
1841
2364
|
|
|
1842
|
-
var _path$k;
|
|
1843
|
-
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); }
|
|
1844
|
-
var SvgChevronDownStroke = function SvgChevronDownStroke(props) {
|
|
1845
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$l({
|
|
1846
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1847
|
-
width: 16,
|
|
1848
|
-
height: 16,
|
|
1849
|
-
focusable: "false",
|
|
1850
|
-
viewBox: "0 0 16 16",
|
|
1851
|
-
"aria-hidden": "true"
|
|
1852
|
-
}, props), _path$k || (_path$k = /*#__PURE__*/React__namespace.createElement("path", {
|
|
1853
|
-
fill: "currentColor",
|
|
1854
|
-
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"
|
|
1855
|
-
})));
|
|
1856
|
-
};
|
|
1857
|
-
|
|
1858
2365
|
const StartIconComponent = _ref => {
|
|
1859
2366
|
let {
|
|
1860
2367
|
isDisabled,
|
|
2368
|
+
isFocused,
|
|
2369
|
+
isHovered,
|
|
1861
2370
|
isRotated,
|
|
1862
2371
|
...props
|
|
1863
2372
|
} = _ref;
|
|
1864
2373
|
return React__namespace.default.createElement(StyledTextMediaFigure, Object.assign({
|
|
1865
2374
|
$position: "start",
|
|
1866
2375
|
$isDisabled: isDisabled,
|
|
2376
|
+
$isFocused: isFocused,
|
|
2377
|
+
$isHovered: isHovered,
|
|
1867
2378
|
$isRotated: isRotated
|
|
1868
2379
|
}, props));
|
|
1869
2380
|
};
|
|
@@ -1873,12 +2384,16 @@ const StartIcon = StartIconComponent;
|
|
|
1873
2384
|
const EndIconComponent = _ref => {
|
|
1874
2385
|
let {
|
|
1875
2386
|
isDisabled,
|
|
2387
|
+
isFocused,
|
|
2388
|
+
isHovered,
|
|
1876
2389
|
isRotated,
|
|
1877
2390
|
...props
|
|
1878
2391
|
} = _ref;
|
|
1879
2392
|
return React__namespace.default.createElement(StyledTextMediaFigure, Object.assign({
|
|
1880
2393
|
$position: "end",
|
|
1881
2394
|
$isDisabled: isDisabled,
|
|
2395
|
+
$isFocused: isFocused,
|
|
2396
|
+
$isHovered: isHovered,
|
|
1882
2397
|
$isRotated: isRotated
|
|
1883
2398
|
}, props));
|
|
1884
2399
|
};
|
|
@@ -1952,6 +2467,7 @@ const Select = React__namespace.default.forwardRef((_ref, ref) => {
|
|
|
1952
2467
|
return React__namespace.default.createElement(StyledSelectWrapper, {
|
|
1953
2468
|
isCompact: isCompact,
|
|
1954
2469
|
isBare: isBare,
|
|
2470
|
+
isDisabled: disabled,
|
|
1955
2471
|
validation: validation,
|
|
1956
2472
|
focusInset: focusInset
|
|
1957
2473
|
}, React__namespace.default.createElement(StyledSelect, combinedProps), !isBare && React__namespace.default.createElement(FauxInput.EndIcon, {
|
|
@@ -1990,9 +2506,7 @@ const TileComponent = React__namespace.default.forwardRef((_ref, ref) => {
|
|
|
1990
2506
|
}
|
|
1991
2507
|
return React__namespace.default.createElement(StyledTile, Object.assign({
|
|
1992
2508
|
ref: ref,
|
|
1993
|
-
"aria-disabled": disabled
|
|
1994
|
-
isDisabled: disabled,
|
|
1995
|
-
isSelected: tilesContext && tilesContext.value === value
|
|
2509
|
+
"aria-disabled": disabled
|
|
1996
2510
|
}, props), children, React__namespace.default.createElement(StyledTileInput, Object.assign({}, inputProps, {
|
|
1997
2511
|
disabled: disabled,
|
|
1998
2512
|
value: value,
|
|
@@ -2645,7 +3159,8 @@ const FileComponent = React.forwardRef((_ref, ref) => {
|
|
|
2645
3159
|
validation: validation,
|
|
2646
3160
|
ref: ref
|
|
2647
3161
|
}), validationType && React__namespace.default.createElement(StyledFileIcon, {
|
|
2648
|
-
$isCompact: isCompact
|
|
3162
|
+
$isCompact: isCompact,
|
|
3163
|
+
$validation: validation
|
|
2649
3164
|
}, isCompact ? fileIconsCompact[validationType] : fileIconsDefault[validationType]), React.Children.map(children, child => typeof child === 'string' ? React__namespace.default.createElement("span", null, child) : child)));
|
|
2650
3165
|
});
|
|
2651
3166
|
FileComponent.displayName = 'File';
|