@foxy.io/elements 1.27.0-beta.1 → 1.27.0-beta.2
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-admin-subscription-card.js +1 -1
- package/dist/cdn/foxy-api-browser.js +1 -1
- package/dist/cdn/foxy-applied-coupon-code-card.js +1 -1
- package/dist/cdn/foxy-applied-coupon-code-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-billing-address-card.js +1 -1
- package/dist/cdn/foxy-cancellation-form.js +1 -1
- package/dist/cdn/foxy-cart-card.js +1 -1
- package/dist/cdn/foxy-cart-form.js +1 -1
- package/dist/cdn/foxy-client-card.js +1 -1
- package/dist/cdn/foxy-client-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-copy-to-clipboard.js +1 -1
- package/dist/cdn/foxy-coupon-card.js +1 -1
- package/dist/cdn/foxy-coupon-code-form.js +1 -1
- package/dist/cdn/foxy-coupon-codes-form.js +1 -1
- package/dist/cdn/foxy-coupon-detail-card.js +1 -1
- package/dist/cdn/foxy-coupon-form.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-card.js +1 -1
- package/dist/cdn/foxy-customer-form.js +1 -1
- package/dist/cdn/foxy-customer-portal-settings.js +1 -1
- package/dist/cdn/foxy-customer-portal.js +2 -2
- package/dist/cdn/foxy-customer.js +1 -1
- package/dist/cdn/foxy-customers-table.js +1 -1
- package/dist/cdn/foxy-discount-builder.js +1 -1
- package/dist/cdn/foxy-discount-card.js +1 -1
- package/dist/cdn/foxy-discount-detail-card.js +1 -1
- package/dist/cdn/foxy-donation.js +1 -1
- package/dist/cdn/foxy-downloadable-card.js +1 -1
- package/dist/cdn/foxy-downloadable-form.js +1 -1
- package/dist/cdn/foxy-email-template-card.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-filter-attribute-card.js +1 -1
- package/dist/cdn/foxy-filter-attribute-form.js +1 -1
- package/dist/cdn/foxy-form-dialog.js +1 -1
- package/dist/cdn/foxy-generate-codes-form.js +1 -1
- package/dist/cdn/foxy-gift-card-card.js +1 -1
- package/dist/cdn/foxy-gift-card-code-form.js +1 -1
- package/dist/cdn/foxy-gift-card-code-log-card.js +1 -1
- package/dist/cdn/foxy-gift-card-codes-form.js +1 -1
- package/dist/cdn/foxy-gift-card-form.js +1 -1
- package/dist/cdn/foxy-i18n-editor.js +2 -2
- package/dist/cdn/foxy-i18n.js +1 -1
- package/dist/cdn/foxy-integration-card.js +1 -1
- package/dist/cdn/foxy-integration-form.js +1 -1
- package/dist/cdn/foxy-item-card.js +1 -1
- package/dist/cdn/foxy-item-category-card.js +1 -1
- package/dist/cdn/foxy-item-category-form.js +1 -1
- package/dist/cdn/foxy-item-form.js +4 -4
- package/dist/cdn/foxy-item-option-card.js +1 -1
- package/dist/cdn/foxy-item-option-form.js +1 -1
- package/dist/cdn/foxy-items-form.js +1 -1
- package/dist/cdn/foxy-native-integration-card.js +1 -1
- package/dist/cdn/foxy-native-integration-form.js +1 -1
- package/dist/cdn/foxy-pagination.js +1 -1
- package/dist/cdn/foxy-passkey-card.js +1 -1
- package/dist/cdn/foxy-passkey-form.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-payments-api-fraud-protection-card.js +1 -1
- package/dist/cdn/foxy-payments-api-fraud-protection-form.js +1 -1
- package/dist/cdn/foxy-payments-api-payment-method-card.js +1 -1
- package/dist/cdn/foxy-payments-api-payment-method-form.js +1 -1
- package/dist/cdn/foxy-payments-api-payment-preset-card.js +1 -1
- package/dist/cdn/foxy-payments-api-payment-preset-form.js +1 -1
- package/dist/cdn/foxy-query-builder.js +1 -1
- package/dist/cdn/foxy-report-form.js +10 -10
- package/dist/cdn/foxy-reports-table.js +1 -1
- package/dist/cdn/foxy-shipment-card.js +1 -1
- package/dist/cdn/foxy-shipping-method-card.js +1 -1
- package/dist/cdn/foxy-sign-in-form.js +1 -1
- package/dist/cdn/foxy-spinner.js +2 -2
- package/dist/cdn/foxy-store-card.js +1 -1
- package/dist/cdn/foxy-store-form.js +1 -1
- package/dist/cdn/foxy-store-shipping-method-form.js +1 -1
- package/dist/cdn/foxy-subscription-card.js +1 -1
- package/dist/cdn/foxy-subscription-form.js +1 -5
- package/dist/cdn/foxy-subscription-settings-form.js +1 -1
- 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 +1 -1
- package/dist/cdn/foxy-template-form.js +1 -1
- package/dist/cdn/foxy-template-set-card.js +1 -1
- package/dist/cdn/foxy-template-set-form.js +1 -1
- package/dist/cdn/foxy-transaction-card.js +1 -1
- package/dist/cdn/foxy-transaction.js +1 -1
- package/dist/cdn/foxy-transactions-table.js +7 -7
- package/dist/cdn/foxy-user-card.js +1 -1
- package/dist/cdn/foxy-user-form.js +1 -1
- package/dist/cdn/foxy-users-table.js +1 -1
- package/dist/cdn/foxy-webhook-card.js +1 -1
- package/dist/cdn/foxy-webhook-form.js +1 -1
- package/dist/cdn/foxy-webhook-log-card.js +1 -1
- package/dist/cdn/foxy-webhook-status-card.js +1 -1
- package/dist/cdn/{shared-d9f44257.js → shared-030f561a.js} +1 -1
- package/dist/cdn/{shared-dbfccb3e.js → shared-0cbb19f4.js} +1 -1
- package/dist/cdn/{shared-09ac8087.js → shared-0cf90158.js} +1 -1
- package/dist/cdn/{shared-8a92f939.js → shared-1024766f.js} +1 -1
- package/dist/cdn/{shared-8f706991.js → shared-12390d6f.js} +1 -1
- package/dist/cdn/{shared-380c0453.js → shared-12ad8924.js} +2 -2
- package/dist/cdn/shared-150f5214.js +1 -0
- package/dist/cdn/shared-2062c274.js +1 -0
- package/dist/cdn/{shared-e460ee3d.js → shared-2376abfc.js} +7 -7
- package/dist/cdn/{shared-648f62a1.js → shared-26f4b6bf.js} +1 -1
- package/dist/cdn/{shared-1bb9c21a.js → shared-2920b595.js} +1 -1
- package/dist/cdn/{shared-13afcc16.js → shared-331a223c.js} +1 -1
- package/dist/cdn/{shared-c0cbb20a.js → shared-33d8cbfb.js} +1 -1
- package/dist/cdn/{shared-062f3122.js → shared-352c79a6.js} +1 -1
- package/dist/cdn/{shared-adecdd5f.js → shared-37e1a834.js} +1 -1
- package/dist/cdn/shared-3f19b914.js +20 -0
- package/dist/cdn/{shared-30f373f2.js → shared-405a290e.js} +1 -1
- package/dist/cdn/shared-40bece2b.js +1 -0
- package/dist/cdn/{shared-24ceebec.js → shared-4482e7b9.js} +1 -1
- package/dist/cdn/{shared-02883252.js → shared-44bb85d8.js} +1 -1
- package/dist/cdn/{shared-d3e8c449.js → shared-497ebb8c.js} +1 -1
- package/dist/cdn/{shared-a5ec3472.js → shared-4cec4de0.js} +1 -1
- package/dist/cdn/{shared-6424d196.js → shared-510a9e1b.js} +1 -1
- package/dist/cdn/{shared-6310fdde.js → shared-5ba87b6d.js} +1 -1
- package/dist/cdn/{shared-8c937a7c.js → shared-5df32007.js} +1 -1
- package/dist/cdn/{shared-0fdfc2c2.js → shared-5dfec3b7.js} +1 -1
- package/dist/cdn/shared-651c44fa.js +6 -0
- package/dist/cdn/{shared-5ba412f7.js → shared-655e7c5f.js} +1 -1
- package/dist/cdn/shared-6d41c9a9.js +1 -0
- package/dist/cdn/{shared-e1cade57.js → shared-6e508e5b.js} +5 -5
- package/dist/cdn/{shared-ff35e803.js → shared-6ed07856.js} +1 -1
- package/dist/cdn/{shared-b17fcc8f.js → shared-7039733e.js} +1 -1
- package/dist/cdn/{shared-c692070c.js → shared-74adbf9e.js} +1 -1
- package/dist/cdn/{shared-0dcc1ea4.js → shared-7ea4cb27.js} +1 -1
- package/dist/cdn/{shared-2d7cab3c.js → shared-83fc5dca.js} +1 -1
- package/dist/cdn/{shared-4345e9fd.js → shared-882e7191.js} +1 -1
- package/dist/cdn/shared-8ab2ba91.js +425 -0
- package/dist/cdn/{shared-36a09fe6.js → shared-8b80db13.js} +1 -1
- package/dist/cdn/{shared-b114fee0.js → shared-966feb65.js} +1 -1
- package/dist/cdn/{shared-1af365fe.js → shared-97d63da6.js} +1 -1
- package/dist/cdn/shared-99f0fee6.js +1 -0
- package/dist/cdn/shared-9adc47da.js +113 -0
- package/dist/cdn/{shared-708f960f.js → shared-9fd64015.js} +1 -1
- package/dist/cdn/{shared-5ecc7f74.js → shared-a19e1dff.js} +1 -1
- package/dist/cdn/{shared-921d4691.js → shared-a5ecd56e.js} +1 -1
- package/dist/cdn/{shared-b56daa27.js → shared-a9f76cae.js} +1 -1
- package/dist/cdn/{shared-e260fc5a.js → shared-ae459232.js} +4 -4
- package/dist/cdn/{shared-3895091e.js → shared-bbc0cdd6.js} +1 -1
- package/dist/cdn/{shared-fe165f2e.js → shared-bf695fe7.js} +1 -1
- package/dist/cdn/{shared-fba9b7b3.js → shared-cd8c3429.js} +1 -1
- package/dist/cdn/{shared-67696f2f.js → shared-cfed658c.js} +1 -1
- package/dist/cdn/shared-d0374d0c.js +1 -0
- package/dist/cdn/{shared-5f6d7cc6.js → shared-d244dd07.js} +1 -1
- package/dist/cdn/{shared-fcddc6cc.js → shared-d9f65ee0.js} +4 -4
- package/dist/cdn/{shared-d61d1d8d.js → shared-db98729a.js} +1 -1
- package/dist/cdn/{shared-019ad470.js → shared-e40937c5.js} +1 -1
- package/dist/cdn/shared-f1afbd7b.js +1 -0
- package/dist/cdn/{shared-d96312ed.js → shared-f53d078e.js} +1 -1
- package/dist/cdn/{shared-a3ec1362.js → shared-f588b5c2.js} +1 -1
- package/dist/cdn/{shared-8addaf74.js → shared-f5d4dda0.js} +1 -1
- package/dist/cdn/{shared-d070d509.js → shared-f94fa366.js} +1 -1
- package/dist/cdn/{shared-8cc1f513.js → shared-fd0a4026.js} +1 -1
- package/dist/cdn/translations/coupon-code-form/en.json +68 -12
- package/dist/cdn/translations/coupon-form/en.json +68 -11
- package/dist/cdn/translations/custom-field-form/en.json +32 -13
- package/dist/cdn/translations/customer/en.json +1 -12
- package/dist/cdn/translations/gift-card-code-form/en.json +51 -21
- package/dist/cdn/translations/gift-card-form/en.json +56 -22
- package/dist/cdn/translations/subscription-form/en.json +1 -12
- package/dist/cdn/translations/transaction/en.json +32 -13
- package/dist/cdn/translations/user-form/en.json +54 -20
- package/dist/cdn/translations/users-table/en.json +54 -20
- package/dist/elements/public/CouponCodeForm/CouponCodeForm.d.ts +19 -21
- package/dist/elements/public/CouponCodeForm/CouponCodeForm.js +47 -178
- package/dist/elements/public/CouponCodeForm/CouponCodeForm.js.map +1 -1
- package/dist/elements/public/CouponCodeForm/index.d.ts +5 -6
- package/dist/elements/public/CouponCodeForm/index.js +5 -6
- package/dist/elements/public/CouponCodeForm/index.js.map +1 -1
- package/dist/elements/public/CouponCodeForm/types.d.ts +11 -4
- package/dist/elements/public/CouponCodeForm/types.js.map +1 -1
- package/dist/elements/public/CouponForm/CouponForm.d.ts +2 -1
- package/dist/elements/public/CouponForm/CouponForm.js +4 -0
- package/dist/elements/public/CouponForm/CouponForm.js.map +1 -1
- package/dist/elements/public/CouponForm/types.d.ts +3 -0
- package/dist/elements/public/CouponForm/types.js.map +1 -1
- package/dist/elements/public/CustomFieldForm/CustomFieldForm.d.ts +27 -36
- package/dist/elements/public/CustomFieldForm/CustomFieldForm.js +40 -221
- package/dist/elements/public/CustomFieldForm/CustomFieldForm.js.map +1 -1
- package/dist/elements/public/CustomFieldForm/index.d.ts +3 -7
- package/dist/elements/public/CustomFieldForm/index.js +3 -7
- package/dist/elements/public/CustomFieldForm/index.js.map +1 -1
- package/dist/elements/public/CustomFieldForm/types.d.ts +4 -7
- package/dist/elements/public/CustomFieldForm/types.js.map +1 -1
- package/dist/elements/public/GiftCardCodeForm/GiftCardCodeForm.d.ts +12 -29
- package/dist/elements/public/GiftCardCodeForm/GiftCardCodeForm.js +27 -276
- package/dist/elements/public/GiftCardCodeForm/GiftCardCodeForm.js.map +1 -1
- package/dist/elements/public/GiftCardCodeForm/index.d.ts +5 -9
- package/dist/elements/public/GiftCardCodeForm/index.js +5 -9
- package/dist/elements/public/GiftCardCodeForm/index.js.map +1 -1
- package/dist/elements/public/GiftCardCodeForm/internal/InternalGiftCardCodeFormItemControl/InternalGiftCardCodeFormItemControl.js +17 -6
- package/dist/elements/public/GiftCardCodeForm/internal/InternalGiftCardCodeFormItemControl/InternalGiftCardCodeFormItemControl.js.map +1 -1
- package/dist/elements/public/GiftCardCodeForm/internal/InternalGiftCardCodeFormItemControl/index.d.ts +0 -1
- package/dist/elements/public/GiftCardCodeForm/internal/InternalGiftCardCodeFormItemControl/index.js +0 -1
- package/dist/elements/public/GiftCardCodeForm/internal/InternalGiftCardCodeFormItemControl/index.js.map +1 -1
- package/dist/elements/public/GiftCardCodeForm/types.d.ts +6 -4
- package/dist/elements/public/GiftCardCodeForm/types.js.map +1 -1
- package/dist/elements/public/SubscriptionForm/SubscriptionForm.d.ts +3 -0
- package/dist/elements/public/SubscriptionForm/SubscriptionForm.js +88 -78
- package/dist/elements/public/SubscriptionForm/SubscriptionForm.js.map +1 -1
- package/dist/elements/public/SubscriptionForm/index.d.ts +0 -2
- package/dist/elements/public/SubscriptionForm/index.js +0 -8
- package/dist/elements/public/SubscriptionForm/index.js.map +1 -1
- package/dist/elements/public/UserForm/UserForm.d.ts +15 -12
- package/dist/elements/public/UserForm/UserForm.js +64 -172
- package/dist/elements/public/UserForm/UserForm.js.map +1 -1
- package/dist/elements/public/UserForm/index.d.ts +3 -5
- package/dist/elements/public/UserForm/index.js +3 -5
- package/dist/elements/public/UserForm/index.js.map +1 -1
- package/dist/elements/public/UserForm/types.d.ts +3 -1
- package/dist/elements/public/UserForm/types.js.map +1 -1
- package/dist/elements/public/UsersTable/UsersTable.js +1 -1
- package/dist/elements/public/UsersTable/UsersTable.js.map +1 -1
- package/dist/elements/public/UsersTable/roles.js.map +1 -0
- package/dist/mixins/themeable.js +38 -8
- package/dist/mixins/themeable.js.map +1 -1
- package/package.json +1 -1
- package/dist/cdn/shared-20142d51.js +0 -1
- package/dist/cdn/shared-74086729.js +0 -1
- package/dist/cdn/shared-8b7ef8ec.js +0 -1
- package/dist/cdn/shared-9f41236b.js +0 -1
- package/dist/cdn/shared-c0242421.js +0 -531
- package/dist/cdn/shared-ce9795cd.js +0 -25
- package/dist/cdn/shared-d1ee06bb.js +0 -1
- package/dist/cdn/shared-ded1248f.js +0 -1
- package/dist/cdn/shared-f655b20d.js +0 -1
- package/dist/elements/public/UserForm/roles.js.map +0 -1
- /package/dist/elements/public/{UserForm → UsersTable}/roles.d.ts +0 -0
- /package/dist/elements/public/{UserForm → UsersTable}/roles.js +0 -0
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import{h as e,P as t}from"./shared-bf695fe7.js";import{F as n,t as o,P as i}from"./shared-e40937c5.js";import{a as s}from"./shared-3f19b914.js";import{T as a,D as r}from"./shared-cfed658c.js";const d=document.createElement("template");d.innerHTML='<dom-module id="lumo-overlay">\n <template>\n <style>\n :host {\n top: var(--lumo-space-m);\n right: var(--lumo-space-m);\n bottom: var(--lumo-space-m);\n left: var(--lumo-space-m);\n /* Workaround for Edge issue (only on Surface), where an overflowing vaadin-list-box inside vaadin-select-overlay makes the overlay transparent */\n /* stylelint-disable-next-line */\n outline: 0px solid transparent;\n }\n\n [part="overlay"] {\n background-color: var(--lumo-base-color);\n background-image: linear-gradient(var(--lumo-tint-5pct), var(--lumo-tint-5pct));\n border-radius: var(--lumo-border-radius-m);\n box-shadow: 0 0 0 1px var(--lumo-shade-5pct), var(--lumo-box-shadow-m);\n color: var(--lumo-body-text-color);\n font-family: var(--lumo-font-family);\n font-size: var(--lumo-font-size-m);\n font-weight: 400;\n line-height: var(--lumo-line-height-m);\n letter-spacing: 0;\n text-transform: none;\n -webkit-text-size-adjust: 100%;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n\n [part="content"] {\n padding: var(--lumo-space-xs);\n }\n\n [part="backdrop"] {\n background-color: var(--lumo-shade-20pct);\n animation: 0.2s lumo-overlay-backdrop-enter both;\n will-change: opacity;\n }\n\n @keyframes lumo-overlay-backdrop-enter {\n 0% {\n opacity: 0;\n }\n }\n\n :host([closing]) [part="backdrop"] {\n animation: 0.2s lumo-overlay-backdrop-exit both;\n }\n\n @keyframes lumo-overlay-backdrop-exit {\n 100% {\n opacity: 0;\n }\n }\n\n @keyframes lumo-overlay-dummy-animation {\n 0% { opacity: 1; }\n 100% { opacity: 1; }\n }\n </style>\n </template>\n</dom-module>',document.head.appendChild(d.content);const l=Element.prototype,c=l.matches||l.matchesSelector||l.mozMatchesSelector||l.msMatchesSelector||l.oMatchesSelector||l.webkitMatchesSelector;class h{static getTabbableNodes(e){const t=[];return this._collectTabbableNodes(e,t)?this._sortByTabIndex(t):t}static isFocusable(e){return c.call(e,"input, select, textarea, button, object")?c.call(e,":not([disabled])"):c.call(e,"a[href], area[href], iframe, [tabindex], [contentEditable]")}static isTabbable(e){return this.isFocusable(e)&&c.call(e,':not([tabindex="-1"])')&&this._isVisible(e)}static _normalizedTabIndex(e){if(this.isFocusable(e)){const t=e.getAttribute("tabindex")||0;return Number(t)}return-1}static _collectTabbableNodes(e,t){if(e.nodeType!==Node.ELEMENT_NODE||!this._isVisible(e))return!1;const n=e,o=this._normalizedTabIndex(n);let i,s=o>0;if(o>=0&&t.push(n),i="slot"===n.localName?n.assignedNodes({flatten:!0}):(n.shadowRoot||n).children,i)for(let e=0;e<i.length;e++)s=this._collectTabbableNodes(i[e],t)||s;return s}static _isVisible(e){let t=e.style;return"hidden"!==t.visibility&&"none"!==t.display&&(t=window.getComputedStyle(e),"hidden"!==t.visibility&&"none"!==t.display)}static _sortByTabIndex(e){const t=e.length;if(t<2)return e;const n=Math.ceil(t/2),o=this._sortByTabIndex(e.slice(0,n)),i=this._sortByTabIndex(e.slice(n));return this._mergeSortByTabIndex(o,i)}static _mergeSortByTabIndex(e,t){const n=[];for(;e.length>0&&t.length>0;)this._hasLowerTabOrder(e[0],t[0])?n.push(t.shift()):n.push(e.shift());return n.concat(e,t)}static _hasLowerTabOrder(e,t){const n=Math.max(e.tabIndex,0),o=Math.max(t.tabIndex,0);return 0===n||0===o?o>n:n>o}}
|
|
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
|
+
*/let u=0;const m={},p=e=>{u++;const t=`vaadin-overlay-content-${u}`,n=document.createElement("template"),o=document.createElement("style");o.textContent=":host { display: block; }"+e,n.content.appendChild(o),window.ShadyCSS&&window.ShadyCSS.prepareTemplate(n,t);const i=class extends HTMLElement{static get is(){return t}constructor(){super(),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(document.importNode(n.content,!0)))}connectedCallback(){window.ShadyCSS&&window.ShadyCSS.styleElement(this)}};return customElements.define(i.is,i),m[e]=t,t};class v extends(a(r(t))){static get template(){return e`
|
|
7
|
+
<style>
|
|
8
|
+
:host {
|
|
9
|
+
z-index: 200;
|
|
10
|
+
position: fixed;
|
|
11
|
+
|
|
12
|
+
/*
|
|
13
|
+
Despite of what the names say, <vaadin-overlay> is just a container
|
|
14
|
+
for position/sizing/alignment. The actual overlay is the overlay part.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
/*
|
|
18
|
+
Default position constraints: the entire viewport. Note: themes can
|
|
19
|
+
override this to introduce gaps between the overlay and the viewport.
|
|
20
|
+
*/
|
|
21
|
+
top: 0;
|
|
22
|
+
right: 0;
|
|
23
|
+
bottom: var(--vaadin-overlay-viewport-bottom);
|
|
24
|
+
left: 0;
|
|
25
|
+
|
|
26
|
+
/* Use flexbox alignment for the overlay part. */
|
|
27
|
+
display: flex;
|
|
28
|
+
flex-direction: column; /* makes dropdowns sizing easier */
|
|
29
|
+
/* Align to center by default. */
|
|
30
|
+
align-items: center;
|
|
31
|
+
justify-content: center;
|
|
32
|
+
|
|
33
|
+
/* Allow centering when max-width/max-height applies. */
|
|
34
|
+
margin: auto;
|
|
35
|
+
|
|
36
|
+
/* The host is not clickable, only the overlay part is. */
|
|
37
|
+
pointer-events: none;
|
|
38
|
+
|
|
39
|
+
/* Remove tap highlight on touch devices. */
|
|
40
|
+
-webkit-tap-highlight-color: transparent;
|
|
41
|
+
|
|
42
|
+
/* CSS API for host */
|
|
43
|
+
--vaadin-overlay-viewport-bottom: 0;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
:host([hidden]),
|
|
47
|
+
:host(:not([opened]):not([closing])) {
|
|
48
|
+
display: none !important;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
[part="overlay"] {
|
|
52
|
+
-webkit-overflow-scrolling: touch;
|
|
53
|
+
overflow: auto;
|
|
54
|
+
pointer-events: auto;
|
|
55
|
+
|
|
56
|
+
/* Prevent overflowing the host in MSIE 11 */
|
|
57
|
+
max-width: 100%;
|
|
58
|
+
box-sizing: border-box;
|
|
59
|
+
|
|
60
|
+
-webkit-tap-highlight-color: initial; /* reenable tap highlight inside */
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
[part="backdrop"] {
|
|
64
|
+
z-index: -1;
|
|
65
|
+
content: "";
|
|
66
|
+
background: rgba(0, 0, 0, 0.5);
|
|
67
|
+
position: fixed;
|
|
68
|
+
top: 0;
|
|
69
|
+
left: 0;
|
|
70
|
+
bottom: 0;
|
|
71
|
+
right: 0;
|
|
72
|
+
pointer-events: auto;
|
|
73
|
+
}
|
|
74
|
+
</style>
|
|
75
|
+
|
|
76
|
+
<div id="backdrop" part="backdrop" hidden\$="{{!withBackdrop}}"></div>
|
|
77
|
+
<div part="overlay" id="overlay" tabindex="0">
|
|
78
|
+
<div part="content" id="content">
|
|
79
|
+
<slot></slot>
|
|
80
|
+
</div>
|
|
81
|
+
</div>
|
|
82
|
+
`}static get is(){return"vaadin-overlay"}static get properties(){return{opened:{type:Boolean,notify:!0,observer:"_openedChanged",reflectToAttribute:!0},owner:Element,renderer:Function,template:{type:Object,notify:!0},instanceProps:{type:Object},content:{type:Object,notify:!0},withBackdrop:{type:Boolean,value:!1,reflectToAttribute:!0},model:Object,modeless:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_modelessChanged"},hidden:{type:Boolean,reflectToAttribute:!0,observer:"_hiddenChanged"},focusTrap:{type:Boolean,value:!1},restoreFocusOnClose:{type:Boolean,value:!1},_mouseDownInside:{type:Boolean},_mouseUpInside:{type:Boolean},_instance:{type:Object},_originalContentPart:Object,_contentNodes:Array,_oldOwner:Element,_oldModel:Object,_oldTemplate:Object,_oldInstanceProps:Object,_oldRenderer:Object,_oldOpened:Boolean}}static get observers(){return["_templateOrRendererChanged(template, renderer, owner, model, instanceProps, opened)"]}constructor(){super(),this._boundMouseDownListener=this._mouseDownListener.bind(this),this._boundMouseUpListener=this._mouseUpListener.bind(this),this._boundOutsideClickListener=this._outsideClickListener.bind(this),this._boundKeydownListener=this._keydownListener.bind(this),this._observer=new n(this,(e=>{this._setTemplateFromNodes(e.addedNodes)})),this._boundIronOverlayCanceledListener=this._ironOverlayCanceled.bind(this),/iPad|iPhone|iPod/.test(navigator.userAgent)&&(this._boundIosResizeListener=()=>this._detectIosNavbar())}ready(){super.ready(),this._observer.flush(),this.addEventListener("click",(()=>{})),this.$.backdrop.addEventListener("click",(()=>{}))}_detectIosNavbar(){if(!this.opened)return;const e=window.innerHeight,t=window.innerWidth>e,n=document.documentElement.clientHeight;t&&n>e?this.style.setProperty("--vaadin-overlay-viewport-bottom",n-e+"px"):this.style.setProperty("--vaadin-overlay-viewport-bottom","0")}_setTemplateFromNodes(e){this.template=e.filter((e=>e.localName&&"template"===e.localName))[0]||this.template}close(e){var t=new CustomEvent("vaadin-overlay-close",{bubbles:!0,cancelable:!0,detail:{sourceEvent:e}});this.dispatchEvent(t),t.defaultPrevented||(this.opened=!1)}connectedCallback(){super.connectedCallback(),this._boundIosResizeListener&&(this._detectIosNavbar(),window.addEventListener("resize",this._boundIosResizeListener))}disconnectedCallback(){super.disconnectedCallback(),this._boundIosResizeListener&&window.removeEventListener("resize",this._boundIosResizeListener)}_ironOverlayCanceled(e){e.preventDefault()}_mouseDownListener(e){this._mouseDownInside=e.composedPath().indexOf(this.$.overlay)>=0}_mouseUpListener(e){this._mouseUpInside=e.composedPath().indexOf(this.$.overlay)>=0}_outsideClickListener(e){if(-1!==e.composedPath().indexOf(this.$.overlay)||this._mouseDownInside||this._mouseUpInside)return this._mouseDownInside=!1,void(this._mouseUpInside=!1);if(!this._last)return;const t=new CustomEvent("vaadin-overlay-outside-click",{bubbles:!0,cancelable:!0,detail:{sourceEvent:e}});this.dispatchEvent(t),this.opened&&!t.defaultPrevented&&this.close(e)}_keydownListener(e){if(this._last)if("Tab"===e.key&&this.focusTrap&&!e.defaultPrevented)this._cycleTab(e.shiftKey?-1:1),e.preventDefault();else if("Escape"===e.key||"Esc"===e.key){const t=new CustomEvent("vaadin-overlay-escape-press",{bubbles:!0,cancelable:!0,detail:{sourceEvent:e}});this.dispatchEvent(t),this.opened&&!t.defaultPrevented&&this.close(e)}}_ensureTemplatized(){this._setTemplateFromNodes(Array.from(this.children))}_openedChanged(e,t){this._instance||this._ensureTemplatized(),e?(this.__restoreFocusNode=this._getActiveElement(),this._animatedOpening(),s(this,(()=>{this.focusTrap&&!this.contains(document._activeElement||document.activeElement)&&this._cycleTab(0,0);const e=new CustomEvent("vaadin-overlay-open",{bubbles:!0});this.dispatchEvent(e)})),this.modeless||this._addGlobalListeners()):t&&(this._animatedClosing(),this.modeless||this._removeGlobalListeners())}_hiddenChanged(e){e&&this.hasAttribute("closing")&&this._flushAnimation("closing")}_shouldAnimate(){const e=getComputedStyle(this).getPropertyValue("animation-name");return!("none"===getComputedStyle(this).getPropertyValue("display"))&&e&&"none"!=e}_enqueueAnimation(e,t){const n=`__${e}Handler`,o=e=>{e&&e.target!==this||(t(),this.removeEventListener("animationend",o),delete this[n])};this[n]=o,this.addEventListener("animationend",o)}_flushAnimation(e){const t=`__${e}Handler`;"function"==typeof this[t]&&this[t]()}_animatedOpening(){this.parentNode===document.body&&this.hasAttribute("closing")&&this._flushAnimation("closing"),this._attachOverlay(),this.modeless||this._enterModalState(),this.setAttribute("opening","");const e=()=>{document.addEventListener("iron-overlay-canceled",this._boundIronOverlayCanceledListener),this.removeAttribute("opening")};this._shouldAnimate()?this._enqueueAnimation("opening",e):e()}_attachOverlay(){this._placeholder=document.createComment("vaadin-overlay-placeholder"),this.parentNode.insertBefore(this._placeholder,this),document.body.appendChild(this),this.bringToFront()}_animatedClosing(){if(this.hasAttribute("opening")&&this._flushAnimation("opening"),this._placeholder){if(this._exitModalState(),this.restoreFocusOnClose&&this.__restoreFocusNode){const e=this._getActiveElement();(e===document.body||this._deepContains(e))&&this.__restoreFocusNode.focus(),this.__restoreFocusNode=null}this.setAttribute("closing","");const e=()=>{document.removeEventListener("iron-overlay-canceled",this._boundIronOverlayCanceledListener),this._detachOverlay(),this.shadowRoot.querySelector('[part="overlay"]').style.removeProperty("pointer-events"),this.removeAttribute("closing")};this._shouldAnimate()?this._enqueueAnimation("closing",e):e()}}_detachOverlay(){this._placeholder.parentNode.insertBefore(this,this._placeholder),this._placeholder.parentNode.removeChild(this._placeholder)}static get __attachedInstances(){return Array.from(document.body.children).filter((e=>e instanceof v&&!e.hasAttribute("closing"))).sort(((e,t)=>e.__zIndex-t.__zIndex||0))}get _last(){return this===v.__attachedInstances.pop()}_modelessChanged(e){e?(this._removeGlobalListeners(),this._exitModalState()):this.opened&&(this._addGlobalListeners(),this._enterModalState())}_addGlobalListeners(){document.addEventListener("mousedown",this._boundMouseDownListener),document.addEventListener("mouseup",this._boundMouseUpListener),document.documentElement.addEventListener("click",this._boundOutsideClickListener,!0),document.addEventListener("keydown",this._boundKeydownListener)}_enterModalState(){"none"!==document.body.style.pointerEvents&&(this._previousDocumentPointerEvents=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),v.__attachedInstances.forEach((e=>{e!==this&&(e.shadowRoot.querySelector('[part="overlay"]').style.pointerEvents="none")}))}_removeGlobalListeners(){document.removeEventListener("mousedown",this._boundMouseDownListener),document.removeEventListener("mouseup",this._boundMouseUpListener),document.documentElement.removeEventListener("click",this._boundOutsideClickListener,!0),document.removeEventListener("keydown",this._boundKeydownListener)}_exitModalState(){void 0!==this._previousDocumentPointerEvents&&(document.body.style.pointerEvents=this._previousDocumentPointerEvents,delete this._previousDocumentPointerEvents);const e=v.__attachedInstances;let t;for(;(t=e.pop())&&(t===this||(t.shadowRoot.querySelector('[part="overlay"]').style.removeProperty("pointer-events"),t.modeless)););}_removeOldContent(){this.content&&this._contentNodes&&(this._observer.disconnect(),this._contentNodes.forEach((e=>{e.parentNode===this.content&&this.content.removeChild(e)})),this._originalContentPart&&(this.$.content.parentNode.replaceChild(this._originalContentPart,this.$.content),this.$.content=this._originalContentPart,this._originalContentPart=void 0),this._observer.connect(),this._contentNodes=void 0,this.content=void 0)}_stampOverlayTemplate(e,t){this._removeOldContent(),e._Templatizer||(e._Templatizer=o(e,this,{instanceProps:t,forwardHostProp:function(e,t){this._instance&&this._instance.forwardHostProp(e,t)}})),this._instance=new e._Templatizer({}),this._contentNodes=Array.from(this._instance.root.childNodes);const n=e._templateRoot||(e._templateRoot=e.getRootNode());if(n!==document){const e=window.ShadyCSS&&!window.ShadyCSS.nativeShadow;this.$.content.shadowRoot||this.$.content.attachShadow({mode:"open"});let t=Array.from(n.querySelectorAll("style")).reduce(((e,t)=>e+t.textContent),"");if(e){const e=window.ShadyCSS.ScopingShim._styleInfoForNode(n.host);e&&(t+=e._getStyleRules().parsedCssText,t+="}")}if(t=t.replace(/:host/g,":host-nomatch"),t)if(e){const e=(e=>{const t=m[e]||p(e);return document.createElement(t)})(t);e.id="content",e.setAttribute("part","content"),this.$.content.parentNode.replaceChild(e,this.$.content),e.className=this.$.content.className,this._originalContentPart=this.$.content,this.$.content=e}else{const e=document.createElement("style");e.textContent=t,this.$.content.shadowRoot.appendChild(e),this._contentNodes.unshift(e)}this.$.content.shadowRoot.appendChild(this._instance.root),this.content=this.$.content.shadowRoot}else this.appendChild(this._instance.root),this.content=this}_removeNewRendererOrTemplate(e,t,n,o){e!==t?this.template=void 0:n!==o&&(this.renderer=void 0)}render(){this.renderer&&this.renderer.call(this.owner,this.content,this.owner,this.model)}_templateOrRendererChanged(e,t,n,o,i,s){if(e&&t)throw this._removeNewRendererOrTemplate(e,this._oldTemplate,t,this._oldRenderer),new Error("You should only use either a renderer or a template for overlay content");const a=this._oldOwner!==n||this._oldModel!==o;this._oldModel=o,this._oldOwner=n;const r=this._oldInstanceProps!==i||this._oldTemplate!==e;this._oldInstanceProps=i,this._oldTemplate=e;const d=this._oldRenderer!==t;this._oldRenderer=t;const l=this._oldOpened!==s;if(this._oldOpened=s,e&&r)this._stampOverlayTemplate(e,i);else if(t&&(d||l||a)){if(this.content=this,d)for(;this.content.firstChild;)this.content.removeChild(this.content.firstChild);s&&this.render()}}_isFocused(e){return e&&e.getRootNode().activeElement===e}_focusedIndex(e){return(e=e||this._getFocusableElements()).indexOf(e.filter(this._isFocused).pop())}_cycleTab(e,t){const n=this._getFocusableElements();void 0===t&&(t=this._focusedIndex(n)),(t+=e)>=n.length?t=0:t<0&&(t=n.length-1),n[t].focus()}_getFocusableElements(){return h.getTabbableNodes(this.$.overlay)}_getActiveElement(){let e=document._activeElement||document.activeElement;for(e&&e!==document.documentElement&&e instanceof Element!=!1||(e=document.body);e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}_deepContains(e){if(this.contains(e))return!0;let t=e;const n=e.ownerDocument;for(;t&&t!==n&&t!==this;)t=t.parentNode||t.host;return t===this}bringToFront(){let e="";const t=v.__attachedInstances.filter((e=>e!==this)).pop();if(t){e=t.__zIndex+1}this.style.zIndex=e,this.__zIndex=e||parseFloat(getComputedStyle(this).zIndex)}}customElements.define(v.is,v);const y=document.createElement("template");y.innerHTML='<dom-module id="lumo-menu-overlay-core">\n <template>\n <style>\n :host([opening]),\n :host([closing]) {\n animation: 0.14s lumo-overlay-dummy-animation;\n }\n\n [part="overlay"] {\n will-change: opacity, transform;\n }\n\n :host([opening]) [part="overlay"] {\n animation: 0.1s lumo-menu-overlay-enter ease-out both;\n }\n\n @keyframes lumo-menu-overlay-enter {\n 0% {\n opacity: 0;\n transform: translateY(-4px);\n }\n }\n\n :host([closing]) [part="overlay"] {\n animation: 0.1s lumo-menu-overlay-exit both;\n }\n\n @keyframes lumo-menu-overlay-exit {\n 100% {\n opacity: 0;\n }\n }\n </style>\n </template>\n</dom-module><dom-module id="lumo-menu-overlay">\n <template>\n <style include="lumo-overlay lumo-menu-overlay-core">\n /* Small viewport (bottom sheet) styles */\n /* Use direct media queries instead of the state attributes (`[phone]` and `[fullscreen]`) provided by the elements */\n @media (max-width: 420px), (max-height: 420px) {\n :host {\n top: 0 !important;\n right: 0 !important;\n bottom: var(--vaadin-overlay-viewport-bottom, 0) !important;\n left: 0 !important;\n align-items: stretch !important;\n justify-content: flex-end !important;\n }\n\n [part="overlay"] {\n max-height: 50vh;\n width: 100vw;\n border-radius: 0;\n box-shadow: var(--lumo-box-shadow-xl);\n }\n\n /* The content part scrolls instead of the overlay part, because of the gradient fade-out */\n [part="content"] {\n padding: 30px var(--lumo-space-m);\n max-height: inherit;\n box-sizing: border-box;\n -webkit-overflow-scrolling: touch;\n overflow: auto;\n -webkit-mask-image: linear-gradient(transparent, #000 40px, #000 calc(100% - 40px), transparent);\n mask-image: linear-gradient(transparent, #000 40px, #000 calc(100% - 40px), transparent);\n }\n\n [part="backdrop"] {\n display: block;\n }\n\n /* Animations */\n\n :host([opening]) [part="overlay"] {\n animation: 0.2s lumo-mobile-menu-overlay-enter cubic-bezier(.215, .61, .355, 1) both;\n }\n\n :host([closing]),\n :host([closing]) [part="backdrop"] {\n animation-delay: 0.14s;\n }\n\n :host([closing]) [part="overlay"] {\n animation: 0.14s 0.14s lumo-mobile-menu-overlay-exit cubic-bezier(.55, .055, .675, .19) both;\n }\n }\n\n @keyframes lumo-mobile-menu-overlay-enter {\n 0% {\n transform: translateY(150%);\n }\n }\n\n @keyframes lumo-mobile-menu-overlay-exit {\n 100% {\n transform: translateY(150%);\n }\n }\n </style>\n </template>\n</dom-module>',document.head.appendChild(y.content);
|
|
83
|
+
/**
|
|
84
|
+
@license
|
|
85
|
+
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
|
86
|
+
This code may only be used under the BSD style license found at
|
|
87
|
+
http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
|
|
88
|
+
http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
|
|
89
|
+
found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
90
|
+
part of the polymer project is also subject to an additional IP rights grant
|
|
91
|
+
found at http://polymer.github.io/PATENTS.txt
|
|
92
|
+
*/
|
|
93
|
+
const _=i({_template:e`
|
|
94
|
+
<style>
|
|
95
|
+
:host {
|
|
96
|
+
display: inline-block;
|
|
97
|
+
position: fixed;
|
|
98
|
+
clip: rect(0px,0px,0px,0px);
|
|
99
|
+
}
|
|
100
|
+
</style>
|
|
101
|
+
<div aria-live$="[[mode]]">[[_text]]</div>
|
|
102
|
+
`,is:"iron-a11y-announcer",properties:{mode:{type:String,value:"polite"},timeout:{type:Number,value:150},_text:{type:String,value:""}},created:function(){_.instance||(_.instance=this),document.addEventListener("iron-announce",this._onIronAnnounce.bind(this))},announce:function(e){this._text="",this.async((function(){this._text=e}),this.timeout)},_onIronAnnounce:function(e){e.detail&&e.detail.text&&this.announce(e.detail.text)}});_.instance=null,_.requestAvailability=function(){_.instance||(_.instance=document.createElement("iron-a11y-announcer")),document.body?document.body.appendChild(_.instance):document.addEventListener("load",(function(){document.body.appendChild(_.instance)}))};
|
|
103
|
+
/**
|
|
104
|
+
@license
|
|
105
|
+
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
|
106
|
+
This code may only be used under the BSD style license found at
|
|
107
|
+
http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
|
|
108
|
+
http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
|
|
109
|
+
found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
110
|
+
part of the polymer project is also subject to an additional IP rights grant
|
|
111
|
+
found at http://polymer.github.io/PATENTS.txt
|
|
112
|
+
*/
|
|
113
|
+
var b={"U+0008":"backspace","U+0009":"tab","U+001B":"esc","U+0020":"space","U+007F":"del"},f={8:"backspace",9:"tab",13:"enter",27:"esc",33:"pageup",34:"pagedown",35:"end",36:"home",32:"space",37:"left",38:"up",39:"right",40:"down",46:"del",106:"*"},g={shift:"shiftKey",ctrl:"ctrlKey",alt:"altKey",meta:"metaKey"},w=/[a-z0-9*]/,E=/U\+/,x=/^arrow/,k=/^space(bar)?/,C=/^escape$/;function L(e,t){var n="";if(e){var o=e.toLowerCase();" "===o||k.test(o)?n="space":C.test(o)?n="esc":1==o.length?t&&!w.test(o)||(n=o):n=x.test(o)?o.replace("arrow",""):"multiply"==o?"*":o}return n}function T(e,t){return e.key?L(e.key,t):e.detail&&e.detail.key?L(e.detail.key,t):(n=e.keyIdentifier,o="",n&&(n in b?o=b[n]:E.test(n)?(n=parseInt(n.replace("U+","0x"),16),o=String.fromCharCode(n).toLowerCase()):o=n.toLowerCase()),o||function(e){var t="";return Number(e)&&(t=e>=65&&e<=90?String.fromCharCode(32+e):e>=112&&e<=123?"f"+(e-112+1):e>=48&&e<=57?String(e-48):e>=96&&e<=105?String(e-96):f[e]),t}(e.keyCode)||"");var n,o}function S(e,t){return T(t,e.hasModifiers)===e.key&&(!e.hasModifiers||!!t.shiftKey==!!e.shiftKey&&!!t.ctrlKey==!!e.ctrlKey&&!!t.altKey==!!e.altKey&&!!t.metaKey==!!e.metaKey)}function O(e){return e.trim().split(" ").map((function(e){return function(e){return 1===e.length?{combo:e,key:e,event:"keydown"}:e.split("+").reduce((function(e,t){var n=t.split(":"),o=n[0],i=n[1];return o in g?(e[g[o]]=!0,e.hasModifiers=!0):(e.key=o,e.event=i||"keydown"),e}),{combo:e.split(":").shift()})}(e)}))}const K={properties:{keyEventTarget:{type:Object,value:function(){return this}},stopKeyboardEventPropagation:{type:Boolean,value:!1},_boundKeyHandlers:{type:Array,value:function(){return[]}},_imperativeKeyBindings:{type:Object,value:function(){return{}}}},observers:["_resetKeyEventListeners(keyEventTarget, _boundKeyHandlers)"],keyBindings:{},registered:function(){this._prepKeyBindings()},attached:function(){this._listenKeyEventListeners()},detached:function(){this._unlistenKeyEventListeners()},addOwnKeyBinding:function(e,t){this._imperativeKeyBindings[e]=t,this._prepKeyBindings(),this._resetKeyEventListeners()},removeOwnKeyBindings:function(){this._imperativeKeyBindings={},this._prepKeyBindings(),this._resetKeyEventListeners()},keyboardEventMatchesKeys:function(e,t){for(var n=O(t),o=0;o<n.length;++o)if(S(n[o],e))return!0;return!1},_collectKeyBindings:function(){var e=this.behaviors.map((function(e){return e.keyBindings}));return-1===e.indexOf(this.keyBindings)&&e.push(this.keyBindings),e},_prepKeyBindings:function(){for(var e in this._keyBindings={},this._collectKeyBindings().forEach((function(e){for(var t in e)this._addKeyBinding(t,e[t])}),this),this._imperativeKeyBindings)this._addKeyBinding(e,this._imperativeKeyBindings[e]);for(var t in this._keyBindings)this._keyBindings[t].sort((function(e,t){var n=e[0].hasModifiers;return n===t[0].hasModifiers?0:n?-1:1}))},_addKeyBinding:function(e,t){O(e).forEach((function(e){this._keyBindings[e.event]=this._keyBindings[e.event]||[],this._keyBindings[e.event].push([e,t])}),this)},_resetKeyEventListeners:function(){this._unlistenKeyEventListeners(),this.isAttached&&this._listenKeyEventListeners()},_listenKeyEventListeners:function(){this.keyEventTarget&&Object.keys(this._keyBindings).forEach((function(e){var t=this._keyBindings[e],n=this._onKeyBindingEvent.bind(this,t);this._boundKeyHandlers.push([this.keyEventTarget,e,n]),this.keyEventTarget.addEventListener(e,n)}),this)},_unlistenKeyEventListeners:function(){for(var e,t,n,o;this._boundKeyHandlers.length;)t=(e=this._boundKeyHandlers.pop())[0],n=e[1],o=e[2],t.removeEventListener(n,o)},_onKeyBindingEvent:function(e,t){if(this.stopKeyboardEventPropagation&&t.stopPropagation(),!t.defaultPrevented)for(var n=0;n<e.length;n++){var o=e[n][0],i=e[n][1];if(S(o,t)&&(this._triggerKeyHandler(o,i,t),t.defaultPrevented))return}},_triggerKeyHandler:function(e,t,n){var o=Object.create(e);o.keyboardEvent=n;var i=new CustomEvent(e.event,{detail:o,cancelable:!0});this[t].call(this,i),i.defaultPrevented&&n.preventDefault()}};export{_ as I,v as O,K as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as e}from"./shared-1522d76f.js";import"./shared-
|
|
1
|
+
import{_ as e}from"./shared-1522d76f.js";import"./shared-e40937c5.js";import"./shared-cfed658c.js";import"./shared-7039733e.js";import{L as s,c as t,h as r}from"./shared-dc73b9a5.js";import{T as a}from"./shared-331a223c.js";import{c as i}from"./shared-4e709717.js";class c extends CustomEvent{constructor(e){super("change",{detail:e})}}let o,l,d=e=>e;class h extends(a(s)){constructor(){super(...arguments),this.readonly=!1,this.disabled=!1,this.checked=!1}static get properties(){return e(e({},super.properties),{},{readonly:{type:Boolean},disabled:{type:Boolean},checked:{type:Boolean}})}static get styles(){return[super.styles,t(o||(o=d`:host{--check-size:1.125rem}label{margin:calc(((1rem * var(--lumo-line-height-s)) - var(--check-size))/ -2) 0}label>:first-child{height:calc(1rem * var(--lumo-line-height-s))}.ml-xxl{margin-left:calc(var(--lumo-space-m) + var(--check-size))}.check{height:var(--check-size);width:var(--check-size)}`))]}render(){return r(l||(l=d` <label class="${0}"> <div class="flex items-center"> <div class="${0}"> <iron-icon icon="lumo:checkmark" class="${0}"> </iron-icon> <input type="checkbox" class="sr-only" .checked="${0}" ?disabled="${0}" data-testid="input" @change="${0}"> </div> </div> <div class="flex-1 font-lumo leading-s ml-m"> <slot></slot> </div> </label> <div class="${0}"> <slot name="content"></slot> </div> `),i({"flex items-start group transition-colors":!0,"cursor-default":this.disabled||this.readonly,"text-disabled":this.disabled,"text-secondary":this.readonly,"cursor-pointer":!this.disabled}),i({"flex-shrink-0 check transition-colors rounded-s border":!0,"focus-within-shadow-outline":!0,"bg-primary text-primary-contrast":!this.readonly&&this.checked,"border-dashed border-contrast-30":this.readonly,"border-transparent":!this.readonly,"opacity-50":this.disabled,"text-secondary bg-contrast-20":!this.readonly&&!this.checked,"group-hover-bg-contrast-30":!this.readonly&&!this.checked}),i({"block w-full h-full transition-transform transform":!0,"scale-100":this.checked,"scale-0":!this.checked}),this.checked,this.disabled,(e=>{if(this.readonly)return e.preventDefault();e.stopPropagation(),this.checked=!this.checked,this.dispatchEvent(new c(this.checked))}),i({"font-lumo ml-xxl transition-colors":!0,"text-disabled":this.disabled}))}}export{h as C,c as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as e}from"./shared-1522d76f.js";import{h as t}from"./shared-dc73b9a5.js";import{C as l}from"./shared-9f570db0.js";import"./foxy-nucleon-element.js";import{R as s,T as a,a as i}from"./shared-
|
|
1
|
+
import{_ as e}from"./shared-1522d76f.js";import{h as t}from"./shared-dc73b9a5.js";import{C as l}from"./shared-9f570db0.js";import"./foxy-nucleon-element.js";import{R as s,T as a,a as i}from"./shared-331a223c.js";import{c as r}from"./shared-4e709717.js";import{N as d}from"./shared-a0435ec6.js";let n,o,h,c,m,u=e=>e;const b=l(s(a(i(d))));class p extends b{constructor(){super(...arguments),this.templates={},this.columns=[]}static get properties(){return e(e({},super.properties),{},{columns:{attribute:!1}})}render(){var e,l;const s=this.columns.some((e=>!!e.header));return t(n||(n=u` <div data-testid="wrapper" aria-busy="${0}" aria-live="polite" class="relative font-lumo text-m"> <table class="table-fixed w-full" data-testid="table"> <thead class="${0}"> <tr> ${0} </tr> </thead> <tbody class="divide-y divide-contrast-10"> ${0} </tbody> </table> ${0} </div> ${0} `),this.in("busy"),s?"border-b border-contrast-10":"sr-only",this.columns.map(((e,l)=>{var s;return t(o||(o=u` <th class="${0}"> ${0} </th> `),r({"truncate h-l text-tertiary text-m text-left font-medium":!0,"text-right":l===this.columns.length-1,"hidden sm-table-cell":"sm"===e.hideBelow,"hidden md-table-cell":"md"===e.hideBelow,"hidden lg-table-cell":"lg"===e.hideBelow,"hidden xl-table-cell":"xl"===e.hideBelow}),null===(s=e.header)||void 0===s?void 0:s.call(e,{html:t,lang:this.lang,data:this.data,ns:this.ns}))})),this.__rows.map((e=>{var l;return t(h||(h=u` <tr class="h-l"> ${0} </tr> `),null===(l=this.columns)||void 0===l?void 0:l.map(((l,s)=>{var a;return t(c||(c=u` <td class="${0}"> ${0} </td> `),r({"text-right":s===this.columns.length-1,"hidden sm-table-cell":"sm"===l.hideBelow,"hidden md-table-cell":"md"===l.hideBelow,"hidden lg-table-cell":"lg"===l.hideBelow,"hidden xl-table-cell":"xl"===l.hideBelow,"truncate h-l text-body":!0}),e?null===(a=l.cell)||void 0===a?void 0:a.call(l,{html:t,lang:this.lang,data:e,ns:this.ns}):"")})))})),this.in({idle:"snapshot"})?"":t(m||(m=u` <div class="absolute inset-0 flex items-center justify-center"> <foxy-spinner data-testid="spinner" layout="vertical" state="${0}" class="p-m bg-base shadow-xs rounded-t-l rounded-b-l" lang="${0}" ns="${0} ${0}"> </foxy-spinner> </div> `),this.in("busy")?"busy":this.in("idle")?"empty":"error",this.lang,this.ns,null!==(l=null===(e=customElements.get("foxy-spinner"))||void 0===e?void 0:e.defaultNS)&&void 0!==l?l:""),this.renderTemplateOrSlot())}get __rows(){var e,t,l;const s=Object.values(null!==(t=null===(e=this.data)||void 0===e?void 0:e._embedded)&&void 0!==t?t:{}).reduce(((e,t)=>[...e,...t]),[]);let a;if(0===s.length)try{const e=new URL(null!==(l=this.href)&&void 0!==l?l:"").searchParams.get("limit"),t=parseInt(null!=e?e:"");a=isNaN(t)?20:t}catch(e){a=20}else a=s.length;return new Array(a).fill(null).map(((e,t)=>{var l;return null!==(l=s[t])&&void 0!==l?l:e}))}}export{p as T};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-655e7c5f.js";import"./shared-cfed658c.js";import{h as A}from"./shared-bf695fe7.js";import{T as e}from"./shared-4482e7b9.js";import{D as t}from"./shared-331a223c.js";const s=A`<dom-module id="lumo-password-field" theme-for="vaadin-password-field">
|
|
2
2
|
<template>
|
|
3
3
|
<style>
|
|
4
4
|
[part="reveal-button"]::before {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as t}from"./shared-9f570db0.js";import{R as e}from"./shared-
|
|
1
|
+
import{C as t}from"./shared-9f570db0.js";import{R as e}from"./shared-331a223c.js";import{I as s}from"./shared-d244dd07.js";import{h as i}from"./shared-dc73b9a5.js";let r,d,l,a=t=>t;const o=e(t(s));class n extends o{constructor(){super(...arguments),this.templates={},this.__renderTitle=t=>i(r||(r=a` <div data-testid="title"> ${0} <div class="font-medium truncate"> ${0}​ </div> ${0} </div> `),this.renderTemplateOrSlot("title:before"),this.data?null==t?void 0:t(this.data):"",this.renderTemplateOrSlot("title:after")),this.__renderSubtitle=t=>i(d||(d=a` <div data-testid="subtitle"> ${0} <div class="text-secondary truncate text-s sm-text-m"> ${0}​ </div> ${0} </div> `),this.renderTemplateOrSlot("subtitle:before"),this.data?null==t?void 0:t(this.data):"",this.renderTemplateOrSlot("subtitle:after"))}renderBody(t){const e=this.hiddenSelector;return i(l||(l=a` <div class="h-s flex flex-col justify-center relative text-body text-m font-lumo leading-xs sm-h-xs sm-flex-row sm-items-center sm-justify-between"> ${0} ${0} </div> `),e.matches("title",!0)?"":this.__renderTitle(null==t?void 0:t.title),e.matches("subtitle",!0)?"":this.__renderSubtitle(null==t?void 0:t.subtitle))}}export{n as T};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{E as t,T as e}from"./shared-
|
|
1
|
+
import{E as t,T as e}from"./shared-cfed658c.js";import{h as o,P as r}from"./shared-bf695fe7.js";import"./shared-655e7c5f.js";import{L as a}from"./shared-6ed07856.js";import{a as i,I as s}from"./shared-3f19b914.js";import{I as n}from"./shared-651c44fa.js";import{a as l}from"./shared-e40937c5.js";const c=o`<dom-module id="lumo-tab" theme-for="vaadin-tab">
|
|
2
2
|
<template>
|
|
3
3
|
<style>
|
|
4
4
|
:host {
|
|
@@ -226,7 +226,7 @@ import{E as t,T as e}from"./shared-67696f2f.js";import{h as o,P as r}from"./shar
|
|
|
226
226
|
Copyright (c) 2017 Vaadin Ltd.
|
|
227
227
|
This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
228
228
|
*/
|
|
229
|
-
class d extends(t(e(
|
|
229
|
+
class d extends(t(e(n(r)))){static get template(){return o`
|
|
230
230
|
<slot></slot>
|
|
231
231
|
`}static get is(){return"vaadin-tab"}static get version(){return"3.2.0"}ready(){super.ready(),this.setAttribute("role","tab")}_onKeyup(t){const e=this.hasAttribute("active");if(super._onKeyup(t),e){const t=this.querySelector("a");t&&t.click()}}}customElements.define(d.is,d);const m=o`<dom-module id="lumo-tabs" theme-for="vaadin-tabs">
|
|
232
232
|
<template>
|
|
@@ -464,7 +464,7 @@ class d extends(t(e(i(r)))){static get template(){return o`
|
|
|
464
464
|
Copyright (c) 2017 Vaadin Ltd.
|
|
465
465
|
This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
466
466
|
*/
|
|
467
|
-
const h=/Apple.* Version\/(9|10)/.test(navigator.userAgent);class f extends(t(a(e(l([
|
|
467
|
+
const h=/Apple.* Version\/(9|10)/.test(navigator.userAgent);class f extends(t(a(e(l([s],r))))){static get template(){return o`
|
|
468
468
|
<style>
|
|
469
469
|
:host {
|
|
470
470
|
display: flex;
|
|
@@ -550,4 +550,4 @@ const h=/Apple.* Version\/(9|10)/.test(navigator.userAgent);class f extends(t(a(
|
|
|
550
550
|
</div>
|
|
551
551
|
|
|
552
552
|
<div on-click="_scrollForward" part="forward-button"></div>
|
|
553
|
-
`}static get is(){return"vaadin-tabs"}static get version(){return"3.2.0"}static get properties(){return{orientation:{value:"horizontal",type:String},selected:{value:0,type:Number}}}static get observers(){return["_updateOverflow(items.*, vertical)"]}ready(){super.ready(),this.addEventListener("iron-resize",(()=>this._updateOverflow())),this._scrollerElement.addEventListener("scroll",(()=>this._updateOverflow())),this.setAttribute("role","tablist"),
|
|
553
|
+
`}static get is(){return"vaadin-tabs"}static get version(){return"3.2.0"}static get properties(){return{orientation:{value:"horizontal",type:String},selected:{value:0,type:Number}}}static get observers(){return["_updateOverflow(items.*, vertical)"]}ready(){super.ready(),this.addEventListener("iron-resize",(()=>this._updateOverflow())),this._scrollerElement.addEventListener("scroll",(()=>this._updateOverflow())),this.setAttribute("role","tablist"),i(this,(()=>{this._updateOverflow()}))}_scrollForward(){this._scroll(-this.__direction*this._scrollOffset)}_scrollBack(){this._scroll(this.__direction*this._scrollOffset)}get _scrollOffset(){return this._vertical?this._scrollerElement.offsetHeight:this._scrollerElement.offsetWidth}get _scrollerElement(){return this.$.scroll}get __direction(){return this._vertical||"rtl"!==this.getAttribute("dir")?-1:1}_updateOverflow(){const t=this._vertical?this._scrollerElement.scrollTop:this.__getNormalizedScrollLeft(this._scrollerElement);let e=this._vertical?this._scrollerElement.scrollHeight:this._scrollerElement.scrollWidth;e-=1;let o=t>0?"start":"";o+=t+this._scrollOffset<e?" end":"",1==this.__direction&&(o=o.replace(/start|end/gi,(t=>"start"===t?"end":"start"))),o?this.setAttribute("overflow",o.trim()):this.removeAttribute("overflow"),this._repaintShadowNodesHack()}_repaintShadowNodesHack(){if(h&&this.root){const t="-webkit-backface-visibility";this.root.querySelectorAll("*").forEach((e=>{e.style[t]="visible",e.style[t]=""}))}}}customElements.define(f.is,f);
|