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
package/dist/index.js
CHANGED
|
@@ -141,3 +141,5 @@ export { default as TreeSelect } from './components/TreeSelect/TreeSelect.svelte
|
|
|
141
141
|
export { default as Upload } from './components/Upload/Upload.svelte';
|
|
142
142
|
// Watermark
|
|
143
143
|
export { default as Watermark } from './components/Watermark/Watermark.svelte';
|
|
144
|
+
// Utils
|
|
145
|
+
export * from './utils';
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
@forward './variables';
|
|
2
|
+
@forward './mixins/bem';
|
|
3
|
+
@forward './mixins/function';
|
|
4
|
+
@use "./reset";
|
|
5
|
+
|
|
6
|
+
@use './alert';
|
|
7
|
+
@use './button';
|
|
8
|
+
@use './icon';
|
|
9
|
+
@use './input';
|
|
10
|
+
@use './input-tag';
|
|
11
|
+
@use './dialog';
|
|
12
|
+
@use './checkbox';
|
|
13
|
+
@use './radio';
|
|
14
|
+
@use './switch';
|
|
15
|
+
@use './form';
|
|
16
|
+
@use './message';
|
|
17
|
+
@use './notification';
|
|
18
|
+
@use './breadcrumb';
|
|
19
|
+
@use './avatar';
|
|
20
|
+
@use './badge';
|
|
21
|
+
@use './tag';
|
|
22
|
+
@use './divider';
|
|
23
|
+
@use './link';
|
|
24
|
+
@use './empty';
|
|
25
|
+
@use './tabs';
|
|
26
|
+
@use './textarea';
|
|
27
|
+
@use './slider';
|
|
28
|
+
@use './rating';
|
|
29
|
+
@use './pin-input';
|
|
30
|
+
@use './tooltip';
|
|
31
|
+
@use './popconfirm';
|
|
32
|
+
@use './popover';
|
|
33
|
+
@use './menu';
|
|
34
|
+
@use './container';
|
|
35
|
+
@use './messagebox';
|
|
36
|
+
@use './progress';
|
|
37
|
+
@use './card';
|
|
38
|
+
@use './skeleton';
|
|
39
|
+
@use './drawer';
|
|
40
|
+
@use './collapse';
|
|
41
|
+
@use './dropdown';
|
|
42
|
+
@use './pagination';
|
|
43
|
+
@use './backtop';
|
|
44
|
+
@use './image';
|
|
45
|
+
@use './space';
|
|
46
|
+
@use './loading';
|
|
47
|
+
@use './result';
|
|
48
|
+
@use './timeline';
|
|
49
|
+
@use './steps';
|
|
50
|
+
@use './descriptions';
|
|
51
|
+
@use './affix';
|
|
52
|
+
@use './select';
|
|
53
|
+
@use './input-number';
|
|
54
|
+
@use './carousel';
|
|
55
|
+
@use './statistic';
|
|
56
|
+
@use './segmented';
|
|
57
|
+
@use './watermark';
|
|
58
|
+
@use './table';
|
|
59
|
+
@use './tree';
|
|
60
|
+
@use './color-picker';
|
|
61
|
+
@use './date-picker';
|
|
62
|
+
@use './date-time-picker';
|
|
63
|
+
@use './upload';
|
|
64
|
+
@use './transfer';
|
|
65
|
+
@use './cascader';
|
|
66
|
+
@use './time-picker';
|
|
67
|
+
@use './autocomplete';
|
|
68
|
+
@use './calendar';
|
|
69
|
+
@use './tree-select';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
@use "./variables" as *;
|
|
2
|
+
|
|
3
|
+
* {
|
|
4
|
+
box-sizing: border-box;
|
|
5
|
+
margin: 0;
|
|
6
|
+
padding: 0;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
body {
|
|
10
|
+
font-family: $font-family;
|
|
11
|
+
font-size: $font-size-base;
|
|
12
|
+
color: $color-text-primary;
|
|
13
|
+
line-height: 1.5;
|
|
14
|
+
-webkit-font-smoothing: antialiased;
|
|
15
|
+
-moz-osx-font-smoothing: grayscale;
|
|
16
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
// Colors
|
|
2
|
+
$color-primary: #0062FF !default;
|
|
3
|
+
$color-primary-light: #5291FF !default;
|
|
4
|
+
$color-success: #31C27C !default;
|
|
5
|
+
$color-warning: #FF974A !default;
|
|
6
|
+
$color-danger: #FC5A5A !default;
|
|
7
|
+
$color-info: #92929D !default;
|
|
8
|
+
|
|
9
|
+
// Text colors
|
|
10
|
+
$color-text: #303133 !default;
|
|
11
|
+
$color-text-primary: #303133 !default;
|
|
12
|
+
$color-text-regular: #606266 !default;
|
|
13
|
+
$color-text-secondary: #909399 !default;
|
|
14
|
+
$color-text-placeholder: #a8abb2 !default;
|
|
15
|
+
$color-text-disabled: #c0c4cc !default;
|
|
16
|
+
|
|
17
|
+
// Border colors
|
|
18
|
+
$border-color-base: #dcdfe6 !default;
|
|
19
|
+
$border-color-light: #e4e7ed !default;
|
|
20
|
+
$border-color-lighter: #ebeef5 !default;
|
|
21
|
+
$border-color-extra-light: #f2f6fc !default;
|
|
22
|
+
|
|
23
|
+
// Background colors
|
|
24
|
+
$bg-color: #ffffff !default;
|
|
25
|
+
$bg-color-page: #f2f3f5 !default;
|
|
26
|
+
$bg-color-overlay: #ffffff !default;
|
|
27
|
+
|
|
28
|
+
// Fill colors (for hover/active states)
|
|
29
|
+
$fill-color-light: #f5f7fa !default;
|
|
30
|
+
$fill-color-lighter: #fafafa !default;
|
|
31
|
+
$fill-color-extra-light: #fafcff !default;
|
|
32
|
+
|
|
33
|
+
// Dark theme colors
|
|
34
|
+
$bg-color-dark: #0a0a0a !default;
|
|
35
|
+
$bg-color-dark-light: #141414 !default;
|
|
36
|
+
$bg-color-dark-lighter: #2b2b2c !default;
|
|
37
|
+
$bg-color-dark-overlay: #303030 !default;
|
|
38
|
+
$color-text-dark: #e5eaf3 !default;
|
|
39
|
+
$color-text-dark-secondary: #a3a6ad !default;
|
|
40
|
+
$color-text-dark-placeholder: #6b6f76 !default;
|
|
41
|
+
$border-color-dark: #3a3a3c !default;
|
|
42
|
+
$border-color-dark-light: #4a4a4c !default;
|
|
43
|
+
|
|
44
|
+
// Border
|
|
45
|
+
$border-width: 1px !default;
|
|
46
|
+
$border-style: solid !default;
|
|
47
|
+
$border-radius-base: 6px !default;
|
|
48
|
+
$border-radius-small: 2px !default;
|
|
49
|
+
$border-radius-medium: 8px !default;
|
|
50
|
+
$border-radius-large: 12px !default;
|
|
51
|
+
$border-radius-round: 9999px !default;
|
|
52
|
+
$border-radius-circle: 50% !default;
|
|
53
|
+
|
|
54
|
+
// Spacing
|
|
55
|
+
$spacing-base: 16px !default;
|
|
56
|
+
$spacing-small: 12px !default;
|
|
57
|
+
$spacing-mini: 8px !default;
|
|
58
|
+
$spacing-large: 20px !default;
|
|
59
|
+
|
|
60
|
+
// Font
|
|
61
|
+
$font-size-extra-large: 20px !default;
|
|
62
|
+
$font-size-large: 18px !default;
|
|
63
|
+
$font-size-medium: 16px !default;
|
|
64
|
+
$font-size-base: 14px !default;
|
|
65
|
+
$font-size-small: 13px !default;
|
|
66
|
+
$font-size-extra-small: 12px !default;
|
|
67
|
+
|
|
68
|
+
$font-weight-primary: 500 !default;
|
|
69
|
+
$font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB',
|
|
70
|
+
'Microsoft YaHei', '微软雅黑', Arial, sans-serif !default;
|
|
71
|
+
|
|
72
|
+
// Z-index
|
|
73
|
+
$z-index-normal: 1 !default;
|
|
74
|
+
$z-index-top: 1000 !default;
|
|
75
|
+
$z-index-popper: 2000 !default;
|
|
76
|
+
|
|
77
|
+
// Transition
|
|
78
|
+
$transition-duration: 0.3s !default;
|
|
79
|
+
$transition-duration-fast: 0.2s !default;
|
|
80
|
+
$transition-function-ease-in-out-bezier: cubic-bezier(0.645, 0.045, 0.355, 1) !default;
|
|
81
|
+
$transition-function-fast-bezier: cubic-bezier(0.23, 1, 0.32, 1) !default;
|
|
82
|
+
|
|
83
|
+
// Animation
|
|
84
|
+
$animation-duration: 0.3s !default;
|
|
85
|
+
$animation-duration-slow: 0.4s !default;
|
|
86
|
+
$animation-duration-fast: 0.2s !default;
|
|
87
|
+
|
|
88
|
+
// Box shadow
|
|
89
|
+
$box-shadow-base: 0 2px 4px rgba(0, 0, 0, 0.12), 0 0 6px rgba(0, 0, 0, 0.04) !default;
|
|
90
|
+
$box-shadow-dark: 0px 12px 32px 4px rgba(0, 0, 0, 0.36), 0px 8px 20px rgba(0, 0, 0, 0.72) !default;
|
|
91
|
+
$box-shadow-light: 0 2px 12px rgba(0, 0, 0, 0.08) !default;
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
@use 'sass:color';
|
|
2
|
+
@use './variables' as *;
|
|
3
|
+
@use './mixins/bem' as *;
|
|
4
|
+
|
|
5
|
+
@include b('alert') {
|
|
6
|
+
position: relative;
|
|
7
|
+
display: flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
gap: 8px;
|
|
10
|
+
padding: 8px 14px;
|
|
11
|
+
border-radius: $border-radius-medium;
|
|
12
|
+
font-size: $font-size-base;
|
|
13
|
+
line-height: 1.5;
|
|
14
|
+
border: 1px solid transparent;
|
|
15
|
+
overflow: hidden;
|
|
16
|
+
transition: opacity 0.2s ease;
|
|
17
|
+
|
|
18
|
+
@include e('icon') {
|
|
19
|
+
display: flex;
|
|
20
|
+
align-items: center;
|
|
21
|
+
justify-content: center;
|
|
22
|
+
flex-shrink: 0;
|
|
23
|
+
width: 20px;
|
|
24
|
+
height: 20px;
|
|
25
|
+
|
|
26
|
+
svg {
|
|
27
|
+
width: 20px;
|
|
28
|
+
height: 20px;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@include e('content') {
|
|
33
|
+
flex: 1;
|
|
34
|
+
min-width: 0;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@include e('title') {
|
|
38
|
+
font-weight: $font-weight-primary;
|
|
39
|
+
margin-bottom: 4px;
|
|
40
|
+
line-height: 1.4;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
@include e('description') {
|
|
44
|
+
font-size: $font-size-small;
|
|
45
|
+
opacity: 0.9;
|
|
46
|
+
line-height: 1.4;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
@include e('close') {
|
|
50
|
+
cursor: pointer;
|
|
51
|
+
background: none;
|
|
52
|
+
border: none;
|
|
53
|
+
color: inherit;
|
|
54
|
+
display: flex;
|
|
55
|
+
align-items: center;
|
|
56
|
+
justify-content: center;
|
|
57
|
+
padding: 0;
|
|
58
|
+
width: 18px;
|
|
59
|
+
height: 18px;
|
|
60
|
+
border-radius: 50%;
|
|
61
|
+
flex-shrink: 0;
|
|
62
|
+
opacity: 0.7;
|
|
63
|
+
transition: opacity 0.2s ease;
|
|
64
|
+
|
|
65
|
+
&:hover {
|
|
66
|
+
opacity: 1;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
svg {
|
|
70
|
+
width: 14px;
|
|
71
|
+
height: 14px;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// Info type (default)
|
|
76
|
+
@include m('info') {
|
|
77
|
+
background-color: color.mix(#fff, $color-info, 92%);
|
|
78
|
+
color: $color-info;
|
|
79
|
+
border-color: color.mix(#fff, $color-info, 80%);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// Success type
|
|
83
|
+
@include m('success') {
|
|
84
|
+
background-color: color.mix(#fff, $color-success, 92%);
|
|
85
|
+
color: $color-success;
|
|
86
|
+
border-color: color.mix(#fff, $color-success, 80%);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// Warning type
|
|
90
|
+
@include m('warning') {
|
|
91
|
+
background-color: color.mix(#fff, $color-warning, 92%);
|
|
92
|
+
color: $color-warning;
|
|
93
|
+
border-color: color.mix(#fff, $color-warning, 80%);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// Danger type
|
|
97
|
+
@include m('danger') {
|
|
98
|
+
background-color: color.mix(#fff, $color-danger, 92%);
|
|
99
|
+
color: $color-danger;
|
|
100
|
+
border-color: color.mix(#fff, $color-danger, 80%);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
// Hidden state
|
|
104
|
+
@include when('hidden') {
|
|
105
|
+
display: none;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// Centered content
|
|
109
|
+
@include when('center') {
|
|
110
|
+
text-align: center;
|
|
111
|
+
justify-content: center;
|
|
112
|
+
.#{$namespace}-alert__content {
|
|
113
|
+
text-align: center;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.dark {
|
|
119
|
+
.#{$namespace}-alert {
|
|
120
|
+
@include m('info') {
|
|
121
|
+
background-color: color.mix($bg-color-dark-light, $color-info, 85%);
|
|
122
|
+
border-color: color.mix($bg-color-dark-light, $color-info, 65%);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
@include m('success') {
|
|
126
|
+
background-color: color.mix($bg-color-dark-light, $color-success, 85%);
|
|
127
|
+
border-color: color.mix($bg-color-dark-light, $color-success, 65%);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
@include m('warning') {
|
|
131
|
+
background-color: color.mix($bg-color-dark-light, $color-warning, 85%);
|
|
132
|
+
border-color: color.mix($bg-color-dark-light, $color-warning, 65%);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
@include m('danger') {
|
|
136
|
+
background-color: color.mix($bg-color-dark-light, $color-danger, 85%);
|
|
137
|
+
border-color: color.mix($bg-color-dark-light, $color-danger, 65%);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
@use './variables' as *;
|
|
2
|
+
@use './mixins/bem' as *;
|
|
3
|
+
|
|
4
|
+
@include b('autocomplete') {
|
|
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
|
+
|
|
14
|
+
.#{$namespace}-autocomplete__input input {
|
|
15
|
+
height: 28px;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
@include m('default') {
|
|
20
|
+
font-size: $font-size-base;
|
|
21
|
+
|
|
22
|
+
.#{$namespace}-autocomplete__input input {
|
|
23
|
+
height: 32px;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@include m('large') {
|
|
28
|
+
font-size: $font-size-medium;
|
|
29
|
+
|
|
30
|
+
.#{$namespace}-autocomplete__input input {
|
|
31
|
+
height: 40px;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@include e('input') {
|
|
36
|
+
position: relative;
|
|
37
|
+
|
|
38
|
+
input {
|
|
39
|
+
width: 100%;
|
|
40
|
+
padding: 0 32px 0 12px;
|
|
41
|
+
height: 32px;
|
|
42
|
+
font-size: inherit;
|
|
43
|
+
color: $color-text-primary;
|
|
44
|
+
border: 1px solid $border-color-base;
|
|
45
|
+
border-radius: $border-radius-base;
|
|
46
|
+
background-color: $bg-color;
|
|
47
|
+
outline: none;
|
|
48
|
+
transition: border-color 0.2s;
|
|
49
|
+
box-sizing: border-box;
|
|
50
|
+
|
|
51
|
+
&::placeholder { color: $color-text-placeholder; }
|
|
52
|
+
&:hover { border-color: #c0c4cc; }
|
|
53
|
+
&:focus { border-color: $color-primary; }
|
|
54
|
+
&:disabled {
|
|
55
|
+
background-color: $bg-color-page;
|
|
56
|
+
cursor: not-allowed;
|
|
57
|
+
&:hover { border-color: $border-color-base; }
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
&.is-focus input { border-color: $color-primary; }
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
@include e('clear') {
|
|
65
|
+
position: absolute;
|
|
66
|
+
right: 10px;
|
|
67
|
+
top: 50%;
|
|
68
|
+
transform: translateY(-50%);
|
|
69
|
+
display: inline-flex;
|
|
70
|
+
align-items: center;
|
|
71
|
+
padding: 0;
|
|
72
|
+
border: none;
|
|
73
|
+
background: none;
|
|
74
|
+
color: $color-text-secondary;
|
|
75
|
+
cursor: pointer;
|
|
76
|
+
&:hover { color: $color-text; }
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
@include e('arrow') {
|
|
80
|
+
position: absolute;
|
|
81
|
+
right: 10px;
|
|
82
|
+
top: 50%;
|
|
83
|
+
transform: translateY(-50%);
|
|
84
|
+
display: inline-flex;
|
|
85
|
+
align-items: center;
|
|
86
|
+
color: $color-text-secondary;
|
|
87
|
+
transition: transform 0.2s;
|
|
88
|
+
|
|
89
|
+
&.is-open {
|
|
90
|
+
transform: translateY(-50%) rotate(180deg);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
@include e('loading') {
|
|
95
|
+
position: absolute;
|
|
96
|
+
right: 10px;
|
|
97
|
+
top: 50%;
|
|
98
|
+
transform: translateY(-50%);
|
|
99
|
+
color: $color-text-secondary;
|
|
100
|
+
animation: #{$namespace}-autocomplete-spin 1s linear infinite;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
@include e('dropdown') {
|
|
104
|
+
position: absolute;
|
|
105
|
+
top: 100%;
|
|
106
|
+
left: 0;
|
|
107
|
+
width: 100%;
|
|
108
|
+
margin-top: 12px;
|
|
109
|
+
// Arrow variables
|
|
110
|
+
--l-autocomplete-bg: #{$bg-color};
|
|
111
|
+
--l-autocomplete-border: #{$border-color-lighter};
|
|
112
|
+
--arrow-size: 10px;
|
|
113
|
+
|
|
114
|
+
padding: 7px 0;
|
|
115
|
+
background-color: var(--l-autocomplete-bg);
|
|
116
|
+
border: 1px solid var(--l-autocomplete-border);
|
|
117
|
+
border-radius: $border-radius-base;
|
|
118
|
+
box-shadow: $box-shadow-light;
|
|
119
|
+
z-index: $z-index-popper;
|
|
120
|
+
overflow: visible;
|
|
121
|
+
font-size: inherit;
|
|
122
|
+
transform-origin: top;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
@include e('menu') {
|
|
126
|
+
list-style: none;
|
|
127
|
+
margin: 0;
|
|
128
|
+
padding: 0;
|
|
129
|
+
max-height: 280px;
|
|
130
|
+
overflow-y: auto;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
@include e('menu-arrow') {
|
|
134
|
+
position: absolute;
|
|
135
|
+
width: var(--arrow-size);
|
|
136
|
+
height: var(--arrow-size);
|
|
137
|
+
z-index: -1;
|
|
138
|
+
pointer-events: none;
|
|
139
|
+
|
|
140
|
+
top: calc(-1 * (var(--arrow-size) * 0.55) + 1px);
|
|
141
|
+
left: 50%;
|
|
142
|
+
margin-left: calc(-1 * (var(--arrow-size) / 2));
|
|
143
|
+
|
|
144
|
+
&::before {
|
|
145
|
+
content: '';
|
|
146
|
+
position: absolute;
|
|
147
|
+
inset: 0;
|
|
148
|
+
width: 100%;
|
|
149
|
+
height: 100%;
|
|
150
|
+
background: var(--l-autocomplete-bg);
|
|
151
|
+
transform: rotate(45deg);
|
|
152
|
+
border-radius: calc(var(--arrow-size) * 0.2);
|
|
153
|
+
box-shadow: -1px -1px 0 0 var(--l-autocomplete-border);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
@include e('item') {
|
|
158
|
+
padding: 10px 12px;
|
|
159
|
+
font-size: inherit;
|
|
160
|
+
color: $color-text-primary;
|
|
161
|
+
cursor: pointer;
|
|
162
|
+
transition: background-color 0.2s;
|
|
163
|
+
|
|
164
|
+
&:hover { background-color: #f5f7fa; }
|
|
165
|
+
&.is-highlighted { background-color: #f5f7fa; }
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
&.is-disabled .#{$namespace}-autocomplete__input input {
|
|
169
|
+
background-color: $bg-color-page;
|
|
170
|
+
cursor: not-allowed;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
@keyframes #{$namespace}-autocomplete-spin {
|
|
175
|
+
from { transform: translateY(-50%) rotate(0deg); }
|
|
176
|
+
to { transform: translateY(-50%) rotate(360deg); }
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.dark {
|
|
180
|
+
.#{$namespace}-autocomplete {
|
|
181
|
+
.#{$namespace}-autocomplete__input input {
|
|
182
|
+
background-color: $bg-color-dark-light;
|
|
183
|
+
border-color: color-mix(in oklab, $bg-color-dark-lighter 70%, $color-text-dark-secondary);
|
|
184
|
+
color: $color-text-dark;
|
|
185
|
+
|
|
186
|
+
&::placeholder {
|
|
187
|
+
color: $color-text-dark-secondary;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
&:hover {
|
|
191
|
+
border-color: color-mix(in oklab, $bg-color-dark-lighter 55%, $color-text-dark-secondary);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
&:focus {
|
|
195
|
+
border-color: $color-primary;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
&.is-focus .#{$namespace}-autocomplete__input input {
|
|
200
|
+
border-color: $color-primary;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.#{$namespace}-autocomplete__clear,
|
|
204
|
+
.#{$namespace}-autocomplete__arrow,
|
|
205
|
+
.#{$namespace}-autocomplete__loading {
|
|
206
|
+
color: $color-text-dark-secondary;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.#{$namespace}-autocomplete__clear:hover {
|
|
210
|
+
color: $color-text-dark;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.#{$namespace}-autocomplete__dropdown {
|
|
214
|
+
--l-autocomplete-bg: #{$bg-color-dark-light};
|
|
215
|
+
--l-autocomplete-border: #{color-mix(in oklab, $bg-color-dark-lighter 70%, $color-text-dark-secondary)};
|
|
216
|
+
box-shadow: $box-shadow-dark;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.#{$namespace}-autocomplete__item {
|
|
220
|
+
color: $color-text-dark;
|
|
221
|
+
|
|
222
|
+
&:hover {
|
|
223
|
+
background-color: $bg-color-dark-lighter;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
&.is-highlighted {
|
|
227
|
+
background-color: $bg-color-dark-lighter;
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
&.is-disabled {
|
|
232
|
+
.#{$namespace}-autocomplete__input input {
|
|
233
|
+
background-color: $bg-color-dark-lighter;
|
|
234
|
+
border-color: color-mix(in oklab, $bg-color-dark-lighter 75%, $color-text-dark-secondary);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
@use './variables' as *;
|
|
2
|
+
@use './mixins/bem' as *;
|
|
3
|
+
|
|
4
|
+
@include b('avatar') {
|
|
5
|
+
position: relative;
|
|
6
|
+
display: inline-flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
justify-content: center;
|
|
9
|
+
color: $color-text-primary;
|
|
10
|
+
background-color: $bg-color-page;
|
|
11
|
+
overflow: hidden;
|
|
12
|
+
user-select: none;
|
|
13
|
+
|
|
14
|
+
@include m('circle') { border-radius: $border-radius-circle; }
|
|
15
|
+
@include m('square') { border-radius: $border-radius-medium; }
|
|
16
|
+
|
|
17
|
+
// preset sizes
|
|
18
|
+
@include m('small') { width: 24px; height: 24px; font-size: 12px; }
|
|
19
|
+
@include m('medium') { width: 32px; height: 32px; font-size: 14px; }
|
|
20
|
+
@include m('large') { width: 40px; height: 40px; font-size: 16px; }
|
|
21
|
+
|
|
22
|
+
@include m('custom') { /* inline size via style attribute */ }
|
|
23
|
+
|
|
24
|
+
@include e('img') {
|
|
25
|
+
width: 100%;
|
|
26
|
+
height: 100%;
|
|
27
|
+
display: block;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@include e('placeholder') {
|
|
31
|
+
display: inline-flex;
|
|
32
|
+
align-items: center;
|
|
33
|
+
justify-content: center;
|
|
34
|
+
width: 100%;
|
|
35
|
+
height: 100%;
|
|
36
|
+
color: $color-text-secondary;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.dark {
|
|
41
|
+
.#{$namespace}-avatar {
|
|
42
|
+
color: $color-text-dark;
|
|
43
|
+
background-color: $bg-color-dark-lighter;
|
|
44
|
+
|
|
45
|
+
.#{$namespace}-avatar__placeholder {
|
|
46
|
+
color: $color-text-dark-secondary;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
@use './variables' as *;
|
|
2
|
+
@use './mixins/bem' as *;
|
|
3
|
+
|
|
4
|
+
@include b('backtop') {
|
|
5
|
+
position: fixed;
|
|
6
|
+
z-index: $z-index-top;
|
|
7
|
+
display: flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
justify-content: center;
|
|
10
|
+
width: 40px;
|
|
11
|
+
height: 40px;
|
|
12
|
+
border: none;
|
|
13
|
+
border-radius: $border-radius-circle;
|
|
14
|
+
background-color: $bg-color;
|
|
15
|
+
box-shadow: $box-shadow-base;
|
|
16
|
+
color: $color-primary;
|
|
17
|
+
cursor: pointer;
|
|
18
|
+
transition: background-color $transition-duration, color $transition-duration;
|
|
19
|
+
animation: backtop-fade-in $transition-duration;
|
|
20
|
+
|
|
21
|
+
&:hover {
|
|
22
|
+
background: $color-primary;
|
|
23
|
+
color: #fff;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&:focus {
|
|
27
|
+
outline: none;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@keyframes backtop-fade-in {
|
|
32
|
+
from {
|
|
33
|
+
opacity: 0;
|
|
34
|
+
transform: scale(0.8);
|
|
35
|
+
}
|
|
36
|
+
to {
|
|
37
|
+
opacity: 1;
|
|
38
|
+
transform: scale(1);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.dark {
|
|
43
|
+
.#{$namespace}-backtop {
|
|
44
|
+
background: $bg-color-dark-light;
|
|
45
|
+
box-shadow: $box-shadow-dark;
|
|
46
|
+
border: 1px solid color-mix(in oklab, #{$bg-color-dark-lighter} 70%, #{$color-text-dark});
|
|
47
|
+
color: #fff;
|
|
48
|
+
|
|
49
|
+
&:hover {
|
|
50
|
+
background: $color-primary;
|
|
51
|
+
color: #fff;
|
|
52
|
+
border-color: $color-primary;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|