@pedidopago/ui 1.7.19-2 → 1.7.19
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/Icon/data/illustrations.js +4 -4
- package/dist/components/Modal/index.js +1 -0
- package/dist/components/MultipleSelect/index.js +1 -0
- package/dist/components/NewSelect/multiple/index.js +1 -0
- package/dist/components/NewSelect/single/index.js +1 -0
- package/dist/components/RadioInput/index.d.ts +2 -2
- package/dist/components/RadioInput/index.d.ts.map +1 -1
- package/dist/components/RadioInput/index.js +6 -15
- package/dist/components/RadioInput/types.d.ts +1 -7
- package/dist/components/RadioInput/types.d.ts.map +1 -1
- package/dist/components/ReactPortal/index.d.ts +2 -2
- package/dist/components/ReactPortal/index.d.ts.map +1 -1
- package/dist/components/ReactPortal/index.js +6 -4
- package/dist/components/Select/index.js +1 -0
- package/dist/components/Toast/index.js +1 -0
- package/dist/components/Tooltip/index.js +1 -0
- package/package.json +1 -1
|
@@ -163,10 +163,10 @@ var illustrationsIcons = [{
|
|
|
163
163
|
xmlns: 'http://www.w3.org/2000/svg'
|
|
164
164
|
}, {
|
|
165
165
|
name: 'illust-model',
|
|
166
|
-
width:
|
|
167
|
-
height:
|
|
168
|
-
viewBox: '0 0
|
|
169
|
-
html: '<path d="
|
|
166
|
+
width: 173,
|
|
167
|
+
height: 192,
|
|
168
|
+
viewBox: '0 0 173 192',
|
|
169
|
+
html: '<path d="M166.876 108.347C166.876 120.623 164.185 132.284 159.35 142.761C146.25 171.232 117.379 191.002 83.8765 191.002C50.3736 191.002 21.5031 171.232 8.40255 142.761C3.56836 132.284 0.876465 120.623 0.876465 108.347C0.876465 62.6972 38.0358 25.6924 83.8765 25.6924C129.717 25.6924 166.876 62.6972 166.876 108.347Z" fill="#EAEFED"/><mask id="mask0_1_2" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="1" y="11" width="166" height="180"><path d="M1 11H167V108.5C167 154.063 129.563 191 84 191C38.4365 191 1 154.063 1 108.5V11Z" fill="#C4C4C4"/></mask><g mask="url(#mask0_1_2)"><g filter="url(#filter0_d_1_2)"><path d="M144.844 194.919H23.84C21.1777 194.919 19 192.571 19 189.7V59.2194C19 56.3485 21.1777 54 23.84 54H144.844C147.507 54 149.684 56.3485 149.684 59.2194V189.7C149.684 192.571 147.507 194.919 144.844 194.919Z" fill="white"/></g><path d="M49.6294 131.608H122.118V215.343H49.6294V131.608Z" fill="white" stroke="#EAEFED" stroke-width="5.06329" stroke-linecap="round" stroke-linejoin="round" stroke-dasharray="10.13 12.66"/><path d="M19 59.1728C19 57.8009 19.5476 56.4852 20.5223 55.5151C21.497 54.545 22.8189 54 24.1973 54H144.487C145.865 54 147.187 54.545 148.162 55.5151C149.137 56.4852 149.684 57.8009 149.684 59.1728V113.228H19V59.1728Z" fill="#C0D1CA"/><path d="M78.2158 104.037H89.4472" stroke="white" stroke-width="5.06329" stroke-linecap="round"/><path d="M19 59.1728C19 57.8009 19.5476 56.4852 20.5223 55.5151C21.497 54.545 22.8189 54 24.1973 54H144.487C145.865 54 147.187 54.545 148.162 55.5151C149.137 56.4852 149.684 57.8009 149.684 59.1728V64.2112H19V59.1728Z" fill="#6F857C"/></g><path d="M87.0045 139.616H86.9985C85.7573 139.622 84.5766 140.148 83.7119 141.066C82.8484 141.984 82.3686 143.218 82.3671 144.499V144.501C82.369 145.781 82.8487 147.015 83.7119 147.932C84.5762 148.85 85.7564 149.376 86.997 149.382H87.003C88.2436 149.376 89.4238 148.85 90.2881 147.932C91.1513 147.015 91.631 145.781 91.6329 144.501V144.499C91.6314 143.219 91.1521 141.985 90.2892 141.067C89.4251 140.149 88.2451 139.623 87.0045 139.616ZM79.6329 144.5C79.6329 140.138 82.985 136.633 87.0013 136.633C91.0162 136.633 94.3671 140.137 94.3671 144.5C94.3671 148.862 91.015 152.367 87 152.367C82.9863 152.367 79.6329 148.862 79.6329 144.5Z" fill="#6F857C" stroke="#6F857C" stroke-width="1.26582"/><path fill-rule="evenodd" clip-rule="evenodd" d="M142.532 109.468V138.934C142.532 140.934 141.752 142.862 140.35 144.29C138.946 145.72 137.033 146.532 135.027 146.532H91.4683V141.468H135.027C135.659 141.468 136.275 141.213 136.737 140.743C137.2 140.271 137.468 139.621 137.468 138.934V109.468H142.532Z" fill="#6F857C"/><g filter="url(#filter1_d_1_2)"><path d="M161.716 13H94.2843C91.3659 13 89 15.3285 89 18.2008V84.7992C89 87.6715 91.3659 90 94.2843 90H161.716C164.634 90 167 87.6715 167 84.7992V18.2008C167 15.3285 164.634 13 161.716 13Z" fill="white"/></g><path d="M100 24H121" stroke="#36D39A" stroke-width="7.59494" stroke-linecap="round"/><path fill-rule="evenodd" clip-rule="evenodd" d="M97.4683 39C97.4683 37.6018 98.6017 36.4684 99.9999 36.4684H135C136.398 36.4684 137.532 37.6018 137.532 39C137.532 40.3982 136.398 41.5317 135 41.5317H99.9999C98.6017 41.5317 97.4683 40.3982 97.4683 39ZM97.4683 47C97.4683 45.6018 98.6017 44.4684 99.9999 44.4684H135C136.398 44.4684 137.532 45.6018 137.532 47C137.532 48.3982 136.398 49.5317 135 49.5317H99.9999C98.6017 49.5317 97.4683 48.3982 97.4683 47Z" fill="#C0D1CA"/><path d="M121.684 83H99.3147C98.5919 83 98 82.3365 98 81.5271V59.4702C98 58.6608 98.5919 58 99.316 58H121.684C122.408 58 123 58.6608 123 59.4702V81.5298C123 82.3379 122.408 83 121.684 83Z" fill="#B7D2FF"/><path d="M98 74.5549L104.118 67.6656C104.908 66.7781 106.158 66.7781 106.882 67.6656L112.999 74.5549L116.618 70.4807C117.407 69.5932 118.658 69.5932 119.381 70.4807L123 74.5549V81.5176C123 82.333 122.408 83 121.684 83H99.3147C98.5919 83 98 82.333 98 81.5176V74.5549Z" fill="#387BE9"/><path d="M113.499 67C114.881 67 116 65.8802 116 64.4994C116 63.1187 114.881 62 113.499 62C112.119 62 111 63.1187 111 64.4994C111 65.8802 112.119 67 113.499 67Z" fill="white"/><path d="M29 62C30.1046 62 31 61.1046 31 60C31 58.8954 30.1046 58 29 58C27.8954 58 27 58.8954 27 60C27 61.1046 27.8954 62 29 62Z" fill="white"/><path d="M35 62C36.1046 62 37 61.1046 37 60C37 58.8954 36.1046 58 35 58C33.8954 58 33 58.8954 33 60C33 61.1046 33.8954 62 35 62Z" fill="white"/><path d="M41 62C42.1046 62 43 61.1046 43 60C43 58.8954 42.1046 58 41 58C39.8954 58 39 58.8954 39 60C39 61.1046 39.8954 62 41 62Z" fill="white"/><path d="M141 38C141 37.4477 141.448 37 142 37H159C159.552 37 160 37.4477 160 38V57C160 57.5523 159.552 58 159 58H142C141.448 58 141 57.5523 141 57V38Z" fill="#C0D1CA"/><path fill-rule="evenodd" clip-rule="evenodd" d="M10.3157 149V179.472C10.3157 180.028 10.5407 180.574 10.9644 180.988C11.3903 181.404 11.982 181.65 12.6126 181.65H41V186H12.6126C10.8802 186 9.20572 185.328 7.96081 184.112C6.7136 182.893 6 181.226 6 179.472V149H10.3157Z" fill="#6F857C"/><path fill-rule="evenodd" clip-rule="evenodd" d="M10.3697 141V159.507C10.3697 160.137 10.6208 160.727 11.0432 161.149C11.4628 161.569 12.0141 161.789 12.5707 161.789H19V166H12.5707C10.801 166 9.1211 165.296 7.89574 164.07C6.67307 162.847 6 161.204 6 159.507V141H10.3697Z" fill="#6F857C"/><path d="M41.6029 136H5.39711C2.96865 136 1 138.016 1 140.503V147.497C1 149.984 2.96865 152 5.39711 152H41.6029C44.0313 152 46 149.984 46 147.497V140.503C46 138.016 44.0313 136 41.6029 136Z" fill="#169E71"/><path d="M58.5052 156H21.4948C19.0124 156 17 158.016 17 160.503V167.497C17 169.984 19.0124 172 21.4948 172H58.5052C60.9876 172 63 169.984 63 167.497V160.503C63 158.016 60.9876 156 58.5052 156Z" fill="#1DD195"/><path d="M74.6029 176H38.3971C35.9687 176 34 177.89 34 180.221V186.779C34 189.11 35.9687 191 38.3971 191H74.6029C77.0313 191 79 189.11 79 186.779V180.221C79 177.89 77.0313 176 74.6029 176Z" fill="#BFF5E3"/><defs><filter id="filter0_d_1_2" x="12.6709" y="48.9367" width="143.342" height="153.577" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/><feOffset dy="1.26582"/><feGaussianBlur stdDeviation="3.16456"/><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 0"/><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_1_2"/><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1_2" result="shape"/></filter><filter id="filter1_d_1_2" x="83" y="9" width="90" height="89" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/><feOffset dy="2"/><feGaussianBlur stdDeviation="3"/><feComposite in2="hardAlpha" operator="out"/><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.08 0"/><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_1_2"/><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1_2" result="shape"/></filter></defs>',
|
|
170
170
|
xmlns: 'http://www.w3.org/2000/svg'
|
|
171
171
|
}, {
|
|
172
172
|
name: 'illust-order-canceled',
|
|
@@ -83,6 +83,7 @@ var ModalComponent = function ModalComponent(_ref) {
|
|
|
83
83
|
return "translate(".concat(percentageX, "%, ").concat(percentageY, "%)");
|
|
84
84
|
}
|
|
85
85
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ReactPortal.ReactPortal, {
|
|
86
|
+
wrapperId: "portal-root",
|
|
86
87
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_framerMotion.AnimatePresence, {
|
|
87
88
|
mode: "wait",
|
|
88
89
|
children: open && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
@@ -174,6 +174,7 @@ var MultipleSelect = function MultipleSelect(_ref) {
|
|
|
174
174
|
placeholder: placeholder,
|
|
175
175
|
dropDownIcon: dropDownIcon
|
|
176
176
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ReactPortal.ReactPortal, {
|
|
177
|
+
wrapperId: "portal-root",
|
|
177
178
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_framerMotion.AnimatePresence, {
|
|
178
179
|
mode: "wait",
|
|
179
180
|
children: showOptionsArea && /*#__PURE__*/(0, _jsxRuntime.jsx)(_framerMotion.motion.div, _objectSpread(_objectSpread({}, _animations.multipleSelectAnimations), {}, {
|
|
@@ -198,6 +198,7 @@ function NewMultipleSelect(_ref) {
|
|
|
198
198
|
})
|
|
199
199
|
})]
|
|
200
200
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ReactPortal.ReactPortal, {
|
|
201
|
+
wrapperId: "portal-root",
|
|
201
202
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.OptionsContainer, {
|
|
202
203
|
ref: optionsModalRef,
|
|
203
204
|
open: isOpenOptions,
|
|
@@ -144,6 +144,7 @@ function NewSingleSelect(_ref) {
|
|
|
144
144
|
})
|
|
145
145
|
})]
|
|
146
146
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ReactPortal.ReactPortal, {
|
|
147
|
+
wrapperId: "portal-root",
|
|
147
148
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.OptionsContainer, {
|
|
148
149
|
ref: optionsModalRef,
|
|
149
150
|
open: isOpenOptions,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/RadioInput/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/RadioInput/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAc,MAAM,OAAO,CAAC;AAGvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE3C,QAAA,MAAM,KAAK,EAAE,EAAE,CAAC,gBAAgB,CAc/B,CAAC;AAEF,eAAe,KAAK,CAAC"}
|
|
@@ -9,7 +9,7 @@ var _react = require("react");
|
|
|
9
9
|
var _ChoiceList = require("./components/ChoiceList");
|
|
10
10
|
var _styles = require("./styles");
|
|
11
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
-
var _excluded = ["isDisabled", "
|
|
12
|
+
var _excluded = ["isDisabled", "children", "name"];
|
|
13
13
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
14
14
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
15
15
|
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; }
|
|
@@ -17,37 +17,28 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _ty
|
|
|
17
17
|
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); }
|
|
18
18
|
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; }
|
|
19
19
|
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; }
|
|
20
|
-
var
|
|
20
|
+
var Radio = function Radio(_ref) {
|
|
21
21
|
var isDisabled = _ref.isDisabled,
|
|
22
|
-
id = _ref.id,
|
|
23
|
-
name = _ref.name,
|
|
24
|
-
value = _ref.value,
|
|
25
22
|
children = _ref.children,
|
|
26
|
-
|
|
27
|
-
defaultChecked = _ref.defaultChecked,
|
|
28
|
-
onChange = _ref.onChange,
|
|
23
|
+
name = _ref.name,
|
|
29
24
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
30
25
|
var _useContext = (0, _react.useContext)(_ChoiceList.RadioGroup),
|
|
31
26
|
groupName = _useContext.groupName,
|
|
32
27
|
handleRadioClick = _useContext.handleRadioClick,
|
|
33
28
|
isDisabledContext = _useContext.isDisabled;
|
|
34
|
-
var radioRef = (0, _react.useRef)(null);
|
|
35
29
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Wrapper, {
|
|
36
30
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.Input, _objectSpread({
|
|
37
|
-
ref: radioRef,
|
|
38
31
|
disabled: isDisabled || isDisabledContext,
|
|
39
32
|
type: "radio",
|
|
40
|
-
id: id,
|
|
41
33
|
name: groupName || name,
|
|
42
34
|
onClick: function onClick(e) {
|
|
43
35
|
return handleRadioClick(e.currentTarget.value);
|
|
44
|
-
}
|
|
45
|
-
value: value
|
|
36
|
+
}
|
|
46
37
|
}, rest)), children && /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.Label, {
|
|
47
|
-
htmlFor: id,
|
|
38
|
+
htmlFor: rest.id,
|
|
48
39
|
children: children
|
|
49
40
|
})]
|
|
50
41
|
});
|
|
51
42
|
};
|
|
52
|
-
var _default =
|
|
43
|
+
var _default = Radio;
|
|
53
44
|
exports.default = _default;
|
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
import { ReactNode, InputHTMLAttributes } from 'react';
|
|
2
|
-
export interface IRadioInputProps {
|
|
2
|
+
export interface IRadioInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type'> {
|
|
3
3
|
isDisabled?: boolean;
|
|
4
|
-
name?: string;
|
|
5
|
-
value: string;
|
|
6
|
-
id: string;
|
|
7
4
|
children?: ReactNode;
|
|
8
|
-
color?: string;
|
|
9
|
-
defaultChecked?: boolean;
|
|
10
|
-
onChange?: (value: string) => void;
|
|
11
5
|
}
|
|
12
6
|
export interface ChoiceListProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
13
7
|
onChangeValue?: (value?: string) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/RadioInput/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAEvD,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/RadioInput/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAEvD,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC3F,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,MAAM,WAAW,eAAgB,SAAQ,mBAAmB,CAAC,gBAAgB,CAAC;IAC5E,aAAa,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,gBAAgB,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,MAAM,WAAW,iBAAiB;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAC;CACnC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
interface ReactPortalProps {
|
|
3
|
-
wrapperId
|
|
3
|
+
wrapperId: string;
|
|
4
4
|
children: ReactNode | ReactNode[] | JSX.Element | JSX.Element[];
|
|
5
5
|
}
|
|
6
|
-
export declare function ReactPortal(
|
|
6
|
+
export declare function ReactPortal({ children, wrapperId }: ReactPortalProps): import("react").ReactPortal | null;
|
|
7
7
|
export {};
|
|
8
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ReactPortal/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAuB,MAAM,OAAO,CAAC;AAIvD,UAAU,gBAAgB;IACxB,SAAS,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ReactPortal/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAuB,MAAM,OAAO,CAAC;AAIvD,UAAU,gBAAgB;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,SAAS,GAAG,SAAS,EAAE,GAAG,GAAG,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO,EAAE,CAAC;CACjE;AAED,wBAAgB,WAAW,CAAC,EAAE,QAAQ,EAAE,SAAyB,EAAE,EAAE,gBAAgB,sCAsBpF"}
|
|
@@ -14,13 +14,15 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
14
14
|
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; }
|
|
15
15
|
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; } }
|
|
16
16
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
17
|
-
function ReactPortal(
|
|
17
|
+
function ReactPortal(_ref) {
|
|
18
|
+
var children = _ref.children,
|
|
19
|
+
_ref$wrapperId = _ref.wrapperId,
|
|
20
|
+
wrapperId = _ref$wrapperId === void 0 ? 'portal-root' : _ref$wrapperId;
|
|
18
21
|
var _useState = (0, _react.useState)(null),
|
|
19
22
|
_useState2 = _slicedToArray(_useState, 2),
|
|
20
23
|
wrapperElement = _useState2[0],
|
|
21
24
|
setWrapperElement = _useState2[1];
|
|
22
25
|
(0, _react.useEffect)(function () {
|
|
23
|
-
var wrapperId = props.wrapperId || Math.random().toString(36).substring(2, 9);
|
|
24
26
|
var element = document.getElementById(wrapperId);
|
|
25
27
|
var systemCreated = false;
|
|
26
28
|
if (!element) {
|
|
@@ -33,9 +35,9 @@ function ReactPortal(props) {
|
|
|
33
35
|
element.parentNode.removeChild(element);
|
|
34
36
|
}
|
|
35
37
|
};
|
|
36
|
-
}, [
|
|
38
|
+
}, [wrapperId]);
|
|
37
39
|
if (wrapperElement === null) return null;
|
|
38
40
|
return /*#__PURE__*/(0, _reactDom.createPortal)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
39
|
-
children:
|
|
41
|
+
children: children
|
|
40
42
|
}), wrapperElement);
|
|
41
43
|
}
|
|
@@ -211,6 +211,7 @@ var Select = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
211
211
|
tabIndex: -1
|
|
212
212
|
}, rest))]
|
|
213
213
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ReactPortal.ReactPortal, {
|
|
214
|
+
wrapperId: "portal-root",
|
|
214
215
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_OptionsSelect.OptionsSelect, {
|
|
215
216
|
open: optionsMenuOpen,
|
|
216
217
|
left: "".concat((_containerRef$current3 = containerRef.current) === null || _containerRef$current3 === void 0 ? void 0 : _containerRef$current3.getBoundingClientRect().left, "px"),
|
|
@@ -23,6 +23,7 @@ var ToastContainer = function ToastContainer() {
|
|
|
23
23
|
toasts = _useContext.toasts,
|
|
24
24
|
remove = _useContext.remove;
|
|
25
25
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ReactPortal.ReactPortal, {
|
|
26
|
+
wrapperId: "toast-root",
|
|
26
27
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.StyledToastContainerOverlay, {
|
|
27
28
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.StyledToastManagerOverlay, {
|
|
28
29
|
position: "top",
|
|
@@ -142,6 +142,7 @@ var Tooltip = function Tooltip(_ref) {
|
|
|
142
142
|
}
|
|
143
143
|
},
|
|
144
144
|
children: [props.children, /*#__PURE__*/(0, _jsxRuntime.jsx)(_ReactPortal.ReactPortal, {
|
|
145
|
+
wrapperId: "tooltip-portal",
|
|
145
146
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_TooltipLabel.TooltipLabel, _objectSpread({
|
|
146
147
|
isVisible: showTooltip,
|
|
147
148
|
ref: tooltipLabelRef,
|