@widergy/energy-ui 1.134.2 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/components/Loading/index.js +1 -2
- package/dist/components/Loading/styles.module.scss +1 -1
- package/dist/components/Loading/theme.js +2 -1
- package/dist/components/UTAlert/theme.js +3 -2
- package/dist/components/UTAttachment/layout.js +9 -7
- package/dist/components/UTAttachment/styles.module.scss +0 -1
- package/dist/components/UTAttachment/theme.js +2 -1
- package/dist/components/UTAutocomplete/theme.js +8 -6
- package/dist/components/UTAvatar/index.js +21 -8
- package/dist/components/UTBarChart/components/Legend/index.js +24 -20
- package/dist/components/UTBarChart/components/Pagination/index.js +26 -20
- package/dist/components/UTBarChart/components/YAxis/AxisElement/index.js +1 -1
- package/dist/components/UTBarChart/components/YAxis/index.js +1 -1
- package/dist/components/UTBarChart/index.js +7 -4
- package/dist/components/UTBarChart/theme.js +10 -7
- package/dist/components/UTBarChart/types.js +2 -2
- package/dist/components/UTBreadcrumbs/index.js +14 -8
- package/dist/components/UTBreadcrumbs/styles.module.scss +0 -6
- package/dist/components/UTBreadcrumbs/theme.js +2 -13
- package/dist/components/UTButton/README.md +35 -0
- package/dist/components/UTButton/constants.js +42 -0
- package/dist/components/UTButton/index.js +63 -83
- package/dist/components/UTButton/styles.module.scss +36 -0
- package/dist/components/UTButton/theme.js +143 -158
- package/dist/components/UTCBUInput/theme.js +2 -1
- package/dist/components/UTCard/components/UTCardFooter/index.js +5 -6
- package/dist/components/UTCard/index.js +23 -29
- package/dist/components/UTCard/theme.js +2 -1
- package/dist/components/UTCarousel/components/Button/index.js +1 -1
- package/dist/components/UTCarousel/components/Legend/index.js +1 -4
- package/dist/components/UTCarousel/components/Slider/component/Slide/index.js +2 -5
- package/dist/components/UTCarousel/components/Slider/index.js +45 -18
- package/dist/components/UTCarousel/components/Slider/layout.js +13 -12
- package/dist/components/UTCarousel/theme.js +2 -1
- package/dist/components/UTCheckList/index.js +11 -9
- package/dist/components/UTCheckList/theme.js +8 -3
- package/dist/components/UTCheckbox/index.js +34 -28
- package/dist/components/UTCheckbox/theme.js +11 -3
- package/dist/components/UTConsumptionBar/components/ConsumptionBarIndicator/index.js +7 -8
- package/dist/components/UTConsumptionBar/components/ConsumptionBarIndicator/styles.module.scss +1 -2
- package/dist/components/UTConsumptionBar/index.js +22 -13
- package/dist/components/UTConsumptionBar/styles.module.scss +0 -14
- package/dist/components/UTCuit/index.js +2 -2
- package/dist/components/UTCuit/theme.js +1 -1
- package/dist/components/UTDatePicker/index.js +29 -27
- package/dist/components/UTDatePicker/theme.js +22 -7
- package/dist/components/UTDialog/index.js +19 -23
- package/dist/components/UTDialog/theme.js +8 -23
- package/dist/components/UTDialog/types.js +5 -6
- package/dist/components/UTDotMenu/index.js +16 -8
- package/dist/components/UTEmojiPicker/theme.js +2 -1
- package/dist/components/UTFileInput/layout.js +5 -4
- package/dist/components/UTFileInput/styles.module.scss +0 -1
- package/dist/components/UTIconButton/theme.js +2 -1
- package/dist/components/UTImageRadio/components/ImageRadioCard/index.js +2 -2
- package/dist/components/UTImageRadio/index.js +2 -1
- package/dist/components/UTImageRadio/theme.js +15 -12
- package/dist/components/UTLabel/README.md +169 -0
- package/dist/components/UTLabel/constants.js +91 -0
- package/dist/components/UTLabel/index.js +41 -104
- package/dist/components/UTLabel/theme.js +29 -84
- package/dist/components/UTMap/index.js +7 -7
- package/dist/components/UTMap/styles.module.scss +0 -5
- package/dist/components/UTMenu/theme.js +3 -2
- package/dist/components/UTPanel/index.js +11 -10
- package/dist/components/UTPasswordField/components/PasswordValidations/components/Error/index.js +4 -3
- package/dist/components/UTPasswordField/components/PasswordValidations/components/Error/styles.module.scss +2 -2
- package/dist/components/UTPasswordField/components/PasswordValidations/components/Validation/index.js +16 -16
- package/dist/components/UTPasswordField/components/PasswordValidations/components/Validation/styles.module.scss +2 -2
- package/dist/components/UTPasswordField/components/PasswordValidations/index.js +11 -9
- package/dist/components/UTPasswordField/components/PasswordWarning/index.js +3 -3
- package/dist/components/UTPasswordField/components/PasswordWarning/styles.module.scss +1 -1
- package/dist/components/UTPasswordField/theme.js +13 -27
- package/dist/components/UTPhoneInput/index.js +4 -4
- package/dist/components/UTPhoneInput/theme.js +3 -6
- package/dist/components/UTPieChart/theme.js +2 -1
- package/dist/components/UTProgressBar/index.js +27 -20
- package/dist/components/UTProgressBar/theme.js +14 -13
- package/dist/components/UTRadioGroup/index.js +35 -22
- package/dist/components/UTRadioGroup/theme.js +10 -6
- package/dist/components/UTRating/components/Star/index.js +2 -1
- package/dist/components/UTRating/index.js +3 -1
- package/dist/components/UTRating/theme.js +3 -2
- package/dist/components/UTSelect/index.js +13 -3
- package/dist/components/UTSelect/styles.module.scss +5 -0
- package/dist/components/UTSelect/theme.js +7 -2
- package/dist/components/UTSidebar/theme.js +6 -5
- package/dist/components/UTSkeleton/index.js +3 -2
- package/dist/components/UTSwitch/index.js +2 -1
- package/dist/components/UTSwitch/theme.js +2 -1
- package/dist/components/UTTable/components/TableHeader/index.js +11 -7
- package/dist/components/UTTable/theme.js +31 -29
- package/dist/components/UTTabs/index.js +25 -20
- package/dist/components/UTTabs/theme.js +2 -1
- package/dist/components/UTTextArea/index.js +2 -1
- package/dist/components/UTTextArea/theme.js +2 -1
- package/dist/components/UTTextInput/index.js +16 -8
- package/dist/components/UTTextInput/styles.module.scss +3 -2
- package/dist/components/UTTextInput/theme.js +3 -2
- package/dist/components/UTToggle/components/ToggleOption/index.js +1 -0
- package/dist/components/UTToggle/theme.js +2 -1
- package/dist/components/UTTooltip/index.js +6 -4
- package/dist/components/UTTooltip/styles.module.scss +4 -2
- package/dist/components/UTTooltip/theme.js +2 -1
- package/dist/components/UTWorkflowContainer/components/ActionButton/index.js +12 -4
- package/dist/components/UTWorkflowContainer/index.js +19 -15
- package/dist/components/UTWorkflowContainer/styles.module.scss +0 -34
- package/dist/components/UTWorkflowContainer/theme.js +12 -58
- package/dist/components/UTWorkflowContainer/types.js +1 -1
- package/dist/components/WithTheme/layout.js +46 -42
- package/dist/scss/variables/_colors.scss +8 -0
- package/dist/theme.js +4 -1
- package/dist/types/formTypes.js +3 -3
- package/dist/utils/classesUtils.js +7 -3
- package/dist/utils/shadowUtils.js +40 -0
- package/package.json +5 -3
- package/dist/components/UTDialog/components/ActionButton/index.js +0 -35
- package/dist/components/UTLabel/styles.module.scss +0 -3
|
@@ -27,22 +27,21 @@ var ConsumptionBarIndicator = function ConsumptionBarIndicator(_ref) {
|
|
|
27
27
|
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
28
28
|
className: "".concat(_stylesModule.default.indicatorText, " ").concat(classes === null || classes === void 0 ? void 0 : classes.indicatorText)
|
|
29
29
|
}, /*#__PURE__*/_react.default.createElement(_UTLabel.default, {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
className: _stylesModule.default.alignCenter
|
|
30
|
+
className: _stylesModule.default.alignCenter,
|
|
31
|
+
colorTheme: "information",
|
|
32
|
+
weight: "bold"
|
|
34
33
|
}, "".concat(Math.round(value), " ").concat(unit)), /*#__PURE__*/_react.default.createElement(_UTLabel.default, {
|
|
35
34
|
className: _stylesModule.default.lightGray,
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
colorTheme: "gray",
|
|
36
|
+
weight: "bold"
|
|
38
37
|
}, (0, _numeral.default)(total || 0).format('$ 0,0'))));
|
|
39
38
|
};
|
|
40
39
|
ConsumptionBarIndicator.propTypes = {
|
|
40
|
+
classes: _propTypes.object,
|
|
41
41
|
left: _propTypes.number,
|
|
42
42
|
value: _propTypes.number,
|
|
43
43
|
unit: _propTypes.string,
|
|
44
|
-
total: _propTypes.number
|
|
45
|
-
classes: _propTypes.object
|
|
44
|
+
total: _propTypes.number
|
|
46
45
|
};
|
|
47
46
|
var _default = ConsumptionBarIndicator;
|
|
48
47
|
exports.default = _default;
|
package/dist/components/UTConsumptionBar/components/ConsumptionBarIndicator/styles.module.scss
CHANGED
|
@@ -22,10 +22,10 @@
|
|
|
22
22
|
|
|
23
23
|
.indicatorText {
|
|
24
24
|
align-items: center;
|
|
25
|
-
color: $text-blue;
|
|
26
25
|
display: flex;
|
|
27
26
|
flex-direction: column;
|
|
28
27
|
padding-top: 8px;
|
|
28
|
+
|
|
29
29
|
@media #{$desktop-tablet} {
|
|
30
30
|
white-space: nowrap;
|
|
31
31
|
}
|
|
@@ -36,6 +36,5 @@
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
.lightGray {
|
|
39
|
-
color: $usage-indicator-gray;
|
|
40
39
|
white-space: nowrap;
|
|
41
40
|
}
|
|
@@ -84,9 +84,11 @@ var UTConsumptionBar = function UTConsumptionBar(_ref) {
|
|
|
84
84
|
className: _stylesModule.default.lineContainer
|
|
85
85
|
}, upIndicators.map(function (indicator) {
|
|
86
86
|
return kwh === indicator.value && /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement(_UTLabel.default, {
|
|
87
|
-
className: _stylesModule.default.subsidiableAmountLabel
|
|
87
|
+
className: _stylesModule.default.subsidiableAmountLabel,
|
|
88
|
+
weight: "bold"
|
|
88
89
|
}, indicator.title), /*#__PURE__*/_react.default.createElement(_UTLabel.default, {
|
|
89
|
-
className: _stylesModule.default.warningText
|
|
90
|
+
className: _stylesModule.default.warningText,
|
|
91
|
+
colorTheme: "gray"
|
|
90
92
|
}, indicator.subtitle), /*#__PURE__*/_react.default.createElement("div", {
|
|
91
93
|
className: _stylesModule.default.indicatorMarker
|
|
92
94
|
}));
|
|
@@ -96,10 +98,10 @@ var UTConsumptionBar = function UTConsumptionBar(_ref) {
|
|
|
96
98
|
content: "Categor\xEDa ".concat(name, ": ").concat(tippyContent),
|
|
97
99
|
arrow: true
|
|
98
100
|
}, /*#__PURE__*/_react.default.createElement("span", null, /*#__PURE__*/_react.default.createElement(_UTLabel.default, {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
101
|
+
className: "".concat(_stylesModule.default.categoryLineText, " ").concat(classes === null || classes === void 0 ? void 0 : classes.categoryLineText),
|
|
102
|
+
colorTheme: "information",
|
|
103
|
+
variant: "xsmall",
|
|
104
|
+
weight: "bold"
|
|
103
105
|
}, showLabel ? name : ''))));
|
|
104
106
|
};
|
|
105
107
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -111,23 +113,30 @@ var UTConsumptionBar = function UTConsumptionBar(_ref) {
|
|
|
111
113
|
ref: widthRef
|
|
112
114
|
}), categoryLines.rates.map(renderCategoryLines), downIndicators.map(function (indicator) {
|
|
113
115
|
return /*#__PURE__*/_react.default.createElement(_ConsumptionBarIndicator.default, {
|
|
114
|
-
|
|
115
|
-
left: getIndicatorPosition(indicator.value),
|
|
116
|
-
value: indicator.value,
|
|
117
|
-
unit: indicator.title,
|
|
116
|
+
classes: classes,
|
|
118
117
|
className: _stylesModule.default.indicator,
|
|
118
|
+
key: indicator.title,
|
|
119
|
+
left: getIndicatorPosition(indicator.value),
|
|
120
|
+
small: small,
|
|
119
121
|
total: indicator.total,
|
|
120
|
-
|
|
122
|
+
unit: indicator.title,
|
|
123
|
+
value: indicator.value
|
|
121
124
|
});
|
|
122
125
|
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
123
126
|
className: "".concat(_stylesModule.default.finishLine1, " ").concat(downIndicators.length > 0 && _stylesModule.default.colorizedLine)
|
|
124
127
|
}));
|
|
125
128
|
};
|
|
126
129
|
UTConsumptionBar.propTypes = {
|
|
127
|
-
categoryLines:
|
|
130
|
+
categoryLines: _propTypes.object,
|
|
128
131
|
classes: _propTypes.object,
|
|
129
132
|
small: _propTypes.bool,
|
|
130
|
-
values: (0, _propTypes.arrayOf)(_propTypes.
|
|
133
|
+
values: (0, _propTypes.arrayOf)((0, _propTypes.shape)({
|
|
134
|
+
position: _propTypes.string,
|
|
135
|
+
subtitle: _propTypes.string,
|
|
136
|
+
title: _propTypes.string,
|
|
137
|
+
total: _propTypes.number,
|
|
138
|
+
value: _propTypes.number
|
|
139
|
+
}))
|
|
131
140
|
};
|
|
132
141
|
var _default = UTConsumptionBar;
|
|
133
142
|
exports.default = _default;
|
|
@@ -51,11 +51,6 @@
|
|
|
51
51
|
background-position: left bottom;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
.help {
|
|
55
|
-
color: $dark-blue;
|
|
56
|
-
margin-left: 5px;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
54
|
.line {
|
|
60
55
|
background: $white;
|
|
61
56
|
height: 25px;
|
|
@@ -72,10 +67,6 @@
|
|
|
72
67
|
|
|
73
68
|
.categoryLineText {
|
|
74
69
|
cursor: default;
|
|
75
|
-
@media #{$mobile} {
|
|
76
|
-
font-size: $small;
|
|
77
|
-
font-weight: 400;
|
|
78
|
-
}
|
|
79
70
|
|
|
80
71
|
&:last-child {
|
|
81
72
|
margin-left: 4px;
|
|
@@ -113,9 +104,6 @@
|
|
|
113
104
|
}
|
|
114
105
|
|
|
115
106
|
.warningText {
|
|
116
|
-
color: $disabled-text-gray;
|
|
117
|
-
font-size: $large;
|
|
118
|
-
font-weight: 400;
|
|
119
107
|
padding-bottom: 5px;
|
|
120
108
|
text-align: center;
|
|
121
109
|
width: 130px;
|
|
@@ -123,8 +111,6 @@
|
|
|
123
111
|
|
|
124
112
|
.subsidiableAmountLabel {
|
|
125
113
|
color: $selected-subsidy-text;
|
|
126
|
-
font-size: $large;
|
|
127
|
-
font-weight: 700;
|
|
128
114
|
padding-bottom: 5px;
|
|
129
115
|
text-align: center;
|
|
130
116
|
width: 110px;
|
|
@@ -164,8 +164,8 @@ var UTCuit = /*#__PURE__*/function (_PureComponent) {
|
|
|
164
164
|
margin: "none",
|
|
165
165
|
inputRef: this.verificationCodeRef
|
|
166
166
|
})), /*#__PURE__*/_react.default.createElement(_UTLabel.default, {
|
|
167
|
-
|
|
168
|
-
|
|
167
|
+
variant: "small",
|
|
168
|
+
colorTheme: "error"
|
|
169
169
|
}, (0, _form.shouldShowErrors)(this.props.meta) ? this.props.meta.error : ''));
|
|
170
170
|
}
|
|
171
171
|
}]);
|
|
@@ -9,7 +9,7 @@ var _styles = require("@material-ui/core/styles");
|
|
|
9
9
|
var _colors = _interopRequireDefault(require("../../scss/variables/_colors.scss"));
|
|
10
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
11
|
var retrieveMuiTheme = function retrieveMuiTheme(theme) {
|
|
12
|
-
return (0, _styles.
|
|
12
|
+
return (0, _styles.createTheme)({
|
|
13
13
|
typography: {
|
|
14
14
|
fontFamily: (0, _seamlessImmutable.getIn)(theme, ['Fonts', 'fontFamily'])
|
|
15
15
|
},
|
|
@@ -85,29 +85,29 @@ var CustomUtils = /*#__PURE__*/function (_DayjsUtils) {
|
|
|
85
85
|
}(_dayjs.default);
|
|
86
86
|
var UTDatePicker = function UTDatePicker(_ref) {
|
|
87
87
|
var _field$configuration;
|
|
88
|
-
var
|
|
89
|
-
_ref$meta = _ref.meta,
|
|
90
|
-
meta = _ref$meta === void 0 ? {} : _ref$meta,
|
|
91
|
-
field = _ref.field,
|
|
92
|
-
themeClasses = _ref.classes,
|
|
88
|
+
var themeClasses = _ref.classes,
|
|
93
89
|
classNames = _ref.classNames,
|
|
94
90
|
CustomIcon = _ref.CustomIcon,
|
|
95
91
|
dayFormat = _ref.dayFormat,
|
|
96
|
-
pickerProps = _ref.pickerProps,
|
|
97
|
-
inputProps = _ref.inputProps,
|
|
98
|
-
popoverProps = _ref.popoverProps,
|
|
99
|
-
placeholder = _ref.placeholder,
|
|
100
92
|
_ref$disableToolbar = _ref.disableToolbar,
|
|
101
93
|
disableToolbar = _ref$disableToolbar === void 0 ? true : _ref$disableToolbar,
|
|
94
|
+
disabled = _ref.disabled,
|
|
95
|
+
field = _ref.field,
|
|
96
|
+
iconAnchor = _ref.iconAnchor,
|
|
97
|
+
input = _ref.input,
|
|
98
|
+
inputProps = _ref.inputProps,
|
|
102
99
|
_ref$inputVariant = _ref.inputVariant,
|
|
103
100
|
inputVariant = _ref$inputVariant === void 0 ? _constants.INPUT_VARIANT : _ref$inputVariant,
|
|
101
|
+
invalidDateMessage = _ref.invalidDateMessage,
|
|
104
102
|
maxDateMessage = _ref.maxDateMessage,
|
|
105
103
|
minDateMessage = _ref.minDateMessage,
|
|
106
|
-
|
|
104
|
+
_ref$meta = _ref.meta,
|
|
105
|
+
meta = _ref$meta === void 0 ? {} : _ref$meta,
|
|
106
|
+
pickerProps = _ref.pickerProps,
|
|
107
|
+
placeholder = _ref.placeholder,
|
|
108
|
+
popoverProps = _ref.popoverProps,
|
|
107
109
|
variant = _ref.variant,
|
|
108
|
-
|
|
109
|
-
withUpperTitle = _ref.withUpperTitle,
|
|
110
|
-
disabled = _ref.disabled;
|
|
110
|
+
withUpperTitle = _ref.withUpperTitle;
|
|
111
111
|
var classes = (0, _react.useMemo)(function () {
|
|
112
112
|
return (0, _classesUtils.mergeClasses)(themeClasses, classNames);
|
|
113
113
|
}, [classNames]);
|
|
@@ -146,7 +146,8 @@ var UTDatePicker = function UTDatePicker(_ref) {
|
|
|
146
146
|
var OpenerIcon = CustomIcon || CalendarIcon;
|
|
147
147
|
var operenerIconReference = (0, _react.useRef)();
|
|
148
148
|
return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, withUpperTitle && /*#__PURE__*/_react.default.createElement(_UTLabel.default, {
|
|
149
|
-
className: classes.upperTitle
|
|
149
|
+
className: classes.upperTitle,
|
|
150
|
+
withMarkdown: true
|
|
150
151
|
}, field.title), /*#__PURE__*/_react.default.createElement(_pickers.MuiPickersUtilsProvider, {
|
|
151
152
|
utils: disableToolbar ? _dayjs.default : CustomUtils,
|
|
152
153
|
locale: _es.default
|
|
@@ -170,7 +171,7 @@ var UTDatePicker = function UTDatePicker(_ref) {
|
|
|
170
171
|
root: classes.input,
|
|
171
172
|
notchedOutline: classes.notchedOutline
|
|
172
173
|
},
|
|
173
|
-
placeholder: inputVariant === 'outlined' && (placeholder || (field === null || field === void 0 ? void 0 : field.placeholder))
|
|
174
|
+
placeholder: inputVariant === 'outlined' && (placeholder || (field === null || field === void 0 ? void 0 : field.placeholder)) || undefined
|
|
174
175
|
}, inputProps),
|
|
175
176
|
invalidDateMessage: invalidDateMessage || _constants.WRONG_DATE_FORMAT,
|
|
176
177
|
inputVariant: inputVariant,
|
|
@@ -186,26 +187,27 @@ var UTDatePicker = function UTDatePicker(_ref) {
|
|
|
186
187
|
}, pickerProps))));
|
|
187
188
|
};
|
|
188
189
|
UTDatePicker.propTypes = {
|
|
189
|
-
|
|
190
|
-
meta: _formTypes.metaPropTypes,
|
|
191
|
-
field: _formTypes.fieldType,
|
|
190
|
+
classes: _types.classesPropTypes,
|
|
192
191
|
classNames: _types.classesPropTypes,
|
|
193
192
|
CustomIcon: _propTypes.node,
|
|
194
193
|
dayFormat: _propTypes.string,
|
|
195
|
-
|
|
194
|
+
disabled: _propTypes.bool,
|
|
195
|
+
disableToolbar: _propTypes.bool,
|
|
196
|
+
field: _formTypes.fieldType,
|
|
197
|
+
iconAnchor: _propTypes.bool,
|
|
198
|
+
input: _formTypes.inputPropTypes.isRequired,
|
|
196
199
|
inputFormat: _propTypes.string,
|
|
197
|
-
classes: (0, _propTypes.objectOf)(_propTypes.string),
|
|
198
|
-
pickerProps: _propTypes.object,
|
|
199
200
|
inputProps: _propTypes.object,
|
|
200
|
-
popoverProps: _propTypes.object,
|
|
201
|
-
placeholder: _propTypes.string,
|
|
202
|
-
disableToolbar: _propTypes.bool,
|
|
203
201
|
inputVariant: _propTypes.string,
|
|
202
|
+
invalidDateMessage: _propTypes.string,
|
|
204
203
|
maxDateMessage: _propTypes.string,
|
|
205
204
|
minDateMessage: _propTypes.string,
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
205
|
+
pickerProps: _propTypes.object,
|
|
206
|
+
placeholder: _propTypes.string,
|
|
207
|
+
popoverProps: _propTypes.object,
|
|
208
|
+
meta: _formTypes.metaPropTypes,
|
|
209
|
+
variant: _propTypes.string,
|
|
210
|
+
withUpperTitle: _propTypes.bool
|
|
209
211
|
};
|
|
210
212
|
var _default = (0, _WithTheme.default)(_theme.retrieveStyle, _theme.materialTheme)(UTDatePicker);
|
|
211
213
|
exports.default = _default;
|
|
@@ -5,10 +5,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.retrieveStyle = exports.materialTheme = void 0;
|
|
7
7
|
var _seamlessImmutable = require("seamless-immutable");
|
|
8
|
-
var
|
|
8
|
+
var _styles = require("@material-ui/core/styles");
|
|
9
9
|
var _colors = _interopRequireDefault(require("../../scss/variables/_colors.scss"));
|
|
10
|
+
var _classesUtils = require("../../utils/classesUtils");
|
|
10
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
-
var retrieveStyle = function retrieveStyle(
|
|
12
|
+
var retrieveStyle = function retrieveStyle(_ref) {
|
|
13
|
+
var theme = _ref.theme;
|
|
12
14
|
return {
|
|
13
15
|
openerIcon: {
|
|
14
16
|
fill: (0, _seamlessImmutable.getIn)(theme, ['UTDatePicker', 'openerIcon', 'fill'], _colors.default.orangeIcon)
|
|
@@ -46,7 +48,11 @@ var retrieveStyle = function retrieveStyle(theme) {
|
|
|
46
48
|
};
|
|
47
49
|
exports.retrieveStyle = retrieveStyle;
|
|
48
50
|
var materialTheme = function materialTheme(theme) {
|
|
49
|
-
|
|
51
|
+
var _theme$UTDatePicker, _theme$UTDatePicker$s, _theme$UTDatePicker2, _theme$UTDatePicker2$, _theme$UTDatePicker3, _theme$UTDatePicker3$, _theme$UTDatePicker4, _theme$UTDatePicker4$, _theme$UTDatePicker4$2;
|
|
52
|
+
return (0, _styles.createTheme)({
|
|
53
|
+
typography: {
|
|
54
|
+
fontFamily: (0, _seamlessImmutable.getIn)(theme, ['Fonts', 'fontFamily'])
|
|
55
|
+
},
|
|
50
56
|
overrides: {
|
|
51
57
|
MuiTypography: {
|
|
52
58
|
body1: {
|
|
@@ -99,15 +105,15 @@ var materialTheme = function materialTheme(theme) {
|
|
|
99
105
|
MuiPickersCalendarHeader: {
|
|
100
106
|
switchHeader: {
|
|
101
107
|
color: (0, _seamlessImmutable.getIn)(theme, ['UTDatePicker', 'switchHeader', 'color'], _colors.default.gray4),
|
|
102
|
-
textTransform: (0,
|
|
103
|
-
fontWeight: (0,
|
|
108
|
+
textTransform: (0, _classesUtils.withImportant)((theme === null || theme === void 0 ? void 0 : (_theme$UTDatePicker = theme.UTDatePicker) === null || _theme$UTDatePicker === void 0 ? void 0 : (_theme$UTDatePicker$s = _theme$UTDatePicker.switchHeader) === null || _theme$UTDatePicker$s === void 0 ? void 0 : _theme$UTDatePicker$s.textTransform) || 'capitalize'),
|
|
109
|
+
fontWeight: (0, _classesUtils.withImportant)((theme === null || theme === void 0 ? void 0 : (_theme$UTDatePicker2 = theme.UTDatePicker) === null || _theme$UTDatePicker2 === void 0 ? void 0 : (_theme$UTDatePicker2$ = _theme$UTDatePicker2.switchHeader) === null || _theme$UTDatePicker2$ === void 0 ? void 0 : _theme$UTDatePicker2$.fontWeight) || 500),
|
|
104
110
|
margin: (0, _seamlessImmutable.getIn)(theme, ['UTDatePicker', 'switchHeader', 'margin'], '8px 17px'),
|
|
105
111
|
padding: (0, _seamlessImmutable.getIn)(theme, ['UTDatePicker', 'switchHeader', 'padding'], '15px 0 0')
|
|
106
112
|
},
|
|
107
113
|
dayLabel: {
|
|
108
114
|
color: (0, _seamlessImmutable.getIn)(theme, ['UTDatePicker', 'dayLabel', 'color'], _colors.default.gray4),
|
|
109
115
|
width: (0, _seamlessImmutable.getIn)(theme, ['UTDatePicker', 'dayLabel', 'width'], '33px'),
|
|
110
|
-
fontWeight: (0,
|
|
116
|
+
fontWeight: (0, _classesUtils.withImportant)((theme === null || theme === void 0 ? void 0 : (_theme$UTDatePicker3 = theme.UTDatePicker) === null || _theme$UTDatePicker3 === void 0 ? void 0 : (_theme$UTDatePicker3$ = _theme$UTDatePicker3.dayLabel) === null || _theme$UTDatePicker3$ === void 0 ? void 0 : _theme$UTDatePicker3$.fontWeight) || 500),
|
|
111
117
|
fontFamily: (0, _seamlessImmutable.getIn)(theme, ['UTDatePicker', 'dayLabel', 'fontFamily'], (0, _seamlessImmutable.getIn)(theme, ['Fonts', 'fontFamily']))
|
|
112
118
|
},
|
|
113
119
|
daysHeader: {
|
|
@@ -125,7 +131,7 @@ var materialTheme = function materialTheme(theme) {
|
|
|
125
131
|
width: (0, _seamlessImmutable.getIn)(theme, ['UTDatePicker', 'outlinedInput', 'root', 'width'], '250px'),
|
|
126
132
|
color: (0, _seamlessImmutable.getIn)(theme, ['UTDatePicker', 'outlinedInput', 'root', 'color'], _colors.default.gray4),
|
|
127
133
|
paddingLeft: (0, _seamlessImmutable.getIn)(theme, ['UTDatePicker', 'outlinedInput', 'root', 'paddingLeft'], '6px'),
|
|
128
|
-
paddingRight: (0,
|
|
134
|
+
paddingRight: (0, _classesUtils.withImportant)((theme === null || theme === void 0 ? void 0 : (_theme$UTDatePicker4 = theme.UTDatePicker) === null || _theme$UTDatePicker4 === void 0 ? void 0 : (_theme$UTDatePicker4$ = _theme$UTDatePicker4.outlinedInput) === null || _theme$UTDatePicker4$ === void 0 ? void 0 : (_theme$UTDatePicker4$2 = _theme$UTDatePicker4$.root) === null || _theme$UTDatePicker4$2 === void 0 ? void 0 : _theme$UTDatePicker4$2.paddingRight) || '12px'),
|
|
129
135
|
'&:hover:not($disabled):not($focused):not($error) $notchedOutline': {
|
|
130
136
|
borderColor: (0, _seamlessImmutable.getIn)(theme, ['UTDatePicker', 'outlinedInput', 'notchedOutline', 'hover', 'borderColor'], _colors.default.gray3)
|
|
131
137
|
},
|
|
@@ -202,6 +208,15 @@ var materialTheme = function materialTheme(theme) {
|
|
|
202
208
|
pickerView: {
|
|
203
209
|
minWidth: (0, _seamlessImmutable.getIn)(theme, ['UTDatePicker', 'pickerView', 'minWidth'], '290px')
|
|
204
210
|
}
|
|
211
|
+
},
|
|
212
|
+
MuiFormHelperText: {
|
|
213
|
+
root: {
|
|
214
|
+
fontSize: (0, _seamlessImmutable.getIn)(theme, ['UTDatePicker', 'helperText', 'fontSize'], 12),
|
|
215
|
+
color: (0, _seamlessImmutable.getIn)(theme, ['UTDatePicker', 'helperText', 'color'], _colors.default.inputPrimary)
|
|
216
|
+
},
|
|
217
|
+
contained: {
|
|
218
|
+
marginLeft: 0
|
|
219
|
+
}
|
|
205
220
|
}
|
|
206
221
|
}
|
|
207
222
|
});
|
|
@@ -10,12 +10,11 @@ var _Dialog = _interopRequireDefault(require("@material-ui/core/Dialog"));
|
|
|
10
10
|
var _DialogActions = _interopRequireDefault(require("@material-ui/core/DialogActions"));
|
|
11
11
|
var _DialogContent = _interopRequireDefault(require("@material-ui/core/DialogContent"));
|
|
12
12
|
var _DialogTitle = _interopRequireDefault(require("@material-ui/core/DialogTitle"));
|
|
13
|
-
var _IconButton = _interopRequireDefault(require("@material-ui/core/IconButton"));
|
|
14
13
|
var _CloseRounded = _interopRequireDefault(require("@material-ui/icons/CloseRounded"));
|
|
15
14
|
var _Close = _interopRequireDefault(require("@material-ui/icons/Close"));
|
|
16
15
|
var _WithTheme = _interopRequireDefault(require("../WithTheme"));
|
|
17
16
|
var _UTLabel = _interopRequireDefault(require("../UTLabel"));
|
|
18
|
-
var
|
|
17
|
+
var _UTButton = _interopRequireDefault(require("../UTButton"));
|
|
19
18
|
var _types = require("./types");
|
|
20
19
|
var _theme = require("./theme");
|
|
21
20
|
var _constants = require("./constants");
|
|
@@ -24,7 +23,6 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
|
24
23
|
var UTDialog = function UTDialog(_ref) {
|
|
25
24
|
var acceptButton = _ref.acceptButton,
|
|
26
25
|
alertConfig = _ref.alertConfig,
|
|
27
|
-
ButtonComponent = _ref.ButtonComponent,
|
|
28
26
|
cancelButton = _ref.cancelButton,
|
|
29
27
|
children = _ref.children,
|
|
30
28
|
classes = _ref.classes,
|
|
@@ -58,7 +56,7 @@ var UTDialog = function UTDialog(_ref) {
|
|
|
58
56
|
dialogActions = _ref2.dialogActions;
|
|
59
57
|
return /*#__PURE__*/_react.default.createElement(_Dialog.default, _extends({
|
|
60
58
|
open: isOpen,
|
|
61
|
-
onClose: withClickAway
|
|
59
|
+
onClose: withClickAway ? onRequestClose : undefined,
|
|
62
60
|
"aria-labelledby": "alert-dialog-title",
|
|
63
61
|
"aria-describedby": "alert-dialog-description",
|
|
64
62
|
classes: {
|
|
@@ -75,29 +73,28 @@ var UTDialog = function UTDialog(_ref) {
|
|
|
75
73
|
disableTypography: disableTypography,
|
|
76
74
|
className: "".concat(classes.mainTitle, " ").concat(whiteTitle && classes.whiteTitle, " ").concat(mainTitle),
|
|
77
75
|
id: "alert-dialog-title"
|
|
78
|
-
}, title, withCloseButton && /*#__PURE__*/_react.default.createElement(
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
76
|
+
}, title, withCloseButton && /*#__PURE__*/_react.default.createElement(_UTButton.default, {
|
|
77
|
+
classNames: {
|
|
78
|
+
icon: "".concat(classes.closeIcon, " ").concat(closeIcon),
|
|
79
|
+
root: "".concat(classes.closeButton, " ").concat(whiteTitle && classes.whiteCloseButton, " ").concat(closeButton)
|
|
80
|
+
},
|
|
81
|
+
Icon: CloseIcon,
|
|
82
|
+
onClick: onRequestClose,
|
|
83
|
+
variant: "text"
|
|
84
|
+
})), /*#__PURE__*/_react.default.createElement(_DialogContent.default, {
|
|
84
85
|
name: contentName,
|
|
85
86
|
className: "".concat(classes.content, " ").concat(content)
|
|
86
87
|
}, children), warningAlert && /*#__PURE__*/_react.default.createElement(_UTLabel.default, _extends({}, alertConfig, {
|
|
87
88
|
className: "".concat(classes.warning, " ").concat(warning)
|
|
88
89
|
}), warningAlert), (cancelButton || acceptButton) && /*#__PURE__*/_react.default.createElement(_DialogActions.default, {
|
|
89
90
|
className: "".concat(classes.dialogActions, " ").concat(dialogActions)
|
|
90
|
-
}, FooterComponents, cancelButton && /*#__PURE__*/_react.default.createElement(
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
button: acceptButton,
|
|
98
|
-
className: classes.acceptButton,
|
|
99
|
-
defaultText: _constants.ACCEPT_BUTTON_TEXT
|
|
100
|
-
})));
|
|
91
|
+
}, FooterComponents, cancelButton && /*#__PURE__*/_react.default.createElement(_UTButton.default, _extends({
|
|
92
|
+
colorTheme: "secondary",
|
|
93
|
+
variant: "text"
|
|
94
|
+
}, cancelButton), cancelButton.text || _constants.CANCEL_BUTTON_TEXT), acceptButton && /*#__PURE__*/_react.default.createElement(_UTButton.default, _extends({
|
|
95
|
+
colorTheme: "primary",
|
|
96
|
+
variant: "filled"
|
|
97
|
+
}, acceptButton), acceptButton.text || _constants.ACCEPT_BUTTON_TEXT)));
|
|
101
98
|
};
|
|
102
99
|
UTDialog.defaultProps = {
|
|
103
100
|
disableEnforceFocus: false,
|
|
@@ -110,7 +107,6 @@ UTDialog.defaultProps = {
|
|
|
110
107
|
UTDialog.propTypes = {
|
|
111
108
|
acceptButton: _types.dialogButtonPropTypes,
|
|
112
109
|
alertConfig: _propTypes.object,
|
|
113
|
-
ButtonComponent: _propTypes.elementType,
|
|
114
110
|
cancelButton: _types.dialogButtonPropTypes,
|
|
115
111
|
classes: (0, _propTypes.objectOf)(_propTypes.string),
|
|
116
112
|
classNames: (0, _propTypes.objectOf)(_propTypes.string),
|
|
@@ -120,7 +116,7 @@ UTDialog.propTypes = {
|
|
|
120
116
|
disableScrollLock: _propTypes.bool,
|
|
121
117
|
disableTypography: _propTypes.bool,
|
|
122
118
|
elevation: _propTypes.number,
|
|
123
|
-
FooterComponents: _propTypes.
|
|
119
|
+
FooterComponents: _propTypes.element,
|
|
124
120
|
isOpen: _propTypes.bool,
|
|
125
121
|
onRequestClose: _propTypes.func,
|
|
126
122
|
roundedCloseButton: _propTypes.bool,
|
|
@@ -6,8 +6,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.retrieveStyle = void 0;
|
|
7
7
|
var _seamlessImmutable = require("seamless-immutable");
|
|
8
8
|
var _colors = _interopRequireDefault(require("../../scss/variables/_colors.scss"));
|
|
9
|
+
var _classesUtils = require("../../utils/classesUtils");
|
|
9
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
-
var retrieveStyle = function retrieveStyle(
|
|
11
|
+
var retrieveStyle = function retrieveStyle(_ref) {
|
|
12
|
+
var _theme$UTDialog, _theme$UTDialog$close;
|
|
13
|
+
var theme = _ref.theme;
|
|
11
14
|
return {
|
|
12
15
|
container: {
|
|
13
16
|
margin: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'container', 'margin'], 0),
|
|
@@ -51,7 +54,7 @@ var retrieveStyle = function retrieveStyle(theme) {
|
|
|
51
54
|
},
|
|
52
55
|
dialogActions: {
|
|
53
56
|
margin: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'dialogActions', 'margin']),
|
|
54
|
-
padding: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'dialogActions', 'padding']),
|
|
57
|
+
padding: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'dialogActions', 'padding'], 16),
|
|
55
58
|
alignItems: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'dialogActions', 'alignItems']),
|
|
56
59
|
boxSizing: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'dialogActions', 'boxSizing']),
|
|
57
60
|
display: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'dialogActions', 'display']),
|
|
@@ -60,32 +63,14 @@ var retrieveStyle = function retrieveStyle(theme) {
|
|
|
60
63
|
width: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'dialogActions', 'width'])
|
|
61
64
|
},
|
|
62
65
|
closeButton: {
|
|
63
|
-
|
|
66
|
+
padding: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'closeButton', 'padding']),
|
|
67
|
+
position: (0, _classesUtils.withImportant)((theme === null || theme === void 0 ? void 0 : (_theme$UTDialog = theme.UTDialog) === null || _theme$UTDialog === void 0 ? void 0 : (_theme$UTDialog$close = _theme$UTDialog.closeButton) === null || _theme$UTDialog$close === void 0 ? void 0 : _theme$UTDialog$close.position) || 'absolute'),
|
|
64
68
|
right: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'closeButton', 'right'], '5px'),
|
|
65
|
-
top: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'closeButton', 'top'], '5px')
|
|
66
|
-
padding: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'closeButton', 'padding'])
|
|
69
|
+
top: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'closeButton', 'top'], '5px')
|
|
67
70
|
},
|
|
68
71
|
whiteCloseButton: {
|
|
69
72
|
color: _colors.default.white
|
|
70
73
|
},
|
|
71
|
-
acceptButton: {
|
|
72
|
-
margin: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'acceptButton', 'margin']),
|
|
73
|
-
padding: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'acceptButton', 'padding']),
|
|
74
|
-
fontSize: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'acceptButton', 'fontSize']),
|
|
75
|
-
fontWeight: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'acceptButton', 'fontWeight']),
|
|
76
|
-
width: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'acceptButton', 'width']),
|
|
77
|
-
backgroundColor: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'acceptButton', 'backgroundColor']),
|
|
78
|
-
textTransform: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'acceptButton', 'textTransform'])
|
|
79
|
-
},
|
|
80
|
-
cancelButton: {
|
|
81
|
-
color: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'cancelButton', 'color']),
|
|
82
|
-
padding: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'cancelButton', 'padding']),
|
|
83
|
-
fontSize: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'cancelButton', 'fontSize']),
|
|
84
|
-
fontWeight: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'cancelButton', 'fontWeight']),
|
|
85
|
-
transition: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'cancelButton', 'transition']),
|
|
86
|
-
textTransform: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'cancelButton', 'textTransform']),
|
|
87
|
-
width: (0, _seamlessImmutable.getIn)(theme, ['UTDialog', 'cancelButton', 'width'])
|
|
88
|
-
},
|
|
89
74
|
hidden: {
|
|
90
75
|
display: 'none'
|
|
91
76
|
},
|
|
@@ -5,11 +5,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.dialogButtonPropTypes = void 0;
|
|
7
7
|
var _propTypes = require("prop-types");
|
|
8
|
-
var dialogButtonPropTypes = (0, _propTypes.
|
|
9
|
-
|
|
10
|
-
text: _propTypes.string,
|
|
8
|
+
var dialogButtonPropTypes = (0, _propTypes.shape)({
|
|
9
|
+
classNames: (0, _propTypes.objectOf)(_propTypes.string),
|
|
11
10
|
disabled: _propTypes.bool,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
})
|
|
11
|
+
text: _propTypes.string,
|
|
12
|
+
onClick: _propTypes.func
|
|
13
|
+
});
|
|
15
14
|
exports.dialogButtonPropTypes = dialogButtonPropTypes;
|
|
@@ -5,11 +5,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _IconButton = _interopRequireDefault(require("@material-ui/core/IconButton"));
|
|
9
8
|
var _Menu = _interopRequireDefault(require("@material-ui/core/Menu"));
|
|
10
9
|
var _MenuItem = _interopRequireDefault(require("@material-ui/core/MenuItem"));
|
|
11
10
|
var _MoreVert = _interopRequireDefault(require("@material-ui/icons/MoreVert"));
|
|
12
11
|
var _propTypes = require("prop-types");
|
|
12
|
+
var _UTButton = _interopRequireDefault(require("../UTButton"));
|
|
13
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
14
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
15
15
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
@@ -54,14 +54,18 @@ var UTDotMenu = /*#__PURE__*/function (_React$Component) {
|
|
|
54
54
|
key: "render",
|
|
55
55
|
value: function render() {
|
|
56
56
|
var anchorEl = this.state.anchorEl;
|
|
57
|
+
var classNames = this.props.classNames;
|
|
57
58
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
58
59
|
className: this.props.className
|
|
59
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
60
|
+
}, /*#__PURE__*/_react.default.createElement(_UTButton.default, {
|
|
61
|
+
classNames: {
|
|
62
|
+
icon: classNames.icon,
|
|
63
|
+
root: classNames.button
|
|
64
|
+
},
|
|
65
|
+
Icon: _MoreVert.default,
|
|
66
|
+
onClick: this.handleClick,
|
|
67
|
+
variant: "text"
|
|
68
|
+
}), /*#__PURE__*/_react.default.createElement(_Menu.default, {
|
|
65
69
|
id: "long-menu",
|
|
66
70
|
anchorEl: anchorEl,
|
|
67
71
|
open: Boolean(anchorEl),
|
|
@@ -81,7 +85,11 @@ UTDotMenu.propTypes = {
|
|
|
81
85
|
name: _propTypes.string,
|
|
82
86
|
onPress: _propTypes.func
|
|
83
87
|
})),
|
|
84
|
-
className: _propTypes.string
|
|
88
|
+
className: _propTypes.string,
|
|
89
|
+
classNames: (0, _propTypes.shape)({
|
|
90
|
+
icon: _propTypes.string,
|
|
91
|
+
button: _propTypes.string
|
|
92
|
+
})
|
|
85
93
|
};
|
|
86
94
|
var _default = UTDotMenu;
|
|
87
95
|
exports.default = _default;
|
|
@@ -6,8 +6,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.retrieveStyle = void 0;
|
|
7
7
|
var _colors = _interopRequireDefault(require("../../scss/variables/_colors.scss"));
|
|
8
8
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
9
|
-
var retrieveStyle = function retrieveStyle(
|
|
9
|
+
var retrieveStyle = function retrieveStyle(_ref) {
|
|
10
10
|
var _theme$UTEmojiPicker, _theme$UTEmojiPicker$, _theme$UTEmojiPicker2, _theme$UTEmojiPicker3, _theme$UTEmojiPicker4, _theme$UTEmojiPicker5, _theme$UTEmojiPicker6, _theme$UTEmojiPicker7, _theme$UTEmojiPicker8, _theme$UTEmojiPicker9, _theme$UTEmojiPicker10, _theme$UTEmojiPicker11, _theme$UTEmojiPicker12, _theme$UTEmojiPicker13, _theme$UTEmojiPicker14, _theme$UTEmojiPicker15, _theme$UTEmojiPicker16, _theme$UTEmojiPicker17, _theme$UTEmojiPicker18, _theme$UTEmojiPicker19, _theme$UTEmojiPicker20, _theme$UTEmojiPicker21, _theme$UTEmojiPicker22, _theme$UTEmojiPicker23, _theme$UTEmojiPicker24, _theme$UTEmojiPicker25, _theme$UTEmojiPicker26, _theme$UTEmojiPicker27, _theme$UTEmojiPicker28, _theme$UTEmojiPicker29, _theme$UTEmojiPicker30, _theme$UTEmojiPicker31, _theme$UTEmojiPicker32, _theme$UTEmojiPicker33, _theme$UTEmojiPicker34, _theme$UTEmojiPicker35, _theme$UTEmojiPicker36, _theme$UTEmojiPicker37, _theme$UTEmojiPicker38, _theme$UTEmojiPicker39, _theme$UTEmojiPicker40, _theme$UTEmojiPicker41, _theme$UTEmojiPicker42, _theme$UTEmojiPicker43, _theme$UTEmojiPicker44, _theme$UTEmojiPicker45, _theme$UTEmojiPicker46, _theme$UTEmojiPicker47, _theme$UTEmojiPicker48, _theme$UTEmojiPicker49;
|
|
11
|
+
var theme = _ref.theme;
|
|
11
12
|
return {
|
|
12
13
|
container: {
|
|
13
14
|
backgroundColor: (theme === null || theme === void 0 ? void 0 : (_theme$UTEmojiPicker = theme.UTEmojiPicker) === null || _theme$UTEmojiPicker === void 0 ? void 0 : (_theme$UTEmojiPicker$ = _theme$UTEmojiPicker.container) === null || _theme$UTEmojiPicker$ === void 0 ? void 0 : _theme$UTEmojiPicker$.backgroundColor) || _colors.default.white,
|
|
@@ -95,7 +95,7 @@ var UTFileInput = /*#__PURE__*/function (_PureComponent) {
|
|
|
95
95
|
onDragOver: this.handleDragOver,
|
|
96
96
|
onDrop: this.handleOnDrop
|
|
97
97
|
}, loading ? /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement(_UTLabel.default, {
|
|
98
|
-
|
|
98
|
+
colorTheme: "gray",
|
|
99
99
|
className: "".concat(_stylesModule.default.loadingLabel, " ").concat(loadingTextClassname)
|
|
100
100
|
}, uploadingText), /*#__PURE__*/_react.default.createElement("div", {
|
|
101
101
|
className: _stylesModule.default.loading
|
|
@@ -104,7 +104,7 @@ var UTFileInput = /*#__PURE__*/function (_PureComponent) {
|
|
|
104
104
|
}, Icon || /*#__PURE__*/_react.default.createElement(UploadImage, {
|
|
105
105
|
className: "".concat(_stylesModule.default.icon, " ").concat(classes.icon)
|
|
106
106
|
}), /*#__PURE__*/_react.default.createElement(_UTLabel.default, {
|
|
107
|
-
|
|
107
|
+
variant: "small",
|
|
108
108
|
className: "".concat(_stylesModule.default.label, " ").concat(classes.fileInputLabel)
|
|
109
109
|
}, label)), /*#__PURE__*/_react.default.createElement("input", {
|
|
110
110
|
className: "".concat(_stylesModule.default.input, " ").concat(inputClassname),
|
|
@@ -114,8 +114,9 @@ var UTFileInput = /*#__PURE__*/function (_PureComponent) {
|
|
|
114
114
|
name: name,
|
|
115
115
|
disabled: disabled
|
|
116
116
|
})), error && /*#__PURE__*/_react.default.createElement(_UTLabel.default, {
|
|
117
|
-
|
|
118
|
-
|
|
117
|
+
className: errorClassname,
|
|
118
|
+
colorTheme: "error",
|
|
119
|
+
variant: "small"
|
|
119
120
|
}, errorText));
|
|
120
121
|
}
|
|
121
122
|
}]);
|
|
@@ -5,7 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.retrieveStyle = void 0;
|
|
7
7
|
var _seamlessImmutable = require("seamless-immutable");
|
|
8
|
-
var retrieveStyle = function retrieveStyle(
|
|
8
|
+
var retrieveStyle = function retrieveStyle(_ref) {
|
|
9
|
+
var theme = _ref.theme;
|
|
9
10
|
return {
|
|
10
11
|
base: {
|
|
11
12
|
backgroundColor: (0, _seamlessImmutable.getIn)(theme, ['UTIconButton', 'base', 'backgroundColor']),
|