adtec-core-package 0.0.2 → 0.0.4
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/package.json +10 -4
- package/src/App.vue +0 -3
- package/src/assets/base.css +0 -86
- package/src/assets/main.css +0 -35
- package/src/components/ElFlex/ElFlex.vue +297 -0
- package/src/components/OperationAuth/operationAuth.vue +26 -0
- package/src/components/Search/ElIconSearch.vue +239 -0
- package/src/components/Search/ElSearch.vue +132 -0
- package/src/components/Title/ElTitle.vue +49 -0
- package/src/components/icon/ElIconBtn.vue +182 -0
- package/src/components/icon/ElIcons.vue +38 -0
- package/src/config/ElementPlusConfig.ts +95 -0
- package/src/css/elementUI/affix.scss +7 -0
- package/src/css/elementUI/alert.scss +115 -0
- package/src/css/elementUI/anchor-link.scss +41 -0
- package/src/css/elementUI/anchor.scss +88 -0
- package/src/css/elementUI/aside.scss +8 -0
- package/src/css/elementUI/autocomplete.scss +89 -0
- package/src/css/elementUI/avatar.scss +55 -0
- package/src/css/elementUI/backtop.scss +29 -0
- package/src/css/elementUI/badge.scss +58 -0
- package/src/css/elementUI/base.scss +3 -0
- package/src/css/elementUI/breadcrumb-item.scss +0 -0
- package/src/css/elementUI/breadcrumb.scss +62 -0
- package/src/css/elementUI/button-group.scss +80 -0
- package/src/css/elementUI/button.scss +304 -0
- package/src/css/elementUI/calendar.scss +80 -0
- package/src/css/elementUI/card.scss +45 -0
- package/src/css/elementUI/carousel-item.scss +58 -0
- package/src/css/elementUI/carousel.scss +188 -0
- package/src/css/elementUI/cascader-panel.scss +138 -0
- package/src/css/elementUI/cascader.scss +230 -0
- package/src/css/elementUI/check-tag.scss +60 -0
- package/src/css/elementUI/checkbox-button.scss +140 -0
- package/src/css/elementUI/checkbox-group.scss +7 -0
- package/src/css/elementUI/checkbox.scss +298 -0
- package/src/css/elementUI/col.scss +48 -0
- package/src/css/elementUI/collapse-item.scss +0 -0
- package/src/css/elementUI/collapse-transition.scss +0 -0
- package/src/css/elementUI/collapse.scss +70 -0
- package/src/css/elementUI/color/index.scss +20 -0
- package/src/css/elementUI/color-picker.scss +392 -0
- package/src/css/elementUI/common/popup.scss +47 -0
- package/src/css/elementUI/common/transition.scss +122 -0
- package/src/css/elementUI/common/var.scss +1549 -0
- package/src/css/elementUI/config-provider.scss +0 -0
- package/src/css/elementUI/container.scss +14 -0
- package/src/css/elementUI/dark/css-vars.scss +39 -0
- package/src/css/elementUI/dark/var.scss +222 -0
- package/src/css/elementUI/date-picker/date-picker.scss +110 -0
- package/src/css/elementUI/date-picker/date-range-picker.scss +113 -0
- package/src/css/elementUI/date-picker/date-table.scss +158 -0
- package/src/css/elementUI/date-picker/month-table.scss +112 -0
- package/src/css/elementUI/date-picker/picker-panel.scss +131 -0
- package/src/css/elementUI/date-picker/picker.scss +219 -0
- package/src/css/elementUI/date-picker/time-picker.scss +90 -0
- package/src/css/elementUI/date-picker/time-range-picker.scss +33 -0
- package/src/css/elementUI/date-picker/time-spinner.scss +111 -0
- package/src/css/elementUI/date-picker/year-table.scss +108 -0
- package/src/css/elementUI/date-picker.scss +9 -0
- package/src/css/elementUI/descriptions-item.scss +73 -0
- package/src/css/elementUI/descriptions.scss +152 -0
- package/src/css/elementUI/dialog.scss +199 -0
- package/src/css/elementUI/display.scss +12 -0
- package/src/css/elementUI/divider.scss +48 -0
- package/src/css/elementUI/drawer.scss +164 -0
- package/src/css/elementUI/dropdown-item.scss +0 -0
- package/src/css/elementUI/dropdown-menu.scss +0 -0
- package/src/css/elementUI/dropdown.scss +208 -0
- package/src/css/elementUI/empty.scss +49 -0
- package/src/css/elementUI/footer.scss +12 -0
- package/src/css/elementUI/form-item.scss +0 -0
- package/src/css/elementUI/form.scss +243 -0
- package/src/css/elementUI/header.scss +12 -0
- package/src/css/elementUI/icon.scss +45 -0
- package/src/css/elementUI/image-viewer.scss +139 -0
- package/src/css/elementUI/image.scss +49 -0
- package/src/css/elementUI/index.scss +110 -0
- package/src/css/elementUI/infinite-scroll.scss +0 -0
- package/src/css/elementUI/input-number.scss +178 -0
- package/src/css/elementUI/input.scss +478 -0
- package/src/css/elementUI/link.scss +90 -0
- package/src/css/elementUI/loading.scss +104 -0
- package/src/css/elementUI/main.scss +14 -0
- package/src/css/elementUI/mention.scss +88 -0
- package/src/css/elementUI/menu-item-group.scss +0 -0
- package/src/css/elementUI/menu-item.scss +0 -0
- package/src/css/elementUI/menu.scss +339 -0
- package/src/css/elementUI/message-box.scss +213 -0
- package/src/css/elementUI/message.scss +98 -0
- package/src/css/elementUI/mixins/_button.scss +165 -0
- package/src/css/elementUI/mixins/_col.scss +33 -0
- package/src/css/elementUI/mixins/_var.scss +67 -0
- package/src/css/elementUI/mixins/config.scss +5 -0
- package/src/css/elementUI/mixins/function.scss +88 -0
- package/src/css/elementUI/mixins/mixins.scss +237 -0
- package/src/css/elementUI/mixins/utils.scss +39 -0
- package/src/css/elementUI/notification.scss +104 -0
- package/src/css/elementUI/option-group.scss +33 -0
- package/src/css/elementUI/option.scss +71 -0
- package/src/css/elementUI/overlay.scss +17 -0
- package/src/css/elementUI/page-header.scss +60 -0
- package/src/css/elementUI/pagination.scss +238 -0
- package/src/css/elementUI/popconfirm.scss +16 -0
- package/src/css/elementUI/popover.scss +61 -0
- package/src/css/elementUI/popper.scss +106 -0
- package/src/css/elementUI/progress.scss +179 -0
- package/src/css/elementUI/radio-button.scss +169 -0
- package/src/css/elementUI/radio-group.scss +9 -0
- package/src/css/elementUI/radio.scss +215 -0
- package/src/css/elementUI/rate.scss +108 -0
- package/src/css/elementUI/reset.scss +98 -0
- package/src/css/elementUI/result.scss +57 -0
- package/src/css/elementUI/row.scss +35 -0
- package/src/css/elementUI/scrollbar.scss +97 -0
- package/src/css/elementUI/segmented.scss +183 -0
- package/src/css/elementUI/select-dropdown-v2.scss +1 -0
- package/src/css/elementUI/select-dropdown.scss +57 -0
- package/src/css/elementUI/select-v2.scss +4 -0
- package/src/css/elementUI/select.scss +253 -0
- package/src/css/elementUI/skeleton-item.scss +83 -0
- package/src/css/elementUI/skeleton.scss +44 -0
- package/src/css/elementUI/slider.scss +212 -0
- package/src/css/elementUI/space.scss +20 -0
- package/src/css/elementUI/spinner.scss +43 -0
- package/src/css/elementUI/statistic.scss +35 -0
- package/src/css/elementUI/step.scss +316 -0
- package/src/css/elementUI/steps.scss +21 -0
- package/src/css/elementUI/sub-menu.scss +0 -0
- package/src/css/elementUI/switch.scss +300 -0
- package/src/css/elementUI/tab-pane.scss +0 -0
- package/src/css/elementUI/table-column.scss +98 -0
- package/src/css/elementUI/table-v2.scss +236 -0
- package/src/css/elementUI/table.scss +694 -0
- package/src/css/elementUI/tabs.scss +659 -0
- package/src/css/elementUI/tag.scss +181 -0
- package/src/css/elementUI/text.scss +51 -0
- package/src/css/elementUI/time-picker.scss +5 -0
- package/src/css/elementUI/time-select.scss +37 -0
- package/src/css/elementUI/timeline-item.scss +84 -0
- package/src/css/elementUI/timeline.scss +46 -0
- package/src/css/elementUI/tooltip-v2.scss +95 -0
- package/src/css/elementUI/tooltip.scss +0 -0
- package/src/css/elementUI/tour.scss +187 -0
- package/src/css/elementUI/transfer.scss +203 -0
- package/src/css/elementUI/tree-select.scss +41 -0
- package/src/css/elementUI/tree.scss +134 -0
- package/src/css/elementUI/upload.scss +654 -0
- package/src/css/elementUI/var.scss +87 -0
- package/src/css/elementUI/virtual-list.scss +40 -0
- package/src/interface/ISysMenuDataVo.ts +22 -0
- package/src/interface/ISysMenuInfoVo.ts +83 -0
- package/src/interface/ISysMenuOperationVo.ts +21 -0
- package/src/interface/enum/FlexEnum.ts +85 -0
- package/src/views/HomeView.vue +2 -2
- package/vite.config.ts +2 -9
- package/src/components/HelloWorld.vue +0 -41
- package/src/components/TheWelcome.vue +0 -94
- package/src/components/WelcomeItem.vue +0 -87
- package/src/components/icons/IconCommunity.vue +0 -7
- package/src/components/icons/IconDocumentation.vue +0 -7
- package/src/components/icons/IconEcosystem.vue +0 -7
- package/src/components/icons/IconSupport.vue +0 -7
- package/src/components/icons/IconTooling.vue +0 -19
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
@use 'mixins/mixins' as *;
|
|
2
|
+
@use 'mixins/var' as *;
|
|
3
|
+
@use 'common/var' as *;
|
|
4
|
+
|
|
5
|
+
@include b(message) {
|
|
6
|
+
@include set-component-css-var('message', $message);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
@include b(message) {
|
|
10
|
+
width: fit-content;
|
|
11
|
+
max-width: calc(100% - 32px);
|
|
12
|
+
box-sizing: border-box;
|
|
13
|
+
border-radius: getCssVar('border-radius-base');
|
|
14
|
+
border-width: getCssVar('border-width');
|
|
15
|
+
border-style: getCssVar('border-style');
|
|
16
|
+
border-color: getCssVar('message', 'border-color');
|
|
17
|
+
position: fixed;
|
|
18
|
+
left: 50%;
|
|
19
|
+
top: 20px;
|
|
20
|
+
transform: translateX(-50%);
|
|
21
|
+
background-color: getCssVar('message', 'bg-color');
|
|
22
|
+
transition: opacity getCssVar('transition-duration'), transform 0.4s, top 0.4s;
|
|
23
|
+
padding: getCssVar('message', 'padding');
|
|
24
|
+
display: flex;
|
|
25
|
+
align-items: center;
|
|
26
|
+
gap: 8px;
|
|
27
|
+
|
|
28
|
+
@include when(center) {
|
|
29
|
+
justify-content: center;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@include when(plain) {
|
|
33
|
+
background-color: getCssVar('bg-color', 'overlay');
|
|
34
|
+
border-color: getCssVar('bg-color', 'overlay');
|
|
35
|
+
box-shadow: getCssVar('box-shadow-light');
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
p {
|
|
39
|
+
margin: 0;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@each $type in (success, info, warning, error) {
|
|
43
|
+
@include m($type) {
|
|
44
|
+
@include css-var-from-global(
|
|
45
|
+
('message', 'bg-color'),
|
|
46
|
+
('color', $type, 'light-9')
|
|
47
|
+
);
|
|
48
|
+
@include css-var-from-global(
|
|
49
|
+
('message', 'border-color'),
|
|
50
|
+
('color', $type, 'light-8')
|
|
51
|
+
);
|
|
52
|
+
@include css-var-from-global(('message', 'text-color'), ('color', $type));
|
|
53
|
+
|
|
54
|
+
.#{$namespace}-message__content {
|
|
55
|
+
color: getCssVar('message', 'text-color');
|
|
56
|
+
overflow-wrap: break-word;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
& .#{$namespace}-message-icon--#{$type} {
|
|
61
|
+
color: getCssVar('message', 'text-color');
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.#{$namespace}-message__badge {
|
|
66
|
+
position: absolute;
|
|
67
|
+
top: -8px;
|
|
68
|
+
right: -8px;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
@include e(content) {
|
|
72
|
+
padding: 0;
|
|
73
|
+
font-size: 14px;
|
|
74
|
+
line-height: 1;
|
|
75
|
+
&:focus {
|
|
76
|
+
outline-width: 0;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
& .#{$namespace}-message__closeBtn {
|
|
81
|
+
cursor: pointer;
|
|
82
|
+
color: getCssVar('message', 'close-icon-color');
|
|
83
|
+
font-size: getCssVar('message', 'close-size');
|
|
84
|
+
|
|
85
|
+
&:focus {
|
|
86
|
+
outline-width: 0;
|
|
87
|
+
}
|
|
88
|
+
&:hover {
|
|
89
|
+
color: getCssVar('message', 'close-hover-color');
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.#{$namespace}-message-fade-enter-from,
|
|
95
|
+
.#{$namespace}-message-fade-leave-to {
|
|
96
|
+
opacity: 0;
|
|
97
|
+
transform: translate(-50%, -100%);
|
|
98
|
+
}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
@use '../mixins/var' as *;
|
|
2
|
+
@use '../mixins/function' as *;
|
|
3
|
+
@use '../common/var' as *;
|
|
4
|
+
|
|
5
|
+
@mixin button-plain($type) {
|
|
6
|
+
$button-color-types: (
|
|
7
|
+
'': (
|
|
8
|
+
'text-color': (
|
|
9
|
+
'color',
|
|
10
|
+
$type,
|
|
11
|
+
),
|
|
12
|
+
'bg-color': (
|
|
13
|
+
'color',
|
|
14
|
+
$type,
|
|
15
|
+
'light-9',
|
|
16
|
+
),
|
|
17
|
+
'border-color': (
|
|
18
|
+
'color',
|
|
19
|
+
$type,
|
|
20
|
+
'light-5',
|
|
21
|
+
),
|
|
22
|
+
),
|
|
23
|
+
'hover': (
|
|
24
|
+
'text-color': (
|
|
25
|
+
'color',
|
|
26
|
+
'white',
|
|
27
|
+
),
|
|
28
|
+
'bg-color': (
|
|
29
|
+
'color',
|
|
30
|
+
$type,
|
|
31
|
+
),
|
|
32
|
+
'border-color': (
|
|
33
|
+
'color',
|
|
34
|
+
$type,
|
|
35
|
+
),
|
|
36
|
+
),
|
|
37
|
+
'active': (
|
|
38
|
+
'text-color': (
|
|
39
|
+
'color',
|
|
40
|
+
'white',
|
|
41
|
+
),
|
|
42
|
+
),
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
@each $type, $typeMap in $button-color-types {
|
|
46
|
+
@each $typeColor, $list in $typeMap {
|
|
47
|
+
@include css-var-from-global(('button', $type, $typeColor), $list);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
&.is-disabled {
|
|
52
|
+
&,
|
|
53
|
+
&:hover,
|
|
54
|
+
&:focus,
|
|
55
|
+
&:active {
|
|
56
|
+
color: getCssVar('color', $type, 'light-5');
|
|
57
|
+
background-color: getCssVar('color', $type, 'light-9');
|
|
58
|
+
border-color: getCssVar('color', $type, 'light-8');
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
@mixin button-variant($type) {
|
|
64
|
+
$button-color-types: (
|
|
65
|
+
'': (
|
|
66
|
+
'text-color': (
|
|
67
|
+
'color',
|
|
68
|
+
'white',
|
|
69
|
+
),
|
|
70
|
+
'bg-color': (
|
|
71
|
+
'color',
|
|
72
|
+
$type,
|
|
73
|
+
),
|
|
74
|
+
'border-color': (
|
|
75
|
+
'color',
|
|
76
|
+
$type,
|
|
77
|
+
),
|
|
78
|
+
'outline-color': (
|
|
79
|
+
'color',
|
|
80
|
+
$type,
|
|
81
|
+
'light-5',
|
|
82
|
+
),
|
|
83
|
+
'active-color': (
|
|
84
|
+
'color',
|
|
85
|
+
$type,
|
|
86
|
+
'dark-2',
|
|
87
|
+
),
|
|
88
|
+
),
|
|
89
|
+
'hover': (
|
|
90
|
+
'text-color': (
|
|
91
|
+
'color',
|
|
92
|
+
'white',
|
|
93
|
+
),
|
|
94
|
+
'link-text-color': (
|
|
95
|
+
'color',
|
|
96
|
+
$type,
|
|
97
|
+
'light-5',
|
|
98
|
+
),
|
|
99
|
+
'bg-color': (
|
|
100
|
+
'color',
|
|
101
|
+
$type,
|
|
102
|
+
'light-3',
|
|
103
|
+
),
|
|
104
|
+
'border-color': (
|
|
105
|
+
'color',
|
|
106
|
+
$type,
|
|
107
|
+
'light-3',
|
|
108
|
+
),
|
|
109
|
+
),
|
|
110
|
+
'active': (
|
|
111
|
+
'bg-color': (
|
|
112
|
+
'color',
|
|
113
|
+
$type,
|
|
114
|
+
'dark-2',
|
|
115
|
+
),
|
|
116
|
+
'border-color': (
|
|
117
|
+
'color',
|
|
118
|
+
$type,
|
|
119
|
+
'dark-2',
|
|
120
|
+
),
|
|
121
|
+
),
|
|
122
|
+
'disabled': (
|
|
123
|
+
'text-color': (
|
|
124
|
+
'color',
|
|
125
|
+
'white',
|
|
126
|
+
),
|
|
127
|
+
'bg-color': (
|
|
128
|
+
'color',
|
|
129
|
+
$type,
|
|
130
|
+
'light-5',
|
|
131
|
+
),
|
|
132
|
+
'border-color': (
|
|
133
|
+
'color',
|
|
134
|
+
$type,
|
|
135
|
+
'light-5',
|
|
136
|
+
),
|
|
137
|
+
),
|
|
138
|
+
);
|
|
139
|
+
|
|
140
|
+
@each $type, $typeMap in $button-color-types {
|
|
141
|
+
@each $typeColor, $list in $typeMap {
|
|
142
|
+
@include css-var-from-global(('button', $type, $typeColor), $list);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
&.is-plain,
|
|
147
|
+
&.is-text,
|
|
148
|
+
&.is-link {
|
|
149
|
+
@include button-plain($type);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
@mixin button-size(
|
|
154
|
+
$padding-vertical,
|
|
155
|
+
$padding-horizontal,
|
|
156
|
+
$font-size,
|
|
157
|
+
$border-radius
|
|
158
|
+
) {
|
|
159
|
+
padding: $padding-vertical $padding-horizontal;
|
|
160
|
+
font-size: $font-size;
|
|
161
|
+
border-radius: $border-radius;
|
|
162
|
+
&.is-round {
|
|
163
|
+
padding: $padding-vertical $padding-horizontal;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
@use 'sass:math';
|
|
2
|
+
|
|
3
|
+
@use '../common/var' as *;
|
|
4
|
+
@use './mixins' as *;
|
|
5
|
+
|
|
6
|
+
@mixin col-size($size) {
|
|
7
|
+
@include res($size) {
|
|
8
|
+
@for $i from 0 through 24 {
|
|
9
|
+
.#{$namespace}-col-#{$size}-#{$i} {
|
|
10
|
+
display: if($i == 0, none, block);
|
|
11
|
+
max-width: (math.div(1, 24) * $i * 100) * 1%;
|
|
12
|
+
flex: 0 0 (math.div(1, 24) * $i * 100) * 1%;
|
|
13
|
+
@include when(guttered) {
|
|
14
|
+
display: if($i == 0, none, block);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.#{$namespace}-col-#{$size}-offset-#{$i} {
|
|
19
|
+
margin-left: (math.div(1, 24) * $i * 100) * 1%;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.#{$namespace}-col-#{$size}-pull-#{$i} {
|
|
23
|
+
position: relative;
|
|
24
|
+
right: (math.div(1, 24) * $i * 100) * 1%;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.#{$namespace}-col-#{$size}-push-#{$i} {
|
|
28
|
+
position: relative;
|
|
29
|
+
left: (math.div(1, 24) * $i * 100) * 1%;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use 'sass:color';
|
|
3
|
+
|
|
4
|
+
@use 'config';
|
|
5
|
+
@use 'function' as *;
|
|
6
|
+
@use '../common/var' as *;
|
|
7
|
+
|
|
8
|
+
// set css var value, because we need translate value to string
|
|
9
|
+
// for example:
|
|
10
|
+
// @include set-css-var-value(('color', 'primary'), red);
|
|
11
|
+
// --el-color-primary: red;
|
|
12
|
+
@mixin set-css-var-value($name, $value) {
|
|
13
|
+
#{joinVarName($name)}: #{$value};
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
// @include set-css-var-type('color', 'primary', $map);
|
|
17
|
+
// --el-color-primary: #{map.get($map, 'primary')};
|
|
18
|
+
@mixin set-css-var-type($name, $type, $variables) {
|
|
19
|
+
#{getCssVarName($name, $type)}: #{map.get($variables, $type)};
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
@mixin set-css-color-type($colors, $type) {
|
|
23
|
+
@include set-css-var-value(('color', $type), map.get($colors, $type, 'base'));
|
|
24
|
+
|
|
25
|
+
@each $i in (3, 5, 7, 8, 9) {
|
|
26
|
+
@include set-css-var-value(
|
|
27
|
+
('color', $type, 'light', $i),
|
|
28
|
+
map.get($colors, $type, 'light-#{$i}')
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@include set-css-var-value(
|
|
33
|
+
('color', $type, 'dark-2'),
|
|
34
|
+
map.get($colors, $type, 'dark-2')
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// set all css var for component by map
|
|
39
|
+
@mixin set-component-css-var($name, $variables) {
|
|
40
|
+
@each $attribute, $value in $variables {
|
|
41
|
+
@if $attribute == 'default' {
|
|
42
|
+
#{getCssVarName($name)}: #{$value};
|
|
43
|
+
} @else {
|
|
44
|
+
#{getCssVarName($name, $attribute)}: #{$value};
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
@mixin set-css-color-rgb($type) {
|
|
50
|
+
$color: map.get($colors, $type, 'base');
|
|
51
|
+
@include set-css-var-value(
|
|
52
|
+
('color', $type, 'rgb'),
|
|
53
|
+
#{color.channel($color, 'red'),
|
|
54
|
+
color.channel($color, 'green'),
|
|
55
|
+
color.channel($color, 'blue')}
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// generate css var from existing css var
|
|
60
|
+
// for example:
|
|
61
|
+
// @include css-var-from-global(('button', 'text-color'), ('color', $type))
|
|
62
|
+
// --el-button-text-color: var(--el-color-#{$type});
|
|
63
|
+
@mixin css-var-from-global($var, $gVar) {
|
|
64
|
+
$varName: joinVarName($var);
|
|
65
|
+
$gVarName: joinVarName($gVar);
|
|
66
|
+
#{$varName}: var(#{$gVarName});
|
|
67
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
@use 'config';
|
|
2
|
+
@use 'sass:meta';
|
|
3
|
+
@use 'sass:string';
|
|
4
|
+
|
|
5
|
+
// BEM support Func
|
|
6
|
+
@function selectorToString($selector) {
|
|
7
|
+
$selector: meta.inspect($selector);
|
|
8
|
+
$selector: string.slice($selector, 2, -2);
|
|
9
|
+
@return $selector;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
@function containsModifier($selector) {
|
|
13
|
+
$selector: selectorToString($selector);
|
|
14
|
+
|
|
15
|
+
@if string.index($selector, config.$modifier-separator) {
|
|
16
|
+
@return true;
|
|
17
|
+
} @else {
|
|
18
|
+
@return false;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
@function containWhenFlag($selector) {
|
|
23
|
+
$selector: selectorToString($selector);
|
|
24
|
+
|
|
25
|
+
@if string.index($selector, '.' + config.$state-prefix) {
|
|
26
|
+
@return true;
|
|
27
|
+
} @else {
|
|
28
|
+
@return false;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@function containPseudoClass($selector) {
|
|
33
|
+
$selector: selectorToString($selector);
|
|
34
|
+
|
|
35
|
+
@if string.index($selector, ':') {
|
|
36
|
+
@return true;
|
|
37
|
+
} @else {
|
|
38
|
+
@return false;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@function hitAllSpecialNestRule($selector) {
|
|
43
|
+
@return containsModifier($selector) or containWhenFlag($selector) or
|
|
44
|
+
containPseudoClass($selector);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// join var name
|
|
48
|
+
// joinVarName(('button', 'text-color')) => '--el-button-text-color'
|
|
49
|
+
@function joinVarName($list) {
|
|
50
|
+
$name: '--' + config.$namespace;
|
|
51
|
+
@each $item in $list {
|
|
52
|
+
@if $item != '' {
|
|
53
|
+
$name: $name + '-' + $item;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
@return $name;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// getCssVarName('button', 'text-color') => '--el-button-text-color'
|
|
60
|
+
@function getCssVarName($args...) {
|
|
61
|
+
@return joinVarName($args);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// getCssVar('button', 'text-color') => var(--el-button-text-color)
|
|
65
|
+
@function getCssVar($args...) {
|
|
66
|
+
@return var(#{joinVarName($args)});
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// getCssVarWithDefault(('button', 'text-color'), red) => var(--el-button-text-color, red)
|
|
70
|
+
@function getCssVarWithDefault($args, $default) {
|
|
71
|
+
@return var(#{joinVarName($args)}, #{$default});
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// bem('block', 'element', 'modifier') => 'el-block__element--modifier'
|
|
75
|
+
@function bem($block, $element: '', $modifier: '') {
|
|
76
|
+
$name: config.$namespace + config.$common-separator + $block;
|
|
77
|
+
|
|
78
|
+
@if $element != '' {
|
|
79
|
+
$name: $name + config.$element-separator + $element;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
@if $modifier != '' {
|
|
83
|
+
$name: $name + config.$modifier-separator + $modifier;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// @debug $name;
|
|
87
|
+
@return $name;
|
|
88
|
+
}
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
@use 'function' as *;
|
|
2
|
+
@use '../common/var' as *;
|
|
3
|
+
// forward mixins
|
|
4
|
+
@forward 'config';
|
|
5
|
+
@forward 'function';
|
|
6
|
+
@forward '_var';
|
|
7
|
+
@use 'config' as *;
|
|
8
|
+
@use 'sass:string';
|
|
9
|
+
@use "sass:map";
|
|
10
|
+
|
|
11
|
+
// Break-points
|
|
12
|
+
@mixin res($key, $map: $breakpoints) {
|
|
13
|
+
// loop breakpoint Map, return if present
|
|
14
|
+
@if map.has-key($map, $key) {
|
|
15
|
+
@media only screen and #{string.unquote(map.get($map, $key))} {
|
|
16
|
+
@content;
|
|
17
|
+
}
|
|
18
|
+
} @else {
|
|
19
|
+
@warn "Undefined points: `#{$map}`";
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// Scrollbar
|
|
24
|
+
@mixin scroll-bar {
|
|
25
|
+
$scrollbar-thumb-background: getCssVar('text-color', 'disabled');
|
|
26
|
+
$scrollbar-track-background: getCssVar('fill-color', 'blank');
|
|
27
|
+
|
|
28
|
+
&::-webkit-scrollbar {
|
|
29
|
+
z-index: 11;
|
|
30
|
+
width: 6px;
|
|
31
|
+
|
|
32
|
+
&:horizontal {
|
|
33
|
+
height: 6px;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&-thumb {
|
|
37
|
+
border-radius: 5px;
|
|
38
|
+
width: 6px;
|
|
39
|
+
background: $scrollbar-thumb-background;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&-corner {
|
|
43
|
+
background: $scrollbar-track-background;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&-track {
|
|
47
|
+
background: $scrollbar-track-background;
|
|
48
|
+
|
|
49
|
+
&-piece {
|
|
50
|
+
background: $scrollbar-track-background;
|
|
51
|
+
width: 6px;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// BEM
|
|
58
|
+
@mixin b($block) {
|
|
59
|
+
$B: $namespace + $common-separator + $block !global;
|
|
60
|
+
|
|
61
|
+
.#{$B} {
|
|
62
|
+
@content;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
@mixin e($element) {
|
|
67
|
+
$E: $element !global;
|
|
68
|
+
$selector: &;
|
|
69
|
+
$currentSelector: '';
|
|
70
|
+
@each $unit in $element {
|
|
71
|
+
$currentSelector: #{$currentSelector +
|
|
72
|
+
'.' +
|
|
73
|
+
$B +
|
|
74
|
+
$element-separator +
|
|
75
|
+
$unit +
|
|
76
|
+
','};
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
@if hitAllSpecialNestRule($selector) {
|
|
80
|
+
@at-root {
|
|
81
|
+
#{$selector} {
|
|
82
|
+
#{$currentSelector} {
|
|
83
|
+
@content;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
} @else {
|
|
88
|
+
@at-root {
|
|
89
|
+
#{$currentSelector} {
|
|
90
|
+
@content;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
@mixin m($modifier) {
|
|
97
|
+
$selector: &;
|
|
98
|
+
$currentSelector: '';
|
|
99
|
+
@each $unit in $modifier {
|
|
100
|
+
$currentSelector: #{$currentSelector +
|
|
101
|
+
$selector +
|
|
102
|
+
$modifier-separator +
|
|
103
|
+
$unit +
|
|
104
|
+
','};
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
@at-root {
|
|
108
|
+
#{$currentSelector} {
|
|
109
|
+
@content;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
@mixin configurable-m($modifier, $E-flag: false) {
|
|
115
|
+
$selector: &;
|
|
116
|
+
$interpolation: '';
|
|
117
|
+
|
|
118
|
+
@if $E-flag {
|
|
119
|
+
$interpolation: $element-separator + $E-flag;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
@at-root {
|
|
123
|
+
#{$selector} {
|
|
124
|
+
.#{$B + $interpolation + $modifier-separator + $modifier} {
|
|
125
|
+
@content;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
@mixin spec-selector(
|
|
132
|
+
$specSelector: '',
|
|
133
|
+
$element: $E,
|
|
134
|
+
$modifier: false,
|
|
135
|
+
$block: $B
|
|
136
|
+
) {
|
|
137
|
+
$modifierCombo: '';
|
|
138
|
+
|
|
139
|
+
@if $modifier {
|
|
140
|
+
$modifierCombo: $modifier-separator + $modifier;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
@at-root {
|
|
144
|
+
#{&}#{$specSelector}.#{$block
|
|
145
|
+
+ $element-separator
|
|
146
|
+
+ $element
|
|
147
|
+
+ $modifierCombo} {
|
|
148
|
+
@content;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
@mixin meb($modifier: false, $element: $E, $block: $B) {
|
|
154
|
+
$selector: &;
|
|
155
|
+
$modifierCombo: '';
|
|
156
|
+
|
|
157
|
+
@if $modifier {
|
|
158
|
+
$modifierCombo: $modifier-separator + $modifier;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
@at-root {
|
|
162
|
+
#{$selector} {
|
|
163
|
+
.#{$block + $element-separator + $element + $modifierCombo} {
|
|
164
|
+
@content;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
@mixin when($state) {
|
|
171
|
+
@at-root {
|
|
172
|
+
&.#{$state-prefix + $state} {
|
|
173
|
+
@content;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
@mixin extend-rule($name) {
|
|
179
|
+
@extend #{'%shared-' + $name} !optional;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
@mixin share-rule($name) {
|
|
183
|
+
$rule-name: '%shared-' + $name;
|
|
184
|
+
|
|
185
|
+
@at-root #{$rule-name} {
|
|
186
|
+
@content;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
@mixin pseudo($pseudo) {
|
|
191
|
+
@at-root #{&}#{':#{$pseudo}'} {
|
|
192
|
+
@content;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
@mixin picker-popper($background, $border, $box-shadow) {
|
|
197
|
+
&.#{$namespace}-popper {
|
|
198
|
+
background: $background;
|
|
199
|
+
border: $border;
|
|
200
|
+
box-shadow: $box-shadow;
|
|
201
|
+
|
|
202
|
+
.#{$namespace}-popper__arrow {
|
|
203
|
+
&::before {
|
|
204
|
+
border: $border;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
@each $placement,
|
|
209
|
+
$adjacency
|
|
210
|
+
in ('top': 'left', 'bottom': 'right', 'left': 'bottom', 'right': 'top')
|
|
211
|
+
{
|
|
212
|
+
&[data-popper-placement^='#{$placement}'] {
|
|
213
|
+
.#{$namespace}-popper__arrow::before {
|
|
214
|
+
border-#{$placement}-color: transparent;
|
|
215
|
+
border-#{$adjacency}-color: transparent;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
// dark
|
|
223
|
+
@mixin dark($block) {
|
|
224
|
+
html.dark {
|
|
225
|
+
@include b($block) {
|
|
226
|
+
@content;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
@mixin inset-input-border($color, $important: false) {
|
|
232
|
+
@if $important == true {
|
|
233
|
+
box-shadow: 0 0 0 1px $color inset !important;
|
|
234
|
+
} @else {
|
|
235
|
+
box-shadow: 0 0 0 1px $color inset;
|
|
236
|
+
}
|
|
237
|
+
}
|