ar-design 0.3.33 → 0.3.34

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 (29) hide show
  1. package/dist/assets/css/components/data-display/kanban-board/styles.css +3 -2
  2. package/dist/assets/css/components/feedback/progress/progress.css +1 -0
  3. package/dist/assets/css/components/feedback/progress/statuses.css +188 -0
  4. package/dist/assets/css/components/form/button-action/styles.css +2 -2
  5. package/dist/assets/css/components/form/button-group/{button-group.css → styles.css} +5 -2
  6. package/dist/assets/css/core/ar-core.css +2 -2
  7. package/dist/components/data-display/kanban-board/index.js +16 -2
  8. package/dist/components/feedback/alert/IProps.d.ts +0 -25
  9. package/dist/components/feedback/alert/index.js +0 -2
  10. package/dist/components/feedback/modal/IProps.d.ts +0 -34
  11. package/dist/components/feedback/notification/IProps.d.ts +0 -61
  12. package/dist/components/feedback/popover/IProps.d.ts +0 -68
  13. package/dist/components/feedback/progress/IProps.d.ts +0 -30
  14. package/dist/components/feedback/progress/index.js +1 -0
  15. package/dist/components/feedback/tooltip/IProps.d.ts +0 -25
  16. package/dist/components/form/button/IProps.d.ts +2 -49
  17. package/dist/components/form/button-action/IProps.d.ts +2 -4
  18. package/dist/components/form/button-action/index.js +1 -1
  19. package/dist/components/form/button-group/index.d.ts +1 -1
  20. package/dist/components/form/button-group/index.js +8 -7
  21. package/dist/components/form/checkbox/IProps.d.ts +2 -13
  22. package/dist/components/form/checkbox/index.js +2 -2
  23. package/dist/components/form/date-picker/Props.d.ts +0 -34
  24. package/dist/components/form/input/IProps.d.ts +1 -30
  25. package/dist/components/form/input/index.js +3 -3
  26. package/dist/libs/types/index.d.ts +3 -2
  27. package/package.json +1 -1
  28. package/dist/assets/css/components/form/button-group/variant/filled/core.css +0 -3
  29. package/dist/assets/css/components/form/button-group/variant/outlined/core.css +0 -3
@@ -3,7 +3,7 @@
3
3
  flex-direction: column;
4
4
  max-width: 100%;
5
5
  min-width: 100%;
6
- border-radius: var(--border-radius-lg);
6
+ border-radius: var(--border-radius-sm);
7
7
  overflow-x: hidden;
8
8
 
9
9
  > .columns {
@@ -23,13 +23,14 @@
23
23
  min-width: 350px;
24
24
  border-radius: var(--border-radius-sm);
25
25
  user-select: none;
26
+ overflow: hidden;
26
27
 
27
28
  > .title {
28
29
  display: flex;
29
30
  flex-direction: row;
30
31
  align-items: center;
31
32
  padding: 0.5rem 1rem;
32
- color: var(--gray-500);
33
+ color: var(--gray-700);
33
34
 
34
35
  > h4 {
35
36
  font-size: 0.7rem;
@@ -47,3 +47,4 @@
47
47
  }
48
48
 
49
49
  @import url("./animations.css");
50
+ @import url("./statuses.css");
@@ -0,0 +1,188 @@
1
+ /* #region PRIMARY */
2
+ .ar-progress {
3
+ > .ar-progress-bar {
4
+ &.filled {
5
+ &.primary {
6
+ background-color: var(--blue-500);
7
+ }
8
+ }
9
+ }
10
+
11
+ > .ar-progress-value {
12
+ &.filled {
13
+ &.primary {
14
+ background-color: var(--blue-400);
15
+ }
16
+ }
17
+ }
18
+ }
19
+ /* #endregion */
20
+ /* PRIMARY */
21
+
22
+ /* #region PRIMARY-LIGHT */
23
+ .ar-progress {
24
+ > .ar-progress-bar {
25
+ &.filled {
26
+ &.primary-light {
27
+ background-color: var(--blue-500);
28
+ }
29
+ }
30
+ }
31
+
32
+ > .ar-progress-value {
33
+ &.filled {
34
+ &.primary-light {
35
+ background-color: var(--blue-400);
36
+ }
37
+ }
38
+ }
39
+ }
40
+ /* #endregion */
41
+ /* PRIMARY-LIGHT */
42
+
43
+ /* #region SECONDARY */
44
+ .ar-progress {
45
+ > .ar-progress-bar {
46
+ &.filled {
47
+ &.secondary {
48
+ background-color: var(--blue-500);
49
+ }
50
+ }
51
+ }
52
+
53
+ > .ar-progress-value {
54
+ &.filled {
55
+ &.secondary {
56
+ background-color: var(--blue-400);
57
+ }
58
+ }
59
+ }
60
+ }
61
+ /* #endregion */
62
+ /* SECONDARY */
63
+
64
+ /* #region SUCCESS */
65
+ .ar-progress {
66
+ > .ar-progress-bar {
67
+ &.filled {
68
+ &.success {
69
+ background-color: var(--green-500);
70
+ }
71
+ }
72
+ }
73
+
74
+ > .ar-progress-value {
75
+ &.filled {
76
+ &.success {
77
+ background-color: var(--green-400);
78
+ }
79
+ }
80
+ }
81
+ }
82
+ /* #endregion */
83
+ /* SUCCESS */
84
+
85
+ /* #region WARNING */
86
+ .ar-progress {
87
+ > .ar-progress-bar {
88
+ &.filled {
89
+ &.warning {
90
+ background-color: var(--orange-500);
91
+ }
92
+ }
93
+ }
94
+
95
+ > .ar-progress-value {
96
+ &.filled {
97
+ &.warning {
98
+ background-color: var(--orange-400);
99
+ }
100
+ }
101
+ }
102
+ }
103
+ /* #endregion */
104
+ /* WARNING */
105
+
106
+ /* #region DANGER */
107
+ .ar-progress {
108
+ > .ar-progress-bar {
109
+ &.filled {
110
+ &.danger {
111
+ background-color: var(--red-500);
112
+ }
113
+ }
114
+ }
115
+
116
+ > .ar-progress-value {
117
+ &.filled {
118
+ &.danger {
119
+ background-color: var(--red-400);
120
+ }
121
+ }
122
+ }
123
+ }
124
+ /* #endregion */
125
+ /* DANGER */
126
+
127
+ /* #region INFORMATION */
128
+ .ar-progress {
129
+ > .ar-progress-bar {
130
+ &.filled {
131
+ &.information {
132
+ background-color: var(--red-500);
133
+ }
134
+ }
135
+ }
136
+
137
+ > .ar-progress-value {
138
+ &.filled {
139
+ &.information {
140
+ background-color: var(--red-400);
141
+ }
142
+ }
143
+ }
144
+ }
145
+ /* #endregion */
146
+ /* INFORMATION */
147
+
148
+ /* #region DARK */
149
+ .ar-progress {
150
+ > .ar-progress-bar {
151
+ &.filled {
152
+ &.dark {
153
+ background-color: var(--red-500);
154
+ }
155
+ }
156
+ }
157
+
158
+ > .ar-progress-value {
159
+ &.filled {
160
+ &.dark {
161
+ background-color: var(--red-400);
162
+ }
163
+ }
164
+ }
165
+ }
166
+ /* #endregion */
167
+ /* DARK */
168
+
169
+ /* #region LIGHT */
170
+ .ar-progress {
171
+ > .ar-progress-bar {
172
+ &.filled {
173
+ &.light {
174
+ background-color: var(--red-500);
175
+ }
176
+ }
177
+ }
178
+
179
+ > .ar-progress-value {
180
+ &.filled {
181
+ &.light {
182
+ background-color: var(--red-400);
183
+ }
184
+ }
185
+ }
186
+ }
187
+ /* #endregion */
188
+ /* LIGHT */
@@ -14,11 +14,11 @@
14
14
  z-index: 1051;
15
15
  transition: visibility 250ms, opacity 250ms;
16
16
  }
17
- .ar-action-buttons::after {
17
+ /* .ar-action-buttons::after {
18
18
  position: absolute;
19
19
  top: 0.5rem;
20
20
  left: 100%;
21
21
  content: "";
22
22
  border: solid 10px transparent;
23
23
  border-left-color: var(--gray-200);
24
- }
24
+ } */
@@ -6,6 +6,8 @@
6
6
  }
7
7
  .ar-button-group > .ar-button,
8
8
  .ar-button-group > .ar-button:is(.ar-button-shape) {
9
+ border: solid 1px transparent;
10
+ border-right-color: rgba(var(--black-rgb), 0.1);
9
11
  border-radius: 0;
10
12
  }
11
13
  .ar-button-group > .ar-button:first-child,
@@ -15,9 +17,10 @@
15
17
  }
16
18
  .ar-button-group > .ar-button:last-child,
17
19
  .ar-button-group .ar-button:is(.ar-button-shape):last-child {
20
+ border: none;
18
21
  border-top-right-radius: var(--border-radius-sm);
19
22
  border-bottom-right-radius: var(--border-radius-sm);
20
23
  }
21
24
 
22
- @import url("./variant/filled/core.css");
23
- @import url("./variant/outlined/core.css");
25
+ /* @import url("./variant/filled/core.css");
26
+ @import url("./variant/outlined/core.css"); */
@@ -24,6 +24,8 @@
24
24
  /* Height */
25
25
 
26
26
  /* #region Color Palette */
27
+ @import url("./color-palette.css");
28
+
27
29
  :root {
28
30
  --white: #fff;
29
31
  --white-rgb: 255, 255, 255;
@@ -50,8 +52,6 @@
50
52
  --dark-rgb: 52, 58, 64;
51
53
  }
52
54
  /* #endregion */
53
-
54
- @import url("./color-palette.css");
55
55
  /* Color Palette */
56
56
 
57
57
  /* #region Fonts */
@@ -41,13 +41,27 @@ const KanbanBoard = function ({ trackBy, columns, onChange }) {
41
41
  event.dataTransfer.clearData("fromColumn");
42
42
  _hoverItemIndex.current = null;
43
43
  };
44
+ const darkenColor = (hex, percent) => {
45
+ let num = parseInt(hex.slice(1), 16), amt = Math.round(2.55 * percent), R = (num >> 16) - amt, G = ((num >> 8) & 0x00ff) - amt, B = (num & 0x0000ff) - amt;
46
+ return ("#" +
47
+ (0x1000000 +
48
+ (R < 255 ? (R < 0 ? 0 : R) : 255) * 0x10000 +
49
+ (G < 255 ? (G < 0 ? 0 : G) : 255) * 0x100 +
50
+ (B < 255 ? (B < 0 ? 0 : B) : 255))
51
+ .toString(16)
52
+ .slice(1));
53
+ };
44
54
  // useEffects
45
55
  useEffect(() => setData(columns), [columns]);
46
56
  return (React.createElement("div", { className: "ar-kanban-board" },
47
57
  React.createElement("div", { className: "columns" }, data.map((board, index) => (React.createElement("div", { key: index, className: "column", onDragOver: (event) => event.preventDefault(), onDrop: handleDrop(board.key) },
48
- React.createElement("div", { className: "title" },
58
+ React.createElement("div", { className: "title", style: {
59
+ backgroundColor: board.titleColor ?? "transparent",
60
+ borderBottom: `solid 1px ${darkenColor(board.titleColor ?? "", 10)}`,
61
+ color: darkenColor(board.titleColor ?? "", 60),
62
+ } },
49
63
  React.createElement("h4", null, board.title.toLocaleUpperCase("tr")),
50
- board.items.length > 0 && React.createElement("span", null, board.items.length)),
64
+ React.createElement("span", null, board.items.length > 0 ? board.items.length : "")),
51
65
  React.createElement("div", { className: "items" },
52
66
  React.createElement(DnD, { key: board.key, data: board.items, renderItem: (item, index) => {
53
67
  return (React.createElement("div", { key: index, className: "item", onDragOver: (event) => {
@@ -5,32 +5,7 @@ interface IProps extends IChildren, IVariant<{
5
5
  }>, IStatus<{
6
6
  component: "alert";
7
7
  }>, IBorder {
8
- /**
9
- * Uyarı mesajı içeriğidir.
10
- *
11
- * `string` veya özel `message` tipi olabilir.
12
- *
13
- * Örneğin;
14
- *
15
- * ```jsx
16
- * <Alert message="İşlem başarıyla tamamlandı." />
17
- * ```
18
- */
19
8
  message?: message;
20
- /**
21
- * Mesaj içindeki vurgulanacak kelime veya ifadeleri belirtir.
22
- *
23
- * Bu kelimeler mesaj içinde bold veya farklı stillerle öne çıkarılabilir.
24
- *
25
- * Örneğin;
26
- *
27
- * ```jsx
28
- * <Alert
29
- * message="Kritik hata oluştu: sunucuya ulaşılamıyor."
30
- * emphasize={["...", "..."]}
31
- * />
32
- * ```
33
- */
34
9
  emphasize?: string[];
35
10
  }
36
11
  export default IProps;
@@ -21,9 +21,7 @@ const Alert = ({ children, message, variant = "filled", status = "primary", bord
21
21
  const originalTag = currentMessage.substring(startIndex, endIndex);
22
22
  const lastValue = currentMessage.substring(endIndex);
23
23
  currentMessage = `${firstValue} <span class="ar-alert-tag">${originalTag}</span> ${lastValue}`;
24
- // Update the lowerCaseMessage to reflect the change
25
24
  _lowerCaseMessage = currentMessage.toLocaleLowerCase();
26
- // Find the next occurrence of the tag
27
25
  startIndex = _lowerCaseMessage.indexOf(_lowerCaseEmphasize, startIndex + `<span class="ar-alert-tag">${originalTag}</span>`.length);
28
26
  }
29
27
  return currentMessage;
@@ -1,46 +1,12 @@
1
1
  import { IChildren, ISize } from "../../../libs/types/IGlobalProps";
2
2
  import IPopoverProps from "../../feedback/popover/IProps";
3
3
  interface IProps extends IChildren, ISize, React.HTMLAttributes<HTMLDivElement> {
4
- /**
5
- * Modal'ın açık olup olmadığını kontrol eden ve değiştiren değerler.
6
- *
7
- * - `get`: Modal açık mı?
8
- * - `set`: Aç/kapa işlemini yapan fonksiyon.
9
- *
10
- * Örneğin;
11
- *
12
- * ```jsx
13
- * const [isOpen, setIsOpen] = useState(false);
14
- *
15
- * <Modal open={{ get: isOpen, set: setIsOpen }} />
16
- * ```
17
- */
18
4
  open: {
19
5
  get: boolean;
20
6
  set: React.Dispatch<React.SetStateAction<boolean>>;
21
7
  };
22
8
  closePopover?: IPopoverProps;
23
- /**
24
- * Modal başlığı.
25
- *
26
- * Örneğin;
27
- *
28
- * ```jsx
29
- * <Modal title="Bilgilendirme" />
30
- * ```
31
- */
32
9
  title?: string;
33
- /**
34
- * Modal alt içerik alanı (footer).
35
- *
36
- * Genellikle buton veya açıklamalar içerir.
37
- *
38
- * Örneğin;
39
- *
40
- * ```jsx
41
- * <Modal footer={<button onClick={onClose}>Kapat</button>} />
42
- * ```
43
- */
44
10
  footer?: React.ReactNode;
45
11
  disableCloseOnBackdrop?: boolean;
46
12
  disableCloseOnEsc?: boolean;
@@ -1,70 +1,9 @@
1
1
  import { Direction, Status } from "../../../libs/core/application/contexts/Notification";
2
2
  interface IProps {
3
- /**
4
- * Bildirim başlığı.
5
- *
6
- * Örneğin;
7
- *
8
- * ```jsx
9
- * <Notification title="Başarılı" />
10
- * ```
11
- */
12
3
  title: string;
13
- /**
14
- * Bildirimin içeriğinde gösterilecek opsiyonel mesaj.
15
- *
16
- * Örneğin;
17
- *
18
- * ```jsx
19
- * <Notification message="İşlem başarıyla tamamlandı." />
20
- * ```
21
- */
22
4
  message?: string;
23
- /**
24
- * Bildirimin durumu.
25
- *
26
- * `Status` tipinde olmalıdır.
27
- *
28
- * Kabul edilen değerler:
29
- * - `success`: Başarılı durum bildirimi.
30
- * - `warning`: Uyarı durumu bildirimi.
31
- * - `information`: Bilgilendirme durumu.
32
- * - `error`: Hata durumu bildirimi.
33
- *
34
- * Örneğin;
35
- *
36
- * ```jsx
37
- * <Notification status="success" />
38
- * ```
39
- */
40
5
  status: Status | number;
41
- /**
42
- * Bildirimin ekranda hangi köşede görüneceği.
43
- *
44
- * `Direction` tipinden olmalıdır.
45
- *
46
- * Geçerli değerler:
47
- * - `top-left`: Sol üst köşe
48
- * - `top-right`: Sağ üst köşe
49
- * - `bottom-left`: Sol alt köşe
50
- * - `bottom-right`: Sağ alt köşe
51
- *
52
- * Örneğin;
53
- *
54
- * ```jsx
55
- * <Notification direction="top-right" />
56
- * ```
57
- */
58
6
  direction: Direction;
59
- /**
60
- * Bildirimin tetiklenip tetiklenmediğini belirten boolean değer.
61
- *
62
- * Örneğin;
63
- *
64
- * ```jsx
65
- * <Notification trigger={true} />
66
- * ```
67
- */
68
7
  trigger: boolean;
69
8
  }
70
9
  export default IProps;
@@ -1,79 +1,11 @@
1
1
  import { IChildren } from "../../../libs/types/IGlobalProps";
2
2
  interface IProps extends IChildren {
3
- /**
4
- * Popover başlığı.
5
- *
6
- * Örneğin;
7
- *
8
- * ```jsx
9
- * <Popover title="Onay Gerekiyor" />
10
- * ```
11
- */
12
3
  title?: string;
13
- /**
14
- * Popover içinde gösterilecek mesaj metni.
15
- *
16
- * Örneğin;
17
- *
18
- * ```jsx
19
- * <Popover message="İşlemi onaylıyor musunuz?" />
20
- * ```
21
- */
22
4
  message?: string;
23
- /**
24
- * Popover içeriği olarak gösterilecek özel React JSX elementi.
25
- *
26
- * Örneğin;
27
- *
28
- * ```jsx
29
- * <Popover content={<CustomContent />} />
30
- * ```
31
- */
32
5
  content?: React.JSX.Element;
33
- /**
34
- * Onay veya iptal durumunda tetiklenen geri çağırma fonksiyonu.
35
- *
36
- * @param confirm - Kullanıcı onay verdiyse true, iptal ettiyse false.
37
- *
38
- * Örneğin;
39
- *
40
- * ```jsx
41
- * <Popover onConfirm={(confirm) => console.log(confirm)} />
42
- * ```
43
- */
44
6
  onConfirm?: (confirm: boolean) => void;
45
- /**
46
- * Popover açıkken sayfa dışında bir yere tıklandığında açık kalsın mı?
47
- *
48
- * Örneğin;
49
- *
50
- * ```jsx
51
- * <Popover windowBlur={true} />
52
- * ```
53
- */
54
7
  windowBlur?: boolean;
55
- /**
56
- * Popover genişliği tam genişlikte mi olacak?
57
- *
58
- * Örneğin;
59
- *
60
- * ```jsx
61
- * <Popover fullWidth={true} />
62
- * ```
63
- */
64
8
  fullWidth?: boolean;
65
- /**
66
- * Buton yapılandırmaları.
67
- *
68
- * - `okButton`: Onay butonunda gösterilecek metin.
69
- * - `cancelButton`: (Opsiyonel) İptal butonunda gösterilecek metin.
70
- *
71
- * Örneğin;
72
- *
73
- * ```jsx
74
- * <Popover config={{ buttons: { okButton: "...", cancelButton: "..." } }} />
75
- * ```
76
- */
77
9
  config?: {
78
10
  buttons: {
79
11
  okay: string;
@@ -1,36 +1,6 @@
1
1
  interface IProps {
2
- /**
3
- * İlerleme çubuğunun mevcut değeri.
4
- * Genellikle 0 ile 100 arasında bir sayı olmalıdır.
5
- *
6
- * Örneğin;
7
- *
8
- * ```jsx
9
- * <Progress value={75} />
10
- * ```
11
- */
12
2
  value: number;
13
- /**
14
- * İlerleme çubuğunun ters yönde dolmasını sağlar.
15
- * Varsayılan olarak false'tur.
16
- *
17
- * Örneğin;
18
- *
19
- * ```jsx
20
- * <Progress value={50} reverse={true} />
21
- * ```
22
- */
23
3
  reverse?: boolean;
24
- /**
25
- * İlerleme değerinin görünür olup olmadığını belirler.
26
- * Varsayılan olarak true olabilir.
27
- *
28
- * Örneğin;
29
- *
30
- * ```jsx
31
- * <Progress value={30} isVisibleValue={false} />
32
- * ```
33
- */
34
4
  isVisibleValue?: boolean;
35
5
  }
36
6
  export default IProps;
@@ -18,6 +18,7 @@ const Progress = ({ value, reverse, isVisibleValue = false }) => {
18
18
  React.createElement("div", { className: `ar-progress-bar ${_arProgressClassName.map((c) => c).join(" ")}` }),
19
19
  React.createElement("div", { className: `ar-progress-value ${_arProgressClassName.map((c) => c).join(" ")}`, style: {
20
20
  width: `${value}%`,
21
+ transition: "width 250ms ease-in-out",
21
22
  } }, !isVisibleValue && React.createElement("span", null,
22
23
  "%",
23
24
  value))));
@@ -1,31 +1,6 @@
1
1
  import { IChildren } from "../../../libs/types/IGlobalProps";
2
2
  interface IProps extends IChildren {
3
- /**
4
- * Gösterilecek metin veya metinler.
5
- *
6
- * Örneğin;
7
- *
8
- * ```jsx
9
- * <Tooltip text="..."><Component>...</Component></Tooltip>
10
- * <Tooltip text={["...", "..."]}><Component>...</Component></Tooltip>
11
- * ```
12
- */
13
3
  text: string | string[];
14
- /**
15
- * Tooltip'in hangi yönde görüneceği.
16
- *
17
- * Geçerli değerler:
18
- * - `top`: Üstte
19
- * - `right`: Sağda
20
- * - `left`: Solda
21
- * - `bottom`: Altta
22
- *
23
- * Örneğin;
24
- *
25
- * ```jsx
26
- * <Tooltip text="Bilgi" direction="right"><Component>...</Component></Tooltip>
27
- * ```
28
- */
29
4
  direction?: "top" | "right" | "left" | "bottom";
30
5
  }
31
6
  export default IProps;
@@ -1,57 +1,10 @@
1
- import { IBorder, IColors, IIcon, ISize, IUpperCase, IVariant } from "../../../libs/types/IGlobalProps";
2
- interface IProps extends IVariant, IColors, IBorder, IIcon, ISize, IUpperCase, Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "color"> {
3
- /**
4
- * Bileşenin şekil varyantını belirtir ve genellikle sadece ikon için kullanılmalıdır.
5
- * İki seçenekten biri olabilir: "circle" veya "square".
6
- *
7
- * - `"circle"`: Daire şeklinde stilize edilmiş bir varyant.
8
- * - `"square"`: Kare şeklinde stilize edilmiş bir varyant.
9
- *
10
- * Bu seçenekler, bileşenin şekilsel görünümünü değiştirir.
11
- *
12
- * Örneğin;
13
- *
14
- * ```jsx
15
- * <Button shape="circle">Hello, World!</Button>
16
- * ```
17
- */
1
+ import { IBorder, IChildren, IColors, IIcon, ISize, IUpperCase, IVariant } from "../../../libs/types/IGlobalProps";
2
+ interface IProps extends IChildren, IVariant, IColors, IBorder, IIcon, ISize, IUpperCase, Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "color"> {
18
3
  shape?: "circle" | "square";
19
- /**
20
- * Bileşenin konumlandırmasını belirlemek için kullanılır.
21
- *
22
- * - `type`: CSS `position` özelliği.
23
- * - `fixed`: Sayfa boyunca sabit konum.
24
- * - `absolute`: Üst öğeye göre konumlandırma.
25
- * - `inset`: Bileşenin konumlanacağı kenar(lar).
26
- * - Örn: `["top", "left"]` => üstten ve soldan hizalanır.
27
- *
28
- * Örneğin;
29
- *
30
- * ```jsx
31
- * <Component
32
- * position={{
33
- * type: "absolute",
34
- * inset: ["top", "left"]
35
- * }}
36
- * />
37
- * ```
38
- */
39
4
  position?: {
40
5
  type: "fixed" | "absolute";
41
6
  inset: ("top" | "right" | "bottom" | "left")[];
42
7
  };
43
- /**
44
- * Bileşenin yatayda tam genişlikte olup olmayacağını belirtir.
45
- *
46
- * - `true`: Bileşen bulunduğu kapsayıcının tüm genişliğini kaplar.
47
- * - `false` veya belirtilmemişse: İçeriğe göre genişlik alır.
48
- *
49
- * Örneğin;
50
- *
51
- * ```jsx
52
- * <Component fullWidth />
53
- * ```
54
- */
55
8
  fullWidth?: boolean;
56
9
  }
57
10
  export default IProps;
@@ -1,10 +1,8 @@
1
- import { Color } from "../../../libs/types";
2
- import { IIcon } from "../../../libs/types/IGlobalProps";
1
+ import { IColors, IIcon } from "../../../libs/types/IGlobalProps";
3
2
  interface IProps {
4
3
  buttons: ({
5
4
  text: string;
6
5
  onClick: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
7
- color?: Color;
8
- } & IIcon)[];
6
+ } & IColors & IIcon)[];
9
7
  }
10
8
  export default IProps;
@@ -62,7 +62,7 @@ const ButtonAction = ({ buttons }) => {
62
62
  React.createElement("span", { ref: _button },
63
63
  React.createElement(Button, { variant: "borderless", color: "light", icon: { element: React.createElement("span", { className: "dotted" }) }, onClick: () => setOpen((prev) => !prev) })),
64
64
  open &&
65
- ReactDOM.createPortal(React.createElement("span", { ref: _list, className: "ar-action-buttons" }, buttons.map((button) => (React.createElement(Button, { style: { display: "flex", justifyContent: "flex-start" }, variant: "borderless", color: button.color ?? "blue", size: "small", icon: button.icon, onClick: button.onClick }, button.text)))), document.body)));
65
+ ReactDOM.createPortal(React.createElement("span", { ref: _list, className: "ar-action-buttons" }, buttons.map((button, index) => (React.createElement(Button, { key: index, style: { display: "flex", justifyContent: "flex-start" }, variant: "borderless", color: button.color ?? "blue", size: "small", icon: button.icon, onClick: button.onClick }, button.text)))), document.body)));
66
66
  };
67
67
  ButtonAction.displayName = "ButtonAction";
68
68
  export default ButtonAction;
@@ -1,5 +1,5 @@
1
1
  import React, { ReactElement } from "react";
2
- import "../../../assets/css/components/form/button-group/button-group.css";
2
+ import "../../../assets/css/components/form/button-group/styles.css";
3
3
  import Button from "../button";
4
4
  declare const ButtonGroup: React.FC<{
5
5
  children: ReactElement<typeof Button> | ReactElement<typeof Button>[];
@@ -1,6 +1,7 @@
1
1
  "use client";
2
2
  import React, { useEffect, useState } from "react";
3
- import "../../../assets/css/components/form/button-group/button-group.css";
3
+ import "../../../assets/css/components/form/button-group/styles.css";
4
+ import Button from "../button";
4
5
  import Alert from "../../feedback/alert";
5
6
  const ButtonGroup = ({ children }) => {
6
7
  // states
@@ -8,11 +9,11 @@ const ButtonGroup = ({ children }) => {
8
9
  useEffect(() => {
9
10
  try {
10
11
  // Çocuk elemanların sadece `Button` bileşenleri olduğundan emin olun
11
- // React.Children.forEach(children, (child) => {
12
- // if (!React.isValidElement(child) || child.type !== Button) {
13
- // throw new Error("ButtonGroup can only have Button elements as children.");
14
- // }
15
- // });
12
+ React.Children.forEach(children, (child) => {
13
+ if (!React.isValidElement(child) || child.type !== Button) {
14
+ throw new Error("ButtonGroup can only have Button elements as children.");
15
+ }
16
+ });
16
17
  // Hata yoksa, error'u temizle
17
18
  setError(null);
18
19
  }
@@ -24,7 +25,7 @@ const ButtonGroup = ({ children }) => {
24
25
  }
25
26
  }
26
27
  }, [children]); // children değişirse kontrolü tekrar yap
27
- return (React.createElement("div", { className: "ar-button-group" }, error ? React.createElement(Alert, { status: "danger", message: error }) : children));
28
+ return React.createElement("div", { className: "ar-button-group" }, error ? React.createElement(Alert, { status: "danger", message: error }) : children);
28
29
  };
29
30
  ButtonGroup.displayName = "ButtonGroup";
30
31
  export default ButtonGroup;
@@ -1,16 +1,5 @@
1
- import { IBorder, IColors, ISize, IUpperCase, IValidation, IVariant } from "../../../libs/types/IGlobalProps";
2
- interface IProps extends IVariant, IColors, IBorder, ISize, IUpperCase, IValidation, Omit<React.InputHTMLAttributes<HTMLInputElement>, "children" | "type" | "size" | "color"> {
3
- /**
4
- * Bileşenin başlığı veya etiket metnidir.
5
- *
6
- * Genellikle input, buton gibi öğelerin ne amaçla kullanıldığını belirtmek için görüntülenir.
7
- *
8
- * Örneğin;
9
- *
10
- * ```jsx
11
- * <Checkbox label="Kullanıcı Adı" />
12
- * ```
13
- */
1
+ import { IBorder, IColors, IUpperCase, IValidation, IVariant } from "../../../libs/types/IGlobalProps";
2
+ interface IProps extends IVariant, IColors, IBorder, IUpperCase, IValidation, Omit<React.InputHTMLAttributes<HTMLInputElement>, "children" | "type" | "size" | "color"> {
14
3
  label?: string;
15
4
  }
16
5
  export default IProps;
@@ -2,11 +2,11 @@
2
2
  import Utils from "../../../libs/infrastructure/shared/Utils";
3
3
  import React, { forwardRef, useRef } from "react";
4
4
  import "../../../assets/css/components/form/checkbox/checkbox.css";
5
- const Checkbox = forwardRef(({ label, size = "normal", color = "blue", border = { radius: "sm" }, upperCase, ...attributes }, ref) => {
5
+ const Checkbox = forwardRef(({ label, color = "blue", border = { radius: "sm" }, upperCase, ...attributes }, ref) => {
6
6
  // refs
7
7
  const _checkbox = useRef(null);
8
8
  const _checkboxClassName = ["ar-checkbox"];
9
- _checkboxClassName.push(...Utils.GetClassName("filled", undefined, attributes.checked ? color : "light", border, size, undefined, attributes.className));
9
+ _checkboxClassName.push(...Utils.GetClassName("filled", undefined, attributes.checked ? color : "light", border, undefined, undefined, attributes.className));
10
10
  return (React.createElement("div", { className: "ar-checkbox-wrapper" },
11
11
  React.createElement("label", null,
12
12
  React.createElement("input", { ref: ref, type: "checkbox", ...attributes, size: 0, onChange: (event) => {
@@ -1,41 +1,7 @@
1
1
  import { IBorder, IColors, ISize, IStatus, IValidation, IVariant } from "../../../libs/types/IGlobalProps";
2
2
  type Props = {
3
- /**
4
- * Bileşenin başlığı veya etiket metnidir.
5
- *
6
- * Genellikle input, buton gibi öğelerin ne amaçla kullanıldığını belirtmek için görüntülenir.
7
- *
8
- * Örneğin;
9
- *
10
- * ```jsx
11
- * <DatePicker label="Başlangıç Saati" />
12
- * ```
13
- */
14
3
  label?: string;
15
- /**
16
- * Bileşenin yanında bir saat (clock/time picker) bileşeni olup olmadığını belirtir.
17
- *
18
- * - `true`: Saat bileşeninide ekleyerek davranır.
19
- * - `false` veya belirtilmemişse: Standart davranış sergiler.
20
- *
21
- * Örneğin;
22
- *
23
- * ```jsx
24
- * <DatePicker isClock />
25
- * ```
26
- */
27
4
  isClock?: boolean;
28
- /**
29
- * Bileşenin değerinde bir değişiklik olduğunda tetiklenen olaydır.
30
- *
31
- * - `value`: Güncel değeri temsil eder. Genellikle string türündedir (örneğin tarih veya tarih, saat).
32
- *
33
- * Örneğin;
34
- *
35
- * ```jsx
36
- * <DatePicker onChange={(value) => console.log(value)} />
37
- * ```
38
- */
39
5
  onChange: (value: string) => void;
40
6
  } & IVariant & IColors & IStatus & IBorder & ISize & IValidation & Omit<React.InputHTMLAttributes<HTMLInputElement>, "children" | "onChange" | "size" | "color">;
41
7
  export default Props;
@@ -2,36 +2,7 @@ import IButtonProps from "../button/IProps";
2
2
  import { Variants } from "../../../libs/types";
3
3
  import { IBorder, IColors, IIcon, ISize, IUpperCase, IValidation, IVariant } from "../../../libs/types/IGlobalProps";
4
4
  interface IProps extends IVariant, IColors, IBorder, IIcon, ISize, IUpperCase, IValidation, Omit<React.InputHTMLAttributes<HTMLInputElement>, "children" | "size" | "color"> {
5
- /**
6
- * Bileşene entegre bir buton özelliği eklemek için kullanılır.
7
- *
8
- * `IButtonProps` tipi ile tanımlanır ve butonun davranışlarını, metnini, tıklama olaylarını vs. içerir.
9
- *
10
- * Örneğin;
11
- *
12
- * ```jsx
13
- * <Input
14
- * button={{
15
- * text: "Gönder",
16
- * onClick: () => console.log("Tıklandı"),
17
- * }}
18
- * />
19
- * ```
20
- */
21
- button?: IButtonProps;
22
- /**
23
- * Bileşenin başına (`before`) veya sonuna (`after`) yardımcı içerikler (ek öğeler) eklemek için kullanılır.
24
- *
25
- * - `variant`: Stil türünü belirtir ("filled" | "outlined" | "dashed" | "borderless").
26
- * - `before`: Bileşenin soluna içerik ekler (örneğin ₺, %, vb.).
27
- * - `after`: Bileşenin sağına içerik ekler.
28
- *
29
- * Örneğin;
30
- *
31
- * ```jsx
32
- * <Input addon={{ variant: "outlined", before: "₺", after: "KDV" }} />
33
- * ```
34
- */
5
+ button?: Omit<IButtonProps, "size" | "shape" | "position" | "fullWidth">;
35
6
  addon?: {
36
7
  variant?: Variants;
37
8
  before?: string | number;
@@ -8,9 +8,9 @@ const Input = forwardRef(({ variant = "outlined", color = "light", size = "norma
8
8
  const [value, setValue] = useState("");
9
9
  // variables
10
10
  const _wrapperClassName = ["ar-input-wrapper"];
11
+ const _inputClassName = [];
11
12
  const _addonBeforeClassName = ["addon-before"];
12
13
  const _addonAfterClassName = ["addon-after"];
13
- const _inputClassName = [];
14
14
  _inputClassName.push(...Utils.GetClassName(variant, undefined, !Utils.IsNullOrEmpty(validation?.text) ? "red" : color, border, size, icon, attributes.className));
15
15
  // addon className
16
16
  if (addon) {
@@ -67,14 +67,14 @@ const Input = forwardRef(({ variant = "outlined", color = "light", size = "norma
67
67
  const { value } = event.target;
68
68
  const currentValue = upperCase ? convertToUpperCase(value) : value;
69
69
  // Yeni değeri oluşturun ve onChange fonksiyonunu çağırın
70
- const newValue = `${addon?.before ?? ""}${currentValue}${addon?.after ?? ""}`;
70
+ // const newValue = `${addon?.before ?? ""}${currentValue}${addon?.after ?? ""}`;
71
71
  attributes.onChange({
72
72
  ...event,
73
73
  target: {
74
74
  ...event.target,
75
75
  id: event.target.id,
76
76
  name: event.target.name,
77
- value: newValue,
77
+ value: currentValue,
78
78
  type: event.target.type,
79
79
  dataset: event.target.dataset,
80
80
  },
@@ -59,11 +59,12 @@ export type TabProps = {
59
59
  };
60
60
  };
61
61
  export type KanbanBoardColumnType<T, TColumnProperties> = {
62
- title: string;
63
62
  key: string;
64
- columnProperties: TColumnProperties;
63
+ title: string;
64
+ titleColor?: string;
65
65
  items: T[];
66
66
  renderItem: (item: T, index: number) => React.JSX.Element;
67
+ columnProperties: TColumnProperties;
67
68
  };
68
69
  export type ValidationShape = {
69
70
  type: "required" | "minimum" | "maximum" | "email";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ar-design",
3
- "version": "0.3.33",
3
+ "version": "0.3.34",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -1,3 +0,0 @@
1
- .ar-button-group > .ar-button:is(.filled):not(:last-child) {
2
- border-right: solid 1px rgba(var(--black-rgb), 0.1) !important;
3
- }
@@ -1,3 +0,0 @@
1
- .ar-button-group > .ar-button:is(.outlined):not(:first-child) {
2
- border-left: transparent !important;
3
- }