@ardium-ui/ui 3.5.1 → 3.5.3

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,204 +1,204 @@
1
- @use './dropdown-arrow.scss' as DA;
2
- @use './mixins.scss' as DM;
3
- @use './coloring.scss' as CM;
4
- @use '../variables' as ARD;
5
-
6
- $grid-size: 2.5rem;
7
-
8
- .ard-calendar {
9
- @include CM.typeColors();
10
- width: 18.5rem;
11
- user-select: none;
12
-
13
- //! top toolbar
14
- .ard-calendar__top-toolbar {
15
- .ard-calendar__calendar-header {
16
- display: flex;
17
- justify-content: space-between;
18
- align-items: center;
19
- width: 100%;
20
- padding: 0.75rem 0;
21
-
22
- .ard-dropdown-arrow {
23
- @include DA.dropdown-arrow();
24
- }
25
- }
26
- }
27
- .ard-years-view {
28
- .ard-dropdown-arrow {
29
- rotate: 180deg;
30
- }
31
- }
32
- //! weekdays
33
- .ard-calendar__weekdays {
34
- display: grid;
35
- grid-template-columns: repeat(7, $grid-size);
36
- align-items: center;
37
- padding: 0 0.375rem 0.5rem 0.375rem;
38
-
39
- .ard-calendar__weekday {
40
- text-align: center;
41
- font-size: 0.875rem;
42
- font-weight: 500;
43
- color: ARD.$text;
44
- }
45
- }
46
- //! days grid
47
- .ard-calendar__days-grid {
48
- padding: 0.375rem;
49
- padding-top: 0;
50
- display: grid;
51
- grid-template-columns: repeat(7, $grid-size);
52
- position: relative;
53
- outline: none;
54
-
55
- > * {
56
- max-width: 100%;
57
- box-sizing: border-box;
58
- aspect-ratio: 1;
59
- }
60
- &.ard-reserve-top-row {
61
- padding-top: $grid-size;
62
- }
63
- .ard-calendar__floating-month {
64
- position: absolute;
65
- top: 0;
66
- left: 0;
67
- width: 100%;
68
- box-sizing: border-box;
69
- aspect-ratio: 7;
70
- padding-left: 1rem;
71
- display: flex;
72
- align-items: center;
73
- font-size: 0.875rem;
74
- font-weight: 500;
75
- color: ARD.$text3;
76
- letter-spacing: 0.5px;
77
- z-index: 2;
78
- pointer-events: none;
79
- }
80
- }
81
- //! years grid
82
- .ard-calendar__simple-grid {
83
- border-top: 1px solid ARD.$detail-ultralight;
84
- margin-top: 0.25rem;
85
- display: grid;
86
- grid-template-columns: repeat(4, 1fr);
87
- grid-template-rows: repeat(6, $grid-size);
88
- position: relative;
89
- outline: none;
90
-
91
- > * {
92
- max-width: 100%;
93
- box-sizing: border-box;
94
- aspect-ratio: 7/4; //it has to be the same height as in the days view
95
- //before it was 7/7 (1) because there are 7 entries in a single row
96
- //now there are 4 entries, and thus 7/4
97
- }
98
- }
99
- //! common in both grids
100
- .ard-calendar__entry {
101
- z-index: 1;
102
- cursor: pointer;
103
- outline: none;
104
- padding: 0.125rem;
105
-
106
- .ard-calendar__entry-button {
107
- width: 100%;
108
- height: 100%;
109
- padding: 0;
110
- display: flex;
111
- align-items: center;
112
- justify-content: center;
113
- font-size: 0.875rem;;
114
- background: transparent;
115
- border: 1px solid transparent;
116
- border-radius: 9999px;
117
- position: relative;
118
- cursor: pointer;
119
-
120
- .ard-focus-overlay {
121
- @include DM.focus-overlay();
122
- z-index: -1;
123
- background: var(--ard-cmpcl--bg-colored);
124
- border: 2px solid transparent;
125
- transition: border-color 0.1s ease, opacity 0.1s ease;
126
- }
127
- }
128
- &.ard-calendar__entry-empty {
129
- cursor: default;
130
- }
131
- &.ard-calendar-today {
132
- .ard-calendar__entry-button {
133
- border-color: ARD.$detail;
134
- }
135
- }
136
- &.ard-calendar__entry-highlighted {
137
- .ard-focus-overlay {
138
- opacity: 20%;
139
- }
140
- }
141
- &.ard-calendar__entry-selected {
142
- .ard-calendar__entry-button {
143
- color: var(--ard-cmpcl--on-bg-colored);
144
- }
145
- .ard-focus-overlay {
146
- opacity: 100%;
147
- }
148
-
149
- &.ard-calendar-today {
150
- .ard-focus-overlay {
151
- border-color: ARD.$bg;
152
- }
153
- }
154
- }
155
- &.ard-calendar__entry-disabled {
156
- pointer-events: none;
157
- opacity: 50%;
158
-
159
- .ard-calendar__entry-button {
160
- cursor: default;
161
- }
162
- .ard-focus-overlay {
163
- background: var(--ard-cmpcl--overlay);
164
- }
165
- &.ard-calendar__entry-highlighted {
166
- .ard-focus-overlay {
167
- opacity: 15%;
168
- }
169
- }
170
- }
171
- }
172
- .ard-calendar__day-labels {
173
- font-size: 0.8125rem;
174
- color: ARD.$text3;
175
- height: 1.25rem;
176
- position: relative;
177
-
178
- > * {
179
- display: flex;
180
- align-items: center;
181
- justify-content: center;
182
- aspect-ratio: unset;
183
- }
184
- &::after {
185
- content: '';
186
- position: absolute;
187
- width: 100%;
188
- height: 1px;
189
- background: ARD.$detail-ultralight;
190
- bottom: 0;
191
- }
192
- }
193
- }
194
- .ard-readonly,
195
- .ard-disabled {
196
- .ard-calendar {
197
- pointer-events: none;
198
- }
199
- }
200
- .ard-disabled {
201
- .ard-calendar {
202
- opacity: 50%;
203
- }
204
- }
1
+ @use './dropdown-arrow.scss' as DA;
2
+ @use './mixins.scss' as DM;
3
+ @use './coloring.scss' as CM;
4
+ @use '../variables' as ARD;
5
+
6
+ $grid-size: 2.5rem;
7
+
8
+ .ard-calendar {
9
+ @include CM.typeColors();
10
+ width: 18.5rem;
11
+ user-select: none;
12
+
13
+ //! top toolbar
14
+ .ard-calendar__top-toolbar {
15
+ .ard-calendar__calendar-header {
16
+ display: flex;
17
+ justify-content: space-between;
18
+ align-items: center;
19
+ width: 100%;
20
+ padding: 0.75rem 0;
21
+
22
+ .ard-dropdown-arrow {
23
+ @include DA.dropdown-arrow();
24
+ }
25
+ }
26
+ }
27
+ .ard-years-view {
28
+ .ard-dropdown-arrow {
29
+ rotate: 180deg;
30
+ }
31
+ }
32
+ //! weekdays
33
+ .ard-calendar__weekdays {
34
+ display: grid;
35
+ grid-template-columns: repeat(7, $grid-size);
36
+ align-items: center;
37
+ padding: 0 0.375rem 0.5rem 0.375rem;
38
+
39
+ .ard-calendar__weekday {
40
+ text-align: center;
41
+ font-size: 0.875rem;
42
+ font-weight: 500;
43
+ color: ARD.$text;
44
+ }
45
+ }
46
+ //! days grid
47
+ .ard-calendar__days-grid {
48
+ padding: 0.375rem;
49
+ padding-top: 0;
50
+ display: grid;
51
+ grid-template-columns: repeat(7, $grid-size);
52
+ position: relative;
53
+ outline: none;
54
+
55
+ > * {
56
+ max-width: 100%;
57
+ box-sizing: border-box;
58
+ aspect-ratio: 1;
59
+ }
60
+ &.ard-reserve-top-row {
61
+ padding-top: $grid-size;
62
+ }
63
+ .ard-calendar__floating-month {
64
+ position: absolute;
65
+ top: 0;
66
+ left: 0;
67
+ width: 100%;
68
+ box-sizing: border-box;
69
+ aspect-ratio: 7;
70
+ padding-left: 1rem;
71
+ display: flex;
72
+ align-items: center;
73
+ font-size: 0.875rem;
74
+ font-weight: 500;
75
+ color: ARD.$text3;
76
+ letter-spacing: 0.5px;
77
+ z-index: 2;
78
+ pointer-events: none;
79
+ }
80
+ }
81
+ //! years grid
82
+ .ard-calendar__simple-grid {
83
+ border-top: 1px solid ARD.$detail-ultralight;
84
+ margin-top: 0.25rem;
85
+ display: grid;
86
+ grid-template-columns: repeat(4, 1fr);
87
+ grid-template-rows: repeat(6, $grid-size);
88
+ position: relative;
89
+ outline: none;
90
+
91
+ > * {
92
+ max-width: 100%;
93
+ box-sizing: border-box;
94
+ aspect-ratio: 7/4; //it has to be the same height as in the days view
95
+ //before it was 7/7 (1) because there are 7 entries in a single row
96
+ //now there are 4 entries, and thus 7/4
97
+ }
98
+ }
99
+ //! common in both grids
100
+ .ard-calendar__entry {
101
+ z-index: 1;
102
+ cursor: pointer;
103
+ outline: none;
104
+ padding: 0.125rem;
105
+
106
+ .ard-calendar__entry-button {
107
+ width: 100%;
108
+ height: 100%;
109
+ padding: 0;
110
+ display: flex;
111
+ align-items: center;
112
+ justify-content: center;
113
+ font-size: 0.875rem;;
114
+ background: transparent;
115
+ border: 1px solid transparent;
116
+ border-radius: 9999px;
117
+ position: relative;
118
+ cursor: pointer;
119
+
120
+ .ard-focus-overlay {
121
+ @include DM.focus-overlay();
122
+ z-index: -1;
123
+ background: var(--ard-cmpcl--bg-colored);
124
+ border: 2px solid transparent;
125
+ transition: border-color 0.1s ease, opacity 0.1s ease;
126
+ }
127
+ }
128
+ &.ard-calendar__entry-empty {
129
+ cursor: default;
130
+ }
131
+ &.ard-calendar-today {
132
+ .ard-calendar__entry-button {
133
+ border-color: ARD.$detail;
134
+ }
135
+ }
136
+ &.ard-calendar__entry-highlighted {
137
+ .ard-focus-overlay {
138
+ opacity: 20%;
139
+ }
140
+ }
141
+ &.ard-calendar__entry-selected {
142
+ .ard-calendar__entry-button {
143
+ color: var(--ard-cmpcl--on-bg-colored);
144
+ }
145
+ .ard-focus-overlay {
146
+ opacity: 100%;
147
+ }
148
+
149
+ &.ard-calendar-today {
150
+ .ard-focus-overlay {
151
+ border-color: ARD.$bg;
152
+ }
153
+ }
154
+ }
155
+ &.ard-calendar__entry-disabled {
156
+ pointer-events: none;
157
+ opacity: 50%;
158
+
159
+ .ard-calendar__entry-button {
160
+ cursor: default;
161
+ }
162
+ .ard-focus-overlay {
163
+ background: var(--ard-cmpcl--overlay);
164
+ }
165
+ &.ard-calendar__entry-highlighted {
166
+ .ard-focus-overlay {
167
+ opacity: 15%;
168
+ }
169
+ }
170
+ }
171
+ }
172
+ .ard-calendar__day-labels {
173
+ font-size: 0.8125rem;
174
+ color: ARD.$text3;
175
+ height: 1.25rem;
176
+ position: relative;
177
+
178
+ > * {
179
+ display: flex;
180
+ align-items: center;
181
+ justify-content: center;
182
+ aspect-ratio: unset;
183
+ }
184
+ &::after {
185
+ content: '';
186
+ position: absolute;
187
+ width: 100%;
188
+ height: 1px;
189
+ background: ARD.$detail-ultralight;
190
+ bottom: 0;
191
+ }
192
+ }
193
+ }
194
+ .ard-readonly,
195
+ .ard-disabled {
196
+ .ard-calendar {
197
+ pointer-events: none;
198
+ }
199
+ }
200
+ .ard-disabled {
201
+ .ard-calendar {
202
+ opacity: 50%;
203
+ }
204
+ }