@razerspine/pug-ui-kit 1.0.0 → 1.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/CHANGELOG.md +31 -0
- package/README.md +113 -20
- package/index.js +9 -1
- package/less/base/_fonts.less +44 -0
- package/less/base/_index.less +2 -0
- package/less/base/_reset.less +155 -0
- package/less/components/_aside.less +49 -0
- package/less/components/_buttons.less +156 -0
- package/less/components/_footer.less +25 -0
- package/less/components/_form-control.less +27 -0
- package/less/components/_form-textarea.less +7 -0
- package/less/components/_forms.less +76 -0
- package/less/components/_header.less +57 -0
- package/less/components/_icons.less +42 -0
- package/less/components/_index.less +14 -0
- package/less/components/_input-base.less +48 -0
- package/less/components/_input-checkbox.less +10 -0
- package/less/components/_input-radio.less +10 -0
- package/less/components/_main.less +32 -0
- package/less/components/_single-select.less +29 -0
- package/less/components/_table.less +45 -0
- package/less/layout/_grid.less +104 -0
- package/less/layout/_index.less +2 -0
- package/less/layout/_layout.less +55 -0
- package/less/settings/_breakpoints.less +5 -0
- package/less/settings/_index.less +3 -0
- package/less/settings/_typography.less +2 -0
- package/less/settings/_variables.less +13 -0
- package/less/themes/_dark.less +25 -0
- package/less/themes/_index.less +2 -0
- package/less/themes/_light.less +49 -0
- package/less/ui-kit.less +6 -0
- package/less/utils/_helpers.less +32 -0
- package/less/utils/_index.less +3 -0
- package/less/utils/_mixins.less +36 -0
- package/less/utils/_utilities.less +400 -0
- package/mixins/data-table.pug +67 -56
- package/package.json +12 -2
- package/scss/base/_fonts.scss +44 -0
- package/scss/base/_index.scss +2 -0
- package/scss/base/_reset.scss +155 -0
- package/scss/components/_aside.scss +47 -0
- package/scss/components/_buttons.scss +158 -0
- package/scss/components/_footer.scss +25 -0
- package/scss/components/_form-control.scss +27 -0
- package/scss/components/_form-textarea.scss +7 -0
- package/scss/components/_forms.scss +75 -0
- package/scss/components/_header.scss +57 -0
- package/scss/components/_icons.scss +42 -0
- package/scss/components/_index.scss +14 -0
- package/scss/components/_input-base.scss +48 -0
- package/scss/components/_input-checkbox.scss +10 -0
- package/scss/components/_input-radio.scss +10 -0
- package/scss/components/_main.scss +24 -0
- package/scss/components/_single-select.scss +29 -0
- package/scss/components/_table.scss +45 -0
- package/scss/layout/_grid.scss +64 -0
- package/scss/layout/_index.scss +2 -0
- package/scss/layout/_layout.scss +49 -0
- package/scss/settings/_breakpoints.scss +7 -0
- package/scss/settings/_index.scss +3 -0
- package/scss/settings/_typography.scss +2 -0
- package/scss/settings/_variables.scss +13 -0
- package/scss/themes/_dark.scss +25 -0
- package/scss/themes/_index.scss +2 -0
- package/scss/themes/_light.scss +49 -0
- package/scss/ui-kit.scss +6 -0
- package/scss/utils/_helpers.scss +18 -0
- package/scss/utils/_index.scss +3 -0
- package/scss/utils/_mixins.scss +16 -0
- package/scss/utils/_utilities.scss +305 -0
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
@import '../settings/_index';
|
|
2
|
+
|
|
3
|
+
.form-group {
|
|
4
|
+
margin-bottom: .75rem;
|
|
5
|
+
|
|
6
|
+
@media screen and (min-width: @breakpoint-lg) {
|
|
7
|
+
margin-bottom: 1rem;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
&--gap-sm {
|
|
11
|
+
gap: .5rem;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
&--space-md {
|
|
15
|
+
gap: 1rem;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.input-group {
|
|
20
|
+
display: flex;
|
|
21
|
+
justify-content: flex-start;
|
|
22
|
+
flex-wrap: wrap;
|
|
23
|
+
gap: @gutter;
|
|
24
|
+
|
|
25
|
+
&--vertical {
|
|
26
|
+
flex-direction: column;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.form-label {
|
|
31
|
+
color: var(--text-primary);
|
|
32
|
+
display: inline-block;
|
|
33
|
+
margin-bottom: .35rem;
|
|
34
|
+
font-size: .95rem;
|
|
35
|
+
cursor: pointer;
|
|
36
|
+
line-height: 1.4;
|
|
37
|
+
|
|
38
|
+
&.disabled {
|
|
39
|
+
color: var(--text-disabled);
|
|
40
|
+
cursor: not-allowed;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&.required::after {
|
|
44
|
+
content: " *";
|
|
45
|
+
color: var(--error);
|
|
46
|
+
font-weight: 600;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.input-text {
|
|
51
|
+
color: var(--text-primary);
|
|
52
|
+
display: inline-block;
|
|
53
|
+
font-size: .95rem;
|
|
54
|
+
cursor: pointer;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.check-control-label {
|
|
58
|
+
color: var(--text-primary);
|
|
59
|
+
display: inline-flex;
|
|
60
|
+
align-items: center;
|
|
61
|
+
gap: 0.5rem;
|
|
62
|
+
cursor: pointer;
|
|
63
|
+
font-size: 1rem;
|
|
64
|
+
user-select: none;
|
|
65
|
+
|
|
66
|
+
&:has(input:disabled) {
|
|
67
|
+
color: var(--text-disabled);
|
|
68
|
+
cursor: not-allowed;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.form-help {
|
|
73
|
+
color: var(--text-disabled);
|
|
74
|
+
font-size: .875rem;
|
|
75
|
+
margin-top: .25rem;
|
|
76
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
@import '../settings/_index';
|
|
2
|
+
|
|
3
|
+
.header {
|
|
4
|
+
background-color: var(--bg-surface);
|
|
5
|
+
color: var(--text-secondary);
|
|
6
|
+
box-shadow: var(--shadow-md);
|
|
7
|
+
grid-area: header;
|
|
8
|
+
width: 100%;
|
|
9
|
+
position: sticky;
|
|
10
|
+
top: 0;
|
|
11
|
+
left: 0;
|
|
12
|
+
z-index: 1000;
|
|
13
|
+
|
|
14
|
+
&__row {
|
|
15
|
+
display: flex;
|
|
16
|
+
align-items: center;
|
|
17
|
+
justify-content: space-between;
|
|
18
|
+
width: 100%;
|
|
19
|
+
max-width: @container-max;
|
|
20
|
+
padding: @gutter;
|
|
21
|
+
margin: 0 auto;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&__col {
|
|
25
|
+
display: flex;
|
|
26
|
+
align-items: center;
|
|
27
|
+
|
|
28
|
+
.single-select {
|
|
29
|
+
width: 65px;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&--space {
|
|
33
|
+
gap: @gutter;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.logo {
|
|
39
|
+
display: flex;
|
|
40
|
+
align-items: center;
|
|
41
|
+
justify-content: flex-start;
|
|
42
|
+
gap: 10px;
|
|
43
|
+
|
|
44
|
+
&__icon {
|
|
45
|
+
display: flex;
|
|
46
|
+
align-items: center;
|
|
47
|
+
justify-content: center;
|
|
48
|
+
width: 42px;
|
|
49
|
+
height: 42px;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
&__title {
|
|
53
|
+
font-size: @base-font-size;
|
|
54
|
+
font-weight: 700;
|
|
55
|
+
text-transform: uppercase;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
.button-icon {
|
|
2
|
+
display: inline-flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
justify-content: center;
|
|
5
|
+
fill: currentColor;
|
|
6
|
+
stroke: none;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.icon {
|
|
10
|
+
&--small {
|
|
11
|
+
width: 1rem;
|
|
12
|
+
height: 1rem;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
&--medium {
|
|
16
|
+
width: 1.125rem;
|
|
17
|
+
height: 1.125rem;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
&--large {
|
|
21
|
+
width: 1.25rem;
|
|
22
|
+
height: 1.25rem;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// button with icon only
|
|
26
|
+
&--icon {
|
|
27
|
+
&-small {
|
|
28
|
+
width: 1.3125rem;
|
|
29
|
+
height: 1.3125rem;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&-medium {
|
|
33
|
+
width: 1.75rem;
|
|
34
|
+
height: 1.75rem;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&-large {
|
|
38
|
+
width: 2rem;
|
|
39
|
+
height: 2rem;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
@import '_aside';
|
|
2
|
+
@import '_buttons';
|
|
3
|
+
@import '_footer';
|
|
4
|
+
@import '_forms';
|
|
5
|
+
@import '_form-control';
|
|
6
|
+
@import '_form-textarea';
|
|
7
|
+
@import '_input-base';
|
|
8
|
+
@import '_input-checkbox';
|
|
9
|
+
@import '_input-radio';
|
|
10
|
+
@import '_single-select';
|
|
11
|
+
@import '_header';
|
|
12
|
+
@import '_icons';
|
|
13
|
+
@import '_main';
|
|
14
|
+
@import '_table';
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
.input-base {
|
|
2
|
+
appearance: none;
|
|
3
|
+
display: inline-block;
|
|
4
|
+
vertical-align: middle;
|
|
5
|
+
width: 1.25rem;
|
|
6
|
+
height: 1.25rem;
|
|
7
|
+
background-color: var(--bg-surface);
|
|
8
|
+
border: 1px solid var(--border-strong);
|
|
9
|
+
background-position: center;
|
|
10
|
+
background-repeat: no-repeat;
|
|
11
|
+
background-size: 100% 100%;
|
|
12
|
+
cursor: pointer;
|
|
13
|
+
margin: 0;
|
|
14
|
+
transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
|
|
15
|
+
|
|
16
|
+
&:hover:not(:disabled) {
|
|
17
|
+
border-color: var(--brand-600);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
&:focus-visible {
|
|
21
|
+
border-color: var(--brand-500);
|
|
22
|
+
box-shadow: var(--shadow-outline);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&:checked {
|
|
26
|
+
background-color: var(--brand-500);
|
|
27
|
+
border-color: var(--brand-500);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&:disabled {
|
|
31
|
+
cursor: not-allowed;
|
|
32
|
+
background-color: var(--slate-100);
|
|
33
|
+
border-color: var(--slate-200);
|
|
34
|
+
|
|
35
|
+
&:checked {
|
|
36
|
+
background-color: var(--slate-400);
|
|
37
|
+
border-color: var(--slate-400);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&.is-invalid {
|
|
42
|
+
border-color: var(--error);
|
|
43
|
+
|
|
44
|
+
&:focus-visible {
|
|
45
|
+
box-shadow: 0 0 0 2px var(--bg-surface), 0 0 0 4px var(--error);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
@import '../settings/_index';
|
|
2
|
+
|
|
3
|
+
.main {
|
|
4
|
+
grid-area: main;
|
|
5
|
+
display: flex;
|
|
6
|
+
justify-content: flex-start;
|
|
7
|
+
padding: 0 @gutter;
|
|
8
|
+
overflow: hidden;
|
|
9
|
+
|
|
10
|
+
&-simple {
|
|
11
|
+
display: grid;
|
|
12
|
+
width: 100%;
|
|
13
|
+
min-height: 100%;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
@media screen and (min-width: @breakpoint-lg) {
|
|
17
|
+
padding: 0;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
&__container {
|
|
21
|
+
background: var(--bg-surface);
|
|
22
|
+
box-shadow: var(--shadow-outline);
|
|
23
|
+
border-radius: @border-radius;
|
|
24
|
+
width: 100%;
|
|
25
|
+
min-height: 100%;
|
|
26
|
+
padding: @gutter;
|
|
27
|
+
|
|
28
|
+
@media screen and (min-width: @breakpoint-lg) {
|
|
29
|
+
padding: calc(@gutter * 2);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
@import '_form-control';
|
|
2
|
+
|
|
3
|
+
.single-select {
|
|
4
|
+
.form-control();
|
|
5
|
+
appearance: none;
|
|
6
|
+
-webkit-appearance: none;
|
|
7
|
+
-moz-appearance: none;
|
|
8
|
+
background-image: var(--select-arrow);
|
|
9
|
+
background-repeat: no-repeat;
|
|
10
|
+
background-position: right .5rem center;
|
|
11
|
+
background-size: 1rem;
|
|
12
|
+
cursor: pointer;
|
|
13
|
+
padding: .5rem 1.5rem .5rem .75rem;
|
|
14
|
+
|
|
15
|
+
&:invalid {
|
|
16
|
+
color: var(--text-secondary);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
option {
|
|
20
|
+
color: var(--text-primary);
|
|
21
|
+
background-color: var(--bg-subtle);
|
|
22
|
+
padding: 0.5rem;
|
|
23
|
+
|
|
24
|
+
&:disabled {
|
|
25
|
+
color: var(--text-primary);
|
|
26
|
+
opacity: .6;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
@import '../settings/_index';
|
|
2
|
+
|
|
3
|
+
.table-wrapper {
|
|
4
|
+
display: block;
|
|
5
|
+
width: 100%;
|
|
6
|
+
overflow-x: auto;
|
|
7
|
+
-webkit-overflow-scrolling: touch;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.table {
|
|
11
|
+
width: 100%;
|
|
12
|
+
border-collapse: collapse;
|
|
13
|
+
font-family: @font-family;
|
|
14
|
+
font-size: .95rem;
|
|
15
|
+
color: var(--text-primary);
|
|
16
|
+
background: var(--bg-surface);
|
|
17
|
+
|
|
18
|
+
th, td {
|
|
19
|
+
padding: .75rem;
|
|
20
|
+
border-bottom: 1px solid var(--border-subtle);
|
|
21
|
+
vertical-align: middle;
|
|
22
|
+
text-align: left;
|
|
23
|
+
white-space: nowrap;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
thead {
|
|
27
|
+
background: var(--bg-subtle);
|
|
28
|
+
|
|
29
|
+
th {
|
|
30
|
+
font-weight: 700;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
tbody tr:hover {
|
|
35
|
+
background: var(--bg-subtle);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.table-sm th, .table-sm td {
|
|
39
|
+
padding: .4rem .6rem;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.table-striped tbody tr:nth-child(odd) {
|
|
43
|
+
background: rgba(0, 0, 0, .02);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
@import '../settings/_index';
|
|
2
|
+
|
|
3
|
+
// breakpoint lists
|
|
4
|
+
@bp-names: xs, sm, md, lg, xl;
|
|
5
|
+
@bp-values: 0, 576px, 768px, 992px, 1200px;
|
|
6
|
+
|
|
7
|
+
// Container
|
|
8
|
+
.container {
|
|
9
|
+
width: 100%;
|
|
10
|
+
margin-left: auto;
|
|
11
|
+
margin-right: auto;
|
|
12
|
+
max-width: @container-max;
|
|
13
|
+
padding-left: @gutter;
|
|
14
|
+
padding-right: @gutter;
|
|
15
|
+
box-sizing: border-box;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// Row
|
|
19
|
+
.row {
|
|
20
|
+
display: grid;
|
|
21
|
+
grid-template-columns: repeat(@columns, 1fr);
|
|
22
|
+
gap: @gutter;
|
|
23
|
+
width: 100%;
|
|
24
|
+
align-items: stretch;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/* Column spans generator (creates .col-1 ... .col-@{columns}) */
|
|
28
|
+
.generate-col-span(@i) when (@i > 0) {
|
|
29
|
+
.col-@{i} {
|
|
30
|
+
grid-column: span @i;
|
|
31
|
+
}
|
|
32
|
+
.generate-col-span(@i - 1);
|
|
33
|
+
}
|
|
34
|
+
.generate-col-span(0) {} // terminator
|
|
35
|
+
.generate-col-span(@columns);
|
|
36
|
+
|
|
37
|
+
/* Responsive column spans
|
|
38
|
+
Uses the @bp-names and @bp-values lists to generate:
|
|
39
|
+
.col-sm-1 ... .col-sm-12, .col-md-1 ... etc (skips bp value 0)
|
|
40
|
+
*/
|
|
41
|
+
.generate-cols-for(@n, @name) when (@n > 0) {
|
|
42
|
+
.col-@{name}-@{n} {
|
|
43
|
+
grid-column: span @n;
|
|
44
|
+
}
|
|
45
|
+
.generate-cols-for(@n - 1, @name);
|
|
46
|
+
}
|
|
47
|
+
.generate-cols-for(0, @name) {} // terminate recursion
|
|
48
|
+
|
|
49
|
+
// maybe-media: skip when bp equals 0 (reliable guard)
|
|
50
|
+
.maybe-media(@bp, @name) when not (@bp = 0) {
|
|
51
|
+
@media (min-width: @bp) {
|
|
52
|
+
.generate-cols-for(@columns, @name);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
.maybe-media(@bp, @name) when (@bp = 0) {} // no-op for 0
|
|
56
|
+
|
|
57
|
+
.generate-responsive(@idx) when (@idx > 0) {
|
|
58
|
+
@name: extract(@bp-names, @idx);
|
|
59
|
+
@bp: extract(@bp-values, @idx);
|
|
60
|
+
.maybe-media(@bp, @name);
|
|
61
|
+
.generate-responsive(@idx - 1);
|
|
62
|
+
}
|
|
63
|
+
.generate-responsive(length(@bp-names));
|
|
64
|
+
|
|
65
|
+
/* full width column */
|
|
66
|
+
.col-full {
|
|
67
|
+
grid-column: 1 / -1;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/* Offset helpers
|
|
71
|
+
Creates .offset-1 ... .offset-@{columns} and responsive variants
|
|
72
|
+
Formula mirrors SCSS: margin-left: calc((100% / columns) * i + (gutter * i))
|
|
73
|
+
*/
|
|
74
|
+
.generate-offset(@i) when (@i > 0) {
|
|
75
|
+
.offset-@{i} {
|
|
76
|
+
margin-left: calc((100% / @columns) * @i + (@gutter * @i));
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// responsive offsets for each breakpoint
|
|
80
|
+
.generate-offset-bp(@i, length(@bp-names));
|
|
81
|
+
.generate-offset(@i - 1);
|
|
82
|
+
}
|
|
83
|
+
.generate-offset(0) {} // terminate recursion
|
|
84
|
+
|
|
85
|
+
.generate-offset-bp(@i, @idx) when (@idx > 0) {
|
|
86
|
+
@name: extract(@bp-names, @idx);
|
|
87
|
+
@bp: extract(@bp-values, @idx);
|
|
88
|
+
.maybe-offset-media(@bp, @name, @i);
|
|
89
|
+
.generate-offset-bp(@i, @idx - 1);
|
|
90
|
+
}
|
|
91
|
+
.generate-offset-bp(@i, 0) {} // terminate recursion
|
|
92
|
+
|
|
93
|
+
// maybe-offset-media: skip when bp equals 0 (reliable guard)
|
|
94
|
+
.maybe-offset-media(@bp, @name, @i) when not (@bp = 0) {
|
|
95
|
+
@media (min-width: @bp) {
|
|
96
|
+
.offset-@{name}-@{i} {
|
|
97
|
+
margin-left: calc((100% / @columns) * @i + (@gutter * @i));
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
.maybe-offset-media(@bp, @name, @i) when (@bp = 0) {} // no-op for 0
|
|
102
|
+
|
|
103
|
+
/* Kick off offset generation */
|
|
104
|
+
.generate-offset(@columns);
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
@import '../settings/_index';
|
|
2
|
+
|
|
3
|
+
.layout {
|
|
4
|
+
background-color: var(--bg-color);
|
|
5
|
+
color: var(--text-primary);
|
|
6
|
+
display: grid;
|
|
7
|
+
grid-template-areas: 'header' 'aside' 'main' 'footer';
|
|
8
|
+
grid-template-columns: 1fr;
|
|
9
|
+
grid-template-rows: auto auto 1fr auto;
|
|
10
|
+
width: 100%;
|
|
11
|
+
min-height: 100dvh;
|
|
12
|
+
gap: @gutter;
|
|
13
|
+
font-family: @font-family;
|
|
14
|
+
font-size: @base-font-size;
|
|
15
|
+
font-weight: 400;
|
|
16
|
+
line-height: 1.5;
|
|
17
|
+
|
|
18
|
+
@media screen and (min-width: @breakpoint-lg) {
|
|
19
|
+
grid-template-areas:
|
|
20
|
+
'header header header header'
|
|
21
|
+
'gutter-left aside main gutter-right'
|
|
22
|
+
'footer footer footer footer';
|
|
23
|
+
grid-template-columns:
|
|
24
|
+
1fr
|
|
25
|
+
minmax(@aside-min, calc(@available-width * @aside-ratio / @total-ratio))
|
|
26
|
+
minmax(@main-min, calc(@available-width * @main-ratio / @total-ratio))
|
|
27
|
+
1fr;
|
|
28
|
+
grid-template-rows: auto 1fr auto;
|
|
29
|
+
gap: calc(@gutter * 2);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@media (prefers-reduced-motion: reduce) {
|
|
33
|
+
* {
|
|
34
|
+
transition-duration: 0ms;
|
|
35
|
+
animation-duration: 0ms;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.layout-simple {
|
|
41
|
+
background-color: var(--bg-color);
|
|
42
|
+
color: var(--text-primary);
|
|
43
|
+
display: grid;
|
|
44
|
+
grid:
|
|
45
|
+
"header" auto
|
|
46
|
+
"main" 1fr
|
|
47
|
+
"footer" auto
|
|
48
|
+
/ 1fr;
|
|
49
|
+
width: 100%;
|
|
50
|
+
font-family: @font-family;
|
|
51
|
+
font-size: @base-font-size;
|
|
52
|
+
font-weight: 400;
|
|
53
|
+
line-height: 1.5;
|
|
54
|
+
gap: @gutter;
|
|
55
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// layout
|
|
2
|
+
@container-max: 1360px;
|
|
3
|
+
@columns: 12;
|
|
4
|
+
@gutter: 15px;
|
|
5
|
+
@border-radius: .375rem;
|
|
6
|
+
|
|
7
|
+
// layout settings
|
|
8
|
+
@aside-ratio: 1;
|
|
9
|
+
@main-ratio: 3;
|
|
10
|
+
@aside-min: 300px;
|
|
11
|
+
@main-min: 320px;
|
|
12
|
+
@total-ratio: (@aside-ratio + @main-ratio);
|
|
13
|
+
@available-width: calc(@container-max - (@gutter * 2)); // when layout have gap
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
html[data-theme="dark"] {
|
|
2
|
+
--bg-color: #020617;
|
|
3
|
+
--bg-surface: #0f172a;
|
|
4
|
+
--bg-subtle: #1e293b;
|
|
5
|
+
|
|
6
|
+
--text-primary: #f8fafc;
|
|
7
|
+
--text-secondary: #94a3b8;
|
|
8
|
+
--text-disabled: #475569;
|
|
9
|
+
--text-on-brand: #ffffff;
|
|
10
|
+
|
|
11
|
+
--success: #34d399;
|
|
12
|
+
--error: #f87171;
|
|
13
|
+
|
|
14
|
+
--border-subtle: #1e293b;
|
|
15
|
+
--border-strong: #334155;
|
|
16
|
+
--border-interactive: var(--brand-500);
|
|
17
|
+
|
|
18
|
+
--shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
|
|
19
|
+
--shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
|
|
20
|
+
--shadow-outline: 0 0 12px rgba(0, 0, 0, 0.5);
|
|
21
|
+
|
|
22
|
+
--select-arrow: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
|
|
23
|
+
--checkbox-icon: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='black' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2.5-2.5a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e");
|
|
24
|
+
--radio-icon: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='black' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e");
|
|
25
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--brand-50: #eff6ff;
|
|
3
|
+
--brand-100: #dbeafe;
|
|
4
|
+
--brand-200: #bfdbfe;
|
|
5
|
+
--brand-300: #93c5fd;
|
|
6
|
+
--brand-400: #60a5fa;
|
|
7
|
+
--brand-500: #3b82f6;
|
|
8
|
+
--brand-600: #2563eb;
|
|
9
|
+
--brand-700: #1d4ed8;
|
|
10
|
+
--brand-800: #1e40af;
|
|
11
|
+
--brand-900: #1e3a8a;
|
|
12
|
+
|
|
13
|
+
--slate-50: #f8fafc;
|
|
14
|
+
--slate-100: #f1f5f9;
|
|
15
|
+
--slate-200: #e2e8f0;
|
|
16
|
+
--slate-300: #cbd5e1;
|
|
17
|
+
--slate-400: #94a3b8;
|
|
18
|
+
--slate-500: #64748b;
|
|
19
|
+
--slate-600: #475569;
|
|
20
|
+
--slate-700: #334155;
|
|
21
|
+
--slate-800: #1e293b;
|
|
22
|
+
--slate-900: #0f172a;
|
|
23
|
+
|
|
24
|
+
--success: #10b981;
|
|
25
|
+
--warning: #f59e0b;
|
|
26
|
+
--error: #ef4444;
|
|
27
|
+
--info: #0ea5e9;
|
|
28
|
+
|
|
29
|
+
--bg-color: var(--slate-50);
|
|
30
|
+
--bg-surface: #ffffff;
|
|
31
|
+
--bg-subtle: var(--slate-100);
|
|
32
|
+
|
|
33
|
+
--text-primary: var(--slate-900);
|
|
34
|
+
--text-secondary: var(--slate-500);
|
|
35
|
+
--text-disabled: var(--slate-400);
|
|
36
|
+
--text-on-brand: #ffffff;
|
|
37
|
+
|
|
38
|
+
--border-subtle: var(--slate-200);
|
|
39
|
+
--border-strong: var(--slate-300);
|
|
40
|
+
--border-interactive: var(--brand-500);
|
|
41
|
+
|
|
42
|
+
--shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
|
|
43
|
+
--shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
|
|
44
|
+
--shadow-outline: 0 0 12px rgba(0, 0, 0, 0.1);
|
|
45
|
+
|
|
46
|
+
--select-arrow: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
|
|
47
|
+
--checkbox-icon: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2.5-2.5a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e");
|
|
48
|
+
--radio-icon: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e");
|
|
49
|
+
}
|
package/less/ui-kit.less
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// space scale as individual Less variables
|
|
2
|
+
@space-0: 0rem;
|
|
3
|
+
@space-1: 0.25rem; // приклад, підстав свої значення
|
|
4
|
+
@space-2: 0.5rem;
|
|
5
|
+
@space-3: 0.75rem;
|
|
6
|
+
@space-4: 1rem;
|
|
7
|
+
@space-5: 1.5rem;
|
|
8
|
+
@space-6: 2rem;
|
|
9
|
+
@space-7: 3rem;
|
|
10
|
+
|
|
11
|
+
/* get-space mixin: sets @space-value according to @k */
|
|
12
|
+
.get-space(@k) when (@k = 0) { @space-value: @space-0; }
|
|
13
|
+
.get-space(@k) when (@k = 1) { @space-value: @space-1; }
|
|
14
|
+
.get-space(@k) when (@k = 2) { @space-value: @space-2; }
|
|
15
|
+
.get-space(@k) when (@k = 3) { @space-value: @space-3; }
|
|
16
|
+
.get-space(@k) when (@k = 4) { @space-value: @space-4; }
|
|
17
|
+
.get-space(@k) when (@k = 5) { @space-value: @space-5; }
|
|
18
|
+
.get-space(@k) when (@k = 6) { @space-value: @space-6; }
|
|
19
|
+
.get-space(@k) when (@k = 7) { @space-value: @space-7; }
|
|
20
|
+
/* fallback for unknown keys */
|
|
21
|
+
.get-space(@k) when not (@k = 0) and not (@k = 1) and not (@k = 2) and not (@k = 3) and not (@k = 4) and not (@k = 5) and not (@k = 6) and not (@k = 7) {
|
|
22
|
+
@space-value: 0rem;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/* suf mixin: returns number unchanged, otherwise returns as-is
|
|
26
|
+
usage: .suf(@val); then use @suf-value */
|
|
27
|
+
.suf(@k) when (isnumber(@k)) {
|
|
28
|
+
@suf-value: @k;
|
|
29
|
+
}
|
|
30
|
+
.suf(@k) when not (isnumber(@k)) {
|
|
31
|
+
@suf-value: @k;
|
|
32
|
+
}
|