@rededor/cura 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/dist/assets/icons/iconset-default-list.ts +1 -0
- package/dist/assets/icons/iconset-default.svg +1 -0
- package/dist/cjs/app-globals-e5cfde65.js +182 -0
- package/dist/cjs/cura-icon_2.cjs.entry.js +52 -0
- package/dist/cjs/cura.cjs.js +21 -0
- package/dist/cjs/dummy-component.cjs.entry.js +19 -0
- package/dist/cjs/index-2f9830d5.js +1362 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/loader.cjs.js +23 -0
- package/dist/collection/api/cura-api.js +17 -0
- package/dist/collection/api/cura-api.type.js +6 -0
- package/dist/collection/api/modules/cura-theme-module.js +74 -0
- package/dist/collection/api/theme-presets/theme-default.js +43 -0
- package/dist/collection/api/theme-presets/theme-maternity.js +26 -0
- package/dist/collection/api/theme-presets/theme-presets.js +6 -0
- package/dist/collection/assets/icons/iconset-default-list.js +1 -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/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/delete.svg +7 -0
- package/dist/collection/assets-raw/icons/default/desktop.svg +6 -0
- package/dist/collection/assets-raw/icons/default/deslike.svg +6 -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/expand.svg +4 -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/hate.svg +6 -0
- package/dist/collection/assets-raw/icons/default/healthPlan.svg +6 -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/info2.svg +12 -0
- package/dist/collection/assets-raw/icons/default/infoCircle.svg +5 -0
- package/dist/collection/assets-raw/icons/default/key.svg +4 -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/like.svg +6 -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/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/love.svg +6 -0
- package/dist/collection/assets-raw/icons/default/mail.svg +6 -0
- package/dist/collection/assets-raw/icons/default/mail2.svg +6 -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/neutral.svg +6 -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/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/profile2.svg +4 -0
- package/dist/collection/assets-raw/icons/default/pulldownG.svg +3 -0
- package/dist/collection/assets-raw/icons/default/pulldownP.svg +3 -0
- package/dist/collection/assets-raw/icons/default/pullupG.svg +3 -0
- package/dist/collection/assets-raw/icons/default/pullupP.svg +3 -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/schedule.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/share2.svg +5 -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/unLink.svg +10 -0
- package/dist/collection/assets-raw/icons/default/unSecure.svg +6 -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/wifi.svg +6 -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 +15 -0
- package/dist/collection/components/cura-icon/cura-icon.css +99 -0
- package/dist/collection/components/cura-icon/cura-icon.js +126 -0
- package/dist/collection/components/dscore-icons-view/dscore-icons-view.css +82 -0
- package/dist/collection/components/dscore-icons-view/dscore-icons-view.js +31 -0
- package/dist/collection/components/dummy-component/dummy-component.css +3 -0
- package/dist/collection/components/dummy-component/dummy-component.js +18 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/rededor-cura-start.js +11 -0
- package/dist/collection/utils/utils.js +3 -0
- package/dist/components/cura-icon.d.ts +11 -0
- package/dist/components/cura-icon.js +6 -0
- package/dist/components/cura-icon2.js +50 -0
- package/dist/components/dscore-icons-view.d.ts +11 -0
- package/dist/components/dscore-icons-view.js +49 -0
- package/dist/components/dummy-component.d.ts +11 -0
- package/dist/components/dummy-component.js +34 -0
- package/dist/components/index.d.ts +24 -0
- package/dist/components/index.js +184 -0
- package/dist/cura/cura.esm.js +1 -0
- package/dist/cura/cura.js +131 -0
- package/dist/cura/index.esm.js +0 -0
- package/dist/cura/p-2525165f.system.entry.js +1 -0
- package/dist/cura/p-363e0aa1.system.js +1 -0
- package/dist/cura/p-50ea2036.system.js +1 -0
- package/dist/cura/p-55523400.js +2 -0
- package/dist/cura/p-5d11ae38.system.js +2 -0
- package/dist/cura/p-62567192.system.entry.js +1 -0
- package/dist/cura/p-632702eb.entry.js +1 -0
- package/dist/cura/p-dd552650.system.js +1 -0
- package/dist/cura/p-e66c2bf6.entry.js +1 -0
- package/dist/cura/p-fb6827d8.js +1 -0
- package/dist/esm/app-globals-d6124a10.js +180 -0
- package/dist/esm/cura-icon_2.entry.js +47 -0
- package/dist/esm/cura.js +19 -0
- package/dist/esm/dummy-component.entry.js +15 -0
- package/dist/esm/index-9d6a33bc.js +1334 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/loader.js +19 -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-es5/app-globals-d6124a10.js +1 -0
- package/dist/esm-es5/cura-icon_2.entry.js +1 -0
- package/dist/esm-es5/cura.js +1 -0
- package/dist/esm-es5/dummy-component.entry.js +1 -0
- package/dist/esm-es5/index-9d6a33bc.js +2 -0
- package/dist/esm-es5/index.js +0 -0
- package/dist/esm-es5/loader.js +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 +12 -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 +5 -0
- package/dist/types/api/cura-api.type.d.ts +50 -0
- package/dist/types/api/modules/cura-theme-module.d.ts +24 -0
- package/dist/types/api/theme-presets/theme-default.d.ts +40 -0
- package/dist/types/api/theme-presets/theme-maternity.d.ts +32 -0
- package/dist/types/api/theme-presets/theme-presets.d.ts +71 -0
- package/dist/types/assets/icons/iconset-default-list.d.ts +2 -0
- package/dist/types/components/cura-icon/cura-icon.d.ts +9 -0
- package/dist/types/components/dscore-icons-view/dscore-icons-view.d.ts +6 -0
- package/dist/types/components/dummy-component/dummy-component.d.ts +3 -0
- package/dist/types/components.d.ts +73 -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 +1576 -0
- package/dist/types/utils/utils.d.ts +1 -0
- package/package.json +41 -0
- package/readme.md +75 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h, Host, getAssetPath } from '@stencil/core/internal/client';
|
|
2
|
+
|
|
3
|
+
const curaIconCss = ":host{--stroke-color:#B7B7B7;--stroke-width:2px;--width:24px;--height:24px}:host svg.icon-128{--width:128px;--height:128px;--stroke-width:0.984375px}:host svg.icon-72{--width:72px;--height:72px;--stroke-width:1.1666666667px}:host svg.icon-64{--width:64px;--height:64px;--stroke-width:1.21875px}:host svg.icon-48{--width:48px;--height:48px;--stroke-width:1.375px}:host svg.icon-40{--width:40px;--height:40px;--stroke-width:1.5px}:host svg.icon-32{--width:32px;--height:32px;--stroke-width:1.6875px}:host svg.icon-24{--width:24px;--height:24px;--stroke-width:2px}:host svg.icon-20{--width:20px;--height:20px;--stroke-width:2.1px}:host svg.icon-16{--width:16px;--height:16px;--stroke-width:2.25px}:host svg.icon-neutral{--stroke-color:#B7B7B7}:host svg.icon-primary{--stroke-color:var(--cura-color-primary-base, #004186)}:host svg.icon-secondary{--stroke-color:var(--cura-color-secondary-base, #AA8E0B)}:host svg.icon-accent{--stroke-color:var(--cura-color-accent-base, #DF8D2C)}:host svg.icon-success{--stroke-color:#5FD290}:host svg.icon-info{--stroke-color:#6EA8FF}:host svg.icon-error{--stroke-color:#EB5757}:host svg.icon-warning{--stroke-color:#FFCF3C}:host svg.icon-white{--stroke-color:#F6F6F6}:host svg.icon-black{--stroke-color:#262626}:host svg.icon-disabled{--stroke-color:#D4D4D4}:host svg{display:inline-block;stroke:var(--stroke-color);width:var(--width);height:var(--height);stroke-width:var(--stroke-width);fill:none}";
|
|
4
|
+
|
|
5
|
+
const DscoreIcon = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
6
|
+
constructor() {
|
|
7
|
+
super();
|
|
8
|
+
this.__registerHost();
|
|
9
|
+
this.__attachShadow();
|
|
10
|
+
this.name = '';
|
|
11
|
+
this.color = 'neutral';
|
|
12
|
+
this.iconset = 'default';
|
|
13
|
+
this.disabled = false;
|
|
14
|
+
}
|
|
15
|
+
getClasses() {
|
|
16
|
+
const classes = {};
|
|
17
|
+
classes[`icon-${this.color}`] = true;
|
|
18
|
+
if (this.size)
|
|
19
|
+
classes[`icon-${this.size}`] = true;
|
|
20
|
+
if (this.disabled)
|
|
21
|
+
classes[`icon-disabled`] = true;
|
|
22
|
+
return classes;
|
|
23
|
+
}
|
|
24
|
+
render() {
|
|
25
|
+
return (h(Host, null, h("svg", { version: "1.1", viewBox: "0 0 24 24", preserveAspectRatio: "xMidYMid meet", xmlns: "http://www.w3.org/2000/svg", class: this.getClasses() }, h("use", { xlinkHref: `${getAssetPath(`../assets/icons/iconset-${this.iconset}.svg`)}#${this.name}` }))));
|
|
26
|
+
}
|
|
27
|
+
static get style() { return curaIconCss; }
|
|
28
|
+
}, [1, "cura-icon", {
|
|
29
|
+
"name": [513],
|
|
30
|
+
"color": [513],
|
|
31
|
+
"size": [520],
|
|
32
|
+
"iconset": [513],
|
|
33
|
+
"disabled": [516]
|
|
34
|
+
}]);
|
|
35
|
+
function defineCustomElement() {
|
|
36
|
+
if (typeof customElements === "undefined") {
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
const components = ["cura-icon"];
|
|
40
|
+
components.forEach(tagName => { switch (tagName) {
|
|
41
|
+
case "cura-icon":
|
|
42
|
+
if (!customElements.get(tagName)) {
|
|
43
|
+
customElements.define(tagName, DscoreIcon);
|
|
44
|
+
}
|
|
45
|
+
break;
|
|
46
|
+
} });
|
|
47
|
+
}
|
|
48
|
+
defineCustomElement();
|
|
49
|
+
|
|
50
|
+
export { DscoreIcon as D, defineCustomElement as d };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface DscoreIconsView extends Components.DscoreIconsView, HTMLElement {}
|
|
4
|
+
export const DscoreIconsView: {
|
|
5
|
+
prototype: DscoreIconsView;
|
|
6
|
+
new (): DscoreIconsView;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { d as defineCustomElement$2 } from './cura-icon2.js';
|
|
3
|
+
|
|
4
|
+
const iconsetdefaulticons = ["360", "accessibility", "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", "delete", "desktop", "deslike", "download", "duplicate", "edit", "exam", "expand", "fileBmp", "fileJpg", "filePdf", "filePng", "fileUpload", "fileXls", "filter", "fullscreen", "gallery", "geotag", "hate", "healthPlan", "height", "height2", "home", "horizontalList", "imageUp", "info2", "infoCircle", "key", "language", "language2", "languageEN", "languagePT", "like", "link", "linkExternal", "list", "login", "logout", "love", "mail", "mail2", "medical", "menuHamburguer", "menuKebab", "menuMeatballs", "mic", "micOff", "minus", "minusCircle", "minusSquare", "mobile", "neutral", "news", "notification", "order", "partner", "phone", "play", "plus", "plusCircle", "plusSquare", "print", "profile", "profile2", "pulldownG", "pulldownP", "pullupG", "pullupP", "questionCircle", "questionSquare", "range", "reload", "schedule", "search", "secure", "share", "share2", "sound", "soundOff", "subItem", "target", "team", "unLink", "unSecure", "upload", "verticalList", "viewFalse", "viewTrue", "weight", "wifi", "zoomIn", "zoomOut"];
|
|
5
|
+
|
|
6
|
+
const dscoreIconsViewCss = ":host{display:block;padding:24px;font-family:var(--cura-font-family-body)}.iconDetail{display:block}.iconSizes{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.iconSizes .size{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;text-align:center;margin-right:9px;padding:8px}.iconSizes .size:last-child{margin-right:0}.iconSizes .size span{font-size:10px}.iconSizes.invert{margin-top:12px}.iconSizes.invert .size{background-color:#262626;color:#F6F6F6;border-radius:3px}.icons{margin-top:28px;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;position:relative}.icons .icon{position:relative;padding:4px;cursor:pointer;opacity:0.6;-webkit-transition:opacity 0.2s linear;transition:opacity 0.2s linear}.icons .icon span{font-size:12px;padding:6px;-webkit-box-sizing:border-box;box-sizing:border-box;background:#000;color:#FFF;border-radius:2px;position:absolute;top:-2px;left:50%;-webkit-transform:translateX(-50%) translateY(-100%);transform:translateX(-50%) translateY(-100%);display:none}.icons .icon:hover{opacity:1}.icons .icon:hover span{display:block}";
|
|
7
|
+
|
|
8
|
+
const DscoreIconsView$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
9
|
+
constructor() {
|
|
10
|
+
super();
|
|
11
|
+
this.__registerHost();
|
|
12
|
+
this.__attachShadow();
|
|
13
|
+
this.sizes = [16, 20, 24, 32, 40, 48, 64, 72, 128];
|
|
14
|
+
this.selected = '360';
|
|
15
|
+
this.setSelected = (icon) => {
|
|
16
|
+
this.selected = icon;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
render() {
|
|
20
|
+
return (h(Host, null, h("div", { class: "iconDetail" }, h("h4", null, this.selected), h("div", { class: "iconSizes" }, this.sizes.map(size => h("div", { class: "size" }, h("cura-icon", { name: this.selected, size: size }), h("span", null, size)))), h("div", { class: "iconSizes invert" }, this.sizes.map(size => h("div", { class: "size" }, h("cura-icon", { name: this.selected, size: size, color: "white" }), h("span", null, size)))), h("div", { class: "iconSizes" }, h("div", { class: "size" }, h("cura-icon", { name: this.selected, color: "primary" }), h("span", null, "Primary")), h("div", { class: "size" }, h("cura-icon", { name: this.selected, color: "secondary" }), h("span", null, "Secondary")), h("div", { class: "size" }, h("cura-icon", { name: this.selected, color: "accent" }), h("span", null, "Accent")), h("div", { class: "size" }, h("cura-icon", { name: this.selected, color: "info" }), h("span", null, "Info")), h("div", { class: "size" }, h("cura-icon", { name: this.selected, color: "warning" }), h("span", null, "Warning")), h("div", { class: "size" }, h("cura-icon", { name: this.selected, color: "error" }), h("span", null, "Error")), h("div", { class: "size" }, h("cura-icon", { name: this.selected, color: "success" }), h("span", null, "Success")), h("div", { class: "size" }, h("cura-icon", { name: this.selected, color: "neutral" }), h("span", null, "Neutral")), h("div", { class: "size" }, h("cura-icon", { name: this.selected, color: "primary", disabled: true }), h("span", null, "Disabled")))), h("div", { class: "icons" }, iconsetdefaulticons.map(icon => h("div", { class: "icon", onClick: () => this.setSelected(icon) }, h("cura-icon", { name: icon }), h("span", null, icon))))));
|
|
21
|
+
}
|
|
22
|
+
static get style() { return dscoreIconsViewCss; }
|
|
23
|
+
}, [1, "dscore-icons-view", {
|
|
24
|
+
"selected": [32]
|
|
25
|
+
}]);
|
|
26
|
+
function defineCustomElement$1() {
|
|
27
|
+
if (typeof customElements === "undefined") {
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
const components = ["dscore-icons-view", "cura-icon"];
|
|
31
|
+
components.forEach(tagName => { switch (tagName) {
|
|
32
|
+
case "dscore-icons-view":
|
|
33
|
+
if (!customElements.get(tagName)) {
|
|
34
|
+
customElements.define(tagName, DscoreIconsView$1);
|
|
35
|
+
}
|
|
36
|
+
break;
|
|
37
|
+
case "cura-icon":
|
|
38
|
+
if (!customElements.get(tagName)) {
|
|
39
|
+
defineCustomElement$2();
|
|
40
|
+
}
|
|
41
|
+
break;
|
|
42
|
+
} });
|
|
43
|
+
}
|
|
44
|
+
defineCustomElement$1();
|
|
45
|
+
|
|
46
|
+
const DscoreIconsView = DscoreIconsView$1;
|
|
47
|
+
const defineCustomElement = defineCustomElement$1;
|
|
48
|
+
|
|
49
|
+
export { DscoreIconsView, defineCustomElement };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface DummyComponent extends Components.DummyComponent, HTMLElement {}
|
|
4
|
+
export const DummyComponent: {
|
|
5
|
+
prototype: DummyComponent;
|
|
6
|
+
new (): DummyComponent;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
|
|
3
|
+
const dummyComponentCss = ":host{display:block}";
|
|
4
|
+
|
|
5
|
+
const DummyComponent$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
6
|
+
constructor() {
|
|
7
|
+
super();
|
|
8
|
+
this.__registerHost();
|
|
9
|
+
this.__attachShadow();
|
|
10
|
+
}
|
|
11
|
+
render() {
|
|
12
|
+
return (h(Host, null, h("h1", null, h("slot", null))));
|
|
13
|
+
}
|
|
14
|
+
static get style() { return dummyComponentCss; }
|
|
15
|
+
}, [1, "dummy-component"]);
|
|
16
|
+
function defineCustomElement$1() {
|
|
17
|
+
if (typeof customElements === "undefined") {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
const components = ["dummy-component"];
|
|
21
|
+
components.forEach(tagName => { switch (tagName) {
|
|
22
|
+
case "dummy-component":
|
|
23
|
+
if (!customElements.get(tagName)) {
|
|
24
|
+
customElements.define(tagName, DummyComponent$1);
|
|
25
|
+
}
|
|
26
|
+
break;
|
|
27
|
+
} });
|
|
28
|
+
}
|
|
29
|
+
defineCustomElement$1();
|
|
30
|
+
|
|
31
|
+
const DummyComponent = DummyComponent$1;
|
|
32
|
+
const defineCustomElement = defineCustomElement$1;
|
|
33
|
+
|
|
34
|
+
export { DummyComponent, defineCustomElement };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/* cura custom elements */
|
|
2
|
+
export { DscoreIcon as CuraIcon } from '../types/components/cura-icon/cura-icon';
|
|
3
|
+
export { DscoreIconsView as DscoreIconsView } from '../types/components/dscore-icons-view/dscore-icons-view';
|
|
4
|
+
export { DummyComponent as DummyComponent } from '../types/components/dummy-component/dummy-component';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Used to manually set the base path where assets can be found.
|
|
8
|
+
* If the script is used as "module", it's recommended to use "import.meta.url",
|
|
9
|
+
* such as "setAssetPath(import.meta.url)". Other options include
|
|
10
|
+
* "setAssetPath(document.currentScript.src)", or using a bundler's replace plugin to
|
|
11
|
+
* dynamically set the path at build time, such as "setAssetPath(process.env.ASSET_PATH)".
|
|
12
|
+
* But do note that this configuration depends on how your script is bundled, or lack of
|
|
13
|
+
* bundling, and where your assets can be loaded from. Additionally custom bundling
|
|
14
|
+
* will have to ensure the static assets are copied to its build directory.
|
|
15
|
+
*/
|
|
16
|
+
export declare const setAssetPath: (path: string) => void;
|
|
17
|
+
|
|
18
|
+
export interface SetPlatformOptions {
|
|
19
|
+
raf?: (c: FrameRequestCallback) => number;
|
|
20
|
+
ael?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
|
|
21
|
+
rel?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
|
|
22
|
+
}
|
|
23
|
+
export declare const setPlatformOptions: (opts: SetPlatformOptions) => void;
|
|
24
|
+
export * from '../types';
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
import { setAssetPath } from '@stencil/core/internal/client';
|
|
2
|
+
export { setAssetPath, setPlatformOptions } from '@stencil/core/internal/client';
|
|
3
|
+
export { CuraIcon, defineCustomElement as defineCustomElementCuraIcon } from './cura-icon.js';
|
|
4
|
+
export { DscoreIconsView, defineCustomElement as defineCustomElementDscoreIconsView } from './dscore-icons-view.js';
|
|
5
|
+
export { DummyComponent, defineCustomElement as defineCustomElementDummyComponent } from './dummy-component.js';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Cura Default Theme
|
|
9
|
+
*/
|
|
10
|
+
const ThemeDefault = {
|
|
11
|
+
/* Colors */
|
|
12
|
+
color: {
|
|
13
|
+
primary: {
|
|
14
|
+
depth100: '#CCD9E7',
|
|
15
|
+
depth300: '#5580AE',
|
|
16
|
+
base: '#004186',
|
|
17
|
+
depth700: '#002B59',
|
|
18
|
+
depth900: '#00133B'
|
|
19
|
+
},
|
|
20
|
+
secondary: {
|
|
21
|
+
depth100: '#EEE8CE',
|
|
22
|
+
depth300: '#C6B45C',
|
|
23
|
+
base: '#AA8E0B',
|
|
24
|
+
depth700: '#715F07',
|
|
25
|
+
depth900: '#221C02'
|
|
26
|
+
},
|
|
27
|
+
accent: {
|
|
28
|
+
depth100: '#F9E8D5',
|
|
29
|
+
depth300: '#E4A04F',
|
|
30
|
+
base: '#DF8D2C',
|
|
31
|
+
depth700: '#955E1D',
|
|
32
|
+
depth900: '#2D1C09'
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
/* Spacing */
|
|
36
|
+
spacing: {
|
|
37
|
+
base: '8px',
|
|
38
|
+
},
|
|
39
|
+
/* Fonts */
|
|
40
|
+
font: {
|
|
41
|
+
family: {
|
|
42
|
+
title: 'serif',
|
|
43
|
+
body: '"Roboto", Helvetica, Arial, sans-serif'
|
|
44
|
+
},
|
|
45
|
+
size: {
|
|
46
|
+
base: '16px',
|
|
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
|
+
base: '#CD4D9A',
|
|
60
|
+
depth100: '#FCEFF6',
|
|
61
|
+
depth300: '#FFBFE5',
|
|
62
|
+
depth500: '#FF7FCB',
|
|
63
|
+
depth700: '#99126C',
|
|
64
|
+
depth900: '#00133B'
|
|
65
|
+
},
|
|
66
|
+
secondary: {
|
|
67
|
+
base: '#189AB4',
|
|
68
|
+
depth100: '#EDF3FF',
|
|
69
|
+
depth300: '#BDD2FF',
|
|
70
|
+
depth500: '#496BB6',
|
|
71
|
+
depth700: '#001C58',
|
|
72
|
+
depth900: '#430E31'
|
|
73
|
+
}
|
|
74
|
+
} });
|
|
75
|
+
|
|
76
|
+
const ThemePresets = {
|
|
77
|
+
'default': ThemeDefault,
|
|
78
|
+
'maternidade': ThemeMaternity
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
class CuraThemeModule {
|
|
82
|
+
constructor() {
|
|
83
|
+
this.prefix = '--cura';
|
|
84
|
+
/* Private */
|
|
85
|
+
/** Set css var based on object structure */
|
|
86
|
+
this.setCssVar = (prop, path) => {
|
|
87
|
+
const varName = this.groupPath(path, prop[0]);
|
|
88
|
+
// console.log('Setting %s: %s', varName, prop[1]);
|
|
89
|
+
this.body.style.setProperty(varName, prop[1]);
|
|
90
|
+
};
|
|
91
|
+
this.groupPath = (a, b) => `${a}-${b}`;
|
|
92
|
+
this.isObject = (val) => {
|
|
93
|
+
return val && typeof val === 'object' && !Array.isArray(val);
|
|
94
|
+
};
|
|
95
|
+
/** Deep merge objects */
|
|
96
|
+
this.mergeObject = (from, to) => {
|
|
97
|
+
const entries = Object.entries(from);
|
|
98
|
+
for (let e of entries) {
|
|
99
|
+
if (this.isObject(e[1])) {
|
|
100
|
+
this.mergeObject(e[1], to[e[0]]);
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
to[e[0]] = e[1];
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
/** Set css vars from preset object */
|
|
108
|
+
this.buildCssVars = (path, obj) => {
|
|
109
|
+
const entries = Object.entries(obj);
|
|
110
|
+
// console.log('Reading %s', path);
|
|
111
|
+
for (let e of entries) {
|
|
112
|
+
if (this.isObject(e[1])) {
|
|
113
|
+
this.buildCssVars(this.groupPath(path, e[0]), e[1]);
|
|
114
|
+
}
|
|
115
|
+
else {
|
|
116
|
+
this.setCssVar(e, path);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
this.body = window.document.documentElement.querySelector('body');
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Load a theme.
|
|
124
|
+
* @param theme Theme tag.
|
|
125
|
+
*/
|
|
126
|
+
load(theme = 'default') {
|
|
127
|
+
const preset = ThemePresets[theme] ? ThemePresets[theme] : ThemePresets.default;
|
|
128
|
+
// console.log('Loading Theme: %s', theme, preset);
|
|
129
|
+
this.buildCssVars(this.prefix, preset);
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Define a custom theme
|
|
133
|
+
* @param customTheme Custom theme object definition
|
|
134
|
+
*/
|
|
135
|
+
setCustom(customTheme) {
|
|
136
|
+
const customTag = customTheme.name;
|
|
137
|
+
if (customTag in ThemePresets) {
|
|
138
|
+
console.log('Error building custom theme. Theme %s already exists. Loading default theme.', customTag);
|
|
139
|
+
this.load('default');
|
|
140
|
+
}
|
|
141
|
+
else {
|
|
142
|
+
const preset = customTheme.fromPreset && customTheme.fromPreset in ThemePresets
|
|
143
|
+
? ThemePresets[customTheme.fromPreset]
|
|
144
|
+
: ThemePresets.default;
|
|
145
|
+
const newTheme = Object.assign({}, JSON.parse(JSON.stringify(preset)));
|
|
146
|
+
this.mergeObject(customTheme.definitions, newTheme);
|
|
147
|
+
// console.log('Custom Theme: %s', newTheme);
|
|
148
|
+
ThemePresets[customTag] = newTheme;
|
|
149
|
+
// console.log('Presets:', ThemePresets);
|
|
150
|
+
this.load(customTag);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
class CuraAPI {
|
|
156
|
+
constructor(config) {
|
|
157
|
+
const themeModule = new CuraThemeModule();
|
|
158
|
+
this.theme = {
|
|
159
|
+
load: function (themeTag) { themeModule.load(themeTag); },
|
|
160
|
+
setCustom: function (customThemeDefinitions) { themeModule.setCustom(customThemeDefinitions); }
|
|
161
|
+
};
|
|
162
|
+
if (config && config.customTheme) {
|
|
163
|
+
this.theme.setCustom(config.customTheme);
|
|
164
|
+
}
|
|
165
|
+
else {
|
|
166
|
+
const theme = config && config.theme ? config.theme : 'default';
|
|
167
|
+
this.theme.load(theme);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
setAssetPath(import.meta.url);
|
|
173
|
+
function appGlobalScript () {
|
|
174
|
+
const config = window.CuraInit;
|
|
175
|
+
window.CuraAPI = config ? new CuraAPI(config) : new CuraAPI();
|
|
176
|
+
const api = window.CuraAPI;
|
|
177
|
+
window.dispatchEvent(new CustomEvent("CuraAPIReady", { detail: { api } }));
|
|
178
|
+
if (config && typeof config.onReady === 'function')
|
|
179
|
+
config.onReady(api);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
const globalScripts = appGlobalScript;
|
|
183
|
+
|
|
184
|
+
globalScripts();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as e,b as o}from"./p-55523400.js";import{g as s}from"./p-fb6827d8.js";(()=>{const o=import.meta.url,s={};return""!==o&&(s.resourcesUrl=new URL(".",o).href),e(s)})().then((e=>(s(),o([["p-e66c2bf6",[[1,"dummy-component"]]],["p-632702eb",[[1,"dscore-icons-view",{selected:[32]}],[1,"cura-icon",{name:[513],color:[513],size:[520],iconset:[513],disabled:[516]}]]]],e))));
|