@pedidopago/ui 1.7.22 → 1.7.23

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.
@@ -1 +1 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/components/EmojiPicker/EmotePickerData/styles.ts"],"names":[],"mappings":";AAEA,eAAO,MAAM,wBAAwB;;;yGASpC,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;yGA8C9B,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;yGAmD5B,CAAC;AAEF,eAAO,MAAM,cAAc;;;yGAY1B,CAAC"}
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/components/EmojiPicker/EmotePickerData/styles.ts"],"names":[],"mappings":";AAEA,eAAO,MAAM,wBAAwB;;;yGAUpC,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;yGA8C9B,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;yGAmD5B,CAAC;AAEF,eAAO,MAAM,cAAc;;;yGAY1B,CAAC"}
@@ -8,47 +8,50 @@ var _styled = _interopRequireDefault(require("@emotion/styled"));
8
8
  var _templateObject, _templateObject2, _templateObject3, _templateObject4;
9
9
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10
10
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
11
- var EmotePickerDataContainer = _styled.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n max-height: 280px;\n max-width: 510px;\n border-radius: 0.5rem;\n overflow: hidden;\n display: flex;\n flex-direction: column;\n border: 1px solid ", ";\n box-shadow: ", ";\n"])), function (_ref) {
11
+ var EmotePickerDataContainer = _styled.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n max-height: 280px;\n max-width: 510px;\n border-radius: 0.5rem;\n overflow: hidden;\n display: flex;\n flex-direction: column;\n border: 1px solid ", ";\n box-shadow: ", ";\n background: ", "70;\n"])), function (_ref) {
12
12
  var theme = _ref.theme;
13
13
  return theme.colors.neutral.neutral1;
14
14
  }, function (_ref2) {
15
15
  var theme = _ref2.theme;
16
16
  return theme.shadow.level2;
17
- });
18
- exports.EmotePickerDataContainer = EmotePickerDataContainer;
19
- var EmoteContentHeader = _styled.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 2rem;\n\n padding: 1em;\n\n position: relative;\n overflow-x: auto;\n\n background: ", ";\n\n & div {\n display: flex;\n align-items: center;\n }\n\n &::-webkit-scrollbar-thumb {\n background: ", ";\n }\n\n &::-webkit-scrollbar {\n height: 0.25rem;\n }\n\n & button {\n height: 1.5em;\n padding: 0;\n z-index: 1;\n }\n\n .background_selected_category {\n width: 36px;\n height: 3px;\n left: 11px;\n bottom: 6px;\n transition: all ease 0.2s;\n border-radius: 0.5rem;\n background: ", ";\n position: absolute;\n }\n\n @media screen and (max-width: ", ") {\n border-radius: 0;\n }\n"])), function (_ref3) {
17
+ }, function (_ref3) {
20
18
  var theme = _ref3.theme;
21
19
  return theme.colors.neutral.white;
22
- }, function (_ref4) {
20
+ });
21
+ exports.EmotePickerDataContainer = EmotePickerDataContainer;
22
+ var EmoteContentHeader = _styled.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 2rem;\n\n padding: 1em;\n\n position: relative;\n overflow-x: auto;\n\n background: ", ";\n\n & div {\n display: flex;\n align-items: center;\n }\n\n &::-webkit-scrollbar-thumb {\n background: ", ";\n }\n\n &::-webkit-scrollbar {\n height: 0.25rem;\n }\n\n & button {\n height: 1.5em;\n padding: 0;\n z-index: 1;\n }\n\n .background_selected_category {\n width: 36px;\n height: 3px;\n left: 11px;\n bottom: 6px;\n transition: all ease 0.2s;\n border-radius: 0.5rem;\n background: ", ";\n position: absolute;\n }\n\n @media screen and (max-width: ", ") {\n border-radius: 0;\n }\n"])), function (_ref4) {
23
23
  var theme = _ref4.theme;
24
- return theme.colors.tertiary.default;
24
+ return theme.colors.neutral.white;
25
25
  }, function (_ref5) {
26
26
  var theme = _ref5.theme;
27
- return theme.colors.primary.default;
27
+ return theme.colors.tertiary.default;
28
28
  }, function (_ref6) {
29
29
  var theme = _ref6.theme;
30
+ return theme.colors.primary.default;
31
+ }, function (_ref7) {
32
+ var theme = _ref7.theme;
30
33
  return theme.breakpoints.lg;
31
34
  });
32
35
  exports.EmoteContentHeader = EmoteContentHeader;
33
- var EmoteContentBody = _styled.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n padding: 0em 1em;\n background: ", "30;\n flex-wrap: wrap;\n gap: 0.25em;\n\n max-height: 12.75em;\n overflow-y: auto;\n\n .virtual_column {\n position: absolute;\n top: 0;\n left: 0;\n width: 42px;\n height: 42px;\n }\n\n #intersection_emoji {\n position: absolute;\n bottom: 0px;\n height: 1px;\n width: 90%;\n }\n\n ::-webkit-scrollbar {\n width: 0.25em;\n }\n\n ::-webkit-scrollbar-thumb {\n background: ", ";\n }\n\n ::-webkit-scrollbar-thumb:hover {\n background: ", ";\n }\n\n .container_emojis {\n ::-webkit-scrollbar {\n width: 4px;\n height: 4px;\n }\n\n ::-webkit-scrollbar-thumb {\n background: ", ";\n }\n\n ::-webkit-scrollbar-thumb:hover {\n background: ", ";\n }\n }\n"])), function (_ref7) {
34
- var theme = _ref7.theme;
35
- return theme.colors.neutral.neutral1;
36
- }, function (_ref8) {
36
+ var EmoteContentBody = _styled.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n padding: 0em 1em;\n background: ", "30;\n flex-wrap: wrap;\n gap: 0.25em;\n\n max-height: 12.75em;\n overflow-y: auto;\n\n .virtual_column {\n position: absolute;\n top: 0;\n left: 0;\n width: 42px;\n height: 42px;\n }\n\n #intersection_emoji {\n position: absolute;\n bottom: 0px;\n height: 1px;\n width: 90%;\n }\n\n ::-webkit-scrollbar {\n width: 0.25em;\n }\n\n ::-webkit-scrollbar-thumb {\n background: ", ";\n }\n\n ::-webkit-scrollbar-thumb:hover {\n background: ", ";\n }\n\n .container_emojis {\n ::-webkit-scrollbar {\n width: 4px;\n height: 4px;\n }\n\n ::-webkit-scrollbar-thumb {\n background: ", ";\n }\n\n ::-webkit-scrollbar-thumb:hover {\n background: ", ";\n }\n }\n"])), function (_ref8) {
37
37
  var theme = _ref8.theme;
38
- return theme.colors.tertiary.default;
38
+ return theme.colors.neutral.neutral1;
39
39
  }, function (_ref9) {
40
40
  var theme = _ref9.theme;
41
- return theme.colors.tertiary.hover;
41
+ return theme.colors.tertiary.default;
42
42
  }, function (_ref10) {
43
43
  var theme = _ref10.theme;
44
- return theme.colors.tertiary.default;
44
+ return theme.colors.tertiary.hover;
45
45
  }, function (_ref11) {
46
46
  var theme = _ref11.theme;
47
+ return theme.colors.tertiary.default;
48
+ }, function (_ref12) {
49
+ var theme = _ref12.theme;
47
50
  return theme.colors.tertiary.hover;
48
51
  });
49
52
  exports.EmoteContentBody = EmoteContentBody;
50
- var EmoteContainer = _styled.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: center;\n\n border-radius: 8px;\n padding: 0.25rem;\n\n :hover {\n cursor: pointer;\n background: ", ";\n }\n"])), function (_ref12) {
51
- var theme = _ref12.theme;
53
+ var EmoteContainer = _styled.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: center;\n\n border-radius: 8px;\n padding: 0.25rem;\n\n :hover {\n cursor: pointer;\n background: ", ";\n }\n"])), function (_ref13) {
54
+ var theme = _ref13.theme;
52
55
  return theme.colors.neutral.neutral1;
53
56
  });
54
57
  exports.EmoteContainer = EmoteContainer;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/NewSelect/Examples/index.tsx"],"names":[],"mappings":";AAUA,wBAAgB,qCAAqC,gBAuCpD;AAED,wBAAgB,oCAAoC,gBA6BnD;AACD,wBAAgB,6BAA6B,gBAiC5C"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/NewSelect/Examples/index.tsx"],"names":[],"mappings":";AAUA,wBAAgB,qCAAqC,gBAmDpD;AAED,wBAAgB,oCAAoC,gBA4BnD;AACD,wBAAgB,6BAA6B,gBAiC5C"}
@@ -12,6 +12,7 @@ var _ = require("..");
12
12
  var _SelectInputSearch = require("../components/SelectInputSearch");
13
13
  var _SelectItem = require("../components/SelectItem");
14
14
  var _Chip = require("../components/Chip");
15
+ var _Skeleton = _interopRequireDefault(require("../../Skeleton"));
15
16
  var _constants = require("./constants");
16
17
  var _jsxRuntime = require("react/jsx-runtime");
17
18
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -20,7 +21,7 @@ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructur
20
21
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
21
22
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
22
23
  function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
23
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } /* eslint-disable no-console */
24
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
24
25
  function MultipleSelectExampleWithDefaultValue() {
25
26
  var _useState = (0, _react.useState)(['option1', 'option2']),
26
27
  _useState2 = _slicedToArray(_useState, 2),
@@ -30,22 +31,37 @@ function MultipleSelectExampleWithDefaultValue() {
30
31
  _useState4 = _slicedToArray(_useState3, 2),
31
32
  selectedOption = _useState4[0],
32
33
  setSelectedOption = _useState4[1];
34
+ var _useState5 = (0, _react.useState)(true),
35
+ _useState6 = _slicedToArray(_useState5, 2),
36
+ isLoading = _useState6[0],
37
+ setIsLoading = _useState6[1];
38
+ (0, _react.useEffect)(function () {
39
+ setTimeout(function () {
40
+ setIsLoading(false);
41
+ }, 2000);
42
+ }, []);
33
43
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Flex.default, {
34
44
  direction: "column",
35
45
  spacing: "1rem",
36
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_.NewSelect, {
46
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_.NewSelect, {
37
47
  label: "Multiplo",
38
48
  multiple: true,
39
49
  value: selectedMultipleOptions,
40
50
  onChange: function onChange(value) {
41
51
  setSelectedMultipleOption(value);
42
52
  },
43
- children: _constants.optionsSelectExample.map(function (option, index) {
53
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_SelectItem.SelectItem, {
54
+ value: "default-option",
55
+ children: "Op\xE7\xE3o padr\xE3o"
56
+ }), isLoading ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Skeleton.default, {
57
+ height: '100px',
58
+ isLoaded: false
59
+ }) : _constants.optionsSelectExample.map(function (option, index) {
44
60
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_SelectItem.SelectItem, {
45
61
  value: option.value,
46
62
  children: option.label
47
63
  }, index);
48
- })
64
+ })]
49
65
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_.NewSelect, {
50
66
  label: "Single",
51
67
  value: selectedOption,
@@ -66,24 +82,23 @@ function MultipleSelectExampleWithDefaultValue() {
66
82
  });
67
83
  }
68
84
  function MultipleSelectExampleWithInputSearch() {
69
- var _useState5 = (0, _react.useState)(''),
70
- _useState6 = _slicedToArray(_useState5, 2),
71
- searchInput = _useState6[0],
72
- setSearchInput = _useState6[1];
85
+ var _useState7 = (0, _react.useState)(''),
86
+ _useState8 = _slicedToArray(_useState7, 2),
87
+ searchInput = _useState8[0],
88
+ setSearchInput = _useState8[1];
73
89
  var filteredOptions = _constants.optionsSelectExample.filter(function (option) {
74
90
  return option.label.includes(searchInput);
75
91
  });
76
- var _useState7 = (0, _react.useState)(''),
77
- _useState8 = _slicedToArray(_useState7, 2),
78
- selectedOption = _useState8[0],
79
- setSelectedOption = _useState8[1];
92
+ var _useState9 = (0, _react.useState)(''),
93
+ _useState10 = _slicedToArray(_useState9, 2),
94
+ selectedOption = _useState10[0],
95
+ setSelectedOption = _useState10[1];
80
96
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
81
97
  children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_.NewSelect, {
82
98
  label: "Com input search",
83
99
  value: selectedOption,
84
100
  onChange: function onChange(value) {
85
101
  setSelectedOption(value);
86
- console.log(value);
87
102
  },
88
103
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_SelectInputSearch.SelectInputSearch, {
89
104
  onChange: function onChange(event) {
@@ -101,17 +116,17 @@ function MultipleSelectExampleWithInputSearch() {
101
116
  });
102
117
  }
103
118
  function MultipleSelectExampleWithChip() {
104
- var _useState9 = (0, _react.useState)(''),
105
- _useState10 = _slicedToArray(_useState9, 2),
106
- searchInput = _useState10[0],
107
- setSearchInput = _useState10[1];
119
+ var _useState11 = (0, _react.useState)(''),
120
+ _useState12 = _slicedToArray(_useState11, 2),
121
+ searchInput = _useState12[0],
122
+ setSearchInput = _useState12[1];
108
123
  var filteredOptions = _constants.optionsSelectExample.filter(function (option) {
109
124
  return option.label.toLowerCase().includes(searchInput.toLowerCase());
110
125
  });
111
- var _useState11 = (0, _react.useState)([]),
112
- _useState12 = _slicedToArray(_useState11, 2),
113
- selectedOption = _useState12[0],
114
- setSelectedOption = _useState12[1];
126
+ var _useState13 = (0, _react.useState)([]),
127
+ _useState14 = _slicedToArray(_useState13, 2),
128
+ selectedOption = _useState14[0],
129
+ setSelectedOption = _useState14[1];
115
130
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
116
131
  children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_.NewSelect, {
117
132
  label: "Com input search",
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/NewSelect/multiple/index.tsx"],"names":[],"mappings":";AAmBA,OAAO,EAAgB,yBAAyB,EAAe,MAAM,UAAU,CAAC;AAGhF,wBAAgB,iBAAiB,CAAC,EAChC,KAAU,EACV,WAAgB,EAChB,KAAK,EACL,UAAU,EACV,OAAO,EACP,QAAQ,EACR,KAAK,EACL,OAAO,EACP,MAAM,EACN,aAAa,EACb,QAAQ,EACR,GAAG,IAAI,EACR,EAAE,yBAAyB,eAiL3B"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/NewSelect/multiple/index.tsx"],"names":[],"mappings":";AAmBA,OAAO,EAAgB,yBAAyB,EAAe,MAAM,UAAU,CAAC;AAGhF,wBAAgB,iBAAiB,CAAC,EAChC,KAAU,EACV,WAAgB,EAChB,KAAK,EACL,UAAU,EACV,OAAO,EACP,QAAQ,EACR,KAAK,EACL,OAAO,EACP,MAAM,EACN,aAAa,EACb,QAAQ,EACR,GAAG,IAAI,EACR,EAAE,yBAAyB,eAuL3B"}
@@ -63,15 +63,16 @@ function NewMultipleSelect(_ref) {
63
63
  options = _useState6[0],
64
64
  setOptions = _useState6[1];
65
65
  (0, _react.useEffect)(function () {
66
- var _options$, _optionsModalRef$curr;
67
- if (options !== null && options !== void 0 && (_options$ = options[0]) !== null && _options$ !== void 0 && _options$.value) return;
66
+ var _optionsModalRef$curr;
68
67
  var childs = (_optionsModalRef$curr = optionsModalRef.current) === null || _optionsModalRef$curr === void 0 ? void 0 : _optionsModalRef$curr.childNodes;
69
68
  var newOptions = [];
70
69
  _react.Children.forEach(children, function (child, index) {
71
- if (childs !== null && childs !== void 0 && childs[index].classList.contains('select-item')) {
70
+ var _childs$index, _childs$index$classLi;
71
+ if (childs !== null && childs !== void 0 && (_childs$index = childs[index]) !== null && _childs$index !== void 0 && (_childs$index$classLi = _childs$index.classList) !== null && _childs$index$classLi !== void 0 && _childs$index$classLi.contains('select-item')) {
72
+ var _child$props, _childs$index2;
72
73
  newOptions.push({
73
- value: child.props.value,
74
- label: childs[index].innerText
74
+ value: child === null || child === void 0 ? void 0 : (_child$props = child.props) === null || _child$props === void 0 ? void 0 : _child$props.value,
75
+ label: childs === null || childs === void 0 ? void 0 : (_childs$index2 = childs[index]) === null || _childs$index2 === void 0 ? void 0 : _childs$index2.innerText
75
76
  });
76
77
  }
77
78
  });
@@ -147,7 +148,12 @@ function NewMultipleSelect(_ref) {
147
148
  var newOptions = options.filter(function (option) {
148
149
  return value === null || value === void 0 ? void 0 : value.includes(option.value);
149
150
  });
150
- setSelectedOptions(newOptions);
151
+ var newSelectedOptions = selectedOptions.filter(function (selectedOption) {
152
+ return newOptions.every(function (newOption) {
153
+ return newOption.value !== selectedOption.value;
154
+ });
155
+ });
156
+ setSelectedOptions([].concat(_toConsumableArray(newSelectedOptions), _toConsumableArray(newOptions)));
151
157
  }, [value, options]);
152
158
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
153
159
  ref: selectRef,
@@ -208,19 +214,24 @@ function NewMultipleSelect(_ref) {
208
214
  top: positionsSelect.top
209
215
  },
210
216
  children: _react.Children.map(children, function (child) {
217
+ var _child$type, _child$type2;
218
+ var childTypeName = (child === null || child === void 0 ? void 0 : (_child$type = child.type) === null || _child$type === void 0 ? void 0 : _child$type.name) || (child === null || child === void 0 ? void 0 : (_child$type2 = child.type) === null || _child$type2 === void 0 ? void 0 : _child$type2.displayName);
219
+ var isSelectItemElement = childTypeName === 'SelectItem';
220
+ if (! /*#__PURE__*/(0, _react.isValidElement)(child) || !isSelectItemElement) return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
221
+ children: child
222
+ });
223
+ var childElement = child;
211
224
  var isSelectedOption = selectedOptions.find(function (option) {
212
- var _child$props;
213
- return option.value === ((_child$props = child.props) === null || _child$props === void 0 ? void 0 : _child$props.value);
225
+ var _childElement$props;
226
+ return option.value === ((_childElement$props = childElement.props) === null || _childElement$props === void 0 ? void 0 : _childElement$props.value);
214
227
  });
215
- var childTypeName = child.type.name || child.type.displayName;
216
- var isSelectItemElement = /*#__PURE__*/(0, _react.isValidElement)(child) && childTypeName === 'SelectItem';
217
- var className = (0, _classnames.default)(isSelectItemElement ? 'select-item' : '', {
228
+ var className = (0, _classnames.default)('select-item', {
218
229
  selected: isSelectedOption
219
230
  });
220
- return /*#__PURE__*/(0, _react.cloneElement)(child, {
231
+ return /*#__PURE__*/(0, _react.cloneElement)(childElement, {
221
232
  onClick: function onClick(event) {
222
233
  if (event.currentTarget.classList.contains('select-item')) {
223
- changeMultipleOption(child.props.value);
234
+ changeMultipleOption(childElement.props.value);
224
235
  }
225
236
  },
226
237
  className: className
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/NewSelect/single/index.tsx"],"names":[],"mappings":";AAWA,OAAO,EAAgB,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAEjE,wBAAgB,eAAe,CAAC,CAAC,EAAE,EACjC,KAAU,EACV,WAAgB,EAChB,KAAK,EACL,UAAU,EACV,OAAO,EACP,QAAQ,EACR,KAAK,EACL,OAAO,EACP,MAAM,EACN,QAAQ,EACR,aAAa,EACb,GAAG,IAAI,EACR,EAAE,uBAAuB,CAAC,CAAC,CAAC,eAgI5B"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/NewSelect/single/index.tsx"],"names":[],"mappings":";AAmBA,OAAO,EAAgB,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAEjE,wBAAgB,eAAe,CAAC,CAAC,EAAE,EACjC,KAAU,EACV,WAAgB,EAChB,KAAK,EACL,UAAU,EACV,OAAO,EACP,QAAQ,EACR,KAAK,EACL,OAAO,EACP,MAAM,EACN,QAAQ,EACR,aAAa,EACb,GAAG,IAAI,EACR,EAAE,uBAAuB,CAAC,CAAC,CAAC,eAwI5B"}
@@ -65,10 +65,12 @@ function NewSingleSelect(_ref) {
65
65
  var childs = (_optionsModalRef$curr = optionsModalRef.current) === null || _optionsModalRef$curr === void 0 ? void 0 : _optionsModalRef$curr.childNodes;
66
66
  var newOptions = [];
67
67
  _react.Children.forEach(children, function (child, index) {
68
- if (childs !== null && childs !== void 0 && childs[index].classList.contains('select-item')) {
68
+ var _childs$index, _childs$index$classLi;
69
+ if (childs !== null && childs !== void 0 && (_childs$index = childs[index]) !== null && _childs$index !== void 0 && (_childs$index$classLi = _childs$index.classList) !== null && _childs$index$classLi !== void 0 && _childs$index$classLi.contains('select-item')) {
70
+ var _child$props, _childs$index2;
69
71
  newOptions.push({
70
- value: child.props.value,
71
- label: childs[index].innerText
72
+ value: child === null || child === void 0 ? void 0 : (_child$props = child.props) === null || _child$props === void 0 ? void 0 : _child$props.value,
73
+ label: childs === null || childs === void 0 ? void 0 : (_childs$index2 = childs[index]) === null || _childs$index2 === void 0 ? void 0 : _childs$index2.innerText
72
74
  });
73
75
  }
74
76
  });
@@ -154,12 +156,19 @@ function NewSingleSelect(_ref) {
154
156
  top: positionsSelect.top
155
157
  },
156
158
  children: _react.Children.map(children, function (child) {
157
- return /*#__PURE__*/(0, _react.cloneElement)(child, {
159
+ var _child$type, _child$type2;
160
+ var childTypeName = (child === null || child === void 0 ? void 0 : (_child$type = child.type) === null || _child$type === void 0 ? void 0 : _child$type.name) || (child === null || child === void 0 ? void 0 : (_child$type2 = child.type) === null || _child$type2 === void 0 ? void 0 : _child$type2.displayName);
161
+ var isSelectItemElement = childTypeName === 'SelectItem';
162
+ if (! /*#__PURE__*/(0, _react.isValidElement)(child) || !isSelectItemElement) return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
163
+ children: child
164
+ });
165
+ var childElement = child;
166
+ return /*#__PURE__*/(0, _react.cloneElement)(childElement, {
158
167
  onClick: function onClick(event) {
159
168
  if (event.currentTarget.classList.contains('select-item')) {
160
169
  setIsOpenOptions(false);
161
- setSelectedOption(child.props.value);
162
- onChange === null || onChange === void 0 ? void 0 : onChange(child.props.value);
170
+ setSelectedOption(childElement.props.value);
171
+ onChange === null || onChange === void 0 ? void 0 : onChange(childElement.props.value);
163
172
  }
164
173
  }
165
174
  });
@@ -1 +1 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/components/Spinner/styles.ts"],"names":[],"mappings":";AAKA,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yGAoCzB,CAAC"}
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/components/Spinner/styles.ts"],"names":[],"mappings":";AAMA,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yGAqCzB,CAAC"}
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.StyledSpinner = void 0;
7
7
  var _styled = _interopRequireDefault(require("@emotion/styled"));
8
8
  var _getColorValue = require("../../utils/getColorValue");
9
+ var _colorCheck = require("../../utils/colorCheck");
9
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10
11
  var StyledSpinner = _styled.default.div(function (_ref) {
11
12
  var size = _ref.size,
@@ -14,10 +15,9 @@ var StyledSpinner = _styled.default.div(function (_ref) {
14
15
  emptyColor = _ref.emptyColor,
15
16
  thickness = _ref.thickness,
16
17
  speed = _ref.speed;
17
- var spinnerColor = (0, _getColorValue.getColorValue)(color || 'primary.default', theme);
18
18
  var spinnerEmptyColor = (0, _getColorValue.getColorValue)(emptyColor || 'transparent', theme, 'transparent');
19
19
  var modifiedSize = size === 'sm' ? '16px' : size === 'md' ? '24px' : size === 'lg' ? '32px' : size === 'xl' ? '48px' : '24px';
20
20
  var borderColor = spinnerEmptyColor === 'currentColor' ? 'transparent' : theme.colors.neutral.neutral1;
21
- return "\n display: inline-block;\n width: ".concat(modifiedSize, ";\n height: ").concat(modifiedSize, ";\n border: ").concat(thickness || '4px', " solid ").concat(spinnerColor, ";\n border-radius: 9999999px;\n border-left-color: ").concat(borderColor, ";\n border-bottom-color: ").concat(borderColor, ";\n animation: spin ").concat(speed || '0.45s', " linear infinite;\n\n @keyframes spin {\n to {\n transform: rotate(360deg);\n }\n }\n ");
21
+ return "\n display: inline-block;\n width: ".concat(modifiedSize, ";\n height: ").concat(modifiedSize, ";\n border: ").concat(thickness || '4px', " solid ").concat(color ? (0, _colorCheck.stripThemeColors)(color || '', theme.colors) || color : theme.colors.primary.default, ";\n border-radius: 9999999px;\n border-left-color: ").concat(borderColor, ";\n border-bottom-color: ").concat(borderColor, ";\n animation: spin ").concat(speed || '0.45s', " linear infinite;\n\n @keyframes spin {\n to {\n transform: rotate(360deg);\n }\n }\n ");
22
22
  });
23
23
  exports.StyledSpinner = StyledSpinner;
@@ -1 +1 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/components/Tabs/styles.ts"],"names":[],"mappings":";AAMA,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE5F,eAAO,MAAM,aAAa;;;;;yGAiBzB,CAAC;AAEF,eAAO,MAAM,SAAS;;;;;;;;qHAqErB,CAAC;AAEF,eAAO,MAAM,aAAa;;;2GAGzB,CAAC;AAEF,eAAO,MAAM,eAAe;;;;;yGAI3B,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;6HAgC9B,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;YACpB,OAAO;yGAGhB,CAAC;AAEF,eAAO,MAAM,YAAY;;;iNAqBvB,CAAC"}
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/components/Tabs/styles.ts"],"names":[],"mappings":";AAMA,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE5F,eAAO,MAAM,aAAa;;;;;yGAazB,CAAC;AAEF,eAAO,MAAM,SAAS;;;;;;;;qHA+DrB,CAAC;AAEF,eAAO,MAAM,aAAa;;;2GAGzB,CAAC;AAEF,eAAO,MAAM,eAAe;;;;;yGAI3B,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;6HAgC9B,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;YACpB,OAAO;yGAGhB,CAAC;AAEF,eAAO,MAAM,YAAY;;;iNAqBvB,CAAC"}
@@ -14,11 +14,8 @@ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(
14
14
  var TabsContainer = _styled.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n width: 100%;\n\n > div[role='tablist'] {\n width: ", ";\n border-bottom: 2px solid\n ", ";\n }\n"])), function (_ref) {
15
15
  var fullWidth = _ref.fullWidth;
16
16
  return fullWidth ? '100%' : 'fit-content';
17
- }, function (props) {
18
- return {
19
- light: props.theme.colors.neutral.neutral1,
20
- dark: props.theme.colors.neutral.neutral6
21
- }[props.theme.colorMode];
17
+ }, function () {
18
+ return (0, _customColorMode.customColorMode)('rgba(0, 0, 0, 0.2)', 'rgba(255, 255, 255, 0.4)');
22
19
  });
23
20
  exports.TabsContainer = TabsContainer;
24
21
  var TabButton = _styled.default.button(function (_ref2) {
@@ -31,7 +28,7 @@ var TabButton = _styled.default.button(function (_ref2) {
31
28
  var colorProps = (0, _colorToGray.convertColor)((0, _getColorValue.getColorValue)(indicatorColor || 'primary.default', theme));
32
29
  var grayColor = colorProps.neutral2;
33
30
  var whiteColor = colorProps.neutral1;
34
- return "\n display: flex;\n ".concat(squeeze && 'flex: 1;', "\n align-items: center;\n justify-content: center;\n gap: 8px;\n padding: 1rem 2rem;\n\n font-family: inherit;\n font-weight: 600;\n font-size: ").concat(theme.fontSizes.xxs, ";\n\n color: ").concat(active ? (0, _customColorMode.customColorMode)("hsl(".concat(grayColor[0], ", ").concat(grayColor[1], "%, 30%)"), "hsl(".concat(whiteColor[0], ", ").concat(whiteColor[1], "%, ").concat(whiteColor[2], "%)")) : disabled ? theme.colors.neutral.neutral1 : "hsl(".concat(grayColor[0], ", ").concat(grayColor[1], "%, 75%)"), ";\n background: transparent;\n\n border: none;\n border-radius: 0;\n outline: 0;\n margin: 0;\n\n cursor: ").concat(disabled ? 'default' : 'pointer', ";\n vertical-align: middle;\n\n user-select: none;\n appearance: none;\n text-decoration: none;\n\n transition: all 250ms ease 0ms;\n\n & > span {\n ").concat(active && "\n color: ".concat((0, _getColorValue.getColorValue)(textColor || 'primary.default', theme), ";\n "), "\n }\n\n &:hover {\n color: ").concat(disabled ? theme.colors.neutral.neutral1 : theme.colorMode === 'light' ? "hsl(".concat(grayColor[0], ", ").concat(grayColor[1], "%, 30%)") : "hsl(".concat(whiteColor[0], ", ").concat(whiteColor[1], "%, 88%)"), ";\n background: ").concat(disabled ? 'transparent' : 'rgba(0, 0, 0, 0.04)', ";\n }\n\n &:active {\n background: rgba(0, 0, 0, .1);\n }\n");
31
+ return "\n display: flex;\n ".concat(squeeze && 'flex: 1;', "\n align-items: center;\n justify-content: center;\n gap: 8px;\n padding: 1rem 2rem;\n\n font-family: inherit;\n font-weight: 600;\n font-size: ").concat(theme.fontSizes.xxs, ";\n\n color: ").concat(active ? (0, _customColorMode.customColorMode)("hsl(".concat(grayColor[0], ", ").concat(grayColor[1], "%, 30%)"), "hsl(".concat(whiteColor[0], ", ").concat(whiteColor[1], "%, ").concat(whiteColor[2], "%)")) : disabled ? theme.colors.neutral.neutral1 : "hsl(".concat(grayColor[0], ", ").concat(grayColor[1], "%, 75%)"), ";\n background: transparent;\n\n border: none;\n border-radius: 0;\n outline: 0;\n margin: 0;\n\n cursor: ").concat(disabled ? 'default' : 'pointer', ";\n vertical-align: middle;\n\n user-select: none;\n appearance: none;\n text-decoration: none;\n\n transition: all 250ms ease 0ms;\n\n & > span {\n ").concat(active && "\n color: ".concat((0, _getColorValue.getColorValue)(textColor || 'primary.default', theme), ";\n "), "\n }\n\n &:hover {\n color: ").concat(disabled ? 'none' : theme.colors.neutral.black, ";\n background: ").concat(disabled ? 'transparent' : 'rgba(0, 0, 0, 0.04)', ";\n }\n\n &:active {\n background: rgba(0, 0, 0, .1);\n }\n");
35
32
  });
36
33
  exports.TabButton = TabButton;
37
34
  var TabButtonIcon = _styled.default.span(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n line-height: 0;\n transition: all 250ms ease 0ms;\n"])));
@@ -1,2 +1,5 @@
1
- export declare const useSystemTheme: () => 'dark' | 'light';
1
+ export declare const useSystemTheme: () => {
2
+ theme: "light" | "dark";
3
+ isFirstRender: boolean;
4
+ };
2
5
  //# sourceMappingURL=useSystemTheme.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useSystemTheme.d.ts","sourceRoot":"","sources":["../../../src/shared/hooks/useSystemTheme.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc,QAAO,MAAM,GAAG,OAmB1C,CAAC"}
1
+ {"version":3,"file":"useSystemTheme.d.ts","sourceRoot":"","sources":["../../../src/shared/hooks/useSystemTheme.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc;;;CAuB1B,CAAC"}
@@ -16,10 +16,12 @@ var useSystemTheme = function useSystemTheme() {
16
16
  _useState2 = _slicedToArray(_useState, 2),
17
17
  theme = _useState2[0],
18
18
  setTheme = _useState2[1];
19
+ var isFirstRender = (0, _react.useRef)(true);
19
20
  (0, _react.useEffect)(function () {
20
21
  var handleThemeChange = function handleThemeChange(event) {
21
22
  var isDarkMode = event.matches;
22
23
  setTheme(isDarkMode ? 'dark' : 'light');
24
+ isFirstRender.current = false;
23
25
  };
24
26
  var prefersDarkMode = window.matchMedia('(prefers-color-scheme: dark)');
25
27
  setTheme(prefersDarkMode.matches ? 'dark' : 'light');
@@ -28,6 +30,9 @@ var useSystemTheme = function useSystemTheme() {
28
30
  prefersDarkMode.removeEventListener('change', handleThemeChange);
29
31
  };
30
32
  }, []);
31
- return theme;
33
+ return {
34
+ theme: theme,
35
+ isFirstRender: isFirstRender.current
36
+ };
32
37
  };
33
38
  exports.useSystemTheme = useSystemTheme;
@@ -1 +1 @@
1
- {"version":3,"file":"ThemeContext.d.ts","sourceRoot":"","sources":["../../../../src/shared/theme/contexts/ThemeContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,SAAS,EAAuB,MAAM,OAAO,CAAC;AAStE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAKlD,KAAK,iBAAiB,GAAG;IACvB,KAAK,EAAE,gBAAgB,CAAC;IACxB,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC;IAC5B,eAAe,EAAE,MAAM,IAAI,CAAC;CAC7B,CAAC;AAEF,KAAK,kBAAkB,GAAG;IACxB,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB,gBAAgB,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IACpC,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,YAAY,4CAAyC,CAAC;AAEnE,wBAAgB,iBAAiB,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,gBAAgB,EAAE,EAAE,kBAAkB,eA4D1F"}
1
+ {"version":3,"file":"ThemeContext.d.ts","sourceRoot":"","sources":["../../../../src/shared/theme/contexts/ThemeContext.tsx"],"names":[],"mappings":"AACA,OAAO,EAAiB,SAAS,EAAuB,MAAM,OAAO,CAAC;AAStE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAKlD,KAAK,iBAAiB,GAAG;IACvB,KAAK,EAAE,gBAAgB,CAAC;IACxB,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC;IAC5B,eAAe,EAAE,MAAM,IAAI,CAAC;CAC7B,CAAC;AAEF,KAAK,kBAAkB,GAAG;IACxB,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB,gBAAgB,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IACpC,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,YAAY,4CAAyC,CAAC;AAEnE,wBAAgB,iBAAiB,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,gBAAgB,EAAE,EAAE,kBAAkB,eA8D1F"}
@@ -26,7 +26,7 @@ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructur
26
26
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
27
27
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
28
28
  function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
29
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
29
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } /* eslint-disable no-console */
30
30
  var ThemeContext = /*#__PURE__*/(0, _react.createContext)({});
31
31
  exports.ThemeContext = ThemeContext;
32
32
  function PPUIThemeProvider(_ref) {
@@ -38,7 +38,7 @@ function PPUIThemeProvider(_ref) {
38
38
  currentTheme = _useState2[0],
39
39
  setCurrentTheme = _useState2[1];
40
40
  var systemTheme = (0, _useSystemTheme.useSystemTheme)();
41
- var _useState3 = (0, _react.useState)(initialColorMode || systemTheme),
41
+ var _useState3 = (0, _react.useState)(initialColorMode || systemTheme.theme),
42
42
  _useState4 = _slicedToArray(_useState3, 2),
43
43
  colorMode = _useState4[0],
44
44
  setColorMode = _useState4[1];
@@ -63,8 +63,8 @@ function PPUIThemeProvider(_ref) {
63
63
  (0, _react.useEffect)(function () {
64
64
  if (initialColorMode) {
65
65
  changeColorMode(initialColorMode);
66
- } else {
67
- changeColorMode(systemTheme);
66
+ } else if (!systemTheme.isFirstRender) {
67
+ changeColorMode(systemTheme.theme);
68
68
  }
69
69
  }, [initialColorMode, systemTheme]);
70
70
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(ThemeContext.Provider, {
@@ -1,2 +1,2 @@
1
- export declare function customColorMode(light: string, dark: string): string;
1
+ export declare function customColorMode<L, D>(light: L, dark: D): L | D;
2
2
  //# sourceMappingURL=customColorMode.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"customColorMode.d.ts","sourceRoot":"","sources":["../../src/utils/customColorMode.ts"],"names":[],"mappings":"AAEA,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,UAI1D"}
1
+ {"version":3,"file":"customColorMode.d.ts","sourceRoot":"","sources":["../../src/utils/customColorMode.ts"],"names":[],"mappings":"AAEA,wBAAgB,eAAe,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,SAItD"}
@@ -17,7 +17,7 @@ var _colorCheck = require("../utils/colorCheck");
17
17
  var getColorValue = function getColorValue(color, theme, defaultValue) {
18
18
  if ((0, _colorCheck.isHexColor)(color) || (0, _colorCheck.isRgbHslColor)(color)) return color;
19
19
  var colorIsThemeColor = theme && (0, _colorCheck.stripThemeColors)(color, theme.colors);
20
- return colorIsThemeColor || defaultValue || 'inherit';
20
+ return colorIsThemeColor || color || defaultValue || 'inherit';
21
21
  };
22
22
  exports.getColorValue = getColorValue;
23
23
  var getThemeHex = function getThemeHex(path, obj) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pedidopago/ui",
3
- "version": "1.7.22",
3
+ "version": "1.7.23",
4
4
  "description": "Quick build beatiful Pedido Pago apps",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",