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,2 @@
1
+ export type Mod = Record<string, any>;
2
+ export declare function useMod(mod: Mod | Mod[] | Mod[][] | null | undefined): Mod | null;
@@ -0,0 +1,25 @@
1
+ import { isFalsy } from "@nui/utils";
2
+ import { computed } from "vue";
3
+ const transformKey = (key) => key.startsWith("data-") ? key : `data-${key}`;
4
+ function getMod(props) {
5
+ if (Array.isArray(props)) {
6
+ return props.filter((i) => !isFalsy(i)).reduce((acc, item) => ({ ...acc, ...getMod(item) }), {});
7
+ }
8
+ return Object.keys(props).reduce((acc, key) => {
9
+ const value = props[key];
10
+ if (isFalsy(value))
11
+ return acc;
12
+ acc[transformKey(key)] = props[key];
13
+ return acc;
14
+ }, {});
15
+ }
16
+ export function useMod(mod) {
17
+ return computed(() => {
18
+ if (!mod)
19
+ return null;
20
+ if (Array.isArray(mod)) {
21
+ return mod.filter((i) => !isFalsy(i)).reduce((acc, value) => ({ ...acc, ...getMod(value) }), {});
22
+ }
23
+ return getMod(mod);
24
+ });
25
+ }
@@ -0,0 +1,3 @@
1
+ import type { UiKitTheme } from '@nui/types';
2
+ import type { CSSProperties } from 'vue';
3
+ export declare function useStyleResolver<T extends CSSProperties>(factory: (theme: UiKitTheme) => T): T;
@@ -0,0 +1,5 @@
1
+ import { useTheme } from "./use-theme.js";
2
+ export function useStyleResolver(factory) {
3
+ const theme = useTheme();
4
+ return factory(theme.value);
5
+ }
@@ -0,0 +1,9 @@
1
+ import type { UiKitTheme } from '@nui/types';
2
+ interface ThemeInstance {
3
+ preference: UiKitTheme;
4
+ readonly value: UiKitTheme;
5
+ unknown: boolean;
6
+ forced: boolean;
7
+ }
8
+ export declare function useTheme(): ThemeInstance;
9
+ export {};
@@ -0,0 +1,4 @@
1
+ import { useState } from "#imports";
2
+ export function useTheme() {
3
+ return useState("color-mode").value;
4
+ }
@@ -0,0 +1,2 @@
1
+ import type { UiKitGradient } from '@nui/types';
2
+ export declare const DEFAULT_GRADIENT: UiKitGradient;
@@ -0,0 +1,6 @@
1
+ export const DEFAULT_GRADIENT = {
2
+ from: "violet.6",
3
+ to: "grape.6",
4
+ deg: 120,
5
+ bg: "slate.8"
6
+ };
@@ -0,0 +1,94 @@
1
+ import type { InjectionKey } from '@vue/runtime-core';
2
+ import type { CreateInjectionStateOptions } from '@vueuse/core';
3
+ interface StrictInjectionOptions<Return> extends Omit<CreateInjectionStateOptions<Return>, 'injectionKey'> {
4
+ /**
5
+ * The name of the context for error messages.
6
+ * Used to generate helpful error when context is missing.
7
+ *
8
+ * @example 'ComboboxState', 'FormContext', 'DialogProvider'
9
+ */
10
+ name: string;
11
+ injectionKey: InjectionKey<Return>;
12
+ }
13
+ type StrictInjectionReturn<Arguments extends Array<any>, Return> = Readonly<[
14
+ /**
15
+ * Provider function to be called in a parent component.
16
+ * Creates and provides the state to all descendant components.
17
+ *
18
+ * @param args - Arguments passed to the composable function
19
+ * @returns The state returned by the composable
20
+ *
21
+ * @example
22
+ * ```vue
23
+ * <script setup>
24
+ * const state = useProvideComboboxState({ items: [] })
25
+ * </script>
26
+ * ```
27
+ */
28
+ useProvidingState: (...args: Arguments) => Return,
29
+ /**
30
+ * Consumer function to be called in a child component.
31
+ * Injects the state provided by the nearest parent provider.
32
+ *
33
+ * @throws {Error} When called outside of a provider context
34
+ * @returns The injected state
35
+ *
36
+ * @example
37
+ * ```vue
38
+ * <script setup>
39
+ * const state = useComboboxState() // Throws if no provider found
40
+ * </script>
41
+ * ```
42
+ */
43
+ useInjectedState: () => Return
44
+ ]>;
45
+ /**
46
+ * Creates a pair of composables for strict provide/inject pattern with required context.
47
+ * Unlike Vue's standard inject, this ensures the context is always provided, throwing an error otherwise.
48
+ *
49
+ * This is useful for component libraries where certain child components must be used
50
+ * within a specific parent component context.
51
+ *
52
+ * @template Arguments - The arguments accepted by the composable function
53
+ * @template Return - The return type of the composable function
54
+ *
55
+ * @param composable - The composable function that creates the shared state
56
+ * @param options - Configuration options including context name for error messages
57
+ *
58
+ * @returns A tuple of [useProvidingState, useInjectedState] functions
59
+ *
60
+ * @example
61
+ * ```ts
62
+ * // Define the state structure
63
+ * interface ComboboxState {
64
+ * items: string[]
65
+ * selected: Ref<string | null>
66
+ * }
67
+ *
68
+ * // Create the strict injection pair
69
+ * const [useProvideComboboxState, useComboboxState] = createStrictInjection(
70
+ * (state: ComboboxState) => {
71
+ * return {
72
+ * ...state,
73
+ * select: (item: string) => { state.selected.value = item }
74
+ * }
75
+ * },
76
+ * { name: 'ComboboxState' }
77
+ * )
78
+ *
79
+ * // In parent component (Combobox.vue)
80
+ * const state = useProvideComboboxState({
81
+ * items: ['Apple', 'Banana', 'Cherry'],
82
+ * selected: ref(null)
83
+ * })
84
+ *
85
+ * // In child component (ComboboxOption.vue)
86
+ * const { select, selected } = useComboboxState() // ✅ Works inside Combobox
87
+ * // ❌ Throws "[useComboboxState] Missing provider. Make sure to call `useProvideComboboxState` in a parent component."
88
+ * // if used outside Combobox context
89
+ * ```
90
+ *
91
+ * @see {@link https://vueuse.org/shared/createInjectionState/ VueUse createInjectionState}
92
+ */
93
+ export declare function createStrictInjection<Arguments extends Array<any>, Return>(composable: (...args: Arguments) => Return, options: StrictInjectionOptions<Return>): StrictInjectionReturn<Arguments, Return>;
94
+ export {};
@@ -0,0 +1,11 @@
1
+ import { createInjectionState } from "@vueuse/core";
2
+ export function createStrictInjection(composable, options) {
3
+ const [useProvide, useInject] = createInjectionState(composable, options);
4
+ const useStrictInject = () => {
5
+ const ctx = useInject();
6
+ if (ctx == null)
7
+ throw new Error(`[use${options.name}] Missing provider. Make sure to call \`useProvide${options.name}\` in a parent component.`);
8
+ return ctx;
9
+ };
10
+ return [useProvide, useStrictInject];
11
+ }
@@ -0,0 +1 @@
1
+ export * from './create-strict-injection.js';
@@ -0,0 +1 @@
1
+ export * from "./create-strict-injection.js";
@@ -0,0 +1,3 @@
1
+ {
2
+ "extends": "../../../.nuxt/tsconfig.server.json"
3
+ }
@@ -0,0 +1 @@
1
+ *,:after,:before{box-sizing:border-box}*{margin:0}@media (prefers-reduced-motion:no-preference){html{interpolate-size:allow-keywords}}body{background-color:var(--color-body);color:var(--color-text);font-family:var(--font-family),sans-serif;font-size:var(--font-size-md);line-height:var(--line-height);margin:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media screen and (max-device-width:em(500px)){body{-webkit-text-size-adjust:100%}}body:has(dialog[data-modal][open]){overflow:hidden}canvas,img,picture,svg,video{display:block;max-width:100%}button,input,select,textarea{font:inherit}button{border:0}button,select{text-transform:none}h1,h2,h3,h4,h5,h6,p{overflow-wrap:break-word}p{text-wrap:pretty}h1,h2,h3,h4,h5,h6{text-wrap:balance}
@@ -0,0 +1 @@
1
+ :root{--color-white:#fff;--color-black:#000;--color-primary-0:var(--color-blue-0);--color-primary-1:var(--color-blue-1);--color-primary-2:var(--color-blue-2);--color-primary-3:var(--color-blue-3);--color-primary-4:var(--color-blue-4);--color-primary-5:var(--color-blue-5);--color-primary-6:var(--color-blue-6);--color-primary-7:var(--color-blue-7);--color-primary-8:var(--color-blue-8);--color-primary-9:var(--color-blue-9);--color-primary-filled:var(--color-blue-filled);--color-primary-filled-hover:var(--color-blue-filled-hover);--color-primary-light:alpha(var(--color-blue-light),.15);--color-primary-light-hover:var(--color-blue-light-hover);--color-primary-light-color:var(--color-blue-light-color);--color-primary-outline:var(--color-blue-outline);--color-primary-outline-hover:alpha(var(--color-blue-outline),.1);--color-dark-0:#c9c9c9;--color-dark-1:#b8b8b8;--color-dark-2:#828282;--color-dark-3:#696969;--color-dark-4:#424242;--color-dark-5:#3b3b3b;--color-dark-6:#2e2e2e;--color-dark-7:#242424;--color-dark-8:#1f1f1f;--color-dark-9:#141414;--color-slate-0:#f8f9fb;--color-slate-1:#f1f3f6;--color-slate-2:#e4e7ed;--color-slate-3:#dadce5;--color-slate-4:#c1c6d4;--color-slate-5:#9096b2;--color-slate-6:#4a5568;--color-slate-7:#313446;--color-slate-8:#252938;--color-slate-9:#1d1f29;--color-gray-0:#f8f9fa;--color-gray-1:#f1f3f5;--color-gray-2:#e9ecef;--color-gray-3:#dee2e6;--color-gray-4:#ced4da;--color-gray-5:#adb5bd;--color-gray-6:#868e96;--color-gray-7:#495057;--color-gray-8:#343a40;--color-gray-9:#212529;--color-red-0:#fdf4f4;--color-red-1:#f5e0e0;--color-red-2:#e8c5c5;--color-red-3:#d49999;--color-red-4:#c27373;--color-red-5:#a85a5a;--color-red-6:#8f4545;--color-red-7:#763636;--color-red-8:#5d2a2a;--color-red-9:#4a2121;--color-pink-0:#fdf6f8;--color-pink-1:#f7e4e9;--color-pink-2:#edc2d0;--color-pink-3:#dd9bb0;--color-pink-4:#c97a93;--color-pink-5:#b26179;--color-pink-6:#954d65;--color-pink-7:#7a3e52;--color-pink-8:#603140;--color-pink-9:#4d2733;--color-grape-0:#f8f0fc;--color-grape-1:#f3d9fa;--color-grape-2:#eebefa;--color-grape-3:#e599f7;--color-grape-4:#da77f2;--color-grape-5:#cc5de8;--color-grape-6:#be4bdb;--color-grape-7:#ae3ec9;--color-grape-8:#9c36b5;--color-grape-9:#862e9c;--color-violet-0:#f3f0ff;--color-violet-1:#e5dbff;--color-violet-2:#d0bfff;--color-violet-3:#b197fc;--color-violet-4:#9775fa;--color-violet-5:#845ef7;--color-violet-6:#7950f2;--color-violet-7:#7048e8;--color-violet-8:#6741d9;--color-violet-9:#5f3dc4;--color-indigo-0:#edf2ff;--color-indigo-1:#dbe4ff;--color-indigo-2:#bac8ff;--color-indigo-3:#91a7ff;--color-indigo-4:#748ffc;--color-indigo-5:#5c7cfa;--color-indigo-6:#4c6ef5;--color-indigo-7:#4263eb;--color-indigo-8:#3b5bdb;--color-indigo-9:#364fc7;--color-blue-0:#e7f5ff;--color-blue-1:#d0ebff;--color-blue-2:#a5d8ff;--color-blue-3:#74c0fc;--color-blue-4:#4dabf7;--color-blue-5:#339af0;--color-blue-6:#228be6;--color-blue-7:#1c7ed6;--color-blue-8:#1971c2;--color-blue-9:#1864ab;--color-cyan-0:#e3fafc;--color-cyan-1:#c5f6fa;--color-cyan-2:#99e9f2;--color-cyan-3:#66d9e8;--color-cyan-4:#3bc9db;--color-cyan-5:#22b8cf;--color-cyan-6:#15aabf;--color-cyan-7:#1098ad;--color-cyan-8:#0c8599;--color-cyan-9:#0b7285;--color-teal-0:#e6fcf5;--color-teal-1:#c3fae8;--color-teal-2:#96f2d7;--color-teal-3:#63e6be;--color-teal-4:#38d9a9;--color-teal-5:#20c997;--color-teal-6:#12b886;--color-teal-7:#0ca678;--color-teal-8:#099268;--color-teal-9:#087f5b;--color-green-0:#ebfbee;--color-green-1:#d3f9d8;--color-green-2:#b2f2bb;--color-green-3:#8ce99a;--color-green-4:#69db7c;--color-green-5:#51cf66;--color-green-6:#40c057;--color-green-7:#37b24d;--color-green-8:#2f9e44;--color-green-9:#2b8a3e;--color-lime-0:#f4fce3;--color-lime-1:#e9fac8;--color-lime-2:#d8f5a2;--color-lime-3:#c0eb75;--color-lime-4:#a9e34b;--color-lime-5:#94d82d;--color-lime-6:#82c91e;--color-lime-7:#74b816;--color-lime-8:#66a80f;--color-lime-9:#5c940d;--color-yellow-0:#fdfbf0;--color-yellow-1:#f9f4d6;--color-yellow-2:#f0e6a6;--color-yellow-3:#e3d372;--color-yellow-4:#d4bf47;--color-yellow-5:#c2a72b;--color-yellow-6:#a68c1a;--color-yellow-7:#8a7315;--color-yellow-8:#6e5a12;--color-yellow-9:#584610;--color-orange-0:#fdf6f0;--color-orange-1:#f7e6d3;--color-orange-2:#edd1b0;--color-orange-3:#deb887;--color-orange-4:#cd9a5b;--color-orange-5:#b8833a;--color-orange-6:#a0692f;--color-orange-7:#8b5a28;--color-orange-8:#704621;--color-orange-9:#5a3419}
@@ -0,0 +1 @@
1
+ :root{--mantine-scale:1;--font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji;--font-family-headings:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica;--font-family-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;--heading-text-wrap:wrap;--font-size-xs:.75rem;--font-size-sm:.875rem;--font-size-md:1rem;--font-size-lg:1.125rem;--font-size-xl:1.25rem;--font-size-h1:calc(2.125rem*var(--mantine-scale));--line-height-h1:1.3;--font-weight-h1:700;--font-size-h2:calc(1.625rem*var(--mantine-scale));--line-height-h2:1.35;--font-weight-h2:700;--font-size-h3:calc(1.375rem*var(--mantine-scale));--line-height-h3:1.4;--font-weight-h3:700;--font-size-h4:calc(1.125rem*var(--mantine-scale));--line-height-h4:1.45;--font-weight-h4:700;--font-size-h5:calc(1rem*var(--mantine-scale));--line-height-h5:1.5;--font-weight-h5:700;--font-size-h6:calc(0.875rem*var(--mantine-scale));--line-height-h6:1.5;--font-weight-h6:700;--spacing-xs:0.625rem;--spacing-sm:0.75rem;--spacing-md:1rem;--spacing-lg:1.25rem;--spacing-xl:2rem;--radius-xs:0.125rem;--radius-sm:0.25rem;--radius-md:0.5rem;--radius-lg:1rem;--radius-xl:2rem;--radius-default:var(--radius-sm);--line-height:1.55;--line-height-xs:1.4;--line-height-sm:1.45;--line-height-md:1.55;--line-height-lg:1.6;--line-height-xl:1.65;--shadow-xs:0 0.0625rem 0.1875rem rgba(0,0,0,.05),0 0.0625rem 0.125rem rgba(0,0,0,.1);--shadow-sm:0 0.0625rem 0.1875rem rgba(0,0,0,.05),rgba(0,0,0,.05) 0 0.625rem 0.9375rem -0.3125rem,rgba(0,0,0,.04) 0 0.4375rem 0.4375rem -0.3125rem;--shadow-md:0 0.0625rem 0.1875rem rgba(0,0,0,.05),rgba(0,0,0,.05) 0 1.25rem 1.5625rem -0.3125rem,rgba(0,0,0,.04) 0 0.625rem 0.625rem -0.3125rem;--shadow-lg:0 0.0625rem 0.1875rem rgba(0,0,0,.05),rgba(0,0,0,.05) 0 1.75rem 1.4375rem -0.4375rem,rgba(0,0,0,.04) 0 0.75rem 0.75rem -0.4375rem;--shadow-xl:0 0.0625rem 0.1875rem rgba(0,0,0,.05),rgba(0,0,0,.05) 0 2.25rem 1.75rem -0.4375rem,rgba(0,0,0,.04) 0 1.0625rem 1.0625rem -0.4375rem;--breakpoint-xs:36em;--breakpoint-sm:48em;--breakpoint-md:62em;--breakpoint-lg:75em;--breakpoint-xl:88em}
@@ -0,0 +1 @@
1
+ :root{@mixin dark-root{--primary-color-contrast:var(--color-white);--color-bright:var(--color-white);--color-text:var(--color-slate-3);--color-body:var(--color-slate-9);--color-aside:var(--color-slate-7);--color-header:var(--color-slate-8);--color-error:var(--color-red-7);--color-placeholder:var(--color-dark-3);--color-anchor:var(--color-blue-4);--color-default:var(--color-dark-6);--color-default-hover:var(--color-dark-5);--color-default-color:var(--color-white);--color-default-border:var(--color-dark-4);--color-dimmed:var(--color-slate-5);--color-disabled:var(--color-dark-6);--color-disabled-text:var(--color-dark-3);--color-disabled-border:var(--color-gray-6);--color-dark-color:var(--color-dark-4);--color-dark-filled:var(--color-dark-8);--color-dark-filled-hover:var(--color-dark-9);--color-dark-light:rgba(46,46,46,.15);--color-dark-light-hover:rgba(46,46,46,.2);--color-dark-light-color:var(--color-dark-3);--color-dark-outline:var(--color-dark-4);--color-dark-outline-hover:rgba(66,66,66,.05);--color-slate-filled:var(--color-slate-6);--color-slate-filled-hover:var(--color-slate-7);--color-slate-light:alpha(var(--color-slate-3),.15);--color-slate-light-hover:var(--color-slate-2);--color-slate-light-color:var(--color-slate-8);--color-slate-outline:var(--color-slate-5);--color-slate-outline-hover:alpha(var(--color-slate-5),.1);--color-gray-color:var(--color-gray-4);--color-gray-filled:var(--color-gray-8);--color-gray-filled-hover:var(--color-gray-9);--color-gray-light:hsla(210,7%,56%,.15);--color-gray-light-hover:hsla(210,7%,56%,.2);--color-gray-light-color:var(--color-gray-3);--color-gray-outline:var(--color-gray-4);--color-gray-outline-hover:rgba(206,212,218,.05);--color-red-color:var(--color-red-4);--color-red-filled:var(--color-red-8);--color-red-filled-hover:var(--color-red-9);--color-red-light:rgba(250,82,82,.15);--color-red-light-hover:rgba(250,82,82,.2);--color-red-light-color:var(--color-red-3);--color-red-outline:var(--color-red-4);--color-red-outline-hover:hsla(0,100%,76%,.05);--color-pink-color:var(--color-pink-4);--color-pink-filled:var(--color-pink-8);--color-pink-filled-hover:var(--color-pink-9);--color-pink-light:rgba(230,73,128,.15);--color-pink-light-hover:rgba(230,73,128,.2);--color-pink-light-color:var(--color-pink-3);--color-pink-outline:var(--color-pink-4);--color-pink-outline-hover:rgba(247,131,172,.05);--color-grape-color:var(--color-grape-4);--color-grape-filled:var(--color-grape-8);--color-grape-filled-hover:var(--color-grape-9);--color-grape-light:rgba(190,75,219,.15);--color-grape-light-hover:rgba(190,75,219,.2);--color-grape-light-color:var(--color-grape-3);--color-grape-outline:var(--color-grape-4);--color-grape-outline-hover:rgba(218,119,242,.05);--color-violet-color:var(--color-violet-4);--color-violet-filled:var(--color-violet-8);--color-violet-filled-hover:var(--color-violet-9);--color-violet-light:rgba(121,80,242,.15);--color-violet-light-hover:rgba(121,80,242,.2);--color-violet-light-color:var(--color-violet-3);--color-violet-outline:var(--color-violet-4);--color-violet-outline-hover:rgba(151,117,250,.05);--color-indigo-color:var(--color-indigo-4);--color-indigo-filled:var(--color-indigo-8);--color-indigo-filled-hover:var(--color-indigo-9);--color-indigo-light:rgba(76,110,245,.15);--color-indigo-light-hover:rgba(76,110,245,.2);--color-indigo-light-color:var(--color-indigo-3);--color-indigo-outline:var(--color-indigo-4);--color-indigo-outline-hover:rgba(116,143,252,.05);--color-blue-color:var(--color-blue-4);--color-blue-filled:var(--color-blue-8);--color-blue-filled-hover:var(--color-blue-9);--color-blue-light:rgba(34,139,230,.15);--color-blue-light-hover:rgba(34,139,230,.2);--color-blue-light-color:var(--color-blue-3);--color-blue-outline:var(--color-blue-4);--color-blue-outline-hover:rgba(77,171,247,.05);--color-cyan-color:var(--color-cyan-4);--color-cyan-filled:var(--color-cyan-8);--color-cyan-filled-hover:var(--color-cyan-9);--color-cyan-light:rgba(21,170,191,.15);--color-cyan-light-hover:rgba(21,170,191,.2);--color-cyan-light-color:var(--color-cyan-3);--color-cyan-outline:var(--color-cyan-4);--color-cyan-outline-hover:rgba(59,201,219,.05);--color-teal-color:var(--color-teal-4);--color-teal-filled:var(--color-teal-8);--color-teal-filled-hover:var(--color-teal-9);--color-teal-light:rgba(18,184,134,.15);--color-teal-light-hover:rgba(18,184,134,.2);--color-teal-light-color:var(--color-teal-3);--color-teal-outline:var(--color-teal-4);--color-teal-outline-hover:rgba(56,217,169,.05);--color-green-color:var(--color-green-4);--color-green-filled:var(--color-green-8);--color-green-filled-hover:var(--color-green-9);--color-green-light:rgba(64,192,87,.15);--color-green-light-hover:rgba(64,192,87,.2);--color-green-light-color:var(--color-green-3);--color-green-outline:var(--color-green-4);--color-green-outline-hover:rgba(105,219,124,.05);--color-lime-color:var(--color-lime-4);--color-lime-filled:var(--color-lime-8);--color-lime-filled-hover:var(--color-lime-9);--color-lime-light:rgba(130,201,30,.15);--color-lime-light-hover:rgba(130,201,30,.2);--color-lime-light-color:var(--color-lime-3);--color-lime-outline:var(--color-lime-4);--color-lime-outline-hover:rgba(169,227,75,.05);--color-yellow-color:var(--color-yellow-4);--color-yellow-filled:var(--color-yellow-8);--color-yellow-filled-hover:var(--color-yellow-9);--color-yellow-light:rgba(250,176,5,.15);--color-yellow-light-hover:rgba(250,176,5,.2);--color-yellow-light-color:var(--color-yellow-3);--color-yellow-outline:var(--color-yellow-4);--color-yellow-outline-hover:rgba(255,212,59,.05);--color-orange-color:var(--color-orange-4);--color-orange-filled:var(--color-orange-8);--color-orange-filled-hover:var(--color-orange-9);--color-orange-light:rgba(253,126,20,.15);--color-orange-light-hover:rgba(253,126,20,.2);--color-orange-light-color:var(--color-orange-3);--color-orange-outline:var(--color-orange-4);--color-orange-outline-hover:rgba(255,169,77,.05)}}
@@ -0,0 +1 @@
1
+ @import url(./baseline.css);@import url(./const.css);@import url(./colors.css);@import url(./dark-theme.css);@import url(./light-theme.css);.light-hidden{@mixin light{display:none}}.dark-hidden{@mixin dark{display:none}}.focus-auto:focus-visible{outline:2px solid var(--color-primary-filled);outline-offset:2px}.focus-always:focus{outline:2px solid var(--color-primary-filled);outline-offset:2px}.focus-never:focus{outline:none}.active:active{transform:translateY(rem(1px))}fieldset:disabled .active:active{transform:none}.rotate-rtl{@mixin where-rtl{transform:rotate(180deg)}}[data-v-hidden]{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}
@@ -0,0 +1 @@
1
+ :root{@mixin light-root{--primary-color-contrast:var(--color-white);--color-bright:var(--color-black);--color-text:#000;--color-body:#fff;--color-error:var(--color-red-6);--color-placeholder:var(--color-gray-5);--color-anchor:var(--color-blue-6);--color-default:var(--color-white);--color-default-hover:var(--color-gray-0);--color-default-color:var(--color-black);--color-default-border:var(--color-gray-4);--color-dimmed:var(--color-gray-6);--color-disabled:var(--color-gray-2);--color-disabled-text:var(--color-gray-5);--color-disabled-border:var(--color-gray-3);--color-dark-color:var(--color-dark-filled);--color-dark-filled:var(--color-dark-6);--color-dark-filled-hover:var(--color-dark-7);--color-dark-light:rgba(46,46,46,.1);--color-dark-light-hover:rgba(46,46,46,.12);--color-dark-light-color:var(--color-dark-6);--color-dark-outline:var(--color-dark-6);--color-dark-outline-hover:rgba(46,46,46,.05);--color-gray-color:var(--color-gray-filled);--color-gray-filled:var(--color-gray-6);--color-gray-filled-hover:var(--color-gray-7);--color-gray-light:hsla(210,7%,56%,.1);--color-gray-light-hover:hsla(210,7%,56%,.12);--color-gray-light-color:var(--color-gray-6);--color-gray-outline:var(--color-gray-6);--color-gray-outline-hover:hsla(210,7%,56%,.05);--color-red-color:var(--color-red-filled);--color-red-filled:var(--color-red-6);--color-red-filled-hover:var(--color-red-7);--color-red-light:rgba(250,82,82,.1);--color-red-light-hover:rgba(250,82,82,.12);--color-red-light-color:var(--color-red-6);--color-red-outline:var(--color-red-6);--color-red-outline-hover:rgba(250,82,82,.05);--color-pink-color:var(--color-pink-filled);--color-pink-filled:var(--color-pink-6);--color-pink-filled-hover:var(--color-pink-7);--color-pink-light:rgba(230,73,128,.1);--color-pink-light-hover:rgba(230,73,128,.12);--color-pink-light-color:var(--color-pink-6);--color-pink-outline:var(--color-pink-6);--color-pink-outline-hover:rgba(230,73,128,.05);--color-grape-color:var(--color-grape-filled);--color-grape-filled:var(--color-grape-6);--color-grape-filled-hover:var(--color-grape-7);--color-grape-light:rgba(190,75,219,.1);--color-grape-light-hover:rgba(190,75,219,.12);--color-grape-light-color:var(--color-grape-6);--color-grape-outline:var(--color-grape-6);--color-grape-outline-hover:rgba(190,75,219,.05);--color-violet-color:var(--color-violet-filled);--color-violet-filled:var(--color-violet-6);--color-violet-filled-hover:var(--color-violet-7);--color-violet-light:rgba(121,80,242,.1);--color-violet-light-hover:rgba(121,80,242,.12);--color-violet-light-color:var(--color-violet-6);--color-violet-outline:var(--color-violet-6);--color-violet-outline-hover:rgba(121,80,242,.05);--color-indigo-color:var(--color-indigo-filled);--color-indigo-filled:var(--color-indigo-6);--color-indigo-filled-hover:var(--color-indigo-7);--color-indigo-light:rgba(76,110,245,.1);--color-indigo-light-hover:rgba(76,110,245,.12);--color-indigo-light-color:var(--color-indigo-6);--color-indigo-outline:var(--color-indigo-6);--color-indigo-outline-hover:rgba(76,110,245,.05);--color-blue-color:var(--color-blue-filled);--color-blue-filled:var(--color-blue-6);--color-blue-filled-hover:var(--color-blue-7);--color-blue-light:rgba(34,139,230,.1);--color-blue-light-hover:rgba(34,139,230,.12);--color-blue-light-color:var(--color-blue-6);--color-blue-outline:var(--color-blue-6);--color-blue-outline-hover:rgba(34,139,230,.05);--color-cyan-color:var(--color-cyan-filled);--color-cyan-filled:var(--color-cyan-6);--color-cyan-filled-hover:var(--color-cyan-7);--color-cyan-light:rgba(21,170,191,.1);--color-cyan-light-hover:rgba(21,170,191,.12);--color-cyan-light-color:var(--color-cyan-6);--color-cyan-outline:var(--color-cyan-6);--color-cyan-outline-hover:rgba(21,170,191,.05);--color-teal-color:var(--color-teal-filled);--color-teal-filled:var(--color-teal-6);--color-teal-filled-hover:var(--color-teal-7);--color-teal-light:rgba(18,184,134,.1);--color-teal-light-hover:rgba(18,184,134,.12);--color-teal-light-color:var(--color-teal-6);--color-teal-outline:var(--color-teal-6);--color-teal-outline-hover:rgba(18,184,134,.05);--color-green-color:var(--color-green-filled);--color-green-filled:var(--color-green-6);--color-green-filled-hover:var(--color-green-7);--color-green-light:rgba(64,192,87,.1);--color-green-light-hover:rgba(64,192,87,.12);--color-green-light-color:var(--color-green-6);--color-green-outline:var(--color-green-6);--color-green-outline-hover:rgba(64,192,87,.05);--color-lime-color:var(--color-lime-filled);--color-lime-filled:var(--color-lime-6);--color-lime-filled-hover:var(--color-lime-7);--color-lime-light:rgba(130,201,30,.1);--color-lime-light-hover:rgba(130,201,30,.12);--color-lime-light-color:var(--color-lime-6);--color-lime-outline:var(--color-lime-6);--color-lime-outline-hover:rgba(130,201,30,.05);--color-yellow-color:var(--color-yellow-filled);--color-yellow-filled:var(--color-yellow-6);--color-yellow-filled-hover:var(--color-yellow-7);--color-yellow-light:rgba(250,176,5,.1);--color-yellow-light-hover:rgba(250,176,5,.12);--color-yellow-light-color:var(--color-yellow-6);--color-yellow-outline:var(--color-yellow-6);--color-yellow-outline-hover:rgba(250,176,5,.05);--color-orange-color:var(--color-orange-filled);--color-orange-filled:var(--color-orange-6);--color-orange-filled-hover:var(--color-orange-7);--color-orange-light:rgba(253,126,20,.1);--color-orange-light-hover:rgba(253,126,20,.12);--color-orange-light-color:var(--color-orange-6);--color-orange-outline:var(--color-orange-6);--color-orange-outline-hover:rgba(253,126,20,.05)}}
@@ -0,0 +1 @@
1
+ export type * from './theme';
File without changes
@@ -0,0 +1,25 @@
1
+ export type UiKitSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
2
+ export type UiKitBreakpointsValues = Record<UiKitSize | 'base', string>;
3
+ export type UiKitFontSizesValues = Record<UiKitSize, string>;
4
+ export type UiKitRadiusValues = Record<UiKitSize | 'full', string>;
5
+ export type UiKitSpacingValues = Record<UiKitSize, string>;
6
+ export type UiKitShadowsValues = Record<UiKitSize, string>;
7
+ export type UiKitLineHeightValues = Record<UiKitSize, string>;
8
+ export type UiKitBreakpoint = keyof UiKitBreakpointsValues;
9
+ export type UiKitFontSize = keyof UiKitFontSizesValues;
10
+ export type UiKitRadius = keyof UiKitRadiusValues | number;
11
+ export type UiKitSpacing = keyof UiKitSpacingValues | number;
12
+ export type UiKitShadow = keyof UiKitShadowsValues;
13
+ export type UiKitLineHeight = keyof UiKitLineHeightValues;
14
+ export type UiKitColorShade = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;
15
+ type ShadedColor = `dark.${UiKitColorShade}` | `slate.${UiKitColorShade}` | `gray.${UiKitColorShade}` | `red.${UiKitColorShade}` | `pink.${UiKitColorShade}` | `grape.${UiKitColorShade}` | `violet.${UiKitColorShade}` | `indigo.${UiKitColorShade}` | `blue.${UiKitColorShade}` | `cyan.${UiKitColorShade}` | `green.${UiKitColorShade}` | `lime.${UiKitColorShade}` | `yellow.${UiKitColorShade}` | `orange.${UiKitColorShade}` | `teal.${UiKitColorShade}`;
16
+ export type UiKitDefaultThemeColor = 'dark' | 'slate' | 'gray' | 'red' | 'pink' | 'grape' | 'violet' | 'indigo' | 'blue' | 'cyan' | 'green' | 'lime' | 'yellow' | 'orange' | 'teal' | 'black' | 'white';
17
+ export type UiKitColor = UiKitDefaultThemeColor | ShadedColor;
18
+ export type UiKitTheme = 'light' | 'dark';
19
+ export interface UiKitGradient {
20
+ bg?: UiKitColor | string;
21
+ from: UiKitColor | string;
22
+ to: UiKitColor | string;
23
+ deg?: number;
24
+ }
25
+ export {};
File without changes
@@ -0,0 +1 @@
1
+ export declare function isFalsy(value: unknown): boolean;
@@ -0,0 +1,7 @@
1
+ export function isFalsy(value) {
2
+ if (Array.isArray(value))
3
+ return !value.length;
4
+ if (typeof value === "object")
5
+ return !Object.keys(value || {}).length;
6
+ return !value;
7
+ }
@@ -0,0 +1 @@
1
+ export declare function isNumberLike(value: unknown): boolean;
@@ -0,0 +1,13 @@
1
+ export function isNumberLike(value) {
2
+ if (typeof value === "number")
3
+ return true;
4
+ if (typeof value === "string") {
5
+ if (value.startsWith("calc(") || value.startsWith("var(") || value.includes(" ") && value.trim() !== "") {
6
+ return true;
7
+ }
8
+ const cssUnitsRegex = /^[+-]?\d+(?:\.\d+)?(?:px|em|rem|ex|ch|lh|rlh|vw|vh|vmin|vmax|vb|vi|svw|svh|lvw|lvh|dvw|dvh|cm|mm|in|pt|pc|q|cqw|cqh|cqi|cqb|cqmin|cqmax|%)?$/;
9
+ const values = value.trim().split(/\s+/);
10
+ return values.every((val) => cssUnitsRegex.test(val));
11
+ }
12
+ return false;
13
+ }
@@ -0,0 +1,3 @@
1
+ import type { UiKitGradient, UiKitTheme } from '@nui/types';
2
+ export declare function getGradient(gradient: UiKitGradient | undefined, theme: UiKitTheme): string;
3
+ export declare function getGradientOutline(gradient: UiKitGradient | undefined, theme: UiKitTheme): string;
@@ -0,0 +1,25 @@
1
+ import { DEFAULT_GRADIENT } from "../../const/index.js";
2
+ import { parseThemeColor } from "../parse-theme-color/parse-theme-color.js";
3
+ export function getGradient(gradient, theme) {
4
+ const merged = {
5
+ from: gradient?.from || DEFAULT_GRADIENT.from,
6
+ to: gradient?.to || DEFAULT_GRADIENT.to,
7
+ deg: gradient?.deg ?? DEFAULT_GRADIENT.deg ?? 0
8
+ };
9
+ const fromColor = parseThemeColor({ color: merged.from, theme });
10
+ const toColor = parseThemeColor({ color: merged.to, theme });
11
+ return `linear-gradient(${merged.deg}deg, ${fromColor.value} 0%, ${toColor.value} 100%)`;
12
+ }
13
+ export function getGradientOutline(gradient, theme) {
14
+ const merged = {
15
+ bg: gradient?.bg || DEFAULT_GRADIENT.bg,
16
+ from: gradient?.from || DEFAULT_GRADIENT.from,
17
+ to: gradient?.to || DEFAULT_GRADIENT.to,
18
+ deg: gradient?.deg ?? DEFAULT_GRADIENT.deg ?? 0
19
+ };
20
+ const fromColor = parseThemeColor({ color: merged.from, theme });
21
+ const toColor = parseThemeColor({ color: merged.to, theme });
22
+ const bgColor = parseThemeColor({ color: merged.bg, theme });
23
+ return `linear-gradient(${bgColor.value}, ${bgColor.value}),
24
+ linear-gradient(${merged.deg}deg, ${fromColor.value} 20%, ${toColor.value} 120%)`;
25
+ }
@@ -0,0 +1,2 @@
1
+ export declare const rem: (value: unknown) => string;
2
+ export declare const em: (value: unknown) => string;
@@ -0,0 +1,43 @@
1
+ function scaleRem(remValue) {
2
+ if (remValue === "0rem") {
3
+ return "0rem";
4
+ }
5
+ return `calc(${remValue} * var(--mantine-scale))`;
6
+ }
7
+ function createConverter(units, { shouldScale = false } = {}) {
8
+ function converter(value) {
9
+ if (value === 0 || value === "0") {
10
+ return `0${units}`;
11
+ }
12
+ if (typeof value === "number") {
13
+ const val = `${value / 16}${units}`;
14
+ return shouldScale ? scaleRem(val) : val;
15
+ }
16
+ if (typeof value === "string") {
17
+ if (value === "") {
18
+ return value;
19
+ }
20
+ if (value.startsWith("calc(") || value.startsWith("clamp(") || value.includes("rgba(")) {
21
+ return value;
22
+ }
23
+ if (value.includes(",")) {
24
+ return value.split(",").map((val) => converter(val)).join(",");
25
+ }
26
+ if (value.includes(" ")) {
27
+ return value.split(" ").map((val) => converter(val)).join(" ");
28
+ }
29
+ if (value.includes(units)) {
30
+ return shouldScale ? scaleRem(value) : value;
31
+ }
32
+ const replaced = value.replace("px", "");
33
+ if (!Number.isNaN(Number(replaced))) {
34
+ const val = `${Number(replaced) / 16}${units}`;
35
+ return shouldScale ? scaleRem(val) : val;
36
+ }
37
+ }
38
+ return value;
39
+ }
40
+ return converter;
41
+ }
42
+ export const rem = createConverter("rem", { shouldScale: true });
43
+ export const em = createConverter("em");
@@ -0,0 +1,2 @@
1
+ import type { UiKitColor, UiKitColorShade } from '@nui/types';
2
+ export declare function getColorVar(color: UiKitColor, shade?: UiKitColorShade): string;
@@ -0,0 +1,6 @@
1
+ export function getColorVar(color, shade = 4) {
2
+ if (color === "white" || color === "black") {
3
+ return `var(--color-${color})`;
4
+ }
5
+ return `var(--color-${color}-${shade})`;
6
+ }
@@ -0,0 +1 @@
1
+ export declare function getSafeId(uid: string, errorMessage: string): (value: string) => string;
@@ -0,0 +1,8 @@
1
+ export function getSafeId(uid, errorMessage) {
2
+ return (value) => {
3
+ if (typeof value !== "string" || value.trim().length === 0) {
4
+ throw new Error(errorMessage);
5
+ }
6
+ return `${uid}-${value}`;
7
+ };
8
+ }
@@ -0,0 +1,6 @@
1
+ export declare function getSize(size: unknown, prefix?: string, convertToRem?: boolean): string | undefined;
2
+ export declare const getSpacing: (size: unknown) => string | undefined;
3
+ export declare function getRadius(size: unknown): string | undefined;
4
+ export declare const getFontSize: (size: unknown) => string | undefined;
5
+ export declare const getLineHeight: (size: unknown) => string | undefined;
6
+ export declare function getShadow(size: unknown): string | undefined;
@@ -0,0 +1,24 @@
1
+ import { isNumberLike } from "../boolean/is-number-like.js";
2
+ import { rem } from "../converters/rem.js";
3
+ export function getSize(size, prefix = "size", convertToRem = true) {
4
+ if (size === void 0) {
5
+ return void 0;
6
+ }
7
+ return isNumberLike(size) ? convertToRem ? rem(size) : size : `var(--${prefix}-${size})`;
8
+ }
9
+ export const getSpacing = (size) => getSize(size, "spacing");
10
+ export function getRadius(size) {
11
+ if (size === void 0)
12
+ return "var(--radius-default)";
13
+ if (size === "full")
14
+ return "100%";
15
+ return getSize(size, "radius");
16
+ }
17
+ export const getFontSize = (size) => getSize(size, "font-size");
18
+ export const getLineHeight = (size) => getSize(size, "line-height", false);
19
+ export function getShadow(size) {
20
+ if (!size) {
21
+ return void 0;
22
+ }
23
+ return getSize(size, "shadow", false);
24
+ }
@@ -0,0 +1,7 @@
1
+ export { isFalsy } from './boolean/is-falsy.js';
2
+ export { getGradient } from './color-functions/get-gradient.js';
3
+ export { em, rem } from './converters/rem.js';
4
+ export { getSafeId } from './get-safe-id.js';
5
+ export * from './get-size/get-size.js';
6
+ export { getThemeColor, parseThemeColor } from './parse-theme-color/parse-theme-color.js';
7
+ export { createVariantColorResolver } from './vars-resolver/create-variant-color-resolver.js';
@@ -0,0 +1,7 @@
1
+ export { isFalsy } from "./boolean/is-falsy.js";
2
+ export { getGradient } from "./color-functions/get-gradient.js";
3
+ export { em, rem } from "./converters/rem.js";
4
+ export { getSafeId } from "./get-safe-id.js";
5
+ export * from "./get-size/get-size.js";
6
+ export { getThemeColor, parseThemeColor } from "./parse-theme-color/parse-theme-color.js";
7
+ export { createVariantColorResolver } from "./vars-resolver/create-variant-color-resolver.js";
@@ -0,0 +1,14 @@
1
+ import type { UiKitColorShade, UiKitTheme } from '@nui/types';
2
+ interface ParseThemeColorResult {
3
+ color: string;
4
+ value: string;
5
+ shade: UiKitColorShade | undefined;
6
+ variable: `--${string}` | undefined;
7
+ isThemeColor: boolean;
8
+ }
9
+ export declare function parseThemeColor({ color, theme, }: {
10
+ color: unknown;
11
+ theme: UiKitTheme;
12
+ }): ParseThemeColorResult;
13
+ export declare function getThemeColor(color: string | undefined, theme: UiKitTheme): string;
14
+ export {};
@@ -0,0 +1,73 @@
1
+ import { getColorVar } from "../../utils/get-color-var.js";
2
+ const themeColors = [
3
+ "dark",
4
+ "slate",
5
+ "gray",
6
+ "red",
7
+ "pink",
8
+ "grape",
9
+ "violet",
10
+ "indigo",
11
+ "blue",
12
+ "cyan",
13
+ "green",
14
+ "lime",
15
+ "yellow",
16
+ "orange",
17
+ "teal",
18
+ "black",
19
+ "white",
20
+ "primary"
21
+ ];
22
+ export function parseThemeColor({
23
+ color = "primary",
24
+ theme
25
+ }) {
26
+ if (typeof color !== "string") {
27
+ throw new TypeError(
28
+ `[@ui-kit] Failed to parse color. Expected color to be a string, instead got ${typeof color}`
29
+ );
30
+ }
31
+ if (color === "dimmed") {
32
+ return {
33
+ color,
34
+ value: theme === "dark" ? getColorVar("dark", 2) : getColorVar("gray", 7),
35
+ shade: void 0,
36
+ variable: "--color-dimmed",
37
+ isThemeColor: false
38
+ };
39
+ }
40
+ if (color === "white" || color === "black") {
41
+ return {
42
+ color,
43
+ value: color === "white" ? "var(--color-white)" : "var(--color-black)",
44
+ shade: void 0,
45
+ variable: `--color-${color}`,
46
+ isThemeColor: false
47
+ };
48
+ }
49
+ const [_color, shade] = color.split(".");
50
+ const colorShade = shade ? Number(shade) : void 0;
51
+ const isThemeColor = themeColors.includes(_color);
52
+ if (isThemeColor) {
53
+ const colorValue = getColorVar(_color, colorShade);
54
+ return {
55
+ color: _color,
56
+ value: colorValue,
57
+ shade: colorShade,
58
+ isThemeColor,
59
+ variable: shade ? `--color-${_color}-${colorShade}` : `--color-${_color}-filled`
60
+ };
61
+ }
62
+ return {
63
+ color: _color,
64
+ value: color,
65
+ isThemeColor,
66
+ shade,
67
+ variable: void 0
68
+ };
69
+ }
70
+ export function getThemeColor(color, theme) {
71
+ const parsed = parseThemeColor({ color, theme });
72
+ return parsed.variable ? `var(${parsed.variable})` : color;
73
+ }
@@ -0,0 +1,14 @@
1
+ import type { UiKitColor, UiKitGradient, UiKitTheme } from '@nui/types';
2
+ interface VariantColorResolverResult {
3
+ background: string;
4
+ hover: string;
5
+ text: string;
6
+ border: string;
7
+ }
8
+ export declare function createVariantColorResolver({ color, variant, gradient, theme, }: {
9
+ color: UiKitColor | string | undefined;
10
+ variant: 'filled' | 'light' | 'outline' | 'subtle' | 'default' | 'gradient' | 'gradient-outline';
11
+ gradient?: UiKitGradient;
12
+ theme: UiKitTheme;
13
+ }): VariantColorResolverResult;
14
+ export {};