@rededor/cura 0.5.1 → 0.5.2
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/cjs/{app-globals-0e3b7fc6.js → app-globals-2988084b.js} +5 -5
- package/dist/cjs/app-globals-2988084b.js.map +1 -0
- package/dist/cjs/cura-accordion_8.cjs.entry.js +452 -0
- package/dist/cjs/cura-accordion_8.cjs.entry.js.map +1 -0
- package/dist/cjs/cura-button-outline.cjs.entry.js +83 -0
- package/dist/cjs/cura-button-outline.cjs.entry.js.map +1 -0
- package/dist/cjs/cura-button-transparent.cjs.entry.js +83 -0
- package/dist/cjs/cura-button-transparent.cjs.entry.js.map +1 -0
- package/dist/cjs/cura-display.cjs.entry.js +74 -0
- package/dist/cjs/cura-display.cjs.entry.js.map +1 -0
- package/dist/cjs/cura-icons-view.cjs.entry.js +29 -0
- package/dist/cjs/cura-icons-view.cjs.entry.js.map +1 -0
- package/dist/cjs/cura-label.cjs.entry.js +69 -0
- package/dist/cjs/cura-label.cjs.entry.js.map +1 -0
- package/dist/cjs/cura.cjs.js +2 -2
- package/dist/cjs/index.cjs.js +7 -0
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/api/cura-api.type.js.map +1 -1
- package/dist/collection/api/modules/cura-theme-breakpoints-module.js +1 -1
- package/dist/collection/api/modules/cura-theme-breakpoints-module.js.map +1 -1
- package/dist/collection/api/modules/cura-theme-colors-module.js +1 -1
- package/dist/collection/api/modules/cura-theme-colors-module.js.map +1 -1
- package/dist/collection/api/theme-presets/static.js +2 -2
- package/dist/collection/api/theme-presets/static.js.map +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/accordion/cura-accordion-item/cura-accordion-item.css +10 -6
- package/dist/collection/components/cura-page-template/cura-page-template.css +13 -9
- package/dist/collection/components/forms/cura-label/cura-label.css +70 -0
- package/dist/collection/components/forms/cura-label/cura-label.js +190 -0
- package/dist/collection/components/forms/cura-label/cura-label.js.map +1 -0
- package/dist/collection/components/forms/cura-label/cura-label.stories.js +137 -0
- package/dist/collection/components/forms/cura-label/cura-label.stories.js.map +1 -0
- package/dist/collection/components/text/cura-display/cura-display.css +21 -38
- package/dist/collection/components/text/cura-display/cura-display.js +80 -49
- package/dist/collection/components/text/cura-display/cura-display.js.map +1 -1
- package/dist/collection/components/text/cura-display/cura-display.stories.js +78 -33
- package/dist/collection/components/text/cura-display/cura-display.stories.js.map +1 -1
- package/dist/collection/components/text/cura-heading/cura-heading.css +50 -24
- package/dist/collection/components/text/cura-heading/cura-heading.js +94 -39
- package/dist/collection/components/text/cura-heading/cura-heading.js.map +1 -1
- package/dist/collection/components/text/cura-heading/cura-heading.stories.js +92 -36
- package/dist/collection/components/text/cura-heading/cura-heading.stories.js.map +1 -1
- package/dist/collection/components/text/cura-paragraph/cura-paragraph.css +37 -38
- package/dist/collection/components/text/cura-paragraph/cura-paragraph.js +62 -41
- package/dist/collection/components/text/cura-paragraph/cura-paragraph.js.map +1 -1
- package/dist/collection/components/text/cura-paragraph/cura-paragraph.stories.js +78 -46
- package/dist/collection/components/text/cura-paragraph/cura-paragraph.stories.js.map +1 -1
- package/dist/collection/index.js +3 -1
- package/dist/collection/index.js.map +1 -1
- package/dist/components/cura-accordion-item.js +1 -1
- package/dist/components/cura-accordion-item.js.map +1 -1
- package/dist/components/cura-display.js +41 -35
- package/dist/components/cura-display.js.map +1 -1
- package/dist/components/cura-heading.js +34 -21
- package/dist/components/cura-heading.js.map +1 -1
- package/dist/components/cura-label.d.ts +11 -0
- package/dist/components/cura-label.js +91 -0
- package/dist/components/cura-label.js.map +1 -0
- package/dist/components/cura-page-template.js +1 -1
- package/dist/components/cura-page-template.js.map +1 -1
- package/dist/components/cura-paragraph.js +25 -23
- package/dist/components/cura-paragraph.js.map +1 -1
- package/dist/components/index.js +11 -5
- package/dist/components/index.js.map +1 -1
- package/dist/cura/cura.esm.js +1 -1
- package/dist/cura/cura.esm.js.map +1 -1
- package/dist/cura/cura.js +1 -1
- package/dist/cura/index.esm.js +1 -1
- package/dist/cura/index.esm.js.map +1 -1
- package/dist/cura/p-03047b3e.entry.js +2 -0
- package/dist/cura/p-03047b3e.entry.js.map +1 -0
- package/dist/cura/p-0c79c54e.entry.js +2 -0
- package/dist/cura/p-0c79c54e.entry.js.map +1 -0
- package/dist/cura/p-120926c5.system.js +2 -0
- package/dist/cura/p-120926c5.system.js.map +1 -0
- package/dist/cura/p-223924fb.system.entry.js +2 -0
- package/dist/cura/p-223924fb.system.entry.js.map +1 -0
- package/dist/cura/p-48426f60.system.js +2 -0
- package/dist/cura/p-48426f60.system.js.map +1 -0
- package/dist/cura/p-49813052.entry.js +2 -0
- package/dist/cura/p-49813052.entry.js.map +1 -0
- package/dist/cura/p-4bdbcdf0.system.entry.js +2 -0
- package/dist/cura/p-4bdbcdf0.system.entry.js.map +1 -0
- package/dist/cura/p-7c8f3c77.system.entry.js +2 -0
- package/dist/cura/p-7c8f3c77.system.entry.js.map +1 -0
- package/dist/cura/p-8b18b5f7.system.js +2 -0
- package/dist/cura/p-8b18b5f7.system.js.map +1 -0
- package/dist/cura/p-91b0f78e.entry.js +2 -0
- package/dist/cura/p-91b0f78e.entry.js.map +1 -0
- package/dist/cura/p-a0395f90.entry.js +2 -0
- package/dist/cura/p-a0395f90.entry.js.map +1 -0
- package/dist/cura/p-a7ef255f.entry.js +2 -0
- package/dist/cura/p-a7ef255f.entry.js.map +1 -0
- package/dist/cura/p-ca054b07.system.entry.js +2 -0
- package/dist/cura/p-ca054b07.system.entry.js.map +1 -0
- package/dist/cura/p-d47b9cfe.system.entry.js +2 -0
- package/dist/cura/p-d47b9cfe.system.entry.js.map +1 -0
- package/dist/cura/p-f8fffdc1.js +2 -0
- package/dist/cura/p-f8fffdc1.js.map +1 -0
- package/dist/cura/p-fc77814b.system.entry.js +2 -0
- package/dist/cura/p-fc77814b.system.entry.js.map +1 -0
- package/dist/esm/{app-globals-cc003eaf.js → app-globals-29001758.js} +5 -5
- package/dist/esm/app-globals-29001758.js.map +1 -0
- package/dist/esm/cura-accordion_8.entry.js +441 -0
- package/dist/esm/cura-accordion_8.entry.js.map +1 -0
- package/dist/esm/cura-button-outline.entry.js +79 -0
- package/dist/esm/cura-button-outline.entry.js.map +1 -0
- package/dist/esm/cura-button-transparent.entry.js +79 -0
- package/dist/esm/cura-button-transparent.entry.js.map +1 -0
- package/dist/esm/cura-display.entry.js +70 -0
- package/dist/esm/cura-display.entry.js.map +1 -0
- package/dist/esm/cura-icons-view.entry.js +25 -0
- package/dist/esm/cura-icons-view.entry.js.map +1 -0
- package/dist/esm/cura-label.entry.js +65 -0
- package/dist/esm/cura-label.entry.js.map +1 -0
- package/dist/esm/cura.js +2 -2
- package/dist/esm/index.js +4 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +2 -2
- package/dist/esm-es5/app-globals-29001758.js +2 -0
- package/dist/esm-es5/app-globals-29001758.js.map +1 -0
- package/dist/esm-es5/cura-accordion_8.entry.js +2 -0
- package/dist/esm-es5/cura-accordion_8.entry.js.map +1 -0
- package/dist/esm-es5/cura-button-outline.entry.js +2 -0
- package/dist/esm-es5/cura-button-outline.entry.js.map +1 -0
- package/dist/esm-es5/cura-button-transparent.entry.js +2 -0
- package/dist/esm-es5/cura-button-transparent.entry.js.map +1 -0
- package/dist/esm-es5/cura-display.entry.js +2 -0
- package/dist/esm-es5/cura-display.entry.js.map +1 -0
- package/dist/esm-es5/cura-icons-view.entry.js +2 -0
- package/dist/esm-es5/cura-icons-view.entry.js.map +1 -0
- package/dist/esm-es5/cura-label.entry.js +2 -0
- package/dist/esm-es5/cura-label.entry.js.map +1 -0
- package/dist/esm-es5/cura.js +1 -1
- package/dist/esm-es5/cura.js.map +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/index.js.map +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/loader.js.map +1 -1
- package/dist/types/api/cura-api.type.d.ts +1 -0
- package/dist/types/components/forms/cura-label/cura-label.d.ts +54 -0
- package/dist/types/components/forms/cura-label/cura-label.stories.d.ts +126 -0
- package/dist/types/components/text/cura-display/cura-display.d.ts +29 -18
- package/dist/types/components/text/cura-display/cura-display.stories.d.ts +52 -14
- package/dist/types/components/text/cura-heading/cura-heading.d.ts +34 -17
- package/dist/types/components/text/cura-heading/cura-heading.stories.d.ts +58 -6
- package/dist/types/components/text/cura-paragraph/cura-paragraph.d.ts +24 -12
- package/dist/types/components/text/cura-paragraph/cura-paragraph.stories.d.ts +47 -9
- package/dist/types/components.d.ts +139 -46
- package/dist/types/index.d.ts +9 -0
- package/package.json +2 -4
- package/dist/cjs/app-globals-0e3b7fc6.js.map +0 -1
- package/dist/cjs/cura-accordion_12.cjs.entry.js +0 -674
- package/dist/cjs/cura-accordion_12.cjs.entry.js.map +0 -1
- package/dist/cura/p-319699df.entry.js +0 -2
- package/dist/cura/p-319699df.entry.js.map +0 -1
- package/dist/cura/p-50ea2036.system.js +0 -2
- package/dist/cura/p-50ea2036.system.js.map +0 -1
- package/dist/cura/p-5250cb43.system.js +0 -2
- package/dist/cura/p-5250cb43.system.js.map +0 -1
- package/dist/cura/p-5cc3c8bd.system.entry.js +0 -2
- package/dist/cura/p-5cc3c8bd.system.entry.js.map +0 -1
- package/dist/cura/p-788e035b.system.js +0 -2
- package/dist/cura/p-788e035b.system.js.map +0 -1
- package/dist/cura/p-d5c64a5f.js +0 -2
- package/dist/cura/p-d5c64a5f.js.map +0 -1
- package/dist/esm/app-globals-cc003eaf.js.map +0 -1
- package/dist/esm/cura-accordion_12.entry.js +0 -659
- package/dist/esm/cura-accordion_12.entry.js.map +0 -1
- package/dist/esm-es5/app-globals-cc003eaf.js +0 -2
- package/dist/esm-es5/app-globals-cc003eaf.js.map +0 -1
- package/dist/esm-es5/cura-accordion_12.entry.js +0 -2
- package/dist/esm-es5/cura-accordion_12.entry.js.map +0 -1
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-404d93e9.js');
|
|
6
|
+
|
|
7
|
+
const curaLabelCss = ":host{display:block;font-size:var(--font-size-base)}:host p{font-family:var(--font-family);font-size:1.143em;font-weight:var(--font-weight-medium);color:var(--color-body);line-height:var(--line-height);margin-block:var(--margin-block);letter-spacing:0.32px}:host p.bold-weight,:host p ::slotted(b),:host p ::slotted(strong),:host p ::slotted(u){font-weight:var(--font-weight-bold)}:host p.large{font-size:1.357em;line-height:calc(var(--line-height) - 4%);letter-spacing:0px}:host p.small{font-size:1em;line-height:calc(var(--line-height) - 4%);letter-spacing:0.56px}:host p.xsmall{font-size:0.857em;line-height:calc(var(--line-height) - 17%);letter-spacing:0.72px}:host ::slotted(a){font-weight:var(--font-weight-bold);color:var(--color-link);text-underline-offset:10%}:host ::slotted(u){text-underline-offset:10%}:host ::slotted(abbr){color:var(--color-link);-webkit-text-decoration:underline dashed 1px var(--color-link);text-decoration:underline dashed 1px var(--color-link);text-underline-offset:10%;cursor:default}";
|
|
8
|
+
|
|
9
|
+
const CuraLabel = class {
|
|
10
|
+
constructor(hostRef) {
|
|
11
|
+
index.registerInstance(this, hostRef);
|
|
12
|
+
this.theme = window.CuraAPI.theme;
|
|
13
|
+
this.size = 'medium';
|
|
14
|
+
this.weight = 'regular';
|
|
15
|
+
this.spotColor = 'accent-dark';
|
|
16
|
+
this.color = undefined;
|
|
17
|
+
this.marginBlock = '0';
|
|
18
|
+
this.lineHeight = '125%';
|
|
19
|
+
this.styles = {};
|
|
20
|
+
}
|
|
21
|
+
handleChangeColor() {
|
|
22
|
+
this.setColors();
|
|
23
|
+
}
|
|
24
|
+
connectedCallback() {
|
|
25
|
+
this.setFontProperties();
|
|
26
|
+
this.setColors();
|
|
27
|
+
}
|
|
28
|
+
getClasses() {
|
|
29
|
+
const sizeclass = {};
|
|
30
|
+
sizeclass[this.size.toLowerCase()] = true;
|
|
31
|
+
sizeclass[`${this.weight.toLowerCase()}-weight`] = true;
|
|
32
|
+
return sizeclass;
|
|
33
|
+
}
|
|
34
|
+
setFontProperties() {
|
|
35
|
+
this.weights = this.theme.fonts.getWeights();
|
|
36
|
+
this.fontSizeBase = this.theme.fonts.getSize();
|
|
37
|
+
this.styles = {
|
|
38
|
+
'--font-family': this.theme.fonts.getFamily('body'),
|
|
39
|
+
'--font-weight-medium': this.weights.medium,
|
|
40
|
+
'--font-weight-bold': this.weights.bold
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
setColors() {
|
|
44
|
+
const fontColor = this.color
|
|
45
|
+
? this.theme.colors.getColor(this.color)
|
|
46
|
+
: this.theme.fonts.getColor();
|
|
47
|
+
this.styles = Object.assign(Object.assign({}, this.styles), { '--color-body': fontColor || this.theme.colors.getColor('neutral-darker'), '--color-link': this.theme.colors.getColor(`${this.spotColor}`) });
|
|
48
|
+
}
|
|
49
|
+
hostCSSProperties() {
|
|
50
|
+
return {
|
|
51
|
+
'--margin-block': this.marginBlock,
|
|
52
|
+
'--font-size-base': this.fontSizeBase,
|
|
53
|
+
'--line-height': this.lineHeight
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
render() {
|
|
57
|
+
return (index.h(index.Host, { style: this.hostCSSProperties() }, index.h("p", { style: this.styles, class: this.getClasses() }, index.h("slot", null))));
|
|
58
|
+
}
|
|
59
|
+
get host() { return index.getElement(this); }
|
|
60
|
+
static get watchers() { return {
|
|
61
|
+
"color": ["handleChangeColor"],
|
|
62
|
+
"spotColor": ["handleChangeColor"]
|
|
63
|
+
}; }
|
|
64
|
+
};
|
|
65
|
+
CuraLabel.style = curaLabelCss;
|
|
66
|
+
|
|
67
|
+
exports.cura_label = CuraLabel;
|
|
68
|
+
|
|
69
|
+
//# sourceMappingURL=cura-label.cjs.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"cura-label.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,YAAY,GAAG,6/BAA6/B;;MCOrgC,SAAS;;;IAsDpB,UAAK,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;gBAhD0C,QAAQ;kBAM3B,SAAS;qBAM1B,aAAa;;uBAiBX,GAAG;sBAMJ,MAAM;kBAYxB,EAAE;;EA1BpB,iBAAiB;IACf,IAAI,CAAC,SAAS,EAAE,CAAC;GAClB;EA2BD,iBAAiB;IACf,IAAI,CAAC,iBAAiB,EAAE,CAAC;IACzB,IAAI,CAAC,SAAS,EAAE,CAAC;GAClB;EAED,UAAU;IACR,MAAM,SAAS,GAAG,EAAE,CAAC;IACrB,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,GAAG,IAAI,CAAC;IAC1C,SAAS,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,SAAS,CAAC,GAAG,IAAI,CAAC;IACxD,OAAO,SAAS,CAAC;GAClB;EAED,iBAAiB;IACf,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC;IAC7C,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;IAC/C,IAAI,CAAC,MAAM,GAAG;MACZ,eAAe,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC;MACnD,sBAAsB,EAAE,IAAI,CAAC,OAAO,CAAC,MAAM;MAC3C,oBAAoB,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI;KACxC,CAAC;GACH;EAED,SAAS;IACP,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK;QACxB,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC;QACtC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;IAChC,IAAI,CAAC,MAAM,mCACN,IAAI,CAAC,MAAM,KACd,cAAc,EAAE,SAAS,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,gBAAgB,CAAC,EACzE,cAAc,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC,GAChE,CAAC;GACH;EAED,iBAAiB;IACf,OAAO;MACL,gBAAgB,EAAE,IAAI,CAAC,WAAW;MAClC,kBAAkB,EAAE,IAAI,CAAC,YAAY;MACrC,eAAe,EAAE,IAAI,CAAC,UAAU;KACjC,CAAC;GACH;EAED,MAAM;IACJ,QACEA,QAACC,UAAI,IAAC,KAAK,EAAE,IAAI,CAAC,iBAAiB,EAAE,IACnCD,eAAG,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,IAC7CA,qBAAa,CACX,CACC,EACP;GACH;;;;;;;;;;;","names":["h","Host"],"sources":["./src/components/forms/cura-label/cura-label.scss?tag=cura-label&encapsulation=shadow","./src/components/forms/cura-label/cura-label.tsx"],"sourcesContent":["@import '../../../scss/mixins/responsive.scss';\n\n:host {\n display: block;\n font-size: var(--font-size-base);\n\n p {\n font-family: var(--font-family);\n font-size: 1.143em;\n font-weight: var(--font-weight-medium);\n color: var(--color-body);\n line-height: var(--line-height);\n margin-block: var(--margin-block);\n letter-spacing: 0.32px;\n\n &.bold-weight, ::slotted(b), ::slotted(strong), ::slotted(u) {\n font-weight: var(--font-weight-bold);\n }\n\n &.large {\n font-size: 1.357em;\n line-height: calc(var(--line-height) - 4%);\n letter-spacing: 0px;\n }\n\n &.small {\n font-size: 1em;\n line-height: calc(var(--line-height) - 4%);\n letter-spacing: 0.56px;\n }\n\n &.xsmall {\n font-size: 0.857em;\n line-height: calc(var(--line-height) - 17%);\n letter-spacing: 0.72px;\n }\n }\n\n ::slotted(a) {\n font-weight: var(--font-weight-bold);\n color: var(--color-link);\n text-underline-offset: 10%;\n }\n\n ::slotted(u) {\n text-underline-offset: 10%;\n }\n\n ::slotted(abbr) {\n color: var(--color-link);\n text-decoration: underline dashed 1px var(--color-link);\n text-underline-offset: 10%;\n cursor: default;\n }\n\n}\n\n","import { Component, Host, Prop, h, Element, Watch, State } from '@stencil/core';\n\n@Component({\n tag: 'cura-label',\n styleUrl: 'cura-label.scss',\n shadow: true,\n})\nexport class CuraLabel {\n\n /**\n * Set size of body text.\n * Values: medium (default) | large | small | xsmall.\n */\n @Prop({reflect: true}) size: 'medium' | 'large' | 'small' | 'xsmall' = 'medium';\n\n /**\n * Label font weight. It is possible to use regular HTML tags like <b> or <strong> as well.\n * Values: regular (default) | bold.\n */\n @Prop({reflect: true}) weight: 'regular' | 'bold' = 'regular';\n\n /**\n * Apply design system color to interactive elements like <a> and <abbr> inside the text.\n * Values: Color from design system scheme. Default to 'accent-dark'.\n */\n @Prop({reflect: true}) spotColor = 'accent-dark';\n\n /**\n * Text color.\n * Values: Color from design system scheme. Default to the font color from the theme.\n */\n @Prop() color: string;\n @Watch('color')\n @Watch('spotColor')\n handleChangeColor() {\n this.setColors();\n }\n\n /**\n * CSS margin-block property values.\n * Default to 1.25em\n */\n @Prop({reflect: true}) marginBlock = '0';\n\n /**\n * CSS line-height property values.\n * Default to 140%\n */\n @Prop({reflect: true}) lineHeight = '125%';\n\n /**\n * Host element <cura-label>\n */\n @Element() host: HTMLElement;\n\n /**\n * Internal Props\n */\n weights: any;\n fontSizeBase: string;\n @State() styles = {};\n theme = window.CuraAPI.theme;\n\n connectedCallback() {\n this.setFontProperties();\n this.setColors();\n }\n\n getClasses() {\n const sizeclass = {};\n sizeclass[this.size.toLowerCase()] = true;\n sizeclass[`${this.weight.toLowerCase()}-weight`] = true;\n return sizeclass;\n }\n\n setFontProperties() {\n this.weights = this.theme.fonts.getWeights();\n this.fontSizeBase = this.theme.fonts.getSize();\n this.styles = {\n '--font-family': this.theme.fonts.getFamily('body'),\n '--font-weight-medium': this.weights.medium,\n '--font-weight-bold': this.weights.bold\n };\n }\n\n setColors() {\n const fontColor = this.color\n ? this.theme.colors.getColor(this.color)\n : this.theme.fonts.getColor();\n this.styles = {\n ...this.styles,\n '--color-body': fontColor || this.theme.colors.getColor('neutral-darker'),\n '--color-link': this.theme.colors.getColor(`${this.spotColor}`)\n };\n }\n\n hostCSSProperties() {\n return {\n '--margin-block': this.marginBlock,\n '--font-size-base': this.fontSizeBase,\n '--line-height': this.lineHeight\n };\n }\n\n render() {\n return (\n <Host style={this.hostCSSProperties()}>\n <p style={this.styles} class={this.getClasses()}>\n <slot></slot>\n </p>\n </Host>\n );\n }\n\n}\n"],"version":3}
|
package/dist/cjs/cura.cjs.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-404d93e9.js');
|
|
6
|
-
const appGlobals = require('./app-globals-
|
|
6
|
+
const appGlobals = require('./app-globals-2988084b.js');
|
|
7
7
|
|
|
8
8
|
/*
|
|
9
9
|
Stencil Client Patch Browser v3.3.0 | MIT Licensed | https://stenciljs.com
|
|
@@ -28,7 +28,7 @@ const patchBrowser = () => {
|
|
|
28
28
|
|
|
29
29
|
patchBrowser().then(options => {
|
|
30
30
|
appGlobals.globalScripts();
|
|
31
|
-
return index.bootstrapLazy([["cura-
|
|
31
|
+
return index.bootstrapLazy([["cura-accordion_8.cjs",[[1,"cura-button",{"size":[513],"disabled":[516],"isLoading":[516,"is-loading"],"iconName":[513,"icon-name"],"iconset":[513],"iconPosition":[513,"icon-position"],"iconOnly":[516,"icon-only"],"href":[513],"target":[513],"color":[1],"fontColor":[513,"font-color"],"textAlign":[513,"text-align"],"styles":[32]}],[1,"cura-accordion-item",{"label":[513],"iconSize":[514,"icon-size"],"openIcon":[513,"open-icon"],"closeIcon":[513,"close-icon"],"iconColor":[513,"icon-color"],"iconActiveColor":[513,"icon-active-color"],"colorMode":[1,"color-mode"],"opened":[1540],"styles":[32]}],[1,"cura-accordion",{"color":[513],"activeColor":[513,"active-color"],"colorMode":[513,"color-mode"],"iconSize":[514,"icon-size"],"openIcon":[513,"open-icon"],"closeIcon":[513,"close-icon"],"iconColor":[513,"icon-color"],"iconActiveColor":[513,"icon-active-color"],"behavior":[513],"styles":[32]}],[1,"cura-heading",{"level":[514],"size":[513],"weight":[513],"spotColor":[513,"spot-color"],"color":[1],"marginBlock":[513,"margin-block"],"lineHeight":[513,"line-height"],"styles":[32]}],[1,"cura-page-template",{"contentwidth":[513]}],[1,"cura-paragraph",{"size":[513],"spotColor":[513,"spot-color"],"color":[1],"marginBlock":[513,"margin-block"],"lineHeight":[513,"line-height"],"styles":[32]}],[1,"cura-loader-circle",{"size":[513],"color":[513]}],[1,"cura-icon",{"name":[513],"color":[1],"size":[8],"iconset":[513],"disabled":[4]}]]],["cura-button-outline.cjs",[[1,"cura-button-outline",{"size":[513],"disabled":[516],"isLoading":[516,"is-loading"],"iconName":[513,"icon-name"],"iconset":[513],"iconPosition":[513,"icon-position"],"iconOnly":[516,"icon-only"],"href":[513],"target":[513],"color":[1],"fontColor":[513,"font-color"],"textAlign":[513,"text-align"],"styles":[32]}]]],["cura-button-transparent.cjs",[[1,"cura-button-transparent",{"size":[513],"disabled":[516],"isLoading":[516,"is-loading"],"iconName":[513,"icon-name"],"iconset":[513],"iconPosition":[513,"icon-position"],"iconOnly":[516,"icon-only"],"href":[513],"target":[513],"color":[1],"fontColor":[513,"font-color"],"textAlign":[513,"text-align"],"styles":[32]}]]],["cura-icons-view.cjs",[[1,"cura-icons-view",{"selected":[32]}]]],["cura-display.cjs",[[1,"cura-display",{"level":[514],"spotColor":[513,"spot-color"],"color":[1],"marginBlock":[513,"margin-block"],"lineHeight":[513,"line-height"],"styles":[32]}]]],["cura-label.cjs",[[1,"cura-label",{"size":[513],"weight":[513],"spotColor":[513,"spot-color"],"color":[1],"marginBlock":[513,"margin-block"],"lineHeight":[513,"line-height"],"styles":[32]}]]]], options);
|
|
32
32
|
});
|
|
33
33
|
|
|
34
34
|
exports.setNonce = index.setNonce;
|
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"index.cjs.js","mappings":"
|
|
1
|
+
{"file":"index.cjs.js","mappings":";;;;SAWgB,QAAQ,CAAC,OAAmB,EAAE,CAAC,GAAG,MAAM;EACtD,CAAC,CAAC,QAAQ,GAAG,OAAO,CAAC;AACvB;;;;","names":[],"sources":["./src/index.ts"],"sourcesContent":["export { Components, JSX } from './components';\nimport CuraAPI from './api/cura-api';\nimport { CuraConfig } from './api/cura-api.type';\n\ndeclare global {\n export interface Window {\n CuraAPI?: CuraAPI,\n CuraInit?: CuraConfig\n }\n}\n\nexport function CuraInit(options: CuraConfig, w = window) {\n w.CuraInit = options;\n}\n"],"version":3}
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-404d93e9.js');
|
|
6
|
-
const appGlobals = require('./app-globals-
|
|
6
|
+
const appGlobals = require('./app-globals-2988084b.js');
|
|
7
7
|
|
|
8
8
|
/*
|
|
9
9
|
Stencil Client Patch Esm v3.3.0 | MIT Licensed | https://stenciljs.com
|
|
@@ -32,7 +32,7 @@ const defineCustomElements = (win, options) => {
|
|
|
32
32
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
33
33
|
return patchEsm().then(() => {
|
|
34
34
|
appGlobals.globalScripts();
|
|
35
|
-
return index.bootstrapLazy([["cura-
|
|
35
|
+
return index.bootstrapLazy([["cura-accordion_8.cjs",[[1,"cura-button",{"size":[513],"disabled":[516],"isLoading":[516,"is-loading"],"iconName":[513,"icon-name"],"iconset":[513],"iconPosition":[513,"icon-position"],"iconOnly":[516,"icon-only"],"href":[513],"target":[513],"color":[1],"fontColor":[513,"font-color"],"textAlign":[513,"text-align"],"styles":[32]}],[1,"cura-accordion-item",{"label":[513],"iconSize":[514,"icon-size"],"openIcon":[513,"open-icon"],"closeIcon":[513,"close-icon"],"iconColor":[513,"icon-color"],"iconActiveColor":[513,"icon-active-color"],"colorMode":[1,"color-mode"],"opened":[1540],"styles":[32]}],[1,"cura-accordion",{"color":[513],"activeColor":[513,"active-color"],"colorMode":[513,"color-mode"],"iconSize":[514,"icon-size"],"openIcon":[513,"open-icon"],"closeIcon":[513,"close-icon"],"iconColor":[513,"icon-color"],"iconActiveColor":[513,"icon-active-color"],"behavior":[513],"styles":[32]}],[1,"cura-heading",{"level":[514],"size":[513],"weight":[513],"spotColor":[513,"spot-color"],"color":[1],"marginBlock":[513,"margin-block"],"lineHeight":[513,"line-height"],"styles":[32]}],[1,"cura-page-template",{"contentwidth":[513]}],[1,"cura-paragraph",{"size":[513],"spotColor":[513,"spot-color"],"color":[1],"marginBlock":[513,"margin-block"],"lineHeight":[513,"line-height"],"styles":[32]}],[1,"cura-loader-circle",{"size":[513],"color":[513]}],[1,"cura-icon",{"name":[513],"color":[1],"size":[8],"iconset":[513],"disabled":[4]}]]],["cura-button-outline.cjs",[[1,"cura-button-outline",{"size":[513],"disabled":[516],"isLoading":[516,"is-loading"],"iconName":[513,"icon-name"],"iconset":[513],"iconPosition":[513,"icon-position"],"iconOnly":[516,"icon-only"],"href":[513],"target":[513],"color":[1],"fontColor":[513,"font-color"],"textAlign":[513,"text-align"],"styles":[32]}]]],["cura-button-transparent.cjs",[[1,"cura-button-transparent",{"size":[513],"disabled":[516],"isLoading":[516,"is-loading"],"iconName":[513,"icon-name"],"iconset":[513],"iconPosition":[513,"icon-position"],"iconOnly":[516,"icon-only"],"href":[513],"target":[513],"color":[1],"fontColor":[513,"font-color"],"textAlign":[513,"text-align"],"styles":[32]}]]],["cura-icons-view.cjs",[[1,"cura-icons-view",{"selected":[32]}]]],["cura-display.cjs",[[1,"cura-display",{"level":[514],"spotColor":[513,"spot-color"],"color":[1],"marginBlock":[513,"margin-block"],"lineHeight":[513,"line-height"],"styles":[32]}]]],["cura-label.cjs",[[1,"cura-label",{"size":[513],"weight":[513],"spotColor":[513,"spot-color"],"color":[1],"marginBlock":[513,"margin-block"],"lineHeight":[513,"line-height"],"styles":[32]}]]]], options);
|
|
36
36
|
});
|
|
37
37
|
};
|
|
38
38
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cura-api.type.js","sourceRoot":"","sources":["../../src/api/cura-api.type.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cura-api.type.js","sourceRoot":"","sources":["../../src/api/cura-api.type.ts"],"names":[],"mappings":"AA+CC,CAAC;AAEF,MAAM,CAAN,IAAY,cAGX;AAHD,WAAY,cAAc;EACxB,iCAAe,CAAA;EACf,+BAAa,CAAA;AACf,CAAC,EAHW,cAAc,KAAd,cAAc,QAGzB","sourcesContent":["export interface CuraCustomThemeColorDepth {\n base?: string,\n depth0?: string,\n depth20?: string,\n depth40?: string,\n depth80?: string,\n depth100?: string\n}\nexport interface CuraCustomThemeColors {\n primary?: CuraCustomThemeColorDepth,\n secondary?: CuraCustomThemeColorDepth,\n accent?: CuraCustomThemeColorDepth\n}\n\nexport interface CuraCustomThemeSpacing {\n base?: string;\n}\n\nexport interface CuraCustomThemeFontFamily {\n title?: string;\n body?: string;\n}\nexport interface CuraCustomThemeFontSize {\n base?: string;\n}\nexport interface CuraCustomThemeFont {\n family?: CuraCustomThemeFontFamily;\n size?: CuraCustomThemeFontSize;\n}\n\nexport interface CuraCustomThemeDefinitions {\n colors?: CuraCustomThemeColors,\n spacing?: CuraCustomThemeSpacing,\n font?: CuraCustomThemeFont\n}\n\nexport interface CuraCustomTheme {\n name: string;\n definitions: CuraCustomThemeDefinitions;\n fromPreset?: string;\n}\n\nexport interface CuraConfig {\n localAssetsPath?: string;\n theme?: string;\n customTheme?: CuraCustomTheme;\n onReady?(api? : any): any;\n};\n\nexport enum InterfaceModes {\n LIGHT = 'light',\n DARK = 'dark'\n}\n\nexport interface APIThemeFunctions {\n load(themeTag: string): unknown,\n setCustom(customThemeDefinitions: CuraCustomTheme): unknown,\n colors: {\n getColor(colorWithDepth?: string, opacity?: number): string,\n },\n fonts: {\n getFamily(type?: string): string,\n getWeights(): any,\n getSize(): string,\n getColor(): string\n },\n spacing: {\n getSpacing(): string,\n },\n breakpoints: {\n get(): any\n }\n}\n\n"]}
|
|
@@ -5,7 +5,7 @@ export default class CuraThemeBreakpointsModule {
|
|
|
5
5
|
get(size = null, position = null) {
|
|
6
6
|
if (size) {
|
|
7
7
|
const breakpoint = position ? Static.breakpoints[size][position] : Static.breakpoints[size];
|
|
8
|
-
if (breakpoint)
|
|
8
|
+
if (breakpoint || breakpoint === 0)
|
|
9
9
|
return breakpoint;
|
|
10
10
|
}
|
|
11
11
|
return Static.breakpoints;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cura-theme-breakpoints-module.js","sourceRoot":"","sources":["../../../src/api/modules/cura-theme-breakpoints-module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAEjD,MAAM,CAAC,OAAO,OAAO,0BAA0B;EAE7C,gBAAe,CAAC;EAEhB,wDAAwD;EACxD,GAAG,CAAC,OAA2D,IAAI,EAAE,WAA0B,IAAI;IACjG,IAAI,IAAI,EAAE;MACR,MAAM,UAAU,GAAG,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;MAC5F,IAAI,UAAU;QAAE,OAAO,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"cura-theme-breakpoints-module.js","sourceRoot":"","sources":["../../../src/api/modules/cura-theme-breakpoints-module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAEjD,MAAM,CAAC,OAAO,OAAO,0BAA0B;EAE7C,gBAAe,CAAC;EAEhB,wDAAwD;EACxD,GAAG,CAAC,OAA2D,IAAI,EAAE,WAA0B,IAAI;IACjG,IAAI,IAAI,EAAE;MACR,MAAM,UAAU,GAAG,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;MAC5F,IAAI,UAAU,IAAI,UAAU,KAAK,CAAC;QAAE,OAAO,UAAU,CAAC;KACvD;IACD,OAAO,MAAM,CAAC,WAAW,CAAC;EAC5B,CAAC;CACF","sourcesContent":["import { Static } from '../theme-presets/static';\n\nexport default class CuraThemeBreakpointsModule {\n\n constructor() {}\n\n /** Returns the base spacing var defined in the theme */\n get(size: 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' = null, position: 'min' | 'max' = null): any {\n if (size) {\n const breakpoint = position ? Static.breakpoints[size][position] : Static.breakpoints[size];\n if (breakpoint || breakpoint === 0) return breakpoint;\n }\n return Static.breakpoints;\n }\n}\n"]}
|
|
@@ -28,7 +28,7 @@ export default class CuraThemeColorsModule {
|
|
|
28
28
|
*/
|
|
29
29
|
getColor(colorWithDepth = "primary-base", opacity = 1) {
|
|
30
30
|
const { color, depth } = this.splitColorDepth(colorWithDepth);
|
|
31
|
-
const staticColor = this.getStatic(color, depth);
|
|
31
|
+
const staticColor = this.getStatic(color, depth, opacity);
|
|
32
32
|
if (staticColor)
|
|
33
33
|
return staticColor;
|
|
34
34
|
return this.getDynamic(color, depth, opacity);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cura-theme-colors-module.js","sourceRoot":"","sources":["../../../src/api/modules/cura-theme-colors-module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAEjD,MAAM,CAAC,OAAO,OAAO,qBAAqB;EAuBxC;IArBA,sBAAiB,GAAG;MAClB,WAAW,EAAE,GAAG;MAChB,OAAO,EAAE,KAAK;MACd,MAAM,EAAE,KAAK;MACb,SAAS,EAAE,KAAK;MAChB,OAAO,EAAE,KAAK;MACd,MAAM,EAAE,KAAK;MACb,QAAQ,EAAE,KAAK;MACf,MAAM,EAAE,KAAK;MACb,QAAQ,EAAE,KAAK;MACf,OAAO,EAAE,KAAK;KACf,CAAC;IAEF,oBAAe,GAAG;MAChB,SAAS,EAAE,KAAK;MAChB,OAAO,EAAE,KAAK;MACd,MAAM,EAAE,KAAK;MACb,MAAM,EAAE,KAAK;MACb,QAAQ,EAAE,KAAK;KAChB,CAAA;EAEc,CAAC;EAEhB;;;;KAIG;EACH,QAAQ,CAAC,iBAAyB,cAAc,EAAE,OAAO,GAAG,CAAC;IAC3D,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC,eAAe,CAAC,cAAc,CAAC,CAAC;IAC9D,MAAM,WAAW,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"cura-theme-colors-module.js","sourceRoot":"","sources":["../../../src/api/modules/cura-theme-colors-module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAEjD,MAAM,CAAC,OAAO,OAAO,qBAAqB;EAuBxC;IArBA,sBAAiB,GAAG;MAClB,WAAW,EAAE,GAAG;MAChB,OAAO,EAAE,KAAK;MACd,MAAM,EAAE,KAAK;MACb,SAAS,EAAE,KAAK;MAChB,OAAO,EAAE,KAAK;MACd,MAAM,EAAE,KAAK;MACb,QAAQ,EAAE,KAAK;MACf,MAAM,EAAE,KAAK;MACb,QAAQ,EAAE,KAAK;MACf,OAAO,EAAE,KAAK;KACf,CAAC;IAEF,oBAAe,GAAG;MAChB,SAAS,EAAE,KAAK;MAChB,OAAO,EAAE,KAAK;MACd,MAAM,EAAE,KAAK;MACb,MAAM,EAAE,KAAK;MACb,QAAQ,EAAE,KAAK;KAChB,CAAA;EAEc,CAAC;EAEhB;;;;KAIG;EACH,QAAQ,CAAC,iBAAyB,cAAc,EAAE,OAAO,GAAG,CAAC;IAC3D,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC,eAAe,CAAC,cAAc,CAAC,CAAC;IAC9D,MAAM,WAAW,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;IAC1D,IAAI,WAAW;MAAE,OAAO,WAAW,CAAC;IACpC,OAAO,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;EAChD,CAAC;EAED;;;;;KAKG;EACH,SAAS,CAAC,KAAa,EAAE,KAAa,EAAE,OAAO,GAAG,CAAC;;IACjD,MAAM,QAAQ,GAAG,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACrC,IAAI,CAAC,QAAQ;MAAE,OAAO,IAAI,CAAC;IAC3B,MAAM,KAAK,GAAG,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;IAChG,OAAO,CAAA,MAAA,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,0CAAG,KAAK,CAAC;MACjC,CAAC,CAAC,QAAQ,MAAA,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,0CAAG,KAAK,CAAC,KAAK,OAAO,GAAG;MACrD,CAAC,CAAC,QAAQ,MAAA,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,0CAAG,KAAK,CAAC,KAAK,OAAO,GAAG,CAAC;EAC1D,CAAC;EAED;;;;;KAKG;EACH,UAAU,CAAC,KAAa,EAAE,KAAa,EAAE,OAAe;IACtD,MAAM,QAAQ,GAAG,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC;MAC1C,CAAC,CAAC,gBAAgB,KAAK,IAAI,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,EAAE;MACxD,CAAC,CAAC,gBAAgB,KAAK,IAAI,KAAK,EAAE,CAAC;IACrC,OAAO,gBAAgB,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC,gBAAgB,CAAC,QAAQ,CAAC;MAC1E,CAAC,CAAC,YAAY,QAAQ,MAAM,OAAO,GAAG;MACtC,CAAC,CAAC,uCAAuC,OAAO,GAAG,CAAC;EACxD,CAAC;EAED;;;;KAIG;EACK,eAAe,CAAC,cAAsB;IAC5C,MAAM,CAAE,KAAK,EAAE,KAAK,CAAE,GAAG,cAAc,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACrE,OAAO,EAAE,KAAK,EAAE,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,SAAS,EAAE,KAAK,EAAE,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,MAAM,EAAE,CAAC;EAC/D,CAAC;CAEF","sourcesContent":["import { Static } from \"../theme-presets/static\";\n\nexport default class CuraThemeColorsModule {\n\n NeutralDepthAlias = {\n 'purewhite': '0',\n 'white': '100',\n 'pale': '200',\n 'lighter': '300',\n 'light': '400',\n 'base': '500',\n 'medium': '600',\n 'dark': '700',\n 'darker': '800',\n 'black': '900',\n };\n\n ColorDepthAlias = {\n 'lighter': '100',\n 'light': '300',\n 'base': '500',\n 'dark': '700',\n 'darker': '900'\n }\n\n constructor() {}\n\n /**\n * Get theme color.\n * @param colorWithDepth string Ex.: primary-light\n * @returns RGBA value.\n */\n getColor(colorWithDepth: string = \"primary-base\", opacity = 1): string {\n const { color, depth } = this.splitColorDepth(colorWithDepth);\n const staticColor = this.getStatic(color, depth, opacity);\n if (staticColor) return staticColor;\n return this.getDynamic(color, depth, opacity);\n }\n\n /**\n * Internal: Look for static color by name and depth.\n * @param color Color name.\n * @param depth Depth number or alias.\n * @returns RGBA value.\n */\n getStatic(color: string, depth: string, opacity = 1) {\n const colorObj = Static.color[color];\n if (!colorObj) return null;\n const alias = color === 'neutral' ? this.NeutralDepthAlias[depth] : this.ColorDepthAlias[depth];\n return Static.color[color]?.[alias]\n ? `rgba(${Static.color[color]?.[alias]}, ${opacity})`\n : `rgba(${Static.color[color]?.[depth]}, ${opacity})`;\n }\n\n /**\n * Internal: Look for theme dynamic colors.\n * @param color Color name.\n * @param depth Color depth.\n * @returns RGBA value.\n */\n getDynamic(color: string, depth: string, opacity: number) {\n const themeVar = this.ColorDepthAlias[depth]\n ? `--cura-color-${color}-${this.ColorDepthAlias[depth]}`\n : `--cura-color-${color}-${depth}`;\n return getComputedStyle(document.documentElement).getPropertyValue(themeVar)\n ? `rgba(var(${themeVar}), ${opacity})`\n : `rgba(var(--cura-color-primary-500), ${opacity})`;\n }\n\n /**\n * Internal: Split color strings\n * @param colorWithDepth Color string [color]-[depth]. Ex.: primary-dark.\n * @returns Object { color: string, depth: string }.\n */\n private splitColorDepth(colorWithDepth: string): { color: string, depth: string } {\n const [ color, depth ] = colorWithDepth.toLowerCase().split(/-(.*)/);\n return { color: color ?? \"primary\", depth: depth ?? \"base\" };\n }\n\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"static.js","sourceRoot":"","sources":["../../../src/api/theme-presets/static.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG;EACpB,YAAY;EACZ,KAAK,EAAE;IACL,OAAO,EAAE;MACP,KAAK,EAAE,aAAa;MACpB,KAAK,EAAE,aAAa;MACpB,KAAK,EAAE,YAAY;MACnB,KAAK,EAAE,WAAW;MAClB,KAAK,EAAE,UAAU;KAClB;IACD,IAAI,EAAE;MACJ,KAAK,EAAE,aAAa;MACpB,KAAK,EAAE,aAAa;MACpB,KAAK,EAAE,aAAa;MACpB,KAAK,EAAE,YAAY;MACnB,KAAK,EAAE,UAAU;KAClB;IACD,KAAK,EAAE;MACL,KAAK,EAAE,aAAa;MACpB,KAAK,EAAE,aAAa;MACpB,KAAK,EAAE,WAAW;MAClB,KAAK,EAAE,WAAW;MAClB,KAAK,EAAE,UAAU;KAClB;IACD,OAAO,EAAE;MACP,KAAK,EAAE,aAAa;MACpB,KAAK,EAAE,aAAa;MACpB,KAAK,EAAE,YAAY;MACnB,KAAK,EAAE,YAAY;MACnB,KAAK,EAAE,UAAU;KAClB;IACD,OAAO,EAAE;MACP,GAAG,EAAE,aAAa;MAClB,KAAK,EAAE,aAAa;MACpB,KAAK,EAAE,aAAa;MACpB,KAAK,EAAE,aAAa;MACpB,KAAK,EAAE,aAAa;MACpB,KAAK,EAAE,aAAa;MACpB,KAAK,EAAE,aAAa;MACpB,KAAK,EAAE,aAAa;MACpB,KAAK,EAAE,UAAU;MACjB,KAAK,EAAE,UAAU;KAClB;GACF;EACD,WAAW,EAAE;IACX,MAAM,EAAE;MACN,GAAG,EAAE,CAAC;MACN,GAAG,EAAE,GAAG;KACT;IACD,KAAK,EAAE;MACL,GAAG,EAAE,GAAG;MACR,GAAG,EAAE,GAAG;KACT;IACD,MAAM,EAAE;MACN,GAAG,EAAE,GAAG;MACR,GAAG,EAAE,GAAG;KACT;IACD,KAAK,EAAE;MACL,GAAG,EAAE,GAAG;MACR,GAAG,EAAE,IAAI;KACV;IACD,MAAM,EAAE;MACN,GAAG,EAAE,IAAI;MACT,GAAG,EAAE,IAAI;KACV;GACF;CACF,CAAC","sourcesContent":["/**\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:
|
|
1
|
+
{"version":3,"file":"static.js","sourceRoot":"","sources":["../../../src/api/theme-presets/static.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG;EACpB,YAAY;EACZ,KAAK,EAAE;IACL,OAAO,EAAE;MACP,KAAK,EAAE,aAAa;MACpB,KAAK,EAAE,aAAa;MACpB,KAAK,EAAE,YAAY;MACnB,KAAK,EAAE,WAAW;MAClB,KAAK,EAAE,UAAU;KAClB;IACD,IAAI,EAAE;MACJ,KAAK,EAAE,aAAa;MACpB,KAAK,EAAE,aAAa;MACpB,KAAK,EAAE,aAAa;MACpB,KAAK,EAAE,YAAY;MACnB,KAAK,EAAE,UAAU;KAClB;IACD,KAAK,EAAE;MACL,KAAK,EAAE,aAAa;MACpB,KAAK,EAAE,aAAa;MACpB,KAAK,EAAE,WAAW;MAClB,KAAK,EAAE,WAAW;MAClB,KAAK,EAAE,UAAU;KAClB;IACD,OAAO,EAAE;MACP,KAAK,EAAE,aAAa;MACpB,KAAK,EAAE,aAAa;MACpB,KAAK,EAAE,YAAY;MACnB,KAAK,EAAE,YAAY;MACnB,KAAK,EAAE,UAAU;KAClB;IACD,OAAO,EAAE;MACP,GAAG,EAAE,aAAa;MAClB,KAAK,EAAE,aAAa;MACpB,KAAK,EAAE,aAAa;MACpB,KAAK,EAAE,aAAa;MACpB,KAAK,EAAE,aAAa;MACpB,KAAK,EAAE,aAAa;MACpB,KAAK,EAAE,aAAa;MACpB,KAAK,EAAE,aAAa;MACpB,KAAK,EAAE,UAAU;MACjB,KAAK,EAAE,UAAU;KAClB;GACF;EACD,WAAW,EAAE;IACX,MAAM,EAAE;MACN,GAAG,EAAE,CAAC;MACN,GAAG,EAAE,GAAG;KACT;IACD,KAAK,EAAE;MACL,GAAG,EAAE,GAAG;MACR,GAAG,EAAE,GAAG;KACT;IACD,MAAM,EAAE;MACN,GAAG,EAAE,GAAG;MACR,GAAG,EAAE,GAAG;KACT;IACD,KAAK,EAAE;MACL,GAAG,EAAE,GAAG;MACR,GAAG,EAAE,IAAI;KACV;IACD,MAAM,EAAE;MACN,GAAG,EAAE,IAAI;MACT,GAAG,EAAE,IAAI;KACV;GACF;CACF,CAAC","sourcesContent":["/**\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: 1920\n },\n xlarge: {\n min: 1921,\n max: 4096\n }\n }\n};\n"]}
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
"./components/cura-icon/cura-icon.js",
|
|
9
9
|
"./components/cura-icons-view/cura-icons-view.js",
|
|
10
10
|
"./components/cura-page-template/cura-page-template.js",
|
|
11
|
+
"./components/forms/cura-label/cura-label.js",
|
|
11
12
|
"./components/loaders/cura-loader-circle/cura-loader-circle.js",
|
|
12
13
|
"./components/text/cura-display/cura-display.js",
|
|
13
14
|
"./components/text/cura-heading/cura-heading.js",
|
|
@@ -11,14 +11,18 @@
|
|
|
11
11
|
* Responsive media for large only.
|
|
12
12
|
* Use: @include large-only() { ... }
|
|
13
13
|
*/
|
|
14
|
-
/**
|
|
15
|
-
* Responsive media for large and up.
|
|
16
|
-
* Use: @include large-up() { ... }
|
|
17
|
-
*/
|
|
18
14
|
/**
|
|
19
15
|
* Responsive media for xlarge only.
|
|
20
16
|
* Use: @include xlarge-only() { ... }
|
|
21
17
|
*/
|
|
18
|
+
/**
|
|
19
|
+
* Responsive media for medium to large.
|
|
20
|
+
* Use: @include medium-large() { ... }
|
|
21
|
+
*/
|
|
22
|
+
/**
|
|
23
|
+
* Responsive media for large and up.
|
|
24
|
+
* Use: @include large-up() { ... }
|
|
25
|
+
*/
|
|
22
26
|
:host {
|
|
23
27
|
display: block;
|
|
24
28
|
}
|
|
@@ -124,7 +128,7 @@
|
|
|
124
128
|
:host .accordion-item.active.inverted .label .label-container:active cura-icon {
|
|
125
129
|
--color: var(--icon-color-active-light) !important;
|
|
126
130
|
}
|
|
127
|
-
@media (min-width:
|
|
131
|
+
@media (min-width: 769px) and (max-width: 992px) {
|
|
128
132
|
:host .accordion-item .label .label-container {
|
|
129
133
|
font-size: 1.29em;
|
|
130
134
|
}
|
|
@@ -132,7 +136,7 @@
|
|
|
132
136
|
font-size: 1.14em;
|
|
133
137
|
}
|
|
134
138
|
}
|
|
135
|
-
@media (min-width:
|
|
139
|
+
@media (min-width: 993px) {
|
|
136
140
|
:host .accordion-item .label .label-container {
|
|
137
141
|
font-size: 1.29em;
|
|
138
142
|
}
|
|
@@ -11,14 +11,18 @@
|
|
|
11
11
|
* Responsive media for large only.
|
|
12
12
|
* Use: @include large-only() { ... }
|
|
13
13
|
*/
|
|
14
|
-
/**
|
|
15
|
-
* Responsive media for large and up.
|
|
16
|
-
* Use: @include large-up() { ... }
|
|
17
|
-
*/
|
|
18
14
|
/**
|
|
19
15
|
* Responsive media for xlarge only.
|
|
20
16
|
* Use: @include xlarge-only() { ... }
|
|
21
17
|
*/
|
|
18
|
+
/**
|
|
19
|
+
* Responsive media for medium to large.
|
|
20
|
+
* Use: @include medium-large() { ... }
|
|
21
|
+
*/
|
|
22
|
+
/**
|
|
23
|
+
* Responsive media for large and up.
|
|
24
|
+
* Use: @include large-up() { ... }
|
|
25
|
+
*/
|
|
22
26
|
:host {
|
|
23
27
|
display: block;
|
|
24
28
|
}
|
|
@@ -49,17 +53,17 @@
|
|
|
49
53
|
:host .grid-template #sub-footer {
|
|
50
54
|
grid-area: sub-footer;
|
|
51
55
|
}
|
|
52
|
-
@media (max-width:
|
|
56
|
+
@media (max-width: 768px) {
|
|
53
57
|
:host .grid-template {
|
|
54
58
|
padding: 0px;
|
|
55
59
|
}
|
|
56
60
|
}
|
|
57
|
-
@media (min-width:
|
|
61
|
+
@media (min-width: 769px) and (max-width: 992px) {
|
|
58
62
|
:host .grid-template {
|
|
59
63
|
padding: 0px;
|
|
60
64
|
}
|
|
61
65
|
}
|
|
62
|
-
@media (min-width:
|
|
66
|
+
@media (min-width: 993px) and (max-width: 1920px) {
|
|
63
67
|
:host .grid-template {
|
|
64
68
|
padding: 0px;
|
|
65
69
|
}
|
|
@@ -79,7 +83,7 @@
|
|
|
79
83
|
max-width: 20%;
|
|
80
84
|
}
|
|
81
85
|
}
|
|
82
|
-
@media (min-width:
|
|
86
|
+
@media (min-width: 1921px) {
|
|
83
87
|
:host .grid-template {
|
|
84
88
|
padding: 0px;
|
|
85
89
|
}
|
|
@@ -99,7 +103,7 @@
|
|
|
99
103
|
max-width: 20%;
|
|
100
104
|
}
|
|
101
105
|
:host .grid-template #content-container.centered {
|
|
102
|
-
max-width:
|
|
106
|
+
max-width: 1921px;
|
|
103
107
|
justify-self: center;
|
|
104
108
|
}
|
|
105
109
|
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/* Breakpoints variables */
|
|
2
|
+
/**
|
|
3
|
+
* Responsive media for mobile (small) only.
|
|
4
|
+
* Use: @include mobile-only() { ... }
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Responsive media for medium only.
|
|
8
|
+
* Use: @include medium-only() { ... }
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Responsive media for large only.
|
|
12
|
+
* Use: @include large-only() { ... }
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Responsive media for xlarge only.
|
|
16
|
+
* Use: @include xlarge-only() { ... }
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* Responsive media for medium to large.
|
|
20
|
+
* Use: @include medium-large() { ... }
|
|
21
|
+
*/
|
|
22
|
+
/**
|
|
23
|
+
* Responsive media for large and up.
|
|
24
|
+
* Use: @include large-up() { ... }
|
|
25
|
+
*/
|
|
26
|
+
:host {
|
|
27
|
+
display: block;
|
|
28
|
+
font-size: var(--font-size-base);
|
|
29
|
+
}
|
|
30
|
+
:host p {
|
|
31
|
+
font-family: var(--font-family);
|
|
32
|
+
font-size: 1.143em;
|
|
33
|
+
font-weight: var(--font-weight-medium);
|
|
34
|
+
color: var(--color-body);
|
|
35
|
+
line-height: var(--line-height);
|
|
36
|
+
margin-block: var(--margin-block);
|
|
37
|
+
letter-spacing: 0.32px;
|
|
38
|
+
}
|
|
39
|
+
:host p.bold-weight, :host p ::slotted(b), :host p ::slotted(strong), :host p ::slotted(u) {
|
|
40
|
+
font-weight: var(--font-weight-bold);
|
|
41
|
+
}
|
|
42
|
+
:host p.large {
|
|
43
|
+
font-size: 1.357em;
|
|
44
|
+
line-height: calc(var(--line-height) - 4%);
|
|
45
|
+
letter-spacing: 0px;
|
|
46
|
+
}
|
|
47
|
+
:host p.small {
|
|
48
|
+
font-size: 1em;
|
|
49
|
+
line-height: calc(var(--line-height) - 4%);
|
|
50
|
+
letter-spacing: 0.56px;
|
|
51
|
+
}
|
|
52
|
+
:host p.xsmall {
|
|
53
|
+
font-size: 0.857em;
|
|
54
|
+
line-height: calc(var(--line-height) - 17%);
|
|
55
|
+
letter-spacing: 0.72px;
|
|
56
|
+
}
|
|
57
|
+
:host ::slotted(a) {
|
|
58
|
+
font-weight: var(--font-weight-bold);
|
|
59
|
+
color: var(--color-link);
|
|
60
|
+
text-underline-offset: 10%;
|
|
61
|
+
}
|
|
62
|
+
:host ::slotted(u) {
|
|
63
|
+
text-underline-offset: 10%;
|
|
64
|
+
}
|
|
65
|
+
:host ::slotted(abbr) {
|
|
66
|
+
color: var(--color-link);
|
|
67
|
+
text-decoration: underline dashed 1px var(--color-link);
|
|
68
|
+
text-underline-offset: 10%;
|
|
69
|
+
cursor: default;
|
|
70
|
+
}
|