@zendeskgarden/react-forms 9.0.0-next.2 → 9.0.0-next.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/dist/esm/elements/Checkbox.js +97 -0
- package/dist/esm/elements/FileUpload.js +75 -0
- package/dist/esm/elements/Input.js +93 -0
- package/dist/esm/elements/MediaInput.js +156 -0
- package/dist/esm/elements/Radio.js +81 -0
- package/dist/esm/elements/Range.js +108 -0
- package/dist/esm/elements/Select.js +98 -0
- package/dist/esm/elements/Textarea.js +170 -0
- package/dist/esm/elements/Toggle.js +81 -0
- package/dist/esm/elements/common/Field.js +97 -0
- package/dist/esm/elements/common/Fieldset.js +73 -0
- package/dist/esm/elements/common/Hint.js +92 -0
- package/dist/esm/elements/common/Label.js +134 -0
- package/dist/esm/elements/common/Legend.js +63 -0
- package/dist/esm/elements/common/Message.js +113 -0
- package/dist/esm/elements/faux-input/FauxInput.js +100 -0
- package/dist/esm/elements/faux-input/components/EndIcon.js +72 -0
- package/dist/esm/elements/faux-input/components/StartIcon.js +72 -0
- package/dist/esm/elements/file-list/FileList.js +66 -0
- package/dist/esm/elements/file-list/components/Close.js +75 -0
- package/dist/esm/elements/file-list/components/Delete.js +75 -0
- package/dist/esm/elements/file-list/components/File.js +95 -0
- package/dist/esm/elements/file-list/components/Item.js +64 -0
- package/dist/esm/elements/file-list/utils.js +50 -0
- package/dist/esm/elements/input-group/InputGroup.js +75 -0
- package/dist/esm/elements/tiles/Tiles.js +64 -0
- package/dist/esm/elements/tiles/components/Description.js +64 -0
- package/dist/esm/elements/tiles/components/Icon.js +64 -0
- package/dist/esm/elements/tiles/components/Label.js +73 -0
- package/dist/esm/elements/tiles/components/Tile.js +89 -0
- package/dist/esm/index.js +26 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/12/check-circle-stroke.svg.js +33 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/12/check-sm-fill.svg.js +29 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/12/circle-sm-fill.svg.js +27 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/12/dash-fill.svg.js +27 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/12/file-document-stroke.svg.js +27 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/12/file-error-stroke.svg.js +27 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/12/file-generic-stroke.svg.js +26 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/12/file-image-stroke.svg.js +33 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/12/file-pdf-stroke.svg.js +35 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/12/file-presentation-stroke.svg.js +26 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/12/file-spreadsheet-stroke.svg.js +27 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/12/file-zip-stroke.svg.js +27 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/12/trash-stroke.svg.js +27 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/12/x-stroke.svg.js +26 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/alert-error-stroke.svg.js +37 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/alert-warning-stroke.svg.js +32 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/check-circle-stroke.svg.js +33 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/chevron-down-stroke.svg.js +25 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/circle-sm-fill.svg.js +27 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/file-document-stroke.svg.js +27 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/file-error-stroke.svg.js +27 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/file-generic-stroke.svg.js +26 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/file-image-stroke.svg.js +32 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/file-pdf-stroke.svg.js +35 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/file-presentation-stroke.svg.js +26 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/file-spreadsheet-stroke.svg.js +27 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/file-zip-stroke.svg.js +27 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/trash-stroke.svg.js +27 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/x-stroke.svg.js +26 -0
- package/dist/esm/styled/checkbox/StyledCheckHint.js +23 -0
- package/dist/esm/styled/checkbox/StyledCheckInput.js +78 -0
- package/dist/esm/styled/checkbox/StyledCheckLabel.js +23 -0
- package/dist/esm/styled/checkbox/StyledCheckMessage.js +23 -0
- package/dist/esm/styled/checkbox/StyledCheckSvg.js +25 -0
- package/dist/esm/styled/checkbox/StyledDashSvg.js +25 -0
- package/dist/esm/styled/common/StyledField.js +22 -0
- package/dist/esm/styled/common/StyledFieldset.js +24 -0
- package/dist/esm/styled/common/StyledHint.js +25 -0
- package/dist/esm/styled/common/StyledLabel.js +26 -0
- package/dist/esm/styled/common/StyledLegend.js +24 -0
- package/dist/esm/styled/common/StyledMessage.js +57 -0
- package/dist/esm/styled/common/StyledMessageIcon.js +45 -0
- package/dist/esm/styled/file-list/StyledFile.js +97 -0
- package/dist/esm/styled/file-list/StyledFileClose.js +25 -0
- package/dist/esm/styled/file-list/StyledFileDelete.js +26 -0
- package/dist/esm/styled/file-list/StyledFileIcon.js +42 -0
- package/dist/esm/styled/file-list/StyledFileList.js +22 -0
- package/dist/esm/styled/file-list/StyledFileListItem.js +24 -0
- package/dist/esm/styled/file-upload/StyledFileUpload.js +116 -0
- package/dist/esm/styled/input-group/StyledInputGroup.js +35 -0
- package/dist/esm/styled/radio/StyledRadioHint.js +24 -0
- package/dist/esm/styled/radio/StyledRadioInput.js +122 -0
- package/dist/esm/styled/radio/StyledRadioLabel.js +30 -0
- package/dist/esm/styled/radio/StyledRadioMessage.js +24 -0
- package/dist/esm/styled/radio/StyledRadioSvg.js +25 -0
- package/dist/esm/styled/range/StyledRangeInput.js +210 -0
- package/dist/esm/styled/select/StyledSelect.js +60 -0
- package/dist/esm/styled/select/StyledSelectWrapper.js +32 -0
- package/dist/esm/styled/text/StyledTextFauxInput.js +69 -0
- package/dist/esm/styled/text/StyledTextInput.js +152 -0
- package/dist/esm/styled/text/StyledTextMediaFigure.js +68 -0
- package/dist/esm/styled/text/StyledTextMediaInput.js +24 -0
- package/dist/esm/styled/text/StyledTextarea.js +33 -0
- package/dist/esm/styled/tiles/StyledTile.js +114 -0
- package/dist/esm/styled/tiles/StyledTileDescription.js +34 -0
- package/dist/esm/styled/tiles/StyledTileIcon.js +77 -0
- package/dist/esm/styled/tiles/StyledTileInput.js +18 -0
- package/dist/esm/styled/tiles/StyledTileLabel.js +34 -0
- package/dist/esm/styled/toggle/StyledToggleHint.js +24 -0
- package/dist/esm/styled/toggle/StyledToggleInput.js +65 -0
- package/dist/esm/styled/toggle/StyledToggleLabel.js +28 -0
- package/dist/esm/styled/toggle/StyledToggleMessage.js +25 -0
- package/dist/esm/styled/toggle/StyledToggleSvg.js +23 -0
- package/dist/esm/types/index.js +11 -0
- package/dist/esm/utils/useFieldContext.js +15 -0
- package/dist/esm/utils/useFieldsetContext.js +15 -0
- package/dist/esm/utils/useFileContext.js +14 -0
- package/dist/esm/utils/useInputContext.js +14 -0
- package/dist/esm/utils/useInputGroupContext.js +14 -0
- package/dist/esm/utils/useTilesContext.js +14 -0
- package/dist/index.cjs.js +1235 -915
- package/dist/typings/elements/common/Field.d.ts +10 -9
- package/dist/typings/elements/common/Hint.d.ts +2 -0
- package/dist/typings/elements/common/Label.d.ts +2 -0
- package/dist/typings/elements/common/Message.d.ts +2 -0
- package/dist/typings/elements/faux-input/FauxInput.d.ts +1 -11
- package/dist/typings/elements/faux-input/components/EndIcon.d.ts +1 -1
- package/dist/typings/elements/faux-input/components/StartIcon.d.ts +1 -1
- package/dist/typings/index.d.ts +3 -4
- package/dist/typings/styled/file-list/StyledFileIcon.d.ts +8 -2
- package/dist/typings/styled/index.d.ts +0 -4
- package/dist/typings/styled/select/StyledSelect.d.ts +1 -4
- package/dist/typings/styled/select/StyledSelectWrapper.d.ts +3 -1
- package/dist/typings/styled/text/StyledTextFauxInput.d.ts +0 -4
- package/dist/typings/styled/text/StyledTextMediaFigure.d.ts +7 -7
- package/dist/typings/styled/text/StyledTextarea.d.ts +1 -1
- package/dist/typings/styled/tiles/StyledTile.d.ts +4 -7
- package/dist/typings/types/index.d.ts +6 -33
- package/dist/typings/utils/useFieldContext.d.ts +1 -2
- package/package.json +8 -9
- package/dist/index.esm.js +0 -2921
- package/dist/typings/elements/MultiThumbRange.d.ts +0 -14
- package/dist/typings/styled/range/StyledSlider.d.ts +0 -10
- package/dist/typings/styled/range/StyledSliderThumb.d.ts +0 -13
- package/dist/typings/styled/range/StyledSliderTrack.d.ts +0 -14
- package/dist/typings/styled/range/StyledSliderTrackRail.d.ts +0 -11
package/dist/index.cjs.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
* Copyright Zendesk, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
+
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
*/
|
|
8
7
|
'use strict';
|
|
9
8
|
|
|
10
9
|
var React = require('react');
|
|
@@ -12,10 +11,10 @@ var containerField = require('@zendeskgarden/container-field');
|
|
|
12
11
|
var styled = require('styled-components');
|
|
13
12
|
var reactTheming = require('@zendeskgarden/react-theming');
|
|
14
13
|
var polished = require('polished');
|
|
14
|
+
var server = require('react-dom/server');
|
|
15
15
|
var PropTypes = require('prop-types');
|
|
16
16
|
var containerUtilities = require('@zendeskgarden/container-utilities');
|
|
17
17
|
var reactMergeRefs = require('react-merge-refs');
|
|
18
|
-
var containerSlider = require('@zendeskgarden/container-slider');
|
|
19
18
|
|
|
20
19
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
21
20
|
|
|
@@ -41,91 +40,82 @@ var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
|
41
40
|
var styled__default = /*#__PURE__*/_interopDefault(styled);
|
|
42
41
|
var PropTypes__default = /*#__PURE__*/_interopDefault(PropTypes);
|
|
43
42
|
|
|
44
|
-
function _extends$t() {
|
|
45
|
-
_extends$t = Object.assign ? Object.assign.bind() : function (target) {
|
|
46
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
47
|
-
var source = arguments[i];
|
|
48
|
-
for (var key in source) {
|
|
49
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
50
|
-
target[key] = source[key];
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
return target;
|
|
55
|
-
};
|
|
56
|
-
return _extends$t.apply(this, arguments);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
43
|
const FieldContext = React.createContext(undefined);
|
|
60
44
|
const useFieldContext = () => {
|
|
61
45
|
const fieldContext = React.useContext(FieldContext);
|
|
62
46
|
return fieldContext;
|
|
63
47
|
};
|
|
64
48
|
|
|
65
|
-
const COMPONENT_ID$
|
|
49
|
+
const COMPONENT_ID$G = 'forms.field';
|
|
66
50
|
const StyledField = styled__default.default.div.attrs({
|
|
67
|
-
'data-garden-id': COMPONENT_ID$
|
|
68
|
-
'data-garden-version': '9.0.0-next.
|
|
51
|
+
'data-garden-id': COMPONENT_ID$G,
|
|
52
|
+
'data-garden-version': '9.0.0-next.21'
|
|
69
53
|
}).withConfig({
|
|
70
54
|
displayName: "StyledField",
|
|
71
55
|
componentId: "sc-12gzfsu-0"
|
|
72
|
-
})(["position:relative;direction:", ";margin:0;border:0;padding:0;font-size:0;", ";"], props => props.theme.rtl ? 'rtl' : 'ltr', props => reactTheming.retrieveComponentStyles(COMPONENT_ID$
|
|
56
|
+
})(["position:relative;direction:", ";margin:0;border:0;padding:0;font-size:0;", ";"], props => props.theme.rtl ? 'rtl' : 'ltr', props => reactTheming.retrieveComponentStyles(COMPONENT_ID$G, props));
|
|
73
57
|
StyledField.defaultProps = {
|
|
74
58
|
theme: reactTheming.DEFAULT_THEME
|
|
75
59
|
};
|
|
76
60
|
|
|
77
|
-
const COMPONENT_ID$
|
|
61
|
+
const COMPONENT_ID$F = 'forms.fieldset';
|
|
78
62
|
const StyledFieldset = styled__default.default(StyledField).attrs({
|
|
79
63
|
as: 'fieldset',
|
|
80
|
-
'data-garden-id': COMPONENT_ID$
|
|
81
|
-
'data-garden-version': '9.0.0-next.
|
|
64
|
+
'data-garden-id': COMPONENT_ID$F,
|
|
65
|
+
'data-garden-version': '9.0.0-next.21'
|
|
82
66
|
}).withConfig({
|
|
83
67
|
displayName: "StyledFieldset",
|
|
84
68
|
componentId: "sc-1vr4mxv-0"
|
|
85
|
-
})(["", "{margin-top:", "px;}", ";"], StyledField, props => props.theme.space.base * (props.isCompact ? 1 : 2), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$
|
|
69
|
+
})(["", "{margin-top:", "px;}", ";"], StyledField, props => props.theme.space.base * (props.isCompact ? 1 : 2), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$F, props));
|
|
86
70
|
StyledFieldset.defaultProps = {
|
|
87
71
|
theme: reactTheming.DEFAULT_THEME
|
|
88
72
|
};
|
|
89
73
|
|
|
90
|
-
const COMPONENT_ID$
|
|
74
|
+
const COMPONENT_ID$E = 'forms.input_label';
|
|
91
75
|
const StyledLabel = styled__default.default.label.attrs(props => ({
|
|
92
|
-
'data-garden-id': props['data-garden-id'] || COMPONENT_ID$
|
|
93
|
-
'data-garden-version': props['data-garden-version'] || '9.0.0-next.
|
|
76
|
+
'data-garden-id': props['data-garden-id'] || COMPONENT_ID$E,
|
|
77
|
+
'data-garden-version': props['data-garden-version'] || '9.0.0-next.21'
|
|
94
78
|
})).withConfig({
|
|
95
79
|
displayName: "StyledLabel",
|
|
96
80
|
componentId: "sc-2utmsz-0"
|
|
97
|
-
})(["direction:", ";vertical-align:middle;line-height:", ";color:", ";font-size:", ";font-weight:", ";&[hidden]{display:", ";vertical-align:", ";text-indent:", ";font-size:", ";", ";}", ";"], props => props.theme.rtl && 'rtl', props => reactTheming.getLineHeight(props.theme.space.base * 5, props.theme.fontSizes.md), props =>
|
|
81
|
+
})(["direction:", ";vertical-align:middle;line-height:", ";color:", ";font-size:", ";font-weight:", ";&[hidden]{display:", ";vertical-align:", ";text-indent:", ";font-size:", ";", ";}", ";"], props => props.theme.rtl && 'rtl', props => reactTheming.getLineHeight(props.theme.space.base * 5, props.theme.fontSizes.md), props => reactTheming.getColor({
|
|
82
|
+
theme: props.theme,
|
|
83
|
+
variable: 'foreground.default'
|
|
84
|
+
}), props => props.theme.fontSizes.md, props => props.isRegular ? props.theme.fontWeights.regular : props.theme.fontWeights.semibold, props => props.isRadio ? 'inline-block' : 'inline', props => props.isRadio && 'top', props => props.isRadio && '-100%', props => props.isRadio && '0', props => !props.isRadio && polished.hideVisually(), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$E, props));
|
|
98
85
|
StyledLabel.defaultProps = {
|
|
99
86
|
theme: reactTheming.DEFAULT_THEME
|
|
100
87
|
};
|
|
101
88
|
|
|
102
|
-
const COMPONENT_ID$
|
|
89
|
+
const COMPONENT_ID$D = 'forms.fieldset_legend';
|
|
103
90
|
const StyledLegend = styled__default.default(StyledLabel).attrs({
|
|
104
91
|
as: 'legend',
|
|
105
|
-
'data-garden-id': COMPONENT_ID$
|
|
106
|
-
'data-garden-version': '9.0.0-next.
|
|
92
|
+
'data-garden-id': COMPONENT_ID$D,
|
|
93
|
+
'data-garden-version': '9.0.0-next.21'
|
|
107
94
|
}).withConfig({
|
|
108
95
|
displayName: "StyledLegend",
|
|
109
96
|
componentId: "sc-6s0zwq-0"
|
|
110
|
-
})(["padding:0;", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$
|
|
97
|
+
})(["padding:0;", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$D, props));
|
|
111
98
|
StyledLegend.defaultProps = {
|
|
112
99
|
theme: reactTheming.DEFAULT_THEME
|
|
113
100
|
};
|
|
114
101
|
|
|
115
|
-
const COMPONENT_ID$
|
|
102
|
+
const COMPONENT_ID$C = 'forms.input_hint';
|
|
116
103
|
const StyledHint = styled__default.default.div.attrs(props => ({
|
|
117
|
-
'data-garden-id': props['data-garden-id'] || COMPONENT_ID$
|
|
118
|
-
'data-garden-version': props['data-garden-version'] || '9.0.0-next.
|
|
104
|
+
'data-garden-id': props['data-garden-id'] || COMPONENT_ID$C,
|
|
105
|
+
'data-garden-version': props['data-garden-version'] || '9.0.0-next.21'
|
|
119
106
|
})).withConfig({
|
|
120
107
|
displayName: "StyledHint",
|
|
121
108
|
componentId: "sc-17c2wu8-0"
|
|
122
|
-
})(["direction:", ";display:block;vertical-align:middle;line-height:", ";color:", ";font-size:", ";", ";"], props => props.theme.rtl && 'rtl', props => reactTheming.getLineHeight(props.theme.space.base * 5, props.theme.fontSizes.md), props => reactTheming.getColor(
|
|
109
|
+
})(["direction:", ";display:block;vertical-align:middle;line-height:", ";color:", ";font-size:", ";", ";"], props => props.theme.rtl && 'rtl', props => reactTheming.getLineHeight(props.theme.space.base * 5, props.theme.fontSizes.md), props => reactTheming.getColor({
|
|
110
|
+
theme: props.theme,
|
|
111
|
+
variable: 'foreground.subtle'
|
|
112
|
+
}), props => props.theme.fontSizes.md, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$C, props));
|
|
123
113
|
StyledHint.defaultProps = {
|
|
124
114
|
theme: reactTheming.DEFAULT_THEME
|
|
125
115
|
};
|
|
126
116
|
|
|
127
117
|
var _g$2, _circle$5;
|
|
128
|
-
function _extends$s() { _extends$s = Object.assign ? Object.assign.bind() : function (
|
|
118
|
+
function _extends$s() { return _extends$s = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$s.apply(null, arguments); }
|
|
129
119
|
var SvgAlertErrorStroke = function SvgAlertErrorStroke(props) {
|
|
130
120
|
return /*#__PURE__*/React__namespace.createElement("svg", _extends$s({
|
|
131
121
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -153,7 +143,7 @@ var SvgAlertErrorStroke = function SvgAlertErrorStroke(props) {
|
|
|
153
143
|
};
|
|
154
144
|
|
|
155
145
|
var _path$n, _circle$4;
|
|
156
|
-
function _extends$r() { _extends$r = Object.assign ? Object.assign.bind() : function (
|
|
146
|
+
function _extends$r() { return _extends$r = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$r.apply(null, arguments); }
|
|
157
147
|
var SvgAlertWarningStroke = function SvgAlertWarningStroke(props) {
|
|
158
148
|
return /*#__PURE__*/React__namespace.createElement("svg", _extends$r({
|
|
159
149
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -176,7 +166,7 @@ var SvgAlertWarningStroke = function SvgAlertWarningStroke(props) {
|
|
|
176
166
|
};
|
|
177
167
|
|
|
178
168
|
var _g$1;
|
|
179
|
-
function _extends$q() { _extends$q = Object.assign ? Object.assign.bind() : function (
|
|
169
|
+
function _extends$q() { return _extends$q = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$q.apply(null, arguments); }
|
|
180
170
|
var SvgCheckCircleStroke$1 = function SvgCheckCircleStroke(props) {
|
|
181
171
|
return /*#__PURE__*/React__namespace.createElement("svg", _extends$q({
|
|
182
172
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -217,138 +207,215 @@ const MessageIcon = _ref => {
|
|
|
217
207
|
}
|
|
218
208
|
return retVal;
|
|
219
209
|
};
|
|
220
|
-
const COMPONENT_ID$
|
|
210
|
+
const COMPONENT_ID$B = 'forms.input_message_icon';
|
|
221
211
|
const StyledMessageIcon = styled__default.default(MessageIcon).attrs({
|
|
222
|
-
'data-garden-id': COMPONENT_ID$
|
|
223
|
-
'data-garden-version': '9.0.0-next.
|
|
212
|
+
'data-garden-id': COMPONENT_ID$B,
|
|
213
|
+
'data-garden-version': '9.0.0-next.21',
|
|
224
214
|
'aria-hidden': null
|
|
225
215
|
}).withConfig({
|
|
226
216
|
displayName: "StyledMessageIcon",
|
|
227
217
|
componentId: "sc-1ph2gba-0"
|
|
228
|
-
})(["width:", ";height:", ";", ";"], props => props.theme.iconSizes.md, props => props.theme.iconSizes.md, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$
|
|
218
|
+
})(["width:", ";height:", ";", ";"], props => props.theme.iconSizes.md, props => props.theme.iconSizes.md, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$B, props));
|
|
229
219
|
StyledMessageIcon.defaultProps = {
|
|
230
220
|
theme: reactTheming.DEFAULT_THEME
|
|
231
221
|
};
|
|
232
222
|
|
|
233
|
-
const
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
223
|
+
const COMPONENT_ID$A = 'forms.input_message';
|
|
224
|
+
const colorStyles$d = _ref => {
|
|
225
|
+
let {
|
|
226
|
+
theme,
|
|
227
|
+
validation
|
|
228
|
+
} = _ref;
|
|
229
|
+
let variable;
|
|
230
|
+
if (validation === 'error') {
|
|
231
|
+
variable = 'foreground.danger';
|
|
232
|
+
} else if (validation === 'success') {
|
|
233
|
+
variable = 'foreground.success';
|
|
234
|
+
} else if (validation === 'warning') {
|
|
235
|
+
variable = 'foreground.warning';
|
|
243
236
|
} else {
|
|
244
|
-
|
|
237
|
+
variable = 'foreground.subtle';
|
|
245
238
|
}
|
|
246
|
-
|
|
239
|
+
const foregroundColor = reactTheming.getColor({
|
|
240
|
+
theme,
|
|
241
|
+
variable
|
|
242
|
+
});
|
|
243
|
+
return styled.css(["color:", ";"], foregroundColor);
|
|
244
|
+
};
|
|
245
|
+
const sizeStyles$g = _ref2 => {
|
|
246
|
+
let {
|
|
247
|
+
theme,
|
|
248
|
+
validation
|
|
249
|
+
} = _ref2;
|
|
250
|
+
const fontSize = theme.fontSizes.sm;
|
|
251
|
+
const lineHeight = reactTheming.getLineHeight(theme.iconSizes.md, theme.fontSizes.sm);
|
|
252
|
+
const marginTop = `${theme.space.base}px`;
|
|
253
|
+
const paddingHorizontal = validation ? polished.math(`${theme.space.base * 2} + ${theme.iconSizes.md}`) : undefined;
|
|
254
|
+
return styled.css(["padding-", ":", ";line-height:", ";font-size:", ";", ":not([hidden]) + &{margin-top:", ";}"], theme.rtl ? 'right' : 'left', paddingHorizontal, lineHeight, fontSize, StyledLabel, marginTop);
|
|
247
255
|
};
|
|
248
|
-
const COMPONENT_ID$E = 'forms.input_message';
|
|
249
256
|
const StyledMessage = styled__default.default.div.attrs(props => ({
|
|
250
|
-
'data-garden-id': props['data-garden-id'] || COMPONENT_ID$
|
|
251
|
-
'data-garden-version': props['data-garden-version'] || '9.0.0-next.
|
|
257
|
+
'data-garden-id': props['data-garden-id'] || COMPONENT_ID$A,
|
|
258
|
+
'data-garden-version': props['data-garden-version'] || '9.0.0-next.21'
|
|
252
259
|
})).withConfig({
|
|
253
260
|
displayName: "StyledMessage",
|
|
254
261
|
componentId: "sc-30hgg7-0"
|
|
255
|
-
})(["direction:", ";display:inline-block;position:relative;vertical-align:middle;
|
|
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));
|
|
256
263
|
StyledMessage.defaultProps = {
|
|
257
264
|
theme: reactTheming.DEFAULT_THEME
|
|
258
265
|
};
|
|
259
266
|
|
|
260
|
-
|
|
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
|
+
|
|
283
|
+
const COMPONENT_ID$z = 'forms.input';
|
|
261
284
|
const isInvalid = validation => {
|
|
262
285
|
return validation === 'warning' || validation === 'error';
|
|
263
286
|
};
|
|
264
|
-
const colorStyles$c =
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
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
|
+
});
|
|
268
303
|
let borderColor;
|
|
269
304
|
let hoverBorderColor;
|
|
305
|
+
let borderVariable;
|
|
270
306
|
let focusBorderColor;
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
hue = 'warningHue';
|
|
279
|
-
focusRingShade = 700;
|
|
280
|
-
} else if (props.validation === 'error') {
|
|
281
|
-
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';
|
|
282
314
|
}
|
|
283
|
-
borderColor = reactTheming.getColor(
|
|
315
|
+
borderColor = reactTheming.getColor({
|
|
316
|
+
theme,
|
|
317
|
+
variable: borderVariable
|
|
318
|
+
});
|
|
284
319
|
hoverBorderColor = borderColor;
|
|
285
320
|
focusBorderColor = borderColor;
|
|
286
|
-
focusRingHue = hue;
|
|
287
321
|
} else {
|
|
288
|
-
borderColor = reactTheming.getColor(
|
|
289
|
-
|
|
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
|
+
});
|
|
290
337
|
focusBorderColor = hoverBorderColor;
|
|
291
338
|
}
|
|
292
|
-
const
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
const
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
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,
|
|
364
|
+
color: {
|
|
365
|
+
variable: borderVariable
|
|
366
|
+
},
|
|
310
367
|
styles: {
|
|
311
368
|
borderColor: focusBorderColor
|
|
312
|
-
}
|
|
313
|
-
|
|
369
|
+
},
|
|
370
|
+
condition: !isBare
|
|
371
|
+
}), reactTheming.focusStyles({
|
|
372
|
+
theme
|
|
373
|
+
}), disabledBorderColor, disabledBackgroundColor, disabledForegroundColor);
|
|
314
374
|
};
|
|
315
|
-
const sizeStyles$f =
|
|
316
|
-
|
|
317
|
-
|
|
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`;
|
|
318
383
|
let height;
|
|
319
384
|
let paddingVertical;
|
|
320
385
|
let browseFontSize;
|
|
321
386
|
let swatchHeight;
|
|
322
|
-
if (
|
|
323
|
-
height = `${
|
|
324
|
-
paddingVertical = `${
|
|
325
|
-
browseFontSize = polished.math(`${
|
|
326
|
-
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`;
|
|
327
392
|
} else {
|
|
328
|
-
height = `${
|
|
329
|
-
paddingVertical = `${
|
|
330
|
-
browseFontSize =
|
|
331
|
-
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`;
|
|
332
397
|
}
|
|
333
|
-
const lineHeight = polished.math(`${height} - (${paddingVertical} * 2) - (${
|
|
334
|
-
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)}`;
|
|
335
400
|
const swatchMarginVertical = polished.math(`(${lineHeight} - ${swatchHeight}) / 2`);
|
|
336
401
|
const swatchMarginHorizontal = polished.math(`${paddingVertical} + ${swatchMarginVertical} - ${paddingHorizontal}`);
|
|
337
|
-
|
|
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));
|
|
338
405
|
};
|
|
339
406
|
const StyledTextInput = styled__default.default.input.attrs(props => ({
|
|
340
|
-
'data-garden-id': COMPONENT_ID$
|
|
341
|
-
'data-garden-version': '9.0.0-next.
|
|
407
|
+
'data-garden-id': COMPONENT_ID$z,
|
|
408
|
+
'data-garden-version': '9.0.0-next.21',
|
|
342
409
|
'aria-invalid': isInvalid(props.validation)
|
|
343
410
|
})).withConfig({
|
|
344
411
|
displayName: "StyledTextInput",
|
|
345
|
-
componentId: "sc-
|
|
346
|
-
})(["appearance:none;transition:border-color 0.25s ease-in-out,box-shadow 0.1s ease-in-out,background-color 0.25s ease-in-out,color 0.25s ease-in-out,z-index 0.25s ease-in-out;direction:", ";border:", ";border-radius:", ";width:100%;box-sizing:border-box;vertical-align:middle;font-family:inherit;&::-ms-browse{border-radius:", ";}&::-ms-clear,&::-ms-reveal{display:none;}&::-moz-color-swatch{border:none;border-radius:", ";}&::-webkit-color-swatch{border:none;border-radius:", ";}&::-webkit-color-swatch-wrapper{padding:0;}&::-webkit-clear-button,&::-webkit-inner-spin-button,&::-webkit-search-cancel-button,&::-webkit-search-results-button{display:none;}&::-webkit-datetime-edit{direction:", ";line-height:1;}
|
|
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));
|
|
347
414
|
StyledTextInput.defaultProps = {
|
|
348
415
|
theme: reactTheming.DEFAULT_THEME
|
|
349
416
|
};
|
|
350
417
|
|
|
351
|
-
const COMPONENT_ID$
|
|
418
|
+
const COMPONENT_ID$y = 'forms.textarea';
|
|
352
419
|
const hiddenStyles = `
|
|
353
420
|
visibility: hidden;
|
|
354
421
|
position: absolute;
|
|
@@ -360,123 +427,145 @@ const hiddenStyles = `
|
|
|
360
427
|
`;
|
|
361
428
|
const StyledTextarea = styled__default.default(StyledTextInput).attrs({
|
|
362
429
|
as: 'textarea',
|
|
363
|
-
'data-garden-id': COMPONENT_ID$
|
|
364
|
-
'data-garden-version': '9.0.0-next.
|
|
430
|
+
'data-garden-id': COMPONENT_ID$y,
|
|
431
|
+
'data-garden-version': '9.0.0-next.21'
|
|
365
432
|
}).withConfig({
|
|
366
433
|
displayName: "StyledTextarea",
|
|
367
434
|
componentId: "sc-wxschl-0"
|
|
368
|
-
})(["resize:", ";overflow:auto;", ";", ";"], props => props.isResizable ? 'vertical' : 'none', props => props.isHidden && hiddenStyles, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$
|
|
435
|
+
})(["resize:", ";overflow:auto;", ";", ";"], props => props.isResizable ? 'vertical' : 'none', props => props.isHidden && hiddenStyles, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$y, props));
|
|
369
436
|
StyledTextarea.defaultProps = {
|
|
370
437
|
theme: reactTheming.DEFAULT_THEME
|
|
371
438
|
};
|
|
372
439
|
|
|
373
|
-
const COMPONENT_ID$
|
|
374
|
-
const colorStyles$b =
|
|
375
|
-
let
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
440
|
+
const COMPONENT_ID$x = 'forms.media_figure';
|
|
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
|
+
}
|
|
380
472
|
}
|
|
381
|
-
return styled.css(["color:", ";"],
|
|
473
|
+
return styled.css(["color:", ";"], color);
|
|
382
474
|
};
|
|
383
475
|
const sizeStyles$e = props => {
|
|
384
476
|
const size = props.theme.iconSizes.md;
|
|
385
477
|
const marginFirst = `1px ${props.theme.space.base * 2}px auto 0`;
|
|
386
478
|
const marginLast = `1px 0 auto ${props.theme.space.base * 2}px`;
|
|
387
479
|
let margin;
|
|
388
|
-
if (props
|
|
480
|
+
if (props.$position === 'start') {
|
|
389
481
|
margin = props.theme.rtl ? marginLast : marginFirst;
|
|
390
482
|
} else {
|
|
391
483
|
margin = props.theme.rtl ? marginFirst : marginLast;
|
|
392
484
|
}
|
|
393
485
|
return styled.css(["margin:", ";width:", ";height:", ";"], margin, size, size);
|
|
394
486
|
};
|
|
395
|
-
const StyledTextMediaFigure = styled__default.default(
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
children,
|
|
399
|
-
position,
|
|
400
|
-
isHovered,
|
|
401
|
-
isFocused,
|
|
402
|
-
isDisabled,
|
|
403
|
-
isRotated,
|
|
404
|
-
theme,
|
|
405
|
-
...props
|
|
406
|
-
} = _ref;
|
|
407
|
-
return React__namespace.default.cloneElement(React.Children.only(children), props);
|
|
408
|
-
}).attrs({
|
|
409
|
-
'data-garden-id': COMPONENT_ID$B,
|
|
410
|
-
'data-garden-version': '9.0.0-next.2'
|
|
487
|
+
const StyledTextMediaFigure = styled__default.default(reactTheming.StyledBaseIcon).attrs({
|
|
488
|
+
'data-garden-id': COMPONENT_ID$x,
|
|
489
|
+
'data-garden-version': '9.0.0-next.21'
|
|
411
490
|
}).withConfig({
|
|
412
491
|
displayName: "StyledTextMediaFigure",
|
|
413
492
|
componentId: "sc-1qepknj-0"
|
|
414
|
-
})(["transform:", ";transition:transform 0.25s ease-in-out,color 0.25s ease-in-out;", ";", " ", ";"], props => props
|
|
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));
|
|
415
494
|
StyledTextMediaFigure.defaultProps = {
|
|
416
495
|
theme: reactTheming.DEFAULT_THEME
|
|
417
496
|
};
|
|
418
497
|
|
|
419
|
-
const COMPONENT_ID$
|
|
420
|
-
const
|
|
421
|
-
|
|
422
|
-
warning: 'warningHue',
|
|
423
|
-
error: 'dangerHue'
|
|
424
|
-
};
|
|
425
|
-
function getValidationHue(validation) {
|
|
426
|
-
let defaultHue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'primaryHue';
|
|
427
|
-
if (validation) {
|
|
428
|
-
return VALIDATION_HUES[validation];
|
|
429
|
-
}
|
|
430
|
-
return defaultHue;
|
|
431
|
-
}
|
|
432
|
-
const colorStyles$a = props => {
|
|
433
|
-
const {
|
|
498
|
+
const COMPONENT_ID$w = 'forms.faux_input';
|
|
499
|
+
const colorStyles$a = _ref => {
|
|
500
|
+
let {
|
|
434
501
|
theme,
|
|
435
502
|
validation,
|
|
436
503
|
focusInset,
|
|
437
504
|
isBare,
|
|
438
505
|
isFocused
|
|
439
|
-
} =
|
|
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
|
+
}
|
|
440
528
|
return styled.css(["", ""], reactTheming.focusStyles({
|
|
441
529
|
theme,
|
|
442
530
|
inset: focusInset,
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
531
|
+
color: {
|
|
532
|
+
variable: borderVariable
|
|
533
|
+
},
|
|
446
534
|
selector: isFocused ? '&' : '&:focus-within',
|
|
447
535
|
styles: {
|
|
448
|
-
borderColor:
|
|
449
|
-
}
|
|
536
|
+
borderColor: focusBorderColor
|
|
537
|
+
},
|
|
538
|
+
condition: !isBare
|
|
450
539
|
}));
|
|
451
540
|
};
|
|
452
541
|
const StyledTextFauxInput = styled__default.default(StyledTextInput).attrs(props => ({
|
|
453
542
|
as: 'div',
|
|
454
543
|
'aria-readonly': props.isReadOnly,
|
|
455
544
|
'aria-disabled': props.isDisabled,
|
|
456
|
-
'data-garden-id': COMPONENT_ID$
|
|
457
|
-
'data-garden-version': '9.0.0-next.
|
|
545
|
+
'data-garden-id': COMPONENT_ID$w,
|
|
546
|
+
'data-garden-version': '9.0.0-next.21'
|
|
458
547
|
})).withConfig({
|
|
459
548
|
displayName: "StyledTextFauxInput",
|
|
460
549
|
componentId: "sc-yqw7j9-0"
|
|
461
|
-
})(["display:", ";align-items:", ";cursor:", ";overflow:hidden;", " & > ", "{vertical-align:", ";", "{box-shadow:unset;}}& > ", "{flex-shrink:", ";}", ";"], props => props.mediaLayout ? 'inline-flex' : 'inline-block', props => props.mediaLayout && 'baseline', props => props.mediaLayout && !props.isDisabled ? 'text' : 'default', colorStyles$a, StyledTextInput, props => !props.mediaLayout && 'baseline', reactTheming.SELECTOR_FOCUS_VISIBLE, StyledTextMediaFigure, props => props.mediaLayout && '0', props => reactTheming.retrieveComponentStyles(COMPONENT_ID$
|
|
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));
|
|
462
551
|
StyledTextFauxInput.defaultProps = {
|
|
463
552
|
theme: reactTheming.DEFAULT_THEME
|
|
464
553
|
};
|
|
465
554
|
|
|
466
|
-
const COMPONENT_ID$
|
|
555
|
+
const COMPONENT_ID$v = 'forms.media_input';
|
|
467
556
|
const StyledTextMediaInput = styled__default.default(StyledTextInput).attrs({
|
|
468
|
-
'data-garden-id': COMPONENT_ID$
|
|
469
|
-
'data-garden-version': '9.0.0-next.
|
|
557
|
+
'data-garden-id': COMPONENT_ID$v,
|
|
558
|
+
'data-garden-version': '9.0.0-next.21',
|
|
470
559
|
isBare: true
|
|
471
560
|
}).withConfig({
|
|
472
561
|
displayName: "StyledTextMediaInput",
|
|
473
562
|
componentId: "sc-12i9xfi-0"
|
|
474
|
-
})(["flex-grow:1;", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$
|
|
563
|
+
})(["flex-grow:1;", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$v, props));
|
|
475
564
|
StyledTextMediaInput.defaultProps = {
|
|
476
565
|
theme: reactTheming.DEFAULT_THEME
|
|
477
566
|
};
|
|
478
567
|
|
|
479
|
-
const COMPONENT_ID$
|
|
568
|
+
const COMPONENT_ID$u = 'forms.input_group';
|
|
480
569
|
const positionStyles = props => {
|
|
481
570
|
const topMargin = `${props.theme.space.base * (props.isCompact ? 1 : 2)}px`;
|
|
482
571
|
return styled.css(["", ":not([hidden]) + &&,", " + &&,", " + &&,&& + ", ",&& + ", "{margin-top:", ";}& > ", "{position:relative;flex:1 1 auto;margin-top:0;margin-bottom:0;width:auto;min-width:0;}"], StyledLabel, StyledHint, StyledMessage, StyledHint, StyledMessage, topMargin, StyledTextInput);
|
|
@@ -484,20 +573,20 @@ const positionStyles = props => {
|
|
|
484
573
|
const itemStyles = props => {
|
|
485
574
|
const startDirection = props.theme.rtl ? 'right' : 'left';
|
|
486
575
|
const endDirection = props.theme.rtl ? 'left' : 'right';
|
|
487
|
-
return styled.css(["& > *{z-index:-1;}& > ", "{z-index:0;}& > ", ":disabled{z-index:-2;}& > ", ":hover,& > button:hover,& > ", ":focus-visible,& > button:focus-visible,& > ", "
|
|
576
|
+
return styled.css(["& > *{z-index:-1;}& > ", "{z-index:0;}& > ", ":disabled{z-index:-2;}& > ", ":hover,& > button:hover,& > ", ":focus-visible,& > button:focus-visible,& > ", ":active,& > button:active,& > button[aria-pressed='true'],& > button[aria-pressed='mixed']{z-index:1;}& > button:disabled{border-top-width:0;border-bottom-width:0;}& > *:not(:first-child){margin-", ":-", ";}& > *:first-child:not(:last-child){border-top-", "-radius:0;border-bottom-", "-radius:0;}& > *:last-child:not(:first-child){border-top-", "-radius:0;border-bottom-", "-radius:0;}& > *:not(:first-child):not(:last-child){border-radius:0;}"], StyledTextInput, StyledTextInput, StyledTextInput, StyledTextInput, StyledTextInput, startDirection, props.theme.borderWidths.sm, endDirection, endDirection, startDirection, startDirection);
|
|
488
577
|
};
|
|
489
578
|
const StyledInputGroup = styled__default.default.div.attrs({
|
|
490
|
-
'data-garden-id': COMPONENT_ID$
|
|
491
|
-
'data-garden-version': '9.0.0-next.
|
|
579
|
+
'data-garden-id': COMPONENT_ID$u,
|
|
580
|
+
'data-garden-version': '9.0.0-next.21'
|
|
492
581
|
}).withConfig({
|
|
493
582
|
displayName: "StyledInputGroup",
|
|
494
583
|
componentId: "sc-kjh1f0-0"
|
|
495
|
-
})(["display:inline-flex;position:relative;flex-wrap:nowrap;align-items:stretch;z-index:0;width:100%;", ";", ";", ";"], props => positionStyles(props), props => itemStyles(props), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$
|
|
584
|
+
})(["display:inline-flex;position:relative;flex-wrap:nowrap;align-items:stretch;z-index:0;width:100%;", ";", ";", ";"], props => positionStyles(props), props => itemStyles(props), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$u, props));
|
|
496
585
|
StyledInputGroup.defaultProps = {
|
|
497
586
|
theme: reactTheming.DEFAULT_THEME
|
|
498
587
|
};
|
|
499
588
|
|
|
500
|
-
const COMPONENT_ID$
|
|
589
|
+
const COMPONENT_ID$t = 'forms.radio_label';
|
|
501
590
|
const sizeStyles$d = props => {
|
|
502
591
|
const size = props.theme.space.base * 4;
|
|
503
592
|
const padding = size + props.theme.space.base * 2;
|
|
@@ -505,158 +594,263 @@ const sizeStyles$d = props => {
|
|
|
505
594
|
return styled.css(["padding-", ":", "px;&[hidden]{padding-", ":", "px;line-height:", "px;}"], props.theme.rtl ? 'right' : 'left', padding, props.theme.rtl ? 'right' : 'left', size, lineHeight);
|
|
506
595
|
};
|
|
507
596
|
const StyledRadioLabel = styled__default.default(StyledLabel).attrs({
|
|
508
|
-
'data-garden-id': COMPONENT_ID$
|
|
509
|
-
'data-garden-version': '9.0.0-next.
|
|
597
|
+
'data-garden-id': COMPONENT_ID$t,
|
|
598
|
+
'data-garden-version': '9.0.0-next.21',
|
|
510
599
|
isRadio: true
|
|
511
600
|
}).withConfig({
|
|
512
601
|
displayName: "StyledRadioLabel",
|
|
513
602
|
componentId: "sc-1aq2e5t-0"
|
|
514
|
-
})(["display:inline-block;position:relative;cursor:pointer;", ";", ";"], props => sizeStyles$d(props), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$
|
|
603
|
+
})(["display:inline-block;position:relative;cursor:pointer;", ";", ";"], props => sizeStyles$d(props), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$t, props));
|
|
515
604
|
StyledRadioLabel.defaultProps = {
|
|
516
605
|
theme: reactTheming.DEFAULT_THEME
|
|
517
606
|
};
|
|
518
607
|
|
|
519
|
-
const COMPONENT_ID$
|
|
608
|
+
const COMPONENT_ID$s = 'forms.checkbox_label';
|
|
520
609
|
const StyledCheckLabel = styled__default.default(StyledRadioLabel).attrs({
|
|
521
|
-
'data-garden-id': COMPONENT_ID$
|
|
522
|
-
'data-garden-version': '9.0.0-next.
|
|
610
|
+
'data-garden-id': COMPONENT_ID$s,
|
|
611
|
+
'data-garden-version': '9.0.0-next.21'
|
|
523
612
|
}).withConfig({
|
|
524
613
|
displayName: "StyledCheckLabel",
|
|
525
614
|
componentId: "sc-x7nr1-0"
|
|
526
|
-
})(["", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$
|
|
615
|
+
})(["", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$s, props));
|
|
527
616
|
StyledCheckLabel.defaultProps = {
|
|
528
617
|
theme: reactTheming.DEFAULT_THEME
|
|
529
618
|
};
|
|
530
619
|
|
|
531
|
-
const COMPONENT_ID$
|
|
620
|
+
const COMPONENT_ID$r = 'forms.radio_hint';
|
|
532
621
|
const StyledRadioHint = styled__default.default(StyledHint).attrs({
|
|
533
|
-
'data-garden-id': COMPONENT_ID$
|
|
534
|
-
'data-garden-version': '9.0.0-next.
|
|
622
|
+
'data-garden-id': COMPONENT_ID$r,
|
|
623
|
+
'data-garden-version': '9.0.0-next.21'
|
|
535
624
|
}).withConfig({
|
|
536
625
|
displayName: "StyledRadioHint",
|
|
537
626
|
componentId: "sc-eo8twg-0"
|
|
538
|
-
})(["padding-", ":", ";", ";"], props => props.theme.rtl ? 'right' : 'left', props => polished.math(`${props.theme.space.base} * 6px`), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$
|
|
627
|
+
})(["padding-", ":", ";", ";"], props => props.theme.rtl ? 'right' : 'left', props => polished.math(`${props.theme.space.base} * 6px`), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$r, props));
|
|
539
628
|
StyledRadioHint.defaultProps = {
|
|
540
629
|
theme: reactTheming.DEFAULT_THEME
|
|
541
630
|
};
|
|
542
631
|
|
|
543
|
-
const COMPONENT_ID$
|
|
632
|
+
const COMPONENT_ID$q = 'forms.checkbox_hint';
|
|
544
633
|
const StyledCheckHint = styled__default.default(StyledRadioHint).attrs({
|
|
545
|
-
'data-garden-id': COMPONENT_ID$
|
|
546
|
-
'data-garden-version': '9.0.0-next.
|
|
634
|
+
'data-garden-id': COMPONENT_ID$q,
|
|
635
|
+
'data-garden-version': '9.0.0-next.21'
|
|
547
636
|
}).withConfig({
|
|
548
637
|
displayName: "StyledCheckHint",
|
|
549
638
|
componentId: "sc-1kl8e8c-0"
|
|
550
|
-
})(["", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$
|
|
639
|
+
})(["", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$q, props));
|
|
551
640
|
StyledCheckHint.defaultProps = {
|
|
552
641
|
theme: reactTheming.DEFAULT_THEME
|
|
553
642
|
};
|
|
554
643
|
|
|
555
|
-
const COMPONENT_ID$
|
|
556
|
-
const colorStyles$9 =
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
const
|
|
561
|
-
|
|
562
|
-
|
|
644
|
+
const COMPONENT_ID$p = 'forms.radio';
|
|
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);
|
|
563
674
|
const focusBorderColor = hoverBorderColor;
|
|
564
|
-
const activeBackgroundColor = reactTheming.getColor(
|
|
675
|
+
const activeBackgroundColor = reactTheming.getColor({
|
|
676
|
+
...backgroundOptions,
|
|
677
|
+
transparency: theme.opacity[200]
|
|
678
|
+
});
|
|
565
679
|
const activeBorderColor = focusBorderColor;
|
|
680
|
+
const checkedBackgroundColor = reactTheming.getColor(backgroundOptions);
|
|
566
681
|
const checkedBorderColor = focusBorderColor;
|
|
567
|
-
const
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
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
|
+
});
|
|
573
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({
|
|
574
|
-
theme
|
|
720
|
+
theme,
|
|
575
721
|
styles: {
|
|
576
722
|
borderColor: focusBorderColor
|
|
577
723
|
},
|
|
578
|
-
selector: `&:focus-visible ~ ${StyledRadioLabel}::before
|
|
724
|
+
selector: `&:focus-visible ~ ${StyledRadioLabel}::before`
|
|
579
725
|
}), StyledRadioLabel, activeBorderColor, activeBackgroundColor, StyledRadioLabel, checkedBorderColor, checkedBackgroundColor, StyledRadioLabel, checkedHoverBorderColor, checkedHoverBackgroundColor, StyledRadioLabel, checkedActiveBorderColor, checkedActiveBackgroundColor, StyledRadioLabel, disabledBackgroundColor);
|
|
580
726
|
};
|
|
581
|
-
const sizeStyles$c =
|
|
582
|
-
|
|
583
|
-
|
|
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`;
|
|
584
734
|
const top = polished.math(`(${lineHeight} - ${size}) / 2`);
|
|
585
|
-
const iconSize =
|
|
735
|
+
const iconSize = theme.iconSizes.sm;
|
|
586
736
|
const iconPosition = polished.math(`(${size} - ${iconSize}) / 2`);
|
|
587
737
|
const iconTop = polished.math(`${iconPosition} + ${top}`);
|
|
588
|
-
const marginTop = `${
|
|
589
|
-
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);
|
|
590
740
|
};
|
|
591
741
|
const StyledRadioInput = styled__default.default.input.attrs({
|
|
592
|
-
'data-garden-id': COMPONENT_ID$
|
|
593
|
-
'data-garden-version': '9.0.0-next.
|
|
742
|
+
'data-garden-id': COMPONENT_ID$p,
|
|
743
|
+
'data-garden-version': '9.0.0-next.21',
|
|
594
744
|
type: 'radio'
|
|
595
745
|
}).withConfig({
|
|
596
746
|
displayName: "StyledRadioInput",
|
|
597
747
|
componentId: "sc-qsavpv-0"
|
|
598
|
-
})(["position:absolute;opacity:0;margin:0;& ~ ", "::before{position:absolute;", ":0;transition:border-color .25s ease-in-out,box-shadow .1s ease-in-out,background-color .25s ease-in-out,color .25s ease-in-out;border
|
|
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));
|
|
599
749
|
StyledRadioInput.defaultProps = {
|
|
600
750
|
theme: reactTheming.DEFAULT_THEME
|
|
601
751
|
};
|
|
602
752
|
|
|
603
|
-
const COMPONENT_ID$
|
|
604
|
-
const colorStyles$8 =
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
const
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
753
|
+
const COMPONENT_ID$o = 'forms.checkbox';
|
|
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);
|
|
612
806
|
};
|
|
613
807
|
const StyledCheckInput = styled__default.default(StyledRadioInput).attrs({
|
|
614
|
-
'data-garden-id': COMPONENT_ID$
|
|
615
|
-
'data-garden-version': '9.0.0-next.
|
|
808
|
+
'data-garden-id': COMPONENT_ID$o,
|
|
809
|
+
'data-garden-version': '9.0.0-next.21',
|
|
616
810
|
type: 'checkbox'
|
|
617
811
|
}).withConfig({
|
|
618
812
|
displayName: "StyledCheckInput",
|
|
619
813
|
componentId: "sc-176jxxe-0"
|
|
620
|
-
})(["& ~ ", "::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));
|
|
621
815
|
StyledCheckInput.defaultProps = {
|
|
622
816
|
theme: reactTheming.DEFAULT_THEME
|
|
623
817
|
};
|
|
624
818
|
|
|
625
|
-
const COMPONENT_ID$
|
|
819
|
+
const COMPONENT_ID$n = 'forms.radio_message';
|
|
626
820
|
const StyledRadioMessage = styled__default.default(StyledMessage).attrs({
|
|
627
|
-
'data-garden-id': COMPONENT_ID$
|
|
628
|
-
'data-garden-version': '9.0.0-next.
|
|
821
|
+
'data-garden-id': COMPONENT_ID$n,
|
|
822
|
+
'data-garden-version': '9.0.0-next.21'
|
|
629
823
|
}).withConfig({
|
|
630
824
|
displayName: "StyledRadioMessage",
|
|
631
825
|
componentId: "sc-1pmi0q8-0"
|
|
632
|
-
})(["padding-", ":", ";", ";"], props => props.theme.rtl ? 'right' : 'left', props => polished.math(`${props.theme.space.base} * 6px`), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$
|
|
826
|
+
})(["padding-", ":", ";", ";"], props => props.theme.rtl ? 'right' : 'left', props => polished.math(`${props.theme.space.base} * 6px`), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$n, props));
|
|
633
827
|
StyledRadioMessage.defaultProps = {
|
|
634
828
|
theme: reactTheming.DEFAULT_THEME
|
|
635
829
|
};
|
|
636
830
|
|
|
637
|
-
const COMPONENT_ID$
|
|
831
|
+
const COMPONENT_ID$m = 'forms.checkbox_message';
|
|
638
832
|
const StyledCheckMessage = styled__default.default(StyledRadioMessage).attrs({
|
|
639
|
-
'data-garden-id': COMPONENT_ID$
|
|
640
|
-
'data-garden-version': '9.0.0-next.
|
|
833
|
+
'data-garden-id': COMPONENT_ID$m,
|
|
834
|
+
'data-garden-version': '9.0.0-next.21'
|
|
641
835
|
}).withConfig({
|
|
642
836
|
displayName: "StyledCheckMessage",
|
|
643
837
|
componentId: "sc-s4p6kd-0"
|
|
644
|
-
})(["", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$
|
|
838
|
+
})(["", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$m, props));
|
|
645
839
|
StyledCheckMessage.defaultProps = {
|
|
646
840
|
theme: reactTheming.DEFAULT_THEME
|
|
647
841
|
};
|
|
648
842
|
|
|
649
|
-
var _path$
|
|
650
|
-
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); }
|
|
651
845
|
var SvgCheckSmFill = function SvgCheckSmFill(props) {
|
|
652
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
846
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$o({
|
|
653
847
|
xmlns: "http://www.w3.org/2000/svg",
|
|
654
848
|
width: 12,
|
|
655
849
|
height: 12,
|
|
656
850
|
focusable: "false",
|
|
657
851
|
viewBox: "0 0 12 12",
|
|
658
852
|
"aria-hidden": "true"
|
|
659
|
-
}, props), _path$
|
|
853
|
+
}, props), _path$l || (_path$l = /*#__PURE__*/React__namespace.createElement("path", {
|
|
660
854
|
fill: "none",
|
|
661
855
|
stroke: "currentColor",
|
|
662
856
|
strokeLinecap: "round",
|
|
@@ -666,29 +860,29 @@ var SvgCheckSmFill = function SvgCheckSmFill(props) {
|
|
|
666
860
|
})));
|
|
667
861
|
};
|
|
668
862
|
|
|
669
|
-
const COMPONENT_ID$
|
|
863
|
+
const COMPONENT_ID$l = 'forms.check_svg';
|
|
670
864
|
const StyledCheckSvg = styled__default.default(SvgCheckSmFill).attrs({
|
|
671
|
-
'data-garden-id': COMPONENT_ID$
|
|
672
|
-
'data-garden-version': '9.0.0-next.
|
|
865
|
+
'data-garden-id': COMPONENT_ID$l,
|
|
866
|
+
'data-garden-version': '9.0.0-next.21'
|
|
673
867
|
}).withConfig({
|
|
674
868
|
displayName: "StyledCheckSvg",
|
|
675
869
|
componentId: "sc-fvxetk-0"
|
|
676
|
-
})(["transition:opacity 0.25s ease-in-out;opacity:0;pointer-events:none;", ":checked ~ ", " > &{opacity:1;}", ":indeterminate ~ ", " > &{opacity:0;}", ";"], StyledCheckInput, StyledCheckLabel, StyledCheckInput, StyledCheckLabel, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$
|
|
870
|
+
})(["transition:opacity 0.25s ease-in-out;opacity:0;pointer-events:none;", ":checked ~ ", " > &{opacity:1;}", ":indeterminate ~ ", " > &{opacity:0;}", ";"], StyledCheckInput, StyledCheckLabel, StyledCheckInput, StyledCheckLabel, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$l, props));
|
|
677
871
|
StyledCheckSvg.defaultProps = {
|
|
678
872
|
theme: reactTheming.DEFAULT_THEME
|
|
679
873
|
};
|
|
680
874
|
|
|
681
|
-
var _path$
|
|
682
|
-
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); }
|
|
683
877
|
var SvgDashFill = function SvgDashFill(props) {
|
|
684
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
878
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$n({
|
|
685
879
|
xmlns: "http://www.w3.org/2000/svg",
|
|
686
880
|
width: 12,
|
|
687
881
|
height: 12,
|
|
688
882
|
focusable: "false",
|
|
689
883
|
viewBox: "0 0 12 12",
|
|
690
884
|
"aria-hidden": "true"
|
|
691
|
-
}, props), _path$
|
|
885
|
+
}, props), _path$k || (_path$k = /*#__PURE__*/React__namespace.createElement("path", {
|
|
692
886
|
stroke: "currentColor",
|
|
693
887
|
strokeLinecap: "round",
|
|
694
888
|
strokeWidth: 2,
|
|
@@ -696,97 +890,194 @@ var SvgDashFill = function SvgDashFill(props) {
|
|
|
696
890
|
})));
|
|
697
891
|
};
|
|
698
892
|
|
|
699
|
-
const COMPONENT_ID$
|
|
893
|
+
const COMPONENT_ID$k = 'forms.dash_svg';
|
|
700
894
|
const StyledDashSvg = styled__default.default(SvgDashFill).attrs({
|
|
701
|
-
'data-garden-id': COMPONENT_ID$
|
|
702
|
-
'data-garden-version': '9.0.0-next.
|
|
895
|
+
'data-garden-id': COMPONENT_ID$k,
|
|
896
|
+
'data-garden-version': '9.0.0-next.21'
|
|
703
897
|
}).withConfig({
|
|
704
898
|
displayName: "StyledDashSvg",
|
|
705
899
|
componentId: "sc-z3vq71-0"
|
|
706
|
-
})(["transition:opacity 0.25s ease-in-out;opacity:0;pointer-events:none;", ":indeterminate ~ ", " > &{opacity:1;}", ";"], StyledCheckInput, StyledCheckLabel, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$
|
|
900
|
+
})(["transition:opacity 0.25s ease-in-out;opacity:0;pointer-events:none;", ":indeterminate ~ ", " > &{opacity:1;}", ";"], StyledCheckInput, StyledCheckLabel, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$k, props));
|
|
707
901
|
StyledDashSvg.defaultProps = {
|
|
708
902
|
theme: reactTheming.DEFAULT_THEME
|
|
709
903
|
};
|
|
710
904
|
|
|
711
|
-
const COMPONENT_ID$
|
|
712
|
-
const colorStyles$7 =
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
const
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
const
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
905
|
+
const COMPONENT_ID$j = 'forms.file_upload';
|
|
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
|
|
929
|
+
}
|
|
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);
|
|
983
|
+
};
|
|
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);
|
|
729
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);
|
|
730
995
|
};
|
|
731
996
|
const StyledFileUpload = styled__default.default.div.attrs({
|
|
732
|
-
'data-garden-id': COMPONENT_ID$
|
|
733
|
-
'data-garden-version': '9.0.0-next.
|
|
997
|
+
'data-garden-id': COMPONENT_ID$j,
|
|
998
|
+
'data-garden-version': '9.0.0-next.21'
|
|
734
999
|
}).withConfig({
|
|
735
1000
|
displayName: "StyledFileUpload",
|
|
736
1001
|
componentId: "sc-1rodjgn-0"
|
|
737
|
-
})(["display:flex;align-items:center;justify-content:center;box-sizing:border-box;direction:", ";transition:border-color 0.25s ease-in-out,box-shadow 0.1s ease-in-out,background-color 0.25s ease-in-out,color 0.25s ease-in-out;border:dashed ", ";border-radius:", ";cursor:pointer;text-align:center;user-select:none;", ";&[aria-disabled='true']{cursor:default;}", ";", ";"], props => props.theme.rtl ? 'rtl' : 'ltr', props => props.theme.borderWidths.sm, props => props.theme.borderRadii.md, sizeStyles$b, colorStyles$7, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$
|
|
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));
|
|
738
1003
|
StyledFileUpload.defaultProps = {
|
|
739
1004
|
theme: reactTheming.DEFAULT_THEME
|
|
740
1005
|
};
|
|
741
1006
|
|
|
742
|
-
const COMPONENT_ID$
|
|
1007
|
+
const COMPONENT_ID$i = 'forms.file.close';
|
|
743
1008
|
const StyledFileClose = styled__default.default.button.attrs({
|
|
744
|
-
'data-garden-id': COMPONENT_ID$
|
|
745
|
-
'data-garden-version': '9.0.0-next.
|
|
1009
|
+
'data-garden-id': COMPONENT_ID$i,
|
|
1010
|
+
'data-garden-version': '9.0.0-next.21'
|
|
746
1011
|
}).withConfig({
|
|
747
1012
|
displayName: "StyledFileClose",
|
|
748
1013
|
componentId: "sc-1m31jbf-0"
|
|
749
|
-
})(["display:flex;flex-shrink:0;align-items:center;justify-content:center;transition:opacity 0.25s ease-in-out;opacity:0.8;border:none;background:transparent;cursor:pointer;color:", ";appearance:none;&:hover{opacity:0.9;}&:focus{outline:none;}", ";"], props =>
|
|
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));
|
|
750
1018
|
StyledFileClose.defaultProps = {
|
|
751
1019
|
theme: reactTheming.DEFAULT_THEME
|
|
752
1020
|
};
|
|
753
1021
|
|
|
754
|
-
const COMPONENT_ID$
|
|
755
|
-
const colorStyles$6 =
|
|
756
|
-
let
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
1022
|
+
const COMPONENT_ID$h = 'forms.file';
|
|
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';
|
|
767
1040
|
} else {
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
1041
|
+
borderVariable = 'border.default';
|
|
1042
|
+
focusBorderVariable = 'border.primaryEmphasis';
|
|
1043
|
+
foregroundVariable = 'foreground.default';
|
|
771
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
|
+
});
|
|
772
1057
|
return styled.css(["border-color:", ";color:", ";", ""], borderColor, foregroundColor, reactTheming.focusStyles({
|
|
773
|
-
theme
|
|
774
|
-
inset:
|
|
775
|
-
|
|
1058
|
+
theme,
|
|
1059
|
+
inset: focusInset,
|
|
1060
|
+
color: {
|
|
1061
|
+
variable: focusBorderVariable
|
|
1062
|
+
},
|
|
776
1063
|
styles: {
|
|
777
1064
|
borderColor: focusBorderColor
|
|
778
1065
|
}
|
|
779
1066
|
}));
|
|
780
1067
|
};
|
|
781
|
-
const sizeStyles$a =
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
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);
|
|
786
1077
|
return `
|
|
787
1078
|
box-sizing: border-box;
|
|
788
|
-
border: ${
|
|
789
|
-
border-radius: ${
|
|
1079
|
+
border: ${theme.borders.sm};
|
|
1080
|
+
border-radius: ${theme.borderRadii.md};
|
|
790
1081
|
padding: 0 ${spacing};
|
|
791
1082
|
height: ${size};
|
|
792
1083
|
line-height: ${lineHeight};
|
|
@@ -799,81 +1090,96 @@ const sizeStyles$a = props => {
|
|
|
799
1090
|
& > ${StyledFileClose} {
|
|
800
1091
|
width: ${size};
|
|
801
1092
|
height: ${size};
|
|
802
|
-
margin-${
|
|
1093
|
+
margin-${theme.rtl ? 'left' : 'right'}: -${spacing};
|
|
803
1094
|
}
|
|
804
1095
|
`;
|
|
805
1096
|
};
|
|
806
1097
|
const StyledFile = styled__default.default.div.attrs({
|
|
807
|
-
'data-garden-id': COMPONENT_ID$
|
|
808
|
-
'data-garden-version': '9.0.0-next.
|
|
1098
|
+
'data-garden-id': COMPONENT_ID$h,
|
|
1099
|
+
'data-garden-version': '9.0.0-next.21'
|
|
809
1100
|
}).withConfig({
|
|
810
1101
|
displayName: "StyledFile",
|
|
811
1102
|
componentId: "sc-195lzp1-0"
|
|
812
|
-
})(["display:flex;position:relative;flex-wrap:nowrap;align-items:center;transition:box-shadow 0.1s ease-in-out;", ";", ";& > span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}& > [role='progressbar']{position:absolute;bottom:0;left:0;transition:opacity 0.2s ease-in-out;margin:0;border-top-left-radius:0;border-top-right-radius:0;width:100%;& > div{border-top-", "-radius:0;}}& > [role='progressbar'][aria-valuenow='0'],& > [role='progressbar'][aria-valuenow='100']{opacity:0;}", ";"], sizeStyles$a, colorStyles$6, props => props.theme.rtl ? 'right' : 'left', props => reactTheming.retrieveComponentStyles(COMPONENT_ID$
|
|
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));
|
|
813
1104
|
StyledFile.defaultProps = {
|
|
814
1105
|
theme: reactTheming.DEFAULT_THEME
|
|
815
1106
|
};
|
|
816
1107
|
|
|
817
|
-
const COMPONENT_ID$
|
|
1108
|
+
const COMPONENT_ID$g = 'forms.file.delete';
|
|
818
1109
|
const StyledFileDelete = styled__default.default(StyledFileClose).attrs({
|
|
819
|
-
'data-garden-id': COMPONENT_ID$
|
|
820
|
-
'data-garden-version': '9.0.0-next.
|
|
1110
|
+
'data-garden-id': COMPONENT_ID$g,
|
|
1111
|
+
'data-garden-version': '9.0.0-next.21'
|
|
821
1112
|
}).withConfig({
|
|
822
1113
|
displayName: "StyledFileDelete",
|
|
823
1114
|
componentId: "sc-a8nnhx-0"
|
|
824
|
-
})(["color:", ";", ";"], props => reactTheming.getColor(
|
|
1115
|
+
})(["color:", ";", ";"], props => reactTheming.getColor({
|
|
1116
|
+
theme: props.theme,
|
|
1117
|
+
variable: 'foreground.danger'
|
|
1118
|
+
}), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$g, props));
|
|
825
1119
|
StyledFileDelete.defaultProps = {
|
|
826
1120
|
theme: reactTheming.DEFAULT_THEME
|
|
827
1121
|
};
|
|
828
1122
|
|
|
829
|
-
const COMPONENT_ID$
|
|
830
|
-
const
|
|
1123
|
+
const COMPONENT_ID$f = 'forms.file.icon';
|
|
1124
|
+
const colorStyles$5 = _ref => {
|
|
831
1125
|
let {
|
|
832
|
-
children,
|
|
833
|
-
isCompact,
|
|
834
1126
|
theme,
|
|
835
|
-
|
|
1127
|
+
$validation
|
|
836
1128
|
} = _ref;
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
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
|
+
};
|
|
1144
|
+
const StyledFileIcon = styled__default.default(reactTheming.StyledBaseIcon).attrs({
|
|
1145
|
+
'data-garden-id': COMPONENT_ID$f,
|
|
1146
|
+
'data-garden-version': '9.0.0-next.21'
|
|
841
1147
|
}).withConfig({
|
|
842
1148
|
displayName: "StyledFileIcon",
|
|
843
1149
|
componentId: "sc-7b3q0c-0"
|
|
844
|
-
})(["flex-shrink:0;
|
|
1150
|
+
})(["flex-shrink:0;", ";", ";", ";"], sizeStyles$9, colorStyles$5, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$f, props));
|
|
845
1151
|
StyledFileIcon.defaultProps = {
|
|
846
1152
|
theme: reactTheming.DEFAULT_THEME
|
|
847
1153
|
};
|
|
848
1154
|
|
|
849
|
-
const COMPONENT_ID$
|
|
1155
|
+
const COMPONENT_ID$e = 'forms.file_list';
|
|
850
1156
|
const StyledFileList = styled__default.default.ul.attrs({
|
|
851
|
-
'data-garden-id': COMPONENT_ID$
|
|
852
|
-
'data-garden-version': '9.0.0-next.
|
|
1157
|
+
'data-garden-id': COMPONENT_ID$e,
|
|
1158
|
+
'data-garden-version': '9.0.0-next.21'
|
|
853
1159
|
}).withConfig({
|
|
854
1160
|
displayName: "StyledFileList",
|
|
855
1161
|
componentId: "sc-gbahjg-0"
|
|
856
|
-
})(["margin:0;padding:0;list-style:none;", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$
|
|
1162
|
+
})(["margin:0;padding:0;list-style:none;", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$e, props));
|
|
857
1163
|
StyledFileList.defaultProps = {
|
|
858
1164
|
theme: reactTheming.DEFAULT_THEME
|
|
859
1165
|
};
|
|
860
1166
|
|
|
861
|
-
const COMPONENT_ID$
|
|
1167
|
+
const COMPONENT_ID$d = 'forms.file_list.item';
|
|
862
1168
|
const StyledFileListItem = styled__default.default.li.attrs({
|
|
863
|
-
'data-garden-id': COMPONENT_ID$
|
|
864
|
-
'data-garden-version': '9.0.0-next.
|
|
1169
|
+
'data-garden-id': COMPONENT_ID$d,
|
|
1170
|
+
'data-garden-version': '9.0.0-next.21'
|
|
865
1171
|
}).withConfig({
|
|
866
1172
|
displayName: "StyledFileListItem",
|
|
867
1173
|
componentId: "sc-1ova3lo-0"
|
|
868
|
-
})(["&:not(:first-child),", " ~ ", " > &:first-child{margin-top:", "px;}", ";"], StyledFileUpload, StyledFileList, props => props.theme.space.base * 2, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$
|
|
1174
|
+
})(["&:not(:first-child),", " ~ ", " > &:first-child{margin-top:", "px;}", ";"], StyledFileUpload, StyledFileList, props => props.theme.space.base * 2, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$d, props));
|
|
869
1175
|
StyledFileListItem.defaultProps = {
|
|
870
1176
|
theme: reactTheming.DEFAULT_THEME
|
|
871
1177
|
};
|
|
872
1178
|
|
|
873
1179
|
var _circle$3;
|
|
874
|
-
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); }
|
|
875
1181
|
var SvgCircleSmFill$1 = function SvgCircleSmFill(props) {
|
|
876
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
1182
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$m({
|
|
877
1183
|
xmlns: "http://www.w3.org/2000/svg",
|
|
878
1184
|
width: 12,
|
|
879
1185
|
height: 12,
|
|
@@ -888,90 +1194,115 @@ var SvgCircleSmFill$1 = function SvgCircleSmFill(props) {
|
|
|
888
1194
|
})));
|
|
889
1195
|
};
|
|
890
1196
|
|
|
891
|
-
const COMPONENT_ID$
|
|
1197
|
+
const COMPONENT_ID$c = 'forms.radio_svg';
|
|
892
1198
|
const StyledRadioSvg = styled__default.default(SvgCircleSmFill$1).attrs({
|
|
893
|
-
'data-garden-id': COMPONENT_ID$
|
|
894
|
-
'data-garden-version': '9.0.0-next.
|
|
1199
|
+
'data-garden-id': COMPONENT_ID$c,
|
|
1200
|
+
'data-garden-version': '9.0.0-next.21'
|
|
895
1201
|
}).withConfig({
|
|
896
1202
|
displayName: "StyledRadioSvg",
|
|
897
1203
|
componentId: "sc-1r1qtr1-0"
|
|
898
|
-
})(["transition:opacity 0.25s ease-in-out;opacity:0;", ":checked ~ ", " > &{opacity:1;}", ";"], StyledRadioInput, StyledRadioLabel, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$
|
|
1204
|
+
})(["transition:opacity 0.25s ease-in-out;opacity:0;", ":checked ~ ", " > &{opacity:1;}", ";"], StyledRadioInput, StyledRadioLabel, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$c, props));
|
|
899
1205
|
StyledRadioSvg.defaultProps = {
|
|
900
1206
|
theme: reactTheming.DEFAULT_THEME
|
|
901
1207
|
};
|
|
902
1208
|
|
|
903
|
-
const COMPONENT_ID$
|
|
904
|
-
const sizeStyles$
|
|
1209
|
+
const COMPONENT_ID$b = 'forms.toggle_label';
|
|
1210
|
+
const sizeStyles$8 = props => {
|
|
905
1211
|
const size = props.theme.space.base * 10;
|
|
906
1212
|
const padding = size + props.theme.space.base * 2;
|
|
907
1213
|
return styled.css(["padding-", ":", "px;&[hidden]{padding-", ":", "px;}"], props.theme.rtl ? 'right' : 'left', padding, props.theme.rtl ? 'right' : 'left', size);
|
|
908
1214
|
};
|
|
909
1215
|
const StyledToggleLabel = styled__default.default(StyledCheckLabel).attrs({
|
|
910
|
-
'data-garden-id': COMPONENT_ID$
|
|
911
|
-
'data-garden-version': '9.0.0-next.
|
|
1216
|
+
'data-garden-id': COMPONENT_ID$b,
|
|
1217
|
+
'data-garden-version': '9.0.0-next.21'
|
|
912
1218
|
}).withConfig({
|
|
913
1219
|
displayName: "StyledToggleLabel",
|
|
914
1220
|
componentId: "sc-e0asdk-0"
|
|
915
|
-
})(["", ";", ";"], props => sizeStyles$
|
|
1221
|
+
})(["", ";", ";"], props => sizeStyles$8(props), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$b, props));
|
|
916
1222
|
StyledToggleLabel.defaultProps = {
|
|
917
1223
|
theme: reactTheming.DEFAULT_THEME
|
|
918
1224
|
};
|
|
919
1225
|
|
|
920
|
-
const COMPONENT_ID$
|
|
1226
|
+
const COMPONENT_ID$a = 'forms.toggle_hint';
|
|
921
1227
|
const StyledToggleHint = styled__default.default(StyledHint).attrs({
|
|
922
|
-
'data-garden-id': COMPONENT_ID$
|
|
923
|
-
'data-garden-version': '9.0.0-next.
|
|
1228
|
+
'data-garden-id': COMPONENT_ID$a,
|
|
1229
|
+
'data-garden-version': '9.0.0-next.21'
|
|
924
1230
|
}).withConfig({
|
|
925
1231
|
displayName: "StyledToggleHint",
|
|
926
1232
|
componentId: "sc-nziggu-0"
|
|
927
|
-
})(["padding-", ":", ";", ";"], props => props.theme.rtl ? 'right' : 'left', props => polished.math(`${props.theme.space.base} * 12px`), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$
|
|
1233
|
+
})(["padding-", ":", ";", ";"], props => props.theme.rtl ? 'right' : 'left', props => polished.math(`${props.theme.space.base} * 12px`), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$a, props));
|
|
928
1234
|
StyledToggleHint.defaultProps = {
|
|
929
1235
|
theme: reactTheming.DEFAULT_THEME
|
|
930
1236
|
};
|
|
931
1237
|
|
|
932
|
-
const COMPONENT_ID$
|
|
933
|
-
const colorStyles$
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
const
|
|
1238
|
+
const COMPONENT_ID$9 = 'forms.toggle';
|
|
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
|
+
});
|
|
938
1266
|
return styled.css(["& ~ ", "::before{background-color:", ";}&:enabled ~ ", ":hover::before{background-color:", ";}&:enabled ~ ", ":active::before{background-color:", ";}"], StyledToggleLabel, backgroundColor, StyledToggleLabel, hoverBackgroundColor, StyledToggleLabel, activeBackgroundColor);
|
|
939
1267
|
};
|
|
940
|
-
const sizeStyles$
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
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;
|
|
944
1275
|
const iconPosition = polished.math(`(${height} - ${iconSize}) / 2`);
|
|
945
1276
|
const checkedIconPosition = polished.math(`${width} - ${iconSize} - ${iconPosition}`);
|
|
946
|
-
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);
|
|
947
1278
|
};
|
|
948
1279
|
const StyledToggleInput = styled__default.default(StyledCheckInput).attrs({
|
|
949
|
-
'data-garden-id': COMPONENT_ID$
|
|
950
|
-
'data-garden-version': '9.0.0-next.
|
|
1280
|
+
'data-garden-id': COMPONENT_ID$9,
|
|
1281
|
+
'data-garden-version': '9.0.0-next.21'
|
|
951
1282
|
}).withConfig({
|
|
952
1283
|
displayName: "StyledToggleInput",
|
|
953
1284
|
componentId: "sc-sgp47s-0"
|
|
954
|
-
})(["& ~ ", "::before{top:0;transition:box-shadow .1s ease-in-out,background-color .15s ease-in-out,color .25s ease-in-out;border:none;border-radius:100px;}", ";", ";", ";"], StyledToggleLabel,
|
|
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));
|
|
955
1286
|
StyledToggleInput.defaultProps = {
|
|
956
1287
|
theme: reactTheming.DEFAULT_THEME
|
|
957
1288
|
};
|
|
958
1289
|
|
|
959
|
-
const COMPONENT_ID$
|
|
1290
|
+
const COMPONENT_ID$8 = 'forms.toggle_message';
|
|
960
1291
|
const StyledToggleMessage = styled__default.default(StyledMessage).attrs({
|
|
961
|
-
'data-garden-id': COMPONENT_ID$
|
|
962
|
-
'data-garden-version': '9.0.0-next.
|
|
1292
|
+
'data-garden-id': COMPONENT_ID$8,
|
|
1293
|
+
'data-garden-version': '9.0.0-next.21'
|
|
963
1294
|
}).withConfig({
|
|
964
1295
|
displayName: "StyledToggleMessage",
|
|
965
1296
|
componentId: "sc-13vuvl1-0"
|
|
966
|
-
})(["padding-", ":", ";& ", "{", ":", ";}", ";"], props => props.theme.rtl ? 'right' : 'left', props => polished.math(`${props.theme.space.base} * 12px`), StyledMessageIcon, props => props.theme.rtl ? 'right' : 'left', props => polished.math(`${props.theme.space.base} * 10px - ${props.theme.iconSizes.md}`), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$
|
|
1297
|
+
})(["padding-", ":", ";& ", "{", ":", ";}", ";"], props => props.theme.rtl ? 'right' : 'left', props => polished.math(`${props.theme.space.base} * 12px`), StyledMessageIcon, props => props.theme.rtl ? 'right' : 'left', props => polished.math(`${props.theme.space.base} * 10px - ${props.theme.iconSizes.md}`), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$8, props));
|
|
967
1298
|
StyledToggleMessage.defaultProps = {
|
|
968
1299
|
theme: reactTheming.DEFAULT_THEME
|
|
969
1300
|
};
|
|
970
1301
|
|
|
971
1302
|
var _circle$2;
|
|
972
|
-
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); }
|
|
973
1304
|
var SvgCircleSmFill = function SvgCircleSmFill(props) {
|
|
974
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
1305
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$l({
|
|
975
1306
|
xmlns: "http://www.w3.org/2000/svg",
|
|
976
1307
|
width: 16,
|
|
977
1308
|
height: 16,
|
|
@@ -986,54 +1317,86 @@ var SvgCircleSmFill = function SvgCircleSmFill(props) {
|
|
|
986
1317
|
})));
|
|
987
1318
|
};
|
|
988
1319
|
|
|
989
|
-
const COMPONENT_ID$
|
|
1320
|
+
const COMPONENT_ID$7 = 'forms.toggle_svg';
|
|
990
1321
|
const StyledToggleSvg = styled__default.default(SvgCircleSmFill).attrs({
|
|
991
|
-
'data-garden-id': COMPONENT_ID$
|
|
992
|
-
'data-garden-version': '9.0.0-next.
|
|
1322
|
+
'data-garden-id': COMPONENT_ID$7,
|
|
1323
|
+
'data-garden-version': '9.0.0-next.21'
|
|
993
1324
|
}).withConfig({
|
|
994
1325
|
displayName: "StyledToggleSvg",
|
|
995
1326
|
componentId: "sc-162xbyx-0"
|
|
996
|
-
})(["transition:all 0.15s ease-in-out;", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$
|
|
1327
|
+
})(["transition:all 0.15s ease-in-out;", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$7, props));
|
|
997
1328
|
StyledToggleSvg.defaultProps = {
|
|
998
1329
|
theme: reactTheming.DEFAULT_THEME
|
|
999
1330
|
};
|
|
1000
1331
|
|
|
1001
|
-
const COMPONENT_ID$
|
|
1002
|
-
const colorStyles$
|
|
1003
|
-
|
|
1004
|
-
|
|
1332
|
+
const COMPONENT_ID$6 = 'forms.select';
|
|
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);
|
|
1005
1352
|
};
|
|
1006
|
-
const sizeStyles$
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
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);
|
|
1011
1363
|
};
|
|
1012
1364
|
const StyledSelect = styled__default.default(StyledTextInput).attrs({
|
|
1013
|
-
'data-garden-id': COMPONENT_ID$
|
|
1014
|
-
'data-garden-version': '9.0.0-next.
|
|
1365
|
+
'data-garden-id': COMPONENT_ID$6,
|
|
1366
|
+
'data-garden-version': '9.0.0-next.21',
|
|
1015
1367
|
as: 'select'
|
|
1016
1368
|
}).withConfig({
|
|
1017
1369
|
displayName: "StyledSelect",
|
|
1018
1370
|
componentId: "sc-8xdxpt-0"
|
|
1019
|
-
})(["cursor:pointer;text-overflow:ellipsis;", ";", ";&::-ms-expand{display:none;}&::-ms-value{background-color:transparent;color:inherit;}&:-moz-focusring{transition:none;text-shadow:0 0 0 ", ";color:transparent;}& + ", "{position:absolute;pointer-events:none;}"],
|
|
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);
|
|
1020
1375
|
StyledSelect.defaultProps = {
|
|
1021
1376
|
theme: reactTheming.DEFAULT_THEME
|
|
1022
1377
|
};
|
|
1023
1378
|
|
|
1024
|
-
const COMPONENT_ID$
|
|
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
|
+
};
|
|
1025
1388
|
const StyledSelectWrapper = styled__default.default(StyledTextFauxInput).attrs({
|
|
1026
|
-
'data-garden-id': COMPONENT_ID$
|
|
1027
|
-
'data-garden-version': '9.0.0-next.
|
|
1389
|
+
'data-garden-id': COMPONENT_ID$5,
|
|
1390
|
+
'data-garden-version': '9.0.0-next.21'
|
|
1028
1391
|
}).withConfig({
|
|
1029
1392
|
displayName: "StyledSelectWrapper",
|
|
1030
1393
|
componentId: "sc-i7b6hw-0"
|
|
1031
|
-
})(["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);
|
|
1032
1395
|
StyledSelectWrapper.defaultProps = {
|
|
1033
1396
|
theme: reactTheming.DEFAULT_THEME
|
|
1034
1397
|
};
|
|
1035
1398
|
|
|
1036
|
-
const COMPONENT_ID$
|
|
1399
|
+
const COMPONENT_ID$4 = 'forms.range';
|
|
1037
1400
|
const thumbStyles = function (styles) {
|
|
1038
1401
|
let modifier = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
1039
1402
|
return `
|
|
@@ -1078,28 +1441,74 @@ const trackLowerStyles = function (styles) {
|
|
|
1078
1441
|
}
|
|
1079
1442
|
`;
|
|
1080
1443
|
};
|
|
1081
|
-
const colorStyles$
|
|
1082
|
-
|
|
1083
|
-
|
|
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);
|
|
1084
1454
|
const thumbBorderColor = thumbBackgroundColor;
|
|
1085
|
-
const thumbBoxShadow =
|
|
1455
|
+
const thumbBoxShadow = theme.shadows.lg(`${theme.space.base}px`, `${theme.space.base * 2}px`, reactTheming.getColor({
|
|
1456
|
+
variable: 'shadow.small',
|
|
1457
|
+
theme
|
|
1458
|
+
}));
|
|
1086
1459
|
const thumbFocusBoxShadow = reactTheming.getFocusBoxShadow({
|
|
1087
|
-
theme
|
|
1460
|
+
theme
|
|
1461
|
+
});
|
|
1462
|
+
const thumbActiveBackgroundColor = reactTheming.getColor({
|
|
1463
|
+
...options,
|
|
1464
|
+
dark: {
|
|
1465
|
+
offset: -200
|
|
1466
|
+
},
|
|
1467
|
+
light: {
|
|
1468
|
+
offset: 200
|
|
1469
|
+
}
|
|
1088
1470
|
});
|
|
1089
|
-
const thumbActiveBackgroundColor = reactTheming.getColor('primaryHue', SHADE + 100, props.theme);
|
|
1090
1471
|
const thumbActiveBorderColor = thumbBorderColor;
|
|
1091
|
-
const thumbDisabledBackgroundColor = reactTheming.getColor(
|
|
1472
|
+
const thumbDisabledBackgroundColor = reactTheming.getColor({
|
|
1473
|
+
theme,
|
|
1474
|
+
variable: 'border.emphasis'
|
|
1475
|
+
});
|
|
1092
1476
|
const thumbDisabledBorderColor = thumbDisabledBackgroundColor;
|
|
1093
|
-
const thumbHoverBackgroundColor =
|
|
1477
|
+
const thumbHoverBackgroundColor = reactTheming.getColor({
|
|
1478
|
+
...options,
|
|
1479
|
+
dark: {
|
|
1480
|
+
offset: -100
|
|
1481
|
+
},
|
|
1482
|
+
light: {
|
|
1483
|
+
offset: 100
|
|
1484
|
+
}
|
|
1485
|
+
});
|
|
1094
1486
|
const thumbHoverBorderColor = thumbHoverBackgroundColor;
|
|
1095
|
-
const trackBackgroundColor = reactTheming.getColor(
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1487
|
+
const trackBackgroundColor = reactTheming.getColor({
|
|
1488
|
+
theme,
|
|
1489
|
+
variable: 'border.emphasis',
|
|
1490
|
+
dark: {
|
|
1491
|
+
offset: 100
|
|
1492
|
+
},
|
|
1493
|
+
light: {
|
|
1494
|
+
offset: -200
|
|
1495
|
+
}
|
|
1496
|
+
});
|
|
1497
|
+
const trackLowerBackgroundColor = hasLowerTrack ? thumbBackgroundColor : '';
|
|
1498
|
+
const trackBackgroundImage = hasLowerTrack ? `linear-gradient(${trackLowerBackgroundColor}, ${trackLowerBackgroundColor})` : '';
|
|
1499
|
+
const trackDisabledBackgroundColor = reactTheming.getColor({
|
|
1500
|
+
theme,
|
|
1501
|
+
variable: 'background.disabled',
|
|
1502
|
+
transparency: theme.opacity[200]
|
|
1503
|
+
});
|
|
1504
|
+
const trackDisabledLowerBackgroundColor = hasLowerTrack ? reactTheming.getColor({
|
|
1505
|
+
theme,
|
|
1506
|
+
variable: 'border.emphasis'
|
|
1507
|
+
}) : '';
|
|
1508
|
+
const trackDisabledBackgroundImage = hasLowerTrack ? `linear-gradient(${trackDisabledLowerBackgroundColor}, ${trackDisabledLowerBackgroundColor})` : '';
|
|
1100
1509
|
return styled.css(["", " ", " ", " ", " ", " ", " ", " ", " ", ""], trackStyles(`
|
|
1101
1510
|
background-color: ${trackBackgroundColor};
|
|
1102
|
-
background-image: ${trackBackgroundImage}; /*
|
|
1511
|
+
background-image: ${trackBackgroundImage}; /* [1] */
|
|
1103
1512
|
`), thumbStyles(`
|
|
1104
1513
|
border-color: ${thumbBorderColor};
|
|
1105
1514
|
box-shadow: ${thumbBoxShadow};
|
|
@@ -1114,10 +1523,11 @@ const colorStyles$3 = props => {
|
|
|
1114
1523
|
background-color: ${thumbHoverBackgroundColor};
|
|
1115
1524
|
`, ':hover'), thumbStyles(`
|
|
1116
1525
|
box-shadow: ${thumbFocusBoxShadow};
|
|
1117
|
-
`, '
|
|
1526
|
+
`, ':focus-visible'), thumbStyles(`
|
|
1118
1527
|
border-color: ${thumbActiveBorderColor};
|
|
1119
1528
|
background-color: ${thumbActiveBackgroundColor};
|
|
1120
1529
|
`, ':active'), trackStyles(`
|
|
1530
|
+
background-color: ${trackDisabledBackgroundColor};
|
|
1121
1531
|
background-image: ${trackDisabledBackgroundImage};
|
|
1122
1532
|
`, ':disabled'), thumbStyles(`
|
|
1123
1533
|
border-color: ${thumbDisabledBorderColor};
|
|
@@ -1127,29 +1537,32 @@ const colorStyles$3 = props => {
|
|
|
1127
1537
|
background-color: ${trackDisabledLowerBackgroundColor};
|
|
1128
1538
|
`, ':disabled'));
|
|
1129
1539
|
};
|
|
1130
|
-
const sizeStyles$
|
|
1131
|
-
|
|
1132
|
-
|
|
1540
|
+
const sizeStyles$4 = _ref2 => {
|
|
1541
|
+
let {
|
|
1542
|
+
theme
|
|
1543
|
+
} = _ref2;
|
|
1544
|
+
const thumbSize = `${theme.space.base * 5}px`;
|
|
1545
|
+
const trackHeight = `${theme.space.base * 1.5}px`;
|
|
1133
1546
|
const trackBorderRadius = trackHeight;
|
|
1134
|
-
const trackMargin = polished.math(`(${thumbSize} - ${trackHeight}) / 2 + ${
|
|
1547
|
+
const trackMargin = polished.math(`(${thumbSize} - ${trackHeight}) / 2 + ${theme.shadowWidths.md}`);
|
|
1135
1548
|
const thumbMargin = polished.math(`(${trackHeight} - ${thumbSize}) / 2`);
|
|
1136
|
-
return styled.css(["", ":not([hidden]) + &,", " + &,", " + &,& + ", ",& + ", "{margin-top:", ";}", ";", " ", ""], StyledLabel, StyledHint, StyledMessage, StyledHint, StyledMessage,
|
|
1549
|
+
return styled.css(["", ":not([hidden]) + &,", " + &,", " + &,& + ", ",& + ", "{margin-top:", ";}", ";", " ", ""], StyledLabel, StyledHint, StyledMessage, StyledHint, StyledMessage, `${theme.space.base * 2}px`, trackStyles(`
|
|
1137
1550
|
margin: ${trackMargin} 0;
|
|
1138
1551
|
border-radius: ${trackBorderRadius};
|
|
1139
1552
|
height: ${trackHeight};
|
|
1140
1553
|
`), thumbStyles(`
|
|
1141
|
-
margin: ${thumbMargin} 0; /*
|
|
1554
|
+
margin: ${thumbMargin} 0; /* [1] */
|
|
1142
1555
|
width: ${thumbSize};
|
|
1143
1556
|
height: ${thumbSize};
|
|
1144
1557
|
`), trackLowerStyles(`
|
|
1145
|
-
border-top-${
|
|
1146
|
-
border-bottom-${
|
|
1558
|
+
border-top-${theme.rtl ? 'right' : 'left'}-radius: ${trackBorderRadius};
|
|
1559
|
+
border-bottom-${theme.rtl ? 'right' : 'left'}-radius: ${trackBorderRadius};
|
|
1147
1560
|
height: ${trackHeight};
|
|
1148
1561
|
`));
|
|
1149
1562
|
};
|
|
1150
1563
|
const StyledRangeInput = styled__default.default.input.attrs(props => ({
|
|
1151
|
-
'data-garden-id': COMPONENT_ID$
|
|
1152
|
-
'data-garden-version': '9.0.0-next.
|
|
1564
|
+
'data-garden-id': COMPONENT_ID$4,
|
|
1565
|
+
'data-garden-version': '9.0.0-next.21',
|
|
1153
1566
|
type: 'range',
|
|
1154
1567
|
style: {
|
|
1155
1568
|
backgroundSize: props.hasLowerTrack && props.backgroundSize
|
|
@@ -1166,306 +1579,241 @@ const StyledRangeInput = styled__default.default.input.attrs(props => ({
|
|
|
1166
1579
|
width: 99.8%; /* fix for IE which cuts off the upper track's border radius */
|
|
1167
1580
|
color: transparent; /* reset for IE */
|
|
1168
1581
|
box-sizing: border-box; /* reset for IE */
|
|
1169
|
-
`),
|
|
1582
|
+
`), sizeStyles$4, props => thumbStyles(`
|
|
1170
1583
|
appearance: none;
|
|
1171
1584
|
transition: box-shadow .1s ease-in-out;
|
|
1172
1585
|
border: ${props.theme.borders.md};
|
|
1173
1586
|
border-radius: 100%;
|
|
1174
1587
|
box-sizing: border-box;
|
|
1175
|
-
`),
|
|
1588
|
+
`), colorStyles$2, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$4, props));
|
|
1176
1589
|
StyledRangeInput.defaultProps = {
|
|
1177
1590
|
backgroundSize: '0%',
|
|
1178
1591
|
hasLowerTrack: true,
|
|
1179
1592
|
theme: reactTheming.DEFAULT_THEME
|
|
1180
1593
|
};
|
|
1181
1594
|
|
|
1182
|
-
const COMPONENT_ID$
|
|
1183
|
-
const
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
}
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1595
|
+
const COMPONENT_ID$3 = 'forms.tile';
|
|
1596
|
+
const colorStyles$1 = _ref => {
|
|
1597
|
+
let {
|
|
1598
|
+
theme
|
|
1599
|
+
} = _ref;
|
|
1600
|
+
const offset100 = {
|
|
1601
|
+
dark: {
|
|
1602
|
+
offset: -100
|
|
1603
|
+
},
|
|
1604
|
+
light: {
|
|
1605
|
+
offset: 100
|
|
1606
|
+
}
|
|
1607
|
+
};
|
|
1608
|
+
const offset200 = {
|
|
1609
|
+
dark: {
|
|
1610
|
+
offset: -200
|
|
1611
|
+
},
|
|
1612
|
+
light: {
|
|
1613
|
+
offset: 200
|
|
1614
|
+
}
|
|
1615
|
+
};
|
|
1616
|
+
const backgroundColor = reactTheming.getColor({
|
|
1617
|
+
theme,
|
|
1618
|
+
variable: 'background.default'
|
|
1619
|
+
});
|
|
1620
|
+
const borderColor = reactTheming.getColor({
|
|
1621
|
+
theme,
|
|
1622
|
+
variable: 'border.default',
|
|
1623
|
+
...offset100
|
|
1624
|
+
});
|
|
1625
|
+
const foregroundColor = reactTheming.getColor({
|
|
1626
|
+
theme,
|
|
1627
|
+
variable: 'foreground.default'
|
|
1628
|
+
});
|
|
1629
|
+
const backgroundOptions = {
|
|
1630
|
+
theme,
|
|
1631
|
+
variable: 'background.primaryEmphasis'
|
|
1632
|
+
};
|
|
1633
|
+
const hoverBackgroundColor = reactTheming.getColor({
|
|
1634
|
+
...backgroundOptions,
|
|
1635
|
+
transparency: theme.opacity[100]
|
|
1636
|
+
});
|
|
1637
|
+
const hoverBorderColor = reactTheming.getColor({
|
|
1638
|
+
theme,
|
|
1639
|
+
variable: 'border.primaryEmphasis'
|
|
1640
|
+
});
|
|
1641
|
+
const activeBackgroundColor = reactTheming.getColor({
|
|
1642
|
+
...backgroundOptions,
|
|
1643
|
+
transparency: theme.opacity[200]
|
|
1644
|
+
});
|
|
1645
|
+
const focusBorderColor = hoverBorderColor;
|
|
1646
|
+
const activeBorderColor = hoverBorderColor;
|
|
1647
|
+
const checkedBackgroundColor = reactTheming.getColor(backgroundOptions);
|
|
1648
|
+
const checkedForegroundColor = reactTheming.getColor({
|
|
1649
|
+
theme,
|
|
1650
|
+
variable: 'foreground.onEmphasis'
|
|
1651
|
+
});
|
|
1652
|
+
const checkedHoverBackgroundColor = reactTheming.getColor({
|
|
1653
|
+
...backgroundOptions,
|
|
1654
|
+
...offset100
|
|
1655
|
+
});
|
|
1656
|
+
const checkedActiveBackgroundColor = reactTheming.getColor({
|
|
1657
|
+
...backgroundOptions,
|
|
1658
|
+
...offset200
|
|
1659
|
+
});
|
|
1660
|
+
const disabledBackgroundColor = reactTheming.getColor({
|
|
1661
|
+
theme,
|
|
1662
|
+
variable: 'background.disabled'
|
|
1663
|
+
});
|
|
1664
|
+
const disabledBorderColor = reactTheming.getColor({
|
|
1665
|
+
theme,
|
|
1666
|
+
variable: 'border.disabled'
|
|
1667
|
+
});
|
|
1668
|
+
const disabledForegroundColor = reactTheming.getColor({
|
|
1669
|
+
theme,
|
|
1670
|
+
variable: 'foreground.disabled'
|
|
1671
|
+
});
|
|
1672
|
+
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({
|
|
1673
|
+
theme,
|
|
1674
|
+
selector: '&:has(:focus-visible)',
|
|
1675
|
+
styles: {
|
|
1676
|
+
borderColor: focusBorderColor
|
|
1677
|
+
}
|
|
1678
|
+
}), activeBorderColor, activeBackgroundColor, checkedBackgroundColor, checkedForegroundColor, checkedHoverBackgroundColor, checkedActiveBackgroundColor, disabledBorderColor, disabledBackgroundColor, disabledForegroundColor);
|
|
1192
1679
|
};
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
const
|
|
1198
|
-
const
|
|
1199
|
-
|
|
1200
|
-
const activeBackgroundColor = reactTheming.getColor('primaryHue', SHADE + 100, props.theme);
|
|
1201
|
-
const activeBorderColor = borderColor;
|
|
1202
|
-
const hoverBackgroundColor = activeBackgroundColor;
|
|
1203
|
-
const hoverBorderColor = hoverBackgroundColor;
|
|
1204
|
-
const disabledBackgroundColor = reactTheming.getColor('neutralHue', SHADE - 300, props.theme);
|
|
1205
|
-
const disabledBorderColor = disabledBackgroundColor;
|
|
1206
|
-
return styled.css(["border-color:", ";box-shadow:", ";background-color:", ";&:hover,&[data-garden-hover='true']{border-color:", ";background-color:", ";}", " &:active,&[data-garden-active='true']{border-color:", ";background-color:", ";}&[aria-disabled='true']{border-color:", ";box-shadow:none;background-color:", ";}"], borderColor, boxShadow, backgroundColor, hoverBorderColor, hoverBackgroundColor, reactTheming.focusStyles({
|
|
1207
|
-
theme: props.theme
|
|
1208
|
-
}), activeBorderColor, activeBackgroundColor, disabledBorderColor, disabledBackgroundColor);
|
|
1209
|
-
};
|
|
1210
|
-
const sizeStyles$5 = props => {
|
|
1211
|
-
const size = polished.math(`${props.theme.space.base} * 5px`);
|
|
1212
|
-
const marginTop = polished.math(`${size} / -2`);
|
|
1213
|
-
return styled.css(["margin-top:", ";width:", ";height:", ";"], marginTop, size, size);
|
|
1214
|
-
};
|
|
1215
|
-
const StyledSliderThumb = styled__default.default.div.attrs(props => ({
|
|
1216
|
-
'data-garden-id': COMPONENT_ID$6,
|
|
1217
|
-
'data-garden-version': '9.0.0-next.2',
|
|
1218
|
-
'aria-disabled': props.isDisabled
|
|
1219
|
-
})).withConfig({
|
|
1220
|
-
displayName: "StyledSliderThumb",
|
|
1221
|
-
componentId: "sc-yspbwa-0"
|
|
1222
|
-
})(["appearance:none;position:absolute;top:50%;", ":", ";transition:border-color 0.25s ease-in-out,box-shadow 0.1s ease-in-out,background-color 0.25s ease-in-out;z-index:1;border:", ";border-radius:100%;cursor:inherit;box-sizing:border-box;font-size:0;", ";", ";", ";"], props => props.theme.rtl ? 'right' : 'left', props => polished.math(`${props.position} * 1px`), props => props.theme.borders.md, props => sizeStyles$5(props), props => colorStyles$2(props), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$6, props));
|
|
1223
|
-
StyledSliderThumb.defaultProps = {
|
|
1224
|
-
position: 0,
|
|
1225
|
-
theme: reactTheming.DEFAULT_THEME
|
|
1680
|
+
const sizeStyles$3 = _ref2 => {
|
|
1681
|
+
let {
|
|
1682
|
+
theme
|
|
1683
|
+
} = _ref2;
|
|
1684
|
+
const border = theme.borders.sm;
|
|
1685
|
+
const padding = `${theme.space.base * 5}px`;
|
|
1686
|
+
return styled.css(["border:", ";padding:", ";min-width:132px;"], border, padding);
|
|
1226
1687
|
};
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
};
|
|
1236
|
-
const sizeStyles$4 = props => {
|
|
1237
|
-
const height = polished.math(`${props.theme.space.base} * 1.5px`);
|
|
1238
|
-
const backgroundPosition = polished.math(`${props.backgroundPosition} * 1px`);
|
|
1239
|
-
const backgroundSize = polished.math(`${props.backgroundSize} * 1px`);
|
|
1240
|
-
const borderRadius = height;
|
|
1241
|
-
const marginTop = polished.math(`${height} / -2`);
|
|
1242
|
-
const padding = polished.math(`${props.theme.space.base} * 2.5px`);
|
|
1243
|
-
return styled.css(["margin-top:", ";border-radius:", ";background-position:", ";background-size:", ";padding:0 ", ";"], marginTop, borderRadius, backgroundPosition, backgroundSize, padding);
|
|
1244
|
-
};
|
|
1245
|
-
const StyledSliderTrack = styled__default.default.div.attrs(props => ({
|
|
1246
|
-
'data-garden-id': COMPONENT_ID$5,
|
|
1247
|
-
'data-garden-version': '9.0.0-next.2',
|
|
1248
|
-
'aria-disabled': props.isDisabled
|
|
1249
|
-
})).withConfig({
|
|
1250
|
-
displayName: "StyledSliderTrack",
|
|
1251
|
-
componentId: "sc-aw5m6g-0"
|
|
1252
|
-
})(["position:absolute;top:50%;box-sizing:border-box;background-origin:content-box;background-repeat:repeat-y;width:100%;", ";", ";", ";"], props => sizeStyles$4(props), props => colorStyles$1(props), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$5, props));
|
|
1253
|
-
StyledSliderTrack.defaultProps = {
|
|
1254
|
-
backgroundSize: 0,
|
|
1255
|
-
backgroundPosition: 0,
|
|
1688
|
+
const StyledTile = styled__default.default.label.attrs({
|
|
1689
|
+
'data-garden-id': COMPONENT_ID$3,
|
|
1690
|
+
'data-garden-version': '9.0.0-next.21'
|
|
1691
|
+
}).withConfig({
|
|
1692
|
+
displayName: "StyledTile",
|
|
1693
|
+
componentId: "sc-1jjvmxs-0"
|
|
1694
|
+
})(["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));
|
|
1695
|
+
StyledTile.defaultProps = {
|
|
1256
1696
|
theme: reactTheming.DEFAULT_THEME
|
|
1257
1697
|
};
|
|
1258
1698
|
|
|
1259
|
-
const COMPONENT_ID$
|
|
1260
|
-
const sizeStyles$
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1699
|
+
const COMPONENT_ID$2 = 'forms.tile_description';
|
|
1700
|
+
const sizeStyles$2 = _ref => {
|
|
1701
|
+
let {
|
|
1702
|
+
theme,
|
|
1703
|
+
isCentered
|
|
1704
|
+
} = _ref;
|
|
1705
|
+
const marginTop = `${theme.space.base}px`;
|
|
1706
|
+
const marginHorizontal = isCentered ? undefined : polished.math(`(${theme.iconSizes.md} * 2) + ${theme.space.base * 5}px`);
|
|
1707
|
+
const fontSize = theme.fontSizes.sm;
|
|
1708
|
+
const lineHeight = reactTheming.getLineHeight(theme.space.base * 4, fontSize);
|
|
1709
|
+
return styled.css(["margin-top:", ";margin-", ":", ";line-height:", ";font-size:", ";"], marginTop, theme.rtl ? 'right' : 'left', marginHorizontal, lineHeight, fontSize);
|
|
1264
1710
|
};
|
|
1265
|
-
const
|
|
1266
|
-
'data-garden-id': COMPONENT_ID$
|
|
1267
|
-
'data-garden-version': '9.0.0-next.
|
|
1711
|
+
const StyledTileDescription = styled__default.default.span.attrs({
|
|
1712
|
+
'data-garden-id': COMPONENT_ID$2,
|
|
1713
|
+
'data-garden-version': '9.0.0-next.21'
|
|
1268
1714
|
}).withConfig({
|
|
1269
|
-
displayName: "
|
|
1270
|
-
componentId: "sc-
|
|
1271
|
-
})(["
|
|
1272
|
-
|
|
1715
|
+
displayName: "StyledTileDescription",
|
|
1716
|
+
componentId: "sc-xfuu7u-0"
|
|
1717
|
+
})(["display:block;text-align:", ";", ";", ";"], props => props.isCentered && 'center', sizeStyles$2, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$2, props));
|
|
1718
|
+
StyledTileDescription.defaultProps = {
|
|
1273
1719
|
theme: reactTheming.DEFAULT_THEME
|
|
1274
1720
|
};
|
|
1275
1721
|
|
|
1276
|
-
const COMPONENT_ID$
|
|
1277
|
-
const
|
|
1278
|
-
|
|
1722
|
+
const COMPONENT_ID$1 = 'forms.tile_icon';
|
|
1723
|
+
const colorStyles = _ref => {
|
|
1724
|
+
let {
|
|
1725
|
+
theme
|
|
1726
|
+
} = _ref;
|
|
1727
|
+
const options = {
|
|
1728
|
+
theme,
|
|
1729
|
+
variable: 'foreground.subtle'
|
|
1730
|
+
};
|
|
1731
|
+
const color = reactTheming.getColor(options);
|
|
1732
|
+
const hoverColor = reactTheming.getColor({
|
|
1733
|
+
...options,
|
|
1734
|
+
dark: {
|
|
1735
|
+
offset: -100
|
|
1736
|
+
},
|
|
1737
|
+
light: {
|
|
1738
|
+
offset: 100
|
|
1739
|
+
}
|
|
1740
|
+
});
|
|
1741
|
+
const activeColor = reactTheming.getColor({
|
|
1742
|
+
...options,
|
|
1743
|
+
dark: {
|
|
1744
|
+
offset: -200
|
|
1745
|
+
},
|
|
1746
|
+
light: {
|
|
1747
|
+
offset: 200
|
|
1748
|
+
}
|
|
1749
|
+
});
|
|
1750
|
+
const checkedColor = reactTheming.getColor({
|
|
1751
|
+
theme,
|
|
1752
|
+
variable: 'foreground.onEmphasis'
|
|
1753
|
+
});
|
|
1754
|
+
const disabledColor = reactTheming.getColor({
|
|
1755
|
+
theme,
|
|
1756
|
+
variable: 'foreground.disabled'
|
|
1757
|
+
});
|
|
1758
|
+
return styled.css(["color:", ";", ":hover &&{color:", ";}", ":active &&{color:", ";}", ":has(:checked) &&{color:", ";}", "[aria-disabled='true'] &&{color:", ";}"], color, StyledTile, hoverColor, StyledTile, activeColor, StyledTile, checkedColor, StyledTile, disabledColor);
|
|
1759
|
+
};
|
|
1760
|
+
const sizeStyles$1 = _ref2 => {
|
|
1761
|
+
let {
|
|
1762
|
+
theme,
|
|
1763
|
+
isCentered
|
|
1764
|
+
} = _ref2;
|
|
1765
|
+
const iconSize = polished.math(`${theme.iconSizes.md} * 2`);
|
|
1279
1766
|
let position;
|
|
1280
1767
|
let top;
|
|
1281
|
-
let
|
|
1282
|
-
if (!
|
|
1768
|
+
let horizontal;
|
|
1769
|
+
if (!isCentered) {
|
|
1283
1770
|
position = 'absolute';
|
|
1284
|
-
top = `${
|
|
1285
|
-
|
|
1286
|
-
if (props.theme.rtl) {
|
|
1287
|
-
horizontalValue = `right: ${props.theme.space.base * 5}px`;
|
|
1288
|
-
}
|
|
1771
|
+
top = `${theme.space.base * 6}px`;
|
|
1772
|
+
horizontal = `${theme.space.base * 5}px`;
|
|
1289
1773
|
}
|
|
1290
|
-
return styled.css(["position:", ";top:", ";", ";& > *{width:", ";height:", ";}"], position, top,
|
|
1774
|
+
return styled.css(["position:", ";top:", ";", ":", ";line-height:0;& > *{width:", ";height:", ";}"], position, top, theme.rtl ? 'right' : 'left', horizontal, iconSize, iconSize);
|
|
1291
1775
|
};
|
|
1292
1776
|
const StyledTileIcon = styled__default.default.span.attrs({
|
|
1293
|
-
'data-garden-id': COMPONENT_ID$
|
|
1294
|
-
'data-garden-version': '9.0.0-next.
|
|
1777
|
+
'data-garden-id': COMPONENT_ID$1,
|
|
1778
|
+
'data-garden-version': '9.0.0-next.21'
|
|
1295
1779
|
}).withConfig({
|
|
1296
1780
|
displayName: "StyledTileIcon",
|
|
1297
1781
|
componentId: "sc-1wazhg4-0"
|
|
1298
|
-
})(["display:block;transition:color 0.25s ease-in-out;text-align:center;
|
|
1782
|
+
})(["display:block;transition:color 0.25s ease-in-out;text-align:center;", ";", ";", ";"], sizeStyles$1, colorStyles, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$1, props));
|
|
1299
1783
|
StyledTileIcon.defaultProps = {
|
|
1300
1784
|
theme: reactTheming.DEFAULT_THEME
|
|
1301
1785
|
};
|
|
1302
1786
|
|
|
1303
|
-
const COMPONENT_ID$2 = 'forms.tile';
|
|
1304
|
-
const colorStyles = props => {
|
|
1305
|
-
const SHADE = 600;
|
|
1306
|
-
const iconColor = reactTheming.getColor('neutralHue', SHADE, props.theme);
|
|
1307
|
-
const color = reactTheming.getColor('neutralHue', SHADE + 200, props.theme);
|
|
1308
|
-
const borderColor = reactTheming.getColor('neutralHue', SHADE - 300, props.theme);
|
|
1309
|
-
const hoverBackgroundColor = reactTheming.getColor('primaryHue', SHADE, props.theme, 0.08);
|
|
1310
|
-
const hoverBorderColor = reactTheming.getColor('primaryHue', SHADE, props.theme);
|
|
1311
|
-
const focusBorderColor = hoverBorderColor;
|
|
1312
|
-
const activeBackgroundColor = reactTheming.getColor('primaryHue', SHADE, props.theme, 0.2);
|
|
1313
|
-
const activeBorderColor = focusBorderColor;
|
|
1314
|
-
const disabledBackgroundColor = reactTheming.getColor('neutralHue', SHADE - 500, props.theme);
|
|
1315
|
-
const disabledBorderColor = reactTheming.getColor('neutralHue', SHADE - 400, props.theme);
|
|
1316
|
-
const disabledColor = reactTheming.getColor('neutralHue', SHADE - 200, props.theme);
|
|
1317
|
-
const selectedBorderColor = focusBorderColor;
|
|
1318
|
-
const selectedBackgroundColor = selectedBorderColor;
|
|
1319
|
-
const selectedHoverBorderColor = reactTheming.getColor('primaryHue', SHADE + 100, props.theme);
|
|
1320
|
-
const selectedHoverBackgroundColor = selectedHoverBorderColor;
|
|
1321
|
-
const selectedActiveBorderColor = reactTheming.getColor('primaryHue', SHADE + 200, props.theme);
|
|
1322
|
-
const selectedActiveBackgroundColor = selectedActiveBorderColor;
|
|
1323
|
-
const selectedDisabledBackgroundColor = disabledBorderColor;
|
|
1324
|
-
return styled.css(["border:", " ", ";border-color:", ";background-color:", ";color:", ";", "{color:", ";}&:hover:not([aria-disabled='true']){border-color:", ";background-color:", ";", "{color:", ";}}", " &:active:not([aria-disabled='true']){border-color:", ";background-color:", ";", "{color:", ";}}&[data-garden-selected='true']{border-color:", ";background-color:", ";color:", ";", "{color:", ";}}&[data-garden-selected='true']:not([aria-disabled='true']):hover{border-color:", ";background-color:", ";color:", ";", "{color:", ";}}&[data-garden-selected='true']:not([aria-disabled='true']):active{border-color:", ";background-color:", ";color:", ";", "{color:", ";}}&[aria-disabled='true']{border-color:", ";background-color:", ";color:", ";", "{color:", ";}}&[data-garden-selected='true'][aria-disabled='true']{background-color:", ";color:", ";", "{color:", ";}}"], props.theme.borders.sm, reactTheming.getColor('neutralHue', SHADE - 300, props.theme), borderColor, props.theme.colors.background, color, StyledTileIcon, iconColor, hoverBorderColor, hoverBackgroundColor, StyledTileIcon, color, reactTheming.focusStyles({
|
|
1325
|
-
theme: props.theme,
|
|
1326
|
-
hue: focusBorderColor,
|
|
1327
|
-
styles: {
|
|
1328
|
-
borderColor: focusBorderColor
|
|
1329
|
-
},
|
|
1330
|
-
selector: `&:focus-within`
|
|
1331
|
-
}), activeBorderColor, activeBackgroundColor, StyledTileIcon, color, selectedBorderColor, selectedBackgroundColor, props.theme.colors.background, StyledTileIcon, props.theme.colors.background, selectedHoverBorderColor, selectedHoverBackgroundColor, props.theme.colors.background, StyledTileIcon, props.theme.colors.background, selectedActiveBorderColor, selectedActiveBackgroundColor, props.theme.colors.background, StyledTileIcon, props.theme.colors.background, disabledBorderColor, disabledBackgroundColor, disabledColor, StyledTileIcon, disabledColor, selectedDisabledBackgroundColor, disabledColor, StyledTileIcon, disabledColor);
|
|
1332
|
-
};
|
|
1333
|
-
const StyledTile = styled__default.default.label.attrs(props => ({
|
|
1334
|
-
'data-garden-id': COMPONENT_ID$2,
|
|
1335
|
-
'data-garden-version': '9.0.0-next.2',
|
|
1336
|
-
'data-garden-selected': props.isSelected
|
|
1337
|
-
})).withConfig({
|
|
1338
|
-
displayName: "StyledTile",
|
|
1339
|
-
componentId: "sc-1jjvmxs-0"
|
|
1340
|
-
})(["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:", ";cursor:", ";padding:", "px;direction:", ";min-width:132px;word-break:break-word;", ";", ";"], props => props.theme.borderRadii.md, props => !props.isDisabled && 'pointer', props => props.theme.space.base * 5, props => props.theme.rtl && 'rtl', props => colorStyles(props), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$2, props));
|
|
1341
|
-
StyledTile.defaultProps = {
|
|
1342
|
-
theme: reactTheming.DEFAULT_THEME
|
|
1343
|
-
};
|
|
1344
|
-
|
|
1345
|
-
const COMPONENT_ID$1 = 'forms.tile_description';
|
|
1346
|
-
const sizeStyles$1 = props => {
|
|
1347
|
-
let marginDirection = 'left';
|
|
1348
|
-
let marginValue;
|
|
1349
|
-
if (props.theme.rtl) {
|
|
1350
|
-
marginDirection = 'right';
|
|
1351
|
-
}
|
|
1352
|
-
if (!props.isCentered) {
|
|
1353
|
-
marginValue = polished.math(`(${props.theme.iconSizes.md} * 2) + ${props.theme.space.base * 5}px`);
|
|
1354
|
-
}
|
|
1355
|
-
return styled.css(["margin-top:", "px;margin-", ":", ";"], props.theme.space.base, marginDirection, marginValue);
|
|
1356
|
-
};
|
|
1357
|
-
const StyledTileDescription = styled__default.default.span.attrs({
|
|
1358
|
-
'data-garden-id': COMPONENT_ID$1,
|
|
1359
|
-
'data-garden-version': '9.0.0-next.2'
|
|
1360
|
-
}).withConfig({
|
|
1361
|
-
displayName: "StyledTileDescription",
|
|
1362
|
-
componentId: "sc-xfuu7u-0"
|
|
1363
|
-
})(["display:block;text-align:", ";line-height:", ";font-size:", ";", ";", ";"], props => props.isCentered && 'center', props => reactTheming.getLineHeight(props.theme.space.base * 4, props.theme.fontSizes.sm), props => props.theme.fontSizes.sm, props => sizeStyles$1(props), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$1, props));
|
|
1364
|
-
StyledTileDescription.defaultProps = {
|
|
1365
|
-
theme: reactTheming.DEFAULT_THEME
|
|
1366
|
-
};
|
|
1367
|
-
|
|
1368
1787
|
const StyledTileInput = styled__default.default.input.withConfig({
|
|
1369
1788
|
displayName: "StyledTileInput",
|
|
1370
1789
|
componentId: "sc-1nq2m6q-0"
|
|
1371
|
-
})(["position:absolute;
|
|
1790
|
+
})(["position:absolute;top:0;left:0;opacity:0;z-index:1;margin:0;cursor:", ";width:100%;height:100%;"], props => props.disabled ? 'default' : 'pointer');
|
|
1372
1791
|
StyledTileInput.defaultProps = {
|
|
1373
1792
|
theme: reactTheming.DEFAULT_THEME
|
|
1374
1793
|
};
|
|
1375
1794
|
|
|
1376
|
-
const COMPONENT_ID = 'forms.tile_label';
|
|
1377
|
-
const sizeStyles =
|
|
1378
|
-
let
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
}
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
StyledTileLabel.defaultProps = {
|
|
1398
|
-
theme: reactTheming.DEFAULT_THEME
|
|
1399
|
-
};
|
|
1400
|
-
|
|
1401
|
-
const Field = React__namespace.default.forwardRef((props, ref) => {
|
|
1402
|
-
const [hasHint, setHasHint] = React.useState(false);
|
|
1403
|
-
const [hasMessage, setHasMessage] = React.useState(false);
|
|
1404
|
-
const [isLabelActive, setIsLabelActive] = React.useState(false);
|
|
1405
|
-
const [isLabelHovered, setIsLabelHovered] = React.useState(false);
|
|
1406
|
-
const multiThumbRangeRef = React.useRef(null);
|
|
1407
|
-
const {
|
|
1408
|
-
getInputProps,
|
|
1409
|
-
getMessageProps,
|
|
1410
|
-
...propGetters
|
|
1411
|
-
} = containerField.useField({
|
|
1412
|
-
idPrefix: props.id,
|
|
1413
|
-
hasHint,
|
|
1414
|
-
hasMessage
|
|
1415
|
-
});
|
|
1416
|
-
const fieldProps = React.useMemo(() => ({
|
|
1417
|
-
...propGetters,
|
|
1418
|
-
getInputProps,
|
|
1419
|
-
getMessageProps,
|
|
1420
|
-
isLabelActive,
|
|
1421
|
-
setIsLabelActive,
|
|
1422
|
-
isLabelHovered,
|
|
1423
|
-
setIsLabelHovered,
|
|
1424
|
-
hasHint,
|
|
1425
|
-
setHasHint,
|
|
1426
|
-
hasMessage,
|
|
1427
|
-
setHasMessage,
|
|
1428
|
-
multiThumbRangeRef
|
|
1429
|
-
}), [propGetters, getInputProps, getMessageProps, isLabelActive, isLabelHovered, hasHint, hasMessage]);
|
|
1430
|
-
return React__namespace.default.createElement(FieldContext.Provider, {
|
|
1431
|
-
value: fieldProps
|
|
1432
|
-
}, React__namespace.default.createElement(StyledField, _extends$t({}, props, {
|
|
1433
|
-
ref: ref
|
|
1434
|
-
})));
|
|
1435
|
-
});
|
|
1436
|
-
Field.displayName = 'Field';
|
|
1437
|
-
|
|
1438
|
-
const FieldsetContext = React.createContext(undefined);
|
|
1439
|
-
const useFieldsetContext = () => {
|
|
1440
|
-
const fieldsetContext = React.useContext(FieldsetContext);
|
|
1441
|
-
return fieldsetContext;
|
|
1442
|
-
};
|
|
1443
|
-
|
|
1444
|
-
const LegendComponent = React.forwardRef((props, ref) => {
|
|
1445
|
-
const fieldsetContext = useFieldsetContext();
|
|
1446
|
-
return React__namespace.default.createElement(StyledLegend, _extends$t({}, props, fieldsetContext, {
|
|
1447
|
-
ref: ref
|
|
1448
|
-
}));
|
|
1449
|
-
});
|
|
1450
|
-
LegendComponent.displayName = 'Fieldset.Legend';
|
|
1451
|
-
const Legend = LegendComponent;
|
|
1452
|
-
|
|
1453
|
-
const FieldsetComponent = React.forwardRef((props, ref) => {
|
|
1454
|
-
const fieldsetContext = React.useMemo(() => ({
|
|
1455
|
-
isCompact: props.isCompact
|
|
1456
|
-
}), [props.isCompact]);
|
|
1457
|
-
return React__namespace.default.createElement(FieldsetContext.Provider, {
|
|
1458
|
-
value: fieldsetContext
|
|
1459
|
-
}, React__namespace.default.createElement(StyledFieldset, _extends$t({}, props, {
|
|
1460
|
-
ref: ref
|
|
1461
|
-
})));
|
|
1462
|
-
});
|
|
1463
|
-
FieldsetComponent.displayName = 'Fieldset';
|
|
1464
|
-
FieldsetComponent.propTypes = {
|
|
1465
|
-
isCompact: PropTypes__default.default.bool
|
|
1795
|
+
const COMPONENT_ID = 'forms.tile_label';
|
|
1796
|
+
const sizeStyles = _ref => {
|
|
1797
|
+
let {
|
|
1798
|
+
theme,
|
|
1799
|
+
isCentered
|
|
1800
|
+
} = _ref;
|
|
1801
|
+
const marginTop = isCentered ? `${theme.space.base * 2}px` : 0;
|
|
1802
|
+
const marginHorizontal = isCentered ? undefined : polished.math(`(${theme.iconSizes.md} * 2) + ${theme.space.base * 5}px`);
|
|
1803
|
+
const fontSize = theme.fontSizes.md;
|
|
1804
|
+
const lineHeight = reactTheming.getLineHeight(theme.space.base * 5, fontSize);
|
|
1805
|
+
return styled.css(["margin-top:", ";margin-", ":", ";line-height:", ";font-size:", ";"], marginTop, theme.rtl ? 'right' : 'left', marginHorizontal, lineHeight, fontSize);
|
|
1806
|
+
};
|
|
1807
|
+
const StyledTileLabel = styled__default.default.span.attrs({
|
|
1808
|
+
'data-garden-id': COMPONENT_ID,
|
|
1809
|
+
'data-garden-version': '9.0.0-next.21'
|
|
1810
|
+
}).withConfig({
|
|
1811
|
+
displayName: "StyledTileLabel",
|
|
1812
|
+
componentId: "sc-1mypv27-0"
|
|
1813
|
+
})(["display:block;text-align:", ";font-weight:", ";", ";", ";"], props => props.isCentered && 'center', props => props.theme.fontWeights.semibold, sizeStyles, props => reactTheming.retrieveComponentStyles(COMPONENT_ID, props));
|
|
1814
|
+
StyledTileLabel.defaultProps = {
|
|
1815
|
+
theme: reactTheming.DEFAULT_THEME
|
|
1466
1816
|
};
|
|
1467
|
-
const Fieldset = FieldsetComponent;
|
|
1468
|
-
Fieldset.Legend = Legend;
|
|
1469
1817
|
|
|
1470
1818
|
const InputContext = React.createContext(undefined);
|
|
1471
1819
|
const useInputContext = () => {
|
|
@@ -1503,11 +1851,76 @@ const Hint = React__namespace.default.forwardRef((props, ref) => {
|
|
|
1503
1851
|
if (getHintProps) {
|
|
1504
1852
|
combinedProps = getHintProps(combinedProps);
|
|
1505
1853
|
}
|
|
1506
|
-
return React__namespace.default.createElement(HintComponent,
|
|
1854
|
+
return React__namespace.default.createElement(HintComponent, Object.assign({
|
|
1507
1855
|
ref: ref
|
|
1508
1856
|
}, combinedProps));
|
|
1509
1857
|
});
|
|
1510
|
-
Hint.displayName = 'Hint';
|
|
1858
|
+
Hint.displayName = 'Field.Hint';
|
|
1859
|
+
|
|
1860
|
+
const VALIDATION = ['success', 'warning', 'error'];
|
|
1861
|
+
const FILE_VALIDATION = ['success', 'error'];
|
|
1862
|
+
const FILE_TYPE = ['pdf', 'zip', 'image', 'document', 'spreadsheet', 'presentation', 'generic'];
|
|
1863
|
+
|
|
1864
|
+
const Message = React__namespace.default.forwardRef((_ref, ref) => {
|
|
1865
|
+
let {
|
|
1866
|
+
validation,
|
|
1867
|
+
validationLabel,
|
|
1868
|
+
children,
|
|
1869
|
+
...props
|
|
1870
|
+
} = _ref;
|
|
1871
|
+
const {
|
|
1872
|
+
hasMessage,
|
|
1873
|
+
setHasMessage,
|
|
1874
|
+
getMessageProps
|
|
1875
|
+
} = useFieldContext() || {};
|
|
1876
|
+
const type = useInputContext();
|
|
1877
|
+
React.useEffect(() => {
|
|
1878
|
+
if (!hasMessage && setHasMessage) {
|
|
1879
|
+
setHasMessage(true);
|
|
1880
|
+
}
|
|
1881
|
+
return () => {
|
|
1882
|
+
if (hasMessage && setHasMessage) {
|
|
1883
|
+
setHasMessage(false);
|
|
1884
|
+
}
|
|
1885
|
+
};
|
|
1886
|
+
}, [hasMessage, setHasMessage]);
|
|
1887
|
+
let MessageComponent;
|
|
1888
|
+
if (type === 'checkbox') {
|
|
1889
|
+
MessageComponent = StyledCheckMessage;
|
|
1890
|
+
} else if (type === 'radio') {
|
|
1891
|
+
MessageComponent = StyledRadioMessage;
|
|
1892
|
+
} else if (type === 'toggle') {
|
|
1893
|
+
MessageComponent = StyledToggleMessage;
|
|
1894
|
+
} else {
|
|
1895
|
+
MessageComponent = StyledMessage;
|
|
1896
|
+
}
|
|
1897
|
+
let combinedProps = {
|
|
1898
|
+
validation,
|
|
1899
|
+
validationLabel,
|
|
1900
|
+
...props
|
|
1901
|
+
};
|
|
1902
|
+
if (getMessageProps) {
|
|
1903
|
+
combinedProps = getMessageProps(combinedProps);
|
|
1904
|
+
}
|
|
1905
|
+
const ariaLabel = reactTheming.useText(Message, combinedProps, 'validationLabel', validation, validation !== undefined);
|
|
1906
|
+
return React__namespace.default.createElement(MessageComponent, Object.assign({
|
|
1907
|
+
ref: ref
|
|
1908
|
+
}, combinedProps), validation && React__namespace.default.createElement(StyledMessageIcon, {
|
|
1909
|
+
validation: validation,
|
|
1910
|
+
"aria-label": ariaLabel
|
|
1911
|
+
}), children);
|
|
1912
|
+
});
|
|
1913
|
+
Message.displayName = 'Field.Message';
|
|
1914
|
+
Message.propTypes = {
|
|
1915
|
+
validation: PropTypes__default.default.oneOf(VALIDATION),
|
|
1916
|
+
validationLabel: PropTypes__default.default.string
|
|
1917
|
+
};
|
|
1918
|
+
|
|
1919
|
+
const FieldsetContext = React.createContext(undefined);
|
|
1920
|
+
const useFieldsetContext = () => {
|
|
1921
|
+
const fieldsetContext = React.useContext(FieldsetContext);
|
|
1922
|
+
return fieldsetContext;
|
|
1923
|
+
};
|
|
1511
1924
|
|
|
1512
1925
|
const Label$1 = React__namespace.default.forwardRef((props, ref) => {
|
|
1513
1926
|
const fieldContext = useFieldContext();
|
|
@@ -1519,8 +1932,7 @@ const Label$1 = React__namespace.default.forwardRef((props, ref) => {
|
|
|
1519
1932
|
if (type === undefined) {
|
|
1520
1933
|
const {
|
|
1521
1934
|
setIsLabelActive,
|
|
1522
|
-
setIsLabelHovered
|
|
1523
|
-
multiThumbRangeRef
|
|
1935
|
+
setIsLabelHovered
|
|
1524
1936
|
} = fieldContext;
|
|
1525
1937
|
combinedProps = {
|
|
1526
1938
|
...combinedProps,
|
|
@@ -1535,9 +1947,6 @@ const Label$1 = React__namespace.default.forwardRef((props, ref) => {
|
|
|
1535
1947
|
}),
|
|
1536
1948
|
onMouseLeave: containerUtilities.composeEventHandlers(props.onMouseLeave, () => {
|
|
1537
1949
|
setIsLabelHovered(false);
|
|
1538
|
-
}),
|
|
1539
|
-
onClick: containerUtilities.composeEventHandlers(props.onClick, () => {
|
|
1540
|
-
multiThumbRangeRef.current && multiThumbRangeRef.current.focus();
|
|
1541
1950
|
})
|
|
1542
1951
|
};
|
|
1543
1952
|
}
|
|
@@ -1549,12 +1958,12 @@ const Label$1 = React__namespace.default.forwardRef((props, ref) => {
|
|
|
1549
1958
|
};
|
|
1550
1959
|
}
|
|
1551
1960
|
if (type === 'radio') {
|
|
1552
|
-
return React__namespace.default.createElement(StyledRadioLabel,
|
|
1961
|
+
return React__namespace.default.createElement(StyledRadioLabel, Object.assign({
|
|
1553
1962
|
ref: ref
|
|
1554
1963
|
}, combinedProps), React__namespace.default.createElement(StyledRadioSvg, null), props.children);
|
|
1555
1964
|
} else if (type === 'checkbox') {
|
|
1556
1965
|
const onLabelSelect = e => {
|
|
1557
|
-
const isFirefox = navigator
|
|
1966
|
+
const isFirefox = navigator?.userAgent.toLowerCase().indexOf('firefox') > -1;
|
|
1558
1967
|
if (fieldContext && isFirefox && e.target instanceof Element) {
|
|
1559
1968
|
const inputId = e.target.getAttribute('for');
|
|
1560
1969
|
if (!inputId) return;
|
|
@@ -1572,81 +1981,87 @@ const Label$1 = React__namespace.default.forwardRef((props, ref) => {
|
|
|
1572
1981
|
...combinedProps,
|
|
1573
1982
|
onClick: containerUtilities.composeEventHandlers(combinedProps.onClick, onLabelSelect)
|
|
1574
1983
|
};
|
|
1575
|
-
return React__namespace.default.createElement(StyledCheckLabel,
|
|
1984
|
+
return React__namespace.default.createElement(StyledCheckLabel, Object.assign({
|
|
1576
1985
|
ref: ref
|
|
1577
1986
|
}, combinedProps), React__namespace.default.createElement(StyledCheckSvg, null), React__namespace.default.createElement(StyledDashSvg, null), props.children);
|
|
1578
1987
|
} else if (type === 'toggle') {
|
|
1579
|
-
return React__namespace.default.createElement(StyledToggleLabel,
|
|
1988
|
+
return React__namespace.default.createElement(StyledToggleLabel, Object.assign({
|
|
1580
1989
|
ref: ref
|
|
1581
1990
|
}, combinedProps), React__namespace.default.createElement(StyledToggleSvg, null), props.children);
|
|
1582
1991
|
}
|
|
1583
|
-
return React__namespace.default.createElement(StyledLabel,
|
|
1992
|
+
return React__namespace.default.createElement(StyledLabel, Object.assign({
|
|
1584
1993
|
ref: ref
|
|
1585
1994
|
}, combinedProps));
|
|
1586
1995
|
});
|
|
1587
|
-
Label$1.displayName = 'Label';
|
|
1996
|
+
Label$1.displayName = 'Field.Label';
|
|
1588
1997
|
Label$1.propTypes = {
|
|
1589
1998
|
isRegular: PropTypes__default.default.bool
|
|
1590
1999
|
};
|
|
1591
2000
|
|
|
1592
|
-
const
|
|
1593
|
-
const
|
|
1594
|
-
const
|
|
1595
|
-
|
|
1596
|
-
const
|
|
1597
|
-
let {
|
|
1598
|
-
validation,
|
|
1599
|
-
validationLabel,
|
|
1600
|
-
children,
|
|
1601
|
-
...props
|
|
1602
|
-
} = _ref;
|
|
2001
|
+
const FieldComponent = React__namespace.default.forwardRef((props, ref) => {
|
|
2002
|
+
const [hasHint, setHasHint] = React.useState(false);
|
|
2003
|
+
const [hasMessage, setHasMessage] = React.useState(false);
|
|
2004
|
+
const [isLabelActive, setIsLabelActive] = React.useState(false);
|
|
2005
|
+
const [isLabelHovered, setIsLabelHovered] = React.useState(false);
|
|
1603
2006
|
const {
|
|
2007
|
+
getInputProps,
|
|
2008
|
+
getMessageProps,
|
|
2009
|
+
...propGetters
|
|
2010
|
+
} = containerField.useField({
|
|
2011
|
+
idPrefix: props.id,
|
|
2012
|
+
hasHint,
|
|
2013
|
+
hasMessage
|
|
2014
|
+
});
|
|
2015
|
+
const fieldProps = React.useMemo(() => ({
|
|
2016
|
+
...propGetters,
|
|
2017
|
+
getInputProps,
|
|
2018
|
+
getMessageProps,
|
|
2019
|
+
isLabelActive,
|
|
2020
|
+
setIsLabelActive,
|
|
2021
|
+
isLabelHovered,
|
|
2022
|
+
setIsLabelHovered,
|
|
2023
|
+
hasHint,
|
|
2024
|
+
setHasHint,
|
|
1604
2025
|
hasMessage,
|
|
1605
|
-
setHasMessage
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
if (!hasMessage && setHasMessage) {
|
|
1611
|
-
setHasMessage(true);
|
|
1612
|
-
}
|
|
1613
|
-
return () => {
|
|
1614
|
-
if (hasMessage && setHasMessage) {
|
|
1615
|
-
setHasMessage(false);
|
|
1616
|
-
}
|
|
1617
|
-
};
|
|
1618
|
-
}, [hasMessage, setHasMessage]);
|
|
1619
|
-
let MessageComponent;
|
|
1620
|
-
if (type === 'checkbox') {
|
|
1621
|
-
MessageComponent = StyledCheckMessage;
|
|
1622
|
-
} else if (type === 'radio') {
|
|
1623
|
-
MessageComponent = StyledRadioMessage;
|
|
1624
|
-
} else if (type === 'toggle') {
|
|
1625
|
-
MessageComponent = StyledToggleMessage;
|
|
1626
|
-
} else {
|
|
1627
|
-
MessageComponent = StyledMessage;
|
|
1628
|
-
}
|
|
1629
|
-
let combinedProps = {
|
|
1630
|
-
validation,
|
|
1631
|
-
validationLabel,
|
|
1632
|
-
...props
|
|
1633
|
-
};
|
|
1634
|
-
if (getMessageProps) {
|
|
1635
|
-
combinedProps = getMessageProps(combinedProps);
|
|
1636
|
-
}
|
|
1637
|
-
const ariaLabel = reactTheming.useText(Message, combinedProps, 'validationLabel', validation, validation !== undefined);
|
|
1638
|
-
return React__namespace.default.createElement(MessageComponent, _extends$t({
|
|
2026
|
+
setHasMessage
|
|
2027
|
+
}), [propGetters, getInputProps, getMessageProps, isLabelActive, isLabelHovered, hasHint, hasMessage]);
|
|
2028
|
+
return React__namespace.default.createElement(FieldContext.Provider, {
|
|
2029
|
+
value: fieldProps
|
|
2030
|
+
}, React__namespace.default.createElement(StyledField, Object.assign({}, props, {
|
|
1639
2031
|
ref: ref
|
|
1640
|
-
}
|
|
1641
|
-
validation: validation,
|
|
1642
|
-
"aria-label": ariaLabel
|
|
1643
|
-
}), children);
|
|
2032
|
+
})));
|
|
1644
2033
|
});
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
2034
|
+
FieldComponent.displayName = 'Field';
|
|
2035
|
+
const Field = FieldComponent;
|
|
2036
|
+
Field.Hint = Hint;
|
|
2037
|
+
Field.Label = Label$1;
|
|
2038
|
+
Field.Message = Message;
|
|
2039
|
+
|
|
2040
|
+
const LegendComponent = React.forwardRef((props, ref) => {
|
|
2041
|
+
const fieldsetContext = useFieldsetContext();
|
|
2042
|
+
return React__namespace.default.createElement(StyledLegend, Object.assign({}, props, fieldsetContext, {
|
|
2043
|
+
ref: ref
|
|
2044
|
+
}));
|
|
2045
|
+
});
|
|
2046
|
+
LegendComponent.displayName = 'Fieldset.Legend';
|
|
2047
|
+
const Legend = LegendComponent;
|
|
2048
|
+
|
|
2049
|
+
const FieldsetComponent = React.forwardRef((props, ref) => {
|
|
2050
|
+
const fieldsetContext = React.useMemo(() => ({
|
|
2051
|
+
isCompact: props.isCompact
|
|
2052
|
+
}), [props.isCompact]);
|
|
2053
|
+
return React__namespace.default.createElement(FieldsetContext.Provider, {
|
|
2054
|
+
value: fieldsetContext
|
|
2055
|
+
}, React__namespace.default.createElement(StyledFieldset, Object.assign({}, props, {
|
|
2056
|
+
ref: ref
|
|
2057
|
+
})));
|
|
2058
|
+
});
|
|
2059
|
+
FieldsetComponent.displayName = 'Fieldset';
|
|
2060
|
+
FieldsetComponent.propTypes = {
|
|
2061
|
+
isCompact: PropTypes__default.default.bool
|
|
1649
2062
|
};
|
|
2063
|
+
const Fieldset = FieldsetComponent;
|
|
2064
|
+
Fieldset.Legend = Legend;
|
|
1650
2065
|
|
|
1651
2066
|
const Checkbox = React__namespace.default.forwardRef((_ref, ref) => {
|
|
1652
2067
|
let {
|
|
@@ -1940,31 +2355,41 @@ Toggle.propTypes = {
|
|
|
1940
2355
|
isCompact: PropTypes__default.default.bool
|
|
1941
2356
|
};
|
|
1942
2357
|
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
2358
|
+
const StartIconComponent = _ref => {
|
|
2359
|
+
let {
|
|
2360
|
+
isDisabled,
|
|
2361
|
+
isFocused,
|
|
2362
|
+
isHovered,
|
|
2363
|
+
isRotated,
|
|
2364
|
+
...props
|
|
2365
|
+
} = _ref;
|
|
2366
|
+
return React__namespace.default.createElement(StyledTextMediaFigure, Object.assign({
|
|
2367
|
+
$position: "start",
|
|
2368
|
+
$isDisabled: isDisabled,
|
|
2369
|
+
$isFocused: isFocused,
|
|
2370
|
+
$isHovered: isHovered,
|
|
2371
|
+
$isRotated: isRotated
|
|
2372
|
+
}, props));
|
|
1957
2373
|
};
|
|
1958
|
-
|
|
1959
|
-
const StartIconComponent = props => React__namespace.default.createElement(StyledTextMediaFigure, _extends$t({
|
|
1960
|
-
position: "start"
|
|
1961
|
-
}, props));
|
|
1962
2374
|
StartIconComponent.displayName = 'FauxInput.StartIcon';
|
|
1963
2375
|
const StartIcon = StartIconComponent;
|
|
1964
2376
|
|
|
1965
|
-
const EndIconComponent =
|
|
1966
|
-
|
|
1967
|
-
|
|
2377
|
+
const EndIconComponent = _ref => {
|
|
2378
|
+
let {
|
|
2379
|
+
isDisabled,
|
|
2380
|
+
isFocused,
|
|
2381
|
+
isHovered,
|
|
2382
|
+
isRotated,
|
|
2383
|
+
...props
|
|
2384
|
+
} = _ref;
|
|
2385
|
+
return React__namespace.default.createElement(StyledTextMediaFigure, Object.assign({
|
|
2386
|
+
$position: "end",
|
|
2387
|
+
$isDisabled: isDisabled,
|
|
2388
|
+
$isFocused: isFocused,
|
|
2389
|
+
$isHovered: isHovered,
|
|
2390
|
+
$isRotated: isRotated
|
|
2391
|
+
}, props));
|
|
2392
|
+
};
|
|
1968
2393
|
EndIconComponent.displayName = 'FauxInput.EndIcon';
|
|
1969
2394
|
const EndIcon = EndIconComponent;
|
|
1970
2395
|
|
|
@@ -1984,7 +2409,7 @@ const FauxInputComponent = React.forwardRef((_ref, ref) => {
|
|
|
1984
2409
|
const onBlurHandler = containerUtilities.composeEventHandlers(onBlur, () => {
|
|
1985
2410
|
setIsFocused(false);
|
|
1986
2411
|
});
|
|
1987
|
-
return React__namespace.default.createElement(StyledTextFauxInput,
|
|
2412
|
+
return React__namespace.default.createElement(StyledTextFauxInput, Object.assign({
|
|
1988
2413
|
onFocus: onFocusHandler,
|
|
1989
2414
|
onBlur: onBlurHandler,
|
|
1990
2415
|
isFocused: controlledIsFocused === undefined ? isFocused : controlledIsFocused,
|
|
@@ -2035,6 +2460,7 @@ const Select = React__namespace.default.forwardRef((_ref, ref) => {
|
|
|
2035
2460
|
return React__namespace.default.createElement(StyledSelectWrapper, {
|
|
2036
2461
|
isCompact: isCompact,
|
|
2037
2462
|
isBare: isBare,
|
|
2463
|
+
isDisabled: disabled,
|
|
2038
2464
|
validation: validation,
|
|
2039
2465
|
focusInset: focusInset
|
|
2040
2466
|
}, React__namespace.default.createElement(StyledSelect, combinedProps), !isBare && React__namespace.default.createElement(FauxInput.EndIcon, {
|
|
@@ -2049,110 +2475,6 @@ Select.propTypes = {
|
|
|
2049
2475
|
};
|
|
2050
2476
|
Select.displayName = 'Select';
|
|
2051
2477
|
|
|
2052
|
-
const MIN = 0;
|
|
2053
|
-
const MAX = 100;
|
|
2054
|
-
const MultiThumbRange = React.forwardRef((_ref, ref) => {
|
|
2055
|
-
let {
|
|
2056
|
-
min = MIN,
|
|
2057
|
-
max = MAX,
|
|
2058
|
-
minValue,
|
|
2059
|
-
maxValue,
|
|
2060
|
-
disabled,
|
|
2061
|
-
step,
|
|
2062
|
-
jump,
|
|
2063
|
-
onChange,
|
|
2064
|
-
onMouseDown,
|
|
2065
|
-
...props
|
|
2066
|
-
} = _ref;
|
|
2067
|
-
const theme = React.useContext(styled.ThemeContext);
|
|
2068
|
-
const environment = reactTheming.useDocument(theme);
|
|
2069
|
-
const trackRailRef = React.useRef(null);
|
|
2070
|
-
const minThumbRef = React.useRef(null);
|
|
2071
|
-
const maxThumbRef = React.useRef(null);
|
|
2072
|
-
const {
|
|
2073
|
-
getTrackProps,
|
|
2074
|
-
getMinThumbProps,
|
|
2075
|
-
getMaxThumbProps,
|
|
2076
|
-
trackRect,
|
|
2077
|
-
minValue: updatedMinValue,
|
|
2078
|
-
maxValue: updatedMaxValue
|
|
2079
|
-
} = containerSlider.useSlider({
|
|
2080
|
-
trackRef: trackRailRef,
|
|
2081
|
-
minThumbRef,
|
|
2082
|
-
maxThumbRef,
|
|
2083
|
-
min,
|
|
2084
|
-
max,
|
|
2085
|
-
minValue,
|
|
2086
|
-
maxValue,
|
|
2087
|
-
onChange,
|
|
2088
|
-
step,
|
|
2089
|
-
jump,
|
|
2090
|
-
disabled,
|
|
2091
|
-
rtl: theme.rtl,
|
|
2092
|
-
environment
|
|
2093
|
-
});
|
|
2094
|
-
const {
|
|
2095
|
-
onMouseDown: onSliderMouseDown,
|
|
2096
|
-
...trackProps
|
|
2097
|
-
} = getTrackProps({
|
|
2098
|
-
onMouseDown
|
|
2099
|
-
});
|
|
2100
|
-
const fieldContext = useFieldContext();
|
|
2101
|
-
const {
|
|
2102
|
-
isLabelHovered,
|
|
2103
|
-
isLabelActive,
|
|
2104
|
-
multiThumbRangeRef
|
|
2105
|
-
} = fieldContext || {};
|
|
2106
|
-
React.useEffect(() => {
|
|
2107
|
-
if (multiThumbRangeRef) {
|
|
2108
|
-
multiThumbRangeRef.current = minThumbRef.current;
|
|
2109
|
-
}
|
|
2110
|
-
}, [multiThumbRangeRef]);
|
|
2111
|
-
const minPosition = (updatedMinValue - min) / (max - min) * trackRect.width;
|
|
2112
|
-
const maxPosition = (updatedMaxValue - min) / (max - min) * trackRect.width;
|
|
2113
|
-
const sliderBackgroundSize = Math.abs(maxPosition) - Math.abs(minPosition);
|
|
2114
|
-
return React__namespace.default.createElement(StyledSlider, _extends$t({
|
|
2115
|
-
ref: ref,
|
|
2116
|
-
onMouseDown: onSliderMouseDown
|
|
2117
|
-
}, props), React__namespace.default.createElement(StyledSliderTrack, {
|
|
2118
|
-
backgroundSize: sliderBackgroundSize,
|
|
2119
|
-
backgroundPosition: theme.rtl ? trackRect.width - maxPosition : minPosition,
|
|
2120
|
-
isDisabled: disabled
|
|
2121
|
-
}, React__namespace.default.createElement(StyledSliderTrackRail, _extends$t({}, trackProps, {
|
|
2122
|
-
ref: trackRailRef
|
|
2123
|
-
}), React__namespace.default.createElement(StyledSliderThumb, _extends$t({}, getMinThumbProps({
|
|
2124
|
-
'aria-label': updatedMinValue
|
|
2125
|
-
}), {
|
|
2126
|
-
isDisabled: disabled,
|
|
2127
|
-
position: minPosition,
|
|
2128
|
-
ref: minThumbRef,
|
|
2129
|
-
"data-garden-active": isLabelActive,
|
|
2130
|
-
"data-garden-hover": isLabelHovered
|
|
2131
|
-
})), React__namespace.default.createElement(StyledSliderThumb, _extends$t({}, getMaxThumbProps({
|
|
2132
|
-
'aria-label': updatedMaxValue
|
|
2133
|
-
}), {
|
|
2134
|
-
isDisabled: disabled,
|
|
2135
|
-
position: maxPosition,
|
|
2136
|
-
ref: maxThumbRef
|
|
2137
|
-
})))));
|
|
2138
|
-
});
|
|
2139
|
-
MultiThumbRange.displayName = 'MultiThumbRange';
|
|
2140
|
-
MultiThumbRange.propTypes = {
|
|
2141
|
-
min: PropTypes__default.default.number,
|
|
2142
|
-
max: PropTypes__default.default.number,
|
|
2143
|
-
minValue: PropTypes__default.default.number,
|
|
2144
|
-
maxValue: PropTypes__default.default.number,
|
|
2145
|
-
step: PropTypes__default.default.number,
|
|
2146
|
-
jump: PropTypes__default.default.number,
|
|
2147
|
-
disabled: PropTypes__default.default.bool,
|
|
2148
|
-
onChange: PropTypes__default.default.func
|
|
2149
|
-
};
|
|
2150
|
-
MultiThumbRange.defaultProps = {
|
|
2151
|
-
min: MIN,
|
|
2152
|
-
max: MAX,
|
|
2153
|
-
step: 1
|
|
2154
|
-
};
|
|
2155
|
-
|
|
2156
2478
|
const TilesContext = React.createContext(undefined);
|
|
2157
2479
|
const useTilesContext = () => {
|
|
2158
2480
|
return React.useContext(TilesContext);
|
|
@@ -2175,12 +2497,10 @@ const TileComponent = React__namespace.default.forwardRef((_ref, ref) => {
|
|
|
2175
2497
|
onChange: tilesContext.onChange
|
|
2176
2498
|
};
|
|
2177
2499
|
}
|
|
2178
|
-
return React__namespace.default.createElement(StyledTile,
|
|
2500
|
+
return React__namespace.default.createElement(StyledTile, Object.assign({
|
|
2179
2501
|
ref: ref,
|
|
2180
|
-
"aria-disabled": disabled
|
|
2181
|
-
|
|
2182
|
-
isSelected: tilesContext && tilesContext.value === value
|
|
2183
|
-
}, props), children, React__namespace.default.createElement(StyledTileInput, _extends$t({}, inputProps, {
|
|
2502
|
+
"aria-disabled": disabled
|
|
2503
|
+
}, props), children, React__namespace.default.createElement(StyledTileInput, Object.assign({}, inputProps, {
|
|
2184
2504
|
disabled: disabled,
|
|
2185
2505
|
value: value,
|
|
2186
2506
|
type: "radio",
|
|
@@ -2196,7 +2516,7 @@ const Tile = TileComponent;
|
|
|
2196
2516
|
|
|
2197
2517
|
const DescriptionComponent = React.forwardRef((props, ref) => {
|
|
2198
2518
|
const tilesContext = useTilesContext();
|
|
2199
|
-
return React__namespace.default.createElement(StyledTileDescription,
|
|
2519
|
+
return React__namespace.default.createElement(StyledTileDescription, Object.assign({
|
|
2200
2520
|
ref: ref,
|
|
2201
2521
|
isCentered: tilesContext && tilesContext.isCentered
|
|
2202
2522
|
}, props));
|
|
@@ -2206,7 +2526,7 @@ const Description = DescriptionComponent;
|
|
|
2206
2526
|
|
|
2207
2527
|
const IconComponent = React.forwardRef((props, ref) => {
|
|
2208
2528
|
const tileContext = useTilesContext();
|
|
2209
|
-
return React__namespace.default.createElement(StyledTileIcon,
|
|
2529
|
+
return React__namespace.default.createElement(StyledTileIcon, Object.assign({
|
|
2210
2530
|
ref: ref,
|
|
2211
2531
|
isCentered: tileContext && tileContext.isCentered
|
|
2212
2532
|
}, props));
|
|
@@ -2223,7 +2543,7 @@ const LabelComponent = React.forwardRef((props, forwardedRef) => {
|
|
|
2223
2543
|
setTitle(ref.current.textContent || undefined);
|
|
2224
2544
|
}
|
|
2225
2545
|
}, [ref]);
|
|
2226
|
-
return React__namespace.default.createElement(StyledTileLabel,
|
|
2546
|
+
return React__namespace.default.createElement(StyledTileLabel, Object.assign({
|
|
2227
2547
|
ref: reactMergeRefs.mergeRefs([ref, forwardedRef]),
|
|
2228
2548
|
title: title,
|
|
2229
2549
|
isCentered: tilesContext && tilesContext.isCentered
|
|
@@ -2259,7 +2579,7 @@ const TilesComponent = React.forwardRef((_ref, ref) => {
|
|
|
2259
2579
|
}), [handleOnChange, selectedValue, name, isCentered]);
|
|
2260
2580
|
return React__namespace.default.createElement(TilesContext.Provider, {
|
|
2261
2581
|
value: tileContext
|
|
2262
|
-
}, React__namespace.default.createElement("div",
|
|
2582
|
+
}, React__namespace.default.createElement("div", Object.assign({
|
|
2263
2583
|
ref: ref,
|
|
2264
2584
|
role: "radiogroup"
|
|
2265
2585
|
}, props)));
|
|
@@ -2290,7 +2610,7 @@ const InputGroup = React__namespace.default.forwardRef((_ref, ref) => {
|
|
|
2290
2610
|
}), [isCompact]);
|
|
2291
2611
|
return React__namespace.default.createElement(InputGroupContext.Provider, {
|
|
2292
2612
|
value: contextValue
|
|
2293
|
-
}, React__namespace.default.createElement(StyledInputGroup,
|
|
2613
|
+
}, React__namespace.default.createElement(StyledInputGroup, Object.assign({
|
|
2294
2614
|
ref: ref,
|
|
2295
2615
|
isCompact: isCompact
|
|
2296
2616
|
}, props)));
|
|
@@ -2306,7 +2626,7 @@ const FileUpload = React__namespace.default.forwardRef((_ref, ref) => {
|
|
|
2306
2626
|
...props
|
|
2307
2627
|
} = _ref;
|
|
2308
2628
|
return (
|
|
2309
|
-
React__namespace.default.createElement(StyledFileUpload,
|
|
2629
|
+
React__namespace.default.createElement(StyledFileUpload, Object.assign({
|
|
2310
2630
|
ref: ref,
|
|
2311
2631
|
"aria-disabled": disabled
|
|
2312
2632
|
}, props, {
|
|
@@ -2325,7 +2645,7 @@ const ItemComponent = React.forwardRef((_ref, ref) => {
|
|
|
2325
2645
|
let {
|
|
2326
2646
|
...props
|
|
2327
2647
|
} = _ref;
|
|
2328
|
-
return React__namespace.default.createElement(StyledFileListItem,
|
|
2648
|
+
return React__namespace.default.createElement(StyledFileListItem, Object.assign({}, props, {
|
|
2329
2649
|
ref: ref
|
|
2330
2650
|
}));
|
|
2331
2651
|
});
|
|
@@ -2336,7 +2656,7 @@ const FileListComponent = React.forwardRef((_ref, ref) => {
|
|
|
2336
2656
|
let {
|
|
2337
2657
|
...props
|
|
2338
2658
|
} = _ref;
|
|
2339
|
-
return React__namespace.default.createElement(StyledFileList,
|
|
2659
|
+
return React__namespace.default.createElement(StyledFileList, Object.assign({}, props, {
|
|
2340
2660
|
ref: ref
|
|
2341
2661
|
}));
|
|
2342
2662
|
});
|
|
@@ -2345,7 +2665,7 @@ const FileList = FileListComponent;
|
|
|
2345
2665
|
FileList.Item = Item;
|
|
2346
2666
|
|
|
2347
2667
|
var _path$j;
|
|
2348
|
-
function _extends$k() { _extends$k = Object.assign ? Object.assign.bind() : function (
|
|
2668
|
+
function _extends$k() { return _extends$k = 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$k.apply(null, arguments); }
|
|
2349
2669
|
var SvgXStroke$1 = function SvgXStroke(props) {
|
|
2350
2670
|
return /*#__PURE__*/React__namespace.createElement("svg", _extends$k({
|
|
2351
2671
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2362,7 +2682,7 @@ var SvgXStroke$1 = function SvgXStroke(props) {
|
|
|
2362
2682
|
};
|
|
2363
2683
|
|
|
2364
2684
|
var _path$i;
|
|
2365
|
-
function _extends$j() { _extends$j = Object.assign ? Object.assign.bind() : function (
|
|
2685
|
+
function _extends$j() { return _extends$j = 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$j.apply(null, arguments); }
|
|
2366
2686
|
var SvgXStroke = function SvgXStroke(props) {
|
|
2367
2687
|
return /*#__PURE__*/React__namespace.createElement("svg", _extends$j({
|
|
2368
2688
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2388,7 +2708,7 @@ const CloseComponent = React__namespace.default.forwardRef((props, ref) => {
|
|
|
2388
2708
|
const onMouseDown = containerUtilities.composeEventHandlers(props.onMouseDown, event => event.preventDefault()
|
|
2389
2709
|
);
|
|
2390
2710
|
const ariaLabel = reactTheming.useText(CloseComponent, props, 'aria-label', 'Close');
|
|
2391
|
-
return React__namespace.default.createElement(StyledFileClose,
|
|
2711
|
+
return React__namespace.default.createElement(StyledFileClose, Object.assign({
|
|
2392
2712
|
ref: ref,
|
|
2393
2713
|
"aria-label": ariaLabel
|
|
2394
2714
|
}, props, {
|
|
@@ -2401,7 +2721,7 @@ CloseComponent.displayName = 'File.Close';
|
|
|
2401
2721
|
const Close = CloseComponent;
|
|
2402
2722
|
|
|
2403
2723
|
var _path$h;
|
|
2404
|
-
function _extends$i() { _extends$i = Object.assign ? Object.assign.bind() : function (
|
|
2724
|
+
function _extends$i() { return _extends$i = 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$i.apply(null, arguments); }
|
|
2405
2725
|
var SvgTrashStroke$1 = function SvgTrashStroke(props) {
|
|
2406
2726
|
return /*#__PURE__*/React__namespace.createElement("svg", _extends$i({
|
|
2407
2727
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2419,7 +2739,7 @@ var SvgTrashStroke$1 = function SvgTrashStroke(props) {
|
|
|
2419
2739
|
};
|
|
2420
2740
|
|
|
2421
2741
|
var _path$g;
|
|
2422
|
-
function _extends$h() { _extends$h = Object.assign ? Object.assign.bind() : function (
|
|
2742
|
+
function _extends$h() { return _extends$h = 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$h.apply(null, arguments); }
|
|
2423
2743
|
var SvgTrashStroke = function SvgTrashStroke(props) {
|
|
2424
2744
|
return /*#__PURE__*/React__namespace.createElement("svg", _extends$h({
|
|
2425
2745
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2441,7 +2761,7 @@ const DeleteComponent = React__namespace.default.forwardRef((props, ref) => {
|
|
|
2441
2761
|
const onMouseDown = containerUtilities.composeEventHandlers(props.onMouseDown, event => event.preventDefault()
|
|
2442
2762
|
);
|
|
2443
2763
|
const ariaLabel = reactTheming.useText(DeleteComponent, props, 'aria-label', 'Delete');
|
|
2444
|
-
return React__namespace.default.createElement(StyledFileDelete,
|
|
2764
|
+
return React__namespace.default.createElement(StyledFileDelete, Object.assign({
|
|
2445
2765
|
ref: ref,
|
|
2446
2766
|
"aria-label": ariaLabel
|
|
2447
2767
|
}, props, {
|
|
@@ -2454,7 +2774,7 @@ DeleteComponent.displayName = 'File.Delete';
|
|
|
2454
2774
|
const Delete = DeleteComponent;
|
|
2455
2775
|
|
|
2456
2776
|
var _path$f, _rect$1;
|
|
2457
|
-
function _extends$g() { _extends$g = Object.assign ? Object.assign.bind() : function (
|
|
2777
|
+
function _extends$g() { return _extends$g = 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$g.apply(null, arguments); }
|
|
2458
2778
|
var SvgFilePdfStroke$1 = function SvgFilePdfStroke(props) {
|
|
2459
2779
|
return /*#__PURE__*/React__namespace.createElement("svg", _extends$g({
|
|
2460
2780
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2480,7 +2800,7 @@ var SvgFilePdfStroke$1 = function SvgFilePdfStroke(props) {
|
|
|
2480
2800
|
};
|
|
2481
2801
|
|
|
2482
2802
|
var _path$e;
|
|
2483
|
-
function _extends$f() { _extends$f = Object.assign ? Object.assign.bind() : function (
|
|
2803
|
+
function _extends$f() { return _extends$f = 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$f.apply(null, arguments); }
|
|
2484
2804
|
var SvgFileZipStroke$1 = function SvgFileZipStroke(props) {
|
|
2485
2805
|
return /*#__PURE__*/React__namespace.createElement("svg", _extends$f({
|
|
2486
2806
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2498,7 +2818,7 @@ var SvgFileZipStroke$1 = function SvgFileZipStroke(props) {
|
|
|
2498
2818
|
};
|
|
2499
2819
|
|
|
2500
2820
|
var _path$d, _circle$1;
|
|
2501
|
-
function _extends$e() { _extends$e = Object.assign ? Object.assign.bind() : function (
|
|
2821
|
+
function _extends$e() { return _extends$e = 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$e.apply(null, arguments); }
|
|
2502
2822
|
var SvgFileImageStroke$1 = function SvgFileImageStroke(props) {
|
|
2503
2823
|
return /*#__PURE__*/React__namespace.createElement("svg", _extends$e({
|
|
2504
2824
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2522,7 +2842,7 @@ var SvgFileImageStroke$1 = function SvgFileImageStroke(props) {
|
|
|
2522
2842
|
};
|
|
2523
2843
|
|
|
2524
2844
|
var _path$c;
|
|
2525
|
-
function _extends$d() { _extends$d = Object.assign ? Object.assign.bind() : function (
|
|
2845
|
+
function _extends$d() { return _extends$d = 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$d.apply(null, arguments); }
|
|
2526
2846
|
var SvgFileDocumentStroke$1 = function SvgFileDocumentStroke(props) {
|
|
2527
2847
|
return /*#__PURE__*/React__namespace.createElement("svg", _extends$d({
|
|
2528
2848
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2540,7 +2860,7 @@ var SvgFileDocumentStroke$1 = function SvgFileDocumentStroke(props) {
|
|
|
2540
2860
|
};
|
|
2541
2861
|
|
|
2542
2862
|
var _path$b;
|
|
2543
|
-
function _extends$c() { _extends$c = Object.assign ? Object.assign.bind() : function (
|
|
2863
|
+
function _extends$c() { return _extends$c = 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$c.apply(null, arguments); }
|
|
2544
2864
|
var SvgFileSpreadsheetStroke$1 = function SvgFileSpreadsheetStroke(props) {
|
|
2545
2865
|
return /*#__PURE__*/React__namespace.createElement("svg", _extends$c({
|
|
2546
2866
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2558,7 +2878,7 @@ var SvgFileSpreadsheetStroke$1 = function SvgFileSpreadsheetStroke(props) {
|
|
|
2558
2878
|
};
|
|
2559
2879
|
|
|
2560
2880
|
var _path$a;
|
|
2561
|
-
function _extends$b() { _extends$b = Object.assign ? Object.assign.bind() : function (
|
|
2881
|
+
function _extends$b() { return _extends$b = 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$b.apply(null, arguments); }
|
|
2562
2882
|
var SvgFilePresentationStroke$1 = function SvgFilePresentationStroke(props) {
|
|
2563
2883
|
return /*#__PURE__*/React__namespace.createElement("svg", _extends$b({
|
|
2564
2884
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2575,7 +2895,7 @@ var SvgFilePresentationStroke$1 = function SvgFilePresentationStroke(props) {
|
|
|
2575
2895
|
};
|
|
2576
2896
|
|
|
2577
2897
|
var _path$9;
|
|
2578
|
-
function _extends$a() { _extends$a = Object.assign ? Object.assign.bind() : function (
|
|
2898
|
+
function _extends$a() { return _extends$a = 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$a.apply(null, arguments); }
|
|
2579
2899
|
var SvgFileGenericStroke$1 = function SvgFileGenericStroke(props) {
|
|
2580
2900
|
return /*#__PURE__*/React__namespace.createElement("svg", _extends$a({
|
|
2581
2901
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2592,7 +2912,7 @@ var SvgFileGenericStroke$1 = function SvgFileGenericStroke(props) {
|
|
|
2592
2912
|
};
|
|
2593
2913
|
|
|
2594
2914
|
var _g;
|
|
2595
|
-
function _extends$9() { _extends$9 = Object.assign ? Object.assign.bind() : function (
|
|
2915
|
+
function _extends$9() { return _extends$9 = 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$9.apply(null, arguments); }
|
|
2596
2916
|
var SvgCheckCircleStroke = function SvgCheckCircleStroke(props) {
|
|
2597
2917
|
return /*#__PURE__*/React__namespace.createElement("svg", _extends$9({
|
|
2598
2918
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2616,7 +2936,7 @@ var SvgCheckCircleStroke = function SvgCheckCircleStroke(props) {
|
|
|
2616
2936
|
};
|
|
2617
2937
|
|
|
2618
2938
|
var _path$8;
|
|
2619
|
-
function _extends$8() { _extends$8 = Object.assign ? Object.assign.bind() : function (
|
|
2939
|
+
function _extends$8() { return _extends$8 = 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$8.apply(null, arguments); }
|
|
2620
2940
|
var SvgFileErrorStroke$1 = function SvgFileErrorStroke(props) {
|
|
2621
2941
|
return /*#__PURE__*/React__namespace.createElement("svg", _extends$8({
|
|
2622
2942
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2634,7 +2954,7 @@ var SvgFileErrorStroke$1 = function SvgFileErrorStroke(props) {
|
|
|
2634
2954
|
};
|
|
2635
2955
|
|
|
2636
2956
|
var _path$7, _rect;
|
|
2637
|
-
function _extends$7() { _extends$7 = Object.assign ? Object.assign.bind() : function (
|
|
2957
|
+
function _extends$7() { return _extends$7 = 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$7.apply(null, arguments); }
|
|
2638
2958
|
var SvgFilePdfStroke = function SvgFilePdfStroke(props) {
|
|
2639
2959
|
return /*#__PURE__*/React__namespace.createElement("svg", _extends$7({
|
|
2640
2960
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2660,7 +2980,7 @@ var SvgFilePdfStroke = function SvgFilePdfStroke(props) {
|
|
|
2660
2980
|
};
|
|
2661
2981
|
|
|
2662
2982
|
var _path$6;
|
|
2663
|
-
function _extends$6() { _extends$6 = Object.assign ? Object.assign.bind() : function (
|
|
2983
|
+
function _extends$6() { return _extends$6 = 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$6.apply(null, arguments); }
|
|
2664
2984
|
var SvgFileZipStroke = function SvgFileZipStroke(props) {
|
|
2665
2985
|
return /*#__PURE__*/React__namespace.createElement("svg", _extends$6({
|
|
2666
2986
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2678,7 +2998,7 @@ var SvgFileZipStroke = function SvgFileZipStroke(props) {
|
|
|
2678
2998
|
};
|
|
2679
2999
|
|
|
2680
3000
|
var _path$5, _circle;
|
|
2681
|
-
function _extends$5() { _extends$5 = Object.assign ? Object.assign.bind() : function (
|
|
3001
|
+
function _extends$5() { return _extends$5 = 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$5.apply(null, arguments); }
|
|
2682
3002
|
var SvgFileImageStroke = function SvgFileImageStroke(props) {
|
|
2683
3003
|
return /*#__PURE__*/React__namespace.createElement("svg", _extends$5({
|
|
2684
3004
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2701,7 +3021,7 @@ var SvgFileImageStroke = function SvgFileImageStroke(props) {
|
|
|
2701
3021
|
};
|
|
2702
3022
|
|
|
2703
3023
|
var _path$4;
|
|
2704
|
-
function _extends$4() { _extends$4 = Object.assign ? Object.assign.bind() : function (
|
|
3024
|
+
function _extends$4() { return _extends$4 = 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$4.apply(null, arguments); }
|
|
2705
3025
|
var SvgFileDocumentStroke = function SvgFileDocumentStroke(props) {
|
|
2706
3026
|
return /*#__PURE__*/React__namespace.createElement("svg", _extends$4({
|
|
2707
3027
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2719,7 +3039,7 @@ var SvgFileDocumentStroke = function SvgFileDocumentStroke(props) {
|
|
|
2719
3039
|
};
|
|
2720
3040
|
|
|
2721
3041
|
var _path$3;
|
|
2722
|
-
function _extends$3() { _extends$3 = Object.assign ? Object.assign.bind() : function (
|
|
3042
|
+
function _extends$3() { return _extends$3 = 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$3.apply(null, arguments); }
|
|
2723
3043
|
var SvgFileSpreadsheetStroke = function SvgFileSpreadsheetStroke(props) {
|
|
2724
3044
|
return /*#__PURE__*/React__namespace.createElement("svg", _extends$3({
|
|
2725
3045
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2737,7 +3057,7 @@ var SvgFileSpreadsheetStroke = function SvgFileSpreadsheetStroke(props) {
|
|
|
2737
3057
|
};
|
|
2738
3058
|
|
|
2739
3059
|
var _path$2;
|
|
2740
|
-
function _extends$2() { _extends$2 = Object.assign ? Object.assign.bind() : function (
|
|
3060
|
+
function _extends$2() { return _extends$2 = 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$2.apply(null, arguments); }
|
|
2741
3061
|
var SvgFilePresentationStroke = function SvgFilePresentationStroke(props) {
|
|
2742
3062
|
return /*#__PURE__*/React__namespace.createElement("svg", _extends$2({
|
|
2743
3063
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2754,7 +3074,7 @@ var SvgFilePresentationStroke = function SvgFilePresentationStroke(props) {
|
|
|
2754
3074
|
};
|
|
2755
3075
|
|
|
2756
3076
|
var _path$1;
|
|
2757
|
-
function _extends$1() { _extends$1 = Object.assign ? Object.assign.bind() : function (
|
|
3077
|
+
function _extends$1() { return _extends$1 = 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$1.apply(null, arguments); }
|
|
2758
3078
|
var SvgFileGenericStroke = function SvgFileGenericStroke(props) {
|
|
2759
3079
|
return /*#__PURE__*/React__namespace.createElement("svg", _extends$1({
|
|
2760
3080
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2771,7 +3091,7 @@ var SvgFileGenericStroke = function SvgFileGenericStroke(props) {
|
|
|
2771
3091
|
};
|
|
2772
3092
|
|
|
2773
3093
|
var _path;
|
|
2774
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
3094
|
+
function _extends() { return _extends = 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.apply(null, arguments); }
|
|
2775
3095
|
var SvgFileErrorStroke = function SvgFileErrorStroke(props) {
|
|
2776
3096
|
return /*#__PURE__*/React__namespace.createElement("svg", _extends({
|
|
2777
3097
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2826,13 +3146,14 @@ const FileComponent = React.forwardRef((_ref, ref) => {
|
|
|
2826
3146
|
const validationType = validation || type;
|
|
2827
3147
|
return React__namespace.default.createElement(FileContext.Provider, {
|
|
2828
3148
|
value: fileContextValue
|
|
2829
|
-
}, React__namespace.default.createElement(StyledFile,
|
|
3149
|
+
}, React__namespace.default.createElement(StyledFile, Object.assign({}, props, {
|
|
2830
3150
|
isCompact: isCompact,
|
|
2831
3151
|
focusInset: focusInset,
|
|
2832
3152
|
validation: validation,
|
|
2833
3153
|
ref: ref
|
|
2834
3154
|
}), validationType && React__namespace.default.createElement(StyledFileIcon, {
|
|
2835
|
-
isCompact: isCompact
|
|
3155
|
+
$isCompact: isCompact,
|
|
3156
|
+
$validation: validation
|
|
2836
3157
|
}, isCompact ? fileIconsCompact[validationType] : fileIconsDefault[validationType]), React.Children.map(children, child => typeof child === 'string' ? React__namespace.default.createElement("span", null, child) : child)));
|
|
2837
3158
|
});
|
|
2838
3159
|
FileComponent.displayName = 'File';
|
|
@@ -2903,7 +3224,7 @@ const MediaInput = React__namespace.default.forwardRef((_ref, ref) => {
|
|
|
2903
3224
|
combinedProps = fieldContext.getInputProps(combinedProps);
|
|
2904
3225
|
isLabelHovered = fieldContext.isLabelHovered;
|
|
2905
3226
|
}
|
|
2906
|
-
return React__namespace.default.createElement(FauxInput,
|
|
3227
|
+
return React__namespace.default.createElement(FauxInput, Object.assign({
|
|
2907
3228
|
tabIndex: null,
|
|
2908
3229
|
onClick: onFauxInputClickHandler,
|
|
2909
3230
|
onFocus: onFauxInputFocusHandler,
|
|
@@ -2936,8 +3257,8 @@ MediaInput.propTypes = {
|
|
|
2936
3257
|
isBare: PropTypes__default.default.bool,
|
|
2937
3258
|
focusInset: PropTypes__default.default.bool,
|
|
2938
3259
|
validation: PropTypes__default.default.oneOf(VALIDATION),
|
|
2939
|
-
start: PropTypes__default.default.
|
|
2940
|
-
end: PropTypes__default.default.
|
|
3260
|
+
start: PropTypes__default.default.any,
|
|
3261
|
+
end: PropTypes__default.default.any,
|
|
2941
3262
|
wrapperProps: PropTypes__default.default.object,
|
|
2942
3263
|
wrapperRef: PropTypes__default.default.any
|
|
2943
3264
|
};
|
|
@@ -2956,7 +3277,6 @@ exports.InputGroup = InputGroup;
|
|
|
2956
3277
|
exports.Label = Label$1;
|
|
2957
3278
|
exports.MediaInput = MediaInput;
|
|
2958
3279
|
exports.Message = Message;
|
|
2959
|
-
exports.MultiThumbRange = MultiThumbRange;
|
|
2960
3280
|
exports.Radio = Radio;
|
|
2961
3281
|
exports.Range = Range;
|
|
2962
3282
|
exports.Select = Select;
|