@privyid/persona 1.1.2 → 1.2.1-rc.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 (504) hide show
  1. package/dist/module.d.cts +2 -0
  2. package/dist/module.d.mts +2 -27
  3. package/dist/module.json +12 -0
  4. package/dist/module.mjs +13 -92
  5. package/dist/types.d.mts +13 -0
  6. package/package.json +25 -27
  7. package/dist/components/accordion/Accordion.vue +0 -121
  8. package/dist/components/accordion/AccordionItem.vue +0 -250
  9. package/dist/components/accordion/AccordionItems.vue +0 -50
  10. package/dist/components/accordion/AccordionItems.vue.d.ts +0 -41
  11. package/dist/components/accordion/index.d.ts +0 -7
  12. package/dist/components/accordion/index.mjs +0 -3
  13. package/dist/components/aspect-ratio/index.d.ts +0 -3
  14. package/dist/components/aspect-ratio/index.mjs +0 -21
  15. package/dist/components/aspect-ratio/utils/calculate-ratio.d.ts +0 -7
  16. package/dist/components/aspect-ratio/utils/calculate-ratio.mjs +0 -10
  17. package/dist/components/aspect-ratio/utils/resize-observer.d.ts +0 -1
  18. package/dist/components/aspect-ratio/utils/resize-observer.mjs +0 -22
  19. package/dist/components/avatar/Avatar.vue +0 -193
  20. package/dist/components/avatar/AvatarGroup.vue +0 -42
  21. package/dist/components/avatar/AvatarTruncate.vue +0 -33
  22. package/dist/components/avatar/AvatarTruncate.vue.d.ts +0 -31
  23. package/dist/components/avatar/assets/avatar-old.png +0 -0
  24. package/dist/components/avatar/assets/avatar.png +0 -0
  25. package/dist/components/avatar/index.d.ts +0 -2
  26. package/dist/components/avatar/index.mjs +0 -0
  27. package/dist/components/avatar/utils/color-hash.d.ts +0 -2
  28. package/dist/components/avatar/utils/color-hash.mjs +0 -22
  29. package/dist/components/avatar/utils/create-image.d.ts +0 -5
  30. package/dist/components/avatar/utils/create-image.mjs +0 -19
  31. package/dist/components/avatar/utils/load-image.d.ts +0 -1
  32. package/dist/components/avatar/utils/load-image.mjs +0 -22
  33. package/dist/components/badge/Badge.vue +0 -218
  34. package/dist/components/badge/index.d.ts +0 -1
  35. package/dist/components/badge/index.mjs +0 -0
  36. package/dist/components/banner/Banner.vue +0 -213
  37. package/dist/components/banner/index.d.ts +0 -1
  38. package/dist/components/banner/index.mjs +0 -0
  39. package/dist/components/breadcrumbs/Breadcrumb.vue +0 -62
  40. package/dist/components/breadcrumbs/BreadcrumbItem.vue +0 -95
  41. package/dist/components/breadcrumbs/BreadcrumbItemDropdown.vue +0 -78
  42. package/dist/components/breadcrumbs/index.d.ts +0 -11
  43. package/dist/components/breadcrumbs/index.mjs +0 -3
  44. package/dist/components/button/Button.vue +0 -422
  45. package/dist/components/button/index.d.ts +0 -5
  46. package/dist/components/button/index.mjs +0 -0
  47. package/dist/components/button-group/ButtonGroup.vue +0 -220
  48. package/dist/components/button-group/index.d.ts +0 -6
  49. package/dist/components/button-group/index.mjs +0 -1
  50. package/dist/components/calendar/Calendar.vue +0 -465
  51. package/dist/components/calendar/adapter/adapter.d.ts +0 -32
  52. package/dist/components/calendar/adapter/adapter.mjs +0 -43
  53. package/dist/components/calendar/adapter/date.d.ts +0 -2
  54. package/dist/components/calendar/adapter/date.mjs +0 -86
  55. package/dist/components/calendar/adapter/month.d.ts +0 -2
  56. package/dist/components/calendar/adapter/month.mjs +0 -66
  57. package/dist/components/calendar/adapter/year.d.ts +0 -2
  58. package/dist/components/calendar/adapter/year.mjs +0 -63
  59. package/dist/components/camera/Camera.vue +0 -416
  60. package/dist/components/camera/adapter/adapter.d.ts +0 -41
  61. package/dist/components/camera/adapter/adapter.mjs +0 -3
  62. package/dist/components/camera/adapter/capture.d.ts +0 -5
  63. package/dist/components/camera/adapter/capture.mjs +0 -12
  64. package/dist/components/camera/adapter/liveness.d.ts +0 -5
  65. package/dist/components/camera/adapter/liveness.mjs +0 -46
  66. package/dist/components/camera/adapter/qr-code.d.ts +0 -2
  67. package/dist/components/camera/adapter/qr-code.mjs +0 -19
  68. package/dist/components/camera/assets/shutter.wav +0 -0
  69. package/dist/components/camera/utils/motion.d.ts +0 -29
  70. package/dist/components/camera/utils/motion.mjs +0 -88
  71. package/dist/components/camera/utils/take-picture.d.ts +0 -1
  72. package/dist/components/camera/utils/take-picture.mjs +0 -14
  73. package/dist/components/caption/Caption.vue +0 -122
  74. package/dist/components/caption/index.d.ts +0 -1
  75. package/dist/components/caption/index.mjs +0 -0
  76. package/dist/components/card/Card.vue +0 -354
  77. package/dist/components/card/CardSection.vue +0 -81
  78. package/dist/components/card/index.d.ts +0 -2
  79. package/dist/components/card/index.mjs +0 -0
  80. package/dist/components/carousel/Carousel.vue +0 -202
  81. package/dist/components/carousel/CarouselBody.vue +0 -18
  82. package/dist/components/carousel/CarouselItem.vue +0 -10
  83. package/dist/components/carousel/index.d.ts +0 -4
  84. package/dist/components/carousel/index.mjs +0 -1
  85. package/dist/components/chart/Chart.vue +0 -155
  86. package/dist/components/chart/ChartSet.vue +0 -32
  87. package/dist/components/chart/ChartVal.vue +0 -36
  88. package/dist/components/chart/adapter/adapter.d.ts +0 -7
  89. package/dist/components/chart/adapter/adapter.mjs +0 -3
  90. package/dist/components/chart/adapter/bubble.d.ts +0 -2
  91. package/dist/components/chart/adapter/bubble.mjs +0 -26
  92. package/dist/components/chart/adapter/index.d.ts +0 -3
  93. package/dist/components/chart/adapter/index.mjs +0 -16
  94. package/dist/components/chart/adapter/line.d.ts +0 -2
  95. package/dist/components/chart/adapter/line.mjs +0 -66
  96. package/dist/components/chart/adapter/pie.d.ts +0 -2
  97. package/dist/components/chart/adapter/pie.mjs +0 -34
  98. package/dist/components/chart/index.d.ts +0 -2
  99. package/dist/components/chart/index.mjs +0 -0
  100. package/dist/components/chart/utils/use-chart.d.ts +0 -2
  101. package/dist/components/chart/utils/use-chart.mjs +0 -9
  102. package/dist/components/checkbox/Checkbox.vue +0 -232
  103. package/dist/components/checkbox/icon/IconCheckbox.vue +0 -13
  104. package/dist/components/checkbox/icon/IconInderteminate.vue +0 -12
  105. package/dist/components/checkbox/index.d.ts +0 -7
  106. package/dist/components/checkbox/index.mjs +0 -34
  107. package/dist/components/collapse/Collapse.vue +0 -71
  108. package/dist/components/contextual-bar/ContextualBar.vue +0 -461
  109. package/dist/components/contextual-bar/index.d.ts +0 -1
  110. package/dist/components/contextual-bar/index.mjs +0 -0
  111. package/dist/components/cropper/Cropper.vue +0 -446
  112. package/dist/components/cropper/index.d.ts +0 -1
  113. package/dist/components/cropper/index.mjs +0 -3
  114. package/dist/components/cropper/utils/crop-image.d.ts +0 -44
  115. package/dist/components/cropper/utils/crop-image.mjs +0 -43
  116. package/dist/components/cropper/utils/use-pinch.d.ts +0 -8
  117. package/dist/components/cropper/utils/use-pinch.mjs +0 -50
  118. package/dist/components/cropper/utils/use-preview.d.ts +0 -3
  119. package/dist/components/cropper/utils/use-preview.mjs +0 -21
  120. package/dist/components/cropper/utils/use-ratio.d.ts +0 -9
  121. package/dist/components/cropper/utils/use-ratio.mjs +0 -24
  122. package/dist/components/datepicker/Datepicker.vue +0 -235
  123. package/dist/components/dialog/Dialog.vue +0 -149
  124. package/dist/components/dialog/DialogFooter.vue +0 -138
  125. package/dist/components/dialog/index.d.ts +0 -52
  126. package/dist/components/dialog/index.mjs +0 -86
  127. package/dist/components/divider/Divider.vue +0 -65
  128. package/dist/components/dot/Dot.vue +0 -103
  129. package/dist/components/dot/index.d.ts +0 -1
  130. package/dist/components/dot/index.mjs +0 -0
  131. package/dist/components/dropdown/Dropdown.vue +0 -441
  132. package/dist/components/dropdown/DropdownHeader.vue +0 -33
  133. package/dist/components/dropdown/DropdownItem.vue +0 -103
  134. package/dist/components/dropdown/DropdownText.vue +0 -34
  135. package/dist/components/dropdown/index.d.ts +0 -10
  136. package/dist/components/dropdown/index.mjs +0 -1
  137. package/dist/components/dropdown/utils/use-focus.d.ts +0 -5
  138. package/dist/components/dropdown/utils/use-focus.mjs +0 -22
  139. package/dist/components/dropdown-subitem/DropdownSubitem.vue +0 -182
  140. package/dist/components/dropdown-subitem/index.d.ts +0 -12
  141. package/dist/components/dropdown-subitem/index.mjs +0 -1
  142. package/dist/components/dropzone/Dropzone.vue +0 -261
  143. package/dist/components/dropzone/index.d.ts +0 -4
  144. package/dist/components/dropzone/index.mjs +0 -0
  145. package/dist/components/dropzone/utils/accept.d.ts +0 -1
  146. package/dist/components/dropzone/utils/accept.mjs +0 -17
  147. package/dist/components/filterbar/Filterbar.vue +0 -103
  148. package/dist/components/filterbar/Filterbar.vue.d.ts +0 -40
  149. package/dist/components/filterbar/index.d.ts +0 -45
  150. package/dist/components/filterbar/index.mjs +0 -7
  151. package/dist/components/filterbar/pinned/PinnedDate.vue +0 -100
  152. package/dist/components/filterbar/pinned/PinnedDate.vue.d.ts +0 -72
  153. package/dist/components/filterbar/pinned/PinnedMultiselect.vue +0 -113
  154. package/dist/components/filterbar/pinned/PinnedMultiselect.vue.d.ts +0 -48
  155. package/dist/components/filterbar/pinned/PinnedSelect.vue +0 -100
  156. package/dist/components/filterbar/pinned/PinnedSelect.vue.d.ts +0 -47
  157. package/dist/components/filterbar/pinned/PinnedToggle.vue +0 -77
  158. package/dist/components/filterbar/pinned/PinnedToggle.vue.d.ts +0 -59
  159. package/dist/components/form-group/FormGroup.vue +0 -169
  160. package/dist/components/global/router.d.ts +0 -24
  161. package/dist/components/global/router.mjs +0 -7
  162. package/dist/components/global/store.d.ts +0 -49
  163. package/dist/components/global/store.mjs +0 -52
  164. package/dist/components/global/types.d.ts +0 -4
  165. package/dist/components/global/types.mjs +0 -0
  166. package/dist/components/global/use-singleton.d.ts +0 -21
  167. package/dist/components/global/use-singleton.mjs +0 -60
  168. package/dist/components/global/utils/queue.d.ts +0 -16
  169. package/dist/components/global/utils/queue.mjs +0 -35
  170. package/dist/components/heading/Heading.vue +0 -140
  171. package/dist/components/heading/index.d.ts +0 -3
  172. package/dist/components/heading/index.mjs +0 -0
  173. package/dist/components/input/Input.vue +0 -243
  174. package/dist/components/input/index.d.ts +0 -6
  175. package/dist/components/input/index.mjs +0 -25
  176. package/dist/components/input/utils/accept.d.ts +0 -26
  177. package/dist/components/input/utils/accept.mjs +0 -81
  178. package/dist/components/input-color/index.d.ts +0 -1
  179. package/dist/components/input-color/index.mjs +0 -0
  180. package/dist/components/input-color/inputColor.vue +0 -264
  181. package/dist/components/input-file/InputFile.vue +0 -221
  182. package/dist/components/input-group/InputGroup.vue +0 -188
  183. package/dist/components/input-group/InputGroupAddon.vue +0 -42
  184. package/dist/components/input-group/index.d.ts +0 -6
  185. package/dist/components/input-group/index.mjs +0 -1
  186. package/dist/components/input-password/InputPassword.vue +0 -110
  187. package/dist/components/input-password/index.d.ts +0 -2
  188. package/dist/components/input-password/index.mjs +0 -17
  189. package/dist/components/input-pin/InputPin.vue +0 -170
  190. package/dist/components/input-pin/index.d.ts +0 -6
  191. package/dist/components/input-pin/index.mjs +0 -3
  192. package/dist/components/input-range/InputRange.vue +0 -303
  193. package/dist/components/input-range/utils/use-drag.d.ts +0 -3
  194. package/dist/components/input-range/utils/use-drag.mjs +0 -26
  195. package/dist/components/label/Label.vue +0 -265
  196. package/dist/components/label/index.d.ts +0 -1
  197. package/dist/components/label/index.mjs +0 -0
  198. package/dist/components/list-group/ListGroup.vue +0 -75
  199. package/dist/components/list-group/ListGroupItem.vue +0 -88
  200. package/dist/components/list-group/index.d.ts +0 -1
  201. package/dist/components/list-group/index.mjs +0 -0
  202. package/dist/components/main/Main.vue +0 -66
  203. package/dist/components/markdown/index.d.ts +0 -29
  204. package/dist/components/markdown/index.mjs +0 -25
  205. package/dist/components/meta.json +0 -171
  206. package/dist/components/modal/Modal.vue +0 -546
  207. package/dist/components/modal/index.d.ts +0 -1
  208. package/dist/components/modal/index.mjs +0 -0
  209. package/dist/components/nav/Nav.vue +0 -416
  210. package/dist/components/nav/NavCollapse.vue +0 -66
  211. package/dist/components/nav/NavForm.vue +0 -23
  212. package/dist/components/nav/NavItem.vue +0 -187
  213. package/dist/components/nav/NavItemDropdown.vue +0 -120
  214. package/dist/components/nav/NavSubItem.vue +0 -194
  215. package/dist/components/nav/NavText.vue +0 -19
  216. package/dist/components/nav/index.d.ts +0 -2
  217. package/dist/components/nav/index.mjs +0 -0
  218. package/dist/components/navbar/Navbar.vue +0 -284
  219. package/dist/components/navbar/NavbarBrand.vue +0 -31
  220. package/dist/components/navbar/NavbarNav.vue +0 -114
  221. package/dist/components/navbar/NavbarToggle.vue +0 -72
  222. package/dist/components/navbar/index.d.ts +0 -9
  223. package/dist/components/navbar/index.mjs +0 -1
  224. package/dist/components/navbar-menu/NavbarNavMenu.vue +0 -59
  225. package/dist/components/notify/Notify.vue +0 -51
  226. package/dist/components/notify/NotifyGroup.vue +0 -244
  227. package/dist/components/notify/NotifyItem.vue +0 -45
  228. package/dist/components/notify/index.d.ts +0 -20
  229. package/dist/components/notify/index.mjs +0 -18
  230. package/dist/components/overlay/Overlay.vue +0 -68
  231. package/dist/components/overlay/assets/icon-white.svg +0 -1
  232. package/dist/components/overlay/index.d.ts +0 -2
  233. package/dist/components/overlay/index.mjs +0 -8
  234. package/dist/components/overlay/utils/use-loading.d.ts +0 -4
  235. package/dist/components/overlay/utils/use-loading.mjs +0 -28
  236. package/dist/components/page/Page.vue +0 -106
  237. package/dist/components/pagination/Pagination.vue +0 -415
  238. package/dist/components/pagination/index.d.ts +0 -14
  239. package/dist/components/pagination/index.mjs +0 -38
  240. package/dist/components/pagination/utils/calculate-page.d.ts +0 -11
  241. package/dist/components/pagination/utils/calculate-page.mjs +0 -48
  242. package/dist/components/pdf-helipad/PdfHelipad.vue +0 -147
  243. package/dist/components/pdf-helipad/index.d.ts +0 -7
  244. package/dist/components/pdf-helipad/index.mjs +0 -0
  245. package/dist/components/pdf-helipad/utils/use-drag.d.ts +0 -3
  246. package/dist/components/pdf-helipad/utils/use-drag.mjs +0 -38
  247. package/dist/components/pdf-object/PdfObject.vue +0 -348
  248. package/dist/components/pdf-object/PdfObjectAddon.vue +0 -55
  249. package/dist/components/pdf-object/PdfObjectDebugger.vue +0 -70
  250. package/dist/components/pdf-object/PdfObjects.vue +0 -39
  251. package/dist/components/pdf-object/index.d.ts +0 -63
  252. package/dist/components/pdf-object/index.mjs +0 -110
  253. package/dist/components/pdf-object/utils/overlap.d.ts +0 -51
  254. package/dist/components/pdf-object/utils/overlap.mjs +0 -54
  255. package/dist/components/pdf-object/utils/position.d.ts +0 -64
  256. package/dist/components/pdf-object/utils/position.mjs +0 -48
  257. package/dist/components/pdf-object/utils/use-drag.d.ts +0 -9
  258. package/dist/components/pdf-object/utils/use-drag.mjs +0 -69
  259. package/dist/components/pdf-object/utils/use-drop.d.ts +0 -7
  260. package/dist/components/pdf-object/utils/use-drop.mjs +0 -57
  261. package/dist/components/pdf-object/utils/use-resize.d.ts +0 -17
  262. package/dist/components/pdf-object/utils/use-resize.mjs +0 -90
  263. package/dist/components/pdf-object/utils/use-selector.d.ts +0 -4
  264. package/dist/components/pdf-object/utils/use-selector.mjs +0 -26
  265. package/dist/components/pdf-text/PdfText.vue +0 -138
  266. package/dist/components/pdf-text/utils/text-to-image.d.ts +0 -68
  267. package/dist/components/pdf-text/utils/text-to-image.mjs +0 -120
  268. package/dist/components/pdf-viewer/PdfError.vue +0 -74
  269. package/dist/components/pdf-viewer/PdfLoading.vue +0 -24
  270. package/dist/components/pdf-viewer/PdfNavigation.vue +0 -169
  271. package/dist/components/pdf-viewer/PdfViewer.vue +0 -377
  272. package/dist/components/pdf-viewer/assets/pdf-loading.svg +0 -1
  273. package/dist/components/pdf-viewer/index.d.ts +0 -25
  274. package/dist/components/pdf-viewer/index.mjs +0 -24
  275. package/dist/components/pdf-viewer/utils/pdfjs.d.ts +0 -68
  276. package/dist/components/pdf-viewer/utils/pdfjs.mjs +0 -54
  277. package/dist/components/pdf-viewer/utils/use-idle.d.ts +0 -2
  278. package/dist/components/pdf-viewer/utils/use-idle.mjs +0 -25
  279. package/dist/components/pdf-viewer/utils/use-sticky.d.ts +0 -6
  280. package/dist/components/pdf-viewer/utils/use-sticky.mjs +0 -49
  281. package/dist/components/pdf-viewer/utils/use-viewer.d.ts +0 -27
  282. package/dist/components/pdf-viewer/utils/use-viewer.mjs +0 -191
  283. package/dist/components/popover/Popover.vue +0 -131
  284. package/dist/components/popover/index.d.ts +0 -17
  285. package/dist/components/popover/index.mjs +0 -52
  286. package/dist/components/popup/Popup.vue +0 -428
  287. package/dist/components/popup/index.d.ts +0 -38
  288. package/dist/components/popup/index.mjs +0 -31
  289. package/dist/components/progress/Progress.vue +0 -221
  290. package/dist/components/progress/ProgressItem.vue +0 -56
  291. package/dist/components/progress/index.d.ts +0 -2
  292. package/dist/components/progress/index.mjs +0 -0
  293. package/dist/components/progress-indicator/ProgressIndicator.vue +0 -132
  294. package/dist/components/progressbar/Progressbar.vue +0 -113
  295. package/dist/components/progressbar/index.d.ts +0 -7
  296. package/dist/components/progressbar/index.mjs +0 -11
  297. package/dist/components/pspdfkit/PspdfHelipad.vue +0 -165
  298. package/dist/components/pspdfkit/PspdfObject.vue +0 -341
  299. package/dist/components/pspdfkit/PspdfObjectAddon.vue +0 -30
  300. package/dist/components/pspdfkit/PspdfObjects.vue +0 -30
  301. package/dist/components/pspdfkit/PspdfViewer.vue +0 -257
  302. package/dist/components/pspdfkit/css/custom.css +0 -345
  303. package/dist/components/pspdfkit/index.d.ts +0 -8
  304. package/dist/components/pspdfkit/index.mjs +0 -7
  305. package/dist/components/pspdfkit/utils/position.d.ts +0 -1
  306. package/dist/components/pspdfkit/utils/position.mjs +0 -5
  307. package/dist/components/pspdfkit/utils/pspdfkit.d.ts +0 -17
  308. package/dist/components/pspdfkit/utils/pspdfkit.mjs +0 -53
  309. package/dist/components/pspdfkit/utils/use-drop.d.ts +0 -2
  310. package/dist/components/pspdfkit/utils/use-drop.mjs +0 -41
  311. package/dist/components/pspdfkit/utils/use-viewer.d.ts +0 -17
  312. package/dist/components/pspdfkit/utils/use-viewer.mjs +0 -167
  313. package/dist/components/qrcode/Qrcode.vue +0 -174
  314. package/dist/components/qrcode/index.d.ts +0 -1
  315. package/dist/components/qrcode/index.mjs +0 -0
  316. package/dist/components/radio/Radio.vue +0 -304
  317. package/dist/components/radio/index.d.ts +0 -7
  318. package/dist/components/radio/index.mjs +0 -16
  319. package/dist/components/richtext/Richtext.vue +0 -295
  320. package/dist/components/richtext/RichtextToolbarAdvance.vue +0 -37
  321. package/dist/components/richtext/RichtextToolbarSimple.vue +0 -158
  322. package/dist/components/richtext/control/RichtextControlFontFamily.vue +0 -56
  323. package/dist/components/richtext/control/RichtextControlFontSize.vue +0 -81
  324. package/dist/components/richtext/control/RichtextControlHighlight.vue +0 -135
  325. package/dist/components/richtext/control/RichtextControlHistory.vue +0 -27
  326. package/dist/components/richtext/control/RichtextControlImage.vue +0 -34
  327. package/dist/components/richtext/control/RichtextControlLink.vue +0 -53
  328. package/dist/components/richtext/control/RichtextControlList.vue +0 -45
  329. package/dist/components/richtext/control/RichtextControlTable.vue +0 -106
  330. package/dist/components/richtext/control/RichtextControlTextAlign.vue +0 -90
  331. package/dist/components/richtext/control/RichtextControlTextFormat.vue +0 -49
  332. package/dist/components/richtext/control/RichtextControlTextHeading.vue +0 -101
  333. package/dist/components/richtext/index.d.ts +0 -7
  334. package/dist/components/richtext/index.mjs +0 -7
  335. package/dist/components/richtext/popup/RichtextPopupImageEdit.vue +0 -65
  336. package/dist/components/richtext/popup/RichtextPopupLinkDetail.vue +0 -95
  337. package/dist/components/richtext/popup/RichtextPopupLinkEdit.vue +0 -74
  338. package/dist/components/richtext/tiptap/image-align.d.ts +0 -43
  339. package/dist/components/richtext/tiptap/image-align.mjs +0 -60
  340. package/dist/components/ringbar/Ringbar.vue +0 -158
  341. package/dist/components/ringbar/index.d.ts +0 -1
  342. package/dist/components/ringbar/index.mjs +0 -0
  343. package/dist/components/select/Select.vue +0 -576
  344. package/dist/components/select/SelectInput.vue +0 -123
  345. package/dist/components/select/SelectTags.vue +0 -58
  346. package/dist/components/select/adapter/adapter.d.ts +0 -17
  347. package/dist/components/select/adapter/adapter.mjs +0 -20
  348. package/dist/components/select/adapter/async-adapter.d.ts +0 -17
  349. package/dist/components/select/adapter/async-adapter.mjs +0 -61
  350. package/dist/components/select/adapter/basic-adapter.d.ts +0 -5
  351. package/dist/components/select/adapter/basic-adapter.mjs +0 -13
  352. package/dist/components/select/adapter/fuzzy-adapter.d.ts +0 -2
  353. package/dist/components/select/adapter/fuzzy-adapter.mjs +0 -24
  354. package/dist/components/select/index.d.ts +0 -15
  355. package/dist/components/select/index.mjs +0 -20
  356. package/dist/components/select/utils/use-on-scroll.d.ts +0 -2
  357. package/dist/components/select/utils/use-on-scroll.mjs +0 -9
  358. package/dist/components/select/utils/use-on-typing.d.ts +0 -3
  359. package/dist/components/select/utils/use-on-typing.mjs +0 -8
  360. package/dist/components/sheet/Sheet.vue +0 -230
  361. package/dist/components/shimmer/Shimmer.vue +0 -123
  362. package/dist/components/shimmer/index.d.ts +0 -2
  363. package/dist/components/shimmer/index.mjs +0 -10
  364. package/dist/components/sidebar/Sidebar.vue +0 -249
  365. package/dist/components/sidebar/SidebarBrand.vue +0 -108
  366. package/dist/components/sidebar/SidebarContent.vue +0 -21
  367. package/dist/components/sidebar/SidebarContent.vue.d.ts +0 -16
  368. package/dist/components/sidebar/SidebarNav.vue +0 -260
  369. package/dist/components/sidebar/index.d.ts +0 -9
  370. package/dist/components/sidebar/index.mjs +0 -1
  371. package/dist/components/sidebar-menu/SidebarMenu.vue +0 -123
  372. package/dist/components/sidebar-menu/SidebarMenuItem.vue +0 -70
  373. package/dist/components/sidebar-menu/index.d.ts +0 -138
  374. package/dist/components/sidebar-menu/index.mjs +0 -44
  375. package/dist/components/signature-draw/SignatureDraw.vue +0 -101
  376. package/dist/components/signature-draw/SignatureDrawDesktop.vue +0 -165
  377. package/dist/components/signature-draw/SignatureDrawMobile.vue +0 -244
  378. package/dist/components/signature-draw/utils/canvas.d.ts +0 -41
  379. package/dist/components/signature-draw/utils/canvas.mjs +0 -55
  380. package/dist/components/signature-draw/utils/image.d.ts +0 -7
  381. package/dist/components/signature-draw/utils/image.mjs +0 -23
  382. package/dist/components/signature-draw/utils/smooth-line.d.ts +0 -36
  383. package/dist/components/signature-draw/utils/smooth-line.mjs +0 -56
  384. package/dist/components/signature-draw/utils/straight-line.d.ts +0 -8
  385. package/dist/components/signature-draw/utils/straight-line.mjs +0 -24
  386. package/dist/components/signature-draw/utils/use-draw.d.ts +0 -7
  387. package/dist/components/signature-draw/utils/use-draw.mjs +0 -29
  388. package/dist/components/signature-text/SignatureText.vue +0 -138
  389. package/dist/components/signature-text/utils/formatter.d.ts +0 -2
  390. package/dist/components/signature-text/utils/formatter.mjs +0 -8
  391. package/dist/components/signature-text/utils/generate-text.d.ts +0 -8
  392. package/dist/components/signature-text/utils/generate-text.mjs +0 -28
  393. package/dist/components/signature-text/utils/load-font.d.ts +0 -1
  394. package/dist/components/signature-text/utils/load-font.mjs +0 -22
  395. package/dist/components/spinner/Spinner.vue +0 -156
  396. package/dist/components/spinner/SpinnerRing.vue +0 -34
  397. package/dist/components/spinner/SpinnerRinggo.vue +0 -64
  398. package/dist/components/spread/Spread.vue +0 -52
  399. package/dist/components/steps/Step.vue +0 -49
  400. package/dist/components/steps/StepSlider.vue +0 -37
  401. package/dist/components/steps/StepSlider.vue.d.ts +0 -34
  402. package/dist/components/steps/Steps.vue +0 -150
  403. package/dist/components/steps/index.d.ts +0 -30
  404. package/dist/components/steps/index.mjs +0 -53
  405. package/dist/components/steps/utils/hook.d.ts +0 -10
  406. package/dist/components/steps/utils/hook.mjs +0 -35
  407. package/dist/components/strengthbar/Strengthbar.vue +0 -97
  408. package/dist/components/subheading/Subheading.vue +0 -148
  409. package/dist/components/subheading/index.d.ts +0 -1
  410. package/dist/components/subheading/index.mjs +0 -0
  411. package/dist/components/table/Table.vue +0 -391
  412. package/dist/components/table/Table.vue.d.ts +0 -174
  413. package/dist/components/table/index.d.ts +0 -49
  414. package/dist/components/table/index.mjs +0 -37
  415. package/dist/components/table-flex/TableFlex.vue +0 -341
  416. package/dist/components/table-static/TableStatic.vue +0 -458
  417. package/dist/components/table-static/TableStaticRoot.vue +0 -42
  418. package/dist/components/table-static/TableStaticSort.vue +0 -23
  419. package/dist/components/table-static/index.d.ts +0 -64
  420. package/dist/components/table-static/index.mjs +0 -24
  421. package/dist/components/tabs/Tab.vue +0 -34
  422. package/dist/components/tabs/TabContent.vue +0 -53
  423. package/dist/components/tabs/TabContent.vue.d.ts +0 -33
  424. package/dist/components/tabs/Tabs.vue +0 -234
  425. package/dist/components/text/Text.vue +0 -235
  426. package/dist/components/text/index.d.ts +0 -2
  427. package/dist/components/text/index.mjs +0 -0
  428. package/dist/components/textarea/Textarea.vue +0 -188
  429. package/dist/components/time/Time.vue +0 -257
  430. package/dist/components/time/TimeItem.vue +0 -117
  431. package/dist/components/time/index.d.ts +0 -19
  432. package/dist/components/time/index.mjs +0 -53
  433. package/dist/components/time/utils/index.d.ts +0 -9
  434. package/dist/components/time/utils/index.mjs +0 -82
  435. package/dist/components/timepicker/Timepicker.vue +0 -230
  436. package/dist/components/toast/Toast.vue +0 -269
  437. package/dist/components/toast/index.d.ts +0 -50
  438. package/dist/components/toast/index.mjs +0 -44
  439. package/dist/components/toggle/Toggle.vue +0 -239
  440. package/dist/components/tooltip/Tooltip.vue +0 -172
  441. package/dist/components/tooltip/TooltipContainer.vue +0 -89
  442. package/dist/components/tooltip/index.d.ts +0 -17
  443. package/dist/components/tooltip/index.mjs +0 -113
  444. package/dist/components/tooltip/utils/create-handler.d.ts +0 -9
  445. package/dist/components/tooltip/utils/create-handler.mjs +0 -16
  446. package/dist/components/tooltip/utils/on-hover.d.ts +0 -23
  447. package/dist/components/tooltip/utils/on-hover.mjs +0 -42
  448. package/dist/components/tooltip/utils/parse-bindings.d.ts +0 -23
  449. package/dist/components/tooltip/utils/parse-bindings.mjs +0 -47
  450. package/dist/components/tour/Tour.vue +0 -112
  451. package/dist/components/tour/TourDialog.vue +0 -207
  452. package/dist/components/tour/TourHighlight.vue +0 -58
  453. package/dist/components/tour/core/base.d.ts +0 -59
  454. package/dist/components/tour/core/base.mjs +0 -69
  455. package/dist/components/tour/core/step/action.d.ts +0 -15
  456. package/dist/components/tour/core/step/action.mjs +0 -14
  457. package/dist/components/tour/core/step/conditional.d.ts +0 -25
  458. package/dist/components/tour/core/step/conditional.mjs +0 -57
  459. package/dist/components/tour/core/step/delay.d.ts +0 -8
  460. package/dist/components/tour/core/step/delay.mjs +0 -9
  461. package/dist/components/tour/core/step/dialog.d.ts +0 -11
  462. package/dist/components/tour/core/step/dialog.mjs +0 -25
  463. package/dist/components/tour/core/step/visit.d.ts +0 -9
  464. package/dist/components/tour/core/step/visit.mjs +0 -15
  465. package/dist/components/tour/core/step.d.ts +0 -37
  466. package/dist/components/tour/core/step.mjs +0 -46
  467. package/dist/components/tour/core/story.d.ts +0 -130
  468. package/dist/components/tour/core/story.mjs +0 -166
  469. package/dist/components/tour/core/tour.d.ts +0 -126
  470. package/dist/components/tour/core/tour.mjs +0 -196
  471. package/dist/components/tour/index.d.ts +0 -3
  472. package/dist/components/tour/index.mjs +0 -4
  473. package/dist/components/tour/utils/focus.d.ts +0 -1
  474. package/dist/components/tour/utils/focus.mjs +0 -6
  475. package/dist/components/tour/utils/is-visible.d.ts +0 -1
  476. package/dist/components/tour/utils/is-visible.mjs +0 -29
  477. package/dist/components/tour/utils/wait-element.d.ts +0 -6
  478. package/dist/components/tour/utils/wait-element.mjs +0 -45
  479. package/dist/components/truncate/Truncate.vue +0 -75
  480. package/dist/components/utils/array.d.ts +0 -2
  481. package/dist/components/utils/array.mjs +0 -19
  482. package/dist/components/utils/base64.d.ts +0 -8
  483. package/dist/components/utils/base64.mjs +0 -35
  484. package/dist/components/utils/color.d.ts +0 -17
  485. package/dist/components/utils/color.mjs +0 -14
  486. package/dist/components/utils/date.d.ts +0 -22
  487. package/dist/components/utils/date.mjs +0 -14
  488. package/dist/components/utils/value.d.ts +0 -8
  489. package/dist/components/utils/value.mjs +0 -7
  490. package/dist/components/utils/vnode.d.ts +0 -15
  491. package/dist/components/utils/vnode.mjs +0 -18
  492. package/dist/components/wizard/Wizard.vue +0 -84
  493. package/dist/components/wizard/WizardBody.vue +0 -50
  494. package/dist/components/wizard/WizardHeader.vue +0 -38
  495. package/dist/components/wizard/WizardHeader.vue.d.ts +0 -16
  496. package/dist/components/wizard/WizardStep.vue +0 -31
  497. package/dist/core/index.d.ts +0 -43
  498. package/dist/core/index.mjs +0 -148
  499. package/dist/directive/index.d.ts +0 -3
  500. package/dist/directive/index.mjs +0 -12
  501. package/dist/module.cjs +0 -5
  502. package/dist/module.d.ts +0 -27
  503. package/dist/runtime/plugins/persona.d.ts +0 -2
  504. package/dist/runtime/plugins/persona.js +0 -35
@@ -1,422 +0,0 @@
1
- <template>
2
- <component
3
- :is="tagName"
4
- :href="href"
5
- :type="type"
6
- data-testid="btn"
7
- :class="classNames"
8
- :disabled="loading || disabled">
9
- <slot
10
- v-if="loading"
11
- name="loading">
12
- <spinner />
13
- </slot>
14
- <slot v-else />
15
- </component>
16
- </template>
17
-
18
- <script lang="ts" setup>
19
- import type {
20
- PropType,
21
- VNode,
22
- } from 'vue-demi'
23
- import {
24
- computed,
25
- inject,
26
- resolveComponent,
27
- } from 'vue-demi'
28
- import type { RouteLocationRaw } from 'vue-router'
29
- import type {
30
- ColorVariant,
31
- SizeVariant,
32
- StyleVariant,
33
- TypeVariant,
34
- } from '.'
35
- import { BUTTONGROUP_SETTING } from '../button-group'
36
- import { INPUTGROUP_SETTING } from '../input-group'
37
- import Spinner from '../spinner/SpinnerRinggo.vue'
38
-
39
- const props = defineProps({
40
- variant: {
41
- type : String as PropType<StyleVariant>,
42
- default: 'solid',
43
- },
44
- color: {
45
- type : String as PropType<ColorVariant>,
46
- default: 'default',
47
- },
48
- size: {
49
- type : String as PropType<SizeVariant>,
50
- default: 'md',
51
- },
52
- icon: {
53
- type : Boolean,
54
- default: false,
55
- },
56
- pill: {
57
- type : Boolean,
58
- default: false,
59
- },
60
- href: {
61
- type : [String, Object] as PropType<RouteLocationRaw>,
62
- default: undefined,
63
- },
64
- type: {
65
- type : String as PropType<TypeVariant>,
66
- default: 'button',
67
- },
68
- disabled: {
69
- type : Boolean,
70
- default: false,
71
- },
72
- loading: {
73
- type : Boolean,
74
- default: false,
75
- },
76
- })
77
-
78
- const inputSetting = inject(INPUTGROUP_SETTING, undefined, false)
79
- const buttonSetting = inject(BUTTONGROUP_SETTING, undefined, false)
80
-
81
- const classNames = computed(() => {
82
- const result: string[] = ['btn']
83
-
84
- if (props.color)
85
- result.push(`btn--${props.color}`)
86
-
87
- if (props.variant)
88
- result.push(`btn--variant-${props.variant}`)
89
-
90
- if (props.loading)
91
- result.push('btn--loading')
92
-
93
- // eslint-disable-next-line unicorn/explicit-length-check
94
- if (inputSetting?.size?.value)
95
- result.push(`btn--${inputSetting?.size.value}`)
96
- // eslint-disable-next-line unicorn/explicit-length-check
97
- else if (buttonSetting?.size?.value)
98
- result.push(`btn--${buttonSetting?.size.value}`)
99
- // eslint-disable-next-line unicorn/explicit-length-check
100
- else if (props.size)
101
- result.push(`btn--${props.size}`)
102
-
103
- if (props.icon)
104
- result.push('btn--icon')
105
-
106
- if (props.pill)
107
- result.push('btn--pill')
108
-
109
- return result
110
- })
111
-
112
- const tagName = computed(() => {
113
- return props.href
114
- ? resolveComponent('nuxt-link')
115
- : 'button'
116
- })
117
-
118
- defineSlots<{
119
- loading(): VNode[],
120
- default(): VNode[],
121
- }>()
122
- </script>
123
-
124
- <style lang="postcss">
125
- /**
126
- * Component Name: Button
127
- * Component URI : https://www.figma.com/file/JIYmbyRYZHc9bnVp6Npm9K/B-A-S-E-%2F-Components?node-id=291%3A3945
128
- * Date Created : Feb 01, 2022
129
- * Last Update : Aug 19, 2024
130
- */
131
- .btn {
132
- --p-color-primary-hover: darken(theme(colors.brand.action), 5%);
133
- --p-color-dark-primary-hover: darken(theme(colors.dark.brand.action), 5%);
134
- --p-color-primary-focus: darken(theme(colors.brand.action), 10%);
135
- --p-color-dark-primary-focus: darken(theme(colors.dark.brand.action), 10%);
136
- --p-color-info-hover: darken(theme(backgroundColor.info.emphasis), 5%);
137
- --p-color-dark-info-hover: darken(theme(backgroundColor.dark.info.emphasis), 5%);
138
- --p-color-info-focus: darken(theme(backgroundColor.info.emphasis), 10%);
139
- --p-color-dark-info-focus: darken(theme(backgroundColor.dark.info.emphasis), 10%);
140
- --p-color-success-hover: darken(theme(backgroundColor.success.emphasis), 5%);
141
- --p-color-dark-success-hover: darken(theme(backgroundColor.dark.success.emphasis), 5%);
142
- --p-color-success-focus: darken(theme(backgroundColor.success.emphasis), 10%);
143
- --p-color-dark-success-focus: darken(theme(backgroundColor.dark.success.emphasis), 10%);
144
- --p-color-warning-hover: darken(theme(backgroundColor.warning.emphasis), 5%);
145
- --p-color-dark-warning-hover: darken(theme(backgroundColor.dark.warning.emphasis), 5%);
146
- --p-color-warning-focus: darken(theme(backgroundColor.warning.emphasis), 10%);
147
- --p-color-dark-warning-focus: darken(theme(backgroundColor.dark.warning.emphasis), 10%);
148
- --p-color-danger-hover: darken(theme(backgroundColor.danger.emphasis), 5%);
149
- --p-color-dark-danger-hover: darken(theme(backgroundColor.dark.danger.emphasis), 5%);
150
- --p-color-danger-focus: darken(theme(backgroundColor.danger.emphasis), 10%);
151
- --p-color-dark-danger-focus: darken(theme(backgroundColor.dark.danger.emphasis), 10%);
152
-
153
- --p-text-link-hover: darken(theme(textColor.link.DEFAULT), 5%);
154
- --p-text-dark-link-hover: darken(theme(textColor.dark.link.DEFAULT), 5%);
155
- --p-text-link-focus: darken(theme(textColor.link.DEFAULT), 10%);
156
- --p-text-dark-link-focus: darken(theme(textColor.dark.link.DEFAULT), 10%);
157
-
158
- --p-text-link-emphasis-hover: darken(theme(textColor.link.on-emphasis), 5%);
159
- --p-text-dark-link-emphasis-hover: darken(theme(textColor.dark.link.on-emphasis), 5%);
160
- --p-text-link-emphasis-focus: darken(theme(textColor.link.on-emphasis), 10%);
161
- --p-text-dark-link-emphasis-focus: darken(theme(textColor.dark.link.on-emphasis), 10%);
162
-
163
- --p-button-xs-padding-x: theme(spacing.2);
164
- --p-button-sm-padding-x: theme(spacing.4);
165
- --p-button-md-padding-x: theme(spacing.5);
166
- --p-button-lg-padding-x: theme(spacing.8);
167
-
168
- /**
169
- * only for button
170
- * variant link
171
- */
172
- --p-button-xs-padding-y: theme(spacing[0.5]);
173
- --p-button-sm-padding-y: theme(spacing.1);
174
- --p-button-md-padding-y: theme(spacing[2.5]);
175
- --p-button-lg-padding-y: theme(spacing.4);
176
-
177
- @apply inline-flex align-middle justify-center font-medium no-underline hover:no-underline disabled:opacity-50 disabled:pointer-events-none transition-all ease-in-out duration-200;
178
-
179
- > svg {
180
- @apply self-center;
181
- }
182
-
183
- > * {
184
- @apply relative z-[2];
185
- }
186
-
187
- /*
188
- * Button has 4 different sizing
189
- * eg: xs, sm, md, and lg
190
- */
191
- &&--xs {
192
- @apply px-[var(--p-button-xs-padding-x)] py-[2px] gap-1 text-sm rounded-xs;
193
-
194
- &:where(.btn--variant-link) {
195
- @apply py-[var(--p-button-xs-padding-y)];
196
- }
197
- }
198
-
199
- &&--sm {
200
- @apply px-[var(--p-button-sm-padding-x)] py-1 gap-2 text-base tracking-wider rounded-sm;
201
-
202
- &:where(.btn--variant-link) {
203
- @apply py-[var(--p-button-sm-padding-y)];
204
- }
205
- }
206
-
207
- &&--md {
208
- @apply px-[var(--p-button-md-padding-x)] py-[10px] gap-3 text-base tracking-wider rounded;
209
-
210
- &:where(.btn--variant-link) {
211
- @apply py-[var(--p-button-md-padding-y)];
212
- }
213
- }
214
-
215
- &&--lg {
216
- @apply px-[var(--p-button-lg-padding-x)] py-4 gap-4 text-base tracking-wider rounded;
217
-
218
- &:where(.btn--variant-link) {
219
- @apply py-[var(--p-button-lg-padding-y)];
220
- }
221
- }
222
-
223
- /*
224
- * Button solid is the
225
- * default style variant
226
- */
227
- &&--variant-solid {
228
- @apply border border-solid hover:shadow-lg focus:shadow-none active:shadow-none text-state-emphasis hover:text-state-emphasis;
229
- @apply dark:text-dark-state-emphasis dark:hover:text-dark-state-emphasis;
230
-
231
- &.btn {
232
- &--default {
233
- @apply bg-default-alpha focus:bg-default-alpha active:bg-default-alpha hover:text-default focus:text-default;
234
- @apply dark:bg-dark-default-alpha focus:dark:bg-dark-default-alpha active:dark:bg-dark-default-alpha hover:dark:text-dark-default focus:dark:text-dark-default;
235
-
236
- /* Border */
237
- @apply text-default border-default-alpha hover:border-subtle-alpha active:border-subtle-alpha focus:border-subtle-alpha;
238
- @apply dark:text-dark-default dark:border-dark-default-alpha dark:hover:border-dark-subtle-alpha dark:active:border-dark-subtle-alpha dark:focus:border-dark-subtle-alpha;
239
- }
240
-
241
- &--primary {
242
- @apply bg-brand-action hover:bg-[color:var(--p-color-primary-hover)] focus:bg-[color:var(--p-color-primary-focus)] active:bg-[color:var(--p-color-primary-focus)];
243
- @apply dark:bg-dark-brand-action hover:dark:bg-[color:var(--p-color-dark-primary-hover)] focus:dark:bg-[color:var(--p-color-dark-primary-focus)] active:dark:bg-[color:var(--p-color-dark-primary-focus)];
244
-
245
- /* Border */
246
- @apply border-brand-action hover:border-[color:var(--p-color-primary-hover)] focus:border-[color:var(--p-color-primary-focus)] active:border-[color:var(--p-color-primary-focus)];
247
- @apply dark:border-dark-brand-action hover:dark:border-[color:var(--p-color-dark-primary-hover)] focus:dark:border-[color:var(--p-color-dark-primary-focus)] active:dark:border-[color:var(--p-color-dark-primary-focus)];
248
- }
249
-
250
- &--info {
251
- @apply bg-info-emphasis hover:bg-[color:var(--p-color-info-hover)] focus:bg-[color:var(--p-color-info-focus)] active:bg-[color:var(--p-color-info-focus)];
252
- @apply dark:bg-dark-info-emphasis hover:dark:bg-[color:var(--p-color-dark-info-hover)] focus:dark:bg-[color:var(--p-color-dark-info-focus)] active:dark:bg-[color:var(--p-color-dark-info-focus)];
253
-
254
- /* Border */
255
- @apply border-info-emphasis hover:border-[color:var(--p-color-info-hover)] focus:border-[color:var(--p-color-info-focus)] active:border-[color:var(--p-color-info-focus)];
256
- @apply dark:border-dark-info-emphasis hover:dark:border-[color:var(--p-color-dark-info-hover)] focus:dark:border-[color:var(--p-color-dark-info-focus)] active:dark:border-[color:var(--p-color-dark-info-focus)];
257
- }
258
-
259
- &--success {
260
- @apply bg-success-emphasis hover:bg-[color:var(--p-color-success-hover)] focus:bg-[color:var(--p-color-success-focus)] active:bg-[color:var(--p-color-success-focus)];
261
- @apply dark:bg-dark-success-emphasis hover:dark:bg-[color:var(--p-color-dark-success-hover)] focus:dark:bg-[color:var(--p-color-dark-success-focus)] active:dark:bg-[color:var(--p-color-dark-success-focus)];
262
-
263
- /* Border */
264
- @apply border-success-emphasis hover:border-[color:var(--p-color-success-hover)] focus:border-[color:var(--p-color-success-focus)] active:border-[color:var(--p-color-success-focus)];
265
- @apply dark:border-dark-success-emphasis hover:dark:border-[color:var(--p-color-dark-success-hover)] focus:dark:border-[color:var(--p-color-dark-success-focus)] active:dark:border-[color:var(--p-color-dark-success-fucus)];
266
- }
267
-
268
- &--warning {
269
- @apply bg-warning-emphasis hover:bg-[color:var(--p-color-warning-hover)] focus:bg-[color:var(--p-color-warning-focus)] active:bg-[color:var(--p-color-warning-focus)];
270
- @apply dark:bg-dark-warning-emphasis hover:dark:bg-[color:var(--p-color-dark-warning-hover)] focus:dark:bg-[color:var(--p-color-dark-warning-focus)] active:dark:bg-[color:var(--p-color-dark-warning-focus)];
271
-
272
- /* Border */
273
- @apply border-warning-emphasis hover:border-[color:var(--p-color-warning-hover)] focus:border-[color:var(--p-color-warning-focus)] active:border-[color:var(--p-color-warning-focus)];
274
- @apply dark:border-dark-warning-emphasis hover:dark:border-[color:var(--p-color-dark-warning-hover)] focus:dark:border-[color:var(--p-color-dark-warning-focus)] active:dark:border-[color:var(--p-color-dark-warning-focus)]
275
- }
276
-
277
- &--danger {
278
- @apply bg-danger-emphasis hover:bg-[color:var(--p-color-danger-hover)] focus:bg-[color:var(--p-color-danger-focus)] active:bg-[color:var(--p-color-danger-focus)];
279
- @apply dark:bg-dark-danger-emphasis hover:dark:bg-[color:var(--p-color-dark-danger-hover)] focus:dark:bg-[color:var(--p-color-dark-danger-focus)] active:dark:bg-[color:var(--p-color-dark-danger-focus)];
280
-
281
- /* Border */
282
- @apply border-danger-emphasis hover:border-[color:var(--p-color-danger-hover)] focus:border-[color:var(--p-color-danger-focus)] active:border-[color:var(--p-color-danger-focus)];
283
- @apply dark:border-dark-danger-emphasis hover:dark:border-[color:var(--p-color-dark-danger-hover)] focus:dark:border-[color:var(--p-color-dark-danger-focus)] active:dark:border-[color:var(--p-color-dark-danger-focus)];
284
- }
285
- }
286
- }
287
-
288
- &&--variant-outline,
289
- &&--variant-ghost {
290
- @apply border border-solid text-default hover:text-default hover:shadow-lg focus:shadow-none active:shadow-none focus:text-default active:text-default;
291
- @apply dark:text-dark-default hover:dark:text-dark-default focus:dark:text-dark-default active:dark:text-dark-default;
292
- }
293
-
294
- /**
295
- * Button outline variant
296
- */
297
- &&--variant-outline {
298
- @apply border-default hover:border-subtle active:border-subtle focus:border-subtle;
299
- @apply dark:border-dark-default dark:hover:border-dark-subtle dark:focus:border-dark-subtle dark:active:border-dark-subtle;
300
-
301
- &.btn--emphasis {
302
- @apply border-default text-on-emphasis hover:text-on-emphasis;
303
- @apply dark:border-dark-default dark:text-dark-on-emphasis;
304
- }
305
- }
306
-
307
- /**
308
- * Button ghost variant
309
- */
310
- &&--variant-ghost {
311
- @apply border border-transparent bg-transparent hover:border-default-alpha hover:bg-default-alpha active:bg-default-alpha focus:bg-default-alpha active:border-default-alpha focus:border-default-alpha ;
312
- @apply dark:border-transparent dark:bg-transparent hover:dark:border-dark-default-alpha hover:dark:bg-dark-default-alpha active:dark:bg-dark-default-alpha focus:dark:bg-dark-default-alpha active:dark:border-dark-default-alpha focus:dark:border-dark-default-alpha;
313
-
314
- /**
315
- * Provide colors
316
- * of button ghost variant
317
- */
318
- &.btn {
319
- &--primary {
320
- @apply text-brand-action hover:text-brand-action focus:text-brand-action active:text-brand-action;
321
- @apply dark:text-dark-brand-action hover:dark:text-dark-brand-action focus:dark:text-dark-brand-action active:dark:text-dark-brand-action;
322
- }
323
-
324
- &--info {
325
- @apply text-info hover:text-info focus:text-info active:text-info;
326
- @apply dark:text-dark-info hover:dark:text-dark-info focus:dark:text-dark-info active:dark:text-dark-info;
327
- }
328
-
329
- &--success {
330
- @apply text-success hover:text-success focus:text-success active:text-success;
331
- @apply dark:text-dark-success hover:dark:text-success focus:dark:text-success active:dark:text-success;
332
- }
333
-
334
- &--warning {
335
- @apply text-warning hover:text-warning focus:text-warning active:text-warning;
336
- @apply dark:text-dark-warning hover:dark:text-warning focus:dark:text-warning active:dark:text-warning;
337
- }
338
-
339
- &--danger {
340
- @apply text-danger hover:text-danger focus:text-danger active:text-danger;
341
- @apply dark:text-dark-danger hover:dark:text-dark-danger focus:dark:text-dark-danger active:dark:text-dark-danger;
342
- }
343
- }
344
- }
345
-
346
- /**
347
- * Button link variant
348
- */
349
- &&--variant-link {
350
- &.btn {
351
- @apply text-link hover:text-[color:var(--p-text-link-hover)] focus:text-[color:var(--p-text-link-focus)] active:text-[color:var(--p-text-link-focus)];
352
- @apply dark:text-dark-link dark:hover:text-[color:var(--p-text-dark-link-hover)] dark:focus:text-[color:var(--p-text-dark-link-focus)] dark:active:text-[color:var(--p-text-dark-link-focus)];
353
-
354
- &--primary {
355
- @apply text-brand-action hover:text-[color:var(--p-color-primary-hover)];
356
- @apply dark:text-dark-brand-action dark:hover:text-[color:var(--p-color-dark-primary-hover)];
357
- }
358
-
359
- &--emphasis {
360
- @apply text-link-on-emphasis hover:text-[color:var(--p-text-link-emphasis-hover)] focus:text-[color:var(--p-text-link-emphasis-focus)] active:text-[color:var(--p-text-link-emphasis-focus)];
361
- @apply dark:text-dark-link dark:hover:text-[color:var(--p-text-dark-link-emphasis-hover)] dark:focus:text-[color:var(--p-text-dark-link-emphasis-focus)] dark:active:text-[color:var(--p-text-dark-link-emphasis-focus)];
362
- }
363
- }
364
- }
365
-
366
- /**
367
- * Button input variant
368
- */
369
- &&--variant-input {
370
- @apply border border-solid border-subtlest text-subtle font-normal bg-default hover:border-subtle focus:border-subtle active:outline-default;
371
- @apply dark:border-dark-subtlest dark:text-dark-subtle dark:bg-dark-default hover:dark:border-dark-subtle focus:dark:border-dark-subtle active:dark:outline-dark-default;
372
-
373
- .state--disabled & {
374
- @apply bg-base border-subtlest pointer-events-none text-muted;
375
- @apply dark:bg-dark-base dark:border-dark-subtlest dark:text-dark-muted;
376
- }
377
-
378
- .state--error & {
379
- @apply border-danger-emphasis;
380
- @apply dark:border-dark-danger-emphasis;
381
-
382
- &:focus {
383
- @apply ring-danger border-danger-emphasis;
384
- @apply dark:ring-dark-danger dark:border-dark-danger-emphasis;
385
- }
386
- }
387
- }
388
-
389
- /**
390
- * Button icon variant
391
- */
392
- &&--icon {
393
- @apply gap-1;
394
-
395
- &.btn--xs {
396
- @apply px-[2px];
397
- }
398
-
399
- &.btn--sm {
400
- @apply px-1;
401
- }
402
-
403
- &.btn--md {
404
- @apply px-[10px];
405
- }
406
-
407
- &.btn--lg {
408
- @apply px-4;
409
- }
410
- }
411
-
412
- &&--pill {
413
- @apply rounded-full;
414
- }
415
-
416
- &--loading {
417
- .spinner {
418
- @apply h-6;
419
- }
420
- }
421
- }
422
- </style>
@@ -1,5 +0,0 @@
1
- export type StyleVariant = 'solid' | 'outline' | 'ghost' | 'link' | 'input';
2
- export type ColorVariant = 'default' | 'primary' | 'info' | 'success' | 'warning' | 'danger' | 'emphasis';
3
- export type SizeVariant = 'xs' | 'sm' | 'md' | 'lg';
4
- export type TagVariant = 'a' | 'button';
5
- export type TypeVariant = 'button' | 'menu' | 'reset' | 'submit';
File without changes
@@ -1,220 +0,0 @@
1
- <template>
2
- <div
3
- data-testid="btn-group"
4
- :class="classNames">
5
- <slot />
6
- </div>
7
- </template>
8
-
9
- <script lang="ts" setup>
10
- import type { PropType } from 'vue-demi'
11
- import {
12
- computed,
13
- provide,
14
- toRef,
15
- } from 'vue-demi'
16
- import { BUTTONGROUP_SETTING } from '.'
17
- import type { SizeVariant } from '../button'
18
-
19
- const props = defineProps({
20
- size: {
21
- type : String as PropType<SizeVariant>,
22
- default: 'md',
23
- },
24
- pill: {
25
- type : Boolean,
26
- default: false,
27
- },
28
- })
29
-
30
- const classNames = computed(() => {
31
- const result: string[] = ['btn-group']
32
-
33
- // eslint-disable-next-line unicorn/explicit-length-check
34
- if (props.size)
35
- result.push(`btn-group--${props.size}`)
36
-
37
- if (props.pill)
38
- result.push('btn-group--pill')
39
-
40
- return result
41
- })
42
-
43
- provide(BUTTONGROUP_SETTING, { size: toRef(props, 'size') })
44
- </script>
45
-
46
- <style lang="postcss">
47
- .btn-group {
48
- @apply relative inline-flex items-center;
49
-
50
- > .btn {
51
- @apply relative flex-auto;
52
-
53
- /**
54
- * Set right radius to 0 when button is
55
- * not the last child
56
- */
57
- &:not(:last-child) {
58
- @apply rounded-r-none;
59
- }
60
-
61
- /**
62
- * Set left radius to 0 when button is:
63
- * - the third or more child
64
- * - not the first child
65
- * - the next button are dropdown
66
- */
67
- &:nth-child(n + 3),
68
- &:not(:first-child),
69
- + .dropdown > .btn {
70
- @apply rounded-l-none;
71
- }
72
-
73
- /**
74
- * Bring the hover, focus, and active button
75
- * to the front to overlay borders
76
- */
77
- &:is(:hover, :focus, :active, .active) {
78
- @apply z-1;
79
- }
80
-
81
- /**
82
- * Prevent double borders
83
- * when buttons are next to each other
84
- * and give darken color of left border
85
- * to separate each other
86
- */
87
- &:not(:first-child) {
88
- @apply -ml-[1px];
89
-
90
- &.btn--primary,
91
- &.btn--info,
92
- &.btn--success,
93
- &.btn--warning,
94
- &.btn--danger {
95
- @apply border-l-subtle-alpha;
96
- @apply dark:border-l-dark-subtle-alpha;
97
- }
98
- }
99
- }
100
-
101
- /**
102
- * Right radius should be 0 when dropdown
103
- * is not the last child
104
- * Left radius should be 0 if dropdown is
105
- * not the first child
106
- */
107
- > .dropdown {
108
- &:not(:last-child) {
109
- .btn {
110
- @apply rounded-r-none;
111
- }
112
- }
113
-
114
- /**
115
- * Prevent double borders
116
- * when dropdowns are next to each other
117
- * Give darken color of left border
118
- * to separate each other
119
- */
120
- &:not(:first-child) {
121
- .btn {
122
- @apply -ml-[1px] rounded-l-none border-l-subtle-alpha;
123
- @apply dark:border-l-dark-subtle-alpha;
124
- }
125
- }
126
- }
127
-
128
- /**
129
- * Sizing the button group,
130
- * and set rounded of first
131
- * & last button in each size
132
- */
133
- &&--xs:not(&--pill) {
134
- .btn {
135
- &:not(.btn--icon),
136
- .dropdown .btn {
137
- &:first-child {
138
- @apply rounded-l-xs;
139
- }
140
-
141
- &:last-child {
142
- @apply rounded-r-xs;
143
- }
144
- }
145
-
146
- &:is(.btn--icon) {
147
- @apply p-[.1rem];
148
- }
149
- }
150
- }
151
-
152
- &&--sm:not(&--pill) {
153
- .btn {
154
- &:not(.btn--icon),
155
- .dropdown .btn {
156
- &:first-child {
157
- @apply rounded-l-sm;
158
- }
159
-
160
- &:last-child {
161
- @apply rounded-r-sm;
162
- }
163
- }
164
-
165
- &:is(.btn--icon) {
166
- @apply p-[6px];
167
- }
168
- }
169
- }
170
-
171
- &&--md:not(&--pill),
172
- &&--lg:not(&--pill) {
173
- .btn {
174
- &:not(.btn--icon),
175
- .dropdown .btn {
176
- &:first-child {
177
- @apply rounded-l;
178
- }
179
-
180
- &:last-child {
181
- @apply rounded-r;
182
- }
183
- }
184
- }
185
- }
186
-
187
- &&--md {
188
- .btn {
189
- &:is(.btn--icon) {
190
- @apply p-[12px];
191
- }
192
- }
193
- }
194
-
195
- &&--lg:not(&--pill) {
196
- .btn {
197
- &:is(.btn--icon) {
198
- @apply p-[18px];
199
- }
200
- }
201
- }
202
-
203
- /**
204
- * The left radius of first child and
205
- * the right radius of the last child
206
- * should be fully rounded in pill variant
207
- */
208
- &&--pill {
209
- > .btn {
210
- &:first-child {
211
- @apply rounded-l-full;
212
- }
213
-
214
- &:last-child {
215
- @apply rounded-r-full;
216
- }
217
- }
218
- }
219
- }
220
- </style>
@@ -1,6 +0,0 @@
1
- import type { InjectionKey, Ref } from 'vue-demi';
2
- import type { SizeVariant } from '../button';
3
- export interface ButtonGroupSetting {
4
- size?: Ref<SizeVariant>;
5
- }
6
- export declare const BUTTONGROUP_SETTING: InjectionKey<ButtonGroupSetting>;
@@ -1 +0,0 @@
1
- export const BUTTONGROUP_SETTING = Symbol("ButtonGroupSetting");