x25 17.1.9 → 17.1.12

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/Collapse.d.ts ADDED
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ declare type CollapseProps = {
3
+ open?: boolean;
4
+ children: any;
5
+ contentClassName: string;
6
+ };
7
+ declare const Collapse: ({ open, children, contentClassName }: CollapseProps) => JSX.Element;
8
+ export default Collapse;
package/Collapse.js ADDED
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
11
+ }) : function(o, v) {
12
+ o["default"] = v;
13
+ });
14
+ var __importStar = (this && this.__importStar) || function (mod) {
15
+ if (mod && mod.__esModule) return mod;
16
+ var result = {};
17
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
+ __setModuleDefault(result, mod);
19
+ return result;
20
+ };
21
+ Object.defineProperty(exports, "__esModule", { value: true });
22
+ /* eslint-disable no-undefined */
23
+ var react_1 = __importStar(require("react"));
24
+ var Collapse = function (_a) {
25
+ var open = _a.open, children = _a.children, contentClassName = _a.contentClassName;
26
+ var contentContainerClassName = "collapsible-content-padding-edonec", _b = (0, react_1.useState)(0), visibleTimeout = _b[0], setVisibleTimeout = _b[1], _c = (0, react_1.useState)(open ? "hidden" : "visible"), overflow = _c[0], setOverflow = _c[1], _d = (0, react_1.useState)(open), isOpen = _d[0], setIsOpen = _d[1], _e = (0, react_1.useState)(open ? undefined : 0), height = _e[0], setHeight = _e[1], ref = (0, react_1.useRef)(null);
27
+ (0, react_1.useEffect)(function () {
28
+ setIsOpen(open);
29
+ }, [open]);
30
+ (0, react_1.useEffect)(function () {
31
+ if (!height || !isOpen || !ref.current) {
32
+ return undefined;
33
+ }
34
+ var resizeObserver = new ResizeObserver(function (element) {
35
+ setHeight(element[0].contentRect.height);
36
+ });
37
+ resizeObserver.observe(ref.current);
38
+ return function () {
39
+ resizeObserver.disconnect();
40
+ };
41
+ }, [height, isOpen]);
42
+ (0, react_1.useEffect)(function () {
43
+ var _a;
44
+ clearTimeout(visibleTimeout);
45
+ var delay = 100;
46
+ setOverflow("hidden");
47
+ if (isOpen) {
48
+ setHeight((_a = ref.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect().height);
49
+ }
50
+ else {
51
+ setHeight(0);
52
+ }
53
+ var theTimeout = setTimeout(function () {
54
+ if (isOpen) {
55
+ setOverflow("visible");
56
+ }
57
+ }, delay);
58
+ setVisibleTimeout(theTimeout);
59
+ return function () {
60
+ clearTimeout(visibleTimeout);
61
+ };
62
+ }, [isOpen]);
63
+ return (react_1.default.createElement("div", { className: "collapsible-content-edonec ".concat(contentClassName), style: { height: height, overflow: overflow } },
64
+ react_1.default.createElement("div", { className: contentContainerClassName, ref: ref }, children)));
65
+ };
66
+ exports.default = Collapse;
67
+ //# sourceMappingURL=Collapse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Collapse.js","sourceRoot":"","sources":["../src/Collapse.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,iCAAiC;AACjC,6CAA2D;AAQ3D,IAAM,QAAQ,GAAG,UAAC,EAAoD;QAAlD,IAAI,UAAA,EAAE,QAAQ,cAAA,EAAE,gBAAgB,sBAAA;IAElD,IACE,yBAAyB,GAAG,oCAAoC,EAEhE,KAAsC,IAAA,gBAAQ,EAAC,CAAC,CAAC,EAAhD,cAAc,QAAA,EAAE,iBAAiB,QAAA,EAClC,KAA0B,IA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,SAAS,CAAC,CAAC,CAAC,CAAC;SACd;QAED,IAAM,UAAU,GAAS,UAAU,CAAC;YAClC,IAAI,MAAM,EAAE;gBACV,WAAW,CAAC,SAAS,CAAC,CAAC;aACxB;QACH,CAAC,EAAE,KAAK,CAAC,CAAC;QAEV,iBAAiB,CAAC,UAAU,CAAC,CAAC;QAE9B,OAAO;YACL,YAAY,CAAC,cAAc,CAAC,CAAC;QAC/B,CAAC,CAAC;IAEJ,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IAEb,OAAO,CACL,uCACE,SAAS,EAAE,qCAA8B,gBAAgB,CAAE,EAAE,KAAK,EAAE,EAAE,MAAM,QAAA,EAC1E,QAAQ,UAAA,EAAE;QACZ,uCAAK,SAAS,EAAE,yBAAyB,EAAE,GAAG,EAAE,GAAG,IAChD,QAAQ,CACL,CACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,QAAQ,CAAC"}
package/Modal/types.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as React from "react";
2
2
  export declare type ModalsTypes = Record<string, React.ReactNode>;
3
3
  export declare type ModalWindowProps = {
4
- onClose: () => any;
4
+ onClose?: () => any;
5
5
  closeByEscape?: boolean;
6
6
  children: JSX.Element;
7
7
  title: string;
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "17.1.9",
2
+ "version": "17.1.12",
3
3
  "name": "x25",
4
4
  "description": "x25",
5
5
  "types": "./dist/index.d.ts",
package/style/index.css CHANGED
@@ -1 +1 @@
1
- .delay-input{position:relative}.delay-input input{padding-right:27px}.delay-input .loading-spinner{position:absolute;right:4px;top:5px;transition:all .2s ease-in-out}.digits-3{width:52px !important}.text-fancy,.fancy-text,.fancy-text-sm{-webkit-user-select:none;box-sizing:border-box;color:#b1b2b3;cursor:default;font-family:"Lucida Grande","Segoe UI",Ubuntu,Cantarell,sans-serif;font-weight:bold;list-style-image:none;list-style-position:outside;list-style-type:none;opacity:1;text-align:center}.text-fancy{margin-top:5px;color:gray;font-size:20px;font-weight:500}.fancy-text{font-size:31px;line-height:34px}.fancy-text-sm{font-size:16px;line-height:23.5px}.navbar .nav-toggler{background:#292b2c}.main{padding:20px}.main .page-header{margin-top:0}@media (min-width: 768px){.main{padding-right:40px;padding-left:40px}}.sidework-logo .first-char{color:#ff007b;font-size:32px;font-weight:500}.sidework-logo .color{color:#ff007b}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.no-hover{text-decoration:none !important}.cursor-pointer{cursor:pointer}.no-wrap{white-space:nowrap}.content{margin-bottom:3rem;margin-top:10px;margin-left:10px}.hr-sm{margin-top:.5rem;margin-bottom:.5rem}.text-fancy,.fancy-text,.fancy-text-sm{-webkit-user-select:none;box-sizing:border-box;color:#b1b2b3;cursor:default;font-family:"Lucida Grande","Segoe UI",Ubuntu,Cantarell,sans-serif;font-weight:bold;list-style-image:none;list-style-position:outside;list-style-type:none;opacity:1;text-align:center}.fancy-text{font-size:31px;line-height:34px}.fancy-text-sm{font-size:16px;line-height:23.5px}.invalid-feedback{display:block !important}.truncate{display:inline-block;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@media screen and (min-width: 1201px){.brand-wrapper{width:500px}}@media screen and (min-width: 980px) and (max-width: 1200px){.brand-wrapper{width:350px}}@media screen and (min-width: 850px) and (max-width: 979px){.brand-wrapper{width:200px}}@media screen and (min-width: 798px) and (max-width: 849px){.brand-wrapper{width:100px}}@media screen and (min-width: 765px) and (max-width: 797px){.brand-wrapper{width:200px}}@media screen and (min-width: 580px) and (max-width: 764px){.brand-wrapper{width:400px}}@media screen and (min-width: 401px) and (max-width: 579px){.brand-wrapper{width:240px}}@media screen and (min-width: 350px) and (max-width: 400px){.brand-wrapper{width:230px}}@media screen and (max-width: 349px){.brand-wrapper{width:100px}}@media only screen and (min-device-width: 770px){.search-bar{width:220px !important}}::-webkit-input-placeholder{color:#e0e0e0 !important}::-moz-placeholder{color:#e0e0e0 !important}:-ms-input-placeholder{color:#e0e0e0 !important}:-moz-placeholder{color:#e0e0e0 !important}
1
+ .delay-input{position:relative}.delay-input input{padding-right:27px}.delay-input .loading-spinner{position:absolute;right:4px;top:5px;transition:all .2s ease-in-out}.digits-3{width:52px !important}.text-fancy,.fancy-text,.fancy-text-sm{-webkit-user-select:none;box-sizing:border-box;color:#b1b2b3;cursor:default;font-family:"Lucida Grande","Segoe UI",Ubuntu,Cantarell,sans-serif;font-weight:bold;list-style-image:none;list-style-position:outside;list-style-type:none;opacity:1;text-align:center}.text-fancy{margin-top:5px;color:gray;font-size:20px;font-weight:500}.fancy-text{font-size:31px;line-height:34px}.fancy-text-sm{font-size:16px;line-height:23.5px}.navbar .nav-toggler{background:#292b2c}.main{padding:20px}.main .page-header{margin-top:0}@media (min-width: 768px){.main{padding-right:40px;padding-left:40px}}.sidework-logo .first-char{color:#ff007b;font-size:32px;font-weight:500}.sidework-logo .color{color:#ff007b}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.no-hover{text-decoration:none !important}.cursor-pointer{cursor:pointer}.no-wrap{white-space:nowrap}.content{margin-bottom:3rem;margin-top:10px;margin-left:10px}.hr-sm{margin-top:.5rem;margin-bottom:.5rem}.text-fancy,.fancy-text,.fancy-text-sm{-webkit-user-select:none;box-sizing:border-box;color:#b1b2b3;cursor:default;font-family:"Lucida Grande","Segoe UI",Ubuntu,Cantarell,sans-serif;font-weight:bold;list-style-image:none;list-style-position:outside;list-style-type:none;opacity:1;text-align:center}.fancy-text{font-size:31px;line-height:34px}.fancy-text-sm{font-size:16px;line-height:23.5px}.invalid-feedback{display:block !important}.truncate{display:inline-block;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@media screen and (min-width: 1201px){.brand-wrapper{width:500px}}@media screen and (min-width: 980px) and (max-width: 1200px){.brand-wrapper{width:350px}}@media screen and (min-width: 850px) and (max-width: 979px){.brand-wrapper{width:200px}}@media screen and (min-width: 798px) and (max-width: 849px){.brand-wrapper{width:100px}}@media screen and (min-width: 765px) and (max-width: 797px){.brand-wrapper{width:200px}}@media screen and (min-width: 580px) and (max-width: 764px){.brand-wrapper{width:400px}}@media screen and (min-width: 401px) and (max-width: 579px){.brand-wrapper{width:240px}}@media screen and (min-width: 350px) and (max-width: 400px){.brand-wrapper{width:230px}}@media screen and (max-width: 349px){.brand-wrapper{width:100px}}@media only screen and (min-device-width: 770px){.search-bar{width:220px !important}}::-webkit-input-placeholder{color:#e0e0e0 !important}::-moz-placeholder{color:#e0e0e0 !important}:-ms-input-placeholder{color:#e0e0e0 !important}:-moz-placeholder{color:#e0e0e0 !important}.collapsible-content-edonec{transition:height 0.2s ease-in-out}.collapsible-card-edonec{transition:0.3s}
@@ -0,0 +1,7 @@
1
+ declare type CheckClickOutsideMenu = {
2
+ menuRef: any;
3
+ buttonRef: any;
4
+ setIsOpen: (value: boolean) => any;
5
+ };
6
+ export declare const checkClickOutsideMenu: ({ menuRef, buttonRef, setIsOpen }: CheckClickOutsideMenu) => void;
7
+ export {};
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.checkClickOutsideMenu = void 0;
4
+ var react_1 = require("react");
5
+ var checkClickOutsideMenu = function (_a) {
6
+ var menuRef = _a.menuRef, buttonRef = _a.buttonRef, setIsOpen = _a.setIsOpen;
7
+ (0, react_1.useEffect)(function () {
8
+ var handleClickOutside = function (event) {
9
+ var isClickOutsideButNotOnButton = (menuRef.current &&
10
+ !menuRef.current.contains(event.target) &&
11
+ !buttonRef.current.contains(event.target));
12
+ if (isClickOutsideButNotOnButton) {
13
+ setIsOpen(false);
14
+ }
15
+ };
16
+ document.addEventListener("mousedown", handleClickOutside);
17
+ return function () {
18
+ document.removeEventListener("mousedown", handleClickOutside);
19
+ };
20
+ }, [menuRef, buttonRef]);
21
+ };
22
+ exports.checkClickOutsideMenu = checkClickOutsideMenu;
23
+ //# sourceMappingURL=hooks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../src/utility/hooks.ts"],"names":[],"mappings":";;;AACA,+BAAkC;AAQ3B,IACL,qBAAqB,GAAG,UAAC,EAAyD;QAAvD,OAAO,aAAA,EAAE,SAAS,eAAA,EAAE,SAAS,eAAA;IACtD,IAAA,iBAAS,EAAC;QACR,IAAM,kBAAkB,GAAG,UAAC,KAAkB;YAC5C,IAAM,4BAA4B,GAAG,CACnC,OAAO,CAAC,OAAO;gBACb,CAAC,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC;gBACvC,CAAC,SAAS,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAC5C,CAAC;YAEF,IAAI,4BAA4B,EAAE;gBAChC,SAAS,CAAC,KAAK,CAAC,CAAC;aAClB;QACH,CAAC,CAAC;QAEF,QAAQ,CAAC,gBAAgB,CAAC,WAAW,EAAE,kBAAkB,CAAC,CAAC;QAE3D,OAAO;YACL,QAAQ,CAAC,mBAAmB,CAAC,WAAW,EAAE,kBAAkB,CAAC,CAAC;QAChE,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC;AAC3B,CAAC,CAAC;AApBF,QAAA,qBAAqB,yBAoBnB"}
@@ -8,3 +8,4 @@ export * from "./strings";
8
8
  export * from "./mql";
9
9
  export * from "./validation";
10
10
  export * from "./words";
11
+ export * from "./hooks";
package/utility/index.js CHANGED
@@ -20,4 +20,5 @@ __exportStar(require("./strings"), exports);
20
20
  __exportStar(require("./mql"), exports);
21
21
  __exportStar(require("./validation"), exports);
22
22
  __exportStar(require("./words"), exports);
23
+ __exportStar(require("./hooks"), exports);
23
24
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utility/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA2B;AAC3B,yCAAuB;AACvB,8CAA4B;AAC5B,4CAA0B;AAC1B,4CAA0B;AAC1B,2CAAyB;AACzB,4CAA0B;AAC1B,wCAAsB;AACtB,+CAA6B;AAC7B,0CAAwB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utility/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA2B;AAC3B,yCAAuB;AACvB,8CAA4B;AAC5B,4CAA0B;AAC1B,4CAA0B;AAC1B,2CAAyB;AACzB,4CAA0B;AAC1B,wCAAsB;AACtB,+CAA6B;AAC7B,0CAAwB;AACxB,0CAAwB"}