@indielayer/ui 0.2.3 → 1.0.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (396) hide show
  1. package/README.md +28 -12
  2. package/env.d.ts +1 -0
  3. package/lib/components/alert/Alert.vue.d.ts +42 -0
  4. package/lib/components/avatar/Avatar.vue.d.ts +49 -0
  5. package/lib/components/badge/Badge.vue.d.ts +70 -0
  6. package/lib/components/breadcrumbs/Breadcrumbs.vue.d.ts +30 -0
  7. package/lib/components/button/Button.vue.d.ts +87 -0
  8. package/lib/components/button/ButtonGroup.vue.d.ts +49 -0
  9. package/lib/components/card/Card.vue.d.ts +17 -0
  10. package/lib/components/checkbox/Checkbox.vue.d.ts +81 -0
  11. package/lib/components/collapse/Collapse.vue.d.ts +47 -0
  12. package/lib/components/container/Container.vue.d.ts +14 -0
  13. package/lib/components/divider/Divider.vue.d.ts +10 -0
  14. package/lib/components/drawer/Drawer.vue.d.ts +73 -0
  15. package/lib/components/form/Form.vue.d.ts +46 -0
  16. package/lib/components/icon/Icon.vue.d.ts +36 -0
  17. package/lib/components/image/Image.vue.d.ts +8 -0
  18. package/lib/components/index.d.ts +45 -0
  19. package/lib/components/input/Input.vue.d.ts +114 -0
  20. package/lib/components/link/Link.vue.d.ts +36 -0
  21. package/lib/components/menu/Menu.vue.d.ts +50 -0
  22. package/lib/components/menu/MenuItem.vue.d.ts +102 -0
  23. package/lib/components/modal/Modal.vue.d.ts +34 -0
  24. package/lib/components/notifications/Notifications.vue.d.ts +104 -0
  25. package/lib/components/pagination/Pagination.vue.d.ts +58 -0
  26. package/lib/components/pagination/PaginationItem.vue.d.ts +32 -0
  27. package/lib/components/popover/Popover.vue.d.ts +64 -0
  28. package/lib/components/popover/PopoverContainer.vue.d.ts +14 -0
  29. package/lib/components/progress/Progress.vue.d.ts +42 -0
  30. package/lib/components/radio/Radio.vue.d.ts +79 -0
  31. package/lib/components/scroll/Scroll.vue.d.ts +29 -0
  32. package/lib/components/select/Select.vue.d.ts +100 -0
  33. package/lib/components/skeleton/Skeleton.vue.d.ts +14 -0
  34. package/lib/components/slider/Slider.vue.d.ts +96 -0
  35. package/lib/components/spacer/Spacer.vue.d.ts +2 -0
  36. package/lib/components/spinner/Spinner.vue.d.ts +16 -0
  37. package/lib/components/tab/Tab.vue.d.ts +47 -0
  38. package/lib/components/tab/TabGroup.vue.d.ts +41 -0
  39. package/lib/components/table/Table.vue.d.ts +81 -0
  40. package/lib/components/table/TableBody.vue.d.ts +2 -0
  41. package/lib/components/table/TableCell.vue.d.ts +33 -0
  42. package/lib/components/table/TableHead.vue.d.ts +2 -0
  43. package/lib/components/table/TableHeader.vue.d.ts +33 -0
  44. package/lib/components/table/TableRow.vue.d.ts +23 -0
  45. package/lib/components/tag/Tag.vue.d.ts +45 -0
  46. package/lib/components/textarea/Textarea.vue.d.ts +101 -0
  47. package/lib/components/toggle/Toggle.vue.d.ts +79 -0
  48. package/lib/components/tooltip/Tooltip.vue.d.ts +2 -0
  49. package/lib/composables/colors-utils.d.ts +8 -0
  50. package/lib/composables/colors.d.ts +26 -0
  51. package/lib/composables/common.d.ts +14 -0
  52. package/lib/composables/css.d.ts +5 -0
  53. package/lib/composables/index.d.ts +7 -0
  54. package/lib/composables/inputtable.d.ts +37 -0
  55. package/lib/composables/interactive.d.ts +10 -0
  56. package/lib/composables/keys.d.ts +7 -0
  57. package/lib/composables/notification.d.ts +1 -0
  58. package/lib/create.d.ts +11 -0
  59. package/lib/index.cjs.js +15 -0
  60. package/lib/index.d.ts +6 -0
  61. package/lib/index.es.js +6164 -0
  62. package/lib/install.d.ts +4 -0
  63. package/lib/nuxt.js +32 -0
  64. package/lib/nuxt.plugin.js +8 -0
  65. package/lib/style.css +1 -0
  66. package/lib/tailwind.preset.js +43 -14
  67. package/lib/version.d.ts +2 -0
  68. package/package.json +48 -28
  69. package/src/components/alert/Alert.vue +164 -0
  70. package/src/components/avatar/Avatar.vue +114 -97
  71. package/src/components/badge/Badge.vue +107 -0
  72. package/src/components/breadcrumbs/Breadcrumbs.vue +60 -0
  73. package/src/components/button/Button.vue +405 -128
  74. package/src/components/button/ButtonGroup.vue +73 -0
  75. package/src/components/card/Card.vue +16 -21
  76. package/src/components/checkbox/Checkbox.vue +162 -85
  77. package/src/components/collapse/Collapse.vue +152 -89
  78. package/src/components/container/Container.vue +13 -11
  79. package/src/components/divider/Divider.vue +15 -19
  80. package/src/components/drawer/Drawer.vue +244 -0
  81. package/src/components/form/Form.vue +32 -22
  82. package/src/components/icon/Icon.vue +43 -33
  83. package/src/components/image/Image.vue +26 -20
  84. package/src/components/index.ts +45 -0
  85. package/src/components/input/Input.vue +149 -146
  86. package/src/components/link/Link.vue +73 -52
  87. package/src/components/menu/Menu.vue +118 -0
  88. package/src/components/menu/MenuItem.vue +277 -0
  89. package/src/components/modal/Modal.vue +157 -93
  90. package/src/components/notifications/Notifications.vue +318 -0
  91. package/src/components/pagination/Pagination.vue +157 -50
  92. package/src/components/pagination/PaginationItem.vue +49 -26
  93. package/src/components/popover/Popover.vue +167 -146
  94. package/src/components/popover/PopoverContainer.vue +13 -18
  95. package/src/components/progress/Progress.vue +68 -102
  96. package/src/components/radio/Radio.vue +161 -92
  97. package/src/components/scroll/Scroll.vue +143 -0
  98. package/src/components/select/Select.vue +362 -109
  99. package/src/components/skeleton/Skeleton.vue +13 -11
  100. package/src/components/slider/Slider.vue +240 -0
  101. package/src/components/spacer/Spacer.vue +8 -0
  102. package/src/components/spinner/Spinner.vue +28 -28
  103. package/src/components/tab/Tab.vue +100 -0
  104. package/src/components/tab/TabGroup.vue +151 -0
  105. package/src/components/table/Table.vue +101 -86
  106. package/src/components/table/TableBody.vue +8 -6
  107. package/src/components/table/TableCell.vue +43 -55
  108. package/src/components/table/TableHead.vue +9 -7
  109. package/src/components/table/TableHeader.vue +39 -54
  110. package/src/components/table/TableRow.vue +26 -34
  111. package/src/components/tag/Tag.vue +67 -62
  112. package/src/components/textarea/Textarea.vue +116 -126
  113. package/src/components/toggle/Toggle.vue +117 -101
  114. package/src/components/tooltip/Tooltip.vue +18 -14
  115. package/src/composables/colors-utils.ts +378 -0
  116. package/src/composables/colors.ts +82 -0
  117. package/src/composables/common.ts +20 -0
  118. package/src/composables/css.ts +45 -0
  119. package/src/composables/index.ts +7 -0
  120. package/src/composables/{inputtable.js → inputtable.ts} +45 -74
  121. package/src/composables/interactive.ts +16 -0
  122. package/src/composables/keys.ts +8 -0
  123. package/src/composables/notification.ts +10 -0
  124. package/src/create.ts +36 -0
  125. package/src/exports/nuxt.js +32 -0
  126. package/src/exports/nuxt.plugin.js +8 -0
  127. package/src/exports/tailwind.preset.js +55 -0
  128. package/src/index.ts +8 -0
  129. package/src/install.ts +8 -0
  130. package/src/shims-vue.d.ts +6 -0
  131. package/src/version.ts +1 -0
  132. package/volar.d.ts +52 -0
  133. package/lib/cjs/components/avatar/Avatar.vue.js +0 -9
  134. package/lib/cjs/components/avatar/Avatar.vue_vue_type_script_lang.js +0 -86
  135. package/lib/cjs/components/avatar/Avatar.vue_vue_type_template_id_2549fb8f_lang.js +0 -50
  136. package/lib/cjs/components/button/Button.vue.js +0 -9
  137. package/lib/cjs/components/button/Button.vue_vue_type_script_lang.js +0 -82
  138. package/lib/cjs/components/button/Button.vue_vue_type_template_id_5975756f_lang.js +0 -100
  139. package/lib/cjs/components/card/Card.vue.js +0 -9
  140. package/lib/cjs/components/card/Card.vue_vue_type_script_lang.js +0 -18
  141. package/lib/cjs/components/card/Card.vue_vue_type_template_id_7be81122_lang.js +0 -22
  142. package/lib/cjs/components/checkbox/Checkbox.vue.js +0 -9
  143. package/lib/cjs/components/checkbox/Checkbox.vue_vue_type_script_lang.js +0 -58
  144. package/lib/cjs/components/checkbox/Checkbox.vue_vue_type_template_id_fa43bd62_lang.js +0 -102
  145. package/lib/cjs/components/collapse/Collapse.vue.js +0 -9
  146. package/lib/cjs/components/collapse/Collapse.vue_vue_type_script_lang.js +0 -66
  147. package/lib/cjs/components/collapse/Collapse.vue_vue_type_template_id_06a1c88f_lang.js +0 -64
  148. package/lib/cjs/components/colors.vue.js +0 -12
  149. package/lib/cjs/components/colors.vue_vue_type_template_id_79d16100_lang.js +0 -406
  150. package/lib/cjs/components/container/Container.vue.js +0 -9
  151. package/lib/cjs/components/container/Container.vue_vue_type_script_lang.js +0 -14
  152. package/lib/cjs/components/container/Container.vue_vue_type_template_id_05f5acf3_lang.js +0 -16
  153. package/lib/cjs/components/divider/Divider.vue.js +0 -9
  154. package/lib/cjs/components/divider/Divider.vue_vue_type_script_lang.js +0 -18
  155. package/lib/cjs/components/divider/Divider.vue_vue_type_template_id_3a349aa3_lang.js +0 -49
  156. package/lib/cjs/components/form/Form.vue.js +0 -9
  157. package/lib/cjs/components/form/Form.vue_vue_type_script_lang.js +0 -95
  158. package/lib/cjs/components/form/Form.vue_vue_type_template_id_a6cab022_lang.js +0 -20
  159. package/lib/cjs/components/icon/Icon.vue.js +0 -9
  160. package/lib/cjs/components/icon/Icon.vue_vue_type_script_lang.js +0 -26
  161. package/lib/cjs/components/icon/Icon.vue_vue_type_template_id_0933a10f_lang.js +0 -32
  162. package/lib/cjs/components/image/Image.vue.js +0 -9
  163. package/lib/cjs/components/image/Image.vue_vue_type_script_lang.js +0 -28
  164. package/lib/cjs/components/image/Image.vue_vue_type_template_id_f1ec3bb2_lang.js +0 -13
  165. package/lib/cjs/components/index.js +0 -87
  166. package/lib/cjs/components/input/Input.vue.js +0 -9
  167. package/lib/cjs/components/input/Input.vue_vue_type_script_lang.js +0 -101
  168. package/lib/cjs/components/input/Input.vue_vue_type_template_id_21c870c5_lang.js +0 -126
  169. package/lib/cjs/components/link/Link.vue.js +0 -9
  170. package/lib/cjs/components/link/Link.vue_vue_type_script_lang.js +0 -47
  171. package/lib/cjs/components/link/Link.vue_vue_type_template_id_044f59af_lang.js +0 -59
  172. package/lib/cjs/components/modal/Modal.vue.js +0 -9
  173. package/lib/cjs/components/modal/Modal.vue_vue_type_script_lang.js +0 -55
  174. package/lib/cjs/components/modal/Modal.vue_vue_type_template_id_177f8d4b_lang.js +0 -81
  175. package/lib/cjs/components/note/Note.vue.js +0 -9
  176. package/lib/cjs/components/note/Note.vue_vue_type_script_lang.js +0 -24
  177. package/lib/cjs/components/note/Note.vue_vue_type_template_id_2b99d6a2_lang.js +0 -100
  178. package/lib/cjs/components/pagination/Pagination.vue.js +0 -9
  179. package/lib/cjs/components/pagination/Pagination.vue_vue_type_script_lang.js +0 -43
  180. package/lib/cjs/components/pagination/Pagination.vue_vue_type_template_id_084845ef_lang.js +0 -54
  181. package/lib/cjs/components/pagination/PaginationItem.vue.js +0 -9
  182. package/lib/cjs/components/pagination/PaginationItem.vue_vue_type_script_lang.js +0 -24
  183. package/lib/cjs/components/pagination/PaginationItem.vue_vue_type_template_id_241a3fbc_lang.js +0 -27
  184. package/lib/cjs/components/popover/Popover.vue.js +0 -10
  185. package/lib/cjs/components/popover/Popover.vue_vue_type_script_lang.js +0 -72
  186. package/lib/cjs/components/popover/Popover.vue_vue_type_style_index_0_id_da70cc8a_lang.css.js +0 -8
  187. package/lib/cjs/components/popover/Popover.vue_vue_type_template_id_da70cc8a_lang.js +0 -63
  188. package/lib/cjs/components/popover/PopoverContainer.vue.js +0 -9
  189. package/lib/cjs/components/popover/PopoverContainer.vue_vue_type_script_lang.js +0 -21
  190. package/lib/cjs/components/popover/PopoverContainer.vue_vue_type_template_id_798f1294_lang.js +0 -16
  191. package/lib/cjs/components/popover/PopoverItem.vue.js +0 -9
  192. package/lib/cjs/components/popover/PopoverItem.vue_vue_type_script_lang.js +0 -34
  193. package/lib/cjs/components/popover/PopoverItem.vue_vue_type_template_id_84692424_lang.js +0 -50
  194. package/lib/cjs/components/progress/Progress.vue.js +0 -9
  195. package/lib/cjs/components/progress/Progress.vue_vue_type_script_lang.js +0 -62
  196. package/lib/cjs/components/progress/Progress.vue_vue_type_template_id_9ab7cee2_lang.js +0 -77
  197. package/lib/cjs/components/radio/Radio.vue.js +0 -9
  198. package/lib/cjs/components/radio/Radio.vue_vue_type_script_lang.js +0 -61
  199. package/lib/cjs/components/radio/Radio.vue_vue_type_template_id_808cc132_lang.js +0 -120
  200. package/lib/cjs/components/select/Select.vue.js +0 -9
  201. package/lib/cjs/components/select/Select.vue_vue_type_script_lang.js +0 -62
  202. package/lib/cjs/components/select/Select.vue_vue_type_template_id_18b7de2f_lang.js +0 -122
  203. package/lib/cjs/components/skeleton/Skeleton.vue.js +0 -9
  204. package/lib/cjs/components/skeleton/Skeleton.vue_vue_type_script_lang.js +0 -14
  205. package/lib/cjs/components/skeleton/Skeleton.vue_vue_type_template_id_6ac606e2_lang.js +0 -18
  206. package/lib/cjs/components/spacer/Spacer.vue.js +0 -12
  207. package/lib/cjs/components/spacer/Spacer.vue_vue_type_template_id_793ae82f_lang.js +0 -13
  208. package/lib/cjs/components/spinner/Spinner.vue.js +0 -9
  209. package/lib/cjs/components/spinner/Spinner.vue_vue_type_script_lang.js +0 -14
  210. package/lib/cjs/components/spinner/Spinner.vue_vue_type_template_id_714bd8a3_lang.js +0 -29
  211. package/lib/cjs/components/status/StatusDot.vue.js +0 -9
  212. package/lib/cjs/components/status/StatusDot.vue_vue_type_script_lang.js +0 -24
  213. package/lib/cjs/components/status/StatusDot.vue_vue_type_template_id_367d150a_lang.js +0 -25
  214. package/lib/cjs/components/table/Table.vue.js +0 -9
  215. package/lib/cjs/components/table/Table.vue_vue_type_script_lang.js +0 -117
  216. package/lib/cjs/components/table/Table.vue_vue_type_template_id_c0433c66_lang.js +0 -88
  217. package/lib/cjs/components/table/TableBody.vue.js +0 -9
  218. package/lib/cjs/components/table/TableBody.vue_vue_type_script_lang.js +0 -7
  219. package/lib/cjs/components/table/TableBody.vue_vue_type_template_id_7288bc0f_lang.js +0 -13
  220. package/lib/cjs/components/table/TableCell.vue.js +0 -9
  221. package/lib/cjs/components/table/TableCell.vue_vue_type_script_lang.js +0 -63
  222. package/lib/cjs/components/table/TableCell.vue_vue_type_template_id_5349a862_lang.js +0 -35
  223. package/lib/cjs/components/table/TableHead.vue.js +0 -9
  224. package/lib/cjs/components/table/TableHead.vue_vue_type_script_lang.js +0 -7
  225. package/lib/cjs/components/table/TableHead.vue_vue_type_template_id_6ae9fd66_lang.js +0 -18
  226. package/lib/cjs/components/table/TableHeader.vue.js +0 -9
  227. package/lib/cjs/components/table/TableHeader.vue_vue_type_script_lang.js +0 -48
  228. package/lib/cjs/components/table/TableHeader.vue_vue_type_template_id_9d5bd38c_lang.js +0 -78
  229. package/lib/cjs/components/table/TableRow.vue.js +0 -9
  230. package/lib/cjs/components/table/TableRow.vue_vue_type_script_lang.js +0 -33
  231. package/lib/cjs/components/table/TableRow.vue_vue_type_template_id_7c4a8ffd_lang.js +0 -26
  232. package/lib/cjs/components/tabs/Tab.vue.js +0 -9
  233. package/lib/cjs/components/tabs/Tab.vue_vue_type_script_lang.js +0 -62
  234. package/lib/cjs/components/tabs/Tab.vue_vue_type_template_id_3cfc6374_lang.js +0 -29
  235. package/lib/cjs/components/tabs/Tabs.vue.js +0 -9
  236. package/lib/cjs/components/tabs/Tabs.vue_vue_type_script_lang.js +0 -37
  237. package/lib/cjs/components/tabs/Tabs.vue_vue_type_template_id_663bac2f_lang.js +0 -16
  238. package/lib/cjs/components/tag/Tag.vue.js +0 -9
  239. package/lib/cjs/components/tag/Tag.vue_vue_type_script_lang.js +0 -39
  240. package/lib/cjs/components/tag/Tag.vue_vue_type_template_id_0aa571b6_lang.js +0 -77
  241. package/lib/cjs/components/textarea/Textarea.vue.js +0 -9
  242. package/lib/cjs/components/textarea/Textarea.vue_vue_type_script_lang.js +0 -113
  243. package/lib/cjs/components/textarea/Textarea.vue_vue_type_template_id_03d2272f_lang.js +0 -70
  244. package/lib/cjs/components/toast/Toast.vue.js +0 -9
  245. package/lib/cjs/components/toast/Toast.vue_vue_type_script_lang.js +0 -87
  246. package/lib/cjs/components/toast/Toast.vue_vue_type_template_id_fe243282_lang.js +0 -64
  247. package/lib/cjs/components/toggle/Toggle.vue.js +0 -9
  248. package/lib/cjs/components/toggle/Toggle.vue_vue_type_script_lang.js +0 -58
  249. package/lib/cjs/components/toggle/Toggle.vue_vue_type_template_id_5a9e0b2f_lang.js +0 -96
  250. package/lib/cjs/components/tooltip/Tooltip.vue.js +0 -9
  251. package/lib/cjs/components/tooltip/Tooltip.vue_vue_type_script_lang.js +0 -15
  252. package/lib/cjs/components/tooltip/Tooltip.vue_vue_type_template_id_213cff12_lang.js +0 -30
  253. package/lib/cjs/composables/common.js +0 -28
  254. package/lib/cjs/composables/inputtable.js +0 -162
  255. package/lib/cjs/composables/interactive.js +0 -41
  256. package/lib/cjs/index.js +0 -129
  257. package/lib/cjs/node_modules/style-inject/dist/style-inject.es.js +0 -30
  258. package/lib/esm/components/avatar/Avatar.vue.js +0 -6
  259. package/lib/esm/components/avatar/Avatar.vue_vue_type_script_lang.js +0 -84
  260. package/lib/esm/components/avatar/Avatar.vue_vue_type_template_id_2549fb8f_lang.js +0 -46
  261. package/lib/esm/components/button/Button.vue.js +0 -6
  262. package/lib/esm/components/button/Button.vue_vue_type_script_lang.js +0 -80
  263. package/lib/esm/components/button/Button.vue_vue_type_template_id_5975756f_lang.js +0 -96
  264. package/lib/esm/components/card/Card.vue.js +0 -6
  265. package/lib/esm/components/card/Card.vue_vue_type_script_lang.js +0 -16
  266. package/lib/esm/components/card/Card.vue_vue_type_template_id_7be81122_lang.js +0 -18
  267. package/lib/esm/components/checkbox/Checkbox.vue.js +0 -6
  268. package/lib/esm/components/checkbox/Checkbox.vue_vue_type_script_lang.js +0 -56
  269. package/lib/esm/components/checkbox/Checkbox.vue_vue_type_template_id_fa43bd62_lang.js +0 -98
  270. package/lib/esm/components/collapse/Collapse.vue.js +0 -6
  271. package/lib/esm/components/collapse/Collapse.vue_vue_type_script_lang.js +0 -64
  272. package/lib/esm/components/collapse/Collapse.vue_vue_type_template_id_06a1c88f_lang.js +0 -60
  273. package/lib/esm/components/colors.vue.js +0 -10
  274. package/lib/esm/components/colors.vue_vue_type_template_id_79d16100_lang.js +0 -402
  275. package/lib/esm/components/container/Container.vue.js +0 -6
  276. package/lib/esm/components/container/Container.vue_vue_type_script_lang.js +0 -12
  277. package/lib/esm/components/container/Container.vue_vue_type_template_id_05f5acf3_lang.js +0 -12
  278. package/lib/esm/components/divider/Divider.vue.js +0 -6
  279. package/lib/esm/components/divider/Divider.vue_vue_type_script_lang.js +0 -16
  280. package/lib/esm/components/divider/Divider.vue_vue_type_template_id_3a349aa3_lang.js +0 -45
  281. package/lib/esm/components/form/Form.vue.js +0 -6
  282. package/lib/esm/components/form/Form.vue_vue_type_script_lang.js +0 -93
  283. package/lib/esm/components/form/Form.vue_vue_type_template_id_a6cab022_lang.js +0 -16
  284. package/lib/esm/components/icon/Icon.vue.js +0 -6
  285. package/lib/esm/components/icon/Icon.vue_vue_type_script_lang.js +0 -24
  286. package/lib/esm/components/icon/Icon.vue_vue_type_template_id_0933a10f_lang.js +0 -28
  287. package/lib/esm/components/image/Image.vue.js +0 -6
  288. package/lib/esm/components/image/Image.vue_vue_type_script_lang.js +0 -26
  289. package/lib/esm/components/image/Image.vue_vue_type_template_id_f1ec3bb2_lang.js +0 -9
  290. package/lib/esm/components/index.js +0 -40
  291. package/lib/esm/components/input/Input.vue.js +0 -6
  292. package/lib/esm/components/input/Input.vue_vue_type_script_lang.js +0 -99
  293. package/lib/esm/components/input/Input.vue_vue_type_template_id_21c870c5_lang.js +0 -122
  294. package/lib/esm/components/link/Link.vue.js +0 -6
  295. package/lib/esm/components/link/Link.vue_vue_type_script_lang.js +0 -45
  296. package/lib/esm/components/link/Link.vue_vue_type_template_id_044f59af_lang.js +0 -55
  297. package/lib/esm/components/modal/Modal.vue.js +0 -6
  298. package/lib/esm/components/modal/Modal.vue_vue_type_script_lang.js +0 -53
  299. package/lib/esm/components/modal/Modal.vue_vue_type_template_id_177f8d4b_lang.js +0 -77
  300. package/lib/esm/components/note/Note.vue.js +0 -6
  301. package/lib/esm/components/note/Note.vue_vue_type_script_lang.js +0 -22
  302. package/lib/esm/components/note/Note.vue_vue_type_template_id_2b99d6a2_lang.js +0 -96
  303. package/lib/esm/components/pagination/Pagination.vue.js +0 -6
  304. package/lib/esm/components/pagination/Pagination.vue_vue_type_script_lang.js +0 -41
  305. package/lib/esm/components/pagination/Pagination.vue_vue_type_template_id_084845ef_lang.js +0 -50
  306. package/lib/esm/components/pagination/PaginationItem.vue.js +0 -6
  307. package/lib/esm/components/pagination/PaginationItem.vue_vue_type_script_lang.js +0 -22
  308. package/lib/esm/components/pagination/PaginationItem.vue_vue_type_template_id_241a3fbc_lang.js +0 -23
  309. package/lib/esm/components/popover/Popover.vue.js +0 -7
  310. package/lib/esm/components/popover/Popover.vue_vue_type_script_lang.js +0 -70
  311. package/lib/esm/components/popover/Popover.vue_vue_type_style_index_0_id_da70cc8a_lang.css.js +0 -6
  312. package/lib/esm/components/popover/Popover.vue_vue_type_template_id_da70cc8a_lang.js +0 -59
  313. package/lib/esm/components/popover/PopoverContainer.vue.js +0 -6
  314. package/lib/esm/components/popover/PopoverContainer.vue_vue_type_script_lang.js +0 -19
  315. package/lib/esm/components/popover/PopoverContainer.vue_vue_type_template_id_798f1294_lang.js +0 -12
  316. package/lib/esm/components/popover/PopoverItem.vue.js +0 -6
  317. package/lib/esm/components/popover/PopoverItem.vue_vue_type_script_lang.js +0 -32
  318. package/lib/esm/components/popover/PopoverItem.vue_vue_type_template_id_84692424_lang.js +0 -46
  319. package/lib/esm/components/progress/Progress.vue.js +0 -6
  320. package/lib/esm/components/progress/Progress.vue_vue_type_script_lang.js +0 -60
  321. package/lib/esm/components/progress/Progress.vue_vue_type_template_id_9ab7cee2_lang.js +0 -73
  322. package/lib/esm/components/radio/Radio.vue.js +0 -6
  323. package/lib/esm/components/radio/Radio.vue_vue_type_script_lang.js +0 -59
  324. package/lib/esm/components/radio/Radio.vue_vue_type_template_id_808cc132_lang.js +0 -116
  325. package/lib/esm/components/select/Select.vue.js +0 -6
  326. package/lib/esm/components/select/Select.vue_vue_type_script_lang.js +0 -60
  327. package/lib/esm/components/select/Select.vue_vue_type_template_id_18b7de2f_lang.js +0 -118
  328. package/lib/esm/components/skeleton/Skeleton.vue.js +0 -6
  329. package/lib/esm/components/skeleton/Skeleton.vue_vue_type_script_lang.js +0 -12
  330. package/lib/esm/components/skeleton/Skeleton.vue_vue_type_template_id_6ac606e2_lang.js +0 -14
  331. package/lib/esm/components/spacer/Spacer.vue.js +0 -10
  332. package/lib/esm/components/spacer/Spacer.vue_vue_type_template_id_793ae82f_lang.js +0 -9
  333. package/lib/esm/components/spinner/Spinner.vue.js +0 -6
  334. package/lib/esm/components/spinner/Spinner.vue_vue_type_script_lang.js +0 -12
  335. package/lib/esm/components/spinner/Spinner.vue_vue_type_template_id_714bd8a3_lang.js +0 -25
  336. package/lib/esm/components/status/StatusDot.vue.js +0 -6
  337. package/lib/esm/components/status/StatusDot.vue_vue_type_script_lang.js +0 -22
  338. package/lib/esm/components/status/StatusDot.vue_vue_type_template_id_367d150a_lang.js +0 -21
  339. package/lib/esm/components/table/Table.vue.js +0 -6
  340. package/lib/esm/components/table/Table.vue_vue_type_script_lang.js +0 -115
  341. package/lib/esm/components/table/Table.vue_vue_type_template_id_c0433c66_lang.js +0 -84
  342. package/lib/esm/components/table/TableBody.vue.js +0 -6
  343. package/lib/esm/components/table/TableBody.vue_vue_type_script_lang.js +0 -5
  344. package/lib/esm/components/table/TableBody.vue_vue_type_template_id_7288bc0f_lang.js +0 -9
  345. package/lib/esm/components/table/TableCell.vue.js +0 -6
  346. package/lib/esm/components/table/TableCell.vue_vue_type_script_lang.js +0 -61
  347. package/lib/esm/components/table/TableCell.vue_vue_type_template_id_5349a862_lang.js +0 -31
  348. package/lib/esm/components/table/TableHead.vue.js +0 -6
  349. package/lib/esm/components/table/TableHead.vue_vue_type_script_lang.js +0 -5
  350. package/lib/esm/components/table/TableHead.vue_vue_type_template_id_6ae9fd66_lang.js +0 -14
  351. package/lib/esm/components/table/TableHeader.vue.js +0 -6
  352. package/lib/esm/components/table/TableHeader.vue_vue_type_script_lang.js +0 -46
  353. package/lib/esm/components/table/TableHeader.vue_vue_type_template_id_9d5bd38c_lang.js +0 -74
  354. package/lib/esm/components/table/TableRow.vue.js +0 -6
  355. package/lib/esm/components/table/TableRow.vue_vue_type_script_lang.js +0 -31
  356. package/lib/esm/components/table/TableRow.vue_vue_type_template_id_7c4a8ffd_lang.js +0 -22
  357. package/lib/esm/components/tabs/Tab.vue.js +0 -6
  358. package/lib/esm/components/tabs/Tab.vue_vue_type_script_lang.js +0 -60
  359. package/lib/esm/components/tabs/Tab.vue_vue_type_template_id_3cfc6374_lang.js +0 -25
  360. package/lib/esm/components/tabs/Tabs.vue.js +0 -6
  361. package/lib/esm/components/tabs/Tabs.vue_vue_type_script_lang.js +0 -35
  362. package/lib/esm/components/tabs/Tabs.vue_vue_type_template_id_663bac2f_lang.js +0 -12
  363. package/lib/esm/components/tag/Tag.vue.js +0 -6
  364. package/lib/esm/components/tag/Tag.vue_vue_type_script_lang.js +0 -37
  365. package/lib/esm/components/tag/Tag.vue_vue_type_template_id_0aa571b6_lang.js +0 -73
  366. package/lib/esm/components/textarea/Textarea.vue.js +0 -6
  367. package/lib/esm/components/textarea/Textarea.vue_vue_type_script_lang.js +0 -111
  368. package/lib/esm/components/textarea/Textarea.vue_vue_type_template_id_03d2272f_lang.js +0 -66
  369. package/lib/esm/components/toast/Toast.vue.js +0 -6
  370. package/lib/esm/components/toast/Toast.vue_vue_type_script_lang.js +0 -85
  371. package/lib/esm/components/toast/Toast.vue_vue_type_template_id_fe243282_lang.js +0 -60
  372. package/lib/esm/components/toggle/Toggle.vue.js +0 -6
  373. package/lib/esm/components/toggle/Toggle.vue_vue_type_script_lang.js +0 -56
  374. package/lib/esm/components/toggle/Toggle.vue_vue_type_template_id_5a9e0b2f_lang.js +0 -92
  375. package/lib/esm/components/tooltip/Tooltip.vue.js +0 -6
  376. package/lib/esm/components/tooltip/Tooltip.vue_vue_type_script_lang.js +0 -13
  377. package/lib/esm/components/tooltip/Tooltip.vue_vue_type_template_id_213cff12_lang.js +0 -26
  378. package/lib/esm/composables/common.js +0 -23
  379. package/lib/esm/composables/inputtable.js +0 -155
  380. package/lib/esm/composables/interactive.js +0 -35
  381. package/lib/esm/index.js +0 -85
  382. package/lib/esm/node_modules/style-inject/dist/style-inject.es.js +0 -28
  383. package/lib/umd/index.js +0 -4349
  384. package/src/components/colors.vue +0 -396
  385. package/src/components/index.js +0 -40
  386. package/src/components/note/Note.vue +0 -74
  387. package/src/components/popover/PopoverItem.vue +0 -65
  388. package/src/components/status/StatusDot.vue +0 -41
  389. package/src/components/tabs/Tab.vue +0 -81
  390. package/src/components/tabs/Tabs.vue +0 -44
  391. package/src/components/toast/Toast.vue +0 -139
  392. package/src/composables/common.js +0 -21
  393. package/src/composables/interactive.js +0 -36
  394. package/src/index.js +0 -16
  395. package/src/nuxt.js +0 -13
  396. package/src/tailwind.preset.js +0 -24
package/lib/umd/index.js DELETED
@@ -1,4349 +0,0 @@
1
- (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue')) :
3
- typeof define === 'function' && define.amd ? define(['exports', 'vue'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.IndieUI = {}, global.Vue));
5
- })(this, (function (exports, vue) { 'use strict';
6
-
7
- const validator$c = {
8
- variant: [
9
- 'rounded',
10
- 'squared',
11
- ],
12
- };
13
-
14
- var script$F = {
15
- name: 'XAvatar',
16
-
17
- validator: validator$c,
18
-
19
- props: {
20
- alt: {
21
- type: String,
22
- default: null,
23
- },
24
-
25
- color: {
26
- type: String,
27
- default: 'primary',
28
- },
29
-
30
- name: {
31
- type: String,
32
- default: null,
33
- },
34
-
35
- size: {
36
- type: String,
37
- default: null,
38
- },
39
-
40
- outlined: {
41
- type: Boolean,
42
- default: false,
43
- },
44
-
45
- src: {
46
- type: String,
47
- default: null,
48
- },
49
-
50
- tag: {
51
- type: String,
52
- default: 'span',
53
- },
54
-
55
- squared: {
56
- type: Boolean,
57
- default: false,
58
- },
59
- },
60
-
61
- data() {
62
- return {
63
- source: null,
64
- }
65
- },
66
-
67
- computed: {
68
- initials() {
69
- if (this.name) {
70
- const initials = this.name.match(/\b\w/g) || [];
71
-
72
- return ((initials.shift() || '') + (initials.pop() || '')).toUpperCase()
73
- }
74
-
75
- return ''
76
- },
77
- },
78
-
79
- mounted() {
80
- if (this.src) {
81
- const img = new Image();
82
-
83
- img.onload = () => { this.source = this.src; };
84
- img.onerror = () => { };
85
- img.src = this.src;
86
- }
87
- },
88
- };
89
-
90
- const _hoisted_1$q = {
91
- key: 0,
92
- class: "leading-none"
93
- };
94
- const _hoisted_2$h = ["alt", "src"];
95
-
96
- function render$D(_ctx, _cache, $props, $setup, $data, $options) {
97
- return (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.tag), {
98
- class: vue.normalizeClass(["inline-flex items-center justify-center overflow-hidden", [
99
- // color
100
- { [`bg-${$props.color}-500 text-${$props.color}-50`]: !$data.source && !$props.outlined },
101
- {
102
- // border
103
- 'border border-gray-400 dark:border-gray-500': !$data.source && $props.outlined,
104
-
105
- // size
106
- 'h-6 w-6 text-xs': $props.size === 'xs',
107
- 'h-7 w-7 text-sm': $props.size === 'sm',
108
- 'h-10 w-10': !['xs', 'sm', 'lg', 'xl'].includes($props.size),
109
- 'h-12 w-12 text-lg': $props.size === 'lg',
110
- 'h-20 w-20 text-2xl': $props.size === 'xl',
111
- 'h-36 w-36 text-2xl': $props.size === '2xl',
112
- },
113
- $props.squared ? 'rounded-md' : 'rounded-full'
114
- ]])
115
- }, {
116
- default: vue.withCtx(() => [
117
- (!$data.source && $props.name)
118
- ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_1$q, vue.toDisplayString($options.initials), 1 /* TEXT */))
119
- : vue.createCommentVNode("v-if", true),
120
- ($data.source)
121
- ? (vue.openBlock(), vue.createElementBlock("img", {
122
- key: 1,
123
- alt: $props.alt,
124
- src: $props.src,
125
- class: "h-full w-full"
126
- }, null, 8 /* PROPS */, _hoisted_2$h))
127
- : vue.createCommentVNode("v-if", true)
128
- ]),
129
- _: 1 /* STABLE */
130
- }, 8 /* PROPS */, ["class"]))
131
- }
132
-
133
- script$F.render = render$D;
134
- script$F.__file = "src/components/avatar/Avatar.vue";
135
-
136
- const validator$b = {
137
- size: ['auto', 'xs', 'sm', 'md', 'lg', 'xl'],
138
- };
139
-
140
- const withProps$2 = () => ({
141
- size: {
142
- type: String,
143
- default: null,
144
- validator: (value) => validator$b.size.includes(value),
145
- },
146
- color: {
147
- type: String,
148
- default: 'primary',
149
- },
150
- flat: {
151
- type: Boolean,
152
- default: false,
153
- },
154
- });
155
-
156
- const withValidator$2 = () => validator$b;
157
-
158
- const validator$a = {
159
- ...withValidator$2(),
160
- };
161
-
162
- const withProps$1 = () => ({
163
- ...withProps$2(),
164
- disabled: {
165
- type: Boolean,
166
- default: false,
167
- },
168
- loading: {
169
- type: Boolean,
170
- default: false,
171
- },
172
- });
173
-
174
- const withValidator$1 = () => validator$a;
175
-
176
- const useInteractive = () => {
177
- const focusRef = vue.ref(null);
178
-
179
- const focus = () => {
180
- if (focusRef.value) focusRef.value.focus();
181
- };
182
-
183
- return {
184
- focusRef,
185
- focus,
186
- }
187
- };
188
-
189
- var script$E = {
190
- name: 'XSpinner',
191
-
192
- props: {
193
- size: {
194
- type: String,
195
- default: null,
196
- },
197
- },
198
- };
199
-
200
- const _hoisted_1$p = /*#__PURE__*/vue.createStaticVNode("<g fill=\"none\" fill-rule=\"evenodd\"><g transform=\"translate(1 1)\" stroke-width=\"2\"><circle stroke-opacity=\".5\" cx=\"18\" cy=\"18\" r=\"18\"></circle><path d=\"M36 18c0-9.94-8.06-18-18-18\"><animateTransform attributeName=\"transform\" type=\"rotate\" from=\"0 18 18\" to=\"360 18 18\" dur=\"0.5s\" repeatCount=\"indefinite\"></animateTransform></path></g></g>", 1);
201
- const _hoisted_2$g = [
202
- _hoisted_1$p
203
- ];
204
-
205
- function render$C(_ctx, _cache, $props, $setup, $data, $options) {
206
- return (vue.openBlock(), vue.createElementBlock("svg", {
207
- class: vue.normalizeClass([
208
- {
209
- 'h-3 w-3': $props.size === 'xs',
210
- 'h-4 w-4': $props.size === 'sm',
211
- 'h-5 w-5': !['xs', 'sm', 'xl'].includes($props.size),
212
- 'h-6 w-6': $props.size === 'xl',
213
- },
214
-
215
- ]),
216
- viewBox: "0 0 38 38",
217
- xmlns: "http://www.w3.org/2000/svg",
218
- style: {"stroke":"currentColor"}
219
- }, _hoisted_2$g, 2 /* CLASS */))
220
- }
221
-
222
- script$E.render = render$C;
223
- script$E.__file = "src/components/spinner/Spinner.vue";
224
-
225
- var script$D = {
226
- name: 'XIcon',
227
-
228
- validator: withValidator$2(),
229
-
230
- props: {
231
- ...withProps$2(),
232
-
233
- icon: {
234
- type: String,
235
- required: true,
236
- },
237
- },
238
-
239
- computed: {
240
- icons() {
241
- return this.$icons ? this.$icons : {}
242
- },
243
- },
244
- };
245
-
246
- const _hoisted_1$o = ["innerHTML"];
247
-
248
- function render$B(_ctx, _cache, $props, $setup, $data, $options) {
249
- return (vue.openBlock(), vue.createElementBlock("svg", {
250
- class: vue.normalizeClass(["stroke-2 inline-block", [
251
- {
252
- 'h-3 w-3': _ctx.size === 'xs',
253
- 'h-4 w-4': _ctx.size === 'sm',
254
- 'h-5 w-5': !['xs', 'sm', 'xl'].includes(_ctx.size),
255
- 'h-6 w-6': _ctx.size === 'xl',
256
- },
257
- ]]),
258
- fill: "none",
259
- stroke: "currentColor",
260
- viewBox: "0 0 24 24",
261
- "stroke-linecap": "round",
262
- "stroke-linejoin": "round",
263
- xmlns: "http://www.w3.org/2000/svg"
264
- }, [
265
- vue.createElementVNode("g", {
266
- innerHTML: $options.icons[$props.icon] ? $options.icons[$props.icon] : $props.icon
267
- }, null, 8 /* PROPS */, _hoisted_1$o)
268
- ], 2 /* CLASS */))
269
- }
270
-
271
- script$D.render = render$B;
272
- script$D.__file = "src/components/icon/Icon.vue";
273
-
274
- const validator$9 = {
275
- group: [false, true, '', 'first', 'last'],
276
- };
277
-
278
- var script$C = {
279
- name: 'XButton',
280
- components: {
281
- XSpinner: script$E,
282
- XIcon: script$D,
283
- },
284
-
285
- validator: {
286
- ...withValidator$1(),
287
- ...validator$9,
288
- },
289
-
290
- props: {
291
- ...withProps$1(),
292
-
293
- group: {
294
- default: false,
295
- type: [String, Boolean],
296
- validator: (value) => validator$9.group.includes(value),
297
- },
298
-
299
- icon: {
300
- type: String,
301
- default: null,
302
- },
303
-
304
- iconRight: {
305
- type: Boolean,
306
- default: false,
307
- },
308
-
309
- to: {
310
- type: String,
311
- default: undefined,
312
- },
313
-
314
- tag: {
315
- type: String,
316
- default: 'button',
317
- },
318
-
319
- type: {
320
- type: String,
321
- default: 'button',
322
- },
323
-
324
- outlined: {
325
- type: Boolean,
326
- default: false,
327
- },
328
-
329
- rounded: {
330
- type: Boolean,
331
- default: false,
332
- },
333
-
334
- glow: {
335
- type: Boolean,
336
- default: false,
337
- },
338
- },
339
-
340
- setup() {
341
- return {
342
- ...useInteractive(),
343
- }
344
- },
345
- };
346
-
347
- function render$A(_ctx, _cache, $props, $setup, $data, $options) {
348
- const _component_x_spinner = vue.resolveComponent("x-spinner");
349
- const _component_x_icon = vue.resolveComponent("x-icon");
350
-
351
- return (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.to ? 'router-link' : $props.tag), {
352
- ref: "focusRef",
353
- to: $props.to,
354
- class: vue.normalizeClass(["relative leading-tight transition-colors duration-150 cursor-pointer focus:outline-none inline-block items-center justify-center font-medium", [
355
- {
356
- 'shadow': !_ctx.flat && !$props.glow,
357
- [`shadow-lg shadow-${_ctx.color}-500/50`]: !_ctx.flat && $props.glow,
358
- },
359
- _ctx.disabled ?
360
- // disabled
361
- 'border-gray-300 dark:border-gray-600 bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 cursor-not-allowed'
362
- : {
363
- // not disabled
364
- [`border border-${_ctx.color}-500 text-${_ctx.color}-500`]: $props.outlined,
365
-
366
- // colors
367
- [`border border-transparent text-${_ctx.color}-50 bg-${_ctx.color}-500`]: !$props.outlined,
368
-
369
- // colors hovers | actives
370
- 'hover:bg-dark-image active:bg-darker-image active:shadow-none': !_ctx.loading && !$props.outlined,
371
- [`hover:bg-gray-100 active:bg-gray-200 dark:hover:bg-gray-700 dark:hover:active:bg-gray-600`]: !_ctx.loading && $props.outlined,
372
- },
373
- _ctx.$slots.default ? {
374
- // size
375
- 'py-1': _ctx.size === 'auto',
376
- 'px-2 py-1 text-xs': _ctx.size === 'xs',
377
- 'px-2 py-1 text-sm': _ctx.size === 'sm',
378
- 'px-4 py-2': !['auto', 'xs', 'sm', 'lg', 'xl'].includes(_ctx.size),
379
- 'px-6 py-3 text-lg': _ctx.size === 'lg',
380
- 'px-10 py-6 text-xl': _ctx.size === 'xl',
381
- } : 'px-3 py-2',
382
- {
383
- // icon
384
- 'inline-flex items-center': $props.icon,
385
-
386
- // group
387
- 'rounded-button': $props.group === false,
388
- 'rounded-l-button': $props.group === 'first',
389
- 'rounded-r-button': $props.group === 'last',
390
-
391
- '!rounded-full': $props.rounded,
392
-
393
- // loading
394
- 'cursor-default': _ctx.loading,
395
-
396
- // content
397
- 'flex items-center justify-center': _ctx.loading,
398
- 'flex-row-reverse': $props.icon && $props.iconRight
399
- },
400
-
401
- ]]),
402
- "aria-busy": _ctx.loading ? 'true' : null,
403
- "aria-disabled": $props.tag !== 'button' && _ctx.disabled ? 'true' : null,
404
- disabled: _ctx.disabled || _ctx.loading,
405
- type: $props.tag === 'button' ? $props.type : null
406
- }, {
407
- default: vue.withCtx(() => [
408
- (_ctx.loading)
409
- ? (vue.openBlock(), vue.createBlock(_component_x_spinner, {
410
- key: 0,
411
- size: _ctx.size,
412
- class: "absolute"
413
- }, null, 8 /* PROPS */, ["size"]))
414
- : vue.createCommentVNode("v-if", true),
415
- ($props.icon)
416
- ? (vue.openBlock(), vue.createElementBlock("span", {
417
- key: 1,
418
- class: vue.normalizeClass(["flex", [{
419
- 'mr-2': _ctx.$slots.default && !$props.iconRight,
420
- 'ml-2': _ctx.$slots.default && $props.iconRight,
421
- 'invisible': _ctx.loading
422
- }]])
423
- }, [
424
- vue.createVNode(_component_x_icon, {
425
- size: _ctx.size,
426
- icon: $props.icon
427
- }, null, 8 /* PROPS */, ["size", "icon"])
428
- ], 2 /* CLASS */))
429
- : vue.createCommentVNode("v-if", true),
430
- vue.createElementVNode("span", {
431
- class: vue.normalizeClass({ 'invisible': _ctx.loading })
432
- }, [
433
- vue.renderSlot(_ctx.$slots, "default")
434
- ], 2 /* CLASS */)
435
- ]),
436
- _: 3 /* FORWARDED */
437
- }, 8 /* PROPS */, ["to", "class", "aria-busy", "aria-disabled", "disabled", "type"]))
438
- }
439
-
440
- script$C.render = render$A;
441
- script$C.__file = "src/components/button/Button.vue";
442
-
443
- var script$B = {
444
- name: 'XCard',
445
- props: {
446
- flat: {
447
- type: Boolean,
448
- default: false,
449
- },
450
-
451
- tag: {
452
- type: String,
453
- default: 'div',
454
- },
455
- },
456
- };
457
-
458
- function render$z(_ctx, _cache, $props, $setup, $data, $options) {
459
- return (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.tag), {
460
- class: vue.normalizeClass(["rounded bg-white dark:bg-gray-800", [
461
- {
462
- 'shadow': !$props.flat,
463
- },
464
- ]])
465
- }, {
466
- default: vue.withCtx(() => [
467
- vue.renderSlot(_ctx.$slots, "default")
468
- ]),
469
- _: 3 /* FORWARDED */
470
- }, 8 /* PROPS */, ["class"]))
471
- }
472
-
473
- script$B.render = render$z;
474
- script$B.__file = "src/components/card/Card.vue";
475
-
476
- const validator$8 = {
477
- ...withValidator$1(),
478
- };
479
-
480
- const withProps = () => ({
481
- ...withProps$1(),
482
- name: {
483
- type: String,
484
- default: null,
485
- },
486
- modelValue: {
487
- type: [String, Number, Boolean, Function, Object, Array],
488
- default: null,
489
- },
490
- readonly: {
491
- type: Boolean,
492
- default: false,
493
- },
494
- required: {
495
- type: Boolean,
496
- default: false,
497
- },
498
- validateOnInput: {
499
- type: Boolean,
500
- default: true,
501
- },
502
- error: {
503
- type: String,
504
- default: '',
505
- },
506
- rules: {
507
- type: Array,
508
- default: () => [],
509
- },
510
- });
511
-
512
- const withValidator = () => validator$8;
513
-
514
- const withEmits = (useListeners = true) => {
515
- const emits = ['update:modelValue'];
516
-
517
- if (!useListeners) return emits
518
-
519
- return emits.concat(['blur', 'focus', 'input', 'change'])
520
- };
521
-
522
- const useInputtable = (props, { attrs, emit, useListeners = true } = {}) => {
523
- const interactive = useInteractive();
524
-
525
- const isFirstValidation = vue.ref(true);
526
- const errorInternal = vue.ref(props.error);
527
-
528
- const name = props.name ? props.name : (Math.random() + 1).toString(36).substring(7);
529
- const nameInternal = vue.ref(name);
530
-
531
- vue.watch(() => props.error, (val) => { errorInternal.value = val; });
532
- vue.watch(() => props.name, (val) => { if (val) nameInternal.value = val; });
533
-
534
- const form = vue.inject('form', {
535
- registerInput: () => {},
536
- unregisterInput: () => {},
537
- });
538
-
539
- const reset = () => {
540
- errorInternal.value = '';
541
- isFirstValidation.value = true;
542
- emit('update:modelValue', '');
543
- };
544
-
545
- const setError = (val) => {
546
- errorInternal.value = val;
547
- };
548
-
549
- const validate = (val) => {
550
- val = val || props.modelValue;
551
-
552
- isFirstValidation.value = false;
553
-
554
- for (let i = 0; i < props.rules.length; i++) {
555
- const item = props.rules[i];
556
-
557
- let isValid = true;
558
-
559
- // Direct Function
560
- if (typeof item === 'function') {
561
- const rule = item;
562
-
563
- isValid = rule(val);
564
- } else if (Array.isArray(item) && item.length === 2) {
565
- // Rule array [function, options]
566
- const { 0: rule, 1: options } = item;
567
-
568
- isValid = rule(val, options);
569
- } else {
570
- // Rule object { fn, options }
571
- const rule = item.fn;
572
- const { options } = item;
573
-
574
- isValid = rule(val, options);
575
- }
576
-
577
- if (isValid !== true) {
578
- errorInternal.value = isValid;
579
-
580
- return false
581
- }
582
- }
583
-
584
- errorInternal.value = '';
585
-
586
- return true
587
- };
588
-
589
- const inputListeners = useListeners ? vue.computed(() => {
590
- return {
591
- attrs,
592
- blur: (event) => emit('blur', event),
593
- focus: (event) => emit('focus', event),
594
- input: (event) => {
595
- if (props.validateOnInput && !isFirstValidation.value) validate(event.target.value);
596
- emit('update:modelValue', event.target.value);
597
- },
598
- change: (event) => emit('change', event),
599
- }
600
- }) : vue.ref({});
601
-
602
- vue.onMounted(() => {
603
- form.registerInput(nameInternal.value, { focus: interactive.focus, validate, setError });
604
- });
605
-
606
- vue.onUnmounted(() => {
607
- form.unregisterInput(nameInternal.value);
608
- });
609
-
610
- return {
611
- ...interactive,
612
-
613
- // data
614
- isFirstValidation,
615
- errorInternal,
616
-
617
- // computed
618
- inputListeners,
619
-
620
- // methods
621
- reset,
622
- validate,
623
- setError,
624
- }
625
- };
626
-
627
- var script$A = {
628
- name: 'XCheckbox',
629
- components: {
630
- XSpinner: script$E,
631
- },
632
-
633
- validator: {
634
- ...withValidator(),
635
- },
636
-
637
- props: {
638
- ...withProps(),
639
-
640
- label: {
641
- type: String,
642
- default: null,
643
- },
644
-
645
- glow: {
646
- type: Boolean,
647
- default: false,
648
- },
649
- },
650
-
651
- emits: withEmits(false),
652
-
653
- setup(props, { attrs, emit }) {
654
- return {
655
- ...useInputtable(props, { attrs, emit, useListeners: false }),
656
- }
657
- },
658
-
659
- computed: {
660
- checked: {
661
- get() {
662
- return this.modelValue
663
- },
664
-
665
- set(val) {
666
- this.$emit('update:modelValue', val);
667
- },
668
- },
669
- },
670
-
671
- methods: {
672
- toggle() {
673
- this.$emit('update:modelValue', !this.modelValue);
674
- },
675
- },
676
- };
677
-
678
- const _hoisted_1$n = { class: "inline-block mb-1 relative cursor-pointer pb-2" };
679
- const _hoisted_2$f = ["aria-checked", "aria-disabled", "disabled", "name", "required", "value"];
680
- const _hoisted_3$c = /*#__PURE__*/vue.createElementVNode("path", { d: "M0 11l2-2 5 5L18 3l2 2L7 18z" }, null, -1 /* HOISTED */);
681
- const _hoisted_4$a = [
682
- _hoisted_3$c
683
- ];
684
- const _hoisted_5$6 = ["textContent"];
685
- const _hoisted_6$5 = ["textContent"];
686
-
687
- function render$y(_ctx, _cache, $props, $setup, $data, $options) {
688
- const _component_x_spinner = vue.resolveComponent("x-spinner");
689
-
690
- return (vue.openBlock(), vue.createElementBlock("label", _hoisted_1$n, [
691
- vue.createElementVNode("div", {
692
- ref: "focusRef",
693
- class: vue.normalizeClass(["flex items-center", { 'cursor-not-allowed': _ctx.disabled }]),
694
- tabindex: 0,
695
- onKeypress: _cache[1] || (_cache[1] = vue.withKeys(vue.withModifiers((...args) => ($options.toggle && $options.toggle(...args)), ["prevent","stop"]), ["enter","space"]))
696
- }, [
697
- vue.withDirectives(vue.createElementVNode("input", {
698
- "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => (($options.checked) = $event)),
699
- "aria-checked": $options.checked ? 'true' : 'false',
700
- "aria-disabled": _ctx.disabled ? 'true' : null,
701
- type: "checkbox",
702
- class: "invisible absolute",
703
- disabled: _ctx.disabled || _ctx.loading,
704
- name: _ctx.name,
705
- required: _ctx.required,
706
- value: _ctx.modelValue
707
- }, null, 8 /* PROPS */, _hoisted_2$f), [
708
- [vue.vModelCheckbox, $options.checked]
709
- ]),
710
- vue.createElementVNode("div", {
711
- class: vue.normalizeClass(["rounded flex justify-center items-center flex-shrink-0", [
712
- {
713
- 'shadow': !_ctx.flat && !_ctx.loading,
714
- [`shadow-lg shadow-${_ctx.color}-500/50`]: !_ctx.flat && $props.glow && _ctx.modelValue,
715
-
716
- 'h-4 w-4': _ctx.size === 'sm' || _ctx.size === 'xs',
717
- 'h-5 w-5': !['xs', 'sm', 'xl'].includes(_ctx.size),
718
- 'h-6 w-6': _ctx.size === 'xl',
719
- },
720
- _ctx.disabled ? {
721
- 'bg-gray-500 border-gray-600 dark:border-gray-400': _ctx.modelValue,
722
- 'bg-gray-200 border-gray-300 dark:border-gray-700': !_ctx.modelValue,
723
- } :
724
- {
725
- [`bg-${_ctx.color}-500 border-${_ctx.color}-500`]: _ctx.modelValue && !_ctx.loading,
726
- 'border bg-white dark:bg-gray-900 border-gray-300 hover:border-gray-900 dark:border-gray-700': !_ctx.modelValue && !_ctx.loading,
727
- }
728
- ]])
729
- }, [
730
- (_ctx.loading)
731
- ? (vue.openBlock(), vue.createBlock(_component_x_spinner, {
732
- key: 0,
733
- size: _ctx.size,
734
- class: "absolute"
735
- }, null, 8 /* PROPS */, ["size"]))
736
- : (vue.openBlock(), vue.createElementBlock("svg", {
737
- key: 1,
738
- class: vue.normalizeClass(["fill-current text-gray-100", {
739
- 'opacity-0': !_ctx.modelValue,
740
- 'h-2 w-2': _ctx.size === 'sm' || _ctx.size === 'xs',
741
- 'h-3 w-3': !['xs', 'sm', 'xl'].includes(_ctx.size),
742
- 'h-4 w-4': _ctx.size === 'xl',
743
- }]),
744
- viewBox: "0 0 20 20"
745
- }, _hoisted_4$a, 2 /* CLASS */))
746
- ], 2 /* CLASS */),
747
- vue.createElementVNode("div", {
748
- class: vue.normalizeClass(["inline-block font-medium text-gray-800 dark:text-gray-200 pl-2", {
749
- 'text-xs': _ctx.size === 'xs',
750
- 'text-sm': _ctx.size === 'sm',
751
- 'text-lg': _ctx.size === 'lg',
752
- 'text-xl': _ctx.size === 'xl',
753
- }])
754
- }, [
755
- ($props.label)
756
- ? (vue.openBlock(), vue.createElementBlock("span", {
757
- key: 0,
758
- textContent: vue.toDisplayString($props.label)
759
- }, null, 8 /* PROPS */, _hoisted_5$6))
760
- : vue.renderSlot(_ctx.$slots, "default", { key: 1 })
761
- ], 2 /* CLASS */)
762
- ], 34 /* CLASS, HYDRATE_EVENTS */),
763
- (_ctx.errorInternal)
764
- ? (vue.openBlock(), vue.createElementBlock("p", {
765
- key: 0,
766
- class: "text-sm text-error-500 mt-1",
767
- textContent: vue.toDisplayString(_ctx.errorInternal)
768
- }, null, 8 /* PROPS */, _hoisted_6$5))
769
- : vue.createCommentVNode("v-if", true)
770
- ]))
771
- }
772
-
773
- script$A.render = render$y;
774
- script$A.__file = "src/components/checkbox/Checkbox.vue";
775
-
776
- var script$z = {
777
- name: 'XCollapse',
778
-
779
- props: {
780
- disabled: {
781
- default: false,
782
- type: Boolean,
783
- },
784
-
785
- expanded: {
786
- default: false,
787
- type: Boolean,
788
- },
789
-
790
- iconLeft: {
791
- default: false,
792
- type: Boolean,
793
- },
794
-
795
- tag: {
796
- default: 'div',
797
- type: String,
798
- },
799
- },
800
-
801
- data() {
802
- return {
803
- collapsed: !this.expanded,
804
- maxHeight: !this.expanded ? 0 : 'auto',
805
- }
806
- },
807
-
808
- beforeMount() {
809
- window.addEventListener('resize', this.resizeContent);
810
- },
811
-
812
- beforeUnmount() {
813
- window.removeEventListener('resize', this.resizeContent);
814
- },
815
-
816
- mounted() {
817
- this.resizeContent();
818
- },
819
-
820
- methods: {
821
- toggleExpand() {
822
- if (this.disabled) return
823
-
824
- this.collapsed = !this.collapsed;
825
- this.$emit('toggle', this.collapsed);
826
- this.resizeContent();
827
- },
828
-
829
- resizeContent() {
830
- if (this.collapsed) {
831
- this.maxHeight = 0;
832
- } else {
833
- this.maxHeight = this.$refs.content.offsetHeight;
834
- }
835
- },
836
- },
837
- };
838
-
839
- const _hoisted_1$m = { class: "flex-1" };
840
- const _hoisted_2$e = { class: "absolute top-1/2 transform -translate-y-1/2 right-2" };
841
- const _hoisted_3$b = /*#__PURE__*/vue.createElementVNode("polyline", { points: "6 9 12 15 18 9" }, null, -1 /* HOISTED */);
842
- const _hoisted_4$9 = [
843
- _hoisted_3$b
844
- ];
845
- const _hoisted_5$5 = { ref: "content" };
846
-
847
- function render$x(_ctx, _cache, $props, $setup, $data, $options) {
848
- return (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.tag), {
849
- "aria-disabled": $props.disabled,
850
- "aria-expanded": $data.collapsed ? 'false' : 'true'
851
- }, {
852
- default: vue.withCtx(() => [
853
- vue.createElementVNode("div", {
854
- class: vue.normalizeClass(["flex items-center relative", {
855
- 'cursor-pointer' : !$props.disabled,
856
- 'flex-row-reverse': $props.iconLeft,
857
- }]),
858
- onClick: _cache[0] || (_cache[0] = $event => ($options.toggleExpand()))
859
- }, [
860
- vue.createElementVNode("div", _hoisted_1$m, [
861
- vue.renderSlot(_ctx.$slots, "default", { collapsed: $data.collapsed })
862
- ]),
863
- vue.createElementVNode("div", _hoisted_2$e, [
864
- (vue.openBlock(), vue.createElementBlock("svg", {
865
- width: "24",
866
- height: "24",
867
- viewBox: "0 0 24 24",
868
- stroke: "currentColor",
869
- "stroke-linejoin": "round",
870
- "stroke-linecap": "round",
871
- fill: "none",
872
- role: "presentation",
873
- class: vue.normalizeClass(["stroke-2 w-5 h-5 transform transition-transform duration-200", [
874
- $props.iconLeft ? 'mr-2' : 'ml-2',
875
- { 'rotate-180': !$data.collapsed }
876
- ]])
877
- }, _hoisted_4$9, 2 /* CLASS */))
878
- ])
879
- ], 2 /* CLASS */),
880
- (_ctx.$slots.summary)
881
- ? vue.renderSlot(_ctx.$slots, "summary", { key: 0 })
882
- : vue.createCommentVNode("v-if", true),
883
- vue.createElementVNode("div", {
884
- class: "overflow-y-hidden transition-all duration-300 ease-in-out",
885
- style: vue.normalizeStyle({ maxHeight: $data.maxHeight + 'px' })
886
- }, [
887
- vue.createElementVNode("div", _hoisted_5$5, [
888
- vue.renderSlot(_ctx.$slots, "content")
889
- ], 512 /* NEED_PATCH */)
890
- ], 4 /* STYLE */)
891
- ]),
892
- _: 3 /* FORWARDED */
893
- }, 8 /* PROPS */, ["aria-disabled", "aria-expanded"]))
894
- }
895
-
896
- script$z.render = render$x;
897
- script$z.__file = "src/components/collapse/Collapse.vue";
898
-
899
- var script$y = {
900
- name: 'XContainer',
901
-
902
- props: {
903
- tag: {
904
- type: String,
905
- default: 'div',
906
- },
907
- },
908
- };
909
-
910
- function render$w(_ctx, _cache, $props, $setup, $data, $options) {
911
- return (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.tag), { class: "container mx-auto px-4" }, {
912
- default: vue.withCtx(() => [
913
- vue.renderSlot(_ctx.$slots, "default")
914
- ]),
915
- _: 3 /* FORWARDED */
916
- }))
917
- }
918
-
919
- script$y.render = render$w;
920
- script$y.__file = "src/components/container/Container.vue";
921
-
922
- var script$x = {
923
- name: 'XDivider',
924
-
925
- props: {
926
- label: {
927
- type: String,
928
- default: '',
929
- },
930
- vertical: {
931
- type: Boolean,
932
- default: false,
933
- },
934
- },
935
- };
936
-
937
- const _hoisted_1$l = ["textContent"];
938
-
939
- function render$v(_ctx, _cache, $props, $setup, $data, $options) {
940
- return (vue.openBlock(), vue.createElementBlock("div", {
941
- class: vue.normalizeClass([[
942
- {
943
- 'h-full flex-col': $props.vertical,
944
- 'w-full': !$props.vertical
945
- },
946
- ], "flex justify-center items-center"])
947
- }, [
948
- vue.createElementVNode("div", {
949
- class: "bg-gray-200 dark:bg-gray-600 flex-grow",
950
- style: vue.normalizeStyle([
951
- {
952
- width: $props.vertical ? '1px' : 'auto',
953
- height: !$props.vertical ? '1px' : 'auto'
954
- }
955
- ])
956
- }, null, 4 /* STYLE */),
957
- ($props.label)
958
- ? (vue.openBlock(), vue.createElementBlock("div", {
959
- key: 0,
960
- class: vue.normalizeClass(["font-medium text-sm text-gray-600 dark:text-gray-300", [{
961
- 'my-2': $props.vertical,
962
- 'mx-4': !$props.vertical
963
- }]]),
964
- textContent: vue.toDisplayString($props.label)
965
- }, null, 10 /* CLASS, PROPS */, _hoisted_1$l))
966
- : vue.createCommentVNode("v-if", true),
967
- vue.createElementVNode("div", {
968
- class: "bg-gray-200 dark:bg-gray-600 flex-grow",
969
- style: vue.normalizeStyle([
970
- {
971
- width: $props.vertical ? '1px' : 'auto',
972
- height: !$props.vertical ? '1px' : 'auto'
973
- }
974
- ])
975
- }, null, 4 /* STYLE */)
976
- ], 2 /* CLASS */))
977
- }
978
-
979
- script$x.render = render$v;
980
- script$x.__file = "src/components/divider/Divider.vue";
981
-
982
- var script$w = {
983
- name: 'XForm',
984
- inheritAttrs: false,
985
- props: {
986
- autoValidate: {
987
- type: Boolean,
988
- default: true,
989
- },
990
- autoFocus: {
991
- type: Boolean,
992
- default: true,
993
- },
994
- disabled: {
995
- type: Boolean,
996
- default: false,
997
- },
998
- errors: {
999
- type: Array,
1000
- default: () => [],
1001
- },
1002
- },
1003
-
1004
- setup(props, { emit }) {
1005
- const inputs = [];
1006
-
1007
- vue.provide('form', {
1008
- registerInput: (name, { focus, validate, setError }) => {
1009
- const exists = inputs.find((i) => i.name === name);
1010
-
1011
- if (exists) {
1012
- exists.focus = focus;
1013
- exists.validate = validate;
1014
- exists.setError = setError;
1015
- }
1016
- else inputs.push({ name, focus, validate, setError });
1017
- },
1018
- unregisterInput: (name) => {
1019
- const index = inputs.findIndex((i) => i.name === name);
1020
-
1021
- inputs.splice(index, 1);
1022
- },
1023
- });
1024
-
1025
- vue.onMounted(() => {
1026
- if (props.autoFocus && inputs && inputs.length > 0) inputs[0].focus();
1027
- });
1028
-
1029
- vue.watch(() => props.errors, (errors) => {
1030
- vue.nextTick(() => {
1031
- errors.forEach((error) => {
1032
- const input = inputs.find((i) => i.name === error.field);
1033
-
1034
- if (input) input.setError(error.msg);
1035
- });
1036
- });
1037
- });
1038
-
1039
- const validate = () => {
1040
- let isFormValid = true;
1041
-
1042
- inputs.forEach((input) => {
1043
- const isInputValid = input.validate();
1044
-
1045
- if (!isInputValid && isFormValid) {
1046
- isFormValid = false;
1047
-
1048
- // focus on input error
1049
- if (input.focus) input.focus();
1050
- }
1051
- });
1052
-
1053
- return isFormValid
1054
- };
1055
-
1056
- const submit = (e) => {
1057
- e.preventDefault();
1058
- e.stopPropagation();
1059
-
1060
- const isFormValid = props.autoValidate ? validate() : true;
1061
-
1062
- emit('submit', isFormValid);
1063
- };
1064
-
1065
- return {
1066
- validate,
1067
- submit,
1068
- }
1069
- },
1070
- };
1071
-
1072
- const _hoisted_1$k = ["disabled"];
1073
-
1074
- function render$u(_ctx, _cache, $props, $setup, $data, $options) {
1075
- return (vue.openBlock(), vue.createElementBlock("form", {
1076
- onSubmit: _cache[0] || (_cache[0] = (...args) => ($setup.submit && $setup.submit(...args))),
1077
- onKeypress: _cache[1] || (_cache[1] = vue.withKeys((...args) => ($setup.submit && $setup.submit(...args)), ["enter"]))
1078
- }, [
1079
- vue.createElementVNode("fieldset", { disabled: $props.disabled }, [
1080
- vue.renderSlot(_ctx.$slots, "default")
1081
- ], 8 /* PROPS */, _hoisted_1$k)
1082
- ], 32 /* HYDRATE_EVENTS */))
1083
- }
1084
-
1085
- script$w.render = render$u;
1086
- script$w.__file = "src/components/form/Form.vue";
1087
-
1088
- const fallback = 'data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=';
1089
-
1090
- var script$v = {
1091
- props: {
1092
- src: {
1093
- type: String,
1094
- default: '',
1095
- },
1096
- },
1097
-
1098
- data() {
1099
- return {
1100
- source: fallback,
1101
- }
1102
- },
1103
-
1104
- mounted() {
1105
- const img = new Image();
1106
-
1107
- img.onload = () => { this.source = this.src; };
1108
- img.onerror = () => { };
1109
- img.src = this.src;
1110
- },
1111
- };
1112
-
1113
- const _hoisted_1$j = ["src"];
1114
-
1115
- function render$t(_ctx, _cache, $props, $setup, $data, $options) {
1116
- return (vue.openBlock(), vue.createElementBlock("img", { src: $data.source }, null, 8 /* PROPS */, _hoisted_1$j))
1117
- }
1118
-
1119
- script$v.render = render$t;
1120
- script$v.__file = "src/components/image/Image.vue";
1121
-
1122
- var script$u = {
1123
- name: 'XInput',
1124
-
1125
- validator: withValidator(),
1126
-
1127
- props: {
1128
- ...withProps(),
1129
-
1130
- showPasswordToggle: {
1131
- type: Boolean,
1132
- default: true,
1133
- },
1134
-
1135
- label: {
1136
- type: String,
1137
- default: '',
1138
- },
1139
-
1140
- iconRight: {
1141
- type: Boolean,
1142
- default: false,
1143
- },
1144
-
1145
- dir: {
1146
- type: String,
1147
- default: 'ltr',
1148
- },
1149
-
1150
- max: {
1151
- type: Number,
1152
- default: null,
1153
- },
1154
-
1155
- maxlength: {
1156
- type: Number,
1157
- default: null,
1158
- },
1159
-
1160
- min: {
1161
- type: Number,
1162
- default: null,
1163
- },
1164
-
1165
- minlength: {
1166
- type: Number,
1167
- default: null,
1168
- },
1169
-
1170
- placeholder: {
1171
- type: String,
1172
- default: null,
1173
- },
1174
-
1175
- type: {
1176
- type: String,
1177
- default: 'text',
1178
- },
1179
-
1180
- inputClass: {
1181
- type: String,
1182
- default: '',
1183
- },
1184
- },
1185
-
1186
- emits: withEmits(),
1187
-
1188
- setup(props, { attrs, emit }) {
1189
- return {
1190
- ...useInputtable(props, { attrs, emit }),
1191
- }
1192
- },
1193
-
1194
- data() {
1195
- return {
1196
- currentType: this.type,
1197
- }
1198
- },
1199
-
1200
- methods: {
1201
- onChange(e) {
1202
- if (this.type === 'number') {
1203
- if (this.min !== null) {
1204
- if (e.target.value < this.min) e.target.value = this.min;
1205
- }
1206
-
1207
- if (this.max !== null) {
1208
- if (e.target.value > this.max) e.target.value = this.max;
1209
- }
1210
- }
1211
- },
1212
- togglePasswordVisibility() {
1213
- this.currentType = this.currentType === 'password' ? 'text' : 'password';
1214
- },
1215
- },
1216
- };
1217
-
1218
- const _hoisted_1$i = { class: "inline-block mb-1 relative" };
1219
- const _hoisted_2$d = ["textContent"];
1220
- const _hoisted_3$a = { class: "relative" };
1221
- const _hoisted_4$8 = ["disabled", "max", "maxlength", "min", "dir", "minlength", "name", "placeholder", "readonly", "type", "value"];
1222
- const _hoisted_5$4 = /*#__PURE__*/vue.createElementVNode("path", { d: "M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z" }, null, -1 /* HOISTED */);
1223
- const _hoisted_6$4 = /*#__PURE__*/vue.createElementVNode("circle", {
1224
- cx: "12",
1225
- cy: "12",
1226
- r: "3"
1227
- }, null, -1 /* HOISTED */);
1228
- const _hoisted_7$2 = /*#__PURE__*/vue.createElementVNode("path", { d: "M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24" }, null, -1 /* HOISTED */);
1229
- const _hoisted_8$2 = /*#__PURE__*/vue.createElementVNode("line", {
1230
- x1: "1",
1231
- y1: "1",
1232
- x2: "23",
1233
- y2: "23"
1234
- }, null, -1 /* HOISTED */);
1235
- const _hoisted_9$2 = ["textContent"];
1236
-
1237
- function render$s(_ctx, _cache, $props, $setup, $data, $options) {
1238
- return (vue.openBlock(), vue.createElementBlock("label", _hoisted_1$i, [
1239
- ($props.label)
1240
- ? (vue.openBlock(), vue.createElementBlock("p", {
1241
- key: 0,
1242
- class: vue.normalizeClass(["font-medium text-gray-800 dark:text-gray-200 mb-1", {
1243
- 'text-xs': _ctx.size === 'xs',
1244
- 'text-sm': _ctx.size === 'sm',
1245
- 'text-lg': _ctx.size === 'lg',
1246
- 'text-xl': _ctx.size === 'xl',
1247
- }]),
1248
- textContent: vue.toDisplayString($props.label)
1249
- }, null, 10 /* CLASS, PROPS */, _hoisted_2$d))
1250
- : vue.createCommentVNode("v-if", true),
1251
- vue.createElementVNode("div", _hoisted_3$a, [
1252
- (_ctx.$slots.icon)
1253
- ? (vue.openBlock(), vue.createElementBlock("span", {
1254
- key: 0,
1255
- class: vue.normalizeClass(["flex items-center w-5 h-5 text-gray-500 absolute my-auto inset-y-0", [{
1256
- 'ml-2 left-0': _ctx.$slots.icon && !$props.iconRight,
1257
- 'mr-2 right-0': _ctx.$slots.icon && $props.iconRight,
1258
- }]])
1259
- }, [
1260
- vue.renderSlot(_ctx.$slots, "icon")
1261
- ], 2 /* CLASS */))
1262
- : vue.createCommentVNode("v-if", true),
1263
- vue.createElementVNode("input", vue.mergeProps({
1264
- ref: "focusRef",
1265
- class: ["appearance-none block w-full text-gray-700 dark:text-gray-200 placeholder-gray-400 dark:placeholder-gray-600 rounded-form leading-tight focus:outline-none focus:border-primary-500 dark:focus:border-primary-500 transition-colors duration-150 ease-in-out border-gray-300 dark:border-gray-700", [
1266
- _ctx.disabled ? 'bg-gray-200 dark:bg-gray-800 cursor-not-allowed' : 'bg-white dark:bg-gray-900',
1267
- $props.type === 'password' ? 'pr-9' : (_ctx.flat ? '' : 'pr-4'),
1268
- _ctx.flat ? 'p-0 bg-transparent' : {
1269
- // shadow
1270
- 'border shadow': true,
1271
-
1272
- // size
1273
- 'py-1': _ctx.size === 'auto',
1274
- 'px-2 py-1 text-xs': _ctx.size === 'xs',
1275
- 'px-2 py-1 text-sm': _ctx.size === 'sm',
1276
- 'px-3 py-2': !['auto', 'xs', 'sm', 'lg', 'xl'].includes(_ctx.size),
1277
- 'px-4 py-3 text-lg': _ctx.size === 'lg',
1278
- 'px-6 py-6 text-xl': _ctx.size === 'xl',
1279
- },
1280
- {
1281
- '!pl-9': _ctx.$slots.icon && !$props.iconRight,
1282
- '!pr-9': _ctx.$slots.icon && $props.iconRight,
1283
- // error
1284
- 'border-error-500 focus:border-error-500 dark:focus:border-error-500': _ctx.errorInternal,
1285
- },
1286
- $props.inputClass,
1287
- ]],
1288
- disabled: _ctx.disabled,
1289
- max: $props.max,
1290
- maxlength: $props.maxlength,
1291
- min: $props.min,
1292
- dir: $props.dir,
1293
- minlength: $props.minlength,
1294
- name: _ctx.name,
1295
- placeholder: $props.placeholder,
1296
- readonly: _ctx.readonly,
1297
- type: $data.currentType,
1298
- value: _ctx.modelValue
1299
- }, vue.toHandlers(_ctx.inputListeners), {
1300
- onChange: _cache[0] || (_cache[0] = (...args) => ($options.onChange && $options.onChange(...args)))
1301
- }), null, 16 /* FULL_PROPS */, _hoisted_4$8),
1302
- ($props.type === 'password' && $props.showPasswordToggle)
1303
- ? (vue.openBlock(), vue.createElementBlock("svg", {
1304
- key: 1,
1305
- width: "24",
1306
- height: "24",
1307
- viewBox: "0 0 24 24",
1308
- stroke: "currentColor",
1309
- "stroke-linejoin": "round",
1310
- "stroke-linecap": "round",
1311
- fill: "none",
1312
- class: "text-gray-700 dark:text-gray-300 stroke-2 w-4 h-4 absolute my-auto mr-2 inset-y-0 right-1 cursor-pointer",
1313
- onClick: _cache[1] || (_cache[1] = $event => ($options.togglePasswordVisibility()))
1314
- }, [
1315
- ($data.currentType === 'password')
1316
- ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
1317
- _hoisted_5$4,
1318
- _hoisted_6$4
1319
- ], 64 /* STABLE_FRAGMENT */))
1320
- : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
1321
- _hoisted_7$2,
1322
- _hoisted_8$2
1323
- ], 64 /* STABLE_FRAGMENT */))
1324
- ]))
1325
- : vue.createCommentVNode("v-if", true)
1326
- ]),
1327
- (_ctx.errorInternal)
1328
- ? (vue.openBlock(), vue.createElementBlock("p", {
1329
- key: 1,
1330
- class: "text-sm text-error-500 mt-1",
1331
- textContent: vue.toDisplayString(_ctx.errorInternal)
1332
- }, null, 8 /* PROPS */, _hoisted_9$2))
1333
- : vue.createCommentVNode("v-if", true)
1334
- ]))
1335
- }
1336
-
1337
- script$u.render = render$s;
1338
- script$u.__file = "src/components/input/Input.vue";
1339
-
1340
- const validator$7 = {
1341
- color: [
1342
- 'error',
1343
- 'gray',
1344
- 'primary',
1345
- 'success',
1346
- 'warning',
1347
- ],
1348
- };
1349
-
1350
- var script$t = {
1351
- name: 'XLink',
1352
-
1353
- validator: validator$7,
1354
-
1355
- props: {
1356
- color: {
1357
- default: 'gray',
1358
- type: String,
1359
- validator: (value) => validator$7.color.includes(value),
1360
- },
1361
-
1362
- external: {
1363
- default: false,
1364
- type: Boolean,
1365
- },
1366
-
1367
- tag: {
1368
- default: 'a',
1369
- type: String,
1370
- },
1371
-
1372
- to: {
1373
- type: String,
1374
- default: undefined,
1375
- },
1376
-
1377
- underline: {
1378
- default: false,
1379
- type: Boolean,
1380
- },
1381
- },
1382
- };
1383
-
1384
- const _hoisted_1$h = {
1385
- key: 0,
1386
- class: "inline-flex items-center"
1387
- };
1388
- const _hoisted_2$c = /*#__PURE__*/vue.createElementVNode("svg", {
1389
- width: "24",
1390
- height: "24",
1391
- viewBox: "0 0 24 24",
1392
- stroke: "currentColor",
1393
- "stroke-linejoin": "round",
1394
- "stroke-linecap": "round",
1395
- fill: "none",
1396
- role: "presentation",
1397
- class: "stroke-2 w-4 h-4 ml"
1398
- }, [
1399
- /*#__PURE__*/vue.createElementVNode("line", {
1400
- x1: "7",
1401
- y1: "17",
1402
- x2: "17",
1403
- y2: "7"
1404
- }),
1405
- /*#__PURE__*/vue.createElementVNode("polyline", { points: "7 7 17 7 17 17" })
1406
- ], -1 /* HOISTED */);
1407
-
1408
- function render$r(_ctx, _cache, $props, $setup, $data, $options) {
1409
- return (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.to ? 'router-link' : $props.tag), {
1410
- to: $props.to,
1411
- class: vue.normalizeClass(["transition-colors duration-150 ease-in-out cursor-pointer", [
1412
- {
1413
- // color
1414
- 'hover:text-gray-600 dark:hover:text-gray-300': $props.color === 'gray',
1415
- 'text-primary-500 hover:text-primary-600': $props.color === 'primary',
1416
- 'text-error-500 hover:text-error-600': $props.color === 'error',
1417
- 'text-warning-500 hover:text-warning-600': $props.color === 'warning',
1418
- 'text-success-500 hover:text-success-600': $props.color === 'success',
1419
- // underline
1420
- 'underline': $props.underline
1421
- },
1422
- ]])
1423
- }, {
1424
- default: vue.withCtx(() => [
1425
- ($props.external)
1426
- ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_1$h, [
1427
- vue.renderSlot(_ctx.$slots, "default"),
1428
- _hoisted_2$c
1429
- ]))
1430
- : vue.renderSlot(_ctx.$slots, "default", { key: 1 })
1431
- ]),
1432
- _: 3 /* FORWARDED */
1433
- }, 8 /* PROPS */, ["to", "class"]))
1434
- }
1435
-
1436
- script$t.render = render$r;
1437
- script$t.__file = "src/components/link/Link.vue";
1438
-
1439
- var script$s = {
1440
- name: 'XModal',
1441
-
1442
- props: {
1443
- size: {
1444
- type: String,
1445
- default: null,
1446
- },
1447
- showClose: {
1448
- type: Boolean,
1449
- default: false,
1450
- },
1451
- },
1452
-
1453
- data() {
1454
- return {
1455
- isOpen: false,
1456
- }
1457
- },
1458
-
1459
- beforeMount() {
1460
- document.addEventListener('keydown', this.onKeydown);
1461
- },
1462
-
1463
- beforeUnmount() {
1464
- document.removeEventListener('keydown', this.onKeydown);
1465
- },
1466
-
1467
- methods: {
1468
- close() {
1469
- this.isOpen = false;
1470
- this.$emit('close');
1471
- },
1472
-
1473
- onKeydown(event) {
1474
- if (event.keyCode === 27 && this.isOpen) {
1475
- this.close();
1476
- }
1477
- },
1478
-
1479
- open() {
1480
- this.isOpen = true;
1481
- this.$emit('open');
1482
- },
1483
-
1484
- toggle() {
1485
- this.isOpen = !this.isOpen;
1486
- this.$emit('toggle', this.isOpen);
1487
- },
1488
- },
1489
- };
1490
-
1491
- const _hoisted_1$g = { class: "flex items-end sm:items-center justify-center min-h-full p-4 sm:p-6" };
1492
- const _hoisted_2$b = /*#__PURE__*/vue.createElementVNode("svg", {
1493
- width: "24",
1494
- height: "24",
1495
- viewBox: "0 0 24 24",
1496
- stroke: "currentColor",
1497
- "stroke-linejoin": "round",
1498
- "stroke-linecap": "round",
1499
- fill: "none",
1500
- role: "presentation",
1501
- class: "stroke-2 w-4 h-4"
1502
- }, [
1503
- /*#__PURE__*/vue.createElementVNode("line", {
1504
- x1: "18",
1505
- y1: "6",
1506
- x2: "6",
1507
- y2: "18"
1508
- }),
1509
- /*#__PURE__*/vue.createElementVNode("line", {
1510
- x1: "6",
1511
- y1: "6",
1512
- x2: "18",
1513
- y2: "18"
1514
- })
1515
- ], -1 /* HOISTED */);
1516
- const _hoisted_3$9 = [
1517
- _hoisted_2$b
1518
- ];
1519
-
1520
- function render$q(_ctx, _cache, $props, $setup, $data, $options) {
1521
- return (vue.openBlock(), vue.createElementBlock("div", {
1522
- class: vue.normalizeClass(["fixed z-40 inset-0 overflow-y-auto transition-all", [
1523
- $data.isOpen ? 'visible' : 'invisible ease-in duration-100'
1524
- ]])
1525
- }, [
1526
- vue.createElementVNode("div", {
1527
- class: vue.normalizeClass(["fixed inset-0 bg-gray-500 dark:bg-gray-600 transition-opacity", [
1528
- $data.isOpen ? 'ease-out duration-200 opacity-75' : 'ease-in duration-100 opacity-0',
1529
- ]]),
1530
- onClick: _cache[0] || (_cache[0] = vue.withModifiers($event => ($options.close()), ["self"]))
1531
- }, null, 2 /* CLASS */),
1532
- vue.createElementVNode("div", _hoisted_1$g, [
1533
- vue.createElementVNode("div", {
1534
- class: vue.normalizeClass(["relative inline-block bg-white dark:bg-gray-900 rounded-lg shadow-xl transform transition-all", [
1535
- {
1536
- 'w-full': $props.size === 'auto',
1537
- 'sm:max-w-xs w-full': $props.size === 'xs',
1538
- 'sm:max-w-sm w-full': $props.size === 'sm',
1539
- 'sm:max-w-lg w-full': !['auto', 'full', 'xs', 'sm', 'lg', 'xl'].includes($props.size),
1540
- 'sm:max-w-xl w-full': $props.size === 'lg',
1541
- 'sm:max-w-3xl w-full': $props.size === 'xl',
1542
- 'w-full': $props.size === 'full',
1543
- },
1544
- $data.isOpen ?
1545
- 'ease-out duration-200 opacity-100 translate-y-0 sm:scale-100'
1546
- : 'ease-in duration-200 opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95',
1547
- ]]),
1548
- role: "dialog",
1549
- "aria-modal": "true",
1550
- "aria-labelledby": "modal-headline"
1551
- }, [
1552
- vue.renderSlot(_ctx.$slots, "default"),
1553
- ($props.showClose)
1554
- ? (vue.openBlock(), vue.createElementBlock("div", {
1555
- key: 0,
1556
- class: "absolute rounded-md bg-white -top-4 -right-2 w-8 h-8 shadow-md flex items-center justify-center cursor-pointer",
1557
- onClick: _cache[1] || (_cache[1] = $event => ($options.close()))
1558
- }, _hoisted_3$9))
1559
- : vue.createCommentVNode("v-if", true)
1560
- ], 2 /* CLASS */)
1561
- ])
1562
- ], 2 /* CLASS */))
1563
- }
1564
-
1565
- script$s.render = render$q;
1566
- script$s.__file = "src/components/modal/Modal.vue";
1567
-
1568
- var script$r = {
1569
- name: 'XNote',
1570
-
1571
- props: {
1572
- filled: {
1573
- type: Boolean,
1574
- default: false,
1575
- },
1576
-
1577
- tag: {
1578
- type: String,
1579
- default: 'div',
1580
- },
1581
-
1582
- color: {
1583
- type: String,
1584
- default: 'primary',
1585
- },
1586
- },
1587
- };
1588
-
1589
- const _hoisted_1$f = {
1590
- key: 0,
1591
- width: "24",
1592
- height: "24",
1593
- viewBox: "0 0 24 24",
1594
- stroke: "currentColor",
1595
- "stroke-linejoin": "round",
1596
- "stroke-linecap": "round",
1597
- fill: "none",
1598
- role: "presentation",
1599
- class: "flex-none stroke-2 w-4 h-4 mt-1 mr-2"
1600
- };
1601
- const _hoisted_2$a = /*#__PURE__*/vue.createElementVNode("circle", {
1602
- cx: "12",
1603
- cy: "12",
1604
- r: "10"
1605
- }, null, -1 /* HOISTED */);
1606
- const _hoisted_3$8 = /*#__PURE__*/vue.createElementVNode("line", {
1607
- x1: "12",
1608
- y1: "8",
1609
- x2: "12",
1610
- y2: "12"
1611
- }, null, -1 /* HOISTED */);
1612
- const _hoisted_4$7 = /*#__PURE__*/vue.createElementVNode("line", {
1613
- x1: "12",
1614
- y1: "16",
1615
- x2: "12",
1616
- y2: "16"
1617
- }, null, -1 /* HOISTED */);
1618
- const _hoisted_5$3 = /*#__PURE__*/vue.createElementVNode("path", { d: "M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z" }, null, -1 /* HOISTED */);
1619
- const _hoisted_6$3 = /*#__PURE__*/vue.createElementVNode("path", { d: "M16 10L10.5 15L8 12.7273" }, null, -1 /* HOISTED */);
1620
- const _hoisted_7$1 = /*#__PURE__*/vue.createElementVNode("path", { d: "M7.86 2H16.14L22 7.86V16.14L16.14 22H7.86L2 16.14V7.86L7.86 2Z" }, null, -1 /* HOISTED */);
1621
- const _hoisted_8$1 = /*#__PURE__*/vue.createElementVNode("path", { d: "M9 9L15 15" }, null, -1 /* HOISTED */);
1622
- const _hoisted_9$1 = /*#__PURE__*/vue.createElementVNode("path", { d: "M15 9L9 15" }, null, -1 /* HOISTED */);
1623
- const _hoisted_10$1 = /*#__PURE__*/vue.createElementVNode("path", {
1624
- stroke: "none",
1625
- d: "M0 0h24v24H0z",
1626
- fill: "none"
1627
- }, null, -1 /* HOISTED */);
1628
- const _hoisted_11$1 = /*#__PURE__*/vue.createElementVNode("path", { d: "M12 9v2m0 4v.01" }, null, -1 /* HOISTED */);
1629
- const _hoisted_12 = /*#__PURE__*/vue.createElementVNode("path", { d: "M5 19h14a2 2 0 0 0 1.84 -2.75l-7.1 -12.25a2 2 0 0 0 -3.5 0l-7.1 12.25a2 2 0 0 0 1.75 2.75" }, null, -1 /* HOISTED */);
1630
- const _hoisted_13 = {
1631
- key: 1,
1632
- class: "flex-none pr-2"
1633
- };
1634
-
1635
- function render$p(_ctx, _cache, $props, $setup, $data, $options) {
1636
- return (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.tag), {
1637
- class: vue.normalizeClass(["flex rounded-md p-2", $props.filled ? [`bg-${$props.color}-500 text-${$props.color}-50`] : [`border text-${$props.color}-500 border-${$props.color}-500`]])
1638
- }, {
1639
- default: vue.withCtx(() => [
1640
- (!_ctx.$slots.icon)
1641
- ? (vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$f, [
1642
- ($props.color === 'primary')
1643
- ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
1644
- _hoisted_2$a,
1645
- _hoisted_3$8,
1646
- _hoisted_4$7
1647
- ], 64 /* STABLE_FRAGMENT */))
1648
- : vue.createCommentVNode("v-if", true),
1649
- ($props.color === 'success')
1650
- ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
1651
- _hoisted_5$3,
1652
- _hoisted_6$3
1653
- ], 64 /* STABLE_FRAGMENT */))
1654
- : vue.createCommentVNode("v-if", true),
1655
- ($props.color === 'error')
1656
- ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 2 }, [
1657
- _hoisted_7$1,
1658
- _hoisted_8$1,
1659
- _hoisted_9$1
1660
- ], 64 /* STABLE_FRAGMENT */))
1661
- : vue.createCommentVNode("v-if", true),
1662
- ($props.color === 'warning')
1663
- ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 3 }, [
1664
- _hoisted_10$1,
1665
- _hoisted_11$1,
1666
- _hoisted_12
1667
- ], 64 /* STABLE_FRAGMENT */))
1668
- : vue.createCommentVNode("v-if", true)
1669
- ]))
1670
- : vue.createCommentVNode("v-if", true),
1671
- (_ctx.$slots.icon)
1672
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_13, [
1673
- vue.renderSlot(_ctx.$slots, "icon")
1674
- ]))
1675
- : vue.createCommentVNode("v-if", true),
1676
- vue.renderSlot(_ctx.$slots, "default")
1677
- ]),
1678
- _: 3 /* FORWARDED */
1679
- }, 8 /* PROPS */, ["class"]))
1680
- }
1681
-
1682
- script$r.render = render$p;
1683
- script$r.__file = "src/components/note/Note.vue";
1684
-
1685
- var script$q = {
1686
- props: {
1687
- value: {
1688
- type: Number,
1689
- default: 0,
1690
- },
1691
- selected: {
1692
- type: Boolean,
1693
- default: false,
1694
- },
1695
- size: {
1696
- type: String,
1697
- default: null,
1698
- },
1699
- links: {
1700
- type: Boolean,
1701
- default: false,
1702
- },
1703
- },
1704
- };
1705
-
1706
- function render$o(_ctx, _cache, $props, $setup, $data, $options) {
1707
- const _component_x_button = vue.resolveComponent("x-button");
1708
-
1709
- return (vue.openBlock(), vue.createElementBlock("li", null, [
1710
- vue.createVNode(_component_x_button, {
1711
- to: $props.links ? `?page=${$props.value}` : null,
1712
- size: $props.size,
1713
- class: "mx-1 min-w-[32px]",
1714
- outlined: !$props.selected,
1715
- color: $props.selected ? 'primary' : 'none',
1716
- onClick: _cache[0] || (_cache[0] = $event => (!$props.selected ? _ctx.$emit('input', $props.value) : null))
1717
- }, {
1718
- default: vue.withCtx(() => [
1719
- vue.createTextVNode(vue.toDisplayString($props.value), 1 /* TEXT */)
1720
- ]),
1721
- _: 1 /* STABLE */
1722
- }, 8 /* PROPS */, ["to", "size", "outlined", "color"])
1723
- ]))
1724
- }
1725
-
1726
- script$q.render = render$o;
1727
- script$q.__file = "src/components/pagination/PaginationItem.vue";
1728
-
1729
- var script$p = {
1730
- components: {
1731
- XPaginationItem: script$q,
1732
- },
1733
- props: {
1734
- totalPages: {
1735
- type: Number,
1736
- default: 1,
1737
- },
1738
- modelValue: {
1739
- type: Number,
1740
- default: 1,
1741
- },
1742
- size: {
1743
- type: String,
1744
- default: null,
1745
- },
1746
- links: {
1747
- type: Boolean,
1748
- default: false,
1749
- },
1750
- },
1751
- computed: {
1752
- pages() {
1753
- if (this.totalPages === 3) return [2]
1754
- if (this.totalPages > 2) {
1755
- if (this.modelValue === 1 || this.modelValue === 2) return [2, 3]
1756
- if (this.modelValue === this.totalPages || this.modelValue === this.totalPages - 1) return [this.totalPages - 2, this.totalPages - 1]
1757
-
1758
- return [this.modelValue - 1, this.modelValue, this.modelValue + 1]
1759
- }
1760
-
1761
- return []
1762
- },
1763
- },
1764
- };
1765
-
1766
- const _hoisted_1$e = { class: "flex items-end" };
1767
- const _hoisted_2$9 = { key: 0 };
1768
- const _hoisted_3$7 = { key: 1 };
1769
-
1770
- function render$n(_ctx, _cache, $props, $setup, $data, $options) {
1771
- const _component_x_pagination_item = vue.resolveComponent("x-pagination-item");
1772
-
1773
- return (vue.openBlock(), vue.createElementBlock("ul", _hoisted_1$e, [
1774
- vue.createVNode(_component_x_pagination_item, {
1775
- value: 1,
1776
- links: $props.links,
1777
- size: $props.size,
1778
- selected: $props.modelValue === 1,
1779
- class: "mr-1",
1780
- onInput: _cache[0] || (_cache[0] = (value) => _ctx.$emit('update:modelValue', value))
1781
- }, null, 8 /* PROPS */, ["links", "size", "selected"]),
1782
- ($props.totalPages > 3 && $props.modelValue > 3)
1783
- ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$9, "..."))
1784
- : vue.createCommentVNode("v-if", true),
1785
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($options.pages, (i) => {
1786
- return (vue.openBlock(), vue.createBlock(_component_x_pagination_item, {
1787
- key: i,
1788
- class: "mx-1",
1789
- value: i,
1790
- links: $props.links,
1791
- size: $props.size,
1792
- selected: $props.modelValue === i,
1793
- onInput: _cache[1] || (_cache[1] = (value) => _ctx.$emit('update:modelValue', value))
1794
- }, null, 8 /* PROPS */, ["value", "links", "size", "selected"]))
1795
- }), 128 /* KEYED_FRAGMENT */)),
1796
- ($props.totalPages > 3 && $props.modelValue < $props.totalPages - 2)
1797
- ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$7, "..."))
1798
- : vue.createCommentVNode("v-if", true),
1799
- ($props.totalPages > 1)
1800
- ? (vue.openBlock(), vue.createBlock(_component_x_pagination_item, {
1801
- key: 2,
1802
- value: $props.totalPages,
1803
- links: $props.links,
1804
- size: $props.size,
1805
- class: "ml-1",
1806
- selected: $props.modelValue === $props.totalPages,
1807
- onInput: _cache[2] || (_cache[2] = (value) => _ctx.$emit('update:modelValue', value))
1808
- }, null, 8 /* PROPS */, ["value", "links", "size", "selected"]))
1809
- : vue.createCommentVNode("v-if", true)
1810
- ]))
1811
- }
1812
-
1813
- script$p.render = render$n;
1814
- script$p.__file = "src/components/pagination/Pagination.vue";
1815
-
1816
- const validator$6 = {
1817
- align: [
1818
- 'bottom',
1819
- 'center',
1820
- 'left',
1821
- 'right',
1822
- 'top',
1823
- ],
1824
- position: [
1825
- 'bottom',
1826
- 'left',
1827
- 'right',
1828
- 'top',
1829
- ],
1830
- };
1831
-
1832
- var script$o = {
1833
- name: 'XPopover',
1834
-
1835
- validator: validator$6,
1836
-
1837
- props: {
1838
- align: {
1839
- type: String,
1840
- default: 'center',
1841
- validator: (value) => validator$6.align.includes(value),
1842
- },
1843
-
1844
- hover: {
1845
- type: Boolean,
1846
- default: false,
1847
- },
1848
-
1849
- dismissible: {
1850
- type: Boolean,
1851
- default: true,
1852
- },
1853
-
1854
- position: {
1855
- default: 'bottom',
1856
- type: String,
1857
- validator: (value) => validator$6.position.includes(value),
1858
- },
1859
- },
1860
-
1861
- data() {
1862
- return {
1863
- isOpen: false,
1864
- }
1865
- },
1866
-
1867
- methods: {
1868
- close() {
1869
- this.isOpen = false;
1870
- this.$emit('close');
1871
- },
1872
-
1873
- open() {
1874
- this.isOpen = true;
1875
- this.$emit('open');
1876
- },
1877
-
1878
- toggle() {
1879
- this.isOpen = !this.isOpen;
1880
- this.$emit('toggle', this.isOpen);
1881
- },
1882
- },
1883
- };
1884
-
1885
- function render$m(_ctx, _cache, $props, $setup, $data, $options) {
1886
- return (vue.openBlock(), vue.createElementBlock("div", {
1887
- class: vue.normalizeClass(["inline-block relative xpopover", [
1888
- { 'hover': $props.hover,
1889
- 'is-open': $data.isOpen,
1890
- },
1891
- _ctx.$attrs.class,
1892
- _ctx.$attrs.staticClass,
1893
- ]])
1894
- }, [
1895
- vue.createElementVNode("div", {
1896
- class: "flex",
1897
- onClick: _cache[0] || (_cache[0] = $event => (!$props.hover ? $options.toggle() : null))
1898
- }, [
1899
- vue.renderSlot(_ctx.$slots, "default")
1900
- ]),
1901
- (!$props.hover)
1902
- ? (vue.openBlock(), vue.createElementBlock("div", {
1903
- key: 0,
1904
- class: vue.normalizeClass(["fixed inset-0 opacity-0 z-40", [$data.isOpen ? 'visible' : 'invisible']]),
1905
- onClick: _cache[1] || (_cache[1] = vue.withModifiers($event => ($options.close()), ["self"]))
1906
- }, null, 2 /* CLASS */))
1907
- : vue.createCommentVNode("v-if", true),
1908
- vue.createElementVNode("div", {
1909
- class: vue.normalizeClass(["absolute w-fit bottom-0 left-0 right-0 sm:p-0 transform transition-transform z-50 xpopover-content whitespace-nowrap max-w-xs", [
1910
- {
1911
- // align-left
1912
- 'left-0 right-auto': $props.align === 'left' && ['bottom', 'top'].includes($props.position),
1913
- // align-center
1914
- 'left-1/2 right-auto -translate-x-1/2': $props.align === 'center' && ['bottom', 'top'].includes($props.position),
1915
- // align-right
1916
- 'right-0 left-auto': $props.align === 'right' && ['bottom', 'top'].includes($props.position),
1917
- // align-top
1918
- 'top-0 bottom-auto': $props.align === 'top' && ['left', 'right'].includes($props.position),
1919
- // align-middle
1920
- '-translate-y-1/2 top-1/2 bottom-auto': $props.align === 'center' && ['left', 'right'].includes($props.position),
1921
- // align-bottom
1922
- 'bottom-0': $props.align === 'bottom' && ['left', 'right'].includes($props.position),
1923
-
1924
- // position-top
1925
- 'xpopover-top bottom-full pb-2': $props.position === 'top',
1926
- // position-right
1927
- 'xpopover-right left-full pl-2': $props.position === 'right',
1928
- // position-bottom
1929
- 'xpopover-bottom top-full bottom-0': $props.position === 'bottom',
1930
- // position-left
1931
- 'xpopover-left right-full left-auto pr-2': $props.position === 'left',
1932
- }
1933
- ]]),
1934
- onClick: _cache[2] || (_cache[2] = $event => ($props.dismissible ? $options.close() : null))
1935
- }, [
1936
- vue.renderSlot(_ctx.$slots, "content")
1937
- ], 2 /* CLASS */)
1938
- ], 2 /* CLASS */))
1939
- }
1940
-
1941
- function styleInject(css, ref) {
1942
- if ( ref === void 0 ) ref = {};
1943
- var insertAt = ref.insertAt;
1944
-
1945
- if (!css || typeof document === 'undefined') { return; }
1946
-
1947
- var head = document.head || document.getElementsByTagName('head')[0];
1948
- var style = document.createElement('style');
1949
- style.type = 'text/css';
1950
-
1951
- if (insertAt === 'top') {
1952
- if (head.firstChild) {
1953
- head.insertBefore(style, head.firstChild);
1954
- } else {
1955
- head.appendChild(style);
1956
- }
1957
- } else {
1958
- head.appendChild(style);
1959
- }
1960
-
1961
- if (style.styleSheet) {
1962
- style.styleSheet.cssText = css;
1963
- } else {
1964
- style.appendChild(document.createTextNode(css));
1965
- }
1966
- }
1967
-
1968
- var css_248z = "\n.xpopover-content {\n visibility: hidden;\n transition-duration: .1s;\n transition-timing-function: cubic-bezier(.4,0,1,1);\n}\n.xpopover-top {\n --tw-translate-y: 0.5rem;\n}\n.xpopover-right {\n --tw-translate-x: -0.5rem;\n}\n.xpopover-bottom {\n --tw-translate-y: -0.25rem;\n}\n.xpopover-left {\n --tw-translate-x: 0.5rem;\n}\n.xpopover.hover:hover .xpopover-content,\n.xpopover.is-open .xpopover-content {\n visibility: visible;\n transition-duration: .15s;\n transition-timing-function: cubic-bezier(0,0,.2,1);\n}\n.xpopover.hover:hover .xpopover-top,\n.xpopover.is-open .xpopover-top {\n --tw-translate-y: 0.25rem;\n}\n.xpopover.hover:hover .xpopover-right,\n.xpopover.is-open .xpopover-right {\n --tw-translate-x: 0px;\n}\n.xpopover.hover:hover .xpopover-bottom,\n.xpopover.is-open .xpopover-bottom {\n --tw-translate-y: 0.25rem;\n}\n.xpopover.hover:hover .xpopover-left,\n.xpopover.is-open .xpopover-left {\n --tw-translate-x: 0px;\n}\n";
1969
- styleInject(css_248z);
1970
-
1971
- script$o.render = render$m;
1972
- script$o.__file = "src/components/popover/Popover.vue";
1973
-
1974
- var script$n = {
1975
- name: 'XPopoverContainer',
1976
-
1977
- props: {
1978
- tag: {
1979
- default: 'div',
1980
- type: String,
1981
- },
1982
- },
1983
-
1984
- created() {
1985
- if (this.$parent.$options.name !== 'XPopover') {
1986
- this.$destroy();
1987
- throw new Error('PopoverContainer must be wrap with Popover')
1988
- }
1989
- },
1990
- };
1991
-
1992
- function render$l(_ctx, _cache, $props, $setup, $data, $options) {
1993
- return (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.tag), { class: "inline-block w-full bg-white dark:bg-gray-700 shadow-lg rounded-md border-t border border-gray-200 dark:border-gray-800" }, {
1994
- default: vue.withCtx(() => [
1995
- vue.renderSlot(_ctx.$slots, "default")
1996
- ]),
1997
- _: 3 /* FORWARDED */
1998
- }))
1999
- }
2000
-
2001
- script$n.render = render$l;
2002
- script$n.__file = "src/components/popover/PopoverContainer.vue";
2003
-
2004
- const validator$5 = {
2005
- variant: [
2006
- 'base',
2007
- 'error',
2008
- ],
2009
- };
2010
-
2011
- var script$m = {
2012
- name: 'XPopoverItem',
2013
-
2014
- validator: validator$5,
2015
-
2016
- props: {
2017
- disabled: {
2018
- default: false,
2019
- type: Boolean,
2020
- },
2021
-
2022
- variant: {
2023
- default: 'base',
2024
- type: String,
2025
- validator: (value) => validator$5.variant.includes(value),
2026
- },
2027
-
2028
- tag: {
2029
- default: 'div',
2030
- type: String,
2031
- },
2032
- },
2033
- };
2034
-
2035
- const _hoisted_1$d = {
2036
- key: 0,
2037
- class: "inline-flex items-center mr-2"
2038
- };
2039
- const _hoisted_2$8 = {
2040
- key: 1,
2041
- class: "inline-flex items-center ml-1"
2042
- };
2043
-
2044
- function render$k(_ctx, _cache, $props, $setup, $data, $options) {
2045
- return (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.tag), {
2046
- class: vue.normalizeClass(["px-2 py-1 block rounded transition-colors duration-100 ease-in-out whitespace-nowrap", [
2047
- {
2048
- 'flex items-center': _ctx.$slots.prefix || _ctx.$slots.suffix,
2049
- 'hover:bg-gray-100 dark:hover:bg-gray-800': $props.variant === 'base' && !$props.disabled,
2050
- 'hover:text-error-500 hover:bg-error-50': $props.variant === 'error' && !$props.disabled,
2051
- 'opacity-70': $props.disabled,
2052
- 'cursor-pointer': !$props.disabled,
2053
- },
2054
-
2055
- ]])
2056
- }, {
2057
- default: vue.withCtx(() => [
2058
- (_ctx.$slots.prefix)
2059
- ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_1$d, [
2060
- vue.renderSlot(_ctx.$slots, "prefix")
2061
- ]))
2062
- : vue.createCommentVNode("v-if", true),
2063
- vue.createElementVNode("span", {
2064
- class: vue.normalizeClass({ 'flex-1': _ctx.$slots.prefix || _ctx.$slots.suffix })
2065
- }, [
2066
- vue.renderSlot(_ctx.$slots, "default")
2067
- ], 2 /* CLASS */),
2068
- (_ctx.$slots.suffix)
2069
- ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$8, [
2070
- vue.renderSlot(_ctx.$slots, "suffix")
2071
- ]))
2072
- : vue.createCommentVNode("v-if", true)
2073
- ]),
2074
- _: 3 /* FORWARDED */
2075
- }, 8 /* PROPS */, ["class"]))
2076
- }
2077
-
2078
- script$m.render = render$k;
2079
- script$m.__file = "src/components/popover/PopoverItem.vue";
2080
-
2081
- const validator$4 = {
2082
- variant: [
2083
- 'bar',
2084
- 'circle',
2085
- 'score',
2086
- ],
2087
- };
2088
-
2089
- var script$l = {
2090
- name: 'XProgress',
2091
-
2092
- validator: validator$4,
2093
-
2094
- props: {
2095
- color: {
2096
- type: String,
2097
- default: 'primary',
2098
- },
2099
-
2100
- percentage: {
2101
- type: Number,
2102
- default: 0,
2103
- validator: (val) => val >= 0 && val <= 100,
2104
- },
2105
-
2106
- scoreLength: {
2107
- type: Number,
2108
- default: 3,
2109
- },
2110
-
2111
- tag: {
2112
- type: String,
2113
- default: 'div',
2114
- },
2115
-
2116
- variant: {
2117
- type: String,
2118
- default: 'bar',
2119
- validator: (value) => validator$4.variant.includes(value),
2120
- },
2121
- },
2122
-
2123
- computed: {
2124
- circleProgress() {
2125
- const progressLimit = 251;
2126
-
2127
- return (progressLimit / 100) * this.percentage
2128
- },
2129
- },
2130
-
2131
- methods: {
2132
- isScoreActive(item) {
2133
- if (this.percentage > (item - 1) * (100 / this.scoreLength)) return true
2134
-
2135
- return false
2136
- },
2137
- },
2138
- };
2139
-
2140
- const _hoisted_1$c = {
2141
- key: 0,
2142
- class: "rounded-lg bg-gray-200 dark:bg-gray-700 overflow-hidden"
2143
- };
2144
- const _hoisted_2$7 = {
2145
- key: 1,
2146
- class: "transform -rotate-90",
2147
- viewBox: "0 0 100 100"
2148
- };
2149
- const _hoisted_3$6 = /*#__PURE__*/vue.createElementVNode("circle", {
2150
- class: "text-gray-200 dark:text-gray-700",
2151
- stroke: "currentColor",
2152
- "stroke-linejoin": "round",
2153
- "stroke-linecap": "round",
2154
- "stroke-width": "4",
2155
- fill: "none",
2156
- cx: "50",
2157
- cy: "50",
2158
- r: "40"
2159
- }, null, -1 /* HOISTED */);
2160
- const _hoisted_4$6 = {
2161
- key: 2,
2162
- class: "space-x-1 inline-block"
2163
- };
2164
-
2165
- function render$j(_ctx, _cache, $props, $setup, $data, $options) {
2166
- return (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.tag), { class: "w-full" }, {
2167
- default: vue.withCtx(() => [
2168
- ($props.variant === 'bar')
2169
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$c, [
2170
- vue.createElementVNode("div", {
2171
- class: vue.normalizeClass(["h-2 rounded-lg transition-all duration-200", [`bg-${$props.color}-500`]]),
2172
- style: vue.normalizeStyle({
2173
- width: `${$props.percentage}%`,
2174
- })
2175
- }, null, 6 /* CLASS, STYLE */)
2176
- ]))
2177
- : vue.createCommentVNode("v-if", true),
2178
- ($props.variant === 'circle')
2179
- ? (vue.openBlock(), vue.createElementBlock("svg", _hoisted_2$7, [
2180
- _hoisted_3$6,
2181
- vue.createElementVNode("circle", {
2182
- class: vue.normalizeClass(["transition-all duration-200", [`text-${$props.color}-500`]]),
2183
- style: vue.normalizeStyle({ strokeDasharray: `${$options.circleProgress} 252` }),
2184
- stroke: "currentColor",
2185
- "stroke-linejoin": "round",
2186
- "stroke-linecap": "round",
2187
- "stroke-width": "4",
2188
- fill: "none",
2189
- cx: "50",
2190
- cy: "50",
2191
- r: "40"
2192
- }, null, 6 /* CLASS, STYLE */)
2193
- ]))
2194
- : vue.createCommentVNode("v-if", true),
2195
- ($props.variant === 'score')
2196
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$6, [
2197
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($props.scoreLength, (index) => {
2198
- return (vue.openBlock(), vue.createElementBlock("div", {
2199
- key: index,
2200
- class: vue.normalizeClass(["rounded-sm h-2 w-3 inline-block", $options.isScoreActive(index) ? [`bg-${$props.color}-500`]: ['bg-gray-200 dark:bg-gray-700']])
2201
- }, null, 2 /* CLASS */))
2202
- }), 128 /* KEYED_FRAGMENT */))
2203
- ]))
2204
- : vue.createCommentVNode("v-if", true)
2205
- ]),
2206
- _: 1 /* STABLE */
2207
- }))
2208
- }
2209
-
2210
- script$l.render = render$j;
2211
- script$l.__file = "src/components/progress/Progress.vue";
2212
-
2213
- var script$k = {
2214
- name: 'XRadio',
2215
- components: {
2216
- XSpinner: script$E,
2217
- },
2218
-
2219
- validator: {
2220
- ...withValidator(),
2221
- },
2222
-
2223
- props: {
2224
- ...withProps(),
2225
- bordered: {
2226
- type: Boolean,
2227
- default: false,
2228
- },
2229
-
2230
- value: {
2231
- type: [String, Number, Boolean, Function, Object, Array],
2232
- default: null,
2233
- },
2234
-
2235
- label: {
2236
- type: String,
2237
- default: null,
2238
- },
2239
-
2240
- glow: {
2241
- type: Boolean,
2242
- default: false,
2243
- },
2244
- },
2245
-
2246
- emits: withEmits(false),
2247
-
2248
- setup(props, { attrs, emit }) {
2249
- return {
2250
- ...useInputtable(props, { attrs, emit, useListeners: false }),
2251
- }
2252
- },
2253
-
2254
- computed: {
2255
- selected: {
2256
- get() {
2257
- return this.value === this.modelValue
2258
- },
2259
-
2260
- set() {
2261
- this.$emit('update:modelValue', this.value);
2262
- },
2263
- },
2264
- },
2265
- };
2266
-
2267
- const _hoisted_1$b = ["aria-checked", "aria-disabled"];
2268
- const _hoisted_2$6 = ["disabled", "name", "required", "value"];
2269
- const _hoisted_3$5 = /*#__PURE__*/vue.createElementVNode("path", { d: "M0 11l2-2 5 5L18 3l2 2L7 18z" }, null, -1 /* HOISTED */);
2270
- const _hoisted_4$5 = [
2271
- _hoisted_3$5
2272
- ];
2273
- const _hoisted_5$2 = ["textContent"];
2274
- const _hoisted_6$2 = ["textContent"];
2275
-
2276
- function render$i(_ctx, _cache, $props, $setup, $data, $options) {
2277
- const _component_x_spinner = vue.resolveComponent("x-spinner");
2278
-
2279
- return (vue.openBlock(), vue.createElementBlock("label", {
2280
- ref: "focusRef",
2281
- class: vue.normalizeClass(["inline-block mb-1 relative cursor-pointer focus:outline-none", {
2282
- ['rounded border p-2 hover:border-gray-500 dark:hover:border-gray-500 transition-colors duration-150 ease-in-out']: $props.bordered,
2283
- [`border-gray-300 dark:border-gray-700`]: $props.bordered && !$options.selected,
2284
- [`border-${_ctx.color}-500 dark:border-${_ctx.color}-500`]: $props.bordered && $options.selected && !_ctx.disabled,
2285
- }]),
2286
- "aria-checked": $options.selected ? 'true' : 'false',
2287
- "aria-disabled": _ctx.disabled ? 'true' : null,
2288
- tabindex: 0,
2289
- onKeypress: _cache[1] || (_cache[1] = vue.withKeys(vue.withModifiers($event => (_ctx.$emit('update:modelValue', $props.value)), ["prevent","stop"]), ["enter","space"]))
2290
- }, [
2291
- vue.createElementVNode("div", {
2292
- class: vue.normalizeClass(["flex items-center", { 'cursor-not-allowed': _ctx.disabled }])
2293
- }, [
2294
- vue.withDirectives(vue.createElementVNode("input", {
2295
- "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => (($options.selected) = $event)),
2296
- type: "radio",
2297
- class: "invisible absolute",
2298
- disabled: _ctx.disabled || _ctx.loading,
2299
- name: _ctx.name,
2300
- required: _ctx.required,
2301
- value: _ctx.modelValue
2302
- }, null, 8 /* PROPS */, _hoisted_2$6), [
2303
- [vue.vModelRadio, $options.selected]
2304
- ]),
2305
- vue.createElementVNode("div", {
2306
- class: vue.normalizeClass(["rounded-full flex justify-center items-center flex-shrink-0", [
2307
- {
2308
- // shadow
2309
- 'shadow': !_ctx.flat && !_ctx.loading,
2310
- [`shadow-lg shadow-${_ctx.color}-500/50`]: !_ctx.flat && $props.glow && $options.selected,
2311
-
2312
- 'h-4 w-4': _ctx.size === 'sm' || _ctx.size === 'xs',
2313
- 'h-5 w-5': !['xs', 'sm', 'xl'].includes(_ctx.size),
2314
- 'h-6 w-6': _ctx.size === 'xl',
2315
- },
2316
- _ctx.disabled ? {
2317
- 'bg-gray-500 border-gray-600 dark:border-gray-400': $options.selected,
2318
- 'bg-gray-200 border-gray-300 dark:border-gray-700': !$options.selected,
2319
- } :
2320
- {
2321
- [`bg-${_ctx.color}-500 border-${_ctx.color}-500`]: $options.selected && !_ctx.loading,
2322
- 'border bg-white dark:bg-gray-900 border-gray-300 dark:border-gray-700': !$options.selected && !_ctx.loading,
2323
- }
2324
- ]])
2325
- }, [
2326
- (_ctx.loading)
2327
- ? (vue.openBlock(), vue.createBlock(_component_x_spinner, {
2328
- key: 0,
2329
- size: _ctx.size,
2330
- class: "absolute"
2331
- }, null, 8 /* PROPS */, ["size"]))
2332
- : (vue.openBlock(), vue.createElementBlock("svg", {
2333
- key: 1,
2334
- class: vue.normalizeClass(["fill-current text-gray-100", {
2335
- 'opacity-0': !$options.selected,
2336
- 'h-2 w-2': _ctx.size === 'sm' || _ctx.size === 'xs',
2337
- 'h-3 w-3': !['xs', 'sm', 'xl'].includes(_ctx.size),
2338
- 'h-4 w-4': _ctx.size === 'xl',
2339
- }]),
2340
- viewBox: "0 0 20 20"
2341
- }, _hoisted_4$5, 2 /* CLASS */))
2342
- ], 2 /* CLASS */),
2343
- ($props.label)
2344
- ? (vue.openBlock(), vue.createElementBlock("span", {
2345
- key: 0,
2346
- class: vue.normalizeClass(["font-medium text-gray-800 dark:text-gray-200 pl-2", {
2347
- 'text-xs': _ctx.size === 'xs',
2348
- 'text-sm': _ctx.size === 'sm',
2349
- 'text-lg': _ctx.size === 'lg',
2350
- 'text-xl': _ctx.size === 'xl',
2351
- }]),
2352
- textContent: vue.toDisplayString($props.label)
2353
- }, null, 10 /* CLASS, PROPS */, _hoisted_5$2))
2354
- : vue.createCommentVNode("v-if", true)
2355
- ], 2 /* CLASS */),
2356
- (_ctx.$slots.default)
2357
- ? (vue.openBlock(), vue.createElementBlock("div", {
2358
- key: 0,
2359
- class: vue.normalizeClass({
2360
- 'text-xs pl-6': _ctx.size === 'xs',
2361
- 'text-sm pl-6': _ctx.size === 'sm',
2362
- 'pl-7': !['xs', 'sm', 'lg', 'xl'].includes(_ctx.size),
2363
- 'text-lg pl-7': _ctx.size === 'lg',
2364
- 'text-lg pl-8': _ctx.size === 'xl',
2365
- })
2366
- }, [
2367
- vue.renderSlot(_ctx.$slots, "default")
2368
- ], 2 /* CLASS */))
2369
- : vue.createCommentVNode("v-if", true),
2370
- (_ctx.errorInternal)
2371
- ? (vue.openBlock(), vue.createElementBlock("p", {
2372
- key: 1,
2373
- class: "text-sm text-error-500 mt-1",
2374
- textContent: vue.toDisplayString(_ctx.errorInternal)
2375
- }, null, 8 /* PROPS */, _hoisted_6$2))
2376
- : vue.createCommentVNode("v-if", true)
2377
- ], 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_1$b))
2378
- }
2379
-
2380
- script$k.render = render$i;
2381
- script$k.__file = "src/components/radio/Radio.vue";
2382
-
2383
- var script$j = {
2384
- name: 'XSelect',
2385
- components: {
2386
- XSpinner: script$E,
2387
- },
2388
-
2389
- validator: {
2390
- ...withValidator(),
2391
- },
2392
-
2393
- props: {
2394
- ...withProps(),
2395
-
2396
- placeholder: {
2397
- type: String,
2398
- default: null,
2399
- },
2400
-
2401
- flat: {
2402
- type: Boolean,
2403
- default: false,
2404
- },
2405
-
2406
- label: {
2407
- type: String,
2408
- default: null,
2409
- },
2410
-
2411
- options: {
2412
- type: Array,
2413
- default: null,
2414
- },
2415
- },
2416
-
2417
- emits: withEmits(false),
2418
-
2419
- setup(props, { attrs, emit }) {
2420
- return {
2421
- ...useInputtable(props, { attrs, emit, useListeners: false }),
2422
- }
2423
- },
2424
-
2425
- computed: {
2426
- selected: {
2427
- get() {
2428
- return this.modelValue
2429
- },
2430
-
2431
- set(val) {
2432
- this.$emit('update:modelValue', val);
2433
- },
2434
- },
2435
- },
2436
- };
2437
-
2438
- const _hoisted_1$a = { class: "inline-block mb-1 relative pb-2" };
2439
- const _hoisted_2$5 = ["textContent"];
2440
- const _hoisted_3$4 = { class: "relative" };
2441
- const _hoisted_4$4 = ["disabled", "name", "readonly", "value"];
2442
- const _hoisted_5$1 = {
2443
- key: 0,
2444
- disabled: "",
2445
- value: ""
2446
- };
2447
- const _hoisted_6$1 = ["value", "disabled"];
2448
- const _hoisted_7 = { class: "pointer-events-none absolute inset-y-0 right-0 flex items-center px-2" };
2449
- const _hoisted_8 = /*#__PURE__*/vue.createElementVNode("path", { d: "M18 8L12 2L6 8" }, null, -1 /* HOISTED */);
2450
- const _hoisted_9 = /*#__PURE__*/vue.createElementVNode("path", { d: "M18 16L12 22L6 16" }, null, -1 /* HOISTED */);
2451
- const _hoisted_10 = [
2452
- _hoisted_8,
2453
- _hoisted_9
2454
- ];
2455
- const _hoisted_11 = ["textContent"];
2456
-
2457
- function render$h(_ctx, _cache, $props, $setup, $data, $options) {
2458
- const _component_x_spinner = vue.resolveComponent("x-spinner");
2459
-
2460
- return (vue.openBlock(), vue.createElementBlock("label", _hoisted_1$a, [
2461
- ($props.label)
2462
- ? (vue.openBlock(), vue.createElementBlock("p", {
2463
- key: 0,
2464
- class: vue.normalizeClass(["font-medium text-gray-800 dark:text-gray-200 mb-1", {
2465
- 'text-xs': _ctx.size === 'xs',
2466
- 'text-sm': _ctx.size === 'sm',
2467
- 'text-lg': _ctx.size === 'lg',
2468
- 'text-xl': _ctx.size === 'xl',
2469
- }]),
2470
- textContent: vue.toDisplayString($props.label)
2471
- }, null, 10 /* CLASS, PROPS */, _hoisted_2$5))
2472
- : vue.createCommentVNode("v-if", true),
2473
- vue.createElementVNode("div", _hoisted_3$4, [
2474
- vue.withDirectives(vue.createElementVNode("select", vue.mergeProps({
2475
- ref: "focusRef",
2476
- "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => (($options.selected) = $event)),
2477
- class: ["block appearance-none w-full border border-gray-300 dark:border-gray-700 pr-8 rounded-form leading-tight focus:outline-none focus:border-primary-500 dark:focus:border-primary-500 transition-colors duration-150 ease-in-out", [
2478
- _ctx.disabled
2479
- ? 'bg-gray-200 dark:bg-gray-800 text-gray-800 dark:text-gray-200 cursor-not-allowed'
2480
- : 'bg-white dark:bg-gray-900',
2481
- {
2482
- // shadow
2483
- 'shadow': !$props.flat,
2484
-
2485
- // size
2486
- 'py-1': _ctx.size === 'auto',
2487
- 'px-2 py-1 text-xs': _ctx.size === 'xs',
2488
- 'px-2 py-1 text-sm': _ctx.size === 'sm',
2489
- 'px-3 py-2': !['auto', 'xs', 'sm', 'lg', 'xl'].includes(_ctx.size),
2490
- 'px-4 py-3 text-lg': _ctx.size === 'lg',
2491
- 'px-6 py-6 text-xl': _ctx.size === 'xl',
2492
- },
2493
- {
2494
- 'text-gray-400 dark:text-gray-500': _ctx.modelValue === '' || _ctx.modelValue === null,
2495
-
2496
- // error
2497
- 'border-error-500 focus:border-error-500 dark:focus:border-error-500': _ctx.errorInternal,
2498
- },
2499
- ]],
2500
- disabled: _ctx.disabled || _ctx.loading,
2501
- name: _ctx.name,
2502
- readonly: _ctx.readonly,
2503
- value: _ctx.modelValue
2504
- }, vue.toHandlers(_ctx.inputListeners)), [
2505
- ($props.placeholder)
2506
- ? (vue.openBlock(), vue.createElementBlock("option", _hoisted_5$1, vue.toDisplayString($props.placeholder), 1 /* TEXT */))
2507
- : vue.createCommentVNode("v-if", true),
2508
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($props.options, (option, index) => {
2509
- return (vue.openBlock(), vue.createElementBlock("option", {
2510
- key: index,
2511
- value: option.value,
2512
- disabled: option.disabled
2513
- }, vue.toDisplayString(option.label), 9 /* TEXT, PROPS */, _hoisted_6$1))
2514
- }), 128 /* KEYED_FRAGMENT */)),
2515
- vue.renderSlot(_ctx.$slots, "default")
2516
- ], 16 /* FULL_PROPS */, _hoisted_4$4), [
2517
- [vue.vModelSelect, $options.selected]
2518
- ]),
2519
- vue.createElementVNode("div", _hoisted_7, [
2520
- (_ctx.loading)
2521
- ? (vue.openBlock(), vue.createBlock(_component_x_spinner, {
2522
- key: 0,
2523
- size: _ctx.size
2524
- }, null, 8 /* PROPS */, ["size"]))
2525
- : (vue.openBlock(), vue.createElementBlock("svg", {
2526
- key: 1,
2527
- class: vue.normalizeClass(["stroke-2", [
2528
- _ctx.disabled ? 'text-gray-600 dark:text-gray-400': 'text-gray-700 dark:text-gray-300',
2529
- {
2530
- 'h-3 w-3': _ctx.size === 'sm' || _ctx.size === 'xs',
2531
- 'h-4 w-4': !['xs', 'sm', 'xl'].includes(_ctx.size),
2532
- 'h-5 w-5': _ctx.size === 'xl',
2533
- }
2534
- ]]),
2535
- viewBox: "0 0 24 24",
2536
- stroke: "currentColor",
2537
- "stroke-linejoin": "round",
2538
- "stroke-linecap": "round",
2539
- fill: "none"
2540
- }, _hoisted_10, 2 /* CLASS */))
2541
- ])
2542
- ]),
2543
- (_ctx.errorInternal)
2544
- ? (vue.openBlock(), vue.createElementBlock("p", {
2545
- key: 1,
2546
- class: "text-sm text-error-500 mt-1",
2547
- textContent: vue.toDisplayString(_ctx.errorInternal)
2548
- }, null, 8 /* PROPS */, _hoisted_11))
2549
- : vue.createCommentVNode("v-if", true)
2550
- ]))
2551
- }
2552
-
2553
- script$j.render = render$h;
2554
- script$j.__file = "src/components/select/Select.vue";
2555
-
2556
- const _hoisted_1$9 = { class: "flex-grow" };
2557
-
2558
- function render$g(_ctx, _cache) {
2559
- return (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$9))
2560
- }
2561
-
2562
- const script$h = {};
2563
-
2564
-
2565
- script$h.render = render$g;
2566
- script$h.__file = "src/components/spacer/Spacer.vue";
2567
- var script$i = script$h;
2568
-
2569
- var script$g = {
2570
- name: 'XSkeleton',
2571
-
2572
- props: {
2573
- tag: {
2574
- type: String,
2575
- default: 'div',
2576
- },
2577
- },
2578
- };
2579
-
2580
- const _hoisted_1$8 = /*#__PURE__*/vue.createTextVNode(" ​ ");
2581
-
2582
- function render$f(_ctx, _cache, $props, $setup, $data, $options) {
2583
- return (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.tag), { class: "animate-pulse bg-gray-300 dark:bg-gray-600 rounded-md" }, {
2584
- default: vue.withCtx(() => [
2585
- _hoisted_1$8
2586
- ]),
2587
- _: 1 /* STABLE */
2588
- }))
2589
- }
2590
-
2591
- script$g.render = render$f;
2592
- script$g.__file = "src/components/skeleton/Skeleton.vue";
2593
-
2594
- var script$f = {
2595
- name: 'XStatusDot',
2596
-
2597
- props: {
2598
- animate: {
2599
- type: Boolean,
2600
- default: false,
2601
- },
2602
-
2603
- color: {
2604
- type: String,
2605
- default: 'primary',
2606
- },
2607
-
2608
- tag: {
2609
- type: String,
2610
- default: 'div',
2611
- },
2612
- },
2613
- };
2614
-
2615
- function render$e(_ctx, _cache, $props, $setup, $data, $options) {
2616
- return (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.tag), { class: "inline-block relative" }, {
2617
- default: vue.withCtx(() => [
2618
- vue.renderSlot(_ctx.$slots, "default"),
2619
- ($props.animate)
2620
- ? (vue.openBlock(), vue.createElementBlock("div", {
2621
- key: 0,
2622
- class: vue.normalizeClass(["animate-ping opacity-75 absolute -top-0.5 -right-0.5 rounded-full h-3 w-3 z-10", [`bg-${$props.color}-500`]])
2623
- }, null, 2 /* CLASS */))
2624
- : vue.createCommentVNode("v-if", true),
2625
- vue.createElementVNode("div", {
2626
- class: vue.normalizeClass(["absolute -top-0.5 -right-0.5 rounded-full h-3 w-3 z-10", [`bg-${$props.color}-500`]])
2627
- }, null, 2 /* CLASS */)
2628
- ]),
2629
- _: 3 /* FORWARDED */
2630
- }))
2631
- }
2632
-
2633
- script$f.render = render$e;
2634
- script$f.__file = "src/components/status/StatusDot.vue";
2635
-
2636
- var script$e = {
2637
- name: 'XTableHead',
2638
- };
2639
-
2640
- const _hoisted_1$7 = { class: "align-bottom" };
2641
- const _hoisted_2$4 = { class: "text-sm text-gray-700 dark:text-gray-400" };
2642
-
2643
- function render$d(_ctx, _cache, $props, $setup, $data, $options) {
2644
- return (vue.openBlock(), vue.createElementBlock("thead", _hoisted_1$7, [
2645
- vue.createElementVNode("tr", _hoisted_2$4, [
2646
- vue.renderSlot(_ctx.$slots, "default")
2647
- ])
2648
- ]))
2649
- }
2650
-
2651
- script$e.render = render$d;
2652
- script$e.__file = "src/components/table/TableHead.vue";
2653
-
2654
- const validator$3 = {
2655
- sort: [
2656
- null,
2657
- 1,
2658
- -1,
2659
- ],
2660
- textAlign: [
2661
- null,
2662
- 'left',
2663
- 'center',
2664
- 'right',
2665
- 'justify',
2666
- ],
2667
- };
2668
-
2669
- var script$d = {
2670
- name: 'XTableHeader',
2671
-
2672
- validator: validator$3,
2673
-
2674
- props: {
2675
- sort: {
2676
- type: [Number, Boolean],
2677
- default: null,
2678
- validator: (value) => validator$3.sort.includes(value),
2679
- },
2680
-
2681
- sortable: {
2682
- type: Boolean,
2683
- default: false,
2684
- },
2685
-
2686
- textAlign: {
2687
- type: String,
2688
- default: 'left',
2689
- validator: (value) => validator$3.textAlign.includes(value),
2690
- },
2691
-
2692
- stickyHeader: {
2693
- type: Boolean,
2694
- default: false,
2695
- },
2696
- },
2697
- };
2698
-
2699
- const _hoisted_1$6 = {
2700
- key: 0,
2701
- class: "flex items-center"
2702
- };
2703
- const _hoisted_2$3 = {
2704
- key: 0,
2705
- width: "24",
2706
- height: "24",
2707
- viewBox: "0 0 24 24",
2708
- stroke: "currentColor",
2709
- "stroke-linejoin": "round",
2710
- "stroke-linecap": "round",
2711
- fill: "none",
2712
- role: "presentation",
2713
- class: "inline-block stroke-2 w-3 h-3 ml-0.5"
2714
- };
2715
- const _hoisted_3$3 = /*#__PURE__*/vue.createElementVNode("line", {
2716
- x1: "12",
2717
- y1: "5",
2718
- x2: "12",
2719
- y2: "19"
2720
- }, null, -1 /* HOISTED */);
2721
- const _hoisted_4$3 = /*#__PURE__*/vue.createElementVNode("polyline", { points: "19 12 12 19 5 12" }, null, -1 /* HOISTED */);
2722
- const _hoisted_5 = /*#__PURE__*/vue.createElementVNode("line", {
2723
- x1: "12",
2724
- y1: "19",
2725
- x2: "12",
2726
- y2: "5"
2727
- }, null, -1 /* HOISTED */);
2728
- const _hoisted_6 = /*#__PURE__*/vue.createElementVNode("polyline", { points: "5 12 12 5 19 12" }, null, -1 /* HOISTED */);
2729
-
2730
- function render$c(_ctx, _cache, $props, $setup, $data, $options) {
2731
- return (vue.openBlock(), vue.createElementBlock("th", {
2732
- class: vue.normalizeClass(["py-2 bg-gray-50 dark:bg-gray-800 font-medium tracking-wide uppercase text-xs pr-1 last:pr-0", [
2733
- {
2734
- //sort
2735
- 'cursor-pointer hover:text-gray-800 dark:hover:text-gray-300 transition-colors duration-150 ease-in-out': $props.sortable,
2736
- //stickyHeader
2737
- 'sticky top-0': $props.stickyHeader,
2738
- // textAlign
2739
- 'text-left': $props.textAlign === 'left',
2740
- 'text-center': $props.textAlign === 'center',
2741
- 'text-right': $props.textAlign === 'right',
2742
- 'text-justify': $props.textAlign === 'justify',
2743
- },
2744
- ]])
2745
- }, [
2746
- ($props.sortable)
2747
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$6, [
2748
- vue.renderSlot(_ctx.$slots, "default"),
2749
- ([1, -1].includes($props.sort))
2750
- ? (vue.openBlock(), vue.createElementBlock("svg", _hoisted_2$3, [
2751
- ($props.sort === -1)
2752
- ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
2753
- _hoisted_3$3,
2754
- _hoisted_4$3
2755
- ], 64 /* STABLE_FRAGMENT */))
2756
- : vue.createCommentVNode("v-if", true),
2757
- ($props.sort === 1)
2758
- ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
2759
- _hoisted_5,
2760
- _hoisted_6
2761
- ], 64 /* STABLE_FRAGMENT */))
2762
- : vue.createCommentVNode("v-if", true)
2763
- ]))
2764
- : vue.createCommentVNode("v-if", true)
2765
- ]))
2766
- : vue.renderSlot(_ctx.$slots, "default", { key: 1 })
2767
- ], 2 /* CLASS */))
2768
- }
2769
-
2770
- script$d.render = render$c;
2771
- script$d.__file = "src/components/table/TableHeader.vue";
2772
-
2773
- var script$c = {
2774
- name: 'XTableBody',
2775
- };
2776
-
2777
- function render$b(_ctx, _cache, $props, $setup, $data, $options) {
2778
- return (vue.openBlock(), vue.createElementBlock("tbody", null, [
2779
- vue.renderSlot(_ctx.$slots, "default")
2780
- ]))
2781
- }
2782
-
2783
- script$c.render = render$b;
2784
- script$c.__file = "src/components/table/TableBody.vue";
2785
-
2786
- const validator$2 = {
2787
- verticalAlign: [
2788
- 'baseline',
2789
- 'bottom',
2790
- 'middle',
2791
- 'text-bottom',
2792
- 'text-top',
2793
- 'top',
2794
- ],
2795
- };
2796
-
2797
- var script$b = {
2798
- name: 'XTableRow',
2799
-
2800
- validator: validator$2,
2801
-
2802
- props: {
2803
- clickable: {
2804
- type: Boolean,
2805
- default: false,
2806
- },
2807
-
2808
- verticalAlign: {
2809
- type: String,
2810
- default: 'top',
2811
- validator: (value) => validator$2.verticalAlign.includes(value),
2812
- },
2813
- },
2814
- };
2815
-
2816
- function render$a(_ctx, _cache, $props, $setup, $data, $options) {
2817
- return (vue.openBlock(), vue.createElementBlock("tr", {
2818
- class: vue.normalizeClass(["border-b border-gray-200 dark:border-gray-700", [
2819
- {
2820
- 'hover:bg-gray-50 dark:hover:bg-gray-700 cursor-pointer': $props.clickable,
2821
- // vertical-align
2822
- 'align-baseline': $props.verticalAlign === 'baseline',
2823
- 'align-bottom': $props.verticalAlign === 'bottom',
2824
- 'align-middle': $props.verticalAlign === 'middle',
2825
- 'align-text-bottom': $props.verticalAlign === 'text-bottom',
2826
- 'align-text-top': $props.verticalAlign === 'text-top',
2827
- 'align-top': $props.verticalAlign === 'top',
2828
- },
2829
- ]])
2830
- }, [
2831
- vue.renderSlot(_ctx.$slots, "default")
2832
- ], 2 /* CLASS */))
2833
- }
2834
-
2835
- script$b.render = render$a;
2836
- script$b.__file = "src/components/table/TableRow.vue";
2837
-
2838
- const validator$1 = {
2839
- textAlign: [
2840
- null,
2841
- 'left',
2842
- 'center',
2843
- 'right',
2844
- 'justify',
2845
- ],
2846
- verticalAlign: [
2847
- null,
2848
- 'baseline',
2849
- 'bottom',
2850
- 'middle',
2851
- 'text-bottom',
2852
- 'text-top',
2853
- 'top',
2854
- ],
2855
- };
2856
-
2857
- var script$a = {
2858
- name: 'XTableCell',
2859
-
2860
- validator: validator$1,
2861
-
2862
- props: {
2863
- textAlign: {
2864
- default: null,
2865
- type: String,
2866
- validator: (value) => validator$1.textAlign.includes(value),
2867
- },
2868
-
2869
- truncate: {
2870
- default: false,
2871
- type: Boolean,
2872
- },
2873
-
2874
- dense: {
2875
- default: false,
2876
- type: Boolean,
2877
- },
2878
-
2879
- fixed: {
2880
- default: false,
2881
- type: Boolean,
2882
- },
2883
-
2884
- verticalAlign: {
2885
- default: null,
2886
- type: String,
2887
- validator: (value) => validator$1.verticalAlign.includes(value),
2888
- },
2889
- },
2890
-
2891
- created() {
2892
- if (this.truncate && !this.fixed) {
2893
- console.warn('Table must have "fixed" property set to true when using TableCell "truncate" property');
2894
- }
2895
- },
2896
- };
2897
-
2898
- function render$9(_ctx, _cache, $props, $setup, $data, $options) {
2899
- return (vue.openBlock(), vue.createElementBlock("td", {
2900
- class: vue.normalizeClass(["last:pr-0", [
2901
- {
2902
- // density
2903
- 'py-1 pr-2': $props.dense,
2904
- 'py-2 pr-4': !$props.dense,
2905
- // text-align
2906
- 'text-left': $props.textAlign === 'left',
2907
- 'text-center': $props.textAlign === 'center',
2908
- 'text-right': $props.textAlign === 'right',
2909
- 'text-justify': $props.textAlign === 'justify',
2910
- // vertical-align
2911
- 'align-baseline': $props.verticalAlign === 'baseline',
2912
- 'align-bottom': $props.verticalAlign === 'bottom',
2913
- 'align-middle': $props.verticalAlign === 'middle',
2914
- 'align-text-bottom': $props.verticalAlign === 'text-bottom',
2915
- 'align-text-top': $props.verticalAlign === 'text-top',
2916
- 'align-top': $props.verticalAlign === 'top',
2917
- // truncate
2918
- 'truncate': $props.truncate && $props.fixed,
2919
- },
2920
- ]])
2921
- }, [
2922
- vue.renderSlot(_ctx.$slots, "default")
2923
- ], 2 /* CLASS */))
2924
- }
2925
-
2926
- script$a.render = render$9;
2927
- script$a.__file = "src/components/table/TableCell.vue";
2928
-
2929
- var script$9 = {
2930
- name: 'XTable',
2931
-
2932
- components: {
2933
- TableHead: script$e,
2934
- TableHeader: script$d,
2935
- TableBody: script$c,
2936
- TableRow: script$b,
2937
- TableCell: script$a,
2938
- XSpinner: script$E,
2939
- },
2940
-
2941
- props: {
2942
- loading: {
2943
- type: Boolean,
2944
- default: false,
2945
- },
2946
-
2947
- headers: {
2948
- type: Array,
2949
- default: () => [],
2950
- },
2951
-
2952
- items: {
2953
- type: Array,
2954
- default: () => [],
2955
- },
2956
-
2957
- sort: {
2958
- type: Array,
2959
- default: () => [],
2960
- },
2961
-
2962
- dense: {
2963
- type: Boolean,
2964
- default: false,
2965
- },
2966
-
2967
- fixed: {
2968
- type: Boolean,
2969
- default: false,
2970
- },
2971
-
2972
- scrollable: {
2973
- type: Boolean,
2974
- default: true,
2975
- },
2976
-
2977
- stickyHeader: {
2978
- type: Boolean,
2979
- default: true,
2980
- },
2981
- },
2982
-
2983
- methods: {
2984
- getSort(headerValue, sort) {
2985
- for (let i = 0; i < sort.length; i++) {
2986
- const { 0: value, 1: order } = sort[i].split(',');
2987
-
2988
- if (headerValue === value) return parseInt(order)
2989
- }
2990
-
2991
- return null
2992
- },
2993
- sortHeader(header) {
2994
- // update sort array
2995
- const sort = this.sort.slice(0);
2996
- let exists = false;
2997
-
2998
- for (let i = 0; i < sort.length; i++) {
2999
- const { 0: value, 1: order } = sort[i].split(',');
3000
-
3001
- if (value === header.value) {
3002
- exists = true;
3003
-
3004
- if (order === '-1') {
3005
- // update position to 1
3006
- sort.splice(i, 1, `${header.value},1`);
3007
- break
3008
- } else if (order === '1') {
3009
- // delete position
3010
- sort.splice(i, 1);
3011
- break
3012
- }
3013
- }
3014
- }
3015
-
3016
- if (!exists) sort.push(`${header.value},-1`);
3017
-
3018
- this.$emit('update:sort', sort);
3019
- },
3020
- getPath(obj, path, defValue) {
3021
- if (!path) return undefined
3022
- const pathArray = Array.isArray(path) ? path : path.match(/([^[.\]])+/g);
3023
- const result = pathArray.reduce((prevObj, key) => prevObj && prevObj[key], obj);
3024
-
3025
- return result === undefined ? defValue : result
3026
- },
3027
- },
3028
- };
3029
-
3030
- const _hoisted_1$5 = {
3031
- key: 0,
3032
- class: "absolute inset-0 flex items-center justify-center z-40 bg-gray-300 rounded opacity-50"
3033
- };
3034
-
3035
- function render$8(_ctx, _cache, $props, $setup, $data, $options) {
3036
- const _component_table_header = vue.resolveComponent("table-header");
3037
- const _component_table_head = vue.resolveComponent("table-head");
3038
- const _component_table_cell = vue.resolveComponent("table-cell");
3039
- const _component_table_row = vue.resolveComponent("table-row");
3040
- const _component_table_body = vue.resolveComponent("table-body");
3041
- const _component_x_spinner = vue.resolveComponent("x-spinner");
3042
-
3043
- return (vue.openBlock(), vue.createElementBlock("table", {
3044
- class: vue.normalizeClass(["w-full relative", [
3045
- {
3046
- 'overflow-x-scroll sm:overflow-x-auto whitespace-wrap sm:whitespace-normal block sm:table': $props.scrollable,
3047
- 'relative': $props.stickyHeader,
3048
- 'table-fixed': $props.fixed,
3049
- }
3050
- ]])
3051
- }, [
3052
- vue.createVNode(_component_table_head, null, {
3053
- default: vue.withCtx(() => [
3054
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($props.headers, (header, index) => {
3055
- return (vue.openBlock(), vue.createBlock(_component_table_header, {
3056
- key: index,
3057
- "sticky-header": $props.stickyHeader,
3058
- "text-align": header.align,
3059
- sort: $options.getSort(header.value, $props.sort),
3060
- sortable: header.sortable,
3061
- onClick: $event => (header.sortable ? $options.sortHeader(header) : null)
3062
- }, {
3063
- default: vue.withCtx(() => [
3064
- vue.createTextVNode(vue.toDisplayString(header.text), 1 /* TEXT */)
3065
- ]),
3066
- _: 2 /* DYNAMIC */
3067
- }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["sticky-header", "text-align", "sort", "sortable", "onClick"]))
3068
- }), 128 /* KEYED_FRAGMENT */))
3069
- ]),
3070
- _: 1 /* STABLE */
3071
- }),
3072
- vue.createVNode(_component_table_body, null, {
3073
- default: vue.withCtx(() => [
3074
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($props.items, (item, index) => {
3075
- return (vue.openBlock(), vue.createBlock(_component_table_row, {
3076
- key: index,
3077
- clickable: "",
3078
- onClick: $event => (_ctx.$emit('click-row', item))
3079
- }, {
3080
- default: vue.withCtx(() => [
3081
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($props.headers, (header, index2) => {
3082
- return (vue.openBlock(), vue.createBlock(_component_table_cell, {
3083
- key: index2,
3084
- "text-align": header.align,
3085
- dense: $props.dense,
3086
- fixed: $props.fixed
3087
- }, {
3088
- default: vue.withCtx(() => [
3089
- vue.renderSlot(_ctx.$slots, `item-${header.value}`, { item: item }, () => [
3090
- vue.createTextVNode(vue.toDisplayString($options.getPath(item, header.value)), 1 /* TEXT */)
3091
- ])
3092
- ]),
3093
- _: 2 /* DYNAMIC */
3094
- }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["text-align", "dense", "fixed"]))
3095
- }), 128 /* KEYED_FRAGMENT */))
3096
- ]),
3097
- _: 2 /* DYNAMIC */
3098
- }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["onClick"]))
3099
- }), 128 /* KEYED_FRAGMENT */))
3100
- ]),
3101
- _: 3 /* FORWARDED */
3102
- }),
3103
- ($props.loading)
3104
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$5, [
3105
- vue.createVNode(_component_x_spinner, { size: "lg" })
3106
- ]))
3107
- : vue.createCommentVNode("v-if", true)
3108
- ], 2 /* CLASS */))
3109
- }
3110
-
3111
- script$9.render = render$8;
3112
- script$9.__file = "src/components/table/Table.vue";
3113
-
3114
- var script$8 = {
3115
- name: 'XTab',
3116
-
3117
- props: {
3118
- disabled: {
3119
- type: Boolean,
3120
- default: false,
3121
- },
3122
-
3123
- value: {
3124
- type: [String, Number],
3125
- default: null,
3126
- },
3127
-
3128
- color: {
3129
- type: String,
3130
- default: 'primary',
3131
- },
3132
-
3133
- tag: {
3134
- type: String,
3135
- default: 'li',
3136
- },
3137
-
3138
- to: {
3139
- type: String,
3140
- default: undefined,
3141
- },
3142
- },
3143
-
3144
- setup(props) {
3145
- const tabs = vue.inject(
3146
- 'tabs',
3147
- {
3148
- state: vue.reactive({
3149
- active: null,
3150
- }),
3151
- activateTab: () => {},
3152
- },
3153
- );
3154
-
3155
- const state = vue.reactive({
3156
- selected: vue.computed(() => tabs.state.active === props.value),
3157
- });
3158
-
3159
- function onClickTab() {
3160
- tabs.activateTab(props.value);
3161
- }
3162
-
3163
- return {
3164
- ...vue.toRefs(state),
3165
- tabs,
3166
- onClickTab,
3167
- }
3168
- },
3169
- };
3170
-
3171
- function render$7(_ctx, _cache, $props, $setup, $data, $options) {
3172
- return (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.to ? 'router-link' : $props.tag), {
3173
- to: $props.to,
3174
- class: vue.normalizeClass(["pb-2 transition-colors duration-150 ease-in-out", [
3175
- {
3176
- [`border-b-2 border-${$props.color}-500 text-${$props.color}-500`]: _ctx.selected,
3177
- 'cursor-pointer': !$props.disabled,
3178
- 'cursor-not-allowed': $props.disabled,
3179
- 'cursor-not-allowed text-gray-500': $props.disabled && !_ctx.selected,
3180
- },
3181
- ]]),
3182
- "aria-disabled": $props.disabled ? 'true' : null,
3183
- "aria-selected": _ctx.selected ? 'true' : 'false',
3184
- onClick: $setup.onClickTab
3185
- }, {
3186
- default: vue.withCtx(() => [
3187
- vue.renderSlot(_ctx.$slots, "default")
3188
- ]),
3189
- _: 3 /* FORWARDED */
3190
- }, 8 /* PROPS */, ["to", "class", "aria-disabled", "aria-selected", "onClick"]))
3191
- }
3192
-
3193
- script$8.render = render$7;
3194
- script$8.__file = "src/components/tabs/Tab.vue";
3195
-
3196
- var script$7 = {
3197
- name: 'XTabs',
3198
-
3199
- props: {
3200
- modelValue: {
3201
- type: [String, Number],
3202
- default: null,
3203
- },
3204
- tag: {
3205
- type: String,
3206
- default: 'ul',
3207
- },
3208
- },
3209
-
3210
- emits: ['update:modelValue'],
3211
-
3212
- setup(props, { emit }) {
3213
- const state = vue.reactive({
3214
- active: vue.computed(() => props.modelValue),
3215
- });
3216
-
3217
- vue.provide('tabs', {
3218
- state,
3219
- activateTab,
3220
- });
3221
-
3222
- function activateTab(tab) {
3223
- emit('update:modelValue', tab);
3224
- }
3225
- },
3226
- };
3227
-
3228
- function render$6(_ctx, _cache, $props, $setup, $data, $options) {
3229
- return (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.tag), { class: "flex border-b border-gray-200 dark:border-gray-700 space-x-4" }, {
3230
- default: vue.withCtx(() => [
3231
- vue.renderSlot(_ctx.$slots, "default")
3232
- ]),
3233
- _: 3 /* FORWARDED */
3234
- }))
3235
- }
3236
-
3237
- script$7.render = render$6;
3238
- script$7.__file = "src/components/tabs/Tabs.vue";
3239
-
3240
- var script$6 = {
3241
- name: 'XTag',
3242
-
3243
- props: {
3244
- color: {
3245
- type: String,
3246
- default: 'gray',
3247
- },
3248
-
3249
- radius: {
3250
- type: String,
3251
- default: 'full',
3252
- },
3253
-
3254
- removable: {
3255
- type: Boolean,
3256
- default: false,
3257
- },
3258
-
3259
- size: {
3260
- type: String,
3261
- default: null,
3262
- },
3263
-
3264
- tag: {
3265
- type: String,
3266
- default: 'span',
3267
- },
3268
-
3269
- outlined: {
3270
- type: Boolean,
3271
- default: false,
3272
- },
3273
- },
3274
- };
3275
-
3276
- const _hoisted_1$4 = {
3277
- key: 0,
3278
- class: "flex items-center"
3279
- };
3280
- const _hoisted_2$2 = /*#__PURE__*/vue.createElementVNode("line", {
3281
- x1: "18",
3282
- y1: "6",
3283
- x2: "6",
3284
- y2: "18"
3285
- }, null, -1 /* HOISTED */);
3286
- const _hoisted_3$2 = /*#__PURE__*/vue.createElementVNode("line", {
3287
- x1: "6",
3288
- y1: "6",
3289
- x2: "18",
3290
- y2: "18"
3291
- }, null, -1 /* HOISTED */);
3292
- const _hoisted_4$2 = [
3293
- _hoisted_2$2,
3294
- _hoisted_3$2
3295
- ];
3296
-
3297
- function render$5(_ctx, _cache, $props, $setup, $data, $options) {
3298
- return (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.tag), {
3299
- class: vue.normalizeClass(["inline-block leading-none",
3300
- [
3301
- [`bg-${$props.color}-200 text-${$props.color}-900 border-${$props.color}-900`],
3302
- {
3303
- // variant
3304
- '!bg-transparent border': $props.outlined,
3305
-
3306
- // size
3307
- 'py-1': $props.size === 'auto',
3308
- 'px-2 py-1 text-xs': $props.size === 'xs',
3309
- 'px-2 py-1 text-sm': $props.size === 'sm',
3310
- 'px-3 py-2': !['auto', 'xs', 'sm', 'lg', 'xl'].includes($props.size),
3311
- 'px-4 py-3 text-lg': $props.size === 'lg',
3312
- 'px-6 py-6 text-xl': $props.size === 'xl',
3313
-
3314
- // radius
3315
- 'rounded-full': $props.radius === 'full',
3316
- 'rounded-lg': $props.radius === 'lg',
3317
- 'rounded-md': $props.radius === 'md',
3318
- 'rounded-sm': $props.radius === 'sm',
3319
- 'rounded': $props.radius === 'rounded',
3320
- },
3321
- ]])
3322
- }, {
3323
- default: vue.withCtx(() => [
3324
- ($props.removable)
3325
- ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_1$4, [
3326
- vue.renderSlot(_ctx.$slots, "default"),
3327
- (vue.openBlock(), vue.createElementBlock("svg", {
3328
- width: "24",
3329
- height: "24",
3330
- viewBox: "0 0 24 24",
3331
- stroke: "currentColor",
3332
- "stroke-linejoin": "round",
3333
- "stroke-linecap": "round",
3334
- fill: "none",
3335
- role: "presentation",
3336
- class: "stroke-2 w-4 h-4 ml-1 cursor-pointer hover:text-gray-700 transition-colors duration-150 ease-in-out flex-shrink-0",
3337
- onClick: _cache[0] || (_cache[0] = $event => (_ctx.$emit('remove')))
3338
- }, _hoisted_4$2))
3339
- ]))
3340
- : vue.renderSlot(_ctx.$slots, "default", { key: 1 })
3341
- ]),
3342
- _: 3 /* FORWARDED */
3343
- }, 8 /* PROPS */, ["class"]))
3344
- }
3345
-
3346
- script$6.render = render$5;
3347
- script$6.__file = "src/components/tag/Tag.vue";
3348
-
3349
- var script$5 = {
3350
- name: 'XTextarea',
3351
-
3352
- validator: withValidator(),
3353
-
3354
- props: {
3355
- ...withProps(),
3356
-
3357
- label: {
3358
- type: String,
3359
- default: '',
3360
- },
3361
-
3362
- dir: {
3363
- type: String,
3364
- default: 'ltr',
3365
- },
3366
-
3367
- max: {
3368
- type: Number,
3369
- default: null,
3370
- },
3371
-
3372
- maxlength: {
3373
- type: Number,
3374
- default: null,
3375
- },
3376
-
3377
- min: {
3378
- type: Number,
3379
- default: null,
3380
- },
3381
-
3382
- minlength: {
3383
- type: Number,
3384
- default: null,
3385
- },
3386
-
3387
- placeholder: {
3388
- type: String,
3389
- default: null,
3390
- },
3391
-
3392
- adjustToText: {
3393
- type: Boolean,
3394
- default: true,
3395
- },
3396
-
3397
- preventEnter: {
3398
- type: Boolean,
3399
- default: false,
3400
- },
3401
-
3402
- inputClass: {
3403
- type: String,
3404
- default: '',
3405
- },
3406
- },
3407
-
3408
- emits: withEmits(),
3409
-
3410
- setup(props, { attrs, emit }) {
3411
- return {
3412
- ...useInputtable(props, { attrs, emit }),
3413
- }
3414
- },
3415
-
3416
- watch: {
3417
- modelValue() {
3418
- setTimeout(this.resize);
3419
- },
3420
- size() {
3421
- setTimeout(this.resize);
3422
- },
3423
- },
3424
-
3425
- mounted() {
3426
- this.resize();
3427
- window.addEventListener('resize', this.resize);
3428
- },
3429
-
3430
- beforeUnmount() {
3431
- window.removeEventListener('resize', this.resize);
3432
- },
3433
-
3434
- methods: {
3435
- onInput() {
3436
- this.resize();
3437
- },
3438
- onKeyDown(e) {
3439
- if (this.preventEnter && e.keyCode === 13) {
3440
- e.preventDefault();
3441
- e.stopPropagation();
3442
-
3443
- return
3444
- }
3445
- },
3446
- resize() {
3447
- if (this.adjustToText) {
3448
- const { focusRef } = this.$refs;
3449
-
3450
- focusRef.style.height = '1px';
3451
- focusRef.style.height = (2 + focusRef.scrollHeight) + 'px';
3452
- }
3453
- },
3454
- },
3455
- };
3456
-
3457
- const _hoisted_1$3 = { class: "inline-block mb-1 relative" };
3458
- const _hoisted_2$1 = ["textContent"];
3459
- const _hoisted_3$1 = ["disabled", "max", "maxlength", "min", "dir", "minlength", "name", "placeholder", "readonly", "value"];
3460
- const _hoisted_4$1 = ["textContent"];
3461
-
3462
- function render$4(_ctx, _cache, $props, $setup, $data, $options) {
3463
- return (vue.openBlock(), vue.createElementBlock("label", _hoisted_1$3, [
3464
- ($props.label)
3465
- ? (vue.openBlock(), vue.createElementBlock("p", {
3466
- key: 0,
3467
- class: vue.normalizeClass(["font-medium text-gray-800 dark:text-gray-200 mb-1", {
3468
- 'text-xs': _ctx.size === 'xs',
3469
- 'text-sm': _ctx.size === 'sm',
3470
- 'text-lg': _ctx.size === 'lg',
3471
- 'text-xl': _ctx.size === 'xl',
3472
- }]),
3473
- textContent: vue.toDisplayString($props.label)
3474
- }, null, 10 /* CLASS, PROPS */, _hoisted_2$1))
3475
- : vue.createCommentVNode("v-if", true),
3476
- vue.createElementVNode("textarea", vue.mergeProps({
3477
- ref: "focusRef",
3478
- class: ["appearance-none block w-full text-gray-700 dark:text-gray-200 placeholder-gray-400 dark:placeholder-gray-600 rounded-form leading-tight focus:outline-none focus:border-primary-500 dark:focus:border-primary-500 transition-colors duration-150 ease-in-out border-gray-300 dark:border-gray-700 resize-none overflow-hidden", [
3479
- _ctx.disabled ? 'bg-gray-200 dark:bg-gray-800 cursor-not-allowed' : 'bg-white dark:bg-gray-900',
3480
- {
3481
- // size
3482
- 'py-1': _ctx.size === 'auto',
3483
- 'px-2 py-1 text-xs': _ctx.size === 'xs',
3484
- 'px-2 py-1 text-sm': _ctx.size === 'sm',
3485
- 'px-3 py-2': !['auto', 'xs', 'sm', 'lg', 'xl'].includes(_ctx.size),
3486
- 'px-4 py-3 text-lg': _ctx.size === 'lg',
3487
- 'px-6 py-6 text-xl': _ctx.size === 'xl',
3488
- },
3489
- _ctx.flat ? '!p-0 !bg-transparent' : 'border shadow',
3490
- {
3491
- // error
3492
- 'border-error-500 focus:border-error-500 dark:focus:border-error-500': _ctx.errorInternal,
3493
- },
3494
- $props.inputClass,
3495
- ]],
3496
- disabled: _ctx.disabled,
3497
- max: $props.max,
3498
- maxlength: $props.maxlength,
3499
- min: $props.min,
3500
- dir: $props.dir,
3501
- minlength: $props.minlength,
3502
- name: _ctx.name,
3503
- placeholder: $props.placeholder,
3504
- readonly: _ctx.readonly,
3505
- value: _ctx.modelValue
3506
- }, vue.toHandlers(_ctx.inputListeners), {
3507
- onKeydown: _cache[0] || (_cache[0] = (...args) => ($options.onKeyDown && $options.onKeyDown(...args))),
3508
- onInput: _cache[1] || (_cache[1] = (...args) => ($options.onInput && $options.onInput(...args)))
3509
- }), null, 16 /* FULL_PROPS */, _hoisted_3$1),
3510
- (_ctx.errorInternal)
3511
- ? (vue.openBlock(), vue.createElementBlock("p", {
3512
- key: 1,
3513
- class: "text-sm text-error-500 mt-1",
3514
- textContent: vue.toDisplayString(_ctx.errorInternal)
3515
- }, null, 8 /* PROPS */, _hoisted_4$1))
3516
- : vue.createCommentVNode("v-if", true)
3517
- ]))
3518
- }
3519
-
3520
- script$5.render = render$4;
3521
- script$5.__file = "src/components/textarea/Textarea.vue";
3522
-
3523
- const validator = {
3524
- align: [
3525
- 'left',
3526
- 'right',
3527
- ],
3528
- position: [
3529
- 'bottom',
3530
- 'top',
3531
- ],
3532
- };
3533
-
3534
- var script$4 = {
3535
- name: 'XToast',
3536
-
3537
- validator,
3538
-
3539
- props: {
3540
- align: {
3541
- type: String,
3542
- default: 'right',
3543
- validator: (value) => validator.align.includes(value),
3544
- },
3545
-
3546
- position: {
3547
- default: 'bottom',
3548
- type: String,
3549
- validator: (value) => validator.position.includes(value),
3550
- },
3551
-
3552
- timeout: {
3553
- type: Number,
3554
- default: 3500,
3555
- },
3556
- },
3557
-
3558
- data() {
3559
- return {
3560
- events: [],
3561
- }
3562
- },
3563
-
3564
- methods: {
3565
- log(content) {
3566
- this.add(content);
3567
- },
3568
-
3569
- success(content) {
3570
- this.add(content, 'success');
3571
- },
3572
-
3573
- warn(content) {
3574
- this.add(content, 'warn');
3575
- },
3576
-
3577
- error(content) {
3578
- this.add(content, 'error');
3579
- },
3580
-
3581
- add(content, type = null) {
3582
- const event = {
3583
- id: Date.now(),
3584
- content,
3585
- type,
3586
- };
3587
-
3588
- this.events.push(event);
3589
- this.setTimer(event);
3590
- },
3591
-
3592
- remove(event) {
3593
- this.events = this.events.filter((e) => e.id !== event.id);
3594
- },
3595
-
3596
- setTimer(event) {
3597
- setTimeout(
3598
- () => {
3599
- this.remove(event);
3600
- },
3601
- this.timeout,
3602
- );
3603
- },
3604
- },
3605
- };
3606
-
3607
- const _hoisted_1$2 = ["onClick"];
3608
-
3609
- function render$3(_ctx, _cache, $props, $setup, $data, $options) {
3610
- return (vue.openBlock(), vue.createElementBlock("div", {
3611
- class: vue.normalizeClass(["fixed z-40 w-full sm:w-96", {
3612
- // align
3613
- 'left-0': $props.align === 'left',
3614
- 'right-0': $props.align === 'right',
3615
- // position
3616
- 'bottom-0': $props.position === 'bottom',
3617
- 'top-0': $props.position === 'top',
3618
- }])
3619
- }, [
3620
- vue.createVNode(vue.TransitionGroup, {
3621
- tag: "ul",
3622
- "enter-active-class": "transition ease-out duration-500",
3623
- "leave-active-class": "transition ease-out duration-500",
3624
- "enter-class": "transform translate-y-2 opacity-0",
3625
- "enter-to-class": "transform translate-y-0 opacity-100",
3626
- "leave-class": "transform translate-y-0 opacity-100",
3627
- "leave-to-class": "transform translate-y-2 opacity-0",
3628
- "move-class": "ease-in-out duration-200"
3629
- }, {
3630
- default: vue.withCtx(() => [
3631
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($data.events, (event) => {
3632
- return (vue.openBlock(), vue.createElementBlock("li", {
3633
- key: event.id,
3634
- class: vue.normalizeClass([
3635
- 'px-4',
3636
- {
3637
- 'pb-2': $props.position === 'bottom',
3638
- 'pt-2': $props.position === 'top',
3639
- }
3640
- ])
3641
- }, [
3642
- vue.createElementVNode("div", {
3643
- class: vue.normalizeClass([
3644
- 'rounded px-4 py-3 cursor-pointer w-full',
3645
- {
3646
- // type
3647
- 'bg-gray-900 dark:bg-white text-white dark:text-gray-900 border border-gray-700 dark:border-gray-200':
3648
- !event.type || (event.type && !['success', 'error', 'warn'].includes(event.type)),
3649
- 'bg-success-500 text-success-50': event.type && event.type === 'success',
3650
- 'bg-error-500 text-error-50': event.type && event.type === 'error',
3651
- 'bg-warning-500 text-warning-50': event.type && event.type === 'warn',
3652
- }
3653
- ]),
3654
- onClick: $event => ($options.remove(event))
3655
- }, vue.toDisplayString(event.content), 11 /* TEXT, CLASS, PROPS */, _hoisted_1$2)
3656
- ], 2 /* CLASS */))
3657
- }), 128 /* KEYED_FRAGMENT */))
3658
- ]),
3659
- _: 1 /* STABLE */
3660
- })
3661
- ], 2 /* CLASS */))
3662
- }
3663
-
3664
- script$4.render = render$3;
3665
- script$4.__file = "src/components/toast/Toast.vue";
3666
-
3667
- var script$3 = {
3668
- name: 'XToggle',
3669
-
3670
- components: {
3671
- XSpinner: script$E,
3672
- },
3673
-
3674
- validator: {
3675
- ...withValidator(),
3676
- },
3677
-
3678
- props: {
3679
- ...withProps(),
3680
-
3681
- id: {
3682
- type: String,
3683
- default: null,
3684
- },
3685
-
3686
- label: {
3687
- type: String,
3688
- default: null,
3689
- },
3690
-
3691
- glow: {
3692
- type: Boolean,
3693
- default: false,
3694
- },
3695
- },
3696
-
3697
- emits: withEmits(false),
3698
-
3699
- setup(props, { attrs, emit }) {
3700
- return {
3701
- ...useInputtable(props, { attrs, emit, useListeners: false }),
3702
- }
3703
- },
3704
-
3705
- computed: {
3706
- checked: {
3707
- get() {
3708
- return this.modelValue
3709
- },
3710
-
3711
- set(val) {
3712
- this.$emit('update:modelValue', val);
3713
- },
3714
- },
3715
- },
3716
- };
3717
-
3718
- const _hoisted_1$1 = { class: "flex items-center" };
3719
- const _hoisted_2 = ["id", "aria-checked", "aria-disabled", "disabled", "name", "required", "value"];
3720
- const _hoisted_3 = ["textContent"];
3721
- const _hoisted_4 = ["textContent"];
3722
-
3723
- function render$2(_ctx, _cache, $props, $setup, $data, $options) {
3724
- const _component_x_spinner = vue.resolveComponent("x-spinner");
3725
-
3726
- return (vue.openBlock(), vue.createElementBlock("label", {
3727
- class: vue.normalizeClass(["inline-block mb-1 relative pb-2", [!_ctx.disabled ? 'cursor-pointer' : 'cursor-not-allowed']])
3728
- }, [
3729
- vue.createElementVNode("div", _hoisted_1$1, [
3730
- vue.createElementVNode("div", {
3731
- class: vue.normalizeClass(["rounded-full transition-colors duration-300", [
3732
- {
3733
- // shadow
3734
- 'border shadow': !_ctx.flat,
3735
- [`shadow-lg shadow-${_ctx.color}-500/50`]: !_ctx.flat && $props.glow && _ctx.modelValue,
3736
-
3737
- 'w-8': _ctx.size === 'sm' || _ctx.size === 'xs',
3738
- 'w-10': !['xs', 'sm', 'lg', 'xl'].includes(_ctx.size),
3739
- 'w-12': _ctx.size === 'lg',
3740
- 'w-14': _ctx.size === 'xl',
3741
- 'bg-gray-300 dark:bg-gray-600': _ctx.disabled && !$options.checked,
3742
- 'bg-gray-400 dark:bg-gray-400': _ctx.disabled && $options.checked,
3743
- 'bg-gray-200 dark:bg-gray-600': !_ctx.disabled && !$options.checked,
3744
- [`bg-${_ctx.color}-200 border-${_ctx.color}-200`]: !_ctx.disabled && $options.checked,
3745
- }
3746
- ]])
3747
- }, [
3748
- vue.withDirectives(vue.createElementVNode("input", {
3749
- id: $props.id,
3750
- "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => (($options.checked) = $event)),
3751
- "aria-checked": $options.checked ? 'true' : 'false',
3752
- "aria-disabled": _ctx.disabled ? 'true' : null,
3753
- type: "checkbox",
3754
- class: "hidden",
3755
- disabled: _ctx.disabled || _ctx.loading,
3756
- name: _ctx.name,
3757
- required: _ctx.required,
3758
- value: _ctx.modelValue
3759
- }, null, 8 /* PROPS */, _hoisted_2), [
3760
- [vue.vModelCheckbox, $options.checked]
3761
- ]),
3762
- (_ctx.loading)
3763
- ? (vue.openBlock(), vue.createBlock(_component_x_spinner, {
3764
- key: 0,
3765
- size: _ctx.size,
3766
- class: vue.normalizeClass({'translate-x-full': $options.checked})
3767
- }, null, 8 /* PROPS */, ["size", "class"]))
3768
- : (vue.openBlock(), vue.createElementBlock("div", {
3769
- key: 1,
3770
- class: vue.normalizeClass(["rounded-full shadow transform transition duration-300 flex-shrink-0", [
3771
- {
3772
- 'h-4 w-4': _ctx.size === 'sm' || _ctx.size === 'xs',
3773
- 'h-5 w-5': !['xs', 'sm', 'lg', 'xl'].includes(_ctx.size),
3774
- 'h-6 w-6': _ctx.size === 'lg',
3775
- 'h-7 w-7': _ctx.size === 'xl',
3776
- 'translate-x-full': $options.checked,
3777
- 'bg-gray-200 dark:bg-gray-200': _ctx.disabled,
3778
- 'bg-white': !_ctx.disabled && !$options.checked,
3779
- [`bg-${_ctx.color}-500`]: !_ctx.disabled && $options.checked,
3780
- },
3781
- ]])
3782
- }, null, 2 /* CLASS */))
3783
- ], 2 /* CLASS */),
3784
- ($props.label)
3785
- ? (vue.openBlock(), vue.createElementBlock("span", {
3786
- key: 0,
3787
- class: vue.normalizeClass(["pl-2 font-medium text-gray-800 dark:text-gray-200", {
3788
- 'text-xs': _ctx.size === 'xs',
3789
- 'text-sm': _ctx.size === 'sm',
3790
- 'text-lg': _ctx.size === 'lg',
3791
- 'text-xl': _ctx.size === 'xl',
3792
- }]),
3793
- textContent: vue.toDisplayString($props.label)
3794
- }, null, 10 /* CLASS, PROPS */, _hoisted_3))
3795
- : vue.createCommentVNode("v-if", true)
3796
- ]),
3797
- (_ctx.errorInternal)
3798
- ? (vue.openBlock(), vue.createElementBlock("p", {
3799
- key: 0,
3800
- class: "text-sm text-error-500 mt-1",
3801
- textContent: vue.toDisplayString(_ctx.errorInternal)
3802
- }, null, 8 /* PROPS */, _hoisted_4))
3803
- : vue.createCommentVNode("v-if", true)
3804
- ], 2 /* CLASS */))
3805
- }
3806
-
3807
- script$3.render = render$2;
3808
- script$3.__file = "src/components/toggle/Toggle.vue";
3809
-
3810
- var script$2 = {
3811
- components: {
3812
- XPopover: script$o,
3813
- XPopoverContainer: script$n,
3814
- },
3815
- };
3816
-
3817
- function render$1(_ctx, _cache, $props, $setup, $data, $options) {
3818
- const _component_x_popover_container = vue.resolveComponent("x-popover-container");
3819
- const _component_x_popover = vue.resolveComponent("x-popover");
3820
-
3821
- return (vue.openBlock(), vue.createBlock(_component_x_popover, vue.mergeProps({
3822
- hover: "",
3823
- class: "dark"
3824
- }, _ctx.$attrs), {
3825
- content: vue.withCtx(() => [
3826
- vue.createVNode(_component_x_popover_container, { class: "p-2 text-gray-300 text-sm" }, {
3827
- default: vue.withCtx(() => [
3828
- vue.renderSlot(_ctx.$slots, "tooltip")
3829
- ]),
3830
- _: 3 /* FORWARDED */
3831
- })
3832
- ]),
3833
- default: vue.withCtx(() => [
3834
- vue.renderSlot(_ctx.$slots, "default")
3835
- ]),
3836
- _: 3 /* FORWARDED */
3837
- }, 16 /* FULL_PROPS */))
3838
- }
3839
-
3840
- script$2.render = render$1;
3841
- script$2.__file = "src/components/tooltip/Tooltip.vue";
3842
-
3843
- const _hoisted_1 = {
3844
- class: /*#__PURE__*/vue.normalizeClass([
3845
- 'bg-primary-50',
3846
- 'bg-primary-200',
3847
- 'bg-primary-500',
3848
- 'bg-primary-600',
3849
- 'bg-primary-800',
3850
- 'border-primary-200',
3851
- 'border-primary-500',
3852
- 'border-primary-600',
3853
- 'border-primary-700',
3854
- 'border-primary-900',
3855
- 'text-primary-50',
3856
- 'text-primary-500',
3857
- 'text-primary-600',
3858
- 'text-primary-900',
3859
- 'shadow-primary-500/50',
3860
- 'bg-secondary-50',
3861
- 'bg-secondary-200',
3862
- 'bg-secondary-500',
3863
- 'bg-secondary-600',
3864
- 'bg-secondary-800',
3865
- 'border-secondary-200',
3866
- 'border-secondary-500',
3867
- 'border-secondary-600',
3868
- 'border-secondary-700',
3869
- 'border-secondary-900',
3870
- 'text-secondary-50',
3871
- 'text-secondary-500',
3872
- 'text-secondary-600',
3873
- 'text-secondary-900',
3874
- 'shadow-secondary-500/50',
3875
- 'bg-error-50',
3876
- 'bg-error-200',
3877
- 'bg-error-500',
3878
- 'bg-error-600',
3879
- 'bg-error-800',
3880
- 'border-error-200',
3881
- 'border-error-500',
3882
- 'border-error-600',
3883
- 'border-error-700',
3884
- 'border-error-900',
3885
- 'text-error-50',
3886
- 'text-error-500',
3887
- 'text-error-600',
3888
- 'text-error-900',
3889
- 'shadow-error-500/50',
3890
- 'bg-warning-50',
3891
- 'bg-warning-200',
3892
- 'bg-warning-500',
3893
- 'bg-warning-600',
3894
- 'bg-warning-800',
3895
- 'border-warning-200',
3896
- 'border-warning-500',
3897
- 'border-warning-600',
3898
- 'border-warning-700',
3899
- 'border-warning-900',
3900
- 'text-warning-50',
3901
- 'text-warning-500',
3902
- 'text-warning-600',
3903
- 'text-warning-900',
3904
- 'shadow-warning-500/50',
3905
- 'bg-success-50',
3906
- 'bg-success-200',
3907
- 'bg-success-500',
3908
- 'bg-success-600',
3909
- 'bg-success-800',
3910
- 'border-success-200',
3911
- 'border-success-500',
3912
- 'border-success-600',
3913
- 'border-success-700',
3914
- 'border-success-900',
3915
- 'text-success-50',
3916
- 'text-success-500',
3917
- 'text-success-600',
3918
- 'text-success-900',
3919
- 'shadow-success-500/50',
3920
- 'bg-rose-50',
3921
- 'bg-rose-200',
3922
- 'bg-rose-500',
3923
- 'bg-rose-600',
3924
- 'bg-rose-800',
3925
- 'border-rose-200',
3926
- 'border-rose-500',
3927
- 'border-rose-600',
3928
- 'border-rose-700',
3929
- 'border-rose-900',
3930
- 'text-rose-50',
3931
- 'text-rose-500',
3932
- 'text-rose-600',
3933
- 'text-rose-900',
3934
- 'shadow-rose-500/50',
3935
- 'bg-zinc-50',
3936
- 'bg-zinc-200',
3937
- 'bg-zinc-500',
3938
- 'bg-zinc-600',
3939
- 'bg-zinc-800',
3940
- 'border-zinc-200',
3941
- 'border-zinc-500',
3942
- 'border-zinc-600',
3943
- 'border-zinc-700',
3944
- 'border-zinc-900',
3945
- 'text-zinc-50',
3946
- 'text-zinc-500',
3947
- 'text-zinc-600',
3948
- 'text-zinc-900',
3949
- 'shadow-zinc-500/50',
3950
- 'bg-neutral-50',
3951
- 'bg-neutral-200',
3952
- 'bg-neutral-500',
3953
- 'bg-neutral-600',
3954
- 'bg-neutral-800',
3955
- 'border-neutral-200',
3956
- 'border-neutral-500',
3957
- 'border-neutral-600',
3958
- 'border-neutral-700',
3959
- 'border-neutral-900',
3960
- 'text-neutral-50',
3961
- 'text-neutral-500',
3962
- 'text-neutral-600',
3963
- 'text-neutral-900',
3964
- 'shadow-neutral-500/50',
3965
- 'bg-stone-50',
3966
- 'bg-stone-200',
3967
- 'bg-stone-500',
3968
- 'bg-stone-600',
3969
- 'bg-stone-800',
3970
- 'border-stone-200',
3971
- 'border-stone-500',
3972
- 'border-stone-600',
3973
- 'border-stone-700',
3974
- 'border-stone-900',
3975
- 'text-stone-50',
3976
- 'text-stone-500',
3977
- 'text-stone-600',
3978
- 'text-stone-900',
3979
- 'shadow-stone-500/50',
3980
- 'bg-pink-50',
3981
- 'bg-pink-200',
3982
- 'bg-pink-500',
3983
- 'bg-pink-600',
3984
- 'bg-pink-800',
3985
- 'border-pink-200',
3986
- 'border-pink-500',
3987
- 'border-pink-600',
3988
- 'border-pink-700',
3989
- 'border-pink-900',
3990
- 'text-pink-50',
3991
- 'text-pink-500',
3992
- 'text-pink-600',
3993
- 'text-pink-900',
3994
- 'shadow-pink-500/50',
3995
- 'bg-fuchsia-50',
3996
- 'bg-fuchsia-200',
3997
- 'bg-fuchsia-500',
3998
- 'bg-fuchsia-600',
3999
- 'bg-fuchsia-800',
4000
- 'border-fuchsia-200',
4001
- 'border-fuchsia-500',
4002
- 'border-fuchsia-600',
4003
- 'border-fuchsia-700',
4004
- 'border-fuchsia-900',
4005
- 'text-fuchsia-50',
4006
- 'text-fuchsia-500',
4007
- 'text-fuchsia-600',
4008
- 'text-fuchsia-900',
4009
- 'shadow-fuchsia-500/50',
4010
- 'bg-purple-50',
4011
- 'bg-purple-200',
4012
- 'bg-purple-500',
4013
- 'bg-purple-600',
4014
- 'bg-purple-800',
4015
- 'border-purple-200',
4016
- 'border-purple-500',
4017
- 'border-purple-600',
4018
- 'border-purple-700',
4019
- 'border-purple-900',
4020
- 'text-purple-50',
4021
- 'text-purple-500',
4022
- 'text-purple-600',
4023
- 'text-purple-900',
4024
- 'shadow-purple-500/50',
4025
- 'bg-violet-50',
4026
- 'bg-violet-200',
4027
- 'bg-violet-500',
4028
- 'bg-violet-600',
4029
- 'bg-violet-800',
4030
- 'border-violet-200',
4031
- 'border-violet-500',
4032
- 'border-violet-600',
4033
- 'border-violet-700',
4034
- 'border-violet-900',
4035
- 'text-violet-50',
4036
- 'text-violet-500',
4037
- 'text-violet-600',
4038
- 'text-violet-900',
4039
- 'shadow-violet-500/50',
4040
- 'bg-indigo-50',
4041
- 'bg-indigo-200',
4042
- 'bg-indigo-500',
4043
- 'bg-indigo-600',
4044
- 'bg-indigo-800',
4045
- 'border-indigo-200',
4046
- 'border-indigo-500',
4047
- 'border-indigo-600',
4048
- 'border-indigo-700',
4049
- 'border-indigo-900',
4050
- 'text-indigo-50',
4051
- 'text-indigo-500',
4052
- 'text-indigo-600',
4053
- 'text-indigo-900',
4054
- 'shadow-indigo-500/50',
4055
- 'bg-blue-50',
4056
- 'bg-blue-200',
4057
- 'bg-blue-500',
4058
- 'bg-blue-600',
4059
- 'bg-blue-800',
4060
- 'border-blue-200',
4061
- 'border-blue-500',
4062
- 'border-blue-600',
4063
- 'border-blue-700',
4064
- 'border-blue-900',
4065
- 'text-blue-50',
4066
- 'text-blue-500',
4067
- 'text-blue-600',
4068
- 'text-blue-900',
4069
- 'shadow-blue-500/50',
4070
- 'bg-sky-50',
4071
- 'bg-sky-200',
4072
- 'bg-sky-500',
4073
- 'bg-sky-600',
4074
- 'bg-sky-800',
4075
- 'border-sky-200',
4076
- 'border-sky-500',
4077
- 'border-sky-600',
4078
- 'border-sky-700',
4079
- 'border-sky-900',
4080
- 'text-sky-50',
4081
- 'text-sky-500',
4082
- 'text-sky-600',
4083
- 'text-sky-900',
4084
- 'shadow-sky-500/50',
4085
- 'bg-cyan-50',
4086
- 'bg-cyan-200',
4087
- 'bg-cyan-500',
4088
- 'bg-cyan-600',
4089
- 'bg-cyan-800',
4090
- 'border-cyan-200',
4091
- 'border-cyan-500',
4092
- 'border-cyan-600',
4093
- 'border-cyan-700',
4094
- 'border-cyan-900',
4095
- 'text-cyan-50',
4096
- 'text-cyan-500',
4097
- 'text-cyan-600',
4098
- 'text-cyan-900',
4099
- 'shadow-cyan-500/50',
4100
- 'bg-teal-50',
4101
- 'bg-teal-200',
4102
- 'bg-teal-500',
4103
- 'bg-teal-600',
4104
- 'bg-teal-800',
4105
- 'border-teal-200',
4106
- 'border-teal-500',
4107
- 'border-teal-600',
4108
- 'border-teal-700',
4109
- 'border-teal-900',
4110
- 'text-teal-50',
4111
- 'text-teal-500',
4112
- 'text-teal-600',
4113
- 'text-teal-900',
4114
- 'shadow-teal-500/50',
4115
- 'bg-emerald-50',
4116
- 'bg-emerald-200',
4117
- 'bg-emerald-500',
4118
- 'bg-emerald-600',
4119
- 'bg-emerald-800',
4120
- 'border-emerald-200',
4121
- 'border-emerald-500',
4122
- 'border-emerald-600',
4123
- 'border-emerald-700',
4124
- 'border-emerald-900',
4125
- 'text-emerald-50',
4126
- 'text-emerald-500',
4127
- 'text-emerald-600',
4128
- 'text-emerald-900',
4129
- 'shadow-emerald-500/50',
4130
- 'bg-green-50',
4131
- 'bg-green-200',
4132
- 'bg-green-500',
4133
- 'bg-green-600',
4134
- 'bg-green-800',
4135
- 'border-green-200',
4136
- 'border-green-500',
4137
- 'border-green-600',
4138
- 'border-green-700',
4139
- 'border-green-900',
4140
- 'text-green-50',
4141
- 'text-green-500',
4142
- 'text-green-600',
4143
- 'text-green-900',
4144
- 'shadow-green-500/50',
4145
- 'bg-lime-50',
4146
- 'bg-lime-200',
4147
- 'bg-lime-500',
4148
- 'bg-lime-600',
4149
- 'bg-lime-800',
4150
- 'border-lime-200',
4151
- 'border-lime-500',
4152
- 'border-lime-600',
4153
- 'border-lime-700',
4154
- 'border-lime-900',
4155
- 'text-lime-50',
4156
- 'text-lime-500',
4157
- 'text-lime-600',
4158
- 'text-lime-900',
4159
- 'shadow-lime-500/50',
4160
- 'bg-yellow-50',
4161
- 'bg-yellow-200',
4162
- 'bg-yellow-500',
4163
- 'bg-yellow-600',
4164
- 'bg-yellow-800',
4165
- 'border-yellow-200',
4166
- 'border-yellow-500',
4167
- 'border-yellow-600',
4168
- 'border-yellow-700',
4169
- 'border-yellow-900',
4170
- 'text-yellow-50',
4171
- 'text-yellow-500',
4172
- 'text-yellow-600',
4173
- 'text-yellow-900',
4174
- 'shadow-yellow-500/50',
4175
- 'bg-amber-50',
4176
- 'bg-amber-200',
4177
- 'bg-amber-500',
4178
- 'bg-amber-600',
4179
- 'bg-amber-800',
4180
- 'border-amber-200',
4181
- 'border-amber-500',
4182
- 'border-amber-600',
4183
- 'border-amber-700',
4184
- 'border-amber-900',
4185
- 'text-amber-50',
4186
- 'text-amber-500',
4187
- 'text-amber-600',
4188
- 'text-amber-900',
4189
- 'shadow-amber-500/50',
4190
- 'bg-orange-50',
4191
- 'bg-orange-200',
4192
- 'bg-orange-500',
4193
- 'bg-orange-600',
4194
- 'bg-orange-800',
4195
- 'border-orange-200',
4196
- 'border-orange-500',
4197
- 'border-orange-600',
4198
- 'border-orange-700',
4199
- 'border-orange-900',
4200
- 'text-orange-50',
4201
- 'text-orange-500',
4202
- 'text-orange-600',
4203
- 'text-orange-900',
4204
- 'shadow-orange-500/50',
4205
- 'bg-red-50',
4206
- 'bg-red-200',
4207
- 'bg-red-500',
4208
- 'bg-red-600',
4209
- 'bg-red-800',
4210
- 'border-red-200',
4211
- 'border-red-500',
4212
- 'border-red-600',
4213
- 'border-red-700',
4214
- 'border-red-900',
4215
- 'text-red-50',
4216
- 'text-red-500',
4217
- 'text-red-600',
4218
- 'text-red-900',
4219
- 'shadow-red-500/50',
4220
- 'bg-gray-50',
4221
- 'bg-gray-200',
4222
- 'bg-gray-500',
4223
- 'bg-gray-600',
4224
- 'bg-gray-800',
4225
- 'border-gray-200',
4226
- 'border-gray-500',
4227
- 'border-gray-600',
4228
- 'border-gray-700',
4229
- 'border-gray-900',
4230
- 'text-gray-50',
4231
- 'text-gray-500',
4232
- 'text-gray-600',
4233
- 'text-gray-900',
4234
- 'shadow-gray-500/50',
4235
- ])
4236
- };
4237
-
4238
- function render(_ctx, _cache) {
4239
- return (vue.openBlock(), vue.createElementBlock("div", _hoisted_1))
4240
- }
4241
-
4242
- const script = {};
4243
-
4244
-
4245
- script.render = render;
4246
- script.__file = "src/components/colors.vue";
4247
- var script$1 = script;
4248
-
4249
- var components = /*#__PURE__*/Object.freeze({
4250
- __proto__: null,
4251
- Avatar: script$F,
4252
- Button: script$C,
4253
- Card: script$B,
4254
- Checkbox: script$A,
4255
- Collapse: script$z,
4256
- Container: script$y,
4257
- Divider: script$x,
4258
- Form: script$w,
4259
- Icon: script$D,
4260
- Image: script$v,
4261
- Input: script$u,
4262
- Link: script$t,
4263
- Modal: script$s,
4264
- Note: script$r,
4265
- Pagination: script$p,
4266
- PaginationItem: script$q,
4267
- Popover: script$o,
4268
- PopoverContainer: script$n,
4269
- PopoverItem: script$m,
4270
- Progress: script$l,
4271
- Radio: script$k,
4272
- Select: script$j,
4273
- Spacer: script$i,
4274
- Spinner: script$E,
4275
- Skeleton: script$g,
4276
- StatusDot: script$f,
4277
- Table: script$9,
4278
- TableBody: script$c,
4279
- TableCell: script$a,
4280
- TableHead: script$e,
4281
- TableHeader: script$d,
4282
- TableRow: script$b,
4283
- Tab: script$8,
4284
- Tabs: script$7,
4285
- Tag: script$6,
4286
- Textarea: script$5,
4287
- Toast: script$4,
4288
- Toggle: script$3,
4289
- Tooltip: script$2,
4290
- Colors: script$1
4291
- });
4292
-
4293
- const install = (Vue, config = {}) => {
4294
- Object.entries(components).forEach(([name, component]) => {
4295
- const prefix = config.prefix ? config.prefix : 'X';
4296
-
4297
- Vue.component(`${prefix}${name}`, component);
4298
- });
4299
- };
4300
-
4301
- if (typeof window !== 'undefined' && window.Vue) {
4302
- install(window.Vue);
4303
- }
4304
-
4305
- exports.Avatar = script$F;
4306
- exports.Button = script$C;
4307
- exports.Card = script$B;
4308
- exports.Checkbox = script$A;
4309
- exports.Collapse = script$z;
4310
- exports.Colors = script$1;
4311
- exports.Container = script$y;
4312
- exports.Divider = script$x;
4313
- exports.Form = script$w;
4314
- exports.Icon = script$D;
4315
- exports.Image = script$v;
4316
- exports.Input = script$u;
4317
- exports.Link = script$t;
4318
- exports.Modal = script$s;
4319
- exports.Note = script$r;
4320
- exports.Pagination = script$p;
4321
- exports.PaginationItem = script$q;
4322
- exports.Popover = script$o;
4323
- exports.PopoverContainer = script$n;
4324
- exports.PopoverItem = script$m;
4325
- exports.Progress = script$l;
4326
- exports.Radio = script$k;
4327
- exports.Select = script$j;
4328
- exports.Skeleton = script$g;
4329
- exports.Spacer = script$i;
4330
- exports.Spinner = script$E;
4331
- exports.StatusDot = script$f;
4332
- exports.Tab = script$8;
4333
- exports.Table = script$9;
4334
- exports.TableBody = script$c;
4335
- exports.TableCell = script$a;
4336
- exports.TableHead = script$e;
4337
- exports.TableHeader = script$d;
4338
- exports.TableRow = script$b;
4339
- exports.Tabs = script$7;
4340
- exports.Tag = script$6;
4341
- exports.Textarea = script$5;
4342
- exports.Toast = script$4;
4343
- exports.Toggle = script$3;
4344
- exports.Tooltip = script$2;
4345
- exports["default"] = install;
4346
-
4347
- Object.defineProperty(exports, '__esModule', { value: true });
4348
-
4349
- }));