kritzel-stencil 0.3.34 → 0.3.35
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/index-Xav9JFHg.js +2 -2
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/{kritzel-active-users_45.cjs.entry.js → kritzel-active-users_46.cjs.entry.js} +107 -74
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{schema.constants-D7Z8ELAd.js → schema.constants-Di56GD6q.js} +14 -3
- package/dist/cjs/stencil.cjs.js +1 -1
- package/dist/collection/classes/objects/shape.class.js +14 -3
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/core/kritzel-editor/kritzel-editor.css +5 -0
- package/dist/collection/components/core/kritzel-editor/kritzel-editor.js +26 -18
- package/dist/collection/components/core/kritzel-engine/kritzel-engine.css +0 -41
- package/dist/collection/components/core/kritzel-engine/kritzel-engine.js +20 -2
- package/dist/collection/components/core/kritzel-watermark/kritzel-watermark.js +1 -1
- package/dist/collection/components/shared/kritzel-avatar/kritzel-avatar.js +3 -3
- package/dist/collection/components/shared/kritzel-button/kritzel-button.css +1 -0
- package/dist/collection/components/shared/kritzel-button/kritzel-button.js +2 -2
- package/dist/collection/components/shared/kritzel-color/kritzel-color.js +2 -2
- package/dist/collection/components/shared/kritzel-color-palette/kritzel-color-palette.js +1 -1
- package/dist/collection/components/shared/kritzel-font/kritzel-font.js +1 -1
- package/dist/collection/components/shared/kritzel-font-size/kritzel-font-size.js +1 -1
- package/dist/collection/components/shared/kritzel-input/kritzel-input.js +1 -1
- package/dist/collection/components/shared/kritzel-master-detail/kritzel-master-detail.js +3 -3
- package/dist/collection/components/shared/kritzel-menu/kritzel-menu.js +1 -1
- package/dist/collection/components/shared/kritzel-menu-item/kritzel-menu-item.js +2 -2
- package/dist/collection/components/shared/kritzel-numeric-input/kritzel-numeric-input.js +1 -1
- package/dist/collection/components/shared/kritzel-opacity-slider/kritzel-opacity-slider.js +1 -1
- package/dist/collection/components/shared/kritzel-portal/kritzel-portal.js +1 -1
- package/dist/collection/components/shared/kritzel-slide-toggle/kritzel-slide-toggle.js +1 -1
- package/dist/collection/components/shared/kritzel-split-button/kritzel-split-button.js +1 -1
- package/dist/collection/components/shared/kritzel-stroke-size/kritzel-stroke-size.js +1 -1
- package/dist/collection/components/shared/kritzel-tooltip/kritzel-tooltip.js +2 -2
- package/dist/collection/components/ui/kritzel-back-to-content/kritzel-back-to-content.js +1 -1
- package/dist/collection/components/ui/kritzel-controls/kritzel-controls.js +6 -6
- package/dist/collection/components/ui/kritzel-current-user/kritzel-current-user.js +1 -8
- package/dist/collection/components/ui/kritzel-current-user-dialog/kritzel-current-user-dialog.css +10 -0
- package/dist/collection/components/ui/kritzel-current-user-dialog/kritzel-current-user-dialog.js +25 -1
- package/dist/collection/components/ui/kritzel-export/kritzel-export.js +1 -1
- package/dist/collection/components/ui/kritzel-loading-overlay/kritzel-loading-overlay.css +50 -0
- package/dist/collection/components/ui/kritzel-loading-overlay/kritzel-loading-overlay.js +70 -0
- package/dist/collection/components/ui/kritzel-login-dialog/kritzel-login-dialog.js +1 -1
- package/dist/collection/components/ui/kritzel-more-menu/kritzel-more-menu.js +1 -1
- package/dist/collection/components/ui/kritzel-settings/kritzel-settings.js +1 -1
- package/dist/collection/components/ui/kritzel-share-dialog/kritzel-share-dialog.js +2 -2
- package/dist/collection/components/ui/kritzel-utility-panel/kritzel-utility-panel.js +1 -1
- package/dist/collection/components/ui/kritzel-zoom-panel/kritzel-zoom-panel.js +1 -1
- package/dist/collection/constants/version.js +1 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +1 -1
- package/dist/components/kritzel-active-users.js +1 -1
- package/dist/components/kritzel-avatar.js +1 -1
- package/dist/components/kritzel-back-to-content.js +1 -1
- package/dist/components/kritzel-button.js +1 -1
- package/dist/components/kritzel-color-palette.js +1 -1
- package/dist/components/kritzel-color.js +1 -1
- package/dist/components/kritzel-controls.js +1 -1
- package/dist/components/kritzel-current-user-dialog.js +1 -1
- package/dist/components/kritzel-current-user.js +1 -1
- package/dist/components/kritzel-editor.js +1 -1
- package/dist/components/kritzel-engine.js +1 -1
- package/dist/components/kritzel-export.js +1 -1
- package/dist/components/kritzel-font-size.js +1 -1
- package/dist/components/kritzel-font.js +1 -1
- package/dist/components/kritzel-input.js +1 -1
- package/dist/components/kritzel-loading-overlay.d.ts +11 -0
- package/dist/components/kritzel-loading-overlay.js +1 -0
- package/dist/components/kritzel-login-dialog.js +1 -1
- package/dist/components/kritzel-master-detail.js +1 -1
- package/dist/components/kritzel-menu-item.js +1 -1
- package/dist/components/kritzel-menu.js +1 -1
- package/dist/components/kritzel-more-menu.js +1 -1
- package/dist/components/kritzel-numeric-input.js +1 -1
- package/dist/components/kritzel-opacity-slider.js +1 -1
- package/dist/components/kritzel-portal.js +1 -1
- package/dist/components/kritzel-settings.js +1 -1
- package/dist/components/kritzel-share-dialog.js +1 -1
- package/dist/components/kritzel-slide-toggle.js +1 -1
- package/dist/components/kritzel-split-button.js +1 -1
- package/dist/components/kritzel-stroke-size.js +1 -1
- package/dist/components/kritzel-tool-config.js +1 -1
- package/dist/components/kritzel-tooltip.js +1 -1
- package/dist/components/kritzel-utility-panel.js +1 -1
- package/dist/components/kritzel-watermark.js +1 -1
- package/dist/components/kritzel-workspace-manager.js +1 -1
- package/dist/components/kritzel-zoom-panel.js +1 -1
- package/dist/components/{p-wl9BhN6s.js → p-1nG2hxfJ.js} +1 -1
- package/dist/components/{p-Cb5YwXbC.js → p-8xkoVMfO.js} +1 -1
- package/dist/components/{p-BeHVCJ7n.js → p-BH4AasB1.js} +1 -1
- package/dist/components/{p-BVu03tNB.js → p-BJlf4iHH.js} +1 -1
- package/dist/components/{p-BntMEYss.js → p-BKOsmXB5.js} +1 -1
- package/dist/components/{p-DSd5xTAH.js → p-BLOPBDUF.js} +1 -1
- package/dist/components/p-B_6RNask.js +1 -0
- package/dist/components/{p-8p1DKytO.js → p-Bd_yPNfg.js} +1 -1
- package/dist/components/{p-BUc0GFPj.js → p-BlozPPKi.js} +1 -1
- package/dist/components/{p-7ZnANv7C.js → p-Bm_BWQa4.js} +1 -1
- package/dist/components/{p-BixEMVtW.js → p-BulDbBWB.js} +1 -1
- package/dist/components/{p-D0RYktBV.js → p-BzJEwFtn.js} +1 -1
- package/dist/components/{p-CdkNxxut.js → p-BzrxIesp.js} +1 -1
- package/dist/components/{p-CfS-5J9k.js → p-CMphprF1.js} +1 -1
- package/dist/components/{p-D0v9WP5w.js → p-CVhcOiEA.js} +1 -1
- package/dist/components/{p-CC0J_kEP.js → p-CwuGA058.js} +1 -1
- package/dist/components/p-D52oKO_e.js +1 -0
- package/dist/components/{p-M9m9-OEY.js → p-D8TOEhPY.js} +1 -1
- package/dist/components/p-D9BugXUi.js +9 -0
- package/dist/components/{p-DJVRW9So.js → p-DEqpY4K2.js} +1 -1
- package/dist/components/{p-BrAeYciD.js → p-DIMNEOTW.js} +1 -1
- package/dist/components/{p-DeqALrzV.js → p-DMAScsJF.js} +1 -1
- package/dist/components/{p-DYLBjStF.js → p-DPpPd5GI.js} +1 -1
- package/dist/components/{p-Bg0xIZiR.js → p-DSOc0eIT.js} +1 -1
- package/dist/components/{p-W1ZwImdd.js → p-DXcjIb_a.js} +1 -1
- package/dist/components/{p-DPlEzPKO.js → p-DZcwchEg.js} +1 -1
- package/dist/components/{p-BX-nQAyH.js → p-DgnK50xO.js} +1 -1
- package/dist/components/p-Di5dpXrF.js +1 -0
- package/dist/components/{p-CZQz_mul.js → p-Ds-P2bYH.js} +1 -1
- package/dist/components/{p-meY80XnF.js → p-jzuGPW5o.js} +1 -1
- package/dist/components/p-oGAPPwAL.js +1 -0
- package/dist/components/{p-DZ8yfhhf.js → p-sLHApVnR.js} +1 -1
- package/dist/components/{p-DEpnJBA3.js → p-yD_3Z3K1.js} +1 -1
- package/dist/components/{p-BcB97x3U.js → p-zd7zXld8.js} +1 -1
- package/dist/esm/index-Dhio9uis.js +2 -2
- package/dist/esm/index.js +2 -2
- package/dist/esm/{kritzel-active-users_45.entry.js → kritzel-active-users_46.entry.js} +107 -75
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{schema.constants-CDQonV1J.js → schema.constants-Cphx5M7a.js} +14 -3
- package/dist/esm/stencil.js +1 -1
- package/dist/stencil/index.esm.js +1 -1
- package/dist/stencil/{p-CDQonV1J.js → p-Cphx5M7a.js} +1 -1
- package/dist/stencil/p-ac77b486.entry.js +9 -0
- package/dist/stencil/stencil.esm.js +1 -1
- package/dist/types/components/core/kritzel-editor/kritzel-editor.d.ts +5 -0
- package/dist/types/components/core/kritzel-engine/kritzel-engine.d.ts +2 -0
- package/dist/types/components/ui/kritzel-current-user/kritzel-current-user.d.ts +0 -3
- package/dist/types/components/ui/kritzel-current-user-dialog/kritzel-current-user-dialog.d.ts +4 -0
- package/dist/types/components/ui/kritzel-loading-overlay/kritzel-loading-overlay.d.ts +11 -0
- package/dist/types/components.d.ts +61 -0
- package/dist/types/constants/version.d.ts +1 -1
- package/dist/types/interfaces/theme.interface.d.ts +7 -0
- package/package.json +1 -1
- package/dist/components/p-COdwK_mi.js +0 -1
- package/dist/components/p-XDNjFYRB.js +0 -1
- package/dist/components/p-X_pyPCe8.js +0 -1
- package/dist/components/p-vLVZEJXX.js +0 -9
- package/dist/stencil/p-3289cc4e.entry.js +0 -9
|
@@ -81,16 +81,16 @@ export class KritzelAvatar {
|
|
|
81
81
|
height: `${this.size}px`,
|
|
82
82
|
fontSize: `${Math.round(this.size * 0.4)}px`,
|
|
83
83
|
};
|
|
84
|
-
return (h(Host, { key: '
|
|
84
|
+
return (h(Host, { key: '116725d55e4443e80216b3b3251e957d2009b43e', style: containerStyles, class: {
|
|
85
85
|
'has-image': !!showImage,
|
|
86
86
|
'has-initials': !!showInitials,
|
|
87
87
|
'has-default': !!showDefaultIcon,
|
|
88
|
-
}, role: "img", "aria-label": this.getDisplayName() || 'User avatar' }, showImage && (h("img", { key: '
|
|
88
|
+
}, role: "img", "aria-label": this.getDisplayName() || 'User avatar' }, showImage && (h("img", { key: 'd70ad4eb484404b18c13e066e8c10b3c86918ee5', src: imageUrl, alt: "", class: "avatar-image", ref: (el) => {
|
|
89
89
|
if (el) {
|
|
90
90
|
el.referrerPolicy = 'no-referrer';
|
|
91
91
|
el.crossOrigin = 'anonymous';
|
|
92
92
|
}
|
|
93
|
-
}, onError: this.handleImageError })), showInitials && (h("span", { key: '
|
|
93
|
+
}, onError: this.handleImageError })), showInitials && (h("span", { key: '21a9022cffdb69e0c3626e513cb3c036a9d3a16d', class: "avatar-initials", style: { backgroundColor: this.getBackgroundColor() } }, initials)), showDefaultIcon && (h("span", { key: '43e676af007bf254b1921f3efcbc7fff4e204359', class: "avatar-default" }, h("svg", { key: 'a7378795539a902e28ca644a80f1ca00cc9f818a', viewBox: "0 0 24 24", fill: "currentColor" }, h("path", { key: '31548a495a86f033325c98cfcc0ae398b6bb8281', d: "M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z" }))))));
|
|
94
94
|
}
|
|
95
95
|
static get is() { return "kritzel-avatar"; }
|
|
96
96
|
static get encapsulation() { return "shadow"; }
|
|
@@ -15,11 +15,11 @@ export class KritzelButton {
|
|
|
15
15
|
this.buttonClick.emit();
|
|
16
16
|
};
|
|
17
17
|
render() {
|
|
18
|
-
return (h(Host, { key: '
|
|
18
|
+
return (h(Host, { key: 'b9de2a1261ca0cb491f6980db6a596c48fa45b3a' }, h("button", { key: 'a9507ea0f6a1d9fcb19a7df16bea54cc0ead24f9', type: this.type, class: {
|
|
19
19
|
'kritzel-button': true,
|
|
20
20
|
[this.variant]: true,
|
|
21
21
|
'disabled': this.disabled,
|
|
22
|
-
}, disabled: this.disabled, onClick: this.handleClick }, h("slot", { key: '
|
|
22
|
+
}, disabled: this.disabled, onClick: this.handleClick }, h("slot", { key: '8449a26d4f9fe0226c6150a6639c522486b59780' }))));
|
|
23
23
|
}
|
|
24
24
|
static get is() { return "kritzel-button"; }
|
|
25
25
|
static get encapsulation() { return "shadow"; }
|
|
@@ -38,13 +38,13 @@ export class KritzelColorComponent {
|
|
|
38
38
|
render() {
|
|
39
39
|
const resolvedColor = this.resolveColor();
|
|
40
40
|
const isColorVeryLight = this.isLightColor(resolvedColor);
|
|
41
|
-
return (h(Host, { key: '
|
|
41
|
+
return (h(Host, { key: 'e39c77c55942b9c615e404efabf4939b2cf05a34' }, h("div", { key: 'ac343295592ea80ca7d3da61ca1244dd1aaa50db', class: "checkerboard-bg", style: {
|
|
42
42
|
width: `${this.size}px`,
|
|
43
43
|
height: `${this.size}px`,
|
|
44
44
|
borderRadius: '50%',
|
|
45
45
|
display: 'inline-block',
|
|
46
46
|
position: 'relative',
|
|
47
|
-
} }, h("div", { key: '
|
|
47
|
+
} }, h("div", { key: '4c87934b3febd4c41874cd290d86a9a9a557e3e5', class: {
|
|
48
48
|
'color-circle': true,
|
|
49
49
|
'white': isColorVeryLight,
|
|
50
50
|
}, style: {
|
|
@@ -33,7 +33,7 @@ export class KritzelColorPalette {
|
|
|
33
33
|
render() {
|
|
34
34
|
const displayedColors = this.isExpanded ? this.colors : this.colors.slice(0, 6);
|
|
35
35
|
const expandedHeight = this.isExpanded ? this.calculateHeight() : '32px';
|
|
36
|
-
return (h(Host, { key: '
|
|
36
|
+
return (h(Host, { key: '16aa405a43b3943473e577c5a6ab86adf4ae1ba9' }, h("div", { key: 'f65bb286889700dc1f0e8d84ff59721071b7b73a', class: {
|
|
37
37
|
'color-grid': true,
|
|
38
38
|
'expanded': this.isExpanded,
|
|
39
39
|
}, style: {
|
|
@@ -4,7 +4,7 @@ export class KritzelFont {
|
|
|
4
4
|
size = 24;
|
|
5
5
|
color = '#000000';
|
|
6
6
|
render() {
|
|
7
|
-
return (h(Host, { key: '
|
|
7
|
+
return (h(Host, { key: '054371cac30a2433611139a670406b0a1e3b99ff' }, h("div", { key: 'b4f2142b3cb31d067f39952a38b6f665f28f63bf', class: "font-preview", style: {
|
|
8
8
|
fontFamily: this.fontFamily,
|
|
9
9
|
fontSize: `${this.size}px`,
|
|
10
10
|
color: this.color
|
|
@@ -17,7 +17,7 @@ export class KritzelFontSize {
|
|
|
17
17
|
render() {
|
|
18
18
|
const color = 'var(--kritzel-global-text-primary)';
|
|
19
19
|
const sizes = this.sizes ?? [];
|
|
20
|
-
return (h(Host, { key: '
|
|
20
|
+
return (h(Host, { key: '56eb19367abe312bac3b626cfcae3b1ff6e90d21' }, sizes.map(size => (h("div", { tabIndex: 0, class: {
|
|
21
21
|
'size-container': true,
|
|
22
22
|
'selected': this.selectedSize === size,
|
|
23
23
|
}, onClick: () => this.handleSizeClick(size), onKeyDown: event => this.handleKeyDown(event, size) }, h("kritzel-font", { fontFamily: this.fontFamily, size: size, color: color }))))));
|
|
@@ -28,7 +28,7 @@ export class KritzelInput {
|
|
|
28
28
|
this.valueChange.emit(input.value);
|
|
29
29
|
};
|
|
30
30
|
render() {
|
|
31
|
-
return (h(Host, { key: '
|
|
31
|
+
return (h(Host, { key: '46a0a48902a06ad85edcbaad3679ce3fe9ba850c' }, h("div", { key: 'a6beaf920614aa959d2fbd68b7268afba8637358', class: "input-container" }, this.label && h("label", { key: 'ca6d3fb3c22f1540795dbb0695ddd9b87cc05eee', class: "input-label" }, this.label), h("div", { key: '78d116e82531a9cca996d594792245449bcaf9c8', class: { 'input-wrapper': true, 'has-suffix': !!this.suffix } }, h("input", { key: '0d10d6356dea3a11338172bbe8c3c878eefcc708', type: this.type, class: "text-input", value: this.inputValue, placeholder: this.placeholder, disabled: this.disabled, onInput: this.handleInput }), this.suffix && h("span", { key: '0e6166ba8728efc1035302d7fb048306efbe5a68', class: "input-suffix" }, this.suffix)))));
|
|
32
32
|
}
|
|
33
33
|
static get is() { return "kritzel-input"; }
|
|
34
34
|
static get encapsulation() { return "shadow"; }
|
|
@@ -90,15 +90,15 @@ export class KritzelMasterDetail {
|
|
|
90
90
|
const selectedItem = this.items.find(item => item.id === this.selectedItemId);
|
|
91
91
|
const panelId = 'master-detail-panel';
|
|
92
92
|
const selectedTabId = selectedItem ? `tab-${selectedItem.id}` : undefined;
|
|
93
|
-
return (h(Host, { key: '
|
|
93
|
+
return (h(Host, { key: '0edf50b0b853633b88bf481f97f22aceba9e163e' }, h("div", { key: '21a0a3f81e5a60889ccd152c905cb41f52c3e037', class: {
|
|
94
94
|
'master-detail-container': true,
|
|
95
95
|
'is-mobile-detail-visible': this.showMobileDetail,
|
|
96
|
-
} }, h("nav", { key: '
|
|
96
|
+
} }, h("nav", { key: '41f88248cc372c8cae4cb50a19edf462a01e43f2', class: "master-menu", role: "tablist", "aria-orientation": "vertical", "aria-label": "Settings categories" }, this.items.map((item, index) => (h("button", { key: item.id, id: `tab-${item.id}`, ref: el => this.setTabRef(el, index), class: {
|
|
97
97
|
'menu-item': true,
|
|
98
98
|
'is-selected': item.id === this.selectedItemId,
|
|
99
99
|
'is-disabled': !!item.disabled,
|
|
100
100
|
'is-focused': index === this.focusedIndex,
|
|
101
|
-
}, role: "tab", "aria-selected": item.id === this.selectedItemId ? 'true' : 'false', "aria-controls": panelId, "aria-disabled": item.disabled ? 'true' : undefined, tabIndex: this.getTabIndex(item, index), disabled: item.disabled, onClick: () => this.handleItemClick(item), onKeyDown: e => this.handleKeyDown(e, item, index), onFocus: () => this.handleFocus(index), onBlur: this.handleBlur }, item.icon && (h("kritzel-icon", { name: item.icon, size: 20, class: "menu-item-icon" })), h("span", { class: "menu-item-label" }, item.label), h("span", { class: "menu-item-chevron", "aria-hidden": "true" }, h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("path", { d: "m9 18 6-6-6-6" }))))))), h("div", { key: '
|
|
101
|
+
}, role: "tab", "aria-selected": item.id === this.selectedItemId ? 'true' : 'false', "aria-controls": panelId, "aria-disabled": item.disabled ? 'true' : undefined, tabIndex: this.getTabIndex(item, index), disabled: item.disabled, onClick: () => this.handleItemClick(item), onKeyDown: e => this.handleKeyDown(e, item, index), onFocus: () => this.handleFocus(index), onBlur: this.handleBlur }, item.icon && (h("kritzel-icon", { name: item.icon, size: 20, class: "menu-item-icon" })), h("span", { class: "menu-item-label" }, item.label), h("span", { class: "menu-item-chevron", "aria-hidden": "true" }, h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("path", { d: "m9 18 6-6-6-6" }))))))), h("div", { key: 'f8447facf3dfdbd7772823654847e1b90b03f73e', id: panelId, class: "detail-panel", role: "tabpanel", "aria-labelledby": selectedTabId }, h("button", { key: '3edc9784267613e6b3a706739bbb537161e4c747', class: "mobile-back-button", onClick: this.handleBackClick, "aria-label": "Back to menu" }, h("kritzel-icon", { key: 'ec0b4691735578525e5863842271366e04b13fb7', name: "chevron-left", size: 20, class: "mobile-back-icon" }), "Back"), h("slot", { key: 'c21fbaff78f98859b9756427125b60504d4bb630' })))));
|
|
102
102
|
}
|
|
103
103
|
static get is() { return "kritzel-master-detail"; }
|
|
104
104
|
static get encapsulation() { return "shadow"; }
|
|
@@ -51,7 +51,7 @@ export class KritzelMenu {
|
|
|
51
51
|
this.itemCloseChildMenu.emit(event.detail);
|
|
52
52
|
};
|
|
53
53
|
render() {
|
|
54
|
-
return (h(Host, { key: '
|
|
54
|
+
return (h(Host, { key: '27a90a3a8549517a2d6e341a5da13496bf714970', tabIndex: 0, onClick: e => e.stopPropagation() }, this.openChildMenuItem && h("div", { key: 'c0c2351fac389f6676b38481eaacee553ca6867a', class: "has-open-child-overlay", onClick: this.onOverlayClick }), this.items.map(item => (h("kritzel-menu-item", { key: item.id, "data-testid": `menu-item-${item.id}`, item: item, parent: this.parent, style: { pointerEvents: this.editingMenuItem && !item.isEditing ? 'none' : 'auto' }, onItemSelect: this.handleItemSelect, onItemSave: this.handleSave, onItemCancel: this.handleCancel, onItemToggleChildMenu: this.handleToggleChildMenu, onItemCloseChildMenu: this.handleCloseChildMenu })))));
|
|
55
55
|
}
|
|
56
56
|
static get is() { return "kritzel-menu"; }
|
|
57
57
|
static get encapsulation() { return "shadow"; }
|
|
@@ -90,12 +90,12 @@ export class KritzelMenuItem {
|
|
|
90
90
|
];
|
|
91
91
|
}
|
|
92
92
|
render() {
|
|
93
|
-
return (h(Host, { key: '
|
|
93
|
+
return (h(Host, { key: '9d6653a630da5a3da38291d89d6d7d59d6994e02', tabIndex: this.item.isDisabled ? -1 : 0, class: {
|
|
94
94
|
'selected': this.item.isSelected,
|
|
95
95
|
'editing': this.item.isEditing,
|
|
96
96
|
'disabled': this.item.isDisabled,
|
|
97
97
|
'child-open': this.item.isChildMenuOpen,
|
|
98
|
-
}, onClick: this.handleItemSelect }, h("div", { key: '
|
|
98
|
+
}, onClick: this.handleItemSelect }, h("div", { key: '48a1678296e672c6c03fb3e1473c42d3a246d481', class: "menu-item-overlay" }), this.item.isEditing ? this.renderEditMode() : this.renderViewMode()));
|
|
99
99
|
}
|
|
100
100
|
static get is() { return "kritzel-menu-item"; }
|
|
101
101
|
static get encapsulation() { return "shadow"; }
|
|
@@ -86,7 +86,7 @@ export class KritzelNumericInput {
|
|
|
86
86
|
this.valueChange.emit(newValue);
|
|
87
87
|
};
|
|
88
88
|
render() {
|
|
89
|
-
return (h(Host, { key: '
|
|
89
|
+
return (h(Host, { key: '8901e0b56ccbc344420483a4a56663f7cd74d9e8' }, h("div", { key: '5f3d6b5c56007e11383aa69f60f22031b0e8f332', class: "input-container" }, this.label && h("label", { key: '2cb102a5b6c16d068f4f304fbcc6241f79fc0ce8', class: "input-label" }, this.label), h("div", { key: '96441095acc3d9a8e77b6d2bac2ceda683c9c976', class: "input-wrapper" }, h("input", { key: '523a5485111077e20faded235df6362e5ea9cfd4', type: "number", class: "numeric-input", title: "", min: this.min === Number.MIN_SAFE_INTEGER ? undefined : this.min, max: this.max === Number.MAX_SAFE_INTEGER ? undefined : this.max, step: this.step, value: this.inputValue, placeholder: this.placeholder, onInput: this.handleInput, onBlur: this.handleBlur, onKeyDown: this.handleKeyDown, onInvalid: this.handleInvalid }), h("div", { key: '2071e98125a8d014513e93052bd8c1fee17932a5', class: "spinner-buttons" }, h("button", { key: '12422e5285dfb532dbbb6eb1a36dbcb3de50f2bc', type: "button", class: "spinner-button spinner-up", onClick: this.handleIncrement, tabIndex: -1, "aria-label": "Increase value" }, h("svg", { key: '49ad5625c80fae6706ba4ab91f47bd550481ef74', viewBox: "0 0 10 6", class: "spinner-icon" }, h("path", { key: 'ff7d19b61baeb5ba58bb60f2cc629bcec6eb4411', d: "M1 5L5 1L9 5", stroke: "currentColor", "stroke-width": "1.5", fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" }))), h("button", { key: 'e4fec28e4fc997e007127f2b30b00cc752433221', type: "button", class: "spinner-button spinner-down", onClick: this.handleDecrement, tabIndex: -1, "aria-label": "Decrease value" }, h("svg", { key: '27bf06cde8de11f4a97090911afd6b8993463112', viewBox: "0 0 10 6", class: "spinner-icon" }, h("path", { key: 'ed7071dd79bfe509ebb319ce43ecb3e982dd4157', d: "M1 1L5 5L9 1", stroke: "currentColor", "stroke-width": "1.5", fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" }))))))));
|
|
90
90
|
}
|
|
91
91
|
static get is() { return "kritzel-numeric-input"; }
|
|
92
92
|
static get encapsulation() { return "shadow"; }
|
|
@@ -22,7 +22,7 @@ export class KritzelOpacitySlider {
|
|
|
22
22
|
}
|
|
23
23
|
render() {
|
|
24
24
|
const percentage = this.getPercentage();
|
|
25
|
-
return (h(Host, { key: '
|
|
25
|
+
return (h(Host, { key: '2dadd8a7c4d1af748e91a6005433288ab231f2e8' }, h("div", { key: '65ae90d95bffff244d97329754cf0cb8f73331fa', class: "opacity-container" }, h("div", { key: '90e95347f7015882112f0653a25347e715233227', class: "slider-wrapper" }, h("input", { key: '15836bc089c1725062016677d3b95384d1958431', type: "range", class: "opacity-slider", min: this.min, max: this.max, step: this.step, value: this.value, onInput: (e) => this.handleInput(e), style: {
|
|
26
26
|
'--slider-progress': `${percentage}%`,
|
|
27
27
|
'--kritzel-opacity-slider-thumb-border-color': this.previewColor,
|
|
28
28
|
} })))));
|
|
@@ -277,7 +277,7 @@ export class KritzelPortal {
|
|
|
277
277
|
this.portal.style.visibility = 'visible';
|
|
278
278
|
}
|
|
279
279
|
render() {
|
|
280
|
-
return (h(Host, { key: '
|
|
280
|
+
return (h(Host, { key: '72273b4c7811473072ee27668836a5ddddcfd618', style: { display: this.anchor ? 'block' : 'none' } }, h("slot", { key: 'b4f37ca27c47ab950a4639162fa31a3c2362d6f7' })));
|
|
281
281
|
}
|
|
282
282
|
static get is() { return "kritzel-portal"; }
|
|
283
283
|
static get encapsulation() { return "shadow"; }
|
|
@@ -21,7 +21,7 @@ export class KritzelSlideToggle {
|
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
23
|
render() {
|
|
24
|
-
return (h(Host, { key: '
|
|
24
|
+
return (h(Host, { key: '00160c9cfdafa0d53f3acfb1fb235b29abf2622a', class: { checked: this.checked, disabled: this.disabled }, tabIndex: this.disabled ? -1 : 0, role: "switch", "aria-checked": this.checked ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false', "aria-label": this.label, onClick: this.handleToggle, onKeyDown: this.handleKeyDown }, h("div", { key: '385008948ffbdc0f26249d2d833aae8f04eeb6a0', class: "toggle-track" }, h("div", { key: '43929e94335589feb24ee45f1c34a270653dd412', class: "toggle-thumb" }))));
|
|
25
25
|
}
|
|
26
26
|
static get is() { return "kritzel-slide-toggle"; }
|
|
27
27
|
static get encapsulation() { return "shadow"; }
|
|
@@ -82,7 +82,7 @@ export class KritzelSplitButton {
|
|
|
82
82
|
this.menuScrollTop = event.target.scrollTop;
|
|
83
83
|
};
|
|
84
84
|
render() {
|
|
85
|
-
return (h(Host, { key: '
|
|
85
|
+
return (h(Host, { key: 'fa22dc1185ef07d8127d9ee9f6dbe482d126f934', class: { mobile: this.isTouchDevice } }, h("button", { key: 'a48aba702b70e9b24ad5486dde61fa9f9c8f7cdc', class: "split-main-button", tabIndex: 0, onClick: this.handleButtonClick, disabled: this.mainButtonDisabled, "aria-label": "Main action" }, this.buttonIcon && h("kritzel-icon", { key: '0d1c9a3e9f744541dd6ebe491105f6ee65233543', name: this.buttonIcon })), h("div", { key: 'c9db29f0b9c9cf1974d78f4f60be9e1b0e26c5d2', class: "split-divider" }), h("button", { key: '57addfd5228b7c7668be902c53683d12c976b89b', ref: el => (this.splitMenuButtonRef = el), class: "split-menu-button", tabIndex: 0, onClick: this.toggleMenu, disabled: this.menuButtonDisabled, "aria-label": "Open menu" }, h("kritzel-icon", { key: 'd860cc503043425860b1234b5d34693bfdd1d5ab', name: this.dropdownIcon })), h("kritzel-portal", { key: 'cd6dda8869aea4205d922fc639073019bbd2b102', anchor: this.anchorElement, offsetY: 4, onClose: this.closeMenu }, h("kritzel-menu", { key: '1ef1c2b319662e7a2af15b46362addcc75bceb68', ref: el => (this.menuRef = el), items: this.items, onItemSelect: this.handleItemSelect, onItemSave: this.handleItemSave, onItemCancel: this.handleItemCancel, onItemToggleChildMenu: this.handleItemToggleChildMenu, onItemCloseChildMenu: this.handleItemCloseChildMenu, onClose: this.closeMenu, onScroll: this.handleScroll }))));
|
|
86
86
|
}
|
|
87
87
|
static get is() { return "kritzel-split-button"; }
|
|
88
88
|
static get encapsulation() { return "shadow"; }
|
|
@@ -9,7 +9,7 @@ export class KritzelStrokeSize {
|
|
|
9
9
|
}
|
|
10
10
|
render() {
|
|
11
11
|
const sizes = this.sizes ?? [];
|
|
12
|
-
return (h(Host, { key: '
|
|
12
|
+
return (h(Host, { key: 'ba181d798d2bf7b60308746635d2077ce1353b83' }, h("div", { key: '048fc8934190359b9337747567844ca88925a6ce', class: "size-grid" }, sizes.map(size => (h("div", { tabIndex: 0, class: {
|
|
13
13
|
'size-container': true,
|
|
14
14
|
'selected': this.selectedSize === size,
|
|
15
15
|
}, onClick: () => this.handleSizeClick(size) }, h("kritzel-color", { value: 'var(--kritzel-global-text-primary)', size: size })))))));
|
|
@@ -128,14 +128,14 @@ export class KritzelTooltip {
|
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
130
|
render() {
|
|
131
|
-
return (h(Host, { key: '
|
|
131
|
+
return (h(Host, { key: '1e318ff48b72ae5e0853a92c61fd4174d6e45271', style: {
|
|
132
132
|
position: 'fixed',
|
|
133
133
|
zIndex: '9999',
|
|
134
134
|
transition: 'opacity 0.3s ease-in-out, transform 0.3s ease-in-out',
|
|
135
135
|
visibility: this.isVisible ? 'visible' : 'hidden',
|
|
136
136
|
left: `${this.positionX}px`,
|
|
137
137
|
bottom: `${this.positionY}px`,
|
|
138
|
-
} }, h("div", { key: '
|
|
138
|
+
} }, h("div", { key: 'c66c9978787c59de6ca29944f666354fed2ab4c3', class: "tooltip-content", onClick: event => event.stopPropagation(), onPointerDown: event => event.stopPropagation(), onMouseDown: event => event.stopPropagation() }, h("slot", { key: '664e78076bb988b0829b805aad4393c443db2dc7' }))));
|
|
139
139
|
}
|
|
140
140
|
static get is() { return "kritzel-tooltip"; }
|
|
141
141
|
static get encapsulation() { return "shadow"; }
|
|
@@ -16,7 +16,7 @@ export class KritzelBackToContent {
|
|
|
16
16
|
this.backToContent.emit();
|
|
17
17
|
};
|
|
18
18
|
render() {
|
|
19
|
-
return (h(Host, { key: '
|
|
19
|
+
return (h(Host, { key: 'ab9e9297f5f26bcf79ec32e51ee0ff2524ad421f' }, h("button", { key: 'c32536edc9943bc9ad66f4fa727338bb01e148a6', class: { 'back-to-content-button': true, visible: this.visible }, onClick: this.handleClick, "aria-label": this.text }, h("kritzel-icon", { key: 'bd3aa6ffe524ad9093d1e0693574dc2d63c311bd', name: "chevrons-left" }))));
|
|
20
20
|
}
|
|
21
21
|
static get is() { return "kritzel-back-to-content"; }
|
|
22
22
|
static get encapsulation() { return "shadow"; }
|
|
@@ -233,13 +233,13 @@ export class KritzelControls {
|
|
|
233
233
|
// Separate tool controls from config control
|
|
234
234
|
const toolControls = this.internalControls.filter(c => c.type === 'tool' || c.type === 'separator');
|
|
235
235
|
const configControl = this.internalControls.find(c => c.type === 'config' && c.name === this.firstConfig?.name);
|
|
236
|
-
return (h(Host, { key: '
|
|
236
|
+
return (h(Host, { key: 'f66fd3057bd88d31d7d585f2c286feb7e33c3611', style: { display: this.visible ? '' : 'none' }, class: {
|
|
237
237
|
mobile: this.isTouchDevice,
|
|
238
|
-
} }, this.isUtilityPanelVisible && (h("kritzel-utility-panel", { key: '
|
|
238
|
+
} }, this.isUtilityPanelVisible && (h("kritzel-utility-panel", { key: '4841cd070407422f0081dd528566d3943d2db7cd', style: {
|
|
239
239
|
position: 'absolute',
|
|
240
240
|
bottom: '56px',
|
|
241
241
|
left: '12px',
|
|
242
|
-
}, undoState: this.undoState, terms: this.terms, onUndo: () => this.kritzelEngine?.undo(), onRedo: () => this.kritzelEngine?.redo(), onDelete: () => this.kritzelEngine?.delete() })), h("div", { key: '
|
|
242
|
+
}, undoState: this.undoState, terms: this.terms, onUndo: () => this.kritzelEngine?.undo(), onRedo: () => this.kritzelEngine?.redo(), onDelete: () => this.kritzelEngine?.delete() })), h("div", { key: '54fb1da3f8b070c4c75e27930c95ca06f46f48f1', class: "kritzel-controls" }, h("div", { key: '9ce27b621a8fb668716f1eb15f3b01302e476d86', class: { 'scroll-indicator-left': true, 'visible': this.canScrollLeft } }), h("div", { key: 'eb9f499b5139c481b5748b09ecf21cd414918a11', class: "kritzel-tools-scroll", ref: el => (this.toolsScrollRef = el), onScroll: this.handleToolsScroll }, toolControls.map(control => {
|
|
243
243
|
// Check if this control has sub-options (split-button)
|
|
244
244
|
if (control.subOptions?.length) {
|
|
245
245
|
const selectedSubOption = this.getSelectedSubOption(control);
|
|
@@ -269,10 +269,10 @@ export class KritzelControls {
|
|
|
269
269
|
'kritzel-control': true,
|
|
270
270
|
'selected': this.activeControl?.name === control?.name,
|
|
271
271
|
}, key: control.name, "data-testid": `tool-${control.name}`, onClick: _event => this.handleControlClick?.(control), "aria-label": control.name.charAt(0).toUpperCase() + control.name.slice(1) }, h("kritzel-icon", { name: control.icon })));
|
|
272
|
-
})), h("div", { key: '
|
|
272
|
+
})), h("div", { key: 'c990abf4ff2970e6519c605135f3fbded691e91a', class: { 'scroll-indicator-right': true, 'visible': this.canScrollRight && !(configControl && this.activeControl && hasConfigUI) } }), configControl && this.activeControl && (h("div", { class: {
|
|
273
273
|
'kritzel-config-container': true,
|
|
274
274
|
'visible': hasConfigUI,
|
|
275
|
-
}, key: configControl.name }, h("div", { key: '
|
|
275
|
+
}, key: configControl.name }, h("div", { key: '1c163b818eed3a76bda9e802b083d2bfe8431c87', class: { 'config-gradient-left': true, 'visible': this.needsScrolling } }), h("kritzel-tooltip", { key: 'f7252d9aa17bdde580ca31cd558ba93d99822937', anchorElement: this.host.shadowRoot?.querySelector('.kritzel-config-container'), triggerElement: this.configTriggerRef }, h("kritzel-tool-config", { key: 'a15a873d8740d5c45a657bb4677a514fe9e183de', tool: this.activeControl.tool, theme: this.theme, engine: this.kritzelEngine, terms: this.terms, onToolChange: event => this.handleToolChange?.(event), onDisplayValuesChange: this.handleDisplayValuesChange, style: { width: '100%', height: '100%' } })), h("div", { key: 'ffbf1e35387ee732c6877f8425dbe07234d8233f', tabIndex: hasConfigUI ? 0 : -1, class: "kritzel-config", "data-testid": "tool-config", ref: el => {
|
|
276
276
|
if (el)
|
|
277
277
|
this.configTriggerRef = el;
|
|
278
278
|
}, onKeyDown: event => {
|
|
@@ -281,7 +281,7 @@ export class KritzelControls {
|
|
|
281
281
|
}
|
|
282
282
|
}, style: {
|
|
283
283
|
cursor: 'pointer',
|
|
284
|
-
} }, this.displayValues && (h("div", { key: '
|
|
284
|
+
} }, this.displayValues && (h("div", { key: 'eb272119da9354eb069231c3d29a196c5b0e4aa2', class: "color-container" }, h("kritzel-color", { key: '465b3af943d740b83bd260ee493840edd235a9af', value: this.displayValues.color, theme: this.theme, size: 18, style: {
|
|
285
285
|
borderRadius: '50%',
|
|
286
286
|
border: 'none',
|
|
287
287
|
} })))))))));
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Host, h } from "@stencil/core";
|
|
2
2
|
export class KritzelCurrentUser {
|
|
3
|
-
host;
|
|
4
3
|
/**
|
|
5
4
|
* The current user to display
|
|
6
5
|
*/
|
|
@@ -11,13 +10,8 @@ export class KritzelCurrentUser {
|
|
|
11
10
|
avatarSize = 40;
|
|
12
11
|
/** Resolved localized strings keyed by term key, supplied by the editor. */
|
|
13
12
|
terms = {};
|
|
14
|
-
dialogRef;
|
|
15
|
-
handleAvatarClick = (event) => {
|
|
16
|
-
event.stopPropagation();
|
|
17
|
-
this.dialogRef?.open();
|
|
18
|
-
};
|
|
19
13
|
render() {
|
|
20
|
-
return (h(Host, { key: '
|
|
14
|
+
return (h(Host, { key: 'e9746bbb98dbdae8f73ac7129bc1eb772746c576' }, h("kritzel-avatar", { key: '04f493ba649484cd95607c54b77e27134baa3122', user: this.user, size: this.avatarSize })));
|
|
21
15
|
}
|
|
22
16
|
static get is() { return "kritzel-current-user"; }
|
|
23
17
|
static get encapsulation() { return "shadow"; }
|
|
@@ -112,5 +106,4 @@ export class KritzelCurrentUser {
|
|
|
112
106
|
}
|
|
113
107
|
};
|
|
114
108
|
}
|
|
115
|
-
static get elementRef() { return "host"; }
|
|
116
109
|
}
|
package/dist/collection/components/ui/kritzel-current-user-dialog/kritzel-current-user-dialog.css
CHANGED
|
@@ -27,3 +27,13 @@ kritzel-dialog {
|
|
|
27
27
|
color: var(--kritzel-current-user-dialog-email-color, #666666);
|
|
28
28
|
text-align: center;
|
|
29
29
|
}
|
|
30
|
+
|
|
31
|
+
.logout-button {
|
|
32
|
+
margin-top: 16px;
|
|
33
|
+
width: 100%;
|
|
34
|
+
--kritzel-button-width: 100%;
|
|
35
|
+
--kritzel-button-primary-background-color: var(--kritzel-current-user-dialog-logout-button-background-color, #007AFF);
|
|
36
|
+
--kritzel-button-primary-hover-background-color: var(--kritzel-current-user-dialog-logout-button-hover-background-color, #006ae6);
|
|
37
|
+
--kritzel-button-primary-active-background-color: var(--kritzel-current-user-dialog-logout-button-active-background-color, #005bbf);
|
|
38
|
+
--kritzel-button-primary-color: var(--kritzel-current-user-dialog-logout-button-color, #ffffff);
|
|
39
|
+
}
|
package/dist/collection/components/ui/kritzel-current-user-dialog/kritzel-current-user-dialog.js
CHANGED
|
@@ -5,6 +5,8 @@ export class KritzelCurrentUserDialog {
|
|
|
5
5
|
/** Resolved localized strings keyed by term key, supplied by the editor. */
|
|
6
6
|
terms = {};
|
|
7
7
|
isDialogOpen = false;
|
|
8
|
+
/** Emitted when the user clicks the logout action. */
|
|
9
|
+
logoutRequest;
|
|
8
10
|
async open() {
|
|
9
11
|
this.isDialogOpen = true;
|
|
10
12
|
}
|
|
@@ -14,6 +16,10 @@ export class KritzelCurrentUserDialog {
|
|
|
14
16
|
closeDialog = () => {
|
|
15
17
|
this.isDialogOpen = false;
|
|
16
18
|
};
|
|
19
|
+
handleLogout = () => {
|
|
20
|
+
this.logoutRequest.emit();
|
|
21
|
+
this.closeDialog();
|
|
22
|
+
};
|
|
17
23
|
getDisplayName() {
|
|
18
24
|
if (!this.user)
|
|
19
25
|
return undefined;
|
|
@@ -23,7 +29,7 @@ export class KritzelCurrentUserDialog {
|
|
|
23
29
|
}
|
|
24
30
|
render() {
|
|
25
31
|
const displayName = this.getDisplayName();
|
|
26
|
-
return (h(Host, { key: '
|
|
32
|
+
return (h(Host, { key: '6eb573d072c5c0b47de4a88538a507adf49bd9b4' }, h("kritzel-dialog", { key: '9e85ed790f146ac408023759b1fe87e60bc80282', dialogTitle: this.terms['currentUser.dialogTitle'] ?? 'Account', isOpen: this.isDialogOpen, onDialogClose: this.closeDialog, size: "small", contained: true }, h("div", { key: '33a55e6023ad6f63514085d57b7278d4733bd411', class: "user-info" }, h("kritzel-avatar", { key: '4580f83fc6c5bcf8a1ffcd0d635da233817233d3', user: this.user, size: 80 }), displayName && h("div", { key: '5e2b98005e9b4ab7cc3db2dc81f4180e8ba3abea', class: "user-name" }, displayName), this.user?.email && h("div", { key: '1041266c4a4525d2f08c60d59bec5a518de2184b', class: "user-email" }, this.user.email), h("kritzel-button", { key: 'b695c05d24ab9d4d252a45ec496d75d79583ed4d', class: "logout-button", variant: "primary", onButtonClick: this.handleLogout }, this.terms['menu.logout'] ?? 'Logout')))));
|
|
27
33
|
}
|
|
28
34
|
static get is() { return "kritzel-current-user-dialog"; }
|
|
29
35
|
static get encapsulation() { return "shadow"; }
|
|
@@ -103,6 +109,24 @@ export class KritzelCurrentUserDialog {
|
|
|
103
109
|
"isDialogOpen": {}
|
|
104
110
|
};
|
|
105
111
|
}
|
|
112
|
+
static get events() {
|
|
113
|
+
return [{
|
|
114
|
+
"method": "logoutRequest",
|
|
115
|
+
"name": "logoutRequest",
|
|
116
|
+
"bubbles": true,
|
|
117
|
+
"cancelable": true,
|
|
118
|
+
"composed": true,
|
|
119
|
+
"docs": {
|
|
120
|
+
"tags": [],
|
|
121
|
+
"text": "Emitted when the user clicks the logout action."
|
|
122
|
+
},
|
|
123
|
+
"complexType": {
|
|
124
|
+
"original": "void",
|
|
125
|
+
"resolved": "void",
|
|
126
|
+
"references": {}
|
|
127
|
+
}
|
|
128
|
+
}];
|
|
129
|
+
}
|
|
106
130
|
static get methods() {
|
|
107
131
|
return {
|
|
108
132
|
"open": {
|
|
@@ -69,7 +69,7 @@ export class KritzelExport {
|
|
|
69
69
|
return (h("div", { class: "export-tab-content" }, h("kritzel-input", { label: this.terms['export.filename.label'] ?? 'Filename', value: this.exportFilename, placeholder: this.terms['export.filename.placeholder'] ?? 'Enter filename', suffix: ".json", onValueChange: this.handleFilenameChange })));
|
|
70
70
|
}
|
|
71
71
|
render() {
|
|
72
|
-
return (h(Host, { key: '
|
|
72
|
+
return (h(Host, { key: '5706e0f8688777826452ca0cf81e2581f6e2d14a' }, h("kritzel-dialog", { key: '8d0d26a672604aec2b899a7ea05ab40031ac9c43', isOpen: this.isDialogOpen, dialogTitle: this.terms['export.dialogTitle'] ?? 'Export', closable: true, contained: true, onDialogClose: this.closeDialog }, h("div", { key: 'a4c3f5a2961aca9dd5cba4045b8bd53635681ab0', class: "export-content" }, h("kritzel-pill-tabs", { key: '51a40a8596e492130cc8fa4c977cde916d7d8392', tabs: this.tabs, value: this.activeTab, onValueChange: this.handleTabChange }), this.activeTab === 'viewport' && this.renderViewportExport(), this.activeTab === 'workspace' && this.renderWorkspaceExport(), h("button", { key: 'a4b8e1503a0a8e682d10623bc334fcc70b5ea243', class: "export-primary-button", onClick: this.handleExport }, this.terms['export.exportButton'] ?? 'Export')))));
|
|
73
73
|
}
|
|
74
74
|
static get is() { return "kritzel-export"; }
|
|
75
75
|
static get encapsulation() { return "shadow"; }
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: contents;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.loading-overlay {
|
|
6
|
+
position: absolute;
|
|
7
|
+
inset: 0;
|
|
8
|
+
z-index: var(--kritzel-loading-overlay-z-index, 9999);
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
gap: 10px;
|
|
13
|
+
background-color: var(--kritzel-loading-overlay-background, rgba(255, 255, 255, 0.6));
|
|
14
|
+
color: var(--kritzel-loading-overlay-color, #333);
|
|
15
|
+
font-family: var(--kritzel-font-family, sans-serif);
|
|
16
|
+
font-size: 1.25rem;
|
|
17
|
+
opacity: 0;
|
|
18
|
+
pointer-events: none;
|
|
19
|
+
visibility: hidden;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.loading-overlay.visible {
|
|
23
|
+
pointer-events: all;
|
|
24
|
+
visibility: visible;
|
|
25
|
+
animation: kritzel-loading-fade-in 200ms ease-out var(--kritzel-loading-overlay-delay, 300ms) forwards;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.loading-spinner {
|
|
29
|
+
width: 20px;
|
|
30
|
+
height: 20px;
|
|
31
|
+
box-sizing: border-box;
|
|
32
|
+
display: block;
|
|
33
|
+
flex-shrink: 0;
|
|
34
|
+
border: 2px solid var(--kritzel-loading-overlay-spinner-color, #cccccc);
|
|
35
|
+
border-top-color: var(--kritzel-loading-overlay-spinner-active-color, #333333);
|
|
36
|
+
border-radius: 50%;
|
|
37
|
+
animation: kritzel-loading-spin 0.6s linear infinite;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
@keyframes kritzel-loading-spin {
|
|
41
|
+
to {
|
|
42
|
+
transform: rotate(360deg);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
@keyframes kritzel-loading-fade-in {
|
|
47
|
+
to {
|
|
48
|
+
opacity: 1;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
export class KritzelLoadingOverlay {
|
|
3
|
+
/**
|
|
4
|
+
* Whether the overlay is visible
|
|
5
|
+
*/
|
|
6
|
+
visible = false;
|
|
7
|
+
/**
|
|
8
|
+
* The text to display next to the spinner
|
|
9
|
+
*/
|
|
10
|
+
text = 'Loading...';
|
|
11
|
+
render() {
|
|
12
|
+
return (h(Host, { key: 'b8c4784803ca5a0e6bf3f25c1d39139307bb6d50' }, h("div", { key: '5a8a2c44f1800c0275d1a94aa0eb5c2854be63b5', class: { 'loading-overlay': true, visible: this.visible }, "aria-hidden": this.visible ? 'false' : 'true' }, h("span", { key: '04e33166e054d7a600a83dacd48e3fb50ab69d22', class: "loading-spinner" }), this.text)));
|
|
13
|
+
}
|
|
14
|
+
static get is() { return "kritzel-loading-overlay"; }
|
|
15
|
+
static get encapsulation() { return "shadow"; }
|
|
16
|
+
static get originalStyleUrls() {
|
|
17
|
+
return {
|
|
18
|
+
"$": ["kritzel-loading-overlay.css"]
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
static get styleUrls() {
|
|
22
|
+
return {
|
|
23
|
+
"$": ["kritzel-loading-overlay.css"]
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
static get properties() {
|
|
27
|
+
return {
|
|
28
|
+
"visible": {
|
|
29
|
+
"type": "boolean",
|
|
30
|
+
"mutable": false,
|
|
31
|
+
"complexType": {
|
|
32
|
+
"original": "boolean",
|
|
33
|
+
"resolved": "boolean",
|
|
34
|
+
"references": {}
|
|
35
|
+
},
|
|
36
|
+
"required": false,
|
|
37
|
+
"optional": false,
|
|
38
|
+
"docs": {
|
|
39
|
+
"tags": [],
|
|
40
|
+
"text": "Whether the overlay is visible"
|
|
41
|
+
},
|
|
42
|
+
"getter": false,
|
|
43
|
+
"setter": false,
|
|
44
|
+
"reflect": false,
|
|
45
|
+
"attribute": "visible",
|
|
46
|
+
"defaultValue": "false"
|
|
47
|
+
},
|
|
48
|
+
"text": {
|
|
49
|
+
"type": "string",
|
|
50
|
+
"mutable": false,
|
|
51
|
+
"complexType": {
|
|
52
|
+
"original": "string",
|
|
53
|
+
"resolved": "string",
|
|
54
|
+
"references": {}
|
|
55
|
+
},
|
|
56
|
+
"required": false,
|
|
57
|
+
"optional": false,
|
|
58
|
+
"docs": {
|
|
59
|
+
"tags": [],
|
|
60
|
+
"text": "The text to display next to the spinner"
|
|
61
|
+
},
|
|
62
|
+
"getter": false,
|
|
63
|
+
"setter": false,
|
|
64
|
+
"reflect": false,
|
|
65
|
+
"attribute": "text",
|
|
66
|
+
"defaultValue": "'Loading...'"
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
}
|
|
@@ -44,7 +44,7 @@ export class KritzelLoginDialog {
|
|
|
44
44
|
this.dialogClosed.emit();
|
|
45
45
|
};
|
|
46
46
|
render() {
|
|
47
|
-
return (h(Host, { key: '
|
|
47
|
+
return (h(Host, { key: '5cedcb4fa0a9026338e930cfbbdbfa1df9853530' }, h("kritzel-dialog", { key: '1502a2dc67630b0a1399ef6e8d1a2fdcd4d50913', dialogTitle: this.dialogTitle, isOpen: this.isDialogOpen, onDialogClose: this.closeDialog, size: "small", contained: true }, h("div", { key: 'f84a888ccc0b1cb2052e30af56a08910da8d85b5', class: "login-content" }, this.subtitle && (h("p", { key: '971040609c43efea30a7bfd0c1a3de2113f77a2b', class: "login-subtitle" }, this.subtitle)), h("div", { key: 'ecb0c648ce0d9a8ca8b10e6a520273d817c7a0fe', class: "login-providers" }, this.providers.map(provider => (h("button", { key: provider.name, class: {
|
|
48
48
|
'provider-button': true,
|
|
49
49
|
'is-loading': this.loadingProvider === provider.name,
|
|
50
50
|
'is-disabled': this.loadingProvider !== null && this.loadingProvider !== provider.name,
|
|
@@ -57,7 +57,7 @@ export class KritzelMoreMenu {
|
|
|
57
57
|
this.closeMenu();
|
|
58
58
|
};
|
|
59
59
|
render() {
|
|
60
|
-
return (h(Host, { key: '
|
|
60
|
+
return (h(Host, { key: 'b7736b67210f2d2f6b54296dd680104548d61641', class: { mobile: this.isTouchDevice }, style: { display: this.visible ? '' : 'none' } }, h("div", { key: '076ecc02a1469bd87cb27f63f1d41183bedb11d4', class: { 'more-menu-wrapper': true, visible: this.visible } }, h("button", { key: 'cefe02e440391eb079af7b8accc367a291e93d6a', class: "more-menu-button", "data-testid": "more-menu-button", onClick: this.toggleMenu, "aria-label": this.terms['moreMenu.ariaLabel'] ?? 'More options' }, h("kritzel-icon", { key: 'cb6f4dd0f37ac0fbf1e1c28a0dc06e097e38ee00', name: this.icon, size: this.iconSize })), h("kritzel-portal", { key: '29099deb5b56b1a1388caa81a3c7104a05ad66a7', anchor: this.menuAnchor, offsetY: this.offsetY, onClose: this.closeMenu }, h("kritzel-menu", { key: 'b77286ec05add0a20bbc46f99ac7210395d0d33d', items: this.visibleItems, onItemSelect: this.handleMenuItemSelect })))));
|
|
61
61
|
}
|
|
62
62
|
static get is() { return "kritzel-more-menu"; }
|
|
63
63
|
static get encapsulation() { return "shadow"; }
|
|
@@ -218,7 +218,7 @@ export class KritzelSettings {
|
|
|
218
218
|
}
|
|
219
219
|
}
|
|
220
220
|
render() {
|
|
221
|
-
return (h(Host, { key: '
|
|
221
|
+
return (h(Host, { key: '7e65885051a30635291bb98fb87addf0bdbca8e8' }, h("kritzel-dialog", { key: 'c795bad227882904d8dda96768e8ccdd7c48df71', isOpen: this.isDialogOpen, dialogTitle: this.t('settings.dialogTitle', 'Settings'), size: "large", contained: true, onDialogClose: this.closeDialog }, h("kritzel-master-detail", { key: 'eff1486d14d4b55441b9a52b293da7459771331d', items: this.categories, selectedItemId: this.selectedCategoryId, onItemSelect: this.handleCategorySelect }, this.renderCategoryContent()))));
|
|
222
222
|
}
|
|
223
223
|
static get is() { return "kritzel-settings"; }
|
|
224
224
|
static get encapsulation() { return "shadow"; }
|