@youcan/celeste 0.21.2 → 0.22.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 (542) hide show
  1. package/ai/README.md +1 -1
  2. package/ai/component-registry.json +2 -2
  3. package/ai/icons.json +2 -2
  4. package/ai/tokens.json +2 -2
  5. package/dist/celeste.css +3069 -3065
  6. package/dist/cjs/chunks/alert.cjs +4 -2
  7. package/dist/cjs/chunks/badge.cjs +4 -2
  8. package/dist/cjs/chunks/bar-chart.cjs +17 -10016
  9. package/dist/cjs/chunks/button.cjs +7 -5
  10. package/dist/cjs/chunks/calendar.cjs +20 -796
  11. package/dist/cjs/chunks/chart-card.cjs +4 -2
  12. package/dist/cjs/chunks/chart-legend.cjs +4 -2
  13. package/dist/cjs/chunks/chart-plot.cjs +4 -2
  14. package/dist/cjs/chunks/checkbox-card.cjs +11 -10
  15. package/dist/cjs/chunks/checkbox-label.cjs +12 -11
  16. package/dist/cjs/chunks/checkbox.cjs +7 -227
  17. package/dist/cjs/chunks/collapsible-content.cjs +5 -105
  18. package/dist/cjs/chunks/collapsible-trigger.cjs +2 -50
  19. package/dist/cjs/chunks/collapsible.cjs +3 -4
  20. package/dist/cjs/chunks/color-picker.cjs +21 -19
  21. package/dist/cjs/chunks/color-swatch.cjs +5 -3
  22. package/dist/cjs/chunks/combobox-anchor.cjs +6 -44
  23. package/dist/cjs/chunks/combobox-empty.cjs +5 -30
  24. package/dist/cjs/chunks/combobox-group.cjs +6 -5
  25. package/dist/cjs/chunks/combobox-input.cjs +6 -4
  26. package/dist/cjs/chunks/combobox-item.cjs +10 -66
  27. package/dist/cjs/chunks/combobox-list.cjs +8 -95
  28. package/dist/cjs/chunks/combobox-root.cjs +4 -6
  29. package/dist/cjs/chunks/combobox-separator.cjs +5 -3
  30. package/dist/cjs/chunks/combobox-trigger.cjs +7 -64
  31. package/dist/cjs/chunks/combobox.cjs +5 -5
  32. package/dist/cjs/chunks/compact-button.cjs +6 -4
  33. package/dist/cjs/chunks/components.cjs +55 -54
  34. package/dist/cjs/chunks/content-divider.cjs +6 -88
  35. package/dist/cjs/chunks/counter-input.cjs +10 -939
  36. package/dist/cjs/chunks/date-picker.cjs +5 -3
  37. package/dist/cjs/chunks/dialog-body.cjs +4 -2
  38. package/dist/cjs/chunks/dialog-content.cjs +1 -1
  39. package/dist/cjs/chunks/dialog-description.cjs +5 -4
  40. package/dist/cjs/chunks/dialog-footer.cjs +4 -2
  41. package/dist/cjs/chunks/dialog-title.cjs +5 -4
  42. package/dist/cjs/chunks/dialog-trigger.cjs +1 -1
  43. package/dist/cjs/chunks/dialog.cjs +3 -3
  44. package/dist/cjs/chunks/digit-input-group.cjs +8 -7
  45. package/dist/cjs/chunks/digit-input-slot.cjs +8 -265
  46. package/dist/cjs/chunks/digit-input.cjs +9 -8
  47. package/dist/cjs/chunks/drawer-body.cjs +7 -38
  48. package/dist/cjs/chunks/drawer-close.cjs +2 -2
  49. package/dist/cjs/chunks/drawer-content.cjs +9 -1148
  50. package/dist/cjs/chunks/drawer-description.cjs +7 -5
  51. package/dist/cjs/chunks/drawer-footer.cjs +4 -2
  52. package/dist/cjs/chunks/drawer-header.cjs +6 -4
  53. package/dist/cjs/chunks/drawer-title.cjs +7 -5
  54. package/dist/cjs/chunks/drawer-trigger.cjs +2 -50
  55. package/dist/cjs/chunks/drawer.cjs +4 -5
  56. package/dist/cjs/chunks/dropdown-menu-content.cjs +8 -535
  57. package/dist/cjs/chunks/dropdown-menu-group.cjs +2 -28
  58. package/dist/cjs/chunks/dropdown-menu-item.cjs +6 -124
  59. package/dist/cjs/chunks/dropdown-menu-label.cjs +6 -58
  60. package/dist/cjs/chunks/dropdown-menu-separator.cjs +5 -56
  61. package/dist/cjs/chunks/dropdown-menu-sub-content.cjs +7 -287
  62. package/dist/cjs/chunks/dropdown-menu-sub-trigger.cjs +6 -191
  63. package/dist/cjs/chunks/dropdown-menu-sub.cjs +3 -39
  64. package/dist/cjs/chunks/dropdown-menu-trigger.cjs +3 -89
  65. package/dist/cjs/chunks/dropdown-menu.cjs +8 -8
  66. package/dist/cjs/chunks/extra-settings.cjs +3 -3
  67. package/dist/cjs/chunks/fancy-button.cjs +7 -5
  68. package/dist/cjs/chunks/file-upload-area.cjs +6 -4
  69. package/dist/cjs/chunks/gradient-picker.cjs +8 -6
  70. package/dist/cjs/chunks/hint-text.cjs +4 -2
  71. package/dist/cjs/chunks/{label2.cjs → label.cjs} +7 -6
  72. package/dist/cjs/chunks/link-bubble.cjs +3 -3
  73. package/dist/cjs/chunks/link-button.cjs +7 -5
  74. package/dist/cjs/chunks/mochi.cjs +4 -2
  75. package/dist/cjs/chunks/modal-body.cjs +4 -2
  76. package/dist/cjs/chunks/modal-close.cjs +2 -2
  77. package/dist/cjs/chunks/modal-content.cjs +9 -9
  78. package/dist/cjs/chunks/modal-footer.cjs +4 -2
  79. package/dist/cjs/chunks/modal-header.cjs +8 -8
  80. package/dist/cjs/chunks/modal-trigger.cjs +2 -2
  81. package/dist/cjs/chunks/modal.cjs +3 -4
  82. package/dist/cjs/chunks/pagination-content.cjs +5 -87
  83. package/dist/cjs/chunks/pagination-ellipsis.cjs +6 -32
  84. package/dist/cjs/chunks/pagination-first.cjs +7 -42
  85. package/dist/cjs/chunks/pagination-item.cjs +6 -54
  86. package/dist/cjs/chunks/pagination-last.cjs +7 -42
  87. package/dist/cjs/chunks/pagination-next.cjs +7 -42
  88. package/dist/cjs/chunks/pagination-previous.cjs +7 -42
  89. package/dist/cjs/chunks/pagination.cjs +7 -8
  90. package/dist/cjs/chunks/popover-content.cjs +10 -705
  91. package/dist/cjs/chunks/popover-trigger.cjs +2 -61
  92. package/dist/cjs/chunks/popover.cjs +3 -4
  93. package/dist/cjs/chunks/progress-bar.cjs +6 -4
  94. package/dist/cjs/chunks/progress-circle.cjs +7 -5
  95. package/dist/cjs/chunks/radio-group-card.cjs +11 -10
  96. package/dist/cjs/chunks/radio-group-item.cjs +7 -302
  97. package/dist/cjs/chunks/radio-group-label.cjs +12 -11
  98. package/dist/cjs/chunks/radio-group.cjs +6 -5
  99. package/dist/cjs/chunks/range-calendar.cjs +21 -1031
  100. package/dist/cjs/chunks/range-picker.cjs +9 -7
  101. package/dist/cjs/chunks/rich-editor.cjs +21 -5863
  102. package/dist/cjs/chunks/rolldown-runtime.cjs +0 -14
  103. package/dist/cjs/chunks/scroll-area.cjs +9 -142
  104. package/dist/cjs/chunks/scroll-bar.cjs +6 -901
  105. package/dist/cjs/chunks/segmented-control-item.cjs +6 -163
  106. package/dist/cjs/chunks/segmented-control.cjs +7 -6
  107. package/dist/cjs/chunks/select-content.cjs +9 -311
  108. package/dist/cjs/chunks/select-group.cjs +2 -2
  109. package/dist/cjs/chunks/select-icon.cjs +4 -2
  110. package/dist/cjs/chunks/select-item.cjs +7 -227
  111. package/dist/cjs/chunks/select-label.cjs +5 -34
  112. package/dist/cjs/chunks/select-separator.cjs +5 -27
  113. package/dist/cjs/chunks/select-trigger.cjs +6 -163
  114. package/dist/cjs/chunks/select-value.cjs +5 -64
  115. package/dist/cjs/chunks/select.cjs +8 -8
  116. package/dist/cjs/chunks/sheet-close.cjs +5 -3
  117. package/dist/cjs/chunks/sheet-content.cjs +10 -10
  118. package/dist/cjs/chunks/sheet-description.cjs +7 -5
  119. package/dist/cjs/chunks/sheet-footer.cjs +4 -2
  120. package/dist/cjs/chunks/sheet-header.cjs +4 -2
  121. package/dist/cjs/chunks/sheet-title.cjs +7 -5
  122. package/dist/cjs/chunks/sheet-trigger.cjs +2 -2
  123. package/dist/cjs/chunks/sheet.cjs +3 -4
  124. package/dist/cjs/chunks/sidebar-content.cjs +4 -2
  125. package/dist/cjs/chunks/sidebar-element.cjs +6 -4
  126. package/dist/cjs/chunks/sidebar-footer.cjs +4 -2
  127. package/dist/cjs/chunks/sidebar-group-content.cjs +4 -2
  128. package/dist/cjs/chunks/sidebar-group-label.cjs +6 -4
  129. package/dist/cjs/chunks/sidebar-group.cjs +4 -2
  130. package/dist/cjs/chunks/sidebar-header.cjs +4 -2
  131. package/dist/cjs/chunks/sidebar-menu-action.cjs +6 -4
  132. package/dist/cjs/chunks/sidebar-menu-badge.cjs +4 -2
  133. package/dist/cjs/chunks/sidebar-menu-button.cjs +8 -6
  134. package/dist/cjs/chunks/sidebar-menu-item.cjs +4 -2
  135. package/dist/cjs/chunks/sidebar-menu-sub-button.cjs +6 -4
  136. package/dist/cjs/chunks/sidebar-menu-sub-item.cjs +4 -2
  137. package/dist/cjs/chunks/sidebar-menu-sub.cjs +4 -2
  138. package/dist/cjs/chunks/sidebar-menu.cjs +4 -2
  139. package/dist/cjs/chunks/sidebar-provider.cjs +9 -7
  140. package/dist/cjs/chunks/sidebar-trigger.cjs +4 -2
  141. package/dist/cjs/chunks/sidebar.cjs +4 -2
  142. package/dist/cjs/chunks/slider.cjs +10 -757
  143. package/dist/cjs/chunks/social-button.cjs +7 -5
  144. package/dist/cjs/chunks/status-badge.cjs +4 -2
  145. package/dist/cjs/chunks/switch.cjs +7 -185
  146. package/dist/cjs/chunks/tab-menu-content.cjs +5 -81
  147. package/dist/cjs/chunks/tab-menu-item.cjs +6 -88
  148. package/dist/cjs/chunks/tab-menu-list.cjs +6 -61
  149. package/dist/cjs/chunks/tab-menu.cjs +3 -4
  150. package/dist/cjs/chunks/table-body.cjs +4 -2
  151. package/dist/cjs/chunks/table-caption.cjs +4 -2
  152. package/dist/cjs/chunks/table-cell.cjs +4 -2
  153. package/dist/cjs/chunks/table-footer.cjs +4 -2
  154. package/dist/cjs/chunks/table-head.cjs +4 -2
  155. package/dist/cjs/chunks/table-header.cjs +4 -2
  156. package/dist/cjs/chunks/table-row.cjs +4 -2
  157. package/dist/cjs/chunks/table.cjs +4 -2
  158. package/dist/cjs/chunks/table2.cjs +4 -2
  159. package/dist/cjs/chunks/tag.cjs +6 -4
  160. package/dist/cjs/chunks/text-input-affix.cjs +4 -2
  161. package/dist/cjs/chunks/text-input-button.cjs +4 -2
  162. package/dist/cjs/chunks/text-input.cjs +11 -9
  163. package/dist/cjs/chunks/textarea.cjs +4 -2
  164. package/dist/cjs/chunks/tooltip-content.cjs +9 -599
  165. package/dist/cjs/chunks/tooltip-provider.cjs +2 -2
  166. package/dist/cjs/chunks/tooltip-root.cjs +3 -4
  167. package/dist/cjs/chunks/tooltip-trigger.cjs +3 -107
  168. package/dist/cjs/chunks/tooltip.cjs +4 -4
  169. package/dist/cjs/command-group.cjs +3 -4
  170. package/dist/cjs/command-input.cjs +7 -6
  171. package/dist/cjs/command-item.cjs +3 -4
  172. package/dist/cjs/command-list.cjs +3 -4
  173. package/dist/cjs/command-root.cjs +4 -6
  174. package/dist/cjs/command-separator.cjs +5 -3
  175. package/dist/cjs/context.cjs +1 -1
  176. package/dist/cjs/index.cjs +53 -53
  177. package/dist/cjs/label.cjs +1 -1
  178. package/dist/cjs/use-chart-motion.cjs +2 -2
  179. package/dist/cjs/use-color-model.cjs +6 -4
  180. package/dist/cjs/use-sidebar.cjs +2 -2
  181. package/dist/cjs/use-tab-observer.cjs +4 -4
  182. package/dist/es/chunks/alert.js +2 -2
  183. package/dist/es/chunks/badge.js +2 -2
  184. package/dist/es/chunks/bar-chart.js +11 -10007
  185. package/dist/es/chunks/button.js +4 -4
  186. package/dist/es/chunks/calendar.js +20 -798
  187. package/dist/es/chunks/chart-card.js +2 -2
  188. package/dist/es/chunks/chart-legend.js +2 -2
  189. package/dist/es/chunks/chart-plot.js +2 -2
  190. package/dist/es/chunks/checkbox-card.js +4 -5
  191. package/dist/es/chunks/checkbox-label.js +4 -5
  192. package/dist/es/chunks/checkbox.js +5 -227
  193. package/dist/es/chunks/collapsible-content.js +4 -106
  194. package/dist/es/chunks/collapsible-trigger.js +2 -50
  195. package/dist/es/chunks/collapsible.js +2 -3
  196. package/dist/es/chunks/color-picker.js +10 -10
  197. package/dist/es/chunks/color-swatch.js +1 -1
  198. package/dist/es/chunks/combobox-anchor.js +4 -44
  199. package/dist/es/chunks/combobox-empty.js +4 -30
  200. package/dist/es/chunks/combobox-group.js +4 -5
  201. package/dist/es/chunks/combobox-input.js +4 -4
  202. package/dist/es/chunks/combobox-item.js +8 -66
  203. package/dist/es/chunks/combobox-list.js +6 -94
  204. package/dist/es/chunks/combobox-root.js +3 -5
  205. package/dist/es/chunks/combobox-separator.js +3 -3
  206. package/dist/es/chunks/combobox-trigger.js +5 -63
  207. package/dist/es/chunks/combobox.js +4 -4
  208. package/dist/es/chunks/compact-button.js +3 -3
  209. package/dist/es/chunks/components.js +65 -55
  210. package/dist/es/chunks/content-divider.js +5 -89
  211. package/dist/es/chunks/counter-input.js +8 -939
  212. package/dist/es/chunks/date-picker.js +3 -3
  213. package/dist/es/chunks/dialog-body.js +2 -2
  214. package/dist/es/chunks/dialog-content.js +1 -1
  215. package/dist/es/chunks/dialog-description.js +3 -4
  216. package/dist/es/chunks/dialog-footer.js +2 -2
  217. package/dist/es/chunks/dialog-title.js +3 -4
  218. package/dist/es/chunks/dialog-trigger.js +1 -1
  219. package/dist/es/chunks/dialog.js +1 -1
  220. package/dist/es/chunks/digit-input-group.js +4 -5
  221. package/dist/es/chunks/digit-input-slot.js +5 -263
  222. package/dist/es/chunks/digit-input.js +5 -6
  223. package/dist/es/chunks/drawer-body.js +4 -36
  224. package/dist/es/chunks/drawer-close.js +2 -2
  225. package/dist/es/chunks/drawer-content.js +7 -1147
  226. package/dist/es/chunks/drawer-description.js +4 -4
  227. package/dist/es/chunks/drawer-footer.js +2 -2
  228. package/dist/es/chunks/drawer-header.js +4 -4
  229. package/dist/es/chunks/drawer-title.js +4 -4
  230. package/dist/es/chunks/drawer-trigger.js +3 -51
  231. package/dist/es/chunks/drawer.js +3 -4
  232. package/dist/es/chunks/dropdown-menu-content.js +6 -534
  233. package/dist/es/chunks/dropdown-menu-group.js +3 -28
  234. package/dist/es/chunks/dropdown-menu-item.js +4 -124
  235. package/dist/es/chunks/dropdown-menu-label.js +4 -57
  236. package/dist/es/chunks/dropdown-menu-separator.js +4 -56
  237. package/dist/es/chunks/dropdown-menu-sub-content.js +5 -286
  238. package/dist/es/chunks/dropdown-menu-sub-trigger.js +4 -191
  239. package/dist/es/chunks/dropdown-menu-sub.js +3 -39
  240. package/dist/es/chunks/dropdown-menu-trigger.js +3 -88
  241. package/dist/es/chunks/dropdown-menu.js +5 -7
  242. package/dist/es/chunks/extra-settings.js +3 -3
  243. package/dist/es/chunks/fancy-button.js +4 -4
  244. package/dist/es/chunks/file-upload-area.js +3 -3
  245. package/dist/es/chunks/gradient-picker.js +3 -3
  246. package/dist/es/chunks/hint-text.js +2 -2
  247. package/dist/es/chunks/{label2.js → label.js} +4 -5
  248. package/dist/es/chunks/link-bubble.js +3 -3
  249. package/dist/es/chunks/link-button.js +4 -4
  250. package/dist/es/chunks/mochi.js +2 -2
  251. package/dist/es/chunks/modal-body.js +2 -2
  252. package/dist/es/chunks/modal-close.js +2 -2
  253. package/dist/es/chunks/modal-content.js +5 -7
  254. package/dist/es/chunks/modal-footer.js +2 -2
  255. package/dist/es/chunks/modal-header.js +6 -8
  256. package/dist/es/chunks/modal-trigger.js +2 -2
  257. package/dist/es/chunks/modal.js +2 -3
  258. package/dist/es/chunks/pagination-content.js +5 -86
  259. package/dist/es/chunks/pagination-ellipsis.js +5 -30
  260. package/dist/es/chunks/pagination-first.js +5 -40
  261. package/dist/es/chunks/pagination-item.js +5 -53
  262. package/dist/es/chunks/pagination-last.js +5 -40
  263. package/dist/es/chunks/pagination-next.js +5 -40
  264. package/dist/es/chunks/pagination-previous.js +5 -40
  265. package/dist/es/chunks/pagination.js +4 -5
  266. package/dist/es/chunks/popover-content.js +8 -705
  267. package/dist/es/chunks/popover-trigger.js +3 -61
  268. package/dist/es/chunks/popover.js +2 -3
  269. package/dist/es/chunks/progress-bar.js +4 -4
  270. package/dist/es/chunks/progress-circle.js +5 -5
  271. package/dist/es/chunks/radio-group-card.js +4 -5
  272. package/dist/es/chunks/radio-group-item.js +5 -302
  273. package/dist/es/chunks/radio-group-label.js +4 -5
  274. package/dist/es/chunks/radio-group.js +3 -4
  275. package/dist/es/chunks/range-calendar.js +21 -1033
  276. package/dist/es/chunks/range-picker.js +7 -7
  277. package/dist/es/chunks/rich-editor.js +13 -5859
  278. package/dist/es/chunks/scroll-area.js +8 -142
  279. package/dist/es/chunks/scroll-bar.js +6 -890
  280. package/dist/es/chunks/segmented-control-item.js +5 -163
  281. package/dist/es/chunks/segmented-control.js +4 -5
  282. package/dist/es/chunks/select-content.js +7 -310
  283. package/dist/es/chunks/select-group.js +2 -2
  284. package/dist/es/chunks/select-icon.js +2 -2
  285. package/dist/es/chunks/select-item.js +6 -227
  286. package/dist/es/chunks/select-label.js +3 -33
  287. package/dist/es/chunks/select-separator.js +4 -27
  288. package/dist/es/chunks/select-trigger.js +5 -163
  289. package/dist/es/chunks/select-value.js +4 -64
  290. package/dist/es/chunks/select.js +5 -7
  291. package/dist/es/chunks/sheet-close.js +3 -3
  292. package/dist/es/chunks/sheet-content.js +6 -8
  293. package/dist/es/chunks/sheet-description.js +4 -4
  294. package/dist/es/chunks/sheet-footer.js +2 -2
  295. package/dist/es/chunks/sheet-header.js +2 -2
  296. package/dist/es/chunks/sheet-title.js +4 -4
  297. package/dist/es/chunks/sheet-trigger.js +2 -2
  298. package/dist/es/chunks/sheet.js +2 -3
  299. package/dist/es/chunks/sidebar-content.js +2 -2
  300. package/dist/es/chunks/sidebar-element.js +3 -3
  301. package/dist/es/chunks/sidebar-footer.js +2 -2
  302. package/dist/es/chunks/sidebar-group-content.js +2 -2
  303. package/dist/es/chunks/sidebar-group-label.js +3 -3
  304. package/dist/es/chunks/sidebar-group.js +2 -2
  305. package/dist/es/chunks/sidebar-header.js +2 -2
  306. package/dist/es/chunks/sidebar-menu-action.js +3 -3
  307. package/dist/es/chunks/sidebar-menu-badge.js +2 -2
  308. package/dist/es/chunks/sidebar-menu-button.js +4 -4
  309. package/dist/es/chunks/sidebar-menu-item.js +2 -2
  310. package/dist/es/chunks/sidebar-menu-sub-button.js +3 -3
  311. package/dist/es/chunks/sidebar-menu-sub-item.js +2 -2
  312. package/dist/es/chunks/sidebar-menu-sub.js +2 -2
  313. package/dist/es/chunks/sidebar-menu.js +2 -2
  314. package/dist/es/chunks/sidebar-provider.js +3 -3
  315. package/dist/es/chunks/sidebar-trigger.js +2 -2
  316. package/dist/es/chunks/sidebar.js +2 -2
  317. package/dist/es/chunks/slider.js +10 -759
  318. package/dist/es/chunks/social-button.js +4 -4
  319. package/dist/es/chunks/status-badge.js +2 -2
  320. package/dist/es/chunks/switch.js +5 -185
  321. package/dist/es/chunks/tab-menu-content.js +4 -81
  322. package/dist/es/chunks/tab-menu-item.js +4 -88
  323. package/dist/es/chunks/tab-menu-list.js +5 -62
  324. package/dist/es/chunks/tab-menu.js +2 -3
  325. package/dist/es/chunks/table-body.js +2 -2
  326. package/dist/es/chunks/table-caption.js +2 -2
  327. package/dist/es/chunks/table-cell.js +2 -2
  328. package/dist/es/chunks/table-footer.js +2 -2
  329. package/dist/es/chunks/table-head.js +2 -2
  330. package/dist/es/chunks/table-header.js +2 -2
  331. package/dist/es/chunks/table-row.js +2 -2
  332. package/dist/es/chunks/table.js +2 -2
  333. package/dist/es/chunks/table2.js +2 -2
  334. package/dist/es/chunks/tag.js +3 -3
  335. package/dist/es/chunks/text-input-affix.js +2 -2
  336. package/dist/es/chunks/text-input-button.js +2 -2
  337. package/dist/es/chunks/text-input.js +3 -3
  338. package/dist/es/chunks/textarea.js +2 -2
  339. package/dist/es/chunks/tooltip-content.js +7 -599
  340. package/dist/es/chunks/tooltip-provider.js +2 -2
  341. package/dist/es/chunks/tooltip-root.js +2 -3
  342. package/dist/es/chunks/tooltip-trigger.js +3 -107
  343. package/dist/es/chunks/tooltip.js +3 -3
  344. package/dist/es/command-group.js +3 -4
  345. package/dist/es/command-input.js +4 -5
  346. package/dist/es/command-item.js +2 -3
  347. package/dist/es/command-list.js +2 -3
  348. package/dist/es/command-root.js +3 -5
  349. package/dist/es/command-separator.js +3 -3
  350. package/dist/es/context.js +1 -1
  351. package/dist/es/index.js +54 -54
  352. package/dist/es/label.js +1 -1
  353. package/dist/es/use-chart-motion.js +1 -1
  354. package/dist/es/use-color-model.js +1 -1
  355. package/dist/es/use-sidebar.js +1 -1
  356. package/dist/es/use-tab-observer.js +1 -1
  357. package/package.json +3 -3
  358. package/src/components/button/button.vue +1 -0
  359. package/src/components/button/fancy-button.vue +1 -0
  360. package/src/components/button/link-button.vue +1 -0
  361. package/src/components/button/social-button.vue +1 -0
  362. package/dist/cjs/chunks/BubbleSelect.cjs +0 -331
  363. package/dist/cjs/chunks/CollapsibleRoot.cjs +0 -89
  364. package/dist/cjs/chunks/Collection.cjs +0 -84
  365. package/dist/cjs/chunks/ComboboxContent.cjs +0 -446
  366. package/dist/cjs/chunks/ComboboxGroup.cjs +0 -89
  367. package/dist/cjs/chunks/ComboboxInput.cjs +0 -269
  368. package/dist/cjs/chunks/ComboboxItem.cjs +0 -202
  369. package/dist/cjs/chunks/ComboboxLabel.cjs +0 -46
  370. package/dist/cjs/chunks/ComboboxRoot.cjs +0 -753
  371. package/dist/cjs/chunks/ComboboxSeparator.cjs +0 -34
  372. package/dist/cjs/chunks/ConfigProvider.cjs +0 -68
  373. package/dist/cjs/chunks/DialogClose.cjs +0 -40
  374. package/dist/cjs/chunks/DialogDescription.cjs +0 -37
  375. package/dist/cjs/chunks/DialogPortal.cjs +0 -524
  376. package/dist/cjs/chunks/DialogRoot.cjs +0 -80
  377. package/dist/cjs/chunks/DialogTitle.cjs +0 -37
  378. package/dist/cjs/chunks/DialogTrigger.cjs +0 -56
  379. package/dist/cjs/chunks/DismissableLayer.cjs +0 -268
  380. package/dist/cjs/chunks/DrawerClose.cjs +0 -40
  381. package/dist/cjs/chunks/DrawerDescription.cjs +0 -37
  382. package/dist/cjs/chunks/DrawerRoot.cjs +0 -366
  383. package/dist/cjs/chunks/DrawerTitle.cjs +0 -37
  384. package/dist/cjs/chunks/DropdownMenuPortal.cjs +0 -72
  385. package/dist/cjs/chunks/DropdownMenuRoot.cjs +0 -86
  386. package/dist/cjs/chunks/FocusScope.cjs +0 -377
  387. package/dist/cjs/chunks/Label.cjs +0 -41
  388. package/dist/cjs/chunks/MenuAnchor.cjs +0 -36
  389. package/dist/cjs/chunks/MenuContentImpl.cjs +0 -371
  390. package/dist/cjs/chunks/MenuGroup.cjs +0 -43
  391. package/dist/cjs/chunks/MenuItemImpl.cjs +0 -100
  392. package/dist/cjs/chunks/MenuRoot.cjs +0 -108
  393. package/dist/cjs/chunks/MenuSub.cjs +0 -67
  394. package/dist/cjs/chunks/PaginationRoot.cjs +0 -100
  395. package/dist/cjs/chunks/PinInputRoot.cjs +0 -152
  396. package/dist/cjs/chunks/PopoverRoot.cjs +0 -72
  397. package/dist/cjs/chunks/PopperAnchor.cjs +0 -47
  398. package/dist/cjs/chunks/PopperArrow.cjs +0 -151
  399. package/dist/cjs/chunks/PopperContent.cjs +0 -2099
  400. package/dist/cjs/chunks/PopperRoot.cjs +0 -31
  401. package/dist/cjs/chunks/Presence.cjs +0 -195
  402. package/dist/cjs/chunks/Primitive.cjs +0 -79
  403. package/dist/cjs/chunks/ProgressIndicator.cjs +0 -160
  404. package/dist/cjs/chunks/RadioGroupRoot.cjs +0 -142
  405. package/dist/cjs/chunks/RovingFocusGroup.cjs +0 -146
  406. package/dist/cjs/chunks/RovingFocusItem.cjs +0 -113
  407. package/dist/cjs/chunks/SelectGroup.cjs +0 -43
  408. package/dist/cjs/chunks/SelectItemAlignedPosition.cjs +0 -597
  409. package/dist/cjs/chunks/TabsRoot.cjs +0 -113
  410. package/dist/cjs/chunks/Teleport.cjs +0 -50
  411. package/dist/cjs/chunks/ToggleGroupRoot.cjs +0 -187
  412. package/dist/cjs/chunks/TooltipProvider.cjs +0 -86
  413. package/dist/cjs/chunks/TooltipRoot.cjs +0 -145
  414. package/dist/cjs/chunks/VisuallyHidden.cjs +0 -64
  415. package/dist/cjs/chunks/VisuallyHiddenInput.cjs +0 -146
  416. package/dist/cjs/chunks/clamp.cjs +0 -75
  417. package/dist/cjs/chunks/clsx.cjs +0 -21
  418. package/dist/cjs/chunks/createContext.cjs +0 -37
  419. package/dist/cjs/chunks/defu.cjs +0 -34
  420. package/dist/cjs/chunks/dist.cjs +0 -543
  421. package/dist/cjs/chunks/dist2.cjs +0 -538
  422. package/dist/cjs/chunks/dist3.cjs +0 -16177
  423. package/dist/cjs/chunks/getActiveElement.cjs +0 -14
  424. package/dist/cjs/chunks/handleAndDispatchCustomEvent.cjs +0 -18
  425. package/dist/cjs/chunks/isValueEqualOrExist.cjs +0 -24
  426. package/dist/cjs/chunks/menus.cjs +0 -1368
  427. package/dist/cjs/chunks/nullish.cjs +0 -11
  428. package/dist/cjs/chunks/ohash.D__AXeF1.cjs +0 -114
  429. package/dist/cjs/chunks/tinycolor.cjs +0 -904
  430. package/dist/cjs/chunks/useArrowNavigation.cjs +0 -65
  431. package/dist/cjs/chunks/useCalendar.cjs +0 -2533
  432. package/dist/cjs/chunks/useComposing.cjs +0 -45
  433. package/dist/cjs/chunks/useDirection.cjs +0 -19
  434. package/dist/cjs/chunks/useEmitAsProps.cjs +0 -33
  435. package/dist/cjs/chunks/useFocusGuards.cjs +0 -39
  436. package/dist/cjs/chunks/useFormControl.cjs +0 -13
  437. package/dist/cjs/chunks/useForwardExpose.cjs +0 -63
  438. package/dist/cjs/chunks/useForwardProps.cjs +0 -39
  439. package/dist/cjs/chunks/useForwardPropsEmits.cjs +0 -19
  440. package/dist/cjs/chunks/useForwardScopeId.cjs +0 -30
  441. package/dist/cjs/chunks/useHideOthers.cjs +0 -137
  442. package/dist/cjs/chunks/useId.cjs +0 -30
  443. package/dist/cjs/chunks/useKbd.cjs +0 -46
  444. package/dist/cjs/chunks/useLocale.cjs +0 -19
  445. package/dist/cjs/chunks/useNonce.cjs +0 -14
  446. package/dist/cjs/chunks/usePrimitiveElement.cjs +0 -17
  447. package/dist/cjs/chunks/useSize.cjs +0 -54
  448. package/dist/cjs/chunks/useTypeahead.cjs +0 -69
  449. package/dist/cjs/chunks/utils.cjs +0 -117
  450. package/dist/cjs/chunks/utils2.cjs +0 -73
  451. package/dist/cjs/chunks/utils3.cjs +0 -20
  452. package/dist/es/chunks/BubbleSelect.js +0 -290
  453. package/dist/es/chunks/CollapsibleRoot.js +0 -78
  454. package/dist/es/chunks/Collection.js +0 -79
  455. package/dist/es/chunks/ComboboxContent.js +0 -441
  456. package/dist/es/chunks/ComboboxGroup.js +0 -78
  457. package/dist/es/chunks/ComboboxInput.js +0 -264
  458. package/dist/es/chunks/ComboboxItem.js +0 -191
  459. package/dist/es/chunks/ComboboxLabel.js +0 -41
  460. package/dist/es/chunks/ComboboxRoot.js +0 -730
  461. package/dist/es/chunks/ComboboxSeparator.js +0 -29
  462. package/dist/es/chunks/ConfigProvider.js +0 -57
  463. package/dist/es/chunks/DialogClose.js +0 -35
  464. package/dist/es/chunks/DialogDescription.js +0 -32
  465. package/dist/es/chunks/DialogPortal.js +0 -507
  466. package/dist/es/chunks/DialogRoot.js +0 -69
  467. package/dist/es/chunks/DialogTitle.js +0 -32
  468. package/dist/es/chunks/DialogTrigger.js +0 -51
  469. package/dist/es/chunks/DismissableLayer.js +0 -257
  470. package/dist/es/chunks/DrawerClose.js +0 -35
  471. package/dist/es/chunks/DrawerDescription.js +0 -32
  472. package/dist/es/chunks/DrawerRoot.js +0 -325
  473. package/dist/es/chunks/DrawerTitle.js +0 -32
  474. package/dist/es/chunks/DropdownMenuPortal.js +0 -67
  475. package/dist/es/chunks/DropdownMenuRoot.js +0 -75
  476. package/dist/es/chunks/FocusScope.js +0 -360
  477. package/dist/es/chunks/Label.js +0 -36
  478. package/dist/es/chunks/MenuAnchor.js +0 -31
  479. package/dist/es/chunks/MenuContentImpl.js +0 -360
  480. package/dist/es/chunks/MenuGroup.js +0 -32
  481. package/dist/es/chunks/MenuItemImpl.js +0 -95
  482. package/dist/es/chunks/MenuRoot.js +0 -85
  483. package/dist/es/chunks/MenuSub.js +0 -56
  484. package/dist/es/chunks/PaginationRoot.js +0 -89
  485. package/dist/es/chunks/PinInputRoot.js +0 -141
  486. package/dist/es/chunks/PopoverRoot.js +0 -61
  487. package/dist/es/chunks/PopperAnchor.js +0 -42
  488. package/dist/es/chunks/PopperArrow.js +0 -146
  489. package/dist/es/chunks/PopperContent.js +0 -2029
  490. package/dist/es/chunks/PopperRoot.js +0 -20
  491. package/dist/es/chunks/Presence.js +0 -184
  492. package/dist/es/chunks/Primitive.js +0 -62
  493. package/dist/es/chunks/ProgressIndicator.js +0 -149
  494. package/dist/es/chunks/RadioGroupRoot.js +0 -131
  495. package/dist/es/chunks/RovingFocusGroup.js +0 -135
  496. package/dist/es/chunks/RovingFocusItem.js +0 -108
  497. package/dist/es/chunks/SelectGroup.js +0 -32
  498. package/dist/es/chunks/SelectItemAlignedPosition.js +0 -568
  499. package/dist/es/chunks/TabsRoot.js +0 -102
  500. package/dist/es/chunks/Teleport.js +0 -45
  501. package/dist/es/chunks/ToggleGroupRoot.js +0 -176
  502. package/dist/es/chunks/TooltipProvider.js +0 -75
  503. package/dist/es/chunks/TooltipRoot.js +0 -128
  504. package/dist/es/chunks/VisuallyHidden.js +0 -59
  505. package/dist/es/chunks/VisuallyHiddenInput.js +0 -141
  506. package/dist/es/chunks/clamp.js +0 -64
  507. package/dist/es/chunks/clsx.js +0 -16
  508. package/dist/es/chunks/createContext.js +0 -32
  509. package/dist/es/chunks/defu.js +0 -29
  510. package/dist/es/chunks/dist.js +0 -418
  511. package/dist/es/chunks/dist2.js +0 -461
  512. package/dist/es/chunks/dist3.js +0 -15890
  513. package/dist/es/chunks/getActiveElement.js +0 -9
  514. package/dist/es/chunks/handleAndDispatchCustomEvent.js +0 -13
  515. package/dist/es/chunks/isValueEqualOrExist.js +0 -19
  516. package/dist/es/chunks/menus.js +0 -1368
  517. package/dist/es/chunks/nullish.js +0 -6
  518. package/dist/es/chunks/ohash.D__AXeF1.js +0 -109
  519. package/dist/es/chunks/rolldown-runtime.js +0 -34
  520. package/dist/es/chunks/tinycolor.js +0 -899
  521. package/dist/es/chunks/useArrowNavigation.js +0 -60
  522. package/dist/es/chunks/useCalendar.js +0 -2426
  523. package/dist/es/chunks/useComposing.js +0 -40
  524. package/dist/es/chunks/useDirection.js +0 -14
  525. package/dist/es/chunks/useEmitAsProps.js +0 -28
  526. package/dist/es/chunks/useFocusGuards.js +0 -34
  527. package/dist/es/chunks/useFormControl.js +0 -8
  528. package/dist/es/chunks/useForwardExpose.js +0 -58
  529. package/dist/es/chunks/useForwardProps.js +0 -34
  530. package/dist/es/chunks/useForwardPropsEmits.js +0 -14
  531. package/dist/es/chunks/useForwardScopeId.js +0 -25
  532. package/dist/es/chunks/useHideOthers.js +0 -132
  533. package/dist/es/chunks/useId.js +0 -23
  534. package/dist/es/chunks/useKbd.js +0 -41
  535. package/dist/es/chunks/useLocale.js +0 -14
  536. package/dist/es/chunks/useNonce.js +0 -9
  537. package/dist/es/chunks/usePrimitiveElement.js +0 -12
  538. package/dist/es/chunks/useSize.js +0 -49
  539. package/dist/es/chunks/useTypeahead.js +0 -64
  540. package/dist/es/chunks/utils.js +0 -58
  541. package/dist/es/chunks/utils2.js +0 -44
  542. package/dist/es/chunks/utils3.js +0 -9
@@ -1,904 +0,0 @@
1
- //#region ../../node_modules/.pnpm/tinycolor2@1.6.0/node_modules/tinycolor2/esm/tinycolor.js
2
- function _typeof(obj) {
3
- "@babel/helpers - typeof";
4
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(obj) {
5
- return typeof obj;
6
- } : function(obj) {
7
- return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
8
- }, _typeof(obj);
9
- }
10
- var trimLeft = /^\s+/;
11
- var trimRight = /\s+$/;
12
- function tinycolor(color, opts) {
13
- color = color ? color : "";
14
- opts = opts || {};
15
- if (color instanceof tinycolor) return color;
16
- if (!(this instanceof tinycolor)) return new tinycolor(color, opts);
17
- var rgb = inputToRGB(color);
18
- this._originalInput = color, this._r = rgb.r, this._g = rgb.g, this._b = rgb.b, this._a = rgb.a, this._roundA = Math.round(100 * this._a) / 100, this._format = opts.format || rgb.format;
19
- this._gradientType = opts.gradientType;
20
- if (this._r < 1) this._r = Math.round(this._r);
21
- if (this._g < 1) this._g = Math.round(this._g);
22
- if (this._b < 1) this._b = Math.round(this._b);
23
- this._ok = rgb.ok;
24
- }
25
- tinycolor.prototype = {
26
- isDark: function isDark() {
27
- return this.getBrightness() < 128;
28
- },
29
- isLight: function isLight() {
30
- return !this.isDark();
31
- },
32
- isValid: function isValid() {
33
- return this._ok;
34
- },
35
- getOriginalInput: function getOriginalInput() {
36
- return this._originalInput;
37
- },
38
- getFormat: function getFormat() {
39
- return this._format;
40
- },
41
- getAlpha: function getAlpha() {
42
- return this._a;
43
- },
44
- getBrightness: function getBrightness() {
45
- var rgb = this.toRgb();
46
- return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1e3;
47
- },
48
- getLuminance: function getLuminance() {
49
- var rgb = this.toRgb();
50
- var RsRGB = rgb.r / 255, GsRGB = rgb.g / 255, BsRGB = rgb.b / 255, R, G, B;
51
- if (RsRGB <= .03928) R = RsRGB / 12.92;
52
- else R = Math.pow((RsRGB + .055) / 1.055, 2.4);
53
- if (GsRGB <= .03928) G = GsRGB / 12.92;
54
- else G = Math.pow((GsRGB + .055) / 1.055, 2.4);
55
- if (BsRGB <= .03928) B = BsRGB / 12.92;
56
- else B = Math.pow((BsRGB + .055) / 1.055, 2.4);
57
- return .2126 * R + .7152 * G + .0722 * B;
58
- },
59
- setAlpha: function setAlpha(value) {
60
- this._a = boundAlpha(value);
61
- this._roundA = Math.round(100 * this._a) / 100;
62
- return this;
63
- },
64
- toHsv: function toHsv() {
65
- var hsv = rgbToHsv(this._r, this._g, this._b);
66
- return {
67
- h: hsv.h * 360,
68
- s: hsv.s,
69
- v: hsv.v,
70
- a: this._a
71
- };
72
- },
73
- toHsvString: function toHsvString() {
74
- var hsv = rgbToHsv(this._r, this._g, this._b);
75
- var h = Math.round(hsv.h * 360), s = Math.round(hsv.s * 100), v = Math.round(hsv.v * 100);
76
- return this._a == 1 ? "hsv(" + h + ", " + s + "%, " + v + "%)" : "hsva(" + h + ", " + s + "%, " + v + "%, " + this._roundA + ")";
77
- },
78
- toHsl: function toHsl() {
79
- var hsl = rgbToHsl(this._r, this._g, this._b);
80
- return {
81
- h: hsl.h * 360,
82
- s: hsl.s,
83
- l: hsl.l,
84
- a: this._a
85
- };
86
- },
87
- toHslString: function toHslString() {
88
- var hsl = rgbToHsl(this._r, this._g, this._b);
89
- var h = Math.round(hsl.h * 360), s = Math.round(hsl.s * 100), l = Math.round(hsl.l * 100);
90
- return this._a == 1 ? "hsl(" + h + ", " + s + "%, " + l + "%)" : "hsla(" + h + ", " + s + "%, " + l + "%, " + this._roundA + ")";
91
- },
92
- toHex: function toHex(allow3Char) {
93
- return rgbToHex(this._r, this._g, this._b, allow3Char);
94
- },
95
- toHexString: function toHexString(allow3Char) {
96
- return "#" + this.toHex(allow3Char);
97
- },
98
- toHex8: function toHex8(allow4Char) {
99
- return rgbaToHex(this._r, this._g, this._b, this._a, allow4Char);
100
- },
101
- toHex8String: function toHex8String(allow4Char) {
102
- return "#" + this.toHex8(allow4Char);
103
- },
104
- toRgb: function toRgb() {
105
- return {
106
- r: Math.round(this._r),
107
- g: Math.round(this._g),
108
- b: Math.round(this._b),
109
- a: this._a
110
- };
111
- },
112
- toRgbString: function toRgbString() {
113
- return this._a == 1 ? "rgb(" + Math.round(this._r) + ", " + Math.round(this._g) + ", " + Math.round(this._b) + ")" : "rgba(" + Math.round(this._r) + ", " + Math.round(this._g) + ", " + Math.round(this._b) + ", " + this._roundA + ")";
114
- },
115
- toPercentageRgb: function toPercentageRgb() {
116
- return {
117
- r: Math.round(bound01(this._r, 255) * 100) + "%",
118
- g: Math.round(bound01(this._g, 255) * 100) + "%",
119
- b: Math.round(bound01(this._b, 255) * 100) + "%",
120
- a: this._a
121
- };
122
- },
123
- toPercentageRgbString: function toPercentageRgbString() {
124
- return this._a == 1 ? "rgb(" + Math.round(bound01(this._r, 255) * 100) + "%, " + Math.round(bound01(this._g, 255) * 100) + "%, " + Math.round(bound01(this._b, 255) * 100) + "%)" : "rgba(" + Math.round(bound01(this._r, 255) * 100) + "%, " + Math.round(bound01(this._g, 255) * 100) + "%, " + Math.round(bound01(this._b, 255) * 100) + "%, " + this._roundA + ")";
125
- },
126
- toName: function toName() {
127
- if (this._a === 0) return "transparent";
128
- if (this._a < 1) return false;
129
- return hexNames[rgbToHex(this._r, this._g, this._b, true)] || false;
130
- },
131
- toFilter: function toFilter(secondColor) {
132
- var hex8String = "#" + rgbaToArgbHex(this._r, this._g, this._b, this._a);
133
- var secondHex8String = hex8String;
134
- var gradientType = this._gradientType ? "GradientType = 1, " : "";
135
- if (secondColor) {
136
- var s = tinycolor(secondColor);
137
- secondHex8String = "#" + rgbaToArgbHex(s._r, s._g, s._b, s._a);
138
- }
139
- return "progid:DXImageTransform.Microsoft.gradient(" + gradientType + "startColorstr=" + hex8String + ",endColorstr=" + secondHex8String + ")";
140
- },
141
- toString: function toString(format) {
142
- var formatSet = !!format;
143
- format = format || this._format;
144
- var formattedString = false;
145
- var hasAlpha = this._a < 1 && this._a >= 0;
146
- if (!formatSet && hasAlpha && (format === "hex" || format === "hex6" || format === "hex3" || format === "hex4" || format === "hex8" || format === "name")) {
147
- if (format === "name" && this._a === 0) return this.toName();
148
- return this.toRgbString();
149
- }
150
- if (format === "rgb") formattedString = this.toRgbString();
151
- if (format === "prgb") formattedString = this.toPercentageRgbString();
152
- if (format === "hex" || format === "hex6") formattedString = this.toHexString();
153
- if (format === "hex3") formattedString = this.toHexString(true);
154
- if (format === "hex4") formattedString = this.toHex8String(true);
155
- if (format === "hex8") formattedString = this.toHex8String();
156
- if (format === "name") formattedString = this.toName();
157
- if (format === "hsl") formattedString = this.toHslString();
158
- if (format === "hsv") formattedString = this.toHsvString();
159
- return formattedString || this.toHexString();
160
- },
161
- clone: function clone() {
162
- return tinycolor(this.toString());
163
- },
164
- _applyModification: function _applyModification(fn, args) {
165
- var color = fn.apply(null, [this].concat([].slice.call(args)));
166
- this._r = color._r;
167
- this._g = color._g;
168
- this._b = color._b;
169
- this.setAlpha(color._a);
170
- return this;
171
- },
172
- lighten: function lighten() {
173
- return this._applyModification(_lighten, arguments);
174
- },
175
- brighten: function brighten() {
176
- return this._applyModification(_brighten, arguments);
177
- },
178
- darken: function darken() {
179
- return this._applyModification(_darken, arguments);
180
- },
181
- desaturate: function desaturate() {
182
- return this._applyModification(_desaturate, arguments);
183
- },
184
- saturate: function saturate() {
185
- return this._applyModification(_saturate, arguments);
186
- },
187
- greyscale: function greyscale() {
188
- return this._applyModification(_greyscale, arguments);
189
- },
190
- spin: function spin() {
191
- return this._applyModification(_spin, arguments);
192
- },
193
- _applyCombination: function _applyCombination(fn, args) {
194
- return fn.apply(null, [this].concat([].slice.call(args)));
195
- },
196
- analogous: function analogous() {
197
- return this._applyCombination(_analogous, arguments);
198
- },
199
- complement: function complement() {
200
- return this._applyCombination(_complement, arguments);
201
- },
202
- monochromatic: function monochromatic() {
203
- return this._applyCombination(_monochromatic, arguments);
204
- },
205
- splitcomplement: function splitcomplement() {
206
- return this._applyCombination(_splitcomplement, arguments);
207
- },
208
- triad: function triad() {
209
- return this._applyCombination(polyad, [3]);
210
- },
211
- tetrad: function tetrad() {
212
- return this._applyCombination(polyad, [4]);
213
- }
214
- };
215
- tinycolor.fromRatio = function(color, opts) {
216
- if (_typeof(color) == "object") {
217
- var newColor = {};
218
- for (var i in color) if (color.hasOwnProperty(i)) {
219
- if (i === "a") newColor[i] = color[i];
220
- else newColor[i] = convertToPercentage(color[i]);
221
- }
222
- color = newColor;
223
- }
224
- return tinycolor(color, opts);
225
- };
226
- function inputToRGB(color) {
227
- var rgb = {
228
- r: 0,
229
- g: 0,
230
- b: 0
231
- };
232
- var a = 1;
233
- var s = null;
234
- var v = null;
235
- var l = null;
236
- var ok = false;
237
- var format = false;
238
- if (typeof color == "string") color = stringInputToObject(color);
239
- if (_typeof(color) == "object") {
240
- if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {
241
- rgb = rgbToRgb(color.r, color.g, color.b);
242
- ok = true;
243
- format = String(color.r).substr(-1) === "%" ? "prgb" : "rgb";
244
- } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) {
245
- s = convertToPercentage(color.s);
246
- v = convertToPercentage(color.v);
247
- rgb = hsvToRgb(color.h, s, v);
248
- ok = true;
249
- format = "hsv";
250
- } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) {
251
- s = convertToPercentage(color.s);
252
- l = convertToPercentage(color.l);
253
- rgb = hslToRgb(color.h, s, l);
254
- ok = true;
255
- format = "hsl";
256
- }
257
- if (color.hasOwnProperty("a")) a = color.a;
258
- }
259
- a = boundAlpha(a);
260
- return {
261
- ok,
262
- format: color.format || format,
263
- r: Math.min(255, Math.max(rgb.r, 0)),
264
- g: Math.min(255, Math.max(rgb.g, 0)),
265
- b: Math.min(255, Math.max(rgb.b, 0)),
266
- a
267
- };
268
- }
269
- function rgbToRgb(r, g, b) {
270
- return {
271
- r: bound01(r, 255) * 255,
272
- g: bound01(g, 255) * 255,
273
- b: bound01(b, 255) * 255
274
- };
275
- }
276
- function rgbToHsl(r, g, b) {
277
- r = bound01(r, 255);
278
- g = bound01(g, 255);
279
- b = bound01(b, 255);
280
- var max = Math.max(r, g, b), min = Math.min(r, g, b);
281
- var h, s, l = (max + min) / 2;
282
- if (max == min) h = s = 0;
283
- else {
284
- var d = max - min;
285
- s = l > .5 ? d / (2 - max - min) : d / (max + min);
286
- switch (max) {
287
- case r:
288
- h = (g - b) / d + (g < b ? 6 : 0);
289
- break;
290
- case g:
291
- h = (b - r) / d + 2;
292
- break;
293
- case b: h = (r - g) / d + 4;
294
- }
295
- h /= 6;
296
- }
297
- return {
298
- h,
299
- s,
300
- l
301
- };
302
- }
303
- function hslToRgb(h, s, l) {
304
- var r, g, b;
305
- h = bound01(h, 360);
306
- s = bound01(s, 100);
307
- l = bound01(l, 100);
308
- function hue2rgb(p, q, t) {
309
- if (t < 0) t += 1;
310
- if (t > 1) t -= 1;
311
- if (t < 1 / 6) return p + (q - p) * 6 * t;
312
- if (t < 1 / 2) return q;
313
- if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;
314
- return p;
315
- }
316
- if (s === 0) r = g = b = l;
317
- else {
318
- var q = l < .5 ? l * (1 + s) : l + s - l * s;
319
- var p = 2 * l - q;
320
- r = hue2rgb(p, q, h + 1 / 3);
321
- g = hue2rgb(p, q, h);
322
- b = hue2rgb(p, q, h - 1 / 3);
323
- }
324
- return {
325
- r: r * 255,
326
- g: g * 255,
327
- b: b * 255
328
- };
329
- }
330
- function rgbToHsv(r, g, b) {
331
- r = bound01(r, 255);
332
- g = bound01(g, 255);
333
- b = bound01(b, 255);
334
- var max = Math.max(r, g, b), min = Math.min(r, g, b);
335
- var h, s, v = max;
336
- var d = max - min;
337
- s = max === 0 ? 0 : d / max;
338
- if (max == min) h = 0;
339
- else {
340
- switch (max) {
341
- case r:
342
- h = (g - b) / d + (g < b ? 6 : 0);
343
- break;
344
- case g:
345
- h = (b - r) / d + 2;
346
- break;
347
- case b: h = (r - g) / d + 4;
348
- }
349
- h /= 6;
350
- }
351
- return {
352
- h,
353
- s,
354
- v
355
- };
356
- }
357
- function hsvToRgb(h, s, v) {
358
- h = bound01(h, 360) * 6;
359
- s = bound01(s, 100);
360
- v = bound01(v, 100);
361
- var i = Math.floor(h), f = h - i, p = v * (1 - s), q = v * (1 - f * s), t = v * (1 - (1 - f) * s), mod = i % 6, r = [
362
- v,
363
- q,
364
- p,
365
- p,
366
- t,
367
- v
368
- ][mod], g = [
369
- t,
370
- v,
371
- v,
372
- q,
373
- p,
374
- p
375
- ][mod], b = [
376
- p,
377
- p,
378
- t,
379
- v,
380
- v,
381
- q
382
- ][mod];
383
- return {
384
- r: r * 255,
385
- g: g * 255,
386
- b: b * 255
387
- };
388
- }
389
- function rgbToHex(r, g, b, allow3Char) {
390
- var hex = [
391
- pad2(Math.round(r).toString(16)),
392
- pad2(Math.round(g).toString(16)),
393
- pad2(Math.round(b).toString(16))
394
- ];
395
- if (allow3Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1)) return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);
396
- return hex.join("");
397
- }
398
- function rgbaToHex(r, g, b, a, allow4Char) {
399
- var hex = [
400
- pad2(Math.round(r).toString(16)),
401
- pad2(Math.round(g).toString(16)),
402
- pad2(Math.round(b).toString(16)),
403
- pad2(convertDecimalToHex(a))
404
- ];
405
- if (allow4Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1) && hex[3].charAt(0) == hex[3].charAt(1)) return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0);
406
- return hex.join("");
407
- }
408
- function rgbaToArgbHex(r, g, b, a) {
409
- return [
410
- pad2(convertDecimalToHex(a)),
411
- pad2(Math.round(r).toString(16)),
412
- pad2(Math.round(g).toString(16)),
413
- pad2(Math.round(b).toString(16))
414
- ].join("");
415
- }
416
- tinycolor.equals = function(color1, color2) {
417
- if (!color1 || !color2) return false;
418
- return tinycolor(color1).toRgbString() == tinycolor(color2).toRgbString();
419
- };
420
- tinycolor.random = function() {
421
- return tinycolor.fromRatio({
422
- r: Math.random(),
423
- g: Math.random(),
424
- b: Math.random()
425
- });
426
- };
427
- function _desaturate(color, amount) {
428
- amount = amount === 0 ? 0 : amount || 10;
429
- var hsl = tinycolor(color).toHsl();
430
- hsl.s -= amount / 100;
431
- hsl.s = clamp01(hsl.s);
432
- return tinycolor(hsl);
433
- }
434
- function _saturate(color, amount) {
435
- amount = amount === 0 ? 0 : amount || 10;
436
- var hsl = tinycolor(color).toHsl();
437
- hsl.s += amount / 100;
438
- hsl.s = clamp01(hsl.s);
439
- return tinycolor(hsl);
440
- }
441
- function _greyscale(color) {
442
- return tinycolor(color).desaturate(100);
443
- }
444
- function _lighten(color, amount) {
445
- amount = amount === 0 ? 0 : amount || 10;
446
- var hsl = tinycolor(color).toHsl();
447
- hsl.l += amount / 100;
448
- hsl.l = clamp01(hsl.l);
449
- return tinycolor(hsl);
450
- }
451
- function _brighten(color, amount) {
452
- amount = amount === 0 ? 0 : amount || 10;
453
- var rgb = tinycolor(color).toRgb();
454
- rgb.r = Math.max(0, Math.min(255, rgb.r - Math.round(255 * -(amount / 100))));
455
- rgb.g = Math.max(0, Math.min(255, rgb.g - Math.round(255 * -(amount / 100))));
456
- rgb.b = Math.max(0, Math.min(255, rgb.b - Math.round(255 * -(amount / 100))));
457
- return tinycolor(rgb);
458
- }
459
- function _darken(color, amount) {
460
- amount = amount === 0 ? 0 : amount || 10;
461
- var hsl = tinycolor(color).toHsl();
462
- hsl.l -= amount / 100;
463
- hsl.l = clamp01(hsl.l);
464
- return tinycolor(hsl);
465
- }
466
- function _spin(color, amount) {
467
- var hsl = tinycolor(color).toHsl();
468
- var hue = (hsl.h + amount) % 360;
469
- hsl.h = hue < 0 ? 360 + hue : hue;
470
- return tinycolor(hsl);
471
- }
472
- function _complement(color) {
473
- var hsl = tinycolor(color).toHsl();
474
- hsl.h = (hsl.h + 180) % 360;
475
- return tinycolor(hsl);
476
- }
477
- function polyad(color, number) {
478
- if (isNaN(number) || number <= 0) throw new Error("Argument to polyad must be a positive number");
479
- var hsl = tinycolor(color).toHsl();
480
- var result = [tinycolor(color)];
481
- var step = 360 / number;
482
- for (var i = 1; i < number; i++) result.push(tinycolor({
483
- h: (hsl.h + i * step) % 360,
484
- s: hsl.s,
485
- l: hsl.l
486
- }));
487
- return result;
488
- }
489
- function _splitcomplement(color) {
490
- var hsl = tinycolor(color).toHsl();
491
- var h = hsl.h;
492
- return [
493
- tinycolor(color),
494
- tinycolor({
495
- h: (h + 72) % 360,
496
- s: hsl.s,
497
- l: hsl.l
498
- }),
499
- tinycolor({
500
- h: (h + 216) % 360,
501
- s: hsl.s,
502
- l: hsl.l
503
- })
504
- ];
505
- }
506
- function _analogous(color, results, slices) {
507
- results = results || 6;
508
- slices = slices || 30;
509
- var hsl = tinycolor(color).toHsl();
510
- var part = 360 / slices;
511
- var ret = [tinycolor(color)];
512
- for (hsl.h = (hsl.h - (part * results >> 1) + 720) % 360; --results;) {
513
- hsl.h = (hsl.h + part) % 360;
514
- ret.push(tinycolor(hsl));
515
- }
516
- return ret;
517
- }
518
- function _monochromatic(color, results) {
519
- results = results || 6;
520
- var hsv = tinycolor(color).toHsv();
521
- var h = hsv.h, s = hsv.s, v = hsv.v;
522
- var ret = [];
523
- var modification = 1 / results;
524
- while (results--) {
525
- ret.push(tinycolor({
526
- h,
527
- s,
528
- v
529
- }));
530
- v = (v + modification) % 1;
531
- }
532
- return ret;
533
- }
534
- tinycolor.mix = function(color1, color2, amount) {
535
- amount = amount === 0 ? 0 : amount || 50;
536
- var rgb1 = tinycolor(color1).toRgb();
537
- var rgb2 = tinycolor(color2).toRgb();
538
- var p = amount / 100;
539
- return tinycolor({
540
- r: (rgb2.r - rgb1.r) * p + rgb1.r,
541
- g: (rgb2.g - rgb1.g) * p + rgb1.g,
542
- b: (rgb2.b - rgb1.b) * p + rgb1.b,
543
- a: (rgb2.a - rgb1.a) * p + rgb1.a
544
- });
545
- };
546
- tinycolor.readability = function(color1, color2) {
547
- var c1 = tinycolor(color1);
548
- var c2 = tinycolor(color2);
549
- return (Math.max(c1.getLuminance(), c2.getLuminance()) + .05) / (Math.min(c1.getLuminance(), c2.getLuminance()) + .05);
550
- };
551
- tinycolor.isReadable = function(color1, color2, wcag2) {
552
- var readability = tinycolor.readability(color1, color2);
553
- var wcag2Parms, out = false;
554
- wcag2Parms = validateWCAG2Parms(wcag2);
555
- switch (wcag2Parms.level + wcag2Parms.size) {
556
- case "AAsmall":
557
- case "AAAlarge":
558
- out = readability >= 4.5;
559
- break;
560
- case "AAlarge":
561
- out = readability >= 3;
562
- break;
563
- case "AAAsmall": out = readability >= 7;
564
- }
565
- return out;
566
- };
567
- tinycolor.mostReadable = function(baseColor, colorList, args) {
568
- var bestColor = null;
569
- var bestScore = 0;
570
- var readability;
571
- var includeFallbackColors, level, size;
572
- args = args || {};
573
- includeFallbackColors = args.includeFallbackColors;
574
- level = args.level;
575
- size = args.size;
576
- for (var i = 0; i < colorList.length; i++) {
577
- readability = tinycolor.readability(baseColor, colorList[i]);
578
- if (readability > bestScore) {
579
- bestScore = readability;
580
- bestColor = tinycolor(colorList[i]);
581
- }
582
- }
583
- if (tinycolor.isReadable(baseColor, bestColor, {
584
- level,
585
- size
586
- }) || !includeFallbackColors) return bestColor;
587
- else {
588
- args.includeFallbackColors = false;
589
- return tinycolor.mostReadable(baseColor, ["#fff", "#000"], args);
590
- }
591
- };
592
- var names = tinycolor.names = {
593
- aliceblue: "f0f8ff",
594
- antiquewhite: "faebd7",
595
- aqua: "0ff",
596
- aquamarine: "7fffd4",
597
- azure: "f0ffff",
598
- beige: "f5f5dc",
599
- bisque: "ffe4c4",
600
- black: "000",
601
- blanchedalmond: "ffebcd",
602
- blue: "00f",
603
- blueviolet: "8a2be2",
604
- brown: "a52a2a",
605
- burlywood: "deb887",
606
- burntsienna: "ea7e5d",
607
- cadetblue: "5f9ea0",
608
- chartreuse: "7fff00",
609
- chocolate: "d2691e",
610
- coral: "ff7f50",
611
- cornflowerblue: "6495ed",
612
- cornsilk: "fff8dc",
613
- crimson: "dc143c",
614
- cyan: "0ff",
615
- darkblue: "00008b",
616
- darkcyan: "008b8b",
617
- darkgoldenrod: "b8860b",
618
- darkgray: "a9a9a9",
619
- darkgreen: "006400",
620
- darkgrey: "a9a9a9",
621
- darkkhaki: "bdb76b",
622
- darkmagenta: "8b008b",
623
- darkolivegreen: "556b2f",
624
- darkorange: "ff8c00",
625
- darkorchid: "9932cc",
626
- darkred: "8b0000",
627
- darksalmon: "e9967a",
628
- darkseagreen: "8fbc8f",
629
- darkslateblue: "483d8b",
630
- darkslategray: "2f4f4f",
631
- darkslategrey: "2f4f4f",
632
- darkturquoise: "00ced1",
633
- darkviolet: "9400d3",
634
- deeppink: "ff1493",
635
- deepskyblue: "00bfff",
636
- dimgray: "696969",
637
- dimgrey: "696969",
638
- dodgerblue: "1e90ff",
639
- firebrick: "b22222",
640
- floralwhite: "fffaf0",
641
- forestgreen: "228b22",
642
- fuchsia: "f0f",
643
- gainsboro: "dcdcdc",
644
- ghostwhite: "f8f8ff",
645
- gold: "ffd700",
646
- goldenrod: "daa520",
647
- gray: "808080",
648
- green: "008000",
649
- greenyellow: "adff2f",
650
- grey: "808080",
651
- honeydew: "f0fff0",
652
- hotpink: "ff69b4",
653
- indianred: "cd5c5c",
654
- indigo: "4b0082",
655
- ivory: "fffff0",
656
- khaki: "f0e68c",
657
- lavender: "e6e6fa",
658
- lavenderblush: "fff0f5",
659
- lawngreen: "7cfc00",
660
- lemonchiffon: "fffacd",
661
- lightblue: "add8e6",
662
- lightcoral: "f08080",
663
- lightcyan: "e0ffff",
664
- lightgoldenrodyellow: "fafad2",
665
- lightgray: "d3d3d3",
666
- lightgreen: "90ee90",
667
- lightgrey: "d3d3d3",
668
- lightpink: "ffb6c1",
669
- lightsalmon: "ffa07a",
670
- lightseagreen: "20b2aa",
671
- lightskyblue: "87cefa",
672
- lightslategray: "789",
673
- lightslategrey: "789",
674
- lightsteelblue: "b0c4de",
675
- lightyellow: "ffffe0",
676
- lime: "0f0",
677
- limegreen: "32cd32",
678
- linen: "faf0e6",
679
- magenta: "f0f",
680
- maroon: "800000",
681
- mediumaquamarine: "66cdaa",
682
- mediumblue: "0000cd",
683
- mediumorchid: "ba55d3",
684
- mediumpurple: "9370db",
685
- mediumseagreen: "3cb371",
686
- mediumslateblue: "7b68ee",
687
- mediumspringgreen: "00fa9a",
688
- mediumturquoise: "48d1cc",
689
- mediumvioletred: "c71585",
690
- midnightblue: "191970",
691
- mintcream: "f5fffa",
692
- mistyrose: "ffe4e1",
693
- moccasin: "ffe4b5",
694
- navajowhite: "ffdead",
695
- navy: "000080",
696
- oldlace: "fdf5e6",
697
- olive: "808000",
698
- olivedrab: "6b8e23",
699
- orange: "ffa500",
700
- orangered: "ff4500",
701
- orchid: "da70d6",
702
- palegoldenrod: "eee8aa",
703
- palegreen: "98fb98",
704
- paleturquoise: "afeeee",
705
- palevioletred: "db7093",
706
- papayawhip: "ffefd5",
707
- peachpuff: "ffdab9",
708
- peru: "cd853f",
709
- pink: "ffc0cb",
710
- plum: "dda0dd",
711
- powderblue: "b0e0e6",
712
- purple: "800080",
713
- rebeccapurple: "663399",
714
- red: "f00",
715
- rosybrown: "bc8f8f",
716
- royalblue: "4169e1",
717
- saddlebrown: "8b4513",
718
- salmon: "fa8072",
719
- sandybrown: "f4a460",
720
- seagreen: "2e8b57",
721
- seashell: "fff5ee",
722
- sienna: "a0522d",
723
- silver: "c0c0c0",
724
- skyblue: "87ceeb",
725
- slateblue: "6a5acd",
726
- slategray: "708090",
727
- slategrey: "708090",
728
- snow: "fffafa",
729
- springgreen: "00ff7f",
730
- steelblue: "4682b4",
731
- tan: "d2b48c",
732
- teal: "008080",
733
- thistle: "d8bfd8",
734
- tomato: "ff6347",
735
- turquoise: "40e0d0",
736
- violet: "ee82ee",
737
- wheat: "f5deb3",
738
- white: "fff",
739
- whitesmoke: "f5f5f5",
740
- yellow: "ff0",
741
- yellowgreen: "9acd32"
742
- };
743
- var hexNames = tinycolor.hexNames = flip(names);
744
- function flip(o) {
745
- var flipped = {};
746
- for (var i in o) if (o.hasOwnProperty(i)) flipped[o[i]] = i;
747
- return flipped;
748
- }
749
- function boundAlpha(a) {
750
- a = parseFloat(a);
751
- if (isNaN(a) || a < 0 || a > 1) a = 1;
752
- return a;
753
- }
754
- function bound01(n, max) {
755
- if (isOnePointZero(n)) n = "100%";
756
- var processPercent = isPercentage(n);
757
- n = Math.min(max, Math.max(0, parseFloat(n)));
758
- if (processPercent) n = parseInt(n * max, 10) / 100;
759
- if (Math.abs(n - max) < 1e-6) return 1;
760
- return n % max / parseFloat(max);
761
- }
762
- function clamp01(val) {
763
- return Math.min(1, Math.max(0, val));
764
- }
765
- function parseIntFromHex(val) {
766
- return parseInt(val, 16);
767
- }
768
- function isOnePointZero(n) {
769
- return typeof n == "string" && n.indexOf(".") != -1 && parseFloat(n) === 1;
770
- }
771
- function isPercentage(n) {
772
- return typeof n === "string" && n.indexOf("%") != -1;
773
- }
774
- function pad2(c) {
775
- return c.length == 1 ? "0" + c : "" + c;
776
- }
777
- function convertToPercentage(n) {
778
- if (n <= 1) n = n * 100 + "%";
779
- return n;
780
- }
781
- function convertDecimalToHex(d) {
782
- return Math.round(parseFloat(d) * 255).toString(16);
783
- }
784
- function convertHexToDecimal(h) {
785
- return parseIntFromHex(h) / 255;
786
- }
787
- var matchers = function() {
788
- var CSS_UNIT = "(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)";
789
- var PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
790
- var PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
791
- return {
792
- CSS_UNIT: new RegExp(CSS_UNIT),
793
- rgb: new RegExp("rgb" + PERMISSIVE_MATCH3),
794
- rgba: new RegExp("rgba" + PERMISSIVE_MATCH4),
795
- hsl: new RegExp("hsl" + PERMISSIVE_MATCH3),
796
- hsla: new RegExp("hsla" + PERMISSIVE_MATCH4),
797
- hsv: new RegExp("hsv" + PERMISSIVE_MATCH3),
798
- hsva: new RegExp("hsva" + PERMISSIVE_MATCH4),
799
- hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
800
- hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
801
- hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
802
- hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
803
- };
804
- }();
805
- function isValidCSSUnit(color) {
806
- return !!matchers.CSS_UNIT.exec(color);
807
- }
808
- function stringInputToObject(color) {
809
- color = color.replace(trimLeft, "").replace(trimRight, "").toLowerCase();
810
- var named = false;
811
- if (names[color]) {
812
- color = names[color];
813
- named = true;
814
- } else if (color == "transparent") return {
815
- r: 0,
816
- g: 0,
817
- b: 0,
818
- a: 0,
819
- format: "name"
820
- };
821
- var match;
822
- if (match = matchers.rgb.exec(color)) return {
823
- r: match[1],
824
- g: match[2],
825
- b: match[3]
826
- };
827
- if (match = matchers.rgba.exec(color)) return {
828
- r: match[1],
829
- g: match[2],
830
- b: match[3],
831
- a: match[4]
832
- };
833
- if (match = matchers.hsl.exec(color)) return {
834
- h: match[1],
835
- s: match[2],
836
- l: match[3]
837
- };
838
- if (match = matchers.hsla.exec(color)) return {
839
- h: match[1],
840
- s: match[2],
841
- l: match[3],
842
- a: match[4]
843
- };
844
- if (match = matchers.hsv.exec(color)) return {
845
- h: match[1],
846
- s: match[2],
847
- v: match[3]
848
- };
849
- if (match = matchers.hsva.exec(color)) return {
850
- h: match[1],
851
- s: match[2],
852
- v: match[3],
853
- a: match[4]
854
- };
855
- if (match = matchers.hex8.exec(color)) return {
856
- r: parseIntFromHex(match[1]),
857
- g: parseIntFromHex(match[2]),
858
- b: parseIntFromHex(match[3]),
859
- a: convertHexToDecimal(match[4]),
860
- format: named ? "name" : "hex8"
861
- };
862
- if (match = matchers.hex6.exec(color)) return {
863
- r: parseIntFromHex(match[1]),
864
- g: parseIntFromHex(match[2]),
865
- b: parseIntFromHex(match[3]),
866
- format: named ? "name" : "hex"
867
- };
868
- if (match = matchers.hex4.exec(color)) return {
869
- r: parseIntFromHex(match[1] + "" + match[1]),
870
- g: parseIntFromHex(match[2] + "" + match[2]),
871
- b: parseIntFromHex(match[3] + "" + match[3]),
872
- a: convertHexToDecimal(match[4] + "" + match[4]),
873
- format: named ? "name" : "hex8"
874
- };
875
- if (match = matchers.hex3.exec(color)) return {
876
- r: parseIntFromHex(match[1] + "" + match[1]),
877
- g: parseIntFromHex(match[2] + "" + match[2]),
878
- b: parseIntFromHex(match[3] + "" + match[3]),
879
- format: named ? "name" : "hex"
880
- };
881
- return false;
882
- }
883
- function validateWCAG2Parms(parms) {
884
- var level, size;
885
- parms = parms || {
886
- level: "AA",
887
- size: "small"
888
- };
889
- level = (parms.level || "AA").toUpperCase();
890
- size = (parms.size || "small").toLowerCase();
891
- if (level !== "AA" && level !== "AAA") level = "AA";
892
- if (size !== "small" && size !== "large") size = "small";
893
- return {
894
- level,
895
- size
896
- };
897
- }
898
- //#endregion
899
- Object.defineProperty(exports, "tinycolor", {
900
- enumerable: true,
901
- get: function() {
902
- return tinycolor;
903
- }
904
- });