@kdcloudjs/kdesign 1.6.40 → 1.7.1

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 (236) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/dist/default-theme.js +4 -5
  3. package/dist/kdesign-complete.less +806 -35
  4. package/dist/kdesign.css +1051 -35
  5. package/dist/kdesign.css.map +1 -1
  6. package/dist/kdesign.js +59352 -40542
  7. package/dist/kdesign.js.map +1 -1
  8. package/dist/kdesign.min.css +3 -3
  9. package/dist/kdesign.min.js +9 -9
  10. package/dist/kdesign.min.js.map +1 -1
  11. package/es/alert/style/index.css +2 -0
  12. package/es/anchor/style/index.css +2 -0
  13. package/es/avatar/style/index.css +2 -0
  14. package/es/badge/style/index.css +2 -0
  15. package/es/base-data/style/index.css +2 -0
  16. package/es/button/style/index.css +2 -0
  17. package/es/card/style/index.css +2 -0
  18. package/es/carousel/style/index.css +2 -0
  19. package/es/cascader/cascader.js +14 -3
  20. package/es/cascader/style/index.css +2 -0
  21. package/es/cascader/util.js +13 -4
  22. package/es/checkbox/style/index.css +2 -0
  23. package/es/city-picker/style/index.css +2 -0
  24. package/es/collapse/style/index.css +2 -0
  25. package/es/color-picker/color-picker-panel.d.ts +4 -0
  26. package/es/color-picker/color-picker-panel.js +239 -0
  27. package/es/color-picker/color-picker.d.ts +4 -0
  28. package/es/color-picker/color-picker.js +201 -0
  29. package/es/color-picker/constant/colorTypes.d.ts +4 -0
  30. package/es/color-picker/constant/colorTypes.js +13 -0
  31. package/es/color-picker/constant/defaultColor.d.ts +1 -0
  32. package/es/color-picker/constant/defaultColor.js +1 -0
  33. package/es/color-picker/constant/systemPresetColor.d.ts +1 -0
  34. package/es/color-picker/constant/systemPresetColor.js +1 -0
  35. package/es/color-picker/index.d.ts +3 -0
  36. package/es/color-picker/index.js +3 -0
  37. package/es/color-picker/interface.d.ts +64 -0
  38. package/es/color-picker/interface.js +3 -0
  39. package/es/color-picker/style/css.js +2 -0
  40. package/es/color-picker/style/index.css +317 -0
  41. package/es/color-picker/style/index.d.ts +2 -0
  42. package/es/color-picker/style/index.js +2 -0
  43. package/es/color-picker/style/index.less +253 -0
  44. package/es/color-picker/style/mixin.less +5 -0
  45. package/es/color-picker/style/token.less +22 -0
  46. package/es/color-picker/utils/colorFormat.d.ts +18 -0
  47. package/es/color-picker/utils/colorFormat.js +153 -0
  48. package/es/color-picker/utils/convertLetters.d.ts +1 -0
  49. package/es/color-picker/utils/convertLetters.js +12 -0
  50. package/es/color-picker/utils/hooks/useOnClickOutside.d.ts +2 -0
  51. package/es/color-picker/utils/hooks/useOnClickOutside.js +16 -0
  52. package/es/color-picker/utils/validateColor.d.ts +1 -0
  53. package/es/color-picker/utils/validateColor.js +24 -0
  54. package/es/config-provider/compDefaultProps.d.ts +25 -0
  55. package/es/config-provider/compDefaultProps.js +29 -0
  56. package/es/date-picker/style/index.css +2 -0
  57. package/es/drawer/style/index.css +2 -0
  58. package/es/dropdown/style/index.css +2 -0
  59. package/es/empty/style/index.css +2 -0
  60. package/es/filter/style/index.css +2 -0
  61. package/es/form/style/index.css +2 -0
  62. package/es/grid/style/index.css +2 -0
  63. package/es/icon/style/index.css +2 -0
  64. package/es/image/style/index.css +2 -0
  65. package/es/image-cropper/style/index.css +2 -0
  66. package/es/index.d.ts +2 -0
  67. package/es/index.js +3 -1
  68. package/es/input/ClearableLabeledInput.js +8 -2
  69. package/es/input/input.js +1 -5
  70. package/es/input/style/index.css +2 -0
  71. package/es/input-number/style/index.css +2 -0
  72. package/es/layout/style/index.css +2 -0
  73. package/es/link/style/index.css +2 -0
  74. package/es/locale/locale.d.ts +4 -0
  75. package/es/locale/locale.js +6 -4
  76. package/es/locale/zh-CN.d.ts +1 -0
  77. package/es/locale/zh-CN.js +1 -0
  78. package/es/menu/style/index.css +2 -0
  79. package/es/message/style/index.css +2 -0
  80. package/es/modal/style/index.css +2 -0
  81. package/es/notification/style/index.css +2 -0
  82. package/es/pagination/style/index.css +116 -29
  83. package/es/pagination/style/index.less +38 -29
  84. package/es/popconfirm/style/index.css +2 -0
  85. package/es/progress/style/index.css +2 -0
  86. package/es/radio/style/index.css +2 -0
  87. package/es/rate/style/index.css +2 -0
  88. package/es/search/style/index.css +2 -0
  89. package/es/select/style/index.css +2 -0
  90. package/es/slider/style/index.css +2 -0
  91. package/es/space/style/index.css +2 -0
  92. package/es/spin/style/index.css +2 -0
  93. package/es/split-panel/style/index.css +2 -0
  94. package/es/stepper/style/index.css +2 -0
  95. package/es/steps/style/index.css +2 -0
  96. package/es/style/index.css +2 -0
  97. package/es/style/themes/default.less +10 -6
  98. package/es/switch/style/index.css +2 -0
  99. package/es/table/style/index.css +2 -0
  100. package/es/tabs/style/index.css +2 -0
  101. package/es/tag/style/index.css +2 -0
  102. package/es/timeline/style/index.css +2 -0
  103. package/es/tooltip/style/index.css +2 -0
  104. package/es/transfer/style/index.css +2 -0
  105. package/es/tree/style/index.css +2 -0
  106. package/es/tree/tree.d.ts +2 -1
  107. package/es/tree/tree.js +4 -3
  108. package/es/tree-select/index.d.ts +3 -0
  109. package/es/tree-select/index.js +3 -0
  110. package/es/tree-select/interface.d.ts +68 -0
  111. package/es/tree-select/interface.js +4 -0
  112. package/es/tree-select/style/css.js +2 -0
  113. package/es/tree-select/style/index.css +504 -0
  114. package/es/tree-select/style/index.d.ts +2 -0
  115. package/es/tree-select/style/index.js +2 -0
  116. package/es/tree-select/style/index.less +392 -0
  117. package/es/tree-select/style/mixin.less +29 -0
  118. package/es/tree-select/style/token.less +54 -0
  119. package/es/tree-select/tree-select.d.ts +4 -0
  120. package/es/tree-select/tree-select.js +506 -0
  121. package/es/typography/style/index.css +2 -0
  122. package/es/upload/style/index.css +2 -0
  123. package/lib/alert/style/index.css +2 -0
  124. package/lib/anchor/style/index.css +2 -0
  125. package/lib/avatar/style/index.css +2 -0
  126. package/lib/badge/style/index.css +2 -0
  127. package/lib/base-data/style/index.css +2 -0
  128. package/lib/button/style/index.css +2 -0
  129. package/lib/card/style/index.css +2 -0
  130. package/lib/carousel/style/index.css +2 -0
  131. package/lib/cascader/cascader.js +14 -3
  132. package/lib/cascader/style/index.css +2 -0
  133. package/lib/cascader/util.js +13 -4
  134. package/lib/checkbox/style/index.css +2 -0
  135. package/lib/city-picker/style/index.css +2 -0
  136. package/lib/collapse/style/index.css +2 -0
  137. package/lib/color-picker/color-picker-panel.d.ts +4 -0
  138. package/lib/color-picker/color-picker-panel.js +253 -0
  139. package/lib/color-picker/color-picker.d.ts +4 -0
  140. package/lib/color-picker/color-picker.js +214 -0
  141. package/lib/color-picker/constant/colorTypes.d.ts +4 -0
  142. package/lib/color-picker/constant/colorTypes.js +20 -0
  143. package/lib/color-picker/constant/defaultColor.d.ts +1 -0
  144. package/lib/color-picker/constant/defaultColor.js +8 -0
  145. package/lib/color-picker/constant/systemPresetColor.d.ts +1 -0
  146. package/lib/color-picker/constant/systemPresetColor.js +8 -0
  147. package/lib/color-picker/index.d.ts +3 -0
  148. package/lib/color-picker/index.js +27 -0
  149. package/lib/color-picker/interface.d.ts +64 -0
  150. package/lib/color-picker/interface.js +11 -0
  151. package/lib/color-picker/style/css.js +4 -0
  152. package/lib/color-picker/style/index.css +317 -0
  153. package/lib/color-picker/style/index.d.ts +2 -0
  154. package/lib/color-picker/style/index.js +4 -0
  155. package/lib/color-picker/style/index.less +253 -0
  156. package/lib/color-picker/style/mixin.less +5 -0
  157. package/lib/color-picker/style/token.less +22 -0
  158. package/lib/color-picker/utils/colorFormat.d.ts +18 -0
  159. package/lib/color-picker/utils/colorFormat.js +166 -0
  160. package/lib/color-picker/utils/convertLetters.d.ts +1 -0
  161. package/lib/color-picker/utils/convertLetters.js +18 -0
  162. package/lib/color-picker/utils/hooks/useOnClickOutside.d.ts +2 -0
  163. package/lib/color-picker/utils/hooks/useOnClickOutside.js +23 -0
  164. package/lib/color-picker/utils/validateColor.d.ts +1 -0
  165. package/lib/color-picker/utils/validateColor.js +30 -0
  166. package/lib/config-provider/compDefaultProps.d.ts +25 -0
  167. package/lib/config-provider/compDefaultProps.js +29 -0
  168. package/lib/date-picker/style/index.css +2 -0
  169. package/lib/drawer/style/index.css +2 -0
  170. package/lib/dropdown/style/index.css +2 -0
  171. package/lib/empty/style/index.css +2 -0
  172. package/lib/filter/style/index.css +2 -0
  173. package/lib/form/style/index.css +2 -0
  174. package/lib/grid/style/index.css +2 -0
  175. package/lib/icon/style/index.css +2 -0
  176. package/lib/image/style/index.css +2 -0
  177. package/lib/image-cropper/style/index.css +2 -0
  178. package/lib/index.d.ts +2 -0
  179. package/lib/index.js +14 -0
  180. package/lib/input/ClearableLabeledInput.js +8 -2
  181. package/lib/input/input.js +1 -5
  182. package/lib/input/style/index.css +2 -0
  183. package/lib/input-number/style/index.css +2 -0
  184. package/lib/layout/style/index.css +2 -0
  185. package/lib/link/style/index.css +2 -0
  186. package/lib/locale/locale.d.ts +4 -0
  187. package/lib/locale/locale.js +6 -4
  188. package/lib/locale/zh-CN.d.ts +1 -0
  189. package/lib/locale/zh-CN.js +1 -0
  190. package/lib/menu/style/index.css +2 -0
  191. package/lib/message/style/index.css +2 -0
  192. package/lib/modal/style/index.css +2 -0
  193. package/lib/notification/style/index.css +2 -0
  194. package/lib/pagination/style/index.css +116 -29
  195. package/lib/pagination/style/index.less +38 -29
  196. package/lib/popconfirm/style/index.css +2 -0
  197. package/lib/progress/style/index.css +2 -0
  198. package/lib/radio/style/index.css +2 -0
  199. package/lib/rate/style/index.css +2 -0
  200. package/lib/search/style/index.css +2 -0
  201. package/lib/select/style/index.css +2 -0
  202. package/lib/slider/style/index.css +2 -0
  203. package/lib/space/style/index.css +2 -0
  204. package/lib/spin/style/index.css +2 -0
  205. package/lib/split-panel/style/index.css +2 -0
  206. package/lib/stepper/style/index.css +2 -0
  207. package/lib/steps/style/index.css +2 -0
  208. package/lib/style/components.less +2 -0
  209. package/lib/style/index.css +2 -0
  210. package/lib/style/themes/default.less +10 -6
  211. package/lib/switch/style/index.css +2 -0
  212. package/lib/table/style/index.css +2 -0
  213. package/lib/tabs/style/index.css +2 -0
  214. package/lib/tag/style/index.css +2 -0
  215. package/lib/timeline/style/index.css +2 -0
  216. package/lib/tooltip/style/index.css +2 -0
  217. package/lib/transfer/style/index.css +2 -0
  218. package/lib/tree/style/index.css +2 -0
  219. package/lib/tree/tree.d.ts +2 -1
  220. package/lib/tree/tree.js +4 -3
  221. package/lib/tree-select/index.d.ts +3 -0
  222. package/lib/tree-select/index.js +27 -0
  223. package/lib/tree-select/interface.d.ts +68 -0
  224. package/lib/tree-select/interface.js +13 -0
  225. package/lib/tree-select/style/css.js +4 -0
  226. package/lib/tree-select/style/index.css +504 -0
  227. package/lib/tree-select/style/index.d.ts +2 -0
  228. package/lib/tree-select/style/index.js +4 -0
  229. package/lib/tree-select/style/index.less +392 -0
  230. package/lib/tree-select/style/mixin.less +29 -0
  231. package/lib/tree-select/style/token.less +54 -0
  232. package/lib/tree-select/tree-select.d.ts +4 -0
  233. package/lib/tree-select/tree-select.js +519 -0
  234. package/lib/typography/style/index.css +2 -0
  235. package/lib/upload/style/index.css +2 -0
  236. package/package.json +5 -1
@@ -0,0 +1,13 @@
1
+ export var colorTypes = [{
2
+ type: 'HEX',
3
+ value: '#b2b2b2'
4
+ }, {
5
+ type: 'HSB',
6
+ value: 'hsb(0,0%,70%)'
7
+ }, {
8
+ type: 'RGB',
9
+ value: 'rgb(178,178,178)'
10
+ }, {
11
+ type: 'HSL',
12
+ value: 'hsl(0,0%,70%)'
13
+ }];
@@ -0,0 +1 @@
1
+ export declare const defaultSystemColor = "#b2b2b2";
@@ -0,0 +1 @@
1
+ export var defaultSystemColor = '#b2b2b2';
@@ -0,0 +1 @@
1
+ export declare const systemPresetColor: string[];
@@ -0,0 +1 @@
1
+ export var systemPresetColor = ['#A1ECFF', '#A1F5E8', '#A1E6B5', '#DDFF8F', '#FFEF8A', '#FFE0A6', '#FFCAA8', '#FFADB6', '#FF96AD', '#D4A8FF', '#99CCFF', '#B3D5FF', '#16B0F1', '#16B8B1', '#1BA854', '#77C404', '#FDC200', '#FF991C', '#FF5F1F', '#FB2323', '#F90D58', '#701DF0', '#0E5FD8', '#276FF5', '#FFFFFF', '#FAFAFA', '#F5F5F5', '#F2F2F2', '#E5E5E5', '#D9D9D9', '#CCCCCC', '#999999', '#666666', '#404040', '#212121', '#000000'];
@@ -0,0 +1,3 @@
1
+ import ColorPicker from './color-picker';
2
+ export * from './color-picker';
3
+ export default ColorPicker;
@@ -0,0 +1,3 @@
1
+ import ColorPicker from './color-picker';
2
+ export * from './color-picker';
3
+ export default ColorPicker;
@@ -0,0 +1,64 @@
1
+ /// <reference types="react" />
2
+ import { PopperProps } from '../_utils/usePopper';
3
+ export declare const ColorTypes: ["HEX", "HSB", "RGB", "HSL", "themeColor"];
4
+ export declare type ColorType = typeof ColorTypes[number];
5
+ export interface IColorTypesObj {
6
+ type: ColorType;
7
+ value: string;
8
+ }
9
+ export declare const BorderTypes: ["underline", "bordered"];
10
+ export declare type BorderType = typeof BorderTypes[number];
11
+ export interface IColorPickerProps extends PopperProps {
12
+ value: string;
13
+ defaultValue: string;
14
+ className: string;
15
+ style: React.CSSProperties;
16
+ borderType: BorderType;
17
+ suffixIcon: (rgbColor: string) => React.ReactNode;
18
+ functionalColorName: string;
19
+ functionalColor: string;
20
+ switchName: {
21
+ name: string;
22
+ internationalName?: string;
23
+ };
24
+ showSwitch: boolean;
25
+ showColorTransfer: boolean;
26
+ showPresetColor: boolean;
27
+ placeholder: string;
28
+ presetColor: string[];
29
+ showColorPickerBox: boolean;
30
+ defaultOpen: boolean;
31
+ onChange: (inputValue: string, formatColorArr: Array<IColorTypesObj>) => void;
32
+ }
33
+ export interface IColorPickerPanelProps {
34
+ alpha: number;
35
+ alphaNoVerifyVal: string;
36
+ clickedColorIndex?: number;
37
+ colTypeArr: Array<IColorTypesObj>;
38
+ correctColorValue: string;
39
+ currentColorType: IColorTypesObj['type'];
40
+ functionalColor?: string;
41
+ functionalColorName: string;
42
+ switchName: {
43
+ name: string;
44
+ internationalName?: string;
45
+ };
46
+ inputRef: any;
47
+ isFollow: boolean;
48
+ presetColor?: string[];
49
+ showSwitch?: boolean;
50
+ showColorTransfer?: boolean;
51
+ showPresetColor?: boolean;
52
+ showColorPickerBox?: boolean;
53
+ value: string;
54
+ setCurrentColorType: (currentColorType: IColorTypesObj['type']) => void;
55
+ setColTypeArr: (colTypeArr: Array<IColorTypesObj>) => void;
56
+ setClickedColorIndex: (clickedColorIndex: number) => void;
57
+ setIsFollow: (isFollow: boolean) => void;
58
+ setAlphaNoVerifyVal: (NoVerifyVal: string) => void;
59
+ setAlpha: (alpha: number) => void;
60
+ setCorrectColorValue: (colorValue: string) => void;
61
+ setInputColorValue: (colorValue: string) => void;
62
+ setShowPanel: (showPanel: boolean) => void;
63
+ onChange?: (inputValue: string, formatColorArr: Array<IColorTypesObj>) => void;
64
+ }
@@ -0,0 +1,3 @@
1
+ import { tuple } from '../_utils/type';
2
+ export var ColorTypes = tuple('HEX', 'HSB', 'RGB', 'HSL', 'themeColor');
3
+ export var BorderTypes = tuple('underline', 'bordered');
@@ -0,0 +1,2 @@
1
+ import '../../style/index.css';
2
+ import './index.css';
@@ -0,0 +1,317 @@
1
+ /* ----------- color ——————---- start */
2
+ /* ----------- color ——————---- end */
3
+ /* ----------- motion ——————---- start */
4
+ /* ----------- motion ——————---- end */
5
+ /* ----------- transition ——————---- start */
6
+ /* ----------- transition ——————---- end */
7
+ /* ----------- font ——————---- start */
8
+ /* ----------- font ——————---- end */
9
+ /* ----------- zIndex ——————---- start */
10
+ /*
11
+ 普通组件内部自身层级应设置在0-100间
12
+ */
13
+ /* ----------- zIndex ——————---- end */
14
+ /* ----------- Button ——————---- start */
15
+ /* ----------- Button ——————---- end */
16
+ /* ----------- Collapse ——————---- start */
17
+ /* ----------- Collapse ——————---- end */
18
+ /* ----------- Card ——————---- start */
19
+ /* ----------- Card ——————---- end */
20
+ /* ----------- Carousel ——————---- start */
21
+ /* ----------- Carousel ——————---- end */
22
+ /* ----------- Cascader ——————---- start */
23
+ /* ----------- Cascader ——————---- end */
24
+ /* ----------- Switch ——————---- start */
25
+ /* ----------- Switch ——————---- end */
26
+ /* ----------- Input ——————---- start */
27
+ /* ----------- Input ——————---- end */
28
+ /* ----------- InputNumber ——————---- start */
29
+ /* ----------- InputNumber ——————---- end */
30
+ /* ----------- checkbox ——————---- start */
31
+ /* ----------- checkbox ——————---- start */
32
+ /* ----------- checkbox ——————---- end */
33
+ /* ----------- Radio ——————---- start */
34
+ /* ----------- Radio ——————---- end */
35
+ /* ----------- icon ——————---- start */
36
+ /* ----------- icon ——————---- end */
37
+ /* ----------- Popconfirm ——————---- start */
38
+ /* ----------- Popconfirm ——————---- end */
39
+ /* ----------- Progress ——————---- start */
40
+ /* ----------- Progress ——————---- end */
41
+ /* ----------- Pagination ——————---- start */
42
+ /* ----------- Pagination ——————---- end */
43
+ /* ----------- Timeline ——————---- start */
44
+ /* ----------- Timeline ——————---- end */
45
+ /* ----------- Tabs ——————---- start */
46
+ /* ----------- Tabs ——————---- end */
47
+ /* ----------- Select ——————---- start */
48
+ /* ----------- Select ——————---- end */
49
+ /* ----------- Rate ——————---- start */
50
+ /* ----------- Rate ——————---- end */
51
+ /* ----------- Dropdown ——————---- start */
52
+ /* ----------- Dropdown ——————---- end */
53
+ /* ----------- Tooltip ——————---- start */
54
+ /* ----------- Tooltip ——————---- end */
55
+ /* ----------- Transfer ——————---- start */
56
+ /* ----------- Transfer ——————---- end */
57
+ /* ----------- DatePicker ——————---- start */
58
+ /* ----------- DatePicker ——————---- end */
59
+ /* ----------- ColorPicker ——————---- start */
60
+ /* ----------- ColorPicker ——————---- end */
61
+ /* ----------- Tree ——————---- start */
62
+ /* ----------- Tree ——————---- end */
63
+ /* ----------- Alert ——————---- start */
64
+ /* ----------- Alert ——————---- end */
65
+ /* ----------- Split-Panel ——————---- start */
66
+ /* ----------- Split-Panel ——————---- end */
67
+ /* ----------- Modal ——————---- start */
68
+ /* ----------- Modal ——————---- end */
69
+ /* ----------- Steps ——————---- start */
70
+ /* ----------- Steps ——————---- end */
71
+ /* ----------- Form ——————---- start */
72
+ /* ----------- Form ——————---- end */
73
+ /* ----------- Tag ——————---- start */
74
+ /* ----------- Tag ——————---- end */
75
+ /* ----------- Menu ——————---- start */
76
+ /* ----------- Menu ——————---- end */
77
+ /* ----------- notice ——————---- start */
78
+ /* ----------- message ——————---- end */
79
+ /* ----------- Spin ——————---- start */
80
+ /* ----------- Spin ——————---- end */
81
+ /* ----------- Spin ——————---- start */
82
+ /* ----------- Spin ——————---- end */
83
+ /* ----------- Layout ——————---- start */
84
+ /* ----------- Layout ——————---- end */
85
+ /* ----------- Typography ——————---- start */
86
+ /* ----------- Typography ——————---- start */
87
+ /* ----------- Search ——————---- start */
88
+ /* ----------- Search ——————---- start */
89
+ /* ----------- Badge ——————---- start */
90
+ /* ----------- Badge ——————---- end */
91
+ /* ----------- Anchor ——————---- start */
92
+ /* ----------- Anchor ——————---- end */
93
+ /* ----------- Avatar ——————---- start */
94
+ /* ----------- Avatar ——————---- end */
95
+ /* ----------- AdvancedSelector ——————---- start */
96
+ /* ----------- AdvancedSelector ——————---- end */
97
+ /* ----------- motion ——————---- start */
98
+ /* ----------- motion ——————---- end */
99
+ /* ----------- transition ——————---- start */
100
+ /* ----------- transition ——————---- end */
101
+ /* ----------- zIndex ——————---- start */
102
+ /*
103
+ 普通组件内部自身层级应设置在0-100间
104
+ */
105
+ /* ----------- zIndex ——————---- end */
106
+ .kd-color-picker-container {
107
+ position: relative;
108
+ }
109
+ .kd-color-picker-container .kd-color-picker-input {
110
+ width: var(--kd-c-color-picker-input-sizing-width, 230px);
111
+ height: var(--kd-c-color-picker-input-sizing-height, 28px);
112
+ border-bottom: 1px solid #d9d9d9;
113
+ font-size: var(--kd-c-color-picker-input-font-size, var(--kd-g-font-size-middle, 14px));
114
+ }
115
+ .kd-color-picker-container .kd-color-picker-icon-container {
116
+ position: absolute;
117
+ top: 3px;
118
+ right: 6px;
119
+ cursor: pointer;
120
+ }
121
+ .kd-color-picker-container .kd-color-picker-icon-container .kd-color-picker-icon {
122
+ width: var(--kd-c-color-picker-input-suffix-sizing-width, 20px);
123
+ height: var(--kd-c-color-picker-input-suffix-sizing-height, 20px);
124
+ border: 1px solid rgba(0, 0, 0, 0.05);
125
+ border-radius: 2px;
126
+ line-height: 18px;
127
+ text-align: center;
128
+ color: #fff;
129
+ }
130
+ .kd-color-picker-container .kd-color-picker-icon-container .kd-color-picker-icon-underline {
131
+ margin-right: -6px;
132
+ }
133
+ .kd-color-picker-container .kd-color-picker-icon-container .kd-color-picker-icon-up .kdicon-arrow-down {
134
+ -webkit-transform: rotate(180deg);
135
+ transform: rotate(180deg);
136
+ -webkit-transition: -webkit-transform 0.2s ease-in-out;
137
+ transition: -webkit-transform 0.2s ease-in-out;
138
+ transition: transform 0.2s ease-in-out;
139
+ transition: transform 0.2s ease-in-out, -webkit-transform 0.2s ease-in-out;
140
+ }
141
+ .kd-color-picker-container .kd-color-picker-icon-container .kd-color-picker-icon-down .kdicon-arrow-down {
142
+ -webkit-transform: rotate(0deg);
143
+ transform: rotate(0deg);
144
+ -webkit-transition: -webkit-transform 0.2s ease-in-out;
145
+ transition: -webkit-transform 0.2s ease-in-out;
146
+ transition: transform 0.2s ease-in-out;
147
+ transition: transform 0.2s ease-in-out, -webkit-transform 0.2s ease-in-out;
148
+ }
149
+ .kd-color-picker-pop.topLeft.hidden,
150
+ .kd-color-picker-pop.bottomLeft.hidden,
151
+ .kd-color-picker-pop.topRight.hidden,
152
+ .kd-color-picker-pop.bottomRight.hidden {
153
+ opacity: 0;
154
+ visibility: hidden;
155
+ -webkit-transition: all calc(0.3s - 0.1s) cubic-bezier(0.4, 0, 0.6, 1);
156
+ transition: all calc(0.3s - 0.1s) cubic-bezier(0.4, 0, 0.6, 1);
157
+ }
158
+ .kd-color-picker-pop .kd-color-picker-panel {
159
+ -webkit-box-sizing: border-box;
160
+ box-sizing: border-box;
161
+ width: var(--kd-c-color-picker-panel-sizing-width, 304px);
162
+ padding: 4px 12px 16px;
163
+ background: #FFFFFF;
164
+ -webkit-box-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.15);
165
+ box-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.15);
166
+ border-radius: 2px;
167
+ -webkit-transform-origin: top left;
168
+ transform-origin: top left;
169
+ z-index: var(--kd-c-color-picker-panel-z-index, var(--kd-g-z-index-popper, 1050));
170
+ }
171
+ .kd-color-picker-pop .kd-color-picker-panel-chrome {
172
+ width: 278px !important;
173
+ margin-top: 12px;
174
+ -webkit-box-shadow: none !important;
175
+ box-shadow: none !important;
176
+ }
177
+ .kd-color-picker-pop .kd-color-picker-panel-chrome > div:last-child {
178
+ padding: 9px 0 4px !important;
179
+ }
180
+ .kd-color-picker-pop .kd-color-picker-panel-chrome > div:last-child .flexbox-fix:first-child {
181
+ display: -webkit-box;
182
+ display: -ms-flexbox;
183
+ display: flex;
184
+ -webkit-box-orient: horizontal;
185
+ -webkit-box-direction: reverse;
186
+ -ms-flex-direction: row-reverse;
187
+ flex-direction: row-reverse;
188
+ }
189
+ .kd-color-picker-pop .kd-color-picker-panel-chrome > div:last-child .flexbox-fix:first-child > div:first-child > div {
190
+ width: 28px !important;
191
+ height: 28px !important;
192
+ border-radius: 50% !important;
193
+ margin-top: -1px !important;
194
+ margin-left: 4px !important;
195
+ }
196
+ .kd-color-picker-pop .kd-color-picker-panel-chrome > div:last-child .flexbox-fix:first-child > div:last-child .hue-horizontal {
197
+ width: 240px !important;
198
+ height: 12px !important;
199
+ border-radius: 6px !important;
200
+ padding: unset !important;
201
+ }
202
+ .kd-color-picker-pop .kd-color-picker-panel-chrome > div:last-child .flexbox-fix:first-child > div:last-child .hue-horizontal > div > div {
203
+ margin-top: 1px;
204
+ }
205
+ .kd-color-picker-pop .kd-color-picker-panel-chrome > div:last-child .flexbox-fix:first-child > div:last-child > div:last-child > div {
206
+ width: 240px !important;
207
+ height: 12px !important;
208
+ margin: unset;
209
+ }
210
+ .kd-color-picker-pop .kd-color-picker-panel-chrome > div:last-child .flexbox-fix:first-child > div:last-child > div:last-child > div > div:first-child {
211
+ border-radius: 6px !important;
212
+ }
213
+ .kd-color-picker-pop .kd-color-picker-panel-chrome > div:last-child .flexbox-fix:first-child > div:last-child > div:last-child > div > div:nth-child(2) {
214
+ border-radius: 6px !important;
215
+ }
216
+ .kd-color-picker-pop .kd-color-picker-panel-chrome > div:last-child .flexbox-fix:first-child > div:last-child > div:last-child > div > div:last-child {
217
+ margin: unset !important;
218
+ }
219
+ .kd-color-picker-pop .kd-color-picker-panel-chrome > div:last-child .flexbox-fix:first-child > div:last-child > div:last-child > div > div:last-child > div > div {
220
+ margin-top: 1px;
221
+ }
222
+ .kd-color-picker-pop .kd-color-picker-panel-chrome > div:last-child .flexbox-fix:last-child {
223
+ display: none !important;
224
+ }
225
+ .kd-color-picker-pop .kd-color-picker-panel-switch {
226
+ margin: 12px 0 0;
227
+ font-size: 12px;
228
+ color: #666666;
229
+ letter-spacing: 0;
230
+ line-height: 16px;
231
+ font-weight: 400;
232
+ }
233
+ .kd-color-picker-pop .kd-color-picker-panel-switch span {
234
+ vertical-align: middle;
235
+ margin-right: 9px;
236
+ }
237
+ .kd-color-picker-pop .kd-color-picker-panel-input {
238
+ display: inline-block;
239
+ position: relative;
240
+ margin-top: 12px;
241
+ font-size: var(--kd-c-color-picker-panel-select-font-size, var(--kd-g-font-size-middle, 14px));
242
+ }
243
+ .kd-color-picker-pop .kd-color-picker-panel-input-no-recommend {
244
+ margin-bottom: 8px;
245
+ }
246
+ .kd-color-picker-pop .kd-color-picker-panel-input .kd-select.bottomLeft,
247
+ .kd-color-picker-pop .kd-color-picker-panel-input .kd-select.topLeft {
248
+ position: absolute;
249
+ width: 60px !important;
250
+ background: #FFFFFF;
251
+ right: 0;
252
+ left: unset !important;
253
+ -webkit-box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.2);
254
+ box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.2);
255
+ border-radius: 2px;
256
+ }
257
+ .kd-color-picker-pop .kd-color-picker-panel-input .kd-select .kd-select-dropdown {
258
+ overflow: hidden;
259
+ }
260
+ .kd-color-picker-pop .kd-color-picker-panel-input .kd-select-bordered {
261
+ border-radius: 2px;
262
+ width: var(--kd-c-color-picker-panel-select-sizing-width, 212px);
263
+ height: var(--kd-c-color-picker-panel-select-sizing-height, 28px);
264
+ min-height: 28px;
265
+ margin-top: -2px;
266
+ }
267
+ .kd-color-picker-pop .kd-color-picker-panel-input .kd-select-bordered .kd-select-placeholder {
268
+ left: 8px;
269
+ }
270
+ .kd-color-picker-pop .kd-color-picker-panel-input .active-option {
271
+ background-color: #E3EBFF;
272
+ }
273
+ .kd-color-picker-pop .kd-color-picker-panel-transparent {
274
+ width: 60px;
275
+ height: 28px;
276
+ margin-left: 8px;
277
+ text-align: center;
278
+ font-size: var(--kd-c-color-picker-panel-alpha-font-size, var(--kd-g-font-size-middle, 14px));
279
+ }
280
+ .kd-color-picker-pop .kd-color-picker-panel-colorDivContainer {
281
+ display: grid;
282
+ grid-template-columns: repeat(12, 1fr);
283
+ grid-column-gap: 8px;
284
+ grid-row-gap: 8px;
285
+ margin-top: 12px;
286
+ }
287
+ .kd-color-picker-pop .kd-color-picker-panel-colorDivContainer li {
288
+ position: relative;
289
+ -webkit-box-sizing: border-box;
290
+ box-sizing: border-box;
291
+ width: var(--kd-c-color-picker-panel-preset-sizing-width, 16px);
292
+ height: var(--kd-c-color-picker-panel-preset-sizing-height, 16px);
293
+ border: 1px solid rgba(0, 0, 0, 0.05);
294
+ border-radius: 2px;
295
+ list-style: none;
296
+ cursor: pointer;
297
+ }
298
+ .kd-color-picker-pop .kd-color-picker-panel-colorDivContainer li .square {
299
+ display: none;
300
+ position: absolute;
301
+ -webkit-box-sizing: inherit;
302
+ box-sizing: inherit;
303
+ top: -3px;
304
+ left: -3px;
305
+ width: calc(var(--kd-c-color-picker-panel-preset-sizing-width, 16px) + 4px);
306
+ height: calc(var(--kd-c-color-picker-panel-preset-sizing-height, 16px) + 4px);
307
+ border: 1px solid #b2b2b0;
308
+ border-radius: 4px;
309
+ }
310
+ .kd-color-picker-pop .kd-color-picker-panel-colorDivContainer li .square-click {
311
+ display: block;
312
+ -webkit-box-shadow: 0 0 0 1px #e5e5e5 !important;
313
+ box-shadow: 0 0 0 1px #e5e5e5 !important;
314
+ }
315
+ .kd-color-picker-pop .kd-color-picker-panel-colorDivContainer li:hover .square {
316
+ display: block;
317
+ }
@@ -0,0 +1,2 @@
1
+ import '../../style/index.less';
2
+ import './index.less';
@@ -0,0 +1,2 @@
1
+ import '../../style/index.less';
2
+ import './index.less';
@@ -0,0 +1,253 @@
1
+ @import '../../style/themes/index';
2
+ @import './mixin.less';
3
+ @import './token.less';
4
+
5
+ @color-picker-prefix-cls: ~'@{kd-prefix}-color-picker';
6
+
7
+ .@{color-picker-prefix-cls}-container {
8
+ position: relative;
9
+
10
+ .@{color-picker-prefix-cls}-input {
11
+ width: @color-picker-input-sizing-width;
12
+ height: @color-picker-input-sizing-height;
13
+ border-bottom: 1px solid rgba(217, 217, 217, 1);
14
+ font-size: @color-picker-input-font-size;
15
+ }
16
+
17
+ .@{color-picker-prefix-cls}-icon-container {
18
+ position: absolute;
19
+ top: 3px;
20
+ right: 6px;
21
+ cursor: pointer;
22
+
23
+ .@{color-picker-prefix-cls}-icon {
24
+ width: @color-picker-input-suffix-sizing-width;
25
+ height: @color-picker-input-suffix-sizing-height;
26
+ border: 1px solid rgba(0, 0, 0, 0.05);
27
+ border-radius: 2px;
28
+ line-height: 18px;
29
+ text-align: center;
30
+ color: @bg;
31
+
32
+ &-underline {
33
+ margin-right: -6px;
34
+ }
35
+
36
+ &-up {
37
+ .kdicon-arrow-down {
38
+ transform: rotate(180deg);
39
+ transition: transform @transition-duration-quickly ease-in-out;
40
+ }
41
+ }
42
+
43
+ &-down {
44
+ .kdicon-arrow-down {
45
+ transform: rotate(0deg);
46
+ transition: transform @transition-duration-quickly ease-in-out;
47
+ }
48
+ }
49
+ }
50
+ }
51
+
52
+ }
53
+
54
+ .@{color-picker-prefix-cls}-pop {
55
+
56
+ &.topLeft.hidden,
57
+ &.bottomLeft.hidden,
58
+ &.topRight.hidden,
59
+ &.bottomRight.hidden {
60
+ opacity: 0;
61
+ visibility: hidden;
62
+ transition: all calc(@transition-duration - 0.1s) @ease;
63
+ }
64
+
65
+ .@{color-picker-prefix-cls}-panel {
66
+ box-sizing: border-box;
67
+ width: @color-picker-panel-sizing-width;
68
+ padding: 4px 12px 16px;
69
+ background: #FFFFFF;
70
+ box-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.15);
71
+ border-radius: 2px;
72
+ transform-origin: top left;
73
+ z-index: @color-picker-panel-z-index;
74
+
75
+ &-chrome {
76
+ width: 278px !important;
77
+ margin-top: 12px;
78
+ box-shadow: none !important;
79
+
80
+ &>div:last-child {
81
+ padding: 9px 0 4px !important;
82
+
83
+ .flexbox-fix:first-child {
84
+ display: flex;
85
+ flex-direction: row-reverse;
86
+
87
+ &>div:first-child {
88
+ &>div {
89
+ width: 28px !important;
90
+ height: 28px !important;
91
+ border-radius: 50% !important;
92
+ margin-top: -1px !important;
93
+ margin-left: 4px !important;
94
+ }
95
+ }
96
+
97
+ &>div:last-child {
98
+
99
+ .hue-horizontal {
100
+ width: 240px !important;
101
+ height: 12px !important;
102
+ border-radius: 6px !important;
103
+ padding: unset !important;
104
+
105
+ &>div>div {
106
+ margin-top: 1px;
107
+ }
108
+ }
109
+
110
+ &>div:last-child {
111
+ &>div {
112
+ width: 240px !important;
113
+ height: 12px !important;
114
+ margin: unset;
115
+
116
+ &>div:first-child {
117
+ border-radius: 6px !important;
118
+ }
119
+
120
+ &>div:nth-child(2) {
121
+ border-radius: 6px !important;
122
+ }
123
+
124
+ &>div:last-child {
125
+ margin: unset !important;
126
+
127
+ &>div>div {
128
+ margin-top: 1px;
129
+ }
130
+ }
131
+ }
132
+ }
133
+ }
134
+
135
+ }
136
+
137
+ .flexbox-fix:last-child {
138
+ display: none !important;
139
+ }
140
+ }
141
+
142
+ }
143
+
144
+ &-switch {
145
+ margin: 12px 0 0;
146
+ font-size: 12px;
147
+ color: #666666;
148
+ letter-spacing: 0;
149
+ line-height: 16px;
150
+ font-weight: 400;
151
+
152
+ span {
153
+ vertical-align: middle;
154
+ margin-right: 9px;
155
+ }
156
+ }
157
+
158
+ &-input {
159
+ display: inline-block;
160
+ position: relative;
161
+ margin-top: 12px;
162
+ font-size: @color-picker-panel-select-font-size;
163
+
164
+ &-no-recommend {
165
+ margin-bottom: 8px;
166
+ }
167
+
168
+ .@{kd-prefix}-select {
169
+
170
+ &.bottomLeft,
171
+ &.topLeft {
172
+ position: absolute;
173
+ width: 60px !important;
174
+ background: #FFFFFF;
175
+ right: 0;
176
+ left: unset !important;
177
+ box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.20);
178
+ border-radius: 2px;
179
+ }
180
+
181
+ .@{kd-prefix}-select-dropdown {
182
+ overflow: hidden;
183
+ }
184
+ }
185
+
186
+ .@{kd-prefix}-select-bordered {
187
+ border-radius: 2px;
188
+ width: @color-picker-panel-select-sizing-width;
189
+ height: @color-picker-panel-select-sizing-height;
190
+ min-height: 28px;
191
+ margin-top: -2px;
192
+
193
+ .@{kd-prefix}-select-placeholder {
194
+ left: 8px;
195
+ }
196
+ }
197
+
198
+ .active-option {
199
+ background-color: #E3EBFF;
200
+ }
201
+ }
202
+
203
+ &-transparent {
204
+ width: 60px;
205
+ height: 28px;
206
+ margin-left: 8px;
207
+ text-align: center;
208
+ font-size: @color-picker-panel-alpha-font-size;
209
+ }
210
+
211
+ &-colorDivContainer {
212
+ display: grid;
213
+ grid-template-columns: repeat(12, 1fr);
214
+ grid-column-gap: 8px;
215
+ grid-row-gap: 8px;
216
+ margin-top: 12px;
217
+
218
+ li {
219
+ position: relative;
220
+ box-sizing: border-box;
221
+ width: @color-picker-panel-preset-sizing-width;
222
+ height: @color-picker-panel-preset-sizing-height;
223
+ border: 1px solid rgba(0, 0, 0, 0.05);
224
+ border-radius: 2px;
225
+ list-style: none;
226
+ cursor: pointer;
227
+
228
+ .square {
229
+ display: none;
230
+ position: absolute;
231
+ box-sizing: inherit;
232
+ top: -3px;
233
+ left: -3px;
234
+ width: calc(@color-picker-panel-preset-sizing-width + 4px);
235
+ height: calc(@color-picker-panel-preset-sizing-height + 4px);
236
+ border: 1px solid rgba(178, 178, 176, 1);
237
+ border-radius: 4px;
238
+
239
+ &-click {
240
+ display: block;
241
+ box-shadow: 0 0 0 1px #e5e5e5 !important;
242
+ }
243
+ }
244
+
245
+ &:hover {
246
+ .square {
247
+ display: block;
248
+ }
249
+ }
250
+ }
251
+ }
252
+ }
253
+ }