@foxy.io/elements 1.14.0-beta.3 → 1.14.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/foxy-access-recovery-form.js +1 -1
- package/dist/cdn/foxy-address-card.js +1 -1
- package/dist/cdn/foxy-address-form.js +1 -1
- package/dist/cdn/foxy-applied-tax-card.js +1 -1
- package/dist/cdn/foxy-attribute-card.js +1 -1
- package/dist/cdn/foxy-attribute-form.js +1 -1
- package/dist/cdn/foxy-cancellation-form.js +1 -1
- package/dist/cdn/foxy-collection-page.js +1 -1
- package/dist/cdn/foxy-collection-pages.js +1 -1
- package/dist/cdn/foxy-custom-field-card.js +1 -1
- package/dist/cdn/foxy-custom-field-form.js +1 -1
- package/dist/cdn/foxy-customer-api.js +1 -1
- package/dist/cdn/foxy-customer-card.js +1 -1
- package/dist/cdn/foxy-customer-form.js +1 -1
- package/dist/cdn/foxy-customer-portal-settings.js +9 -9
- package/dist/cdn/foxy-customer-portal.js +1 -1
- package/dist/cdn/foxy-customer.js +1 -1
- package/dist/cdn/foxy-customers-table.js +1 -1
- package/dist/cdn/foxy-discount-card.js +1 -1
- package/dist/cdn/foxy-donation.js +1 -1
- package/dist/cdn/foxy-email-template-form.js +1 -1
- package/dist/cdn/foxy-error-entry-card.js +1 -1
- package/dist/cdn/foxy-form-dialog.js +1 -1
- package/dist/cdn/foxy-i18n.js +1 -1
- package/dist/cdn/foxy-items-form.js +1 -1
- package/dist/cdn/foxy-nucleon-element.js +1 -1
- package/dist/cdn/foxy-payment-card.js +1 -1
- package/dist/cdn/foxy-payment-method-card.js +1 -1
- package/dist/cdn/foxy-query-builder.js +2 -2
- package/dist/cdn/foxy-sign-in-form.js +1 -1
- package/dist/cdn/foxy-spinner.js +1 -1
- package/dist/cdn/foxy-subscription-card.js +1 -1
- package/dist/cdn/foxy-subscription-form.js +4 -4
- package/dist/cdn/foxy-subscriptions-table.js +1 -1
- package/dist/cdn/foxy-table.js +1 -1
- package/dist/cdn/foxy-tax-card.js +1 -1
- package/dist/cdn/foxy-tax-form.js +1 -1
- package/dist/cdn/foxy-template-config-form.js +14 -0
- package/dist/cdn/foxy-template-form.js +1 -1
- package/dist/cdn/foxy-transaction-card.js +1 -1
- package/dist/cdn/foxy-transactions-table.js +1 -1
- package/dist/cdn/foxy-user-form.js +1 -1
- package/dist/cdn/foxy-users-table.js +1 -1
- package/dist/cdn/{shared-14788132.js → shared-00563cb0.js} +1 -1
- package/dist/cdn/shared-0ced76a0.js +358 -0
- package/dist/cdn/{shared-302d8a7b.js → shared-106daaca.js} +1 -1
- package/dist/cdn/{shared-c7f352fa.js → shared-10bdb6b9.js} +5 -5
- package/dist/cdn/{shared-2d99835c.js → shared-1469c1c4.js} +1 -1
- package/dist/cdn/{shared-d196432b.js → shared-16f72e27.js} +1 -1
- package/dist/cdn/{shared-82dd0556.js → shared-1761daef.js} +1 -1
- package/dist/cdn/shared-18459dcd.js +264 -0
- package/dist/cdn/{shared-a21a7562.js → shared-1b7e65e4.js} +1 -1
- package/dist/cdn/{shared-3534b284.js → shared-200f613b.js} +1 -1
- package/dist/cdn/{shared-57522229.js → shared-2174bcd4.js} +1 -1
- package/dist/cdn/{shared-3e14c0d2.js → shared-218ba06e.js} +1 -1
- package/dist/cdn/{shared-acf49ecc.js → shared-34b2c1e2.js} +1 -1
- package/dist/cdn/{shared-72678c5d.js → shared-3d868b17.js} +1 -1
- package/dist/cdn/{shared-b8349f79.js → shared-44cfc617.js} +1 -1
- package/dist/cdn/shared-4a52d9b5.js +1 -0
- package/dist/cdn/shared-4be4e513.js +314 -0
- package/dist/cdn/{shared-a4410f22.js → shared-593f7e2c.js} +1 -1
- package/dist/cdn/{shared-d19e2399.js → shared-59e44f29.js} +1 -1
- package/dist/cdn/{shared-84df58e1.js → shared-614e1a4e.js} +1 -1
- package/dist/cdn/{shared-d97a6ee5.js → shared-63eaded9.js} +3 -3
- package/dist/cdn/{shared-7fd12533.js → shared-6b7602c7.js} +1 -1
- package/dist/cdn/{shared-94c83b2b.js → shared-6d45a07b.js} +1 -1
- package/dist/cdn/{shared-dd66b354.js → shared-7a39a41f.js} +1 -1
- package/dist/cdn/{shared-652ef7fe.js → shared-9221e6b2.js} +1 -1
- package/dist/cdn/{shared-59a0cb0f.js → shared-94b0ae99.js} +1 -1
- package/dist/cdn/{shared-bbc97ae0.js → shared-9d779f46.js} +1 -1
- package/dist/cdn/{shared-3553ff4d.js → shared-a46edf4b.js} +1 -1
- package/dist/cdn/{shared-27d93838.js → shared-b0f0e8b5.js} +1 -1
- package/dist/cdn/shared-b28a59de.js +1 -0
- package/dist/cdn/{shared-8e38d64f.js → shared-b710881a.js} +2 -2
- package/dist/cdn/{shared-dce03b47.js → shared-bb824ab4.js} +1 -1
- package/dist/cdn/shared-c4b96261.js +1 -0
- package/dist/cdn/{shared-2b2b56f6.js → shared-d94ffc2b.js} +1 -1
- package/dist/cdn/shared-df573cea.js +12 -0
- package/dist/cdn/{shared-fda14a3d.js → shared-e7f8ffe9.js} +1 -1
- package/dist/cdn/{shared-92442eb1.js → shared-ec861f31.js} +1 -1
- package/dist/cdn/{shared-a71bd9f0.js → shared-f0a83bd6.js} +1 -1
- package/dist/cdn/{shared-e969772e.js → shared-fb90e05c.js} +1 -1
- package/dist/cdn/translations/shared/en.json +41 -1
- package/dist/elements/private/Group/Group.js +1 -1
- package/dist/elements/private/Group/Group.js.map +1 -1
- package/dist/elements/public/TemplateConfigForm/CountriesList.d.ts +23 -0
- package/dist/elements/public/TemplateConfigForm/CountriesList.js +129 -0
- package/dist/elements/public/TemplateConfigForm/CountriesList.js.map +1 -0
- package/dist/elements/public/TemplateConfigForm/CountryCard.d.ts +20 -0
- package/dist/elements/public/TemplateConfigForm/CountryCard.js +125 -0
- package/dist/elements/public/TemplateConfigForm/CountryCard.js.map +1 -0
- package/dist/elements/public/TemplateConfigForm/TemplateConfigForm.d.ts +25 -0
- package/dist/elements/public/TemplateConfigForm/TemplateConfigForm.js +529 -0
- package/dist/elements/public/TemplateConfigForm/TemplateConfigForm.js.map +1 -0
- package/dist/elements/public/TemplateConfigForm/defaults.d.ts +2 -0
- package/dist/elements/public/TemplateConfigForm/defaults.js +95 -0
- package/dist/elements/public/TemplateConfigForm/defaults.js.map +1 -0
- package/dist/elements/public/TemplateConfigForm/index.d.ts +9 -0
- package/dist/elements/public/TemplateConfigForm/index.js +11 -0
- package/dist/elements/public/TemplateConfigForm/index.js.map +1 -0
- package/dist/elements/public/TemplateConfigForm/types.d.ts +116 -0
- package/dist/elements/public/TemplateConfigForm/types.js +2 -0
- package/dist/elements/public/TemplateConfigForm/types.js.map +1 -0
- package/dist/elements/public/index.d.ts +1 -0
- package/dist/elements/public/index.defined.d.ts +1 -0
- package/dist/elements/public/index.defined.js +1 -0
- package/dist/elements/public/index.defined.js.map +1 -1
- package/dist/elements/public/index.js +1 -0
- package/dist/elements/public/index.js.map +1 -1
- package/dist/mixins/themeable.js +51 -0
- package/dist/mixins/themeable.js.map +1 -1
- package/package.json +1 -1
- package/dist/cdn/shared-04b77f79.js +0 -369
- package/dist/cdn/shared-1108653b.js +0 -577
- package/dist/cdn/shared-4ee97558.js +0 -1
- package/dist/cdn/shared-a0c2bbe0.js +0 -1
- package/dist/cdn/shared-bec929ac.js +0 -1
|
@@ -1,369 +0,0 @@
|
|
|
1
|
-
import{D as t,a as e,i as o,e as n,h as r,G as s,P as a,c as l}from"./shared-ff79f3f9.js";class i extends HTMLElement{static get version(){return"1.6.1"}}customElements.define("vaadin-lumo-styles",i);const c=document.createElement("template");c.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(c.content);const m=document.createElement("template");m.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(m.content);const u=document.createElement("template");u.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(u.content);const d=document.createElement("template");d.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(d.content);const h=document.createElement("template");h.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(h.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 p=!1;window.addEventListener("keydown",(()=>{p=!0}),{capture:!0}),window.addEventListener("mousedown",(()=>{p=!1}),{capture:!0});const b=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&&p?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()}},v=t=>class extends t{static get properties(){return{theme:{type:String,readOnly:!0}}}attributeChangedCallback(t,e,o){super.attributeChangedCallback(t,e,o),"theme"===t&&this._setTheme(o)}},f=e=>class extends(v(e)){static finalize(){super.finalize();const t=this.prototype._template,e=this.template&&this.template.parentElement&&this.template.parentElement.id===this.is,o=Object.getPrototypeOf(this.prototype)._template;o&&!e&&Array.from(o.content.querySelectorAll("style[include]")).forEach((e=>{this._includeStyle(e.getAttribute("include"),t)})),this._includeMatchingThemes(t)}static _includeMatchingThemes(e){const o=t.prototype.modules;let n=!1;const r=this.is+"-default-theme";Object.keys(o).sort(((t,e)=>{const o=0===t.indexOf("vaadin-"),n=0===e.indexOf("vaadin-"),r=["lumo-","material-"],s=r.filter((e=>0===t.indexOf(e))).length>0,a=r.filter((t=>0===e.indexOf(t))).length>0;return o!==n?o?-1:1:s!==a?s?-1:1:0})).forEach((t=>{if(t!==r){const r=o[t].getAttribute("theme-for");r&&r.split(" ").forEach((o=>{new RegExp("^"+o.split("*").join(".*")+"$").test(this.is)&&(n=!0,this._includeStyle(t,e))}))}})),!n&&o[r]&&this._includeStyle(r,e)}static _includeStyle(t,e){if(e&&!e.content.querySelector(`style[include="${t}"]`)){const o=document.createElement("style");o.setAttribute("include",t),e.content.appendChild(o)}}}
|
|
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 y{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,o){const{scrollLeft:n}=o;if("rtl"!==e||!t)return n;switch(t){case"negative":return o.scrollWidth-o.clientWidth+n;case"reverse":return o.scrollWidth-o.clientWidth-n}return n}static setNormalizedScrollLeft(t,e,o,n){if("rtl"===e&&t)switch(t){case"negative":o.scrollLeft=o.clientWidth-o.scrollWidth+n;break;case"reverse":o.scrollLeft=o.scrollWidth-o.clientWidth-n;break;default:o.scrollLeft=n}else o.scrollLeft=n}}const x=[];let g;new MutationObserver((function(){const t=z();x.forEach((e=>{w(e,t)}))})).observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]});const w=function(t,e){e?t.setAttribute("dir",e):t.removeAttribute("dir")},z=function(){return document.documentElement.getAttribute("dir")},k=t=>class extends t{static get properties(){return{dir:{type:String,readOnly:!0}}}static finalize(){super.finalize(),g||(g=y.detectScrollType())}connectedCallback(){super.connectedCallback(),this.hasAttribute("dir")||(this.__subscribe(),w(this,z()))}attributeChangedCallback(t,e,o){if(super.attributeChangedCallback(t,e,o),"dir"!==t)return;const n=o===z()&&-1===x.indexOf(this),r=!o&&e&&-1===x.indexOf(this),s=o!==z()&&e===z();n||r?(this.__subscribe(),w(this,z())):s&&this.__subscribe(!1)}disconnectedCallback(){super.disconnectedCallback(),this.__subscribe(!1),this.removeAttribute("dir")}__subscribe(t=!0){t?-1===x.indexOf(this)&&x.push(this):x.indexOf(this)>-1&&x.splice(x.indexOf(this),1)}__getNormalizedScrollLeft(t){return y.getNormalizedScrollLeft(g,this.getAttribute("dir")||"ltr",t)}__setNormalizedScrollLeft(t,e){return y.setNormalizedScrollLeft(g,this.getAttribute("dir")||"ltr",t,e)}},_=/\/\*\*\s+vaadin-dev-mode:start([\s\S]*)vaadin-dev-mode:end\s+\*\*\//i,E=window.Vaadin&&window.Vaadin.Flow&&window.Vaadin.Flow.clients;function C(t,e){if("function"!=typeof t)return;const o=_.exec(t.toString());if(o)try{t=new Function(o[1])}catch(t){console.log("vaadin-development-mode-detector: uncommentAndRun() failed",t)}return t(e)}window.Vaadin=window.Vaadin||{};const S=function(t,e){if(window.Vaadin.developmentMode)return C(t,e)};function A(){}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&&(E?!(E&&Object.keys(E).map((t=>E[t])).filter((t=>t.productionMode)).length>0):!C((function(){return!0})))}catch(t){return!1}}());const F=function(){return S(A)};let L;window.Vaadin||(window.Vaadin={}),window.Vaadin.registrations=window.Vaadin.registrations||[],window.Vaadin.developmentModeCallback=window.Vaadin.developmentModeCallback||{},window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]=function(){F&&F()};const T=new Set,M=t=>class extends(k(t)){static finalize(){super.finalize();const{is:t}=this;t&&!T.has(t)&&(window.Vaadin.registrations.push(this),T.add(t),window.Vaadin.developmentModeCallback&&(L=e.debounce(L,o,(()=>{window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]()})),n(L)))}constructor(){super(),null===document.doctype&&console.warn('Vaadin components require the "standards mode" declaration. Please add <!DOCTYPE html> to the HTML document.')}},O=r`<dom-module id="lumo-button" theme-for="vaadin-button">
|
|
13
|
-
<template>
|
|
14
|
-
<style>
|
|
15
|
-
:host {
|
|
16
|
-
/* Sizing */
|
|
17
|
-
--lumo-button-size: var(--lumo-size-m);
|
|
18
|
-
min-width: calc(var(--lumo-button-size) * 2);
|
|
19
|
-
height: var(--lumo-button-size);
|
|
20
|
-
padding: 0 calc(var(--lumo-button-size) / 3 + var(--lumo-border-radius) / 2);
|
|
21
|
-
margin: var(--lumo-space-xs) 0;
|
|
22
|
-
box-sizing: border-box;
|
|
23
|
-
/* Style */
|
|
24
|
-
font-family: var(--lumo-font-family);
|
|
25
|
-
font-size: var(--lumo-font-size-m);
|
|
26
|
-
font-weight: 500;
|
|
27
|
-
color: var(--_lumo-button-color, var(--lumo-primary-text-color));
|
|
28
|
-
background-color: var(--_lumo-button-background-color, var(--lumo-contrast-5pct));
|
|
29
|
-
border-radius: var(--lumo-border-radius);
|
|
30
|
-
cursor: default;
|
|
31
|
-
-webkit-tap-highlight-color: transparent;
|
|
32
|
-
-webkit-font-smoothing: antialiased;
|
|
33
|
-
-moz-osx-font-smoothing: grayscale;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/* Set only for the internal parts so we don’t affect the host vertical alignment */
|
|
37
|
-
[part="label"],
|
|
38
|
-
[part="prefix"],
|
|
39
|
-
[part="suffix"] {
|
|
40
|
-
line-height: var(--lumo-line-height-xs);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
[part="label"] {
|
|
44
|
-
padding: calc(var(--lumo-button-size) / 6) 0;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
:host([theme~="small"]) {
|
|
48
|
-
font-size: var(--lumo-font-size-s);
|
|
49
|
-
--lumo-button-size: var(--lumo-size-s);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
:host([theme~="large"]) {
|
|
53
|
-
font-size: var(--lumo-font-size-l);
|
|
54
|
-
--lumo-button-size: var(--lumo-size-l);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
/* This needs to be the last selector for it to take priority */
|
|
58
|
-
:host([disabled][disabled]) {
|
|
59
|
-
pointer-events: none;
|
|
60
|
-
color: var(--lumo-disabled-text-color);
|
|
61
|
-
background-color: var(--lumo-contrast-5pct);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
/* For interaction states */
|
|
65
|
-
:host::before,
|
|
66
|
-
:host::after {
|
|
67
|
-
content: "";
|
|
68
|
-
/* We rely on the host always being relative */
|
|
69
|
-
position: absolute;
|
|
70
|
-
z-index: 1;
|
|
71
|
-
top: 0;
|
|
72
|
-
right: 0;
|
|
73
|
-
bottom: 0;
|
|
74
|
-
left: 0;
|
|
75
|
-
background-color: currentColor;
|
|
76
|
-
border-radius: inherit;
|
|
77
|
-
opacity: 0;
|
|
78
|
-
transition: opacity 0.2s;
|
|
79
|
-
pointer-events: none;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
/* Hover */
|
|
83
|
-
|
|
84
|
-
:host(:hover)::before {
|
|
85
|
-
opacity: 0.05;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
/* Disable hover for touch devices */
|
|
89
|
-
@media (pointer: coarse) {
|
|
90
|
-
:host(:not([active]):hover)::before {
|
|
91
|
-
opacity: 0;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
/* Active */
|
|
96
|
-
|
|
97
|
-
:host::after {
|
|
98
|
-
transition: opacity 1.4s, transform 0.1s;
|
|
99
|
-
filter: blur(8px);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
:host([active])::before {
|
|
103
|
-
opacity: 0.1;
|
|
104
|
-
transition-duration: 0s;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
:host([active])::after {
|
|
108
|
-
opacity: 0.1;
|
|
109
|
-
transition-duration: 0s, 0s;
|
|
110
|
-
transform: scale(0);
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
/* Keyboard focus */
|
|
114
|
-
|
|
115
|
-
:host([focus-ring]) {
|
|
116
|
-
box-shadow: 0 0 0 2px var(--lumo-primary-color-50pct);
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
/* Types (primary, tertiary, tertiary-inline */
|
|
120
|
-
|
|
121
|
-
:host([theme~="tertiary"]),
|
|
122
|
-
:host([theme~="tertiary-inline"]) {
|
|
123
|
-
background-color: transparent !important;
|
|
124
|
-
transition: opacity 0.2s;
|
|
125
|
-
min-width: 0;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
:host([theme~="tertiary"])::before,
|
|
129
|
-
:host([theme~="tertiary-inline"])::before {
|
|
130
|
-
display: none;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
:host([theme~="tertiary"]) {
|
|
134
|
-
padding: 0 calc(var(--lumo-button-size) / 6);
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
@media (hover: hover) {
|
|
138
|
-
:host([theme*="tertiary"]:not([active]):hover) {
|
|
139
|
-
opacity: 0.8;
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
:host([theme~="tertiary"][active]),
|
|
144
|
-
:host([theme~="tertiary-inline"][active]) {
|
|
145
|
-
opacity: 0.5;
|
|
146
|
-
transition-duration: 0s;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
:host([theme~="tertiary-inline"]) {
|
|
150
|
-
margin: 0;
|
|
151
|
-
height: auto;
|
|
152
|
-
padding: 0;
|
|
153
|
-
line-height: inherit;
|
|
154
|
-
font-size: inherit;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
:host([theme~="tertiary-inline"]) [part="label"] {
|
|
158
|
-
padding: 0;
|
|
159
|
-
overflow: visible;
|
|
160
|
-
line-height: inherit;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
:host([theme~="primary"]) {
|
|
164
|
-
background-color: var(--_lumo-button-primary-background-color, var(--lumo-primary-color));
|
|
165
|
-
color: var(--_lumo-button-primary-color, var(--lumo-primary-contrast-color));
|
|
166
|
-
font-weight: 600;
|
|
167
|
-
min-width: calc(var(--lumo-button-size) * 2.5);
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
:host([theme~="primary"][disabled]) {
|
|
171
|
-
background-color: var(--lumo-primary-color-50pct);
|
|
172
|
-
color: var(--lumo-primary-contrast-color);
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
:host([theme~="primary"]:hover)::before {
|
|
176
|
-
opacity: 0.1;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
:host([theme~="primary"][active])::before {
|
|
180
|
-
background-color: var(--lumo-shade-20pct);
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
@media (pointer: coarse) {
|
|
184
|
-
:host([theme~="primary"][active])::before {
|
|
185
|
-
background-color: var(--lumo-shade-60pct);
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
:host([theme~="primary"]:not([active]):hover)::before {
|
|
189
|
-
opacity: 0;
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
:host([theme~="primary"][active])::after {
|
|
194
|
-
opacity: 0.2;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
/* Colors (success, error, contrast) */
|
|
198
|
-
|
|
199
|
-
:host([theme~="success"]) {
|
|
200
|
-
color: var(--lumo-success-text-color);
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
:host([theme~="success"][theme~="primary"]) {
|
|
204
|
-
background-color: var(--lumo-success-color);
|
|
205
|
-
color: var(--lumo-success-contrast-color);
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
:host([theme~="success"][theme~="primary"][disabled]) {
|
|
209
|
-
background-color: var(--lumo-success-color-50pct);
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
:host([theme~="error"]) {
|
|
213
|
-
color: var(--lumo-error-text-color);
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
:host([theme~="error"][theme~="primary"]) {
|
|
217
|
-
background-color: var(--lumo-error-color);
|
|
218
|
-
color: var(--lumo-error-contrast-color);
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
:host([theme~="error"][theme~="primary"][disabled]) {
|
|
222
|
-
background-color: var(--lumo-error-color-50pct);
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
:host([theme~="contrast"]) {
|
|
226
|
-
color: var(--lumo-contrast);
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
:host([theme~="contrast"][theme~="primary"]) {
|
|
230
|
-
background-color: var(--lumo-contrast);
|
|
231
|
-
color: var(--lumo-base-color);
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
:host([theme~="contrast"][theme~="primary"][disabled]) {
|
|
235
|
-
background-color: var(--lumo-contrast-50pct);
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
/* Icons */
|
|
239
|
-
|
|
240
|
-
[part] ::slotted(iron-icon) {
|
|
241
|
-
display: inline-block;
|
|
242
|
-
width: var(--lumo-icon-size-m);
|
|
243
|
-
height: var(--lumo-icon-size-m);
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
/* Vaadin icons are based on a 16x16 grid (unlike Lumo and Material icons with 24x24), so they look too big by default */
|
|
247
|
-
[part] ::slotted(iron-icon[icon^="vaadin:"]) {
|
|
248
|
-
padding: 0.25em;
|
|
249
|
-
box-sizing: border-box !important;
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
[part="prefix"] {
|
|
253
|
-
margin-left: -0.25em;
|
|
254
|
-
margin-right: 0.25em;
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
[part="suffix"] {
|
|
258
|
-
margin-left: 0.25em;
|
|
259
|
-
margin-right: -0.25em;
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
/* Icon-only */
|
|
263
|
-
|
|
264
|
-
:host([theme~="icon"]:not([theme~="tertiary-inline"])) {
|
|
265
|
-
min-width: var(--lumo-button-size);
|
|
266
|
-
padding-left: calc(var(--lumo-button-size) / 4);
|
|
267
|
-
padding-right: calc(var(--lumo-button-size) / 4);
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
:host([theme~="icon"]) [part="prefix"],
|
|
271
|
-
:host([theme~="icon"]) [part="suffix"] {
|
|
272
|
-
margin-left: 0;
|
|
273
|
-
margin-right: 0;
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
/* RTL specific styles */
|
|
277
|
-
|
|
278
|
-
:host([dir="rtl"]) [part="prefix"] {
|
|
279
|
-
margin-left: 0.25em;
|
|
280
|
-
margin-right: -0.25em;
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
:host([dir="rtl"]) [part="suffix"] {
|
|
284
|
-
margin-left: -0.25em;
|
|
285
|
-
margin-right: 0.25em;
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
:host([dir="rtl"][theme~="icon"]) [part="prefix"],
|
|
289
|
-
:host([dir="rtl"][theme~="icon"]) [part="suffix"] {
|
|
290
|
-
margin-left: 0;
|
|
291
|
-
margin-right: 0;
|
|
292
|
-
}
|
|
293
|
-
</style>
|
|
294
|
-
</template>
|
|
295
|
-
</dom-module>`;document.head.appendChild(O.content);
|
|
296
|
-
/**
|
|
297
|
-
@license
|
|
298
|
-
Copyright (c) 2017 Vaadin Ltd.
|
|
299
|
-
This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
300
|
-
*/
|
|
301
|
-
class V extends(M(b(f(s(a))))){static get template(){return r`
|
|
302
|
-
<style>
|
|
303
|
-
:host {
|
|
304
|
-
display: inline-block;
|
|
305
|
-
position: relative;
|
|
306
|
-
outline: none;
|
|
307
|
-
white-space: nowrap;
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
:host([hidden]) {
|
|
311
|
-
display: none !important;
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
/* Ensure the button is always aligned on the baseline */
|
|
315
|
-
.vaadin-button-container::before {
|
|
316
|
-
content: "\\2003";
|
|
317
|
-
display: inline-block;
|
|
318
|
-
width: 0;
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
.vaadin-button-container {
|
|
322
|
-
display: inline-flex;
|
|
323
|
-
align-items: center;
|
|
324
|
-
justify-content: center;
|
|
325
|
-
text-align: center;
|
|
326
|
-
width: 100%;
|
|
327
|
-
height: 100%;
|
|
328
|
-
min-height: inherit;
|
|
329
|
-
text-shadow: inherit;
|
|
330
|
-
-webkit-user-select: none;
|
|
331
|
-
-moz-user-select: none;
|
|
332
|
-
user-select: none;
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
[part="prefix"],
|
|
336
|
-
[part="suffix"] {
|
|
337
|
-
flex: none;
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
[part="label"] {
|
|
341
|
-
white-space: nowrap;
|
|
342
|
-
overflow: hidden;
|
|
343
|
-
text-overflow: ellipsis;
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
#button {
|
|
347
|
-
position: absolute;
|
|
348
|
-
top: 0;
|
|
349
|
-
left: 0;
|
|
350
|
-
right: 0;
|
|
351
|
-
width: 100%;
|
|
352
|
-
height: 100%;
|
|
353
|
-
opacity: 0;
|
|
354
|
-
cursor: inherit;
|
|
355
|
-
}
|
|
356
|
-
</style>
|
|
357
|
-
<div class="vaadin-button-container">
|
|
358
|
-
<div part="prefix">
|
|
359
|
-
<slot name="prefix"></slot>
|
|
360
|
-
</div>
|
|
361
|
-
<div part="label">
|
|
362
|
-
<slot></slot>
|
|
363
|
-
</div>
|
|
364
|
-
<div part="suffix">
|
|
365
|
-
<slot name="suffix"></slot>
|
|
366
|
-
</div>
|
|
367
|
-
</div>
|
|
368
|
-
<button id="button" type="button"></button>
|
|
369
|
-
`}static get is(){return"vaadin-button"}static get version(){return"2.4.0"}ready(){super.ready(),this.setAttribute("role","button"),this.$.button.setAttribute("role","presentation"),this._addActiveListeners(),window.ShadyDOM&&window.ShadyDOM.flush()}disconnectedCallback(){super.disconnectedCallback(),this.hasAttribute("active")&&this.removeAttribute("active")}_addActiveListeners(){l(this,"down",(()=>!this.disabled&&this.setAttribute("active",""))),l(this,"up",(()=>this.removeAttribute("active"))),this.addEventListener("keydown",(t=>!this.disabled&&[13,32].indexOf(t.keyCode)>=0&&this.setAttribute("active",""))),this.addEventListener("keyup",(()=>this.removeAttribute("active"))),this.addEventListener("blur",(()=>this.removeAttribute("active")))}get focusElement(){return this.$.button}}customElements.define(V.is,V);export{V as B,b as C,k as D,M as E,f as T,y as a};
|