@sydsoft/base 1.53.0 → 1.56.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 (101) hide show
  1. package/{_dist → dist/esm}/_lib/baseFunctions.js +11 -24
  2. package/{_dist → dist/esm}/_lib/inputMask.js +3 -7
  3. package/{_dist → dist/esm}/_lib/listFunctions.js +2 -7
  4. package/dist/esm/_lib/storage/cookies.js +34 -0
  5. package/{_dist → dist/esm}/_lib/storage/encData.js +5 -10
  6. package/dist/esm/_lib/storage/localStorage.js +69 -0
  7. package/dist/esm/_lib/storage/sessionStorage.js +69 -0
  8. package/{_dist → dist/esm}/_lib/useInterval.js +5 -8
  9. package/{_dist → dist/esm}/alert/index.js +13 -22
  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 → dist/esm}/countDown/index.js +12 -17
  16. package/{_dist → dist/esm}/dateTime/index.js +1 -3
  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 → dist/esm}/form/FormOlustur.js +19 -22
  22. package/{_dist → dist/esm}/form/Input.js +45 -49
  23. package/dist/esm/form/Label.js +9 -0
  24. package/{_dist → dist/esm}/form/SearchableInput.js +45 -48
  25. package/{_dist → dist/esm}/form/UploadBase.js +16 -21
  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 → dist/esm}/modal/index.js +13 -16
  34. package/{_dist → dist/esm}/popover/index.js +36 -39
  35. package/{_dist → dist/esm}/tooltip/index.js +6 -9
  36. package/package.json +8 -13
  37. package/_dist/_lib/storage/cookies.js +0 -41
  38. package/_dist/_lib/storage/localStorage.js +0 -78
  39. package/_dist/_lib/storage/sessionStorage.js +0 -78
  40. package/_dist/box/Box.js +0 -19
  41. package/_dist/box/BoxContent.js +0 -11
  42. package/_dist/box/BoxFooter.js +0 -11
  43. package/_dist/box/BoxHeader.js +0 -12
  44. package/_dist/box/index.js +0 -12
  45. package/_dist/form/Button.js +0 -79
  46. package/_dist/form/Checkbox.js +0 -28
  47. package/_dist/form/Dialog.js +0 -44
  48. package/_dist/form/Form.js +0 -15
  49. package/_dist/form/Label.js +0 -12
  50. package/_dist/form/index.js +0 -12
  51. package/_dist/grid/index.js +0 -104
  52. package/_dist/icon/icons.js +0 -26
  53. package/_dist/icon/index.js +0 -30
  54. package/_dist/icon/mui.js +0 -2
  55. package/_dist/index.js +0 -22
  56. package/_dist/menu/index.js +0 -55
  57. /package/{_dist → dist/esm}/_lib/baseFunctions.d.ts +0 -0
  58. /package/{_dist → dist/esm}/_lib/inputMask.d.ts +0 -0
  59. /package/{_dist → dist/esm}/_lib/listFunctions.d.ts +0 -0
  60. /package/{_dist → dist/esm}/_lib/storage/cookies.d.ts +0 -0
  61. /package/{_dist → dist/esm}/_lib/storage/encData.d.ts +0 -0
  62. /package/{_dist → dist/esm}/_lib/storage/localStorage.d.ts +0 -0
  63. /package/{_dist → dist/esm}/_lib/storage/sessionStorage.d.ts +0 -0
  64. /package/{_dist → dist/esm}/_lib/useInterval.d.ts +0 -0
  65. /package/{_dist → dist/esm}/alert/index.d.ts +0 -0
  66. /package/{_dist → dist/esm}/alert/index.module.css +0 -0
  67. /package/{_dist → dist/esm}/box/Box.d.ts +0 -0
  68. /package/{_dist → dist/esm}/box/Box.module.css +0 -0
  69. /package/{_dist → dist/esm}/box/BoxContent.d.ts +0 -0
  70. /package/{_dist → dist/esm}/box/BoxFooter.d.ts +0 -0
  71. /package/{_dist → dist/esm}/box/BoxHeader.d.ts +0 -0
  72. /package/{_dist → dist/esm}/box/index.d.ts +0 -0
  73. /package/{_dist → dist/esm}/countDown/index.d.ts +0 -0
  74. /package/{_dist → dist/esm}/dateTime/index.d.ts +0 -0
  75. /package/{_dist → dist/esm}/form/Button.d.ts +0 -0
  76. /package/{_dist → dist/esm}/form/Checkbox.d.ts +0 -0
  77. /package/{_dist → dist/esm}/form/Dialog.d.ts +0 -0
  78. /package/{_dist → dist/esm}/form/Form.d.ts +0 -0
  79. /package/{_dist → dist/esm}/form/FormOlustur.d.ts +0 -0
  80. /package/{_dist → dist/esm}/form/Input.d.ts +0 -0
  81. /package/{_dist → dist/esm}/form/Label.d.ts +0 -0
  82. /package/{_dist → dist/esm}/form/SearchableInput.d.ts +0 -0
  83. /package/{_dist → dist/esm}/form/UploadBase.d.ts +0 -0
  84. /package/{_dist → dist/esm}/form/index.d.ts +0 -0
  85. /package/{_dist → dist/esm}/form/styles/Button.module.css +0 -0
  86. /package/{_dist → dist/esm}/form/styles/Input.module.css +0 -0
  87. /package/{_dist → dist/esm}/form/styles/Label.module.css +0 -0
  88. /package/{_dist → dist/esm}/form/styles/SearchableInput.module.css +0 -0
  89. /package/{_dist → dist/esm}/grid/index.d.ts +0 -0
  90. /package/{_dist → dist/esm}/grid/index.module.css +0 -0
  91. /package/{_dist → dist/esm}/icon/icons.d.ts +0 -0
  92. /package/{_dist → dist/esm}/icon/index.d.ts +0 -0
  93. /package/{_dist → dist/esm}/icon/mui.d.ts +0 -0
  94. /package/{_dist → dist/esm}/index.d.ts +0 -0
  95. /package/{_dist → dist/esm}/menu/index.d.ts +0 -0
  96. /package/{_dist → dist/esm}/menu/index.module.css +0 -0
  97. /package/{_dist → dist/esm}/modal/index.d.ts +0 -0
  98. /package/{_dist → dist/esm}/modal/index.module.css +0 -0
  99. /package/{_dist → dist/esm}/popover/index.d.ts +0 -0
  100. /package/{_dist → dist/esm}/popover/index.module.css +0 -0
  101. /package/{_dist → dist/esm}/tooltip/index.d.ts +0 -0
@@ -1,41 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.cerezTumuSil = exports.cerezSil = exports.cerezKaydet = exports.cerezOku = void 0;
4
- var tslib_1 = require("tslib");
5
- var nookies_1 = tslib_1.__importStar(require("nookies"));
6
- var baseFunctions_1 = require("../baseFunctions");
7
- var cerezOku = function (context, key) {
8
- if (context === void 0) { context = null; }
9
- var cookies = context ? nookies_1.default.get(context) : (0, nookies_1.parseCookies)();
10
- return cookies[key] || false;
11
- };
12
- exports.cerezOku = cerezOku;
13
- var cerezKaydet = function (context, key, value, time) {
14
- if (context === void 0) { context = null; }
15
- if (time === void 0) { time = 0; }
16
- var newConfig = checkDomain(context);
17
- (0, nookies_1.setCookie)(context, key, value, tslib_1.__assign({ maxAge: time > 0 ? time : null }, newConfig));
18
- };
19
- exports.cerezKaydet = cerezKaydet;
20
- var cerezSil = function (context, key) {
21
- if (context === void 0) { context = null; }
22
- var newConfig = checkDomain(context);
23
- (0, nookies_1.destroyCookie)(context, key, newConfig);
24
- };
25
- exports.cerezSil = cerezSil;
26
- var cerezTumuSil = function (context) {
27
- if (context === void 0) { context = null; }
28
- var cookies = (0, nookies_1.parseCookies)(context);
29
- if (cookies) {
30
- Object.keys(cookies).forEach(function (key) {
31
- (0, nookies_1.destroyCookie)(context, key);
32
- });
33
- }
34
- };
35
- exports.cerezTumuSil = cerezTumuSil;
36
- var checkDomain = function (context, config) {
37
- if (context === void 0) { context = null; }
38
- if (config === void 0) { config = {}; }
39
- var cookieDomain = (0, baseFunctions_1.getDomain)(context);
40
- return tslib_1.__assign(tslib_1.__assign({}, config), { domain: '.' + cookieDomain, path: '/' });
41
- };
@@ -1,78 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getLocalStorageSize = exports.getLocalStorageAllKeys = exports.clearLocalStorage = exports.removeLocalStorage = exports.getLocalStorage = exports.setLocalStorage = void 0;
4
- var encData_1 = require("./encData");
5
- var baseFunctions_1 = require("../baseFunctions");
6
- var storageAvailable = typeof Storage === 'undefined' || !window.localStorage ? false : true;
7
- var setLocalStorage = function (key, value) {
8
- if (!storageAvailable)
9
- return false;
10
- try {
11
- localStorage.setItem(key, (0, encData_1.encData)(value));
12
- return true;
13
- }
14
- catch (e) {
15
- baseFunctions_1.isDev && console.log('ERROR => localStorage =>', e);
16
- return false;
17
- }
18
- };
19
- exports.setLocalStorage = setLocalStorage;
20
- var getLocalStorage = function (key) {
21
- if (!storageAvailable)
22
- return false;
23
- try {
24
- var saved = localStorage.getItem(key);
25
- return saved ? (0, encData_1.decData)(saved) : null;
26
- }
27
- catch (e) {
28
- baseFunctions_1.isDev && console.log('ERROR => localStorage =>', e);
29
- return null;
30
- }
31
- };
32
- exports.getLocalStorage = getLocalStorage;
33
- var removeLocalStorage = function (key) {
34
- if (!storageAvailable)
35
- return false;
36
- try {
37
- localStorage.removeItem(key);
38
- return true;
39
- }
40
- catch (e) {
41
- baseFunctions_1.isDev && console.log('ERROR => localStorage =>', e);
42
- return false;
43
- }
44
- };
45
- exports.removeLocalStorage = removeLocalStorage;
46
- var clearLocalStorage = function () {
47
- if (!storageAvailable)
48
- return false;
49
- try {
50
- localStorage.clear();
51
- return true;
52
- }
53
- catch (e) {
54
- baseFunctions_1.isDev && console.log('ERROR => localStorage =>', e);
55
- return false;
56
- }
57
- };
58
- exports.clearLocalStorage = clearLocalStorage;
59
- // Tüm localStorage anahtarlarını getir
60
- var getLocalStorageAllKeys = function () {
61
- if (!storageAvailable)
62
- return [];
63
- return Object.keys(localStorage);
64
- };
65
- exports.getLocalStorageAllKeys = getLocalStorageAllKeys;
66
- // Tüm localStorage boyutunu getir
67
- var getLocalStorageSize = function () {
68
- if (!storageAvailable)
69
- return 0;
70
- var total = 0;
71
- for (var key in localStorage) {
72
- if (localStorage.hasOwnProperty(key)) {
73
- total += localStorage[key].length + key.length;
74
- }
75
- }
76
- return total;
77
- };
78
- exports.getLocalStorageSize = getLocalStorageSize;
@@ -1,78 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getSessionStorageSize = exports.getSessionStorageAllKeys = exports.clearSessionStorage = exports.removeSessionStorage = exports.getSessionStorage = exports.setSessionStorage = void 0;
4
- var encData_1 = require("./encData");
5
- var baseFunctions_1 = require("../baseFunctions");
6
- var storageAvailable = typeof Storage === "undefined" || !window.sessionStorage ? false : true;
7
- var setSessionStorage = function (key, value) {
8
- if (!storageAvailable)
9
- return false;
10
- try {
11
- sessionStorage.setItem(key, (0, encData_1.encData)(value));
12
- return true;
13
- }
14
- catch (e) {
15
- baseFunctions_1.isDev && console.log("ERROR => SessionStorage =>", e);
16
- return false;
17
- }
18
- };
19
- exports.setSessionStorage = setSessionStorage;
20
- var getSessionStorage = function (key) {
21
- if (!storageAvailable)
22
- return false;
23
- try {
24
- var saved = sessionStorage.getItem(key);
25
- return saved ? (0, encData_1.decData)(saved) : null;
26
- }
27
- catch (e) {
28
- baseFunctions_1.isDev && console.log("ERROR => SessionStorage =>", e);
29
- return null;
30
- }
31
- };
32
- exports.getSessionStorage = getSessionStorage;
33
- var removeSessionStorage = function (key) {
34
- if (!storageAvailable)
35
- return false;
36
- try {
37
- sessionStorage.removeItem(key);
38
- return true;
39
- }
40
- catch (e) {
41
- baseFunctions_1.isDev && console.log("ERROR => SessionStorage =>", e);
42
- return false;
43
- }
44
- };
45
- exports.removeSessionStorage = removeSessionStorage;
46
- var clearSessionStorage = function () {
47
- if (!storageAvailable)
48
- return false;
49
- try {
50
- sessionStorage.clear();
51
- return true;
52
- }
53
- catch (e) {
54
- baseFunctions_1.isDev && console.log("ERROR => SessionStorage =>", e);
55
- return false;
56
- }
57
- };
58
- exports.clearSessionStorage = clearSessionStorage;
59
- // Tüm SessionStorage anahtarlarını getir
60
- var getSessionStorageAllKeys = function () {
61
- if (!storageAvailable)
62
- return [];
63
- return Object.keys(sessionStorage);
64
- };
65
- exports.getSessionStorageAllKeys = getSessionStorageAllKeys;
66
- // Tüm SessionStorage boyutunu getir
67
- var getSessionStorageSize = function () {
68
- if (!storageAvailable)
69
- return 0;
70
- var total = 0;
71
- for (var key in sessionStorage) {
72
- if (sessionStorage.hasOwnProperty(key)) {
73
- total += sessionStorage[key].length + key.length;
74
- }
75
- }
76
- return total;
77
- };
78
- exports.getSessionStorageSize = getSessionStorageSize;
package/_dist/box/Box.js DELETED
@@ -1,19 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Box = void 0;
4
- var tslib_1 = require("tslib");
5
- var jsx_runtime_1 = require("react/jsx-runtime");
6
- var react_1 = require("react");
7
- var Box_module_css_1 = tslib_1.__importDefault(require("./Box.module.css"));
8
- exports.Box = (0, react_1.memo)(function MemoFunction(_a) {
9
- var children = _a.children, className = _a.className, style = _a.style, _b = _a.loading, loading = _b === void 0 ? false : _b;
10
- var boxRef = (0, react_1.useRef)(null);
11
- var _c = (0, react_1.useState)(false), hasContent = _c[0], setHasContent = _c[1];
12
- (0, react_1.useEffect)(function () {
13
- if (!boxRef.current)
14
- return;
15
- var found = boxRef.current.querySelector(".sbox_content");
16
- setHasContent(!!found);
17
- }, [children]);
18
- return ((0, jsx_runtime_1.jsxs)("div", { ref: boxRef, className: "sbox ".concat(Box_module_css_1.default.sbox, " ").concat(className || ""), style: style, children: [(hasContent && children) || (0, jsx_runtime_1.jsx)("div", { className: Box_module_css_1.default.content, children: children }), loading && ((0, jsx_runtime_1.jsx)("div", { className: Box_module_css_1.default.loading, children: (0, jsx_runtime_1.jsx)("div", { className: Box_module_css_1.default.loading_spinner }) }))] }));
19
- });
@@ -1,11 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BoxContent = void 0;
4
- var tslib_1 = require("tslib");
5
- var jsx_runtime_1 = require("react/jsx-runtime");
6
- var Box_module_css_1 = tslib_1.__importDefault(require("./Box.module.css"));
7
- var BoxContent = function (_a) {
8
- var className = _a.className, style = _a.style, padding = _a.padding, children = _a.children;
9
- return ((0, jsx_runtime_1.jsx)("div", { className: "".concat(Box_module_css_1.default.content, " sbox_content ").concat(className || ""), style: tslib_1.__assign(tslib_1.__assign({}, style), { padding: padding }), children: children }));
10
- };
11
- exports.BoxContent = BoxContent;
@@ -1,11 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BoxFooter = void 0;
4
- var tslib_1 = require("tslib");
5
- var jsx_runtime_1 = require("react/jsx-runtime");
6
- var react_1 = require("react");
7
- var Box_module_css_1 = tslib_1.__importDefault(require("./Box.module.css"));
8
- exports.BoxFooter = (0, react_1.memo)(function FunctionMemo(_a) {
9
- var children = _a.children, className = _a.className, style = _a.style, align = _a.align, marginTop = _a.marginTop;
10
- return ((0, jsx_runtime_1.jsx)("div", { className: "sbox_footer ".concat(Box_module_css_1.default.footer, " ").concat(className || ""), style: tslib_1.__assign({ marginTop: marginTop, justifyContent: align }, style), children: children }));
11
- });
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BoxHeader = void 0;
4
- var tslib_1 = require("tslib");
5
- var jsx_runtime_1 = require("react/jsx-runtime");
6
- var react_1 = require("react");
7
- var Box_module_css_1 = tslib_1.__importDefault(require("./Box.module.css"));
8
- exports.BoxHeader = (0, react_1.memo)(function FunctionMemo(_a) {
9
- 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;
10
- var Comp = component;
11
- return ((0, jsx_runtime_1.jsxs)("div", { className: "sbox_header ".concat(Box_module_css_1.default.header, " ").concat(className || ''), style: tslib_1.__assign({ marginBottom: marginBottom }, mainStyle), children: [icon && ((0, jsx_runtime_1.jsx)("div", { className: Box_module_css_1.default.icon, style: iconStyle, children: icon })), (0, jsx_runtime_1.jsx)(Comp, { className: "sbox_title ".concat(Box_module_css_1.default.title), style: titleStyle, children: children || title }), menu && ((0, jsx_runtime_1.jsx)("div", { className: Box_module_css_1.default.menu, style: menuStyle, children: menu }))] }));
12
- });
@@ -1,12 +0,0 @@
1
- "use strict";
2
- /**
3
- * Copyright (c) 2023
4
- * @author: izzetseydaoglu
5
- * @last-modified: 29.01.2024 02:41
6
- */
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- var tslib_1 = require("tslib");
9
- tslib_1.__exportStar(require("./Box"), exports);
10
- tslib_1.__exportStar(require("./BoxContent"), exports);
11
- tslib_1.__exportStar(require("./BoxFooter"), exports);
12
- tslib_1.__exportStar(require("./BoxHeader"), exports);
@@ -1,79 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Button = void 0;
4
- var tslib_1 = require("tslib");
5
- var jsx_runtime_1 = require("react/jsx-runtime");
6
- var Dialog_1 = require("./Dialog");
7
- var react_1 = require("react");
8
- var tooltip_1 = require("../tooltip");
9
- var link_1 = tslib_1.__importDefault(require("next/link"));
10
- var Button_module_css_1 = tslib_1.__importDefault(require("./styles/Button.module.css"));
11
- exports.Button = (0, react_1.memo)(function MemoFunction(_a) {
12
- var children = _a.children, _b = _a.component, component = _b === void 0 ? "button" : _b, className = _a.className, _c = _a.buttonClass, buttonClass = _c === void 0 ? "default" : _c, _d = _a.buttonSize, buttonSize = _d === void 0 ? "medium" : _d, style = _a.style, _e = _a.type, type = _e === void 0 ? "button" : _e, _f = _a.fullWidth, fullWidth = _f === void 0 ? false : _f, onlyIcon = _a.onlyIcon, onClick = _a.onClick, href = _a.href, target = _a.target, tabIndex = _a.tabIndex, title = _a.title, titlePosition = _a.titlePosition, titleArrow = _a.titleArrow, dialog = _a.dialog, autoFocus = _a.autoFocus, other = tslib_1.__rest(_a, ["children", "component", "className", "buttonClass", "buttonSize", "style", "type", "fullWidth", "onlyIcon", "onClick", "href", "target", "tabIndex", "title", "titlePosition", "titleArrow", "dialog", "autoFocus"]);
13
- var Comp = component;
14
- var ripple = function (e) {
15
- var el = e.currentTarget;
16
- var circle = document.createElement("span");
17
- var diameter = Math.max(el.clientWidth, el.clientHeight);
18
- circle.style.width = circle.style.height = "".concat(diameter, "px");
19
- circle.classList.add(Button_module_css_1.default.ripple);
20
- var ripple = el.getElementsByClassName(Button_module_css_1.default.ripple)[0];
21
- if (ripple)
22
- ripple.remove();
23
- el.appendChild(circle);
24
- };
25
- var handleClick = function (e) {
26
- ripple(e);
27
- if (dialog) {
28
- (0, Dialog_1.Dialog)(dialog).then(function (result) {
29
- if (result && onClick) {
30
- onClick(e);
31
- }
32
- });
33
- }
34
- else {
35
- if (onClick)
36
- onClick(e);
37
- }
38
- };
39
- var createClassList = (0, react_1.useCallback)(function () {
40
- var list = ["sbutton", Button_module_css_1.default.button];
41
- if (buttonClass)
42
- list.push(Button_module_css_1.default[buttonClass]);
43
- if (className)
44
- list.push(className);
45
- if (onlyIcon)
46
- list.push(Button_module_css_1.default.iconbutton);
47
- if (fullWidth)
48
- list.push(Button_module_css_1.default.fullwidth);
49
- return list.join(" ");
50
- }, [buttonClass, className, onlyIcon, fullWidth]);
51
- var _g = (0, react_1.useState)(function () { return createClassList(); }), classList = _g[0], setClassList = _g[1];
52
- (0, react_1.useEffect)(function () {
53
- var newClassList = createClassList().split(" ").filter(Boolean);
54
- if (href && typeof window !== "undefined" && window.location.pathname === href) {
55
- newClassList.push("active");
56
- }
57
- setClassList(newClassList.join(" "));
58
- }, [href, createClassList]);
59
- var ortakProps = tslib_1.__assign({ className: classList, style: style, onClick: handleClick, tabIndex: tabIndex, autoFocus: autoFocus, "data-button-size": (!onlyIcon) ? buttonSize : null }, other);
60
- var renderComponent;
61
- if (href !== undefined) {
62
- if (other === null || other === void 0 ? void 0 : other.hidden) {
63
- renderComponent = null;
64
- }
65
- else {
66
- var checkHref = (other === null || other === void 0 ? void 0 : other.disabled) ? "#" : href;
67
- renderComponent = ((0, jsx_runtime_1.jsx)(link_1.default, { href: checkHref, target: (other === null || other === void 0 ? void 0 : other.disabled) ? "_self" : target, children: (0, jsx_runtime_1.jsx)(Comp, tslib_1.__assign({}, ortakProps, { children: onlyIcon ? onlyIcon : children })) }));
68
- }
69
- }
70
- else {
71
- renderComponent = ((0, jsx_runtime_1.jsx)(Comp, tslib_1.__assign({ type: type }, ortakProps, { children: onlyIcon ? onlyIcon : children })));
72
- }
73
- if (title && renderComponent) {
74
- return ((0, jsx_runtime_1.jsx)(tooltip_1.Tooltip, { title: title, position: titlePosition, arrow: titleArrow, children: renderComponent }));
75
- }
76
- else {
77
- return renderComponent;
78
- }
79
- });
@@ -1,28 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Checkbox = void 0;
4
- var tslib_1 = require("tslib");
5
- var jsx_runtime_1 = require("react/jsx-runtime");
6
- var react_1 = require("react");
7
- var Input_module_css_1 = tslib_1.__importDefault(require("./styles/Input.module.css"));
8
- var Checkbox = function (_a) {
9
- var ref = _a.ref, children = _a.children, name = _a.name, label = _a.label, checked = _a.checked, className = _a.className, style = _a.style, styleCheckbox = _a.styleCheckbox, styleLabel = _a.styleLabel, onToogle = _a.onToogle, disabled = _a.disabled, tabIndex = _a.tabIndex, _b = _a.required, required = _b === void 0 ? false : _b;
10
- var refMain = (0, react_1.useRef)(null);
11
- // checked değerini boolean hâline getiriyoruz
12
- var isChecked = checked === "1" || checked === true;
13
- var handleChange = function (newChecked) {
14
- if (disabled)
15
- return;
16
- onToogle === null || onToogle === void 0 ? void 0 : onToogle({
17
- target: {
18
- name: name,
19
- value: newChecked ? "1" : "0"
20
- }
21
- });
22
- };
23
- var toggleCheck = function () {
24
- handleChange(!isChecked);
25
- };
26
- return ((0, jsx_runtime_1.jsxs)("div", { ref: refMain, className: "".concat(Input_module_css_1.default.checkbox, " ").concat(className || ""), style: style, tabIndex: tabIndex, onClick: toggleCheck, children: [(0, jsx_runtime_1.jsx)("input", { ref: ref, type: "checkbox", name: name, onChange: function (e) { return handleChange(e.target.checked); }, checked: isChecked, required: required, style: styleCheckbox, disabled: disabled }), label && (0, jsx_runtime_1.jsx)("label", { style: styleLabel, children: label }), children && (0, jsx_runtime_1.jsx)("div", { children: children })] }));
27
- };
28
- exports.Checkbox = Checkbox;
@@ -1,44 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Dialog = void 0;
4
- var tslib_1 = require("tslib");
5
- var jsx_runtime_1 = require("react/jsx-runtime");
6
- var box_1 = require("../box");
7
- var client_1 = require("react-dom/client");
8
- var modal_1 = require("../modal");
9
- var Button_1 = require("./Button");
10
- var Dialog = function (config) {
11
- return new Promise(function (resolve) {
12
- if (typeof window === 'undefined')
13
- return false;
14
- var mainDiv = document.getElementById('sdialog');
15
- if (!mainDiv) {
16
- var createDiv = document.createElement('div');
17
- createDiv.setAttribute('id', 'sdialog');
18
- document.body.appendChild(createDiv);
19
- mainDiv = createDiv;
20
- }
21
- var root = (0, client_1.createRoot)(mainDiv);
22
- var settings = tslib_1.__assign({ acceptButtonShow: true, cancelButtonShow: true, acceptButtonText: 'EVET', cancelButtonText: 'HAYIR', acceptButtonClass: 'danger', cancelButtonClass: 'secondary', vertialAlign: 'center', horizontalAlign: 'center', hideBackdrop: true, hideEsc: true, styleMessage: {
23
- fontSize: '1.1rem',
24
- padding: '10px 20px'
25
- }, styleBox: { padding: 0, margin: 0, minWidth: 250 }, styleBoxFooter: { padding: '8px 5px' }, autoFocus: 'accept' }, config);
26
- var close = function () {
27
- if (mainDiv) {
28
- root.unmount();
29
- mainDiv.remove();
30
- }
31
- };
32
- var onCancel = function () {
33
- resolve(false);
34
- close();
35
- };
36
- var onAccept = function () {
37
- resolve(true);
38
- close();
39
- };
40
- var Component = ((0, jsx_runtime_1.jsx)(modal_1.Modal, { open: true, keepMounted: false, close: onCancel, hideBackdrop: settings.hideBackdrop, hideEsc: settings.hideEsc, hideCloseButton: true, vertialAlign: settings.vertialAlign, horizontalAlign: settings.horizontalAlign, backdropStyle: settings.backdropStyle, children: (0, jsx_runtime_1.jsxs)(box_1.Box, { style: settings.styleBox, children: [(0, jsx_runtime_1.jsx)("div", { className: "sbox_content", style: settings.styleMessage, dangerouslySetInnerHTML: { __html: settings.message } }), (settings.acceptButtonShow || settings.cancelButtonShow) && ((0, jsx_runtime_1.jsxs)(box_1.BoxFooter, { style: settings.styleBoxFooter, children: [settings.cancelButtonShow && ((0, jsx_runtime_1.jsx)(Button_1.Button, { autoFocus: settings.autoFocus === 'cancel', buttonClass: settings.cancelButtonClass, onClick: onCancel, children: settings.cancelButtonText })), settings.acceptButtonShow && ((0, jsx_runtime_1.jsx)(Button_1.Button, { autoFocus: settings.autoFocus === 'accept', buttonClass: settings.acceptButtonClass, onClick: onAccept, children: settings.acceptButtonText }))] }))] }) }));
41
- root.render(Component);
42
- });
43
- };
44
- exports.Dialog = Dialog;
@@ -1,15 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Form = void 0;
4
- var tslib_1 = require("tslib");
5
- var jsx_runtime_1 = require("react/jsx-runtime");
6
- var react_1 = require("react");
7
- exports.Form = (0, react_1.memo)(function FunctionMemo(_a) {
8
- var _b = _a.encType, encType = _b === void 0 ? "multipart/form-data" : _b, onSubmit = _a.onSubmit, style = _a.style, _c = _a.disableOnEnterSubmit, disableOnEnterSubmit = _c === void 0 ? false : _c, other = tslib_1.__rest(_a, ["encType", "onSubmit", "style", "disableOnEnterSubmit"]);
9
- var onKeyDown = function (e) {
10
- if (e.key === "Enter" && disableOnEnterSubmit) {
11
- e.preventDefault();
12
- }
13
- };
14
- return (0, jsx_runtime_1.jsx)("form", tslib_1.__assign({ style: style, encType: encType, onSubmit: onSubmit, onKeyDown: onKeyDown }, other));
15
- });
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Label = void 0;
4
- var tslib_1 = require("tslib");
5
- var jsx_runtime_1 = require("react/jsx-runtime");
6
- var react_1 = require("react");
7
- var tooltip_1 = require("../tooltip");
8
- var Label_module_css_1 = tslib_1.__importDefault(require("./styles/Label.module.css"));
9
- exports.Label = (0, react_1.memo)(function FMemo(_a) {
10
- var _b = _a.required, required = _b === void 0 ? false : _b, children = _a.children, other = tslib_1.__rest(_a, ["required", "children"]);
11
- return ((0, jsx_runtime_1.jsxs)("label", tslib_1.__assign({ className: Label_module_css_1.default.label }, other, { children: [children, (0, jsx_runtime_1.jsx)(tooltip_1.Tooltip, { title: 'Zorunlu Alan', children: (0, jsx_runtime_1.jsx)("span", { className: Label_module_css_1.default.required, children: required && '*' }) })] })));
12
- });
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var tslib_1 = require("tslib");
4
- tslib_1.__exportStar(require("./Button"), exports);
5
- tslib_1.__exportStar(require("./Checkbox"), exports);
6
- tslib_1.__exportStar(require("./Dialog"), exports);
7
- tslib_1.__exportStar(require("./Form"), exports);
8
- tslib_1.__exportStar(require("./FormOlustur"), exports);
9
- tslib_1.__exportStar(require("./Input"), exports);
10
- tslib_1.__exportStar(require("./Label"), exports);
11
- tslib_1.__exportStar(require("./SearchableInput"), exports);
12
- tslib_1.__exportStar(require("./UploadBase"), exports);
@@ -1,104 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DevelopGridComponent = exports.Hidden = exports.Col = exports.Row = void 0;
4
- var tslib_1 = require("tslib");
5
- var jsx_runtime_1 = require("react/jsx-runtime");
6
- var react_1 = tslib_1.__importStar(require("react"));
7
- var index_module_css_1 = tslib_1.__importDefault(require("./index.module.css"));
8
- var Row = function (_a) {
9
- var children = _a.children, _b = _a.className, className = _b === void 0 ? '' : _b, style = _a.style, _c = _a.flexDirection, flexDirection = _c === void 0 ? 'row' : _c, _d = _a.flexWrap, flexWrap = _d === void 0 ? 'wrap' : _d, _e = _a.justifyContent, justifyContent = _e === void 0 ? 'flex-start' : _e, _f = _a.alignContent, alignContent = _f === void 0 ? 'center' : _f, _g = _a.alignItems, alignItems = _g === void 0 ? 'center' : _g, _h = _a.rowSpacing, rowSpacing = _h === void 0 ? 2 : _h, _j = _a.colSpacing, colSpacing = _j === void 0 ? 2 : _j, other = tslib_1.__rest(_a, ["children", "className", "style", "flexDirection", "flexWrap", "justifyContent", "alignContent", "alignItems", "rowSpacing", "colSpacing"]);
10
- var classes = [
11
- index_module_css_1.default.row,
12
- rowSpacing !== undefined && index_module_css_1.default["row-spacing-".concat(rowSpacing)],
13
- colSpacing !== undefined && index_module_css_1.default["col-spacing-".concat(colSpacing)],
14
- flexDirection !== 'row' && index_module_css_1.default["flex-".concat(flexDirection.replace('-', '-'))],
15
- flexWrap !== 'wrap' && index_module_css_1.default["flex-".concat(flexWrap)],
16
- justifyContent !== 'flex-start' && index_module_css_1.default["justify-".concat(justifyContent.replace('flex-', '').replace('space-', ''))],
17
- alignItems !== 'center' && index_module_css_1.default["align-items-".concat(alignItems.replace('flex-', ''))],
18
- alignContent !== 'center' && index_module_css_1.default["align-content-".concat(alignContent.replace('flex-', ''))],
19
- className
20
- ]
21
- .filter(Boolean)
22
- .join(' ');
23
- return ((0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: classes, style: style }, other, { children: children })));
24
- };
25
- exports.Row = Row;
26
- var Col = function (_a) {
27
- // Cascading logic - aynı sizin component'inizdeki gibi
28
- var children = _a.children, _b = _a.className, className = _b === void 0 ? '' : _b, style = _a.style, xs = _a.xs, sm = _a.sm, md = _a.md, lg = _a.lg, xl = _a.xl, xxl = _a.xxl, other = tslib_1.__rest(_a, ["children", "className", "style", "xs", "sm", "md", "lg", "xl", "xxl"]);
29
- var classes = [
30
- index_module_css_1.default.col,
31
- // Sadece belirtilen breakpoint'ler için class ekle
32
- xs && index_module_css_1.default["col-xs-".concat(xs)],
33
- sm && index_module_css_1.default["col-sm-".concat(sm)],
34
- md && index_module_css_1.default["col-md-".concat(md)],
35
- lg && index_module_css_1.default["col-lg-".concat(lg)],
36
- xl && index_module_css_1.default["col-xl-".concat(xl)],
37
- xxl && index_module_css_1.default["col-xxl-".concat(xxl)],
38
- className
39
- ]
40
- .filter(Boolean)
41
- .join(' ');
42
- return ((0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: classes, style: style }, other, { children: children })));
43
- };
44
- exports.Col = Col;
45
- var Hidden = function (_a) {
46
- var children = _a.children, hidden = _a.hidden, onlyHidden = _a.onlyHidden, other = tslib_1.__rest(_a, ["children", "hidden", "onlyHidden"]);
47
- var existingClassName = children.props.className || '';
48
- var hiddenClasses = [];
49
- if (onlyHidden) {
50
- onlyHidden.forEach(function (breakpoint) {
51
- hiddenClasses.push(index_module_css_1.default["hidden-".concat(breakpoint)]);
52
- });
53
- }
54
- else if (hidden) {
55
- // Orijinal mantık: seçilen breakpoint ve altındaki tüm breakpoint'ler gizlenir
56
- var breakpoints = ['xs', 'sm', 'md', 'lg', 'xl', 'xxl'];
57
- var targetIndex = breakpoints.indexOf(hidden);
58
- if (targetIndex !== -1) {
59
- for (var i = 0; i <= targetIndex; i++) {
60
- hiddenClasses.push(index_module_css_1.default["hidden-".concat(breakpoints[i])]);
61
- }
62
- }
63
- }
64
- var newClassName = tslib_1.__spreadArray([existingClassName], hiddenClasses, true).filter(Boolean).join(' ');
65
- return react_1.default.cloneElement(children, tslib_1.__assign({ className: newClassName }, other));
66
- };
67
- exports.Hidden = Hidden;
68
- var DevelopGridComponent = function () {
69
- var _a = (0, react_1.useState)(''), currentBreakpoint = _a[0], setCurrentBreakpoint = _a[1];
70
- // Breakpoint detector
71
- react_1.default.useEffect(function () {
72
- var updateBreakpoint = function () {
73
- var width = window.innerWidth;
74
- var breakpoint = '';
75
- if (width <= 576)
76
- breakpoint = 'XS (≤576px)';
77
- else if (width <= 768)
78
- breakpoint = 'SM (577-768px)';
79
- else if (width <= 992)
80
- breakpoint = 'MD (769-992px)';
81
- else if (width <= 1200)
82
- breakpoint = 'LG (993-1200px)';
83
- else if (width <= 1400)
84
- breakpoint = 'XL (1201-1400px)';
85
- else
86
- breakpoint = 'XXL (≥1401px)';
87
- setCurrentBreakpoint(breakpoint);
88
- };
89
- updateBreakpoint();
90
- window.addEventListener('resize', updateBreakpoint);
91
- return function () { return window.removeEventListener('resize', updateBreakpoint); };
92
- }, []);
93
- return ((0, jsx_runtime_1.jsxs)("div", { style: {
94
- position: 'fixed',
95
- bottom: '10px',
96
- right: '10px',
97
- background: '#333',
98
- color: 'white',
99
- padding: '10px',
100
- borderRadius: '4px',
101
- zIndex: 9999999
102
- }, children: ["Current: ", currentBreakpoint] }));
103
- };
104
- exports.DevelopGridComponent = DevelopGridComponent;
@@ -1,26 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.iconMap = void 0;
4
- var jsx_runtime_1 = require("react/jsx-runtime");
5
- exports.iconMap = {
6
- close: {
7
- viewBox: '0 -960 960 960',
8
- content: ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)("path", { d: "m336-280-56-56 144-144-144-143 56-56 144 144 143-144 56 56-144 143 144 144-56 56-143-144-144 144Z" }) }))
9
- },
10
- search: {
11
- viewBox: '0 0 24 24',
12
- content: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("path", { d: "M0 0h24v24H0V0z", fill: "none" }), (0, jsx_runtime_1.jsx)("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z" })] }))
13
- },
14
- edit: {
15
- viewBox: '0 -960 960 960',
16
- content: ((0, jsx_runtime_1.jsx)("path", { d: "M200-200h57l391-391-57-57-391 391v57Zm-80 80v-170l528-527q12-11 26.5-17t30.5-6q16 0 31 6t26 18l55 56q12 11 17.5 26t5.5 30q0 16-5.5 30.5T817-647L290-120H120Zm640-584-56-56 56 56Zm-141 85-28-29 57 57-29-28Z" }))
17
- },
18
- keyboard_arrow_up: {
19
- viewBox: '0 -960 960 960',
20
- content: (0, jsx_runtime_1.jsx)("path", { d: "M480-528 296-344l-56-56 240-240 240 240-56 56-184-184Z" })
21
- },
22
- keyboard_arrow_down: {
23
- viewBox: '0 -960 960 960',
24
- content: (0, jsx_runtime_1.jsx)("path", { d: "M480-344 240-584l56-56 184 184 184-184 56 56-240 240Z" })
25
- }
26
- };
@@ -1,30 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Icon = exports.iconList = void 0;
4
- var tslib_1 = require("tslib");
5
- var jsx_runtime_1 = require("react/jsx-runtime");
6
- var icons_1 = require("./icons");
7
- exports.iconList = Object.keys(icons_1.iconMap);
8
- var defaultIconStyle = {
9
- userSelect: 'none',
10
- width: '1em',
11
- height: '1em',
12
- // display: 'inline-block',
13
- verticalAlign: 'middle',
14
- flexShrink: 0,
15
- display: 'flex',
16
- alignItems: 'center',
17
- justifyContent: 'center'
18
- };
19
- var Icon = function (_a) {
20
- var name = _a.name, iconMui = _a.iconMui, customIcon = _a.customIcon, fontSize = _a.fontSize, color = _a.color, className = _a.className, style = _a.style, other = tslib_1.__rest(_a, ["name", "iconMui", "customIcon", "fontSize", "color", "className", "style"]);
21
- if (iconMui) {
22
- return ((0, jsx_runtime_1.jsx)("span", tslib_1.__assign({ className: "material-icons ".concat(className || ''), style: tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({}, defaultIconStyle), style), { fontSize: fontSize || '1.3rem', color: color || 'inherit' }), "aria-hidden": "true" }, other, { children: iconMui })));
23
- }
24
- var iconComponent = name ? icons_1.iconMap[name] : customIcon;
25
- if (!iconComponent) {
26
- return (0, jsx_runtime_1.jsx)("span", { children: "\u26A0\uFE0F" });
27
- }
28
- return ((0, jsx_runtime_1.jsx)("span", tslib_1.__assign({ className: className, style: tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({}, defaultIconStyle), style), { fontSize: fontSize || '1.5rem', color: color || 'inherit' }) }, other, { children: (0, jsx_runtime_1.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: iconComponent.viewBox, fill: 'currentColor', width: "1em", height: "1em", style: { display: 'block', flexShrink: 0 }, children: iconComponent.content }) })));
29
- };
30
- exports.Icon = Icon;
package/_dist/icon/mui.js DELETED
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });