@edugis-org/webmapx 0.1.9 → 0.1.10
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-lib/alert-C_G5X6J8.js +311 -0
- package/dist-lib/button-BlZd3WPH.js +744 -0
- package/dist-lib/checkbox-DB4oPyyw.js +287 -0
- package/dist-lib/chunk.36O46B5H-km1dakSW.js +77 -0
- package/dist-lib/chunk.3RPBFEDE-Cxq6VVR6.js +138 -0
- package/dist-lib/chunk.3Y6SB6QS-DUJ8Ickw.js +18 -0
- package/dist-lib/chunk.5JY5FUCG-CYkzbQXS.js +1071 -0
- package/dist-lib/chunk.6CTB5ZDJ-DjZrBd6Y.js +99 -0
- package/dist-lib/chunk.AJ3ENQ5C-DXVGX5Dn.js +177 -0
- package/dist-lib/chunk.LD4M4QGE-CiCfhE8r.js +8 -0
- package/dist-lib/chunk.NYIIDP5N-B4UCI-rQ.js +34 -0
- package/dist-lib/chunk.RWUUFNUL-DFztA4uV.js +43 -0
- package/dist-lib/chunk.SI4ACBFK-CLb9VfMG.js +61 -0
- package/dist-lib/chunk.YHLNUJ7P-ByKy0MKm.js +251 -0
- package/dist-lib/{decorate-DnZTfaod.js → decorate-CKr8yG1g.js} +1 -1
- package/dist-lib/divider-BOFbR_Ny.js +41 -0
- package/dist-lib/icon-CBNpO1lq.js +9 -0
- package/dist-lib/icon-button-B5rXu3Gg.js +410 -0
- package/dist-lib/input-B212BH6L.js +575 -0
- package/dist-lib/option-BQN9Zz_8.js +1108 -0
- package/dist-lib/spinner-DdcBaa3z.js +6 -0
- package/dist-lib/{toast-BsoXOdeA.js → toast-Bq2PmEpm.js} +1 -1
- package/dist-lib/tooltip-CBGOiZwJ.js +197 -0
- package/dist-lib/{webmapx-3d-tool-CLppA7mK.js → webmapx-3d-tool-CKoLGMpk.js} +2 -2
- package/dist-lib/{webmapx-base-tool-DfRa7TlD.js → webmapx-base-tool-Bc9Wz0yA.js} +1 -1
- package/dist-lib/{webmapx-config-edit-tool-BztWspia.js → webmapx-config-edit-tool-7265_DNz.js} +7 -7
- package/dist-lib/{webmapx-coordinates-tool-DnTSkrRG.js → webmapx-coordinates-tool-nwlckVn6.js} +3 -3
- package/dist-lib/{webmapx-core-bundle-CH-5vYXU.js → webmapx-core-bundle-Q6mWOib1.js} +1579 -671
- package/dist-lib/webmapx-draw-tool-6QRr5Gip.js +4315 -0
- package/dist-lib/{webmapx-geolocation-tool-DIMh2kIr.js → webmapx-geolocation-tool-qxN5aaVB.js} +6 -7
- package/dist-lib/{webmapx-import-layer-tool-DMiC1TpU.js → webmapx-import-layer-tool-tJ374qHR.js} +2 -2
- package/dist-lib/{webmapx-info-tool-D-XbAU9J.js → webmapx-info-tool-C3txgv3v.js} +4 -4
- package/dist-lib/{webmapx-language-osmvector-BAw9TR-M.js → webmapx-language-osmvector-jQzTOPU1.js} +3 -4
- package/dist-lib/{webmapx-measure-tool-CXlg11s8.js → webmapx-measure-tool-Cxxrzgdf.js} +4 -4
- package/dist-lib/{webmapx-modal-tool-Cs7LRrgW.js → webmapx-modal-tool-DQVHNXqX.js} +2 -2
- package/dist-lib/{webmapx-plugin-tool-qe2yTrWB.js → webmapx-plugin-tool-BNZ61x6s.js} +1 -1
- package/dist-lib/{webmapx-print-tool-DrK9sLC7.js → webmapx-print-tool-BDOTbS6u.js} +7 -8
- package/dist-lib/{webmapx-search-tool-H7NisgWH.js → webmapx-search-tool-CHlsE2Wx.js} +2 -2
- package/dist-lib/webmapx-settings-B0AT9Vjn.js +482 -0
- package/dist-lib/{webmapx-truearea-tool-CSU9mE1D.js → webmapx-truearea-tool-dxSgcbOj.js} +2 -2
- package/dist-lib/{webmapx-view-mode-tool-D1QyQfq8.js → webmapx-view-mode-tool-DVSMakdh.js} +2 -2
- package/dist-lib/webmapx.js +312 -311
- package/package.json +1 -1
- package/dist-lib/webmapx-draw-tool-DxQgUF1Q.js +0 -2117
- package/dist-lib/webmapx-settings-EHSm-AGU.js +0 -167
|
@@ -0,0 +1,575 @@
|
|
|
1
|
+
import { a as e, i as t, n, r, t as i } from "./chunk.YHLNUJ7P-ByKy0MKm.js";
|
|
2
|
+
import { t as a } from "./chunk.NYIIDP5N-B4UCI-rQ.js";
|
|
3
|
+
import { t as o } from "./chunk.6CTB5ZDJ-DjZrBd6Y.js";
|
|
4
|
+
import { t as s } from "./chunk.3RPBFEDE-Cxq6VVR6.js";
|
|
5
|
+
import { t as c } from "./chunk.SI4ACBFK-CLb9VfMG.js";
|
|
6
|
+
import { css as l, defaultConverter as u, html as d } from "lit";
|
|
7
|
+
import { property as f, query as p, state as m } from "lit/decorators.js";
|
|
8
|
+
import { classMap as h } from "lit/directives/class-map.js";
|
|
9
|
+
import { ifDefined as g } from "lit/directives/if-defined.js";
|
|
10
|
+
import { live as _ } from "lit/directives/live.js";
|
|
11
|
+
//#region node_modules/@shoelace-style/shoelace/dist/chunks/chunk.GI7VDIWX.js
|
|
12
|
+
var v = (e = "value") => (t, n) => {
|
|
13
|
+
let r = t.constructor, i = r.prototype.attributeChangedCallback;
|
|
14
|
+
r.prototype.attributeChangedCallback = function(t, a, o) {
|
|
15
|
+
let s = r.getPropertyOptions(e);
|
|
16
|
+
if (t === (typeof s.attribute == "string" ? s.attribute : e)) {
|
|
17
|
+
let t = s.converter || u, r = (typeof t == "function" ? t : t?.fromAttribute ?? u.fromAttribute)(o, s.type);
|
|
18
|
+
this[e] !== r && (this[n] = r);
|
|
19
|
+
}
|
|
20
|
+
i.call(this, t, a, o);
|
|
21
|
+
};
|
|
22
|
+
}, y = l`
|
|
23
|
+
:host {
|
|
24
|
+
display: block;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.input {
|
|
28
|
+
flex: 1 1 auto;
|
|
29
|
+
display: inline-flex;
|
|
30
|
+
align-items: stretch;
|
|
31
|
+
justify-content: start;
|
|
32
|
+
position: relative;
|
|
33
|
+
width: 100%;
|
|
34
|
+
font-family: var(--sl-input-font-family);
|
|
35
|
+
font-weight: var(--sl-input-font-weight);
|
|
36
|
+
letter-spacing: var(--sl-input-letter-spacing);
|
|
37
|
+
vertical-align: middle;
|
|
38
|
+
overflow: hidden;
|
|
39
|
+
cursor: text;
|
|
40
|
+
transition:
|
|
41
|
+
var(--sl-transition-fast) color,
|
|
42
|
+
var(--sl-transition-fast) border,
|
|
43
|
+
var(--sl-transition-fast) box-shadow,
|
|
44
|
+
var(--sl-transition-fast) background-color;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/* Standard inputs */
|
|
48
|
+
.input--standard {
|
|
49
|
+
background-color: var(--sl-input-background-color);
|
|
50
|
+
border: solid var(--sl-input-border-width) var(--sl-input-border-color);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.input--standard:hover:not(.input--disabled) {
|
|
54
|
+
background-color: var(--sl-input-background-color-hover);
|
|
55
|
+
border-color: var(--sl-input-border-color-hover);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.input--standard.input--focused:not(.input--disabled) {
|
|
59
|
+
background-color: var(--sl-input-background-color-focus);
|
|
60
|
+
border-color: var(--sl-input-border-color-focus);
|
|
61
|
+
box-shadow: 0 0 0 var(--sl-focus-ring-width) var(--sl-input-focus-ring-color);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.input--standard.input--focused:not(.input--disabled) .input__control {
|
|
65
|
+
color: var(--sl-input-color-focus);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.input--standard.input--disabled {
|
|
69
|
+
background-color: var(--sl-input-background-color-disabled);
|
|
70
|
+
border-color: var(--sl-input-border-color-disabled);
|
|
71
|
+
opacity: 0.5;
|
|
72
|
+
cursor: not-allowed;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.input--standard.input--disabled .input__control {
|
|
76
|
+
color: var(--sl-input-color-disabled);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.input--standard.input--disabled .input__control::placeholder {
|
|
80
|
+
color: var(--sl-input-placeholder-color-disabled);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/* Filled inputs */
|
|
84
|
+
.input--filled {
|
|
85
|
+
border: none;
|
|
86
|
+
background-color: var(--sl-input-filled-background-color);
|
|
87
|
+
color: var(--sl-input-color);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.input--filled:hover:not(.input--disabled) {
|
|
91
|
+
background-color: var(--sl-input-filled-background-color-hover);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.input--filled.input--focused:not(.input--disabled) {
|
|
95
|
+
background-color: var(--sl-input-filled-background-color-focus);
|
|
96
|
+
outline: var(--sl-focus-ring);
|
|
97
|
+
outline-offset: var(--sl-focus-ring-offset);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.input--filled.input--disabled {
|
|
101
|
+
background-color: var(--sl-input-filled-background-color-disabled);
|
|
102
|
+
opacity: 0.5;
|
|
103
|
+
cursor: not-allowed;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.input__control {
|
|
107
|
+
flex: 1 1 auto;
|
|
108
|
+
font-family: inherit;
|
|
109
|
+
font-size: inherit;
|
|
110
|
+
font-weight: inherit;
|
|
111
|
+
min-width: 0;
|
|
112
|
+
height: 100%;
|
|
113
|
+
color: var(--sl-input-color);
|
|
114
|
+
border: none;
|
|
115
|
+
background: inherit;
|
|
116
|
+
box-shadow: none;
|
|
117
|
+
padding: 0;
|
|
118
|
+
margin: 0;
|
|
119
|
+
cursor: inherit;
|
|
120
|
+
-webkit-appearance: none;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.input__control::-webkit-search-decoration,
|
|
124
|
+
.input__control::-webkit-search-cancel-button,
|
|
125
|
+
.input__control::-webkit-search-results-button,
|
|
126
|
+
.input__control::-webkit-search-results-decoration {
|
|
127
|
+
-webkit-appearance: none;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.input__control:-webkit-autofill,
|
|
131
|
+
.input__control:-webkit-autofill:hover,
|
|
132
|
+
.input__control:-webkit-autofill:focus,
|
|
133
|
+
.input__control:-webkit-autofill:active {
|
|
134
|
+
box-shadow: 0 0 0 var(--sl-input-height-large) var(--sl-input-background-color-hover) inset !important;
|
|
135
|
+
-webkit-text-fill-color: var(--sl-color-primary-500);
|
|
136
|
+
caret-color: var(--sl-input-color);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.input--filled .input__control:-webkit-autofill,
|
|
140
|
+
.input--filled .input__control:-webkit-autofill:hover,
|
|
141
|
+
.input--filled .input__control:-webkit-autofill:focus,
|
|
142
|
+
.input--filled .input__control:-webkit-autofill:active {
|
|
143
|
+
box-shadow: 0 0 0 var(--sl-input-height-large) var(--sl-input-filled-background-color) inset !important;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.input__control::placeholder {
|
|
147
|
+
color: var(--sl-input-placeholder-color);
|
|
148
|
+
user-select: none;
|
|
149
|
+
-webkit-user-select: none;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.input:hover:not(.input--disabled) .input__control {
|
|
153
|
+
color: var(--sl-input-color-hover);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.input__control:focus {
|
|
157
|
+
outline: none;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.input__prefix,
|
|
161
|
+
.input__suffix {
|
|
162
|
+
display: inline-flex;
|
|
163
|
+
flex: 0 0 auto;
|
|
164
|
+
align-items: center;
|
|
165
|
+
cursor: default;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.input__prefix ::slotted(sl-icon),
|
|
169
|
+
.input__suffix ::slotted(sl-icon) {
|
|
170
|
+
color: var(--sl-input-icon-color);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/*
|
|
174
|
+
* Size modifiers
|
|
175
|
+
*/
|
|
176
|
+
|
|
177
|
+
.input--small {
|
|
178
|
+
border-radius: var(--sl-input-border-radius-small);
|
|
179
|
+
font-size: var(--sl-input-font-size-small);
|
|
180
|
+
height: var(--sl-input-height-small);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.input--small .input__control {
|
|
184
|
+
height: calc(var(--sl-input-height-small) - var(--sl-input-border-width) * 2);
|
|
185
|
+
padding: 0 var(--sl-input-spacing-small);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.input--small .input__clear,
|
|
189
|
+
.input--small .input__password-toggle {
|
|
190
|
+
width: calc(1em + var(--sl-input-spacing-small) * 2);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.input--small .input__prefix ::slotted(*) {
|
|
194
|
+
margin-inline-start: var(--sl-input-spacing-small);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.input--small .input__suffix ::slotted(*) {
|
|
198
|
+
margin-inline-end: var(--sl-input-spacing-small);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.input--medium {
|
|
202
|
+
border-radius: var(--sl-input-border-radius-medium);
|
|
203
|
+
font-size: var(--sl-input-font-size-medium);
|
|
204
|
+
height: var(--sl-input-height-medium);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.input--medium .input__control {
|
|
208
|
+
height: calc(var(--sl-input-height-medium) - var(--sl-input-border-width) * 2);
|
|
209
|
+
padding: 0 var(--sl-input-spacing-medium);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.input--medium .input__clear,
|
|
213
|
+
.input--medium .input__password-toggle {
|
|
214
|
+
width: calc(1em + var(--sl-input-spacing-medium) * 2);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.input--medium .input__prefix ::slotted(*) {
|
|
218
|
+
margin-inline-start: var(--sl-input-spacing-medium);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.input--medium .input__suffix ::slotted(*) {
|
|
222
|
+
margin-inline-end: var(--sl-input-spacing-medium);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.input--large {
|
|
226
|
+
border-radius: var(--sl-input-border-radius-large);
|
|
227
|
+
font-size: var(--sl-input-font-size-large);
|
|
228
|
+
height: var(--sl-input-height-large);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
.input--large .input__control {
|
|
232
|
+
height: calc(var(--sl-input-height-large) - var(--sl-input-border-width) * 2);
|
|
233
|
+
padding: 0 var(--sl-input-spacing-large);
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.input--large .input__clear,
|
|
237
|
+
.input--large .input__password-toggle {
|
|
238
|
+
width: calc(1em + var(--sl-input-spacing-large) * 2);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.input--large .input__prefix ::slotted(*) {
|
|
242
|
+
margin-inline-start: var(--sl-input-spacing-large);
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
.input--large .input__suffix ::slotted(*) {
|
|
246
|
+
margin-inline-end: var(--sl-input-spacing-large);
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
/*
|
|
250
|
+
* Pill modifier
|
|
251
|
+
*/
|
|
252
|
+
|
|
253
|
+
.input--pill.input--small {
|
|
254
|
+
border-radius: var(--sl-input-height-small);
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.input--pill.input--medium {
|
|
258
|
+
border-radius: var(--sl-input-height-medium);
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
.input--pill.input--large {
|
|
262
|
+
border-radius: var(--sl-input-height-large);
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
/*
|
|
266
|
+
* Clearable + Password Toggle
|
|
267
|
+
*/
|
|
268
|
+
|
|
269
|
+
.input__clear,
|
|
270
|
+
.input__password-toggle {
|
|
271
|
+
display: inline-flex;
|
|
272
|
+
align-items: center;
|
|
273
|
+
justify-content: center;
|
|
274
|
+
font-size: inherit;
|
|
275
|
+
color: var(--sl-input-icon-color);
|
|
276
|
+
border: none;
|
|
277
|
+
background: none;
|
|
278
|
+
padding: 0;
|
|
279
|
+
transition: var(--sl-transition-fast) color;
|
|
280
|
+
cursor: pointer;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
.input__clear:hover,
|
|
284
|
+
.input__password-toggle:hover {
|
|
285
|
+
color: var(--sl-input-icon-color-hover);
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
.input__clear:focus,
|
|
289
|
+
.input__password-toggle:focus {
|
|
290
|
+
outline: none;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
/* Don't show the browser's password toggle in Edge */
|
|
294
|
+
::-ms-reveal {
|
|
295
|
+
display: none;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
/* Hide the built-in number spinner */
|
|
299
|
+
.input--no-spin-buttons input[type='number']::-webkit-outer-spin-button,
|
|
300
|
+
.input--no-spin-buttons input[type='number']::-webkit-inner-spin-button {
|
|
301
|
+
-webkit-appearance: none;
|
|
302
|
+
display: none;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
.input--no-spin-buttons input[type='number'] {
|
|
306
|
+
-moz-appearance: textfield;
|
|
307
|
+
}
|
|
308
|
+
`, b = class extends n {
|
|
309
|
+
constructor() {
|
|
310
|
+
super(...arguments), this.formControlController = new s(this, { assumeInteractionOn: ["sl-blur", "sl-input"] }), this.hasSlotController = new a(this, "help-text", "label"), this.localize = new o(this), this.hasFocus = !1, this.title = "", this.__numberInput = Object.assign(document.createElement("input"), { type: "number" }), this.__dateInput = Object.assign(document.createElement("input"), { type: "date" }), this.type = "text", this.name = "", this.value = "", this.defaultValue = "", this.size = "medium", this.filled = !1, this.pill = !1, this.label = "", this.helpText = "", this.clearable = !1, this.disabled = !1, this.placeholder = "", this.readonly = !1, this.passwordToggle = !1, this.passwordVisible = !1, this.noSpinButtons = !1, this.form = "", this.required = !1, this.spellcheck = !0;
|
|
311
|
+
}
|
|
312
|
+
get valueAsDate() {
|
|
313
|
+
return this.__dateInput.type = this.type, this.__dateInput.value = this.value, this.input?.valueAsDate || this.__dateInput.valueAsDate;
|
|
314
|
+
}
|
|
315
|
+
set valueAsDate(e) {
|
|
316
|
+
this.__dateInput.type = this.type, this.__dateInput.valueAsDate = e, this.value = this.__dateInput.value;
|
|
317
|
+
}
|
|
318
|
+
get valueAsNumber() {
|
|
319
|
+
return this.__numberInput.value = this.value, this.input?.valueAsNumber || this.__numberInput.valueAsNumber;
|
|
320
|
+
}
|
|
321
|
+
set valueAsNumber(e) {
|
|
322
|
+
this.__numberInput.valueAsNumber = e, this.value = this.__numberInput.value;
|
|
323
|
+
}
|
|
324
|
+
get validity() {
|
|
325
|
+
return this.input.validity;
|
|
326
|
+
}
|
|
327
|
+
get validationMessage() {
|
|
328
|
+
return this.input.validationMessage;
|
|
329
|
+
}
|
|
330
|
+
firstUpdated() {
|
|
331
|
+
this.formControlController.updateValidity();
|
|
332
|
+
}
|
|
333
|
+
handleBlur() {
|
|
334
|
+
this.hasFocus = !1, this.emit("sl-blur");
|
|
335
|
+
}
|
|
336
|
+
handleChange() {
|
|
337
|
+
this.value = this.input.value, this.emit("sl-change");
|
|
338
|
+
}
|
|
339
|
+
handleClearClick(e) {
|
|
340
|
+
e.preventDefault(), this.value !== "" && (this.value = "", this.emit("sl-clear"), this.emit("sl-input"), this.emit("sl-change")), this.input.focus();
|
|
341
|
+
}
|
|
342
|
+
handleFocus() {
|
|
343
|
+
this.hasFocus = !0, this.emit("sl-focus");
|
|
344
|
+
}
|
|
345
|
+
handleInput() {
|
|
346
|
+
this.value = this.input.value, this.formControlController.updateValidity(), this.emit("sl-input");
|
|
347
|
+
}
|
|
348
|
+
handleInvalid(e) {
|
|
349
|
+
this.formControlController.setValidity(!1), this.formControlController.emitInvalidEvent(e);
|
|
350
|
+
}
|
|
351
|
+
handleKeyDown(e) {
|
|
352
|
+
let t = e.metaKey || e.ctrlKey || e.shiftKey || e.altKey;
|
|
353
|
+
e.key === "Enter" && !t && setTimeout(() => {
|
|
354
|
+
!e.defaultPrevented && !e.isComposing && this.formControlController.submit();
|
|
355
|
+
});
|
|
356
|
+
}
|
|
357
|
+
handlePasswordToggle() {
|
|
358
|
+
this.passwordVisible = !this.passwordVisible;
|
|
359
|
+
}
|
|
360
|
+
handleDisabledChange() {
|
|
361
|
+
this.formControlController.setValidity(this.disabled);
|
|
362
|
+
}
|
|
363
|
+
handleStepChange() {
|
|
364
|
+
this.input.step = String(this.step), this.formControlController.updateValidity();
|
|
365
|
+
}
|
|
366
|
+
async handleValueChange() {
|
|
367
|
+
await this.updateComplete, this.formControlController.updateValidity();
|
|
368
|
+
}
|
|
369
|
+
focus(e) {
|
|
370
|
+
this.input.focus(e);
|
|
371
|
+
}
|
|
372
|
+
blur() {
|
|
373
|
+
this.input.blur();
|
|
374
|
+
}
|
|
375
|
+
select() {
|
|
376
|
+
this.input.select();
|
|
377
|
+
}
|
|
378
|
+
setSelectionRange(e, t, n = "none") {
|
|
379
|
+
this.input.setSelectionRange(e, t, n);
|
|
380
|
+
}
|
|
381
|
+
setRangeText(e, t, n, r = "preserve") {
|
|
382
|
+
let i = t ?? this.input.selectionStart, a = n ?? this.input.selectionEnd;
|
|
383
|
+
this.input.setRangeText(e, i, a, r), this.value !== this.input.value && (this.value = this.input.value);
|
|
384
|
+
}
|
|
385
|
+
showPicker() {
|
|
386
|
+
"showPicker" in HTMLInputElement.prototype && this.input.showPicker();
|
|
387
|
+
}
|
|
388
|
+
stepUp() {
|
|
389
|
+
this.input.stepUp(), this.value !== this.input.value && (this.value = this.input.value);
|
|
390
|
+
}
|
|
391
|
+
stepDown() {
|
|
392
|
+
this.input.stepDown(), this.value !== this.input.value && (this.value = this.input.value);
|
|
393
|
+
}
|
|
394
|
+
checkValidity() {
|
|
395
|
+
return this.input.checkValidity();
|
|
396
|
+
}
|
|
397
|
+
getForm() {
|
|
398
|
+
return this.formControlController.getForm();
|
|
399
|
+
}
|
|
400
|
+
reportValidity() {
|
|
401
|
+
return this.input.reportValidity();
|
|
402
|
+
}
|
|
403
|
+
setCustomValidity(e) {
|
|
404
|
+
this.input.setCustomValidity(e), this.formControlController.updateValidity();
|
|
405
|
+
}
|
|
406
|
+
render() {
|
|
407
|
+
let e = this.hasSlotController.test("label"), t = this.hasSlotController.test("help-text"), n = this.label ? !0 : !!e, r = this.helpText ? !0 : !!t, i = this.clearable && !this.disabled && !this.readonly && (typeof this.value == "number" || this.value.length > 0);
|
|
408
|
+
return d`
|
|
409
|
+
<div
|
|
410
|
+
part="form-control"
|
|
411
|
+
class=${h({
|
|
412
|
+
"form-control": !0,
|
|
413
|
+
"form-control--small": this.size === "small",
|
|
414
|
+
"form-control--medium": this.size === "medium",
|
|
415
|
+
"form-control--large": this.size === "large",
|
|
416
|
+
"form-control--has-label": n,
|
|
417
|
+
"form-control--has-help-text": r
|
|
418
|
+
})}
|
|
419
|
+
>
|
|
420
|
+
<label
|
|
421
|
+
part="form-control-label"
|
|
422
|
+
class="form-control__label"
|
|
423
|
+
for="input"
|
|
424
|
+
aria-hidden=${n ? "false" : "true"}
|
|
425
|
+
>
|
|
426
|
+
<slot name="label">${this.label}</slot>
|
|
427
|
+
</label>
|
|
428
|
+
|
|
429
|
+
<div part="form-control-input" class="form-control-input">
|
|
430
|
+
<div
|
|
431
|
+
part="base"
|
|
432
|
+
class=${h({
|
|
433
|
+
input: !0,
|
|
434
|
+
"input--small": this.size === "small",
|
|
435
|
+
"input--medium": this.size === "medium",
|
|
436
|
+
"input--large": this.size === "large",
|
|
437
|
+
"input--pill": this.pill,
|
|
438
|
+
"input--standard": !this.filled,
|
|
439
|
+
"input--filled": this.filled,
|
|
440
|
+
"input--disabled": this.disabled,
|
|
441
|
+
"input--focused": this.hasFocus,
|
|
442
|
+
"input--empty": !this.value,
|
|
443
|
+
"input--no-spin-buttons": this.noSpinButtons
|
|
444
|
+
})}
|
|
445
|
+
>
|
|
446
|
+
<span part="prefix" class="input__prefix">
|
|
447
|
+
<slot name="prefix"></slot>
|
|
448
|
+
</span>
|
|
449
|
+
|
|
450
|
+
<input
|
|
451
|
+
part="input"
|
|
452
|
+
id="input"
|
|
453
|
+
class="input__control"
|
|
454
|
+
type=${this.type === "password" && this.passwordVisible ? "text" : this.type}
|
|
455
|
+
title=${this.title}
|
|
456
|
+
name=${g(this.name)}
|
|
457
|
+
?disabled=${this.disabled}
|
|
458
|
+
?readonly=${this.readonly}
|
|
459
|
+
?required=${this.required}
|
|
460
|
+
placeholder=${g(this.placeholder)}
|
|
461
|
+
minlength=${g(this.minlength)}
|
|
462
|
+
maxlength=${g(this.maxlength)}
|
|
463
|
+
min=${g(this.min)}
|
|
464
|
+
max=${g(this.max)}
|
|
465
|
+
step=${g(this.step)}
|
|
466
|
+
.value=${_(this.value)}
|
|
467
|
+
autocapitalize=${g(this.autocapitalize)}
|
|
468
|
+
autocomplete=${g(this.autocomplete)}
|
|
469
|
+
autocorrect=${g(this.autocorrect)}
|
|
470
|
+
?autofocus=${this.autofocus}
|
|
471
|
+
spellcheck=${this.spellcheck}
|
|
472
|
+
pattern=${g(this.pattern)}
|
|
473
|
+
enterkeyhint=${g(this.enterkeyhint)}
|
|
474
|
+
inputmode=${g(this.inputmode)}
|
|
475
|
+
aria-describedby="help-text"
|
|
476
|
+
@change=${this.handleChange}
|
|
477
|
+
@input=${this.handleInput}
|
|
478
|
+
@invalid=${this.handleInvalid}
|
|
479
|
+
@keydown=${this.handleKeyDown}
|
|
480
|
+
@focus=${this.handleFocus}
|
|
481
|
+
@blur=${this.handleBlur}
|
|
482
|
+
/>
|
|
483
|
+
|
|
484
|
+
${i ? d`
|
|
485
|
+
<button
|
|
486
|
+
part="clear-button"
|
|
487
|
+
class="input__clear"
|
|
488
|
+
type="button"
|
|
489
|
+
aria-label=${this.localize.term("clearEntry")}
|
|
490
|
+
@click=${this.handleClearClick}
|
|
491
|
+
tabindex="-1"
|
|
492
|
+
>
|
|
493
|
+
<slot name="clear-icon">
|
|
494
|
+
<sl-icon name="x-circle-fill" library="system"></sl-icon>
|
|
495
|
+
</slot>
|
|
496
|
+
</button>
|
|
497
|
+
` : ""}
|
|
498
|
+
${this.passwordToggle && !this.disabled ? d`
|
|
499
|
+
<button
|
|
500
|
+
part="password-toggle-button"
|
|
501
|
+
class="input__password-toggle"
|
|
502
|
+
type="button"
|
|
503
|
+
aria-label=${this.localize.term(this.passwordVisible ? "hidePassword" : "showPassword")}
|
|
504
|
+
@click=${this.handlePasswordToggle}
|
|
505
|
+
tabindex="-1"
|
|
506
|
+
>
|
|
507
|
+
${this.passwordVisible ? d`
|
|
508
|
+
<slot name="show-password-icon">
|
|
509
|
+
<sl-icon name="eye-slash" library="system"></sl-icon>
|
|
510
|
+
</slot>
|
|
511
|
+
` : d`
|
|
512
|
+
<slot name="hide-password-icon">
|
|
513
|
+
<sl-icon name="eye" library="system"></sl-icon>
|
|
514
|
+
</slot>
|
|
515
|
+
`}
|
|
516
|
+
</button>
|
|
517
|
+
` : ""}
|
|
518
|
+
|
|
519
|
+
<span part="suffix" class="input__suffix">
|
|
520
|
+
<slot name="suffix"></slot>
|
|
521
|
+
</span>
|
|
522
|
+
</div>
|
|
523
|
+
</div>
|
|
524
|
+
|
|
525
|
+
<div
|
|
526
|
+
part="form-control-help-text"
|
|
527
|
+
id="help-text"
|
|
528
|
+
class="form-control__help-text"
|
|
529
|
+
aria-hidden=${r ? "false" : "true"}
|
|
530
|
+
>
|
|
531
|
+
<slot name="help-text">${this.helpText}</slot>
|
|
532
|
+
</div>
|
|
533
|
+
</div>
|
|
534
|
+
`;
|
|
535
|
+
}
|
|
536
|
+
};
|
|
537
|
+
//#endregion
|
|
538
|
+
//#region node_modules/@shoelace-style/shoelace/dist/chunks/chunk.XA43ZQPC.js
|
|
539
|
+
b.styles = [
|
|
540
|
+
r,
|
|
541
|
+
c,
|
|
542
|
+
y
|
|
543
|
+
], b.dependencies = { "sl-icon": i }, e([p(".input__control")], b.prototype, "input", 2), e([m()], b.prototype, "hasFocus", 2), e([f()], b.prototype, "title", 2), e([f({ reflect: !0 })], b.prototype, "type", 2), e([f()], b.prototype, "name", 2), e([f()], b.prototype, "value", 2), e([v()], b.prototype, "defaultValue", 2), e([f({ reflect: !0 })], b.prototype, "size", 2), e([f({
|
|
544
|
+
type: Boolean,
|
|
545
|
+
reflect: !0
|
|
546
|
+
})], b.prototype, "filled", 2), e([f({
|
|
547
|
+
type: Boolean,
|
|
548
|
+
reflect: !0
|
|
549
|
+
})], b.prototype, "pill", 2), e([f()], b.prototype, "label", 2), e([f({ attribute: "help-text" })], b.prototype, "helpText", 2), e([f({ type: Boolean })], b.prototype, "clearable", 2), e([f({
|
|
550
|
+
type: Boolean,
|
|
551
|
+
reflect: !0
|
|
552
|
+
})], b.prototype, "disabled", 2), e([f()], b.prototype, "placeholder", 2), e([f({
|
|
553
|
+
type: Boolean,
|
|
554
|
+
reflect: !0
|
|
555
|
+
})], b.prototype, "readonly", 2), e([f({
|
|
556
|
+
attribute: "password-toggle",
|
|
557
|
+
type: Boolean
|
|
558
|
+
})], b.prototype, "passwordToggle", 2), e([f({
|
|
559
|
+
attribute: "password-visible",
|
|
560
|
+
type: Boolean
|
|
561
|
+
})], b.prototype, "passwordVisible", 2), e([f({
|
|
562
|
+
attribute: "no-spin-buttons",
|
|
563
|
+
type: Boolean
|
|
564
|
+
})], b.prototype, "noSpinButtons", 2), e([f({ reflect: !0 })], b.prototype, "form", 2), e([f({
|
|
565
|
+
type: Boolean,
|
|
566
|
+
reflect: !0
|
|
567
|
+
})], b.prototype, "required", 2), e([f()], b.prototype, "pattern", 2), e([f({ type: Number })], b.prototype, "minlength", 2), e([f({ type: Number })], b.prototype, "maxlength", 2), e([f()], b.prototype, "min", 2), e([f()], b.prototype, "max", 2), e([f()], b.prototype, "step", 2), e([f()], b.prototype, "autocapitalize", 2), e([f()], b.prototype, "autocorrect", 2), e([f()], b.prototype, "autocomplete", 2), e([f({ type: Boolean })], b.prototype, "autofocus", 2), e([f()], b.prototype, "enterkeyhint", 2), e([f({
|
|
568
|
+
type: Boolean,
|
|
569
|
+
converter: {
|
|
570
|
+
fromAttribute: (e) => !(!e || e === "false"),
|
|
571
|
+
toAttribute: (e) => e ? "true" : "false"
|
|
572
|
+
}
|
|
573
|
+
})], b.prototype, "spellcheck", 2), e([f()], b.prototype, "inputmode", 2), e([t("disabled", { waitUntilFirstUpdate: !0 })], b.prototype, "handleDisabledChange", 1), e([t("step", { waitUntilFirstUpdate: !0 })], b.prototype, "handleStepChange", 1), e([t("value", { waitUntilFirstUpdate: !0 })], b.prototype, "handleValueChange", 1), b.define("sl-input");
|
|
574
|
+
//#endregion
|
|
575
|
+
export { v as n, b as t };
|