kui-vue 3.6.5 → 3.6.8

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 (187) hide show
  1. package/components/alert/alert.jsx +26 -7
  2. package/components/alert/demo/basic.md +4 -4
  3. package/components/alert/demo/icon.md +15 -6
  4. package/components/alert/styles/index.less +42 -14
  5. package/components/avatar/styles/index.less +5 -5
  6. package/components/backtop/styles/index.less +10 -14
  7. package/components/badge/styles/index.less +7 -13
  8. package/components/breadcrumb/index.md +7 -6
  9. package/components/breadcrumb/styles/index.less +7 -21
  10. package/components/button/demo/color.md +0 -1
  11. package/components/button/demo/disabled.md +6 -0
  12. package/components/button/demo/light.md +1 -1
  13. package/components/button/styles/index.less +165 -111
  14. package/components/card/card.jsx +1 -1
  15. package/components/card/demo/basic.md +1 -1
  16. package/components/card/demo/border.md +1 -1
  17. package/components/card/demo/notitle.md +1 -1
  18. package/components/card/styles/index.less +5 -4
  19. package/components/carousel/carousel.jsx +186 -175
  20. package/components/carousel/styles/index.less +11 -16
  21. package/components/checkbox/checkbox.jsx +2 -2
  22. package/components/checkbox/styles/index.less +21 -29
  23. package/components/collapse/styles/index.less +7 -11
  24. package/components/colorPicker/styles/index.less +83 -71
  25. package/components/config/context.js +21 -0
  26. package/components/config/index.js +10 -2
  27. package/components/datePicker/datepicker.jsx +6 -7
  28. package/components/datePicker/styles/index.less +54 -57
  29. package/components/descriptions/styles/index.less +8 -17
  30. package/components/divider/styles/index.less +20 -18
  31. package/components/drawer/styles/animal.less +0 -1
  32. package/components/drawer/styles/index.less +8 -11
  33. package/components/dropdown/styles/index.less +26 -34
  34. package/components/empty/index.md +3 -2
  35. package/components/empty/styles/index.less +2 -2
  36. package/components/flex/demo/align.md +1 -1
  37. package/components/flex/demo/basic.md +1 -2
  38. package/components/flex/index.md +1 -1
  39. package/components/form/demo/dynamicvalid.md +1 -3
  40. package/components/form/demo/info.md +22 -12
  41. package/components/form/demo/valid.md +6 -6
  42. package/components/form/demo/withmodal.md +2 -2
  43. package/components/form/styles/index.less +10 -11
  44. package/components/grid/index.md +4 -1
  45. package/components/grid/styles/index.less +1 -1
  46. package/components/icon/demo/search.vue +44 -21
  47. package/components/icon/index.md +1 -1
  48. package/components/icon/styles/index.less +7 -8
  49. package/components/image/index.md +7 -1
  50. package/components/image/preview.jsx +17 -4
  51. package/components/image/styles/index.less +36 -42
  52. package/components/index.js +9 -9
  53. package/components/input/demo/icon.md +0 -1
  54. package/components/input/demo/suffix.md +2 -7
  55. package/components/input/input.jsx +31 -29
  56. package/components/input/inputBox.jsx +13 -0
  57. package/components/input/inputGroup.jsx +2 -0
  58. package/components/input/styles/index.less +47 -53
  59. package/components/input/textarea.jsx +1 -1
  60. package/components/inputNumber/demo/basic.md +3 -3
  61. package/components/inputNumber/demo/ffix.md +2 -2
  62. package/components/inputNumber/inputNumber.jsx +2 -2
  63. package/components/inputNumber/styles/index.less +36 -42
  64. package/components/layout/demo/basic.md +5 -5
  65. package/components/layout/demo/info.md +1 -34
  66. package/components/layout/demo/layout1.md +7 -7
  67. package/components/layout/demo/layout2.md +6 -7
  68. package/components/layout/demo/layout3.md +5 -5
  69. package/components/layout/demo/layout4.md +12 -8
  70. package/components/layout/demo/layout5.md +6 -2
  71. package/components/layout/styles/index.less +1 -18
  72. package/components/loading/demo/info.md +3 -3
  73. package/components/loading/styles/index.less +31 -31
  74. package/components/menu/index.md +14 -3
  75. package/components/menu/menu.jsx +1 -1
  76. package/components/menu/recursiveMenu.jsx +1 -0
  77. package/components/menu/styles/index.less +43 -55
  78. package/components/message/demo/basic.md +0 -7
  79. package/components/message/index.js +0 -4
  80. package/components/message/index.md +0 -1
  81. package/components/message/inner.jsx +15 -2
  82. package/components/message/styles/index.less +12 -17
  83. package/components/modal/demo/confirm.md +6 -6
  84. package/components/modal/demo/global.md +0 -15
  85. package/components/modal/demo/info.md +0 -1
  86. package/components/modal/index.js +5 -34
  87. package/components/modal/index.md +1 -2
  88. package/components/modal/modal.jsx +2 -1
  89. package/components/modal/styles/index.less +14 -21
  90. package/components/notice/demo/basic.md +0 -9
  91. package/components/notice/demo/close.md +4 -0
  92. package/components/notice/demo/types.md +1 -2
  93. package/components/notice/index.js +1 -19
  94. package/components/notice/styles/index.less +16 -22
  95. package/components/page/page.jsx +5 -4
  96. package/components/page/styles/index.less +49 -50
  97. package/components/popconfirm/demo/basic.md +11 -18
  98. package/components/popconfirm/demo/info.md +3 -1
  99. package/components/popconfirm/demo/local.md +14 -20
  100. package/components/popconfirm/demo/placement.md +3 -9
  101. package/components/popconfirm/index.md +3 -2
  102. package/components/popconfirm/styles/index.less +9 -15
  103. package/components/poptip/styles/index.less +44 -49
  104. package/components/progress/progress.jsx +23 -5
  105. package/components/progress/styles/index.less +20 -19
  106. package/components/radio/index.md +7 -7
  107. package/components/radio/radio.jsx +5 -1
  108. package/components/radio/styles/index.less +26 -32
  109. package/components/rate/index.md +11 -11
  110. package/components/rate/styles/index.less +4 -7
  111. package/components/select/select.jsx +1 -1
  112. package/components/select/styles/index.less +38 -51
  113. package/components/skeleton/index.md +5 -1
  114. package/components/skeleton/styles/index.less +21 -19
  115. package/components/slider/slider.jsx +25 -13
  116. package/components/slider/styles/index.less +13 -12
  117. package/components/space/space.jsx +2 -1
  118. package/components/spin/styles/index.less +25 -40
  119. package/components/statCard/countup.jsx +8 -0
  120. package/components/statCard/demo/card.md +20 -6
  121. package/components/statCard/index.md +17 -12
  122. package/components/statCard/statCard.jsx +16 -1
  123. package/components/statCard/styles/index.less +9 -6
  124. package/components/styles/less-css-var.less +309 -0
  125. package/components/styles/less-var.less +296 -0
  126. package/components/styles/sys.less +19 -15
  127. package/components/switch/styles/index.less +9 -24
  128. package/components/table/index.md +1 -1
  129. package/components/table/styles/index.less +63 -59
  130. package/components/tabs/styles/index.less +22 -24
  131. package/components/tag/demo/basic.md +0 -8
  132. package/components/tag/index.md +2 -1
  133. package/components/tag/styles/index.less +40 -41
  134. package/components/tag/tag.jsx +2 -2
  135. package/components/timeline/styles/index.less +8 -14
  136. package/components/tooltip/styles/index.less +35 -40
  137. package/components/tree/index.md +15 -15
  138. package/components/tree/styles/index.less +36 -56
  139. package/components/tree/tree.jsx +1 -0
  140. package/components/treeselect/index.md +1 -1
  141. package/components/treeselect/styles/index.less +26 -32
  142. package/components/treeselect/treeselect.jsx +1 -1
  143. package/components/upload/demo/forms.md +0 -1
  144. package/components/upload/fileList.jsx +6 -3
  145. package/components/upload/styles/index.less +33 -29
  146. package/components/upload/upload.jsx +5 -1
  147. package/components/utils/vue.js +4 -2
  148. package/dist/k-ui.cjs.js +2 -2
  149. package/dist/k-ui.css +2 -2
  150. package/dist/k-ui.d.ts +92 -74
  151. package/dist/k-ui.esm.js +2 -2
  152. package/dist/k-ui.umd.js +2 -2
  153. package/dist/locale/de.js +1 -1
  154. package/dist/locale/el.js +1 -1
  155. package/dist/locale/en.js +1 -1
  156. package/dist/locale/fr.js +1 -1
  157. package/dist/locale/it.js +1 -1
  158. package/dist/locale/ja.js +1 -1
  159. package/dist/locale/ko.js +1 -1
  160. package/dist/locale/ru.js +1 -1
  161. package/dist/locale/th.js +1 -1
  162. package/dist/locale/ua.js +2 -2
  163. package/dist/locale/uk.js +1 -1
  164. package/dist/locale/vi.js +1 -1
  165. package/dist/locale/zh-CN.js +1 -1
  166. package/dist/locale/zh-TW.js +1 -1
  167. package/package.json +15 -16
  168. package/types/alert/Alert.d.ts +2 -0
  169. package/types/card/Card.d.ts +1 -1
  170. package/types/checkbox/Checkbox.d.ts +1 -0
  171. package/types/datePicker/DatePicker.d.ts +1 -0
  172. package/types/index.d.ts +8 -8
  173. package/types/input/Input.d.ts +1 -0
  174. package/types/input/InputGroup.d.ts +2 -0
  175. package/types/input/TextArea.d.ts +1 -0
  176. package/types/inputNumber/InputNumber.d.ts +1 -0
  177. package/types/page/Page.d.ts +1 -0
  178. package/types/select/Select.d.ts +1 -0
  179. package/types/statCard/StatCard.d.ts +5 -0
  180. package/types/tag/Tag.d.ts +1 -0
  181. package/types/treeselect/TreeSelect.d.ts +1 -0
  182. package/components/dropdown/demo/custom.md +0 -31
  183. package/components/icon/lib/dist.json +0 -1
  184. package/components/icon/lib/kui-icons.js +0 -1
  185. package/components/icon/lib/sprite.svg +0 -1
  186. package/components/styles/color.less +0 -209
  187. package/components/styles/var.less +0 -207
@@ -1,193 +1,204 @@
1
1
  import Icon from "../icon";
2
2
  import resize from "../directives/resize";
3
- import { ChevronUp } from "kui-icons";
4
- import { defineComponent, provide, ref, watch, onMounted, onBeforeUnmount, nextTick } from "vue";
5
- import { withInstall } from '../utils/vue';
3
+ import { ArrowBack, ArrowForward } from "kui-icons";
4
+ import {
5
+ defineComponent,
6
+ provide,
7
+ ref,
8
+ watch,
9
+ onMounted,
10
+ onBeforeUnmount,
11
+ nextTick,
12
+ } from "vue";
13
+ import { withInstall } from "../utils/vue";
6
14
  const Carousel = defineComponent({
7
- name: "Carousel",
8
- directives: { resize },
9
- props: {
10
- value: { type: Number, default: 0 },
11
- loop: { type: Boolean, default: true },
12
- autoplay: Boolean,
13
- delay: { type: Number, default: 3000 },
14
- vertical: Boolean,
15
- dots: { type: Boolean, default: true },
16
- },
17
- setup(ps, { slots, emit, expose }) {
18
- const currentIndex = ref(ps.value);
19
- const posIndex = ref(ps.loop ? ps.value + 1 : ps.value);
20
- const autoTimer = ref(null);
21
- const width = ref(0);
22
- const height = ref(0);
23
- const animate = ref(ps.value > 0 ? false : true);
24
- const playing = ref(false);
25
- const carouselRef = ref(null);
15
+ name: "Carousel",
16
+ directives: { resize },
17
+ props: {
18
+ value: { type: Number, default: 0 },
19
+ loop: { type: Boolean, default: true },
20
+ autoplay: Boolean,
21
+ delay: { type: Number, default: 3000 },
22
+ vertical: Boolean,
23
+ dots: { type: Boolean, default: true },
24
+ },
25
+ setup(ps, { slots, emit, expose }) {
26
+ const currentIndex = ref(ps.value);
27
+ const posIndex = ref(ps.loop ? ps.value + 1 : ps.value);
28
+ const autoTimer = ref(null);
29
+ const width = ref(0);
30
+ const height = ref(0);
31
+ const animate = ref(ps.value > 0 ? false : true);
32
+ const playing = ref(false);
33
+ const carouselRef = ref(null);
26
34
 
27
- provide("width", width);
28
- provide("height", height);
35
+ provide("width", width);
36
+ provide("height", height);
29
37
 
30
- watch(
31
- () => ps.value,
32
- (nv, ov) => {
33
- currentIndex.value = nv;
34
- }
35
- );
36
- const next = () => {
37
- toSwitch("right");
38
- };
39
- const prev = () => {
40
- toSwitch("left");
41
- };
42
- const goTo = (index) => {
43
- clearInterval(autoTimer.value);
44
- animate.value = true;
45
- currentIndex.value = index;
46
- posIndex.value = ps.loop ? index + 1 : index;
47
- emit("update:value", index);
48
- autoToPlay()
49
- };
50
- expose({ next, prev, goTo });
51
- const autoToPlay = () => {
52
- if (!ps.autoplay) return;
53
- clearInterval(autoTimer.value);
54
- autoTimer.value = setInterval(() => {
55
- change("right");
56
- }, parseInt(ps.delay));
57
- };
58
- let children = slots.default?.();
59
- const toSwitch = (type) => {
60
- clearInterval(autoTimer.value);
61
- if (playing.value) return;
62
- playing.value = true;
63
- change(type);
64
- };
38
+ watch(
39
+ () => ps.value,
40
+ (nv, ov) => {
41
+ currentIndex.value = nv;
42
+ },
43
+ );
44
+ const next = () => {
45
+ toSwitch("right");
46
+ };
47
+ const prev = () => {
48
+ toSwitch("left");
49
+ };
50
+ const goTo = (index) => {
51
+ clearInterval(autoTimer.value);
52
+ animate.value = true;
53
+ currentIndex.value = index;
54
+ posIndex.value = ps.loop ? index + 1 : index;
55
+ emit("update:value", index);
56
+ autoToPlay();
57
+ };
58
+ expose({ next, prev, goTo });
59
+ const autoToPlay = () => {
60
+ if (!ps.autoplay) return;
61
+ clearInterval(autoTimer.value);
62
+ autoTimer.value = setInterval(() => {
63
+ change("right");
64
+ }, parseInt(ps.delay));
65
+ };
66
+ let children = slots.default?.();
67
+ const toSwitch = (type) => {
68
+ clearInterval(autoTimer.value);
69
+ if (playing.value) return;
70
+ playing.value = true;
71
+ change(type);
72
+ };
65
73
 
66
- const change = (type) => {
67
- animate.value = true;
74
+ const change = (type) => {
75
+ animate.value = true;
68
76
 
69
- const total = ps.loop ? children?.length + 2 : children?.length;
70
- let index = posIndex.value;
71
- let nextCurrent = currentIndex.value;
77
+ const total = ps.loop ? children?.length + 2 : children?.length;
78
+ let index = posIndex.value;
79
+ let nextCurrent = currentIndex.value;
72
80
 
73
- if (type === "right") {
74
- index = (index + 1) % total;
81
+ if (type === "right") {
82
+ index = (index + 1) % total;
75
83
 
76
- if (ps.loop) {
77
- nextCurrent = (nextCurrent + 1) % children?.length;
78
- } else {
79
- nextCurrent = index;
80
- }
81
- } else if (type === "left") {
82
- index = (index - 1 + total) % total;
84
+ if (ps.loop) {
85
+ nextCurrent = (nextCurrent + 1) % children?.length;
86
+ } else {
87
+ nextCurrent = index;
88
+ }
89
+ } else if (type === "left") {
90
+ index = (index - 1 + total) % total;
83
91
 
84
- if (ps.loop) {
85
- nextCurrent = (nextCurrent - 1 + children?.length) % children?.length;
86
- } else {
87
- nextCurrent = index;
88
- }
89
- }
92
+ if (ps.loop) {
93
+ nextCurrent = (nextCurrent - 1 + children?.length) % children?.length;
94
+ } else {
95
+ nextCurrent = index;
96
+ }
97
+ }
90
98
 
91
- posIndex.value = index;
92
- currentIndex.value = nextCurrent;
93
- emit("update:value", currentIndex.value);
99
+ posIndex.value = index;
100
+ currentIndex.value = nextCurrent;
101
+ emit("update:value", currentIndex.value);
94
102
 
95
- setTimeout(() => {
96
- playing.value = false;
97
- if (ps.loop) {
98
- let count = ps.loop ? children?.length + 2 : children?.length;
99
- if (posIndex.value === count - 1) {
100
- animate.value = false;
101
- posIndex.value = 1;
102
- }
103
- if (posIndex.value === 0) {
104
- animate.value = false;
105
- posIndex.value = count - 2;
106
- }
107
- }
108
- }, 501);
109
- autoToPlay()
110
- };
111
- const resize = () => {
112
- animate.value = false;
113
- width.value = carouselRef.value.offsetWidth;
114
- height.value = carouselRef.value.offsetHeight;
115
- };
103
+ setTimeout(() => {
104
+ playing.value = false;
105
+ if (ps.loop) {
106
+ let count = ps.loop ? children?.length + 2 : children?.length;
107
+ if (posIndex.value === count - 1) {
108
+ animate.value = false;
109
+ posIndex.value = 1;
110
+ }
111
+ if (posIndex.value === 0) {
112
+ animate.value = false;
113
+ posIndex.value = count - 2;
114
+ }
115
+ }
116
+ }, 501);
117
+ autoToPlay();
118
+ };
119
+ const resize = () => {
120
+ animate.value = false;
121
+ width.value = carouselRef.value.offsetWidth;
122
+ height.value = carouselRef.value.offsetHeight;
123
+ };
116
124
 
117
- onMounted(() => {
118
- nextTick(() => {
119
- resize();
120
- autoToPlay();
121
- });
122
- });
125
+ onMounted(() => {
126
+ nextTick(() => {
127
+ resize();
128
+ autoToPlay();
129
+ });
130
+ });
123
131
 
124
- onBeforeUnmount(() => {
125
- clearInterval(autoTimer.value);
126
- });
132
+ onBeforeUnmount(() => {
133
+ clearInterval(autoTimer.value);
134
+ });
127
135
 
128
- return () => {
129
- let { vertical } = ps;
130
- const first = children?.[0];
131
- const last = children?.[children.length - 1];
132
- const newChildren = ps.loop ? [last, ...children, first] : children;
133
- let index = Math.min(children?.length - 1, currentIndex.value);
134
- index = Math.max(0, index);
135
- const classes = [
136
- "k-carousel",
137
- {
138
- "k-carousel-vertical": vertical,
139
- },
140
- ];
141
- const dotsNode = (
142
- <ul class="k-carousel-dots">
143
- {children?.map((x, i) => (
144
- <li class={{ "k-carousel-dots-active": index == i }} onClick={() => goTo(i)}></li>
145
- ))}
146
- </ul>
147
- );
136
+ return () => {
137
+ let { vertical } = ps;
138
+ const first = children?.[0];
139
+ const last = children?.[children.length - 1];
140
+ const newChildren = ps.loop ? [last, ...children, first] : children;
141
+ let index = Math.min(children?.length - 1, currentIndex.value);
142
+ index = Math.max(0, index);
143
+ const classes = [
144
+ "k-carousel",
145
+ {
146
+ "k-carousel-vertical": vertical,
147
+ },
148
+ ];
149
+ const dotsNode = (
150
+ <ul class="k-carousel-dots">
151
+ {children?.map((x, i) => (
152
+ <li
153
+ class={{ "k-carousel-dots-active": index == i }}
154
+ onClick={() => goTo(i)}
155
+ ></li>
156
+ ))}
157
+ </ul>
158
+ );
148
159
 
149
- let offsetX = 0,
150
- offsetY = 0;
151
- if (!vertical) {
152
- offsetX = posIndex.value * width.value;
153
- } else {
154
- offsetY = posIndex.value * height.value;
155
- }
156
- const wrapperCls = {
157
- class: "k-carousel-wrapper",
158
- style: {
159
- transform: `translate3d(-${offsetX}px,-${offsetY}px,0)`,
160
- width: !vertical ? newChildren?.length * width.value + "px" : "",
161
- height: vertical ? newChildren?.length * height.value + "px" : "",
162
- transitionDuration: !animate.value ? "0s" : "",
163
- },
164
- };
165
- const arrowLeft = (
166
- <span class="k-carousel-arrow-left" onClick={() => toSwitch("left")}>
167
- <Icon type={ChevronUp} />
168
- </span>
169
- );
170
- const arrowRight = (
171
- <span class="k-carousel-arrow-right" onClick={() => toSwitch("right")}>
172
- <Icon type={ChevronUp} />
173
- </span>
174
- );
175
- const props = {
176
- class: classes,
177
- ref: carouselRef,
178
- onMouseEnter: () => clearInterval(autoTimer.value),
179
- onMouseLeave: () => {
180
- ps.autoplay && autoToPlay();
181
- },
182
- };
183
- return (
184
- <div v-resize={resize} {...props}>
185
- <div {...wrapperCls}>{newChildren}</div>
186
- {!vertical ? [arrowLeft, arrowRight] : null}
187
- {ps.dots ? dotsNode : null}
188
- </div>
189
- );
190
- };
191
- },
160
+ let offsetX = 0,
161
+ offsetY = 0;
162
+ if (!vertical) {
163
+ offsetX = posIndex.value * width.value;
164
+ } else {
165
+ offsetY = posIndex.value * height.value;
166
+ }
167
+ const wrapperCls = {
168
+ class: "k-carousel-wrapper",
169
+ style: {
170
+ transform: `translate3d(-${offsetX}px,-${offsetY}px,0)`,
171
+ width: !vertical ? newChildren?.length * width.value + "px" : "",
172
+ height: vertical ? newChildren?.length * height.value + "px" : "",
173
+ transitionDuration: !animate.value ? "0s" : "",
174
+ },
175
+ };
176
+ const arrowLeft = (
177
+ <span class="k-carousel-arrow-left" onClick={() => toSwitch("left")}>
178
+ <Icon type={ArrowBack} />
179
+ </span>
180
+ );
181
+ const arrowRight = (
182
+ <span class="k-carousel-arrow-right" onClick={() => toSwitch("right")}>
183
+ <Icon type={ArrowForward} />
184
+ </span>
185
+ );
186
+ const props = {
187
+ class: classes,
188
+ ref: carouselRef,
189
+ onMouseEnter: () => clearInterval(autoTimer.value),
190
+ onMouseLeave: () => {
191
+ ps.autoplay && autoToPlay();
192
+ },
193
+ };
194
+ return (
195
+ <div v-resize={resize} {...props}>
196
+ <div {...wrapperCls}>{newChildren}</div>
197
+ {!vertical ? [arrowLeft, arrowRight] : null}
198
+ {ps.dots ? dotsNode : null}
199
+ </div>
200
+ );
201
+ };
202
+ },
192
203
  });
193
204
  export default withInstall(Carousel);
@@ -1,4 +1,4 @@
1
- @import '../../styles/var.less';
1
+ @import "../../styles/less-css-var.less";
2
2
 
3
3
  .k-carousel {
4
4
  position: relative;
@@ -7,13 +7,13 @@
7
7
  width: 100%;
8
8
 
9
9
  &:hover {
10
- [class*='k-carousel-arrow'] {
11
- opacity: .2;
10
+ [class*="k-carousel-arrow"] {
11
+ opacity: 0.2;
12
12
  }
13
13
  }
14
14
 
15
15
  .k-carousel-wrapper {
16
- transition: transform .5s ease-in-out;
16
+ transition: transform 0.5s ease-in-out;
17
17
  width: 100%;
18
18
  height: 100%;
19
19
  }
@@ -42,13 +42,13 @@
42
42
  width: 16px;
43
43
  height: 3px;
44
44
  margin: 0 3px;
45
- opacity: .3;
45
+ opacity: 0.3;
46
46
  border-radius: 1px;
47
- transition: all .5s ease-in-out;
47
+ transition: all 0.5s ease-in-out;
48
48
  cursor: pointer;
49
49
 
50
50
  &:hover {
51
- opacity: .8;
51
+ opacity: 0.8;
52
52
  }
53
53
  }
54
54
 
@@ -71,7 +71,7 @@
71
71
  }
72
72
  }
73
73
 
74
- [class*='k-carousel-arrow'] {
74
+ [class*="k-carousel-arrow"] {
75
75
  position: absolute;
76
76
  top: 50%;
77
77
  z-index: 100;
@@ -89,19 +89,14 @@
89
89
  margin-top: -18px;
90
90
  cursor: pointer;
91
91
  color: #fff;
92
- transition: opacity .3s ease-in-out;
92
+ transition: opacity 0.3s ease-in-out;
93
93
 
94
94
  &:hover {
95
- opacity: .5;
95
+ opacity: 0.5;
96
96
  }
97
97
  }
98
98
 
99
- .k-carousel-arrow-left {
100
- transform: rotate(-90deg);
101
- }
102
-
103
99
  .k-carousel-arrow-right {
104
- transform: rotate(90deg);
105
100
  left: auto;
106
101
  right: 10px;
107
102
  }
@@ -150,4 +145,4 @@
150
145
  opacity: 1;
151
146
  }
152
147
  }
153
- }
148
+ }
@@ -24,7 +24,7 @@ const Checkbox = defineComponent({
24
24
 
25
25
  value: { type: [String, Number, Boolean] },
26
26
  label: { type: [String, Number] },
27
- theme: String,
27
+ theme: { type: String, default: "light" },
28
28
  disabled: Boolean,
29
29
  indeterminate: Boolean,
30
30
  size: {
@@ -87,7 +87,7 @@ const Checkbox = defineComponent({
87
87
  const labelNode = props.label || slots.default?.();
88
88
 
89
89
  return (
90
- <label class={wpClasses} onKeydown={triggerCheck} tabindex="0">
90
+ <label class={wpClasses} onKeydown={triggerCheck} tabindex={props.disabled ? null : 0}>
91
91
  <span class="k-checkbox-symbol">
92
92
  <input
93
93
  type="checkbox"
@@ -1,18 +1,19 @@
1
- @import "../../styles/var.less";
1
+ @import "../../styles/less-css-var.less";
2
2
 
3
3
  .k-checkbox {
4
4
  cursor: pointer;
5
5
  font-size: 12px;
6
6
  display: inline-flex;
7
7
  align-items: center;
8
+ -webkit-user-select: none;
8
9
  user-select: none;
9
10
  line-height: 1;
10
- color: var(--kui-color-font);
11
+ color: var(--kui-color-text);
11
12
  white-space: nowrap;
12
13
  outline: none;
13
14
  &:focus {
14
15
  .k-checkbox-symbol {
15
- outline: 2px solid var(--kui-color-main-80);
16
+ outline: 2px solid var(--kui-color-outline);
16
17
  }
17
18
  }
18
19
  // margin-right: 16px;
@@ -28,7 +29,7 @@
28
29
  width: 16px;
29
30
  height: 16px;
30
31
  border: 1px solid var(--kui-color-border);
31
- background-color: var(--kui-color-back);
32
+ background-color: var(--kui-color-bg-component);
32
33
  color: #fff;
33
34
  overflow: hidden;
34
35
  outline: 2px solid transparent;
@@ -64,13 +65,11 @@
64
65
 
65
66
  &.k-checkbox-indeterminate {
66
67
  .k-checkbox-symbol {
67
- // background: var(--kui-color-main);
68
- // border-color: var(--kui-color-main);
69
68
  position: relative;
70
69
 
71
70
  &:after {
72
71
  box-sizing: content-box;
73
- background-color: var(--kui-color-main);
72
+ background-color: var(--kui-color-primary);
74
73
  position: absolute;
75
74
  width: 8px;
76
75
  height: 8px;
@@ -84,8 +83,8 @@
84
83
  }
85
84
  }
86
85
 
87
- &:hover .k-checkbox-symbol {
88
- border-color: var(--kui-color-main);
86
+ &:hover:not(.k-checkbox-disabled) .k-checkbox-symbol {
87
+ border-color: var(--kui-color-primary);
89
88
  }
90
89
 
91
90
  .k-checkbox-label {
@@ -117,39 +116,32 @@
117
116
  }
118
117
  .k-checkbox-light {
119
118
  .k-checkbox-symbol {
120
- background-color: var(--kui-color-gray-80);
119
+ background-color: var(--kui-color-bg-component);
121
120
  }
122
121
  }
123
- .k-checkbox-checked {
122
+ .k-checkbox-checked:not(.k-checkbox-disabled) {
124
123
  .k-checkbox-symbol {
125
- background: var(--kui-color-main);
126
- border-color: var(--kui-color-main);
124
+ background: var(--kui-color-primary);
125
+ border-color: var(--kui-color-primary);
127
126
  }
128
127
  }
129
128
 
130
129
  .k-checkbox-disabled {
131
130
  cursor: not-allowed;
132
- color: var(--kui-color-disabled);
131
+ color: var(--kui-color-text-disabled);
133
132
 
134
- &.k-checkbox {
135
- .k-checkbox-input {
136
- cursor: not-allowed;
137
- }
138
-
139
- .k-checkbox-symbol {
140
- background: var(--kui-color-disable-back);
141
- border-color: var(--kui-color-disable-border);
142
- color: var(--kui-color-disabled);
133
+ .k-checkbox-input {
134
+ cursor: not-allowed;
135
+ }
143
136
 
144
- &:after {
145
- background-color: var(--kui-color-disable-back);
146
- color: var(--kui-color-disabled);
147
- }
148
- }
137
+ .k-checkbox-symbol {
138
+ border-color: var(--kui-color-border-disabled);
139
+ background-color: var(--kui-color-bg-component-disabled);
140
+ color: var(--kui-color-text-disabled);
149
141
  }
150
142
 
151
143
  &.k-checkbox-indeterminate .k-checkbox-symbol:after {
152
- background-color: var(--kui-color-disable-border);
144
+ background-color: var(--kui-color-border-disabled);
153
145
  }
154
146
  }
155
147
 
@@ -1,18 +1,17 @@
1
- @import "../../styles/var.less";
1
+ @import "../../styles/less-css-var.less";
2
2
  .k-collapse {
3
- background-color: var(--kui-color-back);
3
+ background-color: var(--kui-color-bg);
4
4
  border: 1px solid var(--kui-color-border);
5
- border-radius: var(--kui-border-card-radius);
6
- // border-bottom: 0;
5
+ border-radius: var(--kui-border-radius-card);
7
6
  overflow: hidden;
8
- color: var(--kui-color-font);
7
+ color: var(--kui-color-text);
9
8
  & > .k-collapse-item {
10
9
  & > .k-collapse-header {
11
10
  line-height: 22px;
12
11
  padding: 12px 16px 12px 40px;
13
12
  cursor: pointer;
14
13
  position: relative;
15
- color: var(--kui-color-title);
14
+ color: var(--kui-color-text-title);
16
15
  font-size: 14px;
17
16
  border-bottom: 1px solid var(--kui-color-border);
18
17
  border-top: 1px solid var(--kui-color-border);
@@ -38,9 +37,6 @@
38
37
  }
39
38
 
40
39
  .k-collapse-content {
41
- // background-color: #fff;
42
- // border: 1px solid var(--kui-color-border);
43
- // border-top: 1px solid var(--kui-color-border);
44
40
  padding: 0 16px;
45
41
  transition: all 0.3s ease-in-out;
46
42
  box-sizing: border-box;
@@ -61,10 +57,10 @@
61
57
  border: none;
62
58
  background: none;
63
59
  .k-collapse-item {
64
- background: var(--kui-color-gray-90);
60
+ background: var(--kui-color-bg-component);
65
61
  border: none;
66
62
  margin-bottom: 10px;
67
- border-radius: var(--kui-border-card-radius);
63
+ border-radius: var(--kui-border-radius-card);
68
64
  overflow: hidden;
69
65
  .k-collapse-header {
70
66
  border: none;