@king-design/react 3.0.1 → 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 (368) hide show
  1. package/components/affix/index.d.ts +1 -0
  2. package/components/affix/index.js +2 -0
  3. package/components/affix/index.vdt.js +5 -5
  4. package/components/affix/styles.d.ts +1 -1
  5. package/components/affix/styles.js +1 -1
  6. package/components/badge/index.d.ts +1 -0
  7. package/components/badge/index.js +13 -1
  8. package/components/badge/index.vdt.js +5 -4
  9. package/components/badge/styles.d.ts +1 -1
  10. package/components/badge/styles.js +2 -2
  11. package/components/breadcrumb/index.d.ts +1 -0
  12. package/components/breadcrumb/index.js +13 -1
  13. package/components/breadcrumb/index.vdt.js +4 -5
  14. package/components/breadcrumb/item.d.ts +1 -0
  15. package/components/breadcrumb/item.js +2 -0
  16. package/components/breadcrumb/item.vdt.js +4 -5
  17. package/components/breadcrumb/styles.d.ts +1 -1
  18. package/components/breadcrumb/styles.js +2 -2
  19. package/components/button/group.d.ts +1 -0
  20. package/components/button/group.js +13 -1
  21. package/components/button/group.vdt.js +2 -6
  22. package/components/button/index.d.ts +1 -0
  23. package/components/button/index.js +2 -0
  24. package/components/button/index.vdt.js +7 -7
  25. package/components/button/styles.d.ts +2 -4
  26. package/components/button/styles.js +19 -20
  27. package/components/card/column.d.ts +1 -0
  28. package/components/card/column.js +13 -1
  29. package/components/card/column.vdt.js +2 -5
  30. package/components/card/index.d.ts +1 -0
  31. package/components/card/index.js +13 -1
  32. package/components/card/index.vdt.js +5 -11
  33. package/components/card/styles.d.ts +1 -1
  34. package/components/card/styles.js +2 -2
  35. package/components/carousel/index.d.ts +1 -0
  36. package/components/carousel/index.js +2 -0
  37. package/components/carousel/index.vdt.js +15 -19
  38. package/components/carousel/item.d.ts +1 -0
  39. package/components/carousel/item.js +13 -1
  40. package/components/carousel/item.vdt.js +2 -3
  41. package/components/carousel/styles.d.ts +2 -2
  42. package/components/carousel/styles.js +4 -4
  43. package/components/cascader/index.vdt.js +20 -29
  44. package/components/cascader/styles.d.ts +2 -2
  45. package/components/cascader/styles.js +3 -3
  46. package/components/checkbox/index.d.ts +1 -0
  47. package/components/checkbox/index.js +2 -0
  48. package/components/checkbox/index.vdt.js +4 -8
  49. package/components/checkbox/styles.d.ts +1 -1
  50. package/components/checkbox/styles.js +2 -2
  51. package/components/code/index.d.ts +1 -0
  52. package/components/code/index.js +2 -0
  53. package/components/code/index.vdt.js +2 -3
  54. package/components/code/styles.d.ts +1 -1
  55. package/components/code/styles.js +1 -1
  56. package/components/collapse/index.d.ts +1 -0
  57. package/components/collapse/index.js +13 -1
  58. package/components/collapse/index.vdt.js +2 -3
  59. package/components/collapse/item.d.ts +1 -0
  60. package/components/collapse/item.js +2 -0
  61. package/components/collapse/item.vdt.js +6 -8
  62. package/components/collapse/styles.d.ts +2 -3
  63. package/components/collapse/styles.js +5 -9
  64. package/components/colorpicker/drag.d.ts +1 -0
  65. package/components/colorpicker/drag.js +2 -0
  66. package/components/colorpicker/drag.vdt.js +3 -2
  67. package/components/colorpicker/index.d.ts +1 -0
  68. package/components/colorpicker/index.js +13 -1
  69. package/components/colorpicker/index.vdt.js +5 -6
  70. package/components/colorpicker/panel.d.ts +1 -0
  71. package/components/colorpicker/panel.js +2 -0
  72. package/components/colorpicker/panel.vdt.js +16 -19
  73. package/components/colorpicker/styles.d.ts +3 -3
  74. package/components/colorpicker/styles.js +8 -8
  75. package/components/config/index.d.ts +10 -0
  76. package/components/config/index.js +23 -0
  77. package/components/config/index.spec.d.ts +1 -0
  78. package/components/config/index.spec.js +71 -0
  79. package/components/context.d.ts +2 -1
  80. package/components/context.js +8 -2
  81. package/components/copy/index.d.ts +1 -0
  82. package/components/copy/index.js +2 -0
  83. package/components/copy/index.vdt.js +9 -9
  84. package/components/copy/styles.d.ts +1 -1
  85. package/components/copy/styles.js +1 -1
  86. package/components/datepicker/calendar.d.ts +1 -0
  87. package/components/datepicker/calendar.js +2 -0
  88. package/components/datepicker/calendar.vdt.js +38 -51
  89. package/components/datepicker/index.vdt.js +13 -16
  90. package/components/datepicker/styles.d.ts +3 -3
  91. package/components/datepicker/styles.js +6 -6
  92. package/components/datepicker/time.d.ts +1 -0
  93. package/components/datepicker/time.js +2 -0
  94. package/components/datepicker/time.vdt.js +2 -3
  95. package/components/diagram/diagram.d.ts +1 -0
  96. package/components/diagram/diagram.js +2 -0
  97. package/components/diagram/diagram.vdt.js +3 -4
  98. package/components/diagram/styles.d.ts +1 -1
  99. package/components/diagram/styles.js +1 -1
  100. package/components/dialog/alert.vdt.js +6 -10
  101. package/components/dialog/base.d.ts +4 -0
  102. package/components/dialog/base.js +2 -0
  103. package/components/dialog/base.vdt.js +15 -21
  104. package/components/dialog/index.d.ts +1 -1
  105. package/components/dialog/styles.d.ts +3 -3
  106. package/components/dialog/styles.js +12 -12
  107. package/components/drawer/index.vdt.js +3 -4
  108. package/components/drawer/styles.d.ts +1 -1
  109. package/components/drawer/styles.js +3 -3
  110. package/components/dropdown/dropdown.d.ts +1 -0
  111. package/components/dropdown/dropdown.js +4 -3
  112. package/components/dropdown/item.d.ts +1 -0
  113. package/components/dropdown/item.js +2 -0
  114. package/components/dropdown/item.vdt.js +2 -4
  115. package/components/dropdown/menu.d.ts +1 -0
  116. package/components/dropdown/menu.js +2 -0
  117. package/components/dropdown/menu.vdt.js +2 -3
  118. package/components/dropdown/styles.d.ts +2 -2
  119. package/components/dropdown/styles.js +4 -4
  120. package/components/editable/index.d.ts +1 -0
  121. package/components/editable/index.js +2 -0
  122. package/components/editable/index.vdt.js +3 -7
  123. package/components/editable/styles.d.ts +1 -1
  124. package/components/editable/styles.js +2 -2
  125. package/components/form/form.d.ts +1 -0
  126. package/components/form/form.js +2 -0
  127. package/components/form/form.vdt.js +2 -3
  128. package/components/form/item.d.ts +1 -0
  129. package/components/form/item.js +2 -0
  130. package/components/form/item.vdt.js +13 -19
  131. package/components/form/styles.d.ts +2 -2
  132. package/components/form/styles.js +5 -5
  133. package/components/form/useError.d.ts +1 -0
  134. package/components/grid/col.d.ts +1 -0
  135. package/components/grid/col.js +2 -0
  136. package/components/grid/col.vdt.js +3 -6
  137. package/components/grid/row.d.ts +1 -0
  138. package/components/grid/row.js +2 -0
  139. package/components/grid/row.vdt.js +2 -3
  140. package/components/grid/styles.d.ts +2 -2
  141. package/components/grid/styles.js +8 -18
  142. package/components/grid/useBreakpoints.d.ts +1 -1
  143. package/components/grid/useBreakpoints.js +2 -2
  144. package/components/grid/useGutter.d.ts +1 -0
  145. package/components/icon/index.d.ts +1 -0
  146. package/components/icon/index.js +2 -0
  147. package/components/icon/index.vdt.js +7 -11
  148. package/components/icon/styles.d.ts +1 -2
  149. package/components/icon/styles.js +7 -5
  150. package/components/input/index.d.ts +1 -0
  151. package/components/input/index.js +2 -0
  152. package/components/input/index.vdt.js +16 -26
  153. package/components/input/search.d.ts +1 -0
  154. package/components/input/search.js +2 -0
  155. package/components/input/search.vdt.js +5 -7
  156. package/components/input/styles.d.ts +2 -2
  157. package/components/input/styles.js +11 -11
  158. package/components/layout/aside.d.ts +1 -0
  159. package/components/layout/aside.js +2 -0
  160. package/components/layout/aside.vdt.js +5 -8
  161. package/components/layout/body.d.ts +1 -0
  162. package/components/layout/body.js +4 -3
  163. package/components/layout/footer.d.ts +1 -0
  164. package/components/layout/footer.js +15 -4
  165. package/components/layout/header.d.ts +1 -0
  166. package/components/layout/header.js +4 -6
  167. package/components/layout/layout.d.ts +1 -0
  168. package/components/layout/layout.js +4 -3
  169. package/components/layout/styles.d.ts +3 -3
  170. package/components/layout/styles.js +8 -8
  171. package/components/layout/template.vdt.js +2 -1
  172. package/components/menu/item.d.ts +1 -0
  173. package/components/menu/item.js +2 -0
  174. package/components/menu/item.vdt.js +7 -12
  175. package/components/menu/menu.d.ts +1 -0
  176. package/components/menu/menu.js +2 -0
  177. package/components/menu/menu.vdt.js +3 -6
  178. package/components/menu/styles.d.ts +3 -3
  179. package/components/menu/styles.js +10 -10
  180. package/components/message/message.d.ts +1 -0
  181. package/components/message/message.js +2 -0
  182. package/components/message/message.vdt.js +12 -17
  183. package/components/message/messages.d.ts +1 -0
  184. package/components/message/messages.js +2 -0
  185. package/components/message/messages.vdt.js +2 -3
  186. package/components/message/styles.d.ts +2 -2
  187. package/components/message/styles.js +4 -4
  188. package/components/pagination/index.d.ts +1 -0
  189. package/components/pagination/index.js +2 -0
  190. package/components/pagination/index.vdt.js +14 -17
  191. package/components/pagination/styles.d.ts +1 -1
  192. package/components/pagination/styles.js +4 -4
  193. package/components/popover/content.vdt.js +5 -4
  194. package/components/popover/styles.d.ts +1 -1
  195. package/components/popover/styles.js +2 -2
  196. package/components/portal.d.ts +1 -0
  197. package/components/portal.js +3 -1
  198. package/components/progress/index.d.ts +1 -0
  199. package/components/progress/index.js +2 -0
  200. package/components/progress/index.vdt.js +14 -17
  201. package/components/progress/styles.d.ts +1 -1
  202. package/components/progress/styles.js +6 -6
  203. package/components/radio/index.d.ts +1 -0
  204. package/components/radio/index.js +2 -0
  205. package/components/radio/index.vdt.js +4 -7
  206. package/components/radio/styles.d.ts +1 -1
  207. package/components/radio/styles.js +2 -2
  208. package/components/rate/index.d.ts +1 -0
  209. package/components/rate/index.js +2 -0
  210. package/components/rate/index.vdt.js +4 -8
  211. package/components/rate/styles.d.ts +1 -1
  212. package/components/rate/styles.js +2 -2
  213. package/components/scrollSelect/index.d.ts +1 -0
  214. package/components/scrollSelect/index.js +2 -0
  215. package/components/scrollSelect/index.vdt.js +7 -12
  216. package/components/scrollSelect/styles.d.ts +1 -1
  217. package/components/scrollSelect/styles.js +2 -2
  218. package/components/select/base.d.ts +4 -0
  219. package/components/select/base.js +2 -0
  220. package/components/select/base.vdt.js +17 -21
  221. package/components/select/group.d.ts +1 -0
  222. package/components/select/group.js +2 -0
  223. package/components/select/group.vdt.js +3 -4
  224. package/components/select/menu.d.ts +1 -0
  225. package/components/select/menu.js +2 -0
  226. package/components/select/menu.vdt.js +9 -13
  227. package/components/select/option.d.ts +1 -0
  228. package/components/select/option.js +2 -0
  229. package/components/select/option.vdt.js +6 -8
  230. package/components/select/styles.d.ts +3 -3
  231. package/components/select/styles.js +8 -8
  232. package/components/select/useSearchable.d.ts +1 -0
  233. package/components/skeleton/item.d.ts +1 -0
  234. package/components/skeleton/item.js +13 -1
  235. package/components/skeleton/item.vdt.js +4 -7
  236. package/components/skeleton/skeleton.d.ts +1 -0
  237. package/components/skeleton/skeleton.js +13 -1
  238. package/components/skeleton/skeleton.vdt.js +4 -6
  239. package/components/skeleton/styles.d.ts +6 -0
  240. package/components/skeleton/styles.js +35 -0
  241. package/components/slider/index.d.ts +1 -0
  242. package/components/slider/index.js +2 -0
  243. package/components/slider/index.vdt.js +18 -22
  244. package/components/slider/styles.d.ts +1 -1
  245. package/components/slider/styles.js +2 -2
  246. package/components/spin/index.d.ts +1 -0
  247. package/components/spin/index.js +13 -1
  248. package/components/spin/index.vdt.js +6 -7
  249. package/components/spin/styles.d.ts +1 -1
  250. package/components/spin/styles.js +4 -4
  251. package/components/spinner/index.d.ts +1 -0
  252. package/components/spinner/index.js +2 -0
  253. package/components/spinner/index.vdt.js +15 -21
  254. package/components/spinner/styles.d.ts +1 -1
  255. package/components/spinner/styles.js +7 -7
  256. package/components/split/index.d.ts +2 -1
  257. package/components/split/index.js +2 -0
  258. package/components/split/index.vdt.js +7 -9
  259. package/components/split/styles.d.ts +4 -0
  260. package/components/split/styles.js +55 -0
  261. package/components/steps/context.d.ts +1 -0
  262. package/components/steps/index.d.ts +1 -0
  263. package/components/steps/index.js +13 -1
  264. package/components/steps/index.vdt.js +2 -3
  265. package/components/steps/step.d.ts +1 -0
  266. package/components/steps/step.js +13 -1
  267. package/components/steps/step.vdt.js +10 -16
  268. package/components/steps/styles.d.ts +3 -3
  269. package/components/steps/styles.js +18 -18
  270. package/components/switch/index.d.ts +1 -0
  271. package/components/switch/index.js +2 -0
  272. package/components/switch/index.vdt.js +6 -7
  273. package/components/switch/styles.d.ts +1 -1
  274. package/components/switch/styles.js +4 -4
  275. package/components/table/cell.d.ts +1 -0
  276. package/components/table/cell.js +13 -1
  277. package/components/table/cell.vdt.js +6 -6
  278. package/components/table/column.d.ts +1 -0
  279. package/components/table/column.js +2 -0
  280. package/components/table/column.vdt.js +24 -32
  281. package/components/table/row.d.ts +1 -0
  282. package/components/table/row.js +13 -1
  283. package/components/table/row.vdt.js +3 -10
  284. package/components/table/styles.d.ts +2 -2
  285. package/components/table/styles.js +6 -6
  286. package/components/table/table.d.ts +1 -0
  287. package/components/table/table.js +2 -0
  288. package/components/table/table.vdt.js +16 -20
  289. package/components/table/useColumns.d.ts +1 -0
  290. package/components/table/useFixedColumns.d.ts +2 -1
  291. package/components/table/useGroup.d.ts +1 -0
  292. package/components/table/useResizable.d.ts +1 -0
  293. package/components/table/useSortable.d.ts +1 -0
  294. package/components/tabs/index.d.ts +4 -0
  295. package/components/tabs/index.js +2 -0
  296. package/components/tabs/index.vdt.js +9 -10
  297. package/components/tabs/styles.d.ts +1 -1
  298. package/components/tabs/styles.js +15 -15
  299. package/components/tabs/tab.d.ts +1 -0
  300. package/components/tabs/tab.js +2 -0
  301. package/components/tabs/tab.vdt.js +3 -5
  302. package/components/tabs/useActiveBar.js +2 -1
  303. package/components/tabs/useScroll.js +2 -1
  304. package/components/tag/base.d.ts +1 -0
  305. package/components/tag/base.js +13 -1
  306. package/components/tag/index.vdt.js +4 -5
  307. package/components/tag/styles.d.ts +2 -2
  308. package/components/tag/styles.js +7 -7
  309. package/components/tag/tags.d.ts +1 -0
  310. package/components/tag/tags.js +2 -0
  311. package/components/tag/tags.vdt.js +5 -11
  312. package/components/timeline/item.d.ts +1 -0
  313. package/components/timeline/item.js +13 -1
  314. package/components/timeline/item.vdt.js +4 -5
  315. package/components/timeline/styles.d.ts +2 -2
  316. package/components/timeline/styles.js +6 -6
  317. package/components/timeline/timeline.d.ts +1 -0
  318. package/components/timeline/timeline.js +13 -1
  319. package/components/timeline/timeline.vdt.js +2 -3
  320. package/components/timepicker/index.d.ts +2 -1
  321. package/components/timepicker/panelPicker.vdt.js +13 -17
  322. package/components/timepicker/selectPicker.d.ts +1 -0
  323. package/components/timepicker/selectPicker.js +2 -0
  324. package/components/timepicker/selectPicker.vdt.js +4 -4
  325. package/components/timepicker/styles.d.ts +1 -1
  326. package/components/timepicker/styles.js +2 -2
  327. package/components/tip/index.vdt.js +5 -6
  328. package/components/tip/styles.d.ts +1 -1
  329. package/components/tip/styles.js +2 -2
  330. package/components/tooltip/content.vdt.js +4 -9
  331. package/components/tooltip/styles.d.ts +1 -1
  332. package/components/tooltip/styles.js +6 -6
  333. package/components/transfer/index.d.ts +1 -0
  334. package/components/transfer/index.js +2 -0
  335. package/components/transfer/index.vdt.js +20 -25
  336. package/components/transfer/styles.d.ts +1 -1
  337. package/components/transfer/styles.js +2 -2
  338. package/components/tree/index.d.ts +1 -0
  339. package/components/tree/index.js +2 -0
  340. package/components/tree/index.vdt.js +19 -30
  341. package/components/tree/styles.d.ts +1 -1
  342. package/components/tree/styles.js +2 -2
  343. package/components/treeSelect/index.vdt.js +2 -3
  344. package/components/treeSelect/styles.d.ts +1 -1
  345. package/components/treeSelect/styles.js +1 -1
  346. package/components/upload/index.d.ts +1 -0
  347. package/components/upload/index.js +2 -0
  348. package/components/upload/index.vdt.js +39 -50
  349. package/components/upload/styles.d.ts +2 -2
  350. package/components/upload/styles.js +3 -3
  351. package/components/utils.d.ts +2 -1
  352. package/components/utils.js +20 -9
  353. package/components/wave/index.d.ts +1 -0
  354. package/components/wave/index.js +4 -2
  355. package/components/wave/styles.d.ts +1 -1
  356. package/components/wave/styles.js +2 -2
  357. package/index.d.ts +3 -2
  358. package/index.js +3 -2
  359. package/package.json +1 -1
  360. package/styles/fonts/iconfont.d.ts +1 -1
  361. package/styles/fonts/iconfont.js +4 -1
  362. package/styles/global.js +4 -4
  363. package/styles/theme.d.ts +1 -1
  364. package/styles/theme.js +4 -53
  365. package/components/skeleton/style.d.ts +0 -6
  366. package/components/skeleton/style.js +0 -35
  367. package/components/split/style.d.ts +0 -4
  368. package/components/split/style.js +0 -55
@@ -27,13 +27,12 @@ export default function ($props, $blocks, $__proto__) {
27
27
  next = _this$scroll.next,
28
28
  scrollRef = _this$scroll.scrollRef,
29
29
  wrapperRef = _this$scroll.wrapperRef;
30
- var classNameObj = (_classNameObj = {
31
- 'k-tabs': true
32
- }, _classNameObj["k-size-" + size] = size, _classNameObj['k-vertical'] = vertical, _classNameObj["k-type-" + type] = true, _classNameObj["k-is-scroll"] = isScroll.value, _classNameObj[className] = className, _classNameObj[makeStyles()] = true, _classNameObj);
30
+ var k = this.config.k;
31
+ var classNameObj = (_classNameObj = {}, _classNameObj[k + "-tabs"] = true, _classNameObj[k + "-size-" + size] = size, _classNameObj[k + "-vertical"] = vertical, _classNameObj[k + "-type-" + type] = true, _classNameObj[k + "-is-scroll"] = isScroll.value, _classNameObj[className] = className, _classNameObj[makeStyles(k)] = true, _classNameObj);
33
32
  return _$cv('div', _extends({
34
33
  'className': _$cn(classNameObj)
35
34
  }, getRestProps(this)), [isScroll.value ? _$cc(Button, {
36
- 'className': 'k-tabs-prev',
35
+ 'className': _$cn(k + "-tabs-prev"),
37
36
  'type': 'none',
38
37
  'icon': true,
39
38
  'key': 'prev',
@@ -41,16 +40,16 @@ export default function ($props, $blocks, $__proto__) {
41
40
  'disabled': !enablePrev.value,
42
41
  'ev-click': prev,
43
42
  'children': _$cc(Icon, {
44
- 'className': _$cn(vertical ? "k-icon-up" : "k-icon-left")
43
+ 'className': _$cn(vertical ? k + "-icon-up" : k + "-icon-left")
45
44
  })
46
- }, 'prev') : undefined, _$ce(2, 'div', _$ce(2, 'div', [children, _$ce(2, 'div', null, 1, 'k-tabs-active-bar', {
45
+ }, 'prev') : undefined, _$ce(2, 'div', _$ce(2, 'div', [children, _$ce(2, 'div', null, 1, _$cn(k + "-tabs-active-bar"), {
47
46
  'style': this.activeBar.value
48
- })], 0, 'k-tabs-wrapper', {
47
+ })], 0, _$cn(k + "-tabs-wrapper"), {
49
48
  'style': {
50
49
  transform: vertical ? "translateY(" + offset.value + "px)" : "translateX(" + offset.value + "px)"
51
50
  }
52
- }, null, wrapperRef), 2, 'k-tabs-scroll c-clearfix', null, null, scrollRef), isScroll.value ? _$cc(Button, {
53
- 'className': 'k-tabs-next',
51
+ }, null, wrapperRef), 2, _$cn(k + "-tabs-scroll c-clearfix"), null, null, scrollRef), isScroll.value ? _$cc(Button, {
52
+ 'className': _$cn(k + "-tabs-next"),
54
53
  'type': 'none',
55
54
  'icon': true,
56
55
  'key': 'next',
@@ -58,7 +57,7 @@ export default function ($props, $blocks, $__proto__) {
58
57
  'disabled': !enableNext.value,
59
58
  'ev-click': next,
60
59
  'children': _$cc(Icon, {
61
- 'className': _$cn(vertical ? "k-icon-down" : "k-icon-right")
60
+ 'className': _$cn(vertical ? k + "-icon-down" : k + "-icon-right")
62
61
  })
63
62
  }, 'next') : undefined]);
64
63
  }
@@ -1,2 +1,2 @@
1
1
  import '../../styles/global';
2
- export declare function makeStyles(): string;
2
+ export declare function makeStyles(k: string): string;
@@ -108,37 +108,37 @@ setDefault(function () {
108
108
  tabs: defaults
109
109
  }).tabs;
110
110
  });
111
- export function makeStyles() {
112
- return /*#__PURE__*/css(makeCommonStyles(), ";", makeScrollStyles(), ";&.k-type-default{", makeDefaultStyles(), ";}&.k-type-card{", makeCardStyles(), ";}&.k-type-flat-card{", makeFlatCardStyles(), ";}");
111
+ export function makeStyles(k) {
112
+ return /*#__PURE__*/css(makeCommonStyles(k), ";", makeScrollStyles(k), ";&.", k, "-type-default{", makeDefaultStyles(k), ";}&.", k, "-type-card{", makeCardStyles(k), ";}&.", k, "-type-flat-card{", makeFlatCardStyles(k), ";}");
113
113
  }
114
114
 
115
- function makeCommonStyles() {
115
+ function makeCommonStyles(k) {
116
116
  var active = tabs.active;
117
117
  var bar = active.bar;
118
- return /*#__PURE__*/css("position:relative;.k-tab{display:inline-flex;cursor:pointer;text-align:center;align-items:center;color:", tabs.color, ";white-space:nowrap;text-overflow:ellipsis;&:hover,&.k-active{color:", active.color, ";}&.k-disabled{color:", theme.color.disabled, ";cursor:not-allowed;}}.k-tab-close{margin-right:-", tabs.closeGap, ";margin-left:", tabs.closeGap, ";color:", theme.color.lightBlack, ";}.k-tabs-active-bar{transition:all ", tabs.transition, ";position:absolute;left:0;height:", bar.height, ";background:", bar.bgColor, ";bottom:0;}&.k-vertical{display:inline-block;.k-tab{display:block;}.k-tabs-active-bar{left:auto;top:0;right:0;width:", bar.height, ";height:auto;}}", _mapInstanceProperty(sizes).call(sizes, function (size) {
118
+ return /*#__PURE__*/css("position:relative;.", k, "-tab{display:inline-flex;cursor:pointer;text-align:center;align-items:center;color:", tabs.color, ";white-space:nowrap;text-overflow:ellipsis;&:hover,&.", k, "-active{color:", active.color, ";}&.", k, "-disabled{color:", theme.color.disabled, ";cursor:not-allowed;}}.", k, "-tab-close{margin-right:-", tabs.closeGap, ";margin-left:", tabs.closeGap, ";color:", theme.color.lightBlack, ";}.", k, "-tabs-active-bar{transition:all ", tabs.transition, ";position:absolute;left:0;height:", bar.height, ";background:", bar.bgColor, ";bottom:0;}&.", k, "-vertical{display:inline-block;.", k, "-tab{display:block;}.", k, "-tabs-active-bar{left:auto;top:0;right:0;width:", bar.height, ";height:auto;}}", _mapInstanceProperty(sizes).call(sizes, function (size) {
119
119
  var styles = tabs[size];
120
- return "\n &.k-size-" + size + " {\n .k-tab {\n font-size: " + styles.fontSize + ";\n height: " + styles.height + ";\n line-height: " + styles.height + ";\n padding: " + styles.padding + ";\n }\n .k-tab-close .k-icon {\n font-size: " + styles.closeFontSize + ";\n }\n &:not(.k-vertical).k-is-scroll {\n padding: 0 " + styles.navigatorWidth + ";\n }\n &.k-vertical.k-is-scroll {\n padding: " + styles.navigatorWidth + " 0;\n }\n }\n ";
120
+ return /*#__PURE__*/css("&.", k, "-size-", size, "{.", k, "-tab{font-size:", styles.fontSize, ";height:", styles.height, ";line-height:", styles.height, ";padding:", styles.padding, ";}.", k, "-tab-close .", k, "-icon{font-size:", styles.closeFontSize, ";}&:not(.", k, "-vertical).", k, "-is-scroll{padding:0 ", styles.navigatorWidth, ";}&.", k, "-vertical.", k, "-is-scroll{padding:", styles.navigatorWidth, " 0;}}");
121
121
  }), ";");
122
122
  }
123
123
 
124
- function makeScrollStyles() {
125
- return /*#__PURE__*/css("overflow:hidden;.k-tabs-scroll{overflow:hidden;position:relative;padding-bottom:1px;margin-bottom:-1px;}&.k-type-card,&.k-type-flat-card{.k-tabs-scroll{padding-bottom:0;margin-bottom:0;}}.k-tabs-wrapper{white-space:nowrap;transition:transform ", tabs.transition, ";}.k-tabs-prev,.k-tabs-next{position:absolute;&:not(.k-disabled){box-shadow:", theme.boxShadow, ";}}&:not(.k-vertical){.k-tabs-wrapper{float:left;}.k-tabs-prev,.k-tabs-next{top:0;}.k-tabs-prev{left:0;}.k-tabs-next{right:0;}}&.k-vertical{&,.k-tabs-scroll{height:100%;}.k-tabs-prev,.k-tabs-next{width:100%!important;left:0;}.k-tabs-prev{top:0;}.k-tabs-next{bottom:0;}}");
124
+ function makeScrollStyles(k) {
125
+ return /*#__PURE__*/css("overflow:hidden;.", k, "-tabs-scroll{overflow:hidden;position:relative;padding-bottom:1px;margin-bottom:-1px;}&.", k, "-type-card,&.", k, "-type-flat-card{.", k, "-tabs-scroll{padding-bottom:0;margin-bottom:0;}}.", k, "-tabs-wrapper{white-space:nowrap;transition:transform ", tabs.transition, ";}.", k, "-tabs-prev,.", k, "-tabs-next{position:absolute;&:not(.", k, "-disabled){box-shadow:", theme.boxShadow, ";}}&:not(.", k, "-vertical){.", k, "-tabs-wrapper{float:left;}.", k, "-tabs-prev,.", k, "-tabs-next{top:0;}.", k, "-tabs-prev{left:0;}.", k, "-tabs-next{right:0;}}&.", k, "-vertical{&,.", k, "-tabs-scroll{height:100%;}.", k, "-tabs-prev,.", k, "-tabs-next{width:100%!important;left:0;}.", k, "-tabs-prev{top:0;}.", k, "-tabs-next{bottom:0;}}");
126
126
  }
127
127
 
128
- function makeDefaultStyles() {
129
- return /*#__PURE__*/css("border-bottom:", tabs.border, ";&.k-vertical{border-bottom:none;border-right:", tabs.border, ";}");
128
+ function makeDefaultStyles(k) {
129
+ return /*#__PURE__*/css("border-bottom:", tabs.border, ";&.", k, "-vertical{border-bottom:none;border-right:", tabs.border, ";}");
130
130
  }
131
131
 
132
- function makeCardCommonStyles() {
133
- return /*#__PURE__*/css("border-radius:", tabs.card.borderRadius, ";background-color:", tabs.card.bgColor, ";.k-tabs-active-bar{background:#fff;top:0;height:auto;z-index:-1;}");
132
+ function makeCardCommonStyles(k) {
133
+ return /*#__PURE__*/css("border-radius:", tabs.card.borderRadius, ";background-color:", tabs.card.bgColor, ";.", k, "-tabs-active-bar{background:#fff;top:0;height:auto;z-index:-1;}");
134
134
  }
135
135
 
136
- function makeCardStyles() {
136
+ function makeCardStyles(k) {
137
137
  var borderRadius = tabs.card.borderRadius;
138
- return /*#__PURE__*/css(makeCardCommonStyles(), ";.k-tabs-active-bar{border-radius:", borderRadius, " ", borderRadius, " 0px 0px;box-shadow:", theme.boxShadow, ";}&.k-vertical{.k-tabs-active-bar{width:100%;left:0;border-radius:", borderRadius, " 0px 0px ", borderRadius, ";}}");
138
+ return /*#__PURE__*/css(makeCardCommonStyles(k), ";.", k, "-tabs-active-bar{border-radius:", borderRadius, " ", borderRadius, " 0px 0px;box-shadow:", theme.boxShadow, ";}&.", k, "-vertical{.", k, "-tabs-active-bar{width:100%;left:0;border-radius:", borderRadius, " 0px 0px ", borderRadius, ";}}");
139
139
  }
140
140
 
141
- function makeFlatCardStyles() {
141
+ function makeFlatCardStyles(k) {
142
142
  var padding = tabs.flatCard.padding;
143
- return /*#__PURE__*/css(makeCardCommonStyles(), ";padding:0 ", padding, ";.k-tabs-active-bar{top:", padding, ";height:calc(100% - ", padding, " * 2);border-radius:", tabs.card.borderRadius, ";}&.k-vertical{padding:", padding, " 0;.k-tabs-active-bar{left:", padding, ";width:calc(100% - ", padding, " * 2);}}");
143
+ return /*#__PURE__*/css(makeCardCommonStyles(k), ";padding:0 ", padding, ";.", k, "-tabs-active-bar{top:", padding, ";height:calc(100% - ", padding, " * 2);border-radius:", tabs.card.borderRadius, ";}&.", k, "-vertical{padding:", padding, " 0;.", k, "-tabs-active-bar{left:", padding, ";width:calc(100% - ", padding, " * 2);}}");
144
144
  }
@@ -11,6 +11,7 @@ export interface TabEvents {
11
11
  export declare class Tab extends Component<TabProps, TabEvents> {
12
12
  static template: string | import("intact").Template<any>;
13
13
  private tabs;
14
+ private config;
14
15
  private onClick;
15
16
  private remove;
16
17
  }
@@ -5,6 +5,7 @@ import { Component, inject } from 'intact-react';
5
5
  import template from './tab.vdt';
6
6
  import { TABS } from './constants';
7
7
  import { bind } from '../utils';
8
+ import { useConfigContext } from '../config';
8
9
  var typeDefs = {
9
10
  value: null,
10
11
  disabled: Boolean,
@@ -25,6 +26,7 @@ export var Tab = /*#__PURE__*/function (_Component) {
25
26
 
26
27
  _this = _Component.call.apply(_Component, _concatInstanceProperty(_context = [this]).call(_context, args)) || this;
27
28
  _this.tabs = inject(TABS);
29
+ _this.config = useConfigContext();
28
30
  return _this;
29
31
  }
30
32
 
@@ -25,10 +25,8 @@ export default function ($props, $blocks, $__proto__) {
25
25
  var _this$tabs$get = this.tabs.get(),
26
26
  currentValue = _this$tabs$get.value;
27
27
 
28
- var classNameObj = (_classNameObj = {
29
- 'k-tab': true,
30
- 'k-active': !isNullOrUndefined(value) && value === currentValue
31
- }, _classNameObj[className] = className, _classNameObj['k-disabled'] = disabled, _classNameObj);
28
+ var k = this.config.k;
29
+ var classNameObj = (_classNameObj = {}, _classNameObj[k + "-tab"] = true, _classNameObj[k + "-active"] = !isNullOrUndefined(value) && value === currentValue, _classNameObj[className] = className, _classNameObj[k + "-disabled"] = disabled, _classNameObj);
32
30
  return _$cv('div', _extends({}, getRestProps(this), {
33
31
  'className': _$cn(classNameObj),
34
32
  'ev-click': this.onClick
@@ -37,7 +35,7 @@ export default function ($props, $blocks, $__proto__) {
37
35
  'icon': true,
38
36
  'disabled': disabled,
39
37
  'size': 'mini',
40
- 'className': 'k-tab-close',
38
+ 'className': _$cn(k + "-tab-close"),
41
39
  'ev-click': this.remove,
42
40
  'children': _$cc(Icon, _$tmp0)
43
41
  }) : undefined]);
@@ -14,7 +14,8 @@ export function useActiveBar() {
14
14
 
15
15
  function generateStyle() {
16
16
  var element = findDomFromVNode(instance.$lastInput, true);
17
- var activeTab = element.querySelector('.k-tab.k-active');
17
+ var k = instance.config.k;
18
+ var activeTab = element.querySelector("." + k + "-tab." + k + "-active");
18
19
 
19
20
  if (!activeTab) {
20
21
  var oldStyles = styles.value;
@@ -79,7 +79,8 @@ export function useScroll() {
79
79
  var _instance$get2 = instance.get(),
80
80
  vertical = _instance$get2.vertical;
81
81
 
82
- var activeTab = scrollRef.value.querySelector('.k-tab.k-active');
82
+ var k = instance.config.k;
83
+ var activeTab = scrollRef.value.querySelector("." + k + "-tab." + k + "-active");
83
84
 
84
85
  if (activeTab) {
85
86
  var _offset = offset.value; // don't use getBoundingClientRect, it has transform and will return digital number
@@ -20,5 +20,6 @@ export declare class Tag<T extends TagProps = TagProps, E extends TagEvents = Ta
20
20
  static typeDefs: Required<TypeDefs<TagProps>>;
21
21
  static defaults: () => Partial<TagProps>;
22
22
  static events: Events<TagEvents>;
23
+ private config;
23
24
  private onClose;
24
25
  }
@@ -1,9 +1,11 @@
1
1
  import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
2
+ import _concatInstanceProperty from "@babel/runtime-corejs3/core-js/instance/concat";
2
3
  import { __decorate } from "tslib";
3
4
  import { Component } from 'intact-react';
4
5
  import { bind } from '../utils';
5
6
  import template from './index.vdt';
6
7
  import { sizes } from '../../styles/utils';
8
+ import { useConfigContext } from '../config';
7
9
  export var typeDefs = {
8
10
  type: ['default', 'primary', 'danger', 'success', 'warning'],
9
11
  closable: Boolean,
@@ -28,7 +30,17 @@ export var Tag = /*#__PURE__*/function (_Component) {
28
30
  _inheritsLoose(Tag, _Component);
29
31
 
30
32
  function Tag() {
31
- return _Component.apply(this, arguments) || this;
33
+ var _context;
34
+
35
+ var _this;
36
+
37
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
38
+ args[_key] = arguments[_key];
39
+ }
40
+
41
+ _this = _Component.call.apply(_Component, _concatInstanceProperty(_context = [this]).call(_context, args)) || this;
42
+ _this.config = useConfigContext();
43
+ return _this;
32
44
  }
33
45
 
34
46
  var _proto = Tag.prototype;
@@ -23,11 +23,10 @@ export default function ($props, $blocks, $__proto__) {
23
23
  closed = _this$get.closed,
24
24
  size = _this$get.size;
25
25
 
26
- var classNameObj = (_classNameObj = {
27
- 'k-tag': !$props.className
28
- }, _classNameObj[className] = className, _classNameObj["k-" + type] = type !== 'default', _classNameObj["k-" + size] = size !== 'default', _classNameObj["k-" + border] = border, _classNameObj['k-disabled'] = disabled, _classNameObj['k-closable'] = closable, _classNameObj[makeStyles()] = true, _classNameObj[$props.className] = $props.className, _classNameObj);
26
+ var k = this.config.k;
27
+ var classNameObj = (_classNameObj = {}, _classNameObj[k + "-tag"] = !$props.className, _classNameObj[className] = className, _classNameObj[k + "-" + type] = type !== 'default', _classNameObj[k + "-" + size] = size !== 'default', _classNameObj[k + "-" + border] = border, _classNameObj[k + "-disabled"] = disabled, _classNameObj[k + "-closable"] = closable, _classNameObj[makeStyles(k)] = true, _classNameObj[$props.className] = $props.className, _classNameObj);
29
28
  return _$cc(Transition, {
30
- 'name': $props.name || 'k-scale',
29
+ 'name': $props.name || k + "-scale",
31
30
  'children': !closed ? _$cv('div', _extends({
32
31
  'className': _$cn(classNameObj)
33
32
  }, getRestProps(this)), [(_$blocks['body'] = function ($super) {
@@ -42,7 +41,7 @@ export default function ($props, $blocks, $__proto__) {
42
41
  return block ? block.call($this, callBlock, data) : callBlock();
43
42
  }, __$blocks['body'](_$no)), (_$blocks['_close'] = function ($super) {
44
43
  return closable ? _$cc(Icon, {
45
- 'className': 'k-tag-close ion-ios-close-empty',
44
+ 'className': _$cn(k + "-tag-close ion-ios-close-empty"),
46
45
  'color': type,
47
46
  'hoverable': !disabled,
48
47
  'ev-click': this.onClose
@@ -65,5 +65,5 @@ declare const defaults: {
65
65
  };
66
66
  declare let tag: typeof defaults;
67
67
  export { tag };
68
- export declare function makeStyles(): string;
69
- export declare function makeTagsStyles(): string;
68
+ export declare function makeStyles(k: string): string;
69
+ export declare function makeTagsStyles(k: string): string;
@@ -114,16 +114,16 @@ setDefault(function () {
114
114
  }).tag;
115
115
  });
116
116
  export { tag };
117
- export function makeStyles() {
118
- return /*#__PURE__*/css("display:inline-flex;align-items:center;padding:", tag.padding, ";border:", tag.border, ";border-radius:", tag.borderRadius, ";font-size:", tag.fontSize, ";height:", tag.height, ";.k-tag-close{font-size:", tag.close.fontSize, ";margin-left:", tag.close.gap, ";width:", tag.close.width, ";}&.k-none{border:none;background:", tag.none.bgColor, ";}", _mapInstanceProperty(types).call(types, function (t) {
117
+ export function makeStyles(k) {
118
+ return /*#__PURE__*/css("display:inline-flex;align-items:center;padding:", tag.padding, ";border:", tag.border, ";border-radius:", tag.borderRadius, ";font-size:", tag.fontSize, ";height:", tag.height, ";.", k, "-tag-close{font-size:", tag.close.fontSize, ";margin-left:", tag.close.gap, ";width:", tag.close.width, ";}&.", k, "-none{border:none;background:", tag.none.bgColor, ";}", _mapInstanceProperty(types).call(types, function (t) {
119
119
  var styles = tag[t];
120
- return /*#__PURE__*/css("&.k-", t, "{color:", styles.color, ";border-color:", styles.color, ";background:", styles.bgColor, ";}");
120
+ return /*#__PURE__*/css("&.", k, "-", t, "{color:", styles.color, ";border-color:", styles.color, ";background:", styles.bgColor, ";}");
121
121
  }), " ", _mapInstanceProperty(sizes).call(sizes, function (s) {
122
122
  if (s === 'default') return;
123
123
  var styles = tag[s];
124
- return /*#__PURE__*/css("&.k-", s, "{padding:", styles.padding, ";height:", styles.height, ";font-size:", styles.fontSize, ";.k-tag-close{font-size:", styles.close.fontSize, ";margin-left:", styles.close.gap, ";}}");
125
- }), "&.k-dashed{border-style:dashed;}&.k-dragging{opacity:0;}");
124
+ return /*#__PURE__*/css("&.", k, "-", s, "{padding:", styles.padding, ";height:", styles.height, ";font-size:", styles.fontSize, ";.", k, "-tag-close{font-size:", styles.close.fontSize, ";margin-left:", styles.close.gap, ";}}");
125
+ }), "&.", k, "-dashed{border-style:dashed;}&.", k, "-dragging{opacity:0;}");
126
126
  }
127
- export function makeTagsStyles() {
128
- return /*#__PURE__*/css("display:flex;flex-wrap:wrap;gap:", defaults.tags.gap, ";position:relative;overflow:hidden;&.k-nowrap{flex-wrap:nowrap;.k-tag{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex-shrink:0;}}.k-tags-more{cursor:default;font-family:monospace;}.k-tag.k-draggable{cursor:move;}");
127
+ export function makeTagsStyles(k) {
128
+ return /*#__PURE__*/css("display:flex;flex-wrap:wrap;gap:", defaults.tags.gap, ";position:relative;overflow:hidden;&.", k, "-nowrap{flex-wrap:nowrap;.", k, "-tag{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex-shrink:0;}}.", k, "-tags-more{cursor:default;font-family:monospace;}.", k, "-tag.", k, "-draggable{cursor:move;}");
129
129
  }
@@ -24,4 +24,5 @@ export declare class Tags extends Component<TagsProps, TagsEvents> {
24
24
  private children;
25
25
  private draggable;
26
26
  private nowrap;
27
+ private config;
27
28
  }
@@ -6,6 +6,7 @@ import { useNowrap } from './useNowrap';
6
6
  import { typeDefs as tagTypeDefs } from './base';
7
7
  import { useChildren } from './useChildren';
8
8
  import { useDraggable } from './useDraggable';
9
+ import { useConfigContext } from '../config';
9
10
  var typeDefs = {
10
11
  nowrap: Boolean,
11
12
  draggable: Boolean,
@@ -40,6 +41,7 @@ export var Tags = /*#__PURE__*/function (_Component) {
40
41
  _this.children = useChildren();
41
42
  _this.draggable = useDraggable(_this.children);
42
43
  _this.nowrap = useNowrap(_this.draggable);
44
+ _this.config = useConfigContext();
43
45
  return _this;
44
46
  }
45
47
 
@@ -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
  }