@foxy.io/elements 1.14.0-beta.2 → 1.14.0-beta.6
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/README.md +1 -1
- package/dist/cdn/foxy-access-recovery-form.js +1 -1
- package/dist/cdn/foxy-address-card.js +1 -1
- package/dist/cdn/foxy-address-form.js +1 -1
- package/dist/cdn/foxy-applied-tax-card.js +1 -1
- package/dist/cdn/foxy-attribute-card.js +1 -1
- package/dist/cdn/foxy-attribute-form.js +1 -1
- package/dist/cdn/foxy-cancellation-form.js +1 -1
- package/dist/cdn/foxy-collection-page.js +1 -1
- package/dist/cdn/foxy-collection-pages.js +1 -1
- package/dist/cdn/foxy-custom-field-card.js +1 -1
- package/dist/cdn/foxy-custom-field-form.js +1 -1
- package/dist/cdn/foxy-customer-api.js +1 -1
- package/dist/cdn/foxy-customer-card.js +1 -1
- package/dist/cdn/foxy-customer-form.js +1 -1
- package/dist/cdn/foxy-customer-portal-settings.js +10 -10
- package/dist/cdn/foxy-customer-portal.js +2 -2
- package/dist/cdn/foxy-customer.js +2 -2
- package/dist/cdn/foxy-customers-table.js +1 -1
- package/dist/cdn/foxy-discount-card.js +1 -1
- package/dist/cdn/foxy-donation.js +1 -1
- package/dist/cdn/foxy-email-template-form.js +1 -1
- package/dist/cdn/foxy-error-entry-card.js +1 -1
- package/dist/cdn/foxy-form-dialog.js +1 -1
- package/dist/cdn/foxy-i18n.js +1 -1
- package/dist/cdn/foxy-items-form.js +1 -1
- package/dist/cdn/foxy-nucleon-element.js +1 -1
- package/dist/cdn/foxy-payment-card.js +1 -1
- package/dist/cdn/foxy-payment-method-card.js +1 -1
- package/dist/cdn/foxy-query-builder.js +2 -2
- package/dist/cdn/foxy-sign-in-form.js +1 -1
- package/dist/cdn/foxy-spinner.js +2 -2
- package/dist/cdn/foxy-subscription-card.js +1 -1
- package/dist/cdn/foxy-subscription-form.js +26 -9
- package/dist/cdn/foxy-subscriptions-table.js +1 -1
- package/dist/cdn/foxy-table.js +1 -1
- package/dist/cdn/foxy-tax-card.js +1 -1
- package/dist/cdn/foxy-tax-form.js +1 -1
- package/dist/cdn/foxy-template-config-form.js +14 -0
- package/dist/cdn/foxy-template-form.js +1 -1
- package/dist/cdn/foxy-transaction-card.js +1 -1
- package/dist/cdn/foxy-transactions-table.js +1 -1
- package/dist/cdn/foxy-user-form.js +1 -1
- package/dist/cdn/foxy-users-table.js +1 -1
- package/dist/cdn/{shared-d4dad105.js → shared-00563cb0.js} +1 -1
- package/dist/cdn/shared-09feabf8.js +1 -0
- package/dist/cdn/{shared-6783c996.js → shared-0ba88744.js} +1 -1
- package/dist/cdn/shared-0ced76a0.js +358 -0
- package/dist/cdn/{shared-dbbe03f9.js → shared-16e28f3b.js} +1 -1
- package/dist/cdn/{shared-f4119f12.js → shared-16f72e27.js} +1 -1
- package/dist/cdn/shared-1761daef.js +15 -0
- package/dist/cdn/{shared-35415106.js → shared-1bafffd0.js} +1 -1
- package/dist/cdn/{shared-5fedf5e4.js → shared-200f613b.js} +2 -2
- package/dist/cdn/{shared-4059f633.js → shared-218ba06e.js} +1 -1
- package/dist/cdn/{shared-e9920617.js → shared-34b2c1e2.js} +1 -1
- package/dist/cdn/shared-3f35fa81.js +1 -0
- package/dist/cdn/{shared-cf248335.js → shared-44cfc617.js} +1 -1
- package/dist/cdn/{shared-45d647e4.js → shared-46ee137f.js} +1 -1
- package/dist/cdn/{shared-5d286626.js → shared-4d3c7828.js} +1 -1
- package/dist/cdn/{shared-151ca103.js → shared-50c7a176.js} +5 -5
- package/dist/cdn/{shared-f0199313.js → shared-593f7e2c.js} +1 -1
- package/dist/cdn/shared-59e44f29.js +1 -0
- package/dist/cdn/{shared-cd700eac.js → shared-60126eee.js} +1 -1
- package/dist/cdn/{shared-17968c53.js → shared-63eaded9.js} +3 -3
- package/dist/cdn/shared-691da586.js +1 -0
- package/dist/cdn/shared-6b7602c7.js +1 -0
- package/dist/cdn/{shared-98ee7fad.js → shared-6d45a07b.js} +1 -1
- package/dist/cdn/{shared-99f45065.js → shared-6ecbc785.js} +1 -1
- package/dist/cdn/shared-6f7f752e.js +1 -0
- package/dist/cdn/shared-7629a1a5.js +314 -0
- package/dist/cdn/shared-8edee4e1.js +264 -0
- package/dist/cdn/{shared-84fa75d9.js → shared-9221e6b2.js} +1 -1
- package/dist/cdn/{shared-2860a3d3.js → shared-94b0ae99.js} +2 -2
- package/dist/cdn/shared-a46edf4b.js +1 -0
- package/dist/cdn/{shared-566252ac.js → shared-a6c047b1.js} +1 -1
- package/dist/cdn/shared-ace85f1b.js +1 -0
- package/dist/cdn/{shared-54702b33.js → shared-b0f0e8b5.js} +1 -1
- package/dist/cdn/{shared-ed4ed7a5.js → shared-b710881a.js} +2 -2
- package/dist/cdn/{shared-3ae39e52.js → shared-bb824ab4.js} +3 -3
- package/dist/cdn/{shared-f2a4fd27.js → shared-c66e9946.js} +1 -1
- package/dist/cdn/shared-d8852c42.js +1 -0
- package/dist/cdn/shared-df573cea.js +12 -0
- package/dist/cdn/{shared-e5de8675.js → shared-e7f8ffe9.js} +1 -1
- package/dist/cdn/{shared-54c485d2.js → shared-ec861f31.js} +21 -21
- package/dist/cdn/{shared-e0248713.js → shared-f0a83bd6.js} +1 -1
- package/dist/cdn/{shared-747b0842.js → shared-ff79f3f9.js} +1 -1
- package/dist/cdn/translations/shared/en.json +83 -1
- package/dist/elements/private/Checkbox/Checkbox.js +5 -1
- package/dist/elements/private/Checkbox/Checkbox.js.map +1 -1
- package/dist/elements/private/Choice/Choice.js +3 -3
- package/dist/elements/private/Choice/Choice.js.map +1 -1
- package/dist/elements/private/Group/Group.js +1 -1
- package/dist/elements/private/Group/Group.js.map +1 -1
- package/dist/elements/private/I18N/I18N.js +1 -1
- package/dist/elements/private/I18N/I18N.js.map +1 -1
- package/dist/elements/public/AddressForm/AddressForm.js +8 -4
- package/dist/elements/public/AddressForm/AddressForm.js.map +1 -1
- package/dist/elements/public/AttributeForm/AttributeForm.js +8 -4
- package/dist/elements/public/AttributeForm/AttributeForm.js.map +1 -1
- package/dist/elements/public/CustomFieldForm/CustomFieldForm.js +8 -4
- package/dist/elements/public/CustomFieldForm/CustomFieldForm.js.map +1 -1
- package/dist/elements/public/CustomerForm/CustomerForm.js +8 -4
- package/dist/elements/public/CustomerForm/CustomerForm.js.map +1 -1
- package/dist/elements/public/EmailTemplateForm/EmailTemplateForm.js +10 -6
- package/dist/elements/public/EmailTemplateForm/EmailTemplateForm.js.map +1 -1
- package/dist/elements/public/ItemsForm/ItemsForm.js +2 -2
- package/dist/elements/public/ItemsForm/ItemsForm.js.map +1 -1
- package/dist/elements/public/NucleonElement/serveFromCache.js +1 -0
- package/dist/elements/public/NucleonElement/serveFromCache.js.map +1 -1
- package/dist/elements/public/TaxForm/TaxForm.js +8 -4
- package/dist/elements/public/TaxForm/TaxForm.js.map +1 -1
- package/dist/elements/public/TemplateConfigForm/CountriesList.d.ts +23 -0
- package/dist/elements/public/TemplateConfigForm/CountriesList.js +129 -0
- package/dist/elements/public/TemplateConfigForm/CountriesList.js.map +1 -0
- package/dist/elements/public/TemplateConfigForm/CountryCard.d.ts +20 -0
- package/dist/elements/public/TemplateConfigForm/CountryCard.js +125 -0
- package/dist/elements/public/TemplateConfigForm/CountryCard.js.map +1 -0
- package/dist/elements/public/TemplateConfigForm/TemplateConfigForm.d.ts +34 -0
- package/dist/elements/public/TemplateConfigForm/TemplateConfigForm.js +1117 -0
- package/dist/elements/public/TemplateConfigForm/TemplateConfigForm.js.map +1 -0
- package/dist/elements/public/TemplateConfigForm/defaults.d.ts +2 -0
- package/dist/elements/public/TemplateConfigForm/defaults.js +95 -0
- package/dist/elements/public/TemplateConfigForm/defaults.js.map +1 -0
- package/dist/elements/public/TemplateConfigForm/index.d.ts +9 -0
- package/dist/elements/public/TemplateConfigForm/index.js +11 -0
- package/dist/elements/public/TemplateConfigForm/index.js.map +1 -0
- package/dist/elements/public/TemplateConfigForm/types.d.ts +116 -0
- package/dist/elements/public/TemplateConfigForm/types.js +2 -0
- package/dist/elements/public/TemplateConfigForm/types.js.map +1 -0
- package/dist/elements/public/TemplateForm/TemplateForm.js +10 -6
- package/dist/elements/public/TemplateForm/TemplateForm.js.map +1 -1
- package/dist/elements/public/index.d.ts +1 -0
- package/dist/elements/public/index.defined.d.ts +1 -0
- package/dist/elements/public/index.defined.js +1 -0
- package/dist/elements/public/index.defined.js.map +1 -1
- package/dist/elements/public/index.js +1 -0
- package/dist/elements/public/index.js.map +1 -1
- package/dist/mixins/themeable.js +107 -12
- package/dist/mixins/themeable.js.map +1 -1
- package/package.json +2 -7
- package/dist/cdn/shared-35502e88.js +0 -1
- package/dist/cdn/shared-50744508.js +0 -15
- package/dist/cdn/shared-5388f705.js +0 -1
- package/dist/cdn/shared-7f588649.js +0 -1
- package/dist/cdn/shared-9467cb31.js +0 -572
- package/dist/cdn/shared-b98f88c9.js +0 -369
- package/dist/cdn/shared-c0161e6a.js +0 -1
- package/dist/cdn/shared-dbcffd8e.js +0 -1
- package/dist/cdn/shared-e057788f.js +0 -1
- package/dist/cdn/shared-e21a2aac.js +0 -1
- package/dist/cdn/shared-ebbef842.js +0 -1
- package/dist/cdn/shared-fd5b81be.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./shared-bb824ab4.js";import"./shared-0ced76a0.js";import"./shared-a6c047b1.js";import"./foxy-spinner.js";import"./foxy-i18n.js";import{C as e}from"./shared-d8852c42.js";import"./shared-8edee4e1.js";import"./shared-691da586.js";import"./shared-7629a1a5.js";import{s,h as t}from"./shared-63eaded9.js";import{S as i,T as r,a}from"./shared-3f35fa81.js";import"./shared-ec861f31.js";import{m as n}from"./shared-1761daef.js";import{G as l}from"./shared-4d3c7828.js";import"./shared-df573cea.js";import"./shared-46ee137f.js";import"./shared-f0a83bd6.js";import{c as o}from"./shared-4e709717.js";import{C as d}from"./shared-593f7e2c.js";import{N as h}from"./shared-44cfc617.js";import{i as m}from"./shared-6d45a07b.js";import{v as c}from"./shared-b738ee96.js";let C,f,p,g,u=e=>e;const y=[{property:"is_merchant",icon:s(C||(C=u`<svg class="fill-current h-full w-full" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M22.8961 8.89L21.7932 4.52C21.5622 3.62 20.7429 3 19.7871 3H5.1979C4.25259 3 3.42283 3.63 3.20225 4.52L2.0994 8.89C1.84732 9.91 2.07839 10.95 2.75061 11.77C2.83464 11.88 2.95017 11.96 3.0447 12.06V19C3.0447 20.1 3.99001 21 5.14538 21H19.8501C21.0055 21 21.9508 20.1 21.9508 19V12.06C22.0453 11.97 22.1609 11.88 22.2449 11.78C22.9171 10.96 23.1587 9.91 22.8961 8.89ZM19.7556 4.99L20.8584 9.36C20.9635 9.78 20.8689 10.2 20.5958 10.53C20.4488 10.71 20.1337 11 19.6085 11C18.9678 11 18.4111 10.51 18.3376 9.86L17.7284 5L19.7556 4.99ZM13.5481 5H15.6067L16.1739 9.52C16.2264 9.91 16.1004 10.3 15.8273 10.59C15.5962 10.85 15.2601 11 14.8295 11C14.1258 11 13.5481 10.41 13.5481 9.69V5ZM8.81106 9.52L9.38874 5H11.4474V9.69C11.4474 10.41 10.8697 11 10.0925 11C9.73536 11 9.40975 10.85 9.15767 10.59C8.89509 10.3 8.76905 9.91 8.81106 9.52ZM4.13705 9.36L5.1979 5H7.26706L6.65787 9.86C6.57384 10.51 6.02766 11 5.38696 11C4.87229 11 4.54669 10.71 4.41014 10.53C4.12655 10.21 4.03202 9.78 4.13705 9.36ZM5.14538 19V12.97C5.22941 12.98 5.30293 13 5.38696 13C6.30075 13 7.13052 12.64 7.73971 12.05C8.36992 12.65 9.21019 13 10.166 13C11.0798 13 11.8991 12.64 12.5082 12.07C13.1279 12.64 13.9682 13 14.9135 13C15.7958 13 16.6361 12.65 17.2663 12.05C17.8755 12.64 18.7052 13 19.619 13C19.7031 13 19.7766 12.98 19.8606 12.97V19H5.14538Z" /></svg>`)),key:"merchant"},{property:"is_programmer",icon:s(f||(f=u`<svg class="fill-current h-full w-full" viewBox="0 0 20 18" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M0 3C0 1.34315 1.34315 0 3 0H17C18.6569 0 20 1.34315 20 3V15C20 16.6569 18.6569 18 17 18H3C1.34315 18 0 16.6569 0 15V3ZM3 2C2.44772 2 2 2.44772 2 3V15C2 15.5523 2.44772 16 3 16H17C17.5523 16 18 15.5523 18 15V3C18 2.44772 17.5523 2 17 2H3ZM4.29289 4.29289C4.68342 3.90237 5.31658 3.90237 5.70711 4.29289L9.70711 8.29289C9.89464 8.48043 10 8.73478 10 9C10 9.26522 9.89464 9.51957 9.70711 9.70711L5.70711 13.7071C5.31658 14.0976 4.68342 14.0976 4.29289 13.7071C3.90237 13.3166 3.90237 12.6834 4.29289 12.2929L7.58579 9L4.29289 5.70711C3.90237 5.31658 3.90237 4.68342 4.29289 4.29289ZM9 13C9 12.4477 9.44771 12 10 12H15C15.5523 12 16 12.4477 16 13C16 13.5523 15.5523 14 15 14H10C9.44771 14 9 13.5523 9 13Z"/></svg>`)),key:"backend_developer"},{property:"is_front_end_developer",icon:s(p||(p=u`<svg class="fill-current h-full w-full" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M14.2747 4.03847C14.8058 4.1902 15.1132 4.74368 14.9615 5.27472L10.9615 19.2747C10.8098 19.8058 10.2563 20.1132 9.72528 19.9615C9.19424 19.8098 8.88675 19.2563 9.03848 18.7253L13.0385 4.72528C13.1902 4.19424 13.7437 3.88675 14.2747 4.03847ZM6.70711 7.29289C7.09763 7.68342 7.09763 8.31658 6.70711 8.7071L3.41421 12L6.70711 15.2929C7.09763 15.6834 7.09763 16.3166 6.70711 16.7071C6.31658 17.0976 5.68342 17.0976 5.29289 16.7071L1.29289 12.7071C0.902369 12.3166 0.902369 11.6834 1.29289 11.2929L5.29289 7.29289C5.68342 6.90237 6.31658 6.90237 6.70711 7.29289ZM17.2929 7.29289C17.6834 6.90237 18.3166 6.90237 18.7071 7.29289L22.7071 11.2929C22.8946 11.4804 23 11.7348 23 12C23 12.2652 22.8946 12.5196 22.7071 12.7071L18.7071 16.7071C18.3166 17.0976 17.6834 17.0976 17.2929 16.7071C16.9024 16.3166 16.9024 15.6834 17.2929 15.2929L20.5858 12L17.2929 8.70711C16.9024 8.31658 16.9024 7.68342 17.2929 7.29289Z" /></svg>`)),key:"frontend_developer"},{property:"is_designer",icon:s(g||(g=u`<svg class="fill-current h-full w-full" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10 20C4.49 20 0 15.51 0 10C0 4.49 4.49 0 10 0C15.51 0 20 4.04 20 9C20 12.31 17.31 15 14 15H12.23C11.95 15 11.73 15.22 11.73 15.5C11.73 15.62 11.78 15.73 11.86 15.83C12.27 16.3 12.5 16.89 12.5 17.5C12.5 18.88 11.38 20 10 20ZM10 2C5.59 2 2 5.59 2 10C2 14.41 5.59 18 10 18C10.28 18 10.5 17.78 10.5 17.5C10.5 17.34 10.42 17.22 10.36 17.15C9.95 16.69 9.73 16.1 9.73 15.5C9.73 14.12 10.85 13 12.23 13H14C16.21 13 18 11.21 18 9C18 5.14 14.41 2 10 2Z" /><path d="M4.5 11C5.32843 11 6 10.3284 6 9.5C6 8.67157 5.32843 8 4.5 8C3.67157 8 3 8.67157 3 9.5C3 10.3284 3.67157 11 4.5 11Z" /><path d="M7.5 7C8.32843 7 9 6.32843 9 5.5C9 4.67157 8.32843 4 7.5 4C6.67157 4 6 4.67157 6 5.5C6 6.32843 6.67157 7 7.5 7Z" /><path d="M12.5 7C13.3284 7 14 6.32843 14 5.5C14 4.67157 13.3284 4 12.5 4C11.6716 4 11 4.67157 11 5.5C11 6.32843 11.6716 7 12.5 7Z" /><path d="M15.5 11C16.3284 11 17 10.3284 17 9.5C17 8.67157 16.3284 8 15.5 8C14.6716 8 14 8.67157 14 9.5C14 10.3284 14.6716 11 15.5 11Z" /></svg>`)),key:"designer"}];let v,x,_,$=e=>e;const w=i(r(d(a(h,"user-form"))));class b extends w{constructor(){super(...arguments),this.__getValidator=n((e=>()=>!this.errors.some((s=>s.startsWith(e))))),this.__bindField=n((e=>s=>{const t=s.target;this.edit({[e]:t.value})}))}static get scopedElements(){return{"foxy-internal-confirm-dialog":customElements.get("foxy-internal-confirm-dialog"),"vaadin-text-field":customElements.get("vaadin-text-field"),"vaadin-button":customElements.get("vaadin-button"),"foxy-spinner":customElements.get("foxy-spinner"),"x-checkbox":e,"foxy-i18n":customElements.get("foxy-i18n"),"x-group":l}}static get v8n(){return[({first_name:e})=>!e||e.length<=50||"first_name_too_long",({last_name:e})=>!e||e.length<=50||"last_name_too_long",({email:e})=>e&&e.length>0||"email_required",({email:e})=>e&&e.length<=100||"email_too_long",({email:e})=>e&&c(e)||"email_invalid_email",({phone:e})=>!e||e.length<=50||"phone_too_long"]}render(){const e=this.in({idle:{template:{dirty:"valid"}}}),s=this.in({idle:{snapshot:{dirty:"valid"}}}),i=e||s,r=this.in("busy"),a=this.in("fail"),n=r||a||this.disabled;return t(v||(v=$` <foxy-internal-confirm-dialog data-testid="confirm" message="delete_prompt" confirm="delete" cancel="cancel" header="delete" theme="primary error" lang="${0}" ns="${0}" id="confirm" @hide="${0}"> </foxy-internal-confirm-dialog> <div data-testid="wrapper" aria-busy="${0}" aria-live="polite" class="space-y-l relative"> <div class="grid grid-cols-1 sm-grid-cols-2 gap-m"> ${0} </div> <x-group frame> ${0} </x-group> <vaadin-button data-testid="action" theme="${0}" class="w-full" ?disabled="${0}" @click="${0}"> <foxy-i18n lang="${0}" key="${0}" ns="${0}"> </foxy-i18n> </vaadin-button> <div data-testid="spinner" class="${0}"> <foxy-spinner layout="vertical" class="m-auto p-m bg-base shadow-xs rounded-t-l rounded-b-l" state="${0}" lang="${0}" ns="${0}"> </foxy-spinner> </div> </div> `),this.lang,this.ns,this.__handleConfirmHide,this.in("busy"),["first_name","last_name","email","phone"].map((e=>t(x||(x=$` <vaadin-text-field error-message="${0}" data-testid="${0}" ?disabled="${0}" ?readonly="${0}" class="w-full" label="${0}" value="${0}" .checkValidity="${0}" @input="${0}" @keydown="${0}"> </vaadin-text-field> `),this.__getErrorMessage(e),e,n,this.readonly,this.t(e),m(this.form[e]),this.__getValidator(e),this.__bindField(e),this.__handleKeyDown))),y.map(((e,s)=>t(_||(_=$` <hr class="${0}" style="margin-left:calc((var(--lumo-space-m) * 2) + 1.125rem)"> <x-checkbox class="w-full p-m" ?readonly="${0}" ?disabled="${0}" ?checked="${0}" @change="${0}"> <div class="flex items-start leading-s"> <div class="flex-1 flex flex-col"> <foxy-i18n key="${0}" lang="${0}" ns="${0}"></foxy-i18n> <foxy-i18n class="text-s text-secondary" lang="${0}" key="${0}_explainer" ns="${0}"> </foxy-i18n> </div> <div class="mt-xs" style="width:1.125rem;height:1.125rem">${0}</div> </div> </x-checkbox> `),s>0?"border-contrast-10":"hidden",this.readonly,n,this.form[e.property],(s=>{const t=s.target;this.edit({[e.property]:t.checked})}),e.key,this.lang,this.ns,this.lang,e.key,this.ns,e.icon))),this.in("idle")?"primary "+(this.href?"error":"success"):"",this.in({idle:"template"})&&!i||n,this.__handleActionClick,this.lang,this.href?"delete":"create",this.ns,o({"transition duration-500 ease-in-out absolute inset-0 flex":!0,"opacity-0 pointer-events-none":!r&&!a}),a?"error":r?"busy":"empty",this.lang,this.ns)}__getErrorMessage(e){const s=this.errors.find((s=>s.startsWith(e)));return s?this.t(s.replace(e,"v8n")):""}__handleActionClick(e){if(this.in({idle:"snapshot"})){this.renderRoot.querySelector("#confirm").show(e.currentTarget)}else this.submit()}__handleConfirmHide(e){e.detail.cancelled||this.delete()}__handleKeyDown(e){"Enter"===e.key&&this.submit()}}customElements.define("foxy-user-form",b);export{b as U,y as r};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as t,h as e}from"./shared-
|
|
1
|
+
import{_ as t,h as e}from"./shared-63eaded9.js";import{C as s}from"./shared-593f7e2c.js";import"./foxy-nucleon-element.js";import{R as l,T as a,a as i}from"./shared-3f35fa81.js";import{c as r}from"./shared-4e709717.js";import{N as n}from"./shared-44cfc617.js";let d,o,h,u,c,m=t=>t;const p=s(l(a(i(n))));class v extends p{constructor(){super(...arguments),this.templates={},this.columns=[]}static get properties(){return t(t({},super.properties),{},{columns:{attribute:!1}})}render(){var t,s;return e(d||(d=m` <div data-testid="wrapper" class="relative" aria-busy="${0}" aria-live="polite"> <table class="table-fixed w-full" data-testid="table"> <thead class="sr-only"> <tr> ${0} </tr> </thead> <tbody class="divide-y divide-contrast-10"> ${0} </tbody> </table> ${0} </div> ${0} `),this.in("busy"),this.columns.map((t=>{var s;return e(o||(o=m` <th> ${0} </th> `),null===(s=t.header)||void 0===s?void 0:s.call(t,{html:e,lang:this.lang,data:this.data,ns:this.ns}))})),this.__rows.map((t=>{var s;return e(h||(h=m` <tr class="h-l"> ${0} </tr> `),null===(s=this.columns)||void 0===s?void 0:s.map(((s,l)=>{var a;return e(u||(u=m` <td class="${0}"> ${0} </td> `),r({"text-right":l===this.columns.length-1,"hidden sm-table-cell":"sm"===s.hideBelow,"hidden md-table-cell":"md"===s.hideBelow,"hidden lg-table-cell":"lg"===s.hideBelow,"hidden xl-table-cell":"xl"===s.hideBelow,"truncate h-l font-lumo text-body text-m":!0}),t?null===(a=s.cell)||void 0===a?void 0:a.call(s,{html:e,lang:this.lang,data:t,ns:this.ns}):"")})))})),this.in({idle:"snapshot"})?"":e(c||(c=m` <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!==(s=null===(t=customElements.get("foxy-spinner"))||void 0===t?void 0:t.defaultNS)&&void 0!==s?s:""),this.renderTemplateOrSlot())}get __rows(){var t,e,s;const l=Object.values(null!==(e=null===(t=this.data)||void 0===t?void 0:t._embedded)&&void 0!==e?e:{}).reduce(((t,e)=>[...t,...e]),[]);let a;if(0===l.length)try{const t=new URL(null!==(s=this.href)&&void 0!==s?s:"").searchParams.get("limit"),e=parseInt(null!=t?t:"");a=isNaN(e)?20:e}catch(t){a=20}else a=l.length;return new Array(a).fill(null).map(((t,e)=>{var s;return null!==(s=l[e])&&void 0!==s?s:t}))}}export{v as T};
|
|
@@ -0,0 +1,358 @@
|
|
|
1
|
+
import{E as t,C as e,T as o}from"./shared-df573cea.js";import{h as r,G as i,P as a,c as s}from"./shared-ff79f3f9.js";const n=r`<dom-module id="lumo-button" theme-for="vaadin-button">
|
|
2
|
+
<template>
|
|
3
|
+
<style>
|
|
4
|
+
:host {
|
|
5
|
+
/* Sizing */
|
|
6
|
+
--lumo-button-size: var(--lumo-size-m);
|
|
7
|
+
min-width: calc(var(--lumo-button-size) * 2);
|
|
8
|
+
height: var(--lumo-button-size);
|
|
9
|
+
padding: 0 calc(var(--lumo-button-size) / 3 + var(--lumo-border-radius) / 2);
|
|
10
|
+
margin: var(--lumo-space-xs) 0;
|
|
11
|
+
box-sizing: border-box;
|
|
12
|
+
/* Style */
|
|
13
|
+
font-family: var(--lumo-font-family);
|
|
14
|
+
font-size: var(--lumo-font-size-m);
|
|
15
|
+
font-weight: 500;
|
|
16
|
+
color: var(--_lumo-button-color, var(--lumo-primary-text-color));
|
|
17
|
+
background-color: var(--_lumo-button-background-color, var(--lumo-contrast-5pct));
|
|
18
|
+
border-radius: var(--lumo-border-radius);
|
|
19
|
+
cursor: default;
|
|
20
|
+
-webkit-tap-highlight-color: transparent;
|
|
21
|
+
-webkit-font-smoothing: antialiased;
|
|
22
|
+
-moz-osx-font-smoothing: grayscale;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/* Set only for the internal parts so we don’t affect the host vertical alignment */
|
|
26
|
+
[part="label"],
|
|
27
|
+
[part="prefix"],
|
|
28
|
+
[part="suffix"] {
|
|
29
|
+
line-height: var(--lumo-line-height-xs);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
[part="label"] {
|
|
33
|
+
padding: calc(var(--lumo-button-size) / 6) 0;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
:host([theme~="small"]) {
|
|
37
|
+
font-size: var(--lumo-font-size-s);
|
|
38
|
+
--lumo-button-size: var(--lumo-size-s);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
:host([theme~="large"]) {
|
|
42
|
+
font-size: var(--lumo-font-size-l);
|
|
43
|
+
--lumo-button-size: var(--lumo-size-l);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/* This needs to be the last selector for it to take priority */
|
|
47
|
+
:host([disabled][disabled]) {
|
|
48
|
+
pointer-events: none;
|
|
49
|
+
color: var(--lumo-disabled-text-color);
|
|
50
|
+
background-color: var(--lumo-contrast-5pct);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/* For interaction states */
|
|
54
|
+
:host::before,
|
|
55
|
+
:host::after {
|
|
56
|
+
content: "";
|
|
57
|
+
/* We rely on the host always being relative */
|
|
58
|
+
position: absolute;
|
|
59
|
+
z-index: 1;
|
|
60
|
+
top: 0;
|
|
61
|
+
right: 0;
|
|
62
|
+
bottom: 0;
|
|
63
|
+
left: 0;
|
|
64
|
+
background-color: currentColor;
|
|
65
|
+
border-radius: inherit;
|
|
66
|
+
opacity: 0;
|
|
67
|
+
transition: opacity 0.2s;
|
|
68
|
+
pointer-events: none;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/* Hover */
|
|
72
|
+
|
|
73
|
+
:host(:hover)::before {
|
|
74
|
+
opacity: 0.05;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/* Disable hover for touch devices */
|
|
78
|
+
@media (pointer: coarse) {
|
|
79
|
+
:host(:not([active]):hover)::before {
|
|
80
|
+
opacity: 0;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/* Active */
|
|
85
|
+
|
|
86
|
+
:host::after {
|
|
87
|
+
transition: opacity 1.4s, transform 0.1s;
|
|
88
|
+
filter: blur(8px);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
:host([active])::before {
|
|
92
|
+
opacity: 0.1;
|
|
93
|
+
transition-duration: 0s;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
:host([active])::after {
|
|
97
|
+
opacity: 0.1;
|
|
98
|
+
transition-duration: 0s, 0s;
|
|
99
|
+
transform: scale(0);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/* Keyboard focus */
|
|
103
|
+
|
|
104
|
+
:host([focus-ring]) {
|
|
105
|
+
box-shadow: 0 0 0 2px var(--lumo-primary-color-50pct);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/* Types (primary, tertiary, tertiary-inline */
|
|
109
|
+
|
|
110
|
+
:host([theme~="tertiary"]),
|
|
111
|
+
:host([theme~="tertiary-inline"]) {
|
|
112
|
+
background-color: transparent !important;
|
|
113
|
+
transition: opacity 0.2s;
|
|
114
|
+
min-width: 0;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
:host([theme~="tertiary"])::before,
|
|
118
|
+
:host([theme~="tertiary-inline"])::before {
|
|
119
|
+
display: none;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
:host([theme~="tertiary"]) {
|
|
123
|
+
padding: 0 calc(var(--lumo-button-size) / 6);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
@media (hover: hover) {
|
|
127
|
+
:host([theme*="tertiary"]:not([active]):hover) {
|
|
128
|
+
opacity: 0.8;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
:host([theme~="tertiary"][active]),
|
|
133
|
+
:host([theme~="tertiary-inline"][active]) {
|
|
134
|
+
opacity: 0.5;
|
|
135
|
+
transition-duration: 0s;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
:host([theme~="tertiary-inline"]) {
|
|
139
|
+
margin: 0;
|
|
140
|
+
height: auto;
|
|
141
|
+
padding: 0;
|
|
142
|
+
line-height: inherit;
|
|
143
|
+
font-size: inherit;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
:host([theme~="tertiary-inline"]) [part="label"] {
|
|
147
|
+
padding: 0;
|
|
148
|
+
overflow: visible;
|
|
149
|
+
line-height: inherit;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
:host([theme~="primary"]) {
|
|
153
|
+
background-color: var(--_lumo-button-primary-background-color, var(--lumo-primary-color));
|
|
154
|
+
color: var(--_lumo-button-primary-color, var(--lumo-primary-contrast-color));
|
|
155
|
+
font-weight: 600;
|
|
156
|
+
min-width: calc(var(--lumo-button-size) * 2.5);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
:host([theme~="primary"][disabled]) {
|
|
160
|
+
background-color: var(--lumo-primary-color-50pct);
|
|
161
|
+
color: var(--lumo-primary-contrast-color);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
:host([theme~="primary"]:hover)::before {
|
|
165
|
+
opacity: 0.1;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
:host([theme~="primary"][active])::before {
|
|
169
|
+
background-color: var(--lumo-shade-20pct);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
@media (pointer: coarse) {
|
|
173
|
+
:host([theme~="primary"][active])::before {
|
|
174
|
+
background-color: var(--lumo-shade-60pct);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
:host([theme~="primary"]:not([active]):hover)::before {
|
|
178
|
+
opacity: 0;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
:host([theme~="primary"][active])::after {
|
|
183
|
+
opacity: 0.2;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
/* Colors (success, error, contrast) */
|
|
187
|
+
|
|
188
|
+
:host([theme~="success"]) {
|
|
189
|
+
color: var(--lumo-success-text-color);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
:host([theme~="success"][theme~="primary"]) {
|
|
193
|
+
background-color: var(--lumo-success-color);
|
|
194
|
+
color: var(--lumo-success-contrast-color);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
:host([theme~="success"][theme~="primary"][disabled]) {
|
|
198
|
+
background-color: var(--lumo-success-color-50pct);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
:host([theme~="error"]) {
|
|
202
|
+
color: var(--lumo-error-text-color);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
:host([theme~="error"][theme~="primary"]) {
|
|
206
|
+
background-color: var(--lumo-error-color);
|
|
207
|
+
color: var(--lumo-error-contrast-color);
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
:host([theme~="error"][theme~="primary"][disabled]) {
|
|
211
|
+
background-color: var(--lumo-error-color-50pct);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
:host([theme~="contrast"]) {
|
|
215
|
+
color: var(--lumo-contrast);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
:host([theme~="contrast"][theme~="primary"]) {
|
|
219
|
+
background-color: var(--lumo-contrast);
|
|
220
|
+
color: var(--lumo-base-color);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
:host([theme~="contrast"][theme~="primary"][disabled]) {
|
|
224
|
+
background-color: var(--lumo-contrast-50pct);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
/* Icons */
|
|
228
|
+
|
|
229
|
+
[part] ::slotted(iron-icon) {
|
|
230
|
+
display: inline-block;
|
|
231
|
+
width: var(--lumo-icon-size-m);
|
|
232
|
+
height: var(--lumo-icon-size-m);
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
/* Vaadin icons are based on a 16x16 grid (unlike Lumo and Material icons with 24x24), so they look too big by default */
|
|
236
|
+
[part] ::slotted(iron-icon[icon^="vaadin:"]) {
|
|
237
|
+
padding: 0.25em;
|
|
238
|
+
box-sizing: border-box !important;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
[part="prefix"] {
|
|
242
|
+
margin-left: -0.25em;
|
|
243
|
+
margin-right: 0.25em;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
[part="suffix"] {
|
|
247
|
+
margin-left: 0.25em;
|
|
248
|
+
margin-right: -0.25em;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
/* Icon-only */
|
|
252
|
+
|
|
253
|
+
:host([theme~="icon"]:not([theme~="tertiary-inline"])) {
|
|
254
|
+
min-width: var(--lumo-button-size);
|
|
255
|
+
padding-left: calc(var(--lumo-button-size) / 4);
|
|
256
|
+
padding-right: calc(var(--lumo-button-size) / 4);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
:host([theme~="icon"]) [part="prefix"],
|
|
260
|
+
:host([theme~="icon"]) [part="suffix"] {
|
|
261
|
+
margin-left: 0;
|
|
262
|
+
margin-right: 0;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
/* RTL specific styles */
|
|
266
|
+
|
|
267
|
+
:host([dir="rtl"]) [part="prefix"] {
|
|
268
|
+
margin-left: 0.25em;
|
|
269
|
+
margin-right: -0.25em;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
:host([dir="rtl"]) [part="suffix"] {
|
|
273
|
+
margin-left: -0.25em;
|
|
274
|
+
margin-right: 0.25em;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
:host([dir="rtl"][theme~="icon"]) [part="prefix"],
|
|
278
|
+
:host([dir="rtl"][theme~="icon"]) [part="suffix"] {
|
|
279
|
+
margin-left: 0;
|
|
280
|
+
margin-right: 0;
|
|
281
|
+
}
|
|
282
|
+
</style>
|
|
283
|
+
</template>
|
|
284
|
+
</dom-module>`;document.head.appendChild(n.content);
|
|
285
|
+
/**
|
|
286
|
+
@license
|
|
287
|
+
Copyright (c) 2017 Vaadin Ltd.
|
|
288
|
+
This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
289
|
+
*/
|
|
290
|
+
class l extends(t(e(o(i(a))))){static get template(){return r`
|
|
291
|
+
<style>
|
|
292
|
+
:host {
|
|
293
|
+
display: inline-block;
|
|
294
|
+
position: relative;
|
|
295
|
+
outline: none;
|
|
296
|
+
white-space: nowrap;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
:host([hidden]) {
|
|
300
|
+
display: none !important;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
/* Ensure the button is always aligned on the baseline */
|
|
304
|
+
.vaadin-button-container::before {
|
|
305
|
+
content: "\\2003";
|
|
306
|
+
display: inline-block;
|
|
307
|
+
width: 0;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
.vaadin-button-container {
|
|
311
|
+
display: inline-flex;
|
|
312
|
+
align-items: center;
|
|
313
|
+
justify-content: center;
|
|
314
|
+
text-align: center;
|
|
315
|
+
width: 100%;
|
|
316
|
+
height: 100%;
|
|
317
|
+
min-height: inherit;
|
|
318
|
+
text-shadow: inherit;
|
|
319
|
+
-webkit-user-select: none;
|
|
320
|
+
-moz-user-select: none;
|
|
321
|
+
user-select: none;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
[part="prefix"],
|
|
325
|
+
[part="suffix"] {
|
|
326
|
+
flex: none;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
[part="label"] {
|
|
330
|
+
white-space: nowrap;
|
|
331
|
+
overflow: hidden;
|
|
332
|
+
text-overflow: ellipsis;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
#button {
|
|
336
|
+
position: absolute;
|
|
337
|
+
top: 0;
|
|
338
|
+
left: 0;
|
|
339
|
+
right: 0;
|
|
340
|
+
width: 100%;
|
|
341
|
+
height: 100%;
|
|
342
|
+
opacity: 0;
|
|
343
|
+
cursor: inherit;
|
|
344
|
+
}
|
|
345
|
+
</style>
|
|
346
|
+
<div class="vaadin-button-container">
|
|
347
|
+
<div part="prefix">
|
|
348
|
+
<slot name="prefix"></slot>
|
|
349
|
+
</div>
|
|
350
|
+
<div part="label">
|
|
351
|
+
<slot></slot>
|
|
352
|
+
</div>
|
|
353
|
+
<div part="suffix">
|
|
354
|
+
<slot name="suffix"></slot>
|
|
355
|
+
</div>
|
|
356
|
+
</div>
|
|
357
|
+
<button id="button" type="button"></button>
|
|
358
|
+
`}static get is(){return"vaadin-button"}static get version(){return"2.4.0"}ready(){super.ready(),this.setAttribute("role","button"),this.$.button.setAttribute("role","presentation"),this._addActiveListeners(),window.ShadyDOM&&window.ShadyDOM.flush()}disconnectedCallback(){super.disconnectedCallback(),this.hasAttribute("active")&&this.removeAttribute("active")}_addActiveListeners(){s(this,"down",(()=>!this.disabled&&this.setAttribute("active",""))),s(this,"up",(()=>this.removeAttribute("active"))),this.addEventListener("keydown",(t=>!this.disabled&&[13,32].indexOf(t.keyCode)>=0&&this.setAttribute("active",""))),this.addEventListener("keyup",(()=>this.removeAttribute("active"))),this.addEventListener("blur",(()=>this.removeAttribute("active")))}get focusElement(){return this.$.button}}customElements.define(l.is,l);export{l as B};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as t,_ as e}from"./shared-
|
|
1
|
+
import{h as t,_ as e}from"./shared-63eaded9.js";import{C as i}from"./shared-593f7e2c.js";import{N as s}from"./shared-44cfc617.js";import{T as r}from"./shared-3f35fa81.js";import{c as a}from"./shared-4e709717.js";let l,d,n,o=t=>t;const h=i(r(s));class p extends h{constructor(){super(...arguments),this.templates={},this.lang="",this.ns="",this.__renderTitle=e=>t(l||(l=o` <div data-testid="title"> ${0} <div class="text-secondary truncate"> ${0}​ </div> ${0} </div> `),this.renderTemplateOrSlot("title:before"),this.data?null==e?void 0:e(this.data):"",this.renderTemplateOrSlot("title:after")),this.__renderSubtitle=e=>t(d||(d=o` <div data-testid="subtitle"> ${0} <div class="font-semibold truncate"> ${0}​ </div> ${0} </div> `),this.renderTemplateOrSlot("subtitle:before"),this.data?null==e?void 0:e(this.data):"",this.renderTemplateOrSlot("subtitle:after"))}static get properties(){return e(e({},super.properties),{},{lang:{type:String},ns:{type:String}})}render(e){var i,s;const r=this.hiddenSelector;return t(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==e?void 0:e.title),r.matches("subtitle",!0)?"":this.__renderSubtitle(null==e?void 0:e.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===(i=customElements.get("foxy-spinner"))||void 0===i?void 0:i.defaultNS)&&void 0!==s?s:"")}}export{p as T};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{E as e,C as t,T as o}from"./shared-
|
|
1
|
+
import{E as e,C as t,T as o}from"./shared-df573cea.js";import{h as i,G as r,P as a}from"./shared-ff79f3f9.js";const s=i`<dom-module id="lumo-checkbox" theme-for="vaadin-checkbox">
|
|
2
2
|
<template>
|
|
3
3
|
<style include="lumo-checkbox-style lumo-checkbox-effects">
|
|
4
4
|
/* IE11 only */
|