@itcase/ui 1.0.6 → 1.0.8
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/components/Button.js +26 -12
- package/dist/components/Cell.js +19 -9
- package/dist/components/Dropdown.js +195 -66
- package/dist/components/Grid.js +74 -33
- package/dist/components/Group.js +5 -1
- package/dist/components/Image.js +3 -3
- package/dist/components/Logo.js +26 -15
- package/dist/components/Search.js +48 -31
- package/dist/components/Segmented.js +62 -10
- package/dist/components/Tab.js +134 -21
- package/dist/components/Tile.js +10 -7
- package/dist/css/components/Avatar/Avatar.css +11 -2
- package/dist/css/components/Badge/Badge.css +1 -0
- package/dist/css/components/Cell/Cell.css +14 -52
- package/dist/css/components/Dropdown/Dropdown.css +21 -18
- package/dist/css/components/Grid/Grid.css +5 -0
- package/dist/css/components/Grid/css/__row/grid__row.css +5 -0
- package/dist/css/components/Search/Search.css +11 -9
- package/dist/css/components/Search/css/search-input/search-input.css +1 -9
- package/dist/css/components/Search/css/search-input/search-input_size.css +10 -0
- package/dist/css/components/Segmented/Segmented.css +95 -0
- package/dist/css/components/Swiper/Swiper.css +6 -0
- package/dist/css/components/Switch/Switch.css +55 -50
- package/dist/css/components/Tab/Tab.css +3 -0
- package/dist/css/styles/align/align.css +6 -0
- package/dist/css/styles/border-width/border-width.css +1 -0
- package/dist/css/styles/justify-content/justify-content.css +7 -0
- package/dist/hooks/styleAttributes.js +1 -1
- package/package.json +1 -1
- package/dist/css/components/Cell/css/__wrapper/cell__wrapper.css +0 -7
- package/dist/css/components/Cell/css/__wrapper/cell__wrapper_shape.css +0 -15
|
@@ -22,6 +22,20 @@
|
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
+
.cell {
|
|
26
|
+
&_direction {
|
|
27
|
+
&_vertical {
|
|
28
|
+
^^&__data {
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
&_horizontal {
|
|
32
|
+
^^&__data {
|
|
33
|
+
flex-flow: row;
|
|
34
|
+
justify-content: space-between;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
25
39
|
.cell {
|
|
26
40
|
&&_state {
|
|
27
41
|
&_active {
|
|
@@ -35,55 +49,3 @@
|
|
|
35
49
|
}
|
|
36
50
|
}
|
|
37
51
|
}
|
|
38
|
-
.cell {
|
|
39
|
-
&__wrapper {
|
|
40
|
-
min-width: 240px;
|
|
41
|
-
display: flex;
|
|
42
|
-
flex-flow: row nowrap;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
.cell {
|
|
46
|
-
&__wrapper {
|
|
47
|
-
&_shape {
|
|
48
|
-
&_rounded {
|
|
49
|
-
border-radius: 8px;
|
|
50
|
-
}
|
|
51
|
-
&_circular {
|
|
52
|
-
border-radius: 50%;
|
|
53
|
-
}
|
|
54
|
-
&_geometric {
|
|
55
|
-
border-radius: 0;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
.cell {
|
|
61
|
-
&_set {
|
|
62
|
-
&_default {
|
|
63
|
-
^^&__wrapper {
|
|
64
|
-
padding: 8px 24px;
|
|
65
|
-
margin: 16px 24px;
|
|
66
|
-
^^^&__data {
|
|
67
|
-
gap: 4px;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
.cell {
|
|
74
|
-
&_set {
|
|
75
|
-
&_horizontal {
|
|
76
|
-
^^&__wrapper {
|
|
77
|
-
padding: 8px 24px;
|
|
78
|
-
^^^&__data {
|
|
79
|
-
gap: 4px;
|
|
80
|
-
flex-flow: row nowrap;
|
|
81
|
-
align-items: center;
|
|
82
|
-
^^^^&_desc {
|
|
83
|
-
align-self: flex-start;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
.dropdown {
|
|
2
2
|
display: flex;
|
|
3
|
-
align-items: center;
|
|
4
|
-
gap: 8px;
|
|
5
3
|
position: relative;
|
|
6
4
|
&__wrapper {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
left: 0;
|
|
10
|
-
margin: 16px 0 0 0;
|
|
5
|
+
padding: 12px 0;
|
|
6
|
+
gap: 8px;
|
|
11
7
|
}
|
|
12
8
|
}
|
|
13
9
|
.dropdown {
|
|
@@ -16,28 +12,18 @@
|
|
|
16
12
|
^^&__wrapper {
|
|
17
13
|
animation-name: dropDownAnimationClose;
|
|
18
14
|
}
|
|
19
|
-
^^&__button {
|
|
20
|
-
& .button__icon {
|
|
21
|
-
animation-name: dropDownButtonAnimationClose;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
15
|
}
|
|
25
16
|
&_open {
|
|
26
17
|
^^&__wrapper {
|
|
27
18
|
animation-name: dropDownAnimationOpen;
|
|
28
19
|
}
|
|
29
|
-
^^&__button {
|
|
30
|
-
& .button__icon {
|
|
31
|
-
animation-name: dropDownButtonAnimationOpen;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
20
|
}
|
|
35
21
|
}
|
|
36
22
|
}
|
|
37
23
|
.dropdown {
|
|
38
24
|
&_shape {
|
|
39
25
|
&_rounded {
|
|
40
|
-
border-radius:
|
|
26
|
+
border-radius: 12px;
|
|
41
27
|
position: relative;
|
|
42
28
|
}
|
|
43
29
|
}
|
|
@@ -52,7 +38,24 @@
|
|
|
52
38
|
.dropdown {
|
|
53
39
|
&&_state_open {
|
|
54
40
|
^&__wrapper {
|
|
55
|
-
|
|
56
41
|
}
|
|
57
42
|
}
|
|
58
43
|
}
|
|
44
|
+
.dropdown {
|
|
45
|
+
&__item {
|
|
46
|
+
min-width: 240px;
|
|
47
|
+
&-label {
|
|
48
|
+
display: block;
|
|
49
|
+
}
|
|
50
|
+
&_size {
|
|
51
|
+
@each $size in normal, compact {
|
|
52
|
+
&_$(size) {
|
|
53
|
+
^^&-label {
|
|
54
|
+
padding: var(--dropdown-item-size-$(size)-padding);
|
|
55
|
+
gap: var(--dropdown-item-size-$(size)-gap);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
}
|
|
12
12
|
.search-input {
|
|
13
13
|
width: 100%;
|
|
14
|
-
grid-template-columns: 1fr 1fr;
|
|
15
14
|
position: relative;
|
|
16
15
|
overflow: hidden;
|
|
17
16
|
display: flex;
|
|
@@ -19,9 +18,6 @@
|
|
|
19
18
|
&__icon {
|
|
20
19
|
display: flex;
|
|
21
20
|
align-items: center;
|
|
22
|
-
&-before {
|
|
23
|
-
padding: 0 0 0 8px;
|
|
24
|
-
}
|
|
25
21
|
}
|
|
26
22
|
&__wrapper {
|
|
27
23
|
width: 100%;
|
|
@@ -29,13 +25,10 @@
|
|
|
29
25
|
display: grid;
|
|
30
26
|
grid-template-columns: 1fr 1fr;
|
|
31
27
|
transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
32
|
-
padding: 7px 12px;
|
|
33
28
|
align-items: center;
|
|
34
29
|
}
|
|
35
30
|
&__value {
|
|
36
|
-
color: var(--color-surface-text-primary);
|
|
37
31
|
background: none;
|
|
38
|
-
padding: 7px 0;
|
|
39
32
|
border: none;
|
|
40
33
|
position: relative;
|
|
41
34
|
display: block;
|
|
@@ -46,13 +39,12 @@
|
|
|
46
39
|
outline: 0;
|
|
47
40
|
}
|
|
48
41
|
&:not([value='']) {
|
|
49
|
-
|
|
42
|
+
& ~ .search-input__placeholder {
|
|
50
43
|
display: none;
|
|
51
44
|
}
|
|
52
45
|
}
|
|
53
46
|
}
|
|
54
47
|
&__placeholder {
|
|
55
|
-
color: var(--color-surface-text-primary);
|
|
56
48
|
background: none;
|
|
57
49
|
border: none;
|
|
58
50
|
position: relative;
|
|
@@ -97,6 +89,16 @@
|
|
|
97
89
|
}
|
|
98
90
|
}
|
|
99
91
|
}
|
|
92
|
+
.search-input {
|
|
93
|
+
&_size {
|
|
94
|
+
@each $size in compact, normal {
|
|
95
|
+
&_$(size) {
|
|
96
|
+
padding: var(--search-input-$(size)-padding);
|
|
97
|
+
gap: var(--search-input-$(size)-gap);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
100
102
|
.search-result {
|
|
101
103
|
width: 100%;
|
|
102
104
|
&__wrapper {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
.search-input {
|
|
2
2
|
width: 100%;
|
|
3
|
-
grid-template-columns: 1fr 1fr;
|
|
4
3
|
position: relative;
|
|
5
4
|
overflow: hidden;
|
|
6
5
|
display: flex;
|
|
@@ -8,9 +7,6 @@
|
|
|
8
7
|
&__icon {
|
|
9
8
|
display: flex;
|
|
10
9
|
align-items: center;
|
|
11
|
-
&-before {
|
|
12
|
-
padding: 0 0 0 8px;
|
|
13
|
-
}
|
|
14
10
|
}
|
|
15
11
|
&__wrapper {
|
|
16
12
|
width: 100%;
|
|
@@ -18,13 +14,10 @@
|
|
|
18
14
|
display: grid;
|
|
19
15
|
grid-template-columns: 1fr 1fr;
|
|
20
16
|
transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
21
|
-
padding: 7px 12px;
|
|
22
17
|
align-items: center;
|
|
23
18
|
}
|
|
24
19
|
&__value {
|
|
25
|
-
color: var(--color-surface-text-primary);
|
|
26
20
|
background: none;
|
|
27
|
-
padding: 7px 0;
|
|
28
21
|
border: none;
|
|
29
22
|
position: relative;
|
|
30
23
|
display: block;
|
|
@@ -35,13 +28,12 @@
|
|
|
35
28
|
outline: 0;
|
|
36
29
|
}
|
|
37
30
|
&:not([value='']) {
|
|
38
|
-
|
|
31
|
+
& ~ .search-input__placeholder {
|
|
39
32
|
display: none;
|
|
40
33
|
}
|
|
41
34
|
}
|
|
42
35
|
}
|
|
43
36
|
&__placeholder {
|
|
44
|
-
color: var(--color-surface-text-primary);
|
|
45
37
|
background: none;
|
|
46
38
|
border: none;
|
|
47
39
|
position: relative;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
.segmented {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
&__wrapper {
|
|
5
|
+
&-inner {
|
|
6
|
+
margin: 2px;
|
|
7
|
+
position: relative;
|
|
8
|
+
display: flex;
|
|
9
|
+
^^&__indicator {
|
|
10
|
+
width: var(--segmented-active-width);
|
|
11
|
+
height: 100%;
|
|
12
|
+
padding: 8px 0;
|
|
13
|
+
border-radius: 8px;
|
|
14
|
+
position: absolute;
|
|
15
|
+
content: '';
|
|
16
|
+
display: block;
|
|
17
|
+
box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12), 0 3px 1px rgba(0, 0, 0, 0.04);
|
|
18
|
+
left: var(--segmented-active-x-pos);
|
|
19
|
+
top: 0;
|
|
20
|
+
z-index: 1;
|
|
21
|
+
transition: left 0.3s ease, width 0.3s ease;
|
|
22
|
+
}
|
|
23
|
+
^^&__item {
|
|
24
|
+
min-width: 120px;
|
|
25
|
+
position: relative;
|
|
26
|
+
display: flex;
|
|
27
|
+
&::after {
|
|
28
|
+
width: 1px;
|
|
29
|
+
height: 100%;
|
|
30
|
+
background: var(--color-surface-border-tertiary);
|
|
31
|
+
content: '';
|
|
32
|
+
display: block;
|
|
33
|
+
top: 0;
|
|
34
|
+
right: 0;
|
|
35
|
+
}
|
|
36
|
+
&:nth-last-child(-n+2) {
|
|
37
|
+
&::after {
|
|
38
|
+
display: none;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
&_state_active {
|
|
42
|
+
& label {
|
|
43
|
+
color: #fff;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
& input {
|
|
47
|
+
width: 100%;
|
|
48
|
+
height: 100%;
|
|
49
|
+
position: absolute;
|
|
50
|
+
left: 0;
|
|
51
|
+
top: 0;
|
|
52
|
+
right: 0;
|
|
53
|
+
bottom: 0;
|
|
54
|
+
z-index: 2;
|
|
55
|
+
opacity: 0%;
|
|
56
|
+
cursor: pointer;
|
|
57
|
+
border: 0;
|
|
58
|
+
margin: 0;
|
|
59
|
+
}
|
|
60
|
+
&-label {
|
|
61
|
+
width: 100%;
|
|
62
|
+
text-align: center;
|
|
63
|
+
position: relative;
|
|
64
|
+
display: block;
|
|
65
|
+
z-index: 3;
|
|
66
|
+
transition: color 0.5s ease;
|
|
67
|
+
cursor: pointer;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
.segmented {
|
|
74
|
+
&_shape {
|
|
75
|
+
&_rounded {
|
|
76
|
+
border-radius: 8px;
|
|
77
|
+
}
|
|
78
|
+
&_circular {
|
|
79
|
+
border-radius: 50%;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
.segmented {
|
|
84
|
+
&_size {
|
|
85
|
+
@each $size in normal, compact {
|
|
86
|
+
&_$(size) {
|
|
87
|
+
^^&__item {
|
|
88
|
+
&-label {
|
|
89
|
+
padding: var(--segmented-item-size-$(size)-padding);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
@@ -1,63 +1,68 @@
|
|
|
1
1
|
.switch {
|
|
2
2
|
position: relative;
|
|
3
|
+
height: 100%;
|
|
4
|
+
border-radius: 50px;
|
|
5
|
+
cursor: pointer;
|
|
6
|
+
transition: 0.4s;
|
|
7
|
+
overflow: hidden;
|
|
8
|
+
display: flex;
|
|
9
|
+
&__checkbox {
|
|
10
|
+
position: absolute;
|
|
11
|
+
width: 100%;
|
|
12
|
+
height: 100%;
|
|
13
|
+
left: 0;
|
|
14
|
+
top: 0;
|
|
15
|
+
cursor: pointer;
|
|
16
|
+
appearance: none;
|
|
17
|
+
border: 0;
|
|
18
|
+
margin: 0;
|
|
19
|
+
z-index: 2;
|
|
20
|
+
&:checked {
|
|
21
|
+
& + .switch__bg {
|
|
22
|
+
background: var(--color-accent-primary);
|
|
23
|
+
}
|
|
24
|
+
& ~ .switch__toggle {
|
|
25
|
+
left: 100%;
|
|
26
|
+
margin: 0 0 0 -3px;
|
|
27
|
+
background: var(--color-accent-item-primary);
|
|
28
|
+
transform: translate(-100%, -50%);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
&:disabled {
|
|
32
|
+
& + .switch__bg {
|
|
33
|
+
background: var(--color-surface-disabled);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
&__bg {
|
|
38
|
+
width: 100%;
|
|
39
|
+
flex: 1;
|
|
40
|
+
background: var(--color-surface-tertiary);
|
|
41
|
+
transition: all 0.25s;
|
|
42
|
+
}
|
|
43
|
+
&__toggle {
|
|
44
|
+
box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
|
|
45
|
+
height: calc(100% - 6px);
|
|
46
|
+
position: absolute;
|
|
47
|
+
aspect-ratio: 1/1;
|
|
48
|
+
top: 50%;
|
|
49
|
+
transform: translate(3px, -50%);
|
|
50
|
+
left: 0;
|
|
51
|
+
background: #fff;
|
|
52
|
+
border-radius: 50%;
|
|
53
|
+
box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
|
|
54
|
+
transition: all 0.25s;
|
|
55
|
+
}
|
|
3
56
|
}
|
|
4
57
|
.switch {
|
|
5
58
|
&_size {
|
|
6
59
|
&_normal {
|
|
7
|
-
position: relative;
|
|
8
60
|
min-width: 52px;
|
|
9
|
-
height: 100%;
|
|
10
|
-
border-radius: 50px;
|
|
11
|
-
cursor: pointer;
|
|
12
|
-
transition: 0.4s;
|
|
13
61
|
min-height: 32px;
|
|
14
|
-
overflow: hidden;
|
|
15
|
-
display: flex;
|
|
16
|
-
^^&__checkbox {
|
|
17
|
-
position: absolute;
|
|
18
|
-
width: 100%;
|
|
19
|
-
height: 100%;
|
|
20
|
-
left: 0;
|
|
21
|
-
top: 0;
|
|
22
|
-
cursor: pointer;
|
|
23
|
-
appearance: none;
|
|
24
|
-
border: 0;
|
|
25
|
-
margin: 0;
|
|
26
|
-
z-index: 2;
|
|
27
|
-
&:checked {
|
|
28
|
-
& + .switch__bg {
|
|
29
|
-
background: var(--color-accent-primary);
|
|
30
|
-
}
|
|
31
|
-
& ~ .switch__toggle {
|
|
32
|
-
left: 100%;
|
|
33
|
-
margin: 0 0 0 -3px;
|
|
34
|
-
background: var(--color-accent-item-primary);
|
|
35
|
-
transform: translate(-100%, -50%);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
^^&__bg {
|
|
40
|
-
width: 100%;
|
|
41
|
-
flex: 1;
|
|
42
|
-
background: var(--color-surface-tertiary);
|
|
43
|
-
transition: all 0.25s;
|
|
44
|
-
}
|
|
45
|
-
^^&__toggle {
|
|
46
|
-
box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
|
|
47
|
-
height: calc(100% - 6px);
|
|
48
|
-
position: absolute;
|
|
49
|
-
aspect-ratio: 1/1;
|
|
50
|
-
top: 50%;
|
|
51
|
-
transform: translate(3px, -50%);
|
|
52
|
-
left: 0;
|
|
53
|
-
background: #fff;
|
|
54
|
-
border-radius: 50%;
|
|
55
|
-
box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
|
|
56
|
-
transition: all 0.25s;
|
|
57
|
-
}
|
|
58
62
|
}
|
|
59
63
|
&_compact {
|
|
60
|
-
|
|
64
|
+
min-width: 40px;
|
|
65
|
+
min-height: 24px;
|
|
61
66
|
}
|
|
62
67
|
}
|
|
63
68
|
}
|
|
@@ -28,6 +28,6 @@ var styleAttributes = [
|
|
|
28
28
|
/**
|
|
29
29
|
* Grid
|
|
30
30
|
*/
|
|
31
|
-
'gridTemplateColumns', 'gridArea', 'gridAutoColumns', 'gridAutoFlow', 'gridAutoRows', 'gridTemplate', 'gridTemplateAreas', '
|
|
31
|
+
'gridTemplateColumns', 'gridArea', 'gridAutoColumns', 'gridAutoFlow', 'gridAutoRows', 'gridTemplate', 'gridTemplateAreas', 'gridTemplateRows'];
|
|
32
32
|
|
|
33
33
|
exports.default = styleAttributes;
|
package/package.json
CHANGED