@foxy.io/elements 1.14.0-beta.3 → 1.14.0-beta.7

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 (127) 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 +9 -9
  17. package/dist/cdn/foxy-customer-portal.js +2 -2
  18. package/dist/cdn/foxy-customer.js +2 -2
  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 -1
  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 +1 -1
  33. package/dist/cdn/foxy-subscription-card.js +1 -1
  34. package/dist/cdn/foxy-subscription-form.js +4 -4
  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-14788132.js → shared-00563cb0.js} +1 -1
  46. package/dist/cdn/shared-09feabf8.js +1 -0
  47. package/dist/cdn/{shared-57522229.js → shared-0ba88744.js} +1 -1
  48. package/dist/cdn/shared-0ced76a0.js +358 -0
  49. package/dist/cdn/{shared-84df58e1.js → shared-16e28f3b.js} +1 -1
  50. package/dist/cdn/{shared-d196432b.js → shared-16f72e27.js} +1 -1
  51. package/dist/cdn/{shared-82dd0556.js → shared-1761daef.js} +1 -1
  52. package/dist/cdn/{shared-302d8a7b.js → shared-1bafffd0.js} +1 -1
  53. package/dist/cdn/{shared-3534b284.js → shared-200f613b.js} +1 -1
  54. package/dist/cdn/{shared-3e14c0d2.js → shared-218ba06e.js} +1 -1
  55. package/dist/cdn/{shared-acf49ecc.js → shared-34b2c1e2.js} +1 -1
  56. package/dist/cdn/{shared-2b2b56f6.js → shared-3f35fa81.js} +1 -1
  57. package/dist/cdn/{shared-b8349f79.js → shared-44cfc617.js} +1 -1
  58. package/dist/cdn/{shared-dd66b354.js → shared-4d3c7828.js} +1 -1
  59. package/dist/cdn/{shared-c7f352fa.js → shared-50c7a176.js} +1 -1
  60. package/dist/cdn/{shared-a4410f22.js → shared-593f7e2c.js} +1 -1
  61. package/dist/cdn/{shared-d19e2399.js → shared-59e44f29.js} +1 -1
  62. package/dist/cdn/{shared-d97a6ee5.js → shared-63eaded9.js} +3 -3
  63. package/dist/cdn/shared-691da586.js +1 -0
  64. package/dist/cdn/{shared-7fd12533.js → shared-6b7602c7.js} +1 -1
  65. package/dist/cdn/{shared-94c83b2b.js → shared-6d45a07b.js} +1 -1
  66. package/dist/cdn/{shared-2d99835c.js → shared-6ecbc785.js} +1 -1
  67. package/dist/cdn/{shared-bbc97ae0.js → shared-6f7f752e.js} +1 -1
  68. package/dist/cdn/shared-7629a1a5.js +314 -0
  69. package/dist/cdn/shared-8edee4e1.js +264 -0
  70. package/dist/cdn/{shared-652ef7fe.js → shared-9221e6b2.js} +1 -1
  71. package/dist/cdn/{shared-59a0cb0f.js → shared-94b0ae99.js} +1 -1
  72. package/dist/cdn/{shared-3553ff4d.js → shared-a46edf4b.js} +1 -1
  73. package/dist/cdn/{shared-72678c5d.js → shared-a6c047b1.js} +1 -1
  74. package/dist/cdn/shared-ace85f1b.js +1 -0
  75. package/dist/cdn/{shared-27d93838.js → shared-b0f0e8b5.js} +1 -1
  76. package/dist/cdn/{shared-8e38d64f.js → shared-b710881a.js} +2 -2
  77. package/dist/cdn/{shared-dce03b47.js → shared-bb824ab4.js} +1 -1
  78. package/dist/cdn/{shared-e969772e.js → shared-c66e9946.js} +1 -1
  79. package/dist/cdn/shared-d8852c42.js +1 -0
  80. package/dist/cdn/shared-df573cea.js +12 -0
  81. package/dist/cdn/{shared-fda14a3d.js → shared-e7f8ffe9.js} +1 -1
  82. package/dist/cdn/{shared-92442eb1.js → shared-ec861f31.js} +1 -1
  83. package/dist/cdn/{shared-a71bd9f0.js → shared-f0a83bd6.js} +1 -1
  84. package/dist/cdn/translations/shared/en.json +83 -1
  85. package/dist/elements/private/Checkbox/Checkbox.js +5 -1
  86. package/dist/elements/private/Checkbox/Checkbox.js.map +1 -1
  87. package/dist/elements/private/Choice/Choice.js +2 -2
  88. package/dist/elements/private/Choice/Choice.js.map +1 -1
  89. package/dist/elements/private/Group/Group.js +1 -1
  90. package/dist/elements/private/Group/Group.js.map +1 -1
  91. package/dist/elements/public/EmailTemplateForm/EmailTemplateForm.js +1 -1
  92. package/dist/elements/public/EmailTemplateForm/EmailTemplateForm.js.map +1 -1
  93. package/dist/elements/public/TemplateConfigForm/CountriesList.d.ts +23 -0
  94. package/dist/elements/public/TemplateConfigForm/CountriesList.js +129 -0
  95. package/dist/elements/public/TemplateConfigForm/CountriesList.js.map +1 -0
  96. package/dist/elements/public/TemplateConfigForm/CountryCard.d.ts +20 -0
  97. package/dist/elements/public/TemplateConfigForm/CountryCard.js +125 -0
  98. package/dist/elements/public/TemplateConfigForm/CountryCard.js.map +1 -0
  99. package/dist/elements/public/TemplateConfigForm/TemplateConfigForm.d.ts +34 -0
  100. package/dist/elements/public/TemplateConfigForm/TemplateConfigForm.js +1123 -0
  101. package/dist/elements/public/TemplateConfigForm/TemplateConfigForm.js.map +1 -0
  102. package/dist/elements/public/TemplateConfigForm/defaults.d.ts +2 -0
  103. package/dist/elements/public/TemplateConfigForm/defaults.js +95 -0
  104. package/dist/elements/public/TemplateConfigForm/defaults.js.map +1 -0
  105. package/dist/elements/public/TemplateConfigForm/index.d.ts +9 -0
  106. package/dist/elements/public/TemplateConfigForm/index.js +11 -0
  107. package/dist/elements/public/TemplateConfigForm/index.js.map +1 -0
  108. package/dist/elements/public/TemplateConfigForm/types.d.ts +116 -0
  109. package/dist/elements/public/TemplateConfigForm/types.js +2 -0
  110. package/dist/elements/public/TemplateConfigForm/types.js.map +1 -0
  111. package/dist/elements/public/TemplateForm/TemplateForm.js +1 -1
  112. package/dist/elements/public/TemplateForm/TemplateForm.js.map +1 -1
  113. package/dist/elements/public/index.d.ts +1 -0
  114. package/dist/elements/public/index.defined.d.ts +1 -0
  115. package/dist/elements/public/index.defined.js +1 -0
  116. package/dist/elements/public/index.defined.js.map +1 -1
  117. package/dist/elements/public/index.js +1 -0
  118. package/dist/elements/public/index.js.map +1 -1
  119. package/dist/mixins/themeable.js +72 -0
  120. package/dist/mixins/themeable.js.map +1 -1
  121. package/package.json +1 -1
  122. package/dist/cdn/shared-04b77f79.js +0 -369
  123. package/dist/cdn/shared-1108653b.js +0 -577
  124. package/dist/cdn/shared-4ee97558.js +0 -1
  125. package/dist/cdn/shared-a0c2bbe0.js +0 -1
  126. package/dist/cdn/shared-a21a7562.js +0 -1
  127. package/dist/cdn/shared-bec929ac.js +0 -1
@@ -0,0 +1,12 @@
1
+ import{D as t,a as e,i as n,e as o}from"./shared-ff79f3f9.js";class l extends HTMLElement{static get version(){return"1.6.1"}}customElements.define("vaadin-lumo-styles",l);const s=document.createElement("template");s.innerHTML='<custom-style>\n <style>\n html {\n /* Base (background) */\n --lumo-base-color: #FFF;\n\n /* Tint */\n --lumo-tint-5pct: hsla(0, 0%, 100%, 0.3);\n --lumo-tint-10pct: hsla(0, 0%, 100%, 0.37);\n --lumo-tint-20pct: hsla(0, 0%, 100%, 0.44);\n --lumo-tint-30pct: hsla(0, 0%, 100%, 0.5);\n --lumo-tint-40pct: hsla(0, 0%, 100%, 0.57);\n --lumo-tint-50pct: hsla(0, 0%, 100%, 0.64);\n --lumo-tint-60pct: hsla(0, 0%, 100%, 0.7);\n --lumo-tint-70pct: hsla(0, 0%, 100%, 0.77);\n --lumo-tint-80pct: hsla(0, 0%, 100%, 0.84);\n --lumo-tint-90pct: hsla(0, 0%, 100%, 0.9);\n --lumo-tint: #FFF;\n\n /* Shade */\n --lumo-shade-5pct: hsla(214, 61%, 25%, 0.05);\n --lumo-shade-10pct: hsla(214, 57%, 24%, 0.1);\n --lumo-shade-20pct: hsla(214, 53%, 23%, 0.16);\n --lumo-shade-30pct: hsla(214, 50%, 22%, 0.26);\n --lumo-shade-40pct: hsla(214, 47%, 21%, 0.38);\n --lumo-shade-50pct: hsla(214, 45%, 20%, 0.5);\n --lumo-shade-60pct: hsla(214, 43%, 19%, 0.61);\n --lumo-shade-70pct: hsla(214, 42%, 18%, 0.72);\n --lumo-shade-80pct: hsla(214, 41%, 17%, 0.83);\n --lumo-shade-90pct: hsla(214, 40%, 16%, 0.94);\n --lumo-shade: hsl(214, 35%, 15%);\n\n /* Contrast */\n --lumo-contrast-5pct: var(--lumo-shade-5pct);\n --lumo-contrast-10pct: var(--lumo-shade-10pct);\n --lumo-contrast-20pct: var(--lumo-shade-20pct);\n --lumo-contrast-30pct: var(--lumo-shade-30pct);\n --lumo-contrast-40pct: var(--lumo-shade-40pct);\n --lumo-contrast-50pct: var(--lumo-shade-50pct);\n --lumo-contrast-60pct: var(--lumo-shade-60pct);\n --lumo-contrast-70pct: var(--lumo-shade-70pct);\n --lumo-contrast-80pct: var(--lumo-shade-80pct);\n --lumo-contrast-90pct: var(--lumo-shade-90pct);\n --lumo-contrast: var(--lumo-shade);\n\n /* Text */\n --lumo-header-text-color: var(--lumo-contrast);\n --lumo-body-text-color: var(--lumo-contrast-90pct);\n --lumo-secondary-text-color: var(--lumo-contrast-70pct);\n --lumo-tertiary-text-color: var(--lumo-contrast-50pct);\n --lumo-disabled-text-color: var(--lumo-contrast-30pct);\n\n /* Primary */\n --lumo-primary-color: hsl(214, 90%, 52%);\n --lumo-primary-color-50pct: hsla(214, 90%, 52%, 0.5);\n --lumo-primary-color-10pct: hsla(214, 90%, 52%, 0.1);\n --lumo-primary-text-color: var(--lumo-primary-color);\n --lumo-primary-contrast-color: #FFF;\n\n /* Error */\n --lumo-error-color: hsl(3, 100%, 61%);\n --lumo-error-color-50pct: hsla(3, 100%, 60%, 0.5);\n --lumo-error-color-10pct: hsla(3, 100%, 60%, 0.1);\n --lumo-error-text-color: hsl(3, 92%, 53%);\n --lumo-error-contrast-color: #FFF;\n\n /* Success */\n --lumo-success-color: hsl(145, 80%, 42%); /* hsl(144,82%,37%); */\n --lumo-success-color-50pct: hsla(145, 76%, 44%, 0.55);\n --lumo-success-color-10pct: hsla(145, 76%, 44%, 0.12);\n --lumo-success-text-color: hsl(145, 100%, 32%);\n --lumo-success-contrast-color: #FFF;\n }\n </style>\n</custom-style><dom-module id="lumo-color">\n <template>\n <style>\n [theme~="dark"] {\n /* Base (background) */\n --lumo-base-color: hsl(214, 35%, 21%);\n\n /* Tint */\n --lumo-tint-5pct: hsla(214, 65%, 85%, 0.06);\n --lumo-tint-10pct: hsla(214, 60%, 80%, 0.14);\n --lumo-tint-20pct: hsla(214, 64%, 82%, 0.23);\n --lumo-tint-30pct: hsla(214, 69%, 84%, 0.32);\n --lumo-tint-40pct: hsla(214, 73%, 86%, 0.41);\n --lumo-tint-50pct: hsla(214, 78%, 88%, 0.5);\n --lumo-tint-60pct: hsla(214, 82%, 90%, 0.6);\n --lumo-tint-70pct: hsla(214, 87%, 92%, 0.7);\n --lumo-tint-80pct: hsla(214, 91%, 94%, 0.8);\n --lumo-tint-90pct: hsla(214, 96%, 96%, 0.9);\n --lumo-tint: hsl(214, 100%, 98%);\n\n /* Shade */\n --lumo-shade-5pct: hsla(214, 0%, 0%, 0.07);\n --lumo-shade-10pct: hsla(214, 4%, 2%, 0.15);\n --lumo-shade-20pct: hsla(214, 8%, 4%, 0.23);\n --lumo-shade-30pct: hsla(214, 12%, 6%, 0.32);\n --lumo-shade-40pct: hsla(214, 16%, 8%, 0.41);\n --lumo-shade-50pct: hsla(214, 20%, 10%, 0.5);\n --lumo-shade-60pct: hsla(214, 24%, 12%, 0.6);\n --lumo-shade-70pct: hsla(214, 28%, 13%, 0.7);\n --lumo-shade-80pct: hsla(214, 32%, 13%, 0.8);\n --lumo-shade-90pct: hsla(214, 33%, 13%, 0.9);\n --lumo-shade: hsl(214, 33%, 13%);\n\n /* Contrast */\n --lumo-contrast-5pct: var(--lumo-tint-5pct);\n --lumo-contrast-10pct: var(--lumo-tint-10pct);\n --lumo-contrast-20pct: var(--lumo-tint-20pct);\n --lumo-contrast-30pct: var(--lumo-tint-30pct);\n --lumo-contrast-40pct: var(--lumo-tint-40pct);\n --lumo-contrast-50pct: var(--lumo-tint-50pct);\n --lumo-contrast-60pct: var(--lumo-tint-60pct);\n --lumo-contrast-70pct: var(--lumo-tint-70pct);\n --lumo-contrast-80pct: var(--lumo-tint-80pct);\n --lumo-contrast-90pct: var(--lumo-tint-90pct);\n --lumo-contrast: var(--lumo-tint);\n\n /* Text */\n --lumo-header-text-color: var(--lumo-contrast);\n --lumo-body-text-color: var(--lumo-contrast-90pct);\n --lumo-secondary-text-color: var(--lumo-contrast-70pct);\n --lumo-tertiary-text-color: var(--lumo-contrast-50pct);\n --lumo-disabled-text-color: var(--lumo-contrast-30pct);\n\n /* Primary */\n --lumo-primary-color: hsl(214, 86%, 55%);\n --lumo-primary-color-50pct: hsla(214, 86%, 55%, 0.5);\n --lumo-primary-color-10pct: hsla(214, 90%, 63%, 0.1);\n --lumo-primary-text-color: hsl(214, 100%, 70%);\n --lumo-primary-contrast-color: #FFF;\n\n /* Error */\n --lumo-error-color: hsl(3, 90%, 63%);\n --lumo-error-color-50pct: hsla(3, 90%, 63%, 0.5);\n --lumo-error-color-10pct: hsla(3, 90%, 63%, 0.1);\n --lumo-error-text-color: hsl(3, 100%, 67%);\n\n /* Success */\n --lumo-success-color: hsl(145, 65%, 42%);\n --lumo-success-color-50pct: hsla(145, 65%, 42%, 0.5);\n --lumo-success-color-10pct: hsla(145, 65%, 42%, 0.1);\n --lumo-success-text-color: hsl(145, 85%, 47%);\n }\n\n html {\n color: var(--lumo-body-text-color);\n background-color: var(--lumo-base-color);\n }\n\n [theme~="dark"] {\n color: var(--lumo-body-text-color);\n background-color: var(--lumo-base-color);\n }\n\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n color: var(--lumo-header-text-color);\n }\n\n a {\n color: var(--lumo-primary-text-color);\n }\n\n blockquote {\n color: var(--lumo-secondary-text-color);\n }\n\n code,\n pre {\n background-color: var(--lumo-contrast-10pct);\n border-radius: var(--lumo-border-radius-m);\n }\n </style>\n </template>\n</dom-module><dom-module id="lumo-color-legacy">\n <template>\n <style include="lumo-color">\n :host {\n color: var(--lumo-body-text-color) !important;\n background-color: var(--lumo-base-color) !important;\n }\n </style>\n </template>\n</dom-module>',document.head.appendChild(s.content);const a=document.createElement("template");a.innerHTML="<custom-style>\n <style>\n html {\n --lumo-size-xs: 1.625rem;\n --lumo-size-s: 1.875rem;\n --lumo-size-m: 2.25rem;\n --lumo-size-l: 2.75rem;\n --lumo-size-xl: 3.5rem;\n\n /* Icons */\n --lumo-icon-size-s: 1.25em;\n --lumo-icon-size-m: 1.5em;\n --lumo-icon-size-l: 2.25em;\n /* For backwards compatibility */\n --lumo-icon-size: var(--lumo-icon-size-m);\n }\n </style>\n</custom-style>",document.head.appendChild(a.content);const r=document.createElement("template");r.innerHTML="<custom-style>\n <style>\n html {\n /* Square */\n --lumo-space-xs: 0.25rem;\n --lumo-space-s: 0.5rem;\n --lumo-space-m: 1rem;\n --lumo-space-l: 1.5rem;\n --lumo-space-xl: 2.5rem;\n\n /* Wide */\n --lumo-space-wide-xs: calc(var(--lumo-space-xs) / 2) var(--lumo-space-xs);\n --lumo-space-wide-s: calc(var(--lumo-space-s) / 2) var(--lumo-space-s);\n --lumo-space-wide-m: calc(var(--lumo-space-m) / 2) var(--lumo-space-m);\n --lumo-space-wide-l: calc(var(--lumo-space-l) / 2) var(--lumo-space-l);\n --lumo-space-wide-xl: calc(var(--lumo-space-xl) / 2) var(--lumo-space-xl);\n\n /* Tall */\n --lumo-space-tall-xs: var(--lumo-space-xs) calc(var(--lumo-space-xs) / 2);\n --lumo-space-tall-s: var(--lumo-space-s) calc(var(--lumo-space-s) / 2);\n --lumo-space-tall-m: var(--lumo-space-m) calc(var(--lumo-space-m) / 2);\n --lumo-space-tall-l: var(--lumo-space-l) calc(var(--lumo-space-l) / 2);\n --lumo-space-tall-xl: var(--lumo-space-xl) calc(var(--lumo-space-xl) / 2);\n }\n </style>\n</custom-style>",document.head.appendChild(r.content);const i=document.createElement("template");i.innerHTML="<custom-style>\n <style>\n html {\n /* Border radius */\n --lumo-border-radius-s: 0.25em; /* Checkbox, badge, date-picker year indicator, etc */\n --lumo-border-radius-m: var(--lumo-border-radius, 0.25em); /* Button, text field, menu overlay, etc */\n --lumo-border-radius-l: 0.5em; /* Dialog, notification, etc */\n --lumo-border-radius: 0.25em; /* Deprecated */\n\n /* Shadow */\n --lumo-box-shadow-xs: 0 1px 4px -1px var(--lumo-shade-50pct);\n --lumo-box-shadow-s: 0 2px 4px -1px var(--lumo-shade-20pct), 0 3px 12px -1px var(--lumo-shade-30pct);\n --lumo-box-shadow-m: 0 2px 6px -1px var(--lumo-shade-20pct), 0 8px 24px -4px var(--lumo-shade-40pct);\n --lumo-box-shadow-l: 0 3px 18px -2px var(--lumo-shade-20pct), 0 12px 48px -6px var(--lumo-shade-40pct);\n --lumo-box-shadow-xl: 0 4px 24px -3px var(--lumo-shade-20pct), 0 18px 64px -8px var(--lumo-shade-40pct);\n\n /* Clickable element cursor */\n --lumo-clickable-cursor: default;\n }\n </style>\n</custom-style>",document.head.appendChild(i.content);const c=document.createElement("template");c.innerHTML='<custom-style>\n <style>\n html {\n /* Font families */\n --lumo-font-family: -apple-system, BlinkMacSystemFont, "Roboto", "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";\n\n /* Font sizes */\n --lumo-font-size-xxs: .75rem;\n --lumo-font-size-xs: .8125rem;\n --lumo-font-size-s: .875rem;\n --lumo-font-size-m: 1rem;\n --lumo-font-size-l: 1.125rem;\n --lumo-font-size-xl: 1.375rem;\n --lumo-font-size-xxl: 1.75rem;\n --lumo-font-size-xxxl: 2.5rem;\n\n /* Line heights */\n --lumo-line-height-xs: 1.25;\n --lumo-line-height-s: 1.375;\n --lumo-line-height-m: 1.625;\n }\n\n </style>\n</custom-style><dom-module id="lumo-typography">\n <template>\n <style>\n html {\n font-family: var(--lumo-font-family);\n font-size: var(--lumo-font-size, var(--lumo-font-size-m));\n line-height: var(--lumo-line-height-m);\n -webkit-text-size-adjust: 100%;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n\n /* Can’t combine with the above selector because that doesn’t work in browsers without native shadow dom */\n :host {\n font-family: var(--lumo-font-family);\n font-size: var(--lumo-font-size, var(--lumo-font-size-m));\n line-height: var(--lumo-line-height-m);\n -webkit-text-size-adjust: 100%;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n\n small,\n [theme~="font-size-s"] {\n font-size: var(--lumo-font-size-s);\n line-height: var(--lumo-line-height-s);\n }\n\n [theme~="font-size-xs"] {\n font-size: var(--lumo-font-size-xs);\n line-height: var(--lumo-line-height-xs);\n }\n\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n font-weight: 600;\n line-height: var(--lumo-line-height-xs);\n margin-top: 1.25em;\n }\n\n h1 {\n font-size: var(--lumo-font-size-xxxl);\n margin-bottom: 0.75em;\n }\n\n h2 {\n font-size: var(--lumo-font-size-xxl);\n margin-bottom: 0.5em;\n }\n\n h3 {\n font-size: var(--lumo-font-size-xl);\n margin-bottom: 0.5em;\n }\n\n h4 {\n font-size: var(--lumo-font-size-l);\n margin-bottom: 0.5em;\n }\n\n h5 {\n font-size: var(--lumo-font-size-m);\n margin-bottom: 0.25em;\n }\n\n h6 {\n font-size: var(--lumo-font-size-xs);\n margin-bottom: 0;\n text-transform: uppercase;\n letter-spacing: 0.03em;\n }\n\n p,\n blockquote {\n margin-top: 0.5em;\n margin-bottom: 0.75em;\n }\n\n a {\n text-decoration: none;\n }\n\n a:hover {\n text-decoration: underline;\n }\n\n hr {\n display: block;\n align-self: stretch;\n height: 1px;\n border: 0;\n padding: 0;\n margin: var(--lumo-space-s) calc(var(--lumo-border-radius-m) / 2);\n background-color: var(--lumo-contrast-10pct);\n }\n\n blockquote {\n border-left: 2px solid var(--lumo-contrast-30pct);\n }\n\n b,\n strong {\n font-weight: 600;\n }\n\n /* RTL specific styles */\n\n blockquote[dir="rtl"] {\n border-left: none;\n border-right: 2px solid var(--lumo-contrast-30pct);\n }\n\n </style>\n </template>\n</dom-module>',document.head.appendChild(c.content);
2
+ /**
3
+ @license
4
+ Copyright (c) 2017 Vaadin Ltd.
5
+ This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
6
+ */
7
+ let m=!1;window.addEventListener("keydown",(()=>{m=!0}),{capture:!0}),window.addEventListener("mousedown",(()=>{m=!1}),{capture:!0});const u=t=>class extends((t=>class extends t{static get properties(){var t={tabindex:{type:Number,value:0,reflectToAttribute:!0,observer:"_tabindexChanged"}};return window.ShadyDOM&&(t.tabIndex=t.tabindex),t}})(t)){static get properties(){return{autofocus:{type:Boolean},_previousTabIndex:{type:Number},disabled:{type:Boolean,observer:"_disabledChanged",reflectToAttribute:!0},_isShiftTabbing:{type:Boolean}}}ready(){this.addEventListener("focusin",(t=>{t.composedPath()[0]===this?this.contains(t.relatedTarget)||this._focus():-1===t.composedPath().indexOf(this.focusElement)||this.disabled||this._setFocused(!0)})),this.addEventListener("focusout",(t=>this._setFocused(!1))),super.ready();const t=t=>{t.composed||t.target.dispatchEvent(new CustomEvent(t.type,{bubbles:!0,composed:!0,cancelable:!1}))};this.shadowRoot.addEventListener("focusin",t),this.shadowRoot.addEventListener("focusout",t),this.addEventListener("keydown",(t=>{if(!t.defaultPrevented&&9===t.keyCode)if(t.shiftKey)this._isShiftTabbing=!0,HTMLElement.prototype.focus.apply(this),this._setFocused(!1),setTimeout((()=>this._isShiftTabbing=!1),0);else{const t=window.navigator.userAgent.match(/Firefox\/(\d\d\.\d)/);if(t&&parseFloat(t[1])>=63&&parseFloat(t[1])<66&&this.parentNode&&this.nextSibling){const t=document.createElement("input");t.style.position="absolute",t.style.opacity="0",t.tabIndex=this.tabIndex,this.parentNode.insertBefore(t,this.nextSibling),t.focus(),t.addEventListener("focusout",(()=>this.parentNode.removeChild(t)))}}})),this.autofocus&&!this.disabled&&window.requestAnimationFrame((()=>{this._focus(),this._setFocused(!0),this.setAttribute("focus-ring","")}))}disconnectedCallback(){super.disconnectedCallback(),this.hasAttribute("focused")&&this._setFocused(!1)}_setFocused(t){t?this.setAttribute("focused",""):this.removeAttribute("focused"),t&&m?this.setAttribute("focus-ring",""):this.removeAttribute("focus-ring")}get focusElement(){return window.console.warn(`Please implement the 'focusElement' property in <${this.localName}>`),this}_focus(){this.focusElement&&!this._isShiftTabbing&&(this.focusElement.focus(),this._setFocused(!0))}focus(){this.focusElement&&!this.disabled&&(this.focusElement.focus(),this._setFocused(!0))}blur(){this.focusElement&&(this.focusElement.blur(),this._setFocused(!1))}_disabledChanged(t){this.focusElement.disabled=t,t?(this.blur(),this._previousTabIndex=this.tabindex,this.tabindex=-1,this.setAttribute("aria-disabled","true")):(void 0!==this._previousTabIndex&&(this.tabindex=this._previousTabIndex),this.removeAttribute("aria-disabled"))}_tabindexChanged(t){void 0!==t&&(this.focusElement.tabIndex=t),this.disabled&&this.tabindex&&(-1!==this.tabindex&&(this._previousTabIndex=this.tabindex),this.tabindex=t=void 0),window.ShadyDOM&&this.setProperties({tabIndex:t,tabindex:t})}click(){this.disabled||super.click()}},d=t=>class extends t{static get properties(){return{theme:{type:String,readOnly:!0}}}attributeChangedCallback(t,e,n){super.attributeChangedCallback(t,e,n),"theme"===t&&this._setTheme(n)}},h=e=>class extends(d(e)){static finalize(){super.finalize();const t=this.prototype._template,e=this.template&&this.template.parentElement&&this.template.parentElement.id===this.is,n=Object.getPrototypeOf(this.prototype)._template;n&&!e&&Array.from(n.content.querySelectorAll("style[include]")).forEach((e=>{this._includeStyle(e.getAttribute("include"),t)})),this._includeMatchingThemes(t)}static _includeMatchingThemes(e){const n=t.prototype.modules;let o=!1;const l=this.is+"-default-theme";Object.keys(n).sort(((t,e)=>{const n=0===t.indexOf("vaadin-"),o=0===e.indexOf("vaadin-"),l=["lumo-","material-"],s=l.filter((e=>0===t.indexOf(e))).length>0,a=l.filter((t=>0===e.indexOf(t))).length>0;return n!==o?n?-1:1:s!==a?s?-1:1:0})).forEach((t=>{if(t!==l){const l=n[t].getAttribute("theme-for");l&&l.split(" ").forEach((n=>{new RegExp("^"+n.split("*").join(".*")+"$").test(this.is)&&(o=!0,this._includeStyle(t,e))}))}})),!o&&n[l]&&this._includeStyle(l,e)}static _includeStyle(t,e){if(e&&!e.content.querySelector(`style[include="${t}"]`)){const n=document.createElement("style");n.setAttribute("include",t),e.content.appendChild(n)}}}
8
+ /**
9
+ @license
10
+ Copyright (c) 2020 Vaadin Ltd.
11
+ This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
12
+ */;class p{static detectScrollType(){const t=document.createElement("div");t.textContent="ABCD",t.dir="rtl",t.style.fontSize="14px",t.style.width="4px",t.style.height="1px",t.style.position="absolute",t.style.top="-1000px",t.style.overflow="scroll",document.body.appendChild(t);let e="reverse";return t.scrollLeft>0?e="default":(t.scrollLeft=2,t.scrollLeft<2&&(e="negative")),document.body.removeChild(t),e}static getNormalizedScrollLeft(t,e,n){const{scrollLeft:o}=n;if("rtl"!==e||!t)return o;switch(t){case"negative":return n.scrollWidth-n.clientWidth+o;case"reverse":return n.scrollWidth-n.clientWidth-o}return o}static setNormalizedScrollLeft(t,e,n,o){if("rtl"===e&&t)switch(t){case"negative":n.scrollLeft=n.clientWidth-n.scrollWidth+o;break;case"reverse":n.scrollLeft=n.scrollWidth-n.clientWidth-o;break;default:n.scrollLeft=o}else n.scrollLeft=o}}const b=[];let f;new MutationObserver((function(){const t=x();b.forEach((e=>{v(e,t)}))})).observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]});const v=function(t,e){e?t.setAttribute("dir",e):t.removeAttribute("dir")},x=function(){return document.documentElement.getAttribute("dir")},y=t=>class extends t{static get properties(){return{dir:{type:String,readOnly:!0}}}static finalize(){super.finalize(),f||(f=p.detectScrollType())}connectedCallback(){super.connectedCallback(),this.hasAttribute("dir")||(this.__subscribe(),v(this,x()))}attributeChangedCallback(t,e,n){if(super.attributeChangedCallback(t,e,n),"dir"!==t)return;const o=n===x()&&-1===b.indexOf(this),l=!n&&e&&-1===b.indexOf(this),s=n!==x()&&e===x();o||l?(this.__subscribe(),v(this,x())):s&&this.__subscribe(!1)}disconnectedCallback(){super.disconnectedCallback(),this.__subscribe(!1),this.removeAttribute("dir")}__subscribe(t=!0){t?-1===b.indexOf(this)&&b.push(this):b.indexOf(this)>-1&&b.splice(b.indexOf(this),1)}__getNormalizedScrollLeft(t){return p.getNormalizedScrollLeft(f,this.getAttribute("dir")||"ltr",t)}__setNormalizedScrollLeft(t,e){return p.setNormalizedScrollLeft(f,this.getAttribute("dir")||"ltr",t,e)}},g=/\/\*\*\s+vaadin-dev-mode:start([\s\S]*)vaadin-dev-mode:end\s+\*\*\//i,w=window.Vaadin&&window.Vaadin.Flow&&window.Vaadin.Flow.clients;function z(t,e){if("function"!=typeof t)return;const n=g.exec(t.toString());if(n)try{t=new Function(n[1])}catch(t){console.log("vaadin-development-mode-detector: uncommentAndRun() failed",t)}return t(e)}window.Vaadin=window.Vaadin||{};const k=function(t,e){if(window.Vaadin.developmentMode)return z(t,e)};function _(){}void 0===window.Vaadin.developmentMode&&(window.Vaadin.developmentMode=function(){try{return!!localStorage.getItem("vaadin.developmentmode.force")||["localhost","127.0.0.1"].indexOf(window.location.hostname)>=0&&(w?!(w&&Object.keys(w).map((t=>w[t])).filter((t=>t.productionMode)).length>0):!z((function(){return!0})))}catch(t){return!1}}());const E=function(){return k(_)};let C;window.Vaadin||(window.Vaadin={}),window.Vaadin.registrations=window.Vaadin.registrations||[],window.Vaadin.developmentModeCallback=window.Vaadin.developmentModeCallback||{},window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]=function(){E&&E()};const S=new Set,F=t=>class extends(y(t)){static finalize(){super.finalize();const{is:t}=this;t&&!S.has(t)&&(window.Vaadin.registrations.push(this),S.add(t),window.Vaadin.developmentModeCallback&&(C=e.debounce(C,n,(()=>{window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]()})),o(C)))}constructor(){super(),null===document.doctype&&console.warn('Vaadin components require the "standards mode" declaration. Please add <!DOCTYPE html> to the HTML document.')}};export{u as C,y as D,F as E,h as T,p as a};
@@ -1 +1 @@
1
- import{A as e,a7 as t}from"./shared-82dd0556.js";import{d as s}from"./shared-d97a6ee5.js";var n=function(e,t,s,n){return new(s||(s=Promise))((function(i,o){function r(e){try{c(n.next(e))}catch(e){o(e)}}function a(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof s?t:new s((function(e){e(t)}))).then(r,a)}c((n=n.apply(e,t||[])).next())}))};class i extends e{constructor(e){super(Object.assign(Object.assign({},e),{fetch:(...e)=>this.__fetch(...e)}))}signIn(t){return n(this,void 0,void 0,(function*(){i.v8n.credentials.check(t);const s=yield this.fetch(new URL("./authenticate",this.base).toString(),{body:JSON.stringify(t),method:"POST"});if(!s.ok){const t=401===s.status?"UNAUTHORIZED":"UNKNOWN";throw new e.AuthError({code:t})}{const e=yield s.json(),t=Object.assign(Object.assign({},e),{date_created:(new Date).toISOString()});this.storage.setItem(i.SESSION,JSON.stringify(t))}}))}sendPasswordResetEmail(t){return n(this,void 0,void 0,(function*(){i.v8n.email.check(t.email);if(!(yield this.fetch(new URL("./forgot_password",this.base).toString(),{body:JSON.stringify(t),method:"POST"})).ok)throw new e.AuthError({code:"UNKNOWN"})}))}signOut(){return n(this,void 0,void 0,(function*(){if(!(yield this.fetch(new URL("./authenticate",this.base).toString(),{method:"DELETE"})).ok)throw new e.AuthError({code:"UNKNOWN"});this.storage.clear(),this.cache.clear()}))}__fetch(e,t){var o;return n(this,void 0,void 0,(function*(){let n=JSON.parse(null!==(o=this.storage.getItem(i.SESSION))&&void 0!==o?o:"null");const r=new s.Request(e,t);if(null!==n){new Date(n.date_created).getTime()+1e3*n.expires_in<Date.now()?(this.console.info("Session has expired, signing out."),this.storage.clear(),this.cache.clear(),n=null):r.headers.set("Authorization",`Bearer ${n.session_token}`)}r.headers.set("Content-Type","application/json"),r.headers.set("FOXY-API-VERSION","1"),this.console.trace(`${r.method} ${r.url}`);const a=yield s.fetch(r);if(n&&a.ok){const e=Object.assign(Object.assign({},n),{date_created:(new Date).toISOString()});this.storage.setItem(i.SESSION,JSON.stringify(e))}return a}))}}i.SESSION="session",i.v8n=Object.assign({},e.v8n,{credentials:t().schema({email:t().string(),newPassword:t().optional(t().string()),password:t().string()}),email:t().string()});let o=/(-?(?:\d+\.?\d*|\d*\.?\d+)(?:e[-+]?\d+)?)\s*([a-zµμ]*)/gi;function r(e="",t="ms"){var s=null;return(e=e.replace(/(\d),(\d)/g,"$1$2")).replace(o,(function(e,t,n){(n=r[n]||r[n.toLowerCase().replace(/s$/,"")])&&(s=(s||0)+parseFloat(t,10)*n)})),s&&s/r[t]}r.nanosecond=r.ns=1e-6,r["µs"]=r["μs"]=r.us=r.microsecond=.001,r.millisecond=r.ms=1,r.second=r.sec=r.s=1e3*r.ms,r.minute=r.min=r.m=60*r.s,r.hour=r.hr=r.h=60*r.m,r.day=r.d=24*r.h,r.week=r.wk=r.w=7*r.d,r.month=r.b=30.4375*r.d,r.year=r.yr=r.y=365.25*r.d;export{i as A,r as p};
1
+ import{A as e,a7 as t}from"./shared-1761daef.js";import{d as s}from"./shared-63eaded9.js";var n=function(e,t,s,n){return new(s||(s=Promise))((function(i,o){function r(e){try{c(n.next(e))}catch(e){o(e)}}function a(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof s?t:new s((function(e){e(t)}))).then(r,a)}c((n=n.apply(e,t||[])).next())}))};class i extends e{constructor(e){super(Object.assign(Object.assign({},e),{fetch:(...e)=>this.__fetch(...e)}))}signIn(t){return n(this,void 0,void 0,(function*(){i.v8n.credentials.check(t);const s=yield this.fetch(new URL("./authenticate",this.base).toString(),{body:JSON.stringify(t),method:"POST"});if(!s.ok){const t=401===s.status?"UNAUTHORIZED":"UNKNOWN";throw new e.AuthError({code:t})}{const e=yield s.json(),t=Object.assign(Object.assign({},e),{date_created:(new Date).toISOString()});this.storage.setItem(i.SESSION,JSON.stringify(t))}}))}sendPasswordResetEmail(t){return n(this,void 0,void 0,(function*(){i.v8n.email.check(t.email);if(!(yield this.fetch(new URL("./forgot_password",this.base).toString(),{body:JSON.stringify(t),method:"POST"})).ok)throw new e.AuthError({code:"UNKNOWN"})}))}signOut(){return n(this,void 0,void 0,(function*(){if(!(yield this.fetch(new URL("./authenticate",this.base).toString(),{method:"DELETE"})).ok)throw new e.AuthError({code:"UNKNOWN"});this.storage.clear(),this.cache.clear()}))}__fetch(e,t){var o;return n(this,void 0,void 0,(function*(){let n=JSON.parse(null!==(o=this.storage.getItem(i.SESSION))&&void 0!==o?o:"null");const r=new s.Request(e,t);if(null!==n){new Date(n.date_created).getTime()+1e3*n.expires_in<Date.now()?(this.console.info("Session has expired, signing out."),this.storage.clear(),this.cache.clear(),n=null):r.headers.set("Authorization",`Bearer ${n.session_token}`)}r.headers.set("Content-Type","application/json"),r.headers.set("FOXY-API-VERSION","1"),this.console.trace(`${r.method} ${r.url}`);const a=yield s.fetch(r);if(n&&a.ok){const e=Object.assign(Object.assign({},n),{date_created:(new Date).toISOString()});this.storage.setItem(i.SESSION,JSON.stringify(e))}return a}))}}i.SESSION="session",i.v8n=Object.assign({},e.v8n,{credentials:t().schema({email:t().string(),newPassword:t().optional(t().string()),password:t().string()}),email:t().string()});let o=/(-?(?:\d+\.?\d*|\d*\.?\d+)(?:e[-+]?\d+)?)\s*([a-zµμ]*)/gi;function r(e="",t="ms"){var s=null;return(e=e.replace(/(\d),(\d)/g,"$1$2")).replace(o,(function(e,t,n){(n=r[n]||r[n.toLowerCase().replace(/s$/,"")])&&(s=(s||0)+parseFloat(t,10)*n)})),s&&s/r[t]}r.nanosecond=r.ns=1e-6,r["µs"]=r["μs"]=r.us=r.microsecond=.001,r.millisecond=r.ms=1,r.second=r.sec=r.s=1e3*r.ms,r.minute=r.min=r.m=60*r.s,r.hour=r.hr=r.h=60*r.m,r.day=r.d=24*r.h,r.week=r.wk=r.w=7*r.d,r.month=r.b=30.4375*r.d,r.year=r.yr=r.y=365.25*r.d;export{i as A,r as p};
@@ -1,4 +1,4 @@
1
- import{T as e,D as t,E as i,C as s}from"./shared-04b77f79.js";import{h as o,P as n,a as r,t as a,F as l,b as h,q as d,i as c,e as u,I as _,J as m}from"./shared-ff79f3f9.js";import"./shared-dce03b47.js";import{t as p,m as v,F as f,P as g,f as y,d as b,O as I,D as x,a as w}from"./shared-46ee137f.js";
1
+ import{T as e,D as t,E as i,C as s}from"./shared-df573cea.js";import{h as o,P as n,a as r,t as a,F as l,b as h,q as d,i as c,e as u,I as _,J as m}from"./shared-ff79f3f9.js";import"./shared-bb824ab4.js";import{t as p,m as v,F as f,P as g,f as y,d as b,O as I,D as x,a as w}from"./shared-46ee137f.js";
2
2
  /**
3
3
  @license
4
4
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -1 +1 @@
1
- import"./shared-04b77f79.js";import"./shared-46ee137f.js";const c=document.createElement("template");c.innerHTML='<iron-iconset-svg size="1000" name="lumo">\n<svg xmlns="http://www.w3.org/2000/svg">\n<defs>\n<g id="angle-down"><path d="M283 391c-18-16-46-15-63 4-16 18-15 46 3 63l244 224c17 15 43 15 60 0l250-229c18-16 20-45 3-63-16-18-45-20-63-4l-220 203-214-198z"></path></g>\n<g id="angle-left"><path d="M601 710c16 18 15 46-3 63-18 16-46 15-63-4l-224-244c-15-17-15-43 0-59l229-250c16-18 45-20 63-4 18 16 20 45 3 63l-203 220 198 215z"></path></g>\n<g id="angle-right"><path d="M399 275c-16-18-15-46 3-63 18-16 46-15 63 4l224 244c15 17 15 43 0 59l-229 250c-16 18-45 20-63 4-18-16-20-45-3-63l203-220-198-215z"></path></g>\n<g id="angle-up"><path d="M283 635c-18 16-46 15-63-3-16-18-15-46 3-63l244-224c17-15 43-15 60 0l250 229c18 16 20 45 3 63-16 18-45 20-63 3l-220-202L283 635z"></path></g>\n<g id="arrow-down"><path d="M538 646l125-112c15-14 39-12 53 4 14 15 12 39-4 53l-187 166c0 0 0 0 0 0-14 13-36 12-50 0l-187-166c-15-14-17-37-4-53 14-15 37-17 53-4L462 646V312c0-21 17-38 38-37s38 17 37 37v334z"></path></g>\n<g id="arrow-left"><path d="M375 538l111 125c14 15 12 39-3 53-15 14-39 12-53-4l-166-187c0 0 0 0 0 0-13-14-12-36 0-50l166-187c14-15 37-17 53-4 15 14 17 37 3 53L375 463h333c21 0 38 17 38 37 0 21-17 38-38 38h-333z"></path></g>\n<g id="arrow-right"><path d="M625 538h-333c-21 0-38-17-38-38 0-21 17-38 38-37h333l-111-126c-14-15-12-39 3-53 15-14 39-12 53 4l166 187c13 14 13 36 0 50 0 0 0 0 0 0l-166 187c-14 15-37 17-53 4-15-14-17-37-3-53l111-125z"></path></g>\n<g id="arrow-up"><path d="M538 354V688c0 21-17 38-38 37s-38-17-38-38V354l-125 112c-15 14-39 12-53-4-14-15-12-39 4-53l187-166c14-13 36-13 50 0 0 0 0 0 0 0l187 166c15 14 17 37 4 53-14 15-37 17-53 4L538 354z"></path></g>\n<g id="bar-chart"><path d="M175 500h108c28 0 50 22 50 50v233c0 28-22 50-50 50H175c-28 0-50-22-50-50v-233c0-28 22-50 50-50z m33 67c-9 0-17 7-16 16v167c0 9 7 17 16 17h42c9 0 17-7 17-17v-167c0-9-7-17-17-16H208zM446 167h108c28 0 50 22 50 50v566c0 28-22 50-50 50h-108c-28 0-50-22-50-50V217c0-28 22-50 50-50z m33 66c-9 0-17 7-17 17v500c0 9 7 17 17 17h42c9 0 17-7 16-17V250c0-9-7-17-16-17h-42zM717 333h108c28 0 50 22 50 50v400c0 28-22 50-50 50h-108c-28 0-50-22-50-50V383c0-28 22-50 50-50z m33 67c-9 0-17 7-17 17v333c0 9 7 17 17 17h42c9 0 17-7 16-17v-333c0-9-7-17-16-17h-42z"></path></g>\n<g id="bell"><path d="M367 675H292v-258C292 325 366 250 459 250H458V208c0-23 18-42 42-41 23 0 42 18 42 41v42h-1C634 250 708 325 708 417V675h-75v-258c0-51-41-92-91-92h-84C408 325 367 366 367 417V675z m-159 37c0-21 17-38 38-37h508c21 0 37 17 38 37 0 21-17 38-38 38H246C225 750 208 733 208 713z m230 71h125v32c0 17-14 31-32 31h-62c-17 0-32-14-31-31v-32z"></path></g>\n<g id="calendar"><path d="M375 208h250v-20C625 176 634 167 646 167h41C699 167 708 176 708 188V208h74c23 0 41 19 41 42v42C823 315 804 333 782 333H218C196 333 177 315 177 292V250C177 227 196 208 218 208H292v-20C292 176 301 167 313 167h41C366 167 375 176 375 188V208zM229 375h42C283 375 292 384 292 396v41C292 449 282 458 271 458h-42C217 458 208 449 208 437v-41C208 384 218 375 229 375z m125 0h42C408 375 417 384 417 396v41C417 449 407 458 396 458h-42C342 458 333 449 333 437v-41C333 384 343 375 354 375z m125 0h42C533 375 542 384 542 396v41C542 449 532 458 521 458h-42C467 458 458 449 458 437v-41C458 384 468 375 479 375z m-250 125h42C283 500 292 509 292 521v41C292 574 282 583 271 583h-42C217 583 208 574 208 562v-41C208 509 218 500 229 500z m125 0h42C408 500 417 509 417 521v41C417 574 407 583 396 583h-42C342 583 333 574 333 562v-41C333 509 343 500 354 500z m125 0h42c12 0 21 9 21 21v41C542 574 532 583 521 583h-42C467 583 458 574 458 562v-41C458 509 468 500 479 500z m-250 125h42C283 625 292 634 292 646v41C292 699 282 708 271 708h-42C217 708 208 699 208 687v-41C208 634 218 625 229 625z m125 0h42C408 625 417 634 417 646v41C417 699 407 708 396 708h-42C342 708 333 699 333 687v-41C333 634 343 625 354 625z m125 0h42c12 0 21 9 21 21v41C542 699 532 708 521 708h-42C467 708 458 699 458 687v-41C458 634 468 625 479 625z m125-250h42C658 375 667 384 667 396v41C667 449 657 458 646 458h-42C592 458 583 449 583 437v-41C583 384 593 375 604 375z m0 125h42c12 0 21 9 21 21v41C667 574 657 583 646 583h-42C592 583 583 574 583 562v-41C583 509 593 500 604 500z m0 125h42c12 0 21 9 21 21v41C667 699 657 708 646 708h-42C592 708 583 699 583 687v-41C583 634 593 625 604 625z m125 0h42c12 0 21 9 21 21v41C792 699 782 708 771 708h-42C717 708 708 699 708 687v-41C708 634 718 625 729 625z m-500 125h42C283 750 292 759 292 771v41C292 824 282 833 271 833h-42C217 833 208 824 208 812v-41C208 759 218 750 229 750z m125 0h42C408 750 417 759 417 771v41C417 824 407 833 396 833h-42C342 833 333 824 333 812v-41C333 759 343 750 354 750z m125 0h42c12 0 21 9 21 21v41C542 824 532 833 521 833h-42C467 833 458 824 458 812v-41C458 759 468 750 479 750z m125 0h42c12 0 21 9 21 21v41C667 824 657 833 646 833h-42C592 833 583 824 583 812v-41C583 759 593 750 604 750z m125 0h42c12 0 21 9 21 21v41C792 824 782 833 771 833h-42C717 833 708 824 708 812v-41C708 759 718 750 729 750z m0-250h42c12 0 21 9 21 21v41C792 574 782 583 771 583h-42C717 583 708 574 708 562v-41C708 509 718 500 729 500z m0-125h42C783 375 792 384 792 396v41C792 449 782 458 771 458h-42C717 458 708 449 708 437v-41C708 384 718 375 729 375z"></path></g>\n<g id="checkmark"><path d="M318 493c-15-15-38-15-53 0-15 15-15 38 0 53l136 136c15 15 38 15 53 0l323-322c15-15 15-38 0-53-15-15-38-15-54 0l-295 296-110-110z"></path></g>\n<g id="chevron-down"><path d="M533 654l210-199c9-9 9-23 0-32C739 419 733 417 726 417H274C261 417 250 427 250 439c0 6 2 12 7 16l210 199c18 17 48 17 66 0z"></path></g>\n<g id="chevron-left"><path d="M346 533l199 210c9 9 23 9 32 0 4-4 7-10 6-17V274C583 261 573 250 561 250c-6 0-12 2-16 7l-199 210c-17 18-17 48 0 66z"></path></g>\n<g id="chevron-right"><path d="M654 533L455 743c-9 9-23 9-32 0C419 739 417 733 417 726V274C417 261 427 250 439 250c6 0 12 2 16 7l199 210c17 18 17 48 0 66z"></path></g>\n<g id="chevron-up"><path d="M533 346l210 199c9 9 9 23 0 32-4 4-10 7-17 6H274C261 583 250 573 250 561c0-6 2-12 7-16l210-199c18-17 48-17 66 0z"></path></g>\n<g id="clock"><path d="M538 489l85 85c15 15 15 38 0 53-15 15-38 15-53 0l-93-93a38 38 0 0 1-2-2C467 525 462 515 462 504V308c0-21 17-38 38-37 21 0 38 17 37 37v181zM500 833c-184 0-333-149-333-333s149-333 333-333 333 149 333 333-149 333-333 333z m0-68c146 0 265-118 265-265 0-146-118-265-265-265-146 0-265 118-265 265 0 146 118 265 265 265z"></path></g>\n<g id="cog"><path d="M833 458l-81-18c-8-25-17-50-29-75L767 292 708 233l-72 49c-21-12-46-25-75-30L542 167h-84l-19 79c-25 8-50 17-71 30L296 233 233 296l47 69c-12 21-21 46-29 71L167 458v84l84 25c8 25 17 50 29 75L233 708 292 767l76-44c21 12 46 25 75 29L458 833h84l19-81c25-8 50-17 75-29L708 767l59-59-44-66c12-21 25-46 29-75L833 542v-84z m-333 217c-96 0-175-79-175-175 0-96 79-175 175-175 96 0 175 79 175 175 0 96-79 175-175 175z"></path></g>\n<g id="cross"><path d="M445 500l-142-141c-15-15-15-40 0-56 15-15 40-15 56 0L500 445l141-142c15-15 40-15 56 0 15 15 15 40 0 56L555 500l142 141c15 15 15 40 0 56-15 15-40 15-56 0L500 555l-141 142c-15 15-40 15-56 0-15-15-15-40 0-56L445 500z"></path></g>\n<g id="download"><path d="M538 521l125-112c15-14 39-12 53 4 14 15 12 39-4 53l-187 166a38 38 0 0 1 0 0c-14 13-36 12-50 0l-187-166c-15-14-17-37-4-53 14-15 37-17 53-4L462 521V188c0-21 17-38 38-38s38 17 37 38v333zM758 704c0-21 17-38 38-37 21 0 38 17 37 37v92c0 21-17 38-37 37H204c-21 0-38-17-37-37v-92c0-21 17-38 37-37s38 17 38 37v54h516v-54z"></path></g>\n<g id="dropdown"><path d="M317 393c-15-14-39-13-53 3-14 15-13 39 3 53l206 189c14 13 36 13 50 0l210-193c15-14 17-38 3-53-14-15-38-17-53-3l-185 171L317 393z"></path></g>\n<g id="edit"><path d="M673 281l62 56-205 233c-9 10-38 24-85 39a8 8 0 0 1-5 0c-4-1-7-6-6-10l0 0c14-47 25-76 35-86l204-232z m37-42l52-59c15-17 41-18 58-2 17 16 18 42 3 59L772 295l-62-56zM626 208l-67 75h-226C305 283 283 306 283 333v334C283 695 306 717 333 717h334c28 0 50-22 50-50v-185L792 398v269C792 736 736 792 667 792H333C264 792 208 736 208 667V333C208 264 264 208 333 208h293z"></path></g>\n<g id="error"><path d="M500 833c-184 0-333-149-333-333s149-333 333-333 333 149 333 333-149 333-333 333z m0-68c146 0 265-118 265-265 0-146-118-265-265-265-146 0-265 118-265 265 0 146 118 265 265 265zM479 292h42c12 0 21 9 20 20l-11 217c0 8-6 13-13 13h-34c-7 0-13-6-13-13l-11-217C459 301 468 292 479 292zM483 608h34c12 0 21 9 20 21v33c0 12-9 21-20 21h-34c-12 0-21-9-21-21v-33c0-12 9-21 21-21z"></path></g>\n<g id="eye"><path d="M500 750c-187 0-417-163-417-250s230-250 417-250 417 163 417 250-230 250-417 250z m-336-231c20 22 47 46 78 69C322 644 411 678 500 678s178-34 258-90c31-22 59-46 78-69 6-7 12-14 16-19-4-6-9-12-16-19-20-22-47-46-78-69C678 356 589 322 500 322s-178 34-258 90c-31 22-59 46-78 69-6 7-12 14-16 19 4 6 9 12 16 19zM500 646c-81 0-146-65-146-146s65-146 146-146 146 65 146 146-65 146-146 146z m0-75c39 0 71-32 71-71 0-39-32-71-71-71-39 0-71 32-71 71 0 39 32 71 71 71z"></path></g>\n<g id="eye-disabled"><path d="M396 735l60-60c15 2 30 3 44 3 89 0 178-34 258-90 31-22 59-46 78-69 6-7 12-14 16-19-4-6-9-12-16-19-20-22-47-46-78-69-8-5-15-11-23-15l50-51C862 397 917 458 917 500c0 87-230 250-417 250-34 0-69-5-104-15zM215 654C138 603 83 542 83 500c0-87 230-250 417-250 34 0 69 5 104 15l-59 60c-15-2-30-3-45-3-89 0-178 34-258 90-31 22-59 46-78 69-6 7-12 14-16 19 4 6 9 12 16 19 20 22 47 46 78 69 8 5 16 11 24 16L215 654z m271-9l159-159c0 5 1 9 1 14 0 81-65 146-146 146-5 0-9 0-14-1z m-131-131C354 510 354 505 354 500c0-81 65-146 146-146 5 0 10 0 14 1l-159 159z m-167 257L780 179c12-12 32-12 44 0 12 12 12 32 0 44L232 815c-12 12-32 12-44 0s-12-32 0-44z"></path></g>\n<g id="menu"><path d="M167 292c0-23 19-42 41-42h584C815 250 833 268 833 292c0 23-19 42-41 41H208C185 333 167 315 167 292z m0 208c0-23 19-42 41-42h584C815 458 833 477 833 500c0 23-19 42-41 42H208C185 542 167 523 167 500z m0 208c0-23 19-42 41-41h584C815 667 833 685 833 708c0 23-19 42-41 42H208C185 750 167 732 167 708z"></path></g>\n<g id="minus"><path d="M261 461c-22 0-39 18-39 39 0 22 18 39 39 39h478c22 0 39-18 39-39 0-22-18-39-39-39H261z"></path></g>\n<g id="ordered-list"><path d="M138 333V198H136l-43 28v-38l45-31h45V333H138z m-61 128c0-35 27-59 68-59 39 0 66 21 66 53 0 20-11 37-43 64l-29 27v2h74V583H80v-30l55-52c26-24 32-33 33-43 0-13-10-22-24-22-15 0-26 10-26 25v1h-41v-1zM123 759v-31h21c15 0 25-8 25-21 0-13-10-21-25-21-15 0-26 9-26 23h-41c1-34 27-56 68-57 39 0 66 20 66 49 0 20-14 36-33 39v3c24 3 40 19 39 41 0 32-30 54-73 54-41 0-69-22-70-57h43c1 13 11 22 28 22 16 0 27-9 27-22 0-14-10-22-28-22h-21zM333 258c0-18 15-33 34-33h516c18 0 33 15 34 33 0 18-15 33-34 34H367c-18 0-33-15-34-34z m0 250c0-18 15-33 34-33h516c18 0 33 15 34 33s-15 33-34 34H367c-18 0-33-15-34-34z m0 250c0-18 15-33 34-33h516c18 0 33 15 34 33s-15 33-34 34H367c-18 0-33-15-34-34z"></path></g>\n<g id="phone"><path d="M296 208l42-37c17-15 44-13 58 4a42 42 0 0 1 5 7L459 282c12 20 5 45-15 57l-7 4c-17 10-25 30-19 48l20 66a420 420 0 0 0 93 157l41 45c13 14 35 17 51 8l7-5c20-12 45-5 57 16L745 777c12 20 5 45-15 57a42 42 0 0 1-8 4l-52 17c-61 21-129 4-174-43l-50-52c-81-85-141-189-175-302l-24-78c-19-62 0-129 49-172z"></path></g>\n<g id="photo"><path d="M208 167h584c69 0 125 56 125 125v416c0 69-56 125-125 125H208c-69 0-125-56-125-125V292c0-69 56-125 125-125z m584 75H208c-28 0-50 22-50 50v416c0 28 22 50 50 50h584c28 0 50-22 50-50V292c0-28-22-50-50-50zM239 740l167-167c12-12 31-14 45-6l73 43 172-201c13-15 34-18 50-7l95 67v92l-111-78-169 199c-12 14-32 17-47 8l-76-43-111 111H229c2-7 5-13 10-18zM458 427C458 490 407 542 344 542S229 490 229 427c0-63 51-115 115-115S458 364 458 427z m-62 0C396 398 373 375 344 375S292 398 292 427c0 29 23 52 52 52s52-23 52-52z"></path></g>\n<g id="play"><path d="M689 528l-298 175c-13 8-34 8-48 0-6-4-10-9-10-14V311C333 300 348 292 367 292c9 0 17 2 24 5l298 175c26 15 26 40 0 56z"></path></g>\n<g id="plus"><path d="M461 461H261c-22 0-39 18-39 39 0 22 18 39 39 39h200v200c0 22 18 39 39 39 22 0 39-18 39-39v-200h200c22 0 39-18 39-39 0-22-18-39-39-39h-200V261c0-22-18-39-39-39-22 0-39 18-39 39v200z"></path></g>\n<g id="redo"><path d="M290 614C312 523 393 458 491 458c55 0 106 22 144 57l-88 88c-3 3-5 7-5 11 0 8 6 15 15 15l193-5c17 0 31-15 31-32l5-192c0-4-1-8-4-11-6-6-16-6-22 0l-66 67C641 406 570 375 491 375c-136 0-248 90-281 215-1 2-1 5-1 8-8 44 45 68 73 32 4-5 7-11 8-16z"></path></g>\n<g id="reload"><path d="M500 233V137c0-9 7-16 15-16 4 0 8 2 10 4l133 140c12 12 12 32 0 45l-133 140c-6 6-15 6-21 0C502 447 500 443 500 438V308c-117 0-212 95-212 213 0 117 95 212 212 212 117 0 212-95 212-212 0-21 17-38 38-38s38 17 37 38c0 159-129 288-287 287-159 0-288-129-288-287 0-159 129-288 288-288z"></path></g>\n<g id="search"><path d="M662 603l131 131c16 16 16 42 0 59-16 16-43 16-59 0l-131-131C562 691 512 708 458 708c-138 0-250-112-250-250 0-138 112-250 250-250 138 0 250 112 250 250 0 54-17 104-46 145zM458 646c104 0 188-84 188-188S562 271 458 271 271 355 271 458s84 188 187 188z"></path></g>\n<g id="undo"><path d="M710 614C688 523 607 458 509 458c-55 0-106 22-144 57l88 88c3 3 5 7 5 11 0 8-6 15-15 15l-193-5c-17 0-31-15-31-32L214 400c0-4 1-8 4-11 6-6 16-6 22 0l66 67C359 406 430 375 509 375c136 0 248 90 281 215 1 2 1 5 1 8 8 44-45 68-73 32-4-5-7-11-8-16z"></path></g>\n<g id="unordered-list"><path d="M146 325c-42 0-67-26-67-63 0-37 25-63 67-63 42 0 67 26 67 63 0 37-25 63-67 63z m0 250c-42 0-67-26-67-63 0-37 25-63 67-63 42 0 67 26 67 63 0 37-25 63-67 63z m0 250c-42 0-67-26-67-63 0-37 25-63 67-63 42 0 67 26 67 63 0 37-25 63-67 63zM333 258c0-18 15-33 34-33h516c18 0 33 15 34 33 0 18-15 33-34 34H367c-18 0-33-15-34-34z m0 250c0-18 15-33 34-33h516c18 0 33 15 34 33s-15 33-34 34H367c-18 0-33-15-34-34z m0 250c0-18 15-33 34-33h516c18 0 33 15 34 33s-15 33-34 34H367c-18 0-33-15-34-34z"></path></g>\n<g id="upload"><path d="M454 271V604c0 21-17 38-37 38s-38-17-38-38V271L254 382c-15 14-39 12-53-3-14-15-12-39 3-53L391 160c14-13 36-13 51-1 0 0 0 0 0 1l187 166c15 14 17 37 3 53-14 15-37 17-53 3L454 271zM675 704c0-21 17-38 37-37 21 0 38 17 38 37v92c0 21-17 38-38 37H121c-21 0-38-17-38-37v-92c0-21 17-38 38-37s38 17 37 37v54h517v-54z"></path></g>\n<g id="user"><path d="M500 500c-69 0-125-56-125-125s56-125 125-125 125 56 125 125-56 125-125 125z m-292 292c0-115 131-208 292-209s292 93 292 209H208z"></path></g>\n</defs>\n</svg>\n</iron-iconset-svg>',document.head.appendChild(c.content);
1
+ import"./shared-df573cea.js";import"./shared-46ee137f.js";const c=document.createElement("template");c.innerHTML='<iron-iconset-svg size="1000" name="lumo">\n<svg xmlns="http://www.w3.org/2000/svg">\n<defs>\n<g id="angle-down"><path d="M283 391c-18-16-46-15-63 4-16 18-15 46 3 63l244 224c17 15 43 15 60 0l250-229c18-16 20-45 3-63-16-18-45-20-63-4l-220 203-214-198z"></path></g>\n<g id="angle-left"><path d="M601 710c16 18 15 46-3 63-18 16-46 15-63-4l-224-244c-15-17-15-43 0-59l229-250c16-18 45-20 63-4 18 16 20 45 3 63l-203 220 198 215z"></path></g>\n<g id="angle-right"><path d="M399 275c-16-18-15-46 3-63 18-16 46-15 63 4l224 244c15 17 15 43 0 59l-229 250c-16 18-45 20-63 4-18-16-20-45-3-63l203-220-198-215z"></path></g>\n<g id="angle-up"><path d="M283 635c-18 16-46 15-63-3-16-18-15-46 3-63l244-224c17-15 43-15 60 0l250 229c18 16 20 45 3 63-16 18-45 20-63 3l-220-202L283 635z"></path></g>\n<g id="arrow-down"><path d="M538 646l125-112c15-14 39-12 53 4 14 15 12 39-4 53l-187 166c0 0 0 0 0 0-14 13-36 12-50 0l-187-166c-15-14-17-37-4-53 14-15 37-17 53-4L462 646V312c0-21 17-38 38-37s38 17 37 37v334z"></path></g>\n<g id="arrow-left"><path d="M375 538l111 125c14 15 12 39-3 53-15 14-39 12-53-4l-166-187c0 0 0 0 0 0-13-14-12-36 0-50l166-187c14-15 37-17 53-4 15 14 17 37 3 53L375 463h333c21 0 38 17 38 37 0 21-17 38-38 38h-333z"></path></g>\n<g id="arrow-right"><path d="M625 538h-333c-21 0-38-17-38-38 0-21 17-38 38-37h333l-111-126c-14-15-12-39 3-53 15-14 39-12 53 4l166 187c13 14 13 36 0 50 0 0 0 0 0 0l-166 187c-14 15-37 17-53 4-15-14-17-37-3-53l111-125z"></path></g>\n<g id="arrow-up"><path d="M538 354V688c0 21-17 38-38 37s-38-17-38-38V354l-125 112c-15 14-39 12-53-4-14-15-12-39 4-53l187-166c14-13 36-13 50 0 0 0 0 0 0 0l187 166c15 14 17 37 4 53-14 15-37 17-53 4L538 354z"></path></g>\n<g id="bar-chart"><path d="M175 500h108c28 0 50 22 50 50v233c0 28-22 50-50 50H175c-28 0-50-22-50-50v-233c0-28 22-50 50-50z m33 67c-9 0-17 7-16 16v167c0 9 7 17 16 17h42c9 0 17-7 17-17v-167c0-9-7-17-17-16H208zM446 167h108c28 0 50 22 50 50v566c0 28-22 50-50 50h-108c-28 0-50-22-50-50V217c0-28 22-50 50-50z m33 66c-9 0-17 7-17 17v500c0 9 7 17 17 17h42c9 0 17-7 16-17V250c0-9-7-17-16-17h-42zM717 333h108c28 0 50 22 50 50v400c0 28-22 50-50 50h-108c-28 0-50-22-50-50V383c0-28 22-50 50-50z m33 67c-9 0-17 7-17 17v333c0 9 7 17 17 17h42c9 0 17-7 16-17v-333c0-9-7-17-16-17h-42z"></path></g>\n<g id="bell"><path d="M367 675H292v-258C292 325 366 250 459 250H458V208c0-23 18-42 42-41 23 0 42 18 42 41v42h-1C634 250 708 325 708 417V675h-75v-258c0-51-41-92-91-92h-84C408 325 367 366 367 417V675z m-159 37c0-21 17-38 38-37h508c21 0 37 17 38 37 0 21-17 38-38 38H246C225 750 208 733 208 713z m230 71h125v32c0 17-14 31-32 31h-62c-17 0-32-14-31-31v-32z"></path></g>\n<g id="calendar"><path d="M375 208h250v-20C625 176 634 167 646 167h41C699 167 708 176 708 188V208h74c23 0 41 19 41 42v42C823 315 804 333 782 333H218C196 333 177 315 177 292V250C177 227 196 208 218 208H292v-20C292 176 301 167 313 167h41C366 167 375 176 375 188V208zM229 375h42C283 375 292 384 292 396v41C292 449 282 458 271 458h-42C217 458 208 449 208 437v-41C208 384 218 375 229 375z m125 0h42C408 375 417 384 417 396v41C417 449 407 458 396 458h-42C342 458 333 449 333 437v-41C333 384 343 375 354 375z m125 0h42C533 375 542 384 542 396v41C542 449 532 458 521 458h-42C467 458 458 449 458 437v-41C458 384 468 375 479 375z m-250 125h42C283 500 292 509 292 521v41C292 574 282 583 271 583h-42C217 583 208 574 208 562v-41C208 509 218 500 229 500z m125 0h42C408 500 417 509 417 521v41C417 574 407 583 396 583h-42C342 583 333 574 333 562v-41C333 509 343 500 354 500z m125 0h42c12 0 21 9 21 21v41C542 574 532 583 521 583h-42C467 583 458 574 458 562v-41C458 509 468 500 479 500z m-250 125h42C283 625 292 634 292 646v41C292 699 282 708 271 708h-42C217 708 208 699 208 687v-41C208 634 218 625 229 625z m125 0h42C408 625 417 634 417 646v41C417 699 407 708 396 708h-42C342 708 333 699 333 687v-41C333 634 343 625 354 625z m125 0h42c12 0 21 9 21 21v41C542 699 532 708 521 708h-42C467 708 458 699 458 687v-41C458 634 468 625 479 625z m125-250h42C658 375 667 384 667 396v41C667 449 657 458 646 458h-42C592 458 583 449 583 437v-41C583 384 593 375 604 375z m0 125h42c12 0 21 9 21 21v41C667 574 657 583 646 583h-42C592 583 583 574 583 562v-41C583 509 593 500 604 500z m0 125h42c12 0 21 9 21 21v41C667 699 657 708 646 708h-42C592 708 583 699 583 687v-41C583 634 593 625 604 625z m125 0h42c12 0 21 9 21 21v41C792 699 782 708 771 708h-42C717 708 708 699 708 687v-41C708 634 718 625 729 625z m-500 125h42C283 750 292 759 292 771v41C292 824 282 833 271 833h-42C217 833 208 824 208 812v-41C208 759 218 750 229 750z m125 0h42C408 750 417 759 417 771v41C417 824 407 833 396 833h-42C342 833 333 824 333 812v-41C333 759 343 750 354 750z m125 0h42c12 0 21 9 21 21v41C542 824 532 833 521 833h-42C467 833 458 824 458 812v-41C458 759 468 750 479 750z m125 0h42c12 0 21 9 21 21v41C667 824 657 833 646 833h-42C592 833 583 824 583 812v-41C583 759 593 750 604 750z m125 0h42c12 0 21 9 21 21v41C792 824 782 833 771 833h-42C717 833 708 824 708 812v-41C708 759 718 750 729 750z m0-250h42c12 0 21 9 21 21v41C792 574 782 583 771 583h-42C717 583 708 574 708 562v-41C708 509 718 500 729 500z m0-125h42C783 375 792 384 792 396v41C792 449 782 458 771 458h-42C717 458 708 449 708 437v-41C708 384 718 375 729 375z"></path></g>\n<g id="checkmark"><path d="M318 493c-15-15-38-15-53 0-15 15-15 38 0 53l136 136c15 15 38 15 53 0l323-322c15-15 15-38 0-53-15-15-38-15-54 0l-295 296-110-110z"></path></g>\n<g id="chevron-down"><path d="M533 654l210-199c9-9 9-23 0-32C739 419 733 417 726 417H274C261 417 250 427 250 439c0 6 2 12 7 16l210 199c18 17 48 17 66 0z"></path></g>\n<g id="chevron-left"><path d="M346 533l199 210c9 9 23 9 32 0 4-4 7-10 6-17V274C583 261 573 250 561 250c-6 0-12 2-16 7l-199 210c-17 18-17 48 0 66z"></path></g>\n<g id="chevron-right"><path d="M654 533L455 743c-9 9-23 9-32 0C419 739 417 733 417 726V274C417 261 427 250 439 250c6 0 12 2 16 7l199 210c17 18 17 48 0 66z"></path></g>\n<g id="chevron-up"><path d="M533 346l210 199c9 9 9 23 0 32-4 4-10 7-17 6H274C261 583 250 573 250 561c0-6 2-12 7-16l210-199c18-17 48-17 66 0z"></path></g>\n<g id="clock"><path d="M538 489l85 85c15 15 15 38 0 53-15 15-38 15-53 0l-93-93a38 38 0 0 1-2-2C467 525 462 515 462 504V308c0-21 17-38 38-37 21 0 38 17 37 37v181zM500 833c-184 0-333-149-333-333s149-333 333-333 333 149 333 333-149 333-333 333z m0-68c146 0 265-118 265-265 0-146-118-265-265-265-146 0-265 118-265 265 0 146 118 265 265 265z"></path></g>\n<g id="cog"><path d="M833 458l-81-18c-8-25-17-50-29-75L767 292 708 233l-72 49c-21-12-46-25-75-30L542 167h-84l-19 79c-25 8-50 17-71 30L296 233 233 296l47 69c-12 21-21 46-29 71L167 458v84l84 25c8 25 17 50 29 75L233 708 292 767l76-44c21 12 46 25 75 29L458 833h84l19-81c25-8 50-17 75-29L708 767l59-59-44-66c12-21 25-46 29-75L833 542v-84z m-333 217c-96 0-175-79-175-175 0-96 79-175 175-175 96 0 175 79 175 175 0 96-79 175-175 175z"></path></g>\n<g id="cross"><path d="M445 500l-142-141c-15-15-15-40 0-56 15-15 40-15 56 0L500 445l141-142c15-15 40-15 56 0 15 15 15 40 0 56L555 500l142 141c15 15 15 40 0 56-15 15-40 15-56 0L500 555l-141 142c-15 15-40 15-56 0-15-15-15-40 0-56L445 500z"></path></g>\n<g id="download"><path d="M538 521l125-112c15-14 39-12 53 4 14 15 12 39-4 53l-187 166a38 38 0 0 1 0 0c-14 13-36 12-50 0l-187-166c-15-14-17-37-4-53 14-15 37-17 53-4L462 521V188c0-21 17-38 38-38s38 17 37 38v333zM758 704c0-21 17-38 38-37 21 0 38 17 37 37v92c0 21-17 38-37 37H204c-21 0-38-17-37-37v-92c0-21 17-38 37-37s38 17 38 37v54h516v-54z"></path></g>\n<g id="dropdown"><path d="M317 393c-15-14-39-13-53 3-14 15-13 39 3 53l206 189c14 13 36 13 50 0l210-193c15-14 17-38 3-53-14-15-38-17-53-3l-185 171L317 393z"></path></g>\n<g id="edit"><path d="M673 281l62 56-205 233c-9 10-38 24-85 39a8 8 0 0 1-5 0c-4-1-7-6-6-10l0 0c14-47 25-76 35-86l204-232z m37-42l52-59c15-17 41-18 58-2 17 16 18 42 3 59L772 295l-62-56zM626 208l-67 75h-226C305 283 283 306 283 333v334C283 695 306 717 333 717h334c28 0 50-22 50-50v-185L792 398v269C792 736 736 792 667 792H333C264 792 208 736 208 667V333C208 264 264 208 333 208h293z"></path></g>\n<g id="error"><path d="M500 833c-184 0-333-149-333-333s149-333 333-333 333 149 333 333-149 333-333 333z m0-68c146 0 265-118 265-265 0-146-118-265-265-265-146 0-265 118-265 265 0 146 118 265 265 265zM479 292h42c12 0 21 9 20 20l-11 217c0 8-6 13-13 13h-34c-7 0-13-6-13-13l-11-217C459 301 468 292 479 292zM483 608h34c12 0 21 9 20 21v33c0 12-9 21-20 21h-34c-12 0-21-9-21-21v-33c0-12 9-21 21-21z"></path></g>\n<g id="eye"><path d="M500 750c-187 0-417-163-417-250s230-250 417-250 417 163 417 250-230 250-417 250z m-336-231c20 22 47 46 78 69C322 644 411 678 500 678s178-34 258-90c31-22 59-46 78-69 6-7 12-14 16-19-4-6-9-12-16-19-20-22-47-46-78-69C678 356 589 322 500 322s-178 34-258 90c-31 22-59 46-78 69-6 7-12 14-16 19 4 6 9 12 16 19zM500 646c-81 0-146-65-146-146s65-146 146-146 146 65 146 146-65 146-146 146z m0-75c39 0 71-32 71-71 0-39-32-71-71-71-39 0-71 32-71 71 0 39 32 71 71 71z"></path></g>\n<g id="eye-disabled"><path d="M396 735l60-60c15 2 30 3 44 3 89 0 178-34 258-90 31-22 59-46 78-69 6-7 12-14 16-19-4-6-9-12-16-19-20-22-47-46-78-69-8-5-15-11-23-15l50-51C862 397 917 458 917 500c0 87-230 250-417 250-34 0-69-5-104-15zM215 654C138 603 83 542 83 500c0-87 230-250 417-250 34 0 69 5 104 15l-59 60c-15-2-30-3-45-3-89 0-178 34-258 90-31 22-59 46-78 69-6 7-12 14-16 19 4 6 9 12 16 19 20 22 47 46 78 69 8 5 16 11 24 16L215 654z m271-9l159-159c0 5 1 9 1 14 0 81-65 146-146 146-5 0-9 0-14-1z m-131-131C354 510 354 505 354 500c0-81 65-146 146-146 5 0 10 0 14 1l-159 159z m-167 257L780 179c12-12 32-12 44 0 12 12 12 32 0 44L232 815c-12 12-32 12-44 0s-12-32 0-44z"></path></g>\n<g id="menu"><path d="M167 292c0-23 19-42 41-42h584C815 250 833 268 833 292c0 23-19 42-41 41H208C185 333 167 315 167 292z m0 208c0-23 19-42 41-42h584C815 458 833 477 833 500c0 23-19 42-41 42H208C185 542 167 523 167 500z m0 208c0-23 19-42 41-41h584C815 667 833 685 833 708c0 23-19 42-41 42H208C185 750 167 732 167 708z"></path></g>\n<g id="minus"><path d="M261 461c-22 0-39 18-39 39 0 22 18 39 39 39h478c22 0 39-18 39-39 0-22-18-39-39-39H261z"></path></g>\n<g id="ordered-list"><path d="M138 333V198H136l-43 28v-38l45-31h45V333H138z m-61 128c0-35 27-59 68-59 39 0 66 21 66 53 0 20-11 37-43 64l-29 27v2h74V583H80v-30l55-52c26-24 32-33 33-43 0-13-10-22-24-22-15 0-26 10-26 25v1h-41v-1zM123 759v-31h21c15 0 25-8 25-21 0-13-10-21-25-21-15 0-26 9-26 23h-41c1-34 27-56 68-57 39 0 66 20 66 49 0 20-14 36-33 39v3c24 3 40 19 39 41 0 32-30 54-73 54-41 0-69-22-70-57h43c1 13 11 22 28 22 16 0 27-9 27-22 0-14-10-22-28-22h-21zM333 258c0-18 15-33 34-33h516c18 0 33 15 34 33 0 18-15 33-34 34H367c-18 0-33-15-34-34z m0 250c0-18 15-33 34-33h516c18 0 33 15 34 33s-15 33-34 34H367c-18 0-33-15-34-34z m0 250c0-18 15-33 34-33h516c18 0 33 15 34 33s-15 33-34 34H367c-18 0-33-15-34-34z"></path></g>\n<g id="phone"><path d="M296 208l42-37c17-15 44-13 58 4a42 42 0 0 1 5 7L459 282c12 20 5 45-15 57l-7 4c-17 10-25 30-19 48l20 66a420 420 0 0 0 93 157l41 45c13 14 35 17 51 8l7-5c20-12 45-5 57 16L745 777c12 20 5 45-15 57a42 42 0 0 1-8 4l-52 17c-61 21-129 4-174-43l-50-52c-81-85-141-189-175-302l-24-78c-19-62 0-129 49-172z"></path></g>\n<g id="photo"><path d="M208 167h584c69 0 125 56 125 125v416c0 69-56 125-125 125H208c-69 0-125-56-125-125V292c0-69 56-125 125-125z m584 75H208c-28 0-50 22-50 50v416c0 28 22 50 50 50h584c28 0 50-22 50-50V292c0-28-22-50-50-50zM239 740l167-167c12-12 31-14 45-6l73 43 172-201c13-15 34-18 50-7l95 67v92l-111-78-169 199c-12 14-32 17-47 8l-76-43-111 111H229c2-7 5-13 10-18zM458 427C458 490 407 542 344 542S229 490 229 427c0-63 51-115 115-115S458 364 458 427z m-62 0C396 398 373 375 344 375S292 398 292 427c0 29 23 52 52 52s52-23 52-52z"></path></g>\n<g id="play"><path d="M689 528l-298 175c-13 8-34 8-48 0-6-4-10-9-10-14V311C333 300 348 292 367 292c9 0 17 2 24 5l298 175c26 15 26 40 0 56z"></path></g>\n<g id="plus"><path d="M461 461H261c-22 0-39 18-39 39 0 22 18 39 39 39h200v200c0 22 18 39 39 39 22 0 39-18 39-39v-200h200c22 0 39-18 39-39 0-22-18-39-39-39h-200V261c0-22-18-39-39-39-22 0-39 18-39 39v200z"></path></g>\n<g id="redo"><path d="M290 614C312 523 393 458 491 458c55 0 106 22 144 57l-88 88c-3 3-5 7-5 11 0 8 6 15 15 15l193-5c17 0 31-15 31-32l5-192c0-4-1-8-4-11-6-6-16-6-22 0l-66 67C641 406 570 375 491 375c-136 0-248 90-281 215-1 2-1 5-1 8-8 44 45 68 73 32 4-5 7-11 8-16z"></path></g>\n<g id="reload"><path d="M500 233V137c0-9 7-16 15-16 4 0 8 2 10 4l133 140c12 12 12 32 0 45l-133 140c-6 6-15 6-21 0C502 447 500 443 500 438V308c-117 0-212 95-212 213 0 117 95 212 212 212 117 0 212-95 212-212 0-21 17-38 38-38s38 17 37 38c0 159-129 288-287 287-159 0-288-129-288-287 0-159 129-288 288-288z"></path></g>\n<g id="search"><path d="M662 603l131 131c16 16 16 42 0 59-16 16-43 16-59 0l-131-131C562 691 512 708 458 708c-138 0-250-112-250-250 0-138 112-250 250-250 138 0 250 112 250 250 0 54-17 104-46 145zM458 646c104 0 188-84 188-188S562 271 458 271 271 355 271 458s84 188 187 188z"></path></g>\n<g id="undo"><path d="M710 614C688 523 607 458 509 458c-55 0-106 22-144 57l88 88c3 3 5 7 5 11 0 8-6 15-15 15l-193-5c-17 0-31-15-31-32L214 400c0-4 1-8 4-11 6-6 16-6 22 0l66 67C359 406 430 375 509 375c136 0 248 90 281 215 1 2 1 5 1 8 8 44-45 68-73 32-4-5-7-11-8-16z"></path></g>\n<g id="unordered-list"><path d="M146 325c-42 0-67-26-67-63 0-37 25-63 67-63 42 0 67 26 67 63 0 37-25 63-67 63z m0 250c-42 0-67-26-67-63 0-37 25-63 67-63 42 0 67 26 67 63 0 37-25 63-67 63z m0 250c-42 0-67-26-67-63 0-37 25-63 67-63 42 0 67 26 67 63 0 37-25 63-67 63zM333 258c0-18 15-33 34-33h516c18 0 33 15 34 33 0 18-15 33-34 34H367c-18 0-33-15-34-34z m0 250c0-18 15-33 34-33h516c18 0 33 15 34 33s-15 33-34 34H367c-18 0-33-15-34-34z m0 250c0-18 15-33 34-33h516c18 0 33 15 34 33s-15 33-34 34H367c-18 0-33-15-34-34z"></path></g>\n<g id="upload"><path d="M454 271V604c0 21-17 38-37 38s-38-17-38-38V271L254 382c-15 14-39 12-53-3-14-15-12-39 3-53L391 160c14-13 36-13 51-1 0 0 0 0 0 1l187 166c15 14 17 37 3 53-14 15-37 17-53 3L454 271zM675 704c0-21 17-38 37-37 21 0 38 17 38 37v92c0 21-17 38-38 37H121c-21 0-38-17-38-37v-92c0-21 17-38 38-37s38 17 37 37v54h517v-54z"></path></g>\n<g id="user"><path d="M500 500c-69 0-125-56-125-125s56-125 125-125 125 56 125 125-56 125-125 125z m-292 292c0-115 131-208 292-209s292 93 292 209H208z"></path></g>\n</defs>\n</svg>\n</iron-iconset-svg>',document.head.appendChild(c.content);
@@ -186,5 +186,87 @@
186
186
  "year": "Year",
187
187
  "year_plural": "Years",
188
188
  "yearly": "Yearly",
189
- "yearly_plural": "Every {{count}} years"
189
+ "yearly_plural": "Every {{count}} years",
190
+ "cart_type": "Cart display",
191
+ "cart_type_default": "Sidecart",
192
+ "cart_type_default_explainer": "Default cart appearance in version 2.0",
193
+ "cart_type_fullpage": "Full page",
194
+ "cart_type_fullpage_explainer": "Send all customers to a full page cart while still including minicart functionality",
195
+ "cart_type_custom": "Custom",
196
+ "cart_type_custom_explainer": "Build your own JSONP cart with included config",
197
+ "foxycomplete": "Location autocomplete",
198
+ "foxycomplete_combobox": "Combo Box",
199
+ "foxycomplete_combobox_explainer": "Expand to browse options, type to search",
200
+ "foxycomplete_search": "Search",
201
+ "foxycomplete_search_explainer": "Display a «search as you type» field",
202
+ "foxycomplete_disabled": "Disabled",
203
+ "foxycomplete_disabled_explainer": "Let customers pick an option from a list",
204
+ "open_icon": "Open icon",
205
+ "close_icon": "Close icon",
206
+ "show_country_flags": "Show country flags",
207
+ "enable_postcode_lookup": "Offer city and state suggestions based on postcode",
208
+ "location_plural": "Locations",
209
+ "shipping": "Shipping",
210
+ "billing": "Billing",
211
+ "allowlist": "Allow all except",
212
+ "blocklist": "Ban all except",
213
+ "same_as_shipping": "Same as shipping",
214
+ "add_region": "Add region",
215
+ "add_country": "Add country",
216
+ "hidden_fields": "Hidden fields",
217
+ "add_field": "Add field",
218
+ "product_weight": "Product weight",
219
+ "product_category": "Product category",
220
+ "product_code": "Product code",
221
+ "product_options": "Product options",
222
+ "sub_frequency": "Subscription frequency",
223
+ "sub_startdate": "Subscription start date",
224
+ "sub_nextdate": "Subscription next date",
225
+ "sub_enddate": "Subscription end date",
226
+ "custom_header": "Custom header",
227
+ "custom_header_helper_text": "Any CSS or JS you need to add to the header can be put here and will be inserted before the </head> tag of your templates. Keep in mind all script file references must be through https or run through the Foxy caching system. Twig syntax is not available in the header.",
228
+ "custom_footer": "Custom footer",
229
+ "custom_footer_helper_text": "Any JS snippets or conversion scripts you need to add to the footer can be put here and will be inserted before the </body> tag. You can use Twig syntax here. For conversion scripts you only want to display once on the receipt page, use {% if first_receipt_display %} {# conversion script content here #} {% endif %}.",
230
+ "ga_account_id": "Account ID",
231
+ "ga_account_id_explainer": "You can find the ID in the Admin section of your Analytics in Tracking info > Tracking code.",
232
+ "ga_include_on_site": "Include via loader.js",
233
+ "ga_include_on_site_explainer": "Enable Google Analytics on any page where the loader.js file is included.",
234
+ "sio_account_id": "Write Key",
235
+ "sio_account_id_explainer": "You can find the write key in your project set up guide or in the source’s settings.",
236
+ "troubleshooting": "Troubleshooting",
237
+ "troubleshooting_debug": "Log debug messages in the browser console",
238
+ "troubleshooting_debug_explainer": "Enable this option to trigger console.log() calls for our JS, which can assist with troubleshooting your store.",
239
+ "custom_config": "Custom config",
240
+ "custom_config_helper_text": "If you have any custom values you'd like to make available to your twig template, you can add them here as a valid JSON string.",
241
+ "custom_fields": "Custom fields",
242
+ "custom_fields_helper_text": "If you have information you'd like to collect from the customer on the checkout page, you can add custom form fields here which will be added to the checkout form. We recommend you follow the same HTML container structure used on other checkout fields for consistency. You can use Twig syntax here.",
243
+ "checkout_type": "Accounts",
244
+ "checkout_type_helper_text": "If you select $t(checkout_type_guest_only), your store will not be able to use subscriptions.",
245
+ "checkout_type_default_account": "Allow both, default to customer",
246
+ "checkout_type_default_guest": "Allow both, default to guest",
247
+ "checkout_type_account_only": "Allow customer accounts only",
248
+ "checkout_type_guest_only": "Allow guests only",
249
+ "supported_cards": "Cards",
250
+ "supported_cards_disclaimer": "Applies only to payment gateways where the customer enters their payment card information directly on the Foxy checkout. Exceptions: Adyen Embedded, Amazon Pay, Apple Pay, Klarna, Square and Stripe.",
251
+ "skip_csc_for_saved": "Skip CSC for saved cards",
252
+ "skip_csc_for_sso": "Skip CSC for single sign-on",
253
+ "consent": "Consent",
254
+ "display_tos_link": "Display a link to Terms & Conditions",
255
+ "display_tos_link_explainer": "Include a checkbox to ask your customers to agree to your Terms of Service.",
256
+ "location_url": "Location (URL)",
257
+ "require_consent": "Require consent to proceed",
258
+ "checked_by_default": "Checked by default",
259
+ "newsletter_subscribe": "Allow users to sign up for your newsletter",
260
+ "newsletter_subscribe_explainer": "This includes a checkbox on your checkout to allow customers to choose to sign up to your newsletter, available in the transaction reports, the API and webhooks.",
261
+ "display_sdta": "Display a Secure Data Transfer agreement to EU customers",
262
+ "display_sdta_explainer": "If you have customers in the European Union, enable this feature so they can opt in to sending their data to our secure servers in the United States.",
263
+ "cart_controls": "Quantity",
264
+ "coupon_entry": "Coupon code",
265
+ "enabled": "Enabled",
266
+ "disabled": "Disabled",
267
+ "required": "Required",
268
+ "default": "Default",
269
+ "optional": "Optional",
270
+ "hidden": "Hidden",
271
+ "field_plural": "Fields"
190
272
  }
@@ -35,7 +35,11 @@ export class Checkbox extends ConfigurableMixin(ThemeableMixin(LitElement)) {
35
35
  const box = `${ease} ${checked ? 'bg-primary' : 'bg-contrast-20 group-hover-bg-contrast-30'}`;
36
36
  const dot = `${ease} transform ${checked ? 'scale-100' : 'scale-0'}`;
37
37
  return html `
38
- <label class="flex group cursor-pointer">
38
+ <label
39
+ class="flex group transition-opacity ${this.disabled
40
+ ? 'cursor-default opacity-50'
41
+ : 'cursor-pointer'}"
42
+ >
39
43
  <div
40
44
  class="flex-shrink-0 check rounded-s ${box} text-primary-contrast focus-within-shadow-outline"
41
45
  >
@@ -1 +1 @@
1
- {"version":3,"file":"Checkbox.js","sourceRoot":"","sources":["../../../../src/elements/private/Checkbox/Checkbox.ts"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAC;AAC5B,OAAO,kCAAkC,CAAC;AAE1C,OAAO,EAEL,UAAU,EAGV,GAAG,EACH,IAAI,GACL,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,mBAAmB,EAAE,iCAA8B;AAC5D,OAAO,EAAE,iBAAiB,EAAE,wCAAqC;AACjE,OAAO,EAAE,cAAc,EAAE,qCAAkC;AAE3D,MAAM,OAAO,QAAS,SAAQ,iBAAiB,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC;IAA3E;;QAwBE,YAAO,GAAG,KAAK,CAAC;IAsClB,CAAC;IA7DC,MAAM,KAAK,UAAU;QACnB,OAAO;YACL,GAAG,KAAK,CAAC,UAAU;YACnB,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;SAC3B,CAAC;IACJ,CAAC;IAED,MAAM,KAAK,MAAM;QACf,OAAO;YACL,KAAK,CAAC,MAAM;YACZ,GAAG;;;;;;;;OASF;SACF,CAAC;IACJ,CAAC;IAID,MAAM;QACJ,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;QAC7B,MAAM,IAAI,GAAG,4CAA4C,CAAC;QAC1D,MAAM,GAAG,GAAG,GAAG,IAAI,IAAI,OAAO,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,2CAA2C,EAAE,CAAC;QAC9F,MAAM,GAAG,GAAG,GAAG,IAAI,cAAc,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC;QAErE,OAAO,IAAI,CAAA;;;iDAGkC,GAAG;;wEAEoB,GAAG;;;;uBAIpD,OAAO;wBACN,IAAI,CAAC,QAAQ;;sBAEf,CAAC,GAAU,EAAE,EAAE;YACvB,GAAG,CAAC,eAAe,EAAE,CAAC;YACtB,IAAI,CAAC,OAAO,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC;YAC7B,IAAI,CAAC,aAAa,CAAC,IAAI,mBAAmB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;QAC5D,CAAC;;;;;;;;;8BASiB,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,WAAW;;;KAGtE,CAAC;IACJ,CAAC;CACF","sourcesContent":["import '@polymer/iron-icon';\nimport '@vaadin/vaadin-lumo-styles/icons';\n\nimport {\n CSSResultArray,\n LitElement,\n PropertyDeclarations,\n TemplateResult,\n css,\n html,\n} from 'lit-element';\n\nimport { CheckboxChangeEvent } from './CheckboxChangeEvent';\nimport { ConfigurableMixin } from '../../../mixins/configurable';\nimport { ThemeableMixin } from '../../../mixins/themeable';\n\nexport class Checkbox extends ConfigurableMixin(ThemeableMixin(LitElement)) {\n static get properties(): PropertyDeclarations {\n return {\n ...super.properties,\n checked: { type: Boolean },\n };\n }\n\n static get styles(): CSSResultArray {\n return [\n super.styles,\n css`\n .ml-xxl {\n margin-left: calc(var(--lumo-space-m) + 1.125rem);\n }\n\n .check {\n height: 1.125rem;\n width: 1.125rem;\n }\n `,\n ];\n }\n\n checked = false;\n\n render(): TemplateResult {\n const checked = this.checked;\n const ease = 'transition-colors ease-in-out duration-200';\n const box = `${ease} ${checked ? 'bg-primary' : 'bg-contrast-20 group-hover-bg-contrast-30'}`;\n const dot = `${ease} transform ${checked ? 'scale-100' : 'scale-0'}`;\n\n return html`\n <label class=\"flex group cursor-pointer\">\n <div\n class=\"flex-shrink-0 check rounded-s ${box} text-primary-contrast focus-within-shadow-outline\"\n >\n <iron-icon icon=\"lumo:checkmark\" class=\"block w-full h-full ${dot}\"></iron-icon>\n <input\n type=\"checkbox\"\n class=\"sr-only\"\n .checked=${checked}\n ?disabled=${this.disabled}\n data-testid=\"input\"\n @change=${(evt: Event) => {\n evt.stopPropagation();\n this.checked = !this.checked;\n this.dispatchEvent(new CheckboxChangeEvent(this.checked));\n }}\n />\n </div>\n\n <div class=\"flex-1 font-lumo text-body leading-m -mt-xs ml-m\">\n <slot></slot>\n </div>\n </label>\n\n <div class=\"font-lumo ${this.disabled ? 'text-tertiary' : 'text-body'} ml-xxl\">\n <slot name=\"content\"></slot>\n </div>\n `;\n }\n}\n"]}
1
+ {"version":3,"file":"Checkbox.js","sourceRoot":"","sources":["../../../../src/elements/private/Checkbox/Checkbox.ts"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAC;AAC5B,OAAO,kCAAkC,CAAC;AAE1C,OAAO,EAEL,UAAU,EAGV,GAAG,EACH,IAAI,GACL,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,mBAAmB,EAAE,iCAA8B;AAC5D,OAAO,EAAE,iBAAiB,EAAE,wCAAqC;AACjE,OAAO,EAAE,cAAc,EAAE,qCAAkC;AAE3D,MAAM,OAAO,QAAS,SAAQ,iBAAiB,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC;IAA3E;;QAwBE,YAAO,GAAG,KAAK,CAAC;IA0ClB,CAAC;IAjEC,MAAM,KAAK,UAAU;QACnB,OAAO;YACL,GAAG,KAAK,CAAC,UAAU;YACnB,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;SAC3B,CAAC;IACJ,CAAC;IAED,MAAM,KAAK,MAAM;QACf,OAAO;YACL,KAAK,CAAC,MAAM;YACZ,GAAG;;;;;;;;OASF;SACF,CAAC;IACJ,CAAC;IAID,MAAM;QACJ,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;QAC7B,MAAM,IAAI,GAAG,4CAA4C,CAAC;QAC1D,MAAM,GAAG,GAAG,GAAG,IAAI,IAAI,OAAO,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,2CAA2C,EAAE,CAAC;QAC9F,MAAM,GAAG,GAAG,GAAG,IAAI,cAAc,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC;QAErE,OAAO,IAAI,CAAA;;+CAEgC,IAAI,CAAC,QAAQ;YAClD,CAAC,CAAC,2BAA2B;YAC7B,CAAC,CAAC,gBAAgB;;;iDAGqB,GAAG;;wEAEoB,GAAG;;;;uBAIpD,OAAO;wBACN,IAAI,CAAC,QAAQ;;sBAEf,CAAC,GAAU,EAAE,EAAE;YACvB,GAAG,CAAC,eAAe,EAAE,CAAC;YACtB,IAAI,CAAC,OAAO,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC;YAC7B,IAAI,CAAC,aAAa,CAAC,IAAI,mBAAmB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;QAC5D,CAAC;;;;;;;;;8BASiB,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,WAAW;;;KAGtE,CAAC;IACJ,CAAC;CACF","sourcesContent":["import '@polymer/iron-icon';\nimport '@vaadin/vaadin-lumo-styles/icons';\n\nimport {\n CSSResultArray,\n LitElement,\n PropertyDeclarations,\n TemplateResult,\n css,\n html,\n} from 'lit-element';\n\nimport { CheckboxChangeEvent } from './CheckboxChangeEvent';\nimport { ConfigurableMixin } from '../../../mixins/configurable';\nimport { ThemeableMixin } from '../../../mixins/themeable';\n\nexport class Checkbox extends ConfigurableMixin(ThemeableMixin(LitElement)) {\n static get properties(): PropertyDeclarations {\n return {\n ...super.properties,\n checked: { type: Boolean },\n };\n }\n\n static get styles(): CSSResultArray {\n return [\n super.styles,\n css`\n .ml-xxl {\n margin-left: calc(var(--lumo-space-m) + 1.125rem);\n }\n\n .check {\n height: 1.125rem;\n width: 1.125rem;\n }\n `,\n ];\n }\n\n checked = false;\n\n render(): TemplateResult {\n const checked = this.checked;\n const ease = 'transition-colors ease-in-out duration-200';\n const box = `${ease} ${checked ? 'bg-primary' : 'bg-contrast-20 group-hover-bg-contrast-30'}`;\n const dot = `${ease} transform ${checked ? 'scale-100' : 'scale-0'}`;\n\n return html`\n <label\n class=\"flex group transition-opacity ${this.disabled\n ? 'cursor-default opacity-50'\n : 'cursor-pointer'}\"\n >\n <div\n class=\"flex-shrink-0 check rounded-s ${box} text-primary-contrast focus-within-shadow-outline\"\n >\n <iron-icon icon=\"lumo:checkmark\" class=\"block w-full h-full ${dot}\"></iron-icon>\n <input\n type=\"checkbox\"\n class=\"sr-only\"\n .checked=${checked}\n ?disabled=${this.disabled}\n data-testid=\"input\"\n @change=${(evt: Event) => {\n evt.stopPropagation();\n this.checked = !this.checked;\n this.dispatchEvent(new CheckboxChangeEvent(this.checked));\n }}\n />\n </div>\n\n <div class=\"flex-1 font-lumo text-body leading-m -mt-xs ml-m\">\n <slot></slot>\n </div>\n </label>\n\n <div class=\"font-lumo ${this.disabled ? 'text-tertiary' : 'text-body'} ml-xxl\">\n <slot name=\"content\"></slot>\n </div>\n `;\n }\n}\n"]}
@@ -23,7 +23,7 @@ function radio(readonly, disabled, checked, attrs, label) {
23
23
  const border = `border ${readonly ? 'border-contrast-20' : 'border-transparent'}`;
24
24
  return html `
25
25
  <label class="group flex items-center ${disabled || readonly ? '' : 'cursor-pointer'}">
26
- <div class="item flex items-center justify-center">
26
+ <div class="item flex items-center justify-center flex-shrink-0">
27
27
  <div class="flex radio rounded-full ${border} ${ease} ${bg} focus-within-shadow-outline">
28
28
  <div class="dot m-auto rounded-full ${dot}"></div>
29
29
  <input type="radio" class="sr-only" .checked=${checked} ...=${attrs} />
@@ -44,7 +44,7 @@ function check(readonly, disabled, checked, attrs, label) {
44
44
  const border = `border ${readonly ? 'border-contrast-20' : 'border-transparent'}`;
45
45
  return html `
46
46
  <label class="group flex items-center ${disabled || readonly ? '' : 'cursor-pointer'}">
47
- <div class="item flex items-center justify-center text-primary-contrast">
47
+ <div class="item flex items-center justify-center flex-shrink-0 text-primary-contrast">
48
48
  <div class="check rounded-s ${border} ${ease} ${bg} focus-within-shadow-outline">
49
49
  <iron-icon icon="lumo:checkmark" class="block w-full h-full ${dot}"></iron-icon>
50
50
  <input type="checkbox" class="sr-only" .checked=${checked} ...=${attrs} />
@@ -1 +1 @@
1
- {"version":3,"file":"Choice.js","sourceRoot":"","sources":["../../../../src/elements/private/Choice/Choice.ts"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAC;AAC5B,OAAO,kCAAkC,CAAC;AAC1C,OAAO,gDAAgD,CAAC;AACxD,OAAO,4CAA4C,CAAC;AACpD,OAAO,6CAA6C,CAAC;AAErD,OAAO,EAAwD,GAAG,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAG9F,OAAO,EAAE,iBAAiB,EAAE,+BAA4B;AACxD,OAAO,EAAE,cAAc,EAAE,4CAAyC;AAElE,OAAO,EAAE,YAAY,EAAE,wCAAqC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,qBAAkB;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAC;AAEzD,MAAM,WAAW,GAAG,4BAA4B,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC;AAEjG,SAAS,KAAK,CACZ,QAAiB,EACjB,QAAiB,EACjB,OAAgB,EAChB,KAAoC,EACpC,KAAqB;IAErB,MAAM,SAAS,GAAG,OAAO,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,2CAA2C,CAAC;IACvF,MAAM,UAAU,GAAG,OAAO,CAAC,CAAC,CAAC,eAAe,CAAC,CA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E;YACnC,OAAO,IAAI,CAAA,yBAAyB,UAAU,sBAAsB,CAAC;SACtE;aAAM;YACL,OAAO,IAAI,CAAA,0BAA0B,UAAU,uBAAuB,CAAC;SACxE;IACH,CAAC;CACF","sourcesContent":["import '@polymer/iron-icon';\nimport '@vaadin/vaadin-lumo-styles/icons';\nimport '@vaadin/vaadin-text-field/vaadin-integer-field';\nimport '@vaadin/vaadin-text-field/vaadin-text-area';\nimport '@vaadin/vaadin-text-field/vaadin-text-field';\n\nimport { CSSResultArray, PropertyDeclarations, TemplateResult, css, html } from 'lit-element';\n\nimport { AttributePart } from 'lit-html';\nimport { ChoiceChangeEvent } from './ChoiceChangeEvent';\nimport { FrequencyInput } from '../FrequencyInput/FrequencyInput';\nimport { ScopedElementsMap } from '@open-wc/scoped-elements';\nimport { Translatable } from '../../../mixins/translatable';\nimport { interpret } from 'xstate';\nimport { machine } from './machine';\nimport { spread } from '@open-wc/lit-helpers/src/spread';\n\nconst VALUE_OTHER = `@foxy.io/elements::other[${(Math.pow(10, 10) * Math.random()).toFixed(0)}]`;\n\nfunction radio(\n readonly: boolean,\n disabled: boolean,\n checked: boolean,\n attrs: (part: AttributePart) => void,\n label: TemplateResult\n) {\n const enabledBg = checked ? 'bg-primary' : 'bg-contrast-20 group-hover-bg-contrast-30';\n const disabledBg = checked ? 'bg-primary-50' : 'bg-contrast-10';\n const scale = checked ? 'scale-100' : 'scale-0';\n const color = disabled ? 'text-disabled' : readonly ? 'text-secondary' : 'text-body';\n const ease = 'transition ease-in-out duration-200';\n const dotBg = readonly ? 'bg-contrast-20' : 'bg-tint';\n const dot = `${ease} ${disabled || readonly ? '' : 'shadow-xs'} transform ${scale} ${dotBg}`;\n const bg = readonly ? '' : disabled ? disabledBg : enabledBg;\n const border = `border ${readonly ? 'border-contrast-20' : 'border-transparent'}`;\n\n return html`\n <label class=\"group flex items-center ${disabled || readonly ? '' : 'cursor-pointer'}\">\n <div class=\"item flex items-center justify-center\">\n <div class=\"flex radio rounded-full ${border} ${ease} ${bg} focus-within-shadow-outline\">\n <div class=\"dot m-auto rounded-full ${dot}\"></div>\n <input type=\"radio\" class=\"sr-only\" .checked=${checked} ...=${attrs} />\n </div>\n </div>\n <div class=\"font-lumo leading-m ${color}\">${label}</div>\n </label>\n `;\n}\n\nfunction check(\n readonly: boolean,\n disabled: boolean,\n checked: boolean,\n attrs: (part: AttributePart) => void,\n label: TemplateResult\n) {\n const enabledBg = checked ? 'bg-primary' : 'bg-contrast-20 group-hover-bg-contrast-30';\n const disabledBg = checked ? 'bg-primary-50' : 'bg-contrast-10';\n const scale = checked ? 'scale-100' : 'scale-0';\n const color = disabled ? 'text-disabled' : readonly ? 'text-secondary' : 'text-body';\n const ease = 'transition ease-in-out duration-200';\n const dot = `${ease} transform ${scale} ${readonly ? 'text-contrast-20' : 'text-tint'}`;\n const bg = readonly ? '' : disabled ? disabledBg : enabledBg;\n const border = `border ${readonly ? 'border-contrast-20' : 'border-transparent'}`;\n\n return html`\n <label class=\"group flex items-center ${disabled || readonly ? '' : 'cursor-pointer'}\">\n <div class=\"item flex items-center justify-center text-primary-contrast\">\n <div class=\"check rounded-s ${border} ${ease} ${bg} focus-within-shadow-outline\">\n <iron-icon icon=\"lumo:checkmark\" class=\"block w-full h-full ${dot}\"></iron-icon>\n <input type=\"checkbox\" class=\"sr-only\" .checked=${checked} ...=${attrs} />\n </div>\n </div>\n <div class=\"font-lumo leading-m ${color}\">${label}</div>\n </label>\n `;\n}\n\nexport class Choice extends Translatable {\n public static get scopedElements(): ScopedElementsMap {\n return {\n 'vaadin-integer-field': customElements.get('vaadin-integer-field'),\n 'vaadin-text-field': customElements.get('vaadin-text-field'),\n 'x-frequency-input': FrequencyInput,\n 'vaadin-text-area': customElements.get('vaadin-text-area'),\n 'iron-icon': customElements.get('iron-icon'),\n };\n }\n\n public static get styles(): CSSResultArray {\n return [\n super.styles,\n css`\n :host {\n --item-width: calc((var(--lumo-space-m) * 2) + 1.25rem);\n }\n .ml-xxl {\n margin-left: var(--item-width);\n }\n .item {\n height: var(--lumo-size-l);\n width: var(--item-width);\n }\n .radio {\n height: 1.25rem;\n width: 1.25rem;\n }\n .check {\n height: 1.125rem;\n width: 1.125rem;\n }\n .dot {\n height: 0.5rem;\n width: 0.5rem;\n }\n `,\n ];\n }\n\n public static get properties(): PropertyDeclarations {\n return {\n ...super.properties,\n defaultCustomValue: { type: String, attribute: 'default-custom-value' },\n disabled: { type: Boolean },\n readonly: { type: Boolean },\n custom: { type: Boolean },\n type: { type: String },\n min: { type: Number },\n max: { type: Number },\n value: { type: Array },\n items: { type: Array },\n getText: { attribute: false },\n };\n }\n\n public getText: (value: string) => string = v => v;\n\n private __service = interpret(machine)\n .onChange(() => this.requestUpdate())\n .onTransition(({ changed }) => changed && this.requestUpdate())\n .start();\n\n public get defaultCustomValue(): string {\n return this.__service.state.context.defaultCustomValue;\n }\n\n public set defaultCustomValue(data: string) {\n this.__service.send('SET_DEFAULT_CUSTOM_VALUE', { data });\n }\n\n public get readonly(): boolean {\n return this.__service.state.matches('mutability.readonly');\n }\n\n public set readonly(data: boolean) {\n this.__service.send('SET_READONLY', { data });\n }\n\n public get disabled(): boolean {\n return this.__service.state.matches('interactivity.disabled');\n }\n\n public set disabled(data: boolean) {\n this.__service.send('SET_DISABLED', { data });\n }\n\n public get custom(): boolean {\n return this.__service.state.matches('extension.present');\n }\n\n public set custom(data: boolean) {\n this.__service.send('SET_CUSTOM', { data });\n }\n\n public get type(): 'text' | 'textarea' | 'integer' | 'frequency' {\n return this.__service.state.context.type;\n }\n\n public set type(data: 'text' | 'textarea' | 'integer' | 'frequency') {\n this.__service.send('SET_TYPE', { data });\n }\n\n public get min(): number | null {\n return this.__service.state.context.min;\n }\n\n public set min(data: number | null) {\n this.__service.send('SET_MIN', { data });\n }\n\n public get max(): number | null {\n return this.__service.state.context.max;\n }\n\n public set max(data: number | null) {\n this.__service.send('SET_MAX', { data });\n }\n\n public get value(): null | string | string[] {\n return this.__service.state.context.value;\n }\n\n public set value(data: null | string | string[]) {\n this.__service.send('SET_VALUE', { data });\n }\n\n public get items(): string[] {\n return this.__service.state.context.items;\n }\n\n public set items(data: string[]) {\n this.__service.send('SET_ITEMS', { data });\n }\n\n public render(): TemplateResult {\n const items = this.custom ? [...this.items, VALUE_OTHER] : this.items;\n const multiple = Array.isArray(this.value);\n const otherChecked = this.__service.state.matches('extension.present.selected');\n\n const children = html`\n ${items.map((item, index, array) => {\n const other = this.custom && index === array.length - 1;\n const checked = other\n ? otherChecked\n : multiple\n ? !!this.value?.includes(item)\n : item === String(this.value);\n const disabled = this.disabled || !this._isI18nReady;\n const attributes = spread({\n 'value': other ? VALUE_OTHER : item,\n 'name': multiple ? item : 'choice',\n 'data-testid': `item-${item}`,\n '?disabled': disabled || this.readonly,\n '@change': (evt: Event) => {\n const checked = (evt.target as HTMLInputElement).checked;\n const newItem = item === VALUE_OTHER ? this.defaultCustomValue : item;\n const value = this.value;\n if (Array.isArray(value)) {\n if (item === VALUE_OTHER) {\n this.value = checked ? [...value, newItem] : value.slice(0, value.length - 1);\n } else {\n this.value = checked ? [newItem, ...value] : value.filter(v => v !== newItem);\n }\n } else {\n this.value = checked ? newItem : null;\n }\n this.dispatchEvent(new ChoiceChangeEvent(this.value));\n },\n });\n const label = html`\n <div>\n ${item === VALUE_OTHER\n ? this._t('choice.other').toString()\n : html`<slot name=${`${item}-label`}>${this.getText(item)}</slot>`}\n </div>\n `;\n return html`\n <div class=\"ml-xxl border-t border-contrast-10 ${index ? '' : 'hidden'}\"></div>\n ${multiple\n ? check(this.readonly, disabled, checked, attributes, label)\n : radio(this.readonly, disabled, checked, attributes, label)}\n <div class=\"mr-m ml-xxl\">\n ${item === VALUE_OTHER && otherChecked ? this.__field : ''}\n ${item !== VALUE_OTHER ? html`<slot name=${item}></slot>` : ''}\n </div>\n `;\n })}\n `;\n\n return html`<form>${children}</form> `;\n }\n\n private get __field() {\n const handleInput = (evt: Event) => {\n evt.stopPropagation();\n const customValue = (evt.target as HTMLInputElement).value;\n\n if (Array.isArray(this.value)) {\n this.value = this.value.slice(0, this.value.length - 1).concat(customValue);\n } else {\n this.value = customValue;\n }\n\n this.dispatchEvent(new ChoiceChangeEvent(this.value));\n };\n\n const attributes = spread({\n 'placeholder': this._t('choice.other').toString(),\n 'class': 'w-full mb-m',\n 'value': this.__service.state.context.customValue,\n 'max': this.max,\n 'min': this.min,\n '?disabled': this.disabled,\n '?readonly': this.readonly,\n 'data-testid': 'field',\n '@change': handleInput,\n });\n\n if (this.type === 'frequency') {\n return html`<x-frequency-input ...=${attributes}></x-frequency-input>`;\n } else if (this.type === 'integer') {\n return html`<vaadin-integer-field ...=${attributes} has-controls></vaadin-integer-field>`;\n } else if (this.type === 'textarea') {\n return html`<vaadin-text-area ...=${attributes}></vaadin-text-area>`;\n } else {\n return html`<vaadin-text-field ...=${attributes}></vaadin-text-field>`;\n }\n }\n}\n"]}
1
+ {"version":3,"file":"Choice.js","sourceRoot":"","sources":["../../../../src/elements/private/Choice/Choice.ts"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAC;AAC5B,OAAO,kCAAkC,CAAC;AAC1C,OAAO,gDAAgD,CAAC;AACxD,OAAO,4CAA4C,CAAC;AACpD,OAAO,6CAA6C,CAAC;AAErD,OAAO,EAAwD,GAAG,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAG9F,OAAO,EAAE,iBAAiB,EAAE,+BAA4B;AACxD,OAAO,EAAE,cAAc,EAAE,4CAAyC;AAElE,OAAO,EAAE,YAAY,EAAE,wCAAqC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,qBAAkB;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAC;AAEzD,MAAM,WAAW,GAAG,4BAA4B,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,C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,IAAI,IAAI,CAAC,IAAI,KAAK,WAAW,EAAE;YAC7B,OAAO,IAAI,CAAA,0BAA0B,UAAU,uBAAuB,CAAC;SACxE;aAAM,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS,EAAE;YAClC,OAAO,IAAI,CAAA,6BAA6B,UAAU,uCAAuC,CAAC;SAC3F;aAAM,IAAI,IAAI,CAAC,IAAI,KAAK,UAAU,EAAE;YACnC,OAAO,IAAI,CAAA,yBAAyB,UAAU,sBAAsB,CAAC;SACtE;aAAM;YACL,OAAO,IAAI,CAAA,0BAA0B,UAAU,uBAAuB,CAAC;SACxE;IACH,CAAC;CACF","sourcesContent":["import '@polymer/iron-icon';\nimport '@vaadin/vaadin-lumo-styles/icons';\nimport '@vaadin/vaadin-text-field/vaadin-integer-field';\nimport '@vaadin/vaadin-text-field/vaadin-text-area';\nimport '@vaadin/vaadin-text-field/vaadin-text-field';\n\nimport { CSSResultArray, PropertyDeclarations, TemplateResult, css, html } from 'lit-element';\n\nimport { AttributePart } from 'lit-html';\nimport { ChoiceChangeEvent } from './ChoiceChangeEvent';\nimport { FrequencyInput } from '../FrequencyInput/FrequencyInput';\nimport { ScopedElementsMap } from '@open-wc/scoped-elements';\nimport { Translatable } from '../../../mixins/translatable';\nimport { interpret } from 'xstate';\nimport { machine } from './machine';\nimport { spread } from '@open-wc/lit-helpers/src/spread';\n\nconst VALUE_OTHER = `@foxy.io/elements::other[${(Math.pow(10, 10) * Math.random()).toFixed(0)}]`;\n\nfunction radio(\n readonly: boolean,\n disabled: boolean,\n checked: boolean,\n attrs: (part: AttributePart) => void,\n label: TemplateResult\n) {\n const enabledBg = checked ? 'bg-primary' : 'bg-contrast-20 group-hover-bg-contrast-30';\n const disabledBg = checked ? 'bg-primary-50' : 'bg-contrast-10';\n const scale = checked ? 'scale-100' : 'scale-0';\n const color = disabled ? 'text-disabled' : readonly ? 'text-secondary' : 'text-body';\n const ease = 'transition ease-in-out duration-200';\n const dotBg = readonly ? 'bg-contrast-20' : 'bg-tint';\n const dot = `${ease} ${disabled || readonly ? '' : 'shadow-xs'} transform ${scale} ${dotBg}`;\n const bg = readonly ? '' : disabled ? disabledBg : enabledBg;\n const border = `border ${readonly ? 'border-contrast-20' : 'border-transparent'}`;\n\n return html`\n <label class=\"group flex items-center ${disabled || readonly ? '' : 'cursor-pointer'}\">\n <div class=\"item flex items-center justify-center flex-shrink-0\">\n <div class=\"flex radio rounded-full ${border} ${ease} ${bg} focus-within-shadow-outline\">\n <div class=\"dot m-auto rounded-full ${dot}\"></div>\n <input type=\"radio\" class=\"sr-only\" .checked=${checked} ...=${attrs} />\n </div>\n </div>\n <div class=\"font-lumo leading-m ${color}\">${label}</div>\n </label>\n `;\n}\n\nfunction check(\n readonly: boolean,\n disabled: boolean,\n checked: boolean,\n attrs: (part: AttributePart) => void,\n label: TemplateResult\n) {\n const enabledBg = checked ? 'bg-primary' : 'bg-contrast-20 group-hover-bg-contrast-30';\n const disabledBg = checked ? 'bg-primary-50' : 'bg-contrast-10';\n const scale = checked ? 'scale-100' : 'scale-0';\n const color = disabled ? 'text-disabled' : readonly ? 'text-secondary' : 'text-body';\n const ease = 'transition ease-in-out duration-200';\n const dot = `${ease} transform ${scale} ${readonly ? 'text-contrast-20' : 'text-tint'}`;\n const bg = readonly ? '' : disabled ? disabledBg : enabledBg;\n const border = `border ${readonly ? 'border-contrast-20' : 'border-transparent'}`;\n\n return html`\n <label class=\"group flex items-center ${disabled || readonly ? '' : 'cursor-pointer'}\">\n <div class=\"item flex items-center justify-center flex-shrink-0 text-primary-contrast\">\n <div class=\"check rounded-s ${border} ${ease} ${bg} focus-within-shadow-outline\">\n <iron-icon icon=\"lumo:checkmark\" class=\"block w-full h-full ${dot}\"></iron-icon>\n <input type=\"checkbox\" class=\"sr-only\" .checked=${checked} ...=${attrs} />\n </div>\n </div>\n <div class=\"font-lumo leading-m ${color}\">${label}</div>\n </label>\n `;\n}\n\nexport class Choice extends Translatable {\n public static get scopedElements(): ScopedElementsMap {\n return {\n 'vaadin-integer-field': customElements.get('vaadin-integer-field'),\n 'vaadin-text-field': customElements.get('vaadin-text-field'),\n 'x-frequency-input': FrequencyInput,\n 'vaadin-text-area': customElements.get('vaadin-text-area'),\n 'iron-icon': customElements.get('iron-icon'),\n };\n }\n\n public static get styles(): CSSResultArray {\n return [\n super.styles,\n css`\n :host {\n --item-width: calc((var(--lumo-space-m) * 2) + 1.25rem);\n }\n .ml-xxl {\n margin-left: var(--item-width);\n }\n .item {\n height: var(--lumo-size-l);\n width: var(--item-width);\n }\n .radio {\n height: 1.25rem;\n width: 1.25rem;\n }\n .check {\n height: 1.125rem;\n width: 1.125rem;\n }\n .dot {\n height: 0.5rem;\n width: 0.5rem;\n }\n `,\n ];\n }\n\n public static get properties(): PropertyDeclarations {\n return {\n ...super.properties,\n defaultCustomValue: { type: String, attribute: 'default-custom-value' },\n disabled: { type: Boolean },\n readonly: { type: Boolean },\n custom: { type: Boolean },\n type: { type: String },\n min: { type: Number },\n max: { type: Number },\n value: { type: Array },\n items: { type: Array },\n getText: { attribute: false },\n };\n }\n\n public getText: (value: string) => string = v => v;\n\n private __service = interpret(machine)\n .onChange(() => this.requestUpdate())\n .onTransition(({ changed }) => changed && this.requestUpdate())\n .start();\n\n public get defaultCustomValue(): string {\n return this.__service.state.context.defaultCustomValue;\n }\n\n public set defaultCustomValue(data: string) {\n this.__service.send('SET_DEFAULT_CUSTOM_VALUE', { data });\n }\n\n public get readonly(): boolean {\n return this.__service.state.matches('mutability.readonly');\n }\n\n public set readonly(data: boolean) {\n this.__service.send('SET_READONLY', { data });\n }\n\n public get disabled(): boolean {\n return this.__service.state.matches('interactivity.disabled');\n }\n\n public set disabled(data: boolean) {\n this.__service.send('SET_DISABLED', { data });\n }\n\n public get custom(): boolean {\n return this.__service.state.matches('extension.present');\n }\n\n public set custom(data: boolean) {\n this.__service.send('SET_CUSTOM', { data });\n }\n\n public get type(): 'text' | 'textarea' | 'integer' | 'frequency' {\n return this.__service.state.context.type;\n }\n\n public set type(data: 'text' | 'textarea' | 'integer' | 'frequency') {\n this.__service.send('SET_TYPE', { data });\n }\n\n public get min(): number | null {\n return this.__service.state.context.min;\n }\n\n public set min(data: number | null) {\n this.__service.send('SET_MIN', { data });\n }\n\n public get max(): number | null {\n return this.__service.state.context.max;\n }\n\n public set max(data: number | null) {\n this.__service.send('SET_MAX', { data });\n }\n\n public get value(): null | string | string[] {\n return this.__service.state.context.value;\n }\n\n public set value(data: null | string | string[]) {\n this.__service.send('SET_VALUE', { data });\n }\n\n public get items(): string[] {\n return this.__service.state.context.items;\n }\n\n public set items(data: string[]) {\n this.__service.send('SET_ITEMS', { data });\n }\n\n public render(): TemplateResult {\n const items = this.custom ? [...this.items, VALUE_OTHER] : this.items;\n const multiple = Array.isArray(this.value);\n const otherChecked = this.__service.state.matches('extension.present.selected');\n\n const children = html`\n ${items.map((item, index, array) => {\n const other = this.custom && index === array.length - 1;\n const checked = other\n ? otherChecked\n : multiple\n ? !!this.value?.includes(item)\n : item === String(this.value);\n const disabled = this.disabled || !this._isI18nReady;\n const attributes = spread({\n 'value': other ? VALUE_OTHER : item,\n 'name': multiple ? item : 'choice',\n 'data-testid': `item-${item}`,\n '?disabled': disabled || this.readonly,\n '@change': (evt: Event) => {\n const checked = (evt.target as HTMLInputElement).checked;\n const newItem = item === VALUE_OTHER ? this.defaultCustomValue : item;\n const value = this.value;\n if (Array.isArray(value)) {\n if (item === VALUE_OTHER) {\n this.value = checked ? [...value, newItem] : value.slice(0, value.length - 1);\n } else {\n this.value = checked ? [newItem, ...value] : value.filter(v => v !== newItem);\n }\n } else {\n this.value = checked ? newItem : null;\n }\n this.dispatchEvent(new ChoiceChangeEvent(this.value));\n },\n });\n const label = html`\n <div>\n ${item === VALUE_OTHER\n ? this._t('choice.other').toString()\n : html`<slot name=${`${item}-label`}>${this.getText(item)}</slot>`}\n </div>\n `;\n return html`\n <div class=\"ml-xxl border-t border-contrast-10 ${index ? '' : 'hidden'}\"></div>\n ${multiple\n ? check(this.readonly, disabled, checked, attributes, label)\n : radio(this.readonly, disabled, checked, attributes, label)}\n <div class=\"mr-m ml-xxl\">\n ${item === VALUE_OTHER && otherChecked ? this.__field : ''}\n ${item !== VALUE_OTHER ? html`<slot name=${item}></slot>` : ''}\n </div>\n `;\n })}\n `;\n\n return html`<form>${children}</form> `;\n }\n\n private get __field() {\n const handleInput = (evt: Event) => {\n evt.stopPropagation();\n const customValue = (evt.target as HTMLInputElement).value;\n\n if (Array.isArray(this.value)) {\n this.value = this.value.slice(0, this.value.length - 1).concat(customValue);\n } else {\n this.value = customValue;\n }\n\n this.dispatchEvent(new ChoiceChangeEvent(this.value));\n };\n\n const attributes = spread({\n 'placeholder': this._t('choice.other').toString(),\n 'class': 'w-full mb-m',\n 'value': this.__service.state.context.customValue,\n 'max': this.max,\n 'min': this.min,\n '?disabled': this.disabled,\n '?readonly': this.readonly,\n 'data-testid': 'field',\n '@change': handleInput,\n });\n\n if (this.type === 'frequency') {\n return html`<x-frequency-input ...=${attributes}></x-frequency-input>`;\n } else if (this.type === 'integer') {\n return html`<vaadin-integer-field ...=${attributes} has-controls></vaadin-integer-field>`;\n } else if (this.type === 'textarea') {\n return html`<vaadin-text-area ...=${attributes}></vaadin-text-area>`;\n } else {\n return html`<vaadin-text-field ...=${attributes}></vaadin-text-field>`;\n }\n }\n}\n"]}
@@ -15,7 +15,7 @@ export class Group extends LitElement {
15
15
  return Themeable.styles;
16
16
  }
17
17
  render() {
18
- const frameClass = 'border border-contrast-10';
18
+ const frameClass = 'border border-contrast-10 overflow-hidden';
19
19
  return html `
20
20
  <section class="space-y-s font-lumo antialiased">
21
21
  <h3 class=${`text-s font-medium text-secondary leading-none ${this.frame ? '' : 'pl-m'}`}>
@@ -1 +1 @@
1
- {"version":3,"file":"Group.js","sourceRoot":"","sources":["../../../../src/elements/private/Group/Group.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,UAAU,EAGV,IAAI,GACL,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,SAAS,EAAE,qCAAkC;AAEtD,MAAM,OAAO,KAAM,SAAQ,UAAU;IAArC;;QAYS,UAAK,GAAG,KAAK,CAAC;IAiBvB,CAAC;IA5BQ,MAAM,KAAK,UAAU;QAC1B,OAAO;YACL,GAAG,KAAK,CAAC,UAAU;YACnB,KAAK,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;SACzB,CAAC;IACJ,CAAC;IAEM,MAAM,KAAK,MAAM;QACtB,OAAO,SAAS,CAAC,MAAM,CAAC;IAC1B,CAAC;IAIM,MAAM;QACX,MAAM,UAAU,GAAG,2BAA2B,CAAC;QAE/C,OAAO,IAAI,CAAA;;oBAEK,kDAAkD,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,EAAE;;;;8CAIlD,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE;;;;KAIrE,CAAC;IACJ,CAAC;CACF","sourcesContent":["import {\n CSSResult,\n CSSResultArray,\n LitElement,\n PropertyDeclarations,\n TemplateResult,\n html,\n} from 'lit-element';\n\nimport { Themeable } from '../../../mixins/themeable';\n\nexport class Group extends LitElement {\n public static get properties(): PropertyDeclarations {\n return {\n ...super.properties,\n frame: { type: Boolean },\n };\n }\n\n public static get styles(): CSSResult | CSSResultArray {\n return Themeable.styles;\n }\n\n public frame = false;\n\n public render(): TemplateResult {\n const frameClass = 'border border-contrast-10';\n\n return html`\n <section class=\"space-y-s font-lumo antialiased\">\n <h3 class=${`text-s font-medium text-secondary leading-none ${this.frame ? '' : 'pl-m'}`}>\n <slot name=\"header\"></slot>\n </h3>\n\n <div class=\"rounded-t-l rounded-b-l ${this.frame ? frameClass : ''}\">\n <slot></slot>\n </div>\n </section>\n `;\n }\n}\n"]}
1
+ {"version":3,"file":"Group.js","sourceRoot":"","sources":["../../../../src/elements/private/Group/Group.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,UAAU,EAGV,IAAI,GACL,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,SAAS,EAAE,qCAAkC;AAEtD,MAAM,OAAO,KAAM,SAAQ,UAAU;IAArC;;QAYS,UAAK,GAAG,KAAK,CAAC;IAiBvB,CAAC;IA5BQ,MAAM,KAAK,UAAU;QAC1B,OAAO;YACL,GAAG,KAAK,CAAC,UAAU;YACnB,KAAK,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;SACzB,CAAC;IACJ,CAAC;IAEM,MAAM,KAAK,MAAM;QACtB,OAAO,SAAS,CAAC,MAAM,CAAC;IAC1B,CAAC;IAIM,MAAM;QACX,MAAM,UAAU,GAAG,2CAA2C,CAAC;QAE/D,OAAO,IAAI,CAAA;;oBAEK,kDAAkD,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,EAAE;;;;8CAIlD,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE;;;;KAIrE,CAAC;IACJ,CAAC;CACF","sourcesContent":["import {\n CSSResult,\n CSSResultArray,\n LitElement,\n PropertyDeclarations,\n TemplateResult,\n html,\n} from 'lit-element';\n\nimport { Themeable } from '../../../mixins/themeable';\n\nexport class Group extends LitElement {\n public static get properties(): PropertyDeclarations {\n return {\n ...super.properties,\n frame: { type: Boolean },\n };\n }\n\n public static get styles(): CSSResult | CSSResultArray {\n return Themeable.styles;\n }\n\n public frame = false;\n\n public render(): TemplateResult {\n const frameClass = 'border border-contrast-10 overflow-hidden';\n\n return html`\n <section class=\"space-y-s font-lumo antialiased\">\n <h3 class=${`text-s font-medium text-secondary leading-none ${this.frame ? '' : 'pl-m'}`}>\n <slot name=\"header\"></slot>\n </h3>\n\n <div class=\"rounded-t-l rounded-b-l ${this.frame ? frameClass : ''}\">\n <slot></slot>\n </div>\n </section>\n `;\n }\n}\n"]}
@@ -139,7 +139,7 @@ export class EmailTemplateForm extends Base {
139
139
  >
140
140
  ${['default', 'url', 'clipboard'].map(value => {
141
141
  return html `
142
- <div slot="${value}-label" class="py-s">
142
+ <div slot="${value}-label" class="py-s leading-s">
143
143
  <foxy-i18n class="block" lang=${this.lang} key="template_${value}" ns=${this.ns}>
144
144
  </foxy-i18n>
145
145
 
@@ -1 +1 @@
1
- {"version":3,"file":"EmailTemplateForm.js","sourceRoot":"","sources":["../../../../src/elements/public/EmailTemplateForm/EmailTemplateForm.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwD,GAAG,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAC9F,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,EAAE,+BAA4B;AACnE,OAAO,EAAqB,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAElF,OAAO,EAAE,iBAAiB,EAAE,gCAA6B;AACzD,OAAO,EAAE,iBAAiB,EAAE,wCAAqC;AAIjE,OAAO,EAAE,cAAc,EAAE,4CAAyC;AAGlE,OAAO,EAAE,cAAc,EAAE,qCAAkC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,wCAAqC;AACjE,OAAO,EAAE,QAAQ,EAAE,oCAAiC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAE3D,MAAM,EAAE,GAAG,qBAAqB,CAAC;AACjC,MAAM,IAAI,GAAG,mBAAmB,CAC9B,cAAc,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC,CAAC,CACzE,CAAC;AAEF,MAAM,OAAO,iBAAkB,SAAQ,IAAU;IAAjD;;QAmCU,iBAAY,GAA6B,MAAM,CAAC;QAEhD,oBAAe,GAAoC,SAAS,CAAC;IA+QvE,CAAC;IAnTC,MAAM,KAAK,UAAU;QACnB,OAAO;YACL,GAAG,KAAK,CAAC,UAAU;YACnB,YAAY,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE;YAClC,eAAe,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE;SACtC,CAAC;IACJ,CAAC;IAED,MA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AE,IAAI,mCAAI,EAAE,CAAC;YACrD,MAAM,QAAQ,GAAG,MAAM,IAAI,iBAAiB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;YAEtF,IAAI,CAAC,YAAY,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC;SACnD;QAAC,WAAM;YACN,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC;SAC5B;IACH,CAAC;CACF","sourcesContent":["import { CSSResultArray, PropertyDeclarations, TemplateResult, css, html } from 'lit-element';\nimport { Choice, Group, PropertyTable } from '../../private/index';\nimport { ScopedElementsMap, ScopedElementsMixin } from '@open-wc/scoped-elements';\n\nimport { ChoiceChangeEvent } from '../../private/events';\nimport { ConfigurableMixin } from '../../../mixins/configurable';\nimport { Data } from './types';\nimport { DialogHideEvent } from '../../private/Dialog/DialogHideEvent';\nimport { InternalConfirmDialog } from '../../internal/InternalConfirmDialog/InternalConfirmDialog';\nimport { NucleonElement } from '../NucleonElement/NucleonElement';\nimport { TextAreaElement } from '@vaadin/vaadin-text-field/vaadin-text-area';\nimport { TextFieldElement } from '@vaadin/vaadin-text-field';\nimport { ThemeableMixin } from '../../../mixins/themeable';\nimport { TranslatableMixin } from '../../../mixins/translatable';\nimport { classMap } from '../../../utils/class-map';\nimport { ifDefined } from 'lit-html/directives/if-defined';\n\nconst NS = 'email-template-form';\nconst Base = ScopedElementsMixin(\n ThemeableMixin(ConfigurableMixin(TranslatableMixin(NucleonElement, NS)))\n);\n\nexport class EmailTemplateForm extends Base<Data> {\n static get properties(): PropertyDeclarations {\n return {\n ...super.properties,\n __cacheState: { attribute: false },\n __contentChoice: { attribute: false },\n };\n }\n\n static get styles(): CSSResultArray {\n return [\n ...super.styles,\n css`\n #cached-content::part(input-field) {\n max-height: 15em;\n }\n `,\n ];\n }\n\n static get scopedElements(): ScopedElementsMap {\n return {\n 'foxy-internal-confirm-dialog': customElements.get('foxy-internal-confirm-dialog'),\n 'foxy-internal-sandbox': customElements.get('foxy-internal-sandbox'),\n 'foxy-spinner': customElements.get('foxy-spinner'),\n 'foxy-i18n': customElements.get('foxy-i18n'),\n 'vaadin-text-field': customElements.get('vaadin-text-field'),\n 'vaadin-text-area': customElements.get('vaadin-text-area'),\n 'vaadin-button': customElements.get('vaadin-button'),\n 'x-property-table': PropertyTable,\n 'x-choice': Choice,\n 'x-group': Group,\n };\n }\n\n private __cacheState: 'idle' | 'busy' | 'fail' = 'idle';\n\n private __contentChoice: 'default' | 'url' | 'clipboard' = 'default';\n\n render(): TemplateResult {\n const { hiddenSelector, href, lang, ns } = this;\n const action = href ? 'delete' : 'create';\n const isBusy = this.in('busy');\n const isFail = this.in('fail');\n\n return html`\n <div class=\"space-y-m\">\n ${hiddenSelector.matches('description', true) ? '' : this.__renderDescription()}\n ${hiddenSelector.matches('content', true) ? '' : this.__renderContent()}\n ${hiddenSelector.matches('timestamps', true) || !href ? '' : this.__renderTimestamps()}\n ${hiddenSelector.matches(action) ? '' : this.__renderAction(action)}\n\n <div\n data-testid=\"spinner\"\n class=${classMap({\n 'transition duration-500 ease-in-out absolute inset-0 flex': true,\n 'opacity-0 pointer-events-none': !isBusy && !isFail,\n })}\n >\n <foxy-spinner\n layout=\"vertical\"\n class=\"m-auto p-m bg-base shadow-xs rounded-t-l rounded-b-l\"\n state=${isFail ? 'error' : isBusy ? 'busy' : 'empty'}\n lang=${lang}\n ns=\"${ns} ${customElements.get('foxy-spinner')?.defaultNS ?? ''}\"\n >\n </foxy-spinner>\n </div>\n </div>\n `;\n }\n\n private __renderDescription() {\n return html`\n <div>\n ${this.renderTemplateOrSlot('description:before')}\n\n <vaadin-text-field\n class=\"w-full mb-s\"\n label=${this.t('description')}\n .value=${this.form?.description ?? ''}\n @keydown=${(evt: KeyboardEvent) => evt.key === 'Enter' && this.submit()}\n @input=${(evt: CustomEvent) => {\n this.edit({ description: (evt.currentTarget as TextFieldElement).value });\n }}\n >\n </vaadin-text-field>\n\n ${this.renderTemplateOrSlot('description:after')}\n </div>\n `;\n }\n\n private __renderContent() {\n return html`\n <div>\n ${this.renderTemplateOrSlot('content:before')}\n\n <div class=\"space-y-l\">\n ${this.__renderTabContent('content_text_url', 'content_text', 'text_template')}\n ${this.__renderTabContent('content_html_url', 'content_html', 'html_template')}\n </div>\n\n ${this.renderTemplateOrSlot('content:after')}\n </div>\n `;\n }\n\n private __renderTabContent(\n urlPath: 'content_text_url' | 'content_html_url',\n textPath: 'content_text' | 'content_html',\n header: string\n ) {\n const contentChoice = this.form[urlPath]\n ? 'url'\n : this.form[textPath]\n ? 'clipboard'\n : this.__contentChoice;\n\n return html`\n <x-group frame>\n <foxy-i18n lang=${this.lang} slot=\"header\" key=${header} ns=${this.ns}></foxy-i18n>\n\n <x-choice\n data-testid=\"template-type\"\n .value=${contentChoice}\n .items=${['default', 'url', 'clipboard']}\n ?readonly=${this.readonlySelector.matches('content', true)}\n ?disabled=${this.in('busy') || this.disabledSelector.matches('content', true)}\n @change=${(evt: Event) => {\n if (evt instanceof ChoiceChangeEvent) {\n this.edit({ [textPath]: '', [urlPath]: '' });\n this.__contentChoice = evt.detail as 'url' | 'clipboard' | 'default';\n }\n }}\n >\n ${['default', 'url', 'clipboard'].map(value => {\n return html`\n <div slot=\"${value}-label\" class=\"py-s\">\n <foxy-i18n class=\"block\" lang=${this.lang} key=\"template_${value}\" ns=${this.ns}>\n </foxy-i18n>\n\n <foxy-i18n\n class=\"block text-s opacity-70\"\n lang=${this.lang}\n key=\"template_${value}_explainer\"\n ns=${this.ns}\n >\n </foxy-i18n>\n </div>\n `;\n })}\n\n <div slot=\"url\" ?hidden=${contentChoice !== 'url'}>\n <div class=\"flex items-center mt-0 mb-m\">\n <vaadin-text-field\n data-testid=\"content_url\"\n value=${ifDefined(this.form[urlPath])}\n class=\"mr-s flex-grow\"\n @input=${(evt: CustomEvent) => {\n const value = (evt.currentTarget as TextFieldElement).value;\n this.edit({ [textPath]: '', [urlPath]: value });\n }}\n >\n </vaadin-text-field>\n\n ${this.form[urlPath] === this.data?.[urlPath]\n ? html`\n <vaadin-button\n class=\"relative\"\n ?disabled=${this.__cacheState === 'busy'}\n @click=${this.__cache}\n >\n <foxy-i18n\n class=${classMap({\n 'relative transition-opacity': true,\n 'opacity-0': this.__cacheState !== 'idle',\n })}\n lang=${this.lang}\n key=\"cache\"\n ns=${this.ns}\n >\n </foxy-i18n>\n\n <div\n class=${classMap({\n 'absolute inset-0 flex transition-opacity': true,\n 'opacity-0': this.__cacheState === 'idle',\n })}\n >\n <foxy-spinner\n layout=\"no-label\"\n class=\"m-auto\"\n state=${this.__cacheState === 'fail' ? 'error' : 'busy'}\n lang=${this.lang}\n ns=${this.ns}\n >\n </foxy-spinner>\n </div>\n </vaadin-button>\n `\n : ''}\n </div>\n </div>\n\n <div slot=\"clipboard\" ?hidden=${contentChoice !== 'clipboard'}>\n <vaadin-text-area\n id=\"cached-content\"\n data-testid=\"content\"\n class=\"w-full mb-m\"\n .value=${this.form[textPath]}\n @input=${(evt: CustomEvent) => {\n const value = (evt.currentTarget as TextAreaElement).value;\n this.edit({ [textPath]: value, [urlPath]: '' });\n }}\n >\n </vaadin-text-area>\n </div>\n </x-choice>\n </x-group>\n `;\n }\n\n private __renderTimestamps() {\n return html`\n <div>\n ${this.renderTemplateOrSlot('timestamps:before')}\n\n <x-property-table\n data-testid=\"timestamps\"\n .items=${(['date_modified', 'date_created'] as const).map(field => ({\n name: this.t(field),\n value: this.data?.[field]\n ? this.t('date', { value: new Date(this.data[field] as string) })\n : '',\n }))}\n >\n </x-property-table>\n\n ${this.renderTemplateOrSlot('timestamps:after')}\n </div>\n `;\n }\n\n private __renderAction(action: string) {\n const { disabledSelector, href, lang, ns } = this;\n\n const isTemplateValid = this.in({ idle: { template: { dirty: 'valid' } } });\n const isSnapshotValid = this.in({ idle: { snapshot: { dirty: 'valid' } } });\n const isDisabled = !this.in('idle') || disabledSelector.matches(action, true);\n const isValid = isTemplateValid || isSnapshotValid;\n\n const handleClick = (evt: Event) => {\n if (action === 'delete') {\n const confirm = this.renderRoot.querySelector('#confirm');\n (confirm as InternalConfirmDialog).show(evt.currentTarget as HTMLElement);\n } else {\n this.submit();\n }\n };\n\n return html`\n <div>\n ${this.renderTemplateOrSlot(`${action}:before`)}\n\n <foxy-internal-confirm-dialog\n message=\"delete_prompt\"\n confirm=\"delete\"\n cancel=\"cancel\"\n header=\"delete\"\n theme=\"primary error\"\n lang=${lang}\n ns=${ns}\n id=\"confirm\"\n data-testid=\"confirm\"\n @hide=${(evt: DialogHideEvent) => {\n if (!evt.detail.cancelled) this.delete();\n }}\n >\n </foxy-internal-confirm-dialog>\n\n <vaadin-button\n class=\"w-full\"\n theme=${this.in('idle') ? `primary ${href ? 'error' : 'success'}` : ''}\n data-testid=${action}\n ?disabled=${(this.in({ idle: 'template' }) && !isValid) || isDisabled}\n @click=${handleClick}\n >\n <foxy-i18n ns=${ns} key=${action} lang=${lang}></foxy-i18n>\n </vaadin-button>\n\n ${this.renderTemplateOrSlot(`${action}:after`)}\n </div>\n `;\n }\n\n private async __cache(): Promise<void> {\n this.__cacheState = 'busy';\n\n try {\n const url = this.data?._links['fx:cache'].href ?? '';\n const response = await new EmailTemplateForm.API(this).fetch(url, { method: 'POST' });\n\n this.__cacheState = response.ok ? 'idle' : 'fail';\n } catch {\n this.__cacheState = 'fail';\n }\n }\n}\n"]}
1
+ {"version":3,"file":"EmailTemplateForm.js","sourceRoot":"","sources":["../../../../src/elements/public/EmailTemplateForm/EmailTemplateForm.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwD,GAAG,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAC9F,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,EAAE,+BAA4B;AACnE,OAAO,EAAqB,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAElF,OAAO,EAAE,iBAAiB,EAAE,gC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AAS,CAAC;;;;;;;;iBAQtC,IAAI;eACN,EAAE;;;kBAGC,CAAC,GAAoB,EAAE,EAAE;YAC/B,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,SAAS;gBAAE,IAAI,CAAC,MAAM,EAAE,CAAC;QAC3C,CAAC;;;;;;kBAMO,IAAI,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE;wBACxD,MAAM;sBACR,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,UAAU;mBAC5D,WAAW;;0BAEJ,EAAE,QAAQ,MAAM,SAAS,IAAI;;;UAG7C,IAAI,CAAC,oBAAoB,CAAC,GAAG,MAAM,QAAQ,CAAC;;KAEjD,CAAC;IACJ,CAAC;IAEO,KAAK,CAAC,OAAO;;QACnB,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC;QAE3B,IAAI;YACF,MAAM,GAAG,eAAG,IAAI,CAAC,IAAI,0CAAE,MAAM,CAAC,UAAU,EAAE,IAAI,mCAAI,EAAE,CAAC;YACrD,MAAM,QAAQ,GAAG,MAAM,IAAI,iBAAiB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;YAEtF,IAAI,CAAC,YAAY,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC;SACnD;QAAC,WAAM;YACN,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC;SAC5B;IACH,CAAC;CACF","sourcesContent":["import { CSSResultArray, PropertyDeclarations, TemplateResult, css, html } from 'lit-element';\nimport { Choice, Group, PropertyTable } from '../../private/index';\nimport { ScopedElementsMap, ScopedElementsMixin } from '@open-wc/scoped-elements';\n\nimport { ChoiceChangeEvent } from '../../private/events';\nimport { ConfigurableMixin } from '../../../mixins/configurable';\nimport { Data } from './types';\nimport { DialogHideEvent } from '../../private/Dialog/DialogHideEvent';\nimport { InternalConfirmDialog } from '../../internal/InternalConfirmDialog/InternalConfirmDialog';\nimport { NucleonElement } from '../NucleonElement/NucleonElement';\nimport { TextAreaElement } from '@vaadin/vaadin-text-field/vaadin-text-area';\nimport { TextFieldElement } from '@vaadin/vaadin-text-field';\nimport { ThemeableMixin } from '../../../mixins/themeable';\nimport { TranslatableMixin } from '../../../mixins/translatable';\nimport { classMap } from '../../../utils/class-map';\nimport { ifDefined } from 'lit-html/directives/if-defined';\n\nconst NS = 'email-template-form';\nconst Base = ScopedElementsMixin(\n ThemeableMixin(ConfigurableMixin(TranslatableMixin(NucleonElement, NS)))\n);\n\nexport class EmailTemplateForm extends Base<Data> {\n static get properties(): PropertyDeclarations {\n return {\n ...super.properties,\n __cacheState: { attribute: false },\n __contentChoice: { attribute: false },\n };\n }\n\n static get styles(): CSSResultArray {\n return [\n ...super.styles,\n css`\n #cached-content::part(input-field) {\n max-height: 15em;\n }\n `,\n ];\n }\n\n static get scopedElements(): ScopedElementsMap {\n return {\n 'foxy-internal-confirm-dialog': customElements.get('foxy-internal-confirm-dialog'),\n 'foxy-internal-sandbox': customElements.get('foxy-internal-sandbox'),\n 'foxy-spinner': customElements.get('foxy-spinner'),\n 'foxy-i18n': customElements.get('foxy-i18n'),\n 'vaadin-text-field': customElements.get('vaadin-text-field'),\n 'vaadin-text-area': customElements.get('vaadin-text-area'),\n 'vaadin-button': customElements.get('vaadin-button'),\n 'x-property-table': PropertyTable,\n 'x-choice': Choice,\n 'x-group': Group,\n };\n }\n\n private __cacheState: 'idle' | 'busy' | 'fail' = 'idle';\n\n private __contentChoice: 'default' | 'url' | 'clipboard' = 'default';\n\n render(): TemplateResult {\n const { hiddenSelector, href, lang, ns } = this;\n const action = href ? 'delete' : 'create';\n const isBusy = this.in('busy');\n const isFail = this.in('fail');\n\n return html`\n <div class=\"space-y-m\">\n ${hiddenSelector.matches('description', true) ? '' : this.__renderDescription()}\n ${hiddenSelector.matches('content', true) ? '' : this.__renderContent()}\n ${hiddenSelector.matches('timestamps', true) || !href ? '' : this.__renderTimestamps()}\n ${hiddenSelector.matches(action) ? '' : this.__renderAction(action)}\n\n <div\n data-testid=\"spinner\"\n class=${classMap({\n 'transition duration-500 ease-in-out absolute inset-0 flex': true,\n 'opacity-0 pointer-events-none': !isBusy && !isFail,\n })}\n >\n <foxy-spinner\n layout=\"vertical\"\n class=\"m-auto p-m bg-base shadow-xs rounded-t-l rounded-b-l\"\n state=${isFail ? 'error' : isBusy ? 'busy' : 'empty'}\n lang=${lang}\n ns=\"${ns} ${customElements.get('foxy-spinner')?.defaultNS ?? ''}\"\n >\n </foxy-spinner>\n </div>\n </div>\n `;\n }\n\n private __renderDescription() {\n return html`\n <div>\n ${this.renderTemplateOrSlot('description:before')}\n\n <vaadin-text-field\n class=\"w-full mb-s\"\n label=${this.t('description')}\n .value=${this.form?.description ?? ''}\n @keydown=${(evt: KeyboardEvent) => evt.key === 'Enter' && this.submit()}\n @input=${(evt: CustomEvent) => {\n this.edit({ description: (evt.currentTarget as TextFieldElement).value });\n }}\n >\n </vaadin-text-field>\n\n ${this.renderTemplateOrSlot('description:after')}\n </div>\n `;\n }\n\n private __renderContent() {\n return html`\n <div>\n ${this.renderTemplateOrSlot('content:before')}\n\n <div class=\"space-y-l\">\n ${this.__renderTabContent('content_text_url', 'content_text', 'text_template')}\n ${this.__renderTabContent('content_html_url', 'content_html', 'html_template')}\n </div>\n\n ${this.renderTemplateOrSlot('content:after')}\n </div>\n `;\n }\n\n private __renderTabContent(\n urlPath: 'content_text_url' | 'content_html_url',\n textPath: 'content_text' | 'content_html',\n header: string\n ) {\n const contentChoice = this.form[urlPath]\n ? 'url'\n : this.form[textPath]\n ? 'clipboard'\n : this.__contentChoice;\n\n return html`\n <x-group frame>\n <foxy-i18n lang=${this.lang} slot=\"header\" key=${header} ns=${this.ns}></foxy-i18n>\n\n <x-choice\n data-testid=\"template-type\"\n .value=${contentChoice}\n .items=${['default', 'url', 'clipboard']}\n ?readonly=${this.readonlySelector.matches('content', true)}\n ?disabled=${this.in('busy') || this.disabledSelector.matches('content', true)}\n @change=${(evt: Event) => {\n if (evt instanceof ChoiceChangeEvent) {\n this.edit({ [textPath]: '', [urlPath]: '' });\n this.__contentChoice = evt.detail as 'url' | 'clipboard' | 'default';\n }\n }}\n >\n ${['default', 'url', 'clipboard'].map(value => {\n return html`\n <div slot=\"${value}-label\" class=\"py-s leading-s\">\n <foxy-i18n class=\"block\" lang=${this.lang} key=\"template_${value}\" ns=${this.ns}>\n </foxy-i18n>\n\n <foxy-i18n\n class=\"block text-s opacity-70\"\n lang=${this.lang}\n key=\"template_${value}_explainer\"\n ns=${this.ns}\n >\n </foxy-i18n>\n </div>\n `;\n })}\n\n <div slot=\"url\" ?hidden=${contentChoice !== 'url'}>\n <div class=\"flex items-center mt-0 mb-m\">\n <vaadin-text-field\n data-testid=\"content_url\"\n value=${ifDefined(this.form[urlPath])}\n class=\"mr-s flex-grow\"\n @input=${(evt: CustomEvent) => {\n const value = (evt.currentTarget as TextFieldElement).value;\n this.edit({ [textPath]: '', [urlPath]: value });\n }}\n >\n </vaadin-text-field>\n\n ${this.form[urlPath] === this.data?.[urlPath]\n ? html`\n <vaadin-button\n class=\"relative\"\n ?disabled=${this.__cacheState === 'busy'}\n @click=${this.__cache}\n >\n <foxy-i18n\n class=${classMap({\n 'relative transition-opacity': true,\n 'opacity-0': this.__cacheState !== 'idle',\n })}\n lang=${this.lang}\n key=\"cache\"\n ns=${this.ns}\n >\n </foxy-i18n>\n\n <div\n class=${classMap({\n 'absolute inset-0 flex transition-opacity': true,\n 'opacity-0': this.__cacheState === 'idle',\n })}\n >\n <foxy-spinner\n layout=\"no-label\"\n class=\"m-auto\"\n state=${this.__cacheState === 'fail' ? 'error' : 'busy'}\n lang=${this.lang}\n ns=${this.ns}\n >\n </foxy-spinner>\n </div>\n </vaadin-button>\n `\n : ''}\n </div>\n </div>\n\n <div slot=\"clipboard\" ?hidden=${contentChoice !== 'clipboard'}>\n <vaadin-text-area\n id=\"cached-content\"\n data-testid=\"content\"\n class=\"w-full mb-m\"\n .value=${this.form[textPath]}\n @input=${(evt: CustomEvent) => {\n const value = (evt.currentTarget as TextAreaElement).value;\n this.edit({ [textPath]: value, [urlPath]: '' });\n }}\n >\n </vaadin-text-area>\n </div>\n </x-choice>\n </x-group>\n `;\n }\n\n private __renderTimestamps() {\n return html`\n <div>\n ${this.renderTemplateOrSlot('timestamps:before')}\n\n <x-property-table\n data-testid=\"timestamps\"\n .items=${(['date_modified', 'date_created'] as const).map(field => ({\n name: this.t(field),\n value: this.data?.[field]\n ? this.t('date', { value: new Date(this.data[field] as string) })\n : '',\n }))}\n >\n </x-property-table>\n\n ${this.renderTemplateOrSlot('timestamps:after')}\n </div>\n `;\n }\n\n private __renderAction(action: string) {\n const { disabledSelector, href, lang, ns } = this;\n\n const isTemplateValid = this.in({ idle: { template: { dirty: 'valid' } } });\n const isSnapshotValid = this.in({ idle: { snapshot: { dirty: 'valid' } } });\n const isDisabled = !this.in('idle') || disabledSelector.matches(action, true);\n const isValid = isTemplateValid || isSnapshotValid;\n\n const handleClick = (evt: Event) => {\n if (action === 'delete') {\n const confirm = this.renderRoot.querySelector('#confirm');\n (confirm as InternalConfirmDialog).show(evt.currentTarget as HTMLElement);\n } else {\n this.submit();\n }\n };\n\n return html`\n <div>\n ${this.renderTemplateOrSlot(`${action}:before`)}\n\n <foxy-internal-confirm-dialog\n message=\"delete_prompt\"\n confirm=\"delete\"\n cancel=\"cancel\"\n header=\"delete\"\n theme=\"primary error\"\n lang=${lang}\n ns=${ns}\n id=\"confirm\"\n data-testid=\"confirm\"\n @hide=${(evt: DialogHideEvent) => {\n if (!evt.detail.cancelled) this.delete();\n }}\n >\n </foxy-internal-confirm-dialog>\n\n <vaadin-button\n class=\"w-full\"\n theme=${this.in('idle') ? `primary ${href ? 'error' : 'success'}` : ''}\n data-testid=${action}\n ?disabled=${(this.in({ idle: 'template' }) && !isValid) || isDisabled}\n @click=${handleClick}\n >\n <foxy-i18n ns=${ns} key=${action} lang=${lang}></foxy-i18n>\n </vaadin-button>\n\n ${this.renderTemplateOrSlot(`${action}:after`)}\n </div>\n `;\n }\n\n private async __cache(): Promise<void> {\n this.__cacheState = 'busy';\n\n try {\n const url = this.data?._links['fx:cache'].href ?? '';\n const response = await new EmailTemplateForm.API(this).fetch(url, { method: 'POST' });\n\n this.__cacheState = response.ok ? 'idle' : 'fail';\n } catch {\n this.__cacheState = 'fail';\n }\n }\n}\n"]}
@@ -0,0 +1,23 @@
1
+ import { ScopedElementsMap } from '@open-wc/scoped-elements';
2
+ import { TemplateResult } from 'lit-html';
3
+ import { NucleonElement } from '../NucleonElement/NucleonElement';
4
+ import { PropertyDeclarations } from 'lit-element';
5
+ import { Rels } from '@foxy.io/sdk/backend';
6
+ import { Resource } from '@foxy.io/sdk/core';
7
+ declare const Base: typeof NucleonElement & import("lit-element").Constructor<import("../../../mixins/translatable").TranslatableMixinHost> & {
8
+ defaultNS: string;
9
+ } & {
10
+ styles: import("lit-element").CSSResultArray;
11
+ } & import("@open-wc/dedupe-mixin").Constructor<import("@open-wc/scoped-elements/src/types").ScopedElementsHost>;
12
+ export declare class CountriesList extends Base<Resource<Rels.Countries>> {
13
+ static get scopedElements(): ScopedElementsMap;
14
+ static get properties(): PropertyDeclarations;
15
+ countries: Record<string, '*' | string[]>;
16
+ disabled: boolean;
17
+ readonly: boolean;
18
+ regions: string;
19
+ country: string;
20
+ render(): TemplateResult;
21
+ private __addCountry;
22
+ }
23
+ export {};