@rededor/cura 0.5.0-alpha.0 → 0.5.1
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/icons/iconset-default-list.ts +1 -0
- package/dist/assets/icons/iconset-default-tmp.svg +976 -0
- package/dist/assets/icons/iconset-default.svg +1 -0
- package/dist/cjs/app-globals-0e3b7fc6.js +511 -0
- package/dist/cjs/app-globals-0e3b7fc6.js.map +1 -0
- package/dist/cjs/css-shim-83cf0349.js +8 -0
- package/dist/cjs/css-shim-83cf0349.js.map +1 -0
- package/dist/cjs/cura-accordion_12.cjs.entry.js +674 -0
- package/dist/cjs/cura-accordion_12.cjs.entry.js.map +1 -0
- package/dist/cjs/cura.cjs.js +36 -0
- package/dist/cjs/cura.cjs.js.map +1 -0
- package/dist/cjs/index-404d93e9.js +2247 -0
- package/dist/cjs/index-404d93e9.js.map +1 -0
- package/dist/cjs/index.cjs.js +4 -0
- package/dist/cjs/index.cjs.js.map +1 -0
- package/dist/cjs/loader.cjs.js +42 -0
- package/dist/cjs/loader.cjs.js.map +1 -0
- package/dist/cjs/shadow-css-8baae635.js +391 -0
- package/dist/cjs/shadow-css-8baae635.js.map +1 -0
- package/dist/collection/api/cura-api.js +34 -0
- package/dist/collection/api/cura-api.js.map +1 -0
- package/dist/collection/api/cura-api.type.js +7 -0
- package/dist/collection/api/cura-api.type.js.map +1 -0
- package/dist/collection/api/modules/cura-theme-breakpoints-module.js +14 -0
- package/dist/collection/api/modules/cura-theme-breakpoints-module.js.map +1 -0
- package/dist/collection/api/modules/cura-theme-colors-module.js +76 -0
- package/dist/collection/api/modules/cura-theme-colors-module.js.map +1 -0
- package/dist/collection/api/modules/cura-theme-fonts-module.js +36 -0
- package/dist/collection/api/modules/cura-theme-fonts-module.js.map +1 -0
- package/dist/collection/api/modules/cura-theme-module.js +78 -0
- package/dist/collection/api/modules/cura-theme-module.js.map +1 -0
- package/dist/collection/api/modules/cura-theme-spacing-module.js +13 -0
- package/dist/collection/api/modules/cura-theme-spacing-module.js.map +1 -0
- package/dist/collection/api/theme-presets/static.js +71 -0
- package/dist/collection/api/theme-presets/static.js.map +1 -0
- package/dist/collection/api/theme-presets/theme-default.js +50 -0
- package/dist/collection/api/theme-presets/theme-default.js.map +1 -0
- package/dist/collection/api/theme-presets/theme-legacy-default.js +32 -0
- package/dist/collection/api/theme-presets/theme-legacy-default.js.map +1 -0
- package/dist/collection/api/theme-presets/theme-maternity.js +46 -0
- package/dist/collection/api/theme-presets/theme-maternity.js.map +1 -0
- package/dist/collection/api/theme-presets/theme-oncology.js +53 -0
- package/dist/collection/api/theme-presets/theme-oncology.js.map +1 -0
- package/dist/collection/api/theme-presets/theme-presets.js +11 -0
- package/dist/collection/api/theme-presets/theme-presets.js.map +1 -0
- package/dist/collection/assets/icons/iconset-default-list.js +2 -0
- package/dist/collection/assets/icons/iconset-default-list.js.map +1 -0
- package/dist/collection/assets/icons/iconset-default-tmp.svg +976 -0
- package/dist/collection/assets/icons/iconset-default.svg +1 -0
- package/dist/collection/assets-raw/icons/default/360.svg +8 -0
- package/dist/collection/assets-raw/icons/default/accessibility.svg +5 -0
- package/dist/collection/assets-raw/icons/default/addUser.svg +6 -0
- package/dist/collection/assets-raw/icons/default/airdrop.svg +6 -0
- package/dist/collection/assets-raw/icons/default/alertCircle.svg +5 -0
- package/dist/collection/assets-raw/icons/default/alertTriangle.svg +5 -0
- package/dist/collection/assets-raw/icons/default/arrowDown.svg +3 -0
- package/dist/collection/assets-raw/icons/default/arrowDownCircle.svg +4 -0
- package/dist/collection/assets-raw/icons/default/arrowLeft.svg +3 -0
- package/dist/collection/assets-raw/icons/default/arrowLeftCircle.svg +4 -0
- package/dist/collection/assets-raw/icons/default/arrowRight.svg +3 -0
- package/dist/collection/assets-raw/icons/default/arrowRightCircle.svg +4 -0
- package/dist/collection/assets-raw/icons/default/arrowUp.svg +3 -0
- package/dist/collection/assets-raw/icons/default/arrowUpCircle.svg +4 -0
- package/dist/collection/assets-raw/icons/default/attach.svg +3 -0
- package/dist/collection/assets-raw/icons/default/avatarF.svg +6 -0
- package/dist/collection/assets-raw/icons/default/avatarM.svg +5 -0
- package/dist/collection/assets-raw/icons/default/biometry.svg +3 -0
- package/dist/collection/assets-raw/icons/default/bloodGroup.svg +3 -0
- package/dist/collection/assets-raw/icons/default/calendar.svg +8 -0
- package/dist/collection/assets-raw/icons/default/cam.svg +4 -0
- package/dist/collection/assets-raw/icons/default/camOff.svg +5 -0
- package/dist/collection/assets-raw/icons/default/central.svg +7 -0
- package/dist/collection/assets-raw/icons/default/chatCircle.svg +6 -0
- package/dist/collection/assets-raw/icons/default/check.svg +3 -0
- package/dist/collection/assets-raw/icons/default/checkBadge.svg +4 -0
- package/dist/collection/assets-raw/icons/default/checkCircle.svg +4 -0
- package/dist/collection/assets-raw/icons/default/checkDouble.svg +4 -0
- package/dist/collection/assets-raw/icons/default/clock.svg +5 -0
- package/dist/collection/assets-raw/icons/default/close.svg +3 -0
- package/dist/collection/assets-raw/icons/default/closeCircle.svg +5 -0
- package/dist/collection/assets-raw/icons/default/collapse.svg +4 -0
- package/dist/collection/assets-raw/icons/default/config.svg +4 -0
- package/dist/collection/assets-raw/icons/default/currency.svg +3 -0
- package/dist/collection/assets-raw/icons/default/delete.svg +7 -0
- package/dist/collection/assets-raw/icons/default/desktop.svg +6 -0
- package/dist/collection/assets-raw/icons/default/doc.svg +7 -0
- package/dist/collection/assets-raw/icons/default/down.svg +3 -0
- package/dist/collection/assets-raw/icons/default/download.svg +3 -0
- package/dist/collection/assets-raw/icons/default/duplicate.svg +4 -0
- package/dist/collection/assets-raw/icons/default/edit.svg +5 -0
- package/dist/collection/assets-raw/icons/default/exam.svg +6 -0
- package/dist/collection/assets-raw/icons/default/examDoc.svg +8 -0
- package/dist/collection/assets-raw/icons/default/expand.svg +4 -0
- package/dist/collection/assets-raw/icons/default/facebook.svg +3 -0
- package/dist/collection/assets-raw/icons/default/fileBmp.svg +17 -0
- package/dist/collection/assets-raw/icons/default/fileJpg.svg +8 -0
- package/dist/collection/assets-raw/icons/default/filePdf.svg +10 -0
- package/dist/collection/assets-raw/icons/default/filePng.svg +10 -0
- package/dist/collection/assets-raw/icons/default/fileUpload.svg +5 -0
- package/dist/collection/assets-raw/icons/default/fileXls.svg +8 -0
- package/dist/collection/assets-raw/icons/default/filter.svg +11 -0
- package/dist/collection/assets-raw/icons/default/fullscreen.svg +6 -0
- package/dist/collection/assets-raw/icons/default/gallery.svg +6 -0
- package/dist/collection/assets-raw/icons/default/geotag.svg +4 -0
- package/dist/collection/assets-raw/icons/default/geotagUnity.svg +5 -0
- package/dist/collection/assets-raw/icons/default/geotagUnityGroup.svg +3 -0
- package/dist/collection/assets-raw/icons/default/google.svg +3 -0
- package/dist/collection/assets-raw/icons/default/graph.svg +6 -0
- package/dist/collection/assets-raw/icons/default/healthPlan.svg +6 -0
- package/dist/collection/assets-raw/icons/default/heart.svg +3 -0
- package/dist/collection/assets-raw/icons/default/height.svg +10 -0
- package/dist/collection/assets-raw/icons/default/height2.svg +8 -0
- package/dist/collection/assets-raw/icons/default/home.svg +6 -0
- package/dist/collection/assets-raw/icons/default/horizontalList.svg +4 -0
- package/dist/collection/assets-raw/icons/default/imageUp.svg +5 -0
- package/dist/collection/assets-raw/icons/default/infoCircle.svg +5 -0
- package/dist/collection/assets-raw/icons/default/instagram.svg +5 -0
- package/dist/collection/assets-raw/icons/default/key.svg +4 -0
- package/dist/collection/assets-raw/icons/default/lamp.svg +12 -0
- package/dist/collection/assets-raw/icons/default/language.svg +9 -0
- package/dist/collection/assets-raw/icons/default/language2.svg +4 -0
- package/dist/collection/assets-raw/icons/default/languageEN.svg +5 -0
- package/dist/collection/assets-raw/icons/default/languagePT.svg +5 -0
- package/dist/collection/assets-raw/icons/default/lattes.svg +3 -0
- package/dist/collection/assets-raw/icons/default/left.svg +3 -0
- package/dist/collection/assets-raw/icons/default/like.svg +4 -0
- package/dist/collection/assets-raw/icons/default/link.svg +4 -0
- package/dist/collection/assets-raw/icons/default/linkExternal.svg +4 -0
- package/dist/collection/assets-raw/icons/default/linkedin.svg +5 -0
- package/dist/collection/assets-raw/icons/default/list.svg +8 -0
- package/dist/collection/assets-raw/icons/default/login.svg +4 -0
- package/dist/collection/assets-raw/icons/default/logout.svg +3 -0
- package/dist/collection/assets-raw/icons/default/mail.svg +6 -0
- package/dist/collection/assets-raw/icons/default/maintenance.svg +4 -0
- package/dist/collection/assets-raw/icons/default/medDoc.svg +5 -0
- package/dist/collection/assets-raw/icons/default/medEspec.svg +4 -0
- package/dist/collection/assets-raw/icons/default/medImg.svg +5 -0
- package/dist/collection/assets-raw/icons/default/medUser.svg +10 -0
- package/dist/collection/assets-raw/icons/default/medical.svg +9 -0
- package/dist/collection/assets-raw/icons/default/menuHamburguer.svg +5 -0
- package/dist/collection/assets-raw/icons/default/menuKebab.svg +5 -0
- package/dist/collection/assets-raw/icons/default/menuMeatballs.svg +5 -0
- package/dist/collection/assets-raw/icons/default/mic.svg +5 -0
- package/dist/collection/assets-raw/icons/default/micOff.svg +6 -0
- package/dist/collection/assets-raw/icons/default/minus.svg +3 -0
- package/dist/collection/assets-raw/icons/default/minusCircle.svg +4 -0
- package/dist/collection/assets-raw/icons/default/minusSquare.svg +4 -0
- package/dist/collection/assets-raw/icons/default/mobile.svg +4 -0
- package/dist/collection/assets-raw/icons/default/news.svg +8 -0
- package/dist/collection/assets-raw/icons/default/notification.svg +6 -0
- package/dist/collection/assets-raw/icons/default/npsDeslike.svg +6 -0
- package/dist/collection/assets-raw/icons/default/npsHate.svg +6 -0
- package/dist/collection/assets-raw/icons/default/npsLike.svg +6 -0
- package/dist/collection/assets-raw/icons/default/npsLove.svg +6 -0
- package/dist/collection/assets-raw/icons/default/npsNeutral.svg +6 -0
- package/dist/collection/assets-raw/icons/default/order.svg +6 -0
- package/dist/collection/assets-raw/icons/default/partner.svg +5 -0
- package/dist/collection/assets-raw/icons/default/phone.svg +5 -0
- package/dist/collection/assets-raw/icons/default/play.svg +4 -0
- package/dist/collection/assets-raw/icons/default/plus.svg +4 -0
- package/dist/collection/assets-raw/icons/default/plusCircle.svg +5 -0
- package/dist/collection/assets-raw/icons/default/plusSquare.svg +5 -0
- package/dist/collection/assets-raw/icons/default/print.svg +7 -0
- package/dist/collection/assets-raw/icons/default/profile.svg +4 -0
- package/dist/collection/assets-raw/icons/default/profileCircle.svg +4 -0
- package/dist/collection/assets-raw/icons/default/questionCircle.svg +4 -0
- package/dist/collection/assets-raw/icons/default/questionSquare.svg +4 -0
- package/dist/collection/assets-raw/icons/default/range.svg +5 -0
- package/dist/collection/assets-raw/icons/default/reload.svg +4 -0
- package/dist/collection/assets-raw/icons/default/ribbon.svg +4 -0
- package/dist/collection/assets-raw/icons/default/right.svg +3 -0
- package/dist/collection/assets-raw/icons/default/schedule.svg +9 -0
- package/dist/collection/assets-raw/icons/default/scheduleCheck.svg +8 -0
- package/dist/collection/assets-raw/icons/default/scheduleHistorico.svg +9 -0
- package/dist/collection/assets-raw/icons/default/search.svg +4 -0
- package/dist/collection/assets-raw/icons/default/secure.svg +6 -0
- package/dist/collection/assets-raw/icons/default/share.svg +7 -0
- package/dist/collection/assets-raw/icons/default/siren.svg +12 -0
- package/dist/collection/assets-raw/icons/default/sound.svg +5 -0
- package/dist/collection/assets-raw/icons/default/soundOff.svg +4 -0
- package/dist/collection/assets-raw/icons/default/subItem.svg +4 -0
- package/dist/collection/assets-raw/icons/default/target.svg +8 -0
- package/dist/collection/assets-raw/icons/default/team.svg +6 -0
- package/dist/collection/assets-raw/icons/default/telegram.svg +3 -0
- package/dist/collection/assets-raw/icons/default/twitter.svg +5 -0
- package/dist/collection/assets-raw/icons/default/unLink.svg +10 -0
- package/dist/collection/assets-raw/icons/default/unSecure.svg +6 -0
- package/dist/collection/assets-raw/icons/default/unity.svg +13 -0
- package/dist/collection/assets-raw/icons/default/unlike.svg +4 -0
- package/dist/collection/assets-raw/icons/default/up.svg +3 -0
- package/dist/collection/assets-raw/icons/default/upload.svg +3 -0
- package/dist/collection/assets-raw/icons/default/verticalList.svg +4 -0
- package/dist/collection/assets-raw/icons/default/viewFalse.svg +5 -0
- package/dist/collection/assets-raw/icons/default/viewTrue.svg +4 -0
- package/dist/collection/assets-raw/icons/default/weight.svg +5 -0
- package/dist/collection/assets-raw/icons/default/whatsapp.svg +4 -0
- package/dist/collection/assets-raw/icons/default/wifi.svg +6 -0
- package/dist/collection/assets-raw/icons/default/wifiOff.svg +7 -0
- package/dist/collection/assets-raw/icons/default/youtube.svg +4 -0
- package/dist/collection/assets-raw/icons/default/zoomIn.svg +6 -0
- package/dist/collection/assets-raw/icons/default/zoomOut.svg +5 -0
- package/dist/collection/collection-manifest.json +24 -0
- package/dist/collection/components/accordion/cura-accordion/cura-accordion.css +14 -0
- package/dist/collection/components/accordion/cura-accordion/cura-accordion.js +271 -0
- package/dist/collection/components/accordion/cura-accordion/cura-accordion.js.map +1 -0
- package/dist/collection/components/accordion/cura-accordion/cura-accordion.stories.js +160 -0
- package/dist/collection/components/accordion/cura-accordion/cura-accordion.stories.js.map +1 -0
- package/dist/collection/components/accordion/cura-accordion-item/cura-accordion-item.css +142 -0
- package/dist/collection/components/accordion/cura-accordion-item/cura-accordion-item.js +199 -0
- package/dist/collection/components/accordion/cura-accordion-item/cura-accordion-item.js.map +1 -0
- package/dist/collection/components/buttons/cura-button/cura-button.css +185 -0
- package/dist/collection/components/buttons/cura-button/cura-button.js +309 -0
- package/dist/collection/components/buttons/cura-button/cura-button.js.map +1 -0
- package/dist/collection/components/buttons/cura-button/cura-button.stories.js +168 -0
- package/dist/collection/components/buttons/cura-button/cura-button.stories.js.map +1 -0
- package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.css +220 -0
- package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.js +309 -0
- package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.js.map +1 -0
- package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.stories.js +168 -0
- package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.stories.js.map +1 -0
- package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.css +204 -0
- package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.js +309 -0
- package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.js.map +1 -0
- package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.stories.js +168 -0
- package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.stories.js.map +1 -0
- package/dist/collection/components/cura-icon/cura-icon.css +12 -0
- package/dist/collection/components/cura-icon/cura-icon.js +162 -0
- package/dist/collection/components/cura-icon/cura-icon.js.map +1 -0
- package/dist/collection/components/cura-icon/cura-icon.stories.js +75 -0
- package/dist/collection/components/cura-icon/cura-icon.stories.js.map +1 -0
- package/dist/collection/components/cura-icons-view/cura-icons-view.css +68 -0
- package/dist/collection/components/cura-icons-view/cura-icons-view.js +33 -0
- package/dist/collection/components/cura-icons-view/cura-icons-view.js.map +1 -0
- package/dist/collection/components/cura-icons-view/cura-icons-view.stories.js +11 -0
- package/dist/collection/components/cura-icons-view/cura-icons-view.stories.js.map +1 -0
- package/dist/collection/components/cura-page-template/cura-page-template.css +105 -0
- package/dist/collection/components/cura-page-template/cura-page-template.js +55 -0
- package/dist/collection/components/cura-page-template/cura-page-template.js.map +1 -0
- package/dist/collection/components/loaders/cura-loader-circle/cura-loader-circle.css +33 -0
- package/dist/collection/components/loaders/cura-loader-circle/cura-loader-circle.js +77 -0
- package/dist/collection/components/loaders/cura-loader-circle/cura-loader-circle.js.map +1 -0
- package/dist/collection/components/loaders/cura-loader-circle/cura-loader-circle.stories.js +56 -0
- package/dist/collection/components/loaders/cura-loader-circle/cura-loader-circle.stories.js.map +1 -0
- package/dist/collection/components/text/cura-display/cura-display.css +84 -0
- package/dist/collection/components/text/cura-display/cura-display.js +146 -0
- package/dist/collection/components/text/cura-display/cura-display.js.map +1 -0
- package/dist/collection/components/text/cura-display/cura-display.stories.js +80 -0
- package/dist/collection/components/text/cura-display/cura-display.stories.js.map +1 -0
- package/dist/collection/components/text/cura-heading/cura-heading.css +92 -0
- package/dist/collection/components/text/cura-heading/cura-heading.js +168 -0
- package/dist/collection/components/text/cura-heading/cura-heading.js.map +1 -0
- package/dist/collection/components/text/cura-heading/cura-heading.stories.js +91 -0
- package/dist/collection/components/text/cura-heading/cura-heading.stories.js.map +1 -0
- package/dist/collection/components/text/cura-paragraph/cura-paragraph.css +115 -0
- package/dist/collection/components/text/cura-paragraph/cura-paragraph.js +150 -0
- package/dist/collection/components/text/cura-paragraph/cura-paragraph.js.map +1 -0
- package/dist/collection/components/text/cura-paragraph/cura-paragraph.stories.js +94 -0
- package/dist/collection/components/text/cura-paragraph/cura-paragraph.stories.js.map +1 -0
- package/dist/collection/index.js +2 -0
- package/dist/collection/index.js.map +1 -0
- package/dist/collection/rededor-cura-start.js +10 -0
- package/dist/collection/rededor-cura-start.js.map +1 -0
- package/dist/collection/stories/assets/accessibility.svg +5 -0
- package/dist/collection/stories/assets/discord.svg +15 -0
- package/dist/collection/stories/assets/github.svg +3 -0
- package/dist/collection/stories/assets/tutorials.svg +12 -0
- package/dist/collection/stories/assets/youtube.svg +4 -0
- package/dist/collection/stories/olds/Button.js +21 -0
- package/dist/collection/stories/olds/Button.st.js +50 -0
- package/dist/collection/stories/olds/Header.js +47 -0
- package/dist/collection/stories/olds/Header.st.js +28 -0
- package/dist/collection/stories/olds/Page.js +94 -0
- package/dist/collection/stories/olds/Page.st.js +27 -0
- package/dist/collection/utils/utils.js +16 -0
- package/dist/collection/utils/utils.js.map +1 -0
- package/dist/collection/utils/utils.spec.js +16 -0
- package/dist/collection/utils/utils.spec.js.map +1 -0
- package/dist/components/cura-accordion-item.d.ts +11 -0
- package/dist/components/cura-accordion-item.js +76 -0
- package/dist/components/cura-accordion-item.js.map +1 -0
- package/dist/components/cura-accordion.d.ts +11 -0
- package/dist/components/cura-accordion.js +120 -0
- package/dist/components/cura-accordion.js.map +1 -0
- package/dist/components/cura-button-outline.d.ts +11 -0
- package/dist/components/cura-button-outline.js +123 -0
- package/dist/components/cura-button-outline.js.map +1 -0
- package/dist/components/cura-button-transparent.d.ts +11 -0
- package/dist/components/cura-button-transparent.js +123 -0
- package/dist/components/cura-button-transparent.js.map +1 -0
- package/dist/components/cura-button.d.ts +11 -0
- package/dist/components/cura-button.js +123 -0
- package/dist/components/cura-button.js.map +1 -0
- package/dist/components/cura-display.d.ts +11 -0
- package/dist/components/cura-display.js +89 -0
- package/dist/components/cura-display.js.map +1 -0
- package/dist/components/cura-heading.d.ts +11 -0
- package/dist/components/cura-heading.js +94 -0
- package/dist/components/cura-heading.js.map +1 -0
- package/dist/components/cura-icon.d.ts +11 -0
- package/dist/components/cura-icon.js +8 -0
- package/dist/components/cura-icon.js.map +1 -0
- package/dist/components/cura-icon2.js +79 -0
- package/dist/components/cura-icon2.js.map +1 -0
- package/dist/components/cura-icons-view.d.ts +11 -0
- package/dist/components/cura-icons-view.js +51 -0
- package/dist/components/cura-icons-view.js.map +1 -0
- package/dist/components/cura-loader-circle.d.ts +11 -0
- package/dist/components/cura-loader-circle.js +8 -0
- package/dist/components/cura-loader-circle.js.map +1 -0
- package/dist/components/cura-loader-circle2.js +51 -0
- package/dist/components/cura-loader-circle2.js.map +1 -0
- package/dist/components/cura-page-template.d.ts +11 -0
- package/dist/components/cura-page-template.js +49 -0
- package/dist/components/cura-page-template.js.map +1 -0
- package/dist/components/cura-paragraph.d.ts +11 -0
- package/dist/components/cura-paragraph.js +87 -0
- package/dist/components/cura-paragraph.js.map +1 -0
- package/dist/components/index.d.ts +39 -0
- package/dist/components/index.js +547 -0
- package/dist/components/index.js.map +1 -0
- package/dist/cura/cura.esm.js +2 -0
- package/dist/cura/cura.esm.js.map +1 -0
- package/dist/cura/cura.js +133 -0
- package/dist/cura/index.esm.js +2 -0
- package/dist/cura/index.esm.js.map +1 -0
- package/dist/cura/p-118112e5.system.js +14 -0
- package/dist/cura/p-118112e5.system.js.map +1 -0
- package/dist/cura/p-183305c3.js +2 -0
- package/dist/cura/p-183305c3.js.map +1 -0
- package/dist/cura/p-319699df.entry.js +2 -0
- package/dist/cura/p-319699df.entry.js.map +1 -0
- package/dist/cura/p-3f6aaefc.system.js +2 -0
- package/dist/cura/p-3f6aaefc.system.js.map +1 -0
- package/dist/cura/p-46d20db3.js +3 -0
- package/dist/cura/p-46d20db3.js.map +1 -0
- package/dist/cura/p-50ea2036.system.js +2 -0
- package/dist/cura/p-50ea2036.system.js.map +1 -0
- package/dist/cura/p-5250cb43.system.js +2 -0
- package/dist/cura/p-5250cb43.system.js.map +1 -0
- package/dist/cura/p-5cc3c8bd.system.entry.js +2 -0
- package/dist/cura/p-5cc3c8bd.system.entry.js.map +1 -0
- package/dist/cura/p-788e035b.system.js +2 -0
- package/dist/cura/p-788e035b.system.js.map +1 -0
- package/dist/cura/p-beab48cd.js +13 -0
- package/dist/cura/p-beab48cd.js.map +1 -0
- package/dist/cura/p-c0c00396.system.js +3 -0
- package/dist/cura/p-c0c00396.system.js.map +1 -0
- package/dist/cura/p-d5c64a5f.js +2 -0
- package/dist/cura/p-d5c64a5f.js.map +1 -0
- package/dist/esm/app-globals-cc003eaf.js +509 -0
- package/dist/esm/app-globals-cc003eaf.js.map +1 -0
- package/dist/esm/css-shim-d13f0738.js +6 -0
- package/dist/esm/css-shim-d13f0738.js.map +1 -0
- package/dist/esm/cura-accordion_12.entry.js +659 -0
- package/dist/esm/cura-accordion_12.entry.js.map +1 -0
- package/dist/esm/cura.js +31 -0
- package/dist/esm/cura.js.map +1 -0
- package/dist/esm/index-d99da69e.js +2216 -0
- package/dist/esm/index-d99da69e.js.map +1 -0
- package/dist/esm/index.js +3 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/loader.js +38 -0
- package/dist/esm/loader.js.map +1 -0
- package/dist/esm/polyfills/core-js.js +11 -0
- package/dist/esm/polyfills/css-shim.js +1 -0
- package/dist/esm/polyfills/dom.js +79 -0
- package/dist/esm/polyfills/es5-html-element.js +1 -0
- package/dist/esm/polyfills/index.js +34 -0
- package/dist/esm/polyfills/system.js +6 -0
- package/dist/esm/shadow-css-07b0c8c8.js +389 -0
- package/dist/esm/shadow-css-07b0c8c8.js.map +1 -0
- package/dist/esm-es5/app-globals-cc003eaf.js +2 -0
- package/dist/esm-es5/app-globals-cc003eaf.js.map +1 -0
- package/dist/esm-es5/css-shim-d13f0738.js +2 -0
- package/dist/esm-es5/css-shim-d13f0738.js.map +1 -0
- package/dist/esm-es5/cura-accordion_12.entry.js +2 -0
- package/dist/esm-es5/cura-accordion_12.entry.js.map +1 -0
- package/dist/esm-es5/cura.js +2 -0
- package/dist/esm-es5/cura.js.map +1 -0
- package/dist/esm-es5/index-d99da69e.js +3 -0
- package/dist/esm-es5/index-d99da69e.js.map +1 -0
- package/dist/esm-es5/index.js +2 -0
- package/dist/esm-es5/index.js.map +1 -0
- package/dist/esm-es5/loader.js +2 -0
- package/dist/esm-es5/loader.js.map +1 -0
- package/dist/esm-es5/shadow-css-07b0c8c8.js +13 -0
- package/dist/esm-es5/shadow-css-07b0c8c8.js.map +1 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/loader/cdn.js +3 -0
- package/dist/loader/index.cjs.js +3 -0
- package/dist/loader/index.d.ts +21 -0
- package/dist/loader/index.es2017.js +3 -0
- package/dist/loader/index.js +4 -0
- package/dist/loader/package.json +11 -0
- package/dist/types/api/cura-api.d.ts +6 -0
- package/dist/types/api/cura-api.type.d.ts +65 -0
- package/dist/types/api/modules/cura-theme-breakpoints-module.d.ts +5 -0
- package/dist/types/api/modules/cura-theme-colors-module.d.ts +48 -0
- package/dist/types/api/modules/cura-theme-fonts-module.d.ts +24 -0
- package/dist/types/api/modules/cura-theme-module.d.ts +32 -0
- package/dist/types/api/modules/cura-theme-spacing-module.d.ts +6 -0
- package/dist/types/api/theme-presets/static.d.ts +69 -0
- package/dist/types/api/theme-presets/theme-default.d.ts +46 -0
- package/dist/types/api/theme-presets/theme-legacy-default.d.ts +43 -0
- package/dist/types/api/theme-presets/theme-maternity.d.ts +43 -0
- package/dist/types/api/theme-presets/theme-oncology.d.ts +50 -0
- package/dist/types/api/theme-presets/theme-presets.d.ts +181 -0
- package/dist/types/assets/icons/iconset-default-list.d.ts +2 -0
- package/dist/types/components/accordion/cura-accordion/cura-accordion.d.ts +39 -0
- package/dist/types/components/accordion/cura-accordion/cura-accordion.stories.d.ts +154 -0
- package/dist/types/components/accordion/cura-accordion-item/cura-accordion-item.d.ts +29 -0
- package/dist/types/components/buttons/cura-button/cura-button.d.ts +61 -0
- package/dist/types/components/buttons/cura-button/cura-button.stories.d.ts +171 -0
- package/dist/types/components/buttons/cura-button-outline/cura-button-outline.d.ts +61 -0
- package/dist/types/components/buttons/cura-button-outline/cura-button-outline.stories.d.ts +171 -0
- package/dist/types/components/buttons/cura-button-transparent/cura-button-transparent.d.ts +61 -0
- package/dist/types/components/buttons/cura-button-transparent/cura-button-transparent.stories.d.ts +171 -0
- package/dist/types/components/cura-icon/cura-icon.d.ts +56 -0
- package/dist/types/components/cura-icon/cura-icon.stories.d.ts +65 -0
- package/dist/types/components/cura-icons-view/cura-icons-view.d.ts +7 -0
- package/dist/types/components/cura-icons-view/cura-icons-view.stories.d.ts +7 -0
- package/dist/types/components/cura-page-template/cura-page-template.d.ts +8 -0
- package/dist/types/components/loaders/cura-loader-circle/cura-loader-circle.d.ts +23 -0
- package/dist/types/components/loaders/cura-loader-circle/cura-loader-circle.stories.d.ts +43 -0
- package/dist/types/components/text/cura-display/cura-display.d.ts +38 -0
- package/dist/types/components/text/cura-display/cura-display.stories.d.ts +76 -0
- package/dist/types/components/text/cura-heading/cura-heading.d.ts +43 -0
- package/dist/types/components/text/cura-heading/cura-heading.stories.d.ts +90 -0
- package/dist/types/components/text/cura-paragraph/cura-paragraph.d.ts +37 -0
- package/dist/types/components/text/cura-paragraph/cura-paragraph.stories.d.ts +74 -0
- package/dist/types/components.d.ts +688 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/rededor-cura-start.d.ts +9 -0
- package/dist/types/stencil-public-runtime.d.ts +1638 -0
- package/dist/types/utils/utils.d.ts +2 -0
- package/package.json +4 -6
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["ThemeDefault","color","primary","secondary","accent","spacing","base","font","size","body","heading","display","weights","thin","light","regular","medium","bold","black","ThemeMaternity","Object","assign","ThemeOncology","aux","ThemeLegacyDefault","ThemePresets","default","maternidade","oncologia","legacyDefault","Static","success","info","error","warning","neutral","breakpoints","xsmall","min","max","small","large","xlarge","CuraThemeColorsModule","constructor","this","NeutralDepthAlias","purewhite","white","pale","lighter","dark","darker","ColorDepthAlias","getColor","colorWithDepth","opacity","depth","splitColorDepth","staticColor","getStatic","getDynamic","colorObj","alias","_a","_b","_c","themeVar","getComputedStyle","document","documentElement","getPropertyValue","toLowerCase","split","CuraThemeSpacingModule","curaSpacing","getSpacing","CuraThemeFontsModule","getSize","getFamily","type","curaFontFamilyCSSVar","getWeights","keys","forEach","key","CuraThemeBreakpointsModule","get","position","breakpoint","CuraThemeModule","prefix","colors","fonts","setCssVar","prop","path","varName","groupPath","rootElement","style","setProperty","a","b","isObject","val","Array","isArray","mergeObject","from","to","entries","e","buildCssVars","obj","window","load","theme","preset","setCustom","customTheme","customTag","name","console","log","fromPreset","newTheme","JSON","parse","stringify","definitions","CuraAPI","config","localAssetsPath","themeModule","themeTag","customThemeDefinitions","CuraInit","api","dispatchEvent","CustomEvent","detail","onReady","globalScripts","appGlobalScript"],"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-legacy-default.ts","./src/api/theme-presets/theme-presets.ts","./src/api/theme-presets/static.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","./src/api/cura-api.ts","./src/rededor-cura-start.ts","@stencil/core/internal/app-globals"],"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: \"'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","/**\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: 325,\n light: 325,\n regular: 325,\n medium: 350,\n bold: 400,\n black: 425\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 * 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};\n","import { ThemeDefault } from './theme-default';\nimport { ThemeMaternity } from './theme-maternity';\nimport { ThemeOncology } from './theme-oncology';\nimport { ThemeLegacyDefault } from './theme-legacy-default';\n\nexport const ThemePresets = {\n 'default': ThemeDefault,\n 'maternidade': ThemeMaternity,\n 'oncologia': ThemeOncology,\n 'legacyDefault': ThemeLegacyDefault\n};\n","/**\n * Static\n */\nexport const Static = {\n /* Colors */\n color: {\n success: {\n '100': '223,246,233',\n '300': '148,225,181',\n '500': '95,210,144',\n '700': '49,115,77',\n '900': '19,42,29',\n },\n info: {\n '100': '207,226,255',\n '300': '149,191,255',\n '500': '110,168,255',\n '700': '66,100,153',\n '900': '37,56,85',\n },\n error: {\n '100': '251,221,221',\n '300': '242,143,143',\n '500': '235,87,87',\n '700': '157,58,58',\n '900': '47,17,17',\n },\n warning: {\n '100': '252,250,196',\n '300': '248,244,137',\n '500': '245,239,78',\n '700': '108,106,32',\n '900': '49,48,16',\n },\n neutral: {\n '0': '255,255,255',\n '100': '246,246,246',\n '200': '233,233,233',\n '300': '226,226,226',\n '400': '212,212,212',\n '500': '183,183,183',\n '600': '146,146,146',\n '700': '110,110,110',\n '800': '74,74,74',\n '900': '38,38,38',\n },\n },\n breakpoints: {\n xsmall: {\n min: 0,\n max: 480\n },\n small: {\n min: 481,\n max: 768\n },\n medium: {\n min: 769,\n max: 992\n },\n large: {\n min: 993,\n max: 1919\n },\n xlarge: {\n min: 1920,\n max: 4096\n }\n }\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);\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) 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\n rootElement: HTMLElement;\n prefix = '--cura';\n colors = new CuraThemeColorsModule();\n spacing = new CuraThemeSpacingModule();\n fonts = new CuraThemeFontsModule();\n breakpoints = new CuraThemeBreakpointsModule();\n\n constructor() {\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 /**\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\n ? ThemePresets[customTheme.fromPreset]\n : 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) => {\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]);\n } else {\n this.setCssVar(e, path);\n }\n }\n }\n}\n","import { CuraConfig, APIThemeFunctions, CuraCustomTheme } from './cura-api.type';\nimport CuraThemeModule from './modules/cura-theme-module';\n\nexport default class CuraAPI {\n\n theme: APIThemeFunctions;\n localAssetsPath: string;\n\n constructor (config?: CuraConfig) {\n this.localAssetsPath = config && config.localAssetsPath ? config.localAssetsPath : `/assets`;\n const themeModule = new CuraThemeModule();\n this.theme = {\n load: function(themeTag: string) { themeModule.load(themeTag); },\n setCustom: function(customThemeDefinitions: CuraCustomTheme) { themeModule.setCustom(customThemeDefinitions); },\n colors: {\n getColor: function(colorWithDepth?: string, opacity?: number) { return themeModule.colors.getColor(colorWithDepth, opacity) },\n },\n fonts: {\n getFamily: function(type?: string) { return themeModule.fonts.getFamily(type) },\n getWeights: function() { return themeModule.fonts.getWeights() },\n getSize: function() { return themeModule.fonts.getSize() },\n getColor: function() { return themeModule.fonts.getColor() }\n },\n spacing: {\n getSpacing: function() { return themeModule.spacing.getSpacing(); },\n },\n breakpoints: {\n get: function(size?: 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge', position?: 'min' | 'max') { return themeModule.breakpoints.get(size, position); }\n }\n };\n if (config && config.customTheme) {\n this.theme.setCustom(config.customTheme);\n } else {\n const theme = config && config.theme ? config.theme : 'default';\n this.theme.load(theme);\n }\n }\n\n}\n","import CuraAPI from './api/cura-api';\nimport { CuraConfig } from './api/cura-api.type';\n// import { setAssetPath } from '@stencil/core';\n\n// setAssetPath(import.meta.url);\ndeclare global {\n interface Window {\n CuraAPI?: CuraAPI,\n CuraInit?: CuraConfig\n }\n}\n\nexport default function() {\n const config = window.CuraInit;\n window.CuraAPI = config ? new CuraAPI(config) : new CuraAPI();\n const api = window.CuraAPI;\n window.dispatchEvent(new CustomEvent(\"CuraAPIReady\", { detail: {api} }));\n if (config && typeof config.onReady === 'function') config.onReady(api);\n}\n","import appGlobalScript from '/Users/fellipesoares/Code/cura/packages/component-lib/src/rededor-cura-start.ts';\nexport const globalScripts = appGlobalScript;\n"],"mappings":"AAGO,MAAMA,EAAe,CAE1BC,MAAO,CACLC,QAAS,CACP,IAAO,cACP,IAAO,aACP,IAAO,WACP,IAAO,WACP,IAAO,WAETC,UAAW,CACT,IAAO,cACP,IAAO,cACP,IAAO,cACP,IAAO,aACP,IAAO,YAETC,OAAQ,CACN,IAAO,cACP,IAAO,aACP,IAAO,YACP,IAAO,aACP,IAAO,cAIXC,QAAS,CACPC,KAAM,GAGRC,KAAM,CACJC,KAAM,OACNP,MAAO,UACPQ,KAAM,yCACNC,QAAS,yCACTC,QAAS,yCACTC,QAAS,CACPC,KAAM,IACNC,MAAO,IACPC,QAAS,IACTC,OAAQ,IACRC,KAAM,IACNC,MAAO,OCxCN,MA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EAAYlG,YAAYmD,IAAI/E,EAAMgF,EAAU,IAG5J,GAAI4C,GAAUA,EAAOZ,YAAa,CAChC3E,KAAKwE,MAAME,UAAUa,EAAOZ,Y,KACvB,CACL,MAAMH,EAAQe,GAAUA,EAAOf,MAAQe,EAAOf,MAAQ,UACtDxE,KAAKwE,MAAMD,KAAKC,E,gBCrBpB,MAAMe,EAASjB,OAAOsB,SACtBtB,OAAOgB,QAAUC,EAAS,IAAID,EAAAC,GAAA,IAAAD,EAC9B,MAAMO,EAAMvB,OAAOgB,QACnBhB,OAAOwB,cAAc,IAAIC,YAAA,gBAAAC,OAAA,CAAAH,UACzB,GAAIN,UAAiBA,EAAOU,UAAY,WAAYV,EAAOU,QAAQJ,EACrE,CCjBY,MAACK,EAAgBC,S"}
|
|
@@ -0,0 +1,509 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cura Default Theme
|
|
3
|
+
*/
|
|
4
|
+
const ThemeDefault = {
|
|
5
|
+
/* Colors */
|
|
6
|
+
color: {
|
|
7
|
+
primary: {
|
|
8
|
+
'100': '113,197,232',
|
|
9
|
+
'300': '68,142,205',
|
|
10
|
+
'500': '0,61,165',
|
|
11
|
+
'700': '0,48,117',
|
|
12
|
+
'900': '0,40,85'
|
|
13
|
+
},
|
|
14
|
+
secondary: {
|
|
15
|
+
'100': '245,236,227',
|
|
16
|
+
'300': '221,192,162',
|
|
17
|
+
'500': '204,160,116',
|
|
18
|
+
'700': '136,107,77',
|
|
19
|
+
'900': '41,32,23'
|
|
20
|
+
},
|
|
21
|
+
accent: {
|
|
22
|
+
'100': '255,194,123',
|
|
23
|
+
'300': '255,168,74',
|
|
24
|
+
'500': '255,130,0',
|
|
25
|
+
'700': '215,114,10',
|
|
26
|
+
'900': '155,90,26'
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
/* Spacing */
|
|
30
|
+
spacing: {
|
|
31
|
+
base: 4,
|
|
32
|
+
},
|
|
33
|
+
/* Fonts */
|
|
34
|
+
font: {
|
|
35
|
+
size: '14px',
|
|
36
|
+
color: '#4A4A4A',
|
|
37
|
+
body: "'Roboto', Arial, Helvetica, sans-serif",
|
|
38
|
+
heading: "'Roboto', Arial, Helvetica, sans-serif",
|
|
39
|
+
display: "'Roboto', Arial, Helvetica, sans-serif",
|
|
40
|
+
weights: {
|
|
41
|
+
thin: 100,
|
|
42
|
+
light: 300,
|
|
43
|
+
regular: 400,
|
|
44
|
+
medium: 500,
|
|
45
|
+
bold: 700,
|
|
46
|
+
black: 900
|
|
47
|
+
},
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Maternity Theme
|
|
53
|
+
*/
|
|
54
|
+
const ThemeMaternity = Object.assign(Object.assign({}, ThemeDefault), {
|
|
55
|
+
/* Custom */
|
|
56
|
+
/* Colors */
|
|
57
|
+
color: {
|
|
58
|
+
primary: {
|
|
59
|
+
'100': '248,227,226',
|
|
60
|
+
'300': '255,179,171',
|
|
61
|
+
'500': '218,113,111',
|
|
62
|
+
'700': '145,75,74',
|
|
63
|
+
'900': '73,38,37'
|
|
64
|
+
},
|
|
65
|
+
secondary: {
|
|
66
|
+
'100': '253,251,249',
|
|
67
|
+
'300': '247,244,238',
|
|
68
|
+
'500': '245,236,227',
|
|
69
|
+
'700': '204,197,189',
|
|
70
|
+
'900': '163,157,151'
|
|
71
|
+
},
|
|
72
|
+
accent: {
|
|
73
|
+
'100': '236,239,249',
|
|
74
|
+
'300': '133,153,203',
|
|
75
|
+
'500': '11,20,151',
|
|
76
|
+
'700': '7,13,101',
|
|
77
|
+
'900': '4,7,50'
|
|
78
|
+
}
|
|
79
|
+
}, font: {
|
|
80
|
+
size: '14px',
|
|
81
|
+
color: '#4A4A4A',
|
|
82
|
+
body: "'Gotham', Arial, Helvetica, sans-serif",
|
|
83
|
+
heading: "'Gotham', Arial, Helvetica, sans-serif",
|
|
84
|
+
display: "'Gotham', Arial, Helvetica, sans-serif",
|
|
85
|
+
weights: {
|
|
86
|
+
thin: 325,
|
|
87
|
+
light: 325,
|
|
88
|
+
regular: 325,
|
|
89
|
+
medium: 350,
|
|
90
|
+
bold: 400,
|
|
91
|
+
black: 425
|
|
92
|
+
},
|
|
93
|
+
} });
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Oncology Theme
|
|
97
|
+
*/
|
|
98
|
+
const ThemeOncology = Object.assign(Object.assign({}, ThemeDefault), {
|
|
99
|
+
/* Custom */
|
|
100
|
+
/* Colors */
|
|
101
|
+
color: {
|
|
102
|
+
primary: {
|
|
103
|
+
'100': '170,190,225',
|
|
104
|
+
'300': '85,126,196',
|
|
105
|
+
'500': '0,61,166',
|
|
106
|
+
'700': '0,41,111',
|
|
107
|
+
'900': '0,12,33'
|
|
108
|
+
},
|
|
109
|
+
secondary: {
|
|
110
|
+
'100': '205,215,227',
|
|
111
|
+
'300': '155,175,199',
|
|
112
|
+
'500': '104,134,171',
|
|
113
|
+
'700': '54,95,143',
|
|
114
|
+
'900': '4,54,115',
|
|
115
|
+
},
|
|
116
|
+
accent: {
|
|
117
|
+
'100': '153,207,255',
|
|
118
|
+
'300': '71,169,255',
|
|
119
|
+
'500': '0,131,245',
|
|
120
|
+
'700': '0,109,204',
|
|
121
|
+
'900': '0,88,164',
|
|
122
|
+
},
|
|
123
|
+
aux: {
|
|
124
|
+
'100': '218,242,239',
|
|
125
|
+
'300': '132,212,202',
|
|
126
|
+
'500': '71,191,176',
|
|
127
|
+
'700': '33,100,92',
|
|
128
|
+
'900': '14,38,35',
|
|
129
|
+
},
|
|
130
|
+
}, font: {
|
|
131
|
+
size: '14px',
|
|
132
|
+
color: '#4A4A4A',
|
|
133
|
+
body: "'Hanken Grotesk', Arial, Helvetica, sans-serif",
|
|
134
|
+
heading: "'Hanken Grotesk', Arial, Helvetica, sans-serif",
|
|
135
|
+
display: "'Hanken Grotesk', Arial, Helvetica, sans-serif",
|
|
136
|
+
weights: {
|
|
137
|
+
thin: 100,
|
|
138
|
+
light: 300,
|
|
139
|
+
regular: 400,
|
|
140
|
+
medium: 500,
|
|
141
|
+
bold: 700,
|
|
142
|
+
black: 900
|
|
143
|
+
},
|
|
144
|
+
} });
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Legacy Default Theme
|
|
148
|
+
*/
|
|
149
|
+
const ThemeLegacyDefault = Object.assign(Object.assign({}, ThemeDefault), {
|
|
150
|
+
/* Custom */
|
|
151
|
+
/* Colors */
|
|
152
|
+
color: {
|
|
153
|
+
primary: {
|
|
154
|
+
'100': '204,217,231',
|
|
155
|
+
'300': '85,128,174',
|
|
156
|
+
'500': '0,65,134',
|
|
157
|
+
'700': '0,43,89',
|
|
158
|
+
'900': '0,13,27'
|
|
159
|
+
},
|
|
160
|
+
secondary: {
|
|
161
|
+
'100': '238,232,206',
|
|
162
|
+
'300': '198,180,92',
|
|
163
|
+
'500': '170,142,11',
|
|
164
|
+
'700': '113,95,7',
|
|
165
|
+
'900': '34,28,2'
|
|
166
|
+
},
|
|
167
|
+
accent: {
|
|
168
|
+
'100': '249,232,213',
|
|
169
|
+
'300': '228,160,79',
|
|
170
|
+
'500': '223,141,44',
|
|
171
|
+
'700': '149,94,29',
|
|
172
|
+
'900': '45,28,9'
|
|
173
|
+
}
|
|
174
|
+
} });
|
|
175
|
+
|
|
176
|
+
const ThemePresets = {
|
|
177
|
+
'default': ThemeDefault,
|
|
178
|
+
'maternidade': ThemeMaternity,
|
|
179
|
+
'oncologia': ThemeOncology,
|
|
180
|
+
'legacyDefault': ThemeLegacyDefault
|
|
181
|
+
};
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* Static
|
|
185
|
+
*/
|
|
186
|
+
const Static = {
|
|
187
|
+
/* Colors */
|
|
188
|
+
color: {
|
|
189
|
+
success: {
|
|
190
|
+
'100': '223,246,233',
|
|
191
|
+
'300': '148,225,181',
|
|
192
|
+
'500': '95,210,144',
|
|
193
|
+
'700': '49,115,77',
|
|
194
|
+
'900': '19,42,29',
|
|
195
|
+
},
|
|
196
|
+
info: {
|
|
197
|
+
'100': '207,226,255',
|
|
198
|
+
'300': '149,191,255',
|
|
199
|
+
'500': '110,168,255',
|
|
200
|
+
'700': '66,100,153',
|
|
201
|
+
'900': '37,56,85',
|
|
202
|
+
},
|
|
203
|
+
error: {
|
|
204
|
+
'100': '251,221,221',
|
|
205
|
+
'300': '242,143,143',
|
|
206
|
+
'500': '235,87,87',
|
|
207
|
+
'700': '157,58,58',
|
|
208
|
+
'900': '47,17,17',
|
|
209
|
+
},
|
|
210
|
+
warning: {
|
|
211
|
+
'100': '252,250,196',
|
|
212
|
+
'300': '248,244,137',
|
|
213
|
+
'500': '245,239,78',
|
|
214
|
+
'700': '108,106,32',
|
|
215
|
+
'900': '49,48,16',
|
|
216
|
+
},
|
|
217
|
+
neutral: {
|
|
218
|
+
'0': '255,255,255',
|
|
219
|
+
'100': '246,246,246',
|
|
220
|
+
'200': '233,233,233',
|
|
221
|
+
'300': '226,226,226',
|
|
222
|
+
'400': '212,212,212',
|
|
223
|
+
'500': '183,183,183',
|
|
224
|
+
'600': '146,146,146',
|
|
225
|
+
'700': '110,110,110',
|
|
226
|
+
'800': '74,74,74',
|
|
227
|
+
'900': '38,38,38',
|
|
228
|
+
},
|
|
229
|
+
},
|
|
230
|
+
breakpoints: {
|
|
231
|
+
xsmall: {
|
|
232
|
+
min: 0,
|
|
233
|
+
max: 480
|
|
234
|
+
},
|
|
235
|
+
small: {
|
|
236
|
+
min: 481,
|
|
237
|
+
max: 768
|
|
238
|
+
},
|
|
239
|
+
medium: {
|
|
240
|
+
min: 769,
|
|
241
|
+
max: 992
|
|
242
|
+
},
|
|
243
|
+
large: {
|
|
244
|
+
min: 993,
|
|
245
|
+
max: 1919
|
|
246
|
+
},
|
|
247
|
+
xlarge: {
|
|
248
|
+
min: 1920,
|
|
249
|
+
max: 4096
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
};
|
|
253
|
+
|
|
254
|
+
class CuraThemeColorsModule {
|
|
255
|
+
constructor() {
|
|
256
|
+
this.NeutralDepthAlias = {
|
|
257
|
+
'purewhite': '0',
|
|
258
|
+
'white': '100',
|
|
259
|
+
'pale': '200',
|
|
260
|
+
'lighter': '300',
|
|
261
|
+
'light': '400',
|
|
262
|
+
'base': '500',
|
|
263
|
+
'medium': '600',
|
|
264
|
+
'dark': '700',
|
|
265
|
+
'darker': '800',
|
|
266
|
+
'black': '900',
|
|
267
|
+
};
|
|
268
|
+
this.ColorDepthAlias = {
|
|
269
|
+
'lighter': '100',
|
|
270
|
+
'light': '300',
|
|
271
|
+
'base': '500',
|
|
272
|
+
'dark': '700',
|
|
273
|
+
'darker': '900'
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
/**
|
|
277
|
+
* Get theme color.
|
|
278
|
+
* @param colorWithDepth string Ex.: primary-light
|
|
279
|
+
* @returns RGBA value.
|
|
280
|
+
*/
|
|
281
|
+
getColor(colorWithDepth = "primary-base", opacity = 1) {
|
|
282
|
+
const { color, depth } = this.splitColorDepth(colorWithDepth);
|
|
283
|
+
const staticColor = this.getStatic(color, depth);
|
|
284
|
+
if (staticColor)
|
|
285
|
+
return staticColor;
|
|
286
|
+
return this.getDynamic(color, depth, opacity);
|
|
287
|
+
}
|
|
288
|
+
/**
|
|
289
|
+
* Internal: Look for static color by name and depth.
|
|
290
|
+
* @param color Color name.
|
|
291
|
+
* @param depth Depth number or alias.
|
|
292
|
+
* @returns RGBA value.
|
|
293
|
+
*/
|
|
294
|
+
getStatic(color, depth, opacity = 1) {
|
|
295
|
+
var _a, _b, _c;
|
|
296
|
+
const colorObj = Static.color[color];
|
|
297
|
+
if (!colorObj)
|
|
298
|
+
return null;
|
|
299
|
+
const alias = color === 'neutral' ? this.NeutralDepthAlias[depth] : this.ColorDepthAlias[depth];
|
|
300
|
+
return ((_a = Static.color[color]) === null || _a === void 0 ? void 0 : _a[alias])
|
|
301
|
+
? `rgba(${(_b = Static.color[color]) === null || _b === void 0 ? void 0 : _b[alias]}, ${opacity})`
|
|
302
|
+
: `rgba(${(_c = Static.color[color]) === null || _c === void 0 ? void 0 : _c[depth]}, ${opacity})`;
|
|
303
|
+
}
|
|
304
|
+
/**
|
|
305
|
+
* Internal: Look for theme dynamic colors.
|
|
306
|
+
* @param color Color name.
|
|
307
|
+
* @param depth Color depth.
|
|
308
|
+
* @returns RGBA value.
|
|
309
|
+
*/
|
|
310
|
+
getDynamic(color, depth, opacity) {
|
|
311
|
+
const themeVar = this.ColorDepthAlias[depth]
|
|
312
|
+
? `--cura-color-${color}-${this.ColorDepthAlias[depth]}`
|
|
313
|
+
: `--cura-color-${color}-${depth}`;
|
|
314
|
+
return getComputedStyle(document.documentElement).getPropertyValue(themeVar)
|
|
315
|
+
? `rgba(var(${themeVar}), ${opacity})`
|
|
316
|
+
: `rgba(var(--cura-color-primary-500), ${opacity})`;
|
|
317
|
+
}
|
|
318
|
+
/**
|
|
319
|
+
* Internal: Split color strings
|
|
320
|
+
* @param colorWithDepth Color string [color]-[depth]. Ex.: primary-dark.
|
|
321
|
+
* @returns Object { color: string, depth: string }.
|
|
322
|
+
*/
|
|
323
|
+
splitColorDepth(colorWithDepth) {
|
|
324
|
+
const [color, depth] = colorWithDepth.toLowerCase().split(/-(.*)/);
|
|
325
|
+
return { color: color !== null && color !== void 0 ? color : "primary", depth: depth !== null && depth !== void 0 ? depth : "base" };
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
class CuraThemeSpacingModule {
|
|
330
|
+
constructor() {
|
|
331
|
+
this.curaSpacing = '--cura-spacing-base';
|
|
332
|
+
}
|
|
333
|
+
/** Returns the base spacing var defined in the theme */
|
|
334
|
+
getSpacing() {
|
|
335
|
+
if (getComputedStyle(document.body).getPropertyValue(this.curaSpacing)) {
|
|
336
|
+
return `var(${this.curaSpacing})`;
|
|
337
|
+
}
|
|
338
|
+
return '4';
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
class CuraThemeFontsModule {
|
|
343
|
+
constructor() {
|
|
344
|
+
/**
|
|
345
|
+
* Get the CSS variable related to the font size base defined by the theme.
|
|
346
|
+
* @returns Related CSS variable as a string.
|
|
347
|
+
*/
|
|
348
|
+
this.getSize = () => `var(--cura-font-size)`;
|
|
349
|
+
/**
|
|
350
|
+
* Get CSS variable related to the font color defined by the theme.
|
|
351
|
+
* @returns Related CSS variable as a string.
|
|
352
|
+
*/
|
|
353
|
+
this.getColor = () => `var(--cura-font-color)`;
|
|
354
|
+
}
|
|
355
|
+
/**
|
|
356
|
+
* Get the CSS variable related to the font family defined by the theme.
|
|
357
|
+
* @param type 'body' | 'heading' | 'display'
|
|
358
|
+
* @returns Related css variable as a string.
|
|
359
|
+
*/
|
|
360
|
+
getFamily(type = "body") {
|
|
361
|
+
const curaFontFamilyCSSVar = `--cura-font-${type.toLowerCase()}`;
|
|
362
|
+
return getComputedStyle(document.body).getPropertyValue(curaFontFamilyCSSVar)
|
|
363
|
+
? `var(${curaFontFamilyCSSVar})`
|
|
364
|
+
: 'var(--cura-font-body)';
|
|
365
|
+
}
|
|
366
|
+
/**
|
|
367
|
+
* Get the CSS variables related to font weights defined by the theme.
|
|
368
|
+
* @returns Object with CSS vars weights definitions for thin, light, regular, medium, bold and black fonts.
|
|
369
|
+
*/
|
|
370
|
+
getWeights() {
|
|
371
|
+
const weights = {};
|
|
372
|
+
Object.keys(ThemeDefault.font.weights).forEach((key) => weights[key] = `var(--cura-font-weights-${key})`);
|
|
373
|
+
return weights;
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
class CuraThemeBreakpointsModule {
|
|
378
|
+
constructor() { }
|
|
379
|
+
/** Returns the base spacing var defined in the theme */
|
|
380
|
+
get(size = null, position = null) {
|
|
381
|
+
if (size) {
|
|
382
|
+
const breakpoint = position ? Static.breakpoints[size][position] : Static.breakpoints[size];
|
|
383
|
+
if (breakpoint)
|
|
384
|
+
return breakpoint;
|
|
385
|
+
}
|
|
386
|
+
return Static.breakpoints;
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
class CuraThemeModule {
|
|
391
|
+
constructor() {
|
|
392
|
+
this.prefix = '--cura';
|
|
393
|
+
this.colors = new CuraThemeColorsModule();
|
|
394
|
+
this.spacing = new CuraThemeSpacingModule();
|
|
395
|
+
this.fonts = new CuraThemeFontsModule();
|
|
396
|
+
this.breakpoints = new CuraThemeBreakpointsModule();
|
|
397
|
+
/* Private */
|
|
398
|
+
/** Set css var based on object structure */
|
|
399
|
+
this.setCssVar = (prop, path) => {
|
|
400
|
+
const varName = this.groupPath(path, prop[0]);
|
|
401
|
+
this.rootElement.style.setProperty(varName, prop[1]);
|
|
402
|
+
};
|
|
403
|
+
this.groupPath = (a, b) => `${a}-${b}`;
|
|
404
|
+
this.isObject = (val) => {
|
|
405
|
+
return val && typeof val === 'object' && !Array.isArray(val);
|
|
406
|
+
};
|
|
407
|
+
/** Deep merge objects */
|
|
408
|
+
this.mergeObject = (from, to) => {
|
|
409
|
+
const entries = Object.entries(from);
|
|
410
|
+
for (let e of entries) {
|
|
411
|
+
if (this.isObject(e[1])) {
|
|
412
|
+
this.mergeObject(e[1], to[e[0]]);
|
|
413
|
+
}
|
|
414
|
+
else {
|
|
415
|
+
to[e[0]] = e[1];
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
};
|
|
419
|
+
/** Set css vars from preset object */
|
|
420
|
+
this.buildCssVars = (path, obj) => {
|
|
421
|
+
const entries = Object.entries(obj);
|
|
422
|
+
for (let e of entries) {
|
|
423
|
+
if (this.isObject(e[1])) {
|
|
424
|
+
this.buildCssVars(this.groupPath(path, e[0]), e[1]);
|
|
425
|
+
}
|
|
426
|
+
else {
|
|
427
|
+
this.setCssVar(e, path);
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
};
|
|
431
|
+
this.rootElement = window.document.documentElement;
|
|
432
|
+
}
|
|
433
|
+
/**
|
|
434
|
+
* Load a theme.
|
|
435
|
+
* @param theme Theme tag.
|
|
436
|
+
*/
|
|
437
|
+
load(theme = 'default') {
|
|
438
|
+
const preset = ThemePresets[theme] ? ThemePresets[theme] : ThemePresets.default;
|
|
439
|
+
this.buildCssVars(this.prefix, preset);
|
|
440
|
+
}
|
|
441
|
+
/**
|
|
442
|
+
* Define a custom theme
|
|
443
|
+
* @param customTheme Custom theme object definition
|
|
444
|
+
*/
|
|
445
|
+
setCustom(customTheme) {
|
|
446
|
+
const customTag = customTheme.name;
|
|
447
|
+
if (customTag in ThemePresets) {
|
|
448
|
+
console.log('Error building custom theme. Theme %s already exists. Loading default theme.', customTag);
|
|
449
|
+
this.load('default');
|
|
450
|
+
}
|
|
451
|
+
else {
|
|
452
|
+
const preset = customTheme.fromPreset && customTheme.fromPreset in ThemePresets
|
|
453
|
+
? ThemePresets[customTheme.fromPreset]
|
|
454
|
+
: ThemePresets.default;
|
|
455
|
+
const newTheme = Object.assign({}, JSON.parse(JSON.stringify(preset)));
|
|
456
|
+
this.mergeObject(customTheme.definitions, newTheme);
|
|
457
|
+
ThemePresets[customTag] = newTheme;
|
|
458
|
+
this.load(customTag);
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
class CuraAPI {
|
|
464
|
+
constructor(config) {
|
|
465
|
+
this.localAssetsPath = config && config.localAssetsPath ? config.localAssetsPath : `/assets`;
|
|
466
|
+
const themeModule = new CuraThemeModule();
|
|
467
|
+
this.theme = {
|
|
468
|
+
load: function (themeTag) { themeModule.load(themeTag); },
|
|
469
|
+
setCustom: function (customThemeDefinitions) { themeModule.setCustom(customThemeDefinitions); },
|
|
470
|
+
colors: {
|
|
471
|
+
getColor: function (colorWithDepth, opacity) { return themeModule.colors.getColor(colorWithDepth, opacity); },
|
|
472
|
+
},
|
|
473
|
+
fonts: {
|
|
474
|
+
getFamily: function (type) { return themeModule.fonts.getFamily(type); },
|
|
475
|
+
getWeights: function () { return themeModule.fonts.getWeights(); },
|
|
476
|
+
getSize: function () { return themeModule.fonts.getSize(); },
|
|
477
|
+
getColor: function () { return themeModule.fonts.getColor(); }
|
|
478
|
+
},
|
|
479
|
+
spacing: {
|
|
480
|
+
getSpacing: function () { return themeModule.spacing.getSpacing(); },
|
|
481
|
+
},
|
|
482
|
+
breakpoints: {
|
|
483
|
+
get: function (size, position) { return themeModule.breakpoints.get(size, position); }
|
|
484
|
+
}
|
|
485
|
+
};
|
|
486
|
+
if (config && config.customTheme) {
|
|
487
|
+
this.theme.setCustom(config.customTheme);
|
|
488
|
+
}
|
|
489
|
+
else {
|
|
490
|
+
const theme = config && config.theme ? config.theme : 'default';
|
|
491
|
+
this.theme.load(theme);
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
function appGlobalScript () {
|
|
497
|
+
const config = window.CuraInit;
|
|
498
|
+
window.CuraAPI = config ? new CuraAPI(config) : new CuraAPI();
|
|
499
|
+
const api = window.CuraAPI;
|
|
500
|
+
window.dispatchEvent(new CustomEvent("CuraAPIReady", { detail: { api } }));
|
|
501
|
+
if (config && typeof config.onReady === 'function')
|
|
502
|
+
config.onReady(api);
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
const globalScripts = appGlobalScript;
|
|
506
|
+
|
|
507
|
+
export { globalScripts as g };
|
|
508
|
+
|
|
509
|
+
//# sourceMappingURL=app-globals-cc003eaf.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"app-globals-cc003eaf.js","mappings":"AAAA;;;AAGO,MAAM,YAAY,GAAG;;EAE1B,KAAK,EAAE;IACL,OAAO,EAAE;MACP,KAAK,EAAE,aAAa;MACpB,KAAK,EAAE,YAAY;MACnB,KAAK,EAAE,UAAU;MACjB,KAAK,EAAE,UAAU;MACjB,KAAK,EAAE,SAAS;KACjB;IACD,SAAS,EAAE;MACT,KAAK,EAAE,aAAa;MACpB,KAAK,EAAE,aAAa;MACpB,KAAK,EAAE,aAAa;MACpB,KAAK,EAAE,YAAY;MACnB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,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,EAAE;OACpE;MACD,WAAW,EAAE;QACX,GAAG,EAAE,UAAS,IAAyD,EAAE,QAAwB,IAAI,OAAO,WAAW,CAAC,WAAW,CAAC,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,EAAE;OAC3J;KACH,CAAC;IACD,IAAI,MAAM,IAAI,MAAM,CAAC,WAAW,EAAE;MAChC,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;KAC1C;SAAM;MACL,MAAM,KAAK,GAAG,MAAM,IAAI,MAAM,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,GAAG,SAAS,CAAC;MAChE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;KACxB;GACF;;;;ECvBD,MAAM,MAAM,GAAG,MAAM,CAAC;EACtB,MAAM,CAAC,OAAO,GAAG,MAAM,GAAG,IAAI;EAC9B,MAAM,GAAG,GAAG,MAAM,CAAC,OAAO,CAAC;EAC3B,MAAM,CAAC,aAAa,CAAC,IAAI;EACzB,IAAI,MAAM,IAAI,OAAO,MAAM,CAAC,OAAO,KAAK,UAAU;IAAE,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;AAC1E;;ACjBY,MAAC,aAAa,GAAG;;;;","names":[],"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-legacy-default.ts","./src/api/theme-presets/theme-presets.ts","./src/api/theme-presets/static.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","./src/api/cura-api.ts","./src/rededor-cura-start.ts","@stencil/core/internal/app-globals"],"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: \"'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","/**\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: 325,\n light: 325,\n regular: 325,\n medium: 350,\n bold: 400,\n black: 425\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 * 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};\n","import { ThemeDefault } from './theme-default';\nimport { ThemeMaternity } from './theme-maternity';\nimport { ThemeOncology } from './theme-oncology';\nimport { ThemeLegacyDefault } from './theme-legacy-default';\n\nexport const ThemePresets = {\n 'default': ThemeDefault,\n 'maternidade': ThemeMaternity,\n 'oncologia': ThemeOncology,\n 'legacyDefault': ThemeLegacyDefault\n};\n","/**\n * Static\n */\nexport const Static = {\n /* Colors */\n color: {\n success: {\n '100': '223,246,233',\n '300': '148,225,181',\n '500': '95,210,144',\n '700': '49,115,77',\n '900': '19,42,29',\n },\n info: {\n '100': '207,226,255',\n '300': '149,191,255',\n '500': '110,168,255',\n '700': '66,100,153',\n '900': '37,56,85',\n },\n error: {\n '100': '251,221,221',\n '300': '242,143,143',\n '500': '235,87,87',\n '700': '157,58,58',\n '900': '47,17,17',\n },\n warning: {\n '100': '252,250,196',\n '300': '248,244,137',\n '500': '245,239,78',\n '700': '108,106,32',\n '900': '49,48,16',\n },\n neutral: {\n '0': '255,255,255',\n '100': '246,246,246',\n '200': '233,233,233',\n '300': '226,226,226',\n '400': '212,212,212',\n '500': '183,183,183',\n '600': '146,146,146',\n '700': '110,110,110',\n '800': '74,74,74',\n '900': '38,38,38',\n },\n },\n breakpoints: {\n xsmall: {\n min: 0,\n max: 480\n },\n small: {\n min: 481,\n max: 768\n },\n medium: {\n min: 769,\n max: 992\n },\n large: {\n min: 993,\n max: 1919\n },\n xlarge: {\n min: 1920,\n max: 4096\n }\n }\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);\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) 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\n rootElement: HTMLElement;\n prefix = '--cura';\n colors = new CuraThemeColorsModule();\n spacing = new CuraThemeSpacingModule();\n fonts = new CuraThemeFontsModule();\n breakpoints = new CuraThemeBreakpointsModule();\n\n constructor() {\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 /**\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\n ? ThemePresets[customTheme.fromPreset]\n : 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) => {\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]);\n } else {\n this.setCssVar(e, path);\n }\n }\n }\n}\n","import { CuraConfig, APIThemeFunctions, CuraCustomTheme } from './cura-api.type';\nimport CuraThemeModule from './modules/cura-theme-module';\n\nexport default class CuraAPI {\n\n theme: APIThemeFunctions;\n localAssetsPath: string;\n\n constructor (config?: CuraConfig) {\n this.localAssetsPath = config && config.localAssetsPath ? config.localAssetsPath : `/assets`;\n const themeModule = new CuraThemeModule();\n this.theme = {\n load: function(themeTag: string) { themeModule.load(themeTag); },\n setCustom: function(customThemeDefinitions: CuraCustomTheme) { themeModule.setCustom(customThemeDefinitions); },\n colors: {\n getColor: function(colorWithDepth?: string, opacity?: number) { return themeModule.colors.getColor(colorWithDepth, opacity) },\n },\n fonts: {\n getFamily: function(type?: string) { return themeModule.fonts.getFamily(type) },\n getWeights: function() { return themeModule.fonts.getWeights() },\n getSize: function() { return themeModule.fonts.getSize() },\n getColor: function() { return themeModule.fonts.getColor() }\n },\n spacing: {\n getSpacing: function() { return themeModule.spacing.getSpacing(); },\n },\n breakpoints: {\n get: function(size?: 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge', position?: 'min' | 'max') { return themeModule.breakpoints.get(size, position); }\n }\n };\n if (config && config.customTheme) {\n this.theme.setCustom(config.customTheme);\n } else {\n const theme = config && config.theme ? config.theme : 'default';\n this.theme.load(theme);\n }\n }\n\n}\n","import CuraAPI from './api/cura-api';\nimport { CuraConfig } from './api/cura-api.type';\n// import { setAssetPath } from '@stencil/core';\n\n// setAssetPath(import.meta.url);\ndeclare global {\n interface Window {\n CuraAPI?: CuraAPI,\n CuraInit?: CuraConfig\n }\n}\n\nexport default function() {\n const config = window.CuraInit;\n window.CuraAPI = config ? new CuraAPI(config) : new CuraAPI();\n const api = window.CuraAPI;\n window.dispatchEvent(new CustomEvent(\"CuraAPIReady\", { detail: {api} }));\n if (config && typeof config.onReady === 'function') config.onReady(api);\n}\n","import appGlobalScript from '/Users/fellipesoares/Code/cura/packages/component-lib/src/rededor-cura-start.ts';\nexport const globalScripts = appGlobalScript;\n"],"version":3}
|