@ldmjs/ui 1.0.90 → 2.0.0-beta.1
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/README.md +46 -94
- package/dist/components/ld-avatar.js +1 -0
- package/dist/components/ld-badge.js +1 -0
- package/dist/components/ld-breadcrumbs.js +1 -0
- package/dist/components/ld-button.js +1 -0
- package/dist/components/ld-calendar.js +1 -0
- package/dist/components/ld-checkbox.js +1 -0
- package/dist/components/ld-chip.js +1 -0
- package/dist/components/ld-combobox.js +1 -0
- package/dist/components/ld-data-iterator.js +1 -0
- package/dist/components/ld-datepicker.js +1 -0
- package/dist/components/ld-dialog.js +1 -0
- package/dist/components/ld-edit-list-box.js +1 -0
- package/dist/components/ld-edit-masked-text.js +1 -0
- package/dist/components/ld-edit-text.js +1 -0
- package/dist/components/ld-expansion-panel.js +1 -0
- package/dist/components/ld-expansion-panels.js +1 -0
- package/dist/components/ld-icon.js +1 -0
- package/dist/components/ld-loader.js +1 -0
- package/dist/components/ld-page-toolbar.js +1 -0
- package/dist/components/ld-pager.js +1 -0
- package/dist/components/ld-progress.js +1 -0
- package/dist/components/ld-radiobutton.js +1 -0
- package/dist/components/ld-radiogroup.js +1 -0
- package/dist/components/ld-select-list-box.js +1 -0
- package/dist/components/ld-select.js +1 -0
- package/dist/components/ld-slider.js +1 -0
- package/dist/components/ld-splitter.js +1 -0
- package/dist/components/ld-step.js +1 -0
- package/dist/components/ld-switch.js +1 -0
- package/dist/components/ld-tab.js +1 -0
- package/dist/components/ld-tabs.js +1 -0
- package/dist/components/ld-text-markup.js +1 -0
- package/dist/components/ld-text-viewer.js +1 -0
- package/dist/components/ld-textarea.js +1 -0
- package/dist/components/ld-timepicker.js +1 -0
- package/dist/components/ld-toggle-buttons.js +1 -0
- package/dist/components/ld-uploader.js +1 -0
- package/dist/fonts/Roboto-Medium.ttf +0 -0
- package/dist/fonts/Roboto-Medium.woff +0 -0
- package/dist/fonts/Roboto-Medium.woff2 +0 -0
- package/dist/fonts/Roboto-SemiBold.ttf +0 -0
- package/dist/fonts/Roboto-SemiBold.woff +0 -0
- package/dist/fonts/Roboto-SemiBold.woff2 +0 -0
- package/dist/i18n/ru/ru-Ru.json +50 -2
- package/dist/index.d.ts +20 -15
- package/dist/index.js +1 -21186
- package/dist/lib/runtime-template.js +1 -1
- package/dist/lib/toastification.js +1 -1
- package/dist/scss/_animations.scss +31 -12
- package/dist/scss/_avatar.scss +333 -0
- package/dist/scss/_badge.scss +128 -0
- package/dist/scss/_breadcrumbs.scss +133 -17
- package/dist/scss/_buttons.scss +584 -282
- package/dist/scss/_calendar.scss +154 -51
- package/dist/scss/_checkbox.scss +245 -0
- package/dist/scss/_chip.scss +163 -63
- package/dist/scss/_colors.scss +21 -19
- package/dist/scss/_dialogs.scss +106 -177
- package/dist/scss/_editor.scss +146 -0
- package/dist/scss/_expansions.scss +57 -0
- package/dist/scss/_fonts.scss +115 -0
- package/dist/scss/_inputs.scss +928 -138
- package/dist/scss/_loader.scss +163 -0
- package/dist/scss/_pager.scss +83 -16
- package/dist/scss/_progress.scss +282 -0
- package/dist/scss/_radiobutton.scss +218 -0
- package/dist/scss/_radiogroup.scss +87 -0
- package/dist/scss/_scroll.scss +65 -0
- package/dist/scss/_shadows.scss +47 -0
- package/dist/scss/_slider.scss +53 -0
- package/dist/scss/_splitter.scss +60 -0
- package/dist/scss/_step.scss +179 -0
- package/dist/scss/_switch.scss +198 -0
- package/dist/scss/_tabs.scss +318 -0
- package/dist/scss/_textmarkup.scss +47 -0
- package/dist/scss/_textviewer.scss +13 -0
- package/dist/scss/_toasted.scss +44 -22
- package/dist/scss/_toggle.scss +125 -0
- package/dist/scss/_toolbar.scss +40 -1
- package/dist/scss/_tooltip.scss +30 -0
- package/dist/scss/_treeview.scss +35 -0
- package/dist/scss/_uploader.scss +167 -0
- package/dist/scss/_variables.scss +5 -27
- package/dist/scss/index.scss +150 -16
- package/dist/scss/utils.scss +17 -0
- package/dist/types/breadcrumbs.d.ts +2 -0
- package/dist/types/calendar.d.ts +8 -73
- package/dist/types/combobox.d.ts +10 -0
- package/dist/types/dialogs.d.ts +28 -1
- package/dist/types/form.d.ts +6 -0
- package/dist/types/options.d.ts +11 -1
- package/dist/types/toasted.d.ts +4 -4
- package/dist/utils/validators.js +1 -1
- package/package.json +123 -120
- package/dist/css/calendar.css +0 -1066
- package/dist/css/index.css +0 -20
- package/dist/css/root.css +0 -86
- package/dist/lib/calendar.js +0 -1
- package/dist/lib/floating.js +0 -1
- package/dist/lib/multiselect.js +0 -1
- package/dist/scss/_multiselect.scss +0 -170
- package/dist/scss/_toasted-old.scss +0 -408
- package/dist/scss/index-old.scss +0 -16
package/dist/scss/_calendar.scss
CHANGED
|
@@ -1,60 +1,163 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
font-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
1
|
+
@use "utils";
|
|
2
|
+
|
|
3
|
+
@mixin calendarbutton {
|
|
4
|
+
$parent: utils.getParent(&);
|
|
5
|
+
|
|
6
|
+
display: flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
justify-content: center;
|
|
9
|
+
height: var(--button-xs);
|
|
10
|
+
border: 2px solid transparent;
|
|
11
|
+
border-radius: var(--border-radius);
|
|
12
|
+
|
|
13
|
+
span {
|
|
14
|
+
font-family: var(--regular);
|
|
15
|
+
font-size: var(--text-body-s);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
&[disabled] {
|
|
19
|
+
span {
|
|
20
|
+
color: var(--grey-d-1);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
$selected: utils.getSelector($parent, '--selected');
|
|
25
|
+
|
|
26
|
+
&:not([disabled]):not(#{$selected}) {
|
|
27
|
+
&:hover {
|
|
28
|
+
background-color: var(--grey-l-6);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&:focus-visible {
|
|
32
|
+
border: 2px solid var(--focus);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@mixin today() {
|
|
38
|
+
$parent: utils.getParent(&);
|
|
39
|
+
|
|
40
|
+
span {
|
|
41
|
+
position: relative;
|
|
42
|
+
font-family: var(--semibold);
|
|
43
|
+
color: var(--primary-d-1);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
$selected: utils.getSelector($parent, '--selected');
|
|
47
|
+
|
|
48
|
+
&:not(#{$selected}) {
|
|
49
|
+
span {
|
|
50
|
+
&:after {
|
|
51
|
+
content: '';
|
|
52
|
+
display: block;
|
|
53
|
+
position: absolute;
|
|
54
|
+
bottom: -4px;
|
|
55
|
+
left: 50%;
|
|
56
|
+
margin-left: -2px;
|
|
57
|
+
width: 4px;
|
|
58
|
+
height: 4px;
|
|
59
|
+
border-radius: 4px;
|
|
60
|
+
background-color: var(--primary-d-1);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
@mixin selected() {
|
|
67
|
+
&:not([disabled]) {
|
|
68
|
+
background-color: var(--primary);
|
|
69
|
+
span {
|
|
70
|
+
color: var(--white);
|
|
71
|
+
}
|
|
72
|
+
|
|
36
73
|
&:hover {
|
|
37
|
-
background:
|
|
74
|
+
background-color: var(--primary-d-1);
|
|
75
|
+
span {
|
|
76
|
+
color: var(--white);
|
|
77
|
+
}
|
|
38
78
|
}
|
|
39
79
|
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
80
|
+
|
|
81
|
+
&[disabled] {
|
|
82
|
+
background-color: var(--primary-l-2);
|
|
83
|
+
span {
|
|
84
|
+
color: var(--text);
|
|
85
|
+
}
|
|
45
86
|
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
body {
|
|
90
|
+
.ld-calendar {
|
|
91
|
+
width: 284px;
|
|
92
|
+
padding-top: 16px;
|
|
93
|
+
|
|
94
|
+
.v-date-picker-controls {
|
|
95
|
+
display: flex;
|
|
96
|
+
align-items: center;
|
|
97
|
+
justify-content: flex-start;
|
|
98
|
+
width: 100%;
|
|
99
|
+
height: 40px;
|
|
100
|
+
margin-bottom: 8px;
|
|
101
|
+
padding: 0 16px;
|
|
102
|
+
flex: unset;
|
|
103
|
+
flex-shrink: 0;
|
|
104
|
+
|
|
105
|
+
button {
|
|
106
|
+
font-family: var(--medium);
|
|
107
|
+
font-size: var(--text-body-m);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.v-date-picker-month__days {
|
|
112
|
+
column-gap: 0;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.v-date-picker-month__day {
|
|
116
|
+
width: 36px;
|
|
117
|
+
height: 32px;
|
|
118
|
+
margin-bottom: 8px;
|
|
46
119
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
font-weight: 400;
|
|
51
|
-
font-family: 'Roboto', Arial, Helvetica, sans-serif;
|
|
52
|
-
&.vc-disabled {
|
|
53
|
-
color: var(--grey-l-2) !important;
|
|
120
|
+
&.v-date-picker-month__weekday {
|
|
121
|
+
color: var(--grey-d-1);
|
|
122
|
+
}
|
|
54
123
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
124
|
+
|
|
125
|
+
.ld-calendar-day {
|
|
126
|
+
@include calendarbutton();
|
|
127
|
+
|
|
128
|
+
width: var(--button-xs);
|
|
129
|
+
|
|
130
|
+
&--today {
|
|
131
|
+
@include today();
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
&--selected {
|
|
135
|
+
@include selected();
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.ld-calendar-month {
|
|
140
|
+
@include calendarbutton();
|
|
141
|
+
|
|
142
|
+
&--today {
|
|
143
|
+
@include today();
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
&--selected {
|
|
147
|
+
@include selected();
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.ld-calendar-year {
|
|
152
|
+
@include calendarbutton();
|
|
153
|
+
|
|
154
|
+
&--today {
|
|
155
|
+
@include today();
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
&--selected {
|
|
159
|
+
@include selected();
|
|
160
|
+
}
|
|
58
161
|
}
|
|
59
162
|
}
|
|
60
163
|
}
|
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--checkbox-s: 16px;
|
|
3
|
+
--checkbox-m: 20px;
|
|
4
|
+
--checkbox-l: 24px;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
body {
|
|
8
|
+
.ld-checkbox {
|
|
9
|
+
position: relative;
|
|
10
|
+
display: flex;
|
|
11
|
+
flex-direction: column;
|
|
12
|
+
min-height: 20px;
|
|
13
|
+
|
|
14
|
+
input[type='checkbox'] {
|
|
15
|
+
position: absolute;
|
|
16
|
+
top: 0;
|
|
17
|
+
left: 0;
|
|
18
|
+
width: 100%;
|
|
19
|
+
height: 100%;
|
|
20
|
+
opacity: 0;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
input[type='checkbox'] + .ld-checkbox-icon {
|
|
24
|
+
position: relative;
|
|
25
|
+
display: flex;
|
|
26
|
+
align-items: center;
|
|
27
|
+
height: 100%;
|
|
28
|
+
width: 100%;
|
|
29
|
+
background-color: var(--white);
|
|
30
|
+
border: 1px solid var(--grey-l-4);
|
|
31
|
+
border-radius: 4px;
|
|
32
|
+
color: transparent;
|
|
33
|
+
z-index: 1;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
input[type='checkbox']:focus + .ld-checkbox-icon {
|
|
37
|
+
svg {
|
|
38
|
+
opacity: 0;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
input[type='checkbox']:checked + .ld-checkbox-icon {
|
|
43
|
+
position: relative;
|
|
44
|
+
display: flex;
|
|
45
|
+
align-items: center;
|
|
46
|
+
justify-content: center;
|
|
47
|
+
color: var(--white);
|
|
48
|
+
overflow: hidden;
|
|
49
|
+
svg {
|
|
50
|
+
opacity: 1;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
label {
|
|
55
|
+
display: flex;
|
|
56
|
+
align-items: center;
|
|
57
|
+
justify-content: center;
|
|
58
|
+
word-wrap: break-word;
|
|
59
|
+
max-width: 100%;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
&-hint {
|
|
63
|
+
font-family: var(--regular);
|
|
64
|
+
color: var(--grey-d-1);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
@mixin checkboxsize($size, $fontSize) {
|
|
68
|
+
label {
|
|
69
|
+
height: calc($size + 8px);
|
|
70
|
+
width: calc($size + 8px);
|
|
71
|
+
|
|
72
|
+
input[type='checkbox'] + .ld-checkbox-icon {
|
|
73
|
+
height: $size;
|
|
74
|
+
width: $size;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
input[type='checkbox']:checked + .ld-checkbox-icon {
|
|
78
|
+
svg {
|
|
79
|
+
height: calc($size * 0.5);
|
|
80
|
+
width: calc($size * 0.9);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.ld-label-content {
|
|
86
|
+
font-size: $fontSize;
|
|
87
|
+
line-height: calc($fontSize + 6px);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.ld-checkbox-hint {
|
|
91
|
+
font-size: calc($fontSize - 2px);
|
|
92
|
+
line-height: calc($fontSize - 2px + 6px);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
&:not(.ld-checkbox--label-to-left) {
|
|
96
|
+
.ld-checkbox-hint {
|
|
97
|
+
padding-left: calc($size + 8px + 8px);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
// --------- x-small
|
|
103
|
+
|
|
104
|
+
&.ld-checkbox--x-small {
|
|
105
|
+
@include checkboxsize(var(--checkbox-s), var(--text-body-s));
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// --------- small
|
|
109
|
+
|
|
110
|
+
&.ld-checkbox--small {
|
|
111
|
+
@include checkboxsize(var(--checkbox-m), var(--text-body-m));
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
// --------- large
|
|
115
|
+
|
|
116
|
+
&.ld-checkbox--large {
|
|
117
|
+
@include checkboxsize(var(--checkbox-l), var(--text-body-l));
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
&:not(.ld-checkbox--disabled):not(.ld-checkbox--readonly):hover {
|
|
121
|
+
label {
|
|
122
|
+
background-color: var(--shade-05);
|
|
123
|
+
border-radius: 8px;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
&.ld-checkbox--focused {
|
|
128
|
+
label {
|
|
129
|
+
background-color: var(--shade-05);
|
|
130
|
+
border-radius: 8px;
|
|
131
|
+
&:after {
|
|
132
|
+
content: '';
|
|
133
|
+
display: block;
|
|
134
|
+
position: absolute;
|
|
135
|
+
top: 0;
|
|
136
|
+
left: 0;
|
|
137
|
+
width: 100%;
|
|
138
|
+
height: 100%;
|
|
139
|
+
border-radius: 8px;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
@mixin checkboxiconcolor($color) {
|
|
145
|
+
background-color: $color;
|
|
146
|
+
border-color: $color;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
// ---------- primary
|
|
150
|
+
|
|
151
|
+
&.text-primary {
|
|
152
|
+
input[type='checkbox']:checked + .ld-checkbox-icon {
|
|
153
|
+
@include checkboxiconcolor(var(--primary));
|
|
154
|
+
&:hover {
|
|
155
|
+
@include checkboxiconcolor(var(--primary-d-1));
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
input[type='checkbox']:checked:focus + .ld-checkbox-icon {
|
|
160
|
+
@include checkboxiconcolor(var(--focus));
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
input[type='checkbox']:checked:active + .ld-checkbox-icon {
|
|
164
|
+
@include checkboxiconcolor(var(--primary-d-2));
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
&.ld-checkbox--hovered {
|
|
168
|
+
input[type='checkbox']:checked + .ld-checkbox-icon {
|
|
169
|
+
@include checkboxiconcolor(var(--primary-d-1));
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
&.ld-checkbox--focused {
|
|
174
|
+
label {
|
|
175
|
+
&:after {
|
|
176
|
+
border: 2px solid var(--focus);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
// ---------- error
|
|
183
|
+
|
|
184
|
+
&.text-error {
|
|
185
|
+
input[type='checkbox']:checked + .ld-checkbox-icon {
|
|
186
|
+
@include checkboxiconcolor(var(--error));
|
|
187
|
+
&:hover {
|
|
188
|
+
@include checkboxiconcolor(var(--error-d-1));
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
input[type='checkbox']:checked:focus + .ld-checkbox-icon {
|
|
193
|
+
@include checkboxiconcolor(var(--focus));
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
input[type='checkbox']:checked:active + .ld-checkbox-icon {
|
|
197
|
+
@include checkboxiconcolor(var(--error-d-2));
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
&.ld-checkbox--hovered {
|
|
201
|
+
input[type='checkbox']:checked + .ld-checkbox-icon {
|
|
202
|
+
@include checkboxiconcolor(var(--error-d-1));
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
&.ld-checkbox--focused {
|
|
207
|
+
label {
|
|
208
|
+
&:after {
|
|
209
|
+
border: 2px solid var(--focus);
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
&.ld-checkbox--disabled,
|
|
216
|
+
&.ld-checkbox--readonly {
|
|
217
|
+
input[type='checkbox'] + .ld-checkbox-icon {
|
|
218
|
+
@include checkboxiconcolor(var(--grey-l-5));
|
|
219
|
+
svg {
|
|
220
|
+
opacity: 0;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
input[type='checkbox']:checked + .ld-checkbox-icon {
|
|
225
|
+
@include checkboxiconcolor(var(--grey-l-5));
|
|
226
|
+
color: var(--grey-l-2);
|
|
227
|
+
svg {
|
|
228
|
+
opacity: 1;
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
&.ld-checkbox--disabled {
|
|
234
|
+
.ld-label-content {
|
|
235
|
+
color: var(--grey-l-2);
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
&.ld-checkbox--readonly {
|
|
240
|
+
.ld-label-content {
|
|
241
|
+
color: var(--grey-d-3);
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
}
|
package/dist/scss/_chip.scss
CHANGED
|
@@ -1,81 +1,181 @@
|
|
|
1
|
+
@use "sass:list";
|
|
2
|
+
|
|
3
|
+
:root {
|
|
4
|
+
--chip-s: 24px;
|
|
5
|
+
--chip-m: 32px;
|
|
6
|
+
--chip-l: 40px;
|
|
7
|
+
--chip-border-radius: 24px;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
$sizearray: (
|
|
11
|
+
'x-small': (
|
|
12
|
+
// font size
|
|
13
|
+
var(--font-size),
|
|
14
|
+
// height
|
|
15
|
+
var(--chip-s),
|
|
16
|
+
// padding
|
|
17
|
+
8px,
|
|
18
|
+
// close button size
|
|
19
|
+
16px
|
|
20
|
+
),
|
|
21
|
+
'small': (
|
|
22
|
+
var(--text-body-s),
|
|
23
|
+
var(--chip-m),
|
|
24
|
+
8px,
|
|
25
|
+
16px
|
|
26
|
+
),
|
|
27
|
+
'large': (
|
|
28
|
+
var(--text-body-m),
|
|
29
|
+
var(--chip-l),
|
|
30
|
+
10px,
|
|
31
|
+
20px
|
|
32
|
+
)
|
|
33
|
+
);
|
|
34
|
+
|
|
1
35
|
body {
|
|
2
|
-
.
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
36
|
+
.ld-chip {
|
|
37
|
+
font-family: var(--medium);
|
|
38
|
+
position: relative;
|
|
39
|
+
border-radius: var(--chip-border-radius) !important;
|
|
40
|
+
box-sizing: border-box;
|
|
41
|
+
|
|
42
|
+
@each $size, $values in $sizearray {
|
|
43
|
+
&.v-btn--size-#{$size} {
|
|
44
|
+
$f: list.nth($values, 1);
|
|
45
|
+
$h: list.nth($values, 2);
|
|
46
|
+
$p: list.nth($values, 3);
|
|
47
|
+
$icon: list.nth($values, 4);
|
|
48
|
+
|
|
49
|
+
font-size: $f !important;
|
|
50
|
+
height: $h;
|
|
51
|
+
padding: 0 $p !important;
|
|
52
|
+
|
|
53
|
+
.ld-chip-close {
|
|
54
|
+
width: $icon;
|
|
55
|
+
height: $icon;
|
|
11
56
|
|
|
12
|
-
|
|
13
|
-
|
|
57
|
+
svg {
|
|
58
|
+
width: calc($icon - 6px);
|
|
59
|
+
height: calc($icon - 6px);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&.ld-chip--focused {
|
|
64
|
+
&:after {
|
|
65
|
+
height: calc($h + 8px);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
14
68
|
}
|
|
15
69
|
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
70
|
+
|
|
71
|
+
&.ld-chip--focused {
|
|
72
|
+
&:after {
|
|
73
|
+
content: '';
|
|
74
|
+
display: block;
|
|
75
|
+
position: absolute;
|
|
76
|
+
top: -5px;
|
|
77
|
+
left: -5px;
|
|
78
|
+
width: calc(100% + 10px);
|
|
79
|
+
border-radius: 20px;
|
|
80
|
+
border: 2px solid var(--focus);
|
|
81
|
+
opacity: 1;
|
|
28
82
|
}
|
|
29
83
|
}
|
|
30
|
-
&.text-primary {
|
|
31
|
-
border: 1px solid var(--primary-l-2);
|
|
32
|
-
color: var(--primary-l-2) !important;
|
|
33
|
-
.v-icon {
|
|
34
|
-
color: var(--primary-l-2) !important;
|
|
35
|
-
}
|
|
36
|
-
svg {
|
|
37
|
-
color: var(--primary-l-2) !important;
|
|
38
|
-
}
|
|
39
84
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
85
|
+
@mixin chipflat($colorname, $color) {
|
|
86
|
+
&.bg-#{$colorname} {
|
|
87
|
+
border: 1px solid $color;
|
|
88
|
+
background-color: $color;
|
|
89
|
+
color: var(--white);
|
|
90
|
+
|
|
91
|
+
svg {
|
|
92
|
+
color: var(--white);
|
|
93
|
+
}
|
|
43
94
|
}
|
|
44
95
|
}
|
|
45
96
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
97
|
+
@mixin chipoutlined(
|
|
98
|
+
$colorname,
|
|
99
|
+
$borderColor,
|
|
100
|
+
$color,
|
|
101
|
+
$bgHover,
|
|
102
|
+
$borderHover,
|
|
103
|
+
$bgActive,
|
|
104
|
+
$borderActive
|
|
105
|
+
) {
|
|
106
|
+
&.v-btn--variant-outlined.text-#{$colorname} {
|
|
107
|
+
border: 1px solid $borderColor;
|
|
108
|
+
color: $color;
|
|
50
109
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
.v-chip__underlay {
|
|
55
|
-
display: none;
|
|
56
|
-
}
|
|
57
|
-
.v-chip__close {
|
|
58
|
-
opacity: 0.6;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
110
|
+
svg {
|
|
111
|
+
color: $color;
|
|
112
|
+
}
|
|
61
113
|
|
|
62
|
-
|
|
63
|
-
|
|
114
|
+
&:hover {
|
|
115
|
+
background-color: $bgHover !important;
|
|
116
|
+
border-color: $borderHover !important;
|
|
117
|
+
}
|
|
64
118
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
119
|
+
&:active {
|
|
120
|
+
background-color: $bgActive !important;
|
|
121
|
+
border-color: $borderActive !important;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
&[disabled] {
|
|
125
|
+
background-color: var(--grey-l-6) !important;
|
|
126
|
+
border-color: var(--grey-l-6) !important;
|
|
127
|
+
color: var(--grey-l-2) !important;
|
|
71
128
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
129
|
+
svg {
|
|
130
|
+
color: var(--grey-l-2) !important;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
75
134
|
}
|
|
76
|
-
}
|
|
77
135
|
|
|
78
|
-
|
|
79
|
-
|
|
136
|
+
// ------- primary
|
|
137
|
+
|
|
138
|
+
@include chipflat('primary', var(--primary));
|
|
139
|
+
|
|
140
|
+
@include chipoutlined(
|
|
141
|
+
'primary',
|
|
142
|
+
// default border color
|
|
143
|
+
var(--primary-l-3),
|
|
144
|
+
// default color
|
|
145
|
+
var(--primary),
|
|
146
|
+
// hover bg color
|
|
147
|
+
var(--primary-l-6),
|
|
148
|
+
// hover border color
|
|
149
|
+
var(--primary-l-2),
|
|
150
|
+
// active bg color
|
|
151
|
+
var(--primary-l-5),
|
|
152
|
+
// active border color
|
|
153
|
+
var(--primary-l-1),
|
|
154
|
+
);
|
|
155
|
+
|
|
156
|
+
// ------- grey
|
|
157
|
+
|
|
158
|
+
@include chipflat('grey', var(--grey));
|
|
159
|
+
|
|
160
|
+
@include chipoutlined(
|
|
161
|
+
'grey',
|
|
162
|
+
// default border color
|
|
163
|
+
var(--grey),
|
|
164
|
+
// default color
|
|
165
|
+
var(--grey-d-3),
|
|
166
|
+
// hover bg color
|
|
167
|
+
var(--grey-l-6),
|
|
168
|
+
// hover border color
|
|
169
|
+
var(--grey-l-5),
|
|
170
|
+
// active bg color
|
|
171
|
+
var(--grey-l-4),
|
|
172
|
+
// active border color
|
|
173
|
+
var(--grey-l-4),
|
|
174
|
+
);
|
|
175
|
+
|
|
176
|
+
.ld-chip-close {
|
|
177
|
+
display: flex;
|
|
178
|
+
align-items: center;
|
|
179
|
+
}
|
|
80
180
|
}
|
|
81
181
|
}
|