@sydsoft/base 1.52.0 → 1.53.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/{esm/_lib → _lib}/baseFunctions.js +24 -11
  2. package/_dist/{esm/_lib → _lib}/inputMask.js +7 -3
  3. package/_dist/{esm/_lib → _lib}/listFunctions.js +7 -2
  4. package/_dist/_lib/storage/cookies.js +41 -0
  5. package/_dist/{esm/_lib → _lib}/storage/encData.js +10 -5
  6. package/_dist/_lib/storage/localStorage.js +78 -0
  7. package/_dist/_lib/storage/sessionStorage.js +78 -0
  8. package/_dist/{esm/_lib → _lib}/useInterval.js +8 -5
  9. package/_dist/{esm/alert → alert}/index.js +22 -13
  10. package/_dist/box/Box.js +19 -0
  11. package/_dist/box/BoxContent.js +11 -0
  12. package/_dist/box/BoxFooter.js +11 -0
  13. package/_dist/box/BoxHeader.js +12 -0
  14. package/_dist/box/index.js +12 -0
  15. package/_dist/{esm/countDown → countDown}/index.js +17 -12
  16. package/_dist/{esm/dateTime → dateTime}/index.js +3 -1
  17. package/_dist/form/Button.js +79 -0
  18. package/_dist/form/Checkbox.js +28 -0
  19. package/_dist/form/Dialog.js +44 -0
  20. package/_dist/form/Form.js +15 -0
  21. package/_dist/{esm/form → form}/FormOlustur.js +22 -19
  22. package/_dist/{esm/form → form}/Input.js +49 -45
  23. package/_dist/form/Label.js +12 -0
  24. package/_dist/{esm/form → form}/SearchableInput.js +48 -45
  25. package/_dist/{esm/form → form}/UploadBase.js +21 -16
  26. package/_dist/form/index.js +12 -0
  27. package/_dist/grid/index.js +104 -0
  28. package/_dist/icon/icons.js +26 -0
  29. package/_dist/icon/index.js +30 -0
  30. package/_dist/icon/mui.js +2 -0
  31. package/_dist/index.js +22 -0
  32. package/_dist/menu/index.js +55 -0
  33. package/_dist/{esm/modal → modal}/index.js +16 -13
  34. package/_dist/{esm/popover → popover}/index.js +39 -36
  35. package/_dist/{esm/tooltip → tooltip}/index.js +9 -6
  36. package/package.json +6 -7
  37. package/_dist/esm/_lib/storage/cookies.js +0 -34
  38. package/_dist/esm/_lib/storage/localStorage.js +0 -69
  39. package/_dist/esm/_lib/storage/sessionStorage.js +0 -69
  40. package/_dist/esm/box/Box.js +0 -15
  41. package/_dist/esm/box/BoxContent.js +0 -7
  42. package/_dist/esm/box/BoxFooter.js +0 -8
  43. package/_dist/esm/box/BoxHeader.js +0 -9
  44. package/_dist/esm/box/index.js +0 -9
  45. package/_dist/esm/form/Button.js +0 -76
  46. package/_dist/esm/form/Checkbox.js +0 -23
  47. package/_dist/esm/form/Dialog.js +0 -40
  48. package/_dist/esm/form/Form.js +0 -12
  49. package/_dist/esm/form/Label.js +0 -9
  50. package/_dist/esm/form/index.js +0 -9
  51. package/_dist/esm/grid/index.js +0 -97
  52. package/_dist/esm/icon/icons.js +0 -23
  53. package/_dist/esm/icon/index.js +0 -26
  54. package/_dist/esm/icon/mui.js +0 -1
  55. package/_dist/esm/index.js +0 -19
  56. package/_dist/esm/menu/index.js +0 -52
  57. /package/_dist/{esm/_lib → _lib}/baseFunctions.d.ts +0 -0
  58. /package/_dist/{esm/_lib → _lib}/inputMask.d.ts +0 -0
  59. /package/_dist/{esm/_lib → _lib}/listFunctions.d.ts +0 -0
  60. /package/_dist/{esm/_lib → _lib}/storage/cookies.d.ts +0 -0
  61. /package/_dist/{esm/_lib → _lib}/storage/encData.d.ts +0 -0
  62. /package/_dist/{esm/_lib → _lib}/storage/localStorage.d.ts +0 -0
  63. /package/_dist/{esm/_lib → _lib}/storage/sessionStorage.d.ts +0 -0
  64. /package/_dist/{esm/_lib → _lib}/useInterval.d.ts +0 -0
  65. /package/_dist/{esm/alert → alert}/index.d.ts +0 -0
  66. /package/_dist/{esm/alert → alert}/index.module.css +0 -0
  67. /package/_dist/{esm/box → box}/Box.d.ts +0 -0
  68. /package/_dist/{esm/box → box}/Box.module.css +0 -0
  69. /package/_dist/{esm/box → box}/BoxContent.d.ts +0 -0
  70. /package/_dist/{esm/box → box}/BoxFooter.d.ts +0 -0
  71. /package/_dist/{esm/box → box}/BoxHeader.d.ts +0 -0
  72. /package/_dist/{esm/box → box}/index.d.ts +0 -0
  73. /package/_dist/{esm/countDown → countDown}/index.d.ts +0 -0
  74. /package/_dist/{esm/dateTime → dateTime}/index.d.ts +0 -0
  75. /package/_dist/{esm/form → form}/Button.d.ts +0 -0
  76. /package/_dist/{esm/form → form}/Checkbox.d.ts +0 -0
  77. /package/_dist/{esm/form → form}/Dialog.d.ts +0 -0
  78. /package/_dist/{esm/form → form}/Form.d.ts +0 -0
  79. /package/_dist/{esm/form → form}/FormOlustur.d.ts +0 -0
  80. /package/_dist/{esm/form → form}/Input.d.ts +0 -0
  81. /package/_dist/{esm/form → form}/Label.d.ts +0 -0
  82. /package/_dist/{esm/form → form}/SearchableInput.d.ts +0 -0
  83. /package/_dist/{esm/form → form}/UploadBase.d.ts +0 -0
  84. /package/_dist/{esm/form → form}/index.d.ts +0 -0
  85. /package/_dist/{esm/form → form}/styles/Button.module.css +0 -0
  86. /package/_dist/{esm/form → form}/styles/Input.module.css +0 -0
  87. /package/_dist/{esm/form → form}/styles/Label.module.css +0 -0
  88. /package/_dist/{esm/form → form}/styles/SearchableInput.module.css +0 -0
  89. /package/_dist/{esm/grid → grid}/index.d.ts +0 -0
  90. /package/_dist/{esm/grid → grid}/index.module.css +0 -0
  91. /package/_dist/{esm/icon → icon}/icons.d.ts +0 -0
  92. /package/_dist/{esm/icon → icon}/index.d.ts +0 -0
  93. /package/_dist/{esm/icon → icon}/mui.d.ts +0 -0
  94. /package/_dist/{esm/index.d.ts → index.d.ts} +0 -0
  95. /package/_dist/{esm/menu → menu}/index.d.ts +0 -0
  96. /package/_dist/{esm/menu → menu}/index.module.css +0 -0
  97. /package/_dist/{esm/modal → modal}/index.d.ts +0 -0
  98. /package/_dist/{esm/modal → modal}/index.module.css +0 -0
  99. /package/_dist/{esm/popover → popover}/index.d.ts +0 -0
  100. /package/_dist/{esm/popover → popover}/index.module.css +0 -0
  101. /package/_dist/{esm/tooltip → tooltip}/index.d.ts +0 -0
@@ -1,40 +0,0 @@
1
- import { __assign } from "tslib";
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { Box, BoxFooter } from '../box';
4
- import { createRoot } from 'react-dom/client';
5
- import { Modal } from '../modal';
6
- import { Button } from './Button';
7
- export var Dialog = function (config) {
8
- return new Promise(function (resolve) {
9
- if (typeof window === 'undefined')
10
- return false;
11
- var mainDiv = document.getElementById('sdialog');
12
- if (!mainDiv) {
13
- var createDiv = document.createElement('div');
14
- createDiv.setAttribute('id', 'sdialog');
15
- document.body.appendChild(createDiv);
16
- mainDiv = createDiv;
17
- }
18
- var root = createRoot(mainDiv);
19
- var settings = __assign({ acceptButtonShow: true, cancelButtonShow: true, acceptButtonText: 'EVET', cancelButtonText: 'HAYIR', acceptButtonClass: 'danger', cancelButtonClass: 'secondary', vertialAlign: 'center', horizontalAlign: 'center', hideBackdrop: true, hideEsc: true, styleMessage: {
20
- fontSize: '1.1rem',
21
- padding: '10px 20px'
22
- }, styleBox: { padding: 0, margin: 0, minWidth: 250 }, styleBoxFooter: { padding: '8px 5px' }, autoFocus: 'accept' }, config);
23
- var close = function () {
24
- if (mainDiv) {
25
- root.unmount();
26
- mainDiv.remove();
27
- }
28
- };
29
- var onCancel = function () {
30
- resolve(false);
31
- close();
32
- };
33
- var onAccept = function () {
34
- resolve(true);
35
- close();
36
- };
37
- var Component = (_jsx(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: _jsxs(Box, { style: settings.styleBox, children: [_jsx("div", { className: "sbox_content", style: settings.styleMessage, dangerouslySetInnerHTML: { __html: settings.message } }), (settings.acceptButtonShow || settings.cancelButtonShow) && (_jsxs(BoxFooter, { style: settings.styleBoxFooter, children: [settings.cancelButtonShow && (_jsx(Button, { autoFocus: settings.autoFocus === 'cancel', buttonClass: settings.cancelButtonClass, onClick: onCancel, children: settings.cancelButtonText })), settings.acceptButtonShow && (_jsx(Button, { autoFocus: settings.autoFocus === 'accept', buttonClass: settings.acceptButtonClass, onClick: onAccept, children: settings.acceptButtonText }))] }))] }) }));
38
- root.render(Component);
39
- });
40
- };
@@ -1,12 +0,0 @@
1
- import { __assign, __rest } from "tslib";
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- import { memo } from "react";
4
- export var Form = memo(function FunctionMemo(_a) {
5
- 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 = __rest(_a, ["encType", "onSubmit", "style", "disableOnEnterSubmit"]);
6
- var onKeyDown = function (e) {
7
- if (e.key === "Enter" && disableOnEnterSubmit) {
8
- e.preventDefault();
9
- }
10
- };
11
- return _jsx("form", __assign({ style: style, encType: encType, onSubmit: onSubmit, onKeyDown: onKeyDown }, other));
12
- });
@@ -1,9 +0,0 @@
1
- import { __assign, __rest } from "tslib";
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { memo } from 'react';
4
- import { Tooltip } from '../tooltip';
5
- import styles from './styles/Label.module.css';
6
- export var Label = memo(function FMemo(_a) {
7
- var _b = _a.required, required = _b === void 0 ? false : _b, children = _a.children, other = __rest(_a, ["required", "children"]);
8
- return (_jsxs("label", __assign({ className: styles.label }, other, { children: [children, _jsx(Tooltip, { title: 'Zorunlu Alan', children: _jsx("span", { className: styles.required, children: required && '*' }) })] })));
9
- });
@@ -1,9 +0,0 @@
1
- export * from "./Button";
2
- export * from "./Checkbox";
3
- export * from "./Dialog";
4
- export * from "./Form";
5
- export * from "./FormOlustur";
6
- export * from "./Input";
7
- export * from "./Label";
8
- export * from "./SearchableInput";
9
- export * from "./UploadBase";
@@ -1,97 +0,0 @@
1
- import { __assign, __rest, __spreadArray } from "tslib";
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import React, { useState } from 'react';
4
- import styles from './index.module.css';
5
- export var Row = function (_a) {
6
- 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 = __rest(_a, ["children", "className", "style", "flexDirection", "flexWrap", "justifyContent", "alignContent", "alignItems", "rowSpacing", "colSpacing"]);
7
- var classes = [
8
- styles.row,
9
- rowSpacing !== undefined && styles["row-spacing-".concat(rowSpacing)],
10
- colSpacing !== undefined && styles["col-spacing-".concat(colSpacing)],
11
- flexDirection !== 'row' && styles["flex-".concat(flexDirection.replace('-', '-'))],
12
- flexWrap !== 'wrap' && styles["flex-".concat(flexWrap)],
13
- justifyContent !== 'flex-start' && styles["justify-".concat(justifyContent.replace('flex-', '').replace('space-', ''))],
14
- alignItems !== 'center' && styles["align-items-".concat(alignItems.replace('flex-', ''))],
15
- alignContent !== 'center' && styles["align-content-".concat(alignContent.replace('flex-', ''))],
16
- className
17
- ]
18
- .filter(Boolean)
19
- .join(' ');
20
- return (_jsx("div", __assign({ className: classes, style: style }, other, { children: children })));
21
- };
22
- export var Col = function (_a) {
23
- // Cascading logic - aynı sizin component'inizdeki gibi
24
- 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 = __rest(_a, ["children", "className", "style", "xs", "sm", "md", "lg", "xl", "xxl"]);
25
- var classes = [
26
- styles.col,
27
- // Sadece belirtilen breakpoint'ler için class ekle
28
- xs && styles["col-xs-".concat(xs)],
29
- sm && styles["col-sm-".concat(sm)],
30
- md && styles["col-md-".concat(md)],
31
- lg && styles["col-lg-".concat(lg)],
32
- xl && styles["col-xl-".concat(xl)],
33
- xxl && styles["col-xxl-".concat(xxl)],
34
- className
35
- ]
36
- .filter(Boolean)
37
- .join(' ');
38
- return (_jsx("div", __assign({ className: classes, style: style }, other, { children: children })));
39
- };
40
- export var Hidden = function (_a) {
41
- var children = _a.children, hidden = _a.hidden, onlyHidden = _a.onlyHidden, other = __rest(_a, ["children", "hidden", "onlyHidden"]);
42
- var existingClassName = children.props.className || '';
43
- var hiddenClasses = [];
44
- if (onlyHidden) {
45
- onlyHidden.forEach(function (breakpoint) {
46
- hiddenClasses.push(styles["hidden-".concat(breakpoint)]);
47
- });
48
- }
49
- else if (hidden) {
50
- // Orijinal mantık: seçilen breakpoint ve altındaki tüm breakpoint'ler gizlenir
51
- var breakpoints = ['xs', 'sm', 'md', 'lg', 'xl', 'xxl'];
52
- var targetIndex = breakpoints.indexOf(hidden);
53
- if (targetIndex !== -1) {
54
- for (var i = 0; i <= targetIndex; i++) {
55
- hiddenClasses.push(styles["hidden-".concat(breakpoints[i])]);
56
- }
57
- }
58
- }
59
- var newClassName = __spreadArray([existingClassName], hiddenClasses, true).filter(Boolean).join(' ');
60
- return React.cloneElement(children, __assign({ className: newClassName }, other));
61
- };
62
- export var DevelopGridComponent = function () {
63
- var _a = useState(''), currentBreakpoint = _a[0], setCurrentBreakpoint = _a[1];
64
- // Breakpoint detector
65
- React.useEffect(function () {
66
- var updateBreakpoint = function () {
67
- var width = window.innerWidth;
68
- var breakpoint = '';
69
- if (width <= 576)
70
- breakpoint = 'XS (≤576px)';
71
- else if (width <= 768)
72
- breakpoint = 'SM (577-768px)';
73
- else if (width <= 992)
74
- breakpoint = 'MD (769-992px)';
75
- else if (width <= 1200)
76
- breakpoint = 'LG (993-1200px)';
77
- else if (width <= 1400)
78
- breakpoint = 'XL (1201-1400px)';
79
- else
80
- breakpoint = 'XXL (≥1401px)';
81
- setCurrentBreakpoint(breakpoint);
82
- };
83
- updateBreakpoint();
84
- window.addEventListener('resize', updateBreakpoint);
85
- return function () { return window.removeEventListener('resize', updateBreakpoint); };
86
- }, []);
87
- return (_jsxs("div", { style: {
88
- position: 'fixed',
89
- bottom: '10px',
90
- right: '10px',
91
- background: '#333',
92
- color: 'white',
93
- padding: '10px',
94
- borderRadius: '4px',
95
- zIndex: 9999999
96
- }, children: ["Current: ", currentBreakpoint] }));
97
- };
@@ -1,23 +0,0 @@
1
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
- export var iconMap = {
3
- close: {
4
- viewBox: '0 -960 960 960',
5
- content: (_jsx(_Fragment, { children: _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" }) }))
6
- },
7
- search: {
8
- viewBox: '0 0 24 24',
9
- content: (_jsxs(_Fragment, { children: [_jsx("path", { d: "M0 0h24v24H0V0z", fill: "none" }), _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" })] }))
10
- },
11
- edit: {
12
- viewBox: '0 -960 960 960',
13
- content: (_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" }))
14
- },
15
- keyboard_arrow_up: {
16
- viewBox: '0 -960 960 960',
17
- content: _jsx("path", { d: "M480-528 296-344l-56-56 240-240 240 240-56 56-184-184Z" })
18
- },
19
- keyboard_arrow_down: {
20
- viewBox: '0 -960 960 960',
21
- content: _jsx("path", { d: "M480-344 240-584l56-56 184 184 184-184 56 56-240 240Z" })
22
- }
23
- };
@@ -1,26 +0,0 @@
1
- import { __assign, __rest } from "tslib";
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- import { iconMap } from './icons';
4
- export var iconList = Object.keys(iconMap);
5
- var defaultIconStyle = {
6
- userSelect: 'none',
7
- width: '1em',
8
- height: '1em',
9
- // display: 'inline-block',
10
- verticalAlign: 'middle',
11
- flexShrink: 0,
12
- display: 'flex',
13
- alignItems: 'center',
14
- justifyContent: 'center'
15
- };
16
- export var Icon = function (_a) {
17
- var name = _a.name, iconMui = _a.iconMui, customIcon = _a.customIcon, fontSize = _a.fontSize, color = _a.color, className = _a.className, style = _a.style, other = __rest(_a, ["name", "iconMui", "customIcon", "fontSize", "color", "className", "style"]);
18
- if (iconMui) {
19
- return (_jsx("span", __assign({ className: "material-icons ".concat(className || ''), style: __assign(__assign(__assign({}, defaultIconStyle), style), { fontSize: fontSize || '1.3rem', color: color || 'inherit' }), "aria-hidden": "true" }, other, { children: iconMui })));
20
- }
21
- var iconComponent = name ? iconMap[name] : customIcon;
22
- if (!iconComponent) {
23
- return _jsx("span", { children: "\u26A0\uFE0F" });
24
- }
25
- return (_jsx("span", __assign({ className: className, style: __assign(__assign(__assign({}, defaultIconStyle), style), { fontSize: fontSize || '1.5rem', color: color || 'inherit' }) }, other, { children: _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 }) })));
26
- };
@@ -1 +0,0 @@
1
- export {};
@@ -1,19 +0,0 @@
1
- export * from './_lib/baseFunctions';
2
- export * from './_lib/inputMask';
3
- export * from './_lib/listFunctions';
4
- export * from './_lib/storage/cookies';
5
- export * from './_lib/storage/encData';
6
- export * from './_lib/storage/localStorage';
7
- export * from './_lib/storage/sessionStorage';
8
- export * from './_lib/useInterval';
9
- export * from './alert';
10
- export * from './box';
11
- export * from './countDown';
12
- export * from './dateTime';
13
- export * from './form';
14
- export * from './grid';
15
- export * from './icon';
16
- export * from './menu';
17
- export * from './modal';
18
- export * from './popover';
19
- export * from './tooltip';
@@ -1,52 +0,0 @@
1
- import { __assign, __rest } from "tslib";
2
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
- /**
4
- * @author : izzetseydaoglu
5
- * @copyright : sydSOFT Bilişim Hizmetleri (c) 2026
6
- * @version : 2026-02-07 19:31:01
7
- */
8
- import React, { memo, useMemo } from 'react';
9
- import { Dialog } from '../form';
10
- import { Popover } from '../popover';
11
- import Link from 'next/link';
12
- import styles from './index.module.css';
13
- export var Menu = memo(function MemoFunction(_a) {
14
- var menu = _a.menu, className = _a.className, style = _a.style, _b = _a.withIcon, withIcon = _b === void 0 ? 'auto' : _b;
15
- var withIconComponent = useMemo(function () {
16
- if (withIcon === true)
17
- return true;
18
- if (withIcon === false)
19
- return false;
20
- return Object.values(menu).some(function (item) { return 'icon' in item && !!item.icon; });
21
- }, [menu, withIcon]);
22
- var withRightComponent = useMemo(function () {
23
- return Object.values(menu).some(function (item) { return 'rightComponent' in item && !!item.rightComponent; });
24
- }, [menu]);
25
- var handleClick = function (item, e) {
26
- if (!item.onClick)
27
- return;
28
- if (item.dialog) {
29
- Dialog(__assign({}, item.dialog)).then(function (result) {
30
- if (result && item.onClick) {
31
- item.onClick(e);
32
- }
33
- });
34
- }
35
- else {
36
- item.onClick(e);
37
- }
38
- };
39
- return (_jsx("ul", { className: "smenu ".concat(styles.ul, " ").concat(className || ''), style: style, children: Object.values(menu).map(function (item, key) {
40
- var _a = item, fullComponent = _a.fullComponent, icon = _a.icon, title = _a.title, rightComponent = _a.rightComponent, seperator = _a.seperator, href = _a.href, style = _a.style, itemProps = _a.itemProps, type = _a.type, items = _a.items, menuProps = _a.menuProps, subMenuPopoverProps = _a.subMenuPopoverProps, other = __rest(_a, ["fullComponent", "icon", "title", "rightComponent", "seperator", "href", "style", "itemProps", "type", "items", "menuProps", "subMenuPopoverProps"]);
41
- var hasSubmenu = type === 'submenu' && Array.isArray(items) && items.length > 0;
42
- if (fullComponent)
43
- return React.cloneElement(fullComponent, { key: key });
44
- if (seperator)
45
- return _jsx("li", __assign({ className: styles.seperator, style: style }, itemProps, other), key);
46
- var Component = (_jsxs(_Fragment, { children: [withIconComponent && _jsx("div", { className: styles.menuicon, children: icon }), _jsx("div", { className: styles.menutitle, children: title }), withRightComponent && _jsx("div", { className: styles.rightmenu, children: rightComponent })] }));
47
- if (hasSubmenu) {
48
- return (_jsx(Popover, __assign({ component: _jsx("li", __assign({ style: style }, itemProps, other, { children: Component })), position: "right-top" }, (subMenuPopoverProps || {}), { children: _jsx(Menu, __assign({ menu: items }, (menuProps || {}))) }), key));
49
- }
50
- return (_jsx("li", __assign({ style: style, onClick: function (e) { return handleClick(item, e); } }, itemProps, other, { children: href ? _jsx(Link, { href: href, children: Component }) : Component }), key));
51
- }) }));
52
- });
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