@rededor/cura 1.6.1-alpha.9 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/assets/icons/iconset-default-list.ts +1 -1
- package/dist/assets/assets/icons/iconset-default-tmp.svg +4 -0
- package/dist/assets/assets/icons/iconset-default.svg +1 -1
- package/dist/cjs/{app-globals-28c6f5c4.js → app-globals-6d5b51b6.js} +2 -2
- package/dist/cjs/{app-globals-28c6f5c4.js.map → app-globals-6d5b51b6.js.map} +1 -1
- package/dist/cjs/{cura-accordion_18.cjs.entry.js → cura-accordion_20.cjs.entry.js} +147 -7
- package/dist/cjs/cura-accordion_20.cjs.entry.js.map +1 -0
- package/dist/cjs/cura-display.cjs.entry.js +1 -1
- package/dist/cjs/cura-icons-view.cjs.entry.js +1 -1
- package/dist/cjs/cura-icons-view.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-modal.cjs.entry.js +3 -3
- package/dist/cjs/cura-modal.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-tabs-button.cjs.entry.js +106 -0
- package/dist/cjs/cura-tabs-button.cjs.entry.js.map +1 -0
- package/dist/cjs/cura-tabs-transparent.cjs.entry.js +105 -0
- package/dist/cjs/cura-tabs-transparent.cjs.entry.js.map +1 -0
- package/dist/cjs/cura-tabs.definitions-b8955ad4.js +12 -0
- package/dist/cjs/cura-tabs.definitions-b8955ad4.js.map +1 -0
- package/dist/cjs/{cura-theme-module-f1e4a309.js → cura-theme-module-09bb63a4.js} +32 -1
- package/dist/cjs/cura-theme-module-09bb63a4.js.map +1 -0
- package/dist/cjs/cura.cjs.js +3 -3
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/collection/api/theme-presets/theme-perinatal-temporary.js +32 -0
- package/dist/collection/api/theme-presets/theme-perinatal-temporary.js.map +1 -0
- package/dist/collection/api/theme-presets/theme-presets.js +2 -0
- package/dist/collection/api/theme-presets/theme-presets.js.map +1 -1
- package/dist/collection/assets/icons/iconset-default-list.js +1 -1
- package/dist/collection/assets/icons/iconset-default-list.js.map +1 -1
- package/dist/collection/assets/icons/iconset-default-tmp.svg +4 -0
- package/dist/collection/assets/icons/iconset-default.svg +1 -1
- package/dist/collection/assets-raw/icons/default/vaccine.svg +3 -0
- package/dist/collection/collection-manifest.json +4 -0
- package/dist/collection/components/cura-modal/cura-modal.css +1 -1
- package/dist/collection/components/cura-modal/cura-modal.js +2 -2
- package/dist/collection/components/cura-modal/cura-modal.js.map +1 -1
- package/dist/collection/components/forms/cura-input-text/cura-input-text.js +1 -1
- package/dist/collection/components/forms/cura-select/cura-select.css +1 -1
- package/dist/collection/components/forms/cura-select/cura-select.js +22 -3
- package/dist/collection/components/forms/cura-select/cura-select.js.map +1 -1
- package/dist/collection/components/forms/cura-select/cura-select.stories.js +12 -0
- package/dist/collection/components/forms/cura-select/cura-select.stories.js.map +1 -1
- package/dist/collection/components/tabs/cura-tabs/cura-tabs.css +170 -0
- package/dist/collection/components/tabs/cura-tabs/cura-tabs.js +263 -0
- package/dist/collection/components/tabs/cura-tabs/cura-tabs.js.map +1 -0
- package/dist/collection/components/tabs/cura-tabs/cura-tabs.stories.js +89 -0
- package/dist/collection/components/tabs/cura-tabs/cura-tabs.stories.js.map +1 -0
- package/dist/collection/components/tabs/cura-tabs-button/cura-tabs-button.css +176 -0
- package/dist/collection/components/tabs/cura-tabs-button/cura-tabs-button.js +259 -0
- package/dist/collection/components/tabs/cura-tabs-button/cura-tabs-button.js.map +1 -0
- package/dist/collection/components/tabs/cura-tabs-button/cura-tabs-button.stories.js +96 -0
- package/dist/collection/components/tabs/cura-tabs-button/cura-tabs-button.stories.js.map +1 -0
- package/dist/collection/components/tabs/cura-tabs-group/cura-tabs-group.css +25 -0
- package/dist/collection/components/tabs/cura-tabs-group/cura-tabs-group.js +133 -0
- package/dist/collection/components/tabs/cura-tabs-group/cura-tabs-group.js.map +1 -0
- package/dist/collection/components/tabs/cura-tabs-group/cura-tabs-group.stories.js +65 -0
- package/dist/collection/components/tabs/cura-tabs-group/cura-tabs-group.stories.js.map +1 -0
- package/dist/collection/components/tabs/cura-tabs-transparent/cura-tabs-transparent.css +168 -0
- package/dist/collection/components/tabs/cura-tabs-transparent/cura-tabs-transparent.js +258 -0
- package/dist/collection/components/tabs/cura-tabs-transparent/cura-tabs-transparent.js.map +1 -0
- package/dist/collection/components/tabs/cura-tabs-transparent/cura-tabs-transparent.stories.js +89 -0
- package/dist/collection/components/tabs/cura-tabs-transparent/cura-tabs-transparent.stories.js.map +1 -0
- package/dist/collection/components/tabs/cura-tabs.definitions.js +7 -0
- package/dist/collection/components/tabs/cura-tabs.definitions.js.map +1 -0
- package/dist/collection/components/text/cura-display/cura-display.js +1 -1
- package/dist/collection/components/text/cura-heading/cura-heading.js +1 -1
- package/dist/collection/components/text/cura-paragraph/cura-paragraph.js +1 -1
- package/dist/components/cura-display.js +1 -1
- package/dist/components/cura-heading2.js +1 -1
- package/dist/components/cura-icons-view.js +1 -1
- package/dist/components/cura-icons-view.js.map +1 -1
- package/dist/components/cura-modal.js +3 -3
- package/dist/components/cura-modal.js.map +1 -1
- package/dist/components/cura-paragraph2.js +1 -1
- package/dist/components/cura-select2.js +6 -4
- package/dist/components/cura-select2.js.map +1 -1
- package/dist/components/cura-tabs-button.d.ts +11 -0
- package/dist/components/cura-tabs-button.js +150 -0
- package/dist/components/cura-tabs-button.js.map +1 -0
- package/dist/components/cura-tabs-group.d.ts +11 -0
- package/dist/components/cura-tabs-group.js +64 -0
- package/dist/components/cura-tabs-group.js.map +1 -0
- package/dist/components/cura-tabs-transparent.d.ts +11 -0
- package/dist/components/cura-tabs-transparent.js +143 -0
- package/dist/components/cura-tabs-transparent.js.map +1 -0
- package/dist/components/cura-tabs.d.ts +11 -0
- package/dist/components/cura-tabs.definitions.js +10 -0
- package/dist/components/cura-tabs.definitions.js.map +1 -0
- package/dist/components/cura-tabs.js +148 -0
- package/dist/components/cura-tabs.js.map +1 -0
- package/dist/components/index.js +39 -0
- package/dist/components/index.js.map +1 -1
- package/dist/cura/cura.esm.js +1 -1
- package/dist/cura/cura.esm.js.map +1 -1
- package/dist/cura/index.esm.js +1 -1
- package/dist/cura/p-1ef21ae9.entry.js +2 -0
- package/dist/cura/p-1ef21ae9.entry.js.map +1 -0
- package/dist/cura/p-53c18ed4.js +2 -0
- package/dist/cura/p-53c18ed4.js.map +1 -0
- package/dist/cura/p-5c6f9593.entry.js +2 -0
- package/dist/cura/p-5c6f9593.entry.js.map +1 -0
- package/dist/cura/{p-0c25333f.js → p-6cbd49dd.js} +2 -2
- package/dist/cura/{p-0c25333f.js.map → p-6cbd49dd.js.map} +1 -1
- package/dist/cura/p-7e2d1229.entry.js +2 -0
- package/dist/cura/p-7e2d1229.entry.js.map +1 -0
- package/dist/cura/{p-ac01bec2.entry.js → p-8aade007.entry.js} +2 -2
- package/dist/cura/p-9f460031.js +2 -0
- package/dist/cura/p-9f460031.js.map +1 -0
- package/dist/cura/p-b4ee956b.entry.js +2 -0
- package/dist/cura/p-b4ee956b.entry.js.map +1 -0
- package/dist/cura/p-b6ff8ac1.entry.js +2 -0
- package/dist/cura/p-b6ff8ac1.entry.js.map +1 -0
- package/dist/esm/{app-globals-ca1945d1.js → app-globals-c2abb41c.js} +2 -2
- package/dist/esm/{app-globals-ca1945d1.js.map → app-globals-c2abb41c.js.map} +1 -1
- package/dist/esm/{cura-accordion_18.entry.js → cura-accordion_20.entry.js} +146 -8
- package/dist/esm/cura-accordion_20.entry.js.map +1 -0
- package/dist/esm/cura-display.entry.js +1 -1
- package/dist/esm/cura-icons-view.entry.js +1 -1
- package/dist/esm/cura-icons-view.entry.js.map +1 -1
- package/dist/esm/cura-modal.entry.js +3 -3
- package/dist/esm/cura-modal.entry.js.map +1 -1
- package/dist/esm/cura-tabs-button.entry.js +102 -0
- package/dist/esm/cura-tabs-button.entry.js.map +1 -0
- package/dist/esm/cura-tabs-transparent.entry.js +101 -0
- package/dist/esm/cura-tabs-transparent.entry.js.map +1 -0
- package/dist/esm/cura-tabs.definitions-a017126e.js +10 -0
- package/dist/esm/cura-tabs.definitions-a017126e.js.map +1 -0
- package/dist/esm/{cura-theme-module-0fa5ee0b.js → cura-theme-module-bf286f68.js} +32 -1
- package/dist/esm/cura-theme-module-bf286f68.js.map +1 -0
- package/dist/esm/cura.js +3 -3
- package/dist/esm/index.js +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/types/api/theme-presets/theme-perinatal-temporary.d.ts +43 -0
- package/dist/types/api/theme-presets/theme-presets.d.ts +43 -0
- package/dist/types/components/forms/cura-select/cura-select.d.ts +6 -0
- package/dist/types/components/forms/cura-select/cura-select.stories.d.ts +11 -0
- package/dist/types/components/tabs/cura-tabs/cura-tabs.d.ts +30 -0
- package/dist/types/components/tabs/cura-tabs/cura-tabs.stories.d.ts +99 -0
- package/dist/types/components/tabs/cura-tabs-button/cura-tabs-button.d.ts +29 -0
- package/dist/types/components/tabs/cura-tabs-button/cura-tabs-button.stories.d.ts +99 -0
- package/dist/types/components/tabs/cura-tabs-group/cura-tabs-group.d.ts +18 -0
- package/dist/types/components/tabs/cura-tabs-group/cura-tabs-group.stories.d.ts +57 -0
- package/dist/types/components/tabs/cura-tabs-transparent/cura-tabs-transparent.d.ts +29 -0
- package/dist/types/components/tabs/cura-tabs-transparent/cura-tabs-transparent.stories.d.ts +99 -0
- package/dist/types/components/tabs/cura-tabs.definitions.d.ts +6 -0
- package/dist/types/components.d.ts +172 -0
- package/package.json +2 -2
- package/dist/cjs/cura-accordion_18.cjs.entry.js.map +0 -1
- package/dist/cjs/cura-theme-module-f1e4a309.js.map +0 -1
- package/dist/cura/p-07817634.entry.js +0 -2
- package/dist/cura/p-07817634.entry.js.map +0 -1
- package/dist/cura/p-9fce5ec5.entry.js +0 -2
- package/dist/cura/p-9fce5ec5.entry.js.map +0 -1
- package/dist/cura/p-b5d8a26b.entry.js +0 -2
- package/dist/cura/p-b5d8a26b.entry.js.map +0 -1
- package/dist/cura/p-bf8e2037.js +0 -2
- package/dist/cura/p-bf8e2037.js.map +0 -1
- package/dist/esm/cura-accordion_18.entry.js.map +0 -1
- package/dist/esm/cura-theme-module-0fa5ee0b.js.map +0 -1
- /package/dist/cura/{p-ac01bec2.entry.js.map → p-8aade007.entry.js.map} +0 -0
|
@@ -69,7 +69,7 @@ const CuraDisplay = class {
|
|
|
69
69
|
return tags[`${this.level}`] || tags['default'];
|
|
70
70
|
}
|
|
71
71
|
render() {
|
|
72
|
-
return (index.h(index.Host, { key: '
|
|
72
|
+
return (index.h(index.Host, { key: '264f7e93aac5ecb7a775c6e505f230518e3959f4', style: this.hostCSSProperties(), role: "heading", "aria-level": this.level }, this.getHeadingTag()));
|
|
73
73
|
}
|
|
74
74
|
get host() { return index.getElement(this); }
|
|
75
75
|
static get watchers() { return {
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-60783089.js');
|
|
6
6
|
const curaIcon_definitions = require('./cura-icon.definitions-5223028b.js');
|
|
7
7
|
|
|
8
|
-
const iconsetdefaulticons = ["360", "accessibility", "accessibility2", "accessibility3", "accessibility4", "addUser", "airdrop", "alertCircle", "alertTriangle", "arrowDown", "arrowDownCircle", "arrowLeft", "arrowLeftCircle", "arrowRight", "arrowRightCircle", "arrowUp", "arrowUpCircle", "attach", "avatarF", "avatarM", "biometry", "bloodGroup", "calendar", "cam", "camOff", "central", "chatCircle", "check", "checkBadge", "checkCircle", "checkDouble", "clock", "close", "closeCircle", "collapse", "config", "contacts", "currency", "delete", "desktop", "doc", "down", "download", "drug", "duplicate", "edit", "elevator", "exam", "examDoc", "expand", "facebook", "fileBmp", "fileJpg", "filePdf", "filePng", "fileUpload", "fileXls", "filter", "fullscreen", "gallery", "geotag", "geotagUnity", "geotagUnityGroup", "google", "graph", "healthPlan", "heart", "height", "height2", "home", "horizontalList", "imageUp", "infoCircle", "instagram", "key", "lamp", "language", "language2", "languageEN", "languagePT", "lattes", "left", "like", "link", "linkExternal", "linkedin", "list", "login", "logout", "mail", "maintenance", "medDoc", "medEspec", "medImg", "medUser", "medical", "menuHamburguer", "menuKebab", "menuMeatballs", "mic", "micOff", "minus", "minusCircle", "minusSquare", "mobile", "news", "notification", "npsDeslike", "npsHate", "npsLike", "npsLove", "npsNeutral", "order", "parking", "partner", "phone", "play", "plus", "plusCircle", "plusSquare", "print", "profile", "profileCircle", "questionCircle", "questionSquare", "range", "reload", "ribbon", "right", "schedule", "scheduleCancel", "scheduleCheck", "scheduleHistorico", "search", "secure", "share", "siren", "sound", "soundOff", "subItem", "swap", "target", "team", "telegram", "twitter", "unLink", "unSecure", "unity", "unlike", "up", "upload", "verticalList", "viewFalse", "viewTrue", "weight", "whatsapp", "wifi", "wifiOff", "youtube", "zoomIn", "zoomOut"];
|
|
8
|
+
const iconsetdefaulticons = ["360", "accessibility", "accessibility2", "accessibility3", "accessibility4", "addUser", "airdrop", "alertCircle", "alertTriangle", "arrowDown", "arrowDownCircle", "arrowLeft", "arrowLeftCircle", "arrowRight", "arrowRightCircle", "arrowUp", "arrowUpCircle", "attach", "avatarF", "avatarM", "biometry", "bloodGroup", "calendar", "cam", "camOff", "central", "chatCircle", "check", "checkBadge", "checkCircle", "checkDouble", "clock", "close", "closeCircle", "collapse", "config", "contacts", "currency", "delete", "desktop", "doc", "down", "download", "drug", "duplicate", "edit", "elevator", "exam", "examDoc", "expand", "facebook", "fileBmp", "fileJpg", "filePdf", "filePng", "fileUpload", "fileXls", "filter", "fullscreen", "gallery", "geotag", "geotagUnity", "geotagUnityGroup", "google", "graph", "healthPlan", "heart", "height", "height2", "home", "horizontalList", "imageUp", "infoCircle", "instagram", "key", "lamp", "language", "language2", "languageEN", "languagePT", "lattes", "left", "like", "link", "linkExternal", "linkedin", "list", "login", "logout", "mail", "maintenance", "medDoc", "medEspec", "medImg", "medUser", "medical", "menuHamburguer", "menuKebab", "menuMeatballs", "mic", "micOff", "minus", "minusCircle", "minusSquare", "mobile", "news", "notification", "npsDeslike", "npsHate", "npsLike", "npsLove", "npsNeutral", "order", "parking", "partner", "phone", "play", "plus", "plusCircle", "plusSquare", "print", "profile", "profileCircle", "questionCircle", "questionSquare", "range", "reload", "ribbon", "right", "schedule", "scheduleCancel", "scheduleCheck", "scheduleHistorico", "search", "secure", "share", "siren", "sound", "soundOff", "subItem", "swap", "target", "team", "telegram", "twitter", "unLink", "unSecure", "unity", "unlike", "up", "upload", "vaccine", "verticalList", "viewFalse", "viewTrue", "weight", "whatsapp", "wifi", "wifiOff", "youtube", "zoomIn", "zoomOut"];
|
|
9
9
|
|
|
10
10
|
const curaIconsViewCss = ":host{display:block;padding:24px;font-family:\"Roboto\", Arial, Helvetica, sans-serif}.iconDetail{display:block}.iconSizes{display:flex;align-items:center}.iconSizes .size{display:flex;flex-direction:column;text-align:center;align-items:center;margin-right:9px;padding:8px}.iconSizes .size:last-child{margin-right:0}.iconSizes .size span{font-size:10px;margin:8px 0}.iconSizes.invert{margin-top:12px}.iconSizes.invert .size{background-color:#2d2d2d;color:#F6F6F6;border-radius:3px}.icons{margin-top:28px;display:flex;flex-wrap:wrap;position:relative}.icons .icon{position:relative;padding:4px;cursor:pointer;opacity:0.6;transition:opacity 0.2s linear;width:105px;display:flex;flex-direction:column;text-align:center;align-items:center;margin-bottom:16px;box-sizing:border-box;}.icons .icon cura-label{margin-top:8px}.icons .icon cura-paragraph{margin-top:4px}";
|
|
11
11
|
const CuraIconsViewStyle0 = curaIconsViewCss;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"cura-icons-view.entry.cjs.js","mappings":";;;;;;;AAAA,4BAAe,CAAC,KAAK,EAAC,eAAe,EAAC,gBAAgB,EAAC,gBAAgB,EAAC,gBAAgB,EAAC,SAAS,EAAC,SAAS,EAAC,aAAa,EAAC,eAAe,EAAC,WAAW,EAAC,iBAAiB,EAAC,WAAW,EAAC,iBAAiB,EAAC,YAAY,EAAC,kBAAkB,EAAC,SAAS,EAAC,eAAe,EAA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MAAM,IACfA,uBAAW,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAC,eAAe,GAAa,EAC9EA,sBAAQ,IAAI,CAAS,CACjB,CACP,CACG,CACF,EACNA,kEAAK,KAAK,EAAC,OAAO,IACd,mBAAmB,CAAC,GAAG,CAAC,IAAI,IAC5BA,iBAAK,KAAK,EAAE,EAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,KAAK,IAAI,CAAC,QAAQ,EAAE,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAChGA,uBACE,IAAI,EAAE,IAAI,EACV,IAAI,EAAC,IAAI,EACT,KAAK,EAAE,IAAI,KAAK,IAAI,CAAC,QAAQ,GAAG,aAAa,GAAG,cAAc,GAAc,EAC9EA,wBACE,IAAI,EAAC,QAAQ,EACb,MAAM,EAAE,IAAI,KAAK,IAAI,CAAC,QAAQ,GAAG,MAAM,GAAG,SAAS,EACnD,KAAK,EAAE,IAAI,KAAK,IAAI,CAAC,QAAQ,GAAG,aAAa,GAAG,cAAc,IAAG,IAAI,CAAc,CACjF,CACP,CACG,CACD,EACP;KACH;;;;;;","names":["iconSizes","h","Host"],"sources":["src/assets/icons/iconset-default-list.ts","src/components/cura-icons-view/cura-icons-view.scss?tag=cura-icons-view&encapsulation=shadow","src/components/cura-icons-view/cura-icons-view.tsx"],"sourcesContent":["export default [\"360\",\"accessibility\",\"accessibility2\",\"accessibility3\",\"accessibility4\",\"addUser\",\"airdrop\",\"alertCircle\",\"alertTriangle\",\"arrowDown\",\"arrowDownCircle\",\"arrowLeft\",\"arrowLeftCircle\",\"arrowRight\",\"arrowRightCircle\",\"arrowUp\",\"arrowUpCircle\",\"attach\",\"avatarF\",\"avatarM\",\"biometry\",\"bloodGroup\",\"calendar\",\"cam\",\"camOff\",\"central\",\"chatCircle\",\"check\",\"checkBadge\",\"checkCircle\",\"checkDouble\",\"clock\",\"close\",\"closeCircle\",\"collapse\",\"config\",\"contacts\",\"currency\",\"delete\",\"desktop\",\"doc\",\"down\",\"download\",\"drug\",\"duplicate\",\"edit\",\"elevator\",\"exam\",\"examDoc\",\"expand\",\"facebook\",\"fileBmp\",\"fileJpg\",\"filePdf\",\"filePng\",\"fileUpload\",\"fileXls\",\"filter\",\"fullscreen\",\"gallery\",\"geotag\",\"geotagUnity\",\"geotagUnityGroup\",\"google\",\"graph\",\"healthPlan\",\"heart\",\"height\",\"height2\",\"home\",\"horizontalList\",\"imageUp\",\"infoCircle\",\"instagram\",\"key\",\"lamp\",\"language\",\"language2\",\"languageEN\",\"languagePT\",\"lattes\",\"left\",\"like\",\"link\",\"linkExternal\",\"linkedin\",\"list\",\"login\",\"logout\",\"mail\",\"maintenance\",\"medDoc\",\"medEspec\",\"medImg\",\"medUser\",\"medical\",\"menuHamburguer\",\"menuKebab\",\"menuMeatballs\",\"mic\",\"micOff\",\"minus\",\"minusCircle\",\"minusSquare\",\"mobile\",\"news\",\"notification\",\"npsDeslike\",\"npsHate\",\"npsLike\",\"npsLove\",\"npsNeutral\",\"order\",\"parking\",\"partner\",\"phone\",\"play\",\"plus\",\"plusCircle\",\"plusSquare\",\"print\",\"profile\",\"profileCircle\",\"questionCircle\",\"questionSquare\",\"range\",\"reload\",\"ribbon\",\"right\",\"schedule\",\"scheduleCancel\",\"scheduleCheck\",\"scheduleHistorico\",\"search\",\"secure\",\"share\",\"siren\",\"sound\",\"soundOff\",\"subItem\",\"swap\",\"target\",\"team\",\"telegram\",\"twitter\",\"unLink\",\"unSecure\",\"unity\",\"unlike\",\"up\",\"upload\",\"vaccine\",\"verticalList\",\"viewFalse\",\"viewTrue\",\"weight\",\"whatsapp\",\"wifi\",\"wifiOff\",\"youtube\",\"zoomIn\",\"zoomOut\"];",":host {\n display: block;\n padding: 24px;\n font-family: 'Roboto', Arial, Helvetica, sans-serif;\n}\n\n.iconDetail {\n display: block;\n}\n\n.iconSizes {\n display: flex;\n align-items: center;\n\n\n .size {\n display: flex;\n flex-direction: column;\n text-align: center;\n align-items: center;\n margin-right: 9px;\n padding: 8px;\n\n &:last-child { margin-right: 0; }\n span {\n font-size: 10px;\n margin: 8px 0;\n }\n }\n\n &.invert {\n margin-top: 12px;\n\n .size {\n background-color: #2d2d2d;\n color: #F6F6F6;\n border-radius: 3px;\n }\n }\n}\n\n.icons {\n margin-top: 28px;\n display: flex;\n flex-wrap: wrap;\n position: relative;\n\n .icon {\n position: relative;\n padding: 4px;\n cursor: pointer;\n opacity: .6;\n transition: opacity .2s linear;\n width: 105px;\n display: flex;\n flex-direction: column;\n text-align: center;\n align-items: center;\n margin-bottom: 16px;\n box-sizing: border-box;\n cura-label {\n margin-top: 8px;\n }\n cura-paragraph {\n margin-top: 4px;\n }\n /* &.selected {\n transform: scale(1.2);\n } */\n }\n}\n\n","import { Component, Host, h, State } from '@stencil/core';\nimport iconsetdefaulticons from '../../assets/icons/iconset-default-list';\nimport { iconSizes } from '../cura-icon/cura-icon.definitions';\n\n@Component({\n tag: 'cura-icons-view',\n styleUrl: 'cura-icons-view.scss',\n shadow: true,\n})\nexport class CuraIconsView {\n\n sizes = Object.keys(iconSizes).filter(key => key !== 'default');\n colors = ['primary', 'secondary', 'accent', 'info', 'warning', 'error', 'success', 'neutral'];\n @State() selected = iconsetdefaulticons[0];\n\n connectedCallback() {\n this.sizes.unshift(this.sizes.pop());\n }\n\n setSelected = (icon) => {\n this.selected = icon;\n }\n\n render() {\n return (\n <Host>\n <div class=\"iconDetail\">\n <cura-heading size=\"small\" margin-block=\"0 24px\">Icon: <b>{ this.selected }</b></cura-heading>\n <div class=\"iconSizes\">\n { this.sizes.map( size =>\n <div class=\"size\">\n <cura-icon name={this.selected} size={size}></cura-icon>\n <span>{ size }</span>\n </div>\n )}\n </div>\n <div class=\"iconSizes invert\">\n { this.sizes.map( size =>\n <div class=\"size\">\n <cura-icon name={this.selected} size={size} color=\"neutral-white\"></cura-icon>\n <span>{ size }</span>\n </div>\n )}\n </div>\n </div>\n <div class=\"icons\">\n { iconsetdefaulticons.map(icon =>\n <div class={{icon: true, selected: icon === this.selected }} onClick={() => this.setSelected(icon)}>\n <cura-icon\n name={icon}\n size=\"32\"\n color={icon === this.selected ? 'accent-dark' : 'neutral-dark'}></cura-icon>\n <cura-label\n size=\"xsmall\"\n weight={icon === this.selected ? 'bold' : 'regular'}\n color={icon === this.selected ? 'accent-dark' : 'neutral-dark'}>{icon}</cura-label>\n </div>\n )}\n </div>\n </Host>\n );\n }\n\n}\n"],"version":3}
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-60783089.js');
|
|
6
6
|
|
|
7
|
-
const curaModalCss = ":host{display:block}.modal{position:fixed;height:100%;width:100%;top:var(--top-offset);bottom:var(--bottom-offset);left:var(--left-offset);right:var(--right-offset);z-index:-1;margin-top:var(--offset-top)}.modal.open{z-index:var(--zIndex)}.modal.open .backdrop,.modal.open .wrapper{opacity:1;visibility:visible;animation:fadeIn 0.3s ease-out}.container{display:flex;align-items:center;justify-content:center}.backdrop,.wrapper{opacity:0;visibility:hidden;transition:opacity 0.3s ease, visibility 0.3s ease}.backdrop{background-color:var(--background-color);z-index:calc(var(--zIndex) - 10);animation:fadeIn 0.3s ease-out}.wrapper{position:fixed;background-color:var(--neutral-
|
|
7
|
+
const curaModalCss = ":host{display:block}.modal{position:fixed;height:100%;width:100%;top:var(--top-offset);bottom:var(--bottom-offset);left:var(--left-offset);right:var(--right-offset);z-index:-1;margin-top:var(--offset-top)}.modal.open{z-index:var(--zIndex)}.modal.open .backdrop,.modal.open .wrapper{opacity:1;visibility:visible;animation:fadeIn 0.3s ease-out}.container{display:flex;align-items:center;justify-content:center}.backdrop,.wrapper{opacity:0;visibility:hidden;transition:opacity 0.3s ease, visibility 0.3s ease}.backdrop{background-color:var(--background-color);z-index:calc(var(--zIndex) - 10);animation:fadeIn 0.3s ease-out}.wrapper{position:fixed;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-light);border-radius:calc(var(--cura-spacing-base) * 3px);max-width:600px;min-width:200px;padding:calc(calc(var(--cura-spacing-base) * 1px) / 2) calc(var(--cura-spacing-base) * 4px) calc(var(--cura-spacing-base) * 4px) calc(var(--cura-spacing-base) * 4px);z-index:var(--zIndex);box-shadow:0px 8px 16px 0px var(--neutral-black-shadow-4, rgba(38, 38, 38, 0.12));transform:scale(0.95);transition:transform 0.3s ease-out, opacity 0.3s ease, visibility 0.3s ease}.wrapper ::slotted(*){max-height:80vh;overflow:auto;padding-right:calc(var(--cura-spacing-base) * 5px)}.modal.open .wrapper{transform:scale(1);opacity:1;visibility:visible}.close{justify-self:flex-end;padding-top:calc(var(--cura-spacing-base) * 4px);background:none;border:none;cursor:pointer}.close.mobile{display:none}.close.desktop{display:flex;padding:0;margin-right:-8px}@media (max-width: 768px){.wrapper{position:fixed;bottom:0px;width:80%;padding-top:calc(var(--cura-spacing-base) * 4px);padding-bottom:0px;border-radius:calc(var(--cura-spacing-base) * 3px) calc(var(--cura-spacing-base) * 3px) 0px 0px;border-bottom:none}.close{align-items:center;border-top:1px dashed var(--neutral-light);margin-top:calc(var(--cura-spacing-base) * 4px);padding:calc(var(--cura-spacing-base) * 2px) 0px;justify-content:center;width:100%}.close.mobile{display:flex;gap:calc(var(--cura-spacing-base) * 2px)}.close.desktop{display:none}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{from{opacity:1}to{opacity:0}}";
|
|
8
8
|
const CuraModalStyle0 = curaModalCss;
|
|
9
9
|
|
|
10
10
|
const CuraModal = class {
|
|
@@ -55,7 +55,7 @@ const CuraModal = class {
|
|
|
55
55
|
this.setOffset('right', this.right);
|
|
56
56
|
}
|
|
57
57
|
connectedCallback() {
|
|
58
|
-
this.styles = Object.assign(Object.assign({}, this.styles), { '--neutral-
|
|
58
|
+
this.styles = Object.assign(Object.assign({}, this.styles), { '--neutral-purewhite': window.CuraAPI.theme.colors.getColor('neutral-purewhite'), '--neutral-light': window.CuraAPI.theme.colors.getColor('neutral-light'), '--base-spacing': window.CuraAPI.theme.spacing.getSpacing() });
|
|
59
59
|
this.setColors();
|
|
60
60
|
this.setTop();
|
|
61
61
|
this.setBottom();
|
|
@@ -69,7 +69,7 @@ const CuraModal = class {
|
|
|
69
69
|
window.addEventListener('keydown', this.handleCloseOnEsc);
|
|
70
70
|
}
|
|
71
71
|
render() {
|
|
72
|
-
return (index.h(index.Host, { key: '
|
|
72
|
+
return (index.h(index.Host, { key: '4ccdb55c36abada0f1a7c8f44b79603e3e3432cc', role: "dialog", "aria-modal": "true", style: { '--zIndex': this.zindex } }, index.h("div", { key: '1b7248b7549a903a7a9b08aa219f209e0f159d30', class: this.open ? 'modal container open' : 'modal container', style: this.styles }, index.h("div", { key: '6977bffb5232d6e45d217bf2db4f61748daf7ccf', class: this.open ? 'modal backdrop open' : 'modal backdrop', onClick: this.handleClose }), index.h("div", { key: '71f7c2cf8c56d4f0fdf443209e0f5e96e285e36e', class: "wrapper" }, index.h("div", { key: '80b99d594ee94b214318479e815194be75f3fea7', class: "close desktop" }, index.h("cura-button-transparent", { key: '9abea3d67b08611313ee28b44bf6775a37b9ab79', iconName: "close", color: "error", size: "small", onClick: this.handleClose, iconOnly: true })), index.h("slot", { key: '85364906c3b59f2ac7b95cd316babff55de10a0f' }), index.h("div", { key: 'a4106cee880560a7fdcb92b63f98feefbe8f283a', class: "close mobile", onClick: this.handleClose }, index.h("cura-button-transparent", { key: '794ab5cfdece8aa94ff85d37655a83c9df7a854a', color: "error", iconName: "close", size: "small" }, this.mobileCloseLabel))))));
|
|
73
73
|
}
|
|
74
74
|
static get watchers() { return {
|
|
75
75
|
"background": ["setColors"],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"cura-modal.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,YAAY,GAAG,
|
|
1
|
+
{"file":"cura-modal.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,YAAY,GAAG,w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BAAgB,EAAE,OAAO,EAAE,IAAI,CAAC,WAAW,GAAQ,EACnGA,kEAAK,KAAK,EAAC,SAAS,IAElBA,kEAAK,KAAK,EAAC,eAAe,IACxBA,sFAAyB,QAAQ,EAAC,OAAO,EAAC,KAAK,EAAC,OAAO,EAAC,IAAI,EAAC,OAAO,EAAC,OAAO,EAAE,IAAI,CAAC,WAAW,EAAE,QAAQ,SAA2B,CAC/H,EACNA,oEAAa,EAEbA,kEAAK,KAAK,EAAC,cAAc,EAAC,OAAO,EAAE,IAAI,CAAC,WAAW,IACjDA,sFAAyB,KAAK,EAAC,OAAO,EAAC,QAAQ,EAAC,OAAO,EAAC,IAAI,EAAC,OAAO,IACjE,IAAI,CAAC,gBAAgB,CACE,CACtB,CACF,CACF,CACD,EACP;KACH;;;;;;;;;;;;;","names":["h","Host"],"sources":["src/components/cura-modal/cura-modal.scss?tag=cura-modal&encapsulation=shadow","src/components/cura-modal/cura-modal.tsx"],"sourcesContent":["@import '../../../src/scss/mixins/spacing.scss';\n@import '../../../src/scss/mixins/shadows.scss';\n@import '../../../src/scss/mixins/responsive.scss';\n@import '../../../src/scss/mixins/animations.scss';\n\n:host {\n display: block;\n}\n\n.modal {\n position: fixed;\n height: 100%;\n width: 100%;\n top: var(--top-offset);\n bottom: var(--bottom-offset);\n left: var(--left-offset);\n right: var(--right-offset);\n z-index: -1;\n margin-top: var(--offset-top);\n\n &.open {\n z-index: var(--zIndex);\n\n .backdrop,\n .wrapper {\n opacity: 1;\n visibility: visible;\n animation: fadeIn 0.3s ease-out;\n }\n }\n}\n\n.container {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.backdrop,\n.wrapper {\n opacity: 0;\n visibility: hidden;\n transition: opacity 0.3s ease, visibility 0.3s ease;\n}\n\n.backdrop {\n background-color: var(--background-color);\n z-index: calc(var(--zIndex) - 10);\n animation: fadeIn 0.3s ease-out;\n}\n\n.wrapper {\n position: fixed;\n background-color: var(--neutral-purewhite);\n border: 2px solid var(--neutral-light);\n border-radius: #{$spacing-xxxs};\n max-width: 600px;\n min-width: 200px;\n padding: calc(#{$spacing-tiny} / 2) #{$spacing-xxs} #{$spacing-xxs} #{$spacing-xxs};\n z-index: var(--zIndex);\n\n @include shadow-level4();\n\n transform: scale(0.95);\n transition: transform 0.3s ease-out, opacity 0.3s ease, visibility 0.3s ease;\n\n ::slotted(*) {\n max-height: 80vh;\n overflow: auto;\n padding-right: #{$spacing-xs};\n }\n}\n\n.modal.open .wrapper {\n transform: scale(1);\n opacity: 1;\n visibility: visible;\n}\n\n.close {\n justify-self: flex-end;\n padding-top: #{$spacing-xxs};\n background: none;\n border: none;\n cursor: pointer;\n\n &.mobile {\n display: none;\n }\n\n &.desktop {\n display: flex;\n padding: 0;\n margin-right: -8px;\n }\n}\n\n@include mobile-only() {\n .wrapper {\n position: fixed;\n bottom: #{$spacing-none};\n width: 80%;\n padding-top: #{$spacing-xxs};\n padding-bottom: #{$spacing-none};\n border-radius: #{$spacing-xxxs} #{$spacing-xxxs} #{$spacing-none} #{$spacing-none};\n border-bottom: none;\n }\n\n .close {\n align-items: center;\n border-top: 1px dashed var(--neutral-light);\n margin-top: #{$spacing-xxs};\n padding: #{$spacing-mini} #{$spacing-none};\n justify-content: center;\n width: 100%;\n\n &.mobile {\n display: flex;\n gap: #{$spacing-mini};\n }\n\n &.desktop {\n display: none;\n }\n }\n}\n\n@include fadeIn();\n@include fadeOut();\n","import { Component, Event, EventEmitter, Host, Prop, State, Watch, h } from '@stencil/core';\n\n@Component({\n tag: 'cura-modal',\n styleUrl: 'cura-modal.scss',\n shadow: true,\n})\nexport class CuraModal {\n /**\n * Property open to control modal visibility.\n * Default: false\n */\n @Prop({ mutable: true, reflect: true }) open?: boolean = false;\n /**\n * Property background to control modal backdrop color.\n * Default: light\n */\n @Prop() background?: 'dark' | 'light' = 'light';\n /**\n * Property top to control modal top position.\n * Default: 0px\n */\n @Prop() top?: number = 0;\n /**\n * Property bottom to control modal bottom position.\n * Default: 0px\n */\n @Prop() bottom?: number = 0;\n /**\n * Property left to control modal left position.\n * Default: 0px\n */\n @Prop() left?: number = 0;\n /**\n * Property right to control modal right position.\n * Default: 0px\n */\n @Prop() right?: number = 0;\n /**\n * Defines the label for the close button when the modal is viewed on mobile.\n * Default: Fechar\n */\n @Prop({ reflect: true }) mobileCloseLabel: string = 'Fechar';\n /**\n * Property zindex to control the z-index value of the component.\n * Default: 100\n */\n @Prop({ reflect: true }) zindex: string = '100';\n /**\n * Event close to handle modal close.\n */\n @Event({ eventName: 'modalClose' }) modalClose: EventEmitter<void>;\n\n @State() styles = {};\n\n @Watch('background')\n setColors() {\n const backgroundTheme = {\n dark: window.CuraAPI.theme.colors.getColor('neutral-black', 0.4),\n light: window.CuraAPI.theme.colors.getColor('primary-darker', 0.8),\n };\n\n this.styles = {\n ...this.styles,\n '--background-color': backgroundTheme[this.background],\n };\n }\n\n setOffset(name: string, value: number) {\n this.styles = {\n ...this.styles,\n [`--${name}-offset`]: `${value}px`,\n };\n }\n\n @Watch('top')\n setTop() {\n this.setOffset('top', this.top);\n }\n\n @Watch('bottom')\n setBottom() {\n this.setOffset('bottom', this.bottom);\n }\n\n @Watch('left')\n setLeft() {\n this.setOffset('left', this.left);\n }\n\n @Watch('right')\n setRight() {\n this.setOffset('right', this.right);\n }\n\n handleCloseOnEsc = (evt: KeyboardEvent) => {\n if (evt.key !== 'Escape' || !this.open) {\n return;\n }\n\n this.open = false;\n this.modalClose.emit();\n };\n\n connectedCallback() {\n this.styles = {\n ...this.styles,\n '--neutral-purewhite': window.CuraAPI.theme.colors.getColor('neutral-purewhite'),\n '--neutral-light': window.CuraAPI.theme.colors.getColor('neutral-light'),\n '--base-spacing': window.CuraAPI.theme.spacing.getSpacing(),\n };\n this.setColors();\n this.setTop();\n this.setBottom();\n this.setLeft();\n this.setRight();\n }\n\n private handleClose = () => {\n this.modalClose.emit();\n this.open = false;\n };\n\n disconnectedCallback() {\n window.removeEventListener('keydown', this.handleCloseOnEsc);\n }\n\n componentDidLoad() {\n window.addEventListener('keydown', this.handleCloseOnEsc);\n }\n\n render() {\n return (\n <Host role=\"dialog\" aria-modal=\"true\" style={{ '--zIndex': this.zindex }}>\n <div class={this.open ? 'modal container open' : 'modal container'} style={this.styles}>\n <div class={this.open ? 'modal backdrop open' : 'modal backdrop'} onClick={this.handleClose}></div>\n <div class=\"wrapper\">\n {/* Desktop button */}\n <div class=\"close desktop\">\n <cura-button-transparent iconName=\"close\" color=\"error\" size=\"small\" onClick={this.handleClose} iconOnly></cura-button-transparent>\n </div>\n <slot></slot>\n {/* Mobile button */}\n <div class=\"close mobile\" onClick={this.handleClose}>\n <cura-button-transparent color=\"error\" iconName=\"close\" size=\"small\">\n {this.mobileCloseLabel}\n </cura-button-transparent>\n </div>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-60783089.js');
|
|
6
|
+
const curaTabs_definitions = require('./cura-tabs.definitions-b8955ad4.js');
|
|
7
|
+
|
|
8
|
+
const curaTabsButtonCss = ":host button,:host a{outline:none;box-shadow:none;box-sizing:border-box;display:flex;width:100%;align-items:center;justify-content:center;text-decoration:none !important;font-size:var(--font-size);cursor:pointer;transition:background-color 0.07s linear, box-shadow 0.07s linear, border-color 0.07s linear;border-radius:var(--border-radius);position:relative;background-color:transparent;box-sizing:border-box;border:none;display:flex;align-items:center;justify-content:center;min-width:120px;width:fit-content;border:2px solid var(--border-color);border-radius:4px}:host button:focus,:host a:focus{outline:2px solid #6EA8FF}:host button:not(.selected),:host a:not(.selected){border:2px solid var(--border-color)}:host button:not(.disabled,.selected):hover,:host a:not(.disabled,.selected):hover{background-color:var(--background-color-hover)}:host button:not(.disabled,.selected):hover.dark,:host a:not(.disabled,.selected):hover.dark{border-color:var(--neutral-purewhite)}:host button.small,:host a.small{padding:calc(var(--cura-spacing-base) * 2px) calc(var(--cura-spacing-base) * 2px)}:host button.medium,:host a.medium{padding:calc(var(--cura-spacing-base) * 3px) calc(var(--cura-spacing-base) * 3px)}:host button.large,:host a.large{padding:calc(var(--cura-spacing-base) * 3px) calc(var(--cura-spacing-base) * 4px)}:host button:focus,:host a:focus{border-color:var(--primary-light)}:host button cura-icon,:host a cura-icon{margin-right:calc(var(--cura-spacing-base) * 2px)}:host button cura-badge-counter,:host a cura-badge-counter{margin-left:calc(var(--cura-spacing-base) * 2px)}:host button.selected,:host a.selected{cursor:pointer;background-color:var(--background-color-selected)}:host button.selected.disabled,:host a.selected.disabled{border-color:transparent;background-color:var(--background-disabled-selected)}:host button.disabled,:host a.disabled{cursor:not-allowed}:host button.disabled:not(.selected),:host a.disabled:not(.selected){border-color:var(--neutral-dark)}";
|
|
9
|
+
const CuraTabsButtonStyle0 = curaTabsButtonCss;
|
|
10
|
+
|
|
11
|
+
const CuraTabs = class {
|
|
12
|
+
constructor(hostRef) {
|
|
13
|
+
index.registerInstance(this, hostRef);
|
|
14
|
+
this.tabSelect = index.createEvent(this, "tabSelect", 7);
|
|
15
|
+
this.name = undefined;
|
|
16
|
+
this.iconName = undefined;
|
|
17
|
+
this.counter = 1;
|
|
18
|
+
this.selected = false;
|
|
19
|
+
this.disabled = false;
|
|
20
|
+
this.size = 'large';
|
|
21
|
+
this.colorMode = 'light';
|
|
22
|
+
this.hovered = false;
|
|
23
|
+
this.styles = {};
|
|
24
|
+
}
|
|
25
|
+
setColors() {
|
|
26
|
+
const colors = [
|
|
27
|
+
{ name: '--background-color-selected', theme: this.colorMode === 'light' ? 'primary-base' : 'primary-light' },
|
|
28
|
+
{ name: '--background-color-hover', theme: this.colorMode === 'light' ? 'primary-light' : null },
|
|
29
|
+
{
|
|
30
|
+
name: '--background-disabled-selected',
|
|
31
|
+
theme: this.colorMode === 'light' ? 'neutral-white' : 'neutral-black',
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
name: '--border-color',
|
|
35
|
+
theme: this.colorMode === 'light' ? 'primary-base' : 'primary-light',
|
|
36
|
+
},
|
|
37
|
+
];
|
|
38
|
+
colors.forEach(c => {
|
|
39
|
+
if (c.theme)
|
|
40
|
+
this.styles[c.name] = window.CuraAPI.theme.colors.getColor(c.theme);
|
|
41
|
+
});
|
|
42
|
+
this.styles = Object.assign({}, this.styles);
|
|
43
|
+
}
|
|
44
|
+
computeContentColor() {
|
|
45
|
+
if (this.disabled)
|
|
46
|
+
return 'neutral-dark';
|
|
47
|
+
if (this.colorMode === 'dark') {
|
|
48
|
+
if (this.hovered && !this.selected) {
|
|
49
|
+
return 'neutral-purewhite';
|
|
50
|
+
}
|
|
51
|
+
return this.selected ? 'neutral-black' : 'primary-lighter';
|
|
52
|
+
}
|
|
53
|
+
return this.selected ? 'neutral-purewhite' : 'primary-dark';
|
|
54
|
+
}
|
|
55
|
+
getIcon() {
|
|
56
|
+
if (!this.iconName)
|
|
57
|
+
return '';
|
|
58
|
+
const iconSize = this.size === 'large' ? 20 : 16;
|
|
59
|
+
const iconColor = this.computeContentColor();
|
|
60
|
+
return index.h("cura-icon", { name: this.iconName, size: iconSize, color: iconColor });
|
|
61
|
+
}
|
|
62
|
+
getClasses() {
|
|
63
|
+
return {
|
|
64
|
+
[this.size]: true,
|
|
65
|
+
[this.colorMode]: true,
|
|
66
|
+
selected: this.selected,
|
|
67
|
+
disabled: this.disabled,
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
getCounter() {
|
|
71
|
+
return index.h("cura-badge-counter", { number: this.counter, color: "primary", disabled: this.disabled, class: "badge-number" });
|
|
72
|
+
}
|
|
73
|
+
connectedCallback() {
|
|
74
|
+
this.styles = Object.assign(Object.assign({}, this.styles), { '--primary-dark': window.CuraAPI.theme.colors.getColor('primary-dark'), '--neutral-purewhite': window.CuraAPI.theme.colors.getColor('neutral-purewhite'), '--neutral-dark': window.CuraAPI.theme.colors.getColor('neutral-dark'), '--base-spacing': window.CuraAPI.theme.spacing.getSpacing() });
|
|
75
|
+
this.setColors();
|
|
76
|
+
}
|
|
77
|
+
handleMouseEnter() {
|
|
78
|
+
if (this.disabled)
|
|
79
|
+
return;
|
|
80
|
+
this.hovered = true;
|
|
81
|
+
}
|
|
82
|
+
handleMouseLeave() {
|
|
83
|
+
this.hovered = false;
|
|
84
|
+
}
|
|
85
|
+
handleClick(e) {
|
|
86
|
+
if (this.disabled) {
|
|
87
|
+
e.preventDefault();
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
this.selected = !this.selected;
|
|
91
|
+
this.tabSelect.emit({ name: this.name });
|
|
92
|
+
}
|
|
93
|
+
render() {
|
|
94
|
+
const labelSize = curaTabs_definitions.labelSizes[this.size] || curaTabs_definitions.labelSizes['default'];
|
|
95
|
+
const labelColor = this.computeContentColor();
|
|
96
|
+
return (index.h(index.Host, { key: '9410b9c68061ffb5d838fe6ab2f409be9b90c6ac', role: "button", "aria-pressed": this.selected, "aria-disabled": this.disabled }, index.h("button", { key: '1ac26d9b41e072f1ec3668d66fee83679640c54f', class: this.getClasses(), style: this.styles, onClick: e => this.handleClick(e), disabled: this.disabled, onMouseEnter: this.handleMouseEnter.bind(this), onMouseLeave: this.handleMouseLeave.bind(this) }, this.getIcon(), index.h("cura-label", { key: 'ff854d36883b062d699388e71e6315f76f008f79', size: labelSize, color: labelColor, lineHeight: "0", marginBlock: "0" }, index.h("slot", { key: '6ab5c0cdea38f9094bb382943fe25c3967a681ab' })), this.counter > 0 && this.getCounter())));
|
|
97
|
+
}
|
|
98
|
+
static get watchers() { return {
|
|
99
|
+
"colorMode": ["setColors"]
|
|
100
|
+
}; }
|
|
101
|
+
};
|
|
102
|
+
CuraTabs.style = CuraTabsButtonStyle0;
|
|
103
|
+
|
|
104
|
+
exports.cura_tabs_button = CuraTabs;
|
|
105
|
+
|
|
106
|
+
//# sourceMappingURL=cura-tabs-button.cjs.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"cura-t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,GAAG,EAAC,WAAW,EAAC,GAAG,IAC5EA,oEAAa,CACF,EACZ,IAAI,CAAC,OAAO,GAAG,CAAC,IAAI,IAAI,CAAC,UAAU,EAAE,CAC/B,CACJ,EACP;KACH;;;;;;;;;","names":["h","labelSizes","Host"],"sources":["src/components/tabs/cura-tabs-button/cura-tabs-button.scss?tag=cura-tabs-button&encapsulation=shadow","src/components/tabs/cura-tabs-button/cura-tabs-button.tsx"],"sourcesContent":["@import '../../../scss/mixins/spacing.scss';\n@import '../../../scss/mixins/buttons.scss';\n\n$button-sizes: (\n small: $spacing-mini $spacing-mini,\n medium: $spacing-xxxs $spacing-xxxs,\n large: $spacing-xxxs $spacing-xxs,\n);\n\n:host {\n button,\n a {\n @include button-element() {\n background-color: transparent;\n box-sizing: border-box;\n border: none;\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n min-width: 120px;\n width: fit-content;\n\n border: 2px solid var(--border-color);\n border-radius: 4px;\n\n &:not(.selected) {\n border: 2px solid var(--border-color);\n }\n\n &:not(.disabled, .selected):hover {\n background-color: var(--background-color-hover);\n\n &.dark {\n border-color: var(--neutral-purewhite);\n }\n }\n\n @each $size, $padding in $button-sizes {\n &.#{$size} {\n padding: $padding;\n }\n }\n\n &:focus {\n border-color: var(--primary-light);\n }\n\n cura-icon {\n margin-right: #{$spacing-mini};\n }\n\n cura-badge-counter {\n margin-left: #{$spacing-mini};\n }\n\n @include button-selected() {\n background-color: var(--background-color-selected);\n\n &.disabled {\n border-color: transparent;\n background-color: var(--background-disabled-selected);\n }\n }\n\n &.disabled {\n &:not(.selected) {\n border-color: var(--neutral-dark);\n }\n\n cursor: not-allowed;\n }\n }\n }\n}\n","import { Component, Event, EventEmitter, h, Host, Prop, State, Watch } from '@stencil/core';\nimport { labelSizes } from '../cura-tabs.definitions';\n\n@Component({\n tag: 'cura-tabs-button',\n styleUrl: 'cura-tabs-button.scss',\n shadow: true,\n})\nexport class CuraTabs {\n @Prop({ reflect: true }) name: string;\n @Prop({ reflect: true }) iconName: string;\n @Prop({ reflect: true, mutable: true }) counter?: number = 1;\n @Prop({ reflect: true, mutable: true }) selected: boolean = false;\n @Prop({ reflect: true, mutable: true }) disabled: boolean = false;\n @Prop({ reflect: true }) size: 'small' | 'medium' | 'large' = 'large';\n @Prop({ reflect: true, mutable: true }) colorMode: 'dark' | 'light' = 'light';\n\n @State() hovered = false;\n @State() styles: Record<string, string> = {};\n\n @Event() tabSelect: EventEmitter<{ name: string }>;\n\n @Watch('colorMode')\n setColors() {\n const colors = [\n { name: '--background-color-selected', theme: this.colorMode === 'light' ? 'primary-base' : 'primary-light' },\n { name: '--background-color-hover', theme: this.colorMode === 'light' ? 'primary-light' : null },\n {\n name: '--background-disabled-selected',\n theme: this.colorMode === 'light' ? 'neutral-white' : 'neutral-black',\n },\n {\n name: '--border-color',\n theme: this.colorMode === 'light' ? 'primary-base' : 'primary-light',\n },\n ];\n\n colors.forEach(c => {\n if (c.theme) this.styles[c.name] = window.CuraAPI.theme.colors.getColor(c.theme);\n });\n\n this.styles = { ...this.styles };\n }\n\n computeContentColor(): string {\n if (this.disabled) return 'neutral-dark';\n\n if (this.colorMode === 'dark') {\n if (this.hovered && !this.selected) {\n return 'neutral-purewhite';\n }\n return this.selected ? 'neutral-black' : 'primary-lighter';\n }\n\n return this.selected ? 'neutral-purewhite' : 'primary-dark';\n }\n\n getIcon() {\n if (!this.iconName) return '';\n const iconSize = this.size === 'large' ? 20 : 16;\n const iconColor = this.computeContentColor();\n\n return <cura-icon name={this.iconName} size={iconSize} color={iconColor}></cura-icon>;\n }\n\n getClasses() {\n return {\n [this.size]: true,\n [this.colorMode]: true,\n selected: this.selected,\n disabled: this.disabled,\n };\n }\n\n getCounter() {\n return <cura-badge-counter number={this.counter} color=\"primary\" disabled={this.disabled} class=\"badge-number\"></cura-badge-counter>;\n }\n\n connectedCallback() {\n this.styles = {\n ...this.styles,\n '--primary-dark': window.CuraAPI.theme.colors.getColor('primary-dark'),\n '--neutral-purewhite': window.CuraAPI.theme.colors.getColor('neutral-purewhite'),\n '--neutral-dark': window.CuraAPI.theme.colors.getColor('neutral-dark'),\n '--base-spacing': window.CuraAPI.theme.spacing.getSpacing(),\n };\n\n this.setColors();\n }\n\n handleMouseEnter() {\n if (this.disabled) return;\n this.hovered = true;\n }\n\n handleMouseLeave() {\n this.hovered = false;\n }\n\n handleClick(e: Event) {\n if (this.disabled) {\n e.preventDefault();\n return;\n }\n\n this.selected = !this.selected;\n this.tabSelect.emit({ name: this.name });\n }\n\n render() {\n const labelSize = labelSizes[this.size] || labelSizes['default'];\n const labelColor = this.computeContentColor();\n\n return (\n <Host role=\"button\" aria-pressed={this.selected} aria-disabled={this.disabled}>\n <button\n class={this.getClasses()}\n style={this.styles}\n onClick={e => this.handleClick(e)}\n disabled={this.disabled}\n onMouseEnter={this.handleMouseEnter.bind(this)}\n onMouseLeave={this.handleMouseLeave.bind(this)}\n >\n {this.getIcon()}\n <cura-label size={labelSize} color={labelColor} lineHeight=\"0\" marginBlock=\"0\">\n <slot></slot>\n </cura-label>\n {this.counter > 0 && this.getCounter()}\n </button>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-60783089.js');
|
|
6
|
+
const curaTabs_definitions = require('./cura-tabs.definitions-b8955ad4.js');
|
|
7
|
+
|
|
8
|
+
const curaTabsTransparentCss = ":host button,:host a{outline:none;box-shadow:none;box-sizing:border-box;display:flex;width:100%;align-items:center;justify-content:center;text-decoration:none !important;font-size:var(--font-size);cursor:pointer;transition:background-color 0.07s linear, box-shadow 0.07s linear, border-color 0.07s linear;border-radius:var(--border-radius);position:relative;background-color:transparent;box-sizing:border-box;border:none;min-width:120px;width:fit-content;display:flex;align-items:center;justify-content:center}:host button:focus,:host a:focus{outline:2px solid #6EA8FF}:host button.border-bottom,:host a.border-bottom{border-bottom:1px solid var(--border-bottom-color)}:host button.small,:host a.small{padding:calc(var(--cura-spacing-base) * 2px) calc(var(--cura-spacing-base) * 2px)}:host button.medium,:host a.medium{padding:calc(var(--cura-spacing-base) * 3px) calc(var(--cura-spacing-base) * 3px)}:host button.large,:host a.large{padding:calc(var(--cura-spacing-base) * 3px) calc(var(--cura-spacing-base) * 4px)}:host button:not(.selected),:host a:not(.selected){border-color:var(--border-color)}:host button:focus,:host a:focus{border-color:var(--primary-light)}:host button:not(.disabled,.selected):hover,:host a:not(.disabled,.selected):hover{background-color:var(--background-color-hover)}:host button:not(.disabled,.selected):hover.dark,:host a:not(.disabled,.selected):hover.dark{border-color:var(--neutral-purewhite)}:host button cura-icon,:host a cura-icon{margin-right:calc(var(--cura-spacing-base) * 2px)}:host button.selected,:host a.selected{cursor:pointer}:host button.selected:not(.disabled),:host a.selected:not(.disabled){border-bottom:1px solid var(--border-bottom-color-selected)}:host button.disabled,:host a.disabled{cursor:not-allowed}";
|
|
9
|
+
const CuraTabsTransparentStyle0 = curaTabsTransparentCss;
|
|
10
|
+
|
|
11
|
+
const CuraTabsTransparent = class {
|
|
12
|
+
constructor(hostRef) {
|
|
13
|
+
index.registerInstance(this, hostRef);
|
|
14
|
+
this.tabSelect = index.createEvent(this, "tabSelect", 7);
|
|
15
|
+
this.name = undefined;
|
|
16
|
+
this.iconName = undefined;
|
|
17
|
+
this.selected = false;
|
|
18
|
+
this.disabled = false;
|
|
19
|
+
this.borderBottom = true;
|
|
20
|
+
this.size = 'large';
|
|
21
|
+
this.colorMode = 'light';
|
|
22
|
+
this.hovered = false;
|
|
23
|
+
this.styles = {};
|
|
24
|
+
}
|
|
25
|
+
setColors() {
|
|
26
|
+
const colors = [
|
|
27
|
+
{
|
|
28
|
+
name: '--border-bottom-color',
|
|
29
|
+
theme: this.colorMode === 'light' ? 'neutral-base' : 'primary',
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
name: '--border-bottom-color-selected',
|
|
33
|
+
theme: this.colorMode === 'light' ? 'primary-dark' : 'primary-lighter',
|
|
34
|
+
},
|
|
35
|
+
];
|
|
36
|
+
colors.forEach(c => {
|
|
37
|
+
if (c.theme)
|
|
38
|
+
this.styles[c.name] = window.CuraAPI.theme.colors.getColor(c.theme);
|
|
39
|
+
});
|
|
40
|
+
this.styles = Object.assign({}, this.styles);
|
|
41
|
+
}
|
|
42
|
+
computeContentColor() {
|
|
43
|
+
if (this.disabled)
|
|
44
|
+
return 'neutral-dark';
|
|
45
|
+
if (this.colorMode === 'dark') {
|
|
46
|
+
if (this.hovered && !this.selected) {
|
|
47
|
+
return 'neutral-purewhite';
|
|
48
|
+
}
|
|
49
|
+
return this.selected ? 'primary-lighter' : 'neutral-purewhite';
|
|
50
|
+
}
|
|
51
|
+
if (this.hovered && !this.selected) {
|
|
52
|
+
return 'primary-dark';
|
|
53
|
+
}
|
|
54
|
+
return this.selected ? 'primary-base' : 'neutral-black';
|
|
55
|
+
}
|
|
56
|
+
getIcon() {
|
|
57
|
+
if (!this.iconName)
|
|
58
|
+
return '';
|
|
59
|
+
const iconSize = this.size === 'large' ? 20 : 16;
|
|
60
|
+
const iconColor = this.computeContentColor();
|
|
61
|
+
return index.h("cura-icon", { name: this.iconName, size: iconSize, color: iconColor });
|
|
62
|
+
}
|
|
63
|
+
getClasses() {
|
|
64
|
+
return {
|
|
65
|
+
[this.size]: true,
|
|
66
|
+
[this.colorMode]: true,
|
|
67
|
+
'selected': this.selected,
|
|
68
|
+
'disabled': this.disabled,
|
|
69
|
+
'border-bottom': this.borderBottom,
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
connectedCallback() {
|
|
73
|
+
this.styles = Object.assign(Object.assign({}, this.styles), { '--primary-dark': window.CuraAPI.theme.colors.getColor('primary-dark'), '--neutral-purewhite': window.CuraAPI.theme.colors.getColor('neutral-purewhite'), '--base-spacing': window.CuraAPI.theme.spacing.getSpacing() });
|
|
74
|
+
this.setColors();
|
|
75
|
+
}
|
|
76
|
+
handleMouseEnter() {
|
|
77
|
+
if (this.disabled)
|
|
78
|
+
return;
|
|
79
|
+
this.hovered = true;
|
|
80
|
+
}
|
|
81
|
+
handleMouseLeave() {
|
|
82
|
+
this.hovered = false;
|
|
83
|
+
}
|
|
84
|
+
handleClick(e) {
|
|
85
|
+
if (this.disabled) {
|
|
86
|
+
e.preventDefault();
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
this.selected = !this.selected;
|
|
90
|
+
this.tabSelect.emit({ name: this.name });
|
|
91
|
+
}
|
|
92
|
+
render() {
|
|
93
|
+
const labelSize = curaTabs_definitions.labelSizes[this.size] || curaTabs_definitions.labelSizes['default'];
|
|
94
|
+
const labelColor = this.computeContentColor();
|
|
95
|
+
return (index.h(index.Host, { key: 'd3c9e277a079381def09397dc922d697aa99d70a', role: "button", "aria-pressed": this.selected, "aria-disabled": this.disabled }, index.h("button", { key: 'ab4cac9782f48c367c4ada4e303f9422971dc38e', class: this.getClasses(), style: this.styles, onClick: e => this.handleClick(e), disabled: this.disabled, onMouseEnter: this.handleMouseEnter.bind(this), onMouseLeave: this.handleMouseLeave.bind(this) }, this.getIcon(), index.h("cura-label", { key: 'c6567bdf7b80efc3380a8a93bf52de966e1caa7d', size: labelSize, color: labelColor, lineHeight: "0", marginBlock: "0" }, index.h("slot", { key: '93c392107790a2c0e3499e5b7bd742219203a980' })))));
|
|
96
|
+
}
|
|
97
|
+
static get watchers() { return {
|
|
98
|
+
"colorMode": ["setColors"]
|
|
99
|
+
}; }
|
|
100
|
+
};
|
|
101
|
+
CuraTabsTransparent.style = CuraTabsTransparentStyle0;
|
|
102
|
+
|
|
103
|
+
exports.cura_tabs_transparent = CuraTabsTransparent;
|
|
104
|
+
|
|
105
|
+
//# sourceMappingURL=cura-tabs-transparent.cjs.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"cura-tabs-transparent.entry.cjs.js","mappings":";;;;;;;AAAA,MAAM,sBAAsB,GAAG,kuDAAk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,CAAC;QAC/B,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;KAC1C;IAED,MAAM;QACJ,MAAM,SAAS,GAAGC,+BAAU,CAAC,IAAI,CAAC,IAAI,CAAC,IAAIA,+BAAU,CAAC,SAAS,CAAC,CAAC;QACjE,MAAM,UAAU,GAAG,IAAI,CAAC,mBAAmB,EAAE,CAAC;QAE9C,QACED,QAACE,UAAI,qDAAC,IAAI,EAAC,QAAQ,kBAAe,IAAI,CAAC,QAAQ,mBAAiB,IAAI,CAAC,QAAQ,IAC3EF,qEACE,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,EACxB,KAAK,EAAE,IAAI,CAAC,MAAM,EAClB,OAAO,EAAE,CAAC,IAAI,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,EACjC,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,YAAY,EAAE,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,EAC9C,YAAY,EAAE,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,IAE7C,IAAI,CAAC,OAAO,EAAE,EACfA,yEAAY,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,UAAU,EAAC,GAAG,EAAC,WAAW,EAAC,GAAG,IAC5EA,oEAAa,CACF,CACN,CACJ,EACP;KACH;;;;;;;;;","names":["h","labelSizes","Host"],"sources":["src/components/tabs/cura-tabs-transparent/cura-tabs-transparent.scss?tag=cura-tabs-transparent&encapsulation=shadow","src/components/tabs/cura-tabs-transparent/cura-tabs-transparent.tsx"],"sourcesContent":["@import '../../../scss/mixins/spacing.scss';\n@import '../../../scss/mixins/buttons.scss';\n\n$button-sizes: (\n small: $spacing-mini $spacing-mini,\n medium: $spacing-xxxs $spacing-xxxs,\n large: $spacing-xxxs $spacing-xxs,\n);\n\n:host {\n button,\n a {\n @include button-element() {\n background-color: transparent;\n box-sizing: border-box;\n border: none;\n\n min-width: 120px;\n width: fit-content;\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n &.border-bottom {\n border-bottom: 1px solid var(--border-bottom-color);\n }\n\n @each $size, $padding in $button-sizes {\n &.#{$size} {\n padding: $padding;\n }\n }\n\n &:not(.selected) {\n border-color: var(--border-color);\n }\n\n &:focus {\n border-color: var(--primary-light);\n }\n\n &:not(.disabled, .selected):hover {\n background-color: var(--background-color-hover);\n\n &.dark {\n border-color: var(--neutral-purewhite);\n }\n }\n\n cura-icon {\n margin-right: #{$spacing-mini};\n }\n\n @include button-selected() {\n &:not(.disabled) {\n border-bottom: 1px solid var(--border-bottom-color-selected);\n }\n }\n\n &.disabled {\n cursor: not-allowed;\n }\n }\n }\n}\n","import { Component, Event, EventEmitter, h, Host, Prop, State, Watch } from '@stencil/core';\nimport { labelSizes } from '../cura-tabs.definitions';\n\n@Component({\n tag: 'cura-tabs-transparent',\n styleUrl: 'cura-tabs-transparent.scss',\n shadow: true,\n})\nexport class CuraTabsTransparent {\n @Prop({ reflect: true }) name: string;\n @Prop({ reflect: true }) iconName: string;\n @Prop({ reflect: true, mutable: true }) selected: boolean = false;\n @Prop({ reflect: true, mutable: true }) disabled: boolean = false;\n @Prop({ reflect: true, mutable: true }) borderBottom: boolean = true;\n @Prop({ reflect: true }) size: 'small' | 'medium' | 'large' = 'large';\n @Prop({ reflect: true, mutable: true }) colorMode: 'dark' | 'light' = 'light';\n\n @State() hovered = false;\n @State() styles: Record<string, string> = {};\n\n @Event() tabSelect: EventEmitter<{ name: string }>;\n\n @Watch('colorMode')\n setColors() {\n const colors = [\n {\n name: '--border-bottom-color',\n theme: this.colorMode === 'light' ? 'neutral-base' : 'primary',\n },\n {\n name: '--border-bottom-color-selected',\n theme: this.colorMode === 'light' ? 'primary-dark' : 'primary-lighter',\n },\n ];\n\n colors.forEach(c => {\n if (c.theme) this.styles[c.name] = window.CuraAPI.theme.colors.getColor(c.theme);\n });\n\n this.styles = { ...this.styles };\n }\n\n computeContentColor(): string {\n if (this.disabled) return 'neutral-dark';\n\n if (this.colorMode === 'dark') {\n if (this.hovered && !this.selected) {\n return 'neutral-purewhite';\n }\n return this.selected ? 'primary-lighter' : 'neutral-purewhite';\n }\n\n if (this.hovered && !this.selected) {\n return 'primary-dark';\n }\n\n return this.selected ? 'primary-base' : 'neutral-black';\n }\n\n getIcon() {\n if (!this.iconName) return '';\n const iconSize = this.size === 'large' ? 20 : 16;\n const iconColor = this.computeContentColor();\n\n return <cura-icon name={this.iconName} size={iconSize} color={iconColor}></cura-icon>;\n }\n\n getClasses() {\n return {\n [this.size]: true,\n [this.colorMode]: true,\n 'selected': this.selected,\n 'disabled': this.disabled,\n 'border-bottom': this.borderBottom,\n };\n }\n\n connectedCallback() {\n this.styles = {\n ...this.styles,\n '--primary-dark': window.CuraAPI.theme.colors.getColor('primary-dark'),\n '--neutral-purewhite': window.CuraAPI.theme.colors.getColor('neutral-purewhite'),\n '--base-spacing': window.CuraAPI.theme.spacing.getSpacing(),\n };\n\n this.setColors();\n }\n\n handleMouseEnter() {\n if (this.disabled) return;\n this.hovered = true;\n }\n\n handleMouseLeave() {\n this.hovered = false;\n }\n\n handleClick(e: Event) {\n if (this.disabled) {\n e.preventDefault();\n return;\n }\n\n this.selected = !this.selected;\n this.tabSelect.emit({ name: this.name });\n }\n\n render() {\n const labelSize = labelSizes[this.size] || labelSizes['default'];\n const labelColor = this.computeContentColor();\n\n return (\n <Host role=\"button\" aria-pressed={this.selected} aria-disabled={this.disabled}>\n <button\n class={this.getClasses()}\n style={this.styles}\n onClick={e => this.handleClick(e)}\n disabled={this.disabled}\n onMouseEnter={this.handleMouseEnter.bind(this)}\n onMouseLeave={this.handleMouseLeave.bind(this)}\n >\n {this.getIcon()}\n <cura-label size={labelSize} color={labelColor} lineHeight=\"0\" marginBlock=\"0\">\n <slot></slot>\n </cura-label>\n </button>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"cura-tabs.definitions-b8955ad4.js","mappings":";;MAAa,UAAU,GAAG;IACxB,KAAK,EAAE,QAAQ;IACf,MAAM,EAAE,OAAO;IACf,KAAK,EAAE,QAAQ;IACf,OAAO,EAAE,QAAQ;;;;;","names":[],"sources":["src/components/tabs/cura-tabs.definitions.tsx"],"sourcesContent":["export const labelSizes = {\n small: 'xsmall',\n medium: 'small',\n large: 'medium',\n default: 'medium',\n};\n"],"version":3}
|
|
@@ -177,6 +177,36 @@ const ThemeRichet = Object.assign(Object.assign({}, ThemeDefault), {
|
|
|
177
177
|
}
|
|
178
178
|
} });
|
|
179
179
|
|
|
180
|
+
/**
|
|
181
|
+
* Perinatal temporary Theme
|
|
182
|
+
*/
|
|
183
|
+
const ThemePerinatalTemporary = Object.assign(Object.assign({}, ThemeDefault), {
|
|
184
|
+
/* Custom */
|
|
185
|
+
/* Colors */
|
|
186
|
+
color: {
|
|
187
|
+
primary: {
|
|
188
|
+
'100': '239,226,228',
|
|
189
|
+
'300': '226,196,200',
|
|
190
|
+
'500': '199,134,141',
|
|
191
|
+
'700': '175,91,109',
|
|
192
|
+
'900': '147,58,77'
|
|
193
|
+
},
|
|
194
|
+
secondary: {
|
|
195
|
+
'100': '233,226,220',
|
|
196
|
+
'300': '211,196,186',
|
|
197
|
+
'500': '189,167,151',
|
|
198
|
+
'700': '95,84,76',
|
|
199
|
+
'900': '38,33,30'
|
|
200
|
+
},
|
|
201
|
+
accent: {
|
|
202
|
+
'100': '219,189,196',
|
|
203
|
+
'300': '183,124,136',
|
|
204
|
+
'500': '147,58,77',
|
|
205
|
+
'700': '74,29,39',
|
|
206
|
+
'900': '29,12,15'
|
|
207
|
+
}
|
|
208
|
+
} });
|
|
209
|
+
|
|
180
210
|
/**
|
|
181
211
|
* Legacy Default Theme
|
|
182
212
|
*/
|
|
@@ -228,6 +258,7 @@ const ThemePresets = {
|
|
|
228
258
|
'maternidade': ThemeMaternity,
|
|
229
259
|
'oncologia': ThemeOncology,
|
|
230
260
|
'richet': ThemeRichet,
|
|
261
|
+
'perinatalTemp': ThemePerinatalTemporary,
|
|
231
262
|
'legacyDefault': ThemeLegacyDefault
|
|
232
263
|
};
|
|
233
264
|
|
|
@@ -455,4 +486,4 @@ class CuraThemeModule {
|
|
|
455
486
|
|
|
456
487
|
exports.CuraThemeModule = CuraThemeModule;
|
|
457
488
|
|
|
458
|
-
//# sourceMappingURL=cura-theme-module-
|
|
489
|
+
//# sourceMappingURL=cura-theme-module-09bb63a4.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"cura-theme-module-09bb63a4.js","mappings":";;;;AAAA;;;AAGO,MAAM,YAAY,GAAG;;IAE1B,KAAK,EAAE;QACL,OAAO,EAAE;YACP,KAAK,EAAE,aAAa;YACpB,KAAK,EAAE,YAAY;YACnB,KAAK,EAAE,UAAU;YACjB,KAAK,EAAE,UAAU;YACjB,KAAK,EAAE,SAAS;SACjB;QACD,SAAS,EAAE;YACT,KAAK,EAAE,aAAa;YACpB,KAAK,EAAE,aAAa;YACpB,KAAK,EAAE,aAAa;YACpB,KAAK,EAAE,YAAY;YACnB,KAAK,EAAE,UAAU;SAClB;QACD,MAAM,EAAE;YACN,KAAK,EAAE,aAAa;YACpB,KAAK,EAAE,YAAY;YACnB,KAAK,EAAE,WAAW;YAClB,KAAK,EAAE,YAAY;YACnB,KAAK,EAAE,WAAW;SACnB;KACF;;IAED,OAAO,EAAE;QACP,IAAI,EAAE,CAAC;KACR;;IAED,IAAI,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,wCAAwC;QAC9C,OAAO,EAAE,wCAAwC;QACjD,OAAO,EAAE,wCAAwC;QACjD,OAAO,EAAE;YACP,IAAI,EAAE,GAAG;YACT,KAAK,EAAE,GAAG;YACV,OAAO,EAAE,GAAG;YACZ,MAAM,EAAE,GAAG;YACX,IAAI,EAAE,GAAG;YACT,KAAK,EAAE,GAAG;SACX;KAC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,OAAO,CAAC,GAAG,CAAC,8EAA8E,EAAE,SAAS,CAAC,CAAC;YACvG,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;SACtB;aAAM;YACL,MAAM,MAAM,GAAG,WAAW,CAAC,UAAU,IAAI,WAAW,CAAC,UAAU,IAAI,YAAY,GAAG,YAAY,CAAC,WAAW,CAAC,UAAU,CAAC,GAAG,YAAY,CAAC,OAAO,CAAC;YAC9I,MAAM,QAAQ,qBAAQ,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAE,CAAC;YAC3D,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;YACpD,YAAY,CAAC,SAAS,CAAC,GAAG,QAAQ,CAAC;YACnC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;SACtB;KACF;;;;;","names":["Static"],"sources":["src/api/theme-presets/theme-default.ts","src/api/theme-presets/theme-maternity.ts","src/api/theme-presets/theme-oncology.ts","src/api/theme-presets/theme-richet.ts","src/api/theme-presets/theme-perinatal-temporary.ts","src/api/theme-presets/theme-legacy-default.ts","src/api/theme-presets/theme-presets.ts","src/api/modules/cura-theme-colors-module.ts","src/api/modules/cura-theme-spacing-module.ts","src/api/modules/cura-theme-fonts-module.ts","src/api/modules/cura-theme-breakpoints-module.ts","src/api/modules/cura-theme-module.ts"],"sourcesContent":["/**\n * Cura Default Theme\n */\nexport const ThemeDefault = {\n /* Colors */\n color: {\n primary: {\n '100': '113,197,232',\n '300': '68,142,205',\n '500': '0,61,165',\n '700': '0,48,117',\n '900': '0,40,85'\n },\n secondary: {\n '100': '245,236,227',\n '300': '221,192,162',\n '500': '204,160,116',\n '700': '136,107,77',\n '900': '41,32,23'\n },\n accent: {\n '100': '255,194,123',\n '300': '255,168,74',\n '500': '255,130,0',\n '700': '215,114,10',\n '900': '155,90,26'\n }\n },\n /* Spacing */\n spacing: {\n base: 4,\n },\n /* Fonts */\n font: {\n size: '14px',\n color: '#4A4A4A',\n body: \"'Gotham', Arial, Helvetica, sans-serif\",\n heading: \"'Gotham', Arial, Helvetica, sans-serif\",\n display: \"'Gotham', Arial, Helvetica, sans-serif\",\n weights: {\n thin: 100,\n light: 300,\n regular: 400,\n medium: 500,\n bold: 700,\n black: 900\n },\n }\n};\n","/**\n * Maternity Theme\n */\nimport { ThemeDefault } from \"./theme-default\";\n\nexport const ThemeMaternity = {\n /* Get default theme */\n ...ThemeDefault,\n\n /* Custom */\n /* Colors */\n color: {\n primary: {\n '100': '248,227,226',\n '300': '255,179,171',\n '500': '218,113,111',\n '700': '145,75,74',\n '900': '73,38,37'\n },\n secondary: {\n '100': '253,251,249',\n '300': '247,244,238',\n '500': '245,236,227',\n '700': '204,197,189',\n '900': '163,157,151'\n },\n accent: {\n '100': '236,239,249',\n '300': '133,153,203',\n '500': '11,20,151',\n '700': '7,13,101',\n '900': '4,7,50'\n }\n },\n font: {\n size: '14px',\n color: '#4A4A4A',\n body: \"'Gotham', Arial, Helvetica, sans-serif\",\n heading: \"'Gotham', Arial, Helvetica, sans-serif\",\n display: \"'Gotham', Arial, Helvetica, sans-serif\",\n weights: {\n thin: 100,\n light: 300,\n regular: 400,\n medium: 500,\n bold: 700,\n black: 900\n },\n }\n};\n","/**\n * Oncology Theme\n */\nimport { ThemeDefault } from \"./theme-default\";\n\nexport const ThemeOncology = {\n /* Get default theme */\n ...ThemeDefault,\n\n /* Custom */\n /* Colors */\n color: {\n primary: {\n '100': '170,190,225',\n '300': '85,126,196',\n '500': '0,61,166',\n '700': '0,41,111',\n '900': '0,12,33'\n },\n secondary: {\n '100': '205,215,227',\n '300': '155,175,199',\n '500': '104,134,171',\n '700': '54,95,143',\n '900': '4,54,115',\n },\n accent: {\n '100': '153,207,255',\n '300': '71,169,255',\n '500': '0,131,245',\n '700': '0,109,204',\n '900': '0,88,164',\n },\n aux: {\n '100': '218,242,239',\n '300': '132,212,202',\n '500': '71,191,176',\n '700': '33,100,92',\n '900': '14,38,35',\n },\n },\n font: {\n size: '14px',\n color: '#4A4A4A',\n body: \"'Hanken Grotesk', Arial, Helvetica, sans-serif\",\n heading: \"'Hanken Grotesk', Arial, Helvetica, sans-serif\",\n display: \"'Hanken Grotesk', Arial, Helvetica, sans-serif\",\n weights: {\n thin: 100,\n light: 300,\n regular: 400,\n medium: 500,\n bold: 700,\n black: 900\n },\n }\n};\n","/**\n * Richet Theme\n */\nimport { ThemeDefault } from \"./theme-default\";\n\nexport const ThemeRichet = {\n /* Get default theme */\n ...ThemeDefault,\n\n /* Custom */\n /* Colors */\n color: {\n primary: {\n '100': '153,197,255',\n '300': '67,142,241',\n '500': '0,47,108',\n '700': '1,39,91',\n '900': '0,33,77'\n },\n secondary: {\n '100': '243,237,227',\n '300': '216,194,163',\n '500': '208,173,103',\n '700': '201,155,64',\n '900': '149,104,15'\n },\n accent: {\n '100': '167,230,215',\n '300': '130,225,209',\n '500': '44,213,196',\n '700': '26,188,169',\n '900': '0,150,129'\n }\n },\n};\n","/**\n * Perinatal temporary Theme\n */\nimport { ThemeDefault } from \"./theme-default\";\n\nexport const ThemePerinatalTemporary = {\n /* Get default theme */\n ...ThemeDefault,\n\n /* Custom */\n /* Colors */\n color: {\n primary: {\n '100': '239,226,228',\n '300': '226,196,200',\n '500': '199,134,141',\n '700': '175,91,109',\n '900': '147,58,77'\n },\n secondary: {\n '100': '233,226,220',\n '300': '211,196,186',\n '500': '189,167,151',\n '700': '95,84,76',\n '900': '38,33,30'\n },\n accent: {\n '100': '219,189,196',\n '300': '183,124,136',\n '500': '147,58,77',\n '700': '74,29,39',\n '900': '29,12,15'\n }\n },\n};\n","/**\n * Legacy Default Theme\n */\nimport { ThemeDefault } from \"./theme-default\";\n\nexport const ThemeLegacyDefault = {\n /* Get default theme */\n ...ThemeDefault,\n\n /* Custom */\n /* Colors */\n color: {\n primary: {\n '100': '204,217,231',\n '300': '85,128,174',\n '500': '0,65,134',\n '700': '0,43,89',\n '900': '0,13,27'\n },\n secondary: {\n '100': '238,232,206',\n '300': '198,180,92',\n '500': '170,142,11',\n '700': '113,95,7',\n '900': '34,28,2'\n },\n accent: {\n '100': '249,232,213',\n '300': '228,160,79',\n '500': '223,141,44',\n '700': '149,94,29',\n '900': '45,28,9'\n }\n },\n /* Fonts */\n font: {\n size: '14px',\n color: '#4A4A4A',\n body: \"'Roboto', Arial, Helvetica, sans-serif\",\n heading: \"'Roboto', Arial, Helvetica, sans-serif\",\n display: \"'Roboto', Arial, Helvetica, sans-serif\",\n weights: {\n thin: 100,\n light: 300,\n regular: 400,\n medium: 500,\n bold: 700,\n black: 900\n },\n }\n};\n","import { ThemeDefault } from './theme-default';\nimport { ThemeMaternity } from './theme-maternity';\nimport { ThemeOncology } from './theme-oncology';\nimport { ThemeRichet } from './theme-richet';\nimport { ThemePerinatalTemporary } from './theme-perinatal-temporary';\nimport { ThemeLegacyDefault } from './theme-legacy-default';\n\nexport const ThemePresets = {\n 'default': ThemeDefault,\n 'maternidade': ThemeMaternity,\n 'oncologia': ThemeOncology,\n 'richet': ThemeRichet,\n 'perinatalTemp': ThemePerinatalTemporary,\n 'legacyDefault': ThemeLegacyDefault\n};\n","import { Static } from \"../theme-presets/static\";\n\nexport default class CuraThemeColorsModule {\n\n NeutralDepthAlias = {\n 'purewhite': '0',\n 'white': '100',\n 'pale': '200',\n 'lighter': '300',\n 'light': '400',\n 'base': '500',\n 'medium': '600',\n 'dark': '700',\n 'darker': '800',\n 'black': '900',\n };\n\n ColorDepthAlias = {\n 'lighter': '100',\n 'light': '300',\n 'base': '500',\n 'dark': '700',\n 'darker': '900'\n }\n\n constructor() {}\n\n /**\n * Get theme color.\n * @param colorWithDepth string Ex.: primary-light\n * @returns RGBA value.\n */\n getColor(colorWithDepth: string = \"primary-base\", opacity = 1): string {\n const { color, depth } = this.splitColorDepth(colorWithDepth);\n const staticColor = this.getStatic(color, depth, opacity);\n if (staticColor) return staticColor;\n return this.getDynamic(color, depth, opacity);\n }\n\n /**\n * Internal: Look for static color by name and depth.\n * @param color Color name.\n * @param depth Depth number or alias.\n * @returns RGBA value.\n */\n getStatic(color: string, depth: string, opacity = 1) {\n const colorObj = Static.color[color];\n if (!colorObj) return null;\n const alias = color === 'neutral' ? this.NeutralDepthAlias[depth] : this.ColorDepthAlias[depth];\n return Static.color[color]?.[alias]\n ? `rgba(${Static.color[color]?.[alias]}, ${opacity})`\n : `rgba(${Static.color[color]?.[depth]}, ${opacity})`;\n }\n\n /**\n * Internal: Look for theme dynamic colors.\n * @param color Color name.\n * @param depth Color depth.\n * @returns RGBA value.\n */\n getDynamic(color: string, depth: string, opacity: number) {\n const themeVar = this.ColorDepthAlias[depth]\n ? `--cura-color-${color}-${this.ColorDepthAlias[depth]}`\n : `--cura-color-${color}-${depth}`;\n return getComputedStyle(document.documentElement).getPropertyValue(themeVar)\n ? `rgba(var(${themeVar}), ${opacity})`\n : `rgba(var(--cura-color-primary-500), ${opacity})`;\n }\n\n /**\n * Internal: Split color strings\n * @param colorWithDepth Color string [color]-[depth]. Ex.: primary-dark.\n * @returns Object { color: string, depth: string }.\n */\n private splitColorDepth(colorWithDepth: string): { color: string, depth: string } {\n const [ color, depth ] = colorWithDepth.toLowerCase().split(/-(.*)/);\n return { color: color ?? \"primary\", depth: depth ?? \"base\" };\n }\n\n}\n","export default class CuraThemeSpacingModule {\n\n private curaSpacing = '--cura-spacing-base';\n\n constructor() {}\n\n /** Returns the base spacing var defined in the theme */\n getSpacing(): string {\n if (getComputedStyle(document.body).getPropertyValue(this.curaSpacing)) {\n return `var(${this.curaSpacing})`;\n }\n return '4';\n }\n}\n","import { ThemeDefault } from \"../theme-presets/theme-default\";\n\nexport default class CuraThemeFontsModule {\n\n constructor() {}\n\n /**\n * Get the CSS variable related to the font family defined by the theme.\n * @param type 'body' | 'heading' | 'display'\n * @returns Related css variable as a string.\n */\n getFamily(type: string = \"body\"): string {\n const curaFontFamilyCSSVar = `--cura-font-${type.toLowerCase()}`;\n return getComputedStyle(document.body).getPropertyValue(curaFontFamilyCSSVar)\n ? `var(${curaFontFamilyCSSVar})`\n : 'var(--cura-font-body)';\n }\n\n /**\n * Get the CSS variables related to font weights defined by the theme.\n * @returns Object with CSS vars weights definitions for thin, light, regular, medium, bold and black fonts.\n */\n getWeights(): any {\n const weights = {};\n Object.keys(ThemeDefault.font.weights).forEach((key) => weights[key] = `var(--cura-font-weights-${key})`);\n return weights;\n }\n\n /**\n * Get the CSS variable related to the font size base defined by the theme.\n * @returns Related CSS variable as a string.\n */\n getSize = () => `var(--cura-font-size)`;\n\n /**\n * Get CSS variable related to the font color defined by the theme.\n * @returns Related CSS variable as a string.\n */\n getColor = () => `var(--cura-font-color)`;\n\n}\n","import { Static } from '../theme-presets/static';\n\nexport default class CuraThemeBreakpointsModule {\n\n constructor() {}\n\n /** Returns the base spacing var defined in the theme */\n get(size: 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' = null, position: 'min' | 'max' = null): any {\n if (size) {\n const breakpoint = position ? Static.breakpoints[size][position] : Static.breakpoints[size];\n if (breakpoint || breakpoint === 0) return breakpoint;\n }\n return Static.breakpoints;\n }\n}\n","import { ThemePresets } from '../theme-presets/theme-presets';\nimport { CuraCustomTheme } from '../cura-api.type';\nimport CuraThemeColorsModule from './cura-theme-colors-module';\nimport CuraThemeSpacingModule from './cura-theme-spacing-module';\nimport CuraThemeFontsModule from './cura-theme-fonts-module';\nimport CuraThemeBreakpointsModule from './cura-theme-breakpoints-module';\n\nexport default class CuraThemeModule {\n rootElement: HTMLElement;\n prefix = '--cura';\n colors = new CuraThemeColorsModule();\n spacing = new CuraThemeSpacingModule();\n fonts = new CuraThemeFontsModule();\n breakpoints = new CuraThemeBreakpointsModule();\n groupObject = {};\n\n constructor() {\n if (typeof window === 'undefined') return;\n\n this.rootElement = window?.document?.documentElement;\n }\n\n /**\n * Load a theme.\n * @param theme Theme tag.\n */\n load(theme = 'default') {\n const preset = ThemePresets[theme] ? ThemePresets[theme] : ThemePresets.default;\n this.buildCssVars(this.prefix, preset);\n }\n\n loadVarsSSR(theme = 'default') {\n const preset = ThemePresets[theme] ? ThemePresets[theme] : ThemePresets.default;\n this.buildCssVars(this.prefix, preset, true);\n\n return this.groupObject;\n }\n\n /**\n * Define a custom theme\n * @param customTheme Custom theme object definition\n */\n setCustom(customTheme: CuraCustomTheme) {\n const customTag = customTheme.name;\n if (customTag in ThemePresets) {\n console.log('Error building custom theme. Theme %s already exists. Loading default theme.', customTag);\n this.load('default');\n } else {\n const preset = customTheme.fromPreset && customTheme.fromPreset in ThemePresets ? ThemePresets[customTheme.fromPreset] : ThemePresets.default;\n const newTheme = { ...JSON.parse(JSON.stringify(preset)) };\n this.mergeObject(customTheme.definitions, newTheme);\n ThemePresets[customTag] = newTheme;\n this.load(customTag);\n }\n }\n\n /* Private */\n\n /** Set css var based on object structure */\n setCssVar = (prop, path) => {\n const varName = this.groupPath(path, prop[0]);\n this.rootElement.style.setProperty(varName, prop[1]);\n };\n\n groupPath = (a, b) => `${a}-${b}`;\n\n isObject = val => {\n return val && typeof val === 'object' && !Array.isArray(val);\n };\n\n /** Deep merge objects */\n mergeObject = (from, to) => {\n const entries = Object.entries(from);\n for (let e of entries) {\n if (this.isObject(e[1])) {\n this.mergeObject(e[1], to[e[0]]);\n } else {\n to[e[0]] = e[1];\n }\n }\n };\n\n /** Set css vars from preset object */\n buildCssVars = (path, obj, isGroup = false) => {\n const entries = Object.entries(obj);\n for (let e of entries) {\n if (this.isObject(e[1])) {\n this.buildCssVars(this.groupPath(path, e[0]), e[1], isGroup);\n } else {\n if (isGroup) {\n const varName = this.groupPath(path, e[0]);\n\n this.groupObject[varName] = e[1];\n } else {\n this.setCssVar(e, path);\n }\n }\n }\n };\n}\n"],"version":3}
|