@rededor/cura 0.3.5 → 0.3.7
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-a41d7f40.js → app-globals-6c6fb457.js} +28 -65
- package/dist/cjs/app-globals-6c6fb457.js.map +1 -0
- package/dist/cjs/cura-button_9.cjs.entry.js +519 -0
- package/dist/cjs/cura-button_9.cjs.entry.js.map +1 -0
- package/dist/cjs/cura.cjs.js +2 -2
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/api/modules/cura-theme-colors-module.js +7 -2
- package/dist/collection/api/modules/cura-theme-colors-module.js.map +1 -1
- package/dist/collection/api/theme-presets/static.js +20 -62
- package/dist/collection/api/theme-presets/static.js.map +1 -1
- package/dist/collection/collection-manifest.json +3 -0
- package/dist/collection/components/buttons/cura-button/cura-button.css +128 -125
- package/dist/collection/components/buttons/cura-button/cura-button.js +36 -33
- package/dist/collection/components/buttons/cura-button/cura-button.js.map +1 -1
- 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 +308 -0
- package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.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 +308 -0
- package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.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/text/cura-display/cura-display.js +3 -3
- package/dist/collection/components/text/cura-display/cura-display.js.map +1 -1
- package/dist/collection/components/text/cura-heading/cura-heading.js +3 -3
- package/dist/collection/components/text/cura-heading/cura-heading.js.map +1 -1
- package/dist/collection/components/text/cura-paragraph/cura-paragraph.js +3 -3
- package/dist/collection/components/text/cura-paragraph/cura-paragraph.js.map +1 -1
- 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.js +28 -18
- package/dist/components/cura-button.js.map +1 -1
- package/dist/components/cura-display.js +3 -3
- package/dist/components/cura-display.js.map +1 -1
- package/dist/components/cura-heading.js +3 -3
- package/dist/components/cura-heading.js.map +1 -1
- 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-paragraph.js +3 -3
- package/dist/components/cura-paragraph.js.map +1 -1
- package/dist/components/index.js +33 -64
- 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/p-17ac5c79.system.js +2 -0
- package/dist/cura/p-17ac5c79.system.js.map +1 -0
- package/dist/cura/p-25345c98.system.entry.js +2 -0
- package/dist/cura/p-25345c98.system.entry.js.map +1 -0
- package/dist/cura/p-bb730a40.entry.js +2 -0
- package/dist/cura/p-bb730a40.entry.js.map +1 -0
- package/dist/cura/p-c8bb96d1.system.js +2 -0
- package/dist/cura/p-c8bb96d1.system.js.map +1 -0
- package/dist/cura/p-efea6652.js +2 -0
- package/dist/cura/p-efea6652.js.map +1 -0
- package/dist/esm/{app-globals-8ed931e6.js → app-globals-7fe8416c.js} +28 -65
- package/dist/esm/app-globals-7fe8416c.js.map +1 -0
- package/dist/esm/cura-button_9.entry.js +507 -0
- package/dist/esm/cura-button_9.entry.js.map +1 -0
- package/dist/esm/cura.js +2 -2
- package/dist/esm/loader.js +2 -2
- package/dist/esm-es5/app-globals-7fe8416c.js +2 -0
- package/dist/esm-es5/app-globals-7fe8416c.js.map +1 -0
- package/dist/esm-es5/cura-button_9.entry.js +2 -0
- package/dist/esm-es5/cura-button_9.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/loader.js +1 -1
- package/dist/esm-es5/loader.js.map +1 -1
- package/dist/types/api/theme-presets/static.d.ts +20 -40
- package/dist/types/components/buttons/cura-button/cura-button.d.ts +6 -4
- package/dist/types/components/buttons/cura-button-outline/cura-button-outline.d.ts +61 -0
- package/dist/types/components/buttons/cura-button-transparent/cura-button-transparent.d.ts +61 -0
- package/dist/types/components/loaders/cura-loader-circle/cura-loader-circle.d.ts +23 -0
- package/dist/types/components.d.ts +251 -4
- package/package.json +2 -2
- package/dist/cjs/app-globals-a41d7f40.js.map +0 -1
- package/dist/cjs/cura-button_6.cjs.entry.js +0 -336
- package/dist/cjs/cura-button_6.cjs.entry.js.map +0 -1
- package/dist/cura/p-36c8b693.system.js +0 -2
- package/dist/cura/p-36c8b693.system.js.map +0 -1
- package/dist/cura/p-4fc49972.system.js +0 -2
- package/dist/cura/p-4fc49972.system.js.map +0 -1
- package/dist/cura/p-afece917.system.entry.js +0 -2
- package/dist/cura/p-afece917.system.entry.js.map +0 -1
- package/dist/cura/p-bac0b4ab.js +0 -2
- package/dist/cura/p-bac0b4ab.js.map +0 -1
- package/dist/cura/p-cb641774.entry.js +0 -2
- package/dist/cura/p-cb641774.entry.js.map +0 -1
- package/dist/esm/app-globals-8ed931e6.js.map +0 -1
- package/dist/esm/cura-button_6.entry.js +0 -327
- package/dist/esm/cura-button_6.entry.js.map +0 -1
- package/dist/esm-es5/app-globals-8ed931e6.js +0 -2
- package/dist/esm-es5/app-globals-8ed931e6.js.map +0 -1
- package/dist/esm-es5/cura-button_6.entry.js +0 -2
- package/dist/esm-es5/cura-button_6.entry.js.map +0 -1
|
@@ -0,0 +1,519 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-0e874533.js');
|
|
6
|
+
|
|
7
|
+
const curaButtonCss = ":host{--border-radius:4px;display:inline-block;vertical-align:middle}:host button,:host a{outline:none;-webkit-box-shadow:none;box-shadow:none;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;width:100%;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;text-decoration:none !important;font-size:var(--font-size);cursor:pointer;-webkit-transition:background-color 0.07s linear, border-color 0.07s linear, -webkit-box-shadow 0.07s linear;transition:background-color 0.07s linear, border-color 0.07s linear, -webkit-box-shadow 0.07s linear;transition:background-color 0.07s linear, box-shadow 0.07s linear, border-color 0.07s linear;transition:background-color 0.07s linear, box-shadow 0.07s linear, border-color 0.07s linear, -webkit-box-shadow 0.07s linear;border-radius:var(--border-radius);background-color:var(--color-base);border:none;padding:calc(var(--base-spacing) * 3.5px) calc(var(--base-spacing) * 4px);min-height:calc(var(--base-spacing) * 13px);min-width:calc(var(--base-spacing) * 13px)}:host button:not(.isLoading):not(.disabled):hover,:host a:not(.isLoading):not(.disabled):hover{background-color:var(--color-light)}:host button:not(.isLoading):not(.disabled):active,:host a:not(.isLoading):not(.disabled):active{background-color:var(--color-dark)}:host button:hover,:host a:hover{-webkit-box-shadow:0 4px 8px 0 rgba(38, 38, 38, 0.16);box-shadow:0 4px 8px 0 rgba(38, 38, 38, 0.16)}:host button.medium:hover,:host a.medium:hover{-webkit-box-shadow:0 3px 6px 0 rgba(38, 38, 38, 0.16);box-shadow:0 3px 6px 0 rgba(38, 38, 38, 0.16)}:host button.small:hover,:host a.small:hover{-webkit-box-shadow:0 2px 5px 0 rgba(38, 38, 38, 0.16);box-shadow:0 2px 5px 0 rgba(38, 38, 38, 0.16)}:host button:active,:host button.disabled:hover,:host button.isLoading:hover,:host a:active,:host a.disabled:hover,:host a.isLoading:hover{-webkit-box-shadow:none !important;box-shadow:none !important}:host button.medium,:host a.medium{padding:calc(var(--base-spacing) * 2.75px) calc(var(--base-spacing) * 4px);min-height:calc(var(--base-spacing) * 11px);min-width:calc(var(--base-spacing) * 11px)}:host button.small,:host a.small{padding:calc(var(--base-spacing) * 1.5px) calc(var(--base-spacing) * 3px);min-height:calc(var(--base-spacing) * 8px);min-width:calc(var(--base-spacing) * 8px)}:host button .button-container,:host a .button-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;opacity:1;-webkit-transition:opacity 0.2s linear;transition:opacity 0.2s linear}:host button.icon-right .button-container,:host a.icon-right .button-container{-ms-flex-direction:row-reverse;flex-direction:row-reverse}:host button .label,:host a .label{-ms-flex:1;flex:1;font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:1.43em;line-height:1.2em;text-align:var(--text-align, \"left\");color:var(--neutral-black)}:host button .label.inverted,:host a .label.inverted{color:var(--neutral-white)}:host button.medium .label,:host a.medium .label{font-size:1.14em}:host button.small .label,:host a.small .label{font-size:1em}:host button.icon-left cura-icon,:host a.icon-left cura-icon{margin-right:calc(var(--base-spacing) * 3px)}:host button.icon-right cura-icon,:host a.icon-right cura-icon{margin-left:calc(var(--base-spacing) * 3px)}:host button.medium.icon-left cura-icon,:host a.medium.icon-left cura-icon{margin-right:calc(var(--base-spacing) * 2.7px)}:host button.medium.icon-right cura-icon,:host a.medium.icon-right cura-icon{margin-left:calc(var(--base-spacing) * 2.7px)}:host button.small.icon-left cura-icon,:host a.small.icon-left cura-icon{margin-right:calc(var(--base-spacing) * 2.5px)}:host button.small.icon-right cura-icon,:host a.small.icon-right cura-icon{margin-left:calc(var(--base-spacing) * 2.5px)}:host button.disabled,:host a.disabled{cursor:not-allowed;background-color:var(--neutral-light)}:host button.disabled .label,:host button.disabled .label.inverted,:host a.disabled .label,:host a.disabled .label.inverted{color:var(--neutral-dark)}:host button.icon-only,:host a.icon-only{padding:calc(var(--base-spacing) * 3.5px)}:host button.icon-only .label,:host a.icon-only .label{display:none}:host button.icon-only cura-icon,:host a.icon-only cura-icon{margin-left:0 !important;margin-right:0 !important}:host button.icon-only.medium,:host a.icon-only.medium{padding:calc(var(--base-spacing) * 2.75px)}:host button.icon-only.small,:host a.icon-only.small{padding:calc(var(--base-spacing) * 1.5px)}:host button cura-loader-circle,:host a cura-loader-circle{position:absolute;display:none}:host button.isLoading,:host a.isLoading{cursor:wait}:host button.isLoading .button-container,:host a.isLoading .button-container{opacity:0.3}:host button.isLoading.icon-only .button-container,:host a.isLoading.icon-only .button-container{opacity:0}:host button.isLoading cura-loader-circle,:host a.isLoading cura-loader-circle{display:block}";
|
|
8
|
+
|
|
9
|
+
const CuraButton = class {
|
|
10
|
+
constructor(hostRef) {
|
|
11
|
+
index.registerInstance(this, hostRef);
|
|
12
|
+
this.size = 'medium';
|
|
13
|
+
this.disabled = false;
|
|
14
|
+
this.isLoading = false;
|
|
15
|
+
this.iconName = undefined;
|
|
16
|
+
this.iconset = 'default';
|
|
17
|
+
this.iconPosition = 'left';
|
|
18
|
+
this.iconOnly = undefined;
|
|
19
|
+
this.href = undefined;
|
|
20
|
+
this.target = "_self";
|
|
21
|
+
this.color = 'accent';
|
|
22
|
+
this.fontColor = 'dark';
|
|
23
|
+
this.textAlign = 'left';
|
|
24
|
+
this.styles = {};
|
|
25
|
+
}
|
|
26
|
+
handleChangeColor() {
|
|
27
|
+
this.setColors();
|
|
28
|
+
}
|
|
29
|
+
connectedCallback() {
|
|
30
|
+
this.weights = window.CuraAPI.theme.fonts.getWeights();
|
|
31
|
+
this.styles['--base-spacing'] = window.CuraAPI.theme.spacing.getSpacing();
|
|
32
|
+
this.styles['--neutral-white'] = window.CuraAPI.theme.colors.getColor(`neutral-white`);
|
|
33
|
+
this.styles['--neutral-light'] = window.CuraAPI.theme.colors.getColor(`neutral-light`);
|
|
34
|
+
this.styles['--neutral-dark'] = window.CuraAPI.theme.colors.getColor(`neutral-dark`);
|
|
35
|
+
this.styles['--font-size'] = window.CuraAPI.theme.fonts.getSize();
|
|
36
|
+
this.styles['--font-family'] = window.CuraAPI.theme.fonts.getFamily();
|
|
37
|
+
this.styles['--font-weight-medium'] = this.weights.medium;
|
|
38
|
+
this.styles['--text-align'] = this.textAlign;
|
|
39
|
+
this.setColors();
|
|
40
|
+
}
|
|
41
|
+
getClasses() {
|
|
42
|
+
const classes = {};
|
|
43
|
+
classes[`${this.size.toLowerCase()}`] = true;
|
|
44
|
+
classes[`icon-${this.iconPosition.toLowerCase()}`] = true;
|
|
45
|
+
classes[`icon-only`] = this.iconOnly;
|
|
46
|
+
classes['inverted'] = this.fontColor === 'light';
|
|
47
|
+
classes['disabled'] = this.disabled;
|
|
48
|
+
classes['isLoading'] = this.isLoading;
|
|
49
|
+
return classes;
|
|
50
|
+
}
|
|
51
|
+
setColors() {
|
|
52
|
+
this.styles = Object.assign(Object.assign({}, this.styles), { '--color-light': window.CuraAPI.theme.colors.getColor(`${this.color}-light`), '--color-base': window.CuraAPI.theme.colors.getColor(`${this.color}-base`), '--color-dark': window.CuraAPI.theme.colors.getColor(`${this.color}-dark`) });
|
|
53
|
+
}
|
|
54
|
+
getIcon() {
|
|
55
|
+
if (!this.iconName)
|
|
56
|
+
return '';
|
|
57
|
+
const iconSize = this.size === 'small' ? 16 : this.size === 'medium' ? 20 : 24;
|
|
58
|
+
const color = this.getSymbolColor();
|
|
59
|
+
return index.h("cura-icon", { name: this.iconName, iconset: this.iconset, size: iconSize, color: color });
|
|
60
|
+
}
|
|
61
|
+
getSymbolColor() {
|
|
62
|
+
return this.disabled
|
|
63
|
+
? 'neutral-dark'
|
|
64
|
+
: this.fontColor === 'light'
|
|
65
|
+
? 'neutral-white'
|
|
66
|
+
: 'neutral-black';
|
|
67
|
+
}
|
|
68
|
+
handleClick(e) {
|
|
69
|
+
if (this.disabled || this.isLoading)
|
|
70
|
+
e.preventDefault();
|
|
71
|
+
}
|
|
72
|
+
render() {
|
|
73
|
+
return (index.h(index.Host, null, this.href ? (index.h("a", { href: this.disabled ? '' : this.href, target: this.target, class: this.getClasses(), style: this.styles, onClick: (e) => this.handleClick(e) }, index.h("span", { class: "button-container" }, this.getIcon(), index.h("span", { class: { label: true, inverted: this.fontColor === 'light' } }, index.h("slot", null))), index.h("cura-loader-circle", { size: this.size, color: this.getSymbolColor() }))) : (index.h("button", { class: this.getClasses(), style: this.styles, disabled: this.disabled || null, onClick: (e) => this.handleClick(e) }, index.h("span", { class: "button-container" }, this.getIcon(), index.h("span", { class: { label: true, inverted: this.fontColor === 'light' } }, index.h("slot", null))), index.h("cura-loader-circle", { size: this.size, color: this.getSymbolColor() })))));
|
|
74
|
+
}
|
|
75
|
+
static get watchers() { return {
|
|
76
|
+
"color": ["handleChangeColor"]
|
|
77
|
+
}; }
|
|
78
|
+
};
|
|
79
|
+
CuraButton.style = curaButtonCss;
|
|
80
|
+
|
|
81
|
+
const curaButtonOutlineCss = ":host{--border-radius:4px;display:inline-block;vertical-align:middle}:host button,:host a{outline:none;-webkit-box-shadow:none;box-shadow:none;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;width:100%;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;text-decoration:none !important;font-size:var(--font-size);cursor:pointer;-webkit-transition:background-color 0.07s linear, border-color 0.07s linear, -webkit-box-shadow 0.07s linear;transition:background-color 0.07s linear, border-color 0.07s linear, -webkit-box-shadow 0.07s linear;transition:background-color 0.07s linear, box-shadow 0.07s linear, border-color 0.07s linear;transition:background-color 0.07s linear, box-shadow 0.07s linear, border-color 0.07s linear, -webkit-box-shadow 0.07s linear;border-radius:var(--border-radius);background-color:transparent;border:none;-webkit-box-shadow:inset 0px 0px 0px 2px var(--color-base);box-shadow:inset 0px 0px 0px 2px var(--color-base);padding:calc(var(--base-spacing) * 3.5px) calc(var(--base-spacing) * 4px);min-height:calc(var(--base-spacing) * 13px);min-width:calc(var(--base-spacing) * 13px)}:host button:not(.disabled):not(.isLoading):hover,:host a:not(.disabled):not(.isLoading):hover{-webkit-box-shadow:inset 0px 0px 0px 2px var(--color-light);box-shadow:inset 0px 0px 0px 2px var(--color-light)}:host button:not(.disabled):not(.isLoading):hover .label,:host a:not(.disabled):not(.isLoading):hover .label{color:var(--color-light)}:host button:not(.disabled):not(.isLoading):hover cura-icon,:host a:not(.disabled):not(.isLoading):hover cura-icon{--color:var(--color-light) !important}:host button:not(.disabled):not(.inverted):not(.isLoading):active,:host a:not(.disabled):not(.inverted):not(.isLoading):active{-webkit-box-shadow:inset 0px 0px 0px 2px var(--color-dark);box-shadow:inset 0px 0px 0px 2px var(--color-dark)}:host button:not(.disabled):not(.inverted):not(.isLoading):active .label,:host a:not(.disabled):not(.inverted):not(.isLoading):active .label{color:var(--color-dark)}:host button:not(.disabled):not(.inverted):not(.isLoading):active cura-icon,:host a:not(.disabled):not(.inverted):not(.isLoading):active cura-icon{--color:var(--color-dark) !important}:host button.medium,:host a.medium{padding:calc(var(--base-spacing) * 2.75px) calc(var(--base-spacing) * 4px);min-height:calc(var(--base-spacing) * 11px);min-width:calc(var(--base-spacing) * 11px)}:host button.small,:host a.small{padding:calc(var(--base-spacing) * 1.5px) calc(var(--base-spacing) * 3px);min-height:calc(var(--base-spacing) * 8px);min-width:calc(var(--base-spacing) * 8px)}:host button .button-container,:host a .button-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;opacity:1;-webkit-transition:opacity 0.2s linear;transition:opacity 0.2s linear}:host button.icon-right .button-container,:host a.icon-right .button-container{-ms-flex-direction:row-reverse;flex-direction:row-reverse}:host button .label,:host a .label{-ms-flex:1;flex:1;font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:1.43em;line-height:1.2em;text-align:var(--text-align, \"left\");color:var(--color-base)}:host button .label.inverted,:host a .label.inverted{color:var(--neutral-white)}:host button.medium .label,:host a.medium .label{font-size:1.14em}:host button.small .label,:host a.small .label{font-size:1em}:host button.icon-left cura-icon,:host a.icon-left cura-icon{margin-right:calc(var(--base-spacing) * 3px)}:host button.icon-right cura-icon,:host a.icon-right cura-icon{margin-left:calc(var(--base-spacing) * 3px)}:host button.medium.icon-left cura-icon,:host a.medium.icon-left cura-icon{margin-right:calc(var(--base-spacing) * 2.7px)}:host button.medium.icon-right cura-icon,:host a.medium.icon-right cura-icon{margin-left:calc(var(--base-spacing) * 2.7px)}:host button.small.icon-left cura-icon,:host a.small.icon-left cura-icon{margin-right:calc(var(--base-spacing) * 2.5px)}:host button.small.icon-right cura-icon,:host a.small.icon-right cura-icon{margin-left:calc(var(--base-spacing) * 2.5px)}:host button.disabled,:host a.disabled{cursor:not-allowed;-webkit-box-shadow:inset 0px 0px 0px 2px var(--neutral-base);box-shadow:inset 0px 0px 0px 2px var(--neutral-base)}:host button.disabled .label,:host button.disabled .label.inverted,:host a.disabled .label,:host a.disabled .label.inverted{color:var(--neutral-dark)}:host button.disabled.inverted,:host a.disabled.inverted{opacity:0.6;-webkit-box-shadow:inset 0px 0px 0px 2px var(--neutral-white);box-shadow:inset 0px 0px 0px 2px var(--neutral-white)}:host button.disabled.inverted .label,:host button.disabled.inverted .label.inverted,:host a.disabled.inverted .label,:host a.disabled.inverted .label.inverted{color:var(--neutral-white)}:host button.disabled.inverted cura-icon,:host a.disabled.inverted cura-icon{--color:var(--neutral-white) !important}:host button.disabled.inverted cura-loader-circle,:host a.disabled.inverted cura-loader-circle{--color:var(--neutral-white) !important}:host button.icon-only,:host a.icon-only{padding:calc(var(--base-spacing) * 3.5px)}:host button.icon-only .label,:host a.icon-only .label{display:none}:host button.icon-only cura-icon,:host a.icon-only cura-icon{margin-left:0 !important;margin-right:0 !important}:host button.icon-only.medium,:host a.icon-only.medium{padding:calc(var(--base-spacing) * 2.75px)}:host button.icon-only.small,:host a.icon-only.small{padding:calc(var(--base-spacing) * 1.5px)}:host button.inverted,:host a.inverted{-webkit-box-shadow:inset 0px 0px 0px 2px var(--neutral-white);box-shadow:inset 0px 0px 0px 2px var(--neutral-white)}:host button.inverted:not(.disabled):not(.isLoading):hover,:host a.inverted:not(.disabled):not(.isLoading):hover{-webkit-box-shadow:inset 0px 0px 0px 2px var(--color-lighter);box-shadow:inset 0px 0px 0px 2px var(--color-lighter)}:host button.inverted:not(.disabled):not(.isLoading):hover .label,:host a.inverted:not(.disabled):not(.isLoading):hover .label{color:var(--color-lighter)}:host button.inverted:not(.disabled):not(.isLoading):hover cura-icon,:host a.inverted:not(.disabled):not(.isLoading):hover cura-icon{--color:var(--color-lighter) !important}:host button.inverted:not(.disabled):not(.isLoading):active,:host a.inverted:not(.disabled):not(.isLoading):active{-webkit-box-shadow:inset 0px 0px 0px 2px var(--color-light);box-shadow:inset 0px 0px 0px 2px var(--color-light)}:host button.inverted:not(.disabled):not(.isLoading):active .label,:host a.inverted:not(.disabled):not(.isLoading):active .label{color:var(--color-light)}:host button.inverted:not(.disabled):not(.isLoading):active cura-icon,:host a.inverted:not(.disabled):not(.isLoading):active cura-icon{--color:var(--color-light) !important}:host button cura-loader-circle,:host a cura-loader-circle{position:absolute;display:none}:host button.isLoading,:host a.isLoading{cursor:wait}:host button.isLoading .button-container,:host a.isLoading .button-container{opacity:0.3}:host button.isLoading.icon-only .button-container,:host a.isLoading.icon-only .button-container{opacity:0}:host button.isLoading cura-loader-circle,:host a.isLoading cura-loader-circle{display:block}";
|
|
82
|
+
|
|
83
|
+
const CuraButtonOutline = class {
|
|
84
|
+
constructor(hostRef) {
|
|
85
|
+
index.registerInstance(this, hostRef);
|
|
86
|
+
this.size = 'large';
|
|
87
|
+
this.disabled = false;
|
|
88
|
+
this.isLoading = false;
|
|
89
|
+
this.iconName = undefined;
|
|
90
|
+
this.iconset = 'default';
|
|
91
|
+
this.iconPosition = 'left';
|
|
92
|
+
this.iconOnly = undefined;
|
|
93
|
+
this.href = undefined;
|
|
94
|
+
this.target = "_self";
|
|
95
|
+
this.color = 'accent';
|
|
96
|
+
this.fontColor = 'dark';
|
|
97
|
+
this.textAlign = 'left';
|
|
98
|
+
this.styles = {};
|
|
99
|
+
}
|
|
100
|
+
handleChangeColor() {
|
|
101
|
+
this.setColors();
|
|
102
|
+
}
|
|
103
|
+
connectedCallback() {
|
|
104
|
+
this.weights = window.CuraAPI.theme.fonts.getWeights();
|
|
105
|
+
this.styles['--base-spacing'] = window.CuraAPI.theme.spacing.getSpacing();
|
|
106
|
+
this.styles['--neutral-white'] = window.CuraAPI.theme.colors.getColor(`neutral-white`);
|
|
107
|
+
this.styles['--neutral-base'] = window.CuraAPI.theme.colors.getColor(`neutral-base`);
|
|
108
|
+
this.styles['--neutral-dark'] = window.CuraAPI.theme.colors.getColor(`neutral-dark`);
|
|
109
|
+
this.styles['--font-size'] = window.CuraAPI.theme.fonts.getSize();
|
|
110
|
+
this.styles['--font-family'] = window.CuraAPI.theme.fonts.getFamily();
|
|
111
|
+
this.styles['--font-weight-medium'] = this.weights.medium;
|
|
112
|
+
this.styles['--text-align'] = this.textAlign;
|
|
113
|
+
this.setColors();
|
|
114
|
+
}
|
|
115
|
+
getClasses() {
|
|
116
|
+
const classes = {};
|
|
117
|
+
classes[`${this.size.toLowerCase()}`] = true;
|
|
118
|
+
classes[`icon-${this.iconPosition.toLowerCase()}`] = true;
|
|
119
|
+
classes[`icon-only`] = this.iconOnly;
|
|
120
|
+
classes['inverted'] = this.fontColor === 'light';
|
|
121
|
+
classes['disabled'] = this.disabled;
|
|
122
|
+
classes['isLoading'] = this.isLoading;
|
|
123
|
+
return classes;
|
|
124
|
+
}
|
|
125
|
+
setColors() {
|
|
126
|
+
this.styles = Object.assign(Object.assign({}, this.styles), { '--color-lighter': window.CuraAPI.theme.colors.getColor(`${this.color}-lighter`), '--color-light': window.CuraAPI.theme.colors.getColor(`${this.color}-light`), '--color-base': window.CuraAPI.theme.colors.getColor(`${this.color}-base`), '--color-dark': window.CuraAPI.theme.colors.getColor(`${this.color}-dark`) });
|
|
127
|
+
}
|
|
128
|
+
getIcon() {
|
|
129
|
+
if (!this.iconName)
|
|
130
|
+
return '';
|
|
131
|
+
const iconSize = this.size === 'small' ? 16 : this.size === 'medium' ? 20 : 24;
|
|
132
|
+
const color = this.getSymbolColor();
|
|
133
|
+
return index.h("cura-icon", { name: this.iconName, iconset: this.iconset, size: iconSize, color: color });
|
|
134
|
+
}
|
|
135
|
+
getSymbolColor() {
|
|
136
|
+
return this.disabled
|
|
137
|
+
? 'neutral-dark'
|
|
138
|
+
: this.fontColor === 'light'
|
|
139
|
+
? 'neutral-white'
|
|
140
|
+
: `${this.color}-base`;
|
|
141
|
+
}
|
|
142
|
+
handleClick(e) {
|
|
143
|
+
if (this.disabled || this.isLoading)
|
|
144
|
+
e.preventDefault();
|
|
145
|
+
}
|
|
146
|
+
render() {
|
|
147
|
+
return (index.h(index.Host, null, this.href ? (index.h("a", { href: this.disabled ? '' : this.href, target: this.target, class: this.getClasses(), style: this.styles, onClick: (e) => this.handleClick(e) }, index.h("span", { class: "button-container" }, this.getIcon(), index.h("span", { class: { label: true, inverted: this.fontColor === 'light' } }, index.h("slot", null))), index.h("cura-loader-circle", { size: this.size, color: this.getSymbolColor() }))) : (index.h("button", { class: this.getClasses(), style: this.styles, disabled: this.disabled || null, onClick: (e) => this.handleClick(e) }, index.h("span", { class: "button-container" }, this.getIcon(), index.h("span", { class: { label: true, inverted: this.fontColor === 'light' } }, index.h("slot", null))), index.h("cura-loader-circle", { size: this.size, color: this.getSymbolColor() })))));
|
|
148
|
+
}
|
|
149
|
+
static get watchers() { return {
|
|
150
|
+
"color": ["handleChangeColor"]
|
|
151
|
+
}; }
|
|
152
|
+
};
|
|
153
|
+
CuraButtonOutline.style = curaButtonOutlineCss;
|
|
154
|
+
|
|
155
|
+
const curaButtonTransparentCss = ":host{--border-radius:4px;display:inline-block;vertical-align:middle}:host button,:host a{outline:none;-webkit-box-shadow:none;box-shadow:none;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;width:100%;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;text-decoration:none !important;font-size:var(--font-size);cursor:pointer;-webkit-transition:background-color 0.07s linear, border-color 0.07s linear, -webkit-box-shadow 0.07s linear;transition:background-color 0.07s linear, border-color 0.07s linear, -webkit-box-shadow 0.07s linear;transition:background-color 0.07s linear, box-shadow 0.07s linear, border-color 0.07s linear;transition:background-color 0.07s linear, box-shadow 0.07s linear, border-color 0.07s linear, -webkit-box-shadow 0.07s linear;border-radius:var(--border-radius);background-color:transparent;border-width:0px;border-color:transparent;padding:calc(var(--base-spacing) * 3.5px) calc(var(--base-spacing) * 4px);min-height:calc(var(--base-spacing) * 13px);min-width:calc(var(--base-spacing) * 13px)}:host button:not(.disabled):not(.isLoading):hover .label,:host a:not(.disabled):not(.isLoading):hover .label{color:var(--color-light)}:host button:not(.disabled):not(.isLoading):hover cura-icon,:host a:not(.disabled):not(.isLoading):hover cura-icon{--color:var(--color-light) !important}:host button:not(.disabled):not(.inverted):not(.isLoading):active .label,:host a:not(.disabled):not(.inverted):not(.isLoading):active .label{color:var(--color-dark)}:host button:not(.disabled):not(.inverted):not(.isLoading):active cura-icon,:host a:not(.disabled):not(.inverted):not(.isLoading):active cura-icon{--color:var(--color-dark) !important}:host button.medium,:host a.medium{padding:calc(var(--base-spacing) * 2.75px) calc(var(--base-spacing) * 4px);min-height:calc(var(--base-spacing) * 11px);min-width:calc(var(--base-spacing) * 11px)}:host button.small,:host a.small{padding:calc(var(--base-spacing) * 1.5px) calc(var(--base-spacing) * 3px);min-height:calc(var(--base-spacing) * 8px);min-width:calc(var(--base-spacing) * 8px)}:host button .button-container,:host a .button-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;opacity:1;-webkit-transition:opacity 0.2s linear;transition:opacity 0.2s linear}:host button.icon-right .button-container,:host a.icon-right .button-container{-ms-flex-direction:row-reverse;flex-direction:row-reverse}:host button .label,:host a .label{-ms-flex:1;flex:1;font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:1.43em;line-height:1.2em;text-align:var(--text-align, \"left\");color:var(--color-base)}:host button .label.inverted,:host a .label.inverted{color:var(--neutral-white)}:host button.medium .label,:host a.medium .label{font-size:1.14em}:host button.small .label,:host a.small .label{font-size:1em}:host button.icon-left cura-icon,:host a.icon-left cura-icon{margin-right:calc(var(--base-spacing) * 3px)}:host button.icon-right cura-icon,:host a.icon-right cura-icon{margin-left:calc(var(--base-spacing) * 3px)}:host button.medium.icon-left cura-icon,:host a.medium.icon-left cura-icon{margin-right:calc(var(--base-spacing) * 2.7px)}:host button.medium.icon-right cura-icon,:host a.medium.icon-right cura-icon{margin-left:calc(var(--base-spacing) * 2.7px)}:host button.small.icon-left cura-icon,:host a.small.icon-left cura-icon{margin-right:calc(var(--base-spacing) * 2.5px)}:host button.small.icon-right cura-icon,:host a.small.icon-right cura-icon{margin-left:calc(var(--base-spacing) * 2.5px)}:host button.disabled,:host a.disabled{cursor:not-allowed;border-color:var(--neutral-base)}:host button.disabled .label,:host button.disabled .label.inverted,:host a.disabled .label,:host a.disabled .label.inverted{color:var(--neutral-dark)}:host button.disabled.inverted,:host a.disabled.inverted{opacity:0.6}:host button.disabled.inverted .label,:host button.disabled.inverted .label.inverted,:host a.disabled.inverted .label,:host a.disabled.inverted .label.inverted{color:var(--neutral-white)}:host button.disabled.inverted cura-icon,:host a.disabled.inverted cura-icon{--color:var(--neutral-white) !important}:host button.disabled.inverted cura-loader-circle,:host a.disabled.inverted cura-loader-circle{--color:var(--neutral-white) !important}:host button.icon-only,:host a.icon-only{padding:calc(var(--base-spacing) * 3.5px)}:host button.icon-only .label,:host a.icon-only .label{display:none}:host button.icon-only cura-icon,:host a.icon-only cura-icon{margin-left:0 !important;margin-right:0 !important}:host button.icon-only.medium,:host a.icon-only.medium{padding:calc(var(--base-spacing) * 2.75px)}:host button.icon-only.small,:host a.icon-only.small{padding:calc(var(--base-spacing) * 1.5px)}:host button.inverted:not(.isLoading):not(.disabled):hover .label,:host a.inverted:not(.isLoading):not(.disabled):hover .label{color:var(--color-lighter)}:host button.inverted:not(.isLoading):not(.disabled):hover cura-icon,:host a.inverted:not(.isLoading):not(.disabled):hover cura-icon{--color:var(--color-lighter) !important}:host button.inverted:not(.isLoading):not(.disabled):active .label,:host a.inverted:not(.isLoading):not(.disabled):active .label{color:var(--color-light)}:host button.inverted:not(.isLoading):not(.disabled):active cura-icon,:host a.inverted:not(.isLoading):not(.disabled):active cura-icon{--color:var(--color-light) !important}:host button cura-loader-circle,:host a cura-loader-circle{position:absolute;display:none}:host button.isLoading,:host a.isLoading{cursor:wait}:host button.isLoading .button-container,:host a.isLoading .button-container{opacity:0.3}:host button.isLoading.icon-only .button-container,:host a.isLoading.icon-only .button-container{opacity:0}:host button.isLoading cura-loader-circle,:host a.isLoading cura-loader-circle{display:block}";
|
|
156
|
+
|
|
157
|
+
const CuraButtonTransparent = class {
|
|
158
|
+
constructor(hostRef) {
|
|
159
|
+
index.registerInstance(this, hostRef);
|
|
160
|
+
this.size = 'large';
|
|
161
|
+
this.disabled = false;
|
|
162
|
+
this.isLoading = false;
|
|
163
|
+
this.iconName = undefined;
|
|
164
|
+
this.iconset = 'default';
|
|
165
|
+
this.iconPosition = 'left';
|
|
166
|
+
this.iconOnly = undefined;
|
|
167
|
+
this.href = undefined;
|
|
168
|
+
this.target = "_self";
|
|
169
|
+
this.color = 'accent';
|
|
170
|
+
this.fontColor = 'dark';
|
|
171
|
+
this.textAlign = 'left';
|
|
172
|
+
this.styles = {};
|
|
173
|
+
}
|
|
174
|
+
handleChangeColor() {
|
|
175
|
+
this.setColors();
|
|
176
|
+
}
|
|
177
|
+
connectedCallback() {
|
|
178
|
+
this.weights = window.CuraAPI.theme.fonts.getWeights();
|
|
179
|
+
this.styles['--base-spacing'] = window.CuraAPI.theme.spacing.getSpacing();
|
|
180
|
+
this.styles['--neutral-white'] = window.CuraAPI.theme.colors.getColor(`neutral-white`);
|
|
181
|
+
this.styles['--neutral-base'] = window.CuraAPI.theme.colors.getColor(`neutral-base`);
|
|
182
|
+
this.styles['--neutral-dark'] = window.CuraAPI.theme.colors.getColor(`neutral-dark`);
|
|
183
|
+
this.styles['--font-size'] = window.CuraAPI.theme.fonts.getSize();
|
|
184
|
+
this.styles['--font-family'] = window.CuraAPI.theme.fonts.getFamily();
|
|
185
|
+
this.styles['--font-weight-medium'] = this.weights.medium;
|
|
186
|
+
this.styles['--text-align'] = this.textAlign;
|
|
187
|
+
this.setColors();
|
|
188
|
+
}
|
|
189
|
+
getClasses() {
|
|
190
|
+
const classes = {};
|
|
191
|
+
classes[`${this.size.toLowerCase()}`] = true;
|
|
192
|
+
classes[`icon-${this.iconPosition.toLowerCase()}`] = true;
|
|
193
|
+
classes[`icon-only`] = this.iconOnly;
|
|
194
|
+
classes['inverted'] = this.fontColor === 'light';
|
|
195
|
+
classes['disabled'] = this.disabled;
|
|
196
|
+
classes['isLoading'] = this.isLoading;
|
|
197
|
+
return classes;
|
|
198
|
+
}
|
|
199
|
+
setColors() {
|
|
200
|
+
this.styles = Object.assign(Object.assign({}, this.styles), { '--color-lighter': window.CuraAPI.theme.colors.getColor(`${this.color}-lighter`), '--color-light': window.CuraAPI.theme.colors.getColor(`${this.color}-light`), '--color-base': window.CuraAPI.theme.colors.getColor(`${this.color}-base`), '--color-dark': window.CuraAPI.theme.colors.getColor(`${this.color}-dark`) });
|
|
201
|
+
}
|
|
202
|
+
getIcon() {
|
|
203
|
+
if (!this.iconName)
|
|
204
|
+
return '';
|
|
205
|
+
const iconSize = this.size === 'small' ? 16 : this.size === 'medium' ? 20 : 24;
|
|
206
|
+
const color = this.getSymbolColor();
|
|
207
|
+
return index.h("cura-icon", { name: this.iconName, iconset: this.iconset, size: iconSize, color: color });
|
|
208
|
+
}
|
|
209
|
+
getSymbolColor() {
|
|
210
|
+
return this.disabled
|
|
211
|
+
? 'neutral-dark'
|
|
212
|
+
: this.fontColor === 'light'
|
|
213
|
+
? 'neutral-white'
|
|
214
|
+
: `${this.color}-base`;
|
|
215
|
+
}
|
|
216
|
+
handleClick(e) {
|
|
217
|
+
if (this.disabled || this.isLoading)
|
|
218
|
+
e.preventDefault();
|
|
219
|
+
}
|
|
220
|
+
render() {
|
|
221
|
+
return (index.h(index.Host, null, this.href ? (index.h("a", { href: this.disabled ? '' : this.href, target: this.target, class: this.getClasses(), style: this.styles, onClick: (e) => this.handleClick(e) }, index.h("span", { class: "button-container" }, this.getIcon(), index.h("span", { class: { label: true, inverted: this.fontColor === 'light' } }, index.h("slot", null))), index.h("cura-loader-circle", { size: this.size, color: this.getSymbolColor() }))) : (index.h("button", { class: this.getClasses(), style: this.styles, disabled: this.disabled || null, onClick: (e) => this.handleClick(e) }, index.h("span", { class: "button-container" }, this.getIcon(), index.h("span", { class: { label: true, inverted: this.fontColor === 'light' } }, index.h("slot", null))), index.h("cura-loader-circle", { size: this.size, color: this.getSymbolColor() })))));
|
|
222
|
+
}
|
|
223
|
+
static get watchers() { return {
|
|
224
|
+
"color": ["handleChangeColor"]
|
|
225
|
+
}; }
|
|
226
|
+
};
|
|
227
|
+
CuraButtonTransparent.style = curaButtonTransparentCss;
|
|
228
|
+
|
|
229
|
+
const curaDisplayCss = ":host{display:block;font-size:var(--font-size);text-transform:uppercase}:host h1,:host h2,:host h3,:host h4,:host h5,:host h6{font-family:var(--font-family);font-size:4.285em;font-weight:var(--font-weight-black);color:var(--color-body);line-height:120%;letter-spacing:-4%;-webkit-margin-before:var(--block-margin);margin-block-start:var(--block-margin);-webkit-margin-after:var(--block-margin);margin-block-end:var(--block-margin)}:host h1.large,:host h2.large,:host h3.large,:host h4.large,:host h5.large,:host h6.large{font-size:6.21em}:host h1.small,:host h2.small,:host h3.small,:host h4.small,:host h5.small,:host h6.small{font-size:3em;font-weight:var(--font-weight-bold)}@media (min-width: 768px) and (max-width: 1365px){:host h1,:host h2,:host h3,:host h4,:host h5,:host h6{font-size:4.92em}:host h1.large,:host h2.large,:host h3.large,:host h4.large,:host h5.large,:host h6.large{font-size:7.07em}:host h1.small,:host h2.small,:host h3.small,:host h4.small,:host h5.small,:host h6.small{font-size:3.428em}}@media (min-width: 1366px){:host h1,:host h2,:host h3,:host h4,:host h5,:host h6{font-size:6.14em;line-height:125%}:host h1.large,:host h2.large,:host h3.large,:host h4.large,:host h5.large,:host h6.large{font-size:8.857em;letter-spacing:-6%}:host h1.small,:host h2.small,:host h3.small,:host h4.small,:host h5.small,:host h6.small{font-size:4.285em;letter-spacing:-2%}}:host ::slotted(b),:host ::slotted(strong){font-weight:var(--font-weight-bold)}:host ::slotted(a){font-weight:var(--font-weight-bold);color:var(--color-link);text-decoration:none;text-underline-offset:10%;cursor:pointer}: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}";
|
|
230
|
+
|
|
231
|
+
const CuraDisplay = class {
|
|
232
|
+
constructor(hostRef) {
|
|
233
|
+
index.registerInstance(this, hostRef);
|
|
234
|
+
this.level = 1;
|
|
235
|
+
this.size = 'regular';
|
|
236
|
+
this.inverted = false;
|
|
237
|
+
this.spotColor = 'primary';
|
|
238
|
+
}
|
|
239
|
+
connectedCallback() {
|
|
240
|
+
this.weights = window.CuraAPI.theme.fonts.getWeights();
|
|
241
|
+
this.setFontProperties();
|
|
242
|
+
this.setColors();
|
|
243
|
+
}
|
|
244
|
+
getClasses() {
|
|
245
|
+
const classes = {};
|
|
246
|
+
classes[this.size.toLowerCase()] = true;
|
|
247
|
+
return classes;
|
|
248
|
+
}
|
|
249
|
+
setFontProperties() {
|
|
250
|
+
this.styles = {
|
|
251
|
+
'--font-family': window.CuraAPI.theme.fonts.getFamily('display'),
|
|
252
|
+
'--font-size': window.CuraAPI.theme.fonts.getSize(),
|
|
253
|
+
'--font-weight-bold': this.weights.bold,
|
|
254
|
+
'--font-weight-black': this.weights.black
|
|
255
|
+
};
|
|
256
|
+
this.setHostProperty('--font-size', window.CuraAPI.theme.fonts.getSize());
|
|
257
|
+
this.setHostProperty('--block-margin', '0.5em');
|
|
258
|
+
}
|
|
259
|
+
setColors() {
|
|
260
|
+
const fontColor = this.inverted
|
|
261
|
+
? window.CuraAPI.theme.colors.getColor('neutral-white')
|
|
262
|
+
: window.CuraAPI.theme.fonts.getColor();
|
|
263
|
+
this.styles['--color-body'] = fontColor || window.CuraAPI.theme.colors.getColor('neutral-darker');
|
|
264
|
+
this.styles['--color-link'] = this.inverted
|
|
265
|
+
? window.CuraAPI.theme.colors.getColor(`${this.spotColor}-lighter`)
|
|
266
|
+
: window.CuraAPI.theme.colors.getColor(`${this.spotColor}-dark`);
|
|
267
|
+
}
|
|
268
|
+
setHostProperty(prop, value) {
|
|
269
|
+
this.host.style.setProperty(prop, value);
|
|
270
|
+
}
|
|
271
|
+
getHeadingTag() {
|
|
272
|
+
const tags = {
|
|
273
|
+
'1': index.h("h1", { style: this.styles, class: this.getClasses() }, index.h("slot", null)),
|
|
274
|
+
'2': index.h("h2", { style: this.styles, class: this.getClasses() }, index.h("slot", null)),
|
|
275
|
+
'3': index.h("h3", { style: this.styles, class: this.getClasses() }, index.h("slot", null)),
|
|
276
|
+
'4': index.h("h4", { style: this.styles, class: this.getClasses() }, index.h("slot", null)),
|
|
277
|
+
'5': index.h("h5", { style: this.styles, class: this.getClasses() }, index.h("slot", null)),
|
|
278
|
+
'6': index.h("h6", { style: this.styles, class: this.getClasses() }, index.h("slot", null)),
|
|
279
|
+
'default': index.h("h1", { style: this.styles, class: this.getClasses() }, index.h("slot", null))
|
|
280
|
+
};
|
|
281
|
+
return tags[`${this.level}`] || tags['default'];
|
|
282
|
+
}
|
|
283
|
+
render() {
|
|
284
|
+
return (index.h(index.Host, null, this.getHeadingTag()));
|
|
285
|
+
}
|
|
286
|
+
get host() { return index.getElement(this); }
|
|
287
|
+
};
|
|
288
|
+
CuraDisplay.style = curaDisplayCss;
|
|
289
|
+
|
|
290
|
+
const curaHeadingCss = ":host{display:block;font-size:var(--font-size)}:host h1,:host h2,:host h3,:host h4,:host h5,:host h6{font-family:var(--font-family);font-size:1.71em;font-weight:var(--font-weight-regular);color:var(--color-body);line-height:130%;letter-spacing:0%;-webkit-margin-before:var(--block-margin);margin-block-start:var(--block-margin);-webkit-margin-after:var(--block-margin);margin-block-end:var(--block-margin)}:host h1.bold-weight,:host h2.bold-weight,:host h3.bold-weight,:host h4.bold-weight,:host h5.bold-weight,:host h6.bold-weight{font-weight:var(--font-weight-medium)}:host h1.large,:host h2.large,:host h3.large,:host h4.large,:host h5.large,:host h6.large{font-size:2.07em;letter-spacing:-2%}:host h1.small,:host h2.small,:host h3.small,:host h4.small,:host h5.small,:host h6.small{font-size:1.214em;line-height:150%;letter-spacing:0%}:host h1.small.bold-weight,:host h2.small.bold-weight,:host h3.small.bold-weight,:host h4.small.bold-weight,:host h5.small.bold-weight,:host h6.small.bold-weight{font-weight:var(--font-weight-bold)}@media (min-width: 768px) and (max-width: 1365px){:host h1,:host h2,:host h3,:host h4,:host h5,:host h6{font-size:2em}:host h1.large,:host h2.large,:host h3.large,:host h4.large,:host h5.large,:host h6.large{font-size:2.357em}:host h1.small,:host h2.small,:host h3.small,:host h4.small,:host h5.small,:host h6.small{font-size:1.357em}}@media (min-width: 1366px){:host h1,:host h2,:host h3,:host h4,:host h5,:host h6{font-size:2.5em;line-height:135%;letter-spacing:-2%}:host h1.large,:host h2.large,:host h3.large,:host h4.large,:host h5.large,:host h6.large{font-size:2.92em}:host h1.small,:host h2.small,:host h3.small,:host h4.small,:host h5.small,:host h6.small{font-size:1.71em;line-height:160%;letter-spacing:0%}}:host ::slotted(b),:host ::slotted(strong){font-weight:var(--font-weight-bold)}:host ::slotted(a){font-weight:var(--font-weight-bold);color:var(--color-link);text-decoration:none;text-underline-offset:10%;cursor:pointer}: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}";
|
|
291
|
+
|
|
292
|
+
const CuraHeading = class {
|
|
293
|
+
constructor(hostRef) {
|
|
294
|
+
index.registerInstance(this, hostRef);
|
|
295
|
+
this.level = 1;
|
|
296
|
+
this.size = 'regular';
|
|
297
|
+
this.weight = 'regular';
|
|
298
|
+
this.inverted = false;
|
|
299
|
+
this.spotColor = 'primary';
|
|
300
|
+
}
|
|
301
|
+
connectedCallback() {
|
|
302
|
+
this.weights = window.CuraAPI.theme.fonts.getWeights();
|
|
303
|
+
this.setFontProperties();
|
|
304
|
+
this.setColors();
|
|
305
|
+
}
|
|
306
|
+
getClasses() {
|
|
307
|
+
const classes = {};
|
|
308
|
+
classes[this.size.toLowerCase()] = true;
|
|
309
|
+
classes[`${this.weight.toLowerCase()}-weight`] = true;
|
|
310
|
+
return classes;
|
|
311
|
+
}
|
|
312
|
+
setFontProperties() {
|
|
313
|
+
this.styles = {
|
|
314
|
+
'--font-family': window.CuraAPI.theme.fonts.getFamily('heading'),
|
|
315
|
+
'--font-size': window.CuraAPI.theme.fonts.getSize(),
|
|
316
|
+
'--font-weight-regular': this.weights.regular,
|
|
317
|
+
'--font-weight-medium': this.weights.medium,
|
|
318
|
+
'--font-weight-bold': this.weights.bold,
|
|
319
|
+
'--font-weight-black': this.weights.black
|
|
320
|
+
};
|
|
321
|
+
this.setHostProperty('--font-size', window.CuraAPI.theme.fonts.getSize());
|
|
322
|
+
this.setHostProperty('--block-margin', '0.5em');
|
|
323
|
+
}
|
|
324
|
+
setColors() {
|
|
325
|
+
const fontColor = this.inverted
|
|
326
|
+
? window.CuraAPI.theme.colors.getColor('neutral-white')
|
|
327
|
+
: window.CuraAPI.theme.fonts.getColor();
|
|
328
|
+
this.styles['--color-body'] = fontColor || window.CuraAPI.theme.colors.getColor('neutral-darker');
|
|
329
|
+
this.styles['--color-link'] = this.inverted
|
|
330
|
+
? window.CuraAPI.theme.colors.getColor(`${this.spotColor}-lighter`)
|
|
331
|
+
: window.CuraAPI.theme.colors.getColor(`${this.spotColor}-dark`);
|
|
332
|
+
}
|
|
333
|
+
setHostProperty(prop, value) {
|
|
334
|
+
this.host.style.setProperty(prop, value);
|
|
335
|
+
}
|
|
336
|
+
getHeadingTag() {
|
|
337
|
+
const tags = {
|
|
338
|
+
'1': index.h("h1", { style: this.styles, class: this.getClasses() }, index.h("slot", null)),
|
|
339
|
+
'2': index.h("h2", { style: this.styles, class: this.getClasses() }, index.h("slot", null)),
|
|
340
|
+
'3': index.h("h3", { style: this.styles, class: this.getClasses() }, index.h("slot", null)),
|
|
341
|
+
'4': index.h("h4", { style: this.styles, class: this.getClasses() }, index.h("slot", null)),
|
|
342
|
+
'5': index.h("h5", { style: this.styles, class: this.getClasses() }, index.h("slot", null)),
|
|
343
|
+
'6': index.h("h6", { style: this.styles, class: this.getClasses() }, index.h("slot", null)),
|
|
344
|
+
'default': index.h("h1", { style: this.styles, class: this.getClasses() }, index.h("slot", null))
|
|
345
|
+
};
|
|
346
|
+
return tags[`${this.level}`] || tags['default'];
|
|
347
|
+
}
|
|
348
|
+
render() {
|
|
349
|
+
return (index.h(index.Host, null, this.getHeadingTag()));
|
|
350
|
+
}
|
|
351
|
+
get host() { return index.getElement(this); }
|
|
352
|
+
};
|
|
353
|
+
CuraHeading.style = curaHeadingCss;
|
|
354
|
+
|
|
355
|
+
const curaIconCss = ":host{width:var(--size);height:var(--size)}:host svg{display:inline-block;stroke:var(--color);width:var(--size);height:var(--size);stroke-width:var(--stroke);fill:none}";
|
|
356
|
+
|
|
357
|
+
const CuraIcon = class {
|
|
358
|
+
constructor(hostRef) {
|
|
359
|
+
index.registerInstance(this, hostRef);
|
|
360
|
+
this.sizes = {
|
|
361
|
+
"128": { size: 128, stroke: 5.25 },
|
|
362
|
+
"72": { size: 72, stroke: 3.5 },
|
|
363
|
+
"64": { size: 64, stroke: 3.25 },
|
|
364
|
+
"48": { size: 48, stroke: 2.75 },
|
|
365
|
+
"40": { size: 40, stroke: 2.5 },
|
|
366
|
+
"32": { size: 32, stroke: 2.25 },
|
|
367
|
+
"24": { size: 24, stroke: 2 },
|
|
368
|
+
"20": { size: 20, stroke: 1.75 },
|
|
369
|
+
"16": { size: 16, stroke: 1.5 },
|
|
370
|
+
"default": { size: 24, stroke: 2 }
|
|
371
|
+
};
|
|
372
|
+
this.name = '';
|
|
373
|
+
this.color = 'neutral-base';
|
|
374
|
+
this.size = undefined;
|
|
375
|
+
this.iconset = 'default';
|
|
376
|
+
this.disabled = false;
|
|
377
|
+
}
|
|
378
|
+
sizeHandler(size) {
|
|
379
|
+
const scaledStroke = (iconSize) => {
|
|
380
|
+
return `${this.sizes[iconSize].stroke * (this.sizes.default.size / this.sizes[iconSize].size)}px`;
|
|
381
|
+
};
|
|
382
|
+
this.setHostProperty('--size', this.sizes[`${size}`] ? `${this.sizes[size].size}px` : `${this.sizes.default.size}px`);
|
|
383
|
+
this.setHostProperty('--stroke', this.sizes[`${size}`] ? scaledStroke(size) : scaledStroke("default"));
|
|
384
|
+
}
|
|
385
|
+
colorHandler() {
|
|
386
|
+
this.setHostProperty('--color', window.CuraAPI.theme.colors.getColor(this.disabled ? 'neutral-light' : this.color));
|
|
387
|
+
}
|
|
388
|
+
connectedCallback() {
|
|
389
|
+
this.assetsPath = window.CuraAPI.localAssetsPath;
|
|
390
|
+
this.sizeHandler(this.size);
|
|
391
|
+
this.colorHandler();
|
|
392
|
+
}
|
|
393
|
+
setHostProperty(prop, value) {
|
|
394
|
+
this.host.style.setProperty(prop, value);
|
|
395
|
+
}
|
|
396
|
+
render() {
|
|
397
|
+
return (index.h(index.Host, null, index.h("svg", { version: "1.1", viewBox: "0 0 24 24", preserveAspectRatio: "xMidYMid meet", xmlns: "http://www.w3.org/2000/svg" }, index.h("use", { xlinkHref: `${this.assetsPath}/icons/iconset-${this.iconset}.svg#${this.name}` }))));
|
|
398
|
+
}
|
|
399
|
+
get host() { return index.getElement(this); }
|
|
400
|
+
static get watchers() { return {
|
|
401
|
+
"size": ["sizeHandler"],
|
|
402
|
+
"color": ["colorHandler"],
|
|
403
|
+
"disabled": ["colorHandler"]
|
|
404
|
+
}; }
|
|
405
|
+
};
|
|
406
|
+
CuraIcon.style = curaIconCss;
|
|
407
|
+
|
|
408
|
+
const curaLoaderCircleCss = ":host{display:inline-block;width:var(--size);height:var(--size)}:host svg{width:var(--size);height:var(--size);-webkit-animation:rotate 0.7s linear infinite;animation:rotate 0.7s linear infinite}:host circle,:host path{stroke-miterlimit:10;stroke-linecap:round;stroke-linejoin:round}:host path{stroke:var(--color)}:host stop{stop-color:var(--color)}:host linearGradient stop:first-child{stop-opacity:0.14}@-webkit-keyframes rotate{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotate{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}";
|
|
409
|
+
|
|
410
|
+
const CuraLoaderCircle = class {
|
|
411
|
+
constructor(hostRef) {
|
|
412
|
+
index.registerInstance(this, hostRef);
|
|
413
|
+
this.sizes = {
|
|
414
|
+
xlarge: 32,
|
|
415
|
+
large: 24,
|
|
416
|
+
medium: 20,
|
|
417
|
+
small: 16,
|
|
418
|
+
default: 16,
|
|
419
|
+
};
|
|
420
|
+
this.getPxSize = () => this.sizes[this.size] || this.sizes['default'];
|
|
421
|
+
this.size = 'medium';
|
|
422
|
+
this.color = 'neutral-white';
|
|
423
|
+
}
|
|
424
|
+
getStyles() {
|
|
425
|
+
return {
|
|
426
|
+
'--size': `${this.getPxSize()}px`,
|
|
427
|
+
'--color': window.CuraAPI.theme.colors.getColor(this.color)
|
|
428
|
+
};
|
|
429
|
+
}
|
|
430
|
+
render() {
|
|
431
|
+
return (index.h(index.Host, { style: this.getStyles() }, index.h("svg", { viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, index.h("g", null, index.h("circle", { cx: "8", cy: "8", r: "7", stroke: "url(#paint0_linear_13485_11488)", "stroke-width": "2" }), index.h("path", { d: "M1 8C1 4.13401 4.11877 1 7.96596 1C9.53445 1 10.9819 1.52093 12.1462 2.4C12.8959 2.96601 13.5282 3.68049 14 4.5", "stroke-width": "2" })), index.h("defs", null, index.h("linearGradient", { id: "paint0_linear_13485_11488", x1: "15.7", y1: "4.5", x2: "4.15", y2: "11.5", gradientUnits: "userSpaceOnUse" }, index.h("stop", null), index.h("stop", { offset: "1" }))))));
|
|
432
|
+
}
|
|
433
|
+
};
|
|
434
|
+
CuraLoaderCircle.style = curaLoaderCircleCss;
|
|
435
|
+
|
|
436
|
+
const curaPageTemplateCss = ":host{display:block}:host .grid-template{display:grid;grid-template-rows:auto;grid-template-columns:auto;grid-template-areas:\"sub-header\" \"header\" \"pre-content\" \"content-container\" \"post-body\" \"footer\" \"sub-footer\"}:host .grid-template #sub-header{grid-area:sub-header}:host .grid-template #header{grid-area:header}:host .grid-template #pre-content{grid-area:pre-content}:host .grid-template #content-container{grid-area:content-container}:host .grid-template #post-body{grid-area:post-body}:host .grid-template #footer{grid-area:footer}:host .grid-template #sub-footer{grid-area:sub-footer}@media (max-width: 360px){:host .grid-template{padding:0px}}@media (min-width: 768px) and (max-width: 1365px){:host .grid-template{padding:0px}}@media (min-width: 1366px) and (max-width: 1919px){:host .grid-template{padding:0px}:host .grid-template #content-container #sidebar-left ::slotted(div[slot=sidebar-left]){margin-right:calc(var(--spacing) * 5px)}:host .grid-template #content-container #sidebar-right ::slotted(div[slot=sidebar-right]){margin-left:calc(var(--spacing) * 5px)}:host .grid-template #content-container{display:-ms-flexbox;display:flex}:host .grid-template #content-container #content{-ms-flex-positive:1;flex-grow:1}:host .grid-template #content-container #sidebar-left,:host .grid-template #content-container #sidebar-right{max-width:20%}}@media (min-width: 1920px){:host .grid-template{padding:0px}:host .grid-template #content-container #sidebar-left ::slotted(div[slot=sidebar-left]){margin-right:calc(var(--spacing) * 7px)}:host .grid-template #content-container #sidebar-right ::slotted(div[slot=sidebar-right]){margin-left:calc(var(--spacing) * 7px)}:host .grid-template #content-container{display:-ms-flexbox;display:flex}:host .grid-template #content-container #content{-ms-flex-positive:1;flex-grow:1}:host .grid-template #content-container #sidebar-left,:host .grid-template #content-container #sidebar-right{max-width:20%}:host .grid-template #content-container.centered{max-width:1920px;justify-self:center}}";
|
|
437
|
+
|
|
438
|
+
const CuraPageTemplate = class {
|
|
439
|
+
constructor(hostRef) {
|
|
440
|
+
index.registerInstance(this, hostRef);
|
|
441
|
+
this.contentwidth = 'default';
|
|
442
|
+
}
|
|
443
|
+
connectedCallback() {
|
|
444
|
+
this.styles = {
|
|
445
|
+
'--spacing': window.CuraAPI.theme.spacing.getSpacing(),
|
|
446
|
+
};
|
|
447
|
+
}
|
|
448
|
+
getClasses() {
|
|
449
|
+
const classes = {};
|
|
450
|
+
classes[this.contentwidth.toLowerCase()] = true;
|
|
451
|
+
return classes;
|
|
452
|
+
}
|
|
453
|
+
render() {
|
|
454
|
+
return (index.h(index.Host, null, index.h("div", { style: this.styles, class: "grid-template" }, index.h("div", { id: "sub-header" }, index.h("slot", { name: 'sub-header' })), index.h("div", { id: "header" }, index.h("slot", { name: 'header' })), index.h("div", { id: "pre-content" }, index.h("slot", { name: 'pre-content' })), index.h("div", { id: "content-container", class: this.getClasses() }, index.h("div", { id: "sidebar-left" }, index.h("slot", { name: 'sidebar-left' })), index.h("div", { id: "content" }, index.h("slot", { name: "content" }), index.h("slot", null)), index.h("div", { id: "sidebar-right" }, index.h("slot", { name: 'sidebar-right' }))), index.h("div", { id: "post-body" }, index.h("slot", { name: 'post-body' })), index.h("div", { id: "footer" }, index.h("slot", { name: 'footer' })), index.h("div", { id: "sub-footer" }, index.h("slot", { name: 'sub-footer' })))));
|
|
455
|
+
}
|
|
456
|
+
get host() { return index.getElement(this); }
|
|
457
|
+
};
|
|
458
|
+
CuraPageTemplate.style = curaPageTemplateCss;
|
|
459
|
+
|
|
460
|
+
const curaParagraphCss = ":host{display:block;font-size:var(--font-size)}:host p{font-family:var(--font-family);font-size:var(--font-size);font-weight:var(--font-weight-regular);color:var(--color-body);line-height:140%;letter-spacing:2%;-webkit-margin-before:var(--block-margin);margin-block-start:var(--block-margin);-webkit-margin-after:var(--block-margin);margin-block-end:var(--block-margin)}:host p.large{font-size:1.21em;line-height:150%;letter-spacing:0%}:host p.small{font-size:0.85em;line-height:135%;letter-spacing:4%}:host p.caption{font-size:0.71em;line-height:135%;letter-spacing:6%}@media (min-width: 768px) and (max-width: 1365px){:host p{font-size:1.14em;line-height:145%}:host p.large{font-size:1.35em;line-height:150%}:host p.small{font-size:1em;line-height:135%}:host p.caption{font-size:0.85em;line-height:135%;letter-spacing:6%}}@media (min-width: 1366px){:host p{font-size:1.42em;line-height:150%;letter-spacing:0%}:host p.large{font-size:1.71em;line-height:160%}:host p.small{font-size:1.21em;line-height:145%;letter-spacing:0%}:host p.caption{font-size:1em;line-height:145%;letter-spacing:2%}}:host ::slotted(b),:host ::slotted(strong){font-weight:var(--font-weight-bold)}:host ::slotted(a){font-weight:var(--font-weight-medium);color:var(--color-link);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}";
|
|
461
|
+
|
|
462
|
+
const CuraParagraph = class {
|
|
463
|
+
constructor(hostRef) {
|
|
464
|
+
index.registerInstance(this, hostRef);
|
|
465
|
+
this.size = 'regular';
|
|
466
|
+
this.inverted = false;
|
|
467
|
+
this.spotColor = 'primary';
|
|
468
|
+
}
|
|
469
|
+
connectedCallback() {
|
|
470
|
+
this.weights = window.CuraAPI.theme.fonts.getWeights();
|
|
471
|
+
this.setFontProperties();
|
|
472
|
+
this.setColors();
|
|
473
|
+
}
|
|
474
|
+
setsizeClass() {
|
|
475
|
+
const sizeclass = {};
|
|
476
|
+
sizeclass[this.size.toLowerCase()] = true;
|
|
477
|
+
return sizeclass;
|
|
478
|
+
}
|
|
479
|
+
setFontProperties() {
|
|
480
|
+
this.styles = {
|
|
481
|
+
'--font-family': window.CuraAPI.theme.fonts.getFamily('body'),
|
|
482
|
+
'--font-size': window.CuraAPI.theme.fonts.getSize(),
|
|
483
|
+
'--font-weight-regular': this.weights.regular,
|
|
484
|
+
'--font-weight-medium': this.weights.medium,
|
|
485
|
+
'--font-weight-bold': this.weights.bold
|
|
486
|
+
};
|
|
487
|
+
this.setHostProperty('--font-size', window.CuraAPI.theme.fonts.getSize());
|
|
488
|
+
this.setHostProperty('--block-margin', '1.25em');
|
|
489
|
+
}
|
|
490
|
+
setColors() {
|
|
491
|
+
const fontColor = this.inverted
|
|
492
|
+
? window.CuraAPI.theme.colors.getColor('neutral-white')
|
|
493
|
+
: window.CuraAPI.theme.fonts.getColor();
|
|
494
|
+
this.styles['--color-body'] = fontColor || window.CuraAPI.theme.colors.getColor('neutral-darker');
|
|
495
|
+
this.styles['--color-link'] = this.inverted
|
|
496
|
+
? window.CuraAPI.theme.colors.getColor(`${this.spotColor}-lighter`)
|
|
497
|
+
: window.CuraAPI.theme.colors.getColor(`${this.spotColor}-dark`);
|
|
498
|
+
}
|
|
499
|
+
setHostProperty(prop, value) {
|
|
500
|
+
this.host.style.setProperty(prop, value);
|
|
501
|
+
}
|
|
502
|
+
render() {
|
|
503
|
+
return (index.h(index.Host, null, index.h("p", { style: this.styles, class: this.setsizeClass() }, index.h("slot", null))));
|
|
504
|
+
}
|
|
505
|
+
get host() { return index.getElement(this); }
|
|
506
|
+
};
|
|
507
|
+
CuraParagraph.style = curaParagraphCss;
|
|
508
|
+
|
|
509
|
+
exports.cura_button = CuraButton;
|
|
510
|
+
exports.cura_button_outline = CuraButtonOutline;
|
|
511
|
+
exports.cura_button_transparent = CuraButtonTransparent;
|
|
512
|
+
exports.cura_display = CuraDisplay;
|
|
513
|
+
exports.cura_heading = CuraHeading;
|
|
514
|
+
exports.cura_icon = CuraIcon;
|
|
515
|
+
exports.cura_loader_circle = CuraLoaderCircle;
|
|
516
|
+
exports.cura_page_template = CuraPageTemplate;
|
|
517
|
+
exports.cura_paragraph = CuraParagraph;
|
|
518
|
+
|
|
519
|
+
//# sourceMappingURL=cura-button_9.cjs.entry.js.map
|