@foxy.io/elements 1.14.0-beta.1 → 1.14.0-beta.5

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 (156) hide show
  1. package/README.md +1 -1
  2. package/dist/cdn/foxy-access-recovery-form.js +1 -1
  3. package/dist/cdn/foxy-address-card.js +1 -1
  4. package/dist/cdn/foxy-address-form.js +1 -1
  5. package/dist/cdn/foxy-applied-tax-card.js +1 -1
  6. package/dist/cdn/foxy-attribute-card.js +1 -1
  7. package/dist/cdn/foxy-attribute-form.js +1 -1
  8. package/dist/cdn/foxy-cancellation-form.js +1 -1
  9. package/dist/cdn/foxy-collection-page.js +1 -1
  10. package/dist/cdn/foxy-collection-pages.js +1 -1
  11. package/dist/cdn/foxy-custom-field-card.js +1 -1
  12. package/dist/cdn/foxy-custom-field-form.js +1 -1
  13. package/dist/cdn/foxy-customer-api.js +1 -1
  14. package/dist/cdn/foxy-customer-card.js +1 -1
  15. package/dist/cdn/foxy-customer-form.js +1 -1
  16. package/dist/cdn/foxy-customer-portal-settings.js +10 -10
  17. package/dist/cdn/foxy-customer-portal.js +2 -2
  18. package/dist/cdn/foxy-customer.js +1 -1
  19. package/dist/cdn/foxy-customers-table.js +1 -1
  20. package/dist/cdn/foxy-discount-card.js +1 -1
  21. package/dist/cdn/foxy-donation.js +1 -1
  22. package/dist/cdn/foxy-email-template-form.js +1 -0
  23. package/dist/cdn/foxy-error-entry-card.js +1 -1
  24. package/dist/cdn/foxy-form-dialog.js +1 -1
  25. package/dist/cdn/foxy-i18n.js +1 -1
  26. package/dist/cdn/foxy-items-form.js +1 -1
  27. package/dist/cdn/foxy-nucleon-element.js +1 -1
  28. package/dist/cdn/foxy-payment-card.js +1 -1
  29. package/dist/cdn/foxy-payment-method-card.js +1 -1
  30. package/dist/cdn/foxy-query-builder.js +1 -1
  31. package/dist/cdn/foxy-sign-in-form.js +1 -1
  32. package/dist/cdn/foxy-spinner.js +2 -2
  33. package/dist/cdn/foxy-subscription-card.js +1 -1
  34. package/dist/cdn/foxy-subscription-form.js +26 -9
  35. package/dist/cdn/foxy-subscriptions-table.js +1 -1
  36. package/dist/cdn/foxy-table.js +1 -1
  37. package/dist/cdn/foxy-tax-card.js +1 -1
  38. package/dist/cdn/foxy-tax-form.js +1 -1
  39. package/dist/cdn/foxy-template-config-form.js +14 -0
  40. package/dist/cdn/foxy-template-form.js +1 -1
  41. package/dist/cdn/foxy-transaction-card.js +1 -1
  42. package/dist/cdn/foxy-transactions-table.js +1 -1
  43. package/dist/cdn/foxy-user-form.js +1 -1
  44. package/dist/cdn/foxy-users-table.js +1 -1
  45. package/dist/cdn/{shared-d4dad105.js → shared-00563cb0.js} +1 -1
  46. package/dist/cdn/shared-0ced76a0.js +358 -0
  47. package/dist/cdn/{shared-151ca103.js → shared-10bdb6b9.js} +1 -1
  48. package/dist/cdn/{shared-99f45065.js → shared-1469c1c4.js} +1 -1
  49. package/dist/cdn/shared-166c44ae.js +264 -0
  50. package/dist/cdn/{shared-f4119f12.js → shared-16f72e27.js} +1 -1
  51. package/dist/cdn/shared-1761daef.js +15 -0
  52. package/dist/cdn/{shared-e057788f.js → shared-1b7e65e4.js} +1 -1
  53. package/dist/cdn/{shared-5fedf5e4.js → shared-200f613b.js} +2 -2
  54. package/dist/cdn/{shared-6783c996.js → shared-2174bcd4.js} +1 -1
  55. package/dist/cdn/{shared-4059f633.js → shared-218ba06e.js} +1 -1
  56. package/dist/cdn/{shared-e9920617.js → shared-34b2c1e2.js} +1 -1
  57. package/dist/cdn/shared-396320f9.js +314 -0
  58. package/dist/cdn/{shared-566252ac.js → shared-3d868b17.js} +1 -1
  59. package/dist/cdn/{shared-cf248335.js → shared-44cfc617.js} +1 -1
  60. package/dist/cdn/{shared-45d647e4.js → shared-46ee137f.js} +1 -1
  61. package/dist/cdn/shared-4a52d9b5.js +1 -0
  62. package/dist/cdn/{shared-f0199313.js → shared-593f7e2c.js} +1 -1
  63. package/dist/cdn/shared-59e44f29.js +1 -0
  64. package/dist/cdn/{shared-cd700eac.js → shared-60126eee.js} +1 -1
  65. package/dist/cdn/{shared-dbbe03f9.js → shared-614e1a4e.js} +1 -1
  66. package/dist/cdn/{shared-17968c53.js → shared-63eaded9.js} +3 -3
  67. package/dist/cdn/shared-6b7602c7.js +1 -0
  68. package/dist/cdn/{shared-98ee7fad.js → shared-6d45a07b.js} +1 -1
  69. package/dist/cdn/shared-75ce6e43.js +1 -0
  70. package/dist/cdn/shared-782bf922.js +1 -0
  71. package/dist/cdn/{shared-5d286626.js → shared-7a39a41f.js} +1 -1
  72. package/dist/cdn/{shared-35415106.js → shared-87190eae.js} +1 -1
  73. package/dist/cdn/{shared-84fa75d9.js → shared-9221e6b2.js} +1 -1
  74. package/dist/cdn/{shared-2860a3d3.js → shared-94b0ae99.js} +2 -2
  75. package/dist/cdn/shared-9d779f46.js +1 -0
  76. package/dist/cdn/shared-a46edf4b.js +1 -0
  77. package/dist/cdn/{shared-54702b33.js → shared-b0f0e8b5.js} +1 -1
  78. package/dist/cdn/{shared-ed4ed7a5.js → shared-b710881a.js} +2 -2
  79. package/dist/cdn/{shared-3ae39e52.js → shared-bb824ab4.js} +3 -3
  80. package/dist/cdn/shared-d94ffc2b.js +1 -0
  81. package/dist/cdn/shared-df573cea.js +12 -0
  82. package/dist/cdn/{shared-e5de8675.js → shared-e7f8ffe9.js} +1 -1
  83. package/dist/cdn/{shared-54c485d2.js → shared-ec861f31.js} +21 -21
  84. package/dist/cdn/{shared-e0248713.js → shared-f0a83bd6.js} +1 -1
  85. package/dist/cdn/{shared-f2a4fd27.js → shared-fb90e05c.js} +1 -1
  86. package/dist/cdn/{shared-747b0842.js → shared-ff79f3f9.js} +1 -1
  87. package/dist/cdn/translations/shared/en.json +56 -3
  88. package/dist/elements/private/Choice/Choice.js +3 -3
  89. package/dist/elements/private/Choice/Choice.js.map +1 -1
  90. package/dist/elements/private/Group/Group.js +1 -1
  91. package/dist/elements/private/Group/Group.js.map +1 -1
  92. package/dist/elements/private/I18N/I18N.js +1 -1
  93. package/dist/elements/private/I18N/I18N.js.map +1 -1
  94. package/dist/elements/public/AddressForm/AddressForm.js +8 -4
  95. package/dist/elements/public/AddressForm/AddressForm.js.map +1 -1
  96. package/dist/elements/public/AttributeForm/AttributeForm.js +8 -4
  97. package/dist/elements/public/AttributeForm/AttributeForm.js.map +1 -1
  98. package/dist/elements/public/CustomFieldForm/CustomFieldForm.js +8 -4
  99. package/dist/elements/public/CustomFieldForm/CustomFieldForm.js.map +1 -1
  100. package/dist/elements/public/CustomerForm/CustomerForm.js +8 -4
  101. package/dist/elements/public/CustomerForm/CustomerForm.js.map +1 -1
  102. package/dist/elements/public/EmailTemplateForm/EmailTemplateForm.d.ts +24 -0
  103. package/dist/elements/public/EmailTemplateForm/EmailTemplateForm.js +311 -0
  104. package/dist/elements/public/EmailTemplateForm/EmailTemplateForm.js.map +1 -0
  105. package/dist/elements/public/EmailTemplateForm/index.d.ts +9 -0
  106. package/dist/elements/public/EmailTemplateForm/index.js +11 -0
  107. package/dist/elements/public/EmailTemplateForm/index.js.map +1 -0
  108. package/dist/elements/public/EmailTemplateForm/types.d.ts +3 -0
  109. package/dist/elements/public/EmailTemplateForm/types.js +2 -0
  110. package/dist/elements/public/EmailTemplateForm/types.js.map +1 -0
  111. package/dist/elements/public/ItemsForm/ItemsForm.js +2 -2
  112. package/dist/elements/public/ItemsForm/ItemsForm.js.map +1 -1
  113. package/dist/elements/public/NucleonElement/serveFromCache.js +1 -0
  114. package/dist/elements/public/NucleonElement/serveFromCache.js.map +1 -1
  115. package/dist/elements/public/TaxForm/TaxForm.js +8 -4
  116. package/dist/elements/public/TaxForm/TaxForm.js.map +1 -1
  117. package/dist/elements/public/TemplateConfigForm/CountriesList.d.ts +23 -0
  118. package/dist/elements/public/TemplateConfigForm/CountriesList.js +129 -0
  119. package/dist/elements/public/TemplateConfigForm/CountriesList.js.map +1 -0
  120. package/dist/elements/public/TemplateConfigForm/CountryCard.d.ts +20 -0
  121. package/dist/elements/public/TemplateConfigForm/CountryCard.js +125 -0
  122. package/dist/elements/public/TemplateConfigForm/CountryCard.js.map +1 -0
  123. package/dist/elements/public/TemplateConfigForm/TemplateConfigForm.d.ts +29 -0
  124. package/dist/elements/public/TemplateConfigForm/TemplateConfigForm.js +700 -0
  125. package/dist/elements/public/TemplateConfigForm/TemplateConfigForm.js.map +1 -0
  126. package/dist/elements/public/TemplateConfigForm/defaults.d.ts +2 -0
  127. package/dist/elements/public/TemplateConfigForm/defaults.js +95 -0
  128. package/dist/elements/public/TemplateConfigForm/defaults.js.map +1 -0
  129. package/dist/elements/public/TemplateConfigForm/index.d.ts +9 -0
  130. package/dist/elements/public/TemplateConfigForm/index.js +11 -0
  131. package/dist/elements/public/TemplateConfigForm/index.js.map +1 -0
  132. package/dist/elements/public/TemplateConfigForm/types.d.ts +116 -0
  133. package/dist/elements/public/TemplateConfigForm/types.js +2 -0
  134. package/dist/elements/public/TemplateConfigForm/types.js.map +1 -0
  135. package/dist/elements/public/TemplateForm/TemplateForm.js +10 -6
  136. package/dist/elements/public/TemplateForm/TemplateForm.js.map +1 -1
  137. package/dist/elements/public/index.d.ts +2 -0
  138. package/dist/elements/public/index.defined.d.ts +2 -0
  139. package/dist/elements/public/index.defined.js +2 -0
  140. package/dist/elements/public/index.defined.js.map +1 -1
  141. package/dist/elements/public/index.js +2 -0
  142. package/dist/elements/public/index.js.map +1 -1
  143. package/dist/mixins/themeable.js +86 -12
  144. package/dist/mixins/themeable.js.map +1 -1
  145. package/package.json +2 -7
  146. package/dist/cdn/shared-35502e88.js +0 -1
  147. package/dist/cdn/shared-50744508.js +0 -15
  148. package/dist/cdn/shared-5388f705.js +0 -1
  149. package/dist/cdn/shared-7f588649.js +0 -1
  150. package/dist/cdn/shared-9467cb31.js +0 -572
  151. package/dist/cdn/shared-b98f88c9.js +0 -369
  152. package/dist/cdn/shared-c0161e6a.js +0 -1
  153. package/dist/cdn/shared-dbcffd8e.js +0 -1
  154. package/dist/cdn/shared-e21a2aac.js +0 -1
  155. package/dist/cdn/shared-ebbef842.js +0 -1
  156. package/dist/cdn/shared-fd5b81be.js +0 -1
@@ -0,0 +1,358 @@
1
+ import{E as t,C as e,T as o}from"./shared-df573cea.js";import{h as r,G as i,P as a,c as s}from"./shared-ff79f3f9.js";const n=r`<dom-module id="lumo-button" theme-for="vaadin-button">
2
+ <template>
3
+ <style>
4
+ :host {
5
+ /* Sizing */
6
+ --lumo-button-size: var(--lumo-size-m);
7
+ min-width: calc(var(--lumo-button-size) * 2);
8
+ height: var(--lumo-button-size);
9
+ padding: 0 calc(var(--lumo-button-size) / 3 + var(--lumo-border-radius) / 2);
10
+ margin: var(--lumo-space-xs) 0;
11
+ box-sizing: border-box;
12
+ /* Style */
13
+ font-family: var(--lumo-font-family);
14
+ font-size: var(--lumo-font-size-m);
15
+ font-weight: 500;
16
+ color: var(--_lumo-button-color, var(--lumo-primary-text-color));
17
+ background-color: var(--_lumo-button-background-color, var(--lumo-contrast-5pct));
18
+ border-radius: var(--lumo-border-radius);
19
+ cursor: default;
20
+ -webkit-tap-highlight-color: transparent;
21
+ -webkit-font-smoothing: antialiased;
22
+ -moz-osx-font-smoothing: grayscale;
23
+ }
24
+
25
+ /* Set only for the internal parts so we don’t affect the host vertical alignment */
26
+ [part="label"],
27
+ [part="prefix"],
28
+ [part="suffix"] {
29
+ line-height: var(--lumo-line-height-xs);
30
+ }
31
+
32
+ [part="label"] {
33
+ padding: calc(var(--lumo-button-size) / 6) 0;
34
+ }
35
+
36
+ :host([theme~="small"]) {
37
+ font-size: var(--lumo-font-size-s);
38
+ --lumo-button-size: var(--lumo-size-s);
39
+ }
40
+
41
+ :host([theme~="large"]) {
42
+ font-size: var(--lumo-font-size-l);
43
+ --lumo-button-size: var(--lumo-size-l);
44
+ }
45
+
46
+ /* This needs to be the last selector for it to take priority */
47
+ :host([disabled][disabled]) {
48
+ pointer-events: none;
49
+ color: var(--lumo-disabled-text-color);
50
+ background-color: var(--lumo-contrast-5pct);
51
+ }
52
+
53
+ /* For interaction states */
54
+ :host::before,
55
+ :host::after {
56
+ content: "";
57
+ /* We rely on the host always being relative */
58
+ position: absolute;
59
+ z-index: 1;
60
+ top: 0;
61
+ right: 0;
62
+ bottom: 0;
63
+ left: 0;
64
+ background-color: currentColor;
65
+ border-radius: inherit;
66
+ opacity: 0;
67
+ transition: opacity 0.2s;
68
+ pointer-events: none;
69
+ }
70
+
71
+ /* Hover */
72
+
73
+ :host(:hover)::before {
74
+ opacity: 0.05;
75
+ }
76
+
77
+ /* Disable hover for touch devices */
78
+ @media (pointer: coarse) {
79
+ :host(:not([active]):hover)::before {
80
+ opacity: 0;
81
+ }
82
+ }
83
+
84
+ /* Active */
85
+
86
+ :host::after {
87
+ transition: opacity 1.4s, transform 0.1s;
88
+ filter: blur(8px);
89
+ }
90
+
91
+ :host([active])::before {
92
+ opacity: 0.1;
93
+ transition-duration: 0s;
94
+ }
95
+
96
+ :host([active])::after {
97
+ opacity: 0.1;
98
+ transition-duration: 0s, 0s;
99
+ transform: scale(0);
100
+ }
101
+
102
+ /* Keyboard focus */
103
+
104
+ :host([focus-ring]) {
105
+ box-shadow: 0 0 0 2px var(--lumo-primary-color-50pct);
106
+ }
107
+
108
+ /* Types (primary, tertiary, tertiary-inline */
109
+
110
+ :host([theme~="tertiary"]),
111
+ :host([theme~="tertiary-inline"]) {
112
+ background-color: transparent !important;
113
+ transition: opacity 0.2s;
114
+ min-width: 0;
115
+ }
116
+
117
+ :host([theme~="tertiary"])::before,
118
+ :host([theme~="tertiary-inline"])::before {
119
+ display: none;
120
+ }
121
+
122
+ :host([theme~="tertiary"]) {
123
+ padding: 0 calc(var(--lumo-button-size) / 6);
124
+ }
125
+
126
+ @media (hover: hover) {
127
+ :host([theme*="tertiary"]:not([active]):hover) {
128
+ opacity: 0.8;
129
+ }
130
+ }
131
+
132
+ :host([theme~="tertiary"][active]),
133
+ :host([theme~="tertiary-inline"][active]) {
134
+ opacity: 0.5;
135
+ transition-duration: 0s;
136
+ }
137
+
138
+ :host([theme~="tertiary-inline"]) {
139
+ margin: 0;
140
+ height: auto;
141
+ padding: 0;
142
+ line-height: inherit;
143
+ font-size: inherit;
144
+ }
145
+
146
+ :host([theme~="tertiary-inline"]) [part="label"] {
147
+ padding: 0;
148
+ overflow: visible;
149
+ line-height: inherit;
150
+ }
151
+
152
+ :host([theme~="primary"]) {
153
+ background-color: var(--_lumo-button-primary-background-color, var(--lumo-primary-color));
154
+ color: var(--_lumo-button-primary-color, var(--lumo-primary-contrast-color));
155
+ font-weight: 600;
156
+ min-width: calc(var(--lumo-button-size) * 2.5);
157
+ }
158
+
159
+ :host([theme~="primary"][disabled]) {
160
+ background-color: var(--lumo-primary-color-50pct);
161
+ color: var(--lumo-primary-contrast-color);
162
+ }
163
+
164
+ :host([theme~="primary"]:hover)::before {
165
+ opacity: 0.1;
166
+ }
167
+
168
+ :host([theme~="primary"][active])::before {
169
+ background-color: var(--lumo-shade-20pct);
170
+ }
171
+
172
+ @media (pointer: coarse) {
173
+ :host([theme~="primary"][active])::before {
174
+ background-color: var(--lumo-shade-60pct);
175
+ }
176
+
177
+ :host([theme~="primary"]:not([active]):hover)::before {
178
+ opacity: 0;
179
+ }
180
+ }
181
+
182
+ :host([theme~="primary"][active])::after {
183
+ opacity: 0.2;
184
+ }
185
+
186
+ /* Colors (success, error, contrast) */
187
+
188
+ :host([theme~="success"]) {
189
+ color: var(--lumo-success-text-color);
190
+ }
191
+
192
+ :host([theme~="success"][theme~="primary"]) {
193
+ background-color: var(--lumo-success-color);
194
+ color: var(--lumo-success-contrast-color);
195
+ }
196
+
197
+ :host([theme~="success"][theme~="primary"][disabled]) {
198
+ background-color: var(--lumo-success-color-50pct);
199
+ }
200
+
201
+ :host([theme~="error"]) {
202
+ color: var(--lumo-error-text-color);
203
+ }
204
+
205
+ :host([theme~="error"][theme~="primary"]) {
206
+ background-color: var(--lumo-error-color);
207
+ color: var(--lumo-error-contrast-color);
208
+ }
209
+
210
+ :host([theme~="error"][theme~="primary"][disabled]) {
211
+ background-color: var(--lumo-error-color-50pct);
212
+ }
213
+
214
+ :host([theme~="contrast"]) {
215
+ color: var(--lumo-contrast);
216
+ }
217
+
218
+ :host([theme~="contrast"][theme~="primary"]) {
219
+ background-color: var(--lumo-contrast);
220
+ color: var(--lumo-base-color);
221
+ }
222
+
223
+ :host([theme~="contrast"][theme~="primary"][disabled]) {
224
+ background-color: var(--lumo-contrast-50pct);
225
+ }
226
+
227
+ /* Icons */
228
+
229
+ [part] ::slotted(iron-icon) {
230
+ display: inline-block;
231
+ width: var(--lumo-icon-size-m);
232
+ height: var(--lumo-icon-size-m);
233
+ }
234
+
235
+ /* Vaadin icons are based on a 16x16 grid (unlike Lumo and Material icons with 24x24), so they look too big by default */
236
+ [part] ::slotted(iron-icon[icon^="vaadin:"]) {
237
+ padding: 0.25em;
238
+ box-sizing: border-box !important;
239
+ }
240
+
241
+ [part="prefix"] {
242
+ margin-left: -0.25em;
243
+ margin-right: 0.25em;
244
+ }
245
+
246
+ [part="suffix"] {
247
+ margin-left: 0.25em;
248
+ margin-right: -0.25em;
249
+ }
250
+
251
+ /* Icon-only */
252
+
253
+ :host([theme~="icon"]:not([theme~="tertiary-inline"])) {
254
+ min-width: var(--lumo-button-size);
255
+ padding-left: calc(var(--lumo-button-size) / 4);
256
+ padding-right: calc(var(--lumo-button-size) / 4);
257
+ }
258
+
259
+ :host([theme~="icon"]) [part="prefix"],
260
+ :host([theme~="icon"]) [part="suffix"] {
261
+ margin-left: 0;
262
+ margin-right: 0;
263
+ }
264
+
265
+ /* RTL specific styles */
266
+
267
+ :host([dir="rtl"]) [part="prefix"] {
268
+ margin-left: 0.25em;
269
+ margin-right: -0.25em;
270
+ }
271
+
272
+ :host([dir="rtl"]) [part="suffix"] {
273
+ margin-left: -0.25em;
274
+ margin-right: 0.25em;
275
+ }
276
+
277
+ :host([dir="rtl"][theme~="icon"]) [part="prefix"],
278
+ :host([dir="rtl"][theme~="icon"]) [part="suffix"] {
279
+ margin-left: 0;
280
+ margin-right: 0;
281
+ }
282
+ </style>
283
+ </template>
284
+ </dom-module>`;document.head.appendChild(n.content);
285
+ /**
286
+ @license
287
+ Copyright (c) 2017 Vaadin Ltd.
288
+ This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
289
+ */
290
+ class l extends(t(e(o(i(a))))){static get template(){return r`
291
+ <style>
292
+ :host {
293
+ display: inline-block;
294
+ position: relative;
295
+ outline: none;
296
+ white-space: nowrap;
297
+ }
298
+
299
+ :host([hidden]) {
300
+ display: none !important;
301
+ }
302
+
303
+ /* Ensure the button is always aligned on the baseline */
304
+ .vaadin-button-container::before {
305
+ content: "\\2003";
306
+ display: inline-block;
307
+ width: 0;
308
+ }
309
+
310
+ .vaadin-button-container {
311
+ display: inline-flex;
312
+ align-items: center;
313
+ justify-content: center;
314
+ text-align: center;
315
+ width: 100%;
316
+ height: 100%;
317
+ min-height: inherit;
318
+ text-shadow: inherit;
319
+ -webkit-user-select: none;
320
+ -moz-user-select: none;
321
+ user-select: none;
322
+ }
323
+
324
+ [part="prefix"],
325
+ [part="suffix"] {
326
+ flex: none;
327
+ }
328
+
329
+ [part="label"] {
330
+ white-space: nowrap;
331
+ overflow: hidden;
332
+ text-overflow: ellipsis;
333
+ }
334
+
335
+ #button {
336
+ position: absolute;
337
+ top: 0;
338
+ left: 0;
339
+ right: 0;
340
+ width: 100%;
341
+ height: 100%;
342
+ opacity: 0;
343
+ cursor: inherit;
344
+ }
345
+ </style>
346
+ <div class="vaadin-button-container">
347
+ <div part="prefix">
348
+ <slot name="prefix"></slot>
349
+ </div>
350
+ <div part="label">
351
+ <slot></slot>
352
+ </div>
353
+ <div part="suffix">
354
+ <slot name="suffix"></slot>
355
+ </div>
356
+ </div>
357
+ <button id="button" type="button"></button>
358
+ `}static get is(){return"vaadin-button"}static get version(){return"2.4.0"}ready(){super.ready(),this.setAttribute("role","button"),this.$.button.setAttribute("role","presentation"),this._addActiveListeners(),window.ShadyDOM&&window.ShadyDOM.flush()}disconnectedCallback(){super.disconnectedCallback(),this.hasAttribute("active")&&this.removeAttribute("active")}_addActiveListeners(){s(this,"down",(()=>!this.disabled&&this.setAttribute("active",""))),s(this,"up",(()=>this.removeAttribute("active"))),this.addEventListener("keydown",(t=>!this.disabled&&[13,32].indexOf(t.keyCode)>=0&&this.setAttribute("active",""))),this.addEventListener("keyup",(()=>this.removeAttribute("active"))),this.addEventListener("blur",(()=>this.removeAttribute("active")))}get focusElement(){return this.$.button}}customElements.define(l.is,l);export{l as B};
@@ -1,4 +1,4 @@
1
- import{_ as t}from"./shared-17968c53.js";import{T as e}from"./shared-6783c996.js";import{a as s}from"./shared-5388f705.js";import{p as a}from"./shared-e21a2aac.js";let n,o,r,i,c=t=>t;class l extends(s(e,"subscriptions-table")){constructor(){super(...arguments),this.columns=[l.priceColumn,l.summaryColumn,l.statusColumn,l.subTokenURLColumn]}}l.priceColumn={cell:e=>{const s=e.data._embedded["fx:last_transaction"],o=`${s.total_order} ${s.currency_code}`;return e.html(n||(n=c`
1
+ import{_ as t}from"./shared-63eaded9.js";import{T as e}from"./shared-2174bcd4.js";import{a as s}from"./shared-d94ffc2b.js";import{p as a}from"./shared-6b7602c7.js";let n,o,r,i,c=t=>t;class l extends(s(e,"subscriptions-table")){constructor(){super(...arguments),this.columns=[l.priceColumn,l.summaryColumn,l.statusColumn,l.subTokenURLColumn]}}l.priceColumn={cell:e=>{const s=e.data._embedded["fx:last_transaction"],o=`${s.total_order} ${s.currency_code}`;return e.html(n||(n=c`
2
2
  <foxy-i18n
3
3
  data-testclass="i18n frequencies"
4
4
  class="font-semibold text-m font-tnum"
@@ -1,4 +1,4 @@
1
- import{T as t}from"./shared-6783c996.js";import{a as s}from"./shared-5388f705.js";let e,n,a,o,l,i,r=t=>t;class c extends(s(t,"transactions-table")){constructor(){super(...arguments),this.columns=[c.priceColumn,c.summaryColumn,c.statusColumn,c.idColumn,c.dateColumn,c.receiptColumn]}}c.priceColumn={cell:t=>t.html(e||(e=r`
1
+ import{T as t}from"./shared-2174bcd4.js";import{a as s}from"./shared-d94ffc2b.js";let e,n,a,o,l,i,r=t=>t;class c extends(s(t,"transactions-table")){constructor(){super(...arguments),this.columns=[c.priceColumn,c.summaryColumn,c.statusColumn,c.idColumn,c.dateColumn,c.receiptColumn]}}c.priceColumn={cell:t=>t.html(e||(e=r`
2
2
  <foxy-i18n
3
3
  data-testclass="i18n totals"
4
4
  class="text-m font-semibold font-tnum"
@@ -0,0 +1,264 @@
1
+ import{k as e,P as t,A as a,L as i,j as s,h as n,_ as r}from"./shared-63eaded9.js";import"./shared-46ee137f.js";import{E as l,C as o,T as d}from"./shared-df573cea.js";import"./shared-f0a83bd6.js";import{a as u,T as c}from"./shared-bb824ab4.js";import{h,P as p,D as m}from"./shared-ff79f3f9.js";import"./shared-ec861f31.js";import"./foxy-i18n.js";import{Q as g,T as v,U as f,V as y,W as _,X as b,Y as x,Z as w,b as C,$ as E,a0 as k,a1 as T,a2 as $,a3 as V,a4 as S,a5 as I,m as A,a6 as M}from"./shared-1761daef.js";import{p as D}from"./shared-87ca7818.js";import{c as q}from"./shared-d94ffc2b.js";import{s as L}from"./shared-b0f0e8b5.js";import{i as N}from"./shared-a46edf4b.js";var B={raise:g,send:v,sendParent:f,sendUpdate:y,log:_,cancel:b,start:x,stop:w,assign:C,after:E,done:k,respond:T,forwardTo:$,escalate:V,choose:S,pure:I};const j=h`<dom-module id="lumo-text-area" theme-for="vaadin-text-area">
2
+ <template>
3
+ <style include="lumo-text-field">
4
+ [part="input-field"],
5
+ [part="input-field"] ::slotted(textarea) {
6
+ /* Equal to the implicit padding in vaadin-text-field */
7
+ padding-top: calc((var(--lumo-text-field-size) - 1em * var(--lumo-line-height-s)) / 2);
8
+ padding-bottom: calc((var(--lumo-text-field-size) - 1em * var(--lumo-line-height-s)) / 2);
9
+ height: auto;
10
+ box-sizing: border-box;
11
+ transition: background-color 0.1s;
12
+ line-height: var(--lumo-line-height-s);
13
+ }
14
+
15
+ :host(:not([readonly])) [part="input-field"]::after {
16
+ display: none;
17
+ }
18
+
19
+ :host([readonly]) [part="input-field"] {
20
+ border: 1px dashed var(--lumo-contrast-30pct);
21
+ }
22
+
23
+ :host([readonly]) [part="input-field"]::after {
24
+ border: none;
25
+ }
26
+
27
+ :host(:hover:not([readonly]):not([focused]):not([invalid])) [part="input-field"] {
28
+ background-color: var(--lumo-contrast-20pct);
29
+ }
30
+
31
+ @media (pointer: coarse) {
32
+ :host(:hover:not([readonly]):not([focused]):not([invalid])) [part="input-field"] {
33
+ background-color: var(--lumo-contrast-10pct);
34
+ }
35
+
36
+ :host(:active:not([readonly]):not([focused])) [part="input-field"] {
37
+ background-color: var(--lumo-contrast-20pct);
38
+ }
39
+ }
40
+
41
+ [part="value"],
42
+ [part="input-field"] ::slotted(textarea) {
43
+ line-height: inherit;
44
+ --_lumo-text-field-overflow-mask-image: none;
45
+ }
46
+
47
+ /* Vertically align icon prefix/suffix with the first line of text */
48
+ [part="input-field"] ::slotted(iron-icon) {
49
+ margin-top: calc((var(--lumo-icon-size-m) - 1em * var(--lumo-line-height-s)) / -2);
50
+ }
51
+
52
+ [part="input-field"] [part="value"],
53
+ [part="input-field"] ::slotted(textarea) {
54
+ white-space: pre-wrap; /* override \`nowrap\` from <vaadin-text-field> */
55
+ align-self: stretch; /* override \`baseline\` from <vaadin-text-field> */
56
+ }
57
+ </style>
58
+ </template>
59
+ </dom-module>`;document.head.appendChild(j.content);
60
+ /**
61
+ @license
62
+ Copyright (c) 2017 Vaadin Ltd.
63
+ This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
64
+ */
65
+ class P extends(l(u(o(d(p))))){static get template(){return h`
66
+ <style include="vaadin-text-field-shared-styles">
67
+ .vaadin-text-area-container {
68
+ flex: auto;
69
+ max-height: inherit; /* MSIE 11 */
70
+ min-height: inherit; /* MSIE 11 */
71
+ }
72
+
73
+ /* The label, helper text and the error message should neither grow nor shrink. */
74
+ [part="label"],
75
+ [part="helper-text"],
76
+ [part="error-message"] {
77
+ flex: none;
78
+ }
79
+
80
+ [part="input-field"] {
81
+ overflow: auto;
82
+ -webkit-overflow-scrolling: touch;
83
+ }
84
+
85
+ [part="value"] {
86
+ resize: none;
87
+ }
88
+
89
+ [part="value"],
90
+ [part="input-field"] ::slotted(*) {
91
+ align-self: flex-start;
92
+ }
93
+
94
+ @keyframes vaadin-text-area-appear {
95
+ to {
96
+ opacity: 1;
97
+ }
98
+ }
99
+
100
+ :host {
101
+ animation: 1ms vaadin-text-area-appear;
102
+ }
103
+
104
+ /* Workaround https://bugzilla.mozilla.org/show_bug.cgi?id=1739079 */
105
+ :host([disabled]) [part='value'] {
106
+ user-select: none;
107
+ }
108
+ </style>
109
+
110
+ <div class="vaadin-text-area-container">
111
+
112
+ <label part="label" on-click="focus" id="[[_labelId]]">[[label]]</label>
113
+
114
+ <div part="input-field" id="[[_inputId]]">
115
+
116
+ <slot name="prefix"></slot>
117
+
118
+ <slot name="textarea">
119
+ <textarea part="value"></textarea>
120
+ </slot>
121
+
122
+ <div part="clear-button" id="clearButton" role="button" aria-label\$="[[i18n.clear]]"></div>
123
+ <slot name="suffix"></slot>
124
+
125
+ </div>
126
+
127
+ <div part="helper-text" id="[[_helperTextId]]">
128
+ <slot name="helper">[[helperText]]</slot>
129
+ </div>
130
+
131
+ <div part="error-message" id="[[_errorId]]" aria-live="assertive" aria-hidden\$="[[_getErrorMessageAriaHidden(invalid, errorMessage, _errorId)]]">[[errorMessage]]</div>
132
+
133
+ </div>
134
+ `}static get is(){return"vaadin-text-area"}static get version(){return"2.9.0"}static get properties(){return{pattern:{type:String}}}static get observers(){return["_textAreaValueChanged(value)"]}ready(){super.ready(),this._updateHeight(),this.addEventListener("animationend",this._onAnimationEnd)}_onAnimationEnd(e){0===e.animationName.indexOf("vaadin-text-area-appear")&&this._updateHeight()}get _slottedTagName(){return"textarea"}_textAreaValueChanged(e){this._updateHeight()}_updateHeight(){const e=this.root.querySelector("[part=input-field]"),t=e.scrollTop,a=this.inputElement,i=this.value?this.value.length:0;if(this._oldValueLength>=i){const t=getComputedStyle(e).height,i=getComputedStyle(a).width;e.style.display="block",e.style.height=t,a.style.maxWidth=i,a.style.height="auto"}this._oldValueLength=i;const s=a.scrollHeight;s>a.clientHeight&&(a.style.height=s+"px"),a.style.removeProperty("max-width"),e.style.removeProperty("display"),e.style.removeProperty("height"),e.scrollTop=t,this._dispatchIronResizeEventIfNeeded("InputHeight",s)}checkValidity(){if(!super.checkValidity())return!1;if(!this.pattern||!this.inputElement.value)return!0;try{const e=this.inputElement.value.match(this.pattern);return!!e&&e[0]===e.input}catch(e){return!0}}}customElements.define(P.is,P);const F=h`<dom-module id="lumo-number-field" theme-for="vaadin-number-field">
135
+ <template>
136
+ <style include="lumo-field-button">
137
+ :host {
138
+ width: 8em;
139
+ }
140
+
141
+ :host([has-controls]:not([theme~="align-right"])) [part="value"] {
142
+ text-align: center;
143
+ }
144
+
145
+ [part="decrease-button"][disabled],
146
+ [part="increase-button"][disabled] {
147
+ opacity: 0.2;
148
+ }
149
+
150
+ :host([has-controls]) [part="input-field"] {
151
+ padding: 0;
152
+ }
153
+
154
+ [part="decrease-button"],
155
+ [part="increase-button"] {
156
+ cursor: pointer;
157
+ font-size: var(--lumo-icon-size-s);
158
+ width: 1.6em;
159
+ height: 1.6em;
160
+ }
161
+
162
+ [part="decrease-button"]::before,
163
+ [part="increase-button"]::before {
164
+ margin-top: 0.2em;
165
+ }
166
+
167
+ /* RTL specific styles */
168
+
169
+ :host([dir="rtl"]) [part="value"],
170
+ :host([dir="rtl"]) [part="input-field"] ::slotted(input) {
171
+ --_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent, #000 1.25em);
172
+ }
173
+ </style>
174
+ </template>
175
+ </dom-module>`;document.head.appendChild(F.content);
176
+ /**
177
+ @license
178
+ Copyright (c) 2017 Vaadin Ltd.
179
+ This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
180
+ */
181
+ const z=h`<dom-module id="vaadin-number-field-template">
182
+ <template>
183
+ <style>
184
+ :host([readonly]) [part\$="button"] {
185
+ pointer-events: none;
186
+ }
187
+
188
+ [part="decrease-button"]::before {
189
+ content: "−";
190
+ }
191
+
192
+ [part="increase-button"]::before {
193
+ content: "+";
194
+ }
195
+
196
+ [part="decrease-button"],
197
+ [part="increase-button"] {
198
+ -webkit-user-select: none;
199
+ -moz-user-select: none;
200
+ -ms-user-select: none;
201
+ user-select: none;
202
+ }
203
+
204
+ /* Hide the native arrow icons */
205
+ [part="value"]::-webkit-outer-spin-button,
206
+ [part="value"]::-webkit-inner-spin-button {
207
+ -webkit-appearance: none;
208
+ margin: 0;
209
+ }
210
+
211
+ [part="value"] {
212
+ /* Older Firefox versions (v47.0) requires !important */
213
+ -moz-appearance: textfield !important;
214
+ }
215
+
216
+ :host([dir="rtl"]) [part="input-field"] {
217
+ direction: ltr;
218
+ }
219
+
220
+ :host([dir="rtl"]) [part="value"]::placeholder {
221
+ direction: rtl;
222
+ }
223
+
224
+ :host([dir="rtl"]) [part="input-field"] ::slotted(input)::placeholder {
225
+ direction: rtl;
226
+ }
227
+
228
+ :host([dir="rtl"]) [part="value"]:-ms-input-placeholder,
229
+ :host([dir="rtl"]) [part="input-field"] ::slotted(input):-ms-input-placeholder {
230
+ direction: rtl;
231
+ }
232
+
233
+ :host([dir="rtl"]:not([has-controls])) [part="value"]::placeholder {
234
+ text-align: left;
235
+ }
236
+
237
+ :host([dir="rtl"]:not([has-controls])) [part="input-field"] ::slotted(input)::placeholder {
238
+ text-align: left;
239
+ }
240
+
241
+ :host([dir="rtl"]:not([has-controls])) [part="value"]:-ms-input-placeholder,
242
+ :host([dir="rtl"]:not([has-controls])) [part="input-field"] ::slotted(input):-ms-input-placeholder {
243
+ text-align: left;
244
+ }
245
+ </style>
246
+
247
+ <div disabled\$="[[!_allowed(-1, value, min, max, step)]]" part="decrease-button" on-click="_decreaseValue" on-touchend="_decreaseButtonTouchend" hidden\$="[[!hasControls]]">
248
+ </div>
249
+
250
+ <div disabled\$="[[!_allowed(1, value, min, max, step)]]" part="increase-button" on-click="_increaseValue" on-touchend="_increaseButtonTouchend" hidden\$="[[!hasControls]]">
251
+ </div>
252
+ </template>
253
+
254
+
255
+ </dom-module>`;let U;document.head.appendChild(z.content);class O extends c{static get is(){return"vaadin-number-field"}static get version(){return"2.9.0"}static get properties(){return{hasControls:{type:Boolean,value:!1,reflectToAttribute:!0},min:{type:Number,reflectToAttribute:!0,observer:"_minChanged"},max:{type:Number,reflectToAttribute:!0,observer:"_maxChanged"},step:{type:Number,value:1,observer:"_stepChanged"}}}ready(){super.ready(),this.__previousValidInput=this.value||"",this.inputElement.type="number",this.inputElement.addEventListener("change",this.__onInputChange.bind(this))}_decreaseButtonTouchend(e){e.preventDefault(),this._decreaseValue()}_increaseButtonTouchend(e){e.preventDefault(),this._increaseValue()}static get template(){if(!U){U=super.template.cloneNode(!0);const e=m.import(this.is+"-template","template"),t=e.content.querySelector('[part="decrease-button"]'),a=e.content.querySelector('[part="increase-button"]'),i=e.content.querySelector("style"),s=U.content.querySelector('[part="input-field"]'),n=U.content.querySelector('[name="prefix"]');s.insertBefore(t,n),s.appendChild(a),U.content.appendChild(i)}return U}_createConstraintsObserver(){this._createMethodObserver("_constraintsChanged(required, minlength, maxlength, pattern, min, max, step)")}_constraintsChanged(e,t,a,i,s,n,r){if(!this.invalid)return;const l=e=>!e&&0!==e;l(s)&&l(n)?super._constraintsChanged(e,t,a,i):this.validate()}_decreaseValue(){this._incrementValue(-1)}_increaseValue(){this._incrementValue(1)}_incrementValue(e){if(this.disabled||this.readonly)return;let t=parseFloat(this.value);this.value?t<this.min?(e=0,t=this.min):t>this.max&&(e=0,t=this.max):0==this.min&&e<0||0==this.max&&e>0||0==this.max&&0==this.min?(e=0,t=0):(null==this.max||this.max>=0)&&(null==this.min||this.min<=0)?t=0:this.min>0?(t=this.min,this.max<0&&e<0&&(t=this.max),e=0):this.max<0&&(t=this.max,e<0?e=0:this._getIncrement(1,t-this.step)>this.max?t-=2*this.step:t-=this.step);const a=this._getIncrement(e,t);this.value&&0!=e&&!this._incrementIsInsideTheLimits(e,t)||this._setValue(a)}_setValue(e){this.value=this.inputElement.value=String(parseFloat(e)),this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))}_getIncrement(e,t){let a=this.step||1,i=this.min||0;const s=Math.max(this._getMultiplier(t),this._getMultiplier(a),this._getMultiplier(i));a*=s,i*=s;const n=((t=Math.round(t*s))-i)%a;return e>0?(t-n+a)/s:e<0?(t-(n||a))/s:t/s}_getDecimalCount(e){const t=String(e),a=t.indexOf(".");return-1===a?1:t.length-a-1}_getMultiplier(e){if(!isNaN(e))return Math.pow(10,this._getDecimalCount(e))}_incrementIsInsideTheLimits(e,t){return e<0?null==this.min||this._getIncrement(e,t)>=this.min:e>0?null==this.max||this._getIncrement(e,t)<=this.max:this._getIncrement(e,t)<=this.max&&this._getIncrement(e,t)>=this.min}_allowed(e){const t=e*(this.step||1),a=parseFloat(this.value);return!this.value||!this.disabled&&this._incrementIsInsideTheLimits(t,a)}_stepChanged(e,t){this.__validateByStep=this.__stepChangedCalled||null!==this.getAttribute("step"),this.inputElement.step=this.__validateByStep?e:"any",this.__stepChangedCalled=!0,this.setAttribute("step",e)}_minChanged(e){this.inputElement.min=e}_maxChanged(e){this.inputElement.max=e}_valueChanged(e,t){e&&isNaN(parseFloat(e))?this.value="":"string"!=typeof this.value&&(this.value=String(this.value)),super._valueChanged(this.value,t)}_onKeyDown(e){38==e.keyCode?(e.preventDefault(),this._increaseValue()):40==e.keyCode&&(e.preventDefault(),this._decreaseValue()),super._onKeyDown(e)}__onInputChange(){this.validate()}checkValidity(){return void 0!==this.min||void 0!==this.max||this.__validateByStep?this.inputElement.checkValidity():super.checkValidity()}}window.customElements.define(O.is,O);
256
+ /**
257
+ @license
258
+ Copyright (c) 2019 Vaadin Ltd.
259
+ This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
260
+ */
261
+ const H=h`<dom-module id="vaadin-integer-field-template">
262
+
263
+
264
+ </dom-module>`;document.head.appendChild(H.content);class R extends O{static get is(){return"vaadin-integer-field"}static get version(){return"2.9.0"}static get properties(){return{pattern:String,preventInvalidInput:Boolean,minlength:Number,maxlength:Number}}ready(){super.ready(),this._enabledCharPattern="[-+\\d]"}_valueChanged(e,t){if(""!==e&&!this.__isInteger(e))return console.warn(`Trying to set non-integer value "${e}" to <vaadin-integer-field>. Clearing the value.`),void(this.value="");super._valueChanged(e,t)}_stepChanged(e,t){if(!this.__hasOnlyDigits(e))return console.warn(`Trying to set invalid step size "${e}", which is not a positive integer, to <vaadin-integer-field>. Resetting the default value 1.`),void(this.step=1);super._stepChanged(e,t)}__isInteger(e){return/^(-\d)?\d*$/.test(String(e))}__hasOnlyDigits(e){return/^\d*$/.test(String(e))}}window.customElements.define(R.is,R);class Y extends CustomEvent{constructor(e){super("change",{detail:e})}}class W extends CustomEvent{constructor(e){super("change",{detail:e})}}class X extends W{}const K=e((e=>i=>{const{element:s,name:n,strings:r}=i.committer;if(2!==r.length||""!==r[0]||""!==r[1])throw new Error("live directive bindings must not contain any static values");if(i.committer.parts.length>1)throw new Error("live directive must be the only directive for an attribute or property");if(i instanceof t)s[n]!==e&&i.setValue(e);else{if(!(i instanceof a))throw new Error("live directive can only be used on attributes or properties");s.getAttribute(n)!==e&&i.setValue(e)}}));let Q,Z,G=e=>e;class J extends i{constructor(){super(...arguments),this.label="",this.value="",this.disabled=!1,this.readonly=!1,this.errorMessage="",this.__i18n={formatValue:e=>e.join(""),parseValue:e=>{const{count:t,units:a}=D(e);return[t.toString(),a]}},this.__getItems=A((e=>{const t=D(e).count;return[{value:"d",label:this.__t("day",{count:t})},{value:"w",label:this.__t("week",{count:t})},{value:"m",label:this.__t("month",{count:t})},{value:"y",label:this.__t("year",{count:t})}]}))}static get properties(){return{checkValidity:{attribute:!1},errorMessage:{type:String,attribute:"error-message"},disabled:{type:Boolean,reflect:!0},readonly:{type:Boolean,reflect:!0},label:{type:String},value:{type:String},lang:{type:String}}}static get styles(){return s(Q||(Q=G`:host{display:block}vaadin-custom-field{width:100%;font-size:0;line-height:0}vaadin-custom-field::part(label){padding-bottom:var(--lumo-space-s)}vaadin-custom-field::part(error-message)[aria-hidden=false]{padding-top:var(--lumo-space-xs)}vaadin-combo-box,vaadin-integer-field{width:calc(50% - (var(--lumo-space-s)/ 2))}vaadin-integer-field{margin-right:var(--lumo-space-s);padding:0}vaadin-combo-box::part(text-field){padding:0}`))}connectedCallback(){super.connectedCallback(),this.__untrackTranslations=customElements.get("foxy-i18n").onTranslationChange((()=>{var e,t;null===(t=(e=this.__getItems.cache).clear)||void 0===t||t.call(e),this.requestUpdate()}))}render(){return n(Z||(Z=G` <vaadin-custom-field data-testid="field" .i18n="${0}" .label="${0}" .value="${0}" ?disabled="${0}" ?readonly="${0}" .errorMessage="${0}" .checkValidity="${0}" @change="${0}"> <vaadin-integer-field data-testid="value" min="1" max="999" has-controls prevent-invalid-input ?invalid="${0}" ?disabled="${0}" ?readonly="${0}"> </vaadin-integer-field> <vaadin-combo-box data-testid="units" item-value-path="value" item-label-path="label" .items="${0}" ?invalid="${0}" ?disabled="${0}" ?readonly="${0}"> </vaadin-combo-box> </vaadin-custom-field> `),this.__i18n,this.label,K(this.value),this.disabled,this.readonly,this.errorMessage,this.checkValidity,this.__handleChange,!this.checkValidity(),this.disabled,this.readonly,this.__getItems(this.value),!this.checkValidity(),this.disabled,this.readonly)}updated(e){super.updated(e);const t=this.renderRoot.firstElementChild;t.value!==this.value&&(t.value=this.value)}disconnectedCallback(){var e;super.disconnectedCallback(),null===(e=this.__untrackTranslations)||void 0===e||e.call(this)}checkValidity(){return!0}get __t(){return customElements.get("foxy-i18n").i18next.getFixedT(this.lang)}__handleChange(e){const t=e.target;this.value=t.value,this.dispatchEvent(new X(this.value))}}const ee=M({id:"choice",type:"parallel",context:{defaultCustomValue:"",customValue:null,custom:!1,items:[],value:null,type:"text",min:null,max:null},states:{mutability:{initial:"editable",states:{editable:{},readonly:{}},on:{SET_READONLY:[{target:".editable",cond:"isPayloadFalsey"},{target:".readonly",cond:"isPayloadTruthy"}]}},interactivity:{initial:"enabled",states:{enabled:{},disabled:{}},on:{SET_DISABLED:[{target:".enabled",cond:"isPayloadFalsey"},{target:".disabled",cond:"isPayloadTruthy"}]}},selection:{initial:"unknown",states:{unknown:{always:[{target:"multiple",cond:"isValueArray"},{target:"single"}]},none:{},single:{},multiple:{}}},extension:{initial:"unknown",states:{unknown:{always:[{target:"present",cond:"hasCustom"},{target:"absent"}]},absent:{},present:{initial:"unknown",states:{unknown:{always:[{target:"selected",cond:"hasCustomValue"},{target:"available"}]},available:{on:{SET_TYPE:{actions:"setType"}}},selected:{initial:"unknown",states:{unknown:{always:[{target:"integer",cond:"showsIntegerField"},{target:"textarea",cond:"showsTextarea"},{target:"frequency",cond:"showsFrequency"},{target:"text"}]},text:{},frequency:{},textarea:{},integer:{type:"parallel",states:{min:{initial:"unknown",states:{unknown:{always:[{target:"custom",cond:"hasMinConstraint"},{target:"none"}]},none:{},custom:{}}},max:{initial:"unknown",states:{unknown:{always:[{target:"custom",cond:"hasMaxConstraint"},{target:"none"}]},none:{},custom:{}}}}}}}}}}}},on:{SET_DEFAULT_CUSTOM_VALUE:{actions:"setDefaultCustomValue"},SET_CUSTOM:{actions:"setCustom",target:[".selection.unknown",".extension.unknown"]},SET_VALUE:{actions:"setValue",target:[".selection.unknown",".extension.unknown"]},SET_ITEMS:{actions:"setItems",target:[".selection.unknown",".extension.unknown"]},SET_TYPE:{actions:"setType",target:".extension.unknown"},SET_MIN:{actions:"setMin",target:".extension.unknown"},SET_MAX:{actions:"setMax",target:".extension.unknown"}}},{guards:{isPayloadFalsey:(e,t)=>!t.data,isPayloadTruthy:(e,t)=>!!t.data,isValueArray:e=>Array.isArray(e.value),showsIntegerField:e=>"integer"===e.type,showsFrequency:e=>"frequency"===e.type,showsTextarea:e=>"textarea"===e.type,hasMinConstraint:e=>"number"==typeof e.min,hasMaxConstraint:e=>"number"==typeof e.max,hasCustomValue:e=>"string"==typeof e.customValue,hasCustom:e=>e.custom},actions:{setDefaultCustomValue:B.assign({defaultCustomValue:(e,t)=>t.data}),setValue:B.assign({value:(e,t)=>t.data,customValue:(e,t)=>Array.isArray(t.data)?t.data.find((t=>!e.items.includes(t))):e.items.includes(t.data)?null:t.data}),setCustom:B.assign({custom:(e,t)=>t.data}),setItems:B.assign({items:(e,t)=>t.data}),setType:B.assign({type:(e,t)=>t.data}),setMin:B.assign({min:(e,t)=>t.data}),setMax:B.assign({max:(e,t)=>t.data})}});let te,ae,ie,se,ne,re,le,oe,de,ue,ce,he,pe,me=e=>e;const ge=`@foxy.io/elements::other[${(Math.pow(10,10)*Math.random()).toFixed(0)}]`;class ve extends q{constructor(){super(...arguments),this.getText=e=>e,this.__service=N(ee).onChange((()=>this.requestUpdate())).onTransition((({changed:e})=>e&&this.requestUpdate())).start()}static get scopedElements(){return{"vaadin-integer-field":customElements.get("vaadin-integer-field"),"vaadin-text-field":customElements.get("vaadin-text-field"),"x-frequency-input":J,"vaadin-text-area":customElements.get("vaadin-text-area"),"iron-icon":customElements.get("iron-icon")}}static get styles(){return[super.styles,s(ie||(ie=me`:host{--item-width:calc((var(--lumo-space-m) * 2) + 1.25rem)}.ml-xxl{margin-left:var(--item-width)}.item{height:var(--lumo-size-l);width:var(--item-width)}.radio{height:1.25rem;width:1.25rem}.check{height:1.125rem;width:1.125rem}.dot{height:.5rem;width:.5rem}`))]}static get properties(){return r(r({},super.properties),{},{defaultCustomValue:{type:String,attribute:"default-custom-value"},disabled:{type:Boolean},readonly:{type:Boolean},custom:{type:Boolean},type:{type:String},min:{type:Number},max:{type:Number},value:{type:Array},items:{type:Array},getText:{attribute:!1}})}get defaultCustomValue(){return this.__service.state.context.defaultCustomValue}set defaultCustomValue(e){this.__service.send("SET_DEFAULT_CUSTOM_VALUE",{data:e})}get readonly(){return this.__service.state.matches("mutability.readonly")}set readonly(e){this.__service.send("SET_READONLY",{data:e})}get disabled(){return this.__service.state.matches("interactivity.disabled")}set disabled(e){this.__service.send("SET_DISABLED",{data:e})}get custom(){return this.__service.state.matches("extension.present")}set custom(e){this.__service.send("SET_CUSTOM",{data:e})}get type(){return this.__service.state.context.type}set type(e){this.__service.send("SET_TYPE",{data:e})}get min(){return this.__service.state.context.min}set min(e){this.__service.send("SET_MIN",{data:e})}get max(){return this.__service.state.context.max}set max(e){this.__service.send("SET_MAX",{data:e})}get value(){return this.__service.state.context.value}set value(e){this.__service.send("SET_VALUE",{data:e})}get items(){return this.__service.state.context.items}set items(e){this.__service.send("SET_ITEMS",{data:e})}render(){const e=this.custom?[...this.items,ge]:this.items,t=Array.isArray(this.value),a=this.__service.state.matches("extension.present.selected"),i=n(se||(se=me` ${0} `),e.map(((e,i,s)=>{var r;const l=this.custom&&i===s.length-1,o=l?a:t?!!(null===(r=this.value)||void 0===r?void 0:r.includes(e)):e===String(this.value),d=this.disabled||!this._isI18nReady,u=L({value:l?ge:e,name:t?e:"choice","data-testid":`item-${e}`,"?disabled":d||this.readonly,"@change":t=>{const a=t.target.checked,i=e===ge?this.defaultCustomValue:e,s=this.value;Array.isArray(s)?this.value=e===ge?a?[...s,i]:s.slice(0,s.length-1):a?[i,...s]:s.filter((e=>e!==i)):this.value=a?i:null,this.dispatchEvent(new Y(this.value))}}),c=n(ne||(ne=me` <div> ${0} </div> `),e===ge?this._t("choice.other").toString():n(re||(re=me`<slot name="${0}">${0}</slot>`),`${e}-label`,this.getText(e)));return n(le||(le=me` <div class="ml-xxl border-t border-contrast-10 ${0}"></div> ${0} <div class="mr-m ml-xxl"> ${0} ${0} </div> `),i?"":"hidden",t?function(e,t,a,i,s){const r="transition ease-in-out duration-200",l=`${r} transform ${a?"scale-100":"scale-0"} ${e?"text-contrast-20":"text-tint"}`;return n(ae||(ae=me` <label class="group flex items-center ${0}"> <div class="item flex items-center justify-center flex-shrink-0 text-primary-contrast"> <div class="check rounded-s ${0} ${0} ${0} focus-within-shadow-outline"> <iron-icon icon="lumo:checkmark" class="block w-full h-full ${0}"></iron-icon> <input type="checkbox" class="sr-only" .checked="${0}" ...="${0}"> </div> </div> <div class="font-lumo leading-m ${0}">${0}</div> </label> `),t||e?"":"cursor-pointer","border "+(e?"border-contrast-20":"border-transparent"),r,e?"":t?a?"bg-primary-50":"bg-contrast-10":a?"bg-primary":"bg-contrast-20 group-hover-bg-contrast-30",l,a,i,t?"text-disabled":e?"text-secondary":"text-body",s)}(this.readonly,d,o,u,c):function(e,t,a,i,s){const r="transition ease-in-out duration-200",l=`${r} ${t||e?"":"shadow-xs"} transform ${a?"scale-100":"scale-0"} ${e?"bg-contrast-20":"bg-tint"}`;return n(te||(te=me` <label class="group flex items-center ${0}"> <div class="item flex items-center justify-center flex-shrink-0"> <div class="flex radio rounded-full ${0} ${0} ${0} focus-within-shadow-outline"> <div class="dot m-auto rounded-full ${0}"></div> <input type="radio" class="sr-only" .checked="${0}" ...="${0}"> </div> </div> <div class="font-lumo leading-m ${0}">${0}</div> </label> `),t||e?"":"cursor-pointer","border "+(e?"border-contrast-20":"border-transparent"),r,e?"":t?a?"bg-primary-50":"bg-contrast-10":a?"bg-primary":"bg-contrast-20 group-hover-bg-contrast-30",l,a,i,t?"text-disabled":e?"text-secondary":"text-body",s)}(this.readonly,d,o,u,c),e===ge&&a?this.__field:"",e!==ge?n(oe||(oe=me`<slot name="${0}"></slot>`),e):"")})));return n(de||(de=me`<form>${0}</form> `),i)}get __field(){const e=L({placeholder:this._t("choice.other").toString(),class:"w-full mb-m",value:this.__service.state.context.customValue,max:this.max,min:this.min,"?disabled":this.disabled,"?readonly":this.readonly,"data-testid":"field","@change":e=>{e.stopPropagation();const t=e.target.value;Array.isArray(this.value)?this.value=this.value.slice(0,this.value.length-1).concat(t):this.value=t,this.dispatchEvent(new Y(this.value))}});return"frequency"===this.type?n(ue||(ue=me`<x-frequency-input ...="${0}"></x-frequency-input>`),e):"integer"===this.type?n(ce||(ce=me`<vaadin-integer-field ...="${0}" has-controls></vaadin-integer-field>`),e):"textarea"===this.type?n(he||(he=me`<vaadin-text-area ...="${0}"></vaadin-text-area>`),e):n(pe||(pe=me`<vaadin-text-field ...="${0}"></vaadin-text-field>`),e)}}export{ve as C,W as D,R as I,Y as a,B as b};
@@ -1,4 +1,4 @@
1
- import{E as e,C as t,T as o}from"./shared-b98f88c9.js";import{h as i,G as r,P as a}from"./shared-747b0842.js";const s=i`<dom-module id="lumo-checkbox" theme-for="vaadin-checkbox">
1
+ import{E as e,C as t,T as o}from"./shared-df573cea.js";import{h as i,G as r,P as a}from"./shared-ff79f3f9.js";const s=i`<dom-module id="lumo-checkbox" theme-for="vaadin-checkbox">
2
2
  <template>
3
3
  <style include="lumo-checkbox-style lumo-checkbox-effects">
4
4
  /* IE11 only */