nuance-ui 0.1.1

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 (386) hide show
  1. package/README.md +90 -0
  2. package/dist/module.d.mts +24 -0
  3. package/dist/module.json +12 -0
  4. package/dist/module.mjs +96 -0
  5. package/dist/runtime/components/action-icon/action-icon-group.d.vue.ts +17 -0
  6. package/dist/runtime/components/action-icon/action-icon-group.vue +13 -0
  7. package/dist/runtime/components/action-icon/action-icon-group.vue.d.ts +17 -0
  8. package/dist/runtime/components/action-icon/action-icon-section.d.vue.ts +23 -0
  9. package/dist/runtime/components/action-icon/action-icon-section.vue +45 -0
  10. package/dist/runtime/components/action-icon/action-icon-section.vue.d.ts +23 -0
  11. package/dist/runtime/components/action-icon/action-icon.d.vue.ts +29 -0
  12. package/dist/runtime/components/action-icon/action-icon.module.css +1 -0
  13. package/dist/runtime/components/action-icon/action-icon.vue +71 -0
  14. package/dist/runtime/components/action-icon/action-icon.vue.d.ts +29 -0
  15. package/dist/runtime/components/action-icon/index.d.ts +3 -0
  16. package/dist/runtime/components/action-icon/index.js +0 -0
  17. package/dist/runtime/components/app-shell/app-shell-aside.d.vue.ts +14 -0
  18. package/dist/runtime/components/app-shell/app-shell-aside.vue +43 -0
  19. package/dist/runtime/components/app-shell/app-shell-aside.vue.d.ts +14 -0
  20. package/dist/runtime/components/app-shell/app-shell-footer.d.vue.ts +14 -0
  21. package/dist/runtime/components/app-shell/app-shell-footer.vue +42 -0
  22. package/dist/runtime/components/app-shell/app-shell-footer.vue.d.ts +14 -0
  23. package/dist/runtime/components/app-shell/app-shell-header.d.vue.ts +14 -0
  24. package/dist/runtime/components/app-shell/app-shell-header.vue +43 -0
  25. package/dist/runtime/components/app-shell/app-shell-header.vue.d.ts +14 -0
  26. package/dist/runtime/components/app-shell/app-shell-main.d.vue.ts +14 -0
  27. package/dist/runtime/components/app-shell/app-shell-main.vue +30 -0
  28. package/dist/runtime/components/app-shell/app-shell-main.vue.d.ts +14 -0
  29. package/dist/runtime/components/app-shell/app-shell-navbar.d.vue.ts +14 -0
  30. package/dist/runtime/components/app-shell/app-shell-navbar.vue +47 -0
  31. package/dist/runtime/components/app-shell/app-shell-navbar.vue.d.ts +14 -0
  32. package/dist/runtime/components/app-shell/app-shell-section.d.vue.ts +18 -0
  33. package/dist/runtime/components/app-shell/app-shell-section.vue +22 -0
  34. package/dist/runtime/components/app-shell/app-shell-section.vue.d.ts +18 -0
  35. package/dist/runtime/components/app-shell/app-shell.d.vue.ts +27 -0
  36. package/dist/runtime/components/app-shell/app-shell.vue +70 -0
  37. package/dist/runtime/components/app-shell/app-shell.vue.d.ts +27 -0
  38. package/dist/runtime/components/app-shell/index.d.ts +7 -0
  39. package/dist/runtime/components/app-shell/index.js +0 -0
  40. package/dist/runtime/components/background-image.d.vue.ts +10 -0
  41. package/dist/runtime/components/background-image.vue +37 -0
  42. package/dist/runtime/components/background-image.vue.d.ts +10 -0
  43. package/dist/runtime/components/box.d.vue.ts +20 -0
  44. package/dist/runtime/components/box.vue +14 -0
  45. package/dist/runtime/components/box.vue.d.ts +20 -0
  46. package/dist/runtime/components/button/button-group.d.vue.ts +17 -0
  47. package/dist/runtime/components/button/button-group.vue +13 -0
  48. package/dist/runtime/components/button/button-group.vue.d.ts +17 -0
  49. package/dist/runtime/components/button/button.d.vue.ts +40 -0
  50. package/dist/runtime/components/button/button.module.css +1 -0
  51. package/dist/runtime/components/button/button.vue +108 -0
  52. package/dist/runtime/components/button/button.vue.d.ts +40 -0
  53. package/dist/runtime/components/button/index.d.ts +3 -0
  54. package/dist/runtime/components/button/index.js +0 -0
  55. package/dist/runtime/components/button/unstyled-button.d.vue.ts +16 -0
  56. package/dist/runtime/components/button/unstyled-button.vue +37 -0
  57. package/dist/runtime/components/button/unstyled-button.vue.d.ts +16 -0
  58. package/dist/runtime/components/card/card-section.d.vue.ts +19 -0
  59. package/dist/runtime/components/card/card-section.vue +14 -0
  60. package/dist/runtime/components/card/card-section.vue.d.ts +19 -0
  61. package/dist/runtime/components/card/card.d.vue.ts +18 -0
  62. package/dist/runtime/components/card/card.module.css +1 -0
  63. package/dist/runtime/components/card/card.vue +18 -0
  64. package/dist/runtime/components/card/card.vue.d.ts +18 -0
  65. package/dist/runtime/components/card/index.d.ts +2 -0
  66. package/dist/runtime/components/card/index.js +0 -0
  67. package/dist/runtime/components/checkbox/checkbox-card.d.vue.ts +30 -0
  68. package/dist/runtime/components/checkbox/checkbox-card.vue +76 -0
  69. package/dist/runtime/components/checkbox/checkbox-card.vue.d.ts +30 -0
  70. package/dist/runtime/components/checkbox/checkbox-group.d.vue.ts +34 -0
  71. package/dist/runtime/components/checkbox/checkbox-group.vue +32 -0
  72. package/dist/runtime/components/checkbox/checkbox-group.vue.d.ts +34 -0
  73. package/dist/runtime/components/checkbox/checkbox-indicator.d.vue.ts +37 -0
  74. package/dist/runtime/components/checkbox/checkbox-indicator.vue +161 -0
  75. package/dist/runtime/components/checkbox/checkbox-indicator.vue.d.ts +37 -0
  76. package/dist/runtime/components/checkbox/checkbox.d.vue.ts +36 -0
  77. package/dist/runtime/components/checkbox/checkbox.vue +190 -0
  78. package/dist/runtime/components/checkbox/checkbox.vue.d.ts +36 -0
  79. package/dist/runtime/components/checkbox/index.d.ts +6 -0
  80. package/dist/runtime/components/checkbox/index.js +2 -0
  81. package/dist/runtime/components/checkbox/lib/card.context.d.ts +7 -0
  82. package/dist/runtime/components/checkbox/lib/card.context.js +8 -0
  83. package/dist/runtime/components/checkbox/lib/group.context.d.ts +16 -0
  84. package/dist/runtime/components/checkbox/lib/group.context.js +15 -0
  85. package/dist/runtime/components/chip/chip-group.d.vue.ts +24 -0
  86. package/dist/runtime/components/chip/chip-group.vue +20 -0
  87. package/dist/runtime/components/chip/chip-group.vue.d.ts +24 -0
  88. package/dist/runtime/components/chip/chip.d.vue.ts +35 -0
  89. package/dist/runtime/components/chip/chip.vue +270 -0
  90. package/dist/runtime/components/chip/chip.vue.d.ts +35 -0
  91. package/dist/runtime/components/chip/index.d.ts +3 -0
  92. package/dist/runtime/components/chip/index.js +1 -0
  93. package/dist/runtime/components/chip/lib.d.ts +14 -0
  94. package/dist/runtime/components/chip/lib.js +25 -0
  95. package/dist/runtime/components/combobox/combobox-dropdown.d.vue.ts +13 -0
  96. package/dist/runtime/components/combobox/combobox-dropdown.vue +33 -0
  97. package/dist/runtime/components/combobox/combobox-dropdown.vue.d.ts +13 -0
  98. package/dist/runtime/components/combobox/combobox-empty.d.vue.ts +16 -0
  99. package/dist/runtime/components/combobox/combobox-empty.vue +11 -0
  100. package/dist/runtime/components/combobox/combobox-empty.vue.d.ts +16 -0
  101. package/dist/runtime/components/combobox/combobox-group.d.vue.ts +27 -0
  102. package/dist/runtime/components/combobox/combobox-group.vue +47 -0
  103. package/dist/runtime/components/combobox/combobox-group.vue.d.ts +27 -0
  104. package/dist/runtime/components/combobox/combobox-option-list.d.vue.ts +18 -0
  105. package/dist/runtime/components/combobox/combobox-option-list.vue +13 -0
  106. package/dist/runtime/components/combobox/combobox-option-list.vue.d.ts +18 -0
  107. package/dist/runtime/components/combobox/combobox-option.d.vue.ts +23 -0
  108. package/dist/runtime/components/combobox/combobox-option.vue +65 -0
  109. package/dist/runtime/components/combobox/combobox-option.vue.d.ts +23 -0
  110. package/dist/runtime/components/combobox/combobox-options-dropdown.d.vue.ts +34 -0
  111. package/dist/runtime/components/combobox/combobox-options-dropdown.vue +74 -0
  112. package/dist/runtime/components/combobox/combobox-options-dropdown.vue.d.ts +34 -0
  113. package/dist/runtime/components/combobox/combobox-root.d.vue.ts +49 -0
  114. package/dist/runtime/components/combobox/combobox-root.vue +46 -0
  115. package/dist/runtime/components/combobox/combobox-root.vue.d.ts +49 -0
  116. package/dist/runtime/components/combobox/combobox-target.d.vue.ts +29 -0
  117. package/dist/runtime/components/combobox/combobox-target.vue +32 -0
  118. package/dist/runtime/components/combobox/combobox-target.vue.d.ts +29 -0
  119. package/dist/runtime/components/combobox/combobox.module.css +1 -0
  120. package/dist/runtime/components/combobox/index.d.ts +11 -0
  121. package/dist/runtime/components/combobox/index.js +2 -0
  122. package/dist/runtime/components/combobox/lib/const.d.ts +7 -0
  123. package/dist/runtime/components/combobox/lib/const.js +6 -0
  124. package/dist/runtime/components/combobox/lib/context.d.ts +16 -0
  125. package/dist/runtime/components/combobox/lib/context.js +8 -0
  126. package/dist/runtime/components/combobox/lib/use-combobox/get-index.d.ts +3 -0
  127. package/dist/runtime/components/combobox/lib/use-combobox/get-index.js +33 -0
  128. package/dist/runtime/components/combobox/lib/use-combobox/handlers.d.ts +36 -0
  129. package/dist/runtime/components/combobox/lib/use-combobox/handlers.js +82 -0
  130. package/dist/runtime/components/combobox/lib/use-combobox/index.d.ts +1 -0
  131. package/dist/runtime/components/combobox/lib/use-combobox/index.js +1 -0
  132. package/dist/runtime/components/combobox/lib/use-combobox/use-combobox.d.ts +70 -0
  133. package/dist/runtime/components/combobox/lib/use-combobox/use-combobox.js +97 -0
  134. package/dist/runtime/components/combobox/lib/use-combobox-data/get-parsed-combobox-data.d.ts +2 -0
  135. package/dist/runtime/components/combobox/lib/use-combobox-data/get-parsed-combobox-data.js +23 -0
  136. package/dist/runtime/components/combobox/lib/use-combobox-data/index.d.ts +1 -0
  137. package/dist/runtime/components/combobox/lib/use-combobox-data/index.js +1 -0
  138. package/dist/runtime/components/combobox/lib/use-combobox-data/use-combobox-data.d.ts +7 -0
  139. package/dist/runtime/components/combobox/lib/use-combobox-data/use-combobox-data.js +23 -0
  140. package/dist/runtime/components/combobox/lib/use-combobox-target.d.ts +25 -0
  141. package/dist/runtime/components/combobox/lib/use-combobox-target.js +65 -0
  142. package/dist/runtime/components/combobox/lib/utils/default-option-filter.d.ts +7 -0
  143. package/dist/runtime/components/combobox/lib/utils/default-option-filter.js +27 -0
  144. package/dist/runtime/components/combobox/lib/utils/index.d.ts +5 -0
  145. package/dist/runtime/components/combobox/lib/utils/index.js +6 -0
  146. package/dist/runtime/components/combobox/lib/utils/is-empty-combobox-data.d.ts +2 -0
  147. package/dist/runtime/components/combobox/lib/utils/is-empty-combobox-data.js +11 -0
  148. package/dist/runtime/components/combobox/lib/utils/is-options-group.d.ts +2 -0
  149. package/dist/runtime/components/combobox/lib/utils/is-options-group.js +3 -0
  150. package/dist/runtime/components/combobox/types/index.d.ts +19 -0
  151. package/dist/runtime/components/combobox/types/index.js +1 -0
  152. package/dist/runtime/components/combobox/types/item.d.ts +22 -0
  153. package/dist/runtime/components/combobox/types/item.js +0 -0
  154. package/dist/runtime/components/container.d.vue.ts +19 -0
  155. package/dist/runtime/components/container.vue +33 -0
  156. package/dist/runtime/components/container.vue.d.ts +19 -0
  157. package/dist/runtime/components/dialog/dialog-close-button.d.vue.ts +14 -0
  158. package/dist/runtime/components/dialog/dialog-close-button.vue +28 -0
  159. package/dist/runtime/components/dialog/dialog-close-button.vue.d.ts +14 -0
  160. package/dist/runtime/components/dialog/dialog-header.d.vue.ts +16 -0
  161. package/dist/runtime/components/dialog/dialog-header.vue +11 -0
  162. package/dist/runtime/components/dialog/dialog-header.vue.d.ts +16 -0
  163. package/dist/runtime/components/dialog/dialog-root.d.vue.ts +54 -0
  164. package/dist/runtime/components/dialog/dialog-root.vue +93 -0
  165. package/dist/runtime/components/dialog/dialog-root.vue.d.ts +54 -0
  166. package/dist/runtime/components/dialog/dialog-title.d.vue.ts +16 -0
  167. package/dist/runtime/components/dialog/dialog-title.vue +11 -0
  168. package/dist/runtime/components/dialog/dialog-title.vue.d.ts +16 -0
  169. package/dist/runtime/components/dialog/dialog.module.css +1 -0
  170. package/dist/runtime/components/dialog/index.d.ts +5 -0
  171. package/dist/runtime/components/dialog/index.js +1 -0
  172. package/dist/runtime/components/dialog/lib.d.ts +2 -0
  173. package/dist/runtime/components/dialog/lib.js +8 -0
  174. package/dist/runtime/components/dialog/types/index.d.ts +9 -0
  175. package/dist/runtime/components/dialog/types/index.js +0 -0
  176. package/dist/runtime/components/drawer/drawer-close-button.d.vue.ts +14 -0
  177. package/dist/runtime/components/drawer/drawer-close-button.vue +20 -0
  178. package/dist/runtime/components/drawer/drawer-close-button.vue.d.ts +14 -0
  179. package/dist/runtime/components/drawer/drawer-header.d.vue.ts +16 -0
  180. package/dist/runtime/components/drawer/drawer-header.vue +10 -0
  181. package/dist/runtime/components/drawer/drawer-header.vue.d.ts +16 -0
  182. package/dist/runtime/components/drawer/drawer-root.d.vue.ts +31 -0
  183. package/dist/runtime/components/drawer/drawer-root.vue +45 -0
  184. package/dist/runtime/components/drawer/drawer-root.vue.d.ts +31 -0
  185. package/dist/runtime/components/drawer/drawer-title.d.vue.ts +16 -0
  186. package/dist/runtime/components/drawer/drawer-title.vue +10 -0
  187. package/dist/runtime/components/drawer/drawer-title.vue.d.ts +16 -0
  188. package/dist/runtime/components/drawer/drawer.module.css +1 -0
  189. package/dist/runtime/components/drawer/index.d.ts +3 -0
  190. package/dist/runtime/components/drawer/index.js +0 -0
  191. package/dist/runtime/components/index.d.ts +26 -0
  192. package/dist/runtime/components/index.js +26 -0
  193. package/dist/runtime/components/input/index.d.ts +10 -0
  194. package/dist/runtime/components/input/index.js +1 -0
  195. package/dist/runtime/components/input/input.d.vue.ts +38 -0
  196. package/dist/runtime/components/input/input.vue +38 -0
  197. package/dist/runtime/components/input/input.vue.d.ts +38 -0
  198. package/dist/runtime/components/input/lib/input-wrapper.context.d.ts +18 -0
  199. package/dist/runtime/components/input/lib/input-wrapper.context.js +9 -0
  200. package/dist/runtime/components/input/number-input.d.vue.ts +36 -0
  201. package/dist/runtime/components/input/number-input.vue +172 -0
  202. package/dist/runtime/components/input/number-input.vue.d.ts +36 -0
  203. package/dist/runtime/components/input/password-input.d.vue.ts +4 -0
  204. package/dist/runtime/components/input/password-input.vue +28 -0
  205. package/dist/runtime/components/input/password-input.vue.d.ts +4 -0
  206. package/dist/runtime/components/input/text-input.d.vue.ts +32 -0
  207. package/dist/runtime/components/input/text-input.vue +38 -0
  208. package/dist/runtime/components/input/text-input.vue.d.ts +32 -0
  209. package/dist/runtime/components/input/types/index.d.ts +5 -0
  210. package/dist/runtime/components/input/types/index.js +0 -0
  211. package/dist/runtime/components/input/ui/input-base.d.vue.ts +28 -0
  212. package/dist/runtime/components/input/ui/input-base.vue +343 -0
  213. package/dist/runtime/components/input/ui/input-base.vue.d.ts +28 -0
  214. package/dist/runtime/components/input/ui/input-inline.d.vue.ts +30 -0
  215. package/dist/runtime/components/input/ui/input-inline.vue +138 -0
  216. package/dist/runtime/components/input/ui/input-inline.vue.d.ts +30 -0
  217. package/dist/runtime/components/input/ui/input-label.d.vue.ts +18 -0
  218. package/dist/runtime/components/input/ui/input-label.vue +26 -0
  219. package/dist/runtime/components/input/ui/input-label.vue.d.ts +18 -0
  220. package/dist/runtime/components/input/ui/input-wrapper.d.vue.ts +26 -0
  221. package/dist/runtime/components/input/ui/input-wrapper.vue +96 -0
  222. package/dist/runtime/components/input/ui/input-wrapper.vue.d.ts +26 -0
  223. package/dist/runtime/components/link/index.d.ts +3 -0
  224. package/dist/runtime/components/link/index.js +1 -0
  225. package/dist/runtime/components/link/lib.d.ts +16 -0
  226. package/dist/runtime/components/link/lib.js +25 -0
  227. package/dist/runtime/components/link/link-button.d.vue.ts +21 -0
  228. package/dist/runtime/components/link/link-button.vue +42 -0
  229. package/dist/runtime/components/link/link-button.vue.d.ts +21 -0
  230. package/dist/runtime/components/link/link.d.vue.ts +18 -0
  231. package/dist/runtime/components/link/link.vue +47 -0
  232. package/dist/runtime/components/link/link.vue.d.ts +18 -0
  233. package/dist/runtime/components/loader/_loaders/bars-loader.d.vue.ts +3 -0
  234. package/dist/runtime/components/loader/_loaders/bars-loader.vue +11 -0
  235. package/dist/runtime/components/loader/_loaders/bars-loader.vue.d.ts +3 -0
  236. package/dist/runtime/components/loader/_loaders/dots-loader.d.vue.ts +3 -0
  237. package/dist/runtime/components/loader/_loaders/dots-loader.vue +11 -0
  238. package/dist/runtime/components/loader/_loaders/dots-loader.vue.d.ts +3 -0
  239. package/dist/runtime/components/loader/_loaders/oval-loader.d.vue.ts +3 -0
  240. package/dist/runtime/components/loader/_loaders/oval-loader.vue +7 -0
  241. package/dist/runtime/components/loader/_loaders/oval-loader.vue.d.ts +3 -0
  242. package/dist/runtime/components/loader/index.d.ts +1 -0
  243. package/dist/runtime/components/loader/index.js +0 -0
  244. package/dist/runtime/components/loader/loader.d.vue.ts +10 -0
  245. package/dist/runtime/components/loader/loader.vue +37 -0
  246. package/dist/runtime/components/loader/loader.vue.d.ts +10 -0
  247. package/dist/runtime/components/modal/index.d.ts +3 -0
  248. package/dist/runtime/components/modal/index.js +0 -0
  249. package/dist/runtime/components/modal/modal-close-button.d.vue.ts +14 -0
  250. package/dist/runtime/components/modal/modal-close-button.vue +20 -0
  251. package/dist/runtime/components/modal/modal-close-button.vue.d.ts +14 -0
  252. package/dist/runtime/components/modal/modal-header.d.vue.ts +16 -0
  253. package/dist/runtime/components/modal/modal-header.vue +10 -0
  254. package/dist/runtime/components/modal/modal-header.vue.d.ts +16 -0
  255. package/dist/runtime/components/modal/modal-root.d.vue.ts +33 -0
  256. package/dist/runtime/components/modal/modal-root.vue +30 -0
  257. package/dist/runtime/components/modal/modal-root.vue.d.ts +33 -0
  258. package/dist/runtime/components/modal/modal-title.d.vue.ts +16 -0
  259. package/dist/runtime/components/modal/modal-title.vue +10 -0
  260. package/dist/runtime/components/modal/modal-title.vue.d.ts +16 -0
  261. package/dist/runtime/components/modal/modal.module.css +1 -0
  262. package/dist/runtime/components/nav-link/index.d.ts +1 -0
  263. package/dist/runtime/components/nav-link/index.js +0 -0
  264. package/dist/runtime/components/nav-link/nav-link.d.vue.ts +35 -0
  265. package/dist/runtime/components/nav-link/nav-link.vue +201 -0
  266. package/dist/runtime/components/nav-link/nav-link.vue.d.ts +35 -0
  267. package/dist/runtime/components/paper.d.vue.ts +20 -0
  268. package/dist/runtime/components/paper.vue +53 -0
  269. package/dist/runtime/components/paper.vue.d.ts +20 -0
  270. package/dist/runtime/components/popover/index.d.ts +1 -0
  271. package/dist/runtime/components/popover/index.js +0 -0
  272. package/dist/runtime/components/popover/lib/context.d.ts +14 -0
  273. package/dist/runtime/components/popover/lib/context.js +8 -0
  274. package/dist/runtime/components/popover/lib/get-arrow-position.d.ts +12 -0
  275. package/dist/runtime/components/popover/lib/get-arrow-position.js +88 -0
  276. package/dist/runtime/components/popover/lib/use-popover.d.ts +23 -0
  277. package/dist/runtime/components/popover/lib/use-popover.js +47 -0
  278. package/dist/runtime/components/popover/popover-dropdown.d.vue.ts +13 -0
  279. package/dist/runtime/components/popover/popover-dropdown.vue +90 -0
  280. package/dist/runtime/components/popover/popover-dropdown.vue.d.ts +13 -0
  281. package/dist/runtime/components/popover/popover-target.d.vue.ts +13 -0
  282. package/dist/runtime/components/popover/popover-target.vue +11 -0
  283. package/dist/runtime/components/popover/popover-target.vue.d.ts +13 -0
  284. package/dist/runtime/components/popover/popover.d.vue.ts +27 -0
  285. package/dist/runtime/components/popover/popover.vue +79 -0
  286. package/dist/runtime/components/popover/popover.vue.d.ts +27 -0
  287. package/dist/runtime/components/popover/types/index.d.ts +42 -0
  288. package/dist/runtime/components/popover/types/index.js +0 -0
  289. package/dist/runtime/components/renderless/renderless-slot.d.ts +6 -0
  290. package/dist/runtime/components/renderless/renderless-slot.js +32 -0
  291. package/dist/runtime/components/renderless/renderless.d.vue.ts +13 -0
  292. package/dist/runtime/components/renderless/renderless.vue +12 -0
  293. package/dist/runtime/components/renderless/renderless.vue.d.ts +13 -0
  294. package/dist/runtime/components/select/index.d.ts +1 -0
  295. package/dist/runtime/components/select/index.js +0 -0
  296. package/dist/runtime/components/select/select.d.vue.ts +45 -0
  297. package/dist/runtime/components/select/select.vue +131 -0
  298. package/dist/runtime/components/select/select.vue.d.ts +45 -0
  299. package/dist/runtime/components/tabs/index.d.ts +1 -0
  300. package/dist/runtime/components/tabs/index.js +1 -0
  301. package/dist/runtime/components/tabs/lib.d.ts +142 -0
  302. package/dist/runtime/components/tabs/lib.js +18 -0
  303. package/dist/runtime/components/tabs/tabs-list.d.vue.ts +19 -0
  304. package/dist/runtime/components/tabs/tabs-list.vue +31 -0
  305. package/dist/runtime/components/tabs/tabs-list.vue.d.ts +19 -0
  306. package/dist/runtime/components/tabs/tabs-panel.d.vue.ts +17 -0
  307. package/dist/runtime/components/tabs/tabs-panel.vue +23 -0
  308. package/dist/runtime/components/tabs/tabs-panel.vue.d.ts +17 -0
  309. package/dist/runtime/components/tabs/tabs-root.d.vue.ts +47 -0
  310. package/dist/runtime/components/tabs/tabs-root.vue +71 -0
  311. package/dist/runtime/components/tabs/tabs-root.vue.d.ts +47 -0
  312. package/dist/runtime/components/tabs/tabs-tab.d.vue.ts +22 -0
  313. package/dist/runtime/components/tabs/tabs-tab.vue +41 -0
  314. package/dist/runtime/components/tabs/tabs-tab.vue.d.ts +22 -0
  315. package/dist/runtime/components/tabs/tabs.module.css +1 -0
  316. package/dist/runtime/components/text.d.vue.ts +37 -0
  317. package/dist/runtime/components/text.vue +122 -0
  318. package/dist/runtime/components/text.vue.d.ts +37 -0
  319. package/dist/runtime/components/textarea.d.vue.ts +33 -0
  320. package/dist/runtime/components/textarea.vue +48 -0
  321. package/dist/runtime/components/textarea.vue.d.ts +33 -0
  322. package/dist/runtime/components/title.d.vue.ts +18 -0
  323. package/dist/runtime/components/title.vue +34 -0
  324. package/dist/runtime/components/title.vue.d.ts +18 -0
  325. package/dist/runtime/components/transition/index.d.ts +1 -0
  326. package/dist/runtime/components/transition/index.js +0 -0
  327. package/dist/runtime/components/transition/transition.d.vue.ts +25 -0
  328. package/dist/runtime/components/transition/transition.vue +31 -0
  329. package/dist/runtime/components/transition/transition.vue.d.ts +25 -0
  330. package/dist/runtime/components/visually-hidden/index.d.ts +2 -0
  331. package/dist/runtime/components/visually-hidden/index.js +0 -0
  332. package/dist/runtime/components/visually-hidden/visually-hidden-input.d.vue.ts +22 -0
  333. package/dist/runtime/components/visually-hidden/visually-hidden-input.vue +13 -0
  334. package/dist/runtime/components/visually-hidden/visually-hidden-input.vue.d.ts +22 -0
  335. package/dist/runtime/components/visually-hidden/visually-hidden.d.vue.ts +17 -0
  336. package/dist/runtime/components/visually-hidden/visually-hidden.vue +22 -0
  337. package/dist/runtime/components/visually-hidden/visually-hidden.vue.d.ts +17 -0
  338. package/dist/runtime/composals/index.d.ts +4 -0
  339. package/dist/runtime/composals/index.js +4 -0
  340. package/dist/runtime/composals/use-active-link.d.ts +5 -0
  341. package/dist/runtime/composals/use-active-link.js +20 -0
  342. package/dist/runtime/composals/use-mod.d.ts +2 -0
  343. package/dist/runtime/composals/use-mod.js +25 -0
  344. package/dist/runtime/composals/use-style-resolver.d.ts +3 -0
  345. package/dist/runtime/composals/use-style-resolver.js +5 -0
  346. package/dist/runtime/composals/use-theme.d.ts +9 -0
  347. package/dist/runtime/composals/use-theme.js +4 -0
  348. package/dist/runtime/const/index.d.ts +2 -0
  349. package/dist/runtime/const/index.js +6 -0
  350. package/dist/runtime/helpers/create-strict-injection.d.ts +94 -0
  351. package/dist/runtime/helpers/create-strict-injection.js +11 -0
  352. package/dist/runtime/helpers/index.d.ts +1 -0
  353. package/dist/runtime/helpers/index.js +1 -0
  354. package/dist/runtime/server/tsconfig.json +3 -0
  355. package/dist/runtime/styles/baseline.css +1 -0
  356. package/dist/runtime/styles/colors.css +1 -0
  357. package/dist/runtime/styles/const.css +1 -0
  358. package/dist/runtime/styles/dark-theme.css +1 -0
  359. package/dist/runtime/styles/global.css +1 -0
  360. package/dist/runtime/styles/light-theme.css +1 -0
  361. package/dist/runtime/types/index.d.ts +1 -0
  362. package/dist/runtime/types/index.js +0 -0
  363. package/dist/runtime/types/theme.d.ts +25 -0
  364. package/dist/runtime/types/theme.js +0 -0
  365. package/dist/runtime/utils/boolean/is-falsy.d.ts +1 -0
  366. package/dist/runtime/utils/boolean/is-falsy.js +7 -0
  367. package/dist/runtime/utils/boolean/is-number-like.d.ts +1 -0
  368. package/dist/runtime/utils/boolean/is-number-like.js +13 -0
  369. package/dist/runtime/utils/color-functions/get-gradient.d.ts +3 -0
  370. package/dist/runtime/utils/color-functions/get-gradient.js +25 -0
  371. package/dist/runtime/utils/converters/rem.d.ts +2 -0
  372. package/dist/runtime/utils/converters/rem.js +43 -0
  373. package/dist/runtime/utils/get-color-var.d.ts +2 -0
  374. package/dist/runtime/utils/get-color-var.js +6 -0
  375. package/dist/runtime/utils/get-safe-id.d.ts +1 -0
  376. package/dist/runtime/utils/get-safe-id.js +8 -0
  377. package/dist/runtime/utils/get-size/get-size.d.ts +6 -0
  378. package/dist/runtime/utils/get-size/get-size.js +24 -0
  379. package/dist/runtime/utils/index.d.ts +7 -0
  380. package/dist/runtime/utils/index.js +7 -0
  381. package/dist/runtime/utils/parse-theme-color/parse-theme-color.d.ts +14 -0
  382. package/dist/runtime/utils/parse-theme-color/parse-theme-color.js +73 -0
  383. package/dist/runtime/utils/vars-resolver/create-variant-color-resolver.d.ts +14 -0
  384. package/dist/runtime/utils/vars-resolver/create-variant-color-resolver.js +106 -0
  385. package/dist/types.d.mts +3 -0
  386. package/package.json +96 -0
@@ -0,0 +1,82 @@
1
+ import { nextTick } from "vue";
2
+ import { getFirstIndex, getNextIndex, getPreviousIndex } from "./get-index.js";
3
+ export function clearSelected({ listId, attrs }) {
4
+ const selected = document.querySelector(`#${listId} [${attrs.selected}]`);
5
+ selected?.removeAttribute(attrs.selected);
6
+ selected?.removeAttribute("aria-selected");
7
+ }
8
+ export function selectOption(ix, {
9
+ listId,
10
+ attrs,
11
+ scrollBehavior,
12
+ clearFn
13
+ }) {
14
+ const items = document.querySelectorAll(`#${listId} [${attrs.option}]`);
15
+ if (!items)
16
+ return;
17
+ const nextIndex = ix >= items.length ? 0 : ix < 0 ? items.length - 1 : ix;
18
+ if (items?.[nextIndex] && !items[nextIndex].hasAttribute(attrs.disabled)) {
19
+ clearFn(listId);
20
+ const item = items[nextIndex];
21
+ item.setAttribute(attrs.selected, "true");
22
+ item.setAttribute("aria-selected", "true");
23
+ item.scrollIntoView({ block: "nearest", behavior: scrollBehavior });
24
+ return { ix: nextIndex, value: item.id };
25
+ }
26
+ return { ix: nextIndex, value: null };
27
+ }
28
+ export function selectActiveOption({
29
+ listId,
30
+ attrs,
31
+ selectFn
32
+ }) {
33
+ const activeOption = document.querySelector(`#${listId} [${attrs.active}]`);
34
+ if (activeOption) {
35
+ const items = document.querySelectorAll(`#${listId} [${attrs.option}]`);
36
+ const index = Array.from(items).findIndex((option) => option === activeOption);
37
+ return selectFn(index);
38
+ }
39
+ return selectFn(0);
40
+ }
41
+ export function selectNextOption(ix, {
42
+ listId,
43
+ loop,
44
+ attrs,
45
+ selectFn
46
+ }) {
47
+ return selectFn(getNextIndex(
48
+ ix,
49
+ document.querySelectorAll(`#${listId} [${attrs.option}]`),
50
+ loop,
51
+ attrs.disabled
52
+ ));
53
+ }
54
+ export function selectPrevOption(ix, {
55
+ listId,
56
+ loop,
57
+ attrs,
58
+ selectFn
59
+ }) {
60
+ return selectFn(getPreviousIndex(
61
+ ix,
62
+ document.querySelectorAll(`#${listId} [${attrs.option}]`),
63
+ loop,
64
+ attrs.disabled
65
+ ));
66
+ }
67
+ export function selectFirstOption({ listId, attrs, selectFn }) {
68
+ return selectFn(
69
+ getFirstIndex(document.querySelectorAll(`#${listId} [${attrs.option}]`), attrs.disabled)
70
+ );
71
+ }
72
+ export function updateSelectedOptionIx(target = "selected", { listId, attrs, scrollIntoView, scrollBehavior }) {
73
+ let ix = -1;
74
+ nextTick(() => {
75
+ const items = document.querySelectorAll(`#${listId} [${attrs.option}]`);
76
+ const index = Array.from(items).findIndex((option) => option.hasAttribute(attrs[target]));
77
+ ix = index;
78
+ if (scrollIntoView)
79
+ items[index]?.scrollIntoView({ block: "nearest", behavior: scrollBehavior });
80
+ });
81
+ return ix;
82
+ }
@@ -0,0 +1 @@
1
+ export { type ComboboxStore, useCombobox } from './use-combobox.js';
@@ -0,0 +1 @@
1
+ export { useCombobox } from "./use-combobox.js";
@@ -0,0 +1,70 @@
1
+ import type { ModelRef, ShallowRef } from 'vue';
2
+ import type { ComboboxDropdownEventSource } from '../../types/index.js';
3
+ import type { ComboboxAttrs } from '../const.js';
4
+ export interface ComboboxStore {
5
+ /** Id passed to dropdown */
6
+ listId: string;
7
+ /** Opens dropdown */
8
+ openDropdown: (eventSource?: ComboboxDropdownEventSource) => void;
9
+ /** Closes dropdown */
10
+ closeDropdown: (eventSource?: ComboboxDropdownEventSource) => void;
11
+ /** Toggles dropdown opened state */
12
+ toggleDropdown: (eventSource?: ComboboxDropdownEventSource) => void;
13
+ /** Returns currently selected option index or `-1` if none of the options is selected */
14
+ getSelectedOptionIx: () => number;
15
+ /** Selects `Combobox.Option` by index */
16
+ selectOption: (index: number) => void;
17
+ /**
18
+ * Selects first `Combobox.Option` with `active` prop.
19
+ * If there are no such options, the function does nothing.
20
+ */
21
+ selectActiveOption: () => string | null;
22
+ /**
23
+ * Selects first `Combobox.Option` that is not disabled.
24
+ * If there are no such options, the function does nothing.
25
+ */
26
+ selectFirstOption: () => string | null;
27
+ /**
28
+ * Selects next `Combobox.Option` that is not disabled.
29
+ * If the current option is the last one, the function selects first option, if `loop` is true.
30
+ */
31
+ selectNextOption: () => string | null;
32
+ /**
33
+ * Selects previous `Combobox.Option` that is not disabled.
34
+ * If the current option is the first one, the function selects last option, if `loop` is true.
35
+ */
36
+ selectPrevOption: () => string | null;
37
+ /** Resets selected option index to -1, removes `data-combobox-selected` from selected option */
38
+ resetSelectedOption: () => void;
39
+ /**
40
+ * Triggers `onClick` event of selected option.
41
+ * If there is no selected option, the function does nothing.
42
+ */
43
+ clickSelectedOption: () => void;
44
+ /**
45
+ * Updates selected option index to currently selected or active option.
46
+ * The function is required to be used with searchable components to update selected option index
47
+ * when options list changes based on search query.
48
+ */
49
+ updateSelectedOptionIx: (target?: 'active' | 'selected', options?: {
50
+ scrollIntoView?: boolean;
51
+ }) => void;
52
+ /** Ref of `Combobox.Search` input */
53
+ searchRef: ShallowRef<HTMLInputElement | null>;
54
+ /** Moves focus to `Combobox.Search` input */
55
+ focusSearch: () => void;
56
+ /** Ref of the target element */
57
+ targetRef: ShallowRef<HTMLElement | null>;
58
+ /** Moves focus to the target element */
59
+ focusTarget: () => void;
60
+ }
61
+ export declare function useCombobox({ onSelect, onClear, onCloseDropdown, onOpenDropdown, opened, ..._options }: {
62
+ attrs?: ComboboxAttrs;
63
+ scrollBehavior?: ScrollBehavior;
64
+ loop?: boolean;
65
+ onSelect?: (ix: number) => void;
66
+ onClear?: () => void;
67
+ onOpenDropdown?: (eventSource: ComboboxDropdownEventSource) => void;
68
+ onCloseDropdown?: (eventSource: ComboboxDropdownEventSource) => void;
69
+ opened: ModelRef<boolean>;
70
+ }): ComboboxStore;
@@ -0,0 +1,97 @@
1
+ import { unrefElement } from "@vueuse/core";
2
+ import { nextTick, shallowRef, useId } from "vue";
3
+ import { COMBOBOX_ATTRS } from "../const.js";
4
+ import {
5
+ clearSelected,
6
+ selectActiveOption,
7
+ selectFirstOption,
8
+ selectNextOption,
9
+ selectOption,
10
+ selectPrevOption,
11
+ updateSelectedOptionIx
12
+ } from "./handlers.js";
13
+ export function useCombobox({ onSelect, onClear, onCloseDropdown, onOpenDropdown, opened, ..._options }) {
14
+ const listId = useId();
15
+ const targetRef = shallowRef(null);
16
+ const searchRef = shallowRef(null);
17
+ const openDropdown = (eventSource = "unknown") => {
18
+ if (!opened.value) {
19
+ opened.value = true;
20
+ onOpenDropdown?.(eventSource);
21
+ }
22
+ };
23
+ const closeDropdown = (eventSource = "unknown") => {
24
+ if (opened.value) {
25
+ opened.value = false;
26
+ onCloseDropdown?.(eventSource);
27
+ }
28
+ };
29
+ const toggleDropdown = (eventSource = "unknown") => {
30
+ if (opened.value)
31
+ closeDropdown(eventSource);
32
+ else
33
+ openDropdown(eventSource);
34
+ };
35
+ const options = {
36
+ attrs: _options?.attrs ?? COMBOBOX_ATTRS,
37
+ scrollBehavior: _options?.scrollBehavior ?? "instant",
38
+ loop: _options?.loop ?? true,
39
+ listId,
40
+ selectFn: (ix) => ix ? `${ix}` : null
41
+ };
42
+ let selectedOptionIx = -1;
43
+ const getSelectedIx = () => selectedOptionIx;
44
+ const clear = () => {
45
+ clearSelected(options);
46
+ onClear?.();
47
+ };
48
+ const select = (ix) => {
49
+ const res = selectOption(ix, { ...options, clearFn: clear });
50
+ if (res) {
51
+ selectedOptionIx = res.ix;
52
+ onSelect?.(res.ix);
53
+ return res.value;
54
+ }
55
+ return null;
56
+ };
57
+ options.selectFn = select;
58
+ const selectActive = () => selectActiveOption(options);
59
+ const selectNext = () => selectNextOption(getSelectedIx(), options);
60
+ const selectPrev = () => selectPrevOption(getSelectedIx(), options);
61
+ const selectFirst = () => selectFirstOption(options);
62
+ const updateSelectedIx = (target) => updateSelectedOptionIx(target, options);
63
+ const resetSelectedOption = () => {
64
+ selectedOptionIx = -1;
65
+ clear();
66
+ };
67
+ const clickSelectedOption = () => {
68
+ const items = document.querySelectorAll(`#${options.listId} [${options.attrs.option}]`);
69
+ const item = items?.[selectedOptionIx];
70
+ item?.click();
71
+ };
72
+ const focusSearch = () => {
73
+ nextTick(() => unrefElement(searchRef)?.focus());
74
+ };
75
+ const focusTarget = () => {
76
+ nextTick(() => unrefElement(targetRef)?.focus());
77
+ };
78
+ return {
79
+ listId,
80
+ openDropdown,
81
+ closeDropdown,
82
+ toggleDropdown,
83
+ selectOption: select,
84
+ selectActiveOption: selectActive,
85
+ selectNextOption: selectNext,
86
+ selectPrevOption: selectPrev,
87
+ selectFirstOption: selectFirst,
88
+ resetSelectedOption,
89
+ clickSelectedOption,
90
+ getSelectedOptionIx: getSelectedIx,
91
+ targetRef,
92
+ focusTarget,
93
+ searchRef,
94
+ focusSearch,
95
+ updateSelectedOptionIx: updateSelectedIx
96
+ };
97
+ }
@@ -0,0 +1,2 @@
1
+ import type { ComboboxData, ComboboxItemExt, ComboboxParsedItem } from '../../types/index.js';
2
+ export declare function getParsedComboboxData<Value extends string = string, Ext extends ComboboxItemExt = object>(data: ComboboxData<Value, Ext> | undefined): ComboboxParsedItem<Value, Ext>[];
@@ -0,0 +1,23 @@
1
+ import { isOptionsGroup } from "../utils/index.js";
2
+ function parseItem(item) {
3
+ if (typeof item === "number")
4
+ return { value: item.toString(), label: item.toString() };
5
+ if (isOptionsGroup(item)) {
6
+ return {
7
+ group: item.group,
8
+ items: item.items.map((i) => parseItem(i))
9
+ };
10
+ }
11
+ if ("value" in item && !("label" in item)) {
12
+ return {
13
+ ...item,
14
+ label: item.value
15
+ };
16
+ }
17
+ return item;
18
+ }
19
+ export function getParsedComboboxData(data) {
20
+ if (!data)
21
+ return [];
22
+ return data.map((item) => parseItem(item));
23
+ }
@@ -0,0 +1 @@
1
+ export { useComboboxData } from './use-combobox-data.js';
@@ -0,0 +1 @@
1
+ export { useComboboxData } from "./use-combobox-data.js";
@@ -0,0 +1,7 @@
1
+ import type { ComboboxData, ComboboxItem, ComboboxItemExt, ComboboxParsedItem } from '../../types/index.js';
2
+ export declare function getOptionsLockup<Value extends string = string, Ext extends ComboboxItemExt = object>(options: ComboboxParsedItem<Value, Ext>[]): Record<string, ComboboxItem<Value, Ext>>;
3
+ export declare function getLabelsLockup<Value extends string = string, Ext extends ComboboxItemExt = object>(options: ComboboxParsedItem<Value, Ext>[]): Record<string, string>;
4
+ export declare function useComboboxData<Value extends string = string, Ext extends ComboboxItemExt = object>(data: ComboboxData<Value, Ext>): {
5
+ parsed: import("vue").ComputedRef<ComboboxParsedItem<Value, Ext>[]>;
6
+ options: import("vue").ComputedRef<Record<string, ComboboxItem<Value, Ext>>>;
7
+ };
@@ -0,0 +1,23 @@
1
+ import { computed } from "vue";
2
+ import { getParsedComboboxData } from "./get-parsed-combobox-data.js";
3
+ export function getOptionsLockup(options) {
4
+ return options.reduce((acc, item) => {
5
+ if ("group" in item)
6
+ return { ...acc, ...getOptionsLockup(item.items) };
7
+ acc[item.value] = item;
8
+ return acc;
9
+ }, {});
10
+ }
11
+ export function getLabelsLockup(options) {
12
+ return options.reduce((acc, item) => {
13
+ if ("group" in item)
14
+ return { ...acc, ...getLabelsLockup(item.items) };
15
+ acc[item.label] = item;
16
+ return acc;
17
+ }, {});
18
+ }
19
+ export function useComboboxData(data) {
20
+ const parsed = computed(() => getParsedComboboxData(data));
21
+ const options = computed(() => getOptionsLockup(parsed.value));
22
+ return { parsed, options };
23
+ }
@@ -0,0 +1,25 @@
1
+ interface UseComboboxTargetPropsInput {
2
+ targetType: 'input' | 'button' | undefined;
3
+ withAriaAttributes: boolean | undefined;
4
+ withKeyboardNavigation: boolean | undefined;
5
+ withExpandedAttribute: boolean | undefined;
6
+ autoComplete: string | undefined;
7
+ }
8
+ export declare function useComboboxTarget({ targetType, withAriaAttributes, autoComplete, withExpandedAttribute, withKeyboardNavigation, }: UseComboboxTargetPropsInput): import("vue").ComputedRef<{
9
+ 'aria-haspopup': "listbox";
10
+ 'aria-expanded': boolean | undefined;
11
+ 'aria-controls': string | undefined;
12
+ 'aria-activedescendant': string | undefined;
13
+ autoComplete: string | undefined;
14
+ 'data-expanded': true | undefined;
15
+ 'data-stop-propagation': true | undefined;
16
+ } | {
17
+ 'aria-haspopup'?: undefined;
18
+ 'aria-expanded'?: undefined;
19
+ 'aria-controls'?: undefined;
20
+ 'aria-activedescendant'?: undefined;
21
+ autoComplete?: undefined;
22
+ 'data-expanded'?: undefined;
23
+ 'data-stop-propagation'?: undefined;
24
+ }>;
25
+ export {};
@@ -0,0 +1,65 @@
1
+ import { onKeyStroke } from "@vueuse/core";
2
+ import { computed, shallowRef } from "vue";
3
+ import { useComboboxState } from "./context.js";
4
+ export function useComboboxTarget({
5
+ targetType,
6
+ withAriaAttributes,
7
+ autoComplete,
8
+ withExpandedAttribute,
9
+ withKeyboardNavigation
10
+ }) {
11
+ const ctx = useComboboxState();
12
+ const selected = shallowRef(null);
13
+ onKeyStroke(["ArrowUp", "ArrowDown", "Enter", "Escape", "Space"], (event) => {
14
+ if (ctx.readOnly || !withKeyboardNavigation)
15
+ return;
16
+ if (event.isComposing)
17
+ return;
18
+ event.preventDefault();
19
+ event.stopPropagation();
20
+ switch (event.code) {
21
+ case "ArrowUp":
22
+ case "ArrowDown": {
23
+ if (!ctx.opened.value) {
24
+ ctx.store.openDropdown("keyboard");
25
+ selected.value = ctx.store.selectActiveOption();
26
+ ctx.store.updateSelectedOptionIx("selected", { scrollIntoView: true });
27
+ } else {
28
+ selected.value = event.code === "ArrowDown" ? ctx.store.selectNextOption() : ctx.store.selectPrevOption();
29
+ }
30
+ break;
31
+ }
32
+ case "Enter":
33
+ case "NumpadEnter": {
34
+ if (event.keyCode === 229)
35
+ break;
36
+ const selectedIx = ctx.store.getSelectedOptionIx();
37
+ if (ctx.opened.value && selectedIx !== -1)
38
+ ctx.store.clickSelectedOption();
39
+ else if (targetType === "button")
40
+ ctx.store.openDropdown("keyboard");
41
+ break;
42
+ }
43
+ case "Escape": {
44
+ ctx.store.closeDropdown("keyboard");
45
+ break;
46
+ }
47
+ case "Space": {
48
+ if (targetType === "button")
49
+ ctx.store.toggleDropdown("keyboard");
50
+ break;
51
+ }
52
+ default:
53
+ break;
54
+ }
55
+ }, { target: ctx.store.targetRef });
56
+ return computed(() => withAriaAttributes ? {
57
+ "aria-haspopup": "listbox",
58
+ "aria-expanded": withExpandedAttribute ? !!(ctx.store.listId && ctx.opened.value) : void 0,
59
+ "aria-controls": ctx.opened.value && ctx.store.listId ? ctx.store.listId : void 0,
60
+ "aria-activedescendant": ctx.opened.value ? selected.value || void 0 : void 0,
61
+ autoComplete,
62
+ "data-expanded": ctx.opened.value || void 0,
63
+ "data-stop-propagation": ctx.opened.value || void 0
64
+ } : {});
65
+ }
@@ -0,0 +1,7 @@
1
+ import type { ComboboxItemExt, ComboboxParsedItem } from '../../types/index.js';
2
+ export interface FilterOptionsInput<Value extends string = string, Ext extends ComboboxItemExt = object> {
3
+ options: ComboboxParsedItem<Value, Ext>[];
4
+ search: string;
5
+ limit: number;
6
+ }
7
+ export declare function defaultOptionsFilter<Value extends string = string, Ext extends ComboboxItemExt = object>({ options, search, limit, }: FilterOptionsInput<Value, Ext>): ComboboxParsedItem<Value, Ext>[];
@@ -0,0 +1,27 @@
1
+ import { isOptionsGroup } from "./is-options-group.js";
2
+ export function defaultOptionsFilter({
3
+ options,
4
+ search,
5
+ limit
6
+ }) {
7
+ const parsedSearch = search.trim().toLowerCase();
8
+ const result = [];
9
+ for (let i = 0; i < options.length; i += 1) {
10
+ const item = options[i];
11
+ if (result.length === limit)
12
+ return result;
13
+ if (isOptionsGroup(item)) {
14
+ result.push({
15
+ group: item.group,
16
+ items: defaultOptionsFilter({
17
+ options: item.items,
18
+ search,
19
+ limit: limit - result.length
20
+ })
21
+ });
22
+ }
23
+ if (!isOptionsGroup(item) && item.label.toLowerCase().includes(parsedSearch))
24
+ result.push(item);
25
+ }
26
+ return result;
27
+ }
@@ -0,0 +1,5 @@
1
+ import type { ComboboxItem, ComboboxItemExt } from '../../types/index.js';
2
+ export * from './default-option-filter.js';
3
+ export { isEmptyComboboxData } from './is-empty-combobox-data.js';
4
+ export { isOptionsGroup } from './is-options-group.js';
5
+ export declare function isValueChecked<Value extends string = string, Ext extends ComboboxItemExt = object>(value: ComboboxItem<Value, Ext> | ComboboxItem<Value, Ext>[] | undefined | null, optionValue: ComboboxItem<Value, Ext>): boolean;
@@ -0,0 +1,6 @@
1
+ export * from "./default-option-filter.js";
2
+ export { isEmptyComboboxData } from "./is-empty-combobox-data.js";
3
+ export { isOptionsGroup } from "./is-options-group.js";
4
+ export function isValueChecked(value, optionValue) {
5
+ return Array.isArray(value) ? value.some(({ value: value2 }) => value2 === optionValue.value) : value?.value === optionValue.value;
6
+ }
@@ -0,0 +1,2 @@
1
+ import type { ComboboxParsedItem } from '../../types/index.js';
2
+ export declare function isEmptyComboboxData(data: ComboboxParsedItem[]): boolean;
@@ -0,0 +1,11 @@
1
+ export function isEmptyComboboxData(data) {
2
+ if (data.length === 0)
3
+ return true;
4
+ for (const item of data) {
5
+ if (!("group" in item))
6
+ return false;
7
+ if (item.items.length > 0)
8
+ return false;
9
+ }
10
+ return true;
11
+ }
@@ -0,0 +1,2 @@
1
+ import type { ComboboxItemExt, ComboboxParsedItem, ComboboxParsedItemGroup } from '../../types/index.js';
2
+ export declare function isOptionsGroup<Value extends string = string, Ext extends ComboboxItemExt = object>(item: ComboboxParsedItem<Value, Ext>): item is ComboboxParsedItemGroup<Value, Ext>;
@@ -0,0 +1,3 @@
1
+ export function isOptionsGroup(item) {
2
+ return "group" in item;
3
+ }
@@ -0,0 +1,19 @@
1
+ import type { ComboboxItem, ComboboxItemExt, ComboboxItemGroup } from './item.js';
2
+ export type ComboboxDropdownEventSource = 'keyboard' | 'mouse' | 'unknown';
3
+ export type ComboboxData<Value extends string = string, Ext extends ComboboxItemExt = object> = (ComboboxItem<Value, Ext> | ComboboxItemGroup<Value, Ext>)[];
4
+ export interface ComboboxRootEmits {
5
+ clear: [];
6
+ select: [number];
7
+ /** Called when dropdown opens with event source: keyboard, mouse or unknown */
8
+ open: [ComboboxDropdownEventSource];
9
+ /** Called when dropdown closes with event source: keyboard, mouse or unknown */
10
+ close: [ComboboxDropdownEventSource];
11
+ /** Called when item is selected with the `Enter` key or by clicking it */
12
+ submit: [string, ComboboxItem];
13
+ }
14
+ export interface ComboboxItemProps {
15
+ withCheckIcon?: boolean;
16
+ checkIcon?: string;
17
+ iconPosition?: 'left' | 'right';
18
+ }
19
+ export * from './item.js';
@@ -0,0 +1 @@
1
+ export * from "./item.js";
@@ -0,0 +1,22 @@
1
+ interface BaseComboboxFields {
2
+ value: string;
3
+ label: string;
4
+ disabled?: boolean;
5
+ icon?: string;
6
+ }
7
+ export type ComboboxItemExt = Omit<object, keyof BaseComboboxFields>;
8
+ export type ComboboxItem<Value extends string = string, Ext extends ComboboxItemExt = object> = BaseComboboxFields & {
9
+ value: Value;
10
+ } & Ext;
11
+ export interface ComboboxParsedItemGroup<Value extends string = string, Ext extends ComboboxItemExt = object> {
12
+ group: string;
13
+ icon?: string;
14
+ items: ComboboxItem<Value, Ext>[];
15
+ }
16
+ export type ComboboxParsedItem<Value extends string = string, Ext extends ComboboxItemExt = object> = ComboboxItem<Value, Ext> | ComboboxParsedItemGroup<Value, Ext>;
17
+ export interface ComboboxItemGroup<Value extends string = string, Ext extends ComboboxItemExt = object> {
18
+ group: string;
19
+ icon?: string;
20
+ items: ComboboxItem<Value, Ext>[];
21
+ }
22
+ export {};
File without changes
@@ -0,0 +1,19 @@
1
+ import type { UiKitSize } from '@nui/types';
2
+ import type { BoxProps } from './box.vue.js';
3
+ export interface ContainerProps extends /* @vue-ignore */ BoxProps {
4
+ size?: UiKitSize | string | number;
5
+ fluid?: boolean;
6
+ }
7
+ declare var __VLS_6: {};
8
+ type __VLS_Slots = {} & {
9
+ default?: (props: typeof __VLS_6) => any;
10
+ };
11
+ declare const __VLS_base: import("vue").DefineComponent<ContainerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ContainerProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
12
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
13
+ declare const _default: typeof __VLS_export;
14
+ export default _default;
15
+ type __VLS_WithSlots<T, S> = T & {
16
+ new (): {
17
+ $slots: S;
18
+ };
19
+ };
@@ -0,0 +1,33 @@
1
+ <script setup>
2
+ import { getSize } from "@nui/utils";
3
+ import { computed } from "vue";
4
+ import Box from "./box.vue";
5
+ const {
6
+ is,
7
+ mod,
8
+ fluid,
9
+ size
10
+ } = defineProps({
11
+ size: { type: [String, Number], required: false },
12
+ fluid: { type: Boolean, required: false }
13
+ });
14
+ const style = computed(() => ({
15
+ "--container-size": fluid ? void 0 : getSize(size, "container-size")
16
+ }));
17
+ const _mod = computed(() => [{ fluid }, mod]);
18
+ </script>
19
+
20
+ <template>
21
+ <Box
22
+ :is
23
+ :style
24
+ :mod='_mod'
25
+ :class='$style.root'
26
+ >
27
+ <slot />
28
+ </Box>
29
+ </template>
30
+
31
+ <style module>
32
+ .root{--container-size-xs:var(--breakpoint-xs);--container-size-sm:var(--breakpoint-sm);--container-size-md:var(--breakpoint-md);--container-size-lg:var(--breakpoint-lg);--container-size-xl:var(--breakpoint-xl);--container-size:var(--container-size-md);margin-inline:auto;max-width:var(--container-size);padding-inline:var(--spacing-md)}.root:where([data-fluid]){max-width:100%}
33
+ </style>
@@ -0,0 +1,19 @@
1
+ import type { UiKitSize } from '@nui/types';
2
+ import type { BoxProps } from './box.vue.js';
3
+ export interface ContainerProps extends /* @vue-ignore */ BoxProps {
4
+ size?: UiKitSize | string | number;
5
+ fluid?: boolean;
6
+ }
7
+ declare var __VLS_6: {};
8
+ type __VLS_Slots = {} & {
9
+ default?: (props: typeof __VLS_6) => any;
10
+ };
11
+ declare const __VLS_base: import("vue").DefineComponent<ContainerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ContainerProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
12
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
13
+ declare const _default: typeof __VLS_export;
14
+ export default _default;
15
+ type __VLS_WithSlots<T, S> = T & {
16
+ new (): {
17
+ $slots: S;
18
+ };
19
+ };
@@ -0,0 +1,14 @@
1
+ import type { ActionIconProps } from '../action-icon/index.js';
2
+ declare var __VLS_9: {};
3
+ type __VLS_Slots = {} & {
4
+ default?: (props: typeof __VLS_9) => any;
5
+ };
6
+ declare const __VLS_base: import("vue").DefineComponent<ActionIconProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ActionIconProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
7
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
8
+ declare const _default: typeof __VLS_export;
9
+ export default _default;
10
+ type __VLS_WithSlots<T, S> = T & {
11
+ new (): {
12
+ $slots: S;
13
+ };
14
+ };
@@ -0,0 +1,28 @@
1
+ <script setup>
2
+ import ActionIcon from "../action-icon/action-icon.vue";
3
+ import { useDialogState } from "./lib";
4
+ const { variant = "subtle", icon = "gravity-ui:xmark", ...props } = defineProps({
5
+ size: { type: null, required: false },
6
+ variant: { type: String, required: false },
7
+ gradient: { type: Object, required: false },
8
+ loading: { type: Boolean, required: false },
9
+ color: { type: null, required: false },
10
+ radius: { type: [String, Number], required: false },
11
+ classes: { type: Object, required: false },
12
+ mod: { type: [Object, Array, null], required: false },
13
+ icon: { type: String, required: false }
14
+ });
15
+ const close = useDialogState();
16
+ </script>
17
+
18
+ <template>
19
+ <ActionIcon
20
+ :icon
21
+ :variant
22
+ tabindex='0'
23
+ v-bind='props'
24
+ @click='close'
25
+ >
26
+ <slot />
27
+ </ActionIcon>
28
+ </template>