kritzel-stencil 0.4.30 → 0.4.31
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/LICENSE.md +49 -49
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/kritzel-active-users_46.cjs.entry.js +112 -112
- package/dist/cjs/kritzel-brush-style.cjs.entry.js +1 -1
- package/dist/cjs/{schema.constants-CcvqL5nJ.js → schema.constants-0ySX0cg3.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 +160 -160
- package/dist/collection/components/core/kritzel-editor/kritzel-editor.js +18 -18
- package/dist/collection/components/core/kritzel-engine/kritzel-engine.css +80 -80
- package/dist/collection/components/core/kritzel-engine/kritzel-engine.js +21 -21
- package/dist/collection/components/core/kritzel-watermark/kritzel-watermark.css +29 -29
- package/dist/collection/components/core/kritzel-watermark/kritzel-watermark.js +2 -2
- 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 +73 -73
- 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 +209 -209
- 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 +2 -2
- 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 +166 -166
- 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 +68 -68
- 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 +112 -112
- package/dist/collection/components/ui/kritzel-controls/kritzel-controls.css +331 -331
- package/dist/collection/components/ui/kritzel-controls/kritzel-controls.js +6 -6
- 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 +39 -39
- 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-loading-overlay/kritzel-loading-overlay.css +54 -54
- package/dist/collection/components/ui/kritzel-loading-overlay/kritzel-loading-overlay.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 +58 -58
- package/dist/collection/components/ui/kritzel-more-menu/kritzel-more-menu.js +2 -2
- package/dist/collection/components/ui/kritzel-notification-card/kritzel-notification-card.css +101 -101
- package/dist/collection/components/ui/kritzel-settings/kritzel-settings.css +137 -137
- package/dist/collection/components/ui/kritzel-settings/kritzel-settings.js +1 -1
- package/dist/collection/components/ui/kritzel-share-dialog/kritzel-share-dialog.css +150 -150
- 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 +16 -16
- package/dist/collection/components/ui/kritzel-zoom-panel/kritzel-zoom-panel.css +72 -72
- package/dist/collection/components/ui/kritzel-zoom-panel/kritzel-zoom-panel.js +1 -1
- 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 +41 -41
- package/dist/components/index.js +2 -2
- 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 +2 -2
- 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-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 +51 -51
- 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-loading-overlay.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-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-DTB3ykgO.js → p-B65Z2K81.js} +1 -1
- package/dist/components/{p-4uoSa0Xl.js → p-B6cwfdo3.js} +2 -2
- package/dist/components/{p-ChPs27Fd.js → p-BBA9F6Bi.js} +4 -4
- package/dist/components/{p-Dvn6ad4a.js → p-BCrNNQKI.js} +1 -1
- package/dist/components/{p-CoXN583u.js → p-BGJ-1pXX.js} +3 -3
- package/dist/components/{p-CBrn5AIB.js → p-BTRiw0VC.js} +1 -1
- package/dist/components/{p-DoxFuOy1.js → p-Bu6TjCs0.js} +2 -2
- package/dist/components/{p-Ce1j1-Hg.js → p-BvpI1eL4.js} +3 -3
- package/dist/components/{p-CAXR5-S9.js → p-BwC3bHai.js} +4 -4
- package/dist/components/{p-DX2nriaq.js → p-C2NV0SgA.js} +1 -1
- package/dist/components/{p-BPzdPKWE.js → p-CAGey5Xt.js} +3 -3
- package/dist/components/{p-C0FEC_gS.js → p-C_4J10HD.js} +2 -2
- package/dist/components/{p-NOWtUeeQ.js → p-C_fBqaep.js} +1 -1
- package/dist/components/{p-Ba0c-tu2.js → p-CzibK3BJ.js} +2 -2
- package/dist/components/{p-Cm33td2O.js → p-D0SKmg_J.js} +1 -1
- package/dist/components/{p-OUl5CA4Y.js → p-D497dAd-.js} +1 -1
- package/dist/components/{p-BmBebQMI.js → p-DC7noKZD.js} +7 -7
- package/dist/components/{p-CXpv9Rxe.js → p-DGcug5rp.js} +2 -2
- package/dist/components/{p-DkHYY72B.js → p-DIE74Wkf.js} +2 -2
- package/dist/components/{p-DOTdJ3JQ.js → p-DKkQMbfN.js} +3 -3
- package/dist/components/{p-DnmVD1Mz.js → p-DKuxmP3T.js} +2 -2
- package/dist/components/{p-bAacqNHq.js → p-DQX5iqJB.js} +2 -2
- package/dist/components/{p-DUmLsjKb.js → p-DTzNzE9j.js} +1 -1
- package/dist/components/{p-Df3BwVGy.js → p-D_XWdMC3.js} +2 -2
- package/dist/components/{p-B38_9BJg.js → p-Da56LiC2.js} +1 -1
- package/dist/components/{p-CeffYwAK.js → p-DaE8xcJ8.js} +19 -19
- package/dist/components/{p-CYwoBiqy.js → p-DcG-UAoL.js} +50 -50
- package/dist/components/{p-BeSKOETx.js → p-Dm6TZsys.js} +2 -2
- package/dist/components/{p-DhabvHJM.js → p-DuyNKEne.js} +3 -3
- package/dist/components/{p-DFMZEarE.js → p-DyWg1f0y.js} +1 -1
- package/dist/components/{p-DN9p3G9K.js → p-FDwfHj3U.js} +3 -3
- package/dist/components/{p-DK0anxtL.js → p-P70dtHet.js} +1 -1
- package/dist/components/{p-CucCT7Qn.js → p-R6NeY_RA.js} +2 -2
- package/dist/components/{p-BFYtCsZu.js → p-XOXeNvvd.js} +2 -2
- package/dist/components/{p-jIKskj3S.js → p-ZwkkxMNZ.js} +1 -1
- package/dist/components/{p-BprEDRpA.js → p-auUCvUOc.js} +2 -2
- package/dist/components/{p-D0Ed8epW.js → p-b5XSApfh.js} +4 -4
- package/dist/components/{p-djJSnjAX.js → p-fp1y_eAN.js} +2 -2
- package/dist/components/{p-Dpm75DfV.js → p-mCRS0Vii.js} +5 -5
- package/dist/components/{p-DOl-95VY.js → p-ml3LLPFB.js} +10 -10
- package/dist/components/{p-D_cyY7Nd.js → p-xFCFDper.js} +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/kritzel-active-users_46.entry.js +112 -112
- package/dist/esm/kritzel-brush-style.entry.js +1 -1
- package/dist/esm/{schema.constants-De_S50eB.js → schema.constants-D3OqvrMh.js} +6 -6
- package/dist/stencil/index.esm.js +2 -2
- package/dist/stencil/{p-1a398b42.entry.js → p-307b09bd.entry.js} +112 -112
- package/dist/stencil/{p-fb32cd8f.entry.js → p-905f7ab4.entry.js} +1 -1
- package/dist/stencil/{p-De_S50eB.js → p-D3OqvrMh.js} +6 -6
- package/dist/stencil/stencil.esm.js +1 -1
- package/dist/types/constants/version.d.ts +1 -1
- package/package.json +2 -1
- package/readme.md +10 -10
|
@@ -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: '4964f7fe47f567303e571c5b09c1c4510d141cc2' }, h("div", { key: '9e4a98c5080239c22b387bf73d99300817e6eaf8', class: "input-container" }, this.label && h("label", { key: '81015825486e39f2049028d8398c48df258ab1b9', class: "input-label" }, this.label), h("div", { key: '0ff50909adf10f75422a685409ea39f54a6cf30c', class: "input-wrapper" }, h("input", { key: '652ae7ea7aa9e3cb74dd105e1d3f5c40ee12d922', 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: '22a15867aec1c8850064634ca3f6ee4832e6442e', class: "spinner-buttons" }, h("button", { key: 'e7f0e4a3925785340b397d150020138dbacf29c0', type: "button", class: "spinner-button spinner-up", onClick: this.handleIncrement, tabIndex: -1, "aria-label": "Increase value" }, h("svg", { key: '48ec248dc8602a8d6431cea1a921afe901bee490', viewBox: "0 0 10 6", class: "spinner-icon" }, h("path", { key: '9de7ad843eb38809711c8d99d773978187b19285', d: "M1 5L5 1L9 5", stroke: "currentColor", "stroke-width": "1.5", fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" }))), h("button", { key: 'd8666aed8d56d1e95715ac2b8cf0d4eee8134863', type: "button", class: "spinner-button spinner-down", onClick: this.handleDecrement, tabIndex: -1, "aria-label": "Decrease value" }, h("svg", { key: '97d71669bb918deac0f48c4b650dd7700addbdde', viewBox: "0 0 10 6", class: "spinner-icon" }, h("path", { key: 'c4314572861775d40644c4475b1403e0958ace67', 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"; }
|
|
@@ -1,85 +1,85 @@
|
|
|
1
|
-
:host {
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: column;
|
|
4
|
-
padding: 0;
|
|
5
|
-
box-sizing: border-box;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.opacity-container {
|
|
9
|
-
display: flex;
|
|
10
|
-
align-items: center;
|
|
11
|
-
width: 232px;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.slider-wrapper {
|
|
15
|
-
flex: 1;
|
|
16
|
-
display: flex;
|
|
17
|
-
align-items: center;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.opacity-slider {
|
|
21
|
-
-webkit-appearance: none;
|
|
22
|
-
appearance: none;
|
|
23
|
-
width: 100%;
|
|
24
|
-
height: 6px;
|
|
25
|
-
border-radius: 3px;
|
|
26
|
-
background: linear-gradient(
|
|
27
|
-
to right,
|
|
28
|
-
var(--kritzel-opacity-slider-active-color, #007AFF) 0%,
|
|
29
|
-
var(--kritzel-opacity-slider-active-color, #007AFF) var(--slider-progress, 100%),
|
|
30
|
-
var(--kritzel-opacity-slider-track-color, #e0e0e0) var(--slider-progress, 100%),
|
|
31
|
-
var(--kritzel-opacity-slider-track-color, #e0e0e0) 100%
|
|
32
|
-
);
|
|
33
|
-
outline: none;
|
|
34
|
-
cursor: var(--kritzel-global-pointer-cursor, pointer);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.opacity-slider::-webkit-slider-thumb {
|
|
38
|
-
-webkit-appearance: none;
|
|
39
|
-
appearance: none;
|
|
40
|
-
width: 16px;
|
|
41
|
-
height: 16px;
|
|
42
|
-
border-radius: 50%;
|
|
43
|
-
background: var(--kritzel-opacity-slider-thumb-color, #ffffff);
|
|
44
|
-
border: 2px solid var(--kritzel-opacity-slider-thumb-border-color, #007AFF);
|
|
45
|
-
cursor: var(--kritzel-global-pointer-cursor, pointer);
|
|
46
|
-
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
|
|
47
|
-
transition: transform 0.1s ease;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.opacity-slider::-webkit-slider-thumb:hover {
|
|
51
|
-
transform: scale(1.1);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.opacity-slider::-moz-range-thumb {
|
|
55
|
-
width: 16px;
|
|
56
|
-
height: 16px;
|
|
57
|
-
border-radius: 50%;
|
|
58
|
-
background: var(--kritzel-opacity-slider-thumb-color, #ffffff);
|
|
59
|
-
border: 2px solid var(--kritzel-opacity-slider-thumb-border-color, #007AFF);
|
|
60
|
-
cursor: var(--kritzel-global-pointer-cursor, pointer);
|
|
61
|
-
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
|
|
62
|
-
transition: transform 0.1s ease;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.opacity-slider::-moz-range-thumb:hover {
|
|
66
|
-
transform: scale(1.1);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.opacity-slider::-moz-range-track {
|
|
70
|
-
height: 6px;
|
|
71
|
-
border-radius: 3px;
|
|
72
|
-
background: transparent;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.opacity-slider:focus {
|
|
76
|
-
outline: none;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.opacity-slider:focus::-webkit-slider-thumb {
|
|
80
|
-
box-shadow: 0 0 0 2px var(--kritzel-global-focus-ring-color, rgba(0, 122, 255, 0.3));
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.opacity-slider:focus::-moz-range-thumb {
|
|
84
|
-
box-shadow: 0 0 0 2px var(--kritzel-global-focus-ring-color, rgba(0, 122, 255, 0.3));
|
|
85
|
-
}
|
|
1
|
+
:host {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
padding: 0;
|
|
5
|
+
box-sizing: border-box;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.opacity-container {
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
width: 232px;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.slider-wrapper {
|
|
15
|
+
flex: 1;
|
|
16
|
+
display: flex;
|
|
17
|
+
align-items: center;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.opacity-slider {
|
|
21
|
+
-webkit-appearance: none;
|
|
22
|
+
appearance: none;
|
|
23
|
+
width: 100%;
|
|
24
|
+
height: 6px;
|
|
25
|
+
border-radius: 3px;
|
|
26
|
+
background: linear-gradient(
|
|
27
|
+
to right,
|
|
28
|
+
var(--kritzel-opacity-slider-active-color, #007AFF) 0%,
|
|
29
|
+
var(--kritzel-opacity-slider-active-color, #007AFF) var(--slider-progress, 100%),
|
|
30
|
+
var(--kritzel-opacity-slider-track-color, #e0e0e0) var(--slider-progress, 100%),
|
|
31
|
+
var(--kritzel-opacity-slider-track-color, #e0e0e0) 100%
|
|
32
|
+
);
|
|
33
|
+
outline: none;
|
|
34
|
+
cursor: var(--kritzel-global-pointer-cursor, pointer);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.opacity-slider::-webkit-slider-thumb {
|
|
38
|
+
-webkit-appearance: none;
|
|
39
|
+
appearance: none;
|
|
40
|
+
width: 16px;
|
|
41
|
+
height: 16px;
|
|
42
|
+
border-radius: 50%;
|
|
43
|
+
background: var(--kritzel-opacity-slider-thumb-color, #ffffff);
|
|
44
|
+
border: 2px solid var(--kritzel-opacity-slider-thumb-border-color, #007AFF);
|
|
45
|
+
cursor: var(--kritzel-global-pointer-cursor, pointer);
|
|
46
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
|
|
47
|
+
transition: transform 0.1s ease;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.opacity-slider::-webkit-slider-thumb:hover {
|
|
51
|
+
transform: scale(1.1);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.opacity-slider::-moz-range-thumb {
|
|
55
|
+
width: 16px;
|
|
56
|
+
height: 16px;
|
|
57
|
+
border-radius: 50%;
|
|
58
|
+
background: var(--kritzel-opacity-slider-thumb-color, #ffffff);
|
|
59
|
+
border: 2px solid var(--kritzel-opacity-slider-thumb-border-color, #007AFF);
|
|
60
|
+
cursor: var(--kritzel-global-pointer-cursor, pointer);
|
|
61
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
|
|
62
|
+
transition: transform 0.1s ease;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.opacity-slider::-moz-range-thumb:hover {
|
|
66
|
+
transform: scale(1.1);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.opacity-slider::-moz-range-track {
|
|
70
|
+
height: 6px;
|
|
71
|
+
border-radius: 3px;
|
|
72
|
+
background: transparent;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.opacity-slider:focus {
|
|
76
|
+
outline: none;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.opacity-slider:focus::-webkit-slider-thumb {
|
|
80
|
+
box-shadow: 0 0 0 2px var(--kritzel-global-focus-ring-color, rgba(0, 122, 255, 0.3));
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.opacity-slider:focus::-moz-range-thumb {
|
|
84
|
+
box-shadow: 0 0 0 2px var(--kritzel-global-focus-ring-color, rgba(0, 122, 255, 0.3));
|
|
85
|
+
}
|
|
@@ -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: 'bc2d07dc28e3bf9599aac57823215445f1b41e4c' }, h("div", { key: '5d4106f36753d27b65b063021311e616185b3b88', class: "opacity-container" }, h("div", { key: '0766e8be775867dea4a6c44a79baf46d1361329c', class: "slider-wrapper" }, h("input", { key: 'ec9f6c6be684b1bb5cfab3574734c69428b22498', 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
|
} })))));
|
|
@@ -1,68 +1,68 @@
|
|
|
1
|
-
:host {
|
|
2
|
-
display: block;
|
|
3
|
-
max-width: 100%;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.pill-tabs-container {
|
|
7
|
-
display: inline-flex;
|
|
8
|
-
align-items: center;
|
|
9
|
-
gap: 4px;
|
|
10
|
-
padding: 4px;
|
|
11
|
-
max-width: 100%;
|
|
12
|
-
border-radius: var(--kritzel-pill-tabs-border-radius, 10px);
|
|
13
|
-
background: var(--kritzel-pill-tabs-background, #f0f0f0);
|
|
14
|
-
box-sizing: border-box;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.pill-tab {
|
|
18
|
-
display: flex;
|
|
19
|
-
align-items: center;
|
|
20
|
-
justify-content: center;
|
|
21
|
-
gap: 6px;
|
|
22
|
-
min-width: 0;
|
|
23
|
-
max-width: 100%;
|
|
24
|
-
padding: 8px 16px;
|
|
25
|
-
border: none;
|
|
26
|
-
border-radius: var(--kritzel-pill-tabs-tab-border-radius, 8px);
|
|
27
|
-
background: var(--kritzel-pill-tabs-tab-background, transparent);
|
|
28
|
-
color: var(--kritzel-pill-tabs-tab-text-color, #666666);
|
|
29
|
-
font-family: inherit;
|
|
30
|
-
font-size: 14px;
|
|
31
|
-
font-weight: 500;
|
|
32
|
-
cursor: var(--kritzel-global-pointer-cursor, pointer);
|
|
33
|
-
transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
|
|
34
|
-
white-space: nowrap;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.pill-tab:hover:not(.selected) {
|
|
38
|
-
background: var(--kritzel-pill-tabs-tab-background-hover, rgba(0, 0, 0, 0.05));
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.pill-tab.selected {
|
|
42
|
-
background: var(--kritzel-pill-tabs-tab-background-selected, #ffffff);
|
|
43
|
-
color: var(--kritzel-pill-tabs-tab-text-color-selected, #000000);
|
|
44
|
-
box-shadow: var(--kritzel-pill-tabs-tab-shadow-selected, 0 1px 3px rgba(0, 0, 0, 0.1));
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.pill-tab:focus {
|
|
48
|
-
outline: none;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.pill-tab:focus-visible {
|
|
52
|
-
box-shadow: 0 0 0 2px var(--kritzel-global-focus-ring-color, rgba(0, 122, 255, 0.3));
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.pill-tab-label {
|
|
56
|
-
display: block;
|
|
57
|
-
min-width: 0;
|
|
58
|
-
max-width: var(--kritzel-pill-tabs-tab-label-max-width, 10rem);
|
|
59
|
-
overflow: hidden;
|
|
60
|
-
text-overflow: ellipsis;
|
|
61
|
-
white-space: nowrap;
|
|
62
|
-
line-height: 1;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
/* Icon styling */
|
|
66
|
-
.pill-tab kritzel-icon {
|
|
67
|
-
flex-shrink: 0;
|
|
68
|
-
}
|
|
1
|
+
:host {
|
|
2
|
+
display: block;
|
|
3
|
+
max-width: 100%;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.pill-tabs-container {
|
|
7
|
+
display: inline-flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
gap: 4px;
|
|
10
|
+
padding: 4px;
|
|
11
|
+
max-width: 100%;
|
|
12
|
+
border-radius: var(--kritzel-pill-tabs-border-radius, 10px);
|
|
13
|
+
background: var(--kritzel-pill-tabs-background, #f0f0f0);
|
|
14
|
+
box-sizing: border-box;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.pill-tab {
|
|
18
|
+
display: flex;
|
|
19
|
+
align-items: center;
|
|
20
|
+
justify-content: center;
|
|
21
|
+
gap: 6px;
|
|
22
|
+
min-width: 0;
|
|
23
|
+
max-width: 100%;
|
|
24
|
+
padding: 8px 16px;
|
|
25
|
+
border: none;
|
|
26
|
+
border-radius: var(--kritzel-pill-tabs-tab-border-radius, 8px);
|
|
27
|
+
background: var(--kritzel-pill-tabs-tab-background, transparent);
|
|
28
|
+
color: var(--kritzel-pill-tabs-tab-text-color, #666666);
|
|
29
|
+
font-family: inherit;
|
|
30
|
+
font-size: 14px;
|
|
31
|
+
font-weight: 500;
|
|
32
|
+
cursor: var(--kritzel-global-pointer-cursor, pointer);
|
|
33
|
+
transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
|
|
34
|
+
white-space: nowrap;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.pill-tab:hover:not(.selected) {
|
|
38
|
+
background: var(--kritzel-pill-tabs-tab-background-hover, rgba(0, 0, 0, 0.05));
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.pill-tab.selected {
|
|
42
|
+
background: var(--kritzel-pill-tabs-tab-background-selected, #ffffff);
|
|
43
|
+
color: var(--kritzel-pill-tabs-tab-text-color-selected, #000000);
|
|
44
|
+
box-shadow: var(--kritzel-pill-tabs-tab-shadow-selected, 0 1px 3px rgba(0, 0, 0, 0.1));
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.pill-tab:focus {
|
|
48
|
+
outline: none;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.pill-tab:focus-visible {
|
|
52
|
+
box-shadow: 0 0 0 2px var(--kritzel-global-focus-ring-color, rgba(0, 122, 255, 0.3));
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.pill-tab-label {
|
|
56
|
+
display: block;
|
|
57
|
+
min-width: 0;
|
|
58
|
+
max-width: var(--kritzel-pill-tabs-tab-label-max-width, 10rem);
|
|
59
|
+
overflow: hidden;
|
|
60
|
+
text-overflow: ellipsis;
|
|
61
|
+
white-space: nowrap;
|
|
62
|
+
line-height: 1;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/* Icon styling */
|
|
66
|
+
.pill-tab kritzel-icon {
|
|
67
|
+
flex-shrink: 0;
|
|
68
|
+
}
|
|
@@ -50,7 +50,7 @@ export class KritzelPillTabs {
|
|
|
50
50
|
buttons?.[newIndex]?.focus();
|
|
51
51
|
}
|
|
52
52
|
render() {
|
|
53
|
-
return (h(Host, { key: '
|
|
53
|
+
return (h(Host, { key: '16fce447fb7db0539ba115ef19771ac78f30a302' }, h("div", { key: '95487da922621b18c1ec422eb0d464131dbc28d3', class: "pill-tabs-container", role: "tablist" }, this.tabs.map((tab, index) => (h("button", { key: tab.id, class: {
|
|
54
54
|
'pill-tab': true,
|
|
55
55
|
'selected': this.value === tab.id,
|
|
56
56
|
}, role: "tab", "aria-selected": this.value === tab.id ? 'true' : 'false', tabIndex: this.value === tab.id ? 0 : -1, onClick: () => this.handleTabClick(tab.id), onKeyDown: (e) => this.handleKeyDown(e, index) }, tab.icon && h("kritzel-icon", { name: tab.icon, size: 16 }), h("span", { class: "pill-tab-label" }, tab.label)))))));
|
|
@@ -78,7 +78,7 @@ export class KritzelPillTabs {
|
|
|
78
78
|
"references": {
|
|
79
79
|
"KritzelPillTab": {
|
|
80
80
|
"location": "local",
|
|
81
|
-
"path": "/
|
|
81
|
+
"path": "C:/Projects/kritzel-private/libs/kritzel-stencil/src/components/shared/kritzel-pill-tabs/kritzel-pill-tabs.tsx",
|
|
82
82
|
"id": "src/components/shared/kritzel-pill-tabs/kritzel-pill-tabs.tsx::KritzelPillTab"
|
|
83
83
|
}
|
|
84
84
|
}
|
|
@@ -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: 'c7f5fd3f34471e089057580a2f34ab4ce25ca0eb', style: { display: this.anchor ? 'block' : 'none' } }, h("slot", { key: '4ca64a00a7969d817a5f8eb824b8d8d706989a38' })));
|
|
281
281
|
}
|
|
282
282
|
static get is() { return "kritzel-portal"; }
|
|
283
283
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
:host {
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: column;
|
|
4
|
-
gap: 12px;
|
|
5
|
-
padding: 0;
|
|
6
|
-
box-sizing: border-box;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.fill-row {
|
|
10
|
-
display: flex;
|
|
11
|
-
align-items: center;
|
|
12
|
-
gap: 4px;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.fill-option {
|
|
16
|
-
display: flex;
|
|
17
|
-
justify-content: center;
|
|
18
|
-
align-items: center;
|
|
19
|
-
width: 48px;
|
|
20
|
-
height: 32px;
|
|
21
|
-
border-radius: 6px;
|
|
22
|
-
cursor: var(--kritzel-global-pointer-cursor, pointer);
|
|
23
|
-
border: 2px solid transparent;
|
|
24
|
-
box-sizing: border-box;
|
|
25
|
-
background: var(--kritzel-shape-fill-option-background, #ffffff);
|
|
26
|
-
padding: 4px;
|
|
27
|
-
transition: background-color 0.15s ease, border-color 0.15s ease;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.fill-option:hover {
|
|
31
|
-
background-color: var(--kritzel-shape-fill-hover-background-color, #ebebeb);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.fill-option.selected {
|
|
35
|
-
border-color: var(--kritzel-selection-border-color, #007AFF);
|
|
36
|
-
background-color: var(--kritzel-shape-fill-selected-background-color, #ebebeb);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.fill-option:focus {
|
|
40
|
-
outline: none;
|
|
41
|
-
box-shadow: 0 0 0 2px var(--kritzel-global-focus-ring-color, rgba(0, 122, 255, 0.3));
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.fill-icon {
|
|
45
|
-
width: 100%;
|
|
46
|
-
height: 100%;
|
|
47
|
-
}
|
|
1
|
+
:host {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
gap: 12px;
|
|
5
|
+
padding: 0;
|
|
6
|
+
box-sizing: border-box;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.fill-row {
|
|
10
|
+
display: flex;
|
|
11
|
+
align-items: center;
|
|
12
|
+
gap: 4px;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.fill-option {
|
|
16
|
+
display: flex;
|
|
17
|
+
justify-content: center;
|
|
18
|
+
align-items: center;
|
|
19
|
+
width: 48px;
|
|
20
|
+
height: 32px;
|
|
21
|
+
border-radius: 6px;
|
|
22
|
+
cursor: var(--kritzel-global-pointer-cursor, pointer);
|
|
23
|
+
border: 2px solid transparent;
|
|
24
|
+
box-sizing: border-box;
|
|
25
|
+
background: var(--kritzel-shape-fill-option-background, #ffffff);
|
|
26
|
+
padding: 4px;
|
|
27
|
+
transition: background-color 0.15s ease, border-color 0.15s ease;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.fill-option:hover {
|
|
31
|
+
background-color: var(--kritzel-shape-fill-hover-background-color, #ebebeb);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.fill-option.selected {
|
|
35
|
+
border-color: var(--kritzel-selection-border-color, #007AFF);
|
|
36
|
+
background-color: var(--kritzel-shape-fill-selected-background-color, #ebebeb);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.fill-option:focus {
|
|
40
|
+
outline: none;
|
|
41
|
+
box-shadow: 0 0 0 2px var(--kritzel-global-focus-ring-color, rgba(0, 122, 255, 0.3));
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.fill-icon {
|
|
45
|
+
width: 100%;
|
|
46
|
+
height: 100%;
|
|
47
|
+
}
|
|
@@ -16,10 +16,10 @@ export class KritzelShapeFill {
|
|
|
16
16
|
return (h("svg", { viewBox: "0 0 24 24", class: "fill-icon" }, h("rect", { x: "4", y: "4", width: "16", height: "16", rx: "2", fill: strokeColor, stroke: strokeColor, "stroke-width": "2" })));
|
|
17
17
|
}
|
|
18
18
|
render() {
|
|
19
|
-
return (h(Host, { key: '
|
|
19
|
+
return (h(Host, { key: 'ec214708dd4210e0c36734cb81fba76849114f9b' }, h("div", { key: 'd64bacdb7c50b31f3c460bdf2e939b4159d4d000', class: "fill-row" }, h("button", { key: '812735be08265145a13ab116e7153fd684f8b77f', class: {
|
|
20
20
|
'fill-option': true,
|
|
21
21
|
'selected': this.value === 'transparent',
|
|
22
|
-
}, onClick: () => this.handleFillChange('transparent'), title: "Transparent background" }, this.renderFillIcon('transparent')), h("button", { key: '
|
|
22
|
+
}, onClick: () => this.handleFillChange('transparent'), title: "Transparent background" }, this.renderFillIcon('transparent')), h("button", { key: 'cb5caf2db8aece4bef2eebca37e7ac36383bb450', class: {
|
|
23
23
|
'fill-option': true,
|
|
24
24
|
'selected': this.value === 'filled',
|
|
25
25
|
}, onClick: () => this.handleFillChange('filled'), title: "Filled background" }, this.renderFillIcon('filled')))));
|
|
@@ -47,7 +47,7 @@ export class KritzelShapeFill {
|
|
|
47
47
|
"references": {
|
|
48
48
|
"ShapeFillType": {
|
|
49
49
|
"location": "local",
|
|
50
|
-
"path": "/
|
|
50
|
+
"path": "C:/Projects/kritzel-private/libs/kritzel-stencil/src/components/shared/kritzel-shape-fill/kritzel-shape-fill.tsx",
|
|
51
51
|
"id": "src/components/shared/kritzel-shape-fill/kritzel-shape-fill.tsx::ShapeFillType"
|
|
52
52
|
}
|
|
53
53
|
}
|
|
@@ -83,7 +83,7 @@ export class KritzelShapeFill {
|
|
|
83
83
|
"references": {
|
|
84
84
|
"ShapeFillType": {
|
|
85
85
|
"location": "local",
|
|
86
|
-
"path": "/
|
|
86
|
+
"path": "C:/Projects/kritzel-private/libs/kritzel-stencil/src/components/shared/kritzel-shape-fill/kritzel-shape-fill.tsx",
|
|
87
87
|
"id": "src/components/shared/kritzel-shape-fill/kritzel-shape-fill.tsx::ShapeFillType"
|
|
88
88
|
}
|
|
89
89
|
}
|
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
:host {
|
|
2
|
-
display: inline-flex;
|
|
3
|
-
align-items: center;
|
|
4
|
-
cursor: var(--kritzel-global-pointer-cursor, pointer);
|
|
5
|
-
outline: none;
|
|
6
|
-
z-index: 1;
|
|
7
|
-
-webkit-tap-highlight-color: transparent;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
:host(:focus-visible) .toggle-track {
|
|
11
|
-
box-shadow: 0 0 0 2px var(--kritzel-global-focus-ring-color, rgba(0, 122, 255, 0.3));
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
:host(.disabled) {
|
|
15
|
-
opacity: 0.5;
|
|
16
|
-
pointer-events: none;
|
|
17
|
-
cursor: default;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.toggle-track {
|
|
21
|
-
position: relative;
|
|
22
|
-
width: var(--kritzel-slide-toggle-width, 40px);
|
|
23
|
-
height: var(--kritzel-slide-toggle-height, 22px);
|
|
24
|
-
background-color: var(--kritzel-slide-toggle-track-color, #ccc);
|
|
25
|
-
border-radius: var(--kritzel-slide-toggle-border-radius, 11px);
|
|
26
|
-
transition: background-color var(--kritzel-slide-toggle-transition-duration, 0.2s) ease;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
:host(.checked) .toggle-track {
|
|
30
|
-
background-color: var(--kritzel-slide-toggle-track-checked-color, #007AFF);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.toggle-thumb {
|
|
34
|
-
position: absolute;
|
|
35
|
-
top: 50%;
|
|
36
|
-
left: 2px;
|
|
37
|
-
transform: translateY(-50%);
|
|
38
|
-
width: var(--kritzel-slide-toggle-thumb-size, 18px);
|
|
39
|
-
height: var(--kritzel-slide-toggle-thumb-size, 18px);
|
|
40
|
-
background-color: var(--kritzel-slide-toggle-thumb-color, #fff);
|
|
41
|
-
border-radius: 50%;
|
|
42
|
-
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
|
|
43
|
-
transition: left var(--kritzel-slide-toggle-transition-duration, 0.2s) ease;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
:host(.checked) .toggle-thumb {
|
|
47
|
-
left: calc(var(--kritzel-slide-toggle-width, 40px) - var(--kritzel-slide-toggle-thumb-size, 18px) - 2px);
|
|
48
|
-
}
|
|
1
|
+
:host {
|
|
2
|
+
display: inline-flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
cursor: var(--kritzel-global-pointer-cursor, pointer);
|
|
5
|
+
outline: none;
|
|
6
|
+
z-index: 1;
|
|
7
|
+
-webkit-tap-highlight-color: transparent;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
:host(:focus-visible) .toggle-track {
|
|
11
|
+
box-shadow: 0 0 0 2px var(--kritzel-global-focus-ring-color, rgba(0, 122, 255, 0.3));
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
:host(.disabled) {
|
|
15
|
+
opacity: 0.5;
|
|
16
|
+
pointer-events: none;
|
|
17
|
+
cursor: default;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.toggle-track {
|
|
21
|
+
position: relative;
|
|
22
|
+
width: var(--kritzel-slide-toggle-width, 40px);
|
|
23
|
+
height: var(--kritzel-slide-toggle-height, 22px);
|
|
24
|
+
background-color: var(--kritzel-slide-toggle-track-color, #ccc);
|
|
25
|
+
border-radius: var(--kritzel-slide-toggle-border-radius, 11px);
|
|
26
|
+
transition: background-color var(--kritzel-slide-toggle-transition-duration, 0.2s) ease;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
:host(.checked) .toggle-track {
|
|
30
|
+
background-color: var(--kritzel-slide-toggle-track-checked-color, #007AFF);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.toggle-thumb {
|
|
34
|
+
position: absolute;
|
|
35
|
+
top: 50%;
|
|
36
|
+
left: 2px;
|
|
37
|
+
transform: translateY(-50%);
|
|
38
|
+
width: var(--kritzel-slide-toggle-thumb-size, 18px);
|
|
39
|
+
height: var(--kritzel-slide-toggle-thumb-size, 18px);
|
|
40
|
+
background-color: var(--kritzel-slide-toggle-thumb-color, #fff);
|
|
41
|
+
border-radius: 50%;
|
|
42
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
|
|
43
|
+
transition: left var(--kritzel-slide-toggle-transition-duration, 0.2s) ease;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
:host(.checked) .toggle-thumb {
|
|
47
|
+
left: calc(var(--kritzel-slide-toggle-width, 40px) - var(--kritzel-slide-toggle-thumb-size, 18px) - 2px);
|
|
48
|
+
}
|
|
@@ -21,7 +21,7 @@ export class KritzelSlideToggle {
|
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
23
|
render() {
|
|
24
|
-
return (h(Host, { key: '
|
|
24
|
+
return (h(Host, { key: 'abd4c432048b99aa83a53f4ea500aa87bf903c15', 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: '6d7f8e656dad480edfce8f4e692a69bf1c0eb91b', class: "toggle-track" }, h("div", { key: '0729a7df4032cd9bb713a6c0e13fc2023c6f2670', class: "toggle-thumb" }))));
|
|
25
25
|
}
|
|
26
26
|
static get is() { return "kritzel-slide-toggle"; }
|
|
27
27
|
static get encapsulation() { return "shadow"; }
|