@usecapsule/core-components 3.4.0 → 3.4.1-dev.2
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/capsule/capsule.esm.js +1 -1
- package/dist/capsule/capsule.esm.js.map +1 -1
- package/dist/capsule/index.esm.js +1 -1
- package/dist/capsule/index.esm.js.map +1 -1
- package/dist/capsule/p-286db996.js +2 -0
- package/dist/capsule/p-286db996.js.map +1 -0
- package/dist/capsule/p-7be8987f.entry.js +20 -0
- package/dist/capsule/p-7be8987f.entry.js.map +1 -0
- package/dist/capsule/p-9e64a60e.entry.js +2 -0
- package/dist/capsule/p-9e64a60e.entry.js.map +1 -0
- package/dist/capsule/{p-32cdf894.entry.js → p-b96e357a.entry.js} +2 -2
- package/dist/capsule/p-b96e357a.entry.js.map +1 -0
- package/dist/capsule/p-c33942ad.entry.js +2 -0
- package/dist/capsule/p-c33942ad.entry.js.map +1 -0
- package/dist/capsule/p-cfc382c0.entry.js +2 -0
- package/dist/capsule/{p-de2a16e4.entry.js → p-d165df27.entry.js} +2 -2
- package/dist/capsule/{p-41bc3c58.entry.js → p-f0cd0482.entry.js} +2 -2
- package/dist/cjs/capsule.cjs.js +1 -1
- package/dist/cjs/cpsl-alert_34.cjs.entry.js +122 -65
- package/dist/cjs/cpsl-alert_34.cjs.entry.js.map +1 -1
- package/dist/cjs/cpsl-col.cjs.entry.js +1 -1
- package/dist/cjs/cpsl-grid.cjs.entry.js +2 -2
- package/dist/cjs/cpsl-hero.cjs.entry.js +4 -3
- package/dist/cjs/cpsl-hero.cjs.entry.js.map +1 -1
- package/dist/cjs/cpsl-identicon.cjs.entry.js +76 -30
- package/dist/cjs/cpsl-identicon.cjs.entry.js.map +1 -1
- package/dist/cjs/cpsl-nav-button.cjs.entry.js +40 -0
- package/dist/cjs/cpsl-nav-button.cjs.entry.js.map +1 -0
- package/dist/cjs/cpsl-row.cjs.entry.js +1 -1
- package/dist/cjs/index-65f57499.js +4 -4
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/prand-a35ea6b2.js +209 -0
- package/dist/cjs/prand-a35ea6b2.js.map +1 -0
- package/dist/collection/assets/icons/check-circle-filled.svg +5 -0
- package/dist/collection/assets/icons/cosmos.svg +12 -0
- package/dist/collection/assets/icons/ethereum.svg +4 -0
- package/dist/collection/assets/icons/folder.svg +5 -0
- package/dist/collection/assets/icons/hero-plus-circle-capsule.svg +14 -0
- package/dist/collection/assets/icons/hero-plus-circle.svg +7 -0
- package/dist/collection/assets/icons/index.js +8 -1
- package/dist/collection/assets/icons/index.js.map +1 -1
- package/dist/collection/assets/icons/plus-circle.svg +1 -1
- package/dist/collection/assets/icons/solana.svg +19 -0
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/cpsl-alert/cpsl-alert.js +1 -1
- package/dist/collection/components/cpsl-animation/cpsl-animation.js +44 -104
- package/dist/collection/components/cpsl-animation/cpsl-animation.js.map +1 -1
- package/dist/collection/components/cpsl-app-bar/cpsl-app-bar.js +3 -3
- package/dist/collection/components/cpsl-auth-modal/cpsl-auth-modal.css +2 -1
- package/dist/collection/components/cpsl-avatar/cpsl-avatar.js +1 -1
- package/dist/collection/components/cpsl-button/cpsl-button.css +1 -1
- package/dist/collection/components/cpsl-button/cpsl-button.js +2 -2
- package/dist/collection/components/cpsl-button-group/cpsl-button-group.js +1 -1
- package/dist/collection/components/cpsl-card/cpsl-card.js +1 -1
- package/dist/collection/components/cpsl-checkbox/cpsl-checkbox.js +1 -1
- package/dist/collection/components/cpsl-code-input/cpsl-code-input.js +2 -2
- package/dist/collection/components/cpsl-col/cpsl-col.js +1 -1
- package/dist/collection/components/cpsl-divider/cpsl-divider.js +1 -1
- package/dist/collection/components/cpsl-drawer/cpsl-drawer.js +2 -2
- package/dist/collection/components/cpsl-dropdown/cpsl-dropdown.js +1 -1
- package/dist/collection/components/cpsl-file-upload/cpsl-file-upload.js +1 -1
- package/dist/collection/components/cpsl-grid/cpsl-grid.js +2 -2
- package/dist/collection/components/cpsl-hero/cpsl-hero.css +29 -2
- package/dist/collection/components/cpsl-hero/cpsl-hero.js +6 -5
- package/dist/collection/components/cpsl-hero/cpsl-hero.js.map +1 -1
- package/dist/collection/components/cpsl-icon/cpsl-icon.js +1 -1
- package/dist/collection/components/cpsl-identicon/cpsl-identicon.css +17 -10
- package/dist/collection/components/cpsl-identicon/cpsl-identicon.js +101 -36
- package/dist/collection/components/cpsl-identicon/cpsl-identicon.js.map +1 -1
- package/dist/collection/components/cpsl-identicon/cpsl-identicon.stories.js +1 -1
- package/dist/collection/components/cpsl-identicon/cpsl-identicon.stories.js.map +1 -1
- package/dist/collection/components/cpsl-input/cpsl-input.js +1 -1
- package/dist/collection/components/cpsl-nav-button/cpsl-nav-button.css +107 -0
- package/dist/collection/components/cpsl-nav-button/cpsl-nav-button.js +175 -0
- package/dist/collection/components/cpsl-nav-button/cpsl-nav-button.js.map +1 -0
- package/dist/collection/components/cpsl-nav-button-group/cpsl-nav-button-group.css +0 -42
- package/dist/collection/components/cpsl-nav-button-group/cpsl-nav-button-group.js +2 -50
- package/dist/collection/components/cpsl-nav-button-group/cpsl-nav-button-group.js.map +1 -1
- package/dist/collection/components/cpsl-overlay/cpsl-overlay.js +1 -1
- package/dist/collection/components/cpsl-pagination/cpsl-pagination.js +1 -1
- package/dist/collection/components/cpsl-pill/cpsl-pill.js +1 -1
- package/dist/collection/components/cpsl-popover/cpsl-popover.js +2 -2
- package/dist/collection/components/cpsl-qr-code/cpsl-qr-code.js +1 -1
- package/dist/collection/components/cpsl-radio/cpsl-radio.js +1 -1
- package/dist/collection/components/cpsl-row/cpsl-row.js +1 -1
- package/dist/collection/components/cpsl-select/cpsl-select.js +2 -2
- package/dist/collection/components/cpsl-select/cpsl-select.js.map +1 -1
- package/dist/collection/components/cpsl-select-item/cpsl-select-item.js +1 -1
- package/dist/collection/components/cpsl-slide-button/cpsl-slide-button.js +3 -3
- package/dist/collection/components/cpsl-spinner/cpsl-spinner.js +2 -2
- package/dist/collection/components/cpsl-switch/cpsl-switch.js +1 -1
- package/dist/collection/components/cpsl-tab/cpsl-tab.js +1 -1
- package/dist/collection/components/cpsl-table/cpsl-table.js +1 -1
- package/dist/collection/components/cpsl-tabs/cpsl-tabs.js +1 -1
- package/dist/collection/components/cpsl-text/cpsl-text.js +1 -1
- package/dist/collection/components/cpsl-tile-button/cpsl-tile-button.js +2 -2
- package/dist/collection/index.js +1 -0
- package/dist/collection/index.js.map +1 -1
- package/dist/collection/lib/prando.js +187 -0
- package/dist/collection/lib/prando.js.map +1 -0
- package/dist/collection/utils/prand.js +16 -0
- package/dist/collection/utils/prand.js.map +1 -0
- package/dist/esm/capsule.js +1 -1
- package/dist/esm/cpsl-alert_34.entry.js +122 -65
- package/dist/esm/cpsl-alert_34.entry.js.map +1 -1
- package/dist/esm/cpsl-col.entry.js +1 -1
- package/dist/esm/cpsl-grid.entry.js +2 -2
- package/dist/esm/cpsl-hero.entry.js +4 -3
- package/dist/esm/cpsl-hero.entry.js.map +1 -1
- package/dist/esm/cpsl-identicon.entry.js +76 -30
- package/dist/esm/cpsl-identicon.entry.js.map +1 -1
- package/dist/esm/cpsl-nav-button.entry.js +36 -0
- package/dist/esm/cpsl-nav-button.entry.js.map +1 -0
- package/dist/esm/cpsl-row.entry.js +1 -1
- package/dist/esm/index-91db3414.js +4 -4
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/prand-c8323494.js +205 -0
- package/dist/esm/prand-c8323494.js.map +1 -0
- package/dist/types/assets/icons/index.d.ts +7 -0
- package/dist/types/components/cpsl-animation/cpsl-animation.d.ts +0 -15
- package/dist/types/components/cpsl-hero/cpsl-hero.d.ts +2 -2
- package/dist/types/components/cpsl-identicon/cpsl-identicon.d.ts +5 -4
- package/dist/types/components/cpsl-nav-button/cpsl-nav-button.d.ts +43 -0
- package/dist/types/components/cpsl-nav-button-group/cpsl-nav-button-group.d.ts +0 -6
- package/dist/types/components.d.ts +93 -39
- package/dist/types/index.d.ts +1 -0
- package/dist/types/lib/prando.d.ts +92 -0
- package/dist/types/utils/prand.d.ts +3 -0
- package/package.json +2 -4
- package/dist/capsule/p-0e558c7f.entry.js +0 -10
- package/dist/capsule/p-0e558c7f.entry.js.map +0 -1
- package/dist/capsule/p-0e6007ae.entry.js +0 -20
- package/dist/capsule/p-0e6007ae.entry.js.map +0 -1
- package/dist/capsule/p-32cdf894.entry.js.map +0 -1
- package/dist/capsule/p-3b042fd1.entry.js +0 -2
- package/dist/capsule/p-5d62e610.entry.js +0 -2
- package/dist/capsule/p-5d62e610.entry.js.map +0 -1
- package/dist/cjs/cpsl-animation.cjs.entry.js +0 -20133
- package/dist/cjs/cpsl-animation.cjs.entry.js.map +0 -1
- package/dist/collection/components/cpsl-animation/cpsl-animation.css +0 -17
- package/dist/esm/cpsl-animation.entry.js +0 -20129
- package/dist/esm/cpsl-animation.entry.js.map +0 -1
- /package/dist/capsule/{p-3b042fd1.entry.js.map → p-cfc382c0.entry.js.map} +0 -0
- /package/dist/capsule/{p-de2a16e4.entry.js.map → p-d165df27.entry.js.map} +0 -0
- /package/dist/capsule/{p-41bc3c58.entry.js.map → p-f0cd0482.entry.js.map} +0 -0
- /package/dist/types/Users/{norwood/capsule-repos → taylorbosch/Documents/GitHub/Capsule}/web-sdk/packages/core-components/.stencil/scripts/buildAssets.d.ts +0 -0
@@ -1,2 +1,2 @@
|
|
1
|
-
import{p as e,b as t}from"./p-fa6b7678.js";export{s as setNonce}from"./p-fa6b7678.js";import{g as
|
1
|
+
import{p as e,b as t}from"./p-fa6b7678.js";export{s as setNonce}from"./p-fa6b7678.js";import{g as a}from"./p-e1255160.js";var l=()=>{const t=import.meta.url;const a={};if(t!==""){a.resourcesUrl=new URL(".",t).href}return e(a)};l().then((async e=>{await a();return t([["p-b96e357a",[[1,"cpsl-hero",{height:[2],hideFadeOut:[4,"hide-fade-out"],variant:[513],title:[513],subtitle:[513],withDefaultTheme:[4,"with-default-theme"]}]]],["p-1bd11889",[[1,"cpsl-modal-v2",{enterTransitionDuration:[2,"enter-transition-duration"],exitTransitionDuration:[2,"exit-transition-duration"],elevated:[4],noOverlay:[4,"no-overlay"],open:[4],zIndexOverride:[2,"z-index-override"]},null,{open:["toggleHeight"]}]]],["p-9e64a60e",[[1,"cpsl-nav-button",{disabled:[516],exactMainRouteMatch:[4,"exact-main-route-match"],exactSubRouteMatch:[4,"exact-sub-route-match"],route:[1],subRoutes:[16],path:[1]}]]],["p-f0cd0482",[[1,"cpsl-col",{offset:[1],offsetXs:[1,"offset-xs"],offsetSm:[1,"offset-sm"],offsetMd:[1,"offset-md"],offsetLg:[1,"offset-lg"],offsetXl:[1,"offset-xl"],pull:[1],pullXs:[1,"pull-xs"],pullSm:[1,"pull-sm"],pullMd:[1,"pull-md"],pullLg:[1,"pull-lg"],pullXl:[1,"pull-xl"],push:[1],pushXs:[1,"push-xs"],pushSm:[1,"push-sm"],pushMd:[1,"push-md"],pushLg:[1,"push-lg"],pushXl:[1,"push-xl"],size:[1],sizeXs:[1,"size-xs"],sizeSm:[1,"size-sm"],sizeMd:[1,"size-md"],sizeLg:[1,"size-lg"],sizeXl:[1,"size-xl"]},[[9,"resize","onResize"]]]]],["p-d165df27",[[1,"cpsl-grid",{fixed:[4]}]]],["p-c33942ad",[[1,"cpsl-identicon",{hash:[1],size:[1],variant:[1]}]]],["p-5965b15e",[[1,"cpsl-info-box"]]],["p-cfc382c0",[[1,"cpsl-row"]]],["p-7be8987f",[[1,"cpsl-pagination",{initialPage:[2,"initial-page"],totalPages:[2,"total-pages"],visiblePages:[1026,"visible-pages"],currentPage:[32]},null,{currentPage:["watchChange"]}],[1,"cpsl-select",{anchorElId:[1,"anchor-el-id"],autoWidth:[4,"auto-width"],disabled:[4],dropdownMaxHeight:[2,"dropdown-max-height"],errorText:[1,"error-text"],formatValue:[16],helperText:[1,"helper-text"],id:[1],label:[1],placeholder:[1],required:[4],selectedValue:[1,"selected-value"],showFormattedSelectedItem:[4,"show-formatted-selected-item"],showOptionalLabel:[4,"show-optional-label"],showSearch:[4,"show-search"],searchPlaceholder:[1,"search-placeholder"],anchorEl:[32],hasFocus:[32],popoverOpen:[32],hasSelectedItem:[32]},[[0,"cpslSelectItemClick","selectItemClickHandler"],[0,"cpslOpen","onPopoverOpen"],[0,"cpslClose","onPopoverClose"]],{selectedValue:["onValueChange","handleValueChange"]}],[1,"cpsl-file-upload",{errorText:[1,"error-text"],externalFilename:[1,"external-filename"],externalSrc:[1,"external-src"],fileTypes:[16],helperText:[1,"helper-text"],label:[1],required:[4],showOptionalLabel:[4,"show-optional-label"],uploadFile:[16],file:[32],dragOver:[32],dragError:[32],isUploading:[32],uploadError:[32]}],[1,"cpsl-auth-modal",{enterTransitionDuration:[2,"enter-transition-duration"],exitTransitionDuration:[2,"exit-transition-duration"],noOverlay:[4,"no-overlay"],open:[4],zIndexOverride:[2,"z-index-override"],hasFooter:[32],isMobile:[32]},null,{open:["toggleModal"]}],[1,"cpsl-alert",{icon:[1],variant:[1]}],[1,"cpsl-checkbox",{checked:[4]}],[1,"cpsl-code-input",{code:[1025],errorText:[1,"error-text"],helperText:[1,"helper-text"],length:[2],type:[1]}],[1,"cpsl-drawer",{anchor:[1],anchorPosition:[2,"anchor-position"],noOverlay:[4,"no-overlay"],open:[4],size:[8],transitionDuration:[2,"transition-duration"],transitionFunction:[1,"transition-function"],variant:[1],zIndexOverride:[2,"z-index-override"],closedAnchorPosition:[32],showTransition:[32]}],[1,"cpsl-icon-group",{expandFrom:[1,"expand-from"],disabled:[4],icons:[16],isHovered:[32]}],[1,"cpsl-slide-button",{disabled:[4],endIcon:[1,"end-icon"],endText:[1,"end-text"],startIcon:[1,"start-icon"],startText:[1,"start-text"]}],[1,"cpsl-table",{hasHorizontalScroll:[32],hasVerticalScroll:[32]}],[1,"cpsl-tile-button",{src:[1],icon:[1]}],[1,"cpsl-app-bar",{height:[2],position:[1],zIndexOverride:[2,"z-index-override"]}],[1,"cpsl-avatar",{alt:[1],src:[1],variant:[1]}],[1,"cpsl-divider"],[1,"cpsl-dropdown",{width:[1],hasCpslSearch:[4,"has-cpsl-search"],items:[16],selectedItem:[1040],isOpen:[32],searchQuery:[32],filteredItems:[32]},[[9,"resize","handleResize"]],{selectedItem:["handleSelectedItemChange"],isOpen:["handleOpenChange"]}],[1,"cpsl-nav-button-group"],[1,"cpsl-pill",{text:[1]}],[1,"cpsl-progress-indicator",{totalSteps:[2,"total-steps"],step:[2]}],[1,"cpsl-qr-code",{url:[1],imageSrc:[1,"image-src"],size:[2]}],[1,"cpsl-radio",{checked:[4]}],[1,"cpsl-select-item",{selected:[4],value:[1]}],[1,"cpsl-switch",{checked:[4]}],[1,"cpsl-tab",{selected:[4],tab:[1]},[[8,"cpslTabsChanged","onTabsChanged"],[8,"cpslTabsInit","onTabsInit"]]],[1,"cpsl-tabs",{fullWidth:[4,"full-width"],selectedTab:[1,"selected-tab"],selectedTabRect:[32],loaded:[32]},null,{fullWidth:["updateSlider"],selectedTab:["updateTab"]}],[1,"cpsl-button-group",{selectedId:[1,"selected-id"]},null,{selectedId:["selectItem"]}],[1,"cpsl-input",{autocapitalize:[1],autocomplete:[1],autocorrect:[1],noAutoDisable:[4,"no-auto-disable"],autofocus:[4],disabled:[4],contrastText:[4,"contrast-text"],enterkeyhint:[1],errorText:[1,"error-text"],mask:[1],helperText:[1,"helper-text"],inputmode:[1],label:[1],max:[8],maxlength:[2],min:[8],minlength:[2],multiple:[4],name:[1],pattern:[1],placeholder:[1],readonly:[4],required:[4],showOptionalLabel:[4,"show-optional-label"],spellcheck:[4],startIconSrc:[1,"start-icon-src"],startIcon:[1,"start-icon"],step:[1],type:[1],value:[1025],hasFocus:[32],maskedInput:[32]},null,{disabled:["handleDisable"],mask:["handleSetupMask"],value:["handleValueChange"]}],[1,"cpsl-popover",{anchorEl:[16],anchorOriginHorizontal:[1,"anchor-origin-horizontal"],anchorOriginVertical:[1,"anchor-origin-vertical"],autoWidth:[4,"auto-width"],disabled:[4],preventBlur:[4,"prevent-blur"],transformOriginHorizontal:[1,"transform-origin-horizontal"],transformOriginVertical:[1,"transform-origin-vertical"],triggerAction:[1,"trigger-action"],trigger:[1],windowPadding:[2,"window-padding"],open:[32],positionX:[32],positionY:[32],closePopover:[64]},null,{trigger:["onTriggerChange"],triggerAction:["onTriggerChange"],preventBlur:["onTriggerChange"],anchorOriginHorizontal:["onAnchorChange"],anchorOriginVertical:["onAnchorChange"],open:["onOpenChange"]}],[1,"cpsl-spinner",{size:[2],speed:[2]}],[1,"cpsl-button",{as:[1],disabled:[516],fullWidth:[4,"full-width"],href:[1],size:[1],target:[1],variant:[513]}],[1,"cpsl-card"],[1,"cpsl-overlay",{enterTransitionDuration:[2,"enter-transition-duration"],exitTransitionDuration:[2,"exit-transition-duration"],open:[4],zIndexOverride:[2,"z-index-override"]},null,{open:["toggleHeight"]}],[1,"cpsl-text",{color:[1],variant:[1],weight:[1]}],[1,"cpsl-icon",{src:[1],icon:[1]}]]]],e)}));
|
2
2
|
//# sourceMappingURL=capsule.esm.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["patchBrowser","importMeta","url","opts","resourcesUrl","URL","href","promiseResolve","then","async","options","globalScripts","bootstrapLazy","height","hideFadeOut","variant","title","subtitle","withDefaultTheme","enterTransitionDuration","exitTransitionDuration","elevated","noOverlay","open","zIndexOverride","
|
1
|
+
{"version":3,"names":["patchBrowser","importMeta","url","opts","resourcesUrl","URL","href","promiseResolve","then","async","options","globalScripts","bootstrapLazy","height","hideFadeOut","variant","title","subtitle","withDefaultTheme","enterTransitionDuration","exitTransitionDuration","elevated","noOverlay","open","zIndexOverride","disabled","exactMainRouteMatch","exactSubRouteMatch","route","subRoutes","path","offset","offsetXs","offsetSm","offsetMd","offsetLg","offsetXl","pull","pullXs","pullSm","pullMd","pullLg","pullXl","push","pushXs","pushSm","pushMd","pushLg","pushXl","size","sizeXs","sizeSm","sizeMd","sizeLg","sizeXl","fixed","hash","initialPage","totalPages","visiblePages","currentPage","anchorElId","autoWidth","dropdownMaxHeight","errorText","formatValue","helperText","id","label","placeholder","required","selectedValue","showFormattedSelectedItem","showOptionalLabel","showSearch","searchPlaceholder","anchorEl","hasFocus","popoverOpen","hasSelectedItem","externalFilename","externalSrc","fileTypes","uploadFile","file","dragOver","dragError","isUploading","uploadError","hasFooter","isMobile","icon","checked","code","length","type","anchor","anchorPosition","transitionDuration","transitionFunction","closedAnchorPosition","showTransition","expandFrom","icons","isHovered","endIcon","endText","startIcon","startText","hasHorizontalScroll","hasVerticalScroll","src","position","alt","width","hasCpslSearch","items","selectedItem","isOpen","searchQuery","filteredItems","text","totalSteps","step","imageSrc","selected","value","tab","fullWidth","selectedTab","selectedTabRect","loaded","selectedId","autocapitalize","autocomplete","autocorrect","noAutoDisable","autofocus","contrastText","enterkeyhint","mask","inputmode","max","maxlength","min","minlength","multiple","name","pattern","readonly","spellcheck","startIconSrc","maskedInput","anchorOriginHorizontal","anchorOriginVertical","preventBlur","transformOriginHorizontal","transformOriginVertical","triggerAction","trigger","windowPadding","positionX","positionY","closePopover","speed","as","target","color","weight"],"sources":["../../node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v4.19.2 | MIT Licensed | https://stenciljs.com\n */\n\n// src/client/client-patch-browser.ts\nimport { BUILD, NAMESPACE } from \"@stencil/core/internal/app-data\";\nimport { consoleDevInfo, doc, H, promiseResolve } from \"@stencil/core\";\nvar patchBrowser = () => {\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo(\"Running in development mode.\");\n }\n if (BUILD.cloneNodeFix) {\n patchCloneNodeFix(H.prototype);\n }\n const scriptElm = BUILD.scriptDataOpts ? Array.from(doc.querySelectorAll(\"script\")).find(\n (s) => new RegExp(`/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) || s.getAttribute(\"data-stencil-namespace\") === NAMESPACE\n ) : null;\n const importMeta = import.meta.url;\n const opts = BUILD.scriptDataOpts ? (scriptElm || {})[\"data-opts\"] || {} : {};\n if (importMeta !== \"\") {\n opts.resourcesUrl = new URL(\".\", importMeta).href;\n }\n return promiseResolve(opts);\n};\nvar patchCloneNodeFix = (HTMLElementPrototype) => {\n const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;\n HTMLElementPrototype.cloneNode = function(deep) {\n if (this.nodeName === \"TEMPLATE\") {\n return nativeCloneNodeFn.call(this, deep);\n }\n const clonedNode = nativeCloneNodeFn.call(this, false);\n const srcChildNodes = this.childNodes;\n if (deep) {\n for (let i = 0; i < srcChildNodes.length; i++) {\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport {\n patchBrowser\n};\n","export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { patchBrowser } from '@stencil/core/internal/client/patch-browser';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\npatchBrowser().then(async (options) => {\n await globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n});\n"],"mappings":"0HAOA,IAAIA,EAAe,KAUjB,MAAMC,cAAyBC,IAC/B,MAAMC,EAAqE,GAC3E,GAAIF,IAAe,GAAI,CACrBE,EAAKC,aAAe,IAAIC,IAAI,IAAKJ,GAAYK,IACjD,CACE,OAAOC,EAAeJ,EAAK,EClB7BH,IAAeQ,MAAKC,MAAOC,UACnBC,IACN,OAAOC,EAAc,+BAA8B,CAAAC,OAAS,IAAAC,YAAA,oBAAAC,QAAA,MAAAC,MAAA,MAAAC,SAAA,MAAAC,iBAAA,gEAAAC,wBAAA,gCAAAC,uBAAA,+BAAAC,SAAA,IAAAC,UAAA,iBAAAC,KAAA,IAAAC,eAAA,8BAAAD,KAAA,0DAAAE,SAAA,MAAAC,oBAAA,6BAAAC,mBAAA,4BAAAC,MAAA,IAAAC,UAAA,KA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AA+B,MAAA,OAAAjD,SAAA,KAAA2E,YAAA,YAAA/H,SAAA,kBAAAmH,KAAA,oBAAAd,MAAA,2CAAAlD,SAAA,KAAA6E,uBAAA,+BAAAC,qBAAA,6BAAA5F,UAAA,iBAAArC,SAAA,IAAAkI,YAAA,mBAAAC,0BAAA,kCAAAC,wBAAA,gCAAAC,cAAA,qBAAAC,QAAA,IAAAC,cAAA,qBAAAzI,KAAA,KAAA0I,UAAA,KAAAC,UAAA,KAAAC,aAAA,YAAAJ,QAAA,oBAAAD,cAAA,oBAAAH,YAAA,oBAAAF,uBAAA,mBAAAC,qBAAA,mBAAAnI,KAAA,sCAAA0B,KAAA,IAAAmH,MAAA,wBAAAC,GAAA,IAAA5I,SAAA,MAAAuG,UAAA,iBAAA1H,KAAA,IAAA2C,KAAA,IAAAqH,OAAA,IAAAvJ,QAAA,2CAAAI,wBAAA,gCAAAC,uBAAA,+BAAAG,KAAA,IAAAC,eAAA,8BAAAD,KAAA,mCAAAgJ,MAAA,IAAAxJ,QAAA,IAAAyJ,OAAA,sBAAAzD,IAAA,IAAApB,KAAA,SAAAjF,EAAA","ignoreList":[]}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{D as o,C as t,U as c}from"./p-f2393be6.js";function n(o,t,c){return Math.min(Math.max(o,c),t)}class r extends Error{constructor(o){super(`Failed to parse color: "${o}"`)}}var e=r;function s(o){if(typeof o!=="string")throw new e(o);if(o.trim().toLowerCase()==="transparent")return[0,0,0,0];let t=o.trim();t=m.test(o)?a(o):o;const c=p.exec(t);if(c){const o=Array.from(c).slice(1);return[...o.slice(0,3).map((o=>parseInt(i(o,2),16))),parseInt(i(o[3]||"f",2),16)/255]}const r=_.exec(t);if(r){const o=Array.from(r).slice(1);return[...o.slice(0,3).map((o=>parseInt(o,16))),parseInt(o[3]||"ff",16)/255]}const s=f.exec(t);if(s){const o=Array.from(s).slice(1);return[...o.slice(0,3).map((o=>parseInt(o,10))),parseFloat(o[3]||"1")]}const u=b.exec(t);if(u){const[t,c,r,s]=Array.from(u).slice(1).map(parseFloat);if(n(0,100,c)!==c)throw new e(o);if(n(0,100,r)!==r)throw new e(o);return[...h(t,c,r),Number.isNaN(s)?1:s]}throw new e(o)}function u(o){let t=5381;let c=o.length;while(c){t=t*33^o.charCodeAt(--c)}return(t>>>0)%2341}const d=o=>parseInt(o.replace(/_/g,""),36);const l="1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm".split(" ").reduce(((o,t)=>{const c=d(t.substring(0,3));const n=d(t.substring(3)).toString(16);let r="";for(let o=0;o<6-n.length;o++){r+="0"}o[c]=`${r}${n}`;return o}),{});function a(o){const t=o.toLowerCase().trim();const c=l[u(t)];if(!c)throw new e(o);return`#${c}`}const i=(o,t)=>Array.from(Array(t)).map((()=>o)).join("");const p=new RegExp(`^#${i("([a-f0-9])",3)}([a-f0-9])?$`,"i");const _=new RegExp(`^#${i("([a-f0-9]{2})",3)}([a-f0-9]{2})?$`,"i");const f=new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${i(",\\s*(\\d+)\\s*",2)}(?:,\\s*([\\d.]+))?\\s*\\)$`,"i");const b=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i;const m=/^[a-z]+$/i;const g=o=>Math.round(o*255);const h=(o,t,c)=>{let n=c/100;if(t===0){return[n,n,n].map(g)}const r=(o%360+360)%360/60;const e=(1-Math.abs(2*n-1))*(t/100);const s=e*(1-Math.abs(r%2-1));let u=0;let d=0;let l=0;if(r>=0&&r<1){u=e;d=s}else if(r>=1&&r<2){u=s;d=e}else if(r>=2&&r<3){d=e;l=s}else if(r>=3&&r<4){d=s;l=e}else if(r>=4&&r<5){u=s;l=e}else if(r>=5&&r<6){u=e;l=s}const a=n-e/2;const i=u+a;const p=d+a;const _=l+a;return[i,p,_].map(g)};function k(o){if(o==="transparent")return 0;function t(o){const t=o/255;return t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}const[c,n,r]=s(o);return.2126*t(c)+.7152*t(n)+.0722*t(r)}function y(o,t,c,r){return`rgba(${n(0,255,o).toFixed()}, ${n(0,255,t).toFixed()}, ${n(0,255,c).toFixed()}, ${parseFloat(n(0,1,r).toFixed(3))})`}function z(o,t,c){const n=(o,t)=>t===3?o:o/255;const[r,e,u,d]=s(o).map(n);const[l,a,i,p]=s(t).map(n);const _=p-d;const f=c*2-1;const b=f*_===-1?f:f+_/(1+f*_);const m=(b+1)/2;const g=1-m;const h=(r*g+l*m)*255;const k=(e*g+a*m)*255;const z=(u*g+i*m)*255;const x=p*c+d*(1-c);return y(h,k,z,x)}function x(o){return k(o)>.179}function $(o,t,c){return{r:255*c(o.r/255,t.r/255),g:255*c(o.g/255,t.g/255),b:255*c(o.b/255,t.b/255)}}function w(o,t){return o*t}function F(o,t){return o+t-o*t}function j(o,t){return v(t,o)}function v(o,t){return t<=.5?w(o,2*t):F(o,2*t-1)}function q(o,t,c){return Math.min(Math.max(o||0,t),c)}function C(o){return{r:q(o.r,0,255),g:q(o.g,0,255),b:q(o.b,0,255),a:q(o.a,0,1)}}function M(o){return{r:255*o.r,g:255*o.g,b:255*o.b,a:o.a}}function R(o){return{r:o.r/255,g:o.g/255,b:o.b/255,a:o.a}}function A(o,t){void 0===t&&(t=0);var c=Math.pow(10,t);return{r:Math.round(o.r*c)/c,g:Math.round(o.g*c)/c,b:Math.round(o.b*c)/c,a:o.a}}function O(o,t,c,n,r,e){return(1-t/c)*n+t/c*Math.round((1-o)*r+o*e)}function S(o,t,c,n,r){void 0===r&&(r={unitInput:!1,unitOutput:!1,roundOutput:!0}),r.unitInput&&(o=M(o),t=M(t)),o=C(o);var e=(t=C(t)).a+o.a-t.a*o.a,s=c(o,t,n),u=C({r:O(o.a,t.a,e,o.r,t.r,s.r),g:O(o.a,t.a,e,o.g,t.g,s.g),b:O(o.a,t.a,e,o.b,t.b,s.b),a:e});return u=r.unitOutput?R(u):r.roundOutput?A(u):function(o){return A(o,9)}(u),u}function I(o,t){return S(o,t,$,j)}const B=o=>{const t=(new Option).style;t.color=o;return t.color!==""};const X=o=>o.replace(/([a-z0–9])([A-Z])/g,"$1-$2").toLowerCase();const L=(o,t)=>{let c={};for(const n in t){const r=`${o}-${X(n)}`;if(typeof t[n]==="object"&&t[n]!==null){c=Object.assign(Object.assign({},c),L(r,t[n]))}else{c[r]=t[n]}}return c};const E=o=>L("--cpsl-color",o);const D=o=>L("--cpsl-border-radius",o);const P=(o,t)=>{const c=s(o);const n=s(t);const r=I({r:c[0],g:c[1],b:c[2],a:.1},{r:n[0],g:n[1],b:n[2],a:n[3]});return y(r.r,r.g,r.b,r.a)};const T=({borderRadius:o,customBorderRadii:t})=>{let c,n,r=4;const e=1e3;let s=false;let u=false;switch(o){case"none":{u=true;c=0;n=0;r=0;break}case"xs":{c=2;n=4;r=2;break}case"sm":{c=4;n=8;break}case"md":{c=8;n=16;break}case"xl":{c=16;n=32;break}case"full":{c=24;n=32;s=true;break}default:case"lg":{c=12;n=24;break}}document.documentElement.style.setProperty("--cpsl-border-radius-input",`${s?e:c}px`);document.documentElement.style.setProperty("--cpsl-border-radius-select",`${s?e:c}px`);document.documentElement.style.setProperty("--cpsl-border-radius-file",`${s?e:c}px`);document.documentElement.style.setProperty("--cpsl-border-radius-alert",`${s?e:c}px`);document.documentElement.style.setProperty("--cpsl-border-radius-tabs",`${u?0:e}px`);document.documentElement.style.setProperty("--cpsl-border-radius-primary-button",`${s?e:c}px`);document.documentElement.style.setProperty("--cpsl-border-radius-secondary-button",`${s?e:c}px`);document.documentElement.style.setProperty("--cpsl-border-radius-tertiary-button",`${s?e:c}px`);document.documentElement.style.setProperty("--cpsl-border-radius-destructive-button",`${s?e:c}px`);document.documentElement.style.setProperty("--cpsl-border-radius-tile-button",`${c}px`);document.documentElement.style.setProperty("--cpsl-border-radius-qr-code",`${n}px`);document.documentElement.style.setProperty("--cpsl-border-radius-info-box",`${c}px`);document.documentElement.style.setProperty("--cpsl-border-radius-table-container",`${c}px`);document.documentElement.style.setProperty("--cpsl-border-radius-avatar",`${c}px`);document.documentElement.style.setProperty("--cpsl-border-radius-button-group",`${c}px`);document.documentElement.style.setProperty("--cpsl-border-radius-card",`${n}px`);document.documentElement.style.setProperty("--cpsl-border-radius-modal",`${n}px`);document.documentElement.style.setProperty("--cpsl-border-radius-checkbox",`${r}px`);document.documentElement.style.setProperty("--cpsl-border-radius-switch",`${u?0:e}px`);document.documentElement.style.setProperty("--cpsl-border-radius-pill",`${u?0:e}px`);document.documentElement.style.setProperty("--cpsl-border-radius-radio",`${e}px`);if(t){const o=D(t);Object.entries(o).forEach((([o,t])=>document.documentElement.style.setProperty(o,t)))}};const N={body2XS:"body-2xs",bodyXS:"body-xs",bodyS:"body-s",bodyM:"body-m",bodyL:"body-l",bodyXL:"body-xl",headingXS:"heading-xs",headingS:"heading-s",headingM:"heading-m",headingL:"heading-l",headingXL:"heading-xl",heading2XL:"heading-2xl"};const U=({font:o,customFontSizes:t})=>{if(o){document.documentElement.style.setProperty("--cpsl-default-font",o)}Object.entries(N).forEach((([o,c])=>{if(t===null||t===void 0?void 0:t[o]){document.documentElement.style.setProperty(`--cpsl-font-size-${c}`,t[o])}else{document.documentElement.style.removeProperty(`--cpsl-font-size-${c}`)}}))};const Z=({foregroundColor:n,backgroundColor:r,accentColor:e,isDarkTheme:s,customPalette:u})=>{if(!n||!B(n)){n=o.foregroundColor}if(!r||!B(r)){r=o.backgroundColor}if(!Boolean(e)||!B(e)){e=n}const d=Boolean(e)?!x(e):false;const l={foregroundColors:[],backgroundColors:[],accentColors:[]};const a=s?"#FFFFFF":"#000000";const i=s?"#000000":"#FFFFFF";const p=d?"#FFFFFF":"#000000";t.forEach((o=>{l.foregroundColors.push(z(n,i,o));l.backgroundColors.push(z(r,a,o));l.accentColors.push(z(e,p,o))}));document.documentElement.style.setProperty("--cpsl-color-background-0",l.backgroundColors[0]);document.documentElement.style.setProperty("--cpsl-color-background-4",l.backgroundColors[1]);document.documentElement.style.setProperty("--cpsl-color-background-8",l.backgroundColors[2]);document.documentElement.style.setProperty("--cpsl-color-background-16",l.backgroundColors[3]);document.documentElement.style.setProperty("--cpsl-color-background-32",l.backgroundColors[4]);document.documentElement.style.setProperty("--cpsl-color-background-48",l.backgroundColors[5]);document.documentElement.style.setProperty("--cpsl-color-background-64",l.backgroundColors[6]);document.documentElement.style.setProperty("--cpsl-color-background-80",l.backgroundColors[7]);document.documentElement.style.setProperty("--cpsl-color-background-96",l.backgroundColors[8]);document.documentElement.style.setProperty("--cpsl-color-foreground-0",l.foregroundColors[0]);document.documentElement.style.setProperty("--cpsl-color-foreground-4",l.foregroundColors[1]);document.documentElement.style.setProperty("--cpsl-color-foreground-8",l.foregroundColors[2]);document.documentElement.style.setProperty("--cpsl-color-foreground-16",l.foregroundColors[3]);document.documentElement.style.setProperty("--cpsl-color-foreground-32",l.foregroundColors[4]);document.documentElement.style.setProperty("--cpsl-color-foreground-48",l.foregroundColors[5]);document.documentElement.style.setProperty("--cpsl-color-foreground-64",l.foregroundColors[6]);document.documentElement.style.setProperty("--cpsl-color-foreground-80",l.foregroundColors[7]);document.documentElement.style.setProperty("--cpsl-color-foreground-96",l.foregroundColors[8]);document.documentElement.style.setProperty("--cpsl-color-accent-0",l.accentColors[0]);document.documentElement.style.setProperty("--cpsl-color-accent-4",l.accentColors[1]);document.documentElement.style.setProperty("--cpsl-color-accent-8",l.accentColors[2]);document.documentElement.style.setProperty("--cpsl-color-accent-16",l.accentColors[3]);document.documentElement.style.setProperty("--cpsl-color-accent-32",l.accentColors[4]);document.documentElement.style.setProperty("--cpsl-color-accent-48",l.accentColors[5]);document.documentElement.style.setProperty("--cpsl-color-accent-64",l.accentColors[6]);document.documentElement.style.setProperty("--cpsl-color-accent-80",l.accentColors[7]);document.documentElement.style.setProperty("--cpsl-color-accent-96",l.accentColors[8]);document.documentElement.style.setProperty("--cpsl-color-contrast",s?"#FFFFFF":"#000000");const _="#FFFFFF";const f=.72;const b=P(n,c.red);const m=P(n,c.yellow);const g=P(n,c.green);document.documentElement.style.setProperty("--cpsl-color-utility-red",b);document.documentElement.style.setProperty("--cpsl-color-utility-yellow",m);document.documentElement.style.setProperty("--cpsl-color-utility-green",g);document.documentElement.style.setProperty("--cpsl-color-utility-red-light",z(b,_,f));document.documentElement.style.setProperty("--cpsl-color-utility-yellow-light",z(m,_,f));document.documentElement.style.setProperty("--cpsl-color-utility-green-light",z(g,_,f));if(u){const o=E(u);Object.entries(o).forEach((([o,t])=>document.documentElement.style.setProperty(o,t)))}};const G=({foregroundColor:t=o.foregroundColor,backgroundColor:c=o.backgroundColor,accentColor:n,darkForegroundColor:r,darkBackgroundColor:e,darkAccentColor:s,mode:u="light",font:d,customPalette:l,borderRadius:a,customFontSizes:i,customBorderRadii:p})=>{const _=u==="dark";Z({foregroundColor:_?r!==null&&r!==void 0?r:t:t,backgroundColor:_?e!==null&&e!==void 0?e:c:c,accentColor:_?s!==null&&s!==void 0?s:n:n,customPalette:l,isDarkTheme:_});U({font:d,customFontSizes:i});T({borderRadius:a,customBorderRadii:p})};export{G as generateTheme};
|
1
|
+
import{D as o,C as t,U as n}from"./p-f2393be6.js";export{g as getPseudoRandomBackground}from"./p-286db996.js";function c(o,t,n){return Math.min(Math.max(o,n),t)}class r extends Error{constructor(o){super(`Failed to parse color: "${o}"`)}}var e=r;function s(o){if(typeof o!=="string")throw new e(o);if(o.trim().toLowerCase()==="transparent")return[0,0,0,0];let t=o.trim();t=m.test(o)?a(o):o;const n=p.exec(t);if(n){const o=Array.from(n).slice(1);return[...o.slice(0,3).map((o=>parseInt(i(o,2),16))),parseInt(i(o[3]||"f",2),16)/255]}const r=_.exec(t);if(r){const o=Array.from(r).slice(1);return[...o.slice(0,3).map((o=>parseInt(o,16))),parseInt(o[3]||"ff",16)/255]}const s=f.exec(t);if(s){const o=Array.from(s).slice(1);return[...o.slice(0,3).map((o=>parseInt(o,10))),parseFloat(o[3]||"1")]}const u=b.exec(t);if(u){const[t,n,r,s]=Array.from(u).slice(1).map(parseFloat);if(c(0,100,n)!==n)throw new e(o);if(c(0,100,r)!==r)throw new e(o);return[...k(t,n,r),Number.isNaN(s)?1:s]}throw new e(o)}function u(o){let t=5381;let n=o.length;while(n){t=t*33^o.charCodeAt(--n)}return(t>>>0)%2341}const d=o=>parseInt(o.replace(/_/g,""),36);const l="1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm".split(" ").reduce(((o,t)=>{const n=d(t.substring(0,3));const c=d(t.substring(3)).toString(16);let r="";for(let o=0;o<6-c.length;o++){r+="0"}o[n]=`${r}${c}`;return o}),{});function a(o){const t=o.toLowerCase().trim();const n=l[u(t)];if(!n)throw new e(o);return`#${n}`}const i=(o,t)=>Array.from(Array(t)).map((()=>o)).join("");const p=new RegExp(`^#${i("([a-f0-9])",3)}([a-f0-9])?$`,"i");const _=new RegExp(`^#${i("([a-f0-9]{2})",3)}([a-f0-9]{2})?$`,"i");const f=new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${i(",\\s*(\\d+)\\s*",2)}(?:,\\s*([\\d.]+))?\\s*\\)$`,"i");const b=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i;const m=/^[a-z]+$/i;const h=o=>Math.round(o*255);const k=(o,t,n)=>{let c=n/100;if(t===0){return[c,c,c].map(h)}const r=(o%360+360)%360/60;const e=(1-Math.abs(2*c-1))*(t/100);const s=e*(1-Math.abs(r%2-1));let u=0;let d=0;let l=0;if(r>=0&&r<1){u=e;d=s}else if(r>=1&&r<2){u=s;d=e}else if(r>=2&&r<3){d=e;l=s}else if(r>=3&&r<4){d=s;l=e}else if(r>=4&&r<5){u=s;l=e}else if(r>=5&&r<6){u=e;l=s}const a=c-e/2;const i=u+a;const p=d+a;const _=l+a;return[i,p,_].map(h)};function y(o){if(o==="transparent")return 0;function t(o){const t=o/255;return t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}const[n,c,r]=s(o);return.2126*t(n)+.7152*t(c)+.0722*t(r)}function z(o,t,n,r){return`rgba(${c(0,255,o).toFixed()}, ${c(0,255,t).toFixed()}, ${c(0,255,n).toFixed()}, ${parseFloat(c(0,1,r).toFixed(3))})`}function x(o,t,n){const c=(o,t)=>t===3?o:o/255;const[r,e,u,d]=s(o).map(c);const[l,a,i,p]=s(t).map(c);const _=p-d;const f=n*2-1;const b=f*_===-1?f:f+_/(1+f*_);const m=(b+1)/2;const g=1-m;const h=(r*g+l*m)*255;const k=(e*g+a*m)*255;const y=(u*g+i*m)*255;const x=p*n+d*(1-n);return z(h,k,y,x)}function $(o){return y(o)>.179}function w(o,t,n){return{r:255*n(o.r/255,t.r/255),g:255*n(o.g/255,t.g/255),b:255*n(o.b/255,t.b/255)}}function F(o,t){return o*t}function j(o,t){return o+t-o*t}function v(o,t){return q(t,o)}function q(o,t){return t<=.5?F(o,2*t):j(o,2*t-1)}function C(o,t,n){return Math.min(Math.max(o||0,t),n)}function M(o){return{r:C(o.r,0,255),g:C(o.g,0,255),b:C(o.b,0,255),a:C(o.a,0,1)}}function R(o){return{r:255*o.r,g:255*o.g,b:255*o.b,a:o.a}}function A(o){return{r:o.r/255,g:o.g/255,b:o.b/255,a:o.a}}function O(o,t){void 0===t&&(t=0);var n=Math.pow(10,t);return{r:Math.round(o.r*n)/n,g:Math.round(o.g*n)/n,b:Math.round(o.b*n)/n,a:o.a}}function S(o,t,n,c,r,e){return(1-t/n)*c+t/n*Math.round((1-o)*r+o*e)}function B(o,t,n,c,r){void 0===r&&(r={unitInput:!1,unitOutput:!1,roundOutput:!0}),r.unitInput&&(o=R(o),t=R(t)),o=M(o);var e=(t=M(t)).a+o.a-t.a*o.a,s=n(o,t,c),u=M({r:S(o.a,t.a,e,o.r,t.r,s.r),g:S(o.a,t.a,e,o.g,t.g,s.g),b:S(o.a,t.a,e,o.b,t.b,s.b),a:e});return u=r.unitOutput?A(u):r.roundOutput?O(u):function(o){return O(o,9)}(u),u}function I(o,t){return B(o,t,w,v)}const X=o=>{const t=(new Option).style;t.color=o;return t.color!==""};const L=o=>o.replace(/([a-z0–9])([A-Z])/g,"$1-$2").toLowerCase();const E=(o,t)=>{let n={};for(const c in t){const r=`${o}-${L(c)}`;if(typeof t[c]==="object"&&t[c]!==null){n=Object.assign(Object.assign({},n),E(r,t[c]))}else{n[r]=t[c]}}return n};const P=o=>E("--cpsl-color",o);const D=o=>E("--cpsl-border-radius",o);const T=(o,t)=>{const n=s(o);const c=s(t);const r=I({r:n[0],g:n[1],b:n[2],a:.1},{r:c[0],g:c[1],b:c[2],a:c[3]});return z(r.r,r.g,r.b,r.a)};const N=({borderRadius:o,customBorderRadii:t})=>{let n,c,r=4;const e=1e3;let s=false;let u=false;switch(o){case"none":{u=true;n=0;c=0;r=0;break}case"xs":{n=2;c=4;r=2;break}case"sm":{n=4;c=8;break}case"md":{n=8;c=16;break}case"xl":{n=16;c=32;break}case"full":{n=24;c=32;s=true;break}default:case"lg":{n=12;c=24;break}}document.documentElement.style.setProperty("--cpsl-border-radius-input",`${s?e:n}px`);document.documentElement.style.setProperty("--cpsl-border-radius-select",`${s?e:n}px`);document.documentElement.style.setProperty("--cpsl-border-radius-file",`${s?e:n}px`);document.documentElement.style.setProperty("--cpsl-border-radius-alert",`${s?e:n}px`);document.documentElement.style.setProperty("--cpsl-border-radius-tabs",`${u?0:e}px`);document.documentElement.style.setProperty("--cpsl-border-radius-primary-button",`${s?e:n}px`);document.documentElement.style.setProperty("--cpsl-border-radius-secondary-button",`${s?e:n}px`);document.documentElement.style.setProperty("--cpsl-border-radius-tertiary-button",`${s?e:n}px`);document.documentElement.style.setProperty("--cpsl-border-radius-destructive-button",`${s?e:n}px`);document.documentElement.style.setProperty("--cpsl-border-radius-tile-button",`${n}px`);document.documentElement.style.setProperty("--cpsl-border-radius-qr-code",`${c}px`);document.documentElement.style.setProperty("--cpsl-border-radius-info-box",`${n}px`);document.documentElement.style.setProperty("--cpsl-border-radius-table-container",`${n}px`);document.documentElement.style.setProperty("--cpsl-border-radius-avatar",`${n}px`);document.documentElement.style.setProperty("--cpsl-border-radius-button-group",`${n}px`);document.documentElement.style.setProperty("--cpsl-border-radius-card",`${c}px`);document.documentElement.style.setProperty("--cpsl-border-radius-modal",`${c}px`);document.documentElement.style.setProperty("--cpsl-border-radius-checkbox",`${r}px`);document.documentElement.style.setProperty("--cpsl-border-radius-switch",`${u?0:e}px`);document.documentElement.style.setProperty("--cpsl-border-radius-pill",`${u?0:e}px`);document.documentElement.style.setProperty("--cpsl-border-radius-radio",`${e}px`);if(t){const o=D(t);Object.entries(o).forEach((([o,t])=>document.documentElement.style.setProperty(o,t)))}};const U={body2XS:"body-2xs",bodyXS:"body-xs",bodyS:"body-s",bodyM:"body-m",bodyL:"body-l",bodyXL:"body-xl",headingXS:"heading-xs",headingS:"heading-s",headingM:"heading-m",headingL:"heading-l",headingXL:"heading-xl",heading2XL:"heading-2xl"};const Z=({font:o,customFontSizes:t})=>{if(o){document.documentElement.style.setProperty("--cpsl-default-font",o)}Object.entries(U).forEach((([o,n])=>{if(t===null||t===void 0?void 0:t[o]){document.documentElement.style.setProperty(`--cpsl-font-size-${n}`,t[o])}else{document.documentElement.style.removeProperty(`--cpsl-font-size-${n}`)}}))};const G=({foregroundColor:c,backgroundColor:r,accentColor:e,isDarkTheme:s,customPalette:u})=>{if(!c||!X(c)){c=o.foregroundColor}if(!r||!X(r)){r=o.backgroundColor}if(!Boolean(e)||!X(e)){e=c}const d=Boolean(e)?!$(e):false;const l={foregroundColors:[],backgroundColors:[],accentColors:[]};const a=s?"#FFFFFF":"#000000";const i=s?"#000000":"#FFFFFF";const p=d?"#FFFFFF":"#000000";t.forEach((o=>{l.foregroundColors.push(x(c,i,o));l.backgroundColors.push(x(r,a,o));l.accentColors.push(x(e,p,o))}));document.documentElement.style.setProperty("--cpsl-color-background-0",l.backgroundColors[0]);document.documentElement.style.setProperty("--cpsl-color-background-4",l.backgroundColors[1]);document.documentElement.style.setProperty("--cpsl-color-background-8",l.backgroundColors[2]);document.documentElement.style.setProperty("--cpsl-color-background-16",l.backgroundColors[3]);document.documentElement.style.setProperty("--cpsl-color-background-32",l.backgroundColors[4]);document.documentElement.style.setProperty("--cpsl-color-background-48",l.backgroundColors[5]);document.documentElement.style.setProperty("--cpsl-color-background-64",l.backgroundColors[6]);document.documentElement.style.setProperty("--cpsl-color-background-80",l.backgroundColors[7]);document.documentElement.style.setProperty("--cpsl-color-background-96",l.backgroundColors[8]);document.documentElement.style.setProperty("--cpsl-color-foreground-0",l.foregroundColors[0]);document.documentElement.style.setProperty("--cpsl-color-foreground-4",l.foregroundColors[1]);document.documentElement.style.setProperty("--cpsl-color-foreground-8",l.foregroundColors[2]);document.documentElement.style.setProperty("--cpsl-color-foreground-16",l.foregroundColors[3]);document.documentElement.style.setProperty("--cpsl-color-foreground-32",l.foregroundColors[4]);document.documentElement.style.setProperty("--cpsl-color-foreground-48",l.foregroundColors[5]);document.documentElement.style.setProperty("--cpsl-color-foreground-64",l.foregroundColors[6]);document.documentElement.style.setProperty("--cpsl-color-foreground-80",l.foregroundColors[7]);document.documentElement.style.setProperty("--cpsl-color-foreground-96",l.foregroundColors[8]);document.documentElement.style.setProperty("--cpsl-color-accent-0",l.accentColors[0]);document.documentElement.style.setProperty("--cpsl-color-accent-4",l.accentColors[1]);document.documentElement.style.setProperty("--cpsl-color-accent-8",l.accentColors[2]);document.documentElement.style.setProperty("--cpsl-color-accent-16",l.accentColors[3]);document.documentElement.style.setProperty("--cpsl-color-accent-32",l.accentColors[4]);document.documentElement.style.setProperty("--cpsl-color-accent-48",l.accentColors[5]);document.documentElement.style.setProperty("--cpsl-color-accent-64",l.accentColors[6]);document.documentElement.style.setProperty("--cpsl-color-accent-80",l.accentColors[7]);document.documentElement.style.setProperty("--cpsl-color-accent-96",l.accentColors[8]);document.documentElement.style.setProperty("--cpsl-color-contrast",s?"#FFFFFF":"#000000");const _="#FFFFFF";const f=.72;const b=T(c,n.red);const m=T(c,n.yellow);const g=T(c,n.green);document.documentElement.style.setProperty("--cpsl-color-utility-red",b);document.documentElement.style.setProperty("--cpsl-color-utility-yellow",m);document.documentElement.style.setProperty("--cpsl-color-utility-green",g);document.documentElement.style.setProperty("--cpsl-color-utility-red-light",x(b,_,f));document.documentElement.style.setProperty("--cpsl-color-utility-yellow-light",x(m,_,f));document.documentElement.style.setProperty("--cpsl-color-utility-green-light",x(g,_,f));if(u){const o=P(u);Object.entries(o).forEach((([o,t])=>document.documentElement.style.setProperty(o,t)))}};const H=({foregroundColor:t=o.foregroundColor,backgroundColor:n=o.backgroundColor,accentColor:c,darkForegroundColor:r,darkBackgroundColor:e,darkAccentColor:s,mode:u="light",font:d,customPalette:l,borderRadius:a,customFontSizes:i,customBorderRadii:p})=>{const _=u==="dark";G({foregroundColor:_?r!==null&&r!==void 0?r:t:t,backgroundColor:_?e!==null&&e!==void 0?e:n:n,accentColor:_?s!==null&&s!==void 0?s:c:c,customPalette:l,isDarkTheme:_});Z({font:d,customFontSizes:i});N({borderRadius:a,customBorderRadii:p})};export{H as generateTheme};
|
2
2
|
//# sourceMappingURL=index.esm.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["guard","low","high","value","Math","min","max","ColorError","Error","constructor","color","super","ColorError$1","parseToRgba","trim","toLowerCase","normalizedColor","namedColorRegex","test","nameToHex","reducedHexMatch","reducedHexRegex","exec","arr","Array","from","slice","map","x","parseInt","r","hexMatch","hexRegex","rgbaMatch","rgbaRegex","parseFloat","hslaMatch","hslaRegex","h","s","l","a","hslToRgb","Number","isNaN","hash","str","i","length","charCodeAt","colorToInt","replace","compressedColorMap","split","reduce","acc","next","key","substring","hex","toString","prefix","normalizedColorName","result","amount","join","RegExp","roundColor","round","hue","saturation","lightness","huePrime","chroma","abs","secondComponent","red","green","blue","lightnessModification","finalRed","finalGreen","finalBlue","getLuminance","f","channel","pow","g","b","rgba","alpha","toFixed","mix","color1","color2","weight","normalize","n","index","r1","g1","b1","a1","r2","g2","b2","a2","alphaDelta","normalizedWeight","combinedWeight","weight2","weight1","readableColorIsBlack","t","u","M","m","d","p","v","o","O","unitInput","unitOutput","roundOutput","e","c","D","isColor","strColor","Option","style","toKebabCase","pascal","buildVars","prev","obj","resp","k","name","Object","assign","getCssColors","customPalette","getCssBorderRadii","customBorderRadii","overlayMix","baseColor","overlayColor","baseRGBA","overlayRGBA","finalRGBA","overlay","generateBorderRadii","borderRadius","mediumRadius","largeRadius","checkboxRadius","fullRadius","isFull","isNone","document","documentElement","setProperty","cssBorderRadiiVars","entries","forEach","FONT_NAME_MAP","body2XS","bodyXS","bodyS","bodyM","bodyL","bodyXL","headingXS","headingS","headingM","headingL","headingXL","heading2XL","generateFont","font","customFontSizes","removeProperty","generatePalette","foregroundColor","backgroundColor","accentColor","isDarkTheme","DEFAULT_THEME","Boolean","isDarkAccent","palette","foregroundColors","backgroundColors","accentColors","backgroundMixColor","foregroundMixColor","accentMixColor","COLOR_MIXES","push","utilityLightMixColor","utilityLightMixValue","UTILITY_COLORS","yellow","cssColorVars","generateTheme","darkForegroundColor","darkBackgroundColor","darkAccentColor","mode"],"sources":["../../node_modules/color2k/dist/index.module.es.js","../../node_modules/color-blend/dist/index.modern.js","src/utils/theme/utils.ts","src/utils/theme/generateBorderRadii.ts","src/utils/theme/generateFont.ts","src/utils/theme/generatePalette.ts","src/utils/theme/generateTheme.ts"],"sourcesContent":["/**\n * A simple guard function:\n *\n * ```js\n * Math.min(Math.max(low, value), high)\n * ```\n */\nfunction guard(low, high, value) {\n return Math.min(Math.max(low, value), high);\n}\n\nclass ColorError extends Error {\n constructor(color) {\n super(`Failed to parse color: \"${color}\"`);\n }\n}\nvar ColorError$1 = ColorError;\n\n/**\n * Parses a color into red, gree, blue, alpha parts\n *\n * @param color the input color. Can be a RGB, RBGA, HSL, HSLA, or named color\n */\nfunction parseToRgba(color) {\n if (typeof color !== 'string') throw new ColorError$1(color);\n if (color.trim().toLowerCase() === 'transparent') return [0, 0, 0, 0];\n let normalizedColor = color.trim();\n normalizedColor = namedColorRegex.test(color) ? nameToHex(color) : color;\n const reducedHexMatch = reducedHexRegex.exec(normalizedColor);\n if (reducedHexMatch) {\n const arr = Array.from(reducedHexMatch).slice(1);\n return [...arr.slice(0, 3).map(x => parseInt(r(x, 2), 16)), parseInt(r(arr[3] || 'f', 2), 16) / 255];\n }\n const hexMatch = hexRegex.exec(normalizedColor);\n if (hexMatch) {\n const arr = Array.from(hexMatch).slice(1);\n return [...arr.slice(0, 3).map(x => parseInt(x, 16)), parseInt(arr[3] || 'ff', 16) / 255];\n }\n const rgbaMatch = rgbaRegex.exec(normalizedColor);\n if (rgbaMatch) {\n const arr = Array.from(rgbaMatch).slice(1);\n return [...arr.slice(0, 3).map(x => parseInt(x, 10)), parseFloat(arr[3] || '1')];\n }\n const hslaMatch = hslaRegex.exec(normalizedColor);\n if (hslaMatch) {\n const [h, s, l, a] = Array.from(hslaMatch).slice(1).map(parseFloat);\n if (guard(0, 100, s) !== s) throw new ColorError$1(color);\n if (guard(0, 100, l) !== l) throw new ColorError$1(color);\n return [...hslToRgb(h, s, l), Number.isNaN(a) ? 1 : a];\n }\n throw new ColorError$1(color);\n}\nfunction hash(str) {\n let hash = 5381;\n let i = str.length;\n while (i) {\n hash = hash * 33 ^ str.charCodeAt(--i);\n }\n\n /* JavaScript does bitwise operations (like XOR, above) on 32-bit signed\n * integers. Since we want the results to be always positive, convert the\n * signed int to an unsigned by doing an unsigned bitshift. */\n return (hash >>> 0) % 2341;\n}\nconst colorToInt = x => parseInt(x.replace(/_/g, ''), 36);\nconst compressedColorMap = '1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm'.split(' ').reduce((acc, next) => {\n const key = colorToInt(next.substring(0, 3));\n const hex = colorToInt(next.substring(3)).toString(16);\n\n // NOTE: padStart could be used here but it breaks Node 6 compat\n // https://github.com/ricokahler/color2k/issues/351\n let prefix = '';\n for (let i = 0; i < 6 - hex.length; i++) {\n prefix += '0';\n }\n acc[key] = `${prefix}${hex}`;\n return acc;\n}, {});\n\n/**\n * Checks if a string is a CSS named color and returns its equivalent hex value, otherwise returns the original color.\n */\nfunction nameToHex(color) {\n const normalizedColorName = color.toLowerCase().trim();\n const result = compressedColorMap[hash(normalizedColorName)];\n if (!result) throw new ColorError$1(color);\n return `#${result}`;\n}\nconst r = (str, amount) => Array.from(Array(amount)).map(() => str).join('');\nconst reducedHexRegex = new RegExp(`^#${r('([a-f0-9])', 3)}([a-f0-9])?$`, 'i');\nconst hexRegex = new RegExp(`^#${r('([a-f0-9]{2})', 3)}([a-f0-9]{2})?$`, 'i');\nconst rgbaRegex = new RegExp(`^rgba?\\\\(\\\\s*(\\\\d+)\\\\s*${r(',\\\\s*(\\\\d+)\\\\s*', 2)}(?:,\\\\s*([\\\\d.]+))?\\\\s*\\\\)$`, 'i');\nconst hslaRegex = /^hsla?\\(\\s*([\\d.]+)\\s*,\\s*([\\d.]+)%\\s*,\\s*([\\d.]+)%(?:\\s*,\\s*([\\d.]+))?\\s*\\)$/i;\nconst namedColorRegex = /^[a-z]+$/i;\nconst roundColor = color => {\n return Math.round(color * 255);\n};\nconst hslToRgb = (hue, saturation, lightness) => {\n let l = lightness / 100;\n if (saturation === 0) {\n // achromatic\n return [l, l, l].map(roundColor);\n }\n\n // formulae from https://en.wikipedia.org/wiki/HSL_and_HSV\n const huePrime = (hue % 360 + 360) % 360 / 60;\n const chroma = (1 - Math.abs(2 * l - 1)) * (saturation / 100);\n const secondComponent = chroma * (1 - Math.abs(huePrime % 2 - 1));\n let red = 0;\n let green = 0;\n let blue = 0;\n if (huePrime >= 0 && huePrime < 1) {\n red = chroma;\n green = secondComponent;\n } else if (huePrime >= 1 && huePrime < 2) {\n red = secondComponent;\n green = chroma;\n } else if (huePrime >= 2 && huePrime < 3) {\n green = chroma;\n blue = secondComponent;\n } else if (huePrime >= 3 && huePrime < 4) {\n green = secondComponent;\n blue = chroma;\n } else if (huePrime >= 4 && huePrime < 5) {\n red = secondComponent;\n blue = chroma;\n } else if (huePrime >= 5 && huePrime < 6) {\n red = chroma;\n blue = secondComponent;\n }\n const lightnessModification = l - chroma / 2;\n const finalRed = red + lightnessModification;\n const finalGreen = green + lightnessModification;\n const finalBlue = blue + lightnessModification;\n return [finalRed, finalGreen, finalBlue].map(roundColor);\n};\n\n// taken from:\n// https://github.com/styled-components/polished/blob/a23a6a2bb26802b3d922d9c3b67bac3f3a54a310/src/internalHelpers/_rgbToHsl.js\n\n/**\n * Parses a color in hue, saturation, lightness, and the alpha channel.\n *\n * Hue is a number between 0 and 360, saturation, lightness, and alpha are\n * decimal percentages between 0 and 1\n */\nfunction parseToHsla(color) {\n const [red, green, blue, alpha] = parseToRgba(color).map((value, index) =>\n // 3rd index is alpha channel which is already normalized\n index === 3 ? value : value / 255);\n const max = Math.max(red, green, blue);\n const min = Math.min(red, green, blue);\n const lightness = (max + min) / 2;\n\n // achromatic\n if (max === min) return [0, 0, lightness, alpha];\n const delta = max - min;\n const saturation = lightness > 0.5 ? delta / (2 - max - min) : delta / (max + min);\n const hue = 60 * (red === max ? (green - blue) / delta + (green < blue ? 6 : 0) : green === max ? (blue - red) / delta + 2 : (red - green) / delta + 4);\n return [hue, saturation, lightness, alpha];\n}\n\n/**\n * Takes in hsla parts and constructs an hsla string\n *\n * @param hue The color circle (from 0 to 360) - 0 (or 360) is red, 120 is green, 240 is blue\n * @param saturation Percentage of saturation, given as a decimal between 0 and 1\n * @param lightness Percentage of lightness, given as a decimal between 0 and 1\n * @param alpha Percentage of opacity, given as a decimal between 0 and 1\n */\nfunction hsla(hue, saturation, lightness, alpha) {\n return `hsla(${(hue % 360).toFixed()}, ${guard(0, 100, saturation * 100).toFixed()}%, ${guard(0, 100, lightness * 100).toFixed()}%, ${parseFloat(guard(0, 1, alpha).toFixed(3))})`;\n}\n\n/**\n * Adjusts the current hue of the color by the given degrees. Wraps around when\n * over 360.\n *\n * @param color input color\n * @param degrees degrees to adjust the input color, accepts degree integers\n * (0 - 360) and wraps around on overflow\n */\nfunction adjustHue(color, degrees) {\n const [h, s, l, a] = parseToHsla(color);\n return hsla(h + degrees, s, l, a);\n}\n\n/**\n * Darkens using lightness. This is equivalent to subtracting the lightness\n * from the L in HSL.\n *\n * @param amount The amount to darken, given as a decimal between 0 and 1\n */\nfunction darken(color, amount) {\n const [hue, saturation, lightness, alpha] = parseToHsla(color);\n return hsla(hue, saturation, lightness - amount, alpha);\n}\n\n/**\n * Desaturates the input color by the given amount via subtracting from the `s`\n * in `hsla`.\n *\n * @param amount The amount to desaturate, given as a decimal between 0 and 1\n */\nfunction desaturate(color, amount) {\n const [h, s, l, a] = parseToHsla(color);\n return hsla(h, s - amount, l, a);\n}\n\n// taken from:\n// https://github.com/styled-components/polished/blob/0764c982551b487469043acb56281b0358b3107b/src/color/getLuminance.js\n\n/**\n * Returns a number (float) representing the luminance of a color.\n */\nfunction getLuminance(color) {\n if (color === 'transparent') return 0;\n function f(x) {\n const channel = x / 255;\n return channel <= 0.04045 ? channel / 12.92 : Math.pow((channel + 0.055) / 1.055, 2.4);\n }\n const [r, g, b] = parseToRgba(color);\n return 0.2126 * f(r) + 0.7152 * f(g) + 0.0722 * f(b);\n}\n\n// taken from:\n// https://github.com/styled-components/polished/blob/0764c982551b487469043acb56281b0358b3107b/src/color/getContrast.js\n\n/**\n * Returns the contrast ratio between two colors based on\n * [W3's recommended equation for calculating contrast](http://www.w3.org/TR/WCAG20/#contrast-ratiodef).\n */\nfunction getContrast(color1, color2) {\n const luminance1 = getLuminance(color1);\n const luminance2 = getLuminance(color2);\n return luminance1 > luminance2 ? (luminance1 + 0.05) / (luminance2 + 0.05) : (luminance2 + 0.05) / (luminance1 + 0.05);\n}\n\n/**\n * Takes in rgba parts and returns an rgba string\n *\n * @param red The amount of red in the red channel, given in a number between 0 and 255 inclusive\n * @param green The amount of green in the red channel, given in a number between 0 and 255 inclusive\n * @param blue The amount of blue in the red channel, given in a number between 0 and 255 inclusive\n * @param alpha Percentage of opacity, given as a decimal between 0 and 1\n */\nfunction rgba(red, green, blue, alpha) {\n return `rgba(${guard(0, 255, red).toFixed()}, ${guard(0, 255, green).toFixed()}, ${guard(0, 255, blue).toFixed()}, ${parseFloat(guard(0, 1, alpha).toFixed(3))})`;\n}\n\n/**\n * Mixes two colors together. Taken from sass's implementation.\n */\nfunction mix(color1, color2, weight) {\n const normalize = (n, index) =>\n // 3rd index is alpha channel which is already normalized\n index === 3 ? n : n / 255;\n const [r1, g1, b1, a1] = parseToRgba(color1).map(normalize);\n const [r2, g2, b2, a2] = parseToRgba(color2).map(normalize);\n\n // The formula is copied from the original Sass implementation:\n // http://sass-lang.com/documentation/Sass/Script/Functions.html#mix-instance_method\n const alphaDelta = a2 - a1;\n const normalizedWeight = weight * 2 - 1;\n const combinedWeight = normalizedWeight * alphaDelta === -1 ? normalizedWeight : normalizedWeight + alphaDelta / (1 + normalizedWeight * alphaDelta);\n const weight2 = (combinedWeight + 1) / 2;\n const weight1 = 1 - weight2;\n const r = (r1 * weight1 + r2 * weight2) * 255;\n const g = (g1 * weight1 + g2 * weight2) * 255;\n const b = (b1 * weight1 + b2 * weight2) * 255;\n const a = a2 * weight + a1 * (1 - weight);\n return rgba(r, g, b, a);\n}\n\n/**\n * Given a series colors, this function will return a `scale(x)` function that\n * accepts a percentage as a decimal between 0 and 1 and returns the color at\n * that percentage in the scale.\n *\n * ```js\n * const scale = getScale('red', 'yellow', 'green');\n * console.log(scale(0)); // rgba(255, 0, 0, 1)\n * console.log(scale(0.5)); // rgba(255, 255, 0, 1)\n * console.log(scale(1)); // rgba(0, 128, 0, 1)\n * ```\n *\n * If you'd like to limit the domain and range like chroma-js, we recommend\n * wrapping scale again.\n *\n * ```js\n * const _scale = getScale('red', 'yellow', 'green');\n * const scale = x => _scale(x / 100);\n *\n * console.log(scale(0)); // rgba(255, 0, 0, 1)\n * console.log(scale(50)); // rgba(255, 255, 0, 1)\n * console.log(scale(100)); // rgba(0, 128, 0, 1)\n * ```\n */\nfunction getScale(...colors) {\n return n => {\n const lastIndex = colors.length - 1;\n const lowIndex = guard(0, lastIndex, Math.floor(n * lastIndex));\n const highIndex = guard(0, lastIndex, Math.ceil(n * lastIndex));\n const color1 = colors[lowIndex];\n const color2 = colors[highIndex];\n const unit = 1 / lastIndex;\n const weight = (n - unit * lowIndex) / unit;\n return mix(color1, color2, weight);\n };\n}\n\nconst guidelines = {\n decorative: 1.5,\n readable: 3,\n aa: 4.5,\n aaa: 7\n};\n\n/**\n * Returns whether or not a color has bad contrast against a background\n * according to a given standard.\n */\nfunction hasBadContrast(color, standard = 'aa', background = '#fff') {\n return getContrast(color, background) < guidelines[standard];\n}\n\n/**\n * Lightens a color by a given amount. This is equivalent to\n * `darken(color, -amount)`\n *\n * @param amount The amount to darken, given as a decimal between 0 and 1\n */\nfunction lighten(color, amount) {\n return darken(color, -amount);\n}\n\n/**\n * Takes in a color and makes it more transparent by convert to `rgba` and\n * decreasing the amount in the alpha channel.\n *\n * @param amount The amount to increase the transparency by, given as a decimal between 0 and 1\n */\nfunction transparentize(color, amount) {\n const [r, g, b, a] = parseToRgba(color);\n return rgba(r, g, b, a - amount);\n}\n\n/**\n * Takes a color and un-transparentizes it. Equivalent to\n * `transparentize(color, -amount)`\n *\n * @param amount The amount to increase the opacity by, given as a decimal between 0 and 1\n */\nfunction opacify(color, amount) {\n return transparentize(color, -amount);\n}\n\n/**\n * An alternative function to `readableColor`. Returns whether or not the \n * readable color (i.e. the color to be place on top the input color) should be\n * black.\n */\nfunction readableColorIsBlack(color) {\n return getLuminance(color) > 0.179;\n}\n\n/**\n * Returns black or white for best contrast depending on the luminosity of the\n * given color.\n */\nfunction readableColor(color) {\n return readableColorIsBlack(color) ? '#000' : '#fff';\n}\n\n/**\n * Saturates a color by converting it to `hsl` and increasing the saturation\n * amount. Equivalent to `desaturate(color, -amount)`\n * \n * @param color Input color\n * @param amount The amount to darken, given as a decimal between 0 and 1\n */\nfunction saturate(color, amount) {\n return desaturate(color, -amount);\n}\n\n/**\n * Takes in any color and returns it as a hex code.\n */\nfunction toHex(color) {\n const [r, g, b, a] = parseToRgba(color);\n let hex = x => {\n const h = guard(0, 255, x).toString(16);\n // NOTE: padStart could be used here but it breaks Node 6 compat\n // https://github.com/ricokahler/color2k/issues/351\n return h.length === 1 ? `0${h}` : h;\n };\n return `#${hex(r)}${hex(g)}${hex(b)}${a < 1 ? hex(Math.round(a * 255)) : ''}`;\n}\n\n/**\n * Takes in any color and returns it as an rgba string.\n */\nfunction toRgba(color) {\n return rgba(...parseToRgba(color));\n}\n\n/**\n * Takes in any color and returns it as an hsla string.\n */\nfunction toHsla(color) {\n return hsla(...parseToHsla(color));\n}\n\nexport { ColorError$1 as ColorError, adjustHue, darken, desaturate, getContrast, getLuminance, getScale, guard, hasBadContrast, hsla, lighten, mix, opacify, parseToHsla, parseToRgba, readableColor, readableColorIsBlack, rgba, saturate, toHex, toHsla, toRgba, transparentize };\n//# sourceMappingURL=index.module.es.js.map\n","function n(n,r,t){return{r:255*t(n.r/255,r.r/255),g:255*t(n.g/255,r.g/255),b:255*t(n.b/255,r.b/255)}}function r(n,r){return r}function t(n,r){return n*r}function u(n,r){return n+r-n*r}function i(n,r){return a(r,n)}function o(n,r){return Math.min(n,r)}function e(n,r){return Math.min(Math.max(n,r),1)}function c(n,r){return 0===n?0:1===r?1:Math.min(1,n/(1-r))}function f(n,r){return 1===n?1:0===r?0:1-Math.min(1,(1-n)/r)}function a(n,r){return r<=.5?t(n,2*r):u(n,2*r-1)}function b(n,r){return r<=.5?n-(1-2*r)*n*(1-n):n+(2*r-1)*((n<=.25?((16*n-12)*n+4)*n:Math.sqrt(n))-n)}function g(n,r){return Math.abs(n-r)}function h(n,r){return n+r-2*n*r}function M(n,r,t){return Math.min(Math.max(n||0,r),t)}function m(n){return{r:M(n.r,0,255),g:M(n.g,0,255),b:M(n.b,0,255),a:M(n.a,0,1)}}function d(n){return{r:255*n.r,g:255*n.g,b:255*n.b,a:n.a}}function p(n){return{r:n.r/255,g:n.g/255,b:n.b/255,a:n.a}}function v(n,r){void 0===r&&(r=0);var t=Math.pow(10,r);return{r:Math.round(n.r*t)/t,g:Math.round(n.g*t)/t,b:Math.round(n.b*t)/t,a:n.a}}function x(n,r,t,u,i,o){return(1-r/t)*u+r/t*Math.round((1-n)*i+n*o)}function O(n,r,t,u,i){void 0===i&&(i={unitInput:!1,unitOutput:!1,roundOutput:!0}),i.unitInput&&(n=d(n),r=d(r)),n=m(n);var o=(r=m(r)).a+n.a-r.a*n.a,e=t(n,r,u),c=m({r:x(n.a,r.a,o,n.r,r.r,e.r),g:x(n.a,r.a,o,n.g,r.g,e.g),b:x(n.a,r.a,o,n.b,r.b,e.b),a:o});return c=i.unitOutput?p(c):i.roundOutput?v(c):function(n){return v(n,9)}(c),c}function s(n,r,t){return d(t(p(n),p(r)))}function I(n){return.3*n.r+.59*n.g+.11*n.b}function q(n,r){var t=r-I(n);return function(n){var r=I(n),t=n.r,u=n.g,i=n.b,o=Math.min(t,u,i),e=Math.max(t,u,i);function c(n){return r+(n-r)*r/(r-o)}function f(n){return r+(n-r)*(1-r)/(e-r)}return o<0&&(t=c(t),u=c(u),i=c(i)),e>1&&(t=f(t),u=f(u),i=f(i)),{r:t,g:u,b:i}}({r:n.r+t,g:n.g+t,b:n.b+t})}function w(n){return Math.max(n.r,n.g,n.b)-Math.min(n.r,n.g,n.b)}function j(n,r){var t=[\"r\",\"g\",\"b\"].sort(function(r,t){return n[r]-n[t]}),u=t[0],i=t[1],o=t[2],e={r:n.r,g:n.g,b:n.b};return e[o]>e[u]?(e[i]=(e[i]-e[u])*r/(e[o]-e[u]),e[o]=r):e[i]=e[o]=0,e[u]=0,e}function k(n,r){return q(j(r,w(n)),I(n))}function l(n,r){return q(j(n,w(r)),I(n))}function y(n,r){return q(r,I(n))}function z(n,r){return q(n,I(r))}function A(t,u){return O(t,u,n,r)}function B(r,u){return O(r,u,n,t)}function C(r,t){return O(r,t,n,u)}function D(r,t){return O(r,t,n,i)}function E(r,t){return O(r,t,n,o)}function F(r,t){return O(r,t,n,e)}function G(r,t){return O(r,t,n,c)}function H(r,t){return O(r,t,n,f)}function J(r,t){return O(r,t,n,a)}function K(r,t){return O(r,t,n,b)}function L(r,t){return O(r,t,n,g)}function N(r,t){return O(r,t,n,h)}function P(n,r){return O(n,r,s,k)}function Q(n,r){return O(n,r,s,l)}function R(n,r){return O(n,r,s,y)}function S(n,r){return O(n,r,s,z)}export{R as color,H as colorBurn,G as colorDodge,E as darken,L as difference,N as exclusion,J as hardLight,P as hue,F as lighten,S as luminosity,B as multiply,A as normal,D as overlay,Q as saturation,C as screen,K as softLight};\n//# sourceMappingURL=index.modern.js.map\n","import { parseToRgba, rgba } from 'color2k';\nimport { CustomBorderRadii, CustomPalette } from '../../interface';\nimport { overlay } from 'color-blend';\n\nexport const isColor = strColor => {\n const s = new Option().style;\n s.color = strColor;\n return s.color !== '';\n};\n\nconst toKebabCase = (pascal: string) => pascal.replace(/([a-z0–9])([A-Z])/g, '$1-$2').toLowerCase();\n\n// This function handles arrays and objects\nconst buildVars = (prev: string, obj: any): { [k: string]: string } => {\n let resp = {};\n\n for (const k in obj) {\n const name = `${prev}-${toKebabCase(k)}`;\n if (typeof obj[k] === 'object' && obj[k] !== null) {\n resp = { ...resp, ...buildVars(name, obj[k]) };\n } else {\n resp[name] = obj[k];\n }\n }\n\n return resp;\n};\n\nexport const getCssColors = (customPalette: CustomPalette): { [k: string]: string } => buildVars('--cpsl-color', customPalette);\nexport const getCssBorderRadii = (customBorderRadii: CustomBorderRadii): { [k: string]: string } => buildVars('--cpsl-border-radius', customBorderRadii);\n\nexport const overlayMix = (baseColor: string, overlayColor: string) => {\n const baseRGBA = parseToRgba(baseColor);\n const overlayRGBA = parseToRgba(overlayColor);\n\n const finalRGBA = overlay({ r: baseRGBA[0], g: baseRGBA[1], b: baseRGBA[2], a: 0.1 }, { r: overlayRGBA[0], g: overlayRGBA[1], b: overlayRGBA[2], a: overlayRGBA[3] });\n\n return rgba(finalRGBA.r, finalRGBA.g, finalRGBA.b, finalRGBA.a);\n};\n","import { Theme } from '../../interface';\nimport { getCssBorderRadii } from './utils';\n\nexport const generateBorderRadii = ({ borderRadius, customBorderRadii }: Pick<Theme, 'borderRadius' | 'customBorderRadii'>) => {\n let mediumRadius: number,\n largeRadius: number,\n checkboxRadius: number = 4;\n const fullRadius = 1000;\n let isFull = false;\n let isNone = false;\n\n switch (borderRadius) {\n case 'none': {\n isNone = true;\n mediumRadius = 0;\n largeRadius = 0;\n checkboxRadius = 0;\n break;\n }\n case 'xs': {\n mediumRadius = 2;\n largeRadius = 4;\n checkboxRadius = 2;\n break;\n }\n case 'sm': {\n mediumRadius = 4;\n largeRadius = 8;\n break;\n }\n case 'md': {\n mediumRadius = 8;\n largeRadius = 16;\n break;\n }\n case 'xl': {\n mediumRadius = 16;\n largeRadius = 32;\n break;\n }\n case 'full': {\n mediumRadius = 24;\n largeRadius = 32;\n isFull = true;\n break;\n }\n default:\n case 'lg': {\n mediumRadius = 12;\n largeRadius = 24;\n break;\n }\n }\n\n document.documentElement.style.setProperty('--cpsl-border-radius-input', `${isFull ? fullRadius : mediumRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-select', `${isFull ? fullRadius : mediumRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-file', `${isFull ? fullRadius : mediumRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-alert', `${isFull ? fullRadius : mediumRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-tabs', `${isNone ? 0 : fullRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-primary-button', `${isFull ? fullRadius : mediumRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-secondary-button', `${isFull ? fullRadius : mediumRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-tertiary-button', `${isFull ? fullRadius : mediumRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-destructive-button', `${isFull ? fullRadius : mediumRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-tile-button', `${mediumRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-qr-code', `${largeRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-info-box', `${mediumRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-table-container', `${mediumRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-avatar', `${mediumRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-button-group', `${mediumRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-card', `${largeRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-modal', `${largeRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-checkbox', `${checkboxRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-switch', `${isNone ? 0 : fullRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-pill', `${isNone ? 0 : fullRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-radio', `${fullRadius}px`);\n\n if (customBorderRadii) {\n const cssBorderRadiiVars = getCssBorderRadii(customBorderRadii);\n Object.entries(cssBorderRadiiVars).forEach(([k, v]) => document.documentElement.style.setProperty(k, v));\n }\n};\n","import { Theme } from '../../interface';\n\nconst FONT_NAME_MAP = {\n body2XS: 'body-2xs',\n bodyXS: 'body-xs',\n bodyS: 'body-s',\n bodyM: 'body-m',\n bodyL: 'body-l',\n bodyXL: 'body-xl',\n headingXS: 'heading-xs',\n headingS: 'heading-s',\n headingM: 'heading-m',\n headingL: 'heading-l',\n headingXL: 'heading-xl',\n heading2XL: 'heading-2xl',\n};\n\nexport const generateFont = ({ font, customFontSizes }: Pick<Theme, 'font' | 'customFontSizes'>) => {\n if (font) {\n document.documentElement.style.setProperty('--cpsl-default-font', font);\n }\n\n Object.entries(FONT_NAME_MAP).forEach(([key, value]) => {\n if (customFontSizes?.[key]) {\n document.documentElement.style.setProperty(`--cpsl-font-size-${value}`, customFontSizes[key]);\n } else {\n document.documentElement.style.removeProperty(`--cpsl-font-size-${value}`);\n }\n });\n};\n","import { mix, readableColorIsBlack } from 'color2k';\nimport { Theme } from '../../interface';\nimport { getCssColors, isColor, overlayMix } from './utils';\nimport { COLOR_MIXES, DEFAULT_THEME, UTILITY_COLORS } from '../../constants';\n\nexport type Palette = {\n foregroundColors: string[];\n backgroundColors: string[];\n accentColors: string[];\n};\n\nexport const generatePalette = ({\n foregroundColor,\n backgroundColor,\n accentColor,\n isDarkTheme,\n customPalette,\n}: Pick<Theme, 'foregroundColor' | 'backgroundColor' | 'accentColor' | 'customPalette'> & { isDarkTheme: boolean }) => {\n if (!foregroundColor || !isColor(foregroundColor)) {\n foregroundColor = DEFAULT_THEME.foregroundColor;\n }\n if (!backgroundColor || !isColor(backgroundColor)) {\n backgroundColor = DEFAULT_THEME.backgroundColor;\n }\n if (!Boolean(accentColor) || !isColor(accentColor)) {\n accentColor = foregroundColor;\n }\n\n const isDarkAccent = Boolean(accentColor) ? !readableColorIsBlack(accentColor) : false;\n\n const palette: Palette = {\n foregroundColors: [],\n backgroundColors: [],\n accentColors: [],\n };\n\n const backgroundMixColor = isDarkTheme ? '#FFFFFF' : '#000000';\n const foregroundMixColor = isDarkTheme ? '#000000' : '#FFFFFF';\n const accentMixColor = isDarkAccent ? '#FFFFFF' : '#000000';\n\n COLOR_MIXES.forEach(value => {\n palette.foregroundColors.push(mix(foregroundColor, foregroundMixColor, value));\n palette.backgroundColors.push(mix(backgroundColor, backgroundMixColor, value));\n palette.accentColors.push(mix(accentColor, accentMixColor, value));\n });\n\n // BACKGROUND\n document.documentElement.style.setProperty('--cpsl-color-background-0', palette.backgroundColors[0]);\n document.documentElement.style.setProperty('--cpsl-color-background-4', palette.backgroundColors[1]);\n document.documentElement.style.setProperty('--cpsl-color-background-8', palette.backgroundColors[2]);\n document.documentElement.style.setProperty('--cpsl-color-background-16', palette.backgroundColors[3]);\n document.documentElement.style.setProperty('--cpsl-color-background-32', palette.backgroundColors[4]);\n document.documentElement.style.setProperty('--cpsl-color-background-48', palette.backgroundColors[5]);\n document.documentElement.style.setProperty('--cpsl-color-background-64', palette.backgroundColors[6]);\n document.documentElement.style.setProperty('--cpsl-color-background-80', palette.backgroundColors[7]);\n document.documentElement.style.setProperty('--cpsl-color-background-96', palette.backgroundColors[8]);\n\n // FOREGROUND\n document.documentElement.style.setProperty('--cpsl-color-foreground-0', palette.foregroundColors[0]);\n document.documentElement.style.setProperty('--cpsl-color-foreground-4', palette.foregroundColors[1]);\n document.documentElement.style.setProperty('--cpsl-color-foreground-8', palette.foregroundColors[2]);\n document.documentElement.style.setProperty('--cpsl-color-foreground-16', palette.foregroundColors[3]);\n document.documentElement.style.setProperty('--cpsl-color-foreground-32', palette.foregroundColors[4]);\n document.documentElement.style.setProperty('--cpsl-color-foreground-48', palette.foregroundColors[5]);\n document.documentElement.style.setProperty('--cpsl-color-foreground-64', palette.foregroundColors[6]);\n document.documentElement.style.setProperty('--cpsl-color-foreground-80', palette.foregroundColors[7]);\n document.documentElement.style.setProperty('--cpsl-color-foreground-96', palette.foregroundColors[8]);\n\n // ACCENT\n document.documentElement.style.setProperty('--cpsl-color-accent-0', palette.accentColors[0]);\n document.documentElement.style.setProperty('--cpsl-color-accent-4', palette.accentColors[1]);\n document.documentElement.style.setProperty('--cpsl-color-accent-8', palette.accentColors[2]);\n document.documentElement.style.setProperty('--cpsl-color-accent-16', palette.accentColors[3]);\n document.documentElement.style.setProperty('--cpsl-color-accent-32', palette.accentColors[4]);\n document.documentElement.style.setProperty('--cpsl-color-accent-48', palette.accentColors[5]);\n document.documentElement.style.setProperty('--cpsl-color-accent-64', palette.accentColors[6]);\n document.documentElement.style.setProperty('--cpsl-color-accent-80', palette.accentColors[7]);\n document.documentElement.style.setProperty('--cpsl-color-accent-96', palette.accentColors[8]);\n\n // CONTRAST\n document.documentElement.style.setProperty('--cpsl-color-contrast', isDarkTheme ? '#FFFFFF' : '#000000');\n\n const utilityLightMixColor = '#FFFFFF';\n const utilityLightMixValue = 0.72;\n // UTILITY\n const red = overlayMix(foregroundColor, UTILITY_COLORS.red);\n const yellow = overlayMix(foregroundColor, UTILITY_COLORS.yellow);\n const green = overlayMix(foregroundColor, UTILITY_COLORS.green);\n document.documentElement.style.setProperty('--cpsl-color-utility-red', red);\n document.documentElement.style.setProperty('--cpsl-color-utility-yellow', yellow);\n document.documentElement.style.setProperty('--cpsl-color-utility-green', green);\n document.documentElement.style.setProperty('--cpsl-color-utility-red-light', mix(red, utilityLightMixColor, utilityLightMixValue));\n document.documentElement.style.setProperty('--cpsl-color-utility-yellow-light', mix(yellow, utilityLightMixColor, utilityLightMixValue));\n document.documentElement.style.setProperty('--cpsl-color-utility-green-light', mix(green, utilityLightMixColor, utilityLightMixValue));\n\n if (customPalette) {\n const cssColorVars = getCssColors(customPalette);\n Object.entries(cssColorVars).forEach(([k, v]) => document.documentElement.style.setProperty(k, v));\n }\n};\n","import { DEFAULT_THEME } from '../../constants';\nimport { Theme } from '../../interface';\nimport { generateBorderRadii } from './generateBorderRadii';\nimport { generateFont } from './generateFont';\nimport { generatePalette } from './generatePalette';\n\n/**\n * Generates css theme variables.\n * @returns @boolean Whether background is dark or not.\n */\nexport const generateTheme = ({\n foregroundColor = DEFAULT_THEME.foregroundColor,\n backgroundColor = DEFAULT_THEME.backgroundColor,\n accentColor,\n darkForegroundColor,\n darkBackgroundColor,\n darkAccentColor,\n mode = 'light',\n font,\n customPalette,\n borderRadius,\n customFontSizes,\n customBorderRadii,\n}: Theme) => {\n const isDarkTheme = mode === 'dark';\n\n generatePalette({\n foregroundColor: isDarkTheme ? (darkForegroundColor ?? foregroundColor) : foregroundColor,\n backgroundColor: isDarkTheme ? (darkBackgroundColor ?? backgroundColor) : backgroundColor,\n accentColor: isDarkTheme ? (darkAccentColor ?? accentColor) : accentColor,\n customPalette,\n isDarkTheme,\n });\n\n generateFont({ font, customFontSizes });\n\n generateBorderRadii({ borderRadius, customBorderRadii });\n};\n"],"mappings":"kDAOA,SAASA,EAAMC,EAAKC,EAAMC,GACxB,OAAOC,KAAKC,IAAID,KAAKE,IAAIL,EAAKE,GAAQD,EACxC,CAEA,MAAMK,UAAmBC,MACvB,WAAAC,CAAYC,GACVC,MAAM,2BAA2BD,KACrC,EAEA,IAAIE,EAAeL,EAOnB,SAASM,EAAYH,GACnB,UAAWA,IAAU,SAAU,MAAM,IAAIE,EAAaF,GACtD,GAAIA,EAAMI,OAAOC,gBAAkB,cAAe,MAAO,CAAC,EAAG,EAAG,EAAG,GACnE,IAAIC,EAAkBN,EAAMI,OAC5BE,EAAkBC,EAAgBC,KAAKR,GAASS,EAAUT,GAASA,EACnE,MAAMU,EAAkBC,EAAgBC,KAAKN,GAC7C,GAAII,EAAiB,CACnB,MAAMG,EAAMC,MAAMC,KAAKL,GAAiBM,MAAM,GAC9C,MAAO,IAAIH,EAAIG,MAAM,EAAG,GAAGC,KAAIC,GAAKC,SAASC,EAAEF,EAAG,GAAI,MAAMC,SAASC,EAAEP,EAAI,IAAM,IAAK,GAAI,IAAM,IACpG,CACE,MAAMQ,EAAWC,EAASV,KAAKN,GAC/B,GAAIe,EAAU,CACZ,MAAMR,EAAMC,MAAMC,KAAKM,GAAUL,MAAM,GACvC,MAAO,IAAIH,EAAIG,MAAM,EAAG,GAAGC,KAAIC,GAAKC,SAASD,EAAG,MAAMC,SAASN,EAAI,IAAM,KAAM,IAAM,IACzF,CACE,MAAMU,EAAYC,EAAUZ,KAAKN,GACjC,GAAIiB,EAAW,CACb,MAAMV,EAAMC,MAAMC,KAAKQ,GAAWP,MAAM,GACxC,MAAO,IAAIH,EAAIG,MAAM,EAAG,GAAGC,KAAIC,GAAKC,SAASD,EAAG,MAAMO,WAAWZ,EAAI,IAAM,KAC/E,CACE,MAAMa,EAAYC,EAAUf,KAAKN,GACjC,GAAIoB,EAAW,CAC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FR,EAAa,CAAEC,OAAMC,oBAErB7B,EAAoB,CAAEC,eAAcT,qBAAoB,S","ignoreList":[]}
|
1
|
+
{"version":3,"names":["guard","low","high","value","Math","min","max","ColorError","Error","constructor","color","super","ColorError$1","parseToRgba","trim","toLowerCase","normalizedColor","namedColorRegex","test","nameToHex","reducedHexMatch","reducedHexRegex","exec","arr","Array","from","slice","map","x","parseInt","r","hexMatch","hexRegex","rgbaMatch","rgbaRegex","parseFloat","hslaMatch","hslaRegex","h","s","l","a","hslToRgb","Number","isNaN","hash","str","i","length","charCodeAt","colorToInt","replace","compressedColorMap","split","reduce","acc","next","key","substring","hex","toString","prefix","normalizedColorName","result","amount","join","RegExp","roundColor","round","hue","saturation","lightness","huePrime","chroma","abs","secondComponent","red","green","blue","lightnessModification","finalRed","finalGreen","finalBlue","getLuminance","f","channel","pow","g","b","rgba","alpha","toFixed","mix","color1","color2","weight","normalize","n","index","r1","g1","b1","a1","r2","g2","b2","a2","alphaDelta","normalizedWeight","combinedWeight","weight2","weight1","readableColorIsBlack","t","u","M","m","d","p","v","o","O","unitInput","unitOutput","roundOutput","e","c","D","isColor","strColor","Option","style","toKebabCase","pascal","buildVars","prev","obj","resp","k","name","Object","assign","getCssColors","customPalette","getCssBorderRadii","customBorderRadii","overlayMix","baseColor","overlayColor","baseRGBA","overlayRGBA","finalRGBA","overlay","generateBorderRadii","borderRadius","mediumRadius","largeRadius","checkboxRadius","fullRadius","isFull","isNone","document","documentElement","setProperty","cssBorderRadiiVars","entries","forEach","FONT_NAME_MAP","body2XS","bodyXS","bodyS","bodyM","bodyL","bodyXL","headingXS","headingS","headingM","headingL","headingXL","heading2XL","generateFont","font","customFontSizes","removeProperty","generatePalette","foregroundColor","backgroundColor","accentColor","isDarkTheme","DEFAULT_THEME","Boolean","isDarkAccent","palette","foregroundColors","backgroundColors","accentColors","backgroundMixColor","foregroundMixColor","accentMixColor","COLOR_MIXES","push","utilityLightMixColor","utilityLightMixValue","UTILITY_COLORS","yellow","cssColorVars","generateTheme","darkForegroundColor","darkBackgroundColor","darkAccentColor","mode"],"sources":["../../node_modules/color2k/dist/index.module.es.js","../../node_modules/color-blend/dist/index.modern.js","src/utils/theme/utils.ts","src/utils/theme/generateBorderRadii.ts","src/utils/theme/generateFont.ts","src/utils/theme/generatePalette.ts","src/utils/theme/generateTheme.ts"],"sourcesContent":["/**\n * A simple guard function:\n *\n * ```js\n * Math.min(Math.max(low, value), high)\n * ```\n */\nfunction guard(low, high, value) {\n return Math.min(Math.max(low, value), high);\n}\n\nclass ColorError extends Error {\n constructor(color) {\n super(`Failed to parse color: \"${color}\"`);\n }\n}\nvar ColorError$1 = ColorError;\n\n/**\n * Parses a color into red, gree, blue, alpha parts\n *\n * @param color the input color. Can be a RGB, RBGA, HSL, HSLA, or named color\n */\nfunction parseToRgba(color) {\n if (typeof color !== 'string') throw new ColorError$1(color);\n if (color.trim().toLowerCase() === 'transparent') return [0, 0, 0, 0];\n let normalizedColor = color.trim();\n normalizedColor = namedColorRegex.test(color) ? nameToHex(color) : color;\n const reducedHexMatch = reducedHexRegex.exec(normalizedColor);\n if (reducedHexMatch) {\n const arr = Array.from(reducedHexMatch).slice(1);\n return [...arr.slice(0, 3).map(x => parseInt(r(x, 2), 16)), parseInt(r(arr[3] || 'f', 2), 16) / 255];\n }\n const hexMatch = hexRegex.exec(normalizedColor);\n if (hexMatch) {\n const arr = Array.from(hexMatch).slice(1);\n return [...arr.slice(0, 3).map(x => parseInt(x, 16)), parseInt(arr[3] || 'ff', 16) / 255];\n }\n const rgbaMatch = rgbaRegex.exec(normalizedColor);\n if (rgbaMatch) {\n const arr = Array.from(rgbaMatch).slice(1);\n return [...arr.slice(0, 3).map(x => parseInt(x, 10)), parseFloat(arr[3] || '1')];\n }\n const hslaMatch = hslaRegex.exec(normalizedColor);\n if (hslaMatch) {\n const [h, s, l, a] = Array.from(hslaMatch).slice(1).map(parseFloat);\n if (guard(0, 100, s) !== s) throw new ColorError$1(color);\n if (guard(0, 100, l) !== l) throw new ColorError$1(color);\n return [...hslToRgb(h, s, l), Number.isNaN(a) ? 1 : a];\n }\n throw new ColorError$1(color);\n}\nfunction hash(str) {\n let hash = 5381;\n let i = str.length;\n while (i) {\n hash = hash * 33 ^ str.charCodeAt(--i);\n }\n\n /* JavaScript does bitwise operations (like XOR, above) on 32-bit signed\n * integers. Since we want the results to be always positive, convert the\n * signed int to an unsigned by doing an unsigned bitshift. */\n return (hash >>> 0) % 2341;\n}\nconst colorToInt = x => parseInt(x.replace(/_/g, ''), 36);\nconst compressedColorMap = '1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm'.split(' ').reduce((acc, next) => {\n const key = colorToInt(next.substring(0, 3));\n const hex = colorToInt(next.substring(3)).toString(16);\n\n // NOTE: padStart could be used here but it breaks Node 6 compat\n // https://github.com/ricokahler/color2k/issues/351\n let prefix = '';\n for (let i = 0; i < 6 - hex.length; i++) {\n prefix += '0';\n }\n acc[key] = `${prefix}${hex}`;\n return acc;\n}, {});\n\n/**\n * Checks if a string is a CSS named color and returns its equivalent hex value, otherwise returns the original color.\n */\nfunction nameToHex(color) {\n const normalizedColorName = color.toLowerCase().trim();\n const result = compressedColorMap[hash(normalizedColorName)];\n if (!result) throw new ColorError$1(color);\n return `#${result}`;\n}\nconst r = (str, amount) => Array.from(Array(amount)).map(() => str).join('');\nconst reducedHexRegex = new RegExp(`^#${r('([a-f0-9])', 3)}([a-f0-9])?$`, 'i');\nconst hexRegex = new RegExp(`^#${r('([a-f0-9]{2})', 3)}([a-f0-9]{2})?$`, 'i');\nconst rgbaRegex = new RegExp(`^rgba?\\\\(\\\\s*(\\\\d+)\\\\s*${r(',\\\\s*(\\\\d+)\\\\s*', 2)}(?:,\\\\s*([\\\\d.]+))?\\\\s*\\\\)$`, 'i');\nconst hslaRegex = /^hsla?\\(\\s*([\\d.]+)\\s*,\\s*([\\d.]+)%\\s*,\\s*([\\d.]+)%(?:\\s*,\\s*([\\d.]+))?\\s*\\)$/i;\nconst namedColorRegex = /^[a-z]+$/i;\nconst roundColor = color => {\n return Math.round(color * 255);\n};\nconst hslToRgb = (hue, saturation, lightness) => {\n let l = lightness / 100;\n if (saturation === 0) {\n // achromatic\n return [l, l, l].map(roundColor);\n }\n\n // formulae from https://en.wikipedia.org/wiki/HSL_and_HSV\n const huePrime = (hue % 360 + 360) % 360 / 60;\n const chroma = (1 - Math.abs(2 * l - 1)) * (saturation / 100);\n const secondComponent = chroma * (1 - Math.abs(huePrime % 2 - 1));\n let red = 0;\n let green = 0;\n let blue = 0;\n if (huePrime >= 0 && huePrime < 1) {\n red = chroma;\n green = secondComponent;\n } else if (huePrime >= 1 && huePrime < 2) {\n red = secondComponent;\n green = chroma;\n } else if (huePrime >= 2 && huePrime < 3) {\n green = chroma;\n blue = secondComponent;\n } else if (huePrime >= 3 && huePrime < 4) {\n green = secondComponent;\n blue = chroma;\n } else if (huePrime >= 4 && huePrime < 5) {\n red = secondComponent;\n blue = chroma;\n } else if (huePrime >= 5 && huePrime < 6) {\n red = chroma;\n blue = secondComponent;\n }\n const lightnessModification = l - chroma / 2;\n const finalRed = red + lightnessModification;\n const finalGreen = green + lightnessModification;\n const finalBlue = blue + lightnessModification;\n return [finalRed, finalGreen, finalBlue].map(roundColor);\n};\n\n// taken from:\n// https://github.com/styled-components/polished/blob/a23a6a2bb26802b3d922d9c3b67bac3f3a54a310/src/internalHelpers/_rgbToHsl.js\n\n/**\n * Parses a color in hue, saturation, lightness, and the alpha channel.\n *\n * Hue is a number between 0 and 360, saturation, lightness, and alpha are\n * decimal percentages between 0 and 1\n */\nfunction parseToHsla(color) {\n const [red, green, blue, alpha] = parseToRgba(color).map((value, index) =>\n // 3rd index is alpha channel which is already normalized\n index === 3 ? value : value / 255);\n const max = Math.max(red, green, blue);\n const min = Math.min(red, green, blue);\n const lightness = (max + min) / 2;\n\n // achromatic\n if (max === min) return [0, 0, lightness, alpha];\n const delta = max - min;\n const saturation = lightness > 0.5 ? delta / (2 - max - min) : delta / (max + min);\n const hue = 60 * (red === max ? (green - blue) / delta + (green < blue ? 6 : 0) : green === max ? (blue - red) / delta + 2 : (red - green) / delta + 4);\n return [hue, saturation, lightness, alpha];\n}\n\n/**\n * Takes in hsla parts and constructs an hsla string\n *\n * @param hue The color circle (from 0 to 360) - 0 (or 360) is red, 120 is green, 240 is blue\n * @param saturation Percentage of saturation, given as a decimal between 0 and 1\n * @param lightness Percentage of lightness, given as a decimal between 0 and 1\n * @param alpha Percentage of opacity, given as a decimal between 0 and 1\n */\nfunction hsla(hue, saturation, lightness, alpha) {\n return `hsla(${(hue % 360).toFixed()}, ${guard(0, 100, saturation * 100).toFixed()}%, ${guard(0, 100, lightness * 100).toFixed()}%, ${parseFloat(guard(0, 1, alpha).toFixed(3))})`;\n}\n\n/**\n * Adjusts the current hue of the color by the given degrees. Wraps around when\n * over 360.\n *\n * @param color input color\n * @param degrees degrees to adjust the input color, accepts degree integers\n * (0 - 360) and wraps around on overflow\n */\nfunction adjustHue(color, degrees) {\n const [h, s, l, a] = parseToHsla(color);\n return hsla(h + degrees, s, l, a);\n}\n\n/**\n * Darkens using lightness. This is equivalent to subtracting the lightness\n * from the L in HSL.\n *\n * @param amount The amount to darken, given as a decimal between 0 and 1\n */\nfunction darken(color, amount) {\n const [hue, saturation, lightness, alpha] = parseToHsla(color);\n return hsla(hue, saturation, lightness - amount, alpha);\n}\n\n/**\n * Desaturates the input color by the given amount via subtracting from the `s`\n * in `hsla`.\n *\n * @param amount The amount to desaturate, given as a decimal between 0 and 1\n */\nfunction desaturate(color, amount) {\n const [h, s, l, a] = parseToHsla(color);\n return hsla(h, s - amount, l, a);\n}\n\n// taken from:\n// https://github.com/styled-components/polished/blob/0764c982551b487469043acb56281b0358b3107b/src/color/getLuminance.js\n\n/**\n * Returns a number (float) representing the luminance of a color.\n */\nfunction getLuminance(color) {\n if (color === 'transparent') return 0;\n function f(x) {\n const channel = x / 255;\n return channel <= 0.04045 ? channel / 12.92 : Math.pow((channel + 0.055) / 1.055, 2.4);\n }\n const [r, g, b] = parseToRgba(color);\n return 0.2126 * f(r) + 0.7152 * f(g) + 0.0722 * f(b);\n}\n\n// taken from:\n// https://github.com/styled-components/polished/blob/0764c982551b487469043acb56281b0358b3107b/src/color/getContrast.js\n\n/**\n * Returns the contrast ratio between two colors based on\n * [W3's recommended equation for calculating contrast](http://www.w3.org/TR/WCAG20/#contrast-ratiodef).\n */\nfunction getContrast(color1, color2) {\n const luminance1 = getLuminance(color1);\n const luminance2 = getLuminance(color2);\n return luminance1 > luminance2 ? (luminance1 + 0.05) / (luminance2 + 0.05) : (luminance2 + 0.05) / (luminance1 + 0.05);\n}\n\n/**\n * Takes in rgba parts and returns an rgba string\n *\n * @param red The amount of red in the red channel, given in a number between 0 and 255 inclusive\n * @param green The amount of green in the red channel, given in a number between 0 and 255 inclusive\n * @param blue The amount of blue in the red channel, given in a number between 0 and 255 inclusive\n * @param alpha Percentage of opacity, given as a decimal between 0 and 1\n */\nfunction rgba(red, green, blue, alpha) {\n return `rgba(${guard(0, 255, red).toFixed()}, ${guard(0, 255, green).toFixed()}, ${guard(0, 255, blue).toFixed()}, ${parseFloat(guard(0, 1, alpha).toFixed(3))})`;\n}\n\n/**\n * Mixes two colors together. Taken from sass's implementation.\n */\nfunction mix(color1, color2, weight) {\n const normalize = (n, index) =>\n // 3rd index is alpha channel which is already normalized\n index === 3 ? n : n / 255;\n const [r1, g1, b1, a1] = parseToRgba(color1).map(normalize);\n const [r2, g2, b2, a2] = parseToRgba(color2).map(normalize);\n\n // The formula is copied from the original Sass implementation:\n // http://sass-lang.com/documentation/Sass/Script/Functions.html#mix-instance_method\n const alphaDelta = a2 - a1;\n const normalizedWeight = weight * 2 - 1;\n const combinedWeight = normalizedWeight * alphaDelta === -1 ? normalizedWeight : normalizedWeight + alphaDelta / (1 + normalizedWeight * alphaDelta);\n const weight2 = (combinedWeight + 1) / 2;\n const weight1 = 1 - weight2;\n const r = (r1 * weight1 + r2 * weight2) * 255;\n const g = (g1 * weight1 + g2 * weight2) * 255;\n const b = (b1 * weight1 + b2 * weight2) * 255;\n const a = a2 * weight + a1 * (1 - weight);\n return rgba(r, g, b, a);\n}\n\n/**\n * Given a series colors, this function will return a `scale(x)` function that\n * accepts a percentage as a decimal between 0 and 1 and returns the color at\n * that percentage in the scale.\n *\n * ```js\n * const scale = getScale('red', 'yellow', 'green');\n * console.log(scale(0)); // rgba(255, 0, 0, 1)\n * console.log(scale(0.5)); // rgba(255, 255, 0, 1)\n * console.log(scale(1)); // rgba(0, 128, 0, 1)\n * ```\n *\n * If you'd like to limit the domain and range like chroma-js, we recommend\n * wrapping scale again.\n *\n * ```js\n * const _scale = getScale('red', 'yellow', 'green');\n * const scale = x => _scale(x / 100);\n *\n * console.log(scale(0)); // rgba(255, 0, 0, 1)\n * console.log(scale(50)); // rgba(255, 255, 0, 1)\n * console.log(scale(100)); // rgba(0, 128, 0, 1)\n * ```\n */\nfunction getScale(...colors) {\n return n => {\n const lastIndex = colors.length - 1;\n const lowIndex = guard(0, lastIndex, Math.floor(n * lastIndex));\n const highIndex = guard(0, lastIndex, Math.ceil(n * lastIndex));\n const color1 = colors[lowIndex];\n const color2 = colors[highIndex];\n const unit = 1 / lastIndex;\n const weight = (n - unit * lowIndex) / unit;\n return mix(color1, color2, weight);\n };\n}\n\nconst guidelines = {\n decorative: 1.5,\n readable: 3,\n aa: 4.5,\n aaa: 7\n};\n\n/**\n * Returns whether or not a color has bad contrast against a background\n * according to a given standard.\n */\nfunction hasBadContrast(color, standard = 'aa', background = '#fff') {\n return getContrast(color, background) < guidelines[standard];\n}\n\n/**\n * Lightens a color by a given amount. This is equivalent to\n * `darken(color, -amount)`\n *\n * @param amount The amount to darken, given as a decimal between 0 and 1\n */\nfunction lighten(color, amount) {\n return darken(color, -amount);\n}\n\n/**\n * Takes in a color and makes it more transparent by convert to `rgba` and\n * decreasing the amount in the alpha channel.\n *\n * @param amount The amount to increase the transparency by, given as a decimal between 0 and 1\n */\nfunction transparentize(color, amount) {\n const [r, g, b, a] = parseToRgba(color);\n return rgba(r, g, b, a - amount);\n}\n\n/**\n * Takes a color and un-transparentizes it. Equivalent to\n * `transparentize(color, -amount)`\n *\n * @param amount The amount to increase the opacity by, given as a decimal between 0 and 1\n */\nfunction opacify(color, amount) {\n return transparentize(color, -amount);\n}\n\n/**\n * An alternative function to `readableColor`. Returns whether or not the \n * readable color (i.e. the color to be place on top the input color) should be\n * black.\n */\nfunction readableColorIsBlack(color) {\n return getLuminance(color) > 0.179;\n}\n\n/**\n * Returns black or white for best contrast depending on the luminosity of the\n * given color.\n */\nfunction readableColor(color) {\n return readableColorIsBlack(color) ? '#000' : '#fff';\n}\n\n/**\n * Saturates a color by converting it to `hsl` and increasing the saturation\n * amount. Equivalent to `desaturate(color, -amount)`\n * \n * @param color Input color\n * @param amount The amount to darken, given as a decimal between 0 and 1\n */\nfunction saturate(color, amount) {\n return desaturate(color, -amount);\n}\n\n/**\n * Takes in any color and returns it as a hex code.\n */\nfunction toHex(color) {\n const [r, g, b, a] = parseToRgba(color);\n let hex = x => {\n const h = guard(0, 255, x).toString(16);\n // NOTE: padStart could be used here but it breaks Node 6 compat\n // https://github.com/ricokahler/color2k/issues/351\n return h.length === 1 ? `0${h}` : h;\n };\n return `#${hex(r)}${hex(g)}${hex(b)}${a < 1 ? hex(Math.round(a * 255)) : ''}`;\n}\n\n/**\n * Takes in any color and returns it as an rgba string.\n */\nfunction toRgba(color) {\n return rgba(...parseToRgba(color));\n}\n\n/**\n * Takes in any color and returns it as an hsla string.\n */\nfunction toHsla(color) {\n return hsla(...parseToHsla(color));\n}\n\nexport { ColorError$1 as ColorError, adjustHue, darken, desaturate, getContrast, getLuminance, getScale, guard, hasBadContrast, hsla, lighten, mix, opacify, parseToHsla, parseToRgba, readableColor, readableColorIsBlack, rgba, saturate, toHex, toHsla, toRgba, transparentize };\n//# sourceMappingURL=index.module.es.js.map\n","function n(n,r,t){return{r:255*t(n.r/255,r.r/255),g:255*t(n.g/255,r.g/255),b:255*t(n.b/255,r.b/255)}}function r(n,r){return r}function t(n,r){return n*r}function u(n,r){return n+r-n*r}function i(n,r){return a(r,n)}function o(n,r){return Math.min(n,r)}function e(n,r){return Math.min(Math.max(n,r),1)}function c(n,r){return 0===n?0:1===r?1:Math.min(1,n/(1-r))}function f(n,r){return 1===n?1:0===r?0:1-Math.min(1,(1-n)/r)}function a(n,r){return r<=.5?t(n,2*r):u(n,2*r-1)}function b(n,r){return r<=.5?n-(1-2*r)*n*(1-n):n+(2*r-1)*((n<=.25?((16*n-12)*n+4)*n:Math.sqrt(n))-n)}function g(n,r){return Math.abs(n-r)}function h(n,r){return n+r-2*n*r}function M(n,r,t){return Math.min(Math.max(n||0,r),t)}function m(n){return{r:M(n.r,0,255),g:M(n.g,0,255),b:M(n.b,0,255),a:M(n.a,0,1)}}function d(n){return{r:255*n.r,g:255*n.g,b:255*n.b,a:n.a}}function p(n){return{r:n.r/255,g:n.g/255,b:n.b/255,a:n.a}}function v(n,r){void 0===r&&(r=0);var t=Math.pow(10,r);return{r:Math.round(n.r*t)/t,g:Math.round(n.g*t)/t,b:Math.round(n.b*t)/t,a:n.a}}function x(n,r,t,u,i,o){return(1-r/t)*u+r/t*Math.round((1-n)*i+n*o)}function O(n,r,t,u,i){void 0===i&&(i={unitInput:!1,unitOutput:!1,roundOutput:!0}),i.unitInput&&(n=d(n),r=d(r)),n=m(n);var o=(r=m(r)).a+n.a-r.a*n.a,e=t(n,r,u),c=m({r:x(n.a,r.a,o,n.r,r.r,e.r),g:x(n.a,r.a,o,n.g,r.g,e.g),b:x(n.a,r.a,o,n.b,r.b,e.b),a:o});return c=i.unitOutput?p(c):i.roundOutput?v(c):function(n){return v(n,9)}(c),c}function s(n,r,t){return d(t(p(n),p(r)))}function I(n){return.3*n.r+.59*n.g+.11*n.b}function q(n,r){var t=r-I(n);return function(n){var r=I(n),t=n.r,u=n.g,i=n.b,o=Math.min(t,u,i),e=Math.max(t,u,i);function c(n){return r+(n-r)*r/(r-o)}function f(n){return r+(n-r)*(1-r)/(e-r)}return o<0&&(t=c(t),u=c(u),i=c(i)),e>1&&(t=f(t),u=f(u),i=f(i)),{r:t,g:u,b:i}}({r:n.r+t,g:n.g+t,b:n.b+t})}function w(n){return Math.max(n.r,n.g,n.b)-Math.min(n.r,n.g,n.b)}function j(n,r){var t=[\"r\",\"g\",\"b\"].sort(function(r,t){return n[r]-n[t]}),u=t[0],i=t[1],o=t[2],e={r:n.r,g:n.g,b:n.b};return e[o]>e[u]?(e[i]=(e[i]-e[u])*r/(e[o]-e[u]),e[o]=r):e[i]=e[o]=0,e[u]=0,e}function k(n,r){return q(j(r,w(n)),I(n))}function l(n,r){return q(j(n,w(r)),I(n))}function y(n,r){return q(r,I(n))}function z(n,r){return q(n,I(r))}function A(t,u){return O(t,u,n,r)}function B(r,u){return O(r,u,n,t)}function C(r,t){return O(r,t,n,u)}function D(r,t){return O(r,t,n,i)}function E(r,t){return O(r,t,n,o)}function F(r,t){return O(r,t,n,e)}function G(r,t){return O(r,t,n,c)}function H(r,t){return O(r,t,n,f)}function J(r,t){return O(r,t,n,a)}function K(r,t){return O(r,t,n,b)}function L(r,t){return O(r,t,n,g)}function N(r,t){return O(r,t,n,h)}function P(n,r){return O(n,r,s,k)}function Q(n,r){return O(n,r,s,l)}function R(n,r){return O(n,r,s,y)}function S(n,r){return O(n,r,s,z)}export{R as color,H as colorBurn,G as colorDodge,E as darken,L as difference,N as exclusion,J as hardLight,P as hue,F as lighten,S as luminosity,B as multiply,A as normal,D as overlay,Q as saturation,C as screen,K as softLight};\n//# sourceMappingURL=index.modern.js.map\n","import { parseToRgba, rgba } from 'color2k';\nimport { CustomBorderRadii, CustomPalette } from '../../interface';\nimport { overlay } from 'color-blend';\n\nexport const isColor = strColor => {\n const s = new Option().style;\n s.color = strColor;\n return s.color !== '';\n};\n\nconst toKebabCase = (pascal: string) => pascal.replace(/([a-z0–9])([A-Z])/g, '$1-$2').toLowerCase();\n\n// This function handles arrays and objects\nconst buildVars = (prev: string, obj: any): { [k: string]: string } => {\n let resp = {};\n\n for (const k in obj) {\n const name = `${prev}-${toKebabCase(k)}`;\n if (typeof obj[k] === 'object' && obj[k] !== null) {\n resp = { ...resp, ...buildVars(name, obj[k]) };\n } else {\n resp[name] = obj[k];\n }\n }\n\n return resp;\n};\n\nexport const getCssColors = (customPalette: CustomPalette): { [k: string]: string } => buildVars('--cpsl-color', customPalette);\nexport const getCssBorderRadii = (customBorderRadii: CustomBorderRadii): { [k: string]: string } => buildVars('--cpsl-border-radius', customBorderRadii);\n\nexport const overlayMix = (baseColor: string, overlayColor: string) => {\n const baseRGBA = parseToRgba(baseColor);\n const overlayRGBA = parseToRgba(overlayColor);\n\n const finalRGBA = overlay({ r: baseRGBA[0], g: baseRGBA[1], b: baseRGBA[2], a: 0.1 }, { r: overlayRGBA[0], g: overlayRGBA[1], b: overlayRGBA[2], a: overlayRGBA[3] });\n\n return rgba(finalRGBA.r, finalRGBA.g, finalRGBA.b, finalRGBA.a);\n};\n","import { Theme } from '../../interface';\nimport { getCssBorderRadii } from './utils';\n\nexport const generateBorderRadii = ({ borderRadius, customBorderRadii }: Pick<Theme, 'borderRadius' | 'customBorderRadii'>) => {\n let mediumRadius: number,\n largeRadius: number,\n checkboxRadius: number = 4;\n const fullRadius = 1000;\n let isFull = false;\n let isNone = false;\n\n switch (borderRadius) {\n case 'none': {\n isNone = true;\n mediumRadius = 0;\n largeRadius = 0;\n checkboxRadius = 0;\n break;\n }\n case 'xs': {\n mediumRadius = 2;\n largeRadius = 4;\n checkboxRadius = 2;\n break;\n }\n case 'sm': {\n mediumRadius = 4;\n largeRadius = 8;\n break;\n }\n case 'md': {\n mediumRadius = 8;\n largeRadius = 16;\n break;\n }\n case 'xl': {\n mediumRadius = 16;\n largeRadius = 32;\n break;\n }\n case 'full': {\n mediumRadius = 24;\n largeRadius = 32;\n isFull = true;\n break;\n }\n default:\n case 'lg': {\n mediumRadius = 12;\n largeRadius = 24;\n break;\n }\n }\n\n document.documentElement.style.setProperty('--cpsl-border-radius-input', `${isFull ? fullRadius : mediumRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-select', `${isFull ? fullRadius : mediumRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-file', `${isFull ? fullRadius : mediumRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-alert', `${isFull ? fullRadius : mediumRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-tabs', `${isNone ? 0 : fullRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-primary-button', `${isFull ? fullRadius : mediumRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-secondary-button', `${isFull ? fullRadius : mediumRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-tertiary-button', `${isFull ? fullRadius : mediumRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-destructive-button', `${isFull ? fullRadius : mediumRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-tile-button', `${mediumRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-qr-code', `${largeRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-info-box', `${mediumRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-table-container', `${mediumRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-avatar', `${mediumRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-button-group', `${mediumRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-card', `${largeRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-modal', `${largeRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-checkbox', `${checkboxRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-switch', `${isNone ? 0 : fullRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-pill', `${isNone ? 0 : fullRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-radio', `${fullRadius}px`);\n\n if (customBorderRadii) {\n const cssBorderRadiiVars = getCssBorderRadii(customBorderRadii);\n Object.entries(cssBorderRadiiVars).forEach(([k, v]) => document.documentElement.style.setProperty(k, v));\n }\n};\n","import { Theme } from '../../interface';\n\nconst FONT_NAME_MAP = {\n body2XS: 'body-2xs',\n bodyXS: 'body-xs',\n bodyS: 'body-s',\n bodyM: 'body-m',\n bodyL: 'body-l',\n bodyXL: 'body-xl',\n headingXS: 'heading-xs',\n headingS: 'heading-s',\n headingM: 'heading-m',\n headingL: 'heading-l',\n headingXL: 'heading-xl',\n heading2XL: 'heading-2xl',\n};\n\nexport const generateFont = ({ font, customFontSizes }: Pick<Theme, 'font' | 'customFontSizes'>) => {\n if (font) {\n document.documentElement.style.setProperty('--cpsl-default-font', font);\n }\n\n Object.entries(FONT_NAME_MAP).forEach(([key, value]) => {\n if (customFontSizes?.[key]) {\n document.documentElement.style.setProperty(`--cpsl-font-size-${value}`, customFontSizes[key]);\n } else {\n document.documentElement.style.removeProperty(`--cpsl-font-size-${value}`);\n }\n });\n};\n","import { mix, readableColorIsBlack } from 'color2k';\nimport { Theme } from '../../interface';\nimport { getCssColors, isColor, overlayMix } from './utils';\nimport { COLOR_MIXES, DEFAULT_THEME, UTILITY_COLORS } from '../../constants';\n\nexport type Palette = {\n foregroundColors: string[];\n backgroundColors: string[];\n accentColors: string[];\n};\n\nexport const generatePalette = ({\n foregroundColor,\n backgroundColor,\n accentColor,\n isDarkTheme,\n customPalette,\n}: Pick<Theme, 'foregroundColor' | 'backgroundColor' | 'accentColor' | 'customPalette'> & { isDarkTheme: boolean }) => {\n if (!foregroundColor || !isColor(foregroundColor)) {\n foregroundColor = DEFAULT_THEME.foregroundColor;\n }\n if (!backgroundColor || !isColor(backgroundColor)) {\n backgroundColor = DEFAULT_THEME.backgroundColor;\n }\n if (!Boolean(accentColor) || !isColor(accentColor)) {\n accentColor = foregroundColor;\n }\n\n const isDarkAccent = Boolean(accentColor) ? !readableColorIsBlack(accentColor) : false;\n\n const palette: Palette = {\n foregroundColors: [],\n backgroundColors: [],\n accentColors: [],\n };\n\n const backgroundMixColor = isDarkTheme ? '#FFFFFF' : '#000000';\n const foregroundMixColor = isDarkTheme ? '#000000' : '#FFFFFF';\n const accentMixColor = isDarkAccent ? '#FFFFFF' : '#000000';\n\n COLOR_MIXES.forEach(value => {\n palette.foregroundColors.push(mix(foregroundColor, foregroundMixColor, value));\n palette.backgroundColors.push(mix(backgroundColor, backgroundMixColor, value));\n palette.accentColors.push(mix(accentColor, accentMixColor, value));\n });\n\n // BACKGROUND\n document.documentElement.style.setProperty('--cpsl-color-background-0', palette.backgroundColors[0]);\n document.documentElement.style.setProperty('--cpsl-color-background-4', palette.backgroundColors[1]);\n document.documentElement.style.setProperty('--cpsl-color-background-8', palette.backgroundColors[2]);\n document.documentElement.style.setProperty('--cpsl-color-background-16', palette.backgroundColors[3]);\n document.documentElement.style.setProperty('--cpsl-color-background-32', palette.backgroundColors[4]);\n document.documentElement.style.setProperty('--cpsl-color-background-48', palette.backgroundColors[5]);\n document.documentElement.style.setProperty('--cpsl-color-background-64', palette.backgroundColors[6]);\n document.documentElement.style.setProperty('--cpsl-color-background-80', palette.backgroundColors[7]);\n document.documentElement.style.setProperty('--cpsl-color-background-96', palette.backgroundColors[8]);\n\n // FOREGROUND\n document.documentElement.style.setProperty('--cpsl-color-foreground-0', palette.foregroundColors[0]);\n document.documentElement.style.setProperty('--cpsl-color-foreground-4', palette.foregroundColors[1]);\n document.documentElement.style.setProperty('--cpsl-color-foreground-8', palette.foregroundColors[2]);\n document.documentElement.style.setProperty('--cpsl-color-foreground-16', palette.foregroundColors[3]);\n document.documentElement.style.setProperty('--cpsl-color-foreground-32', palette.foregroundColors[4]);\n document.documentElement.style.setProperty('--cpsl-color-foreground-48', palette.foregroundColors[5]);\n document.documentElement.style.setProperty('--cpsl-color-foreground-64', palette.foregroundColors[6]);\n document.documentElement.style.setProperty('--cpsl-color-foreground-80', palette.foregroundColors[7]);\n document.documentElement.style.setProperty('--cpsl-color-foreground-96', palette.foregroundColors[8]);\n\n // ACCENT\n document.documentElement.style.setProperty('--cpsl-color-accent-0', palette.accentColors[0]);\n document.documentElement.style.setProperty('--cpsl-color-accent-4', palette.accentColors[1]);\n document.documentElement.style.setProperty('--cpsl-color-accent-8', palette.accentColors[2]);\n document.documentElement.style.setProperty('--cpsl-color-accent-16', palette.accentColors[3]);\n document.documentElement.style.setProperty('--cpsl-color-accent-32', palette.accentColors[4]);\n document.documentElement.style.setProperty('--cpsl-color-accent-48', palette.accentColors[5]);\n document.documentElement.style.setProperty('--cpsl-color-accent-64', palette.accentColors[6]);\n document.documentElement.style.setProperty('--cpsl-color-accent-80', palette.accentColors[7]);\n document.documentElement.style.setProperty('--cpsl-color-accent-96', palette.accentColors[8]);\n\n // CONTRAST\n document.documentElement.style.setProperty('--cpsl-color-contrast', isDarkTheme ? '#FFFFFF' : '#000000');\n\n const utilityLightMixColor = '#FFFFFF';\n const utilityLightMixValue = 0.72;\n // UTILITY\n const red = overlayMix(foregroundColor, UTILITY_COLORS.red);\n const yellow = overlayMix(foregroundColor, UTILITY_COLORS.yellow);\n const green = overlayMix(foregroundColor, UTILITY_COLORS.green);\n document.documentElement.style.setProperty('--cpsl-color-utility-red', red);\n document.documentElement.style.setProperty('--cpsl-color-utility-yellow', yellow);\n document.documentElement.style.setProperty('--cpsl-color-utility-green', green);\n document.documentElement.style.setProperty('--cpsl-color-utility-red-light', mix(red, utilityLightMixColor, utilityLightMixValue));\n document.documentElement.style.setProperty('--cpsl-color-utility-yellow-light', mix(yellow, utilityLightMixColor, utilityLightMixValue));\n document.documentElement.style.setProperty('--cpsl-color-utility-green-light', mix(green, utilityLightMixColor, utilityLightMixValue));\n\n if (customPalette) {\n const cssColorVars = getCssColors(customPalette);\n Object.entries(cssColorVars).forEach(([k, v]) => document.documentElement.style.setProperty(k, v));\n }\n};\n","import { DEFAULT_THEME } from '../../constants';\nimport { Theme } from '../../interface';\nimport { generateBorderRadii } from './generateBorderRadii';\nimport { generateFont } from './generateFont';\nimport { generatePalette } from './generatePalette';\n\n/**\n * Generates css theme variables.\n * @returns @boolean Whether background is dark or not.\n */\nexport const generateTheme = ({\n foregroundColor = DEFAULT_THEME.foregroundColor,\n backgroundColor = DEFAULT_THEME.backgroundColor,\n accentColor,\n darkForegroundColor,\n darkBackgroundColor,\n darkAccentColor,\n mode = 'light',\n font,\n customPalette,\n borderRadius,\n customFontSizes,\n customBorderRadii,\n}: Theme) => {\n const isDarkTheme = mode === 'dark';\n\n generatePalette({\n foregroundColor: isDarkTheme ? (darkForegroundColor ?? foregroundColor) : foregroundColor,\n backgroundColor: isDarkTheme ? (darkBackgroundColor ?? backgroundColor) : backgroundColor,\n accentColor: isDarkTheme ? (darkAccentColor ?? accentColor) : accentColor,\n customPalette,\n isDarkTheme,\n });\n\n generateFont({ font, customFontSizes });\n\n generateBorderRadii({ borderRadius, customBorderRadii });\n};\n"],"mappings":"8GAOA,SAASA,EAAMC,EAAKC,EAAMC,GACxB,OAAOC,KAAKC,IAAID,KAAKE,IAAIL,EAAKE,GAAQD,EACxC,CAEA,MAAMK,UAAmBC,MACvB,WAAAC,CAAYC,GACVC,MAAM,2BAA2BD,KACrC,EAEA,IAAIE,EAAeL,EAOnB,SAASM,EAAYH,GACnB,UAAWA,IAAU,SAAU,MAAM,IAAIE,EAAaF,GACtD,GAAIA,EAAMI,OAAOC,gBAAkB,cAAe,MAAO,CAAC,EAAG,EAAG,EAAG,GACnE,IAAIC,EAAkBN,EAAMI,OAC5BE,EAAkBC,EAAgBC,KAAKR,GAASS,EAAUT,GAASA,EACnE,MAAMU,EAAkBC,EAAgBC,KAAKN,GAC7C,GAAII,EAAiB,CACnB,MAAMG,EAAMC,MAAMC,KAAKL,GAAiBM,MAAM,GAC9C,MAAO,IAAIH,EAAIG,MAAM,EAAG,GAAGC,KAAIC,GAAKC,SAASC,EAAEF,EAAG,GAAI,MAAMC,SAASC,EAAEP,EAAI,IAAM,IAAK,GAAI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,EAAGnB,KAAO0C,SAASC,gBAAgB/B,MAAMgC,YAAYzB,EAAGnB,I,SCvFtFuF,EAAgB,EAC3BrB,kBAAkBI,EAAcJ,gBAChCC,kBAAkBG,EAAcH,gBAChCC,cACAoB,sBACAC,sBACAC,kBACAC,OAAO,QACP7B,OACAtC,gBACAW,eACA4B,kBACArC,wBAEA,MAAM2C,EAAcsB,IAAS,OAE7B1B,EAAgB,CACdC,gBAAiBG,EAAemB,IAAmB,MAAnBA,SAAmB,EAAnBA,EAAuBtB,EAAmBA,EAC1EC,gBAAiBE,EAAeoB,IAAmB,MAAnBA,SAAmB,EAAnBA,EAAuBtB,EAAmBA,EAC1EC,YAAaC,EAAeqB,IAAe,MAAfA,SAAe,EAAfA,EAAmBtB,EAAeA,EAC9D5C,gBACA6C,gBAGFR,EAAa,CAAEC,OAAMC,oBAErB7B,EAAoB,CAAEC,eAAcT,qBAAoB,S","ignoreList":[]}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
class t{constructor(e){this._value=NaN;if(typeof e==="string"){this._seed=this.hashCode(e)}else if(typeof e==="number"){this._seed=this.getSafeSeed(e)}else{this._seed=this.getSafeSeed(t.MIN+Math.floor((t.MAX-t.MIN)*Math.random()))}this.reset()}next(e=0,r=1){this.recalculate();return this.map(this._value,t.MIN,t.MAX,e,r)}nextInt(e=10,r=100){this.recalculate();return Math.floor(this.map(this._value,t.MIN,t.MAX,e,r+1))}nextString(t=16,e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"){let r="";while(r.length<t){r+=this.nextChar(e)}return r}nextChar(t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"){return t.substr(this.nextInt(0,t.length-1),1)}nextArrayItem(t){return t[this.nextInt(0,t.length-1)]}nextBoolean(){this.recalculate();return this._value>.5}skip(t=1){while(t-- >0){this.recalculate()}}reset(){this._value=this._seed}recalculate(){this._value=this.xorshift(this._value)}xorshift(t){t^=t<<13;t^=t>>17;t^=t<<5;return t}map(t,e,r,s,i){return(t-e)/(r-e)*(i-s)+s}hashCode(t){let e=0;if(t){const r=t.length;for(let s=0;s<r;s++){e=(e<<5)-e+t.charCodeAt(s);e|=0;e=this.xorshift(e)}}return this.getSafeSeed(e)}getSafeSeed(t){if(t===0)return 1;return t}}t.MIN=-2147483648;t.MAX=2147483647;const e=t;const r=["red","orange","yellow","green","blue","purple"];const s={red:["#FF4270","#FF7C7C"],orange:["#F45532","#FF9B63"],yellow:["#FFA756","#FBFF47"],green:["#0CAE60","#7BFFD0"],blue:["#476FFF","#47C8FF"],purple:["#9747FF","#DA47FF"]};function i(t){const i=new e(t);const[n,h]=s[r[i.nextInt(0,r.length-1)]];return`linear-gradient(136deg, ${n} 6.86%, ${h} 93.78%)`}export{r as C,e as P,i as g};
|
2
|
+
//# sourceMappingURL=p-286db996.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["Prando","constructor","seed","this","_value","NaN","_seed","hashCode","getSafeSeed","MIN","Math","floor","MAX","random","reset","next","min","pseudoMax","recalculate","map","nextInt","max","nextString","length","chars","str","nextChar","substr","nextArrayItem","array","nextBoolean","skip","iterations","xorshift","value","val","minFrom","maxFrom","minTo","maxTo","hash","l","i","charCodeAt","COLORS","GRADIENTS","red","orange","yellow","green","blue","purple","getPseudoRandomBackground","rng","start","stop"],"sources":["src/lib/prando.ts","src/utils/prand.ts"],"sourcesContent":["/*\n * This file contains code from prando, which is licensed under the MIT License:\n *\n * Copyright (c) 2016 Zeh Fernando\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\nexport default class Prando {\n private static readonly MIN: number = -2147483648; // Int32 min\n private static readonly MAX: number = 2147483647; // Int32 max\n\n private _seed: number;\n private _value = NaN;\n\n // ================================================================================================================\n // CONSTRUCTOR ----------------------------------------------------------------------------------------------------\n\n /**\n * Generate a new Prando pseudo-random number generator.\n *\n * @param seed - A number or string seed that determines which pseudo-random number sequence will be created. Defaults to a random seed based on `Math.random()`.\n */\n constructor(seed?: number | string) {\n if (typeof seed === 'string') {\n // String seed\n this._seed = this.hashCode(seed);\n } else if (typeof seed === 'number') {\n // Numeric seed\n this._seed = this.getSafeSeed(seed);\n } else {\n // Pseudo-random seed\n this._seed = this.getSafeSeed(Prando.MIN + Math.floor((Prando.MAX - Prando.MIN) * Math.random()));\n }\n this.reset();\n }\n\n // ================================================================================================================\n // PUBLIC INTERFACE -----------------------------------------------------------------------------------------------\n\n /**\n * Generates a pseudo-random number between a lower (inclusive) and a higher (exclusive) bounds.\n *\n * @param min - The minimum number that can be randomly generated.\n * @param pseudoMax - The maximum number that can be randomly generated (exclusive).\n * @return The generated pseudo-random number.\n */\n public next(min = 0, pseudoMax = 1): number {\n this.recalculate();\n return this.map(this._value, Prando.MIN, Prando.MAX, min, pseudoMax);\n }\n\n /**\n * Generates a pseudo-random integer number in a range (inclusive).\n *\n * @param min - The minimum number that can be randomly generated.\n * @param max - The maximum number that can be randomly generated.\n * @return The generated pseudo-random number.\n */\n public nextInt(min = 10, max = 100): number {\n this.recalculate();\n return Math.floor(this.map(this._value, Prando.MIN, Prando.MAX, min, max + 1));\n }\n\n /**\n * Generates a pseudo-random string sequence of a particular length from a specific character range.\n *\n * Note: keep in mind that creating a random string sequence does not guarantee uniqueness; there is always a\n * 1 in (char_length^string_length) chance of collision. For real unique string ids, always check for\n * pre-existing ids, or employ a robust GUID/UUID generator.\n *\n * @param length - Length of the string to be generated.\n * @param chars - Characters that are used when creating the random string. Defaults to all alphanumeric chars (A-Z, a-z, 0-9).\n * @return The generated string sequence.\n */\n public nextString(length = 16, chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'): string {\n let str = '';\n while (str.length < length) {\n str += this.nextChar(chars);\n }\n return str;\n }\n\n /**\n * Generates a pseudo-random string of 1 character specific character range.\n *\n * @param chars - Characters that are used when creating the random string. Defaults to all alphanumeric chars (A-Z, a-z, 0-9).\n * @return The generated character.\n */\n public nextChar(chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'): string {\n return chars.substr(this.nextInt(0, chars.length - 1), 1);\n }\n\n /**\n * Picks a pseudo-random item from an array. The array is left unmodified.\n *\n * Note: keep in mind that while the returned item will be random enough, picking one item from the array at a time\n * does not guarantee nor imply that a sequence of random non-repeating items will be picked. If you want to\n * *pick items in a random order* from an array, instead of *pick one random item from an array*, it's best to\n * apply a *shuffle* transformation to the array instead, then read it linearly.\n *\n * @param array - Array of any type containing one or more candidates for random picking.\n * @return An item from the array.\n */\n public nextArrayItem<T>(array: T[]): T {\n return array[this.nextInt(0, array.length - 1)];\n }\n\n /**\n * Generates a pseudo-random boolean.\n *\n * @return A value of true or false.\n */\n public nextBoolean(): boolean {\n this.recalculate();\n return this._value > 0.5;\n }\n\n /**\n * Skips ahead in the sequence of numbers that are being generated. This is equivalent to\n * calling next() a specified number of times, but faster since it doesn't need to map the\n * new random numbers to a range and return it.\n *\n * @param iterations - The number of items to skip ahead.\n */\n public skip(iterations = 1): void {\n while (iterations-- > 0) {\n this.recalculate();\n }\n }\n\n /**\n * Reset the pseudo-random number sequence back to its starting seed. Further calls to next()\n * will then produce the same sequence of numbers it had produced before. This is equivalent to\n * creating a new Prando instance with the same seed as another Prando instance.\n *\n * Example:\n * let rng = new Prando(12345678);\n * console.log(rng.next()); // 0.6177754114889017\n * console.log(rng.next()); // 0.5784605181725837\n * rng.reset();\n * console.log(rng.next()); // 0.6177754114889017 again\n * console.log(rng.next()); // 0.5784605181725837 again\n */\n public reset(): void {\n this._value = this._seed;\n }\n\n // ================================================================================================================\n // PRIVATE INTERFACE ----------------------------------------------------------------------------------------------\n\n private recalculate(): void {\n this._value = this.xorshift(this._value);\n }\n\n private xorshift(value: number): number {\n // Xorshift*32\n // Based on George Marsaglia's work: http://www.jstatsoft.org/v08/i14/paper\n value ^= value << 13;\n value ^= value >> 17;\n value ^= value << 5;\n return value;\n }\n\n private map(val: number, minFrom: number, maxFrom: number, minTo: number, maxTo: number): number {\n return ((val - minFrom) / (maxFrom - minFrom)) * (maxTo - minTo) + minTo;\n }\n\n private hashCode(str: string): number {\n let hash = 0;\n if (str) {\n const l = str.length;\n for (let i = 0; i < l; i++) {\n hash = (hash << 5) - hash + str.charCodeAt(i);\n hash |= 0;\n hash = this.xorshift(hash);\n }\n }\n return this.getSafeSeed(hash);\n }\n\n private getSafeSeed(seed: number): number {\n if (seed === 0) return 1;\n return seed;\n }\n}\n","import Prando from '../lib/prando';\n\nexport type Color = 'red' | 'orange' | 'yellow' | 'green' | 'blue' | 'purple';\n\nexport const COLORS: Color[] = ['red', 'orange', 'yellow', 'green', 'blue', 'purple'];\n\nconst GRADIENTS = {\n red: ['#FF4270', '#FF7C7C'],\n orange: ['#F45532', '#FF9B63'],\n yellow: ['#FFA756', '#FBFF47'],\n green: ['#0CAE60', '#7BFFD0'],\n blue: ['#476FFF', '#47C8FF'],\n purple: ['#9747FF', '#DA47FF'],\n};\n\nexport function getPseudoRandomBackground(seed: string): string {\n const rng = new Prando(seed);\n\n const [start, stop] = GRADIENTS[COLORS[rng.nextInt(0, COLORS.length - 1)]];\n\n return `linear-gradient(136deg, ${start} 6.86%, ${stop} 93.78%)`;\n}\n"],"mappings":"AAwBA,MAAqBA,EAenB,WAAAC,CAAYC,GAVJC,KAAAC,OAASC,IAWf,UAAWH,IAAS,SAAU,CAE5BC,KAAKG,MAAQH,KAAKI,SAASL,E,MACtB,UAAWA,IAAS,SAAU,CAEnCC,KAAKG,MAAQH,KAAKK,YAAYN,E,KACzB,CAELC,KAAKG,MAAQH,KAAKK,YAAYR,EAAOS,IAAMC,KAAKC,OAAOX,EAAOY,IAAMZ,EAAOS,KAAOC,KAAKG,U,CAEzFV,KAAKW,O,CAaA,IAAAC,CAAKC,EAAM,EAAGC,EAAY,GAC/Bd,KAAKe,cACL,OAAOf,KAAKgB,IAAIhB,KAAKC,OAAQJ,EAAOS,IAAKT,EAAOY,IAAKI,EAAKC,E,CAUrD,OAAAG,CAAQJ,EAAM,GAAIK,EAAM,KAC7BlB,KAAKe,cACL,OAAOR,KAAKC,MAAMR,KAAKgB,IAAIhB,KAAKC,OAAQJ,EAAOS,IAAKT,EAAOY,IAAKI,EAAKK,EAAM,G,CActE,UAAAC,CAAWC,EAAS,GAAIC,EAAQ,kEACrC,IAAIC,EAAM,GACV,MAAOA,EAAIF,OAASA,EAAQ,CAC1BE,GAAOtB,KAAKuB,SAASF,E,CAEvB,OAAOC,C,CASF,QAAAC,CAASF,EAAQ,kEACtB,OAAOA,EAAMG,OAAOxB,KAAKiB,QAAQ,EAAGI,EAAMD,OAAS,GAAI,E,CAclD,aAAAK,CAAiBC,GACtB,OAAOA,EAAM1B,KAAKiB,QAAQ,EAAGS,EAAMN,OAAS,G,CAQvC,WAAAO,GACL3B,KAAKe,cACL,OAAOf,KAAKC,OAAS,E,CAUhB,IAAA2B,CAAKC,EAAa,GACvB,MAAOA,KAAe,EAAG,CACvB7B,KAAKe,a,EAi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