@kdcloudjs/kdesign 1.7.0 → 1.7.2

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 (208) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/dist/default-theme.js +4 -5
  3. package/dist/kdesign-complete.less +332 -35
  4. package/dist/kdesign.css +549 -30
  5. package/dist/kdesign.css.map +1 -1
  6. package/dist/kdesign.js +21841 -3922
  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/style/index.css +2 -0
  20. package/es/checkbox/style/index.css +2 -0
  21. package/es/city-picker/style/index.css +2 -0
  22. package/es/collapse/style/index.css +2 -0
  23. package/es/color-picker/color-picker-panel.d.ts +4 -0
  24. package/es/color-picker/color-picker-panel.js +239 -0
  25. package/es/color-picker/color-picker.d.ts +4 -0
  26. package/es/color-picker/color-picker.js +201 -0
  27. package/es/color-picker/constant/colorTypes.d.ts +4 -0
  28. package/es/color-picker/constant/colorTypes.js +13 -0
  29. package/es/color-picker/constant/defaultColor.d.ts +1 -0
  30. package/es/color-picker/constant/defaultColor.js +1 -0
  31. package/es/color-picker/constant/systemPresetColor.d.ts +1 -0
  32. package/es/color-picker/constant/systemPresetColor.js +1 -0
  33. package/es/color-picker/index.d.ts +3 -0
  34. package/es/color-picker/index.js +3 -0
  35. package/es/color-picker/interface.d.ts +64 -0
  36. package/es/color-picker/interface.js +3 -0
  37. package/es/color-picker/style/css.js +2 -0
  38. package/es/color-picker/style/index.css +323 -0
  39. package/es/color-picker/style/index.d.ts +2 -0
  40. package/es/color-picker/style/index.js +2 -0
  41. package/es/color-picker/style/index.less +257 -0
  42. package/es/color-picker/style/mixin.less +5 -0
  43. package/es/color-picker/style/token.less +22 -0
  44. package/es/color-picker/utils/colorFormat.d.ts +18 -0
  45. package/es/color-picker/utils/colorFormat.js +153 -0
  46. package/es/color-picker/utils/convertLetters.d.ts +1 -0
  47. package/es/color-picker/utils/convertLetters.js +12 -0
  48. package/es/color-picker/utils/hooks/useOnClickOutside.d.ts +2 -0
  49. package/es/color-picker/utils/hooks/useOnClickOutside.js +16 -0
  50. package/es/color-picker/utils/validateColor.d.ts +1 -0
  51. package/es/color-picker/utils/validateColor.js +24 -0
  52. package/es/config-provider/compDefaultProps.d.ts +12 -0
  53. package/es/config-provider/compDefaultProps.js +12 -0
  54. package/es/date-picker/style/index.css +2 -0
  55. package/es/drawer/style/index.css +2 -0
  56. package/es/dropdown/dropdown.js +2 -7
  57. package/es/dropdown/menu.js +3 -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 +1 -0
  67. package/es/index.js +2 -1
  68. package/es/input/style/index.css +2 -0
  69. package/es/input-number/style/index.css +2 -0
  70. package/es/layout/style/index.css +2 -0
  71. package/es/link/style/index.css +2 -0
  72. package/es/locale/locale.d.ts +4 -0
  73. package/es/locale/locale.js +6 -4
  74. package/es/locale/zh-CN.d.ts +1 -0
  75. package/es/locale/zh-CN.js +1 -0
  76. package/es/menu/style/index.css +2 -0
  77. package/es/message/style/index.css +2 -0
  78. package/es/modal/modal.d.ts +7 -1
  79. package/es/modal/modal.js +29 -5
  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-select/style/index.css +2 -0
  107. package/es/typography/style/index.css +2 -0
  108. package/es/upload/style/index.css +2 -0
  109. package/lib/alert/style/index.css +2 -0
  110. package/lib/anchor/style/index.css +2 -0
  111. package/lib/avatar/style/index.css +2 -0
  112. package/lib/badge/style/index.css +2 -0
  113. package/lib/base-data/style/index.css +2 -0
  114. package/lib/button/style/index.css +2 -0
  115. package/lib/card/style/index.css +2 -0
  116. package/lib/carousel/style/index.css +2 -0
  117. package/lib/cascader/style/index.css +2 -0
  118. package/lib/checkbox/style/index.css +2 -0
  119. package/lib/city-picker/style/index.css +2 -0
  120. package/lib/collapse/style/index.css +2 -0
  121. package/lib/color-picker/color-picker-panel.d.ts +4 -0
  122. package/lib/color-picker/color-picker-panel.js +253 -0
  123. package/lib/color-picker/color-picker.d.ts +4 -0
  124. package/lib/color-picker/color-picker.js +214 -0
  125. package/lib/color-picker/constant/colorTypes.d.ts +4 -0
  126. package/lib/color-picker/constant/colorTypes.js +20 -0
  127. package/lib/color-picker/constant/defaultColor.d.ts +1 -0
  128. package/lib/color-picker/constant/defaultColor.js +8 -0
  129. package/lib/color-picker/constant/systemPresetColor.d.ts +1 -0
  130. package/lib/color-picker/constant/systemPresetColor.js +8 -0
  131. package/lib/color-picker/index.d.ts +3 -0
  132. package/lib/color-picker/index.js +27 -0
  133. package/lib/color-picker/interface.d.ts +64 -0
  134. package/lib/color-picker/interface.js +11 -0
  135. package/lib/color-picker/style/css.js +4 -0
  136. package/lib/color-picker/style/index.css +323 -0
  137. package/lib/color-picker/style/index.d.ts +2 -0
  138. package/lib/color-picker/style/index.js +4 -0
  139. package/lib/color-picker/style/index.less +257 -0
  140. package/lib/color-picker/style/mixin.less +5 -0
  141. package/lib/color-picker/style/token.less +22 -0
  142. package/lib/color-picker/utils/colorFormat.d.ts +18 -0
  143. package/lib/color-picker/utils/colorFormat.js +166 -0
  144. package/lib/color-picker/utils/convertLetters.d.ts +1 -0
  145. package/lib/color-picker/utils/convertLetters.js +18 -0
  146. package/lib/color-picker/utils/hooks/useOnClickOutside.d.ts +2 -0
  147. package/lib/color-picker/utils/hooks/useOnClickOutside.js +23 -0
  148. package/lib/color-picker/utils/validateColor.d.ts +1 -0
  149. package/lib/color-picker/utils/validateColor.js +30 -0
  150. package/lib/config-provider/compDefaultProps.d.ts +12 -0
  151. package/lib/config-provider/compDefaultProps.js +12 -0
  152. package/lib/date-picker/style/index.css +2 -0
  153. package/lib/drawer/style/index.css +2 -0
  154. package/lib/dropdown/dropdown.js +2 -7
  155. package/lib/dropdown/menu.js +3 -0
  156. package/lib/dropdown/style/index.css +2 -0
  157. package/lib/empty/style/index.css +2 -0
  158. package/lib/filter/style/index.css +2 -0
  159. package/lib/form/style/index.css +2 -0
  160. package/lib/grid/style/index.css +2 -0
  161. package/lib/icon/style/index.css +2 -0
  162. package/lib/image/style/index.css +2 -0
  163. package/lib/image-cropper/style/index.css +2 -0
  164. package/lib/index.d.ts +1 -0
  165. package/lib/index.js +7 -0
  166. package/lib/input/style/index.css +2 -0
  167. package/lib/input-number/style/index.css +2 -0
  168. package/lib/layout/style/index.css +2 -0
  169. package/lib/link/style/index.css +2 -0
  170. package/lib/locale/locale.d.ts +4 -0
  171. package/lib/locale/locale.js +6 -4
  172. package/lib/locale/zh-CN.d.ts +1 -0
  173. package/lib/locale/zh-CN.js +1 -0
  174. package/lib/menu/style/index.css +2 -0
  175. package/lib/message/style/index.css +2 -0
  176. package/lib/modal/modal.d.ts +7 -1
  177. package/lib/modal/modal.js +31 -7
  178. package/lib/modal/style/index.css +2 -0
  179. package/lib/notification/style/index.css +2 -0
  180. package/lib/pagination/style/index.css +116 -29
  181. package/lib/pagination/style/index.less +38 -29
  182. package/lib/popconfirm/style/index.css +2 -0
  183. package/lib/progress/style/index.css +2 -0
  184. package/lib/radio/style/index.css +2 -0
  185. package/lib/rate/style/index.css +2 -0
  186. package/lib/search/style/index.css +2 -0
  187. package/lib/select/style/index.css +2 -0
  188. package/lib/slider/style/index.css +2 -0
  189. package/lib/space/style/index.css +2 -0
  190. package/lib/spin/style/index.css +2 -0
  191. package/lib/split-panel/style/index.css +2 -0
  192. package/lib/stepper/style/index.css +2 -0
  193. package/lib/steps/style/index.css +2 -0
  194. package/lib/style/components.less +1 -0
  195. package/lib/style/index.css +2 -0
  196. package/lib/style/themes/default.less +10 -6
  197. package/lib/switch/style/index.css +2 -0
  198. package/lib/table/style/index.css +2 -0
  199. package/lib/tabs/style/index.css +2 -0
  200. package/lib/tag/style/index.css +2 -0
  201. package/lib/timeline/style/index.css +2 -0
  202. package/lib/tooltip/style/index.css +2 -0
  203. package/lib/transfer/style/index.css +2 -0
  204. package/lib/tree/style/index.css +2 -0
  205. package/lib/tree-select/style/index.css +2 -0
  206. package/lib/typography/style/index.css +2 -0
  207. package/lib/upload/style/index.css +2 -0
  208. package/package.json +5 -1
@@ -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,323 @@
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 .kd-select-item-option {
258
+ display: -webkit-box;
259
+ display: -ms-flexbox;
260
+ display: flex;
261
+ -webkit-box-pack: center;
262
+ -ms-flex-pack: center;
263
+ justify-content: center;
264
+ min-width: unset;
265
+ }
266
+ .kd-color-picker-pop .kd-color-picker-panel-input .kd-select-bordered {
267
+ border-radius: 2px;
268
+ width: var(--kd-c-color-picker-panel-select-sizing-width, 212px);
269
+ height: var(--kd-c-color-picker-panel-select-sizing-height, 28px);
270
+ min-height: 28px;
271
+ margin-top: -2px;
272
+ }
273
+ .kd-color-picker-pop .kd-color-picker-panel-input .kd-select-bordered .kd-select-placeholder {
274
+ left: 8px;
275
+ }
276
+ .kd-color-picker-pop .kd-color-picker-panel-input .active-option {
277
+ background-color: #E3EBFF;
278
+ }
279
+ .kd-color-picker-pop .kd-color-picker-panel-transparent {
280
+ width: 60px;
281
+ height: 28px;
282
+ margin-left: 8px;
283
+ text-align: center;
284
+ font-size: var(--kd-c-color-picker-panel-alpha-font-size, var(--kd-g-font-size-middle, 14px));
285
+ }
286
+ .kd-color-picker-pop .kd-color-picker-panel-colorDivContainer {
287
+ display: grid;
288
+ grid-template-columns: repeat(12, 1fr);
289
+ grid-column-gap: 8px;
290
+ grid-row-gap: 8px;
291
+ margin-top: 12px;
292
+ }
293
+ .kd-color-picker-pop .kd-color-picker-panel-colorDivContainer li {
294
+ position: relative;
295
+ -webkit-box-sizing: border-box;
296
+ box-sizing: border-box;
297
+ width: var(--kd-c-color-picker-panel-preset-sizing-width, 16px);
298
+ height: var(--kd-c-color-picker-panel-preset-sizing-height, 16px);
299
+ border: 1px solid rgba(0, 0, 0, 0.05);
300
+ border-radius: 2px;
301
+ list-style: none;
302
+ cursor: pointer;
303
+ }
304
+ .kd-color-picker-pop .kd-color-picker-panel-colorDivContainer li .square {
305
+ display: none;
306
+ position: absolute;
307
+ -webkit-box-sizing: inherit;
308
+ box-sizing: inherit;
309
+ top: -3px;
310
+ left: -3px;
311
+ width: calc(var(--kd-c-color-picker-panel-preset-sizing-width, 16px) + 4px);
312
+ height: calc(var(--kd-c-color-picker-panel-preset-sizing-height, 16px) + 4px);
313
+ border: 1px solid #b2b2b0;
314
+ border-radius: 4px;
315
+ }
316
+ .kd-color-picker-pop .kd-color-picker-panel-colorDivContainer li .square-click {
317
+ display: block;
318
+ -webkit-box-shadow: 0 0 0 1px #e5e5e5 !important;
319
+ box-shadow: 0 0 0 1px #e5e5e5 !important;
320
+ }
321
+ .kd-color-picker-pop .kd-color-picker-panel-colorDivContainer li:hover .square {
322
+ display: block;
323
+ }
@@ -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,257 @@
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
+ .@{kd-prefix}-select-item-option {
183
+ display: flex;
184
+ justify-content: center;
185
+ min-width: unset;
186
+ }
187
+ }
188
+ }
189
+
190
+ .@{kd-prefix}-select-bordered {
191
+ border-radius: 2px;
192
+ width: @color-picker-panel-select-sizing-width;
193
+ height: @color-picker-panel-select-sizing-height;
194
+ min-height: 28px;
195
+ margin-top: -2px;
196
+
197
+ .@{kd-prefix}-select-placeholder {
198
+ left: 8px;
199
+ }
200
+ }
201
+
202
+ .active-option {
203
+ background-color: #E3EBFF;
204
+ }
205
+ }
206
+
207
+ &-transparent {
208
+ width: 60px;
209
+ height: 28px;
210
+ margin-left: 8px;
211
+ text-align: center;
212
+ font-size: @color-picker-panel-alpha-font-size;
213
+ }
214
+
215
+ &-colorDivContainer {
216
+ display: grid;
217
+ grid-template-columns: repeat(12, 1fr);
218
+ grid-column-gap: 8px;
219
+ grid-row-gap: 8px;
220
+ margin-top: 12px;
221
+
222
+ li {
223
+ position: relative;
224
+ box-sizing: border-box;
225
+ width: @color-picker-panel-preset-sizing-width;
226
+ height: @color-picker-panel-preset-sizing-height;
227
+ border: 1px solid rgba(0, 0, 0, 0.05);
228
+ border-radius: 2px;
229
+ list-style: none;
230
+ cursor: pointer;
231
+
232
+ .square {
233
+ display: none;
234
+ position: absolute;
235
+ box-sizing: inherit;
236
+ top: -3px;
237
+ left: -3px;
238
+ width: calc(@color-picker-panel-preset-sizing-width + 4px);
239
+ height: calc(@color-picker-panel-preset-sizing-height + 4px);
240
+ border: 1px solid rgba(178, 178, 176, 1);
241
+ border-radius: 4px;
242
+
243
+ &-click {
244
+ display: block;
245
+ box-shadow: 0 0 0 1px #e5e5e5 !important;
246
+ }
247
+ }
248
+
249
+ &:hover {
250
+ .square {
251
+ display: block;
252
+ }
253
+ }
254
+ }
255
+ }
256
+ }
257
+ }
@@ -0,0 +1,5 @@
1
+
2
+ // code component mixin here
3
+ .test() {
4
+ display: inline;
5
+ }
@@ -0,0 +1,22 @@
1
+ @import '../../style/themes/token.less';
2
+
3
+ @color-picker-custom-prefix: ~'--@{kd-prefix}-c-color-picker';
4
+
5
+ // z-index
6
+ @color-picker-panel-z-index: var(~'@{color-picker-custom-prefix}-panel-z-index', @z-index-popper);
7
+
8
+ // font
9
+ @color-picker-input-font-size: var(~'@{color-picker-custom-prefix}-input-font-size', @font-size-middle);
10
+ @color-picker-panel-select-font-size: var(~'@{color-picker-custom-prefix}-panel-select-font-size', @font-size-middle);
11
+ @color-picker-panel-alpha-font-size: var(~'@{color-picker-custom-prefix}-panel-alpha-font-size', @font-size-middle);
12
+
13
+ // sizing
14
+ @color-picker-input-sizing-width: var(~'@{color-picker-custom-prefix}-input-sizing-width', 230px);
15
+ @color-picker-input-sizing-height: var(~'@{color-picker-custom-prefix}-input-sizing-height', 28px);
16
+ @color-picker-input-suffix-sizing-width: var(~'@{color-picker-custom-prefix}-input-suffix-sizing-width', 20px);
17
+ @color-picker-input-suffix-sizing-height: var(~'@{color-picker-custom-prefix}-input-suffix-sizing-height', 20px);
18
+ @color-picker-panel-sizing-width: var(~'@{color-picker-custom-prefix}-panel-sizing-width', 304px);
19
+ @color-picker-panel-select-sizing-width: var(~'@{color-picker-custom-prefix}-panel-select-sizing-width', 212px);
20
+ @color-picker-panel-select-sizing-height: var(~'@{color-picker-custom-prefix}-panel-select-sizing-height', 28px);
21
+ @color-picker-panel-preset-sizing-width: var(~'@{color-picker-custom-prefix}-panel-preset-sizing-width', 16px);
22
+ @color-picker-panel-preset-sizing-height: var(~'@{color-picker-custom-prefix}-panel-preset-sizing-height', 16px);