@sydsoft/base 1.51.0 → 1.52.0

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.
Files changed (111) hide show
  1. package/_dist/esm/_lib/baseFunctions.js +97 -0
  2. package/_dist/{_lib → esm/_lib}/inputMask.js +70 -71
  3. package/_dist/{_lib → esm/_lib}/listFunctions.js +14 -18
  4. package/_dist/esm/_lib/storage/cookies.js +34 -0
  5. package/_dist/esm/_lib/storage/encData.js +43 -0
  6. package/_dist/esm/_lib/storage/localStorage.js +69 -0
  7. package/_dist/esm/_lib/storage/sessionStorage.js +69 -0
  8. package/_dist/{_lib → esm/_lib}/useInterval.js +7 -10
  9. package/_dist/esm/alert/index.js +107 -0
  10. package/_dist/esm/box/Box.js +15 -0
  11. package/_dist/esm/box/BoxContent.js +7 -0
  12. package/_dist/esm/box/BoxFooter.js +8 -0
  13. package/_dist/esm/box/BoxHeader.js +9 -0
  14. package/_dist/esm/box/index.js +9 -0
  15. package/_dist/esm/countDown/index.js +97 -0
  16. package/_dist/{dateTime → esm/dateTime}/index.js +31 -28
  17. package/_dist/esm/form/Button.js +76 -0
  18. package/_dist/esm/form/Checkbox.js +23 -0
  19. package/_dist/esm/form/Dialog.js +40 -0
  20. package/_dist/esm/form/Form.js +12 -0
  21. package/_dist/esm/form/FormOlustur.js +52 -0
  22. package/_dist/esm/form/Input.js +196 -0
  23. package/_dist/esm/form/Label.js +9 -0
  24. package/_dist/esm/form/SearchableInput.js +272 -0
  25. package/_dist/esm/form/UploadBase.js +86 -0
  26. package/_dist/esm/form/index.js +9 -0
  27. package/_dist/esm/grid/index.js +97 -0
  28. package/_dist/esm/icon/icons.js +23 -0
  29. package/_dist/esm/icon/index.js +26 -0
  30. package/_dist/esm/icon/mui.js +1 -0
  31. package/_dist/esm/index.js +19 -0
  32. package/_dist/esm/menu/index.js +52 -0
  33. package/_dist/esm/modal/index.js +66 -0
  34. package/_dist/{popover → esm/popover}/index.js +119 -123
  35. package/_dist/esm/tooltip/index.js +119 -0
  36. package/package.json +8 -7
  37. package/_dist/_lib/baseFunctions.js +0 -97
  38. package/_dist/_lib/storage/cookies.js +0 -41
  39. package/_dist/_lib/storage/encData.js +0 -46
  40. package/_dist/_lib/storage/localStorage.js +0 -78
  41. package/_dist/_lib/storage/sessionStorage.js +0 -78
  42. package/_dist/alert/index.js +0 -114
  43. package/_dist/box/Box.js +0 -18
  44. package/_dist/box/BoxContent.js +0 -10
  45. package/_dist/box/BoxFooter.js +0 -14
  46. package/_dist/box/BoxHeader.js +0 -14
  47. package/_dist/box/index.js +0 -12
  48. package/_dist/countDown/index.js +0 -97
  49. package/_dist/form/Button.js +0 -86
  50. package/_dist/form/Checkbox.js +0 -27
  51. package/_dist/form/Dialog.js +0 -57
  52. package/_dist/form/Form.js +0 -13
  53. package/_dist/form/FormOlustur.js +0 -54
  54. package/_dist/form/Input.js +0 -202
  55. package/_dist/form/Label.js +0 -11
  56. package/_dist/form/SearchableInput.js +0 -264
  57. package/_dist/form/UploadBase.js +0 -89
  58. package/_dist/form/index.js +0 -12
  59. package/_dist/grid/index.js +0 -104
  60. package/_dist/icon/icons.js +0 -26
  61. package/_dist/icon/index.js +0 -38
  62. package/_dist/icon/mui.js +0 -2
  63. package/_dist/index.js +0 -22
  64. package/_dist/menu/index.js +0 -54
  65. package/_dist/modal/index.js +0 -68
  66. package/_dist/tooltip/index.js +0 -206
  67. /package/_dist/{_lib → esm/_lib}/baseFunctions.d.ts +0 -0
  68. /package/_dist/{_lib → esm/_lib}/inputMask.d.ts +0 -0
  69. /package/_dist/{_lib → esm/_lib}/listFunctions.d.ts +0 -0
  70. /package/_dist/{_lib → esm/_lib}/storage/cookies.d.ts +0 -0
  71. /package/_dist/{_lib → esm/_lib}/storage/encData.d.ts +0 -0
  72. /package/_dist/{_lib → esm/_lib}/storage/localStorage.d.ts +0 -0
  73. /package/_dist/{_lib → esm/_lib}/storage/sessionStorage.d.ts +0 -0
  74. /package/_dist/{_lib → esm/_lib}/useInterval.d.ts +0 -0
  75. /package/_dist/{alert → esm/alert}/index.d.ts +0 -0
  76. /package/_dist/{alert → esm/alert}/index.module.css +0 -0
  77. /package/_dist/{box → esm/box}/Box.d.ts +0 -0
  78. /package/_dist/{box → esm/box}/Box.module.css +0 -0
  79. /package/_dist/{box → esm/box}/BoxContent.d.ts +0 -0
  80. /package/_dist/{box → esm/box}/BoxFooter.d.ts +0 -0
  81. /package/_dist/{box → esm/box}/BoxHeader.d.ts +0 -0
  82. /package/_dist/{box → esm/box}/index.d.ts +0 -0
  83. /package/_dist/{countDown → esm/countDown}/index.d.ts +0 -0
  84. /package/_dist/{dateTime → esm/dateTime}/index.d.ts +0 -0
  85. /package/_dist/{form → esm/form}/Button.d.ts +0 -0
  86. /package/_dist/{form → esm/form}/Checkbox.d.ts +0 -0
  87. /package/_dist/{form → esm/form}/Dialog.d.ts +0 -0
  88. /package/_dist/{form → esm/form}/Form.d.ts +0 -0
  89. /package/_dist/{form → esm/form}/FormOlustur.d.ts +0 -0
  90. /package/_dist/{form → esm/form}/Input.d.ts +0 -0
  91. /package/_dist/{form → esm/form}/Label.d.ts +0 -0
  92. /package/_dist/{form → esm/form}/SearchableInput.d.ts +0 -0
  93. /package/_dist/{form → esm/form}/UploadBase.d.ts +0 -0
  94. /package/_dist/{form → esm/form}/index.d.ts +0 -0
  95. /package/_dist/{form → esm/form}/styles/Button.module.css +0 -0
  96. /package/_dist/{form → esm/form}/styles/Input.module.css +0 -0
  97. /package/_dist/{form → esm/form}/styles/Label.module.css +0 -0
  98. /package/_dist/{form → esm/form}/styles/SearchableInput.module.css +0 -0
  99. /package/_dist/{grid → esm/grid}/index.d.ts +0 -0
  100. /package/_dist/{grid → esm/grid}/index.module.css +0 -0
  101. /package/_dist/{icon → esm/icon}/icons.d.ts +0 -0
  102. /package/_dist/{icon → esm/icon}/index.d.ts +0 -0
  103. /package/_dist/{icon → esm/icon}/mui.d.ts +0 -0
  104. /package/_dist/{index.d.ts → esm/index.d.ts} +0 -0
  105. /package/_dist/{menu → esm/menu}/index.d.ts +0 -0
  106. /package/_dist/{menu → esm/menu}/index.module.css +0 -0
  107. /package/_dist/{modal → esm/modal}/index.d.ts +0 -0
  108. /package/_dist/{modal → esm/modal}/index.module.css +0 -0
  109. /package/_dist/{popover → esm/popover}/index.d.ts +0 -0
  110. /package/_dist/{popover → esm/popover}/index.module.css +0 -0
  111. /package/_dist/{tooltip → esm/tooltip}/index.d.ts +0 -0
@@ -1,68 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Modal = void 0;
4
- const tslib_1 = require("tslib");
5
- const jsx_runtime_1 = require("react/jsx-runtime");
6
- /**
7
- * Copyright (c) 2023
8
- * @author: izzetseydaoglu
9
- * @last-modified: 9.02.2024 06:07
10
- */
11
- const react_1 = require("react");
12
- const react_dom_1 = tslib_1.__importDefault(require("react-dom"));
13
- const index_module_css_1 = tslib_1.__importDefault(require("./index.module.css"));
14
- exports.Modal = (0, react_1.memo)(function MemoFunction({ refModal = null, children, open = false, close, keepMounted = false, fullScreen = false, hideBackdrop = true, hideEsc = false, hideCloseButton = false, modalStyle, backdropStyle, vertialAlign = "center", horizontalAlign = "center" }) {
15
- const [modalDiv, setModalDiv] = (0, react_1.useState)(null);
16
- const ref = (0, react_1.useRef)(null);
17
- (0, react_1.useEffect)(() => {
18
- if (refModal)
19
- refModal.current = ref.current;
20
- }, [ref.current]);
21
- const onClose = () => {
22
- if (close)
23
- close();
24
- };
25
- const checkHideBackDrop = (e) => {
26
- if (open && ref.current && !ref.current.contains(e.target))
27
- onClose();
28
- };
29
- const checkESC = (e) => {
30
- if (e.keyCode === 27 || e.key === "Escape" || e.code === "Escape")
31
- onClose();
32
- };
33
- (0, react_1.useEffect)(() => {
34
- if (open) {
35
- if (hideBackdrop)
36
- window.addEventListener("mousedown", checkHideBackDrop);
37
- if (hideEsc)
38
- window.addEventListener("keydown", checkESC);
39
- }
40
- return () => {
41
- if (hideBackdrop)
42
- window.removeEventListener("mousedown", checkHideBackDrop);
43
- if (hideEsc)
44
- window.removeEventListener("keydown", checkESC);
45
- };
46
- });
47
- (0, react_1.useEffect)(() => {
48
- if (!modalDiv) {
49
- const modalDivCheck = document.getElementById("smodal");
50
- if (modalDivCheck) {
51
- setModalDiv(modalDivCheck);
52
- }
53
- else {
54
- const div = document.createElement("div");
55
- div.setAttribute("id", "smodal");
56
- document.body.appendChild(div);
57
- setModalDiv(div);
58
- }
59
- }
60
- return () => {
61
- onClose();
62
- };
63
- }, []);
64
- if ((!keepMounted && !open) || typeof window === "undefined")
65
- return null;
66
- const Component = ((0, jsx_runtime_1.jsx)("div", { className: `${index_module_css_1.default.backdrop} ${open ? index_module_css_1.default.backdrop_open : ""}`, style: { alignItems: vertialAlign, justifyContent: horizontalAlign, ...backdropStyle }, children: (0, jsx_runtime_1.jsxs)("div", { ref: ref, className: `smodal ${index_module_css_1.default.modal} ${fullScreen ? index_module_css_1.default.fullscreen : ""}`, style: modalStyle, children: [!hideCloseButton && ((0, jsx_runtime_1.jsx)("div", { className: `close ${index_module_css_1.default.close_fixed}`, children: (0, jsx_runtime_1.jsx)("div", { className: index_module_css_1.default.close, onClick: onClose, children: "\u2715" }) })), children] }) }));
67
- return modalDiv ? react_dom_1.default.createPortal(Component, modalDiv) : null;
68
- });
@@ -1,206 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Tooltip = void 0;
4
- const tslib_1 = require("tslib");
5
- const react_1 = tslib_1.__importStar(require("react"));
6
- exports.Tooltip = (0, react_1.memo)(function MemoFunction({ children, title, position = "top", arrow = false, distance = 5, ...other }) {
7
- (0, react_1.useEffect)(() => {
8
- if (typeof window === "undefined")
9
- return null;
10
- const cssCheck = document.getElementsByClassName("stooltip_css")[0];
11
- if (!cssCheck) {
12
- const head = document.getElementsByTagName('head')[0];
13
- const s = document.createElement('style');
14
- s.setAttribute('type', 'text/css');
15
- s.classList.add("stooltip_css");
16
- s.appendChild(document.createTextNode(tooltipCss));
17
- head.appendChild(s);
18
- }
19
- return () => tooltipSil();
20
- }, []);
21
- const tooltipEkle = (e) => {
22
- tooltipSil();
23
- const tooltip = document.createElement("div");
24
- tooltip.innerHTML = title;
25
- tooltip.classList.add("stooltip");
26
- document.body.appendChild(tooltip);
27
- tooltipPosition({ target: e.currentTarget, position: position });
28
- };
29
- const tooltipSil = () => {
30
- const check = document.body.getElementsByClassName("stooltip")[0];
31
- if (check)
32
- check.remove();
33
- };
34
- const tooltipPosition = ({ target, position }) => {
35
- const tooltip = document.body.getElementsByClassName("stooltip")[0];
36
- if (tooltip) {
37
- const arrowMargin = (arrow) ? 5 : 0;
38
- const margin = distance + arrowMargin;
39
- if (arrow)
40
- tooltip.classList.add("arrow");
41
- const targetPosition = target.getBoundingClientRect();
42
- const tooltipPosition = tooltip.getBoundingClientRect();
43
- const style = [];
44
- if (position === "top" || position === "bottom") {
45
- if (position === "top") {
46
- if ((targetPosition.top - tooltipPosition.height - margin) < 0) {
47
- style.push("top:" + (targetPosition.bottom + margin) + "px");
48
- tooltip.classList.add("bottom");
49
- }
50
- else {
51
- style.push("top:" + (targetPosition.top - tooltipPosition.height - margin) + "px");
52
- tooltip.classList.add("top");
53
- }
54
- }
55
- if (position === "bottom") {
56
- if ((targetPosition.bottom + tooltipPosition.height + margin) > window.innerHeight) {
57
- style.push("top:" + (targetPosition.top - tooltipPosition.height - margin) + "px");
58
- tooltip.classList.add("top");
59
- }
60
- else {
61
- style.push("top:" + (targetPosition.bottom + margin) + "px");
62
- tooltip.classList.add("bottom");
63
- }
64
- }
65
- // if ((targetPosition.left - tooltipPosition.width) < 0) {
66
- if ((targetPosition.left + (targetPosition.width / 2) - (tooltipPosition.width / 2)) < 0) {
67
- style.push("left:2px");
68
- tooltip.classList.add("start");
69
- }
70
- else if ((targetPosition.left + (targetPosition.width / 2) + tooltipPosition.width) > window.innerWidth) {
71
- style.push("right:2px");
72
- tooltip.classList.add("end");
73
- }
74
- else {
75
- style.push("left:" + (targetPosition.left + (targetPosition.width / 2)) + "px");
76
- style.push("transform:translate(-50%,0)");
77
- tooltip.classList.add("center");
78
- }
79
- }
80
- if (position === "left" || position === "right") {
81
- if (position === "left") {
82
- if ((targetPosition.left - tooltipPosition.width - margin) < 0) {
83
- style.push("left:" + (targetPosition.right + margin) + "px");
84
- tooltip.classList.add("right");
85
- }
86
- else {
87
- style.push("left:" + (targetPosition.left - tooltipPosition.width - margin) + "px");
88
- tooltip.classList.add("left");
89
- }
90
- }
91
- if (position === "right") {
92
- if ((targetPosition.left + (targetPosition.width / 2) + tooltipPosition.width + margin) > window.innerWidth) {
93
- style.push("left:" + (targetPosition.left - tooltipPosition.width - margin) + "px");
94
- tooltip.classList.add("left");
95
- }
96
- else {
97
- style.push("left:" + (targetPosition.right + margin) + "px");
98
- tooltip.classList.add("right");
99
- }
100
- }
101
- if ((targetPosition.top + (targetPosition.height / 2) - (tooltipPosition.height / 2)) < 0) {
102
- style.push("top:2px");
103
- tooltip.classList.add("start");
104
- }
105
- else if ((targetPosition.top + (targetPosition.height / 2) + (tooltipPosition.height / 2)) > window.innerHeight) {
106
- style.push("bottom:2px");
107
- tooltip.classList.add("end");
108
- }
109
- else {
110
- style.push("top:" + (targetPosition.top + (targetPosition.height / 2)) + "px");
111
- style.push("transform:translate(0,-50%)");
112
- tooltip.classList.add("center");
113
- }
114
- }
115
- tooltip.setAttribute("style", style.join(";"));
116
- }
117
- };
118
- return react_1.default.cloneElement(children, {
119
- onMouseEnter: tooltipEkle,
120
- onMouseLeave: tooltipSil,
121
- onMouseDown: tooltipSil,
122
- ...other
123
- });
124
- });
125
- const tooltipCss = `
126
- .stooltip {
127
- position: fixed;
128
- display: flex;
129
- align-items: center;
130
- justify-content: center;
131
- background-color: #1a1a1a;
132
- color: rgba(255,255,255,0.9);
133
- text-align: center;
134
- font-size: 0.9rem;
135
- font-weight:400;
136
- padding: 5px 10px;
137
- border-radius: 8px;
138
- z-index: 1000000;
139
- opacity: 0.9;
140
- pointer-events: none;
141
- /*transition: all 0.1s;*/
142
- white-space:pre-line;
143
- max-width: 300px;
144
- animation: stooltip_fadein 0.7s;
145
- }
146
-
147
- .stooltip.arrow:after {
148
- content: "";
149
- position: absolute;
150
- margin-left: -5px;
151
- border-width: 5px;
152
- border-style: solid;
153
- }
154
-
155
- .stooltip.arrow.top:after {
156
- top: 100%;
157
- border-color: #1a1a1a transparent transparent transparent;
158
- }
159
-
160
- .stooltip.arrow.top.start:after { left: 15px;}
161
-
162
- .stooltip.arrow.top.center:after { left: 50%;}
163
-
164
- .stooltip.arrow.top.end:after { right: 15px;}
165
-
166
-
167
- .stooltip.arrow.bottom:after {
168
- bottom: 100%;
169
- border-color: transparent transparent #1a1a1a transparent;
170
- }
171
-
172
- .stooltip.arrow.bottom.start:after { left: 15px;}
173
-
174
- .stooltip.arrow.bottom.center:after { left: 50%;}
175
-
176
- .stooltip.bottom.end:after { right: 15px;}
177
-
178
- .stooltip.arrow.left:after {
179
- margin-left: -1px;
180
- left: 100%;
181
- border-color: transparent transparent transparent #1a1a1a;
182
- }
183
-
184
- .stooltip.arrow.left.start:after { top: 5px;}
185
-
186
- .stooltip.arrow.left.center:after { top: 50%; margin-top: -5px;}
187
-
188
- .stooltip.arrow.left.end:after { bottom: 15px;}
189
-
190
- .stooltip.arrow.right:after {
191
- margin-right: -1px;
192
- right: 100%;
193
- border-color: transparent #1a1a1a transparent transparent;
194
- }
195
-
196
- .stooltip.arrow.right.start:after { top: 5px;}
197
-
198
- .stooltip.arrow.right.center:after { top: 50%; margin-top: -5px;}
199
-
200
- .stooltip.arrow.right.end:after { bottom: 15px;}
201
-
202
- @keyframes stooltip_fadein {
203
- from { opacity: 0; }
204
- to { opacity: 0.85; }
205
- }
206
- `;
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes