@oinone/kunlun-vue-ui-antd 6.2.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 (260) hide show
  1. package/README.md +1 -0
  2. package/dist/oinone-kunlun-vue-ui-antd.css +1 -0
  3. package/dist/oinone-kunlun-vue-ui-antd.esm.js +16 -0
  4. package/dist/oinone-kunlun-vue-ui-antd.scss +1 -0
  5. package/dist/types/index.d.ts +3 -0
  6. package/dist/types/src/component/index.d.ts +31 -0
  7. package/dist/types/src/component/oio-block/index.d.ts +3 -0
  8. package/dist/types/src/component/oio-block/oio-block.vue.d.ts +39 -0
  9. package/dist/types/src/component/oio-block/oio-col.vue.d.ts +86 -0
  10. package/dist/types/src/component/oio-block/oio-row.vue.d.ts +34 -0
  11. package/dist/types/src/component/oio-breadcrumb/index.d.ts +2 -0
  12. package/dist/types/src/component/oio-breadcrumb/oio-breadcrumb-item.vue.d.ts +14 -0
  13. package/dist/types/src/component/oio-breadcrumb/oio-breadcrumb.vue.d.ts +14 -0
  14. package/dist/types/src/component/oio-button/index.d.ts +1 -0
  15. package/dist/types/src/component/oio-button/oio-button.vue.d.ts +136 -0
  16. package/dist/types/src/component/oio-cascader/index.d.ts +1 -0
  17. package/dist/types/src/component/oio-cascader/oio-cascader.vue.d.ts +236 -0
  18. package/dist/types/src/component/oio-checkbox/index.d.ts +1 -0
  19. package/dist/types/src/component/oio-checkbox/oio-checkbox.vue.d.ts +56 -0
  20. package/dist/types/src/component/oio-collapse/index.d.ts +2 -0
  21. package/dist/types/src/component/oio-collapse/oio-collapse-panel.vue.d.ts +86 -0
  22. package/dist/types/src/component/oio-collapse/oio-collapse.vue.d.ts +103 -0
  23. package/dist/types/src/component/oio-date-time-picker/index.d.ts +5 -0
  24. package/dist/types/src/component/oio-date-time-picker/oio-date-picker.vue.d.ts +182 -0
  25. package/dist/types/src/component/oio-date-time-picker/oio-date-time-picker.vue.d.ts +240 -0
  26. package/dist/types/src/component/oio-date-time-picker/oio-time-picker.vue.d.ts +176 -0
  27. package/dist/types/src/component/oio-date-time-picker/oio-year-picker.vue.d.ts +139 -0
  28. package/dist/types/src/component/oio-date-time-picker/use-date-time-picker-props.d.ts +15 -0
  29. package/dist/types/src/component/oio-date-time-range-picker/index.d.ts +5 -0
  30. package/dist/types/src/component/oio-date-time-range-picker/oio-date-range-picker.vue.d.ts +139 -0
  31. package/dist/types/src/component/oio-date-time-range-picker/oio-date-time-range-picker.vue.d.ts +195 -0
  32. package/dist/types/src/component/oio-date-time-range-picker/oio-time-range-picker.vue.d.ts +139 -0
  33. package/dist/types/src/component/oio-date-time-range-picker/oio-year-range-picker.vue.d.ts +124 -0
  34. package/dist/types/src/component/oio-date-time-range-picker/use-date-time-range-picker-props.d.ts +12 -0
  35. package/dist/types/src/component/oio-divider/index.d.ts +2 -0
  36. package/dist/types/src/component/oio-divider/oio-divider.vue.d.ts +38 -0
  37. package/dist/types/src/component/oio-drawer/index.d.ts +1 -0
  38. package/dist/types/src/component/oio-drawer/oio-drawer.vue.d.ts +227 -0
  39. package/dist/types/src/component/oio-dropdown/index.d.ts +1 -0
  40. package/dist/types/src/component/oio-dropdown/oio-dropdown.vue.d.ts +78 -0
  41. package/dist/types/src/component/oio-empty/index.d.ts +1 -0
  42. package/dist/types/src/component/oio-empty/oio-empty-data.vue.d.ts +42 -0
  43. package/dist/types/src/component/oio-form/index.d.ts +2 -0
  44. package/dist/types/src/component/oio-form/oio-form-item.vue.d.ts +126 -0
  45. package/dist/types/src/component/oio-form/oio-form.vue.d.ts +100 -0
  46. package/dist/types/src/component/oio-gallery/index.d.ts +1 -0
  47. package/dist/types/src/component/oio-gallery/oio-gallery.vue.d.ts +98 -0
  48. package/dist/types/src/component/oio-group/index.d.ts +2 -0
  49. package/dist/types/src/component/oio-group/oio-group-help.vue.d.ts +65 -0
  50. package/dist/types/src/component/oio-group/oio-group.vue.d.ts +113 -0
  51. package/dist/types/src/component/oio-inner-popup/index.d.ts +1 -0
  52. package/dist/types/src/component/oio-inner-popup/oio-inner-popup.vue.d.ts +195 -0
  53. package/dist/types/src/component/oio-input/index.d.ts +5 -0
  54. package/dist/types/src/component/oio-input/oio-input-group.vue.d.ts +16 -0
  55. package/dist/types/src/component/oio-input/oio-input-number.vue.d.ts +167 -0
  56. package/dist/types/src/component/oio-input/oio-input-password.vue.d.ts +111 -0
  57. package/dist/types/src/component/oio-input/oio-input-search.vue.d.ts +106 -0
  58. package/dist/types/src/component/oio-input/oio-input.vue.d.ts +107 -0
  59. package/dist/types/src/component/oio-modal/index.d.ts +1 -0
  60. package/dist/types/src/component/oio-modal/oio-modal.vue.d.ts +230 -0
  61. package/dist/types/src/component/oio-notification/index.d.ts +116 -0
  62. package/dist/types/src/component/oio-pagination/index.d.ts +1 -0
  63. package/dist/types/src/component/oio-pagination/oio-pagination.vue.d.ts +107 -0
  64. package/dist/types/src/component/oio-popconfirm/index.d.ts +1 -0
  65. package/dist/types/src/component/oio-popconfirm/oio-popconfirm.vue.d.ts +119 -0
  66. package/dist/types/src/component/oio-select/index.d.ts +1 -0
  67. package/dist/types/src/component/oio-select/oio-select.vue.d.ts +153 -0
  68. package/dist/types/src/component/oio-slider/index.d.ts +1 -0
  69. package/dist/types/src/component/oio-slider/oio-slider.vue.d.ts +155 -0
  70. package/dist/types/src/component/oio-spin/index.d.ts +1 -0
  71. package/dist/types/src/component/oio-spin/oio-spin.vue.d.ts +54 -0
  72. package/dist/types/src/component/oio-switch/index.d.ts +1 -0
  73. package/dist/types/src/component/oio-switch/oio-switch.vue.d.ts +92 -0
  74. package/dist/types/src/component/oio-tabs/index.d.ts +3 -0
  75. package/dist/types/src/component/oio-tabs/oio-tab.vue.d.ts +67 -0
  76. package/dist/types/src/component/oio-tabs/oio-tabs.vue.d.ts +93 -0
  77. package/dist/types/src/component/oio-tabs/use-tab-bar.d.ts +5 -0
  78. package/dist/types/src/component/oio-textarea/index.d.ts +1 -0
  79. package/dist/types/src/component/oio-textarea/oio-textarea.vue.d.ts +100 -0
  80. package/dist/types/src/component/oio-tooltip/index.d.ts +2 -0
  81. package/dist/types/src/component/oio-tooltip/oio-tooltip-help.vue.d.ts +12 -0
  82. package/dist/types/src/component/oio-tooltip/oio-tooltip.vue.d.ts +76 -0
  83. package/dist/types/src/component/oio-tree/index.d.ts +1 -0
  84. package/dist/types/src/component/oio-tree/oio-tree.vue.d.ts +171 -0
  85. package/dist/types/src/component/oio-tree-select/index.d.ts +1 -0
  86. package/dist/types/src/component/oio-tree-select/oio-tree-select.vue.d.ts +226 -0
  87. package/dist/types/src/component/oio-upload/index.d.ts +1 -0
  88. package/dist/types/src/component/oio-upload/oio-upload.vue.d.ts +187 -0
  89. package/dist/types/src/index.d.ts +2 -0
  90. package/dist/types/src/theme/index.d.ts +1 -0
  91. package/dist/types/src/vc-component/index.d.ts +1 -0
  92. package/dist/types/src/vc-component/use-max-tag-placeholder.d.ts +7 -0
  93. package/index.ts +3 -0
  94. package/package.json +36 -0
  95. package/rollup.config.js +15 -0
  96. package/src/component/index.ts +32 -0
  97. package/src/component/oio-block/index.ts +3 -0
  98. package/src/component/oio-block/oio-block.vue +77 -0
  99. package/src/component/oio-block/oio-col.vue +32 -0
  100. package/src/component/oio-block/oio-row.vue +42 -0
  101. package/src/component/oio-block/style/a-col.scss +18 -0
  102. package/src/component/oio-block/style/index.scss +42 -0
  103. package/src/component/oio-block/style/parameters.scss +13 -0
  104. package/src/component/oio-breadcrumb/index.ts +2 -0
  105. package/src/component/oio-breadcrumb/oio-breadcrumb-item.vue +30 -0
  106. package/src/component/oio-breadcrumb/oio-breadcrumb.vue +30 -0
  107. package/src/component/oio-button/index.ts +1 -0
  108. package/src/component/oio-button/oio-button.vue +154 -0
  109. package/src/component/oio-button/style/a-button.scss +210 -0
  110. package/src/component/oio-button/style/index.scss +21 -0
  111. package/src/component/oio-button/style/parameters.scss +5 -0
  112. package/src/component/oio-cascader/index.ts +1 -0
  113. package/src/component/oio-cascader/oio-cascader.vue +171 -0
  114. package/src/component/oio-cascader/style/index.scss +59 -0
  115. package/src/component/oio-cascader/style/parameters.scss +5 -0
  116. package/src/component/oio-checkbox/index.ts +1 -0
  117. package/src/component/oio-checkbox/oio-checkbox.vue +69 -0
  118. package/src/component/oio-checkbox/style/index.scss +8 -0
  119. package/src/component/oio-checkbox/style/parameters.scss +5 -0
  120. package/src/component/oio-collapse/index.ts +2 -0
  121. package/src/component/oio-collapse/oio-collapse-panel.vue +92 -0
  122. package/src/component/oio-collapse/oio-collapse.vue +138 -0
  123. package/src/component/oio-collapse/style/index.scss +59 -0
  124. package/src/component/oio-collapse/style/parameters.scss +5 -0
  125. package/src/component/oio-date-time-picker/index.ts +5 -0
  126. package/src/component/oio-date-time-picker/oio-date-picker.vue +34 -0
  127. package/src/component/oio-date-time-picker/oio-date-time-picker.vue +91 -0
  128. package/src/component/oio-date-time-picker/oio-time-picker.vue +34 -0
  129. package/src/component/oio-date-time-picker/oio-year-picker.vue +34 -0
  130. package/src/component/oio-date-time-picker/style/index.scss +348 -0
  131. package/src/component/oio-date-time-picker/style/mixin.scss +16 -0
  132. package/src/component/oio-date-time-picker/style/parameters.scss +5 -0
  133. package/src/component/oio-date-time-picker/use-date-time-picker-props.ts +151 -0
  134. package/src/component/oio-date-time-range-picker/index.ts +5 -0
  135. package/src/component/oio-date-time-range-picker/oio-date-range-picker.vue +29 -0
  136. package/src/component/oio-date-time-range-picker/oio-date-time-range-picker.vue +82 -0
  137. package/src/component/oio-date-time-range-picker/oio-time-range-picker.vue +29 -0
  138. package/src/component/oio-date-time-range-picker/oio-year-range-picker.vue +29 -0
  139. package/src/component/oio-date-time-range-picker/style/index.scss +227 -0
  140. package/src/component/oio-date-time-range-picker/style/parameters.scss +5 -0
  141. package/src/component/oio-date-time-range-picker/use-date-time-range-picker-props.ts +138 -0
  142. package/src/component/oio-divider/index.ts +3 -0
  143. package/src/component/oio-divider/oio-divider.vue +31 -0
  144. package/src/component/oio-divider/style/index.scss +7 -0
  145. package/src/component/oio-divider/style/parameters.scss +5 -0
  146. package/src/component/oio-drawer/index.ts +1 -0
  147. package/src/component/oio-drawer/oio-drawer.vue +120 -0
  148. package/src/component/oio-drawer/style/index.scss +93 -0
  149. package/src/component/oio-drawer/style/parameters.scss +5 -0
  150. package/src/component/oio-dropdown/index.ts +1 -0
  151. package/src/component/oio-dropdown/oio-dropdown.vue +81 -0
  152. package/src/component/oio-dropdown/style/index.scss +30 -0
  153. package/src/component/oio-dropdown/style/parameters.scss +5 -0
  154. package/src/component/oio-empty/index.ts +1 -0
  155. package/src/component/oio-empty/oio-empty-data.vue +47 -0
  156. package/src/component/oio-empty/style/index.scss +6 -0
  157. package/src/component/oio-form/index.ts +2 -0
  158. package/src/component/oio-form/oio-form-item.vue +81 -0
  159. package/src/component/oio-form/oio-form.vue +102 -0
  160. package/src/component/oio-form/style/animation.scss +17 -0
  161. package/src/component/oio-form/style/index.scss +135 -0
  162. package/src/component/oio-form/style/parameters.scss +9 -0
  163. package/src/component/oio-gallery/index.ts +1 -0
  164. package/src/component/oio-gallery/oio-gallery.vue +158 -0
  165. package/src/component/oio-group/index.ts +2 -0
  166. package/src/component/oio-group/oio-group-help.vue +28 -0
  167. package/src/component/oio-group/oio-group.vue +140 -0
  168. package/src/component/oio-group/style/index.scss +98 -0
  169. package/src/component/oio-group/style/parameters.scss +5 -0
  170. package/src/component/oio-inner-popup/index.ts +1 -0
  171. package/src/component/oio-inner-popup/oio-inner-popup.vue +230 -0
  172. package/src/component/oio-inner-popup/style/index.scss +147 -0
  173. package/src/component/oio-inner-popup/style/parameters.scss +5 -0
  174. package/src/component/oio-input/index.ts +5 -0
  175. package/src/component/oio-input/oio-input-group.vue +40 -0
  176. package/src/component/oio-input/oio-input-number.vue +374 -0
  177. package/src/component/oio-input/oio-input-password.vue +67 -0
  178. package/src/component/oio-input/oio-input-search.vue +107 -0
  179. package/src/component/oio-input/oio-input.vue +124 -0
  180. package/src/component/oio-input/style/a-input.scss +103 -0
  181. package/src/component/oio-input/style/index.scss +198 -0
  182. package/src/component/oio-input/style/mixin.scss +50 -0
  183. package/src/component/oio-input/style/oio-input-group.scss +31 -0
  184. package/src/component/oio-input/style/oio-input-number.scss +13 -0
  185. package/src/component/oio-input/style/oio-input-search.scss +94 -0
  186. package/src/component/oio-input/style/parameters.scss +21 -0
  187. package/src/component/oio-modal/index.ts +1 -0
  188. package/src/component/oio-modal/index.zh-CN.md +167 -0
  189. package/src/component/oio-modal/oio-modal.vue +184 -0
  190. package/src/component/oio-modal/style/index.scss +167 -0
  191. package/src/component/oio-modal/style/parameters.scss +5 -0
  192. package/src/component/oio-notification/index.ts +197 -0
  193. package/src/component/oio-notification/style/index.scss +67 -0
  194. package/src/component/oio-notification/style/parameters.scss +5 -0
  195. package/src/component/oio-pagination/index.ts +1 -0
  196. package/src/component/oio-pagination/oio-pagination.vue +105 -0
  197. package/src/component/oio-pagination/style/index.scss +181 -0
  198. package/src/component/oio-pagination/style/parameters.scss +5 -0
  199. package/src/component/oio-popconfirm/index.ts +1 -0
  200. package/src/component/oio-popconfirm/oio-popconfirm.vue +192 -0
  201. package/src/component/oio-popconfirm/style/index.scss +54 -0
  202. package/src/component/oio-popconfirm/style/parameters.scss +5 -0
  203. package/src/component/oio-popover/style/index.scss +16 -0
  204. package/src/component/oio-popover/style/parameters.scss +5 -0
  205. package/src/component/oio-radio/style/index.scss +24 -0
  206. package/src/component/oio-radio/style/parameters.scss +5 -0
  207. package/src/component/oio-select/index.ts +1 -0
  208. package/src/component/oio-select/oio-select.vue +104 -0
  209. package/src/component/oio-select/style/a-select.scss +102 -0
  210. package/src/component/oio-select/style/index.scss +129 -0
  211. package/src/component/oio-select/style/mixin.scss +18 -0
  212. package/src/component/oio-select/style/parameters.scss +5 -0
  213. package/src/component/oio-slider/index.ts +1 -0
  214. package/src/component/oio-slider/oio-slider.vue +81 -0
  215. package/src/component/oio-slider/style/index.scss +100 -0
  216. package/src/component/oio-slider/style/parameters.scss +5 -0
  217. package/src/component/oio-spin/index.ts +1 -0
  218. package/src/component/oio-spin/oio-spin.vue +87 -0
  219. package/src/component/oio-spin/style/index.scss +48 -0
  220. package/src/component/oio-spin/style/parameters.scss +5 -0
  221. package/src/component/oio-switch/index.ts +1 -0
  222. package/src/component/oio-switch/oio-switch.vue +42 -0
  223. package/src/component/oio-switch/style/index.scss +36 -0
  224. package/src/component/oio-switch/style/parameters.scss +5 -0
  225. package/src/component/oio-tabs/index.ts +3 -0
  226. package/src/component/oio-tabs/oio-tab.vue +99 -0
  227. package/src/component/oio-tabs/oio-tabs.vue +188 -0
  228. package/src/component/oio-tabs/style/index.scss +274 -0
  229. package/src/component/oio-tabs/style/parameters.scss +9 -0
  230. package/src/component/oio-tabs/use-tab-bar.ts +69 -0
  231. package/src/component/oio-textarea/index.ts +1 -0
  232. package/src/component/oio-textarea/oio-textarea.vue +76 -0
  233. package/src/component/oio-textarea/style/index.scss +108 -0
  234. package/src/component/oio-textarea/style/parameters.scss +5 -0
  235. package/src/component/oio-tooltip/index.ts +2 -0
  236. package/src/component/oio-tooltip/oio-tooltip-help.vue +40 -0
  237. package/src/component/oio-tooltip/oio-tooltip.vue +59 -0
  238. package/src/component/oio-tooltip/style/index.scss +8 -0
  239. package/src/component/oio-tooltip/style/parameters.scss +9 -0
  240. package/src/component/oio-tree/index.ts +1 -0
  241. package/src/component/oio-tree/oio-tree.vue +181 -0
  242. package/src/component/oio-tree/style/index.scss +51 -0
  243. package/src/component/oio-tree/style/parameters.scss +5 -0
  244. package/src/component/oio-tree-select/index.ts +1 -0
  245. package/src/component/oio-tree-select/oio-tree-select.vue +180 -0
  246. package/src/component/oio-tree-select/style/index.scss +92 -0
  247. package/src/component/oio-tree-select/style/parameters.scss +5 -0
  248. package/src/component/oio-upload/index.ts +1 -0
  249. package/src/component/oio-upload/oio-upload.vue +232 -0
  250. package/src/component/oio-upload/style/index.scss +66 -0
  251. package/src/component/oio-upload/style/parameters.scss +5 -0
  252. package/src/index.ts +3 -0
  253. package/src/shim-translate.d.ts +7 -0
  254. package/src/shim-vue.d.ts +6 -0
  255. package/src/style/global-parameters.scss +9 -0
  256. package/src/style/index.scss +31 -0
  257. package/src/style/mixin.scss +135 -0
  258. package/src/theme/index.ts +1 -0
  259. package/src/vc-component/index.ts +1 -0
  260. package/src/vc-component/use-max-tag-placeholder.ts +38 -0
@@ -0,0 +1,28 @@
1
+ <template>
2
+ <div class="oio-group-help">
3
+ <a-tooltip
4
+ :destroyTooltipOnHide="true"
5
+ :color="helpBgColor"
6
+ :autoAdjustOverflow="helpAdjustOverflow"
7
+ :placement="helpPlacement"
8
+ >
9
+ <template #title>{{ help }}</template>
10
+ <oio-icon :icon="helpIcon" :color="helpIconColor" :size="helpIconSize" />
11
+ </a-tooltip>
12
+ </div>
13
+ </template>
14
+ <script lang="ts">
15
+ import { OioGroupHelpProps, OioIcon } from '@oinone/kunlun-vue-ui-common';
16
+ import { defineComponent } from 'vue';
17
+
18
+ export default defineComponent({
19
+ name: 'OioGroupHelp',
20
+ inheritAttrs: false,
21
+ components: {
22
+ OioIcon
23
+ },
24
+ props: {
25
+ ...OioGroupHelpProps
26
+ }
27
+ });
28
+ </script>
@@ -0,0 +1,140 @@
1
+ <script lang="ts">
2
+ import { StringHelper } from '@oinone/kunlun-shared';
3
+ import { OioGroupProps, PropRecordHelper } from '@oinone/kunlun-vue-ui-common';
4
+ import { createVNode, defineComponent, VNode } from 'vue';
5
+ import { DEFAULT_PREFIX } from '../../theme';
6
+ import OioGroupHelp from './oio-group-help.vue';
7
+
8
+ export default defineComponent({
9
+ name: 'OioGroup',
10
+ inheritAttrs: false,
11
+ props: {
12
+ ...OioGroupProps
13
+ },
14
+ slots: ['default', 'title', 'titleToolbar'],
15
+ render() {
16
+ const {
17
+ $attrs,
18
+ $slots,
19
+ title,
20
+ description,
21
+ border,
22
+ wrapperClassName,
23
+ wrapperStyle,
24
+ toolbarClassName,
25
+ toolbarStyle,
26
+ help,
27
+ helpIcon,
28
+ helpIconSize,
29
+ helpIconColor,
30
+ helpPlacement,
31
+ helpBgColor,
32
+ helpAdjustOverflow
33
+ } = this;
34
+ const slots = PropRecordHelper.collectionSlots($slots, [
35
+ { origin: 'default', isNotNull: true },
36
+ 'title',
37
+ 'titleToolbar'
38
+ ]);
39
+ const classList = [`${DEFAULT_PREFIX}-group`];
40
+ if (border) {
41
+ classList.push(`${DEFAULT_PREFIX}-group-border`);
42
+ }
43
+ let hiddenTitle = title === false;
44
+ let titleVNodes: VNode[] | undefined;
45
+ if (slots.title) {
46
+ titleVNodes = slots.title();
47
+ } else if (title) {
48
+ titleVNodes = [
49
+ createVNode(
50
+ 'div',
51
+ {
52
+ key: `${DEFAULT_PREFIX}-group-title`,
53
+ class: `${DEFAULT_PREFIX}-group-title`,
54
+ title
55
+ },
56
+ title
57
+ )
58
+ ];
59
+ }
60
+ if (titleVNodes) {
61
+ const titleClassList = [`${DEFAULT_PREFIX}-group-title-wrapper`];
62
+ if (help) {
63
+ titleVNodes.push(
64
+ createVNode(OioGroupHelp, {
65
+ help,
66
+ helpIcon,
67
+ helpIconSize,
68
+ helpIconColor,
69
+ helpPlacement,
70
+ helpBgColor,
71
+ helpAdjustOverflow
72
+ })
73
+ );
74
+ }
75
+ if (description) {
76
+ titleVNodes.push(
77
+ createVNode(
78
+ 'div',
79
+ {
80
+ key: `${DEFAULT_PREFIX}-group-description`,
81
+ class: `${DEFAULT_PREFIX}-group-description`,
82
+ title: description
83
+ },
84
+ description
85
+ )
86
+ );
87
+ }
88
+ if (slots.titleToolbar) {
89
+ titleVNodes = [createVNode('div', { class: `${DEFAULT_PREFIX}-group-title-content` }, titleVNodes)];
90
+ titleVNodes.push(
91
+ createVNode(
92
+ 'div',
93
+ {
94
+ class: StringHelper.append([`${DEFAULT_PREFIX}-group-title-toolbar`], toolbarClassName),
95
+ style: toolbarStyle
96
+ },
97
+ slots.titleToolbar()
98
+ )
99
+ );
100
+ titleClassList.push(`${DEFAULT_PREFIX}-group-title-space-between`);
101
+ }
102
+ titleVNodes = [createVNode('div', { class: titleClassList }, titleVNodes)];
103
+ } else if (slots.titleToolbar) {
104
+ const titleClassList = [`${DEFAULT_PREFIX}-group-title-wrapper`];
105
+ titleVNodes = [
106
+ createVNode(
107
+ 'div',
108
+ {
109
+ class: StringHelper.append([`${DEFAULT_PREFIX}-group-title-toolbar`], toolbarClassName),
110
+ style: toolbarStyle
111
+ },
112
+ slots.titleToolbar()
113
+ )
114
+ ];
115
+ titleClassList.push(`${DEFAULT_PREFIX}-group-title-flex-end`);
116
+ titleVNodes = [createVNode('div', { class: titleClassList }, titleVNodes)];
117
+ } else {
118
+ hiddenTitle = true;
119
+ }
120
+ if (hiddenTitle) {
121
+ classList.push(`${DEFAULT_PREFIX}-group-title-hidden`);
122
+ }
123
+ return createVNode('div', PropRecordHelper.collectionBasicProps($attrs, classList), [
124
+ ...(titleVNodes || []),
125
+ createVNode(
126
+ 'div',
127
+ {
128
+ key: `${DEFAULT_PREFIX}-group-content`,
129
+ class: StringHelper.append(
130
+ [`${DEFAULT_PREFIX}-group-content`, `${DEFAULT_PREFIX}-scrollbar`],
131
+ wrapperClassName
132
+ ),
133
+ style: wrapperStyle
134
+ },
135
+ slots.default()
136
+ )
137
+ ]);
138
+ }
139
+ });
140
+ </script>
@@ -0,0 +1,98 @@
1
+ @import './parameters.scss';
2
+
3
+ .#{$groupClassPrefix} {
4
+ width: 100%;
5
+ background: var(--oio-background);
6
+
7
+ &-border {
8
+ border: var($parameterPrefix + -border-width) var(--oio-group-border-width) var($parameterPrefix + -border-color);
9
+ border-radius: var($parameterPrefix + -border-radius, 4px);
10
+ box-shadow: 0 0 6px 0 rgba(0, 0, 0, 0.05);
11
+ }
12
+
13
+ &-title-wrapper {
14
+ // height: 56px;
15
+ padding: var(--oio-padding) var(--oio-padding) 0;
16
+ display: flex;
17
+ flex-flow: row nowrap;
18
+ justify-content: flex-start;
19
+ align-content: flex-start;
20
+ align-items: center;
21
+ }
22
+
23
+ &-title-space-between {
24
+ justify-content: space-between;
25
+
26
+ & > .#{$groupClassPrefix}-title-content {
27
+ overflow: hidden;
28
+ display: flex;
29
+ flex-flow: row nowrap;
30
+ justify-content: flex-start;
31
+ align-content: flex-start;
32
+ align-items: center;
33
+ }
34
+
35
+ & > .#{$groupClassPrefix}-title-toolbar {
36
+ margin-left: 16px;
37
+ display: flex;
38
+ flex-flow: row nowrap;
39
+ justify-content: flex-end;
40
+ align-content: flex-end;
41
+ align-items: center;
42
+ column-gap: 8px;
43
+ }
44
+ }
45
+
46
+ &-title-flex-end {
47
+ justify-content: flex-end;
48
+ }
49
+
50
+ &-title {
51
+ color: var(--oio-text-color);
52
+ font-size: var(--oio-font-size-lg);
53
+ line-height: var(--oio-line-height-lg);
54
+ font-weight: var(--oio-font-weight-bold);
55
+ max-width: 100%;
56
+ white-space: nowrap;
57
+ overflow: hidden;
58
+ text-overflow: ellipsis;
59
+
60
+ & + .#{$groupClassPrefix}-description {
61
+ margin-left: 12px;
62
+ }
63
+ }
64
+
65
+ &-help {
66
+ line-height: var(--oio-line-height-lg);
67
+ margin-left: 4px;
68
+ margin-right: 4px;
69
+
70
+ .oio-icon {
71
+ vertical-align: 0;
72
+ }
73
+ }
74
+
75
+ &-description {
76
+ color: var(--oio-text-color-secondary);
77
+ font-size: var(--oio-font-size-sm);
78
+ line-height: var(--oio-line-height-lg);
79
+ max-width: 400px;
80
+ white-space: nowrap;
81
+ overflow: hidden;
82
+ text-overflow: ellipsis;
83
+ }
84
+
85
+ &-content {
86
+ padding: var(--oio-padding);
87
+ }
88
+
89
+ &-title-hidden {
90
+ & > .oio-group-title-wrapper {
91
+ display: none;
92
+ }
93
+
94
+ & > .oio-group-content {
95
+ padding: var(--oio-padding);
96
+ }
97
+ }
98
+ }
@@ -0,0 +1,5 @@
1
+ @import '../../../style/global-parameters.scss';
2
+
3
+ $groupPrefix: $prefix + -group;
4
+ $groupParameterPrefix: $parameterPrefix + -group;
5
+ $groupClassPrefix: $groupPrefix;
@@ -0,0 +1 @@
1
+ export { default as OioInnerPopup } from './oio-inner-popup.vue';
@@ -0,0 +1,230 @@
1
+ <script lang="ts">
2
+ import {
3
+ ButtonType,
4
+ DrawerPlacement,
5
+ OioIcon,
6
+ OioInnerPopupProps,
7
+ PropRecordHelper,
8
+ useResizableHandle,
9
+ OioCloseIcon
10
+ } from '@oinone/kunlun-vue-ui-common';
11
+ import { isFunction, isString } from 'lodash-es';
12
+ import {
13
+ computed,
14
+ createVNode,
15
+ defineComponent,
16
+ ref,
17
+ Slot,
18
+ Teleport,
19
+ VNode,
20
+ VNodeProps,
21
+ vShow,
22
+ watch,
23
+ withDirectives
24
+ } from 'vue';
25
+ import { DEFAULT_PREFIX } from '../../theme';
26
+ import { OioButton } from '../oio-button';
27
+ import { OioSpin } from '../oio-spin';
28
+ import { OioTooltipHelp } from '../oio-tooltip';
29
+
30
+ const CLASS_NAME = `${DEFAULT_PREFIX}-inner-popup`;
31
+
32
+ const TELEPORT_TARGET_CLASS_NAME = `${CLASS_NAME}-target`;
33
+
34
+ const CLEAR_TELEPORT_TARGET_CLASS_NAMES = [
35
+ TELEPORT_TARGET_CLASS_NAME,
36
+ `${CLASS_NAME}-${DrawerPlacement.top}`,
37
+ `${CLASS_NAME}-${DrawerPlacement.right}`,
38
+ `${CLASS_NAME}-${DrawerPlacement.bottom}`,
39
+ `${CLASS_NAME}-${DrawerPlacement.left}`
40
+ ];
41
+
42
+ function createTitle(children: VNode[]) {
43
+ return createVNode('div', { class: `${CLASS_NAME}-title-wrapper` }, children);
44
+ }
45
+
46
+ function createHeader(children: VNode[]) {
47
+ return createVNode('div', { class: `${CLASS_NAME}-header` }, children);
48
+ }
49
+
50
+ function createBody(children: VNode[]) {
51
+ return createVNode('div', { class: `${CLASS_NAME}-body` }, children);
52
+ }
53
+
54
+ function createFooter(children: VNode[]) {
55
+ return createVNode('div', { class: `${CLASS_NAME}-footer` }, children);
56
+ }
57
+
58
+ export default defineComponent({
59
+ name: 'oio-inner-popup',
60
+ components: {
61
+ OioButton,
62
+ OioIcon,
63
+ OioSpin,
64
+ OioTooltipHelp,
65
+ OioCloseIcon
66
+ },
67
+ inheritAttrs: false,
68
+ props: {
69
+ ...OioInnerPopupProps
70
+ },
71
+ setup(props) {
72
+ const popupRef = ref<HTMLElement>();
73
+
74
+ const resizable = computed(() => {
75
+ return props.resizable || false;
76
+ });
77
+
78
+ const resizeDirection = computed<DrawerPlacement>(() => {
79
+ const placement = props.placement || DrawerPlacement.right;
80
+ switch (placement) {
81
+ case DrawerPlacement.top:
82
+ return DrawerPlacement.bottom;
83
+ case DrawerPlacement.right:
84
+ return DrawerPlacement.left;
85
+ case DrawerPlacement.bottom:
86
+ return DrawerPlacement.top;
87
+ case DrawerPlacement.left:
88
+ return DrawerPlacement.right;
89
+ default:
90
+ throw new Error('Invalid inner popup placement');
91
+ }
92
+ });
93
+
94
+ const teleportTarget = computed<HTMLElement>(() => {
95
+ const teleport = props.teleport;
96
+ if (!teleport) {
97
+ throw new Error('Invalid teleport handle.');
98
+ }
99
+ let finalTeleport: string | HTMLElement | null | undefined;
100
+ if (isFunction(teleport)) {
101
+ finalTeleport = teleport();
102
+ } else {
103
+ finalTeleport = teleport;
104
+ }
105
+ if (isString(finalTeleport)) {
106
+ finalTeleport = document.getElementById(finalTeleport);
107
+ }
108
+ return finalTeleport || document.body;
109
+ });
110
+
111
+ useResizableHandle(popupRef, resizable, resizeDirection);
112
+
113
+ const appendClassNameToTeleportTarget = (target: HTMLElement, classNames: string[]) => {
114
+ for (const className of classNames) {
115
+ target.classList.add(className);
116
+ }
117
+ };
118
+
119
+ const clearClassNameToTeleportTarget = (target: HTMLElement) => {
120
+ CLEAR_TELEPORT_TARGET_CLASS_NAMES.forEach((className) => {
121
+ target.classList.remove(className);
122
+ });
123
+ };
124
+
125
+ watch(
126
+ () => teleportTarget.value,
127
+ (newVal, oldVal) => {
128
+ if (oldVal) {
129
+ clearClassNameToTeleportTarget(oldVal);
130
+ }
131
+ appendClassNameToTeleportTarget(newVal, [TELEPORT_TARGET_CLASS_NAME, `${CLASS_NAME}-${props.placement}`]);
132
+ },
133
+ { immediate: true }
134
+ );
135
+
136
+ return {
137
+ popupRef,
138
+
139
+ teleportTarget
140
+ };
141
+ },
142
+ render() {
143
+ const {
144
+ default: defaultSlot,
145
+ title: titleSlot,
146
+ header: headerSlot,
147
+ footer: footerSlot
148
+ } = PropRecordHelper.collectionSlots(this.$slots, [
149
+ {
150
+ origin: 'default',
151
+ isNotNull: true
152
+ },
153
+ 'title',
154
+ 'header',
155
+ 'footer'
156
+ ]);
157
+
158
+ const finalHeaderSlot: Slot | null | undefined = headerSlot || this.header;
159
+ const finalFooterSlot: Slot | null | undefined = footerSlot || this.footer;
160
+
161
+ const children: VNode[] = [];
162
+
163
+ if (finalHeaderSlot) {
164
+ children.push(createHeader(finalHeaderSlot()));
165
+ } else if (finalHeaderSlot !== null) {
166
+ let finalTitleSlot = titleSlot;
167
+ if (!finalTitleSlot) {
168
+ finalTitleSlot = () => [
169
+ createVNode('span', { class: `${CLASS_NAME}-title` }, this.title || OioInnerPopupProps.title.default)
170
+ ];
171
+ }
172
+ if (this.help) {
173
+ const titleChildren = finalTitleSlot();
174
+ finalTitleSlot = () => {
175
+ return [createVNode('span', {}, titleChildren), createVNode(OioTooltipHelp, { content: this.help })];
176
+ };
177
+ }
178
+ const headerChildren = [createTitle(finalTitleSlot())];
179
+ if (this.closable) {
180
+ headerChildren.push(
181
+ createVNode('div', { class: `${CLASS_NAME}-title-toolbar` }, [
182
+ createVNode(
183
+ OioCloseIcon,
184
+ {
185
+ onClick: this.cancelCallback
186
+ },
187
+ )
188
+ ])
189
+ );
190
+ }
191
+ children.push(createHeader(headerChildren));
192
+ }
193
+
194
+ children.push(createBody(defaultSlot()));
195
+
196
+ if (finalFooterSlot) {
197
+ children.push(createFooter(finalFooterSlot()));
198
+ } else if (finalFooterSlot !== null) {
199
+ children.push(
200
+ createFooter([
201
+ createVNode(OioButton, {}, { default: () => this.cancelText }),
202
+ createVNode(
203
+ OioButton,
204
+ {
205
+ type: ButtonType.primary
206
+ },
207
+ { default: () => this.enterText }
208
+ )
209
+ ])
210
+ );
211
+ }
212
+
213
+ return [
214
+ createVNode(Teleport as VNodeProps, { to: this.teleportTarget }, [
215
+ withDirectives(
216
+ createVNode(
217
+ 'div',
218
+ {
219
+ ...PropRecordHelper.collectionBasicProps(this.$attrs, [CLASS_NAME]),
220
+ ref: 'popupRef'
221
+ },
222
+ children
223
+ ),
224
+ [[vShow, this.visible]]
225
+ )
226
+ ])
227
+ ];
228
+ }
229
+ });
230
+ </script>
@@ -0,0 +1,147 @@
1
+ @import './parameters.scss';
2
+ @import '../../../style/mixin.scss';
3
+
4
+ $gap: 24px;
5
+ $innerPopupMaxHeight: 234px;
6
+
7
+ $innerPopupDefaultWidth: 500px;
8
+ $innerPopupLargeWidth: 650px;
9
+ $innerPopupMediumWidth: 500px;
10
+ $innerPopupSmallWidth: 400px;
11
+
12
+ .#{$innerPopupClassPrefix}-target {
13
+ display: flex;
14
+
15
+ & > *:not(.#{$innerPopupClassPrefix}) {
16
+ flex: 1;
17
+ min-width: 0;
18
+ }
19
+ }
20
+
21
+ .#{$innerPopupClassPrefix} {
22
+ display: flex;
23
+ flex-direction: column;
24
+ background-color: var(--oio-background);
25
+ border: var($parameterPrefix + -border-width) var($parameterPrefix + -border-style)
26
+ var($parameterPrefix + -border-color);
27
+ border-radius: var($parameterPrefix + -border-radius, 4px);
28
+ box-shadow: 0 0 6px 0 rgba(0, 0, 0, 0.05);
29
+
30
+ &-header {
31
+ height: 55px;
32
+ padding: 0 16px;
33
+ display: flex;
34
+ justify-content: space-between;
35
+ align-items: center;
36
+
37
+ .#{$innerPopupClassPrefix}-title-wrapper {
38
+ .#{$innerPopupClassPrefix}-title {
39
+ color: var($parameterPrefix + -text-color);
40
+ font-size: var($parameterPrefix + -font-size-lg);
41
+ line-height: var($parameterPrefix + -line-height-lg);
42
+ font-weight: var($parameterPrefix + -font-weight-bold);
43
+ max-width: 100%;
44
+ white-space: nowrap;
45
+ overflow: hidden;
46
+ text-overflow: ellipsis;
47
+ }
48
+ }
49
+
50
+ .#{$innerPopupClassPrefix}-title-toolbar {
51
+ display: flex;
52
+ justify-content: flex-end;
53
+ align-items: center;
54
+ column-gap: 8px;
55
+
56
+ .#{$innerPopupClassPrefix}-title-icon-button {
57
+ display: flex;
58
+ justify-content: center;
59
+ align-items: center;
60
+ border-radius: 50%;
61
+ width: 24px;
62
+ height: 24px;
63
+ background-color: var(--oio-icon-color);
64
+ cursor: pointer;
65
+
66
+ .oio-icon {
67
+ font-size: 10px;
68
+ }
69
+ }
70
+ }
71
+
72
+ & + .#{$innerPopupClassPrefix}-body {
73
+ border-top: 1px solid var(--oio-border-color);
74
+ }
75
+ }
76
+
77
+ .#{$innerPopupClassPrefix}-body {
78
+ padding: 16px;
79
+ flex: 1 1px;
80
+ overflow: scroll;
81
+
82
+ & + .#{$innerPopupClassPrefix}-footer {
83
+ border-top: 1px solid var(--oio-border-color);
84
+ }
85
+ }
86
+
87
+ .#{$innerPopupClassPrefix}-footer {
88
+ padding: 16px;
89
+ text-align: right;
90
+ }
91
+
92
+ &-top {
93
+ flex-direction: column-reverse;
94
+ row-gap: $gap;
95
+
96
+ .#{$innerPopupClassPrefix} {
97
+ & > .#{$innerPopupClassPrefix}-body {
98
+ @include oio-scrollbar();
99
+
100
+ overflow-y: auto;
101
+ }
102
+ }
103
+ }
104
+
105
+ &-right {
106
+ flex-direction: row;
107
+ column-gap: $gap;
108
+
109
+ .#{$innerPopupClassPrefix} {
110
+ @include mediaResponsive(
111
+ flex-basis,
112
+ $innerPopupDefaultWidth,
113
+ $innerPopupLargeWidth,
114
+ $innerPopupMediumWidth,
115
+ $innerPopupSmallWidth
116
+ );
117
+ }
118
+ }
119
+
120
+ &-bottom {
121
+ flex-direction: column;
122
+ row-gap: $gap;
123
+
124
+ .#{$innerPopupClassPrefix} {
125
+ & > .#{$innerPopupClassPrefix}-body {
126
+ @include oio-scrollbar();
127
+
128
+ overflow-y: auto;
129
+ }
130
+ }
131
+ }
132
+
133
+ &-left {
134
+ flex-direction: row-reverse;
135
+ column-gap: $gap;
136
+
137
+ .#{$innerPopupClassPrefix} {
138
+ @include mediaResponsive(
139
+ flex-basis,
140
+ $innerPopupDefaultWidth,
141
+ $innerPopupLargeWidth,
142
+ $innerPopupMediumWidth,
143
+ $innerPopupSmallWidth
144
+ );
145
+ }
146
+ }
147
+ }
@@ -0,0 +1,5 @@
1
+ @import '../../../style/global-parameters';
2
+
3
+ $innerPopupPrefix: $prefix + -inner-popup;
4
+ $innerPopupParameterPrefix: $parameterPrefix + -inner-popup;
5
+ $innerPopupClassPrefix: $innerPopupPrefix;
@@ -0,0 +1,5 @@
1
+ export { default as OioInput } from './oio-input.vue';
2
+ export { default as OioInputGroup } from './oio-input-group.vue';
3
+ export { default as OioInputNumber } from './oio-input-number.vue';
4
+ export { default as OioInputPassword } from './oio-input-password.vue';
5
+ export { default as OioInputSearch } from './oio-input-search.vue';
@@ -0,0 +1,40 @@
1
+ <script lang="ts">
2
+ import { OioInputGroupProps, PropRecordHelper } from '@oinone/kunlun-vue-ui-common';
3
+ import { InputGroup as AInputGroup } from 'ant-design-vue';
4
+ import { computed, createVNode, defineComponent } from 'vue';
5
+ import { DEFAULT_PREFIX } from '../../theme';
6
+
7
+ export default defineComponent({
8
+ name: 'OioInputGroup',
9
+ components: {
10
+ AInputGroup
11
+ },
12
+ inheritAttrs: false,
13
+ props: {
14
+ ...OioInputGroupProps
15
+ },
16
+ slots: ['default'],
17
+ setup(props) {
18
+ const compact = computed<boolean>(() => {
19
+ if (props.compact == null) {
20
+ return true;
21
+ }
22
+ return props.compact;
23
+ });
24
+
25
+ return {
26
+ compact
27
+ };
28
+ },
29
+ render() {
30
+ return createVNode(
31
+ AInputGroup,
32
+ {
33
+ ...PropRecordHelper.collectionBasicProps(this.$attrs, [`${DEFAULT_PREFIX}-input-group`]),
34
+ compact: this.compact
35
+ },
36
+ this.$slots.default?.() || []
37
+ );
38
+ }
39
+ });
40
+ </script>