@gradient-ui/core 0.8.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (996) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +60 -261
  3. package/dist/BaseOverlay-DgBWbJbs.cjs +1 -0
  4. package/dist/BaseOverlay-DzJ37TCS.js +216 -0
  5. package/dist/GAvatar-CN3PHGY_.js +202 -0
  6. package/dist/GAvatar-Dj6hSgL3.cjs +1 -0
  7. package/dist/GButton.vue_vue_type_style_index_0_lang-D9qRus1m.js +141 -0
  8. package/dist/GButton.vue_vue_type_style_index_0_lang-tGLnt3_R.cjs +1 -0
  9. package/dist/GCheckGroup-B3gZ9p6e.cjs +1 -0
  10. package/dist/GCheckGroup-DDkxtEj2.js +132 -0
  11. package/dist/GCheckIndicator-C-adGOcb.cjs +1 -0
  12. package/dist/GCheckIndicator-yvipPkWi.js +264 -0
  13. package/dist/GCheckbox.vue_vue_type_script_setup_true_lang-BrQE29bm.js +68 -0
  14. package/dist/GCheckbox.vue_vue_type_script_setup_true_lang-hjvutORC.cjs +1 -0
  15. package/dist/GCheckboxGroup.vue_vue_type_script_setup_true_lang-ChPcOQYQ.js +143 -0
  16. package/dist/GCheckboxGroup.vue_vue_type_script_setup_true_lang-CjPc-fNv.cjs +1 -0
  17. package/dist/GDropdown-CmBNk0jK.cjs +1 -0
  18. package/dist/GDropdown-TVH93Obq.js +126 -0
  19. package/dist/GExpandTransition.vue_vue_type_script_setup_true_lang-Ccl2Cemo.cjs +1 -0
  20. package/dist/GExpandTransition.vue_vue_type_script_setup_true_lang-ztMeJVQO.js +170 -0
  21. package/dist/GForm.vue_vue_type_style_index_0_lang-BzOWdjzk.cjs +1 -0
  22. package/dist/GForm.vue_vue_type_style_index_0_lang-DpPM5snQ.js +149 -0
  23. package/dist/GGradientMaterial.vue_vue_type_style_index_0_lang-ChRL7BIo.js +119 -0
  24. package/dist/GGradientMaterial.vue_vue_type_style_index_0_lang-DJcGdEVi.cjs +1 -0
  25. package/dist/GInput.vue_vue_type_script_setup_true_lang-BHM4W0S8.js +143 -0
  26. package/dist/GInput.vue_vue_type_script_setup_true_lang-dMjIUhb1.cjs +1 -0
  27. package/dist/GLoading.vue_vue_type_style_index_0_lang-BNOsRA0v.js +97 -0
  28. package/dist/GLoading.vue_vue_type_style_index_0_lang-KmMjjwpE.cjs +1 -0
  29. package/dist/GRadio.vue_vue_type_script_setup_true_lang-DNRTDtF2.cjs +1 -0
  30. package/dist/GRadio.vue_vue_type_script_setup_true_lang-kE-52Aj1.js +182 -0
  31. package/dist/GSwitch.vue_vue_type_script_setup_true_lang-BZXxiyLT.js +68 -0
  32. package/dist/GSwitch.vue_vue_type_script_setup_true_lang-DC8vyW7e.cjs +1 -0
  33. package/dist/GTable.vue_vue_type_style_index_1_lang-BECleEMi.js +828 -0
  34. package/dist/GTable.vue_vue_type_style_index_1_lang-DgaYCTxJ.cjs +1 -0
  35. package/dist/GTextarea.vue_vue_type_script_setup_true_lang-CyuCJwv6.cjs +1 -0
  36. package/dist/GTextarea.vue_vue_type_script_setup_true_lang-zSTso23Z.js +84 -0
  37. package/dist/GTransition.vue_vue_type_script_setup_true_lang-CHGSgsZ0.js +143 -0
  38. package/dist/GTransition.vue_vue_type_script_setup_true_lang-CgELPmMA.cjs +1 -0
  39. package/dist/GTransitionGroup.vue_vue_type_script_setup_true_lang-CDu6W6-X.js +23 -0
  40. package/dist/GTransitionGroup.vue_vue_type_script_setup_true_lang-DDh0rXP7.cjs +1 -0
  41. package/dist/PLA-B2QljfgE.cjs +1 -0
  42. package/dist/PLA-DePtRzKl.js +10 -0
  43. package/dist/_plugin-vue_export-helper-B--vMWp3.js +9 -0
  44. package/dist/_plugin-vue_export-helper-D_jf5u0r.cjs +1 -0
  45. package/dist/actionSurface-BkFPXb-Z.js +123 -0
  46. package/dist/actionSurface-Db2TksPm.cjs +1 -0
  47. package/dist/appScopedState-BCzeQW7Y.js +15 -0
  48. package/dist/appScopedState-D0zgOLf5.cjs +1 -0
  49. package/dist/booleanControl-BrOrGYvg.js +71 -0
  50. package/dist/booleanControl-uPXEckMZ.cjs +1 -0
  51. package/dist/camelToKebabCase-BFm1Zwmu.cjs +1 -0
  52. package/dist/camelToKebabCase-nw6sbguT.js +6 -0
  53. package/dist/clientLifecycle-DlIZRy4I.cjs +1 -0
  54. package/dist/clientLifecycle-NZQzL_eH.js +12 -0
  55. package/dist/color-8SkPDCIp.cjs +1 -0
  56. package/dist/color-WJmhRKJ_.js +26 -0
  57. package/dist/colorResolver-BBj51UAZ.js +90 -0
  58. package/dist/colorResolver-C6PTz0S8.cjs +1 -0
  59. package/dist/component-names.cjs +1 -0
  60. package/dist/component-names.mjs +79 -0
  61. package/dist/components/BaseOverlay.cjs +1 -0
  62. package/dist/components/BaseOverlay.mjs +5 -0
  63. package/dist/components/GAlert.cjs +1 -0
  64. package/dist/components/GAlert.mjs +126 -0
  65. package/dist/components/GAside.cjs +1 -0
  66. package/dist/components/GAside.mjs +90 -0
  67. package/dist/components/GAsideGroup.cjs +1 -0
  68. package/dist/components/GAsideGroup.mjs +99 -0
  69. package/dist/components/GAsideItem.cjs +1 -0
  70. package/dist/components/GAsideItem.mjs +123 -0
  71. package/dist/components/GAvatar.cjs +1 -0
  72. package/dist/components/GAvatar.mjs +5 -0
  73. package/dist/components/GAvatarGroup.cjs +1 -0
  74. package/dist/components/GAvatarGroup.mjs +66 -0
  75. package/dist/components/GBadge.cjs +1 -0
  76. package/dist/components/GBadge.mjs +141 -0
  77. package/dist/components/GButton.cjs +1 -0
  78. package/dist/components/GButton.mjs +4 -0
  79. package/dist/components/GCard.cjs +1 -0
  80. package/dist/components/GCard.mjs +235 -0
  81. package/dist/components/GCheckbox.cjs +1 -0
  82. package/dist/components/GCheckbox.mjs +4 -0
  83. package/dist/components/GCheckboxGroup.cjs +1 -0
  84. package/dist/components/GCheckboxGroup.mjs +4 -0
  85. package/dist/components/GChip.cjs +1 -0
  86. package/dist/components/GChip.mjs +133 -0
  87. package/dist/components/GCombobox.cjs +1 -0
  88. package/dist/components/GCombobox.mjs +477 -0
  89. package/dist/components/GDivider.cjs +1 -0
  90. package/dist/components/GDivider.mjs +189 -0
  91. package/dist/components/GDrawer.cjs +1 -0
  92. package/dist/components/GDrawer.mjs +151 -0
  93. package/dist/components/GDropdownGroup.cjs +1 -0
  94. package/dist/components/GDropdownGroup.mjs +24 -0
  95. package/dist/components/GExpandTransition.cjs +1 -0
  96. package/dist/components/GExpandTransition.mjs +4 -0
  97. package/dist/components/GExpansion.cjs +1 -0
  98. package/dist/components/GExpansion.mjs +321 -0
  99. package/dist/components/GExpansionGroup.cjs +1 -0
  100. package/dist/components/GExpansionGroup.mjs +95 -0
  101. package/dist/components/GFAB.cjs +1 -0
  102. package/dist/components/GFAB.mjs +142 -0
  103. package/dist/components/GForm.cjs +1 -0
  104. package/dist/components/GForm.mjs +4 -0
  105. package/dist/components/GGradient.cjs +1 -0
  106. package/dist/components/GGradient.mjs +158 -0
  107. package/dist/components/GGradientMaterial.cjs +1 -0
  108. package/dist/components/GGradientMaterial.mjs +4 -0
  109. package/dist/components/GIcon.cjs +1 -0
  110. package/dist/components/GIcon.mjs +35 -0
  111. package/dist/components/GImg.cjs +1 -0
  112. package/dist/components/GImg.mjs +167 -0
  113. package/dist/components/GInput.cjs +1 -0
  114. package/dist/components/GInput.mjs +4 -0
  115. package/dist/components/GLoading.cjs +1 -0
  116. package/dist/components/GLoading.mjs +4 -0
  117. package/dist/components/GMenu.cjs +1 -0
  118. package/dist/components/GMenu.mjs +274 -0
  119. package/dist/components/GModal.cjs +1 -0
  120. package/dist/components/GModal.mjs +141 -0
  121. package/dist/components/GNavGroup.cjs +1 -0
  122. package/dist/components/GNavGroup.mjs +99 -0
  123. package/dist/components/GNavItem.cjs +1 -0
  124. package/dist/components/GNavItem.mjs +124 -0
  125. package/dist/components/GNavList.cjs +1 -0
  126. package/dist/components/GNavList.mjs +82 -0
  127. package/dist/components/GNavbar.cjs +1 -0
  128. package/dist/components/GNavbar.mjs +172 -0
  129. package/dist/components/GNavbarItem.cjs +1 -0
  130. package/dist/components/GNavbarItem.mjs +120 -0
  131. package/dist/components/GNavbarMenu.cjs +1 -0
  132. package/dist/components/GNavbarMenu.mjs +147 -0
  133. package/dist/components/GNavbarSubItem.cjs +1 -0
  134. package/dist/components/GNavbarSubItem.mjs +96 -0
  135. package/dist/components/GProgress.cjs +1 -0
  136. package/dist/components/GProgress.mjs +135 -0
  137. package/dist/components/GQuickActions.cjs +1 -0
  138. package/dist/components/GQuickActions.mjs +157 -0
  139. package/dist/components/GRadio.cjs +1 -0
  140. package/dist/components/GRadio.mjs +4 -0
  141. package/dist/components/GSelect.cjs +1 -0
  142. package/dist/components/GSelect.mjs +145 -0
  143. package/dist/components/GSnackbar.cjs +1 -0
  144. package/dist/components/GSnackbar.mjs +285 -0
  145. package/dist/components/GSquircle.cjs +1 -0
  146. package/dist/components/GSquircle.mjs +180 -0
  147. package/dist/components/GStepPanel.cjs +1 -0
  148. package/dist/components/GStepPanel.mjs +156 -0
  149. package/dist/components/GStepper.cjs +1 -0
  150. package/dist/components/GStepper.mjs +335 -0
  151. package/dist/components/GStepperActions.cjs +1 -0
  152. package/dist/components/GStepperActions.mjs +61 -0
  153. package/dist/components/GSwitch.cjs +1 -0
  154. package/dist/components/GSwitch.mjs +4 -0
  155. package/dist/components/GTab.cjs +1 -0
  156. package/dist/components/GTab.mjs +105 -0
  157. package/dist/components/GTabList.cjs +1 -0
  158. package/dist/components/GTabList.mjs +28 -0
  159. package/dist/components/GTabPanel.cjs +1 -0
  160. package/dist/components/GTabPanel.mjs +35 -0
  161. package/dist/components/GTabPanels.cjs +1 -0
  162. package/dist/components/GTabPanels.mjs +24 -0
  163. package/dist/components/GTable.cjs +1 -0
  164. package/dist/components/GTable.mjs +4 -0
  165. package/dist/components/GTabs.cjs +1 -0
  166. package/dist/components/GTabs.mjs +73 -0
  167. package/dist/components/GText.cjs +1 -0
  168. package/dist/components/GText.mjs +59 -0
  169. package/dist/components/GTextarea.cjs +1 -0
  170. package/dist/components/GTextarea.mjs +4 -0
  171. package/dist/components/GTooltip.cjs +1 -0
  172. package/dist/components/GTooltip.mjs +65 -0
  173. package/dist/components/GTransition.cjs +1 -0
  174. package/dist/components/GTransition.mjs +4 -0
  175. package/dist/components/GTransitionGroup.cjs +1 -0
  176. package/dist/components/GTransitionGroup.mjs +4 -0
  177. package/dist/components.cjs +1 -1
  178. package/dist/components.mjs +135 -78
  179. package/dist/context-D_uVf3Ih.cjs +1 -0
  180. package/dist/context-DmyyyTi-.js +164 -0
  181. package/dist/context-FLWxn0X1.js +8 -0
  182. package/dist/context-obVnJalQ.cjs +1 -0
  183. package/dist/control-B3T1H83D.js +53 -0
  184. package/dist/control-C5Ws5lp3.cjs +1 -0
  185. package/dist/controller-DTFaTta0.cjs +1 -0
  186. package/dist/controller-Dk9Wd1Sr.js +101 -0
  187. package/dist/createComponentId-CK5eUecc.cjs +1 -0
  188. package/dist/createComponentId-CrqdDHC3.js +5 -0
  189. package/dist/createId-t3ke7cZx.js +5 -0
  190. package/dist/createId-tM8qn_N_.cjs +1 -0
  191. package/dist/cssTokens-CR4OxIND.js +75 -0
  192. package/dist/cssTokens-gELrmYNj.cjs +5 -0
  193. package/dist/defaults-DJ6ZV1Qc.js +51 -0
  194. package/dist/defaults-aVtmQF-9.cjs +1 -0
  195. package/dist/density-C3E1eUQ3.cjs +1 -0
  196. package/dist/density-Ci15Ek7T.js +15 -0
  197. package/dist/di-BXJSJc_E.js +12 -0
  198. package/dist/di-Czemfti1.cjs +1 -0
  199. package/dist/directives.cjs +1 -1
  200. package/dist/directives.mjs +8 -8
  201. package/dist/disabled-B_bAKgaM.cjs +1 -0
  202. package/dist/disabled-CAV056h6.js +12 -0
  203. package/dist/environment-Dr5kpq3D.cjs +1 -0
  204. package/dist/environment-o0e-UUbv.js +13 -0
  205. package/dist/fieldControl-BgVt1Hh1.js +144 -0
  206. package/dist/fieldControl-CIJMnu2j.cjs +1 -0
  207. package/dist/floatingTrigger-B_K4a4Fz.cjs +1 -0
  208. package/dist/floatingTrigger-CyvZ-aQ6.js +275 -0
  209. package/dist/glass-CJjbKWWO.js +20 -0
  210. package/dist/glass-CZEblMo2.cjs +1 -0
  211. package/dist/gradient-Bf_C3oqp.cjs +1 -0
  212. package/dist/gradient-Cesrzb2-.js +138 -0
  213. package/dist/gradientMaterial-BEhJP5b1.js +141 -0
  214. package/dist/gradientMaterial-DrttA9E_.cjs +1 -0
  215. package/dist/groupContext-C2lbjfsf.cjs +1 -0
  216. package/dist/groupContext-CBceOY6B.js +14 -0
  217. package/dist/groupContext-DU6dxh4q.cjs +1 -0
  218. package/dist/groupContext-vS5bHonI.js +14 -0
  219. package/dist/head-BMx6G1g4.js +45 -0
  220. package/dist/head-u-LV2RM9.cjs +2 -0
  221. package/dist/icon-C1AhpC8p.js +66 -0
  222. package/dist/icon-DgrRDU9A.cjs +1 -0
  223. package/dist/id-Cjq3OT0R.js +5 -0
  224. package/dist/id-EYQallpf.cjs +1 -0
  225. package/dist/index-71vxBpir.js +53 -0
  226. package/dist/index-8uDgLBTF.cjs +1 -0
  227. package/dist/index-BDHATTpo.js +141 -0
  228. package/dist/index-DQ6stZ3U.js +97 -0
  229. package/dist/index-Dd_8Hfjk.cjs +1 -0
  230. package/dist/index-YvJ0cd3f.cjs +1 -0
  231. package/dist/index.cjs +1 -1
  232. package/dist/index.mjs +315 -224
  233. package/dist/item-BiO-0FYg.cjs +1 -0
  234. package/dist/item-Cm_rJTEH.js +47 -0
  235. package/dist/layerStack-Bn2nFt2F.cjs +1 -0
  236. package/dist/layerStack-C926It64.js +86 -0
  237. package/dist/mask-BGVqqZXk.cjs +1 -0
  238. package/dist/mask-D4VYR8fo.js +541 -0
  239. package/dist/material-CkThdnz0.cjs +1 -0
  240. package/dist/material-Cn0l9r_y.js +182 -0
  241. package/dist/materialSurface-BZWqxSOo.cjs +1 -0
  242. package/dist/materialSurface-DKWanYUC.js +57 -0
  243. package/dist/menuContext-COshJAv-.js +14 -0
  244. package/dist/menuContext-DqTLm_y8.cjs +1 -0
  245. package/dist/mount-CqN_WfIk.js +58 -0
  246. package/dist/mount-qFaEMFZj.cjs +1 -0
  247. package/dist/palette-CH8mtBoc.js +3779 -0
  248. package/dist/palette-WOebHg01.cjs +316 -0
  249. package/dist/plugin.cjs +1 -0
  250. package/dist/plugin.mjs +24 -0
  251. package/dist/propsFactory-DT6-QS4L.cjs +1 -0
  252. package/dist/propsFactory-FM5RGbLN.js +13 -0
  253. package/dist/px-B-cyF02Z.js +8 -0
  254. package/dist/px-CVkec5Jf.cjs +1 -0
  255. package/dist/rounded-BneJO7vz.cjs +1 -0
  256. package/dist/rounded-CKhFFdmx.js +12 -0
  257. package/dist/routerLink-BhTEISct.cjs +1 -0
  258. package/dist/routerLink-p0fsQRNq.js +11 -0
  259. package/dist/runtime-DBDKFxqD.js +22 -0
  260. package/dist/runtime-DjqHzhfc.cjs +1 -0
  261. package/dist/scheme-C0jQNw-v.cjs +299 -0
  262. package/dist/scheme-Dp9cSd1s.js +1406 -0
  263. package/dist/selected-CEdYQtXH.cjs +1 -0
  264. package/dist/selected-DPdzuMh_.js +20 -0
  265. package/dist/selectionController-Cq7OffKP.js +98 -0
  266. package/dist/selectionController-D_SzzLi7.cjs +1 -0
  267. package/dist/selectionModel-B_tgk_Aa.cjs +1 -0
  268. package/dist/selectionModel-DMATNQOo.js +76 -0
  269. package/dist/services.cjs +1 -1
  270. package/dist/services.mjs +10 -3
  271. package/dist/size-BSjg5E6f.cjs +1 -0
  272. package/dist/size-C-WH-uPa.js +16 -0
  273. package/dist/ssr.cjs +1 -0
  274. package/dist/ssr.mjs +31 -0
  275. package/dist/state-CUskk7oG.cjs +1 -0
  276. package/dist/state-zMDQLwyB.js +12 -0
  277. package/dist/stateIcon-B8wmjxgd.js +98 -0
  278. package/dist/stateIcon-BxT3Loel.cjs +1 -0
  279. package/dist/style.css +1 -1
  280. package/dist/surface-NFdB950M.cjs +1 -0
  281. package/dist/surface-i-1vm2j3.js +99 -0
  282. package/dist/surfaceColor-BlDoAKoV.cjs +1 -0
  283. package/dist/surfaceColor-Cic675ry.js +34 -0
  284. package/dist/surfaceMaterial-B1a1iV02.js +39 -0
  285. package/dist/surfaceMaterial-JpbVongH.cjs +1 -0
  286. package/dist/tagName-D8HI-Yqc.js +40 -0
  287. package/dist/tagName-EmIHK0fg.cjs +1 -0
  288. package/dist/teleport-6ZRoZ2JT.js +26 -0
  289. package/dist/teleport-Bj9Z7LhE.cjs +1 -0
  290. package/dist/textFieldComponent-Ct4Z0dFr.cjs +1 -0
  291. package/dist/textFieldComponent-gnbYgrX0.js +217 -0
  292. package/dist/textFieldControl-Cxnq3lo4.js +80 -0
  293. package/dist/textFieldControl-D0-pdxIY.cjs +1 -0
  294. package/dist/theme.cjs +1 -1
  295. package/dist/theme.mjs +60 -59
  296. package/dist/tokenInputKeyboard-DBcgGd7c.js +108 -0
  297. package/dist/tokenInputKeyboard-DqEV34Li.cjs +1 -0
  298. package/dist/transition-BPMUkgHY.cjs +1 -0
  299. package/dist/transition-DVGMCo2o.js +108 -0
  300. package/dist/types/componentNames.d.ts +5 -0
  301. package/dist/types/components/GGroup/GGroup.vue.d.ts +11 -9
  302. package/dist/types/components/GGroup/index.d.ts +1 -1
  303. package/dist/types/components/index.d.ts +55 -53
  304. package/dist/types/components/transitions/GExpandTransition.vue.d.ts +26 -32
  305. package/dist/types/components/transitions/GTransition.vue.d.ts +26 -32
  306. package/dist/types/components/transitions/GTransitionGroup.vue.d.ts +26 -32
  307. package/dist/types/components/transitions/TransitionExpansion.vue.d.ts +2 -8
  308. package/dist/types/components/transitions/TransitionOverlay.vue.d.ts +2 -8
  309. package/dist/types/components/transitions/TransitionRotate.vue.d.ts +2 -8
  310. package/dist/types/components/transitions/TransitionScale.vue.d.ts +2 -8
  311. package/dist/types/components/transitions/TransitionStaggerTranslate.vue.d.ts +2 -8
  312. package/dist/types/components/transitions/index.d.ts +3 -3
  313. package/dist/types/components/ui/BaseFloating/BaseFloating.vue.d.ts +45 -53
  314. package/dist/types/components/ui/BaseFloating/index.d.ts +1 -1
  315. package/dist/types/components/ui/BaseOverlay/BaseOverlay.vue.d.ts +62 -71
  316. package/dist/types/components/ui/BaseOverlay/index.d.ts +1 -1
  317. package/dist/types/components/ui/BaseOverlay/types.d.ts +24 -24
  318. package/dist/types/components/ui/GAction/GAction.vue.d.ts +1 -1
  319. package/dist/types/components/ui/GAction/index.d.ts +1 -1
  320. package/dist/types/components/ui/GAction/types.d.ts +15 -15
  321. package/dist/types/components/ui/GAlert/GAlert.vue.d.ts +177 -183
  322. package/dist/types/components/ui/GAlert/index.d.ts +1 -1
  323. package/dist/types/components/ui/GAlert/types.d.ts +151 -151
  324. package/dist/types/components/ui/GAside/GAside.vue.d.ts +26 -24
  325. package/dist/types/components/ui/GAside/GAsideGroup.vue.d.ts +11 -9
  326. package/dist/types/components/ui/GAside/GAsideItem.vue.d.ts +16 -14
  327. package/dist/types/components/ui/GAside/context.d.ts +2 -2
  328. package/dist/types/components/ui/GAside/groupContext.d.ts +1 -1
  329. package/dist/types/components/ui/GAside/index.d.ts +4 -4
  330. package/dist/types/components/ui/GAside/types.d.ts +28 -28
  331. package/dist/types/components/ui/GAvatar/GAvatar.vue.d.ts +262 -268
  332. package/dist/types/components/ui/GAvatar/GAvatarGroup.vue.d.ts +43 -49
  333. package/dist/types/components/ui/GAvatar/index.d.ts +3 -3
  334. package/dist/types/components/ui/GAvatar/types.d.ts +163 -163
  335. package/dist/types/components/ui/GBadge/GBadge.vue.d.ts +367 -373
  336. package/dist/types/components/ui/GBadge/index.d.ts +2 -2
  337. package/dist/types/components/ui/GBadge/types.d.ts +153 -153
  338. package/dist/types/components/ui/GButton/GButton.vue.d.ts +252 -258
  339. package/dist/types/components/ui/GButton/index.d.ts +2 -2
  340. package/dist/types/components/ui/GButton/types.d.ts +149 -149
  341. package/dist/types/components/ui/GCard/GCard.vue.d.ts +215 -221
  342. package/dist/types/components/ui/GCard/index.d.ts +2 -2
  343. package/dist/types/components/ui/GCard/types.d.ts +160 -160
  344. package/dist/types/components/ui/GCheckControl/GCheckControl.vue.d.ts +86 -92
  345. package/dist/types/components/ui/GCheckControl/GCheckGroup.vue.d.ts +77 -83
  346. package/dist/types/components/ui/GCheckControl/GCheckIndicator.vue.d.ts +17 -10
  347. package/dist/types/components/ui/GCheckControl/index.d.ts +3 -3
  348. package/dist/types/components/ui/GCheckbox/GCheckbox.vue.d.ts +10 -211
  349. package/dist/types/components/ui/GCheckbox/index.d.ts +2 -2
  350. package/dist/types/components/ui/GCheckbox/types.d.ts +1 -1
  351. package/dist/types/components/ui/GCheckboxGroup/GCheckboxGroup.vue.d.ts +12 -10
  352. package/dist/types/components/ui/GCheckboxGroup/index.d.ts +2 -2
  353. package/dist/types/components/ui/GCheckboxGroup/types.d.ts +2 -2
  354. package/dist/types/components/ui/GChip/GChip.vue.d.ts +218 -224
  355. package/dist/types/components/ui/GChip/index.d.ts +2 -2
  356. package/dist/types/components/ui/GChip/types.d.ts +140 -140
  357. package/dist/types/components/ui/GCombobox/GCombobox.vue.d.ts +12 -10
  358. package/dist/types/components/ui/GCombobox/index.d.ts +2 -2
  359. package/dist/types/components/ui/GCombobox/types.d.ts +11 -11
  360. package/dist/types/components/ui/GDivider/GDivider.vue.d.ts +445 -451
  361. package/dist/types/components/ui/GDivider/index.d.ts +2 -2
  362. package/dist/types/components/ui/GDivider/types.d.ts +186 -186
  363. package/dist/types/components/ui/GDrawer/GDrawer.vue.d.ts +135 -141
  364. package/dist/types/components/ui/GDrawer/index.d.ts +2 -2
  365. package/dist/types/components/ui/GDrawer/types.d.ts +44 -44
  366. package/dist/types/components/ui/GDropdown/GDropdown.vue.d.ts +94 -102
  367. package/dist/types/components/ui/GDropdown/index.d.ts +1 -1
  368. package/dist/types/components/ui/GDropdown/types.d.ts +40 -40
  369. package/dist/types/components/ui/GDropdownGroup/GDropdownGroup.vue.d.ts +3 -9
  370. package/dist/types/components/ui/GDropdownGroup/index.d.ts +2 -2
  371. package/dist/types/components/ui/GDropdownSelect/GDropdownSelect.vue.d.ts +11 -9
  372. package/dist/types/components/ui/GDropdownSelect/types.d.ts +2 -2
  373. package/dist/types/components/ui/GExpansion/GExpansion.vue.d.ts +51 -49
  374. package/dist/types/components/ui/GExpansion/index.d.ts +1 -1
  375. package/dist/types/components/ui/GExpansion/types.d.ts +154 -154
  376. package/dist/types/components/ui/GExpansionGroup/GExpansionGroup.vue.d.ts +17 -15
  377. package/dist/types/components/ui/GExpansionGroup/index.d.ts +1 -1
  378. package/dist/types/components/ui/GExpansionGroup/types.d.ts +7 -7
  379. package/dist/types/components/ui/GFAB/GFAB.vue.d.ts +81 -87
  380. package/dist/types/components/ui/GFAB/index.d.ts +1 -1
  381. package/dist/types/components/ui/GFAB/types.d.ts +57 -57
  382. package/dist/types/components/ui/GFieldBase/GFieldBase.vue.d.ts +64 -70
  383. package/dist/types/components/ui/GFieldBase/props.d.ts +81 -81
  384. package/dist/types/components/ui/GForm/GForm.vue.d.ts +32 -40
  385. package/dist/types/components/ui/GForm/index.d.ts +2 -2
  386. package/dist/types/components/ui/GForm/types.d.ts +10 -10
  387. package/dist/types/components/ui/GGradient/GGradient.vue.d.ts +96 -102
  388. package/dist/types/components/ui/GGradient/GGradientBorderLayer.vue.d.ts +10 -4
  389. package/dist/types/components/ui/GGradient/index.d.ts +2 -2
  390. package/dist/types/components/ui/GGradient/types.d.ts +4 -4
  391. package/dist/types/components/ui/GGradientMaterial/GGradientMaterial.vue.d.ts +84 -90
  392. package/dist/types/components/ui/GGradientMaterial/index.d.ts +2 -2
  393. package/dist/types/components/ui/GGradientMaterial/types.d.ts +15 -15
  394. package/dist/types/components/ui/GIcon/GIcon.vue.d.ts +5 -5
  395. package/dist/types/components/ui/GIcon/index.d.ts +2 -2
  396. package/dist/types/components/ui/GIcon/sets/MdiIconSet.vue.d.ts +1 -1
  397. package/dist/types/components/ui/GIcon/types.d.ts +1 -1
  398. package/dist/types/components/ui/GIcon.vue.d.ts +2 -2
  399. package/dist/types/components/ui/GImg/GImg.vue.d.ts +266 -0
  400. package/dist/types/components/ui/GImg/index.d.ts +2 -0
  401. package/dist/types/components/ui/GImg/types.d.ts +174 -0
  402. package/dist/types/components/ui/GInput/GInput.vue.d.ts +14 -323
  403. package/dist/types/components/ui/GInput/SwitchPassword.vue.d.ts +2 -2
  404. package/dist/types/components/ui/GInput/index.d.ts +2 -2
  405. package/dist/types/components/ui/GInput/types.d.ts +2 -2
  406. package/dist/types/components/ui/GLoading/GLoading.vue.d.ts +30 -36
  407. package/dist/types/components/ui/GLoading/types.d.ts +9 -9
  408. package/dist/types/components/ui/GMenu/GMenu.vue.d.ts +18 -24
  409. package/dist/types/components/ui/GMenu/GSubmenu.vue.d.ts +16 -259
  410. package/dist/types/components/ui/GMenu/index.d.ts +1 -1
  411. package/dist/types/components/ui/GMenuItem/GMenuItem.vue.d.ts +89 -95
  412. package/dist/types/components/ui/GMenuItem/types.d.ts +32 -32
  413. package/dist/types/components/ui/GModal/GModal.vue.d.ts +139 -145
  414. package/dist/types/components/ui/GModal/index.d.ts +2 -2
  415. package/dist/types/components/ui/GModal/types.d.ts +48 -48
  416. package/dist/types/components/ui/GNavList/GNavGroup.vue.d.ts +11 -9
  417. package/dist/types/components/ui/GNavList/GNavItem.vue.d.ts +16 -14
  418. package/dist/types/components/ui/GNavList/GNavList.vue.d.ts +24 -22
  419. package/dist/types/components/ui/GNavList/context.d.ts +2 -2
  420. package/dist/types/components/ui/GNavList/groupContext.d.ts +1 -1
  421. package/dist/types/components/ui/GNavList/index.d.ts +4 -4
  422. package/dist/types/components/ui/GNavList/types.d.ts +27 -27
  423. package/dist/types/components/ui/GNavbar/GNavbar.vue.d.ts +16 -14
  424. package/dist/types/components/ui/GNavbar/GNavbarItem.vue.d.ts +20 -18
  425. package/dist/types/components/ui/GNavbar/GNavbarMenu.vue.d.ts +20 -18
  426. package/dist/types/components/ui/GNavbar/GNavbarSubItem.vue.d.ts +14 -12
  427. package/dist/types/components/ui/GNavbar/context.d.ts +2 -2
  428. package/dist/types/components/ui/GNavbar/index.d.ts +5 -5
  429. package/dist/types/components/ui/GNavbar/menuContext.d.ts +1 -1
  430. package/dist/types/components/ui/GNavbar/types.d.ts +30 -30
  431. package/dist/types/components/ui/GProgress/GProgress.vue.d.ts +83 -91
  432. package/dist/types/components/ui/GProgress/index.d.ts +1 -1
  433. package/dist/types/components/ui/GProgress/types.d.ts +16 -16
  434. package/dist/types/components/ui/GQuickActions/GQuickActions.vue.d.ts +26 -32
  435. package/dist/types/components/ui/GQuickActions/index.d.ts +2 -2
  436. package/dist/types/components/ui/GQuickActions/types.d.ts +3 -3
  437. package/dist/types/components/ui/GRadio/GRadio.vue.d.ts +12 -10
  438. package/dist/types/components/ui/GRadio/GRadioItem.vue.d.ts +13 -11
  439. package/dist/types/components/ui/GRadio/index.d.ts +3 -3
  440. package/dist/types/components/ui/GRadio/types.d.ts +2 -2
  441. package/dist/types/components/ui/GSelect/GSelect.vue.d.ts +12 -10
  442. package/dist/types/components/ui/GSelect/index.d.ts +2 -2
  443. package/dist/types/components/ui/GSelect/types.d.ts +10 -10
  444. package/dist/types/components/ui/GSelectItem.vue.d.ts +5 -11
  445. package/dist/types/components/ui/GSnackbar/GSnackbar.vue.d.ts +411 -417
  446. package/dist/types/components/ui/GSnackbar/index.d.ts +2 -2
  447. package/dist/types/components/ui/GSnackbar/types.d.ts +164 -164
  448. package/dist/types/components/ui/GSquircle/GSquircle.vue.d.ts +8 -14
  449. package/dist/types/components/ui/GSquircle/index.d.ts +1 -1
  450. package/dist/types/components/ui/GSquircle/types.d.ts +5 -5
  451. package/dist/types/components/ui/GStepper/GStepItem.vue.d.ts +8 -6
  452. package/dist/types/components/ui/GStepper/GStepPanel.vue.d.ts +35 -33
  453. package/dist/types/components/ui/GStepper/GStepper.vue.d.ts +32 -30
  454. package/dist/types/components/ui/GStepper/GStepperActions.vue.d.ts +9 -7
  455. package/dist/types/components/ui/GStepper/context.d.ts +4 -4
  456. package/dist/types/components/ui/GStepper/index.d.ts +4 -4
  457. package/dist/types/components/ui/GStepper/types.d.ts +182 -182
  458. package/dist/types/components/ui/GSwitch/GSwitch.vue.d.ts +10 -211
  459. package/dist/types/components/ui/GSwitch/index.d.ts +2 -2
  460. package/dist/types/components/ui/GSwitch/types.d.ts +1 -1
  461. package/dist/types/components/ui/GTable/GTable.vue.d.ts +61 -59
  462. package/dist/types/components/ui/GTable/GTableBody.vue.d.ts +8 -6
  463. package/dist/types/components/ui/GTable/GTableCell.vue.d.ts +9 -7
  464. package/dist/types/components/ui/GTable/GTableExpandedRow.vue.d.ts +10 -8
  465. package/dist/types/components/ui/GTable/GTableHead.vue.d.ts +9 -7
  466. package/dist/types/components/ui/GTable/GTableRow.vue.d.ts +8 -6
  467. package/dist/types/components/ui/GTable/context.d.ts +1 -1
  468. package/dist/types/components/ui/GTable/index.d.ts +3 -3
  469. package/dist/types/components/ui/GTable/types.d.ts +161 -161
  470. package/dist/types/components/ui/GTable/useTable.d.ts +3 -3
  471. package/dist/types/components/ui/GTable/useTableExpansion.d.ts +1 -1
  472. package/dist/types/components/ui/GTable/useTableSpans.d.ts +1 -1
  473. package/dist/types/components/ui/GTabs/GTab.vue.d.ts +14 -12
  474. package/dist/types/components/ui/GTabs/GTabList.vue.d.ts +3 -9
  475. package/dist/types/components/ui/GTabs/GTabPanel.vue.d.ts +9 -7
  476. package/dist/types/components/ui/GTabs/GTabPanels.vue.d.ts +6 -12
  477. package/dist/types/components/ui/GTabs/GTabs.vue.d.ts +24 -22
  478. package/dist/types/components/ui/GTabs/context.d.ts +3 -3
  479. package/dist/types/components/ui/GTabs/index.d.ts +6 -6
  480. package/dist/types/components/ui/GTabs/types.d.ts +24 -24
  481. package/dist/types/components/ui/GText/GText.vue.d.ts +5 -10
  482. package/dist/types/components/ui/GText/index.d.ts +1 -1
  483. package/dist/types/components/ui/GText/types.d.ts +1 -1
  484. package/dist/types/components/ui/GTextarea/GTextarea.vue.d.ts +14 -290
  485. package/dist/types/components/ui/GTextarea/index.d.ts +2 -2
  486. package/dist/types/components/ui/GTextarea/types.d.ts +2 -2
  487. package/dist/types/components/ui/GToggleButton/GToggleButton.vue.d.ts +10 -760
  488. package/dist/types/components/ui/GToggleButton/index.d.ts +2 -2
  489. package/dist/types/components/ui/GToggleButton/types.d.ts +127 -127
  490. package/dist/types/components/ui/GTooltip/GTooltip.vue.d.ts +79 -85
  491. package/dist/types/components/ui/GTooltip/index.d.ts +1 -1
  492. package/dist/types/components/ui/GTooltip/types.d.ts +37 -37
  493. package/dist/types/directives/gradientIcon.d.ts +1 -1
  494. package/dist/types/directives/gradientText.d.ts +2 -2
  495. package/dist/types/directives/index.d.ts +13 -13
  496. package/dist/types/directives/loading.d.ts +5 -5
  497. package/dist/types/directives/mask.d.ts +1 -1
  498. package/dist/types/directives/ripple.d.ts +1 -1
  499. package/dist/types/directives/specular.d.ts +1 -1
  500. package/dist/types/index.d.ts +13 -17
  501. package/dist/types/plugin.d.ts +15 -0
  502. package/dist/types/services/context.d.ts +8 -0
  503. package/dist/types/services/index.d.ts +4 -2
  504. package/dist/types/services/runtime.d.ts +5 -0
  505. package/dist/types/services/useLoading.d.ts +5 -2
  506. package/dist/types/services/useSnackbar.d.ts +5 -2
  507. package/dist/types/ssr/index.d.ts +2 -0
  508. package/dist/types/ssr/use/appScopedState.d.ts +1 -0
  509. package/dist/types/ssr/use/clientLifecycle.d.ts +2 -0
  510. package/dist/types/ssr/use/hydration.d.ts +2 -0
  511. package/dist/types/ssr/use/id.d.ts +1 -0
  512. package/dist/types/ssr/use/index.d.ts +6 -0
  513. package/dist/types/ssr/use/teleport.d.ts +11 -0
  514. package/dist/types/ssr/use/viewport.d.ts +12 -0
  515. package/dist/types/ssr/utils/environment.d.ts +11 -0
  516. package/dist/types/ssr/utils/head.d.ts +28 -0
  517. package/dist/types/ssr/utils/index.d.ts +3 -0
  518. package/dist/types/ssr/utils/mount.d.ts +21 -0
  519. package/dist/types/theme/color.d.ts +1 -1
  520. package/dist/types/theme/colorSystem.d.ts +3 -3
  521. package/dist/types/theme/cssTokens.d.ts +3 -2
  522. package/dist/types/theme/default.d.ts +13 -6
  523. package/dist/types/theme/index.d.ts +7 -6
  524. package/dist/types/theme/palette.d.ts +1 -1
  525. package/dist/types/theme/scheme.d.ts +1 -1
  526. package/dist/types/theme/types.d.ts +1 -1
  527. package/dist/types/types/CommonTypes.d.ts +2 -2
  528. package/dist/types/use/PLA.d.ts +1 -1
  529. package/dist/types/use/actionProps.d.ts +15 -15
  530. package/dist/types/use/actionSurface.d.ts +45 -45
  531. package/dist/types/use/appendTarget.d.ts +2 -1
  532. package/dist/types/use/breakpoints/index.d.ts +10 -1
  533. package/dist/types/use/check/booleanControl.d.ts +13 -13
  534. package/dist/types/use/check/index.d.ts +6 -6
  535. package/dist/types/use/check/optionGroup.d.ts +7 -7
  536. package/dist/types/use/check/types.d.ts +55 -55
  537. package/dist/types/use/color.d.ts +2 -2
  538. package/dist/types/use/colorResolver.d.ts +2 -2
  539. package/dist/types/use/density.d.ts +1 -1
  540. package/dist/types/use/expansion/controller.d.ts +1 -1
  541. package/dist/types/use/expansion/di.d.ts +1 -1
  542. package/dist/types/use/expansion/index.d.ts +3 -3
  543. package/dist/types/use/floating.d.ts +18 -18
  544. package/dist/types/use/floatingLayer.d.ts +1 -1
  545. package/dist/types/use/form/control.d.ts +1 -1
  546. package/dist/types/use/form/props.d.ts +25 -25
  547. package/dist/types/use/form/textFieldComponent.d.ts +1 -3
  548. package/dist/types/use/form/textFieldControl.d.ts +7 -7
  549. package/dist/types/use/glass.d.ts +2 -2
  550. package/dist/types/use/gradient.d.ts +81 -81
  551. package/dist/types/use/gradientGlow.d.ts +7 -7
  552. package/dist/types/use/gradientMaterial.d.ts +3 -3
  553. package/dist/types/use/gradientRuntime.d.ts +2 -2
  554. package/dist/types/use/gradientRuntimeRegistry.d.ts +1 -1
  555. package/dist/types/use/gradientSurface.d.ts +5 -5
  556. package/dist/types/use/group/di.d.ts +1 -1
  557. package/dist/types/use/group/groupController.d.ts +1 -1
  558. package/dist/types/use/index.d.ts +23 -22
  559. package/dist/types/use/input/index.d.ts +4 -4
  560. package/dist/types/use/input/props.d.ts +71 -71
  561. package/dist/types/use/layerStack.d.ts +3 -3
  562. package/dist/types/use/material.d.ts +9 -9
  563. package/dist/types/use/materialSurface.d.ts +103 -103
  564. package/dist/types/use/menu.d.ts +5 -5
  565. package/dist/types/use/menuContext.d.ts +1 -1
  566. package/dist/types/use/navigation/controller.d.ts +1 -1
  567. package/dist/types/use/navigation/index.d.ts +4 -4
  568. package/dist/types/use/navigation/item.d.ts +1 -1
  569. package/dist/types/use/navigation/keyboard.d.ts +1 -1
  570. package/dist/types/use/open.d.ts +1 -1
  571. package/dist/types/use/overlay.d.ts +18 -18
  572. package/dist/types/use/placement.d.ts +2 -2
  573. package/dist/types/use/px.d.ts +1 -1
  574. package/dist/types/use/select/comboboxController.d.ts +9 -9
  575. package/dist/types/use/select/commit.d.ts +2 -2
  576. package/dist/types/use/select/controller.d.ts +9 -9
  577. package/dist/types/use/select/creatable.d.ts +1 -1
  578. package/dist/types/use/select/fieldControl.d.ts +7 -7
  579. package/dist/types/use/select/filter.d.ts +1 -1
  580. package/dist/types/use/select/items.d.ts +1 -1
  581. package/dist/types/use/select/listboxKeyboard.d.ts +1 -1
  582. package/dist/types/use/select/menuItems.d.ts +2 -2
  583. package/dist/types/use/select/menuSlot.d.ts +2 -2
  584. package/dist/types/use/select/modelFallbackItems.d.ts +2 -2
  585. package/dist/types/use/select/selection.d.ts +1 -1
  586. package/dist/types/use/select/selectionController.d.ts +1 -1
  587. package/dist/types/use/select/selectionSummary.d.ts +1 -1
  588. package/dist/types/use/select/tokenInputKeyboard.d.ts +1 -1
  589. package/dist/types/use/selected.d.ts +1 -1
  590. package/dist/types/use/size.d.ts +2 -2
  591. package/dist/types/use/state.d.ts +1 -1
  592. package/dist/types/use/stateIcon.d.ts +1 -1
  593. package/dist/types/use/stepper/controller.d.ts +1 -1
  594. package/dist/types/use/stepper/index.d.ts +1 -1
  595. package/dist/types/use/surface.d.ts +26 -26
  596. package/dist/types/use/surfaceColor.d.ts +3 -3
  597. package/dist/types/use/surfaceMaterial.d.ts +8 -8
  598. package/dist/types/use/textarea/index.d.ts +2 -2
  599. package/dist/types/use/textarea/props.d.ts +69 -69
  600. package/dist/types/use/transition.d.ts +5 -5
  601. package/dist/types/use/variant.d.ts +1 -1
  602. package/dist/types/utils/createComponentId.d.ts +1 -1
  603. package/dist/types/utils/createId.d.ts +1 -1
  604. package/dist/types-BItiZqNo.cjs +1 -0
  605. package/dist/types-BPZPPi6n.cjs +1 -0
  606. package/dist/types-BZSR5qEq.js +69 -0
  607. package/dist/types-CAh-uxuw.js +113 -0
  608. package/dist/types-Ce2Qoz6Q.js +90 -0
  609. package/dist/types-DGs8vjIX.cjs +1 -0
  610. package/dist/types-D_HgEWtj.js +95 -0
  611. package/dist/types-DmWFHzOk.js +80 -0
  612. package/dist/types-DsVDdHxP.cjs +1 -0
  613. package/dist/types-cjs/componentNames.d.cts +5 -0
  614. package/dist/types-cjs/components/GGroup/GGroup.vue.d.cts +24 -0
  615. package/dist/types-cjs/components/GGroup/index.d.cts +1 -0
  616. package/dist/types-cjs/components/GGroup/types.d.cts +0 -0
  617. package/dist/types-cjs/components/index.d.cts +55 -0
  618. package/dist/types-cjs/components/transitions/GExpandTransition.vue.d.cts +234 -0
  619. package/dist/types-cjs/components/transitions/GTransition.vue.d.cts +234 -0
  620. package/dist/types-cjs/components/transitions/GTransitionGroup.vue.d.cts +218 -0
  621. package/dist/types-cjs/components/transitions/TransitionExpansion.vue.d.cts +18 -0
  622. package/dist/types-cjs/components/transitions/TransitionOverlay.vue.d.cts +15 -0
  623. package/dist/types-cjs/components/transitions/TransitionRotate.vue.d.cts +11 -0
  624. package/dist/types-cjs/components/transitions/TransitionScale.vue.d.cts +15 -0
  625. package/dist/types-cjs/components/transitions/TransitionStaggerTranslate.vue.d.cts +11 -0
  626. package/dist/types-cjs/components/transitions/index.d.cts +3 -0
  627. package/dist/types-cjs/components/ui/BaseFloating/BaseFloating.vue.d.cts +237 -0
  628. package/dist/types-cjs/components/ui/BaseFloating/index.d.cts +1 -0
  629. package/dist/types-cjs/components/ui/BaseFloating/types.d.cts +0 -0
  630. package/dist/types-cjs/components/ui/BaseOverlay/BaseOverlay.vue.d.cts +228 -0
  631. package/dist/types-cjs/components/ui/BaseOverlay/index.d.cts +1 -0
  632. package/dist/types-cjs/components/ui/BaseOverlay/types.d.cts +108 -0
  633. package/dist/types-cjs/components/ui/GAction/GAction.vue.d.cts +2 -0
  634. package/dist/types-cjs/components/ui/GAction/index.d.cts +1 -0
  635. package/dist/types-cjs/components/ui/GAction/types.d.cts +33 -0
  636. package/dist/types-cjs/components/ui/GAlert/GAlert.vue.d.cts +756 -0
  637. package/dist/types-cjs/components/ui/GAlert/index.d.cts +1 -0
  638. package/dist/types-cjs/components/ui/GAlert/types.d.cts +400 -0
  639. package/dist/types-cjs/components/ui/GAside/GAside.vue.d.cts +50 -0
  640. package/dist/types-cjs/components/ui/GAside/GAsideGroup.vue.d.cts +30 -0
  641. package/dist/types-cjs/components/ui/GAside/GAsideItem.vue.d.cts +37 -0
  642. package/dist/types-cjs/components/ui/GAside/context.d.cts +15 -0
  643. package/dist/types-cjs/components/ui/GAside/groupContext.d.cts +7 -0
  644. package/dist/types-cjs/components/ui/GAside/index.d.cts +4 -0
  645. package/dist/types-cjs/components/ui/GAside/types.d.cts +273 -0
  646. package/dist/types-cjs/components/ui/GAvatar/GAvatar.vue.d.cts +867 -0
  647. package/dist/types-cjs/components/ui/GAvatar/GAvatarGroup.vue.d.cts +188 -0
  648. package/dist/types-cjs/components/ui/GAvatar/index.d.cts +3 -0
  649. package/dist/types-cjs/components/ui/GAvatar/types.d.cts +585 -0
  650. package/dist/types-cjs/components/ui/GBadge/GBadge.vue.d.cts +786 -0
  651. package/dist/types-cjs/components/ui/GBadge/index.d.cts +2 -0
  652. package/dist/types-cjs/components/ui/GBadge/types.d.cts +422 -0
  653. package/dist/types-cjs/components/ui/GButton/GButton.vue.d.cts +820 -0
  654. package/dist/types-cjs/components/ui/GButton/index.d.cts +2 -0
  655. package/dist/types-cjs/components/ui/GButton/types.d.cts +457 -0
  656. package/dist/types-cjs/components/ui/GCard/GCard.vue.d.cts +943 -0
  657. package/dist/types-cjs/components/ui/GCard/index.d.cts +2 -0
  658. package/dist/types-cjs/components/ui/GCard/types.d.cts +519 -0
  659. package/dist/types-cjs/components/ui/GCheckControl/GCheckControl.vue.d.cts +242 -0
  660. package/dist/types-cjs/components/ui/GCheckControl/GCheckGroup.vue.d.cts +184 -0
  661. package/dist/types-cjs/components/ui/GCheckControl/GCheckIndicator.vue.d.cts +28 -0
  662. package/dist/types-cjs/components/ui/GCheckControl/index.d.cts +3 -0
  663. package/dist/types-cjs/components/ui/GCheckbox/GCheckbox.vue.d.cts +27 -0
  664. package/dist/types-cjs/components/ui/GCheckbox/index.d.cts +2 -0
  665. package/dist/types-cjs/components/ui/GCheckbox/types.d.cts +1 -0
  666. package/dist/types-cjs/components/ui/GCheckboxGroup/GCheckboxGroup.vue.d.cts +26 -0
  667. package/dist/types-cjs/components/ui/GCheckboxGroup/index.d.cts +2 -0
  668. package/dist/types-cjs/components/ui/GCheckboxGroup/types.d.cts +12 -0
  669. package/dist/types-cjs/components/ui/GChip/GChip.vue.d.cts +731 -0
  670. package/dist/types-cjs/components/ui/GChip/index.d.cts +2 -0
  671. package/dist/types-cjs/components/ui/GChip/types.d.cts +403 -0
  672. package/dist/types-cjs/components/ui/GCombobox/GCombobox.vue.d.cts +39 -0
  673. package/dist/types-cjs/components/ui/GCombobox/index.d.cts +2 -0
  674. package/dist/types-cjs/components/ui/GCombobox/types.d.cts +59 -0
  675. package/dist/types-cjs/components/ui/GDivider/GDivider.vue.d.cts +959 -0
  676. package/dist/types-cjs/components/ui/GDivider/index.d.cts +2 -0
  677. package/dist/types-cjs/components/ui/GDivider/types.d.cts +518 -0
  678. package/dist/types-cjs/components/ui/GDrawer/GDrawer.vue.d.cts +429 -0
  679. package/dist/types-cjs/components/ui/GDrawer/index.d.cts +2 -0
  680. package/dist/types-cjs/components/ui/GDrawer/types.d.cts +205 -0
  681. package/dist/types-cjs/components/ui/GDropdown/GDropdown.vue.d.cts +418 -0
  682. package/dist/types-cjs/components/ui/GDropdown/index.d.cts +1 -0
  683. package/dist/types-cjs/components/ui/GDropdown/types.d.cts +208 -0
  684. package/dist/types-cjs/components/ui/GDropdownGroup/GDropdownGroup.vue.d.cts +23 -0
  685. package/dist/types-cjs/components/ui/GDropdownGroup/index.d.cts +2 -0
  686. package/dist/types-cjs/components/ui/GDropdownGroup/types.d.cts +10 -0
  687. package/dist/types-cjs/components/ui/GDropdownSelect/GDropdownSelect.vue.d.cts +19 -0
  688. package/dist/types-cjs/components/ui/GDropdownSelect/index.d.cts +0 -0
  689. package/dist/types-cjs/components/ui/GDropdownSelect/types.d.cts +14 -0
  690. package/dist/types-cjs/components/ui/GExpansion/GExpansion.vue.d.cts +110 -0
  691. package/dist/types-cjs/components/ui/GExpansion/index.d.cts +1 -0
  692. package/dist/types-cjs/components/ui/GExpansion/types.d.cts +479 -0
  693. package/dist/types-cjs/components/ui/GExpansionGroup/GExpansionGroup.vue.d.cts +34 -0
  694. package/dist/types-cjs/components/ui/GExpansionGroup/index.d.cts +1 -0
  695. package/dist/types-cjs/components/ui/GExpansionGroup/types.d.cts +61 -0
  696. package/dist/types-cjs/components/ui/GFAB/GFAB.vue.d.cts +415 -0
  697. package/dist/types-cjs/components/ui/GFAB/index.d.cts +1 -0
  698. package/dist/types-cjs/components/ui/GFAB/types.d.cts +247 -0
  699. package/dist/types-cjs/components/ui/GFieldBase/GFieldBase.vue.d.cts +312 -0
  700. package/dist/types-cjs/components/ui/GFieldBase/props.d.cts +256 -0
  701. package/dist/types-cjs/components/ui/GForm/GForm.vue.d.cts +148 -0
  702. package/dist/types-cjs/components/ui/GForm/index.d.cts +2 -0
  703. package/dist/types-cjs/components/ui/GForm/types.d.cts +107 -0
  704. package/dist/types-cjs/components/ui/GGradient/GGradient.vue.d.cts +362 -0
  705. package/dist/types-cjs/components/ui/GGradient/GGradientBorderLayer.vue.d.cts +17 -0
  706. package/dist/types-cjs/components/ui/GGradient/index.d.cts +2 -0
  707. package/dist/types-cjs/components/ui/GGradient/types.d.cts +23 -0
  708. package/dist/types-cjs/components/ui/GGradientMaterial/GGradientMaterial.vue.d.cts +251 -0
  709. package/dist/types-cjs/components/ui/GGradientMaterial/index.d.cts +2 -0
  710. package/dist/types-cjs/components/ui/GGradientMaterial/types.d.cts +140 -0
  711. package/dist/types-cjs/components/ui/GIcon/GIcon.vue.d.cts +31 -0
  712. package/dist/types-cjs/components/ui/GIcon/index.d.cts +2 -0
  713. package/dist/types-cjs/components/ui/GIcon/sets/MdiIconSet.vue.d.cts +3 -0
  714. package/dist/types-cjs/components/ui/GIcon/types.d.cts +24 -0
  715. package/dist/types-cjs/components/ui/GIcon.vue.d.cts +6 -0
  716. package/dist/types-cjs/components/ui/GImg/GImg.vue.d.cts +266 -0
  717. package/dist/types-cjs/components/ui/GImg/index.d.cts +2 -0
  718. package/dist/types-cjs/components/ui/GImg/types.d.cts +174 -0
  719. package/dist/types-cjs/components/ui/GInput/GInput.vue.d.cts +33 -0
  720. package/dist/types-cjs/components/ui/GInput/SwitchPassword.vue.d.cts +9 -0
  721. package/dist/types-cjs/components/ui/GInput/index.d.cts +2 -0
  722. package/dist/types-cjs/components/ui/GInput/types.d.cts +8 -0
  723. package/dist/types-cjs/components/ui/GLoading/GLoading.vue.d.cts +128 -0
  724. package/dist/types-cjs/components/ui/GLoading/types.d.cts +63 -0
  725. package/dist/types-cjs/components/ui/GMenu/GMenu.vue.d.cts +87 -0
  726. package/dist/types-cjs/components/ui/GMenu/GSubmenu.vue.d.cts +26 -0
  727. package/dist/types-cjs/components/ui/GMenu/index.d.cts +1 -0
  728. package/dist/types-cjs/components/ui/GMenu/types.d.cts +0 -0
  729. package/dist/types-cjs/components/ui/GMenuItem/GMenuItem.vue.d.cts +175 -0
  730. package/dist/types-cjs/components/ui/GMenuItem/index.d.cts +0 -0
  731. package/dist/types-cjs/components/ui/GMenuItem/types.d.cts +93 -0
  732. package/dist/types-cjs/components/ui/GModal/GModal.vue.d.cts +420 -0
  733. package/dist/types-cjs/components/ui/GModal/index.d.cts +2 -0
  734. package/dist/types-cjs/components/ui/GModal/types.d.cts +198 -0
  735. package/dist/types-cjs/components/ui/GNavList/GNavGroup.vue.d.cts +30 -0
  736. package/dist/types-cjs/components/ui/GNavList/GNavItem.vue.d.cts +37 -0
  737. package/dist/types-cjs/components/ui/GNavList/GNavList.vue.d.cts +42 -0
  738. package/dist/types-cjs/components/ui/GNavList/context.d.cts +15 -0
  739. package/dist/types-cjs/components/ui/GNavList/groupContext.d.cts +7 -0
  740. package/dist/types-cjs/components/ui/GNavList/index.d.cts +4 -0
  741. package/dist/types-cjs/components/ui/GNavList/types.d.cts +249 -0
  742. package/dist/types-cjs/components/ui/GNavbar/GNavbar.vue.d.cts +36 -0
  743. package/dist/types-cjs/components/ui/GNavbar/GNavbarItem.vue.d.cts +41 -0
  744. package/dist/types-cjs/components/ui/GNavbar/GNavbarMenu.vue.d.cts +43 -0
  745. package/dist/types-cjs/components/ui/GNavbar/GNavbarSubItem.vue.d.cts +42 -0
  746. package/dist/types-cjs/components/ui/GNavbar/context.d.cts +17 -0
  747. package/dist/types-cjs/components/ui/GNavbar/index.d.cts +5 -0
  748. package/dist/types-cjs/components/ui/GNavbar/menuContext.d.cts +9 -0
  749. package/dist/types-cjs/components/ui/GNavbar/types.d.cts +330 -0
  750. package/dist/types-cjs/components/ui/GProgress/GProgress.vue.d.cts +194 -0
  751. package/dist/types-cjs/components/ui/GProgress/index.d.cts +1 -0
  752. package/dist/types-cjs/components/ui/GProgress/types.d.cts +121 -0
  753. package/dist/types-cjs/components/ui/GQuickActions/GQuickActions.vue.d.cts +40 -0
  754. package/dist/types-cjs/components/ui/GQuickActions/index.d.cts +2 -0
  755. package/dist/types-cjs/components/ui/GQuickActions/types.d.cts +19 -0
  756. package/dist/types-cjs/components/ui/GRadio/GRadio.vue.d.cts +26 -0
  757. package/dist/types-cjs/components/ui/GRadio/GRadioItem.vue.d.cts +34 -0
  758. package/dist/types-cjs/components/ui/GRadio/index.d.cts +3 -0
  759. package/dist/types-cjs/components/ui/GRadio/types.d.cts +12 -0
  760. package/dist/types-cjs/components/ui/GSelect/GSelect.vue.d.cts +31 -0
  761. package/dist/types-cjs/components/ui/GSelect/index.d.cts +2 -0
  762. package/dist/types-cjs/components/ui/GSelect/types.d.cts +38 -0
  763. package/dist/types-cjs/components/ui/GSelectItem.vue.d.cts +43 -0
  764. package/dist/types-cjs/components/ui/GSnackbar/GSnackbar.vue.d.cts +986 -0
  765. package/dist/types-cjs/components/ui/GSnackbar/index.d.cts +2 -0
  766. package/dist/types-cjs/components/ui/GSnackbar/types.d.cts +515 -0
  767. package/dist/types-cjs/components/ui/GSquircle/GSquircle.vue.d.cts +19 -0
  768. package/dist/types-cjs/components/ui/GSquircle/index.d.cts +1 -0
  769. package/dist/types-cjs/components/ui/GSquircle/types.d.cts +20 -0
  770. package/dist/types-cjs/components/ui/GStepper/GStepItem.vue.d.cts +18 -0
  771. package/dist/types-cjs/components/ui/GStepper/GStepPanel.vue.d.cts +78 -0
  772. package/dist/types-cjs/components/ui/GStepper/GStepper.vue.d.cts +65 -0
  773. package/dist/types-cjs/components/ui/GStepper/GStepperActions.vue.d.cts +24 -0
  774. package/dist/types-cjs/components/ui/GStepper/context.d.cts +42 -0
  775. package/dist/types-cjs/components/ui/GStepper/index.d.cts +4 -0
  776. package/dist/types-cjs/components/ui/GStepper/types.d.cts +708 -0
  777. package/dist/types-cjs/components/ui/GSwitch/GSwitch.vue.d.cts +27 -0
  778. package/dist/types-cjs/components/ui/GSwitch/index.d.cts +2 -0
  779. package/dist/types-cjs/components/ui/GSwitch/types.d.cts +1 -0
  780. package/dist/types-cjs/components/ui/GTable/GTable.vue.d.cts +193 -0
  781. package/dist/types-cjs/components/ui/GTable/GTableBody.vue.d.cts +71 -0
  782. package/dist/types-cjs/components/ui/GTable/GTableCell.vue.d.cts +37 -0
  783. package/dist/types-cjs/components/ui/GTable/GTableExpandedRow.vue.d.cts +27 -0
  784. package/dist/types-cjs/components/ui/GTable/GTableHead.vue.d.cts +32 -0
  785. package/dist/types-cjs/components/ui/GTable/GTableRow.vue.d.cts +42 -0
  786. package/dist/types-cjs/components/ui/GTable/context.d.cts +25 -0
  787. package/dist/types-cjs/components/ui/GTable/index.d.cts +3 -0
  788. package/dist/types-cjs/components/ui/GTable/types.d.cts +670 -0
  789. package/dist/types-cjs/components/ui/GTable/useTable.d.cts +22 -0
  790. package/dist/types-cjs/components/ui/GTable/useTableExpansion.d.cts +17 -0
  791. package/dist/types-cjs/components/ui/GTable/useTableSpans.d.cts +12 -0
  792. package/dist/types-cjs/components/ui/GTabs/GTab.vue.d.cts +29 -0
  793. package/dist/types-cjs/components/ui/GTabs/GTabList.vue.d.cts +32 -0
  794. package/dist/types-cjs/components/ui/GTabs/GTabPanel.vue.d.cts +22 -0
  795. package/dist/types-cjs/components/ui/GTabs/GTabPanels.vue.d.cts +30 -0
  796. package/dist/types-cjs/components/ui/GTabs/GTabs.vue.d.cts +42 -0
  797. package/dist/types-cjs/components/ui/GTabs/context.d.cts +28 -0
  798. package/dist/types-cjs/components/ui/GTabs/index.d.cts +6 -0
  799. package/dist/types-cjs/components/ui/GTabs/types.d.cts +214 -0
  800. package/dist/types-cjs/components/ui/GText/GText.vue.d.cts +12 -0
  801. package/dist/types-cjs/components/ui/GText/index.d.cts +1 -0
  802. package/dist/types-cjs/components/ui/GText/types.d.cts +8 -0
  803. package/dist/types-cjs/components/ui/GTextarea/GTextarea.vue.d.cts +33 -0
  804. package/dist/types-cjs/components/ui/GTextarea/index.d.cts +2 -0
  805. package/dist/types-cjs/components/ui/GTextarea/types.d.cts +6 -0
  806. package/dist/types-cjs/components/ui/GToggleButton/GToggleButton.vue.d.cts +27 -0
  807. package/dist/types-cjs/components/ui/GToggleButton/index.d.cts +2 -0
  808. package/dist/types-cjs/components/ui/GToggleButton/types.d.cts +425 -0
  809. package/dist/types-cjs/components/ui/GTooltip/GTooltip.vue.d.cts +353 -0
  810. package/dist/types-cjs/components/ui/GTooltip/index.d.cts +1 -0
  811. package/dist/types-cjs/components/ui/GTooltip/types.d.cts +179 -0
  812. package/dist/types-cjs/directives/gradientIcon.d.cts +4 -0
  813. package/dist/types-cjs/directives/gradientText.d.cts +17 -0
  814. package/dist/types-cjs/directives/index.d.cts +13 -0
  815. package/dist/types-cjs/directives/loading.d.cts +19 -0
  816. package/dist/types-cjs/directives/mask.d.cts +13 -0
  817. package/dist/types-cjs/directives/ripple.d.cts +30 -0
  818. package/dist/types-cjs/directives/specular.d.cts +34 -0
  819. package/dist/types-cjs/directives/tooltip.d.cts +10 -0
  820. package/dist/types-cjs/index.d.cts +17 -0
  821. package/dist/types-cjs/package.json +3 -0
  822. package/dist/types-cjs/plugin.d.cts +15 -0
  823. package/dist/types-cjs/services/context.d.cts +8 -0
  824. package/dist/types-cjs/services/index.d.cts +4 -0
  825. package/dist/types-cjs/services/runtime.d.cts +5 -0
  826. package/dist/types-cjs/services/useLoading.d.cts +11 -0
  827. package/dist/types-cjs/services/useSnackbar.d.cts +25 -0
  828. package/dist/types-cjs/ssr/index.d.cts +2 -0
  829. package/dist/types-cjs/ssr/use/appScopedState.d.cts +1 -0
  830. package/dist/types-cjs/ssr/use/clientLifecycle.d.cts +2 -0
  831. package/dist/types-cjs/ssr/use/hydration.d.cts +2 -0
  832. package/dist/types-cjs/ssr/use/id.d.cts +1 -0
  833. package/dist/types-cjs/ssr/use/index.d.cts +6 -0
  834. package/dist/types-cjs/ssr/use/teleport.d.cts +11 -0
  835. package/dist/types-cjs/ssr/use/viewport.d.cts +12 -0
  836. package/dist/types-cjs/ssr/utils/environment.d.cts +11 -0
  837. package/dist/types-cjs/ssr/utils/head.d.cts +28 -0
  838. package/dist/types-cjs/ssr/utils/index.d.cts +3 -0
  839. package/dist/types-cjs/ssr/utils/mount.d.cts +21 -0
  840. package/dist/types-cjs/theme/color.d.cts +11 -0
  841. package/dist/types-cjs/theme/colorSeeds.d.cts +22 -0
  842. package/dist/types-cjs/theme/colorSystem.d.cts +12 -0
  843. package/dist/types-cjs/theme/cssTokens.d.cts +8 -0
  844. package/dist/types-cjs/theme/default.d.cts +51 -0
  845. package/dist/types-cjs/theme/gradient.d.cts +1 -0
  846. package/dist/types-cjs/theme/index.d.cts +13 -0
  847. package/dist/types-cjs/theme/palette.d.cts +13 -0
  848. package/dist/types-cjs/theme/scheme.d.cts +2 -0
  849. package/dist/types-cjs/theme/types.d.cts +11 -0
  850. package/dist/types-cjs/types/Colors.d.cts +2 -0
  851. package/dist/types-cjs/types/CommonTypes.d.cts +26 -0
  852. package/dist/types-cjs/types/UtilityTypes.d.cts +2 -0
  853. package/dist/types-cjs/use/PLA.d.cts +101 -0
  854. package/dist/types-cjs/use/actionProps.d.cts +38 -0
  855. package/dist/types-cjs/use/actionSurface.d.cts +200 -0
  856. package/dist/types-cjs/use/appendTarget.d.cts +5 -0
  857. package/dist/types-cjs/use/bodyScrollLock.d.cts +2 -0
  858. package/dist/types-cjs/use/booleanProp.d.cts +2 -0
  859. package/dist/types-cjs/use/breakpoints/index.d.cts +36 -0
  860. package/dist/types-cjs/use/check/booleanControl.d.cts +61 -0
  861. package/dist/types-cjs/use/check/groupFocus.d.cts +17 -0
  862. package/dist/types-cjs/use/check/index.d.cts +6 -0
  863. package/dist/types-cjs/use/check/optionGroup.d.cts +36 -0
  864. package/dist/types-cjs/use/check/selection.d.cts +2 -0
  865. package/dist/types-cjs/use/check/types.d.cts +496 -0
  866. package/dist/types-cjs/use/color.d.cts +20 -0
  867. package/dist/types-cjs/use/colorResolver.d.cts +16 -0
  868. package/dist/types-cjs/use/controllableOpen.d.cts +10 -0
  869. package/dist/types-cjs/use/defaults.d.cts +12 -0
  870. package/dist/types-cjs/use/density.d.cts +16 -0
  871. package/dist/types-cjs/use/disabled.d.cts +12 -0
  872. package/dist/types-cjs/use/dropdownContext.d.cts +9 -0
  873. package/dist/types-cjs/use/expansion/controller.d.cts +12 -0
  874. package/dist/types-cjs/use/expansion/di.d.cts +5 -0
  875. package/dist/types-cjs/use/expansion/index.d.cts +3 -0
  876. package/dist/types-cjs/use/expansion/types.d.cts +11 -0
  877. package/dist/types-cjs/use/floating.d.cts +120 -0
  878. package/dist/types-cjs/use/floatingDismiss.d.cts +10 -0
  879. package/dist/types-cjs/use/floatingLayer.d.cts +12 -0
  880. package/dist/types-cjs/use/floatingTrigger.d.cts +27 -0
  881. package/dist/types-cjs/use/focused.d.cts +12 -0
  882. package/dist/types-cjs/use/form/context.d.cts +8 -0
  883. package/dist/types-cjs/use/form/control.d.cts +21 -0
  884. package/dist/types-cjs/use/form/fieldKeyboard.d.cts +19 -0
  885. package/dist/types-cjs/use/form/props.d.cts +121 -0
  886. package/dist/types-cjs/use/form/textFieldComponent.d.cts +12 -0
  887. package/dist/types-cjs/use/form/textFieldControl.d.cts +71 -0
  888. package/dist/types-cjs/use/glass.d.cts +24 -0
  889. package/dist/types-cjs/use/gradient.d.cts +291 -0
  890. package/dist/types-cjs/use/gradientGlow.d.cts +48 -0
  891. package/dist/types-cjs/use/gradientMaterial.d.cts +21 -0
  892. package/dist/types-cjs/use/gradientRuntime.d.cts +11 -0
  893. package/dist/types-cjs/use/gradientRuntimeRegistry.d.cts +8 -0
  894. package/dist/types-cjs/use/gradientSurface.d.cts +50 -0
  895. package/dist/types-cjs/use/group/di.d.cts +5 -0
  896. package/dist/types-cjs/use/group/groupController.d.cts +10 -0
  897. package/dist/types-cjs/use/group/types.d.cts +9 -0
  898. package/dist/types-cjs/use/highlighted.d.cts +12 -0
  899. package/dist/types-cjs/use/icon.d.cts +22 -0
  900. package/dist/types-cjs/use/index.d.cts +23 -0
  901. package/dist/types-cjs/use/input/control.d.cts +10 -0
  902. package/dist/types-cjs/use/input/emits.d.cts +8 -0
  903. package/dist/types-cjs/use/input/index.d.cts +4 -0
  904. package/dist/types-cjs/use/input/props.d.cts +163 -0
  905. package/dist/types-cjs/use/items.d.cts +20 -0
  906. package/dist/types-cjs/use/layerStack.d.cts +15 -0
  907. package/dist/types-cjs/use/mask/index.d.cts +24 -0
  908. package/dist/types-cjs/use/material.d.cts +113 -0
  909. package/dist/types-cjs/use/materialSurface.d.cts +382 -0
  910. package/dist/types-cjs/use/menu.d.cts +49 -0
  911. package/dist/types-cjs/use/menuContext.d.cts +6 -0
  912. package/dist/types-cjs/use/navigation/controller.d.cts +14 -0
  913. package/dist/types-cjs/use/navigation/index.d.cts +4 -0
  914. package/dist/types-cjs/use/navigation/item.d.cts +9 -0
  915. package/dist/types-cjs/use/navigation/keyboard.d.cts +4 -0
  916. package/dist/types-cjs/use/navigation/types.d.cts +42 -0
  917. package/dist/types-cjs/use/open.d.cts +2 -0
  918. package/dist/types-cjs/use/overlay.d.cts +111 -0
  919. package/dist/types-cjs/use/placement.d.cts +16 -0
  920. package/dist/types-cjs/use/px.d.cts +4 -0
  921. package/dist/types-cjs/use/rounded.d.cts +12 -0
  922. package/dist/types-cjs/use/routerLink.d.cts +10 -0
  923. package/dist/types-cjs/use/select/comboboxController.d.cts +36 -0
  924. package/dist/types-cjs/use/select/commit.d.cts +23 -0
  925. package/dist/types-cjs/use/select/controller.d.cts +23 -0
  926. package/dist/types-cjs/use/select/creatable.d.cts +18 -0
  927. package/dist/types-cjs/use/select/fieldControl.d.cts +59 -0
  928. package/dist/types-cjs/use/select/filter.d.cts +14 -0
  929. package/dist/types-cjs/use/select/items.d.cts +14 -0
  930. package/dist/types-cjs/use/select/listboxKeyboard.d.cts +9 -0
  931. package/dist/types-cjs/use/select/menuItems.d.cts +11 -0
  932. package/dist/types-cjs/use/select/menuSlot.d.cts +5 -0
  933. package/dist/types-cjs/use/select/modelFallbackItems.d.cts +12 -0
  934. package/dist/types-cjs/use/select/search.d.cts +14 -0
  935. package/dist/types-cjs/use/select/searchFieldControl.d.cts +24 -0
  936. package/dist/types-cjs/use/select/selection.d.cts +12 -0
  937. package/dist/types-cjs/use/select/selectionController.d.cts +19 -0
  938. package/dist/types-cjs/use/select/selectionSummary.d.cts +8 -0
  939. package/dist/types-cjs/use/select/tokenInputKeyboard.d.cts +11 -0
  940. package/dist/types-cjs/use/select/types.d.cts +24 -0
  941. package/dist/types-cjs/use/selected.d.cts +17 -0
  942. package/dist/types-cjs/use/selectionModel.d.cts +19 -0
  943. package/dist/types-cjs/use/size.d.cts +16 -0
  944. package/dist/types-cjs/use/slots.d.cts +15 -0
  945. package/dist/types-cjs/use/state.d.cts +13 -0
  946. package/dist/types-cjs/use/stateIcon.d.cts +9 -0
  947. package/dist/types-cjs/use/stepper/controller.d.cts +20 -0
  948. package/dist/types-cjs/use/stepper/index.d.cts +1 -0
  949. package/dist/types-cjs/use/surface.d.cts +128 -0
  950. package/dist/types-cjs/use/surfaceColor.d.cts +19 -0
  951. package/dist/types-cjs/use/surfaceMaterial.d.cts +45 -0
  952. package/dist/types-cjs/use/tagName.d.cts +47 -0
  953. package/dist/types-cjs/use/textarea/index.d.cts +2 -0
  954. package/dist/types-cjs/use/textarea/props.d.cts +144 -0
  955. package/dist/types-cjs/use/transition.d.cts +156 -0
  956. package/dist/types-cjs/use/variant.d.cts +16 -0
  957. package/dist/types-cjs/use/visibleProps.d.cts +1 -0
  958. package/dist/types-cjs/use/zIndex.d.cts +10 -0
  959. package/dist/types-cjs/utils/camelToKebabCase.d.cts +1 -0
  960. package/dist/types-cjs/utils/createComponentId.d.cts +1 -0
  961. package/dist/types-cjs/utils/createId.d.cts +1 -0
  962. package/dist/types-cjs/utils/propsFactory.d.cts +29 -0
  963. package/dist/types-l8OJZAJz.cjs +1 -0
  964. package/dist/use.cjs +1 -1
  965. package/dist/use.mjs +80 -55
  966. package/dist/useSnackbar-CGt0lJDk.js +245 -0
  967. package/dist/useSnackbar-CRUtXt4_.cjs +1 -0
  968. package/dist/variant-BvBpmTET.cjs +1 -0
  969. package/dist/variant-Fpx1q_TY.js +15 -0
  970. package/dist/viewport-BhvdzcLi.cjs +1 -0
  971. package/dist/viewport-DhX6inI4.js +11 -0
  972. package/package.json +358 -28
  973. package/dist/GLoading.vue_vue_type_style_index_0_lang-BbVYszn2.js +0 -468
  974. package/dist/GLoading.vue_vue_type_style_index_0_lang-DW5X0giH.cjs +0 -1
  975. package/dist/GSwitch.vue_vue_type_script_setup_true_lang-BPwF9Kug.js +0 -8734
  976. package/dist/GSwitch.vue_vue_type_script_setup_true_lang-C45EmRhx.cjs +0 -1
  977. package/dist/camelToKebabCase-BQDotaQm.cjs +0 -316
  978. package/dist/camelToKebabCase-BWbQb81D.js +0 -3783
  979. package/dist/default--73FwpwZ.cjs +0 -4
  980. package/dist/default-DlsS6GI_.js +0 -58
  981. package/dist/defaults-BlTdRhHs.cjs +0 -1
  982. package/dist/defaults-DMi34V8q.js +0 -51
  983. package/dist/index-Cs3XQ3JB.js +0 -97
  984. package/dist/index-DN5ngVtp.cjs +0 -1
  985. package/dist/index-DVHKm06w.cjs +0 -1
  986. package/dist/index-DeFv4BdJ.js +0 -418
  987. package/dist/mask-669nMf98.js +0 -936
  988. package/dist/mask-Bh_UkcCe.cjs +0 -1
  989. package/dist/materialSurface-BbFTyJuA.js +0 -634
  990. package/dist/materialSurface-DOfA2E9c.cjs +0 -1
  991. package/dist/scheme-CZ0a0X5e.cjs +0 -299
  992. package/dist/scheme-Dqwdqg6N.js +0 -1405
  993. package/dist/surface-C3w1Rz6V.js +0 -291
  994. package/dist/surface-DB9flb-h.cjs +0 -1
  995. package/dist/useSnackbar-6OiYxhJA.cjs +0 -1
  996. package/dist/useSnackbar-BYPu4tJ4.js +0 -922
@@ -1,3783 +0,0 @@
1
- const Pr = {
2
- red: "#F44336",
3
- pink: "#E91E63",
4
- purple: "#9C27B0",
5
- deepPurple: "#673AB7",
6
- indigo: "#3F51B5",
7
- blue: "#2196F3",
8
- lightBlue: "#03A9F4",
9
- cyan: "#00BCD4",
10
- teal: "#009688",
11
- green: "#4CAF50",
12
- lightGreen: "#8BC34A",
13
- lime: "#CDDC39",
14
- yellow: "#FFEB3B",
15
- amber: "#FFC107",
16
- orange: "#FF9800",
17
- deepOrange: "#FF5722",
18
- brown: "#795548",
19
- grey: "#9E9E9E",
20
- blueGrey: "#607D8B"
21
- }, de = (a, e = 0, r = 1) => Math.min(r, Math.max(e, a)), pe = (a) => {
22
- const e = a / 255;
23
- return e <= 0.04045 ? e / 12.92 : ((e + 0.055) / 1.055) ** 2.4;
24
- }, _e = (a) => {
25
- const e = a.slice(1), r = e.length === 3 || e.length === 4 ? e.slice(0, 3).split("").map((t) => t.repeat(2)).join("") : e.slice(0, 6);
26
- return r.length !== 6 || !/^[\da-f]{6}$/i.test(r) ? null : {
27
- r: parseInt(r.slice(0, 2), 16),
28
- g: parseInt(r.slice(2, 4), 16),
29
- b: parseInt(r.slice(4, 6), 16)
30
- };
31
- }, He = (a) => {
32
- const e = a.match(
33
- /^rgba?\(\s*([\d.]+)[,\s]+([\d.]+)[,\s]+([\d.]+)(?:\s*[,/]\s*[\d.]+%?)?\s*\)$/i
34
- );
35
- return e ? {
36
- r: de(Number(e[1]), 0, 255),
37
- g: de(Number(e[2]), 0, 255),
38
- b: de(Number(e[3]), 0, 255)
39
- } : null;
40
- }, me = (a) => {
41
- if (typeof a == "number") {
42
- const r = a & 16777215;
43
- return {
44
- r: r >> 16 & 255,
45
- g: r >> 8 & 255,
46
- b: r & 255
47
- };
48
- }
49
- const e = a.trim();
50
- return e.startsWith("#") ? _e(e) : e.toLowerCase().startsWith("rgb") ? He(e) : null;
51
- }, Ue = ({ r: a, g: e, b: r }) => `#${[a, e, r].map((t) => Math.round(t).toString(16).padStart(2, "0")).join("")}`, kr = ({ r: a, g: e, b: r }) => `${Math.round(a)}, ${Math.round(e)}, ${Math.round(r)}`, Ye = (a, e) => {
52
- const r = me(a) ?? me(e);
53
- if (!r)
54
- throw new Error(`Invalid fallback color: ${e}`);
55
- return Ue(r);
56
- }, ze = (a) => 0.2126 * pe(a.r) + 0.7152 * pe(a.g) + 0.0722 * pe(a.b), Cr = (a) => {
57
- const e = me(a);
58
- if (!e) return "#ffffff";
59
- const r = ze(e), t = 1.05 / (r + 0.05), n = (r + 0.05) / 0.055;
60
- return t >= n ? "#ffffff" : "#0d0d12";
61
- };
62
- /**
63
- * @license
64
- * Copyright 2021 Google LLC
65
- *
66
- * Licensed under the Apache License, Version 2.0 (the "License");
67
- * you may not use this file except in compliance with the License.
68
- * You may obtain a copy of the License at
69
- *
70
- * http://www.apache.org/licenses/LICENSE-2.0
71
- *
72
- * Unless required by applicable law or agreed to in writing, software
73
- * distributed under the License is distributed on an "AS IS" BASIS,
74
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
75
- * See the License for the specific language governing permissions and
76
- * limitations under the License.
77
- */
78
- function z(a) {
79
- return a < 0 ? -1 : a === 0 ? 0 : 1;
80
- }
81
- function ne(a, e, r) {
82
- return (1 - r) * a + r * e;
83
- }
84
- function Ke(a, e, r) {
85
- return r < a ? a : r > e ? e : r;
86
- }
87
- function H(a, e, r) {
88
- return r < a ? a : r > e ? e : r;
89
- }
90
- function ce(a) {
91
- return a = a % 360, a < 0 && (a = a + 360), a;
92
- }
93
- function je(a, e) {
94
- return ce(e - a) <= 180 ? 1 : -1;
95
- }
96
- function qe(a, e) {
97
- return 180 - Math.abs(Math.abs(a - e) - 180);
98
- }
99
- function ye(a, e) {
100
- const r = a[0] * e[0][0] + a[1] * e[0][1] + a[2] * e[0][2], t = a[0] * e[1][0] + a[1] * e[1][1] + a[2] * e[1][2], n = a[0] * e[2][0] + a[1] * e[2][1] + a[2] * e[2][2];
101
- return [r, t, n];
102
- }
103
- /**
104
- * @license
105
- * Copyright 2021 Google LLC
106
- *
107
- * Licensed under the Apache License, Version 2.0 (the "License");
108
- * you may not use this file except in compliance with the License.
109
- * You may obtain a copy of the License at
110
- *
111
- * http://www.apache.org/licenses/LICENSE-2.0
112
- *
113
- * Unless required by applicable law or agreed to in writing, software
114
- * distributed under the License is distributed on an "AS IS" BASIS,
115
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
116
- * See the License for the specific language governing permissions and
117
- * limitations under the License.
118
- */
119
- const $e = [
120
- [0.41233895, 0.35762064, 0.18051042],
121
- [0.2126, 0.7152, 0.0722],
122
- [0.01932141, 0.11916382, 0.95034478]
123
- ], Xe = [
124
- [
125
- 3.2413774792388685,
126
- -1.5376652402851851,
127
- -0.49885366846268053
128
- ],
129
- [
130
- -0.9691452513005321,
131
- 1.8758853451067872,
132
- 0.04156585616912061
133
- ],
134
- [
135
- 0.05562093689691305,
136
- -0.20395524564742123,
137
- 1.0571799111220335
138
- ]
139
- ], Ge = [95.047, 100, 108.883];
140
- function ke(a, e, r) {
141
- return (255 << 24 | (a & 255) << 16 | (e & 255) << 8 | r & 255) >>> 0;
142
- }
143
- function Fe(a) {
144
- const e = Q(a[0]), r = Q(a[1]), t = Q(a[2]);
145
- return ke(e, r, t);
146
- }
147
- function xe(a) {
148
- return a >> 16 & 255;
149
- }
150
- function Be(a) {
151
- return a >> 8 & 255;
152
- }
153
- function ve(a) {
154
- return a & 255;
155
- }
156
- function Je(a, e, r) {
157
- const t = Xe, n = t[0][0] * a + t[0][1] * e + t[0][2] * r, s = t[1][0] * a + t[1][1] * e + t[1][2] * r, i = t[2][0] * a + t[2][1] * e + t[2][2] * r, u = Q(n), l = Q(s), h = Q(i);
158
- return ke(u, l, h);
159
- }
160
- function We(a) {
161
- const e = te(xe(a)), r = te(Be(a)), t = te(ve(a));
162
- return ye([e, r, t], $e);
163
- }
164
- function Ze(a) {
165
- const e = Z(a), r = Q(e);
166
- return ke(r, r, r);
167
- }
168
- function ge(a) {
169
- const e = We(a)[1];
170
- return 116 * Ae(e / 100) - 16;
171
- }
172
- function Z(a) {
173
- return 100 * er((a + 16) / 116);
174
- }
175
- function Pe(a) {
176
- return Ae(a / 100) * 116 - 16;
177
- }
178
- function te(a) {
179
- const e = a / 255;
180
- return e <= 0.040449936 ? e / 12.92 * 100 : Math.pow((e + 0.055) / 1.055, 2.4) * 100;
181
- }
182
- function Q(a) {
183
- const e = a / 100;
184
- let r = 0;
185
- return e <= 31308e-7 ? r = e * 12.92 : r = 1.055 * Math.pow(e, 1 / 2.4) - 0.055, Ke(0, 255, Math.round(r * 255));
186
- }
187
- function Qe() {
188
- return Ge;
189
- }
190
- function Ae(a) {
191
- const e = 0.008856451679035631, r = 24389 / 27;
192
- return a > e ? Math.pow(a, 1 / 3) : (r * a + 16) / 116;
193
- }
194
- function er(a) {
195
- const e = 0.008856451679035631, r = 24389 / 27, t = a * a * a;
196
- return t > e ? t : (116 * a - 16) / r;
197
- }
198
- /**
199
- * @license
200
- * Copyright 2021 Google LLC
201
- *
202
- * Licensed under the Apache License, Version 2.0 (the "License");
203
- * you may not use this file except in compliance with the License.
204
- * You may obtain a copy of the License at
205
- *
206
- * http://www.apache.org/licenses/LICENSE-2.0
207
- *
208
- * Unless required by applicable law or agreed to in writing, software
209
- * distributed under the License is distributed on an "AS IS" BASIS,
210
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
211
- * See the License for the specific language governing permissions and
212
- * limitations under the License.
213
- */
214
- class j {
215
- /**
216
- * Create ViewingConditions from a simple, physically relevant, set of
217
- * parameters.
218
- *
219
- * @param whitePoint White point, measured in the XYZ color space.
220
- * default = D65, or sunny day afternoon
221
- * @param adaptingLuminance The luminance of the adapting field. Informally,
222
- * how bright it is in the room where the color is viewed. Can be
223
- * calculated from lux by multiplying lux by 0.0586. default = 11.72,
224
- * or 200 lux.
225
- * @param backgroundLstar The lightness of the area surrounding the color.
226
- * measured by L* in L*a*b*. default = 50.0
227
- * @param surround A general description of the lighting surrounding the
228
- * color. 0 is pitch dark, like watching a movie in a theater. 1.0 is a
229
- * dimly light room, like watching TV at home at night. 2.0 means there
230
- * is no difference between the lighting on the color and around it.
231
- * default = 2.0
232
- * @param discountingIlluminant Whether the eye accounts for the tint of the
233
- * ambient lighting, such as knowing an apple is still red in green light.
234
- * default = false, the eye does not perform this process on
235
- * self-luminous objects like displays.
236
- */
237
- static make(e = Qe(), r = 200 / Math.PI * Z(50) / 100, t = 50, n = 2, s = !1) {
238
- const i = e, u = i[0] * 0.401288 + i[1] * 0.650173 + i[2] * -0.051461, l = i[0] * -0.250268 + i[1] * 1.204414 + i[2] * 0.045854, h = i[0] * -2079e-6 + i[1] * 0.048952 + i[2] * 0.953127, d = 0.8 + n / 10, C = d >= 0.9 ? ne(0.59, 0.69, (d - 0.9) * 10) : ne(0.525, 0.59, (d - 0.8) * 10);
239
- let p = s ? 1 : d * (1 - 1 / 3.6 * Math.exp((-r - 42) / 92));
240
- p = p > 1 ? 1 : p < 0 ? 0 : p;
241
- const D = d, m = [
242
- p * (100 / u) + 1 - p,
243
- p * (100 / l) + 1 - p,
244
- p * (100 / h) + 1 - p
245
- ], g = 1 / (5 * r + 1), P = g * g * g * g, A = 1 - P, B = P * r + 0.1 * A * A * Math.cbrt(5 * r), O = Z(t) / e[1], R = 1.48 + Math.sqrt(O), V = 0.725 / Math.pow(O, 0.2), I = V, x = [
246
- Math.pow(B * m[0] * u / 100, 0.42),
247
- Math.pow(B * m[1] * l / 100, 0.42),
248
- Math.pow(B * m[2] * h / 100, 0.42)
249
- ], L = [
250
- 400 * x[0] / (x[0] + 27.13),
251
- 400 * x[1] / (x[1] + 27.13),
252
- 400 * x[2] / (x[2] + 27.13)
253
- ], _ = (2 * L[0] + L[1] + 0.05 * L[2]) * V;
254
- return new j(O, _, V, I, C, D, m, B, Math.pow(B, 0.25), R);
255
- }
256
- /**
257
- * Parameters are intermediate values of the CAM16 conversion process. Their
258
- * names are shorthand for technical color science terminology, this class
259
- * would not benefit from documenting them individually. A brief overview
260
- * is available in the CAM16 specification, and a complete overview requires
261
- * a color science textbook, such as Fairchild's Color Appearance Models.
262
- */
263
- constructor(e, r, t, n, s, i, u, l, h, d) {
264
- this.n = e, this.aw = r, this.nbb = t, this.ncb = n, this.c = s, this.nc = i, this.rgbD = u, this.fl = l, this.fLRoot = h, this.z = d;
265
- }
266
- }
267
- j.DEFAULT = j.make();
268
- /**
269
- * @license
270
- * Copyright 2021 Google LLC
271
- *
272
- * Licensed under the Apache License, Version 2.0 (the "License");
273
- * you may not use this file except in compliance with the License.
274
- * You may obtain a copy of the License at
275
- *
276
- * http://www.apache.org/licenses/LICENSE-2.0
277
- *
278
- * Unless required by applicable law or agreed to in writing, software
279
- * distributed under the License is distributed on an "AS IS" BASIS,
280
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
281
- * See the License for the specific language governing permissions and
282
- * limitations under the License.
283
- */
284
- class N {
285
- /**
286
- * All of the CAM16 dimensions can be calculated from 3 of the dimensions, in
287
- * the following combinations:
288
- * - {j or q} and {c, m, or s} and hue
289
- * - jstar, astar, bstar
290
- * Prefer using a static method that constructs from 3 of those dimensions.
291
- * This constructor is intended for those methods to use to return all
292
- * possible dimensions.
293
- *
294
- * @param hue
295
- * @param chroma informally, colorfulness / color intensity. like saturation
296
- * in HSL, except perceptually accurate.
297
- * @param j lightness
298
- * @param q brightness; ratio of lightness to white point's lightness
299
- * @param m colorfulness
300
- * @param s saturation; ratio of chroma to white point's chroma
301
- * @param jstar CAM16-UCS J coordinate
302
- * @param astar CAM16-UCS a coordinate
303
- * @param bstar CAM16-UCS b coordinate
304
- */
305
- constructor(e, r, t, n, s, i, u, l, h) {
306
- this.hue = e, this.chroma = r, this.j = t, this.q = n, this.m = s, this.s = i, this.jstar = u, this.astar = l, this.bstar = h;
307
- }
308
- /**
309
- * CAM16 instances also have coordinates in the CAM16-UCS space, called J*,
310
- * a*, b*, or jstar, astar, bstar in code. CAM16-UCS is included in the CAM16
311
- * specification, and is used to measure distances between colors.
312
- */
313
- distance(e) {
314
- const r = this.jstar - e.jstar, t = this.astar - e.astar, n = this.bstar - e.bstar, s = Math.sqrt(r * r + t * t + n * n);
315
- return 1.41 * Math.pow(s, 0.63);
316
- }
317
- /**
318
- * @param argb ARGB representation of a color.
319
- * @return CAM16 color, assuming the color was viewed in default viewing
320
- * conditions.
321
- */
322
- static fromInt(e) {
323
- return N.fromIntInViewingConditions(e, j.DEFAULT);
324
- }
325
- /**
326
- * @param argb ARGB representation of a color.
327
- * @param viewingConditions Information about the environment where the color
328
- * was observed.
329
- * @return CAM16 color.
330
- */
331
- static fromIntInViewingConditions(e, r) {
332
- const t = (e & 16711680) >> 16, n = (e & 65280) >> 8, s = e & 255, i = te(t), u = te(n), l = te(s), h = 0.41233895 * i + 0.35762064 * u + 0.18051042 * l, d = 0.2126 * i + 0.7152 * u + 0.0722 * l, C = 0.01932141 * i + 0.11916382 * u + 0.95034478 * l, p = 0.401288 * h + 0.650173 * d - 0.051461 * C, D = -0.250268 * h + 1.204414 * d + 0.045854 * C, m = -2079e-6 * h + 0.048952 * d + 0.953127 * C, g = r.rgbD[0] * p, P = r.rgbD[1] * D, A = r.rgbD[2] * m, B = Math.pow(r.fl * Math.abs(g) / 100, 0.42), O = Math.pow(r.fl * Math.abs(P) / 100, 0.42), R = Math.pow(r.fl * Math.abs(A) / 100, 0.42), V = z(g) * 400 * B / (B + 27.13), I = z(P) * 400 * O / (O + 27.13), x = z(A) * 400 * R / (R + 27.13), L = (11 * V + -12 * I + x) / 11, _ = (V + I - 2 * x) / 9, E = (20 * V + 20 * I + 21 * x) / 20, q = (40 * V + 20 * I + x) / 20, ee = Math.atan2(_, L) * 180 / Math.PI, K = ce(ee), ae = K * Math.PI / 180, oe = q * r.nbb, J = 100 * Math.pow(oe / r.aw, r.c * r.z), ie = 4 / r.c * Math.sqrt(J / 100) * (r.aw + 4) * r.fLRoot, ue = K < 20.14 ? K + 360 : K, le = 0.25 * (Math.cos(ue * Math.PI / 180 + 2) + 3.8), he = 5e4 / 13 * le * r.nc * r.ncb * Math.sqrt(L * L + _ * _) / (E + 0.305), se = Math.pow(he, 0.9) * Math.pow(1.64 - Math.pow(0.29, r.n), 0.73), be = se * Math.sqrt(J / 100), Te = be * r.fLRoot, Oe = 50 * Math.sqrt(se * r.c / (r.aw + 4)), Re = (1 + 100 * 7e-3) * J / (1 + 7e-3 * J), De = 1 / 0.0228 * Math.log(1 + 0.0228 * Te), Ve = De * Math.cos(ae), Ne = De * Math.sin(ae);
333
- return new N(K, be, J, ie, Te, Oe, Re, Ve, Ne);
334
- }
335
- /**
336
- * @param j CAM16 lightness
337
- * @param c CAM16 chroma
338
- * @param h CAM16 hue
339
- */
340
- static fromJch(e, r, t) {
341
- return N.fromJchInViewingConditions(e, r, t, j.DEFAULT);
342
- }
343
- /**
344
- * @param j CAM16 lightness
345
- * @param c CAM16 chroma
346
- * @param h CAM16 hue
347
- * @param viewingConditions Information about the environment where the color
348
- * was observed.
349
- */
350
- static fromJchInViewingConditions(e, r, t, n) {
351
- const s = 4 / n.c * Math.sqrt(e / 100) * (n.aw + 4) * n.fLRoot, i = r * n.fLRoot, u = r / Math.sqrt(e / 100), l = 50 * Math.sqrt(u * n.c / (n.aw + 4)), h = t * Math.PI / 180, d = (1 + 100 * 7e-3) * e / (1 + 7e-3 * e), C = 1 / 0.0228 * Math.log(1 + 0.0228 * i), p = C * Math.cos(h), D = C * Math.sin(h);
352
- return new N(t, r, e, s, i, l, d, p, D);
353
- }
354
- /**
355
- * @param jstar CAM16-UCS lightness.
356
- * @param astar CAM16-UCS a dimension. Like a* in L*a*b*, it is a Cartesian
357
- * coordinate on the Y axis.
358
- * @param bstar CAM16-UCS b dimension. Like a* in L*a*b*, it is a Cartesian
359
- * coordinate on the X axis.
360
- */
361
- static fromUcs(e, r, t) {
362
- return N.fromUcsInViewingConditions(e, r, t, j.DEFAULT);
363
- }
364
- /**
365
- * @param jstar CAM16-UCS lightness.
366
- * @param astar CAM16-UCS a dimension. Like a* in L*a*b*, it is a Cartesian
367
- * coordinate on the Y axis.
368
- * @param bstar CAM16-UCS b dimension. Like a* in L*a*b*, it is a Cartesian
369
- * coordinate on the X axis.
370
- * @param viewingConditions Information about the environment where the color
371
- * was observed.
372
- */
373
- static fromUcsInViewingConditions(e, r, t, n) {
374
- const s = r, i = t, u = Math.sqrt(s * s + i * i), h = (Math.exp(u * 0.0228) - 1) / 0.0228 / n.fLRoot;
375
- let d = Math.atan2(i, s) * (180 / Math.PI);
376
- d < 0 && (d += 360);
377
- const C = e / (1 - (e - 100) * 7e-3);
378
- return N.fromJchInViewingConditions(C, h, d, n);
379
- }
380
- /**
381
- * @return ARGB representation of color, assuming the color was viewed in
382
- * default viewing conditions, which are near-identical to the default
383
- * viewing conditions for sRGB.
384
- */
385
- toInt() {
386
- return this.viewed(j.DEFAULT);
387
- }
388
- /**
389
- * @param viewingConditions Information about the environment where the color
390
- * will be viewed.
391
- * @return ARGB representation of color
392
- */
393
- viewed(e) {
394
- const r = this.chroma === 0 || this.j === 0 ? 0 : this.chroma / Math.sqrt(this.j / 100), t = Math.pow(r / Math.pow(1.64 - Math.pow(0.29, e.n), 0.73), 1 / 0.9), n = this.hue * Math.PI / 180, s = 0.25 * (Math.cos(n + 2) + 3.8), i = e.aw * Math.pow(this.j / 100, 1 / e.c / e.z), u = s * (5e4 / 13) * e.nc * e.ncb, l = i / e.nbb, h = Math.sin(n), d = Math.cos(n), C = 23 * (l + 0.305) * t / (23 * u + 11 * t * d + 108 * t * h), p = C * d, D = C * h, m = (460 * l + 451 * p + 288 * D) / 1403, g = (460 * l - 891 * p - 261 * D) / 1403, P = (460 * l - 220 * p - 6300 * D) / 1403, A = Math.max(0, 27.13 * Math.abs(m) / (400 - Math.abs(m))), B = z(m) * (100 / e.fl) * Math.pow(A, 1 / 0.42), O = Math.max(0, 27.13 * Math.abs(g) / (400 - Math.abs(g))), R = z(g) * (100 / e.fl) * Math.pow(O, 1 / 0.42), V = Math.max(0, 27.13 * Math.abs(P) / (400 - Math.abs(P))), I = z(P) * (100 / e.fl) * Math.pow(V, 1 / 0.42), x = B / e.rgbD[0], L = R / e.rgbD[1], _ = I / e.rgbD[2], E = 1.86206786 * x - 1.01125463 * L + 0.14918677 * _, q = 0.38752654 * x + 0.62144744 * L - 897398e-8 * _, G = -0.0158415 * x - 0.03412294 * L + 1.04996444 * _;
395
- return Je(E, q, G);
396
- }
397
- /// Given color expressed in XYZ and viewed in [viewingConditions], convert to
398
- /// CAM16.
399
- static fromXyzInViewingConditions(e, r, t, n) {
400
- const s = 0.401288 * e + 0.650173 * r - 0.051461 * t, i = -0.250268 * e + 1.204414 * r + 0.045854 * t, u = -2079e-6 * e + 0.048952 * r + 0.953127 * t, l = n.rgbD[0] * s, h = n.rgbD[1] * i, d = n.rgbD[2] * u, C = Math.pow(n.fl * Math.abs(l) / 100, 0.42), p = Math.pow(n.fl * Math.abs(h) / 100, 0.42), D = Math.pow(n.fl * Math.abs(d) / 100, 0.42), m = z(l) * 400 * C / (C + 27.13), g = z(h) * 400 * p / (p + 27.13), P = z(d) * 400 * D / (D + 27.13), A = (11 * m + -12 * g + P) / 11, B = (m + g - 2 * P) / 9, O = (20 * m + 20 * g + 21 * P) / 20, R = (40 * m + 20 * g + P) / 20, I = Math.atan2(B, A) * 180 / Math.PI, x = I < 0 ? I + 360 : I >= 360 ? I - 360 : I, L = x * Math.PI / 180, _ = R * n.nbb, E = 100 * Math.pow(_ / n.aw, n.c * n.z), q = 4 / n.c * Math.sqrt(E / 100) * (n.aw + 4) * n.fLRoot, G = x < 20.14 ? x + 360 : x, ee = 1 / 4 * (Math.cos(G * Math.PI / 180 + 2) + 3.8), ae = 5e4 / 13 * ee * n.nc * n.ncb * Math.sqrt(A * A + B * B) / (O + 0.305), oe = Math.pow(ae, 0.9) * Math.pow(1.64 - Math.pow(0.29, n.n), 0.73), J = oe * Math.sqrt(E / 100), ie = J * n.fLRoot, ue = 50 * Math.sqrt(oe * n.c / (n.aw + 4)), le = (1 + 100 * 7e-3) * E / (1 + 7e-3 * E), fe = Math.log(1 + 0.0228 * ie) / 0.0228, he = fe * Math.cos(L), se = fe * Math.sin(L);
401
- return new N(x, J, E, q, ie, ue, le, he, se);
402
- }
403
- /// XYZ representation of CAM16 seen in [viewingConditions].
404
- xyzInViewingConditions(e) {
405
- const r = this.chroma === 0 || this.j === 0 ? 0 : this.chroma / Math.sqrt(this.j / 100), t = Math.pow(r / Math.pow(1.64 - Math.pow(0.29, e.n), 0.73), 1 / 0.9), n = this.hue * Math.PI / 180, s = 0.25 * (Math.cos(n + 2) + 3.8), i = e.aw * Math.pow(this.j / 100, 1 / e.c / e.z), u = s * (5e4 / 13) * e.nc * e.ncb, l = i / e.nbb, h = Math.sin(n), d = Math.cos(n), C = 23 * (l + 0.305) * t / (23 * u + 11 * t * d + 108 * t * h), p = C * d, D = C * h, m = (460 * l + 451 * p + 288 * D) / 1403, g = (460 * l - 891 * p - 261 * D) / 1403, P = (460 * l - 220 * p - 6300 * D) / 1403, A = Math.max(0, 27.13 * Math.abs(m) / (400 - Math.abs(m))), B = z(m) * (100 / e.fl) * Math.pow(A, 1 / 0.42), O = Math.max(0, 27.13 * Math.abs(g) / (400 - Math.abs(g))), R = z(g) * (100 / e.fl) * Math.pow(O, 1 / 0.42), V = Math.max(0, 27.13 * Math.abs(P) / (400 - Math.abs(P))), I = z(P) * (100 / e.fl) * Math.pow(V, 1 / 0.42), x = B / e.rgbD[0], L = R / e.rgbD[1], _ = I / e.rgbD[2], E = 1.86206786 * x - 1.01125463 * L + 0.14918677 * _, q = 0.38752654 * x + 0.62144744 * L - 897398e-8 * _, G = -0.0158415 * x - 0.03412294 * L + 1.04996444 * _;
406
- return [E, q, G];
407
- }
408
- }
409
- /**
410
- * @license
411
- * Copyright 2021 Google LLC
412
- *
413
- * Licensed under the Apache License, Version 2.0 (the "License");
414
- * you may not use this file except in compliance with the License.
415
- * You may obtain a copy of the License at
416
- *
417
- * http://www.apache.org/licenses/LICENSE-2.0
418
- *
419
- * Unless required by applicable law or agreed to in writing, software
420
- * distributed under the License is distributed on an "AS IS" BASIS,
421
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
422
- * See the License for the specific language governing permissions and
423
- * limitations under the License.
424
- */
425
- class S {
426
- /**
427
- * Sanitizes a small enough angle in radians.
428
- *
429
- * @param angle An angle in radians; must not deviate too much
430
- * from 0.
431
- * @return A coterminal angle between 0 and 2pi.
432
- */
433
- static sanitizeRadians(e) {
434
- return (e + Math.PI * 8) % (Math.PI * 2);
435
- }
436
- /**
437
- * Delinearizes an RGB component, returning a floating-point
438
- * number.
439
- *
440
- * @param rgbComponent 0.0 <= rgb_component <= 100.0, represents
441
- * linear R/G/B channel
442
- * @return 0.0 <= output <= 255.0, color channel converted to
443
- * regular RGB space
444
- */
445
- static trueDelinearized(e) {
446
- const r = e / 100;
447
- let t = 0;
448
- return r <= 31308e-7 ? t = r * 12.92 : t = 1.055 * Math.pow(r, 1 / 2.4) - 0.055, t * 255;
449
- }
450
- static chromaticAdaptation(e) {
451
- const r = Math.pow(Math.abs(e), 0.42);
452
- return z(e) * 400 * r / (r + 27.13);
453
- }
454
- /**
455
- * Returns the hue of a linear RGB color in CAM16.
456
- *
457
- * @param linrgb The linear RGB coordinates of a color.
458
- * @return The hue of the color in CAM16, in radians.
459
- */
460
- static hueOf(e) {
461
- const r = ye(e, S.SCALED_DISCOUNT_FROM_LINRGB), t = S.chromaticAdaptation(r[0]), n = S.chromaticAdaptation(r[1]), s = S.chromaticAdaptation(r[2]), i = (11 * t + -12 * n + s) / 11, u = (t + n - 2 * s) / 9;
462
- return Math.atan2(u, i);
463
- }
464
- static areInCyclicOrder(e, r, t) {
465
- const n = S.sanitizeRadians(r - e), s = S.sanitizeRadians(t - e);
466
- return n < s;
467
- }
468
- /**
469
- * Solves the lerp equation.
470
- *
471
- * @param source The starting number.
472
- * @param mid The number in the middle.
473
- * @param target The ending number.
474
- * @return A number t such that lerp(source, target, t) = mid.
475
- */
476
- static intercept(e, r, t) {
477
- return (r - e) / (t - e);
478
- }
479
- static lerpPoint(e, r, t) {
480
- return [
481
- e[0] + (t[0] - e[0]) * r,
482
- e[1] + (t[1] - e[1]) * r,
483
- e[2] + (t[2] - e[2]) * r
484
- ];
485
- }
486
- /**
487
- * Intersects a segment with a plane.
488
- *
489
- * @param source The coordinates of point A.
490
- * @param coordinate The R-, G-, or B-coordinate of the plane.
491
- * @param target The coordinates of point B.
492
- * @param axis The axis the plane is perpendicular with. (0: R, 1:
493
- * G, 2: B)
494
- * @return The intersection point of the segment AB with the plane
495
- * R=coordinate, G=coordinate, or B=coordinate
496
- */
497
- static setCoordinate(e, r, t, n) {
498
- const s = S.intercept(e[n], r, t[n]);
499
- return S.lerpPoint(e, s, t);
500
- }
501
- static isBounded(e) {
502
- return 0 <= e && e <= 100;
503
- }
504
- /**
505
- * Returns the nth possible vertex of the polygonal intersection.
506
- *
507
- * @param y The Y value of the plane.
508
- * @param n The zero-based index of the point. 0 <= n <= 11.
509
- * @return The nth possible vertex of the polygonal intersection
510
- * of the y plane and the RGB cube, in linear RGB coordinates, if
511
- * it exists. If this possible vertex lies outside of the cube,
512
- * [-1.0, -1.0, -1.0] is returned.
513
- */
514
- static nthVertex(e, r) {
515
- const t = S.Y_FROM_LINRGB[0], n = S.Y_FROM_LINRGB[1], s = S.Y_FROM_LINRGB[2], i = r % 4 <= 1 ? 0 : 100, u = r % 2 === 0 ? 0 : 100;
516
- if (r < 4) {
517
- const l = i, h = u, d = (e - l * n - h * s) / t;
518
- return S.isBounded(d) ? [d, l, h] : [-1, -1, -1];
519
- } else if (r < 8) {
520
- const l = i, h = u, d = (e - h * t - l * s) / n;
521
- return S.isBounded(d) ? [h, d, l] : [-1, -1, -1];
522
- } else {
523
- const l = i, h = u, d = (e - l * t - h * n) / s;
524
- return S.isBounded(d) ? [l, h, d] : [-1, -1, -1];
525
- }
526
- }
527
- /**
528
- * Finds the segment containing the desired color.
529
- *
530
- * @param y The Y value of the color.
531
- * @param targetHue The hue of the color.
532
- * @return A list of two sets of linear RGB coordinates, each
533
- * corresponding to an endpoint of the segment containing the
534
- * desired color.
535
- */
536
- static bisectToSegment(e, r) {
537
- let t = [-1, -1, -1], n = t, s = 0, i = 0, u = !1, l = !0;
538
- for (let h = 0; h < 12; h++) {
539
- const d = S.nthVertex(e, h);
540
- if (d[0] < 0)
541
- continue;
542
- const C = S.hueOf(d);
543
- if (!u) {
544
- t = d, n = d, s = C, i = C, u = !0;
545
- continue;
546
- }
547
- (l || S.areInCyclicOrder(s, C, i)) && (l = !1, S.areInCyclicOrder(s, r, C) ? (n = d, i = C) : (t = d, s = C));
548
- }
549
- return [t, n];
550
- }
551
- static midpoint(e, r) {
552
- return [
553
- (e[0] + r[0]) / 2,
554
- (e[1] + r[1]) / 2,
555
- (e[2] + r[2]) / 2
556
- ];
557
- }
558
- static criticalPlaneBelow(e) {
559
- return Math.floor(e - 0.5);
560
- }
561
- static criticalPlaneAbove(e) {
562
- return Math.ceil(e - 0.5);
563
- }
564
- /**
565
- * Finds a color with the given Y and hue on the boundary of the
566
- * cube.
567
- *
568
- * @param y The Y value of the color.
569
- * @param targetHue The hue of the color.
570
- * @return The desired color, in linear RGB coordinates.
571
- */
572
- static bisectToLimit(e, r) {
573
- const t = S.bisectToSegment(e, r);
574
- let n = t[0], s = S.hueOf(n), i = t[1];
575
- for (let u = 0; u < 3; u++)
576
- if (n[u] !== i[u]) {
577
- let l = -1, h = 255;
578
- n[u] < i[u] ? (l = S.criticalPlaneBelow(S.trueDelinearized(n[u])), h = S.criticalPlaneAbove(S.trueDelinearized(i[u]))) : (l = S.criticalPlaneAbove(S.trueDelinearized(n[u])), h = S.criticalPlaneBelow(S.trueDelinearized(i[u])));
579
- for (let d = 0; d < 8 && !(Math.abs(h - l) <= 1); d++) {
580
- const C = Math.floor((l + h) / 2), p = S.CRITICAL_PLANES[C], D = S.setCoordinate(n, p, i, u), m = S.hueOf(D);
581
- S.areInCyclicOrder(s, r, m) ? (i = D, h = C) : (n = D, s = m, l = C);
582
- }
583
- }
584
- return S.midpoint(n, i);
585
- }
586
- static inverseChromaticAdaptation(e) {
587
- const r = Math.abs(e), t = Math.max(0, 27.13 * r / (400 - r));
588
- return z(e) * Math.pow(t, 1 / 0.42);
589
- }
590
- /**
591
- * Finds a color with the given hue, chroma, and Y.
592
- *
593
- * @param hueRadians The desired hue in radians.
594
- * @param chroma The desired chroma.
595
- * @param y The desired Y.
596
- * @return The desired color as a hexadecimal integer, if found; 0
597
- * otherwise.
598
- */
599
- static findResultByJ(e, r, t) {
600
- let n = Math.sqrt(t) * 11;
601
- const s = j.DEFAULT, i = 1 / Math.pow(1.64 - Math.pow(0.29, s.n), 0.73), l = 0.25 * (Math.cos(e + 2) + 3.8) * (5e4 / 13) * s.nc * s.ncb, h = Math.sin(e), d = Math.cos(e);
602
- for (let C = 0; C < 5; C++) {
603
- const p = n / 100, D = r === 0 || n === 0 ? 0 : r / Math.sqrt(p), m = Math.pow(D * i, 1 / 0.9), P = s.aw * Math.pow(p, 1 / s.c / s.z) / s.nbb, A = 23 * (P + 0.305) * m / (23 * l + 11 * m * d + 108 * m * h), B = A * d, O = A * h, R = (460 * P + 451 * B + 288 * O) / 1403, V = (460 * P - 891 * B - 261 * O) / 1403, I = (460 * P - 220 * B - 6300 * O) / 1403, x = S.inverseChromaticAdaptation(R), L = S.inverseChromaticAdaptation(V), _ = S.inverseChromaticAdaptation(I), E = ye([x, L, _], S.LINRGB_FROM_SCALED_DISCOUNT);
604
- if (E[0] < 0 || E[1] < 0 || E[2] < 0)
605
- return 0;
606
- const q = S.Y_FROM_LINRGB[0], G = S.Y_FROM_LINRGB[1], ee = S.Y_FROM_LINRGB[2], K = q * E[0] + G * E[1] + ee * E[2];
607
- if (K <= 0)
608
- return 0;
609
- if (C === 4 || Math.abs(K - t) < 2e-3)
610
- return E[0] > 100.01 || E[1] > 100.01 || E[2] > 100.01 ? 0 : Fe(E);
611
- n = n - (K - t) * n / (2 * K);
612
- }
613
- return 0;
614
- }
615
- /**
616
- * Finds an sRGB color with the given hue, chroma, and L*, if
617
- * possible.
618
- *
619
- * @param hueDegrees The desired hue, in degrees.
620
- * @param chroma The desired chroma.
621
- * @param lstar The desired L*.
622
- * @return A hexadecimal representing the sRGB color. The color
623
- * has sufficiently close hue, chroma, and L* to the desired
624
- * values, if possible; otherwise, the hue and L* will be
625
- * sufficiently close, and chroma will be maximized.
626
- */
627
- static solveToInt(e, r, t) {
628
- if (r < 1e-4 || t < 1e-4 || t > 99.9999)
629
- return Ze(t);
630
- e = ce(e);
631
- const n = e / 180 * Math.PI, s = Z(t), i = S.findResultByJ(n, r, s);
632
- if (i !== 0)
633
- return i;
634
- const u = S.bisectToLimit(s, n);
635
- return Fe(u);
636
- }
637
- /**
638
- * Finds an sRGB color with the given hue, chroma, and L*, if
639
- * possible.
640
- *
641
- * @param hueDegrees The desired hue, in degrees.
642
- * @param chroma The desired chroma.
643
- * @param lstar The desired L*.
644
- * @return An CAM16 object representing the sRGB color. The color
645
- * has sufficiently close hue, chroma, and L* to the desired
646
- * values, if possible; otherwise, the hue and L* will be
647
- * sufficiently close, and chroma will be maximized.
648
- */
649
- static solveToCam(e, r, t) {
650
- return N.fromInt(S.solveToInt(e, r, t));
651
- }
652
- }
653
- S.SCALED_DISCOUNT_FROM_LINRGB = [
654
- [
655
- 0.001200833568784504,
656
- 0.002389694492170889,
657
- 2795742885861124e-19
658
- ],
659
- [
660
- 5891086651375999e-19,
661
- 0.0029785502573438758,
662
- 3270666104008398e-19
663
- ],
664
- [
665
- 10146692491640572e-20,
666
- 5364214359186694e-19,
667
- 0.0032979401770712076
668
- ]
669
- ];
670
- S.LINRGB_FROM_SCALED_DISCOUNT = [
671
- [
672
- 1373.2198709594231,
673
- -1100.4251190754821,
674
- -7.278681089101213
675
- ],
676
- [
677
- -271.815969077903,
678
- 559.6580465940733,
679
- -32.46047482791194
680
- ],
681
- [
682
- 1.9622899599665666,
683
- -57.173814538844006,
684
- 308.7233197812385
685
- ]
686
- ];
687
- S.Y_FROM_LINRGB = [0.2126, 0.7152, 0.0722];
688
- S.CRITICAL_PLANES = [
689
- 0.015176349177441876,
690
- 0.045529047532325624,
691
- 0.07588174588720938,
692
- 0.10623444424209313,
693
- 0.13658714259697685,
694
- 0.16693984095186062,
695
- 0.19729253930674434,
696
- 0.2276452376616281,
697
- 0.2579979360165119,
698
- 0.28835063437139563,
699
- 0.3188300904430532,
700
- 0.350925934958123,
701
- 0.3848314933096426,
702
- 0.42057480301049466,
703
- 0.458183274052838,
704
- 0.4976837250274023,
705
- 0.5391024159806381,
706
- 0.5824650784040898,
707
- 0.6277969426914107,
708
- 0.6751227633498623,
709
- 0.7244668422128921,
710
- 0.775853049866786,
711
- 0.829304845476233,
712
- 0.8848452951698498,
713
- 0.942497089126609,
714
- 1.0022825574869039,
715
- 1.0642236851973577,
716
- 1.1283421258858297,
717
- 1.1946592148522128,
718
- 1.2631959812511864,
719
- 1.3339731595349034,
720
- 1.407011200216447,
721
- 1.4823302800086415,
722
- 1.5599503113873272,
723
- 1.6398909516233677,
724
- 1.7221716113234105,
725
- 1.8068114625156377,
726
- 1.8938294463134073,
727
- 1.9832442801866852,
728
- 2.075074464868551,
729
- 2.1693382909216234,
730
- 2.2660538449872063,
731
- 2.36523901573795,
732
- 2.4669114995532007,
733
- 2.5710888059345764,
734
- 2.6777882626779785,
735
- 2.7870270208169257,
736
- 2.898822059350997,
737
- 3.0131901897720907,
738
- 3.1301480604002863,
739
- 3.2497121605402226,
740
- 3.3718988244681087,
741
- 3.4967242352587946,
742
- 3.624204428461639,
743
- 3.754355295633311,
744
- 3.887192587735158,
745
- 4.022731918402185,
746
- 4.160988767090289,
747
- 4.301978482107941,
748
- 4.445716283538092,
749
- 4.592217266055746,
750
- 4.741496401646282,
751
- 4.893568542229298,
752
- 5.048448422192488,
753
- 5.20615066083972,
754
- 5.3666897647573375,
755
- 5.5300801301023865,
756
- 5.696336044816294,
757
- 5.865471690767354,
758
- 6.037501145825082,
759
- 6.212438385869475,
760
- 6.390297286737924,
761
- 6.571091626112461,
762
- 6.7548350853498045,
763
- 6.941541251256611,
764
- 7.131223617812143,
765
- 7.323895587840543,
766
- 7.5195704746346665,
767
- 7.7182615035334345,
768
- 7.919981813454504,
769
- 8.124744458384042,
770
- 8.332562408825165,
771
- 8.543448553206703,
772
- 8.757415699253682,
773
- 8.974476575321063,
774
- 9.194643831691977,
775
- 9.417930041841839,
776
- 9.644347703669503,
777
- 9.873909240696694,
778
- 10.106627003236781,
779
- 10.342513269534024,
780
- 10.58158024687427,
781
- 10.8238400726681,
782
- 11.069304815507364,
783
- 11.317986476196008,
784
- 11.569896988756009,
785
- 11.825048221409341,
786
- 12.083451977536606,
787
- 12.345119996613247,
788
- 12.610063955123938,
789
- 12.878295467455942,
790
- 13.149826086772048,
791
- 13.42466730586372,
792
- 13.702830557985108,
793
- 13.984327217668513,
794
- 14.269168601521828,
795
- 14.55736596900856,
796
- 14.848930523210871,
797
- 15.143873411576273,
798
- 15.44220572664832,
799
- 15.743938506781891,
800
- 16.04908273684337,
801
- 16.35764934889634,
802
- 16.66964922287304,
803
- 16.985093187232053,
804
- 17.30399201960269,
805
- 17.62635644741625,
806
- 17.95219714852476,
807
- 18.281524751807332,
808
- 18.614349837764564,
809
- 18.95068293910138,
810
- 19.290534541298456,
811
- 19.633915083172692,
812
- 19.98083495742689,
813
- 20.331304511189067,
814
- 20.685334046541502,
815
- 21.042933821039977,
816
- 21.404114048223256,
817
- 21.76888489811322,
818
- 22.137256497705877,
819
- 22.50923893145328,
820
- 22.884842241736916,
821
- 23.264076429332462,
822
- 23.6469514538663,
823
- 24.033477234264016,
824
- 24.42366364919083,
825
- 24.817520537484558,
826
- 25.21505769858089,
827
- 25.61628489293138,
828
- 26.021211842414342,
829
- 26.429848230738664,
830
- 26.842203703840827,
831
- 27.258287870275353,
832
- 27.678110301598522,
833
- 28.10168053274597,
834
- 28.529008062403893,
835
- 28.96010235337422,
836
- 29.39497283293396,
837
- 29.83362889318845,
838
- 30.276079891419332,
839
- 30.722335150426627,
840
- 31.172403958865512,
841
- 31.62629557157785,
842
- 32.08401920991837,
843
- 32.54558406207592,
844
- 33.010999283389665,
845
- 33.4802739966603,
846
- 33.953417292456834,
847
- 34.430438229418264,
848
- 34.911345834551085,
849
- 35.39614910352207,
850
- 35.88485700094671,
851
- 36.37747846067349,
852
- 36.87402238606382,
853
- 37.37449765026789,
854
- 37.87891309649659,
855
- 38.38727753828926,
856
- 38.89959975977785,
857
- 39.41588851594697,
858
- 39.93615253289054,
859
- 40.460400508064545,
860
- 40.98864111053629,
861
- 41.520882981230194,
862
- 42.05713473317016,
863
- 42.597404951718396,
864
- 43.141702194811224,
865
- 43.6900349931913,
866
- 44.24241185063697,
867
- 44.798841244188324,
868
- 45.35933162437017,
869
- 45.92389141541209,
870
- 46.49252901546552,
871
- 47.065252796817916,
872
- 47.64207110610409,
873
- 48.22299226451468,
874
- 48.808024568002054,
875
- 49.3971762874833,
876
- 49.9904556690408,
877
- 50.587870934119984,
878
- 51.189430279724725,
879
- 51.79514187861014,
880
- 52.40501387947288,
881
- 53.0190544071392,
882
- 53.637271562750364,
883
- 54.259673423945976,
884
- 54.88626804504493,
885
- 55.517063457223934,
886
- 56.15206766869424,
887
- 56.79128866487574,
888
- 57.43473440856916,
889
- 58.08241284012621,
890
- 58.734331877617365,
891
- 59.39049941699807,
892
- 60.05092333227251,
893
- 60.715611475655585,
894
- 61.38457167773311,
895
- 62.057811747619894,
896
- 62.7353394731159,
897
- 63.417162620860914,
898
- 64.10328893648692,
899
- 64.79372614476921,
900
- 65.48848194977529,
901
- 66.18756403501224,
902
- 66.89098006357258,
903
- 67.59873767827808,
904
- 68.31084450182222,
905
- 69.02730813691093,
906
- 69.74813616640164,
907
- 70.47333615344107,
908
- 71.20291564160104,
909
- 71.93688215501312,
910
- 72.67524319850172,
911
- 73.41800625771542,
912
- 74.16517879925733,
913
- 74.9167682708136,
914
- 75.67278210128072,
915
- 76.43322770089146,
916
- 77.1981124613393,
917
- 77.96744375590167,
918
- 78.74122893956174,
919
- 79.51947534912904,
920
- 80.30219030335869,
921
- 81.08938110306934,
922
- 81.88105503125999,
923
- 82.67721935322541,
924
- 83.4778813166706,
925
- 84.28304815182372,
926
- 85.09272707154808,
927
- 85.90692527145302,
928
- 86.72564993000343,
929
- 87.54890820862819,
930
- 88.3767072518277,
931
- 89.2090541872801,
932
- 90.04595612594655,
933
- 90.88742016217518,
934
- 91.73345337380438,
935
- 92.58406282226491,
936
- 93.43925555268066,
937
- 94.29903859396902,
938
- 95.16341895893969,
939
- 96.03240364439274,
940
- 96.9059996312159,
941
- 97.78421388448044,
942
- 98.6670533535366,
943
- 99.55452497210776
944
- ];
945
- /**
946
- * @license
947
- * Copyright 2021 Google LLC
948
- *
949
- * Licensed under the Apache License, Version 2.0 (the "License");
950
- * you may not use this file except in compliance with the License.
951
- * You may obtain a copy of the License at
952
- *
953
- * http://www.apache.org/licenses/LICENSE-2.0
954
- *
955
- * Unless required by applicable law or agreed to in writing, software
956
- * distributed under the License is distributed on an "AS IS" BASIS,
957
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
958
- * See the License for the specific language governing permissions and
959
- * limitations under the License.
960
- */
961
- class T {
962
- static from(e, r, t) {
963
- return new T(S.solveToInt(e, r, t));
964
- }
965
- /**
966
- * @param argb ARGB representation of a color.
967
- * @return HCT representation of a color in default viewing conditions
968
- */
969
- static fromInt(e) {
970
- return new T(e);
971
- }
972
- toInt() {
973
- return this.argb;
974
- }
975
- /**
976
- * A number, in degrees, representing ex. red, orange, yellow, etc.
977
- * Ranges from 0 <= hue < 360.
978
- */
979
- get hue() {
980
- return this.internalHue;
981
- }
982
- /**
983
- * @param newHue 0 <= newHue < 360; invalid values are corrected.
984
- * Chroma may decrease because chroma has a different maximum for any given
985
- * hue and tone.
986
- */
987
- set hue(e) {
988
- this.setInternalState(S.solveToInt(e, this.internalChroma, this.internalTone));
989
- }
990
- get chroma() {
991
- return this.internalChroma;
992
- }
993
- /**
994
- * @param newChroma 0 <= newChroma < ?
995
- * Chroma may decrease because chroma has a different maximum for any given
996
- * hue and tone.
997
- */
998
- set chroma(e) {
999
- this.setInternalState(S.solveToInt(this.internalHue, e, this.internalTone));
1000
- }
1001
- /** Lightness. Ranges from 0 to 100. */
1002
- get tone() {
1003
- return this.internalTone;
1004
- }
1005
- /**
1006
- * @param newTone 0 <= newTone <= 100; invalid valids are corrected.
1007
- * Chroma may decrease because chroma has a different maximum for any given
1008
- * hue and tone.
1009
- */
1010
- set tone(e) {
1011
- this.setInternalState(S.solveToInt(this.internalHue, this.internalChroma, e));
1012
- }
1013
- /** Sets a property of the Hct object. */
1014
- setValue(e, r) {
1015
- this[e] = r;
1016
- }
1017
- toString() {
1018
- return `HCT(${this.hue.toFixed(0)}, ${this.chroma.toFixed(0)}, ${this.tone.toFixed(0)})`;
1019
- }
1020
- static isBlue(e) {
1021
- return e >= 250 && e < 270;
1022
- }
1023
- static isYellow(e) {
1024
- return e >= 105 && e < 125;
1025
- }
1026
- static isCyan(e) {
1027
- return e >= 170 && e < 207;
1028
- }
1029
- constructor(e) {
1030
- this.argb = e;
1031
- const r = N.fromInt(e);
1032
- this.internalHue = r.hue, this.internalChroma = r.chroma, this.internalTone = ge(e), this.argb = e;
1033
- }
1034
- setInternalState(e) {
1035
- const r = N.fromInt(e);
1036
- this.internalHue = r.hue, this.internalChroma = r.chroma, this.internalTone = ge(e), this.argb = e;
1037
- }
1038
- /**
1039
- * Translates a color into different [ViewingConditions].
1040
- *
1041
- * Colors change appearance. They look different with lights on versus off,
1042
- * the same color, as in hex code, on white looks different when on black.
1043
- * This is called color relativity, most famously explicated by Josef Albers
1044
- * in Interaction of Color.
1045
- *
1046
- * In color science, color appearance models can account for this and
1047
- * calculate the appearance of a color in different settings. HCT is based on
1048
- * CAM16, a color appearance model, and uses it to make these calculations.
1049
- *
1050
- * See [ViewingConditions.make] for parameters affecting color appearance.
1051
- */
1052
- inViewingConditions(e) {
1053
- const t = N.fromInt(this.toInt()).xyzInViewingConditions(e), n = N.fromXyzInViewingConditions(t[0], t[1], t[2], j.make());
1054
- return T.from(n.hue, n.chroma, Pe(t[1]));
1055
- }
1056
- }
1057
- /**
1058
- * @license
1059
- * Copyright 2021 Google LLC
1060
- *
1061
- * Licensed under the Apache License, Version 2.0 (the "License");
1062
- * you may not use this file except in compliance with the License.
1063
- * You may obtain a copy of the License at
1064
- *
1065
- * http://www.apache.org/licenses/LICENSE-2.0
1066
- *
1067
- * Unless required by applicable law or agreed to in writing, software
1068
- * distributed under the License is distributed on an "AS IS" BASIS,
1069
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1070
- * See the License for the specific language governing permissions and
1071
- * limitations under the License.
1072
- */
1073
- class Ce {
1074
- /**
1075
- * Blend the design color's HCT hue towards the key color's HCT
1076
- * hue, in a way that leaves the original color recognizable and
1077
- * recognizably shifted towards the key color.
1078
- *
1079
- * @param designColor ARGB representation of an arbitrary color.
1080
- * @param sourceColor ARGB representation of the main theme color.
1081
- * @return The design color with a hue shifted towards the
1082
- * system's color, a slightly warmer/cooler variant of the design
1083
- * color's hue.
1084
- */
1085
- static harmonize(e, r) {
1086
- const t = T.fromInt(e), n = T.fromInt(r), s = qe(t.hue, n.hue), i = Math.min(s * 0.5, 15), u = ce(t.hue + i * je(t.hue, n.hue));
1087
- return T.from(u, t.chroma, t.tone).toInt();
1088
- }
1089
- /**
1090
- * Blends hue from one color into another. The chroma and tone of
1091
- * the original color are maintained.
1092
- *
1093
- * @param from ARGB representation of color
1094
- * @param to ARGB representation of color
1095
- * @param amount how much blending to perform; 0.0 >= and <= 1.0
1096
- * @return from, with a hue blended towards to. Chroma and tone
1097
- * are constant.
1098
- */
1099
- static hctHue(e, r, t) {
1100
- const n = Ce.cam16Ucs(e, r, t), s = N.fromInt(n), i = N.fromInt(e);
1101
- return T.from(s.hue, i.chroma, ge(e)).toInt();
1102
- }
1103
- /**
1104
- * Blend in CAM16-UCS space.
1105
- *
1106
- * @param from ARGB representation of color
1107
- * @param to ARGB representation of color
1108
- * @param amount how much blending to perform; 0.0 >= and <= 1.0
1109
- * @return from, blended towards to. Hue, chroma, and tone will
1110
- * change.
1111
- */
1112
- static cam16Ucs(e, r, t) {
1113
- const n = N.fromInt(e), s = N.fromInt(r), i = n.jstar, u = n.astar, l = n.bstar, h = s.jstar, d = s.astar, C = s.bstar, p = i + (h - i) * t, D = u + (d - u) * t, m = l + (C - l) * t;
1114
- return N.fromUcs(p, D, m).toInt();
1115
- }
1116
- }
1117
- /**
1118
- * @license
1119
- * Copyright 2022 Google LLC
1120
- *
1121
- * Licensed under the Apache License, Version 2.0 (the "License");
1122
- * you may not use this file except in compliance with the License.
1123
- * You may obtain a copy of the License at
1124
- *
1125
- * http://www.apache.org/licenses/LICENSE-2.0
1126
- *
1127
- * Unless required by applicable law or agreed to in writing, software
1128
- * distributed under the License is distributed on an "AS IS" BASIS,
1129
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1130
- * See the License for the specific language governing permissions and
1131
- * limitations under the License.
1132
- */
1133
- class v {
1134
- /**
1135
- * Returns a contrast ratio, which ranges from 1 to 21.
1136
- *
1137
- * @param toneA Tone between 0 and 100. Values outside will be clamped.
1138
- * @param toneB Tone between 0 and 100. Values outside will be clamped.
1139
- */
1140
- static ratioOfTones(e, r) {
1141
- return e = H(0, 100, e), r = H(0, 100, r), v.ratioOfYs(Z(e), Z(r));
1142
- }
1143
- static ratioOfYs(e, r) {
1144
- const t = e > r ? e : r, n = t === r ? e : r;
1145
- return (t + 5) / (n + 5);
1146
- }
1147
- /**
1148
- * Returns a tone >= tone parameter that ensures ratio parameter.
1149
- * Return value is between 0 and 100.
1150
- * Returns -1 if ratio cannot be achieved with tone parameter.
1151
- *
1152
- * @param tone Tone return value must contrast with.
1153
- * Range is 0 to 100. Invalid values will result in -1 being returned.
1154
- * @param ratio Contrast ratio of return value and tone.
1155
- * Range is 1 to 21, invalid values have undefined behavior.
1156
- */
1157
- static lighter(e, r) {
1158
- if (e < 0 || e > 100)
1159
- return -1;
1160
- const t = Z(e), n = r * (t + 5) - 5, s = v.ratioOfYs(n, t), i = Math.abs(s - r);
1161
- if (s < r && i > 0.04)
1162
- return -1;
1163
- const u = Pe(n) + 0.4;
1164
- return u < 0 || u > 100 ? -1 : u;
1165
- }
1166
- /**
1167
- * Returns a tone <= tone parameter that ensures ratio parameter.
1168
- * Return value is between 0 and 100.
1169
- * Returns -1 if ratio cannot be achieved with tone parameter.
1170
- *
1171
- * @param tone Tone return value must contrast with.
1172
- * Range is 0 to 100. Invalid values will result in -1 being returned.
1173
- * @param ratio Contrast ratio of return value and tone.
1174
- * Range is 1 to 21, invalid values have undefined behavior.
1175
- */
1176
- static darker(e, r) {
1177
- if (e < 0 || e > 100)
1178
- return -1;
1179
- const t = Z(e), n = (t + 5) / r - 5, s = v.ratioOfYs(t, n), i = Math.abs(s - r);
1180
- if (s < r && i > 0.04)
1181
- return -1;
1182
- const u = Pe(n) - 0.4;
1183
- return u < 0 || u > 100 ? -1 : u;
1184
- }
1185
- /**
1186
- * Returns a tone >= tone parameter that ensures ratio parameter.
1187
- * Return value is between 0 and 100.
1188
- * Returns 100 if ratio cannot be achieved with tone parameter.
1189
- *
1190
- * This method is unsafe because the returned value is guaranteed to be in
1191
- * bounds for tone, i.e. between 0 and 100. However, that value may not reach
1192
- * the ratio with tone. For example, there is no color lighter than T100.
1193
- *
1194
- * @param tone Tone return value must contrast with.
1195
- * Range is 0 to 100. Invalid values will result in 100 being returned.
1196
- * @param ratio Desired contrast ratio of return value and tone parameter.
1197
- * Range is 1 to 21, invalid values have undefined behavior.
1198
- */
1199
- static lighterUnsafe(e, r) {
1200
- const t = v.lighter(e, r);
1201
- return t < 0 ? 100 : t;
1202
- }
1203
- /**
1204
- * Returns a tone >= tone parameter that ensures ratio parameter.
1205
- * Return value is between 0 and 100.
1206
- * Returns 100 if ratio cannot be achieved with tone parameter.
1207
- *
1208
- * This method is unsafe because the returned value is guaranteed to be in
1209
- * bounds for tone, i.e. between 0 and 100. However, that value may not reach
1210
- * the [ratio with [tone]. For example, there is no color darker than T0.
1211
- *
1212
- * @param tone Tone return value must contrast with.
1213
- * Range is 0 to 100. Invalid values will result in 0 being returned.
1214
- * @param ratio Desired contrast ratio of return value and tone parameter.
1215
- * Range is 1 to 21, invalid values have undefined behavior.
1216
- */
1217
- static darkerUnsafe(e, r) {
1218
- const t = v.darker(e, r);
1219
- return t < 0 ? 0 : t;
1220
- }
1221
- }
1222
- /**
1223
- * @license
1224
- * Copyright 2023 Google LLC
1225
- *
1226
- * Licensed under the Apache License, Version 2.0 (the "License");
1227
- * you may not use this file except in compliance with the License.
1228
- * You may obtain a copy of the License at
1229
- *
1230
- * http://www.apache.org/licenses/LICENSE-2.0
1231
- *
1232
- * Unless required by applicable law or agreed to in writing, software
1233
- * distributed under the License is distributed on an "AS IS" BASIS,
1234
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1235
- * See the License for the specific language governing permissions and
1236
- * limitations under the License.
1237
- */
1238
- class Se {
1239
- /**
1240
- * Returns true if a color is disliked.
1241
- *
1242
- * @param hct A color to be judged.
1243
- * @return Whether the color is disliked.
1244
- *
1245
- * Disliked is defined as a dark yellow-green that is not neutral.
1246
- */
1247
- static isDisliked(e) {
1248
- const r = Math.round(e.hue) >= 90 && Math.round(e.hue) <= 111, t = Math.round(e.chroma) > 16, n = Math.round(e.tone) < 65;
1249
- return r && t && n;
1250
- }
1251
- /**
1252
- * If a color is disliked, lighten it to make it likable.
1253
- *
1254
- * @param hct A color to be judged.
1255
- * @return A new color if the original color is disliked, or the original
1256
- * color if it is acceptable.
1257
- */
1258
- static fixIfDisliked(e) {
1259
- return Se.isDisliked(e) ? T.from(e.hue, e.chroma, 70) : e;
1260
- }
1261
- }
1262
- /**
1263
- * @license
1264
- * Copyright 2022 Google LLC
1265
- *
1266
- * Licensed under the Apache License, Version 2.0 (the "License");
1267
- * you may not use this file except in compliance with the License.
1268
- * You may obtain a copy of the License at
1269
- *
1270
- * http://www.apache.org/licenses/LICENSE-2.0
1271
- *
1272
- * Unless required by applicable law or agreed to in writing, software
1273
- * distributed under the License is distributed on an "AS IS" BASIS,
1274
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1275
- * See the License for the specific language governing permissions and
1276
- * limitations under the License.
1277
- */
1278
- function rr(a, e, r) {
1279
- if (a.name !== r.name)
1280
- throw new Error(`Attempting to extend color ${a.name} with color ${r.name} of different name for spec version ${e}.`);
1281
- if (a.isBackground !== r.isBackground)
1282
- throw new Error(`Attempting to extend color ${a.name} as a ${a.isBackground ? "background" : "foreground"} with color ${r.name} as a ${r.isBackground ? "background" : "foreground"} for spec version ${e}.`);
1283
- }
1284
- function b(a, e, r) {
1285
- return rr(a, e, r), c.fromPalette({
1286
- name: a.name,
1287
- palette: (t) => t.specVersion === e ? r.palette(t) : a.palette(t),
1288
- tone: (t) => t.specVersion === e ? r.tone(t) : a.tone(t),
1289
- isBackground: a.isBackground,
1290
- chromaMultiplier: (t) => {
1291
- const n = t.specVersion === e ? r.chromaMultiplier : a.chromaMultiplier;
1292
- return n !== void 0 ? n(t) : 1;
1293
- },
1294
- background: (t) => {
1295
- const n = t.specVersion === e ? r.background : a.background;
1296
- return n !== void 0 ? n(t) : void 0;
1297
- },
1298
- secondBackground: (t) => {
1299
- const n = t.specVersion === e ? r.secondBackground : a.secondBackground;
1300
- return n !== void 0 ? n(t) : void 0;
1301
- },
1302
- contrastCurve: (t) => {
1303
- const n = t.specVersion === e ? r.contrastCurve : a.contrastCurve;
1304
- return n !== void 0 ? n(t) : void 0;
1305
- },
1306
- toneDeltaPair: (t) => {
1307
- const n = t.specVersion === e ? r.toneDeltaPair : a.toneDeltaPair;
1308
- return n !== void 0 ? n(t) : void 0;
1309
- }
1310
- });
1311
- }
1312
- class c {
1313
- /**
1314
- * Create a DynamicColor defined by a TonalPalette and HCT tone.
1315
- *
1316
- * @param args Functions with DynamicScheme as input. Must provide a palette
1317
- * and tone. May provide a background DynamicColor and ToneDeltaPair.
1318
- */
1319
- static fromPalette(e) {
1320
- return new c(e.name ?? "", e.palette, e.tone ?? c.getInitialToneFromBackground(e.background), e.isBackground ?? !1, e.chromaMultiplier, e.background, e.secondBackground, e.contrastCurve, e.toneDeltaPair);
1321
- }
1322
- static getInitialToneFromBackground(e) {
1323
- return e === void 0 ? (r) => 50 : (r) => e(r) ? e(r).getTone(r) : 50;
1324
- }
1325
- /**
1326
- * The base constructor for DynamicColor.
1327
- *
1328
- * _Strongly_ prefer using one of the convenience constructors. This class is
1329
- * arguably too flexible to ensure it can support any scenario. Functional
1330
- * arguments allow overriding without risks that come with subclasses.
1331
- *
1332
- * For example, the default behavior of adjust tone at max contrast
1333
- * to be at a 7.0 ratio with its background is principled and
1334
- * matches accessibility guidance. That does not mean it's the desired
1335
- * approach for _every_ design system, and every color pairing,
1336
- * always, in every case.
1337
- *
1338
- * @param name The name of the dynamic color. Defaults to empty.
1339
- * @param palette Function that provides a TonalPalette given DynamicScheme. A
1340
- * TonalPalette is defined by a hue and chroma, so this replaces the need
1341
- * to specify hue/chroma. By providing a tonal palette, when contrast
1342
- * adjustments are made, intended chroma can be preserved.
1343
- * @param tone Function that provides a tone, given a DynamicScheme.
1344
- * @param isBackground Whether this dynamic color is a background, with some
1345
- * other color as the foreground. Defaults to false.
1346
- * @param chromaMultiplier A factor that multiplies the chroma for this color.
1347
- * @param background The background of the dynamic color (as a function of a
1348
- * `DynamicScheme`), if it exists.
1349
- * @param secondBackground A second background of the dynamic color (as a
1350
- * function of a `DynamicScheme`), if it exists.
1351
- * @param contrastCurve A `ContrastCurve` object specifying how its contrast
1352
- * against its background should behave in various contrast levels
1353
- * options.
1354
- * @param toneDeltaPair A `ToneDeltaPair` object specifying a tone delta
1355
- * constraint between two colors. One of them must be the color being
1356
- * constructed.
1357
- */
1358
- constructor(e, r, t, n, s, i, u, l, h) {
1359
- if (this.name = e, this.palette = r, this.tone = t, this.isBackground = n, this.chromaMultiplier = s, this.background = i, this.secondBackground = u, this.contrastCurve = l, this.toneDeltaPair = h, this.hctCache = /* @__PURE__ */ new Map(), !i && u)
1360
- throw new Error(`Color ${e} has secondBackgrounddefined, but background is not defined.`);
1361
- if (!i && l)
1362
- throw new Error(`Color ${e} has contrastCurvedefined, but background is not defined.`);
1363
- if (i && !l)
1364
- throw new Error(`Color ${e} has backgrounddefined, but contrastCurve is not defined.`);
1365
- }
1366
- /**
1367
- * Returns a deep copy of this DynamicColor.
1368
- */
1369
- clone() {
1370
- return c.fromPalette({
1371
- name: this.name,
1372
- palette: this.palette,
1373
- tone: this.tone,
1374
- isBackground: this.isBackground,
1375
- chromaMultiplier: this.chromaMultiplier,
1376
- background: this.background,
1377
- secondBackground: this.secondBackground,
1378
- contrastCurve: this.contrastCurve,
1379
- toneDeltaPair: this.toneDeltaPair
1380
- });
1381
- }
1382
- /**
1383
- * Clears the cache of HCT values for this color. For testing or debugging
1384
- * purposes.
1385
- */
1386
- clearCache() {
1387
- this.hctCache.clear();
1388
- }
1389
- /**
1390
- * Returns a ARGB integer (i.e. a hex code).
1391
- *
1392
- * @param scheme Defines the conditions of the user interface, for example,
1393
- * whether or not it is dark mode or light mode, and what the desired
1394
- * contrast level is.
1395
- */
1396
- getArgb(e) {
1397
- return this.getHct(e).toInt();
1398
- }
1399
- /**
1400
- * Returns a color, expressed in the HCT color space, that this
1401
- * DynamicColor is under the conditions in scheme.
1402
- *
1403
- * @param scheme Defines the conditions of the user interface, for example,
1404
- * whether or not it is dark mode or light mode, and what the desired
1405
- * contrast level is.
1406
- */
1407
- getHct(e) {
1408
- const r = this.hctCache.get(e);
1409
- if (r != null)
1410
- return r;
1411
- const t = we(e.specVersion).getHct(e, this);
1412
- return this.hctCache.size > 4 && this.hctCache.clear(), this.hctCache.set(e, t), t;
1413
- }
1414
- /**
1415
- * Returns a tone, T in the HCT color space, that this DynamicColor is under
1416
- * the conditions in scheme.
1417
- *
1418
- * @param scheme Defines the conditions of the user interface, for example,
1419
- * whether or not it is dark mode or light mode, and what the desired
1420
- * contrast level is.
1421
- */
1422
- getTone(e) {
1423
- return we(e.specVersion).getTone(e, this);
1424
- }
1425
- /**
1426
- * Given a background tone, finds a foreground tone, while ensuring they reach
1427
- * a contrast ratio that is as close to [ratio] as possible.
1428
- *
1429
- * @param bgTone Tone in HCT. Range is 0 to 100, undefined behavior when it
1430
- * falls outside that range.
1431
- * @param ratio The contrast ratio desired between bgTone and the return
1432
- * value.
1433
- */
1434
- static foregroundTone(e, r) {
1435
- const t = v.lighterUnsafe(e, r), n = v.darkerUnsafe(e, r), s = v.ratioOfTones(t, e), i = v.ratioOfTones(n, e);
1436
- if (c.tonePrefersLightForeground(e)) {
1437
- const l = Math.abs(s - i) < 0.1 && s < r && i < r;
1438
- return s >= r || s >= i || l ? t : n;
1439
- } else
1440
- return i >= r || i >= s ? n : t;
1441
- }
1442
- /**
1443
- * Returns whether [tone] prefers a light foreground.
1444
- *
1445
- * People prefer white foregrounds on ~T60-70. Observed over time, and also
1446
- * by Andrew Somers during research for APCA.
1447
- *
1448
- * T60 used as to create the smallest discontinuity possible when skipping
1449
- * down to T49 in order to ensure light foregrounds.
1450
- * Since `tertiaryContainer` in dark monochrome scheme requires a tone of
1451
- * 60, it should not be adjusted. Therefore, 60 is excluded here.
1452
- */
1453
- static tonePrefersLightForeground(e) {
1454
- return Math.round(e) < 60;
1455
- }
1456
- /**
1457
- * Returns whether [tone] can reach a contrast ratio of 4.5 with a lighter
1458
- * color.
1459
- */
1460
- static toneAllowsLightForeground(e) {
1461
- return Math.round(e) <= 49;
1462
- }
1463
- /**
1464
- * Adjusts a tone such that white has 4.5 contrast, if the tone is
1465
- * reasonably close to supporting it.
1466
- */
1467
- static enableLightForeground(e) {
1468
- return c.tonePrefersLightForeground(e) && !c.toneAllowsLightForeground(e) ? 49 : e;
1469
- }
1470
- }
1471
- class tr {
1472
- getHct(e, r) {
1473
- const t = r.getTone(e);
1474
- return r.palette(e).getHct(t);
1475
- }
1476
- getTone(e, r) {
1477
- const t = e.contrastLevel < 0, n = r.toneDeltaPair ? r.toneDeltaPair(e) : void 0;
1478
- if (n) {
1479
- const s = n.roleA, i = n.roleB, u = n.delta, l = n.polarity, h = n.stayTogether, d = l === "nearer" || l === "lighter" && !e.isDark || l === "darker" && e.isDark, C = d ? s : i, p = d ? i : s, D = r.name === C.name, m = e.isDark ? 1 : -1;
1480
- let g = C.tone(e), P = p.tone(e);
1481
- if (r.background && C.contrastCurve && p.contrastCurve) {
1482
- const A = r.background(e), B = C.contrastCurve(e), O = p.contrastCurve(e);
1483
- if (A && B && O) {
1484
- const R = A.getTone(e), V = B.get(e.contrastLevel), I = O.get(e.contrastLevel);
1485
- v.ratioOfTones(R, g) < V && (g = c.foregroundTone(R, V)), v.ratioOfTones(R, P) < I && (P = c.foregroundTone(R, I)), t && (g = c.foregroundTone(R, V), P = c.foregroundTone(R, I));
1486
- }
1487
- }
1488
- return (P - g) * m < u && (P = H(0, 100, g + u * m), (P - g) * m >= u || (g = H(0, 100, P - u * m))), 50 <= g && g < 60 ? m > 0 ? (g = 60, P = Math.max(P, g + u * m)) : (g = 49, P = Math.min(P, g + u * m)) : 50 <= P && P < 60 && (h ? m > 0 ? (g = 60, P = Math.max(P, g + u * m)) : (g = 49, P = Math.min(P, g + u * m)) : m > 0 ? P = 60 : P = 49), D ? g : P;
1489
- } else {
1490
- let s = r.tone(e);
1491
- if (r.background == null || r.background(e) === void 0 || r.contrastCurve == null || r.contrastCurve(e) === void 0)
1492
- return s;
1493
- const i = r.background(e).getTone(e), u = r.contrastCurve(e).get(e.contrastLevel);
1494
- if (v.ratioOfTones(i, s) >= u || (s = c.foregroundTone(i, u)), t && (s = c.foregroundTone(i, u)), r.isBackground && 50 <= s && s < 60 && (v.ratioOfTones(49, i) >= u ? s = 49 : s = 60), r.secondBackground == null || r.secondBackground(e) === void 0)
1495
- return s;
1496
- const [l, h] = [r.background, r.secondBackground], [d, C] = [l(e).getTone(e), h(e).getTone(e)], [p, D] = [Math.max(d, C), Math.min(d, C)];
1497
- if (v.ratioOfTones(p, s) >= u && v.ratioOfTones(D, s) >= u)
1498
- return s;
1499
- const m = v.lighter(p, u), g = v.darker(D, u), P = [];
1500
- return m !== -1 && P.push(m), g !== -1 && P.push(g), c.tonePrefersLightForeground(d) || c.tonePrefersLightForeground(C) ? m < 0 ? 100 : m : P.length === 1 ? P[0] : g < 0 ? 0 : g;
1501
- }
1502
- }
1503
- }
1504
- class nr {
1505
- getHct(e, r) {
1506
- const t = r.palette(e), n = r.getTone(e), s = t.hue, i = t.chroma * (r.chromaMultiplier ? r.chromaMultiplier(e) : 1);
1507
- return T.from(s, i, n);
1508
- }
1509
- getTone(e, r) {
1510
- const t = r.toneDeltaPair ? r.toneDeltaPair(e) : void 0;
1511
- if (t) {
1512
- const n = t.roleA, s = t.roleB, i = t.polarity, u = t.constraint, l = i === "darker" || i === "relative_lighter" && e.isDark || i === "relative_darker" && !e.isDark ? -t.delta : t.delta, h = r.name === n.name, d = h ? n : s, C = h ? s : n;
1513
- let p = d.tone(e), D = C.getTone(e);
1514
- const m = l * (h ? 1 : -1);
1515
- if (u === "exact" ? p = H(0, 100, D + m) : u === "nearer" ? m > 0 ? p = H(0, 100, H(D, D + m, p)) : p = H(0, 100, H(D + m, D, p)) : u === "farther" && (m > 0 ? p = H(D + m, 100, p) : p = H(0, D + m, p)), r.background && r.contrastCurve) {
1516
- const g = r.background(e), P = r.contrastCurve(e);
1517
- if (g && P) {
1518
- const A = g.getTone(e), B = P.get(e.contrastLevel);
1519
- p = v.ratioOfTones(A, p) >= B && e.contrastLevel >= 0 ? p : c.foregroundTone(A, B);
1520
- }
1521
- }
1522
- return r.isBackground && !r.name.endsWith("_fixed_dim") && (p >= 57 ? p = H(65, 100, p) : p = H(0, 49, p)), p;
1523
- } else {
1524
- let n = r.tone(e);
1525
- if (r.background == null || r.background(e) === void 0 || r.contrastCurve == null || r.contrastCurve(e) === void 0)
1526
- return n;
1527
- const s = r.background(e).getTone(e), i = r.contrastCurve(e).get(e.contrastLevel);
1528
- if (n = v.ratioOfTones(s, n) >= i && e.contrastLevel >= 0 ? n : c.foregroundTone(s, i), r.isBackground && !r.name.endsWith("_fixed_dim") && (n >= 57 ? n = H(65, 100, n) : n = H(0, 49, n)), r.secondBackground == null || r.secondBackground(e) === void 0)
1529
- return n;
1530
- const [u, l] = [r.background, r.secondBackground], [h, d] = [u(e).getTone(e), l(e).getTone(e)], [C, p] = [Math.max(h, d), Math.min(h, d)];
1531
- if (v.ratioOfTones(C, n) >= i && v.ratioOfTones(p, n) >= i)
1532
- return n;
1533
- const D = v.lighter(C, i), m = v.darker(p, i), g = [];
1534
- return D !== -1 && g.push(D), m !== -1 && g.push(m), c.tonePrefersLightForeground(h) || c.tonePrefersLightForeground(d) ? D < 0 ? 100 : D : g.length === 1 ? g[0] : m < 0 ? 0 : m;
1535
- }
1536
- }
1537
- }
1538
- const ar = new tr(), or = new nr();
1539
- function we(a) {
1540
- return a === "2025" ? or : ar;
1541
- }
1542
- /**
1543
- * @license
1544
- * Copyright 2021 Google LLC
1545
- *
1546
- * Licensed under the Apache License, Version 2.0 (the "License");
1547
- * you may not use this file except in compliance with the License.
1548
- * You may obtain a copy of the License at
1549
- *
1550
- * http://www.apache.org/licenses/LICENSE-2.0
1551
- *
1552
- * Unless required by applicable law or agreed to in writing, software
1553
- * distributed under the License is distributed on an "AS IS" BASIS,
1554
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1555
- * See the License for the specific language governing permissions and
1556
- * limitations under the License.
1557
- */
1558
- class Y {
1559
- /**
1560
- * @param argb ARGB representation of a color
1561
- * @return Tones matching that color's hue and chroma.
1562
- */
1563
- static fromInt(e) {
1564
- const r = T.fromInt(e);
1565
- return Y.fromHct(r);
1566
- }
1567
- /**
1568
- * @param hct Hct
1569
- * @return Tones matching that color's hue and chroma.
1570
- */
1571
- static fromHct(e) {
1572
- return new Y(e.hue, e.chroma, e);
1573
- }
1574
- /**
1575
- * @param hue HCT hue
1576
- * @param chroma HCT chroma
1577
- * @return Tones matching hue and chroma.
1578
- */
1579
- static fromHueAndChroma(e, r) {
1580
- const t = new ir(e, r).create();
1581
- return new Y(e, r, t);
1582
- }
1583
- constructor(e, r, t) {
1584
- this.hue = e, this.chroma = r, this.keyColor = t, this.cache = /* @__PURE__ */ new Map();
1585
- }
1586
- /**
1587
- * @param tone HCT tone, measured from 0 to 100.
1588
- * @return ARGB representation of a color with that tone.
1589
- */
1590
- tone(e) {
1591
- let r = this.cache.get(e);
1592
- return r === void 0 && (e == 99 && T.isYellow(this.hue) ? r = this.averageArgb(this.tone(98), this.tone(100)) : r = T.from(this.hue, this.chroma, e).toInt(), this.cache.set(e, r)), r;
1593
- }
1594
- /**
1595
- * @param tone HCT tone.
1596
- * @return HCT representation of a color with that tone.
1597
- */
1598
- getHct(e) {
1599
- return T.fromInt(this.tone(e));
1600
- }
1601
- averageArgb(e, r) {
1602
- const t = e >>> 16 & 255, n = e >>> 8 & 255, s = e & 255, i = r >>> 16 & 255, u = r >>> 8 & 255, l = r & 255, h = Math.round((t + i) / 2), d = Math.round((n + u) / 2), C = Math.round((s + l) / 2);
1603
- return (255 << 24 | (h & 255) << 16 | (d & 255) << 8 | C & 255) >>> 0;
1604
- }
1605
- }
1606
- class ir {
1607
- constructor(e, r) {
1608
- this.hue = e, this.requestedChroma = r, this.chromaCache = /* @__PURE__ */ new Map(), this.maxChromaValue = 200;
1609
- }
1610
- /**
1611
- * Creates a key color from a [hue] and a [chroma].
1612
- * The key color is the first tone, starting from T50, matching the given hue
1613
- * and chroma.
1614
- *
1615
- * @return Key color [Hct]
1616
- */
1617
- create() {
1618
- let n = 0, s = 100;
1619
- for (; n < s; ) {
1620
- const i = Math.floor((n + s) / 2), u = this.maxChroma(i) < this.maxChroma(i + 1);
1621
- if (this.maxChroma(i) >= this.requestedChroma - 0.01)
1622
- if (Math.abs(n - 50) < Math.abs(s - 50))
1623
- s = i;
1624
- else {
1625
- if (n === i)
1626
- return T.from(this.hue, this.requestedChroma, n);
1627
- n = i;
1628
- }
1629
- else
1630
- u ? n = i + 1 : s = i;
1631
- }
1632
- return T.from(this.hue, this.requestedChroma, n);
1633
- }
1634
- // Find the maximum chroma for a given tone
1635
- maxChroma(e) {
1636
- if (this.chromaCache.has(e))
1637
- return this.chromaCache.get(e);
1638
- const r = T.from(this.hue, this.maxChromaValue, e).chroma;
1639
- return this.chromaCache.set(e, r), r;
1640
- }
1641
- }
1642
- /**
1643
- * @license
1644
- * Copyright 2023 Google LLC
1645
- *
1646
- * Licensed under the Apache License, Version 2.0 (the "License");
1647
- * you may not use this file except in compliance with the License.
1648
- * You may obtain a copy of the License at
1649
- *
1650
- * http://www.apache.org/licenses/LICENSE-2.0
1651
- *
1652
- * Unless required by applicable law or agreed to in writing, software
1653
- * distributed under the License is distributed on an "AS IS" BASIS,
1654
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1655
- * See the License for the specific language governing permissions and
1656
- * limitations under the License.
1657
- */
1658
- class y {
1659
- /**
1660
- * Creates a `ContrastCurve` object.
1661
- *
1662
- * @param low Value for contrast level -1.0
1663
- * @param normal Value for contrast level 0.0
1664
- * @param medium Value for contrast level 0.5
1665
- * @param high Value for contrast level 1.0
1666
- */
1667
- constructor(e, r, t, n) {
1668
- this.low = e, this.normal = r, this.medium = t, this.high = n;
1669
- }
1670
- /**
1671
- * Returns the value at a given contrast level.
1672
- *
1673
- * @param contrastLevel The contrast level. 0.0 is the default (normal); -1.0
1674
- * is the lowest; 1.0 is the highest.
1675
- * @return The value. For contrast ratios, a number between 1.0 and 21.0.
1676
- */
1677
- get(e) {
1678
- return e <= -1 ? this.low : e < 0 ? ne(this.low, this.normal, (e - -1) / 1) : e < 0.5 ? ne(this.normal, this.medium, (e - 0) / 0.5) : e < 1 ? ne(this.medium, this.high, (e - 0.5) / 0.5) : this.high;
1679
- }
1680
- }
1681
- /**
1682
- * @license
1683
- * Copyright 2023 Google LLC
1684
- *
1685
- * Licensed under the Apache License, Version 2.0 (the "License");
1686
- * you may not use this file except in compliance with the License.
1687
- * You may obtain a copy of the License at
1688
- *
1689
- * http://www.apache.org/licenses/LICENSE-2.0
1690
- *
1691
- * Unless required by applicable law or agreed to in writing, software
1692
- * distributed under the License is distributed on an "AS IS" BASIS,
1693
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1694
- * See the License for the specific language governing permissions and
1695
- * limitations under the License.
1696
- */
1697
- class w {
1698
- /**
1699
- * Documents a constraint in tone distance between two DynamicColors.
1700
- *
1701
- * The polarity is an adjective that describes "A", compared to "B".
1702
- *
1703
- * For instance, ToneDeltaPair(A, B, 15, 'darker', 'exact') states that
1704
- * A's tone should be exactly 15 darker than B's.
1705
- *
1706
- * 'relative_darker' and 'relative_lighter' describes the tone adjustment
1707
- * relative to the surface color trend (white in light mode; black in dark
1708
- * mode). For instance, ToneDeltaPair(A, B, 10, 'relative_lighter',
1709
- * 'farther') states that A should be at least 10 lighter than B in light
1710
- * mode, and at least 10 darker than B in dark mode.
1711
- *
1712
- * @param roleA The first role in a pair.
1713
- * @param roleB The second role in a pair.
1714
- * @param delta Required difference between tones. Absolute value, negative
1715
- * values have undefined behavior.
1716
- * @param polarity The relative relation between tones of roleA and roleB,
1717
- * as described above.
1718
- * @param constraint How to fulfill the tone delta pair constraint.
1719
- * @param stayTogether Whether these two roles should stay on the same side
1720
- * of the "awkward zone" (T50-59). This is necessary for certain cases where
1721
- * one role has two backgrounds.
1722
- */
1723
- constructor(e, r, t, n, s, i) {
1724
- this.roleA = e, this.roleB = r, this.delta = t, this.polarity = n, this.stayTogether = s, this.constraint = i, this.constraint = i ?? "exact";
1725
- }
1726
- }
1727
- /**
1728
- * @license
1729
- * Copyright 2022 Google LLC
1730
- *
1731
- * Licensed under the Apache License, Version 2.0 (the "License");
1732
- * you may not use this file except in compliance with the License.
1733
- * You may obtain a copy of the License at
1734
- *
1735
- * http://www.apache.org/licenses/LICENSE-2.0
1736
- *
1737
- * Unless required by applicable law or agreed to in writing, software
1738
- * distributed under the License is distributed on an "AS IS" BASIS,
1739
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1740
- * See the License for the specific language governing permissions and
1741
- * limitations under the License.
1742
- */
1743
- var f;
1744
- (function(a) {
1745
- a[a.MONOCHROME = 0] = "MONOCHROME", a[a.NEUTRAL = 1] = "NEUTRAL", a[a.TONAL_SPOT = 2] = "TONAL_SPOT", a[a.VIBRANT = 3] = "VIBRANT", a[a.EXPRESSIVE = 4] = "EXPRESSIVE", a[a.FIDELITY = 5] = "FIDELITY", a[a.CONTENT = 6] = "CONTENT", a[a.RAINBOW = 7] = "RAINBOW", a[a.FRUIT_SALAD = 8] = "FRUIT_SALAD";
1746
- })(f || (f = {}));
1747
- /**
1748
- * @license
1749
- * Copyright 2025 Google LLC
1750
- *
1751
- * Licensed under the Apache License, Version 2.0 (the "License");
1752
- * you may not use this file except in compliance with the License.
1753
- * You may obtain a copy of the License at
1754
- *
1755
- * http://www.apache.org/licenses/LICENSE-2.0
1756
- *
1757
- * Unless required by applicable law or agreed to in writing, software
1758
- * distributed under the License is distributed on an "AS IS" BASIS,
1759
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1760
- * See the License for the specific language governing permissions and
1761
- * limitations under the License.
1762
- */
1763
- function re(a) {
1764
- return a.variant === f.FIDELITY || a.variant === f.CONTENT;
1765
- }
1766
- function M(a) {
1767
- return a.variant === f.MONOCHROME;
1768
- }
1769
- function sr(a, e, r, t) {
1770
- let n = r, s = T.from(a, e, r);
1771
- if (s.chroma < e) {
1772
- let i = s.chroma;
1773
- for (; s.chroma < e; ) {
1774
- n += t ? -1 : 1;
1775
- const u = T.from(a, e, n);
1776
- if (i > u.chroma || Math.abs(u.chroma - e) < 0.4)
1777
- break;
1778
- const l = Math.abs(u.chroma - e), h = Math.abs(s.chroma - e);
1779
- l < h && (s = u), i = Math.max(i, u.chroma);
1780
- }
1781
- }
1782
- return n;
1783
- }
1784
- class cr {
1785
- ////////////////////////////////////////////////////////////////
1786
- // Main Palettes //
1787
- ////////////////////////////////////////////////////////////////
1788
- primaryPaletteKeyColor() {
1789
- return c.fromPalette({
1790
- name: "primary_palette_key_color",
1791
- palette: (e) => e.primaryPalette,
1792
- tone: (e) => e.primaryPalette.keyColor.tone
1793
- });
1794
- }
1795
- secondaryPaletteKeyColor() {
1796
- return c.fromPalette({
1797
- name: "secondary_palette_key_color",
1798
- palette: (e) => e.secondaryPalette,
1799
- tone: (e) => e.secondaryPalette.keyColor.tone
1800
- });
1801
- }
1802
- tertiaryPaletteKeyColor() {
1803
- return c.fromPalette({
1804
- name: "tertiary_palette_key_color",
1805
- palette: (e) => e.tertiaryPalette,
1806
- tone: (e) => e.tertiaryPalette.keyColor.tone
1807
- });
1808
- }
1809
- neutralPaletteKeyColor() {
1810
- return c.fromPalette({
1811
- name: "neutral_palette_key_color",
1812
- palette: (e) => e.neutralPalette,
1813
- tone: (e) => e.neutralPalette.keyColor.tone
1814
- });
1815
- }
1816
- neutralVariantPaletteKeyColor() {
1817
- return c.fromPalette({
1818
- name: "neutral_variant_palette_key_color",
1819
- palette: (e) => e.neutralVariantPalette,
1820
- tone: (e) => e.neutralVariantPalette.keyColor.tone
1821
- });
1822
- }
1823
- errorPaletteKeyColor() {
1824
- return c.fromPalette({
1825
- name: "error_palette_key_color",
1826
- palette: (e) => e.errorPalette,
1827
- tone: (e) => e.errorPalette.keyColor.tone
1828
- });
1829
- }
1830
- ////////////////////////////////////////////////////////////////
1831
- // Surfaces [S] //
1832
- ////////////////////////////////////////////////////////////////
1833
- background() {
1834
- return c.fromPalette({
1835
- name: "background",
1836
- palette: (e) => e.neutralPalette,
1837
- tone: (e) => e.isDark ? 6 : 98,
1838
- isBackground: !0
1839
- });
1840
- }
1841
- onBackground() {
1842
- return c.fromPalette({
1843
- name: "on_background",
1844
- palette: (e) => e.neutralPalette,
1845
- tone: (e) => e.isDark ? 90 : 10,
1846
- background: (e) => this.background(),
1847
- contrastCurve: (e) => new y(3, 3, 4.5, 7)
1848
- });
1849
- }
1850
- surface() {
1851
- return c.fromPalette({
1852
- name: "surface",
1853
- palette: (e) => e.neutralPalette,
1854
- tone: (e) => e.isDark ? 6 : 98,
1855
- isBackground: !0
1856
- });
1857
- }
1858
- surfaceDim() {
1859
- return c.fromPalette({
1860
- name: "surface_dim",
1861
- palette: (e) => e.neutralPalette,
1862
- tone: (e) => e.isDark ? 6 : new y(87, 87, 80, 75).get(e.contrastLevel),
1863
- isBackground: !0
1864
- });
1865
- }
1866
- surfaceBright() {
1867
- return c.fromPalette({
1868
- name: "surface_bright",
1869
- palette: (e) => e.neutralPalette,
1870
- tone: (e) => e.isDark ? new y(24, 24, 29, 34).get(e.contrastLevel) : 98,
1871
- isBackground: !0
1872
- });
1873
- }
1874
- surfaceContainerLowest() {
1875
- return c.fromPalette({
1876
- name: "surface_container_lowest",
1877
- palette: (e) => e.neutralPalette,
1878
- tone: (e) => e.isDark ? new y(4, 4, 2, 0).get(e.contrastLevel) : 100,
1879
- isBackground: !0
1880
- });
1881
- }
1882
- surfaceContainerLow() {
1883
- return c.fromPalette({
1884
- name: "surface_container_low",
1885
- palette: (e) => e.neutralPalette,
1886
- tone: (e) => e.isDark ? new y(10, 10, 11, 12).get(e.contrastLevel) : new y(96, 96, 96, 95).get(e.contrastLevel),
1887
- isBackground: !0
1888
- });
1889
- }
1890
- surfaceContainer() {
1891
- return c.fromPalette({
1892
- name: "surface_container",
1893
- palette: (e) => e.neutralPalette,
1894
- tone: (e) => e.isDark ? new y(12, 12, 16, 20).get(e.contrastLevel) : new y(94, 94, 92, 90).get(e.contrastLevel),
1895
- isBackground: !0
1896
- });
1897
- }
1898
- surfaceContainerHigh() {
1899
- return c.fromPalette({
1900
- name: "surface_container_high",
1901
- palette: (e) => e.neutralPalette,
1902
- tone: (e) => e.isDark ? new y(17, 17, 21, 25).get(e.contrastLevel) : new y(92, 92, 88, 85).get(e.contrastLevel),
1903
- isBackground: !0
1904
- });
1905
- }
1906
- surfaceContainerHighest() {
1907
- return c.fromPalette({
1908
- name: "surface_container_highest",
1909
- palette: (e) => e.neutralPalette,
1910
- tone: (e) => e.isDark ? new y(22, 22, 26, 30).get(e.contrastLevel) : new y(90, 90, 84, 80).get(e.contrastLevel),
1911
- isBackground: !0
1912
- });
1913
- }
1914
- onSurface() {
1915
- return c.fromPalette({
1916
- name: "on_surface",
1917
- palette: (e) => e.neutralPalette,
1918
- tone: (e) => e.isDark ? 90 : 10,
1919
- background: (e) => this.highestSurface(e),
1920
- contrastCurve: (e) => new y(4.5, 7, 11, 21)
1921
- });
1922
- }
1923
- surfaceVariant() {
1924
- return c.fromPalette({
1925
- name: "surface_variant",
1926
- palette: (e) => e.neutralVariantPalette,
1927
- tone: (e) => e.isDark ? 30 : 90,
1928
- isBackground: !0
1929
- });
1930
- }
1931
- onSurfaceVariant() {
1932
- return c.fromPalette({
1933
- name: "on_surface_variant",
1934
- palette: (e) => e.neutralVariantPalette,
1935
- tone: (e) => e.isDark ? 80 : 30,
1936
- background: (e) => this.highestSurface(e),
1937
- contrastCurve: (e) => new y(3, 4.5, 7, 11)
1938
- });
1939
- }
1940
- inverseSurface() {
1941
- return c.fromPalette({
1942
- name: "inverse_surface",
1943
- palette: (e) => e.neutralPalette,
1944
- tone: (e) => e.isDark ? 90 : 20,
1945
- isBackground: !0
1946
- });
1947
- }
1948
- inverseOnSurface() {
1949
- return c.fromPalette({
1950
- name: "inverse_on_surface",
1951
- palette: (e) => e.neutralPalette,
1952
- tone: (e) => e.isDark ? 20 : 95,
1953
- background: (e) => this.inverseSurface(),
1954
- contrastCurve: (e) => new y(4.5, 7, 11, 21)
1955
- });
1956
- }
1957
- outline() {
1958
- return c.fromPalette({
1959
- name: "outline",
1960
- palette: (e) => e.neutralVariantPalette,
1961
- tone: (e) => e.isDark ? 60 : 50,
1962
- background: (e) => this.highestSurface(e),
1963
- contrastCurve: (e) => new y(1.5, 3, 4.5, 7)
1964
- });
1965
- }
1966
- outlineVariant() {
1967
- return c.fromPalette({
1968
- name: "outline_variant",
1969
- palette: (e) => e.neutralVariantPalette,
1970
- tone: (e) => e.isDark ? 30 : 80,
1971
- background: (e) => this.highestSurface(e),
1972
- contrastCurve: (e) => new y(1, 1, 3, 4.5)
1973
- });
1974
- }
1975
- shadow() {
1976
- return c.fromPalette({
1977
- name: "shadow",
1978
- palette: (e) => e.neutralPalette,
1979
- tone: (e) => 0
1980
- });
1981
- }
1982
- scrim() {
1983
- return c.fromPalette({
1984
- name: "scrim",
1985
- palette: (e) => e.neutralPalette,
1986
- tone: (e) => 0
1987
- });
1988
- }
1989
- surfaceTint() {
1990
- return c.fromPalette({
1991
- name: "surface_tint",
1992
- palette: (e) => e.primaryPalette,
1993
- tone: (e) => e.isDark ? 80 : 40,
1994
- isBackground: !0
1995
- });
1996
- }
1997
- ////////////////////////////////////////////////////////////////
1998
- // Primary [P]. //
1999
- ////////////////////////////////////////////////////////////////
2000
- primary() {
2001
- return c.fromPalette({
2002
- name: "primary",
2003
- palette: (e) => e.primaryPalette,
2004
- tone: (e) => M(e) ? e.isDark ? 100 : 0 : e.isDark ? 80 : 40,
2005
- isBackground: !0,
2006
- background: (e) => this.highestSurface(e),
2007
- contrastCurve: (e) => new y(3, 4.5, 7, 7),
2008
- toneDeltaPair: (e) => new w(this.primaryContainer(), this.primary(), 10, "nearer", !1)
2009
- });
2010
- }
2011
- primaryDim() {
2012
- }
2013
- onPrimary() {
2014
- return c.fromPalette({
2015
- name: "on_primary",
2016
- palette: (e) => e.primaryPalette,
2017
- tone: (e) => M(e) ? e.isDark ? 10 : 90 : e.isDark ? 20 : 100,
2018
- background: (e) => this.primary(),
2019
- contrastCurve: (e) => new y(4.5, 7, 11, 21)
2020
- });
2021
- }
2022
- primaryContainer() {
2023
- return c.fromPalette({
2024
- name: "primary_container",
2025
- palette: (e) => e.primaryPalette,
2026
- tone: (e) => re(e) ? e.sourceColorHct.tone : M(e) ? e.isDark ? 85 : 25 : e.isDark ? 30 : 90,
2027
- isBackground: !0,
2028
- background: (e) => this.highestSurface(e),
2029
- contrastCurve: (e) => new y(1, 1, 3, 4.5),
2030
- toneDeltaPair: (e) => new w(this.primaryContainer(), this.primary(), 10, "nearer", !1)
2031
- });
2032
- }
2033
- onPrimaryContainer() {
2034
- return c.fromPalette({
2035
- name: "on_primary_container",
2036
- palette: (e) => e.primaryPalette,
2037
- tone: (e) => re(e) ? c.foregroundTone(this.primaryContainer().tone(e), 4.5) : M(e) ? e.isDark ? 0 : 100 : e.isDark ? 90 : 30,
2038
- background: (e) => this.primaryContainer(),
2039
- contrastCurve: (e) => new y(3, 4.5, 7, 11)
2040
- });
2041
- }
2042
- inversePrimary() {
2043
- return c.fromPalette({
2044
- name: "inverse_primary",
2045
- palette: (e) => e.primaryPalette,
2046
- tone: (e) => e.isDark ? 40 : 80,
2047
- background: (e) => this.inverseSurface(),
2048
- contrastCurve: (e) => new y(3, 4.5, 7, 7)
2049
- });
2050
- }
2051
- /////////////////////////////////////////////////////////////////
2052
- // Secondary [Q]. //
2053
- /////////////////////////////////////////////////////////////////
2054
- secondary() {
2055
- return c.fromPalette({
2056
- name: "secondary",
2057
- palette: (e) => e.secondaryPalette,
2058
- tone: (e) => e.isDark ? 80 : 40,
2059
- isBackground: !0,
2060
- background: (e) => this.highestSurface(e),
2061
- contrastCurve: (e) => new y(3, 4.5, 7, 7),
2062
- toneDeltaPair: (e) => new w(this.secondaryContainer(), this.secondary(), 10, "nearer", !1)
2063
- });
2064
- }
2065
- secondaryDim() {
2066
- }
2067
- onSecondary() {
2068
- return c.fromPalette({
2069
- name: "on_secondary",
2070
- palette: (e) => e.secondaryPalette,
2071
- tone: (e) => M(e) ? e.isDark ? 10 : 100 : e.isDark ? 20 : 100,
2072
- background: (e) => this.secondary(),
2073
- contrastCurve: (e) => new y(4.5, 7, 11, 21)
2074
- });
2075
- }
2076
- secondaryContainer() {
2077
- return c.fromPalette({
2078
- name: "secondary_container",
2079
- palette: (e) => e.secondaryPalette,
2080
- tone: (e) => {
2081
- const r = e.isDark ? 30 : 90;
2082
- return M(e) ? e.isDark ? 30 : 85 : re(e) ? sr(e.secondaryPalette.hue, e.secondaryPalette.chroma, r, !e.isDark) : r;
2083
- },
2084
- isBackground: !0,
2085
- background: (e) => this.highestSurface(e),
2086
- contrastCurve: (e) => new y(1, 1, 3, 4.5),
2087
- toneDeltaPair: (e) => new w(this.secondaryContainer(), this.secondary(), 10, "nearer", !1)
2088
- });
2089
- }
2090
- onSecondaryContainer() {
2091
- return c.fromPalette({
2092
- name: "on_secondary_container",
2093
- palette: (e) => e.secondaryPalette,
2094
- tone: (e) => M(e) ? e.isDark ? 90 : 10 : re(e) ? c.foregroundTone(this.secondaryContainer().tone(e), 4.5) : e.isDark ? 90 : 30,
2095
- background: (e) => this.secondaryContainer(),
2096
- contrastCurve: (e) => new y(3, 4.5, 7, 11)
2097
- });
2098
- }
2099
- /////////////////////////////////////////////////////////////////
2100
- // Tertiary [T]. //
2101
- /////////////////////////////////////////////////////////////////
2102
- tertiary() {
2103
- return c.fromPalette({
2104
- name: "tertiary",
2105
- palette: (e) => e.tertiaryPalette,
2106
- tone: (e) => M(e) ? e.isDark ? 90 : 25 : e.isDark ? 80 : 40,
2107
- isBackground: !0,
2108
- background: (e) => this.highestSurface(e),
2109
- contrastCurve: (e) => new y(3, 4.5, 7, 7),
2110
- toneDeltaPair: (e) => new w(this.tertiaryContainer(), this.tertiary(), 10, "nearer", !1)
2111
- });
2112
- }
2113
- tertiaryDim() {
2114
- }
2115
- onTertiary() {
2116
- return c.fromPalette({
2117
- name: "on_tertiary",
2118
- palette: (e) => e.tertiaryPalette,
2119
- tone: (e) => M(e) ? e.isDark ? 10 : 90 : e.isDark ? 20 : 100,
2120
- background: (e) => this.tertiary(),
2121
- contrastCurve: (e) => new y(4.5, 7, 11, 21)
2122
- });
2123
- }
2124
- tertiaryContainer() {
2125
- return c.fromPalette({
2126
- name: "tertiary_container",
2127
- palette: (e) => e.tertiaryPalette,
2128
- tone: (e) => {
2129
- if (M(e))
2130
- return e.isDark ? 60 : 49;
2131
- if (!re(e))
2132
- return e.isDark ? 30 : 90;
2133
- const r = e.tertiaryPalette.getHct(e.sourceColorHct.tone);
2134
- return Se.fixIfDisliked(r).tone;
2135
- },
2136
- isBackground: !0,
2137
- background: (e) => this.highestSurface(e),
2138
- contrastCurve: (e) => new y(1, 1, 3, 4.5),
2139
- toneDeltaPair: (e) => new w(this.tertiaryContainer(), this.tertiary(), 10, "nearer", !1)
2140
- });
2141
- }
2142
- onTertiaryContainer() {
2143
- return c.fromPalette({
2144
- name: "on_tertiary_container",
2145
- palette: (e) => e.tertiaryPalette,
2146
- tone: (e) => M(e) ? e.isDark ? 0 : 100 : re(e) ? c.foregroundTone(this.tertiaryContainer().tone(e), 4.5) : e.isDark ? 90 : 30,
2147
- background: (e) => this.tertiaryContainer(),
2148
- contrastCurve: (e) => new y(3, 4.5, 7, 11)
2149
- });
2150
- }
2151
- //////////////////////////////////////////////////////////////////
2152
- // Error [E]. //
2153
- //////////////////////////////////////////////////////////////////
2154
- error() {
2155
- return c.fromPalette({
2156
- name: "error",
2157
- palette: (e) => e.errorPalette,
2158
- tone: (e) => e.isDark ? 80 : 40,
2159
- isBackground: !0,
2160
- background: (e) => this.highestSurface(e),
2161
- contrastCurve: (e) => new y(3, 4.5, 7, 7),
2162
- toneDeltaPair: (e) => new w(this.errorContainer(), this.error(), 10, "nearer", !1)
2163
- });
2164
- }
2165
- errorDim() {
2166
- }
2167
- onError() {
2168
- return c.fromPalette({
2169
- name: "on_error",
2170
- palette: (e) => e.errorPalette,
2171
- tone: (e) => e.isDark ? 20 : 100,
2172
- background: (e) => this.error(),
2173
- contrastCurve: (e) => new y(4.5, 7, 11, 21)
2174
- });
2175
- }
2176
- errorContainer() {
2177
- return c.fromPalette({
2178
- name: "error_container",
2179
- palette: (e) => e.errorPalette,
2180
- tone: (e) => e.isDark ? 30 : 90,
2181
- isBackground: !0,
2182
- background: (e) => this.highestSurface(e),
2183
- contrastCurve: (e) => new y(1, 1, 3, 4.5),
2184
- toneDeltaPair: (e) => new w(this.errorContainer(), this.error(), 10, "nearer", !1)
2185
- });
2186
- }
2187
- onErrorContainer() {
2188
- return c.fromPalette({
2189
- name: "on_error_container",
2190
- palette: (e) => e.errorPalette,
2191
- tone: (e) => M(e) ? e.isDark ? 90 : 10 : e.isDark ? 90 : 30,
2192
- background: (e) => this.errorContainer(),
2193
- contrastCurve: (e) => new y(3, 4.5, 7, 11)
2194
- });
2195
- }
2196
- //////////////////////////////////////////////////////////////////
2197
- // Primary Fixed [PF] //
2198
- //////////////////////////////////////////////////////////////////
2199
- primaryFixed() {
2200
- return c.fromPalette({
2201
- name: "primary_fixed",
2202
- palette: (e) => e.primaryPalette,
2203
- tone: (e) => M(e) ? 40 : 90,
2204
- isBackground: !0,
2205
- background: (e) => this.highestSurface(e),
2206
- contrastCurve: (e) => new y(1, 1, 3, 4.5),
2207
- toneDeltaPair: (e) => new w(this.primaryFixed(), this.primaryFixedDim(), 10, "lighter", !0)
2208
- });
2209
- }
2210
- primaryFixedDim() {
2211
- return c.fromPalette({
2212
- name: "primary_fixed_dim",
2213
- palette: (e) => e.primaryPalette,
2214
- tone: (e) => M(e) ? 30 : 80,
2215
- isBackground: !0,
2216
- background: (e) => this.highestSurface(e),
2217
- contrastCurve: (e) => new y(1, 1, 3, 4.5),
2218
- toneDeltaPair: (e) => new w(this.primaryFixed(), this.primaryFixedDim(), 10, "lighter", !0)
2219
- });
2220
- }
2221
- onPrimaryFixed() {
2222
- return c.fromPalette({
2223
- name: "on_primary_fixed",
2224
- palette: (e) => e.primaryPalette,
2225
- tone: (e) => M(e) ? 100 : 10,
2226
- background: (e) => this.primaryFixedDim(),
2227
- secondBackground: (e) => this.primaryFixed(),
2228
- contrastCurve: (e) => new y(4.5, 7, 11, 21)
2229
- });
2230
- }
2231
- onPrimaryFixedVariant() {
2232
- return c.fromPalette({
2233
- name: "on_primary_fixed_variant",
2234
- palette: (e) => e.primaryPalette,
2235
- tone: (e) => M(e) ? 90 : 30,
2236
- background: (e) => this.primaryFixedDim(),
2237
- secondBackground: (e) => this.primaryFixed(),
2238
- contrastCurve: (e) => new y(3, 4.5, 7, 11)
2239
- });
2240
- }
2241
- ///////////////////////////////////////////////////////////////////
2242
- // Secondary Fixed [QF] //
2243
- ///////////////////////////////////////////////////////////////////
2244
- secondaryFixed() {
2245
- return c.fromPalette({
2246
- name: "secondary_fixed",
2247
- palette: (e) => e.secondaryPalette,
2248
- tone: (e) => M(e) ? 80 : 90,
2249
- isBackground: !0,
2250
- background: (e) => this.highestSurface(e),
2251
- contrastCurve: (e) => new y(1, 1, 3, 4.5),
2252
- toneDeltaPair: (e) => new w(this.secondaryFixed(), this.secondaryFixedDim(), 10, "lighter", !0)
2253
- });
2254
- }
2255
- secondaryFixedDim() {
2256
- return c.fromPalette({
2257
- name: "secondary_fixed_dim",
2258
- palette: (e) => e.secondaryPalette,
2259
- tone: (e) => M(e) ? 70 : 80,
2260
- isBackground: !0,
2261
- background: (e) => this.highestSurface(e),
2262
- contrastCurve: (e) => new y(1, 1, 3, 4.5),
2263
- toneDeltaPair: (e) => new w(this.secondaryFixed(), this.secondaryFixedDim(), 10, "lighter", !0)
2264
- });
2265
- }
2266
- onSecondaryFixed() {
2267
- return c.fromPalette({
2268
- name: "on_secondary_fixed",
2269
- palette: (e) => e.secondaryPalette,
2270
- tone: (e) => 10,
2271
- background: (e) => this.secondaryFixedDim(),
2272
- secondBackground: (e) => this.secondaryFixed(),
2273
- contrastCurve: (e) => new y(4.5, 7, 11, 21)
2274
- });
2275
- }
2276
- onSecondaryFixedVariant() {
2277
- return c.fromPalette({
2278
- name: "on_secondary_fixed_variant",
2279
- palette: (e) => e.secondaryPalette,
2280
- tone: (e) => M(e) ? 25 : 30,
2281
- background: (e) => this.secondaryFixedDim(),
2282
- secondBackground: (e) => this.secondaryFixed(),
2283
- contrastCurve: (e) => new y(3, 4.5, 7, 11)
2284
- });
2285
- }
2286
- /////////////////////////////////////////////////////////////////
2287
- // Tertiary Fixed [TF] //
2288
- /////////////////////////////////////////////////////////////////
2289
- tertiaryFixed() {
2290
- return c.fromPalette({
2291
- name: "tertiary_fixed",
2292
- palette: (e) => e.tertiaryPalette,
2293
- tone: (e) => M(e) ? 40 : 90,
2294
- isBackground: !0,
2295
- background: (e) => this.highestSurface(e),
2296
- contrastCurve: (e) => new y(1, 1, 3, 4.5),
2297
- toneDeltaPair: (e) => new w(this.tertiaryFixed(), this.tertiaryFixedDim(), 10, "lighter", !0)
2298
- });
2299
- }
2300
- tertiaryFixedDim() {
2301
- return c.fromPalette({
2302
- name: "tertiary_fixed_dim",
2303
- palette: (e) => e.tertiaryPalette,
2304
- tone: (e) => M(e) ? 30 : 80,
2305
- isBackground: !0,
2306
- background: (e) => this.highestSurface(e),
2307
- contrastCurve: (e) => new y(1, 1, 3, 4.5),
2308
- toneDeltaPair: (e) => new w(this.tertiaryFixed(), this.tertiaryFixedDim(), 10, "lighter", !0)
2309
- });
2310
- }
2311
- onTertiaryFixed() {
2312
- return c.fromPalette({
2313
- name: "on_tertiary_fixed",
2314
- palette: (e) => e.tertiaryPalette,
2315
- tone: (e) => M(e) ? 100 : 10,
2316
- background: (e) => this.tertiaryFixedDim(),
2317
- secondBackground: (e) => this.tertiaryFixed(),
2318
- contrastCurve: (e) => new y(4.5, 7, 11, 21)
2319
- });
2320
- }
2321
- onTertiaryFixedVariant() {
2322
- return c.fromPalette({
2323
- name: "on_tertiary_fixed_variant",
2324
- palette: (e) => e.tertiaryPalette,
2325
- tone: (e) => M(e) ? 90 : 30,
2326
- background: (e) => this.tertiaryFixedDim(),
2327
- secondBackground: (e) => this.tertiaryFixed(),
2328
- contrastCurve: (e) => new y(3, 4.5, 7, 11)
2329
- });
2330
- }
2331
- ////////////////////////////////////////////////////////////////
2332
- // Other //
2333
- ////////////////////////////////////////////////////////////////
2334
- highestSurface(e) {
2335
- return e.isDark ? this.surfaceBright() : this.surfaceDim();
2336
- }
2337
- }
2338
- /**
2339
- * @license
2340
- * Copyright 2025 Google LLC
2341
- *
2342
- * Licensed under the Apache License, Version 2.0 (the "License");
2343
- * you may not use this file except in compliance with the License.
2344
- * You may obtain a copy of the License at
2345
- *
2346
- * http://www.apache.org/licenses/LICENSE-2.0
2347
- *
2348
- * Unless required by applicable law or agreed to in writing, software
2349
- * distributed under the License is distributed on an "AS IS" BASIS,
2350
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2351
- * See the License for the specific language governing permissions and
2352
- * limitations under the License.
2353
- */
2354
- function F(a, e = 0, r = 100, t = 1) {
2355
- let n = Me(a.hue, a.chroma * t, 100, !0);
2356
- return H(e, r, n);
2357
- }
2358
- function W(a, e = 0, r = 100) {
2359
- let t = Me(a.hue, a.chroma, 0, !1);
2360
- return H(e, r, t);
2361
- }
2362
- function Me(a, e, r, t) {
2363
- let n = r, s = T.from(a, e, n);
2364
- for (; s.chroma < e && !(r < 0 || r > 100); ) {
2365
- r += t ? -1 : 1;
2366
- const i = T.from(a, e, r);
2367
- s.chroma < i.chroma && (s = i, n = r);
2368
- }
2369
- return n;
2370
- }
2371
- function k(a) {
2372
- return a === 1.5 ? new y(1.5, 1.5, 3, 5.5) : a === 3 ? new y(3, 3, 4.5, 7) : a === 4.5 ? new y(4.5, 4.5, 7, 11) : a === 6 ? new y(6, 6, 7, 11) : a === 7 ? new y(7, 7, 11, 21) : a === 9 ? new y(9, 9, 11, 21) : a === 11 ? new y(11, 11, 21, 21) : a === 21 ? new y(21, 21, 21, 21) : new y(a, a, 7, 21);
2373
- }
2374
- class ur extends cr {
2375
- ////////////////////////////////////////////////////////////////
2376
- // Surfaces [S] //
2377
- ////////////////////////////////////////////////////////////////
2378
- surface() {
2379
- const e = c.fromPalette({
2380
- name: "surface",
2381
- palette: (r) => r.neutralPalette,
2382
- tone: (r) => (super.surface().tone(r), r.platform === "phone" ? r.isDark ? 4 : T.isYellow(r.neutralPalette.hue) ? 99 : r.variant === f.VIBRANT ? 97 : 98 : 0),
2383
- isBackground: !0
2384
- });
2385
- return b(super.surface(), "2025", e);
2386
- }
2387
- surfaceDim() {
2388
- const e = c.fromPalette({
2389
- name: "surface_dim",
2390
- palette: (r) => r.neutralPalette,
2391
- tone: (r) => r.isDark ? 4 : T.isYellow(r.neutralPalette.hue) ? 90 : r.variant === f.VIBRANT ? 85 : 87,
2392
- isBackground: !0,
2393
- chromaMultiplier: (r) => {
2394
- if (!r.isDark) {
2395
- if (r.variant === f.NEUTRAL)
2396
- return 2.5;
2397
- if (r.variant === f.TONAL_SPOT)
2398
- return 1.7;
2399
- if (r.variant === f.EXPRESSIVE)
2400
- return T.isYellow(r.neutralPalette.hue) ? 2.7 : 1.75;
2401
- if (r.variant === f.VIBRANT)
2402
- return 1.36;
2403
- }
2404
- return 1;
2405
- }
2406
- });
2407
- return b(super.surfaceDim(), "2025", e);
2408
- }
2409
- surfaceBright() {
2410
- const e = c.fromPalette({
2411
- name: "surface_bright",
2412
- palette: (r) => r.neutralPalette,
2413
- tone: (r) => r.isDark ? 18 : T.isYellow(r.neutralPalette.hue) ? 99 : r.variant === f.VIBRANT ? 97 : 98,
2414
- isBackground: !0,
2415
- chromaMultiplier: (r) => {
2416
- if (r.isDark) {
2417
- if (r.variant === f.NEUTRAL)
2418
- return 2.5;
2419
- if (r.variant === f.TONAL_SPOT)
2420
- return 1.7;
2421
- if (r.variant === f.EXPRESSIVE)
2422
- return T.isYellow(r.neutralPalette.hue) ? 2.7 : 1.75;
2423
- if (r.variant === f.VIBRANT)
2424
- return 1.36;
2425
- }
2426
- return 1;
2427
- }
2428
- });
2429
- return b(super.surfaceBright(), "2025", e);
2430
- }
2431
- surfaceContainerLowest() {
2432
- const e = c.fromPalette({
2433
- name: "surface_container_lowest",
2434
- palette: (r) => r.neutralPalette,
2435
- tone: (r) => r.isDark ? 0 : 100,
2436
- isBackground: !0
2437
- });
2438
- return b(super.surfaceContainerLowest(), "2025", e);
2439
- }
2440
- surfaceContainerLow() {
2441
- const e = c.fromPalette({
2442
- name: "surface_container_low",
2443
- palette: (r) => r.neutralPalette,
2444
- tone: (r) => r.platform === "phone" ? r.isDark ? 6 : T.isYellow(r.neutralPalette.hue) ? 98 : r.variant === f.VIBRANT ? 95 : 96 : 15,
2445
- isBackground: !0,
2446
- chromaMultiplier: (r) => {
2447
- if (r.platform === "phone") {
2448
- if (r.variant === f.NEUTRAL)
2449
- return 1.3;
2450
- if (r.variant === f.TONAL_SPOT)
2451
- return 1.25;
2452
- if (r.variant === f.EXPRESSIVE)
2453
- return T.isYellow(r.neutralPalette.hue) ? 1.3 : 1.15;
2454
- if (r.variant === f.VIBRANT)
2455
- return 1.08;
2456
- }
2457
- return 1;
2458
- }
2459
- });
2460
- return b(super.surfaceContainerLow(), "2025", e);
2461
- }
2462
- surfaceContainer() {
2463
- const e = c.fromPalette({
2464
- name: "surface_container",
2465
- palette: (r) => r.neutralPalette,
2466
- tone: (r) => r.platform === "phone" ? r.isDark ? 9 : T.isYellow(r.neutralPalette.hue) ? 96 : r.variant === f.VIBRANT ? 92 : 94 : 20,
2467
- isBackground: !0,
2468
- chromaMultiplier: (r) => {
2469
- if (r.platform === "phone") {
2470
- if (r.variant === f.NEUTRAL)
2471
- return 1.6;
2472
- if (r.variant === f.TONAL_SPOT)
2473
- return 1.4;
2474
- if (r.variant === f.EXPRESSIVE)
2475
- return T.isYellow(r.neutralPalette.hue) ? 1.6 : 1.3;
2476
- if (r.variant === f.VIBRANT)
2477
- return 1.15;
2478
- }
2479
- return 1;
2480
- }
2481
- });
2482
- return b(super.surfaceContainer(), "2025", e);
2483
- }
2484
- surfaceContainerHigh() {
2485
- const e = c.fromPalette({
2486
- name: "surface_container_high",
2487
- palette: (r) => r.neutralPalette,
2488
- tone: (r) => r.platform === "phone" ? r.isDark ? 12 : T.isYellow(r.neutralPalette.hue) ? 94 : r.variant === f.VIBRANT ? 90 : 92 : 25,
2489
- isBackground: !0,
2490
- chromaMultiplier: (r) => {
2491
- if (r.platform === "phone") {
2492
- if (r.variant === f.NEUTRAL)
2493
- return 1.9;
2494
- if (r.variant === f.TONAL_SPOT)
2495
- return 1.5;
2496
- if (r.variant === f.EXPRESSIVE)
2497
- return T.isYellow(r.neutralPalette.hue) ? 1.95 : 1.45;
2498
- if (r.variant === f.VIBRANT)
2499
- return 1.22;
2500
- }
2501
- return 1;
2502
- }
2503
- });
2504
- return b(super.surfaceContainerHigh(), "2025", e);
2505
- }
2506
- surfaceContainerHighest() {
2507
- const e = c.fromPalette({
2508
- name: "surface_container_highest",
2509
- palette: (r) => r.neutralPalette,
2510
- tone: (r) => r.isDark ? 15 : T.isYellow(r.neutralPalette.hue) ? 92 : r.variant === f.VIBRANT ? 88 : 90,
2511
- isBackground: !0,
2512
- chromaMultiplier: (r) => r.variant === f.NEUTRAL ? 2.2 : r.variant === f.TONAL_SPOT ? 1.7 : r.variant === f.EXPRESSIVE ? T.isYellow(r.neutralPalette.hue) ? 2.3 : 1.6 : r.variant === f.VIBRANT ? 1.29 : 1
2513
- });
2514
- return b(super.surfaceContainerHighest(), "2025", e);
2515
- }
2516
- onSurface() {
2517
- const e = c.fromPalette({
2518
- name: "on_surface",
2519
- palette: (r) => r.neutralPalette,
2520
- tone: (r) => r.variant === f.VIBRANT ? F(r.neutralPalette, 0, 100, 1.1) : c.getInitialToneFromBackground((t) => t.platform === "phone" ? this.highestSurface(t) : this.surfaceContainerHigh())(r),
2521
- chromaMultiplier: (r) => {
2522
- if (r.platform === "phone") {
2523
- if (r.variant === f.NEUTRAL)
2524
- return 2.2;
2525
- if (r.variant === f.TONAL_SPOT)
2526
- return 1.7;
2527
- if (r.variant === f.EXPRESSIVE)
2528
- return T.isYellow(r.neutralPalette.hue) ? r.isDark ? 3 : 2.3 : 1.6;
2529
- }
2530
- return 1;
2531
- },
2532
- background: (r) => r.platform === "phone" ? this.highestSurface(r) : this.surfaceContainerHigh(),
2533
- contrastCurve: (r) => r.isDark && r.platform === "phone" ? k(11) : k(9)
2534
- });
2535
- return b(super.onSurface(), "2025", e);
2536
- }
2537
- onSurfaceVariant() {
2538
- const e = c.fromPalette({
2539
- name: "on_surface_variant",
2540
- palette: (r) => r.neutralPalette,
2541
- chromaMultiplier: (r) => {
2542
- if (r.platform === "phone") {
2543
- if (r.variant === f.NEUTRAL)
2544
- return 2.2;
2545
- if (r.variant === f.TONAL_SPOT)
2546
- return 1.7;
2547
- if (r.variant === f.EXPRESSIVE)
2548
- return T.isYellow(r.neutralPalette.hue) ? r.isDark ? 3 : 2.3 : 1.6;
2549
- }
2550
- return 1;
2551
- },
2552
- background: (r) => r.platform === "phone" ? this.highestSurface(r) : this.surfaceContainerHigh(),
2553
- contrastCurve: (r) => r.platform === "phone" ? r.isDark ? k(6) : k(4.5) : k(7)
2554
- });
2555
- return b(super.onSurfaceVariant(), "2025", e);
2556
- }
2557
- outline() {
2558
- const e = c.fromPalette({
2559
- name: "outline",
2560
- palette: (r) => r.neutralPalette,
2561
- chromaMultiplier: (r) => {
2562
- if (r.platform === "phone") {
2563
- if (r.variant === f.NEUTRAL)
2564
- return 2.2;
2565
- if (r.variant === f.TONAL_SPOT)
2566
- return 1.7;
2567
- if (r.variant === f.EXPRESSIVE)
2568
- return T.isYellow(r.neutralPalette.hue) ? r.isDark ? 3 : 2.3 : 1.6;
2569
- }
2570
- return 1;
2571
- },
2572
- background: (r) => r.platform === "phone" ? this.highestSurface(r) : this.surfaceContainerHigh(),
2573
- contrastCurve: (r) => r.platform === "phone" ? k(3) : k(4.5)
2574
- });
2575
- return b(super.outline(), "2025", e);
2576
- }
2577
- outlineVariant() {
2578
- const e = c.fromPalette({
2579
- name: "outline_variant",
2580
- palette: (r) => r.neutralPalette,
2581
- chromaMultiplier: (r) => {
2582
- if (r.platform === "phone") {
2583
- if (r.variant === f.NEUTRAL)
2584
- return 2.2;
2585
- if (r.variant === f.TONAL_SPOT)
2586
- return 1.7;
2587
- if (r.variant === f.EXPRESSIVE)
2588
- return T.isYellow(r.neutralPalette.hue) ? r.isDark ? 3 : 2.3 : 1.6;
2589
- }
2590
- return 1;
2591
- },
2592
- background: (r) => r.platform === "phone" ? this.highestSurface(r) : this.surfaceContainerHigh(),
2593
- contrastCurve: (r) => r.platform === "phone" ? k(1.5) : k(3)
2594
- });
2595
- return b(super.outlineVariant(), "2025", e);
2596
- }
2597
- inverseSurface() {
2598
- const e = c.fromPalette({
2599
- name: "inverse_surface",
2600
- palette: (r) => r.neutralPalette,
2601
- tone: (r) => r.isDark ? 98 : 4,
2602
- isBackground: !0
2603
- });
2604
- return b(super.inverseSurface(), "2025", e);
2605
- }
2606
- inverseOnSurface() {
2607
- const e = c.fromPalette({
2608
- name: "inverse_on_surface",
2609
- palette: (r) => r.neutralPalette,
2610
- background: (r) => this.inverseSurface(),
2611
- contrastCurve: (r) => k(7)
2612
- });
2613
- return b(super.inverseOnSurface(), "2025", e);
2614
- }
2615
- ////////////////////////////////////////////////////////////////
2616
- // Primaries [P] //
2617
- ////////////////////////////////////////////////////////////////
2618
- primary() {
2619
- const e = c.fromPalette({
2620
- name: "primary",
2621
- palette: (r) => r.primaryPalette,
2622
- tone: (r) => r.variant === f.NEUTRAL ? r.platform === "phone" ? r.isDark ? 80 : 40 : 90 : r.variant === f.TONAL_SPOT ? r.platform === "phone" ? r.isDark ? 80 : F(r.primaryPalette) : F(r.primaryPalette, 0, 90) : r.variant === f.EXPRESSIVE ? r.platform === "phone" ? F(r.primaryPalette, 0, T.isYellow(r.primaryPalette.hue) ? 25 : T.isCyan(r.primaryPalette.hue) ? 88 : 98) : F(r.primaryPalette) : r.platform === "phone" ? F(r.primaryPalette, 0, T.isCyan(r.primaryPalette.hue) ? 88 : 98) : F(r.primaryPalette),
2623
- isBackground: !0,
2624
- background: (r) => r.platform === "phone" ? this.highestSurface(r) : this.surfaceContainerHigh(),
2625
- contrastCurve: (r) => r.platform === "phone" ? k(4.5) : k(7),
2626
- toneDeltaPair: (r) => r.platform === "phone" ? new w(this.primaryContainer(), this.primary(), 5, "relative_lighter", !0, "farther") : void 0
2627
- });
2628
- return b(super.primary(), "2025", e);
2629
- }
2630
- primaryDim() {
2631
- return c.fromPalette({
2632
- name: "primary_dim",
2633
- palette: (e) => e.primaryPalette,
2634
- tone: (e) => e.variant === f.NEUTRAL ? 85 : e.variant === f.TONAL_SPOT ? F(e.primaryPalette, 0, 90) : F(e.primaryPalette),
2635
- isBackground: !0,
2636
- background: (e) => this.surfaceContainerHigh(),
2637
- contrastCurve: (e) => k(4.5),
2638
- toneDeltaPair: (e) => new w(this.primaryDim(), this.primary(), 5, "darker", !0, "farther")
2639
- });
2640
- }
2641
- onPrimary() {
2642
- const e = c.fromPalette({
2643
- name: "on_primary",
2644
- palette: (r) => r.primaryPalette,
2645
- background: (r) => r.platform === "phone" ? this.primary() : this.primaryDim(),
2646
- contrastCurve: (r) => r.platform === "phone" ? k(6) : k(7)
2647
- });
2648
- return b(super.onPrimary(), "2025", e);
2649
- }
2650
- primaryContainer() {
2651
- const e = c.fromPalette({
2652
- name: "primary_container",
2653
- palette: (r) => r.primaryPalette,
2654
- tone: (r) => r.platform === "watch" ? 30 : r.variant === f.NEUTRAL ? r.isDark ? 30 : 90 : r.variant === f.TONAL_SPOT ? r.isDark ? W(r.primaryPalette, 35, 93) : F(r.primaryPalette, 0, 90) : r.variant === f.EXPRESSIVE ? r.isDark ? F(r.primaryPalette, 30, 93) : F(r.primaryPalette, 78, T.isCyan(r.primaryPalette.hue) ? 88 : 90) : r.isDark ? W(r.primaryPalette, 66, 93) : F(r.primaryPalette, 66, T.isCyan(r.primaryPalette.hue) ? 88 : 93),
2655
- isBackground: !0,
2656
- background: (r) => r.platform === "phone" ? this.highestSurface(r) : void 0,
2657
- toneDeltaPair: (r) => r.platform === "phone" ? void 0 : new w(this.primaryContainer(), this.primaryDim(), 10, "darker", !0, "farther"),
2658
- contrastCurve: (r) => r.platform === "phone" && r.contrastLevel > 0 ? k(1.5) : void 0
2659
- });
2660
- return b(super.primaryContainer(), "2025", e);
2661
- }
2662
- onPrimaryContainer() {
2663
- const e = c.fromPalette({
2664
- name: "on_primary_container",
2665
- palette: (r) => r.primaryPalette,
2666
- background: (r) => this.primaryContainer(),
2667
- contrastCurve: (r) => r.platform === "phone" ? k(6) : k(7)
2668
- });
2669
- return b(super.onPrimaryContainer(), "2025", e);
2670
- }
2671
- primaryFixed() {
2672
- const e = c.fromPalette({
2673
- name: "primary_fixed",
2674
- palette: (r) => r.primaryPalette,
2675
- tone: (r) => {
2676
- let t = Object.assign({}, r, { isDark: !1, contrastLevel: 0 });
2677
- return this.primaryContainer().getTone(t);
2678
- },
2679
- isBackground: !0,
2680
- background: (r) => r.platform === "phone" ? this.highestSurface(r) : void 0,
2681
- contrastCurve: (r) => r.platform === "phone" && r.contrastLevel > 0 ? k(1.5) : void 0
2682
- });
2683
- return b(super.primaryFixed(), "2025", e);
2684
- }
2685
- primaryFixedDim() {
2686
- const e = c.fromPalette({
2687
- name: "primary_fixed_dim",
2688
- palette: (r) => r.primaryPalette,
2689
- tone: (r) => this.primaryFixed().getTone(r),
2690
- isBackground: !0,
2691
- toneDeltaPair: (r) => new w(this.primaryFixedDim(), this.primaryFixed(), 5, "darker", !0, "exact")
2692
- });
2693
- return b(super.primaryFixedDim(), "2025", e);
2694
- }
2695
- onPrimaryFixed() {
2696
- const e = c.fromPalette({
2697
- name: "on_primary_fixed",
2698
- palette: (r) => r.primaryPalette,
2699
- background: (r) => this.primaryFixedDim(),
2700
- contrastCurve: (r) => k(7)
2701
- });
2702
- return b(super.onPrimaryFixed(), "2025", e);
2703
- }
2704
- onPrimaryFixedVariant() {
2705
- const e = c.fromPalette({
2706
- name: "on_primary_fixed_variant",
2707
- palette: (r) => r.primaryPalette,
2708
- background: (r) => this.primaryFixedDim(),
2709
- contrastCurve: (r) => k(4.5)
2710
- });
2711
- return b(super.onPrimaryFixedVariant(), "2025", e);
2712
- }
2713
- inversePrimary() {
2714
- const e = c.fromPalette({
2715
- name: "inverse_primary",
2716
- palette: (r) => r.primaryPalette,
2717
- tone: (r) => F(r.primaryPalette),
2718
- background: (r) => this.inverseSurface(),
2719
- contrastCurve: (r) => r.platform === "phone" ? k(6) : k(7)
2720
- });
2721
- return b(super.inversePrimary(), "2025", e);
2722
- }
2723
- ////////////////////////////////////////////////////////////////
2724
- // Secondaries [Q] //
2725
- ////////////////////////////////////////////////////////////////
2726
- secondary() {
2727
- const e = c.fromPalette({
2728
- name: "secondary",
2729
- palette: (r) => r.secondaryPalette,
2730
- tone: (r) => r.platform === "watch" ? r.variant === f.NEUTRAL ? 90 : F(r.secondaryPalette, 0, 90) : r.variant === f.NEUTRAL ? r.isDark ? W(r.secondaryPalette, 0, 98) : F(r.secondaryPalette) : r.variant === f.VIBRANT ? F(r.secondaryPalette, 0, r.isDark ? 90 : 98) : r.isDark ? 80 : F(r.secondaryPalette),
2731
- isBackground: !0,
2732
- background: (r) => r.platform === "phone" ? this.highestSurface(r) : this.surfaceContainerHigh(),
2733
- contrastCurve: (r) => r.platform === "phone" ? k(4.5) : k(7),
2734
- toneDeltaPair: (r) => r.platform === "phone" ? new w(this.secondaryContainer(), this.secondary(), 5, "relative_lighter", !0, "farther") : void 0
2735
- });
2736
- return b(super.secondary(), "2025", e);
2737
- }
2738
- secondaryDim() {
2739
- return c.fromPalette({
2740
- name: "secondary_dim",
2741
- palette: (e) => e.secondaryPalette,
2742
- tone: (e) => e.variant === f.NEUTRAL ? 85 : F(e.secondaryPalette, 0, 90),
2743
- isBackground: !0,
2744
- background: (e) => this.surfaceContainerHigh(),
2745
- contrastCurve: (e) => k(4.5),
2746
- toneDeltaPair: (e) => new w(this.secondaryDim(), this.secondary(), 5, "darker", !0, "farther")
2747
- });
2748
- }
2749
- onSecondary() {
2750
- const e = c.fromPalette({
2751
- name: "on_secondary",
2752
- palette: (r) => r.secondaryPalette,
2753
- background: (r) => r.platform === "phone" ? this.secondary() : this.secondaryDim(),
2754
- contrastCurve: (r) => r.platform === "phone" ? k(6) : k(7)
2755
- });
2756
- return b(super.onSecondary(), "2025", e);
2757
- }
2758
- secondaryContainer() {
2759
- const e = c.fromPalette({
2760
- name: "secondary_container",
2761
- palette: (r) => r.secondaryPalette,
2762
- tone: (r) => r.platform === "watch" ? 30 : r.variant === f.VIBRANT ? r.isDark ? W(r.secondaryPalette, 30, 40) : F(r.secondaryPalette, 84, 90) : r.variant === f.EXPRESSIVE ? r.isDark ? 15 : F(r.secondaryPalette, 90, 95) : r.isDark ? 25 : 90,
2763
- isBackground: !0,
2764
- background: (r) => r.platform === "phone" ? this.highestSurface(r) : void 0,
2765
- toneDeltaPair: (r) => r.platform === "watch" ? new w(this.secondaryContainer(), this.secondaryDim(), 10, "darker", !0, "farther") : void 0,
2766
- contrastCurve: (r) => r.platform === "phone" && r.contrastLevel > 0 ? k(1.5) : void 0
2767
- });
2768
- return b(super.secondaryContainer(), "2025", e);
2769
- }
2770
- onSecondaryContainer() {
2771
- const e = c.fromPalette({
2772
- name: "on_secondary_container",
2773
- palette: (r) => r.secondaryPalette,
2774
- background: (r) => this.secondaryContainer(),
2775
- contrastCurve: (r) => r.platform === "phone" ? k(6) : k(7)
2776
- });
2777
- return b(super.onSecondaryContainer(), "2025", e);
2778
- }
2779
- secondaryFixed() {
2780
- const e = c.fromPalette({
2781
- name: "secondary_fixed",
2782
- palette: (r) => r.secondaryPalette,
2783
- tone: (r) => {
2784
- let t = Object.assign({}, r, { isDark: !1, contrastLevel: 0 });
2785
- return this.secondaryContainer().getTone(t);
2786
- },
2787
- isBackground: !0,
2788
- background: (r) => r.platform === "phone" ? this.highestSurface(r) : void 0,
2789
- contrastCurve: (r) => r.platform === "phone" && r.contrastLevel > 0 ? k(1.5) : void 0
2790
- });
2791
- return b(super.secondaryFixed(), "2025", e);
2792
- }
2793
- secondaryFixedDim() {
2794
- const e = c.fromPalette({
2795
- name: "secondary_fixed_dim",
2796
- palette: (r) => r.secondaryPalette,
2797
- tone: (r) => this.secondaryFixed().getTone(r),
2798
- isBackground: !0,
2799
- toneDeltaPair: (r) => new w(this.secondaryFixedDim(), this.secondaryFixed(), 5, "darker", !0, "exact")
2800
- });
2801
- return b(super.secondaryFixedDim(), "2025", e);
2802
- }
2803
- onSecondaryFixed() {
2804
- const e = c.fromPalette({
2805
- name: "on_secondary_fixed",
2806
- palette: (r) => r.secondaryPalette,
2807
- background: (r) => this.secondaryFixedDim(),
2808
- contrastCurve: (r) => k(7)
2809
- });
2810
- return b(super.onSecondaryFixed(), "2025", e);
2811
- }
2812
- onSecondaryFixedVariant() {
2813
- const e = c.fromPalette({
2814
- name: "on_secondary_fixed_variant",
2815
- palette: (r) => r.secondaryPalette,
2816
- background: (r) => this.secondaryFixedDim(),
2817
- contrastCurve: (r) => k(4.5)
2818
- });
2819
- return b(super.onSecondaryFixedVariant(), "2025", e);
2820
- }
2821
- ////////////////////////////////////////////////////////////////
2822
- // Tertiaries [T] //
2823
- ////////////////////////////////////////////////////////////////
2824
- tertiary() {
2825
- const e = c.fromPalette({
2826
- name: "tertiary",
2827
- palette: (r) => r.tertiaryPalette,
2828
- tone: (r) => r.platform === "watch" ? r.variant === f.TONAL_SPOT ? F(r.tertiaryPalette, 0, 90) : F(r.tertiaryPalette) : r.variant === f.EXPRESSIVE || r.variant === f.VIBRANT ? F(r.tertiaryPalette, 0, T.isCyan(r.tertiaryPalette.hue) ? 88 : r.isDark ? 98 : 100) : r.isDark ? F(r.tertiaryPalette, 0, 98) : F(r.tertiaryPalette),
2829
- isBackground: !0,
2830
- background: (r) => r.platform === "phone" ? this.highestSurface(r) : this.surfaceContainerHigh(),
2831
- contrastCurve: (r) => r.platform === "phone" ? k(4.5) : k(7),
2832
- toneDeltaPair: (r) => r.platform === "phone" ? new w(this.tertiaryContainer(), this.tertiary(), 5, "relative_lighter", !0, "farther") : void 0
2833
- });
2834
- return b(super.tertiary(), "2025", e);
2835
- }
2836
- tertiaryDim() {
2837
- return c.fromPalette({
2838
- name: "tertiary_dim",
2839
- palette: (e) => e.tertiaryPalette,
2840
- tone: (e) => e.variant === f.TONAL_SPOT ? F(e.tertiaryPalette, 0, 90) : F(e.tertiaryPalette),
2841
- isBackground: !0,
2842
- background: (e) => this.surfaceContainerHigh(),
2843
- contrastCurve: (e) => k(4.5),
2844
- toneDeltaPair: (e) => new w(this.tertiaryDim(), this.tertiary(), 5, "darker", !0, "farther")
2845
- });
2846
- }
2847
- onTertiary() {
2848
- const e = c.fromPalette({
2849
- name: "on_tertiary",
2850
- palette: (r) => r.tertiaryPalette,
2851
- background: (r) => r.platform === "phone" ? this.tertiary() : this.tertiaryDim(),
2852
- contrastCurve: (r) => r.platform === "phone" ? k(6) : k(7)
2853
- });
2854
- return b(super.onTertiary(), "2025", e);
2855
- }
2856
- tertiaryContainer() {
2857
- const e = c.fromPalette({
2858
- name: "tertiary_container",
2859
- palette: (r) => r.tertiaryPalette,
2860
- tone: (r) => r.platform === "watch" ? r.variant === f.TONAL_SPOT ? F(r.tertiaryPalette, 0, 90) : F(r.tertiaryPalette) : r.variant === f.NEUTRAL ? r.isDark ? F(r.tertiaryPalette, 0, 93) : F(r.tertiaryPalette, 0, 96) : r.variant === f.TONAL_SPOT ? F(r.tertiaryPalette, 0, r.isDark ? 93 : 100) : r.variant === f.EXPRESSIVE ? F(r.tertiaryPalette, 75, T.isCyan(r.tertiaryPalette.hue) ? 88 : r.isDark ? 93 : 100) : r.isDark ? F(r.tertiaryPalette, 0, 93) : F(r.tertiaryPalette, 72, 100),
2861
- isBackground: !0,
2862
- background: (r) => r.platform === "phone" ? this.highestSurface(r) : void 0,
2863
- toneDeltaPair: (r) => r.platform === "watch" ? new w(this.tertiaryContainer(), this.tertiaryDim(), 10, "darker", !0, "farther") : void 0,
2864
- contrastCurve: (r) => r.platform === "phone" && r.contrastLevel > 0 ? k(1.5) : void 0
2865
- });
2866
- return b(super.tertiaryContainer(), "2025", e);
2867
- }
2868
- onTertiaryContainer() {
2869
- const e = c.fromPalette({
2870
- name: "on_tertiary_container",
2871
- palette: (r) => r.tertiaryPalette,
2872
- background: (r) => this.tertiaryContainer(),
2873
- contrastCurve: (r) => r.platform === "phone" ? k(6) : k(7)
2874
- });
2875
- return b(super.onTertiaryContainer(), "2025", e);
2876
- }
2877
- tertiaryFixed() {
2878
- const e = c.fromPalette({
2879
- name: "tertiary_fixed",
2880
- palette: (r) => r.tertiaryPalette,
2881
- tone: (r) => {
2882
- let t = Object.assign({}, r, { isDark: !1, contrastLevel: 0 });
2883
- return this.tertiaryContainer().getTone(t);
2884
- },
2885
- isBackground: !0,
2886
- background: (r) => r.platform === "phone" ? this.highestSurface(r) : void 0,
2887
- contrastCurve: (r) => r.platform === "phone" && r.contrastLevel > 0 ? k(1.5) : void 0
2888
- });
2889
- return b(super.tertiaryFixed(), "2025", e);
2890
- }
2891
- tertiaryFixedDim() {
2892
- const e = c.fromPalette({
2893
- name: "tertiary_fixed_dim",
2894
- palette: (r) => r.tertiaryPalette,
2895
- tone: (r) => this.tertiaryFixed().getTone(r),
2896
- isBackground: !0,
2897
- toneDeltaPair: (r) => new w(this.tertiaryFixedDim(), this.tertiaryFixed(), 5, "darker", !0, "exact")
2898
- });
2899
- return b(super.tertiaryFixedDim(), "2025", e);
2900
- }
2901
- onTertiaryFixed() {
2902
- const e = c.fromPalette({
2903
- name: "on_tertiary_fixed",
2904
- palette: (r) => r.tertiaryPalette,
2905
- background: (r) => this.tertiaryFixedDim(),
2906
- contrastCurve: (r) => k(7)
2907
- });
2908
- return b(super.onTertiaryFixed(), "2025", e);
2909
- }
2910
- onTertiaryFixedVariant() {
2911
- const e = c.fromPalette({
2912
- name: "on_tertiary_fixed_variant",
2913
- palette: (r) => r.tertiaryPalette,
2914
- background: (r) => this.tertiaryFixedDim(),
2915
- contrastCurve: (r) => k(4.5)
2916
- });
2917
- return b(super.onTertiaryFixedVariant(), "2025", e);
2918
- }
2919
- ////////////////////////////////////////////////////////////////
2920
- // Errors [E] //
2921
- ////////////////////////////////////////////////////////////////
2922
- error() {
2923
- const e = c.fromPalette({
2924
- name: "error",
2925
- palette: (r) => r.errorPalette,
2926
- tone: (r) => r.platform === "phone" ? r.isDark ? W(r.errorPalette, 0, 98) : F(r.errorPalette) : W(r.errorPalette),
2927
- isBackground: !0,
2928
- background: (r) => r.platform === "phone" ? this.highestSurface(r) : this.surfaceContainerHigh(),
2929
- contrastCurve: (r) => r.platform === "phone" ? k(4.5) : k(7),
2930
- toneDeltaPair: (r) => r.platform === "phone" ? new w(this.errorContainer(), this.error(), 5, "relative_lighter", !0, "farther") : void 0
2931
- });
2932
- return b(super.error(), "2025", e);
2933
- }
2934
- errorDim() {
2935
- return c.fromPalette({
2936
- name: "error_dim",
2937
- palette: (e) => e.errorPalette,
2938
- tone: (e) => W(e.errorPalette),
2939
- isBackground: !0,
2940
- background: (e) => this.surfaceContainerHigh(),
2941
- contrastCurve: (e) => k(4.5),
2942
- toneDeltaPair: (e) => new w(this.errorDim(), this.error(), 5, "darker", !0, "farther")
2943
- });
2944
- }
2945
- onError() {
2946
- const e = c.fromPalette({
2947
- name: "on_error",
2948
- palette: (r) => r.errorPalette,
2949
- background: (r) => r.platform === "phone" ? this.error() : this.errorDim(),
2950
- contrastCurve: (r) => r.platform === "phone" ? k(6) : k(7)
2951
- });
2952
- return b(super.onError(), "2025", e);
2953
- }
2954
- errorContainer() {
2955
- const e = c.fromPalette({
2956
- name: "error_container",
2957
- palette: (r) => r.errorPalette,
2958
- tone: (r) => r.platform === "watch" ? 30 : r.isDark ? W(r.errorPalette, 30, 93) : F(r.errorPalette, 0, 90),
2959
- isBackground: !0,
2960
- background: (r) => r.platform === "phone" ? this.highestSurface(r) : void 0,
2961
- toneDeltaPair: (r) => r.platform === "watch" ? new w(this.errorContainer(), this.errorDim(), 10, "darker", !0, "farther") : void 0,
2962
- contrastCurve: (r) => r.platform === "phone" && r.contrastLevel > 0 ? k(1.5) : void 0
2963
- });
2964
- return b(super.errorContainer(), "2025", e);
2965
- }
2966
- onErrorContainer() {
2967
- const e = c.fromPalette({
2968
- name: "on_error_container",
2969
- palette: (r) => r.errorPalette,
2970
- background: (r) => this.errorContainer(),
2971
- contrastCurve: (r) => r.platform === "phone" ? k(4.5) : k(7)
2972
- });
2973
- return b(super.onErrorContainer(), "2025", e);
2974
- }
2975
- /////////////////////////////////////////////////////////////////
2976
- // Remapped Colors //
2977
- /////////////////////////////////////////////////////////////////
2978
- surfaceVariant() {
2979
- const e = Object.assign(this.surfaceContainerHighest().clone(), { name: "surface_variant" });
2980
- return b(super.surfaceVariant(), "2025", e);
2981
- }
2982
- surfaceTint() {
2983
- const e = Object.assign(this.primary().clone(), { name: "surface_tint" });
2984
- return b(super.surfaceTint(), "2025", e);
2985
- }
2986
- background() {
2987
- const e = Object.assign(this.surface().clone(), { name: "background" });
2988
- return b(super.background(), "2025", e);
2989
- }
2990
- onBackground() {
2991
- const e = Object.assign(this.onSurface().clone(), {
2992
- name: "on_background",
2993
- tone: (r) => r.platform === "watch" ? 100 : this.onSurface().getTone(r)
2994
- });
2995
- return b(super.onBackground(), "2025", e);
2996
- }
2997
- }
2998
- /**
2999
- * @license
3000
- * Copyright 2022 Google LLC
3001
- *
3002
- * Licensed under the Apache License, Version 2.0 (the "License");
3003
- * you may not use this file except in compliance with the License.
3004
- * You may obtain a copy of the License at
3005
- *
3006
- * http://www.apache.org/licenses/LICENSE-2.0
3007
- *
3008
- * Unless required by applicable law or agreed to in writing, software
3009
- * distributed under the License is distributed on an "AS IS" BASIS,
3010
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3011
- * See the License for the specific language governing permissions and
3012
- * limitations under the License.
3013
- */
3014
- class o {
3015
- constructor() {
3016
- this.allColors = [
3017
- this.background(),
3018
- this.onBackground(),
3019
- this.surface(),
3020
- this.surfaceDim(),
3021
- this.surfaceBright(),
3022
- this.surfaceContainerLowest(),
3023
- this.surfaceContainerLow(),
3024
- this.surfaceContainer(),
3025
- this.surfaceContainerHigh(),
3026
- this.surfaceContainerHighest(),
3027
- this.onSurface(),
3028
- this.onSurfaceVariant(),
3029
- this.outline(),
3030
- this.outlineVariant(),
3031
- this.inverseSurface(),
3032
- this.inverseOnSurface(),
3033
- this.primary(),
3034
- this.primaryDim(),
3035
- this.onPrimary(),
3036
- this.primaryContainer(),
3037
- this.onPrimaryContainer(),
3038
- this.primaryFixed(),
3039
- this.primaryFixedDim(),
3040
- this.onPrimaryFixed(),
3041
- this.onPrimaryFixedVariant(),
3042
- this.inversePrimary(),
3043
- this.secondary(),
3044
- this.secondaryDim(),
3045
- this.onSecondary(),
3046
- this.secondaryContainer(),
3047
- this.onSecondaryContainer(),
3048
- this.secondaryFixed(),
3049
- this.secondaryFixedDim(),
3050
- this.onSecondaryFixed(),
3051
- this.onSecondaryFixedVariant(),
3052
- this.tertiary(),
3053
- this.tertiaryDim(),
3054
- this.onTertiary(),
3055
- this.tertiaryContainer(),
3056
- this.onTertiaryContainer(),
3057
- this.tertiaryFixed(),
3058
- this.tertiaryFixedDim(),
3059
- this.onTertiaryFixed(),
3060
- this.onTertiaryFixedVariant(),
3061
- this.error(),
3062
- this.errorDim(),
3063
- this.onError(),
3064
- this.errorContainer(),
3065
- this.onErrorContainer()
3066
- ].filter((e) => e !== void 0);
3067
- }
3068
- highestSurface(e) {
3069
- return o.colorSpec.highestSurface(e);
3070
- }
3071
- ////////////////////////////////////////////////////////////////
3072
- // Main Palettes //
3073
- ////////////////////////////////////////////////////////////////
3074
- primaryPaletteKeyColor() {
3075
- return o.colorSpec.primaryPaletteKeyColor();
3076
- }
3077
- secondaryPaletteKeyColor() {
3078
- return o.colorSpec.secondaryPaletteKeyColor();
3079
- }
3080
- tertiaryPaletteKeyColor() {
3081
- return o.colorSpec.tertiaryPaletteKeyColor();
3082
- }
3083
- neutralPaletteKeyColor() {
3084
- return o.colorSpec.neutralPaletteKeyColor();
3085
- }
3086
- neutralVariantPaletteKeyColor() {
3087
- return o.colorSpec.neutralVariantPaletteKeyColor();
3088
- }
3089
- errorPaletteKeyColor() {
3090
- return o.colorSpec.errorPaletteKeyColor();
3091
- }
3092
- ////////////////////////////////////////////////////////////////
3093
- // Surfaces [S] //
3094
- ////////////////////////////////////////////////////////////////
3095
- background() {
3096
- return o.colorSpec.background();
3097
- }
3098
- onBackground() {
3099
- return o.colorSpec.onBackground();
3100
- }
3101
- surface() {
3102
- return o.colorSpec.surface();
3103
- }
3104
- surfaceDim() {
3105
- return o.colorSpec.surfaceDim();
3106
- }
3107
- surfaceBright() {
3108
- return o.colorSpec.surfaceBright();
3109
- }
3110
- surfaceContainerLowest() {
3111
- return o.colorSpec.surfaceContainerLowest();
3112
- }
3113
- surfaceContainerLow() {
3114
- return o.colorSpec.surfaceContainerLow();
3115
- }
3116
- surfaceContainer() {
3117
- return o.colorSpec.surfaceContainer();
3118
- }
3119
- surfaceContainerHigh() {
3120
- return o.colorSpec.surfaceContainerHigh();
3121
- }
3122
- surfaceContainerHighest() {
3123
- return o.colorSpec.surfaceContainerHighest();
3124
- }
3125
- onSurface() {
3126
- return o.colorSpec.onSurface();
3127
- }
3128
- surfaceVariant() {
3129
- return o.colorSpec.surfaceVariant();
3130
- }
3131
- onSurfaceVariant() {
3132
- return o.colorSpec.onSurfaceVariant();
3133
- }
3134
- outline() {
3135
- return o.colorSpec.outline();
3136
- }
3137
- outlineVariant() {
3138
- return o.colorSpec.outlineVariant();
3139
- }
3140
- inverseSurface() {
3141
- return o.colorSpec.inverseSurface();
3142
- }
3143
- inverseOnSurface() {
3144
- return o.colorSpec.inverseOnSurface();
3145
- }
3146
- shadow() {
3147
- return o.colorSpec.shadow();
3148
- }
3149
- scrim() {
3150
- return o.colorSpec.scrim();
3151
- }
3152
- surfaceTint() {
3153
- return o.colorSpec.surfaceTint();
3154
- }
3155
- ////////////////////////////////////////////////////////////////
3156
- // Primaries [P] //
3157
- ////////////////////////////////////////////////////////////////
3158
- primary() {
3159
- return o.colorSpec.primary();
3160
- }
3161
- primaryDim() {
3162
- return o.colorSpec.primaryDim();
3163
- }
3164
- onPrimary() {
3165
- return o.colorSpec.onPrimary();
3166
- }
3167
- primaryContainer() {
3168
- return o.colorSpec.primaryContainer();
3169
- }
3170
- onPrimaryContainer() {
3171
- return o.colorSpec.onPrimaryContainer();
3172
- }
3173
- inversePrimary() {
3174
- return o.colorSpec.inversePrimary();
3175
- }
3176
- /////////////////////////////////////////////////////////////////
3177
- // Primary Fixed [PF] //
3178
- /////////////////////////////////////////////////////////////////
3179
- primaryFixed() {
3180
- return o.colorSpec.primaryFixed();
3181
- }
3182
- primaryFixedDim() {
3183
- return o.colorSpec.primaryFixedDim();
3184
- }
3185
- onPrimaryFixed() {
3186
- return o.colorSpec.onPrimaryFixed();
3187
- }
3188
- onPrimaryFixedVariant() {
3189
- return o.colorSpec.onPrimaryFixedVariant();
3190
- }
3191
- ////////////////////////////////////////////////////////////////
3192
- // Secondaries [Q] //
3193
- ////////////////////////////////////////////////////////////////
3194
- secondary() {
3195
- return o.colorSpec.secondary();
3196
- }
3197
- secondaryDim() {
3198
- return o.colorSpec.secondaryDim();
3199
- }
3200
- onSecondary() {
3201
- return o.colorSpec.onSecondary();
3202
- }
3203
- secondaryContainer() {
3204
- return o.colorSpec.secondaryContainer();
3205
- }
3206
- onSecondaryContainer() {
3207
- return o.colorSpec.onSecondaryContainer();
3208
- }
3209
- /////////////////////////////////////////////////////////////////
3210
- // Secondary Fixed [QF] //
3211
- /////////////////////////////////////////////////////////////////
3212
- secondaryFixed() {
3213
- return o.colorSpec.secondaryFixed();
3214
- }
3215
- secondaryFixedDim() {
3216
- return o.colorSpec.secondaryFixedDim();
3217
- }
3218
- onSecondaryFixed() {
3219
- return o.colorSpec.onSecondaryFixed();
3220
- }
3221
- onSecondaryFixedVariant() {
3222
- return o.colorSpec.onSecondaryFixedVariant();
3223
- }
3224
- ////////////////////////////////////////////////////////////////
3225
- // Tertiaries [T] //
3226
- ////////////////////////////////////////////////////////////////
3227
- tertiary() {
3228
- return o.colorSpec.tertiary();
3229
- }
3230
- tertiaryDim() {
3231
- return o.colorSpec.tertiaryDim();
3232
- }
3233
- onTertiary() {
3234
- return o.colorSpec.onTertiary();
3235
- }
3236
- tertiaryContainer() {
3237
- return o.colorSpec.tertiaryContainer();
3238
- }
3239
- onTertiaryContainer() {
3240
- return o.colorSpec.onTertiaryContainer();
3241
- }
3242
- /////////////////////////////////////////////////////////////////
3243
- // Tertiary Fixed [TF] //
3244
- /////////////////////////////////////////////////////////////////
3245
- tertiaryFixed() {
3246
- return o.colorSpec.tertiaryFixed();
3247
- }
3248
- tertiaryFixedDim() {
3249
- return o.colorSpec.tertiaryFixedDim();
3250
- }
3251
- onTertiaryFixed() {
3252
- return o.colorSpec.onTertiaryFixed();
3253
- }
3254
- onTertiaryFixedVariant() {
3255
- return o.colorSpec.onTertiaryFixedVariant();
3256
- }
3257
- ////////////////////////////////////////////////////////////////
3258
- // Errors [E] //
3259
- ////////////////////////////////////////////////////////////////
3260
- error() {
3261
- return o.colorSpec.error();
3262
- }
3263
- errorDim() {
3264
- return o.colorSpec.errorDim();
3265
- }
3266
- onError() {
3267
- return o.colorSpec.onError();
3268
- }
3269
- errorContainer() {
3270
- return o.colorSpec.errorContainer();
3271
- }
3272
- onErrorContainer() {
3273
- return o.colorSpec.onErrorContainer();
3274
- }
3275
- // Static variables are deprecated. Use the instance methods to get correct
3276
- // specs based on request.
3277
- /** @deprecated Use highestSurface() instead. */
3278
- static highestSurface(e) {
3279
- return o.colorSpec.highestSurface(e);
3280
- }
3281
- }
3282
- o.contentAccentToneDelta = 15;
3283
- o.colorSpec = new ur();
3284
- o.primaryPaletteKeyColor = o.colorSpec.primaryPaletteKeyColor();
3285
- o.secondaryPaletteKeyColor = o.colorSpec.secondaryPaletteKeyColor();
3286
- o.tertiaryPaletteKeyColor = o.colorSpec.tertiaryPaletteKeyColor();
3287
- o.neutralPaletteKeyColor = o.colorSpec.neutralPaletteKeyColor();
3288
- o.neutralVariantPaletteKeyColor = o.colorSpec.neutralVariantPaletteKeyColor();
3289
- o.background = o.colorSpec.background();
3290
- o.onBackground = o.colorSpec.onBackground();
3291
- o.surface = o.colorSpec.surface();
3292
- o.surfaceDim = o.colorSpec.surfaceDim();
3293
- o.surfaceBright = o.colorSpec.surfaceBright();
3294
- o.surfaceContainerLowest = o.colorSpec.surfaceContainerLowest();
3295
- o.surfaceContainerLow = o.colorSpec.surfaceContainerLow();
3296
- o.surfaceContainer = o.colorSpec.surfaceContainer();
3297
- o.surfaceContainerHigh = o.colorSpec.surfaceContainerHigh();
3298
- o.surfaceContainerHighest = o.colorSpec.surfaceContainerHighest();
3299
- o.onSurface = o.colorSpec.onSurface();
3300
- o.surfaceVariant = o.colorSpec.surfaceVariant();
3301
- o.onSurfaceVariant = o.colorSpec.onSurfaceVariant();
3302
- o.inverseSurface = o.colorSpec.inverseSurface();
3303
- o.inverseOnSurface = o.colorSpec.inverseOnSurface();
3304
- o.outline = o.colorSpec.outline();
3305
- o.outlineVariant = o.colorSpec.outlineVariant();
3306
- o.shadow = o.colorSpec.shadow();
3307
- o.scrim = o.colorSpec.scrim();
3308
- o.surfaceTint = o.colorSpec.surfaceTint();
3309
- o.primary = o.colorSpec.primary();
3310
- o.onPrimary = o.colorSpec.onPrimary();
3311
- o.primaryContainer = o.colorSpec.primaryContainer();
3312
- o.onPrimaryContainer = o.colorSpec.onPrimaryContainer();
3313
- o.inversePrimary = o.colorSpec.inversePrimary();
3314
- o.secondary = o.colorSpec.secondary();
3315
- o.onSecondary = o.colorSpec.onSecondary();
3316
- o.secondaryContainer = o.colorSpec.secondaryContainer();
3317
- o.onSecondaryContainer = o.colorSpec.onSecondaryContainer();
3318
- o.tertiary = o.colorSpec.tertiary();
3319
- o.onTertiary = o.colorSpec.onTertiary();
3320
- o.tertiaryContainer = o.colorSpec.tertiaryContainer();
3321
- o.onTertiaryContainer = o.colorSpec.onTertiaryContainer();
3322
- o.error = o.colorSpec.error();
3323
- o.onError = o.colorSpec.onError();
3324
- o.errorContainer = o.colorSpec.errorContainer();
3325
- o.onErrorContainer = o.colorSpec.onErrorContainer();
3326
- o.primaryFixed = o.colorSpec.primaryFixed();
3327
- o.primaryFixedDim = o.colorSpec.primaryFixedDim();
3328
- o.onPrimaryFixed = o.colorSpec.onPrimaryFixed();
3329
- o.onPrimaryFixedVariant = o.colorSpec.onPrimaryFixedVariant();
3330
- o.secondaryFixed = o.colorSpec.secondaryFixed();
3331
- o.secondaryFixedDim = o.colorSpec.secondaryFixedDim();
3332
- o.onSecondaryFixed = o.colorSpec.onSecondaryFixed();
3333
- o.onSecondaryFixedVariant = o.colorSpec.onSecondaryFixedVariant();
3334
- o.tertiaryFixed = o.colorSpec.tertiaryFixed();
3335
- o.tertiaryFixedDim = o.colorSpec.tertiaryFixedDim();
3336
- o.onTertiaryFixed = o.colorSpec.onTertiaryFixed();
3337
- o.onTertiaryFixedVariant = o.colorSpec.onTertiaryFixedVariant();
3338
- /**
3339
- * @license
3340
- * Copyright 2021 Google LLC
3341
- *
3342
- * Licensed under the Apache License, Version 2.0 (the "License");
3343
- * you may not use this file except in compliance with the License.
3344
- * You may obtain a copy of the License at
3345
- *
3346
- * http://www.apache.org/licenses/LICENSE-2.0
3347
- *
3348
- * Unless required by applicable law or agreed to in writing, software
3349
- * distributed under the License is distributed on an "AS IS" BASIS,
3350
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3351
- * See the License for the specific language governing permissions and
3352
- * limitations under the License.
3353
- */
3354
- class U {
3355
- /**
3356
- * @param argb ARGB representation of a color
3357
- *
3358
- * @deprecated Use {@link DynamicScheme} for color scheme generation.
3359
- * Use {@link CorePalettes} for core palettes container class.
3360
- */
3361
- static of(e) {
3362
- return new U(e, !1);
3363
- }
3364
- /**
3365
- * @param argb ARGB representation of a color
3366
- *
3367
- * @deprecated Use {@link DynamicScheme} for color scheme generation.
3368
- * Use {@link CorePalettes} for core palettes container class.
3369
- */
3370
- static contentOf(e) {
3371
- return new U(e, !0);
3372
- }
3373
- /**
3374
- * Create a [CorePalette] from a set of colors
3375
- *
3376
- * @deprecated Use {@link DynamicScheme} for color scheme generation.
3377
- * Use {@link CorePalettes} for core palettes container class.
3378
- */
3379
- static fromColors(e) {
3380
- return U.createPaletteFromColors(!1, e);
3381
- }
3382
- /**
3383
- * Create a content [CorePalette] from a set of colors
3384
- *
3385
- * @deprecated Use {@link DynamicScheme} for color scheme generation.
3386
- * Use {@link CorePalettes} for core palettes container class.
3387
- */
3388
- static contentFromColors(e) {
3389
- return U.createPaletteFromColors(!0, e);
3390
- }
3391
- static createPaletteFromColors(e, r) {
3392
- const t = new U(r.primary, e);
3393
- if (r.secondary) {
3394
- const n = new U(r.secondary, e);
3395
- t.a2 = n.a1;
3396
- }
3397
- if (r.tertiary) {
3398
- const n = new U(r.tertiary, e);
3399
- t.a3 = n.a1;
3400
- }
3401
- if (r.error) {
3402
- const n = new U(r.error, e);
3403
- t.error = n.a1;
3404
- }
3405
- if (r.neutral) {
3406
- const n = new U(r.neutral, e);
3407
- t.n1 = n.n1;
3408
- }
3409
- if (r.neutralVariant) {
3410
- const n = new U(r.neutralVariant, e);
3411
- t.n2 = n.n2;
3412
- }
3413
- return t;
3414
- }
3415
- constructor(e, r) {
3416
- const t = T.fromInt(e), n = t.hue, s = t.chroma;
3417
- r ? (this.a1 = Y.fromHueAndChroma(n, s), this.a2 = Y.fromHueAndChroma(n, s / 3), this.a3 = Y.fromHueAndChroma(n + 60, s / 2), this.n1 = Y.fromHueAndChroma(n, Math.min(s / 12, 4)), this.n2 = Y.fromHueAndChroma(n, Math.min(s / 6, 8))) : (this.a1 = Y.fromHueAndChroma(n, Math.max(48, s)), this.a2 = Y.fromHueAndChroma(n, 16), this.a3 = Y.fromHueAndChroma(n + 60, 24), this.n1 = Y.fromHueAndChroma(n, 4), this.n2 = Y.fromHueAndChroma(n, 8)), this.error = Y.fromHueAndChroma(25, 84);
3418
- }
3419
- }
3420
- /**
3421
- * @license
3422
- * Copyright 2021 Google LLC
3423
- *
3424
- * Licensed under the Apache License, Version 2.0 (the "License");
3425
- * you may not use this file except in compliance with the License.
3426
- * You may obtain a copy of the License at
3427
- *
3428
- * http://www.apache.org/licenses/LICENSE-2.0
3429
- *
3430
- * Unless required by applicable law or agreed to in writing, software
3431
- * distributed under the License is distributed on an "AS IS" BASIS,
3432
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3433
- * See the License for the specific language governing permissions and
3434
- * limitations under the License.
3435
- */
3436
- class X {
3437
- get primary() {
3438
- return this.props.primary;
3439
- }
3440
- get onPrimary() {
3441
- return this.props.onPrimary;
3442
- }
3443
- get primaryContainer() {
3444
- return this.props.primaryContainer;
3445
- }
3446
- get onPrimaryContainer() {
3447
- return this.props.onPrimaryContainer;
3448
- }
3449
- get secondary() {
3450
- return this.props.secondary;
3451
- }
3452
- get onSecondary() {
3453
- return this.props.onSecondary;
3454
- }
3455
- get secondaryContainer() {
3456
- return this.props.secondaryContainer;
3457
- }
3458
- get onSecondaryContainer() {
3459
- return this.props.onSecondaryContainer;
3460
- }
3461
- get tertiary() {
3462
- return this.props.tertiary;
3463
- }
3464
- get onTertiary() {
3465
- return this.props.onTertiary;
3466
- }
3467
- get tertiaryContainer() {
3468
- return this.props.tertiaryContainer;
3469
- }
3470
- get onTertiaryContainer() {
3471
- return this.props.onTertiaryContainer;
3472
- }
3473
- get error() {
3474
- return this.props.error;
3475
- }
3476
- get onError() {
3477
- return this.props.onError;
3478
- }
3479
- get errorContainer() {
3480
- return this.props.errorContainer;
3481
- }
3482
- get onErrorContainer() {
3483
- return this.props.onErrorContainer;
3484
- }
3485
- get background() {
3486
- return this.props.background;
3487
- }
3488
- get onBackground() {
3489
- return this.props.onBackground;
3490
- }
3491
- get surface() {
3492
- return this.props.surface;
3493
- }
3494
- get onSurface() {
3495
- return this.props.onSurface;
3496
- }
3497
- get surfaceVariant() {
3498
- return this.props.surfaceVariant;
3499
- }
3500
- get onSurfaceVariant() {
3501
- return this.props.onSurfaceVariant;
3502
- }
3503
- get outline() {
3504
- return this.props.outline;
3505
- }
3506
- get outlineVariant() {
3507
- return this.props.outlineVariant;
3508
- }
3509
- get shadow() {
3510
- return this.props.shadow;
3511
- }
3512
- get scrim() {
3513
- return this.props.scrim;
3514
- }
3515
- get inverseSurface() {
3516
- return this.props.inverseSurface;
3517
- }
3518
- get inverseOnSurface() {
3519
- return this.props.inverseOnSurface;
3520
- }
3521
- get inversePrimary() {
3522
- return this.props.inversePrimary;
3523
- }
3524
- /**
3525
- * @param argb ARGB representation of a color.
3526
- * @return Light Material color scheme, based on the color's hue.
3527
- */
3528
- static light(e) {
3529
- return X.lightFromCorePalette(U.of(e));
3530
- }
3531
- /**
3532
- * @param argb ARGB representation of a color.
3533
- * @return Dark Material color scheme, based on the color's hue.
3534
- */
3535
- static dark(e) {
3536
- return X.darkFromCorePalette(U.of(e));
3537
- }
3538
- /**
3539
- * @param argb ARGB representation of a color.
3540
- * @return Light Material content color scheme, based on the color's hue.
3541
- */
3542
- static lightContent(e) {
3543
- return X.lightFromCorePalette(U.contentOf(e));
3544
- }
3545
- /**
3546
- * @param argb ARGB representation of a color.
3547
- * @return Dark Material content color scheme, based on the color's hue.
3548
- */
3549
- static darkContent(e) {
3550
- return X.darkFromCorePalette(U.contentOf(e));
3551
- }
3552
- /**
3553
- * Light scheme from core palette
3554
- */
3555
- static lightFromCorePalette(e) {
3556
- return new X({
3557
- primary: e.a1.tone(40),
3558
- onPrimary: e.a1.tone(100),
3559
- primaryContainer: e.a1.tone(90),
3560
- onPrimaryContainer: e.a1.tone(10),
3561
- secondary: e.a2.tone(40),
3562
- onSecondary: e.a2.tone(100),
3563
- secondaryContainer: e.a2.tone(90),
3564
- onSecondaryContainer: e.a2.tone(10),
3565
- tertiary: e.a3.tone(40),
3566
- onTertiary: e.a3.tone(100),
3567
- tertiaryContainer: e.a3.tone(90),
3568
- onTertiaryContainer: e.a3.tone(10),
3569
- error: e.error.tone(40),
3570
- onError: e.error.tone(100),
3571
- errorContainer: e.error.tone(90),
3572
- onErrorContainer: e.error.tone(10),
3573
- background: e.n1.tone(99),
3574
- onBackground: e.n1.tone(10),
3575
- surface: e.n1.tone(99),
3576
- onSurface: e.n1.tone(10),
3577
- surfaceVariant: e.n2.tone(90),
3578
- onSurfaceVariant: e.n2.tone(30),
3579
- outline: e.n2.tone(50),
3580
- outlineVariant: e.n2.tone(80),
3581
- shadow: e.n1.tone(0),
3582
- scrim: e.n1.tone(0),
3583
- inverseSurface: e.n1.tone(20),
3584
- inverseOnSurface: e.n1.tone(95),
3585
- inversePrimary: e.a1.tone(80)
3586
- });
3587
- }
3588
- /**
3589
- * Dark scheme from core palette
3590
- */
3591
- static darkFromCorePalette(e) {
3592
- return new X({
3593
- primary: e.a1.tone(80),
3594
- onPrimary: e.a1.tone(20),
3595
- primaryContainer: e.a1.tone(30),
3596
- onPrimaryContainer: e.a1.tone(90),
3597
- secondary: e.a2.tone(80),
3598
- onSecondary: e.a2.tone(20),
3599
- secondaryContainer: e.a2.tone(30),
3600
- onSecondaryContainer: e.a2.tone(90),
3601
- tertiary: e.a3.tone(80),
3602
- onTertiary: e.a3.tone(20),
3603
- tertiaryContainer: e.a3.tone(30),
3604
- onTertiaryContainer: e.a3.tone(90),
3605
- error: e.error.tone(80),
3606
- onError: e.error.tone(20),
3607
- errorContainer: e.error.tone(30),
3608
- onErrorContainer: e.error.tone(80),
3609
- background: e.n1.tone(10),
3610
- onBackground: e.n1.tone(90),
3611
- surface: e.n1.tone(10),
3612
- onSurface: e.n1.tone(90),
3613
- surfaceVariant: e.n2.tone(30),
3614
- onSurfaceVariant: e.n2.tone(80),
3615
- outline: e.n2.tone(60),
3616
- outlineVariant: e.n2.tone(30),
3617
- shadow: e.n1.tone(0),
3618
- scrim: e.n1.tone(0),
3619
- inverseSurface: e.n1.tone(90),
3620
- inverseOnSurface: e.n1.tone(20),
3621
- inversePrimary: e.a1.tone(40)
3622
- });
3623
- }
3624
- constructor(e) {
3625
- this.props = e;
3626
- }
3627
- toJSON() {
3628
- return {
3629
- ...this.props
3630
- };
3631
- }
3632
- }
3633
- /**
3634
- * @license
3635
- * Copyright 2021 Google LLC
3636
- *
3637
- * Licensed under the Apache License, Version 2.0 (the "License");
3638
- * you may not use this file except in compliance with the License.
3639
- * You may obtain a copy of the License at
3640
- *
3641
- * http://www.apache.org/licenses/LICENSE-2.0
3642
- *
3643
- * Unless required by applicable law or agreed to in writing, software
3644
- * distributed under the License is distributed on an "AS IS" BASIS,
3645
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3646
- * See the License for the specific language governing permissions and
3647
- * limitations under the License.
3648
- */
3649
- function lr(a) {
3650
- const e = xe(a), r = Be(a), t = ve(a), n = [e.toString(16), r.toString(16), t.toString(16)];
3651
- for (const [s, i] of n.entries())
3652
- i.length === 1 && (n[s] = "0" + i);
3653
- return "#" + n.join("");
3654
- }
3655
- function fr(a) {
3656
- a = a.replace("#", "");
3657
- const e = a.length === 3, r = a.length === 6, t = a.length === 8;
3658
- if (!e && !r && !t)
3659
- throw new Error("unexpected hex " + a);
3660
- let n = 0, s = 0, i = 0;
3661
- return e ? (n = $(a.slice(0, 1).repeat(2)), s = $(a.slice(1, 2).repeat(2)), i = $(a.slice(2, 3).repeat(2))) : r ? (n = $(a.slice(0, 2)), s = $(a.slice(2, 4)), i = $(a.slice(4, 6))) : t && (n = $(a.slice(2, 4)), s = $(a.slice(4, 6)), i = $(a.slice(6, 8))), (255 << 24 | (n & 255) << 16 | (s & 255) << 8 | i & 255) >>> 0;
3662
- }
3663
- function $(a) {
3664
- return parseInt(a, 16);
3665
- }
3666
- /**
3667
- * @license
3668
- * Copyright 2021 Google LLC
3669
- *
3670
- * Licensed under the Apache License, Version 2.0 (the "License");
3671
- * you may not use this file except in compliance with the License.
3672
- * You may obtain a copy of the License at
3673
- *
3674
- * http://www.apache.org/licenses/LICENSE-2.0
3675
- *
3676
- * Unless required by applicable law or agreed to in writing, software
3677
- * distributed under the License is distributed on an "AS IS" BASIS,
3678
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3679
- * See the License for the specific language governing permissions and
3680
- * limitations under the License.
3681
- */
3682
- function hr(a, e = []) {
3683
- const r = U.of(a);
3684
- return {
3685
- source: a,
3686
- schemes: {
3687
- light: X.light(a),
3688
- dark: X.dark(a)
3689
- },
3690
- palettes: {
3691
- primary: r.a1,
3692
- secondary: r.a2,
3693
- tertiary: r.a3,
3694
- neutral: r.n1,
3695
- neutralVariant: r.n2,
3696
- error: r.error
3697
- },
3698
- customColors: e.map((t) => dr(a, t))
3699
- };
3700
- }
3701
- function dr(a, e) {
3702
- let r = e.value;
3703
- const t = r, n = a;
3704
- e.blend && (r = Ce.harmonize(t, n));
3705
- const i = U.of(r).a1;
3706
- return {
3707
- color: e,
3708
- value: r,
3709
- light: {
3710
- color: i.tone(40),
3711
- onColor: i.tone(100),
3712
- colorContainer: i.tone(90),
3713
- onColorContainer: i.tone(10)
3714
- },
3715
- dark: {
3716
- color: i.tone(80),
3717
- onColor: i.tone(20),
3718
- colorContainer: i.tone(30),
3719
- onColorContainer: i.tone(90)
3720
- }
3721
- };
3722
- }
3723
- const Ie = [
3724
- 50,
3725
- 100,
3726
- 200,
3727
- 300,
3728
- 400,
3729
- 500,
3730
- 600,
3731
- 700,
3732
- 800,
3733
- 900
3734
- ], Ee = {
3735
- 50: 90,
3736
- 100: 80,
3737
- 200: 70,
3738
- 300: 60,
3739
- 400: 50,
3740
- 500: 40,
3741
- 600: 35,
3742
- 700: 30,
3743
- 800: 20,
3744
- 900: 10
3745
- }, pr = Object.fromEntries(
3746
- Ie.map((a) => [a, Ee[a] >= 60 ? 10 : 100])
3747
- ), mr = (a) => {
3748
- const e = Ye(a, "#000000");
3749
- return hr(fr(e)).palettes.primary;
3750
- }, Le = (a, e) => {
3751
- const r = mr(a);
3752
- return Object.fromEntries(
3753
- Ie.map((t) => [
3754
- t,
3755
- lr(r.tone(e[t]))
3756
- ])
3757
- );
3758
- }, yr = (a) => Le(a, Ee), gr = (a) => Le(a, pr), Sr = (a) => ({
3759
- colors: yr(a),
3760
- onColors: gr(a)
3761
- });
3762
- function br(a) {
3763
- return a.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`).replace(/([a-zA-Z])(\d+)/g, "$1-$2");
3764
- }
3765
- export {
3766
- Ie as C,
3767
- T as H,
3768
- pr as O,
3769
- Ee as S,
3770
- gr as a,
3771
- yr as b,
3772
- Ye as c,
3773
- Sr as d,
3774
- Ue as e,
3775
- br as f,
3776
- Cr as g,
3777
- Pr as h,
3778
- lr as i,
3779
- fr as j,
3780
- me as p,
3781
- kr as r,
3782
- hr as t
3783
- };