@jk-core/components 0.0.62 → 0.0.64

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.
@@ -1,3 +1,12 @@
1
+ button {
2
+ border: none;
3
+ background-color: transparent;
4
+ user-select: none;
5
+ -webkit-user-select: none;
6
+ -moz-user-select: none;
7
+ cursor: pointer;
8
+ }
9
+
1
10
  .calendar {
2
11
  width: 100%;
3
12
  min-width: 300px;
@@ -0,0 +1,214 @@
1
+ @use "../../styles/mediaQuery.scss" as media;
2
+
3
+ .day-tile {
4
+ min-height: 310px;
5
+ padding: 5px;
6
+ background-color: var(--white);
7
+
8
+ &__tile {
9
+ display: flex;
10
+ flex-direction: column;
11
+ justify-content: space-between;
12
+ gap: 5px;
13
+ }
14
+
15
+ &__weeks {
16
+ display: flex;
17
+ justify-content: space-between;
18
+ font-weight: 400;
19
+ font-size: 1em;
20
+
21
+ &--date {
22
+ flex: 1 0;
23
+ display: flex;
24
+ justify-content: center;
25
+ align-items: center;
26
+ min-width: 40px;
27
+ padding: 5px 0;
28
+ }
29
+ }
30
+
31
+ &__week {
32
+ display: flex;
33
+ justify-content: space-between;
34
+ }
35
+
36
+ &__day {
37
+ display: flex;
38
+ justify-content: center;
39
+ align-items: center;
40
+ flex-direction: column;
41
+ width: 100%;
42
+ min-width: 40px;
43
+ min-height: 40px;
44
+ border-radius: 40px;
45
+ padding: 5px;
46
+ border: none;
47
+ font-weight: 400;
48
+ font-size: 1em;
49
+
50
+ &:hover {
51
+ @include media.pc {
52
+ background-color: var(--G-5);
53
+ }
54
+ }
55
+
56
+ &:active {
57
+ background-color: var(--G-10);
58
+ }
59
+
60
+ &--today {
61
+ color: var(--P-50);
62
+ font-weight: 600;
63
+ }
64
+
65
+ &--selected {
66
+ background-color: var(--P-50) !important;
67
+ color: var(--white) !important;
68
+ font-weight: 600;
69
+ }
70
+
71
+ &--before {
72
+ color: var(--G-40);
73
+ }
74
+
75
+ &--tile {
76
+ border-radius: 10px;
77
+ gap: 5px;
78
+ }
79
+ }
80
+ }
81
+
82
+ .month-tile {
83
+ min-height: 310px;
84
+ padding: 5px;
85
+ background-color: var(--white);
86
+ display: grid;
87
+ grid-template-columns: repeat(3, 1fr);
88
+ grid-template-rows: repeat(4, 1fr);
89
+ gap: 5px;
90
+
91
+ &__month {
92
+ display: flex;
93
+ flex-direction: column;
94
+ justify-content: center;
95
+ align-items: center;
96
+ padding: 5px;
97
+ border-radius: 10px;
98
+
99
+ svg {
100
+ width: 15px;
101
+ height: 15px;
102
+ cursor: pointer;
103
+ }
104
+
105
+ &:hover {
106
+ @include media.pc {
107
+ background-color: var(--G-5);
108
+ }
109
+ }
110
+
111
+ &:active {
112
+ background-color: var(--G-10);
113
+ }
114
+
115
+ &--selected {
116
+ background-color: var(--P-50) !important;
117
+ color: var(--white) !important;
118
+ }
119
+
120
+ &--today {
121
+ color: var(--P-50);
122
+ font-weight: 600;
123
+ }
124
+
125
+ &--tile {
126
+ justify-content: flex-start;
127
+ gap: 5px;
128
+ }
129
+ }
130
+ }
131
+
132
+ .year-tile {
133
+ min-height: 310px;
134
+ padding: 5px;
135
+ background-color: var(--white);
136
+ position: relative;
137
+ height: 310px;
138
+ display: flex;
139
+ flex-direction: column;
140
+ align-items: center;
141
+ overflow: auto;
142
+ gap: 10px;
143
+
144
+ &::-webkit-scrollbar {
145
+ display: none;
146
+ }
147
+
148
+ &__blank {
149
+ height: calc(50% - 40px);
150
+ flex-shrink: 0;
151
+
152
+ &:last-child {
153
+ height: 50%;
154
+ }
155
+ }
156
+
157
+ &__year {
158
+ min-width: 50%;
159
+ display: flex;
160
+ flex-direction: column;
161
+ align-items: center;
162
+ justify-content: center;
163
+ min-height: 40px;
164
+ border-radius: 6px;
165
+ flex-shrink: 0;
166
+ overflow: hidden;
167
+ font-weight: 400;
168
+ font-size: 1.2em;
169
+
170
+ &:hover {
171
+ @include media.pc {
172
+ background-color: var(--P-5);
173
+ }
174
+ }
175
+
176
+ &:active {
177
+ background-color: var(--P-10);
178
+ }
179
+
180
+ &--border {
181
+ border: 1px solid var(--G-30);
182
+ background-color: var(--P-5);
183
+
184
+ &:hover {
185
+ @include media.pc {
186
+ background-color: var(--P-10);
187
+ }
188
+ }
189
+ }
190
+
191
+ &--year {
192
+ height: 40px;
193
+ display: flex;
194
+ align-items: center;
195
+ justify-content: center;
196
+ }
197
+
198
+ &--selected {
199
+ color: var(--white);
200
+ background-color: var(--P-50) !important;
201
+ }
202
+
203
+ &--tile {
204
+ display: flex;
205
+ align-items: center;
206
+ justify-content: center;
207
+ min-height: 40px;
208
+ color: var(--G-80);
209
+ width: 100%;
210
+ background-color: var(--white);
211
+ border-top: var(--P-50);
212
+ }
213
+ }
214
+ }
@@ -0,0 +1,91 @@
1
+ :root {
2
+ --white: #ffffff;
3
+ --black: #000000;
4
+ --P-5: #eff5ff;
5
+ --P-10: #d3e1fb;
6
+ --P-20: #a7c4f7;
7
+ --P-30: #7ca6f3;
8
+ --P-40: #5089ef;
9
+ --P-50: #246beb;
10
+ --P-60: #1d56bc;
11
+ --P-70: #16408d;
12
+ --P-90: #07152f;
13
+ --P-100: #000000;
14
+ --S-5: #edf1f5;
15
+ --S-10: #cdd7e4;
16
+ --S-20: #b4c4d6;
17
+ --S-30: #99b0cb;
18
+ --S-40: #2a5c96;
19
+ --S-50: #003675;
20
+ --S-60: #002b5e;
21
+ --S-70: #002036;
22
+ --S-80: #00162f;
23
+ --S-90: #000b17;
24
+ --G-5: #f8f8f8;
25
+ --G-10: #f0f0f0;
26
+ --G-20: #e4e4e4;
27
+ --G-30: #d8d8d8;
28
+ --G-40: #c6c6c6;
29
+ --G-50: #8e8e8e;
30
+ --G-60: #717171;
31
+ --G-70: #555555;
32
+ --G-80: #2d2d2d;
33
+ --G-90: #1d1d1d;
34
+ --Point-5: #fdf2f3;
35
+ --Point-10: #f8d6d8;
36
+ --Point-20: #f5a3a8;
37
+ --Point-30: #f1747c;
38
+ --Point-40: #ec4651;
39
+ --Point-50: #e71825;
40
+ --Point-60: #b9131e;
41
+ --Point-70: #8b0e16;
42
+ --Point-80: #5c0a0f;
43
+ --Point-90: #2e0507;
44
+ --Warning-5: #fff8e9;
45
+ --Warning-10: #ffeac1;
46
+ --Warning-20: #ffe2a7;
47
+ --Warning-30: #ffd47c;
48
+ --Warning-40: #ffc550;
49
+ --Warning-50: #ffb724;
50
+ --Warning-60: #98690a;
51
+ --Warning-70: #66490e;
52
+ --Warning-80: #4d370b;
53
+ --Warning-90: #332507;
54
+ --Success-5: #eef7f0;
55
+ --Success-10: #cee9d4;
56
+ --Success-20: #b2dcbb;
57
+ --Success-30: #8cca99;
58
+ --Success-40: #33a14b;
59
+ --Success-50: #008a1e;
60
+ --Success-60: #006e18;
61
+ --Success-70: #005312;
62
+ --Success-80: #00370c;
63
+ --Success-90: #002207;
64
+ --Info-5: #e9f0ff;
65
+ --Info-10: #d4e1ff;
66
+ --Info-20: #a9c3ff;
67
+ --Info-30: #7da4ff;
68
+ --Info-40: #5286ff;
69
+ --Info-50: #2768ff;
70
+ --Info-60: #1f53cc;
71
+ --Info-70: #173e99;
72
+ --Info-80: #0c1f4d;
73
+ --Info-90: #040a1a;
74
+ --Red: #e40000;
75
+ --Red2: #ffe4e4;
76
+ --Green: #2fb400;
77
+ --Green-2: #d7ffe0;
78
+ --Orange: #ff8800;
79
+ --Orange-5: #ffead1;
80
+ --Orange-10: #ffdacc;
81
+ --Orange-30: #ff8f66;
82
+ --Orange-40: #ff6a33;
83
+ --Orange-50: #ff4500;
84
+ --Orange-60: #d53209;
85
+ --Orange-70: #992900;
86
+ --Orange-80: #661c00;
87
+ --Orange-90: #330e00;
88
+ --Modal-Shadow: #0000005a;
89
+ --Modal-Background: #6666663a;
90
+ --Calendar-Background: #ffffff;
91
+ }
@@ -0,0 +1,3 @@
1
+ @import "variables";
2
+ @import "calendar";
3
+ @import "tile";
@@ -0,0 +1,129 @@
1
+ .calendar {
2
+ width: 100%;
3
+ min-width: 300px;
4
+ border: 1px solid var(--G-30);
5
+ border-radius: 10px;
6
+ overflow: hidden;
7
+ color: var(--G-80);
8
+ background-color: var(--white);
9
+ }
10
+
11
+ .calendar__close {
12
+ display: flex;
13
+ justify-content: flex-end;
14
+ align-items: center;
15
+ padding: 5px 5px 0 0;
16
+ }
17
+
18
+ .calendar__close svg {
19
+ width: 15px;
20
+ height: 15px;
21
+ cursor: pointer;
22
+ }
23
+
24
+ .view {
25
+ position: relative;
26
+ margin: 0 auto;
27
+ width: 90%;
28
+ display: flex;
29
+ justify-content: space-between;
30
+ align-items: center;
31
+ background-color: #f3f4f8;
32
+ border-radius: 10px;
33
+ }
34
+
35
+ .view__block {
36
+ position: absolute;
37
+ background-color: #fff;
38
+ left: 0;
39
+ height: 100%;
40
+ border: 2px solid var(--G-30);
41
+ width: 33.3%;
42
+ border-radius: 10px;
43
+ transition: 0.3s;
44
+ }
45
+
46
+ .view__block--second {
47
+ left: 33%;
48
+ }
49
+
50
+ .view__block--last {
51
+ left: 66.6%;
52
+ }
53
+
54
+ .view__selector {
55
+ position: relative;
56
+ height: 40px;
57
+ flex: 1 0;
58
+ display: flex;
59
+ align-items: center;
60
+ justify-content: center;
61
+ color: var(--G-60);
62
+ font-size: 1em;
63
+ font-weight: 400;
64
+ }
65
+
66
+ .view__selector--selected {
67
+ color: var(--G-80);
68
+ font-size: 1em;
69
+ font-weight: 600;
70
+ }
71
+
72
+ .nav {
73
+ height: 60px;
74
+ display: flex;
75
+ justify-content: space-between;
76
+ align-items: center;
77
+ padding: 0 5px;
78
+ border-bottom: 1px solid var(--G-30);
79
+ font-size: 1.3em;
80
+ font-weight: 400;
81
+ }
82
+
83
+ .nav__button {
84
+ display: flex;
85
+ align-items: center;
86
+ justify-content: center;
87
+ width: 40px;
88
+ height: 40px;
89
+ padding: 10px;
90
+ border-radius: 100%;
91
+ }
92
+
93
+ .nav__button:active {
94
+ background-color: var(--G-30);
95
+ }
96
+
97
+ .nav__button:disabled {
98
+ cursor: not-allowed;
99
+ fill: var(--G-40);
100
+ background-color: transparent;
101
+ }
102
+
103
+ .nav__label {
104
+ flex: 1 0;
105
+ display: flex;
106
+ align-items: center;
107
+ justify-content: space-around;
108
+ font-size: 1.1em;
109
+ font-weight: 400;
110
+ }
111
+
112
+ .nav__label--date {
113
+ display: flex;
114
+ align-items: center;
115
+ justify-content: center;
116
+ border-radius: 5px;
117
+ padding: 5px 10px;
118
+ font-size: 1.2em;
119
+ font-weight: 400;
120
+ }
121
+
122
+ .nav__label--date svg {
123
+ width: 15px;
124
+ height: 15px;
125
+ }
126
+
127
+ .nav__label--date-selected {
128
+ background-color: var(--S-10);
129
+ }
package/src/main.tsx ADDED
@@ -0,0 +1,6 @@
1
+ import { createRoot } from 'react-dom/client';
2
+ import Calendar from './Calendar';
3
+
4
+ createRoot(document.getElementById('root')!).render(
5
+ <Calendar date={new Date()} />,
6
+ );
@@ -1,79 +0,0 @@
1
- @use "../mixin.module.scss" as mixin;
2
- @use "../../../styles/mediaQuery.scss" as media;
3
-
4
- .body {
5
- @include mixin.body;
6
-
7
- &__tile {
8
- display: flex;
9
- flex-direction: column;
10
- justify-content: space-between;
11
- gap: 5px;
12
- }
13
-
14
- &__weeks {
15
- display: flex;
16
- justify-content: space-between;
17
- font-weight: 400;
18
- font-size: 1em;
19
-
20
- &--date {
21
- flex: 1 0;
22
- display: flex;
23
- justify-content: center;
24
- align-items: center;
25
- min-width: 40px;
26
- padding: 5px 0;
27
- }
28
- }
29
-
30
- &__week {
31
- display: flex;
32
- justify-content: space-between;
33
- }
34
-
35
- &__day {
36
- display: flex;
37
- justify-content: center;
38
- align-items: center;
39
- flex-direction: column;
40
- width: 100%;
41
- min-width: 40px;
42
- min-height: 40px;
43
- border-radius: 100%;
44
- padding: 5px;
45
- border: none;
46
- font-weight: 400;
47
- font-size: 1em;
48
-
49
- &:hover {
50
- @include media.pc {
51
- background-color: var(--G-5);
52
- }
53
- }
54
-
55
- &:active {
56
- background-color: var(--G-10);
57
- }
58
-
59
- &--today {
60
- color: var(--P-50);
61
- font-weight: 600;
62
- }
63
-
64
- &--selected {
65
- background-color: var(--P-50) !important;
66
- color: var(--white) !important;
67
- font-weight: 600;
68
- }
69
-
70
- &--before {
71
- color: var(--G-40);
72
- }
73
-
74
- &--tile {
75
- border-radius: 10px;
76
- gap: 5px;
77
- }
78
- }
79
- }
@@ -1,44 +0,0 @@
1
- @use "../mixin.module.scss" as mixin;
2
-
3
- .body {
4
- display: grid;
5
- grid-template-columns: repeat(3, 1fr);
6
- grid-template-rows: repeat(4, 1fr);
7
- gap: 5px;
8
-
9
- @include mixin.body;
10
-
11
- &__month {
12
- display: flex;
13
- flex-direction: column;
14
- justify-content: center;
15
- align-items: center;
16
- padding: 5px;
17
- border-radius: 10px;
18
-
19
- svg {
20
- width: 15px;
21
- height: 15px;
22
- cursor: pointer;
23
- }
24
-
25
- &:active {
26
- background-color: var(--G-10);
27
- }
28
-
29
- &--selected {
30
- background-color: var(--P-50) !important;
31
- color: var(--white) !important;
32
- }
33
-
34
- &--today {
35
- color: var(--P-50);
36
- font-weight: 600;
37
- }
38
-
39
- &--tile {
40
- justify-content: flex-start;
41
- gap: 5px;
42
- }
43
- }
44
- }
@@ -1,85 +0,0 @@
1
- @use "../mixin.module.scss" as mixin;
2
- @use "../../../styles/mediaQuery.scss" as media;
3
-
4
- .body {
5
- @include mixin.body;
6
-
7
- position: relative;
8
- height: 310px;
9
- display: flex;
10
- flex-direction: column;
11
- align-items: center;
12
- overflow: auto;
13
- gap: 10px;
14
-
15
- &::-webkit-scrollbar {
16
- display: none;
17
- }
18
-
19
- &__blank {
20
- height: calc(50% - 40px);
21
- flex-shrink: 0;
22
-
23
- &:last-child {
24
- height: 50%;
25
- }
26
- }
27
-
28
- &__year {
29
- min-width: 50%;
30
- display: flex;
31
- flex-direction: column;
32
- align-items: center;
33
- justify-content: center;
34
- min-height: 40px;
35
- border-radius: 6px;
36
- flex-shrink: 0;
37
- overflow: hidden;
38
- font-weight: 400;
39
- font-size: 1.2em;
40
-
41
- &:hover {
42
- @include media.pc {
43
- background-color: var(--P-5);
44
- }
45
- }
46
-
47
- &:active {
48
- background-color: var(--P-10);
49
- }
50
-
51
- &--border {
52
- border: 1px solid var(--G-30);
53
- background-color: var(--P-5);
54
-
55
- &:hover {
56
- @include media.pc {
57
- background-color: var(--P-10);
58
- }
59
- }
60
- }
61
-
62
- &--year {
63
- height: 40px;
64
- display: flex;
65
- align-items: center;
66
- justify-content: center;
67
- }
68
-
69
- &--selected {
70
- color: var(--white);
71
- background-color: var(--P-50) !important;
72
- }
73
-
74
- &--tile {
75
- display: flex;
76
- align-items: center;
77
- justify-content: center;
78
- min-height: 40px;
79
- color: var(--G-80);
80
- width: 100%;
81
- background-color: var(--white);
82
- border-top: var(--P-50);
83
- }
84
- }
85
- }