@everymatrix/general-input 1.31.1 → 1.32.4

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 (136) hide show
  1. package/LICENSE +21 -0
  2. package/package.json +3 -2
  3. package/dist/cjs/checkbox-group-input_10.cjs.entry.js +0 -36077
  4. package/dist/cjs/general-input.cjs.entry.js +0 -75
  5. package/dist/cjs/general-input.cjs.js +0 -19
  6. package/dist/cjs/index-132a0774.js +0 -1327
  7. package/dist/cjs/index.cjs.js +0 -18
  8. package/dist/cjs/loader.cjs.js +0 -21
  9. package/dist/cjs/locale.utils-cef1d3b6.js +0 -128
  10. package/dist/cjs/toggle-checkbox-input.cjs.entry.js +0 -85
  11. package/dist/cjs/tooltipIcon-092a795f.js +0 -5
  12. package/dist/collection/collection-manifest.json +0 -23
  13. package/dist/collection/components/checkbox-group-input/checkbox-group-input.css +0 -82
  14. package/dist/collection/components/checkbox-group-input/checkbox-group-input.js +0 -366
  15. package/dist/collection/components/checkbox-input/checkbox-input.css +0 -68
  16. package/dist/collection/components/checkbox-input/checkbox-input.js +0 -324
  17. package/dist/collection/components/date-input/date-input.css +0 -101
  18. package/dist/collection/components/date-input/date-input.js +0 -396
  19. package/dist/collection/components/email-input/email-input.css +0 -95
  20. package/dist/collection/components/email-input/email-input.js +0 -403
  21. package/dist/collection/components/general-input/general-input.css +0 -4
  22. package/dist/collection/components/general-input/general-input.js +0 -373
  23. package/dist/collection/components/number-input/number-input.css +0 -102
  24. package/dist/collection/components/number-input/number-input.js +0 -368
  25. package/dist/collection/components/password-input/password-input.css +0 -182
  26. package/dist/collection/components/password-input/password-input.js +0 -527
  27. package/dist/collection/components/radio-input/radio-input.css +0 -43
  28. package/dist/collection/components/radio-input/radio-input.js +0 -297
  29. package/dist/collection/components/select-input/select-input.css +0 -122
  30. package/dist/collection/components/select-input/select-input.js +0 -429
  31. package/dist/collection/components/tel-input/tel-input.css +0 -145
  32. package/dist/collection/components/tel-input/tel-input.js +0 -440
  33. package/dist/collection/components/text-input/text-input.css +0 -98
  34. package/dist/collection/components/text-input/text-input.js +0 -448
  35. package/dist/collection/components/toggle-checkbox-input/toggle-checkbox-input.css +0 -82
  36. package/dist/collection/components/toggle-checkbox-input/toggle-checkbox-input.js +0 -324
  37. package/dist/collection/index.js +0 -17
  38. package/dist/collection/utils/locale.utils.js +0 -123
  39. package/dist/collection/utils/tooltipIcon.svg +0 -5
  40. package/dist/collection/utils/types.js +0 -1
  41. package/dist/collection/utils/utils.js +0 -5
  42. package/dist/components/active-mixin.js +0 -975
  43. package/dist/components/checkbox-group-input.d.ts +0 -11
  44. package/dist/components/checkbox-group-input.js +0 -6
  45. package/dist/components/checkbox-group-input2.js +0 -1078
  46. package/dist/components/checkbox-input.d.ts +0 -11
  47. package/dist/components/checkbox-input.js +0 -6
  48. package/dist/components/checkbox-input2.js +0 -129
  49. package/dist/components/date-input.d.ts +0 -11
  50. package/dist/components/date-input.js +0 -6
  51. package/dist/components/date-input2.js +0 -11556
  52. package/dist/components/email-input.d.ts +0 -11
  53. package/dist/components/email-input.js +0 -6
  54. package/dist/components/email-input2.js +0 -171
  55. package/dist/components/field-mixin.js +0 -12426
  56. package/dist/components/general-input.d.ts +0 -11
  57. package/dist/components/general-input.js +0 -6
  58. package/dist/components/general-input2.js +0 -341
  59. package/dist/components/index.d.ts +0 -26
  60. package/dist/components/index.js +0 -18
  61. package/dist/components/input-field-shared-styles.js +0 -1211
  62. package/dist/components/number-input.d.ts +0 -11
  63. package/dist/components/number-input.js +0 -6
  64. package/dist/components/number-input2.js +0 -158
  65. package/dist/components/password-input.d.ts +0 -11
  66. package/dist/components/password-input.js +0 -6
  67. package/dist/components/password-input2.js +0 -1041
  68. package/dist/components/radio-input.d.ts +0 -11
  69. package/dist/components/radio-input.js +0 -6
  70. package/dist/components/radio-input2.js +0 -114
  71. package/dist/components/select-input.d.ts +0 -11
  72. package/dist/components/select-input.js +0 -6
  73. package/dist/components/select-input2.js +0 -183
  74. package/dist/components/tel-input.d.ts +0 -11
  75. package/dist/components/tel-input.js +0 -6
  76. package/dist/components/tel-input2.js +0 -197
  77. package/dist/components/text-input.d.ts +0 -11
  78. package/dist/components/text-input.js +0 -6
  79. package/dist/components/text-input2.js +0 -199
  80. package/dist/components/toggle-checkbox-input.d.ts +0 -11
  81. package/dist/components/toggle-checkbox-input.js +0 -6
  82. package/dist/components/tooltipIcon.js +0 -127
  83. package/dist/components/vaadin-button.js +0 -490
  84. package/dist/components/vaadin-combo-box.js +0 -4512
  85. package/dist/components/virtual-keyboard-controller.js +0 -2001
  86. package/dist/esm/checkbox-group-input_10.entry.js +0 -36064
  87. package/dist/esm/general-input.entry.js +0 -71
  88. package/dist/esm/general-input.js +0 -17
  89. package/dist/esm/index-db76d5b5.js +0 -1299
  90. package/dist/esm/index.js +0 -16
  91. package/dist/esm/loader.js +0 -17
  92. package/dist/esm/locale.utils-de759721.js +0 -125
  93. package/dist/esm/polyfills/core-js.js +0 -11
  94. package/dist/esm/polyfills/css-shim.js +0 -1
  95. package/dist/esm/polyfills/dom.js +0 -79
  96. package/dist/esm/polyfills/es5-html-element.js +0 -1
  97. package/dist/esm/polyfills/index.js +0 -34
  98. package/dist/esm/polyfills/system.js +0 -6
  99. package/dist/esm/toggle-checkbox-input.entry.js +0 -81
  100. package/dist/esm/tooltipIcon-99c1c7b7.js +0 -3
  101. package/dist/general-input/general-input.esm.js +0 -1
  102. package/dist/general-input/index.esm.js +0 -1
  103. package/dist/general-input/p-10efdf3f.js +0 -1
  104. package/dist/general-input/p-613c3e00.entry.js +0 -1
  105. package/dist/general-input/p-660bcdd1.entry.js +0 -1
  106. package/dist/general-input/p-9b6b0396.entry.js +0 -3646
  107. package/dist/general-input/p-b408093e.js +0 -1
  108. package/dist/general-input/p-f4f4ccda.js +0 -1
  109. package/dist/index.cjs.js +0 -1
  110. package/dist/index.js +0 -1
  111. package/dist/stencil.config.js +0 -22
  112. package/dist/types/Users/sebastian.strulea/Documents/work/widgets-stencil/packages/general-input/.stencil/packages/general-input/stencil.config.d.ts +0 -2
  113. package/dist/types/components/checkbox-group-input/checkbox-group-input.d.ts +0 -74
  114. package/dist/types/components/checkbox-input/checkbox-input.d.ts +0 -65
  115. package/dist/types/components/date-input/date-input.d.ts +0 -84
  116. package/dist/types/components/email-input/email-input.d.ts +0 -80
  117. package/dist/types/components/general-input/general-input.d.ts +0 -75
  118. package/dist/types/components/number-input/number-input.d.ts +0 -74
  119. package/dist/types/components/password-input/password-input.d.ts +0 -91
  120. package/dist/types/components/radio-input/radio-input.d.ts +0 -59
  121. package/dist/types/components/select-input/select-input.d.ts +0 -83
  122. package/dist/types/components/tel-input/tel-input.d.ts +0 -89
  123. package/dist/types/components/text-input/text-input.d.ts +0 -84
  124. package/dist/types/components/toggle-checkbox-input/toggle-checkbox-input.d.ts +0 -67
  125. package/dist/types/components.d.ts +0 -1268
  126. package/dist/types/index.d.ts +0 -1
  127. package/dist/types/stencil-public-runtime.d.ts +0 -1565
  128. package/dist/types/utils/locale.utils.d.ts +0 -17
  129. package/dist/types/utils/types.d.ts +0 -87
  130. package/dist/types/utils/utils.d.ts +0 -1
  131. package/loader/cdn.js +0 -3
  132. package/loader/index.cjs.js +0 -3
  133. package/loader/index.d.ts +0 -12
  134. package/loader/index.es2017.js +0 -3
  135. package/loader/index.js +0 -4
  136. package/loader/package.json +0 -10
@@ -1,490 +0,0 @@
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';
2
- import { A as ActiveMixin } from './active-mixin.js';
3
-
4
- const button = i`
5
- :host {
6
- /* Sizing */
7
- --lumo-button-size: var(--lumo-size-m);
8
- min-width: calc(var(--lumo-button-size) * 2);
9
- height: var(--lumo-button-size);
10
- padding: 0 calc(var(--lumo-button-size) / 3 + var(--lumo-border-radius-m) / 2);
11
- margin: var(--lumo-space-xs) 0;
12
- box-sizing: border-box;
13
- /* Style */
14
- font-family: var(--lumo-font-family);
15
- font-size: var(--lumo-font-size-m);
16
- font-weight: 500;
17
- color: var(--_lumo-button-color, var(--lumo-primary-text-color));
18
- background-color: var(--_lumo-button-background-color, var(--lumo-contrast-5pct));
19
- border-radius: var(--lumo-border-radius-m);
20
- cursor: var(--lumo-clickable-cursor);
21
- -webkit-tap-highlight-color: transparent;
22
- -webkit-font-smoothing: antialiased;
23
- -moz-osx-font-smoothing: grayscale;
24
- flex-shrink: 0;
25
- }
26
-
27
- /* Set only for the internal parts so we don't affect the host vertical alignment */
28
- [part='label'],
29
- [part='prefix'],
30
- [part='suffix'] {
31
- line-height: var(--lumo-line-height-xs);
32
- }
33
-
34
- [part='label'] {
35
- padding: calc(var(--lumo-button-size) / 6) 0;
36
- }
37
-
38
- :host([theme~='small']) {
39
- font-size: var(--lumo-font-size-s);
40
- --lumo-button-size: var(--lumo-size-s);
41
- }
42
-
43
- :host([theme~='large']) {
44
- font-size: var(--lumo-font-size-l);
45
- --lumo-button-size: var(--lumo-size-l);
46
- }
47
-
48
- /* For interaction states */
49
- :host::before,
50
- :host::after {
51
- content: '';
52
- /* We rely on the host always being relative */
53
- position: absolute;
54
- z-index: 1;
55
- inset: 0;
56
- background-color: currentColor;
57
- border-radius: inherit;
58
- opacity: 0;
59
- pointer-events: none;
60
- }
61
-
62
- /* Hover */
63
-
64
- @media (any-hover: hover) {
65
- :host(:hover)::before {
66
- opacity: 0.02;
67
- }
68
- }
69
-
70
- /* Active */
71
-
72
- :host::after {
73
- transition: opacity 1.4s, transform 0.1s;
74
- filter: blur(8px);
75
- }
76
-
77
- :host([active])::before {
78
- opacity: 0.05;
79
- transition-duration: 0s;
80
- }
81
-
82
- :host([active])::after {
83
- opacity: 0.1;
84
- transition-duration: 0s, 0s;
85
- transform: scale(0);
86
- }
87
-
88
- /* Keyboard focus */
89
-
90
- :host([focus-ring]) {
91
- box-shadow: 0 0 0 2px var(--lumo-primary-color-50pct);
92
- }
93
-
94
- :host([theme~='primary'][focus-ring]) {
95
- box-shadow: 0 0 0 1px var(--lumo-base-color), 0 0 0 3px var(--lumo-primary-color-50pct);
96
- }
97
-
98
- /* Types (primary, tertiary, tertiary-inline */
99
-
100
- :host([theme~='tertiary']),
101
- :host([theme~='tertiary-inline']) {
102
- background-color: transparent !important;
103
- min-width: 0;
104
- }
105
-
106
- :host([theme~='tertiary']) {
107
- padding: 0 calc(var(--lumo-button-size) / 6);
108
- }
109
-
110
- :host([theme~='tertiary-inline'])::before {
111
- display: none;
112
- }
113
-
114
- :host([theme~='tertiary-inline']) {
115
- margin: 0;
116
- height: auto;
117
- padding: 0;
118
- line-height: inherit;
119
- font-size: inherit;
120
- }
121
-
122
- :host([theme~='tertiary-inline']) [part='label'] {
123
- padding: 0;
124
- overflow: visible;
125
- line-height: inherit;
126
- }
127
-
128
- :host([theme~='primary']) {
129
- background-color: var(--_lumo-button-primary-background-color, var(--lumo-primary-color));
130
- color: var(--_lumo-button-primary-color, var(--lumo-primary-contrast-color));
131
- font-weight: 600;
132
- min-width: calc(var(--lumo-button-size) * 2.5);
133
- }
134
-
135
- :host([theme~='primary'])::before {
136
- background-color: black;
137
- }
138
-
139
- @media (any-hover: hover) {
140
- :host([theme~='primary']:hover)::before {
141
- opacity: 0.05;
142
- }
143
- }
144
-
145
- :host([theme~='primary'][active])::before {
146
- opacity: 0.1;
147
- }
148
-
149
- :host([theme~='primary'][active])::after {
150
- opacity: 0.2;
151
- }
152
-
153
- /* Colors (success, error, contrast) */
154
-
155
- :host([theme~='success']) {
156
- color: var(--lumo-success-text-color);
157
- }
158
-
159
- :host([theme~='success'][theme~='primary']) {
160
- background-color: var(--lumo-success-color);
161
- color: var(--lumo-success-contrast-color);
162
- }
163
-
164
- :host([theme~='error']) {
165
- color: var(--lumo-error-text-color);
166
- }
167
-
168
- :host([theme~='error'][theme~='primary']) {
169
- background-color: var(--lumo-error-color);
170
- color: var(--lumo-error-contrast-color);
171
- }
172
-
173
- :host([theme~='contrast']) {
174
- color: var(--lumo-contrast);
175
- }
176
-
177
- :host([theme~='contrast'][theme~='primary']) {
178
- background-color: var(--lumo-contrast);
179
- color: var(--lumo-base-color);
180
- }
181
-
182
- /* Disabled state. Keep selectors after other color variants. */
183
-
184
- :host([disabled]) {
185
- pointer-events: none;
186
- color: var(--lumo-disabled-text-color);
187
- }
188
-
189
- :host([theme~='primary'][disabled]) {
190
- background-color: var(--lumo-contrast-30pct);
191
- color: var(--lumo-base-color);
192
- }
193
-
194
- :host([theme~='primary'][disabled]) [part] {
195
- opacity: 0.7;
196
- }
197
-
198
- /* Icons */
199
-
200
- [part] ::slotted(vaadin-icon) {
201
- display: inline-block;
202
- width: var(--lumo-icon-size-m);
203
- height: var(--lumo-icon-size-m);
204
- }
205
-
206
- /* 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:']) {
208
- padding: 0.25em;
209
- box-sizing: border-box !important;
210
- }
211
-
212
- [part='prefix'] {
213
- margin-left: -0.25em;
214
- margin-right: 0.25em;
215
- }
216
-
217
- [part='suffix'] {
218
- margin-left: 0.25em;
219
- margin-right: -0.25em;
220
- }
221
-
222
- /* Icon-only */
223
-
224
- :host([theme~='icon']:not([theme~='tertiary-inline'])) {
225
- min-width: var(--lumo-button-size);
226
- padding-left: calc(var(--lumo-button-size) / 4);
227
- padding-right: calc(var(--lumo-button-size) / 4);
228
- }
229
-
230
- :host([theme~='icon']) [part='prefix'],
231
- :host([theme~='icon']) [part='suffix'] {
232
- margin-left: 0;
233
- margin-right: 0;
234
- }
235
-
236
- /* RTL specific styles */
237
-
238
- :host([dir='rtl']) [part='prefix'] {
239
- margin-left: 0.25em;
240
- margin-right: -0.25em;
241
- }
242
-
243
- :host([dir='rtl']) [part='suffix'] {
244
- margin-left: -0.25em;
245
- margin-right: 0.25em;
246
- }
247
-
248
- :host([dir='rtl'][theme~='icon']) [part='prefix'],
249
- :host([dir='rtl'][theme~='icon']) [part='suffix'] {
250
- margin-left: 0;
251
- margin-right: 0;
252
- }
253
- `;
254
-
255
- registerStyles('vaadin-button', button, { moduleId: 'lumo-button' });
256
-
257
- /**
258
- * @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.
343
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
344
- */
345
-
346
- /**
347
- * A mixin providing common button functionality.
348
- *
349
- * @polymerMixin
350
- * @mixes ActiveMixin
351
- * @mixes FocusMixin
352
- * @mixes TabindexMixin
353
- */
354
- const ButtonMixin = (superClass) =>
355
- class ButtonMixinClass extends ActiveMixin(TabindexMixin(FocusMixin(superClass))) {
356
- static get properties() {
357
- return {
358
- /**
359
- * Indicates whether the element can be focused and where it participates in sequential keyboard navigation.
360
- *
361
- * @override
362
- * @protected
363
- */
364
- tabindex: {
365
- type: Number,
366
- value: 0,
367
- reflectToAttribute: true,
368
- },
369
- };
370
- }
371
-
372
- /**
373
- * By default, `Space` is the only possible activation key for a focusable HTML element.
374
- * Nonetheless, the button is an exception as it can be also activated by pressing `Enter`.
375
- * See the "Keyboard Support" section in https://www.w3.org/TR/wai-aria-practices/examples/button/button.html.
376
- *
377
- * @protected
378
- * @override
379
- */
380
- get _activeKeys() {
381
- return ['Enter', ' '];
382
- }
383
-
384
- /** @protected */
385
- ready() {
386
- super.ready();
387
-
388
- // By default, if the user hasn't provided a custom role,
389
- // the role attribute is set to "button".
390
- if (!this.hasAttribute('role')) {
391
- this.setAttribute('role', 'button');
392
- }
393
- }
394
-
395
- /**
396
- * Since the button component is designed on the base of the `[role=button]` attribute,
397
- * and doesn't have a native <button> inside, in order to be fully accessible from the keyboard,
398
- * it should manually fire the `click` event once an activation key is pressed,
399
- * as it follows from the WAI-ARIA specifications:
400
- * https://www.w3.org/TR/wai-aria-practices-1.1/#button
401
- *
402
- * According to the UI Events specifications,
403
- * the `click` event should be fired exactly on `keydown`:
404
- * https://www.w3.org/TR/uievents/#event-type-keydown
405
- *
406
- * @param {KeyboardEvent} event
407
- * @protected
408
- * @override
409
- */
410
- _onKeyDown(event) {
411
- super._onKeyDown(event);
412
-
413
- if (event.altKey || event.shiftKey || event.ctrlKey || event.metaKey) {
414
- return;
415
- }
416
-
417
- if (this._activeKeys.includes(event.key)) {
418
- event.preventDefault();
419
-
420
- // `DisabledMixin` overrides the standard `click()` method
421
- // so that it doesn't fire the `click` event when the element is disabled.
422
- this.click();
423
- }
424
- }
425
- };
426
-
427
- /**
428
- * @license
429
- * Copyright (c) 2017 - 2023 Vaadin Ltd.
430
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
431
- */
432
-
433
- registerStyles('vaadin-button', buttonStyles, { moduleId: 'vaadin-button-styles' });
434
-
435
- /**
436
- * `<vaadin-button>` is an accessible and customizable button that allows users to perform actions.
437
- *
438
- * ```html
439
- * <vaadin-button>Press me</vaadin-button>
440
- * ```
441
- *
442
- * ### Styling
443
- *
444
- * The following shadow DOM parts are available for styling:
445
- *
446
- * Part name | Description
447
- * ----------|-------------
448
- * `label` | The label (text) inside the button.
449
- * `prefix` | A slot for content before the label (e.g. an icon).
450
- * `suffix` | A slot for content after the label (e.g. an icon).
451
- *
452
- * The following attributes are available for styling:
453
- *
454
- * Attribute | Description
455
- * -------------|-------------
456
- * `active` | Set when the button is pressed down, either with mouse, touch or the keyboard.
457
- * `disabled` | Set when the button is disabled.
458
- * `focus-ring` | Set when the button is focused using the keyboard.
459
- * `focused` | Set when the button is focused.
460
- *
461
- * See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.
462
- *
463
- * @customElement
464
- * @extends HTMLElement
465
- * @mixes ButtonMixin
466
- * @mixes ControllerMixin
467
- * @mixes ElementMixin
468
- * @mixes ThemableMixin
469
- */
470
- class Button extends ButtonMixin(ElementMixin(ThemableMixin(ControllerMixin(PolymerElement)))) {
471
- static get is() {
472
- return 'vaadin-button';
473
- }
474
-
475
- static get template() {
476
- return buttonTemplate(html);
477
- }
478
-
479
- /** @protected */
480
- ready() {
481
- super.ready();
482
-
483
- this._tooltipController = new TooltipController(this);
484
- this.addController(this._tooltipController);
485
- }
486
- }
487
-
488
- defineCustomElement(Button);
489
-
490
- export { Button as B, button as b };