@foxy.io/elements 1.24.0-beta.4 → 1.24.0-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/foxy-access-recovery-form.js +1 -1
- package/dist/cdn/foxy-address-card.js +1 -1
- package/dist/cdn/foxy-address-form.js +1 -1
- package/dist/cdn/foxy-admin-subscription-card.js +1 -1
- package/dist/cdn/foxy-api-browser.js +1 -1
- package/dist/cdn/foxy-applied-coupon-code-card.js +1 -1
- package/dist/cdn/foxy-applied-coupon-code-form.js +1 -1
- package/dist/cdn/foxy-applied-tax-card.js +1 -1
- package/dist/cdn/foxy-attribute-card.js +1 -1
- package/dist/cdn/foxy-attribute-form.js +1 -1
- package/dist/cdn/foxy-cancellation-form.js +1 -1
- package/dist/cdn/foxy-cart-card.js +1 -1
- package/dist/cdn/foxy-cart-form.js +1 -1
- package/dist/cdn/foxy-client-card.js +1 -1
- package/dist/cdn/foxy-client-form.js +1 -1
- package/dist/cdn/foxy-collection-page.js +1 -1
- package/dist/cdn/foxy-collection-pages.js +1 -1
- package/dist/cdn/foxy-copy-to-clipboard.js +1 -1
- package/dist/cdn/foxy-coupon-card.js +1 -1
- package/dist/cdn/foxy-coupon-code-form.js +1 -1
- package/dist/cdn/foxy-coupon-codes-form.js +1 -1
- package/dist/cdn/foxy-coupon-detail-card.js +1 -1
- package/dist/cdn/foxy-coupon-form.js +1 -1
- package/dist/cdn/foxy-custom-field-card.js +1 -1
- package/dist/cdn/foxy-custom-field-form.js +1 -1
- package/dist/cdn/foxy-customer-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 +2 -2
- package/dist/cdn/foxy-customer.js +1 -1
- package/dist/cdn/foxy-customers-table.js +1 -1
- package/dist/cdn/foxy-discount-builder.js +1 -1
- package/dist/cdn/foxy-discount-card.js +1 -1
- package/dist/cdn/foxy-discount-detail-card.js +1 -1
- package/dist/cdn/foxy-donation.js +1 -1
- package/dist/cdn/foxy-downloadable-card.js +1 -1
- package/dist/cdn/foxy-downloadable-form.js +1 -1
- package/dist/cdn/foxy-email-template-card.js +1 -1
- package/dist/cdn/foxy-email-template-form.js +1 -1
- package/dist/cdn/foxy-error-entry-card.js +1 -1
- package/dist/cdn/foxy-filter-attribute-card.js +1 -1
- package/dist/cdn/foxy-filter-attribute-form.js +1 -1
- package/dist/cdn/foxy-form-dialog.js +1 -1
- package/dist/cdn/foxy-generate-codes-form.js +1 -1
- package/dist/cdn/foxy-gift-card-card.js +1 -1
- package/dist/cdn/foxy-gift-card-code-form.js +1 -1
- package/dist/cdn/foxy-gift-card-code-log-card.js +1 -1
- package/dist/cdn/foxy-gift-card-codes-form.js +1 -1
- package/dist/cdn/foxy-gift-card-form.js +1 -1
- package/dist/cdn/foxy-i18n-editor.js +2 -2
- package/dist/cdn/foxy-i18n.js +1 -1
- package/dist/cdn/foxy-integration-card.js +1 -1
- package/dist/cdn/foxy-integration-form.js +1 -1
- package/dist/cdn/foxy-item-card.js +1 -1
- package/dist/cdn/foxy-item-category-card.js +1 -1
- package/dist/cdn/foxy-item-category-form.js +1 -1
- package/dist/cdn/foxy-item-form.js +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-passkey-card.js +1 -1
- package/dist/cdn/foxy-passkey-form.js +1 -1
- package/dist/cdn/foxy-payment-card.js +1 -1
- package/dist/cdn/foxy-payment-method-card.js +1 -1
- package/dist/cdn/foxy-payments-api-fraud-protection-card.js +1 -1
- package/dist/cdn/foxy-payments-api-fraud-protection-form.js +1 -1
- package/dist/cdn/foxy-payments-api-payment-method-card.js +1 -1
- package/dist/cdn/foxy-payments-api-payment-method-form.js +1 -1
- package/dist/cdn/foxy-payments-api-payment-preset-card.js +1 -1
- package/dist/cdn/foxy-payments-api-payment-preset-form.js +1 -1
- package/dist/cdn/foxy-payments-api.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 +1 -1
- package/dist/cdn/foxy-shipment-card.js +1 -1
- package/dist/cdn/foxy-shipping-method-card.js +1 -1
- package/dist/cdn/foxy-sign-in-form.js +1 -1
- package/dist/cdn/foxy-spinner.js +2 -2
- package/dist/cdn/foxy-store-card.js +1 -1
- package/dist/cdn/foxy-store-form.js +1 -1
- package/dist/cdn/foxy-store-shipping-method-form.js +1 -1
- package/dist/cdn/foxy-subscription-card.js +1 -1
- package/dist/cdn/foxy-subscription-form.js +2 -2
- package/dist/cdn/foxy-subscription-settings-form.js +1 -1
- package/dist/cdn/foxy-subscriptions-table.js +1 -1
- package/dist/cdn/foxy-table.js +1 -1
- package/dist/cdn/foxy-tax-card.js +1 -1
- package/dist/cdn/foxy-tax-form.js +1 -1
- package/dist/cdn/foxy-template-config-form.js +1 -1
- package/dist/cdn/foxy-template-form.js +1 -1
- package/dist/cdn/foxy-template-set-card.js +1 -1
- package/dist/cdn/foxy-template-set-form.js +1 -1
- package/dist/cdn/foxy-transaction-card.js +1 -1
- package/dist/cdn/foxy-transaction.js +1 -1
- package/dist/cdn/foxy-transactions-table.js +1 -1
- package/dist/cdn/foxy-user-card.js +1 -1
- package/dist/cdn/foxy-user-form.js +1 -1
- package/dist/cdn/foxy-users-table.js +1 -1
- package/dist/cdn/foxy-webhook-card.js +1 -1
- package/dist/cdn/foxy-webhook-form.js +1 -1
- package/dist/cdn/foxy-webhook-log-card.js +1 -1
- package/dist/cdn/foxy-webhook-status-card.js +1 -1
- package/dist/cdn/{shared-9caffb4d.js → shared-017ab35f.js} +1 -1
- package/dist/cdn/{shared-e6828dbf.js → shared-0689b25a.js} +5 -5
- package/dist/cdn/shared-0dabe195.js +15 -0
- package/dist/cdn/{shared-1b060170.js → shared-125d1a00.js} +1 -1
- package/dist/cdn/shared-13cc4ed4.js +9 -0
- package/dist/cdn/{shared-ff992ead.js → shared-15fe0f50.js} +1 -1
- package/dist/cdn/{shared-379b37e6.js → shared-19c9fe00.js} +7 -11
- package/dist/cdn/shared-1b2e0709.js +1 -0
- package/dist/cdn/shared-1e43b4db.js +1 -0
- package/dist/cdn/{shared-c7f2f1ab.js → shared-1fd59009.js} +1 -1
- package/dist/cdn/{shared-31651a9c.js → shared-2fa6a5a0.js} +1 -1
- package/dist/cdn/{shared-65318cc1.js → shared-3164d0c3.js} +1 -1
- package/dist/cdn/{shared-e10052d0.js → shared-31a891e8.js} +3 -3
- package/dist/cdn/{shared-b3ac59eb.js → shared-403af08d.js} +2 -2
- package/dist/cdn/{shared-a92ae606.js → shared-421e46e9.js} +1 -1
- package/dist/cdn/{shared-dccf0420.js → shared-42adf053.js} +1 -1
- package/dist/cdn/{shared-77a4d8e8.js → shared-46f3f71c.js} +1 -1
- package/dist/cdn/{shared-e84fa0ea.js → shared-4966b3e4.js} +1 -1
- package/dist/cdn/{shared-b48a83b0.js → shared-4a0298cb.js} +1 -1
- package/dist/cdn/{shared-17d0db7f.js → shared-4bd1efd7.js} +3 -3
- package/dist/cdn/{shared-51d28e6d.js → shared-527abf31.js} +1 -1
- package/dist/cdn/{shared-fe54babe.js → shared-53532131.js} +1 -1
- package/dist/cdn/{shared-9c626d58.js → shared-5616a12f.js} +1 -1
- package/dist/cdn/{shared-c97e0d6e.js → shared-57922341.js} +1 -1
- package/dist/cdn/shared-619bcf83.js +1 -0
- package/dist/cdn/{shared-ba658670.js → shared-6273b7e1.js} +1 -1
- package/dist/cdn/{shared-4904bca4.js → shared-639dda4b.js} +1 -1
- package/dist/cdn/{shared-d14c2060.js → shared-6b0498b2.js} +3 -3
- package/dist/cdn/{shared-6f84ac3e.js → shared-6b3be508.js} +1 -1
- package/dist/cdn/{shared-c6c6ba69.js → shared-6dffe67d.js} +1 -1
- package/dist/cdn/{shared-4c956a8e.js → shared-72a13fda.js} +1 -1
- package/dist/cdn/{shared-4b67d699.js → shared-763a6797.js} +1 -1
- package/dist/cdn/shared-7680d300.js +122 -0
- package/dist/cdn/shared-79d01877.js +1 -0
- package/dist/cdn/{shared-6abdfcf2.js → shared-7bf6e728.js} +1 -1
- package/dist/cdn/{shared-69a21b9d.js → shared-7d4e0011.js} +1 -1
- package/dist/cdn/shared-7e887e5b.js +1 -0
- package/dist/cdn/{shared-8474bc4a.js → shared-7ead930c.js} +1 -1
- package/dist/cdn/shared-7f33a83a.js +12 -12
- package/dist/cdn/{shared-6dc64a17.js → shared-8128b5e3.js} +1 -1
- package/dist/cdn/{shared-984fcdf5.js → shared-8134d8a7.js} +3 -3
- package/dist/cdn/{shared-c4240bc6.js → shared-8465a37a.js} +1 -1
- package/dist/cdn/{shared-e7c3b7b6.js → shared-848813a4.js} +1 -1
- package/dist/cdn/shared-8528906b.js +1 -0
- package/dist/cdn/{shared-a3c73e91.js → shared-897ab5e6.js} +1 -1
- package/dist/cdn/{shared-4bbd600d.js → shared-8fbab85c.js} +1 -1
- package/dist/cdn/{shared-4dc58b73.js → shared-90be9ac7.js} +1 -1
- package/dist/cdn/{shared-0a248c0d.js → shared-91eb066c.js} +1 -1
- package/dist/cdn/{shared-1d28220a.js → shared-9765be8f.js} +1 -1
- package/dist/cdn/{shared-e6997950.js → shared-9bdd5400.js} +1 -1
- package/dist/cdn/{shared-dfe2602a.js → shared-a134d313.js} +1 -1
- package/dist/cdn/shared-a6517170.js +1 -0
- package/dist/cdn/shared-a7475f62.js +212 -0
- package/dist/cdn/shared-a88c5cf1.js +29 -0
- package/dist/cdn/{shared-479ad951.js → shared-a96a2154.js} +1 -1
- package/dist/cdn/shared-aa22ee61.js +1 -0
- package/dist/cdn/shared-aa569a99.js +804 -0
- package/dist/cdn/{shared-e8e92fe3.js → shared-ad0256d0.js} +2 -2
- package/dist/cdn/{shared-25f64060.js → shared-b334c8b6.js} +1 -1
- package/dist/cdn/{shared-1d08a5ad.js → shared-bbbb8894.js} +1 -1
- package/dist/cdn/{shared-bafcab47.js → shared-bf2113a4.js} +3 -3
- package/dist/cdn/{shared-88e36564.js → shared-c541c9e9.js} +26 -27
- package/dist/cdn/{shared-36725fe3.js → shared-c758220c.js} +1 -1
- package/dist/cdn/{shared-4674063d.js → shared-c97f7178.js} +27 -27
- package/dist/cdn/shared-d2222c8d.js +1 -0
- package/dist/cdn/{shared-64f98a0f.js → shared-db06114b.js} +7 -2
- package/dist/cdn/{shared-665d6cc4.js → shared-e5786b8b.js} +1 -1
- package/dist/cdn/shared-e640e9fa.js +1 -0
- package/dist/cdn/{shared-30bebd39.js → shared-eb232194.js} +3 -3
- package/dist/cdn/{shared-bdb51db9.js → shared-f4822b9e.js} +1 -1
- package/dist/cdn/{shared-db21f6db.js → shared-fa5f0117.js} +2 -2
- package/dist/cdn/shared-fc77174e.js +1 -0
- package/dist/cdn/shared-fec6fd04.js +1 -0
- package/dist/cdn/translations/address-form/en.json +577 -0
- package/dist/cdn/translations/customer/en.json +577 -0
- package/dist/cdn/translations/customer-portal/en.json +579 -1
- package/dist/elements/public/AddressForm/AddressForm.d.ts +2 -1
- package/dist/elements/public/AddressForm/AddressForm.js +53 -17
- package/dist/elements/public/AddressForm/AddressForm.js.map +1 -1
- package/dist/elements/public/AddressForm/countries.d.ts +1 -1
- package/dist/elements/public/AddressForm/countries.js +554 -251
- package/dist/elements/public/AddressForm/countries.js.map +1 -1
- package/package.json +10 -10
- package/dist/cdn/shared-09d4fbb8.js +0 -29
- package/dist/cdn/shared-1eac92fa.js +0 -1
- package/dist/cdn/shared-307262a1.js +0 -15
- package/dist/cdn/shared-332f2997.js +0 -1
- package/dist/cdn/shared-39f3b48d.js +0 -1
- package/dist/cdn/shared-432c5183.js +0 -9
- package/dist/cdn/shared-4dee79d4.js +0 -1
- package/dist/cdn/shared-53061389.js +0 -1
- package/dist/cdn/shared-59042137.js +0 -201
- package/dist/cdn/shared-65ba8b39.js +0 -1
- package/dist/cdn/shared-7f5618ba.js +0 -1
- package/dist/cdn/shared-92f27a38.js +0 -1
- package/dist/cdn/shared-b0f534ef.js +0 -1
- package/dist/cdn/shared-be24dd36.js +0 -804
- package/dist/cdn/shared-bf62a65b.js +0 -1
- package/dist/cdn/shared-c2d3b32b.js +0 -1
- package/dist/cdn/shared-cf269a17.js +0 -1
- package/dist/cdn/shared-fef9ecc1.js +0 -122
- package/dist/elements/public/AddressForm/regions.d.ts +0 -1
- package/dist/elements/public/AddressForm/regions.js +0 -67
- package/dist/elements/public/AddressForm/regions.js.map +0 -1
- /package/dist/cdn/{shared-64657919.js → shared-343d1fd7.js} +0 -0
- /package/dist/cdn/{shared-d6276c83.js → shared-3ab0306f.js} +0 -0
- /package/dist/cdn/{shared-e6f3e9f0.js → shared-bb05cfed.js} +0 -0
- /package/dist/cdn/{shared-99065f2a.js → shared-d7be11de.js} +0 -0
- /package/dist/cdn/{shared-0479553e.js → shared-f9180815.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as e}from"./shared-
|
|
1
|
+
import{_ as e}from"./shared-0dabe195.js";import"./shared-c97f7178.js";import"./shared-4bd1efd7.js";import"./shared-a96a2154.js";import{L as s,c as t,h as r}from"./shared-7f33a83a.js";import{T as a}from"./shared-a88c5cf1.js";import{c as i}from"./shared-4e709717.js";class c extends CustomEvent{constructor(e){super("change",{detail:e})}}let o,l,d=e=>e;class h extends(a(s)){constructor(){super(...arguments),this.readonly=!1,this.disabled=!1,this.checked=!1}static get properties(){return e(e({},super.properties),{},{readonly:{type:Boolean},disabled:{type:Boolean},checked:{type:Boolean}})}static get styles(){return[super.styles,t(o||(o=d`:host{--check-size:1.125rem}label{margin:calc(((1rem * var(--lumo-line-height-s)) - var(--check-size))/ -2) 0}label>:first-child{height:calc(1rem * var(--lumo-line-height-s))}.ml-xxl{margin-left:calc(var(--lumo-space-m) + var(--check-size))}.check{height:var(--check-size);width:var(--check-size)}`))]}render(){return r(l||(l=d` <label class="${0}"> <div class="flex items-center"> <div class="${0}"> <iron-icon icon="lumo:checkmark" class="${0}"> </iron-icon> <input type="checkbox" class="sr-only" .checked="${0}" ?disabled="${0}" data-testid="input" @change="${0}"> </div> </div> <div class="flex-1 font-lumo leading-s ml-m"> <slot></slot> </div> </label> <div class="${0}"> <slot name="content"></slot> </div> `),i({"flex items-start group transition-colors":!0,"cursor-default":this.disabled||this.readonly,"text-disabled":this.disabled,"text-secondary":this.readonly,"cursor-pointer":!this.disabled}),i({"flex-shrink-0 check transition-colors rounded-s border":!0,"focus-within-shadow-outline":!0,"bg-primary text-primary-contrast":!this.readonly&&this.checked,"border-dashed border-contrast-30":this.readonly,"border-transparent":!this.readonly,"opacity-50":this.disabled,"text-secondary bg-contrast-20":!this.readonly&&!this.checked,"group-hover-bg-contrast-30":!this.readonly&&!this.checked}),i({"block w-full h-full transition-transform transform":!0,"scale-100":this.checked,"scale-0":!this.checked}),this.checked,this.disabled,(e=>{if(this.readonly)return e.preventDefault();e.stopPropagation(),this.checked=!this.checked,this.dispatchEvent(new c(this.checked))}),i({"font-lumo ml-xxl transition-colors":!0,"text-disabled":this.disabled}))}}export{h as C,c as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as e}from"./shared-
|
|
1
|
+
import{_ as e}from"./shared-0dabe195.js";const r=r=>class extends r{constructor(){super(...arguments),this.infer=null}static get inferredProperties(){return[]}static get properties(){return e(e({},super.properties),{},{infer:{type:String,reflect:!0}})}inferFromElement(e,r){if(e in r)return r[e]}inferProperties(){this.updateComplete.then((()=>{var e;const r=new Map,t=this.constructor,n=new Set(t.inferredProperties),s=e=>{e&&(e instanceof ShadowRoot?s(e.host):e instanceof HTMLElement&&(n.forEach((t=>{const s=this.inferFromElement(t,e);void 0!==s&&(r.set(t,s),n.delete(t))})),n.size>0&&s(e.parentNode)))};s(this.parentNode),null===(e=this.applyInferredProperties)||void 0===e||e.call(this,r)}))}inferPropertiesInDescendants(){(this.renderRoot===this?[this.renderRoot]:[this.renderRoot,this]).forEach((e=>e.querySelectorAll("[infer]").forEach((e=>e.inferProperties()))))}applyInferredProperties(e){}connectedCallback(){super.connectedCallback(),this.inferPropertiesInDescendants()}updated(e){super.updated(e),this.inferPropertiesInDescendants()}};export{r as I};
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import"./shared-2fa6a5a0.js";import"./shared-4bd1efd7.js";import{T as e}from"./shared-0689b25a.js";import{h as t}from"./shared-a7475f62.js";import{D as i}from"./shared-a88c5cf1.js";const n=t`<dom-module id="lumo-number-field" theme-for="vaadin-number-field">
|
|
2
|
+
<template>
|
|
3
|
+
<style include="lumo-field-button">
|
|
4
|
+
:host {
|
|
5
|
+
width: 8em;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
:host([has-controls]:not([theme~="align-right"])) [part="value"] {
|
|
9
|
+
text-align: center;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
[part="decrease-button"][disabled],
|
|
13
|
+
[part="increase-button"][disabled] {
|
|
14
|
+
opacity: 0.2;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
:host([has-controls]) [part="input-field"] {
|
|
18
|
+
padding: 0;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
[part="decrease-button"],
|
|
22
|
+
[part="increase-button"] {
|
|
23
|
+
cursor: pointer;
|
|
24
|
+
font-size: var(--lumo-icon-size-s);
|
|
25
|
+
width: 1.6em;
|
|
26
|
+
height: 1.6em;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
[part="decrease-button"]::before,
|
|
30
|
+
[part="increase-button"]::before {
|
|
31
|
+
margin-top: 0.2em;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/* RTL specific styles */
|
|
35
|
+
|
|
36
|
+
:host([dir="rtl"]) [part="value"],
|
|
37
|
+
:host([dir="rtl"]) [part="input-field"] ::slotted(input) {
|
|
38
|
+
--_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent, #000 1.25em);
|
|
39
|
+
}
|
|
40
|
+
</style>
|
|
41
|
+
</template>
|
|
42
|
+
</dom-module>`;document.head.appendChild(n.content);
|
|
43
|
+
/**
|
|
44
|
+
@license
|
|
45
|
+
Copyright (c) 2017 Vaadin Ltd.
|
|
46
|
+
This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
47
|
+
*/
|
|
48
|
+
const s=t`<dom-module id="vaadin-number-field-template">
|
|
49
|
+
<template>
|
|
50
|
+
<style>
|
|
51
|
+
:host([readonly]) [part\$="button"] {
|
|
52
|
+
pointer-events: none;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
[part="decrease-button"]::before {
|
|
56
|
+
content: "−";
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
[part="increase-button"]::before {
|
|
60
|
+
content: "+";
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
[part="decrease-button"],
|
|
64
|
+
[part="increase-button"] {
|
|
65
|
+
-webkit-user-select: none;
|
|
66
|
+
-moz-user-select: none;
|
|
67
|
+
-ms-user-select: none;
|
|
68
|
+
user-select: none;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/* Hide the native arrow icons */
|
|
72
|
+
[part="value"]::-webkit-outer-spin-button,
|
|
73
|
+
[part="value"]::-webkit-inner-spin-button {
|
|
74
|
+
-webkit-appearance: none;
|
|
75
|
+
margin: 0;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
[part="value"] {
|
|
79
|
+
/* Older Firefox versions (v47.0) requires !important */
|
|
80
|
+
-moz-appearance: textfield !important;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
:host([dir="rtl"]) [part="input-field"] {
|
|
84
|
+
direction: ltr;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
:host([dir="rtl"]) [part="value"]::placeholder {
|
|
88
|
+
direction: rtl;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
:host([dir="rtl"]) [part="input-field"] ::slotted(input)::placeholder {
|
|
92
|
+
direction: rtl;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
:host([dir="rtl"]) [part="value"]:-ms-input-placeholder,
|
|
96
|
+
:host([dir="rtl"]) [part="input-field"] ::slotted(input):-ms-input-placeholder {
|
|
97
|
+
direction: rtl;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
:host([dir="rtl"]:not([has-controls])) [part="value"]::placeholder {
|
|
101
|
+
text-align: left;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
:host([dir="rtl"]:not([has-controls])) [part="input-field"] ::slotted(input)::placeholder {
|
|
105
|
+
text-align: left;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
:host([dir="rtl"]:not([has-controls])) [part="value"]:-ms-input-placeholder,
|
|
109
|
+
:host([dir="rtl"]:not([has-controls])) [part="input-field"] ::slotted(input):-ms-input-placeholder {
|
|
110
|
+
text-align: left;
|
|
111
|
+
}
|
|
112
|
+
</style>
|
|
113
|
+
|
|
114
|
+
<div disabled\$="[[!_allowed(-1, value, min, max, step)]]" part="decrease-button" on-click="_decreaseValue" on-touchend="_decreaseButtonTouchend" hidden\$="[[!hasControls]]">
|
|
115
|
+
</div>
|
|
116
|
+
|
|
117
|
+
<div disabled\$="[[!_allowed(1, value, min, max, step)]]" part="increase-button" on-click="_increaseValue" on-touchend="_increaseButtonTouchend" hidden\$="[[!hasControls]]">
|
|
118
|
+
</div>
|
|
119
|
+
</template>
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
</dom-module>`;let a;document.head.appendChild(s.content);class r extends e{static get is(){return"vaadin-number-field"}static get version(){return"2.10.0"}static get properties(){return{hasControls:{type:Boolean,value:!1,reflectToAttribute:!0},min:{type:Number,reflectToAttribute:!0,observer:"_minChanged"},max:{type:Number,reflectToAttribute:!0,observer:"_maxChanged"},step:{type:Number,value:1,observer:"_stepChanged"}}}ready(){super.ready(),this.__previousValidInput=this.value||"",this.inputElement.type="number",this.inputElement.addEventListener("change",this.__onInputChange.bind(this))}_decreaseButtonTouchend(e){e.preventDefault(),this._decreaseValue()}_increaseButtonTouchend(e){e.preventDefault(),this._increaseValue()}static get template(){if(!a){a=super.template.cloneNode(!0);const e=i.import(this.is+"-template","template"),t=e.content.querySelector('[part="decrease-button"]'),n=e.content.querySelector('[part="increase-button"]'),s=e.content.querySelector("style"),r=a.content.querySelector('[part="input-field"]'),l=a.content.querySelector('[name="prefix"]');r.insertBefore(t,l),r.appendChild(n),a.content.appendChild(s)}return a}_createConstraintsObserver(){this._createMethodObserver("_constraintsChanged(required, minlength, maxlength, pattern, min, max, step)")}_constraintsChanged(e,t,i,n,s,a,r){if(!this.invalid)return;const l=e=>!e&&0!==e;l(s)&&l(a)?super._constraintsChanged(e,t,i,n):this.validate()}_decreaseValue(){this._incrementValue(-1)}_increaseValue(){this._incrementValue(1)}_incrementValue(e){if(this.disabled||this.readonly)return;let t=parseFloat(this.value);this.value?t<this.min?(e=0,t=this.min):t>this.max&&(e=0,t=this.max):0==this.min&&e<0||0==this.max&&e>0||0==this.max&&0==this.min?(e=0,t=0):(null==this.max||this.max>=0)&&(null==this.min||this.min<=0)?t=0:this.min>0?(t=this.min,this.max<0&&e<0&&(t=this.max),e=0):this.max<0&&(t=this.max,e<0?e=0:this._getIncrement(1,t-this.step)>this.max?t-=2*this.step:t-=this.step);const i=this._getIncrement(e,t);this.value&&0!=e&&!this._incrementIsInsideTheLimits(e,t)||this._setValue(i)}_setValue(e){this.value=this._inputElementValue=String(parseFloat(e)),this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))}_getIncrement(e,t){let i=this.step||1,n=this.min||0;const s=Math.max(this._getMultiplier(t),this._getMultiplier(i),this._getMultiplier(n));i*=s,n*=s;const a=((t=Math.round(t*s))-n)%i;return e>0?(t-a+i)/s:e<0?(t-(a||i))/s:t/s}_getDecimalCount(e){const t=String(e),i=t.indexOf(".");return-1===i?1:t.length-i-1}_getMultiplier(e){if(!isNaN(e))return Math.pow(10,this._getDecimalCount(e))}_incrementIsInsideTheLimits(e,t){return e<0?null==this.min||this._getIncrement(e,t)>=this.min:e>0?null==this.max||this._getIncrement(e,t)<=this.max:this._getIncrement(e,t)<=this.max&&this._getIncrement(e,t)>=this.min}_allowed(e){const t=e*(this.step||1),i=parseFloat(this.value);return!this.value||!this.disabled&&this._incrementIsInsideTheLimits(t,i)}_stepChanged(e,t){this.__validateByStep=this.__stepChangedCalled||null!==this.getAttribute("step"),this.inputElement.step=this.__validateByStep?e:"any",this.__stepChangedCalled=!0,this.setAttribute("step",e)}_minChanged(e){this.inputElement.min=e}_maxChanged(e){this.inputElement.max=e}_valueChanged(e,t){e&&isNaN(parseFloat(e))?this.value="":"string"!=typeof this.value&&(this.value=String(this.value)),super._valueChanged(this.value,t)}_onKeyDown(e){38==e.keyCode?(e.preventDefault(),this._increaseValue()):40==e.keyCode&&(e.preventDefault(),this._decreaseValue()),super._onKeyDown(e)}__onInputChange(){this.validate()}checkValidity(){return void 0!==this.min||void 0!==this.max||this.__validateByStep?this.inputElement.checkValidity():super.checkValidity()}_setHasInputValue(e){this._hasInputValue=e.target.value.length>0||e.target.validity.badInput}}window.customElements.define(r.is,r);export{r as N};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./foxy-spinner.js";import{I as e}from"./shared-421e46e9.js";customElements.define("foxy-internal-card",e);
|