@foxy.io/elements 1.17.0 → 1.18.0-beta.3
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 +3 -85
- package/dist/cdn/foxy-address-form.js +1 -1
- package/dist/cdn/foxy-api-browser.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-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-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 +1 -1
- package/dist/cdn/foxy-customer-portal.js +15 -15
- package/dist/cdn/foxy-customer.js +6 -6
- 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-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-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-codes-form.js +1 -1
- package/dist/cdn/foxy-gift-card-form.js +1 -1
- package/dist/cdn/foxy-i18n.js +1 -1
- package/dist/cdn/foxy-item-card.js +1 -1
- package/dist/cdn/foxy-item-form.js +1 -1
- 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-nucleon-element.js +1 -1
- package/dist/cdn/foxy-pagination.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 +1 -1
- package/dist/cdn/foxy-report-form.js +4 -4
- package/dist/cdn/foxy-reports-table.js +5 -5
- package/dist/cdn/foxy-shipment-card.js +1 -1
- package/dist/cdn/foxy-sign-in-form.js +1 -1
- package/dist/cdn/foxy-spinner.js +1 -1
- package/dist/cdn/foxy-store-shipping-method-form.js +150 -0
- 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 +1 -1
- package/dist/cdn/foxy-template-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 +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-26ce8d23.js → shared-023c287a.js} +1 -1
- package/dist/cdn/{shared-195fd5af.js → shared-084b6372.js} +1 -1
- package/dist/cdn/shared-11f0daea.js +169 -0
- package/dist/cdn/{shared-6d104622.js → shared-189dfb49.js} +1 -1
- package/dist/cdn/shared-23fd456c.js +134 -0
- package/dist/cdn/{shared-baf79b0b.js → shared-2ca6d676.js} +1 -1
- package/dist/cdn/{shared-c309e0ef.js → shared-2f0efb2c.js} +1 -1
- package/dist/cdn/{shared-dda2a74d.js → shared-37b61010.js} +1 -1
- package/dist/cdn/shared-381aa7fe.js +1 -0
- package/dist/cdn/shared-3a7cf739.js +15 -0
- package/dist/cdn/{shared-2188d5f7.js → shared-3e3c07ac.js} +1 -1
- package/dist/cdn/{shared-8e9a3bbb.js → shared-412670b8.js} +1 -1
- package/dist/cdn/{shared-31c43743.js → shared-4560425c.js} +1 -1
- package/dist/cdn/shared-4773b634.js +1 -0
- package/dist/cdn/{shared-7c8bb60c.js → shared-4c0520f6.js} +1 -1
- package/dist/cdn/{shared-5c3a88d2.js → shared-5482630e.js} +1 -1
- package/dist/cdn/{shared-322e7efb.js → shared-5e43b817.js} +1 -1
- package/dist/cdn/{shared-a0836fa5.js → shared-60c862aa.js} +1 -1
- package/dist/cdn/shared-619adfad.js +1 -0
- package/dist/cdn/{shared-b3df4f38.js → shared-68ab037d.js} +1 -1
- package/dist/cdn/{shared-7c612495.js → shared-6af95088.js} +1 -1
- package/dist/cdn/shared-6ce2acfa.js +1 -0
- package/dist/cdn/{shared-c8677ba3.js → shared-6f89d2e0.js} +1 -1
- package/dist/cdn/{shared-c5c60417.js → shared-71acf673.js} +1 -1
- package/dist/cdn/{shared-c89ba319.js → shared-74a27421.js} +1 -1
- package/dist/cdn/{shared-d699348f.js → shared-80b90eec.js} +2 -2
- package/dist/cdn/{shared-98497473.js → shared-85d45495.js} +1 -1
- package/dist/cdn/{shared-a5e52b8f.js → shared-872ceacf.js} +3 -3
- package/dist/cdn/{shared-4e201e09.js → shared-901ca702.js} +1 -1
- package/dist/cdn/{shared-ae415a98.js → shared-91b86bae.js} +1 -1
- package/dist/cdn/shared-9b392ba8.js +1 -0
- package/dist/cdn/{shared-1bbd9b73.js → shared-9be1a70f.js} +1 -1
- package/dist/cdn/{shared-8d4fef94.js → shared-9ef13805.js} +1 -1
- package/dist/cdn/{shared-bb686fc6.js → shared-9ef81b37.js} +1 -1
- package/dist/cdn/{shared-3b2dedf9.js → shared-a2a1193d.js} +1 -1
- package/dist/cdn/shared-a48a9dfc.js +82 -0
- package/dist/cdn/{shared-8d937ae4.js → shared-c0fb5a33.js} +3 -3
- package/dist/cdn/{shared-a052131e.js → shared-c63ba384.js} +1 -1
- package/dist/cdn/{shared-d28ac9dc.js → shared-c7280a24.js} +1 -1
- package/dist/cdn/{shared-e9a4a204.js → shared-c7c8d1b6.js} +1 -1
- package/dist/cdn/{shared-fadcb2e1.js → shared-ca0f14c1.js} +1 -1
- package/dist/cdn/{shared-7474af47.js → shared-d91ed0a8.js} +1 -1
- package/dist/cdn/{shared-39f2c345.js → shared-daa454bf.js} +1 -1
- package/dist/cdn/{shared-2bdd4f74.js → shared-ec7cfc23.js} +1 -1
- package/dist/cdn/{shared-bf6fb415.js → shared-f2639daf.js} +1 -1
- package/dist/cdn/{shared-62169210.js → shared-f31044b8.js} +1 -1
- package/dist/cdn/{shared-f84686a8.js → shared-fcbf9a41.js} +1 -1
- package/dist/cdn/{shared-dd6d3c18.js → shared-fd595d0a.js} +1 -1
- package/dist/cdn/{shared-dc23b751.js → shared-fe68657a.js} +1 -1
- package/dist/cdn/{shared-f1317609.js → shared-ff1d9854.js} +1 -1
- package/dist/cdn/translations/store-shipping-method-form/en.json +90 -0
- package/dist/elements/internal/InternalAsyncComboBoxControl/InternalAsyncComboBoxControl.d.ts +3 -0
- package/dist/elements/internal/InternalAsyncComboBoxControl/InternalAsyncComboBoxControl.js +22 -0
- package/dist/elements/internal/InternalAsyncComboBoxControl/InternalAsyncComboBoxControl.js.map +1 -1
- package/dist/elements/internal/InternalCheckboxGroupControl/InternalCheckboxGroupControl.d.ts +17 -0
- package/dist/elements/internal/InternalCheckboxGroupControl/InternalCheckboxGroupControl.js +51 -0
- package/dist/elements/internal/InternalCheckboxGroupControl/InternalCheckboxGroupControl.js.map +1 -0
- package/dist/elements/internal/InternalCheckboxGroupControl/index.d.ts +6 -0
- package/dist/elements/internal/InternalCheckboxGroupControl/index.js +8 -0
- package/dist/elements/internal/InternalCheckboxGroupControl/index.js.map +1 -0
- package/dist/elements/internal/InternalCheckboxGroupControl/types.d.ts +6 -0
- package/dist/elements/internal/InternalCheckboxGroupControl/types.js +2 -0
- package/dist/elements/internal/InternalCheckboxGroupControl/types.js.map +1 -0
- package/dist/elements/internal/InternalEditableControl/InternalEditableControl.d.ts +2 -0
- package/dist/elements/internal/InternalEditableControl/InternalEditableControl.js +6 -4
- package/dist/elements/internal/InternalEditableControl/InternalEditableControl.js.map +1 -1
- package/dist/elements/internal/InternalTextAreaControl/InternalTextAreaControl.d.ts +13 -0
- package/dist/elements/internal/InternalTextAreaControl/InternalTextAreaControl.js +40 -0
- package/dist/elements/internal/InternalTextAreaControl/InternalTextAreaControl.js.map +1 -0
- package/dist/elements/internal/InternalTextAreaControl/index.d.ts +4 -0
- package/dist/elements/internal/InternalTextAreaControl/index.js +6 -0
- package/dist/elements/internal/InternalTextAreaControl/index.js.map +1 -0
- package/dist/elements/public/CustomerPortal/InternalCustomerPortalLoggedInView.js +10 -23
- package/dist/elements/public/CustomerPortal/InternalCustomerPortalLoggedInView.js.map +1 -1
- package/dist/elements/public/NucleonElement/NucleonElement.d.ts +2 -1
- package/dist/elements/public/NucleonElement/NucleonElement.js +12 -10
- package/dist/elements/public/NucleonElement/NucleonElement.js.map +1 -1
- package/dist/elements/public/ShipmentCard/ShipmentCard.js +1 -1
- package/dist/elements/public/ShipmentCard/ShipmentCard.js.map +1 -1
- package/dist/elements/public/StoreShippingMethodForm/StoreShippingMethodForm.d.ts +25 -0
- package/dist/elements/public/StoreShippingMethodForm/StoreShippingMethodForm.js +201 -0
- package/dist/elements/public/StoreShippingMethodForm/StoreShippingMethodForm.js.map +1 -0
- package/dist/elements/public/StoreShippingMethodForm/index.d.ts +11 -0
- package/dist/elements/public/StoreShippingMethodForm/index.js +13 -0
- package/dist/elements/public/StoreShippingMethodForm/index.js.map +1 -0
- package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesControl/InternalStoreShippingMethodFormServicesControl.d.ts +5 -0
- package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesControl/InternalStoreShippingMethodFormServicesControl.js +33 -0
- package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesControl/InternalStoreShippingMethodFormServicesControl.js.map +1 -0
- package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesControl/index.d.ts +6 -0
- package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesControl/index.js +8 -0
- package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesControl/index.js.map +1 -0
- package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPage/InternalStoreShippingMethodFormServicesPage.d.ts +19 -0
- package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPage/InternalStoreShippingMethodFormServicesPage.js +96 -0
- package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPage/InternalStoreShippingMethodFormServicesPage.js.map +1 -0
- package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPage/index.d.ts +5 -0
- package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPage/index.js +7 -0
- package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPage/index.js.map +1 -0
- package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPageItem/InternalStoreShippingMethodFormServicesPageItem.d.ts +17 -0
- package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPageItem/InternalStoreShippingMethodFormServicesPageItem.js +45 -0
- package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPageItem/InternalStoreShippingMethodFormServicesPageItem.js.map +1 -0
- package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPageItem/index.d.ts +3 -0
- package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPageItem/index.js +5 -0
- package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPageItem/index.js.map +1 -0
- package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPageItemContent/InternalStoreShippingMethodFormServicesPageItemContent.d.ts +16 -0
- package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPageItemContent/InternalStoreShippingMethodFormServicesPageItemContent.js +49 -0
- package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPageItemContent/InternalStoreShippingMethodFormServicesPageItemContent.js.map +1 -0
- package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPageItemContent/index.d.ts +3 -0
- package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPageItemContent/index.js +5 -0
- package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPageItemContent/index.js.map +1 -0
- package/dist/elements/public/StoreShippingMethodForm/types.d.ts +5 -0
- package/dist/elements/public/StoreShippingMethodForm/types.js +2 -0
- package/dist/elements/public/StoreShippingMethodForm/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/configurable.js +16 -8
- package/dist/mixins/configurable.js.map +1 -1
- package/dist/mixins/inferrable.js +25 -23
- package/dist/mixins/inferrable.js.map +1 -1
- package/package.json +2 -2
- package/dist/cdn/shared-45feee83.js +0 -1
- package/dist/cdn/shared-63685d2e.js +0 -302
- package/dist/cdn/shared-92327224.js +0 -15
- package/dist/cdn/shared-ac44429d.js +0 -1
- package/dist/cdn/shared-dc1c6edd.js +0 -1
- package/dist/cdn/shared-dc3ffd38.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{D as t,i as e,e as n}from"./shared-ae415a98.js";import{D as o}from"./shared-62169210.js";class l extends HTMLElement{static get version(){return"1.6.1"}}customElements.define("vaadin-lumo-styles",l);const s=document.createElement("template");s.innerHTML='<custom-style>\n <style>\n html {\n /* Base (background) */\n --lumo-base-color: #FFF;\n\n /* Tint */\n --lumo-tint-5pct: hsla(0, 0%, 100%, 0.3);\n --lumo-tint-10pct: hsla(0, 0%, 100%, 0.37);\n --lumo-tint-20pct: hsla(0, 0%, 100%, 0.44);\n --lumo-tint-30pct: hsla(0, 0%, 100%, 0.5);\n --lumo-tint-40pct: hsla(0, 0%, 100%, 0.57);\n --lumo-tint-50pct: hsla(0, 0%, 100%, 0.64);\n --lumo-tint-60pct: hsla(0, 0%, 100%, 0.7);\n --lumo-tint-70pct: hsla(0, 0%, 100%, 0.77);\n --lumo-tint-80pct: hsla(0, 0%, 100%, 0.84);\n --lumo-tint-90pct: hsla(0, 0%, 100%, 0.9);\n --lumo-tint: #FFF;\n\n /* Shade */\n --lumo-shade-5pct: hsla(214, 61%, 25%, 0.05);\n --lumo-shade-10pct: hsla(214, 57%, 24%, 0.1);\n --lumo-shade-20pct: hsla(214, 53%, 23%, 0.16);\n --lumo-shade-30pct: hsla(214, 50%, 22%, 0.26);\n --lumo-shade-40pct: hsla(214, 47%, 21%, 0.38);\n --lumo-shade-50pct: hsla(214, 45%, 20%, 0.5);\n --lumo-shade-60pct: hsla(214, 43%, 19%, 0.61);\n --lumo-shade-70pct: hsla(214, 42%, 18%, 0.72);\n --lumo-shade-80pct: hsla(214, 41%, 17%, 0.83);\n --lumo-shade-90pct: hsla(214, 40%, 16%, 0.94);\n --lumo-shade: hsl(214, 35%, 15%);\n\n /* Contrast */\n --lumo-contrast-5pct: var(--lumo-shade-5pct);\n --lumo-contrast-10pct: var(--lumo-shade-10pct);\n --lumo-contrast-20pct: var(--lumo-shade-20pct);\n --lumo-contrast-30pct: var(--lumo-shade-30pct);\n --lumo-contrast-40pct: var(--lumo-shade-40pct);\n --lumo-contrast-50pct: var(--lumo-shade-50pct);\n --lumo-contrast-60pct: var(--lumo-shade-60pct);\n --lumo-contrast-70pct: var(--lumo-shade-70pct);\n --lumo-contrast-80pct: var(--lumo-shade-80pct);\n --lumo-contrast-90pct: var(--lumo-shade-90pct);\n --lumo-contrast: var(--lumo-shade);\n\n /* Text */\n --lumo-header-text-color: var(--lumo-contrast);\n --lumo-body-text-color: var(--lumo-contrast-90pct);\n --lumo-secondary-text-color: var(--lumo-contrast-70pct);\n --lumo-tertiary-text-color: var(--lumo-contrast-50pct);\n --lumo-disabled-text-color: var(--lumo-contrast-30pct);\n\n /* Primary */\n --lumo-primary-color: hsl(214, 90%, 52%);\n --lumo-primary-color-50pct: hsla(214, 90%, 52%, 0.5);\n --lumo-primary-color-10pct: hsla(214, 90%, 52%, 0.1);\n --lumo-primary-text-color: var(--lumo-primary-color);\n --lumo-primary-contrast-color: #FFF;\n\n /* Error */\n --lumo-error-color: hsl(3, 100%, 61%);\n --lumo-error-color-50pct: hsla(3, 100%, 60%, 0.5);\n --lumo-error-color-10pct: hsla(3, 100%, 60%, 0.1);\n --lumo-error-text-color: hsl(3, 92%, 53%);\n --lumo-error-contrast-color: #FFF;\n\n /* Success */\n --lumo-success-color: hsl(145, 80%, 42%); /* hsl(144,82%,37%); */\n --lumo-success-color-50pct: hsla(145, 76%, 44%, 0.55);\n --lumo-success-color-10pct: hsla(145, 76%, 44%, 0.12);\n --lumo-success-text-color: hsl(145, 100%, 32%);\n --lumo-success-contrast-color: #FFF;\n }\n </style>\n</custom-style><dom-module id="lumo-color">\n <template>\n <style>\n [theme~="dark"] {\n /* Base (background) */\n --lumo-base-color: hsl(214, 35%, 21%);\n\n /* Tint */\n --lumo-tint-5pct: hsla(214, 65%, 85%, 0.06);\n --lumo-tint-10pct: hsla(214, 60%, 80%, 0.14);\n --lumo-tint-20pct: hsla(214, 64%, 82%, 0.23);\n --lumo-tint-30pct: hsla(214, 69%, 84%, 0.32);\n --lumo-tint-40pct: hsla(214, 73%, 86%, 0.41);\n --lumo-tint-50pct: hsla(214, 78%, 88%, 0.5);\n --lumo-tint-60pct: hsla(214, 82%, 90%, 0.6);\n --lumo-tint-70pct: hsla(214, 87%, 92%, 0.7);\n --lumo-tint-80pct: hsla(214, 91%, 94%, 0.8);\n --lumo-tint-90pct: hsla(214, 96%, 96%, 0.9);\n --lumo-tint: hsl(214, 100%, 98%);\n\n /* Shade */\n --lumo-shade-5pct: hsla(214, 0%, 0%, 0.07);\n --lumo-shade-10pct: hsla(214, 4%, 2%, 0.15);\n --lumo-shade-20pct: hsla(214, 8%, 4%, 0.23);\n --lumo-shade-30pct: hsla(214, 12%, 6%, 0.32);\n --lumo-shade-40pct: hsla(214, 16%, 8%, 0.41);\n --lumo-shade-50pct: hsla(214, 20%, 10%, 0.5);\n --lumo-shade-60pct: hsla(214, 24%, 12%, 0.6);\n --lumo-shade-70pct: hsla(214, 28%, 13%, 0.7);\n --lumo-shade-80pct: hsla(214, 32%, 13%, 0.8);\n --lumo-shade-90pct: hsla(214, 33%, 13%, 0.9);\n --lumo-shade: hsl(214, 33%, 13%);\n\n /* Contrast */\n --lumo-contrast-5pct: var(--lumo-tint-5pct);\n --lumo-contrast-10pct: var(--lumo-tint-10pct);\n --lumo-contrast-20pct: var(--lumo-tint-20pct);\n --lumo-contrast-30pct: var(--lumo-tint-30pct);\n --lumo-contrast-40pct: var(--lumo-tint-40pct);\n --lumo-contrast-50pct: var(--lumo-tint-50pct);\n --lumo-contrast-60pct: var(--lumo-tint-60pct);\n --lumo-contrast-70pct: var(--lumo-tint-70pct);\n --lumo-contrast-80pct: var(--lumo-tint-80pct);\n --lumo-contrast-90pct: var(--lumo-tint-90pct);\n --lumo-contrast: var(--lumo-tint);\n\n /* Text */\n --lumo-header-text-color: var(--lumo-contrast);\n --lumo-body-text-color: var(--lumo-contrast-90pct);\n --lumo-secondary-text-color: var(--lumo-contrast-70pct);\n --lumo-tertiary-text-color: var(--lumo-contrast-50pct);\n --lumo-disabled-text-color: var(--lumo-contrast-30pct);\n\n /* Primary */\n --lumo-primary-color: hsl(214, 86%, 55%);\n --lumo-primary-color-50pct: hsla(214, 86%, 55%, 0.5);\n --lumo-primary-color-10pct: hsla(214, 90%, 63%, 0.1);\n --lumo-primary-text-color: hsl(214, 100%, 70%);\n --lumo-primary-contrast-color: #FFF;\n\n /* Error */\n --lumo-error-color: hsl(3, 90%, 63%);\n --lumo-error-color-50pct: hsla(3, 90%, 63%, 0.5);\n --lumo-error-color-10pct: hsla(3, 90%, 63%, 0.1);\n --lumo-error-text-color: hsl(3, 100%, 67%);\n\n /* Success */\n --lumo-success-color: hsl(145, 65%, 42%);\n --lumo-success-color-50pct: hsla(145, 65%, 42%, 0.5);\n --lumo-success-color-10pct: hsla(145, 65%, 42%, 0.1);\n --lumo-success-text-color: hsl(145, 85%, 47%);\n }\n\n html {\n color: var(--lumo-body-text-color);\n background-color: var(--lumo-base-color);\n }\n\n [theme~="dark"] {\n color: var(--lumo-body-text-color);\n background-color: var(--lumo-base-color);\n }\n\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n color: var(--lumo-header-text-color);\n }\n\n a {\n color: var(--lumo-primary-text-color);\n }\n\n blockquote {\n color: var(--lumo-secondary-text-color);\n }\n\n code,\n pre {\n background-color: var(--lumo-contrast-10pct);\n border-radius: var(--lumo-border-radius-m);\n }\n </style>\n </template>\n</dom-module><dom-module id="lumo-color-legacy">\n <template>\n <style include="lumo-color">\n :host {\n color: var(--lumo-body-text-color) !important;\n background-color: var(--lumo-base-color) !important;\n }\n </style>\n </template>\n</dom-module>',document.head.appendChild(s.content);const a=document.createElement("template");a.innerHTML="<custom-style>\n <style>\n html {\n --lumo-size-xs: 1.625rem;\n --lumo-size-s: 1.875rem;\n --lumo-size-m: 2.25rem;\n --lumo-size-l: 2.75rem;\n --lumo-size-xl: 3.5rem;\n\n /* Icons */\n --lumo-icon-size-s: 1.25em;\n --lumo-icon-size-m: 1.5em;\n --lumo-icon-size-l: 2.25em;\n /* For backwards compatibility */\n --lumo-icon-size: var(--lumo-icon-size-m);\n }\n </style>\n</custom-style>",document.head.appendChild(a.content);const r=document.createElement("template");r.innerHTML="<custom-style>\n <style>\n html {\n /* Square */\n --lumo-space-xs: 0.25rem;\n --lumo-space-s: 0.5rem;\n --lumo-space-m: 1rem;\n --lumo-space-l: 1.5rem;\n --lumo-space-xl: 2.5rem;\n\n /* Wide */\n --lumo-space-wide-xs: calc(var(--lumo-space-xs) / 2) var(--lumo-space-xs);\n --lumo-space-wide-s: calc(var(--lumo-space-s) / 2) var(--lumo-space-s);\n --lumo-space-wide-m: calc(var(--lumo-space-m) / 2) var(--lumo-space-m);\n --lumo-space-wide-l: calc(var(--lumo-space-l) / 2) var(--lumo-space-l);\n --lumo-space-wide-xl: calc(var(--lumo-space-xl) / 2) var(--lumo-space-xl);\n\n /* Tall */\n --lumo-space-tall-xs: var(--lumo-space-xs) calc(var(--lumo-space-xs) / 2);\n --lumo-space-tall-s: var(--lumo-space-s) calc(var(--lumo-space-s) / 2);\n --lumo-space-tall-m: var(--lumo-space-m) calc(var(--lumo-space-m) / 2);\n --lumo-space-tall-l: var(--lumo-space-l) calc(var(--lumo-space-l) / 2);\n --lumo-space-tall-xl: var(--lumo-space-xl) calc(var(--lumo-space-xl) / 2);\n }\n </style>\n</custom-style>",document.head.appendChild(r.content);const i=document.createElement("template");i.innerHTML="<custom-style>\n <style>\n html {\n /* Border radius */\n --lumo-border-radius-s: 0.25em; /* Checkbox, badge, date-picker year indicator, etc */\n --lumo-border-radius-m: var(--lumo-border-radius, 0.25em); /* Button, text field, menu overlay, etc */\n --lumo-border-radius-l: 0.5em; /* Dialog, notification, etc */\n --lumo-border-radius: 0.25em; /* Deprecated */\n\n /* Shadow */\n --lumo-box-shadow-xs: 0 1px 4px -1px var(--lumo-shade-50pct);\n --lumo-box-shadow-s: 0 2px 4px -1px var(--lumo-shade-20pct), 0 3px 12px -1px var(--lumo-shade-30pct);\n --lumo-box-shadow-m: 0 2px 6px -1px var(--lumo-shade-20pct), 0 8px 24px -4px var(--lumo-shade-40pct);\n --lumo-box-shadow-l: 0 3px 18px -2px var(--lumo-shade-20pct), 0 12px 48px -6px var(--lumo-shade-40pct);\n --lumo-box-shadow-xl: 0 4px 24px -3px var(--lumo-shade-20pct), 0 18px 64px -8px var(--lumo-shade-40pct);\n\n /* Clickable element cursor */\n --lumo-clickable-cursor: default;\n }\n </style>\n</custom-style>",document.head.appendChild(i.content);const c=document.createElement("template");c.innerHTML='<custom-style>\n <style>\n html {\n /* Font families */\n --lumo-font-family: -apple-system, BlinkMacSystemFont, "Roboto", "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";\n\n /* Font sizes */\n --lumo-font-size-xxs: .75rem;\n --lumo-font-size-xs: .8125rem;\n --lumo-font-size-s: .875rem;\n --lumo-font-size-m: 1rem;\n --lumo-font-size-l: 1.125rem;\n --lumo-font-size-xl: 1.375rem;\n --lumo-font-size-xxl: 1.75rem;\n --lumo-font-size-xxxl: 2.5rem;\n\n /* Line heights */\n --lumo-line-height-xs: 1.25;\n --lumo-line-height-s: 1.375;\n --lumo-line-height-m: 1.625;\n }\n\n </style>\n</custom-style><dom-module id="lumo-typography">\n <template>\n <style>\n html {\n font-family: var(--lumo-font-family);\n font-size: var(--lumo-font-size, var(--lumo-font-size-m));\n line-height: var(--lumo-line-height-m);\n -webkit-text-size-adjust: 100%;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n\n /* Can’t combine with the above selector because that doesn’t work in browsers without native shadow dom */\n :host {\n font-family: var(--lumo-font-family);\n font-size: var(--lumo-font-size, var(--lumo-font-size-m));\n line-height: var(--lumo-line-height-m);\n -webkit-text-size-adjust: 100%;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n\n small,\n [theme~="font-size-s"] {\n font-size: var(--lumo-font-size-s);\n line-height: var(--lumo-line-height-s);\n }\n\n [theme~="font-size-xs"] {\n font-size: var(--lumo-font-size-xs);\n line-height: var(--lumo-line-height-xs);\n }\n\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n font-weight: 600;\n line-height: var(--lumo-line-height-xs);\n margin-top: 1.25em;\n }\n\n h1 {\n font-size: var(--lumo-font-size-xxxl);\n margin-bottom: 0.75em;\n }\n\n h2 {\n font-size: var(--lumo-font-size-xxl);\n margin-bottom: 0.5em;\n }\n\n h3 {\n font-size: var(--lumo-font-size-xl);\n margin-bottom: 0.5em;\n }\n\n h4 {\n font-size: var(--lumo-font-size-l);\n margin-bottom: 0.5em;\n }\n\n h5 {\n font-size: var(--lumo-font-size-m);\n margin-bottom: 0.25em;\n }\n\n h6 {\n font-size: var(--lumo-font-size-xs);\n margin-bottom: 0;\n text-transform: uppercase;\n letter-spacing: 0.03em;\n }\n\n p,\n blockquote {\n margin-top: 0.5em;\n margin-bottom: 0.75em;\n }\n\n a {\n text-decoration: none;\n }\n\n a:hover {\n text-decoration: underline;\n }\n\n hr {\n display: block;\n align-self: stretch;\n height: 1px;\n border: 0;\n padding: 0;\n margin: var(--lumo-space-s) calc(var(--lumo-border-radius-m) / 2);\n background-color: var(--lumo-contrast-10pct);\n }\n\n blockquote {\n border-left: 2px solid var(--lumo-contrast-30pct);\n }\n\n b,\n strong {\n font-weight: 600;\n }\n\n /* RTL specific styles */\n\n blockquote[dir="rtl"] {\n border-left: none;\n border-right: 2px solid var(--lumo-contrast-30pct);\n }\n\n </style>\n </template>\n</dom-module>',document.head.appendChild(c.content);
|
|
1
|
+
import{D as t,i as e,e as n}from"./shared-91b86bae.js";import{D as o}from"./shared-f31044b8.js";class l extends HTMLElement{static get version(){return"1.6.1"}}customElements.define("vaadin-lumo-styles",l);const s=document.createElement("template");s.innerHTML='<custom-style>\n <style>\n html {\n /* Base (background) */\n --lumo-base-color: #FFF;\n\n /* Tint */\n --lumo-tint-5pct: hsla(0, 0%, 100%, 0.3);\n --lumo-tint-10pct: hsla(0, 0%, 100%, 0.37);\n --lumo-tint-20pct: hsla(0, 0%, 100%, 0.44);\n --lumo-tint-30pct: hsla(0, 0%, 100%, 0.5);\n --lumo-tint-40pct: hsla(0, 0%, 100%, 0.57);\n --lumo-tint-50pct: hsla(0, 0%, 100%, 0.64);\n --lumo-tint-60pct: hsla(0, 0%, 100%, 0.7);\n --lumo-tint-70pct: hsla(0, 0%, 100%, 0.77);\n --lumo-tint-80pct: hsla(0, 0%, 100%, 0.84);\n --lumo-tint-90pct: hsla(0, 0%, 100%, 0.9);\n --lumo-tint: #FFF;\n\n /* Shade */\n --lumo-shade-5pct: hsla(214, 61%, 25%, 0.05);\n --lumo-shade-10pct: hsla(214, 57%, 24%, 0.1);\n --lumo-shade-20pct: hsla(214, 53%, 23%, 0.16);\n --lumo-shade-30pct: hsla(214, 50%, 22%, 0.26);\n --lumo-shade-40pct: hsla(214, 47%, 21%, 0.38);\n --lumo-shade-50pct: hsla(214, 45%, 20%, 0.5);\n --lumo-shade-60pct: hsla(214, 43%, 19%, 0.61);\n --lumo-shade-70pct: hsla(214, 42%, 18%, 0.72);\n --lumo-shade-80pct: hsla(214, 41%, 17%, 0.83);\n --lumo-shade-90pct: hsla(214, 40%, 16%, 0.94);\n --lumo-shade: hsl(214, 35%, 15%);\n\n /* Contrast */\n --lumo-contrast-5pct: var(--lumo-shade-5pct);\n --lumo-contrast-10pct: var(--lumo-shade-10pct);\n --lumo-contrast-20pct: var(--lumo-shade-20pct);\n --lumo-contrast-30pct: var(--lumo-shade-30pct);\n --lumo-contrast-40pct: var(--lumo-shade-40pct);\n --lumo-contrast-50pct: var(--lumo-shade-50pct);\n --lumo-contrast-60pct: var(--lumo-shade-60pct);\n --lumo-contrast-70pct: var(--lumo-shade-70pct);\n --lumo-contrast-80pct: var(--lumo-shade-80pct);\n --lumo-contrast-90pct: var(--lumo-shade-90pct);\n --lumo-contrast: var(--lumo-shade);\n\n /* Text */\n --lumo-header-text-color: var(--lumo-contrast);\n --lumo-body-text-color: var(--lumo-contrast-90pct);\n --lumo-secondary-text-color: var(--lumo-contrast-70pct);\n --lumo-tertiary-text-color: var(--lumo-contrast-50pct);\n --lumo-disabled-text-color: var(--lumo-contrast-30pct);\n\n /* Primary */\n --lumo-primary-color: hsl(214, 90%, 52%);\n --lumo-primary-color-50pct: hsla(214, 90%, 52%, 0.5);\n --lumo-primary-color-10pct: hsla(214, 90%, 52%, 0.1);\n --lumo-primary-text-color: var(--lumo-primary-color);\n --lumo-primary-contrast-color: #FFF;\n\n /* Error */\n --lumo-error-color: hsl(3, 100%, 61%);\n --lumo-error-color-50pct: hsla(3, 100%, 60%, 0.5);\n --lumo-error-color-10pct: hsla(3, 100%, 60%, 0.1);\n --lumo-error-text-color: hsl(3, 92%, 53%);\n --lumo-error-contrast-color: #FFF;\n\n /* Success */\n --lumo-success-color: hsl(145, 80%, 42%); /* hsl(144,82%,37%); */\n --lumo-success-color-50pct: hsla(145, 76%, 44%, 0.55);\n --lumo-success-color-10pct: hsla(145, 76%, 44%, 0.12);\n --lumo-success-text-color: hsl(145, 100%, 32%);\n --lumo-success-contrast-color: #FFF;\n }\n </style>\n</custom-style><dom-module id="lumo-color">\n <template>\n <style>\n [theme~="dark"] {\n /* Base (background) */\n --lumo-base-color: hsl(214, 35%, 21%);\n\n /* Tint */\n --lumo-tint-5pct: hsla(214, 65%, 85%, 0.06);\n --lumo-tint-10pct: hsla(214, 60%, 80%, 0.14);\n --lumo-tint-20pct: hsla(214, 64%, 82%, 0.23);\n --lumo-tint-30pct: hsla(214, 69%, 84%, 0.32);\n --lumo-tint-40pct: hsla(214, 73%, 86%, 0.41);\n --lumo-tint-50pct: hsla(214, 78%, 88%, 0.5);\n --lumo-tint-60pct: hsla(214, 82%, 90%, 0.6);\n --lumo-tint-70pct: hsla(214, 87%, 92%, 0.7);\n --lumo-tint-80pct: hsla(214, 91%, 94%, 0.8);\n --lumo-tint-90pct: hsla(214, 96%, 96%, 0.9);\n --lumo-tint: hsl(214, 100%, 98%);\n\n /* Shade */\n --lumo-shade-5pct: hsla(214, 0%, 0%, 0.07);\n --lumo-shade-10pct: hsla(214, 4%, 2%, 0.15);\n --lumo-shade-20pct: hsla(214, 8%, 4%, 0.23);\n --lumo-shade-30pct: hsla(214, 12%, 6%, 0.32);\n --lumo-shade-40pct: hsla(214, 16%, 8%, 0.41);\n --lumo-shade-50pct: hsla(214, 20%, 10%, 0.5);\n --lumo-shade-60pct: hsla(214, 24%, 12%, 0.6);\n --lumo-shade-70pct: hsla(214, 28%, 13%, 0.7);\n --lumo-shade-80pct: hsla(214, 32%, 13%, 0.8);\n --lumo-shade-90pct: hsla(214, 33%, 13%, 0.9);\n --lumo-shade: hsl(214, 33%, 13%);\n\n /* Contrast */\n --lumo-contrast-5pct: var(--lumo-tint-5pct);\n --lumo-contrast-10pct: var(--lumo-tint-10pct);\n --lumo-contrast-20pct: var(--lumo-tint-20pct);\n --lumo-contrast-30pct: var(--lumo-tint-30pct);\n --lumo-contrast-40pct: var(--lumo-tint-40pct);\n --lumo-contrast-50pct: var(--lumo-tint-50pct);\n --lumo-contrast-60pct: var(--lumo-tint-60pct);\n --lumo-contrast-70pct: var(--lumo-tint-70pct);\n --lumo-contrast-80pct: var(--lumo-tint-80pct);\n --lumo-contrast-90pct: var(--lumo-tint-90pct);\n --lumo-contrast: var(--lumo-tint);\n\n /* Text */\n --lumo-header-text-color: var(--lumo-contrast);\n --lumo-body-text-color: var(--lumo-contrast-90pct);\n --lumo-secondary-text-color: var(--lumo-contrast-70pct);\n --lumo-tertiary-text-color: var(--lumo-contrast-50pct);\n --lumo-disabled-text-color: var(--lumo-contrast-30pct);\n\n /* Primary */\n --lumo-primary-color: hsl(214, 86%, 55%);\n --lumo-primary-color-50pct: hsla(214, 86%, 55%, 0.5);\n --lumo-primary-color-10pct: hsla(214, 90%, 63%, 0.1);\n --lumo-primary-text-color: hsl(214, 100%, 70%);\n --lumo-primary-contrast-color: #FFF;\n\n /* Error */\n --lumo-error-color: hsl(3, 90%, 63%);\n --lumo-error-color-50pct: hsla(3, 90%, 63%, 0.5);\n --lumo-error-color-10pct: hsla(3, 90%, 63%, 0.1);\n --lumo-error-text-color: hsl(3, 100%, 67%);\n\n /* Success */\n --lumo-success-color: hsl(145, 65%, 42%);\n --lumo-success-color-50pct: hsla(145, 65%, 42%, 0.5);\n --lumo-success-color-10pct: hsla(145, 65%, 42%, 0.1);\n --lumo-success-text-color: hsl(145, 85%, 47%);\n }\n\n html {\n color: var(--lumo-body-text-color);\n background-color: var(--lumo-base-color);\n }\n\n [theme~="dark"] {\n color: var(--lumo-body-text-color);\n background-color: var(--lumo-base-color);\n }\n\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n color: var(--lumo-header-text-color);\n }\n\n a {\n color: var(--lumo-primary-text-color);\n }\n\n blockquote {\n color: var(--lumo-secondary-text-color);\n }\n\n code,\n pre {\n background-color: var(--lumo-contrast-10pct);\n border-radius: var(--lumo-border-radius-m);\n }\n </style>\n </template>\n</dom-module><dom-module id="lumo-color-legacy">\n <template>\n <style include="lumo-color">\n :host {\n color: var(--lumo-body-text-color) !important;\n background-color: var(--lumo-base-color) !important;\n }\n </style>\n </template>\n</dom-module>',document.head.appendChild(s.content);const a=document.createElement("template");a.innerHTML="<custom-style>\n <style>\n html {\n --lumo-size-xs: 1.625rem;\n --lumo-size-s: 1.875rem;\n --lumo-size-m: 2.25rem;\n --lumo-size-l: 2.75rem;\n --lumo-size-xl: 3.5rem;\n\n /* Icons */\n --lumo-icon-size-s: 1.25em;\n --lumo-icon-size-m: 1.5em;\n --lumo-icon-size-l: 2.25em;\n /* For backwards compatibility */\n --lumo-icon-size: var(--lumo-icon-size-m);\n }\n </style>\n</custom-style>",document.head.appendChild(a.content);const r=document.createElement("template");r.innerHTML="<custom-style>\n <style>\n html {\n /* Square */\n --lumo-space-xs: 0.25rem;\n --lumo-space-s: 0.5rem;\n --lumo-space-m: 1rem;\n --lumo-space-l: 1.5rem;\n --lumo-space-xl: 2.5rem;\n\n /* Wide */\n --lumo-space-wide-xs: calc(var(--lumo-space-xs) / 2) var(--lumo-space-xs);\n --lumo-space-wide-s: calc(var(--lumo-space-s) / 2) var(--lumo-space-s);\n --lumo-space-wide-m: calc(var(--lumo-space-m) / 2) var(--lumo-space-m);\n --lumo-space-wide-l: calc(var(--lumo-space-l) / 2) var(--lumo-space-l);\n --lumo-space-wide-xl: calc(var(--lumo-space-xl) / 2) var(--lumo-space-xl);\n\n /* Tall */\n --lumo-space-tall-xs: var(--lumo-space-xs) calc(var(--lumo-space-xs) / 2);\n --lumo-space-tall-s: var(--lumo-space-s) calc(var(--lumo-space-s) / 2);\n --lumo-space-tall-m: var(--lumo-space-m) calc(var(--lumo-space-m) / 2);\n --lumo-space-tall-l: var(--lumo-space-l) calc(var(--lumo-space-l) / 2);\n --lumo-space-tall-xl: var(--lumo-space-xl) calc(var(--lumo-space-xl) / 2);\n }\n </style>\n</custom-style>",document.head.appendChild(r.content);const i=document.createElement("template");i.innerHTML="<custom-style>\n <style>\n html {\n /* Border radius */\n --lumo-border-radius-s: 0.25em; /* Checkbox, badge, date-picker year indicator, etc */\n --lumo-border-radius-m: var(--lumo-border-radius, 0.25em); /* Button, text field, menu overlay, etc */\n --lumo-border-radius-l: 0.5em; /* Dialog, notification, etc */\n --lumo-border-radius: 0.25em; /* Deprecated */\n\n /* Shadow */\n --lumo-box-shadow-xs: 0 1px 4px -1px var(--lumo-shade-50pct);\n --lumo-box-shadow-s: 0 2px 4px -1px var(--lumo-shade-20pct), 0 3px 12px -1px var(--lumo-shade-30pct);\n --lumo-box-shadow-m: 0 2px 6px -1px var(--lumo-shade-20pct), 0 8px 24px -4px var(--lumo-shade-40pct);\n --lumo-box-shadow-l: 0 3px 18px -2px var(--lumo-shade-20pct), 0 12px 48px -6px var(--lumo-shade-40pct);\n --lumo-box-shadow-xl: 0 4px 24px -3px var(--lumo-shade-20pct), 0 18px 64px -8px var(--lumo-shade-40pct);\n\n /* Clickable element cursor */\n --lumo-clickable-cursor: default;\n }\n </style>\n</custom-style>",document.head.appendChild(i.content);const c=document.createElement("template");c.innerHTML='<custom-style>\n <style>\n html {\n /* Font families */\n --lumo-font-family: -apple-system, BlinkMacSystemFont, "Roboto", "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";\n\n /* Font sizes */\n --lumo-font-size-xxs: .75rem;\n --lumo-font-size-xs: .8125rem;\n --lumo-font-size-s: .875rem;\n --lumo-font-size-m: 1rem;\n --lumo-font-size-l: 1.125rem;\n --lumo-font-size-xl: 1.375rem;\n --lumo-font-size-xxl: 1.75rem;\n --lumo-font-size-xxxl: 2.5rem;\n\n /* Line heights */\n --lumo-line-height-xs: 1.25;\n --lumo-line-height-s: 1.375;\n --lumo-line-height-m: 1.625;\n }\n\n </style>\n</custom-style><dom-module id="lumo-typography">\n <template>\n <style>\n html {\n font-family: var(--lumo-font-family);\n font-size: var(--lumo-font-size, var(--lumo-font-size-m));\n line-height: var(--lumo-line-height-m);\n -webkit-text-size-adjust: 100%;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n\n /* Can’t combine with the above selector because that doesn’t work in browsers without native shadow dom */\n :host {\n font-family: var(--lumo-font-family);\n font-size: var(--lumo-font-size, var(--lumo-font-size-m));\n line-height: var(--lumo-line-height-m);\n -webkit-text-size-adjust: 100%;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n\n small,\n [theme~="font-size-s"] {\n font-size: var(--lumo-font-size-s);\n line-height: var(--lumo-line-height-s);\n }\n\n [theme~="font-size-xs"] {\n font-size: var(--lumo-font-size-xs);\n line-height: var(--lumo-line-height-xs);\n }\n\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n font-weight: 600;\n line-height: var(--lumo-line-height-xs);\n margin-top: 1.25em;\n }\n\n h1 {\n font-size: var(--lumo-font-size-xxxl);\n margin-bottom: 0.75em;\n }\n\n h2 {\n font-size: var(--lumo-font-size-xxl);\n margin-bottom: 0.5em;\n }\n\n h3 {\n font-size: var(--lumo-font-size-xl);\n margin-bottom: 0.5em;\n }\n\n h4 {\n font-size: var(--lumo-font-size-l);\n margin-bottom: 0.5em;\n }\n\n h5 {\n font-size: var(--lumo-font-size-m);\n margin-bottom: 0.25em;\n }\n\n h6 {\n font-size: var(--lumo-font-size-xs);\n margin-bottom: 0;\n text-transform: uppercase;\n letter-spacing: 0.03em;\n }\n\n p,\n blockquote {\n margin-top: 0.5em;\n margin-bottom: 0.75em;\n }\n\n a {\n text-decoration: none;\n }\n\n a:hover {\n text-decoration: underline;\n }\n\n hr {\n display: block;\n align-self: stretch;\n height: 1px;\n border: 0;\n padding: 0;\n margin: var(--lumo-space-s) calc(var(--lumo-border-radius-m) / 2);\n background-color: var(--lumo-contrast-10pct);\n }\n\n blockquote {\n border-left: 2px solid var(--lumo-contrast-30pct);\n }\n\n b,\n strong {\n font-weight: 600;\n }\n\n /* RTL specific styles */\n\n blockquote[dir="rtl"] {\n border-left: none;\n border-right: 2px solid var(--lumo-contrast-30pct);\n }\n\n </style>\n </template>\n</dom-module>',document.head.appendChild(c.content);
|
|
2
2
|
/**
|
|
3
3
|
@license
|
|
4
4
|
Copyright (c) 2017 Vaadin Ltd.
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import{I as e,_ as t}from"./shared-ca0f14c1.js";import{F as s}from"./shared-3e3c07ac.js";import{E as a,T as i}from"./shared-084b6372.js";import"./shared-4560425c.js";import"./shared-901ca702.js";import"./shared-c7280a24.js";import"./shared-fe68657a.js";import"./shared-23fd456c.js";import{d as r,P as n,A as o,L as l,c as d,h}from"./shared-dc73b9a5.js";import{h as u,P as c}from"./shared-91b86bae.js";import"./shared-c63ba384.js";import{p as m}from"./shared-2f0efb2c.js";import{a as p,y as v}from"./shared-f31044b8.js";import{T as g,U as b,V as _,W as y,X as f,Y as x,Z as w,$ as E,b as T,a0 as $,a1 as A,a2 as S,a3 as k,a4 as V,a5 as C,a6 as I,m as M,a7 as j}from"./shared-3a7cf739.js";import{s as z}from"./shared-99940888.js";import{i as q}from"./shared-4c0520f6.js";var L={raise:g,send:b,sendParent:_,sendUpdate:y,log:f,cancel:x,start:w,stop:E,assign:T,after:$,done:A,respond:S,forwardTo:k,escalate:V,choose:C,pure:I};const F=r((e=>t=>{const{element:s,name:a,strings:i}=t.committer;if(2!==i.length||""!==i[0]||""!==i[1])throw new Error("live directive bindings must not contain any static values");if(t.committer.parts.length>1)throw new Error("live directive must be the only directive for an attribute or property");if(t instanceof n)s[a]!==e&&t.setValue(e);else{if(!(t instanceof o))throw new Error("live directive can only be used on attributes or properties");s.getAttribute(a)!==e&&t.setValue(e)}}));class O extends CustomEvent{constructor(e){super("change",{detail:e})}}const P=u`<dom-module id="lumo-custom-field" theme-for="vaadin-custom-field">
|
|
2
|
+
<template>
|
|
3
|
+
<style include="lumo-required-field">
|
|
4
|
+
:host {
|
|
5
|
+
--lumo-text-field-size: var(--lumo-size-m);
|
|
6
|
+
color: var(--lumo-body-text-color);
|
|
7
|
+
font-size: var(--lumo-font-size-m);
|
|
8
|
+
/* align with text-field height + vertical paddings */
|
|
9
|
+
line-height: calc(var(--lumo-text-field-size) + 2 * var(--lumo-space-xs));
|
|
10
|
+
font-family: var(--lumo-font-family);
|
|
11
|
+
-webkit-font-smoothing: antialiased;
|
|
12
|
+
-moz-osx-font-smoothing: grayscale;
|
|
13
|
+
-webkit-tap-highlight-color: transparent;
|
|
14
|
+
padding: 0;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
:host::before {
|
|
18
|
+
margin-top: var(--lumo-space-xs);
|
|
19
|
+
height: var(--lumo-text-field-size);
|
|
20
|
+
box-sizing: border-box;
|
|
21
|
+
display: inline-flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/* align with text-field label */
|
|
26
|
+
:host([has-label]) [part="label"] {
|
|
27
|
+
padding-bottom: calc(0.5em - var(--lumo-space-xs));
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
:host(:not([has-label])) [part="label"],
|
|
31
|
+
:host(:not([has-label]))::before {
|
|
32
|
+
display: none;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/* align with text-field error message */
|
|
36
|
+
:host([invalid]) [part="error-message"]:not(:empty)::before {
|
|
37
|
+
height: calc(0.4em - var(--lumo-space-xs));
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
:host([focused]:not([readonly]):not([disabled])) [part="label"] {
|
|
41
|
+
color: var(--lumo-primary-text-color);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
:host(:hover:not([readonly]):not([disabled]):not([focused])) [part="label"],
|
|
45
|
+
:host(:hover:not([readonly]):not([disabled]):not([focused])) [part="helper-text"],
|
|
46
|
+
:host(:hover:not([readonly]):not([disabled]):not([focused])) [part="helper-text"] ::slotted(*) {
|
|
47
|
+
color: var(--lumo-body-text-color);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
:host([has-helper]) [part="helper-text"]::before {
|
|
51
|
+
content: "";
|
|
52
|
+
display: block;
|
|
53
|
+
height: 0.4em;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
[part="helper-text"],
|
|
57
|
+
[part="helper-text"] ::slotted(*) {
|
|
58
|
+
display: block;
|
|
59
|
+
color: var(--lumo-secondary-text-color);
|
|
60
|
+
font-size: var(--lumo-font-size-xs);
|
|
61
|
+
line-height: var(--lumo-line-height-xs);
|
|
62
|
+
margin-left: calc(var(--lumo-border-radius-m) / 4);
|
|
63
|
+
transition: color 0.2s;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/* helper-text position */
|
|
67
|
+
|
|
68
|
+
:host([has-helper][theme~="helper-above-field"]) [part="helper-text"]::before {
|
|
69
|
+
display: none;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
:host([has-helper][theme~="helper-above-field"]) [part="helper-text"]::after {
|
|
73
|
+
content: "";
|
|
74
|
+
display: block;
|
|
75
|
+
height: 0.4em;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
:host([has-helper][theme~="helper-above-field"]) [part="label"] {
|
|
79
|
+
order: 0;
|
|
80
|
+
padding-bottom: 0.4em;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
:host([has-helper][theme~="helper-above-field"]) [part="helper-text"] {
|
|
84
|
+
order: 1;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
:host([has-helper][theme~="helper-above-field"]) .inputs-wrapper {
|
|
88
|
+
order: 2;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
:host([has-helper][theme~="helper-above-field"]) [part="error-message"] {
|
|
92
|
+
order: 3;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/* Touch device adjustment */
|
|
96
|
+
@media (pointer: coarse) {
|
|
97
|
+
:host(:hover:not([readonly]):not([disabled]):not([focused])) [part="label"] {
|
|
98
|
+
color: var(--lumo-secondary-text-color);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/* Disabled style */
|
|
103
|
+
|
|
104
|
+
:host([disabled]) [part="label"] {
|
|
105
|
+
color: var(--lumo-disabled-text-color);
|
|
106
|
+
-webkit-text-fill-color: var(--lumo-disabled-text-color);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/* Small theme */
|
|
110
|
+
|
|
111
|
+
:host([theme~="small"]) {
|
|
112
|
+
font-size: var(--lumo-font-size-s);
|
|
113
|
+
--lumo-text-field-size: var(--lumo-size-s);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
:host([theme~="small"][has-label]) [part="label"] {
|
|
117
|
+
font-size: var(--lumo-font-size-xs);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
:host([theme~="small"][has-label]) [part="error-message"] {
|
|
121
|
+
font-size: var(--lumo-font-size-xxs);
|
|
122
|
+
}
|
|
123
|
+
</style>
|
|
124
|
+
</template>
|
|
125
|
+
</dom-module>`;document.head.appendChild(P.content);const D=e=>class extends e{static get properties(){return{inputs:{type:Array,readOnly:!0},i18n:{type:Object,value:()=>({parseValue:function(e){return e.split("\t")},formatValue:function(e){return e.join("\t")}})},__errorId:String,__labelId:String,__helperTextId:String,__hasSlottedHelper:Boolean}}connectedCallback(){super.connectedCallback(),this.__observer&&this.__observer.connect()}disconnectedCallback(){super.disconnectedCallback(),this.__observer&&this.__observer.disconnect()}ready(){super.ready(),this.__setInputsFromSlot(),this.__observer=new s(this.$.slot,(()=>{this.__setInputsFromSlot()})),this.$.helperSlot.addEventListener("slotchange",this.__onHelperSlotChange.bind(this)),this.__onHelperSlotChange();const e=/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor);this.addEventListener("keydown",(t=>{if(9===t.keyCode){if("slot"===t.target.parentElement.localName&&!t.defaultPrevented&&e){const e=t.target.parentElement;e.setAttribute("tabindex",-1),setTimeout((()=>e.removeAttribute("tabindex")))}this.inputs.indexOf(t.target)<this.inputs.length-1&&!t.shiftKey||this.inputs.indexOf(t.target)>0&&t.shiftKey?this.dispatchEvent(new CustomEvent("internal-tab")):this.__setValue()}})),this.addEventListener("focusin",(()=>this.setAttribute("focused",""))),this.addEventListener("focusout",(e=>{const t=this.getRootNode().activeElement;this.inputs.some((e=>t===e||e.shadowRoot&&e.shadowRoot.contains(t)))||this.removeAttribute("focused")}));var t=D._uniqueId=1+D._uniqueId||1;this.__errorId=`${this.constructor.is}-error-${t}`,this.__labelId=`${this.constructor.is}-label-${t}`,this.__helperTextId=`${this.constructor.is}-helper-${t}`}focus(){this.inputs&&this.inputs[0]&&this.inputs[0].focus()}__updateValue(e){e&&e.stopPropagation(),this.__setValue(),this.validate(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0,cancelable:!1,detail:{value:this.value}}))}__setValue(){this.__settingValue=!0,this.value=this.i18n.formatValue.apply(this,[this.inputs.map((e=>e.value))]),this.__settingValue=!1}__queryAllAssignedElements(e){const t=[];let s;return"SLOT"===e.tagName?s=e.assignedNodes({flatten:!0}).filter((e=>e.nodeType===Node.ELEMENT_NODE)):(t.push(e),s=Array.from(e.children)),s.forEach((e=>t.push(...this.__queryAllAssignedElements(e)))),t}__getInputsFromSlot(){return this.__queryAllAssignedElements(this.$.slot).filter((e=>e.validate||e.checkValidity))}__setInputsFromSlot(){this._setInputs(this.__getInputsFromSlot()),this.__setValue()}__valueChanged(e,t){if(this.__settingValue||!this.inputs)return;const s=this.i18n.parseValue(e);s&&0!=s.length?(this.inputs.forEach(((e,t)=>e.value=s[t])),void 0!==t&&this.validate()):console.warn("Value parser has not provided values array")}__onHelperSlotChange(){const e=this.$.helperSlot.assignedNodes({flatten:!0});this.__hasSlottedHelper=e.filter((e=>3!==e.nodeType)).length>0,this.__hasSlottedHelper?this.setAttribute("has-helper","slotted"):""!==this.helperText&&null!==this.helperText||this.removeAttribute("has-helper")}}
|
|
126
|
+
/**
|
|
127
|
+
@license
|
|
128
|
+
Copyright (c) 2018 Vaadin Ltd.
|
|
129
|
+
This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
130
|
+
*/;class N extends(a(D(i(c)))){static get template(){return u`
|
|
131
|
+
<style>
|
|
132
|
+
:host {
|
|
133
|
+
display: inline-flex;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
:host::before {
|
|
137
|
+
content: "\\2003";
|
|
138
|
+
width: 0;
|
|
139
|
+
display: inline-block;
|
|
140
|
+
/* Size and position this element on the same vertical position as the input-field element
|
|
141
|
+
to make vertical align for the host element work as expected */
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
:host([hidden]) {
|
|
145
|
+
display: none !important;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.container {
|
|
149
|
+
width: 100%;
|
|
150
|
+
display: flex;
|
|
151
|
+
flex-direction: column;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.inputs-wrapper {
|
|
155
|
+
flex: none;
|
|
156
|
+
}
|
|
157
|
+
</style>
|
|
158
|
+
|
|
159
|
+
<div class="container">
|
|
160
|
+
<label part="label" on-click="focus" id="[[__labelId]]">[[label]]</label>
|
|
161
|
+
<div class="inputs-wrapper" on-change="__updateValue">
|
|
162
|
+
<slot id="slot"></slot>
|
|
163
|
+
</div>
|
|
164
|
+
<div part="helper-text" id="[[__helperTextId]]">
|
|
165
|
+
<slot name="helper" id="helperSlot">[[helperText]]</slot>
|
|
166
|
+
</div>
|
|
167
|
+
<div part="error-message" id="[[__errorId]]" aria-live="assertive" aria-hidden\$="[[__getErrorMessageAriaHidden(invalid, errorMessage, __errorId)]]">[[errorMessage]]</div>
|
|
168
|
+
</div>
|
|
169
|
+
`}static get is(){return"vaadin-custom-field"}static get version(){return"1.3.0"}static get properties(){return{label:{type:String,value:"",observer:"_labelChanged"},name:String,required:{type:Boolean,reflectToAttribute:!0},value:{type:String,observer:"__valueChanged",notify:!0},invalid:{type:Boolean,reflectToAttribute:!0,notify:!0,value:!1,observer:"__invalidChanged"},errorMessage:{type:String,value:"",observer:"__errorMessageChanged"},helperText:{type:String,value:"",observer:"__helperTextChanged"}}}static get observers(){return["__getActiveErrorId(invalid, errorMessage, __errorId, helperText, __helperTextId, __hasSlottedHelper)","__getActiveLabelId(label, __labelId)","__toggleHasValue(value)"]}__invalidChanged(e){this.__setOrToggleAttribute("aria-invalid",e,this)}__errorMessageChanged(e){this.__setOrToggleAttribute("has-error-message",!!e,this)}__helperTextChanged(e){this.__setOrToggleAttribute("has-helper",!!e,this)}__toggleHasValue(e){null!==e&&""!==e.trim()?this.setAttribute("has-value",""):this.removeAttribute("has-value")}_labelChanged(e){""!==e&&null!=e?this.setAttribute("has-label",""):this.removeAttribute("has-label")}validate(){return!(this.invalid=!this.checkValidity())}checkValidity(){return!(this.inputs.filter((e=>!(e.validate||e.checkValidity).call(e))).length||this.required&&!this.value.trim())}__setOrToggleAttribute(e,t,s){e&&s&&s.hasAttribute(e)===!t&&(t?s.setAttribute(e,"boolean"==typeof t?"":t):s.removeAttribute(e))}__getActiveErrorId(e,t,s,a,i,r){const n=[];(a||r)&&n.push(i),t&&e&&n.push(s),n.length>0?this.setAttribute("aria-describedby",n.join(" ")):this.removeAttribute("aria-describedby")}__getActiveLabelId(e,t){this.__setOrToggleAttribute("aria-labelledby",e?t:void 0,this)}__getErrorMessageAriaHidden(e,t,s){return(!(t&&e?s:void 0)).toString()}}customElements.define(N.is,N);class U extends CustomEvent{constructor(e){super("change",{detail:e})}}class H extends U{}let B,R,Y=e=>e;class X extends(p(e(l))){constructor(){super(...arguments),this.label="",this.value="",this.disabled=!1,this.readonly=!1,this.errorMessage="",this.__i18n={formatValue:e=>e.join(""),parseValue:e=>{const{count:t,units:s}=m(e);return[t.toString(),s]}},this.__getItems=M((e=>{const t=m(e).count;return[{value:"d",label:this.t("day",{count:t})},{value:"w",label:this.t("week",{count:t})},{value:"m",label:this.t("month",{count:t})},{value:"y",label:this.t("year",{count:t})}]}))}static get properties(){return t(t({},super.properties),{},{checkValidity:{attribute:!1},errorMessage:{type:String,attribute:"error-message"},disabled:{type:Boolean,reflect:!0},readonly:{type:Boolean,reflect:!0},label:{type:String},value:{type:String}})}static get styles(){return d(B||(B=Y`:host{display:block}vaadin-custom-field{width:100%;font-size:0;line-height:0;padding-top:0!important}vaadin-custom-field::part(label){padding-bottom:var(--lumo-space-s)}vaadin-custom-field::part(error-message)[aria-hidden=false]{padding-top:var(--lumo-space-xs)}vaadin-combo-box,vaadin-integer-field{width:calc(50% - (var(--lumo-space-s)/ 2))}vaadin-integer-field{margin-right:var(--lumo-space-s);padding:0}vaadin-combo-box::part(text-field){padding:0}`))}render(){return h(R||(R=Y` <vaadin-custom-field data-testid="field" .i18n="${0}" .label="${0}" .value="${0}" ?disabled="${0}" ?readonly="${0}" .errorMessage="${0}" .checkValidity="${0}" @change="${0}"> <vaadin-integer-field data-testid="value" min="1" max="999" has-controls prevent-invalid-input ?invalid="${0}" ?disabled="${0}" ?readonly="${0}"> </vaadin-integer-field> <vaadin-combo-box data-testid="units" item-value-path="value" item-label-path="label" .items="${0}" ?invalid="${0}" ?disabled="${0}" ?readonly="${0}"> </vaadin-combo-box> </vaadin-custom-field> `),this.__i18n,this.label,F(this.value),this.disabled,this.readonly,this.errorMessage,this.checkValidity,this.__handleChange,!this.checkValidity(),this.disabled,this.readonly,this.__getItems(this.value),!this.checkValidity(),this.disabled,this.readonly)}updated(e){super.updated(e);const t=this.renderRoot.firstElementChild;t.value!==this.value&&(t.value=this.value)}checkValidity(){return!0}__handleChange(e){const t=e.target;this.value=t.value,this.dispatchEvent(new H(this.value))}}const K=j({id:"choice",type:"parallel",context:{defaultCustomValue:"",customValue:null,custom:!1,items:[],value:null,type:"text",min:null,max:null},states:{mutability:{initial:"editable",states:{editable:{},readonly:{}},on:{SET_READONLY:[{target:".editable",cond:"isPayloadFalsey"},{target:".readonly",cond:"isPayloadTruthy"}]}},interactivity:{initial:"enabled",states:{enabled:{},disabled:{}},on:{SET_DISABLED:[{target:".enabled",cond:"isPayloadFalsey"},{target:".disabled",cond:"isPayloadTruthy"}]}},selection:{initial:"unknown",states:{unknown:{always:[{target:"multiple",cond:"isValueArray"},{target:"single"}]},none:{},single:{},multiple:{}}},extension:{initial:"unknown",states:{unknown:{always:[{target:"present",cond:"hasCustom"},{target:"absent"}]},absent:{},present:{initial:"unknown",states:{unknown:{always:[{target:"selected",cond:"hasCustomValue"},{target:"available"}]},available:{on:{SET_TYPE:{actions:"setType"}}},selected:{initial:"unknown",states:{unknown:{always:[{target:"integer",cond:"showsIntegerField"},{target:"textarea",cond:"showsTextarea"},{target:"frequency",cond:"showsFrequency"},{target:"text"}]},text:{},frequency:{},textarea:{},integer:{type:"parallel",states:{min:{initial:"unknown",states:{unknown:{always:[{target:"custom",cond:"hasMinConstraint"},{target:"none"}]},none:{},custom:{}}},max:{initial:"unknown",states:{unknown:{always:[{target:"custom",cond:"hasMaxConstraint"},{target:"none"}]},none:{},custom:{}}}}}}}}}}}},on:{SET_DEFAULT_CUSTOM_VALUE:{actions:"setDefaultCustomValue"},SET_CUSTOM:{actions:"setCustom",target:[".selection.unknown",".extension.unknown"]},SET_VALUE:{actions:"setValue",target:[".selection.unknown",".extension.unknown"]},SET_ITEMS:{actions:"setItems",target:[".selection.unknown",".extension.unknown"]},SET_TYPE:{actions:"setType",target:".extension.unknown"},SET_MIN:{actions:"setMin",target:".extension.unknown"},SET_MAX:{actions:"setMax",target:".extension.unknown"}}},{guards:{isPayloadFalsey:(e,t)=>!t.data,isPayloadTruthy:(e,t)=>!!t.data,isValueArray:e=>Array.isArray(e.value),showsIntegerField:e=>"integer"===e.type,showsFrequency:e=>"frequency"===e.type,showsTextarea:e=>"textarea"===e.type,hasMinConstraint:e=>"number"==typeof e.min,hasMaxConstraint:e=>"number"==typeof e.max,hasCustomValue:e=>"string"==typeof e.customValue,hasCustom:e=>e.custom},actions:{setDefaultCustomValue:L.assign({defaultCustomValue:(e,t)=>t.data}),setValue:L.assign({value:(e,t)=>t.data,customValue:(e,t)=>Array.isArray(t.data)?t.data.find((t=>!e.items.includes(t))):e.items.includes(t.data)?null:t.data}),setCustom:L.assign({custom:(e,t)=>t.data}),setItems:L.assign({items:(e,t)=>t.data}),setType:L.assign({type:(e,t)=>t.data}),setMin:L.assign({min:(e,t)=>t.data}),setMax:L.assign({max:(e,t)=>t.data})}});let G,W,Z,J,Q,ee,te,se,ae,ie,re,ne,oe,le=e=>e;const de=`@foxy.io/elements::other[${(Math.pow(10,10)*Math.random()).toFixed(0)}]`;class he extends v{constructor(){super(...arguments),this.getText=e=>e,this.__service=q(K).onChange((()=>this.requestUpdate())).onTransition((({changed:e})=>e&&this.requestUpdate())).start()}static get scopedElements(){return{"vaadin-integer-field":customElements.get("vaadin-integer-field"),"vaadin-text-field":customElements.get("vaadin-text-field"),"x-frequency-input":X,"vaadin-text-area":customElements.get("vaadin-text-area"),"iron-icon":customElements.get("iron-icon")}}static get styles(){return[super.styles,d(Z||(Z=le`:host{--item-width:calc((var(--lumo-space-m) * 2) + 1.25rem)}.ml-xxl{margin-left:var(--item-width)}.item{height:var(--lumo-size-l);width:var(--item-width)}.radio{height:1.25rem;width:1.25rem}.check{height:1.125rem;width:1.125rem}.dot{height:.5rem;width:.5rem}`))]}static get properties(){return t(t({},super.properties),{},{defaultCustomValue:{type:String,attribute:"default-custom-value"},disabled:{type:Boolean},readonly:{type:Boolean},custom:{type:Boolean},type:{type:String},min:{type:Number},max:{type:Number},value:{type:Array},items:{type:Array},getText:{attribute:!1}})}get defaultCustomValue(){return this.__service.state.context.defaultCustomValue}set defaultCustomValue(e){this.__service.send("SET_DEFAULT_CUSTOM_VALUE",{data:e})}get readonly(){return this.__service.state.matches("mutability.readonly")}set readonly(e){this.__service.send("SET_READONLY",{data:e})}get disabled(){return this.__service.state.matches("interactivity.disabled")}set disabled(e){this.__service.send("SET_DISABLED",{data:e})}get custom(){return this.__service.state.matches("extension.present")}set custom(e){this.__service.send("SET_CUSTOM",{data:e})}get type(){return this.__service.state.context.type}set type(e){this.__service.send("SET_TYPE",{data:e})}get min(){return this.__service.state.context.min}set min(e){this.__service.send("SET_MIN",{data:e})}get max(){return this.__service.state.context.max}set max(e){this.__service.send("SET_MAX",{data:e})}get value(){return this.__service.state.context.value}set value(e){this.__service.send("SET_VALUE",{data:e})}get items(){return this.__service.state.context.items}set items(e){this.__service.send("SET_ITEMS",{data:e})}render(){const e=this.custom?[...this.items,de]:this.items,t=Array.isArray(this.value),s=this.__service.state.matches("extension.present.selected"),a=h(J||(J=le` ${0} `),e.map(((e,a,i)=>{var r;const n=this.custom&&a===i.length-1,o=n?s:t?!!(null===(r=this.value)||void 0===r?void 0:r.includes(e)):e===String(this.value),l=this.disabled||!this._isI18nReady,d=z({value:n?de:e,name:t?e:"choice","data-testid":`item-${e}`,"?disabled":l,"@change":t=>{if(this.readonly)return t.preventDefault();const s=t.target.checked,a=e===de?this.defaultCustomValue:e,i=this.value;Array.isArray(i)?this.value=e===de?s?[...i,a]:i.slice(0,i.length-1):s?[a,...i]:i.filter((e=>e!==a)):this.value=s?a:null,this.dispatchEvent(new O(this.value))}}),u=h(Q||(Q=le` <div> ${0} </div> `),e===de?this._t("choice.other").toString():h(ee||(ee=le`<slot name="${0}">${0}</slot>`),`${e}-label`,this.getText(e)));return h(te||(te=le` <div class="ml-xxl border-t border-contrast-10 ${0}"></div> ${0} <div class="mr-m ml-xxl"> ${0} ${0} </div> `),a?"":"hidden",t?function(e,t,s,a,i){const r="transition ease-in-out duration-200",n=`${r} transform ${s?"scale-100":"scale-0"} ${e?"text-contrast-70":"text-tint"}`;return h(W||(W=le` <label class="group flex items-center ${0}"> <div class="item flex items-center justify-center flex-shrink-0 text-primary-contrast"> <div class="check rounded-s ${0} ${0} ${0} focus-within-shadow-outline"> <iron-icon icon="lumo:checkmark" class="block w-full h-full ${0}"></iron-icon> <input type="checkbox" class="sr-only" .checked="${0}" ...="${0}"> </div> </div> <div class="font-lumo leading-m ${0}">${0}</div> </label> `),t||e?"":"cursor-pointer","border "+(e?"border-dashed border-contrast-30":"border-transparent"),r,e?"":t?s?"bg-primary-50":"bg-contrast-10":s?"bg-primary":"bg-contrast-20 group-hover-bg-contrast-30",n,s,a,t?"text-disabled":e?"text-secondary":"text-body",i)}(this.readonly,l,o,d,u):function(e,t,s,a,i){const r="transition ease-in-out duration-200",n=`${r} ${t||e?"":"shadow-xs"} transform ${s?"scale-100":"scale-0"} ${e?"bg-contrast-70":"bg-tint"}`;return h(G||(G=le` <label class="group flex items-center ${0}"> <div class="item flex items-center justify-center flex-shrink-0"> <div class="flex radio rounded-full ${0} ${0} ${0} focus-within-shadow-outline"> <div class="dot m-auto rounded-full ${0}"></div> <input type="radio" class="sr-only" .checked="${0}" ...="${0}"> </div> </div> <div class="font-lumo leading-m ${0}">${0}</div> </label> `),t||e?"":"cursor-pointer","border "+(e?"border-dashed border-contrast-30":"border-transparent"),r,e?"":t?s?"bg-primary-50":"bg-contrast-10":s?"bg-primary":"bg-contrast-20 group-hover-bg-contrast-30",n,s,a,t?"text-disabled":e?"text-secondary":"text-body",i)}(this.readonly,l,o,d,u),e===de&&s?this.__field:"",e!==de?h(se||(se=le`<slot name="${0}"></slot>`),e):"")})));return h(ae||(ae=le`<form>${0}</form> `),a)}get __field(){const e=z({placeholder:this._t("choice.other").toString(),class:"w-full mb-m",value:this.__service.state.context.customValue,max:this.max,min:this.min,ns:this.ns,"?disabled":this.disabled,"?readonly":this.readonly,"data-testid":"field","@change":e=>{e.stopPropagation();const t=e.target.value;Array.isArray(this.value)?this.value=this.value.slice(0,this.value.length-1).concat(t):this.value=t,this.dispatchEvent(new O(this.value))}});return"frequency"===this.type?h(ie||(ie=le`<x-frequency-input ...="${0}"></x-frequency-input>`),e):"integer"===this.type?h(re||(re=le`<vaadin-integer-field ...="${0}" has-controls></vaadin-integer-field>`),e):"textarea"===this.type?h(ne||(ne=le`<vaadin-text-area ...="${0}"></vaadin-text-area>`),e):h(oe||(oe=le`<vaadin-text-field ...="${0}"></vaadin-text-field>`),e)}}export{he as C,U as D,X as F,N as a,O as b,L as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as e}from"./shared-
|
|
1
|
+
import{_ as e}from"./shared-ca0f14c1.js";import{L as s,h as t}from"./shared-dc73b9a5.js";import{w as r}from"./shared-f31044b8.js";let o,a=e=>e;class d extends s{constructor(){super(...arguments),this.frame=!1}static get properties(){return e(e({},super.properties),{},{frame:{type:Boolean}})}static get styles(){return r.styles}render(){return t(o||(o=a` <section class="space-y-s font-lumo antialiased"> <h3 class="${0}"> <slot name="header"></slot> </h3> <div class="rounded-t-l rounded-b-l ${0}"> <slot></slot> </div> </section> `),"text-s font-medium text-secondary leading-none "+(this.frame?"":"pl-m"),this.frame?"border border-contrast-10 overflow-hidden":"")}}export{d as G};
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import{E as e,C as t,T as a}from"./shared-084b6372.js";import{h as i,P as r}from"./shared-91b86bae.js";import{a as l}from"./shared-c7280a24.js";const o=i`<dom-module id="lumo-text-area" theme-for="vaadin-text-area">
|
|
2
|
+
<template>
|
|
3
|
+
<style include="lumo-text-field">
|
|
4
|
+
[part="input-field"],
|
|
5
|
+
[part="input-field"] ::slotted(textarea) {
|
|
6
|
+
/* Equal to the implicit padding in vaadin-text-field */
|
|
7
|
+
padding-top: calc((var(--lumo-text-field-size) - 1em * var(--lumo-line-height-s)) / 2);
|
|
8
|
+
padding-bottom: calc((var(--lumo-text-field-size) - 1em * var(--lumo-line-height-s)) / 2);
|
|
9
|
+
height: auto;
|
|
10
|
+
box-sizing: border-box;
|
|
11
|
+
transition: background-color 0.1s;
|
|
12
|
+
line-height: var(--lumo-line-height-s);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
:host(:not([readonly])) [part="input-field"]::after {
|
|
16
|
+
display: none;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
:host([readonly]) [part="input-field"] {
|
|
20
|
+
border: 1px dashed var(--lumo-contrast-30pct);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
:host([readonly]) [part="input-field"]::after {
|
|
24
|
+
border: none;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
:host(:hover:not([readonly]):not([focused]):not([invalid])) [part="input-field"] {
|
|
28
|
+
background-color: var(--lumo-contrast-20pct);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@media (pointer: coarse) {
|
|
32
|
+
:host(:hover:not([readonly]):not([focused]):not([invalid])) [part="input-field"] {
|
|
33
|
+
background-color: var(--lumo-contrast-10pct);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
:host(:active:not([readonly]):not([focused])) [part="input-field"] {
|
|
37
|
+
background-color: var(--lumo-contrast-20pct);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
[part="value"],
|
|
42
|
+
[part="input-field"] ::slotted(textarea) {
|
|
43
|
+
line-height: inherit;
|
|
44
|
+
--_lumo-text-field-overflow-mask-image: none;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/* Vertically align icon prefix/suffix with the first line of text */
|
|
48
|
+
[part="input-field"] ::slotted(iron-icon) {
|
|
49
|
+
margin-top: calc((var(--lumo-icon-size-m) - 1em * var(--lumo-line-height-s)) / -2);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
[part="input-field"] [part="value"],
|
|
53
|
+
[part="input-field"] ::slotted(textarea) {
|
|
54
|
+
white-space: pre-wrap; /* override \`nowrap\` from <vaadin-text-field> */
|
|
55
|
+
align-self: stretch; /* override \`baseline\` from <vaadin-text-field> */
|
|
56
|
+
}
|
|
57
|
+
</style>
|
|
58
|
+
</template>
|
|
59
|
+
</dom-module>`;document.head.appendChild(o.content);
|
|
60
|
+
/**
|
|
61
|
+
@license
|
|
62
|
+
Copyright (c) 2017 Vaadin Ltd.
|
|
63
|
+
This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
64
|
+
*/
|
|
65
|
+
class n extends(e(l(t(a(r))))){static get template(){return i`
|
|
66
|
+
<style include="vaadin-text-field-shared-styles">
|
|
67
|
+
.vaadin-text-area-container {
|
|
68
|
+
flex: auto;
|
|
69
|
+
max-height: inherit; /* MSIE 11 */
|
|
70
|
+
min-height: inherit; /* MSIE 11 */
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/* The label, helper text and the error message should neither grow nor shrink. */
|
|
74
|
+
[part="label"],
|
|
75
|
+
[part="helper-text"],
|
|
76
|
+
[part="error-message"] {
|
|
77
|
+
flex: none;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
[part="input-field"] {
|
|
81
|
+
overflow: auto;
|
|
82
|
+
-webkit-overflow-scrolling: touch;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
[part="value"] {
|
|
86
|
+
resize: none;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
[part="value"],
|
|
90
|
+
[part="input-field"] ::slotted(*) {
|
|
91
|
+
align-self: flex-start;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
@keyframes vaadin-text-area-appear {
|
|
95
|
+
to {
|
|
96
|
+
opacity: 1;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
:host {
|
|
101
|
+
animation: 1ms vaadin-text-area-appear;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/* Workaround https://bugzilla.mozilla.org/show_bug.cgi?id=1739079 */
|
|
105
|
+
:host([disabled]) [part='value'] {
|
|
106
|
+
user-select: none;
|
|
107
|
+
}
|
|
108
|
+
</style>
|
|
109
|
+
|
|
110
|
+
<div class="vaadin-text-area-container">
|
|
111
|
+
|
|
112
|
+
<label part="label" on-click="focus" id="[[_labelId]]">[[label]]</label>
|
|
113
|
+
|
|
114
|
+
<div part="input-field" id="[[_inputId]]" on-scroll="__scrollPositionUpdated">
|
|
115
|
+
|
|
116
|
+
<slot name="prefix"></slot>
|
|
117
|
+
|
|
118
|
+
<slot name="textarea">
|
|
119
|
+
<textarea part="value"></textarea>
|
|
120
|
+
</slot>
|
|
121
|
+
|
|
122
|
+
<div part="clear-button" id="clearButton" role="button" aria-label\$="[[i18n.clear]]"></div>
|
|
123
|
+
<slot name="suffix"></slot>
|
|
124
|
+
|
|
125
|
+
</div>
|
|
126
|
+
|
|
127
|
+
<div part="helper-text" id="[[_helperTextId]]">
|
|
128
|
+
<slot name="helper">[[helperText]]</slot>
|
|
129
|
+
</div>
|
|
130
|
+
|
|
131
|
+
<div part="error-message" id="[[_errorId]]" aria-live="assertive" aria-hidden\$="[[_getErrorMessageAriaHidden(invalid, errorMessage, _errorId)]]">[[errorMessage]]</div>
|
|
132
|
+
|
|
133
|
+
</div>
|
|
134
|
+
`}static get is(){return"vaadin-text-area"}static get version(){return"2.9.2"}static get properties(){return{pattern:{type:String}}}static get observers(){return["_textAreaValueChanged(value)"]}ready(){super.ready(),this._updateHeight(),this.addEventListener("animationend",this._onAnimationEnd),this._inputField=this.root.querySelector("[part=input-field]"),this._inputField.addEventListener("wheel",(e=>{const t=this._inputField.scrollTop;this._inputField.scrollTop+=e.deltaY,t!==this._inputField.scrollTop&&(e.preventDefault(),this.__scrollPositionUpdated())})),this.__scrollPositionUpdated()}__scrollPositionUpdated(){this.updateStyles({"--_text-area-vertical-scroll-position":this._inputField.scrollTop+"px"})}_onAnimationEnd(e){0===e.animationName.indexOf("vaadin-text-area-appear")&&this._updateHeight()}get _slottedTagName(){return"textarea"}_textAreaValueChanged(e){this._updateHeight()}_updateHeight(){const e=this.root.querySelector("[part=input-field]"),t=e.scrollTop,a=this.inputElement,i=this.value?this.value.length:0;if(this._oldValueLength>=i){const t=getComputedStyle(e).height,i=getComputedStyle(a).width;e.style.display="block",e.style.height=t,a.style.maxWidth=i,a.style.height="auto"}this._oldValueLength=i;const r=a.scrollHeight;r>a.clientHeight&&(a.style.height=r+"px"),a.style.removeProperty("max-width"),e.style.removeProperty("display"),e.style.removeProperty("height"),e.scrollTop=t,this._dispatchIronResizeEventIfNeeded("InputHeight",r)}checkValidity(){if(!super.checkValidity())return!1;if(!this.pattern||!this.inputElement.value)return!0;try{const e=this.inputElement.value.match(this.pattern);return!!e&&e[0]===e.input}catch(e){return!0}}}customElements.define(n.is,n);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as t}from"./shared-
|
|
1
|
+
import{_ as t}from"./shared-ca0f14c1.js";import{C as e}from"./shared-85d45495.js";import{h as i}from"./shared-dc73b9a5.js";import{N as s}from"./shared-619adfad.js";import{T as r}from"./shared-f31044b8.js";import{c as a}from"./shared-4e709717.js";let d,l,n,o=t=>t;const h=e(r(s));class p extends h{constructor(){super(...arguments),this.templates={},this.lang="",this.ns="",this.__renderTitle=t=>i(d||(d=o` <div data-testid="title"> ${0} <div class="text-secondary 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(l||(l=o` <div data-testid="subtitle"> ${0} <div class="font-semibold truncate"> ${0}​ </div> ${0} </div> `),this.renderTemplateOrSlot("subtitle:before"),this.data?null==t?void 0:t(this.data):"",this.renderTemplateOrSlot("subtitle:after"))}static get properties(){return t(t({},super.properties),{},{lang:{type:String},ns:{type:String}})}render(t){var e,s;const r=this.hiddenSelector;return i(n||(n=o` <div aria-live="polite" aria-busy="${0}" class="relative text-body text-m font-lumo leading-m"> ${0} ${0} <div class="${0}"> <foxy-spinner data-testid="spinner" class="m-auto" state="${0}" lang="${0}" ns="${0} ${0}"> </foxy-spinner> </div> </div> `),!this.data&&this.in("busy"),r.matches("title",!0)?"":this.__renderTitle(null==t?void 0:t.title),r.matches("subtitle",!0)?"":this.__renderSubtitle(null==t?void 0:t.subtitle),a({"transition duration-250 ease-in-out absolute inset-0 flex":!0,"opacity-0 pointer-events-none":!!this.data}),this.in("fail")?"error":this.in({idle:"template"})?"empty":"busy",this.lang,this.ns,null!==(s=null===(e=customElements.get("foxy-spinner"))||void 0===e?void 0:e.defaultNS)&&void 0!==s?s:"")}}export{p as T};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{I as e,_ as t}from"./shared-
|
|
1
|
+
import{I as e,_ as t}from"./shared-ca0f14c1.js";import{h as n,L as r}from"./shared-dc73b9a5.js";import{i as s,a}from"./shared-f31044b8.js";import{F as i,A as o}from"./shared-3a7cf739.js";const c={type:"backend",init:()=>{},read:(e,t,n)=>{const r=async e=>{const t=e.ok?null:new Error(await e.text()),r=!!e.ok&&await e.json();n(t,r)},s=e=>{const t=e instanceof Error?e:new Error(String(e));n(t,!1)},a=new i("fetch",{cancelable:!0,composed:!0,bubbles:!0,request:new o.WHATWGRequest(`foxy://i18n/${t}/${e}`),resolve:r,reject:s});dispatchEvent(a),a.defaultPrevented||fetch(a.request).then(r).catch(s)},create:()=>{throw new Error("foxy-i18n does not support resource creation")}};function l(e,t=!1){var n;const r=e.replace(/(y|m|w|d)/,""),s=e.replace(/\.?\d+/,"");return{count:".5"===r?.5:parseInt(r),units:t&&null!==(n={y:"year",m:"month",w:"week",d:"day"}[s])&&void 0!==n?n:s}}const u={discount:({ns:e,type:t,details:n},r,s)=>{const a=t.endsWith("_percentage")?.01:1,i=n.split("|"),o=`${["allunits","incremental","repeat","single"].includes(i[0])?i.shift():"single"}_${t}_discount_summary`;return i.map((t=>{var n,r;const s=null!==(r=null===(n=/[-+]/.exec(t))||void 0===n?void 0:n.index)&&void 0!==r?r:-1,i=parseFloat(t.substring(s))*a,c=parseFloat(t.substring(0,s));return`$t(${o}, ${JSON.stringify({adjustment:i,from:c,ns:e})})`})).join("; ")},relative:(e,t,n)=>{const r=new Intl.RelativeTimeFormat(n);let{count:s,units:a}=l(e,!0);return.5===s&&"month"===a&&(s=2,a="week"),r.format(s,a)},percent:(e,t,n)=>{let r=null;try{"number"==typeof e&&(r=e.toLocaleString(n,{style:"percent"}))}catch(e){console.warn(`i18next formatter error: ${e.message}`)}return r||String(e)},ordinal:(e,t,n)=>`${e}$t(ordinal_${new Intl.PluralRules(n,{type:"ordinal"}).select(e)})`,price:(e,t,n,r)=>{var s;try{const[t,a]=e.split(" ");return parseFloat(t).toLocaleString(n,{maximumFractionDigits:2,minimumFractionDigits:2,currencyDisplay:null!==(s=null==r?void 0:r.currencyDisplay)&&void 0!==s?s:"symbol",style:"currency",currency:a})}catch(t){return e}},date:(e,t,n)=>{if(!e)return"$t(unknown)";const r=new Date(e),s=(new Date).getFullYear()===r.getFullYear()?void 0:"numeric";return r.toLocaleDateString(n,{month:"long",year:s,day:"numeric"})},time:(e,t,n)=>new Date(e).toLocaleTimeString(n,{hour:"numeric",minute:"numeric"})};let d,p=e=>e;class m extends(a(e(r),"")){constructor(){super(...arguments),this.options={},this.key=""}static onTranslationChange(e){const t=["initialized","loaded"],n=["removed","added"];return t.forEach((t=>m.i18next.on(t,e))),n.forEach((t=>m.i18next.store.on(t,e))),()=>{t.forEach((t=>m.i18next.off(t,e))),n.forEach((t=>m.i18next.store.off(t,e)))}}static onResourceFetch(e){const t=t=>{if(t instanceof i&&t.request.url.startsWith("foxy://i18n/")){const[n,r]=t.request.url.split("/").reverse();t.respondWith(e(r,n))}};return addEventListener("fetch",t),()=>removeEventListener("fetch",t)}static setGateways({values:e}){for(const t in e)this.i18next.addResource("en","gateways",`gateways.${t}`,e[t].name)}static get properties(){return t(t({},super.properties),{},{options:{type:Object},key:{type:String}})}connectedCallback(){super.connectedCallback(),this.__unsubscribe=m.onTranslationChange((()=>this.requestUpdate()))}render(){return n(d||(d=p`<span>${0}</span>`),this.t(this.key,t(t({},this.options),{},{lng:this.lang})))}disconnectedCallback(){var e;super.disconnectedCallback(),null===(e=this.__unsubscribe)||void 0===e||e.call(this)}}m.FetchEvent=i,m.i18next=s.createInstance().use(c),m.i18next.init({interpolation:{format:(e,t="",n="en",r={})=>t.split(" ").filter((e=>!!e.trim())).reduce(((e,t)=>{var s,a;return null!==(a=null===(s=u[t])||void 0===s?void 0:s.call(u,e,t,n,r))&&void 0!==a?a:e}),e),escapeValue:!1},fallbackLng:"en",fallbackNS:"shared",defaultNS:"shared",ns:["shared"]}),customElements.define("foxy-i18n",m);export{m as I,l as p};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as t,I as e}from"./shared-
|
|
1
|
+
import{_ as t,I as e}from"./shared-ca0f14c1.js";import{h as s,L as i}from"./shared-dc73b9a5.js";import{C as r}from"./shared-85d45495.js";import{a as n,T as o}from"./shared-f31044b8.js";import{c as a}from"./shared-4e709717.js";import{l}from"./shared-22ba9566.js";import{r as c}from"./shared-a0c6a159.js";let d,h,u,m=t=>t;const p=n(r(o(e(i))));class b extends p{constructor(){super(...arguments),this.options=[],this.items=[],this.__newItem=""}static get properties(){return t(t({},super.properties),{},{options:{type:Array},items:{type:Array},__newItem:{attribute:!1}})}render(){const t=a({"w-xs h-xs mr-xs rounded-full transition-colors flex-shrink-0":!0,"focus-outline-none focus-ring-2 ring-inset ring-error-50":!0,"text-tertiary hover-bg-error-10 hover-text-error":!this.disabled,"cursor-default text-disabled":this.disabled,"flex items-center justify-center":!this.readonly,hidden:this.readonly}),e=a({"transition-colors h-l ml-m flex items-center":!0,"text-secondary":this.readonly,"text-disabled":this.disabled}),i=this.disabled||!this.__newItem,r=()=>{this.__newItem&&(this.items.push({value:this.__newItem}),this.requestUpdate("items"),this.dispatchEvent(new CustomEvent("change")),this.__newItem="")};return s(d||(d=m` <slot></slot> <ol class="divide-y divide-contrast-10"> ${0} </ol> <div class="${0}"> <input placeholder="${0}" class="w-full bg-transparent appearance-none h-m focus-outline-none" list="list" .value="${0}" ?disabled="${0}" ?readonly="${0}" @keydown="${0}" @change="${0}" @input="${0}"> <datalist id="list"> ${0} </datalist> <div class="transition-opacity ${0}"> <button aria-label="${0}" class="${0}" ?disabled="${0}" @click="${0}"> <iron-icon icon="lumo:plus" class="icon-inline text-l"></iron-icon> </button> </div> </div> `),c(this.items,(t=>t.value),((i,r)=>{var n;return s(h||(h=m` <li class="${0}"> <div class="flex-1 mr-s">${0}</div> <button aria-label="${0}" class="${0}" ?disabled="${0}" @click="${0}"> <iron-icon icon="lumo:cross" class="icon-inline text-xl"></iron-icon> </button> </li> `),e,null!==(n=i.label)&&void 0!==n?n:i.value,this.t("delete"),t,this.disabled,(()=>{this.items.splice(r,1),this.requestUpdate("items"),this.dispatchEvent(new CustomEvent("change"))}))})),a({"ml-m h-l flex items-center":!0,"border-t border-contrast-10":this.items.length>0,flex:!this.readonly,hidden:this.readonly}),this.t("type_here"),l(this.__newItem),this.disabled,this.readonly,(t=>"Enter"===t.key&&r()),(t=>t.stopPropagation()),(t=>{this.__newItem=t.currentTarget.value.trim()}),this.options.map((({label:t,value:e})=>{if(!this.items.some((t=>t.value===e)))return s(u||(u=m`<option value="${0}">${0}</option>`),e,null!=t?t:e)})),this.__newItem?"opacity-100":"opacity-0",this.t("submit"),a({"w-xs h-xs mr-xs flex-shrink-0 ring-inset ring-success-50 focus-outline-none":!0,"flex items-center justify-center rounded-full transition-colors":!0,"bg-contrast-5 text-disabled cursor-default":i,"bg-success-10 text-success cursor-pointer":!i,"hover-bg-success hover-text-success-contrast":!i,"focus-ring-2":!i}),i,r)}}export{b as E};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./shared-c63ba384.js";import{I as e}from"./shared-4773b634.js";import{_ as t}from"./shared-ca0f14c1.js";import{i as a}from"./shared-9803aa7c.js";import{h as s}from"./shared-dc73b9a5.js";import{A as i}from"./shared-9b392ba8.js";let r,l=e=>e;customElements.define("foxy-internal-async-combo-box-control",class extends e{constructor(){super(...arguments),this.itemLabelPath=null,this.itemValuePath=null,this.selectedItem=void 0,this.first=null}static get properties(){return t(t({},super.properties),{},{itemLabelPath:{type:String,attribute:"item-label-path"},itemValuePath:{type:String,attribute:"item-value-path"},selectedItem:{attribute:!1},first:{type:String}})}renderControl(){var e,t,o=this;return s(r||(r=l` <vaadin-combo-box item-value-path="${0}" item-label-path="${0}" error-message="${0}" item-id-path="_links.self.href" helper-text="${0}" placeholder="${0}" label="${0}" class="w-full" ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" .dataProvider="${0}" .selectedItem="${0}" .value="${0}" @change="${0}"> </vaadin-combo-box> `),a(null!==(e=this.itemValuePath)&&void 0!==e?e:void 0),a(null!==(t=this.itemLabelPath)&&void 0!==t?t:void 0),a(this._errorMessage),this.helperText,this.placeholder,this.label,this.disabled,this.readonly,this._checkValidity,(async function(e,t){if(!o.first)return t([],0);const a=new URL(o.first);a.searchParams.set("offset",String(e.page*e.pageSize)),a.searchParams.set("limit",String(e.pageSize)),e.filter&&o.itemLabelPath&&a.searchParams.set(o.itemLabelPath,`*${e.filter}*`);const s=await new i(o).fetch(a.toString());if(!s.ok)throw new Error(await s.text());const r=await s.json();t(Array.from(Object.values(r._embedded))[0],r.total_items)}),this.selectedItem,this._value,(e=>{e.stopPropagation();const t=e.currentTarget;this._value=t.value,this._value===t.value?(this.selectedItem=t.selectedItem,this.dispatchEvent(new CustomEvent("selected-item-changed"))):t.value=this._value}))}updated(e){if(super.updated(e),e.has("first")){const e=this.renderRoot.querySelector("vaadin-combo-box");e&&(e.size=0,e.size=1)}}get _value(){var e;return null!==(e=super._value)&&void 0!==e?e:""}set _value(e){super._value=e}});
|