@widergy/energy-ui 2.12.2 → 2.12.3
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 +4 -2
- package/dist/components/UTAlert/AlertHandler.js +75 -101
- package/dist/components/UTAlert/index.js +65 -87
- package/dist/components/UTAlert/theme.js +32 -32
- package/dist/components/UTAttachment/components/Preview/index.js +8 -9
- package/dist/components/UTAttachment/constants.js +7 -13
- package/dist/components/UTAttachment/index.js +159 -250
- package/dist/components/UTAttachment/layout.js +26 -27
- package/dist/components/UTAttachment/theme.js +4 -2
- 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 +54 -94
- package/dist/components/UTAutocomplete/theme.js +6 -4
- package/dist/components/UTAvatar/constants.js +2 -3
- package/dist/components/UTAvatar/index.js +18 -17
- 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 +75 -93
- 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 +30 -37
- 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 +152 -166
- package/dist/components/UTBarChart/theme.js +4 -2
- package/dist/components/UTBarChart/types.js +10 -19
- package/dist/components/UTBarChart/utils.js +107 -111
- package/dist/components/UTBreadcrumbs/constants.js +23 -31
- package/dist/components/UTBreadcrumbs/index.js +76 -101
- package/dist/components/UTBreadcrumbs/theme.js +4 -2
- package/dist/components/UTButton/constants.js +11 -17
- package/dist/components/UTButton/index.js +28 -31
- package/dist/components/UTButton/theme.js +23 -23
- package/dist/components/UTCBUInput/index.js +36 -40
- package/dist/components/UTCBUInput/theme.js +4 -2
- package/dist/components/UTCaptcha/index.js +19 -45
- package/dist/components/UTCard/components/UTCardFooter/index.js +15 -16
- package/dist/components/UTCard/index.js +85 -120
- package/dist/components/UTCard/theme.js +11 -12
- 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 +13 -15
- 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 +204 -273
- package/dist/components/UTCarousel/components/Slider/layout.js +67 -94
- package/dist/components/UTCarousel/index.js +14 -15
- package/dist/components/UTCarousel/theme.js +4 -2
- package/dist/components/UTCheckList/constants.js +1 -2
- package/dist/components/UTCheckList/index.js +72 -93
- package/dist/components/UTCheckList/theme.js +31 -31
- package/dist/components/UTCheckbox/constants.js +3 -6
- package/dist/components/UTCheckbox/index.js +32 -44
- package/dist/components/UTCheckbox/theme.js +35 -35
- package/dist/components/UTConsumptionBar/components/ConsumptionBarIndicator/index.js +9 -9
- package/dist/components/UTConsumptionBar/constants.js +3 -6
- package/dist/components/UTConsumptionBar/index.js +53 -80
- package/dist/components/UTCuit/index.js +109 -133
- package/dist/components/UTCuit/theme.js +51 -53
- 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 +60 -102
- package/dist/components/UTDatePicker/theme.js +5 -3
- package/dist/components/UTDatePicker/types.js +2 -3
- package/dist/components/UTDatePicker/utils.js +2 -6
- package/dist/components/UTDialog/constants.js +2 -4
- package/dist/components/UTDialog/index.js +38 -37
- package/dist/components/UTDialog/theme.js +4 -2
- package/dist/components/UTDialog/types.js +2 -3
- package/dist/components/UTDotMenu/index.js +39 -61
- package/dist/components/UTEmojiPicker/constants.js +6 -11
- package/dist/components/UTEmojiPicker/index.js +45 -65
- package/dist/components/UTEmojiPicker/theme.js +4 -2
- package/dist/components/UTEmojiPicker/utils.js +21 -51
- package/dist/components/UTExternalLink/constants.js +3 -5
- package/dist/components/UTExternalLink/index.js +18 -15
- package/dist/components/UTExternalLink/theme.js +8 -6
- package/dist/components/UTFileInput/constants.js +2 -4
- package/dist/components/UTFileInput/index.js +7 -31
- package/dist/components/UTFileInput/layout.js +68 -97
- package/dist/components/UTIconButton/index.js +49 -72
- package/dist/components/UTIconButton/theme.js +4 -2
- 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 +11 -12
- package/dist/components/UTImageRadio/types.js +2 -3
- package/dist/components/UTImageRadio/utils.js +2 -6
- package/dist/components/UTLabel/constants.js +14 -20
- package/dist/components/UTLabel/index.js +18 -20
- package/dist/components/UTLabel/theme.js +15 -15
- 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 +18 -22
- package/dist/components/UTMenu/index.js +52 -69
- package/dist/components/UTMenu/theme.js +5 -3
- package/dist/components/UTMenu/utils.js +5 -11
- package/dist/components/UTModal/constants.js +9 -13
- package/dist/components/UTModal/index.js +26 -30
- package/dist/components/UTModal/theme.js +4 -2
- package/dist/components/UTPagination/components/PageSizeSelector/index.js +11 -10
- package/dist/components/UTPagination/components/PageSizeSelector/utils.js +7 -13
- package/dist/components/UTPagination/components/Pagination/components/NavigationButton/index.js +12 -12
- package/dist/components/UTPagination/components/Pagination/index.js +28 -39
- package/dist/components/UTPagination/components/Pagination/utils.js +8 -14
- package/dist/components/UTPagination/constants.js +3 -6
- package/dist/components/UTPagination/index.js +16 -17
- 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 +13 -10
- package/dist/components/UTPasswordField/components/PasswordValidations/components/Validation/index.js +22 -19
- package/dist/components/UTPasswordField/components/PasswordValidations/index.js +63 -50
- package/dist/components/UTPasswordField/components/PasswordWarning/index.js +25 -26
- package/dist/components/UTPasswordField/index.js +26 -23
- package/dist/components/UTPasswordField/theme.js +4 -2
- package/dist/components/UTPhoneInput/constants.js +3 -6
- package/dist/components/UTPhoneInput/index.js +180 -205
- package/dist/components/UTPhoneInput/theme.js +77 -77
- 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 +4 -2
- package/dist/components/UTPieChart/utils.js +4 -2
- package/dist/components/UTProgressBar/constants.js +2 -4
- package/dist/components/UTProgressBar/index.js +15 -17
- package/dist/components/UTProgressBar/theme.js +4 -2
- package/dist/components/UTProgressBar/types.js +2 -3
- package/dist/components/UTRadioGroup/index.js +56 -83
- package/dist/components/UTRadioGroup/theme.js +52 -52
- 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 +4 -2
- 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 +63 -85
- package/dist/components/UTSelect/stylesJS.js +2 -3
- package/dist/components/UTSelect/theme.js +6 -4
- package/dist/components/UTSelect/utils.js +3 -13
- package/dist/components/UTSidebar/components/ListOption/index.js +34 -49
- 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 +4 -2
- package/dist/components/UTSidebar/types.js +5 -10
- package/dist/components/UTSkeleton/index.js +10 -36
- package/dist/components/UTStatus/constants.js +5 -9
- package/dist/components/UTStatus/index.js +16 -15
- package/dist/components/UTStatus/theme.js +66 -49
- package/dist/components/UTSwitch/constants.js +3 -6
- package/dist/components/UTSwitch/index.js +42 -57
- package/dist/components/UTSwitch/theme.js +4 -2
- package/dist/components/UTTable/components/ActionIcons/constants.js +1 -2
- package/dist/components/UTTable/components/ActionIcons/index.js +47 -85
- package/dist/components/UTTable/components/Cell/components/ActionButton/index.js +10 -12
- 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 +82 -95
- package/dist/components/UTTable/components/TableRow/styles.module.scss +8 -1
- package/dist/components/UTTable/components/TableRow/utils.js +15 -0
- package/dist/components/UTTable/constants.js +26 -43
- package/dist/components/UTTable/hook.js +11 -26
- package/dist/components/UTTable/index.js +129 -220
- package/dist/components/UTTable/theme.js +17 -17
- 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 +57 -86
- package/dist/components/UTTabs/theme.js +4 -2
- package/dist/components/UTTabs/utils.js +1 -1
- package/dist/components/UTTextArea/constants.js +3 -6
- package/dist/components/UTTextArea/index.js +23 -23
- package/dist/components/UTTextArea/theme.js +4 -2
- package/dist/components/UTTextInput/constants.js +2 -3
- package/dist/components/UTTextInput/index.js +137 -165
- package/dist/components/UTTextInput/theme.js +6 -4
- 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 +4 -2
- package/dist/components/UTTooltip/index.js +23 -30
- package/dist/components/UTTooltip/theme.js +4 -2
- package/dist/components/UTTopbar/components/Notifications/index.js +11 -14
- package/dist/components/UTTopbar/components/UserMenu/index.js +15 -15
- package/dist/components/UTTopbar/index.js +28 -31
- package/dist/components/UTTopbar/theme.js +4 -2
- package/dist/components/UTTopbar/types.js +5 -9
- 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 +17 -21
- package/dist/components/UTWorkflowContainer/constants.js +3 -6
- package/dist/components/UTWorkflowContainer/hooks/use-previous.js +3 -3
- package/dist/components/UTWorkflowContainer/index.js +32 -51
- package/dist/components/UTWorkflowContainer/theme.js +60 -53
- 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 +22 -28
- package/dist/components/WithTouch/index.js +12 -19
- package/dist/constants/UTTable.js +2 -3
- package/dist/index.js +58 -58
- package/dist/theme.js +6 -5
- 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 +5 -13
- package/dist/utils/componentUtils.js +10 -13
- package/dist/utils/helperFunctions.js +4 -4
- package/dist/utils/shadowUtils.js +13 -11
- package/dist/utils/useScreenSize.js +2 -3
- package/package.json +1 -1
|
@@ -20,179 +20,154 @@ var _UTLabel = _interopRequireDefault(require("../UTLabel"));
|
|
|
20
20
|
var _constants = require("./constants");
|
|
21
21
|
var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
22
22
|
var _theme = require("./theme");
|
|
23
|
-
var _excluded = ["adornmentInside", "autofocus", "bigInput", "captionLabel", "classes", "containerClassName", "disabled", "field", "id", "input", "inputClassName", "inputObjectKey", "label", "labelRootClassName", "meta", "onChangeText", "PasswordInvisibleIcon", "PasswordVisibleIcon", "placeholder", "preventEnterSubmit", "preventFocus", "tippyProps", "tooltip", "type", "variant"],
|
|
24
|
-
_excluded2 = ["base", "selectedOptionsIds", "retrieveStyle", "retrieveMuiTheme", "Component", "muiTheme"];
|
|
25
23
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
26
|
-
function _getRequireWildcardCache(
|
|
27
|
-
function _interopRequireWildcard(
|
|
28
|
-
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); }
|
|
24
|
+
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); }
|
|
25
|
+
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; }
|
|
29
26
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
30
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
31
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
32
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
33
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
34
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
35
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
36
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
37
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
38
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
39
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
40
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
41
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
42
27
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
43
|
-
function _toPropertyKey(
|
|
44
|
-
function _toPrimitive(
|
|
45
|
-
|
|
28
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
|
29
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
30
|
+
const preventDefault = event => {
|
|
46
31
|
if (event.key === 'Enter') {
|
|
47
32
|
event.preventDefault();
|
|
48
33
|
}
|
|
49
34
|
};
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
var _this;
|
|
55
|
-
_classCallCheck(this, UTTextInput);
|
|
56
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
57
|
-
args[_key] = arguments[_key];
|
|
58
|
-
}
|
|
59
|
-
_this = _super.call.apply(_super, [this].concat(args));
|
|
60
|
-
_defineProperty(_assertThisInitialized(_this), "state", {
|
|
35
|
+
class UTTextInput extends _react.PureComponent {
|
|
36
|
+
constructor() {
|
|
37
|
+
super(...arguments);
|
|
38
|
+
_defineProperty(this, "state", {
|
|
61
39
|
visible: false
|
|
62
40
|
});
|
|
63
|
-
_defineProperty(
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
};
|
|
68
|
-
});
|
|
41
|
+
_defineProperty(this, "handleClickShowPassword", () => {
|
|
42
|
+
this.setState(prevState => ({
|
|
43
|
+
visible: !prevState.visible
|
|
44
|
+
}));
|
|
69
45
|
});
|
|
70
|
-
return _this;
|
|
71
46
|
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
47
|
+
render() {
|
|
48
|
+
const {
|
|
49
|
+
adornmentInside,
|
|
50
|
+
autofocus,
|
|
51
|
+
bigInput,
|
|
52
|
+
captionLabel,
|
|
53
|
+
classes,
|
|
54
|
+
containerClassName,
|
|
55
|
+
disabled,
|
|
56
|
+
field,
|
|
57
|
+
id,
|
|
58
|
+
input,
|
|
59
|
+
inputClassName,
|
|
60
|
+
inputObjectKey,
|
|
61
|
+
label,
|
|
62
|
+
labelRootClassName,
|
|
63
|
+
meta,
|
|
64
|
+
onChangeText,
|
|
65
|
+
PasswordInvisibleIcon,
|
|
66
|
+
PasswordVisibleIcon,
|
|
67
|
+
placeholder,
|
|
68
|
+
preventEnterSubmit,
|
|
69
|
+
preventFocus,
|
|
70
|
+
tippyProps,
|
|
71
|
+
tooltip,
|
|
72
|
+
type,
|
|
73
|
+
variant,
|
|
74
|
+
...others
|
|
75
|
+
} = this.props;
|
|
76
|
+
const handleChange = event => {
|
|
77
|
+
if (preventFocus) event.preventDefault();
|
|
78
|
+
input.onChange(onChangeText(event.target.value));
|
|
79
|
+
};
|
|
80
|
+
const handleClick = event => {
|
|
81
|
+
if (preventFocus) {
|
|
82
|
+
event.preventDefault();
|
|
83
|
+
event.target.blur();
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
const {
|
|
87
|
+
icon: Icon,
|
|
88
|
+
outsideIcon,
|
|
89
|
+
adornment,
|
|
90
|
+
helperText
|
|
91
|
+
} = (field === null || field === void 0 ? void 0 : field.configuration) || {};
|
|
117
92
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
93
|
+
// TODO. These props were forwarded to the inner dom element and they were
|
|
94
|
+
// causing errors and warnings. I quit them from the "..." spread to TextField.
|
|
95
|
+
// Deeper analysis should be done when refactoring the component to match
|
|
96
|
+
// design requirements.
|
|
97
|
+
const {
|
|
98
|
+
base,
|
|
99
|
+
selectedOptionsIds,
|
|
100
|
+
retrieveStyle: rs,
|
|
101
|
+
retrieveMuiTheme: rmt,
|
|
102
|
+
Component,
|
|
103
|
+
muiTheme,
|
|
104
|
+
...textFieldPropsToForward
|
|
105
|
+
} = others;
|
|
106
|
+
const endAction = type === _constants.INPUT_TYPES.PASSWORD ? /*#__PURE__*/_react.default.createElement(_UTButton.default, {
|
|
107
|
+
Icon: this.state.visible ? PasswordVisibleIcon : PasswordInvisibleIcon,
|
|
108
|
+
onClick: this.handleClickShowPassword,
|
|
109
|
+
variant: "text"
|
|
110
|
+
}) : adornment;
|
|
111
|
+
const value = inputObjectKey ? input.value[inputObjectKey] : input.value;
|
|
112
|
+
const errorMessage = (0, _form.shouldShowErrors)(meta) && meta.error || captionLabel || '';
|
|
113
|
+
const TextInput = /*#__PURE__*/_react.default.createElement(_TextField.default, _extends({
|
|
114
|
+
id: id || '',
|
|
115
|
+
placeholder: placeholder,
|
|
116
|
+
variant: variant,
|
|
117
|
+
label: Icon ? /*#__PURE__*/_react.default.createElement("div", {
|
|
118
|
+
className: classes.labelContainer
|
|
119
|
+
}, /*#__PURE__*/_react.default.createElement(Icon, {
|
|
120
|
+
className: classes.labelIcon
|
|
121
|
+
}), /*#__PURE__*/_react.default.createElement("div", null, label)) : label,
|
|
122
|
+
onKeyPress: preventEnterSubmit ? preventDefault : undefined,
|
|
123
|
+
error: (0, _form.shouldShowErrors)(meta),
|
|
124
|
+
FormHelperTextProps: {
|
|
125
|
+
component: 'div'
|
|
126
|
+
},
|
|
127
|
+
helperText: errorMessage || helperText ? /*#__PURE__*/_react.default.createElement(_UTLabel.default, {
|
|
128
|
+
className: _stylesModule.default.helperText,
|
|
129
|
+
colorTheme: errorMessage ? 'error' : 'gray',
|
|
130
|
+
variant: "small",
|
|
131
|
+
withMarkdown: true
|
|
132
|
+
}, errorMessage || helperText) : undefined,
|
|
133
|
+
disabled: disabled,
|
|
134
|
+
onChange: handleChange,
|
|
135
|
+
onClick: handleClick,
|
|
136
|
+
value: value,
|
|
137
|
+
fullWidth: true,
|
|
138
|
+
autoFocus: autofocus,
|
|
139
|
+
margin: "none",
|
|
140
|
+
autoComplete: "off",
|
|
141
|
+
InputProps: {
|
|
142
|
+
endAdornment: endAction && /*#__PURE__*/_react.default.createElement(_InputAdornment.default, {
|
|
143
|
+
position: "end",
|
|
144
|
+
className: "".concat(adornmentInside && _stylesModule.default.adornmentInside)
|
|
145
|
+
}, endAction),
|
|
146
|
+
type: type === _constants.INPUT_TYPES.PASSWORD ? !this.state.visible ? _constants.INPUT_TYPES.PASSWORD : _constants.INPUT_TYPES.TEXT : type || _constants.INPUT_TYPES.TEXT,
|
|
147
|
+
classes: {
|
|
148
|
+
input: "\n ".concat(bigInput && classes.bigInput, "\n ").concat(type === _constants.INPUT_TYPES.NUMBER && _stylesModule.default.numberType, "\n ").concat(inputClassName, "\n ")
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
InputLabelProps: {
|
|
152
|
+
classes: {
|
|
153
|
+
root: labelRootClassName
|
|
178
154
|
}
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
}(_react.PureComponent);
|
|
155
|
+
}
|
|
156
|
+
}, textFieldPropsToForward));
|
|
157
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
158
|
+
className: "".concat(classes.container, " ").concat(containerClassName, " ").concat(tooltip && _stylesModule.default.containerWithTooltip)
|
|
159
|
+
}, tooltip ? /*#__PURE__*/_react.default.createElement(_react.Fragment, null, TextInput, /*#__PURE__*/_react.default.createElement(_UTTooltip.default, {
|
|
160
|
+
tippyProps: tippyProps,
|
|
161
|
+
content: tooltip
|
|
162
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
163
|
+
className: _stylesModule.default.tooltipIconContainer
|
|
164
|
+
}, /*#__PURE__*/_react.default.createElement(_HelpOutline.default, {
|
|
165
|
+
className: "".concat(classes.tooltipIcon, " ").concat(_stylesModule.default.tooltipIcon)
|
|
166
|
+
})))) : /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/(0, _react.isValidElement)(outsideIcon) && /*#__PURE__*/_react.default.createElement("div", {
|
|
167
|
+
className: _stylesModule.default.iconContainer
|
|
168
|
+
}, outsideIcon), TextInput));
|
|
169
|
+
}
|
|
170
|
+
}
|
|
196
171
|
UTTextInput.propTypes = {
|
|
197
172
|
adornmentInside: _propTypes.bool,
|
|
198
173
|
autofocus: _propTypes.bool,
|
|
@@ -225,12 +200,9 @@ UTTextInput.defaultProps = {
|
|
|
225
200
|
autofocus: false,
|
|
226
201
|
classes: {},
|
|
227
202
|
meta: {},
|
|
228
|
-
onChangeText:
|
|
229
|
-
return val;
|
|
230
|
-
},
|
|
203
|
+
onChangeText: val => val,
|
|
231
204
|
PasswordInvisibleIcon: _VisibilityOff.default,
|
|
232
205
|
PasswordVisibleIcon: _Visibility.default,
|
|
233
206
|
preventEnterSubmit: false
|
|
234
207
|
};
|
|
235
|
-
var _default = (0, _WithTheme.default)(_theme.retrieveStyle, _theme.retrieveMuiTheme)(UTTextInput);
|
|
236
|
-
exports.default = _default;
|
|
208
|
+
var _default = exports.default = (0, _WithTheme.default)(_theme.retrieveStyle, _theme.retrieveMuiTheme)(UTTextInput);
|
|
@@ -9,8 +9,10 @@ var _styles = require("@material-ui/core/styles");
|
|
|
9
9
|
var _lodash = _interopRequireDefault(require("lodash"));
|
|
10
10
|
var _colorsModule = _interopRequireDefault(require("../../scss/variables/colors.module.scss"));
|
|
11
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
const retrieveStyle = _ref => {
|
|
13
|
+
let {
|
|
14
|
+
theme
|
|
15
|
+
} = _ref;
|
|
14
16
|
return {
|
|
15
17
|
container: {
|
|
16
18
|
display: (0, _seamlessImmutable.getIn)(theme, ['UTTextInput', 'container', 'display'], 'flex'),
|
|
@@ -39,8 +41,8 @@ var retrieveStyle = function retrieveStyle(_ref) {
|
|
|
39
41
|
};
|
|
40
42
|
};
|
|
41
43
|
exports.retrieveStyle = retrieveStyle;
|
|
42
|
-
|
|
43
|
-
|
|
44
|
+
const retrieveMuiTheme = (theme, muiTheme) => {
|
|
45
|
+
const mui = {
|
|
44
46
|
typography: {
|
|
45
47
|
fontFamily: (0, _seamlessImmutable.getIn)(theme, ['Fonts', 'fontFamily'])
|
|
46
48
|
},
|
|
@@ -1,39 +1,36 @@
|
|
|
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
|
});
|
|
7
6
|
exports.default = void 0;
|
|
8
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
8
|
var _propTypes = require("prop-types");
|
|
10
|
-
function _getRequireWildcardCache(
|
|
11
|
-
function _interopRequireWildcard(
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
9
|
+
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); }
|
|
10
|
+
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; }
|
|
11
|
+
const DEFAULT_IFRAME_SRC = 'https://mindmup.github.io/3rdpartycookiecheck/start.html';
|
|
12
|
+
const DEFAULT_IFRAME_TITLE = 'UTThirdPartyCookieChecker';
|
|
13
|
+
const UTThirdPartyCookieChecker = _ref => {
|
|
14
|
+
let {
|
|
15
|
+
disabledCallback,
|
|
16
|
+
enabledCallback,
|
|
17
|
+
iframeSrc,
|
|
18
|
+
iframeTitle
|
|
19
|
+
} = _ref;
|
|
20
|
+
const iframeRef = (0, _react.useRef)(null);
|
|
21
|
+
const handleCallback = event => {
|
|
21
22
|
if (event.data === 'MM:3PCsupported' && enabledCallback) {
|
|
22
23
|
return enabledCallback();
|
|
23
24
|
}
|
|
24
25
|
if (event.data === 'MM:3PCunsupported' && disabledCallback) {
|
|
25
26
|
return disabledCallback();
|
|
26
27
|
}
|
|
27
|
-
return
|
|
28
|
-
return undefined;
|
|
29
|
-
};
|
|
28
|
+
return () => undefined;
|
|
30
29
|
};
|
|
31
|
-
(0, _react.useEffect)(
|
|
30
|
+
(0, _react.useEffect)(() => {
|
|
32
31
|
window.addEventListener('message', handleCallback, false);
|
|
33
32
|
iframeRef.current.src = iframeSrc || DEFAULT_IFRAME_SRC;
|
|
34
|
-
return
|
|
35
|
-
return window.removeEventListener('message', handleCallback, false);
|
|
36
|
-
};
|
|
33
|
+
return () => window.removeEventListener('message', handleCallback, false);
|
|
37
34
|
}, []);
|
|
38
35
|
return /*#__PURE__*/_react.default.createElement("iframe", {
|
|
39
36
|
ref: iframeRef,
|
|
@@ -49,5 +46,4 @@ UTThirdPartyCookieChecker.propTypes = {
|
|
|
49
46
|
iframeSrc: _propTypes.string,
|
|
50
47
|
iframeTitle: _propTypes.string
|
|
51
48
|
};
|
|
52
|
-
var _default = /*#__PURE__*/(0, _react.memo)(UTThirdPartyCookieChecker);
|
|
53
|
-
exports.default = _default;
|
|
49
|
+
var _default = exports.default = /*#__PURE__*/(0, _react.memo)(UTThirdPartyCookieChecker);
|
|
@@ -9,21 +9,21 @@ var _propTypes = require("prop-types");
|
|
|
9
9
|
var _UTTouchableWithoutFeedback = _interopRequireDefault(require("../../../UTTouchableWithoutFeedback"));
|
|
10
10
|
var _UTLabel = _interopRequireDefault(require("../../../UTLabel"));
|
|
11
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
12
|
+
const ToggleOption = _ref => {
|
|
13
|
+
let {
|
|
14
|
+
value,
|
|
15
|
+
onChange,
|
|
16
|
+
label,
|
|
17
|
+
isSelected,
|
|
18
|
+
Icon,
|
|
19
|
+
SelectedIcon,
|
|
20
|
+
keyName,
|
|
21
|
+
className,
|
|
22
|
+
iconClassName,
|
|
23
|
+
classes
|
|
24
|
+
} = _ref;
|
|
25
|
+
const onHandleClick = () => onChange(value);
|
|
26
|
+
const IconComponent = Icon && (SelectedIcon && isSelected ? /*#__PURE__*/_react.default.createElement(SelectedIcon, {
|
|
27
27
|
className: "".concat(classes.icon, " ").concat(iconClassName)
|
|
28
28
|
}) : /*#__PURE__*/_react.default.createElement(Icon, {
|
|
29
29
|
className: "".concat(classes.icon, " ").concat(isSelected ? classes.selectedIcon : classes.unselectedIcon, " ").concat(iconClassName)
|
|
@@ -49,5 +49,4 @@ ToggleOption.propTypes = {
|
|
|
49
49
|
iconClassName: _propTypes.string,
|
|
50
50
|
classes: (0, _propTypes.objectOf)(_propTypes.string)
|
|
51
51
|
};
|
|
52
|
-
var _default = ToggleOption;
|
|
53
|
-
exports.default = _default;
|
|
52
|
+
var _default = exports.default = ToggleOption;
|
|
@@ -10,32 +10,32 @@ var _WithTheme = _interopRequireDefault(require("../WithTheme"));
|
|
|
10
10
|
var _ToggleOption = _interopRequireDefault(require("./components/ToggleOption"));
|
|
11
11
|
var _theme = require("./theme");
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
13
|
+
const UTToggle = _ref => {
|
|
14
|
+
let {
|
|
15
|
+
options,
|
|
16
|
+
selectedOption,
|
|
17
|
+
onChangeOption,
|
|
18
|
+
className,
|
|
19
|
+
optionClassName,
|
|
20
|
+
orientation,
|
|
21
|
+
classes
|
|
22
|
+
} = _ref;
|
|
23
|
+
const containerStyle = "".concat(classes.container, " ").concat(orientation === 'horizontal' ? classes.horizontalContainer : classes.verticalContainer, " ").concat(className, " ");
|
|
22
24
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
23
25
|
className: containerStyle
|
|
24
|
-
}, options.map(
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
});
|
|
38
|
-
}));
|
|
26
|
+
}, options.map(option => /*#__PURE__*/_react.default.createElement(_ToggleOption.default, {
|
|
27
|
+
key: option.key,
|
|
28
|
+
value: option.value,
|
|
29
|
+
label: option.label,
|
|
30
|
+
Icon: option.Icon,
|
|
31
|
+
SelectedIcon: option.SelectedIcon,
|
|
32
|
+
isSelected: option.value === selectedOption,
|
|
33
|
+
onChange: onChangeOption,
|
|
34
|
+
keyName: "toggle-option-".concat(option.value),
|
|
35
|
+
className: optionClassName,
|
|
36
|
+
iconClassName: option.iconClassName,
|
|
37
|
+
classes: classes
|
|
38
|
+
})));
|
|
39
39
|
};
|
|
40
40
|
UTToggle.propTypes = {
|
|
41
41
|
options: (0, _propTypes.arrayOf)((0, _propTypes.shape)({
|
|
@@ -53,5 +53,4 @@ UTToggle.propTypes = {
|
|
|
53
53
|
optionClassName: _propTypes.string,
|
|
54
54
|
orientation: _propTypes.string
|
|
55
55
|
};
|
|
56
|
-
var _default = (0, _WithTheme.default)(_theme.retrieveStyle)(UTToggle);
|
|
57
|
-
exports.default = _default;
|
|
56
|
+
var _default = exports.default = (0, _WithTheme.default)(_theme.retrieveStyle)(UTToggle);
|
|
@@ -7,8 +7,10 @@ exports.retrieveStyle = void 0;
|
|
|
7
7
|
var _seamlessImmutable = require("seamless-immutable");
|
|
8
8
|
var _colorsModule = _interopRequireDefault(require("../../scss/variables/colors.module.scss"));
|
|
9
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
const retrieveStyle = _ref => {
|
|
11
|
+
let {
|
|
12
|
+
theme
|
|
13
|
+
} = _ref;
|
|
12
14
|
return {
|
|
13
15
|
container: {
|
|
14
16
|
alignItems: (0, _seamlessImmutable.getIn)(theme, ['UTToggle', 'container', 'alignItems'], 'center'),
|