kritzel-stencil 0.1.83 → 0.1.86
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/kritzel-active-users_42.cjs.entry.js +94 -94
- package/dist/cjs/kritzel-brush-style.cjs.entry.js +1 -1
- package/dist/cjs/{workspace.migrations-K5oVASsb.js → workspace.migrations-Dj-FiYEO.js} +6 -6
- package/dist/collection/components/core/kritzel-awareness-cursors/kritzel-awareness-cursors.css +115 -115
- package/dist/collection/components/core/kritzel-awareness-cursors/kritzel-awareness-cursors.js +1 -1
- package/dist/collection/components/core/kritzel-cursor-trail/kritzel-cursor-trail.css +10 -10
- package/dist/collection/components/core/kritzel-cursor-trail/kritzel-cursor-trail.js +1 -1
- package/dist/collection/components/core/kritzel-editor/kritzel-editor.css +71 -71
- package/dist/collection/components/core/kritzel-editor/kritzel-editor.js +12 -12
- package/dist/collection/components/core/kritzel-engine/kritzel-engine.css +99 -99
- package/dist/collection/components/core/kritzel-engine/kritzel-engine.js +14 -14
- package/dist/collection/components/shared/kritzel-avatar/kritzel-avatar.css +58 -58
- package/dist/collection/components/shared/kritzel-avatar/kritzel-avatar.js +3 -3
- package/dist/collection/components/shared/kritzel-brush-style/kritzel-brush-style.css +42 -42
- package/dist/collection/components/shared/kritzel-brush-style/kritzel-brush-style.js +3 -3
- package/dist/collection/components/shared/kritzel-button/kritzel-button.css +72 -72
- package/dist/collection/components/shared/kritzel-button/kritzel-button.js +2 -2
- package/dist/collection/components/shared/kritzel-color/kritzel-color.css +24 -24
- package/dist/collection/components/shared/kritzel-color/kritzel-color.js +2 -2
- package/dist/collection/components/shared/kritzel-color-palette/kritzel-color-palette.css +46 -46
- package/dist/collection/components/shared/kritzel-color-palette/kritzel-color-palette.js +1 -1
- package/dist/collection/components/shared/kritzel-dialog/kritzel-dialog.css +179 -179
- package/dist/collection/components/shared/kritzel-dropdown/kritzel-dropdown.css +190 -190
- package/dist/collection/components/shared/kritzel-dropdown/kritzel-dropdown.js +2 -2
- package/dist/collection/components/shared/kritzel-font/kritzel-font.css +10 -10
- package/dist/collection/components/shared/kritzel-font/kritzel-font.js +1 -1
- package/dist/collection/components/shared/kritzel-font-family/kritzel-font-family.css +48 -48
- package/dist/collection/components/shared/kritzel-font-family/kritzel-font-family.js +3 -3
- package/dist/collection/components/shared/kritzel-font-size/kritzel-font-size.css +30 -30
- package/dist/collection/components/shared/kritzel-font-size/kritzel-font-size.js +1 -1
- package/dist/collection/components/shared/kritzel-icon/kritzel-icon.css +18 -18
- package/dist/collection/components/shared/kritzel-input/kritzel-input.css +69 -69
- package/dist/collection/components/shared/kritzel-input/kritzel-input.js +1 -1
- package/dist/collection/components/shared/kritzel-line-endings/kritzel-line-endings.css +60 -60
- package/dist/collection/components/shared/kritzel-line-endings/kritzel-line-endings.js +3 -3
- package/dist/collection/components/shared/kritzel-master-detail/kritzel-master-detail.css +190 -190
- package/dist/collection/components/shared/kritzel-master-detail/kritzel-master-detail.js +3 -3
- package/dist/collection/components/shared/kritzel-menu/kritzel-menu.css +34 -34
- package/dist/collection/components/shared/kritzel-menu/kritzel-menu.js +1 -1
- package/dist/collection/components/shared/kritzel-menu-item/kritzel-menu-item.css +160 -160
- 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.css +102 -102
- 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.css +85 -85
- package/dist/collection/components/shared/kritzel-opacity-slider/kritzel-opacity-slider.js +1 -1
- package/dist/collection/components/shared/kritzel-pill-tabs/kritzel-pill-tabs.css +58 -58
- package/dist/collection/components/shared/kritzel-pill-tabs/kritzel-pill-tabs.js +2 -2
- package/dist/collection/components/shared/kritzel-portal/kritzel-portal.js +1 -1
- package/dist/collection/components/shared/kritzel-shape-fill/kritzel-shape-fill.css +47 -47
- package/dist/collection/components/shared/kritzel-shape-fill/kritzel-shape-fill.js +4 -4
- package/dist/collection/components/shared/kritzel-slide-toggle/kritzel-slide-toggle.css +48 -48
- 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.css +78 -78
- 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.css +37 -37
- package/dist/collection/components/shared/kritzel-stroke-size/kritzel-stroke-size.js +1 -1
- package/dist/collection/components/shared/kritzel-tooltip/kritzel-tooltip.css +18 -18
- package/dist/collection/components/shared/kritzel-tooltip/kritzel-tooltip.js +2 -2
- package/dist/collection/components/ui/kritzel-active-users/kritzel-active-users.css +65 -65
- package/dist/collection/components/ui/kritzel-back-to-content/kritzel-back-to-content.css +42 -42
- package/dist/collection/components/ui/kritzel-back-to-content/kritzel-back-to-content.js +1 -1
- package/dist/collection/components/ui/kritzel-context-menu/kritzel-context-menu.css +105 -105
- package/dist/collection/components/ui/kritzel-context-menu/kritzel-context-menu.js +1 -1
- package/dist/collection/components/ui/kritzel-controls/kritzel-controls.css +330 -330
- package/dist/collection/components/ui/kritzel-controls/kritzel-controls.js +5 -5
- package/dist/collection/components/ui/kritzel-current-user/kritzel-current-user.css +11 -11
- package/dist/collection/components/ui/kritzel-current-user/kritzel-current-user.js +1 -1
- package/dist/collection/components/ui/kritzel-current-user-dialog/kritzel-current-user-dialog.css +29 -29
- package/dist/collection/components/ui/kritzel-current-user-dialog/kritzel-current-user-dialog.js +1 -1
- package/dist/collection/components/ui/kritzel-export/kritzel-export.css +89 -89
- package/dist/collection/components/ui/kritzel-export/kritzel-export.js +1 -1
- package/dist/collection/components/ui/kritzel-login-dialog/kritzel-login-dialog.css +98 -98
- 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.css +45 -45
- package/dist/collection/components/ui/kritzel-more-menu/kritzel-more-menu.js +2 -2
- package/dist/collection/components/ui/kritzel-settings/kritzel-settings.css +129 -129
- package/dist/collection/components/ui/kritzel-settings/kritzel-settings.js +1 -1
- package/dist/collection/components/ui/kritzel-share-dialog/kritzel-share-dialog.css +133 -133
- package/dist/collection/components/ui/kritzel-share-dialog/kritzel-share-dialog.js +2 -2
- package/dist/collection/components/ui/kritzel-tool-config/kritzel-tool-config.css +38 -38
- package/dist/collection/components/ui/kritzel-utility-panel/kritzel-utility-panel.css +45 -45
- package/dist/collection/components/ui/kritzel-utility-panel/kritzel-utility-panel.js +1 -1
- package/dist/collection/components/ui/kritzel-workspace-manager/kritzel-workspace-manager.css +5 -5
- package/dist/collection/constants/version.js +1 -1
- package/dist/collection/helpers/cursor.helper.js +6 -6
- package/dist/collection/helpers/svg-export.helper.js +31 -31
- 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-awareness-cursors.js +1 -1
- package/dist/components/kritzel-back-to-content.js +1 -1
- package/dist/components/kritzel-brush-style.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-context-menu.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-cursor-trail.js +1 -1
- package/dist/components/kritzel-dialog.js +1 -1
- package/dist/components/kritzel-dropdown.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-family.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-line-endings.js +1 -1
- 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-pill-tabs.js +1 -1
- package/dist/components/kritzel-portal.js +1 -1
- package/dist/components/kritzel-settings.js +1 -1
- package/dist/components/kritzel-shape-fill.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-workspace-manager.js +1 -1
- package/dist/components/{p-B5WII1Lk.js → p-0cs6zQLB.js} +1 -1
- package/dist/components/p-7yTPTHbQ.js +1 -0
- package/dist/components/{p-DwemlMvt.js → p-B3UJucEe.js} +1 -1
- package/dist/components/{p-DUQmBcTy.js → p-B5a3arJg.js} +1 -1
- package/dist/components/{p-DCH4Rlqx.js → p-BIdZCZ_l.js} +1 -1
- package/dist/components/{p-CNMpVlot.js → p-BMPgR5Bt.js} +1 -1
- package/dist/components/{p-CKfjz1gj.js → p-BOcGfEkz.js} +1 -1
- package/dist/components/{p-DUnKjQN7.js → p-BVEYAGm1.js} +1 -1
- package/dist/components/{p-CMGHx71q.js → p-BYX50YSd.js} +1 -1
- package/dist/components/{p-BjPmEs5A.js → p-BfJav4Zz.js} +1 -1
- package/dist/components/{p-CLo-TjD_.js → p-BgopgrfE.js} +1 -1
- package/dist/components/{p-CJzg_ejc.js → p-BsQ4E7I8.js} +1 -1
- package/dist/components/{p-V3VW2JKl.js → p-C-ZoFpSf.js} +1 -1
- package/dist/components/p-C0U3Mg5I.js +1 -0
- package/dist/components/{p-Brwz_Dpb.js → p-C3Dwuqka.js} +1 -1
- package/dist/components/{p-CS7r-zhx.js → p-C4vg_-vg.js} +1 -1
- package/dist/components/{p-DrsORMoT.js → p-C4zfI-dj.js} +1 -1
- package/dist/components/{p-cjeDomsc.js → p-CBTqCoUx.js} +1 -1
- package/dist/components/{p-BaaFG0p-.js → p-CBq-KE9C.js} +1 -1
- package/dist/components/{p-CfEGaTaV.js → p-CTj2UdbS.js} +1 -1
- package/dist/components/{p-Bat829Bg.js → p-C_OSXZqJ.js} +1 -1
- package/dist/components/{p-B4F19Aqj.js → p-CaKSDRid.js} +1 -1
- package/dist/components/{p-BZ8bK8qT.js → p-CekG3_ce.js} +1 -1
- package/dist/components/{p-Dw0Obsn5.js → p-Cz2gQKbL.js} +1 -1
- package/dist/components/{p-VxgCvVox.js → p-CzIuqMQA.js} +1 -1
- package/dist/components/{p-1ppb4M65.js → p-D6KNaj_Y.js} +1 -1
- package/dist/components/{p-rNu5JVNH.js → p-D8fQwcNC.js} +1 -1
- package/dist/components/{p-CYl_JKvH.js → p-DBZRCL1u.js} +1 -1
- package/dist/components/{p-DkT0KZCm.js → p-DDBaFNFi.js} +1 -1
- package/dist/components/{p-CM7rYf9A.js → p-DEd2L0e3.js} +1 -1
- package/dist/components/{p-DYcsC2zO.js → p-DMvIGnOt.js} +1 -1
- package/dist/components/{p-C9zsWWH2.js → p-DPmAV68B.js} +1 -1
- package/dist/components/{p-7yR-sKH8.js → p-DRbR0Li3.js} +1 -1
- package/dist/components/{p-C-MtTi6x.js → p-DXO_ppUK.js} +1 -1
- package/dist/components/p-DemKKw9U.js +1 -0
- package/dist/components/{p-D5BXoK9m.js → p-Dxb22STM.js} +1 -1
- package/dist/components/p-Nq8UyPCc.js +1 -0
- package/dist/components/{p-DEOUiiyI.js → p-R9M5PnAz.js} +1 -1
- package/dist/components/{p-D7pwbRUy.js → p-qBqQhAmh.js} +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/kritzel-active-users_42.entry.js +94 -94
- package/dist/esm/kritzel-brush-style.entry.js +1 -1
- package/dist/esm/{workspace.migrations-D5iSPf3E.js → workspace.migrations-ByWmiPl8.js} +6 -6
- package/dist/stencil/index.esm.js +1 -1
- package/dist/stencil/{p-b0be4da1.entry.js → p-10c2b77c.entry.js} +1 -1
- package/dist/stencil/p-b38650d2.entry.js +9 -0
- package/dist/stencil/stencil.esm.js +1 -1
- package/dist/types/constants/version.d.ts +1 -1
- package/package.json +2 -2
- package/readme.md +114 -114
- package/dist/components/p-B4h_tGG1.js +0 -1
- package/dist/components/p-CJKsuQun.js +0 -1
- package/dist/components/p-DKeBfe_l.js +0 -1
- package/dist/components/p-HK-6khHo.js +0 -1
- package/dist/stencil/p-c28b30ab.entry.js +0 -9
- /package/dist/stencil/{p-D5iSPf3E.js → p-ByWmiPl8.js} +0 -0
|
@@ -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: '7f1fd360f657fddcdb6ce2eea17e4e2daf426eb2' }, h("div", { key: '02f7f6dd141d057dbf395dd836f7841a649fa16d', class: {
|
|
94
94
|
'master-detail-container': true,
|
|
95
95
|
'is-mobile-detail-visible': this.showMobileDetail,
|
|
96
|
-
} }, h("nav", { key: '
|
|
96
|
+
} }, h("nav", { key: '397758627252c5e9573a61c457d4481df6d9b4f2', 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: '65cc4601a39cb7780c52cc86075efd0b4a24646a', id: panelId, class: "detail-panel", role: "tabpanel", "aria-labelledby": selectedTabId }, h("button", { key: '6b6ae9ac689c757d71e2a42ecaf8aaceb3785154', class: "mobile-back-button", onClick: this.handleBackClick, "aria-label": "Back to menu" }, h("kritzel-icon", { key: '28d9b2f68030587d44505f691e8fed57d968e631', name: "chevron-left", size: 20, class: "mobile-back-icon" }), "Back"), h("slot", { key: '2a35ca82717713808ca12227ecca671b848d1f02' })))));
|
|
102
102
|
}
|
|
103
103
|
static get is() { return "kritzel-master-detail"; }
|
|
104
104
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
:host {
|
|
2
|
-
position: relative;
|
|
3
|
-
display: flex;
|
|
4
|
-
flex-direction: column;
|
|
5
|
-
background-color: var(--kritzel-menu-background-color, #ffffff);
|
|
6
|
-
width: var(--kritzel-menu-width, 200px);
|
|
7
|
-
padding: var(--kritzel-menu-padding, 8px);
|
|
8
|
-
border-radius: var(--kritzel-menu-border-radius, 12px);
|
|
9
|
-
box-shadow: var(--kritzel-menu-box-shadow, 0 0 3px rgba(0, 0, 0, 0.08));
|
|
10
|
-
border: var(--kritzel-menu-border, 1px solid #ebebeb);
|
|
11
|
-
z-index: 2;
|
|
12
|
-
gap: var(--kritzel-menu-gap, 4px);
|
|
13
|
-
overflow-y: auto;
|
|
14
|
-
scrollbar-color: var(--kritzel-global-scrollbar-thumb-color, #ebebeb) transparent;
|
|
15
|
-
scrollbar-width: thin;
|
|
16
|
-
max-height: var(--kritzel-portal-max-height, 300px);
|
|
17
|
-
box-sizing: border-box;
|
|
18
|
-
-webkit-tap-highlight-color: transparent;
|
|
19
|
-
outline: none;
|
|
20
|
-
clip-path: inset(0 round var(--kritzel-menu-border-radius, 12px));
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
:host:focus-visible {
|
|
24
|
-
outline: auto;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.has-open-child-overlay {
|
|
28
|
-
position: absolute;
|
|
29
|
-
top: 0;
|
|
30
|
-
left: 0;
|
|
31
|
-
right: 0;
|
|
32
|
-
bottom: 0;
|
|
33
|
-
z-index: 3;
|
|
34
|
-
}
|
|
1
|
+
:host {
|
|
2
|
+
position: relative;
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
background-color: var(--kritzel-menu-background-color, #ffffff);
|
|
6
|
+
width: var(--kritzel-menu-width, 200px);
|
|
7
|
+
padding: var(--kritzel-menu-padding, 8px);
|
|
8
|
+
border-radius: var(--kritzel-menu-border-radius, 12px);
|
|
9
|
+
box-shadow: var(--kritzel-menu-box-shadow, 0 0 3px rgba(0, 0, 0, 0.08));
|
|
10
|
+
border: var(--kritzel-menu-border, 1px solid #ebebeb);
|
|
11
|
+
z-index: 2;
|
|
12
|
+
gap: var(--kritzel-menu-gap, 4px);
|
|
13
|
+
overflow-y: auto;
|
|
14
|
+
scrollbar-color: var(--kritzel-global-scrollbar-thumb-color, #ebebeb) transparent;
|
|
15
|
+
scrollbar-width: thin;
|
|
16
|
+
max-height: var(--kritzel-portal-max-height, 300px);
|
|
17
|
+
box-sizing: border-box;
|
|
18
|
+
-webkit-tap-highlight-color: transparent;
|
|
19
|
+
outline: none;
|
|
20
|
+
clip-path: inset(0 round var(--kritzel-menu-border-radius, 12px));
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
:host:focus-visible {
|
|
24
|
+
outline: auto;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.has-open-child-overlay {
|
|
28
|
+
position: absolute;
|
|
29
|
+
top: 0;
|
|
30
|
+
left: 0;
|
|
31
|
+
right: 0;
|
|
32
|
+
bottom: 0;
|
|
33
|
+
z-index: 3;
|
|
34
|
+
}
|
|
@@ -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: 'a81ea8a1fe2dc6cb8d9f395cafbcadec3eb4aa45', tabIndex: 0, onClick: e => e.stopPropagation() }, this.openChildMenuItem && h("div", { key: 'bb27d7a923431d79567e79283e505ea4ae02ef36', class: "has-open-child-overlay", onClick: this.onOverlayClick }), this.items.map(item => (h("kritzel-menu-item", { key: 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"; }
|
|
@@ -1,161 +1,161 @@
|
|
|
1
|
-
:host {
|
|
2
|
-
position: relative;
|
|
3
|
-
display: flex;
|
|
4
|
-
align-items: center;
|
|
5
|
-
justify-content: space-between;
|
|
6
|
-
width: 100%;
|
|
7
|
-
padding: var(--kritzel-menu-item-padding, 8px);
|
|
8
|
-
box-sizing: border-box;
|
|
9
|
-
gap: 16px;
|
|
10
|
-
height: var(--kritzel-menu-item-height, 40px);
|
|
11
|
-
min-height: var(--kritzel-menu-item-min-height, 40px);
|
|
12
|
-
font-family: sans-serif;
|
|
13
|
-
font-size: var(--kritzel-menu-item-font-size, 14px);
|
|
14
|
-
color: var(--kritzel-menu-item-color, #333333);
|
|
15
|
-
border-radius: var(--kritzel-menu-item-border-radius, 12px);
|
|
16
|
-
-webkit-tap-highlight-color: transparent;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
:host:focus:not(:focus-visible) {
|
|
20
|
-
outline: none;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
:host(:hover) .menu-item-overlay,
|
|
24
|
-
:host(:focus-within) .menu-item-overlay {
|
|
25
|
-
background-color: var(--kritzel-menu-item-overlay-background-color, hsl(0, 0%, 0%, 4.3%));
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
:host(.selected) {
|
|
29
|
-
background-color: var(--kritzel-menu-item-selected-background-color, #007aff);
|
|
30
|
-
color: var(--kritzel-menu-item-selected-color, #ffffff);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
:host(.selected) .action-button {
|
|
34
|
-
color: var(--kritzel-menu-item-selected-color, #ffffff);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
:host(.selected.editing) {
|
|
38
|
-
background-color: var(--kritzel-menu-item-selected-background-color, #007aff);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
:host(.selected) .edit-input {
|
|
42
|
-
color: var(--kritzel-menu-item-selected-color, #ffffff);
|
|
43
|
-
caret-color: var(--kritzel-menu-item-input-caret-color-on-selected, #ffffff);
|
|
44
|
-
border-color: var(--kritzel-menu-item-input-border-color-on-selected, #ffffff);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
:host(.selected) .action-button kritzel-icon {
|
|
48
|
-
--kritzel-icon-color: var(--kritzel-menu-item-selected-color, #ffffff);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
kritzel-icon {
|
|
52
|
-
--kritzel-icon-color: var(--kritzel-menu-item-color, #333333);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
:host(.selected) kritzel-icon {
|
|
56
|
-
--kritzel-icon-color: var(--kritzel-menu-item-selected-color, #ffffff);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
:host(.selected) .edit-input::selection {
|
|
60
|
-
background-color: var(--kritzel-menu-item-input-selection-color-on-selected, rgba(255, 255, 255, 0.3));
|
|
61
|
-
color: var(--kritzel-menu-item-input-selection-text-color-on-selected, #ffffff);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
:host(.editing) {
|
|
65
|
-
background-color: var(--kritzel-menu-item-editing-background-color, hsl(0, 0%, 0%, 4.3%));
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
:host(.disabled) {
|
|
69
|
-
opacity: 0.5;
|
|
70
|
-
pointer-events: none !important;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
:host(.child-open) {
|
|
74
|
-
background-color: var(--kritzel-menu-item-child-open-background-color, hsl(0, 0%, 0%, 4.3%));
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
:host(.child-open.selected) {
|
|
78
|
-
background-color: var(--kritzel-menu-item-selected-background-color, #007aff);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.menu-item-overlay {
|
|
82
|
-
position: absolute;
|
|
83
|
-
inset: 0;
|
|
84
|
-
background-color: transparent;
|
|
85
|
-
z-index: 0;
|
|
86
|
-
pointer-events: none;
|
|
87
|
-
border-radius: var(--kritzel-menu-item-border-radius, 12px);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.menu-item-content {
|
|
91
|
-
display: flex;
|
|
92
|
-
align-items: center;
|
|
93
|
-
gap: 8px;
|
|
94
|
-
position: relative;
|
|
95
|
-
z-index: 1;
|
|
96
|
-
height: 100%;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.left {
|
|
100
|
-
justify-content: flex-start;
|
|
101
|
-
flex: 1;
|
|
102
|
-
min-width: 0;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.left>div {
|
|
106
|
-
white-space: nowrap;
|
|
107
|
-
overflow: hidden;
|
|
108
|
-
text-overflow: ellipsis;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
.right {
|
|
112
|
-
justify-content: flex-end;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
.edit-input {
|
|
116
|
-
flex: 1;
|
|
117
|
-
height: var(--kritzel-menu-item-input-height, 24px);
|
|
118
|
-
padding: 0;
|
|
119
|
-
background-color: transparent;
|
|
120
|
-
border-radius: 0;
|
|
121
|
-
border: none;
|
|
122
|
-
border-bottom: var(--kritzel-menu-item-input-border, 1px solid #ccc);
|
|
123
|
-
font-size: var(--kritzel-menu-item-font-size, 14px);
|
|
124
|
-
width: 100%;
|
|
125
|
-
min-width: 0;
|
|
126
|
-
box-sizing: border-box;
|
|
127
|
-
outline: none;
|
|
128
|
-
color: inherit;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
.edit-input {
|
|
132
|
-
caret-color: var(--kritzel-menu-item-input-caret-color, currentColor);
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
.edit-input::selection {
|
|
136
|
-
background-color: var(--kritzel-menu-item-input-selection-color, #007bff);
|
|
137
|
-
color: var(--kritzel-menu-item-input-selection-text-color, #ffffff);
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
.action-button {
|
|
141
|
-
padding: 4px;
|
|
142
|
-
border-radius: 8px;
|
|
143
|
-
border: none;
|
|
144
|
-
cursor: var(--kritzel-global-pointer-cursor, pointer);
|
|
145
|
-
display: flex;
|
|
146
|
-
align-items: center;
|
|
147
|
-
justify-content: center;
|
|
148
|
-
background-color: transparent;
|
|
149
|
-
background: transparent;
|
|
150
|
-
-webkit-tap-highlight-color: transparent;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
.action-button:hover,
|
|
154
|
-
.action-button:focus {
|
|
155
|
-
background-color: var(--kritzel-menu-item-button-hover-background-color, hsl(0, 0%, 0%, 4.3%));
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
.action-button.disabled {
|
|
159
|
-
pointer-events: none;
|
|
160
|
-
opacity: 0.5;
|
|
1
|
+
:host {
|
|
2
|
+
position: relative;
|
|
3
|
+
display: flex;
|
|
4
|
+
align-items: center;
|
|
5
|
+
justify-content: space-between;
|
|
6
|
+
width: 100%;
|
|
7
|
+
padding: var(--kritzel-menu-item-padding, 8px);
|
|
8
|
+
box-sizing: border-box;
|
|
9
|
+
gap: 16px;
|
|
10
|
+
height: var(--kritzel-menu-item-height, 40px);
|
|
11
|
+
min-height: var(--kritzel-menu-item-min-height, 40px);
|
|
12
|
+
font-family: sans-serif;
|
|
13
|
+
font-size: var(--kritzel-menu-item-font-size, 14px);
|
|
14
|
+
color: var(--kritzel-menu-item-color, #333333);
|
|
15
|
+
border-radius: var(--kritzel-menu-item-border-radius, 12px);
|
|
16
|
+
-webkit-tap-highlight-color: transparent;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
:host:focus:not(:focus-visible) {
|
|
20
|
+
outline: none;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
:host(:hover) .menu-item-overlay,
|
|
24
|
+
:host(:focus-within) .menu-item-overlay {
|
|
25
|
+
background-color: var(--kritzel-menu-item-overlay-background-color, hsl(0, 0%, 0%, 4.3%));
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
:host(.selected) {
|
|
29
|
+
background-color: var(--kritzel-menu-item-selected-background-color, #007aff);
|
|
30
|
+
color: var(--kritzel-menu-item-selected-color, #ffffff);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
:host(.selected) .action-button {
|
|
34
|
+
color: var(--kritzel-menu-item-selected-color, #ffffff);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
:host(.selected.editing) {
|
|
38
|
+
background-color: var(--kritzel-menu-item-selected-background-color, #007aff);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
:host(.selected) .edit-input {
|
|
42
|
+
color: var(--kritzel-menu-item-selected-color, #ffffff);
|
|
43
|
+
caret-color: var(--kritzel-menu-item-input-caret-color-on-selected, #ffffff);
|
|
44
|
+
border-color: var(--kritzel-menu-item-input-border-color-on-selected, #ffffff);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
:host(.selected) .action-button kritzel-icon {
|
|
48
|
+
--kritzel-icon-color: var(--kritzel-menu-item-selected-color, #ffffff);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
kritzel-icon {
|
|
52
|
+
--kritzel-icon-color: var(--kritzel-menu-item-color, #333333);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
:host(.selected) kritzel-icon {
|
|
56
|
+
--kritzel-icon-color: var(--kritzel-menu-item-selected-color, #ffffff);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
:host(.selected) .edit-input::selection {
|
|
60
|
+
background-color: var(--kritzel-menu-item-input-selection-color-on-selected, rgba(255, 255, 255, 0.3));
|
|
61
|
+
color: var(--kritzel-menu-item-input-selection-text-color-on-selected, #ffffff);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
:host(.editing) {
|
|
65
|
+
background-color: var(--kritzel-menu-item-editing-background-color, hsl(0, 0%, 0%, 4.3%));
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
:host(.disabled) {
|
|
69
|
+
opacity: 0.5;
|
|
70
|
+
pointer-events: none !important;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
:host(.child-open) {
|
|
74
|
+
background-color: var(--kritzel-menu-item-child-open-background-color, hsl(0, 0%, 0%, 4.3%));
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
:host(.child-open.selected) {
|
|
78
|
+
background-color: var(--kritzel-menu-item-selected-background-color, #007aff);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.menu-item-overlay {
|
|
82
|
+
position: absolute;
|
|
83
|
+
inset: 0;
|
|
84
|
+
background-color: transparent;
|
|
85
|
+
z-index: 0;
|
|
86
|
+
pointer-events: none;
|
|
87
|
+
border-radius: var(--kritzel-menu-item-border-radius, 12px);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.menu-item-content {
|
|
91
|
+
display: flex;
|
|
92
|
+
align-items: center;
|
|
93
|
+
gap: 8px;
|
|
94
|
+
position: relative;
|
|
95
|
+
z-index: 1;
|
|
96
|
+
height: 100%;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.left {
|
|
100
|
+
justify-content: flex-start;
|
|
101
|
+
flex: 1;
|
|
102
|
+
min-width: 0;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.left>div {
|
|
106
|
+
white-space: nowrap;
|
|
107
|
+
overflow: hidden;
|
|
108
|
+
text-overflow: ellipsis;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.right {
|
|
112
|
+
justify-content: flex-end;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.edit-input {
|
|
116
|
+
flex: 1;
|
|
117
|
+
height: var(--kritzel-menu-item-input-height, 24px);
|
|
118
|
+
padding: 0;
|
|
119
|
+
background-color: transparent;
|
|
120
|
+
border-radius: 0;
|
|
121
|
+
border: none;
|
|
122
|
+
border-bottom: var(--kritzel-menu-item-input-border, 1px solid #ccc);
|
|
123
|
+
font-size: var(--kritzel-menu-item-font-size, 14px);
|
|
124
|
+
width: 100%;
|
|
125
|
+
min-width: 0;
|
|
126
|
+
box-sizing: border-box;
|
|
127
|
+
outline: none;
|
|
128
|
+
color: inherit;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.edit-input {
|
|
132
|
+
caret-color: var(--kritzel-menu-item-input-caret-color, currentColor);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.edit-input::selection {
|
|
136
|
+
background-color: var(--kritzel-menu-item-input-selection-color, #007bff);
|
|
137
|
+
color: var(--kritzel-menu-item-input-selection-text-color, #ffffff);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.action-button {
|
|
141
|
+
padding: 4px;
|
|
142
|
+
border-radius: 8px;
|
|
143
|
+
border: none;
|
|
144
|
+
cursor: var(--kritzel-global-pointer-cursor, pointer);
|
|
145
|
+
display: flex;
|
|
146
|
+
align-items: center;
|
|
147
|
+
justify-content: center;
|
|
148
|
+
background-color: transparent;
|
|
149
|
+
background: transparent;
|
|
150
|
+
-webkit-tap-highlight-color: transparent;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.action-button:hover,
|
|
154
|
+
.action-button:focus {
|
|
155
|
+
background-color: var(--kritzel-menu-item-button-hover-background-color, hsl(0, 0%, 0%, 4.3%));
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.action-button.disabled {
|
|
159
|
+
pointer-events: none;
|
|
160
|
+
opacity: 0.5;
|
|
161
161
|
}
|
|
@@ -90,12 +90,12 @@ export class KritzelMenuItem {
|
|
|
90
90
|
];
|
|
91
91
|
}
|
|
92
92
|
render() {
|
|
93
|
-
return (h(Host, { key: '
|
|
93
|
+
return (h(Host, { key: '6fd639ff533e0b2c39febd369b4ba034661ec708', 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: 'd7486e9f1614be1801268fa97947aaab4c12460d', 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"; }
|
|
@@ -1,102 +1,102 @@
|
|
|
1
|
-
:host {
|
|
2
|
-
display: block;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.input-container {
|
|
6
|
-
display: flex;
|
|
7
|
-
flex-direction: column;
|
|
8
|
-
gap: 6px;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.input-label {
|
|
12
|
-
font-size: 14px;
|
|
13
|
-
font-weight: 500;
|
|
14
|
-
color: var(--kritzel-numeric-input-label-color, #333333);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.input-wrapper {
|
|
18
|
-
display: flex;
|
|
19
|
-
position: relative;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.numeric-input {
|
|
23
|
-
flex: 1;
|
|
24
|
-
padding: 8px 36px 8px 12px;
|
|
25
|
-
border: 1px solid var(--kritzel-numeric-input-border-color, #ebebeb);
|
|
26
|
-
border-radius: 6px;
|
|
27
|
-
font-size: 14px;
|
|
28
|
-
color: var(--kritzel-numeric-input-text-color, #333333);
|
|
29
|
-
background-color: var(--kritzel-numeric-input-input-background, #ffffff);
|
|
30
|
-
outline: none;
|
|
31
|
-
transition: border-color 150ms ease;
|
|
32
|
-
box-sizing: border-box;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/* Hide native spin buttons */
|
|
36
|
-
.numeric-input::-webkit-outer-spin-button,
|
|
37
|
-
.numeric-input::-webkit-inner-spin-button {
|
|
38
|
-
-webkit-appearance: none;
|
|
39
|
-
margin: 0;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.numeric-input[type='number'] {
|
|
43
|
-
-moz-appearance: textfield;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.numeric-input::selection {
|
|
47
|
-
background-color: var(--kritzel-numeric-input-selection-background, #007AFF);
|
|
48
|
-
color: var(--kritzel-numeric-input-selection-color, #ffffff);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.numeric-input:hover {
|
|
52
|
-
border-color: var(--kritzel-numeric-input-hover-border-color, #cccccc);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.numeric-input:focus {
|
|
56
|
-
border-color: var(--kritzel-numeric-input-focus-border-color, #0066ff);
|
|
57
|
-
border-width: 2px;
|
|
58
|
-
padding: 7px 35px 7px 11px;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.spinner-buttons {
|
|
62
|
-
position: absolute;
|
|
63
|
-
right: 1px;
|
|
64
|
-
top: 1px;
|
|
65
|
-
bottom: 1px;
|
|
66
|
-
display: flex;
|
|
67
|
-
flex-direction: column;
|
|
68
|
-
border-left: 1px solid var(--kritzel-numeric-input-border-color, #ebebeb);
|
|
69
|
-
border-radius: 0 5px 5px 0;
|
|
70
|
-
overflow: hidden;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.spinner-button {
|
|
74
|
-
flex: 1;
|
|
75
|
-
display: flex;
|
|
76
|
-
align-items: center;
|
|
77
|
-
justify-content: center;
|
|
78
|
-
width: 24px;
|
|
79
|
-
padding: 0;
|
|
80
|
-
border: none;
|
|
81
|
-
background-color: var(--kritzel-numeric-input-spinner-background, #f5f5f5);
|
|
82
|
-
color: var(--kritzel-numeric-input-spinner-color, #666666);
|
|
83
|
-
cursor: pointer;
|
|
84
|
-
transition: background-color 150ms ease;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.spinner-button:hover {
|
|
88
|
-
background-color: var(--kritzel-numeric-input-spinner-hover-background, #ebebeb);
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.spinner-button:active {
|
|
92
|
-
background-color: var(--kritzel-numeric-input-spinner-active-background, #dddddd);
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.spinner-up {
|
|
96
|
-
border-bottom: 1px solid var(--kritzel-numeric-input-border-color, #ebebeb);
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.spinner-icon {
|
|
100
|
-
width: 10px;
|
|
101
|
-
height: 6px;
|
|
102
|
-
}
|
|
1
|
+
:host {
|
|
2
|
+
display: block;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.input-container {
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
gap: 6px;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.input-label {
|
|
12
|
+
font-size: 14px;
|
|
13
|
+
font-weight: 500;
|
|
14
|
+
color: var(--kritzel-numeric-input-label-color, #333333);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.input-wrapper {
|
|
18
|
+
display: flex;
|
|
19
|
+
position: relative;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.numeric-input {
|
|
23
|
+
flex: 1;
|
|
24
|
+
padding: 8px 36px 8px 12px;
|
|
25
|
+
border: 1px solid var(--kritzel-numeric-input-border-color, #ebebeb);
|
|
26
|
+
border-radius: 6px;
|
|
27
|
+
font-size: 14px;
|
|
28
|
+
color: var(--kritzel-numeric-input-text-color, #333333);
|
|
29
|
+
background-color: var(--kritzel-numeric-input-input-background, #ffffff);
|
|
30
|
+
outline: none;
|
|
31
|
+
transition: border-color 150ms ease;
|
|
32
|
+
box-sizing: border-box;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/* Hide native spin buttons */
|
|
36
|
+
.numeric-input::-webkit-outer-spin-button,
|
|
37
|
+
.numeric-input::-webkit-inner-spin-button {
|
|
38
|
+
-webkit-appearance: none;
|
|
39
|
+
margin: 0;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.numeric-input[type='number'] {
|
|
43
|
+
-moz-appearance: textfield;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.numeric-input::selection {
|
|
47
|
+
background-color: var(--kritzel-numeric-input-selection-background, #007AFF);
|
|
48
|
+
color: var(--kritzel-numeric-input-selection-color, #ffffff);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.numeric-input:hover {
|
|
52
|
+
border-color: var(--kritzel-numeric-input-hover-border-color, #cccccc);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.numeric-input:focus {
|
|
56
|
+
border-color: var(--kritzel-numeric-input-focus-border-color, #0066ff);
|
|
57
|
+
border-width: 2px;
|
|
58
|
+
padding: 7px 35px 7px 11px;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.spinner-buttons {
|
|
62
|
+
position: absolute;
|
|
63
|
+
right: 1px;
|
|
64
|
+
top: 1px;
|
|
65
|
+
bottom: 1px;
|
|
66
|
+
display: flex;
|
|
67
|
+
flex-direction: column;
|
|
68
|
+
border-left: 1px solid var(--kritzel-numeric-input-border-color, #ebebeb);
|
|
69
|
+
border-radius: 0 5px 5px 0;
|
|
70
|
+
overflow: hidden;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.spinner-button {
|
|
74
|
+
flex: 1;
|
|
75
|
+
display: flex;
|
|
76
|
+
align-items: center;
|
|
77
|
+
justify-content: center;
|
|
78
|
+
width: 24px;
|
|
79
|
+
padding: 0;
|
|
80
|
+
border: none;
|
|
81
|
+
background-color: var(--kritzel-numeric-input-spinner-background, #f5f5f5);
|
|
82
|
+
color: var(--kritzel-numeric-input-spinner-color, #666666);
|
|
83
|
+
cursor: pointer;
|
|
84
|
+
transition: background-color 150ms ease;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.spinner-button:hover {
|
|
88
|
+
background-color: var(--kritzel-numeric-input-spinner-hover-background, #ebebeb);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.spinner-button:active {
|
|
92
|
+
background-color: var(--kritzel-numeric-input-spinner-active-background, #dddddd);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.spinner-up {
|
|
96
|
+
border-bottom: 1px solid var(--kritzel-numeric-input-border-color, #ebebeb);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.spinner-icon {
|
|
100
|
+
width: 10px;
|
|
101
|
+
height: 6px;
|
|
102
|
+
}
|
|
@@ -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: 'b27f16d562bc6c61b0a6a289e622e7e35159a782' }, h("div", { key: '7f5f2295a60b46dc05c003b10ff74e9da6822406', class: "input-container" }, this.label && h("label", { key: 'a5a10af06139312ef0b038ed8c3bb533afa6235c', class: "input-label" }, this.label), h("div", { key: 'b15b4a2d84ad1185a67cd748176c7585a0789f09', class: "input-wrapper" }, h("input", { key: '8da76a405713461ef4eb2f316af6b737493371dd', 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: '9813f61998a8902d9a1bc4100dbab744e91e98f8', class: "spinner-buttons" }, h("button", { key: 'ad688c3332b0dbdd6327c66aed778d3e0d036aab', type: "button", class: "spinner-button spinner-up", onClick: this.handleIncrement, tabIndex: -1, "aria-label": "Increase value" }, h("svg", { key: 'a21ec61f331a7b672d2ce56cd2d1b30e7f0b22c6', viewBox: "0 0 10 6", class: "spinner-icon" }, h("path", { key: 'f36b4f68ea3733851bebce1e9f45a1f36e62acdc', d: "M1 5L5 1L9 5", stroke: "currentColor", "stroke-width": "1.5", fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" }))), h("button", { key: '484373581f26b6cf71194bf545d67997ef7db79f', type: "button", class: "spinner-button spinner-down", onClick: this.handleDecrement, tabIndex: -1, "aria-label": "Decrease value" }, h("svg", { key: '5b9199c270ad270729b9f5c1c9246824e1d49cb8', viewBox: "0 0 10 6", class: "spinner-icon" }, h("path", { key: 'd96e78c311bbc941edfafcb02017da7c367aaf2e', 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"; }
|