@thl-ui/styles 0.0.0-stage → 0.1.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.
- package/LICENSE +21 -0
- package/README.md +42 -2
- package/dist/components/alert.css +1 -0
- package/dist/components/app.css +1 -0
- package/dist/components/avatar.css +1 -0
- package/dist/components/badge.css +1 -0
- package/dist/components/button.css +1 -0
- package/dist/components/card.css +1 -0
- package/dist/components/form.css +1 -0
- package/dist/components/nav.css +1 -0
- package/dist/components/overlay.css +1 -0
- package/dist/components/pages.css +1 -0
- package/dist/components/progress.css +1 -0
- package/dist/components/ribbon.css +1 -0
- package/dist/components/table.css +1 -0
- package/dist/components/widgets.css +1 -0
- package/dist/fonts/OFL.txt +93 -0
- package/dist/fonts/open-sans-cyrillic-ext-wght-normal.woff2 +0 -0
- package/dist/fonts/open-sans-cyrillic-wght-normal.woff2 +0 -0
- package/dist/fonts/open-sans-greek-ext-wght-normal.woff2 +0 -0
- package/dist/fonts/open-sans-greek-wght-normal.woff2 +0 -0
- package/dist/fonts/open-sans-latin-ext-wght-normal.woff2 +0 -0
- package/dist/fonts/open-sans-latin-wght-normal.woff2 +0 -0
- package/dist/fonts/open-sans-vietnamese-wght-normal.woff2 +0 -0
- package/dist/fonts.css +70 -0
- package/dist/thl-ui.css +447 -0
- package/dist/tokens.css +376 -0
- package/package.json +48 -4
- package/src/_base.scss +408 -0
- package/src/_mixins.scss +53 -0
- package/src/components/_alert.scss +183 -0
- package/src/components/_avatar.scss +75 -0
- package/src/components/_badge.scss +112 -0
- package/src/components/_button.scss +242 -0
- package/src/components/_card.scss +211 -0
- package/src/components/_form.scss +959 -0
- package/src/components/_nav.scss +738 -0
- package/src/components/_overlay.scss +382 -0
- package/src/components/_progress.scss +103 -0
- package/src/components/_ribbon.scss +136 -0
- package/src/components/_table.scss +215 -0
- package/src/components/_widgets.scss +1050 -0
- package/src/index.scss +16 -0
- package/src/layout/_app.scss +804 -0
- package/src/pages/_pages.scss +691 -0
|
@@ -0,0 +1,382 @@
|
|
|
1
|
+
@use '../mixins' as *;
|
|
2
|
+
|
|
3
|
+
/* modal */
|
|
4
|
+
.#{$p}-modal-backdrop {
|
|
5
|
+
position: fixed;
|
|
6
|
+
inset: 0;
|
|
7
|
+
z-index: v(z-modal);
|
|
8
|
+
background: rgba(0, 0, 0, 0.45);
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: flex-start;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
padding: 30px 16px;
|
|
13
|
+
overflow-y: auto;
|
|
14
|
+
animation: #{$p}-fade-in 0.2s both;
|
|
15
|
+
&--centered {
|
|
16
|
+
align-items: center;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
.#{$p}-modal {
|
|
20
|
+
background: v(surface);
|
|
21
|
+
color: v(text);
|
|
22
|
+
border-radius: v(radius);
|
|
23
|
+
box-shadow: v(shadow-modal);
|
|
24
|
+
width: 600px;
|
|
25
|
+
max-width: 100%;
|
|
26
|
+
display: flex;
|
|
27
|
+
flex-direction: column;
|
|
28
|
+
animation: #{$p}-slide-down 0.25s both;
|
|
29
|
+
outline: none;
|
|
30
|
+
margin: auto 0;
|
|
31
|
+
&--sm {
|
|
32
|
+
width: 300px;
|
|
33
|
+
}
|
|
34
|
+
&--lg {
|
|
35
|
+
width: 900px;
|
|
36
|
+
}
|
|
37
|
+
&--xl {
|
|
38
|
+
width: 1140px;
|
|
39
|
+
}
|
|
40
|
+
&--full {
|
|
41
|
+
width: 100%;
|
|
42
|
+
min-height: calc(100vh - 60px);
|
|
43
|
+
}
|
|
44
|
+
&--scrollable {
|
|
45
|
+
max-height: calc(100vh - 60px);
|
|
46
|
+
}
|
|
47
|
+
&--scrollable &__body {
|
|
48
|
+
overflow-y: auto;
|
|
49
|
+
}
|
|
50
|
+
&__header {
|
|
51
|
+
display: flex;
|
|
52
|
+
align-items: center;
|
|
53
|
+
justify-content: space-between;
|
|
54
|
+
gap: 12px;
|
|
55
|
+
padding: 15px 20px;
|
|
56
|
+
border-bottom: 1px solid v(border-color);
|
|
57
|
+
}
|
|
58
|
+
&__title {
|
|
59
|
+
margin: 0 !important;
|
|
60
|
+
font-size: 18px !important;
|
|
61
|
+
font-weight: 600;
|
|
62
|
+
color: v(heading);
|
|
63
|
+
}
|
|
64
|
+
&__close {
|
|
65
|
+
background: none;
|
|
66
|
+
border: 0;
|
|
67
|
+
font-size: 24px;
|
|
68
|
+
line-height: 1;
|
|
69
|
+
cursor: pointer;
|
|
70
|
+
color: v(text);
|
|
71
|
+
padding: 0 4px;
|
|
72
|
+
&:hover {
|
|
73
|
+
color: v(text-strong);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
&__body {
|
|
77
|
+
padding: 20px;
|
|
78
|
+
}
|
|
79
|
+
&__footer {
|
|
80
|
+
display: flex;
|
|
81
|
+
justify-content: flex-end;
|
|
82
|
+
gap: 8px;
|
|
83
|
+
padding: 15px 20px;
|
|
84
|
+
border-top: 1px solid v(border-color);
|
|
85
|
+
}
|
|
86
|
+
/* confirm dialog */
|
|
87
|
+
&--confirm {
|
|
88
|
+
text-align: center;
|
|
89
|
+
width: 440px;
|
|
90
|
+
}
|
|
91
|
+
&--confirm &__body {
|
|
92
|
+
padding: 30px 30px 10px;
|
|
93
|
+
> h2,
|
|
94
|
+
> h3 {
|
|
95
|
+
font-size: v(h3);
|
|
96
|
+
line-height: 30px;
|
|
97
|
+
margin: 10px 0;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
&--confirm &__footer {
|
|
101
|
+
justify-content: center;
|
|
102
|
+
border-top: 0;
|
|
103
|
+
padding-bottom: 30px;
|
|
104
|
+
}
|
|
105
|
+
&__confirm-icon {
|
|
106
|
+
width: 80px;
|
|
107
|
+
height: 80px;
|
|
108
|
+
border-radius: 50%;
|
|
109
|
+
border: 4px solid currentColor;
|
|
110
|
+
margin: 0 auto 20px;
|
|
111
|
+
display: flex;
|
|
112
|
+
align-items: center;
|
|
113
|
+
justify-content: center;
|
|
114
|
+
font-size: 40px;
|
|
115
|
+
&--warning {
|
|
116
|
+
color: v(color-warning-text);
|
|
117
|
+
}
|
|
118
|
+
&--danger {
|
|
119
|
+
color: v(color-danger-text);
|
|
120
|
+
}
|
|
121
|
+
&--success {
|
|
122
|
+
color: v(color-success-text);
|
|
123
|
+
}
|
|
124
|
+
&--info {
|
|
125
|
+
color: v(color-info-text);
|
|
126
|
+
}
|
|
127
|
+
&--question {
|
|
128
|
+
color: v(color-primary-text);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/* dropdown / menu */
|
|
134
|
+
.#{$p}-dropdown {
|
|
135
|
+
position: relative;
|
|
136
|
+
display: inline-flex;
|
|
137
|
+
}
|
|
138
|
+
.#{$p}-menu {
|
|
139
|
+
position: absolute;
|
|
140
|
+
z-index: v(z-dropdown);
|
|
141
|
+
min-width: 180px;
|
|
142
|
+
padding: 6px 0;
|
|
143
|
+
margin: 0;
|
|
144
|
+
list-style: none;
|
|
145
|
+
background: v(surface);
|
|
146
|
+
border: 1px solid v(border-color);
|
|
147
|
+
border-radius: v(radius);
|
|
148
|
+
box-shadow: v(shadow-lg);
|
|
149
|
+
animation: #{$p}-bounce-in-down 0.4s both;
|
|
150
|
+
text-align: start;
|
|
151
|
+
&--fixed {
|
|
152
|
+
position: fixed;
|
|
153
|
+
}
|
|
154
|
+
&--end {
|
|
155
|
+
inset-inline-end: 0;
|
|
156
|
+
}
|
|
157
|
+
&--start {
|
|
158
|
+
inset-inline-start: 0;
|
|
159
|
+
}
|
|
160
|
+
&--top {
|
|
161
|
+
bottom: 100%;
|
|
162
|
+
margin-bottom: 4px;
|
|
163
|
+
}
|
|
164
|
+
&--bottom {
|
|
165
|
+
top: 100%;
|
|
166
|
+
margin-top: 4px;
|
|
167
|
+
}
|
|
168
|
+
&__item {
|
|
169
|
+
display: flex;
|
|
170
|
+
align-items: center;
|
|
171
|
+
gap: 10px;
|
|
172
|
+
width: 100%;
|
|
173
|
+
padding: 9px 20px;
|
|
174
|
+
color: v(text-strong);
|
|
175
|
+
background: none;
|
|
176
|
+
border: 0;
|
|
177
|
+
font: inherit;
|
|
178
|
+
text-align: start;
|
|
179
|
+
cursor: pointer;
|
|
180
|
+
text-decoration: none;
|
|
181
|
+
white-space: nowrap;
|
|
182
|
+
&:hover,
|
|
183
|
+
&.is-highlighted {
|
|
184
|
+
background: v(surface-muted);
|
|
185
|
+
color: v(theme-text);
|
|
186
|
+
}
|
|
187
|
+
&.is-active {
|
|
188
|
+
color: v(theme-text);
|
|
189
|
+
font-weight: 600;
|
|
190
|
+
}
|
|
191
|
+
&:disabled,
|
|
192
|
+
&.is-disabled {
|
|
193
|
+
opacity: 0.5;
|
|
194
|
+
pointer-events: none;
|
|
195
|
+
}
|
|
196
|
+
&--danger {
|
|
197
|
+
color: v(color-danger-text);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
&__divider {
|
|
201
|
+
height: 1px;
|
|
202
|
+
margin: 6px 0;
|
|
203
|
+
background: v(border-color);
|
|
204
|
+
}
|
|
205
|
+
&__header {
|
|
206
|
+
padding: 8px 20px;
|
|
207
|
+
font-size: 12px;
|
|
208
|
+
color: v(text);
|
|
209
|
+
text-transform: uppercase;
|
|
210
|
+
font-weight: 600;
|
|
211
|
+
letter-spacing: 0.03em;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
/* tooltip / popover */
|
|
216
|
+
.#{$p}-tooltip {
|
|
217
|
+
position: absolute;
|
|
218
|
+
z-index: v(z-popover);
|
|
219
|
+
max-width: 260px;
|
|
220
|
+
padding: 6px 10px;
|
|
221
|
+
font-size: 12px;
|
|
222
|
+
line-height: 1.4;
|
|
223
|
+
color: #fff;
|
|
224
|
+
background: v(color-inverse);
|
|
225
|
+
border-radius: v(radius-sm);
|
|
226
|
+
pointer-events: none;
|
|
227
|
+
animation: #{$p}-fade-in 0.15s both;
|
|
228
|
+
@each $c in (primary, success, info, warning, danger) {
|
|
229
|
+
&--#{$c} {
|
|
230
|
+
background: v(color-#{$c});
|
|
231
|
+
color: on($c);
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
.#{$p}-popover {
|
|
236
|
+
position: absolute;
|
|
237
|
+
z-index: v(z-popover);
|
|
238
|
+
max-width: 300px;
|
|
239
|
+
background: v(surface);
|
|
240
|
+
border: 1px solid v(border-color);
|
|
241
|
+
border-radius: v(radius);
|
|
242
|
+
box-shadow: v(shadow-lg);
|
|
243
|
+
animation: #{$p}-zoom-in 0.15s both;
|
|
244
|
+
&__title {
|
|
245
|
+
padding: 10px 14px;
|
|
246
|
+
font-weight: 600;
|
|
247
|
+
color: v(heading);
|
|
248
|
+
border-bottom: 1px solid v(border-color);
|
|
249
|
+
background: v(surface-muted);
|
|
250
|
+
}
|
|
251
|
+
&__body {
|
|
252
|
+
padding: 10px 14px;
|
|
253
|
+
}
|
|
254
|
+
@each $c in (primary, success, info, warning, danger) {
|
|
255
|
+
&--#{$c} &__title {
|
|
256
|
+
background: v(color-#{$c});
|
|
257
|
+
color: on($c);
|
|
258
|
+
border-color: transparent;
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
/* spinner & preloader */
|
|
264
|
+
.#{$p}-spinner {
|
|
265
|
+
display: inline-block;
|
|
266
|
+
width: 30px;
|
|
267
|
+
height: 30px;
|
|
268
|
+
border: 3px solid v(theme);
|
|
269
|
+
border-left-color: transparent;
|
|
270
|
+
border-right-color: transparent;
|
|
271
|
+
border-radius: 50%;
|
|
272
|
+
animation: #{$p}-spin 0.6s linear infinite;
|
|
273
|
+
&--sm {
|
|
274
|
+
width: 18px;
|
|
275
|
+
height: 18px;
|
|
276
|
+
border-width: 2px;
|
|
277
|
+
}
|
|
278
|
+
&--lg {
|
|
279
|
+
width: 48px;
|
|
280
|
+
height: 48px;
|
|
281
|
+
border-width: 4px;
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
.#{$p}-preloader {
|
|
285
|
+
position: fixed;
|
|
286
|
+
inset: 0;
|
|
287
|
+
z-index: v(z-preloader);
|
|
288
|
+
background: v(surface);
|
|
289
|
+
display: flex;
|
|
290
|
+
align-items: center;
|
|
291
|
+
justify-content: center;
|
|
292
|
+
transition: opacity 0.4s;
|
|
293
|
+
&.is-hidden {
|
|
294
|
+
opacity: 0;
|
|
295
|
+
pointer-events: none;
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
.#{$p}-skeleton {
|
|
300
|
+
background: linear-gradient(90deg, #{v(surface-muted)} 25%, #{v(border-color)} 37%, #{v(surface-muted)} 63%);
|
|
301
|
+
background-size: 400% 100%;
|
|
302
|
+
animation: #{$p}-skeleton 1.4s ease infinite;
|
|
303
|
+
border-radius: v(radius-sm);
|
|
304
|
+
height: 14px;
|
|
305
|
+
margin-bottom: 8px;
|
|
306
|
+
&--circle {
|
|
307
|
+
border-radius: 50%;
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
@keyframes #{$p}-skeleton {
|
|
311
|
+
0% {
|
|
312
|
+
background-position: 100% 50%;
|
|
313
|
+
}
|
|
314
|
+
100% {
|
|
315
|
+
background-position: 0 50%;
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
/* drawer (right-sidebar) */
|
|
320
|
+
.#{$p}-drawer-backdrop {
|
|
321
|
+
position: fixed;
|
|
322
|
+
inset: 0;
|
|
323
|
+
background: rgba(0, 0, 0, 0.3);
|
|
324
|
+
z-index: v(z-overlay);
|
|
325
|
+
animation: #{$p}-fade-in 0.2s;
|
|
326
|
+
}
|
|
327
|
+
.#{$p}-drawer {
|
|
328
|
+
position: fixed;
|
|
329
|
+
top: 0;
|
|
330
|
+
bottom: 0;
|
|
331
|
+
inset-inline-end: 0;
|
|
332
|
+
z-index: calc(#{v(z-overlay)} + 1);
|
|
333
|
+
width: v(right-sidebar-width);
|
|
334
|
+
max-width: 100vw;
|
|
335
|
+
background: v(surface);
|
|
336
|
+
box-shadow: v(shadow-lg);
|
|
337
|
+
display: flex;
|
|
338
|
+
flex-direction: column;
|
|
339
|
+
transform: translateX(100%);
|
|
340
|
+
transition: transform 0.3s ease;
|
|
341
|
+
overflow: hidden;
|
|
342
|
+
&.is-open {
|
|
343
|
+
transform: none;
|
|
344
|
+
}
|
|
345
|
+
&--start {
|
|
346
|
+
inset-inline-end: auto;
|
|
347
|
+
inset-inline-start: 0;
|
|
348
|
+
transform: translateX(-100%);
|
|
349
|
+
}
|
|
350
|
+
&--wide {
|
|
351
|
+
width: 320px;
|
|
352
|
+
}
|
|
353
|
+
&__header {
|
|
354
|
+
display: flex;
|
|
355
|
+
align-items: center;
|
|
356
|
+
justify-content: space-between;
|
|
357
|
+
padding: 0 20px;
|
|
358
|
+
height: v(topbar-height);
|
|
359
|
+
flex-shrink: 0;
|
|
360
|
+
color: #fff;
|
|
361
|
+
background: linear-gradient(to right, #{v(topbar-1)} 1%, #{v(topbar-2)} 100%);
|
|
362
|
+
font-weight: 600;
|
|
363
|
+
}
|
|
364
|
+
&__close {
|
|
365
|
+
background: none;
|
|
366
|
+
border: 0;
|
|
367
|
+
color: inherit;
|
|
368
|
+
font-size: 22px;
|
|
369
|
+
cursor: pointer;
|
|
370
|
+
}
|
|
371
|
+
&__body {
|
|
372
|
+
padding: 20px;
|
|
373
|
+
overflow-y: auto;
|
|
374
|
+
flex: 1;
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
[dir='rtl'] .#{$p}-drawer:not(.is-open) {
|
|
378
|
+
transform: translateX(-100%);
|
|
379
|
+
}
|
|
380
|
+
[dir='rtl'] .#{$p}-drawer--start:not(.is-open) {
|
|
381
|
+
transform: translateX(100%);
|
|
382
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
@use '../mixins' as *;
|
|
2
|
+
|
|
3
|
+
.#{$p}-progress {
|
|
4
|
+
--_h: 8px;
|
|
5
|
+
--_c: #{v(color-primary)};
|
|
6
|
+
display: flex;
|
|
7
|
+
height: var(--_h);
|
|
8
|
+
overflow: hidden;
|
|
9
|
+
background: v(color-light);
|
|
10
|
+
border-radius: v(radius-sm);
|
|
11
|
+
margin-bottom: 18px;
|
|
12
|
+
box-shadow: none;
|
|
13
|
+
&--size-xs {
|
|
14
|
+
--_h: 3px;
|
|
15
|
+
}
|
|
16
|
+
&--size-sm {
|
|
17
|
+
--_h: 5px;
|
|
18
|
+
}
|
|
19
|
+
&--size-md {
|
|
20
|
+
--_h: 8px;
|
|
21
|
+
}
|
|
22
|
+
&--size-lg {
|
|
23
|
+
--_h: 18px;
|
|
24
|
+
}
|
|
25
|
+
&__bar {
|
|
26
|
+
width: 0;
|
|
27
|
+
background: var(--_c);
|
|
28
|
+
color: var(--_on, #fff);
|
|
29
|
+
font-size: 11px;
|
|
30
|
+
line-height: var(--_h);
|
|
31
|
+
text-align: center;
|
|
32
|
+
white-space: nowrap;
|
|
33
|
+
transition:
|
|
34
|
+
width 0.6s ease,
|
|
35
|
+
height 0.6s ease;
|
|
36
|
+
}
|
|
37
|
+
@each $c in $colors {
|
|
38
|
+
&--#{$c} {
|
|
39
|
+
--_c: #{v(color-#{$c})};
|
|
40
|
+
--_on: #{on($c)};
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
&--striped &__bar {
|
|
44
|
+
background-image: linear-gradient(
|
|
45
|
+
45deg,
|
|
46
|
+
rgba(255, 255, 255, 0.15) 25%,
|
|
47
|
+
transparent 25%,
|
|
48
|
+
transparent 50%,
|
|
49
|
+
rgba(255, 255, 255, 0.15) 50%,
|
|
50
|
+
rgba(255, 255, 255, 0.15) 75%,
|
|
51
|
+
transparent 75%,
|
|
52
|
+
transparent
|
|
53
|
+
);
|
|
54
|
+
background-size: 40px 40px;
|
|
55
|
+
}
|
|
56
|
+
&--animated &__bar {
|
|
57
|
+
animation: #{$p}-stripes 2s linear infinite;
|
|
58
|
+
}
|
|
59
|
+
&--vertical {
|
|
60
|
+
flex-direction: column-reverse;
|
|
61
|
+
width: var(--_h);
|
|
62
|
+
height: 250px;
|
|
63
|
+
display: inline-flex;
|
|
64
|
+
margin-inline-end: 20px;
|
|
65
|
+
margin-bottom: 0;
|
|
66
|
+
.#{$p}-progress__bar {
|
|
67
|
+
width: 100% !important;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
&--vertical-top {
|
|
71
|
+
flex-direction: column;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
.#{$p}-progress-label {
|
|
75
|
+
display: flex;
|
|
76
|
+
justify-content: space-between;
|
|
77
|
+
font-size: 13px;
|
|
78
|
+
margin-bottom: 6px;
|
|
79
|
+
color: v(text-strong);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/* circular progress / gauge */
|
|
83
|
+
.#{$p}-progress-circle {
|
|
84
|
+
position: relative;
|
|
85
|
+
display: inline-flex;
|
|
86
|
+
align-items: center;
|
|
87
|
+
justify-content: center;
|
|
88
|
+
svg {
|
|
89
|
+
transform: rotate(-90deg);
|
|
90
|
+
}
|
|
91
|
+
&__track {
|
|
92
|
+
stroke: v(color-light);
|
|
93
|
+
}
|
|
94
|
+
&__value {
|
|
95
|
+
transition: stroke-dashoffset 0.8s ease;
|
|
96
|
+
}
|
|
97
|
+
&__label {
|
|
98
|
+
position: absolute;
|
|
99
|
+
font-weight: 600;
|
|
100
|
+
color: v(heading);
|
|
101
|
+
font-size: 18px;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
@use '../mixins' as *;
|
|
2
|
+
|
|
3
|
+
.#{$p}-ribbon-wrapper {
|
|
4
|
+
position: relative;
|
|
5
|
+
padding: 50px 15px 15px;
|
|
6
|
+
background: v(surface-muted);
|
|
7
|
+
border-radius: v(radius);
|
|
8
|
+
overflow: hidden;
|
|
9
|
+
margin-bottom: 30px;
|
|
10
|
+
&--reverse {
|
|
11
|
+
padding: 50px 15px 15px;
|
|
12
|
+
text-align: end;
|
|
13
|
+
}
|
|
14
|
+
&--bottom {
|
|
15
|
+
padding: 15px 15px 50px;
|
|
16
|
+
}
|
|
17
|
+
&--vertical {
|
|
18
|
+
padding: 15px;
|
|
19
|
+
padding-inline-start: 50px;
|
|
20
|
+
}
|
|
21
|
+
&--vertical.#{$p}-ribbon-wrapper--reverse {
|
|
22
|
+
padding: 15px;
|
|
23
|
+
padding-inline-end: 50px;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
.#{$p}-ribbon {
|
|
27
|
+
--_c: #{v(color-default)};
|
|
28
|
+
--_fg: #fff;
|
|
29
|
+
position: absolute;
|
|
30
|
+
top: 15px;
|
|
31
|
+
inset-inline-start: -2px;
|
|
32
|
+
padding: 0 20px;
|
|
33
|
+
height: 30px;
|
|
34
|
+
line-height: 30px;
|
|
35
|
+
clear: left;
|
|
36
|
+
color: var(--_fg);
|
|
37
|
+
background: var(--_c);
|
|
38
|
+
font-size: 13px;
|
|
39
|
+
z-index: 1;
|
|
40
|
+
@each $c in $colors {
|
|
41
|
+
&--#{$c} {
|
|
42
|
+
--_c: #{v(color-#{$c})};
|
|
43
|
+
--_fg: #{on($c)};
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
&--default {
|
|
47
|
+
--_fg: #{v(text-strong)};
|
|
48
|
+
}
|
|
49
|
+
&--right {
|
|
50
|
+
inset-inline-start: auto;
|
|
51
|
+
inset-inline-end: -2px;
|
|
52
|
+
}
|
|
53
|
+
&--bottom {
|
|
54
|
+
top: auto;
|
|
55
|
+
bottom: 15px;
|
|
56
|
+
}
|
|
57
|
+
/* bookmark */
|
|
58
|
+
&--bookmark {
|
|
59
|
+
&::before {
|
|
60
|
+
content: '';
|
|
61
|
+
position: absolute;
|
|
62
|
+
top: 0;
|
|
63
|
+
inset-inline-start: 100%;
|
|
64
|
+
border: 15px solid var(--_c);
|
|
65
|
+
border-inline-end: 10px solid transparent;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
&--bookmark.#{$p}-ribbon--right::before {
|
|
69
|
+
inset-inline-start: auto;
|
|
70
|
+
inset-inline-end: 100%;
|
|
71
|
+
border-inline-end: 15px solid var(--_c);
|
|
72
|
+
border-inline-start: 10px solid transparent;
|
|
73
|
+
}
|
|
74
|
+
/* corner */
|
|
75
|
+
&--corner {
|
|
76
|
+
inset-inline-start: 0;
|
|
77
|
+
top: 0;
|
|
78
|
+
height: 30px;
|
|
79
|
+
width: 30px;
|
|
80
|
+
padding: 0;
|
|
81
|
+
text-align: center;
|
|
82
|
+
font-size: 14px;
|
|
83
|
+
&::before {
|
|
84
|
+
content: '';
|
|
85
|
+
position: absolute;
|
|
86
|
+
top: 0;
|
|
87
|
+
inset-inline-start: 100%;
|
|
88
|
+
border: 15px solid transparent;
|
|
89
|
+
border-top-color: var(--_c);
|
|
90
|
+
border-inline-start-color: var(--_c);
|
|
91
|
+
}
|
|
92
|
+
&::after {
|
|
93
|
+
content: '';
|
|
94
|
+
position: absolute;
|
|
95
|
+
top: 100%;
|
|
96
|
+
inset-inline-start: 0;
|
|
97
|
+
border: 15px solid transparent;
|
|
98
|
+
border-top-color: var(--_c);
|
|
99
|
+
border-inline-start-color: var(--_c);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
/* vertical */
|
|
103
|
+
&--vertical-left,
|
|
104
|
+
&--vertical-right {
|
|
105
|
+
clear: none;
|
|
106
|
+
padding: 0 5px;
|
|
107
|
+
height: 70px;
|
|
108
|
+
width: 30px;
|
|
109
|
+
line-height: 70px;
|
|
110
|
+
text-align: center;
|
|
111
|
+
top: -2px;
|
|
112
|
+
inset-inline-start: 12px;
|
|
113
|
+
}
|
|
114
|
+
&--vertical-right {
|
|
115
|
+
inset-inline-start: auto;
|
|
116
|
+
inset-inline-end: 12px;
|
|
117
|
+
}
|
|
118
|
+
/* badge (rotated corner) */
|
|
119
|
+
&--badge {
|
|
120
|
+
top: 15px;
|
|
121
|
+
inset-inline-start: auto;
|
|
122
|
+
inset-inline-end: -40px;
|
|
123
|
+
width: 150px;
|
|
124
|
+
text-align: center;
|
|
125
|
+
transform: rotate(45deg);
|
|
126
|
+
padding: 0;
|
|
127
|
+
}
|
|
128
|
+
&--badge.#{$p}-ribbon--left {
|
|
129
|
+
inset-inline-end: auto;
|
|
130
|
+
inset-inline-start: -40px;
|
|
131
|
+
transform: rotate(-45deg);
|
|
132
|
+
}
|
|
133
|
+
&__content {
|
|
134
|
+
color: v(text);
|
|
135
|
+
}
|
|
136
|
+
}
|