@usecapsule/core-components 3.0.1-dev.4 → 3.0.1-dev.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. package/css/capsule-core.css +10 -10
  2. package/dist/capsule/capsule.esm.js +1 -1
  3. package/dist/capsule/capsule.esm.js.map +1 -1
  4. package/dist/capsule/index.esm.js +1 -1
  5. package/dist/capsule/index.esm.js.map +1 -1
  6. package/dist/capsule/{p-a7db40a8.entry.js → p-9fac8ae5.entry.js} +5 -5
  7. package/dist/capsule/p-9fac8ae5.entry.js.map +1 -0
  8. package/dist/cjs/capsule.cjs.js +1 -1
  9. package/dist/cjs/cpsl-alert_33.cjs.entry.js +44 -8
  10. package/dist/cjs/cpsl-alert_33.cjs.entry.js.map +1 -1
  11. package/dist/cjs/index.cjs.js +104 -107
  12. package/dist/cjs/index.cjs.js.map +1 -1
  13. package/dist/cjs/loader.cjs.js +1 -1
  14. package/dist/collection/components/cpsl-file-upload/cpsl-file-upload.css +1 -0
  15. package/dist/collection/components/cpsl-pagination/cpsl-pagination.css +4 -0
  16. package/dist/collection/components/cpsl-pagination/cpsl-pagination.js +1 -1
  17. package/dist/collection/components/cpsl-pagination/cpsl-pagination.js.map +1 -1
  18. package/dist/collection/components/cpsl-table/cpsl-table.css +23 -1
  19. package/dist/collection/components/cpsl-table/cpsl-table.js +67 -1
  20. package/dist/collection/components/cpsl-table/cpsl-table.js.map +1 -1
  21. package/dist/collection/components/cpsl-tabs/cpsl-tabs.js +1 -1
  22. package/dist/collection/components/cpsl-text/cpsl-text.js +1 -1
  23. package/dist/collection/components/cpsl-tile-button/cpsl-tile-button.js +1 -1
  24. package/dist/collection/interface.js.map +1 -1
  25. package/dist/collection/utils/theme/generateBorderRadii.js +40 -43
  26. package/dist/collection/utils/theme/generateBorderRadii.js.map +1 -1
  27. package/dist/collection/utils/theme/generateTheme.js +2 -2
  28. package/dist/collection/utils/theme/generateTheme.js.map +1 -1
  29. package/dist/collection/utils/theme/utils.js +1 -0
  30. package/dist/collection/utils/theme/utils.js.map +1 -1
  31. package/dist/esm/capsule.js +1 -1
  32. package/dist/esm/cpsl-alert_33.entry.js +44 -8
  33. package/dist/esm/cpsl-alert_33.entry.js.map +1 -1
  34. package/dist/esm/index.js +104 -107
  35. package/dist/esm/index.js.map +1 -1
  36. package/dist/esm/loader.js +1 -1
  37. package/dist/types/components/cpsl-table/cpsl-table.d.ts +8 -0
  38. package/dist/types/components.d.ts +8 -0
  39. package/dist/types/interface.d.ts +24 -1
  40. package/dist/types/utils/theme/generateBorderRadii.d.ts +1 -1
  41. package/dist/types/utils/theme/generateTheme.d.ts +1 -1
  42. package/dist/types/utils/theme/utils.d.ts +4 -1
  43. package/package.json +1 -1
  44. package/dist/capsule/p-a7db40a8.entry.js.map +0 -1
@@ -114,7 +114,7 @@ body.backdrop-no-scroll {
114
114
  --cpsl-color-text-disabled: var(--cpsl-color-foreground-48);
115
115
  --cpsl-color-text-error: var(--cpsl-color-utility-red);
116
116
  --cpsl-color-modal-surface-main: var(--cpsl-color-background-0);
117
- --cpsl-color-modal-surface-footer: var(--cpsl-color-background-8);
117
+ --cpsl-color-modal-surface-footer: var(--cpsl-color-foreground-96);
118
118
  --cpsl-color-modal-border: var(--cpsl-color-background-8);
119
119
  --cpsl-color-input-surface-disabled: var(--cpsl-color-background-8);
120
120
  --cpsl-color-input-surface-default: var(--cpsl-color-background-4);
@@ -212,22 +212,22 @@ body.backdrop-no-scroll {
212
212
  --cpsl-border-radius-select: 12px;
213
213
  --cpsl-border-radius-file: 12px;
214
214
  --cpsl-border-radius-alert: 12px;
215
- --cpsl-border-radius-tabs: 8px;
215
+ --cpsl-border-radius-tabs: 12px;
216
216
  --cpsl-border-radius-primary-button: 12px;
217
217
  --cpsl-border-radius-secondary-button: 12px;
218
218
  --cpsl-border-radius-destructive-button: 12px;
219
- --cpsl-border-radius-tile-button: 8px;
220
- --cpsl-border-radius-modal: 20px;
219
+ --cpsl-border-radius-tile-button: 12px;
220
+ --cpsl-border-radius-modal: 24px;
221
221
  --cpsl-border-radius-pill: 1000px;
222
- --cpsl-border-radius-qr-code: 24px;
223
- --cpsl-border-radius-info-box: 8px;
224
- --cpsl-border-radius-table-container: 20px;
222
+ --cpsl-border-radius-qr-code: 12px;
223
+ --cpsl-border-radius-info-box: 12px;
224
+ --cpsl-border-radius-table-container: 24px;
225
225
  --cpsl-border-radius-switch: 1000px;
226
226
  --cpsl-border-radius-checkbox: 4px;
227
227
  --cpsl-border-radius-radio: 1000px;
228
- --cpsl-border-radius-avatar: 8px;
229
- --cpsl-border-radius-card: 16px;
230
- --cpsl-border-radius-button-group: 4px;
228
+ --cpsl-border-radius-avatar: 12px;
229
+ --cpsl-border-radius-card: 24px;
230
+ --cpsl-border-radius-button-group: 12px;
231
231
  --cpsl-font-size-body-2xs: clamp(8px, 0.625rem, 15px);
232
232
  --cpsl-font-size-body-xs: clamp(9.6px, 0.75rem, 18px);
233
233
  --cpsl-font-size-body-s: clamp(11.2px, 0.875rem, 21px);
@@ -1,2 +1,2 @@
1
- import{p as e,b as t}from"./p-6e71539d.js";export{s as setNonce}from"./p-6e71539d.js";import{g as r}from"./p-e1255160.js";var o=()=>{const t=import.meta.url;const r={};if(t!==""){r.resourcesUrl=new URL(".",t).href}return e(r)};o().then((async e=>{await r();return t([["p-5ed5e96c",[[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-86e6cba5",[[1,"cpsl-animation",{src:[1],replayAnimation:[64]}]]],["p-70f95c93",[[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-f9351426",[[1,"cpsl-grid",{fixed:[4]}]]],["p-52d6ebee",[[1,"cpsl-info-box"]]],["p-397edab5",[[1,"cpsl-row"]]],["p-a7db40a8",[[1,"cpsl-pagination",{initialPage:[2,"initial-page"],totalPages:[2,"total-pages"],visiblePages:[1026,"visible-pages"],currentPage:[32]},null,{currentPage:["watchChange"]}],[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-select",{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"],anchorEl:[32],hasFocus:[32],popoverOpen:[32],hasSelectedItem:[32]},[[0,"cpslSelectItemClick","selectItemClickHandler"],[0,"cpslOpen","onPopoverOpen"],[0,"cpslClose","onPopoverClose"]],{selectedValue:["onValueChange","handleValueChange"]}],[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-modal",{enterTransitionDuration:[2,"enter-transition-duration"],exitTransitionDuration:[2,"exit-transition-duration"],footerExpanded:[4,"footer-expanded"],footerTransitionDuration:[2,"footer-transition-duration"],noOverlay:[4,"no-overlay"],open:[4],zIndexOverride:[2,"z-index-override"],hasFooter:[32]},null,{footerExpanded:["toggleHeight"],open:["toggleModal"]}],[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"],[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-input",{autocapitalize:[1],autocomplete:[1],autocorrect:[1],noAutoDisable:[4,"no-auto-disable"],autofocus:[4],disabled:[4],enterkeyhint:[1],errorText:[1,"error-text"],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]},null,{disabled:["handleDisable"]}],[1,"cpsl-nav-button-group",{selectedId:[1,"selected-id"]},null,{selectedId:["selectItem"]}],[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",{as:[1],disabled:[516],fullWidth:[4,"full-width"],href:[1],size:[1],target:[1],variant:[513]}],[1,"cpsl-button-group",{selectedId:[1,"selected-id"]},null,{selectedId:["selectItem"]}],[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-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)}));
1
+ import{p as e,b as t}from"./p-6e71539d.js";export{s as setNonce}from"./p-6e71539d.js";import{g as r}from"./p-e1255160.js";var l=()=>{const t=import.meta.url;const r={};if(t!==""){r.resourcesUrl=new URL(".",t).href}return e(r)};l().then((async e=>{await r();return t([["p-5ed5e96c",[[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-86e6cba5",[[1,"cpsl-animation",{src:[1],replayAnimation:[64]}]]],["p-70f95c93",[[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-f9351426",[[1,"cpsl-grid",{fixed:[4]}]]],["p-52d6ebee",[[1,"cpsl-info-box"]]],["p-397edab5",[[1,"cpsl-row"]]],["p-9fac8ae5",[[1,"cpsl-pagination",{initialPage:[2,"initial-page"],totalPages:[2,"total-pages"],visiblePages:[1026,"visible-pages"],currentPage:[32]},null,{currentPage:["watchChange"]}],[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-select",{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"],anchorEl:[32],hasFocus:[32],popoverOpen:[32],hasSelectedItem:[32]},[[0,"cpslSelectItemClick","selectItemClickHandler"],[0,"cpslOpen","onPopoverOpen"],[0,"cpslClose","onPopoverClose"]],{selectedValue:["onValueChange","handleValueChange"]}],[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-modal",{enterTransitionDuration:[2,"enter-transition-duration"],exitTransitionDuration:[2,"exit-transition-duration"],footerExpanded:[4,"footer-expanded"],footerTransitionDuration:[2,"footer-transition-duration"],noOverlay:[4,"no-overlay"],open:[4],zIndexOverride:[2,"z-index-override"],hasFooter:[32]},null,{footerExpanded:["toggleHeight"],open:["toggleModal"]}],[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",{hasStickyHeader:[4,"has-sticky-header"],hasHorizontalScroll:[32],hasVerticalScroll:[32],tableHeadHeight:[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-input",{autocapitalize:[1],autocomplete:[1],autocorrect:[1],noAutoDisable:[4,"no-auto-disable"],autofocus:[4],disabled:[4],enterkeyhint:[1],errorText:[1,"error-text"],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]},null,{disabled:["handleDisable"]}],[1,"cpsl-nav-button-group",{selectedId:[1,"selected-id"]},null,{selectedId:["selectItem"]}],[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",{as:[1],disabled:[516],fullWidth:[4,"full-width"],href:[1],size:[1],target:[1],variant:[513]}],[1,"cpsl-button-group",{selectedId:[1,"selected-id"]},null,{selectedId:["selectItem"]}],[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-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","enterTransitionDuration","exitTransitionDuration","elevated","noOverlay","open","zIndexOverride","src","replayAnimation","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","initialPage","totalPages","visiblePages","currentPage","errorText","externalFilename","externalSrc","fileTypes","helperText","label","required","showOptionalLabel","uploadFile","file","dragOver","dragError","isUploading","uploadError","disabled","dropdownMaxHeight","formatValue","id","placeholder","selectedValue","showFormattedSelectedItem","anchorEl","hasFocus","popoverOpen","hasSelectedItem","icon","variant","checked","code","length","type","anchor","anchorPosition","transitionDuration","transitionFunction","closedAnchorPosition","showTransition","footerExpanded","footerTransitionDuration","hasFooter","endIcon","endText","startIcon","startText","height","position","alt","width","hasCpslSearch","items","selectedItem","isOpen","searchQuery","filteredItems","autocapitalize","autocomplete","autocorrect","noAutoDisable","autofocus","enterkeyhint","inputmode","max","maxlength","min","minlength","multiple","name","pattern","readonly","spellcheck","startIconSrc","step","value","selectedId","text","totalSteps","imageSrc","selected","tab","fullWidth","selectedTab","selectedTabRect","loaded","as","target","anchorOriginHorizontal","anchorOriginVertical","autoWidth","preventBlur","transformOriginHorizontal","transformOriginVertical","triggerAction","trigger","windowPadding","positionX","positionY","closePopover","speed","color","weight"],"sources":["../../web-sdk/node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v4.18.3 | 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,mCAA8B,CAAAC,wBAAS,gCAAAC,uBAAA,+BAAAC,SAAA,IAAAC,UAAA,iBAAAC,KAAA,IAAAC,eAAA,8BAAAD,KAAA,yDAAAE,IAAA,IAAAC,gBAAA,uCAAAC,OAAA,IAAAC,SAAA,gBAAAC,SAAA,gBAAAC,SAAA,gBAAAC,SAAA,gBAAAC,SAAA,gBAAAC,KAAA,IAAAC,OAAA,cAAAC,OAAA,cAAAC,OAAA,cAAAC,OAAA,cAAAC,OAAA,cAAAC,KAAA,IAAAC,OAAA,cAAAC,OAAA,cAAAC,OAAA,cAAAC,OAAA,cAAAC,OAAA,cAAAC,KAAA,IAAAC,OAAA,cAAAC,OAAA,cAAAC,OAAA,cAAAC,OAAA,cAAAC,OAAA,2EAAAC,MAAA,kHAAAC,YAAA,mBAAAC,WAAA,kBAAAC,aAAA,uBAAAC,YAAA,YAAAA,YAAA,yCAAAC,UAAA,iBAAAC,iBAAA,wBAAAC,YAAA,mBAAAC,UAAA,KAAAC,WAAA,kBAAAC,MAAA,IAAAC,SAAA,IAAAC,kBAAA,0BAAAC,WAAA,KAAAC,KAAA,KAAAC,SAAA,KAAAC,UAAA,KAAAC,YAAA,KAAAC,YAAA,yBAAAC,SAAA,IAAAC,kBAAA,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AAA,IAAA9D,SAAA,IAAAC,kBAAA,0BAAA8D,WAAA,IAAAC,aAAA,qBAAA5B,UAAA,iBAAA6B,KAAA,IAAAzC,KAAA,IAAA0C,MAAA,OAAAlD,SAAA,YAAAR,SAAA,gDAAA2D,WAAA,yBAAAA,WAAA,iCAAAC,KAAA,oCAAAC,WAAA,kBAAAJ,KAAA,yBAAAvH,IAAA,IAAA4H,SAAA,gBAAAvF,KAAA,uBAAAsC,QAAA,6BAAAkD,SAAA,IAAAL,MAAA,wBAAA7C,QAAA,qBAAAkD,SAAA,IAAAC,IAAA,8FAAAC,UAAA,iBAAAC,YAAA,mBAAAC,gBAAA,KAAAC,OAAA,YAAAH,UAAA,iBAAAC,YAAA,kCAAAG,GAAA,IAAArE,SAAA,MAAAiE,UAAA,iBAAA3H,KAAA,IAAAiC,KAAA,IAAA+F,OAAA,IAAA1D,QAAA,gCAAA+C,WAAA,yBAAAA,WAAA,oCAAApD,SAAA,KAAAgE,uBAAA,+BAAAC,qBAAA,6BAAAC,UAAA,iBAAAzE,SAAA,IAAA0E,YAAA,mBAAAC,0BAAA,kCAAAC,wBAAA,gCAAAC,cAAA,qBAAAC,QAAA,IAAAC,cAAA,qBAAA9H,KAAA,KAAA+H,UAAA,KAAAC,UAAA,KAAAC,aAAA,YAAAJ,QAAA,oBAAAD,cAAA,oBAAAH,YAAA,oBAAAH,uBAAA,mBAAAC,qBAAA,mBAAAvH,KAAA,sCAAAsB,KAAA,IAAA4G,MAAA,yCAAAtI,wBAAA,gCAAAC,uBAAA,+BAAAG,KAAA,IAAAC,eAAA,8BAAAD,KAAA,mCAAAmI,MAAA,IAAAxE,QAAA,IAAAyE,OAAA,sBAAAlI,IAAA,IAAAwD,KAAA,SAAAjE,EAAA","ignoreList":[]}
1
+ {"version":3,"names":["patchBrowser","importMeta","url","opts","resourcesUrl","URL","href","promiseResolve","then","async","options","globalScripts","bootstrapLazy","enterTransitionDuration","exitTransitionDuration","elevated","noOverlay","open","zIndexOverride","src","replayAnimation","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","initialPage","totalPages","visiblePages","currentPage","errorText","externalFilename","externalSrc","fileTypes","helperText","label","required","showOptionalLabel","uploadFile","file","dragOver","dragError","isUploading","uploadError","disabled","dropdownMaxHeight","formatValue","id","placeholder","selectedValue","showFormattedSelectedItem","anchorEl","hasFocus","popoverOpen","hasSelectedItem","icon","variant","checked","code","length","type","anchor","anchorPosition","transitionDuration","transitionFunction","closedAnchorPosition","showTransition","footerExpanded","footerTransitionDuration","hasFooter","endIcon","endText","startIcon","startText","hasStickyHeader","hasHorizontalScroll","hasVerticalScroll","tableHeadHeight","height","position","alt","width","hasCpslSearch","items","selectedItem","isOpen","searchQuery","filteredItems","autocapitalize","autocomplete","autocorrect","noAutoDisable","autofocus","enterkeyhint","inputmode","max","maxlength","min","minlength","multiple","name","pattern","readonly","spellcheck","startIconSrc","step","value","selectedId","text","totalSteps","imageSrc","selected","tab","fullWidth","selectedTab","selectedTabRect","loaded","as","target","anchorOriginHorizontal","anchorOriginVertical","autoWidth","preventBlur","transformOriginHorizontal","transformOriginVertical","triggerAction","trigger","windowPadding","positionX","positionY","closePopover","speed","color","weight"],"sources":["../../web-sdk/node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v4.18.3 | 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,mCAA8B,CAAAC,wBAAS,gCAAAC,uBAAA,+BAAAC,SAAA,IAAAC,UAAA,iBAAAC,KAAA,IAAAC,eAAA,8BAAAD,KAAA,yDAAAE,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IAAAmG,OAAA,IAAA9D,QAAA,gCAAAmD,WAAA,yBAAAA,WAAA,oCAAAxD,SAAA,KAAAoE,uBAAA,+BAAAC,qBAAA,6BAAAC,UAAA,iBAAA7E,SAAA,IAAA8E,YAAA,mBAAAC,0BAAA,kCAAAC,wBAAA,gCAAAC,cAAA,qBAAAC,QAAA,IAAAC,cAAA,qBAAAlI,KAAA,KAAAmI,UAAA,KAAAC,UAAA,KAAAC,aAAA,YAAAJ,QAAA,oBAAAD,cAAA,oBAAAH,YAAA,oBAAAH,uBAAA,mBAAAC,qBAAA,mBAAA3H,KAAA,sCAAAsB,KAAA,IAAAgH,MAAA,yCAAA1I,wBAAA,gCAAAC,uBAAA,+BAAAG,KAAA,IAAAC,eAAA,8BAAAD,KAAA,mCAAAuI,MAAA,IAAA5E,QAAA,IAAA6E,OAAA,sBAAAtI,IAAA,IAAAwD,KAAA,SAAAjE,EAAA","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- import{D as o,C as t,U as n}from"./p-f2393be6.js";const r=({borderRadius:o})=>{if(!Boolean(o)){return}let t,n,r,e;const c=1e3;let s=false;let u=false;switch(o){case"none":{u=true;t=0;n=0;r=0;e=0;break}case"xs":{t=2;n=4;r=12;e=20;break}case"sm":{t=2;n=8;r=16;e=24;break}case"lg":{t=8;n=16;r=24;e=32;break}case"full":{t=8;n=16;r=24;e=32;s=true;break}default:case"md":{t=4;n=12;r=20;e=28;break}}document.documentElement.style.setProperty("--cpsl-border-radius-input",`${s?c:n}px`);document.documentElement.style.setProperty("--cpsl-border-radius-select",`${s?c:n}px`);document.documentElement.style.setProperty("--cpsl-border-radius-file",`${s?c:n}px`);document.documentElement.style.setProperty("--cpsl-border-radius-alert",`${n}px`);document.documentElement.style.setProperty("--cpsl-border-radius-tabs",`${s?c:n}px`);document.documentElement.style.setProperty("--cpsl-border-radius-primary-button",`${s?c:n}px`);document.documentElement.style.setProperty("--cpsl-border-radius-secondary-button",`${s?c:n}px`);document.documentElement.style.setProperty("--cpsl-border-radius-destructive-button",`${s?c:n}px`);document.documentElement.style.setProperty("--cpsl-border-radius-tile-button",`${n}px`);document.documentElement.style.setProperty("--cpsl-border-radius-modal",`${r}px`);document.documentElement.style.setProperty("--cpsl-border-radius-pill",`${u?0:c}px`);document.documentElement.style.setProperty("--cpsl-border-radius-qr-code",`${e}px`);document.documentElement.style.setProperty("--cpsl-border-radius-info-box",`${n}px`);document.documentElement.style.setProperty("--cpsl-border-radius-table-container",`${r}px`);document.documentElement.style.setProperty("--cpsl-border-radius-switch",`${u?0:c}px`);document.documentElement.style.setProperty("--cpsl-border-radius-checkbox",`${t}px`);document.documentElement.style.setProperty("--cpsl-border-radius-radio",`${c}px`);document.documentElement.style.setProperty("--cpsl-border-radius-avatar",`${n}px`);document.documentElement.style.setProperty("--cpsl-border-radius-card",`${r}px`);document.documentElement.style.setProperty("--cpsl-border-radius-button-group",`${t}px`)};const e={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 c=({font:o,customFontSizes:t})=>{if(Boolean(o)){document.documentElement.style.setProperty("--cpsl-default-font",o)}Object.entries(e).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}`)}}))};function s(o,t,n){return Math.min(Math.max(o,n),t)}class u extends Error{constructor(o){super(`Failed to parse color: "${o}"`)}}var d=u;function l(o){if(typeof o!=="string")throw new d(o);if(o.trim().toLowerCase()==="transparent")return[0,0,0,0];let t=o.trim();t=y.test(o)?p(o):o;const n=b.exec(t);if(n){const o=Array.from(n).slice(1);return[...o.slice(0,3).map((o=>parseInt(f(o,2),16))),parseInt(f(o[3]||"f",2),16)/255]}const r=g.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 e=m.exec(t);if(e){const o=Array.from(e).slice(1);return[...o.slice(0,3).map((o=>parseInt(o,10))),parseFloat(o[3]||"1")]}const c=h.exec(t);if(c){const[t,n,r,e]=Array.from(c).slice(1).map(parseFloat);if(s(0,100,n)!==n)throw new d(o);if(s(0,100,r)!==r)throw new d(o);return[...z(t,n,r),Number.isNaN(e)?1:e]}throw new d(o)}function a(o){let t=5381;let n=o.length;while(n){t=t*33^o.charCodeAt(--n)}return(t>>>0)%2341}const i=o=>parseInt(o.replace(/_/g,""),36);const _="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=i(t.substring(0,3));const r=i(t.substring(3)).toString(16);let e="";for(let o=0;o<6-r.length;o++){e+="0"}o[n]=`${e}${r}`;return o}),{});function p(o){const t=o.toLowerCase().trim();const n=_[a(t)];if(!n)throw new d(o);return`#${n}`}const f=(o,t)=>Array.from(Array(t)).map((()=>o)).join("");const b=new RegExp(`^#${f("([a-f0-9])",3)}([a-f0-9])?$`,"i");const g=new RegExp(`^#${f("([a-f0-9]{2})",3)}([a-f0-9]{2})?$`,"i");const m=new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${f(",\\s*(\\d+)\\s*",2)}(?:,\\s*([\\d.]+))?\\s*\\)$`,"i");const h=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i;const y=/^[a-z]+$/i;const k=o=>Math.round(o*255);const z=(o,t,n)=>{let r=n/100;if(t===0){return[r,r,r].map(k)}const e=(o%360+360)%360/60;const c=(1-Math.abs(2*r-1))*(t/100);const s=c*(1-Math.abs(e%2-1));let u=0;let d=0;let l=0;if(e>=0&&e<1){u=c;d=s}else if(e>=1&&e<2){u=s;d=c}else if(e>=2&&e<3){d=c;l=s}else if(e>=3&&e<4){d=s;l=c}else if(e>=4&&e<5){u=s;l=c}else if(e>=5&&e<6){u=c;l=s}const a=r-c/2;const i=u+a;const _=d+a;const p=l+a;return[i,_,p].map(k)};function x(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,r,e]=l(o);return.2126*t(n)+.7152*t(r)+.0722*t(e)}function $(o,t,n,r){return`rgba(${s(0,255,o).toFixed()}, ${s(0,255,t).toFixed()}, ${s(0,255,n).toFixed()}, ${parseFloat(s(0,1,r).toFixed(3))})`}function w(o,t,n){const r=(o,t)=>t===3?o:o/255;const[e,c,s,u]=l(o).map(r);const[d,a,i,_]=l(t).map(r);const p=_-u;const f=n*2-1;const b=f*p===-1?f:f+p/(1+f*p);const g=(b+1)/2;const m=1-g;const h=(e*m+d*g)*255;const y=(c*m+a*g)*255;const k=(s*m+i*g)*255;const z=_*n+u*(1-n);return $(h,y,k,z)}function j(o){return x(o)>.179}function v(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 q(o,t){return o+t-o*t}function M(o,t){return C(t,o)}function C(o,t){return t<=.5?F(o,2*t):q(o,2*t-1)}function S(o,t,n){return Math.min(Math.max(o||0,t),n)}function A(o){return{r:S(o.r,0,255),g:S(o.g,0,255),b:S(o.b,0,255),a:S(o.a,0,1)}}function I(o){return{r:255*o.r,g:255*o.g,b:255*o.b,a:o.a}}function O(o){return{r:o.r/255,g:o.g/255,b:o.b/255,a:o.a}}function B(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 R(o,t,n,r,e,c){return(1-t/n)*r+t/n*Math.round((1-o)*e+o*c)}function X(o,t,n,r,e){void 0===e&&(e={unitInput:!1,unitOutput:!1,roundOutput:!0}),e.unitInput&&(o=I(o),t=I(t)),o=A(o);var c=(t=A(t)).a+o.a-t.a*o.a,s=n(o,t,r),u=A({r:R(o.a,t.a,c,o.r,t.r,s.r),g:R(o.a,t.a,c,o.g,t.g,s.g),b:R(o.a,t.a,c,o.b,t.b,s.b),a:c});return u=e.unitOutput?O(u):e.roundOutput?B(u):function(o){return B(o,9)}(u),u}function L(o,t){return X(o,t,v,M)}const E=o=>{const t=(new Option).style;t.color=o;return t.color!==""};const P=o=>o.replace(/([a-z0–9])([A-Z])/g,"$1-$2").toLowerCase();const D=(o,t)=>{let n={};for(const r in t){const e=`${o}-${P(r)}`;if(typeof t[r]==="object"&&t[r]!==null){n=Object.assign(Object.assign({},n),D(e,t[r]))}else{n[e]=t[r]}}return n};const N=o=>D("--cpsl-color",o);const U=(o,t)=>{const n=l(o);const r=l(t);const e=L({r:n[0],g:n[1],b:n[2],a:.1},{r:r[0],g:r[1],b:r[2],a:r[3]});return $(e.r,e.g,e.b,e.a)};const Z=({foregroundColor:r,backgroundColor:e,customPalette:c})=>{if(!Boolean(r)||!E(r)){r=o.foregroundColor}if(!Boolean(e)||!E(e)){e=o.backgroundColor}const s=!j(e);const u={foregroundColors:[],backgroundColors:[],isDarkBackground:s};const d=s?"#FFFFFF":"#000000";const l=s?"#000000":"#FFFFFF";t.forEach((o=>{u.foregroundColors.push(w(r,l,o));u.backgroundColors.push(w(e,d,o))}));document.documentElement.style.setProperty("--cpsl-color-background-0",u.backgroundColors[0]);document.documentElement.style.setProperty("--cpsl-color-background-4",u.backgroundColors[1]);document.documentElement.style.setProperty("--cpsl-color-background-8",u.backgroundColors[2]);document.documentElement.style.setProperty("--cpsl-color-background-16",u.backgroundColors[3]);document.documentElement.style.setProperty("--cpsl-color-background-32",u.backgroundColors[4]);document.documentElement.style.setProperty("--cpsl-color-background-48",u.backgroundColors[5]);document.documentElement.style.setProperty("--cpsl-color-background-64",u.backgroundColors[6]);document.documentElement.style.setProperty("--cpsl-color-background-80",u.backgroundColors[7]);document.documentElement.style.setProperty("--cpsl-color-background-96",u.backgroundColors[8]);document.documentElement.style.setProperty("--cpsl-color-foreground-0",u.foregroundColors[0]);document.documentElement.style.setProperty("--cpsl-color-foreground-4",u.foregroundColors[1]);document.documentElement.style.setProperty("--cpsl-color-foreground-8",u.foregroundColors[2]);document.documentElement.style.setProperty("--cpsl-color-foreground-16",u.foregroundColors[3]);document.documentElement.style.setProperty("--cpsl-color-foreground-32",u.foregroundColors[4]);document.documentElement.style.setProperty("--cpsl-color-foreground-48",u.foregroundColors[5]);document.documentElement.style.setProperty("--cpsl-color-foreground-64",u.foregroundColors[6]);document.documentElement.style.setProperty("--cpsl-color-foreground-80",u.foregroundColors[7]);document.documentElement.style.setProperty("--cpsl-color-foreground-96",u.foregroundColors[8]);const a="#FFFFFF";const i=.72;const _=U(r,n.red);const p=U(r,n.yellow);const f=U(r,n.green);document.documentElement.style.setProperty("--cpsl-color-utility-red",_);document.documentElement.style.setProperty("--cpsl-color-utility-yellow",p);document.documentElement.style.setProperty("--cpsl-color-utility-green",f);document.documentElement.style.setProperty("--cpsl-color-utility-red-light",w(_,a,i));document.documentElement.style.setProperty("--cpsl-color-utility-yellow-light",w(p,a,i));document.documentElement.style.setProperty("--cpsl-color-utility-green-light",w(f,a,i));if(Boolean(c)){const o=N(c);Object.entries(o).forEach((([o,t])=>document.documentElement.style.setProperty(o,t)))}return u};const G=({foregroundColor:t=o.foregroundColor,backgroundColor:n=o.backgroundColor,font:e,customPalette:s,borderRadius:u,customFontSizes:d})=>{const l=Z({foregroundColor:t,backgroundColor:n,customPalette:s});c({font:e,customFontSizes:d});r({borderRadius:u});return l.isDarkBackground};export{G as generateTheme};
1
+ import{D as o,C as t,U as n}from"./p-f2393be6.js";function r(o,t,n){return Math.min(Math.max(o,n),t)}class e extends Error{constructor(o){super(`Failed to parse color: "${o}"`)}}var c=e;function s(o){if(typeof o!=="string")throw new c(o);if(o.trim().toLowerCase()==="transparent")return[0,0,0,0];let t=o.trim();t=g.test(o)?a(o):o;const n=_.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 e=p.exec(t);if(e){const o=Array.from(e).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,e,s]=Array.from(u).slice(1).map(parseFloat);if(r(0,100,n)!==n)throw new c(o);if(r(0,100,e)!==e)throw new c(o);return[...h(t,n,e),Number.isNaN(s)?1:s]}throw new c(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 r=d(t.substring(3)).toString(16);let e="";for(let o=0;o<6-r.length;o++){e+="0"}o[n]=`${e}${r}`;return o}),{});function a(o){const t=o.toLowerCase().trim();const n=l[u(t)];if(!n)throw new c(o);return`#${n}`}const i=(o,t)=>Array.from(Array(t)).map((()=>o)).join("");const _=new RegExp(`^#${i("([a-f0-9])",3)}([a-f0-9])?$`,"i");const p=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 g=/^[a-z]+$/i;const m=o=>Math.round(o*255);const h=(o,t,n)=>{let r=n/100;if(t===0){return[r,r,r].map(m)}const e=(o%360+360)%360/60;const c=(1-Math.abs(2*r-1))*(t/100);const s=c*(1-Math.abs(e%2-1));let u=0;let d=0;let l=0;if(e>=0&&e<1){u=c;d=s}else if(e>=1&&e<2){u=s;d=c}else if(e>=2&&e<3){d=c;l=s}else if(e>=3&&e<4){d=s;l=c}else if(e>=4&&e<5){u=s;l=c}else if(e>=5&&e<6){u=c;l=s}const a=r-c/2;const i=u+a;const _=d+a;const p=l+a;return[i,_,p].map(m)};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,r,e]=s(o);return.2126*t(n)+.7152*t(r)+.0722*t(e)}function k(o,t,n,e){return`rgba(${r(0,255,o).toFixed()}, ${r(0,255,t).toFixed()}, ${r(0,255,n).toFixed()}, ${parseFloat(r(0,1,e).toFixed(3))})`}function z(o,t,n){const r=(o,t)=>t===3?o:o/255;const[e,c,u,d]=s(o).map(r);const[l,a,i,_]=s(t).map(r);const p=_-d;const f=n*2-1;const b=f*p===-1?f:f+p/(1+f*p);const g=(b+1)/2;const m=1-g;const h=(e*m+l*g)*255;const y=(c*m+a*g)*255;const z=(u*m+i*g)*255;const x=_*n+d*(1-n);return k(h,y,z,x)}function x(o){return y(o)>.179}function $(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 w(o,t){return o*t}function j(o,t){return o+t-o*t}function v(o,t){return F(t,o)}function F(o,t){return t<=.5?w(o,2*t):j(o,2*t-1)}function q(o,t,n){return Math.min(Math.max(o||0,t),n)}function M(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 B(o){return{r:255*o.r,g:255*o.g,b:255*o.b,a:o.a}}function C(o){return{r:o.r/255,g:o.g/255,b:o.b/255,a:o.a}}function R(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 O(o,t,n,r,e,c){return(1-t/n)*r+t/n*Math.round((1-o)*e+o*c)}function S(o,t,n,r,e){void 0===e&&(e={unitInput:!1,unitOutput:!1,roundOutput:!0}),e.unitInput&&(o=B(o),t=B(t)),o=M(o);var c=(t=M(t)).a+o.a-t.a*o.a,s=n(o,t,r),u=M({r:O(o.a,t.a,c,o.r,t.r,s.r),g:O(o.a,t.a,c,o.g,t.g,s.g),b:O(o.a,t.a,c,o.b,t.b,s.b),a:c});return u=e.unitOutput?C(u):e.roundOutput?R(u):function(o){return R(o,9)}(u),u}function A(o,t){return S(o,t,$,v)}const I=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 n={};for(const r in t){const e=`${o}-${X(r)}`;if(typeof t[r]==="object"&&t[r]!==null){n=Object.assign(Object.assign({},n),L(e,t[r]))}else{n[e]=t[r]}}return n};const E=o=>L("--cpsl-color",o);const P=o=>L("--cpsl-border-radius",o);const D=(o,t)=>{const n=s(o);const r=s(t);const e=A({r:n[0],g:n[1],b:n[2],a:.1},{r:r[0],g:r[1],b:r[2],a:r[3]});return k(e.r,e.g,e.b,e.a)};const N=({borderRadius:o,customBorderRadii:t})=>{let n,r,e=4;const c=1e3;let s=false;let u=false;switch(o){case"none":{u=true;n=0;r=0;e=0;break}case"xs":{n=2;r=4;e=2;break}case"sm":{n=4;r=8;break}case"md":{n=8;r=16;break}case"xl":{n=16;r=32;break}case"full":{n=24;r=32;s=true;break}default:case"lg":{n=12;r=24;break}}document.documentElement.style.setProperty("--cpsl-border-radius-input",`${s?c:n}px`);document.documentElement.style.setProperty("--cpsl-border-radius-select",`${s?c:n}px`);document.documentElement.style.setProperty("--cpsl-border-radius-file",`${s?c:n}px`);document.documentElement.style.setProperty("--cpsl-border-radius-alert",`${s?c:n}px`);document.documentElement.style.setProperty("--cpsl-border-radius-tabs",`${s?c:n}px`);document.documentElement.style.setProperty("--cpsl-border-radius-primary-button",`${s?c:n}px`);document.documentElement.style.setProperty("--cpsl-border-radius-secondary-button",`${s?c:n}px`);document.documentElement.style.setProperty("--cpsl-border-radius-destructive-button",`${s?c:n}px`);document.documentElement.style.setProperty("--cpsl-border-radius-tile-button",`${n}px`);document.documentElement.style.setProperty("--cpsl-border-radius-qr-code",`${n}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",`${r}px`);document.documentElement.style.setProperty("--cpsl-border-radius-modal",`${r}px`);document.documentElement.style.setProperty("--cpsl-border-radius-checkbox",`${e}px`);document.documentElement.style.setProperty("--cpsl-border-radius-switch",`${u?0:c}px`);document.documentElement.style.setProperty("--cpsl-border-radius-pill",`${u?0:c}px`);document.documentElement.style.setProperty("--cpsl-border-radius-radio",`${c}px`);if(Boolean(t)){const o=P(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(Boolean(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:r,backgroundColor:e,customPalette:c})=>{if(!Boolean(r)||!I(r)){r=o.foregroundColor}if(!Boolean(e)||!I(e)){e=o.backgroundColor}const s=!x(e);const u={foregroundColors:[],backgroundColors:[],isDarkBackground:s};const d=s?"#FFFFFF":"#000000";const l=s?"#000000":"#FFFFFF";t.forEach((o=>{u.foregroundColors.push(z(r,l,o));u.backgroundColors.push(z(e,d,o))}));document.documentElement.style.setProperty("--cpsl-color-background-0",u.backgroundColors[0]);document.documentElement.style.setProperty("--cpsl-color-background-4",u.backgroundColors[1]);document.documentElement.style.setProperty("--cpsl-color-background-8",u.backgroundColors[2]);document.documentElement.style.setProperty("--cpsl-color-background-16",u.backgroundColors[3]);document.documentElement.style.setProperty("--cpsl-color-background-32",u.backgroundColors[4]);document.documentElement.style.setProperty("--cpsl-color-background-48",u.backgroundColors[5]);document.documentElement.style.setProperty("--cpsl-color-background-64",u.backgroundColors[6]);document.documentElement.style.setProperty("--cpsl-color-background-80",u.backgroundColors[7]);document.documentElement.style.setProperty("--cpsl-color-background-96",u.backgroundColors[8]);document.documentElement.style.setProperty("--cpsl-color-foreground-0",u.foregroundColors[0]);document.documentElement.style.setProperty("--cpsl-color-foreground-4",u.foregroundColors[1]);document.documentElement.style.setProperty("--cpsl-color-foreground-8",u.foregroundColors[2]);document.documentElement.style.setProperty("--cpsl-color-foreground-16",u.foregroundColors[3]);document.documentElement.style.setProperty("--cpsl-color-foreground-32",u.foregroundColors[4]);document.documentElement.style.setProperty("--cpsl-color-foreground-48",u.foregroundColors[5]);document.documentElement.style.setProperty("--cpsl-color-foreground-64",u.foregroundColors[6]);document.documentElement.style.setProperty("--cpsl-color-foreground-80",u.foregroundColors[7]);document.documentElement.style.setProperty("--cpsl-color-foreground-96",u.foregroundColors[8]);const a="#FFFFFF";const i=.72;const _=D(r,n.red);const p=D(r,n.yellow);const f=D(r,n.green);document.documentElement.style.setProperty("--cpsl-color-utility-red",_);document.documentElement.style.setProperty("--cpsl-color-utility-yellow",p);document.documentElement.style.setProperty("--cpsl-color-utility-green",f);document.documentElement.style.setProperty("--cpsl-color-utility-red-light",z(_,a,i));document.documentElement.style.setProperty("--cpsl-color-utility-yellow-light",z(p,a,i));document.documentElement.style.setProperty("--cpsl-color-utility-green-light",z(f,a,i));if(Boolean(c)){const o=E(c);Object.entries(o).forEach((([o,t])=>document.documentElement.style.setProperty(o,t)))}return u};const H=({foregroundColor:t=o.foregroundColor,backgroundColor:n=o.backgroundColor,font:r,customPalette:e,borderRadius:c,customFontSizes:s,customBorderRadii:u})=>{const d=G({foregroundColor:t,backgroundColor:n,customPalette:e});Z({font:r,customFontSizes:s});N({borderRadius:c,customBorderRadii:u});return d.isDarkBackground};export{H as generateTheme};
2
2
  //# sourceMappingURL=index.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["generateBorderRadii","borderRadius","Boolean","xSmallRadius","smallRadius","mediumRadius","largeRadius","fullRadius","isFull","isNone","document","documentElement","style","setProperty","FONT_NAME_MAP","body2XS","bodyXS","bodyS","bodyM","bodyL","bodyXL","headingXS","headingS","headingM","headingL","headingXL","heading2XL","generateFont","font","customFontSizes","Object","entries","forEach","key","value","removeProperty","guard","low","high","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","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","toKebabCase","pascal","buildVars","prev","obj","resp","k","name","assign","getCssColors","customPalette","overlayMix","baseColor","overlayColor","baseRGBA","overlayRGBA","finalRGBA","overlay","generatePalette","foregroundColor","backgroundColor","DEFAULT_THEME","isDarkBackground","palette","foregroundColors","backgroundColors","backgroundMixColor","foregroundMixColor","COLOR_MIXES","push","utilityLightMixColor","utilityLightMixValue","UTILITY_COLORS","yellow","cssColorVars","generateTheme"],"sources":["src/utils/theme/generateBorderRadii.ts","src/utils/theme/generateFont.ts","../node_modules/color2k/dist/index.module.es.js","../node_modules/color-blend/dist/index.modern.js","src/utils/theme/utils.ts","src/utils/theme/generatePalette.ts","src/utils/theme/generateTheme.ts"],"sourcesContent":["import { Theme } from '../../interface';\n\nexport const generateBorderRadii = ({ borderRadius }: Pick<Theme, 'borderRadius'>) => {\n if (!Boolean(borderRadius)) {\n return;\n }\n\n let xSmallRadius: number, smallRadius: number, mediumRadius: number, largeRadius: number;\n const fullRadius = 1000;\n let isFull = false;\n let isNone = false;\n\n switch (borderRadius) {\n case 'none': {\n isNone = true;\n xSmallRadius = 0;\n smallRadius = 0;\n mediumRadius = 0;\n largeRadius = 0;\n break;\n }\n case 'xs': {\n xSmallRadius = 2;\n smallRadius = 4;\n mediumRadius = 12;\n largeRadius = 20;\n break;\n }\n case 'sm': {\n xSmallRadius = 2;\n smallRadius = 8;\n mediumRadius = 16;\n largeRadius = 24;\n break;\n }\n case 'lg': {\n xSmallRadius = 8;\n smallRadius = 16;\n mediumRadius = 24;\n largeRadius = 32;\n break;\n }\n case 'full': {\n xSmallRadius = 8;\n smallRadius = 16;\n mediumRadius = 24;\n largeRadius = 32;\n isFull = true;\n break;\n }\n default:\n case 'md': {\n xSmallRadius = 4;\n smallRadius = 12;\n mediumRadius = 20;\n largeRadius = 28;\n break;\n }\n }\n\n document.documentElement.style.setProperty('--cpsl-border-radius-input', `${isFull ? fullRadius : smallRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-select', `${isFull ? fullRadius : smallRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-file', `${isFull ? fullRadius : smallRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-alert', `${smallRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-tabs', `${isFull ? fullRadius : smallRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-primary-button', `${isFull ? fullRadius : smallRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-secondary-button', `${isFull ? fullRadius : smallRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-destructive-button', `${isFull ? fullRadius : smallRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-tile-button', `${smallRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-modal', `${mediumRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-pill', `${isNone ? 0 : fullRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-qr-code', `${largeRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-info-box', `${smallRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-table-container', `${mediumRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-switch', `${isNone ? 0 : fullRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-checkbox', `${xSmallRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-radio', `${fullRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-avatar', `${smallRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-card', `${mediumRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-button-group', `${xSmallRadius}px`);\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 (Boolean(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","/**\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 { 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);\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 { 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 isDarkBackground: boolean;\n};\n\nexport const generatePalette = ({ foregroundColor, backgroundColor, customPalette }: Pick<Theme, 'foregroundColor' | 'backgroundColor' | 'customPalette'>): Palette => {\n if (!Boolean(foregroundColor) || !isColor(foregroundColor)) {\n foregroundColor = DEFAULT_THEME.foregroundColor;\n }\n if (!Boolean(backgroundColor) || !isColor(backgroundColor)) {\n backgroundColor = DEFAULT_THEME.backgroundColor;\n }\n\n const isDarkBackground = !readableColorIsBlack(backgroundColor);\n\n const palette: Palette = {\n foregroundColors: [],\n backgroundColors: [],\n isDarkBackground,\n };\n\n const backgroundMixColor = isDarkBackground ? '#FFFFFF' : '#000000';\n const foregroundMixColor = isDarkBackground ? '#000000' : '#FFFFFF';\n\n COLOR_MIXES.forEach(value => {\n palette.foregroundColors.push(mix(foregroundColor, foregroundMixColor, value));\n palette.backgroundColors.push(mix(backgroundColor, backgroundMixColor, 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 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 (Boolean(customPalette)) {\n const cssColorVars = getCssColors(customPalette);\n Object.entries(cssColorVars).forEach(([k, v]) => document.documentElement.style.setProperty(k, v));\n }\n\n return palette;\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 font,\n customPalette,\n borderRadius,\n customFontSizes,\n}: Theme): boolean => {\n const palette = generatePalette({ foregroundColor, backgroundColor, customPalette });\n\n generateFont({ font, customFontSizes });\n\n generateBorderRadii({ borderRadius });\n\n return palette.isDarkBackground;\n};\n"],"mappings":"kDAEO,MAAMA,EAAsB,EAAGC,mBACpC,IAAKC,QAAQD,GAAe,CAC1B,M,CAGF,IAAIE,EAAsBC,EAAqBC,EAAsBC,EACrE,MAAMC,EAAa,IACnB,IAAIC,EAAS,MACb,IAAIC,EAAS,MAEb,OAAQR,GACN,IAAK,OAAQ,CACXQ,EAAS,KACTN,EAAe,EACfC,EAAc,EACdC,EAAe,EACfC,EAAc,EACd,K,CAEF,IAAK,KAAM,CACTH,EAAe,EACfC,EAAc,EACdC,EAAe,GACfC,EAAc,GACd,K,CAEF,IAAK,KAAM,CACTH,EA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gBC,MAAMC,YAAY,8BAA+ByL,GAC1E5L,SAASC,gBAAgBC,MAAMC,YAAY,6BAA8BkG,GACzErG,SAASC,gBAAgBC,MAAMC,YAAY,iCAAkCiH,EAAIhB,EAAKqF,EAAsBC,IAC5G1L,SAASC,gBAAgBC,MAAMC,YAAY,oCAAqCiH,EAAIwE,EAAQH,EAAsBC,IAClH1L,SAASC,gBAAgBC,MAAMC,YAAY,mCAAoCiH,EAAIf,EAAOoF,EAAsBC,IAEhH,GAAIlM,QAAQ6K,GAAgB,CAC1B,MAAMwB,EAAezB,EAAaC,GAClCjJ,OAAOC,QAAQwK,GAAcvK,SAAQ,EAAE2I,EAAGlB,KAAO/I,SAASC,gBAAgBC,MAAMC,YAAY8J,EAAGlB,I,CAGjG,OAAOmC,CAAO,E,MCjEHY,EAAgB,EAC3BhB,kBAAkBE,EAAcF,gBAChCC,kBAAkBC,EAAcD,gBAChC7J,OACAmJ,gBACA9K,eACA4B,sBAEA,MAAM+J,EAAUL,EAAgB,CAAEC,kBAAiBC,kBAAiBV,kBAEpEpJ,EAAa,CAAEC,OAAMC,oBAErB7B,EAAoB,CAAEC,iBAEtB,OAAO2L,EAAQD,gBAAgB,S"}
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","Boolean","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","DEFAULT_THEME","isDarkBackground","palette","foregroundColors","backgroundColors","backgroundMixColor","foregroundMixColor","COLOR_MIXES","push","utilityLightMixColor","utilityLightMixValue","UTILITY_COLORS","yellow","cssColorVars","generateTheme"],"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', `${isFull ? fullRadius : mediumRadius}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-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', `${mediumRadius}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 (Boolean(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 (Boolean(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 isDarkBackground: boolean;\n};\n\nexport const generatePalette = ({ foregroundColor, backgroundColor, customPalette }: Pick<Theme, 'foregroundColor' | 'backgroundColor' | 'customPalette'>): Palette => {\n if (!Boolean(foregroundColor) || !isColor(foregroundColor)) {\n foregroundColor = DEFAULT_THEME.foregroundColor;\n }\n if (!Boolean(backgroundColor) || !isColor(backgroundColor)) {\n backgroundColor = DEFAULT_THEME.backgroundColor;\n }\n\n const isDarkBackground = !readableColorIsBlack(backgroundColor);\n\n const palette: Palette = {\n foregroundColors: [],\n backgroundColors: [],\n isDarkBackground,\n };\n\n const backgroundMixColor = isDarkBackground ? '#FFFFFF' : '#000000';\n const foregroundMixColor = isDarkBackground ? '#000000' : '#FFFFFF';\n\n COLOR_MIXES.forEach(value => {\n palette.foregroundColors.push(mix(foregroundColor, foregroundMixColor, value));\n palette.backgroundColors.push(mix(backgroundColor, backgroundMixColor, 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 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 (Boolean(customPalette)) {\n const cssColorVars = getCssColors(customPalette);\n Object.entries(cssColorVars).forEach(([k, v]) => document.documentElement.style.setProperty(k, v));\n }\n\n return palette;\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 font,\n customPalette,\n borderRadius,\n customFontSizes,\n customBorderRadii,\n}: Theme): boolean => {\n const palette = generatePalette({ foregroundColor, backgroundColor, customPalette });\n\n generateFont({ font, customFontSizes });\n\n generateBorderRadii({ borderRadius, customBorderRadii });\n\n return palette.isDarkBackground;\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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