@king-design/react 3.0.0 → 3.1.0-beta.0

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 (381) hide show
  1. package/__tests__/__snapshots__/Dialog.md +1 -1
  2. package/__tests__/__snapshots__/React Demos.md +268 -268
  3. package/components/affix/index.d.ts +1 -0
  4. package/components/affix/index.js +2 -0
  5. package/components/affix/index.vdt.js +5 -5
  6. package/components/affix/styles.d.ts +1 -1
  7. package/components/affix/styles.js +1 -1
  8. package/components/badge/index.d.ts +1 -0
  9. package/components/badge/index.js +13 -1
  10. package/components/badge/index.vdt.js +5 -4
  11. package/components/badge/styles.d.ts +1 -1
  12. package/components/badge/styles.js +2 -2
  13. package/components/breadcrumb/index.d.ts +1 -0
  14. package/components/breadcrumb/index.js +13 -1
  15. package/components/breadcrumb/index.vdt.js +4 -5
  16. package/components/breadcrumb/item.d.ts +1 -0
  17. package/components/breadcrumb/item.js +2 -0
  18. package/components/breadcrumb/item.vdt.js +4 -5
  19. package/components/breadcrumb/styles.d.ts +1 -1
  20. package/components/breadcrumb/styles.js +2 -2
  21. package/components/button/group.d.ts +1 -0
  22. package/components/button/group.js +13 -1
  23. package/components/button/group.vdt.js +2 -6
  24. package/components/button/index.d.ts +1 -0
  25. package/components/button/index.js +2 -0
  26. package/components/button/index.vdt.js +7 -7
  27. package/components/button/styles.d.ts +2 -4
  28. package/components/button/styles.js +19 -20
  29. package/components/card/column.d.ts +1 -0
  30. package/components/card/column.js +13 -1
  31. package/components/card/column.vdt.js +2 -5
  32. package/components/card/index.d.ts +1 -0
  33. package/components/card/index.js +13 -1
  34. package/components/card/index.vdt.js +5 -11
  35. package/components/card/styles.d.ts +1 -1
  36. package/components/card/styles.js +2 -2
  37. package/components/carousel/index.d.ts +1 -0
  38. package/components/carousel/index.js +2 -0
  39. package/components/carousel/index.vdt.js +15 -19
  40. package/components/carousel/item.d.ts +1 -0
  41. package/components/carousel/item.js +13 -1
  42. package/components/carousel/item.vdt.js +2 -3
  43. package/components/carousel/styles.d.ts +2 -2
  44. package/components/carousel/styles.js +4 -4
  45. package/components/cascader/index.vdt.js +20 -29
  46. package/components/cascader/styles.d.ts +2 -2
  47. package/components/cascader/styles.js +3 -3
  48. package/components/checkbox/index.d.ts +1 -0
  49. package/components/checkbox/index.js +2 -0
  50. package/components/checkbox/index.vdt.js +4 -8
  51. package/components/checkbox/styles.d.ts +1 -1
  52. package/components/checkbox/styles.js +2 -2
  53. package/components/code/index.d.ts +1 -0
  54. package/components/code/index.js +2 -0
  55. package/components/code/index.vdt.js +2 -3
  56. package/components/code/styles.d.ts +1 -1
  57. package/components/code/styles.js +1 -1
  58. package/components/collapse/index.d.ts +1 -0
  59. package/components/collapse/index.js +13 -1
  60. package/components/collapse/index.vdt.js +2 -3
  61. package/components/collapse/item.d.ts +1 -0
  62. package/components/collapse/item.js +2 -0
  63. package/components/collapse/item.vdt.js +6 -8
  64. package/components/collapse/styles.d.ts +2 -3
  65. package/components/collapse/styles.js +5 -9
  66. package/components/colorpicker/drag.d.ts +1 -0
  67. package/components/colorpicker/drag.js +2 -0
  68. package/components/colorpicker/drag.vdt.js +3 -2
  69. package/components/colorpicker/index.d.ts +1 -0
  70. package/components/colorpicker/index.js +13 -1
  71. package/components/colorpicker/index.vdt.js +5 -6
  72. package/components/colorpicker/panel.d.ts +1 -0
  73. package/components/colorpicker/panel.js +2 -0
  74. package/components/colorpicker/panel.vdt.js +16 -19
  75. package/components/colorpicker/styles.d.ts +3 -3
  76. package/components/colorpicker/styles.js +8 -8
  77. package/components/config/index.d.ts +10 -0
  78. package/components/config/index.js +23 -0
  79. package/components/config/index.spec.d.ts +1 -0
  80. package/components/config/index.spec.js +71 -0
  81. package/components/context.d.ts +2 -1
  82. package/components/context.js +8 -2
  83. package/components/copy/index.d.ts +1 -0
  84. package/components/copy/index.js +2 -0
  85. package/components/copy/index.vdt.js +9 -9
  86. package/components/copy/styles.d.ts +1 -1
  87. package/components/copy/styles.js +1 -1
  88. package/components/datepicker/calendar.d.ts +1 -0
  89. package/components/datepicker/calendar.js +2 -0
  90. package/components/datepicker/calendar.vdt.js +38 -51
  91. package/components/datepicker/index.vdt.js +13 -16
  92. package/components/datepicker/styles.d.ts +3 -3
  93. package/components/datepicker/styles.js +6 -6
  94. package/components/datepicker/time.d.ts +1 -0
  95. package/components/datepicker/time.js +2 -0
  96. package/components/datepicker/time.vdt.js +2 -3
  97. package/components/diagram/diagram.d.ts +1 -0
  98. package/components/diagram/diagram.js +2 -0
  99. package/components/diagram/diagram.vdt.js +3 -4
  100. package/components/diagram/styles.d.ts +1 -1
  101. package/components/diagram/styles.js +1 -1
  102. package/components/dialog/alert.vdt.js +6 -10
  103. package/components/dialog/base.d.ts +4 -0
  104. package/components/dialog/base.js +2 -0
  105. package/components/dialog/base.vdt.js +15 -21
  106. package/components/dialog/index.d.ts +1 -1
  107. package/components/dialog/styles.d.ts +3 -3
  108. package/components/dialog/styles.js +12 -12
  109. package/components/drawer/index.vdt.js +3 -4
  110. package/components/drawer/styles.d.ts +1 -1
  111. package/components/drawer/styles.js +3 -3
  112. package/components/dropdown/dropdown.d.ts +1 -0
  113. package/components/dropdown/dropdown.js +4 -3
  114. package/components/dropdown/item.d.ts +1 -0
  115. package/components/dropdown/item.js +2 -0
  116. package/components/dropdown/item.vdt.js +2 -4
  117. package/components/dropdown/menu.d.ts +1 -0
  118. package/components/dropdown/menu.js +2 -0
  119. package/components/dropdown/menu.vdt.js +2 -3
  120. package/components/dropdown/styles.d.ts +2 -2
  121. package/components/dropdown/styles.js +4 -4
  122. package/components/dropdown/usePosition.js +2 -2
  123. package/components/editable/index.d.ts +1 -0
  124. package/components/editable/index.js +2 -0
  125. package/components/editable/index.vdt.js +3 -7
  126. package/components/editable/styles.d.ts +1 -1
  127. package/components/editable/styles.js +2 -2
  128. package/components/form/form.d.ts +1 -0
  129. package/components/form/form.js +2 -0
  130. package/components/form/form.vdt.js +2 -3
  131. package/components/form/item.d.ts +1 -0
  132. package/components/form/item.js +2 -0
  133. package/components/form/item.vdt.js +13 -19
  134. package/components/form/styles.d.ts +2 -2
  135. package/components/form/styles.js +5 -5
  136. package/components/form/useError.d.ts +1 -0
  137. package/components/grid/col.d.ts +1 -0
  138. package/components/grid/col.js +2 -0
  139. package/components/grid/col.vdt.js +3 -6
  140. package/components/grid/row.d.ts +1 -0
  141. package/components/grid/row.js +2 -0
  142. package/components/grid/row.vdt.js +2 -3
  143. package/components/grid/styles.d.ts +2 -2
  144. package/components/grid/styles.js +8 -18
  145. package/components/grid/useBreakpoints.d.ts +1 -1
  146. package/components/grid/useBreakpoints.js +2 -2
  147. package/components/grid/useGutter.d.ts +1 -0
  148. package/components/icon/index.d.ts +1 -0
  149. package/components/icon/index.js +2 -0
  150. package/components/icon/index.vdt.js +7 -11
  151. package/components/icon/styles.d.ts +1 -2
  152. package/components/icon/styles.js +7 -5
  153. package/components/input/index.d.ts +1 -0
  154. package/components/input/index.js +2 -0
  155. package/components/input/index.vdt.js +16 -26
  156. package/components/input/search.d.ts +1 -0
  157. package/components/input/search.js +2 -0
  158. package/components/input/search.vdt.js +5 -7
  159. package/components/input/styles.d.ts +2 -2
  160. package/components/input/styles.js +11 -11
  161. package/components/layout/aside.d.ts +1 -0
  162. package/components/layout/aside.js +2 -0
  163. package/components/layout/aside.vdt.js +5 -8
  164. package/components/layout/body.d.ts +2 -0
  165. package/components/layout/body.js +11 -5
  166. package/components/layout/footer.d.ts +1 -0
  167. package/components/layout/footer.js +15 -4
  168. package/components/layout/header.d.ts +3 -0
  169. package/components/layout/header.js +10 -6
  170. package/components/layout/helpers.d.ts +1 -0
  171. package/components/layout/helpers.js +1 -0
  172. package/components/layout/index.spec.d.ts +1 -0
  173. package/components/layout/index.spec.js +53 -0
  174. package/components/layout/layout.d.ts +2 -0
  175. package/components/layout/layout.js +7 -5
  176. package/components/layout/styles.d.ts +3 -3
  177. package/components/layout/styles.js +11 -11
  178. package/components/layout/template.vdt.js +2 -1
  179. package/components/menu/item.d.ts +1 -0
  180. package/components/menu/item.js +2 -0
  181. package/components/menu/item.vdt.js +7 -12
  182. package/components/menu/menu.d.ts +1 -0
  183. package/components/menu/menu.js +2 -0
  184. package/components/menu/menu.vdt.js +3 -6
  185. package/components/menu/styles.d.ts +3 -3
  186. package/components/menu/styles.js +11 -11
  187. package/components/menu/useDropdown.js +6 -1
  188. package/components/message/message.d.ts +1 -0
  189. package/components/message/message.js +2 -0
  190. package/components/message/message.vdt.js +12 -17
  191. package/components/message/messages.d.ts +1 -0
  192. package/components/message/messages.js +2 -0
  193. package/components/message/messages.vdt.js +2 -3
  194. package/components/message/styles.d.ts +2 -2
  195. package/components/message/styles.js +4 -4
  196. package/components/pagination/index.d.ts +1 -0
  197. package/components/pagination/index.js +2 -0
  198. package/components/pagination/index.vdt.js +14 -17
  199. package/components/pagination/styles.d.ts +1 -1
  200. package/components/pagination/styles.js +4 -4
  201. package/components/popover/content.vdt.js +5 -4
  202. package/components/popover/styles.d.ts +1 -1
  203. package/components/popover/styles.js +2 -2
  204. package/components/portal.d.ts +1 -0
  205. package/components/portal.js +3 -1
  206. package/components/progress/index.d.ts +1 -0
  207. package/components/progress/index.js +2 -0
  208. package/components/progress/index.vdt.js +14 -17
  209. package/components/progress/styles.d.ts +1 -1
  210. package/components/progress/styles.js +6 -6
  211. package/components/radio/index.d.ts +1 -0
  212. package/components/radio/index.js +2 -0
  213. package/components/radio/index.vdt.js +4 -7
  214. package/components/radio/styles.d.ts +1 -1
  215. package/components/radio/styles.js +2 -2
  216. package/components/rate/index.d.ts +1 -0
  217. package/components/rate/index.js +2 -0
  218. package/components/rate/index.vdt.js +4 -8
  219. package/components/rate/styles.d.ts +1 -1
  220. package/components/rate/styles.js +2 -2
  221. package/components/scrollSelect/index.d.ts +1 -0
  222. package/components/scrollSelect/index.js +2 -0
  223. package/components/scrollSelect/index.vdt.js +7 -12
  224. package/components/scrollSelect/styles.d.ts +1 -1
  225. package/components/scrollSelect/styles.js +2 -2
  226. package/components/select/base.d.ts +4 -0
  227. package/components/select/base.js +2 -0
  228. package/components/select/base.vdt.js +17 -21
  229. package/components/select/group.d.ts +1 -0
  230. package/components/select/group.js +2 -0
  231. package/components/select/group.vdt.js +3 -4
  232. package/components/select/menu.d.ts +1 -0
  233. package/components/select/menu.js +2 -0
  234. package/components/select/menu.vdt.js +9 -13
  235. package/components/select/option.d.ts +1 -0
  236. package/components/select/option.js +2 -0
  237. package/components/select/option.vdt.js +6 -8
  238. package/components/select/styles.d.ts +3 -3
  239. package/components/select/styles.js +8 -8
  240. package/components/select/useSearchable.d.ts +1 -0
  241. package/components/skeleton/item.d.ts +1 -0
  242. package/components/skeleton/item.js +13 -1
  243. package/components/skeleton/item.vdt.js +4 -7
  244. package/components/skeleton/skeleton.d.ts +1 -0
  245. package/components/skeleton/skeleton.js +13 -1
  246. package/components/skeleton/skeleton.vdt.js +4 -6
  247. package/components/skeleton/styles.d.ts +6 -0
  248. package/components/skeleton/styles.js +35 -0
  249. package/components/slider/index.d.ts +1 -0
  250. package/components/slider/index.js +2 -0
  251. package/components/slider/index.vdt.js +18 -22
  252. package/components/slider/styles.d.ts +1 -1
  253. package/components/slider/styles.js +2 -2
  254. package/components/spin/index.d.ts +1 -0
  255. package/components/spin/index.js +13 -1
  256. package/components/spin/index.vdt.js +6 -7
  257. package/components/spin/styles.d.ts +1 -1
  258. package/components/spin/styles.js +4 -4
  259. package/components/spinner/index.d.ts +1 -0
  260. package/components/spinner/index.js +2 -0
  261. package/components/spinner/index.vdt.js +15 -21
  262. package/components/spinner/styles.d.ts +1 -1
  263. package/components/spinner/styles.js +7 -7
  264. package/components/split/index.d.ts +2 -1
  265. package/components/split/index.js +2 -0
  266. package/components/split/index.vdt.js +7 -9
  267. package/components/split/styles.d.ts +4 -0
  268. package/components/split/styles.js +55 -0
  269. package/components/steps/context.d.ts +1 -0
  270. package/components/steps/index.d.ts +1 -0
  271. package/components/steps/index.js +13 -1
  272. package/components/steps/index.vdt.js +2 -3
  273. package/components/steps/step.d.ts +1 -0
  274. package/components/steps/step.js +13 -1
  275. package/components/steps/step.vdt.js +10 -16
  276. package/components/steps/styles.d.ts +3 -3
  277. package/components/steps/styles.js +18 -18
  278. package/components/switch/index.d.ts +1 -0
  279. package/components/switch/index.js +2 -0
  280. package/components/switch/index.vdt.js +6 -7
  281. package/components/switch/styles.d.ts +1 -1
  282. package/components/switch/styles.js +4 -4
  283. package/components/table/cell.d.ts +1 -0
  284. package/components/table/cell.js +13 -1
  285. package/components/table/cell.vdt.js +6 -6
  286. package/components/table/column.d.ts +1 -0
  287. package/components/table/column.js +2 -0
  288. package/components/table/column.vdt.js +24 -32
  289. package/components/table/index.spec.js +1 -1
  290. package/components/table/row.d.ts +1 -0
  291. package/components/table/row.js +21 -2
  292. package/components/table/row.vdt.js +3 -10
  293. package/components/table/styles.d.ts +2 -2
  294. package/components/table/styles.js +6 -6
  295. package/components/table/table.d.ts +2 -1
  296. package/components/table/table.js +3 -1
  297. package/components/table/table.vdt.js +16 -20
  298. package/components/table/useColumns.d.ts +1 -0
  299. package/components/table/useFixedColumns.d.ts +2 -1
  300. package/components/table/useGroup.d.ts +1 -0
  301. package/components/table/usePagination.js +1 -1
  302. package/components/table/useResizable.d.ts +1 -0
  303. package/components/table/useSortable.d.ts +1 -0
  304. package/components/tabs/index.d.ts +4 -0
  305. package/components/tabs/index.js +2 -0
  306. package/components/tabs/index.vdt.js +9 -10
  307. package/components/tabs/styles.d.ts +1 -1
  308. package/components/tabs/styles.js +15 -15
  309. package/components/tabs/tab.d.ts +1 -0
  310. package/components/tabs/tab.js +2 -0
  311. package/components/tabs/tab.vdt.js +3 -5
  312. package/components/tabs/useActiveBar.js +2 -1
  313. package/components/tabs/useScroll.js +2 -1
  314. package/components/tag/base.d.ts +1 -0
  315. package/components/tag/base.js +13 -1
  316. package/components/tag/index.vdt.js +4 -5
  317. package/components/tag/styles.d.ts +2 -2
  318. package/components/tag/styles.js +7 -7
  319. package/components/tag/tags.d.ts +1 -0
  320. package/components/tag/tags.js +2 -0
  321. package/components/tag/tags.vdt.js +5 -11
  322. package/components/timeline/item.d.ts +1 -0
  323. package/components/timeline/item.js +13 -1
  324. package/components/timeline/item.vdt.js +4 -5
  325. package/components/timeline/styles.d.ts +2 -2
  326. package/components/timeline/styles.js +6 -6
  327. package/components/timeline/timeline.d.ts +1 -0
  328. package/components/timeline/timeline.js +13 -1
  329. package/components/timeline/timeline.vdt.js +2 -3
  330. package/components/timepicker/index.d.ts +2 -1
  331. package/components/timepicker/panelPicker.vdt.js +13 -17
  332. package/components/timepicker/selectPicker.d.ts +1 -0
  333. package/components/timepicker/selectPicker.js +2 -0
  334. package/components/timepicker/selectPicker.vdt.js +4 -4
  335. package/components/timepicker/styles.d.ts +1 -1
  336. package/components/timepicker/styles.js +2 -2
  337. package/components/tip/index.vdt.js +5 -6
  338. package/components/tip/styles.d.ts +1 -1
  339. package/components/tip/styles.js +2 -2
  340. package/components/tooltip/content.vdt.js +4 -9
  341. package/components/tooltip/styles.d.ts +1 -1
  342. package/components/tooltip/styles.js +6 -6
  343. package/components/transfer/index.d.ts +1 -0
  344. package/components/transfer/index.js +2 -0
  345. package/components/transfer/index.vdt.js +20 -25
  346. package/components/transfer/styles.d.ts +1 -1
  347. package/components/transfer/styles.js +2 -2
  348. package/components/tree/index.d.ts +1 -0
  349. package/components/tree/index.js +2 -0
  350. package/components/tree/index.vdt.js +19 -30
  351. package/components/tree/styles.d.ts +1 -1
  352. package/components/tree/styles.js +2 -2
  353. package/components/treeSelect/index.vdt.js +2 -3
  354. package/components/treeSelect/styles.d.ts +1 -1
  355. package/components/treeSelect/styles.js +1 -1
  356. package/components/upload/index.d.ts +1 -0
  357. package/components/upload/index.js +2 -0
  358. package/components/upload/index.vdt.js +39 -50
  359. package/components/upload/styles.d.ts +2 -2
  360. package/components/upload/styles.js +3 -3
  361. package/components/utils.d.ts +3 -1
  362. package/components/utils.js +36 -9
  363. package/components/virtual.js +5 -2
  364. package/components/wave/index.d.ts +1 -0
  365. package/components/wave/index.js +4 -2
  366. package/components/wave/styles.d.ts +1 -1
  367. package/components/wave/styles.js +2 -2
  368. package/index.d.ts +3 -2
  369. package/index.js +3 -2
  370. package/package.json +2 -2
  371. package/styles/fonts/iconfont.d.ts +1 -1
  372. package/styles/fonts/iconfont.js +4 -1
  373. package/styles/global.js +4 -4
  374. package/styles/theme.d.ts +1 -1
  375. package/styles/theme.js +4 -53
  376. package/styles/utils.d.ts +1 -0
  377. package/styles/utils.js +3 -0
  378. package/components/skeleton/style.d.ts +0 -6
  379. package/components/skeleton/style.js +0 -35
  380. package/components/split/style.d.ts +0 -4
  381. package/components/split/style.js +0 -55
@@ -8,7 +8,7 @@ import { Tooltip } from '../tooltip';
8
8
  import { Tags } from './tags';
9
9
  import { Virtual } from '../virtual';
10
10
  export default function ($props, $blocks, $__proto__) {
11
- var _classNameObj;
11
+ var _classNameObj, _$cn2;
12
12
 
13
13
  $blocks || ($blocks = {});
14
14
  $props || ($props = {});
@@ -23,11 +23,8 @@ export default function ($props, $blocks, $__proto__) {
23
23
  border = _this$get.border,
24
24
  draggable = _this$get.draggable;
25
25
 
26
- var classNameObj = (_classNameObj = {
27
- 'k-tags': true,
28
- 'k-nowrap': nowrap,
29
- 'k-draggable': draggable
30
- }, _classNameObj[makeTagsStyles()] = true, _classNameObj[className] = className, _classNameObj);
26
+ var k = this.config.k;
27
+ var classNameObj = (_classNameObj = {}, _classNameObj[k + "-tags"] = true, _classNameObj[k + "-nowrap"] = nowrap, _classNameObj[k + "-draggable"] = draggable, _classNameObj[makeTagsStyles(k)] = true, _classNameObj[className] = className, _classNameObj);
31
28
  var _this$nowrap = this.nowrap,
32
29
  containerRef = _this$nowrap.containerRef,
33
30
  children = _this$nowrap.children,
@@ -49,13 +46,10 @@ export default function ($props, $blocks, $__proto__) {
49
46
  'key': '$tooltip',
50
47
  'hoverable': true,
51
48
  'theme': 'light',
52
- 'className': 'k-tags-tooltip',
49
+ 'className': _$cn(k + "-tags-tooltip"),
53
50
  'children': _$cc(Tag, {
54
51
  'key': '$more',
55
- 'className': _$cn({
56
- "k-tags-more": true,
57
- 'c-hidden': !hiddenChildren.value.length
58
- }),
52
+ 'className': _$cn((_$cn2 = {}, _$cn2[k + "-tags-more"] = true, _$cn2['c-hidden'] = !hiddenChildren.value.length, _$cn2)),
59
53
  'size': size,
60
54
  'border': border,
61
55
  'children': [_$ct('\n +'), hiddenChildren.value.length]
@@ -14,4 +14,5 @@ export declare class TimelineItem extends Component<TimelineItemProps, TimelineI
14
14
  static template: string | import("intact").Template<any>;
15
15
  static typeDefs: Required<TypeDefs<TimelineItemProps>>;
16
16
  static defaults: () => Partial<TimelineItemProps>;
17
+ private config;
17
18
  }
@@ -1,8 +1,10 @@
1
1
  import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
2
+ import _concatInstanceProperty from "@babel/runtime-corejs3/core-js/instance/concat";
2
3
  import { Component } from 'intact-react';
3
4
  import template from './item.vdt';
4
5
  import { sizes } from '../../styles/utils';
5
6
  import { types } from './styles';
7
+ import { useConfigContext } from '../config';
6
8
  var typeDefs = {
7
9
  type: types,
8
10
  size: sizes
@@ -19,7 +21,17 @@ export var TimelineItem = /*#__PURE__*/function (_Component) {
19
21
  _inheritsLoose(TimelineItem, _Component);
20
22
 
21
23
  function TimelineItem() {
22
- return _Component.apply(this, arguments) || this;
24
+ var _context;
25
+
26
+ var _this;
27
+
28
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
29
+ args[_key] = arguments[_key];
30
+ }
31
+
32
+ _this = _Component.call.apply(_Component, _concatInstanceProperty(_context = [this]).call(_context, args)) || this;
33
+ _this.config = useConfigContext();
34
+ return _this;
23
35
  }
24
36
 
25
37
  return TimelineItem;
@@ -17,13 +17,12 @@ export default function ($props, $blocks, $__proto__) {
17
17
  type = _this$get.type,
18
18
  size = _this$get.size;
19
19
 
20
- var classNameObj = (_classNameObj = {
21
- 'k-timeline-item': true
22
- }, _classNameObj[className] = className, _classNameObj["k-" + type] = true, _classNameObj["k-" + size] = size !== 'default', _classNameObj[makeItemStyles()] = true, _classNameObj);
20
+ var k = this.config.k;
21
+ var classNameObj = (_classNameObj = {}, _classNameObj[k + "-timeline-item"] = true, _classNameObj[className] = className, _classNameObj[k + "-" + type] = true, _classNameObj[k + "-" + size] = size !== 'default', _classNameObj[makeItemStyles(k)] = true, _classNameObj);
23
22
  return _$cv('div', _extends({
24
23
  'className': _$cn(classNameObj)
25
24
  }, getRestProps(this)), [_$ce(2, 'div', [_$ce(2, 'div', (_$blocks['dot'] = function ($super) {
26
- return _$ce(2, 'div', null, 1, 'k-timeline-circle');
25
+ return _$ce(2, 'div', null, 1, _$cn(k + "-timeline-circle"));
27
26
  }, __$blocks['dot'] = function ($super, data) {
28
27
  var block = $blocks['dot'];
29
28
 
@@ -32,6 +31,6 @@ export default function ($props, $blocks, $__proto__) {
32
31
  };
33
32
 
34
33
  return block ? block.call($this, callBlock, data) : callBlock();
35
- }, __$blocks['dot'](_$no)), 0, 'k-timeline-dot'), _$ce(2, 'div', null, 1, 'k-timeline-line')], 4, 'k-timeline-indicator'), _$ce(2, 'div', children, 0, 'k-timeline-content')]);
34
+ }, __$blocks['dot'](_$no)), 0, _$cn(k + "-timeline-dot")), _$ce(2, 'div', null, 1, _$cn(k + "-timeline-line"))], 4, _$cn(k + "-timeline-indicator")), _$ce(2, 'div', children, 0, _$cn(k + "-timeline-content"))]);
36
35
  }
37
36
  ;
@@ -2,6 +2,6 @@ import '../../styles/global';
2
2
  declare type ValueOf<T extends readonly any[]> = T[number];
3
3
  export declare type Types = ValueOf<typeof types>;
4
4
  export declare const types: readonly ["primary", "warning", "danger", "success"];
5
- export declare function makeStyles(): string;
6
- export declare function makeItemStyles(): string;
5
+ export declare function makeStyles(k: string): string;
6
+ export declare function makeItemStyles(k: string): string;
7
7
  export {};
@@ -48,18 +48,18 @@ setDefault(function () {
48
48
  timeline: defaults
49
49
  }).timeline;
50
50
  });
51
- export function makeStyles() {
51
+ export function makeStyles(k) {
52
52
  return /*#__PURE__*/css("font-size:", timeline.fontSize, ";padding-top:calc(", theme.lineHeight, "em / 2);");
53
53
  }
54
- export function makeItemStyles() {
55
- return /*#__PURE__*/css("position:relative;padding:", timeline.padding, ";.k-timeline-indicator{width:", timeline.indicator.width, ";position:absolute;left:0;top:0;height:100%;text-align:center;}.k-timeline-dot{position:relative;z-index:1;transform:translateY(-50%);}.k-timeline-circle{position:relative;background:", theme.color.primary, ";border-radius:50%;left:50%;}.k-timeline-line{position:absolute;height:100%;border-left:", timeline.lineBorder, ";top:0;left:50%;}.k-timeline-content{position:relative;top:calc(-0.5 * ", theme.lineHeight, "em);}&:last-of-type{.k-timeline-line{display:none;}}", _mapInstanceProperty(types).call(types, function (type) {
54
+ export function makeItemStyles(k) {
55
+ return /*#__PURE__*/css("position:relative;padding:", timeline.padding, ";.", k, "-timeline-indicator{width:", timeline.indicator.width, ";position:absolute;left:0;top:0;height:100%;text-align:center;}.", k, "-timeline-dot{position:relative;z-index:1;transform:translateY(-50%);}.", k, "-timeline-circle{position:relative;background:", theme.color.primary, ";border-radius:50%;left:50%;}.", k, "-timeline-line{position:absolute;height:100%;border-left:", timeline.lineBorder, ";top:0;left:50%;}.", k, "-timeline-content{position:relative;top:calc(-0.5 * ", theme.lineHeight, "em);}&:last-of-type{.", k, "-timeline-line{display:none;}}", _mapInstanceProperty(types).call(types, function (type) {
56
56
  var typeStyles = timeline[type];
57
- return /*#__PURE__*/css("&.k-", type, "{.k-timeline-indicator{color:", typeStyles.color, ";}.k-timeline-circle{background:", typeStyles.color, ";}}");
57
+ return /*#__PURE__*/css("&.", k, "-", type, "{.", k, "-timeline-indicator{color:", typeStyles.color, ";}.", k, "-timeline-circle{background:", typeStyles.color, ";}}");
58
58
  }), _mapInstanceProperty(sizes).call(sizes, function (size) {
59
59
  var styles = timeline[size];
60
- var sizeClassName = /*#__PURE__*/css(".k-timeline-circle{width:", styles.width, ";height:", styles.width, ";margin-left:calc(-0.5 * ", styles.width, ");}");
60
+ var sizeClassName = /*#__PURE__*/css(".", k, "-timeline-circle{width:", styles.width, ";height:", styles.width, ";margin-left:calc(-0.5 * ", styles.width, ");}");
61
61
  if (size === 'default') return sizeClassName;
62
- return /*#__PURE__*/css("&.k-", size, "{", sizeClassName, ";}");
62
+ return /*#__PURE__*/css("&.", k, "-", size, "{", sizeClassName, ";}");
63
63
  }), ";");
64
64
  }
65
65
  ;
@@ -3,4 +3,5 @@ export interface TimelineProps {
3
3
  }
4
4
  export declare class Timeline extends Component<TimelineProps> {
5
5
  static template: string | import("intact").Template<any>;
6
+ private config;
6
7
  }
@@ -1,11 +1,23 @@
1
1
  import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
2
+ import _concatInstanceProperty from "@babel/runtime-corejs3/core-js/instance/concat";
2
3
  import { Component } from 'intact-react';
3
4
  import template from './timeline.vdt';
5
+ import { useConfigContext } from '../config';
4
6
  export var Timeline = /*#__PURE__*/function (_Component) {
5
7
  _inheritsLoose(Timeline, _Component);
6
8
 
7
9
  function Timeline() {
8
- return _Component.apply(this, arguments) || this;
10
+ var _context;
11
+
12
+ var _this;
13
+
14
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
15
+ args[_key] = arguments[_key];
16
+ }
17
+
18
+ _this = _Component.call.apply(_Component, _concatInstanceProperty(_context = [this]).call(_context, args)) || this;
19
+ _this.config = useConfigContext();
20
+ return _this;
9
21
  }
10
22
 
11
23
  return Timeline;
@@ -13,9 +13,8 @@ export default function ($props, $blocks, $__proto__) {
13
13
  className = _this$get.className,
14
14
  children = _this$get.children;
15
15
 
16
- var classNameObj = (_classNameObj = {
17
- 'k-timeline': true
18
- }, _classNameObj[className] = className, _classNameObj[makeStyles()] = true, _classNameObj);
16
+ var k = this.config.k;
17
+ var classNameObj = (_classNameObj = {}, _classNameObj[k + "-timeline"] = true, _classNameObj[className] = className, _classNameObj[makeStyles(k)] = true, _classNameObj);
19
18
  return _$cv('div', _extends({
20
19
  'className': _$cn(classNameObj)
21
20
  }, getRestProps(this)), children);
@@ -1,9 +1,10 @@
1
1
  import { Component } from 'intact-react';
2
2
  import { TimepickerProps, TimepickerEvents, TimepickerBlocks } from './constants';
3
+ import { PanelPicker } from './panelPicker';
3
4
  import { SelectPicker } from './selectPicker';
4
5
  export type { TimepickerProps, TimepickerEvents, TimepickerBlocks };
5
6
  export declare class Timepicker<Multipe extends boolean = false, Range extends boolean = false> extends Component<TimepickerProps<Multipe, Range>, TimepickerEvents, TimepickerBlocks<Range>> {
6
7
  static $doubleVNodes: boolean;
7
- static template(this: Timepicker): import("intact").VNode<typeof SelectPicker>;
8
+ static template(this: Timepicker): import("intact").VNode<typeof SelectPicker> | import("intact").VNode<typeof PanelPicker>;
8
9
  static typeDefs: Required<import("intact").TypeDefs<TimepickerProps<boolean, boolean>>>;
9
10
  }
@@ -1,4 +1,4 @@
1
- import { createElementVNode as _$ce, createUnknownComponentVNode as _$cc, superCall as _$su, extend as _$ex, EMPTY_OBJ as _$em, className as _$cn, createTextVNode as _$ct } from 'intact-react';
1
+ import { createElementVNode as _$ce, className as _$cn, createUnknownComponentVNode as _$cc, superCall as _$su, extend as _$ex, EMPTY_OBJ as _$em, createTextVNode as _$ct } from 'intact-react';
2
2
  import { Icon } from '../icon';
3
3
  import { DropdownMenu } from '../dropdown';
4
4
  import { makePanelStyles } from './styles';
@@ -8,12 +8,6 @@ import { Button } from '../button';
8
8
  import { PanelFlags } from '../datepicker/usePanel';
9
9
  import { last } from '../datepicker/helpers';
10
10
  import { ScrollSelect } from '../scrollSelect';
11
- var _$tmp0 = {
12
- 'className': 'k-timepicker'
13
- };
14
- var _$tmp1 = {
15
- 'className': 'k-icon-time'
16
- };
17
11
  export default function ($props, $blocks, $__proto__) {
18
12
  var _classNameObj;
19
13
 
@@ -33,10 +27,8 @@ export default function ($props, $blocks, $__proto__) {
33
27
  onChangeTimeByStep = _this$value.onChangeTimeByStep,
34
28
  getTimeValue = _this$value.getTimeValue;
35
29
  var lastValue = last(value);
36
- var classNameObj = (_classNameObj = {
37
- 'k-time-content': true,
38
- 'k-range': range
39
- }, _classNameObj[className] = className, _classNameObj[makePanelStyles()] = true, _classNameObj);
30
+ var k = this.config.k;
31
+ var classNameObj = (_classNameObj = {}, _classNameObj[k + "-time-content"] = true, _classNameObj[k + "-range"] = range, _classNameObj[className] = className, _classNameObj[makePanelStyles(k)] = true, _classNameObj);
40
32
  var options = this.step.options.value;
41
33
  var _this$disabled = this.disabled,
42
34
  isDisabledTime = _this$disabled.isDisabledTime,
@@ -48,7 +40,7 @@ export default function ($props, $blocks, $__proto__) {
48
40
 
49
41
  var generatePanel = function generatePanel(flag) {
50
42
  var timeValue = getTimeValue(flag);
51
- return _$ce(2, 'div', [range ? _$ce(2, 'div', flag === PanelFlags.Start ? _$('开始时间') : _$('结束时间'), 0, 'k-timepicker-title') : undefined, !options ? _$cc(DatepickerTime, {
43
+ return _$ce(2, 'div', [range ? _$ce(2, 'div', flag === PanelFlags.Start ? _$('开始时间') : _$('结束时间'), 0, _$cn(k + "-timepicker-title")) : undefined, !options ? _$cc(DatepickerTime, {
52
44
  'value': timeValue,
53
45
  'ev-$change:value': function ev$changeValue(v) {
54
46
  return onChangeTime(v, flag);
@@ -65,23 +57,25 @@ export default function ($props, $blocks, $__proto__) {
65
57
  'disable': function disable(v) {
66
58
  return isDisabledTimeByStep(v, flag);
67
59
  }
68
- }), 2, 'k-datepicker-time')], 0, 'k-datepicker-calendar-wrapper');
60
+ }), 2, _$cn(k + "-datepicker-time"))], 0, _$cn(k + "-datepicker-calendar-wrapper"));
69
61
  };
70
62
 
71
- return _$su.call($this, _$tmp0, function ($blocks) {
63
+ return _$su.call($this, {
64
+ 'className': _$cn(k + "-timepicker")
65
+ }, function ($blocks) {
72
66
  var _$blocks = {},
73
67
  __$blocks = _$ex({}, $blocks);
74
68
 
75
69
  return (_$blocks['base-menu'] = function ($super) {
76
70
  return _$cc(DropdownMenu, {
77
71
  'className': _$cn(classNameObj),
78
- 'children': _$ce(2, 'div', [_$ce(2, 'div', [generatePanel(PanelFlags.Start), _$ct('\n '), range ? generatePanel(PanelFlags.End) : null], 0, 'k-datepicker-calendars'), _$ce(2, 'div', _$cc(Button, {
72
+ 'children': _$ce(2, 'div', [_$ce(2, 'div', [generatePanel(PanelFlags.Start), _$ct('\n '), range ? generatePanel(PanelFlags.End) : null], 0, _$cn(k + "-datepicker-calendars")), _$ce(2, 'div', _$cc(Button, {
79
73
  'type': 'primary',
80
74
  'size': 'small',
81
75
  'disabled': isDisabledConfirm(),
82
76
  'ev-click': onConfirm,
83
77
  'children': _$('确定')
84
- }), 2, 'k-datepicker-footer')], 4, 'k-datepicker-wrapper')
78
+ }), 2, _$cn(k + "-datepicker-footer"))], 4, _$cn(k + "-datepicker-wrapper"))
85
79
  });
86
80
  }, __$blocks['base-menu'] = function ($super, data) {
87
81
  var block = $blocks['base-menu'];
@@ -92,7 +86,9 @@ export default function ($props, $blocks, $__proto__) {
92
86
 
93
87
  return block ? block.call($this, callBlock, data) : callBlock();
94
88
  }), (_$blocks['suffix'] = function ($super) {
95
- return _$cc(Icon, _$tmp1);
89
+ return _$cc(Icon, {
90
+ 'className': _$cn(k + "-icon-time")
91
+ });
96
92
  }, __$blocks['suffix'] = function ($super, data) {
97
93
  var block = $blocks['suffix'];
98
94
 
@@ -24,4 +24,5 @@ export declare class SelectPicker extends Component<TimepickerProps, TimepickerE
24
24
  label: string;
25
25
  }[] | null>;
26
26
  };
27
+ private config;
27
28
  }
@@ -6,6 +6,7 @@ import template from './selectPicker.vdt';
6
6
  import { useFormats } from './useFormats';
7
7
  import { useDisabled } from '../datepicker/useDisabled';
8
8
  import { useStep } from './useStep';
9
+ import { useConfigContext } from '../config';
9
10
  export var SelectPicker = /*#__PURE__*/function (_Component) {
10
11
  _inheritsLoose(SelectPicker, _Component);
11
12
 
@@ -22,6 +23,7 @@ export var SelectPicker = /*#__PURE__*/function (_Component) {
22
23
  _this.formats = useFormats();
23
24
  _this.disabled = useDisabled(_this.formats);
24
25
  _this.step = useStep(_this.disabled, _this.formats);
26
+ _this.config = useConfigContext();
25
27
  return _this;
26
28
  }
27
29
 
@@ -5,9 +5,6 @@ import { createUnknownComponentVNode as _$cc, className as _$cn, map as _$ma, ex
5
5
  import { Select, Option } from '../select';
6
6
  import { Icon } from '../icon';
7
7
  import { _$ } from '../../i18n';
8
- var _$tmp0 = {
9
- 'className': 'k-icon-time'
10
- };
11
8
  export default function ($props, $blocks, $__proto__) {
12
9
  $blocks || ($blocks = {});
13
10
  $props || ($props = {});
@@ -20,6 +17,7 @@ export default function ($props, $blocks, $__proto__) {
20
17
  rest = _objectWithoutPropertiesLoose(_this$get, _excluded);
21
18
 
22
19
  var options = this.step.options.value;
20
+ var k = this.config.k;
23
21
  return _$cc(Select, _extends({}, rest, {
24
22
  'placeholder': placeholder || _$('请选择时间'),
25
23
  'filterable': true,
@@ -35,7 +33,9 @@ export default function ($props, $blocks, $__proto__) {
35
33
  __$blocks = _$ex({}, $blocks);
36
34
 
37
35
  return (_$blocks['suffix'] = function ($super) {
38
- return _$cc(Icon, _$tmp0);
36
+ return _$cc(Icon, {
37
+ 'className': _$cn(k + "-icon-time")
38
+ });
39
39
  }, __$blocks['suffix'] = function ($super, data) {
40
40
  var block = $blocks['suffix'];
41
41
 
@@ -1,2 +1,2 @@
1
1
  import '../../styles/global';
2
- export declare function makePanelStyles(): string;
2
+ export declare function makePanelStyles(k: string): string;
@@ -24,6 +24,6 @@ setDefault(function () {
24
24
  timepicker: defaults
25
25
  }).timepicker;
26
26
  });
27
- export function makePanelStyles() {
28
- return cx(makePanelStylesBase(), /*#__PURE__*/css("&.k-time-content{.k-datepicker-time{padding:", timepicker.padding, ";}.k-scroll-select{height:", timepicker.scrollHeight, ";}}&.k-range{.k-datepicker-time{width:auto;border:", timepicker.border, ";}.k-scroll-select{height:", timepicker.range.scrollHeight, ";}.k-datepicker-calendar-wrapper{padding:", timepicker.range.padding, ";width:", timepicker.range.width, ";border:none;}.k-timepicker-title{text-align:center;margin-bottom:", timepicker.range.titleGap, ";}}"));
27
+ export function makePanelStyles(k) {
28
+ return cx(makePanelStylesBase(k), /*#__PURE__*/css("&.", k, "-time-content{.", k, "-datepicker-time{padding:", timepicker.padding, ";}.", k, "-scroll-select{height:", timepicker.scrollHeight, ";}}&.", k, "-range{.", k, "-datepicker-time{width:auto;border:", timepicker.border, ";}.", k, "-scroll-select{height:", timepicker.range.scrollHeight, ";}.", k, "-datepicker-calendar-wrapper{padding:", timepicker.range.padding, ";width:", timepicker.range.width, ";border:none;}.", k, "-timepicker-title{text-align:center;margin-bottom:", timepicker.range.titleGap, ";}}"));
29
29
  }
@@ -17,9 +17,8 @@ export default function ($props, $blocks, $__proto__) {
17
17
  type = _this$get.type,
18
18
  disabled = _this$get.disabled;
19
19
 
20
- var classNameObj = (_classNameObj = {
21
- 'k-tip': true
22
- }, _classNameObj[makeStyles()] = true, _classNameObj);
20
+ var k = this.config.k;
21
+ var classNameObj = (_classNameObj = {}, _classNameObj[k + "-tip"] = true, _classNameObj[makeStyles(k)] = true, _classNameObj);
23
22
  return _$su.call($this, {
24
23
  'className': _$cn(classNameObj),
25
24
  'name': 'k-fade'
@@ -38,7 +37,7 @@ export default function ($props, $blocks, $__proto__) {
38
37
  };
39
38
 
40
39
  return block ? block.call($this, callBlock, data) : callBlock();
41
- }, __$blocks['title'](_$no)), 0, 'k-tip-title') : undefined, children], 0, 'k-tip-wrapper');
40
+ }, __$blocks['title'](_$no)), 0, _$cn(k + "-tip-title")) : undefined, children], 0, _$cn(k + "-tip-wrapper"));
42
41
  }, __$blocks['body'] = function ($super, data) {
43
42
  var block = $blocks['body'];
44
43
 
@@ -52,10 +51,10 @@ export default function ($props, $blocks, $__proto__) {
52
51
  'type': !$blocks.close ? 'none' : 'link',
53
52
  'icon': !$blocks.close,
54
53
  'ev-click': this.onClose,
55
- 'className': 'k-tip-close',
54
+ 'className': _$cn(k + "-tip-close"),
56
55
  'children': (_$blocks['close'] = function ($super) {
57
56
  return _$cc(Icon, {
58
- 'className': 'k-icon-close',
57
+ 'className': _$cn(k + "-icon-close"),
59
58
  'hoverable': !disabled
60
59
  });
61
60
  }, __$blocks['close'] = function ($super, data) {
@@ -1,2 +1,2 @@
1
1
  import '../../styles/global';
2
- export declare function makeStyles(): string;
2
+ export declare function makeStyles(k: string): string;
@@ -24,6 +24,6 @@ setDefault(function () {
24
24
  tip: defaults
25
25
  }).tip;
26
26
  });
27
- export function makeStyles() {
28
- return /*#__PURE__*/css("&.k-tip{display:flex;height:auto;padding:0;color:", tip.color, "!important;align-items:flex-start;}.k-tip-wrapper{flex:1;padding:", tip.padding, ";}.k-tip-title{font-size:", tip.title.fontSize, ";margin-bottom:", tip.title.gap, ";font-weight:", tip.title.fontWeight, ";}&.k-fade-leave-active{position:relative;}.k-tip-close:hover{background:none;}");
27
+ export function makeStyles(k) {
28
+ return /*#__PURE__*/css("&.", k, "-tip{display:flex;height:auto;padding:0;color:", tip.color, "!important;align-items:flex-start;}.", k, "-tip-wrapper{flex:1;padding:", tip.padding, ";}.", k, "-tip-title{font-size:", tip.title.fontSize, ";margin-bottom:", tip.title.gap, ";font-weight:", tip.title.fontWeight, ";}&.", k, "-fade-leave-active{position:relative;}.", k, "-tip-close:hover{background:none;}");
29
29
  }
@@ -29,15 +29,12 @@ export default function ($props, $blocks, $__proto__) {
29
29
  var _this$arrow = this.arrow,
30
30
  arrowRef = _this$arrow.arrowRef,
31
31
  arrowType = _this$arrow.arrowType;
32
- var classNameObj = (_classNameObj = {
33
- 'k-tooltip-content': true,
34
- 'k-hoverable': hoverable || trigger === 'click',
35
- 'k-always': always
36
- }, _classNameObj["k-" + theme] = true, _classNameObj["k-" + size] = size !== 'default', _classNameObj[className] = className, _classNameObj[makeStyles()] = true, _classNameObj[$props.className] = $props.className, _classNameObj);
32
+ var k = this.config.k;
33
+ var classNameObj = (_classNameObj = {}, _classNameObj[k + "-tooltip-content"] = true, _classNameObj[k + "-hoverable"] = hoverable || trigger === 'click', _classNameObj[k + "-always"] = always, _classNameObj[k + "-" + theme] = true, _classNameObj[k + "-" + size] = size !== 'default', _classNameObj[className] = className, _classNameObj[makeStyles(k)] = true, _classNameObj[$props.className] = $props.className, _classNameObj);
37
34
  return _$su.call($this, {
38
35
  'value': !!value && !this.isEmptyChildren,
39
36
  'transition': {
40
- name: 'k-fade',
37
+ name: k + "-fade",
41
38
  onEnter: this.onEnter,
42
39
  onAfterLeave: this.onAfterLeave,
43
40
  onLeaveCancelled: this.onAfterLeave
@@ -79,9 +76,7 @@ export default function ($props, $blocks, $__proto__) {
79
76
  };
80
77
 
81
78
  return block ? block.call($this, callBlock, data) : callBlock();
82
- }, __$blocks['footer'](_$no)), 0, 'k-tooltip-footer', null, 'tooltip-footer') : undefined, showArrow ? _$ce(2, 'i', null, 1, _$cn((_$cn2 = {
83
- "k-tooltip-arrow": true
84
- }, _$cn2["k-" + arrowType.value] = arrowType.value, _$cn2)), null, 'tooltip-arrow', arrowRef) : undefined];
79
+ }, __$blocks['footer'](_$no)), 0, _$cn(k + "-tooltip-footer"), null, 'tooltip-footer') : undefined, showArrow ? _$ce(2, 'i', null, 1, _$cn((_$cn2 = {}, _$cn2[k + "-tooltip-arrow"] = true, _$cn2[k + "-" + arrowType.value] = arrowType.value, _$cn2)), null, 'tooltip-arrow', arrowRef) : undefined];
85
80
  }, __$blocks['children'] = function ($super, data) {
86
81
  var block = $blocks['children'];
87
82
 
@@ -23,5 +23,5 @@ declare const defaults: {
23
23
  export declare let tooltip: typeof defaults;
24
24
  export declare type Theme = 'dark' | 'light';
25
25
  export declare const themes: Theme[];
26
- export default function makeStyles(): string;
26
+ export default function makeStyles(k: string): string;
27
27
  export {};
@@ -56,11 +56,11 @@ var directionMap = {
56
56
  left: 'right',
57
57
  right: 'left'
58
58
  };
59
- export default function makeStyles() {
59
+ export default function makeStyles(k) {
60
60
  var arrowLong = tooltip.arrow.width;
61
- var arrowShort = "calc(" + arrowLong + " - 1px)"; // use &.k-tooltip-content to override css in dropdown menu
61
+ var arrowShort = "calc(" + arrowLong + " - 1px)"; // use &.${k}-tooltip-content to override css in dropdown menu
62
62
 
63
- return /*#__PURE__*/css("&.k-tooltip-content{max-width:", tooltip.maxWidth, ";min-width:0;padding:", tooltip.padding, ";line-height:", tooltip.lineHeight, ";word-wrap:break-word;pointer-events:none;box-shadow:", tooltip.boxShadow, ";&.k-hoverable,&.k-always{pointer-events:all;}.k-tooltip-arrow{pointer-events:none;&:before,&{position:absolute;display:block;border-style:solid;border-color:transparent;}&:before{content:' ';}&.k-top,&.k-bottom{&:before,&{border-width:", arrowLong, " ", arrowShort, ";}&:before{left:calc(-1 * ", arrowShort, ");}}&.k-top{top:calc(-2 * ", arrowLong, ");&:before{top:calc(-", arrowLong, " + 1px);}}&.k-bottom{bottom:calc(-2 * ", arrowLong, ");&:before{bottom:calc(-", arrowLong, " + 1px);}}&.k-left,&.k-right{&:before,&{border-width:", arrowShort, " ", arrowLong, ";}&:before{top:calc(-1 * ", arrowShort, ");}}&.k-left{left:calc(-2 * ", arrowLong, ");&:before{left:calc(-", arrowLong, " + 1px);}}&.k-right{right:calc(-2 * ", arrowLong, ");&:before{right:calc(-", arrowLong, " + 1px);}}}", _mapInstanceProperty(themes).call(themes, function (theme) {
63
+ return /*#__PURE__*/css("&.", k, "-tooltip-content{max-width:", tooltip.maxWidth, ";min-width:0;padding:", tooltip.padding, ";line-height:", tooltip.lineHeight, ";word-wrap:bre.", k, "-word;pointer-events:none;box-shadow:", tooltip.boxShadow, ";&.", k, "-hoverable,&.", k, "-always{pointer-events:all;}.", k, "-tooltip-arrow{pointer-events:none;&:before,&{position:absolute;display:block;border-style:solid;border-color:transparent;}&:before{content:' ';}&.", k, "-top,&.", k, "-bottom{&:before,&{border-width:", arrowLong, " ", arrowShort, ";}&:before{left:calc(-1 * ", arrowShort, ");}}&.", k, "-top{top:calc(-2 * ", arrowLong, ");&:before{top:calc(-", arrowLong, " + 1px);}}&.", k, "-bottom{bottom:calc(-2 * ", arrowLong, ");&:before{bottom:calc(-", arrowLong, " + 1px);}}&.", k, "-left,&.", k, "-right{&:before,&{border-width:", arrowShort, " ", arrowLong, ";}&:before{top:calc(-1 * ", arrowShort, ");}}&.", k, "-left{left:calc(-2 * ", arrowLong, ");&:before{left:calc(-", arrowLong, " + 1px);}}&.", k, "-right{right:calc(-2 * ", arrowLong, ");&:before{right:calc(-", arrowLong, " + 1px);}}}", _mapInstanceProperty(themes).call(themes, function (theme) {
64
64
  var _context;
65
65
 
66
66
  var borderColor;
@@ -77,9 +77,9 @@ export default function makeStyles() {
77
77
  color = tooltip.color;
78
78
  }
79
79
 
80
- return /*#__PURE__*/css("&.k-", theme, "{background:", bgColor, ";color:", color, ";.k-tooltip-arrow{", _mapInstanceProperty(_context = _Object$keys(directionMap)).call(_context, function (direction) {
80
+ return /*#__PURE__*/css("&.", k, "-", theme, "{background:", bgColor, ";color:", color, ";.", k, "-tooltip-arrow{", _mapInstanceProperty(_context = _Object$keys(directionMap)).call(_context, function (direction) {
81
81
  var borderDirection = directionMap[direction];
82
- return /*#__PURE__*/css("&.k-", direction, "{border-", borderDirection, "-color:", borderColor, ";&:before{border-", borderDirection, "-color:", bgColor, ";}}");
82
+ return /*#__PURE__*/css("&.", k, "-", direction, "{border-", borderDirection, "-color:", borderColor, ";&:before{border-", borderDirection, "-color:", bgColor, ";}}");
83
83
  }), ";}}");
84
- }), ".k-tooltip-footer{padding-top:", tooltip.confirm.gaps, ";.k-btn:not(:first-of-type){margin-left:", tooltip.confirm.gaps, ";}}&.k-small{padding:", tooltip.smallPadding, ";}}");
84
+ }), ".", k, "-tooltip-footer{padding-top:", tooltip.confirm.gaps, ";.", k, "-btn:not(:first-of-type){margin-left:", tooltip.confirm.gaps, ";}}&.", k, "-small{padding:", tooltip.smallPadding, ";}}");
85
85
  }
@@ -43,6 +43,7 @@ export declare class Transfer<K extends string = 'key', L extends string = 'labe
43
43
  private transfer;
44
44
  private filter;
45
45
  private check;
46
+ private config;
46
47
  getData(): any[];
47
48
  getCheckedData(model: Model): any[];
48
49
  }
@@ -7,6 +7,7 @@ import { _$ } from '../../i18n';
7
7
  import { useTransfer } from './useTransfer';
8
8
  import { useFilter } from './useFilter';
9
9
  import { useCheck } from './useCheck';
10
+ import { useConfigContext } from '../config';
10
11
  var typeDefs = {
11
12
  data: Array,
12
13
  keyName: String,
@@ -59,6 +60,7 @@ export var Transfer = /*#__PURE__*/function (_Component) {
59
60
  _this.transfer = useTransfer();
60
61
  _this.filter = useFilter(_this.transfer.rightData);
61
62
  _this.check = useCheck(_filterInstanceProperty(_this));
63
+ _this.config = useConfigContext();
62
64
  return _this;
63
65
  }
64
66
 
@@ -1,6 +1,6 @@
1
1
  import _extends from "@babel/runtime-corejs3/helpers/extends";
2
2
  import _filterInstanceProperty from "@babel/runtime-corejs3/core-js/instance/filter";
3
- import { createElementVNode as _$ce, createTextVNode as _$ct, createUnknownComponentVNode as _$cc, noop as _$no, extend as _$ex, EMPTY_OBJ as _$em, map as _$ma, className as _$cn, createVNode as _$cv } from 'intact-react';
3
+ import { createElementVNode as _$ce, createTextVNode as _$ct, className as _$cn, createUnknownComponentVNode as _$cc, noop as _$no, extend as _$ex, EMPTY_OBJ as _$em, map as _$ma, createVNode as _$cv } from 'intact-react';
4
4
  import { linkEvent, Transition, TransitionGroup } from 'intact';
5
5
  import { getRestProps } from '../utils';
6
6
  import { makeStyles } from './styles';
@@ -9,16 +9,6 @@ import { Checkbox } from '../checkbox';
9
9
  import { Button } from '../button';
10
10
  import { Tree } from '../tree';
11
11
  import { Icon } from '../icon';
12
- var _$tmp0 = {
13
- 'className': 'k-icon-search',
14
- 'size': 'small'
15
- };
16
- var _$tmp1 = {
17
- 'className': 'k-transfer-icon k-icon-left'
18
- };
19
- var _$tmp2 = {
20
- 'className': 'k-transfer-icon k-icon-right'
21
- };
22
12
  export default function ($props, $blocks, $__proto__) {
23
13
  var _classNameObj,
24
14
  _this = this;
@@ -50,16 +40,15 @@ export default function ($props, $blocks, $__proto__) {
50
40
  toggleCheckAll = _this$check.toggleCheckAll,
51
41
  onCheckboxChange = _this$check.onCheckboxChange,
52
42
  isIndeterminate = _this$check.isIndeterminate;
53
- var classNameObj = (_classNameObj = {
54
- 'k-transfer': true
55
- }, _classNameObj[className] = className, _classNameObj[makeStyles()] = true, _classNameObj);
43
+ var k = this.config.k;
44
+ var classNameObj = (_classNameObj = {}, _classNameObj[k + "-transfer"] = true, _classNameObj[className] = className, _classNameObj[makeStyles(k)] = true, _classNameObj);
56
45
 
57
46
  var Panel = function Panel(model) {
58
47
  var title = _this.get(model + "Title");
59
48
 
60
49
  var data = getShowedData(model);
61
50
  return _$ce(2, 'div', [_$ce(2, 'div', (_$blocks['header'] = function ($super) {
62
- return [_$ce(2, 'div', [this.get(model + "CheckedKeys.length"), _$ct(' /\n '), data.length], 0, 'k-transfer-count'), _$cc(Checkbox, {
51
+ return [_$ce(2, 'div', [this.get(model + "CheckedKeys.length"), _$ct(' /\n '), data.length], 0, _$cn(k + "-transfer-count")), _$cc(Checkbox, {
63
52
  'className': 'c-ellipsis',
64
53
  'value': isCheckAll(model),
65
54
  'indeterminate': isIndeterminate(model),
@@ -74,7 +63,7 @@ export default function ($props, $blocks, $__proto__) {
74
63
  };
75
64
 
76
65
  return block ? block.call($this, callBlock, data) : callBlock();
77
- }, __$blocks['header'](_$no, model)), 0, 'k-transfer-title'), filterable ? (_$blocks['filter'] = function ($super) {
66
+ }, __$blocks['header'](_$no, model)), 0, _$cn(k + "-transfer-title")), filterable ? (_$blocks['filter'] = function ($super) {
78
67
  return _$cc(Input, {
79
68
  'placeholder': placeholder,
80
69
  'clearable': true,
@@ -84,7 +73,10 @@ export default function ($props, $blocks, $__proto__) {
84
73
  __$blocks = _$ex({}, $blocks);
85
74
 
86
75
  return (_$blocks['prefix'] = function ($super) {
87
- return _$cc(Icon, _$tmp0);
76
+ return _$cc(Icon, {
77
+ 'className': _$cn(k + "-icon-search"),
78
+ 'size': 'small'
79
+ });
88
80
  }, __$blocks['prefix'] = function ($super, data) {
89
81
  var block = $blocks['prefix'];
90
82
 
@@ -112,6 +104,8 @@ export default function ($props, $blocks, $__proto__) {
112
104
  return _$cc(TransitionGroup, {
113
105
  'name': 'k-fade',
114
106
  'children': _$ma(data, function ($value, $key) {
107
+ var _$cn2;
108
+
115
109
  return _$ce(2, 'div', _$cc(Checkbox, {
116
110
  'name': model,
117
111
  'trueValue': $value[keyName],
@@ -132,10 +126,7 @@ export default function ($props, $blocks, $__proto__) {
132
126
  $this.set(model + "CheckedKeys", $v);
133
127
  },
134
128
  'value': $this.get(model + "CheckedKeys")
135
- }), 2, _$cn({
136
- "k-transfer-item": true,
137
- "k-disabled": $value.disabled
138
- }), null, $value[keyName] || $value[labelName] || $value);
129
+ }), 2, _$cn((_$cn2 = {}, _$cn2[k + "-transfer-item"] = true, _$cn2[k + "-disabled"] = $value.disabled, _$cn2)), null, $value[keyName] || $value[labelName] || $value);
139
130
  }, $this)
140
131
  });
141
132
  }, __$blocks['list'] = function ($super, data) {
@@ -146,7 +137,7 @@ export default function ($props, $blocks, $__proto__) {
146
137
  };
147
138
 
148
139
  return block ? block.call($this, callBlock, data) : callBlock();
149
- }, __$blocks['list'](_$no, model)), 0, 'k-transfer-list')], 0, 'k-transfer-panel');
140
+ }, __$blocks['list'](_$no, model)), 0, _$cn(k + "-transfer-list"))], 0, _$cn(k + "-transfer-panel"));
150
141
  };
151
142
 
152
143
  return _$cv('div', _extends({
@@ -158,7 +149,9 @@ export default function ($props, $blocks, $__proto__) {
158
149
  'ev-click': remove,
159
150
  'type': 'primary',
160
151
  'size': 'large',
161
- 'children': _$cc(Icon, _$tmp1)
152
+ 'children': _$cc(Icon, {
153
+ 'className': _$cn(k + "-transfer-icon " + k + "-icon-left")
154
+ })
162
155
  }), _$cc(Button, {
163
156
  'circle': true,
164
157
  'icon': true,
@@ -166,7 +159,9 @@ export default function ($props, $blocks, $__proto__) {
166
159
  'ev-click': add,
167
160
  'type': 'primary',
168
161
  'size': 'large',
169
- 'children': _$cc(Icon, _$tmp2)
170
- })], 4, 'k-transfer-arrows'), Panel('right')]);
162
+ 'children': _$cc(Icon, {
163
+ 'className': _$cn(k + "-transfer-icon " + k + "-icon-right")
164
+ })
165
+ })], 4, _$cn(k + "-transfer-arrows")), Panel('right')]);
171
166
  }
172
167
  ;
@@ -1,2 +1,2 @@
1
1
  import '../../styles/global';
2
- export declare function makeStyles(): string;
2
+ export declare function makeStyles(k: string): string;