@erquhart/heroui-native 1.0.0-beta.10.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 (1342) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +109 -0
  3. package/lib/module/components/accordion/accordion.animation.js +145 -0
  4. package/lib/module/components/accordion/accordion.animation.js.map +1 -0
  5. package/lib/module/components/accordion/accordion.constants.js +53 -0
  6. package/lib/module/components/accordion/accordion.constants.js.map +1 -0
  7. package/lib/module/components/accordion/accordion.js +288 -0
  8. package/lib/module/components/accordion/accordion.js.map +1 -0
  9. package/lib/module/components/accordion/accordion.md +406 -0
  10. package/lib/module/components/accordion/accordion.styles.js +90 -0
  11. package/lib/module/components/accordion/accordion.styles.js.map +1 -0
  12. package/lib/module/components/accordion/accordion.types.js +4 -0
  13. package/lib/module/components/accordion/accordion.types.js.map +1 -0
  14. package/lib/module/components/accordion/chevron-down-icon.js +24 -0
  15. package/lib/module/components/accordion/chevron-down-icon.js.map +1 -0
  16. package/lib/module/components/accordion/index.js +5 -0
  17. package/lib/module/components/accordion/index.js.map +1 -0
  18. package/lib/module/components/avatar/avatar.animation.js +111 -0
  19. package/lib/module/components/avatar/avatar.animation.js.map +1 -0
  20. package/lib/module/components/avatar/avatar.constants.js +20 -0
  21. package/lib/module/components/avatar/avatar.constants.js.map +1 -0
  22. package/lib/module/components/avatar/avatar.context.js +11 -0
  23. package/lib/module/components/avatar/avatar.context.js.map +1 -0
  24. package/lib/module/components/avatar/avatar.js +222 -0
  25. package/lib/module/components/avatar/avatar.js.map +1 -0
  26. package/lib/module/components/avatar/avatar.md +376 -0
  27. package/lib/module/components/avatar/avatar.styles.js +150 -0
  28. package/lib/module/components/avatar/avatar.styles.js.map +1 -0
  29. package/lib/module/components/avatar/avatar.types.js +4 -0
  30. package/lib/module/components/avatar/avatar.types.js.map +1 -0
  31. package/lib/module/components/avatar/index.js +4 -0
  32. package/lib/module/components/avatar/index.js.map +1 -0
  33. package/lib/module/components/avatar/person-icon.js +23 -0
  34. package/lib/module/components/avatar/person-icon.js.map +1 -0
  35. package/lib/module/components/bottom-sheet/bottom-sheet.animation.js +37 -0
  36. package/lib/module/components/bottom-sheet/bottom-sheet.animation.js.map +1 -0
  37. package/lib/module/components/bottom-sheet/bottom-sheet.constants.js +16 -0
  38. package/lib/module/components/bottom-sheet/bottom-sheet.constants.js.map +1 -0
  39. package/lib/module/components/bottom-sheet/bottom-sheet.js +329 -0
  40. package/lib/module/components/bottom-sheet/bottom-sheet.js.map +1 -0
  41. package/lib/module/components/bottom-sheet/bottom-sheet.md +341 -0
  42. package/lib/module/components/bottom-sheet/bottom-sheet.styles.js +61 -0
  43. package/lib/module/components/bottom-sheet/bottom-sheet.styles.js.map +1 -0
  44. package/lib/module/components/bottom-sheet/bottom-sheet.types.js +4 -0
  45. package/lib/module/components/bottom-sheet/bottom-sheet.types.js.map +1 -0
  46. package/lib/module/components/bottom-sheet/index.js +4 -0
  47. package/lib/module/components/bottom-sheet/index.js.map +1 -0
  48. package/lib/module/components/button/button.constants.js +10 -0
  49. package/lib/module/components/button/button.constants.js.map +1 -0
  50. package/lib/module/components/button/button.js +201 -0
  51. package/lib/module/components/button/button.js.map +1 -0
  52. package/lib/module/components/button/button.md +316 -0
  53. package/lib/module/components/button/button.styles.js +88 -0
  54. package/lib/module/components/button/button.styles.js.map +1 -0
  55. package/lib/module/components/button/button.types.js +4 -0
  56. package/lib/module/components/button/button.types.js.map +1 -0
  57. package/lib/module/components/button/index.js +4 -0
  58. package/lib/module/components/button/index.js.map +1 -0
  59. package/lib/module/components/card/card.constants.js +14 -0
  60. package/lib/module/components/card/card.constants.js.map +1 -0
  61. package/lib/module/components/card/card.js +169 -0
  62. package/lib/module/components/card/card.js.map +1 -0
  63. package/lib/module/components/card/card.md +187 -0
  64. package/lib/module/components/card/card.styles.js +32 -0
  65. package/lib/module/components/card/card.styles.js.map +1 -0
  66. package/lib/module/components/card/card.types.js +4 -0
  67. package/lib/module/components/card/card.types.js.map +1 -0
  68. package/lib/module/components/card/index.js +4 -0
  69. package/lib/module/components/card/index.js.map +1 -0
  70. package/lib/module/components/checkbox/checkbox.animation.js +164 -0
  71. package/lib/module/components/checkbox/checkbox.animation.js.map +1 -0
  72. package/lib/module/components/checkbox/checkbox.constants.js +8 -0
  73. package/lib/module/components/checkbox/checkbox.constants.js.map +1 -0
  74. package/lib/module/components/checkbox/checkbox.js +188 -0
  75. package/lib/module/components/checkbox/checkbox.js.map +1 -0
  76. package/lib/module/components/checkbox/checkbox.md +305 -0
  77. package/lib/module/components/checkbox/checkbox.styles.js +104 -0
  78. package/lib/module/components/checkbox/checkbox.styles.js.map +1 -0
  79. package/lib/module/components/checkbox/checkbox.types.js +4 -0
  80. package/lib/module/components/checkbox/checkbox.types.js.map +1 -0
  81. package/lib/module/components/checkbox/index.js +4 -0
  82. package/lib/module/components/checkbox/index.js.map +1 -0
  83. package/lib/module/components/chip/chip.animation.js +17 -0
  84. package/lib/module/components/chip/chip.animation.js.map +1 -0
  85. package/lib/module/components/chip/chip.constants.js +10 -0
  86. package/lib/module/components/chip/chip.constants.js.map +1 -0
  87. package/lib/module/components/chip/chip.js +118 -0
  88. package/lib/module/components/chip/chip.js.map +1 -0
  89. package/lib/module/components/chip/chip.md +190 -0
  90. package/lib/module/components/chip/chip.styles.js +206 -0
  91. package/lib/module/components/chip/chip.styles.js.map +1 -0
  92. package/lib/module/components/chip/chip.types.js +4 -0
  93. package/lib/module/components/chip/chip.types.js.map +1 -0
  94. package/lib/module/components/chip/index.js +4 -0
  95. package/lib/module/components/chip/index.js.map +1 -0
  96. package/lib/module/components/dialog/dialog.animation.js +8 -0
  97. package/lib/module/components/dialog/dialog.animation.js.map +1 -0
  98. package/lib/module/components/dialog/dialog.constants.js +16 -0
  99. package/lib/module/components/dialog/dialog.constants.js.map +1 -0
  100. package/lib/module/components/dialog/dialog.js +340 -0
  101. package/lib/module/components/dialog/dialog.js.map +1 -0
  102. package/lib/module/components/dialog/dialog.md +363 -0
  103. package/lib/module/components/dialog/dialog.styles.js +80 -0
  104. package/lib/module/components/dialog/dialog.styles.js.map +1 -0
  105. package/lib/module/components/dialog/dialog.types.js +4 -0
  106. package/lib/module/components/dialog/dialog.types.js.map +1 -0
  107. package/lib/module/components/dialog/index.js +4 -0
  108. package/lib/module/components/dialog/index.js.map +1 -0
  109. package/lib/module/components/divider/divider.constants.js +9 -0
  110. package/lib/module/components/divider/divider.constants.js.map +1 -0
  111. package/lib/module/components/divider/divider.js +58 -0
  112. package/lib/module/components/divider/divider.js.map +1 -0
  113. package/lib/module/components/divider/divider.md +98 -0
  114. package/lib/module/components/divider/divider.styles.js +47 -0
  115. package/lib/module/components/divider/divider.styles.js.map +1 -0
  116. package/lib/module/components/divider/divider.types.js +4 -0
  117. package/lib/module/components/divider/divider.types.js.map +1 -0
  118. package/lib/module/components/divider/index.js +4 -0
  119. package/lib/module/components/divider/index.js.map +1 -0
  120. package/lib/module/components/error-view/error-view.animation.js +44 -0
  121. package/lib/module/components/error-view/error-view.animation.js.map +1 -0
  122. package/lib/module/components/error-view/error-view.constants.js +31 -0
  123. package/lib/module/components/error-view/error-view.constants.js.map +1 -0
  124. package/lib/module/components/error-view/error-view.js +66 -0
  125. package/lib/module/components/error-view/error-view.js.map +1 -0
  126. package/lib/module/components/error-view/error-view.md +177 -0
  127. package/lib/module/components/error-view/error-view.styles.js +15 -0
  128. package/lib/module/components/error-view/error-view.styles.js.map +1 -0
  129. package/lib/module/components/error-view/error-view.types.js +4 -0
  130. package/lib/module/components/error-view/error-view.types.js.map +1 -0
  131. package/lib/module/components/error-view/index.js +4 -0
  132. package/lib/module/components/error-view/index.js.map +1 -0
  133. package/lib/module/components/form-field/form-field.animation.js +17 -0
  134. package/lib/module/components/form-field/form-field.animation.js.map +1 -0
  135. package/lib/module/components/form-field/form-field.constants.js +13 -0
  136. package/lib/module/components/form-field/form-field.constants.js.map +1 -0
  137. package/lib/module/components/form-field/form-field.context.js +13 -0
  138. package/lib/module/components/form-field/form-field.context.js.map +1 -0
  139. package/lib/module/components/form-field/form-field.js +257 -0
  140. package/lib/module/components/form-field/form-field.js.map +1 -0
  141. package/lib/module/components/form-field/form-field.md +243 -0
  142. package/lib/module/components/form-field/form-field.styles.js +36 -0
  143. package/lib/module/components/form-field/form-field.styles.js.map +1 -0
  144. package/lib/module/components/form-field/form-field.types.js +4 -0
  145. package/lib/module/components/form-field/form-field.types.js.map +1 -0
  146. package/lib/module/components/form-field/index.js +4 -0
  147. package/lib/module/components/form-field/index.js.map +1 -0
  148. package/lib/module/components/popover/arrow-svg.js +161 -0
  149. package/lib/module/components/popover/arrow-svg.js.map +1 -0
  150. package/lib/module/components/popover/index.js +4 -0
  151. package/lib/module/components/popover/index.js.map +1 -0
  152. package/lib/module/components/popover/popover.animation.js +8 -0
  153. package/lib/module/components/popover/popover.animation.js.map +1 -0
  154. package/lib/module/components/popover/popover.constants.js +37 -0
  155. package/lib/module/components/popover/popover.constants.js.map +1 -0
  156. package/lib/module/components/popover/popover.js +502 -0
  157. package/lib/module/components/popover/popover.js.map +1 -0
  158. package/lib/module/components/popover/popover.md +521 -0
  159. package/lib/module/components/popover/popover.styles.js +87 -0
  160. package/lib/module/components/popover/popover.styles.js.map +1 -0
  161. package/lib/module/components/popover/popover.types.js +4 -0
  162. package/lib/module/components/popover/popover.types.js.map +1 -0
  163. package/lib/module/components/pressable-feedback/index.js +5 -0
  164. package/lib/module/components/pressable-feedback/index.js.map +1 -0
  165. package/lib/module/components/pressable-feedback/pressable-feedback.animation.js +291 -0
  166. package/lib/module/components/pressable-feedback/pressable-feedback.animation.js.map +1 -0
  167. package/lib/module/components/pressable-feedback/pressable-feedback.constants.js +13 -0
  168. package/lib/module/components/pressable-feedback/pressable-feedback.constants.js.map +1 -0
  169. package/lib/module/components/pressable-feedback/pressable-feedback.js +220 -0
  170. package/lib/module/components/pressable-feedback/pressable-feedback.js.map +1 -0
  171. package/lib/module/components/pressable-feedback/pressable-feedback.md +246 -0
  172. package/lib/module/components/pressable-feedback/pressable-feedback.styles.js +104 -0
  173. package/lib/module/components/pressable-feedback/pressable-feedback.styles.js.map +1 -0
  174. package/lib/module/components/pressable-feedback/pressable-feedback.types.js +4 -0
  175. package/lib/module/components/pressable-feedback/pressable-feedback.types.js.map +1 -0
  176. package/lib/module/components/radio-group/index.js +4 -0
  177. package/lib/module/components/radio-group/index.js.map +1 -0
  178. package/lib/module/components/radio-group/radio-group.animation.js +80 -0
  179. package/lib/module/components/radio-group/radio-group.animation.js.map +1 -0
  180. package/lib/module/components/radio-group/radio-group.constants.js +16 -0
  181. package/lib/module/components/radio-group/radio-group.constants.js.map +1 -0
  182. package/lib/module/components/radio-group/radio-group.js +266 -0
  183. package/lib/module/components/radio-group/radio-group.js.map +1 -0
  184. package/lib/module/components/radio-group/radio-group.md +303 -0
  185. package/lib/module/components/radio-group/radio-group.styles.js +95 -0
  186. package/lib/module/components/radio-group/radio-group.styles.js.map +1 -0
  187. package/lib/module/components/radio-group/radio-group.types.js +4 -0
  188. package/lib/module/components/radio-group/radio-group.types.js.map +1 -0
  189. package/lib/module/components/scroll-shadow/index.js +4 -0
  190. package/lib/module/components/scroll-shadow/index.js.map +1 -0
  191. package/lib/module/components/scroll-shadow/scroll-shadow.animation.js +95 -0
  192. package/lib/module/components/scroll-shadow/scroll-shadow.animation.js.map +1 -0
  193. package/lib/module/components/scroll-shadow/scroll-shadow.constants.js +24 -0
  194. package/lib/module/components/scroll-shadow/scroll-shadow.constants.js.map +1 -0
  195. package/lib/module/components/scroll-shadow/scroll-shadow.js +211 -0
  196. package/lib/module/components/scroll-shadow/scroll-shadow.js.map +1 -0
  197. package/lib/module/components/scroll-shadow/scroll-shadow.md +191 -0
  198. package/lib/module/components/scroll-shadow/scroll-shadow.styles.js +50 -0
  199. package/lib/module/components/scroll-shadow/scroll-shadow.styles.js.map +1 -0
  200. package/lib/module/components/scroll-shadow/scroll-shadow.types.js +4 -0
  201. package/lib/module/components/scroll-shadow/scroll-shadow.types.js.map +1 -0
  202. package/lib/module/components/select/index.js +4 -0
  203. package/lib/module/components/select/index.js.map +1 -0
  204. package/lib/module/components/select/select.animation.js +8 -0
  205. package/lib/module/components/select/select.animation.js.map +1 -0
  206. package/lib/module/components/select/select.constants.js +40 -0
  207. package/lib/module/components/select/select.constants.js.map +1 -0
  208. package/lib/module/components/select/select.js +608 -0
  209. package/lib/module/components/select/select.js.map +1 -0
  210. package/lib/module/components/select/select.md +735 -0
  211. package/lib/module/components/select/select.styles.js +143 -0
  212. package/lib/module/components/select/select.styles.js.map +1 -0
  213. package/lib/module/components/select/select.types.js +4 -0
  214. package/lib/module/components/select/select.types.js.map +1 -0
  215. package/lib/module/components/skeleton/index.js +4 -0
  216. package/lib/module/components/skeleton/index.js.map +1 -0
  217. package/lib/module/components/skeleton/linear-gradient.js +44 -0
  218. package/lib/module/components/skeleton/linear-gradient.js.map +1 -0
  219. package/lib/module/components/skeleton/skeleton.animation.js +256 -0
  220. package/lib/module/components/skeleton/skeleton.animation.js.map +1 -0
  221. package/lib/module/components/skeleton/skeleton.constants.js +42 -0
  222. package/lib/module/components/skeleton/skeleton.constants.js.map +1 -0
  223. package/lib/module/components/skeleton/skeleton.js +157 -0
  224. package/lib/module/components/skeleton/skeleton.js.map +1 -0
  225. package/lib/module/components/skeleton/skeleton.md +200 -0
  226. package/lib/module/components/skeleton/skeleton.styles.js +59 -0
  227. package/lib/module/components/skeleton/skeleton.styles.js.map +1 -0
  228. package/lib/module/components/skeleton/skeleton.types.js +4 -0
  229. package/lib/module/components/skeleton/skeleton.types.js.map +1 -0
  230. package/lib/module/components/skeleton-group/index.js +4 -0
  231. package/lib/module/components/skeleton-group/index.js.map +1 -0
  232. package/lib/module/components/skeleton-group/skeleton-group.constants.js +10 -0
  233. package/lib/module/components/skeleton-group/skeleton-group.constants.js.map +1 -0
  234. package/lib/module/components/skeleton-group/skeleton-group.js +82 -0
  235. package/lib/module/components/skeleton-group/skeleton-group.js.map +1 -0
  236. package/lib/module/components/skeleton-group/skeleton-group.md +247 -0
  237. package/lib/module/components/skeleton-group/skeleton-group.styles.js +11 -0
  238. package/lib/module/components/skeleton-group/skeleton-group.styles.js.map +1 -0
  239. package/lib/module/components/skeleton-group/skeleton-group.types.js +4 -0
  240. package/lib/module/components/skeleton-group/skeleton-group.types.js.map +1 -0
  241. package/lib/module/components/spinner/index.js +4 -0
  242. package/lib/module/components/spinner/index.js.map +1 -0
  243. package/lib/module/components/spinner/spinner-icon.js +64 -0
  244. package/lib/module/components/spinner/spinner-icon.js.map +1 -0
  245. package/lib/module/components/spinner/spinner.animation.js +119 -0
  246. package/lib/module/components/spinner/spinner.animation.js.map +1 -0
  247. package/lib/module/components/spinner/spinner.constants.js +37 -0
  248. package/lib/module/components/spinner/spinner.constants.js.map +1 -0
  249. package/lib/module/components/spinner/spinner.js +143 -0
  250. package/lib/module/components/spinner/spinner.js.map +1 -0
  251. package/lib/module/components/spinner/spinner.md +199 -0
  252. package/lib/module/components/spinner/spinner.styles.js +46 -0
  253. package/lib/module/components/spinner/spinner.styles.js.map +1 -0
  254. package/lib/module/components/spinner/spinner.types.js +4 -0
  255. package/lib/module/components/spinner/spinner.types.js.map +1 -0
  256. package/lib/module/components/surface/index.js +4 -0
  257. package/lib/module/components/surface/index.js.map +1 -0
  258. package/lib/module/components/surface/surface.animation.js +17 -0
  259. package/lib/module/components/surface/surface.animation.js.map +1 -0
  260. package/lib/module/components/surface/surface.constants.js +9 -0
  261. package/lib/module/components/surface/surface.constants.js.map +1 -0
  262. package/lib/module/components/surface/surface.js +65 -0
  263. package/lib/module/components/surface/surface.js.map +1 -0
  264. package/lib/module/components/surface/surface.md +141 -0
  265. package/lib/module/components/surface/surface.styles.js +26 -0
  266. package/lib/module/components/surface/surface.styles.js.map +1 -0
  267. package/lib/module/components/surface/surface.types.js +4 -0
  268. package/lib/module/components/surface/surface.types.js.map +1 -0
  269. package/lib/module/components/switch/index.js +5 -0
  270. package/lib/module/components/switch/index.js.map +1 -0
  271. package/lib/module/components/switch/switch.animation.js +183 -0
  272. package/lib/module/components/switch/switch.animation.js.map +1 -0
  273. package/lib/module/components/switch/switch.constants.js +23 -0
  274. package/lib/module/components/switch/switch.constants.js.map +1 -0
  275. package/lib/module/components/switch/switch.js +223 -0
  276. package/lib/module/components/switch/switch.js.map +1 -0
  277. package/lib/module/components/switch/switch.md +332 -0
  278. package/lib/module/components/switch/switch.styles.js +83 -0
  279. package/lib/module/components/switch/switch.styles.js.map +1 -0
  280. package/lib/module/components/switch/switch.types.js +4 -0
  281. package/lib/module/components/switch/switch.types.js.map +1 -0
  282. package/lib/module/components/tabs/index.js +4 -0
  283. package/lib/module/components/tabs/index.js.map +1 -0
  284. package/lib/module/components/tabs/tabs.animation.js +139 -0
  285. package/lib/module/components/tabs/tabs.animation.js.map +1 -0
  286. package/lib/module/components/tabs/tabs.constants.js +16 -0
  287. package/lib/module/components/tabs/tabs.constants.js.map +1 -0
  288. package/lib/module/components/tabs/tabs.context.js +24 -0
  289. package/lib/module/components/tabs/tabs.context.js.map +1 -0
  290. package/lib/module/components/tabs/tabs.js +329 -0
  291. package/lib/module/components/tabs/tabs.js.map +1 -0
  292. package/lib/module/components/tabs/tabs.md +492 -0
  293. package/lib/module/components/tabs/tabs.styles.js +120 -0
  294. package/lib/module/components/tabs/tabs.styles.js.map +1 -0
  295. package/lib/module/components/tabs/tabs.types.js +4 -0
  296. package/lib/module/components/tabs/tabs.types.js.map +1 -0
  297. package/lib/module/components/text-field/index.js +4 -0
  298. package/lib/module/components/text-field/index.js.map +1 -0
  299. package/lib/module/components/text-field/text-field.animation.js +228 -0
  300. package/lib/module/components/text-field/text-field.animation.js.map +1 -0
  301. package/lib/module/components/text-field/text-field.constants.js +37 -0
  302. package/lib/module/components/text-field/text-field.constants.js.map +1 -0
  303. package/lib/module/components/text-field/text-field.js +324 -0
  304. package/lib/module/components/text-field/text-field.js.map +1 -0
  305. package/lib/module/components/text-field/text-field.md +377 -0
  306. package/lib/module/components/text-field/text-field.styles.js +96 -0
  307. package/lib/module/components/text-field/text-field.styles.js.map +1 -0
  308. package/lib/module/components/text-field/text-field.types.js +4 -0
  309. package/lib/module/components/text-field/text-field.types.js.map +1 -0
  310. package/lib/module/components/toast/index.js +4 -0
  311. package/lib/module/components/toast/index.js.map +1 -0
  312. package/lib/module/components/toast/toast.animation.js +315 -0
  313. package/lib/module/components/toast/toast.animation.js.map +1 -0
  314. package/lib/module/components/toast/toast.constants.js +13 -0
  315. package/lib/module/components/toast/toast.constants.js.map +1 -0
  316. package/lib/module/components/toast/toast.js +382 -0
  317. package/lib/module/components/toast/toast.js.map +1 -0
  318. package/lib/module/components/toast/toast.md +417 -0
  319. package/lib/module/components/toast/toast.styles.js +88 -0
  320. package/lib/module/components/toast/toast.styles.js.map +1 -0
  321. package/lib/module/components/toast/toast.types.js +4 -0
  322. package/lib/module/components/toast/toast.types.js.map +1 -0
  323. package/lib/module/helpers/components/animated-check-icon.js +53 -0
  324. package/lib/module/helpers/components/animated-check-icon.js.map +1 -0
  325. package/lib/module/helpers/components/bottom-sheet-content-container.js +49 -0
  326. package/lib/module/helpers/components/bottom-sheet-content-container.js.map +1 -0
  327. package/lib/module/helpers/components/check-icon.js +25 -0
  328. package/lib/module/helpers/components/check-icon.js.map +1 -0
  329. package/lib/module/helpers/components/close-icon.js +25 -0
  330. package/lib/module/helpers/components/close-icon.js.map +1 -0
  331. package/lib/module/helpers/components/full-window-overlay.js +7 -0
  332. package/lib/module/helpers/components/full-window-overlay.js.map +1 -0
  333. package/lib/module/helpers/components/hero-text.js +66 -0
  334. package/lib/module/helpers/components/hero-text.js.map +1 -0
  335. package/lib/module/helpers/components/index.js +8 -0
  336. package/lib/module/helpers/components/index.js.map +1 -0
  337. package/lib/module/helpers/contexts/animation-settings-context.js +14 -0
  338. package/lib/module/helpers/contexts/animation-settings-context.js.map +1 -0
  339. package/lib/module/helpers/contexts/index.js +4 -0
  340. package/lib/module/helpers/contexts/index.js.map +1 -0
  341. package/lib/module/helpers/hooks/index.js +14 -0
  342. package/lib/module/helpers/hooks/index.js.map +1 -0
  343. package/lib/module/helpers/hooks/use-augmented-ref.js +23 -0
  344. package/lib/module/helpers/hooks/use-augmented-ref.js.map +1 -0
  345. package/lib/module/helpers/hooks/use-combined-animation-disabled-state.js +48 -0
  346. package/lib/module/helpers/hooks/use-combined-animation-disabled-state.js.map +1 -0
  347. package/lib/module/helpers/hooks/use-controllable-state.js +83 -0
  348. package/lib/module/helpers/hooks/use-controllable-state.js.map +1 -0
  349. package/lib/module/helpers/hooks/use-keyboard-status.js +21 -0
  350. package/lib/module/helpers/hooks/use-keyboard-status.js.map +1 -0
  351. package/lib/module/helpers/hooks/use-popup-bottom-sheet-content-animation.js +56 -0
  352. package/lib/module/helpers/hooks/use-popup-bottom-sheet-content-animation.js.map +1 -0
  353. package/lib/module/helpers/hooks/use-popup-dialog-content-animation.js +157 -0
  354. package/lib/module/helpers/hooks/use-popup-dialog-content-animation.js.map +1 -0
  355. package/lib/module/helpers/hooks/use-popup-overlay-animation.js +58 -0
  356. package/lib/module/helpers/hooks/use-popup-overlay-animation.js.map +1 -0
  357. package/lib/module/helpers/hooks/use-popup-popover-content-animation.js +103 -0
  358. package/lib/module/helpers/hooks/use-popup-popover-content-animation.js.map +1 -0
  359. package/lib/module/helpers/hooks/use-popup-root-animation.js +200 -0
  360. package/lib/module/helpers/hooks/use-popup-root-animation.js.map +1 -0
  361. package/lib/module/helpers/hooks/use-relative-position.js +220 -0
  362. package/lib/module/helpers/hooks/use-relative-position.js.map +1 -0
  363. package/lib/module/helpers/hooks/use-resolved-style-property.js +89 -0
  364. package/lib/module/helpers/hooks/use-resolved-style-property.js.map +1 -0
  365. package/lib/module/helpers/theme/color-kit/index.js +2338 -0
  366. package/lib/module/helpers/theme/color-kit/index.js.map +1 -0
  367. package/lib/module/helpers/theme/color-kit/types.js +2 -0
  368. package/lib/module/helpers/theme/color-kit/types.js.map +1 -0
  369. package/lib/module/helpers/theme/hooks/use-is-on-surface.js +8 -0
  370. package/lib/module/helpers/theme/hooks/use-is-on-surface.js.map +1 -0
  371. package/lib/module/helpers/theme/hooks/use-theme-color.js +43 -0
  372. package/lib/module/helpers/theme/hooks/use-theme-color.js.map +1 -0
  373. package/lib/module/helpers/theme/index.js +7 -0
  374. package/lib/module/helpers/theme/index.js.map +1 -0
  375. package/lib/module/helpers/theme/types.js +22 -0
  376. package/lib/module/helpers/theme/types.js.map +1 -0
  377. package/lib/module/helpers/theme/utils/cn.js +16 -0
  378. package/lib/module/helpers/theme/utils/cn.js.map +1 -0
  379. package/lib/module/helpers/theme/utils/combine-styles.js +16 -0
  380. package/lib/module/helpers/theme/utils/combine-styles.js.map +1 -0
  381. package/lib/module/helpers/types/animation.js +4 -0
  382. package/lib/module/helpers/types/animation.js.map +1 -0
  383. package/lib/module/helpers/types/bottom-sheet.js +4 -0
  384. package/lib/module/helpers/types/bottom-sheet.js.map +1 -0
  385. package/lib/module/helpers/types/index.js +7 -0
  386. package/lib/module/helpers/types/index.js.map +1 -0
  387. package/lib/module/helpers/types/misc.js +2 -0
  388. package/lib/module/helpers/types/misc.js.map +1 -0
  389. package/lib/module/helpers/types/primitives.js +4 -0
  390. package/lib/module/helpers/types/primitives.js.map +1 -0
  391. package/lib/module/helpers/utils/animation.js +212 -0
  392. package/lib/module/helpers/utils/animation.js.map +1 -0
  393. package/lib/module/helpers/utils/children-to-string.js +69 -0
  394. package/lib/module/helpers/utils/children-to-string.js.map +1 -0
  395. package/lib/module/helpers/utils/create-context.js +29 -0
  396. package/lib/module/helpers/utils/create-context.js.map +1 -0
  397. package/lib/module/helpers/utils/ease-gradient/create-interpolation.js +29 -0
  398. package/lib/module/helpers/utils/ease-gradient/create-interpolation.js.map +1 -0
  399. package/lib/module/helpers/utils/ease-gradient/index.js +60 -0
  400. package/lib/module/helpers/utils/ease-gradient/index.js.map +1 -0
  401. package/lib/module/helpers/utils/get-element-by-display-name.js +8 -0
  402. package/lib/module/helpers/utils/get-element-by-display-name.js.map +1 -0
  403. package/lib/module/helpers/utils/get-element-with-default.js +11 -0
  404. package/lib/module/helpers/utils/get-element-with-default.js.map +1 -0
  405. package/lib/module/helpers/utils/has-prop.js +15 -0
  406. package/lib/module/helpers/utils/has-prop.js.map +1 -0
  407. package/lib/module/helpers/utils/index.js +10 -0
  408. package/lib/module/helpers/utils/index.js.map +1 -0
  409. package/lib/module/index.js +36 -0
  410. package/lib/module/index.js.map +1 -0
  411. package/lib/module/package.json +1 -0
  412. package/lib/module/primitives/README.md +27 -0
  413. package/lib/module/primitives/accordion/accordion.js +208 -0
  414. package/lib/module/primitives/accordion/accordion.js.map +1 -0
  415. package/lib/module/primitives/accordion/accordion.types.js +4 -0
  416. package/lib/module/primitives/accordion/accordion.types.js.map +1 -0
  417. package/lib/module/primitives/accordion/accordion.utils.js +9 -0
  418. package/lib/module/primitives/accordion/accordion.utils.js.map +1 -0
  419. package/lib/module/primitives/accordion/index.js +5 -0
  420. package/lib/module/primitives/accordion/index.js.map +1 -0
  421. package/lib/module/primitives/activity-indicator/activity-indicator.js +43 -0
  422. package/lib/module/primitives/activity-indicator/activity-indicator.js.map +1 -0
  423. package/lib/module/primitives/activity-indicator/activity-indicator.types.js +4 -0
  424. package/lib/module/primitives/activity-indicator/activity-indicator.types.js.map +1 -0
  425. package/lib/module/primitives/activity-indicator/index.js +5 -0
  426. package/lib/module/primitives/activity-indicator/index.js.map +1 -0
  427. package/lib/module/primitives/avatar/avatar.js +133 -0
  428. package/lib/module/primitives/avatar/avatar.js.map +1 -0
  429. package/lib/module/primitives/avatar/avatar.types.js +4 -0
  430. package/lib/module/primitives/avatar/avatar.types.js.map +1 -0
  431. package/lib/module/primitives/avatar/avatar.utils.js +98 -0
  432. package/lib/module/primitives/avatar/avatar.utils.js.map +1 -0
  433. package/lib/module/primitives/avatar/index.js +5 -0
  434. package/lib/module/primitives/avatar/index.js.map +1 -0
  435. package/lib/module/primitives/bottom-sheet/bottom-sheet.js +214 -0
  436. package/lib/module/primitives/bottom-sheet/bottom-sheet.js.map +1 -0
  437. package/lib/module/primitives/bottom-sheet/bottom-sheet.types.js +4 -0
  438. package/lib/module/primitives/bottom-sheet/bottom-sheet.types.js.map +1 -0
  439. package/lib/module/primitives/bottom-sheet/index.js +5 -0
  440. package/lib/module/primitives/bottom-sheet/index.js.map +1 -0
  441. package/lib/module/primitives/checkbox/checkbox.js +99 -0
  442. package/lib/module/primitives/checkbox/checkbox.js.map +1 -0
  443. package/lib/module/primitives/checkbox/checkbox.types.js +4 -0
  444. package/lib/module/primitives/checkbox/checkbox.types.js.map +1 -0
  445. package/lib/module/primitives/checkbox/index.js +5 -0
  446. package/lib/module/primitives/checkbox/index.js.map +1 -0
  447. package/lib/module/primitives/dialog/dialog.js +234 -0
  448. package/lib/module/primitives/dialog/dialog.js.map +1 -0
  449. package/lib/module/primitives/dialog/dialog.types.js +4 -0
  450. package/lib/module/primitives/dialog/dialog.types.js.map +1 -0
  451. package/lib/module/primitives/dialog/index.js +5 -0
  452. package/lib/module/primitives/dialog/index.js.map +1 -0
  453. package/lib/module/primitives/label/index.js +5 -0
  454. package/lib/module/primitives/label/index.js.map +1 -0
  455. package/lib/module/primitives/label/label.js +33 -0
  456. package/lib/module/primitives/label/label.js.map +1 -0
  457. package/lib/module/primitives/label/label.types.js +4 -0
  458. package/lib/module/primitives/label/label.types.js.map +1 -0
  459. package/lib/module/primitives/popover/index.js +5 -0
  460. package/lib/module/primitives/popover/index.js.map +1 -0
  461. package/lib/module/primitives/popover/popover.js +340 -0
  462. package/lib/module/primitives/popover/popover.js.map +1 -0
  463. package/lib/module/primitives/popover/popover.types.js +4 -0
  464. package/lib/module/primitives/popover/popover.types.js.map +1 -0
  465. package/lib/module/primitives/portal/index.js +4 -0
  466. package/lib/module/primitives/portal/index.js.map +1 -0
  467. package/lib/module/primitives/portal/portal.js +105 -0
  468. package/lib/module/primitives/portal/portal.js.map +1 -0
  469. package/lib/module/primitives/radio-group/index.js +5 -0
  470. package/lib/module/primitives/radio-group/index.js.map +1 -0
  471. package/lib/module/primitives/radio-group/radio-group.js +92 -0
  472. package/lib/module/primitives/radio-group/radio-group.js.map +1 -0
  473. package/lib/module/primitives/radio-group/radio-group.types.js +4 -0
  474. package/lib/module/primitives/radio-group/radio-group.types.js.map +1 -0
  475. package/lib/module/primitives/select/index.js +5 -0
  476. package/lib/module/primitives/select/index.js.map +1 -0
  477. package/lib/module/primitives/select/select.js +555 -0
  478. package/lib/module/primitives/select/select.js.map +1 -0
  479. package/lib/module/primitives/select/select.types.js +4 -0
  480. package/lib/module/primitives/select/select.types.js.map +1 -0
  481. package/lib/module/primitives/slot/index.js +4 -0
  482. package/lib/module/primitives/slot/index.js.map +1 -0
  483. package/lib/module/primitives/slot/slot.js +78 -0
  484. package/lib/module/primitives/slot/slot.js.map +1 -0
  485. package/lib/module/primitives/slot/types.js +4 -0
  486. package/lib/module/primitives/slot/types.js.map +1 -0
  487. package/lib/module/primitives/slot/utils.js +79 -0
  488. package/lib/module/primitives/slot/utils.js.map +1 -0
  489. package/lib/module/primitives/switch/index.js +5 -0
  490. package/lib/module/primitives/switch/index.js.map +1 -0
  491. package/lib/module/primitives/switch/switch.js +57 -0
  492. package/lib/module/primitives/switch/switch.js.map +1 -0
  493. package/lib/module/primitives/switch/switch.types.js +4 -0
  494. package/lib/module/primitives/switch/switch.types.js.map +1 -0
  495. package/lib/module/primitives/tabs/index.js +5 -0
  496. package/lib/module/primitives/tabs/index.js.map +1 -0
  497. package/lib/module/primitives/tabs/tabs.js +169 -0
  498. package/lib/module/primitives/tabs/tabs.js.map +1 -0
  499. package/lib/module/primitives/tabs/tabs.types.js +4 -0
  500. package/lib/module/primitives/tabs/tabs.types.js.map +1 -0
  501. package/lib/module/primitives/toast/index.js +5 -0
  502. package/lib/module/primitives/toast/index.js.map +1 -0
  503. package/lib/module/primitives/toast/toast.js +117 -0
  504. package/lib/module/primitives/toast/toast.js.map +1 -0
  505. package/lib/module/primitives/toast/toast.types.js +4 -0
  506. package/lib/module/primitives/toast/toast.types.js.map +1 -0
  507. package/lib/module/providers/animation-settings/index.js +4 -0
  508. package/lib/module/providers/animation-settings/index.js.map +1 -0
  509. package/lib/module/providers/animation-settings/provider.js +43 -0
  510. package/lib/module/providers/animation-settings/provider.js.map +1 -0
  511. package/lib/module/providers/animation-settings/types.js +4 -0
  512. package/lib/module/providers/animation-settings/types.js.map +1 -0
  513. package/lib/module/providers/hero-ui-native/index.js +5 -0
  514. package/lib/module/providers/hero-ui-native/index.js.map +1 -0
  515. package/lib/module/providers/hero-ui-native/provider.js +92 -0
  516. package/lib/module/providers/hero-ui-native/provider.js.map +1 -0
  517. package/lib/module/providers/hero-ui-native/provider.md +332 -0
  518. package/lib/module/providers/hero-ui-native/types.js +4 -0
  519. package/lib/module/providers/hero-ui-native/types.js.map +1 -0
  520. package/lib/module/providers/text-component/index.js +5 -0
  521. package/lib/module/providers/text-component/index.js.map +1 -0
  522. package/lib/module/providers/text-component/provider.js +8 -0
  523. package/lib/module/providers/text-component/provider.js.map +1 -0
  524. package/lib/module/providers/text-component/types.js +4 -0
  525. package/lib/module/providers/text-component/types.js.map +1 -0
  526. package/lib/module/providers/toast/index.js +5 -0
  527. package/lib/module/providers/toast/index.js.map +1 -0
  528. package/lib/module/providers/toast/insets-container.js +46 -0
  529. package/lib/module/providers/toast/insets-container.js.map +1 -0
  530. package/lib/module/providers/toast/provider.js +366 -0
  531. package/lib/module/providers/toast/provider.js.map +1 -0
  532. package/lib/module/providers/toast/reducer.js +28 -0
  533. package/lib/module/providers/toast/reducer.js.map +1 -0
  534. package/lib/module/providers/toast/toast-config.context.js +25 -0
  535. package/lib/module/providers/toast/toast-config.context.js.map +1 -0
  536. package/lib/module/providers/toast/toast-item-renderer.js +35 -0
  537. package/lib/module/providers/toast/toast-item-renderer.js.map +1 -0
  538. package/lib/module/providers/toast/types.js +4 -0
  539. package/lib/module/providers/toast/types.js.map +1 -0
  540. package/lib/module/styles/index.css +3 -0
  541. package/lib/module/styles/theme.css +205 -0
  542. package/lib/module/styles/theme.md +423 -0
  543. package/lib/module/styles/utilities.css +8 -0
  544. package/lib/module/styles/variables.css +113 -0
  545. package/lib/typescript/package.json +1 -0
  546. package/lib/typescript/src/components/accordion/accordion.animation.d.ts +38 -0
  547. package/lib/typescript/src/components/accordion/accordion.animation.d.ts.map +1 -0
  548. package/lib/typescript/src/components/accordion/accordion.constants.d.ts +44 -0
  549. package/lib/typescript/src/components/accordion/accordion.constants.d.ts.map +1 -0
  550. package/lib/typescript/src/components/accordion/accordion.d.ts +53 -0
  551. package/lib/typescript/src/components/accordion/accordion.d.ts.map +1 -0
  552. package/lib/typescript/src/components/accordion/accordion.styles.d.ts +130 -0
  553. package/lib/typescript/src/components/accordion/accordion.styles.d.ts.map +1 -0
  554. package/lib/typescript/src/components/accordion/accordion.types.d.ts +228 -0
  555. package/lib/typescript/src/components/accordion/accordion.types.d.ts.map +1 -0
  556. package/lib/typescript/src/components/accordion/chevron-down-icon.d.ts +8 -0
  557. package/lib/typescript/src/components/accordion/chevron-down-icon.d.ts.map +1 -0
  558. package/lib/typescript/src/components/accordion/index.d.ts +4 -0
  559. package/lib/typescript/src/components/accordion/index.d.ts.map +1 -0
  560. package/lib/typescript/src/components/avatar/avatar.animation.d.ts +33 -0
  561. package/lib/typescript/src/components/avatar/avatar.animation.d.ts.map +1 -0
  562. package/lib/typescript/src/components/avatar/avatar.constants.d.ts +14 -0
  563. package/lib/typescript/src/components/avatar/avatar.constants.d.ts.map +1 -0
  564. package/lib/typescript/src/components/avatar/avatar.context.d.ts +7 -0
  565. package/lib/typescript/src/components/avatar/avatar.context.d.ts.map +1 -0
  566. package/lib/typescript/src/components/avatar/avatar.d.ts +33 -0
  567. package/lib/typescript/src/components/avatar/avatar.d.ts.map +1 -0
  568. package/lib/typescript/src/components/avatar/avatar.styles.d.ts +269 -0
  569. package/lib/typescript/src/components/avatar/avatar.styles.d.ts.map +1 -0
  570. package/lib/typescript/src/components/avatar/avatar.types.d.ts +188 -0
  571. package/lib/typescript/src/components/avatar/avatar.types.d.ts.map +1 -0
  572. package/lib/typescript/src/components/avatar/index.d.ts +3 -0
  573. package/lib/typescript/src/components/avatar/index.d.ts.map +1 -0
  574. package/lib/typescript/src/components/avatar/person-icon.d.ts +7 -0
  575. package/lib/typescript/src/components/avatar/person-icon.d.ts.map +1 -0
  576. package/lib/typescript/src/components/bottom-sheet/bottom-sheet.animation.d.ts +15 -0
  577. package/lib/typescript/src/components/bottom-sheet/bottom-sheet.animation.d.ts.map +1 -0
  578. package/lib/typescript/src/components/bottom-sheet/bottom-sheet.constants.d.ts +14 -0
  579. package/lib/typescript/src/components/bottom-sheet/bottom-sheet.constants.d.ts.map +1 -0
  580. package/lib/typescript/src/components/bottom-sheet/bottom-sheet.d.ts +54 -0
  581. package/lib/typescript/src/components/bottom-sheet/bottom-sheet.d.ts.map +1 -0
  582. package/lib/typescript/src/components/bottom-sheet/bottom-sheet.styles.d.ts +16 -0
  583. package/lib/typescript/src/components/bottom-sheet/bottom-sheet.styles.d.ts.map +1 -0
  584. package/lib/typescript/src/components/bottom-sheet/bottom-sheet.types.d.ts +177 -0
  585. package/lib/typescript/src/components/bottom-sheet/bottom-sheet.types.d.ts.map +1 -0
  586. package/lib/typescript/src/components/bottom-sheet/index.d.ts +3 -0
  587. package/lib/typescript/src/components/bottom-sheet/index.d.ts.map +1 -0
  588. package/lib/typescript/src/components/button/button.constants.d.ts +8 -0
  589. package/lib/typescript/src/components/button/button.constants.d.ts.map +1 -0
  590. package/lib/typescript/src/components/button/button.d.ts +31 -0
  591. package/lib/typescript/src/components/button/button.d.ts.map +1 -0
  592. package/lib/typescript/src/components/button/button.styles.d.ts +113 -0
  593. package/lib/typescript/src/components/button/button.styles.d.ts.map +1 -0
  594. package/lib/typescript/src/components/button/button.types.d.ts +74 -0
  595. package/lib/typescript/src/components/button/button.types.d.ts.map +1 -0
  596. package/lib/typescript/src/components/button/index.d.ts +3 -0
  597. package/lib/typescript/src/components/button/index.d.ts.map +1 -0
  598. package/lib/typescript/src/components/card/card.constants.d.ts +12 -0
  599. package/lib/typescript/src/components/card/card.constants.d.ts.map +1 -0
  600. package/lib/typescript/src/components/card/card.d.ts +37 -0
  601. package/lib/typescript/src/components/card/card.d.ts.map +1 -0
  602. package/lib/typescript/src/components/card/card.styles.d.ts +10 -0
  603. package/lib/typescript/src/components/card/card.styles.d.ts.map +1 -0
  604. package/lib/typescript/src/components/card/card.types.d.ts +73 -0
  605. package/lib/typescript/src/components/card/card.types.d.ts.map +1 -0
  606. package/lib/typescript/src/components/card/index.d.ts +3 -0
  607. package/lib/typescript/src/components/card/index.d.ts.map +1 -0
  608. package/lib/typescript/src/components/checkbox/checkbox.animation.d.ts +34 -0
  609. package/lib/typescript/src/components/checkbox/checkbox.animation.d.ts.map +1 -0
  610. package/lib/typescript/src/components/checkbox/checkbox.constants.d.ts +6 -0
  611. package/lib/typescript/src/components/checkbox/checkbox.constants.d.ts.map +1 -0
  612. package/lib/typescript/src/components/checkbox/checkbox.d.ts +27 -0
  613. package/lib/typescript/src/components/checkbox/checkbox.d.ts.map +1 -0
  614. package/lib/typescript/src/components/checkbox/checkbox.styles.d.ts +77 -0
  615. package/lib/typescript/src/components/checkbox/checkbox.styles.d.ts.map +1 -0
  616. package/lib/typescript/src/components/checkbox/checkbox.types.d.ts +184 -0
  617. package/lib/typescript/src/components/checkbox/checkbox.types.d.ts.map +1 -0
  618. package/lib/typescript/src/components/checkbox/index.d.ts +3 -0
  619. package/lib/typescript/src/components/checkbox/index.d.ts.map +1 -0
  620. package/lib/typescript/src/components/chip/chip.animation.d.ts +11 -0
  621. package/lib/typescript/src/components/chip/chip.animation.d.ts.map +1 -0
  622. package/lib/typescript/src/components/chip/chip.constants.d.ts +8 -0
  623. package/lib/typescript/src/components/chip/chip.constants.d.ts.map +1 -0
  624. package/lib/typescript/src/components/chip/chip.d.ts +24 -0
  625. package/lib/typescript/src/components/chip/chip.d.ts.map +1 -0
  626. package/lib/typescript/src/components/chip/chip.styles.d.ts +184 -0
  627. package/lib/typescript/src/components/chip/chip.styles.d.ts.map +1 -0
  628. package/lib/typescript/src/components/chip/chip.types.d.ts +56 -0
  629. package/lib/typescript/src/components/chip/chip.types.d.ts.map +1 -0
  630. package/lib/typescript/src/components/chip/index.d.ts +3 -0
  631. package/lib/typescript/src/components/chip/index.d.ts.map +1 -0
  632. package/lib/typescript/src/components/dialog/dialog.animation.d.ts +4 -0
  633. package/lib/typescript/src/components/dialog/dialog.animation.d.ts.map +1 -0
  634. package/lib/typescript/src/components/dialog/dialog.constants.d.ts +14 -0
  635. package/lib/typescript/src/components/dialog/dialog.constants.d.ts.map +1 -0
  636. package/lib/typescript/src/components/dialog/dialog.d.ts +56 -0
  637. package/lib/typescript/src/components/dialog/dialog.d.ts.map +1 -0
  638. package/lib/typescript/src/components/dialog/dialog.styles.d.ts +15 -0
  639. package/lib/typescript/src/components/dialog/dialog.styles.d.ts.map +1 -0
  640. package/lib/typescript/src/components/dialog/dialog.types.d.ts +224 -0
  641. package/lib/typescript/src/components/dialog/dialog.types.d.ts.map +1 -0
  642. package/lib/typescript/src/components/dialog/index.d.ts +3 -0
  643. package/lib/typescript/src/components/dialog/index.d.ts.map +1 -0
  644. package/lib/typescript/src/components/divider/divider.constants.d.ts +7 -0
  645. package/lib/typescript/src/components/divider/divider.constants.d.ts.map +1 -0
  646. package/lib/typescript/src/components/divider/divider.d.ts +15 -0
  647. package/lib/typescript/src/components/divider/divider.d.ts.map +1 -0
  648. package/lib/typescript/src/components/divider/divider.styles.d.ts +30 -0
  649. package/lib/typescript/src/components/divider/divider.styles.d.ts.map +1 -0
  650. package/lib/typescript/src/components/divider/divider.types.d.ts +35 -0
  651. package/lib/typescript/src/components/divider/divider.types.d.ts.map +1 -0
  652. package/lib/typescript/src/components/divider/index.d.ts +3 -0
  653. package/lib/typescript/src/components/divider/index.d.ts.map +1 -0
  654. package/lib/typescript/src/components/error-view/error-view.animation.d.ts +12 -0
  655. package/lib/typescript/src/components/error-view/error-view.animation.d.ts.map +1 -0
  656. package/lib/typescript/src/components/error-view/error-view.constants.d.ts +24 -0
  657. package/lib/typescript/src/components/error-view/error-view.constants.d.ts.map +1 -0
  658. package/lib/typescript/src/components/error-view/error-view.d.ts +11 -0
  659. package/lib/typescript/src/components/error-view/error-view.d.ts.map +1 -0
  660. package/lib/typescript/src/components/error-view/error-view.styles.d.ts +67 -0
  661. package/lib/typescript/src/components/error-view/error-view.styles.d.ts.map +1 -0
  662. package/lib/typescript/src/components/error-view/error-view.types.d.ts +57 -0
  663. package/lib/typescript/src/components/error-view/error-view.types.d.ts.map +1 -0
  664. package/lib/typescript/src/components/error-view/index.d.ts +3 -0
  665. package/lib/typescript/src/components/error-view/index.d.ts.map +1 -0
  666. package/lib/typescript/src/components/form-field/form-field.animation.d.ts +11 -0
  667. package/lib/typescript/src/components/form-field/form-field.animation.d.ts.map +1 -0
  668. package/lib/typescript/src/components/form-field/form-field.constants.d.ts +11 -0
  669. package/lib/typescript/src/components/form-field/form-field.constants.d.ts.map +1 -0
  670. package/lib/typescript/src/components/form-field/form-field.context.d.ts +8 -0
  671. package/lib/typescript/src/components/form-field/form-field.context.d.ts.map +1 -0
  672. package/lib/typescript/src/components/form-field/form-field.d.ts +37 -0
  673. package/lib/typescript/src/components/form-field/form-field.d.ts.map +1 -0
  674. package/lib/typescript/src/components/form-field/form-field.styles.d.ts +21 -0
  675. package/lib/typescript/src/components/form-field/form-field.styles.d.ts.map +1 -0
  676. package/lib/typescript/src/components/form-field/form-field.types.d.ts +62 -0
  677. package/lib/typescript/src/components/form-field/form-field.types.d.ts.map +1 -0
  678. package/lib/typescript/src/components/form-field/index.d.ts +3 -0
  679. package/lib/typescript/src/components/form-field/index.d.ts.map +1 -0
  680. package/lib/typescript/src/components/popover/arrow-svg.d.ts +15 -0
  681. package/lib/typescript/src/components/popover/arrow-svg.d.ts.map +1 -0
  682. package/lib/typescript/src/components/popover/index.d.ts +3 -0
  683. package/lib/typescript/src/components/popover/index.d.ts.map +1 -0
  684. package/lib/typescript/src/components/popover/popover.animation.d.ts +4 -0
  685. package/lib/typescript/src/components/popover/popover.animation.d.ts.map +1 -0
  686. package/lib/typescript/src/components/popover/popover.constants.d.ts +32 -0
  687. package/lib/typescript/src/components/popover/popover.constants.d.ts.map +1 -0
  688. package/lib/typescript/src/components/popover/popover.d.ts +56 -0
  689. package/lib/typescript/src/components/popover/popover.d.ts.map +1 -0
  690. package/lib/typescript/src/components/popover/popover.styles.d.ts +16 -0
  691. package/lib/typescript/src/components/popover/popover.styles.d.ts.map +1 -0
  692. package/lib/typescript/src/components/popover/popover.types.d.ts +336 -0
  693. package/lib/typescript/src/components/popover/popover.types.d.ts.map +1 -0
  694. package/lib/typescript/src/components/pressable-feedback/index.d.ts +3 -0
  695. package/lib/typescript/src/components/pressable-feedback/index.d.ts.map +1 -0
  696. package/lib/typescript/src/components/pressable-feedback/pressable-feedback.animation.d.ts +75 -0
  697. package/lib/typescript/src/components/pressable-feedback/pressable-feedback.animation.d.ts.map +1 -0
  698. package/lib/typescript/src/components/pressable-feedback/pressable-feedback.constants.d.ts +11 -0
  699. package/lib/typescript/src/components/pressable-feedback/pressable-feedback.constants.d.ts.map +1 -0
  700. package/lib/typescript/src/components/pressable-feedback/pressable-feedback.d.ts +31 -0
  701. package/lib/typescript/src/components/pressable-feedback/pressable-feedback.d.ts.map +1 -0
  702. package/lib/typescript/src/components/pressable-feedback/pressable-feedback.styles.d.ts +105 -0
  703. package/lib/typescript/src/components/pressable-feedback/pressable-feedback.styles.d.ts.map +1 -0
  704. package/lib/typescript/src/components/pressable-feedback/pressable-feedback.types.d.ts +332 -0
  705. package/lib/typescript/src/components/pressable-feedback/pressable-feedback.types.d.ts.map +1 -0
  706. package/lib/typescript/src/components/radio-group/index.d.ts +3 -0
  707. package/lib/typescript/src/components/radio-group/index.d.ts.map +1 -0
  708. package/lib/typescript/src/components/radio-group/radio-group.animation.d.ts +26 -0
  709. package/lib/typescript/src/components/radio-group/radio-group.animation.d.ts.map +1 -0
  710. package/lib/typescript/src/components/radio-group/radio-group.constants.d.ts +14 -0
  711. package/lib/typescript/src/components/radio-group/radio-group.constants.d.ts.map +1 -0
  712. package/lib/typescript/src/components/radio-group/radio-group.d.ts +53 -0
  713. package/lib/typescript/src/components/radio-group/radio-group.d.ts.map +1 -0
  714. package/lib/typescript/src/components/radio-group/radio-group.styles.d.ts +92 -0
  715. package/lib/typescript/src/components/radio-group/radio-group.styles.d.ts.map +1 -0
  716. package/lib/typescript/src/components/radio-group/radio-group.types.d.ts +136 -0
  717. package/lib/typescript/src/components/radio-group/radio-group.types.d.ts.map +1 -0
  718. package/lib/typescript/src/components/scroll-shadow/index.d.ts +3 -0
  719. package/lib/typescript/src/components/scroll-shadow/index.d.ts.map +1 -0
  720. package/lib/typescript/src/components/scroll-shadow/scroll-shadow.animation.d.ts +25 -0
  721. package/lib/typescript/src/components/scroll-shadow/scroll-shadow.animation.d.ts.map +1 -0
  722. package/lib/typescript/src/components/scroll-shadow/scroll-shadow.constants.d.ts +19 -0
  723. package/lib/typescript/src/components/scroll-shadow/scroll-shadow.constants.d.ts.map +1 -0
  724. package/lib/typescript/src/components/scroll-shadow/scroll-shadow.d.ts +18 -0
  725. package/lib/typescript/src/components/scroll-shadow/scroll-shadow.d.ts.map +1 -0
  726. package/lib/typescript/src/components/scroll-shadow/scroll-shadow.styles.d.ts +42 -0
  727. package/lib/typescript/src/components/scroll-shadow/scroll-shadow.styles.d.ts.map +1 -0
  728. package/lib/typescript/src/components/scroll-shadow/scroll-shadow.types.d.ts +98 -0
  729. package/lib/typescript/src/components/scroll-shadow/scroll-shadow.types.d.ts.map +1 -0
  730. package/lib/typescript/src/components/select/index.d.ts +3 -0
  731. package/lib/typescript/src/components/select/index.d.ts.map +1 -0
  732. package/lib/typescript/src/components/select/select.animation.d.ts +4 -0
  733. package/lib/typescript/src/components/select/select.animation.d.ts.map +1 -0
  734. package/lib/typescript/src/components/select/select.constants.d.ts +35 -0
  735. package/lib/typescript/src/components/select/select.constants.d.ts.map +1 -0
  736. package/lib/typescript/src/components/select/select.d.ts +66 -0
  737. package/lib/typescript/src/components/select/select.d.ts.map +1 -0
  738. package/lib/typescript/src/components/select/select.styles.d.ts +121 -0
  739. package/lib/typescript/src/components/select/select.styles.d.ts.map +1 -0
  740. package/lib/typescript/src/components/select/select.types.d.ts +391 -0
  741. package/lib/typescript/src/components/select/select.types.d.ts.map +1 -0
  742. package/lib/typescript/src/components/skeleton/index.d.ts +3 -0
  743. package/lib/typescript/src/components/skeleton/index.d.ts.map +1 -0
  744. package/lib/typescript/src/components/skeleton/linear-gradient.d.ts +6 -0
  745. package/lib/typescript/src/components/skeleton/linear-gradient.d.ts.map +1 -0
  746. package/lib/typescript/src/components/skeleton/skeleton.animation.d.ts +44 -0
  747. package/lib/typescript/src/components/skeleton/skeleton.animation.d.ts.map +1 -0
  748. package/lib/typescript/src/components/skeleton/skeleton.constants.d.ts +32 -0
  749. package/lib/typescript/src/components/skeleton/skeleton.constants.d.ts.map +1 -0
  750. package/lib/typescript/src/components/skeleton/skeleton.d.ts +15 -0
  751. package/lib/typescript/src/components/skeleton/skeleton.d.ts.map +1 -0
  752. package/lib/typescript/src/components/skeleton/skeleton.styles.d.ts +16 -0
  753. package/lib/typescript/src/components/skeleton/skeleton.styles.d.ts.map +1 -0
  754. package/lib/typescript/src/components/skeleton/skeleton.types.d.ts +173 -0
  755. package/lib/typescript/src/components/skeleton/skeleton.types.d.ts.map +1 -0
  756. package/lib/typescript/src/components/skeleton-group/index.d.ts +3 -0
  757. package/lib/typescript/src/components/skeleton-group/index.d.ts.map +1 -0
  758. package/lib/typescript/src/components/skeleton-group/skeleton-group.constants.d.ts +8 -0
  759. package/lib/typescript/src/components/skeleton-group/skeleton-group.constants.d.ts.map +1 -0
  760. package/lib/typescript/src/components/skeleton-group/skeleton-group.d.ts +24 -0
  761. package/lib/typescript/src/components/skeleton-group/skeleton-group.d.ts.map +1 -0
  762. package/lib/typescript/src/components/skeleton-group/skeleton-group.styles.d.ts +5 -0
  763. package/lib/typescript/src/components/skeleton-group/skeleton-group.styles.d.ts.map +1 -0
  764. package/lib/typescript/src/components/skeleton-group/skeleton-group.types.d.ts +28 -0
  765. package/lib/typescript/src/components/skeleton-group/skeleton-group.types.d.ts.map +1 -0
  766. package/lib/typescript/src/components/spinner/index.d.ts +3 -0
  767. package/lib/typescript/src/components/spinner/index.d.ts.map +1 -0
  768. package/lib/typescript/src/components/spinner/spinner-icon.d.ts +6 -0
  769. package/lib/typescript/src/components/spinner/spinner-icon.d.ts.map +1 -0
  770. package/lib/typescript/src/components/spinner/spinner.animation.d.ts +27 -0
  771. package/lib/typescript/src/components/spinner/spinner.animation.d.ts.map +1 -0
  772. package/lib/typescript/src/components/spinner/spinner.constants.d.ts +30 -0
  773. package/lib/typescript/src/components/spinner/spinner.constants.d.ts.map +1 -0
  774. package/lib/typescript/src/components/spinner/spinner.d.ts +23 -0
  775. package/lib/typescript/src/components/spinner/spinner.d.ts.map +1 -0
  776. package/lib/typescript/src/components/spinner/spinner.styles.d.ts +24 -0
  777. package/lib/typescript/src/components/spinner/spinner.styles.d.ts.map +1 -0
  778. package/lib/typescript/src/components/spinner/spinner.types.d.ts +131 -0
  779. package/lib/typescript/src/components/spinner/spinner.types.d.ts.map +1 -0
  780. package/lib/typescript/src/components/surface/index.d.ts +3 -0
  781. package/lib/typescript/src/components/surface/index.d.ts.map +1 -0
  782. package/lib/typescript/src/components/surface/surface.animation.d.ts +11 -0
  783. package/lib/typescript/src/components/surface/surface.animation.d.ts.map +1 -0
  784. package/lib/typescript/src/components/surface/surface.constants.d.ts +7 -0
  785. package/lib/typescript/src/components/surface/surface.constants.d.ts.map +1 -0
  786. package/lib/typescript/src/components/surface/surface.d.ts +16 -0
  787. package/lib/typescript/src/components/surface/surface.d.ts.map +1 -0
  788. package/lib/typescript/src/components/surface/surface.styles.d.ts +32 -0
  789. package/lib/typescript/src/components/surface/surface.styles.d.ts.map +1 -0
  790. package/lib/typescript/src/components/surface/surface.types.d.ts +40 -0
  791. package/lib/typescript/src/components/surface/surface.types.d.ts.map +1 -0
  792. package/lib/typescript/src/components/switch/index.d.ts +3 -0
  793. package/lib/typescript/src/components/switch/index.d.ts.map +1 -0
  794. package/lib/typescript/src/components/switch/switch.animation.d.ts +46 -0
  795. package/lib/typescript/src/components/switch/switch.animation.d.ts.map +1 -0
  796. package/lib/typescript/src/components/switch/switch.constants.d.ts +20 -0
  797. package/lib/typescript/src/components/switch/switch.constants.d.ts.map +1 -0
  798. package/lib/typescript/src/components/switch/switch.d.ts +42 -0
  799. package/lib/typescript/src/components/switch/switch.d.ts.map +1 -0
  800. package/lib/typescript/src/components/switch/switch.styles.d.ts +28 -0
  801. package/lib/typescript/src/components/switch/switch.styles.d.ts.map +1 -0
  802. package/lib/typescript/src/components/switch/switch.types.d.ts +184 -0
  803. package/lib/typescript/src/components/switch/switch.types.d.ts.map +1 -0
  804. package/lib/typescript/src/components/tabs/index.d.ts +3 -0
  805. package/lib/typescript/src/components/tabs/index.d.ts.map +1 -0
  806. package/lib/typescript/src/components/tabs/tabs.animation.d.ts +26 -0
  807. package/lib/typescript/src/components/tabs/tabs.animation.d.ts.map +1 -0
  808. package/lib/typescript/src/components/tabs/tabs.constants.d.ts +12 -0
  809. package/lib/typescript/src/components/tabs/tabs.constants.d.ts.map +1 -0
  810. package/lib/typescript/src/components/tabs/tabs.context.d.ts +13 -0
  811. package/lib/typescript/src/components/tabs/tabs.context.d.ts.map +1 -0
  812. package/lib/typescript/src/components/tabs/tabs.d.ts +44 -0
  813. package/lib/typescript/src/components/tabs/tabs.d.ts.map +1 -0
  814. package/lib/typescript/src/components/tabs/tabs.styles.d.ts +103 -0
  815. package/lib/typescript/src/components/tabs/tabs.styles.d.ts.map +1 -0
  816. package/lib/typescript/src/components/tabs/tabs.types.d.ts +239 -0
  817. package/lib/typescript/src/components/tabs/tabs.types.d.ts.map +1 -0
  818. package/lib/typescript/src/components/text-field/index.d.ts +3 -0
  819. package/lib/typescript/src/components/text-field/index.d.ts.map +1 -0
  820. package/lib/typescript/src/components/text-field/text-field.animation.d.ts +47 -0
  821. package/lib/typescript/src/components/text-field/text-field.animation.d.ts.map +1 -0
  822. package/lib/typescript/src/components/text-field/text-field.constants.d.ts +30 -0
  823. package/lib/typescript/src/components/text-field/text-field.constants.d.ts.map +1 -0
  824. package/lib/typescript/src/components/text-field/text-field.d.ts +47 -0
  825. package/lib/typescript/src/components/text-field/text-field.d.ts.map +1 -0
  826. package/lib/typescript/src/components/text-field/text-field.styles.d.ts +203 -0
  827. package/lib/typescript/src/components/text-field/text-field.styles.d.ts.map +1 -0
  828. package/lib/typescript/src/components/text-field/text-field.types.d.ts +324 -0
  829. package/lib/typescript/src/components/text-field/text-field.types.d.ts.map +1 -0
  830. package/lib/typescript/src/components/toast/index.d.ts +3 -0
  831. package/lib/typescript/src/components/toast/index.d.ts.map +1 -0
  832. package/lib/typescript/src/components/toast/toast.animation.d.ts +29 -0
  833. package/lib/typescript/src/components/toast/toast.animation.d.ts.map +1 -0
  834. package/lib/typescript/src/components/toast/toast.constants.d.ts +11 -0
  835. package/lib/typescript/src/components/toast/toast.constants.d.ts.map +1 -0
  836. package/lib/typescript/src/components/toast/toast.d.ts +56 -0
  837. package/lib/typescript/src/components/toast/toast.d.ts.map +1 -0
  838. package/lib/typescript/src/components/toast/toast.styles.d.ts +61 -0
  839. package/lib/typescript/src/components/toast/toast.styles.d.ts.map +1 -0
  840. package/lib/typescript/src/components/toast/toast.types.d.ts +278 -0
  841. package/lib/typescript/src/components/toast/toast.types.d.ts.map +1 -0
  842. package/lib/typescript/src/helpers/components/animated-check-icon.d.ts +12 -0
  843. package/lib/typescript/src/helpers/components/animated-check-icon.d.ts.map +1 -0
  844. package/lib/typescript/src/helpers/components/bottom-sheet-content-container.d.ts +20 -0
  845. package/lib/typescript/src/helpers/components/bottom-sheet-content-container.d.ts.map +1 -0
  846. package/lib/typescript/src/helpers/components/check-icon.d.ts +8 -0
  847. package/lib/typescript/src/helpers/components/check-icon.d.ts.map +1 -0
  848. package/lib/typescript/src/helpers/components/close-icon.d.ts +8 -0
  849. package/lib/typescript/src/helpers/components/close-icon.d.ts.map +1 -0
  850. package/lib/typescript/src/helpers/components/full-window-overlay.d.ts +4 -0
  851. package/lib/typescript/src/helpers/components/full-window-overlay.d.ts.map +1 -0
  852. package/lib/typescript/src/helpers/components/hero-text.d.ts +51 -0
  853. package/lib/typescript/src/helpers/components/hero-text.d.ts.map +1 -0
  854. package/lib/typescript/src/helpers/components/index.d.ts +6 -0
  855. package/lib/typescript/src/helpers/components/index.d.ts.map +1 -0
  856. package/lib/typescript/src/helpers/contexts/animation-settings-context.d.ts +12 -0
  857. package/lib/typescript/src/helpers/contexts/animation-settings-context.d.ts.map +1 -0
  858. package/lib/typescript/src/helpers/contexts/index.d.ts +3 -0
  859. package/lib/typescript/src/helpers/contexts/index.d.ts.map +1 -0
  860. package/lib/typescript/src/helpers/hooks/index.d.ts +12 -0
  861. package/lib/typescript/src/helpers/hooks/index.d.ts.map +1 -0
  862. package/lib/typescript/src/helpers/hooks/use-augmented-ref.d.ts +9 -0
  863. package/lib/typescript/src/helpers/hooks/use-augmented-ref.d.ts.map +1 -0
  864. package/lib/typescript/src/helpers/hooks/use-combined-animation-disabled-state.d.ts +22 -0
  865. package/lib/typescript/src/helpers/hooks/use-combined-animation-disabled-state.d.ts.map +1 -0
  866. package/lib/typescript/src/helpers/hooks/use-controllable-state.d.ts +22 -0
  867. package/lib/typescript/src/helpers/hooks/use-controllable-state.d.ts.map +1 -0
  868. package/lib/typescript/src/helpers/hooks/use-keyboard-status.d.ts +2 -0
  869. package/lib/typescript/src/helpers/hooks/use-keyboard-status.d.ts.map +1 -0
  870. package/lib/typescript/src/helpers/hooks/use-popup-bottom-sheet-content-animation.d.ts +27 -0
  871. package/lib/typescript/src/helpers/hooks/use-popup-bottom-sheet-content-animation.d.ts.map +1 -0
  872. package/lib/typescript/src/helpers/hooks/use-popup-dialog-content-animation.d.ts +70 -0
  873. package/lib/typescript/src/helpers/hooks/use-popup-dialog-content-animation.d.ts.map +1 -0
  874. package/lib/typescript/src/helpers/hooks/use-popup-overlay-animation.d.ts +21 -0
  875. package/lib/typescript/src/helpers/hooks/use-popup-overlay-animation.d.ts.map +1 -0
  876. package/lib/typescript/src/helpers/hooks/use-popup-popover-content-animation.d.ts +51 -0
  877. package/lib/typescript/src/helpers/hooks/use-popup-popover-content-animation.d.ts.map +1 -0
  878. package/lib/typescript/src/helpers/hooks/use-popup-root-animation.d.ts +33 -0
  879. package/lib/typescript/src/helpers/hooks/use-popup-root-animation.d.ts.map +1 -0
  880. package/lib/typescript/src/helpers/hooks/use-relative-position.d.ts +61 -0
  881. package/lib/typescript/src/helpers/hooks/use-relative-position.d.ts.map +1 -0
  882. package/lib/typescript/src/helpers/hooks/use-resolved-style-property.d.ts +60 -0
  883. package/lib/typescript/src/helpers/hooks/use-resolved-style-property.d.ts.map +1 -0
  884. package/lib/typescript/src/helpers/theme/color-kit/index.d.ts +92 -0
  885. package/lib/typescript/src/helpers/theme/color-kit/index.d.ts.map +1 -0
  886. package/lib/typescript/src/helpers/theme/color-kit/types.d.ts +202 -0
  887. package/lib/typescript/src/helpers/theme/color-kit/types.d.ts.map +1 -0
  888. package/lib/typescript/src/helpers/theme/hooks/use-is-on-surface.d.ts +2 -0
  889. package/lib/typescript/src/helpers/theme/hooks/use-is-on-surface.d.ts.map +1 -0
  890. package/lib/typescript/src/helpers/theme/hooks/use-theme-color.d.ts +25 -0
  891. package/lib/typescript/src/helpers/theme/hooks/use-theme-color.d.ts.map +1 -0
  892. package/lib/typescript/src/helpers/theme/index.d.ts +5 -0
  893. package/lib/typescript/src/helpers/theme/index.d.ts.map +1 -0
  894. package/lib/typescript/src/helpers/theme/types.d.ts +25 -0
  895. package/lib/typescript/src/helpers/theme/types.d.ts.map +1 -0
  896. package/lib/typescript/src/helpers/theme/utils/cn.d.ts +3 -0
  897. package/lib/typescript/src/helpers/theme/utils/cn.d.ts.map +1 -0
  898. package/lib/typescript/src/helpers/theme/utils/combine-styles.d.ts +13 -0
  899. package/lib/typescript/src/helpers/theme/utils/combine-styles.d.ts.map +1 -0
  900. package/lib/typescript/src/helpers/types/animation.d.ts +157 -0
  901. package/lib/typescript/src/helpers/types/animation.d.ts.map +1 -0
  902. package/lib/typescript/src/helpers/types/bottom-sheet.d.ts +72 -0
  903. package/lib/typescript/src/helpers/types/bottom-sheet.d.ts.map +1 -0
  904. package/lib/typescript/src/helpers/types/index.d.ts +5 -0
  905. package/lib/typescript/src/helpers/types/index.d.ts.map +1 -0
  906. package/lib/typescript/src/helpers/types/misc.d.ts +3 -0
  907. package/lib/typescript/src/helpers/types/misc.d.ts.map +1 -0
  908. package/lib/typescript/src/helpers/types/primitives.d.ts +120 -0
  909. package/lib/typescript/src/helpers/types/primitives.d.ts.map +1 -0
  910. package/lib/typescript/src/helpers/utils/animation.d.ts +120 -0
  911. package/lib/typescript/src/helpers/utils/animation.d.ts.map +1 -0
  912. package/lib/typescript/src/helpers/utils/children-to-string.d.ts +18 -0
  913. package/lib/typescript/src/helpers/utils/children-to-string.d.ts.map +1 -0
  914. package/lib/typescript/src/helpers/utils/create-context.d.ts +28 -0
  915. package/lib/typescript/src/helpers/utils/create-context.d.ts.map +1 -0
  916. package/lib/typescript/src/helpers/utils/ease-gradient/create-interpolation.d.ts +15 -0
  917. package/lib/typescript/src/helpers/utils/ease-gradient/create-interpolation.d.ts.map +1 -0
  918. package/lib/typescript/src/helpers/utils/ease-gradient/index.d.ts +28 -0
  919. package/lib/typescript/src/helpers/utils/ease-gradient/index.d.ts.map +1 -0
  920. package/lib/typescript/src/helpers/utils/get-element-by-display-name.d.ts +4 -0
  921. package/lib/typescript/src/helpers/utils/get-element-by-display-name.d.ts.map +1 -0
  922. package/lib/typescript/src/helpers/utils/get-element-with-default.d.ts +4 -0
  923. package/lib/typescript/src/helpers/utils/get-element-with-default.d.ts.map +1 -0
  924. package/lib/typescript/src/helpers/utils/has-prop.d.ts +9 -0
  925. package/lib/typescript/src/helpers/utils/has-prop.d.ts.map +1 -0
  926. package/lib/typescript/src/helpers/utils/index.d.ts +8 -0
  927. package/lib/typescript/src/helpers/utils/index.d.ts.map +1 -0
  928. package/lib/typescript/src/index.d.ts +29 -0
  929. package/lib/typescript/src/index.d.ts.map +1 -0
  930. package/lib/typescript/src/primitives/accordion/accordion.d.ts +30 -0
  931. package/lib/typescript/src/primitives/accordion/accordion.d.ts.map +1 -0
  932. package/lib/typescript/src/primitives/accordion/accordion.types.d.ts +84 -0
  933. package/lib/typescript/src/primitives/accordion/accordion.types.d.ts.map +1 -0
  934. package/lib/typescript/src/primitives/accordion/accordion.utils.d.ts +3 -0
  935. package/lib/typescript/src/primitives/accordion/accordion.utils.d.ts.map +1 -0
  936. package/lib/typescript/src/primitives/accordion/index.d.ts +3 -0
  937. package/lib/typescript/src/primitives/accordion/index.d.ts.map +1 -0
  938. package/lib/typescript/src/primitives/activity-indicator/activity-indicator.d.ts +6 -0
  939. package/lib/typescript/src/primitives/activity-indicator/activity-indicator.d.ts.map +1 -0
  940. package/lib/typescript/src/primitives/activity-indicator/activity-indicator.types.d.ts +22 -0
  941. package/lib/typescript/src/primitives/activity-indicator/activity-indicator.types.d.ts.map +1 -0
  942. package/lib/typescript/src/primitives/activity-indicator/index.d.ts +3 -0
  943. package/lib/typescript/src/primitives/activity-indicator/index.d.ts.map +1 -0
  944. package/lib/typescript/src/primitives/avatar/avatar.d.ts +23 -0
  945. package/lib/typescript/src/primitives/avatar/avatar.d.ts.map +1 -0
  946. package/lib/typescript/src/primitives/avatar/avatar.types.d.ts +42 -0
  947. package/lib/typescript/src/primitives/avatar/avatar.types.d.ts.map +1 -0
  948. package/lib/typescript/src/primitives/avatar/avatar.utils.d.ts +44 -0
  949. package/lib/typescript/src/primitives/avatar/avatar.utils.d.ts.map +1 -0
  950. package/lib/typescript/src/primitives/avatar/index.d.ts +3 -0
  951. package/lib/typescript/src/primitives/avatar/index.d.ts.map +1 -0
  952. package/lib/typescript/src/primitives/bottom-sheet/bottom-sheet.d.ts +38 -0
  953. package/lib/typescript/src/primitives/bottom-sheet/bottom-sheet.d.ts.map +1 -0
  954. package/lib/typescript/src/primitives/bottom-sheet/bottom-sheet.types.d.ts +87 -0
  955. package/lib/typescript/src/primitives/bottom-sheet/bottom-sheet.types.d.ts.map +1 -0
  956. package/lib/typescript/src/primitives/bottom-sheet/index.d.ts +3 -0
  957. package/lib/typescript/src/primitives/bottom-sheet/index.d.ts.map +1 -0
  958. package/lib/typescript/src/primitives/checkbox/checkbox.d.ts +17 -0
  959. package/lib/typescript/src/primitives/checkbox/checkbox.d.ts.map +1 -0
  960. package/lib/typescript/src/primitives/checkbox/checkbox.types.d.ts +30 -0
  961. package/lib/typescript/src/primitives/checkbox/checkbox.types.d.ts.map +1 -0
  962. package/lib/typescript/src/primitives/checkbox/index.d.ts +3 -0
  963. package/lib/typescript/src/primitives/checkbox/index.d.ts.map +1 -0
  964. package/lib/typescript/src/primitives/dialog/dialog.d.ts +38 -0
  965. package/lib/typescript/src/primitives/dialog/dialog.d.ts.map +1 -0
  966. package/lib/typescript/src/primitives/dialog/dialog.types.d.ts +87 -0
  967. package/lib/typescript/src/primitives/dialog/dialog.types.d.ts.map +1 -0
  968. package/lib/typescript/src/primitives/dialog/index.d.ts +3 -0
  969. package/lib/typescript/src/primitives/dialog/index.d.ts.map +1 -0
  970. package/lib/typescript/src/primitives/label/index.d.ts +3 -0
  971. package/lib/typescript/src/primitives/label/index.d.ts.map +1 -0
  972. package/lib/typescript/src/primitives/label/label.d.ts +12 -0
  973. package/lib/typescript/src/primitives/label/label.d.ts.map +1 -0
  974. package/lib/typescript/src/primitives/label/label.types.d.ts +26 -0
  975. package/lib/typescript/src/primitives/label/label.types.d.ts.map +1 -0
  976. package/lib/typescript/src/primitives/popover/index.d.ts +3 -0
  977. package/lib/typescript/src/primitives/popover/index.d.ts.map +1 -0
  978. package/lib/typescript/src/primitives/popover/popover.d.ts +38 -0
  979. package/lib/typescript/src/primitives/popover/popover.d.ts.map +1 -0
  980. package/lib/typescript/src/primitives/popover/popover.types.d.ts +165 -0
  981. package/lib/typescript/src/primitives/popover/popover.types.d.ts.map +1 -0
  982. package/lib/typescript/src/primitives/portal/index.d.ts +2 -0
  983. package/lib/typescript/src/primitives/portal/index.d.ts.map +1 -0
  984. package/lib/typescript/src/primitives/portal/portal.d.ts +25 -0
  985. package/lib/typescript/src/primitives/portal/portal.d.ts.map +1 -0
  986. package/lib/typescript/src/primitives/radio-group/index.d.ts +3 -0
  987. package/lib/typescript/src/primitives/radio-group/index.d.ts.map +1 -0
  988. package/lib/typescript/src/primitives/radio-group/radio-group.d.ts +20 -0
  989. package/lib/typescript/src/primitives/radio-group/radio-group.d.ts.map +1 -0
  990. package/lib/typescript/src/primitives/radio-group/radio-group.types.d.ts +46 -0
  991. package/lib/typescript/src/primitives/radio-group/radio-group.types.d.ts.map +1 -0
  992. package/lib/typescript/src/primitives/select/index.d.ts +3 -0
  993. package/lib/typescript/src/primitives/select/index.d.ts.map +1 -0
  994. package/lib/typescript/src/primitives/select/select.d.ts +70 -0
  995. package/lib/typescript/src/primitives/select/select.d.ts.map +1 -0
  996. package/lib/typescript/src/primitives/select/select.types.d.ts +264 -0
  997. package/lib/typescript/src/primitives/select/select.types.d.ts.map +1 -0
  998. package/lib/typescript/src/primitives/slot/index.d.ts +2 -0
  999. package/lib/typescript/src/primitives/slot/index.d.ts.map +1 -0
  1000. package/lib/typescript/src/primitives/slot/slot.d.ts +9 -0
  1001. package/lib/typescript/src/primitives/slot/slot.d.ts.map +1 -0
  1002. package/lib/typescript/src/primitives/slot/types.d.ts +11 -0
  1003. package/lib/typescript/src/primitives/slot/types.d.ts.map +1 -0
  1004. package/lib/typescript/src/primitives/slot/utils.d.ts +8 -0
  1005. package/lib/typescript/src/primitives/slot/utils.d.ts.map +1 -0
  1006. package/lib/typescript/src/primitives/switch/index.d.ts +3 -0
  1007. package/lib/typescript/src/primitives/switch/index.d.ts.map +1 -0
  1008. package/lib/typescript/src/primitives/switch/switch.d.ts +8 -0
  1009. package/lib/typescript/src/primitives/switch/switch.d.ts.map +1 -0
  1010. package/lib/typescript/src/primitives/switch/switch.types.d.ts +44 -0
  1011. package/lib/typescript/src/primitives/switch/switch.types.d.ts.map +1 -0
  1012. package/lib/typescript/src/primitives/tabs/index.d.ts +3 -0
  1013. package/lib/typescript/src/primitives/tabs/index.d.ts.map +1 -0
  1014. package/lib/typescript/src/primitives/tabs/tabs.d.ts +40 -0
  1015. package/lib/typescript/src/primitives/tabs/tabs.d.ts.map +1 -0
  1016. package/lib/typescript/src/primitives/tabs/tabs.types.d.ts +48 -0
  1017. package/lib/typescript/src/primitives/tabs/tabs.types.d.ts.map +1 -0
  1018. package/lib/typescript/src/primitives/toast/index.d.ts +3 -0
  1019. package/lib/typescript/src/primitives/toast/index.d.ts.map +1 -0
  1020. package/lib/typescript/src/primitives/toast/toast.d.ts +24 -0
  1021. package/lib/typescript/src/primitives/toast/toast.d.ts.map +1 -0
  1022. package/lib/typescript/src/primitives/toast/toast.types.d.ts +56 -0
  1023. package/lib/typescript/src/primitives/toast/toast.types.d.ts.map +1 -0
  1024. package/lib/typescript/src/providers/animation-settings/index.d.ts +3 -0
  1025. package/lib/typescript/src/providers/animation-settings/index.d.ts.map +1 -0
  1026. package/lib/typescript/src/providers/animation-settings/provider.d.ts +23 -0
  1027. package/lib/typescript/src/providers/animation-settings/provider.d.ts.map +1 -0
  1028. package/lib/typescript/src/providers/animation-settings/types.d.ts +26 -0
  1029. package/lib/typescript/src/providers/animation-settings/types.d.ts.map +1 -0
  1030. package/lib/typescript/src/providers/hero-ui-native/index.d.ts +3 -0
  1031. package/lib/typescript/src/providers/hero-ui-native/index.d.ts.map +1 -0
  1032. package/lib/typescript/src/providers/hero-ui-native/provider.d.ts +42 -0
  1033. package/lib/typescript/src/providers/hero-ui-native/provider.d.ts.map +1 -0
  1034. package/lib/typescript/src/providers/hero-ui-native/types.d.ts +80 -0
  1035. package/lib/typescript/src/providers/hero-ui-native/types.d.ts.map +1 -0
  1036. package/lib/typescript/src/providers/text-component/index.d.ts +3 -0
  1037. package/lib/typescript/src/providers/text-component/index.d.ts.map +1 -0
  1038. package/lib/typescript/src/providers/text-component/provider.d.ts +4 -0
  1039. package/lib/typescript/src/providers/text-component/provider.d.ts.map +1 -0
  1040. package/lib/typescript/src/providers/text-component/types.d.ts +51 -0
  1041. package/lib/typescript/src/providers/text-component/types.d.ts.map +1 -0
  1042. package/lib/typescript/src/providers/toast/index.d.ts +4 -0
  1043. package/lib/typescript/src/providers/toast/index.d.ts.map +1 -0
  1044. package/lib/typescript/src/providers/toast/insets-container.d.ts +35 -0
  1045. package/lib/typescript/src/providers/toast/insets-container.d.ts.map +1 -0
  1046. package/lib/typescript/src/providers/toast/provider.d.ts +32 -0
  1047. package/lib/typescript/src/providers/toast/provider.d.ts.map +1 -0
  1048. package/lib/typescript/src/providers/toast/reducer.d.ts +6 -0
  1049. package/lib/typescript/src/providers/toast/reducer.d.ts.map +1 -0
  1050. package/lib/typescript/src/providers/toast/toast-config.context.d.ts +20 -0
  1051. package/lib/typescript/src/providers/toast/toast-config.context.d.ts.map +1 -0
  1052. package/lib/typescript/src/providers/toast/toast-item-renderer.d.ts +7 -0
  1053. package/lib/typescript/src/providers/toast/toast-item-renderer.d.ts.map +1 -0
  1054. package/lib/typescript/src/providers/toast/types.d.ts +355 -0
  1055. package/lib/typescript/src/providers/toast/types.d.ts.map +1 -0
  1056. package/package.json +177 -0
  1057. package/src/components/accordion/accordion.animation.ts +178 -0
  1058. package/src/components/accordion/accordion.constants.ts +62 -0
  1059. package/src/components/accordion/accordion.md +406 -0
  1060. package/src/components/accordion/accordion.styles.ts +95 -0
  1061. package/src/components/accordion/accordion.tsx +330 -0
  1062. package/src/components/accordion/accordion.types.ts +262 -0
  1063. package/src/components/accordion/chevron-down-icon.tsx +25 -0
  1064. package/src/components/accordion/index.ts +16 -0
  1065. package/src/components/avatar/avatar.animation.ts +123 -0
  1066. package/src/components/avatar/avatar.constants.ts +19 -0
  1067. package/src/components/avatar/avatar.context.ts +11 -0
  1068. package/src/components/avatar/avatar.md +376 -0
  1069. package/src/components/avatar/avatar.styles.ts +153 -0
  1070. package/src/components/avatar/avatar.tsx +298 -0
  1071. package/src/components/avatar/avatar.types.ts +231 -0
  1072. package/src/components/avatar/index.ts +12 -0
  1073. package/src/components/avatar/person-icon.tsx +23 -0
  1074. package/src/components/bottom-sheet/bottom-sheet.animation.ts +42 -0
  1075. package/src/components/bottom-sheet/bottom-sheet.constants.ts +13 -0
  1076. package/src/components/bottom-sheet/bottom-sheet.md +341 -0
  1077. package/src/components/bottom-sheet/bottom-sheet.styles.ts +67 -0
  1078. package/src/components/bottom-sheet/bottom-sheet.tsx +395 -0
  1079. package/src/components/bottom-sheet/bottom-sheet.types.ts +199 -0
  1080. package/src/components/bottom-sheet/index.ts +16 -0
  1081. package/src/components/button/button.constants.ts +7 -0
  1082. package/src/components/button/button.md +316 -0
  1083. package/src/components/button/button.styles.ts +89 -0
  1084. package/src/components/button/button.tsx +248 -0
  1085. package/src/components/button/button.types.ts +88 -0
  1086. package/src/components/button/index.ts +8 -0
  1087. package/src/components/card/card.constants.ts +11 -0
  1088. package/src/components/card/card.md +187 -0
  1089. package/src/components/card/card.styles.ts +37 -0
  1090. package/src/components/card/card.tsx +148 -0
  1091. package/src/components/card/card.types.ts +77 -0
  1092. package/src/components/card/index.ts +9 -0
  1093. package/src/components/checkbox/checkbox.animation.ts +201 -0
  1094. package/src/components/checkbox/checkbox.constants.ts +6 -0
  1095. package/src/components/checkbox/checkbox.md +305 -0
  1096. package/src/components/checkbox/checkbox.styles.ts +106 -0
  1097. package/src/components/checkbox/checkbox.tsx +245 -0
  1098. package/src/components/checkbox/checkbox.types.ts +211 -0
  1099. package/src/components/checkbox/index.ts +2 -0
  1100. package/src/components/chip/chip.animation.ts +18 -0
  1101. package/src/components/chip/chip.constants.ts +7 -0
  1102. package/src/components/chip/chip.md +190 -0
  1103. package/src/components/chip/chip.styles.ts +235 -0
  1104. package/src/components/chip/chip.tsx +125 -0
  1105. package/src/components/chip/chip.types.ts +69 -0
  1106. package/src/components/chip/index.ts +2 -0
  1107. package/src/components/dialog/dialog.animation.ts +9 -0
  1108. package/src/components/dialog/dialog.constants.ts +13 -0
  1109. package/src/components/dialog/dialog.md +363 -0
  1110. package/src/components/dialog/dialog.styles.ts +84 -0
  1111. package/src/components/dialog/dialog.tsx +392 -0
  1112. package/src/components/dialog/dialog.types.ts +244 -0
  1113. package/src/components/dialog/index.ts +12 -0
  1114. package/src/components/divider/divider.constants.ts +6 -0
  1115. package/src/components/divider/divider.md +98 -0
  1116. package/src/components/divider/divider.styles.ts +47 -0
  1117. package/src/components/divider/divider.tsx +62 -0
  1118. package/src/components/divider/divider.types.ts +40 -0
  1119. package/src/components/divider/index.ts +6 -0
  1120. package/src/components/error-view/error-view.animation.ts +52 -0
  1121. package/src/components/error-view/error-view.constants.ts +31 -0
  1122. package/src/components/error-view/error-view.md +177 -0
  1123. package/src/components/error-view/error-view.styles.ts +17 -0
  1124. package/src/components/error-view/error-view.tsx +73 -0
  1125. package/src/components/error-view/error-view.types.ts +70 -0
  1126. package/src/components/error-view/index.ts +2 -0
  1127. package/src/components/form-field/form-field.animation.ts +18 -0
  1128. package/src/components/form-field/form-field.constants.ts +10 -0
  1129. package/src/components/form-field/form-field.context.ts +13 -0
  1130. package/src/components/form-field/form-field.md +243 -0
  1131. package/src/components/form-field/form-field.styles.ts +40 -0
  1132. package/src/components/form-field/form-field.tsx +301 -0
  1133. package/src/components/form-field/form-field.types.ts +86 -0
  1134. package/src/components/form-field/index.ts +7 -0
  1135. package/src/components/popover/arrow-svg.tsx +180 -0
  1136. package/src/components/popover/index.ts +19 -0
  1137. package/src/components/popover/popover.animation.ts +9 -0
  1138. package/src/components/popover/popover.constants.ts +34 -0
  1139. package/src/components/popover/popover.md +521 -0
  1140. package/src/components/popover/popover.styles.ts +92 -0
  1141. package/src/components/popover/popover.tsx +637 -0
  1142. package/src/components/popover/popover.types.ts +370 -0
  1143. package/src/components/pressable-feedback/index.ts +3 -0
  1144. package/src/components/pressable-feedback/pressable-feedback.animation.ts +380 -0
  1145. package/src/components/pressable-feedback/pressable-feedback.constants.ts +11 -0
  1146. package/src/components/pressable-feedback/pressable-feedback.md +246 -0
  1147. package/src/components/pressable-feedback/pressable-feedback.styles.ts +106 -0
  1148. package/src/components/pressable-feedback/pressable-feedback.tsx +291 -0
  1149. package/src/components/pressable-feedback/pressable-feedback.types.ts +350 -0
  1150. package/src/components/radio-group/index.ts +17 -0
  1151. package/src/components/radio-group/radio-group.animation.ts +92 -0
  1152. package/src/components/radio-group/radio-group.constants.ts +14 -0
  1153. package/src/components/radio-group/radio-group.md +303 -0
  1154. package/src/components/radio-group/radio-group.styles.ts +101 -0
  1155. package/src/components/radio-group/radio-group.tsx +327 -0
  1156. package/src/components/radio-group/radio-group.types.ts +152 -0
  1157. package/src/components/scroll-shadow/index.ts +6 -0
  1158. package/src/components/scroll-shadow/scroll-shadow.animation.ts +132 -0
  1159. package/src/components/scroll-shadow/scroll-shadow.constants.ts +21 -0
  1160. package/src/components/scroll-shadow/scroll-shadow.md +191 -0
  1161. package/src/components/scroll-shadow/scroll-shadow.styles.ts +47 -0
  1162. package/src/components/scroll-shadow/scroll-shadow.tsx +246 -0
  1163. package/src/components/scroll-shadow/scroll-shadow.types.ts +121 -0
  1164. package/src/components/select/index.ts +25 -0
  1165. package/src/components/select/select.animation.ts +9 -0
  1166. package/src/components/select/select.constants.ts +37 -0
  1167. package/src/components/select/select.md +735 -0
  1168. package/src/components/select/select.styles.ts +154 -0
  1169. package/src/components/select/select.tsx +736 -0
  1170. package/src/components/select/select.types.ts +432 -0
  1171. package/src/components/skeleton/index.ts +6 -0
  1172. package/src/components/skeleton/linear-gradient.tsx +45 -0
  1173. package/src/components/skeleton/skeleton.animation.ts +349 -0
  1174. package/src/components/skeleton/skeleton.constants.ts +39 -0
  1175. package/src/components/skeleton/skeleton.md +200 -0
  1176. package/src/components/skeleton/skeleton.styles.ts +57 -0
  1177. package/src/components/skeleton/skeleton.tsx +183 -0
  1178. package/src/components/skeleton/skeleton.types.ts +191 -0
  1179. package/src/components/skeleton-group/index.ts +6 -0
  1180. package/src/components/skeleton-group/skeleton-group.constants.ts +7 -0
  1181. package/src/components/skeleton-group/skeleton-group.md +247 -0
  1182. package/src/components/skeleton-group/skeleton-group.styles.ts +8 -0
  1183. package/src/components/skeleton-group/skeleton-group.tsx +94 -0
  1184. package/src/components/skeleton-group/skeleton-group.types.ts +28 -0
  1185. package/src/components/spinner/index.ts +9 -0
  1186. package/src/components/spinner/spinner-icon.tsx +49 -0
  1187. package/src/components/spinner/spinner.animation.ts +150 -0
  1188. package/src/components/spinner/spinner.constants.ts +36 -0
  1189. package/src/components/spinner/spinner.md +199 -0
  1190. package/src/components/spinner/spinner.styles.ts +46 -0
  1191. package/src/components/spinner/spinner.tsx +195 -0
  1192. package/src/components/spinner/spinner.types.ts +158 -0
  1193. package/src/components/surface/index.ts +2 -0
  1194. package/src/components/surface/surface.animation.ts +18 -0
  1195. package/src/components/surface/surface.constants.ts +6 -0
  1196. package/src/components/surface/surface.md +141 -0
  1197. package/src/components/surface/surface.styles.ts +26 -0
  1198. package/src/components/surface/surface.tsx +66 -0
  1199. package/src/components/surface/surface.types.ts +47 -0
  1200. package/src/components/switch/index.ts +2 -0
  1201. package/src/components/switch/switch.animation.ts +246 -0
  1202. package/src/components/switch/switch.constants.ts +26 -0
  1203. package/src/components/switch/switch.md +332 -0
  1204. package/src/components/switch/switch.styles.ts +85 -0
  1205. package/src/components/switch/switch.tsx +280 -0
  1206. package/src/components/switch/switch.types.ts +208 -0
  1207. package/src/components/tabs/index.ts +7 -0
  1208. package/src/components/tabs/tabs.animation.ts +167 -0
  1209. package/src/components/tabs/tabs.constants.ts +16 -0
  1210. package/src/components/tabs/tabs.context.ts +28 -0
  1211. package/src/components/tabs/tabs.md +492 -0
  1212. package/src/components/tabs/tabs.styles.ts +127 -0
  1213. package/src/components/tabs/tabs.tsx +372 -0
  1214. package/src/components/tabs/tabs.types.ts +263 -0
  1215. package/src/components/text-field/index.ts +10 -0
  1216. package/src/components/text-field/text-field.animation.ts +299 -0
  1217. package/src/components/text-field/text-field.constants.ts +36 -0
  1218. package/src/components/text-field/text-field.md +377 -0
  1219. package/src/components/text-field/text-field.styles.ts +106 -0
  1220. package/src/components/text-field/text-field.tsx +375 -0
  1221. package/src/components/text-field/text-field.types.ts +349 -0
  1222. package/src/components/toast/index.ts +2 -0
  1223. package/src/components/toast/toast.animation.ts +381 -0
  1224. package/src/components/toast/toast.constants.ts +10 -0
  1225. package/src/components/toast/toast.md +417 -0
  1226. package/src/components/toast/toast.styles.ts +91 -0
  1227. package/src/components/toast/toast.tsx +428 -0
  1228. package/src/components/toast/toast.types.ts +316 -0
  1229. package/src/helpers/components/animated-check-icon.tsx +78 -0
  1230. package/src/helpers/components/bottom-sheet-content-container.tsx +49 -0
  1231. package/src/helpers/components/check-icon.tsx +28 -0
  1232. package/src/helpers/components/close-icon.tsx +29 -0
  1233. package/src/helpers/components/full-window-overlay.tsx +6 -0
  1234. package/src/helpers/components/hero-text.tsx +71 -0
  1235. package/src/helpers/components/index.ts +5 -0
  1236. package/src/helpers/contexts/animation-settings-context.tsx +19 -0
  1237. package/src/helpers/contexts/index.ts +5 -0
  1238. package/src/helpers/hooks/index.ts +11 -0
  1239. package/src/helpers/hooks/use-augmented-ref.ts +32 -0
  1240. package/src/helpers/hooks/use-combined-animation-disabled-state.ts +49 -0
  1241. package/src/helpers/hooks/use-controllable-state.ts +102 -0
  1242. package/src/helpers/hooks/use-keyboard-status.ts +22 -0
  1243. package/src/helpers/hooks/use-popup-bottom-sheet-content-animation.ts +77 -0
  1244. package/src/helpers/hooks/use-popup-dialog-content-animation.ts +279 -0
  1245. package/src/helpers/hooks/use-popup-overlay-animation.ts +70 -0
  1246. package/src/helpers/hooks/use-popup-popover-content-animation.ts +154 -0
  1247. package/src/helpers/hooks/use-popup-root-animation.ts +248 -0
  1248. package/src/helpers/hooks/use-relative-position.ts +353 -0
  1249. package/src/helpers/hooks/use-resolved-style-property.ts +118 -0
  1250. package/src/helpers/theme/color-kit/index.ts +2392 -0
  1251. package/src/helpers/theme/color-kit/types.ts +212 -0
  1252. package/src/helpers/theme/hooks/use-is-on-surface.ts +8 -0
  1253. package/src/helpers/theme/hooks/use-theme-color.ts +56 -0
  1254. package/src/helpers/theme/index.ts +4 -0
  1255. package/src/helpers/theme/types.ts +89 -0
  1256. package/src/helpers/theme/utils/cn.ts +12 -0
  1257. package/src/helpers/theme/utils/combine-styles.ts +17 -0
  1258. package/src/helpers/types/animation.ts +183 -0
  1259. package/src/helpers/types/bottom-sheet.ts +74 -0
  1260. package/src/helpers/types/index.ts +4 -0
  1261. package/src/helpers/types/misc.ts +10 -0
  1262. package/src/helpers/types/primitives.ts +146 -0
  1263. package/src/helpers/utils/animation.ts +266 -0
  1264. package/src/helpers/utils/children-to-string.ts +78 -0
  1265. package/src/helpers/utils/create-context.ts +60 -0
  1266. package/src/helpers/utils/ease-gradient/create-interpolation.ts +35 -0
  1267. package/src/helpers/utils/ease-gradient/index.ts +97 -0
  1268. package/src/helpers/utils/get-element-by-display-name.ts +15 -0
  1269. package/src/helpers/utils/get-element-with-default.ts +17 -0
  1270. package/src/helpers/utils/has-prop.ts +18 -0
  1271. package/src/helpers/utils/index.ts +7 -0
  1272. package/src/index.tsx +33 -0
  1273. package/src/primitives/README.md +27 -0
  1274. package/src/primitives/accordion/accordion.tsx +270 -0
  1275. package/src/primitives/accordion/accordion.types.ts +117 -0
  1276. package/src/primitives/accordion/accordion.utils.ts +12 -0
  1277. package/src/primitives/accordion/index.ts +2 -0
  1278. package/src/primitives/activity-indicator/activity-indicator.tsx +50 -0
  1279. package/src/primitives/activity-indicator/activity-indicator.types.ts +24 -0
  1280. package/src/primitives/activity-indicator/index.ts +2 -0
  1281. package/src/primitives/avatar/avatar.tsx +171 -0
  1282. package/src/primitives/avatar/avatar.types.ts +62 -0
  1283. package/src/primitives/avatar/avatar.utils.ts +102 -0
  1284. package/src/primitives/avatar/index.ts +2 -0
  1285. package/src/primitives/bottom-sheet/bottom-sheet.tsx +246 -0
  1286. package/src/primitives/bottom-sheet/bottom-sheet.types.ts +127 -0
  1287. package/src/primitives/bottom-sheet/index.ts +2 -0
  1288. package/src/primitives/checkbox/checkbox.tsx +121 -0
  1289. package/src/primitives/checkbox/checkbox.types.ts +39 -0
  1290. package/src/primitives/checkbox/index.ts +2 -0
  1291. package/src/primitives/dialog/dialog.tsx +274 -0
  1292. package/src/primitives/dialog/dialog.types.ts +129 -0
  1293. package/src/primitives/dialog/index.ts +2 -0
  1294. package/src/primitives/label/index.ts +2 -0
  1295. package/src/primitives/label/label.tsx +24 -0
  1296. package/src/primitives/label/label.types.ts +37 -0
  1297. package/src/primitives/popover/index.ts +2 -0
  1298. package/src/primitives/popover/popover.tsx +394 -0
  1299. package/src/primitives/popover/popover.types.ts +202 -0
  1300. package/src/primitives/portal/index.ts +1 -0
  1301. package/src/primitives/portal/portal.tsx +126 -0
  1302. package/src/primitives/radio-group/index.ts +2 -0
  1303. package/src/primitives/radio-group/radio-group.tsx +114 -0
  1304. package/src/primitives/radio-group/radio-group.types.ts +65 -0
  1305. package/src/primitives/select/index.ts +2 -0
  1306. package/src/primitives/select/select.tsx +641 -0
  1307. package/src/primitives/select/select.types.ts +333 -0
  1308. package/src/primitives/slot/index.ts +1 -0
  1309. package/src/primitives/slot/slot.tsx +121 -0
  1310. package/src/primitives/slot/types.ts +19 -0
  1311. package/src/primitives/slot/utils.ts +90 -0
  1312. package/src/primitives/switch/index.ts +2 -0
  1313. package/src/primitives/switch/switch.tsx +61 -0
  1314. package/src/primitives/switch/switch.types.ts +55 -0
  1315. package/src/primitives/tabs/index.ts +2 -0
  1316. package/src/primitives/tabs/tabs.tsx +202 -0
  1317. package/src/primitives/tabs/tabs.types.ts +77 -0
  1318. package/src/primitives/toast/index.ts +2 -0
  1319. package/src/primitives/toast/toast.tsx +138 -0
  1320. package/src/primitives/toast/toast.types.ts +86 -0
  1321. package/src/providers/animation-settings/index.ts +8 -0
  1322. package/src/providers/animation-settings/provider.tsx +47 -0
  1323. package/src/providers/animation-settings/types.ts +27 -0
  1324. package/src/providers/hero-ui-native/index.ts +2 -0
  1325. package/src/providers/hero-ui-native/provider.md +332 -0
  1326. package/src/providers/hero-ui-native/provider.tsx +92 -0
  1327. package/src/providers/hero-ui-native/types.ts +82 -0
  1328. package/src/providers/text-component/index.ts +2 -0
  1329. package/src/providers/text-component/provider.tsx +9 -0
  1330. package/src/providers/text-component/types.ts +52 -0
  1331. package/src/providers/toast/index.ts +3 -0
  1332. package/src/providers/toast/insets-container.tsx +74 -0
  1333. package/src/providers/toast/provider.tsx +426 -0
  1334. package/src/providers/toast/reducer.ts +34 -0
  1335. package/src/providers/toast/toast-config.context.ts +27 -0
  1336. package/src/providers/toast/toast-item-renderer.tsx +45 -0
  1337. package/src/providers/toast/types.ts +367 -0
  1338. package/src/styles/index.css +3 -0
  1339. package/src/styles/theme.css +205 -0
  1340. package/src/styles/theme.md +423 -0
  1341. package/src/styles/utilities.css +8 -0
  1342. package/src/styles/variables.css +113 -0
@@ -0,0 +1,2338 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * Color manipulation utilities adapted from reanimated-color-picker
5
+ *
6
+ * Original source: https://github.com/alabsi91/reanimated-color-picker
7
+ * Author: @alabsi91
8
+ * License: MIT
9
+ *
10
+ * This code has been adapted for use in HeroUI Native with modifications
11
+ * for TypeScript compatibility and integration with the theme system.
12
+ */
13
+
14
+ // If you find yourself wondering why all of this is within a single function,
15
+ // the reason is that to execute each method on the UI thread, you must include the 'worklet' directive.
16
+ // Functions marked with this directive are transformed by the Reanimated Babel plugin
17
+ // into IIFE — IMMEDIATELY INVOKED FUNCTION EXPRESSION: `const fun = (function{})()`.
18
+ // Due to the presence of numerous methods,
19
+ // this transformation can lead to a slow initial execution.
20
+ // To address this issue, I consolidated them into a single worklet function.
21
+
22
+ export const colorKitUI = () => {
23
+ 'worklet';
24
+
25
+ const NAMED_COLORS = {
26
+ aliceblue: '#f0f8ff',
27
+ antiquewhite: '#faebd7',
28
+ aqua: '#00ffff',
29
+ aquamarine: '#7fffd4',
30
+ azure: '#f0ffff',
31
+ beige: '#f5f5dc',
32
+ bisque: '#ffe4c4',
33
+ black: '#000000',
34
+ blanchedalmond: '#ffebcd',
35
+ blue: '#0000ff',
36
+ blueviolet: '#8a2be2',
37
+ brown: '#a52a2a',
38
+ burlywood: '#deb887',
39
+ cadetblue: '#5f9ea0',
40
+ chartreuse: '#7fff00',
41
+ chocolate: '#d2691e',
42
+ coral: '#ff7f50',
43
+ cornflowerblue: '#6495ed',
44
+ cornsilk: '#fff8dc',
45
+ crimson: '#dc143c',
46
+ cyan: '#00ffff',
47
+ darkblue: '#00008b',
48
+ darkcyan: '#008b8b',
49
+ darkgoldenrod: '#b8860b',
50
+ darkgray: '#a9a9a9',
51
+ darkgreen: '#006400',
52
+ darkgrey: '#a9a9a9',
53
+ darkkhaki: '#bdb76b',
54
+ darkmagenta: '#8b008b',
55
+ darkolivegreen: '#556b2f',
56
+ darkorange: '#ff8c00',
57
+ darkorchid: '#9932cc',
58
+ darkred: '#8b0000',
59
+ darksalmon: '#e9967a',
60
+ darkseagreen: '#8fbc8f',
61
+ darkslateblue: '#483d8b',
62
+ darkslategrey: '#2f4f4f',
63
+ darkturquoise: '#00ced1',
64
+ darkviolet: '#9400d3',
65
+ deeppink: '#ff1493',
66
+ deepskyblue: '#00bfff',
67
+ dimgray: '#696969',
68
+ dimgrey: '#696969',
69
+ dodgerblue: '#1e90ff',
70
+ firebrick: '#b22222',
71
+ floralwhite: '#fffaf0',
72
+ forestgreen: '#228b22',
73
+ fuchsia: '#ff00ff',
74
+ gainsboro: '#dcdcdc',
75
+ ghostwhite: '#f8f8ff',
76
+ gold: '#ffd700',
77
+ goldenrod: '#daa520',
78
+ gray: '#808080',
79
+ green: '#008000',
80
+ greenyellow: '#adff2f',
81
+ grey: '#808080',
82
+ honeydew: '#f0fff0',
83
+ hotpink: '#ff69b4',
84
+ indianred: '#cd5c5c',
85
+ indigo: '#4b0082',
86
+ ivory: '#fffff0',
87
+ khaki: '#f0e68c',
88
+ lavender: '#e6e6fa',
89
+ lavenderblush: '#fff0f5',
90
+ lawngreen: '#7cfc00',
91
+ lemonchiffon: '#fffacd',
92
+ lightblue: '#add8e6',
93
+ lightcoral: '#f08080',
94
+ lightcyan: '#e0ffff',
95
+ lightgoldenrodyellow: '#fafad2',
96
+ lightgray: '#d3d3d3',
97
+ lightgreen: '#90ee90',
98
+ lightgrey: '#d3d3d3',
99
+ lightpink: '#ffb6c1',
100
+ lightsalmon: '#ffa07a',
101
+ lightseagreen: '#20b2aa',
102
+ lightskyblue: '#87cefa',
103
+ lightslategrey: '#778899',
104
+ lightsteelblue: '#b0c4de',
105
+ lightyellow: '#ffffe0',
106
+ lime: '#00ff00',
107
+ limegreen: '#32cd32',
108
+ linen: '#faf0e6',
109
+ magenta: '#ff00ff',
110
+ maroon: '#800000',
111
+ mediumaquamarine: '#66cdaa',
112
+ mediumblue: '#0000cd',
113
+ mediumorchid: '#ba55d3',
114
+ mediumpurple: '#9370db',
115
+ mediumseagreen: '#3cb371',
116
+ mediumslateblue: '#7b68ee',
117
+ mediumspringgreen: '#00fa9a',
118
+ mediumturquoise: '#48d1cc',
119
+ mediumvioletred: '#c71585',
120
+ midnightblue: '#191970',
121
+ mintcream: '#f5fffa',
122
+ mistyrose: '#ffe4e1',
123
+ moccasin: '#ffe4b5',
124
+ navajowhite: '#ffdead',
125
+ navy: '#000080',
126
+ oldlace: '#fdf5e6',
127
+ olive: '#808000',
128
+ olivedrab: '#6b8e23',
129
+ orange: '#ffa500',
130
+ orangered: '#ff4500',
131
+ orchid: '#da70d6',
132
+ palegoldenrod: '#eee8aa',
133
+ palegreen: '#98fb98',
134
+ paleturquoise: '#afeeee',
135
+ palevioletred: '#db7093',
136
+ papayawhip: '#ffefd5',
137
+ peachpuff: '#ffdab9',
138
+ peru: '#cd853f',
139
+ pink: '#ffc0cb',
140
+ plum: '#dda0dd',
141
+ powderblue: '#b0e0e6',
142
+ purple: '#800080',
143
+ rebeccapurple: '#663399',
144
+ red: '#ff0000',
145
+ rosybrown: '#bc8f8f',
146
+ royalblue: '#4169e1',
147
+ saddlebrown: '#8b4513',
148
+ salmon: '#fa8072',
149
+ sandybrown: '#f4a460',
150
+ seagreen: '#2e8b57',
151
+ seashell: '#fff5ee',
152
+ sienna: '#a0522d',
153
+ silver: '#c0c0c0',
154
+ skyblue: '#87ceeb',
155
+ slateblue: '#6a5acd',
156
+ slategray: '#708090',
157
+ snow: '#fffafa',
158
+ springgreen: '#00ff7f',
159
+ steelblue: '#4682b4',
160
+ tan: '#d2b48c',
161
+ teal: '#008080',
162
+ thistle: '#d8bfd8',
163
+ tomato: '#ff6347',
164
+ turquoise: '#40e0d0',
165
+ violet: '#ee82ee',
166
+ wheat: '#f5deb3',
167
+ white: '#ffffff',
168
+ whitesmoke: '#f5f5f5',
169
+ yellow: '#ffff00',
170
+ yellowgreen: '#9acd32'
171
+ };
172
+ const COLORS_REGEX = {
173
+ // #rgb
174
+ hex3: /^#([A-Fa-f0-9]{3})$/,
175
+ // #rgba
176
+ hex4: /^#([A-Fa-f0-9]{3}[A-Fa-f0-9]{1})$/,
177
+ // #rrggbb
178
+ hex6: /^#([A-Fa-f0-9]{6})$/,
179
+ // #rrggbbaa
180
+ hex8: /^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,
181
+ hsl: [
182
+ // hsl(360deg, 100%, 100%) hsl(360, 100%, 100%) hsl(23.55, 12.22%, 34.56%)
183
+ /^hsl\s*\(\s*([\d.]+)(?:deg)?\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%\s*\)$/i,
184
+ // hsl(360deg 100% 100%) hsl(360 100% 100%) hsl(23.55 12.22% 34.56%)
185
+ /^hsl\s*\(\s*([\d.]+)(?:deg)?\s+([\d.]+)%\s+([\d.]+)%\s*\)$/i],
186
+ hsla: [
187
+ // hsla(360deg, 100%, 100%, 1.0) hsla(360, 100%, 100%, 1.0) hsl(360deg, 100%, 100%, 1.0) hsl(360, 100%, 100%, 1.0)
188
+ /^hsla?\s*\(\s*([\d.]+)(?:deg)?\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%\s*,\s*(\d|\d\.\d+)\s*\)$/i,
189
+ // hsla(360deg 100% 100% / 1.0) hsla(360 100% 100% / 1.0) hsl(360deg 100% 100% / 1.0) hsl(360 100% 100% / 1.0)
190
+ /^hsla?\s*\(\s*([\d.]+)(?:deg)?\s+([\d.]+)%\s+([\d.]+)%\s*\/\s*(\d|\d\.\d+)\s*\)$/i],
191
+ hsv: [
192
+ // hsv(360deg, 000%, 000%) hsv(360, 100%, 100%)
193
+ /^hsv\s*\(\s*(\d{1,3})(?:deg)?\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%\s*\)$/i,
194
+ // hsv(360deg 000% 000%) hsv(360 100% 100%)
195
+ /^hsv\s*\(\s*(\d{1,3})(?:deg)?\s+([\d.]+)%\s+([\d.]+)%\s*\)$/i],
196
+ hsva: [
197
+ // hsva(360deg, 100%, 100%, 1.0) hsva(360, 100%, 100%, 1.0) hsv(360deg, 100%, 100%, 1.0) hsv(360, 100%, 100%, 1.0)
198
+ /^hsva?\s*\(\s*(\d{1,3})(?:deg)?\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%\s*,\s*(\d|\d\.\d+)\s*\)$/i,
199
+ // hsva(360deg 100% 100% / 1.0) hsva(360 100% 100% / 1.0) hsv(360deg 100% 100% / 1.0) hsv(360 100% 100% / 1.0)
200
+ /^hsva?\s*\(\s*(\d{1,3})(?:deg)?\s+([\d.]+)%\s+([\d.]+)%\s*\/\s*(\d|\d\.\d+)\s*\)$/i],
201
+ hwb: [
202
+ // hwb(360deg, 100%, 100%) hwb(360, 100%, 100%)
203
+ /^hwb\s*\(\s*(\d{1,3})(?:deg)?\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%\s*\)$/i,
204
+ // hwb(360deg 100% 100%) hwb(360 100% 100%)
205
+ /^hwb\s*\(\s*(\d{1,3})(?:deg)?\s+([\d.]+)%\s+([\d.]+)%\s*\)$/i],
206
+ hwba: [
207
+ // hwba(360deg, 100%, 100%, 1.0) hwba(360, 100%, 100%, 1.0) hwb(360deg, 100%, 100%, 1.0) hwb(360, 100%, 100%, 1.0)
208
+ /^hwba?\s*\(\s*(\d{1,3})(?:deg)?\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%\s*,\s*(\d|\d\.\d+)\s*\)$/i,
209
+ // hwb(360deg 100% 100% 1.0) hwb(360 100% 100% / 1.0) hwba(360deg 100% 100% 1.0) hwba(360 100% 100% / 1.0)
210
+ /^hwba?\s*\(\s*(\d{1,3})(?:deg)?\s+([\d.]+)%\s+([\d.]+)%\s*\/\s*(\d|\d\.\d+)\s*\)$/i],
211
+ rgb: [
212
+ // rgb(255, 255, 255)
213
+ /^rgb\s*\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i,
214
+ // rgb(255 255 255)
215
+ /^rgb\s*\(\s*(\d{1,3})\s+(\d{1,3})\s+(\d{1,3})\s*\)$/i],
216
+ rgba: [
217
+ // rgba(255, 255, 255, 1.0) rgb(255, 255, 255, 1.0)
218
+ /^rgba?\s*\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*([\d.]+)\s*\)$/i,
219
+ // rgba(255 255 255 / 1.0) rgb(255 255 255 / 1.0)
220
+ /^rgba?\s*\(\s*(\d{1,3})\s+(\d{1,3})\s+(\d{1,3})\s*\/\s*([\d.]+)\s*\)$/i]
221
+ };
222
+
223
+ // * MARK: General utilities
224
+
225
+ const clamp = (value, min, max) => {
226
+ return Math.max(min, Math.min(value, max));
227
+ };
228
+ const clampRGB = value => {
229
+ return clamp(value, 0, 255);
230
+ };
231
+ const clampHue = value => {
232
+ return clamp(value, 0, 360);
233
+ };
234
+ const clamp100 = value => {
235
+ return clamp(value, 0, 100);
236
+ };
237
+ const clampAlpha = value => {
238
+ return clamp(+value.toFixed(2), 0, 1);
239
+ };
240
+ const randomNumber = (min, max) => {
241
+ return Math.random() * (max - min) + min;
242
+ };
243
+ const numberToHexString = c => {
244
+ c = clampRGB(Math.round(c));
245
+ const hex = c.toString(16).padStart(2, '0');
246
+ return hex;
247
+ };
248
+ const calculateHueValue = (p, q, t) => {
249
+ if (t < 0) t += 1;
250
+ if (t > 1) t -= 1;
251
+ if (t < 1 / 6) return p + (q - p) * 6 * t;
252
+ if (t < 1 / 2) return q;
253
+ if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;
254
+ return p;
255
+ };
256
+
257
+ /** - Identify the color format of a given `string` or `object` */
258
+ const detectColorFormat = color => {
259
+ // color int
260
+ if (typeof color === 'number') {
261
+ // eslint-disable-next-line no-bitwise
262
+ if (color >>> 0 === color && color >= 0 && color <= 0xffffffff) return 'hex8';
263
+ return null;
264
+ }
265
+
266
+ // color string
267
+ if (typeof color === 'string') {
268
+ color = color.trim().toLowerCase();
269
+ for (const key in COLORS_REGEX) {
270
+ const format = key;
271
+ const entry = COLORS_REGEX[format];
272
+ if (Array.isArray(entry)) {
273
+ for (let i = 0; i < entry.length; i++) {
274
+ const regex = entry[i];
275
+ if (regex && regex.test(color)) return format;
276
+ }
277
+ continue;
278
+ }
279
+ if (entry.test(color)) return format;
280
+ }
281
+ }
282
+
283
+ // color object
284
+ if (typeof color === 'object') {
285
+ const rgbaKeys = ['r', 'g', 'b', 'a'];
286
+ const isRgbaOb = rgbaKeys.every(k => color.hasOwnProperty(k) && typeof color[k] === 'number');
287
+ if (isRgbaOb) return 'rgba';
288
+ const rgbKeys = ['r', 'g', 'b'];
289
+ const isRgbOb = rgbKeys.every(k => color.hasOwnProperty(k) && typeof color[k] === 'number');
290
+ if (isRgbOb) return 'rgb';
291
+ const hslaKeys = ['h', 's', 'l', 'a'];
292
+ const isHslaOb = hslaKeys.every(k => color.hasOwnProperty(k) && typeof color[k] === 'number');
293
+ if (isHslaOb) return 'hsla';
294
+ const hslKeys = ['h', 's', 'l'];
295
+ const isHslOb = hslKeys.every(k => color.hasOwnProperty(k) && typeof color[k] === 'number');
296
+ if (isHslOb) return 'hsl';
297
+ const hsvaKeys = ['h', 's', 'v', 'a'];
298
+ const isHsvaOb = hsvaKeys.every(k => color.hasOwnProperty(k) && typeof color[k] === 'number');
299
+ if (isHsvaOb) return 'hsva';
300
+ const hsvKeys = ['h', 's', 'v'];
301
+ const isHsvOb = hsvKeys.every(k => color.hasOwnProperty(k) && typeof color[k] === 'number');
302
+ if (isHsvOb) return 'hsv';
303
+ const hwbaKeys = ['h', 'w', 'b', 'a'];
304
+ const isHwbaOb = hwbaKeys.every(k => color.hasOwnProperty(k) && typeof color[k] === 'number');
305
+ if (isHwbaOb) return 'hwba';
306
+ const hwbKeys = ['h', 'w', 'b'];
307
+ const isHwbOb = hwbKeys.every(k => color.hasOwnProperty(k) && typeof color[k] === 'number');
308
+ if (isHwbOb) return 'hwb';
309
+ }
310
+ return null;
311
+ };
312
+
313
+ // * MARK: RGB
314
+
315
+ /** - Parse `RGB` or `RGBA` color string to an `object` */
316
+ const RGB_string_to_object = color => {
317
+ color = color.trim().toLowerCase();
318
+ const colorType = detectColorFormat(color);
319
+ if (!colorType || !colorType.includes('rgb')) {
320
+ console.error('[colorKit.getRgbObject] is unable to parse the string into an `RGB` object. As a result, the color "black" will be returned instead.');
321
+ return {
322
+ r: 0,
323
+ g: 0,
324
+ b: 0,
325
+ a: 1
326
+ };
327
+ }
328
+ let matches = null;
329
+ const entry = COLORS_REGEX[colorType];
330
+ if (Array.isArray(entry)) {
331
+ for (let i = 0; i < entry.length; i++) {
332
+ const regex = entry[i];
333
+ if (regex && regex.test(color)) {
334
+ matches = color.match(regex);
335
+ }
336
+ }
337
+ } else {
338
+ matches = color.match(entry);
339
+ }
340
+ if (!matches || matches.length < 4) {
341
+ console.error('[colorKit.getRgbObject] An error occurred while attempting to destructuring `RGB` values from the given string. As a result, the color "black" will be returned instead.');
342
+ return {
343
+ r: 0,
344
+ g: 0,
345
+ b: 0,
346
+ a: 1
347
+ };
348
+ }
349
+ const r = parseInt(matches[1] || '0', 10),
350
+ g = parseInt(matches[2] || '0', 10),
351
+ b = parseInt(matches[3] || '0', 10),
352
+ a = parseFloat(matches[4] ?? '1');
353
+ return {
354
+ r: clampRGB(r),
355
+ g: clampRGB(g),
356
+ b: clampRGB(b),
357
+ a: clampAlpha(a)
358
+ };
359
+ };
360
+
361
+ /** - Ensure that the `RGB` object values are within the correct range and that it has the alpha channel */
362
+ const normalize_RGB_object = color => {
363
+ return {
364
+ r: clampRGB(color.r),
365
+ g: clampRGB(color.g),
366
+ b: clampRGB(color.b),
367
+ a: clampAlpha(color.a ?? 1)
368
+ };
369
+ };
370
+
371
+ /** - Convert an `RGB` or `RGBA` color to its corresponding `Hex` color */
372
+ const RGB_to_HEX = color => {
373
+ const {
374
+ r,
375
+ g,
376
+ b,
377
+ a
378
+ } = typeof color === 'string' ? RGB_string_to_object(color) : normalize_RGB_object(color);
379
+ const red = numberToHexString(r),
380
+ green = numberToHexString(g),
381
+ blue = numberToHexString(b),
382
+ alpha = a === 1 ? '' : numberToHexString(a * 255);
383
+ return `#${red + green + blue + alpha}`;
384
+ };
385
+
386
+ /** - Convert `RGB` or `RGBA` color to an `RGBA` object representation */
387
+ const RGB_to_RGB = color => {
388
+ return typeof color === 'string' ? RGB_string_to_object(color) : normalize_RGB_object(color);
389
+ };
390
+
391
+ /** - Convert an `RGB` or `RGBA` color to an `HSLA` object representation */
392
+ const RGB_to_HSLA = color => {
393
+ const rgb = typeof color === 'string' ? RGB_string_to_object(color) : normalize_RGB_object(color),
394
+ r = rgb.r / 255,
395
+ g = rgb.g / 255,
396
+ b = rgb.b / 255,
397
+ a = rgb.a;
398
+ const max = Math.max(r, g, b),
399
+ min = Math.min(r, g, b);
400
+ let h = 0,
401
+ s,
402
+ l = (max + min) / 2;
403
+ if (max === min) {
404
+ h = s = 0;
405
+ } else {
406
+ const d = max - min;
407
+ s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
408
+ if (max === r) {
409
+ h = (g - b) / d + (g < b ? 6 : 0);
410
+ } else if (max === g) {
411
+ h = (b - r) / d + 2;
412
+ } else if (max === b) {
413
+ h = (r - g) / d + 4;
414
+ }
415
+ h /= 6;
416
+ }
417
+ h = clampHue(h * 360);
418
+ s = clamp100(s * 100);
419
+ l = clamp100(l * 100);
420
+ return {
421
+ h,
422
+ s,
423
+ l,
424
+ a: clampAlpha(a)
425
+ };
426
+ };
427
+
428
+ /** - Convert `RGB` or `RGBA` color to an `HSVA` object representation */
429
+ const RGB_to_HSVA = color => {
430
+ const rgb = typeof color === 'string' ? RGB_string_to_object(color) : normalize_RGB_object(color),
431
+ r = rgb.r / 255,
432
+ g = rgb.g / 255,
433
+ b = rgb.b / 255,
434
+ a = rgb.a;
435
+ const max = Math.max(r, g, b),
436
+ min = Math.min(r, g, b),
437
+ d = max - min,
438
+ v = max,
439
+ s = max === 0 ? 0 : d / max;
440
+ let h = 0;
441
+ if (max === min) {
442
+ h = 0;
443
+ } else {
444
+ if (max === r) {
445
+ h = (g - b) / d + (g < b ? 6 : 0);
446
+ } else if (max === g) {
447
+ h = (b - r) / d + 2;
448
+ } else if (max === b) {
449
+ h = (r - g) / d + 4;
450
+ }
451
+ h = h / 6;
452
+ }
453
+ return {
454
+ h: clampHue(h * 360),
455
+ s: clamp100(s * 100),
456
+ v: clamp100(v * 100),
457
+ a: clampAlpha(a)
458
+ };
459
+ };
460
+
461
+ /** - Convert `RGB` or `RGBA` color to an `HWBA` object representation */
462
+ const RGB_to_HWBA = color => {
463
+ const rgb = typeof color === 'string' ? RGB_string_to_object(color) : normalize_RGB_object(color),
464
+ red = rgb.r / 255,
465
+ green = rgb.g / 255,
466
+ blue = rgb.b / 255,
467
+ a = rgb.a;
468
+ const {
469
+ h
470
+ } = RGB_to_HSLA(color);
471
+ const white = Math.min(red, green, blue) * 100;
472
+ const black = (1 - Math.max(red, green, blue)) * 100;
473
+ return {
474
+ h: clampHue(h),
475
+ w: clamp100(white),
476
+ b: clamp100(black),
477
+ a: clampAlpha(a)
478
+ };
479
+ };
480
+
481
+ /** - Return the `RGB` color as a string, an array, or an object */
482
+ const RGB_types = ({
483
+ r,
484
+ g,
485
+ b,
486
+ a
487
+ }) => {
488
+ return {
489
+ string: forceAlpha => {
490
+ r = Math.round(r);
491
+ g = Math.round(g);
492
+ b = Math.round(b);
493
+
494
+ // auto
495
+ if (typeof forceAlpha === 'undefined') {
496
+ if (typeof a === 'number' && a !== 1) return `rgba(${r}, ${g}, ${b}, ${a})`;
497
+ return `rgb(${r}, ${g}, ${b})`;
498
+ }
499
+ if (forceAlpha) return `rgba(${r}, ${g}, ${b}, ${a ?? 1})`;
500
+ return `rgb(${r}, ${g}, ${b})`;
501
+ },
502
+ array: (roundValues = true) => {
503
+ if (roundValues) {
504
+ r = Math.round(r);
505
+ g = Math.round(g);
506
+ b = Math.round(b);
507
+ }
508
+ return [r, g, b, a];
509
+ },
510
+ object: (roundValues = true) => {
511
+ if (roundValues) {
512
+ r = Math.round(r);
513
+ g = Math.round(g);
514
+ b = Math.round(b);
515
+ }
516
+ return {
517
+ r,
518
+ g,
519
+ b,
520
+ a
521
+ };
522
+ }
523
+ };
524
+ };
525
+
526
+ // * MARK: HSL
527
+
528
+ /** - Parse `HSL` or `HSLA` color string to an `object` */
529
+ const HSL_string_to_object = color => {
530
+ color = color.trim().toLowerCase();
531
+ const colorType = detectColorFormat(color);
532
+ if (!colorType || !colorType.includes('hsl')) {
533
+ console.error('[colorKit.getHslObject] is unable to parse the string into an `HSL` object. As a result, the color "black" will be returned instead.');
534
+ return {
535
+ h: 0,
536
+ s: 0,
537
+ l: 0,
538
+ a: 1
539
+ };
540
+ }
541
+ let matches = null;
542
+ const entry = COLORS_REGEX[colorType];
543
+ if (Array.isArray(entry)) {
544
+ for (let i = 0; i < entry.length; i++) {
545
+ const regex = entry[i];
546
+ if (regex && regex.test(color)) {
547
+ matches = color.match(regex);
548
+ }
549
+ }
550
+ } else {
551
+ matches = color.match(entry);
552
+ }
553
+ if (!matches || matches.length < 3) {
554
+ console.error('[colorKit.getHslObject] An error occurred while attempting to destructuring `HSL` values from the given string. As a result, the color "black" will be returned instead.');
555
+ return {
556
+ h: 0,
557
+ s: 0,
558
+ l: 0,
559
+ a: 1
560
+ };
561
+ }
562
+ const h = parseInt(matches[1] || '0', 10),
563
+ s = parseInt(matches[2] || '0', 10),
564
+ l = parseInt(matches[3] || '0', 10),
565
+ a = parseFloat(matches[4] ?? '1');
566
+ return {
567
+ h: clampHue(h),
568
+ s: clamp100(s),
569
+ l: clamp100(l),
570
+ a: clampAlpha(a)
571
+ };
572
+ };
573
+
574
+ /** - Ensure that the `HSL` object values are within the correct range and that it has the alpha channel */
575
+ const normalize_HSL_object = color => {
576
+ return {
577
+ h: clampHue(color.h),
578
+ s: clamp100(color.s),
579
+ l: clamp100(color.l),
580
+ a: clampAlpha(color.a ?? 1)
581
+ };
582
+ };
583
+
584
+ /** - Convert `HSL` or `HSLA` color to an `RGBA` object representation */
585
+ const HSL_to_RGBA = color => {
586
+ const hsla = typeof color === 'string' ? HSL_string_to_object(color) : normalize_HSL_object(color);
587
+ const h = hsla.h / 360,
588
+ s = hsla.s / 100,
589
+ l = hsla.l / 100,
590
+ a = hsla.a;
591
+ const q = l < 0.5 ? l * (1 + s) : l + s - l * s,
592
+ p = 2 * l - q;
593
+ const r = calculateHueValue(p, q, h + 1 / 3),
594
+ g = calculateHueValue(p, q, h),
595
+ b = calculateHueValue(p, q, h - 1 / 3);
596
+ return {
597
+ r: clampRGB(r * 255),
598
+ g: clampRGB(g * 255),
599
+ b: clampRGB(b * 255),
600
+ a: clampAlpha(a)
601
+ };
602
+ };
603
+
604
+ /** - Convert `HSL` or `HSLA` color to `HEX` color */
605
+ const HSL_to_HEX = color => {
606
+ const hsla = typeof color === 'string' ? HSL_string_to_object(color) : normalize_HSL_object(color);
607
+ const rgb = HSL_to_RGBA(hsla);
608
+ const r = numberToHexString(rgb.r),
609
+ g = numberToHexString(rgb.g),
610
+ b = numberToHexString(rgb.b),
611
+ a = rgb.a === 1 ? '' : numberToHexString(rgb.a * 255);
612
+ return `#${r + g + b + a}`;
613
+ };
614
+
615
+ /** - Convert `HSL` or `HSLA` color to an `HSVA` object representation */
616
+ const HSL_to_HSVA = color => {
617
+ const hsla = typeof color === 'string' ? HSL_string_to_object(color) : normalize_HSL_object(color);
618
+ const h = hsla.h;
619
+ const s = hsla.s / 100,
620
+ l = hsla.l / 100,
621
+ a = hsla.a ?? 1,
622
+ v = l + s * Math.min(l, 1 - l),
623
+ sNew = v === 0 ? 0 : 2 - 2 * l / v;
624
+ return {
625
+ h: clampHue(h),
626
+ s: clamp100(sNew * 100),
627
+ v: clamp100(v * 100),
628
+ a: clampAlpha(a)
629
+ };
630
+ };
631
+
632
+ /** - Convert `HSL` or `HSLA` color to an `HWBA` object representation */
633
+ const HSL_to_HWBA = color => {
634
+ const hsva = HSL_to_HSVA(color);
635
+ return HSV_to_HWBA(hsva);
636
+ };
637
+
638
+ /** - Convert `HSL` or `HSLA` color to an `HSLA` object representation */
639
+ const HSL_to_HSL = color => {
640
+ return typeof color === 'string' ? HSL_string_to_object(color) : normalize_HSL_object(color);
641
+ };
642
+
643
+ /** - Return the `HSL` color as a string, an array, or an object */
644
+ const HSL_types = ({
645
+ h,
646
+ s,
647
+ l,
648
+ a
649
+ }) => {
650
+ return {
651
+ string: forceAlpha => {
652
+ h = Math.round(h);
653
+ s = Math.round(s);
654
+ l = Math.round(l);
655
+
656
+ // auto
657
+ if (typeof forceAlpha === 'undefined') {
658
+ if (typeof a === 'number' && a !== 1) return `hsla(${h}, ${s}%, ${l}%, ${a})`;
659
+ return `hsl(${h}, ${s}%, ${l}%)`;
660
+ }
661
+ if (forceAlpha) return `hsla(${h}, ${s}%, ${l}%, ${a ?? 1})`;
662
+ return `hsl(${h}, ${s}%, ${l}%)`;
663
+ },
664
+ array: (roundValues = true) => {
665
+ if (roundValues) {
666
+ h = Math.round(h);
667
+ s = Math.round(s);
668
+ l = Math.round(l);
669
+ }
670
+ return [h, s, l, a];
671
+ },
672
+ object: (roundValues = true) => {
673
+ if (roundValues) {
674
+ h = Math.round(h);
675
+ s = Math.round(s);
676
+ l = Math.round(l);
677
+ }
678
+ return {
679
+ h,
680
+ s,
681
+ l,
682
+ a
683
+ };
684
+ }
685
+ };
686
+ };
687
+
688
+ // * MARK: HWB
689
+
690
+ /** - Parse `HWB` or `HWBA` color strong to an `object` */
691
+ const HWB_string_to_object = color => {
692
+ color = color.trim().toLowerCase();
693
+ const colorType = detectColorFormat(color);
694
+ if (!colorType || !colorType.includes('hwb')) {
695
+ console.error('[colorKit.getHwbObject] is unable to parse the string into an `HWB` object. As a result, the color "black" will be returned instead.');
696
+ return {
697
+ h: 0,
698
+ w: 0,
699
+ b: 0,
700
+ a: 1
701
+ };
702
+ }
703
+ let matches = null;
704
+ const entry = COLORS_REGEX[colorType];
705
+ if (Array.isArray(entry)) {
706
+ for (let i = 0; i < entry.length; i++) {
707
+ const regex = entry[i];
708
+ if (regex && regex.test(color)) {
709
+ matches = color.match(regex);
710
+ }
711
+ }
712
+ } else {
713
+ matches = color.match(entry);
714
+ }
715
+ if (!matches || matches.length < 4) {
716
+ console.error('[colorKit.getHwbObject] An error occurred while attempting to destructuring `HWB` values from the given string. As a result, the color "black" will be returned instead.');
717
+ return {
718
+ h: 0,
719
+ w: 0,
720
+ b: 0,
721
+ a: 1
722
+ };
723
+ }
724
+ const h = parseInt(matches[1] || '0', 10),
725
+ w = parseInt(matches[2] || '0', 10),
726
+ b = parseInt(matches[3] || '0', 10),
727
+ a = parseFloat(matches[4] ?? '1');
728
+ return {
729
+ h: clampHue(h),
730
+ w: clamp100(w),
731
+ b: clamp100(b),
732
+ a: clampAlpha(a)
733
+ };
734
+ };
735
+
736
+ /** - Ensure that the `HWB` object values are within the correct range and that it has the alpha channel */
737
+ const normalize_HWB_object = color => {
738
+ return {
739
+ h: clampHue(color.h),
740
+ w: clamp100(color.w),
741
+ b: clamp100(color.b),
742
+ a: clampAlpha(color.a ?? 1)
743
+ };
744
+ };
745
+
746
+ /** - Convert `HWB` or `HWBA` color to an `RGBA` object representation */
747
+ const HWB_to_RGBA = color => {
748
+ const hwba = typeof color === 'string' ? HWB_string_to_object(color) : normalize_HWB_object(color);
749
+ const h = hwba.h / 360,
750
+ w = hwba.w / 100,
751
+ b = hwba.b / 100,
752
+ a = hwba.a;
753
+ if (w + b >= 1) {
754
+ const gray = clampRGB(w * 255 / (w + b));
755
+ return {
756
+ r: gray,
757
+ g: gray,
758
+ b: gray,
759
+ a
760
+ };
761
+ }
762
+ const red = calculateHueValue(0, 1, h + 1 / 3) * (1 - w - b) + w,
763
+ green = calculateHueValue(0, 1, h) * (1 - w - b) + w,
764
+ blue = calculateHueValue(0, 1, h - 1 / 3) * (1 - w - b) + w;
765
+ return {
766
+ r: clampRGB(red * 255),
767
+ g: clampRGB(green * 255),
768
+ b: clampRGB(blue * 255),
769
+ a: clampAlpha(a)
770
+ };
771
+ };
772
+
773
+ /** - Convert `HWB` or `HWBA` color to an `Hex` color */
774
+ const HWB_to_HEX = color => {
775
+ const rgba = HWB_to_RGBA(color);
776
+ return RGB_to_HEX(rgba);
777
+ };
778
+
779
+ /** - Convert `HWB` or `HWBA` color to an `HSVA` object representation */
780
+ function HWB_to_HSVA(color) {
781
+ const hwba = typeof color === 'string' ? HWB_string_to_object(color) : normalize_HWB_object(color);
782
+ const h = hwba.h % 360,
783
+ w = hwba.w / 100,
784
+ b = hwba.b / 100,
785
+ a = hwba.a;
786
+ const v = (1 - b) * 100;
787
+ let s = (1 - w / (v / 100)) * 100;
788
+ s = isNaN(s) ? 0 : s;
789
+ return {
790
+ h: clampHue(h),
791
+ s: clamp100(s),
792
+ v: clamp100(v),
793
+ a: clampAlpha(a)
794
+ };
795
+ }
796
+
797
+ /** - Convert `HWB` or `HWBA` color to an `HSLA` object representation */
798
+ const HWB_to_HSLA = color => {
799
+ const hsva = HWB_to_HSVA(color);
800
+ return HSV_to_HSLA(hsva);
801
+ };
802
+
803
+ /** - Convert `HWB` or `HWBA` color to an `HWBA` object representation */
804
+ const HWB_to_HWB = color => {
805
+ return typeof color === 'string' ? HWB_string_to_object(color) : normalize_HWB_object(color);
806
+ };
807
+
808
+ /** - Return the `HWB` color as a string, an array, or an object */
809
+ const HWB_types = ({
810
+ h,
811
+ w,
812
+ b,
813
+ a
814
+ }) => {
815
+ return {
816
+ string: forceAlpha => {
817
+ h = Math.round(h);
818
+ w = Math.round(w);
819
+ b = Math.round(b);
820
+
821
+ // auto
822
+ if (typeof forceAlpha === 'undefined') {
823
+ if (typeof a === 'number' && a !== 1) return `hwb(${h} ${w}% ${b}% / ${a})`;
824
+ return `hwb(${h}, ${w}%, ${b}%)`;
825
+ }
826
+ if (forceAlpha) return `hwb(${h} ${w}% ${b}% / ${a ?? 1})`;
827
+ return `hwb(${h} ${w}% ${b}%)`;
828
+ },
829
+ array: (roundValues = true) => {
830
+ if (roundValues) {
831
+ h = Math.round(h);
832
+ w = Math.round(w);
833
+ b = Math.round(b);
834
+ }
835
+ return [h, w, b, a];
836
+ },
837
+ object: (roundValues = true) => {
838
+ if (roundValues) {
839
+ h = Math.round(h);
840
+ w = Math.round(w);
841
+ b = Math.round(b);
842
+ }
843
+ return {
844
+ h,
845
+ w,
846
+ b,
847
+ a
848
+ };
849
+ }
850
+ };
851
+ };
852
+
853
+ // * MARK: HSV
854
+
855
+ /** - Parse `HSV` or `HSVA` color string to an `object` */
856
+ const HSV_string_to_object = color => {
857
+ color = color.trim().toLowerCase();
858
+ const colorType = detectColorFormat(color);
859
+ if (!colorType || !colorType.includes('hsv')) {
860
+ console.error('[colorKit.getHsvObject] is unable to parse the string into an `HSV` object. As a result, the color "black" will be returned instead.');
861
+ return {
862
+ h: 0,
863
+ s: 0,
864
+ v: 0,
865
+ a: 1
866
+ };
867
+ }
868
+ let matches = null;
869
+ const entry = COLORS_REGEX[colorType];
870
+ if (Array.isArray(entry)) {
871
+ for (let i = 0; i < entry.length; i++) {
872
+ const regex = entry[i];
873
+ if (regex && regex.test(color)) {
874
+ matches = color.match(regex);
875
+ }
876
+ }
877
+ } else {
878
+ matches = color.match(entry);
879
+ }
880
+ if (!matches || matches.length < 4) {
881
+ console.error('[colorKit.getHsvObject] An error occurred while attempting to destructuring `HSV` values from the given string. As a result, the color "black" will be returned instead.');
882
+ return {
883
+ h: 0,
884
+ s: 0,
885
+ v: 0,
886
+ a: 1
887
+ };
888
+ }
889
+ const h = parseInt(matches[1] || '0', 10),
890
+ s = parseInt(matches[2] || '0', 10),
891
+ v = parseInt(matches[3] || '0', 10),
892
+ a = parseFloat(matches[4] ?? '1');
893
+ return {
894
+ h: clampHue(h),
895
+ s: clamp100(s),
896
+ v: clamp100(v),
897
+ a: clampAlpha(a)
898
+ };
899
+ };
900
+
901
+ /** - Ensure that the `HSV` object values are within the correct range and that it has the alpha channel */
902
+ const normalize_HSV_object = color => {
903
+ return {
904
+ h: clampHue(color.h),
905
+ s: clamp100(color.s),
906
+ v: clamp100(color.v),
907
+ a: clampAlpha(color.a ?? 1)
908
+ };
909
+ };
910
+
911
+ /** - Convert `HSV` color to an `RGBA` object representation */
912
+ const HSV_to_RGBA = color => {
913
+ const hsva = typeof color === 'string' ? HSV_string_to_object(color) : normalize_HSV_object(color);
914
+ const h = hsva.h / 360,
915
+ s = hsva.s / 100,
916
+ v = hsva.v / 100,
917
+ a = hsva.a;
918
+ const i = Math.floor(h * 6),
919
+ f = h * 6 - i,
920
+ p = v * (1 - s),
921
+ q = v * (1 - f * s),
922
+ t = v * (1 - (1 - f) * s);
923
+ let r = 0,
924
+ g = 0,
925
+ b = 0;
926
+ if (i % 6 === 0) {
927
+ r = v;
928
+ g = t;
929
+ b = p;
930
+ } else if (i % 6 === 1) {
931
+ r = q;
932
+ g = v;
933
+ b = p;
934
+ } else if (i % 6 === 2) {
935
+ r = p;
936
+ g = v;
937
+ b = t;
938
+ } else if (i % 6 === 3) {
939
+ r = p;
940
+ g = q;
941
+ b = v;
942
+ } else if (i % 6 === 4) {
943
+ r = t;
944
+ g = p;
945
+ b = v;
946
+ } else if (i % 6 === 5) {
947
+ r = v;
948
+ g = p;
949
+ b = q;
950
+ }
951
+ return {
952
+ r: clampRGB(r * 255),
953
+ g: clampRGB(g * 255),
954
+ b: clampRGB(b * 255),
955
+ a: clampAlpha(a)
956
+ };
957
+ };
958
+
959
+ /** - Convert `HSV` color to an `HSLA` object representation */
960
+ const HSV_to_HSLA = color => {
961
+ const hsva = typeof color === 'string' ? HSV_string_to_object(color) : normalize_HSV_object(color);
962
+ const h = hsva.h,
963
+ s = hsva.s / 100,
964
+ v = hsva.v / 100,
965
+ a = hsva.a;
966
+ const l = (2 - s) * v / 2,
967
+ sl = s * v,
968
+ sln = l !== 0 && l !== 1 ? sl / (l < 0.5 ? l * 2 : 2 - l * 2) : sl;
969
+ return {
970
+ h: clampHue(h),
971
+ s: clamp100(sln * 100),
972
+ l: clamp100(l * 100),
973
+ a: clampAlpha(a)
974
+ };
975
+ };
976
+
977
+ /** - Convert `HSV` color to an `Hex` color */
978
+ const HSV_to_HEX = color => {
979
+ const rgba = HSV_to_RGBA(color);
980
+ const hex = RGB_to_HEX(rgba);
981
+ return hex;
982
+ };
983
+
984
+ /** - Convert `HSV` color to an `HWBA` object representation */
985
+ const HSV_to_HWBA = color => {
986
+ const {
987
+ h,
988
+ s,
989
+ v,
990
+ a
991
+ } = typeof color === 'string' ? HSV_string_to_object(color) : normalize_HSV_object(color);
992
+ const w = (1 - s / 100) * v,
993
+ b = (1 - v / 100) * 100;
994
+ return {
995
+ h: clampHue(h),
996
+ w: clamp100(w),
997
+ b: clamp100(b),
998
+ a: clampAlpha(a)
999
+ };
1000
+ };
1001
+
1002
+ /** - Convert `HSV` color to an `HSVA` object representation */
1003
+ const HSV_to_HSV = color => {
1004
+ return typeof color === 'string' ? HSV_string_to_object(color) : normalize_HSV_object(color);
1005
+ };
1006
+
1007
+ /** - Return the `HSV` color as a string, an array, or an object */
1008
+ const HSV_types = ({
1009
+ h,
1010
+ s,
1011
+ v,
1012
+ a
1013
+ }) => {
1014
+ return {
1015
+ string: forceAlpha => {
1016
+ h = Math.round(h);
1017
+ s = Math.round(s);
1018
+ v = Math.round(v);
1019
+
1020
+ // auto
1021
+ if (typeof forceAlpha === 'undefined') {
1022
+ if (typeof a === 'number' && a !== 1) return `hsva(${h}, ${s}%, ${v}%, ${a})`;
1023
+ return `hsv(${h}, ${s}%, ${v}%)`;
1024
+ }
1025
+ if (forceAlpha) return `hsva(${h}, ${s}%, ${v}%, ${a ?? 1})`;
1026
+ return `hsv(${h}, ${s}%, ${v}%)`;
1027
+ },
1028
+ array: (roundValues = true) => {
1029
+ if (roundValues) {
1030
+ h = Math.round(h);
1031
+ s = Math.round(s);
1032
+ v = Math.round(v);
1033
+ }
1034
+ return [h, s, v, a];
1035
+ },
1036
+ object: (roundValues = true) => {
1037
+ if (roundValues) {
1038
+ h = Math.round(h);
1039
+ s = Math.round(s);
1040
+ v = Math.round(v);
1041
+ }
1042
+ return {
1043
+ h,
1044
+ s,
1045
+ v,
1046
+ a
1047
+ };
1048
+ }
1049
+ };
1050
+ };
1051
+
1052
+ // * MARK: HEX
1053
+
1054
+ /** - Convert any `HEX` color to 8-digit `HEX` color (#rrggbbaa) */
1055
+ const normalize_HEX = color => {
1056
+ if (typeof color === 'number') {
1057
+ return '#' + color.toString(16).padStart(8, '0');
1058
+ }
1059
+ color = color.trim().toLowerCase();
1060
+ const colorType = detectColorFormat(color);
1061
+ if (!colorType || !colorType.includes('hex')) {
1062
+ console.error('[colorKit.normalizeHexColor] is unable to normalize the `HEX` string provided. As a result, the color "black" will be returned instead.');
1063
+ return '#000000ff';
1064
+ }
1065
+ const hex = color.replace(/^#/, '').split('');
1066
+ if (hex.length === 3) return `#${hex.map(x => x + x).join('')}ff`;
1067
+ if (hex.length === 4) return `#${hex.map(x => x + x).join('')}`;
1068
+ if (hex.length === 6) return `#${hex.join('')}ff`;
1069
+ return color;
1070
+ };
1071
+
1072
+ /** - Convert any `HEX` color to an `RGBA` object representation */
1073
+ const HEX_to_RGBA = color => {
1074
+ const hex = normalize_HEX(color);
1075
+ let matches = null;
1076
+ const entry = COLORS_REGEX.hex8;
1077
+ if (Array.isArray(entry)) {
1078
+ for (let i = 0; i < entry.length; i++) {
1079
+ const regex = entry[i];
1080
+ if (regex && regex.test(hex)) matches = hex.match(regex);
1081
+ }
1082
+ } else {
1083
+ matches = hex.match(entry);
1084
+ }
1085
+ if (!matches || matches.length < 4) {
1086
+ console.error('[colorKit.HEX_RGBA] An error occurred while attempting to destructuring `HEX` values from the given string. As a result, the color "black" will be returned instead.');
1087
+ return {
1088
+ r: 0,
1089
+ g: 0,
1090
+ b: 0,
1091
+ a: 1
1092
+ };
1093
+ }
1094
+ const r = parseInt(matches[1] || '0', 16),
1095
+ g = parseInt(matches[2] || '0', 16),
1096
+ b = parseInt(matches[3] || '0', 16),
1097
+ a = parseInt(matches[4] || 'ff', 16) / 255;
1098
+ return {
1099
+ r: clampRGB(r),
1100
+ g: clampRGB(g),
1101
+ b: clampRGB(b),
1102
+ a: clampAlpha(a)
1103
+ };
1104
+ };
1105
+
1106
+ /** - Convert any `HEX` color to an `HSVA` object representation */
1107
+ const HEX_to_HSVA = color => {
1108
+ const rgb = HEX_to_RGBA(color);
1109
+ const hsva = RGB_to_HSVA(rgb);
1110
+ return hsva;
1111
+ };
1112
+
1113
+ /** - Convert any `HEX` color to an `HSLA` object representation */
1114
+ const HEX_to_HSLA = color => {
1115
+ const rgb = HEX_to_RGBA(color);
1116
+ return RGB_to_HSLA(rgb);
1117
+ };
1118
+
1119
+ /** - Convert any `HEX` color to an `HWBA` object representation */
1120
+ const HEX_to_HWBA = color => {
1121
+ const rgba = HEX_to_RGBA(color);
1122
+ return RGB_to_HWBA(rgba);
1123
+ };
1124
+
1125
+ // * MARK: Color conversions
1126
+
1127
+ /** - Convert `HSL`, `HSV`, `HWB`, or `RGB` color to the `HEX` color format. */
1128
+ const HEX = color => {
1129
+ // named color
1130
+ if (typeof color === 'string') {
1131
+ color = color.trim().toLowerCase();
1132
+ if (NAMED_COLORS.hasOwnProperty(color)) {
1133
+ color = NAMED_COLORS[color];
1134
+ }
1135
+ }
1136
+ const colorType = detectColorFormat(color);
1137
+
1138
+ // RGB to HEX
1139
+ if (colorType === 'rgb' || colorType === 'rgba') {
1140
+ return RGB_to_HEX(color);
1141
+ }
1142
+
1143
+ // HSL to HEX
1144
+ if (colorType === 'hsl' || colorType === 'hsla') {
1145
+ return HSL_to_HEX(color);
1146
+ }
1147
+
1148
+ // HSV to HEX
1149
+ if (colorType === 'hsv' || colorType === 'hsva') {
1150
+ return HSV_to_HEX(color);
1151
+ }
1152
+
1153
+ // HWB to HEX
1154
+ if (colorType === 'hwb' || colorType === 'hwba') {
1155
+ return HWB_to_HEX(color);
1156
+ }
1157
+
1158
+ // HEX
1159
+ if (colorType?.includes('hex')) {
1160
+ return normalize_HEX(color);
1161
+ }
1162
+
1163
+ // ! error
1164
+ console.error('[colorKit.HEX] An error occurred while attempting to convert the provided parameter into an `HEX` color. As a result, the default color "black" will be used instead.');
1165
+ return '#000000';
1166
+ };
1167
+
1168
+ /** - Convert `HSL`, `HSV`, `HWB`, or `HEX` color to the `RGB` color format. */
1169
+ const RGB = color => {
1170
+ // named color
1171
+ if (typeof color === 'string') {
1172
+ color = color.trim().toLowerCase();
1173
+ if (NAMED_COLORS.hasOwnProperty(color)) {
1174
+ color = NAMED_COLORS[color];
1175
+ }
1176
+ }
1177
+ const colorType = detectColorFormat(color);
1178
+
1179
+ // HEX to RGB
1180
+ if (colorType?.includes('hex')) {
1181
+ const rgb = HEX_to_RGBA(color);
1182
+ return RGB_types(rgb);
1183
+ }
1184
+
1185
+ // HSL to RGB
1186
+ if (colorType === 'hsl' || colorType === 'hsla') {
1187
+ const rgb = HSL_to_RGBA(color);
1188
+ return RGB_types(rgb);
1189
+ }
1190
+
1191
+ // HSV to RGB
1192
+ if (colorType === 'hsv' || colorType === 'hsva') {
1193
+ const rgb = HSV_to_RGBA(color);
1194
+ return RGB_types(rgb);
1195
+ }
1196
+
1197
+ // HWB to RGB
1198
+ if (colorType === 'hwb' || colorType === 'hwba') {
1199
+ const rgb = HWB_to_RGBA(color);
1200
+ return RGB_types(rgb);
1201
+ }
1202
+
1203
+ // RGB to normalized RGB
1204
+ if (colorType === 'rgb' || colorType === 'rgba') {
1205
+ const rgba = RGB_to_RGB(color);
1206
+ return RGB_types(rgba);
1207
+ }
1208
+
1209
+ // ! error
1210
+ console.error('[colorKit.RGB] An error occurred while attempting to convert the provided parameter into an `RGB` color. As a result, the default color "black" will be used instead.');
1211
+ return RGB_types({
1212
+ r: 0,
1213
+ g: 0,
1214
+ b: 0,
1215
+ a: 1
1216
+ });
1217
+ };
1218
+
1219
+ /** - Convert `HEX`, `HSV`, `HWB`, or `RGB` color to the `HSL` color format. */
1220
+ const HSL = color => {
1221
+ // named color
1222
+ if (typeof color === 'string') {
1223
+ color = color.trim().toLowerCase();
1224
+ if (NAMED_COLORS.hasOwnProperty(color)) {
1225
+ color = NAMED_COLORS[color];
1226
+ }
1227
+ }
1228
+ const colorType = detectColorFormat(color);
1229
+
1230
+ // HEX to HSL
1231
+ if (colorType?.includes('hex')) {
1232
+ const hsla = HEX_to_HSLA(color);
1233
+ return HSL_types(hsla);
1234
+ }
1235
+
1236
+ // RGB to HSL
1237
+ if (colorType === 'rgb' || colorType === 'rgba') {
1238
+ const hsla = RGB_to_HSLA(color);
1239
+ return HSL_types(hsla);
1240
+ }
1241
+
1242
+ // HSV to HSL
1243
+ if (colorType === 'hsv' || colorType === 'hsva') {
1244
+ const hsla = HSV_to_HSLA(color);
1245
+ return HSL_types(hsla);
1246
+ }
1247
+
1248
+ // HWB to HSL
1249
+ if (colorType === 'hwb' || colorType === 'hwba') {
1250
+ const hsla = HWB_to_HSLA(color);
1251
+ return HSL_types(hsla);
1252
+ }
1253
+
1254
+ // HSL to normalized HSL
1255
+ if (colorType === 'hsl' || colorType === 'hsla') {
1256
+ const hsla = HSL_to_HSL(color);
1257
+ return HSL_types(hsla);
1258
+ }
1259
+
1260
+ // ! error
1261
+ console.error('[colorKit.HSL] An error occurred while attempting to convert the provided parameter into an `HSL` color. As a result, the default color "black" will be used instead.');
1262
+ return HSL_types({
1263
+ h: 0,
1264
+ s: 0,
1265
+ l: 0,
1266
+ a: 1
1267
+ });
1268
+ };
1269
+
1270
+ /** - Convert `HSL`, `HEX`, `HSV`, or `RGB` color to the `HWB` color format. */
1271
+ const HWB = color => {
1272
+ // named color
1273
+ if (typeof color === 'string') {
1274
+ color = color.trim().toLowerCase();
1275
+ if (NAMED_COLORS.hasOwnProperty(color)) {
1276
+ color = NAMED_COLORS[color];
1277
+ }
1278
+ }
1279
+ const colorType = detectColorFormat(color);
1280
+
1281
+ // HEX to HWB
1282
+ if (colorType?.includes('hex')) {
1283
+ const hwba = HEX_to_HWBA(color);
1284
+ return HWB_types(hwba);
1285
+ }
1286
+
1287
+ // RGB to HWB
1288
+ if (colorType === 'rgb' || colorType === 'rgba') {
1289
+ const hwba = RGB_to_HWBA(color);
1290
+ return HWB_types(hwba);
1291
+ }
1292
+
1293
+ // HSL to HWB
1294
+ if (colorType === 'hsl' || colorType === 'hsla') {
1295
+ const hwba = HSL_to_HWBA(color);
1296
+ return HWB_types(hwba);
1297
+ }
1298
+
1299
+ // HSV to HWB
1300
+ if (colorType === 'hsv' || colorType === 'hsva') {
1301
+ const hwba = HSV_to_HWBA(color);
1302
+ return HWB_types(hwba);
1303
+ }
1304
+
1305
+ // HWB to normalized HWB
1306
+ if (colorType === 'hwb' || colorType === 'hwba') {
1307
+ const hwba = HWB_to_HWB(color);
1308
+ return HWB_types(hwba);
1309
+ }
1310
+
1311
+ // ! error
1312
+ console.error('[colorKit.HWB] An error occurred while attempting to convert the provided parameter into an `HWB` color. As a result, the default color "black" will be used instead.');
1313
+ return HWB_types({
1314
+ h: 0,
1315
+ w: 0,
1316
+ b: 100,
1317
+ a: 1
1318
+ });
1319
+ };
1320
+
1321
+ /** - Convert `HSL`, `HEX`, `HWB`, or `RGB` color to the `HSV` color format. */
1322
+ const HSV = color => {
1323
+ // named color
1324
+ if (typeof color === 'string') {
1325
+ color = color.trim().toLowerCase();
1326
+ if (NAMED_COLORS.hasOwnProperty(color)) {
1327
+ color = NAMED_COLORS[color];
1328
+ }
1329
+ }
1330
+ const colorType = detectColorFormat(color);
1331
+
1332
+ // HEX to HSV
1333
+ if (colorType?.includes('hex')) {
1334
+ const hsva = HEX_to_HSVA(color);
1335
+ return HSV_types(hsva);
1336
+ }
1337
+
1338
+ // RGB to HSV
1339
+ if (colorType === 'rgb' || colorType === 'rgba') {
1340
+ const hsva = RGB_to_HSVA(color);
1341
+ return HSV_types(hsva);
1342
+ }
1343
+
1344
+ // HSL to HSV
1345
+ if (colorType === 'hsl' || colorType === 'hsla') {
1346
+ const hsva = HSL_to_HSVA(color);
1347
+ return HSV_types(hsva);
1348
+ }
1349
+
1350
+ // HWB to HSV
1351
+ if (colorType === 'hwb' || colorType === 'hwba') {
1352
+ const hsva = HWB_to_HSVA(color);
1353
+ return HSV_types(hsva);
1354
+ }
1355
+
1356
+ // HSV to normalized HSV
1357
+ if (colorType === 'hsv' || colorType === 'hsva') {
1358
+ const hsva = HSV_to_HSV(color);
1359
+ return HSV_types(hsva);
1360
+ }
1361
+
1362
+ // ! error
1363
+ console.error('[colorKit.HSV] An error occurred while attempting to convert the provided parameter into an `HSV` color. As a result, the default color "black" will be used instead.');
1364
+ return HSV_types({
1365
+ h: 0,
1366
+ s: 0,
1367
+ v: 0,
1368
+ a: 1
1369
+ });
1370
+ };
1371
+
1372
+ // * MARK: Color Information
1373
+
1374
+ /** - Identify the color format of a given `string` or `object`, and return `null` for invalid colors. */
1375
+ const getFormat = color => {
1376
+ // color int
1377
+ if (typeof color === 'number') {
1378
+ // eslint-disable-next-line no-bitwise
1379
+ if (color >>> 0 === color && color >= 0 && color <= 0xffffffff) return 'hex8';
1380
+ return null;
1381
+ }
1382
+
1383
+ // color string
1384
+ if (typeof color === 'string') {
1385
+ color = color.trim().toLowerCase();
1386
+ if (NAMED_COLORS.hasOwnProperty(color)) return 'named';
1387
+ for (const key in COLORS_REGEX) {
1388
+ const format = key;
1389
+ const entry = COLORS_REGEX[format];
1390
+ if (Array.isArray(entry)) {
1391
+ for (let i = 0; i < entry.length; i++) {
1392
+ const regex = entry[i];
1393
+ if (regex && regex.test(color)) return format;
1394
+ }
1395
+ continue;
1396
+ }
1397
+ if (entry.test(color)) return format;
1398
+ }
1399
+ }
1400
+
1401
+ // color object
1402
+ if (typeof color === 'object') {
1403
+ const rgbaKeys = ['r', 'g', 'b', 'a'];
1404
+ const isRgbaOb = rgbaKeys.every(k => color.hasOwnProperty(k) && typeof color[k] === 'number');
1405
+ if (isRgbaOb) return 'rgba';
1406
+ const rgbKeys = ['r', 'g', 'b'];
1407
+ const isRgbOb = rgbKeys.every(k => color.hasOwnProperty(k) && typeof color[k] === 'number');
1408
+ if (isRgbOb) return 'rgb';
1409
+ const hslaKeys = ['h', 's', 'l', 'a'];
1410
+ const isHslaOb = hslaKeys.every(k => color.hasOwnProperty(k) && typeof color[k] === 'number');
1411
+ if (isHslaOb) return 'hsla';
1412
+ const hslKeys = ['h', 's', 'l'];
1413
+ const isHslOb = hslKeys.every(k => color.hasOwnProperty(k) && typeof color[k] === 'number');
1414
+ if (isHslOb) return 'hsl';
1415
+ const hsvaKeys = ['h', 's', 'v', 'a'];
1416
+ const isHsvaOb = hsvaKeys.every(k => color.hasOwnProperty(k) && typeof color[k] === 'number');
1417
+ if (isHsvaOb) return 'hsva';
1418
+ const hsvKeys = ['h', 's', 'v'];
1419
+ const isHsvOb = hsvKeys.every(k => color.hasOwnProperty(k) && typeof color[k] === 'number');
1420
+ if (isHsvOb) return 'hsv';
1421
+ const hwbaKeys = ['h', 'w', 'b', 'a'];
1422
+ const isHwbaOb = hwbaKeys.every(k => color.hasOwnProperty(k) && typeof color[k] === 'number');
1423
+ if (isHwbaOb) return 'hwba';
1424
+ const hwbKeys = ['h', 'w', 'b'];
1425
+ const isHwbOb = hwbKeys.every(k => color.hasOwnProperty(k) && typeof color[k] === 'number');
1426
+ if (isHwbOb) return 'hwb';
1427
+ }
1428
+ return null;
1429
+ };
1430
+
1431
+ /** - Get the `red` channel value of a given color. */
1432
+ const getRed = color => {
1433
+ const {
1434
+ r
1435
+ } = RGB(color).object();
1436
+ return r;
1437
+ };
1438
+
1439
+ /** - Get the `green` channel value of a given color. */
1440
+ const getGreen = color => {
1441
+ const {
1442
+ g
1443
+ } = RGB(color).object();
1444
+ return g;
1445
+ };
1446
+
1447
+ /** - Get the `blue` channel value of a given color. */
1448
+ const getBlue = color => {
1449
+ const {
1450
+ b
1451
+ } = RGB(color).object();
1452
+ return b;
1453
+ };
1454
+
1455
+ /** - Get the `hue` channel value of a given color. */
1456
+ const getHue = color => {
1457
+ const {
1458
+ h
1459
+ } = HSL(color).object();
1460
+ return h;
1461
+ };
1462
+
1463
+ /** - Get the `saturation` value of a given color. */
1464
+ const getSaturation = color => {
1465
+ const {
1466
+ s
1467
+ } = HSL(color).object();
1468
+ return s;
1469
+ };
1470
+
1471
+ /**
1472
+ * - Get color's HSL `luminosity` channel value.
1473
+ * - If you want the overall `luminosity` of a color use `getLuminanceWCAG` method.
1474
+ */
1475
+ const getLuminance = color => {
1476
+ const {
1477
+ l
1478
+ } = HSL(color).object();
1479
+ return l;
1480
+ };
1481
+
1482
+ /** - Get the HSV's `value` (brightness) channel value of a given color. */
1483
+ const getBrightness = color => {
1484
+ const {
1485
+ v
1486
+ } = HSV(color).object();
1487
+ return v;
1488
+ };
1489
+
1490
+ /** - Returns the perceived `luminance` of a color, from `0-1` as defined by Web Content Accessibility Guidelines (Version 2.0). */
1491
+ const getLuminanceWCAG = color => {
1492
+ const {
1493
+ r,
1494
+ g,
1495
+ b
1496
+ } = RGB(color).object(false);
1497
+ const a = [r, g, b].map(v => v / 255 <= 0.03928 ? v / 255 / 12.92 : Math.pow((v / 255 + 0.055) / 1.055, 2.4));
1498
+ return (a[0] || 0) * 0.2126 + (a[1] || 0) * 0.7152 + (a[2] || 0) * 0.0722;
1499
+ };
1500
+
1501
+ /** - Returns a boolean indicating whether the color is considered "dark" or not */
1502
+ const isDark = color => {
1503
+ const luminance = getLuminanceWCAG(color);
1504
+ return luminance < 0.5;
1505
+ };
1506
+
1507
+ /** - Returns a boolean indicating whether the color is considered "light" or not */
1508
+ const isLight = color => {
1509
+ const luminance = getLuminanceWCAG(color);
1510
+ return luminance >= 0.5;
1511
+ };
1512
+
1513
+ /**
1514
+ * - Check if two colors are similar within a specified tolerance.
1515
+ *
1516
+ * @example
1517
+ * const tolerance = 0;
1518
+ * const isEqual = colorKit.areColorsEqual('#f00', 'red', tolerance); // true
1519
+ */
1520
+ const areColorsEqual = (color1, color2, tolerance = 0) => {
1521
+ const rgb1 = RGB(color1).object();
1522
+ const rgb2 = RGB(color2).object();
1523
+ const deltaR = rgb1.r - rgb2.r;
1524
+ const deltaG = rgb1.g - rgb2.g;
1525
+ const deltaB = rgb1.b - rgb2.b;
1526
+ const difference = Math.sqrt(deltaR * deltaR + deltaG * deltaG + deltaB * deltaB);
1527
+ return difference <= tolerance;
1528
+ };
1529
+
1530
+ /** - Calculates the contrast ratio between two colors, useful for ensuring accessibility and readability. */
1531
+ const contrastRatio = (color1, color2) => {
1532
+ const luminance1 = getLuminanceWCAG(color1);
1533
+ const luminance2 = getLuminanceWCAG(color2);
1534
+ const contrast = (Math.max(luminance1, luminance2) + 0.05) / (Math.min(luminance1, luminance2) + 0.05);
1535
+ return Math.round(contrast * 100) / 100;
1536
+ };
1537
+
1538
+ // * MARK: Color Manipulation
1539
+
1540
+ const returnColorObject = color => {
1541
+ return {
1542
+ hex() {
1543
+ return HEX(color);
1544
+ },
1545
+ rgb() {
1546
+ return RGB(color);
1547
+ },
1548
+ hsl() {
1549
+ return HSL(color);
1550
+ },
1551
+ hsv() {
1552
+ return HSV(color);
1553
+ },
1554
+ hwb() {
1555
+ return HWB(color);
1556
+ }
1557
+ };
1558
+ };
1559
+
1560
+ // * MARK: Red Manuipulation
1561
+ /** Set the `red` value of a color to a specific amount. */
1562
+ const setRed = (color, amount) => {
1563
+ const {
1564
+ g,
1565
+ b,
1566
+ a
1567
+ } = RGB(color).object();
1568
+ const newR = clampRGB(amount);
1569
+ const newColor = {
1570
+ r: newR,
1571
+ g,
1572
+ b,
1573
+ a
1574
+ };
1575
+ return returnColorObject(newColor);
1576
+ };
1577
+
1578
+ /**
1579
+ * Increase the `red` value of a color by the given percentage/amount.
1580
+ *
1581
+ * @example
1582
+ * increaseRed('rgb(100, 100, 100)', 20).hex();
1583
+ * increaseRed('rgb(100, 100, 100)', '20%').rgb().string();
1584
+ */
1585
+ const increaseRed = (color, amount) => {
1586
+ const {
1587
+ r,
1588
+ g,
1589
+ b,
1590
+ a
1591
+ } = RGB(color).object();
1592
+ const red = typeof amount === 'string' ? r + r * (parseFloat(amount) / 100) : r + amount;
1593
+ const newR = clampRGB(red);
1594
+ const newColor = {
1595
+ r: newR,
1596
+ g,
1597
+ b,
1598
+ a
1599
+ };
1600
+ return returnColorObject(newColor);
1601
+ };
1602
+
1603
+ /**
1604
+ * Decrease the `red` value of a color by the given percentage/amount
1605
+ *
1606
+ * @example
1607
+ * decreaseRed('rgb(100, 100, 100)', 20).hex();
1608
+ * decreaseRed('rgb(100, 100, 100)', '20%').rgb().string();
1609
+ */
1610
+ const decreaseRed = (color, amount) => {
1611
+ const {
1612
+ r,
1613
+ g,
1614
+ b,
1615
+ a
1616
+ } = RGB(color).object();
1617
+ const red = typeof amount === 'string' ? r - r * (parseFloat(amount) / 100) : r - amount;
1618
+ const newR = clampRGB(red);
1619
+ const newColor = {
1620
+ r: newR,
1621
+ g,
1622
+ b,
1623
+ a
1624
+ };
1625
+ return returnColorObject(newColor);
1626
+ };
1627
+
1628
+ // * MARK: Green Manuipulation
1629
+ /** - Set the `green` value of a color to a specific amount. */
1630
+ const setGreen = (color, amount) => {
1631
+ const {
1632
+ r,
1633
+ b,
1634
+ a
1635
+ } = RGB(color).object();
1636
+ const newG = clampRGB(amount);
1637
+ const newColor = {
1638
+ r,
1639
+ g: newG,
1640
+ b,
1641
+ a
1642
+ };
1643
+ return returnColorObject(newColor);
1644
+ };
1645
+
1646
+ /**
1647
+ * Increase the `green` value of a color by the given percentage.
1648
+ *
1649
+ * @example
1650
+ * increaseGreen('rgb(100, 100, 100)', 20).hex();
1651
+ * increaseGreen('rgb(100, 100, 100)', '20%').rgb().string();
1652
+ */
1653
+ const increaseGreen = (color, amount) => {
1654
+ const {
1655
+ r,
1656
+ g,
1657
+ b,
1658
+ a
1659
+ } = RGB(color).object();
1660
+ const green = typeof amount === 'string' ? g + g * (parseFloat(amount) / 100) : g + amount;
1661
+ const newG = clampRGB(green);
1662
+ const newColor = {
1663
+ r,
1664
+ g: newG,
1665
+ b,
1666
+ a
1667
+ };
1668
+ return returnColorObject(newColor);
1669
+ };
1670
+
1671
+ /**
1672
+ * Decrease the `green` value of a color by the given percentage.
1673
+ *
1674
+ * @example
1675
+ * decreaseGreen('rgb(100, 100, 100)', 20).hex();
1676
+ * decreaseGreen('rgb(100, 100, 100)', '20%').rgb().string();
1677
+ */
1678
+ const decreaseGreen = (color, amount) => {
1679
+ const {
1680
+ r,
1681
+ g,
1682
+ b,
1683
+ a
1684
+ } = RGB(color).object();
1685
+ const green = typeof amount === 'string' ? g - g * (parseFloat(amount) / 100) : g - amount;
1686
+ const newG = clampRGB(green);
1687
+ const newColor = {
1688
+ r,
1689
+ g: newG,
1690
+ b,
1691
+ a
1692
+ };
1693
+ return returnColorObject(newColor);
1694
+ };
1695
+
1696
+ // * MARK: Blue Manuipulation
1697
+ /** - Set the `blue` value of a color to a specific amount. */
1698
+ const setBlue = (color, amount) => {
1699
+ const {
1700
+ r,
1701
+ g,
1702
+ a
1703
+ } = RGB(color).object();
1704
+ const newB = clampRGB(amount);
1705
+ const newColor = {
1706
+ r,
1707
+ g,
1708
+ b: newB,
1709
+ a
1710
+ };
1711
+ return returnColorObject(newColor);
1712
+ };
1713
+
1714
+ /**
1715
+ * Increase the `blue` value of a color by the given percentage.
1716
+ *
1717
+ * @example
1718
+ * increaseBlue('rgb(100, 100, 100)', 20).hex();
1719
+ * increaseBlue('rgb(100, 100, 100)', '20%').rgb().string();
1720
+ */
1721
+ const increaseBlue = (color, amount) => {
1722
+ const {
1723
+ r,
1724
+ g,
1725
+ b,
1726
+ a
1727
+ } = RGB(color).object();
1728
+ const blue = typeof amount === 'string' ? b + b * (parseFloat(amount) / 100) : b + amount;
1729
+ const newB = clampRGB(blue);
1730
+ const newColor = {
1731
+ r,
1732
+ g,
1733
+ b: newB,
1734
+ a
1735
+ };
1736
+ return returnColorObject(newColor);
1737
+ };
1738
+
1739
+ /**
1740
+ * Decrease the `blue` value of a color by the given percentage.
1741
+ *
1742
+ * @example
1743
+ * decreaseBlue('rgb(100, 100, 100)', 20).hex();
1744
+ * decreaseBlue('rgb(100, 100, 100)', '20%').rgb().string();
1745
+ */
1746
+ const decreaseBlue = (color, amount) => {
1747
+ const {
1748
+ r,
1749
+ g,
1750
+ b,
1751
+ a
1752
+ } = RGB(color).object();
1753
+ const blue = typeof amount === 'string' ? b - b * (parseFloat(amount) / 100) : b - amount;
1754
+ const newB = clampRGB(blue);
1755
+ const newColor = {
1756
+ r,
1757
+ g,
1758
+ b: newB,
1759
+ a
1760
+ };
1761
+ return returnColorObject(newColor);
1762
+ };
1763
+
1764
+ //* MARK: Alpha Manuipulation
1765
+ /** - Get the `alpha` value of a given color. */
1766
+ const getAlpha = color => {
1767
+ const {
1768
+ a
1769
+ } = RGB(color).object();
1770
+ return a;
1771
+ };
1772
+
1773
+ /** - Set the `alpha` value of a color to a specific amount. */
1774
+ const setAlpha = (color, amount) => {
1775
+ const {
1776
+ r,
1777
+ g,
1778
+ b
1779
+ } = RGB(color).object();
1780
+ const newA = clampAlpha(amount);
1781
+ const newColor = {
1782
+ r,
1783
+ g,
1784
+ b,
1785
+ a: newA
1786
+ };
1787
+ return returnColorObject(newColor);
1788
+ };
1789
+
1790
+ /** Increase the `alpha` value of a color by the given percentage. */
1791
+ const increaseAlpha = (color, amount) => {
1792
+ const {
1793
+ r,
1794
+ g,
1795
+ b,
1796
+ a
1797
+ } = RGB(color).object();
1798
+ const alpha = typeof amount === 'string' ? a + a * (parseFloat(amount) / 100) : a + amount;
1799
+ const newA = clampAlpha(alpha);
1800
+ const newColor = {
1801
+ r,
1802
+ g,
1803
+ b,
1804
+ a: newA
1805
+ };
1806
+ return returnColorObject(newColor);
1807
+ };
1808
+
1809
+ /** Decrease the `alpha` value of a color by the given percentage. */
1810
+ const decreaseAlpha = (color, amount) => {
1811
+ const {
1812
+ r,
1813
+ g,
1814
+ b,
1815
+ a
1816
+ } = RGB(color).object();
1817
+ const alpha = typeof amount === 'string' ? a - a * (parseFloat(amount) / 100) : a - amount;
1818
+ const newA = clampAlpha(alpha);
1819
+ const newColor = {
1820
+ r,
1821
+ g,
1822
+ b,
1823
+ a: newA
1824
+ };
1825
+ return returnColorObject(newColor);
1826
+ };
1827
+
1828
+ // * MARK: Hue Manuipulation
1829
+ /** - Set the `hue` value of a color to a specific amount. */
1830
+ const setHue = (color, amount) => {
1831
+ const {
1832
+ s,
1833
+ l,
1834
+ a
1835
+ } = HSL(color).object();
1836
+ const newH = clampHue(amount);
1837
+ const newColor = {
1838
+ h: newH,
1839
+ s,
1840
+ l,
1841
+ a
1842
+ };
1843
+ return returnColorObject(newColor);
1844
+ };
1845
+
1846
+ /**
1847
+ * Increase the `hue` value of a color by the given percentage/amount.
1848
+ *
1849
+ * @example
1850
+ * increaseHue('rgb(100, 100, 100)', 20).hex();
1851
+ * increaseHue('rgb(100, 100, 100)', '20%').rgb().string();
1852
+ */
1853
+ const increaseHue = (color, amount) => {
1854
+ const {
1855
+ h,
1856
+ s,
1857
+ l,
1858
+ a
1859
+ } = HSL(color).object();
1860
+ const hue = typeof amount === 'string' ? h + h * (parseFloat(amount) / 100) : h + amount;
1861
+ const newH = clampHue(hue);
1862
+ const newColor = {
1863
+ h: newH,
1864
+ s,
1865
+ l,
1866
+ a
1867
+ };
1868
+ return returnColorObject(newColor);
1869
+ };
1870
+
1871
+ /**
1872
+ * Decrease the `hue` value of a color by the given percentage/amount.
1873
+ *
1874
+ * @example
1875
+ * decreaseHue('rgb(100, 100, 100)', 20).hex();
1876
+ * decreaseHue('rgb(100, 100, 100)', '20%').rgb().string();
1877
+ */
1878
+ const decreaseHue = (color, amount) => {
1879
+ const {
1880
+ h,
1881
+ s,
1882
+ l,
1883
+ a
1884
+ } = HSL(color).object();
1885
+ const hue = typeof amount === 'string' ? h - h * (parseFloat(amount) / 100) : h - amount;
1886
+ const newH = clampHue(hue);
1887
+ const newColor = {
1888
+ h: newH,
1889
+ s,
1890
+ l,
1891
+ a
1892
+ };
1893
+ return returnColorObject(newColor);
1894
+ };
1895
+
1896
+ /**
1897
+ * - Spin the `hue` channel by a certain percentage/amount.
1898
+ *
1899
+ * @example
1900
+ * spin('red', 20).hex();
1901
+ * spin('rgb(255, 0, 0)', '20%').rgb().string();
1902
+ */
1903
+ const spin = (color, degree) => {
1904
+ const {
1905
+ h,
1906
+ s,
1907
+ l,
1908
+ a
1909
+ } = HSL(color).object();
1910
+ const spinDegree = typeof degree === 'string' ? s * (parseFloat(degree) / 100) : degree;
1911
+ const newColor = {
1912
+ h: Math.round((h + spinDegree) % 360),
1913
+ s,
1914
+ l,
1915
+ a
1916
+ };
1917
+ return returnColorObject(newColor);
1918
+ };
1919
+
1920
+ // * MARK: Saturation Manuipulation
1921
+ /** - Set the `saturation` value of a color to a specific amount. */
1922
+ const setSaturation = (color, amount) => {
1923
+ const {
1924
+ h,
1925
+ l,
1926
+ a
1927
+ } = HSL(color).object();
1928
+ const newS = clamp100(amount);
1929
+ const saturatedColor = {
1930
+ h,
1931
+ s: newS,
1932
+ l,
1933
+ a
1934
+ };
1935
+ return returnColorObject(saturatedColor);
1936
+ };
1937
+
1938
+ /**
1939
+ * - Increase the saturation of the given color by a certain percentage/amount.
1940
+ *
1941
+ * @example
1942
+ * saturate('red', 20).hex();
1943
+ * saturate('rgb(255, 0, 0)', '20%').rgb().string();
1944
+ */
1945
+ const saturate = (color, amount) => {
1946
+ const {
1947
+ h,
1948
+ s,
1949
+ l,
1950
+ a
1951
+ } = HSL(color).object();
1952
+ const saturation = typeof amount === 'string' ? s + s * (parseFloat(amount) / 100) : s + amount;
1953
+ const newS = clamp100(saturation);
1954
+ const saturatedColor = {
1955
+ h,
1956
+ s: newS,
1957
+ l,
1958
+ a
1959
+ };
1960
+ return returnColorObject(saturatedColor);
1961
+ };
1962
+
1963
+ /**
1964
+ * - Decrease the saturation of the given color by a certain percentage/amount.
1965
+ *
1966
+ * @example
1967
+ * saturate('red', 20).hex();
1968
+ * saturate('rgb(255, 0, 0)', '20%').rgb().string();
1969
+ */
1970
+ const desaturate = (color, amount) => {
1971
+ const {
1972
+ h,
1973
+ s,
1974
+ l,
1975
+ a
1976
+ } = HSL(color).object();
1977
+ const saturation = typeof amount === 'string' ? s - s * (parseFloat(amount) / 100) : s - amount;
1978
+ const newS = clamp100(saturation);
1979
+ const desaturatedColor = {
1980
+ h,
1981
+ s: newS,
1982
+ l,
1983
+ a
1984
+ };
1985
+ return returnColorObject(desaturatedColor);
1986
+ };
1987
+
1988
+ // * MARK: Brightness Manuipulation
1989
+ /** - Set HSL's `luminosity` channel for a given color to a specific amount. */
1990
+ const setLuminance = (color, amount) => {
1991
+ const {
1992
+ h,
1993
+ s,
1994
+ a
1995
+ } = HSL(color).object();
1996
+ const newL = clamp100(amount);
1997
+ const newColor = {
1998
+ h,
1999
+ s,
2000
+ l: newL,
2001
+ a
2002
+ };
2003
+ return returnColorObject(newColor);
2004
+ };
2005
+
2006
+ /**
2007
+ * - Increase the brightness of the given color by a certain percentage/amount.
2008
+ *
2009
+ * @example
2010
+ * brighten('red', 20).hex();
2011
+ * brighten('rgb(255, 0, 0)', '20%').rgb().string();
2012
+ */
2013
+ const brighten = (color, amount) => {
2014
+ const {
2015
+ h,
2016
+ s,
2017
+ l,
2018
+ a
2019
+ } = HSL(color).object();
2020
+ const lum = typeof amount === 'string' ? l + l * (parseFloat(amount) / 100) : l + amount;
2021
+ const newL = clamp100(lum);
2022
+ const brightenedColor = {
2023
+ h,
2024
+ s,
2025
+ l: newL,
2026
+ a
2027
+ };
2028
+ return returnColorObject(brightenedColor);
2029
+ };
2030
+
2031
+ /**
2032
+ * - Decrease the brightness of the given color by a certain percentage/amount.
2033
+ *
2034
+ * @example
2035
+ * darken('red', 20).hex();
2036
+ * darken('rgb(255, 0, 0)', '20%').rgb().string();
2037
+ */
2038
+ const darken = (color, amount) => {
2039
+ const {
2040
+ h,
2041
+ s,
2042
+ l,
2043
+ a
2044
+ } = HSL(color).object();
2045
+ const lum = typeof amount === 'string' ? l - l * (parseFloat(amount) / 100) : l - amount;
2046
+ const newL = clamp100(lum);
2047
+ const darkenedColor = {
2048
+ h,
2049
+ s,
2050
+ l: newL,
2051
+ a
2052
+ };
2053
+ return returnColorObject(darkenedColor);
2054
+ };
2055
+
2056
+ /** - Set HSV's `value` (brightness) channel for a given color to a specific amount. */
2057
+ const setBrightness = (color, amount) => {
2058
+ const {
2059
+ h,
2060
+ s,
2061
+ a
2062
+ } = HSV(color).object();
2063
+ const newV = clamp100(amount);
2064
+ const newColor = {
2065
+ h,
2066
+ s,
2067
+ v: newV,
2068
+ a
2069
+ };
2070
+ return returnColorObject(newColor);
2071
+ };
2072
+
2073
+ /** Increase HSV's `value` (brightness) channel value of a color by the given percentage/amount. */
2074
+ const increaseBrightness = (color, amount) => {
2075
+ const {
2076
+ h,
2077
+ s,
2078
+ v,
2079
+ a
2080
+ } = HSV(color).object();
2081
+ const value = typeof amount === 'string' ? v + v * (parseFloat(amount) / 100) : v + amount;
2082
+ const newV = clamp100(value);
2083
+ const newColor = {
2084
+ h,
2085
+ s,
2086
+ v: newV,
2087
+ a
2088
+ };
2089
+ return returnColorObject(newColor);
2090
+ };
2091
+
2092
+ /** Decrease HSV's `value` (brightness) channel value of a color by the given percentage/amount. */
2093
+ const decreaseBrightness = (color, amount) => {
2094
+ const {
2095
+ h,
2096
+ s,
2097
+ v,
2098
+ a
2099
+ } = HSV(color).object();
2100
+ const value = typeof amount === 'string' ? v - v * (parseFloat(amount) / 100) : v - amount;
2101
+ const newV = clamp100(value);
2102
+ const newColor = {
2103
+ h,
2104
+ s,
2105
+ v: newV,
2106
+ a
2107
+ };
2108
+ return returnColorObject(newColor);
2109
+ };
2110
+
2111
+ // * MARK: Color Utilities
2112
+
2113
+ /**
2114
+ * - Blends two colors by a certain amount.
2115
+ *
2116
+ * @example
2117
+ * blend('yellow', 'red', 50).hex(); // #ff8000
2118
+ */
2119
+ const blend = (color1, color2, percentage) => {
2120
+ percentage = percentage / 100;
2121
+ const rgba1 = RGB(color1).object();
2122
+ const rgba2 = RGB(color2).object();
2123
+ const r = clampRGB(rgba1.r * (1 - percentage) + rgba2.r * percentage),
2124
+ g = clampRGB(rgba1.g * (1 - percentage) + rgba2.g * percentage),
2125
+ b = clampRGB(rgba1.b * (1 - percentage) + rgba2.b * percentage),
2126
+ a = clampAlpha(rgba1.a * (1 - percentage) + rgba2.a * percentage);
2127
+ const blendedColor = {
2128
+ r,
2129
+ g,
2130
+ b,
2131
+ a
2132
+ };
2133
+ return returnColorObject(blendedColor);
2134
+ };
2135
+
2136
+ /** - Invert (negate) a color, black becomes white, white becomes black, blue becomes orange and so on. */
2137
+ const invert = color => {
2138
+ const {
2139
+ r,
2140
+ g,
2141
+ b,
2142
+ a
2143
+ } = RGB(color).object();
2144
+ const invertedColor = {
2145
+ r: 255 - r,
2146
+ g: 255 - g,
2147
+ b: 255 - b,
2148
+ a
2149
+ };
2150
+ return returnColorObject(invertedColor);
2151
+ };
2152
+
2153
+ /** - Completely desaturate a color into grayscale. */
2154
+ const grayscale = color => {
2155
+ const {
2156
+ r,
2157
+ g,
2158
+ b,
2159
+ a
2160
+ } = RGB(color).object();
2161
+ const gray = clampRGB(r * 0.3 + g * 0.59 + b * 0.11);
2162
+ const grayColor = {
2163
+ r: gray,
2164
+ g: gray,
2165
+ b: gray,
2166
+ a
2167
+ };
2168
+ return returnColorObject(grayColor);
2169
+ };
2170
+
2171
+ /** - Generate a random color from `HSL` values. */
2172
+ const randomHslColor = ({
2173
+ h = [0, 360],
2174
+ s = [0, 100],
2175
+ l = [0, 100],
2176
+ a = [1, 1]
2177
+ } = {}) => {
2178
+ const random = {
2179
+ h: clampHue(randomNumber(h[0] ?? 0, h[1] ?? 360)),
2180
+ s: clamp100(randomNumber(s[0] ?? 0, s[1] ?? 100)),
2181
+ l: clamp100(randomNumber(l[0] ?? 0, l[1] ?? 100)),
2182
+ a: clampAlpha(randomNumber(a[0] ?? 1, a[1] ?? 1))
2183
+ };
2184
+ return returnColorObject(random);
2185
+ };
2186
+
2187
+ /** - Generate a random color from `HSV` values. */
2188
+ const randomHsvColor = ({
2189
+ h = [0, 360],
2190
+ s = [0, 100],
2191
+ v = [0, 100],
2192
+ a = [1, 1]
2193
+ } = {}) => {
2194
+ const random = {
2195
+ h: clampHue(randomNumber(h[0] ?? 0, h[1] ?? 360)),
2196
+ s: clamp100(randomNumber(s[0] ?? 0, s[1] ?? 100)),
2197
+ v: clamp100(randomNumber(v[0] ?? 0, v[1] ?? 100)),
2198
+ a: clampAlpha(randomNumber(a[0] ?? 1, a[1] ?? 1))
2199
+ };
2200
+ return returnColorObject(random);
2201
+ };
2202
+
2203
+ /** - Generate a random color from `RGB` values. */
2204
+ const randomRgbColor = ({
2205
+ r = [0, 255],
2206
+ g = [0, 255],
2207
+ b = [0, 255],
2208
+ a = [1, 1]
2209
+ } = {}) => {
2210
+ const random = {
2211
+ r: clampRGB(randomNumber(r[0] ?? 0, r[1] ?? 255)),
2212
+ g: clampRGB(randomNumber(g[0] ?? 0, g[1] ?? 255)),
2213
+ b: clampRGB(randomNumber(b[0] ?? 0, b[1] ?? 255)),
2214
+ a: clampAlpha(randomNumber(a[0] ?? 1, a[1] ?? 1))
2215
+ };
2216
+ return returnColorObject(random);
2217
+ };
2218
+
2219
+ /** - Generate a random color from `HWB` values. */
2220
+ const randomHwbColor = ({
2221
+ h = [0, 360],
2222
+ w = [0, 100],
2223
+ b = [0, 100],
2224
+ a = [1, 1]
2225
+ } = {}) => {
2226
+ const random = {
2227
+ h: clampHue(randomNumber(h[0] ?? 0, h[1] ?? 360)),
2228
+ w: clamp100(randomNumber(w[0] ?? 0, w[1] ?? 100)),
2229
+ b: clamp100(randomNumber(b[0] ?? 0, b[1] ?? 100)),
2230
+ a: clampAlpha(randomNumber(a[0] ?? 1, a[1] ?? 1))
2231
+ };
2232
+ return returnColorObject(random);
2233
+ };
2234
+
2235
+ /** - Returns the first color with the desired contrast ratio against the second color */
2236
+ const adjustContrast = (color1, color2, ratio = 4.5) => {
2237
+ const contrast = contrastRatio(color1, color2);
2238
+ const color1RGB = RGB(color1).object();
2239
+ const channels = ['r', 'g', 'b'];
2240
+ function adjustLuminance(colorRGB, by) {
2241
+ const r = clampRGB(colorRGB.r + by);
2242
+ const g = clampRGB(colorRGB.g + by);
2243
+ const b = clampRGB(colorRGB.b + by);
2244
+ return {
2245
+ r,
2246
+ g,
2247
+ b,
2248
+ a: colorRGB.a
2249
+ };
2250
+ }
2251
+ let newColor = color1RGB;
2252
+
2253
+ //* increase contrast
2254
+ if (ratio && contrast < ratio) {
2255
+ while (contrastRatio(newColor, color2) < ratio) {
2256
+ const adjustBy = isDark(color2) ? 1 : -1; // increase or decrease relative to the background color
2257
+ newColor = adjustLuminance(newColor, adjustBy);
2258
+
2259
+ // break if the color reached the limit
2260
+ if (channels.every(e => newColor[e] === 0)) break;
2261
+ if (channels.every(e => newColor[e] === 255)) break;
2262
+ }
2263
+ //* decrease contrast
2264
+ } else if (ratio && contrast > ratio) {
2265
+ while (contrastRatio(newColor, color2) > ratio) {
2266
+ const adjustBy = !isDark(color2) ? 1 : -1; // increase or decrease relative to the background color
2267
+ newColor = adjustLuminance(newColor, adjustBy);
2268
+
2269
+ // break if the color reached the limit
2270
+ if (channels.every(e => newColor[e] === 0)) break;
2271
+ if (channels.every(e => newColor[e] === 255)) break;
2272
+ }
2273
+ }
2274
+ return returnColorObject(newColor);
2275
+ };
2276
+ return {
2277
+ // color conversion
2278
+ HEX,
2279
+ RGB,
2280
+ HSL,
2281
+ HWB,
2282
+ HSV,
2283
+ // color information
2284
+ getFormat,
2285
+ getRed,
2286
+ getGreen,
2287
+ getBlue,
2288
+ getHue,
2289
+ getSaturation,
2290
+ getBrightness,
2291
+ getLuminance,
2292
+ getLuminanceWCAG,
2293
+ isDark,
2294
+ isLight,
2295
+ areColorsEqual,
2296
+ contrastRatio,
2297
+ // color manipulation
2298
+ setRed,
2299
+ increaseRed,
2300
+ decreaseRed,
2301
+ setGreen,
2302
+ increaseGreen,
2303
+ decreaseGreen,
2304
+ setBlue,
2305
+ increaseBlue,
2306
+ decreaseBlue,
2307
+ getAlpha,
2308
+ setAlpha,
2309
+ increaseAlpha,
2310
+ decreaseAlpha,
2311
+ setHue,
2312
+ increaseHue,
2313
+ decreaseHue,
2314
+ spin,
2315
+ setSaturation,
2316
+ saturate,
2317
+ desaturate,
2318
+ setLuminance,
2319
+ brighten,
2320
+ darken,
2321
+ setBrightness,
2322
+ increaseBrightness,
2323
+ decreaseBrightness,
2324
+ // color utilities
2325
+ blend,
2326
+ invert,
2327
+ grayscale,
2328
+ randomHslColor,
2329
+ randomHsvColor,
2330
+ randomRgbColor,
2331
+ randomHwbColor,
2332
+ adjustContrast
2333
+ };
2334
+ };
2335
+ const colorKit = colorKitUI();
2336
+ colorKit.runOnUI = colorKitUI;
2337
+ export default colorKit;
2338
+ //# sourceMappingURL=index.js.map