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,165 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
|
|
3
|
+
@use 'mixins/mixins' as *;
|
|
4
|
+
@use 'mixins/var' as *;
|
|
5
|
+
@use 'mixins/button' as *;
|
|
6
|
+
@use 'common/var' as *;
|
|
7
|
+
|
|
8
|
+
@include b(radio-button) {
|
|
9
|
+
@include set-component-css-var('radio-button', $radio-button);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
@include b(radio-button) {
|
|
13
|
+
position: relative;
|
|
14
|
+
display: inline-block;
|
|
15
|
+
outline: none;
|
|
16
|
+
|
|
17
|
+
@include e(inner) {
|
|
18
|
+
display: inline-block;
|
|
19
|
+
line-height: 1;
|
|
20
|
+
white-space: nowrap;
|
|
21
|
+
vertical-align: middle;
|
|
22
|
+
background: var(
|
|
23
|
+
#{getCssVarName('button-bg-color')},
|
|
24
|
+
map.get($button, 'bg-color')
|
|
25
|
+
);
|
|
26
|
+
outline: getCssVar('border');
|
|
27
|
+
font-weight: var(
|
|
28
|
+
#{getCssVarName('button-font-weight')},
|
|
29
|
+
map.get($button, 'font-weight')
|
|
30
|
+
);
|
|
31
|
+
color: var(
|
|
32
|
+
#{getCssVarName('button-text-color')},
|
|
33
|
+
map.get($button, 'text-color')
|
|
34
|
+
);
|
|
35
|
+
-webkit-appearance: none;
|
|
36
|
+
text-align: center;
|
|
37
|
+
box-sizing: border-box;
|
|
38
|
+
margin: 0;
|
|
39
|
+
position: relative;
|
|
40
|
+
cursor: pointer;
|
|
41
|
+
transition: getCssVar('transition-all');
|
|
42
|
+
user-select: none;
|
|
43
|
+
|
|
44
|
+
@include button-size(
|
|
45
|
+
map.get($button-padding-vertical, 'default') - $button-border-width,
|
|
46
|
+
map.get($button-padding-horizontal, 'default') - $button-border-width,
|
|
47
|
+
map.get($button-font-size, 'default'),
|
|
48
|
+
0
|
|
49
|
+
);
|
|
50
|
+
|
|
51
|
+
&:hover {
|
|
52
|
+
color: getCssVar('color-primary');
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
& [class*='#{$namespace}-icon-'] {
|
|
56
|
+
line-height: 0.9;
|
|
57
|
+
|
|
58
|
+
& + span {
|
|
59
|
+
margin-left: 5px;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
&:first-child {
|
|
65
|
+
.#{$namespace}-radio-button__inner {
|
|
66
|
+
border-radius: getCssVar('border-radius-base') 0 0
|
|
67
|
+
getCssVar('border-radius-base');
|
|
68
|
+
box-shadow: none !important;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
@include when(active) {
|
|
73
|
+
@include e(original-radio) {
|
|
74
|
+
&:not(:disabled) {
|
|
75
|
+
& + .#{$namespace}-radio-button__inner {
|
|
76
|
+
color: getCssVarWithDefault(
|
|
77
|
+
('radio-button', 'checked-text-color'),
|
|
78
|
+
map.get($radio-button, 'checked-text-color')
|
|
79
|
+
);
|
|
80
|
+
background-color: getCssVarWithDefault(
|
|
81
|
+
'radio-button-checked-bg-color',
|
|
82
|
+
map.get($radio-button, 'checked-bg-color')
|
|
83
|
+
);
|
|
84
|
+
border-color: getCssVarWithDefault(
|
|
85
|
+
'radio-button-checked-border-color',
|
|
86
|
+
map.get($radio-button, 'checked-border-color')
|
|
87
|
+
);
|
|
88
|
+
box-shadow: -1px 0 0 0
|
|
89
|
+
getCssVarWithDefault(
|
|
90
|
+
'radio-button-checked-border-color',
|
|
91
|
+
map.get($radio-button, 'checked-border-color')
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
@include e(original-radio) {
|
|
99
|
+
opacity: 0;
|
|
100
|
+
outline: none;
|
|
101
|
+
position: absolute;
|
|
102
|
+
z-index: -1;
|
|
103
|
+
|
|
104
|
+
&:focus-visible {
|
|
105
|
+
& + .#{$namespace}-radio-button__inner {
|
|
106
|
+
border-left: getCssVar('border');
|
|
107
|
+
border-left-color: getCssVarWithDefault(
|
|
108
|
+
'radio-button-checked-border-color',
|
|
109
|
+
map.get($radio-button, 'checked-border-color')
|
|
110
|
+
);
|
|
111
|
+
outline: 2px solid getCssVar('radio-button-checked-border-color');
|
|
112
|
+
outline-offset: 1px;
|
|
113
|
+
z-index: 2;
|
|
114
|
+
border-radius: getCssVar('border-radius-base');
|
|
115
|
+
box-shadow: none;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
&:disabled {
|
|
120
|
+
& + .#{$namespace}-radio-button__inner {
|
|
121
|
+
color: getCssVar('disabled-text-color');
|
|
122
|
+
cursor: not-allowed;
|
|
123
|
+
background-image: none;
|
|
124
|
+
background-color: getCssVarWithDefault(
|
|
125
|
+
'button-disabled-bg-color',
|
|
126
|
+
map.get($button, 'disabled-bg-color')
|
|
127
|
+
);
|
|
128
|
+
border-color: getCssVarWithDefault(
|
|
129
|
+
'button-disabled-border-color',
|
|
130
|
+
map.get($button, 'disabled-border-color')
|
|
131
|
+
);
|
|
132
|
+
box-shadow: none;
|
|
133
|
+
}
|
|
134
|
+
&:checked + .#{$namespace}-radio-button__inner {
|
|
135
|
+
background-color: getCssVar('radio-button-disabled-checked-fill');
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
&:last-child {
|
|
141
|
+
.#{$namespace}-radio-button__inner {
|
|
142
|
+
border-radius: 0 getCssVar('border-radius-base')
|
|
143
|
+
getCssVar('border-radius-base') 0;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
&:first-child:last-child {
|
|
148
|
+
.#{$namespace}-radio-button__inner {
|
|
149
|
+
border-radius: getCssVar('border-radius-base');
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
@each $size in (large, small) {
|
|
154
|
+
@include m($size) {
|
|
155
|
+
& .#{$namespace}-radio-button__inner {
|
|
156
|
+
@include button-size(
|
|
157
|
+
map.get($button-padding-vertical, $size) - $button-border-width,
|
|
158
|
+
map.get($button-padding-horizontal, $size) - $button-border-width,
|
|
159
|
+
map.get($button-font-size, $size),
|
|
160
|
+
0
|
|
161
|
+
);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
|
|
3
|
+
@use 'mixins/mixins' as *;
|
|
4
|
+
@use 'mixins/var' as *;
|
|
5
|
+
@use 'mixins/button' as *;
|
|
6
|
+
@use 'common/var' as *;
|
|
7
|
+
|
|
8
|
+
$radio-font-size: () !default;
|
|
9
|
+
$radio-font-size: map.merge(
|
|
10
|
+
(
|
|
11
|
+
'large': 14px,
|
|
12
|
+
'small': 12px,
|
|
13
|
+
),
|
|
14
|
+
$radio-font-size
|
|
15
|
+
);
|
|
16
|
+
|
|
17
|
+
@include b(radio) {
|
|
18
|
+
@include set-component-css-var('radio', $radio);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
@include b(radio) {
|
|
22
|
+
color: getCssVar('radio-text-color');
|
|
23
|
+
font-weight: getCssVar('radio-font-weight');
|
|
24
|
+
position: relative;
|
|
25
|
+
cursor: pointer;
|
|
26
|
+
display: inline-flex;
|
|
27
|
+
align-items: center;
|
|
28
|
+
white-space: nowrap;
|
|
29
|
+
outline: none;
|
|
30
|
+
font-size: getCssVar('font-size', 'base');
|
|
31
|
+
user-select: none;
|
|
32
|
+
margin-right: 30px;
|
|
33
|
+
height: map.get($radio-height, 'default');
|
|
34
|
+
|
|
35
|
+
@each $size in (large, small) {
|
|
36
|
+
&.#{$namespace}-radio--#{$size} {
|
|
37
|
+
height: map.get($radio-height, $size);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
@include when(bordered) {
|
|
42
|
+
padding: 0
|
|
43
|
+
map.get($checkbox-bordered-padding-right, 'default')-$border-width 0
|
|
44
|
+
map.get($checkbox-bordered-padding-left, 'default')-$border-width;
|
|
45
|
+
|
|
46
|
+
border-radius: getCssVar('border-radius-base');
|
|
47
|
+
border: getCssVar('border');
|
|
48
|
+
box-sizing: border-box;
|
|
49
|
+
|
|
50
|
+
&.is-checked {
|
|
51
|
+
border-color: getCssVar('color-primary');
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&.is-disabled {
|
|
55
|
+
cursor: not-allowed;
|
|
56
|
+
border-color: getCssVar('border-color-lighter');
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
@each $size in (large, small) {
|
|
60
|
+
&.#{$namespace}-radio--#{$size} {
|
|
61
|
+
padding: 0
|
|
62
|
+
map.get($checkbox-bordered-padding-right, $size)-$border-width
|
|
63
|
+
0
|
|
64
|
+
map.get($checkbox-bordered-padding-left, $size)-$border-width;
|
|
65
|
+
border-radius: getCssVar('border-radius-base');
|
|
66
|
+
|
|
67
|
+
.#{$namespace}-radio__label {
|
|
68
|
+
font-size: map.get($button-font-size, $size);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.#{$namespace}-radio__inner {
|
|
72
|
+
height: map.get($radio-bordered-input-height, $size);
|
|
73
|
+
width: map.get($radio-bordered-input-width, $size);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
&:last-child {
|
|
80
|
+
margin-right: 0;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
@include e(input) {
|
|
84
|
+
white-space: nowrap;
|
|
85
|
+
cursor: pointer;
|
|
86
|
+
outline: none;
|
|
87
|
+
display: inline-flex;
|
|
88
|
+
position: relative;
|
|
89
|
+
vertical-align: middle;
|
|
90
|
+
|
|
91
|
+
@include when(disabled) {
|
|
92
|
+
.#{$namespace}-radio__inner {
|
|
93
|
+
background-color: map.get($radio-disabled, 'input-fill');
|
|
94
|
+
border-color: map.get($radio-disabled, 'input-border-color');
|
|
95
|
+
cursor: not-allowed;
|
|
96
|
+
|
|
97
|
+
&::after {
|
|
98
|
+
cursor: not-allowed;
|
|
99
|
+
background-color: map.get($radio-disabled, 'icon-color');
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
& + .#{$namespace}-radio__label {
|
|
103
|
+
cursor: not-allowed;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
&.is-checked {
|
|
108
|
+
.#{$namespace}-radio__inner {
|
|
109
|
+
background-color: map.get($radio-disabled, 'checked-input-fill');
|
|
110
|
+
border-color: map.get($radio-disabled, 'checked-input-border-color');
|
|
111
|
+
|
|
112
|
+
&::after {
|
|
113
|
+
background-color: map.get($radio-disabled, 'checked-icon-color');
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
& + span.#{$namespace}-radio__label {
|
|
119
|
+
color: getCssVar('text-color', 'placeholder');
|
|
120
|
+
cursor: not-allowed;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
@include when(checked) {
|
|
125
|
+
.#{$namespace}-radio__inner {
|
|
126
|
+
border-color: map.get($radio-checked, 'input-border-color');
|
|
127
|
+
background: map.get($radio-checked, 'icon-color');
|
|
128
|
+
|
|
129
|
+
&::after {
|
|
130
|
+
background-color: getCssVar('color-white');
|
|
131
|
+
transform: translate(-50%, -50%) scale(1);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
& + .#{$namespace}-radio__label {
|
|
136
|
+
color: map.get($radio-checked, 'text-color');
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
@include when(focus) {
|
|
141
|
+
.#{$namespace}-radio__inner {
|
|
142
|
+
border-color: getCssVar('radio-input-border-color-hover');
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
@include e(inner) {
|
|
148
|
+
border: getCssVar('radio-input-border');
|
|
149
|
+
border-radius: getCssVar('radio-input-border-radius');
|
|
150
|
+
width: getCssVar('radio-input-width');
|
|
151
|
+
height: getCssVar('radio-input-height');
|
|
152
|
+
background-color: getCssVar('radio-input-bg-color');
|
|
153
|
+
position: relative;
|
|
154
|
+
cursor: pointer;
|
|
155
|
+
display: inline-block;
|
|
156
|
+
box-sizing: border-box;
|
|
157
|
+
transition: all 0.3s;
|
|
158
|
+
|
|
159
|
+
&:hover {
|
|
160
|
+
border-color: getCssVar('radio-input-border-color-hover');
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
&::after {
|
|
164
|
+
width: 4px;
|
|
165
|
+
height: 4px;
|
|
166
|
+
border-radius: getCssVar('radio-input-border-radius');
|
|
167
|
+
content: '';
|
|
168
|
+
position: absolute;
|
|
169
|
+
left: 50%;
|
|
170
|
+
top: 50%;
|
|
171
|
+
transform: translate(-50%, -50%) scale(0);
|
|
172
|
+
transition: transform 0.15s ease-in;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
@include e(original) {
|
|
177
|
+
opacity: 0;
|
|
178
|
+
outline: none;
|
|
179
|
+
position: absolute;
|
|
180
|
+
z-index: -1;
|
|
181
|
+
top: 0;
|
|
182
|
+
left: 0;
|
|
183
|
+
right: 0;
|
|
184
|
+
bottom: 0;
|
|
185
|
+
margin: 0;
|
|
186
|
+
|
|
187
|
+
&:focus-visible {
|
|
188
|
+
& + .#{$namespace}-radio__inner {
|
|
189
|
+
outline: 2px solid getCssVar('radio-input-border-color-hover');
|
|
190
|
+
outline-offset: 1px;
|
|
191
|
+
border-radius: getCssVar('radio-input-border-radius');
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
&:focus:not(:focus-visible):not(.is-focus):not(:active):not(.is-disabled) {
|
|
197
|
+
/*获得焦点时 样式提醒*/
|
|
198
|
+
.#{$namespace}-radio__inner {
|
|
199
|
+
box-shadow: 0 0 2px 2px getCssVar('radio-input-border-color-hover');
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
@include e(label) {
|
|
204
|
+
font-size: getCssVar('radio-font-size');
|
|
205
|
+
padding-left: 8px;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
@each $size in (large, small) {
|
|
209
|
+
&.#{$namespace}-radio--#{$size} {
|
|
210
|
+
@include e(label) {
|
|
211
|
+
font-size: map.get($radio-font-size, $size);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
@include e(inner) {
|
|
215
|
+
width: map.get($radio-font-size, $size);
|
|
216
|
+
height: map.get($radio-font-size, $size);
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
|
|
3
|
+
@use 'mixins/mixins' as *;
|
|
4
|
+
@use 'mixins/var' as *;
|
|
5
|
+
@use 'common/var' as *;
|
|
6
|
+
|
|
7
|
+
$rate-height: () !default;
|
|
8
|
+
$rate-height: map.merge(
|
|
9
|
+
(
|
|
10
|
+
'large': 40px,
|
|
11
|
+
'default': 32px,
|
|
12
|
+
'small': 24px,
|
|
13
|
+
),
|
|
14
|
+
$rate-height
|
|
15
|
+
);
|
|
16
|
+
|
|
17
|
+
$rate-size: () !default;
|
|
18
|
+
$rate-size: map.merge(
|
|
19
|
+
(
|
|
20
|
+
'small': 14px,
|
|
21
|
+
),
|
|
22
|
+
$rate-size
|
|
23
|
+
);
|
|
24
|
+
|
|
25
|
+
@include b(rate) {
|
|
26
|
+
@include set-component-css-var('rate', $rate);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
@include b(rate) {
|
|
30
|
+
display: inline-flex;
|
|
31
|
+
align-items: center;
|
|
32
|
+
height: map.get($rate-height, 'default');
|
|
33
|
+
|
|
34
|
+
&:focus,
|
|
35
|
+
&:active {
|
|
36
|
+
outline: none;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&:focus-visible {
|
|
40
|
+
@include e(item) {
|
|
41
|
+
& .#{bem('rate', 'icon')} {
|
|
42
|
+
@include when(focus-visible) {
|
|
43
|
+
outline: 2px solid getCssVar('rate', 'outline-color');
|
|
44
|
+
transition:
|
|
45
|
+
outline-offset 0s,
|
|
46
|
+
outline 0s;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
@include e(item) {
|
|
53
|
+
cursor: pointer;
|
|
54
|
+
display: inline-block;
|
|
55
|
+
position: relative;
|
|
56
|
+
font-size: 0;
|
|
57
|
+
vertical-align: middle;
|
|
58
|
+
color: getCssVar('rate-void-color');
|
|
59
|
+
line-height: normal;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
& .#{bem('rate', 'icon')} {
|
|
63
|
+
position: relative;
|
|
64
|
+
display: inline-block;
|
|
65
|
+
font-size: getCssVar('rate-icon-size');
|
|
66
|
+
margin-right: getCssVar('rate-icon-margin');
|
|
67
|
+
transition: getCssVar('transition-duration');
|
|
68
|
+
|
|
69
|
+
&.hover {
|
|
70
|
+
transform: scale(1.15);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.path2 {
|
|
74
|
+
position: absolute;
|
|
75
|
+
left: 0;
|
|
76
|
+
top: 0;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
@include when(active) {
|
|
80
|
+
color: getCssVar('rate', 'fill-color');
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
@include e(decimal) {
|
|
85
|
+
position: absolute;
|
|
86
|
+
top: 0;
|
|
87
|
+
left: 0;
|
|
88
|
+
display: inline-block;
|
|
89
|
+
overflow: hidden;
|
|
90
|
+
color: getCssVar('rate', 'fill-color');
|
|
91
|
+
|
|
92
|
+
@include m('box') {
|
|
93
|
+
position: absolute;
|
|
94
|
+
top: 0;
|
|
95
|
+
left: 0;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
@include e(text) {
|
|
100
|
+
font-size: getCssVar('rate-font-size');
|
|
101
|
+
vertical-align: middle;
|
|
102
|
+
color: getCssVar('rate', 'text-color');
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
@each $size in (large, small) {
|
|
106
|
+
@include m($size) {
|
|
107
|
+
height: map.get($rate-height, $size);
|
|
108
|
+
|
|
109
|
+
& .#{bem('rate', 'icon')} {
|
|
110
|
+
font-size: map.get($rate-size, $size);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
@include when(disabled) {
|
|
116
|
+
@include e(item) {
|
|
117
|
+
cursor: not-allowed;
|
|
118
|
+
color: getCssVar('rate', 'disabled-void-color');
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
@use 'common/var' as *;
|
|
2
|
+
@use 'mixins/mixins' as *;
|
|
3
|
+
|
|
4
|
+
body {
|
|
5
|
+
font-family:
|
|
6
|
+
Inter, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB',
|
|
7
|
+
'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
|
|
8
|
+
font-weight: 400;
|
|
9
|
+
font-size: getCssVar('font-size', 'base');
|
|
10
|
+
color: getCssVar('text-color', 'primary');
|
|
11
|
+
-webkit-font-smoothing: antialiased;
|
|
12
|
+
-moz-osx-font-smoothing: grayscale;
|
|
13
|
+
-webkit-tap-highlight-color: transparent;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
input,
|
|
17
|
+
textarea,
|
|
18
|
+
button {
|
|
19
|
+
font-family: inherit;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
a {
|
|
23
|
+
color: getCssVar('color', 'primary');
|
|
24
|
+
text-decoration: none;
|
|
25
|
+
|
|
26
|
+
&:hover,
|
|
27
|
+
&:focus {
|
|
28
|
+
color: getCssVar('color-primary', 'light-3');
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&:active {
|
|
32
|
+
color: getCssVar('color-primary', 'dark-2');
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
h1,
|
|
37
|
+
h2,
|
|
38
|
+
h3,
|
|
39
|
+
h4,
|
|
40
|
+
h5,
|
|
41
|
+
h6 {
|
|
42
|
+
color: getCssVar('text-color', 'regular');
|
|
43
|
+
font-weight: inherit;
|
|
44
|
+
|
|
45
|
+
&:first-child {
|
|
46
|
+
margin-top: 0;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&:last-child {
|
|
50
|
+
margin-bottom: 0;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
h1 {
|
|
55
|
+
font-size: calc(getCssVar('font-size', 'base') + 6px);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
h2 {
|
|
59
|
+
font-size: calc(getCssVar('font-size', 'base') + 4px);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
h3 {
|
|
63
|
+
font-size: calc(getCssVar('font-size', 'base') + 2px);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
h4,
|
|
67
|
+
h5,
|
|
68
|
+
h6,
|
|
69
|
+
p {
|
|
70
|
+
font-size: inherit;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
p {
|
|
74
|
+
line-height: 1.8;
|
|
75
|
+
|
|
76
|
+
&:first-child {
|
|
77
|
+
margin-top: 0;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
&:last-child {
|
|
81
|
+
margin-bottom: 0;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
sup,
|
|
86
|
+
sub {
|
|
87
|
+
font-size: calc(getCssVar('font-size', 'base') - 1px);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
small {
|
|
91
|
+
font-size: calc(getCssVar('font-size', 'base') - 2px);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
hr {
|
|
95
|
+
margin-top: 20px;
|
|
96
|
+
margin-bottom: 20px;
|
|
97
|
+
border: 0;
|
|
98
|
+
border-top: 1px solid getCssVar('border-color', 'lighter');
|
|
99
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
@use 'mixins/mixins' as *;
|
|
2
|
+
@use 'mixins/var' as *;
|
|
3
|
+
@use 'common/var' as *;
|
|
4
|
+
|
|
5
|
+
@include b(result) {
|
|
6
|
+
@include set-component-css-var('result', $result);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
@include b(result) {
|
|
10
|
+
display: flex;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
align-items: center;
|
|
13
|
+
flex-direction: column;
|
|
14
|
+
text-align: center;
|
|
15
|
+
box-sizing: border-box;
|
|
16
|
+
padding: getCssVar('result-padding');
|
|
17
|
+
|
|
18
|
+
@include e(icon) {
|
|
19
|
+
svg {
|
|
20
|
+
width: getCssVar('result-icon-font-size');
|
|
21
|
+
height: getCssVar('result-icon-font-size');
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@include e(title) {
|
|
26
|
+
margin-top: getCssVar('result-title-margin-top');
|
|
27
|
+
|
|
28
|
+
p {
|
|
29
|
+
margin: 0;
|
|
30
|
+
font-size: getCssVar('result-title-font-size');
|
|
31
|
+
color: getCssVar('text-color', 'primary');
|
|
32
|
+
line-height: 1.3;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@include e(subtitle) {
|
|
37
|
+
margin-top: getCssVar('result-subtitle-margin-top');
|
|
38
|
+
|
|
39
|
+
p {
|
|
40
|
+
margin: 0;
|
|
41
|
+
font-size: getCssVar('font-size', 'base');
|
|
42
|
+
color: getCssVar('text-color', 'regular');
|
|
43
|
+
line-height: 1.3;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
@include e(extra) {
|
|
48
|
+
margin-top: getCssVar('result-extra-margin-top');
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@each $type in $types {
|
|
52
|
+
.icon-#{$type} {
|
|
53
|
+
@include css-var-from-global(('result', 'color'), ('color', $type));
|
|
54
|
+
color: getCssVar('result-color');
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
@use 'common/var' as *;
|
|
2
|
+
@use 'mixins/mixins' as *;
|
|
3
|
+
|
|
4
|
+
@include b(row) {
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-wrap: wrap;
|
|
7
|
+
position: relative;
|
|
8
|
+
box-sizing: border-box;
|
|
9
|
+
|
|
10
|
+
@include when(justify-center) {
|
|
11
|
+
justify-content: center;
|
|
12
|
+
}
|
|
13
|
+
@include when(justify-end) {
|
|
14
|
+
justify-content: flex-end;
|
|
15
|
+
}
|
|
16
|
+
@include when(justify-space-between) {
|
|
17
|
+
justify-content: space-between;
|
|
18
|
+
}
|
|
19
|
+
@include when(justify-space-around) {
|
|
20
|
+
justify-content: space-around;
|
|
21
|
+
}
|
|
22
|
+
@include when(justify-space-evenly) {
|
|
23
|
+
justify-content: space-evenly;
|
|
24
|
+
}
|
|
25
|
+
@include when(align-top) {
|
|
26
|
+
align-items: flex-start;
|
|
27
|
+
}
|
|
28
|
+
@include when(align-middle) {
|
|
29
|
+
align-items: center;
|
|
30
|
+
}
|
|
31
|
+
@include when(align-bottom) {
|
|
32
|
+
align-items: flex-end;
|
|
33
|
+
}
|
|
34
|
+
}
|