@gradient-ui/core 0.6.0 → 1.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.
- package/LICENSE +21 -0
- package/README.md +60 -261
- package/dist/BaseOverlay-DgBWbJbs.cjs +1 -0
- package/dist/BaseOverlay-DzJ37TCS.js +216 -0
- package/dist/GAvatar-CN3PHGY_.js +202 -0
- package/dist/GAvatar-Dj6hSgL3.cjs +1 -0
- package/dist/GButton.vue_vue_type_style_index_0_lang-D9qRus1m.js +141 -0
- package/dist/GButton.vue_vue_type_style_index_0_lang-tGLnt3_R.cjs +1 -0
- package/dist/GCheckGroup-B3gZ9p6e.cjs +1 -0
- package/dist/GCheckGroup-DDkxtEj2.js +132 -0
- package/dist/GCheckIndicator-C-adGOcb.cjs +1 -0
- package/dist/GCheckIndicator-yvipPkWi.js +264 -0
- package/dist/GCheckbox.vue_vue_type_script_setup_true_lang-BrQE29bm.js +68 -0
- package/dist/GCheckbox.vue_vue_type_script_setup_true_lang-hjvutORC.cjs +1 -0
- package/dist/GCheckboxGroup.vue_vue_type_script_setup_true_lang-ChPcOQYQ.js +143 -0
- package/dist/GCheckboxGroup.vue_vue_type_script_setup_true_lang-CjPc-fNv.cjs +1 -0
- package/dist/GDropdown-CmBNk0jK.cjs +1 -0
- package/dist/GDropdown-TVH93Obq.js +126 -0
- package/dist/GExpandTransition.vue_vue_type_script_setup_true_lang-Ccl2Cemo.cjs +1 -0
- package/dist/GExpandTransition.vue_vue_type_script_setup_true_lang-ztMeJVQO.js +170 -0
- package/dist/GForm.vue_vue_type_style_index_0_lang-BzOWdjzk.cjs +1 -0
- package/dist/GForm.vue_vue_type_style_index_0_lang-DpPM5snQ.js +149 -0
- package/dist/GGradientMaterial.vue_vue_type_style_index_0_lang-ChRL7BIo.js +119 -0
- package/dist/GGradientMaterial.vue_vue_type_style_index_0_lang-DJcGdEVi.cjs +1 -0
- package/dist/GInput.vue_vue_type_script_setup_true_lang-BHM4W0S8.js +143 -0
- package/dist/GInput.vue_vue_type_script_setup_true_lang-dMjIUhb1.cjs +1 -0
- package/dist/GLoading.vue_vue_type_style_index_0_lang-BNOsRA0v.js +97 -0
- package/dist/GLoading.vue_vue_type_style_index_0_lang-KmMjjwpE.cjs +1 -0
- package/dist/GRadio.vue_vue_type_script_setup_true_lang-DNRTDtF2.cjs +1 -0
- package/dist/GRadio.vue_vue_type_script_setup_true_lang-kE-52Aj1.js +182 -0
- package/dist/GSwitch.vue_vue_type_script_setup_true_lang-BZXxiyLT.js +68 -0
- package/dist/GSwitch.vue_vue_type_script_setup_true_lang-DC8vyW7e.cjs +1 -0
- package/dist/GTable.vue_vue_type_style_index_1_lang-BECleEMi.js +828 -0
- package/dist/GTable.vue_vue_type_style_index_1_lang-DgaYCTxJ.cjs +1 -0
- package/dist/GTextarea.vue_vue_type_script_setup_true_lang-CyuCJwv6.cjs +1 -0
- package/dist/GTextarea.vue_vue_type_script_setup_true_lang-zSTso23Z.js +84 -0
- package/dist/GTransition.vue_vue_type_script_setup_true_lang-CHGSgsZ0.js +143 -0
- package/dist/GTransition.vue_vue_type_script_setup_true_lang-CgELPmMA.cjs +1 -0
- package/dist/GTransitionGroup.vue_vue_type_script_setup_true_lang-CDu6W6-X.js +23 -0
- package/dist/GTransitionGroup.vue_vue_type_script_setup_true_lang-DDh0rXP7.cjs +1 -0
- package/dist/PLA-B2QljfgE.cjs +1 -0
- package/dist/PLA-DePtRzKl.js +10 -0
- package/dist/_plugin-vue_export-helper-B--vMWp3.js +9 -0
- package/dist/_plugin-vue_export-helper-D_jf5u0r.cjs +1 -0
- package/dist/actionSurface-BkFPXb-Z.js +123 -0
- package/dist/actionSurface-Db2TksPm.cjs +1 -0
- package/dist/appScopedState-BCzeQW7Y.js +15 -0
- package/dist/appScopedState-D0zgOLf5.cjs +1 -0
- package/dist/booleanControl-BrOrGYvg.js +71 -0
- package/dist/booleanControl-uPXEckMZ.cjs +1 -0
- package/dist/camelToKebabCase-BFm1Zwmu.cjs +1 -0
- package/dist/camelToKebabCase-nw6sbguT.js +6 -0
- package/dist/clientLifecycle-DlIZRy4I.cjs +1 -0
- package/dist/clientLifecycle-NZQzL_eH.js +12 -0
- package/dist/color-8SkPDCIp.cjs +1 -0
- package/dist/color-WJmhRKJ_.js +26 -0
- package/dist/colorResolver-BBj51UAZ.js +90 -0
- package/dist/colorResolver-C6PTz0S8.cjs +1 -0
- package/dist/component-names.cjs +1 -0
- package/dist/component-names.mjs +79 -0
- package/dist/components/BaseOverlay.cjs +1 -0
- package/dist/components/BaseOverlay.mjs +5 -0
- package/dist/components/GAlert.cjs +1 -0
- package/dist/components/GAlert.mjs +126 -0
- package/dist/components/GAside.cjs +1 -0
- package/dist/components/GAside.mjs +90 -0
- package/dist/components/GAsideGroup.cjs +1 -0
- package/dist/components/GAsideGroup.mjs +99 -0
- package/dist/components/GAsideItem.cjs +1 -0
- package/dist/components/GAsideItem.mjs +123 -0
- package/dist/components/GAvatar.cjs +1 -0
- package/dist/components/GAvatar.mjs +5 -0
- package/dist/components/GAvatarGroup.cjs +1 -0
- package/dist/components/GAvatarGroup.mjs +66 -0
- package/dist/components/GBadge.cjs +1 -0
- package/dist/components/GBadge.mjs +141 -0
- package/dist/components/GButton.cjs +1 -0
- package/dist/components/GButton.mjs +4 -0
- package/dist/components/GCard.cjs +1 -0
- package/dist/components/GCard.mjs +235 -0
- package/dist/components/GCheckbox.cjs +1 -0
- package/dist/components/GCheckbox.mjs +4 -0
- package/dist/components/GCheckboxGroup.cjs +1 -0
- package/dist/components/GCheckboxGroup.mjs +4 -0
- package/dist/components/GChip.cjs +1 -0
- package/dist/components/GChip.mjs +133 -0
- package/dist/components/GCombobox.cjs +1 -0
- package/dist/components/GCombobox.mjs +477 -0
- package/dist/components/GDivider.cjs +1 -0
- package/dist/components/GDivider.mjs +189 -0
- package/dist/components/GDrawer.cjs +1 -0
- package/dist/components/GDrawer.mjs +151 -0
- package/dist/components/GDropdownGroup.cjs +1 -0
- package/dist/components/GDropdownGroup.mjs +24 -0
- package/dist/components/GExpandTransition.cjs +1 -0
- package/dist/components/GExpandTransition.mjs +4 -0
- package/dist/components/GExpansion.cjs +1 -0
- package/dist/components/GExpansion.mjs +321 -0
- package/dist/components/GExpansionGroup.cjs +1 -0
- package/dist/components/GExpansionGroup.mjs +95 -0
- package/dist/components/GFAB.cjs +1 -0
- package/dist/components/GFAB.mjs +142 -0
- package/dist/components/GForm.cjs +1 -0
- package/dist/components/GForm.mjs +4 -0
- package/dist/components/GGradient.cjs +1 -0
- package/dist/components/GGradient.mjs +158 -0
- package/dist/components/GGradientMaterial.cjs +1 -0
- package/dist/components/GGradientMaterial.mjs +4 -0
- package/dist/components/GIcon.cjs +1 -0
- package/dist/components/GIcon.mjs +35 -0
- package/dist/components/GImg.cjs +1 -0
- package/dist/components/GImg.mjs +167 -0
- package/dist/components/GInput.cjs +1 -0
- package/dist/components/GInput.mjs +4 -0
- package/dist/components/GLoading.cjs +1 -0
- package/dist/components/GLoading.mjs +4 -0
- package/dist/components/GMenu.cjs +1 -0
- package/dist/components/GMenu.mjs +274 -0
- package/dist/components/GModal.cjs +1 -0
- package/dist/components/GModal.mjs +141 -0
- package/dist/components/GNavGroup.cjs +1 -0
- package/dist/components/GNavGroup.mjs +99 -0
- package/dist/components/GNavItem.cjs +1 -0
- package/dist/components/GNavItem.mjs +124 -0
- package/dist/components/GNavList.cjs +1 -0
- package/dist/components/GNavList.mjs +82 -0
- package/dist/components/GNavbar.cjs +1 -0
- package/dist/components/GNavbar.mjs +172 -0
- package/dist/components/GNavbarItem.cjs +1 -0
- package/dist/components/GNavbarItem.mjs +120 -0
- package/dist/components/GNavbarMenu.cjs +1 -0
- package/dist/components/GNavbarMenu.mjs +147 -0
- package/dist/components/GNavbarSubItem.cjs +1 -0
- package/dist/components/GNavbarSubItem.mjs +96 -0
- package/dist/components/GProgress.cjs +1 -0
- package/dist/components/GProgress.mjs +135 -0
- package/dist/components/GQuickActions.cjs +1 -0
- package/dist/components/GQuickActions.mjs +157 -0
- package/dist/components/GRadio.cjs +1 -0
- package/dist/components/GRadio.mjs +4 -0
- package/dist/components/GSelect.cjs +1 -0
- package/dist/components/GSelect.mjs +145 -0
- package/dist/components/GSnackbar.cjs +1 -0
- package/dist/components/GSnackbar.mjs +285 -0
- package/dist/components/GSquircle.cjs +1 -0
- package/dist/components/GSquircle.mjs +180 -0
- package/dist/components/GStepPanel.cjs +1 -0
- package/dist/components/GStepPanel.mjs +156 -0
- package/dist/components/GStepper.cjs +1 -0
- package/dist/components/GStepper.mjs +335 -0
- package/dist/components/GStepperActions.cjs +1 -0
- package/dist/components/GStepperActions.mjs +61 -0
- package/dist/components/GSwitch.cjs +1 -0
- package/dist/components/GSwitch.mjs +4 -0
- package/dist/components/GTab.cjs +1 -0
- package/dist/components/GTab.mjs +105 -0
- package/dist/components/GTabList.cjs +1 -0
- package/dist/components/GTabList.mjs +28 -0
- package/dist/components/GTabPanel.cjs +1 -0
- package/dist/components/GTabPanel.mjs +35 -0
- package/dist/components/GTabPanels.cjs +1 -0
- package/dist/components/GTabPanels.mjs +24 -0
- package/dist/components/GTable.cjs +1 -0
- package/dist/components/GTable.mjs +4 -0
- package/dist/components/GTabs.cjs +1 -0
- package/dist/components/GTabs.mjs +73 -0
- package/dist/components/GText.cjs +1 -0
- package/dist/components/GText.mjs +59 -0
- package/dist/components/GTextarea.cjs +1 -0
- package/dist/components/GTextarea.mjs +4 -0
- package/dist/components/GTooltip.cjs +1 -0
- package/dist/components/GTooltip.mjs +65 -0
- package/dist/components/GTransition.cjs +1 -0
- package/dist/components/GTransition.mjs +4 -0
- package/dist/components/GTransitionGroup.cjs +1 -0
- package/dist/components/GTransitionGroup.mjs +4 -0
- package/dist/components.cjs +1 -1
- package/dist/components.mjs +135 -70
- package/dist/context-D_uVf3Ih.cjs +1 -0
- package/dist/context-DmyyyTi-.js +164 -0
- package/dist/context-FLWxn0X1.js +8 -0
- package/dist/context-obVnJalQ.cjs +1 -0
- package/dist/control-B3T1H83D.js +53 -0
- package/dist/control-C5Ws5lp3.cjs +1 -0
- package/dist/controller-DTFaTta0.cjs +1 -0
- package/dist/controller-Dk9Wd1Sr.js +101 -0
- package/dist/createComponentId-CK5eUecc.cjs +1 -0
- package/dist/createComponentId-CrqdDHC3.js +5 -0
- package/dist/createId-t3ke7cZx.js +5 -0
- package/dist/createId-tM8qn_N_.cjs +1 -0
- package/dist/cssTokens-CR4OxIND.js +75 -0
- package/dist/cssTokens-gELrmYNj.cjs +5 -0
- package/dist/defaults-DJ6ZV1Qc.js +51 -0
- package/dist/defaults-aVtmQF-9.cjs +1 -0
- package/dist/density-C3E1eUQ3.cjs +1 -0
- package/dist/density-Ci15Ek7T.js +15 -0
- package/dist/di-BXJSJc_E.js +12 -0
- package/dist/di-Czemfti1.cjs +1 -0
- package/dist/directives.cjs +1 -1
- package/dist/directives.mjs +8 -8
- package/dist/disabled-B_bAKgaM.cjs +1 -0
- package/dist/disabled-CAV056h6.js +12 -0
- package/dist/environment-Dr5kpq3D.cjs +1 -0
- package/dist/environment-o0e-UUbv.js +13 -0
- package/dist/fieldControl-BgVt1Hh1.js +144 -0
- package/dist/fieldControl-CIJMnu2j.cjs +1 -0
- package/dist/floatingTrigger-B_K4a4Fz.cjs +1 -0
- package/dist/floatingTrigger-CyvZ-aQ6.js +275 -0
- package/dist/glass-CJjbKWWO.js +20 -0
- package/dist/glass-CZEblMo2.cjs +1 -0
- package/dist/gradient-Bf_C3oqp.cjs +1 -0
- package/dist/gradient-Cesrzb2-.js +138 -0
- package/dist/gradientMaterial-BEhJP5b1.js +141 -0
- package/dist/gradientMaterial-DrttA9E_.cjs +1 -0
- package/dist/groupContext-C2lbjfsf.cjs +1 -0
- package/dist/groupContext-CBceOY6B.js +14 -0
- package/dist/groupContext-DU6dxh4q.cjs +1 -0
- package/dist/groupContext-vS5bHonI.js +14 -0
- package/dist/head-BMx6G1g4.js +45 -0
- package/dist/head-u-LV2RM9.cjs +2 -0
- package/dist/icon-C1AhpC8p.js +66 -0
- package/dist/icon-DgrRDU9A.cjs +1 -0
- package/dist/id-Cjq3OT0R.js +5 -0
- package/dist/id-EYQallpf.cjs +1 -0
- package/dist/index-71vxBpir.js +53 -0
- package/dist/index-8uDgLBTF.cjs +1 -0
- package/dist/index-BDHATTpo.js +141 -0
- package/dist/index-DQ6stZ3U.js +97 -0
- package/dist/index-Dd_8Hfjk.cjs +1 -0
- package/dist/index-YvJ0cd3f.cjs +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +315 -204
- package/dist/item-BiO-0FYg.cjs +1 -0
- package/dist/item-Cm_rJTEH.js +47 -0
- package/dist/layerStack-Bn2nFt2F.cjs +1 -0
- package/dist/layerStack-C926It64.js +86 -0
- package/dist/mask-BGVqqZXk.cjs +1 -0
- package/dist/mask-D4VYR8fo.js +541 -0
- package/dist/material-CkThdnz0.cjs +1 -0
- package/dist/material-Cn0l9r_y.js +182 -0
- package/dist/materialSurface-BZWqxSOo.cjs +1 -0
- package/dist/materialSurface-DKWanYUC.js +57 -0
- package/dist/menuContext-COshJAv-.js +14 -0
- package/dist/menuContext-DqTLm_y8.cjs +1 -0
- package/dist/mount-CqN_WfIk.js +58 -0
- package/dist/mount-qFaEMFZj.cjs +1 -0
- package/dist/palette-CH8mtBoc.js +3779 -0
- package/dist/palette-WOebHg01.cjs +316 -0
- package/dist/plugin.cjs +1 -0
- package/dist/plugin.mjs +27 -0
- package/dist/propsFactory-DT6-QS4L.cjs +1 -0
- package/dist/propsFactory-FM5RGbLN.js +13 -0
- package/dist/px-B-cyF02Z.js +8 -0
- package/dist/px-CVkec5Jf.cjs +1 -0
- package/dist/rounded-BneJO7vz.cjs +1 -0
- package/dist/rounded-CKhFFdmx.js +12 -0
- package/dist/routerLink-BhTEISct.cjs +1 -0
- package/dist/routerLink-p0fsQRNq.js +11 -0
- package/dist/runtime-DBDKFxqD.js +22 -0
- package/dist/runtime-DjqHzhfc.cjs +1 -0
- package/dist/scheme-C0jQNw-v.cjs +299 -0
- package/dist/scheme-Dp9cSd1s.js +1406 -0
- package/dist/selected-CEdYQtXH.cjs +1 -0
- package/dist/selected-DPdzuMh_.js +20 -0
- package/dist/selectionController-Cq7OffKP.js +98 -0
- package/dist/selectionController-D_SzzLi7.cjs +1 -0
- package/dist/selectionModel-B_tgk_Aa.cjs +1 -0
- package/dist/selectionModel-DMATNQOo.js +76 -0
- package/dist/services.cjs +1 -1
- package/dist/services.mjs +10 -3
- package/dist/size-BSjg5E6f.cjs +1 -0
- package/dist/size-C-WH-uPa.js +16 -0
- package/dist/ssr.cjs +1 -0
- package/dist/ssr.mjs +31 -0
- package/dist/state-CUskk7oG.cjs +1 -0
- package/dist/state-zMDQLwyB.js +12 -0
- package/dist/stateIcon-B8wmjxgd.js +98 -0
- package/dist/stateIcon-BxT3Loel.cjs +1 -0
- package/dist/style.css +1 -1
- package/dist/surface-NFdB950M.cjs +1 -0
- package/dist/surface-i-1vm2j3.js +99 -0
- package/dist/surfaceColor-BlDoAKoV.cjs +1 -0
- package/dist/surfaceColor-Cic675ry.js +34 -0
- package/dist/surfaceMaterial-B1a1iV02.js +39 -0
- package/dist/surfaceMaterial-JpbVongH.cjs +1 -0
- package/dist/tagName-D8HI-Yqc.js +40 -0
- package/dist/tagName-EmIHK0fg.cjs +1 -0
- package/dist/teleport-6ZRoZ2JT.js +26 -0
- package/dist/teleport-Bj9Z7LhE.cjs +1 -0
- package/dist/textFieldComponent-Ct4Z0dFr.cjs +1 -0
- package/dist/textFieldComponent-gnbYgrX0.js +217 -0
- package/dist/textFieldControl-Cxnq3lo4.js +80 -0
- package/dist/textFieldControl-D0-pdxIY.cjs +1 -0
- package/dist/theme.cjs +1 -1
- package/dist/theme.mjs +60 -59
- package/dist/tokenInputKeyboard-DBcgGd7c.js +108 -0
- package/dist/tokenInputKeyboard-DqEV34Li.cjs +1 -0
- package/dist/transition-BPMUkgHY.cjs +1 -0
- package/dist/transition-DVGMCo2o.js +108 -0
- package/dist/types/componentNames.d.ts +5 -0
- package/dist/types/components/GGroup/GGroup.vue.d.ts +11 -9
- package/dist/types/components/GGroup/index.d.ts +1 -1
- package/dist/types/components/index.d.ts +55 -43
- package/dist/types/components/transitions/GExpandTransition.vue.d.ts +26 -32
- package/dist/types/components/transitions/GTransition.vue.d.ts +26 -32
- package/dist/types/components/transitions/GTransitionGroup.vue.d.ts +26 -32
- package/dist/types/components/transitions/TransitionExpansion.vue.d.ts +2 -8
- package/dist/types/components/transitions/TransitionOverlay.vue.d.ts +2 -8
- package/dist/types/components/transitions/TransitionRotate.vue.d.ts +2 -8
- package/dist/types/components/transitions/TransitionScale.vue.d.ts +2 -8
- package/dist/types/components/transitions/TransitionStaggerTranslate.vue.d.ts +2 -8
- package/dist/types/components/transitions/index.d.ts +3 -3
- package/dist/types/components/ui/BaseFloating/BaseFloating.vue.d.ts +45 -53
- package/dist/types/components/ui/BaseFloating/index.d.ts +1 -1
- package/dist/types/components/ui/BaseOverlay/BaseOverlay.vue.d.ts +62 -71
- package/dist/types/components/ui/BaseOverlay/index.d.ts +1 -1
- package/dist/types/components/ui/BaseOverlay/types.d.ts +24 -24
- package/dist/types/components/ui/GAction/GAction.vue.d.ts +1 -1
- package/dist/types/components/ui/GAction/index.d.ts +1 -1
- package/dist/types/components/ui/GAction/types.d.ts +15 -15
- package/dist/types/components/ui/GAlert/GAlert.vue.d.ts +178 -184
- package/dist/types/components/ui/GAlert/index.d.ts +1 -1
- package/dist/types/components/ui/GAlert/types.d.ts +151 -151
- package/dist/types/components/ui/GAside/GAside.vue.d.ts +26 -24
- package/dist/types/components/ui/GAside/GAsideGroup.vue.d.ts +11 -9
- package/dist/types/components/ui/GAside/GAsideItem.vue.d.ts +16 -14
- package/dist/types/components/ui/GAside/context.d.ts +2 -2
- package/dist/types/components/ui/GAside/groupContext.d.ts +1 -1
- package/dist/types/components/ui/GAside/index.d.ts +4 -4
- package/dist/types/components/ui/GAside/types.d.ts +28 -28
- package/dist/types/components/ui/GAvatar/GAvatar.vue.d.ts +867 -0
- package/dist/types/components/ui/GAvatar/GAvatarGroup.vue.d.ts +188 -0
- package/dist/types/components/ui/GAvatar/index.d.ts +3 -0
- package/dist/types/components/ui/GAvatar/types.d.ts +585 -0
- package/dist/types/components/ui/GBadge/GBadge.vue.d.ts +367 -373
- package/dist/types/components/ui/GBadge/index.d.ts +2 -2
- package/dist/types/components/ui/GBadge/types.d.ts +153 -153
- package/dist/types/components/ui/GButton/GButton.vue.d.ts +252 -258
- package/dist/types/components/ui/GButton/index.d.ts +2 -2
- package/dist/types/components/ui/GButton/types.d.ts +149 -149
- package/dist/types/components/ui/GCard/GCard.vue.d.ts +943 -0
- package/dist/types/components/ui/GCard/index.d.ts +2 -0
- package/dist/types/components/ui/GCard/types.d.ts +519 -0
- package/dist/types/components/ui/GCheckControl/GCheckControl.vue.d.ts +86 -92
- package/dist/types/components/ui/GCheckControl/GCheckGroup.vue.d.ts +77 -83
- package/dist/types/components/ui/GCheckControl/GCheckIndicator.vue.d.ts +17 -10
- package/dist/types/components/ui/GCheckControl/index.d.ts +3 -3
- package/dist/types/components/ui/GCheckbox/GCheckbox.vue.d.ts +10 -211
- package/dist/types/components/ui/GCheckbox/index.d.ts +2 -2
- package/dist/types/components/ui/GCheckbox/types.d.ts +1 -1
- package/dist/types/components/ui/GCheckboxGroup/GCheckboxGroup.vue.d.ts +12 -10
- package/dist/types/components/ui/GCheckboxGroup/index.d.ts +2 -2
- package/dist/types/components/ui/GCheckboxGroup/types.d.ts +2 -2
- package/dist/types/components/ui/GChip/GChip.vue.d.ts +226 -228
- package/dist/types/components/ui/GChip/index.d.ts +2 -2
- package/dist/types/components/ui/GChip/types.d.ts +141 -140
- package/dist/types/components/ui/GCombobox/GCombobox.vue.d.ts +39 -0
- package/dist/types/components/ui/GCombobox/index.d.ts +2 -0
- package/dist/types/components/ui/GCombobox/types.d.ts +59 -0
- package/dist/types/components/ui/GDivider/GDivider.vue.d.ts +959 -0
- package/dist/types/components/ui/GDivider/index.d.ts +2 -0
- package/dist/types/components/ui/GDivider/types.d.ts +518 -0
- package/dist/types/components/ui/GDrawer/GDrawer.vue.d.ts +135 -141
- package/dist/types/components/ui/GDrawer/index.d.ts +2 -2
- package/dist/types/components/ui/GDrawer/types.d.ts +44 -44
- package/dist/types/components/ui/GDropdown/GDropdown.vue.d.ts +94 -102
- package/dist/types/components/ui/GDropdown/index.d.ts +1 -1
- package/dist/types/components/ui/GDropdown/types.d.ts +40 -40
- package/dist/types/components/ui/GDropdownGroup/GDropdownGroup.vue.d.ts +3 -9
- package/dist/types/components/ui/GDropdownGroup/index.d.ts +2 -2
- package/dist/types/components/ui/GDropdownSelect/GDropdownSelect.vue.d.ts +11 -9
- package/dist/types/components/ui/GDropdownSelect/types.d.ts +2 -2
- package/dist/types/components/ui/GExpansion/GExpansion.vue.d.ts +53 -51
- package/dist/types/components/ui/GExpansion/index.d.ts +1 -1
- package/dist/types/components/ui/GExpansion/types.d.ts +154 -154
- package/dist/types/components/ui/GExpansionGroup/GExpansionGroup.vue.d.ts +17 -15
- package/dist/types/components/ui/GExpansionGroup/index.d.ts +1 -1
- package/dist/types/components/ui/GExpansionGroup/types.d.ts +10 -7
- package/dist/types/components/ui/GFAB/GFAB.vue.d.ts +81 -87
- package/dist/types/components/ui/GFAB/index.d.ts +1 -1
- package/dist/types/components/ui/GFAB/types.d.ts +57 -57
- package/dist/types/components/ui/GFieldBase/GFieldBase.vue.d.ts +123 -54
- package/dist/types/components/ui/GFieldBase/props.d.ts +103 -34
- package/dist/types/components/ui/GForm/GForm.vue.d.ts +32 -40
- package/dist/types/components/ui/GForm/index.d.ts +2 -2
- package/dist/types/components/ui/GForm/types.d.ts +10 -10
- package/dist/types/components/ui/GGradient/GGradient.vue.d.ts +96 -102
- package/dist/types/components/ui/GGradient/GGradientBorderLayer.vue.d.ts +10 -4
- package/dist/types/components/ui/GGradient/index.d.ts +2 -2
- package/dist/types/components/ui/GGradient/types.d.ts +4 -4
- package/dist/types/components/ui/GGradientMaterial/GGradientMaterial.vue.d.ts +84 -90
- package/dist/types/components/ui/GGradientMaterial/index.d.ts +2 -2
- package/dist/types/components/ui/GGradientMaterial/types.d.ts +15 -15
- package/dist/types/components/ui/GIcon/GIcon.vue.d.ts +5 -5
- package/dist/types/components/ui/GIcon/index.d.ts +2 -2
- package/dist/types/components/ui/GIcon/sets/MdiIconSet.vue.d.ts +1 -1
- package/dist/types/components/ui/GIcon/types.d.ts +1 -1
- package/dist/types/components/ui/GIcon.vue.d.ts +2 -2
- package/dist/types/components/ui/GImg/GImg.vue.d.ts +266 -0
- package/dist/types/components/ui/GImg/index.d.ts +2 -0
- package/dist/types/components/ui/GImg/types.d.ts +174 -0
- package/dist/types/components/ui/GInput/GInput.vue.d.ts +14 -248
- package/dist/types/components/ui/GInput/SwitchPassword.vue.d.ts +2 -2
- package/dist/types/components/ui/GInput/index.d.ts +2 -2
- package/dist/types/components/ui/GInput/types.d.ts +2 -2
- package/dist/types/components/ui/GLoading/GLoading.vue.d.ts +30 -36
- package/dist/types/components/ui/GLoading/types.d.ts +9 -9
- package/dist/types/components/ui/GMenu/GMenu.vue.d.ts +19 -25
- package/dist/types/components/ui/GMenu/GSubmenu.vue.d.ts +16 -259
- package/dist/types/components/ui/GMenu/index.d.ts +1 -1
- package/dist/types/components/ui/GMenuItem/GMenuItem.vue.d.ts +89 -95
- package/dist/types/components/ui/GMenuItem/types.d.ts +32 -32
- package/dist/types/components/ui/GModal/GModal.vue.d.ts +139 -145
- package/dist/types/components/ui/GModal/index.d.ts +2 -2
- package/dist/types/components/ui/GModal/types.d.ts +48 -48
- package/dist/types/components/ui/GNavList/GNavGroup.vue.d.ts +11 -9
- package/dist/types/components/ui/GNavList/GNavItem.vue.d.ts +16 -14
- package/dist/types/components/ui/GNavList/GNavList.vue.d.ts +24 -22
- package/dist/types/components/ui/GNavList/context.d.ts +2 -2
- package/dist/types/components/ui/GNavList/groupContext.d.ts +1 -1
- package/dist/types/components/ui/GNavList/index.d.ts +4 -4
- package/dist/types/components/ui/GNavList/types.d.ts +27 -27
- package/dist/types/components/ui/GNavbar/GNavbar.vue.d.ts +16 -14
- package/dist/types/components/ui/GNavbar/GNavbarItem.vue.d.ts +20 -18
- package/dist/types/components/ui/GNavbar/GNavbarMenu.vue.d.ts +20 -18
- package/dist/types/components/ui/GNavbar/GNavbarSubItem.vue.d.ts +14 -12
- package/dist/types/components/ui/GNavbar/context.d.ts +2 -2
- package/dist/types/components/ui/GNavbar/index.d.ts +5 -5
- package/dist/types/components/ui/GNavbar/menuContext.d.ts +1 -1
- package/dist/types/components/ui/GNavbar/types.d.ts +30 -30
- package/dist/types/components/ui/GProgress/GProgress.vue.d.ts +83 -91
- package/dist/types/components/ui/GProgress/index.d.ts +1 -1
- package/dist/types/components/ui/GProgress/types.d.ts +16 -16
- package/dist/types/components/ui/GQuickActions/GQuickActions.vue.d.ts +26 -32
- package/dist/types/components/ui/GQuickActions/index.d.ts +2 -2
- package/dist/types/components/ui/GQuickActions/types.d.ts +3 -3
- package/dist/types/components/ui/GRadio/GRadio.vue.d.ts +12 -10
- package/dist/types/components/ui/GRadio/GRadioItem.vue.d.ts +13 -11
- package/dist/types/components/ui/GRadio/index.d.ts +3 -3
- package/dist/types/components/ui/GRadio/types.d.ts +2 -2
- package/dist/types/components/ui/GSelect/GSelect.vue.d.ts +12 -10
- package/dist/types/components/ui/GSelect/index.d.ts +2 -2
- package/dist/types/components/ui/GSelect/types.d.ts +13 -7
- package/dist/types/components/ui/GSelectItem.vue.d.ts +5 -11
- package/dist/types/components/ui/GSnackbar/GSnackbar.vue.d.ts +411 -417
- package/dist/types/components/ui/GSnackbar/index.d.ts +2 -2
- package/dist/types/components/ui/GSnackbar/types.d.ts +164 -164
- package/dist/types/components/ui/GSquircle/GSquircle.vue.d.ts +8 -14
- package/dist/types/components/ui/GSquircle/index.d.ts +1 -1
- package/dist/types/components/ui/GSquircle/types.d.ts +5 -5
- package/dist/types/components/ui/GStepper/GStepItem.vue.d.ts +18 -0
- package/dist/types/components/ui/GStepper/GStepPanel.vue.d.ts +78 -0
- package/dist/types/components/ui/GStepper/GStepper.vue.d.ts +65 -0
- package/dist/types/components/ui/GStepper/GStepperActions.vue.d.ts +24 -0
- package/dist/types/components/ui/GStepper/context.d.ts +42 -0
- package/dist/types/components/ui/GStepper/index.d.ts +4 -0
- package/dist/types/components/ui/GStepper/types.d.ts +708 -0
- package/dist/types/components/ui/GSwitch/GSwitch.vue.d.ts +10 -211
- package/dist/types/components/ui/GSwitch/index.d.ts +2 -2
- package/dist/types/components/ui/GSwitch/types.d.ts +1 -1
- package/dist/types/components/ui/GTable/GTable.vue.d.ts +63 -61
- package/dist/types/components/ui/GTable/GTableBody.vue.d.ts +8 -6
- package/dist/types/components/ui/GTable/GTableCell.vue.d.ts +9 -7
- package/dist/types/components/ui/GTable/GTableExpandedRow.vue.d.ts +10 -8
- package/dist/types/components/ui/GTable/GTableHead.vue.d.ts +9 -7
- package/dist/types/components/ui/GTable/GTableRow.vue.d.ts +8 -6
- package/dist/types/components/ui/GTable/context.d.ts +1 -1
- package/dist/types/components/ui/GTable/index.d.ts +3 -3
- package/dist/types/components/ui/GTable/types.d.ts +217 -213
- package/dist/types/components/ui/GTable/useTable.d.ts +3 -3
- package/dist/types/components/ui/GTable/useTableExpansion.d.ts +1 -1
- package/dist/types/components/ui/GTable/useTableSpans.d.ts +1 -1
- package/dist/types/components/ui/GTabs/GTab.vue.d.ts +14 -12
- package/dist/types/components/ui/GTabs/GTabList.vue.d.ts +3 -9
- package/dist/types/components/ui/GTabs/GTabPanel.vue.d.ts +9 -7
- package/dist/types/components/ui/GTabs/GTabPanels.vue.d.ts +6 -12
- package/dist/types/components/ui/GTabs/GTabs.vue.d.ts +24 -22
- package/dist/types/components/ui/GTabs/context.d.ts +3 -3
- package/dist/types/components/ui/GTabs/index.d.ts +6 -6
- package/dist/types/components/ui/GTabs/types.d.ts +24 -24
- package/dist/types/components/ui/GText/GText.vue.d.ts +5 -10
- package/dist/types/components/ui/GText/index.d.ts +1 -1
- package/dist/types/components/ui/GText/types.d.ts +1 -1
- package/dist/types/components/ui/GTextarea/GTextarea.vue.d.ts +14 -215
- package/dist/types/components/ui/GTextarea/index.d.ts +2 -2
- package/dist/types/components/ui/GTextarea/types.d.ts +2 -2
- package/dist/types/components/ui/GToggleButton/GToggleButton.vue.d.ts +10 -760
- package/dist/types/components/ui/GToggleButton/index.d.ts +2 -2
- package/dist/types/components/ui/GToggleButton/types.d.ts +127 -127
- package/dist/types/components/ui/GTooltip/GTooltip.vue.d.ts +79 -85
- package/dist/types/components/ui/GTooltip/index.d.ts +1 -1
- package/dist/types/components/ui/GTooltip/types.d.ts +37 -37
- package/dist/types/directives/gradientIcon.d.ts +1 -1
- package/dist/types/directives/gradientText.d.ts +2 -2
- package/dist/types/directives/index.d.ts +13 -13
- package/dist/types/directives/loading.d.ts +5 -5
- package/dist/types/directives/mask.d.ts +1 -1
- package/dist/types/directives/ripple.d.ts +1 -1
- package/dist/types/directives/specular.d.ts +1 -1
- package/dist/types/index.d.ts +13 -17
- package/dist/types/plugin.d.ts +15 -0
- package/dist/types/services/context.d.ts +8 -0
- package/dist/types/services/index.d.ts +4 -2
- package/dist/types/services/runtime.d.ts +5 -0
- package/dist/types/services/useLoading.d.ts +5 -2
- package/dist/types/services/useSnackbar.d.ts +5 -2
- package/dist/types/ssr/index.d.ts +2 -0
- package/dist/types/ssr/use/appScopedState.d.ts +1 -0
- package/dist/types/ssr/use/clientLifecycle.d.ts +2 -0
- package/dist/types/ssr/use/hydration.d.ts +2 -0
- package/dist/types/ssr/use/id.d.ts +1 -0
- package/dist/types/ssr/use/index.d.ts +6 -0
- package/dist/types/ssr/use/teleport.d.ts +11 -0
- package/dist/types/ssr/use/viewport.d.ts +12 -0
- package/dist/types/ssr/utils/environment.d.ts +11 -0
- package/dist/types/ssr/utils/head.d.ts +28 -0
- package/dist/types/ssr/utils/index.d.ts +3 -0
- package/dist/types/ssr/utils/mount.d.ts +21 -0
- package/dist/types/theme/color.d.ts +1 -1
- package/dist/types/theme/colorSystem.d.ts +3 -3
- package/dist/types/theme/cssTokens.d.ts +3 -2
- package/dist/types/theme/default.d.ts +13 -6
- package/dist/types/theme/index.d.ts +7 -6
- package/dist/types/theme/palette.d.ts +1 -1
- package/dist/types/theme/scheme.d.ts +1 -1
- package/dist/types/theme/types.d.ts +1 -1
- package/dist/types/types/CommonTypes.d.ts +2 -2
- package/dist/types/use/PLA.d.ts +1 -1
- package/dist/types/use/actionProps.d.ts +15 -15
- package/dist/types/use/actionSurface.d.ts +45 -45
- package/dist/types/use/appendTarget.d.ts +2 -1
- package/dist/types/use/breakpoints/index.d.ts +10 -1
- package/dist/types/use/check/booleanControl.d.ts +13 -13
- package/dist/types/use/check/index.d.ts +6 -6
- package/dist/types/use/check/optionGroup.d.ts +7 -7
- package/dist/types/use/check/types.d.ts +55 -55
- package/dist/types/use/color.d.ts +2 -2
- package/dist/types/use/colorResolver.d.ts +2 -2
- package/dist/types/use/density.d.ts +16 -0
- package/dist/types/use/expansion/controller.d.ts +1 -1
- package/dist/types/use/expansion/di.d.ts +1 -1
- package/dist/types/use/expansion/index.d.ts +3 -3
- package/dist/types/use/floating.d.ts +18 -18
- package/dist/types/use/floatingLayer.d.ts +1 -1
- package/dist/types/use/form/control.d.ts +1 -1
- package/dist/types/use/form/fieldKeyboard.d.ts +19 -0
- package/dist/types/use/form/props.d.ts +69 -17
- package/dist/types/use/form/textFieldComponent.d.ts +1 -3
- package/dist/types/use/form/textFieldControl.d.ts +13 -5
- package/dist/types/use/glass.d.ts +2 -2
- package/dist/types/use/gradient.d.ts +81 -81
- package/dist/types/use/gradientGlow.d.ts +7 -7
- package/dist/types/use/gradientMaterial.d.ts +3 -3
- package/dist/types/use/gradientRuntime.d.ts +2 -2
- package/dist/types/use/gradientRuntimeRegistry.d.ts +1 -1
- package/dist/types/use/gradientSurface.d.ts +5 -5
- package/dist/types/use/group/di.d.ts +1 -1
- package/dist/types/use/group/groupController.d.ts +1 -1
- package/dist/types/use/index.d.ts +23 -13
- package/dist/types/use/input/index.d.ts +4 -4
- package/dist/types/use/input/props.d.ts +84 -45
- package/dist/types/use/layerStack.d.ts +3 -3
- package/dist/types/use/material.d.ts +9 -9
- package/dist/types/use/materialSurface.d.ts +103 -103
- package/dist/types/use/menu.d.ts +5 -5
- package/dist/types/use/menuContext.d.ts +1 -1
- package/dist/types/use/navigation/controller.d.ts +14 -0
- package/dist/types/use/navigation/index.d.ts +4 -0
- package/dist/types/use/navigation/item.d.ts +9 -0
- package/dist/types/use/navigation/keyboard.d.ts +4 -0
- package/dist/types/use/navigation/types.d.ts +42 -0
- package/dist/types/use/open.d.ts +1 -1
- package/dist/types/use/overlay.d.ts +18 -18
- package/dist/types/use/placement.d.ts +2 -2
- package/dist/types/use/px.d.ts +1 -1
- package/dist/types/use/select/comboboxController.d.ts +36 -0
- package/dist/types/use/select/commit.d.ts +23 -0
- package/dist/types/use/select/controller.d.ts +10 -5
- package/dist/types/use/select/creatable.d.ts +18 -0
- package/dist/types/use/select/fieldControl.d.ts +59 -0
- package/dist/types/use/select/filter.d.ts +14 -0
- package/dist/types/use/select/items.d.ts +1 -1
- package/dist/types/use/select/listboxKeyboard.d.ts +9 -0
- package/dist/types/use/select/menuItems.d.ts +2 -2
- package/dist/types/use/select/menuSlot.d.ts +2 -2
- package/dist/types/use/select/modelFallbackItems.d.ts +12 -0
- package/dist/types/use/select/search.d.ts +14 -0
- package/dist/types/use/select/searchFieldControl.d.ts +24 -0
- package/dist/types/use/select/selection.d.ts +1 -1
- package/dist/types/use/select/selectionController.d.ts +1 -1
- package/dist/types/use/select/selectionSummary.d.ts +2 -1
- package/dist/types/use/select/tokenInputKeyboard.d.ts +11 -0
- package/dist/types/use/selected.d.ts +1 -1
- package/dist/types/use/size.d.ts +2 -2
- package/dist/types/use/state.d.ts +1 -1
- package/dist/types/use/stateIcon.d.ts +9 -0
- package/dist/types/use/stepper/controller.d.ts +20 -0
- package/dist/types/use/stepper/index.d.ts +1 -0
- package/dist/types/use/surface.d.ts +26 -26
- package/dist/types/use/surfaceColor.d.ts +3 -3
- package/dist/types/use/surfaceMaterial.d.ts +8 -8
- package/dist/types/use/textarea/index.d.ts +2 -2
- package/dist/types/use/textarea/props.d.ts +82 -43
- package/dist/types/use/transition.d.ts +5 -5
- package/dist/types/use/variant.d.ts +1 -1
- package/dist/types/utils/createComponentId.d.ts +1 -1
- package/dist/types/utils/createId.d.ts +1 -1
- package/dist/types-BItiZqNo.cjs +1 -0
- package/dist/types-BPZPPi6n.cjs +1 -0
- package/dist/types-BZSR5qEq.js +69 -0
- package/dist/types-CAh-uxuw.js +113 -0
- package/dist/types-Ce2Qoz6Q.js +90 -0
- package/dist/types-DGs8vjIX.cjs +1 -0
- package/dist/types-D_HgEWtj.js +95 -0
- package/dist/types-DmWFHzOk.js +80 -0
- package/dist/types-DsVDdHxP.cjs +1 -0
- package/dist/types-cjs/componentNames.d.cts +5 -0
- package/dist/types-cjs/components/GGroup/GGroup.vue.d.cts +24 -0
- package/dist/types-cjs/components/GGroup/index.d.cts +1 -0
- package/dist/types-cjs/components/GGroup/types.d.cts +0 -0
- package/dist/types-cjs/components/index.d.cts +55 -0
- package/dist/types-cjs/components/transitions/GExpandTransition.vue.d.cts +234 -0
- package/dist/types-cjs/components/transitions/GTransition.vue.d.cts +234 -0
- package/dist/types-cjs/components/transitions/GTransitionGroup.vue.d.cts +218 -0
- package/dist/types-cjs/components/transitions/TransitionExpansion.vue.d.cts +18 -0
- package/dist/types-cjs/components/transitions/TransitionOverlay.vue.d.cts +15 -0
- package/dist/types-cjs/components/transitions/TransitionRotate.vue.d.cts +11 -0
- package/dist/types-cjs/components/transitions/TransitionScale.vue.d.cts +15 -0
- package/dist/types-cjs/components/transitions/TransitionStaggerTranslate.vue.d.cts +11 -0
- package/dist/types-cjs/components/transitions/index.d.cts +3 -0
- package/dist/types-cjs/components/ui/BaseFloating/BaseFloating.vue.d.cts +237 -0
- package/dist/types-cjs/components/ui/BaseFloating/index.d.cts +1 -0
- package/dist/types-cjs/components/ui/BaseFloating/types.d.cts +0 -0
- package/dist/types-cjs/components/ui/BaseOverlay/BaseOverlay.vue.d.cts +228 -0
- package/dist/types-cjs/components/ui/BaseOverlay/index.d.cts +1 -0
- package/dist/types-cjs/components/ui/BaseOverlay/types.d.cts +108 -0
- package/dist/types-cjs/components/ui/GAction/GAction.vue.d.cts +2 -0
- package/dist/types-cjs/components/ui/GAction/index.d.cts +1 -0
- package/dist/types-cjs/components/ui/GAction/types.d.cts +33 -0
- package/dist/types-cjs/components/ui/GAlert/GAlert.vue.d.cts +756 -0
- package/dist/types-cjs/components/ui/GAlert/index.d.cts +1 -0
- package/dist/types-cjs/components/ui/GAlert/types.d.cts +400 -0
- package/dist/types-cjs/components/ui/GAside/GAside.vue.d.cts +50 -0
- package/dist/types-cjs/components/ui/GAside/GAsideGroup.vue.d.cts +30 -0
- package/dist/types-cjs/components/ui/GAside/GAsideItem.vue.d.cts +37 -0
- package/dist/types-cjs/components/ui/GAside/context.d.cts +15 -0
- package/dist/types-cjs/components/ui/GAside/groupContext.d.cts +7 -0
- package/dist/types-cjs/components/ui/GAside/index.d.cts +4 -0
- package/dist/types-cjs/components/ui/GAside/types.d.cts +273 -0
- package/dist/types-cjs/components/ui/GAvatar/GAvatar.vue.d.cts +867 -0
- package/dist/types-cjs/components/ui/GAvatar/GAvatarGroup.vue.d.cts +188 -0
- package/dist/types-cjs/components/ui/GAvatar/index.d.cts +3 -0
- package/dist/types-cjs/components/ui/GAvatar/types.d.cts +585 -0
- package/dist/types-cjs/components/ui/GBadge/GBadge.vue.d.cts +786 -0
- package/dist/types-cjs/components/ui/GBadge/index.d.cts +2 -0
- package/dist/types-cjs/components/ui/GBadge/types.d.cts +422 -0
- package/dist/types-cjs/components/ui/GButton/GButton.vue.d.cts +820 -0
- package/dist/types-cjs/components/ui/GButton/index.d.cts +2 -0
- package/dist/types-cjs/components/ui/GButton/types.d.cts +457 -0
- package/dist/types-cjs/components/ui/GCard/GCard.vue.d.cts +943 -0
- package/dist/types-cjs/components/ui/GCard/index.d.cts +2 -0
- package/dist/types-cjs/components/ui/GCard/types.d.cts +519 -0
- package/dist/types-cjs/components/ui/GCheckControl/GCheckControl.vue.d.cts +242 -0
- package/dist/types-cjs/components/ui/GCheckControl/GCheckGroup.vue.d.cts +184 -0
- package/dist/types-cjs/components/ui/GCheckControl/GCheckIndicator.vue.d.cts +28 -0
- package/dist/types-cjs/components/ui/GCheckControl/index.d.cts +3 -0
- package/dist/types-cjs/components/ui/GCheckbox/GCheckbox.vue.d.cts +27 -0
- package/dist/types-cjs/components/ui/GCheckbox/index.d.cts +2 -0
- package/dist/types-cjs/components/ui/GCheckbox/types.d.cts +1 -0
- package/dist/types-cjs/components/ui/GCheckboxGroup/GCheckboxGroup.vue.d.cts +26 -0
- package/dist/types-cjs/components/ui/GCheckboxGroup/index.d.cts +2 -0
- package/dist/types-cjs/components/ui/GCheckboxGroup/types.d.cts +12 -0
- package/dist/types-cjs/components/ui/GChip/GChip.vue.d.cts +731 -0
- package/dist/types-cjs/components/ui/GChip/index.d.cts +2 -0
- package/dist/types-cjs/components/ui/GChip/types.d.cts +403 -0
- package/dist/types-cjs/components/ui/GCombobox/GCombobox.vue.d.cts +39 -0
- package/dist/types-cjs/components/ui/GCombobox/index.d.cts +2 -0
- package/dist/types-cjs/components/ui/GCombobox/types.d.cts +59 -0
- package/dist/types-cjs/components/ui/GDivider/GDivider.vue.d.cts +959 -0
- package/dist/types-cjs/components/ui/GDivider/index.d.cts +2 -0
- package/dist/types-cjs/components/ui/GDivider/types.d.cts +518 -0
- package/dist/types-cjs/components/ui/GDrawer/GDrawer.vue.d.cts +429 -0
- package/dist/types-cjs/components/ui/GDrawer/index.d.cts +2 -0
- package/dist/types-cjs/components/ui/GDrawer/types.d.cts +205 -0
- package/dist/types-cjs/components/ui/GDropdown/GDropdown.vue.d.cts +418 -0
- package/dist/types-cjs/components/ui/GDropdown/index.d.cts +1 -0
- package/dist/types-cjs/components/ui/GDropdown/types.d.cts +208 -0
- package/dist/types-cjs/components/ui/GDropdownGroup/GDropdownGroup.vue.d.cts +23 -0
- package/dist/types-cjs/components/ui/GDropdownGroup/index.d.cts +2 -0
- package/dist/types-cjs/components/ui/GDropdownGroup/types.d.cts +10 -0
- package/dist/types-cjs/components/ui/GDropdownSelect/GDropdownSelect.vue.d.cts +19 -0
- package/dist/types-cjs/components/ui/GDropdownSelect/index.d.cts +0 -0
- package/dist/types-cjs/components/ui/GDropdownSelect/types.d.cts +14 -0
- package/dist/types-cjs/components/ui/GExpansion/GExpansion.vue.d.cts +110 -0
- package/dist/types-cjs/components/ui/GExpansion/index.d.cts +1 -0
- package/dist/types-cjs/components/ui/GExpansion/types.d.cts +479 -0
- package/dist/types-cjs/components/ui/GExpansionGroup/GExpansionGroup.vue.d.cts +34 -0
- package/dist/types-cjs/components/ui/GExpansionGroup/index.d.cts +1 -0
- package/dist/types-cjs/components/ui/GExpansionGroup/types.d.cts +61 -0
- package/dist/types-cjs/components/ui/GFAB/GFAB.vue.d.cts +415 -0
- package/dist/types-cjs/components/ui/GFAB/index.d.cts +1 -0
- package/dist/types-cjs/components/ui/GFAB/types.d.cts +247 -0
- package/dist/types-cjs/components/ui/GFieldBase/GFieldBase.vue.d.cts +312 -0
- package/dist/types-cjs/components/ui/GFieldBase/props.d.cts +256 -0
- package/dist/types-cjs/components/ui/GForm/GForm.vue.d.cts +148 -0
- package/dist/types-cjs/components/ui/GForm/index.d.cts +2 -0
- package/dist/types-cjs/components/ui/GForm/types.d.cts +107 -0
- package/dist/types-cjs/components/ui/GGradient/GGradient.vue.d.cts +362 -0
- package/dist/types-cjs/components/ui/GGradient/GGradientBorderLayer.vue.d.cts +17 -0
- package/dist/types-cjs/components/ui/GGradient/index.d.cts +2 -0
- package/dist/types-cjs/components/ui/GGradient/types.d.cts +23 -0
- package/dist/types-cjs/components/ui/GGradientMaterial/GGradientMaterial.vue.d.cts +251 -0
- package/dist/types-cjs/components/ui/GGradientMaterial/index.d.cts +2 -0
- package/dist/types-cjs/components/ui/GGradientMaterial/types.d.cts +140 -0
- package/dist/types-cjs/components/ui/GIcon/GIcon.vue.d.cts +31 -0
- package/dist/types-cjs/components/ui/GIcon/index.d.cts +2 -0
- package/dist/types-cjs/components/ui/GIcon/sets/MdiIconSet.vue.d.cts +3 -0
- package/dist/types-cjs/components/ui/GIcon/types.d.cts +24 -0
- package/dist/types-cjs/components/ui/GIcon.vue.d.cts +6 -0
- package/dist/types-cjs/components/ui/GImg/GImg.vue.d.cts +266 -0
- package/dist/types-cjs/components/ui/GImg/index.d.cts +2 -0
- package/dist/types-cjs/components/ui/GImg/types.d.cts +174 -0
- package/dist/types-cjs/components/ui/GInput/GInput.vue.d.cts +33 -0
- package/dist/types-cjs/components/ui/GInput/SwitchPassword.vue.d.cts +9 -0
- package/dist/types-cjs/components/ui/GInput/index.d.cts +2 -0
- package/dist/types-cjs/components/ui/GInput/types.d.cts +8 -0
- package/dist/types-cjs/components/ui/GLoading/GLoading.vue.d.cts +128 -0
- package/dist/types-cjs/components/ui/GLoading/types.d.cts +63 -0
- package/dist/types-cjs/components/ui/GMenu/GMenu.vue.d.cts +87 -0
- package/dist/types-cjs/components/ui/GMenu/GSubmenu.vue.d.cts +26 -0
- package/dist/types-cjs/components/ui/GMenu/index.d.cts +1 -0
- package/dist/types-cjs/components/ui/GMenu/types.d.cts +0 -0
- package/dist/types-cjs/components/ui/GMenuItem/GMenuItem.vue.d.cts +175 -0
- package/dist/types-cjs/components/ui/GMenuItem/index.d.cts +0 -0
- package/dist/types-cjs/components/ui/GMenuItem/types.d.cts +93 -0
- package/dist/types-cjs/components/ui/GModal/GModal.vue.d.cts +420 -0
- package/dist/types-cjs/components/ui/GModal/index.d.cts +2 -0
- package/dist/types-cjs/components/ui/GModal/types.d.cts +198 -0
- package/dist/types-cjs/components/ui/GNavList/GNavGroup.vue.d.cts +30 -0
- package/dist/types-cjs/components/ui/GNavList/GNavItem.vue.d.cts +37 -0
- package/dist/types-cjs/components/ui/GNavList/GNavList.vue.d.cts +42 -0
- package/dist/types-cjs/components/ui/GNavList/context.d.cts +15 -0
- package/dist/types-cjs/components/ui/GNavList/groupContext.d.cts +7 -0
- package/dist/types-cjs/components/ui/GNavList/index.d.cts +4 -0
- package/dist/types-cjs/components/ui/GNavList/types.d.cts +249 -0
- package/dist/types-cjs/components/ui/GNavbar/GNavbar.vue.d.cts +36 -0
- package/dist/types-cjs/components/ui/GNavbar/GNavbarItem.vue.d.cts +41 -0
- package/dist/types-cjs/components/ui/GNavbar/GNavbarMenu.vue.d.cts +43 -0
- package/dist/types-cjs/components/ui/GNavbar/GNavbarSubItem.vue.d.cts +42 -0
- package/dist/types-cjs/components/ui/GNavbar/context.d.cts +17 -0
- package/dist/types-cjs/components/ui/GNavbar/index.d.cts +5 -0
- package/dist/types-cjs/components/ui/GNavbar/menuContext.d.cts +9 -0
- package/dist/types-cjs/components/ui/GNavbar/types.d.cts +330 -0
- package/dist/types-cjs/components/ui/GProgress/GProgress.vue.d.cts +194 -0
- package/dist/types-cjs/components/ui/GProgress/index.d.cts +1 -0
- package/dist/types-cjs/components/ui/GProgress/types.d.cts +121 -0
- package/dist/types-cjs/components/ui/GQuickActions/GQuickActions.vue.d.cts +40 -0
- package/dist/types-cjs/components/ui/GQuickActions/index.d.cts +2 -0
- package/dist/types-cjs/components/ui/GQuickActions/types.d.cts +19 -0
- package/dist/types-cjs/components/ui/GRadio/GRadio.vue.d.cts +26 -0
- package/dist/types-cjs/components/ui/GRadio/GRadioItem.vue.d.cts +34 -0
- package/dist/types-cjs/components/ui/GRadio/index.d.cts +3 -0
- package/dist/types-cjs/components/ui/GRadio/types.d.cts +12 -0
- package/dist/types-cjs/components/ui/GSelect/GSelect.vue.d.cts +31 -0
- package/dist/types-cjs/components/ui/GSelect/index.d.cts +2 -0
- package/dist/types-cjs/components/ui/GSelect/types.d.cts +38 -0
- package/dist/types-cjs/components/ui/GSelectItem.vue.d.cts +43 -0
- package/dist/types-cjs/components/ui/GSnackbar/GSnackbar.vue.d.cts +986 -0
- package/dist/types-cjs/components/ui/GSnackbar/index.d.cts +2 -0
- package/dist/types-cjs/components/ui/GSnackbar/types.d.cts +515 -0
- package/dist/types-cjs/components/ui/GSquircle/GSquircle.vue.d.cts +19 -0
- package/dist/types-cjs/components/ui/GSquircle/index.d.cts +1 -0
- package/dist/types-cjs/components/ui/GSquircle/types.d.cts +20 -0
- package/dist/types-cjs/components/ui/GStepper/GStepItem.vue.d.cts +18 -0
- package/dist/types-cjs/components/ui/GStepper/GStepPanel.vue.d.cts +78 -0
- package/dist/types-cjs/components/ui/GStepper/GStepper.vue.d.cts +65 -0
- package/dist/types-cjs/components/ui/GStepper/GStepperActions.vue.d.cts +24 -0
- package/dist/types-cjs/components/ui/GStepper/context.d.cts +42 -0
- package/dist/types-cjs/components/ui/GStepper/index.d.cts +4 -0
- package/dist/types-cjs/components/ui/GStepper/types.d.cts +708 -0
- package/dist/types-cjs/components/ui/GSwitch/GSwitch.vue.d.cts +27 -0
- package/dist/types-cjs/components/ui/GSwitch/index.d.cts +2 -0
- package/dist/types-cjs/components/ui/GSwitch/types.d.cts +1 -0
- package/dist/types-cjs/components/ui/GTable/GTable.vue.d.cts +193 -0
- package/dist/types-cjs/components/ui/GTable/GTableBody.vue.d.cts +71 -0
- package/dist/types-cjs/components/ui/GTable/GTableCell.vue.d.cts +37 -0
- package/dist/types-cjs/components/ui/GTable/GTableExpandedRow.vue.d.cts +27 -0
- package/dist/types-cjs/components/ui/GTable/GTableHead.vue.d.cts +32 -0
- package/dist/types-cjs/components/ui/GTable/GTableRow.vue.d.cts +42 -0
- package/dist/types-cjs/components/ui/GTable/context.d.cts +25 -0
- package/dist/types-cjs/components/ui/GTable/index.d.cts +3 -0
- package/dist/types-cjs/components/ui/GTable/types.d.cts +670 -0
- package/dist/types-cjs/components/ui/GTable/useTable.d.cts +22 -0
- package/dist/types-cjs/components/ui/GTable/useTableExpansion.d.cts +17 -0
- package/dist/types-cjs/components/ui/GTable/useTableSpans.d.cts +12 -0
- package/dist/types-cjs/components/ui/GTabs/GTab.vue.d.cts +29 -0
- package/dist/types-cjs/components/ui/GTabs/GTabList.vue.d.cts +32 -0
- package/dist/types-cjs/components/ui/GTabs/GTabPanel.vue.d.cts +22 -0
- package/dist/types-cjs/components/ui/GTabs/GTabPanels.vue.d.cts +30 -0
- package/dist/types-cjs/components/ui/GTabs/GTabs.vue.d.cts +42 -0
- package/dist/types-cjs/components/ui/GTabs/context.d.cts +28 -0
- package/dist/types-cjs/components/ui/GTabs/index.d.cts +6 -0
- package/dist/types-cjs/components/ui/GTabs/types.d.cts +214 -0
- package/dist/types-cjs/components/ui/GText/GText.vue.d.cts +12 -0
- package/dist/types-cjs/components/ui/GText/index.d.cts +1 -0
- package/dist/types-cjs/components/ui/GText/types.d.cts +8 -0
- package/dist/types-cjs/components/ui/GTextarea/GTextarea.vue.d.cts +33 -0
- package/dist/types-cjs/components/ui/GTextarea/index.d.cts +2 -0
- package/dist/types-cjs/components/ui/GTextarea/types.d.cts +6 -0
- package/dist/types-cjs/components/ui/GToggleButton/GToggleButton.vue.d.cts +27 -0
- package/dist/types-cjs/components/ui/GToggleButton/index.d.cts +2 -0
- package/dist/types-cjs/components/ui/GToggleButton/types.d.cts +425 -0
- package/dist/types-cjs/components/ui/GTooltip/GTooltip.vue.d.cts +353 -0
- package/dist/types-cjs/components/ui/GTooltip/index.d.cts +1 -0
- package/dist/types-cjs/components/ui/GTooltip/types.d.cts +179 -0
- package/dist/types-cjs/directives/gradientIcon.d.cts +4 -0
- package/dist/types-cjs/directives/gradientText.d.cts +17 -0
- package/dist/types-cjs/directives/index.d.cts +13 -0
- package/dist/types-cjs/directives/loading.d.cts +19 -0
- package/dist/types-cjs/directives/mask.d.cts +13 -0
- package/dist/types-cjs/directives/ripple.d.cts +30 -0
- package/dist/types-cjs/directives/specular.d.cts +34 -0
- package/dist/types-cjs/directives/tooltip.d.cts +10 -0
- package/dist/types-cjs/index.d.cts +17 -0
- package/dist/types-cjs/package.json +3 -0
- package/dist/types-cjs/plugin.d.cts +15 -0
- package/dist/types-cjs/services/context.d.cts +8 -0
- package/dist/types-cjs/services/index.d.cts +4 -0
- package/dist/types-cjs/services/runtime.d.cts +5 -0
- package/dist/types-cjs/services/useLoading.d.cts +11 -0
- package/dist/types-cjs/services/useSnackbar.d.cts +25 -0
- package/dist/types-cjs/ssr/index.d.cts +2 -0
- package/dist/types-cjs/ssr/use/appScopedState.d.cts +1 -0
- package/dist/types-cjs/ssr/use/clientLifecycle.d.cts +2 -0
- package/dist/types-cjs/ssr/use/hydration.d.cts +2 -0
- package/dist/types-cjs/ssr/use/id.d.cts +1 -0
- package/dist/types-cjs/ssr/use/index.d.cts +6 -0
- package/dist/types-cjs/ssr/use/teleport.d.cts +11 -0
- package/dist/types-cjs/ssr/use/viewport.d.cts +12 -0
- package/dist/types-cjs/ssr/utils/environment.d.cts +11 -0
- package/dist/types-cjs/ssr/utils/head.d.cts +28 -0
- package/dist/types-cjs/ssr/utils/index.d.cts +3 -0
- package/dist/types-cjs/ssr/utils/mount.d.cts +21 -0
- package/dist/types-cjs/theme/color.d.cts +11 -0
- package/dist/types-cjs/theme/colorSeeds.d.cts +22 -0
- package/dist/types-cjs/theme/colorSystem.d.cts +12 -0
- package/dist/types-cjs/theme/cssTokens.d.cts +8 -0
- package/dist/types-cjs/theme/default.d.cts +51 -0
- package/dist/types-cjs/theme/gradient.d.cts +1 -0
- package/dist/types-cjs/theme/index.d.cts +13 -0
- package/dist/types-cjs/theme/palette.d.cts +13 -0
- package/dist/types-cjs/theme/scheme.d.cts +2 -0
- package/dist/types-cjs/theme/types.d.cts +11 -0
- package/dist/types-cjs/types/Colors.d.cts +2 -0
- package/dist/types-cjs/types/CommonTypes.d.cts +26 -0
- package/dist/types-cjs/types/UtilityTypes.d.cts +2 -0
- package/dist/types-cjs/use/PLA.d.cts +101 -0
- package/dist/types-cjs/use/actionProps.d.cts +38 -0
- package/dist/types-cjs/use/actionSurface.d.cts +200 -0
- package/dist/types-cjs/use/appendTarget.d.cts +5 -0
- package/dist/types-cjs/use/bodyScrollLock.d.cts +2 -0
- package/dist/types-cjs/use/booleanProp.d.cts +2 -0
- package/dist/types-cjs/use/breakpoints/index.d.cts +36 -0
- package/dist/types-cjs/use/check/booleanControl.d.cts +61 -0
- package/dist/types-cjs/use/check/groupFocus.d.cts +17 -0
- package/dist/types-cjs/use/check/index.d.cts +6 -0
- package/dist/types-cjs/use/check/optionGroup.d.cts +36 -0
- package/dist/types-cjs/use/check/selection.d.cts +2 -0
- package/dist/types-cjs/use/check/types.d.cts +496 -0
- package/dist/types-cjs/use/color.d.cts +20 -0
- package/dist/types-cjs/use/colorResolver.d.cts +16 -0
- package/dist/types-cjs/use/controllableOpen.d.cts +10 -0
- package/dist/types-cjs/use/defaults.d.cts +12 -0
- package/dist/types-cjs/use/density.d.cts +16 -0
- package/dist/types-cjs/use/disabled.d.cts +12 -0
- package/dist/types-cjs/use/dropdownContext.d.cts +9 -0
- package/dist/types-cjs/use/expansion/controller.d.cts +12 -0
- package/dist/types-cjs/use/expansion/di.d.cts +5 -0
- package/dist/types-cjs/use/expansion/index.d.cts +3 -0
- package/dist/types-cjs/use/expansion/types.d.cts +11 -0
- package/dist/types-cjs/use/floating.d.cts +120 -0
- package/dist/types-cjs/use/floatingDismiss.d.cts +10 -0
- package/dist/types-cjs/use/floatingLayer.d.cts +12 -0
- package/dist/types-cjs/use/floatingTrigger.d.cts +27 -0
- package/dist/types-cjs/use/focused.d.cts +12 -0
- package/dist/types-cjs/use/form/context.d.cts +8 -0
- package/dist/types-cjs/use/form/control.d.cts +21 -0
- package/dist/types-cjs/use/form/fieldKeyboard.d.cts +19 -0
- package/dist/types-cjs/use/form/props.d.cts +121 -0
- package/dist/types-cjs/use/form/textFieldComponent.d.cts +12 -0
- package/dist/types-cjs/use/form/textFieldControl.d.cts +71 -0
- package/dist/types-cjs/use/glass.d.cts +24 -0
- package/dist/types-cjs/use/gradient.d.cts +291 -0
- package/dist/types-cjs/use/gradientGlow.d.cts +48 -0
- package/dist/types-cjs/use/gradientMaterial.d.cts +21 -0
- package/dist/types-cjs/use/gradientRuntime.d.cts +11 -0
- package/dist/types-cjs/use/gradientRuntimeRegistry.d.cts +8 -0
- package/dist/types-cjs/use/gradientSurface.d.cts +50 -0
- package/dist/types-cjs/use/group/di.d.cts +5 -0
- package/dist/types-cjs/use/group/groupController.d.cts +10 -0
- package/dist/types-cjs/use/group/types.d.cts +9 -0
- package/dist/types-cjs/use/highlighted.d.cts +12 -0
- package/dist/types-cjs/use/icon.d.cts +22 -0
- package/dist/types-cjs/use/index.d.cts +23 -0
- package/dist/types-cjs/use/input/control.d.cts +10 -0
- package/dist/types-cjs/use/input/emits.d.cts +8 -0
- package/dist/types-cjs/use/input/index.d.cts +4 -0
- package/dist/types-cjs/use/input/props.d.cts +163 -0
- package/dist/types-cjs/use/items.d.cts +20 -0
- package/dist/types-cjs/use/layerStack.d.cts +15 -0
- package/dist/types-cjs/use/mask/index.d.cts +24 -0
- package/dist/types-cjs/use/material.d.cts +113 -0
- package/dist/types-cjs/use/materialSurface.d.cts +382 -0
- package/dist/types-cjs/use/menu.d.cts +49 -0
- package/dist/types-cjs/use/menuContext.d.cts +6 -0
- package/dist/types-cjs/use/navigation/controller.d.cts +14 -0
- package/dist/types-cjs/use/navigation/index.d.cts +4 -0
- package/dist/types-cjs/use/navigation/item.d.cts +9 -0
- package/dist/types-cjs/use/navigation/keyboard.d.cts +4 -0
- package/dist/types-cjs/use/navigation/types.d.cts +42 -0
- package/dist/types-cjs/use/open.d.cts +2 -0
- package/dist/types-cjs/use/overlay.d.cts +111 -0
- package/dist/types-cjs/use/placement.d.cts +16 -0
- package/dist/types-cjs/use/px.d.cts +4 -0
- package/dist/types-cjs/use/rounded.d.cts +12 -0
- package/dist/types-cjs/use/routerLink.d.cts +10 -0
- package/dist/types-cjs/use/select/comboboxController.d.cts +36 -0
- package/dist/types-cjs/use/select/commit.d.cts +23 -0
- package/dist/types-cjs/use/select/controller.d.cts +23 -0
- package/dist/types-cjs/use/select/creatable.d.cts +18 -0
- package/dist/types-cjs/use/select/fieldControl.d.cts +59 -0
- package/dist/types-cjs/use/select/filter.d.cts +14 -0
- package/dist/types-cjs/use/select/items.d.cts +14 -0
- package/dist/types-cjs/use/select/listboxKeyboard.d.cts +9 -0
- package/dist/types-cjs/use/select/menuItems.d.cts +11 -0
- package/dist/types-cjs/use/select/menuSlot.d.cts +5 -0
- package/dist/types-cjs/use/select/modelFallbackItems.d.cts +12 -0
- package/dist/types-cjs/use/select/search.d.cts +14 -0
- package/dist/types-cjs/use/select/searchFieldControl.d.cts +24 -0
- package/dist/types-cjs/use/select/selection.d.cts +12 -0
- package/dist/types-cjs/use/select/selectionController.d.cts +19 -0
- package/dist/types-cjs/use/select/selectionSummary.d.cts +8 -0
- package/dist/types-cjs/use/select/tokenInputKeyboard.d.cts +11 -0
- package/dist/types-cjs/use/select/types.d.cts +24 -0
- package/dist/types-cjs/use/selected.d.cts +17 -0
- package/dist/types-cjs/use/selectionModel.d.cts +19 -0
- package/dist/types-cjs/use/size.d.cts +16 -0
- package/dist/types-cjs/use/slots.d.cts +15 -0
- package/dist/types-cjs/use/state.d.cts +13 -0
- package/dist/types-cjs/use/stateIcon.d.cts +9 -0
- package/dist/types-cjs/use/stepper/controller.d.cts +20 -0
- package/dist/types-cjs/use/stepper/index.d.cts +1 -0
- package/dist/types-cjs/use/surface.d.cts +128 -0
- package/dist/types-cjs/use/surfaceColor.d.cts +19 -0
- package/dist/types-cjs/use/surfaceMaterial.d.cts +45 -0
- package/dist/types-cjs/use/tagName.d.cts +47 -0
- package/dist/types-cjs/use/textarea/index.d.cts +2 -0
- package/dist/types-cjs/use/textarea/props.d.cts +144 -0
- package/dist/types-cjs/use/transition.d.cts +156 -0
- package/dist/types-cjs/use/variant.d.cts +16 -0
- package/dist/types-cjs/use/visibleProps.d.cts +1 -0
- package/dist/types-cjs/use/zIndex.d.cts +10 -0
- package/dist/types-cjs/utils/camelToKebabCase.d.cts +1 -0
- package/dist/types-cjs/utils/createComponentId.d.cts +1 -0
- package/dist/types-cjs/utils/createId.d.cts +1 -0
- package/dist/types-cjs/utils/propsFactory.d.cts +29 -0
- package/dist/types-l8OJZAJz.cjs +1 -0
- package/dist/use.cjs +1 -1
- package/dist/use.mjs +79 -42
- package/dist/useSnackbar-CGt0lJDk.js +245 -0
- package/dist/useSnackbar-CRUtXt4_.cjs +1 -0
- package/dist/variant-BvBpmTET.cjs +1 -0
- package/dist/variant-Fpx1q_TY.js +15 -0
- package/dist/viewport-BhvdzcLi.cjs +1 -0
- package/dist/viewport-DhX6inI4.js +11 -0
- package/package.json +358 -28
- package/dist/GLoading.vue_vue_type_style_index_0_lang-COggAM7a.js +0 -468
- package/dist/GLoading.vue_vue_type_style_index_0_lang-CoPHejAL.cjs +0 -1
- package/dist/GSwitch.vue_vue_type_script_setup_true_lang-CRlkCyW_.js +0 -7031
- package/dist/GSwitch.vue_vue_type_script_setup_true_lang-DZXv1j__.cjs +0 -1
- package/dist/camelToKebabCase-BQDotaQm.cjs +0 -316
- package/dist/camelToKebabCase-BWbQb81D.js +0 -3783
- package/dist/default--73FwpwZ.cjs +0 -4
- package/dist/default-DlsS6GI_.js +0 -58
- package/dist/defaults-BlTdRhHs.cjs +0 -1
- package/dist/defaults-DMi34V8q.js +0 -51
- package/dist/index-B3_n44N_.cjs +0 -1
- package/dist/index-BtCLucTD.js +0 -66
- package/dist/index-Cs3XQ3JB.js +0 -97
- package/dist/index-DN5ngVtp.cjs +0 -1
- package/dist/mask-BqOamrcF.js +0 -936
- package/dist/mask-ObMqNEfF.cjs +0 -1
- package/dist/materialSurface-CbOpfFGO.js +0 -634
- package/dist/materialSurface-CjhWd_yD.cjs +0 -1
- package/dist/scheme-CZ0a0X5e.cjs +0 -299
- package/dist/scheme-Dqwdqg6N.js +0 -1405
- package/dist/surface-DImNM7I1.js +0 -291
- package/dist/surface-_J0t7c3m.cjs +0 -1
- package/dist/useSnackbar-D60dFSV1.cjs +0 -1
- package/dist/useSnackbar-us11nXny.js +0 -922
|
@@ -0,0 +1,316 @@
|
|
|
1
|
+
"use strict";const COLOR_SEEDS={red:"#F44336",pink:"#E91E63",purple:"#9C27B0",deepPurple:"#673AB7",indigo:"#3F51B5",blue:"#2196F3",lightBlue:"#03A9F4",cyan:"#00BCD4",teal:"#009688",green:"#4CAF50",lightGreen:"#8BC34A",lime:"#CDDC39",yellow:"#FFEB3B",amber:"#FFC107",orange:"#FF9800",deepOrange:"#FF5722",brown:"#795548",grey:"#9E9E9E",blueGrey:"#607D8B"},clamp=(value,min=0,max=1)=>Math.min(max,Math.max(min,value)),toLinear=value=>{const channel=value/255;return channel<=.04045?channel/12.92:((channel+.055)/1.055)**2.4},parseHex=value=>{const hex=value.slice(1),normalized=hex.length===3||hex.length===4?hex.slice(0,3).split("").map(character=>character.repeat(2)).join(""):hex.slice(0,6);return normalized.length!==6||!/^[\da-f]{6}$/i.test(normalized)?null:{r:parseInt(normalized.slice(0,2),16),g:parseInt(normalized.slice(2,4),16),b:parseInt(normalized.slice(4,6),16)}},parseRgb=value=>{const match=value.match(/^rgba?\(\s*([\d.]+)[,\s]+([\d.]+)[,\s]+([\d.]+)(?:\s*[,/]\s*[\d.]+%?)?\s*\)$/i);return match?{r:clamp(Number(match[1]),0,255),g:clamp(Number(match[2]),0,255),b:clamp(Number(match[3]),0,255)}:null},parseColor=input=>{if(typeof input=="number"){const value2=input&16777215;return{r:value2>>16&255,g:value2>>8&255,b:value2&255}}const value=input.trim();return value.startsWith("#")?parseHex(value):value.toLowerCase().startsWith("rgb")?parseRgb(value):null},rgbToHex=({r,g,b})=>`#${[r,g,b].map(channel=>Math.round(channel).toString(16).padStart(2,"0")).join("")}`,rgbToChannels=({r,g,b})=>`${Math.round(r)}, ${Math.round(g)}, ${Math.round(b)}`,colorToHex=(input,fallback)=>{const color=parseColor(input)??parseColor(fallback);if(!color)throw new Error(`Invalid fallback color: ${fallback}`);return rgbToHex(color)},relativeLuminance=color=>.2126*toLinear(color.r)+.7152*toLinear(color.g)+.0722*toLinear(color.b),getContrastingColor=color=>{const parsed=parseColor(color);if(!parsed)return"#ffffff";const luminance=relativeLuminance(parsed),whiteContrast=1.05/(luminance+.05),darkContrast=(luminance+.05)/.055;return whiteContrast>=darkContrast?"#ffffff":"#0d0d12"};/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2021 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/function signum(num){return num<0?-1:num===0?0:1}function lerp(start,stop,amount){return(1-amount)*start+amount*stop}function clampInt(min,max,input){return input<min?min:input>max?max:input}function clampDouble(min,max,input){return input<min?min:input>max?max:input}function sanitizeDegreesDouble(degrees){return degrees=degrees%360,degrees<0&&(degrees=degrees+360),degrees}function rotationDirection(from,to){return sanitizeDegreesDouble(to-from)<=180?1:-1}function differenceDegrees(a,b){return 180-Math.abs(Math.abs(a-b)-180)}function matrixMultiply(row,matrix){const a=row[0]*matrix[0][0]+row[1]*matrix[0][1]+row[2]*matrix[0][2],b=row[0]*matrix[1][0]+row[1]*matrix[1][1]+row[2]*matrix[1][2],c=row[0]*matrix[2][0]+row[1]*matrix[2][1]+row[2]*matrix[2][2];return[a,b,c]}/**
|
|
17
|
+
* @license
|
|
18
|
+
* Copyright 2021 Google LLC
|
|
19
|
+
*
|
|
20
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
21
|
+
* you may not use this file except in compliance with the License.
|
|
22
|
+
* You may obtain a copy of the License at
|
|
23
|
+
*
|
|
24
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
25
|
+
*
|
|
26
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
27
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
28
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
29
|
+
* See the License for the specific language governing permissions and
|
|
30
|
+
* limitations under the License.
|
|
31
|
+
*/const SRGB_TO_XYZ=[[.41233895,.35762064,.18051042],[.2126,.7152,.0722],[.01932141,.11916382,.95034478]],XYZ_TO_SRGB=[[3.2413774792388685,-1.5376652402851851,-.49885366846268053],[-.9691452513005321,1.8758853451067872,.04156585616912061],[.05562093689691305,-.20395524564742123,1.0571799111220335]],WHITE_POINT_D65=[95.047,100,108.883];function argbFromRgb(red,green,blue){return(255<<24|(red&255)<<16|(green&255)<<8|blue&255)>>>0}function argbFromLinrgb(linrgb){const r=delinearized(linrgb[0]),g=delinearized(linrgb[1]),b=delinearized(linrgb[2]);return argbFromRgb(r,g,b)}function redFromArgb(argb){return argb>>16&255}function greenFromArgb(argb){return argb>>8&255}function blueFromArgb(argb){return argb&255}function argbFromXyz(x,y,z){const matrix=XYZ_TO_SRGB,linearR=matrix[0][0]*x+matrix[0][1]*y+matrix[0][2]*z,linearG=matrix[1][0]*x+matrix[1][1]*y+matrix[1][2]*z,linearB=matrix[2][0]*x+matrix[2][1]*y+matrix[2][2]*z,r=delinearized(linearR),g=delinearized(linearG),b=delinearized(linearB);return argbFromRgb(r,g,b)}function xyzFromArgb(argb){const r=linearized(redFromArgb(argb)),g=linearized(greenFromArgb(argb)),b=linearized(blueFromArgb(argb));return matrixMultiply([r,g,b],SRGB_TO_XYZ)}function argbFromLstar(lstar){const y=yFromLstar(lstar),component=delinearized(y);return argbFromRgb(component,component,component)}function lstarFromArgb(argb){const y=xyzFromArgb(argb)[1];return 116*labF(y/100)-16}function yFromLstar(lstar){return 100*labInvf((lstar+16)/116)}function lstarFromY(y){return labF(y/100)*116-16}function linearized(rgbComponent){const normalized=rgbComponent/255;return normalized<=.040449936?normalized/12.92*100:Math.pow((normalized+.055)/1.055,2.4)*100}function delinearized(rgbComponent){const normalized=rgbComponent/100;let delinearized2=0;return normalized<=.0031308?delinearized2=normalized*12.92:delinearized2=1.055*Math.pow(normalized,1/2.4)-.055,clampInt(0,255,Math.round(delinearized2*255))}function whitePointD65(){return WHITE_POINT_D65}function labF(t){const e=.008856451679035631,kappa=24389/27;return t>e?Math.pow(t,1/3):(kappa*t+16)/116}function labInvf(ft){const e=.008856451679035631,kappa=24389/27,ft3=ft*ft*ft;return ft3>e?ft3:(116*ft-16)/kappa}/**
|
|
32
|
+
* @license
|
|
33
|
+
* Copyright 2021 Google LLC
|
|
34
|
+
*
|
|
35
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
36
|
+
* you may not use this file except in compliance with the License.
|
|
37
|
+
* You may obtain a copy of the License at
|
|
38
|
+
*
|
|
39
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
40
|
+
*
|
|
41
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
42
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
43
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
44
|
+
* See the License for the specific language governing permissions and
|
|
45
|
+
* limitations under the License.
|
|
46
|
+
*/class ViewingConditions{static make(whitePoint=whitePointD65(),adaptingLuminance=200/Math.PI*yFromLstar(50)/100,backgroundLstar=50,surround=2,discountingIlluminant=!1){const xyz=whitePoint,rW=xyz[0]*.401288+xyz[1]*.650173+xyz[2]*-.051461,gW=xyz[0]*-.250268+xyz[1]*1.204414+xyz[2]*.045854,bW=xyz[0]*-.002079+xyz[1]*.048952+xyz[2]*.953127,f=.8+surround/10,c=f>=.9?lerp(.59,.69,(f-.9)*10):lerp(.525,.59,(f-.8)*10);let d=discountingIlluminant?1:f*(1-1/3.6*Math.exp((-adaptingLuminance-42)/92));d=d>1?1:d<0?0:d;const nc=f,rgbD=[d*(100/rW)+1-d,d*(100/gW)+1-d,d*(100/bW)+1-d],k=1/(5*adaptingLuminance+1),k4=k*k*k*k,k4F=1-k4,fl=k4*adaptingLuminance+.1*k4F*k4F*Math.cbrt(5*adaptingLuminance),n=yFromLstar(backgroundLstar)/whitePoint[1],z=1.48+Math.sqrt(n),nbb=.725/Math.pow(n,.2),ncb=nbb,rgbAFactors=[Math.pow(fl*rgbD[0]*rW/100,.42),Math.pow(fl*rgbD[1]*gW/100,.42),Math.pow(fl*rgbD[2]*bW/100,.42)],rgbA=[400*rgbAFactors[0]/(rgbAFactors[0]+27.13),400*rgbAFactors[1]/(rgbAFactors[1]+27.13),400*rgbAFactors[2]/(rgbAFactors[2]+27.13)],aw=(2*rgbA[0]+rgbA[1]+.05*rgbA[2])*nbb;return new ViewingConditions(n,aw,nbb,ncb,c,nc,rgbD,fl,Math.pow(fl,.25),z)}constructor(n,aw,nbb,ncb,c,nc,rgbD,fl,fLRoot,z){this.n=n,this.aw=aw,this.nbb=nbb,this.ncb=ncb,this.c=c,this.nc=nc,this.rgbD=rgbD,this.fl=fl,this.fLRoot=fLRoot,this.z=z}}ViewingConditions.DEFAULT=ViewingConditions.make();/**
|
|
47
|
+
* @license
|
|
48
|
+
* Copyright 2021 Google LLC
|
|
49
|
+
*
|
|
50
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
51
|
+
* you may not use this file except in compliance with the License.
|
|
52
|
+
* You may obtain a copy of the License at
|
|
53
|
+
*
|
|
54
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
55
|
+
*
|
|
56
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
57
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
58
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
59
|
+
* See the License for the specific language governing permissions and
|
|
60
|
+
* limitations under the License.
|
|
61
|
+
*/class Cam16{constructor(hue,chroma,j,q,m,s,jstar,astar,bstar){this.hue=hue,this.chroma=chroma,this.j=j,this.q=q,this.m=m,this.s=s,this.jstar=jstar,this.astar=astar,this.bstar=bstar}distance(other){const dJ=this.jstar-other.jstar,dA=this.astar-other.astar,dB=this.bstar-other.bstar,dEPrime=Math.sqrt(dJ*dJ+dA*dA+dB*dB);return 1.41*Math.pow(dEPrime,.63)}static fromInt(argb){return Cam16.fromIntInViewingConditions(argb,ViewingConditions.DEFAULT)}static fromIntInViewingConditions(argb,viewingConditions){const red=(argb&16711680)>>16,green=(argb&65280)>>8,blue=argb&255,redL=linearized(red),greenL=linearized(green),blueL=linearized(blue),x=.41233895*redL+.35762064*greenL+.18051042*blueL,y=.2126*redL+.7152*greenL+.0722*blueL,z=.01932141*redL+.11916382*greenL+.95034478*blueL,rC=.401288*x+.650173*y-.051461*z,gC=-.250268*x+1.204414*y+.045854*z,bC=-.002079*x+.048952*y+.953127*z,rD=viewingConditions.rgbD[0]*rC,gD=viewingConditions.rgbD[1]*gC,bD=viewingConditions.rgbD[2]*bC,rAF=Math.pow(viewingConditions.fl*Math.abs(rD)/100,.42),gAF=Math.pow(viewingConditions.fl*Math.abs(gD)/100,.42),bAF=Math.pow(viewingConditions.fl*Math.abs(bD)/100,.42),rA=signum(rD)*400*rAF/(rAF+27.13),gA=signum(gD)*400*gAF/(gAF+27.13),bA=signum(bD)*400*bAF/(bAF+27.13),a=(11*rA+-12*gA+bA)/11,b=(rA+gA-2*bA)/9,u=(20*rA+20*gA+21*bA)/20,p2=(40*rA+20*gA+bA)/20,atanDegrees=Math.atan2(b,a)*180/Math.PI,hue=sanitizeDegreesDouble(atanDegrees),hueRadians=hue*Math.PI/180,ac=p2*viewingConditions.nbb,j=100*Math.pow(ac/viewingConditions.aw,viewingConditions.c*viewingConditions.z),q=4/viewingConditions.c*Math.sqrt(j/100)*(viewingConditions.aw+4)*viewingConditions.fLRoot,huePrime=hue<20.14?hue+360:hue,eHue=.25*(Math.cos(huePrime*Math.PI/180+2)+3.8),t=5e4/13*eHue*viewingConditions.nc*viewingConditions.ncb*Math.sqrt(a*a+b*b)/(u+.305),alpha=Math.pow(t,.9)*Math.pow(1.64-Math.pow(.29,viewingConditions.n),.73),c=alpha*Math.sqrt(j/100),m=c*viewingConditions.fLRoot,s=50*Math.sqrt(alpha*viewingConditions.c/(viewingConditions.aw+4)),jstar=(1+100*.007)*j/(1+.007*j),mstar=1/.0228*Math.log(1+.0228*m),astar=mstar*Math.cos(hueRadians),bstar=mstar*Math.sin(hueRadians);return new Cam16(hue,c,j,q,m,s,jstar,astar,bstar)}static fromJch(j,c,h){return Cam16.fromJchInViewingConditions(j,c,h,ViewingConditions.DEFAULT)}static fromJchInViewingConditions(j,c,h,viewingConditions){const q=4/viewingConditions.c*Math.sqrt(j/100)*(viewingConditions.aw+4)*viewingConditions.fLRoot,m=c*viewingConditions.fLRoot,alpha=c/Math.sqrt(j/100),s=50*Math.sqrt(alpha*viewingConditions.c/(viewingConditions.aw+4)),hueRadians=h*Math.PI/180,jstar=(1+100*.007)*j/(1+.007*j),mstar=1/.0228*Math.log(1+.0228*m),astar=mstar*Math.cos(hueRadians),bstar=mstar*Math.sin(hueRadians);return new Cam16(h,c,j,q,m,s,jstar,astar,bstar)}static fromUcs(jstar,astar,bstar){return Cam16.fromUcsInViewingConditions(jstar,astar,bstar,ViewingConditions.DEFAULT)}static fromUcsInViewingConditions(jstar,astar,bstar,viewingConditions){const a=astar,b=bstar,m=Math.sqrt(a*a+b*b),c=(Math.exp(m*.0228)-1)/.0228/viewingConditions.fLRoot;let h=Math.atan2(b,a)*(180/Math.PI);h<0&&(h+=360);const j=jstar/(1-(jstar-100)*.007);return Cam16.fromJchInViewingConditions(j,c,h,viewingConditions)}toInt(){return this.viewed(ViewingConditions.DEFAULT)}viewed(viewingConditions){const alpha=this.chroma===0||this.j===0?0:this.chroma/Math.sqrt(this.j/100),t=Math.pow(alpha/Math.pow(1.64-Math.pow(.29,viewingConditions.n),.73),1/.9),hRad=this.hue*Math.PI/180,eHue=.25*(Math.cos(hRad+2)+3.8),ac=viewingConditions.aw*Math.pow(this.j/100,1/viewingConditions.c/viewingConditions.z),p1=eHue*(5e4/13)*viewingConditions.nc*viewingConditions.ncb,p2=ac/viewingConditions.nbb,hSin=Math.sin(hRad),hCos=Math.cos(hRad),gamma=23*(p2+.305)*t/(23*p1+11*t*hCos+108*t*hSin),a=gamma*hCos,b=gamma*hSin,rA=(460*p2+451*a+288*b)/1403,gA=(460*p2-891*a-261*b)/1403,bA=(460*p2-220*a-6300*b)/1403,rCBase=Math.max(0,27.13*Math.abs(rA)/(400-Math.abs(rA))),rC=signum(rA)*(100/viewingConditions.fl)*Math.pow(rCBase,1/.42),gCBase=Math.max(0,27.13*Math.abs(gA)/(400-Math.abs(gA))),gC=signum(gA)*(100/viewingConditions.fl)*Math.pow(gCBase,1/.42),bCBase=Math.max(0,27.13*Math.abs(bA)/(400-Math.abs(bA))),bC=signum(bA)*(100/viewingConditions.fl)*Math.pow(bCBase,1/.42),rF=rC/viewingConditions.rgbD[0],gF=gC/viewingConditions.rgbD[1],bF=bC/viewingConditions.rgbD[2],x=1.86206786*rF-1.01125463*gF+.14918677*bF,y=.38752654*rF+.62144744*gF-.00897398*bF,z=-.0158415*rF-.03412294*gF+1.04996444*bF;return argbFromXyz(x,y,z)}static fromXyzInViewingConditions(x,y,z,viewingConditions){const rC=.401288*x+.650173*y-.051461*z,gC=-.250268*x+1.204414*y+.045854*z,bC=-.002079*x+.048952*y+.953127*z,rD=viewingConditions.rgbD[0]*rC,gD=viewingConditions.rgbD[1]*gC,bD=viewingConditions.rgbD[2]*bC,rAF=Math.pow(viewingConditions.fl*Math.abs(rD)/100,.42),gAF=Math.pow(viewingConditions.fl*Math.abs(gD)/100,.42),bAF=Math.pow(viewingConditions.fl*Math.abs(bD)/100,.42),rA=signum(rD)*400*rAF/(rAF+27.13),gA=signum(gD)*400*gAF/(gAF+27.13),bA=signum(bD)*400*bAF/(bAF+27.13),a=(11*rA+-12*gA+bA)/11,b=(rA+gA-2*bA)/9,u=(20*rA+20*gA+21*bA)/20,p2=(40*rA+20*gA+bA)/20,atanDegrees=Math.atan2(b,a)*180/Math.PI,hue=atanDegrees<0?atanDegrees+360:atanDegrees>=360?atanDegrees-360:atanDegrees,hueRadians=hue*Math.PI/180,ac=p2*viewingConditions.nbb,J=100*Math.pow(ac/viewingConditions.aw,viewingConditions.c*viewingConditions.z),Q=4/viewingConditions.c*Math.sqrt(J/100)*(viewingConditions.aw+4)*viewingConditions.fLRoot,huePrime=hue<20.14?hue+360:hue,eHue=1/4*(Math.cos(huePrime*Math.PI/180+2)+3.8),t=5e4/13*eHue*viewingConditions.nc*viewingConditions.ncb*Math.sqrt(a*a+b*b)/(u+.305),alpha=Math.pow(t,.9)*Math.pow(1.64-Math.pow(.29,viewingConditions.n),.73),C=alpha*Math.sqrt(J/100),M=C*viewingConditions.fLRoot,s=50*Math.sqrt(alpha*viewingConditions.c/(viewingConditions.aw+4)),jstar=(1+100*.007)*J/(1+.007*J),mstar=Math.log(1+.0228*M)/.0228,astar=mstar*Math.cos(hueRadians),bstar=mstar*Math.sin(hueRadians);return new Cam16(hue,C,J,Q,M,s,jstar,astar,bstar)}xyzInViewingConditions(viewingConditions){const alpha=this.chroma===0||this.j===0?0:this.chroma/Math.sqrt(this.j/100),t=Math.pow(alpha/Math.pow(1.64-Math.pow(.29,viewingConditions.n),.73),1/.9),hRad=this.hue*Math.PI/180,eHue=.25*(Math.cos(hRad+2)+3.8),ac=viewingConditions.aw*Math.pow(this.j/100,1/viewingConditions.c/viewingConditions.z),p1=eHue*(5e4/13)*viewingConditions.nc*viewingConditions.ncb,p2=ac/viewingConditions.nbb,hSin=Math.sin(hRad),hCos=Math.cos(hRad),gamma=23*(p2+.305)*t/(23*p1+11*t*hCos+108*t*hSin),a=gamma*hCos,b=gamma*hSin,rA=(460*p2+451*a+288*b)/1403,gA=(460*p2-891*a-261*b)/1403,bA=(460*p2-220*a-6300*b)/1403,rCBase=Math.max(0,27.13*Math.abs(rA)/(400-Math.abs(rA))),rC=signum(rA)*(100/viewingConditions.fl)*Math.pow(rCBase,1/.42),gCBase=Math.max(0,27.13*Math.abs(gA)/(400-Math.abs(gA))),gC=signum(gA)*(100/viewingConditions.fl)*Math.pow(gCBase,1/.42),bCBase=Math.max(0,27.13*Math.abs(bA)/(400-Math.abs(bA))),bC=signum(bA)*(100/viewingConditions.fl)*Math.pow(bCBase,1/.42),rF=rC/viewingConditions.rgbD[0],gF=gC/viewingConditions.rgbD[1],bF=bC/viewingConditions.rgbD[2],x=1.86206786*rF-1.01125463*gF+.14918677*bF,y=.38752654*rF+.62144744*gF-.00897398*bF,z=-.0158415*rF-.03412294*gF+1.04996444*bF;return[x,y,z]}}/**
|
|
62
|
+
* @license
|
|
63
|
+
* Copyright 2021 Google LLC
|
|
64
|
+
*
|
|
65
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
66
|
+
* you may not use this file except in compliance with the License.
|
|
67
|
+
* You may obtain a copy of the License at
|
|
68
|
+
*
|
|
69
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
70
|
+
*
|
|
71
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
72
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
73
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
74
|
+
* See the License for the specific language governing permissions and
|
|
75
|
+
* limitations under the License.
|
|
76
|
+
*/class HctSolver{static sanitizeRadians(angle){return(angle+Math.PI*8)%(Math.PI*2)}static trueDelinearized(rgbComponent){const normalized=rgbComponent/100;let delinearized2=0;return normalized<=.0031308?delinearized2=normalized*12.92:delinearized2=1.055*Math.pow(normalized,1/2.4)-.055,delinearized2*255}static chromaticAdaptation(component){const af=Math.pow(Math.abs(component),.42);return signum(component)*400*af/(af+27.13)}static hueOf(linrgb){const scaledDiscount=matrixMultiply(linrgb,HctSolver.SCALED_DISCOUNT_FROM_LINRGB),rA=HctSolver.chromaticAdaptation(scaledDiscount[0]),gA=HctSolver.chromaticAdaptation(scaledDiscount[1]),bA=HctSolver.chromaticAdaptation(scaledDiscount[2]),a=(11*rA+-12*gA+bA)/11,b=(rA+gA-2*bA)/9;return Math.atan2(b,a)}static areInCyclicOrder(a,b,c){const deltaAB=HctSolver.sanitizeRadians(b-a),deltaAC=HctSolver.sanitizeRadians(c-a);return deltaAB<deltaAC}static intercept(source,mid,target){return(mid-source)/(target-source)}static lerpPoint(source,t,target){return[source[0]+(target[0]-source[0])*t,source[1]+(target[1]-source[1])*t,source[2]+(target[2]-source[2])*t]}static setCoordinate(source,coordinate,target,axis){const t=HctSolver.intercept(source[axis],coordinate,target[axis]);return HctSolver.lerpPoint(source,t,target)}static isBounded(x){return 0<=x&&x<=100}static nthVertex(y,n){const kR=HctSolver.Y_FROM_LINRGB[0],kG=HctSolver.Y_FROM_LINRGB[1],kB=HctSolver.Y_FROM_LINRGB[2],coordA=n%4<=1?0:100,coordB=n%2===0?0:100;if(n<4){const g=coordA,b=coordB,r=(y-g*kG-b*kB)/kR;return HctSolver.isBounded(r)?[r,g,b]:[-1,-1,-1]}else if(n<8){const b=coordA,r=coordB,g=(y-r*kR-b*kB)/kG;return HctSolver.isBounded(g)?[r,g,b]:[-1,-1,-1]}else{const r=coordA,g=coordB,b=(y-r*kR-g*kG)/kB;return HctSolver.isBounded(b)?[r,g,b]:[-1,-1,-1]}}static bisectToSegment(y,targetHue){let left=[-1,-1,-1],right=left,leftHue=0,rightHue=0,initialized=!1,uncut=!0;for(let n=0;n<12;n++){const mid=HctSolver.nthVertex(y,n);if(mid[0]<0)continue;const midHue=HctSolver.hueOf(mid);if(!initialized){left=mid,right=mid,leftHue=midHue,rightHue=midHue,initialized=!0;continue}(uncut||HctSolver.areInCyclicOrder(leftHue,midHue,rightHue))&&(uncut=!1,HctSolver.areInCyclicOrder(leftHue,targetHue,midHue)?(right=mid,rightHue=midHue):(left=mid,leftHue=midHue))}return[left,right]}static midpoint(a,b){return[(a[0]+b[0])/2,(a[1]+b[1])/2,(a[2]+b[2])/2]}static criticalPlaneBelow(x){return Math.floor(x-.5)}static criticalPlaneAbove(x){return Math.ceil(x-.5)}static bisectToLimit(y,targetHue){const segment=HctSolver.bisectToSegment(y,targetHue);let left=segment[0],leftHue=HctSolver.hueOf(left),right=segment[1];for(let axis=0;axis<3;axis++)if(left[axis]!==right[axis]){let lPlane=-1,rPlane=255;left[axis]<right[axis]?(lPlane=HctSolver.criticalPlaneBelow(HctSolver.trueDelinearized(left[axis])),rPlane=HctSolver.criticalPlaneAbove(HctSolver.trueDelinearized(right[axis]))):(lPlane=HctSolver.criticalPlaneAbove(HctSolver.trueDelinearized(left[axis])),rPlane=HctSolver.criticalPlaneBelow(HctSolver.trueDelinearized(right[axis])));for(let i=0;i<8&&!(Math.abs(rPlane-lPlane)<=1);i++){const mPlane=Math.floor((lPlane+rPlane)/2),midPlaneCoordinate=HctSolver.CRITICAL_PLANES[mPlane],mid=HctSolver.setCoordinate(left,midPlaneCoordinate,right,axis),midHue=HctSolver.hueOf(mid);HctSolver.areInCyclicOrder(leftHue,targetHue,midHue)?(right=mid,rPlane=mPlane):(left=mid,leftHue=midHue,lPlane=mPlane)}}return HctSolver.midpoint(left,right)}static inverseChromaticAdaptation(adapted){const adaptedAbs=Math.abs(adapted),base=Math.max(0,27.13*adaptedAbs/(400-adaptedAbs));return signum(adapted)*Math.pow(base,1/.42)}static findResultByJ(hueRadians,chroma,y){let j=Math.sqrt(y)*11;const viewingConditions=ViewingConditions.DEFAULT,tInnerCoeff=1/Math.pow(1.64-Math.pow(.29,viewingConditions.n),.73),p1=.25*(Math.cos(hueRadians+2)+3.8)*(5e4/13)*viewingConditions.nc*viewingConditions.ncb,hSin=Math.sin(hueRadians),hCos=Math.cos(hueRadians);for(let iterationRound=0;iterationRound<5;iterationRound++){const jNormalized=j/100,alpha=chroma===0||j===0?0:chroma/Math.sqrt(jNormalized),t=Math.pow(alpha*tInnerCoeff,1/.9),p2=viewingConditions.aw*Math.pow(jNormalized,1/viewingConditions.c/viewingConditions.z)/viewingConditions.nbb,gamma=23*(p2+.305)*t/(23*p1+11*t*hCos+108*t*hSin),a=gamma*hCos,b=gamma*hSin,rA=(460*p2+451*a+288*b)/1403,gA=(460*p2-891*a-261*b)/1403,bA=(460*p2-220*a-6300*b)/1403,rCScaled=HctSolver.inverseChromaticAdaptation(rA),gCScaled=HctSolver.inverseChromaticAdaptation(gA),bCScaled=HctSolver.inverseChromaticAdaptation(bA),linrgb=matrixMultiply([rCScaled,gCScaled,bCScaled],HctSolver.LINRGB_FROM_SCALED_DISCOUNT);if(linrgb[0]<0||linrgb[1]<0||linrgb[2]<0)return 0;const kR=HctSolver.Y_FROM_LINRGB[0],kG=HctSolver.Y_FROM_LINRGB[1],kB=HctSolver.Y_FROM_LINRGB[2],fnj=kR*linrgb[0]+kG*linrgb[1]+kB*linrgb[2];if(fnj<=0)return 0;if(iterationRound===4||Math.abs(fnj-y)<.002)return linrgb[0]>100.01||linrgb[1]>100.01||linrgb[2]>100.01?0:argbFromLinrgb(linrgb);j=j-(fnj-y)*j/(2*fnj)}return 0}static solveToInt(hueDegrees,chroma,lstar){if(chroma<1e-4||lstar<1e-4||lstar>99.9999)return argbFromLstar(lstar);hueDegrees=sanitizeDegreesDouble(hueDegrees);const hueRadians=hueDegrees/180*Math.PI,y=yFromLstar(lstar),exactAnswer=HctSolver.findResultByJ(hueRadians,chroma,y);if(exactAnswer!==0)return exactAnswer;const linrgb=HctSolver.bisectToLimit(y,hueRadians);return argbFromLinrgb(linrgb)}static solveToCam(hueDegrees,chroma,lstar){return Cam16.fromInt(HctSolver.solveToInt(hueDegrees,chroma,lstar))}}HctSolver.SCALED_DISCOUNT_FROM_LINRGB=[[.001200833568784504,.002389694492170889,.0002795742885861124],[.0005891086651375999,.0029785502573438758,.0003270666104008398],[.00010146692491640572,.0005364214359186694,.0032979401770712076]];HctSolver.LINRGB_FROM_SCALED_DISCOUNT=[[1373.2198709594231,-1100.4251190754821,-7.278681089101213],[-271.815969077903,559.6580465940733,-32.46047482791194],[1.9622899599665666,-57.173814538844006,308.7233197812385]];HctSolver.Y_FROM_LINRGB=[.2126,.7152,.0722];HctSolver.CRITICAL_PLANES=[.015176349177441876,.045529047532325624,.07588174588720938,.10623444424209313,.13658714259697685,.16693984095186062,.19729253930674434,.2276452376616281,.2579979360165119,.28835063437139563,.3188300904430532,.350925934958123,.3848314933096426,.42057480301049466,.458183274052838,.4976837250274023,.5391024159806381,.5824650784040898,.6277969426914107,.6751227633498623,.7244668422128921,.775853049866786,.829304845476233,.8848452951698498,.942497089126609,1.0022825574869039,1.0642236851973577,1.1283421258858297,1.1946592148522128,1.2631959812511864,1.3339731595349034,1.407011200216447,1.4823302800086415,1.5599503113873272,1.6398909516233677,1.7221716113234105,1.8068114625156377,1.8938294463134073,1.9832442801866852,2.075074464868551,2.1693382909216234,2.2660538449872063,2.36523901573795,2.4669114995532007,2.5710888059345764,2.6777882626779785,2.7870270208169257,2.898822059350997,3.0131901897720907,3.1301480604002863,3.2497121605402226,3.3718988244681087,3.4967242352587946,3.624204428461639,3.754355295633311,3.887192587735158,4.022731918402185,4.160988767090289,4.301978482107941,4.445716283538092,4.592217266055746,4.741496401646282,4.893568542229298,5.048448422192488,5.20615066083972,5.3666897647573375,5.5300801301023865,5.696336044816294,5.865471690767354,6.037501145825082,6.212438385869475,6.390297286737924,6.571091626112461,6.7548350853498045,6.941541251256611,7.131223617812143,7.323895587840543,7.5195704746346665,7.7182615035334345,7.919981813454504,8.124744458384042,8.332562408825165,8.543448553206703,8.757415699253682,8.974476575321063,9.194643831691977,9.417930041841839,9.644347703669503,9.873909240696694,10.106627003236781,10.342513269534024,10.58158024687427,10.8238400726681,11.069304815507364,11.317986476196008,11.569896988756009,11.825048221409341,12.083451977536606,12.345119996613247,12.610063955123938,12.878295467455942,13.149826086772048,13.42466730586372,13.702830557985108,13.984327217668513,14.269168601521828,14.55736596900856,14.848930523210871,15.143873411576273,15.44220572664832,15.743938506781891,16.04908273684337,16.35764934889634,16.66964922287304,16.985093187232053,17.30399201960269,17.62635644741625,17.95219714852476,18.281524751807332,18.614349837764564,18.95068293910138,19.290534541298456,19.633915083172692,19.98083495742689,20.331304511189067,20.685334046541502,21.042933821039977,21.404114048223256,21.76888489811322,22.137256497705877,22.50923893145328,22.884842241736916,23.264076429332462,23.6469514538663,24.033477234264016,24.42366364919083,24.817520537484558,25.21505769858089,25.61628489293138,26.021211842414342,26.429848230738664,26.842203703840827,27.258287870275353,27.678110301598522,28.10168053274597,28.529008062403893,28.96010235337422,29.39497283293396,29.83362889318845,30.276079891419332,30.722335150426627,31.172403958865512,31.62629557157785,32.08401920991837,32.54558406207592,33.010999283389665,33.4802739966603,33.953417292456834,34.430438229418264,34.911345834551085,35.39614910352207,35.88485700094671,36.37747846067349,36.87402238606382,37.37449765026789,37.87891309649659,38.38727753828926,38.89959975977785,39.41588851594697,39.93615253289054,40.460400508064545,40.98864111053629,41.520882981230194,42.05713473317016,42.597404951718396,43.141702194811224,43.6900349931913,44.24241185063697,44.798841244188324,45.35933162437017,45.92389141541209,46.49252901546552,47.065252796817916,47.64207110610409,48.22299226451468,48.808024568002054,49.3971762874833,49.9904556690408,50.587870934119984,51.189430279724725,51.79514187861014,52.40501387947288,53.0190544071392,53.637271562750364,54.259673423945976,54.88626804504493,55.517063457223934,56.15206766869424,56.79128866487574,57.43473440856916,58.08241284012621,58.734331877617365,59.39049941699807,60.05092333227251,60.715611475655585,61.38457167773311,62.057811747619894,62.7353394731159,63.417162620860914,64.10328893648692,64.79372614476921,65.48848194977529,66.18756403501224,66.89098006357258,67.59873767827808,68.31084450182222,69.02730813691093,69.74813616640164,70.47333615344107,71.20291564160104,71.93688215501312,72.67524319850172,73.41800625771542,74.16517879925733,74.9167682708136,75.67278210128072,76.43322770089146,77.1981124613393,77.96744375590167,78.74122893956174,79.51947534912904,80.30219030335869,81.08938110306934,81.88105503125999,82.67721935322541,83.4778813166706,84.28304815182372,85.09272707154808,85.90692527145302,86.72564993000343,87.54890820862819,88.3767072518277,89.2090541872801,90.04595612594655,90.88742016217518,91.73345337380438,92.58406282226491,93.43925555268066,94.29903859396902,95.16341895893969,96.03240364439274,96.9059996312159,97.78421388448044,98.6670533535366,99.55452497210776];/**
|
|
77
|
+
* @license
|
|
78
|
+
* Copyright 2021 Google LLC
|
|
79
|
+
*
|
|
80
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
81
|
+
* you may not use this file except in compliance with the License.
|
|
82
|
+
* You may obtain a copy of the License at
|
|
83
|
+
*
|
|
84
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
85
|
+
*
|
|
86
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
87
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
88
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
89
|
+
* See the License for the specific language governing permissions and
|
|
90
|
+
* limitations under the License.
|
|
91
|
+
*/class Hct{static from(hue,chroma,tone){return new Hct(HctSolver.solveToInt(hue,chroma,tone))}static fromInt(argb){return new Hct(argb)}toInt(){return this.argb}get hue(){return this.internalHue}set hue(newHue){this.setInternalState(HctSolver.solveToInt(newHue,this.internalChroma,this.internalTone))}get chroma(){return this.internalChroma}set chroma(newChroma){this.setInternalState(HctSolver.solveToInt(this.internalHue,newChroma,this.internalTone))}get tone(){return this.internalTone}set tone(newTone){this.setInternalState(HctSolver.solveToInt(this.internalHue,this.internalChroma,newTone))}setValue(propertyName,value){this[propertyName]=value}toString(){return`HCT(${this.hue.toFixed(0)}, ${this.chroma.toFixed(0)}, ${this.tone.toFixed(0)})`}static isBlue(hue){return hue>=250&&hue<270}static isYellow(hue){return hue>=105&&hue<125}static isCyan(hue){return hue>=170&&hue<207}constructor(argb){this.argb=argb;const cam=Cam16.fromInt(argb);this.internalHue=cam.hue,this.internalChroma=cam.chroma,this.internalTone=lstarFromArgb(argb),this.argb=argb}setInternalState(argb){const cam=Cam16.fromInt(argb);this.internalHue=cam.hue,this.internalChroma=cam.chroma,this.internalTone=lstarFromArgb(argb),this.argb=argb}inViewingConditions(vc){const viewedInVc=Cam16.fromInt(this.toInt()).xyzInViewingConditions(vc),recastInVc=Cam16.fromXyzInViewingConditions(viewedInVc[0],viewedInVc[1],viewedInVc[2],ViewingConditions.make());return Hct.from(recastInVc.hue,recastInVc.chroma,lstarFromY(viewedInVc[1]))}}/**
|
|
92
|
+
* @license
|
|
93
|
+
* Copyright 2021 Google LLC
|
|
94
|
+
*
|
|
95
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
96
|
+
* you may not use this file except in compliance with the License.
|
|
97
|
+
* You may obtain a copy of the License at
|
|
98
|
+
*
|
|
99
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
100
|
+
*
|
|
101
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
102
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
103
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
104
|
+
* See the License for the specific language governing permissions and
|
|
105
|
+
* limitations under the License.
|
|
106
|
+
*/class Blend{static harmonize(designColor,sourceColor){const fromHct=Hct.fromInt(designColor),toHct=Hct.fromInt(sourceColor),differenceDegrees$1=differenceDegrees(fromHct.hue,toHct.hue),rotationDegrees=Math.min(differenceDegrees$1*.5,15),outputHue=sanitizeDegreesDouble(fromHct.hue+rotationDegrees*rotationDirection(fromHct.hue,toHct.hue));return Hct.from(outputHue,fromHct.chroma,fromHct.tone).toInt()}static hctHue(from,to,amount){const ucs=Blend.cam16Ucs(from,to,amount),ucsCam=Cam16.fromInt(ucs),fromCam=Cam16.fromInt(from);return Hct.from(ucsCam.hue,fromCam.chroma,lstarFromArgb(from)).toInt()}static cam16Ucs(from,to,amount){const fromCam=Cam16.fromInt(from),toCam=Cam16.fromInt(to),fromJ=fromCam.jstar,fromA=fromCam.astar,fromB=fromCam.bstar,toJ=toCam.jstar,toA=toCam.astar,toB=toCam.bstar,jstar=fromJ+(toJ-fromJ)*amount,astar=fromA+(toA-fromA)*amount,bstar=fromB+(toB-fromB)*amount;return Cam16.fromUcs(jstar,astar,bstar).toInt()}}/**
|
|
107
|
+
* @license
|
|
108
|
+
* Copyright 2022 Google LLC
|
|
109
|
+
*
|
|
110
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
111
|
+
* you may not use this file except in compliance with the License.
|
|
112
|
+
* You may obtain a copy of the License at
|
|
113
|
+
*
|
|
114
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
115
|
+
*
|
|
116
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
117
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
118
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
119
|
+
* See the License for the specific language governing permissions and
|
|
120
|
+
* limitations under the License.
|
|
121
|
+
*/class Contrast{static ratioOfTones(toneA,toneB){return toneA=clampDouble(0,100,toneA),toneB=clampDouble(0,100,toneB),Contrast.ratioOfYs(yFromLstar(toneA),yFromLstar(toneB))}static ratioOfYs(y1,y2){const lighter=y1>y2?y1:y2,darker=lighter===y2?y1:y2;return(lighter+5)/(darker+5)}static lighter(tone,ratio){if(tone<0||tone>100)return-1;const darkY=yFromLstar(tone),lightY=ratio*(darkY+5)-5,realContrast=Contrast.ratioOfYs(lightY,darkY),delta=Math.abs(realContrast-ratio);if(realContrast<ratio&&delta>.04)return-1;const returnValue=lstarFromY(lightY)+.4;return returnValue<0||returnValue>100?-1:returnValue}static darker(tone,ratio){if(tone<0||tone>100)return-1;const lightY=yFromLstar(tone),darkY=(lightY+5)/ratio-5,realContrast=Contrast.ratioOfYs(lightY,darkY),delta=Math.abs(realContrast-ratio);if(realContrast<ratio&&delta>.04)return-1;const returnValue=lstarFromY(darkY)-.4;return returnValue<0||returnValue>100?-1:returnValue}static lighterUnsafe(tone,ratio){const lighterSafe=Contrast.lighter(tone,ratio);return lighterSafe<0?100:lighterSafe}static darkerUnsafe(tone,ratio){const darkerSafe=Contrast.darker(tone,ratio);return darkerSafe<0?0:darkerSafe}}/**
|
|
122
|
+
* @license
|
|
123
|
+
* Copyright 2023 Google LLC
|
|
124
|
+
*
|
|
125
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
126
|
+
* you may not use this file except in compliance with the License.
|
|
127
|
+
* You may obtain a copy of the License at
|
|
128
|
+
*
|
|
129
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
130
|
+
*
|
|
131
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
132
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
133
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
134
|
+
* See the License for the specific language governing permissions and
|
|
135
|
+
* limitations under the License.
|
|
136
|
+
*/class DislikeAnalyzer{static isDisliked(hct){const huePasses=Math.round(hct.hue)>=90&&Math.round(hct.hue)<=111,chromaPasses=Math.round(hct.chroma)>16,tonePasses=Math.round(hct.tone)<65;return huePasses&&chromaPasses&&tonePasses}static fixIfDisliked(hct){return DislikeAnalyzer.isDisliked(hct)?Hct.from(hct.hue,hct.chroma,70):hct}}/**
|
|
137
|
+
* @license
|
|
138
|
+
* Copyright 2022 Google LLC
|
|
139
|
+
*
|
|
140
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
141
|
+
* you may not use this file except in compliance with the License.
|
|
142
|
+
* You may obtain a copy of the License at
|
|
143
|
+
*
|
|
144
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
145
|
+
*
|
|
146
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
147
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
148
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
149
|
+
* See the License for the specific language governing permissions and
|
|
150
|
+
* limitations under the License.
|
|
151
|
+
*/function validateExtendedColor(originalColor,specVersion,extendedColor){if(originalColor.name!==extendedColor.name)throw new Error(`Attempting to extend color ${originalColor.name} with color ${extendedColor.name} of different name for spec version ${specVersion}.`);if(originalColor.isBackground!==extendedColor.isBackground)throw new Error(`Attempting to extend color ${originalColor.name} as a ${originalColor.isBackground?"background":"foreground"} with color ${extendedColor.name} as a ${extendedColor.isBackground?"background":"foreground"} for spec version ${specVersion}.`)}function extendSpecVersion(originlColor,specVersion,extendedColor){return validateExtendedColor(originlColor,specVersion,extendedColor),DynamicColor.fromPalette({name:originlColor.name,palette:s=>s.specVersion===specVersion?extendedColor.palette(s):originlColor.palette(s),tone:s=>s.specVersion===specVersion?extendedColor.tone(s):originlColor.tone(s),isBackground:originlColor.isBackground,chromaMultiplier:s=>{const chromaMultiplier=s.specVersion===specVersion?extendedColor.chromaMultiplier:originlColor.chromaMultiplier;return chromaMultiplier!==void 0?chromaMultiplier(s):1},background:s=>{const background=s.specVersion===specVersion?extendedColor.background:originlColor.background;return background!==void 0?background(s):void 0},secondBackground:s=>{const secondBackground=s.specVersion===specVersion?extendedColor.secondBackground:originlColor.secondBackground;return secondBackground!==void 0?secondBackground(s):void 0},contrastCurve:s=>{const contrastCurve=s.specVersion===specVersion?extendedColor.contrastCurve:originlColor.contrastCurve;return contrastCurve!==void 0?contrastCurve(s):void 0},toneDeltaPair:s=>{const toneDeltaPair=s.specVersion===specVersion?extendedColor.toneDeltaPair:originlColor.toneDeltaPair;return toneDeltaPair!==void 0?toneDeltaPair(s):void 0}})}class DynamicColor{static fromPalette(args){return new DynamicColor(args.name??"",args.palette,args.tone??DynamicColor.getInitialToneFromBackground(args.background),args.isBackground??!1,args.chromaMultiplier,args.background,args.secondBackground,args.contrastCurve,args.toneDeltaPair)}static getInitialToneFromBackground(background){return background===void 0?s=>50:s=>background(s)?background(s).getTone(s):50}constructor(name,palette,tone,isBackground,chromaMultiplier,background,secondBackground,contrastCurve,toneDeltaPair){if(this.name=name,this.palette=palette,this.tone=tone,this.isBackground=isBackground,this.chromaMultiplier=chromaMultiplier,this.background=background,this.secondBackground=secondBackground,this.contrastCurve=contrastCurve,this.toneDeltaPair=toneDeltaPair,this.hctCache=new Map,!background&&secondBackground)throw new Error(`Color ${name} has secondBackgrounddefined, but background is not defined.`);if(!background&&contrastCurve)throw new Error(`Color ${name} has contrastCurvedefined, but background is not defined.`);if(background&&!contrastCurve)throw new Error(`Color ${name} has backgrounddefined, but contrastCurve is not defined.`)}clone(){return DynamicColor.fromPalette({name:this.name,palette:this.palette,tone:this.tone,isBackground:this.isBackground,chromaMultiplier:this.chromaMultiplier,background:this.background,secondBackground:this.secondBackground,contrastCurve:this.contrastCurve,toneDeltaPair:this.toneDeltaPair})}clearCache(){this.hctCache.clear()}getArgb(scheme){return this.getHct(scheme).toInt()}getHct(scheme){const cachedAnswer=this.hctCache.get(scheme);if(cachedAnswer!=null)return cachedAnswer;const answer=getSpec(scheme.specVersion).getHct(scheme,this);return this.hctCache.size>4&&this.hctCache.clear(),this.hctCache.set(scheme,answer),answer}getTone(scheme){return getSpec(scheme.specVersion).getTone(scheme,this)}static foregroundTone(bgTone,ratio){const lighterTone=Contrast.lighterUnsafe(bgTone,ratio),darkerTone=Contrast.darkerUnsafe(bgTone,ratio),lighterRatio=Contrast.ratioOfTones(lighterTone,bgTone),darkerRatio=Contrast.ratioOfTones(darkerTone,bgTone);if(DynamicColor.tonePrefersLightForeground(bgTone)){const negligibleDifference=Math.abs(lighterRatio-darkerRatio)<.1&&lighterRatio<ratio&&darkerRatio<ratio;return lighterRatio>=ratio||lighterRatio>=darkerRatio||negligibleDifference?lighterTone:darkerTone}else return darkerRatio>=ratio||darkerRatio>=lighterRatio?darkerTone:lighterTone}static tonePrefersLightForeground(tone){return Math.round(tone)<60}static toneAllowsLightForeground(tone){return Math.round(tone)<=49}static enableLightForeground(tone){return DynamicColor.tonePrefersLightForeground(tone)&&!DynamicColor.toneAllowsLightForeground(tone)?49:tone}}class ColorCalculationDelegateImpl2021{getHct(scheme,color){const tone=color.getTone(scheme);return color.palette(scheme).getHct(tone)}getTone(scheme,color){const decreasingContrast=scheme.contrastLevel<0,toneDeltaPair=color.toneDeltaPair?color.toneDeltaPair(scheme):void 0;if(toneDeltaPair){const roleA=toneDeltaPair.roleA,roleB=toneDeltaPair.roleB,delta=toneDeltaPair.delta,polarity=toneDeltaPair.polarity,stayTogether=toneDeltaPair.stayTogether,aIsNearer=polarity==="nearer"||polarity==="lighter"&&!scheme.isDark||polarity==="darker"&&scheme.isDark,nearer=aIsNearer?roleA:roleB,farther=aIsNearer?roleB:roleA,amNearer=color.name===nearer.name,expansionDir=scheme.isDark?1:-1;let nTone=nearer.tone(scheme),fTone=farther.tone(scheme);if(color.background&&nearer.contrastCurve&&farther.contrastCurve){const bg=color.background(scheme),nContrastCurve=nearer.contrastCurve(scheme),fContrastCurve=farther.contrastCurve(scheme);if(bg&&nContrastCurve&&fContrastCurve){const bgTone=bg.getTone(scheme),nContrast=nContrastCurve.get(scheme.contrastLevel),fContrast=fContrastCurve.get(scheme.contrastLevel);Contrast.ratioOfTones(bgTone,nTone)<nContrast&&(nTone=DynamicColor.foregroundTone(bgTone,nContrast)),Contrast.ratioOfTones(bgTone,fTone)<fContrast&&(fTone=DynamicColor.foregroundTone(bgTone,fContrast)),decreasingContrast&&(nTone=DynamicColor.foregroundTone(bgTone,nContrast),fTone=DynamicColor.foregroundTone(bgTone,fContrast))}}return(fTone-nTone)*expansionDir<delta&&(fTone=clampDouble(0,100,nTone+delta*expansionDir),(fTone-nTone)*expansionDir>=delta||(nTone=clampDouble(0,100,fTone-delta*expansionDir))),50<=nTone&&nTone<60?expansionDir>0?(nTone=60,fTone=Math.max(fTone,nTone+delta*expansionDir)):(nTone=49,fTone=Math.min(fTone,nTone+delta*expansionDir)):50<=fTone&&fTone<60&&(stayTogether?expansionDir>0?(nTone=60,fTone=Math.max(fTone,nTone+delta*expansionDir)):(nTone=49,fTone=Math.min(fTone,nTone+delta*expansionDir)):expansionDir>0?fTone=60:fTone=49),amNearer?nTone:fTone}else{let answer=color.tone(scheme);if(color.background==null||color.background(scheme)===void 0||color.contrastCurve==null||color.contrastCurve(scheme)===void 0)return answer;const bgTone=color.background(scheme).getTone(scheme),desiredRatio=color.contrastCurve(scheme).get(scheme.contrastLevel);if(Contrast.ratioOfTones(bgTone,answer)>=desiredRatio||(answer=DynamicColor.foregroundTone(bgTone,desiredRatio)),decreasingContrast&&(answer=DynamicColor.foregroundTone(bgTone,desiredRatio)),color.isBackground&&50<=answer&&answer<60&&(Contrast.ratioOfTones(49,bgTone)>=desiredRatio?answer=49:answer=60),color.secondBackground==null||color.secondBackground(scheme)===void 0)return answer;const[bg1,bg2]=[color.background,color.secondBackground],[bgTone1,bgTone2]=[bg1(scheme).getTone(scheme),bg2(scheme).getTone(scheme)],[upper,lower]=[Math.max(bgTone1,bgTone2),Math.min(bgTone1,bgTone2)];if(Contrast.ratioOfTones(upper,answer)>=desiredRatio&&Contrast.ratioOfTones(lower,answer)>=desiredRatio)return answer;const lightOption=Contrast.lighter(upper,desiredRatio),darkOption=Contrast.darker(lower,desiredRatio),availables=[];return lightOption!==-1&&availables.push(lightOption),darkOption!==-1&&availables.push(darkOption),DynamicColor.tonePrefersLightForeground(bgTone1)||DynamicColor.tonePrefersLightForeground(bgTone2)?lightOption<0?100:lightOption:availables.length===1?availables[0]:darkOption<0?0:darkOption}}}class ColorCalculationDelegateImpl2025{getHct(scheme,color){const palette=color.palette(scheme),tone=color.getTone(scheme),hue=palette.hue,chroma=palette.chroma*(color.chromaMultiplier?color.chromaMultiplier(scheme):1);return Hct.from(hue,chroma,tone)}getTone(scheme,color){const toneDeltaPair=color.toneDeltaPair?color.toneDeltaPair(scheme):void 0;if(toneDeltaPair){const roleA=toneDeltaPair.roleA,roleB=toneDeltaPair.roleB,polarity=toneDeltaPair.polarity,constraint=toneDeltaPair.constraint,absoluteDelta=polarity==="darker"||polarity==="relative_lighter"&&scheme.isDark||polarity==="relative_darker"&&!scheme.isDark?-toneDeltaPair.delta:toneDeltaPair.delta,amRoleA=color.name===roleA.name,selfRole=amRoleA?roleA:roleB,refRole=amRoleA?roleB:roleA;let selfTone=selfRole.tone(scheme),refTone=refRole.getTone(scheme);const relativeDelta=absoluteDelta*(amRoleA?1:-1);if(constraint==="exact"?selfTone=clampDouble(0,100,refTone+relativeDelta):constraint==="nearer"?relativeDelta>0?selfTone=clampDouble(0,100,clampDouble(refTone,refTone+relativeDelta,selfTone)):selfTone=clampDouble(0,100,clampDouble(refTone+relativeDelta,refTone,selfTone)):constraint==="farther"&&(relativeDelta>0?selfTone=clampDouble(refTone+relativeDelta,100,selfTone):selfTone=clampDouble(0,refTone+relativeDelta,selfTone)),color.background&&color.contrastCurve){const background=color.background(scheme),contrastCurve=color.contrastCurve(scheme);if(background&&contrastCurve){const bgTone=background.getTone(scheme),selfContrast=contrastCurve.get(scheme.contrastLevel);selfTone=Contrast.ratioOfTones(bgTone,selfTone)>=selfContrast&&scheme.contrastLevel>=0?selfTone:DynamicColor.foregroundTone(bgTone,selfContrast)}}return color.isBackground&&!color.name.endsWith("_fixed_dim")&&(selfTone>=57?selfTone=clampDouble(65,100,selfTone):selfTone=clampDouble(0,49,selfTone)),selfTone}else{let answer=color.tone(scheme);if(color.background==null||color.background(scheme)===void 0||color.contrastCurve==null||color.contrastCurve(scheme)===void 0)return answer;const bgTone=color.background(scheme).getTone(scheme),desiredRatio=color.contrastCurve(scheme).get(scheme.contrastLevel);if(answer=Contrast.ratioOfTones(bgTone,answer)>=desiredRatio&&scheme.contrastLevel>=0?answer:DynamicColor.foregroundTone(bgTone,desiredRatio),color.isBackground&&!color.name.endsWith("_fixed_dim")&&(answer>=57?answer=clampDouble(65,100,answer):answer=clampDouble(0,49,answer)),color.secondBackground==null||color.secondBackground(scheme)===void 0)return answer;const[bg1,bg2]=[color.background,color.secondBackground],[bgTone1,bgTone2]=[bg1(scheme).getTone(scheme),bg2(scheme).getTone(scheme)],[upper,lower]=[Math.max(bgTone1,bgTone2),Math.min(bgTone1,bgTone2)];if(Contrast.ratioOfTones(upper,answer)>=desiredRatio&&Contrast.ratioOfTones(lower,answer)>=desiredRatio)return answer;const lightOption=Contrast.lighter(upper,desiredRatio),darkOption=Contrast.darker(lower,desiredRatio),availables=[];return lightOption!==-1&&availables.push(lightOption),darkOption!==-1&&availables.push(darkOption),DynamicColor.tonePrefersLightForeground(bgTone1)||DynamicColor.tonePrefersLightForeground(bgTone2)?lightOption<0?100:lightOption:availables.length===1?availables[0]:darkOption<0?0:darkOption}}}const spec2021=new ColorCalculationDelegateImpl2021,spec2025=new ColorCalculationDelegateImpl2025;function getSpec(specVersion){return specVersion==="2025"?spec2025:spec2021}/**
|
|
152
|
+
* @license
|
|
153
|
+
* Copyright 2021 Google LLC
|
|
154
|
+
*
|
|
155
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
156
|
+
* you may not use this file except in compliance with the License.
|
|
157
|
+
* You may obtain a copy of the License at
|
|
158
|
+
*
|
|
159
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
160
|
+
*
|
|
161
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
162
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
163
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
164
|
+
* See the License for the specific language governing permissions and
|
|
165
|
+
* limitations under the License.
|
|
166
|
+
*/class TonalPalette{static fromInt(argb){const hct=Hct.fromInt(argb);return TonalPalette.fromHct(hct)}static fromHct(hct){return new TonalPalette(hct.hue,hct.chroma,hct)}static fromHueAndChroma(hue,chroma){const keyColor=new KeyColor(hue,chroma).create();return new TonalPalette(hue,chroma,keyColor)}constructor(hue,chroma,keyColor){this.hue=hue,this.chroma=chroma,this.keyColor=keyColor,this.cache=new Map}tone(tone){let argb=this.cache.get(tone);return argb===void 0&&(tone==99&&Hct.isYellow(this.hue)?argb=this.averageArgb(this.tone(98),this.tone(100)):argb=Hct.from(this.hue,this.chroma,tone).toInt(),this.cache.set(tone,argb)),argb}getHct(tone){return Hct.fromInt(this.tone(tone))}averageArgb(argb1,argb2){const red1=argb1>>>16&255,green1=argb1>>>8&255,blue1=argb1&255,red2=argb2>>>16&255,green2=argb2>>>8&255,blue2=argb2&255,red=Math.round((red1+red2)/2),green=Math.round((green1+green2)/2),blue=Math.round((blue1+blue2)/2);return(255<<24|(red&255)<<16|(green&255)<<8|blue&255)>>>0}}class KeyColor{constructor(hue,requestedChroma){this.hue=hue,this.requestedChroma=requestedChroma,this.chromaCache=new Map,this.maxChromaValue=200}create(){let lowerTone=0,upperTone=100;for(;lowerTone<upperTone;){const midTone=Math.floor((lowerTone+upperTone)/2),isAscending=this.maxChroma(midTone)<this.maxChroma(midTone+1);if(this.maxChroma(midTone)>=this.requestedChroma-.01)if(Math.abs(lowerTone-50)<Math.abs(upperTone-50))upperTone=midTone;else{if(lowerTone===midTone)return Hct.from(this.hue,this.requestedChroma,lowerTone);lowerTone=midTone}else isAscending?lowerTone=midTone+1:upperTone=midTone}return Hct.from(this.hue,this.requestedChroma,lowerTone)}maxChroma(tone){if(this.chromaCache.has(tone))return this.chromaCache.get(tone);const chroma=Hct.from(this.hue,this.maxChromaValue,tone).chroma;return this.chromaCache.set(tone,chroma),chroma}}/**
|
|
167
|
+
* @license
|
|
168
|
+
* Copyright 2023 Google LLC
|
|
169
|
+
*
|
|
170
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
171
|
+
* you may not use this file except in compliance with the License.
|
|
172
|
+
* You may obtain a copy of the License at
|
|
173
|
+
*
|
|
174
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
175
|
+
*
|
|
176
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
177
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
178
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
179
|
+
* See the License for the specific language governing permissions and
|
|
180
|
+
* limitations under the License.
|
|
181
|
+
*/class ContrastCurve{constructor(low,normal,medium,high){this.low=low,this.normal=normal,this.medium=medium,this.high=high}get(contrastLevel){return contrastLevel<=-1?this.low:contrastLevel<0?lerp(this.low,this.normal,(contrastLevel- -1)/1):contrastLevel<.5?lerp(this.normal,this.medium,(contrastLevel-0)/.5):contrastLevel<1?lerp(this.medium,this.high,(contrastLevel-.5)/.5):this.high}}/**
|
|
182
|
+
* @license
|
|
183
|
+
* Copyright 2023 Google LLC
|
|
184
|
+
*
|
|
185
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
186
|
+
* you may not use this file except in compliance with the License.
|
|
187
|
+
* You may obtain a copy of the License at
|
|
188
|
+
*
|
|
189
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
190
|
+
*
|
|
191
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
192
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
193
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
194
|
+
* See the License for the specific language governing permissions and
|
|
195
|
+
* limitations under the License.
|
|
196
|
+
*/class ToneDeltaPair{constructor(roleA,roleB,delta,polarity,stayTogether,constraint){this.roleA=roleA,this.roleB=roleB,this.delta=delta,this.polarity=polarity,this.stayTogether=stayTogether,this.constraint=constraint,this.constraint=constraint??"exact"}}/**
|
|
197
|
+
* @license
|
|
198
|
+
* Copyright 2022 Google LLC
|
|
199
|
+
*
|
|
200
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
201
|
+
* you may not use this file except in compliance with the License.
|
|
202
|
+
* You may obtain a copy of the License at
|
|
203
|
+
*
|
|
204
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
205
|
+
*
|
|
206
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
207
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
208
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
209
|
+
* See the License for the specific language governing permissions and
|
|
210
|
+
* limitations under the License.
|
|
211
|
+
*/var Variant;(function(Variant2){Variant2[Variant2.MONOCHROME=0]="MONOCHROME",Variant2[Variant2.NEUTRAL=1]="NEUTRAL",Variant2[Variant2.TONAL_SPOT=2]="TONAL_SPOT",Variant2[Variant2.VIBRANT=3]="VIBRANT",Variant2[Variant2.EXPRESSIVE=4]="EXPRESSIVE",Variant2[Variant2.FIDELITY=5]="FIDELITY",Variant2[Variant2.CONTENT=6]="CONTENT",Variant2[Variant2.RAINBOW=7]="RAINBOW",Variant2[Variant2.FRUIT_SALAD=8]="FRUIT_SALAD"})(Variant||(Variant={}));/**
|
|
212
|
+
* @license
|
|
213
|
+
* Copyright 2025 Google LLC
|
|
214
|
+
*
|
|
215
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
216
|
+
* you may not use this file except in compliance with the License.
|
|
217
|
+
* You may obtain a copy of the License at
|
|
218
|
+
*
|
|
219
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
220
|
+
*
|
|
221
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
222
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
223
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
224
|
+
* See the License for the specific language governing permissions and
|
|
225
|
+
* limitations under the License.
|
|
226
|
+
*/function isFidelity(scheme){return scheme.variant===Variant.FIDELITY||scheme.variant===Variant.CONTENT}function isMonochrome(scheme){return scheme.variant===Variant.MONOCHROME}function findDesiredChromaByTone(hue,chroma,tone,byDecreasingTone){let answer=tone,closestToChroma=Hct.from(hue,chroma,tone);if(closestToChroma.chroma<chroma){let chromaPeak=closestToChroma.chroma;for(;closestToChroma.chroma<chroma;){answer+=byDecreasingTone?-1:1;const potentialSolution=Hct.from(hue,chroma,answer);if(chromaPeak>potentialSolution.chroma||Math.abs(potentialSolution.chroma-chroma)<.4)break;const potentialDelta=Math.abs(potentialSolution.chroma-chroma),currentDelta=Math.abs(closestToChroma.chroma-chroma);potentialDelta<currentDelta&&(closestToChroma=potentialSolution),chromaPeak=Math.max(chromaPeak,potentialSolution.chroma)}}return answer}class ColorSpecDelegateImpl2021{primaryPaletteKeyColor(){return DynamicColor.fromPalette({name:"primary_palette_key_color",palette:s=>s.primaryPalette,tone:s=>s.primaryPalette.keyColor.tone})}secondaryPaletteKeyColor(){return DynamicColor.fromPalette({name:"secondary_palette_key_color",palette:s=>s.secondaryPalette,tone:s=>s.secondaryPalette.keyColor.tone})}tertiaryPaletteKeyColor(){return DynamicColor.fromPalette({name:"tertiary_palette_key_color",palette:s=>s.tertiaryPalette,tone:s=>s.tertiaryPalette.keyColor.tone})}neutralPaletteKeyColor(){return DynamicColor.fromPalette({name:"neutral_palette_key_color",palette:s=>s.neutralPalette,tone:s=>s.neutralPalette.keyColor.tone})}neutralVariantPaletteKeyColor(){return DynamicColor.fromPalette({name:"neutral_variant_palette_key_color",palette:s=>s.neutralVariantPalette,tone:s=>s.neutralVariantPalette.keyColor.tone})}errorPaletteKeyColor(){return DynamicColor.fromPalette({name:"error_palette_key_color",palette:s=>s.errorPalette,tone:s=>s.errorPalette.keyColor.tone})}background(){return DynamicColor.fromPalette({name:"background",palette:s=>s.neutralPalette,tone:s=>s.isDark?6:98,isBackground:!0})}onBackground(){return DynamicColor.fromPalette({name:"on_background",palette:s=>s.neutralPalette,tone:s=>s.isDark?90:10,background:s=>this.background(),contrastCurve:s=>new ContrastCurve(3,3,4.5,7)})}surface(){return DynamicColor.fromPalette({name:"surface",palette:s=>s.neutralPalette,tone:s=>s.isDark?6:98,isBackground:!0})}surfaceDim(){return DynamicColor.fromPalette({name:"surface_dim",palette:s=>s.neutralPalette,tone:s=>s.isDark?6:new ContrastCurve(87,87,80,75).get(s.contrastLevel),isBackground:!0})}surfaceBright(){return DynamicColor.fromPalette({name:"surface_bright",palette:s=>s.neutralPalette,tone:s=>s.isDark?new ContrastCurve(24,24,29,34).get(s.contrastLevel):98,isBackground:!0})}surfaceContainerLowest(){return DynamicColor.fromPalette({name:"surface_container_lowest",palette:s=>s.neutralPalette,tone:s=>s.isDark?new ContrastCurve(4,4,2,0).get(s.contrastLevel):100,isBackground:!0})}surfaceContainerLow(){return DynamicColor.fromPalette({name:"surface_container_low",palette:s=>s.neutralPalette,tone:s=>s.isDark?new ContrastCurve(10,10,11,12).get(s.contrastLevel):new ContrastCurve(96,96,96,95).get(s.contrastLevel),isBackground:!0})}surfaceContainer(){return DynamicColor.fromPalette({name:"surface_container",palette:s=>s.neutralPalette,tone:s=>s.isDark?new ContrastCurve(12,12,16,20).get(s.contrastLevel):new ContrastCurve(94,94,92,90).get(s.contrastLevel),isBackground:!0})}surfaceContainerHigh(){return DynamicColor.fromPalette({name:"surface_container_high",palette:s=>s.neutralPalette,tone:s=>s.isDark?new ContrastCurve(17,17,21,25).get(s.contrastLevel):new ContrastCurve(92,92,88,85).get(s.contrastLevel),isBackground:!0})}surfaceContainerHighest(){return DynamicColor.fromPalette({name:"surface_container_highest",palette:s=>s.neutralPalette,tone:s=>s.isDark?new ContrastCurve(22,22,26,30).get(s.contrastLevel):new ContrastCurve(90,90,84,80).get(s.contrastLevel),isBackground:!0})}onSurface(){return DynamicColor.fromPalette({name:"on_surface",palette:s=>s.neutralPalette,tone:s=>s.isDark?90:10,background:s=>this.highestSurface(s),contrastCurve:s=>new ContrastCurve(4.5,7,11,21)})}surfaceVariant(){return DynamicColor.fromPalette({name:"surface_variant",palette:s=>s.neutralVariantPalette,tone:s=>s.isDark?30:90,isBackground:!0})}onSurfaceVariant(){return DynamicColor.fromPalette({name:"on_surface_variant",palette:s=>s.neutralVariantPalette,tone:s=>s.isDark?80:30,background:s=>this.highestSurface(s),contrastCurve:s=>new ContrastCurve(3,4.5,7,11)})}inverseSurface(){return DynamicColor.fromPalette({name:"inverse_surface",palette:s=>s.neutralPalette,tone:s=>s.isDark?90:20,isBackground:!0})}inverseOnSurface(){return DynamicColor.fromPalette({name:"inverse_on_surface",palette:s=>s.neutralPalette,tone:s=>s.isDark?20:95,background:s=>this.inverseSurface(),contrastCurve:s=>new ContrastCurve(4.5,7,11,21)})}outline(){return DynamicColor.fromPalette({name:"outline",palette:s=>s.neutralVariantPalette,tone:s=>s.isDark?60:50,background:s=>this.highestSurface(s),contrastCurve:s=>new ContrastCurve(1.5,3,4.5,7)})}outlineVariant(){return DynamicColor.fromPalette({name:"outline_variant",palette:s=>s.neutralVariantPalette,tone:s=>s.isDark?30:80,background:s=>this.highestSurface(s),contrastCurve:s=>new ContrastCurve(1,1,3,4.5)})}shadow(){return DynamicColor.fromPalette({name:"shadow",palette:s=>s.neutralPalette,tone:s=>0})}scrim(){return DynamicColor.fromPalette({name:"scrim",palette:s=>s.neutralPalette,tone:s=>0})}surfaceTint(){return DynamicColor.fromPalette({name:"surface_tint",palette:s=>s.primaryPalette,tone:s=>s.isDark?80:40,isBackground:!0})}primary(){return DynamicColor.fromPalette({name:"primary",palette:s=>s.primaryPalette,tone:s=>isMonochrome(s)?s.isDark?100:0:s.isDark?80:40,isBackground:!0,background:s=>this.highestSurface(s),contrastCurve:s=>new ContrastCurve(3,4.5,7,7),toneDeltaPair:s=>new ToneDeltaPair(this.primaryContainer(),this.primary(),10,"nearer",!1)})}primaryDim(){}onPrimary(){return DynamicColor.fromPalette({name:"on_primary",palette:s=>s.primaryPalette,tone:s=>isMonochrome(s)?s.isDark?10:90:s.isDark?20:100,background:s=>this.primary(),contrastCurve:s=>new ContrastCurve(4.5,7,11,21)})}primaryContainer(){return DynamicColor.fromPalette({name:"primary_container",palette:s=>s.primaryPalette,tone:s=>isFidelity(s)?s.sourceColorHct.tone:isMonochrome(s)?s.isDark?85:25:s.isDark?30:90,isBackground:!0,background:s=>this.highestSurface(s),contrastCurve:s=>new ContrastCurve(1,1,3,4.5),toneDeltaPair:s=>new ToneDeltaPair(this.primaryContainer(),this.primary(),10,"nearer",!1)})}onPrimaryContainer(){return DynamicColor.fromPalette({name:"on_primary_container",palette:s=>s.primaryPalette,tone:s=>isFidelity(s)?DynamicColor.foregroundTone(this.primaryContainer().tone(s),4.5):isMonochrome(s)?s.isDark?0:100:s.isDark?90:30,background:s=>this.primaryContainer(),contrastCurve:s=>new ContrastCurve(3,4.5,7,11)})}inversePrimary(){return DynamicColor.fromPalette({name:"inverse_primary",palette:s=>s.primaryPalette,tone:s=>s.isDark?40:80,background:s=>this.inverseSurface(),contrastCurve:s=>new ContrastCurve(3,4.5,7,7)})}secondary(){return DynamicColor.fromPalette({name:"secondary",palette:s=>s.secondaryPalette,tone:s=>s.isDark?80:40,isBackground:!0,background:s=>this.highestSurface(s),contrastCurve:s=>new ContrastCurve(3,4.5,7,7),toneDeltaPair:s=>new ToneDeltaPair(this.secondaryContainer(),this.secondary(),10,"nearer",!1)})}secondaryDim(){}onSecondary(){return DynamicColor.fromPalette({name:"on_secondary",palette:s=>s.secondaryPalette,tone:s=>isMonochrome(s)?s.isDark?10:100:s.isDark?20:100,background:s=>this.secondary(),contrastCurve:s=>new ContrastCurve(4.5,7,11,21)})}secondaryContainer(){return DynamicColor.fromPalette({name:"secondary_container",palette:s=>s.secondaryPalette,tone:s=>{const initialTone=s.isDark?30:90;return isMonochrome(s)?s.isDark?30:85:isFidelity(s)?findDesiredChromaByTone(s.secondaryPalette.hue,s.secondaryPalette.chroma,initialTone,!s.isDark):initialTone},isBackground:!0,background:s=>this.highestSurface(s),contrastCurve:s=>new ContrastCurve(1,1,3,4.5),toneDeltaPair:s=>new ToneDeltaPair(this.secondaryContainer(),this.secondary(),10,"nearer",!1)})}onSecondaryContainer(){return DynamicColor.fromPalette({name:"on_secondary_container",palette:s=>s.secondaryPalette,tone:s=>isMonochrome(s)?s.isDark?90:10:isFidelity(s)?DynamicColor.foregroundTone(this.secondaryContainer().tone(s),4.5):s.isDark?90:30,background:s=>this.secondaryContainer(),contrastCurve:s=>new ContrastCurve(3,4.5,7,11)})}tertiary(){return DynamicColor.fromPalette({name:"tertiary",palette:s=>s.tertiaryPalette,tone:s=>isMonochrome(s)?s.isDark?90:25:s.isDark?80:40,isBackground:!0,background:s=>this.highestSurface(s),contrastCurve:s=>new ContrastCurve(3,4.5,7,7),toneDeltaPair:s=>new ToneDeltaPair(this.tertiaryContainer(),this.tertiary(),10,"nearer",!1)})}tertiaryDim(){}onTertiary(){return DynamicColor.fromPalette({name:"on_tertiary",palette:s=>s.tertiaryPalette,tone:s=>isMonochrome(s)?s.isDark?10:90:s.isDark?20:100,background:s=>this.tertiary(),contrastCurve:s=>new ContrastCurve(4.5,7,11,21)})}tertiaryContainer(){return DynamicColor.fromPalette({name:"tertiary_container",palette:s=>s.tertiaryPalette,tone:s=>{if(isMonochrome(s))return s.isDark?60:49;if(!isFidelity(s))return s.isDark?30:90;const proposedHct=s.tertiaryPalette.getHct(s.sourceColorHct.tone);return DislikeAnalyzer.fixIfDisliked(proposedHct).tone},isBackground:!0,background:s=>this.highestSurface(s),contrastCurve:s=>new ContrastCurve(1,1,3,4.5),toneDeltaPair:s=>new ToneDeltaPair(this.tertiaryContainer(),this.tertiary(),10,"nearer",!1)})}onTertiaryContainer(){return DynamicColor.fromPalette({name:"on_tertiary_container",palette:s=>s.tertiaryPalette,tone:s=>isMonochrome(s)?s.isDark?0:100:isFidelity(s)?DynamicColor.foregroundTone(this.tertiaryContainer().tone(s),4.5):s.isDark?90:30,background:s=>this.tertiaryContainer(),contrastCurve:s=>new ContrastCurve(3,4.5,7,11)})}error(){return DynamicColor.fromPalette({name:"error",palette:s=>s.errorPalette,tone:s=>s.isDark?80:40,isBackground:!0,background:s=>this.highestSurface(s),contrastCurve:s=>new ContrastCurve(3,4.5,7,7),toneDeltaPair:s=>new ToneDeltaPair(this.errorContainer(),this.error(),10,"nearer",!1)})}errorDim(){}onError(){return DynamicColor.fromPalette({name:"on_error",palette:s=>s.errorPalette,tone:s=>s.isDark?20:100,background:s=>this.error(),contrastCurve:s=>new ContrastCurve(4.5,7,11,21)})}errorContainer(){return DynamicColor.fromPalette({name:"error_container",palette:s=>s.errorPalette,tone:s=>s.isDark?30:90,isBackground:!0,background:s=>this.highestSurface(s),contrastCurve:s=>new ContrastCurve(1,1,3,4.5),toneDeltaPair:s=>new ToneDeltaPair(this.errorContainer(),this.error(),10,"nearer",!1)})}onErrorContainer(){return DynamicColor.fromPalette({name:"on_error_container",palette:s=>s.errorPalette,tone:s=>isMonochrome(s)?s.isDark?90:10:s.isDark?90:30,background:s=>this.errorContainer(),contrastCurve:s=>new ContrastCurve(3,4.5,7,11)})}primaryFixed(){return DynamicColor.fromPalette({name:"primary_fixed",palette:s=>s.primaryPalette,tone:s=>isMonochrome(s)?40:90,isBackground:!0,background:s=>this.highestSurface(s),contrastCurve:s=>new ContrastCurve(1,1,3,4.5),toneDeltaPair:s=>new ToneDeltaPair(this.primaryFixed(),this.primaryFixedDim(),10,"lighter",!0)})}primaryFixedDim(){return DynamicColor.fromPalette({name:"primary_fixed_dim",palette:s=>s.primaryPalette,tone:s=>isMonochrome(s)?30:80,isBackground:!0,background:s=>this.highestSurface(s),contrastCurve:s=>new ContrastCurve(1,1,3,4.5),toneDeltaPair:s=>new ToneDeltaPair(this.primaryFixed(),this.primaryFixedDim(),10,"lighter",!0)})}onPrimaryFixed(){return DynamicColor.fromPalette({name:"on_primary_fixed",palette:s=>s.primaryPalette,tone:s=>isMonochrome(s)?100:10,background:s=>this.primaryFixedDim(),secondBackground:s=>this.primaryFixed(),contrastCurve:s=>new ContrastCurve(4.5,7,11,21)})}onPrimaryFixedVariant(){return DynamicColor.fromPalette({name:"on_primary_fixed_variant",palette:s=>s.primaryPalette,tone:s=>isMonochrome(s)?90:30,background:s=>this.primaryFixedDim(),secondBackground:s=>this.primaryFixed(),contrastCurve:s=>new ContrastCurve(3,4.5,7,11)})}secondaryFixed(){return DynamicColor.fromPalette({name:"secondary_fixed",palette:s=>s.secondaryPalette,tone:s=>isMonochrome(s)?80:90,isBackground:!0,background:s=>this.highestSurface(s),contrastCurve:s=>new ContrastCurve(1,1,3,4.5),toneDeltaPair:s=>new ToneDeltaPair(this.secondaryFixed(),this.secondaryFixedDim(),10,"lighter",!0)})}secondaryFixedDim(){return DynamicColor.fromPalette({name:"secondary_fixed_dim",palette:s=>s.secondaryPalette,tone:s=>isMonochrome(s)?70:80,isBackground:!0,background:s=>this.highestSurface(s),contrastCurve:s=>new ContrastCurve(1,1,3,4.5),toneDeltaPair:s=>new ToneDeltaPair(this.secondaryFixed(),this.secondaryFixedDim(),10,"lighter",!0)})}onSecondaryFixed(){return DynamicColor.fromPalette({name:"on_secondary_fixed",palette:s=>s.secondaryPalette,tone:s=>10,background:s=>this.secondaryFixedDim(),secondBackground:s=>this.secondaryFixed(),contrastCurve:s=>new ContrastCurve(4.5,7,11,21)})}onSecondaryFixedVariant(){return DynamicColor.fromPalette({name:"on_secondary_fixed_variant",palette:s=>s.secondaryPalette,tone:s=>isMonochrome(s)?25:30,background:s=>this.secondaryFixedDim(),secondBackground:s=>this.secondaryFixed(),contrastCurve:s=>new ContrastCurve(3,4.5,7,11)})}tertiaryFixed(){return DynamicColor.fromPalette({name:"tertiary_fixed",palette:s=>s.tertiaryPalette,tone:s=>isMonochrome(s)?40:90,isBackground:!0,background:s=>this.highestSurface(s),contrastCurve:s=>new ContrastCurve(1,1,3,4.5),toneDeltaPair:s=>new ToneDeltaPair(this.tertiaryFixed(),this.tertiaryFixedDim(),10,"lighter",!0)})}tertiaryFixedDim(){return DynamicColor.fromPalette({name:"tertiary_fixed_dim",palette:s=>s.tertiaryPalette,tone:s=>isMonochrome(s)?30:80,isBackground:!0,background:s=>this.highestSurface(s),contrastCurve:s=>new ContrastCurve(1,1,3,4.5),toneDeltaPair:s=>new ToneDeltaPair(this.tertiaryFixed(),this.tertiaryFixedDim(),10,"lighter",!0)})}onTertiaryFixed(){return DynamicColor.fromPalette({name:"on_tertiary_fixed",palette:s=>s.tertiaryPalette,tone:s=>isMonochrome(s)?100:10,background:s=>this.tertiaryFixedDim(),secondBackground:s=>this.tertiaryFixed(),contrastCurve:s=>new ContrastCurve(4.5,7,11,21)})}onTertiaryFixedVariant(){return DynamicColor.fromPalette({name:"on_tertiary_fixed_variant",palette:s=>s.tertiaryPalette,tone:s=>isMonochrome(s)?90:30,background:s=>this.tertiaryFixedDim(),secondBackground:s=>this.tertiaryFixed(),contrastCurve:s=>new ContrastCurve(3,4.5,7,11)})}highestSurface(s){return s.isDark?this.surfaceBright():this.surfaceDim()}}/**
|
|
227
|
+
* @license
|
|
228
|
+
* Copyright 2025 Google LLC
|
|
229
|
+
*
|
|
230
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
231
|
+
* you may not use this file except in compliance with the License.
|
|
232
|
+
* You may obtain a copy of the License at
|
|
233
|
+
*
|
|
234
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
235
|
+
*
|
|
236
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
237
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
238
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
239
|
+
* See the License for the specific language governing permissions and
|
|
240
|
+
* limitations under the License.
|
|
241
|
+
*/function tMaxC(palette,lowerBound=0,upperBound=100,chromaMultiplier=1){let answer=findBestToneForChroma(palette.hue,palette.chroma*chromaMultiplier,100,!0);return clampDouble(lowerBound,upperBound,answer)}function tMinC(palette,lowerBound=0,upperBound=100){let answer=findBestToneForChroma(palette.hue,palette.chroma,0,!1);return clampDouble(lowerBound,upperBound,answer)}function findBestToneForChroma(hue,chroma,tone,byDecreasingTone){let answer=tone,bestCandidate=Hct.from(hue,chroma,answer);for(;bestCandidate.chroma<chroma&&!(tone<0||tone>100);){tone+=byDecreasingTone?-1:1;const newCandidate=Hct.from(hue,chroma,tone);bestCandidate.chroma<newCandidate.chroma&&(bestCandidate=newCandidate,answer=tone)}return answer}function getCurve(defaultContrast){return defaultContrast===1.5?new ContrastCurve(1.5,1.5,3,5.5):defaultContrast===3?new ContrastCurve(3,3,4.5,7):defaultContrast===4.5?new ContrastCurve(4.5,4.5,7,11):defaultContrast===6?new ContrastCurve(6,6,7,11):defaultContrast===7?new ContrastCurve(7,7,11,21):defaultContrast===9?new ContrastCurve(9,9,11,21):defaultContrast===11?new ContrastCurve(11,11,21,21):defaultContrast===21?new ContrastCurve(21,21,21,21):new ContrastCurve(defaultContrast,defaultContrast,7,21)}class ColorSpecDelegateImpl2025 extends ColorSpecDelegateImpl2021{surface(){const color2025=DynamicColor.fromPalette({name:"surface",palette:s=>s.neutralPalette,tone:s=>(super.surface().tone(s),s.platform==="phone"?s.isDark?4:Hct.isYellow(s.neutralPalette.hue)?99:s.variant===Variant.VIBRANT?97:98:0),isBackground:!0});return extendSpecVersion(super.surface(),"2025",color2025)}surfaceDim(){const color2025=DynamicColor.fromPalette({name:"surface_dim",palette:s=>s.neutralPalette,tone:s=>s.isDark?4:Hct.isYellow(s.neutralPalette.hue)?90:s.variant===Variant.VIBRANT?85:87,isBackground:!0,chromaMultiplier:s=>{if(!s.isDark){if(s.variant===Variant.NEUTRAL)return 2.5;if(s.variant===Variant.TONAL_SPOT)return 1.7;if(s.variant===Variant.EXPRESSIVE)return Hct.isYellow(s.neutralPalette.hue)?2.7:1.75;if(s.variant===Variant.VIBRANT)return 1.36}return 1}});return extendSpecVersion(super.surfaceDim(),"2025",color2025)}surfaceBright(){const color2025=DynamicColor.fromPalette({name:"surface_bright",palette:s=>s.neutralPalette,tone:s=>s.isDark?18:Hct.isYellow(s.neutralPalette.hue)?99:s.variant===Variant.VIBRANT?97:98,isBackground:!0,chromaMultiplier:s=>{if(s.isDark){if(s.variant===Variant.NEUTRAL)return 2.5;if(s.variant===Variant.TONAL_SPOT)return 1.7;if(s.variant===Variant.EXPRESSIVE)return Hct.isYellow(s.neutralPalette.hue)?2.7:1.75;if(s.variant===Variant.VIBRANT)return 1.36}return 1}});return extendSpecVersion(super.surfaceBright(),"2025",color2025)}surfaceContainerLowest(){const color2025=DynamicColor.fromPalette({name:"surface_container_lowest",palette:s=>s.neutralPalette,tone:s=>s.isDark?0:100,isBackground:!0});return extendSpecVersion(super.surfaceContainerLowest(),"2025",color2025)}surfaceContainerLow(){const color2025=DynamicColor.fromPalette({name:"surface_container_low",palette:s=>s.neutralPalette,tone:s=>s.platform==="phone"?s.isDark?6:Hct.isYellow(s.neutralPalette.hue)?98:s.variant===Variant.VIBRANT?95:96:15,isBackground:!0,chromaMultiplier:s=>{if(s.platform==="phone"){if(s.variant===Variant.NEUTRAL)return 1.3;if(s.variant===Variant.TONAL_SPOT)return 1.25;if(s.variant===Variant.EXPRESSIVE)return Hct.isYellow(s.neutralPalette.hue)?1.3:1.15;if(s.variant===Variant.VIBRANT)return 1.08}return 1}});return extendSpecVersion(super.surfaceContainerLow(),"2025",color2025)}surfaceContainer(){const color2025=DynamicColor.fromPalette({name:"surface_container",palette:s=>s.neutralPalette,tone:s=>s.platform==="phone"?s.isDark?9:Hct.isYellow(s.neutralPalette.hue)?96:s.variant===Variant.VIBRANT?92:94:20,isBackground:!0,chromaMultiplier:s=>{if(s.platform==="phone"){if(s.variant===Variant.NEUTRAL)return 1.6;if(s.variant===Variant.TONAL_SPOT)return 1.4;if(s.variant===Variant.EXPRESSIVE)return Hct.isYellow(s.neutralPalette.hue)?1.6:1.3;if(s.variant===Variant.VIBRANT)return 1.15}return 1}});return extendSpecVersion(super.surfaceContainer(),"2025",color2025)}surfaceContainerHigh(){const color2025=DynamicColor.fromPalette({name:"surface_container_high",palette:s=>s.neutralPalette,tone:s=>s.platform==="phone"?s.isDark?12:Hct.isYellow(s.neutralPalette.hue)?94:s.variant===Variant.VIBRANT?90:92:25,isBackground:!0,chromaMultiplier:s=>{if(s.platform==="phone"){if(s.variant===Variant.NEUTRAL)return 1.9;if(s.variant===Variant.TONAL_SPOT)return 1.5;if(s.variant===Variant.EXPRESSIVE)return Hct.isYellow(s.neutralPalette.hue)?1.95:1.45;if(s.variant===Variant.VIBRANT)return 1.22}return 1}});return extendSpecVersion(super.surfaceContainerHigh(),"2025",color2025)}surfaceContainerHighest(){const color2025=DynamicColor.fromPalette({name:"surface_container_highest",palette:s=>s.neutralPalette,tone:s=>s.isDark?15:Hct.isYellow(s.neutralPalette.hue)?92:s.variant===Variant.VIBRANT?88:90,isBackground:!0,chromaMultiplier:s=>s.variant===Variant.NEUTRAL?2.2:s.variant===Variant.TONAL_SPOT?1.7:s.variant===Variant.EXPRESSIVE?Hct.isYellow(s.neutralPalette.hue)?2.3:1.6:s.variant===Variant.VIBRANT?1.29:1});return extendSpecVersion(super.surfaceContainerHighest(),"2025",color2025)}onSurface(){const color2025=DynamicColor.fromPalette({name:"on_surface",palette:s=>s.neutralPalette,tone:s=>s.variant===Variant.VIBRANT?tMaxC(s.neutralPalette,0,100,1.1):DynamicColor.getInitialToneFromBackground(s2=>s2.platform==="phone"?this.highestSurface(s2):this.surfaceContainerHigh())(s),chromaMultiplier:s=>{if(s.platform==="phone"){if(s.variant===Variant.NEUTRAL)return 2.2;if(s.variant===Variant.TONAL_SPOT)return 1.7;if(s.variant===Variant.EXPRESSIVE)return Hct.isYellow(s.neutralPalette.hue)?s.isDark?3:2.3:1.6}return 1},background:s=>s.platform==="phone"?this.highestSurface(s):this.surfaceContainerHigh(),contrastCurve:s=>s.isDark&&s.platform==="phone"?getCurve(11):getCurve(9)});return extendSpecVersion(super.onSurface(),"2025",color2025)}onSurfaceVariant(){const color2025=DynamicColor.fromPalette({name:"on_surface_variant",palette:s=>s.neutralPalette,chromaMultiplier:s=>{if(s.platform==="phone"){if(s.variant===Variant.NEUTRAL)return 2.2;if(s.variant===Variant.TONAL_SPOT)return 1.7;if(s.variant===Variant.EXPRESSIVE)return Hct.isYellow(s.neutralPalette.hue)?s.isDark?3:2.3:1.6}return 1},background:s=>s.platform==="phone"?this.highestSurface(s):this.surfaceContainerHigh(),contrastCurve:s=>s.platform==="phone"?s.isDark?getCurve(6):getCurve(4.5):getCurve(7)});return extendSpecVersion(super.onSurfaceVariant(),"2025",color2025)}outline(){const color2025=DynamicColor.fromPalette({name:"outline",palette:s=>s.neutralPalette,chromaMultiplier:s=>{if(s.platform==="phone"){if(s.variant===Variant.NEUTRAL)return 2.2;if(s.variant===Variant.TONAL_SPOT)return 1.7;if(s.variant===Variant.EXPRESSIVE)return Hct.isYellow(s.neutralPalette.hue)?s.isDark?3:2.3:1.6}return 1},background:s=>s.platform==="phone"?this.highestSurface(s):this.surfaceContainerHigh(),contrastCurve:s=>s.platform==="phone"?getCurve(3):getCurve(4.5)});return extendSpecVersion(super.outline(),"2025",color2025)}outlineVariant(){const color2025=DynamicColor.fromPalette({name:"outline_variant",palette:s=>s.neutralPalette,chromaMultiplier:s=>{if(s.platform==="phone"){if(s.variant===Variant.NEUTRAL)return 2.2;if(s.variant===Variant.TONAL_SPOT)return 1.7;if(s.variant===Variant.EXPRESSIVE)return Hct.isYellow(s.neutralPalette.hue)?s.isDark?3:2.3:1.6}return 1},background:s=>s.platform==="phone"?this.highestSurface(s):this.surfaceContainerHigh(),contrastCurve:s=>s.platform==="phone"?getCurve(1.5):getCurve(3)});return extendSpecVersion(super.outlineVariant(),"2025",color2025)}inverseSurface(){const color2025=DynamicColor.fromPalette({name:"inverse_surface",palette:s=>s.neutralPalette,tone:s=>s.isDark?98:4,isBackground:!0});return extendSpecVersion(super.inverseSurface(),"2025",color2025)}inverseOnSurface(){const color2025=DynamicColor.fromPalette({name:"inverse_on_surface",palette:s=>s.neutralPalette,background:s=>this.inverseSurface(),contrastCurve:s=>getCurve(7)});return extendSpecVersion(super.inverseOnSurface(),"2025",color2025)}primary(){const color2025=DynamicColor.fromPalette({name:"primary",palette:s=>s.primaryPalette,tone:s=>s.variant===Variant.NEUTRAL?s.platform==="phone"?s.isDark?80:40:90:s.variant===Variant.TONAL_SPOT?s.platform==="phone"?s.isDark?80:tMaxC(s.primaryPalette):tMaxC(s.primaryPalette,0,90):s.variant===Variant.EXPRESSIVE?s.platform==="phone"?tMaxC(s.primaryPalette,0,Hct.isYellow(s.primaryPalette.hue)?25:Hct.isCyan(s.primaryPalette.hue)?88:98):tMaxC(s.primaryPalette):s.platform==="phone"?tMaxC(s.primaryPalette,0,Hct.isCyan(s.primaryPalette.hue)?88:98):tMaxC(s.primaryPalette),isBackground:!0,background:s=>s.platform==="phone"?this.highestSurface(s):this.surfaceContainerHigh(),contrastCurve:s=>s.platform==="phone"?getCurve(4.5):getCurve(7),toneDeltaPair:s=>s.platform==="phone"?new ToneDeltaPair(this.primaryContainer(),this.primary(),5,"relative_lighter",!0,"farther"):void 0});return extendSpecVersion(super.primary(),"2025",color2025)}primaryDim(){return DynamicColor.fromPalette({name:"primary_dim",palette:s=>s.primaryPalette,tone:s=>s.variant===Variant.NEUTRAL?85:s.variant===Variant.TONAL_SPOT?tMaxC(s.primaryPalette,0,90):tMaxC(s.primaryPalette),isBackground:!0,background:s=>this.surfaceContainerHigh(),contrastCurve:s=>getCurve(4.5),toneDeltaPair:s=>new ToneDeltaPair(this.primaryDim(),this.primary(),5,"darker",!0,"farther")})}onPrimary(){const color2025=DynamicColor.fromPalette({name:"on_primary",palette:s=>s.primaryPalette,background:s=>s.platform==="phone"?this.primary():this.primaryDim(),contrastCurve:s=>s.platform==="phone"?getCurve(6):getCurve(7)});return extendSpecVersion(super.onPrimary(),"2025",color2025)}primaryContainer(){const color2025=DynamicColor.fromPalette({name:"primary_container",palette:s=>s.primaryPalette,tone:s=>s.platform==="watch"?30:s.variant===Variant.NEUTRAL?s.isDark?30:90:s.variant===Variant.TONAL_SPOT?s.isDark?tMinC(s.primaryPalette,35,93):tMaxC(s.primaryPalette,0,90):s.variant===Variant.EXPRESSIVE?s.isDark?tMaxC(s.primaryPalette,30,93):tMaxC(s.primaryPalette,78,Hct.isCyan(s.primaryPalette.hue)?88:90):s.isDark?tMinC(s.primaryPalette,66,93):tMaxC(s.primaryPalette,66,Hct.isCyan(s.primaryPalette.hue)?88:93),isBackground:!0,background:s=>s.platform==="phone"?this.highestSurface(s):void 0,toneDeltaPair:s=>s.platform==="phone"?void 0:new ToneDeltaPair(this.primaryContainer(),this.primaryDim(),10,"darker",!0,"farther"),contrastCurve:s=>s.platform==="phone"&&s.contrastLevel>0?getCurve(1.5):void 0});return extendSpecVersion(super.primaryContainer(),"2025",color2025)}onPrimaryContainer(){const color2025=DynamicColor.fromPalette({name:"on_primary_container",palette:s=>s.primaryPalette,background:s=>this.primaryContainer(),contrastCurve:s=>s.platform==="phone"?getCurve(6):getCurve(7)});return extendSpecVersion(super.onPrimaryContainer(),"2025",color2025)}primaryFixed(){const color2025=DynamicColor.fromPalette({name:"primary_fixed",palette:s=>s.primaryPalette,tone:s=>{let tempS=Object.assign({},s,{isDark:!1,contrastLevel:0});return this.primaryContainer().getTone(tempS)},isBackground:!0,background:s=>s.platform==="phone"?this.highestSurface(s):void 0,contrastCurve:s=>s.platform==="phone"&&s.contrastLevel>0?getCurve(1.5):void 0});return extendSpecVersion(super.primaryFixed(),"2025",color2025)}primaryFixedDim(){const color2025=DynamicColor.fromPalette({name:"primary_fixed_dim",palette:s=>s.primaryPalette,tone:s=>this.primaryFixed().getTone(s),isBackground:!0,toneDeltaPair:s=>new ToneDeltaPair(this.primaryFixedDim(),this.primaryFixed(),5,"darker",!0,"exact")});return extendSpecVersion(super.primaryFixedDim(),"2025",color2025)}onPrimaryFixed(){const color2025=DynamicColor.fromPalette({name:"on_primary_fixed",palette:s=>s.primaryPalette,background:s=>this.primaryFixedDim(),contrastCurve:s=>getCurve(7)});return extendSpecVersion(super.onPrimaryFixed(),"2025",color2025)}onPrimaryFixedVariant(){const color2025=DynamicColor.fromPalette({name:"on_primary_fixed_variant",palette:s=>s.primaryPalette,background:s=>this.primaryFixedDim(),contrastCurve:s=>getCurve(4.5)});return extendSpecVersion(super.onPrimaryFixedVariant(),"2025",color2025)}inversePrimary(){const color2025=DynamicColor.fromPalette({name:"inverse_primary",palette:s=>s.primaryPalette,tone:s=>tMaxC(s.primaryPalette),background:s=>this.inverseSurface(),contrastCurve:s=>s.platform==="phone"?getCurve(6):getCurve(7)});return extendSpecVersion(super.inversePrimary(),"2025",color2025)}secondary(){const color2025=DynamicColor.fromPalette({name:"secondary",palette:s=>s.secondaryPalette,tone:s=>s.platform==="watch"?s.variant===Variant.NEUTRAL?90:tMaxC(s.secondaryPalette,0,90):s.variant===Variant.NEUTRAL?s.isDark?tMinC(s.secondaryPalette,0,98):tMaxC(s.secondaryPalette):s.variant===Variant.VIBRANT?tMaxC(s.secondaryPalette,0,s.isDark?90:98):s.isDark?80:tMaxC(s.secondaryPalette),isBackground:!0,background:s=>s.platform==="phone"?this.highestSurface(s):this.surfaceContainerHigh(),contrastCurve:s=>s.platform==="phone"?getCurve(4.5):getCurve(7),toneDeltaPair:s=>s.platform==="phone"?new ToneDeltaPair(this.secondaryContainer(),this.secondary(),5,"relative_lighter",!0,"farther"):void 0});return extendSpecVersion(super.secondary(),"2025",color2025)}secondaryDim(){return DynamicColor.fromPalette({name:"secondary_dim",palette:s=>s.secondaryPalette,tone:s=>s.variant===Variant.NEUTRAL?85:tMaxC(s.secondaryPalette,0,90),isBackground:!0,background:s=>this.surfaceContainerHigh(),contrastCurve:s=>getCurve(4.5),toneDeltaPair:s=>new ToneDeltaPair(this.secondaryDim(),this.secondary(),5,"darker",!0,"farther")})}onSecondary(){const color2025=DynamicColor.fromPalette({name:"on_secondary",palette:s=>s.secondaryPalette,background:s=>s.platform==="phone"?this.secondary():this.secondaryDim(),contrastCurve:s=>s.platform==="phone"?getCurve(6):getCurve(7)});return extendSpecVersion(super.onSecondary(),"2025",color2025)}secondaryContainer(){const color2025=DynamicColor.fromPalette({name:"secondary_container",palette:s=>s.secondaryPalette,tone:s=>s.platform==="watch"?30:s.variant===Variant.VIBRANT?s.isDark?tMinC(s.secondaryPalette,30,40):tMaxC(s.secondaryPalette,84,90):s.variant===Variant.EXPRESSIVE?s.isDark?15:tMaxC(s.secondaryPalette,90,95):s.isDark?25:90,isBackground:!0,background:s=>s.platform==="phone"?this.highestSurface(s):void 0,toneDeltaPair:s=>s.platform==="watch"?new ToneDeltaPair(this.secondaryContainer(),this.secondaryDim(),10,"darker",!0,"farther"):void 0,contrastCurve:s=>s.platform==="phone"&&s.contrastLevel>0?getCurve(1.5):void 0});return extendSpecVersion(super.secondaryContainer(),"2025",color2025)}onSecondaryContainer(){const color2025=DynamicColor.fromPalette({name:"on_secondary_container",palette:s=>s.secondaryPalette,background:s=>this.secondaryContainer(),contrastCurve:s=>s.platform==="phone"?getCurve(6):getCurve(7)});return extendSpecVersion(super.onSecondaryContainer(),"2025",color2025)}secondaryFixed(){const color2025=DynamicColor.fromPalette({name:"secondary_fixed",palette:s=>s.secondaryPalette,tone:s=>{let tempS=Object.assign({},s,{isDark:!1,contrastLevel:0});return this.secondaryContainer().getTone(tempS)},isBackground:!0,background:s=>s.platform==="phone"?this.highestSurface(s):void 0,contrastCurve:s=>s.platform==="phone"&&s.contrastLevel>0?getCurve(1.5):void 0});return extendSpecVersion(super.secondaryFixed(),"2025",color2025)}secondaryFixedDim(){const color2025=DynamicColor.fromPalette({name:"secondary_fixed_dim",palette:s=>s.secondaryPalette,tone:s=>this.secondaryFixed().getTone(s),isBackground:!0,toneDeltaPair:s=>new ToneDeltaPair(this.secondaryFixedDim(),this.secondaryFixed(),5,"darker",!0,"exact")});return extendSpecVersion(super.secondaryFixedDim(),"2025",color2025)}onSecondaryFixed(){const color2025=DynamicColor.fromPalette({name:"on_secondary_fixed",palette:s=>s.secondaryPalette,background:s=>this.secondaryFixedDim(),contrastCurve:s=>getCurve(7)});return extendSpecVersion(super.onSecondaryFixed(),"2025",color2025)}onSecondaryFixedVariant(){const color2025=DynamicColor.fromPalette({name:"on_secondary_fixed_variant",palette:s=>s.secondaryPalette,background:s=>this.secondaryFixedDim(),contrastCurve:s=>getCurve(4.5)});return extendSpecVersion(super.onSecondaryFixedVariant(),"2025",color2025)}tertiary(){const color2025=DynamicColor.fromPalette({name:"tertiary",palette:s=>s.tertiaryPalette,tone:s=>s.platform==="watch"?s.variant===Variant.TONAL_SPOT?tMaxC(s.tertiaryPalette,0,90):tMaxC(s.tertiaryPalette):s.variant===Variant.EXPRESSIVE||s.variant===Variant.VIBRANT?tMaxC(s.tertiaryPalette,0,Hct.isCyan(s.tertiaryPalette.hue)?88:s.isDark?98:100):s.isDark?tMaxC(s.tertiaryPalette,0,98):tMaxC(s.tertiaryPalette),isBackground:!0,background:s=>s.platform==="phone"?this.highestSurface(s):this.surfaceContainerHigh(),contrastCurve:s=>s.platform==="phone"?getCurve(4.5):getCurve(7),toneDeltaPair:s=>s.platform==="phone"?new ToneDeltaPair(this.tertiaryContainer(),this.tertiary(),5,"relative_lighter",!0,"farther"):void 0});return extendSpecVersion(super.tertiary(),"2025",color2025)}tertiaryDim(){return DynamicColor.fromPalette({name:"tertiary_dim",palette:s=>s.tertiaryPalette,tone:s=>s.variant===Variant.TONAL_SPOT?tMaxC(s.tertiaryPalette,0,90):tMaxC(s.tertiaryPalette),isBackground:!0,background:s=>this.surfaceContainerHigh(),contrastCurve:s=>getCurve(4.5),toneDeltaPair:s=>new ToneDeltaPair(this.tertiaryDim(),this.tertiary(),5,"darker",!0,"farther")})}onTertiary(){const color2025=DynamicColor.fromPalette({name:"on_tertiary",palette:s=>s.tertiaryPalette,background:s=>s.platform==="phone"?this.tertiary():this.tertiaryDim(),contrastCurve:s=>s.platform==="phone"?getCurve(6):getCurve(7)});return extendSpecVersion(super.onTertiary(),"2025",color2025)}tertiaryContainer(){const color2025=DynamicColor.fromPalette({name:"tertiary_container",palette:s=>s.tertiaryPalette,tone:s=>s.platform==="watch"?s.variant===Variant.TONAL_SPOT?tMaxC(s.tertiaryPalette,0,90):tMaxC(s.tertiaryPalette):s.variant===Variant.NEUTRAL?s.isDark?tMaxC(s.tertiaryPalette,0,93):tMaxC(s.tertiaryPalette,0,96):s.variant===Variant.TONAL_SPOT?tMaxC(s.tertiaryPalette,0,s.isDark?93:100):s.variant===Variant.EXPRESSIVE?tMaxC(s.tertiaryPalette,75,Hct.isCyan(s.tertiaryPalette.hue)?88:s.isDark?93:100):s.isDark?tMaxC(s.tertiaryPalette,0,93):tMaxC(s.tertiaryPalette,72,100),isBackground:!0,background:s=>s.platform==="phone"?this.highestSurface(s):void 0,toneDeltaPair:s=>s.platform==="watch"?new ToneDeltaPair(this.tertiaryContainer(),this.tertiaryDim(),10,"darker",!0,"farther"):void 0,contrastCurve:s=>s.platform==="phone"&&s.contrastLevel>0?getCurve(1.5):void 0});return extendSpecVersion(super.tertiaryContainer(),"2025",color2025)}onTertiaryContainer(){const color2025=DynamicColor.fromPalette({name:"on_tertiary_container",palette:s=>s.tertiaryPalette,background:s=>this.tertiaryContainer(),contrastCurve:s=>s.platform==="phone"?getCurve(6):getCurve(7)});return extendSpecVersion(super.onTertiaryContainer(),"2025",color2025)}tertiaryFixed(){const color2025=DynamicColor.fromPalette({name:"tertiary_fixed",palette:s=>s.tertiaryPalette,tone:s=>{let tempS=Object.assign({},s,{isDark:!1,contrastLevel:0});return this.tertiaryContainer().getTone(tempS)},isBackground:!0,background:s=>s.platform==="phone"?this.highestSurface(s):void 0,contrastCurve:s=>s.platform==="phone"&&s.contrastLevel>0?getCurve(1.5):void 0});return extendSpecVersion(super.tertiaryFixed(),"2025",color2025)}tertiaryFixedDim(){const color2025=DynamicColor.fromPalette({name:"tertiary_fixed_dim",palette:s=>s.tertiaryPalette,tone:s=>this.tertiaryFixed().getTone(s),isBackground:!0,toneDeltaPair:s=>new ToneDeltaPair(this.tertiaryFixedDim(),this.tertiaryFixed(),5,"darker",!0,"exact")});return extendSpecVersion(super.tertiaryFixedDim(),"2025",color2025)}onTertiaryFixed(){const color2025=DynamicColor.fromPalette({name:"on_tertiary_fixed",palette:s=>s.tertiaryPalette,background:s=>this.tertiaryFixedDim(),contrastCurve:s=>getCurve(7)});return extendSpecVersion(super.onTertiaryFixed(),"2025",color2025)}onTertiaryFixedVariant(){const color2025=DynamicColor.fromPalette({name:"on_tertiary_fixed_variant",palette:s=>s.tertiaryPalette,background:s=>this.tertiaryFixedDim(),contrastCurve:s=>getCurve(4.5)});return extendSpecVersion(super.onTertiaryFixedVariant(),"2025",color2025)}error(){const color2025=DynamicColor.fromPalette({name:"error",palette:s=>s.errorPalette,tone:s=>s.platform==="phone"?s.isDark?tMinC(s.errorPalette,0,98):tMaxC(s.errorPalette):tMinC(s.errorPalette),isBackground:!0,background:s=>s.platform==="phone"?this.highestSurface(s):this.surfaceContainerHigh(),contrastCurve:s=>s.platform==="phone"?getCurve(4.5):getCurve(7),toneDeltaPair:s=>s.platform==="phone"?new ToneDeltaPair(this.errorContainer(),this.error(),5,"relative_lighter",!0,"farther"):void 0});return extendSpecVersion(super.error(),"2025",color2025)}errorDim(){return DynamicColor.fromPalette({name:"error_dim",palette:s=>s.errorPalette,tone:s=>tMinC(s.errorPalette),isBackground:!0,background:s=>this.surfaceContainerHigh(),contrastCurve:s=>getCurve(4.5),toneDeltaPair:s=>new ToneDeltaPair(this.errorDim(),this.error(),5,"darker",!0,"farther")})}onError(){const color2025=DynamicColor.fromPalette({name:"on_error",palette:s=>s.errorPalette,background:s=>s.platform==="phone"?this.error():this.errorDim(),contrastCurve:s=>s.platform==="phone"?getCurve(6):getCurve(7)});return extendSpecVersion(super.onError(),"2025",color2025)}errorContainer(){const color2025=DynamicColor.fromPalette({name:"error_container",palette:s=>s.errorPalette,tone:s=>s.platform==="watch"?30:s.isDark?tMinC(s.errorPalette,30,93):tMaxC(s.errorPalette,0,90),isBackground:!0,background:s=>s.platform==="phone"?this.highestSurface(s):void 0,toneDeltaPair:s=>s.platform==="watch"?new ToneDeltaPair(this.errorContainer(),this.errorDim(),10,"darker",!0,"farther"):void 0,contrastCurve:s=>s.platform==="phone"&&s.contrastLevel>0?getCurve(1.5):void 0});return extendSpecVersion(super.errorContainer(),"2025",color2025)}onErrorContainer(){const color2025=DynamicColor.fromPalette({name:"on_error_container",palette:s=>s.errorPalette,background:s=>this.errorContainer(),contrastCurve:s=>s.platform==="phone"?getCurve(4.5):getCurve(7)});return extendSpecVersion(super.onErrorContainer(),"2025",color2025)}surfaceVariant(){const color2025=Object.assign(this.surfaceContainerHighest().clone(),{name:"surface_variant"});return extendSpecVersion(super.surfaceVariant(),"2025",color2025)}surfaceTint(){const color2025=Object.assign(this.primary().clone(),{name:"surface_tint"});return extendSpecVersion(super.surfaceTint(),"2025",color2025)}background(){const color2025=Object.assign(this.surface().clone(),{name:"background"});return extendSpecVersion(super.background(),"2025",color2025)}onBackground(){const color2025=Object.assign(this.onSurface().clone(),{name:"on_background",tone:s=>s.platform==="watch"?100:this.onSurface().getTone(s)});return extendSpecVersion(super.onBackground(),"2025",color2025)}}/**
|
|
242
|
+
* @license
|
|
243
|
+
* Copyright 2022 Google LLC
|
|
244
|
+
*
|
|
245
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
246
|
+
* you may not use this file except in compliance with the License.
|
|
247
|
+
* You may obtain a copy of the License at
|
|
248
|
+
*
|
|
249
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
250
|
+
*
|
|
251
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
252
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
253
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
254
|
+
* See the License for the specific language governing permissions and
|
|
255
|
+
* limitations under the License.
|
|
256
|
+
*/class MaterialDynamicColors{constructor(){this.allColors=[this.background(),this.onBackground(),this.surface(),this.surfaceDim(),this.surfaceBright(),this.surfaceContainerLowest(),this.surfaceContainerLow(),this.surfaceContainer(),this.surfaceContainerHigh(),this.surfaceContainerHighest(),this.onSurface(),this.onSurfaceVariant(),this.outline(),this.outlineVariant(),this.inverseSurface(),this.inverseOnSurface(),this.primary(),this.primaryDim(),this.onPrimary(),this.primaryContainer(),this.onPrimaryContainer(),this.primaryFixed(),this.primaryFixedDim(),this.onPrimaryFixed(),this.onPrimaryFixedVariant(),this.inversePrimary(),this.secondary(),this.secondaryDim(),this.onSecondary(),this.secondaryContainer(),this.onSecondaryContainer(),this.secondaryFixed(),this.secondaryFixedDim(),this.onSecondaryFixed(),this.onSecondaryFixedVariant(),this.tertiary(),this.tertiaryDim(),this.onTertiary(),this.tertiaryContainer(),this.onTertiaryContainer(),this.tertiaryFixed(),this.tertiaryFixedDim(),this.onTertiaryFixed(),this.onTertiaryFixedVariant(),this.error(),this.errorDim(),this.onError(),this.errorContainer(),this.onErrorContainer()].filter(c=>c!==void 0)}highestSurface(s){return MaterialDynamicColors.colorSpec.highestSurface(s)}primaryPaletteKeyColor(){return MaterialDynamicColors.colorSpec.primaryPaletteKeyColor()}secondaryPaletteKeyColor(){return MaterialDynamicColors.colorSpec.secondaryPaletteKeyColor()}tertiaryPaletteKeyColor(){return MaterialDynamicColors.colorSpec.tertiaryPaletteKeyColor()}neutralPaletteKeyColor(){return MaterialDynamicColors.colorSpec.neutralPaletteKeyColor()}neutralVariantPaletteKeyColor(){return MaterialDynamicColors.colorSpec.neutralVariantPaletteKeyColor()}errorPaletteKeyColor(){return MaterialDynamicColors.colorSpec.errorPaletteKeyColor()}background(){return MaterialDynamicColors.colorSpec.background()}onBackground(){return MaterialDynamicColors.colorSpec.onBackground()}surface(){return MaterialDynamicColors.colorSpec.surface()}surfaceDim(){return MaterialDynamicColors.colorSpec.surfaceDim()}surfaceBright(){return MaterialDynamicColors.colorSpec.surfaceBright()}surfaceContainerLowest(){return MaterialDynamicColors.colorSpec.surfaceContainerLowest()}surfaceContainerLow(){return MaterialDynamicColors.colorSpec.surfaceContainerLow()}surfaceContainer(){return MaterialDynamicColors.colorSpec.surfaceContainer()}surfaceContainerHigh(){return MaterialDynamicColors.colorSpec.surfaceContainerHigh()}surfaceContainerHighest(){return MaterialDynamicColors.colorSpec.surfaceContainerHighest()}onSurface(){return MaterialDynamicColors.colorSpec.onSurface()}surfaceVariant(){return MaterialDynamicColors.colorSpec.surfaceVariant()}onSurfaceVariant(){return MaterialDynamicColors.colorSpec.onSurfaceVariant()}outline(){return MaterialDynamicColors.colorSpec.outline()}outlineVariant(){return MaterialDynamicColors.colorSpec.outlineVariant()}inverseSurface(){return MaterialDynamicColors.colorSpec.inverseSurface()}inverseOnSurface(){return MaterialDynamicColors.colorSpec.inverseOnSurface()}shadow(){return MaterialDynamicColors.colorSpec.shadow()}scrim(){return MaterialDynamicColors.colorSpec.scrim()}surfaceTint(){return MaterialDynamicColors.colorSpec.surfaceTint()}primary(){return MaterialDynamicColors.colorSpec.primary()}primaryDim(){return MaterialDynamicColors.colorSpec.primaryDim()}onPrimary(){return MaterialDynamicColors.colorSpec.onPrimary()}primaryContainer(){return MaterialDynamicColors.colorSpec.primaryContainer()}onPrimaryContainer(){return MaterialDynamicColors.colorSpec.onPrimaryContainer()}inversePrimary(){return MaterialDynamicColors.colorSpec.inversePrimary()}primaryFixed(){return MaterialDynamicColors.colorSpec.primaryFixed()}primaryFixedDim(){return MaterialDynamicColors.colorSpec.primaryFixedDim()}onPrimaryFixed(){return MaterialDynamicColors.colorSpec.onPrimaryFixed()}onPrimaryFixedVariant(){return MaterialDynamicColors.colorSpec.onPrimaryFixedVariant()}secondary(){return MaterialDynamicColors.colorSpec.secondary()}secondaryDim(){return MaterialDynamicColors.colorSpec.secondaryDim()}onSecondary(){return MaterialDynamicColors.colorSpec.onSecondary()}secondaryContainer(){return MaterialDynamicColors.colorSpec.secondaryContainer()}onSecondaryContainer(){return MaterialDynamicColors.colorSpec.onSecondaryContainer()}secondaryFixed(){return MaterialDynamicColors.colorSpec.secondaryFixed()}secondaryFixedDim(){return MaterialDynamicColors.colorSpec.secondaryFixedDim()}onSecondaryFixed(){return MaterialDynamicColors.colorSpec.onSecondaryFixed()}onSecondaryFixedVariant(){return MaterialDynamicColors.colorSpec.onSecondaryFixedVariant()}tertiary(){return MaterialDynamicColors.colorSpec.tertiary()}tertiaryDim(){return MaterialDynamicColors.colorSpec.tertiaryDim()}onTertiary(){return MaterialDynamicColors.colorSpec.onTertiary()}tertiaryContainer(){return MaterialDynamicColors.colorSpec.tertiaryContainer()}onTertiaryContainer(){return MaterialDynamicColors.colorSpec.onTertiaryContainer()}tertiaryFixed(){return MaterialDynamicColors.colorSpec.tertiaryFixed()}tertiaryFixedDim(){return MaterialDynamicColors.colorSpec.tertiaryFixedDim()}onTertiaryFixed(){return MaterialDynamicColors.colorSpec.onTertiaryFixed()}onTertiaryFixedVariant(){return MaterialDynamicColors.colorSpec.onTertiaryFixedVariant()}error(){return MaterialDynamicColors.colorSpec.error()}errorDim(){return MaterialDynamicColors.colorSpec.errorDim()}onError(){return MaterialDynamicColors.colorSpec.onError()}errorContainer(){return MaterialDynamicColors.colorSpec.errorContainer()}onErrorContainer(){return MaterialDynamicColors.colorSpec.onErrorContainer()}static highestSurface(s){return MaterialDynamicColors.colorSpec.highestSurface(s)}}MaterialDynamicColors.contentAccentToneDelta=15;MaterialDynamicColors.colorSpec=new ColorSpecDelegateImpl2025;MaterialDynamicColors.primaryPaletteKeyColor=MaterialDynamicColors.colorSpec.primaryPaletteKeyColor();MaterialDynamicColors.secondaryPaletteKeyColor=MaterialDynamicColors.colorSpec.secondaryPaletteKeyColor();MaterialDynamicColors.tertiaryPaletteKeyColor=MaterialDynamicColors.colorSpec.tertiaryPaletteKeyColor();MaterialDynamicColors.neutralPaletteKeyColor=MaterialDynamicColors.colorSpec.neutralPaletteKeyColor();MaterialDynamicColors.neutralVariantPaletteKeyColor=MaterialDynamicColors.colorSpec.neutralVariantPaletteKeyColor();MaterialDynamicColors.background=MaterialDynamicColors.colorSpec.background();MaterialDynamicColors.onBackground=MaterialDynamicColors.colorSpec.onBackground();MaterialDynamicColors.surface=MaterialDynamicColors.colorSpec.surface();MaterialDynamicColors.surfaceDim=MaterialDynamicColors.colorSpec.surfaceDim();MaterialDynamicColors.surfaceBright=MaterialDynamicColors.colorSpec.surfaceBright();MaterialDynamicColors.surfaceContainerLowest=MaterialDynamicColors.colorSpec.surfaceContainerLowest();MaterialDynamicColors.surfaceContainerLow=MaterialDynamicColors.colorSpec.surfaceContainerLow();MaterialDynamicColors.surfaceContainer=MaterialDynamicColors.colorSpec.surfaceContainer();MaterialDynamicColors.surfaceContainerHigh=MaterialDynamicColors.colorSpec.surfaceContainerHigh();MaterialDynamicColors.surfaceContainerHighest=MaterialDynamicColors.colorSpec.surfaceContainerHighest();MaterialDynamicColors.onSurface=MaterialDynamicColors.colorSpec.onSurface();MaterialDynamicColors.surfaceVariant=MaterialDynamicColors.colorSpec.surfaceVariant();MaterialDynamicColors.onSurfaceVariant=MaterialDynamicColors.colorSpec.onSurfaceVariant();MaterialDynamicColors.inverseSurface=MaterialDynamicColors.colorSpec.inverseSurface();MaterialDynamicColors.inverseOnSurface=MaterialDynamicColors.colorSpec.inverseOnSurface();MaterialDynamicColors.outline=MaterialDynamicColors.colorSpec.outline();MaterialDynamicColors.outlineVariant=MaterialDynamicColors.colorSpec.outlineVariant();MaterialDynamicColors.shadow=MaterialDynamicColors.colorSpec.shadow();MaterialDynamicColors.scrim=MaterialDynamicColors.colorSpec.scrim();MaterialDynamicColors.surfaceTint=MaterialDynamicColors.colorSpec.surfaceTint();MaterialDynamicColors.primary=MaterialDynamicColors.colorSpec.primary();MaterialDynamicColors.onPrimary=MaterialDynamicColors.colorSpec.onPrimary();MaterialDynamicColors.primaryContainer=MaterialDynamicColors.colorSpec.primaryContainer();MaterialDynamicColors.onPrimaryContainer=MaterialDynamicColors.colorSpec.onPrimaryContainer();MaterialDynamicColors.inversePrimary=MaterialDynamicColors.colorSpec.inversePrimary();MaterialDynamicColors.secondary=MaterialDynamicColors.colorSpec.secondary();MaterialDynamicColors.onSecondary=MaterialDynamicColors.colorSpec.onSecondary();MaterialDynamicColors.secondaryContainer=MaterialDynamicColors.colorSpec.secondaryContainer();MaterialDynamicColors.onSecondaryContainer=MaterialDynamicColors.colorSpec.onSecondaryContainer();MaterialDynamicColors.tertiary=MaterialDynamicColors.colorSpec.tertiary();MaterialDynamicColors.onTertiary=MaterialDynamicColors.colorSpec.onTertiary();MaterialDynamicColors.tertiaryContainer=MaterialDynamicColors.colorSpec.tertiaryContainer();MaterialDynamicColors.onTertiaryContainer=MaterialDynamicColors.colorSpec.onTertiaryContainer();MaterialDynamicColors.error=MaterialDynamicColors.colorSpec.error();MaterialDynamicColors.onError=MaterialDynamicColors.colorSpec.onError();MaterialDynamicColors.errorContainer=MaterialDynamicColors.colorSpec.errorContainer();MaterialDynamicColors.onErrorContainer=MaterialDynamicColors.colorSpec.onErrorContainer();MaterialDynamicColors.primaryFixed=MaterialDynamicColors.colorSpec.primaryFixed();MaterialDynamicColors.primaryFixedDim=MaterialDynamicColors.colorSpec.primaryFixedDim();MaterialDynamicColors.onPrimaryFixed=MaterialDynamicColors.colorSpec.onPrimaryFixed();MaterialDynamicColors.onPrimaryFixedVariant=MaterialDynamicColors.colorSpec.onPrimaryFixedVariant();MaterialDynamicColors.secondaryFixed=MaterialDynamicColors.colorSpec.secondaryFixed();MaterialDynamicColors.secondaryFixedDim=MaterialDynamicColors.colorSpec.secondaryFixedDim();MaterialDynamicColors.onSecondaryFixed=MaterialDynamicColors.colorSpec.onSecondaryFixed();MaterialDynamicColors.onSecondaryFixedVariant=MaterialDynamicColors.colorSpec.onSecondaryFixedVariant();MaterialDynamicColors.tertiaryFixed=MaterialDynamicColors.colorSpec.tertiaryFixed();MaterialDynamicColors.tertiaryFixedDim=MaterialDynamicColors.colorSpec.tertiaryFixedDim();MaterialDynamicColors.onTertiaryFixed=MaterialDynamicColors.colorSpec.onTertiaryFixed();MaterialDynamicColors.onTertiaryFixedVariant=MaterialDynamicColors.colorSpec.onTertiaryFixedVariant();/**
|
|
257
|
+
* @license
|
|
258
|
+
* Copyright 2021 Google LLC
|
|
259
|
+
*
|
|
260
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
261
|
+
* you may not use this file except in compliance with the License.
|
|
262
|
+
* You may obtain a copy of the License at
|
|
263
|
+
*
|
|
264
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
265
|
+
*
|
|
266
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
267
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
268
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
269
|
+
* See the License for the specific language governing permissions and
|
|
270
|
+
* limitations under the License.
|
|
271
|
+
*/class CorePalette{static of(argb){return new CorePalette(argb,!1)}static contentOf(argb){return new CorePalette(argb,!0)}static fromColors(colors){return CorePalette.createPaletteFromColors(!1,colors)}static contentFromColors(colors){return CorePalette.createPaletteFromColors(!0,colors)}static createPaletteFromColors(content,colors){const palette=new CorePalette(colors.primary,content);if(colors.secondary){const p=new CorePalette(colors.secondary,content);palette.a2=p.a1}if(colors.tertiary){const p=new CorePalette(colors.tertiary,content);palette.a3=p.a1}if(colors.error){const p=new CorePalette(colors.error,content);palette.error=p.a1}if(colors.neutral){const p=new CorePalette(colors.neutral,content);palette.n1=p.n1}if(colors.neutralVariant){const p=new CorePalette(colors.neutralVariant,content);palette.n2=p.n2}return palette}constructor(argb,isContent){const hct=Hct.fromInt(argb),hue=hct.hue,chroma=hct.chroma;isContent?(this.a1=TonalPalette.fromHueAndChroma(hue,chroma),this.a2=TonalPalette.fromHueAndChroma(hue,chroma/3),this.a3=TonalPalette.fromHueAndChroma(hue+60,chroma/2),this.n1=TonalPalette.fromHueAndChroma(hue,Math.min(chroma/12,4)),this.n2=TonalPalette.fromHueAndChroma(hue,Math.min(chroma/6,8))):(this.a1=TonalPalette.fromHueAndChroma(hue,Math.max(48,chroma)),this.a2=TonalPalette.fromHueAndChroma(hue,16),this.a3=TonalPalette.fromHueAndChroma(hue+60,24),this.n1=TonalPalette.fromHueAndChroma(hue,4),this.n2=TonalPalette.fromHueAndChroma(hue,8)),this.error=TonalPalette.fromHueAndChroma(25,84)}}/**
|
|
272
|
+
* @license
|
|
273
|
+
* Copyright 2021 Google LLC
|
|
274
|
+
*
|
|
275
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
276
|
+
* you may not use this file except in compliance with the License.
|
|
277
|
+
* You may obtain a copy of the License at
|
|
278
|
+
*
|
|
279
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
280
|
+
*
|
|
281
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
282
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
283
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
284
|
+
* See the License for the specific language governing permissions and
|
|
285
|
+
* limitations under the License.
|
|
286
|
+
*/class Scheme{get primary(){return this.props.primary}get onPrimary(){return this.props.onPrimary}get primaryContainer(){return this.props.primaryContainer}get onPrimaryContainer(){return this.props.onPrimaryContainer}get secondary(){return this.props.secondary}get onSecondary(){return this.props.onSecondary}get secondaryContainer(){return this.props.secondaryContainer}get onSecondaryContainer(){return this.props.onSecondaryContainer}get tertiary(){return this.props.tertiary}get onTertiary(){return this.props.onTertiary}get tertiaryContainer(){return this.props.tertiaryContainer}get onTertiaryContainer(){return this.props.onTertiaryContainer}get error(){return this.props.error}get onError(){return this.props.onError}get errorContainer(){return this.props.errorContainer}get onErrorContainer(){return this.props.onErrorContainer}get background(){return this.props.background}get onBackground(){return this.props.onBackground}get surface(){return this.props.surface}get onSurface(){return this.props.onSurface}get surfaceVariant(){return this.props.surfaceVariant}get onSurfaceVariant(){return this.props.onSurfaceVariant}get outline(){return this.props.outline}get outlineVariant(){return this.props.outlineVariant}get shadow(){return this.props.shadow}get scrim(){return this.props.scrim}get inverseSurface(){return this.props.inverseSurface}get inverseOnSurface(){return this.props.inverseOnSurface}get inversePrimary(){return this.props.inversePrimary}static light(argb){return Scheme.lightFromCorePalette(CorePalette.of(argb))}static dark(argb){return Scheme.darkFromCorePalette(CorePalette.of(argb))}static lightContent(argb){return Scheme.lightFromCorePalette(CorePalette.contentOf(argb))}static darkContent(argb){return Scheme.darkFromCorePalette(CorePalette.contentOf(argb))}static lightFromCorePalette(core){return new Scheme({primary:core.a1.tone(40),onPrimary:core.a1.tone(100),primaryContainer:core.a1.tone(90),onPrimaryContainer:core.a1.tone(10),secondary:core.a2.tone(40),onSecondary:core.a2.tone(100),secondaryContainer:core.a2.tone(90),onSecondaryContainer:core.a2.tone(10),tertiary:core.a3.tone(40),onTertiary:core.a3.tone(100),tertiaryContainer:core.a3.tone(90),onTertiaryContainer:core.a3.tone(10),error:core.error.tone(40),onError:core.error.tone(100),errorContainer:core.error.tone(90),onErrorContainer:core.error.tone(10),background:core.n1.tone(99),onBackground:core.n1.tone(10),surface:core.n1.tone(99),onSurface:core.n1.tone(10),surfaceVariant:core.n2.tone(90),onSurfaceVariant:core.n2.tone(30),outline:core.n2.tone(50),outlineVariant:core.n2.tone(80),shadow:core.n1.tone(0),scrim:core.n1.tone(0),inverseSurface:core.n1.tone(20),inverseOnSurface:core.n1.tone(95),inversePrimary:core.a1.tone(80)})}static darkFromCorePalette(core){return new Scheme({primary:core.a1.tone(80),onPrimary:core.a1.tone(20),primaryContainer:core.a1.tone(30),onPrimaryContainer:core.a1.tone(90),secondary:core.a2.tone(80),onSecondary:core.a2.tone(20),secondaryContainer:core.a2.tone(30),onSecondaryContainer:core.a2.tone(90),tertiary:core.a3.tone(80),onTertiary:core.a3.tone(20),tertiaryContainer:core.a3.tone(30),onTertiaryContainer:core.a3.tone(90),error:core.error.tone(80),onError:core.error.tone(20),errorContainer:core.error.tone(30),onErrorContainer:core.error.tone(80),background:core.n1.tone(10),onBackground:core.n1.tone(90),surface:core.n1.tone(10),onSurface:core.n1.tone(90),surfaceVariant:core.n2.tone(30),onSurfaceVariant:core.n2.tone(80),outline:core.n2.tone(60),outlineVariant:core.n2.tone(30),shadow:core.n1.tone(0),scrim:core.n1.tone(0),inverseSurface:core.n1.tone(90),inverseOnSurface:core.n1.tone(20),inversePrimary:core.a1.tone(40)})}constructor(props){this.props=props}toJSON(){return{...this.props}}}/**
|
|
287
|
+
* @license
|
|
288
|
+
* Copyright 2021 Google LLC
|
|
289
|
+
*
|
|
290
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
291
|
+
* you may not use this file except in compliance with the License.
|
|
292
|
+
* You may obtain a copy of the License at
|
|
293
|
+
*
|
|
294
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
295
|
+
*
|
|
296
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
297
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
298
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
299
|
+
* See the License for the specific language governing permissions and
|
|
300
|
+
* limitations under the License.
|
|
301
|
+
*/function hexFromArgb(argb){const r=redFromArgb(argb),g=greenFromArgb(argb),b=blueFromArgb(argb),outParts=[r.toString(16),g.toString(16),b.toString(16)];for(const[i,part]of outParts.entries())part.length===1&&(outParts[i]="0"+part);return"#"+outParts.join("")}function argbFromHex(hex){hex=hex.replace("#","");const isThree=hex.length===3,isSix=hex.length===6,isEight=hex.length===8;if(!isThree&&!isSix&&!isEight)throw new Error("unexpected hex "+hex);let r=0,g=0,b=0;return isThree?(r=parseIntHex(hex.slice(0,1).repeat(2)),g=parseIntHex(hex.slice(1,2).repeat(2)),b=parseIntHex(hex.slice(2,3).repeat(2))):isSix?(r=parseIntHex(hex.slice(0,2)),g=parseIntHex(hex.slice(2,4)),b=parseIntHex(hex.slice(4,6))):isEight&&(r=parseIntHex(hex.slice(2,4)),g=parseIntHex(hex.slice(4,6)),b=parseIntHex(hex.slice(6,8))),(255<<24|(r&255)<<16|(g&255)<<8|b&255)>>>0}function parseIntHex(value){return parseInt(value,16)}/**
|
|
302
|
+
* @license
|
|
303
|
+
* Copyright 2021 Google LLC
|
|
304
|
+
*
|
|
305
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
306
|
+
* you may not use this file except in compliance with the License.
|
|
307
|
+
* You may obtain a copy of the License at
|
|
308
|
+
*
|
|
309
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
310
|
+
*
|
|
311
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
312
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
313
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
314
|
+
* See the License for the specific language governing permissions and
|
|
315
|
+
* limitations under the License.
|
|
316
|
+
*/function themeFromSourceColor(source,customColors=[]){const palette=CorePalette.of(source);return{source,schemes:{light:Scheme.light(source),dark:Scheme.dark(source)},palettes:{primary:palette.a1,secondary:palette.a2,tertiary:palette.a3,neutral:palette.n1,neutralVariant:palette.n2,error:palette.error},customColors:customColors.map(c=>customColor(source,c))}}function customColor(source,color){let value=color.value;const from=value,to=source;color.blend&&(value=Blend.harmonize(from,to));const tones=CorePalette.of(value).a1;return{color,value,light:{color:tones.tone(40),onColor:tones.tone(100),colorContainer:tones.tone(90),onColorContainer:tones.tone(10)},dark:{color:tones.tone(80),onColor:tones.tone(20),colorContainer:tones.tone(30),onColorContainer:tones.tone(90)}}}const COLOR_SHADES=[50,100,200,300,400,500,600,700,800,900],SHADE_TONES={50:90,100:80,200:70,300:60,400:50,500:40,600:35,700:30,800:20,900:10},ON_SHADE_TONES=Object.fromEntries(COLOR_SHADES.map(shade=>[shade,SHADE_TONES[shade]>=60?10:100])),createTonalPalette=seed=>{const hex=colorToHex(seed,"#000000");return themeFromSourceColor(argbFromHex(hex)).palettes.primary},createPaletteFromTones=(seed,tones)=>{const tonalPalette=createTonalPalette(seed);return Object.fromEntries(COLOR_SHADES.map(shade=>[shade,hexFromArgb(tonalPalette.tone(tones[shade]))]))},createPalette=seed=>createPaletteFromTones(seed,SHADE_TONES),createOnPalette=seed=>createPaletteFromTones(seed,ON_SHADE_TONES),createPalettePair=seed=>({colors:createPalette(seed),onColors:createOnPalette(seed)});exports.COLOR_SEEDS=COLOR_SEEDS;exports.COLOR_SHADES=COLOR_SHADES;exports.Hct=Hct;exports.ON_SHADE_TONES=ON_SHADE_TONES;exports.SHADE_TONES=SHADE_TONES;exports.argbFromHex=argbFromHex;exports.colorToHex=colorToHex;exports.createOnPalette=createOnPalette;exports.createPalette=createPalette;exports.createPalettePair=createPalettePair;exports.getContrastingColor=getContrastingColor;exports.hexFromArgb=hexFromArgb;exports.parseColor=parseColor;exports.rgbToChannels=rgbToChannels;exports.rgbToHex=rgbToHex;exports.themeFromSourceColor=themeFromSourceColor;
|
package/dist/plugin.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const icon=require("./icon-DgrRDU9A.cjs");require("@gradient-ui/gradient-engine");const cssTokens=require("./cssTokens-gELrmYNj.cjs"),defaults=require("./defaults-aVtmQF-9.cjs"),mask=require("./mask-BGVqqZXk.cjs"),runtime=require("./runtime-DjqHzhfc.cjs");require("vue");require("./GLoading.vue_vue_type_style_index_0_lang-KmMjjwpE.cjs");require("./components/GSnackbar.cjs");const resolveThemeOptions=theme=>theme==null||theme===!1?{}:typeof theme=="string"||typeof theme=="number"?{seed:theme}:theme,installGradientUIRuntime=(app,options={},inlineOptions={})=>{const resolvedOptions={...options,...inlineOptions,defaults:{...options.defaults,...inlineOptions.defaults}};return defaults.installDefaults(app,resolvedOptions.defaults),runtime.installGradientUIServices(app),app.directive("gradient-icon",mask.gradientIcon),app.directive("gradient-text",mask.vGradientText),app.directive("loading",mask.loading),app.directive("mask",mask.vMask),app.directive("ripple",mask.ripple),app.directive("specular",mask.specular),app.directive("tooltip",mask.vTooltip),resolvedOptions.icons!==!1&&icon.installIcons(app,typeof resolvedOptions.icons=="object"?resolvedOptions.icons:void 0),resolvedOptions.theme!==!1&&cssTokens.installTheme(app,cssTokens.createTheme(resolveThemeOptions(resolvedOptions.theme))),resolvedOptions};exports.installGradientUIRuntime=installGradientUIRuntime;exports.resolveThemeOptions=resolveThemeOptions;
|
package/dist/plugin.mjs
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { i as installIcons } from "./icon-C1AhpC8p.js";
|
|
2
|
+
import "@gradient-ui/gradient-engine";
|
|
3
|
+
import { i as installTheme, d as createTheme } from "./cssTokens-CR4OxIND.js";
|
|
4
|
+
import { i as installDefaults } from "./defaults-DJ6ZV1Qc.js";
|
|
5
|
+
import { g as gradientIcon, v as vGradientText, l as loading, a as vMask, r as ripple, s as specular, b as vTooltip } from "./mask-D4VYR8fo.js";
|
|
6
|
+
import { i as installGradientUIServices } from "./runtime-DBDKFxqD.js";
|
|
7
|
+
import "vue";
|
|
8
|
+
import "./GLoading.vue_vue_type_style_index_0_lang-BNOsRA0v.js";
|
|
9
|
+
import "./components/GSnackbar.mjs";
|
|
10
|
+
const resolveThemeOptions = (theme) => theme == null || theme === !1 ? {} : typeof theme == "string" || typeof theme == "number" ? { seed: theme } : theme, installGradientUIRuntime = (app, options = {}, inlineOptions = {}) => {
|
|
11
|
+
const resolvedOptions = {
|
|
12
|
+
...options,
|
|
13
|
+
...inlineOptions,
|
|
14
|
+
defaults: { ...options.defaults, ...inlineOptions.defaults }
|
|
15
|
+
};
|
|
16
|
+
return installDefaults(app, resolvedOptions.defaults), installGradientUIServices(app), app.directive("gradient-icon", gradientIcon), app.directive("gradient-text", vGradientText), app.directive("loading", loading), app.directive("mask", vMask), app.directive("ripple", ripple), app.directive("specular", specular), app.directive("tooltip", vTooltip), resolvedOptions.icons !== !1 && installIcons(
|
|
17
|
+
app,
|
|
18
|
+
typeof resolvedOptions.icons == "object" ? resolvedOptions.icons : void 0
|
|
19
|
+
), resolvedOptions.theme !== !1 && installTheme(
|
|
20
|
+
app,
|
|
21
|
+
createTheme(resolveThemeOptions(resolvedOptions.theme))
|
|
22
|
+
), resolvedOptions;
|
|
23
|
+
};
|
|
24
|
+
export {
|
|
25
|
+
installGradientUIRuntime,
|
|
26
|
+
resolveThemeOptions
|
|
27
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";function propsFactory(props,source){return defaults=>{const finalProps={};for(const key in props){const definition=typeof props[key]=="object"&&props[key]!==null&&!Array.isArray(props[key])?{...props[key]}:{type:props[key]};defaults&&key in defaults&&(definition.default=defaults[key]),source&&!definition.source&&(definition.source=source),finalProps[key]=definition}return finalProps}}exports.propsFactory=propsFactory;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
function propsFactory(props, source) {
|
|
2
|
+
return (defaults) => {
|
|
3
|
+
const finalProps = {};
|
|
4
|
+
for (const key in props) {
|
|
5
|
+
const definition = typeof props[key] == "object" && props[key] !== null && !Array.isArray(props[key]) ? { ...props[key] } : { type: props[key] };
|
|
6
|
+
defaults && key in defaults && (definition.default = defaults[key]), source && !definition.source && (definition.source = source), finalProps[key] = definition;
|
|
7
|
+
}
|
|
8
|
+
return finalProps;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
propsFactory as p
|
|
13
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { computed, toValue } from "vue";
|
|
2
|
+
const usePx = (value) => computed(() => {
|
|
3
|
+
const resolved = toValue(value);
|
|
4
|
+
return resolved === "" || resolved === null || resolved === void 0 ? "" : typeof resolved == "number" ? `${resolved}px` : /^\d+(\.\d+)?$/.test(resolved) ? `${resolved}px` : resolved;
|
|
5
|
+
});
|
|
6
|
+
export {
|
|
7
|
+
usePx as u
|
|
8
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const vue=require("vue"),usePx=value=>vue.computed(()=>{const resolved=vue.toValue(value);return resolved===""||resolved===null||resolved===void 0?"":typeof resolved=="number"?`${resolved}px`:/^\d+(\.\d+)?$/.test(resolved)?`${resolved}px`:resolved});exports.usePx=usePx;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const vue=require("vue"),propsFactory=require("./propsFactory-DT6-QS4L.cjs"),makeRoundedProps=propsFactory.propsFactory({rounded:Boolean});function useRounded(props,base){return vue.computed(()=>props.rounded?`${base}_rounded`:"")}exports.makeRoundedProps=makeRoundedProps;exports.useRounded=useRounded;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { computed } from "vue";
|
|
2
|
+
import { p as propsFactory } from "./propsFactory-FM5RGbLN.js";
|
|
3
|
+
const makeRoundedProps = propsFactory({
|
|
4
|
+
rounded: Boolean
|
|
5
|
+
});
|
|
6
|
+
function useRounded(props, base) {
|
|
7
|
+
return computed(() => props.rounded ? `${base}_rounded` : "");
|
|
8
|
+
}
|
|
9
|
+
export {
|
|
10
|
+
makeRoundedProps as m,
|
|
11
|
+
useRounded as u
|
|
12
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const vue=require("vue"),useOptionalRouterLink=()=>{const instance=vue.getCurrentInstance();return instance==null?void 0:instance.appContext.components.RouterLink},getRouterFallbackHref=to=>{if(typeof to=="string")return to};exports.getRouterFallbackHref=getRouterFallbackHref;exports.useOptionalRouterLink=useOptionalRouterLink;
|