ep-craft 0.1.2 → 0.1.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/dist/components/button/EpButton.vue.d.ts +7 -7
- package/dist/components/button/button.d.ts +4 -4
- package/dist/components/button/index.d.ts +2 -4
- package/dist/components/button/index.js +4 -6
- package/dist/index.css +1 -2
- package/dist/resolver.js +9 -12
- package/package.json +4 -2
- package/theme-chalk/src/affix.scss +7 -0
- package/theme-chalk/src/alert.scss +115 -0
- package/theme-chalk/src/anchor-link.scss +45 -0
- package/theme-chalk/src/anchor.scss +93 -0
- package/theme-chalk/src/aside.scss +8 -0
- package/theme-chalk/src/autocomplete.scss +95 -0
- package/theme-chalk/src/avatar-group.scss +25 -0
- package/theme-chalk/src/avatar.scss +55 -0
- package/theme-chalk/src/backtop.scss +29 -0
- package/theme-chalk/src/badge.scss +58 -0
- package/theme-chalk/src/base.scss +3 -0
- package/theme-chalk/src/breadcrumb-item.scss +58 -0
- package/theme-chalk/src/breadcrumb.scss +9 -0
- package/theme-chalk/src/button-group.scss +133 -0
- package/theme-chalk/src/button.scss +374 -0
- package/theme-chalk/src/calendar.scss +94 -0
- package/theme-chalk/src/card.scss +49 -0
- package/theme-chalk/src/carousel-item.scss +58 -0
- package/theme-chalk/src/carousel.scss +195 -0
- package/theme-chalk/src/cascader-panel.scss +150 -0
- package/theme-chalk/src/cascader.scss +289 -0
- package/theme-chalk/src/check-tag.scss +60 -0
- package/theme-chalk/src/checkbox-button.scss +142 -0
- package/theme-chalk/src/checkbox-group.scss +7 -0
- package/theme-chalk/src/checkbox.scss +300 -0
- package/theme-chalk/src/col.scss +56 -0
- package/theme-chalk/src/collapse-item.scss +72 -0
- package/theme-chalk/src/collapse-transition.scss +1 -0
- package/theme-chalk/src/collapse.scss +29 -0
- package/theme-chalk/src/color/index.scss +20 -0
- package/theme-chalk/src/color-picker-panel.scss +294 -0
- package/theme-chalk/src/color-picker.scss +165 -0
- package/theme-chalk/src/common/popup.scss +47 -0
- package/theme-chalk/src/common/transition.scss +125 -0
- package/theme-chalk/src/common/var.scss +1748 -0
- package/theme-chalk/src/config-provider.scss +0 -0
- package/theme-chalk/src/container.scss +14 -0
- package/theme-chalk/src/dark/css-vars.scss +45 -0
- package/theme-chalk/src/dark/var.scss +224 -0
- package/theme-chalk/src/date-picker/date-picker.scss +121 -0
- package/theme-chalk/src/date-picker/date-range-picker.scss +165 -0
- package/theme-chalk/src/date-picker/date-table.scss +164 -0
- package/theme-chalk/src/date-picker/month-table.scss +112 -0
- package/theme-chalk/src/date-picker/picker-panel.scss +152 -0
- package/theme-chalk/src/date-picker/picker.scss +217 -0
- package/theme-chalk/src/date-picker/time-picker.scss +90 -0
- package/theme-chalk/src/date-picker/time-range-picker.scss +33 -0
- package/theme-chalk/src/date-picker/time-spinner.scss +115 -0
- package/theme-chalk/src/date-picker/utils.scss +14 -0
- package/theme-chalk/src/date-picker/year-table.scss +108 -0
- package/theme-chalk/src/date-picker-panel.scss +34 -0
- package/theme-chalk/src/date-picker.scss +0 -0
- package/theme-chalk/src/descriptions-item.scss +77 -0
- package/theme-chalk/src/descriptions.scss +151 -0
- package/theme-chalk/src/dialog.scss +207 -0
- package/theme-chalk/src/display.scss +12 -0
- package/theme-chalk/src/divider.scss +48 -0
- package/theme-chalk/src/drawer.scss +251 -0
- package/theme-chalk/src/dropdown-item.scss +0 -0
- package/theme-chalk/src/dropdown-menu.scss +0 -0
- package/theme-chalk/src/dropdown.scss +208 -0
- package/theme-chalk/src/empty.scss +49 -0
- package/theme-chalk/src/footer.scss +12 -0
- package/theme-chalk/src/form-item.scss +246 -0
- package/theme-chalk/src/form.scss +28 -0
- package/theme-chalk/src/header.scss +12 -0
- package/theme-chalk/src/icon.scss +41 -0
- package/theme-chalk/src/image-viewer.scss +161 -0
- package/theme-chalk/src/image.scss +49 -0
- package/theme-chalk/src/index.scss +116 -0
- package/theme-chalk/src/infinite-scroll.scss +0 -0
- package/theme-chalk/src/input-number.scss +192 -0
- package/theme-chalk/src/input-otp.scss +191 -0
- package/theme-chalk/src/input-tag.scss +249 -0
- package/theme-chalk/src/input.scss +541 -0
- package/theme-chalk/src/link.scss +90 -0
- package/theme-chalk/src/loading.scss +104 -0
- package/theme-chalk/src/main.scss +14 -0
- package/theme-chalk/src/mention.scss +88 -0
- package/theme-chalk/src/menu-item-group.scss +0 -0
- package/theme-chalk/src/menu-item.scss +0 -0
- package/theme-chalk/src/menu.scss +376 -0
- package/theme-chalk/src/message-box.scss +220 -0
- package/theme-chalk/src/message.scss +123 -0
- package/theme-chalk/src/mixins/_button.scss +240 -0
- package/theme-chalk/src/mixins/_col.scss +41 -0
- package/theme-chalk/src/mixins/_var.scss +67 -0
- package/theme-chalk/src/mixins/config.scss +5 -0
- package/theme-chalk/src/mixins/function.scss +99 -0
- package/theme-chalk/src/mixins/mixins.scss +257 -0
- package/theme-chalk/src/mixins/utils.scss +39 -0
- package/theme-chalk/src/notification.scss +109 -0
- package/theme-chalk/src/option-group.scss +33 -0
- package/theme-chalk/src/option.scss +71 -0
- package/theme-chalk/src/overlay.scss +17 -0
- package/theme-chalk/src/page-header.scss +60 -0
- package/theme-chalk/src/pagination.scss +235 -0
- package/theme-chalk/src/popconfirm.scss +17 -0
- package/theme-chalk/src/popover.scss +61 -0
- package/theme-chalk/src/popper.scss +117 -0
- package/theme-chalk/src/progress.scss +179 -0
- package/theme-chalk/src/radio-button.scss +165 -0
- package/theme-chalk/src/radio-group.scss +9 -0
- package/theme-chalk/src/radio.scss +220 -0
- package/theme-chalk/src/rate.scss +121 -0
- package/theme-chalk/src/reset.scss +99 -0
- package/theme-chalk/src/result.scss +57 -0
- package/theme-chalk/src/row.scss +34 -0
- package/theme-chalk/src/scrollbar.scss +97 -0
- package/theme-chalk/src/segmented.scss +186 -0
- package/theme-chalk/src/select-dropdown-v2.scss +1 -0
- package/theme-chalk/src/select-dropdown.scss +57 -0
- package/theme-chalk/src/select-v2.scss +4 -0
- package/theme-chalk/src/select.scss +269 -0
- package/theme-chalk/src/skeleton-item.scss +83 -0
- package/theme-chalk/src/skeleton.scss +44 -0
- package/theme-chalk/src/slider.scss +212 -0
- package/theme-chalk/src/space.scss +20 -0
- package/theme-chalk/src/spinner.scss +43 -0
- package/theme-chalk/src/splitter-panel.scss +8 -0
- package/theme-chalk/src/splitter.scss +148 -0
- package/theme-chalk/src/statistic.scss +35 -0
- package/theme-chalk/src/step.scss +320 -0
- package/theme-chalk/src/steps.scss +22 -0
- package/theme-chalk/src/sub-menu.scss +0 -0
- package/theme-chalk/src/switch.scss +294 -0
- package/theme-chalk/src/tab-pane.scss +0 -0
- package/theme-chalk/src/table-column.scss +100 -0
- package/theme-chalk/src/table-v2.scss +239 -0
- package/theme-chalk/src/table.scss +698 -0
- package/theme-chalk/src/tabs.scss +699 -0
- package/theme-chalk/src/tag.scss +195 -0
- package/theme-chalk/src/text.scss +51 -0
- package/theme-chalk/src/time-picker.scss +5 -0
- package/theme-chalk/src/time-select.scss +37 -0
- package/theme-chalk/src/timeline-item.scss +135 -0
- package/theme-chalk/src/timeline.scss +101 -0
- package/theme-chalk/src/tooltip.scss +0 -0
- package/theme-chalk/src/tour.scss +187 -0
- package/theme-chalk/src/transfer.scss +201 -0
- package/theme-chalk/src/tree-select.scss +41 -0
- package/theme-chalk/src/tree.scss +134 -0
- package/theme-chalk/src/upload.scss +660 -0
- package/theme-chalk/src/var.scss +87 -0
- package/theme-chalk/src/virtual-list.scss +40 -0
- package/dist/components/button/EpButton.vue.js +0 -171
- package/dist/components/button/EpButton2.vue.js +0 -4
- package/dist/components/button/button.js +0 -95
- package/dist/node_modules/@ctrl/tinycolor/dist/module/conversion.js +0 -134
- package/dist/node_modules/@ctrl/tinycolor/dist/module/css-color-names.js +0 -153
- package/dist/node_modules/@ctrl/tinycolor/dist/module/format-input.js +0 -77
- package/dist/node_modules/@ctrl/tinycolor/dist/module/index.js +0 -354
- package/dist/node_modules/@ctrl/tinycolor/dist/module/util.js +0 -32
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
|
|
3
|
+
@use 'mixins/mixins' as *;
|
|
4
|
+
@use 'mixins/var' as *;
|
|
5
|
+
@use 'common/var' as *;
|
|
6
|
+
|
|
7
|
+
@include b(tag) {
|
|
8
|
+
@include set-component-css-var('tag', $tag);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
$tag-border-width: 1px;
|
|
12
|
+
|
|
13
|
+
$tag-icon-span-gap: () !default;
|
|
14
|
+
$tag-icon-span-gap: map.merge(
|
|
15
|
+
(
|
|
16
|
+
'large': 8px,
|
|
17
|
+
'default': 6px,
|
|
18
|
+
'small': 4px,
|
|
19
|
+
),
|
|
20
|
+
$tag-icon-span-gap
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
@function returnVarList($var, $type: 'primary') {
|
|
24
|
+
$list: ('fill-color', 'blank');
|
|
25
|
+
|
|
26
|
+
@if $var !=false {
|
|
27
|
+
$list: ('color', $type, $var);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@return $list;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// false mean --el-color-white
|
|
34
|
+
@mixin genTheme($backgroundColorWeight, $borderColorWeight, $hoverColorWeight) {
|
|
35
|
+
@include css-var-from-global(
|
|
36
|
+
('tag', 'bg-color'),
|
|
37
|
+
returnVarList($backgroundColorWeight)
|
|
38
|
+
);
|
|
39
|
+
@include css-var-from-global(
|
|
40
|
+
('tag', 'border-color'),
|
|
41
|
+
returnVarList($borderColorWeight)
|
|
42
|
+
);
|
|
43
|
+
@include css-var-from-global(
|
|
44
|
+
('tag', 'hover-color'),
|
|
45
|
+
returnVarList($hoverColorWeight)
|
|
46
|
+
);
|
|
47
|
+
|
|
48
|
+
@each $type in $types {
|
|
49
|
+
&.#{bem('tag', '', $type)} {
|
|
50
|
+
@include css-var-from-global(
|
|
51
|
+
('tag', 'bg-color'),
|
|
52
|
+
returnVarList($backgroundColorWeight, $type)
|
|
53
|
+
);
|
|
54
|
+
@include css-var-from-global(
|
|
55
|
+
('tag', 'border-color'),
|
|
56
|
+
returnVarList($borderColorWeight, $type)
|
|
57
|
+
);
|
|
58
|
+
@include css-var-from-global(
|
|
59
|
+
('tag', 'hover-color'),
|
|
60
|
+
returnVarList($hoverColorWeight, $type)
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
@include b(tag) {
|
|
67
|
+
background-color: getCssVar('tag-bg-color');
|
|
68
|
+
border-color: getCssVar('tag-border-color');
|
|
69
|
+
color: getCssVar('tag-text-color');
|
|
70
|
+
|
|
71
|
+
display: inline-flex;
|
|
72
|
+
justify-content: center;
|
|
73
|
+
align-items: center;
|
|
74
|
+
vertical-align: middle;
|
|
75
|
+
height: map.get($tag-height, 'default');
|
|
76
|
+
padding: 0 map.get($tag-padding, 'default') - $border-width;
|
|
77
|
+
|
|
78
|
+
font-size: getCssVar('tag-font-size');
|
|
79
|
+
line-height: 1;
|
|
80
|
+
border-width: $tag-border-width;
|
|
81
|
+
border-style: solid;
|
|
82
|
+
border-radius: getCssVar('tag-border-radius');
|
|
83
|
+
box-sizing: border-box;
|
|
84
|
+
white-space: nowrap;
|
|
85
|
+
|
|
86
|
+
@include set-css-var-value('icon-size', 14px);
|
|
87
|
+
@include genTheme('light-9', 'light-8', '');
|
|
88
|
+
|
|
89
|
+
@include when(hit) {
|
|
90
|
+
border-color: getCssVar('color', 'primary');
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
@include when(round) {
|
|
94
|
+
border-radius: getCssVar('tag', 'border-radius-rounded');
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.#{$namespace}-tag__close {
|
|
98
|
+
flex-shrink: 0;
|
|
99
|
+
color: getCssVar('tag', 'text-color');
|
|
100
|
+
|
|
101
|
+
&:hover {
|
|
102
|
+
color: getCssVar('color-white');
|
|
103
|
+
background-color: getCssVar('tag-hover-color');
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
@each $type in $types {
|
|
108
|
+
&.#{bem('tag', '', $type)} {
|
|
109
|
+
@include css-var-from-global(('tag', 'text-color'), ('color', $type));
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
$svg-margin-size: 1px;
|
|
114
|
+
|
|
115
|
+
.#{$namespace}-icon {
|
|
116
|
+
border-radius: 50%;
|
|
117
|
+
cursor: pointer;
|
|
118
|
+
|
|
119
|
+
font-size: calc(#{getCssVar('icon-size')} - #{$svg-margin-size * 2});
|
|
120
|
+
height: getCssVar('icon-size');
|
|
121
|
+
width: getCssVar('icon-size');
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.#{$namespace}-tag__close {
|
|
125
|
+
padding: 0;
|
|
126
|
+
background-color: transparent;
|
|
127
|
+
border-radius: 50%;
|
|
128
|
+
border: none;
|
|
129
|
+
outline: none;
|
|
130
|
+
overflow: hidden;
|
|
131
|
+
margin-left: map.get($tag-icon-span-gap, 'default');
|
|
132
|
+
&:focus-visible {
|
|
133
|
+
outline: 2px solid getCssVar('color-primary');
|
|
134
|
+
outline-offset: 2px;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.#{$namespace}-icon {
|
|
138
|
+
display: flex; // #22530
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
@include m(dark) {
|
|
143
|
+
@include css-var-from-global(('tag', 'text-color'), ('color', 'white'));
|
|
144
|
+
@include genTheme('', '', 'light-3');
|
|
145
|
+
|
|
146
|
+
@each $type in $types {
|
|
147
|
+
&.#{bem('tag', '', $type)} {
|
|
148
|
+
@include css-var-from-global(('tag', 'text-color'), ('color', 'white'));
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
@include m(plain) {
|
|
154
|
+
@include css-var-from-global(('tag', 'bg-color'), ('fill-color', 'blank'));
|
|
155
|
+
@include genTheme(false, 'light-5', '');
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
&.is-closable {
|
|
159
|
+
padding-right: map.get($tag-icon-span-gap, 'default') - $border-width;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
@each $size in (large, small) {
|
|
163
|
+
@include m($size) {
|
|
164
|
+
padding: 0 map.get($tag-padding, $size) - $tag-border-width;
|
|
165
|
+
height: map.get($tag-height, $size);
|
|
166
|
+
|
|
167
|
+
@include set-css-var-value(
|
|
168
|
+
'icon-size',
|
|
169
|
+
#{map.get($tag-icon-size, $size)}
|
|
170
|
+
);
|
|
171
|
+
|
|
172
|
+
.#{$namespace}-tag__close {
|
|
173
|
+
margin-left: map.get($tag-icon-span-gap, $size);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
&.is-closable {
|
|
177
|
+
padding-right: map.get($tag-icon-span-gap, $size) - $border-width;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
@include m(small) {
|
|
183
|
+
.#{$namespace}-icon-close {
|
|
184
|
+
transform: scale(0.8);
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
@each $type in $types {
|
|
189
|
+
&.#{bem('tag', '', $type)} {
|
|
190
|
+
@include when(hit) {
|
|
191
|
+
border-color: getCssVar('color', $type);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
|
|
3
|
+
@use 'mixins/mixins' as *;
|
|
4
|
+
@use 'mixins/var' as *;
|
|
5
|
+
@use 'common/var' as *;
|
|
6
|
+
|
|
7
|
+
@include b(text) {
|
|
8
|
+
@include set-component-css-var('text', $text);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@include b(text) {
|
|
12
|
+
align-self: center;
|
|
13
|
+
margin: 0;
|
|
14
|
+
padding: 0;
|
|
15
|
+
font-size: getCssVar('text', 'font-size');
|
|
16
|
+
color: getCssVar('text', 'color');
|
|
17
|
+
overflow-wrap: break-word;
|
|
18
|
+
|
|
19
|
+
@include when(truncated) {
|
|
20
|
+
display: inline-block;
|
|
21
|
+
max-width: 100%;
|
|
22
|
+
text-overflow: ellipsis;
|
|
23
|
+
white-space: nowrap;
|
|
24
|
+
overflow: hidden;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@include when(line-clamp) {
|
|
28
|
+
display: -webkit-inline-box;
|
|
29
|
+
-webkit-box-orient: vertical;
|
|
30
|
+
overflow: hidden;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@each $size in (large, default, small) {
|
|
34
|
+
@include m($size) {
|
|
35
|
+
@include set-css-var-value(
|
|
36
|
+
('text', 'font-size'),
|
|
37
|
+
map.get($text-font-size, $size)
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@each $type in $types {
|
|
43
|
+
&.#{bem('text', '', $type)} {
|
|
44
|
+
@include css-var-from-global(('text', 'color'), ('color', $type));
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
& > .#{bem('icon')} {
|
|
49
|
+
vertical-align: -2px;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
@use 'mixins/config' as *;
|
|
2
|
+
@use 'mixins/mixins' as *;
|
|
3
|
+
@use 'common/var' as *;
|
|
4
|
+
@use './date-picker/picker.scss';
|
|
5
|
+
@use './date-picker/date-picker.scss';
|
|
6
|
+
|
|
7
|
+
.time-select {
|
|
8
|
+
margin: 5px 0;
|
|
9
|
+
min-width: 0;
|
|
10
|
+
|
|
11
|
+
.#{$namespace}-picker-panel__content {
|
|
12
|
+
max-height: 200px;
|
|
13
|
+
margin: 0;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
&-item {
|
|
17
|
+
padding: 8px 10px;
|
|
18
|
+
font-size: 14px;
|
|
19
|
+
line-height: 20px;
|
|
20
|
+
|
|
21
|
+
&.disabled {
|
|
22
|
+
color: getCssVar('datepicker-border-color');
|
|
23
|
+
cursor: not-allowed;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&:hover {
|
|
27
|
+
background-color: getCssVar('fill-color', 'light');
|
|
28
|
+
font-weight: bold;
|
|
29
|
+
cursor: pointer;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.time-select-item.selected:not(.disabled) {
|
|
34
|
+
color: getCssVar('color-primary');
|
|
35
|
+
font-weight: bold;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
@use 'mixins/mixins' as *;
|
|
2
|
+
@use 'common/var' as *;
|
|
3
|
+
|
|
4
|
+
@mixin alternate-tail-node-center {
|
|
5
|
+
@include e((tail, node)) {
|
|
6
|
+
left: 50%;
|
|
7
|
+
transform: translateX(-50%);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@include b(timeline-item) {
|
|
12
|
+
position: relative;
|
|
13
|
+
padding-bottom: 20px;
|
|
14
|
+
|
|
15
|
+
@include e(wrapper) {
|
|
16
|
+
box-sizing: content-box;
|
|
17
|
+
position: relative;
|
|
18
|
+
top: -3px;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
@include e(tail) {
|
|
22
|
+
position: absolute;
|
|
23
|
+
height: 100%;
|
|
24
|
+
border-left: 2px solid getCssVar('timeline-node-color');
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
& .#{$namespace}-timeline-item__icon {
|
|
28
|
+
color: getCssVar('color-white');
|
|
29
|
+
font-size: getCssVar('font-size-small');
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@include e(node) {
|
|
33
|
+
position: absolute;
|
|
34
|
+
background-color: getCssVar('timeline-node-color');
|
|
35
|
+
border-color: getCssVar('timeline-node-color');
|
|
36
|
+
border-radius: 50%;
|
|
37
|
+
box-sizing: border-box;
|
|
38
|
+
display: flex;
|
|
39
|
+
justify-content: center;
|
|
40
|
+
align-items: center;
|
|
41
|
+
|
|
42
|
+
@include m(normal) {
|
|
43
|
+
width: getCssVar('timeline-node-size-normal');
|
|
44
|
+
height: getCssVar('timeline-node-size-normal');
|
|
45
|
+
}
|
|
46
|
+
@include m(large) {
|
|
47
|
+
width: getCssVar('timeline-node-size-large');
|
|
48
|
+
height: getCssVar('timeline-node-size-large');
|
|
49
|
+
}
|
|
50
|
+
@include when(hollow) {
|
|
51
|
+
background: getCssVar('color-white');
|
|
52
|
+
border-style: solid;
|
|
53
|
+
border-width: 2px;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
@each $type in (primary, success, warning, danger, info) {
|
|
57
|
+
@include m($type) {
|
|
58
|
+
background-color: getCssVar('color', $type);
|
|
59
|
+
border-color: getCssVar('color', $type);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
@include e(dot) {
|
|
65
|
+
position: absolute;
|
|
66
|
+
display: flex;
|
|
67
|
+
justify-content: center;
|
|
68
|
+
align-items: center;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
@include e(content) {
|
|
72
|
+
color: getCssVar('text-color', 'primary');
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
@include e(timestamp) {
|
|
76
|
+
color: getCssVar('text-color', 'secondary');
|
|
77
|
+
line-height: 1;
|
|
78
|
+
font-size: getCssVar('font-size-small');
|
|
79
|
+
|
|
80
|
+
@include when(top) {
|
|
81
|
+
margin-bottom: 8px;
|
|
82
|
+
padding-top: 4px;
|
|
83
|
+
}
|
|
84
|
+
@include when(bottom) {
|
|
85
|
+
margin-top: 8px;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
@include when(start) {
|
|
90
|
+
@include e(wrapper) {
|
|
91
|
+
padding-left: 28px;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
@include e(tail) {
|
|
95
|
+
left: 4px;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
@include e(node) {
|
|
99
|
+
@include m(normal) {
|
|
100
|
+
left: -1px;
|
|
101
|
+
}
|
|
102
|
+
@include m(large) {
|
|
103
|
+
left: -2px;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
@include when(end) {
|
|
109
|
+
@include e(wrapper) {
|
|
110
|
+
padding-right: 28px;
|
|
111
|
+
text-align: right;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
@include e(tail) {
|
|
115
|
+
right: 4px;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
@include e(node) {
|
|
119
|
+
@include m(normal) {
|
|
120
|
+
right: -1px;
|
|
121
|
+
}
|
|
122
|
+
@include m(large) {
|
|
123
|
+
right: -2px;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
@include when(alternate) {
|
|
129
|
+
@include alternate-tail-node-center;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
@include when(alternate-reverse) {
|
|
133
|
+
@include alternate-tail-node-center;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
@use 'mixins/mixins' as *;
|
|
2
|
+
@use 'mixins/var' as *;
|
|
3
|
+
@use 'common/var' as *;
|
|
4
|
+
|
|
5
|
+
@mixin alternate-padding {
|
|
6
|
+
padding-left: 20px;
|
|
7
|
+
padding-right: 20px;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
@mixin alternate-wrapper-start {
|
|
11
|
+
.#{$namespace}-timeline-item__wrapper {
|
|
12
|
+
width: calc(50% - 28px);
|
|
13
|
+
left: calc(50% - getCssVar('timeline-node-size-large') / 2);
|
|
14
|
+
padding-left: 28px;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
@mixin alternate-wrapper-end {
|
|
19
|
+
.#{$namespace}-timeline-item__wrapper {
|
|
20
|
+
width: calc(50% - 28px + getCssVar('timeline-node-size-large') / 2);
|
|
21
|
+
text-align: right;
|
|
22
|
+
padding-right: 28px;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
@include b(timeline) {
|
|
27
|
+
@include set-component-css-var('timeline', $timeline);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@include b(timeline) {
|
|
31
|
+
margin: 0;
|
|
32
|
+
font-size: getCssVar('font-size', 'base');
|
|
33
|
+
list-style: none;
|
|
34
|
+
|
|
35
|
+
.#{$namespace}-timeline-item:last-child {
|
|
36
|
+
.#{$namespace}-timeline-item__tail {
|
|
37
|
+
display: none;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.#{$namespace}-timeline-item__center {
|
|
42
|
+
display: flex;
|
|
43
|
+
align-items: center;
|
|
44
|
+
|
|
45
|
+
.#{$namespace}-timeline-item__wrapper {
|
|
46
|
+
width: 100%;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.#{$namespace}-timeline-item__tail {
|
|
50
|
+
top: 0;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.#{$namespace}-timeline-item__center:first-child {
|
|
55
|
+
.#{$namespace}-timeline-item__tail {
|
|
56
|
+
height: calc(50% + 10px);
|
|
57
|
+
top: calc(50% - 10px);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.#{$namespace}-timeline-item__center:last-child {
|
|
62
|
+
.#{$namespace}-timeline-item__tail {
|
|
63
|
+
display: block;
|
|
64
|
+
height: calc(50% - 10px);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
@include when(start) {
|
|
69
|
+
padding-left: 40px;
|
|
70
|
+
padding-right: 0;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
@include when(end) {
|
|
74
|
+
padding-left: 0;
|
|
75
|
+
padding-right: 40px;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
@include when(alternate) {
|
|
79
|
+
@include alternate-padding;
|
|
80
|
+
|
|
81
|
+
.#{$namespace}-timeline-item:nth-child(2n + 1) {
|
|
82
|
+
@include alternate-wrapper-start;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.#{$namespace}-timeline-item:nth-child(2n) {
|
|
86
|
+
@include alternate-wrapper-end;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
@include when(alternate-reverse) {
|
|
91
|
+
@include alternate-padding;
|
|
92
|
+
|
|
93
|
+
.#{$namespace}-timeline-item:nth-child(2n + 1) {
|
|
94
|
+
@include alternate-wrapper-end;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.#{$namespace}-timeline-item:nth-child(2n) {
|
|
98
|
+
@include alternate-wrapper-start;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
|
|
3
|
+
@use 'mixins/mixins' as *;
|
|
4
|
+
@use 'mixins/var' as *;
|
|
5
|
+
@use 'common/var' as *;
|
|
6
|
+
|
|
7
|
+
@include b(tour) {
|
|
8
|
+
@include set-component-css-var('tour', $tour);
|
|
9
|
+
|
|
10
|
+
@include e(hollow) {
|
|
11
|
+
transition: all getCssVar('transition-duration') ease;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@include e(content) {
|
|
15
|
+
border-radius: getCssVar('tour-border-radius');
|
|
16
|
+
width: var(#{getCssVarName('tour-width')});
|
|
17
|
+
padding: getCssVar('tour-padding-primary');
|
|
18
|
+
background: getCssVar('tour-bg-color');
|
|
19
|
+
box-shadow: getCssVar('box-shadow-light');
|
|
20
|
+
box-sizing: border-box;
|
|
21
|
+
overflow-wrap: break-word;
|
|
22
|
+
outline: none;
|
|
23
|
+
|
|
24
|
+
$content-selector: &;
|
|
25
|
+
|
|
26
|
+
$sides: (
|
|
27
|
+
'top': 'bottom',
|
|
28
|
+
'bottom': 'top',
|
|
29
|
+
'left': 'right',
|
|
30
|
+
'right': 'left',
|
|
31
|
+
);
|
|
32
|
+
|
|
33
|
+
@include e(arrow) {
|
|
34
|
+
position: absolute;
|
|
35
|
+
background: getCssVar('tour-bg-color');
|
|
36
|
+
width: 10px;
|
|
37
|
+
height: 10px;
|
|
38
|
+
pointer-events: none;
|
|
39
|
+
transform: rotate(45deg);
|
|
40
|
+
box-sizing: border-box;
|
|
41
|
+
|
|
42
|
+
@each $side,
|
|
43
|
+
$adjacency
|
|
44
|
+
in (
|
|
45
|
+
'top': 'left',
|
|
46
|
+
'bottom': 'right',
|
|
47
|
+
'left': 'bottom',
|
|
48
|
+
'right': 'top'
|
|
49
|
+
)
|
|
50
|
+
{
|
|
51
|
+
#{$content-selector}[data-side^='#{$side}'] & {
|
|
52
|
+
border-#{$side}-color: transparent;
|
|
53
|
+
border-#{$adjacency}-color: transparent;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
@each $side, $opposite in $sides {
|
|
58
|
+
#{$content-selector}[data-side^='#{$side}'] & {
|
|
59
|
+
#{$opposite}: -5px;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
@include e(closebtn) {
|
|
65
|
+
position: absolute;
|
|
66
|
+
top: 0;
|
|
67
|
+
right: 0;
|
|
68
|
+
padding: 0;
|
|
69
|
+
width: 40px;
|
|
70
|
+
height: 40px;
|
|
71
|
+
background: transparent;
|
|
72
|
+
border: none;
|
|
73
|
+
outline: none;
|
|
74
|
+
cursor: pointer;
|
|
75
|
+
font-size: var(
|
|
76
|
+
#{getCssVarName('message-close-size')},
|
|
77
|
+
map.get($message, 'close-size')
|
|
78
|
+
);
|
|
79
|
+
|
|
80
|
+
.#{$namespace}-tour__close {
|
|
81
|
+
color: getCssVar('tour-close-color');
|
|
82
|
+
font-size: inherit;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
&:focus,
|
|
86
|
+
&:hover {
|
|
87
|
+
.#{$namespace}-tour__close {
|
|
88
|
+
color: getCssVar('color', 'primary');
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
@include e(header) {
|
|
94
|
+
padding-bottom: getCssVar('tour-padding-primary');
|
|
95
|
+
|
|
96
|
+
&.show-close {
|
|
97
|
+
padding-right: calc(
|
|
98
|
+
getCssVar('tour-padding-primary') +
|
|
99
|
+
var(
|
|
100
|
+
#{getCssVarName('message-close-size')},
|
|
101
|
+
map.get($message, 'close-size')
|
|
102
|
+
)
|
|
103
|
+
);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
@include e(title) {
|
|
108
|
+
line-height: getCssVar('tour-font-line-height');
|
|
109
|
+
font-size: getCssVar('tour-title-font-size');
|
|
110
|
+
color: getCssVar('tour-title-text-color');
|
|
111
|
+
font-weight: getCssVar('tour-title-font-weight');
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
@include e(body) {
|
|
115
|
+
color: getCssVar('tour-text-color');
|
|
116
|
+
font-size: getCssVar('tour-font-size');
|
|
117
|
+
img,
|
|
118
|
+
video {
|
|
119
|
+
max-width: 100%;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
@include e(footer) {
|
|
124
|
+
padding-top: getCssVar('tour-padding-primary');
|
|
125
|
+
box-sizing: border-box;
|
|
126
|
+
display: flex;
|
|
127
|
+
justify-content: space-between;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
@include b(tour-indicators) {
|
|
131
|
+
display: inline-block;
|
|
132
|
+
flex: 1;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
@include b(tour-indicator) {
|
|
136
|
+
width: 6px;
|
|
137
|
+
height: 6px;
|
|
138
|
+
display: inline-block;
|
|
139
|
+
border-radius: 50%;
|
|
140
|
+
background: getCssVar('color', 'info-light-9');
|
|
141
|
+
margin-right: 6px;
|
|
142
|
+
|
|
143
|
+
@include when(active) {
|
|
144
|
+
background: getCssVar('color', 'primary');
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
&.#{$namespace}-tour--primary {
|
|
150
|
+
@include set-css-var-value('tour-title-text-color', #fff);
|
|
151
|
+
@include set-css-var-value('tour-text-color', #fff);
|
|
152
|
+
@include set-css-var-value('tour-bg-color', getCssVar('color', 'primary'));
|
|
153
|
+
@include set-css-var-value('tour-close-color', #fff);
|
|
154
|
+
|
|
155
|
+
.#{$namespace}-tour__closebtn {
|
|
156
|
+
&:focus,
|
|
157
|
+
&:hover {
|
|
158
|
+
.#{$namespace}-tour__close {
|
|
159
|
+
color: getCssVar('tour-title-text-color');
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.#{$namespace}-button--default {
|
|
165
|
+
color: getCssVar('color', 'primary');
|
|
166
|
+
border-color: getCssVar('color', 'primary');
|
|
167
|
+
background: #fff;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.#{$namespace}-button--primary {
|
|
171
|
+
border-color: #fff;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
@include b(tour-indicator) {
|
|
175
|
+
background: rgba(255, 255, 255, 0.15);
|
|
176
|
+
@include when(active) {
|
|
177
|
+
background: #fff;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
@include b(tour-parent) {
|
|
184
|
+
@include m(hidden) {
|
|
185
|
+
overflow: hidden;
|
|
186
|
+
}
|
|
187
|
+
}
|