iov-design 2.15.55 → 2.15.57

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.
Files changed (38) hide show
  1. package/lib/index.js +1 -1
  2. package/lib/input.js +4 -0
  3. package/lib/iov-design.common.js +121 -56
  4. package/lib/select.js +89 -50
  5. package/lib/switch.js +21 -4
  6. package/lib/tabs.js +6 -1
  7. package/lib/theme-chalk/autocomplete.css +1 -1
  8. package/lib/theme-chalk/base.css +1 -1
  9. package/lib/theme-chalk/cascader.css +1 -1
  10. package/lib/theme-chalk/date-picker.css +1 -1
  11. package/lib/theme-chalk/index.css +1 -1
  12. package/lib/theme-chalk/input-number.css +1 -1
  13. package/lib/theme-chalk/input.css +1 -1
  14. package/lib/theme-chalk/iovfont.css +1 -1
  15. package/lib/theme-chalk/message-box.css +1 -1
  16. package/lib/theme-chalk/pagination.css +1 -1
  17. package/lib/theme-chalk/select.css +1 -1
  18. package/lib/theme-chalk/slider.css +1 -1
  19. package/lib/theme-chalk/switch.css +1 -1
  20. package/lib/theme-chalk/table-column.css +1 -1
  21. package/lib/theme-chalk/table.css +1 -1
  22. package/lib/theme-chalk/tabs.css +1 -1
  23. package/lib/theme-chalk/tag.css +1 -1
  24. package/lib/theme-chalk/time-picker.css +1 -1
  25. package/lib/theme-chalk/transfer.css +1 -1
  26. package/package.json +1 -1
  27. package/packages/input/src/input.vue +5 -1
  28. package/packages/select/src/select.vue +34 -5
  29. package/packages/switch/src/component.vue +14 -6
  30. package/packages/tabs/src/tabs.vue +6 -1
  31. package/packages/theme-chalk/src/cascader.scss +213 -213
  32. package/packages/theme-chalk/src/input.scss +1 -0
  33. package/packages/theme-chalk/src/iovfont.scss +37 -4
  34. package/packages/theme-chalk/src/switch.scss +210 -39
  35. package/packages/theme-chalk/src/table.scss +2 -1
  36. package/packages/theme-chalk/src/tabs.scss +68 -4
  37. package/packages/theme-chalk/src/tag.scss +1 -1
  38. package/src/index.js +1 -1
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div
3
3
  class="el-switch"
4
- :class="{ 'is-disabled': switchDisabled, 'is-checked': checked }"
4
+ :class="[ size ? 'el-switch--' + size : '', type ? 'el-switch--' + type : '', {'is-disabled': switchDisabled}, {'is-checked': checked} ]"
5
5
  role="switch"
6
6
  :aria-checked="checked"
7
7
  :aria-disabled="switchDisabled"
@@ -20,15 +20,15 @@
20
20
  @keydown.enter="switchValue"
21
21
  >
22
22
  <span
23
- :class="['el-switch__label', 'el-switch__label--left', !checked ? 'is-active' : '']"
23
+ :class="['el-switch__label', 'el-switch__label--left', inactiveIconClass ? 'el-switch__label--left-icon' : '', inactiveText ? 'el-switch__label--left-text' : '', !checked ? 'is-active' : '']"
24
24
  v-if="inactiveIconClass || inactiveText">
25
25
  <i :class="[inactiveIconClass]" v-if="inactiveIconClass"></i>
26
26
  <span v-if="!inactiveIconClass && inactiveText" :aria-hidden="checked">{{ inactiveText }}</span>
27
27
  </span>
28
- <span class="el-switch__core" ref="core" :style="{ 'width': coreWidth + 'px' }">
28
+ <span class="el-switch__core" ref="core" :style="{ 'width': coreWidth > 0 ? coreWidth + 'px' : '' }">
29
29
  </span>
30
30
  <span
31
- :class="['el-switch__label', 'el-switch__label--right', checked ? 'is-active' : '']"
31
+ :class="['el-switch__label', 'el-switch__label--right', activeIconClass ? 'el-switch__label--right-icon' : '', activeText ? 'el-switch__label--right-text' : '', checked ? 'is-active' : '']"
32
32
  v-if="activeIconClass || activeText">
33
33
  <i :class="[activeIconClass]" v-if="activeIconClass"></i>
34
34
  <span v-if="!activeIconClass && activeText" :aria-hidden="!checked">{{ activeText }}</span>
@@ -59,7 +59,7 @@
59
59
  },
60
60
  width: {
61
61
  type: Number,
62
- default: 40
62
+ default: 0
63
63
  },
64
64
  activeIconClass: {
65
65
  type: String,
@@ -95,6 +95,14 @@
95
95
  type: Boolean,
96
96
  default: true
97
97
  },
98
+ size: {
99
+ type: String,
100
+ default: ''
101
+ },
102
+ type: {
103
+ type: String,
104
+ default: 'circle'
105
+ },
98
106
  id: String
99
107
  },
100
108
  data() {
@@ -164,7 +172,7 @@
164
172
  },
165
173
  mounted() {
166
174
  /* istanbul ignore if */
167
- this.coreWidth = this.width || 40;
175
+ this.coreWidth = this.width;
168
176
  if (this.activeColor || this.inactiveColor) {
169
177
  this.setBackgroundColor();
170
178
  }
@@ -21,7 +21,11 @@
21
21
  default: 'top'
22
22
  },
23
23
  beforeLeave: Function,
24
- stretch: Boolean
24
+ stretch: Boolean,
25
+ primary: {
26
+ type: Boolean,
27
+ default: false
28
+ }
25
29
  },
26
30
 
27
31
  provide() {
@@ -167,6 +171,7 @@
167
171
  'el-tabs': true,
168
172
  'el-tabs--normal': !type,
169
173
  'el-tabs--card': type === 'card',
174
+ 'el-tabs--card-primary': type === 'card' && this.primary,
170
175
  'el-tabs--capsule': type === 'capsule',
171
176
  [`el-tabs--${size}`]: size,
172
177
  [`el-tabs--${tabPosition}`]: true,
@@ -1,213 +1,213 @@
1
- @import "mixins/mixins";
2
- @import "common/var";
3
- @import "./input";
4
- @import "./popper";
5
- @import "./tag";
6
- @import "./cascader-panel";
7
-
8
- @include b(cascader) {
9
- display: block;
10
- position: relative;
11
- font-size: $--input-font-size;
12
- line-height: $--input-height;
13
-
14
- &:not(.is-disabled):hover {
15
- .el-input__inner {
16
- cursor: pointer;
17
- border-color: $--input-hover-border;
18
- }
19
- }
20
-
21
- .el-input {
22
- cursor: pointer;
23
-
24
- .el-input__suffix {
25
- right: 8px;
26
- }
27
- .el-input__inner {
28
- text-overflow: ellipsis;
29
-
30
- &:focus {
31
- border-color: $--input-focus-border;
32
- }
33
- }
34
-
35
- .iov-icon-arrow-up {
36
- padding-right: 0;
37
- color: $--select-input-color;
38
- font-size: $--select-icon-size;
39
- transition: transform .3s;
40
- transform: rotateZ(180deg);
41
-
42
- @include when(reverse) {
43
- transform: rotateZ(0deg);
44
- }
45
- }
46
-
47
- .el-icon-circle-close:hover {
48
- color: $--input-clear-hover-color;
49
- }
50
-
51
- @include when(focus) {
52
- .el-input__inner {
53
- border-color: $--input-focus-border;
54
- }
55
- }
56
- }
57
-
58
- .el-tag {
59
- height: $--input-height - 8px;
60
- line-height: $--input-height - 8px;
61
- }
62
-
63
- @include m(medium) {
64
- font-size: $--input-medium-font-size;
65
- line-height: $--input-medium-height;
66
- .el-tag--medium {
67
- height: $--input-medium-height - 8px;
68
- line-height: $--input-medium-height - 8px;
69
- }
70
- }
71
-
72
- @include m(small) {
73
- font-size: $--input-small-font-size;
74
- line-height: $--input-small-height;
75
- .el-tag--small {
76
- height: $--input-small-height - 8px;
77
- line-height: $--input-small-height - 8px;
78
- }
79
- }
80
-
81
- @include m(mini) {
82
- font-size: $--input-mini-font-size;
83
- line-height: $--input-mini-height;
84
- .el-tag--mini {
85
- height: $--input-mini-height - 8px;
86
- line-height: $--input-mini-height - 8px;
87
- }
88
- }
89
-
90
- @include when(disabled) {
91
- .el-cascader__label {
92
- z-index: #{$--index-normal + 1};
93
- color: $--disabled-color-base;
94
- }
95
- }
96
-
97
- @include e(dropdown) {
98
- margin: 4px 0;
99
- font-size: $--cascader-menu-font-size;
100
- background: $--cascader-menu-fill;
101
- border: $--cascader-menu-border;
102
- border-radius: $--cascader-menu-radius;
103
- box-shadow: $--cascader-menu-shadow;
104
- .popper__arrow {
105
- display: none;
106
- }
107
- }
108
-
109
- @include e(tags) {
110
- position: absolute;
111
- left: 0;
112
- right: 30px;
113
- top: 50%;
114
- transform: translateY(-50%);
115
- display: flex;
116
- flex-wrap: wrap;
117
- line-height: normal;
118
- text-align: left;
119
- box-sizing: border-box;
120
- z-index: 3;
121
- align-items: center;
122
- // pointer-events: none;
123
-
124
- .el-tag {
125
- display: inline-flex;
126
- align-items: center;
127
- max-width: 100%;
128
- margin: 2px 6px 2px 0;
129
- text-overflow: ellipsis;
130
- color: $--color-text-6;
131
- pointer-events: auto;
132
-
133
- &.is-disabled {
134
- color: $--color-text-3;
135
- background: $--color-fill-3;
136
- }
137
-
138
- &:not(.is-hit) {
139
- border-color: transparent;
140
- }
141
-
142
- > span {
143
- flex: 1;
144
- overflow: hidden;
145
- text-overflow: ellipsis;
146
- }
147
-
148
- .iov-icon-close {
149
- flex: none;
150
- }
151
- }
152
- }
153
-
154
- @include e(suggestion-panel) {
155
- border-radius: $--cascader-menu-radius;
156
- }
157
-
158
- @include e(suggestion-list) {
159
- max-height: 204px;
160
- margin: 0;
161
- padding: 4px;
162
- font-size: $--font-size-base;
163
- color: $--cascader-menu-font-color;
164
- text-align: center;
165
- }
166
-
167
- @include e(suggestion-item) {
168
- display: flex;
169
- justify-content: space-between;
170
- align-items: center;
171
- height: 32px;
172
- padding: 0 12px;
173
- text-align: left;
174
- outline: none;
175
- cursor: pointer;
176
- border-radius: 2px;
177
-
178
- &:hover, &:focus {
179
- background: $--cascader-node-background-hover;
180
- }
181
-
182
- &.is-checked {
183
- color: $--cascader-menu-selected-font-color;
184
- font-weight: 500;
185
- background: $--color-primary-1;
186
- }
187
-
188
- > span {
189
- margin-right: 10px;
190
- }
191
- }
192
-
193
- @include e(empty-text) {
194
- margin: 8px 0;
195
- color: $--cascader-color-empty;
196
- }
197
-
198
- @include e(search-input) {
199
- flex: 1;
200
- height: 24px;
201
- min-width: 10px;
202
- margin: 2px 0;
203
- padding: 0;
204
- color: $--cascader-menu-font-color;
205
- border: none;
206
- outline: none;
207
- box-sizing: border-box;
208
-
209
- &::placeholder {
210
- color: $--color-text-placeholder;
211
- }
212
- }
213
- }
1
+ @import "mixins/mixins";
2
+ @import "common/var";
3
+ @import "./input";
4
+ @import "./popper";
5
+ @import "./tag";
6
+ @import "./cascader-panel";
7
+
8
+ @include b(cascader) {
9
+ display: block;
10
+ position: relative;
11
+ font-size: $--input-font-size;
12
+ line-height: $--input-height;
13
+
14
+ &:not(.is-disabled):hover {
15
+ .el-input__inner {
16
+ cursor: pointer;
17
+ border-color: $--input-hover-border;
18
+ }
19
+ }
20
+
21
+ .el-input {
22
+ cursor: pointer;
23
+
24
+ .el-input__suffix {
25
+ right: 8px;
26
+ }
27
+ .el-input__inner {
28
+ text-overflow: ellipsis;
29
+
30
+ &:focus {
31
+ border-color: $--input-focus-border;
32
+ }
33
+ }
34
+
35
+ .iov-icon-arrow-up {
36
+ padding-right: 0;
37
+ color: $--color-fill-5;
38
+ font-size: $--select-icon-size;
39
+ transition: transform .3s;
40
+ transform: rotateZ(180deg);
41
+
42
+ @include when(reverse) {
43
+ transform: rotateZ(0deg);
44
+ }
45
+ }
46
+
47
+ .el-icon-circle-close:hover {
48
+ color: $--input-clear-hover-color;
49
+ }
50
+
51
+ @include when(focus) {
52
+ .el-input__inner {
53
+ border-color: $--input-focus-border;
54
+ }
55
+ }
56
+ }
57
+
58
+ .el-tag {
59
+ height: $--input-height - 8px;
60
+ line-height: $--input-height - 8px;
61
+ }
62
+
63
+ @include m(medium) {
64
+ font-size: $--input-medium-font-size;
65
+ line-height: $--input-medium-height;
66
+ .el-tag--medium {
67
+ height: $--input-medium-height - 8px;
68
+ line-height: $--input-medium-height - 8px;
69
+ }
70
+ }
71
+
72
+ @include m(small) {
73
+ font-size: $--input-small-font-size;
74
+ line-height: $--input-small-height;
75
+ .el-tag--small {
76
+ height: $--input-small-height - 8px;
77
+ line-height: $--input-small-height - 8px;
78
+ }
79
+ }
80
+
81
+ @include m(mini) {
82
+ font-size: $--input-mini-font-size;
83
+ line-height: $--input-mini-height;
84
+ .el-tag--mini {
85
+ height: $--input-mini-height - 8px;
86
+ line-height: $--input-mini-height - 8px;
87
+ }
88
+ }
89
+
90
+ @include when(disabled) {
91
+ .el-cascader__label {
92
+ z-index: #{$--index-normal + 1};
93
+ color: $--disabled-color-base;
94
+ }
95
+ }
96
+
97
+ @include e(dropdown) {
98
+ margin: 4px 0;
99
+ font-size: $--cascader-menu-font-size;
100
+ background: $--cascader-menu-fill;
101
+ border: $--cascader-menu-border;
102
+ border-radius: $--cascader-menu-radius;
103
+ box-shadow: $--cascader-menu-shadow;
104
+ .popper__arrow {
105
+ display: none;
106
+ }
107
+ }
108
+
109
+ @include e(tags) {
110
+ position: absolute;
111
+ left: 0;
112
+ right: 30px;
113
+ top: 50%;
114
+ transform: translateY(-50%);
115
+ display: flex;
116
+ flex-wrap: wrap;
117
+ line-height: normal;
118
+ text-align: left;
119
+ box-sizing: border-box;
120
+ z-index: 3;
121
+ align-items: center;
122
+ // pointer-events: none;
123
+
124
+ .el-tag {
125
+ display: inline-flex;
126
+ align-items: center;
127
+ max-width: 100%;
128
+ margin: 2px 6px 2px 0;
129
+ text-overflow: ellipsis;
130
+ color: $--color-text-6;
131
+ pointer-events: auto;
132
+
133
+ &.is-disabled {
134
+ color: $--color-text-3;
135
+ background: $--color-fill-3;
136
+ }
137
+
138
+ &:not(.is-hit) {
139
+ border-color: transparent;
140
+ }
141
+
142
+ > span {
143
+ flex: 1;
144
+ overflow: hidden;
145
+ text-overflow: ellipsis;
146
+ }
147
+
148
+ .iov-icon-close {
149
+ flex: none;
150
+ }
151
+ }
152
+ }
153
+
154
+ @include e(suggestion-panel) {
155
+ border-radius: $--cascader-menu-radius;
156
+ }
157
+
158
+ @include e(suggestion-list) {
159
+ max-height: 204px;
160
+ margin: 0;
161
+ padding: 4px;
162
+ font-size: $--font-size-base;
163
+ color: $--cascader-menu-font-color;
164
+ text-align: center;
165
+ }
166
+
167
+ @include e(suggestion-item) {
168
+ display: flex;
169
+ justify-content: space-between;
170
+ align-items: center;
171
+ height: 32px;
172
+ padding: 0 12px;
173
+ text-align: left;
174
+ outline: none;
175
+ cursor: pointer;
176
+ border-radius: 2px;
177
+
178
+ &:hover, &:focus {
179
+ background: $--cascader-node-background-hover;
180
+ }
181
+
182
+ &.is-checked {
183
+ color: $--cascader-menu-selected-font-color;
184
+ font-weight: 500;
185
+ background: $--color-primary-1;
186
+ }
187
+
188
+ > span {
189
+ margin-right: 10px;
190
+ }
191
+ }
192
+
193
+ @include e(empty-text) {
194
+ margin: 8px 0;
195
+ color: $--cascader-color-empty;
196
+ }
197
+
198
+ @include e(search-input) {
199
+ flex: 1;
200
+ height: 24px;
201
+ min-width: 10px;
202
+ margin: 2px 0;
203
+ padding: 0;
204
+ color: $--cascader-menu-font-color;
205
+ border: none;
206
+ outline: none;
207
+ box-sizing: border-box;
208
+
209
+ &::placeholder {
210
+ color: $--color-text-placeholder;
211
+ }
212
+ }
213
+ }
@@ -244,6 +244,7 @@
244
244
 
245
245
  .el-input__icon {
246
246
  cursor: not-allowed;
247
+ color: $--color-fill-4;
247
248
  }
248
249
  .el-input__prefix,
249
250
  .el-input__suffix,
@@ -1,8 +1,8 @@
1
1
  @font-face {
2
2
  font-family: 'iovfont'; /* Project id 4466910 */
3
- src: url('//at.alicdn.com/t/c/font_4466910_8y5kjsv7pqg.woff2?t=1750820266142') format('woff2'),
4
- url('//at.alicdn.com/t/c/font_4466910_8y5kjsv7pqg.woff?t=1750820266142') format('woff'),
5
- url('//at.alicdn.com/t/c/font_4466910_8y5kjsv7pqg.ttf?t=1750820266142') format('truetype');
3
+ src: url('//at.alicdn.com/t/c/font_4466910_qnw5e0xxy7.woff2?t=1753354243540') format('woff2'),
4
+ url('//at.alicdn.com/t/c/font_4466910_qnw5e0xxy7.woff?t=1753354243540') format('woff'),
5
+ url('//at.alicdn.com/t/c/font_4466910_qnw5e0xxy7.ttf?t=1753354243540') format('truetype');
6
6
  }
7
7
 
8
8
  [class^="iov-icon-"], [class*=" iov-icon-"] {
@@ -36,6 +36,39 @@
36
36
  }
37
37
  }
38
38
 
39
+ .iov-icon-bottle:before {
40
+ content: "\e6fe";
41
+ }
42
+
43
+ .iov-icon-line-github:before {
44
+ content: "\e6f8";
45
+ }
46
+
47
+
48
+ .iov-icon-sun:before {
49
+ content: "\e6f9";
50
+ }
51
+
52
+ .iov-icon-panel:before {
53
+ content: "\e6fa";
54
+ }
55
+
56
+ .iov-icon-cube:before {
57
+ content: "\e6fb";
58
+ }
59
+
60
+ .iov-icon-github:before {
61
+ content: "\e6fc";
62
+ }
63
+
64
+ .iov-icon-menu-fold-right:before {
65
+ content: "\e6fd";
66
+ }
67
+
68
+ .iov-icon-cdkey:before {
69
+ content: "\e6f7";
70
+ }
71
+
39
72
  .iov-icon-circle-minus:before {
40
73
  content: "\e6f6";
41
74
  }
@@ -632,7 +665,7 @@
632
665
  content: "\e66a";
633
666
  }
634
667
 
635
- .iov-icon-menu-fold:before {
668
+ .iov-icon-menu-fold-left:before {
636
669
  content: "\e66b";
637
670
  }
638
671