@teammodlr/ui-kit 2.1.41 → 2.1.44

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 (326) hide show
  1. package/env.d.ts +1 -1
  2. package/lib/components/avatar/Avatar.vue.d.ts +1 -1
  3. package/lib/components/avatargroup/AvatarGroup.vue.d.ts +1 -1
  4. package/lib/components/badge/Badge.vue.d.ts +1 -1
  5. package/lib/components/breadcrumb/Breadcrumb.vue.d.ts +1 -1
  6. package/lib/components/breadcrumb/BreadcrumbItem.vue.d.ts +1 -1
  7. package/lib/components/button/Button.vue.d.ts +1 -1
  8. package/lib/components/buttongroup/ButtonGroup.vue.d.ts +1 -1
  9. package/lib/components/checkbox/Checkbox.vue.d.ts +4 -3
  10. package/lib/components/checkbox/style/Checkbox.css.d.ts +1 -0
  11. package/lib/components/colorpicker/ColorPicker.vue.d.ts +1 -1
  12. package/lib/components/configprovider/ConfigProvider.vue.d.ts +35 -0
  13. package/lib/components/configprovider/types.d.ts +3 -0
  14. package/lib/components/confirm/Confirm.vue.d.ts +1 -1
  15. package/lib/components/confirm/ConfirmProvider.vue.d.ts +1 -1
  16. package/lib/components/dialog/Dialog.vue.d.ts +1 -1
  17. package/lib/components/dropdown/Dropdown.vue.d.ts +1 -1
  18. package/lib/components/dropdown/DropdownHeading.vue.d.ts +1 -1
  19. package/lib/components/dropdown/DropdownItem.vue.d.ts +1 -1
  20. package/lib/components/dropdown/DropdownList.vue.d.ts +1 -1
  21. package/lib/components/dropdown/DropdownSeperator.vue.d.ts +1 -1
  22. package/lib/components/dropdown/DropdownWrapper.vue.d.ts +1 -1
  23. package/lib/components/form/Form.vue.d.ts +1 -1
  24. package/lib/components/image/Image.vue.d.ts +1 -1
  25. package/lib/components/index.d.ts +1 -0
  26. package/lib/components/input/Input.vue.d.ts +2 -2
  27. package/lib/components/link/Link.vue.d.ts +1 -1
  28. package/lib/components/messageprovider/Message.vue.d.ts +1 -1
  29. package/lib/components/messageprovider/MessageProvider.vue.d.ts +1 -1
  30. package/lib/components/modal/Modal.vue.d.ts +1 -1
  31. package/lib/components/pagination/Pagination.vue.d.ts +1 -1
  32. package/lib/components/radio/Radio.vue.d.ts +3 -3
  33. package/lib/components/radiobutton/RadioButton.vue.d.ts +1 -1
  34. package/lib/components/radiobuttongroup/RadioButtonGroup.vue.d.ts +1 -1
  35. package/lib/components/renderer/examlpes/basic.vue.d.ts +1 -1
  36. package/lib/components/renderer/renderer.d.ts +1 -1
  37. package/lib/components/select/Select.vue.d.ts +2 -2
  38. package/lib/components/skeleton/Skeleton.vue.d.ts +1 -1
  39. package/lib/components/slider/Slider.vue.d.ts +1 -1
  40. package/lib/components/switch/Switch.vue.d.ts +3 -3
  41. package/lib/components/tab/Tab.vue.d.ts +1 -1
  42. package/lib/components/tab/TabGroup.vue.d.ts +1 -1
  43. package/lib/components/table/Table.vue.d.ts +1 -1
  44. package/lib/components/table/TableBody.vue.d.ts +1 -1
  45. package/lib/components/table/TableCell.vue.d.ts +1 -1
  46. package/lib/components/table/TableHead.vue.d.ts +1 -1
  47. package/lib/components/table/TableHeadRow.vue.d.ts +1 -1
  48. package/lib/components/table/TableRow.vue.d.ts +1 -1
  49. package/lib/components/tag/Tag.vue.d.ts +1 -1
  50. package/lib/components/textarea/Textarea.vue.d.ts +2 -2
  51. package/lib/components/tooltip/Tooltip.vue.d.ts +1 -1
  52. package/lib/components/transfer/Transfer.vue.d.ts +1 -1
  53. package/lib/components/tree/Tree.vue.d.ts +1 -1
  54. package/lib/components/tree/TreeNode.vue.d.ts +1 -1
  55. package/lib/components/tree/TreeNodeToggle.vue.d.ts +1 -1
  56. package/lib/components/virtualscroll/VirtualScroll.vue.d.ts +1 -1
  57. package/lib/composables/useCachedUid.d.ts +1 -13
  58. package/lib/composables/useInput.d.ts +3 -3
  59. package/lib/index.cjs.js +10 -10
  60. package/lib/index.es.js +1347 -1338
  61. package/lib/nuxt.js +35 -35
  62. package/lib/nuxt.plugin.js +8 -8
  63. package/lib/style.css +1 -1
  64. package/lib/styles/theme.css.d.ts +1 -1
  65. package/package.json +89 -89
  66. package/src/__storybook__/argTypes.ts +53 -53
  67. package/src/__storybook__/createStory.ts +15 -15
  68. package/src/__storybook__/index.ts +2 -2
  69. package/src/call.ts +34 -34
  70. package/src/components/avatar/Avatar.vue +110 -110
  71. package/src/components/avatar/examples/basic.vue +6 -6
  72. package/src/components/avatar/examples/custom-size.vue +7 -7
  73. package/src/components/avatar/examples/index.ts +5 -5
  74. package/src/components/avatar/examples/sizes.vue +33 -33
  75. package/src/components/avatar/examples/slots.vue +8 -8
  76. package/src/components/avatar/examples/variants.vue +18 -18
  77. package/src/components/avatar/style/Avatar.css.ts +92 -92
  78. package/src/components/avatar/style/index.ts +1 -1
  79. package/src/components/avatargroup/AvatarGroup.vue +72 -72
  80. package/src/components/avatargroup/examples/basic.vue +37 -37
  81. package/src/components/avatargroup/examples/index.ts +1 -1
  82. package/src/components/avatargroup/style/AvatarGroup.css.ts +26 -26
  83. package/src/components/avatargroup/style/index.ts +1 -1
  84. package/src/components/avatargroup/symbol.ts +17 -17
  85. package/src/components/badge/Badge.vue +43 -43
  86. package/src/components/badge/examples/basic.vue +10 -10
  87. package/src/components/badge/examples/index.ts +1 -1
  88. package/src/components/badge/style/Badge.css.ts +135 -135
  89. package/src/components/badge/style/index.ts +1 -1
  90. package/src/components/breadcrumb/Breadcrumb.vue +54 -54
  91. package/src/components/breadcrumb/BreadcrumbItem.vue +72 -72
  92. package/src/components/breadcrumb/examples/basic.vue +7 -7
  93. package/src/components/breadcrumb/examples/index.ts +1 -1
  94. package/src/components/breadcrumb/style/Breadcrumb.css.ts +40 -40
  95. package/src/components/breadcrumb/style/index.ts +1 -1
  96. package/src/components/breadcrumb/symbol.ts +18 -18
  97. package/src/components/button/Button.vue +203 -203
  98. package/src/components/button/examples/basic.vue +3 -3
  99. package/src/components/button/examples/disabled.vue +3 -3
  100. package/src/components/button/examples/icon-left.vue +12 -12
  101. package/src/components/button/examples/icon.vue +9 -9
  102. package/src/components/button/examples/index.ts +9 -9
  103. package/src/components/button/examples/link.vue +3 -3
  104. package/src/components/button/examples/rounded.vue +7 -7
  105. package/src/components/button/examples/size.vue +7 -7
  106. package/src/components/button/examples/variants-secondary.vue +10 -10
  107. package/src/components/button/examples/variants.vue +10 -10
  108. package/src/components/button/style/Button.css.ts +695 -695
  109. package/src/components/button/style/index.ts +1 -1
  110. package/src/components/buttongroup/ButtonGroup.vue +36 -36
  111. package/src/components/buttongroup/examples/basic.vue +9 -9
  112. package/src/components/buttongroup/examples/icon-group.vue +21 -21
  113. package/src/components/buttongroup/examples/index.ts +2 -2
  114. package/src/components/buttongroup/style/ButtonGroup.css.ts +42 -42
  115. package/src/components/buttongroup/style/index.ts +1 -1
  116. package/src/components/buttongroup/symbol.ts +9 -9
  117. package/src/components/checkbox/Checkbox.vue +149 -145
  118. package/src/components/checkbox/examples/basic.vue +9 -9
  119. package/src/components/checkbox/examples/index.ts +2 -2
  120. package/src/components/checkbox/examples/slot.vue +14 -11
  121. package/src/components/checkbox/style/Checkbox.css.ts +178 -161
  122. package/src/components/checkbox/style/index.ts +1 -1
  123. package/src/components/colorpicker/ColorPicker.vue +333 -333
  124. package/src/components/colorpicker/examples/basic.vue +2 -2
  125. package/src/components/colorpicker/examples/index.ts +1 -1
  126. package/src/components/colorpicker/style/ColorPicker.css.ts +127 -127
  127. package/src/components/colorpicker/style/index.ts +1 -1
  128. package/src/components/colorpicker/utils.ts +206 -206
  129. package/src/components/configprovider/ConfigProvider.vue +26 -0
  130. package/src/components/configprovider/types.ts +3 -0
  131. package/src/components/confirm/Confirm.vue +65 -65
  132. package/src/components/confirm/ConfirmProvider.vue +83 -83
  133. package/src/components/confirm/examples/basic.vue +48 -48
  134. package/src/components/confirm/examples/index.ts +1 -1
  135. package/src/components/confirm/examples/wrapper.vue +9 -9
  136. package/src/components/confirm/props.ts +24 -24
  137. package/src/components/confirm/providerProps.ts +10 -10
  138. package/src/components/confirm/types.ts +33 -33
  139. package/src/components/confirm/useConfirm.ts +14 -14
  140. package/src/components/dialog/Dialog.vue +118 -118
  141. package/src/components/dialog/examples/basic.vue +16 -16
  142. package/src/components/dialog/examples/index.ts +1 -1
  143. package/src/components/dialog/style/Dialog.css.ts +100 -100
  144. package/src/components/dialog/style/index.ts +1 -1
  145. package/src/components/dropdown/Dropdown.vue +308 -308
  146. package/src/components/dropdown/DropdownHeading.vue +23 -23
  147. package/src/components/dropdown/DropdownItem.vue +151 -151
  148. package/src/components/dropdown/DropdownList.vue +20 -20
  149. package/src/components/dropdown/DropdownSeperator.vue +22 -22
  150. package/src/components/dropdown/DropdownWrapper.vue +18 -18
  151. package/src/components/dropdown/examples/basic.vue +119 -119
  152. package/src/components/dropdown/examples/context.vue +71 -71
  153. package/src/components/dropdown/examples/index.ts +3 -3
  154. package/src/components/dropdown/hooks.ts +30 -30
  155. package/src/components/dropdown/style/Dropdown.css.ts +158 -158
  156. package/src/components/dropdown/style/index.ts +1 -1
  157. package/src/components/dropdown/symbol.ts +9 -9
  158. package/src/components/form/Form.vue +153 -153
  159. package/src/components/form/examples/basic.vue +75 -75
  160. package/src/components/form/examples/index.ts +1 -1
  161. package/src/components/form/style/Form.css.ts +28 -28
  162. package/src/components/form/style/index.ts +2 -2
  163. package/src/components/form/symbol.ts +16 -16
  164. package/src/components/image/Image.vue +71 -71
  165. package/src/components/image/examples/basic.vue +5 -5
  166. package/src/components/image/examples/index.ts +1 -1
  167. package/src/components/index.ts +48 -47
  168. package/src/components/input/Input.vue +233 -233
  169. package/src/components/input/examples/basic.vue +21 -21
  170. package/src/components/input/examples/index.ts +6 -6
  171. package/src/components/input/examples/left-icon.vue +9 -9
  172. package/src/components/input/examples/prefix.vue +5 -5
  173. package/src/components/input/examples/right-icon.vue +9 -9
  174. package/src/components/input/examples/sizes.vue +9 -9
  175. package/src/components/input/examples/suffix.vue +7 -7
  176. package/src/components/input/style/Input.css.ts +294 -294
  177. package/src/components/input/style/index.ts +1 -1
  178. package/src/components/link/Link.vue +53 -53
  179. package/src/components/link/examples/basic.vue +3 -3
  180. package/src/components/link/examples/index.ts +1 -1
  181. package/src/components/messageprovider/Message.vue +135 -135
  182. package/src/components/messageprovider/MessageProvider.vue +156 -156
  183. package/src/components/messageprovider/examples/basic.vue +70 -70
  184. package/src/components/messageprovider/examples/index.ts +2 -2
  185. package/src/components/messageprovider/examples/update.vue +34 -34
  186. package/src/components/messageprovider/examples/wrapper.vue +9 -9
  187. package/src/components/messageprovider/style/Message.css.ts +111 -111
  188. package/src/components/messageprovider/style/index.ts +1 -1
  189. package/src/components/messageprovider/types.ts +56 -56
  190. package/src/components/messageprovider/useMessage.ts +14 -14
  191. package/src/components/modal/Modal.vue +310 -310
  192. package/src/components/modal/examples/basic.vue +80 -80
  193. package/src/components/modal/examples/index.ts +3 -3
  194. package/src/components/modal/examples/modal-form.vue +99 -99
  195. package/src/components/modal/examples/sidebar.vue +79 -79
  196. package/src/components/modal/style/Modal.css.ts +318 -318
  197. package/src/components/modal/style/index.ts +1 -1
  198. package/src/components/pagination/Pagination.vue +296 -296
  199. package/src/components/pagination/examples/basic.vue +17 -17
  200. package/src/components/pagination/examples/index.ts +1 -1
  201. package/src/components/pagination/style/Pagination.css.ts +93 -93
  202. package/src/components/pagination/style/index.ts +1 -1
  203. package/src/components/radio/Radio.vue +136 -136
  204. package/src/components/radio/examples/basic.vue +8 -8
  205. package/src/components/radio/examples/group.vue +15 -15
  206. package/src/components/radio/examples/index.ts +2 -2
  207. package/src/components/radio/style/Checkbox.css.ts +130 -130
  208. package/src/components/radio/style/index.ts +1 -1
  209. package/src/components/radiobutton/RadioButton.vue +131 -131
  210. package/src/components/radiobutton/style/RadioButton.css.ts +189 -189
  211. package/src/components/radiobutton/style/index.ts +1 -1
  212. package/src/components/radiobuttongroup/RadioButtonGroup.vue +74 -74
  213. package/src/components/radiobuttongroup/examples/basic.vue +16 -16
  214. package/src/components/radiobuttongroup/examples/index.ts +1 -1
  215. package/src/components/radiobuttongroup/style/RadioButtonGroup.css.ts +37 -37
  216. package/src/components/radiobuttongroup/style/index.ts +1 -1
  217. package/src/components/radiobuttongroup/symbol.ts +12 -12
  218. package/src/components/renderer/examlpes/basic.vue +23 -23
  219. package/src/components/renderer/examlpes/index.ts +1 -1
  220. package/src/components/renderer/props.ts +14 -14
  221. package/src/components/renderer/renderer.ts +16 -16
  222. package/src/components/select/Select.vue +781 -781
  223. package/src/components/select/examples/basic.vue +21 -21
  224. package/src/components/select/examples/index.ts +3 -3
  225. package/src/components/select/examples/multiple.vue +21 -21
  226. package/src/components/select/examples/searchable.vue +20 -20
  227. package/src/components/select/style/Select.css.ts +368 -368
  228. package/src/components/select/style/index.ts +1 -1
  229. package/src/components/skeleton/Skeleton.vue +55 -55
  230. package/src/components/skeleton/examples/basic.vue +3 -3
  231. package/src/components/skeleton/examples/index.ts +2 -2
  232. package/src/components/skeleton/examples/post.vue +8 -8
  233. package/src/components/skeleton/style/Skeleton.css.ts +72 -72
  234. package/src/components/skeleton/style/index.ts +2 -2
  235. package/src/components/slider/Slider.vue +76 -76
  236. package/src/components/slider/style/Slider.css.ts +50 -50
  237. package/src/components/slider/style/index.ts +1 -1
  238. package/src/components/switch/Switch.vue +132 -132
  239. package/src/components/switch/examples/basic.vue +9 -9
  240. package/src/components/switch/examples/index.ts +2 -2
  241. package/src/components/switch/examples/slot.vue +11 -11
  242. package/src/components/switch/style/Switch.css.ts +135 -135
  243. package/src/components/switch/style/index.ts +1 -1
  244. package/src/components/tab/Tab.css +113 -113
  245. package/src/components/tab/Tab.vue +98 -98
  246. package/src/components/tab/TabGroup.vue +90 -90
  247. package/src/components/tab/examples/basic.vue +19 -19
  248. package/src/components/tab/examples/index.ts +2 -2
  249. package/src/components/tab/examples/vertical.vue +19 -19
  250. package/src/components/table/Table.vue +198 -198
  251. package/src/components/table/TableBody.vue +13 -13
  252. package/src/components/table/TableCell.vue +13 -13
  253. package/src/components/table/TableHead.vue +46 -46
  254. package/src/components/table/TableHeadRow.vue +15 -15
  255. package/src/components/table/TableRow.vue +19 -19
  256. package/src/components/table/examples/basic.vue +61 -61
  257. package/src/components/table/examples/empty.vue +44 -44
  258. package/src/components/table/examples/index.ts +3 -3
  259. package/src/components/table/examples/selected.vue +68 -68
  260. package/src/components/table/style/Table.css.ts +62 -62
  261. package/src/components/table/style/index.ts +1 -1
  262. package/src/components/table/types/index.ts +6 -6
  263. package/src/components/tag/Tag.vue +72 -72
  264. package/src/components/tag/examples/basic.vue +5 -5
  265. package/src/components/tag/examples/index.ts +1 -1
  266. package/src/components/tag/style/Tag.css.ts +83 -83
  267. package/src/components/tag/style/index.ts +1 -1
  268. package/src/components/textarea/Textarea.vue +180 -180
  269. package/src/components/textarea/examples/basic.vue +8 -8
  270. package/src/components/textarea/examples/index.ts +1 -1
  271. package/src/components/textarea/style/Textarea.css.ts +191 -191
  272. package/src/components/textarea/style/index.ts +1 -1
  273. package/src/components/tooltip/Tooltip.vue +196 -196
  274. package/src/components/tooltip/examples/basic.vue +5 -5
  275. package/src/components/tooltip/examples/index.ts +2 -2
  276. package/src/components/tooltip/examples/placement.vue +9 -9
  277. package/src/components/tooltip/style/Tooltip.css.ts +90 -90
  278. package/src/components/tooltip/style/index.ts +1 -1
  279. package/src/components/transfer/Transfer.vue +145 -145
  280. package/src/components/transfer/examples/basic.vue +21 -21
  281. package/src/components/transfer/examples/index.ts +1 -1
  282. package/src/components/transfer/style/Transfer.css.ts +81 -81
  283. package/src/components/transfer/style/index.ts +1 -1
  284. package/src/components/tree/Tree.vue +138 -138
  285. package/src/components/tree/TreeNode.vue +109 -109
  286. package/src/components/tree/TreeNodeToggle.vue +48 -48
  287. package/src/components/tree/examples/basic.vue +458 -458
  288. package/src/components/tree/examples/index.ts +1 -1
  289. package/src/components/tree/props.ts +97 -97
  290. package/src/components/tree/style/Tree.css.ts +75 -75
  291. package/src/components/tree/style/index.ts +1 -1
  292. package/src/components/tree/types.ts +103 -103
  293. package/src/components/virtualscroll/VirtualScroll.css +13 -13
  294. package/src/components/virtualscroll/VirtualScroll.vue +166 -166
  295. package/src/components/virtualscroll/examples/basic.vue +31 -31
  296. package/src/components/virtualscroll/examples/index.ts +1 -1
  297. package/src/components/virtualscroll/style/VirtualScroll.css.ts +17 -17
  298. package/src/components/virtualscroll/style/index.ts +1 -1
  299. package/src/composables/element.ts +13 -13
  300. package/src/composables/index.ts +4 -4
  301. package/src/composables/useCachedUid.ts +17 -49
  302. package/src/composables/useEventListener.ts +19 -19
  303. package/src/composables/useInput.ts +151 -151
  304. package/src/composables/useInteractive.ts +19 -19
  305. package/src/composables/useIsServer.ts +7 -7
  306. package/src/composables/useMergedState.ts +18 -18
  307. package/src/composables/useMount.ts +43 -43
  308. package/src/composables/usePopper.ts +215 -215
  309. package/src/composables/useZIndex.ts +33 -33
  310. package/src/create.ts +38 -38
  311. package/src/css/components.css +16 -16
  312. package/src/css/index.css +4 -4
  313. package/src/css/transitions.css +40 -40
  314. package/src/css/variables.css +80 -80
  315. package/src/examples/cards/sidebar.vue +262 -262
  316. package/src/examples/modal/modal.vue +52 -52
  317. package/src/exports/nuxt.js +35 -35
  318. package/src/exports/nuxt.plugin.js +8 -8
  319. package/src/index.ts +5 -5
  320. package/src/install.ts +8 -8
  321. package/src/shims-vue.d.ts +6 -6
  322. package/src/styles/theme.css.ts +181 -181
  323. package/src/styles/transitions.css.ts +97 -97
  324. package/src/types/props.ts +19 -19
  325. package/src/utils/injection.ts +5 -5
  326. package/volar.d.ts +16 -16
@@ -1,263 +1,263 @@
1
- <template>
2
- <div class="bg">
3
- <div class="sidebar">
4
- <div class="item">
5
- <label class="label">
6
- Align
7
- </label>
8
- <MRadioButtonGroup name="align" v-model="form.align" block size="sm">
9
- <MRadioButton icon id="start">
10
- <svg
11
- width="24"
12
- height="24"
13
- viewBox="0 0 24 24"
14
- fill="none"
15
- xmlns="http://www.w3.org/2000/svg"
16
- >
17
- <path d="M8 13H14V17H8V13Z" fill="currentColor" fill-opacity="0.5"/>
18
- <path d="M6 6H4V18H6V6Z" fill="currentColor"/>
19
- <path d="M20 7H8V11H20V7Z" fill="currentColor"/>
20
- </svg>
21
- </MRadioButton>
22
- <MRadioButton icon id="center">
23
- <svg
24
- width="24"
25
- height="24"
26
- viewBox="0 0 24 24"
27
- fill="none"
28
- xmlns="http://www.w3.org/2000/svg"
29
- >
30
- <path d="M9 13H15V17H9V13Z" fill="currentColor" fill-opacity="0.5"/>
31
- <path d="M6 7H18V11H6V7Z" fill="currentColor"/>
32
- </svg>
33
- </MRadioButton>
34
- <MRadioButton icon id="end">
35
- <svg
36
- width="24"
37
- height="24"
38
- viewBox="0 0 24 24"
39
- fill="none"
40
- xmlns="http://www.w3.org/2000/svg"
41
- >
42
- <path
43
- fill-rule="evenodd"
44
- clip-rule="evenodd"
45
- d="M15.9991 13.0039L9.99907 12.9911L9.99054 16.9911L15.9905 17.0039L15.9991 13.0039Z"
46
- fill="currentColor"
47
- fill-opacity="0.5"
48
- />
49
- <path
50
- fill-rule="evenodd"
51
- clip-rule="evenodd"
52
- d="M19.978 18.0021L20.0036 6.00214L18.0036 5.99788L17.978 17.9979L19.978 18.0021Z"
53
- fill="currentColor"
54
- />
55
- <path
56
- fill-rule="evenodd"
57
- clip-rule="evenodd"
58
- d="M3.9964 10.9851L15.9964 11.0107L16.0049 7.0107L4.00493 6.98512L3.9964 10.9851Z"
59
- fill="currentColor"
60
- />
61
- </svg>
62
- </MRadioButton>
63
- </MRadioButtonGroup>
64
- </div>
65
-
66
- <div class="item">
67
- <label class="label">
68
- Justify
69
- </label>
70
- <MRadioButtonGroup name="align" v-model="form.justify" block size="sm">
71
- <MRadioButton icon id="start">
72
- <svg
73
- width="24"
74
- height="24"
75
- viewBox="0 0 24 24"
76
- fill="none"
77
- xmlns="http://www.w3.org/2000/svg"
78
- >
79
- <path d="M8 13H14V17H8V13Z" fill="currentColor" fill-opacity="0.5"/>
80
- <path d="M6 6H4V18H6V6Z" fill="currentColor"/>
81
- <path d="M20 7H8V11H20V7Z" fill="currentColor"/>
82
- </svg>
83
- </MRadioButton>
84
- <MRadioButton icon id="center">
85
- <svg
86
- width="24"
87
- height="24"
88
- viewBox="0 0 24 24"
89
- fill="none"
90
- xmlns="http://www.w3.org/2000/svg"
91
- >
92
- <path d="M9 13H15V17H9V13Z" fill="currentColor" fill-opacity="0.5"/>
93
- <path d="M6 7H18V11H6V7Z" fill="currentColor"/>
94
- </svg>
95
- </MRadioButton>
96
- <MRadioButton icon id="end">
97
- <svg
98
- width="24"
99
- height="24"
100
- viewBox="0 0 24 24"
101
- fill="none"
102
- xmlns="http://www.w3.org/2000/svg"
103
- >
104
- <path
105
- fill-rule="evenodd"
106
- clip-rule="evenodd"
107
- d="M15.9991 13.0039L9.99907 12.9911L9.99054 16.9911L15.9905 17.0039L15.9991 13.0039Z"
108
- fill="currentColor"
109
- fill-opacity="0.5"
110
- />
111
- <path
112
- fill-rule="evenodd"
113
- clip-rule="evenodd"
114
- d="M19.978 18.0021L20.0036 6.00214L18.0036 5.99788L17.978 17.9979L19.978 18.0021Z"
115
- fill="currentColor"
116
- />
117
- <path
118
- fill-rule="evenodd"
119
- clip-rule="evenodd"
120
- d="M3.9964 10.9851L15.9964 11.0107L16.0049 7.0107L4.00493 6.98512L3.9964 10.9851Z"
121
- fill="currentColor"
122
- />
123
- </svg>
124
- </MRadioButton>
125
- </MRadioButtonGroup>
126
- </div>
127
-
128
- <div class="grid">
129
- <div class="item">
130
- <label class="label">
131
- Width
132
- </label>
133
- <MInput type="text" v-model="form.width" size="sm" block>
134
- <template #suffix>
135
- <span style="font-size: 11px">px</span>
136
- </template>
137
- </MInput>
138
- </div>
139
- <div class="item">
140
- <label class="label">
141
- Height
142
- </label>
143
- <MInput type="text" v-model="form.height" size="sm" block>
144
- <template #suffix>
145
- <span style="font-size: 11px">px</span>
146
- </template>
147
- </MInput>
148
- </div>
149
-
150
- <div class="item">
151
- <label class="label">
152
- Min Width
153
- </label>
154
- <MInput type="text" v-model="form.minWidth" size="sm" block>
155
- <template #suffix>
156
- <span style="font-size: 11px">px</span>
157
- </template>
158
- </MInput>
159
- </div>
160
-
161
- <div class="item">
162
- <label class="label">
163
- Min Height
164
- </label>
165
- <MInput type="text" v-model="form.minHeight" size="sm" block>
166
- <template #suffix>
167
- <span style="font-size: 11px">px</span>
168
- </template>
169
- </MInput>
170
- </div>
171
- </div>
172
-
173
- <div class="item">
174
- <label class="label">
175
- Background
176
- </label>
177
- <MColorPicker v-model="form.backgroundColor"/>
178
- </div>
179
-
180
- <div class="item">
181
- <label class="label">
182
- Color
183
- </label>
184
- <MColorPicker v-model="form.color"/>
185
- </div>
186
- </div>
187
-
188
- <div style="padding: 10px">
189
- {{ form }}
190
- <div style="display: flex;" :style="computedStyle">
191
- Hi
192
- </div>
193
- </div>
194
- </div>
195
- </template>
196
-
197
- <script lang="ts" setup>
198
- import {computed, reactive} from "vue";
199
- import {MRadioButtonGroup} from "../../components";
200
- import MRadioButton from "@/components/radiobutton/RadioButton.vue";
201
- import MColorPicker from "@/components/colorpicker/ColorPicker.vue";
202
- import MInput from "@/components/input/Input.vue";
203
-
204
- const form = reactive({
205
- align: "start",
206
- justify: "start",
207
- width: 100,
208
- height: 100,
209
- minWidth: 0,
210
- minHeight: 0,
211
- color: "#000000",
212
- backgroundColor: "#FF0000"
213
- })
214
-
215
- const computedStyle = computed(() => {
216
- return {
217
- width: form.width ? `${form.width}px` : "auto",
218
- height: form.height ? `${form.height}px` : "auto",
219
- minWidth: form.minWidth ? `${form.minWidth}px` : "auto",
220
- minHeight: form.minHeight ? `${form.minHeight}px` : "auto",
221
- color: form.color,
222
- backgroundColor: form.backgroundColor,
223
- alignItems: form.align,
224
- justifyContent: form.justify
225
- }
226
- })
227
-
228
- </script>
229
-
230
- <style scoped>
231
- .bg {
232
- display: flex;
233
- }
234
-
235
- .sidebar {
236
- width: 350px;
237
- height: 500px;
238
- border-right: 1px solid #e5e5e5;
239
- padding: 5px 10px;
240
- flex-shrink: 0;
241
- }
242
-
243
- .item {
244
- display: grid;
245
- grid-template-columns: 70px 1fr;
246
- grid-gap: 10px;
247
- align-items: center;
248
- margin-bottom: 8px;
249
- }
250
-
251
- .grid {
252
- display: grid;
253
- grid-template-columns: 1fr 1fr;
254
- grid-gap: 5px 20px;
255
- align-items: center;
256
- margin-bottom: 8px;
257
- }
258
-
259
- .label {
260
- font-size: 13px;
261
- font-weight: 500;
262
- }
1
+ <template>
2
+ <div class="bg">
3
+ <div class="sidebar">
4
+ <div class="item">
5
+ <label class="label">
6
+ Align
7
+ </label>
8
+ <MRadioButtonGroup name="align" v-model="form.align" block size="sm">
9
+ <MRadioButton icon id="start">
10
+ <svg
11
+ width="24"
12
+ height="24"
13
+ viewBox="0 0 24 24"
14
+ fill="none"
15
+ xmlns="http://www.w3.org/2000/svg"
16
+ >
17
+ <path d="M8 13H14V17H8V13Z" fill="currentColor" fill-opacity="0.5"/>
18
+ <path d="M6 6H4V18H6V6Z" fill="currentColor"/>
19
+ <path d="M20 7H8V11H20V7Z" fill="currentColor"/>
20
+ </svg>
21
+ </MRadioButton>
22
+ <MRadioButton icon id="center">
23
+ <svg
24
+ width="24"
25
+ height="24"
26
+ viewBox="0 0 24 24"
27
+ fill="none"
28
+ xmlns="http://www.w3.org/2000/svg"
29
+ >
30
+ <path d="M9 13H15V17H9V13Z" fill="currentColor" fill-opacity="0.5"/>
31
+ <path d="M6 7H18V11H6V7Z" fill="currentColor"/>
32
+ </svg>
33
+ </MRadioButton>
34
+ <MRadioButton icon id="end">
35
+ <svg
36
+ width="24"
37
+ height="24"
38
+ viewBox="0 0 24 24"
39
+ fill="none"
40
+ xmlns="http://www.w3.org/2000/svg"
41
+ >
42
+ <path
43
+ fill-rule="evenodd"
44
+ clip-rule="evenodd"
45
+ d="M15.9991 13.0039L9.99907 12.9911L9.99054 16.9911L15.9905 17.0039L15.9991 13.0039Z"
46
+ fill="currentColor"
47
+ fill-opacity="0.5"
48
+ />
49
+ <path
50
+ fill-rule="evenodd"
51
+ clip-rule="evenodd"
52
+ d="M19.978 18.0021L20.0036 6.00214L18.0036 5.99788L17.978 17.9979L19.978 18.0021Z"
53
+ fill="currentColor"
54
+ />
55
+ <path
56
+ fill-rule="evenodd"
57
+ clip-rule="evenodd"
58
+ d="M3.9964 10.9851L15.9964 11.0107L16.0049 7.0107L4.00493 6.98512L3.9964 10.9851Z"
59
+ fill="currentColor"
60
+ />
61
+ </svg>
62
+ </MRadioButton>
63
+ </MRadioButtonGroup>
64
+ </div>
65
+
66
+ <div class="item">
67
+ <label class="label">
68
+ Justify
69
+ </label>
70
+ <MRadioButtonGroup name="align" v-model="form.justify" block size="sm">
71
+ <MRadioButton icon id="start">
72
+ <svg
73
+ width="24"
74
+ height="24"
75
+ viewBox="0 0 24 24"
76
+ fill="none"
77
+ xmlns="http://www.w3.org/2000/svg"
78
+ >
79
+ <path d="M8 13H14V17H8V13Z" fill="currentColor" fill-opacity="0.5"/>
80
+ <path d="M6 6H4V18H6V6Z" fill="currentColor"/>
81
+ <path d="M20 7H8V11H20V7Z" fill="currentColor"/>
82
+ </svg>
83
+ </MRadioButton>
84
+ <MRadioButton icon id="center">
85
+ <svg
86
+ width="24"
87
+ height="24"
88
+ viewBox="0 0 24 24"
89
+ fill="none"
90
+ xmlns="http://www.w3.org/2000/svg"
91
+ >
92
+ <path d="M9 13H15V17H9V13Z" fill="currentColor" fill-opacity="0.5"/>
93
+ <path d="M6 7H18V11H6V7Z" fill="currentColor"/>
94
+ </svg>
95
+ </MRadioButton>
96
+ <MRadioButton icon id="end">
97
+ <svg
98
+ width="24"
99
+ height="24"
100
+ viewBox="0 0 24 24"
101
+ fill="none"
102
+ xmlns="http://www.w3.org/2000/svg"
103
+ >
104
+ <path
105
+ fill-rule="evenodd"
106
+ clip-rule="evenodd"
107
+ d="M15.9991 13.0039L9.99907 12.9911L9.99054 16.9911L15.9905 17.0039L15.9991 13.0039Z"
108
+ fill="currentColor"
109
+ fill-opacity="0.5"
110
+ />
111
+ <path
112
+ fill-rule="evenodd"
113
+ clip-rule="evenodd"
114
+ d="M19.978 18.0021L20.0036 6.00214L18.0036 5.99788L17.978 17.9979L19.978 18.0021Z"
115
+ fill="currentColor"
116
+ />
117
+ <path
118
+ fill-rule="evenodd"
119
+ clip-rule="evenodd"
120
+ d="M3.9964 10.9851L15.9964 11.0107L16.0049 7.0107L4.00493 6.98512L3.9964 10.9851Z"
121
+ fill="currentColor"
122
+ />
123
+ </svg>
124
+ </MRadioButton>
125
+ </MRadioButtonGroup>
126
+ </div>
127
+
128
+ <div class="grid">
129
+ <div class="item">
130
+ <label class="label">
131
+ Width
132
+ </label>
133
+ <MInput type="text" v-model="form.width" size="sm" block>
134
+ <template #suffix>
135
+ <span style="font-size: 11px">px</span>
136
+ </template>
137
+ </MInput>
138
+ </div>
139
+ <div class="item">
140
+ <label class="label">
141
+ Height
142
+ </label>
143
+ <MInput type="text" v-model="form.height" size="sm" block>
144
+ <template #suffix>
145
+ <span style="font-size: 11px">px</span>
146
+ </template>
147
+ </MInput>
148
+ </div>
149
+
150
+ <div class="item">
151
+ <label class="label">
152
+ Min Width
153
+ </label>
154
+ <MInput type="text" v-model="form.minWidth" size="sm" block>
155
+ <template #suffix>
156
+ <span style="font-size: 11px">px</span>
157
+ </template>
158
+ </MInput>
159
+ </div>
160
+
161
+ <div class="item">
162
+ <label class="label">
163
+ Min Height
164
+ </label>
165
+ <MInput type="text" v-model="form.minHeight" size="sm" block>
166
+ <template #suffix>
167
+ <span style="font-size: 11px">px</span>
168
+ </template>
169
+ </MInput>
170
+ </div>
171
+ </div>
172
+
173
+ <div class="item">
174
+ <label class="label">
175
+ Background
176
+ </label>
177
+ <MColorPicker v-model="form.backgroundColor"/>
178
+ </div>
179
+
180
+ <div class="item">
181
+ <label class="label">
182
+ Color
183
+ </label>
184
+ <MColorPicker v-model="form.color"/>
185
+ </div>
186
+ </div>
187
+
188
+ <div style="padding: 10px">
189
+ {{ form }}
190
+ <div style="display: flex;" :style="computedStyle">
191
+ Hi
192
+ </div>
193
+ </div>
194
+ </div>
195
+ </template>
196
+
197
+ <script lang="ts" setup>
198
+ import {computed, reactive} from "vue";
199
+ import {MRadioButtonGroup} from "../../components";
200
+ import MRadioButton from "@/components/radiobutton/RadioButton.vue";
201
+ import MColorPicker from "@/components/colorpicker/ColorPicker.vue";
202
+ import MInput from "@/components/input/Input.vue";
203
+
204
+ const form = reactive({
205
+ align: "start",
206
+ justify: "start",
207
+ width: 100,
208
+ height: 100,
209
+ minWidth: 0,
210
+ minHeight: 0,
211
+ color: "#000000",
212
+ backgroundColor: "#FF0000"
213
+ })
214
+
215
+ const computedStyle = computed(() => {
216
+ return {
217
+ width: form.width ? `${form.width}px` : "auto",
218
+ height: form.height ? `${form.height}px` : "auto",
219
+ minWidth: form.minWidth ? `${form.minWidth}px` : "auto",
220
+ minHeight: form.minHeight ? `${form.minHeight}px` : "auto",
221
+ color: form.color,
222
+ backgroundColor: form.backgroundColor,
223
+ alignItems: form.align,
224
+ justifyContent: form.justify
225
+ }
226
+ })
227
+
228
+ </script>
229
+
230
+ <style scoped>
231
+ .bg {
232
+ display: flex;
233
+ }
234
+
235
+ .sidebar {
236
+ width: 350px;
237
+ height: 500px;
238
+ border-right: 1px solid #e5e5e5;
239
+ padding: 5px 10px;
240
+ flex-shrink: 0;
241
+ }
242
+
243
+ .item {
244
+ display: grid;
245
+ grid-template-columns: 70px 1fr;
246
+ grid-gap: 10px;
247
+ align-items: center;
248
+ margin-bottom: 8px;
249
+ }
250
+
251
+ .grid {
252
+ display: grid;
253
+ grid-template-columns: 1fr 1fr;
254
+ grid-gap: 5px 20px;
255
+ align-items: center;
256
+ margin-bottom: 8px;
257
+ }
258
+
259
+ .label {
260
+ font-size: 13px;
261
+ font-weight: 500;
262
+ }
263
263
  </style>
@@ -1,52 +1,52 @@
1
- <template>
2
- <MModal ref="modal" title="I am a modal" size="md" :canClickOutside="true" :canBounceOnOpen="false" :canSlideIn="true">
3
- <template #body>
4
- <div>
5
- <MSelect
6
- v-model="value"
7
- :options="options"
8
- :option-value="'id'"
9
- :option-label="'name'"
10
- blank
11
- searchable
12
- />
13
- </div>
14
- </template>
15
- <template #footer>
16
- <div style="display: flex; flex-grow: 1; justify-content: end;">
17
- <MButton variant="primary" @click="modal?.close()">
18
- Okay
19
- </MButton>
20
- <MButton style="margin-left: 8px;" @click="modal?.close()">
21
- Cancel
22
- </MButton>
23
- </div>
24
- </template>
25
- </MModal>
26
-
27
- <div style="position: relative; width: 100%; height: 1000px;">
28
- <button @click="open" style="position: absolute; width: 100px; height: 50px; top: 0; left: 0;">Top Left</button>
29
- <button @click="open" style="position: absolute; width: 100px; height: 50px; top: 0; right: 0;">Top Right</button>
30
- <button @click="open" style="position: absolute; width: 100px; height: 50px; bottom: 0; left: 0;">Bottom
31
- Left</button>
32
- <button @click="open" style="position: absolute; width: 100px; height: 50px; bottom: 0; right: 0;">Bottom
33
- Right</button>
34
- </div>
35
- </template>
36
-
37
- <script lang="ts" setup>
38
- import { ref } from 'vue'
39
-
40
- const modal = ref<any>(null);
41
- // make list of options with 1000 items
42
- const options = Array.from({ length: 50 }, (_, i) => ({
43
- id: i,
44
- name: `Option ${i+1}`
45
- }));
46
-
47
- const value = ref();
48
- const open = (event: MouseEvent) => {
49
- modal.value.open(event.target);
50
- };
51
-
52
- </script>
1
+ <template>
2
+ <MModal ref="modal" title="I am a modal" size="md" :canClickOutside="true" :canBounceOnOpen="false" :canSlideIn="true">
3
+ <template #body>
4
+ <div>
5
+ <MSelect
6
+ v-model="value"
7
+ :options="options"
8
+ :option-value="'id'"
9
+ :option-label="'name'"
10
+ blank
11
+ searchable
12
+ />
13
+ </div>
14
+ </template>
15
+ <template #footer>
16
+ <div style="display: flex; flex-grow: 1; justify-content: end;">
17
+ <MButton variant="primary" @click="modal?.close()">
18
+ Okay
19
+ </MButton>
20
+ <MButton style="margin-left: 8px;" @click="modal?.close()">
21
+ Cancel
22
+ </MButton>
23
+ </div>
24
+ </template>
25
+ </MModal>
26
+
27
+ <div style="position: relative; width: 100%; height: 1000px;">
28
+ <button @click="open" style="position: absolute; width: 100px; height: 50px; top: 0; left: 0;">Top Left</button>
29
+ <button @click="open" style="position: absolute; width: 100px; height: 50px; top: 0; right: 0;">Top Right</button>
30
+ <button @click="open" style="position: absolute; width: 100px; height: 50px; bottom: 0; left: 0;">Bottom
31
+ Left</button>
32
+ <button @click="open" style="position: absolute; width: 100px; height: 50px; bottom: 0; right: 0;">Bottom
33
+ Right</button>
34
+ </div>
35
+ </template>
36
+
37
+ <script lang="ts" setup>
38
+ import { ref } from 'vue'
39
+
40
+ const modal = ref<any>(null);
41
+ // make list of options with 1000 items
42
+ const options = Array.from({ length: 50 }, (_, i) => ({
43
+ id: i,
44
+ name: `Option ${i+1}`
45
+ }));
46
+
47
+ const value = ref();
48
+ const open = (event: MouseEvent) => {
49
+ modal.value.open(event.target);
50
+ };
51
+
52
+ </script>