@sydsoft/base 1.47.0 → 1.49.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.
- package/README.md +8 -1
- package/{dist/esm → _dist}/_lib/baseFunctions.d.ts +0 -1
- package/{dist/esm → _dist}/_lib/baseFunctions.js +25 -38
- package/{dist/esm → _dist}/_lib/inputMask.js +66 -69
- package/{dist/esm → _dist}/_lib/listFunctions.js +12 -13
- package/_dist/_lib/storage/cookies.d.ts +4 -0
- package/_dist/_lib/storage/cookies.js +33 -0
- package/_dist/_lib/storage/encData.js +41 -0
- package/{dist/esm → _dist}/_lib/storage/localStorage.js +10 -10
- package/{dist/esm → _dist}/_lib/storage/sessionStorage.js +10 -10
- package/{dist/esm → _dist}/_lib/useInterval.js +5 -5
- package/{dist/esm → _dist}/alert/index.js +28 -30
- package/_dist/box/Box.js +14 -0
- package/_dist/box/BoxContent.js +5 -0
- package/_dist/box/BoxFooter.js +10 -0
- package/_dist/box/BoxHeader.js +10 -0
- package/_dist/countDown/index.js +92 -0
- package/{dist/esm → _dist}/dateTime/index.js +25 -31
- package/_dist/form/Button.js +82 -0
- package/_dist/form/Checkbox.js +22 -0
- package/_dist/form/Dialog.js +53 -0
- package/_dist/form/Form.js +10 -0
- package/_dist/form/FormOlustur.js +50 -0
- package/{dist/esm → _dist}/form/Input.js +57 -56
- package/_dist/form/Label.js +7 -0
- package/{dist/esm → _dist}/form/SearchableInput.d.ts +0 -1
- package/_dist/form/SearchableInput.js +260 -0
- package/_dist/form/UploadBase.js +84 -0
- package/_dist/grid/index.js +96 -0
- package/{dist/esm → _dist}/icon/icons.js +1 -1
- package/{dist/esm → _dist}/icon/index.d.ts +1 -1
- package/_dist/icon/index.js +34 -0
- package/_dist/menu/index.js +50 -0
- package/_dist/modal/index.js +64 -0
- package/{dist/esm → _dist}/popover/index.js +100 -100
- package/_dist/tooltip/index.js +202 -0
- package/_lib/baseFunctions.ts +94 -0
- package/_lib/inputMask.ts +257 -0
- package/_lib/listFunctions.ts +106 -0
- package/_lib/storage/cookies.ts +39 -0
- package/_lib/storage/encData.ts +41 -0
- package/_lib/storage/localStorage.ts +67 -0
- package/_lib/storage/sessionStorage.ts +67 -0
- package/_lib/useInterval.ts +30 -0
- package/alert/index.module.css +119 -0
- package/alert/index.tsx +131 -0
- package/box/Box.module.css +153 -0
- package/box/Box.tsx +33 -0
- package/box/BoxContent.tsx +18 -0
- package/box/BoxFooter.tsx +25 -0
- package/box/BoxHeader.tsx +46 -0
- package/box/index.ts +10 -0
- package/countDown/index.tsx +116 -0
- package/dateTime/index.ts +79 -0
- package/form/Button.tsx +143 -0
- package/form/Checkbox.tsx +48 -0
- package/form/Dialog.tsx +109 -0
- package/form/Form.tsx +19 -0
- package/form/FormOlustur.tsx +105 -0
- package/form/Input.tsx +364 -0
- package/form/Label.tsx +20 -0
- package/form/SearchableInput.tsx +406 -0
- package/form/UploadBase.tsx +133 -0
- package/form/index.ts +10 -0
- package/form/styles/Button.module.css +145 -0
- package/form/styles/Input.module.css +221 -0
- package/form/styles/Label.module.css +31 -0
- package/form/styles/SearchableInput.module.css +80 -0
- package/global.d.ts +9 -0
- package/grid/index.module.css +805 -0
- package/grid/index.tsx +171 -0
- package/icon/icons.tsx +33 -0
- package/icon/index.tsx +95 -0
- package/icon/mui.tsx +5932 -0
- package/index.ts +21 -0
- package/menu/index.module.css +92 -0
- package/menu/index.tsx +143 -0
- package/modal/index.module.css +77 -0
- package/modal/index.tsx +106 -0
- package/npm_recovery_codes.txt +5 -0
- package/package.json +18 -11
- package/popover/index.module.css +89 -0
- package/popover/index.tsx +392 -0
- package/tooltip/index.tsx +216 -0
- package/tsconfig.json +24 -0
- package/dist/esm/_lib/storage/cookies.d.ts +0 -4
- package/dist/esm/_lib/storage/cookies.js +0 -34
- package/dist/esm/_lib/storage/encData.js +0 -43
- package/dist/esm/box/Box.js +0 -15
- package/dist/esm/box/BoxContent.js +0 -7
- package/dist/esm/box/BoxFooter.js +0 -8
- package/dist/esm/box/BoxHeader.js +0 -9
- package/dist/esm/countDown/index.js +0 -97
- package/dist/esm/form/Button.js +0 -76
- package/dist/esm/form/Checkbox.js +0 -23
- package/dist/esm/form/Dialog.js +0 -40
- package/dist/esm/form/Form.js +0 -12
- package/dist/esm/form/FormOlustur.js +0 -52
- package/dist/esm/form/Label.js +0 -9
- package/dist/esm/form/SearchableInput.js +0 -272
- package/dist/esm/form/UploadBase.js +0 -86
- package/dist/esm/grid/index.js +0 -97
- package/dist/esm/icon/index.js +0 -26
- package/dist/esm/menu/index.js +0 -52
- package/dist/esm/modal/index.js +0 -66
- package/dist/esm/tooltip/index.js +0 -119
- /package/{dist/esm → _dist}/_lib/inputMask.d.ts +0 -0
- /package/{dist/esm → _dist}/_lib/listFunctions.d.ts +0 -0
- /package/{dist/esm → _dist}/_lib/storage/encData.d.ts +0 -0
- /package/{dist/esm → _dist}/_lib/storage/localStorage.d.ts +0 -0
- /package/{dist/esm → _dist}/_lib/storage/sessionStorage.d.ts +0 -0
- /package/{dist/esm → _dist}/_lib/useInterval.d.ts +0 -0
- /package/{dist/esm → _dist}/alert/index.d.ts +0 -0
- /package/{dist/esm → _dist}/alert/index.module.css +0 -0
- /package/{dist/esm → _dist}/box/Box.d.ts +0 -0
- /package/{dist/esm → _dist}/box/Box.module.css +0 -0
- /package/{dist/esm → _dist}/box/BoxContent.d.ts +0 -0
- /package/{dist/esm → _dist}/box/BoxFooter.d.ts +0 -0
- /package/{dist/esm → _dist}/box/BoxHeader.d.ts +0 -0
- /package/{dist/esm → _dist}/box/index.d.ts +0 -0
- /package/{dist/esm → _dist}/box/index.js +0 -0
- /package/{dist/esm → _dist}/countDown/index.d.ts +0 -0
- /package/{dist/esm → _dist}/dateTime/index.d.ts +0 -0
- /package/{dist/esm → _dist}/form/Button.d.ts +0 -0
- /package/{dist/esm → _dist}/form/Checkbox.d.ts +0 -0
- /package/{dist/esm → _dist}/form/Dialog.d.ts +0 -0
- /package/{dist/esm → _dist}/form/Form.d.ts +0 -0
- /package/{dist/esm → _dist}/form/FormOlustur.d.ts +0 -0
- /package/{dist/esm → _dist}/form/Input.d.ts +0 -0
- /package/{dist/esm → _dist}/form/Label.d.ts +0 -0
- /package/{dist/esm → _dist}/form/UploadBase.d.ts +0 -0
- /package/{dist/esm → _dist}/form/index.d.ts +0 -0
- /package/{dist/esm → _dist}/form/index.js +0 -0
- /package/{dist/esm → _dist}/form/styles/Button.module.css +0 -0
- /package/{dist/esm → _dist}/form/styles/Input.module.css +0 -0
- /package/{dist/esm → _dist}/form/styles/Label.module.css +0 -0
- /package/{dist/esm → _dist}/form/styles/SearchableInput.module.css +0 -0
- /package/{dist/esm → _dist}/grid/index.d.ts +0 -0
- /package/{dist/esm → _dist}/grid/index.module.css +0 -0
- /package/{dist/esm → _dist}/icon/icons.d.ts +0 -0
- /package/{dist/esm → _dist}/icon/mui.d.ts +0 -0
- /package/{dist/esm → _dist}/icon/mui.js +0 -0
- /package/{dist/esm → _dist}/index.d.ts +0 -0
- /package/{dist/esm → _dist}/index.js +0 -0
- /package/{dist/esm → _dist}/menu/index.d.ts +0 -0
- /package/{dist/esm → _dist}/menu/index.module.css +0 -0
- /package/{dist/esm → _dist}/modal/index.d.ts +0 -0
- /package/{dist/esm → _dist}/modal/index.module.css +0 -0
- /package/{dist/esm → _dist}/popover/index.d.ts +0 -0
- /package/{dist/esm → _dist}/popover/index.module.css +0 -0
- /package/{dist/esm → _dist}/tooltip/index.d.ts +0 -0
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
import { __assign, __rest } from "tslib";
|
|
2
|
-
import React, { memo, useEffect } from "react";
|
|
3
|
-
export var Tooltip = memo(function MemoFunction(_a) {
|
|
4
|
-
var children = _a.children, title = _a.title, _b = _a.position, position = _b === void 0 ? "top" : _b, _c = _a.arrow, arrow = _c === void 0 ? false : _c, _d = _a.distance, distance = _d === void 0 ? 5 : _d, other = __rest(_a, ["children", "title", "position", "arrow", "distance"]);
|
|
5
|
-
useEffect(function () {
|
|
6
|
-
if (typeof window === "undefined")
|
|
7
|
-
return null;
|
|
8
|
-
var cssCheck = document.getElementsByClassName("stooltip_css")[0];
|
|
9
|
-
if (!cssCheck) {
|
|
10
|
-
var head = document.getElementsByTagName('head')[0];
|
|
11
|
-
var s = document.createElement('style');
|
|
12
|
-
s.setAttribute('type', 'text/css');
|
|
13
|
-
s.classList.add("stooltip_css");
|
|
14
|
-
s.appendChild(document.createTextNode(tooltipCss));
|
|
15
|
-
head.appendChild(s);
|
|
16
|
-
}
|
|
17
|
-
return function () { return tooltipSil(); };
|
|
18
|
-
}, []);
|
|
19
|
-
var tooltipEkle = function (e) {
|
|
20
|
-
tooltipSil();
|
|
21
|
-
var tooltip = document.createElement("div");
|
|
22
|
-
tooltip.innerHTML = title;
|
|
23
|
-
tooltip.classList.add("stooltip");
|
|
24
|
-
document.body.appendChild(tooltip);
|
|
25
|
-
tooltipPosition({ target: e.currentTarget, position: position });
|
|
26
|
-
};
|
|
27
|
-
var tooltipSil = function () {
|
|
28
|
-
var check = document.body.getElementsByClassName("stooltip")[0];
|
|
29
|
-
if (check)
|
|
30
|
-
check.remove();
|
|
31
|
-
};
|
|
32
|
-
var tooltipPosition = function (_a) {
|
|
33
|
-
var target = _a.target, position = _a.position;
|
|
34
|
-
var tooltip = document.body.getElementsByClassName("stooltip")[0];
|
|
35
|
-
if (tooltip) {
|
|
36
|
-
var arrowMargin = (arrow) ? 5 : 0;
|
|
37
|
-
var margin = distance + arrowMargin;
|
|
38
|
-
if (arrow)
|
|
39
|
-
tooltip.classList.add("arrow");
|
|
40
|
-
var targetPosition = target.getBoundingClientRect();
|
|
41
|
-
var tooltipPosition_1 = tooltip.getBoundingClientRect();
|
|
42
|
-
var style = [];
|
|
43
|
-
if (position === "top" || position === "bottom") {
|
|
44
|
-
if (position === "top") {
|
|
45
|
-
if ((targetPosition.top - tooltipPosition_1.height - margin) < 0) {
|
|
46
|
-
style.push("top:" + (targetPosition.bottom + margin) + "px");
|
|
47
|
-
tooltip.classList.add("bottom");
|
|
48
|
-
}
|
|
49
|
-
else {
|
|
50
|
-
style.push("top:" + (targetPosition.top - tooltipPosition_1.height - margin) + "px");
|
|
51
|
-
tooltip.classList.add("top");
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
if (position === "bottom") {
|
|
55
|
-
if ((targetPosition.bottom + tooltipPosition_1.height + margin) > window.innerHeight) {
|
|
56
|
-
style.push("top:" + (targetPosition.top - tooltipPosition_1.height - margin) + "px");
|
|
57
|
-
tooltip.classList.add("top");
|
|
58
|
-
}
|
|
59
|
-
else {
|
|
60
|
-
style.push("top:" + (targetPosition.bottom + margin) + "px");
|
|
61
|
-
tooltip.classList.add("bottom");
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
// if ((targetPosition.left - tooltipPosition.width) < 0) {
|
|
65
|
-
if ((targetPosition.left + (targetPosition.width / 2) - (tooltipPosition_1.width / 2)) < 0) {
|
|
66
|
-
style.push("left:2px");
|
|
67
|
-
tooltip.classList.add("start");
|
|
68
|
-
}
|
|
69
|
-
else if ((targetPosition.left + (targetPosition.width / 2) + tooltipPosition_1.width) > window.innerWidth) {
|
|
70
|
-
style.push("right:2px");
|
|
71
|
-
tooltip.classList.add("end");
|
|
72
|
-
}
|
|
73
|
-
else {
|
|
74
|
-
style.push("left:" + (targetPosition.left + (targetPosition.width / 2)) + "px");
|
|
75
|
-
style.push("transform:translate(-50%,0)");
|
|
76
|
-
tooltip.classList.add("center");
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
if (position === "left" || position === "right") {
|
|
80
|
-
if (position === "left") {
|
|
81
|
-
if ((targetPosition.left - tooltipPosition_1.width - margin) < 0) {
|
|
82
|
-
style.push("left:" + (targetPosition.right + margin) + "px");
|
|
83
|
-
tooltip.classList.add("right");
|
|
84
|
-
}
|
|
85
|
-
else {
|
|
86
|
-
style.push("left:" + (targetPosition.left - tooltipPosition_1.width - margin) + "px");
|
|
87
|
-
tooltip.classList.add("left");
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
if (position === "right") {
|
|
91
|
-
if ((targetPosition.left + (targetPosition.width / 2) + tooltipPosition_1.width + margin) > window.innerWidth) {
|
|
92
|
-
style.push("left:" + (targetPosition.left - tooltipPosition_1.width - margin) + "px");
|
|
93
|
-
tooltip.classList.add("left");
|
|
94
|
-
}
|
|
95
|
-
else {
|
|
96
|
-
style.push("left:" + (targetPosition.right + margin) + "px");
|
|
97
|
-
tooltip.classList.add("right");
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
if ((targetPosition.top + (targetPosition.height / 2) - (tooltipPosition_1.height / 2)) < 0) {
|
|
101
|
-
style.push("top:2px");
|
|
102
|
-
tooltip.classList.add("start");
|
|
103
|
-
}
|
|
104
|
-
else if ((targetPosition.top + (targetPosition.height / 2) + (tooltipPosition_1.height / 2)) > window.innerHeight) {
|
|
105
|
-
style.push("bottom:2px");
|
|
106
|
-
tooltip.classList.add("end");
|
|
107
|
-
}
|
|
108
|
-
else {
|
|
109
|
-
style.push("top:" + (targetPosition.top + (targetPosition.height / 2)) + "px");
|
|
110
|
-
style.push("transform:translate(0,-50%)");
|
|
111
|
-
tooltip.classList.add("center");
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
tooltip.setAttribute("style", style.join(";"));
|
|
115
|
-
}
|
|
116
|
-
};
|
|
117
|
-
return React.cloneElement(children, __assign({ onMouseEnter: tooltipEkle, onMouseLeave: tooltipSil, onMouseDown: tooltipSil }, other));
|
|
118
|
-
});
|
|
119
|
-
var tooltipCss = "\n.stooltip {\n position: fixed;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: #1a1a1a;\n color: rgba(255,255,255,0.9);\n text-align: center;\n font-size: 0.9rem;\n font-weight:400;\n padding: 5px 10px;\n border-radius: 8px;\n z-index: 1000000;\n opacity: 0.9;\n pointer-events: none;\n /*transition: all 0.1s;*/\n white-space:pre-line;\n max-width: 300px;\n animation: stooltip_fadein 0.7s;\n}\n\n.stooltip.arrow:after {\n content: \"\";\n position: absolute;\n margin-left: -5px;\n border-width: 5px;\n border-style: solid;\n}\n\n.stooltip.arrow.top:after {\n top: 100%;\n border-color: #1a1a1a transparent transparent transparent;\n}\n\n.stooltip.arrow.top.start:after { left: 15px;}\n\n.stooltip.arrow.top.center:after { left: 50%;}\n\n.stooltip.arrow.top.end:after { right: 15px;}\n\n\n.stooltip.arrow.bottom:after {\n bottom: 100%;\n border-color: transparent transparent #1a1a1a transparent;\n}\n\n.stooltip.arrow.bottom.start:after { left: 15px;}\n\n.stooltip.arrow.bottom.center:after { left: 50%;}\n\n.stooltip.bottom.end:after { right: 15px;}\n\n.stooltip.arrow.left:after {\n margin-left: -1px;\n left: 100%;\n border-color: transparent transparent transparent #1a1a1a;\n}\n\n.stooltip.arrow.left.start:after { top: 5px;}\n\n.stooltip.arrow.left.center:after { top: 50%; margin-top: -5px;}\n\n.stooltip.arrow.left.end:after { bottom: 15px;}\n\n.stooltip.arrow.right:after {\n margin-right: -1px;\n right: 100%;\n border-color: transparent #1a1a1a transparent transparent;\n}\n\n.stooltip.arrow.right.start:after { top: 5px;}\n\n.stooltip.arrow.right.center:after { top: 50%; margin-top: -5px;}\n\n.stooltip.arrow.right.end:after { bottom: 15px;}\n\n@keyframes stooltip_fadein {\n from { opacity: 0; }\n to { opacity: 0.85; }\n}\n";
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|