ar-design 0.1.27 → 0.1.29
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.
- package/dist/assets/css/components/data-display/divider/divider.css +1 -1
- package/dist/assets/css/components/data-display/paper/paper.css +7 -7
- package/dist/assets/css/components/data-display/typography/paragraph/core.css +1 -0
- package/dist/assets/css/components/data-display/typography/title/core.css +2 -1
- package/dist/assets/css/components/feedback/confirm/confirm.css +51 -0
- package/dist/assets/css/components/feedback/modal/content.css +2 -2
- package/dist/assets/css/components/feedback/modal/modal.css +2 -2
- package/dist/assets/css/components/form/button/button.css +0 -1
- package/dist/assets/css/components/form/button/core/icon.css +15 -0
- package/dist/assets/css/components/form/button-action/button-action.css +39 -0
- package/dist/assets/css/components/form/button-group/button-group.css +6 -6
- package/dist/assets/css/components/form/button-group/variant/filled/core.css +1 -1
- package/dist/assets/css/components/form/button-group/variant/outlined/core.css +1 -1
- package/dist/assets/css/components/form/select/options.css +1 -0
- package/dist/assets/css/components/layout/grid-system/row/core.css +4 -2
- package/dist/assets/css/components/navigation/menu/menu.css +9 -4
- package/dist/assets/css/components/navigation/steps/animation.css +8 -0
- package/dist/assets/css/components/navigation/steps/steps.css +134 -0
- package/dist/components/data-display/card/IProps.d.ts +2 -2
- package/dist/components/data-display/paper/index.js +1 -1
- package/dist/components/data-display/table/index.js +1 -1
- package/dist/components/data-display/typography/paragraph/IProps.d.ts +2 -2
- package/dist/components/data-display/typography/paragraph/Paragraph.js +6 -7
- package/dist/components/data-display/typography/title/IProps.d.ts +2 -2
- package/dist/components/feedback/alert/IProps.d.ts +2 -2
- package/dist/components/feedback/confirm/index.d.ts +9 -0
- package/dist/components/feedback/confirm/index.js +65 -0
- package/dist/components/form/button/index.js +24 -23
- package/dist/components/form/button-action/IProps.d.ts +7 -0
- package/dist/components/form/button-action/index.d.ts +5 -0
- package/dist/components/form/button-action/index.js +53 -0
- package/dist/components/form/date-picker/Props.d.ts +1 -0
- package/dist/components/form/date-picker/index.js +10 -15
- package/dist/components/form/select/Props.d.ts +1 -1
- package/dist/components/form/select/index.js +9 -5
- package/dist/components/layout/IProps.d.ts +4 -4
- package/dist/components/navigation/menu/{Types.d.ts → IProps.d.ts} +3 -2
- package/dist/components/navigation/menu/IProps.js +1 -0
- package/dist/components/navigation/menu/index.d.ts +2 -2
- package/dist/components/navigation/pagination/IProps.d.ts +19 -0
- package/dist/components/navigation/pagination/index.js +13 -12
- package/dist/components/navigation/steps/IProps.d.ts +17 -0
- package/dist/components/navigation/steps/IProps.js +1 -0
- package/dist/components/navigation/steps/index.d.ts +5 -0
- package/dist/components/navigation/steps/index.js +41 -0
- package/dist/index.d.ts +5 -2
- package/dist/index.js +7 -4
- package/dist/libs/core/service/index.d.ts +6 -5
- package/dist/libs/core/service/index.js +7 -4
- package/dist/libs/types/IGlobalProps.d.ts +0 -22
- package/dist/libs/types/index.d.ts +4 -0
- package/package.json +1 -1
- /package/dist/components/{navigation/menu/Types.js → form/button-action/IProps.js} +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
.ar-paper {
|
|
2
|
-
background-color: var(--white);
|
|
3
|
-
padding: 2rem;
|
|
4
|
-
border-radius: var(--border-radius-sm);
|
|
5
|
-
box-shadow: 0 0 20px -15px rgba(var(--black-rgb), 0.25);
|
|
2
|
+
/* background-color: var(--white); */
|
|
3
|
+
/* padding: 2rem; */
|
|
4
|
+
/* border-radius: var(--border-radius-sm); */
|
|
5
|
+
/* box-shadow: 0 0 20px -15px rgba(var(--black-rgb), 0.25); */
|
|
6
6
|
}
|
|
7
7
|
.ar-paper > .header {
|
|
8
8
|
display: flex;
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
justify-content: space-between;
|
|
11
11
|
align-items: center;
|
|
12
12
|
background-color: transparent;
|
|
13
|
-
margin-bottom:
|
|
13
|
+
margin-bottom: 0.75rem;
|
|
14
14
|
}
|
|
15
|
-
.ar-paper > .header > h3 {
|
|
15
|
+
/* .ar-paper > .header > h3 {
|
|
16
16
|
color: var(--gray-700);
|
|
17
|
-
}
|
|
17
|
+
} */
|
|
18
18
|
|
|
19
19
|
.ar-paper > .content {
|
|
20
20
|
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
.ar-confirm-wrapper {
|
|
2
|
+
position: relative;
|
|
3
|
+
}
|
|
4
|
+
.ar-confirm-wrapper > .ar-confirm {
|
|
5
|
+
position: fixed;
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
gap: 1rem 0;
|
|
9
|
+
background-color: rgba(var(--white-rgb), 0.75);
|
|
10
|
+
backdrop-filter: blur(10px);
|
|
11
|
+
width: 250px;
|
|
12
|
+
padding: 10px;
|
|
13
|
+
border-radius: var(--border-radius-sm);
|
|
14
|
+
box-shadow: 0 0 15px -2.5px rgba(var(--black-rgb), 0.1);
|
|
15
|
+
z-index: 5;
|
|
16
|
+
}
|
|
17
|
+
.ar-confirm-wrapper > .ar-confirm::after {
|
|
18
|
+
position: absolute;
|
|
19
|
+
top: 50%;
|
|
20
|
+
transform: translateY(-50%);
|
|
21
|
+
left: 100%;
|
|
22
|
+
content: "";
|
|
23
|
+
border: solid 10px transparent;
|
|
24
|
+
border-left-color: var(--white);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/* #region Open or Close */
|
|
28
|
+
.ar-confirm-wrapper > .ar-confirm:is(.opened) {
|
|
29
|
+
visibility: visible;
|
|
30
|
+
opacity: 1;
|
|
31
|
+
transform: scale(1);
|
|
32
|
+
transition: visibility 250ms, opacity 250ms, transform 250ms ease-in-out;
|
|
33
|
+
z-index: 100;
|
|
34
|
+
}
|
|
35
|
+
.ar-confirm-wrapper > .ar-confirm:is(.closed) {
|
|
36
|
+
visibility: hidden;
|
|
37
|
+
opacity: 0;
|
|
38
|
+
transform: scale(0.8);
|
|
39
|
+
transition: visibility 250ms, opacity 250ms, transform 250ms ease-in-out;
|
|
40
|
+
z-index: 99;
|
|
41
|
+
}
|
|
42
|
+
/* #endregion */
|
|
43
|
+
/* Open or Close */
|
|
44
|
+
|
|
45
|
+
.ar-confirm-wrapper > .ar-confirm > .footer {
|
|
46
|
+
display: flex;
|
|
47
|
+
flex-direction: row;
|
|
48
|
+
justify-content: flex-end;
|
|
49
|
+
align-items: center;
|
|
50
|
+
gap: 0 0.5rem;
|
|
51
|
+
}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
z-index: 100;
|
|
14
14
|
}
|
|
15
15
|
.ar-modal-wrapper:is(.opened) > .ar-modal {
|
|
16
|
-
top:
|
|
16
|
+
top: 4.5rem;
|
|
17
17
|
transform: translateX(-50%) scale(1);
|
|
18
18
|
transition: top 250ms, transform 250ms 300ms ease-in-out;
|
|
19
19
|
}
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
width: 75%;
|
|
44
44
|
}
|
|
45
45
|
.ar-modal-wrapper > .ar-modal.normal {
|
|
46
|
-
width:
|
|
46
|
+
width: 520px;
|
|
47
47
|
}
|
|
48
48
|
.ar-modal-wrapper > .ar-modal.small {
|
|
49
49
|
width: 25%;
|
|
@@ -20,3 +20,18 @@
|
|
|
20
20
|
.ar-button:is(.icon-end):not(.no-content) > .text {
|
|
21
21
|
flex-direction: row-reverse;
|
|
22
22
|
}
|
|
23
|
+
|
|
24
|
+
/* Custom Symbol */
|
|
25
|
+
.ar-button:is(.icon) .dotted::after {
|
|
26
|
+
position: absolute;
|
|
27
|
+
top: 50%;
|
|
28
|
+
left: 50%;
|
|
29
|
+
display: flex;
|
|
30
|
+
justify-content: center;
|
|
31
|
+
align-items: center;
|
|
32
|
+
transform: translate(-50%, -50%);
|
|
33
|
+
content: "⋮";
|
|
34
|
+
width: 100%;
|
|
35
|
+
height: 100%;
|
|
36
|
+
font-size: 1.25rem;
|
|
37
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
.ar-button-action {
|
|
2
|
+
position: relative;
|
|
3
|
+
}
|
|
4
|
+
.ar-button-action > .list {
|
|
5
|
+
position: fixed;
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
background-color: rgba(var(--white-rgb), 0.75);
|
|
9
|
+
backdrop-filter: blur(10px);
|
|
10
|
+
border: solid 1px var(--gray-200);
|
|
11
|
+
border-radius: var(--border-radius-sm);
|
|
12
|
+
box-shadow: 0 0 15px -2.5px rgba(var(--black-rgb), 0.1);
|
|
13
|
+
}
|
|
14
|
+
.ar-button-action > .list::after {
|
|
15
|
+
position: absolute;
|
|
16
|
+
top: 0.5rem;
|
|
17
|
+
left: 100%;
|
|
18
|
+
content: "";
|
|
19
|
+
border: solid 10px transparent;
|
|
20
|
+
border-left-color: var(--gray-200);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/* #region Open or Close */
|
|
24
|
+
.ar-button-action > .list:is(.opened) {
|
|
25
|
+
visibility: visible;
|
|
26
|
+
opacity: 1;
|
|
27
|
+
transform: scale(1);
|
|
28
|
+
transition: visibility 250ms, opacity 250ms, transform 250ms ease-in-out;
|
|
29
|
+
z-index: 100;
|
|
30
|
+
}
|
|
31
|
+
.ar-button-action > .list:is(.closed) {
|
|
32
|
+
visibility: hidden;
|
|
33
|
+
opacity: 0;
|
|
34
|
+
transform: scale(0.8);
|
|
35
|
+
transition: visibility 250ms, opacity 250ms, transform 250ms ease-in-out;
|
|
36
|
+
z-index: 99;
|
|
37
|
+
}
|
|
38
|
+
/* #endregion */
|
|
39
|
+
/* Open or Close */
|
|
@@ -4,17 +4,17 @@
|
|
|
4
4
|
flex-wrap: nowrap;
|
|
5
5
|
width: max-content;
|
|
6
6
|
}
|
|
7
|
-
.ar-button-group
|
|
8
|
-
.ar-button-group
|
|
7
|
+
.ar-button-group .ar-button,
|
|
8
|
+
.ar-button-group .ar-button:is(.ar-button-shape) {
|
|
9
9
|
border-radius: 0;
|
|
10
10
|
}
|
|
11
|
-
.ar-button-group
|
|
12
|
-
.ar-button-group
|
|
11
|
+
.ar-button-group .ar-button:first-child,
|
|
12
|
+
.ar-button-group .ar-button:is(.ar-button-shape):first-child {
|
|
13
13
|
border-top-left-radius: var(--border-radius-sm);
|
|
14
14
|
border-bottom-left-radius: var(--border-radius-sm);
|
|
15
15
|
}
|
|
16
|
-
.ar-button-group
|
|
17
|
-
.ar-button-group
|
|
16
|
+
.ar-button-group .ar-button:last-child,
|
|
17
|
+
.ar-button-group .ar-button:is(.ar-button-shape):last-child {
|
|
18
18
|
border-top-right-radius: var(--border-radius-sm);
|
|
19
19
|
border-bottom-right-radius: var(--border-radius-sm);
|
|
20
20
|
}
|
|
@@ -16,10 +16,11 @@
|
|
|
16
16
|
.row > .col {
|
|
17
17
|
position: relative;
|
|
18
18
|
flex: 1 1 auto;
|
|
19
|
+
/* flex: 1 1 auto;
|
|
19
20
|
min-width: 100%;
|
|
20
21
|
-webkit-box-flex: 1;
|
|
21
22
|
-ms-flex-preferred-size: 0;
|
|
22
|
-
-ms-flex-positive: 1;
|
|
23
|
+
-ms-flex-positive: 1; */
|
|
23
24
|
}
|
|
24
25
|
.row > [class*="col"].left {
|
|
25
26
|
text-align: left;
|
|
@@ -28,5 +29,6 @@
|
|
|
28
29
|
text-align: center;
|
|
29
30
|
}
|
|
30
31
|
.row > [class*="col"].right {
|
|
31
|
-
|
|
32
|
+
display: flex;
|
|
33
|
+
justify-content: flex-end;
|
|
32
34
|
}
|
|
@@ -11,23 +11,28 @@
|
|
|
11
11
|
padding: 0;
|
|
12
12
|
list-style: none;
|
|
13
13
|
}
|
|
14
|
-
|
|
14
|
+
.ar-menu ul li {
|
|
15
|
+
letter-spacing: 1px;
|
|
16
|
+
}
|
|
15
17
|
.ar-menu ul li .item-render {
|
|
16
18
|
display: flex;
|
|
17
19
|
flex-direction: row;
|
|
18
20
|
align-items: center;
|
|
19
21
|
}
|
|
20
22
|
.ar-menu ul li .item-render > a {
|
|
23
|
+
display: block;
|
|
24
|
+
width: 100%;
|
|
25
|
+
height: 2rem;
|
|
21
26
|
color: inherit;
|
|
22
27
|
text-decoration: none;
|
|
23
|
-
|
|
28
|
+
line-height: 2rem;
|
|
24
29
|
}
|
|
25
30
|
.ar-menu ul li .item-render > span {
|
|
26
31
|
display: flex;
|
|
27
32
|
justify-content: center;
|
|
28
33
|
align-items: center;
|
|
29
|
-
width: 2rem;
|
|
30
|
-
height: 2rem;
|
|
34
|
+
min-width: 2rem;
|
|
35
|
+
min-height: 2rem;
|
|
31
36
|
margin-right: 0.75rem;
|
|
32
37
|
border-radius: var(--border-radius-pill);
|
|
33
38
|
}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
.ar-steps {
|
|
2
|
+
}
|
|
3
|
+
.ar-steps > .steps {
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: row;
|
|
6
|
+
justify-content: space-around;
|
|
7
|
+
}
|
|
8
|
+
.ar-steps > .steps > .item {
|
|
9
|
+
position: relative;
|
|
10
|
+
display: flex;
|
|
11
|
+
flex-direction: column;
|
|
12
|
+
flex: 1;
|
|
13
|
+
align-items: flex-start;
|
|
14
|
+
gap: 1rem 0;
|
|
15
|
+
}
|
|
16
|
+
.ar-steps > .steps > .item > .item-icon {
|
|
17
|
+
display: inline-flex;
|
|
18
|
+
justify-content: center;
|
|
19
|
+
align-items: center;
|
|
20
|
+
}
|
|
21
|
+
.ar-steps > .steps > .item:not(:last-child) > .item-icon:has(.pending)::after,
|
|
22
|
+
.ar-steps > .steps > .item:not(:last-child) > .item-icon:has(.in-progress)::after,
|
|
23
|
+
.ar-steps > .steps > .item > .item-icon:has(.completed)::after {
|
|
24
|
+
position: absolute;
|
|
25
|
+
left: calc(50% + 1.25rem);
|
|
26
|
+
transform: translateX(-50%);
|
|
27
|
+
content: "";
|
|
28
|
+
width: 70%;
|
|
29
|
+
height: 4px;
|
|
30
|
+
border-radius: var(--border-radius-pill);
|
|
31
|
+
}
|
|
32
|
+
.ar-steps > .steps > .item:not(:last-child) > .item-icon:has(.pending)::after {
|
|
33
|
+
background-color: var(--gray-300);
|
|
34
|
+
}
|
|
35
|
+
.ar-steps > .steps > .item:not(:last-child) > .item-icon:has(.in-progress)::after {
|
|
36
|
+
background: var(--gray-300);
|
|
37
|
+
background: linear-gradient(90deg, var(--primary) 50%, var(--gray-300) 50%);
|
|
38
|
+
background-color: var(--primary);
|
|
39
|
+
}
|
|
40
|
+
.ar-steps > .steps > .item > .item-icon:has(.completed)::after {
|
|
41
|
+
background-color: var(--success);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.ar-steps > .steps > .item > .item-icon > span {
|
|
45
|
+
display: inline-flex;
|
|
46
|
+
justify-content: center;
|
|
47
|
+
align-items: center;
|
|
48
|
+
width: 2.5rem;
|
|
49
|
+
height: 2.5rem;
|
|
50
|
+
border-radius: var(--border-radius-pill);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.ar-steps > .steps > .item > .item-icon > .pending {
|
|
54
|
+
position: relative;
|
|
55
|
+
background-color: var(--white);
|
|
56
|
+
border: solid 1px var(--gray-500);
|
|
57
|
+
}
|
|
58
|
+
.ar-steps > .steps > .item > .item-icon > .pending::before {
|
|
59
|
+
display: inline-block;
|
|
60
|
+
content: "";
|
|
61
|
+
background-color: transparent;
|
|
62
|
+
width: 1rem;
|
|
63
|
+
height: 1rem;
|
|
64
|
+
border: dotted 3.5px var(--gray-500);
|
|
65
|
+
}
|
|
66
|
+
.ar-steps > .steps > .item > .item-icon > .pending::after {
|
|
67
|
+
position: absolute;
|
|
68
|
+
top: 50%;
|
|
69
|
+
left: 50%;
|
|
70
|
+
transform: translate(-50%, -50%);
|
|
71
|
+
display: inline-block;
|
|
72
|
+
content: "";
|
|
73
|
+
background-color: var(--primary);
|
|
74
|
+
width: 3.5px;
|
|
75
|
+
height: 3.5px;
|
|
76
|
+
border-radius: var(--border-radius-pill);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.ar-steps > .steps > .item > .item-icon > .in-progress {
|
|
80
|
+
background-color: var(--primary);
|
|
81
|
+
box-shadow: 0 0 0 4px var(--white), 0 0 0 5px rgba(var(--primary-rgb), 0.5);
|
|
82
|
+
}
|
|
83
|
+
.ar-steps > .steps > .item > .item-icon > .in-progress::before {
|
|
84
|
+
display: inline-block;
|
|
85
|
+
content: "";
|
|
86
|
+
background-color: transparent;
|
|
87
|
+
width: 1.5rem;
|
|
88
|
+
height: 1.5rem;
|
|
89
|
+
border: dashed 2.5px transparent;
|
|
90
|
+
border-top-color: rgba(var(--white-rgb), 1);
|
|
91
|
+
border-right-color: rgba(var(--white-rgb), 0.75);
|
|
92
|
+
border-bottom-color: rgba(var(--white-rgb), 0.25);
|
|
93
|
+
border-left-color: rgba(var(--white-rgb), 0.1);
|
|
94
|
+
border-radius: var(--border-radius-pill);
|
|
95
|
+
animation: in-progress 1s linear 0s infinite normal both;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.ar-steps > .steps > .item > .item-icon > .completed {
|
|
99
|
+
background-color: var(--success);
|
|
100
|
+
box-shadow: 0 0 0 5px rgba(var(--success-rgb), 0.1);
|
|
101
|
+
}
|
|
102
|
+
.ar-steps > .steps > .item > .item-icon > .completed::before {
|
|
103
|
+
display: inline-block;
|
|
104
|
+
content: "";
|
|
105
|
+
background-color: transparent;
|
|
106
|
+
width: 1rem;
|
|
107
|
+
height: 0.55rem;
|
|
108
|
+
border: solid 2.5px transparent;
|
|
109
|
+
border-left-color: var(--white);
|
|
110
|
+
border-bottom-color: var(--white);
|
|
111
|
+
border-bottom-left-radius: var(--border-radius-sm);
|
|
112
|
+
transform: rotate(-45deg) translate(1px, -1px);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.ar-steps > .steps > .item > .item-informations {
|
|
116
|
+
display: flex;
|
|
117
|
+
flex-direction: column;
|
|
118
|
+
align-items: flex-start;
|
|
119
|
+
gap: 0.5rem 0;
|
|
120
|
+
}
|
|
121
|
+
.ar-steps > .steps > .item > .item-informations > .step {
|
|
122
|
+
color: var(--gray-500);
|
|
123
|
+
font-size: 0.75rem;
|
|
124
|
+
letter-spacing: 1px;
|
|
125
|
+
}
|
|
126
|
+
.ar-steps > .steps > .item > .item-informations > .title {
|
|
127
|
+
font-size: 1.1rem;
|
|
128
|
+
letter-spacing: 1px;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.ar-steps > .content {
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
@import url("./animation.css");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IGlobalProps } from "../../../libs/types/IGlobalProps";
|
|
2
|
-
interface IProps extends IGlobalProps {
|
|
1
|
+
import { IChildren, IGlobalProps } from "../../../libs/types/IGlobalProps";
|
|
2
|
+
interface IProps extends IGlobalProps, IChildren {
|
|
3
3
|
title?: string;
|
|
4
4
|
}
|
|
5
5
|
export default IProps;
|
|
@@ -5,7 +5,7 @@ const { Title } = Typography;
|
|
|
5
5
|
const Paper = ({ children, title, action, }) => {
|
|
6
6
|
return (React.createElement("div", { className: "ar-paper" },
|
|
7
7
|
(title || action) && (React.createElement("div", { className: "header" },
|
|
8
|
-
title &&
|
|
8
|
+
title && React.createElement(Title, { Level: "h3" }, title),
|
|
9
9
|
action && React.createElement("div", { className: "actions-field" }, action))),
|
|
10
10
|
React.createElement("div", { className: "content" }, children)));
|
|
11
11
|
};
|
|
@@ -208,7 +208,7 @@ const Table = function ({ children, data, columns, selections, pagination, confi
|
|
|
208
208
|
}) }, React.isValidElement(render) ? render : String(render)));
|
|
209
209
|
}))))) : (React.createElement("tr", null,
|
|
210
210
|
React.createElement("td", { colSpan: columns.length + 1 }, "Herhangi bir kay\u0131t bulunamad\u0131!")))))),
|
|
211
|
-
|
|
211
|
+
pagination.totalRecords > pagination.perPage && (React.createElement("div", { className: "footer" },
|
|
212
212
|
React.createElement(Pagination, { totalRecords: pagination.totalRecords, perPage: pagination.perPage, onChange: (currentPage) => {
|
|
213
213
|
setCurrentPage(currentPage);
|
|
214
214
|
// Table tarafında yapılan sayfalamayı dışarı aktarmak için kullanılan callback.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ParagraphColors, Status } from "../../../../libs/types";
|
|
2
|
-
import { IGlobalProps } from "../../../../libs/types/IGlobalProps";
|
|
3
|
-
interface IProps extends Omit<IGlobalProps, "status"
|
|
2
|
+
import { IChildren, IGlobalProps } from "../../../../libs/types/IGlobalProps";
|
|
3
|
+
interface IProps extends Omit<IGlobalProps, "status">, IChildren {
|
|
4
4
|
color?: ParagraphColors | Status;
|
|
5
5
|
align?: "left" | "center" | "right";
|
|
6
6
|
}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import React
|
|
2
|
+
import React from "react";
|
|
3
3
|
const Paragraph = ({ children, color, align = "left", size, upperCase = false, }) => {
|
|
4
|
-
|
|
5
|
-
let _className = useRef("ar-typography-paragraph").current;
|
|
4
|
+
let _className = ["ar-typography-paragraph"];
|
|
6
5
|
if (align)
|
|
7
|
-
_className
|
|
6
|
+
_className.push(align);
|
|
8
7
|
if (color)
|
|
9
|
-
_className
|
|
8
|
+
_className.push(color);
|
|
10
9
|
if (size)
|
|
11
|
-
_className
|
|
12
|
-
return (React.createElement("p", { className: _className }, typeof children === "string" && upperCase ? children.toLocaleUpperCase() : children));
|
|
10
|
+
_className.push(size);
|
|
11
|
+
return (React.createElement("p", { className: _className.map((c) => c).join(" ") }, typeof children === "string" && upperCase ? children.toLocaleUpperCase() : children));
|
|
13
12
|
};
|
|
14
13
|
Paragraph.displayName = "Paragraph";
|
|
15
14
|
export default Paragraph;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IGlobalProps } from "../../../../libs/types/IGlobalProps";
|
|
2
|
-
interface IProps extends Omit<IGlobalProps, "size"
|
|
1
|
+
import { IChildren, IGlobalProps } from "../../../../libs/types/IGlobalProps";
|
|
2
|
+
interface IProps extends Omit<IGlobalProps, "size">, IChildren {
|
|
3
3
|
Level: "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
|
|
4
4
|
align?: "left" | "center" | "right";
|
|
5
5
|
size?: "xx-small" | "x-small" | "small" | "medium" | "large" | "x-large" | "xx-large" | "xxx-large" | "smaller" | "larger";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { IGlobalProps } from "../../../libs/types/IGlobalProps";
|
|
1
|
+
import { IChildren, IGlobalProps } from "../../../libs/types/IGlobalProps";
|
|
2
2
|
type message = string | message[];
|
|
3
|
-
interface IProps extends Omit<IGlobalProps, "variant" | "icon"
|
|
3
|
+
interface IProps extends Omit<IGlobalProps, "variant" | "icon">, IChildren {
|
|
4
4
|
message?: message;
|
|
5
5
|
emphasize?: string[];
|
|
6
6
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "../../../assets/css/components/feedback/confirm/confirm.css";
|
|
3
|
+
import { IChildren } from "../../../libs/types/IGlobalProps";
|
|
4
|
+
declare const Confirm: React.FC<{
|
|
5
|
+
title: string;
|
|
6
|
+
message: string;
|
|
7
|
+
onConfirm: (confirm: boolean) => void;
|
|
8
|
+
} & IChildren>;
|
|
9
|
+
export default Confirm;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import React, { useEffect, useRef, useState } from "react";
|
|
3
|
+
import "../../../assets/css/components/feedback/confirm/confirm.css";
|
|
4
|
+
import Button from "../../form/button";
|
|
5
|
+
import Typography from "../../data-display/typography";
|
|
6
|
+
const { Title, Paragraph } = Typography;
|
|
7
|
+
const Confirm = ({ children, title, message, onConfirm }) => {
|
|
8
|
+
// refs
|
|
9
|
+
const _arConfirmWrapper = useRef(null);
|
|
10
|
+
const _arConfirm = useRef(null);
|
|
11
|
+
// states
|
|
12
|
+
const [open, setOpen] = useState(false);
|
|
13
|
+
const [coordinateX, setCoordinatX] = useState(0);
|
|
14
|
+
const [coordinateY, setCoordinatY] = useState(0);
|
|
15
|
+
// methods
|
|
16
|
+
const handleClickOutSide = (event) => {
|
|
17
|
+
const target = event.target;
|
|
18
|
+
if (_arConfirm.current && !_arConfirm.current.contains(target))
|
|
19
|
+
setOpen(false);
|
|
20
|
+
};
|
|
21
|
+
const handleKeys = (event) => {
|
|
22
|
+
const key = event.key;
|
|
23
|
+
if (key === "Escape")
|
|
24
|
+
setOpen(false);
|
|
25
|
+
};
|
|
26
|
+
const handleResizeEvent = () => {
|
|
27
|
+
if (_arConfirmWrapper.current && _arConfirm.current) {
|
|
28
|
+
const wrapperRect = _arConfirmWrapper.current.getBoundingClientRect();
|
|
29
|
+
const confirm = _arConfirm.current.getBoundingClientRect();
|
|
30
|
+
setCoordinatX(wrapperRect.left - 260);
|
|
31
|
+
setCoordinatY(wrapperRect.top - confirm.height / 2);
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
// useEffects
|
|
35
|
+
useEffect(() => {
|
|
36
|
+
if (open) {
|
|
37
|
+
handleResizeEvent();
|
|
38
|
+
document.addEventListener("click", handleClickOutSide);
|
|
39
|
+
document.addEventListener("keydown", handleKeys);
|
|
40
|
+
// Sayfa boyutu değiştirilmesi söz konusu olursa eğer bu kısım çalışacaktır.
|
|
41
|
+
window.addEventListener("resize", handleResizeEvent);
|
|
42
|
+
// Dinleyicileri kaldır.
|
|
43
|
+
return () => {
|
|
44
|
+
document.removeEventListener("click", handleClickOutSide);
|
|
45
|
+
document.removeEventListener("keydown", handleKeys);
|
|
46
|
+
window.removeEventListener("resize", handleResizeEvent);
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
}, [open]);
|
|
50
|
+
return (React.createElement("div", { ref: _arConfirmWrapper, className: "ar-confirm-wrapper", role: "dialog" },
|
|
51
|
+
React.createElement("div", { ref: _arConfirm, className: `ar-confirm ${open ? "opened" : "closed"}`, style: { top: coordinateY, left: coordinateX } },
|
|
52
|
+
React.createElement(Title, { Level: "h4" }, title),
|
|
53
|
+
React.createElement(Paragraph, { size: "small" }, message),
|
|
54
|
+
React.createElement("div", { className: "footer" },
|
|
55
|
+
React.createElement(Button, { status: "success", size: "small", onClick: () => {
|
|
56
|
+
onConfirm(true);
|
|
57
|
+
setOpen(false);
|
|
58
|
+
} }, "Evet"),
|
|
59
|
+
React.createElement(Button, { variant: "outlined", status: "light", size: "small", onClick: () => {
|
|
60
|
+
onConfirm(false);
|
|
61
|
+
setOpen(false);
|
|
62
|
+
} }, "Hay\u0131r"))),
|
|
63
|
+
React.createElement("div", { onClick: () => setOpen((prev) => !prev) }, children)));
|
|
64
|
+
};
|
|
65
|
+
export default Confirm;
|
|
@@ -15,29 +15,30 @@ const Button = ({ children, variant = "filled", shape, status = "primary", borde
|
|
|
15
15
|
_buttonClassName.push(position.type);
|
|
16
16
|
_buttonClassName.push(position.inset.map((_inset) => _inset).join(" "));
|
|
17
17
|
}
|
|
18
|
-
return (React.createElement(
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
? children
|
|
39
|
-
|
|
40
|
-
|
|
18
|
+
return (React.createElement(React.Fragment, null,
|
|
19
|
+
React.createElement("button", { ref: _button, ...attributes, className: _buttonClassName.map((c) => c).join(" "), onClick: (event) => {
|
|
20
|
+
// Disabled gelmesi durumunda işlem yapmasına izin verme...
|
|
21
|
+
if (attributes.disabled)
|
|
22
|
+
return;
|
|
23
|
+
(() => {
|
|
24
|
+
const _current = _button.current;
|
|
25
|
+
const addClass = "active";
|
|
26
|
+
if (_current && !_current.classList.contains(addClass)) {
|
|
27
|
+
// Sınıf ekleniyor...
|
|
28
|
+
_current.classList.add(addClass);
|
|
29
|
+
// Sınıf 500 milisaniye sonra kaldırlacak.
|
|
30
|
+
setTimeout(() => _current.classList.remove(addClass), 750);
|
|
31
|
+
}
|
|
32
|
+
})();
|
|
33
|
+
(() => attributes.onClick && attributes.onClick(event))();
|
|
34
|
+
} },
|
|
35
|
+
React.createElement("span", { className: "text" },
|
|
36
|
+
icon?.element,
|
|
37
|
+
React.createElement("span", null, !shape
|
|
38
|
+
? typeof children === "string" && upperCase
|
|
39
|
+
? children.toLocaleUpperCase()
|
|
40
|
+
: children
|
|
41
|
+
: "")))));
|
|
41
42
|
};
|
|
42
43
|
Button.displayName = "Button";
|
|
43
44
|
export default Button;
|