@sydsoft/base 1.58.0 → 1.59.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 (81) hide show
  1. package/dist/esm/_lib/baseFunctions.d.ts +11 -0
  2. package/dist/esm/_lib/baseFunctions.js +97 -0
  3. package/dist/esm/_lib/inputMask.d.ts +7 -0
  4. package/dist/esm/_lib/inputMask.js +229 -0
  5. package/dist/esm/_lib/listFunctions.d.ts +2 -0
  6. package/dist/esm/_lib/listFunctions.js +114 -0
  7. package/dist/esm/_lib/storage/cookies.d.ts +4 -0
  8. package/dist/esm/_lib/storage/cookies.js +34 -0
  9. package/dist/esm/_lib/storage/encData.d.ts +2 -0
  10. package/dist/esm/_lib/storage/encData.js +43 -0
  11. package/dist/esm/_lib/storage/localStorage.d.ts +6 -0
  12. package/dist/esm/_lib/storage/localStorage.js +69 -0
  13. package/dist/esm/_lib/storage/sessionStorage.d.ts +6 -0
  14. package/dist/esm/_lib/storage/sessionStorage.js +69 -0
  15. package/dist/esm/_lib/useInterval.d.ts +6 -0
  16. package/dist/esm/_lib/useInterval.js +24 -0
  17. package/dist/esm/alert/index.d.ts +18 -0
  18. package/dist/esm/alert/index.js +107 -0
  19. package/dist/esm/alert/index.module.css +119 -0
  20. package/dist/esm/box/Box.d.ts +9 -0
  21. package/dist/esm/box/Box.js +15 -0
  22. package/dist/esm/box/Box.module.css +153 -0
  23. package/dist/esm/box/BoxContent.d.ts +9 -0
  24. package/dist/esm/box/BoxContent.js +7 -0
  25. package/dist/esm/box/BoxFooter.d.ts +10 -0
  26. package/dist/esm/box/BoxFooter.js +8 -0
  27. package/dist/esm/box/BoxHeader.d.ts +16 -0
  28. package/dist/esm/box/BoxHeader.js +9 -0
  29. package/dist/esm/box/index.d.ts +9 -0
  30. package/dist/esm/box/index.js +9 -0
  31. package/dist/esm/countDown/index.d.ts +22 -0
  32. package/dist/esm/countDown/index.js +97 -0
  33. package/dist/esm/dateTime/index.d.ts +12 -0
  34. package/dist/esm/dateTime/index.js +76 -0
  35. package/dist/esm/form/Button.d.ts +27 -0
  36. package/dist/esm/form/Button.js +76 -0
  37. package/dist/esm/form/Checkbox.d.ts +23 -0
  38. package/dist/esm/form/Checkbox.js +23 -0
  39. package/dist/esm/form/Dialog.d.ts +20 -0
  40. package/dist/esm/form/Dialog.js +40 -0
  41. package/dist/esm/form/Form.d.ts +10 -0
  42. package/dist/esm/form/Form.js +12 -0
  43. package/dist/esm/form/FormOlustur.d.ts +39 -0
  44. package/dist/esm/form/FormOlustur.js +52 -0
  45. package/dist/esm/form/Input.d.ts +66 -0
  46. package/dist/esm/form/Input.js +196 -0
  47. package/dist/esm/form/Label.d.ts +7 -0
  48. package/dist/esm/form/Label.js +9 -0
  49. package/dist/esm/form/SearchableInput.d.ts +37 -0
  50. package/dist/esm/form/SearchableInput.js +272 -0
  51. package/dist/esm/form/UploadBase.d.ts +25 -0
  52. package/dist/esm/form/UploadBase.js +86 -0
  53. package/dist/esm/form/index.d.ts +9 -0
  54. package/dist/esm/form/index.js +9 -0
  55. package/dist/esm/form/styles/Button.module.css +145 -0
  56. package/dist/esm/form/styles/Input.module.css +221 -0
  57. package/dist/esm/form/styles/Label.module.css +31 -0
  58. package/dist/esm/form/styles/SearchableInput.module.css +80 -0
  59. package/dist/esm/grid/index.d.ts +38 -0
  60. package/dist/esm/grid/index.js +97 -0
  61. package/dist/esm/grid/index.module.css +805 -0
  62. package/dist/esm/icon/icons.d.ts +22 -0
  63. package/dist/esm/icon/icons.js +23 -0
  64. package/dist/esm/icon/index.d.ts +34 -0
  65. package/dist/esm/icon/index.js +26 -0
  66. package/dist/esm/icon/mui.d.ts +1 -0
  67. package/dist/esm/icon/mui.js +1 -0
  68. package/dist/esm/index.d.ts +19 -0
  69. package/dist/esm/index.js +19 -0
  70. package/dist/esm/menu/index.d.ts +69 -0
  71. package/dist/esm/menu/index.js +52 -0
  72. package/dist/esm/menu/index.module.css +92 -0
  73. package/dist/esm/modal/index.d.ts +23 -0
  74. package/dist/esm/modal/index.js +66 -0
  75. package/dist/esm/modal/index.module.css +77 -0
  76. package/dist/esm/popover/index.d.ts +26 -0
  77. package/dist/esm/popover/index.js +343 -0
  78. package/dist/esm/popover/index.module.css +89 -0
  79. package/dist/esm/tooltip/index.d.ts +11 -0
  80. package/dist/esm/tooltip/index.js +119 -0
  81. package/package.json +7 -7
@@ -0,0 +1,69 @@
1
+ import { decData, encData } from "./encData";
2
+ import { isDev } from "../baseFunctions";
3
+ var storageAvailable = typeof Storage === "undefined" || !window.sessionStorage ? false : true;
4
+ export var setSessionStorage = function (key, value) {
5
+ if (!storageAvailable)
6
+ return false;
7
+ try {
8
+ sessionStorage.setItem(key, encData(value));
9
+ return true;
10
+ }
11
+ catch (e) {
12
+ isDev && console.log("ERROR => SessionStorage =>", e);
13
+ return false;
14
+ }
15
+ };
16
+ export var getSessionStorage = function (key) {
17
+ if (!storageAvailable)
18
+ return false;
19
+ try {
20
+ var saved = sessionStorage.getItem(key);
21
+ return saved ? decData(saved) : null;
22
+ }
23
+ catch (e) {
24
+ isDev && console.log("ERROR => SessionStorage =>", e);
25
+ return null;
26
+ }
27
+ };
28
+ export var removeSessionStorage = function (key) {
29
+ if (!storageAvailable)
30
+ return false;
31
+ try {
32
+ sessionStorage.removeItem(key);
33
+ return true;
34
+ }
35
+ catch (e) {
36
+ isDev && console.log("ERROR => SessionStorage =>", e);
37
+ return false;
38
+ }
39
+ };
40
+ export var clearSessionStorage = function () {
41
+ if (!storageAvailable)
42
+ return false;
43
+ try {
44
+ sessionStorage.clear();
45
+ return true;
46
+ }
47
+ catch (e) {
48
+ isDev && console.log("ERROR => SessionStorage =>", e);
49
+ return false;
50
+ }
51
+ };
52
+ // Tüm SessionStorage anahtarlarını getir
53
+ export var getSessionStorageAllKeys = function () {
54
+ if (!storageAvailable)
55
+ return [];
56
+ return Object.keys(sessionStorage);
57
+ };
58
+ // Tüm SessionStorage boyutunu getir
59
+ export var getSessionStorageSize = function () {
60
+ if (!storageAvailable)
61
+ return 0;
62
+ var total = 0;
63
+ for (var key in sessionStorage) {
64
+ if (sessionStorage.hasOwnProperty(key)) {
65
+ total += sessionStorage[key].length + key.length;
66
+ }
67
+ }
68
+ return total;
69
+ };
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Copyright (c) 2023
3
+ * @author: izzetseydaoglu
4
+ * @last-modified: 29.01.2024 04:09
5
+ */
6
+ export declare function useInterval(callback: any, delay: any): void;
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Copyright (c) 2023
3
+ * @author: izzetseydaoglu
4
+ * @last-modified: 29.01.2024 04:09
5
+ */
6
+ // source: https://overreacted.io/making-setinterval-declarative-with-react-hooks/
7
+ import { useEffect, useRef } from "react";
8
+ export function useInterval(callback, delay) {
9
+ var savedCallback = useRef(null);
10
+ // Remember the latest callback.
11
+ useEffect(function () {
12
+ savedCallback.current = callback;
13
+ }, [callback]);
14
+ // Set up the interval.
15
+ useEffect(function () {
16
+ function tick() {
17
+ savedCallback && savedCallback.current && savedCallback.current();
18
+ }
19
+ if (delay !== null) {
20
+ var id_1 = setInterval(tick, delay);
21
+ return function () { return clearInterval(id_1); };
22
+ }
23
+ }, [delay]);
24
+ }
@@ -0,0 +1,18 @@
1
+ import React from "react";
2
+ export type typeAlert = {
3
+ defaultTimer?: string;
4
+ defaultErrorTimer?: string;
5
+ defaultSuccessTimer?: string;
6
+ };
7
+ export declare const Alert: ({ defaultTimer, defaultErrorTimer, defaultSuccessTimer }: typeAlert) => null;
8
+ type typeAddAlert = {
9
+ type: "error" | "success" | "warning" | "info" | "loading";
10
+ message: string;
11
+ timer?: number | boolean;
12
+ style?: React.CSSProperties;
13
+ };
14
+ export declare const alert_add: ({ type, message, style, timer }: typeAddAlert) => false | HTMLDivElement | null;
15
+ export declare const alert_remove: (alert: any) => void;
16
+ export declare const alert_clear: () => boolean;
17
+ export declare function alertCheck(response: any): void;
18
+ export {};
@@ -0,0 +1,107 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useEffect } from "react";
3
+ import { createRoot } from "react-dom/client";
4
+ import styles from "./index.module.css";
5
+ var sAlertTimeout = [];
6
+ export var Alert = function (_a) {
7
+ var _b = _a.defaultTimer, defaultTimer = _b === void 0 ? "5000" : _b, _c = _a.defaultErrorTimer, defaultErrorTimer = _c === void 0 ? "10000" : _c, _d = _a.defaultSuccessTimer, defaultSuccessTimer = _d === void 0 ? "5000" : _d;
8
+ useEffect(function () {
9
+ if (typeof window === "undefined")
10
+ return;
11
+ var divCheck = document.getElementById("salert");
12
+ if (!divCheck) {
13
+ // let div = document.createElement('div') as HTMLDivElement
14
+ var div = document.createElement("div");
15
+ div.setAttribute("id", "salert");
16
+ div.setAttribute("defaultTimer", defaultTimer);
17
+ div.setAttribute("defaultErrorTimer", defaultErrorTimer);
18
+ div.setAttribute("defaultSuccessTimer", defaultSuccessTimer);
19
+ var alertStyle = [
20
+ "position: fixed",
21
+ "bottom: 0",
22
+ "right: 0",
23
+ "max-width: 300px",
24
+ "max-height: 600px",
25
+ "overflow-x: hidden",
26
+ "padding: 15px",
27
+ "display: flex",
28
+ "flex-direction: column",
29
+ "z-index: 9999999"
30
+ ];
31
+ div.setAttribute("style", alertStyle.join(";"));
32
+ document.body.appendChild(div);
33
+ }
34
+ }, []);
35
+ return null;
36
+ };
37
+ export var alert_add = function (_a) {
38
+ var _b, _c, _d;
39
+ var type = _a.type, message = _a.message, style = _a.style, timer = _a.timer;
40
+ if (typeof window === "undefined")
41
+ return false;
42
+ var mainDiv = document.getElementById("salert");
43
+ if (mainDiv) {
44
+ var alert_1 = document.createElement("div");
45
+ mainDiv.prepend(alert_1);
46
+ var onClose_1 = function () {
47
+ if (mainDiv && alert_1 && mainDiv.contains(alert_1))
48
+ mainDiv.removeChild(alert_1);
49
+ };
50
+ var root = createRoot(alert_1);
51
+ var Component = (_jsxs("div", { className: "".concat(styles.salert, " ").concat(styles[type]), style: style, children: [_jsx("div", { className: styles.message, dangerouslySetInnerHTML: { __html: message } }), _jsx("div", { className: styles.close, onClick: onClose_1, children: "\u2715" })] }));
52
+ root.render(Component);
53
+ var defaultTimer = (_b = mainDiv.getAttribute("defaulttimer")) !== null && _b !== void 0 ? _b : "5000";
54
+ var defaultErrorTimer = (_c = mainDiv.getAttribute("defaulterrortimer")) !== null && _c !== void 0 ? _c : "10000";
55
+ var defaultSuccessTimer = (_d = mainDiv.getAttribute("defaultsuccesstimer")) !== null && _d !== void 0 ? _d : "5000";
56
+ var timerFilled = typeof timer === "number" && timer > 0;
57
+ var newTimer = timerFilled ? timer : defaultTimer;
58
+ switch (type) {
59
+ case "error":
60
+ newTimer = timerFilled ? timer : defaultErrorTimer;
61
+ break;
62
+ case "success":
63
+ newTimer = timerFilled ? timer : defaultSuccessTimer;
64
+ break;
65
+ default:
66
+ break;
67
+ }
68
+ newTimer = newTimer;
69
+ if (typeof timer !== "boolean") {
70
+ // False gelmişse sabit kalsın
71
+ if (newTimer > 0) {
72
+ var timeout = setTimeout(function () { return onClose_1(); }, newTimer);
73
+ sAlertTimeout.push(timeout);
74
+ }
75
+ }
76
+ return alert_1;
77
+ }
78
+ return null;
79
+ };
80
+ export var alert_remove = function (alert) {
81
+ if (typeof window === "undefined" || !alert)
82
+ return;
83
+ var mainDiv = document.getElementById("salert");
84
+ if (mainDiv && alert && mainDiv.contains(alert))
85
+ mainDiv.removeChild(alert);
86
+ return;
87
+ };
88
+ export var alert_clear = function () {
89
+ if (typeof window === "undefined")
90
+ return false;
91
+ sAlertTimeout.map(function (id) { return clearTimeout(id); });
92
+ var mainDiv = document.getElementById("salert");
93
+ if (mainDiv)
94
+ mainDiv.innerHTML = "";
95
+ return true;
96
+ };
97
+ export function alertCheck(response) {
98
+ if (response.data && response.data["alert"]) {
99
+ response.data["alert"].map(function (alert) {
100
+ alert_add({
101
+ type: alert.type,
102
+ message: alert.message,
103
+ timer: alert.timer
104
+ });
105
+ });
106
+ }
107
+ }
@@ -0,0 +1,119 @@
1
+ .message {
2
+ flex: 1;
3
+ }
4
+
5
+ .close {
6
+ position: absolute;
7
+ top: 0;
8
+ left: 0;
9
+ width: 17px;
10
+ height: 17px;
11
+ border-radius: 50%;
12
+ padding: 3px;
13
+ display: flex;
14
+ align-items: center;
15
+ justify-content: center;
16
+ font-size: 9px;
17
+ letter-spacing: 0;
18
+ transform: translate(-50%, -50%) scale(0);
19
+ transition: ease-in-out 0.2s;
20
+ border: 1px #97979740 solid;
21
+ box-shadow: 1px 1px 4px 0 #000000a6;
22
+ cursor: pointer;
23
+ background: inherit;
24
+ }
25
+ .close:hover {
26
+ zoom: 1.1;
27
+ }
28
+ .salert:hover .close {
29
+ transform: translate(-50%, -50%) scale(1);
30
+ }
31
+ .salert {
32
+ position: relative;
33
+ min-width: 50px;
34
+ width: fit-content;
35
+ margin: 6px 0 6px auto;
36
+ padding: 10px 15px;
37
+ border-radius: 5px;
38
+ cursor: default;
39
+ background: #1f1f1f;
40
+ color: rgba(255, 255, 255, 0.93);
41
+ border: 1px #97979740 solid;
42
+ box-shadow: 1px 1px 4px 0 #000000a6;
43
+ display: flex;
44
+ flex-direction: row;
45
+ align-items: center;
46
+ transition: transform 225ms cubic-bezier(0, 0, 0.2, 1) 0ms;
47
+ animation: show 0.3s;
48
+ font-family: inherit;
49
+ font-size: 1rem;
50
+ line-height: 1.5;
51
+ }
52
+
53
+ .error {
54
+ background: rgb(211, 47, 47);
55
+ background: linear-gradient(
56
+ 135deg,
57
+ rgba(211, 47, 47, 1) 0%,
58
+ rgba(211, 47, 47, 0.8) 70%
59
+ );
60
+ color: rgba(255, 255, 255, 0.93);
61
+ }
62
+
63
+ .success {
64
+ background: rgb(67, 160, 71);
65
+ background: linear-gradient(
66
+ 135deg,
67
+ rgba(67, 160, 71, 1) 0%,
68
+ rgba(67, 160, 71, 0.8) 70%
69
+ );
70
+ color: rgba(255, 255, 255, 0.93);
71
+ }
72
+
73
+ .info {
74
+ background: rgb(13, 141, 189);
75
+ background: linear-gradient(
76
+ 135deg,
77
+ rgba(13, 141, 189, 1) 0%,
78
+ rgba(13, 141, 189, 0.8) 70%
79
+ );
80
+ color: rgba(255, 255, 255, 0.93);
81
+ }
82
+
83
+ .warning {
84
+ background: rgb(217, 142, 4);
85
+ background: linear-gradient(
86
+ 135deg,
87
+ rgba(217, 142, 4, 1) 0%,
88
+ rgba(217, 142, 4, 0.8) 70%
89
+ );
90
+ color: rgba(255, 255, 255, 0.93);
91
+ }
92
+
93
+ .loading {
94
+ background: linear-gradient(
95
+ 60deg,
96
+ rgb(15 33 34) 0%,
97
+ rgba(0, 172, 193, 1) 100%
98
+ );
99
+ color: rgba(255, 255, 255, 0.93);
100
+ animation: waves 50s infinite linear;
101
+ }
102
+
103
+ @keyframes show {
104
+ from {
105
+ transform: translateX(200%);
106
+ }
107
+ to {
108
+ transform: translateX(0);
109
+ }
110
+ }
111
+
112
+ @keyframes waves {
113
+ from {
114
+ background-position: 0;
115
+ }
116
+ to {
117
+ background-position: 100vw 0;
118
+ }
119
+ }
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ type Props = {
3
+ children: React.ReactNode;
4
+ className?: string;
5
+ style?: React.CSSProperties;
6
+ loading?: boolean;
7
+ };
8
+ export declare const Box: React.NamedExoticComponent<Props>;
9
+ export {};
@@ -0,0 +1,15 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { memo, useEffect, useRef, useState } from "react";
3
+ import styles from "./Box.module.css";
4
+ export var Box = memo(function MemoFunction(_a) {
5
+ var children = _a.children, className = _a.className, style = _a.style, _b = _a.loading, loading = _b === void 0 ? false : _b;
6
+ var boxRef = useRef(null);
7
+ var _c = useState(false), hasContent = _c[0], setHasContent = _c[1];
8
+ useEffect(function () {
9
+ if (!boxRef.current)
10
+ return;
11
+ var found = boxRef.current.querySelector(".sbox_content");
12
+ setHasContent(!!found);
13
+ }, [children]);
14
+ return (_jsxs("div", { ref: boxRef, className: "sbox ".concat(styles.sbox, " ").concat(className || ""), style: style, children: [(hasContent && children) || _jsx("div", { className: styles.content, children: children }), loading && (_jsx("div", { className: styles.loading, children: _jsx("div", { className: styles.loading_spinner }) }))] }));
15
+ });
@@ -0,0 +1,153 @@
1
+ .sbox {
2
+ position: relative;
3
+ max-width: 100%;
4
+ background-color: #fff;
5
+ box-shadow: 0 2px 4px rgb(0 0 0 / 10%), 0 8px 16px rgb(0 0 0 / 10%);
6
+ border-radius: 8px;
7
+ overflow-y: auto;
8
+ }
9
+
10
+ .sbox h1,
11
+ .sbox h2,
12
+ .sbox h3,
13
+ .sbox h4,
14
+ .sbox h5,
15
+ .sbox h6 {
16
+ margin: 0;
17
+ padding: 0;
18
+ }
19
+
20
+ .content {
21
+ padding: 20px;
22
+ box-sizing: border-box;
23
+ overflow: auto;
24
+ }
25
+
26
+ .header,
27
+ .footer {
28
+ z-index: 1;
29
+ position: sticky;
30
+ padding: 12px 16px;
31
+ background: inherit;
32
+ }
33
+ .header {
34
+ top: 0;
35
+ border-bottom: 1px solid #00000020;
36
+ display: flex;
37
+ flex-direction: row;
38
+ justify-content: flex-start;
39
+ align-items: center;
40
+ gap: 10px;
41
+ /* margin: 10px 0 5px 0; */
42
+ }
43
+ .footer {
44
+ display: flex;
45
+ flex-direction: row;
46
+ flex-wrap: wrap;
47
+ align-items: center;
48
+ justify-content: flex-end;
49
+ gap: 10px;
50
+ bottom: 0;
51
+ border-top: 1px solid #00000020;
52
+ background-color: #f7f7f7;
53
+ }
54
+
55
+ .icon {
56
+ display: inline-flex;
57
+ align-items: center;
58
+ flex: 0 0 auto;
59
+ text-align: center;
60
+
61
+ }
62
+
63
+ .title {
64
+ flex: 1;
65
+ font-size: 1.1rem;
66
+ font-weight: 500;
67
+ line-height: 1.5;
68
+ }
69
+
70
+ .menu {
71
+ display: inline-flex;
72
+ flex: 0 0 auto;
73
+ align-items: center;
74
+ justify-content: center;
75
+ }
76
+ .menu > * {
77
+ margin: 0 3px;
78
+ }
79
+
80
+ .loading {
81
+ position: absolute;
82
+ top: 0;
83
+ left: 0;
84
+ width: 100%;
85
+ height: 100%;
86
+ background-color: #f4f7faa6;
87
+ overflow: hidden;
88
+ border-radius: inherit;
89
+ display: flex;
90
+ justify-content: center;
91
+ align-items: center;
92
+ z-index: 9999;
93
+ }
94
+
95
+ .loading::after {
96
+ position: absolute;
97
+ top: 0;
98
+ right: 0;
99
+ bottom: 0;
100
+ left: 0;
101
+ transform: translateX(-100%);
102
+ background: linear-gradient(90deg, rgb(183 190 199 / 2%) 0, rgb(182 190 198 / 19%) 20%, rgb(183 190 199 / 2%) 60%, rgb(184 192 200 / 1%));
103
+ animation: shimmer 2s infinite;
104
+ content: "";
105
+ }
106
+
107
+ .loading_spinner {
108
+ position: relative;
109
+ margin: 6px;
110
+ width: 24px;
111
+ height: 24px;
112
+ }
113
+ .loading_spinner:before {
114
+ position: absolute;
115
+ display: block;
116
+ content: "";
117
+ z-index: 12;
118
+ top: 3px;
119
+ left: 3px;
120
+ width: 30px;
121
+ height: 30px;
122
+ border-radius: 50%;
123
+ background-color: #fff;
124
+ }
125
+
126
+ .loading_spinner:after {
127
+ position: absolute;
128
+ display: block;
129
+ content: "";
130
+ z-index: 11;
131
+ width: 18px;
132
+ height: 18px;
133
+ border-radius: 200px 0 0;
134
+ background: linear-gradient(45deg, rgba(0, 0, 0, 0) 0, rgba(69, 154, 215, 1) 50%, rgba(69, 154, 215, 1) 100%);
135
+ animation: loading_spinner 0.5s linear infinite;
136
+ }
137
+
138
+ @keyframes shimmer {
139
+ 100% {
140
+ transform: translateX(100%);
141
+ }
142
+ }
143
+ @keyframes loading_spinner {
144
+ 0% {
145
+ transform-origin: 100% 100%;
146
+ transform: rotate(0deg);
147
+ }
148
+
149
+ 100% {
150
+ transform-origin: 100% 100%;
151
+ transform: rotate(360deg);
152
+ }
153
+ }
@@ -0,0 +1,9 @@
1
+ import React, { ReactNode } from "react";
2
+ interface Props {
3
+ className?: string;
4
+ style?: React.CSSProperties;
5
+ padding?: number;
6
+ children?: ReactNode;
7
+ }
8
+ export declare const BoxContent: ({ className, style, padding, children }: Props) => import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -0,0 +1,7 @@
1
+ import { __assign } from "tslib";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import styles from "./Box.module.css";
4
+ export var BoxContent = function (_a) {
5
+ var className = _a.className, style = _a.style, padding = _a.padding, children = _a.children;
6
+ return (_jsx("div", { className: "".concat(styles.content, " sbox_content ").concat(className || ""), style: __assign(__assign({}, style), { padding: padding }), children: children }));
7
+ };
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ interface Props {
3
+ children: React.ReactNode;
4
+ className?: string;
5
+ style?: React.CSSProperties;
6
+ marginTop?: number;
7
+ align?: "flex-start" | "center" | "flex-end" | "stretch";
8
+ }
9
+ export declare const BoxFooter: React.NamedExoticComponent<Props>;
10
+ export {};
@@ -0,0 +1,8 @@
1
+ import { __assign } from "tslib";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { memo } from "react";
4
+ import styles from "./Box.module.css";
5
+ export var BoxFooter = memo(function FunctionMemo(_a) {
6
+ var children = _a.children, className = _a.className, style = _a.style, align = _a.align, marginTop = _a.marginTop;
7
+ return (_jsx("div", { className: "sbox_footer ".concat(styles.footer, " ").concat(className || ""), style: __assign({ marginTop: marginTop, justifyContent: align }, style), children: children }));
8
+ });
@@ -0,0 +1,16 @@
1
+ import React, { ReactNode } from 'react';
2
+ interface Props {
3
+ children?: ReactNode;
4
+ className?: string;
5
+ title?: string | ReactNode;
6
+ icon?: ReactNode;
7
+ menu?: ReactNode;
8
+ mainStyle?: React.CSSProperties;
9
+ iconStyle?: React.CSSProperties;
10
+ titleStyle?: React.CSSProperties;
11
+ menuStyle?: React.CSSProperties;
12
+ component?: any;
13
+ marginBottom?: number;
14
+ }
15
+ export declare const BoxHeader: React.NamedExoticComponent<Props>;
16
+ export {};
@@ -0,0 +1,9 @@
1
+ import { __assign } from "tslib";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { memo } from 'react';
4
+ import styles from './Box.module.css';
5
+ export var BoxHeader = memo(function FunctionMemo(_a) {
6
+ var children = _a.children, className = _a.className, title = _a.title, icon = _a.icon, menu = _a.menu, mainStyle = _a.mainStyle, iconStyle = _a.iconStyle, titleStyle = _a.titleStyle, menuStyle = _a.menuStyle, marginBottom = _a.marginBottom, _b = _a.component, component = _b === void 0 ? 'div' : _b;
7
+ var Comp = component;
8
+ return (_jsxs("div", { className: "sbox_header ".concat(styles.header, " ").concat(className || ''), style: __assign({ marginBottom: marginBottom }, mainStyle), children: [icon && (_jsx("div", { className: styles.icon, style: iconStyle, children: icon })), _jsx(Comp, { className: "sbox_title ".concat(styles.title), style: titleStyle, children: children || title }), menu && (_jsx("div", { className: styles.menu, style: menuStyle, children: menu }))] }));
9
+ });
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Copyright (c) 2023
3
+ * @author: izzetseydaoglu
4
+ * @last-modified: 29.01.2024 02:41
5
+ */
6
+ export * from "./Box";
7
+ export * from './BoxContent';
8
+ export * from './BoxFooter';
9
+ export * from './BoxHeader';
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Copyright (c) 2023
3
+ * @author: izzetseydaoglu
4
+ * @last-modified: 29.01.2024 02:41
5
+ */
6
+ export * from "./Box";
7
+ export * from './BoxContent';
8
+ export * from './BoxFooter';
9
+ export * from './BoxHeader';
@@ -0,0 +1,22 @@
1
+ import React from 'react';
2
+ type Props = {
3
+ targetTime: number | string;
4
+ timerType?: 'countdown' | 'datetime';
5
+ speed?: number;
6
+ countType?: 'seconds' | 'minutes:seconds' | 'hours:minutes:seconds' | 'days:hours:minutes:seconds';
7
+ hide?: boolean;
8
+ onComplete?: () => void;
9
+ getStatus?: ({ days, hours, minutes, seconds, timer }: any) => void;
10
+ autoStart?: boolean;
11
+ };
12
+ export declare const useCountDown: ({ autoStart, onComplete, getStatus, targetTime, timerType, countType, speed, hide }: Props) => {
13
+ ComponentCountDown: (children: any) => React.FunctionComponentElement<{
14
+ ref: React.MutableRefObject<any>;
15
+ }> | null;
16
+ startCountDown: () => void;
17
+ stopCountDown: () => void;
18
+ setTargetTime: (targetTime: number | string) => void;
19
+ setTimerSpeed: (timerSpeed: number) => void;
20
+ getChildrenRef: () => any;
21
+ };
22
+ export {};