@sydsoft/base 1.4.0 → 1.6.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 (56) hide show
  1. package/README.md +9 -0
  2. package/dist/esm/_lib/baseFunctions.d.ts +5 -0
  3. package/dist/esm/_lib/baseFunctions.js +38 -0
  4. package/dist/esm/_lib/inputMask.d.ts +7 -0
  5. package/dist/esm/_lib/inputMask.js +228 -0
  6. package/dist/esm/box/Box.d.ts +9 -0
  7. package/dist/esm/box/Box.js +15 -0
  8. package/dist/esm/box/Box.module.css +152 -0
  9. package/dist/esm/box/BoxContent.d.ts +9 -0
  10. package/dist/esm/box/BoxContent.js +7 -0
  11. package/dist/esm/box/BoxFooter.d.ts +10 -0
  12. package/dist/esm/box/BoxFooter.js +8 -0
  13. package/dist/esm/box/BoxHeader.d.ts +16 -0
  14. package/dist/esm/box/BoxHeader.js +9 -0
  15. package/dist/esm/box/index.d.ts +9 -0
  16. package/dist/esm/box/index.js +9 -0
  17. package/dist/esm/form/Button.d.ts +27 -0
  18. package/dist/esm/form/Button.js +76 -0
  19. package/dist/esm/form/Checkbox.d.ts +23 -0
  20. package/dist/esm/form/Checkbox.js +23 -0
  21. package/dist/esm/form/Dialog.d.ts +19 -0
  22. package/dist/esm/form/Dialog.js +40 -0
  23. package/dist/esm/form/Form.d.ts +10 -0
  24. package/dist/esm/form/Form.js +12 -0
  25. package/dist/esm/form/FormOlustur.d.ts +39 -0
  26. package/dist/esm/form/FormOlustur.js +51 -0
  27. package/dist/esm/form/Input.d.ts +62 -0
  28. package/dist/esm/form/Input.js +207 -0
  29. package/dist/esm/form/Label.d.ts +7 -0
  30. package/dist/esm/form/Label.js +12 -0
  31. package/dist/esm/form/SearchableInput.d.ts +35 -0
  32. package/dist/esm/form/SearchableInput.js +313 -0
  33. package/dist/esm/form/UploadBase.d.ts +25 -0
  34. package/dist/esm/form/UploadBase.js +86 -0
  35. package/dist/esm/form/index.d.ts +9 -0
  36. package/dist/esm/form/index.js +9 -0
  37. package/dist/esm/form/styles/Button.module.css +144 -0
  38. package/dist/esm/form/styles/Input.module.css +220 -0
  39. package/dist/esm/form/styles/Label.module.css +31 -0
  40. package/dist/esm/form/styles/SearchableInput.module.css +79 -0
  41. package/dist/esm/grid/index.d.ts +37 -0
  42. package/dist/esm/grid/index.js +63 -0
  43. package/dist/esm/grid/index.module.css +805 -0
  44. package/dist/esm/icon/icons.json +22 -0
  45. package/dist/esm/icon/index.d.ts +27 -3
  46. package/dist/esm/icon/index.js +18 -37
  47. package/dist/esm/index.d.ts +7 -0
  48. package/dist/esm/index.js +7 -0
  49. package/dist/esm/modal/index.d.ts +23 -0
  50. package/dist/esm/modal/index.js +66 -0
  51. package/dist/esm/modal/index.module.css +74 -0
  52. package/dist/esm/popover/index.d.ts +12 -0
  53. package/dist/esm/popover/index.js +142 -0
  54. package/dist/esm/tooltip/index.d.ts +11 -0
  55. package/dist/esm/tooltip/index.js +119 -0
  56. package/package.json +5 -4
@@ -0,0 +1,220 @@
1
+ .component {
2
+ position: relative;
3
+ display: flex;
4
+ flex-direction: row;
5
+ align-items: center;
6
+ vertical-align: top;
7
+ width: 100%;
8
+ border-width: 1px;
9
+ border-style: solid;
10
+ border-color: rgb(206, 212, 218);
11
+ box-shadow: none;
12
+ background: #ffffff;
13
+ transition: 0.2s ease all;
14
+ border-radius: 6px;
15
+ }
16
+
17
+ .component[data-disabled="true"] {
18
+ background: #ebebeb;
19
+ }
20
+
21
+ .component[data-disabled="true"],
22
+ .component[data-disabled="true"] * {
23
+ pointer-events: none;
24
+ cursor: not-allowed;
25
+ }
26
+
27
+ .component.error {
28
+ border-color: #e70b39;
29
+ }
30
+
31
+ .component:hover {
32
+ border-color: rgba(63, 77, 103, 0.87);
33
+ }
34
+
35
+ .component:focus-within {
36
+ box-shadow: inset 0 0 0 1px rgb(63 77 103 / 87%);
37
+ }
38
+
39
+ .hidePlaceHolder input:not(:focus)::placeholder {
40
+ color: transparent;
41
+ }
42
+
43
+ .component[data-disabled="true"] .loading:before {
44
+ background: #ebebeb;
45
+ }
46
+
47
+ .adornment {
48
+ z-index: 1;
49
+ height: 0.01em;
50
+ max-height: 2em;
51
+ display: flex;
52
+ flex-direction: row;
53
+ align-items: center;
54
+ flex: 0 0 auto;
55
+ flex-wrap: nowrap;
56
+ white-space: nowrap;
57
+ }
58
+
59
+ .adornment.start {
60
+ margin-left: 10px;
61
+ margin-right: -10px;
62
+ }
63
+
64
+ .adornment.end {
65
+ margin-left: -5px;
66
+ margin-right: 10px;
67
+ }
68
+
69
+ .inputBase {
70
+ position: relative;
71
+ display: inline-flex;
72
+ flex-direction: row;
73
+ align-items: center;
74
+ flex: 1;
75
+ overflow: hidden;
76
+ z-index: 0;
77
+ }
78
+
79
+ .label {
80
+ transition: 0.2s ease all;
81
+ color: #000;
82
+ padding: 0;
83
+ display: block;
84
+ transform-origin: left top;
85
+ white-space: nowrap;
86
+ overflow: hidden;
87
+ text-overflow: ellipsis;
88
+ max-width: calc(100% - 20px);
89
+ position: absolute;
90
+ left: 14px;
91
+ top: 48%;
92
+ transform: translateY(-50%) scale(1);
93
+ pointer-events: none;
94
+ opacity: 0.5;
95
+ }
96
+ .required {
97
+ margin-left: 4px;
98
+ color: #ff0202;
99
+ }
100
+
101
+ .inputBase.open {
102
+ position: unset;
103
+ }
104
+
105
+ .inputBase.open .label {
106
+ background: linear-gradient(0deg, var(--label-bg, #ffffff) 50%, rgba(255, 255, 255, 0) 50%);
107
+ transform: translateY(-50%) scale(0.75);
108
+ top: 1px;
109
+ left: 8px;
110
+ padding: 0 10px;
111
+ color: #3f4d67;
112
+ opacity: 1;
113
+ z-index: 2;
114
+ }
115
+
116
+ .input {
117
+ font-size: 1rem;
118
+ line-height: 1.8rem;
119
+ letter-spacing: inherit;
120
+ color: currentcolor;
121
+ box-sizing: content-box;
122
+ background: none;
123
+ margin: 0;
124
+ display: block;
125
+ min-width: 0;
126
+ width: 100%;
127
+ padding: 9px 14px;
128
+ border: none;
129
+ outline: none;
130
+ z-index: 1;
131
+ text-overflow: ellipsis;
132
+ border-radius: 6px;
133
+ }
134
+ .input[type="number"]::-webkit-outer-spin-button,
135
+ .input[type="number"]::-webkit-inner-spin-button {
136
+ appearance: none;
137
+ }
138
+
139
+ .input[readonly] {
140
+ cursor: default;
141
+ }
142
+
143
+ .input:disabled {
144
+ background: #ebebeb;
145
+ cursor: not-allowed;
146
+ color: #000;
147
+ opacity: 0.7;
148
+ }
149
+
150
+ .input.select {
151
+ padding: 13px 14px;
152
+ margin-right: 5px;
153
+ }
154
+
155
+ .input.textarea {
156
+ resize: vertical;
157
+ }
158
+ .input.textarea::-webkit-resizer {
159
+ display: none;
160
+ }
161
+
162
+ .loading {
163
+ position: relative;
164
+ margin: 0 15px;
165
+ width: 24px;
166
+ height: 24px;
167
+ }
168
+ .loading:before {
169
+ position: absolute;
170
+ display: block;
171
+ content: "";
172
+ z-index: 12;
173
+ top: 2px;
174
+ left: 2px;
175
+ width: 20px;
176
+ height: 20px;
177
+ border-radius: 50%;
178
+ background-color: #fff;
179
+ }
180
+
181
+ .loading:after {
182
+ position: absolute;
183
+ display: block;
184
+ content: "";
185
+ z-index: 11;
186
+ width: 12px;
187
+ height: 12px;
188
+ border-radius: 200px 0 0;
189
+ background: linear-gradient(45deg, rgba(0, 0, 0, 0) 0, rgba(69, 154, 215, 1) 50%, rgba(69, 154, 215, 1) 100%);
190
+ animation: loading 0.5s linear infinite;
191
+ }
192
+ @keyframes loading {
193
+ 0% {
194
+ transform-origin: 100% 100%;
195
+ transform: rotate(0deg);
196
+ }
197
+
198
+ 100% {
199
+ transform-origin: 100% 100%;
200
+ transform: rotate(360deg);
201
+ }
202
+ }
203
+
204
+ .checkbox {
205
+ position: relative;
206
+ display: inline-flex;
207
+ align-items: center;
208
+ justify-content: flex-start;
209
+ gap: 8px;
210
+ box-sizing: border-box;
211
+ font-size: 1rem;
212
+ line-height: 1.4375em;
213
+ user-select: none;
214
+ }
215
+
216
+ .checkbox input,
217
+ .checkbox label {
218
+ margin: 0;
219
+ cursor: pointer !important;
220
+ }
@@ -0,0 +1,31 @@
1
+ .label {
2
+ width: 100%;
3
+ height: 100%;
4
+ align-items: center;
5
+ justify-content: flex-end;
6
+ text-align: right;
7
+ color: inherit;
8
+ display: inline-flex;
9
+ flex: 1;
10
+ padding-right: 5px;
11
+ }
12
+
13
+ @media (max-width: 960px) {
14
+ .label {
15
+ justify-content: flex-start !important;
16
+ margin-bottom: 10px;
17
+ padding-left: 5px;
18
+ text-align: left;
19
+ }
20
+ }
21
+
22
+ .required {
23
+ content: " ";
24
+ width: 10px;
25
+ color: #dc160f;
26
+ margin-left: 3px;
27
+ font-size: small;
28
+ vertical-align: super;
29
+ padding: 0 3px;
30
+ cursor: pointer;
31
+ }
@@ -0,0 +1,79 @@
1
+ .component {
2
+ }
3
+ .component input {
4
+ padding: 9px 9px 9px 14px;
5
+ }
6
+
7
+ .listDiv {
8
+ position: relative;
9
+ margin-top: -4px;
10
+ z-index: 1000;
11
+ }
12
+
13
+ .listDiv[data-relative="true"] {
14
+ z-index: 1 !important;
15
+ }
16
+ .listDiv[data-relative="true"] > ul {
17
+ position: relative !important;
18
+ }
19
+
20
+ .list {
21
+ position: absolute;
22
+ top: 3px;
23
+ left: 1%;
24
+ width: 98%;
25
+ height: 0;
26
+ overflow: hidden;
27
+ background: transparent;
28
+ margin: 0;
29
+ padding: 0;
30
+ list-style: none;
31
+ }
32
+
33
+ .list.open {
34
+ height: auto;
35
+ max-height: 300px;
36
+ overflow-x: hidden;
37
+ overflow-y: visible;
38
+ padding: 5px 0;
39
+ border: 1px #ced4da solid;
40
+ background: #fff;
41
+ }
42
+
43
+ .listItem {
44
+ cursor: pointer;
45
+ display: block;
46
+ padding: 8px 10px;
47
+ text-overflow: ellipsis;
48
+ overflow: hidden;
49
+ white-space: nowrap;
50
+ }
51
+
52
+ .listItem:hover,
53
+ .listItem.selected {
54
+ background: #d9e0e3;
55
+ }
56
+
57
+ .listItem.active {
58
+ background: #cbe2ef;
59
+ font-weight: 500;
60
+ }
61
+
62
+ .newCreate {
63
+ margin-right: 5px;
64
+ font-style: italic;
65
+ }
66
+
67
+ .message {
68
+ text-overflow: ellipsis;
69
+ overflow: hidden;
70
+ white-space: nowrap;
71
+ display: block;
72
+ padding: 15px 10px;
73
+ cursor: default;
74
+ }
75
+ .loading {
76
+ padding: 5px 10px;
77
+ background-color: #ced4da38;
78
+ text-align: center;
79
+ }
@@ -0,0 +1,37 @@
1
+ import React from "react";
2
+ export type typeSpacingValues = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
3
+ export type typeJustifyContent = "flex-start" | "flex-end" | "center" | "space-between" | "space-around" | "space-evenly";
4
+ export type typeAlignItems = "stretch" | "flex-start" | "flex-end" | "center" | "baseline";
5
+ export type typeAlignContent = "stretch" | "flex-start" | "flex-end" | "center" | "space-between" | "space-around" | "space-evenly";
6
+ export interface RowProps {
7
+ children: React.ReactNode;
8
+ className?: string;
9
+ style?: React.CSSProperties;
10
+ flexDirection?: "row" | "row-reverse" | "column" | "column-reverse";
11
+ flexWrap?: "wrap" | "wrap-reverse" | "nowrap";
12
+ justifyContent?: typeJustifyContent;
13
+ alignContent?: typeAlignContent;
14
+ alignItems?: typeAlignItems;
15
+ rowSpacing?: typeSpacingValues;
16
+ colSpacing?: typeSpacingValues;
17
+ }
18
+ export declare const Row: React.FC<RowProps>;
19
+ export type GridValues = "auto" | "full" | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
20
+ export interface ColProps {
21
+ children?: React.ReactNode;
22
+ className?: string;
23
+ style?: React.CSSProperties;
24
+ xs?: GridValues;
25
+ sm?: GridValues;
26
+ md?: GridValues;
27
+ lg?: GridValues;
28
+ xl?: GridValues;
29
+ xxl?: GridValues;
30
+ }
31
+ export declare const Col: React.FC<ColProps>;
32
+ export interface HiddenProps {
33
+ children: React.ReactElement;
34
+ hidden?: "xs" | "sm" | "md" | "lg" | "xl" | "xxl";
35
+ onlyHidden?: ("xs" | "sm" | "md" | "lg" | "xl" | "xxl")[];
36
+ }
37
+ export declare const Hidden: React.FC<HiddenProps>;
@@ -0,0 +1,63 @@
1
+ import { __spreadArray } from "tslib";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import React 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;
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", { className: classes, style: style, 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;
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", { className: classes, style: style, children: children }));
39
+ };
40
+ export var Hidden = function (_a) {
41
+ var children = _a.children, hidden = _a.hidden, onlyHidden = _a.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, {
61
+ className: newClassName
62
+ });
63
+ };