@indielayer/ui 0.2.4 → 1.0.0-alpha.0

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