@widergy/energy-ui 1.136.0 → 1.136.2
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/dist/components/EnergyThemeProvider/index.js +13 -36
- package/dist/components/Loading/constants.js +1 -2
- package/dist/components/Loading/index.js +13 -12
- package/dist/components/Loading/theme.js +9 -11
- package/dist/components/UTAlert/AlertHandler.js +75 -101
- package/dist/components/UTAlert/index.js +65 -87
- package/dist/components/UTAlert/theme.js +29 -31
- package/dist/components/UTAttachment/components/Preview/index.js +8 -9
- package/dist/components/UTAttachment/constants.js +7 -13
- package/dist/components/UTAttachment/index.js +153 -232
- package/dist/components/UTAttachment/layout.js +25 -26
- package/dist/components/UTAttachment/theme.js +12 -14
- package/dist/components/UTAttachment/utils.js +34 -117
- package/dist/components/UTAutocomplete/components/ListBox/index.js +13 -21
- package/dist/components/UTAutocomplete/components/ListBox/utils.js +9 -11
- package/dist/components/UTAutocomplete/constants.js +12 -23
- package/dist/components/UTAutocomplete/index.js +45 -66
- package/dist/components/UTAutocomplete/theme.js +3 -3
- package/dist/components/UTAvatar/constants.js +2 -3
- package/dist/components/UTAvatar/index.js +15 -12
- package/dist/components/UTBarChart/components/Bars/components/Bar/components/Rect/index.js +22 -22
- package/dist/components/UTBarChart/components/Bars/components/Bar/constants.js +1 -1
- package/dist/components/UTBarChart/components/Bars/components/Bar/index.js +21 -22
- package/dist/components/UTBarChart/components/Bars/constants.js +3 -6
- package/dist/components/UTBarChart/components/Bars/index.js +70 -80
- package/dist/components/UTBarChart/components/Legend/constants.js +12 -18
- package/dist/components/UTBarChart/components/Legend/index.js +73 -91
- package/dist/components/UTBarChart/components/Legend/utils.js +1 -5
- package/dist/components/UTBarChart/components/Levels/index.js +16 -14
- package/dist/components/UTBarChart/components/Levels/utils.js +25 -27
- package/dist/components/UTBarChart/components/LinearPlot/constants.js +3 -5
- package/dist/components/UTBarChart/components/LinearPlot/index.js +25 -20
- package/dist/components/UTBarChart/components/LinearPlot/utils.js +37 -39
- package/dist/components/UTBarChart/components/Pagination/constants.js +1 -2
- package/dist/components/UTBarChart/components/Pagination/index.js +20 -24
- package/dist/components/UTBarChart/components/XAxis/components/AxisElement/index.js +21 -32
- package/dist/components/UTBarChart/components/XAxis/components/Decoration/constants.js +2 -4
- package/dist/components/UTBarChart/components/XAxis/components/Decoration/index.js +20 -19
- package/dist/components/UTBarChart/components/XAxis/constants.js +1 -2
- package/dist/components/UTBarChart/components/XAxis/index.js +54 -65
- package/dist/components/UTBarChart/components/YAxis/AxisElement/index.js +12 -11
- package/dist/components/UTBarChart/components/YAxis/constants.js +1 -2
- package/dist/components/UTBarChart/components/YAxis/index.js +24 -31
- package/dist/components/UTBarChart/components/YAxis/utils.js +4 -6
- package/dist/components/UTBarChart/constants.js +4 -8
- package/dist/components/UTBarChart/hooks/use-dynamic-margins.js +23 -40
- package/dist/components/UTBarChart/index.js +148 -162
- package/dist/components/UTBarChart/theme.js +102 -104
- package/dist/components/UTBarChart/types.js +9 -17
- package/dist/components/UTBarChart/utils.js +107 -111
- package/dist/components/UTBreadcrumbs/constants.js +3 -6
- package/dist/components/UTBreadcrumbs/index.js +79 -106
- package/dist/components/UTBreadcrumbs/theme.js +21 -23
- package/dist/components/UTButton/index.js +48 -71
- package/dist/components/UTButton/theme.js +172 -174
- package/dist/components/UTCBUInput/index.js +36 -40
- package/dist/components/UTCBUInput/theme.js +5 -7
- package/dist/components/UTCaptcha/index.js +19 -45
- package/dist/components/UTCard/components/UTCardFooter/index.js +16 -17
- package/dist/components/UTCard/index.js +87 -122
- package/dist/components/UTCard/theme.js +8 -11
- package/dist/components/UTCard/types.js +2 -3
- package/dist/components/UTCarousel/components/Button/index.js +13 -13
- package/dist/components/UTCarousel/components/Legend/index.js +14 -16
- package/dist/components/UTCarousel/components/Slider/component/Slide/index.js +16 -16
- package/dist/components/UTCarousel/components/Slider/constants.js +5 -10
- package/dist/components/UTCarousel/components/Slider/index.js +181 -252
- package/dist/components/UTCarousel/components/Slider/layout.js +66 -93
- package/dist/components/UTCarousel/index.js +14 -15
- package/dist/components/UTCarousel/theme.js +35 -37
- package/dist/components/UTCheckList/constants.js +1 -2
- package/dist/components/UTCheckList/index.js +72 -91
- package/dist/components/UTCheckList/theme.js +66 -70
- package/dist/components/UTCheckbox/constants.js +3 -6
- package/dist/components/UTCheckbox/index.js +31 -42
- package/dist/components/UTCheckbox/theme.js +49 -53
- package/dist/components/UTConsumptionBar/components/ConsumptionBarIndicator/index.js +9 -9
- package/dist/components/UTConsumptionBar/constants.js +3 -6
- package/dist/components/UTConsumptionBar/index.js +49 -74
- package/dist/components/UTCuit/index.js +109 -133
- package/dist/components/UTCuit/theme.js +47 -49
- package/dist/components/UTDatePicker/components/Day/constants.js +1 -2
- package/dist/components/UTDatePicker/components/Day/index.js +12 -12
- package/dist/components/UTDatePicker/constants.js +20 -31
- package/dist/components/UTDatePicker/index.js +59 -101
- package/dist/components/UTDatePicker/theme.js +173 -177
- package/dist/components/UTDatePicker/types.js +2 -3
- package/dist/components/UTDatePicker/utils.js +2 -6
- package/dist/components/UTDialog/components/ActionButton/index.js +10 -9
- package/dist/components/UTDialog/constants.js +2 -4
- package/dist/components/UTDialog/index.js +39 -38
- package/dist/components/UTDialog/theme.js +93 -95
- package/dist/components/UTDialog/types.js +2 -3
- package/dist/components/UTDotMenu/index.js +33 -57
- package/dist/components/UTEmojiPicker/constants.js +6 -11
- package/dist/components/UTEmojiPicker/index.js +45 -65
- package/dist/components/UTEmojiPicker/theme.js +1 -1
- package/dist/components/UTEmojiPicker/utils.js +21 -51
- package/dist/components/UTExternalLink/index.js +17 -14
- package/dist/components/UTFileInput/constants.js +2 -4
- package/dist/components/UTFileInput/index.js +7 -31
- package/dist/components/UTFileInput/layout.js +67 -96
- package/dist/components/UTIconButton/index.js +49 -72
- package/dist/components/UTIconButton/theme.js +53 -55
- package/dist/components/UTImageRadio/components/ImageRadioCard/index.js +53 -58
- package/dist/components/UTImageRadio/constants.js +3 -6
- package/dist/components/UTImageRadio/index.js +39 -47
- package/dist/components/UTImageRadio/theme.js +8 -11
- package/dist/components/UTImageRadio/types.js +2 -3
- package/dist/components/UTImageRadio/utils.js +2 -6
- package/dist/components/UTLabel/index.js +69 -90
- package/dist/components/UTLabel/theme.js +84 -86
- package/dist/components/UTList/index.js +15 -18
- package/dist/components/UTLoading/index.js +15 -15
- package/dist/components/UTMap/components/GoogleMaps/constants.js +8 -11
- package/dist/components/UTMap/components/GoogleMaps/index.js +63 -91
- package/dist/components/UTMap/components/GoogleMaps/styles.js +2 -3
- package/dist/components/UTMap/constants.js +6 -12
- package/dist/components/UTMap/index.js +163 -198
- package/dist/components/UTMap/types.js +4 -6
- package/dist/components/UTMap/utils.js +29 -46
- package/dist/components/UTMap/withGoogleMapScript.js +12 -17
- package/dist/components/UTMenu/index.js +52 -69
- package/dist/components/UTMenu/theme.js +2 -2
- package/dist/components/UTMenu/utils.js +5 -11
- package/dist/components/UTPagination/theme.js +4 -2
- package/dist/components/UTPanel/index.js +38 -44
- package/dist/components/UTPasswordField/components/PasswordValidations/components/Error/index.js +14 -11
- package/dist/components/UTPasswordField/components/PasswordValidations/components/Validation/index.js +24 -21
- package/dist/components/UTPasswordField/components/PasswordValidations/index.js +63 -50
- package/dist/components/UTPasswordField/components/PasswordWarning/index.js +26 -27
- package/dist/components/UTPasswordField/index.js +26 -23
- package/dist/components/UTPasswordField/theme.js +37 -39
- package/dist/components/UTPhoneInput/constants.js +3 -6
- package/dist/components/UTPhoneInput/index.js +180 -205
- package/dist/components/UTPhoneInput/theme.js +109 -113
- package/dist/components/UTPieChart/components/ArrowLabel/constants.js +4 -8
- package/dist/components/UTPieChart/components/ArrowLabel/index.js +24 -23
- package/dist/components/UTPieChart/components/Legend/contants.js +3 -6
- package/dist/components/UTPieChart/components/Legend/index.js +27 -24
- package/dist/components/UTPieChart/constants.js +13 -26
- package/dist/components/UTPieChart/hooks/use-animated-value/index.js +15 -33
- package/dist/components/UTPieChart/index.js +73 -76
- package/dist/components/UTPieChart/theme.js +23 -25
- package/dist/components/UTPieChart/utils.js +4 -2
- package/dist/components/UTProgressBar/constants.js +2 -4
- package/dist/components/UTProgressBar/index.js +12 -11
- package/dist/components/UTProgressBar/theme.js +25 -27
- package/dist/components/UTProgressBar/types.js +2 -3
- package/dist/components/UTRadioGroup/index.js +45 -71
- package/dist/components/UTRadioGroup/theme.js +82 -86
- package/dist/components/UTRating/components/Circle/index.js +41 -56
- package/dist/components/UTRating/components/Faces/constants.js +2 -4
- package/dist/components/UTRating/components/Faces/index.js +34 -36
- package/dist/components/UTRating/components/Star/index.js +36 -40
- package/dist/components/UTRating/constants.js +4 -8
- package/dist/components/UTRating/index.js +31 -46
- package/dist/components/UTRating/theme.js +77 -79
- package/dist/components/UTRipple/Ripple.js +22 -39
- package/dist/components/UTRipple/index.js +18 -37
- package/dist/components/UTSelect/components/Option/index.js +13 -13
- package/dist/components/UTSelect/constants.js +4 -8
- package/dist/components/UTSelect/index.js +61 -81
- package/dist/components/UTSelect/stylesJS.js +2 -3
- package/dist/components/UTSelect/theme.js +43 -45
- package/dist/components/UTSelect/utils.js +3 -13
- package/dist/components/UTSidebar/components/ListOption/index.js +32 -47
- package/dist/components/UTSidebar/components/LogosContainer/components/DynamicIcon/index.js +8 -8
- package/dist/components/UTSidebar/components/LogosContainer/index.js +14 -14
- package/dist/components/UTSidebar/components/Option/constants.js +2 -3
- package/dist/components/UTSidebar/components/Option/index.js +28 -32
- package/dist/components/UTSidebar/components/Toggler/index.js +11 -11
- package/dist/components/UTSidebar/index.js +42 -53
- package/dist/components/UTSidebar/theme.js +1 -1
- package/dist/components/UTSidebar/types.js +5 -10
- package/dist/components/UTSkeleton/index.js +10 -36
- package/dist/components/UTSwitch/constants.js +3 -6
- package/dist/components/UTSwitch/index.js +42 -57
- package/dist/components/UTSwitch/theme.js +115 -117
- package/dist/components/UTTable/components/ActionIcons/constants.js +1 -2
- package/dist/components/UTTable/components/ActionIcons/index.js +44 -81
- package/dist/components/UTTable/components/Cell/index.js +18 -23
- package/dist/components/UTTable/components/HeaderCell/constants.js +2 -3
- package/dist/components/UTTable/components/HeaderCell/index.js +23 -30
- package/dist/components/UTTable/components/HeaderCell/utils.js +3 -3
- package/dist/components/UTTable/components/PrimaryAction/index.js +12 -11
- package/dist/components/UTTable/components/ResponsiveCell/index.js +19 -20
- package/dist/components/UTTable/components/Status/index.js +18 -19
- package/dist/components/UTTable/components/TableFooter/components/PageSizeSelector/index.js +10 -9
- package/dist/components/UTTable/components/TableFooter/components/PageSizeSelector/utils.js +7 -13
- package/dist/components/UTTable/components/TableFooter/components/Pagination/components/NavigationButton/index.js +12 -12
- package/dist/components/UTTable/components/TableFooter/components/Pagination/index.js +21 -32
- package/dist/components/UTTable/components/TableFooter/components/Pagination/utils.js +8 -14
- package/dist/components/UTTable/components/TableFooter/constants.js +1 -2
- package/dist/components/UTTable/components/TableFooter/index.js +15 -15
- package/dist/components/UTTable/components/TableHeader/index.js +11 -11
- package/dist/components/UTTable/components/TableRow/constants.js +3 -6
- package/dist/components/UTTable/components/TableRow/index.js +79 -94
- package/dist/components/UTTable/constants.js +26 -43
- package/dist/components/UTTable/hook.js +11 -26
- package/dist/components/UTTable/index.js +125 -213
- package/dist/components/UTTable/theme.js +13 -16
- package/dist/components/UTTable/types.js +4 -8
- package/dist/components/UTTable/utils.js +70 -74
- package/dist/components/UTTabs/components/TooltipTab/index.js +20 -30
- package/dist/components/UTTabs/constants.js +4 -8
- package/dist/components/UTTabs/index.js +55 -84
- package/dist/components/UTTabs/theme.js +112 -114
- package/dist/components/UTTabs/utils.js +1 -1
- package/dist/components/UTTextArea/constants.js +4 -6
- package/dist/components/UTTextArea/index.js +40 -24
- package/dist/components/UTTextArea/styles.module.scss +20 -1
- package/dist/components/UTTextArea/theme.js +1 -1
- package/dist/components/UTTextInput/constants.js +2 -3
- package/dist/components/UTTextInput/index.js +116 -146
- package/dist/components/UTTextInput/theme.js +28 -30
- package/dist/components/UTThirdPartyCookieChecker/index.js +17 -21
- package/dist/components/UTToggle/components/ToggleOption/index.js +16 -17
- package/dist/components/UTToggle/index.js +25 -26
- package/dist/components/UTToggle/theme.js +47 -49
- package/dist/components/UTTooltip/index.js +23 -30
- package/dist/components/UTTooltip/theme.js +1 -1
- package/dist/components/UTTopbar/theme.js +4 -2
- package/dist/components/UTTouchableWithoutFeedback/index.js +14 -27
- package/dist/components/UTVirtualizedList/components/VirtualizedData/components/ListRow/constants.js +2 -4
- package/dist/components/UTVirtualizedList/components/VirtualizedData/components/ListRow/index.js +34 -31
- package/dist/components/UTVirtualizedList/components/VirtualizedData/components/ListRow/utils.js +4 -4
- package/dist/components/UTVirtualizedList/components/VirtualizedData/constants.js +6 -12
- package/dist/components/UTVirtualizedList/components/VirtualizedData/hooks/use-ledger.js +8 -18
- package/dist/components/UTVirtualizedList/components/VirtualizedData/hooks/use-virtualized-data.js +23 -47
- package/dist/components/UTVirtualizedList/components/VirtualizedData/index.js +31 -34
- package/dist/components/UTVirtualizedList/components/VirtualizedData/utils.js +81 -93
- package/dist/components/UTVirtualizedList/constants.js +4 -8
- package/dist/components/UTVirtualizedList/index.js +26 -38
- package/dist/components/UTWorkflowContainer/components/ActionButton/index.js +11 -11
- package/dist/components/UTWorkflowContainer/constants.js +5 -9
- package/dist/components/UTWorkflowContainer/hooks/use-previous.js +3 -3
- package/dist/components/UTWorkflowContainer/index.js +31 -50
- package/dist/components/UTWorkflowContainer/theme.js +70 -64
- package/dist/components/UTWorkflowContainer/types.js +2 -3
- package/dist/components/WithLoading/index.js +10 -15
- package/dist/components/WithTheme/index.js +10 -17
- package/dist/components/WithTheme/layout.js +18 -41
- package/dist/components/WithTouch/index.js +12 -19
- package/dist/index.js +54 -54
- package/dist/scss/variables/colors.module.scss +1 -0
- package/dist/theme.js +5 -3
- package/dist/types/commonTypes.js +3 -5
- package/dist/types/consumptionTypes.js +3 -5
- package/dist/types/formTypes.js +4 -7
- package/dist/types/tableTypes.js +2 -3
- package/dist/utils/classesUtils.js +4 -10
- package/dist/utils/componentUtils.js +10 -13
- package/dist/utils/helperFunctions.js +4 -4
- package/dist/utils/useScreenSize.js +2 -3
- package/package.json +1 -1
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
@@ -15,76 +14,55 @@ var _WithTheme = _interopRequireDefault(require("../WithTheme"));
|
|
|
15
14
|
var _theme = require("./theme");
|
|
16
15
|
var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
17
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
18
|
-
function _getRequireWildcardCache(
|
|
19
|
-
function _interopRequireWildcard(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
17
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
18
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
19
|
+
const variants = ['base', 'primary', 'secondary', 'alternative', 'gray', 'disabled'];
|
|
20
|
+
class UTIconButton extends _react.Component {
|
|
21
|
+
render() {
|
|
22
|
+
const {
|
|
23
|
+
type,
|
|
24
|
+
onClick,
|
|
25
|
+
disabled,
|
|
26
|
+
loading,
|
|
27
|
+
small,
|
|
28
|
+
large,
|
|
29
|
+
classes,
|
|
30
|
+
className,
|
|
31
|
+
children,
|
|
32
|
+
autoFocus,
|
|
33
|
+
imgSrc,
|
|
34
|
+
imgClassName,
|
|
35
|
+
style,
|
|
36
|
+
loadingClassName
|
|
37
|
+
} = this.props;
|
|
38
|
+
const size = small ? 'small' : large ? 'large' : 'medium';
|
|
39
|
+
const classNames = (0, _style.retrieveClassNamesFromProps)(variants, classes, this.props);
|
|
40
|
+
return loading ? /*#__PURE__*/_react.default.createElement("div", {
|
|
41
|
+
className: "".concat(_stylesModule.default.loadingContainer, " ").concat(loadingClassName)
|
|
42
|
+
}, /*#__PURE__*/_react.default.createElement(_CircularProgress.default, {
|
|
43
|
+
size: 24,
|
|
44
|
+
className: classes.loading
|
|
45
|
+
})) : imgSrc ? /*#__PURE__*/_react.default.createElement(_UTTouchableWithoutFeedback.default, {
|
|
46
|
+
onClick: onClick,
|
|
47
|
+
className: classes.imgIcon,
|
|
48
|
+
withRipple: true
|
|
49
|
+
}, /*#__PURE__*/_react.default.createElement("img", {
|
|
50
|
+
src: imgSrc,
|
|
51
|
+
alt: "",
|
|
52
|
+
className: imgClassName
|
|
53
|
+
})) : /*#__PURE__*/_react.default.createElement(_IconButton.default, {
|
|
54
|
+
onClick: onClick,
|
|
55
|
+
disabled: disabled || loading,
|
|
56
|
+
size: size,
|
|
57
|
+
type: type,
|
|
58
|
+
autoFocus: autoFocus,
|
|
59
|
+
style: style,
|
|
60
|
+
classes: {
|
|
61
|
+
root: "".concat(classNames, " ").concat(small ? classes.small : large && classes.large, " ").concat(className)
|
|
62
|
+
}
|
|
63
|
+
}, children);
|
|
39
64
|
}
|
|
40
|
-
|
|
41
|
-
key: "render",
|
|
42
|
-
value: function render() {
|
|
43
|
-
var _this$props = this.props,
|
|
44
|
-
type = _this$props.type,
|
|
45
|
-
onClick = _this$props.onClick,
|
|
46
|
-
disabled = _this$props.disabled,
|
|
47
|
-
loading = _this$props.loading,
|
|
48
|
-
small = _this$props.small,
|
|
49
|
-
large = _this$props.large,
|
|
50
|
-
classes = _this$props.classes,
|
|
51
|
-
className = _this$props.className,
|
|
52
|
-
children = _this$props.children,
|
|
53
|
-
autoFocus = _this$props.autoFocus,
|
|
54
|
-
imgSrc = _this$props.imgSrc,
|
|
55
|
-
imgClassName = _this$props.imgClassName,
|
|
56
|
-
style = _this$props.style,
|
|
57
|
-
loadingClassName = _this$props.loadingClassName;
|
|
58
|
-
var size = small ? 'small' : large ? 'large' : 'medium';
|
|
59
|
-
var classNames = (0, _style.retrieveClassNamesFromProps)(variants, classes, this.props);
|
|
60
|
-
return loading ? /*#__PURE__*/_react.default.createElement("div", {
|
|
61
|
-
className: "".concat(_stylesModule.default.loadingContainer, " ").concat(loadingClassName)
|
|
62
|
-
}, /*#__PURE__*/_react.default.createElement(_CircularProgress.default, {
|
|
63
|
-
size: 24,
|
|
64
|
-
className: classes.loading
|
|
65
|
-
})) : imgSrc ? /*#__PURE__*/_react.default.createElement(_UTTouchableWithoutFeedback.default, {
|
|
66
|
-
onClick: onClick,
|
|
67
|
-
className: classes.imgIcon,
|
|
68
|
-
withRipple: true
|
|
69
|
-
}, /*#__PURE__*/_react.default.createElement("img", {
|
|
70
|
-
src: imgSrc,
|
|
71
|
-
alt: "",
|
|
72
|
-
className: imgClassName
|
|
73
|
-
})) : /*#__PURE__*/_react.default.createElement(_IconButton.default, {
|
|
74
|
-
onClick: onClick,
|
|
75
|
-
disabled: disabled || loading,
|
|
76
|
-
size: size,
|
|
77
|
-
type: type,
|
|
78
|
-
autoFocus: autoFocus,
|
|
79
|
-
style: style,
|
|
80
|
-
classes: {
|
|
81
|
-
root: "".concat(classNames, " ").concat(small ? classes.small : large && classes.large, " ").concat(className)
|
|
82
|
-
}
|
|
83
|
-
}, children);
|
|
84
|
-
}
|
|
85
|
-
}]);
|
|
86
|
-
return UTIconButton;
|
|
87
|
-
}(_react.Component);
|
|
65
|
+
}
|
|
88
66
|
UTIconButton.propTypes = {
|
|
89
67
|
small: _propTypes.bool,
|
|
90
68
|
large: _propTypes.bool,
|
|
@@ -99,5 +77,4 @@ UTIconButton.propTypes = {
|
|
|
99
77
|
imgClassName: _propTypes.string,
|
|
100
78
|
loadingClassName: _propTypes.string
|
|
101
79
|
};
|
|
102
|
-
var _default = (0, _WithTheme.default)(_theme.retrieveStyle)(UTIconButton);
|
|
103
|
-
exports.default = _default;
|
|
80
|
+
var _default = exports.default = (0, _WithTheme.default)(_theme.retrieveStyle)(UTIconButton);
|
|
@@ -5,60 +5,58 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.retrieveStyle = void 0;
|
|
7
7
|
var _seamlessImmutable = require("seamless-immutable");
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
'
|
|
15
|
-
backgroundColor: (0, _seamlessImmutable.getIn)(theme, ['UTIconButton', 'base', 'hover', 'backgroundColor'])
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
secondary: {
|
|
19
|
-
backgroundColor: (0, _seamlessImmutable.getIn)(theme, ['UTIconButton', 'secondary', 'backgroundColor']),
|
|
20
|
-
color: (0, _seamlessImmutable.getIn)(theme, ['UTIconButton', 'secondary', 'color']),
|
|
21
|
-
'&:hover': {
|
|
22
|
-
backgroundColor: (0, _seamlessImmutable.getIn)(theme, ['UTIconButton', 'secondary', 'hover', 'backgroundColor'])
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
alternative: {
|
|
26
|
-
backgroundColor: (0, _seamlessImmutable.getIn)(theme, ['UTIconButton', 'alternative', 'backgroundColor']),
|
|
27
|
-
color: (0, _seamlessImmutable.getIn)(theme, ['UTIconButton', 'alternative', 'color']),
|
|
28
|
-
'&:hover': {
|
|
29
|
-
backgroundColor: (0, _seamlessImmutable.getIn)(theme, ['UTIconButton', 'alternative', 'hover', 'backgroundColor'])
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
gray: {
|
|
33
|
-
backgroundColor: (0, _seamlessImmutable.getIn)(theme, ['UTIconButton', 'gray', 'backgroundColor']),
|
|
34
|
-
color: (0, _seamlessImmutable.getIn)(theme, ['UTIconButton', 'gray', 'color']),
|
|
35
|
-
'&:hover': {
|
|
36
|
-
backgroundColor: (0, _seamlessImmutable.getIn)(theme, ['UTIconButton', 'gray', 'hover', 'backgroundColor'])
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
disabled: {
|
|
40
|
-
backgroundColor: (0, _seamlessImmutable.getIn)(theme, ['UTIconButton', 'disabled', 'backgroundColor']),
|
|
41
|
-
color: (0, _seamlessImmutable.getIn)(theme, ['UTIconButton', 'disabled', 'color'])
|
|
42
|
-
},
|
|
43
|
-
small: {
|
|
44
|
-
fontSize: (0, _seamlessImmutable.getIn)(theme, ['Fonts', 'small'])
|
|
45
|
-
},
|
|
46
|
-
large: {
|
|
47
|
-
fontSize: (0, _seamlessImmutable.getIn)(theme, ['Fonts', 'large'])
|
|
48
|
-
},
|
|
49
|
-
labelFullWidth: {
|
|
50
|
-
width: '100%'
|
|
51
|
-
},
|
|
52
|
-
loading: {
|
|
53
|
-
color: (0, _seamlessImmutable.getIn)(theme, ['UTIconButton', 'loading', 'color'])
|
|
54
|
-
},
|
|
55
|
-
imgIcon: {
|
|
56
|
-
padding: '10px',
|
|
57
|
-
'&:hover': {
|
|
58
|
-
backgroundColor: '#e2e2e2',
|
|
59
|
-
borderRadius: '50%'
|
|
60
|
-
}
|
|
8
|
+
const retrieveStyle = theme => ({
|
|
9
|
+
base: {
|
|
10
|
+
backgroundColor: (0, _seamlessImmutable.getIn)(theme, ['UTIconButton', 'base', 'backgroundColor']),
|
|
11
|
+
borderRadius: (0, _seamlessImmutable.getIn)(theme, ['UTIconButton', 'base', 'borderRadius']),
|
|
12
|
+
color: (0, _seamlessImmutable.getIn)(theme, ['UTIconButton', 'base', 'color']),
|
|
13
|
+
'&:hover': {
|
|
14
|
+
backgroundColor: (0, _seamlessImmutable.getIn)(theme, ['UTIconButton', 'base', 'hover', 'backgroundColor'])
|
|
61
15
|
}
|
|
62
|
-
}
|
|
63
|
-
|
|
16
|
+
},
|
|
17
|
+
secondary: {
|
|
18
|
+
backgroundColor: (0, _seamlessImmutable.getIn)(theme, ['UTIconButton', 'secondary', 'backgroundColor']),
|
|
19
|
+
color: (0, _seamlessImmutable.getIn)(theme, ['UTIconButton', 'secondary', 'color']),
|
|
20
|
+
'&:hover': {
|
|
21
|
+
backgroundColor: (0, _seamlessImmutable.getIn)(theme, ['UTIconButton', 'secondary', 'hover', 'backgroundColor'])
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
alternative: {
|
|
25
|
+
backgroundColor: (0, _seamlessImmutable.getIn)(theme, ['UTIconButton', 'alternative', 'backgroundColor']),
|
|
26
|
+
color: (0, _seamlessImmutable.getIn)(theme, ['UTIconButton', 'alternative', 'color']),
|
|
27
|
+
'&:hover': {
|
|
28
|
+
backgroundColor: (0, _seamlessImmutable.getIn)(theme, ['UTIconButton', 'alternative', 'hover', 'backgroundColor'])
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
gray: {
|
|
32
|
+
backgroundColor: (0, _seamlessImmutable.getIn)(theme, ['UTIconButton', 'gray', 'backgroundColor']),
|
|
33
|
+
color: (0, _seamlessImmutable.getIn)(theme, ['UTIconButton', 'gray', 'color']),
|
|
34
|
+
'&:hover': {
|
|
35
|
+
backgroundColor: (0, _seamlessImmutable.getIn)(theme, ['UTIconButton', 'gray', 'hover', 'backgroundColor'])
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
disabled: {
|
|
39
|
+
backgroundColor: (0, _seamlessImmutable.getIn)(theme, ['UTIconButton', 'disabled', 'backgroundColor']),
|
|
40
|
+
color: (0, _seamlessImmutable.getIn)(theme, ['UTIconButton', 'disabled', 'color'])
|
|
41
|
+
},
|
|
42
|
+
small: {
|
|
43
|
+
fontSize: (0, _seamlessImmutable.getIn)(theme, ['Fonts', 'small'])
|
|
44
|
+
},
|
|
45
|
+
large: {
|
|
46
|
+
fontSize: (0, _seamlessImmutable.getIn)(theme, ['Fonts', 'large'])
|
|
47
|
+
},
|
|
48
|
+
labelFullWidth: {
|
|
49
|
+
width: '100%'
|
|
50
|
+
},
|
|
51
|
+
loading: {
|
|
52
|
+
color: (0, _seamlessImmutable.getIn)(theme, ['UTIconButton', 'loading', 'color'])
|
|
53
|
+
},
|
|
54
|
+
imgIcon: {
|
|
55
|
+
padding: '10px',
|
|
56
|
+
'&:hover': {
|
|
57
|
+
backgroundColor: '#e2e2e2',
|
|
58
|
+
borderRadius: '50%'
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
});
|
|
64
62
|
exports.retrieveStyle = retrieveStyle;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
@@ -13,61 +12,58 @@ var _UTTouchableWithoutFeedback = _interopRequireDefault(require("../../../UTTou
|
|
|
13
12
|
var _types = require("../../types");
|
|
14
13
|
var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
15
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
|
-
function _getRequireWildcardCache(
|
|
17
|
-
function _interopRequireWildcard(
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
option =
|
|
21
|
-
compact
|
|
22
|
-
oneColumn
|
|
23
|
-
isSelected
|
|
24
|
-
onChange
|
|
25
|
-
classes
|
|
26
|
-
disabled
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
configuration =
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
className: "".concat(classes.description, " ").concat(_stylesModule.default.text, " ").concat(isSelected && classes.selectedText)
|
|
69
|
-
}, description)));
|
|
70
|
-
};
|
|
15
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
16
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
17
|
+
const ImageRadioCard = _ref => {
|
|
18
|
+
let {
|
|
19
|
+
option = {},
|
|
20
|
+
compact,
|
|
21
|
+
oneColumn,
|
|
22
|
+
isSelected,
|
|
23
|
+
onChange,
|
|
24
|
+
classes,
|
|
25
|
+
disabled,
|
|
26
|
+
variant = {}
|
|
27
|
+
} = _ref;
|
|
28
|
+
const {
|
|
29
|
+
value,
|
|
30
|
+
name,
|
|
31
|
+
configuration = {}
|
|
32
|
+
} = option;
|
|
33
|
+
const {
|
|
34
|
+
transparent_background: transparent,
|
|
35
|
+
vertical
|
|
36
|
+
} = variant;
|
|
37
|
+
const {
|
|
38
|
+
image_url: imageUrl,
|
|
39
|
+
selected_image_url: selectedImageUrl,
|
|
40
|
+
UnselectedImageComponent,
|
|
41
|
+
SelectedImageComponent,
|
|
42
|
+
tooltip,
|
|
43
|
+
description
|
|
44
|
+
} = configuration;
|
|
45
|
+
const handleOnChange = () => onChange(value);
|
|
46
|
+
const ImageComponent = isSelected && SelectedImageComponent || UnselectedImageComponent;
|
|
47
|
+
const renderImage = (0, _react.useMemo)(() => selected => selected && selectedImageUrl ? /*#__PURE__*/_react.default.createElement("img", {
|
|
48
|
+
alt: "imageRadioSelected",
|
|
49
|
+
src: selectedImageUrl
|
|
50
|
+
}) : /*#__PURE__*/_react.default.createElement("img", {
|
|
51
|
+
alt: "imageRadioUnselected",
|
|
52
|
+
src: imageUrl
|
|
53
|
+
}), [imageUrl, selectedImageUrl]);
|
|
54
|
+
const Content = () => /*#__PURE__*/_react.default.createElement(_UTTouchableWithoutFeedback.default, {
|
|
55
|
+
className: "".concat(_stylesModule.default.container, " ").concat(classes.containerCard, " ").concat(isSelected && "".concat(_stylesModule.default.isSelected, " ").concat(classes.isSelected), " ").concat(oneColumn && _stylesModule.default.oneColumn, " ").concat(compact && _stylesModule.default.compact, " ").concat(disabled && _stylesModule.default.disabled, " ").concat(transparent && _stylesModule.default.transparent, " ").concat(vertical && classes.vertical, " ").concat(tooltip && _stylesModule.default.contentWithTooltip, " "),
|
|
56
|
+
onClick: handleOnChange
|
|
57
|
+
}, (imageUrl || ImageComponent) && /*#__PURE__*/_react.default.createElement("div", {
|
|
58
|
+
className: "".concat(classes.image, " ").concat(_stylesModule.default.image)
|
|
59
|
+
}, imageUrl && renderImage(isSelected), ImageComponent && /*#__PURE__*/_react.default.createElement(ImageComponent, null)), /*#__PURE__*/_react.default.createElement("div", {
|
|
60
|
+
className: "".concat(_stylesModule.default.containerText, " ").concat(classes.containerText)
|
|
61
|
+
}, /*#__PURE__*/_react.default.createElement(_UTLabel.default, {
|
|
62
|
+
className: "".concat(classes.name, " ").concat(_stylesModule.default.text, " ").concat(isSelected && !transparent && classes.selectedText)
|
|
63
|
+
}, name), description && /*#__PURE__*/_react.default.createElement(_UTLabel.default, {
|
|
64
|
+
light: true,
|
|
65
|
+
className: "".concat(classes.description, " ").concat(_stylesModule.default.text, " ").concat(isSelected && classes.selectedText)
|
|
66
|
+
}, description)));
|
|
71
67
|
return tooltip ? /*#__PURE__*/_react.default.createElement(_UTTooltip.default, {
|
|
72
68
|
content: tooltip,
|
|
73
69
|
tippyProps: {
|
|
@@ -90,5 +86,4 @@ ImageRadioCard.propTypes = {
|
|
|
90
86
|
}),
|
|
91
87
|
classes: (0, _propTypes.objectOf)(_propTypes.string)
|
|
92
88
|
};
|
|
93
|
-
var _default = /*#__PURE__*/(0, _react.memo)(ImageRadioCard);
|
|
94
|
-
exports.default = _default;
|
|
89
|
+
var _default = exports.default = /*#__PURE__*/(0, _react.memo)(ImageRadioCard);
|
|
@@ -4,9 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.validPaddings = exports.defaultGridGap = exports.DEFAULT_ONE_COLUMN_BREAKPOINT = void 0;
|
|
7
|
-
|
|
8
|
-
exports.
|
|
9
|
-
|
|
10
|
-
exports.validPaddings = validPaddings;
|
|
11
|
-
var defaultGridGap = 16;
|
|
12
|
-
exports.defaultGridGap = defaultGridGap;
|
|
7
|
+
const DEFAULT_ONE_COLUMN_BREAKPOINT = exports.DEFAULT_ONE_COLUMN_BREAKPOINT = 1000;
|
|
8
|
+
const validPaddings = exports.validPaddings = [16, 24];
|
|
9
|
+
const defaultGridGap = exports.defaultGridGap = 16;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
@@ -20,53 +19,47 @@ var _utils = require("./utils");
|
|
|
20
19
|
var _constants = require("./constants");
|
|
21
20
|
var _types = require("./types");
|
|
22
21
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
|
-
function _getRequireWildcardCache(
|
|
24
|
-
function _interopRequireWildcard(
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
containerRef = _useComponentDimensio.ref,
|
|
51
|
-
containerWidth = _useComponentDimensio.width;
|
|
52
|
-
var alignToLeft = leftAligned || (field === null || field === void 0 ? void 0 : field.configuration.left_aligned);
|
|
53
|
-
var classes = (0, _classesUtils.mergeClasses)(themeClasses, classNames);
|
|
22
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
23
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
24
|
+
const UTImageRadio = _ref => {
|
|
25
|
+
let {
|
|
26
|
+
oneColumnBreakpoint = _constants.DEFAULT_ONE_COLUMN_BREAKPOINT,
|
|
27
|
+
oneColumn,
|
|
28
|
+
leftAligned,
|
|
29
|
+
compact,
|
|
30
|
+
input = {},
|
|
31
|
+
field,
|
|
32
|
+
meta,
|
|
33
|
+
options = [],
|
|
34
|
+
disabled,
|
|
35
|
+
classNames,
|
|
36
|
+
classes: themeClasses
|
|
37
|
+
} = _ref;
|
|
38
|
+
const mutableOptions = [...options];
|
|
39
|
+
const {
|
|
40
|
+
value,
|
|
41
|
+
onChange
|
|
42
|
+
} = input;
|
|
43
|
+
const {
|
|
44
|
+
ref: containerRef,
|
|
45
|
+
width: containerWidth
|
|
46
|
+
} = (0, _energyHooks.useComponentDimensions)();
|
|
47
|
+
const alignToLeft = leftAligned || (field === null || field === void 0 ? void 0 : field.configuration.left_aligned);
|
|
48
|
+
const classes = (0, _classesUtils.mergeClasses)(themeClasses, classNames);
|
|
54
49
|
return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
55
50
|
ref: containerRef,
|
|
56
51
|
className: "".concat(_stylesModule.default.container, " ").concat(classes.container, " ").concat(alignToLeft && _stylesModule.default.leftAligned)
|
|
57
|
-
}, mutableOptions.sort(_utils.sortOptions).map(
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
});
|
|
69
|
-
})), meta && (0, _form.shouldShowErrors)(meta) && /*#__PURE__*/_react.default.createElement(_UTLabel.default, {
|
|
52
|
+
}, mutableOptions.sort(_utils.sortOptions).map(item => /*#__PURE__*/_react.default.createElement(_ImageRadioCard.default, {
|
|
53
|
+
key: item.value,
|
|
54
|
+
option: item,
|
|
55
|
+
variant: field === null || field === void 0 ? void 0 : field.configuration,
|
|
56
|
+
compact: compact,
|
|
57
|
+
disabled: disabled,
|
|
58
|
+
oneColumn: oneColumn || containerWidth < oneColumnBreakpoint,
|
|
59
|
+
isSelected: value === item.value,
|
|
60
|
+
onChange: onChange,
|
|
61
|
+
classes: classes
|
|
62
|
+
}))), meta && (0, _form.shouldShowErrors)(meta) && /*#__PURE__*/_react.default.createElement(_UTLabel.default, {
|
|
70
63
|
className: _stylesModule.default.error,
|
|
71
64
|
error: true
|
|
72
65
|
}, meta.error));
|
|
@@ -84,5 +77,4 @@ UTImageRadio.propTypes = {
|
|
|
84
77
|
classNames: (0, _propTypes.objectOf)(_propTypes.string),
|
|
85
78
|
classes: (0, _propTypes.objectOf)(_propTypes.string)
|
|
86
79
|
};
|
|
87
|
-
var _default = (0, _WithTheme.default)(_theme.retrieveStyle)( /*#__PURE__*/(0, _react.memo)(UTImageRadio));
|
|
88
|
-
exports.default = _default;
|
|
80
|
+
var _default = exports.default = (0, _WithTheme.default)(_theme.retrieveStyle)( /*#__PURE__*/(0, _react.memo)(UTImageRadio));
|
|
@@ -9,12 +9,8 @@ var _colorsModule = _interopRequireDefault(require("../../scss/variables/colors.
|
|
|
9
9
|
var _constants = require("./constants");
|
|
10
10
|
var _utils = require("./utils");
|
|
11
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
15
|
-
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
16
|
-
var retrieveStyle = function retrieveStyle(theme) {
|
|
17
|
-
var tabletMobile = (0, _seamlessImmutable.getIn)(theme, ['Media', 'tabletMobile']);
|
|
12
|
+
const retrieveStyle = theme => {
|
|
13
|
+
const tabletMobile = (0, _seamlessImmutable.getIn)(theme, ['Media', 'tabletMobile']);
|
|
18
14
|
return {
|
|
19
15
|
containerCard: {
|
|
20
16
|
backgroundColor: (0, _seamlessImmutable.getIn)(theme, ['UTImageRadio', 'containerCard', 'backgroundColor'], _colorsModule.default.imageRadioBackground),
|
|
@@ -32,11 +28,12 @@ var retrieveStyle = function retrieveStyle(theme) {
|
|
|
32
28
|
backgroundColor: (0, _seamlessImmutable.getIn)(theme, ['UTImageRadio', 'isSelected', 'backgroundColor'], _colorsModule.default.blue),
|
|
33
29
|
pointerEvents: (0, _seamlessImmutable.getIn)(theme, ['UTImageRadio', 'isSelected', 'pointerEvents'], 'none')
|
|
34
30
|
},
|
|
35
|
-
containerText:
|
|
36
|
-
width: (0, _seamlessImmutable.getIn)(theme, ['UTImageRadio', 'containerText', 'width'], '100% !important')
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
31
|
+
containerText: {
|
|
32
|
+
width: (0, _seamlessImmutable.getIn)(theme, ['UTImageRadio', 'containerText', 'width'], '100% !important'),
|
|
33
|
+
[tabletMobile]: {
|
|
34
|
+
width: '100%'
|
|
35
|
+
}
|
|
36
|
+
},
|
|
40
37
|
image: {
|
|
41
38
|
height: (0, _seamlessImmutable.getIn)(theme, ['UTImageRadio', 'image', 'height']),
|
|
42
39
|
width: (0, _seamlessImmutable.getIn)(theme, ['UTImageRadio', 'image', 'width'], '56px')
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.optionType = void 0;
|
|
7
7
|
var _propTypes = require("prop-types");
|
|
8
|
-
|
|
8
|
+
const optionType = exports.optionType = (0, _propTypes.shape)({
|
|
9
9
|
configuration: (0, _propTypes.shape)({
|
|
10
10
|
image_url: _propTypes.string,
|
|
11
11
|
selected_image_url: _propTypes.string,
|
|
@@ -15,5 +15,4 @@ var optionType = (0, _propTypes.shape)({
|
|
|
15
15
|
}),
|
|
16
16
|
value: _propTypes.string,
|
|
17
17
|
name: _propTypes.string
|
|
18
|
-
});
|
|
19
|
-
exports.optionType = optionType;
|
|
18
|
+
});
|
|
@@ -5,11 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.standarizePadding = exports.sortOptions = void 0;
|
|
7
7
|
var _constants = require("./constants");
|
|
8
|
-
|
|
9
|
-
return a.order - b.order;
|
|
10
|
-
};
|
|
8
|
+
const sortOptions = (a, b) => a.order - b.order;
|
|
11
9
|
exports.sortOptions = sortOptions;
|
|
12
|
-
|
|
13
|
-
return _constants.validPaddings.includes(padding) || _constants.validPaddings[1];
|
|
14
|
-
};
|
|
10
|
+
const standarizePadding = padding => _constants.validPaddings.includes(padding) || _constants.validPaddings[1];
|
|
15
11
|
exports.standarizePadding = standarizePadding;
|