@everymatrix/general-input 1.22.9 → 1.23.1

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.
Files changed (40) hide show
  1. package/dist/cjs/checkbox-group-input_10.cjs.entry.js +11796 -12326
  2. package/dist/cjs/toggle-checkbox-input.cjs.entry.js +1 -1
  3. package/dist/collection/components/checkbox-group-input/checkbox-group-input.css +5 -5
  4. package/dist/collection/components/checkbox-input/checkbox-input.css +5 -5
  5. package/dist/collection/components/date-input/date-input.css +18 -18
  6. package/dist/collection/components/email-input/email-input.css +20 -20
  7. package/dist/collection/components/number-input/number-input.css +18 -18
  8. package/dist/collection/components/password-input/password-input.css +24 -24
  9. package/dist/collection/components/radio-input/radio-input.css +4 -4
  10. package/dist/collection/components/select-input/select-input.css +16 -17
  11. package/dist/collection/components/tel-input/tel-input.css +19 -21
  12. package/dist/collection/components/text-input/text-input.css +20 -21
  13. package/dist/collection/components/toggle-checkbox-input/toggle-checkbox-input.css +5 -5
  14. package/dist/components/active-mixin.js +6 -6
  15. package/dist/components/checkbox-group-input2.js +308 -261
  16. package/dist/components/checkbox-input2.js +1 -1
  17. package/dist/components/date-input2.js +2207 -3450
  18. package/dist/components/email-input2.js +1 -1
  19. package/dist/components/field-mixin.js +2512 -2226
  20. package/dist/components/general-input2.js +1 -1
  21. package/dist/components/input-field-shared-styles.js +211 -308
  22. package/dist/components/number-input2.js +1 -1
  23. package/dist/components/password-input2.js +73 -120
  24. package/dist/components/pattern-mixin.js +85 -0
  25. package/dist/components/radio-input2.js +1 -1
  26. package/dist/components/select-input2.js +1 -1
  27. package/dist/components/tel-input2.js +1 -1
  28. package/dist/components/text-input2.js +1 -1
  29. package/dist/components/vaadin-button.js +73 -102
  30. package/dist/components/vaadin-combo-box.js +808 -991
  31. package/dist/components/virtual-keyboard-controller.js +1768 -1111
  32. package/dist/esm/checkbox-group-input_10.entry.js +11796 -12326
  33. package/dist/esm/toggle-checkbox-input.entry.js +1 -1
  34. package/dist/general-input/general-input.esm.js +1 -1
  35. package/dist/general-input/p-d6a5269a.entry.js +1 -0
  36. package/dist/general-input/p-f6fb389c.entry.js +3581 -0
  37. package/package.json +1 -1
  38. package/dist/general-input/p-2b4be21a.entry.js +0 -3646
  39. package/dist/general-input/p-916a1319.entry.js +0 -1
  40. /package/dist/types/Users/{adrian.pripon/Documents/Work → sebastian.strulea/Documents/work}/widgets-stencil/packages/general-input/.stencil/packages/general-input/stencil.config.d.ts +0 -0
@@ -1,4 +1,4 @@
1
- import { i, r as registerStyles, Q as TabindexMixin, l as FocusMixin, E as ElementMixin, g as ThemableMixin, H as ControllerMixin, P as PolymerElement, T as TooltipController, f as defineCustomElement, h as html } from './field-mixin.js';
1
+ import { i, r as registerStyles, N as TabindexMixin, l as FocusMixin, E as ElementMixin, T as ThemableMixin, C as ControllerMixin, P as PolymerElement, h as html, g as TooltipController } from './field-mixin.js';
2
2
  import { A as ActiveMixin } from './active-mixin.js';
3
3
 
4
4
  const button = i`
@@ -21,7 +21,6 @@ const button = i`
21
21
  -webkit-tap-highlight-color: transparent;
22
22
  -webkit-font-smoothing: antialiased;
23
23
  -moz-osx-font-smoothing: grayscale;
24
- flex-shrink: 0;
25
24
  }
26
25
 
27
26
  /* Set only for the internal parts so we don't affect the host vertical alignment */
@@ -52,7 +51,10 @@ const button = i`
52
51
  /* We rely on the host always being relative */
53
52
  position: absolute;
54
53
  z-index: 1;
55
- inset: 0;
54
+ top: 0;
55
+ right: 0;
56
+ bottom: 0;
57
+ left: 0;
56
58
  background-color: currentColor;
57
59
  border-radius: inherit;
58
60
  opacity: 0;
@@ -197,14 +199,16 @@ const button = i`
197
199
 
198
200
  /* Icons */
199
201
 
200
- [part] ::slotted(vaadin-icon) {
202
+ [part] ::slotted(vaadin-icon),
203
+ [part] ::slotted(iron-icon) {
201
204
  display: inline-block;
202
205
  width: var(--lumo-icon-size-m);
203
206
  height: var(--lumo-icon-size-m);
204
207
  }
205
208
 
206
209
  /* Vaadin icons are based on a 16x16 grid (unlike Lumo and Material icons with 24x24), so they look too big by default */
207
- [part] ::slotted(vaadin-icon[icon^='vaadin:']) {
210
+ [part] ::slotted(vaadin-icon[icon^='vaadin:']),
211
+ [part] ::slotted(iron-icon[icon^='vaadin:']) {
208
212
  padding: 0.25em;
209
213
  box-sizing: border-box !important;
210
214
  }
@@ -256,90 +260,7 @@ registerStyles('vaadin-button', button, { moduleId: 'lumo-button' });
256
260
 
257
261
  /**
258
262
  * @license
259
- * Copyright (c) 2017 - 2023 Vaadin Ltd.
260
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
261
- */
262
-
263
- const buttonStyles = i`
264
- :host {
265
- display: inline-block;
266
- position: relative;
267
- outline: none;
268
- white-space: nowrap;
269
- -webkit-user-select: none;
270
- -moz-user-select: none;
271
- user-select: none;
272
- }
273
-
274
- :host([hidden]) {
275
- display: none !important;
276
- }
277
-
278
- /* Aligns the button with form fields when placed on the same line.
279
- Note, to make it work, the form fields should have the same "::before" pseudo-element. */
280
- .vaadin-button-container::before {
281
- content: '\\2003';
282
- display: inline-block;
283
- width: 0;
284
- max-height: 100%;
285
- }
286
-
287
- .vaadin-button-container {
288
- display: inline-flex;
289
- align-items: center;
290
- justify-content: center;
291
- text-align: center;
292
- width: 100%;
293
- height: 100%;
294
- min-height: inherit;
295
- text-shadow: inherit;
296
- }
297
-
298
- [part='prefix'],
299
- [part='suffix'] {
300
- flex: none;
301
- }
302
-
303
- [part='label'] {
304
- white-space: nowrap;
305
- overflow: hidden;
306
- text-overflow: ellipsis;
307
- }
308
-
309
- @media (forced-colors: active) {
310
- :host {
311
- outline: 1px solid;
312
- outline-offset: -1px;
313
- }
314
-
315
- :host([focused]) {
316
- outline-width: 2px;
317
- }
318
-
319
- :host([disabled]) {
320
- outline-color: GrayText;
321
- }
322
- }
323
- `;
324
-
325
- const buttonTemplate = (html) => html`
326
- <div class="vaadin-button-container">
327
- <span part="prefix" aria-hidden="true">
328
- <slot name="prefix"></slot>
329
- </span>
330
- <span part="label">
331
- <slot></slot>
332
- </span>
333
- <span part="suffix" aria-hidden="true">
334
- <slot name="suffix"></slot>
335
- </span>
336
- </div>
337
- <slot name="tooltip"></slot>
338
- `;
339
-
340
- /**
341
- * @license
342
- * Copyright (c) 2017 - 2023 Vaadin Ltd.
263
+ * Copyright (c) 2017 - 2022 Vaadin Ltd.
343
264
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
344
265
  */
345
266
 
@@ -362,9 +283,7 @@ const ButtonMixin = (superClass) =>
362
283
  * @protected
363
284
  */
364
285
  tabindex: {
365
- type: Number,
366
286
  value: 0,
367
- reflectToAttribute: true,
368
287
  },
369
288
  };
370
289
  }
@@ -410,10 +329,6 @@ const ButtonMixin = (superClass) =>
410
329
  _onKeyDown(event) {
411
330
  super._onKeyDown(event);
412
331
 
413
- if (event.altKey || event.shiftKey || event.ctrlKey || event.metaKey) {
414
- return;
415
- }
416
-
417
332
  if (this._activeKeys.includes(event.key)) {
418
333
  event.preventDefault();
419
334
 
@@ -426,12 +341,10 @@ const ButtonMixin = (superClass) =>
426
341
 
427
342
  /**
428
343
  * @license
429
- * Copyright (c) 2017 - 2023 Vaadin Ltd.
344
+ * Copyright (c) 2017 - 2022 Vaadin Ltd.
430
345
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
431
346
  */
432
347
 
433
- registerStyles('vaadin-button', buttonStyles, { moduleId: 'vaadin-button-styles' });
434
-
435
348
  /**
436
349
  * `<vaadin-button>` is an accessible and customizable button that allows users to perform actions.
437
350
  *
@@ -458,9 +371,8 @@ registerStyles('vaadin-button', buttonStyles, { moduleId: 'vaadin-button-styles'
458
371
  * `focus-ring` | Set when the button is focused using the keyboard.
459
372
  * `focused` | Set when the button is focused.
460
373
  *
461
- * See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.
374
+ * See [Styling Components](https://vaadin.com/docs/latest/styling/custom-theme/styling-components) documentation.
462
375
  *
463
- * @customElement
464
376
  * @extends HTMLElement
465
377
  * @mixes ButtonMixin
466
378
  * @mixes ControllerMixin
@@ -473,7 +385,66 @@ class Button extends ButtonMixin(ElementMixin(ThemableMixin(ControllerMixin(Poly
473
385
  }
474
386
 
475
387
  static get template() {
476
- return buttonTemplate(html);
388
+ return html`
389
+ <style>
390
+ :host {
391
+ display: inline-block;
392
+ position: relative;
393
+ outline: none;
394
+ white-space: nowrap;
395
+ -webkit-user-select: none;
396
+ -moz-user-select: none;
397
+ user-select: none;
398
+ }
399
+
400
+ :host([hidden]) {
401
+ display: none !important;
402
+ }
403
+
404
+ /* Aligns the button with form fields when placed on the same line.
405
+ Note, to make it work, the form fields should have the same "::before" pseudo-element. */
406
+ .vaadin-button-container::before {
407
+ content: '\\2003';
408
+ display: inline-block;
409
+ width: 0;
410
+ max-height: 100%;
411
+ }
412
+
413
+ .vaadin-button-container {
414
+ display: inline-flex;
415
+ align-items: center;
416
+ justify-content: center;
417
+ text-align: center;
418
+ width: 100%;
419
+ height: 100%;
420
+ min-height: inherit;
421
+ text-shadow: inherit;
422
+ }
423
+
424
+ [part='prefix'],
425
+ [part='suffix'] {
426
+ flex: none;
427
+ }
428
+
429
+ [part='label'] {
430
+ white-space: nowrap;
431
+ overflow: hidden;
432
+ text-overflow: ellipsis;
433
+ }
434
+ </style>
435
+ <div class="vaadin-button-container">
436
+ <span part="prefix" aria-hidden="true">
437
+ <slot name="prefix"></slot>
438
+ </span>
439
+ <span part="label">
440
+ <slot></slot>
441
+ </span>
442
+ <span part="suffix" aria-hidden="true">
443
+ <slot name="suffix"></slot>
444
+ </span>
445
+ </div>
446
+ <slot name="tooltip"></slot>
447
+ `;
477
448
  }
478
449
 
479
450
  /** @protected */
@@ -485,6 +456,6 @@ class Button extends ButtonMixin(ElementMixin(ThemableMixin(ControllerMixin(Poly
485
456
  }
486
457
  }
487
458
 
488
- defineCustomElement(Button);
459
+ customElements.define(Button.is, Button);
489
460
 
490
461
  export { Button as B, button as b };