lumen-plus 0.0.3 → 0.0.5
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/index.js +2 -0
- package/dist/theme-chalk/_index.scss +69 -0
- package/dist/theme-chalk/_reset.scss +16 -0
- package/dist/theme-chalk/_variables.scss +91 -0
- package/dist/theme-chalk/affix.scss +8 -0
- package/dist/theme-chalk/alert.scss +140 -0
- package/dist/theme-chalk/autocomplete.scss +238 -0
- package/dist/theme-chalk/avatar.scss +49 -0
- package/dist/theme-chalk/backtop.scss +55 -0
- package/dist/theme-chalk/badge.scss +47 -0
- package/dist/theme-chalk/breadcrumb.scss +50 -0
- package/dist/theme-chalk/button.scss +472 -0
- package/dist/theme-chalk/calendar.scss +166 -0
- package/dist/theme-chalk/card.scss +70 -0
- package/dist/theme-chalk/carousel.scss +167 -0
- package/dist/theme-chalk/cascader.scss +265 -0
- package/dist/theme-chalk/checkbox.scss +127 -0
- package/dist/theme-chalk/collapse.scss +100 -0
- package/dist/theme-chalk/color-picker.scss +247 -0
- package/dist/theme-chalk/container.scss +79 -0
- package/dist/theme-chalk/date-picker.scss +352 -0
- package/dist/theme-chalk/date-time-picker.scss +396 -0
- package/dist/theme-chalk/descriptions.scss +160 -0
- package/dist/theme-chalk/dialog.scss +154 -0
- package/dist/theme-chalk/divider.scss +61 -0
- package/dist/theme-chalk/drawer.scss +211 -0
- package/dist/theme-chalk/dropdown.scss +230 -0
- package/dist/theme-chalk/empty.scss +36 -0
- package/dist/theme-chalk/form.scss +187 -0
- package/dist/theme-chalk/icon.scss +16 -0
- package/dist/theme-chalk/image.scss +171 -0
- package/dist/theme-chalk/input-number.scss +229 -0
- package/dist/theme-chalk/input-tag.scss +119 -0
- package/dist/theme-chalk/input.scss +249 -0
- package/dist/theme-chalk/link.scss +28 -0
- package/dist/theme-chalk/loading.scss +68 -0
- package/dist/theme-chalk/menu.scss +239 -0
- package/dist/theme-chalk/message.scss +150 -0
- package/dist/theme-chalk/messagebox.scss +76 -0
- package/dist/theme-chalk/mixins/_bem.scss +103 -0
- package/dist/theme-chalk/mixins/_function.scss +12 -0
- package/dist/theme-chalk/notification.scss +164 -0
- package/dist/theme-chalk/pagination.scss +130 -0
- package/dist/theme-chalk/pin-input.scss +192 -0
- package/dist/theme-chalk/popconfirm.scss +194 -0
- package/dist/theme-chalk/popover.scss +196 -0
- package/dist/theme-chalk/progress.scss +51 -0
- package/dist/theme-chalk/radio.scss +128 -0
- package/dist/theme-chalk/rating.scss +227 -0
- package/dist/theme-chalk/result.scss +80 -0
- package/dist/theme-chalk/segmented.scss +108 -0
- package/dist/theme-chalk/select.scss +301 -0
- package/dist/theme-chalk/skeleton.scss +113 -0
- package/dist/theme-chalk/slider.scss +259 -0
- package/dist/theme-chalk/space.scss +44 -0
- package/dist/theme-chalk/statistic.scss +49 -0
- package/dist/theme-chalk/steps.scss +255 -0
- package/dist/theme-chalk/switch.scss +277 -0
- package/dist/theme-chalk/table.scss +343 -0
- package/dist/theme-chalk/tabs.scss +433 -0
- package/dist/theme-chalk/tag.scss +143 -0
- package/dist/theme-chalk/textarea.scss +125 -0
- package/dist/theme-chalk/time-picker.scss +321 -0
- package/dist/theme-chalk/timeline.scss +119 -0
- package/dist/theme-chalk/tooltip.scss +165 -0
- package/dist/theme-chalk/transfer.scss +219 -0
- package/dist/theme-chalk/tree-select.scss +384 -0
- package/dist/theme-chalk/tree.scss +101 -0
- package/dist/theme-chalk/upload.scss +457 -0
- package/dist/theme-chalk/watermark.scss +30 -0
- package/dist/utils/index.js +1 -0
- package/dist/utils/transitions.js +31 -0
- package/package.json +8 -2
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
@use './variables' as *;
|
|
2
|
+
@use './mixins/bem' as *;
|
|
3
|
+
|
|
4
|
+
@include b('calendar') {
|
|
5
|
+
background-color: #fff;
|
|
6
|
+
border: 1px solid $border-color-light;
|
|
7
|
+
border-radius: $border-radius-base;
|
|
8
|
+
overflow: hidden;
|
|
9
|
+
|
|
10
|
+
@include e('header') {
|
|
11
|
+
display: flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
justify-content: space-between;
|
|
14
|
+
padding: 12px 16px;
|
|
15
|
+
border-bottom: 1px solid $border-color-light;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
@include e('nav') {
|
|
19
|
+
display: flex;
|
|
20
|
+
align-items: center;
|
|
21
|
+
gap: 4px;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@include e('btn') {
|
|
25
|
+
display: inline-flex;
|
|
26
|
+
align-items: center;
|
|
27
|
+
justify-content: center;
|
|
28
|
+
width: 28px;
|
|
29
|
+
height: 28px;
|
|
30
|
+
padding: 0;
|
|
31
|
+
border: none;
|
|
32
|
+
border-radius: $border-radius-base;
|
|
33
|
+
background-color: transparent;
|
|
34
|
+
color: $color-text-secondary;
|
|
35
|
+
cursor: pointer;
|
|
36
|
+
transition: background-color 0.2s, color 0.2s;
|
|
37
|
+
|
|
38
|
+
&:hover {
|
|
39
|
+
background-color: #f5f7fa;
|
|
40
|
+
color: $color-text;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
@include e('title') {
|
|
45
|
+
font-size: 16px;
|
|
46
|
+
font-weight: 500;
|
|
47
|
+
color: $color-text;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
@include e('body') {
|
|
51
|
+
padding: 12px;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
@include e('weekdays') {
|
|
55
|
+
display: grid;
|
|
56
|
+
grid-template-columns: repeat(7, 1fr);
|
|
57
|
+
margin-bottom: 8px;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
@include e('weekday') {
|
|
61
|
+
padding: 8px 0;
|
|
62
|
+
text-align: center;
|
|
63
|
+
font-size: 12px;
|
|
64
|
+
font-weight: 500;
|
|
65
|
+
color: $color-text-secondary;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
@include e('days') {
|
|
69
|
+
display: grid;
|
|
70
|
+
grid-template-columns: repeat(7, 1fr);
|
|
71
|
+
gap: 4px;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
@include e('day') {
|
|
75
|
+
display: flex;
|
|
76
|
+
align-items: center;
|
|
77
|
+
justify-content: center;
|
|
78
|
+
height: 36px;
|
|
79
|
+
font-size: 14px;
|
|
80
|
+
color: $color-text;
|
|
81
|
+
border: none;
|
|
82
|
+
background: none;
|
|
83
|
+
border-radius: $border-radius-base;
|
|
84
|
+
cursor: pointer;
|
|
85
|
+
transition: background-color 0.2s, color 0.2s;
|
|
86
|
+
|
|
87
|
+
&:hover { background-color: #f5f7fa; }
|
|
88
|
+
|
|
89
|
+
&.is-other-month { color: $color-text-placeholder; }
|
|
90
|
+
|
|
91
|
+
&.is-today {
|
|
92
|
+
color: $color-primary;
|
|
93
|
+
font-weight: 500;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
&.is-selected {
|
|
97
|
+
color: #fff;
|
|
98
|
+
background-color: $color-primary;
|
|
99
|
+
|
|
100
|
+
&:hover { opacity: 0.85; }
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
@include e('footer') {
|
|
105
|
+
padding: 12px 16px;
|
|
106
|
+
border-top: 1px solid $border-color-light;
|
|
107
|
+
text-align: center;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
@include e('today') {
|
|
111
|
+
padding: 6px 16px;
|
|
112
|
+
font-size: 13px;
|
|
113
|
+
color: $color-primary;
|
|
114
|
+
background-color: transparent;
|
|
115
|
+
border: 1px solid $color-primary;
|
|
116
|
+
border-radius: $border-radius-base;
|
|
117
|
+
cursor: pointer;
|
|
118
|
+
transition: background-color 0.2s, color 0.2s;
|
|
119
|
+
|
|
120
|
+
&:hover {
|
|
121
|
+
color: #fff;
|
|
122
|
+
background-color: $color-primary;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.dark {
|
|
128
|
+
.#{$namespace}-calendar {
|
|
129
|
+
background-color: $bg-color-dark-light;
|
|
130
|
+
border-color: color-mix(in oklab, $bg-color-dark-lighter 70%, $color-text-dark-secondary);
|
|
131
|
+
|
|
132
|
+
.#{$namespace}-calendar__header {
|
|
133
|
+
border-bottom-color: color-mix(in oklab, $bg-color-dark-lighter 70%, $color-text-dark-secondary);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.#{$namespace}-calendar__title,
|
|
137
|
+
.#{$namespace}-calendar__day {
|
|
138
|
+
color: $color-text-dark;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.#{$namespace}-calendar__weekday {
|
|
142
|
+
color: $color-text-dark-secondary;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.#{$namespace}-calendar__btn {
|
|
146
|
+
color: $color-text-dark-secondary;
|
|
147
|
+
|
|
148
|
+
&:hover {
|
|
149
|
+
background-color: $bg-color-dark-lighter;
|
|
150
|
+
color: $color-text-dark;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.#{$namespace}-calendar__day:hover {
|
|
155
|
+
background-color: $bg-color-dark-lighter;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.#{$namespace}-calendar__day.is-other-month {
|
|
159
|
+
color: rgba($color-text-dark, 0.35);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.#{$namespace}-calendar__footer {
|
|
163
|
+
border-top-color: color-mix(in oklab, $bg-color-dark-lighter 70%, $color-text-dark-secondary);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
@use './variables' as *;
|
|
2
|
+
@use './mixins/bem' as *;
|
|
3
|
+
|
|
4
|
+
@include b('card') {
|
|
5
|
+
background: $bg-color;
|
|
6
|
+
border-radius: $border-radius-base;
|
|
7
|
+
border: 1px solid $border-color-lighter;
|
|
8
|
+
overflow: hidden;
|
|
9
|
+
color: $color-text-regular;
|
|
10
|
+
transition: box-shadow $transition-duration;
|
|
11
|
+
box-shadow: $box-shadow-light;
|
|
12
|
+
max-width: 100%;
|
|
13
|
+
min-width: 0;
|
|
14
|
+
|
|
15
|
+
&.is-hover-shadow {
|
|
16
|
+
box-shadow: none;
|
|
17
|
+
|
|
18
|
+
&:hover,
|
|
19
|
+
&:focus {
|
|
20
|
+
box-shadow: $box-shadow-light;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&.is-never-shadow {
|
|
25
|
+
box-shadow: none;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@include e('header') {
|
|
29
|
+
display: flex;
|
|
30
|
+
justify-content: space-between;
|
|
31
|
+
align-items: center;
|
|
32
|
+
padding: $spacing-base $spacing-base;
|
|
33
|
+
border-bottom: 1px solid $border-color-lighter;
|
|
34
|
+
box-sizing: border-box;
|
|
35
|
+
font-weight: $font-weight-primary;
|
|
36
|
+
color: $color-text-primary;
|
|
37
|
+
gap: 16px;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
@include e('body') {
|
|
41
|
+
padding: $spacing-base;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
@include e('footer') {
|
|
45
|
+
display: flex;
|
|
46
|
+
justify-content: flex-end;
|
|
47
|
+
align-items: center;
|
|
48
|
+
padding: $spacing-base $spacing-base;
|
|
49
|
+
border-top: 1px solid $border-color-lighter;
|
|
50
|
+
box-sizing: border-box;
|
|
51
|
+
gap: 16px;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.dark {
|
|
56
|
+
.#{$namespace}-card {
|
|
57
|
+
background: $bg-color-dark-light;
|
|
58
|
+
border-color: color-mix(in oklab, $bg-color-dark-lighter 70%, $color-text-dark-secondary);
|
|
59
|
+
color: $color-text-dark-secondary;
|
|
60
|
+
|
|
61
|
+
.#{$namespace}-card__header {
|
|
62
|
+
color: $color-text-dark;
|
|
63
|
+
border-bottom-color: color-mix(in oklab, $bg-color-dark-lighter 70%, $color-text-dark-secondary);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.#{$namespace}-card__footer {
|
|
67
|
+
border-top-color: color-mix(in oklab, $bg-color-dark-lighter 70%, $color-text-dark-secondary);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
@use './variables' as *;
|
|
2
|
+
@use './mixins/bem' as *;
|
|
3
|
+
|
|
4
|
+
@include b('carousel') {
|
|
5
|
+
position: relative;
|
|
6
|
+
overflow: hidden;
|
|
7
|
+
border-radius: $border-radius-base;
|
|
8
|
+
|
|
9
|
+
@include m('horizontal') {
|
|
10
|
+
.#{$namespace}-carousel__container {
|
|
11
|
+
display: flex;
|
|
12
|
+
transition: transform $transition-duration $transition-function-ease-in-out-bezier;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.#{$namespace}-carousel__item {
|
|
16
|
+
flex-shrink: 0;
|
|
17
|
+
width: 100%;
|
|
18
|
+
height: 100%;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.#{$namespace}-carousel__indicators {
|
|
22
|
+
bottom: 12px;
|
|
23
|
+
left: 50%;
|
|
24
|
+
transform: translateX(-50%);
|
|
25
|
+
flex-direction: row;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
@include m('vertical') {
|
|
30
|
+
.#{$namespace}-carousel__container {
|
|
31
|
+
display: flex;
|
|
32
|
+
flex-direction: column;
|
|
33
|
+
transition: transform $transition-duration $transition-function-ease-in-out-bezier;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.#{$namespace}-carousel__item {
|
|
37
|
+
flex-shrink: 0;
|
|
38
|
+
width: 100%;
|
|
39
|
+
height: 100%;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.#{$namespace}-carousel__indicators {
|
|
43
|
+
right: 12px;
|
|
44
|
+
top: 50%;
|
|
45
|
+
transform: translateY(-50%);
|
|
46
|
+
flex-direction: column;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.#{$namespace}-carousel__arrow--prev {
|
|
50
|
+
top: 12px;
|
|
51
|
+
left: 50%;
|
|
52
|
+
transform: translateX(-50%);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.#{$namespace}-carousel__arrow--next {
|
|
56
|
+
bottom: 12px;
|
|
57
|
+
top: auto;
|
|
58
|
+
left: 50%;
|
|
59
|
+
transform: translateX(-50%);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
@include m('indicator-outside') {
|
|
64
|
+
.#{$namespace}-carousel__indicators {
|
|
65
|
+
bottom: -24px;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
@include e('container') {
|
|
70
|
+
height: 100%;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
@include e('item') {
|
|
74
|
+
display: flex;
|
|
75
|
+
align-items: center;
|
|
76
|
+
justify-content: center;
|
|
77
|
+
|
|
78
|
+
&.is-active {
|
|
79
|
+
z-index: 1;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
@include e('arrow') {
|
|
84
|
+
position: absolute;
|
|
85
|
+
top: 50%;
|
|
86
|
+
transform: translateY(-50%);
|
|
87
|
+
width: 36px;
|
|
88
|
+
height: 36px;
|
|
89
|
+
display: flex;
|
|
90
|
+
align-items: center;
|
|
91
|
+
justify-content: center;
|
|
92
|
+
border: none;
|
|
93
|
+
border-radius: $border-radius-circle;
|
|
94
|
+
background: rgba(255, 255, 255, 0.8);
|
|
95
|
+
cursor: pointer;
|
|
96
|
+
color: $color-text-secondary;
|
|
97
|
+
transition: background-color $transition-duration-fast, color $transition-duration-fast;
|
|
98
|
+
z-index: 10;
|
|
99
|
+
|
|
100
|
+
&:hover {
|
|
101
|
+
background: $bg-color;
|
|
102
|
+
color: $color-primary;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
@include m('prev') {
|
|
106
|
+
left: 12px;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
@include m('next') {
|
|
110
|
+
right: 12px;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
@include e('indicators') {
|
|
115
|
+
position: absolute;
|
|
116
|
+
display: flex;
|
|
117
|
+
gap: 8px;
|
|
118
|
+
z-index: 10;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
@include e('indicator') {
|
|
122
|
+
width: 8px;
|
|
123
|
+
height: 8px;
|
|
124
|
+
padding: 0;
|
|
125
|
+
border: none;
|
|
126
|
+
border-radius: $border-radius-circle;
|
|
127
|
+
background: rgba(255, 255, 255, 0.5);
|
|
128
|
+
cursor: pointer;
|
|
129
|
+
transition: background-color $transition-duration-fast, width $transition-duration-fast, border-radius $transition-duration-fast;
|
|
130
|
+
|
|
131
|
+
&:hover {
|
|
132
|
+
background: rgba(255, 255, 255, 0.8);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
&.is-active {
|
|
136
|
+
background: rgba(255, 255, 255, 0.9);
|
|
137
|
+
width: 20px;
|
|
138
|
+
border-radius: $border-radius-round;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.dark {
|
|
144
|
+
.#{$namespace}-carousel {
|
|
145
|
+
.#{$namespace}-carousel__arrow {
|
|
146
|
+
background: rgba(30, 35, 41, 0.85);
|
|
147
|
+
color: $color-text-dark-secondary;
|
|
148
|
+
|
|
149
|
+
&:hover {
|
|
150
|
+
background: $bg-color-dark-light;
|
|
151
|
+
color: $color-primary;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.#{$namespace}-carousel__indicator {
|
|
156
|
+
background: rgba($color-text-dark, 0.22);
|
|
157
|
+
|
|
158
|
+
&:hover {
|
|
159
|
+
background: rgba($color-text-dark, 0.38);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
&.is-active {
|
|
163
|
+
background: rgba($color-text-dark, 0.65);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
@use './variables' as *;
|
|
2
|
+
@use './mixins/bem' as *;
|
|
3
|
+
|
|
4
|
+
@include b('cascader') {
|
|
5
|
+
position: relative;
|
|
6
|
+
display: inline-block;
|
|
7
|
+
width: 220px;
|
|
8
|
+
max-width: 100%;
|
|
9
|
+
font-size: $font-size-base;
|
|
10
|
+
|
|
11
|
+
@include m('small') {
|
|
12
|
+
font-size: $font-size-small;
|
|
13
|
+
.#{$namespace}-cascader__input {
|
|
14
|
+
height: 28px;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
@include m('default') {
|
|
19
|
+
font-size: $font-size-base;
|
|
20
|
+
.#{$namespace}-cascader__input {
|
|
21
|
+
height: 32px;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@include m('large') {
|
|
26
|
+
font-size: $font-size-medium;
|
|
27
|
+
.#{$namespace}-cascader__input {
|
|
28
|
+
height: 40px;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@include e('input') {
|
|
33
|
+
display: flex;
|
|
34
|
+
align-items: center;
|
|
35
|
+
padding: 0 12px;
|
|
36
|
+
height: 32px;
|
|
37
|
+
border: 1px solid $border-color-base;
|
|
38
|
+
border-radius: $border-radius-base;
|
|
39
|
+
background-color: #fff;
|
|
40
|
+
cursor: pointer;
|
|
41
|
+
transition: border-color 0.2s;
|
|
42
|
+
font-family: inherit;
|
|
43
|
+
font-size: inherit;
|
|
44
|
+
font-weight: inherit;
|
|
45
|
+
|
|
46
|
+
&:hover { border-color: #c0c4cc; }
|
|
47
|
+
&.is-focus { border-color: $color-primary; }
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
@include e('value') {
|
|
51
|
+
flex: 1;
|
|
52
|
+
color: $color-text-primary;
|
|
53
|
+
overflow: hidden;
|
|
54
|
+
text-overflow: ellipsis;
|
|
55
|
+
white-space: nowrap;
|
|
56
|
+
font-size: inherit;
|
|
57
|
+
font-weight: inherit;
|
|
58
|
+
line-height: inherit;
|
|
59
|
+
|
|
60
|
+
&.is-placeholder { color: $color-text-placeholder; }
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
@include e('arrow') {
|
|
64
|
+
color: $color-text-secondary;
|
|
65
|
+
transition: transform 0.2s;
|
|
66
|
+
&.is-open { transform: rotate(180deg); }
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
@include e('clear') {
|
|
70
|
+
display: inline-flex;
|
|
71
|
+
align-items: center;
|
|
72
|
+
padding: 0;
|
|
73
|
+
border: none;
|
|
74
|
+
background: none;
|
|
75
|
+
color: $color-text-secondary;
|
|
76
|
+
cursor: pointer;
|
|
77
|
+
&:hover { color: $color-text; }
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
@include e('dropdown') {
|
|
81
|
+
position: absolute;
|
|
82
|
+
top: 100%;
|
|
83
|
+
left: 0;
|
|
84
|
+
display: flex;
|
|
85
|
+
margin-top: 12px;
|
|
86
|
+
// Arrow variables
|
|
87
|
+
--l-cascader-bg: #{$bg-color};
|
|
88
|
+
--l-cascader-border: #{$border-color-lighter};
|
|
89
|
+
--arrow-size: 10px;
|
|
90
|
+
|
|
91
|
+
background-color: var(--l-cascader-bg);
|
|
92
|
+
border: 1px solid var(--l-cascader-border);
|
|
93
|
+
border-radius: $border-radius-base;
|
|
94
|
+
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
|
|
95
|
+
z-index: 1000;
|
|
96
|
+
overflow: visible;
|
|
97
|
+
transform-origin: top;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
@include e('menu-arrow') {
|
|
101
|
+
position: absolute;
|
|
102
|
+
width: var(--arrow-size);
|
|
103
|
+
height: var(--arrow-size);
|
|
104
|
+
z-index: -1;
|
|
105
|
+
pointer-events: none;
|
|
106
|
+
|
|
107
|
+
top: calc(-1 * (var(--arrow-size) * 0.55) + 1px);
|
|
108
|
+
left: 12px;
|
|
109
|
+
margin-left: 0;
|
|
110
|
+
|
|
111
|
+
&::before {
|
|
112
|
+
content: '';
|
|
113
|
+
position: absolute;
|
|
114
|
+
inset: 0;
|
|
115
|
+
width: 100%;
|
|
116
|
+
height: 100%;
|
|
117
|
+
background: var(--l-cascader-bg);
|
|
118
|
+
transform: rotate(45deg);
|
|
119
|
+
border-radius: calc(var(--arrow-size) * 0.2);
|
|
120
|
+
box-shadow: -1px -1px 0 0 var(--l-cascader-border);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
@include e('menu') {
|
|
125
|
+
box-sizing: border-box;
|
|
126
|
+
list-style: none;
|
|
127
|
+
padding: 7px 0;
|
|
128
|
+
margin: 0;
|
|
129
|
+
width: 160px;
|
|
130
|
+
max-height: 280px;
|
|
131
|
+
overflow-y: auto;
|
|
132
|
+
|
|
133
|
+
border-right: 1px solid transparent;
|
|
134
|
+
|
|
135
|
+
&:not(:last-child) { border-right-color: $border-color-light; }
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
@include e('option') {
|
|
139
|
+
display: flex;
|
|
140
|
+
align-items: center;
|
|
141
|
+
justify-content: space-between;
|
|
142
|
+
padding: 8px 12px;
|
|
143
|
+
font-size: inherit;
|
|
144
|
+
color: $color-text-primary;
|
|
145
|
+
font-weight: inherit;
|
|
146
|
+
line-height: inherit;
|
|
147
|
+
cursor: pointer;
|
|
148
|
+
transition: background-color 0.2s;
|
|
149
|
+
|
|
150
|
+
&:hover { background-color: #f5f7fa; }
|
|
151
|
+
&.is-active { color: $color-text-primary; background-color: #f5f7fa; }
|
|
152
|
+
&.is-disabled { color: $color-text-disabled; cursor: not-allowed; }
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
@include e('option-label') {
|
|
156
|
+
flex: 1 1 auto;
|
|
157
|
+
min-width: 0;
|
|
158
|
+
overflow: hidden;
|
|
159
|
+
text-overflow: ellipsis;
|
|
160
|
+
white-space: nowrap;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
@include e('option-suffix') {
|
|
164
|
+
display: inline-flex;
|
|
165
|
+
align-items: center;
|
|
166
|
+
justify-content: flex-end;
|
|
167
|
+
width: 14px;
|
|
168
|
+
margin-left: 8px;
|
|
169
|
+
color: $color-text-secondary;
|
|
170
|
+
flex-shrink: 0;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
&.is-disabled {
|
|
174
|
+
.#{$namespace}-cascader__input {
|
|
175
|
+
background-color: #f5f7fa;
|
|
176
|
+
cursor: not-allowed;
|
|
177
|
+
&:hover { border-color: $border-color-base; }
|
|
178
|
+
}
|
|
179
|
+
.#{$namespace}-cascader__value { color: $color-text-disabled; }
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
// size styles are handled by modifiers above to match Select
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.dark {
|
|
186
|
+
.#{$namespace}-cascader {
|
|
187
|
+
.#{$namespace}-cascader__input {
|
|
188
|
+
background-color: $bg-color-dark-light;
|
|
189
|
+
border-color: color-mix(in oklab, $bg-color-dark-lighter 70%, $color-text-dark-secondary);
|
|
190
|
+
|
|
191
|
+
&:hover {
|
|
192
|
+
border-color: color-mix(in oklab, $bg-color-dark-lighter 55%, $color-text-dark-secondary);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
&.is-focus {
|
|
196
|
+
border-color: $color-primary;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.#{$namespace}-cascader__value {
|
|
201
|
+
color: $color-text-dark;
|
|
202
|
+
|
|
203
|
+
&.is-placeholder {
|
|
204
|
+
color: $color-text-dark-secondary;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.#{$namespace}-cascader__arrow,
|
|
209
|
+
.#{$namespace}-cascader__clear {
|
|
210
|
+
color: $color-text-dark-secondary;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.#{$namespace}-cascader__clear:hover {
|
|
214
|
+
color: $color-text-dark;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.#{$namespace}-cascader__dropdown {
|
|
218
|
+
--l-cascader-bg: #{$bg-color-dark-light};
|
|
219
|
+
--l-cascader-border: #{color-mix(in oklab, $bg-color-dark-lighter 70%, $color-text-dark-secondary)};
|
|
220
|
+
box-shadow: $box-shadow-dark;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.#{$namespace}-cascader__menu {
|
|
224
|
+
&:not(:last-child) {
|
|
225
|
+
border-right-color: color-mix(in oklab, $bg-color-dark-lighter 70%, $color-text-dark-secondary);
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.#{$namespace}-cascader__option {
|
|
230
|
+
color: $color-text-dark;
|
|
231
|
+
|
|
232
|
+
&:hover {
|
|
233
|
+
background-color: $bg-color-dark-lighter;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
&.is-highlighted {
|
|
237
|
+
background-color: $bg-color-dark-lighter;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
&.is-active {
|
|
241
|
+
color: $color-text-dark;
|
|
242
|
+
background-color: $bg-color-dark-lighter;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
&.is-disabled {
|
|
246
|
+
color: $color-text-dark-secondary;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.#{$namespace}-cascader__option-suffix {
|
|
251
|
+
color: $color-text-dark-secondary;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
&.is-disabled {
|
|
255
|
+
.#{$namespace}-cascader__input {
|
|
256
|
+
background-color: $bg-color-dark-lighter;
|
|
257
|
+
border-color: color-mix(in oklab, $bg-color-dark-lighter 75%, $color-text-dark-secondary);
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
.#{$namespace}-cascader__value {
|
|
261
|
+
color: $color-text-dark-secondary;
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
}
|